repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
Mikescher/Serpilicum
src/OptionMenu.h
#pragma once #include "menu.h" #include "ListenerCollection.h" #include "Label.h" #include "Button.h" #include "Edit.h" #include "Game.h" class OptionMenu : public Menu { private: Edit* nameEdt; virtual void createMenu(ActionListener * optiontListener, std::string playername); public: OptionMenu(ActionListener * optiontListener, std::string playername); ~OptionMenu(void); virtual std::string getEditText(void); };
Mikescher/Serpilicum
src/IntroMenu.h
<filename>src/IntroMenu.h #pragma once #include "menu.h" #include "ListenerCollection.h" #include "Label.h" #include "Button.h" #include "Edit.h" class IntroMenu : public Menu { private: Edit* nameEdt; virtual void createMenu(ActionListener* mainMenuListener); public: IntroMenu(ActionListener* mainMenuListener); ~IntroMenu(void); virtual std::string getEditText(void); };
Mikescher/Serpilicum
src/GameOverDisplayMenu.h
#pragma once #include "displayimagetextmenu.h" class GameOverDisplayMenu : public DisplayImageTextMenu { private: int cpoints; public: GameOverDisplayMenu(int pid, AbstractConsole* console, ActionListener * quitListener, int resourceID, int points); virtual void onKeyDown(int keycode); };
Mikescher/Serpilicum
src/MenuElement.h
<gh_stars>0 #pragma once #include "AbstractConsole.h" class MenuElement { private: int x; int y; int width; int height; bool focused; public: MenuElement(void); MenuElement(int nx, int ny, int nw, int nh); virtual ~MenuElement(void); virtual int getX(); virtual int getY(); virtual void setX(int x); virtual void setY(int y); virtual int getWidth(); virtual int getHeight(); virtual void setWidth(int width); virtual void setHeight(int heigt); virtual void render(AbstractConsole* pConsole) = 0; virtual void onKeyDown(int keycode) = 0; virtual bool isFocused(); virtual void setFocused(bool foc); virtual bool isFocusable() = 0; };
Mikescher/Serpilicum
src/LevelObstacle.h
<gh_stars>0 #pragma once #include "AbstractConsole.h" class Level; class LevelObstacle { protected: int x; int y; public: LevelObstacle(int px, int py); virtual int getX(); virtual int getY(); virtual void init(AbstractConsole* pConsole) = 0; virtual void run(AbstractConsole* pConsole) = 0; virtual void render(AbstractConsole* pConsole) = 0; virtual bool onSnakeHit(Level* level) = 0; };
Mikescher/Serpilicum
src/Main.h
#pragma once #include <iostream> #include "Gamerules.h" #include "OGLConsole.h" #include "WindowsConsole.h" #include "CrazyConsole.h" #include "AbstractConsole.h" #include "Game.h" #include <windows.h> #include "Keycodes.h" #include <time.h> class Main : public ActionListener, public KeyEventListener { private: AbstractConsole *dbc; Game *game; public: virtual void start(); virtual void actionPerformed(int id, int param); virtual void keyEventPerformed(int key); };
Mikescher/Serpilicum
src/ZoomPowerUp.h
<filename>src/ZoomPowerUp.h #pragma once #include "powerup.h" #include "AbstractConsole.h" class ZoomPowerUp : public PowerUp { private: long ctime; AbstractConsole* console; public: ZoomPowerUp(AbstractConsole* pCons, int px, int py); ~ZoomPowerUp(void); virtual char getSymbol(); virtual PowerUpType getType(); };
Mikescher/Serpilicum
src/MenuDisplay.h
<filename>src/MenuDisplay.h #pragma once #include "Menu.h" #include "AbstractConsole.h" class MenuDisplay { private: Menu *menu; public: MenuDisplay(void); virtual ~MenuDisplay(void); virtual Menu* getMenu(); virtual Menu* setMenu(Menu* pMenu); virtual void render(AbstractConsole* pConsole); virtual bool isMenuset(); virtual void removeMenu(); virtual void onKeyDown (AbstractConsole *pConsole, int keycode); };
strah19/VirtualMachine
src/vm.c
/** * @file vm.c * @author strah19 * @date June 16 2021 * @version 1.0 * * @section LICENSE * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * @section DESCRIPTION * * This file contains code for running our Pine bytecode from a file. */ #include "../include/vm.h" #include <stdlib.h> #include <string.h> #include <stdio.h> #include <ctype.h> #include <time.h> #define DUMP_BYTECODE struct OpcodeInfo { const char* name; uint32_t num_args; }; struct OpcodeInfo opcode_debug_info[256]; struct OutputInfo { struct Object o; int loc; }; #define MAX_OUTPUT 1000 struct OutputInfo output[MAX_OUTPUT]; int output_index = 0; struct OpcodeInfo create_opcode_info(const char* name, uint32_t num_args) { struct OpcodeInfo info; info.name = name; info.num_args = num_args; return info; } void fatal_runtime_error(const char* error_msg) { fprintf(stderr, "\nRuntime Error: %s.\n", error_msg); exit(EXIT_FAILURE); } struct VMStack vm_create_stack(int size) { struct VMStack stack; stack.top = 0; stack.size = size; stack.stack = (struct Object*)malloc(sizeof(struct Object) * size); return stack; } struct VM create_vm(uint32_t data_size, uint32_t main) { struct VM vm; vm.stack = vm_create_stack(1028); vm.ip = main; vm.data = malloc(sizeof(struct Object) * data_size); memset(vm.data, 0, sizeof(struct Object) * data_size); vm.data_size = data_size; vm.fp = 0; return vm; } struct Object obj_push(int32_t val) { struct Object o; o.i32 = val; return o; } int vm_push_stack(struct VMStack* stack, struct Object object) { stack->stack[stack->top++] = object; return stack->top; } struct Object vm_pop_stack(struct VMStack* stack) { if (stack->top > 0) return stack->stack[--(stack->top)]; else fatal_runtime_error("Cannot pop stack that is already empty"); } struct Object vm_peek_stack(struct VMStack* stack) { return stack->stack[stack->top]; } typedef void (*instruction)(struct VM* vm); void op_nop(struct VM* vm) { vm->ip++; } void op_charconst(struct VM* vm) { struct Object o; o.type = CHARCONST; o.u8 = (char) vm->opcodes[vm->ip + 1]; vm_push_stack(&vm->stack, o); vm->ip += 2; } void op_iconst(struct VM* vm) { struct Object o; o.type = ICONST; o.i32 = vm->opcodes[vm->ip + 1]; vm_push_stack(&vm->stack, o); vm->ip += 2; } void operate_on_operands(struct VM* vm, char operator) { struct Object o2 = vm_pop_stack(&vm->stack); struct Object o1 = vm_pop_stack(&vm->stack); struct Object result; result.type = o2.type; switch (operator) { case '+': result.i32 = o1.i32 + o2.i32; break; case '-': result.i32 = o1.i32 - o2.i32; break; case '*': result.i32 = o1.i32 * o2.i32; break; case '/': result.i32 = o1.i32 / o2.i32; break; case '%': result.i32 = o1.i32 % o2.i32; break; case '=': result.i32 = (o1.i32 == o2.i32) ? 1 : 0; break; case '!': result.i32 = (o1.i32 != o2.i32) ? 1 : 0; break; case '<': result.i32 = (o1.i32 < o2.i32) ? 1 : 0; break; case '>': result.i32 = (o1.i32 > o2.i32) ? 1 : 0; break; case 'l': result.i32 = (o1.i32 <= o2.i32) ? 1 : 0; break; case 'g': result.i32 = (o1.i32 >= o2.i32) ? 1 : 0; break; case 'a' : result.i32 = (o1.i32 && o2.i32) ? 1 : 0; break; case 'o' : result.i32 = (o1.i32 || o2.i32) ? 1 : 0; break; default: break; } vm_push_stack(&vm->stack, result); vm->ip++; } void op_iadd(struct VM* vm) { operate_on_operands(vm, '+'); } void op_isub(struct VM* vm) { operate_on_operands(vm, '-'); } void op_imul(struct VM* vm) { operate_on_operands(vm, '*'); } void op_idiv(struct VM* vm) { operate_on_operands(vm, '/'); } void op_imod(struct VM* vm) { operate_on_operands(vm, '%'); } void op_ieq(struct VM* vm) { // '=' is actually perform a compariative equal on the two operands operate_on_operands(vm, '='); } void op_ineq(struct VM* vm) { operate_on_operands(vm, '!'); } void op_ilt(struct VM* vm) { operate_on_operands(vm, '<'); } void op_igt(struct VM* vm) { operate_on_operands(vm, '>'); } void op_ilte(struct VM* vm) { //Use a l because <= is 2 chars but don't want to do a str compare, just a simple switch operate_on_operands(vm, 'l'); } void op_igte(struct VM* vm) { //Use a g because >= is 2 chars but don't want to do a str compare, just a simple switch operate_on_operands(vm, 'g'); } void op_iand(struct VM* vm) { operate_on_operands(vm, 'a'); } void op_ior(struct VM* vm) { operate_on_operands(vm, 'o'); } void print_data(struct Object* o) { switch (o->type) { case ICONST: printf("%d", o->i32); break; case CHARCONST: printf("%c", (char) o->u8); break; } } void op_syswrite(struct VM* vm) { struct Object o = vm_pop_stack(&vm->stack); //print_data(&o); if (output_index == MAX_OUTPUT) output_index = 0; output[output_index].loc = vm->ip; output[output_index++].o = o; vm->ip++; } //g_load will push whatever variable data onto the stack void op_gload(struct VM* vm) { if (vm->data_size <= vm->opcodes[vm->ip + 1]) { printf("Data retrieval of %d out of bounds: cannot get data that does not exist.\n", vm->opcodes[vm->ip + 1]); exit(EXIT_FAILURE); } uint32_t addr = vm->opcodes[vm->ip + 1]; struct Object o = vm->data[addr]; vm_push_stack(&vm->stack, o); vm->ip += 2; } //g_store will pop whats on stack and put in variable void op_gstore(struct VM* vm) { if (vm->data_size <= vm->opcodes[vm->ip + 1]) { printf("\nData retrieval of %d out of bounds: cannot get data that does not exist.\n", vm->opcodes[vm->ip + 1]); exit(EXIT_FAILURE); } struct Object o = vm_pop_stack(&vm->stack); uint32_t addr = vm->opcodes[vm->ip + 1]; vm->data[addr] = o; vm->ip += 2; } void op_load(struct VM* vm) { vm->ip++; int32_t offset = vm->opcodes[vm->ip++]; vm_push_stack(&vm->stack, vm->stack.stack[(vm->fp - 1) + offset]); } void op_store(struct VM* vm) { vm->ip++; int32_t offset = vm->opcodes[vm->ip++]; vm->stack.stack[(vm->fp - 1) + offset] = vm_pop_stack(&vm->stack); } void op_jmp(struct VM* vm) { vm->ip = vm->opcodes[vm->ip + 1]; } void op_jmpt(struct VM* vm) { struct Object o = vm_pop_stack(&vm->stack); if (o.i32) vm->ip = vm->opcodes[vm->ip + 1]; else vm->ip += 2; } void op_jmpn(struct VM* vm) { struct Object o = vm_pop_stack(&vm->stack); if (!o.i32) vm->ip = vm->opcodes[vm->ip + 1]; else vm->ip += 2; } void op_pop(struct VM* vm) { vm_pop_stack(&vm->stack); vm->ip++; } void op_call(struct VM* vm) { struct Object address; struct Object num_args; vm->ip++; address.i32 = vm->opcodes[vm->ip]; vm->ip++; num_args.i32 = vm->opcodes[vm->ip]; vm_push_stack(&vm->stack, num_args); vm_push_stack(&vm->stack, obj_push(vm->fp)); vm_push_stack(&vm->stack, obj_push(vm->ip)); vm->fp = vm->stack.top; vm->ip = address.i32; } void op_ret(struct VM* vm) { struct Object ret = vm_pop_stack(&vm->stack); vm->stack.top = vm->fp; vm->ip = vm_pop_stack(&vm->stack).i32; vm->fp = vm_pop_stack(&vm->stack).i32; int32_t args = vm_pop_stack(&vm->stack).i32; vm->stack.top -= args; vm_push_stack(&vm->stack, ret); vm->ip++; } static instruction ops[256]; static struct VM vm; void init_vm() { for(int i = 0; i < 256; i++) ops[i] = op_nop; ops[CHARCONST] = op_charconst; opcode_debug_info[CHARCONST] = create_opcode_info("CHARCONST", 1); ops[SYS_WRITE] = op_syswrite; opcode_debug_info[SYS_WRITE] = create_opcode_info("SYS_WRITE", 0); ops[ICONST] = op_iconst; opcode_debug_info[ICONST] = create_opcode_info("ICONST", 1); ops[POP] = op_pop; opcode_debug_info[POP] = create_opcode_info("POP", 0); ops[IADD] = op_iadd; opcode_debug_info[IADD] = create_opcode_info("IADD", 0); ops[ISUB] = op_isub; opcode_debug_info[ISUB] = create_opcode_info("ISUB", 0); ops[IMUL] = op_imul; opcode_debug_info[IMUL] = create_opcode_info("IMUL", 0); ops[IDIV] = op_idiv; opcode_debug_info[IDIV] = create_opcode_info("IDIV", 0); ops[IMOD] = op_imod; opcode_debug_info[IMOD] = create_opcode_info("IMOD", 0); ops[IEQ] = op_ieq; opcode_debug_info[IEQ] = create_opcode_info("IEQ", 0); ops[INEQ] = op_ineq; opcode_debug_info[INEQ] = create_opcode_info("INEQ", 0); ops[ILT] = op_ilt; opcode_debug_info[ILT] = create_opcode_info("ILT", 0); ops[IGT] = op_igt; opcode_debug_info[IGT] = create_opcode_info("IGT", 0); ops[IGTE] = op_igte; opcode_debug_info[IGTE] = create_opcode_info("IGTE", 0); ops[ILTE] = op_ilte; opcode_debug_info[ILTE] = create_opcode_info("ILTE", 0); ops[IAND] = op_iand; opcode_debug_info[IAND] = create_opcode_info("IAND", 0); ops[IOR] = op_ior; opcode_debug_info[IOR] = create_opcode_info("IOR", 0); ops[GLOAD] = op_gload; opcode_debug_info[GLOAD] = create_opcode_info("GLOAD", 1); ops[GSTORE] = op_gstore; opcode_debug_info[GSTORE] = create_opcode_info("GSTORE", 1); ops[JMP] = op_jmp; opcode_debug_info[JMP] = create_opcode_info("JMP", 1); ops[JMPT] = op_jmpt; opcode_debug_info[JMPT] = create_opcode_info("JMPT", 1); ops[JMPN] = op_jmpn; opcode_debug_info[JMPN] = create_opcode_info("JMPN", 1); ops[CALL] = op_call; opcode_debug_info[CALL] = create_opcode_info("CALL", 2); ops[RET] = op_ret; opcode_debug_info[RET] = create_opcode_info("RET", 0); ops[LOAD] = op_load; opcode_debug_info[LOAD] = create_opcode_info("LOAD", 1); ops[STORE] = op_store; opcode_debug_info[STORE] = create_opcode_info("STORE", 1); } void color_red() { printf("\033[1;31m"); } void color_green() { printf("\033[0;32m"); } void color_reset() { printf("\033[0m"); } void run_vm(uint32_t data_size, int32_t* opcodes, uint32_t main_ip) { vm = create_vm(data_size, main_ip); vm.opcodes = opcodes; printf("Data Allocated: %d\tMain IP: %d\n", data_size, main_ip); while(vm.opcodes[vm.ip] != HALT) { #ifdef DUMP_BYTECODE color_red(); printf("%04x:\t%s\t", vm.ip, opcode_debug_info[vm.opcodes[vm.ip]].name); color_reset(); uint32_t backtrack = vm.ip; uint32_t beg_opcode_args = opcode_debug_info[vm.opcodes[vm.ip]].num_args; for (int i = 0; i < beg_opcode_args; i++) { vm.ip++; printf("%d\t", vm.opcodes[vm.ip]); } vm.ip = backtrack; #endif ops[vm.opcodes[vm.ip]](&vm); #ifdef DUMP_BYTECODE color_green(); printf("Stack: [ "); for (int i = 0; i < vm.stack.top; i++) printf("%d ", vm.stack.stack[i].i32); printf("]\t"); printf("Data: [ "); for (int i = 0; i < data_size; i++) printf("%d ", vm.data[i].i32); printf("]\n"); color_reset(); #endif } printf("VM Output: \n"); for (int i = 0; i < output_index; i++) { print_data(&output[i].o); printf("\n"); } free(vm.stack.stack); free(vm.data); }
strah19/VirtualMachine
include/opcodes.h
<reponame>strah19/VirtualMachine #ifndef OPCODE_H #define OPCODE_H enum OpCodes { IADD, ISUB, IMUL, IDIV, IMOD, IEQ, INEQ, ILT, IGT, ILTE, IGTE, IAND, IOR, ICONST, POP, SYS_WRITE, STORE, GSTORE, LOAD, GLOAD, CHARCONST, HALT, JMP, JMPT, JMPN, CALL, RET }; #endif //!OPCODE_H
strah19/VirtualMachine
include/vm.h
<filename>include/vm.h #ifndef VM_H #define VM_H #include <stdint.h> #include "../include/opcodes.h" enum ObjTypes { F_32BIT, I_32BIT, D_64BIT, V_PTR, I_8BIT, U_32BIT, U_8BIT }; struct Object { uint8_t type; //The object data type union { uint32_t u32; int32_t i32; uint8_t i8; uint8_t u8; float f32; double f64; void* ptr; }; }; struct VMStack { int top; int size; struct Object* stack; }; struct VM { struct VMStack stack; struct Object* data; int32_t* opcodes; uint32_t ip; int32_t fp; uint32_t data_size; }; extern struct VMStack vm_create_stack(int size); extern int vm_push_stack(struct VMStack* stack, struct Object object); extern struct Object vm_pop_stack(struct VMStack* stack); extern struct Object vm_peek_stack(struct VMStack* stack); extern void init_vm(); extern void run_vm(uint32_t data_size, int32_t* opcodes, uint32_t main_ip); #endif // !VM_H
strah19/VirtualMachine
src/main.c
#include "../include/vm.h" static uint32_t program[] = { ICONST, 3, ICONST, 12, IADD, SYS_WRITE, HALT }; int main() { init_vm(); run_vm(0, program, 0); return 0; }
wlsy/HttpDNS-iOS
Example/Pods/Headers/Private/httpdns-ios/HttpDNS.h
<gh_stars>0 // // HttpDNS.h // Pods // // Created by wlsy on 16/1/22. // // #import <Foundation/Foundation.h> @interface HttpDNS : NSObject typedef void (^httpDNSNext)(NSError *error, NSString *ip); + (HttpDNS *)shareInstance; -(void)getIpByHost:(NSString *)host next:(httpDNSNext)next; @end
wlsy/HttpDNS-iOS
Example/httpdns-ios/ZZViewController.h
// // ZZViewController.h // httpdns-ios // // Created by zz on 01/22/2016. // Copyright (c) 2016 zz. All rights reserved. // @import UIKit; @interface ZZViewController : UIViewController @end
wlsy/HttpDNS-iOS
Example/Pods/Target Support Files/httpdns-ios/httpdns-ios-umbrella.h
<reponame>wlsy/HttpDNS-iOS #import <UIKit/UIKit.h> #import "HostModel.h" #import "HttpDNS.h" FOUNDATION_EXPORT double httpdns_iosVersionNumber; FOUNDATION_EXPORT const unsigned char httpdns_iosVersionString[];
wlsy/HttpDNS-iOS
Example/Pods/Target Support Files/Pods-httpdns-ios_Tests/Pods-httpdns-ios_Tests-umbrella.h
<gh_stars>0 #import <UIKit/UIKit.h> FOUNDATION_EXPORT double Pods_httpdns_ios_TestsVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_httpdns_ios_TestsVersionString[];
wlsy/HttpDNS-iOS
Pod/Classes/HostModel.h
// // HostModel.h // Pods // // Created by wlsy on 16/1/22. // // #import <Foundation/Foundation.h> @interface HostModel : NSObject @property (strong, nonatomic) NSString *host; @property (strong, nonatomic) NSString *ip; @property (assign) BOOL isExpired; @end
wlsy/HttpDNS-iOS
Example/Pods/Target Support Files/Pods-httpdns-ios_Example/Pods-httpdns-ios_Example-umbrella.h
#import <UIKit/UIKit.h> FOUNDATION_EXPORT double Pods_httpdns_ios_ExampleVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_httpdns_ios_ExampleVersionString[];
E-PSN/particle-library-SensorBase
firmware/SensorBase.h
/* Sensor Base Class Refactored into C++ class: <NAME> Contribution: epierre Based on <NAME> http://davidegironi.blogspot.fr/2014/01/cheap-co2-meter-using-mq135-sensor-with.html License: Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) */ #ifndef Included_SensorBase_H #define Included_SensorBase_H #include <cmath> class SensorBase { public: SensorBase(int sampling_frequency, int sampling_interval_ms, int rl_value) { _sampling_frequency = sampling_frequency; _sampling_interval_ms = sampling_interval_ms; _rl_value = rl_value; _is_sampling_complete = true; } void startSampling(unsigned long start_time_ms); bool isSamplingComplete(); bool isTimeToRead(unsigned long current_time_ms); void setAnalogRead(int raw_adc, unsigned long current_time_ms); void startCalibrating(); protected: bool _is_sampling_complete; int _sampling_interval_ms; int _sampling_frequency; int _sampling_count; int _rl_value; float _sample_sum; float _sampling_average; unsigned long _start_time_ms; int calibration_count; float calibration_total; SensorBase() {}; int getPercentage(float ro, float *pcurve); float calibrateInCleanAir(int raw_adc, int ppm, float *pcurve); float getResistanceCalculation(int raw_adc); }; #endif //Included_SensorBase_H
bakhtiary/arduino-snappy-proto
src/pb.h
#include "proto/pb.h" #include "proto/pb_encode.h"
bakhtiary/arduino-snappy-proto
src/snappy/compat.h
<reponame>bakhtiary/arduino-snappy-proto<gh_stars>0 #ifdef __FreeBSD__ # include <sys/endian.h> #elif defined(__APPLE_CC_) || defined(__MACH__) /* MacOS/X support */ # include <machine/endian.h> #if __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN # define htole16(x) (x) # define le32toh(x) (x) #elif __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN # define htole16(x) __DARWIN_OSSwapInt16(x) # define le32toh(x) __DARWIN_OSSwapInt32(x) #else # error "Endianness is undefined" #endif // E.Welch // #elif !defined(__WIN32__) // # include <endian.h> #endif #include <stdlib.h> #include <assert.h> #include <string.h> #include <errno.h> #include <stdbool.h> #include <limits.h> // #ifndef __WIN32__ // #include <sys/uio.h> // #endif #ifdef __ANDROID__ #define le32toh letoh32 #endif #if defined(__WIN32__) && defined(SG) struct iovec { void *iov_base; /* Pointer to data. */ size_t iov_len; /* Length of data. */ }; #endif #define get_unaligned_memcpy(x) ({ \ typeof(*(x)) _ret; \ memcpy(&_ret, (x), sizeof(*(x))); \ _ret; }) #define put_unaligned_memcpy(v,x) ({ \ typeof((v)) _v = (v); \ memcpy((x), &_v, sizeof(*(x))); }) #define get_unaligned get_unaligned_memcpy #define put_unaligned put_unaligned_memcpy #define get_unaligned64 get_unaligned_memcpy #define put_unaligned64 put_unaligned_memcpy #define get_unaligned_le32(x) (le32toh(get_unaligned((u32 *)(x)))) #define put_unaligned_le16(v,x) (put_unaligned(htole16(v), (u16 *)(x))) typedef unsigned char u8; typedef unsigned short u16; typedef unsigned u32; typedef unsigned long long u64; #define BUG_ON(x) assert(!(x)) #define vmalloc(x) malloc(x) #define vfree(x) free(x) #define EXPORT_SYMBOL(x) #define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x))) #define likely(x) __builtin_expect((x), 1) #define unlikely(x) __builtin_expect((x), 0) #define min_t(t,x,y) ((x) < (y) ? (x) : (y)) #define max_t(t,x,y) ((x) > (y) ? (x) : (y)) #if __BYTE_ORDER == __LITTLE_ENDIAN #define __LITTLE_ENDIAN__ 1 #endif // E.Welch // #if __LITTLE_ENDIAN__ == 1 && (defined(__LSB_VERSION__) || defined(__WIN32__)) #define htole16(x) (x) #define le32toh(x) (x) // #endif #define BITS_PER_LONG (__SIZEOF_LONG__ * 8)
bakhtiary/arduino-snappy-proto
src/SnappyProto.h
<gh_stars>0 #ifndef snappyproto_h #define snappyproto_h #include "snappy.h" #include "pb.h" #endif
bakhtiary/arduino-snappy-proto
src/snappy.h
#include "snappy/snappy.h"
ZauJulio/LeaOperationalSystems
sync_problems/examples/binary_semaphore.c
#include <stdio.h> #include <stdlib.h> #include <sys/ipc.h> #include <sys/sem.h> #include <sys/types.h> #include <unistd.h> #include "../src/dijkstra.h" key_t KEY = 123; int main() { int sem = sem_create(KEY, 1); printf("A semaphore was created with the identifier %d\n", sem); if (fork() == 0) { printf("\x1B[32m\t> Child process uses the resource. \n\x1B[0m"); P(sem); sleep(4); printf("\x1B[31m\t> Child process releases the resource. \n\x1B[0m"); V(sem); sleep(1); } else { sleep(1); printf("\x1B[32mParent process blocks when trying to access the feature. \n\x1B[0m"); P(sem); printf("\x1B[31mAvailable to the parent process. \n\x1B[0m"); sem_delete(sem); } exit(0); }
ZauJulio/LeaOperationalSystems
sync_problems/examples/buffer.c
<reponame>ZauJulio/LeaOperationalSystems<filename>sync_problems/examples/buffer.c #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <sys/ipc.h> #include <sys/sem.h> #include <sys/types.h> #include <time.h> #include <unistd.h> #include "../src/dijkstra.h" static int PRODUCERS_NUM = 5; static int BUFFER_SIZE = 5; // General struct struct arg_struct { int mutex; int full; int empty; int *buffer; int in; int out; } * args; // Producer struct struct prod_struct { int id; struct arg_struct *arg; } * producers; void print_buffer(int *buffer) { printf("\n\t\x1B[32m== BUFFER ==\n\x1B[0m"); for (int i = 0; i < BUFFER_SIZE; i++) printf("| %d ", buffer[i]); printf("|\n\n"); } void *Producer(void *args) { struct prod_struct *producer_args = args; struct arg_struct *_args = producer_args->arg; int id = producer_args->id; int produto; usleep(rand() % 1000000); P(_args->empty); // Wait to empty consumers P(_args->mutex); // Lock the mutex printf("\x1B[33m> Producer %d has come into action!\n\x1B[0m", id); produto = rand() % 100; if (_args->buffer[_args->in] != -1) { printf("\t\x1B[33m==== PRODUCER ALERT %d ====\n\x1B[0m", id); printf("\t> Position %d was occupied with the value %d\n\n", _args->in, _args->buffer[_args->in]); } printf("\t\x1B[33m> Producer %d will record value %d in POS %d\n\x1B[0m", id, produto, _args->in); _args->buffer[_args->in] = produto; // Increase Buffer Position _args->in = (_args->in + 1) % BUFFER_SIZE; V(_args->mutex); // Unlock the mutex V(_args->full); // Notify consumers that the buffer is not empty return NULL; } void *Consumer(void *args) { struct arg_struct *_args = args; usleep(rand() % 1000000); int i = 0; while (i != PRODUCERS_NUM) { P(_args->full); // Wait producer P(_args->mutex); // Lock mutex printf("- Consumer came into action!\n"); print_buffer(_args->buffer); if (_args->buffer[_args->out] == -1) { printf("\t\x1B[31m==== CONSUMER ALERT ====\n\x1B[0m"); printf("\t> Position %d was empty\n\n", _args->in); } printf("\t- Consumed the value: %d\n", _args->buffer[_args->out]); // Cleaning _args->buffer[_args->out] = -1; _args->out = (_args->out + 1) % BUFFER_SIZE; V(_args->mutex); // Unlock mutex V(_args->empty); // Notify producer i++; } return NULL; } int main() { key_t key0 = 0, key1 = 1, key2 = 2; int mutex = sem_create(key0, 1); int full = sem_create(key1, 0); int empty = sem_create(key2, 5); int i, in = 0, out = 0; int *buffer; buffer = malloc(BUFFER_SIZE * sizeof(int)); for (i = 0; i < BUFFER_SIZE; i++) buffer[i] = -1; args = malloc(sizeof(struct arg_struct) * 1); producers = malloc(sizeof(struct prod_struct) * PRODUCERS_NUM); args->mutex = mutex; args->full = full; args->empty = empty; args->buffer = buffer; args->in = in; args->out = out; pthread_t pID[PRODUCERS_NUM]; pthread_t cID; srand(time(NULL)); // Creates threads for (i = 0; i < PRODUCERS_NUM; i++) { producers[i].id = i; producers[i].arg = args; pthread_create(&pID[i], NULL, Producer, &producers[i]); } pthread_create(&cID, NULL, Consumer, args); // Waits for threads to finish for (i = 0; i < PRODUCERS_NUM; i++) pthread_join(pID[i], NULL); pthread_join(cID, NULL); // Delete sem's sem_delete(mutex); sem_delete(full); sem_delete(empty); free(buffer); free(args); free(producers); exit(0); }
ZauJulio/LeaOperationalSystems
sync_problems/examples/rw.c
<filename>sync_problems/examples/rw.c #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <sys/ipc.h> #include <sys/sem.h> #include <sys/types.h> #include <time.h> #include <unistd.h> #include "../src/dijkstra.h" static int MAX_THREADS = 5; struct arg_struct { int mutex; int wrt; int shared; int read_count; } * args; void *writer(void *args) { struct arg_struct *_args = args; P(_args->wrt); _args->shared = rand() % 100; printf("> Writer: shared = %d\n", _args->shared); V(_args->wrt); return NULL; } void *reader(void *args) { struct arg_struct *_args = args; P(_args->mutex); _args->read_count++; if (_args->read_count == 1) P(_args->wrt); printf("\t- Reader: shared = %d\n", _args->shared); _args->read_count--; if (_args->read_count == 0) V(_args->wrt); V(_args->mutex); return NULL; } int main() { key_t key0 = 0, key1 = 1; int mutex = sem_create(key0, 1); int wrt = sem_create(key1, 1); int read_count = 0; int shared = 0; int i; args = malloc(sizeof(struct arg_struct) * 1); args->mutex = mutex; args->wrt = wrt; args->shared = shared; args->read_count = read_count; pthread_t rID[MAX_THREADS]; pthread_t wID[MAX_THREADS]; // Creates threads for (i = 0; i < MAX_THREADS; i++) { pthread_create(&rID[i], NULL, reader, args); pthread_create(&wID[i], NULL, writer, args); } // Joins threads for (i = 0; i < MAX_THREADS; i++) { pthread_join(rID[i], NULL); pthread_join(wID[i], NULL); } // Delete sem's sem_delete(mutex); sem_delete(wrt); free(args); exit(0); }
ZauJulio/LeaOperationalSystems
sync_problems/src/dijkstra.h
int sem_create(key_t key, int initval) { int semid; union semun { int val; struct semid_ds *buf; ushort array[1]; } arg_ctl; semid = semget(ftok("/etc/issue", key), 1, IPC_CREAT | IPC_EXCL | 0666); if (semid == -1) { semid = semget(ftok("/etc/issue", key), 1, 0666); if (semid == -1) { perror("Erro semget()"); exit(1); } } arg_ctl.val = initval; if (semctl(semid, 0, SETVAL, arg_ctl) == -1) { perror("Erro semctl()\n"); exit(1); } return (semid); } void P(int semid) { struct sembuf sempar[1]; sempar[0].sem_num = 0; sempar[0].sem_op = -1; sempar[0].sem_flg = SEM_UNDO; if (semop(semid, sempar, 1) == -1) printf("Erro P()\n"); } void V(int semid) { struct sembuf sempar[1]; sempar[0].sem_num = 0; sempar[0].sem_op = 1; sempar[0].sem_flg = SEM_UNDO; if (semop(semid, sempar, 1) == -1) printf("Erro V()\n"); } void sem_delete(int semid) { if (semctl(semid, 0, IPC_RMID, 0) == -1) printf("Erro IPC_RMID\n"); }
ZauJulio/LeaOperationalSystems
sync_problems/examples/philosophers.c
<reponame>ZauJulio/LeaOperationalSystems<filename>sync_problems/examples/philosophers.c #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <sys/ipc.h> #include <sys/sem.h> #include <sys/types.h> #include <time.h> #include <unistd.h> #include "../src/dijkstra.h" static int PHILO_NUM = 5; // General struct struct arg_struct { int *mutex_chopstick; int *chopstick_use; } * args; // Philosopher struct struct philo_struct { int id; struct arg_struct *args; } * philosophers; void *Philosopher(void *philo_args) { struct philo_struct *philosopher_args = philo_args; struct arg_struct *_args = philosopher_args->args; int id = philosopher_args->id; int c1, c2; usleep(rand() % 1000000); if (id % 2 == 0) { c1 = id; // left c2 = (id + 1) % PHILO_NUM; // right } else { c1 = (id + 1) % PHILO_NUM; // right c2 = id; // left } // Wait for chopsticks P(_args->mutex_chopstick[c1]); P(_args->mutex_chopstick[c2]); if (_args->chopstick_use[c1] != -1) printf("\x1B[33mALERT: chopstick %d being used by %d\n\x1B[0m", c1, _args->chopstick_use[c1]); if (_args->chopstick_use[c2] != -1) printf("\x1B[33mALERT: chopstick %d being used by %d\n\x1B[0m", c2, _args->chopstick_use[c2]); _args->chopstick_use[c1] = id; _args->chopstick_use[c2] = id; printf("\x1B[32m+ Filosofo %d pegou o chopstick [%d] e [%d]\x1B[0m\n", id, c1, c2); printf("\t> Filosofo %d comendo\n", id); usleep(rand() % 1000000); _args->chopstick_use[c1] = -1; _args->chopstick_use[c2] = -1; printf("\x1B[31m- Filosofo %d liberou o chopstick [%d] e [%d]\x1B[0m\n", id, c1, c2); // Signal chopsticks V(_args->mutex_chopstick[c1]); V(_args->mutex_chopstick[c2]); return NULL; } int main() { pthread_t pID[PHILO_NUM]; int *chopstick_use = malloc(sizeof(int) * PHILO_NUM); int *mutex_chopstick = malloc(sizeof(int) * PHILO_NUM); int i; args = malloc(sizeof(struct arg_struct) * 1); philosophers = malloc(sizeof(struct philo_struct) * PHILO_NUM); // Initialize chopsticks and sem's for (i = 0; i < PHILO_NUM; i++) { chopstick_use[i] = -1; mutex_chopstick[i] = sem_create(i, 1); } args->mutex_chopstick = mutex_chopstick; args->chopstick_use = chopstick_use; srand(time(NULL)); // Creates threads for (i = 0; i < PHILO_NUM; i++) { philosophers[i].id = i; philosophers[i].args = args; pthread_create(&pID[i], NULL, Philosopher, &philosophers[i]); } // Waits for threads to finish for (i = 0; i < PHILO_NUM; i++) pthread_join(pID[i], NULL); // Delete sem's for (i = 0; i < PHILO_NUM; i++) sem_delete(mutex_chopstick[i]); free(chopstick_use); free(mutex_chopstick); free(philosophers); free(args); exit(0); }
davyjoneswang/FFMpegPlayer
app/src/main/jni/log.h
// // Created by Jonesx on 2015/10/23. // #ifndef _LOG_H #define _LOG_H #define LOGN (void) 0 #ifndef WIN32 #include <android/log.h> #define LOG_VERBOSE 1 #define LOG_DEBUG 2 #define LOG_INFO 3 #define LOG_WARNING 4 #define LOG_ERROR 5 #define LOG_FATAL 6 #define LOG_SILENT 7 #ifndef LOG_TAG #define LOG_TAG __FILE__ #endif #ifndef LOG_LEVEL #define LOG_LEVEL LOG_VERBOSE #endif #define LOGP(level, fmt, ...) \ __android_log_print(level, LOG_TAG, "%s:" fmt, \ __PRETTY_FUNCTION__, ##__VA_ARGS__) #if LOG_VERBOSE >= LOG_LEVEL #define LOGV(fmt, ...) \ LOGP(ANDROID_LOG_VERBOSE, fmt, ##__VA_ARGS__) #else #define LOGV(...) LOGN #endif #if LOG_DEBUG >= LOG_LEVEL #define LOGD(fmt, ...) \ LOGP(ANDROID_LOG_DEBUG, fmt, ##__VA_ARGS__) #else #define LOGD(...) LOGN #endif #if LOG_INFO >= LOG_LEVEL #define LOGI(fmt, ...) \ LOGP(ANDROID_LOG_INFO, fmt, ##__VA_ARGS__) #else #define LOGI(...) LOGN #endif #if LOG_WARNING >= LOG_LEVEL #define LOGW(fmt, ...) \ LOGP(ANDROID_LOG_WARN, fmt, ##__VA_ARGS__) #else #define LOGW(...) LOGN #endif #if LOG_ERROR >= LOG_LEVEL #define LOGE(fmt, ...) \ LOGP(ANDROID_LOG_ERROR, fmt, ##__VA_ARGS__) #else #define LOGE(...) LOGN #endif #if LOG_FATAL >= LOG_LEVEL #define LOGF(fmt, ...) \ LOGP(ANDROID_LOG_FATAL, fmt, ##__VA_ARGS__) #else #define LOGF(...) LOGN #endif #if LOG_FATAL >= LOG_LEVEL #define LOGA(condition, fmt, ...) \ if (!(condition)) \ { \ __android_log_assert(condition, LOG_TAG, "(%s:%u) %s: error:%s " fmt, \ __FILE__, __LINE__, __PRETTY_FUNCTION__, condition, ##__VA_ARGS__); \ } #else #define LOGA(...) LOGN #endif #else #include <stdio.h> #define LOGP(fmt, ...) printf("%s line:%d " fmt, __FILE__, __LINE__, ##__VA_ARGS__) #define LOGV(fmt, ...) LOGP(fmt, ##__VA_ARGS__) #define LOGD(fmt, ...) LOGP(fmt, ##__VA_ARGS__) #define LOGI(fmt, ...) LOGP(fmt, ##__VA_ARGS__) #define LOGW(fmt, ...) LOGP(fmt, ##__VA_ARGS__) #define LOGE(fmt, ...) LOGP(fmt, ##__VA_ARGS__) #define LOGF(fmt, ...) LOGP(fmt, ##__VA_ARGS__) #define LOGA(...) LOGN #endif // ANDROID_PROJECT #endif // _LOG_H
zhuang-group/Mesa
mesa/cpp_extension/ext_common.h
<filename>mesa/cpp_extension/ext_common.h // Helper for type check #define CHECK_CUDA_TENSOR_DIM_TYPE(name, n_dim, type) \ TORCH_CHECK(name.device().is_cuda(), #name " must be a CUDA tensor!"); \ TORCH_CHECK(name.is_contiguous(), #name " must be contiguous!"); \ TORCH_CHECK(name.dim() == n_dim, "The dimension of " #name " is not correct!"); \ TORCH_CHECK(name.dtype() == type, "The type of " #name " is not correct!"); // Helper for type check #define CHECK_CUDA_TENSOR_TYPE(name, type) \ TORCH_CHECK(name.device().is_cuda(), #name " must be a CUDA tensor!"); \ TORCH_CHECK(name.is_contiguous(), #name " must be contiguous!"); \ TORCH_CHECK(name.dtype() == type, "The type of " #name " is not correct!"); // Helper for type check #define CHECK_CUDA_TENSOR_FLOAT(name) \ TORCH_CHECK(name.device().is_cuda(), #name " must be a CUDA tensor!"); \ TORCH_CHECK(name.is_contiguous(), #name " must be contiguous!"); \ TORCH_CHECK(name.dtype() == torch::kFloat32 || name.dtype() == torch::kFloat16, \ "The type of " #name " is not correct!"); // Helper for type check #define CHECK_CUDA_TENSOR_DIM_FLOAT(name, n_dim) \ TORCH_CHECK(name.device().is_cuda(), #name " must be a CUDA tensor!"); \ TORCH_CHECK(name.is_contiguous(), #name " must be contiguous!"); \ TORCH_CHECK(name.dim() == n_dim, "The dimension of " #name " is not correct!"); \ TORCH_CHECK(name.dtype() == torch::kFloat32 || name.dtype() == torch::kFloat16, \ "The type of " #name " is not correct!");
reedloden/moloch
capture/detect.c
/* detect.c -- Functions for dealing with detection * * Copyright 2012-2013 AOL Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this Software except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <stdio.h> #include <stdlib.h> #include <sys/socket.h> #include <arpa/inet.h> #include <netinet/in.h> #include <netinet/in_systm.h> #include <netinet/ip.h> #include <netinet/tcp.h> #include <netinet/udp.h> #include <netinet/ip_icmp.h> #include <string.h> #include <errno.h> #include <ctype.h> #include <fcntl.h> #include <unistd.h> #include "glib.h" #include "nids.h" #include "pcap.h" #include "magic.h" #include "moloch.h" #include "bsb.h" //#define HTTPDEBUG //#define EMAILDEBUG /******************************************************************************/ extern MolochConfig_t config; extern gchar **extraTags; static gchar nodeTag[100]; static gchar classTag[100]; extern uint32_t pluginsCbs; static http_parser_settings parserSettings; static magic_t cookie; static char *qclasses[256]; static char *qtypes[256]; extern MolochStringHashStd_t httpReqHeaders; extern MolochStringHashStd_t httpResHeaders; extern MolochStringHashStd_t emailHeaders; /******************************************************************************/ void moloch_detect_initial_tag(MolochSession_t *session) { int i; moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, nodeTag); if (config.nodeClass) moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, classTag); if (extraTags) { for (i = 0; extraTags[i]; i++) { moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, extraTags[i]); } } switch(session->protocol) { case IPPROTO_TCP: moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "tcp"); break; case IPPROTO_UDP: moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "udp"); break; case IPPROTO_ICMP: moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "ICMP"); break; } } /*############################## ASN ##############################*/ /******************************************************************************/ unsigned char * moloch_detect_asn_get_tlv(BSB *bsb, int *apc, int *atag, int *alen) { if (BSB_REMAINING(*bsb) < 2) goto get_tlv_error; u_char ch = 0; BSB_IMPORT_u08(*bsb, ch); *apc = (ch >> 5) & 0x1; if ((ch & 0x1f) == 0x1f) { while (BSB_REMAINING(*bsb)) { BSB_IMPORT_u08(*bsb, ch); (*atag) = ((*atag) << 7) | ch; if ((ch & 0x80) == 0) break; } } else { *atag = ch & 0x1f; BSB_IMPORT_u08(*bsb, ch); } if (BSB_IS_ERROR(*bsb) || ch == 0x80) { goto get_tlv_error; } if (ch & 0x80) { int cnt = ch & 0x7f; (*alen) = 0; while (cnt > 0 && BSB_REMAINING(*bsb)) { BSB_IMPORT_u08(*bsb, ch); (*alen) = ((*alen) << 8) | ch; cnt--; } } else { (*alen) = ch; } if (*alen < 0) goto get_tlv_error; if (*alen > BSB_REMAINING(*bsb)) *alen = BSB_REMAINING(*bsb); unsigned char *value; BSB_IMPORT_ptr(*bsb, value, *alen); if (BSB_IS_ERROR(*bsb)) { goto get_tlv_error; } return value; get_tlv_error: (*apc) = 0; (*alen) = 0; (*atag) = 0; return 0; } /******************************************************************************/ char *moloch_detect_asn_decode_oid(unsigned char *oid, int len) { static char buf[1000]; uint32_t buflen = 0; int pos = 0; int first = TRUE; int value = 0; for (pos = 0; pos < len; pos++) { value = (value << 7) | (oid[pos] & 0x7f); if (oid[pos] & 0x80) { continue; } if (first) { first = FALSE; if (value > 40) /* two values in first byte */ buflen = snprintf(buf, sizeof(buf), "%d.%d", value/40, value % 40); else /* one value in first byte */ buflen = snprintf(buf, sizeof(buf), "%d", value); } else if (buflen < sizeof(buf)) { buflen += snprintf(buf+buflen, sizeof(buf)-buflen, ".%d", value); } value = 0; } return buf; } /*############################## TLS ##############################*/ /******************************************************************************/ void moloch_detect_tls_certinfo_process(MolochCertInfo_t *ci, BSB *bsb) { int apc, atag, alen; char *lastOid = NULL; while (BSB_REMAINING(*bsb)) { unsigned char *value = moloch_detect_asn_get_tlv(bsb, &apc, &atag, &alen); if (!value) return; if (apc) { BSB tbsb; BSB_INIT(tbsb, value, alen); moloch_detect_tls_certinfo_process(ci, &tbsb); } else if (atag == 6) { lastOid = moloch_detect_asn_decode_oid(value, alen); } else if (lastOid && (atag == 20 || atag == 19 || atag == 12)) { /* 20 == BER_UNI_TAG_TeletexString * 19 == BER_UNI_TAG_PrintableString * 12 == BER_UNI_TAG_UTF8String */ if (strcmp(lastOid, "2.5.4.3") == 0) { MolochString_t *element = MOLOCH_TYPE_ALLOC(MolochString_t); element->utf8 = atag == 12; if (element->utf8) element->str = g_utf8_strdown((char*)value, alen); else element->str = g_ascii_strdown((char*)value, alen); DLL_PUSH_TAIL(s_, &ci->commonName, element); } else if (strcmp(lastOid, "2.5.4.10") == 0) { if (ci->orgName) { LOG("Multiple orgName %s => %.*s", ci->orgName, alen, value); free(ci->orgName); } ci->orgUtf8 = atag == 12; ci->orgName = g_strndup((char*)value, alen); } } } } /******************************************************************************/ void moloch_detect_tls_alt_names(MolochCertsInfo_t *certs, BSB *bsb) { int apc, atag, alen; static char *lastOid = NULL; while (BSB_REMAINING(*bsb) >= 2) { unsigned char *value = moloch_detect_asn_get_tlv(bsb, &apc, &atag, &alen); if (!value) return; if (apc) { BSB tbsb; BSB_INIT(tbsb, value, alen); moloch_detect_tls_alt_names(certs, &tbsb); if (certs->alt.s_count > 0) { return; } } else if (atag == 6) { lastOid = moloch_detect_asn_decode_oid(value, alen); if (strcmp(lastOid, "2.5.29.17") != 0) lastOid = NULL; } else if (lastOid && atag == 4) { BSB tbsb; BSB_INIT(tbsb, value, alen); moloch_detect_tls_alt_names(certs, &tbsb); return; } else if (lastOid && atag == 2) { MolochString_t *element = MOLOCH_TYPE_ALLOC0(MolochString_t); element->str = g_ascii_strdown((char*)value, alen); DLL_PUSH_TAIL(s_, &certs->alt, element); } } return; } /******************************************************************************/ void moloch_detect_tls_process(MolochSession_t *session, unsigned char *data, int len) { BSB sslbsb; BSB_INIT(sslbsb, data, len); while (BSB_REMAINING(sslbsb) > 5) { unsigned char *ssldata = BSB_WORK_PTR(sslbsb); int ssllen = MIN(BSB_REMAINING(sslbsb) - 5, ssldata[3] << 8 | ssldata[4]); BSB pbsb; BSB_INIT(pbsb, ssldata+5, ssllen); while (BSB_REMAINING(pbsb) > 7) { unsigned char *pdata = BSB_WORK_PTR(pbsb); int plen = MIN(BSB_REMAINING(pbsb) - 4, pdata[2] << 8 | pdata[3]); if (pdata[0] != 0x0b) { BSB_IMPORT_skip(pbsb, plen + 4); continue; } BSB cbsb; BSB_INIT(cbsb, pdata+7, plen-3); // The - 4 for plen is done above, confusing while(BSB_REMAINING(cbsb) > 3) { int badreason = 0; unsigned char *cdata = BSB_WORK_PTR(cbsb); int clen = MIN(BSB_REMAINING(cbsb) - 3, (cdata[0] << 16 | cdata[1] << 8 | cdata[2])); MolochCertsInfo_t *certs = MOLOCH_TYPE_ALLOC0(MolochCertsInfo_t); DLL_INIT(s_, &certs->alt); DLL_INIT(s_, &certs->subject.commonName); DLL_INIT(s_, &certs->issuer.commonName); int atag, alen, apc; unsigned char *value; BSB bsb; BSB_INIT(bsb, cdata + 3, clen); /* Certificate */ if (!(value = moloch_detect_asn_get_tlv(&bsb, &apc, &atag, &alen))) {badreason = 1; goto bad_cert;} BSB_INIT(bsb, value, alen); /* signedCertificate */ if (!(value = moloch_detect_asn_get_tlv(&bsb, &apc, &atag, &alen))) {badreason = 2; goto bad_cert;} BSB_INIT(bsb, value, alen); /* serialNumber or version*/ if (!(value = moloch_detect_asn_get_tlv(&bsb, &apc, &atag, &alen))) {badreason = 3; goto bad_cert;} if (apc) { if (!(value = moloch_detect_asn_get_tlv(&bsb, &apc, &atag, &alen))) {badreason = 4; goto bad_cert;} } certs->serialNumberLen = alen; certs->serialNumber = malloc(alen); memcpy(certs->serialNumber, value, alen); /* signature */ if (!(value = moloch_detect_asn_get_tlv(&bsb, &apc, &atag, &alen))) {badreason = 5; goto bad_cert;} /* issuer */ if (!(value = moloch_detect_asn_get_tlv(&bsb, &apc, &atag, &alen))) {badreason = 6; goto bad_cert;} BSB tbsb; BSB_INIT(tbsb, value, alen); moloch_detect_tls_certinfo_process(&certs->issuer, &tbsb); /* validity */ if (!(value = moloch_detect_asn_get_tlv(&bsb, &apc, &atag, &alen))) {badreason = 7; goto bad_cert;} /* subject */ if (!(value = moloch_detect_asn_get_tlv(&bsb, &apc, &atag, &alen))) {badreason = 8; goto bad_cert;} BSB_INIT(tbsb, value, alen); moloch_detect_tls_certinfo_process(&certs->subject, &tbsb); /* subjectPublicKeyInfo */ if (!(value = moloch_detect_asn_get_tlv(&bsb, &apc, &atag, &alen))) {badreason = 9; goto bad_cert;} /* extensions */ if (BSB_REMAINING(bsb)) { if (!(value = moloch_detect_asn_get_tlv(&bsb, &apc, &atag, &alen))) {badreason = 10; goto bad_cert;} BSB tbsb; BSB_INIT(tbsb, value, alen); moloch_detect_tls_alt_names(certs, &tbsb); } MolochCertsInfo_t *element; HASH_FIND(t_, session->certs, certs, element); if (element) { moloch_nids_certs_free(certs); } else { HASH_ADD(t_, session->certs, certs, certs); } BSB_IMPORT_skip(cbsb, clen + 3); continue; bad_cert: if (config.debug) LOG("bad cert %d - %d %.*s", badreason, clen, clen, cdata); moloch_nids_certs_free(certs); break; } BSB_IMPORT_skip(pbsb, plen + 4); } BSB_IMPORT_skip(sslbsb, ssllen + 5); } session->certJsonSize += len*2; } /*############################## HTTP ##############################*/ /******************************************************************************/ void moloch_detect_parse_http(MolochSession_t *session, struct tcp_stream *UNUSED(a_tcp), struct half_stream *hlf) { MolochSessionHttp_t *http = session->http; #ifdef HTTPDEBUG LOG("HTTPDEBUG: enter %d", session->which); #endif if (!http) { if (hlf->offset == 0) { moloch_nids_new_session_http(session); http = session->http; http_parser_init(&http->parsers[0], HTTP_BOTH); http_parser_init(&http->parsers[1], HTTP_BOTH); http->wParsers = 3; http->parsers[0].data = session; http->parsers[1].data = session; } else { return; } } else if ((http->wParsers & (1 << session->which)) == 0) { return; } int remaining = hlf->count_new; char *data = hlf->data + (hlf->count - hlf->offset - hlf->count_new); while (remaining > 0) { int len = http_parser_execute(&http->parsers[session->which], &parserSettings, data, remaining); #ifdef HTTPDEBUG LOG("HTTPDEBUG: parse result: %d input: %d errno: %d", len, remaining, http->parsers[session->which].http_errno); #endif if (len <= 0) { http->wParsers &= ~(1 << session->which); if (http->wParsers) { moloch_nids_free_session_http(session); } break; } data += len; remaining -= len; } } /******************************************************************************/ void moloch_detect_parse_ssh(MolochSession_t *session, struct tcp_stream *UNUSED(a_tcp), struct half_stream *hlf) { uint32_t remaining = hlf->count_new; unsigned char *data = (unsigned char*)(hlf->data + (hlf->count - hlf->offset - hlf->count_new)); if (memcmp("SSH", data, 3) == 0) return; while (remaining >= 6) { if (session->sshLen == 0) { session->sshLen = (data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3]) + 4; session->sshCode = data[5]; if (session->sshLen == 0) { break; } } if (session->sshCode == 33 && remaining > 8) { uint32_t keyLen = data[6] << 24 | data[7] << 16 | data[8] << 8 | data[9]; session->isSsh = 0; if (remaining > keyLen + 8) { char *str = g_base64_encode(data+10, keyLen); if (!moloch_field_string_add(MOLOCH_FIELD_SSH_KEY, session, str, (keyLen/3+1)*4, FALSE)) { free(str); } } break; } if (remaining > session->sshLen) { remaining -= session->sshLen; session->sshLen = 0; continue; } else { session->sshLen -= remaining; remaining = 0; continue; } } } /******************************************************************************/ void moloch_detect_parse_irc(MolochSession_t *session, struct tcp_stream *UNUSED(a_tcp), struct half_stream *hlf) { uint32_t remaining = hlf->count_new; unsigned char *data = (unsigned char*)(hlf->data + (hlf->count - hlf->offset - hlf->count_new)); while (remaining) { if (session->ircState & 0x1) { unsigned char *newline = memchr(data, '\n', remaining); if (newline) { remaining -= (newline - data) +1; data = newline+1; session->ircState &= ~ 0x1; } else { data += remaining; remaining = 0; break; } } if (remaining > 5 && memcmp("JOIN ", data, 5) == 0) { unsigned char *end = data + remaining; unsigned char *ptr = data + 5; while (ptr < end && *ptr != ' ' && *ptr != '\r' && *ptr != '\n') { ptr++; } moloch_field_string_add(MOLOCH_FIELD_IRC_CHANNELS, session, (char*)data + 5, ptr - data - 5, TRUE); } if (remaining > 5 && memcmp("NICK ", data, 5) == 0) { unsigned char *end = data + remaining; unsigned char *ptr = data + 5; while (ptr < end && *ptr != ' ' && *ptr != '\r' && *ptr != '\n') { ptr++; } moloch_field_string_add(MOLOCH_FIELD_IRC_NICK, session, (char*)data + 5, ptr - data - 5, TRUE); } if (remaining > 0) { session->ircState |= 0x1; } } } /******************************************************************************/ int moloch_hp_cb_on_message_begin (http_parser *parser) { MolochSession_t *session = parser->data; MolochSessionHttp_t *http = session->http; #ifdef HTTPDEBUG LOG("HTTPDEBUG: which: %d", session->which); #endif http->inHeader &= ~(1 << session->which); http->inValue &= ~(1 << session->which); http->inBody &= ~(1 << session->which); g_checksum_reset(http->checksum[session->which]); if (pluginsCbs & MOLOCH_PLUGIN_HP_OMB) moloch_plugins_cb_hp_omb(session, parser); return 0; } /******************************************************************************/ int moloch_hp_cb_on_url (http_parser *parser, const char *at, size_t length) { MolochSession_t *session = parser->data; MolochSessionHttp_t *http = session->http; #ifdef HTTPDEBUG LOG("HTTPDEBUG: which:%d url %.*s", session->which, (int)length, at); #endif if (!http->urlString) http->urlString = g_string_new_len(at, length); else g_string_append_len(http->urlString, at, length); return 0; } /******************************************************************************/ const char *moloch_memstr(const char *haystack, int haysize, const char *needle, int needlesize) { const char *p; const char *end = haystack + haysize - needlesize; for (p = haystack; p <= end; p++) { if (p[0] == needle[0] && memcmp(p+1, needle+1, needlesize-1) == 0) return p; } return NULL; } /******************************************************************************/ const char *moloch_memcasestr(const char *haystack, int haysize, const char *needle, int needlesize) { const char *p; const char *end = haystack + haysize - needlesize; int i; for (p = haystack; p <= end; p++) { for (i = 0; i < needlesize; i++) { if (tolower(p[i]) != needle[i]) { goto memcasestr_outer; } } return p; memcasestr_outer: ; } return NULL; } /******************************************************************************/ int moloch_hp_cb_on_body (http_parser *parser, const char *at, size_t length) { MolochSession_t *session = parser->data; MolochSessionHttp_t *http = session->http; #ifdef HTTPDEBUG LOG("HTTPDEBUG: which: %d", session->which); #endif if (!(http->inBody & (1 << session->which))) { if (moloch_memstr(at, length, "password=", 9)) { moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "http:password"); } const char *m = magic_buffer(cookie, at, length); if (m) { char tmp[500]; snprintf(tmp, sizeof(tmp), "http:content:%s", m); char *semi = strchr(tmp, ';'); if (semi) { *semi = 0; } moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, tmp); } http->inBody |= (1 << session->which); } g_checksum_update(http->checksum[session->which], (guchar *)at, length); if (pluginsCbs & MOLOCH_PLUGIN_HP_OB) moloch_plugins_cb_hp_ob(session, parser, at, length); return 0; } /******************************************************************************/ int moloch_hp_cb_on_message_complete (http_parser *parser) { MolochSession_t *session = parser->data; MolochSessionHttp_t *http = session->http; #ifdef HTTPDEBUG LOG("HTTPDEBUG: which: %d", session->which); #endif if (pluginsCbs & MOLOCH_PLUGIN_HP_OMC) moloch_plugins_cb_hp_omc(session, parser); http->header[0][0] = http->header[1][0] = 0; if (http->urlString) { char *ch = http->urlString->str; while (*ch) { if (*ch < 32) { moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "http:control-char"); break; } ch++; } } if (http->hostString) { g_string_ascii_down(http->hostString); } if (http->urlString && http->hostString) { char *colon = strchr(http->hostString->str+2, ':'); if (colon) { moloch_field_string_add(MOLOCH_FIELD_HTTP_HOST, session, http->hostString->str+2, colon - http->hostString->str-2, TRUE); } else { moloch_field_string_add(MOLOCH_FIELD_HTTP_HOST, session, http->hostString->str+2, http->hostString->len-2, TRUE); } if (http->urlString->str[0] != '/') { char *result = strstr(http->urlString->str, http->hostString->str+2); /* If the host header is in the first 8 bytes of url then just use the url */ if (result && result - http->urlString->str <= 8) { moloch_field_string_add(MOLOCH_FIELD_HTTP_URLS, session, http->urlString->str, http->urlString->len, FALSE); g_string_free(http->urlString, FALSE); g_string_free(http->hostString, TRUE); } else { /* Host header doesn't match the url */ g_string_append(http->hostString, ";"); g_string_append(http->hostString, http->urlString->str); moloch_field_string_add(MOLOCH_FIELD_HTTP_URLS, session, http->hostString->str, http->hostString->len, FALSE); g_string_free(http->urlString, TRUE); g_string_free(http->hostString, FALSE); } } else { /* Normal case, url starts with /, so no extra host in url */ g_string_append(http->hostString, http->urlString->str); moloch_field_string_add(MOLOCH_FIELD_HTTP_URLS, session, http->hostString->str, http->hostString->len, FALSE); g_string_free(http->urlString, TRUE); g_string_free(http->hostString, FALSE); } moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "protocol:http"); http->urlString = NULL; http->hostString = NULL; } else if (http->urlString) { moloch_field_string_add(MOLOCH_FIELD_HTTP_URLS, session, http->urlString->str, http->urlString->len, FALSE); g_string_free(http->urlString, FALSE); moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "protocol:http"); http->urlString = NULL; } else if (http->hostString) { char *colon = strchr(http->hostString->str+2, ':'); if (colon) { moloch_field_string_add(MOLOCH_FIELD_HTTP_HOST, session, http->hostString->str+2, colon - http->hostString->str-2, TRUE); } else { moloch_field_string_add(MOLOCH_FIELD_HTTP_HOST, session, http->hostString->str+2, http->hostString->len-2, TRUE); } g_string_free(http->hostString, TRUE); http->hostString = NULL; } if (http->inBody & (1 << session->which)) { const char *md5 = g_checksum_get_string(http->checksum[session->which]); moloch_field_string_add(MOLOCH_FIELD_HTTP_MD5, session, (char*)md5, 32, TRUE); } return 0; } /******************************************************************************/ void moloch_detect_http_add_value(MolochSession_t *session) { MolochSessionHttp_t *http = session->http; int pos = http->pos[session->which]; char *s = http->valueString[session->which]->str; int l = http->valueString[session->which]->len; while (isspace(*s)) { s++; l--; } switch (config.fields[pos]->type) { case MOLOCH_FIELD_TYPE_INT: case MOLOCH_FIELD_TYPE_INT_ARRAY: case MOLOCH_FIELD_TYPE_INT_HASH: moloch_field_int_add(pos, session, atoi(s)); g_string_free(http->valueString[session->which], TRUE); break; case MOLOCH_FIELD_TYPE_STR: case MOLOCH_FIELD_TYPE_STR_ARRAY: case MOLOCH_FIELD_TYPE_STR_HASH: moloch_field_string_add(pos, session, s, l, TRUE); g_string_free(http->valueString[session->which], TRUE); break; case MOLOCH_FIELD_TYPE_IP_HASH: { int i; gchar **parts = g_strsplit(http->valueString[session->which]->str, ",", 0); for (i = 0; parts[i]; i++) { gchar *ip = parts[i]; while (*ip == ' ') ip++; in_addr_t ia = inet_addr(ip); if (ia == 0 || ia == 0xffffffff) { moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "http:bad-xff"); LOG("ERROR - Didn't understand ip: %s %s %d", http->valueString[session->which]->str, ip, ia); continue; } moloch_field_int_add(pos, session, ia); } g_strfreev(parts); g_string_free(http->valueString[session->which], TRUE); break; } } /* SWITCH */ http->valueString[session->which] = 0; http->pos[session->which] = 0; } /******************************************************************************/ int moloch_hp_cb_on_header_field (http_parser *parser, const char *at, size_t length) { MolochSession_t *session = parser->data; MolochSessionHttp_t *http = session->http; #ifdef HTTPDEBUG LOG("HTTPDEBUG: which: %d field: %.*s", session->which, (int)length, at); #endif if ((http->inHeader & (1 << session->which)) == 0) { http->inValue |= (1 << session->which); if (http->urlString && parser->status_code == 0 && pluginsCbs & MOLOCH_PLUGIN_HP_OU) { moloch_plugins_cb_hp_ou(session, parser, http->urlString->str, http->urlString->len); } } if (http->inValue & (1 << session->which)) { http->inValue &= ~(1 << session->which); http->header[session->which][0] = 0; if (http->pos[session->which]) { moloch_detect_http_add_value(session); } } size_t remaining = sizeof(http->header[session->which]) - strlen(http->header[session->which]) - 1; if (remaining > 0) strncat(http->header[session->which], at, MIN(length, remaining)); return 0; } /******************************************************************************/ int moloch_hp_cb_on_header_value (http_parser *parser, const char *at, size_t length) { MolochSession_t *session = parser->data; MolochSessionHttp_t *http = session->http; char header[200]; MolochString_t *hstring = 0; #ifdef HTTPDEBUG LOG("HTTPDEBUG: which: %d value: %.*s", session->which, (int)length, at); #endif if ((http->inValue & (1 << session->which)) == 0) { http->inValue |= (1 << session->which); char *lower = g_ascii_strdown(http->header[session->which], -1); moloch_plugins_cb_hp_ohf(session, parser, lower, strlen(lower)); if (session->which == 0) HASH_FIND(s_, httpReqHeaders, lower, hstring); else HASH_FIND(s_, httpResHeaders, lower, hstring); http->pos[session->which] = (hstring?hstring->len:0); snprintf(header, sizeof(header), "http:header:%s", lower); g_free(lower); moloch_nids_add_tag(session, MOLOCH_FIELD_HTTP_TAGS_REQ+session->which, header); } moloch_plugins_cb_hp_ohv(session, parser, at, length); if (parser->method && strcasecmp("host", http->header[session->which]) == 0) { if (!http->hostString) http->hostString = g_string_new_len("//", 2); g_string_append_len(http->hostString, at, length); } if (http->pos[session->which]) { if (!http->valueString[session->which]) http->valueString[session->which] = g_string_new_len(at, length); else g_string_append_len(http->valueString[session->which], at, length); } return 0; } /******************************************************************************/ int moloch_hp_cb_on_headers_complete (http_parser *parser) { MolochSession_t *session = parser->data; MolochSessionHttp_t *http = session->http; char tag[200]; char version[20]; #ifdef HTTPDEBUG LOG("HTTPDEBUG: which: %d code: %d method: %d", session->which, parser->status_code, parser->method); #endif int len = snprintf(version, sizeof(version), "%d.%d", parser->http_major, parser->http_minor); if (parser->status_code == 0) { snprintf(tag, sizeof(tag), "http:method:%s", http_method_str(parser->method)); moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, tag); moloch_field_string_add(MOLOCH_FIELD_HTTP_VER_REQ, session, version, len, TRUE); } else { snprintf(tag, sizeof(tag), "http:statuscode:%d", parser->status_code); moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, tag); moloch_field_string_add(MOLOCH_FIELD_HTTP_VER_RES, session, version, len, TRUE); } if (http->inValue & (1 << session->which) && http->pos[session->which]) { moloch_detect_http_add_value(session); } if (pluginsCbs & MOLOCH_PLUGIN_HP_OHC) moloch_plugins_cb_hp_ohc(session, parser); return 0; } /*############################## DNS ##############################*/ /******************************************************************************/ int moloch_detect_dns_name_element(BSB *nbsb, BSB *bsb) { int nlen = 0; BSB_IMPORT_u08(*bsb, nlen); if (nlen == 0 || nlen > BSB_REMAINING(*bsb)) { return 1; } int j; for (j = 0; j < nlen; j++) { register u_char c = 0; BSB_IMPORT_u08(*bsb, c); if (!isascii(c)) { BSB_EXPORT_u08(*nbsb, 'M'); BSB_EXPORT_u08(*nbsb, '-'); c = toascii(c); } if (!isprint(c)) { BSB_EXPORT_u08(*nbsb, '^'); c ^= 0x40; } BSB_EXPORT_u08(*nbsb, c); } return 0; } /******************************************************************************/ unsigned char *moloch_detect_dns_name(unsigned char *full, int fulllen, BSB *inbsb, int *namelen) { static unsigned char name[8000]; BSB nbsb; int didPointer = 0; BSB tmpbsb; BSB *curbsb; BSB_INIT(nbsb, name, sizeof(name)); curbsb = inbsb; while (BSB_REMAINING(*curbsb)) { unsigned char ch = 0; BSB_IMPORT_u08(*curbsb, ch); if (ch == 0) break; BSB_EXPORT_rewind(*curbsb, 1); if (ch & 0xc0) { if (didPointer > 5) return 0; didPointer++; int tpos = 0; BSB_IMPORT_u16(*curbsb, tpos); tpos &= 0x3fff; BSB_INIT(tmpbsb, full+tpos, fulllen - tpos); curbsb = &tmpbsb; continue; } if (BSB_LENGTH(nbsb)) { BSB_EXPORT_u08(nbsb, '.'); } if (moloch_detect_dns_name_element(&nbsb, curbsb) && BSB_LENGTH(nbsb)) BSB_EXPORT_rewind(nbsb, 1); // Remove last . } *namelen = BSB_LENGTH(nbsb); BSB_EXPORT_u08(nbsb, 0); return name; } /******************************************************************************/ void moloch_detect_dns(MolochSession_t *session, unsigned char *data, int len) { if (len < 18) return; int qr = (data[2] >> 7) & 0x1; int opcode = (data[2] >> 3) & 0xf; if (opcode != 0) return; int qdcount = (data[4] << 8) | data[5]; int ancount = (data[6] << 8) | data[7]; if (qdcount > 10 || qdcount <= 0) return; BSB bsb; BSB_INIT(bsb, data + 12, len - 12); /* QD Section */ int i; for (i = 0; BSB_NOT_ERROR(bsb) && i < qdcount; i++) { int namelen; unsigned char *name = moloch_detect_dns_name(data, len, &bsb, &namelen); if (!namelen || BSB_IS_ERROR(bsb)) break; unsigned short qtype = 0 , qclass = 0 ; BSB_IMPORT_u16(bsb, qtype); BSB_IMPORT_u16(bsb, qclass); char *lower = g_ascii_strdown((char*)name, namelen); if (qclass <= 255 && qclasses[qclass]) { moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, qclasses[qclass]); } if (qtype <= 255 && qtypes[qtype]) { moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, qtypes[qtype]); } if (lower && !moloch_field_string_add(MOLOCH_FIELD_DNS_HOST, session, lower, namelen, FALSE)) { g_free(lower); } } moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "protocol:dns"); if (qr == 0) return; for (i = 0; BSB_NOT_ERROR(bsb) && i < ancount; i++) { int namelen; moloch_detect_dns_name(data, len, &bsb, &namelen); if (BSB_IS_ERROR(bsb)) break; uint16_t antype = 0; BSB_IMPORT_u16 (bsb, antype); uint16_t anclass = 0; BSB_IMPORT_u16 (bsb, anclass); BSB_IMPORT_skip(bsb, 4); // ttl uint16_t rdlength = 0; BSB_IMPORT_u16 (bsb, rdlength); if (antype == 1 && anclass == 1 && rdlength == 4 && BSB_REMAINING(bsb) >= 4) { struct in_addr in; unsigned char *ptr = BSB_WORK_PTR(bsb); in.s_addr = ptr[3] << 24 | ptr[2] << 16 | ptr[1] << 8 | ptr[0]; moloch_field_int_add(MOLOCH_FIELD_DNS_IP, session, in.s_addr); } else if (antype == 5 && anclass == 1 && BSB_REMAINING(bsb) >= rdlength) { BSB rdbsb; BSB_INIT(rdbsb, BSB_WORK_PTR(bsb), rdlength); int namelen; unsigned char *name = moloch_detect_dns_name(data, len, &rdbsb, &namelen); if (!namelen || BSB_IS_ERROR(rdbsb)) continue; char *lower = g_ascii_strdown((char*)name, namelen); if (lower && !moloch_field_string_add(MOLOCH_FIELD_DNS_HOST, session, lower, namelen, FALSE)) { g_free(lower); } } BSB_IMPORT_skip(bsb, rdlength); } } /*############################## EMAIL ##############################*/ /******************************************************************************/ #define EMAIL_CMD 0 #define EMAIL_CMD_RETURN 1 #define EMAIL_DATA_HEADER 2 #define EMAIL_DATA_HEADER_RETURN 3 #define EMAIL_DATA_HEADER_DONE 4 #define EMAIL_DATA 5 #define EMAIL_DATA_RETURN 6 #define EMAIL_IGNORE 7 #define EMAIL_TLS_OK 8 #define EMAIL_TLS_OK_RETURN 9 #define EMAIL_TLS 10 #define EMAIL_MIME 11 #define EMAIL_MIME_RETURN 12 #define EMAIL_MIME_DONE 13 #define EMAIL_MIME_DATA 14 #define EMAIL_MIME_DATA_RETURN 15 /******************************************************************************/ char *moloch_detect_remove_matching(char *str, char start, char stop) { while (isspace(*str)) str++; if (*str == start) str++; char *startstr = str; while (*str && *str != stop) str++; *str = 0; return startstr; } /******************************************************************************/ void moloch_detect_email_add_value(MolochSession_t *session, int pos, char *s, int l) { while (isspace(*s)) { s++; l--; } switch (config.fields[pos]->type) { case MOLOCH_FIELD_TYPE_INT: case MOLOCH_FIELD_TYPE_INT_ARRAY: case MOLOCH_FIELD_TYPE_INT_HASH: moloch_field_int_add(pos, session, atoi(s)); break; case MOLOCH_FIELD_TYPE_STR: case MOLOCH_FIELD_TYPE_STR_ARRAY: case MOLOCH_FIELD_TYPE_STR_HASH: moloch_field_string_add(pos, session, s, l, TRUE); break; case MOLOCH_FIELD_TYPE_IP_HASH: { int i; gchar **parts = g_strsplit(s, ",", 0); for (i = 0; parts[i]; i++) { gchar *ip = parts[i]; while (*ip == ' ') ip++; in_addr_t ia = inet_addr(ip); if (ia == 0 || ia == 0xffffffff) { moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "http:bad-xff"); LOG("ERROR - Didn't understand ip: %s %s %d", s, ip, ia); continue; } moloch_field_int_add(pos, session, ia); } g_strfreev(parts); break; } } /* SWITCH */ } /******************************************************************************/ void moloch_detect_parse_email_addresses(int field, MolochSession_t *session, char *data, int len) { char *end = data+len; while (data < end) { while (data < end && isspace(*data)) data++; char *start = data; /* Starts with quote is easy */ if (data < end && *data == '"') { data++; while (data < end && *data != '"') data++; data++; while (data < end && isspace(*data)) data++; start = data; } while (data < end && *data != '<' && *data != ',') data++; if (*data == '<') { data++; start = data; while (data < end && *data != '>') data++; } char *lower = g_ascii_strdown(start, data - start); if (!moloch_field_string_add(field, session, lower, data - start, FALSE)) { g_free(lower); } while (data < end && *data != ',') data++; if (data < end && *data == ',') data++; } } /******************************************************************************/ void moloch_detect_parse_email(MolochSession_t *session, struct tcp_stream *UNUSED(a_tcp), struct half_stream *hlf) { #ifdef EMAILDEBUG LOG("EMAILDEBUG: enter %d", session->which); #endif MolochSessionEmail_t *email = session->email; int remaining = hlf->count_new; char *data = hlf->data + (hlf->count - hlf->offset - hlf->count_new); GString *line = email->line[session->which]; char *state = &email->state[session->which]; MolochString_t *emailHeader = 0; while (remaining > 0) { switch (*state) { case EMAIL_CMD: { if (*data == '\r') { *state = EMAIL_CMD_RETURN; break; } g_string_append_c(line, *data); break; } case EMAIL_CMD_RETURN: { #ifdef EMAILDEBUG printf("%d %d cmd => %s\n", session->which, *state, line->str); #endif if (strncasecmp(line->str, "MAIL FROM:", 10) == 0) { *state = EMAIL_CMD; char *lower = g_ascii_strdown(moloch_detect_remove_matching(line->str+11, '<', '>'), -1); if (!moloch_field_string_add(MOLOCH_FIELD_EMAIL_SRC, session, lower, -1, FALSE)) { g_free(lower); } } else if (strncasecmp(line->str, "RCPT TO:", 8) == 0) { char *lower = g_ascii_strdown(moloch_detect_remove_matching(line->str+9, '<', '>'), -1); if (!moloch_field_string_add(MOLOCH_FIELD_EMAIL_DST, session, lower, -1, FALSE)) { g_free(lower); } *state = EMAIL_CMD; } else if (strncasecmp(line->str, "DATA", 4) == 0) { *state = EMAIL_DATA_HEADER; } else if (strncasecmp(line->str, "STARTTLS", 8) == 0) { *state = EMAIL_IGNORE; email->state[(session->which+1)%2] = EMAIL_TLS_OK; return; } else { *state = EMAIL_CMD; } g_string_truncate(line, 0); if (*data != '\n') continue; break; } case EMAIL_DATA_HEADER: { if (*data == '\r') { *state = EMAIL_DATA_HEADER_RETURN; break; } g_string_append_c(line, *data); break; } case EMAIL_DATA_HEADER_RETURN: { #ifdef EMAILDEBUG printf("%d %d header => %s\n", session->which, *state, line->str); #endif if (strcmp(line->str, ".") == 0) { *state = EMAIL_CMD; } else if (*line->str == 0) { *state = EMAIL_DATA; if (pluginsCbs & MOLOCH_PLUGIN_SMTP_OHC) { moloch_plugins_cb_smtp_ohc(session); } } else { *state = EMAIL_DATA_HEADER_DONE; } if (*data != '\n') continue; break; } case EMAIL_DATA_HEADER_DONE: { #ifdef EMAILDEBUG printf("%d %d header done => %s (%c)\n", session->which, *state, line->str, *data); #endif *state = EMAIL_DATA_HEADER; if (*data == ' ' || *data == '\t') { g_string_append_c(line, *data); break; } char *colon = strchr(line->str, ':'); if (!colon) { g_string_truncate(line, 0); break; } char *lower = g_ascii_strdown(line->str, colon - line->str); HASH_FIND(s_, emailHeaders, lower, emailHeader); if (emailHeader) { int cpos = colon - line->str + 1; moloch_detect_email_add_value(session, emailHeader->len, line->str + cpos , line->len - cpos); } else if (strcmp(lower, "cc") == 0) { moloch_detect_parse_email_addresses(MOLOCH_FIELD_EMAIL_DST, session, line->str+3, line->len-3); } else if (strcmp(lower, "to") == 0) { moloch_detect_parse_email_addresses(MOLOCH_FIELD_EMAIL_DST, session, line->str+3, line->len-3); } else if (strcmp(lower, "from") == 0) { moloch_detect_parse_email_addresses(MOLOCH_FIELD_EMAIL_SRC, session, line->str+5, line->len-5); } else if (strcmp(lower, "message-id") == 0) { moloch_field_string_add(MOLOCH_FIELD_EMAIL_ID, session, moloch_detect_remove_matching(line->str+11, '<', '>'), -1, TRUE); } else if (strcmp(lower, "content-type") == 0) { char *s = line->str + 13; while(isspace(*s)) s++; moloch_field_string_add(MOLOCH_FIELD_EMAIL_CT, session, s, -1, TRUE); char *boundary = (char *)moloch_memcasestr(s, line->len - (s - line->str), "boundary=", 9); if (boundary) { MolochString_t *string = MOLOCH_TYPE_ALLOC0(MolochString_t); string->str = g_strdup(moloch_detect_remove_matching(boundary+9, '"', '"')); string->len = strlen(string->str); DLL_PUSH_TAIL(s_, &email->boundaries, string); } } else { int i; for (i = 0; config.smtpIpHeaders && config.smtpIpHeaders[i]; i++) { if (strcasecmp(lower, config.smtpIpHeaders[i]) == 0) { int l = strlen(config.smtpIpHeaders[i]); char *ip = moloch_detect_remove_matching(line->str+l, '[', ']'); in_addr_t ia = inet_addr(ip); if (ia == 0 || ia == 0xffffffff) break; moloch_field_int_add(MOLOCH_FIELD_EMAIL_IP, session, ia); } } } if (pluginsCbs & MOLOCH_PLUGIN_SMTP_OH) { moloch_plugins_cb_smtp_oh(session, lower, colon - line->str, colon + 1, line->len - (colon - line->str) - 1); } g_free(lower); g_string_truncate(line, 0); if (*data != '\n') continue; break; } case EMAIL_MIME_DATA: case EMAIL_DATA: { if (*data == '\r') { (*state)++; break; } g_string_append_c(line, *data); break; } case EMAIL_MIME_DATA_RETURN: case EMAIL_DATA_RETURN: { #ifdef EMAILDEBUG printf("%d %d %sdata => %s\n", session->which, *state, (*state == EMAIL_MIME_DATA_RETURN?"mime ": ""), line->str); #endif if (strcmp(line->str, ".") == 0) { *state = EMAIL_CMD; } else { MolochString_t *string; gboolean found = FALSE; if (line->str[0] == '-') { DLL_FOREACH(s_,&email->boundaries,string) { if ((int)line->len >= (int)(string->len + 2) && memcmp(line->str+2, string->str, string->len) == 0) { found = TRUE; break; } } } if (found) { if (email->base64Decode & (1 << session->which)) { const char *md5 = g_checksum_get_string(email->checksum[session->which]); moloch_field_string_add(MOLOCH_FIELD_EMAIL_MD5, session, (char*)md5, 32, TRUE); } email->base64Decode &= ~(1 << session->which); email->state64[session->which] = 0; email->save64[session->which] = 0; g_checksum_reset(email->checksum[session->which]); *state = EMAIL_MIME; } else if (*state == EMAIL_MIME_DATA_RETURN) { if (email->base64Decode & (1 << session->which)) { guchar buf[20000]; if (sizeof(buf) > line->len) { gsize b = g_base64_decode_step (line->str, line->len, buf, &(email->state64[session->which]), &(email->save64[session->which])); g_checksum_update(email->checksum[session->which], buf, b); } } *state = EMAIL_MIME_DATA; } else { *state = EMAIL_DATA; } } g_string_truncate(line, 0); if (*data != '\n') continue; break; } case EMAIL_IGNORE: { return; } case EMAIL_TLS_OK: { if (*data == '\r') { *state = EMAIL_TLS_OK_RETURN; break; } g_string_append_c(line, *data); break; } case EMAIL_TLS_OK_RETURN: { #ifdef EMAILDEBUG printf("%d %d tls => %s\n", session->which, *state, line->str); #endif *state = EMAIL_TLS; if (*data != '\n') continue; break; } case EMAIL_TLS: { *state = EMAIL_IGNORE; moloch_detect_tls_process(session, (unsigned char*)data, remaining); moloch_nids_free_session_email(session); return; } case EMAIL_MIME: { if (*data == '\r') { *state = EMAIL_MIME_RETURN; break; } g_string_append_c(line, *data); break; } case EMAIL_MIME_RETURN: { #ifdef EMAILDEBUG printf("%d %d mime => %s\n", session->which, *state, line->str); #endif if (*line->str == 0) { *state = EMAIL_MIME_DATA; } else { *state = EMAIL_MIME_DONE; } if (*data != '\n') continue; break; } case EMAIL_MIME_DONE: { #ifdef EMAILDEBUG printf("%d %d mime done => %s (%c)\n", session->which, *state, line->str, *data); #endif *state = EMAIL_MIME; if (*data == ' ' || *data == '\t') { g_string_append_c(line, *data); break; } if (strncasecmp(line->str, "content-type:", 13) == 0) { char *s = line->str + 13; while(isspace(*s)) s++; char *boundary = (char *)moloch_memcasestr(s, line->len - (s - line->str), "boundary=", 9); if (boundary) { MolochString_t *string = MOLOCH_TYPE_ALLOC0(MolochString_t); string->str = g_strdup(moloch_detect_remove_matching(boundary+9, '"', '"')); string->len = strlen(string->str); DLL_PUSH_TAIL(s_, &email->boundaries, string); } } else if (strncasecmp(line->str, "content-disposition:", 20) == 0) { char *s = line->str + 13; while(isspace(*s)) s++; char *filename = (char *)moloch_memcasestr(s, line->len - (s - line->str), "filename=", 9); if (filename) { moloch_field_string_add(MOLOCH_FIELD_EMAIL_FN, session, moloch_detect_remove_matching(filename+9, '"', '"'), -1, TRUE); } } else if (strncasecmp(line->str, "content-transfer-encoding:", 26) == 0) { if(moloch_memcasestr(line->str+26, line->len - 26, "base64", 6)) { email->base64Decode |= (1 << session->which); } } g_string_truncate(line, 0); if (*data != '\n') continue; break; } } data++; remaining--; } } /*############################## SHARED ##############################*/ /******************************************************************************/ void moloch_detect_init() { moloch_field_define_internal(MOLOCH_FIELD_USER, "user", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT | MOLOCH_FIELD_FLAG_CONTINUE); moloch_field_define_internal(MOLOCH_FIELD_TAGS, "ta", MOLOCH_FIELD_TYPE_INT_HASH, MOLOCH_FIELD_FLAG_CNT | MOLOCH_FIELD_FLAG_CONTINUE); moloch_field_define_internal(MOLOCH_FIELD_HTTP_HOST, "ho", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_HTTP_URLS, "us", MOLOCH_FIELD_TYPE_STR_ARRAY, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_HTTP_XFF, "xff", MOLOCH_FIELD_TYPE_IP_HASH, MOLOCH_FIELD_FLAG_SCNT); moloch_field_define_internal(MOLOCH_FIELD_HTTP_UA, "ua", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_HTTP_TAGS_REQ, "hh1", MOLOCH_FIELD_TYPE_INT_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_HTTP_TAGS_RES, "hh2", MOLOCH_FIELD_TYPE_INT_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_HTTP_MD5, "hmd5", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_HTTP_VER_REQ, "hsver", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_HTTP_VER_RES, "hdver", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_SSH_VER, "sshver", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_SSH_KEY, "sshkey", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_DNS_IP, "dnsip", MOLOCH_FIELD_TYPE_IP_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_DNS_HOST, "dnsho", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_EMAIL_HOST, "eho", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_EMAIL_UA, "eua", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_EMAIL_SRC, "esrc", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_EMAIL_DST, "edst", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_EMAIL_SUB, "esub", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_EMAIL_ID, "eid", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_EMAIL_CT, "ect", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_EMAIL_MV, "emv", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_EMAIL_FN, "efn", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_EMAIL_MD5, "emd5", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_EMAIL_FCT, "efct", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_EMAIL_IP, "eip", MOLOCH_FIELD_TYPE_IP_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_IRC_NICK, "ircnck", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); moloch_field_define_internal(MOLOCH_FIELD_IRC_CHANNELS, "ircch", MOLOCH_FIELD_TYPE_STR_HASH, MOLOCH_FIELD_FLAG_CNT); snprintf(nodeTag, sizeof(nodeTag), "node:%s", config.nodeName); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, nodeTag, NULL); if (config.nodeClass) { snprintf(classTag, sizeof(classTag), "node:%s", config.nodeClass); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, classTag, NULL); } if (extraTags) { int i; for (i = 0; extraTags[i]; i++) { moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, extraTags[i], NULL); } } memset(&parserSettings, 0, sizeof(parserSettings)); parserSettings.on_message_begin = moloch_hp_cb_on_message_begin; parserSettings.on_url = moloch_hp_cb_on_url; parserSettings.on_body = moloch_hp_cb_on_body; parserSettings.on_headers_complete = moloch_hp_cb_on_headers_complete; parserSettings.on_message_complete = moloch_hp_cb_on_message_complete; parserSettings.on_header_field = moloch_hp_cb_on_header_field; parserSettings.on_header_value = moloch_hp_cb_on_header_value; cookie = magic_open(MAGIC_MIME); if (!cookie) { LOG("Error with libmagic %s", magic_error(cookie)); } else { magic_load(cookie, NULL); } qclasses[1] = "dns:qclass:IN"; qclasses[2] = "dns:qclass:CS"; qclasses[3] = "dns:qclass:CH"; qclasses[4] = "dns:qclass:HS"; qclasses[255] = "dns:qclass:ANY"; qtypes[1] = "dns:qtype:A"; qtypes[2] = "dns:qtype:NS"; qtypes[3] = "dns:qtype:MD"; qtypes[4] = "dns:qtype:MF"; qtypes[5] = "dns:qtype:CNAME"; qtypes[6] = "dns:qtype:SOA"; qtypes[7] = "dns:qtype:MB"; qtypes[8] = "dns:qtype:MG"; qtypes[9] = "dns:qtype:MR"; qtypes[10] = "dns:qtype:NULL"; qtypes[11] = "dns:qtype:WKS"; qtypes[12] = "dns:qtype:PTR"; qtypes[13] = "dns:qtype:HINFO"; qtypes[14] = "dns:qtype:MINFO"; qtypes[15] = "dns:qtype:MX"; qtypes[16] = "dns:qtype:TXT"; qtypes[252] = "dns:qtype:AXFR"; qtypes[253] = "dns:qtype:MAILB"; qtypes[254] = "dns:qtype:MAILA"; qtypes[255] = "dns:qtype:ANY"; } /******************************************************************************/ void moloch_detect_exit() { magic_close(cookie); } /******************************************************************************/ void moloch_detect_parse_classify(MolochSession_t *session, struct tcp_stream *UNUSED(a_tcp), struct half_stream *hlf) { unsigned char *data = (unsigned char *)hlf->data; if (hlf->offset != 0) return; if (hlf->count < 3) return; if (memcmp("SSH", data, 3) == 0) { session->isSsh = 1; moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "protocol:ssh"); unsigned char *n = memchr(data, 0x0a, hlf->count); if (n && *(n-1) == 0x0d) n--; if (n) { int len = (n - data); char *str = g_ascii_strdown((char *)data, len); if (!moloch_field_string_add(MOLOCH_FIELD_SSH_VER, session, str, len, FALSE)) { free(str); } } } if (hlf->count < 4) return; if (memcmp("220 ", data, 4) == 0) { if (g_strstr_len((char *)data, hlf->count_new, "LMTP") != 0) moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "protocol:lmtp"); else if (g_strstr_len((char *)data, hlf->count_new, "SMTP") != 0) { moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "protocol:smtp"); if (!session->email) moloch_nids_new_session_email(session); } else moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "protocol:ftp"); } if (hlf->count < 5) return; if (memcmp("HELO ", data, 5) == 0) { moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "protocol:smtp"); if (!session->email) moloch_nids_new_session_email(session); } if (memcmp("EHLO ", data, 5) == 0) { moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "protocol:smtp"); if (!session->email) moloch_nids_new_session_email(session); } if (hlf->count < 9) return; if ((data[4] == 0xff || data[4] == 0xfe) && memcmp("SMB", data+5, 3) == 0) { moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "protocol:smb"); } if (memcmp("+OK POP3 ", data, 9) == 0) moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "protocol:pop3"); if (hlf->count < 11) return; if ((data[0] == ':' && moloch_memstr((char *)data, hlf->count, " NOTICE ", 8)) || memcmp("NOTICE AUTH", data, 11) == 0 || memcmp("NICK ", data, 5) == 0 || memcmp("PASS ", data, 5) == 0) { moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "protocol:irc"); session->isIrc = 1; } if (hlf->count < 14) return; if (data[13] == 0x78 && (((data[8] == 0) && (data[7] == 0) && (((data[6]&0xff) << 8 | (data[5]&0xff)) == hlf->count)) || // Windows ((data[5] == 0) && (data[6] == 0) && (((data[7]&0xff) << 8 | (data[8]&0xff)) == hlf->count)))) { // Mac moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "protocol:gh0st"); }else if (data[7] == 0 && data[8] == 0 && data[11] == 0 && data[12] == 0 && data[13] == 0x78 && data[14] == 0x9c) { moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "protocol:gh0st-improved"); } if (hlf->count < 19) return; if (memcmp("BitTorrent protocol", data, 19) == 0) moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "protocol:bittorrent"); if (hlf->count < 30) return; if (hlf->count != hlf->count_new && data[0] == 0x16 && data[1] == 0x03 && data[2] <= 0x03 && data[5] == 2) { moloch_nids_add_tag(session, MOLOCH_FIELD_TAGS, "protocol:tls"); moloch_detect_tls_process(session, data, hlf->count); } } /******************************************************************************/ void moloch_detect_parse_yara(MolochSession_t *session, struct tcp_stream *UNUSED(a_tcp), struct half_stream *hlf) { moloch_yara_execute(session, hlf->data, hlf->count - hlf->offset, (hlf->offset == 0)); }
reedloden/moloch
capture/main.c
<reponame>reedloden/moloch<filename>capture/main.c /* main.c -- Initialization of components * * Copyright 2012-2013 AOL Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this Software except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <stdio.h> #include <stdlib.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netinet/udp.h> #include <string.h> #include <unistd.h> #include <pwd.h> #include <grp.h> #include <errno.h> #include "glib.h" #include "pcap.h" #include "moloch.h" #include "molochconfig.h" /******************************************************************************/ MolochConfig_t config; GMainLoop *mainLoop; /******************************************************************************/ gboolean showVersion = FALSE; gchar **extraTags = NULL; static GOptionEntry entries[] = { { "config", 'c', 0, G_OPTION_ARG_FILENAME, &config.configFile, "Config file name, default '/data/moloch/etc/config.ini'", NULL }, { "pcapfile", 'r', 0, G_OPTION_ARG_FILENAME, &config.pcapReadFile, "Offline pcap file", NULL }, { "pcapdir", 'R', 0, G_OPTION_ARG_FILENAME, &config.pcapReadDir, "Offline pcap directory, all *.pcap files will be processed", NULL }, { "recursive", 0, 0, G_OPTION_ARG_NONE, &config.pcapRecursive, "When in offline pcap directory mode, recurse sub directories", NULL }, { "node", 'n', 0, G_OPTION_ARG_STRING, &config.nodeName, "Our node name, defaults to hostname. Multiple nodes can run on same host.", NULL }, { "tag", 't', 0, G_OPTION_ARG_STRING_ARRAY, &extraTags, "Extra tag to add to all packets, can be used multiple times", NULL }, { "version", 'v', 0, G_OPTION_ARG_NONE, &showVersion, "Show version number", NULL }, { "debug", 'd', 0, G_OPTION_ARG_NONE, &config.debug, "Turn on all debugging", NULL }, { "copy", 0, 0, G_OPTION_ARG_NONE, &config.copyPcap, "When in offline mode copy the pcap files into the pcapDir from the config file ", NULL }, { "fakepcap", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &config.fakePcap, "fake pcap", NULL }, { "dryrun", 0, 0, G_OPTION_ARG_NONE, &config.dryRun, "dry run, noting written to database", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; /******************************************************************************/ void parse_args(int argc, char **argv) { GError *error = NULL; GOptionContext *context; context = g_option_context_new ("- capture"); g_option_context_add_main_entries (context, entries, NULL); if (!g_option_context_parse (context, &argc, &argv, &error)) { g_print ("option parsing failed: %s\n", error->message); exit (1); } g_option_context_free(context); if (config.pcapReadFile && config.pcapReadDir) { printf("Use either -R or -r\n"); exit(0); } if (!config.configFile) config.configFile = g_strdup("/data/moloch/etc/config.ini"); if (showVersion) { printf("moloch-capture %s session size=%zd\n", PACKAGE_VERSION, sizeof(MolochSession_t)); exit(0); } if (!config.nodeName) { config.nodeName = malloc(101); config.hostName = malloc(101); gethostname(config.nodeName, 101); gethostname(config.hostName, 101); config.nodeName[100] = 0; config.hostName[100] = 0; char *dot = strchr(config.nodeName, '.'); if (dot) *dot = 0; } if (!config.hostName) { config.hostName = malloc(101); gethostname(config.hostName, 101); config.hostName[100] = 0; } if (config.debug) { LOG("nodeName = %s", config.nodeName); LOG("hostName = %s", config.hostName); } } /******************************************************************************/ void *moloch_size_alloc(int size, int zero) { size += 8; void *mem = (zero?g_slice_alloc0(size):g_slice_alloc(size)); memcpy(mem, &size, 4); return mem + 8; } /******************************************************************************/ int moloch_size_free(void *mem) { int size; mem -= 8; memcpy(&size, mem, 4); g_slice_free1(size, mem); return size - 8; } /******************************************************************************/ void cleanup(int UNUSED(sig)) { LOG("exiting"); moloch_nids_exit(); moloch_plugins_exit(); moloch_detect_exit(); moloch_yara_exit(); moloch_db_exit(); moloch_http_exit(); moloch_config_exit(); moloch_field_exit(); if (config.pcapReadFile) g_free(config.pcapReadFile); if (config.pcapReadDir) g_free(config.pcapReadDir); if (extraTags) g_strfreev(extraTags); exit(0); } /******************************************************************************/ void reload(int UNUSED(sig)) { moloch_plugins_reload(); } /******************************************************************************/ unsigned char *moloch_js0n_get(unsigned char *data, uint32_t len, char *key, uint32_t *olen) { uint32_t key_len = strlen(key); int i; uint32_t out[4*100]; // Can have up to 100 elements at any level memset(out, 0, sizeof(out)); *olen = 0; if (js0n(data, len, out) != 0) { LOG("ERROR: Parse error for >%s< in >%.*s<\n", key, len, data); fflush(stdout); return 0; } for (i = 0; out[i]; i+= 4) { if (out[i+1] == key_len && memcmp(key, data + out[i], key_len) == 0) { *olen = out[i+3]; return data + out[i+2]; } } return 0; } /******************************************************************************/ char *moloch_js0n_get_str(unsigned char *data, uint32_t len, char *key) { uint32_t value_len; unsigned char *value = 0; value = moloch_js0n_get(data, len, key, &value_len); if (!value) return NULL; return g_strndup((gchar*)value, value_len); } /******************************************************************************/ gboolean moloch_string_add(void *hashv, char *string, gboolean copy) { MolochStringHash_t *hash = hashv; MolochString_t *hstring; HASH_FIND(s_, *hash, string, hstring); if (hstring) return FALSE; hstring = MOLOCH_TYPE_ALLOC0(MolochString_t); if (copy) { hstring->str = g_strdup(string); } else { hstring->str = string; } HASH_ADD(s_, *hash, hstring->str, hstring); return TRUE; } /******************************************************************************/ uint32_t moloch_string_hash(const void *key) { char *p = (char *)key; uint32_t n = 0; while (*p) { n = (n << 5) - n + *p; p++; } return n; } /******************************************************************************/ uint32_t moloch_string_hash_len(const void *key, int len) { char *p = (char *)key; uint32_t n = 0; while (len) { n = (n << 5) - n + *p; p++; len--; } return n; } /******************************************************************************/ int moloch_string_cmp(const void *keyv, const void *elementv) { char *key = (char*)keyv; MolochString_t *element = (MolochString_t *)elementv; return strcmp(key, element->str) == 0; } /******************************************************************************/ uint32_t moloch_int_hash(const void *key) { return (uint32_t)((long)key); } /******************************************************************************/ int moloch_int_cmp(const void *keyv, const void *elementv) { uint32_t key = (uint32_t)((long)keyv); MolochInt_t *element = (MolochInt_t *)elementv; return key == element->i_hash; } /******************************************************************************/ typedef struct { MolochWatchFd_func func; gpointer data; } MolochWatchFd_t; /******************************************************************************/ static void moloch_gio_destroy(gpointer data) { g_free(data); } /******************************************************************************/ static gboolean moloch_gio_invoke(GIOChannel *source, GIOCondition condition, gpointer data) { MolochWatchFd_t *watch = data; return watch->func(g_io_channel_unix_get_fd(source), condition, watch->data); } /******************************************************************************/ gint moloch_watch_fd(gint fd, GIOCondition cond, MolochWatchFd_func func, gpointer data) { MolochWatchFd_t *watch = g_new0(MolochWatchFd_t, 1); watch->func = func; watch->data = data; GIOChannel *channel = g_io_channel_unix_new(fd); gint id = g_io_add_watch_full(channel, G_PRIORITY_DEFAULT, cond, moloch_gio_invoke, watch, moloch_gio_destroy); g_io_channel_unref(channel); return id; } /******************************************************************************/ void moloch_drop_privileges() { if (getuid() != 0) return; if (config.dropGroup) { struct group *grp; grp = getgrnam(config.dropGroup); if (!grp) { LOG("ERROR: Group '%s' not found", config.dropGroup); exit(1); } if (setgid(grp->gr_gid) != 0) { LOG("ERROR: Couldn't change group - %s", strerror(errno)); exit(1); } } if (config.dropUser) { struct passwd *usr; usr = getpwnam(config.dropUser); if (!usr) { LOG("ERROR: User '%s' not found", config.dropUser); exit(1); } if (setuid(usr->pw_uid) != 0) { LOG("ERROR: Couldn't change user - %s", strerror(errno)); exit(1); } } } /******************************************************************************/ /* * Don't actually end main loop until all tags are loaded */ gboolean moloch_quit_gfunc (gpointer UNUSED(user_data)) { if (moloch_db_tags_loading() == 0) { g_main_loop_quit(mainLoop); return FALSE; } return TRUE; } /******************************************************************************/ void moloch_quit() { g_timeout_add(100, moloch_quit_gfunc, 0); } /******************************************************************************/ /* * Don't actually init nids/pcap until all the pre tags are loaded */ gboolean moloch_nids_init_gfunc (gpointer UNUSED(user_data)) { if (moloch_db_tags_loading() == 0) { moloch_nids_init(); return FALSE; } return TRUE; } /******************************************************************************/ /******************************************************************************/ int main(int argc, char **argv) { signal(SIGHUP, reload); signal(SIGINT, cleanup); signal(SIGUSR1, exit); signal(SIGCHLD, SIG_IGN); mainLoop = g_main_loop_new(NULL, FALSE); parse_args(argc, argv); moloch_config_init(); moloch_nids_root_init(); if (!config.pcapReadFile && !config.pcapReadDir) { moloch_drop_privileges(); config.copyPcap = 1; } moloch_field_init(); moloch_http_init(); moloch_db_init(); moloch_config_load_local_ips(); moloch_yara_init(); moloch_detect_init(); moloch_config_load_headers(); moloch_plugins_init(); g_timeout_add(10, moloch_nids_init_gfunc, 0); g_main_loop_run(mainLoop); cleanup(0); exit(0); }
reedloden/moloch
capture/nids.c
<reponame>reedloden/moloch<gh_stars>1-10 /* nids.c -- Functions for dealing with libnids * * Copyright 2012-2013 AOL Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this Software except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <stdio.h> #include <stdlib.h> #include <sys/socket.h> #include <arpa/inet.h> #include <netinet/in.h> #include <netinet/in_systm.h> #include <netinet/ip.h> #include <netinet/tcp.h> #include <netinet/udp.h> #include <netinet/ip_icmp.h> #include <string.h> #include <errno.h> #include <ctype.h> #include <fcntl.h> #include <unistd.h> #include <inttypes.h> #include <sys/stat.h> #include "glib.h" #include "nids.h" #include "pcap.h" #include "magic.h" #include "moloch.h" /******************************************************************************/ extern MolochConfig_t config; extern GMainLoop *mainLoop; extern uint32_t pluginsCbs; extern void *esServer; static MolochSessionHead_t tcpSessionQ; static MolochSessionHead_t udpSessionQ; static MolochSessionHead_t icmpSessionQ; static MolochSessionHead_t tcpWriteQ; typedef struct moloch_output { struct moloch_output *mo_next, *mo_prev; uint16_t mo_count; char *buf; uint64_t max; uint64_t pos; int fd; char close; } MolochOutput_t; static MolochOutput_t outputQ; static MolochOutput_t *output; static uint64_t dumperFilePos = 0; static int dumperFd = -1; static uint32_t dumperId; static FILE *offlineFile = 0; static uint32_t initialDropped = 0; struct timeval initialPacket; static char offlinePcapFilename[PATH_MAX+1]; uint64_t totalPackets = 0; uint64_t totalBytes = 0; uint64_t totalSessions = 0; /******************************************************************************/ HASH_VAR(h_, sessions, MolochSessionHead_t, 199337); /******************************************************************************/ void moloch_nids_session_free (MolochSession_t *session); void moloch_nids_process_udp(MolochSession_t *session, struct udphdr *udphdr, unsigned char *data, int len); int moloch_nids_next_file(); void moloch_nids_init_nids(); /******************************************************************************/ uint32_t moloch_nids_session_hash(const void *key) { char *p = (char *)key; return (p[4] & 0xff) << 24 | (p[6] & 0xff) << 16 | (p[10] & 0xff) << 8 | (p[12] & 0xff); } /******************************************************************************/ int moloch_nids_session_cmp(const void *keyv, const void *elementv) { unsigned char *key = (unsigned char*)keyv; MolochSession_t *element = (MolochSession_t *)elementv; if (key[0] != element->protocol) return 0; if (element->addr1 < element->addr2) { return key[5] == ((element->port1 >> 8) & 0xff) && key[6] == (element->port1 & 0xff) && key[11] == ((element->port2 >> 8) & 0xff) && key[12] == (element->port2 & 0xff) && memcmp(key + 1, &element->addr1, 4) == 0 && memcmp(key + 7, &element->addr2, 4) == 0; } else { return key[5] == ((element->port2 >> 8) & 0xff) && key[6] == (element->port2 & 0xff) && key[11] == ((element->port1 >> 8) & 0xff) && key[12] == (element->port1 & 0xff) && memcmp(key + 1, &element->addr2, 4) == 0 && memcmp(key + 7, &element->addr1, 4) == 0; } } /******************************************************************************/ void moloch_nids_certs_free (MolochCertsInfo_t *certs) { MolochString_t *string; while (DLL_POP_HEAD(s_, &certs->alt, string)) { g_free(string->str); MOLOCH_TYPE_FREE(MolochString_t, string); } while (DLL_POP_HEAD(s_, &certs->issuer.commonName, string)) { g_free(string->str); MOLOCH_TYPE_FREE(MolochString_t, string); } while (DLL_POP_HEAD(s_, &certs->subject.commonName, string)) { g_free(string->str); MOLOCH_TYPE_FREE(MolochString_t, string); } if (certs->issuer.orgName) g_free(certs->issuer.orgName); if (certs->subject.orgName) g_free(certs->subject.orgName); if (certs->serialNumber) free(certs->serialNumber); MOLOCH_TYPE_FREE(MolochCertsInfo_t, certs); } /******************************************************************************/ uint32_t moloch_nids_certs_hash(const void *key) { MolochCertsInfo_t *ci = (MolochCertsInfo_t *)key; return ((ci->serialNumber[0] << 28) | (ci->serialNumber[ci->serialNumberLen-1] << 24) | (ci->issuer.commonName.s_count << 18) | (ci->issuer.orgName?ci->issuer.orgName[0] << 12:0) | (ci->subject.commonName.s_count << 6) | (ci->subject.orgName?ci->subject.orgName[0]:0)); } /******************************************************************************/ int moloch_nids_certs_cmp(const void *keyv, const void *elementv) { MolochCertsInfo_t *key = (MolochCertsInfo_t *)keyv; MolochCertsInfo_t *element = (MolochCertsInfo_t *)elementv; if ( !((key->serialNumberLen == element->serialNumberLen) && (memcmp(key->serialNumber, element->serialNumber, element->serialNumberLen) == 0) && (key->issuer.commonName.s_count == element->issuer.commonName.s_count) && (key->issuer.orgName == element->issuer.orgName || strcmp(key->issuer.orgName, element->issuer.orgName) == 0) && (key->subject.commonName.s_count == element->subject.commonName.s_count) && (key->subject.orgName == element->subject.orgName || strcmp(key->subject.orgName, element->subject.orgName) == 0) ) ) { return 0; } MolochString_t *kstr, *estr; for (kstr = key->issuer.commonName.s_next, estr = element->issuer.commonName.s_next; kstr != (void *)&(key->issuer.commonName); kstr = kstr->s_next, estr = estr->s_next) { if (strcmp(kstr->str, estr->str) != 0) return 0; } for (kstr = key->subject.commonName.s_next, estr = element->subject.commonName.s_next; kstr != (void *)&(key->subject.commonName); kstr = kstr->s_next, estr = estr->s_next) { if (strcmp(kstr->str, estr->str) != 0) return 0; } return 1; } /******************************************************************************/ #pragma GCC diagnostic ignored "-Wstrict-aliasing" #define int_ntoa(x) inet_ntoa(*((struct in_addr *)(int*)&x)) char *moloch_friendly_session_id (int protocol, uint32_t addr1, int port1, uint32_t addr2, int port2) { static char buf[1000]; int len; if (addr1 < addr2) { len = snprintf(buf, sizeof(buf), "%d;%s:%i,", protocol, int_ntoa(addr1), port1); snprintf(buf+len, sizeof(buf) - len, "%s:%i", int_ntoa(addr2), port2); } else { len = snprintf(buf, sizeof(buf), "%d;%s:%i,", protocol, int_ntoa(addr2), port2); snprintf(buf+len, sizeof(buf) - len, "%s:%i", int_ntoa(addr1), port1); } return buf; } #define MOLOCH_SESSIONID_LEN 13 /******************************************************************************/ void moloch_session_id (char *buf, int protocol, uint32_t addr1, uint16_t port1, uint32_t addr2, uint16_t port2) { buf[0] = protocol; if (addr1 < addr2) { memcpy(buf + 1, &addr1, 4); buf[5] = (port1 >> 8) & 0xff; buf[6] = port1 & 0xff; memcpy(buf + 7, &addr2, 4); buf[11] = (port2 >> 8) & 0xff; buf[12] = port2 & 0xff; } else { memcpy(buf + 1, &addr2, 4); buf[5] = (port2 >> 8) & 0xff; buf[6] = port2 & 0xff; memcpy(buf + 7, &addr1, 4); buf[11] = (port1 >> 8) & 0xff; buf[12] = port1 & 0xff; } } /******************************************************************************/ void moloch_nids_save_session(MolochSession_t *session) { if (session->outstandingQueries > 0) { session->needSave = 1; if (session->tcp_next) { DLL_REMOVE(tcp_, &tcpWriteQ, session); } switch (session->protocol) { case IPPROTO_TCP: DLL_REMOVE(q_, &tcpSessionQ, session); break; case IPPROTO_UDP: DLL_REMOVE(q_, &udpSessionQ, session); break; case IPPROTO_ICMP: DLL_REMOVE(q_, &icmpSessionQ, session); break; } HASH_REMOVE(h_, sessions, session); return; } moloch_db_save_session(session, TRUE); HASH_REMOVE(h_, sessions, session); moloch_nids_session_free(session); } /******************************************************************************/ void moloch_nids_mid_save_session(MolochSession_t *session) { /* If we are parsing pcap its ok to pause and make sure all tags are loaded */ while (session->outstandingQueries > 0 && (config.pcapReadDir || config.pcapReadFile)) { g_main_context_iteration (g_main_context_default(), TRUE); } if (!session->rootId) { session->rootId = "ROOT"; } moloch_db_save_session(session, FALSE); g_array_set_size(session->filePosArray, 0); g_array_set_size(session->fileNumArray, 0); if (session->tcp_next) { DLL_REMOVE(tcp_, &tcpWriteQ, session); DLL_PUSH_TAIL(tcp_, &tcpWriteQ, session); } session->lastSave = nids_last_pcap_header->ts.tv_sec; session->bytes = 0; session->databytes = 0; session->packets = 0; session->certJsonSize = 0; } /******************************************************************************/ char *pcapFilename; int dlt_to_linktype(int dlt); void moloch_nids_file_create() { if (config.dryRun) { pcapFilename = "dryrun.pcap"; dumperFd = 1; return; } pcapFilename = moloch_db_create_file(nids_last_pcap_header->ts.tv_sec, NULL, 0, &dumperId); dumperFilePos = 24; output = MOLOCH_TYPE_ALLOC0(MolochOutput_t); output->max = config.pcapWriteSize; output->buf = MOLOCH_SIZE_ALLOC(pcapbuf, config.pcapWriteSize + 4096); output->pos = 24; struct pcap_file_header hdr; hdr.magic = 0xa1b2c3d4; hdr.version_major = PCAP_VERSION_MAJOR; hdr.version_minor = PCAP_VERSION_MINOR; hdr.thiszone = 0; hdr.snaplen = pcap_snapshot(nids_params.pcap_desc); hdr.sigfigs = 0; hdr.linktype = dlt_to_linktype(pcap_datalink(nids_params.pcap_desc)) | pcap_datalink_ext(nids_params.pcap_desc); memcpy(output->buf, &hdr, 24); LOG("Opening %s", pcapFilename); dumperFd = open(pcapFilename, O_LARGEFILE | O_NOATIME | O_WRONLY | O_NONBLOCK | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH); if (dumperFd < 0) { LOG("ERROR - pcap open failed - Couldn't open file: '%s' with %s (%d)", pcapFilename, strerror(errno), errno); exit (2); } } /******************************************************************************/ void moloch_nids_file_locked(char *filename) { struct stat st; fstat(fileno(offlineFile), &st); dumperFilePos = 24; dumperFd = 1; if (config.dryRun) { pcapFilename = "dryrun.pcap"; return; } pcapFilename = moloch_db_create_file(nids_last_pcap_header->ts.tv_sec, filename, st.st_size, &dumperId); } /******************************************************************************/ gboolean moloch_nids_output_cb(gint UNUSED(fd), GIOCondition UNUSED(cond), gpointer UNUSED(data)) { if (config.exiting) return FALSE; MolochOutput_t *out = DLL_PEEK_HEAD(mo_, &outputQ); int len = write(out->fd, out->buf+out->pos, (out->max - out->pos)); if (len < 0) { LOG("ERROR - Write failed with %d %d\n", len, errno); exit (0); } out->pos += len; // Still more to write out if (out->pos < out->max) { return TRUE; } // The last write for this fd char needClose = out->close; if (out->close) { close(out->fd); } // Cleanup buffer MOLOCH_SIZE_FREE(pcapbuf, out->buf); DLL_REMOVE(mo_, &outputQ, out); MOLOCH_TYPE_FREE(MolochOutput_t, out); // More waiting to write on different fd, setup a new watch if (needClose && DLL_COUNT(mo_, &outputQ) > 0) { out = DLL_PEEK_HEAD(mo_, &outputQ); moloch_watch_fd(out->fd, MOLOCH_GIO_WRITE_COND, moloch_nids_output_cb, NULL); return FALSE; } return DLL_COUNT(mo_, &outputQ) > 0; } /******************************************************************************/ void moloch_nids_file_flush(gboolean all) { if (config.dryRun) { return; } output->close = all; output->fd = dumperFd; MolochOutput_t *noutput = MOLOCH_TYPE_ALLOC0(MolochOutput_t); noutput->max = config.pcapWriteSize; noutput->buf = MOLOCH_SIZE_ALLOC(pcapbuf, config.pcapWriteSize + 4096); all |= (output->pos <= output->max); if (all) { output->max = output->pos; } else { noutput->pos = output->pos - output->max; memcpy(noutput->buf, output->buf + output->max, noutput->pos); } output->pos = 0; DLL_PUSH_TAIL(mo_, &outputQ, output); if (DLL_COUNT(mo_, &outputQ) == 1) { moloch_watch_fd(dumperFd, MOLOCH_GIO_WRITE_COND, moloch_nids_output_cb, NULL); } if (DLL_COUNT(mo_, &outputQ) >= 100 && DLL_COUNT(mo_, &outputQ) % 50 == 0) { LOG("WARNING - %d output buffers waiting, disk IO system too slow?", DLL_COUNT(mo_, &outputQ)); } output = noutput; } /******************************************************************************/ struct pcap_timeval { int32_t tv_sec; /* seconds */ int32_t tv_usec; /* microseconds */ }; struct pcap_sf_pkthdr { struct pcap_timeval ts; /* time stamp */ uint32_t caplen; /* length of portion present */ uint32_t len; /* length this packet (off wire) */ }; void moloch_nids_pcap_dump(const struct pcap_pkthdr *h, const u_char *sp) { struct pcap_sf_pkthdr hdr; hdr.ts.tv_sec = h->ts.tv_sec; hdr.ts.tv_usec = h->ts.tv_usec; hdr.caplen = h->caplen; hdr.len = h->len; memcpy(output->buf + output->pos, (char *)&hdr, sizeof(hdr)); output->pos += sizeof(hdr); memcpy(output->buf + output->pos, sp, h->caplen); output->pos += h->caplen; } /******************************************************************************/ void moloch_nids_new_session_http(MolochSession_t *session) { MolochSessionHttp_t *http; http = session->http = MOLOCH_TYPE_ALLOC0(MolochSessionHttp_t); http->checksum[0] = g_checksum_new(G_CHECKSUM_MD5); http->checksum[1] = g_checksum_new(G_CHECKSUM_MD5); } /******************************************************************************/ void moloch_nids_free_session_http(MolochSession_t *session) { MolochSessionHttp_t *http = session->http; if (http->urlString) g_string_free(http->urlString, TRUE); if (http->hostString) g_string_free(http->hostString, TRUE); if (http->valueString[0]) g_string_free(http->valueString[0], TRUE); if (http->valueString[1]) g_string_free(http->valueString[1], TRUE); g_checksum_free(http->checksum[0]); g_checksum_free(http->checksum[1]); MOLOCH_TYPE_FREE(MolochSessionHttp_t, http); session->http = 0; } /******************************************************************************/ void moloch_nids_new_session_email(MolochSession_t *session) { if (!config.parseSMTP) return; MolochSessionEmail_t *email; email = session->email = MOLOCH_TYPE_ALLOC0(MolochSessionEmail_t); email->line[0] = g_string_sized_new(100); email->line[1] = g_string_sized_new(100); email->checksum[0] = g_checksum_new(G_CHECKSUM_MD5); email->checksum[1] = g_checksum_new(G_CHECKSUM_MD5); DLL_INIT(s_, &(email->boundaries)); } /******************************************************************************/ void moloch_nids_free_session_email(MolochSession_t *session) { MolochSessionEmail_t *email = session->email; MolochString_t *string; g_string_free(email->line[0], TRUE); g_string_free(email->line[1], TRUE); g_checksum_free(email->checksum[0]); g_checksum_free(email->checksum[1]); while (DLL_POP_HEAD(s_, &email->boundaries, string)) { g_free(string->str); MOLOCH_TYPE_FREE(MolochString_t, string); } MOLOCH_TYPE_FREE(MolochSessionEmail_t, email); session->email = 0; } /******************************************************************************/ void moloch_nids_cb_ip(struct ip *packet, int len) { char sessionId[MOLOCH_SESSIONID_LEN]; MolochSession_t *headSession; struct tcphdr *tcphdr = 0; struct udphdr *udphdr = 0; MolochSessionHead_t *sessionsQ; uint32_t sessionTimeout; switch (packet->ip_p) { case IPPROTO_TCP: sessionsQ = &tcpSessionQ; sessionTimeout = config.tcpTimeout; tcphdr = (struct tcphdr *)((char*)packet + 4 * packet->ip_hl); moloch_session_id(sessionId, packet->ip_p, packet->ip_src.s_addr, ntohs(tcphdr->source), packet->ip_dst.s_addr, ntohs(tcphdr->dest)); break; case IPPROTO_UDP: sessionsQ = &udpSessionQ; sessionTimeout = config.udpTimeout; udphdr = (struct udphdr *)((char*)packet + 4 * packet->ip_hl); moloch_session_id(sessionId, packet->ip_p, packet->ip_src.s_addr, ntohs(udphdr->source), packet->ip_dst.s_addr, ntohs(udphdr->dest)); break; case IPPROTO_ICMP: sessionsQ = &icmpSessionQ; sessionTimeout = config.icmpTimeout; moloch_session_id(sessionId, packet->ip_p, packet->ip_src.s_addr, 0, packet->ip_dst.s_addr, 0); break; case IPPROTO_IPV6: return; default: if (pluginsCbs & MOLOCH_PLUGIN_IP) moloch_plugins_cb_ip(NULL, packet, len); if (config.logUnknownProtocols) LOG("Unknown protocol %d", packet->ip_p); return; } totalBytes += nids_last_pcap_header->caplen; if (totalPackets == 1) { struct pcap_stat ps; if (!pcap_stats(nids_params.pcap_desc, &ps)) { initialDropped = ps.ps_drop; } initialPacket = nids_last_pcap_header->ts; LOG("Initial Packet = %ld", initialPacket.tv_sec); LOG("%" PRIu64 " Initial Dropped = %d", totalPackets, initialDropped); } if ((++totalPackets) % config.logEveryXPackets == 0) { struct pcap_stat ps; if (pcap_stats(nids_params.pcap_desc, &ps)) { ps.ps_drop = 0; ps.ps_recv = totalPackets; ps.ps_ifdrop = 0; } headSession = DLL_PEEK_HEAD(q_, sessionsQ); LOG("packets: %" PRIu64 " current sessions: %u/%u oldest: %d - recv: %u drop: %u (%0.2f) ifdrop: %u queue: %d disk: %d", totalPackets, sessionsQ->q_count, HASH_COUNT(h_, sessions), (headSession?(int)(nids_last_pcap_header->ts.tv_sec - (headSession->lastPacket.tv_sec + sessionTimeout)):0), ps.ps_recv, ps.ps_drop - initialDropped, (ps.ps_drop - initialDropped)*(double)100.0/ps.ps_recv, ps.ps_ifdrop, moloch_http_queue_length(esServer), DLL_COUNT(mo_, &outputQ)); } /* Get or Create Session */ MolochSession_t *session; HASH_FIND(h_, sessions, sessionId, session); if (!session) { //LOG ("New session: %s", sessionId); session = MOLOCH_TYPE_ALLOC0(MolochSession_t); session->protocol = packet->ip_p; session->filePosArray = g_array_sized_new(FALSE, FALSE, sizeof(uint64_t), 100); session->fileNumArray = g_array_new(FALSE, FALSE, 4); HASH_INIT(t_, session->certs, moloch_nids_certs_hash, moloch_nids_certs_cmp); HASH_ADD(h_, sessions, sessionId, session); session->lastSave = nids_last_pcap_header->ts.tv_sec; session->firstPacket = nids_last_pcap_header->ts; session->addr1 = packet->ip_src.s_addr; session->addr2 = packet->ip_dst.s_addr; session->ip_tos = packet->ip_tos; session->fields = MOLOCH_SIZE_ALLOC0(fields, sizeof(MolochField_t *)*config.maxField); moloch_detect_initial_tag(session); switch (packet->ip_p) { case IPPROTO_TCP: /* If a syn & ack that means the first packet is actually the syn-ack * reply, the syn probably got dropped */ if ((tcphdr->syn) && (tcphdr->ack)) { session->addr1 = packet->ip_dst.s_addr; session->addr2 = packet->ip_src.s_addr; session->port1 = ntohs(tcphdr->dest); session->port2 = ntohs(tcphdr->source); } else { session->port1 = ntohs(tcphdr->source); session->port2 = ntohs(tcphdr->dest); } break; case IPPROTO_UDP: session->port1 = ntohs(udphdr->source); session->port2 = ntohs(udphdr->dest); break; case IPPROTO_ICMP: session->port1 = 0; session->port2 = 0; break; } DLL_PUSH_TAIL(q_, sessionsQ, session); if (pluginsCbs & MOLOCH_PLUGIN_NEW) moloch_plugins_cb_new(session); } else { DLL_REMOVE(q_, sessionsQ, session); DLL_PUSH_TAIL(q_, sessionsQ, session); } session->bytes += nids_last_pcap_header->caplen; session->lastPacket = nids_last_pcap_header->ts; if (pluginsCbs & MOLOCH_PLUGIN_IP) moloch_plugins_cb_ip(session, packet, len); switch (packet->ip_p) { case IPPROTO_UDP: session->databytes += (nids_last_pcap_header->caplen - 8); moloch_nids_process_udp(session, udphdr, (unsigned char*)udphdr+8, nids_last_pcap_header->caplen - 8 - 4 * packet->ip_hl); break; case IPPROTO_TCP: session->tcp_flags |= *((char*)packet + 4 * packet->ip_hl+12); break; } session->packets++; if (!config.dryRun && !session->dontSave) { if (config.copyPcap) { /* Save packet to file */ if (dumperFd == -1 || dumperFilePos >= (uint64_t)config.maxFileSizeG*1024LL*1024LL*1024LL) { if (dumperFd > 0 && !config.dryRun) { moloch_nids_file_flush(TRUE); } moloch_nids_file_create(); } //LOG("ALW POS %d %llx", dumperFilePos, val); if (session->fileNumArray->len == 0 || g_array_index(session->fileNumArray, uint32_t, session->fileNumArray->len-1) != dumperId) { g_array_append_val(session->fileNumArray, dumperId); int64_t val = -1LL * dumperId; g_array_append_val(session->filePosArray, val); } g_array_append_val(session->filePosArray, dumperFilePos); if (config.fakePcap) { output->buf[output->pos] = 'P'; output->pos++; } else { moloch_nids_pcap_dump(nids_last_pcap_header, nids_last_pcap_data); dumperFilePos += 16 + nids_last_pcap_header->caplen; } if (output->pos > output->max) { moloch_nids_file_flush(FALSE); } } else { if (dumperFd == -1) { moloch_nids_file_locked(offlinePcapFilename); } dumperFilePos = ftell(offlineFile) - 16 - nids_last_pcap_header->caplen; if (session->fileNumArray->len == 0 || g_array_index(session->fileNumArray, uint32_t, session->fileNumArray->len-1) != dumperId) { g_array_append_val(session->fileNumArray, dumperId); int64_t val = -1LL * dumperId; g_array_append_val(session->filePosArray, val); } g_array_append_val(session->filePosArray, dumperFilePos); } if (session->packets >= config.maxPackets) { moloch_nids_mid_save_session(session); } } /* Clean up the Q, only 1 per incoming packet so we don't fall behind */ if ((headSession = DLL_PEEK_HEAD(q_, sessionsQ)) && ((uint64_t)headSession->lastPacket.tv_sec + sessionTimeout < (uint64_t)nids_last_pcap_header->ts.tv_sec)) { if (packet->ip_p == IPPROTO_TCP && headSession->haveNidsTcp) { //LOG("Saving because of at head %s", moloch_friendly_session_id(headSession->protocol, headSession->addr1, headSession->port1, headSession->addr2, headSession->port2)); headSession->lastPacket.tv_sec = nids_last_pcap_header->ts.tv_sec; DLL_REMOVE(q_, sessionsQ, headSession); DLL_PUSH_TAIL(q_, sessionsQ, headSession); moloch_nids_mid_save_session(headSession); } else moloch_nids_save_session(headSession); } if ((headSession = DLL_PEEK_HEAD(tcp_, &tcpWriteQ)) && (headSession->lastSave + config.tcpSaveTimeout < (uint64_t)nids_last_pcap_header->ts.tv_sec)) { //LOG("Saving because of timeout %s", moloch_friendly_session_id(headSession->protocol, headSession->addr1, headSession->port1, headSession->addr2, headSession->port2)); moloch_nids_mid_save_session(headSession); } } /******************************************************************************/ void moloch_nids_incr_outstanding(MolochSession_t *session) { session->outstandingQueries++; } /******************************************************************************/ void moloch_nids_decr_outstanding(MolochSession_t *session) { session->outstandingQueries--; if (session->needSave && session->outstandingQueries == 0) { session->needSave = 0; /* Stop endless loop if plugins add tags */ moloch_db_save_session(session, TRUE); moloch_nids_session_free(session); } } /******************************************************************************/ void moloch_nids_get_tag_cb(void *session, int tagtype, uint32_t tag) { moloch_field_int_add(tagtype, session, tag); moloch_nids_decr_outstanding(session); } /******************************************************************************/ void moloch_nids_add_tag(MolochSession_t *session, int tagtype, const char *tag) { moloch_nids_incr_outstanding(session); moloch_db_get_tag(session, tagtype, tag, moloch_nids_get_tag_cb); if (!session->dontSave && HASH_COUNT(s_, config.dontSaveTags)) { MolochString_t *tstring; HASH_FIND(s_, config.dontSaveTags, tag, tstring); if (tstring) { session->dontSave = 1; } } } /******************************************************************************/ void moloch_nids_cb_tcp(struct tcp_stream *a_tcp, void *UNUSED(params)) { MolochSession_t *session; char key[1024]; //LOG("TCP (%d) - %s", a_tcp->nids_state, moloch_friendly_session_id(IPPROTO_TCP, a_tcp->addr.saddr, a_tcp->addr.source, a_tcp->addr.daddr, a_tcp->addr.dest)); //fflush(stdout); switch (a_tcp->nids_state) { case NIDS_JUST_EST: moloch_session_id(key, IPPROTO_TCP, a_tcp->addr.saddr, a_tcp->addr.source, a_tcp->addr.daddr, a_tcp->addr.dest); HASH_FIND(h_, sessions, key, session); if (session) { session->haveNidsTcp = 1; DLL_PUSH_TAIL(tcp_, &tcpWriteQ, session); a_tcp->user = session; a_tcp->client.collect++; a_tcp->server.collect++; } else { LOG("ERROR - no session for %s", moloch_friendly_session_id(IPPROTO_TCP, a_tcp->addr.saddr, a_tcp->addr.source, a_tcp->addr.daddr, a_tcp->addr.dest)); } if (pluginsCbs & MOLOCH_PLUGIN_TCP) moloch_plugins_cb_tcp(session, a_tcp); return; case NIDS_DATA: session = a_tcp->user; if (!session) { LOG("ERROR - data - a_tcp->user not set for %s", moloch_friendly_session_id(IPPROTO_TCP, a_tcp->addr.saddr, a_tcp->addr.source, a_tcp->addr.daddr, a_tcp->addr.dest)); a_tcp->client.collect = 0; a_tcp->server.collect = 0; return; } if (a_tcp->client.count > 0x7fff0000 || a_tcp->server.count > 0x7fff0000) { LOG("ERROR - Almost 2G in tcp session, preventing libnids crash for %s", moloch_friendly_session_id(IPPROTO_TCP, a_tcp->addr.saddr, a_tcp->addr.source, a_tcp->addr.daddr, a_tcp->addr.dest)); a_tcp->client.collect = 0; a_tcp->server.collect = 0; return; } if (a_tcp->client.count_new) { session->which = 1; moloch_detect_parse_http(session, a_tcp, &a_tcp->client); moloch_detect_parse_classify(session, a_tcp, &a_tcp->client); moloch_detect_parse_yara(session, a_tcp, &a_tcp->client); if (session->email) moloch_detect_parse_email(session, a_tcp, &a_tcp->client); nids_discard(a_tcp, session->offsets[1]); if (session->isSsh) moloch_detect_parse_ssh(session, a_tcp, &a_tcp->client); session->offsets[1] = a_tcp->client.count_new; } if (a_tcp->server.count_new) { session->which = 0; moloch_detect_parse_http(session, a_tcp, &a_tcp->server); moloch_detect_parse_classify(session, a_tcp, &a_tcp->server); if (session->email) moloch_detect_parse_email(session, a_tcp, &a_tcp->server); moloch_detect_parse_yara(session, a_tcp, &a_tcp->server); nids_discard(a_tcp, session->offsets[0]); session->offsets[0] = a_tcp->server.count_new; if (session->isIrc) moloch_detect_parse_irc(session, a_tcp, &a_tcp->server); } session->databytes += a_tcp->server.count_new + a_tcp->client.count_new; if (pluginsCbs & MOLOCH_PLUGIN_TCP) moloch_plugins_cb_tcp(session, a_tcp); return; default: session = a_tcp->user; if (!session) { LOG("ERROR - default (%d) - a_tcp->user not set for %s", a_tcp->nids_state, moloch_friendly_session_id(IPPROTO_TCP, a_tcp->addr.saddr, a_tcp->addr.source, a_tcp->addr.daddr, a_tcp->addr.dest)); return; } if (a_tcp->client.count != a_tcp->client.offset) { moloch_detect_parse_yara(session, a_tcp, &a_tcp->client); } if (a_tcp->server.count != a_tcp->server.offset) { moloch_detect_parse_yara(session, a_tcp, &a_tcp->server); } if (pluginsCbs & MOLOCH_PLUGIN_TCP) moloch_plugins_cb_tcp(session, a_tcp); //LOG("TCP %d ", a_tcp->nids_state); moloch_nids_save_session(session); a_tcp->user = 0; return; } } /******************************************************************************/ void moloch_nids_session_free (MolochSession_t *session) { if (session->q_next) { switch (session->protocol) { case IPPROTO_TCP: DLL_REMOVE(q_, &tcpSessionQ, session); break; case IPPROTO_UDP: DLL_REMOVE(q_, &udpSessionQ, session); break; case IPPROTO_ICMP: DLL_REMOVE(q_, &icmpSessionQ, session); break; } } if (session->tcp_next) DLL_REMOVE(tcp_, &tcpWriteQ, session); g_array_free(session->filePosArray, TRUE); g_array_free(session->fileNumArray, TRUE); if (session->http) { moloch_nids_free_session_http(session); } if (session->email) { moloch_nids_free_session_email(session); } MolochCertsInfo_t *certs; HASH_FORALL_POP_HEAD(t_, session->certs, certs, moloch_nids_certs_free(certs); ); if (session->rootId) g_free(session->rootId); moloch_field_free(session); MOLOCH_TYPE_FREE(MolochSession_t, session); } /******************************************************************************/ void moloch_nids_syslog(int type, int errnum, struct ip *iph, void *data) { static int count[100]; if (count[errnum] == 100) return; char saddr[20], daddr[20]; switch (type) { case NIDS_WARN_IP: if (errnum != NIDS_WARN_IP_HDR) { strcpy(saddr, int_ntoa(iph->ip_src.s_addr)); strcpy(daddr, int_ntoa(iph->ip_dst.s_addr)); LOG("NIDSIP:%s %s, packet (apparently) from %s to %s", pcapFilename, nids_warnings[errnum], saddr, daddr); } else { if (iph->ip_hl < 5) { LOG("NIDSIP:%s %s - %d (iph->ip_hl) < 5", pcapFilename, nids_warnings[errnum], iph->ip_hl); } else if (iph->ip_v != 4) { LOG("NIDSIP:%s %s - %d (iph->ip_v) != 4", pcapFilename, nids_warnings[errnum], iph->ip_v); } else if (ntohs(iph->ip_len) < iph->ip_hl << 2) { LOG("NIDSIP:%s %s - %d < %d (iph->ip_len < iph->ip_hl)", pcapFilename, nids_warnings[errnum], ntohs(iph->ip_len), iph->ip_hl << 2); } else { LOG("NIDSIP:%s %s - Length issue, was packet truncated?", pcapFilename, nids_warnings[errnum]); } } break; case NIDS_WARN_TCP: strcpy(saddr, int_ntoa(iph->ip_src.s_addr)); strcpy(daddr, int_ntoa(iph->ip_dst.s_addr)); if (errnum == NIDS_WARN_TCP_TOOMUCH || errnum == NIDS_WARN_TCP_BIGQUEUE) { /* ALW - Should do something with it */ } else if (errnum != NIDS_WARN_TCP_HDR) LOG("NIDSTCP:%s %s,from %s:%hu to %s:%hu", pcapFilename, nids_warnings[errnum], saddr, ntohs(((struct tcphdr *) data)->source), daddr, ntohs(((struct tcphdr *) data)->dest)); else LOG("NIDSTCP:%s %s,from %s to %s", pcapFilename, nids_warnings[errnum], saddr, daddr); break; default: LOG("NIDS: Unknown error type:%d errnum:%d", type, errnum); } count[errnum]++; if (count[errnum] == 100) { LOG("NIDS: No longer displaying above error"); } } /******************************************************************************/ /* When processing many pcap files we don't start the next file * until there are less then 20 outstanding es requests */ gboolean moloch_nids_next_file_gfunc (gpointer UNUSED(user_data)) { if (moloch_http_queue_length(esServer) > 20) return TRUE; moloch_nids_init_nids(); return FALSE; } /******************************************************************************/ /* Used when reading packets from an interface thru libnids/libpcap */ gboolean moloch_nids_interface_dispatch() { nids_dispatch(config.packetsPerPoll); return TRUE; } /******************************************************************************/ /* Used when reading packets from a file thru libnids/libpcap */ gboolean moloch_nids_file_dispatch() { // pause reading if too many waiting disk operations if (DLL_COUNT(mo_, &outputQ) > 10) { return TRUE; } // pause reading if too many waiting ES operations if (moloch_http_queue_length(esServer) > 100) { return TRUE; } int r = nids_dispatch(config.packetsPerPoll); // Some kind of failure, move to the next file or quit if (r <= 0) { if (config.pcapReadDir && moloch_nids_next_file()) { g_timeout_add(10, moloch_nids_next_file_gfunc, 0); return FALSE; } moloch_quit(); return FALSE; } return TRUE; } /******************************************************************************/ pcap_t * moloch_pcap_open_live(const char *source, int snaplen, int promisc, int to_ms, char *errbuf) { pcap_t *p; int status; p = pcap_create(source, errbuf); if (p == NULL) return (NULL); status = pcap_set_snaplen(p, snaplen); if (status < 0) goto fail; status = pcap_set_promisc(p, promisc); if (status < 0) goto fail; status = pcap_set_timeout(p, to_ms); if (status < 0) goto fail; status = pcap_set_buffer_size(p, config.pcapBufferSize); if (status < 0) goto fail; status = pcap_activate(p); if (status < 0) goto fail; status = pcap_setnonblock(p, TRUE, errbuf); if (status < 0) { pcap_close(p); return (NULL); } return (p); fail: if (status == PCAP_ERROR) snprintf(errbuf, PCAP_ERRBUF_SIZE, "%s: %s", source, pcap_geterr(p)); else if (status == PCAP_ERROR_NO_SUCH_DEVICE || status == PCAP_ERROR_PERM_DENIED) snprintf(errbuf, PCAP_ERRBUF_SIZE, "%s: %s (%s)", source, pcap_statustostr(status), pcap_geterr(p)); else snprintf(errbuf, PCAP_ERRBUF_SIZE, "%s: %s", source, pcap_statustostr(status)); pcap_close(p); return (NULL); } /******************************************************************************/ uint32_t moloch_nids_dropped_packets() { struct pcap_stat ps; if (nids_params.pcap_desc) { if (pcap_stats(nids_params.pcap_desc, &ps)) return 0; return ps.ps_drop - initialDropped; } return 0; } /******************************************************************************/ uint32_t moloch_nids_monitoring_sessions() { return HASH_COUNT(h_, sessions); } /******************************************************************************/ uint32_t moloch_nids_disk_queue() { return DLL_COUNT(mo_, &outputQ); } /******************************************************************************/ void moloch_nids_process_udp(MolochSession_t *session, struct udphdr *udphdr, unsigned char *data, int len) { if (session->port1 == 53 || session->port2 == 53) moloch_detect_dns(session, data, len); if (pluginsCbs & MOLOCH_PLUGIN_UDP) moloch_plugins_cb_udp(session, udphdr, data, len); } /******************************************************************************/ pcap_t *closeNextOpen = 0; int moloch_nids_next_file() { static GDir *pcapGDir[21]; static char *pcapBase[21]; static int pcapGDirLevel = -1; GError *error = 0; char errbuf[1024]; if (pcapGDirLevel == -1) { pcapGDirLevel = 0; pcapBase[0] = config.pcapReadDir; } if (!pcapGDir[pcapGDirLevel]) { pcapGDir[pcapGDirLevel] = g_dir_open(pcapBase[pcapGDirLevel], 0, &error); if (error) { LOG("ERROR: Couldn't open pcap directory: Receive Error: %s", error->message); exit(0); } } const gchar *filename; while (1) { filename = g_dir_read_name(pcapGDir[pcapGDirLevel]); // No more files, stop processing this directory if (!filename) { break; } // Skip hidden files/directories if (filename[0] == '.') continue; gchar *fullfilename; fullfilename = g_build_filename (pcapBase[pcapGDirLevel], filename, NULL); // If recursive option and a directory then process all the files in that dir if (config.pcapRecursive && g_file_test(fullfilename, G_FILE_TEST_IS_DIR)) { if (pcapGDirLevel >= 20) continue; pcapBase[pcapGDirLevel+1] = fullfilename; pcapGDirLevel++; return moloch_nids_next_file(); } // If it doesn't end with pcap we ignore it if (strcasecmp(".pcap", filename + strlen(filename)-5) != 0) { g_free(fullfilename); continue; } if (!realpath(fullfilename, offlinePcapFilename)) { g_free(fullfilename); continue; } LOG ("Processing %s", fullfilename); if (!config.copyPcap) { dumperFd = -1; } errbuf[0] = 0; if (nids_params.pcap_desc) closeNextOpen = nids_params.pcap_desc; nids_params.pcap_desc = pcap_open_offline(fullfilename, errbuf); if (!nids_params.pcap_desc) { LOG("Couldn't process '%s' error '%s'", fullfilename, errbuf); g_free(fullfilename); continue; } offlineFile = pcap_file(nids_params.pcap_desc); g_free(fullfilename); return 1; } g_dir_close(pcapGDir[pcapGDirLevel]); pcapGDir[pcapGDirLevel] = 0; if (pcapGDirLevel > 0) { g_free(pcapBase[pcapGDirLevel]); pcapGDirLevel--; return moloch_nids_next_file(); } return 0; } /******************************************************************************/ void moloch_nids_root_init() { char errbuf[1024]; if (config.pcapReadDir) { moloch_nids_next_file(); } else if (config.pcapReadFile) { nids_params.pcap_desc = pcap_open_offline(config.pcapReadFile, errbuf); if (nids_params.pcap_desc) { offlineFile = pcap_file(nids_params.pcap_desc); if (!realpath(config.pcapReadFile, offlinePcapFilename)) { LOG("ERROR - pcap open failed - Couldn't realpath file: '%s' with %d", config.pcapReadFile, errno); exit(1); } } } else { #ifdef SNF nids_params.pcap_desc = pcap_open_live(config.interface, 1600, 1, 500, errbuf); #else nids_params.pcap_desc = moloch_pcap_open_live(config.interface, 1600, 1, 500, errbuf); #endif } if (!nids_params.pcap_desc) { LOG("pcap open live failed! %s", errbuf); exit(1); } config.maxWriteBuffers = (config.pcapReadDir || config.pcapReadFile)?10:2000; } /******************************************************************************/ void moloch_nids_init_nids() { nids_unregister_tcp(moloch_nids_cb_tcp); nids_unregister_ip(moloch_nids_cb_ip); nids_init(); /* Have to do this after nids_init, libnids has issues */ if (closeNextOpen) { pcap_close(closeNextOpen); closeNextOpen = 0; } GVoidFunc dispatch; if (config.pcapReadDir || config.pcapReadFile) dispatch = (GVoidFunc)&moloch_nids_file_dispatch; else dispatch = (GVoidFunc)&moloch_nids_interface_dispatch; if (nids_getfd() == -1) { g_timeout_add(0, (GSourceFunc)dispatch, NULL); } else { moloch_watch_fd(nids_getfd(), MOLOCH_GIO_READ_COND, (MolochWatchFd_func)dispatch, NULL); } static struct nids_chksum_ctl ctl; ctl.netaddr = 0; ctl.mask = 0; ctl.action = NIDS_DONT_CHKSUM; nids_register_chksum_ctl(&ctl, 1); nids_register_tcp(moloch_nids_cb_tcp); nids_register_ip(moloch_nids_cb_ip); } /******************************************************************************/ void moloch_nids_init() { LOG("%s", pcap_lib_version()); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "tcp", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "udp", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "protocol:http", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "protocol:ssh", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "protocol:smtp", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "protocol:ftp", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "protocol:pop3", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "protocol:gh0st", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "protocol:dns", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "http:statuscode:200", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "http:statuscode:204", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "http:statuscode:301", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "http:statuscode:302", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "http:statuscode:304", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "http:statuscode:400", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "http:statuscode:404", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "http:statuscode:500", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "http:method:GET", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "http:method:POST", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "http:method:HEAD", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "http:content:application/octet-stream", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "http:content:text/plain", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "http:content:text/html", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "http:content:application/x-gzip", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "http:content:application/x-shockwave-flash", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "http:content:image/gif", NULL); moloch_db_get_tag(NULL, MOLOCH_FIELD_TAGS, "http:content:image/jpg", NULL); HASH_INIT(h_, sessions, moloch_nids_session_hash, moloch_nids_session_cmp); DLL_INIT(tcp_, &tcpWriteQ); DLL_INIT(q_, &tcpSessionQ); DLL_INIT(q_, &udpSessionQ); DLL_INIT(q_, &icmpSessionQ); DLL_INIT(mo_, &outputQ); nids_params.n_hosts = 1024; nids_params.tcp_workarounds = 1; nids_params.one_loop_less = 0; nids_params.scan_num_hosts = 0; nids_params.scan_num_ports = 0; nids_params.syslog = moloch_nids_syslog; nids_params.n_tcp_streams = config.maxStreams; if (config.bpf) nids_params.pcap_filter = config.bpf; moloch_nids_init_nids(); } /******************************************************************************/ void moloch_nids_exit() { config.exiting = 1; LOG("sessions: %d tcp: %d udp: %d icmp: %d", HASH_COUNT(h_, sessions), tcpSessionQ.q_count, udpSessionQ.q_count, icmpSessionQ.q_count); nids_unregister_tcp(moloch_nids_cb_tcp); nids_unregister_ip(moloch_nids_cb_ip); nids_exit(); MolochSession_t *hsession; HASH_FORALL_POP_HEAD(h_, sessions, hsession, moloch_db_save_session(hsession, TRUE); ); if (!config.dryRun && config.copyPcap) { moloch_nids_file_flush(TRUE); MOLOCH_SIZE_FREE(pcapbuf, output->buf); MOLOCH_TYPE_FREE(MolochOutput_t, output); // Write out all the buffers while (DLL_COUNT(mo_, &outputQ) > 0) { output = DLL_PEEK_HEAD(mo_, &outputQ); int len = write(output->fd, output->buf+output->pos, output->max - output->pos); if (len < 0) { LOG("ERROR - Write failed with %d %d\n", len, errno); exit (0); } output->pos += len; if (output->pos < output->max) { continue; } else { if (output->close) close(output->fd); MOLOCH_SIZE_FREE(pcapbuf, output->buf); DLL_REMOVE(mo_, &outputQ, output); MOLOCH_TYPE_FREE(MolochOutput_t, output); } } } }
sinan454/Sinan-opan
src/BuddyBox.c
// // BuddyBox.c // BuddyBox // // Created by <NAME> on 12/23/12. // Copyright (c) 2012 <NAME>. All rights reserved. // #include "BuddyBox.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> void initializeBuddyBox(BuddyBox *bb, unsigned int sampleRate) { int i; printf("BuddyBox:\tInitializing.\n"); bb->active = 1; bb->negativeShift = 0; bb->sampleRate = sampleRate; bb->input = SIGNAL_LOW; bb->lastInput = SIGNAL_LOW; bb->inputChannel = 0; bb->inputChannelCount = 0; bb->outputChannelCount = 0; bb->inputSampleCount = 0; bb->outputSampleCount = 0; bb->elapsedInputSampleCounts = 0; bb->maxElapsedInputSampleCount = 0; bb->lastInputEdgeSampleCount = 0; bb->inputSynchroFrameCount = 0; bb->badInputFrameCount = 0; bb->outputOverflowSampleCount = 0; for (i = 0; i < MAX_CHANNELS; i++) bb->inputChannelBuffer[i] = 0; for (i = 0; i < MAX_CHANNELS; i++) bb->outputChannelBuffer[i] = 0; bb->minInputSample = 0.0f; bb->maxInputSample = 0.0f; for (i = 0; i < MAX_CHANNELS; i++) bb->inputChannelValues[i] = 0.0f; allocateOutputOverflowBuffer(bb); } void allocateOutputOverflowBuffer(BuddyBox *bb) { bb->outputOverflowBufferSize = OVERFLOW_SAMPLES; bb->outputOverflowBuffer = (float *) malloc(bb->outputOverflowBufferSize * sizeof(float)); if(bb->outputOverflowBuffer == NULL) { printf("BuddyBox:\tCould Not Allocate Output Overflow Buffer.\n"); exit(1); } memset(bb->outputOverflowBuffer, 0, bb->outputOverflowBufferSize * sizeof(float)); } void readBufferIntoBuddyBoxInputChannelBuffer(BuddyBox *bb, float* buffer, unsigned int bufferSize) { float localMinSample, localMaxSample; unsigned int i, localMaxElapsedCount, localNegativeShift; detectBuddyBoxInputTimeout(bb, buffer, bufferSize); localMinSample = 0.0f; localMaxSample = 0.0f; localMaxElapsedCount = 0; localNegativeShift = 0; for (i = 0; bb->active && i < bufferSize; i++, bb->inputSampleCount++) { processBuddyBoxRawInput(bb, buffer[i]); localMinSample = getBuddyBoxLocalMinSample(buffer[i], localMinSample); localMaxSample = getBuddyBoxLocalMaxSample(buffer[i], localMaxSample); localMaxElapsedCount = getBuddyBoxLocalMaxElapsedInputSampleCount(bb, localMaxElapsedCount, bufferSize); localNegativeShift = getBuddyBoxLocalNegativeShift(bb, localMaxElapsedCount, buffer[i]); if (isBuddyBoxInputEdge(bb, buffer[i])) processBuddyBoxInputEdge(bb); } if (isBuddyBoxInputCalibrating(bb)) calibrateBuddyBoxInput(bb, localMinSample, localMaxSample, localMaxElapsedCount, localNegativeShift); } void detectBuddyBoxInputTimeout(BuddyBox *bb, float* buffer, unsigned int bufferSize) { unsigned int i; for (i = 0; i < bufferSize; i++) if (isBuddyBoxRawInputAboveNoiseThreshold(buffer[i])) return; if (!isBuddyBoxInputCalibrating(bb)) handleBuddyBoxInputTimeout(bb); } unsigned int isBuddyBoxRawInputAboveNoiseThreshold(float bufferSample) { return (getBuddyBoxSampleMagnitude(bufferSample) > SIGNAL_NOISE_THRESHOLD); } void handleBuddyBoxInputTimeout(BuddyBox *bb) { printf("BuddyBox:\tInput Timeout.\n"); disconnectBuddyBox(bb); } float getBuddyBoxSampleMagnitude(float sample) { return fabs(sample); } float getBuddyBoxLocalMinSample(float bufferSample, float localMinSample) { return (bufferSample < localMinSample) ? bufferSample : localMinSample; } float getBuddyBoxLocalMaxSample(float bufferSample, float localMaxSample) { return (bufferSample > localMaxSample) ? bufferSample : localMaxSample; } float getBuddyBoxLocalMaxElapsedInputSampleCount(BuddyBox *bb, unsigned int localMaxElapsedCount, unsigned int bufferSize) { return (bb->elapsedInputSampleCounts > localMaxElapsedCount && bb->elapsedInputSampleCounts < bufferSize) ? bb->elapsedInputSampleCounts : localMaxElapsedCount; } unsigned int getBuddyBoxLocalNegativeShift(BuddyBox *bb, unsigned int localMaxElapsedCount, float bufferSample) { return (localMaxElapsedCount > bb->maxElapsedInputSampleCount) ? (bufferSample > 0.0f) : bb->negativeShift; } void processBuddyBoxRawInput(BuddyBox *bb, float bufferSample) { bb->lastInput = bb->input; bb->input = isBuddyBoxRawInputHigh(bb, bufferSample) ? SIGNAL_HIGH : SIGNAL_LOW; } unsigned int isBuddyBoxInputEdge(BuddyBox *bb, float bufferSample) { return (bb->input != bb->lastInput); } unsigned int isBuddyBoxRawInputHigh(BuddyBox *bb, float bufferSample) { if (bb->negativeShift) return (isBuddyBoxRawInputAboveNoiseThreshold(bufferSample) && bufferSample < (bb->maxInputSample + bb->minInputSample) / 2); else return (isBuddyBoxRawInputAboveNoiseThreshold(bufferSample) && bufferSample > (bb->maxInputSample + bb->minInputSample) / 2); } void processBuddyBoxInputEdge(BuddyBox *bb) { updateBuddyBoxElapsedInputSampleCounts(bb); if (isBuddyBoxInputHigh(bb)) processHighBuddyBoxInput(bb); bb->lastInputEdgeSampleCount = bb->inputSampleCount; } void updateBuddyBoxElapsedInputSampleCounts(BuddyBox *bb) { if (bb->lastInputEdgeSampleCount > bb->inputSampleCount) bb->elapsedInputSampleCounts = bb->inputSampleCount + (MAXUINT - bb->lastInputEdgeSampleCount); else bb->elapsedInputSampleCounts = bb->inputSampleCount - bb->lastInputEdgeSampleCount; } unsigned int isBuddyBoxInputHigh(BuddyBox *bb) { return (bb->input == SIGNAL_HIGH); } void processHighBuddyBoxInput(BuddyBox *bb) { if (isBuddyBoxInputSynchroFrame(bb)) processBuddyBoxInputSynchroFrame(bb); else { if (isBuddyBoxInputChannelValid(bb)) storeBuddyBoxInputChannel(bb); else if (!isBuddyBoxInputCalibrating(bb)) handleInvalidBuddyBoxInputChannel(bb); targetNextBuddyBoxInputChannel(bb); } } unsigned int isBuddyBoxInputSynchroFrame(BuddyBox *bb) { return (bb->inputChannel >= MIN_CHANNELS && (bb->elapsedInputSampleCounts > bb->maxElapsedInputSampleCount / 2)); } void processBuddyBoxInputSynchroFrame(BuddyBox *bb) { bb->inputSynchroFrameCount++; if (!isBuddyBoxInputCalibrating(bb)) { if (!isBuddyBoxInputChannelCountValid(bb)) handleInvalidBuddyBoxInputChannelCount(bb); else processBuddyBoxInputFrame(bb); } else if (isBuddyBoxInputChannelValid(bb)) storeBuddyBoxInputChannelCount(bb); targetNextBuddyBoxInputFrame(bb); } unsigned int isBuddyBoxInputChannelCountValid(BuddyBox *bb) { return (bb->inputChannel == bb->inputChannelCount); } void storeBuddyBoxInputChannelCount(BuddyBox *bb) { bb->inputChannelCount = bb->inputChannel; } void handleInvalidBuddyBoxInputChannelCount(BuddyBox *bb) { bb->badInputFrameCount++; if (!isBuddyBoxInputViable(bb)) { printf("BuddyBox:\tInput Channel Count Changed from %d to %d.\n", bb->inputChannelCount, bb->inputChannel); disconnectBuddyBox(bb); } } unsigned int isBuddyBoxInputViable(BuddyBox *bb) { return (bb->badInputFrameCount < BAD_FRAME_THRESHOLD); } void targetNextBuddyBoxInputFrame(BuddyBox *bb) { bb->inputChannel = 0; } unsigned int isBuddyBoxInputChannelValid(BuddyBox *bb) { return (bb->inputChannel < MAX_CHANNELS); } void processBuddyBoxInputFrame(BuddyBox *bb) { unsigned int i, chanelDuration; for (i = 0; i < bb->inputChannelCount; i++) { chanelDuration = bb->inputChannelBuffer[i] * MICROSECONDS_PER_SECOND / bb->sampleRate; if (chanelDuration < CHANNEL_MIN_DURATION) bb->inputChannelValues[i] = 0.0f; else if (chanelDuration > CHANNEL_MAX_DURATION) bb->inputChannelValues[i] = 1.0f; else bb->inputChannelValues[i] = (float) (chanelDuration - CHANNEL_MIN_DURATION) / (CHANNEL_MAX_DURATION - CHANNEL_MIN_DURATION); } bb->badInputFrameCount = 0; } void storeBuddyBoxInputChannel(BuddyBox *bb) { bb->inputChannelBuffer[bb->inputChannel] = bb->elapsedInputSampleCounts; } void handleInvalidBuddyBoxInputChannel(BuddyBox *bb) { bb->badInputFrameCount++; if (!isBuddyBoxInputViable(bb)) { printf("BuddyBox:\tInvalid Input Channel Received.\n"); disconnectBuddyBox(bb); } targetNextBuddyBoxInputFrame(bb); } void targetNextBuddyBoxInputChannel(BuddyBox *bb) { bb->inputChannel++; } unsigned int isBuddyBoxInputCalibrating(BuddyBox *bb) { return (bb->inputSynchroFrameCount < CALIBRATION_FRAMES); } void calibrateBuddyBoxInput(BuddyBox *bb, float localMinSample, float localMaxSample, unsigned int localMaxElapsedCount, unsigned int localNegativeShift) { bb->minInputSample = localMinSample; bb->maxInputSample = localMaxSample; bb->maxElapsedInputSampleCount = localMaxElapsedCount; bb->negativeShift = localNegativeShift; } void setBuddyBoxOutputChannelValue(BuddyBox *bb, unsigned int channel, float channelValue) { unsigned int channelDuration; channelDuration = channelValue / 1.0f * (CHANNEL_MAX_DURATION - CHANNEL_MIN_DURATION) + CHANNEL_MIN_DURATION; setBuddyBoxOutputChannelDuration(bb, channel, channelDuration); } void setBuddyBoxOutputChannelDuration(BuddyBox *bb, unsigned int channel, unsigned int channelDuration) { if (channel < MAX_CHANNELS) { if (channelDuration > CHANNEL_MAX_DURATION) channelDuration = CHANNEL_MAX_DURATION; else if (channelDuration < CHANNEL_MIN_DURATION) channelDuration = CHANNEL_MIN_DURATION; bb->outputChannelBuffer[channel] = channelDuration * bb->sampleRate / MICROSECONDS_PER_SECOND; } } void writeBuddyBoxOutputChannelBufferIntoBuffer(BuddyBox *bb, float buffer[], unsigned int bufferSize) { unsigned int bufferSampleCount; bufferSampleCount = writeBuddyBoxOverflowBufferIntoBuffer(bb, buffer); while (bufferSampleCount < bufferSize) bufferSampleCount += writeBuddyBoxOutputChannelBufferIntoBufferFrame(bb, buffer, bufferSize, bufferSampleCount); } unsigned int writeBuddyBoxOverflowBufferIntoBuffer(BuddyBox *bb, float* buffer) { unsigned int i; for (i = 0; i < bb->outputOverflowSampleCount; i++) buffer[i] = bb->outputOverflowBuffer[i]; bb->outputOverflowSampleCount = 0; return i; } unsigned int writeBuddyBoxOutputChannelBufferIntoBufferFrame(BuddyBox *bb, float buffer[], unsigned int bufferSize, unsigned int bufferSampleCount) { unsigned int frameSampleCount; frameSampleCount = writeBuddyBoxOutputChannelBufferIntoBufferChannels(bb, buffer, bufferSize, bufferSampleCount); frameSampleCount += writeBuddyBoxOutputChannelBufferIntoBufferSynchro(bb, buffer, bufferSize, bufferSampleCount, frameSampleCount); return frameSampleCount; } unsigned int writeBuddyBoxOutputChannelBufferIntoBufferChannels(BuddyBox *bb, float buffer[], unsigned int bufferSize, unsigned int bufferSampleCount) { unsigned int channel, channelsSampleCount; channelsSampleCount = 0; for (channel = 0; channel < bb->outputChannelCount; channel++) channelsSampleCount += writeBuddyBoxOutputChannelBufferIntoBufferChannel(bb, buffer, bufferSize, bufferSampleCount, channelsSampleCount, channel); return channelsSampleCount; } unsigned int writeBuddyBoxOutputChannelBufferIntoBufferChannel(BuddyBox *bb, float buffer[], unsigned int bufferSize, unsigned int bufferSampleCount, unsigned int channelsSampleCount, unsigned int channel) { unsigned int channelSampleCount; channelSampleCount = writeBuddyBoxChannelSeperatorIntoBufferChannel(bb, buffer, bufferSize, bufferSampleCount + channelsSampleCount); channelSampleCount += writeBuddyBoxChannelDurationIntoBufferChannel(bb, buffer, bufferSize, bufferSampleCount + channelsSampleCount + channelSampleCount, bb->outputChannelBuffer[channel]); return channelSampleCount; } unsigned int writeBuddyBoxChannelSeperatorIntoBufferChannel(BuddyBox *bb, float buffer[], unsigned int bufferSize, unsigned int startBufferSample) { return writeBuddyBoxSignalsToBufferOrOverflowBuffer(bb, buffer, bufferSize, startBufferSample, 0, SEPARATOR_DURATION * bb->sampleRate / MICROSECONDS_PER_SECOND, SIGNAL_HIGH_FLOAT); } unsigned int writeBuddyBoxSignalsToBufferOrOverflowBuffer(BuddyBox *bb, float *buffer, unsigned int bufferSize, unsigned int startBufferSample, unsigned int comparatorOffset, unsigned int endBufferSampleOffset, float signal) { unsigned int i; for (i = 0; i + comparatorOffset < endBufferSampleOffset; i++) writeBuddyBoxSignalToBufferOrOverflowBuffer(bb, buffer, bufferSize, startBufferSample + i, signal); return i; } void writeBuddyBoxSignalToBufferOrOverflowBuffer(BuddyBox *bb, float buffer[], unsigned int bufferSize, unsigned int bufferSample, float signal) { if (bufferSample < bufferSize) writeBuddyBoxSignalToBuffer(bb, buffer, bufferSample, signal); else writeBuddyBoxSignalToOverflowBuffer(bb, bufferSample - bufferSize, signal); } void writeBuddyBoxSignalToBuffer(BuddyBox *bb, float buffer[], unsigned int bufferSample, float signal) { buffer[bufferSample] = signal; bb->outputSampleCount++; } void writeBuddyBoxSignalToOverflowBuffer(BuddyBox *bb, unsigned int bufferSample, float signal) { bb->outputOverflowBuffer[bufferSample] = signal; bb->outputOverflowSampleCount++; } unsigned int writeBuddyBoxChannelDurationIntoBufferChannel(BuddyBox *bb, float buffer[], unsigned int bufferSize, unsigned int startBufferSample, unsigned int endBufferSampleOffset) { return writeBuddyBoxSignalsToBufferOrOverflowBuffer(bb, buffer, bufferSize, startBufferSample, 0, endBufferSampleOffset, SIGNAL_LOW_FLOAT); } unsigned int writeBuddyBoxOutputChannelBufferIntoBufferSynchro(BuddyBox *bb, float buffer[], unsigned int bufferSize, unsigned int bufferSampleCount, unsigned int frameSampleCount) { unsigned int synchroSampleCount; synchroSampleCount = writeBuddyBoxChannelSeperatorIntoBufferChannel(bb, buffer, bufferSize, bufferSampleCount + frameSampleCount); synchroSampleCount += writeBuddyBoxSynchroIntoBufferSynchro(bb, buffer, bufferSize, bufferSampleCount + frameSampleCount + synchroSampleCount, frameSampleCount); return synchroSampleCount; } unsigned int writeBuddyBoxSynchroIntoBufferSynchro(BuddyBox *bb, float buffer[], unsigned int bufferSize, unsigned int startBufferSample, unsigned int comparatorOffset) { return writeBuddyBoxSignalsToBufferOrOverflowBuffer(bb, buffer, bufferSize, startBufferSample, comparatorOffset, bb->sampleRate * FRAME_DURATION / MICROSECONDS_PER_SECOND, SIGNAL_LOW_FLOAT); } void disconnectBuddyBox(BuddyBox *bb) { bb->active = 0; free(bb->outputOverflowBuffer); printf("BuddyBox:\tDisconnected.\n"); }
sinan454/Sinan-opan
src/main.c
<reponame>sinan454/Sinan-opan // // main.c // BuddyBox // // Created by <NAME> on 12/23/12. // Copyright (c) 2012 <NAME>. All rights reserved. // /* Modifications to integrate with foohid (c) 2016 by albhm */ #include "BuddyBoxThread.h" #include <signal.h> #include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <string.h> #include <IOKit/IOKitLib.h> static const unsigned int DEFAULT_SAMPLE_RATE = 96000; static unsigned int running = 1; /* alternative joystick report descriptor: 0x05, 0x01, // USAGE_PAGE (Generic Desktop) 0x09, 0x04, // USAGE (Joystick) 0xa1, 0x01, // COLLECTION (Application) 0x15, 0x81, // LOGICAL_MINIMUM (-127) 0x25, 0x7f, // LOGICAL_MAXIMUM (127) 0x05, 0x01, // USAGE_PAGE (Generic Desktop) 0x09, 0x01, // USAGE (Pointer) 0xa1, 0x00, // COLLECTION (Physical) 0x09, 0x30, // USAGE (X) 0x09, 0x31, // USAGE (Y) 0x09, 0x32, // USAGE (Ry) for throttle 1 0x09, 0x33, // USAGE (Rz) for throttle 2 0x75, 0x08, // REPORT_SIZE (8) 0x95, 0x04, // REPORT_COUNT (2) 0x81, 0x02, // INPUT (Data,Var,Abs) 0xc0, // END_COLLECTION 0x05, 0x09, // USAGE_PAGE (Button) 0x19, 0x01, // USAGE_MINIMUM (Button 1) 0x29, 0x08, // USAGE_MAXIMUM (Button 8) 0x15, 0x00, // LOGICAL_MINIMUM (0) 0x25, 0x01, // LOGICAL_MAXIMUM (1) 0x75, 0x01, // REPORT_SIZE (1) 0x95, 0x08, // REPORT_COUNT (8) 0x55, 0x00, // UNIT_EXPONENT (0) 0x65, 0x00, // UNIT (None) 0x81, 0x02, // INPUT (Data,Var,Abs) 0xc0 // END_COLLECTION */ unsigned char joy_reportdesc[] = { 0x05, 0x01, // USAGE_PAGE (Generic Desktop) 0x09, 0x04, // USAGE (Joystick) 0xa1, 0x01, // COLLECTION (Application) 0xa1, 0x00, // COLLECTION (Physical) 0x05, 0x01, // USAGE_PAGE (Generic Desktop) 0x09, 0x30, // USAGE (X) 0x09, 0x31, // USAGE (Y) 0x09, 0x32, // USAGE 0x09, 0x33, // USAGE 0x15, 0x81, // LOGICAL_MINIMUM (-127) 0x25, 0x7f, // LOGICAL_MAXIMUM (127) 0x75, 0x08, // REPORT_SIZE (8) 0x95, 0x04, // REPORT_COUNT (4) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x05, 0x09, // USAGE_PAGE (Button) 0x19, 0x01, // USAGE_MINIMUM (Button 1) 0x29, 0x08, // USAGE_MAXIMUM (Button 8) 0x15, 0x00, // LOGICAL_MINIMUM (0) 0x25, 0x01, // LOGICAL_MAXIMUM (1) 0x75, 0x01, // REPORT_SIZE (1) 0x95, 0x08, // REPORT_COUNT (8) 0x55, 0x00, // UNIT_EXPONENT (0) 0x65, 0x00, // UNIT (None) 0x81, 0x02, // INPUT (Data,Var,Abs) 0xc0, // END_COLLECTION 0xc0 // END_COLLECTION }; struct joystick_report_t { int8_t x; int8_t y; int8_t ry; int8_t rz; uint8_t buttons; }; #define SERVICE_NAME "it_unbit_foohid" #define FOOHID_CREATE 0 // create selector #define FOOHID_DESTROY 1 #define FOOHID_SEND 2 // send selector #define DEVICE_NAME "Foohid Virtual Joystick" #define DEVICE_SN "SN 123456" void intHandler(int sig) { running = 0; } void generateOutput(PASBuddyBox *pasBB) { unsigned int i, outputChannelCount; outputChannelCount = getBuddyBoxThreadInputChannelCount(pasBB); setBuddyBoxThreadOutputChannelCount(pasBB, outputChannelCount); for (i = 0; i < outputChannelCount; i++) setBuddyBoxThreadOutputChannelValue(pasBB, i, getBuddyBoxThreadInputChannelValue(pasBB, i)); } void displayInput(PASBuddyBox *pasBB) { unsigned int i, inputChannelCount; inputChannelCount = getBuddyBoxThreadInputChannelCount(pasBB); for (i = 0; i < inputChannelCount; i++) printf("%f\t", getBuddyBoxThreadInputChannelValue(pasBB, i)); printf("\n"); } void initVirtualJoystick () { } int main(int argc, const char * argv[]) { int testmode = 0; signal(SIGKILL, intHandler); signal(SIGINT, intHandler); PASBuddyBox pasBB; pasBB.sampleRate = DEFAULT_SAMPLE_RATE; pasBB.deviceChannel = 1; int opt=0; while ((opt = getopt(argc, (char * const *) argv, "tc")) != -1) { switch (opt) { case 't': testmode = 1; break; case 'c': pasBB.deviceChannel = 0; break; default: fprintf(stderr, "Usage: %s [-tc] [sample rate]\n", argv[0]); exit(1); } } if (optind < argc) pasBB.sampleRate = (unsigned int) strtol(argv[optind], NULL, 0); printf ("Usage: macPPM [-t(est) -c(hannel)] [sample rate] \n current sample rate: %d \n\n", pasBB.sampleRate); initializeBuddyBoxThread(&pasBB, testmode); printf ("\n"); // to set output apart from the deprecation warning of libportaudio //////// init joystick ////// io_iterator_t iterator; io_service_t service; io_connect_t connect; // Get a reference to the IOService kern_return_t ret = IOServiceGetMatchingServices(kIOMasterPortDefault, IOServiceMatching(SERVICE_NAME), &iterator); if (ret != KERN_SUCCESS) { printf("Unable to access IOService.\n"); exit(1); } // Iterate till success int found = 0; while ((service = IOIteratorNext(iterator)) != IO_OBJECT_NULL) { ret = IOServiceOpen(service, mach_task_self(), 0, &connect); if (ret == KERN_SUCCESS) { found = 1; break; } IOObjectRelease(service); } IOObjectRelease(iterator); if (!found) { printf("Unable to open IOService.\n"); exit(1); } //printf("size rep desc: %d .\n", sizeof(joy_reportdesc)); // Fill up the input arguments. uint32_t input_count = 8; uint64_t input[input_count]; input[0] = (uint64_t) strdup(DEVICE_NAME); // device name input[1] = strlen((char *)input[0]); // name length input[2] = (uint64_t) joy_reportdesc; // report descriptor input[3] = sizeof(joy_reportdesc); // report descriptor len input[4] = (uint64_t) strdup(DEVICE_SN); // serial number input[5] = strlen((char *)input[4]); // serial number len input[6] = (uint64_t) 2; // vendor ID input[7] = (uint64_t) 3; // device ID ret = IOConnectCallScalarMethod(connect, FOOHID_CREATE, input, input_count, NULL, 0); if (ret != KERN_SUCCESS) { printf("Unable to create HID device - hope that it exists already. \n"); // exit(1); } // Arguments to be passed through the HID message. struct joystick_report_t joy; uint32_t send_count = 4; uint64_t send[send_count]; send[0] = (uint64_t)input[0]; // device name send[1] = strlen((char *)input[0]); // name length send[2] = (uint64_t) &joy; // mouse struct send[3] = sizeof(struct joystick_report_t); // mouse struct len /////////////end init joystick//////////// while(running) { startBuddyBoxThread(&pasBB); while(running && isBuddyBoxThreadRunning(&pasBB)) { if (testmode) generateOutput(&pasBB); if (isBuddyBoxThreadCalibrated(&pasBB)) { if (testmode) { displayInput(&pasBB); unsigned int i, inputChannelCount; inputChannelCount = getBuddyBoxThreadInputChannelCount(&pasBB); for (i = 0; i < inputChannelCount; i++) printf("%f\t", getBuddyBoxThreadInputChannelValue(&pasBB, i)); printf("\n"); } // This is for a NineEagles J6 Pro Transmitter (6 channels); may need to adjust for other models joy.buttons = (getBuddyBoxThreadInputChannelValue(&pasBB, 4)>0.5) ? 1:0; joy.x = (getBuddyBoxThreadInputChannelValue(&pasBB, 0)-0.5) * 255; joy.y = (getBuddyBoxThreadInputChannelValue(&pasBB, 1)-0.5) * 255; joy.ry = (getBuddyBoxThreadInputChannelValue(&pasBB, 3)-0.5) * 255; joy.rz = (getBuddyBoxThreadInputChannelValue(&pasBB, 2)-0.5) * 255; ret = IOConnectCallScalarMethod(connect, FOOHID_SEND, send, send_count, NULL, 0); if (ret != KERN_SUCCESS) { printf("Unable to send message to HID device.\n"); } } usleep(20000); } stopBuddyBoxThread(&pasBB); joinBuddyBoxThread(&pasBB); } cleanupBuddyBoxThread(&pasBB); ret = IOConnectCallScalarMethod(connect, FOOHID_DESTROY, input,2,NULL,0); if (ret != KERN_SUCCESS) { printf("Unable to destroy HID device. \n"); } printf("Program Halted...\n"); }
sinan454/Sinan-opan
src/BuddyBoxThread.h
<reponame>sinan454/Sinan-opan // // BuddyBoxThread.h // BuddyBox-PPM // // Created by <NAME> on 1/10/13. // Copyright (c) 2013 <NAME>. All rights reserved. // #ifndef BuddyBox_PPM_BuddyBoxThread_h #define BuddyBox_PPM_BuddyBoxThread_h #include "PortAudioStream.h" #include "BuddyBox.h" #include <pthread.h> typedef struct { PortAudioStream pas; BuddyBox bb; pthread_t buddyBoxThread; unsigned int deviceChannel; unsigned int sampleRate; unsigned int running; unsigned int inputEnabled; unsigned int outputEnabled; } PASBuddyBox; void initializeBuddyBoxThread(PASBuddyBox *pasBB, int testmode); void startBuddyBoxThread(PASBuddyBox *pasBB); void stopBuddyBoxThread(PASBuddyBox *pasBB); void joinBuddyBoxThread(PASBuddyBox *pasBB); void cleanupBuddyBoxThread(PASBuddyBox *pasBB); void* runBuddyBoxThread(void *arguments); unsigned int isBuddyBoxThreadRunning(PASBuddyBox *pasBB); unsigned int isBuddyBoxThreadCalibrated(PASBuddyBox *pasBB); void setBuddyBoxThreadOutputChannelCount(PASBuddyBox *pasBB, unsigned int channelCount); void setBuddyBoxThreadOutputChannelValue(PASBuddyBox *pasBB, unsigned int channel, float channelValue); unsigned int getBuddyBoxThreadInputChannelCount(PASBuddyBox *pasBB); float getBuddyBoxThreadInputChannelValue(PASBuddyBox *pasBB, unsigned int channel); void disableBuddyBoxThreadInput(PASBuddyBox *pasBB); void enableBuddyBoxThreadInput(PASBuddyBox *pasBB); void disableBuddyBoxThreadOutput(PASBuddyBox *pasBB); void enableBuddyBoxThreadOutput(PASBuddyBox *pasBB); #endif
sinan454/Sinan-opan
src/PortAudioStream.c
// // PortAudioStream.c // BuddyBox // // Created by <NAME> on 12/23/12. // Copyright (c) 2012 <NAME>. All rights reserved. // #include "PortAudioStream.h" #include "pa_mac_core.h" #include <stdio.h> #include <stdlib.h> #include <string.h> void initializePortAudioStream(PortAudioStream *pas, unsigned int sampleRate, unsigned int deviceChannel ) { PaStreamParameters inputParameters, outputParameters; pas->sampleRate = sampleRate; allocatePortAudioStreamBuffer(pas); initializePortAudio(pas); configurePortAudioInputParameters(&inputParameters); configurePortAudioOutputParameters(&outputParameters); openPortAudioStream(pas, outputParameters, inputParameters, deviceChannel); } void allocatePortAudioStreamBuffer(PortAudioStream *pas) { pas->bufferSize = FRAMES_PER_BUFFER * NUM_CHANNELS; pas->bufferedSamples = (float *) malloc(pas->bufferSize * sizeof(float)); if(pas->bufferedSamples == NULL) { printf("PortAudioStream:\tCould Not Allocate Sample Buffer.\n"); exit(1); } memset(pas->bufferedSamples, 0, pas->bufferSize * sizeof(float)); } void initializePortAudio(PortAudioStream *pas) { PaError err; err = Pa_Initialize(); if(err != paNoError) handlePortAudioStreamInitializationError(pas, err); } void handlePortAudioStreamInitializationError(PortAudioStream *pas, PaError err) { terminatePortAudioStream(pas); fprintf(stderr, "PortAudioStream:\tAn error occured.\n"); fprintf(stderr, "Error number:\t%d\n", err); fprintf(stderr, "Error message:\t%s\n", Pa_GetErrorText(err)); exit(-1); } void terminatePortAudioStream(PortAudioStream *pas) { if(pas->stream) { Pa_AbortStream(pas->stream); Pa_CloseStream(pas->stream); } free(pas->bufferedSamples); Pa_Terminate(); } void configurePortAudioInputParameters(PaStreamParameters *inputParameters) { inputParameters->device = Pa_GetDefaultInputDevice(); inputParameters->channelCount = NUM_CHANNELS; inputParameters->sampleFormat = PA_SAMPLE_TYPE; inputParameters->suggestedLatency = Pa_GetDeviceInfo(inputParameters->device)->defaultHighInputLatency ; inputParameters->hostApiSpecificStreamInfo = NULL; } void configurePortAudioOutputParameters(PaStreamParameters *outputParameters) { outputParameters->device = Pa_GetDefaultOutputDevice(); outputParameters->channelCount = NUM_CHANNELS; outputParameters->sampleFormat = PA_SAMPLE_TYPE; outputParameters->suggestedLatency = Pa_GetDeviceInfo(outputParameters->device)->defaultHighOutputLatency; outputParameters->hostApiSpecificStreamInfo = NULL; } void openPortAudioStream(PortAudioStream *pas, PaStreamParameters outputParameters, PaStreamParameters inputParameters, unsigned int deviceChannel) { PaError err; PaMacCoreStreamInfo data; if (deviceChannel){ const SInt32 map[] = { 1, -1 }; // swap input channel (i.e. left/right) PaMacCore_SetupStreamInfo( &data, 0 ); // mit flag PaMacCore_GetChannelName statt 0 nur 'reale' sample rates moelich. weniger cpu mit 0 PaMacCore_SetupChannelMap(&data, map, 2 ); inputParameters.hostApiSpecificStreamInfo = &data; outputParameters.hostApiSpecificStreamInfo = &data; //error if not set for output as well } err = Pa_OpenStream( &pas->stream, &inputParameters, &outputParameters, pas->sampleRate, FRAMES_PER_BUFFER, paClipOff, // we won't output out of range samples so don't bother clipping them NULL, // no callback, use blocking API NULL // no callback, so no callback userData ); // for(int i=0; i<2; ++i ) // printf( "channel %d name: %s\n", i, PaMacCore_GetChannelName( PaMacCore_GetStreamInputDevice(&pas), 0, true ) ); //not working.... if(err != paNoError) handlePortAudioStreamInitializationError(pas, err); err = Pa_StartStream(pas->stream); if(err != paNoError) handlePortAudioStreamInitializationError(pas, err); } unsigned int readPortAudioStream(PortAudioStream *pas) { PaError err; err = Pa_ReadStream(pas->stream, pas->bufferedSamples, FRAMES_PER_BUFFER); if(err && CHECK_OVERFLOW) return handlePortAudioStreamFlowError(pas, err); else return 1; } unsigned int handlePortAudioStreamFlowError(PortAudioStream *pas, PaError err) { terminatePortAudioStream(pas); if(err & paInputOverflow) fprintf(stderr, "PortAudioStream:\tInput Overflow.\n"); if(err & paOutputUnderflow) fprintf(stderr, "PortAudioStream:\tOutput Underflow.\n"); return 0; } unsigned int writePortAudioStream(PortAudioStream *pas) { PaError err; err = Pa_WriteStream(pas->stream, pas->bufferedSamples, FRAMES_PER_BUFFER); if(err && CHECK_UNDERFLOW) return handlePortAudioStreamFlowError(pas, err); else return 1; } void closePortAudioStream(PortAudioStream *pas) { PaError err; err = Pa_StopStream(pas->stream); if(err != paNoError) handlePortAudioStreamInitializationError(pas, err); terminatePortAudioStream(pas); }
sinan454/Sinan-opan
src/PortAudioStream.h
<gh_stars>10-100 // // PortAudio.h // BuddyBox // // Created by <NAME> on 12/23/12. // Copyright (c) 2012 <NAME>. All rights reserved. // // Sample Rate Notes: // (glitchy) Line In @ 192kHz -> resolution of ~154 per channel // (glitchy) Line In @ 176.4kHz -> resolution of ~143 per channel // (glitchy) Line In @ 176.4kHz -> resolution of ~128 per channel // Line In @ 132.3kHz -> resolution of ~107 per channel // Line In @ 124.0kHz -> resolution of ~100 per channel // Line In @ 88.2kHz -> resolution of ~72 per channel // Line In @ 44.1kHz -> resolution of ~36 per channel #ifndef BuddyBox_PortAudio_h #define BuddyBox_PortAudio_h #include "portaudio.h" #define CHECK_OVERFLOW (0) // Not checking for overflow #define CHECK_UNDERFLOW (0) // Not checking for underflow #define PA_SAMPLE_TYPE paFloat32 static const unsigned int FRAMES_PER_BUFFER = 4096; static const unsigned int NUM_CHANNELS = 1; typedef struct { unsigned int sampleRate; float* bufferedSamples; unsigned int bufferSize; PaStream* stream; } PortAudioStream; void initializePortAudioStream(PortAudioStream *pas, unsigned int sampleRate, unsigned int deviceChannel); void allocatePortAudioStreamBuffer(PortAudioStream *pas); void initializePortAudio(PortAudioStream *pas); void handlePortAudioStreamInitializationError(PortAudioStream *pas, PaError err); void terminatePortAudioStream(PortAudioStream *pas); void configurePortAudioInputParameters(PaStreamParameters *inputParameters); void configurePortAudioOutputParameters(PaStreamParameters *outputParameters); void openPortAudioStream(PortAudioStream *pas, PaStreamParameters outputParameters, PaStreamParameters inputParameters, unsigned int deviceChannel); unsigned int readPortAudioStream(PortAudioStream *pas); unsigned int handlePortAudioStreamFlowError(PortAudioStream *pas, PaError err); unsigned int writePortAudioStream(PortAudioStream *pas); void closePortAudioStream(PortAudioStream *pas); #endif
Speqto-Technologies-pvt-ltd-public/BlockDX-master
src/xbridge/util/xutil.h
//***************************************************************************** //***************************************************************************** #ifndef UTIL_H #define UTIL_H #include "uint256.h" #include "logger.h" #include "xbridge/xbridgedef.h" #include <string> #include <boost/date_time/posix_time/ptime.hpp> #include <boost/date_time/posix_time/posix_time.hpp> //***************************************************************************** //***************************************************************************** namespace util { namespace bpt = boost::posix_time; void init(); std::wstring wide_string(std::string const & s);//, std::locale const &loc); // std::string narrow_string(std::wstring const &s, char default_char = '?');//, std::locale const &loc, char default_char = '?'); std::string mb_string(std::string const & s); std::string mb_string(std::wstring const & s); std::string base64_encode(const std::vector<unsigned char> & s); std::string base64_encode(const std::string & s); std::string base64_decode(const std::string & s); std::string to_str(const std::vector<unsigned char> & obj); template<class _T> std::string to_str(const _T & obj) { return util::base64_encode(std::string((const char *)(obj.begin()), (const char *)(obj.end()))); } /** * @brief iso8601 - converted boost posix time to string in ISO 8061 format * @param time - boost posix time * @return string in ISO 8061 format */ const std::string iso8601(const bpt::ptime &time); /** * @brief tranactionPrice - calculated transaction price in terms of bid price - toAmount/fromAmount * @param ptr - pointer to transaction description * @return price of transaction */ double price(const xbridge::TransactionDescrPtr ptr); /** * @brief priceAsk - the inverted price calculation. Used by asks to calculate price in terms of bid price. * askFromAmount/askToAmount. * @param ptr - pointer to transaction description * @return price of transaction */ double priceBid(const xbridge::TransactionDescrPtr ptr); boost::uint64_t timeToInt(const bpt::ptime &time); bpt::ptime intToTime(const uint64_t& number); double xBridgeValueFromAmount(uint64_t amount); uint64_t xBridgeAmountFromReal(double val); } // namespace #endif // UTIL_H
Speqto-Technologies-pvt-ltd-public/BlockDX-master
src/xbridge/xbridgeapp.h
//***************************************************************************** //***************************************************************************** #ifndef XBRIDGEAPP_H #define XBRIDGEAPP_H #include "xbridgesession.h" #include "xbridgepacket.h" #include "uint256.h" #include "xbridgetransactiondescr.h" #include "util/xbridgeerror.h" #include "xbridgewalletconnector.h" #include "xbridgedef.h" #include <thread> #include <atomic> #include <vector> #include <map> #include <tuple> #include <set> #include <queue> #ifdef WIN32 // #include <Ws2tcpip.h> #endif //***************************************************************************** //***************************************************************************** namespace xbridge { //***************************************************************************** //***************************************************************************** class App { class Impl; private: App(); virtual ~App(); public: static App & instance(); static std::string version(); static bool isEnabled(); bool init(int argc, char *argv[]); bool start(); bool stop(); public: // transactions TransactionDescrPtr transaction(const uint256 & id) const; std::map<uint256, xbridge::TransactionDescrPtr> transactions() const; std::map<uint256, xbridge::TransactionDescrPtr> history() const; void appendTransaction(const TransactionDescrPtr & ptr); void moveTransactionToHistory(const uint256 & id); Error sendXBridgeTransaction(const std::string & from, const std::string & fromCurrency, const uint64_t & fromAmount, const std::string & to, const std::string & toCurrency, const uint64_t & toAmount, uint256 & id, uint256& blockHash); // TODO make protected bool sendPendingTransaction(const TransactionDescrPtr & ptr); Error acceptXBridgeTransaction(const uint256 & id, const std::string & from, const std::string & to); xbridge::Error cancelXBridgeTransaction(const uint256 &id, const TxCancelReason &reason); void cancelMyXBridgeTransactions(); /** * @brief isValidAddress checks the correctness of the address * @param address checked address * @return true, if address valid */ bool isValidAddress(const std::string &address) const; /** * @brief checkAcceptParams checks the correctness of the parameters * @param id - id accepted transaction * @param ptr - smart pointer to accepted transaction * @return xbridge::SUCCESS, if all parameters valid */ xbridge::Error checkAcceptParams(const uint256 &id, TransactionDescrPtr &ptr); /** * @brief checkCreateParams - checks parameter needs to success created transaction * @param fromCurrency - from currency * @param toCurrency - to currency * @param fromAmount - amount * @return xbridge::SUCCES, if all parameters valid */ xbridge::Error checkCreateParams(const std::string &fromCurrency, const std::string &toCurrency, const uint64_t &fromAmount); /** * @brief checkAmount - checks wallet balance * @param currency - currency name * @param amount - amount * @return xbridge::SUCCES, if the session currency is open and * on account has sufficient funds for operations */ xbridge::Error checkAmount(const std::string &currency, const uint64_t &amount); public: // connectors /** * @brief availableCurrencies - list currencies available for the wallet * @return local currencies list */ std::vector<std::string> availableCurrencies() const; /** * @brief networkCurrencies - list currencies supported by the network * @return all currencies list */ std::vector<std::string> networkCurrencies() const; bool hasCurrency(const std::string & currency) const; void addConnector(const WalletConnectorPtr & conn); void updateConnector(const WalletConnectorPtr & conn, const std::vector<unsigned char> addr, const std::string & currency); WalletConnectorPtr connectorByCurrency(const std::string & currency) const; std::vector<WalletConnectorPtr> connectors() const; public: // network bool isKnownMessage(const std::vector<unsigned char> & message); void addToKnown(const std::vector<unsigned char> & message); // send messave via xbridge void sendPacket(const XBridgePacketPtr & packet); void sendPacket(const std::vector<unsigned char> & id, const XBridgePacketPtr & packet); // call when message from xbridge network received void onMessageReceived(const std::vector<unsigned char> & id, const std::vector<unsigned char> & message, CValidationState & state); // broadcast message void onBroadcastReceived(const std::vector<unsigned char> & message, CValidationState & state); bool processLater(const uint256 & txid, const XBridgePacketPtr & packet); bool removePackets(const uint256 & txid); private: std::unique_ptr<Impl> m_p; }; } // namespace xbridge #endif // XBRIDGEAPP_H
Speqto-Technologies-pvt-ltd-public/BlockDX-master
src/xbridge/bitcoinrpcconnector.h
//****************************************************************************** //****************************************************************************** #ifndef _BITCOINRPCCONNECTOR_H_ #define _BITCOINRPCCONNECTOR_H_ #include <vector> #include <string> #include <cstdint> //***************************************************************************** //***************************************************************************** namespace xbridge { //****************************************************************************** //****************************************************************************** namespace rpc { // helper fn-s bool storeDataIntoBlockchain(const std::vector<unsigned char> & dstAddress, const double amount, const std::vector<unsigned char> & data, std::string & txid); bool getDataFromTx(const std::string & txid, std::vector<unsigned char> & data); } // namespace rpc } // namespace xbridge #endif // _BITCOINRPCCONNECTOR_H_
Speqto-Technologies-pvt-ltd-public/BlockDX-master
src/xbridge/xbridgeexchange.h
<reponame>Speqto-Technologies-pvt-ltd-public/BlockDX-master<gh_stars>0 //***************************************************************************** //***************************************************************************** #ifndef XBRIDGEEXCHANGE_H #define XBRIDGEEXCHANGE_H #include "uint256.h" #include "xbridgetransaction.h" #include "xbridgewallet.h" #include <string> #include <set> #include <map> #include <list> #include <memory> #include <boost/cstdint.hpp> #include <boost/thread/mutex.hpp> //****************************************************************************** //****************************************************************************** namespace xbridge { //***************************************************************************** //***************************************************************************** class Exchange { class Impl; public: static Exchange & instance(); protected: Exchange(); ~Exchange(); public: bool init(); bool isEnabled(); bool isStarted(); // public-private keys (service node key pair) const std::vector<unsigned char> & pubKey() const; const std::vector<unsigned char> & privKey() const; bool haveConnectedWallet(const std::string & walletName); std::vector<std::string> connectedWallets() const; bool checkUtxoItems(const uint256 & txid, const std::vector<wallet::UtxoEntry> & items); bool getUtxoItems(const uint256 & txid, std::vector<wallet::UtxoEntry> & items); bool createTransaction(const uint256 & id, const std::vector<unsigned char> & sourceAddr, const std::string & sourceCurrency, const uint64_t & sourceAmount, const std::vector<unsigned char> & destAddr, const std::string & destCurrency, const uint64_t & destAmount, const uint64_t & timestamp, const std::vector<unsigned char> & mpubkey, const std::vector<wallet::UtxoEntry> & items, uint256 & blockHash, bool & isCreated); bool acceptTransaction(const uint256 & id, const std::vector<unsigned char> & sourceAddr, const std::string & sourceCurrency, const uint64_t & sourceAmount, const std::vector<unsigned char> & destAddr, const std::string & destCurrency, const uint64_t & destAmount, const std::vector<unsigned char> & mpubkey, const std::vector<wallet::UtxoEntry> & items); bool deletePendingTransaction(const uint256 & id); bool deleteTransaction(const uint256 & id); bool updateTransactionWhenHoldApplyReceived(const TransactionPtr & tx, const std::vector<unsigned char> & from); bool updateTransactionWhenInitializedReceived(const TransactionPtr & tx, const std::vector<unsigned char> & from, const uint256 & datatxid, const std::vector<unsigned char> & pk); bool updateTransactionWhenCreatedReceived(const TransactionPtr & tx, const std::vector<unsigned char> & from, const std::string & binTxId, const std::vector<unsigned char> & innerScript); bool updateTransactionWhenConfirmedReceived(const TransactionPtr & tx, const std::vector<unsigned char> & from); const TransactionPtr transaction(const uint256 & hash); const TransactionPtr pendingTransaction(const uint256 & hash); std::list<TransactionPtr> pendingTransactions() const; std::list<TransactionPtr> transactions() const; std::list<TransactionPtr> finishedTransactions() const; size_t eraseExpiredTransactions(); private: std::unique_ptr<Impl> m_p; }; } // namespace xbridge #endif // XBRIDGEEXCHANGE_H
jayesh15111988/JKEasyAFNetworking
JKEasyAFNetworking/NetworkingSourceGroup/JKURLConstants.h
// // JKURLConstants.h // JKEasyAFNetworking // // Created by <NAME> on 9/7/14. // Copyright (c) 2014 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> #warning Keep Base URL, URL extension, authorization token and Timeout interval etc. parameters in this file \ They are kept blank for reason. //Can be provided through interface @interface JKURLConstants : NSObject @end
jayesh15111988/JKEasyAFNetworking
JKEasyAFNetworking/Networking Demo/JKNetworkActivityDemoController.h
<filename>JKEasyAFNetworking/Networking Demo/JKNetworkActivityDemoController.h // // JKNetworkActivityDemoController.h // JKEasyAFNetworking // // Created by <NAME> on 9/7/14. // Copyright (c) 2014 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> @interface JKNetworkActivityDemoController : UIViewController @end
jayesh15111988/JKEasyAFNetworking
JKEasyAFNetworking/AppDelegate.h
// // AppDelegate.h // JKEasyAFNetworking // // Created by <NAME> on 9/7/14. // Copyright (c) 2014 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end
jayesh15111988/JKEasyAFNetworking
JKEasyAFNetworking/NetworkingSourceGroup/JKNetworkActivity.h
// // JKNetworkActivity.h // // // Created by <NAME> on 09/07/14. // Copyright (c) 2014 <NAME> All rights reserved. // #import <Foundation/Foundation.h> @interface JKNetworkActivity : NSObject -(id)initWithData:(NSDictionary*)dataToSend andAuthorizationToken:(NSString*)authorizationToken; -(void)communicateWithServerWithMethod:(NSInteger)method andIsFullURL:(BOOL)isFullURL andPathToAPI:(NSString*)pathToAPI andParameters:(NSDictionary*)parameters completion:(void (^)(id successResponse))completion failure:(void (^)(NSError * errorResponse))failure; @end
drinking/DKLightSideScrollView
Example/DKLightSideScrollView/DKAppDelegate.h
// // DKAppDelegate.h // DKLightSideScrollView // // Created by CocoaPods on 04/30/2015. // Copyright (c) 2014 drinking. All rights reserved. // #import <UIKit/UIKit.h> @interface DKAppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end
drinking/DKLightSideScrollView
Example/DKLightSideScrollView/Classess/DKLightSideScrollItemView.h
// // DKLightSideScrollItemView.h // DKLightSideScrollView // // Created by drinking on 15/4/30. // Copyright (c) 2015年 drinking. All rights reserved. // #import <UIKit/UIKit.h> @interface DKLightSideScrollItemView : UIView @end
drinking/DKLightSideScrollView
Pod/Classes/DKLightSideScrollView.h
// // DKLightSideScrollView.h // DKLightSideScrollView // // Created by drinking on 15/4/30. // Copyright (c) 2015年 drinking. All rights reserved. // #import <UIKit/UIKit.h> #import "DKLightSideScrollItemView.h" @class DKLightSideScrollView; @protocol DKLightSideScrollViewDelegate @optional - (void)scrollView:(DKLightSideScrollView *)scrollView didSelectItem:(DKLightSideScrollItemView *)item; @end @interface DKLightSideScrollView : UIView @property(nonatomic, strong) UIScrollView *scrollView; @property(nonatomic, strong) NSMutableArray *itemViews; @property (nonatomic, weak) id<DKLightSideScrollViewDelegate> delegate; @property (nonatomic, assign) CGFloat padding; @property (nonatomic, assign) CGFloat originX; - (void)addScrollItemView:(DKLightSideScrollItemView *)itemView; - (void)addScrollItemViews:(NSArray *)itemViews; - (void)removeScrollItemView:(DKLightSideScrollItemView *)itemView; @end
drinking/DKLightSideScrollView
Example/DKLightSideScrollView/DKViewController.h
// // DKViewController.h // DKLightSideScrollView // // Created by drinking on 04/30/2015. // Copyright (c) 2014 drinking. All rights reserved. // #import <UIKit/UIKit.h> @interface DKViewController : UIViewController @end
drinking/DKLightSideScrollView
Example/Pods/Headers/Public/DKLightSideScrollView/DKLightSideScrollItemView.h
// // DKLightSideScrollItemView.h // DKLightSideScrollView // // Created by drinking on 15/4/30. // Copyright (c) 2015年 drinking. All rights reserved. // #import <UIKit/UIKit.h> @interface DKLightSideScrollItemView : UIView -(void)triggerRemoveAnimation:(void (^)(void))animations completion:(void (^)(BOOL finished))completion; @end
nguquen/react-native-paged-contacts
ios/RCTPagedContacts/WXContactsManager.h
<reponame>nguquen/react-native-paged-contacts<filename>ios/RCTPagedContacts/WXContactsManager.h<gh_stars>0 // // WXContactManager.h // ContactsTest // // Created by <NAME> (Wix) on 23/11/2016. // Copyright © 2016 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> #import <Contacts/Contacts.h> NS_ASSUME_NONNULL_BEGIN @interface WXContactsManager : NSObject @property (nonatomic, copy) NSString* nameMatch; + (CNAuthorizationStatus)authorizationStatus; - (void)requestAccessWithCompletionHandler:(void (^)(BOOL granted, NSError* __nullable error))completionHandler; @property (nonatomic, readonly, assign) NSUInteger contactsCount; - (NSArray<CNContact*>*)contactsWithRange:(NSRange)range keysToFetch:(nullable NSArray<NSString*>*)keysToFetch; - (NSArray<CNContact*>*)contactsWithIdentifiers:(NSArray<NSString*>*)identifiers keysToFetch:(nullable NSArray<NSString*>*)keysToFetch; - (CNContact*)contactWithIdentifier:(NSString*)identifier keysToFetch:(nullable NSArray<NSString*>*)keysToFetch; @end NS_ASSUME_NONNULL_END
maxpowel/VoltMeter
VoltMeter.h
// // Created by alvaro on 26/07/15. // #ifndef PRUEBA_PLAT_VOLTMETER_H #define PRUEBA_PLAT_VOLTMETER_H #include "Arduino.h" class VoltMeter { private: int _readPin; float _r1; float _r2; float _referenceVoltage; public: VoltMeter(int readPin, float r1, float r2, float referenceVoltage=5); float getVoltage(); }; #endif //PRUEBA_PLAT_VOLTMETER_H
maxpowel/VoltMeter
examples/SimpleVolt/SimpleVolt.h
#include <VoltMeter.h> #define INPUT_PIN A0 #define R1 15000 #define R2 10000 #define REFERENCE 4.8 VoltMeter vm(INPUT_PIN, R1, R2, REFERENCE); void setup(){ Serial.begin(115200); } void loop() { Serial.println(vm.getVoltage()); }
d3cod3/FFTStream
src/ofApp.h
<filename>src/ofApp.h #pragma once #include "ofMain.h" #include "ofxImGui.h" #include "imgui_stdlib.h" #include "IconsFontAwesome5.h" #include "imgui_helpers.h" #include "AppTheme.h" #include "ofxOsc.h" #include <pwd.h> #include <unistd.h> #define PACKAGE "FFTStream" #define VERSION "0.0.1" #define DESCRIPTION "Soundfile player FFT extract and send via OSC" #define DEVELOPER "<NAME>" #define WINDOW_TITLE "FFTStream 0.0.1" #define MAIN_FONT "fonts/Roboto-Regular.ttf" #define RETINA_MIN_WIDTH 2560 #define RETINA_MIN_HEIGHT 1600 class ofApp : public ofBaseApp{ public: void setup(); void update(); void draw(); void keyPressed(int key); void keyReleased(int key); void mouseMoved(int x, int y ); void mouseDragged(int x, int y, int button); void mousePressed(int x, int y, int button); void mouseReleased(int x, int y, int button); void windowResized(int w, int h); void dragEvent(ofDragInfo dragInfo); // UTILS void initDataFolderFromBundle(); // BUNDLE std::filesystem::path userAppPath; string userHome; // GUI ofxImGui::Gui mainGUI; AppTheme* mainTheme; ofRectangle playerRect; string windowTitle; string currentSoundfile; bool isRetina; float scaleFactor; // SOUND PLAYER ofSoundPlayer soundfile; bool isPaused; bool isLoop; static constexpr size_t nBandsToGet = 513; std::array<float, nBandsToGet> fftSmoothed{{0}}; // OSC ofxOscSender sender; int port; };
d3cod3/FFTStream
src/imgui_helpers.h
/*============================================================================== Platype. Yet another commissioned custom made live audio-visual performer software. Copyright (c) 2020 <NAME> aka n3m3da <<EMAIL>> Platype is distributed under the MIT License. This gives everyone the freedoms to use Platype in any context: commercial or non-commercial, public or private, open or closed source. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ==============================================================================*/ #pragma once #include "ofMain.h" #include "ofxImGui.h" namespace ImGuiEx { //-------------------------------------------------------------- inline void drawOFTexture(ofTexture* tex, float& _tw, float& _th, float& posX, float& posY, float& drawW, float& drawH ){ if(tex->isAllocated()){ if(tex->getWidth()/tex->getHeight() >= _tw/_th){ if(tex->getWidth() > tex->getHeight()){ // horizontal texture drawW = _tw; drawH = (_tw/tex->getWidth())*tex->getHeight(); posX = 0; posY = (_th-drawH)/2.0f; }else{ // vertical texture drawW = (tex->getWidth()*_th)/tex->getHeight(); drawH = _th; posX = (_tw-drawW)/2.0f; posY = 0; } }else{ // always considered vertical texture drawW = (tex->getWidth()*_th)/tex->getHeight(); drawH = _th; posX = (_tw-drawW)/2.0f; posY = 0; } ImVec2 cursor_pos = ImGui::GetCursorPos(); ImGui::SetCursorPos(ImVec2(posX,posY)); ofxImGui::AddImage(*tex, ImVec2(drawW, drawH)); ImGui::SetCursorPos(cursor_pos); } } //-------------------------------------------------------------- inline void drawTimecode(ImDrawList* drawList, int seconds, std::string pre="", bool onDrawList=false, ImVec2 pos=ImVec2(0,0), float fontScale=1.0f){ int _hours = static_cast<int>(ceil(seconds)/3600); int _minutes = static_cast<int>(ceil(seconds)/60); int _seconds = static_cast<int>(round(seconds))%60; string _sh, _sm, _ss; if(_hours < 10){ _sh = "0"+ofToString(_hours); }else{ _sh = ofToString(_hours); } if(_minutes < 10){ _sm = "0"+ofToString(_minutes); }else{ _sm = ofToString(_minutes); } if(_seconds < 10){ _ss = "0"+ofToString(_seconds); }else{ _ss = ofToString(_seconds); } if(onDrawList){ char temp[256]; sprintf(temp,"%s %s:%s:%s", pre.c_str(), _sh.c_str(), _sm.c_str(), _ss.c_str()); drawList->AddText(ImGui::GetFont(), ImGui::GetFontSize()*fontScale, pos, IM_COL32_WHITE,temp, NULL, 0.0f); }else{ ImGui::Text("%s %s:%s:%s", pre.c_str(), _sh.c_str(), _sm.c_str(), _ss.c_str()); } } //-------------------------------------------------------------- static void HelpMarker(const char* desc){ ImGui::TextDisabled("(?)"); if (ImGui::IsItemHovered()){ ImGui::BeginTooltip(); ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); ImGui::TextUnformatted(desc); ImGui::PopTextWrapPos(); ImGui::EndTooltip(); } } }
damirbecirbasic/vgaPeriph
SDK/SDK_Workspace/my_peripheral_test/src/helloworld.c
<reponame>damirbecirbasic/vgaPeriph<filename>SDK/SDK_Workspace/my_peripheral_test/src/helloworld.c /* * Copyright (c) 2009-2012 Xilinx, Inc. All rights reserved. * * Xilinx, Inc. * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A * COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS * ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR * STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION * IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE * FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. * XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO * THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO * ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE * FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE. * */ /* * helloworld.c: simple test application * * This application configures UART 16550 to baud rate 9600. * PS7 UART (Zynq) is not initialized by this application, since * bootrom/bsp configures it to baud rate 115200 * * ------------------------------------------------ * | UART TYPE BAUD RATE | * ------------------------------------------------ * uartns550 9600 * uartlite Configurable only in HW design * ps7_uart 115200 (configured by bootrom/bsp) */ #include <stdio.h> #include "platform.h" #include "xparameters.h" #include "xio.h" int main () { unsigned int DataRead; unsigned int OldData; init_platform(); // Clear the screen xil_printf("%c[2J",27); OldData = (unsigned int) 0xffffffff; while(1) { // Read the state of the DIP switches DataRead = XIo_In32(XPAR_MY_PERIPHERAL_0_BASEADDR); // Send the data to the UART if the settings change if(DataRead != OldData) { xil_printf("DIP Switch settings: 0x%2X\r\n", DataRead); // Set the LED outputs to the DIP switch values XIo_Out32(XPAR_MY_PERIPHERAL_0_BASEADDR, DataRead); } // Record the DIP switch settings OldData = DataRead; } }
damirbecirbasic/vgaPeriph
drivers/vgaperiphmem_v1_00_a/src/vgaperiphmem.h
/***************************************************************************** * Filename: C:\Users\student\Desktop\ra68-2013\lprs\v04\vezba23_3_16/drivers/vgaperiphmem_v1_00_a/src/vgaperiphmem.h * Version: 1.00.a * Description: vgaperiphmem Driver Header File * Date: Thu Apr 07 11:22:53 2016 (by Create and Import Peripheral Wizard) *****************************************************************************/ #ifndef VGAPERIPHMEM_H #define VGAPERIPHMEM_H /***************************** Include Files *******************************/ #include "xbasic_types.h" #include "xstatus.h" #include "xil_io.h" /************************** Constant Definitions ***************************/ /** * User Logic Slave Space Offsets * -- SLV_REG0 : user logic slave module register 0 */ #define VGAPERIPHMEM_USER_SLV_SPACE_OFFSET (0x00000000) #define VGAPERIPHMEM_SLV_REG0_OFFSET (VGAPERIPHMEM_USER_SLV_SPACE_OFFSET + 0x00000000) /**************************** Type Definitions *****************************/ /***************** Macros (Inline Functions) Definitions *******************/ /** * * Write a value to a VGAPERIPHMEM register. A 32 bit write is performed. * If the component is implemented in a smaller width, only the least * significant data is written. * * @param BaseAddress is the base address of the VGAPERIPHMEM device. * @param RegOffset is the register offset from the base to write to. * @param Data is the data written to the register. * * @return None. * * @note * C-style signature: * void VGAPERIPHMEM_mWriteReg(Xuint32 BaseAddress, unsigned RegOffset, Xuint32 Data) * */ #define VGAPERIPHMEM_mWriteReg(BaseAddress, RegOffset, Data) \ Xil_Out32((BaseAddress) + (RegOffset), (Xuint32)(Data)) /** * * Read a value from a VGAPERIPHMEM register. A 32 bit read is performed. * If the component is implemented in a smaller width, only the least * significant data is read from the register. The most significant data * will be read as 0. * * @param BaseAddress is the base address of the VGAPERIPHMEM device. * @param RegOffset is the register offset from the base to write to. * * @return Data is the data from the register. * * @note * C-style signature: * Xuint32 VGAPERIPHMEM_mReadReg(Xuint32 BaseAddress, unsigned RegOffset) * */ #define VGAPERIPHMEM_mReadReg(BaseAddress, RegOffset) \ Xil_In32((BaseAddress) + (RegOffset)) /** * * Write/Read 32 bit value to/from VGAPERIPHMEM user logic slave registers. * * @param BaseAddress is the base address of the VGAPERIPHMEM device. * @param RegOffset is the offset from the slave register to write to or read from. * @param Value is the data written to the register. * * @return Data is the data from the user logic slave register. * * @note * C-style signature: * void VGAPERIPHMEM_mWriteSlaveRegn(Xuint32 BaseAddress, unsigned RegOffset, Xuint32 Value) * Xuint32 VGAPERIPHMEM_mReadSlaveRegn(Xuint32 BaseAddress, unsigned RegOffset) * */ #define VGAPERIPHMEM_mWriteSlaveReg0(BaseAddress, RegOffset, Value) \ Xil_Out32((BaseAddress) + (VGAPERIPHMEM_SLV_REG0_OFFSET) + (RegOffset), (Xuint32)(Value)) #define VGAPERIPHMEM_mReadSlaveReg0(BaseAddress, RegOffset) \ Xil_In32((BaseAddress) + (VGAPERIPHMEM_SLV_REG0_OFFSET) + (RegOffset)) /************************** Function Prototypes ****************************/ /** * * Run a self-test on the driver/device. Note this may be a destructive test if * resets of the device are performed. * * If the hardware system is not built correctly, this function may never * return to the caller. * * @param baseaddr_p is the base address of the VGAPERIPHMEM instance to be worked on. * * @return * * - XST_SUCCESS if all self-test code passed * - XST_FAILURE if any self-test code failed * * @note Caching must be turned off for this function to work. * @note Self test may fail if data memory and device are not on the same bus. * */ XStatus VGAPERIPHMEM_SelfTest(void * baseaddr_p); /** * Defines the number of registers available for read and write*/ #define TEST_AXI_LITE_USER_NUM_REG 1 #endif /** VGAPERIPHMEM_H */
damirbecirbasic/vgaPeriph
drivers/my_peripheral_v1_00_a/src/my_peripheral.c
<reponame>damirbecirbasic/vgaPeriph /***************************************************************************** * Filename: C:\materija\RA96-2013\LPRS2\vezba23_3_16/drivers/my_peripheral_v1_00_a/src/my_peripheral.c * Version: 1.00.a * Description: my_peripheral Driver Source File * Date: Thu Mar 24 11:13:38 2016 (by Create and Import Peripheral Wizard) *****************************************************************************/ /***************************** Include Files *******************************/ #include "my_peripheral.h" /************************** Function Definitions ***************************/
damirbecirbasic/vgaPeriph
drivers/vgaperiphmem_v1_00_a/src/vgaperiphmem.c
/***************************************************************************** * Filename: C:\Users\student\Desktop\ra68-2013\lprs\v04\vezba23_3_16/drivers/vgaperiphmem_v1_00_a/src/vgaperiphmem.c * Version: 1.00.a * Description: vgaperiphmem Driver Source File * Date: Thu Apr 07 11:22:53 2016 (by Create and Import Peripheral Wizard) *****************************************************************************/ /***************************** Include Files *******************************/ #include "vgaperiphmem.h" /************************** Function Definitions ***************************/
ChrisHughes24/lean4
stage0/stdlib/Lean/Compiler/IR/UnboxResult.c
<filename>stage0/stdlib/Lean/Compiler/IR/UnboxResult.c<gh_stars>1-10 // Lean compiler output // Module: Lean.Compiler.IR.UnboxResult // Imports: Init Lean.Data.Format Lean.Compiler.IR.Basic #include <lean/lean.h> #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wunused-label" #elif defined(__GNUC__) && !defined(__CLANG__) #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif #ifdef __cplusplus extern "C" { #endif extern lean_object* l_Lean_instInhabitedTagAttribute___closed__1; lean_object* l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_stringToMessageData(lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* lean_environment_find(lean_object*, lean_object*); lean_object* l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__2; lean_object* lean_st_ref_get(lean_object*, lean_object*); lean_object* l_Lean_getConstInfo___at_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3_(lean_object*); lean_object* l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__2; lean_object* l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3__match__1(lean_object*); lean_object* l_Lean_throwError___at_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_UnboxResult_unboxAttr; lean_object* l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__3; lean_object* l_Lean_throwError___at_Lean_AttributeImpl_erase___default___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_KernelException_toMessageData___closed__3; lean_object* l_Lean_getConstInfo___at_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_UnboxResult_hasUnboxAttr___boxed(lean_object*, lean_object*); uint8_t l_Lean_IR_UnboxResult_hasUnboxAttr(lean_object*, lean_object*); lean_object* l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__4; lean_object* l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__1; lean_object* l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__3; lean_object* l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__4; uint8_t l_Lean_TagAttribute_hasTag(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__2; lean_object* l_Lean_throwError___at_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__1; lean_object* l_Lean_registerTagAttribute(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3__match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkConst(lean_object*, lean_object*); lean_object* l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3__match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_1) == 5) { lean_object* x_4; lean_object* x_5; lean_dec(x_3); x_4 = lean_ctor_get(x_1, 0); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_dec(x_2); x_6 = lean_apply_1(x_3, x_1); return x_6; } } } lean_object* l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3__match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3__match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_throwError___at_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____spec__2(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; uint8_t x_7; x_5 = lean_ctor_get(x_2, 3); x_6 = l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1(x_1, x_2, x_3, x_4); x_7 = !lean_is_exclusive(x_6); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; x_8 = lean_ctor_get(x_6, 0); lean_inc(x_5); x_9 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_9, 0, x_5); lean_ctor_set(x_9, 1, x_8); lean_ctor_set_tag(x_6, 1); lean_ctor_set(x_6, 0, x_9); return x_6; } else { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_10 = lean_ctor_get(x_6, 0); x_11 = lean_ctor_get(x_6, 1); lean_inc(x_11); lean_inc(x_10); lean_dec(x_6); lean_inc(x_5); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_5); lean_ctor_set(x_12, 1, x_10); x_13 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_11); return x_13; } } } lean_object* l_Lean_getConstInfo___at_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; uint8_t x_6; x_5 = lean_st_ref_get(x_3, x_4); x_6 = !lean_is_exclusive(x_5); if (x_6 == 0) { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_7 = lean_ctor_get(x_5, 0); x_8 = lean_ctor_get(x_5, 1); x_9 = lean_ctor_get(x_7, 0); lean_inc(x_9); lean_dec(x_7); lean_inc(x_1); x_10 = lean_environment_find(x_9, x_1); if (lean_obj_tag(x_10) == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_free_object(x_5); x_11 = lean_box(0); x_12 = l_Lean_mkConst(x_1, x_11); x_13 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_13, 0, x_12); x_14 = l_Lean_throwUnknownConstant___rarg___closed__2; x_15 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_13); x_16 = l_Lean_KernelException_toMessageData___closed__3; x_17 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_17, 0, x_15); lean_ctor_set(x_17, 1, x_16); x_18 = l_Lean_throwError___at_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____spec__2(x_17, x_2, x_3, x_8); return x_18; } else { lean_object* x_19; lean_dec(x_1); x_19 = lean_ctor_get(x_10, 0); lean_inc(x_19); lean_dec(x_10); lean_ctor_set(x_5, 0, x_19); return x_5; } } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_20 = lean_ctor_get(x_5, 0); x_21 = lean_ctor_get(x_5, 1); lean_inc(x_21); lean_inc(x_20); lean_dec(x_5); x_22 = lean_ctor_get(x_20, 0); lean_inc(x_22); lean_dec(x_20); lean_inc(x_1); x_23 = lean_environment_find(x_22, x_1); if (lean_obj_tag(x_23) == 0) { lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; x_24 = lean_box(0); x_25 = l_Lean_mkConst(x_1, x_24); x_26 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_26, 0, x_25); x_27 = l_Lean_throwUnknownConstant___rarg___closed__2; x_28 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_28, 0, x_27); lean_ctor_set(x_28, 1, x_26); x_29 = l_Lean_KernelException_toMessageData___closed__3; x_30 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_30, 0, x_28); lean_ctor_set(x_30, 1, x_29); x_31 = l_Lean_throwError___at_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____spec__2(x_30, x_2, x_3, x_21); return x_31; } else { lean_object* x_32; lean_object* x_33; lean_dec(x_1); x_32 = lean_ctor_get(x_23, 0); lean_inc(x_32); lean_dec(x_23); x_33 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_33, 0, x_32); lean_ctor_set(x_33, 1, x_21); return x_33; } } } } static lean_object* _init_l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("constant must be an inductive type"); return x_1; } } static lean_object* _init_l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__1; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } static lean_object* _init_l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("recursive inductive datatypes are not supported"); return x_1; } } static lean_object* _init_l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__4() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__3; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } lean_object* l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_getConstInfo___at_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____spec__1(x_1, x_2, x_3, x_4); if (lean_obj_tag(x_5) == 0) { lean_object* x_6; x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); if (lean_obj_tag(x_6) == 5) { lean_object* x_7; uint8_t x_8; x_7 = lean_ctor_get(x_6, 0); lean_inc(x_7); lean_dec(x_6); x_8 = lean_ctor_get_uint8(x_7, sizeof(void*)*5); lean_dec(x_7); if (x_8 == 0) { uint8_t x_9; x_9 = !lean_is_exclusive(x_5); if (x_9 == 0) { lean_object* x_10; lean_object* x_11; x_10 = lean_ctor_get(x_5, 0); lean_dec(x_10); x_11 = lean_box(0); lean_ctor_set(x_5, 0, x_11); return x_5; } else { lean_object* x_12; lean_object* x_13; lean_object* x_14; x_12 = lean_ctor_get(x_5, 1); lean_inc(x_12); lean_dec(x_5); x_13 = lean_box(0); x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_12); return x_14; } } else { lean_object* x_15; lean_object* x_16; lean_object* x_17; x_15 = lean_ctor_get(x_5, 1); lean_inc(x_15); lean_dec(x_5); x_16 = l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__4; x_17 = l_Lean_throwError___at_Lean_AttributeImpl_erase___default___spec__1(x_16, x_2, x_3, x_15); return x_17; } } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_dec(x_6); x_18 = lean_ctor_get(x_5, 1); lean_inc(x_18); lean_dec(x_5); x_19 = l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__2; x_20 = l_Lean_throwError___at_Lean_AttributeImpl_erase___default___spec__1(x_19, x_2, x_3, x_18); return x_20; } } else { uint8_t x_21; x_21 = !lean_is_exclusive(x_5); if (x_21 == 0) { return x_5; } else { lean_object* x_22; lean_object* x_23; lean_object* x_24; x_22 = lean_ctor_get(x_5, 0); x_23 = lean_ctor_get(x_5, 1); lean_inc(x_23); lean_inc(x_22); lean_dec(x_5); x_24 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_24, 0, x_22); lean_ctor_set(x_24, 1, x_23); return x_24; } } } } static lean_object* _init_l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("unbox"); return x_1; } } static lean_object* _init_l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); x_2 = l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("compiler tries to unbox result values if their types are tagged with `[unbox]`"); return x_1; } } static lean_object* _init_l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__4() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___boxed), 4, 0); return x_1; } } lean_object* l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_2 = l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__2; x_3 = l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__3; x_4 = l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__4; x_5 = l_Lean_registerTagAttribute(x_2, x_3, x_4, x_1); return x_5; } } lean_object* l_Lean_throwError___at_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_throwError___at_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____spec__2(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); return x_5; } } lean_object* l_Lean_getConstInfo___at_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_getConstInfo___at_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____spec__1(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); return x_5; } } lean_object* l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); return x_5; } } uint8_t l_Lean_IR_UnboxResult_hasUnboxAttr(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; uint8_t x_4; x_3 = l_Lean_IR_UnboxResult_unboxAttr; x_4 = l_Lean_TagAttribute_hasTag(x_3, x_1, x_2); return x_4; } } lean_object* l_Lean_IR_UnboxResult_hasUnboxAttr___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l_Lean_IR_UnboxResult_hasUnboxAttr(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } lean_object* initialize_Init(lean_object*); lean_object* initialize_Lean_Data_Format(lean_object*); lean_object* initialize_Lean_Compiler_IR_Basic(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Compiler_IR_UnboxResult(lean_object* w) { lean_object * res; if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); _G_initialized = true; res = initialize_Init(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Data_Format(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Compiler_IR_Basic(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__1 = _init_l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__1(); lean_mark_persistent(l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__1); l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__2 = _init_l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__2(); lean_mark_persistent(l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__2); l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__3 = _init_l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__3(); lean_mark_persistent(l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__3); l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__4 = _init_l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__4(); lean_mark_persistent(l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____lambda__1___closed__4); l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__1 = _init_l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__1(); lean_mark_persistent(l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__1); l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__2 = _init_l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__2(); lean_mark_persistent(l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__2); l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__3 = _init_l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__3(); lean_mark_persistent(l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__3); l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__4 = _init_l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__4(); lean_mark_persistent(l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3____closed__4); res = l_Lean_IR_UnboxResult_initFn____x40_Lean_Compiler_IR_UnboxResult___hyg_3_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; l_Lean_IR_UnboxResult_unboxAttr = lean_io_result_get_value(res); lean_mark_persistent(l_Lean_IR_UnboxResult_unboxAttr); lean_dec_ref(res); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus } #endif
ChrisHughes24/lean4
stage0/stdlib/Lean/Meta/AbstractMVars.c
<filename>stage0/stdlib/Lean/Meta/AbstractMVars.c // Lean compiler output // Module: Lean.Meta.AbstractMVars // Imports: Init Lean.Meta.Basic #include <lean/lean.h> #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wunused-label" #elif defined(__GNUC__) && !defined(__CLANG__) #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif #ifdef __cplusplus extern "C" { #endif lean_object* l_Std_AssocList_contains___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__4___boxed(lean_object*, lean_object*); lean_object* lean_expr_update_forall(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Std_HashMapImp_find_x3f___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__1___boxed(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_beqAbstractMVarsResult____x40_Lean_Meta_AbstractMVars___hyg_41__match__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); size_t l_USize_add(size_t, size_t); lean_object* l_List_mapM___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__9(lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_instantiateMVars(lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* lean_array_uget(lean_object*, size_t); lean_object* l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars_match__1(lean_object*); lean_object* lean_expr_update_mdata(lean_object*, lean_object*); lean_object* l_Lean_Meta_openAbstractMVarsResult___boxed__const__1; lean_object* l_Std_mkHashMap___at_Lean_Meta_AbstractMVars_State_lmap___default___spec__1(lean_object*); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); extern lean_object* l_Array_empty___closed__1; uint8_t l_Lean_Level_hasMVar(lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); uint8_t lean_name_eq(lean_object*, lean_object*); uint8_t l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_beqAbstractMVarsResult____x40_Lean_Meta_AbstractMVars___hyg_41_(lean_object*, lean_object*); lean_object* l_Lean_Meta_AbstractMVars_State_emap___default___closed__1; lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* l_Std_AssocList_foldlM___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__7(lean_object*, lean_object*); lean_object* l_Lean_Meta_instInhabitedAbstractMVarsResult; lean_object* l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_AbstractMVars_State_lmap___default___closed__1; uint8_t l_USize_decLt(size_t, size_t); lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Std_HashMapImp_find_x3f___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__1(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___closed__1; lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_openAbstractMVarsResult___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_HashMapImp_insert___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Std_AssocList_find_x3f___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__2___boxed(lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Std_AssocList_replace___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__8(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_abstractMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_take(lean_object*, lean_object*); lean_object* l_Lean_Meta_AbstractMVars_abstractExprMVars(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___closed__2; lean_object* l_Lean_Meta_AbstractMVars_abstractExprMVars_match__2(lean_object*); lean_object* l_Std_HashMapImp_expand___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__5(lean_object*, lean_object*); lean_object* l_Std_AssocList_contains___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__4___boxed(lean_object*, lean_object*); lean_object* lean_level_update_max(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_mkArrow___closed__2; lean_object* l_Lean_Meta_instBEqAbstractMVarsResult___closed__1; lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_Std_mkHashMapImp___rarg(lean_object*); lean_object* lean_name_append_index_after(lean_object*, lean_object*); lean_object* l_Std_HashMapImp_find_x3f___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__1(lean_object*, lean_object*); size_t l_Lean_Name_hash(lean_object*); lean_object* l_Std_AssocList_replace___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__8(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_AbstractMVars_mkFreshId(lean_object*); uint8_t l_Std_AssocList_contains___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__4(lean_object*, lean_object*); lean_object* l_Lean_Meta_lambdaMetaTelescope(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_isEqvAux___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_beqAbstractMVarsResult____x40_Lean_Meta_AbstractMVars___hyg_41____spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_isEqvAux___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_beqAbstractMVarsResult____x40_Lean_Meta_AbstractMVars___hyg_41____spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_AbstractMVars_abstractExprMVars_match__1(lean_object*); lean_object* l_Std_HashMapImp_find_x3f___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__1___boxed(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_beqAbstractMVarsResult____x40_Lean_Meta_AbstractMVars___hyg_41__match__1(lean_object*); size_t lean_usize_modn(size_t, lean_object*); lean_object* l_Std_HashMapImp_moveEntries___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__6(lean_object*, lean_object*, lean_object*); lean_object* lean_expr_update_let(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkFVar(lean_object*); uint8_t l_Lean_Expr_Data_binderInfo(uint64_t); lean_object* l_Std_AssocList_find_x3f___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__2(lean_object*, lean_object*); size_t lean_usize_of_nat(lean_object*); lean_object* lean_expr_update_proj(lean_object*, lean_object*); uint8_t l_Std_AssocList_contains___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__4(lean_object*, lean_object*); lean_object* l_Lean_Meta_AbstractMVars_State_emap___default; lean_object* l_Std_HashMapImp_moveEntries___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__6(lean_object*, lean_object*, lean_object*); lean_object* lean_local_ctx_mk_local_decl(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t); lean_object* l_Lean_Meta_abstractMVars_match__1___rarg(lean_object*, lean_object*); lean_object* lean_level_update_imax(lean_object*, lean_object*, lean_object*); lean_object* l_Std_AssocList_find_x3f___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__2(lean_object*, lean_object*); lean_object* l_Std_HashMapImp_expand___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__5(lean_object*, lean_object*); lean_object* l_Lean_Meta_AbstractMVars_State_nextParamIdx___default; lean_object* l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars_match__2(lean_object*); uint8_t lean_expr_eqv(lean_object*, lean_object*); lean_object* lean_expr_update_sort(lean_object*, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); uint8_t l_Lean_Expr_hasMVar(lean_object*); uint8_t l_Lean_Name_isAnonymous(lean_object*); extern lean_object* l_Lean_instInhabitedExpr___closed__1; lean_object* l_Std_mkHashMap___at_Lean_Meta_AbstractMVars_State_emap___default___spec__1(lean_object*); lean_object* l_Lean_LocalContext_mkLambda(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_abstractMVars_match__1(lean_object*); lean_object* lean_nat_mul(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_beqAbstractMVarsResult____x40_Lean_Meta_AbstractMVars___hyg_41__match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_instInhabitedAbstractMVarsResult___closed__1; lean_object* l_Lean_Meta_AbstractMVars_State_lmap___default; lean_object* lean_expr_update_lambda(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* lean_name_mk_numeral(lean_object*, lean_object*); lean_object* lean_level_update_succ(lean_object*, lean_object*); lean_object* l_Lean_Meta_openAbstractMVarsResult(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_beqAbstractMVarsResult____x40_Lean_Meta_AbstractMVars___hyg_41____boxed(lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_getLevelDepth(lean_object*, lean_object*); lean_object* l_Lean_Meta_instantiateMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_mk_array(lean_object*, lean_object*); lean_object* l_Lean_Meta_instBEqAbstractMVarsResult; extern lean_object* l_Std_HashMap_instInhabitedHashMap___closed__1; lean_object* l_Lean_Meta_AbstractMVars_abstractExprMVars_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_openAbstractMVarsResult___spec__1(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_instantiateLevelParamsCore_visit___at_Lean_Expr_instantiateLevelParamsArray___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_AbstractMVars_abstractExprMVars_match__3___rarg(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_Std_AssocList_find_x3f___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Std_AssocList_foldlM___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__7(lean_object*, lean_object*); lean_object* l_Lean_Meta_mkFreshLevelMVar___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_AbstractMVars_abstractExprMVars_match__3(lean_object*); lean_object* l_Lean_Meta_AbstractMVars_State_paramNames___default; lean_object* l_Lean_MetavarContext_getDecl(lean_object*, lean_object*); lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkLevelParam(lean_object*); lean_object* lean_expr_update_app(lean_object*, lean_object*, lean_object*); lean_object* l_Std_HashMapImp_insert___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_setMCtx(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars_match__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_AbstractMVars_abstractExprMVars_match__2___rarg(lean_object*, lean_object*); lean_object* l_Lean_Meta_AbstractMVars_State_fvars___default; lean_object* lean_expr_update_const(lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); static lean_object* _init_l_Lean_Meta_instInhabitedAbstractMVarsResult___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l_Array_empty___closed__1; x_2 = lean_unsigned_to_nat(0u); x_3 = l_Lean_instInhabitedExpr___closed__1; x_4 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_4, 0, x_1); lean_ctor_set(x_4, 1, x_2); lean_ctor_set(x_4, 2, x_3); return x_4; } } static lean_object* _init_l_Lean_Meta_instInhabitedAbstractMVarsResult() { _start: { lean_object* x_1; x_1 = l_Lean_Meta_instInhabitedAbstractMVarsResult___closed__1; return x_1; } } lean_object* l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_beqAbstractMVarsResult____x40_Lean_Meta_AbstractMVars___hyg_41__match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); x_6 = lean_ctor_get(x_1, 1); lean_inc(x_6); x_7 = lean_ctor_get(x_1, 2); lean_inc(x_7); lean_dec(x_1); x_8 = lean_ctor_get(x_2, 0); lean_inc(x_8); x_9 = lean_ctor_get(x_2, 1); lean_inc(x_9); x_10 = lean_ctor_get(x_2, 2); lean_inc(x_10); lean_dec(x_2); x_11 = lean_apply_6(x_3, x_5, x_6, x_7, x_8, x_9, x_10); return x_11; } } lean_object* l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_beqAbstractMVarsResult____x40_Lean_Meta_AbstractMVars___hyg_41__match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_beqAbstractMVarsResult____x40_Lean_Meta_AbstractMVars___hyg_41__match__1___rarg___boxed), 4, 0); return x_2; } } lean_object* l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_beqAbstractMVarsResult____x40_Lean_Meta_AbstractMVars___hyg_41__match__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_beqAbstractMVarsResult____x40_Lean_Meta_AbstractMVars___hyg_41__match__1___rarg(x_1, x_2, x_3, x_4); lean_dec(x_4); return x_5; } } uint8_t l_Array_isEqvAux___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_beqAbstractMVarsResult____x40_Lean_Meta_AbstractMVars___hyg_41____spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; uint8_t x_8; x_7 = lean_array_get_size(x_4); x_8 = lean_nat_dec_lt(x_6, x_7); lean_dec(x_7); if (x_8 == 0) { uint8_t x_9; lean_dec(x_6); x_9 = 1; return x_9; } else { lean_object* x_10; lean_object* x_11; uint8_t x_12; x_10 = lean_array_fget(x_4, x_6); x_11 = lean_array_fget(x_5, x_6); x_12 = lean_name_eq(x_10, x_11); lean_dec(x_11); lean_dec(x_10); if (x_12 == 0) { uint8_t x_13; lean_dec(x_6); x_13 = 0; return x_13; } else { lean_object* x_14; lean_object* x_15; x_14 = lean_unsigned_to_nat(1u); x_15 = lean_nat_add(x_6, x_14); lean_dec(x_6); x_3 = lean_box(0); x_6 = x_15; goto _start; } } } } uint8_t l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_beqAbstractMVarsResult____x40_Lean_Meta_AbstractMVars___hyg_41_(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; x_3 = lean_ctor_get(x_1, 0); x_4 = lean_ctor_get(x_1, 1); x_5 = lean_ctor_get(x_1, 2); x_6 = lean_ctor_get(x_2, 0); x_7 = lean_ctor_get(x_2, 1); x_8 = lean_ctor_get(x_2, 2); x_9 = lean_array_get_size(x_3); x_10 = lean_array_get_size(x_6); x_11 = lean_nat_dec_eq(x_9, x_10); lean_dec(x_10); lean_dec(x_9); if (x_11 == 0) { uint8_t x_12; x_12 = 0; return x_12; } else { lean_object* x_13; uint8_t x_14; x_13 = lean_unsigned_to_nat(0u); x_14 = l_Array_isEqvAux___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_beqAbstractMVarsResult____x40_Lean_Meta_AbstractMVars___hyg_41____spec__1(x_3, x_6, lean_box(0), x_3, x_6, x_13); if (x_14 == 0) { uint8_t x_15; x_15 = 0; return x_15; } else { uint8_t x_16; x_16 = lean_nat_dec_eq(x_4, x_7); if (x_16 == 0) { uint8_t x_17; x_17 = 0; return x_17; } else { uint8_t x_18; x_18 = lean_expr_eqv(x_5, x_8); return x_18; } } } } } lean_object* l_Array_isEqvAux___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_beqAbstractMVarsResult____x40_Lean_Meta_AbstractMVars___hyg_41____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: { uint8_t x_7; lean_object* x_8; x_7 = l_Array_isEqvAux___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_beqAbstractMVarsResult____x40_Lean_Meta_AbstractMVars___hyg_41____spec__1(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); x_8 = lean_box(x_7); return x_8; } } lean_object* l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_beqAbstractMVarsResult____x40_Lean_Meta_AbstractMVars___hyg_41____boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_beqAbstractMVarsResult____x40_Lean_Meta_AbstractMVars___hyg_41_(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } static lean_object* _init_l_Lean_Meta_instBEqAbstractMVarsResult___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_beqAbstractMVarsResult____x40_Lean_Meta_AbstractMVars___hyg_41____boxed), 2, 0); return x_1; } } static lean_object* _init_l_Lean_Meta_instBEqAbstractMVarsResult() { _start: { lean_object* x_1; x_1 = l_Lean_Meta_instBEqAbstractMVarsResult___closed__1; return x_1; } } static lean_object* _init_l_Lean_Meta_AbstractMVars_State_nextParamIdx___default() { _start: { lean_object* x_1; x_1 = lean_unsigned_to_nat(0u); return x_1; } } static lean_object* _init_l_Lean_Meta_AbstractMVars_State_paramNames___default() { _start: { lean_object* x_1; x_1 = l_Array_empty___closed__1; return x_1; } } static lean_object* _init_l_Lean_Meta_AbstractMVars_State_fvars___default() { _start: { lean_object* x_1; x_1 = l_Array_empty___closed__1; return x_1; } } lean_object* l_Std_mkHashMap___at_Lean_Meta_AbstractMVars_State_lmap___default___spec__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Std_mkHashMapImp___rarg(x_1); return x_2; } } static lean_object* _init_l_Lean_Meta_AbstractMVars_State_lmap___default___closed__1() { _start: { lean_object* x_1; lean_object* x_2; x_1 = lean_unsigned_to_nat(8u); x_2 = l_Std_mkHashMapImp___rarg(x_1); return x_2; } } static lean_object* _init_l_Lean_Meta_AbstractMVars_State_lmap___default() { _start: { lean_object* x_1; x_1 = l_Lean_Meta_AbstractMVars_State_lmap___default___closed__1; return x_1; } } lean_object* l_Std_mkHashMap___at_Lean_Meta_AbstractMVars_State_emap___default___spec__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Std_mkHashMapImp___rarg(x_1); return x_2; } } static lean_object* _init_l_Lean_Meta_AbstractMVars_State_emap___default___closed__1() { _start: { lean_object* x_1; lean_object* x_2; x_1 = lean_unsigned_to_nat(8u); x_2 = l_Std_mkHashMapImp___rarg(x_1); return x_2; } } static lean_object* _init_l_Lean_Meta_AbstractMVars_State_emap___default() { _start: { lean_object* x_1; x_1 = l_Lean_Meta_AbstractMVars_State_emap___default___closed__1; return x_1; } } lean_object* l_Lean_Meta_AbstractMVars_mkFreshId(lean_object* x_1) { _start: { uint8_t x_2; x_2 = !lean_is_exclusive(x_1); if (x_2 == 0) { lean_object* x_3; uint8_t x_4; x_3 = lean_ctor_get(x_1, 0); x_4 = !lean_is_exclusive(x_3); if (x_4 == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_5 = lean_ctor_get(x_3, 0); x_6 = lean_ctor_get(x_3, 1); lean_inc(x_6); lean_inc(x_5); x_7 = lean_name_mk_numeral(x_5, x_6); x_8 = lean_unsigned_to_nat(1u); x_9 = lean_nat_add(x_6, x_8); lean_dec(x_6); lean_ctor_set(x_3, 1, x_9); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_7); lean_ctor_set(x_10, 1, x_1); return x_10; } else { 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; x_11 = lean_ctor_get(x_3, 0); x_12 = lean_ctor_get(x_3, 1); lean_inc(x_12); lean_inc(x_11); lean_dec(x_3); lean_inc(x_12); lean_inc(x_11); x_13 = lean_name_mk_numeral(x_11, x_12); x_14 = lean_unsigned_to_nat(1u); x_15 = lean_nat_add(x_12, x_14); lean_dec(x_12); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_11); lean_ctor_set(x_16, 1, x_15); lean_ctor_set(x_1, 0, x_16); x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_13); lean_ctor_set(x_17, 1, x_1); return x_17; } } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; x_18 = lean_ctor_get(x_1, 0); x_19 = lean_ctor_get(x_1, 1); x_20 = lean_ctor_get(x_1, 2); x_21 = lean_ctor_get(x_1, 3); x_22 = lean_ctor_get(x_1, 4); x_23 = lean_ctor_get(x_1, 5); x_24 = lean_ctor_get(x_1, 6); x_25 = lean_ctor_get(x_1, 7); lean_inc(x_25); lean_inc(x_24); lean_inc(x_23); lean_inc(x_22); lean_inc(x_21); lean_inc(x_20); lean_inc(x_19); lean_inc(x_18); lean_dec(x_1); x_26 = lean_ctor_get(x_18, 0); lean_inc(x_26); x_27 = lean_ctor_get(x_18, 1); lean_inc(x_27); if (lean_is_exclusive(x_18)) { lean_ctor_release(x_18, 0); lean_ctor_release(x_18, 1); x_28 = x_18; } else { lean_dec_ref(x_18); x_28 = lean_box(0); } lean_inc(x_27); lean_inc(x_26); x_29 = lean_name_mk_numeral(x_26, x_27); x_30 = lean_unsigned_to_nat(1u); x_31 = lean_nat_add(x_27, x_30); lean_dec(x_27); if (lean_is_scalar(x_28)) { x_32 = lean_alloc_ctor(0, 2, 0); } else { x_32 = x_28; } lean_ctor_set(x_32, 0, x_26); lean_ctor_set(x_32, 1, x_31); x_33 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_33, 0, x_32); lean_ctor_set(x_33, 1, x_19); lean_ctor_set(x_33, 2, x_20); lean_ctor_set(x_33, 3, x_21); lean_ctor_set(x_33, 4, x_22); lean_ctor_set(x_33, 5, x_23); lean_ctor_set(x_33, 6, x_24); lean_ctor_set(x_33, 7, x_25); x_34 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_34, 0, x_29); lean_ctor_set(x_34, 1, x_33); return x_34; } } } lean_object* l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars_match__1___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___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars_match__1___rarg), 3, 0); return x_2; } } lean_object* l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars_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, lean_object* x_7) { _start: { switch (lean_obj_tag(x_1)) { case 0: { uint64_t x_8; lean_object* x_9; lean_object* x_10; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_8 = lean_ctor_get_uint64(x_1, 0); lean_dec(x_1); x_9 = lean_box_uint64(x_8); x_10 = lean_apply_1(x_2, x_9); return x_10; } case 1: { lean_object* x_11; uint64_t x_12; lean_object* x_13; lean_object* x_14; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); x_11 = lean_ctor_get(x_1, 0); lean_inc(x_11); x_12 = lean_ctor_get_uint64(x_1, sizeof(void*)*1); lean_dec(x_1); x_13 = lean_box_uint64(x_12); x_14 = lean_apply_2(x_4, x_11, x_13); return x_14; } case 2: { lean_object* x_15; lean_object* x_16; uint64_t x_17; lean_object* x_18; lean_object* x_19; lean_dec(x_7); lean_dec(x_6); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_15 = lean_ctor_get(x_1, 0); lean_inc(x_15); x_16 = lean_ctor_get(x_1, 1); lean_inc(x_16); x_17 = lean_ctor_get_uint64(x_1, sizeof(void*)*2); lean_dec(x_1); x_18 = lean_box_uint64(x_17); x_19 = lean_apply_3(x_5, x_15, x_16, x_18); return x_19; } case 3: { lean_object* x_20; lean_object* x_21; uint64_t x_22; lean_object* x_23; lean_object* x_24; lean_dec(x_7); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_20 = lean_ctor_get(x_1, 0); lean_inc(x_20); x_21 = lean_ctor_get(x_1, 1); lean_inc(x_21); x_22 = lean_ctor_get_uint64(x_1, sizeof(void*)*2); lean_dec(x_1); x_23 = lean_box_uint64(x_22); x_24 = lean_apply_3(x_6, x_20, x_21, x_23); return x_24; } case 4: { lean_object* x_25; uint64_t x_26; lean_object* x_27; lean_object* x_28; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); x_25 = lean_ctor_get(x_1, 0); lean_inc(x_25); x_26 = lean_ctor_get_uint64(x_1, sizeof(void*)*1); lean_dec(x_1); x_27 = lean_box_uint64(x_26); x_28 = lean_apply_2(x_3, x_25, x_27); return x_28; } default: { lean_object* x_29; uint64_t x_30; lean_object* x_31; lean_object* x_32; lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_29 = lean_ctor_get(x_1, 0); lean_inc(x_29); x_30 = lean_ctor_get_uint64(x_1, sizeof(void*)*1); lean_dec(x_1); x_31 = lean_box_uint64(x_30); x_32 = lean_apply_2(x_7, x_29, x_31); return x_32; } } } } lean_object* l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars_match__2___rarg), 7, 0); return x_2; } } lean_object* l_Std_AssocList_find_x3f___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__2(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { lean_object* x_3; x_3 = lean_box(0); return x_3; } else { lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; x_4 = lean_ctor_get(x_2, 0); x_5 = lean_ctor_get(x_2, 1); x_6 = lean_ctor_get(x_2, 2); x_7 = lean_name_eq(x_4, x_1); if (x_7 == 0) { x_2 = x_6; goto _start; } else { lean_object* x_9; lean_inc(x_5); x_9 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_9, 0, x_5); return x_9; } } } } lean_object* l_Std_HashMapImp_find_x3f___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; size_t x_5; size_t x_6; lean_object* x_7; lean_object* x_8; x_3 = lean_ctor_get(x_1, 1); x_4 = lean_array_get_size(x_3); x_5 = l_Lean_Name_hash(x_2); x_6 = lean_usize_modn(x_5, x_4); lean_dec(x_4); x_7 = lean_array_uget(x_3, x_6); x_8 = l_Std_AssocList_find_x3f___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__2(x_2, x_7); lean_dec(x_7); return x_8; } } uint8_t l_Std_AssocList_contains___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__4(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { uint8_t x_3; x_3 = 0; return x_3; } else { lean_object* x_4; lean_object* x_5; uint8_t x_6; x_4 = lean_ctor_get(x_2, 0); x_5 = lean_ctor_get(x_2, 2); x_6 = lean_name_eq(x_4, x_1); if (x_6 == 0) { x_2 = x_5; goto _start; } else { uint8_t x_8; x_8 = 1; return x_8; } } } } lean_object* l_Std_AssocList_foldlM___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__7(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { return x_1; } else { uint8_t x_3; x_3 = !lean_is_exclusive(x_2); if (x_3 == 0) { lean_object* x_4; lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; x_4 = lean_ctor_get(x_2, 0); x_5 = lean_ctor_get(x_2, 2); x_6 = lean_array_get_size(x_1); x_7 = l_Lean_Name_hash(x_4); x_8 = lean_usize_modn(x_7, x_6); lean_dec(x_6); x_9 = lean_array_uget(x_1, x_8); lean_ctor_set(x_2, 2, x_9); x_10 = lean_array_uset(x_1, x_8, x_2); x_1 = x_10; x_2 = x_5; goto _start; } else { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; x_12 = lean_ctor_get(x_2, 0); x_13 = lean_ctor_get(x_2, 1); x_14 = lean_ctor_get(x_2, 2); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_dec(x_2); x_15 = lean_array_get_size(x_1); x_16 = l_Lean_Name_hash(x_12); x_17 = lean_usize_modn(x_16, x_15); lean_dec(x_15); x_18 = lean_array_uget(x_1, x_17); x_19 = lean_alloc_ctor(1, 3, 0); lean_ctor_set(x_19, 0, x_12); lean_ctor_set(x_19, 1, x_13); lean_ctor_set(x_19, 2, x_18); x_20 = lean_array_uset(x_1, x_17, x_19); x_1 = x_20; x_2 = x_14; goto _start; } } } } lean_object* l_Std_HashMapImp_moveEntries___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_5; x_4 = lean_array_get_size(x_2); x_5 = lean_nat_dec_lt(x_1, x_4); lean_dec(x_4); if (x_5 == 0) { lean_dec(x_2); lean_dec(x_1); return x_3; } 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; x_6 = lean_array_fget(x_2, x_1); x_7 = lean_box(0); x_8 = lean_array_fset(x_2, x_1, x_7); x_9 = l_Std_AssocList_foldlM___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__7(x_3, x_6); x_10 = lean_unsigned_to_nat(1u); x_11 = lean_nat_add(x_1, x_10); lean_dec(x_1); x_1 = x_11; x_2 = x_8; x_3 = x_9; goto _start; } } } lean_object* l_Std_HashMapImp_expand___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__5(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_3 = lean_array_get_size(x_2); x_4 = lean_unsigned_to_nat(2u); x_5 = lean_nat_mul(x_3, x_4); lean_dec(x_3); x_6 = lean_box(0); x_7 = lean_mk_array(x_5, x_6); x_8 = lean_unsigned_to_nat(0u); x_9 = l_Std_HashMapImp_moveEntries___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__6(x_8, x_2, x_7); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_1); lean_ctor_set(x_10, 1, x_9); return x_10; } } lean_object* l_Std_AssocList_replace___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_3) == 0) { lean_object* x_4; lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(0); return x_4; } else { uint8_t x_5; x_5 = !lean_is_exclusive(x_3); if (x_5 == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; x_6 = lean_ctor_get(x_3, 0); x_7 = lean_ctor_get(x_3, 1); x_8 = lean_ctor_get(x_3, 2); x_9 = lean_name_eq(x_6, x_1); if (x_9 == 0) { lean_object* x_10; x_10 = l_Std_AssocList_replace___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__8(x_1, x_2, x_8); lean_ctor_set(x_3, 2, x_10); return x_3; } else { lean_dec(x_7); lean_dec(x_6); lean_ctor_set(x_3, 1, x_2); lean_ctor_set(x_3, 0, x_1); return x_3; } } else { lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; x_11 = lean_ctor_get(x_3, 0); x_12 = lean_ctor_get(x_3, 1); x_13 = lean_ctor_get(x_3, 2); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_dec(x_3); x_14 = lean_name_eq(x_11, x_1); if (x_14 == 0) { lean_object* x_15; lean_object* x_16; x_15 = l_Std_AssocList_replace___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__8(x_1, x_2, x_13); x_16 = lean_alloc_ctor(1, 3, 0); lean_ctor_set(x_16, 0, x_11); lean_ctor_set(x_16, 1, x_12); lean_ctor_set(x_16, 2, x_15); return x_16; } else { lean_object* x_17; lean_dec(x_12); lean_dec(x_11); x_17 = lean_alloc_ctor(1, 3, 0); lean_ctor_set(x_17, 0, x_1); lean_ctor_set(x_17, 1, x_2); lean_ctor_set(x_17, 2, x_13); return x_17; } } } } } lean_object* l_Std_HashMapImp_insert___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { uint8_t x_4; x_4 = !lean_is_exclusive(x_1); if (x_4 == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; uint8_t x_11; x_5 = lean_ctor_get(x_1, 0); x_6 = lean_ctor_get(x_1, 1); x_7 = lean_array_get_size(x_6); x_8 = l_Lean_Name_hash(x_2); x_9 = lean_usize_modn(x_8, x_7); x_10 = lean_array_uget(x_6, x_9); x_11 = l_Std_AssocList_contains___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__4(x_2, x_10); if (x_11 == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; x_12 = lean_unsigned_to_nat(1u); x_13 = lean_nat_add(x_5, x_12); lean_dec(x_5); x_14 = lean_alloc_ctor(1, 3, 0); lean_ctor_set(x_14, 0, x_2); lean_ctor_set(x_14, 1, x_3); lean_ctor_set(x_14, 2, x_10); x_15 = lean_array_uset(x_6, x_9, x_14); x_16 = lean_nat_dec_le(x_13, x_7); lean_dec(x_7); if (x_16 == 0) { lean_object* x_17; lean_free_object(x_1); x_17 = l_Std_HashMapImp_expand___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__5(x_13, x_15); return x_17; } else { lean_ctor_set(x_1, 1, x_15); lean_ctor_set(x_1, 0, x_13); return x_1; } } else { lean_object* x_18; lean_object* x_19; lean_dec(x_7); x_18 = l_Std_AssocList_replace___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__8(x_2, x_3, x_10); x_19 = lean_array_uset(x_6, x_9, x_18); lean_ctor_set(x_1, 1, x_19); return x_1; } } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; uint8_t x_26; x_20 = lean_ctor_get(x_1, 0); x_21 = lean_ctor_get(x_1, 1); lean_inc(x_21); lean_inc(x_20); lean_dec(x_1); x_22 = lean_array_get_size(x_21); x_23 = l_Lean_Name_hash(x_2); x_24 = lean_usize_modn(x_23, x_22); x_25 = lean_array_uget(x_21, x_24); x_26 = l_Std_AssocList_contains___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__4(x_2, x_25); if (x_26 == 0) { lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; x_27 = lean_unsigned_to_nat(1u); x_28 = lean_nat_add(x_20, x_27); lean_dec(x_20); x_29 = lean_alloc_ctor(1, 3, 0); lean_ctor_set(x_29, 0, x_2); lean_ctor_set(x_29, 1, x_3); lean_ctor_set(x_29, 2, x_25); x_30 = lean_array_uset(x_21, x_24, x_29); x_31 = lean_nat_dec_le(x_28, x_22); lean_dec(x_22); if (x_31 == 0) { lean_object* x_32; x_32 = l_Std_HashMapImp_expand___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__5(x_28, x_30); return x_32; } else { lean_object* x_33; x_33 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_33, 0, x_28); lean_ctor_set(x_33, 1, x_30); return x_33; } } else { lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_dec(x_22); x_34 = l_Std_AssocList_replace___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__8(x_2, x_3, x_25); x_35 = lean_array_uset(x_21, x_24, x_34); x_36 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_36, 0, x_20); lean_ctor_set(x_36, 1, x_35); return x_36; } } } } static lean_object* _init_l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("_abstMVar"); return x_1; } } static lean_object* _init_l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); x_2 = l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } lean_object* l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; x_3 = l_Lean_Level_hasMVar(x_1); if (x_3 == 0) { lean_object* x_4; x_4 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_4, 0, x_1); lean_ctor_set(x_4, 1, x_2); return x_4; } else { switch (lean_obj_tag(x_1)) { case 1: { uint8_t x_5; x_5 = !lean_is_exclusive(x_1); if (x_5 == 0) { lean_object* x_6; lean_object* x_7; uint8_t x_8; x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); x_7 = l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars(x_6, x_2); x_8 = !lean_is_exclusive(x_7); if (x_8 == 0) { lean_object* x_9; lean_object* x_10; x_9 = lean_ctor_get(x_7, 0); x_10 = lean_level_update_succ(x_1, x_9); lean_ctor_set(x_7, 0, x_10); return x_7; } else { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_11 = lean_ctor_get(x_7, 0); x_12 = lean_ctor_get(x_7, 1); lean_inc(x_12); lean_inc(x_11); lean_dec(x_7); x_13 = lean_level_update_succ(x_1, x_11); x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_12); return x_14; } } else { lean_object* x_15; uint64_t 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_1, 0); x_16 = lean_ctor_get_uint64(x_1, sizeof(void*)*1); lean_inc(x_15); lean_dec(x_1); lean_inc(x_15); x_17 = l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars(x_15, x_2); x_18 = lean_ctor_get(x_17, 0); lean_inc(x_18); x_19 = lean_ctor_get(x_17, 1); lean_inc(x_19); if (lean_is_exclusive(x_17)) { lean_ctor_release(x_17, 0); lean_ctor_release(x_17, 1); x_20 = x_17; } else { lean_dec_ref(x_17); x_20 = lean_box(0); } x_21 = lean_alloc_ctor(1, 1, 8); lean_ctor_set(x_21, 0, x_15); lean_ctor_set_uint64(x_21, sizeof(void*)*1, x_16); x_22 = lean_level_update_succ(x_21, x_18); if (lean_is_scalar(x_20)) { x_23 = lean_alloc_ctor(0, 2, 0); } else { x_23 = x_20; } lean_ctor_set(x_23, 0, x_22); lean_ctor_set(x_23, 1, x_19); return x_23; } } case 2: { uint8_t x_24; x_24 = !lean_is_exclusive(x_1); if (x_24 == 0) { lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; x_25 = lean_ctor_get(x_1, 0); x_26 = lean_ctor_get(x_1, 1); lean_inc(x_25); x_27 = l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars(x_25, x_2); x_28 = lean_ctor_get(x_27, 0); lean_inc(x_28); x_29 = lean_ctor_get(x_27, 1); lean_inc(x_29); lean_dec(x_27); lean_inc(x_26); x_30 = l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars(x_26, x_29); x_31 = !lean_is_exclusive(x_30); if (x_31 == 0) { lean_object* x_32; lean_object* x_33; x_32 = lean_ctor_get(x_30, 0); x_33 = lean_level_update_max(x_1, x_28, x_32); lean_ctor_set(x_30, 0, x_33); return x_30; } else { lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; x_34 = lean_ctor_get(x_30, 0); x_35 = lean_ctor_get(x_30, 1); lean_inc(x_35); lean_inc(x_34); lean_dec(x_30); x_36 = lean_level_update_max(x_1, x_28, x_34); x_37 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_37, 0, x_36); lean_ctor_set(x_37, 1, x_35); return x_37; } } else { lean_object* x_38; lean_object* x_39; uint64_t x_40; 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; lean_object* x_49; lean_object* x_50; x_38 = lean_ctor_get(x_1, 0); x_39 = lean_ctor_get(x_1, 1); x_40 = lean_ctor_get_uint64(x_1, sizeof(void*)*2); lean_inc(x_39); lean_inc(x_38); lean_dec(x_1); lean_inc(x_38); x_41 = l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars(x_38, x_2); 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); lean_inc(x_39); x_44 = l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars(x_39, x_43); x_45 = lean_ctor_get(x_44, 0); lean_inc(x_45); x_46 = lean_ctor_get(x_44, 1); lean_inc(x_46); if (lean_is_exclusive(x_44)) { lean_ctor_release(x_44, 0); lean_ctor_release(x_44, 1); x_47 = x_44; } else { lean_dec_ref(x_44); x_47 = lean_box(0); } x_48 = lean_alloc_ctor(2, 2, 8); lean_ctor_set(x_48, 0, x_38); lean_ctor_set(x_48, 1, x_39); lean_ctor_set_uint64(x_48, sizeof(void*)*2, x_40); x_49 = lean_level_update_max(x_48, x_42, x_45); if (lean_is_scalar(x_47)) { x_50 = lean_alloc_ctor(0, 2, 0); } else { x_50 = x_47; } lean_ctor_set(x_50, 0, x_49); lean_ctor_set(x_50, 1, x_46); return x_50; } } case 3: { uint8_t x_51; x_51 = !lean_is_exclusive(x_1); if (x_51 == 0) { lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; uint8_t x_58; x_52 = lean_ctor_get(x_1, 0); x_53 = lean_ctor_get(x_1, 1); lean_inc(x_52); x_54 = l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars(x_52, x_2); x_55 = lean_ctor_get(x_54, 0); lean_inc(x_55); x_56 = lean_ctor_get(x_54, 1); lean_inc(x_56); lean_dec(x_54); lean_inc(x_53); x_57 = l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars(x_53, x_56); x_58 = !lean_is_exclusive(x_57); if (x_58 == 0) { lean_object* x_59; lean_object* x_60; x_59 = lean_ctor_get(x_57, 0); x_60 = lean_level_update_imax(x_1, x_55, x_59); lean_ctor_set(x_57, 0, x_60); return x_57; } else { lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; x_61 = lean_ctor_get(x_57, 0); x_62 = lean_ctor_get(x_57, 1); lean_inc(x_62); lean_inc(x_61); lean_dec(x_57); x_63 = lean_level_update_imax(x_1, x_55, x_61); x_64 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_64, 0, x_63); lean_ctor_set(x_64, 1, x_62); return x_64; } } else { lean_object* x_65; lean_object* x_66; uint64_t x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; x_65 = lean_ctor_get(x_1, 0); x_66 = lean_ctor_get(x_1, 1); x_67 = lean_ctor_get_uint64(x_1, sizeof(void*)*2); lean_inc(x_66); lean_inc(x_65); lean_dec(x_1); lean_inc(x_65); x_68 = l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars(x_65, x_2); 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); lean_inc(x_66); x_71 = l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars(x_66, x_70); x_72 = lean_ctor_get(x_71, 0); lean_inc(x_72); x_73 = lean_ctor_get(x_71, 1); lean_inc(x_73); if (lean_is_exclusive(x_71)) { lean_ctor_release(x_71, 0); lean_ctor_release(x_71, 1); x_74 = x_71; } else { lean_dec_ref(x_71); x_74 = lean_box(0); } x_75 = lean_alloc_ctor(3, 2, 8); lean_ctor_set(x_75, 0, x_65); lean_ctor_set(x_75, 1, x_66); lean_ctor_set_uint64(x_75, sizeof(void*)*2, x_67); x_76 = lean_level_update_imax(x_75, x_69, x_72); if (lean_is_scalar(x_74)) { x_77 = lean_alloc_ctor(0, 2, 0); } else { x_77 = x_74; } lean_ctor_set(x_77, 0, x_76); lean_ctor_set(x_77, 1, x_73); return x_77; } } case 5: { 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; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; uint8_t x_89; x_78 = lean_ctor_get(x_1, 0); lean_inc(x_78); x_79 = lean_ctor_get(x_2, 0); lean_inc(x_79); x_80 = lean_ctor_get(x_2, 1); lean_inc(x_80); x_81 = lean_ctor_get(x_2, 2); lean_inc(x_81); x_82 = lean_ctor_get(x_2, 3); lean_inc(x_82); x_83 = lean_ctor_get(x_2, 4); lean_inc(x_83); x_84 = lean_ctor_get(x_2, 5); lean_inc(x_84); x_85 = lean_ctor_get(x_2, 6); lean_inc(x_85); x_86 = lean_ctor_get(x_2, 7); lean_inc(x_86); lean_inc(x_81); x_87 = l_Lean_MetavarContext_getLevelDepth(x_81, x_78); x_88 = lean_ctor_get(x_81, 0); lean_inc(x_88); x_89 = lean_nat_dec_eq(x_87, x_88); lean_dec(x_88); lean_dec(x_87); if (x_89 == 0) { lean_object* x_90; lean_dec(x_86); lean_dec(x_85); lean_dec(x_84); lean_dec(x_83); lean_dec(x_82); lean_dec(x_81); lean_dec(x_80); lean_dec(x_79); lean_dec(x_78); x_90 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_90, 0, x_1); lean_ctor_set(x_90, 1, x_2); return x_90; } else { lean_object* x_91; lean_dec(x_1); x_91 = l_Std_HashMapImp_find_x3f___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__1(x_85, x_78); if (lean_obj_tag(x_91) == 0) { uint8_t x_92; x_92 = !lean_is_exclusive(x_2); if (x_92 == 0) { lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; x_93 = lean_ctor_get(x_2, 7); lean_dec(x_93); x_94 = lean_ctor_get(x_2, 6); lean_dec(x_94); x_95 = lean_ctor_get(x_2, 5); lean_dec(x_95); x_96 = lean_ctor_get(x_2, 4); lean_dec(x_96); x_97 = lean_ctor_get(x_2, 3); lean_dec(x_97); x_98 = lean_ctor_get(x_2, 2); lean_dec(x_98); x_99 = lean_ctor_get(x_2, 1); lean_dec(x_99); x_100 = lean_ctor_get(x_2, 0); lean_dec(x_100); x_101 = l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___closed__2; lean_inc(x_82); x_102 = lean_name_mk_numeral(x_101, x_82); lean_inc(x_102); x_103 = l_Lean_mkLevelParam(x_102); x_104 = lean_unsigned_to_nat(1u); x_105 = lean_nat_add(x_82, x_104); lean_dec(x_82); x_106 = lean_array_push(x_83, x_102); lean_inc(x_103); x_107 = l_Std_HashMapImp_insert___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__3(x_85, x_78, x_103); lean_ctor_set(x_2, 6, x_107); lean_ctor_set(x_2, 4, x_106); lean_ctor_set(x_2, 3, x_105); x_108 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_108, 0, x_103); lean_ctor_set(x_108, 1, x_2); return x_108; } else { lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_dec(x_2); x_109 = l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___closed__2; lean_inc(x_82); x_110 = lean_name_mk_numeral(x_109, x_82); lean_inc(x_110); x_111 = l_Lean_mkLevelParam(x_110); x_112 = lean_unsigned_to_nat(1u); x_113 = lean_nat_add(x_82, x_112); lean_dec(x_82); x_114 = lean_array_push(x_83, x_110); lean_inc(x_111); x_115 = l_Std_HashMapImp_insert___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__3(x_85, x_78, x_111); x_116 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_116, 0, x_79); lean_ctor_set(x_116, 1, x_80); lean_ctor_set(x_116, 2, x_81); lean_ctor_set(x_116, 3, x_113); lean_ctor_set(x_116, 4, x_114); lean_ctor_set(x_116, 5, x_84); lean_ctor_set(x_116, 6, x_115); lean_ctor_set(x_116, 7, x_86); x_117 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_117, 0, x_111); lean_ctor_set(x_117, 1, x_116); return x_117; } } else { lean_object* x_118; lean_object* x_119; lean_dec(x_86); lean_dec(x_85); lean_dec(x_84); lean_dec(x_83); lean_dec(x_82); lean_dec(x_81); lean_dec(x_80); lean_dec(x_79); lean_dec(x_78); x_118 = lean_ctor_get(x_91, 0); lean_inc(x_118); lean_dec(x_91); x_119 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_119, 0, x_118); lean_ctor_set(x_119, 1, x_2); return x_119; } } } default: { lean_object* x_120; x_120 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_120, 0, x_1); lean_ctor_set(x_120, 1, x_2); return x_120; } } } } } lean_object* l_Std_AssocList_find_x3f___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__2___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Std_AssocList_find_x3f___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__2(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l_Std_HashMapImp_find_x3f___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Std_HashMapImp_find_x3f___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l_Std_AssocList_contains___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__4___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l_Std_AssocList_contains___at___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___spec__4(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } lean_object* l_Lean_Meta_AbstractMVars_abstractExprMVars_match__1___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_Meta_AbstractMVars_abstractExprMVars_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Meta_AbstractMVars_abstractExprMVars_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Meta_AbstractMVars_abstractExprMVars_match__2___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_2(x_2, x_3, x_4); return x_5; } } lean_object* l_Lean_Meta_AbstractMVars_abstractExprMVars_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Meta_AbstractMVars_abstractExprMVars_match__2___rarg), 2, 0); return x_2; } } lean_object* l_Lean_Meta_AbstractMVars_abstractExprMVars_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* 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: { switch (lean_obj_tag(x_1)) { case 0: { lean_object* x_14; uint64_t x_15; lean_object* x_16; lean_object* x_17; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); x_14 = lean_ctor_get(x_1, 0); lean_inc(x_14); x_15 = lean_ctor_get_uint64(x_1, sizeof(void*)*1); x_16 = lean_box_uint64(x_15); x_17 = lean_apply_3(x_3, x_1, x_14, x_16); return x_17; } case 1: { lean_object* x_18; uint64_t x_19; lean_object* x_20; lean_object* x_21; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); x_18 = lean_ctor_get(x_1, 0); lean_inc(x_18); x_19 = lean_ctor_get_uint64(x_1, sizeof(void*)*1); x_20 = lean_box_uint64(x_19); x_21 = lean_apply_3(x_4, x_1, x_18, x_20); return x_21; } case 2: { lean_object* x_22; uint64_t x_23; lean_object* x_24; lean_object* x_25; lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_22 = lean_ctor_get(x_1, 0); lean_inc(x_22); x_23 = lean_ctor_get_uint64(x_1, sizeof(void*)*1); x_24 = lean_box_uint64(x_23); x_25 = lean_apply_3(x_13, x_1, x_22, x_24); return x_25; } case 3: { lean_object* x_26; uint64_t x_27; lean_object* x_28; lean_object* x_29; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_26 = lean_ctor_get(x_1, 0); lean_inc(x_26); x_27 = lean_ctor_get_uint64(x_1, sizeof(void*)*1); x_28 = lean_box_uint64(x_27); x_29 = lean_apply_3(x_5, x_1, x_26, x_28); return x_29; } case 4: { lean_object* x_30; lean_object* x_31; uint64_t x_32; lean_object* x_33; lean_object* x_34; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_30 = lean_ctor_get(x_1, 0); lean_inc(x_30); x_31 = lean_ctor_get(x_1, 1); lean_inc(x_31); x_32 = lean_ctor_get_uint64(x_1, sizeof(void*)*2); x_33 = lean_box_uint64(x_32); x_34 = lean_apply_4(x_6, x_1, x_30, x_31, x_33); return x_34; } case 5: { lean_object* x_35; lean_object* x_36; uint64_t x_37; lean_object* x_38; lean_object* x_39; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); 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_35 = lean_ctor_get(x_1, 0); lean_inc(x_35); x_36 = lean_ctor_get(x_1, 1); lean_inc(x_36); x_37 = lean_ctor_get_uint64(x_1, sizeof(void*)*2); x_38 = lean_box_uint64(x_37); x_39 = lean_apply_4(x_8, x_1, x_35, x_36, x_38); return x_39; } case 6: { lean_object* x_40; lean_object* x_41; lean_object* x_42; uint64_t x_43; lean_object* x_44; lean_object* x_45; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_40 = lean_ctor_get(x_1, 0); lean_inc(x_40); x_41 = lean_ctor_get(x_1, 1); lean_inc(x_41); x_42 = lean_ctor_get(x_1, 2); lean_inc(x_42); x_43 = lean_ctor_get_uint64(x_1, sizeof(void*)*3); x_44 = lean_box_uint64(x_43); x_45 = lean_apply_5(x_10, x_1, x_40, x_41, x_42, x_44); return x_45; } case 7: { lean_object* x_46; lean_object* x_47; lean_object* x_48; uint64_t x_49; lean_object* x_50; lean_object* x_51; lean_dec(x_13); 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_4); lean_dec(x_3); lean_dec(x_2); x_46 = lean_ctor_get(x_1, 0); lean_inc(x_46); x_47 = lean_ctor_get(x_1, 1); lean_inc(x_47); x_48 = lean_ctor_get(x_1, 2); lean_inc(x_48); x_49 = lean_ctor_get_uint64(x_1, sizeof(void*)*3); x_50 = lean_box_uint64(x_49); x_51 = lean_apply_5(x_11, x_1, x_46, x_47, x_48, x_50); return x_51; } case 8: { lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; uint64_t x_56; lean_object* x_57; lean_object* x_58; lean_dec(x_13); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_52 = lean_ctor_get(x_1, 0); lean_inc(x_52); x_53 = lean_ctor_get(x_1, 1); lean_inc(x_53); x_54 = lean_ctor_get(x_1, 2); lean_inc(x_54); x_55 = lean_ctor_get(x_1, 3); lean_inc(x_55); x_56 = lean_ctor_get_uint64(x_1, sizeof(void*)*4); x_57 = lean_box_uint64(x_56); x_58 = lean_apply_6(x_12, x_1, x_52, x_53, x_54, x_55, x_57); return x_58; } case 9: { lean_object* x_59; uint64_t x_60; lean_object* x_61; lean_object* x_62; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_59 = lean_ctor_get(x_1, 0); lean_inc(x_59); x_60 = lean_ctor_get_uint64(x_1, sizeof(void*)*1); x_61 = lean_box_uint64(x_60); x_62 = lean_apply_3(x_2, x_1, x_59, x_61); return x_62; } case 10: { lean_object* x_63; lean_object* x_64; uint64_t x_65; lean_object* x_66; lean_object* x_67; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_63 = lean_ctor_get(x_1, 0); lean_inc(x_63); x_64 = lean_ctor_get(x_1, 1); lean_inc(x_64); x_65 = lean_ctor_get_uint64(x_1, sizeof(void*)*2); x_66 = lean_box_uint64(x_65); x_67 = lean_apply_4(x_9, x_1, x_63, x_64, x_66); return x_67; } default: { lean_object* x_68; lean_object* x_69; lean_object* x_70; uint64_t x_71; lean_object* x_72; lean_object* x_73; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_68 = lean_ctor_get(x_1, 0); lean_inc(x_68); x_69 = lean_ctor_get(x_1, 1); lean_inc(x_69); x_70 = lean_ctor_get(x_1, 2); lean_inc(x_70); x_71 = lean_ctor_get_uint64(x_1, sizeof(void*)*3); x_72 = lean_box_uint64(x_71); x_73 = lean_apply_5(x_7, x_1, x_68, x_69, x_70, x_72); return x_73; } } } } lean_object* l_Lean_Meta_AbstractMVars_abstractExprMVars_match__3(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Meta_AbstractMVars_abstractExprMVars_match__3___rarg), 13, 0); return x_2; } } lean_object* l_Std_AssocList_find_x3f___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__2(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { lean_object* x_3; x_3 = lean_box(0); return x_3; } else { lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; x_4 = lean_ctor_get(x_2, 0); x_5 = lean_ctor_get(x_2, 1); x_6 = lean_ctor_get(x_2, 2); x_7 = lean_name_eq(x_4, x_1); if (x_7 == 0) { x_2 = x_6; goto _start; } else { lean_object* x_9; lean_inc(x_5); x_9 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_9, 0, x_5); return x_9; } } } } lean_object* l_Std_HashMapImp_find_x3f___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; size_t x_5; size_t x_6; lean_object* x_7; lean_object* x_8; x_3 = lean_ctor_get(x_1, 1); x_4 = lean_array_get_size(x_3); x_5 = l_Lean_Name_hash(x_2); x_6 = lean_usize_modn(x_5, x_4); lean_dec(x_4); x_7 = lean_array_uget(x_3, x_6); x_8 = l_Std_AssocList_find_x3f___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__2(x_2, x_7); lean_dec(x_7); return x_8; } } uint8_t l_Std_AssocList_contains___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__4(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { uint8_t x_3; x_3 = 0; return x_3; } else { lean_object* x_4; lean_object* x_5; uint8_t x_6; x_4 = lean_ctor_get(x_2, 0); x_5 = lean_ctor_get(x_2, 2); x_6 = lean_name_eq(x_4, x_1); if (x_6 == 0) { x_2 = x_5; goto _start; } else { uint8_t x_8; x_8 = 1; return x_8; } } } } lean_object* l_Std_AssocList_foldlM___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__7(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { return x_1; } else { uint8_t x_3; x_3 = !lean_is_exclusive(x_2); if (x_3 == 0) { lean_object* x_4; lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; x_4 = lean_ctor_get(x_2, 0); x_5 = lean_ctor_get(x_2, 2); x_6 = lean_array_get_size(x_1); x_7 = l_Lean_Name_hash(x_4); x_8 = lean_usize_modn(x_7, x_6); lean_dec(x_6); x_9 = lean_array_uget(x_1, x_8); lean_ctor_set(x_2, 2, x_9); x_10 = lean_array_uset(x_1, x_8, x_2); x_1 = x_10; x_2 = x_5; goto _start; } else { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; x_12 = lean_ctor_get(x_2, 0); x_13 = lean_ctor_get(x_2, 1); x_14 = lean_ctor_get(x_2, 2); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_dec(x_2); x_15 = lean_array_get_size(x_1); x_16 = l_Lean_Name_hash(x_12); x_17 = lean_usize_modn(x_16, x_15); lean_dec(x_15); x_18 = lean_array_uget(x_1, x_17); x_19 = lean_alloc_ctor(1, 3, 0); lean_ctor_set(x_19, 0, x_12); lean_ctor_set(x_19, 1, x_13); lean_ctor_set(x_19, 2, x_18); x_20 = lean_array_uset(x_1, x_17, x_19); x_1 = x_20; x_2 = x_14; goto _start; } } } } lean_object* l_Std_HashMapImp_moveEntries___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_5; x_4 = lean_array_get_size(x_2); x_5 = lean_nat_dec_lt(x_1, x_4); lean_dec(x_4); if (x_5 == 0) { lean_dec(x_2); lean_dec(x_1); return x_3; } 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; x_6 = lean_array_fget(x_2, x_1); x_7 = lean_box(0); x_8 = lean_array_fset(x_2, x_1, x_7); x_9 = l_Std_AssocList_foldlM___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__7(x_3, x_6); x_10 = lean_unsigned_to_nat(1u); x_11 = lean_nat_add(x_1, x_10); lean_dec(x_1); x_1 = x_11; x_2 = x_8; x_3 = x_9; goto _start; } } } lean_object* l_Std_HashMapImp_expand___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__5(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_3 = lean_array_get_size(x_2); x_4 = lean_unsigned_to_nat(2u); x_5 = lean_nat_mul(x_3, x_4); lean_dec(x_3); x_6 = lean_box(0); x_7 = lean_mk_array(x_5, x_6); x_8 = lean_unsigned_to_nat(0u); x_9 = l_Std_HashMapImp_moveEntries___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__6(x_8, x_2, x_7); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_1); lean_ctor_set(x_10, 1, x_9); return x_10; } } lean_object* l_Std_AssocList_replace___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_3) == 0) { lean_object* x_4; lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(0); return x_4; } else { uint8_t x_5; x_5 = !lean_is_exclusive(x_3); if (x_5 == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; x_6 = lean_ctor_get(x_3, 0); x_7 = lean_ctor_get(x_3, 1); x_8 = lean_ctor_get(x_3, 2); x_9 = lean_name_eq(x_6, x_1); if (x_9 == 0) { lean_object* x_10; x_10 = l_Std_AssocList_replace___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__8(x_1, x_2, x_8); lean_ctor_set(x_3, 2, x_10); return x_3; } else { lean_dec(x_7); lean_dec(x_6); lean_ctor_set(x_3, 1, x_2); lean_ctor_set(x_3, 0, x_1); return x_3; } } else { lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; x_11 = lean_ctor_get(x_3, 0); x_12 = lean_ctor_get(x_3, 1); x_13 = lean_ctor_get(x_3, 2); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_dec(x_3); x_14 = lean_name_eq(x_11, x_1); if (x_14 == 0) { lean_object* x_15; lean_object* x_16; x_15 = l_Std_AssocList_replace___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__8(x_1, x_2, x_13); x_16 = lean_alloc_ctor(1, 3, 0); lean_ctor_set(x_16, 0, x_11); lean_ctor_set(x_16, 1, x_12); lean_ctor_set(x_16, 2, x_15); return x_16; } else { lean_object* x_17; lean_dec(x_12); lean_dec(x_11); x_17 = lean_alloc_ctor(1, 3, 0); lean_ctor_set(x_17, 0, x_1); lean_ctor_set(x_17, 1, x_2); lean_ctor_set(x_17, 2, x_13); return x_17; } } } } } lean_object* l_Std_HashMapImp_insert___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { uint8_t x_4; x_4 = !lean_is_exclusive(x_1); if (x_4 == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; uint8_t x_11; x_5 = lean_ctor_get(x_1, 0); x_6 = lean_ctor_get(x_1, 1); x_7 = lean_array_get_size(x_6); x_8 = l_Lean_Name_hash(x_2); x_9 = lean_usize_modn(x_8, x_7); x_10 = lean_array_uget(x_6, x_9); x_11 = l_Std_AssocList_contains___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__4(x_2, x_10); if (x_11 == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; x_12 = lean_unsigned_to_nat(1u); x_13 = lean_nat_add(x_5, x_12); lean_dec(x_5); x_14 = lean_alloc_ctor(1, 3, 0); lean_ctor_set(x_14, 0, x_2); lean_ctor_set(x_14, 1, x_3); lean_ctor_set(x_14, 2, x_10); x_15 = lean_array_uset(x_6, x_9, x_14); x_16 = lean_nat_dec_le(x_13, x_7); lean_dec(x_7); if (x_16 == 0) { lean_object* x_17; lean_free_object(x_1); x_17 = l_Std_HashMapImp_expand___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__5(x_13, x_15); return x_17; } else { lean_ctor_set(x_1, 1, x_15); lean_ctor_set(x_1, 0, x_13); return x_1; } } else { lean_object* x_18; lean_object* x_19; lean_dec(x_7); x_18 = l_Std_AssocList_replace___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__8(x_2, x_3, x_10); x_19 = lean_array_uset(x_6, x_9, x_18); lean_ctor_set(x_1, 1, x_19); return x_1; } } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; uint8_t x_26; x_20 = lean_ctor_get(x_1, 0); x_21 = lean_ctor_get(x_1, 1); lean_inc(x_21); lean_inc(x_20); lean_dec(x_1); x_22 = lean_array_get_size(x_21); x_23 = l_Lean_Name_hash(x_2); x_24 = lean_usize_modn(x_23, x_22); x_25 = lean_array_uget(x_21, x_24); x_26 = l_Std_AssocList_contains___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__4(x_2, x_25); if (x_26 == 0) { lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; x_27 = lean_unsigned_to_nat(1u); x_28 = lean_nat_add(x_20, x_27); lean_dec(x_20); x_29 = lean_alloc_ctor(1, 3, 0); lean_ctor_set(x_29, 0, x_2); lean_ctor_set(x_29, 1, x_3); lean_ctor_set(x_29, 2, x_25); x_30 = lean_array_uset(x_21, x_24, x_29); x_31 = lean_nat_dec_le(x_28, x_22); lean_dec(x_22); if (x_31 == 0) { lean_object* x_32; x_32 = l_Std_HashMapImp_expand___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__5(x_28, x_30); return x_32; } else { lean_object* x_33; x_33 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_33, 0, x_28); lean_ctor_set(x_33, 1, x_30); return x_33; } } else { lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_dec(x_22); x_34 = l_Std_AssocList_replace___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__8(x_2, x_3, x_25); x_35 = lean_array_uset(x_21, x_24, x_34); x_36 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_36, 0, x_20); lean_ctor_set(x_36, 1, x_35); return x_36; } } } } lean_object* l_List_mapM___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__9(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_3; lean_object* x_4; x_3 = lean_box(0); x_4 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_4, 0, x_3); lean_ctor_set(x_4, 1, x_2); return x_4; } else { uint8_t x_5; x_5 = !lean_is_exclusive(x_1); if (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; uint8_t x_12; x_6 = lean_ctor_get(x_1, 0); x_7 = lean_ctor_get(x_1, 1); x_8 = l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars(x_6, x_2); 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 = l_List_mapM___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__9(x_7, x_10); x_12 = !lean_is_exclusive(x_11); if (x_12 == 0) { lean_object* x_13; x_13 = lean_ctor_get(x_11, 0); lean_ctor_set(x_1, 1, x_13); lean_ctor_set(x_1, 0, x_9); lean_ctor_set(x_11, 0, x_1); return x_11; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; x_14 = lean_ctor_get(x_11, 0); x_15 = lean_ctor_get(x_11, 1); lean_inc(x_15); lean_inc(x_14); lean_dec(x_11); lean_ctor_set(x_1, 1, x_14); lean_ctor_set(x_1, 0, x_9); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_1); lean_ctor_set(x_16, 1, x_15); return x_16; } } else { lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; x_17 = lean_ctor_get(x_1, 0); x_18 = lean_ctor_get(x_1, 1); lean_inc(x_18); lean_inc(x_17); lean_dec(x_1); x_19 = l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars(x_17, x_2); x_20 = lean_ctor_get(x_19, 0); lean_inc(x_20); x_21 = lean_ctor_get(x_19, 1); lean_inc(x_21); lean_dec(x_19); x_22 = l_List_mapM___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__9(x_18, x_21); x_23 = lean_ctor_get(x_22, 0); lean_inc(x_23); x_24 = lean_ctor_get(x_22, 1); lean_inc(x_24); if (lean_is_exclusive(x_22)) { lean_ctor_release(x_22, 0); lean_ctor_release(x_22, 1); x_25 = x_22; } else { lean_dec_ref(x_22); x_25 = lean_box(0); } x_26 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_26, 0, x_20); lean_ctor_set(x_26, 1, x_23); if (lean_is_scalar(x_25)) { x_27 = lean_alloc_ctor(0, 2, 0); } else { x_27 = x_25; } lean_ctor_set(x_27, 0, x_26); lean_ctor_set(x_27, 1, x_24); return x_27; } } } } lean_object* l_Lean_Meta_AbstractMVars_abstractExprMVars(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; x_3 = l_Lean_Expr_hasMVar(x_1); if (x_3 == 0) { lean_object* x_4; x_4 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_4, 0, x_1); lean_ctor_set(x_4, 1, x_2); return x_4; } else { switch (lean_obj_tag(x_1)) { case 2: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); x_6 = lean_ctor_get(x_2, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_2, 1); lean_inc(x_7); x_8 = lean_ctor_get(x_2, 2); lean_inc(x_8); x_9 = lean_ctor_get(x_2, 3); lean_inc(x_9); x_10 = lean_ctor_get(x_2, 4); lean_inc(x_10); x_11 = lean_ctor_get(x_2, 5); lean_inc(x_11); x_12 = lean_ctor_get(x_2, 6); lean_inc(x_12); x_13 = lean_ctor_get(x_2, 7); lean_inc(x_13); lean_inc(x_8); x_14 = l_Lean_MetavarContext_getDecl(x_8, x_5); x_15 = lean_ctor_get(x_14, 3); lean_inc(x_15); x_16 = lean_ctor_get(x_8, 0); lean_inc(x_16); x_17 = lean_nat_dec_eq(x_15, x_16); lean_dec(x_16); lean_dec(x_15); if (x_17 == 0) { lean_object* x_18; lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); x_18 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_18, 0, x_1); lean_ctor_set(x_18, 1, x_2); return x_18; } else { lean_object* x_19; uint8_t x_20; lean_inc(x_1); x_19 = l_Lean_MetavarContext_instantiateMVars(x_8, x_1); x_20 = !lean_is_exclusive(x_19); if (x_20 == 0) { lean_object* x_21; lean_object* x_22; uint8_t x_23; x_21 = lean_ctor_get(x_19, 0); x_22 = lean_ctor_get(x_19, 1); x_23 = lean_expr_eqv(x_1, x_21); lean_dec(x_1); if (x_23 == 0) { uint8_t x_24; lean_free_object(x_19); lean_dec(x_14); lean_dec(x_5); x_24 = !lean_is_exclusive(x_2); if (x_24 == 0) { lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; x_25 = lean_ctor_get(x_2, 7); lean_dec(x_25); x_26 = lean_ctor_get(x_2, 6); lean_dec(x_26); x_27 = lean_ctor_get(x_2, 5); lean_dec(x_27); x_28 = lean_ctor_get(x_2, 4); lean_dec(x_28); x_29 = lean_ctor_get(x_2, 3); lean_dec(x_29); x_30 = lean_ctor_get(x_2, 2); lean_dec(x_30); x_31 = lean_ctor_get(x_2, 1); lean_dec(x_31); x_32 = lean_ctor_get(x_2, 0); lean_dec(x_32); lean_ctor_set(x_2, 2, x_22); x_1 = x_21; goto _start; } else { lean_object* x_34; lean_dec(x_2); x_34 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_34, 0, x_6); lean_ctor_set(x_34, 1, x_7); lean_ctor_set(x_34, 2, x_22); lean_ctor_set(x_34, 3, x_9); lean_ctor_set(x_34, 4, x_10); lean_ctor_set(x_34, 5, x_11); lean_ctor_set(x_34, 6, x_12); lean_ctor_set(x_34, 7, x_13); x_1 = x_21; x_2 = x_34; goto _start; } } else { lean_object* x_36; lean_dec(x_22); lean_dec(x_21); lean_dec(x_12); lean_dec(x_10); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); x_36 = l_Std_HashMapImp_find_x3f___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__1(x_13, x_5); lean_dec(x_13); if (lean_obj_tag(x_36) == 0) { lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; uint8_t x_42; lean_free_object(x_19); x_37 = lean_ctor_get(x_14, 2); lean_inc(x_37); x_38 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_37, x_2); x_39 = lean_ctor_get(x_38, 0); lean_inc(x_39); x_40 = lean_ctor_get(x_38, 1); lean_inc(x_40); lean_dec(x_38); x_41 = l_Lean_Meta_AbstractMVars_mkFreshId(x_40); x_42 = !lean_is_exclusive(x_41); if (x_42 == 0) { lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47; uint8_t x_48; x_43 = lean_ctor_get(x_41, 0); x_44 = lean_ctor_get(x_41, 1); lean_inc(x_43); x_45 = l_Lean_mkFVar(x_43); x_46 = lean_ctor_get(x_14, 0); lean_inc(x_46); lean_dec(x_14); x_47 = l_Lean_Name_isAnonymous(x_46); x_48 = !lean_is_exclusive(x_44); if (x_48 == 0) { lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; x_49 = lean_ctor_get(x_44, 1); x_50 = lean_ctor_get(x_44, 5); x_51 = lean_ctor_get(x_44, 7); lean_inc(x_45); x_52 = lean_array_push(x_50, x_45); if (x_47 == 0) { uint8_t x_53; lean_object* x_54; lean_object* x_55; lean_dec(x_11); x_53 = 0; x_54 = lean_local_ctx_mk_local_decl(x_49, x_43, x_46, x_39, x_53); lean_inc(x_45); x_55 = l_Std_HashMapImp_insert___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__3(x_51, x_5, x_45); lean_ctor_set(x_44, 7, x_55); lean_ctor_set(x_44, 5, x_52); lean_ctor_set(x_44, 1, x_54); lean_ctor_set(x_41, 0, x_45); return x_41; } else { lean_object* x_56; lean_object* x_57; lean_object* x_58; uint8_t x_59; lean_object* x_60; lean_object* x_61; lean_dec(x_46); x_56 = lean_array_get_size(x_11); lean_dec(x_11); x_57 = l_Lean_Meta_mkArrow___closed__2; x_58 = lean_name_append_index_after(x_57, x_56); x_59 = 0; x_60 = lean_local_ctx_mk_local_decl(x_49, x_43, x_58, x_39, x_59); lean_inc(x_45); x_61 = l_Std_HashMapImp_insert___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__3(x_51, x_5, x_45); lean_ctor_set(x_44, 7, x_61); lean_ctor_set(x_44, 5, x_52); lean_ctor_set(x_44, 1, x_60); lean_ctor_set(x_41, 0, x_45); return x_41; } } else { 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; lean_object* x_70; x_62 = lean_ctor_get(x_44, 0); x_63 = lean_ctor_get(x_44, 1); x_64 = lean_ctor_get(x_44, 2); x_65 = lean_ctor_get(x_44, 3); x_66 = lean_ctor_get(x_44, 4); x_67 = lean_ctor_get(x_44, 5); x_68 = lean_ctor_get(x_44, 6); x_69 = lean_ctor_get(x_44, 7); lean_inc(x_69); lean_inc(x_68); lean_inc(x_67); lean_inc(x_66); lean_inc(x_65); lean_inc(x_64); lean_inc(x_63); lean_inc(x_62); lean_dec(x_44); lean_inc(x_45); x_70 = lean_array_push(x_67, x_45); if (x_47 == 0) { uint8_t x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_dec(x_11); x_71 = 0; x_72 = lean_local_ctx_mk_local_decl(x_63, x_43, x_46, x_39, x_71); lean_inc(x_45); x_73 = l_Std_HashMapImp_insert___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__3(x_69, x_5, x_45); x_74 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_74, 0, x_62); lean_ctor_set(x_74, 1, x_72); lean_ctor_set(x_74, 2, x_64); lean_ctor_set(x_74, 3, x_65); lean_ctor_set(x_74, 4, x_66); lean_ctor_set(x_74, 5, x_70); lean_ctor_set(x_74, 6, x_68); lean_ctor_set(x_74, 7, x_73); lean_ctor_set(x_41, 1, x_74); lean_ctor_set(x_41, 0, x_45); return x_41; } else { lean_object* x_75; lean_object* x_76; lean_object* x_77; uint8_t x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_dec(x_46); x_75 = lean_array_get_size(x_11); lean_dec(x_11); x_76 = l_Lean_Meta_mkArrow___closed__2; x_77 = lean_name_append_index_after(x_76, x_75); x_78 = 0; x_79 = lean_local_ctx_mk_local_decl(x_63, x_43, x_77, x_39, x_78); lean_inc(x_45); x_80 = l_Std_HashMapImp_insert___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__3(x_69, x_5, x_45); x_81 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_81, 0, x_62); lean_ctor_set(x_81, 1, x_79); lean_ctor_set(x_81, 2, x_64); lean_ctor_set(x_81, 3, x_65); lean_ctor_set(x_81, 4, x_66); lean_ctor_set(x_81, 5, x_70); lean_ctor_set(x_81, 6, x_68); lean_ctor_set(x_81, 7, x_80); lean_ctor_set(x_41, 1, x_81); lean_ctor_set(x_41, 0, x_45); return x_41; } } } else { lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; uint8_t 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_82 = lean_ctor_get(x_41, 0); x_83 = lean_ctor_get(x_41, 1); lean_inc(x_83); lean_inc(x_82); lean_dec(x_41); lean_inc(x_82); x_84 = l_Lean_mkFVar(x_82); x_85 = lean_ctor_get(x_14, 0); lean_inc(x_85); lean_dec(x_14); x_86 = l_Lean_Name_isAnonymous(x_85); x_87 = lean_ctor_get(x_83, 0); lean_inc(x_87); x_88 = lean_ctor_get(x_83, 1); lean_inc(x_88); x_89 = lean_ctor_get(x_83, 2); lean_inc(x_89); x_90 = lean_ctor_get(x_83, 3); lean_inc(x_90); x_91 = lean_ctor_get(x_83, 4); lean_inc(x_91); x_92 = lean_ctor_get(x_83, 5); lean_inc(x_92); x_93 = lean_ctor_get(x_83, 6); lean_inc(x_93); x_94 = lean_ctor_get(x_83, 7); lean_inc(x_94); if (lean_is_exclusive(x_83)) { lean_ctor_release(x_83, 0); lean_ctor_release(x_83, 1); lean_ctor_release(x_83, 2); lean_ctor_release(x_83, 3); lean_ctor_release(x_83, 4); lean_ctor_release(x_83, 5); lean_ctor_release(x_83, 6); lean_ctor_release(x_83, 7); x_95 = x_83; } else { lean_dec_ref(x_83); x_95 = lean_box(0); } lean_inc(x_84); x_96 = lean_array_push(x_92, x_84); if (x_86 == 0) { uint8_t x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_dec(x_11); x_97 = 0; x_98 = lean_local_ctx_mk_local_decl(x_88, x_82, x_85, x_39, x_97); lean_inc(x_84); x_99 = l_Std_HashMapImp_insert___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__3(x_94, x_5, x_84); if (lean_is_scalar(x_95)) { x_100 = lean_alloc_ctor(0, 8, 0); } else { x_100 = x_95; } lean_ctor_set(x_100, 0, x_87); lean_ctor_set(x_100, 1, x_98); lean_ctor_set(x_100, 2, x_89); lean_ctor_set(x_100, 3, x_90); lean_ctor_set(x_100, 4, x_91); lean_ctor_set(x_100, 5, x_96); lean_ctor_set(x_100, 6, x_93); lean_ctor_set(x_100, 7, x_99); x_101 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_101, 0, x_84); lean_ctor_set(x_101, 1, x_100); return x_101; } else { lean_object* x_102; lean_object* x_103; lean_object* x_104; uint8_t x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_dec(x_85); x_102 = lean_array_get_size(x_11); lean_dec(x_11); x_103 = l_Lean_Meta_mkArrow___closed__2; x_104 = lean_name_append_index_after(x_103, x_102); x_105 = 0; x_106 = lean_local_ctx_mk_local_decl(x_88, x_82, x_104, x_39, x_105); lean_inc(x_84); x_107 = l_Std_HashMapImp_insert___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__3(x_94, x_5, x_84); if (lean_is_scalar(x_95)) { x_108 = lean_alloc_ctor(0, 8, 0); } else { x_108 = x_95; } lean_ctor_set(x_108, 0, x_87); lean_ctor_set(x_108, 1, x_106); lean_ctor_set(x_108, 2, x_89); lean_ctor_set(x_108, 3, x_90); lean_ctor_set(x_108, 4, x_91); lean_ctor_set(x_108, 5, x_96); lean_ctor_set(x_108, 6, x_93); lean_ctor_set(x_108, 7, x_107); x_109 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_109, 0, x_84); lean_ctor_set(x_109, 1, x_108); return x_109; } } } else { lean_object* x_110; lean_dec(x_14); lean_dec(x_11); lean_dec(x_5); x_110 = lean_ctor_get(x_36, 0); lean_inc(x_110); lean_dec(x_36); lean_ctor_set(x_19, 1, x_2); lean_ctor_set(x_19, 0, x_110); return x_19; } } } else { lean_object* x_111; lean_object* x_112; uint8_t x_113; x_111 = lean_ctor_get(x_19, 0); x_112 = lean_ctor_get(x_19, 1); lean_inc(x_112); lean_inc(x_111); lean_dec(x_19); x_113 = lean_expr_eqv(x_1, x_111); lean_dec(x_1); if (x_113 == 0) { lean_object* x_114; lean_object* x_115; lean_dec(x_14); lean_dec(x_5); if (lean_is_exclusive(x_2)) { lean_ctor_release(x_2, 0); lean_ctor_release(x_2, 1); lean_ctor_release(x_2, 2); lean_ctor_release(x_2, 3); lean_ctor_release(x_2, 4); lean_ctor_release(x_2, 5); lean_ctor_release(x_2, 6); lean_ctor_release(x_2, 7); x_114 = x_2; } else { lean_dec_ref(x_2); x_114 = lean_box(0); } if (lean_is_scalar(x_114)) { x_115 = lean_alloc_ctor(0, 8, 0); } else { x_115 = x_114; } lean_ctor_set(x_115, 0, x_6); lean_ctor_set(x_115, 1, x_7); lean_ctor_set(x_115, 2, x_112); lean_ctor_set(x_115, 3, x_9); lean_ctor_set(x_115, 4, x_10); lean_ctor_set(x_115, 5, x_11); lean_ctor_set(x_115, 6, x_12); lean_ctor_set(x_115, 7, x_13); x_1 = x_111; x_2 = x_115; goto _start; } else { lean_object* x_117; lean_dec(x_112); lean_dec(x_111); lean_dec(x_12); lean_dec(x_10); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); x_117 = l_Std_HashMapImp_find_x3f___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__1(x_13, x_5); lean_dec(x_13); if (lean_obj_tag(x_117) == 0) { 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; uint8_t 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; x_118 = lean_ctor_get(x_14, 2); lean_inc(x_118); x_119 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_118, x_2); 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_Meta_AbstractMVars_mkFreshId(x_121); x_123 = lean_ctor_get(x_122, 0); lean_inc(x_123); x_124 = lean_ctor_get(x_122, 1); lean_inc(x_124); if (lean_is_exclusive(x_122)) { lean_ctor_release(x_122, 0); lean_ctor_release(x_122, 1); x_125 = x_122; } else { lean_dec_ref(x_122); x_125 = lean_box(0); } lean_inc(x_123); x_126 = l_Lean_mkFVar(x_123); x_127 = lean_ctor_get(x_14, 0); lean_inc(x_127); lean_dec(x_14); x_128 = l_Lean_Name_isAnonymous(x_127); x_129 = lean_ctor_get(x_124, 0); lean_inc(x_129); x_130 = lean_ctor_get(x_124, 1); lean_inc(x_130); x_131 = lean_ctor_get(x_124, 2); lean_inc(x_131); x_132 = lean_ctor_get(x_124, 3); lean_inc(x_132); x_133 = lean_ctor_get(x_124, 4); lean_inc(x_133); x_134 = lean_ctor_get(x_124, 5); lean_inc(x_134); x_135 = lean_ctor_get(x_124, 6); lean_inc(x_135); x_136 = lean_ctor_get(x_124, 7); lean_inc(x_136); if (lean_is_exclusive(x_124)) { lean_ctor_release(x_124, 0); lean_ctor_release(x_124, 1); lean_ctor_release(x_124, 2); lean_ctor_release(x_124, 3); lean_ctor_release(x_124, 4); lean_ctor_release(x_124, 5); lean_ctor_release(x_124, 6); lean_ctor_release(x_124, 7); x_137 = x_124; } else { lean_dec_ref(x_124); x_137 = lean_box(0); } lean_inc(x_126); x_138 = lean_array_push(x_134, x_126); if (x_128 == 0) { uint8_t x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_dec(x_11); x_139 = 0; x_140 = lean_local_ctx_mk_local_decl(x_130, x_123, x_127, x_120, x_139); lean_inc(x_126); x_141 = l_Std_HashMapImp_insert___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__3(x_136, x_5, x_126); if (lean_is_scalar(x_137)) { x_142 = lean_alloc_ctor(0, 8, 0); } else { x_142 = x_137; } lean_ctor_set(x_142, 0, x_129); lean_ctor_set(x_142, 1, x_140); lean_ctor_set(x_142, 2, x_131); lean_ctor_set(x_142, 3, x_132); lean_ctor_set(x_142, 4, x_133); lean_ctor_set(x_142, 5, x_138); lean_ctor_set(x_142, 6, x_135); lean_ctor_set(x_142, 7, x_141); if (lean_is_scalar(x_125)) { x_143 = lean_alloc_ctor(0, 2, 0); } else { x_143 = x_125; } lean_ctor_set(x_143, 0, x_126); lean_ctor_set(x_143, 1, x_142); return x_143; } else { lean_object* x_144; lean_object* x_145; lean_object* x_146; uint8_t x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_dec(x_127); x_144 = lean_array_get_size(x_11); lean_dec(x_11); x_145 = l_Lean_Meta_mkArrow___closed__2; x_146 = lean_name_append_index_after(x_145, x_144); x_147 = 0; x_148 = lean_local_ctx_mk_local_decl(x_130, x_123, x_146, x_120, x_147); lean_inc(x_126); x_149 = l_Std_HashMapImp_insert___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__3(x_136, x_5, x_126); if (lean_is_scalar(x_137)) { x_150 = lean_alloc_ctor(0, 8, 0); } else { x_150 = x_137; } lean_ctor_set(x_150, 0, x_129); lean_ctor_set(x_150, 1, x_148); lean_ctor_set(x_150, 2, x_131); lean_ctor_set(x_150, 3, x_132); lean_ctor_set(x_150, 4, x_133); lean_ctor_set(x_150, 5, x_138); lean_ctor_set(x_150, 6, x_135); lean_ctor_set(x_150, 7, x_149); if (lean_is_scalar(x_125)) { x_151 = lean_alloc_ctor(0, 2, 0); } else { x_151 = x_125; } lean_ctor_set(x_151, 0, x_126); lean_ctor_set(x_151, 1, x_150); return x_151; } } else { lean_object* x_152; lean_object* x_153; lean_dec(x_14); lean_dec(x_11); lean_dec(x_5); x_152 = lean_ctor_get(x_117, 0); lean_inc(x_152); lean_dec(x_117); x_153 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_153, 0, x_152); lean_ctor_set(x_153, 1, x_2); return x_153; } } } } } case 3: { uint8_t x_154; x_154 = !lean_is_exclusive(x_1); if (x_154 == 0) { lean_object* x_155; lean_object* x_156; uint8_t x_157; x_155 = lean_ctor_get(x_1, 0); lean_inc(x_155); x_156 = l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars(x_155, x_2); x_157 = !lean_is_exclusive(x_156); if (x_157 == 0) { lean_object* x_158; lean_object* x_159; x_158 = lean_ctor_get(x_156, 0); x_159 = lean_expr_update_sort(x_1, x_158); lean_ctor_set(x_156, 0, x_159); return x_156; } else { lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; x_160 = lean_ctor_get(x_156, 0); x_161 = lean_ctor_get(x_156, 1); lean_inc(x_161); lean_inc(x_160); lean_dec(x_156); x_162 = lean_expr_update_sort(x_1, x_160); x_163 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_163, 0, x_162); lean_ctor_set(x_163, 1, x_161); return x_163; } } else { lean_object* x_164; uint64_t x_165; 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; x_164 = lean_ctor_get(x_1, 0); x_165 = lean_ctor_get_uint64(x_1, sizeof(void*)*1); lean_inc(x_164); lean_dec(x_1); lean_inc(x_164); x_166 = l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars(x_164, x_2); x_167 = lean_ctor_get(x_166, 0); lean_inc(x_167); x_168 = lean_ctor_get(x_166, 1); lean_inc(x_168); if (lean_is_exclusive(x_166)) { lean_ctor_release(x_166, 0); lean_ctor_release(x_166, 1); x_169 = x_166; } else { lean_dec_ref(x_166); x_169 = lean_box(0); } x_170 = lean_alloc_ctor(3, 1, 8); lean_ctor_set(x_170, 0, x_164); lean_ctor_set_uint64(x_170, sizeof(void*)*1, x_165); x_171 = lean_expr_update_sort(x_170, x_167); if (lean_is_scalar(x_169)) { x_172 = lean_alloc_ctor(0, 2, 0); } else { x_172 = x_169; } lean_ctor_set(x_172, 0, x_171); lean_ctor_set(x_172, 1, x_168); return x_172; } } case 4: { uint8_t x_173; x_173 = !lean_is_exclusive(x_1); if (x_173 == 0) { lean_object* x_174; lean_object* x_175; uint8_t x_176; x_174 = lean_ctor_get(x_1, 1); lean_inc(x_174); x_175 = l_List_mapM___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__9(x_174, x_2); x_176 = !lean_is_exclusive(x_175); if (x_176 == 0) { lean_object* x_177; lean_object* x_178; x_177 = lean_ctor_get(x_175, 0); x_178 = lean_expr_update_const(x_1, x_177); lean_ctor_set(x_175, 0, x_178); return x_175; } else { lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; x_179 = lean_ctor_get(x_175, 0); x_180 = lean_ctor_get(x_175, 1); lean_inc(x_180); lean_inc(x_179); lean_dec(x_175); x_181 = lean_expr_update_const(x_1, x_179); x_182 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_182, 0, x_181); lean_ctor_set(x_182, 1, x_180); return x_182; } } else { lean_object* x_183; lean_object* x_184; uint64_t 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_183 = lean_ctor_get(x_1, 0); x_184 = lean_ctor_get(x_1, 1); x_185 = lean_ctor_get_uint64(x_1, sizeof(void*)*2); lean_inc(x_184); lean_inc(x_183); lean_dec(x_1); lean_inc(x_184); x_186 = l_List_mapM___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__9(x_184, x_2); x_187 = lean_ctor_get(x_186, 0); lean_inc(x_187); x_188 = lean_ctor_get(x_186, 1); lean_inc(x_188); if (lean_is_exclusive(x_186)) { lean_ctor_release(x_186, 0); lean_ctor_release(x_186, 1); x_189 = x_186; } else { lean_dec_ref(x_186); x_189 = lean_box(0); } x_190 = lean_alloc_ctor(4, 2, 8); lean_ctor_set(x_190, 0, x_183); lean_ctor_set(x_190, 1, x_184); lean_ctor_set_uint64(x_190, sizeof(void*)*2, x_185); x_191 = lean_expr_update_const(x_190, x_187); if (lean_is_scalar(x_189)) { x_192 = lean_alloc_ctor(0, 2, 0); } else { x_192 = x_189; } lean_ctor_set(x_192, 0, x_191); lean_ctor_set(x_192, 1, x_188); return x_192; } } case 5: { uint8_t x_193; x_193 = !lean_is_exclusive(x_1); if (x_193 == 0) { 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; x_194 = lean_ctor_get(x_1, 0); x_195 = lean_ctor_get(x_1, 1); lean_inc(x_194); x_196 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_194, x_2); x_197 = lean_ctor_get(x_196, 0); lean_inc(x_197); x_198 = lean_ctor_get(x_196, 1); lean_inc(x_198); lean_dec(x_196); lean_inc(x_195); x_199 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_195, x_198); x_200 = !lean_is_exclusive(x_199); if (x_200 == 0) { lean_object* x_201; lean_object* x_202; x_201 = lean_ctor_get(x_199, 0); x_202 = lean_expr_update_app(x_1, x_197, x_201); lean_ctor_set(x_199, 0, x_202); return x_199; } else { lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; x_203 = lean_ctor_get(x_199, 0); x_204 = lean_ctor_get(x_199, 1); lean_inc(x_204); lean_inc(x_203); lean_dec(x_199); x_205 = lean_expr_update_app(x_1, x_197, x_203); x_206 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_206, 0, x_205); lean_ctor_set(x_206, 1, x_204); return x_206; } } else { lean_object* x_207; lean_object* x_208; uint64_t x_209; lean_object* x_210; lean_object* x_211; 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; x_207 = lean_ctor_get(x_1, 0); x_208 = lean_ctor_get(x_1, 1); x_209 = lean_ctor_get_uint64(x_1, sizeof(void*)*2); lean_inc(x_208); lean_inc(x_207); lean_dec(x_1); lean_inc(x_207); x_210 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_207, x_2); x_211 = lean_ctor_get(x_210, 0); lean_inc(x_211); x_212 = lean_ctor_get(x_210, 1); lean_inc(x_212); lean_dec(x_210); lean_inc(x_208); x_213 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_208, x_212); x_214 = lean_ctor_get(x_213, 0); lean_inc(x_214); x_215 = lean_ctor_get(x_213, 1); lean_inc(x_215); if (lean_is_exclusive(x_213)) { lean_ctor_release(x_213, 0); lean_ctor_release(x_213, 1); x_216 = x_213; } else { lean_dec_ref(x_213); x_216 = lean_box(0); } x_217 = lean_alloc_ctor(5, 2, 8); lean_ctor_set(x_217, 0, x_207); lean_ctor_set(x_217, 1, x_208); lean_ctor_set_uint64(x_217, sizeof(void*)*2, x_209); x_218 = lean_expr_update_app(x_217, x_211, x_214); if (lean_is_scalar(x_216)) { x_219 = lean_alloc_ctor(0, 2, 0); } else { x_219 = x_216; } lean_ctor_set(x_219, 0, x_218); lean_ctor_set(x_219, 1, x_215); return x_219; } } case 6: { uint8_t x_220; x_220 = !lean_is_exclusive(x_1); if (x_220 == 0) { lean_object* x_221; lean_object* x_222; uint64_t x_223; lean_object* x_224; lean_object* x_225; lean_object* x_226; lean_object* x_227; uint8_t x_228; x_221 = lean_ctor_get(x_1, 1); x_222 = lean_ctor_get(x_1, 2); x_223 = lean_ctor_get_uint64(x_1, sizeof(void*)*3); lean_inc(x_221); x_224 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_221, x_2); x_225 = lean_ctor_get(x_224, 0); lean_inc(x_225); x_226 = lean_ctor_get(x_224, 1); lean_inc(x_226); lean_dec(x_224); lean_inc(x_222); x_227 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_222, x_226); x_228 = !lean_is_exclusive(x_227); if (x_228 == 0) { lean_object* x_229; uint8_t x_230; lean_object* x_231; x_229 = lean_ctor_get(x_227, 0); x_230 = (uint8_t)((x_223 << 24) >> 61); x_231 = lean_expr_update_lambda(x_1, x_230, x_225, x_229); lean_ctor_set(x_227, 0, x_231); return x_227; } else { lean_object* x_232; lean_object* x_233; uint8_t x_234; lean_object* x_235; lean_object* x_236; x_232 = lean_ctor_get(x_227, 0); x_233 = lean_ctor_get(x_227, 1); lean_inc(x_233); lean_inc(x_232); lean_dec(x_227); x_234 = (uint8_t)((x_223 << 24) >> 61); x_235 = lean_expr_update_lambda(x_1, x_234, x_225, x_232); x_236 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_236, 0, x_235); lean_ctor_set(x_236, 1, x_233); return x_236; } } else { lean_object* x_237; lean_object* x_238; lean_object* x_239; uint64_t 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; lean_object* x_247; lean_object* x_248; uint8_t x_249; lean_object* x_250; lean_object* x_251; x_237 = lean_ctor_get(x_1, 0); x_238 = lean_ctor_get(x_1, 1); x_239 = lean_ctor_get(x_1, 2); x_240 = lean_ctor_get_uint64(x_1, sizeof(void*)*3); lean_inc(x_239); lean_inc(x_238); lean_inc(x_237); lean_dec(x_1); lean_inc(x_238); x_241 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_238, x_2); x_242 = lean_ctor_get(x_241, 0); lean_inc(x_242); x_243 = lean_ctor_get(x_241, 1); lean_inc(x_243); lean_dec(x_241); lean_inc(x_239); x_244 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_239, x_243); 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 = lean_alloc_ctor(6, 3, 8); lean_ctor_set(x_248, 0, x_237); lean_ctor_set(x_248, 1, x_238); lean_ctor_set(x_248, 2, x_239); lean_ctor_set_uint64(x_248, sizeof(void*)*3, x_240); x_249 = (uint8_t)((x_240 << 24) >> 61); x_250 = lean_expr_update_lambda(x_248, x_249, x_242, x_245); if (lean_is_scalar(x_247)) { x_251 = lean_alloc_ctor(0, 2, 0); } else { x_251 = x_247; } lean_ctor_set(x_251, 0, x_250); lean_ctor_set(x_251, 1, x_246); return x_251; } } case 7: { uint8_t x_252; x_252 = !lean_is_exclusive(x_1); if (x_252 == 0) { lean_object* x_253; lean_object* x_254; uint64_t x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; lean_object* x_259; uint8_t x_260; x_253 = lean_ctor_get(x_1, 1); x_254 = lean_ctor_get(x_1, 2); x_255 = lean_ctor_get_uint64(x_1, sizeof(void*)*3); lean_inc(x_253); x_256 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_253, x_2); x_257 = lean_ctor_get(x_256, 0); lean_inc(x_257); x_258 = lean_ctor_get(x_256, 1); lean_inc(x_258); lean_dec(x_256); lean_inc(x_254); x_259 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_254, x_258); x_260 = !lean_is_exclusive(x_259); if (x_260 == 0) { lean_object* x_261; uint8_t x_262; lean_object* x_263; x_261 = lean_ctor_get(x_259, 0); x_262 = (uint8_t)((x_255 << 24) >> 61); x_263 = lean_expr_update_forall(x_1, x_262, x_257, x_261); lean_ctor_set(x_259, 0, x_263); return x_259; } else { lean_object* x_264; lean_object* x_265; uint8_t x_266; lean_object* x_267; lean_object* x_268; x_264 = lean_ctor_get(x_259, 0); x_265 = lean_ctor_get(x_259, 1); lean_inc(x_265); lean_inc(x_264); lean_dec(x_259); x_266 = (uint8_t)((x_255 << 24) >> 61); x_267 = lean_expr_update_forall(x_1, x_266, x_257, x_264); x_268 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_268, 0, x_267); lean_ctor_set(x_268, 1, x_265); return x_268; } } else { lean_object* x_269; lean_object* x_270; lean_object* x_271; uint64_t 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; uint8_t x_281; lean_object* x_282; lean_object* x_283; x_269 = lean_ctor_get(x_1, 0); x_270 = lean_ctor_get(x_1, 1); x_271 = lean_ctor_get(x_1, 2); x_272 = lean_ctor_get_uint64(x_1, sizeof(void*)*3); lean_inc(x_271); lean_inc(x_270); lean_inc(x_269); lean_dec(x_1); lean_inc(x_270); x_273 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_270, x_2); x_274 = lean_ctor_get(x_273, 0); lean_inc(x_274); x_275 = lean_ctor_get(x_273, 1); lean_inc(x_275); lean_dec(x_273); lean_inc(x_271); x_276 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_271, x_275); 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 = lean_alloc_ctor(7, 3, 8); lean_ctor_set(x_280, 0, x_269); lean_ctor_set(x_280, 1, x_270); lean_ctor_set(x_280, 2, x_271); lean_ctor_set_uint64(x_280, sizeof(void*)*3, x_272); x_281 = (uint8_t)((x_272 << 24) >> 61); x_282 = lean_expr_update_forall(x_280, x_281, x_274, x_277); 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; } } case 8: { uint8_t x_284; x_284 = !lean_is_exclusive(x_1); if (x_284 == 0) { lean_object* x_285; lean_object* x_286; lean_object* x_287; 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; uint8_t x_295; x_285 = lean_ctor_get(x_1, 1); x_286 = lean_ctor_get(x_1, 2); x_287 = lean_ctor_get(x_1, 3); lean_inc(x_285); x_288 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_285, x_2); 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); lean_inc(x_286); x_291 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_286, x_290); 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); lean_inc(x_287); x_294 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_287, x_293); x_295 = !lean_is_exclusive(x_294); if (x_295 == 0) { lean_object* x_296; lean_object* x_297; x_296 = lean_ctor_get(x_294, 0); x_297 = lean_expr_update_let(x_1, x_289, x_292, x_296); lean_ctor_set(x_294, 0, x_297); return x_294; } else { lean_object* x_298; lean_object* x_299; lean_object* x_300; lean_object* x_301; x_298 = lean_ctor_get(x_294, 0); x_299 = lean_ctor_get(x_294, 1); lean_inc(x_299); lean_inc(x_298); lean_dec(x_294); x_300 = lean_expr_update_let(x_1, x_289, x_292, x_298); x_301 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_301, 0, x_300); lean_ctor_set(x_301, 1, x_299); return x_301; } } else { lean_object* x_302; lean_object* x_303; lean_object* x_304; lean_object* x_305; uint64_t 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; lean_object* x_316; lean_object* x_317; lean_object* x_318; lean_object* x_319; x_302 = lean_ctor_get(x_1, 0); x_303 = lean_ctor_get(x_1, 1); x_304 = lean_ctor_get(x_1, 2); x_305 = lean_ctor_get(x_1, 3); x_306 = lean_ctor_get_uint64(x_1, sizeof(void*)*4); lean_inc(x_305); lean_inc(x_304); lean_inc(x_303); lean_inc(x_302); lean_dec(x_1); lean_inc(x_303); x_307 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_303, x_2); x_308 = lean_ctor_get(x_307, 0); lean_inc(x_308); x_309 = lean_ctor_get(x_307, 1); lean_inc(x_309); lean_dec(x_307); lean_inc(x_304); x_310 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_304, x_309); x_311 = lean_ctor_get(x_310, 0); lean_inc(x_311); x_312 = lean_ctor_get(x_310, 1); lean_inc(x_312); lean_dec(x_310); lean_inc(x_305); x_313 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_305, x_312); x_314 = lean_ctor_get(x_313, 0); lean_inc(x_314); x_315 = lean_ctor_get(x_313, 1); lean_inc(x_315); if (lean_is_exclusive(x_313)) { lean_ctor_release(x_313, 0); lean_ctor_release(x_313, 1); x_316 = x_313; } else { lean_dec_ref(x_313); x_316 = lean_box(0); } x_317 = lean_alloc_ctor(8, 4, 8); lean_ctor_set(x_317, 0, x_302); lean_ctor_set(x_317, 1, x_303); lean_ctor_set(x_317, 2, x_304); lean_ctor_set(x_317, 3, x_305); lean_ctor_set_uint64(x_317, sizeof(void*)*4, x_306); x_318 = lean_expr_update_let(x_317, x_308, x_311, x_314); if (lean_is_scalar(x_316)) { x_319 = lean_alloc_ctor(0, 2, 0); } else { x_319 = x_316; } lean_ctor_set(x_319, 0, x_318); lean_ctor_set(x_319, 1, x_315); return x_319; } } case 10: { uint8_t x_320; x_320 = !lean_is_exclusive(x_1); if (x_320 == 0) { lean_object* x_321; lean_object* x_322; uint8_t x_323; x_321 = lean_ctor_get(x_1, 1); lean_inc(x_321); x_322 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_321, x_2); x_323 = !lean_is_exclusive(x_322); if (x_323 == 0) { lean_object* x_324; lean_object* x_325; x_324 = lean_ctor_get(x_322, 0); x_325 = lean_expr_update_mdata(x_1, x_324); lean_ctor_set(x_322, 0, x_325); return x_322; } else { lean_object* x_326; lean_object* x_327; lean_object* x_328; lean_object* x_329; x_326 = lean_ctor_get(x_322, 0); x_327 = lean_ctor_get(x_322, 1); lean_inc(x_327); lean_inc(x_326); lean_dec(x_322); x_328 = lean_expr_update_mdata(x_1, x_326); x_329 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_329, 0, x_328); lean_ctor_set(x_329, 1, x_327); return x_329; } } else { lean_object* x_330; lean_object* x_331; uint64_t 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_330 = lean_ctor_get(x_1, 0); x_331 = lean_ctor_get(x_1, 1); x_332 = lean_ctor_get_uint64(x_1, sizeof(void*)*2); lean_inc(x_331); lean_inc(x_330); lean_dec(x_1); lean_inc(x_331); x_333 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_331, x_2); x_334 = lean_ctor_get(x_333, 0); lean_inc(x_334); x_335 = lean_ctor_get(x_333, 1); lean_inc(x_335); if (lean_is_exclusive(x_333)) { lean_ctor_release(x_333, 0); lean_ctor_release(x_333, 1); x_336 = x_333; } else { lean_dec_ref(x_333); x_336 = lean_box(0); } x_337 = lean_alloc_ctor(10, 2, 8); lean_ctor_set(x_337, 0, x_330); lean_ctor_set(x_337, 1, x_331); lean_ctor_set_uint64(x_337, sizeof(void*)*2, x_332); x_338 = lean_expr_update_mdata(x_337, x_334); if (lean_is_scalar(x_336)) { x_339 = lean_alloc_ctor(0, 2, 0); } else { x_339 = x_336; } lean_ctor_set(x_339, 0, x_338); lean_ctor_set(x_339, 1, x_335); return x_339; } } case 11: { uint8_t x_340; x_340 = !lean_is_exclusive(x_1); if (x_340 == 0) { lean_object* x_341; lean_object* x_342; uint8_t x_343; x_341 = lean_ctor_get(x_1, 2); lean_inc(x_341); x_342 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_341, x_2); x_343 = !lean_is_exclusive(x_342); if (x_343 == 0) { lean_object* x_344; lean_object* x_345; x_344 = lean_ctor_get(x_342, 0); x_345 = lean_expr_update_proj(x_1, x_344); lean_ctor_set(x_342, 0, x_345); return x_342; } else { lean_object* x_346; lean_object* x_347; lean_object* x_348; lean_object* x_349; x_346 = lean_ctor_get(x_342, 0); x_347 = lean_ctor_get(x_342, 1); lean_inc(x_347); lean_inc(x_346); lean_dec(x_342); x_348 = lean_expr_update_proj(x_1, x_346); x_349 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_349, 0, x_348); lean_ctor_set(x_349, 1, x_347); return x_349; } } else { lean_object* x_350; lean_object* x_351; lean_object* x_352; uint64_t x_353; 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; x_350 = lean_ctor_get(x_1, 0); x_351 = lean_ctor_get(x_1, 1); x_352 = lean_ctor_get(x_1, 2); x_353 = lean_ctor_get_uint64(x_1, sizeof(void*)*3); lean_inc(x_352); lean_inc(x_351); lean_inc(x_350); lean_dec(x_1); lean_inc(x_352); x_354 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_352, x_2); 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 = lean_alloc_ctor(11, 3, 8); lean_ctor_set(x_358, 0, x_350); lean_ctor_set(x_358, 1, x_351); lean_ctor_set(x_358, 2, x_352); lean_ctor_set_uint64(x_358, sizeof(void*)*3, x_353); x_359 = lean_expr_update_proj(x_358, x_355); if (lean_is_scalar(x_357)) { x_360 = lean_alloc_ctor(0, 2, 0); } else { x_360 = x_357; } lean_ctor_set(x_360, 0, x_359); lean_ctor_set(x_360, 1, x_356); return x_360; } } default: { lean_object* x_361; x_361 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_361, 0, x_1); lean_ctor_set(x_361, 1, x_2); return x_361; } } } } } lean_object* l_Std_AssocList_find_x3f___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__2___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Std_AssocList_find_x3f___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__2(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l_Std_HashMapImp_find_x3f___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Std_HashMapImp_find_x3f___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l_Std_AssocList_contains___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__4___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l_Std_AssocList_contains___at_Lean_Meta_AbstractMVars_abstractExprMVars___spec__4(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } lean_object* l_Lean_Meta_abstractMVars_match__1___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_2(x_2, x_3, x_4); return x_5; } } lean_object* l_Lean_Meta_abstractMVars_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Meta_abstractMVars_match__1___rarg), 2, 0); return x_2; } } lean_object* l_Lean_Meta_abstractMVars(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); x_7 = l_Lean_Meta_instantiateMVars(x_1, x_2, x_3, x_4, x_5, x_6); if (lean_obj_tag(x_7) == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; x_8 = lean_ctor_get(x_7, 0); lean_inc(x_8); x_9 = lean_ctor_get(x_7, 1); lean_inc(x_9); lean_dec(x_7); x_10 = lean_st_ref_get(x_5, x_9); x_11 = lean_ctor_get(x_10, 1); lean_inc(x_11); lean_dec(x_10); x_12 = lean_st_ref_get(x_3, x_11); x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_12, 1); lean_inc(x_14); lean_dec(x_12); x_15 = lean_ctor_get(x_13, 0); lean_inc(x_15); lean_dec(x_13); x_16 = lean_ctor_get(x_2, 1); lean_inc(x_16); x_17 = lean_st_ref_get(x_5, x_14); x_18 = lean_ctor_get(x_17, 0); lean_inc(x_18); x_19 = lean_ctor_get(x_17, 1); lean_inc(x_19); lean_dec(x_17); x_20 = lean_ctor_get(x_18, 2); lean_inc(x_20); lean_dec(x_18); x_21 = lean_unsigned_to_nat(0u); x_22 = l_Array_empty___closed__1; x_23 = l_Std_HashMap_instInhabitedHashMap___closed__1; x_24 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_24, 0, x_20); lean_ctor_set(x_24, 1, x_16); lean_ctor_set(x_24, 2, x_15); lean_ctor_set(x_24, 3, x_21); lean_ctor_set(x_24, 4, x_22); lean_ctor_set(x_24, 5, x_22); lean_ctor_set(x_24, 6, x_23); lean_ctor_set(x_24, 7, x_23); x_25 = l_Lean_Meta_AbstractMVars_abstractExprMVars(x_8, x_24); x_26 = lean_ctor_get(x_25, 0); lean_inc(x_26); x_27 = lean_ctor_get(x_25, 1); lean_inc(x_27); lean_dec(x_25); x_28 = lean_ctor_get(x_27, 0); lean_inc(x_28); x_29 = lean_st_ref_take(x_5, x_19); x_30 = lean_ctor_get(x_29, 0); lean_inc(x_30); x_31 = lean_ctor_get(x_29, 1); lean_inc(x_31); lean_dec(x_29); x_32 = !lean_is_exclusive(x_30); if (x_32 == 0) { lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; uint8_t x_38; x_33 = lean_ctor_get(x_30, 2); lean_dec(x_33); lean_ctor_set(x_30, 2, x_28); x_34 = lean_st_ref_set(x_5, x_30, x_31); x_35 = lean_ctor_get(x_34, 1); lean_inc(x_35); lean_dec(x_34); x_36 = lean_ctor_get(x_27, 2); lean_inc(x_36); x_37 = l_Lean_Meta_setMCtx(x_36, x_2, x_3, x_4, x_5, x_35); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_38 = !lean_is_exclusive(x_37); if (x_38 == 0) { lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; x_39 = lean_ctor_get(x_37, 0); lean_dec(x_39); x_40 = lean_ctor_get(x_27, 1); lean_inc(x_40); x_41 = lean_ctor_get(x_27, 5); lean_inc(x_41); x_42 = l_Lean_LocalContext_mkLambda(x_40, x_41, x_26); lean_dec(x_26); x_43 = lean_ctor_get(x_27, 4); lean_inc(x_43); lean_dec(x_27); x_44 = lean_array_get_size(x_41); lean_dec(x_41); x_45 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_45, 0, x_43); lean_ctor_set(x_45, 1, x_44); lean_ctor_set(x_45, 2, x_42); lean_ctor_set(x_37, 0, x_45); return x_37; } else { 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; x_46 = lean_ctor_get(x_37, 1); lean_inc(x_46); lean_dec(x_37); x_47 = lean_ctor_get(x_27, 1); lean_inc(x_47); x_48 = lean_ctor_get(x_27, 5); lean_inc(x_48); x_49 = l_Lean_LocalContext_mkLambda(x_47, x_48, x_26); lean_dec(x_26); x_50 = lean_ctor_get(x_27, 4); lean_inc(x_50); lean_dec(x_27); x_51 = lean_array_get_size(x_48); lean_dec(x_48); x_52 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_52, 0, x_50); lean_ctor_set(x_52, 1, x_51); lean_ctor_set(x_52, 2, x_49); x_53 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_53, 0, x_52); lean_ctor_set(x_53, 1, x_46); return x_53; } } else { lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; 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; lean_object* x_69; lean_object* x_70; x_54 = lean_ctor_get(x_30, 0); x_55 = lean_ctor_get(x_30, 1); x_56 = lean_ctor_get(x_30, 3); lean_inc(x_56); lean_inc(x_55); lean_inc(x_54); lean_dec(x_30); x_57 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_57, 0, x_54); lean_ctor_set(x_57, 1, x_55); lean_ctor_set(x_57, 2, x_28); lean_ctor_set(x_57, 3, x_56); x_58 = lean_st_ref_set(x_5, x_57, x_31); x_59 = lean_ctor_get(x_58, 1); lean_inc(x_59); lean_dec(x_58); x_60 = lean_ctor_get(x_27, 2); lean_inc(x_60); x_61 = l_Lean_Meta_setMCtx(x_60, x_2, x_3, x_4, x_5, x_59); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_62 = lean_ctor_get(x_61, 1); lean_inc(x_62); if (lean_is_exclusive(x_61)) { lean_ctor_release(x_61, 0); lean_ctor_release(x_61, 1); x_63 = x_61; } else { lean_dec_ref(x_61); x_63 = lean_box(0); } x_64 = lean_ctor_get(x_27, 1); lean_inc(x_64); x_65 = lean_ctor_get(x_27, 5); lean_inc(x_65); x_66 = l_Lean_LocalContext_mkLambda(x_64, x_65, x_26); lean_dec(x_26); x_67 = lean_ctor_get(x_27, 4); lean_inc(x_67); lean_dec(x_27); x_68 = lean_array_get_size(x_65); lean_dec(x_65); x_69 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_69, 0, x_67); lean_ctor_set(x_69, 1, x_68); lean_ctor_set(x_69, 2, x_66); if (lean_is_scalar(x_63)) { x_70 = lean_alloc_ctor(0, 2, 0); } else { x_70 = x_63; } lean_ctor_set(x_70, 0, x_69); lean_ctor_set(x_70, 1, x_62); return x_70; } } else { uint8_t x_71; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_71 = !lean_is_exclusive(x_7); if (x_71 == 0) { return x_7; } else { lean_object* x_72; lean_object* x_73; lean_object* x_74; x_72 = lean_ctor_get(x_7, 0); x_73 = lean_ctor_get(x_7, 1); lean_inc(x_73); lean_inc(x_72); lean_dec(x_7); x_74 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_74, 0, x_72); lean_ctor_set(x_74, 1, x_73); return x_74; } } } } lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_openAbstractMVarsResult___spec__1(size_t x_1, size_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { uint8_t x_9; x_9 = x_2 < x_1; if (x_9 == 0) { lean_object* x_10; lean_object* x_11; x_10 = x_3; x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_8); return x_11; } else { lean_object* x_12; lean_object* x_13; 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; x_12 = lean_unsigned_to_nat(0u); x_13 = lean_array_uset(x_3, x_2, x_12); x_14 = l_Lean_Meta_mkFreshLevelMVar___rarg(x_5, x_6, x_7, x_8); x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); x_16 = lean_ctor_get(x_14, 1); lean_inc(x_16); lean_dec(x_14); x_17 = 1; x_18 = x_2 + x_17; x_19 = x_15; x_20 = lean_array_uset(x_13, x_2, x_19); x_2 = x_18; x_3 = x_20; x_8 = x_16; goto _start; } } } static lean_object* _init_l_Lean_Meta_openAbstractMVarsResult___boxed__const__1() { _start: { size_t x_1; lean_object* x_2; x_1 = 0; x_2 = lean_box_usize(x_1); return x_2; } } lean_object* l_Lean_Meta_openAbstractMVarsResult(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; size_t 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; x_7 = lean_ctor_get(x_1, 0); lean_inc(x_7); x_8 = lean_array_get_size(x_7); x_9 = lean_usize_of_nat(x_8); lean_dec(x_8); lean_inc(x_7); x_10 = x_7; x_11 = lean_box_usize(x_9); x_12 = l_Lean_Meta_openAbstractMVarsResult___boxed__const__1; x_13 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at_Lean_Meta_openAbstractMVarsResult___spec__1___boxed), 8, 3); lean_closure_set(x_13, 0, x_11); lean_closure_set(x_13, 1, x_12); lean_closure_set(x_13, 2, x_10); x_14 = x_13; lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); x_15 = lean_apply_5(x_14, x_2, x_3, x_4, x_5, x_6); if (lean_obj_tag(x_15) == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); x_17 = lean_ctor_get(x_15, 1); lean_inc(x_17); lean_dec(x_15); x_18 = lean_ctor_get(x_1, 2); lean_inc(x_18); x_19 = l_Lean_Expr_instantiateLevelParamsCore_visit___at_Lean_Expr_instantiateLevelParamsArray___spec__1(x_7, x_16, x_18); lean_dec(x_16); lean_dec(x_7); x_20 = lean_ctor_get(x_1, 1); lean_inc(x_20); lean_dec(x_1); x_21 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_21, 0, x_20); x_22 = l_Lean_Meta_lambdaMetaTelescope(x_19, x_21, x_2, x_3, x_4, x_5, x_17); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_21); lean_dec(x_19); return x_22; } else { uint8_t x_23; lean_dec(x_7); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_23 = !lean_is_exclusive(x_15); if (x_23 == 0) { return x_15; } else { lean_object* x_24; lean_object* x_25; lean_object* x_26; x_24 = lean_ctor_get(x_15, 0); x_25 = lean_ctor_get(x_15, 1); lean_inc(x_25); lean_inc(x_24); lean_dec(x_15); x_26 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_26, 0, x_24); lean_ctor_set(x_26, 1, x_25); return x_26; } } } } lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_openAbstractMVarsResult___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { size_t x_9; size_t x_10; lean_object* x_11; x_9 = lean_unbox_usize(x_1); lean_dec(x_1); x_10 = lean_unbox_usize(x_2); lean_dec(x_2); x_11 = l_Array_mapMUnsafe_map___at_Lean_Meta_openAbstractMVarsResult___spec__1(x_9, x_10, 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); return x_11; } } lean_object* initialize_Init(lean_object*); lean_object* initialize_Lean_Meta_Basic(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Meta_AbstractMVars(lean_object* w) { lean_object * res; if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); _G_initialized = true; res = initialize_Init(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Meta_Basic(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_Meta_instInhabitedAbstractMVarsResult___closed__1 = _init_l_Lean_Meta_instInhabitedAbstractMVarsResult___closed__1(); lean_mark_persistent(l_Lean_Meta_instInhabitedAbstractMVarsResult___closed__1); l_Lean_Meta_instInhabitedAbstractMVarsResult = _init_l_Lean_Meta_instInhabitedAbstractMVarsResult(); lean_mark_persistent(l_Lean_Meta_instInhabitedAbstractMVarsResult); l_Lean_Meta_instBEqAbstractMVarsResult___closed__1 = _init_l_Lean_Meta_instBEqAbstractMVarsResult___closed__1(); lean_mark_persistent(l_Lean_Meta_instBEqAbstractMVarsResult___closed__1); l_Lean_Meta_instBEqAbstractMVarsResult = _init_l_Lean_Meta_instBEqAbstractMVarsResult(); lean_mark_persistent(l_Lean_Meta_instBEqAbstractMVarsResult); l_Lean_Meta_AbstractMVars_State_nextParamIdx___default = _init_l_Lean_Meta_AbstractMVars_State_nextParamIdx___default(); lean_mark_persistent(l_Lean_Meta_AbstractMVars_State_nextParamIdx___default); l_Lean_Meta_AbstractMVars_State_paramNames___default = _init_l_Lean_Meta_AbstractMVars_State_paramNames___default(); lean_mark_persistent(l_Lean_Meta_AbstractMVars_State_paramNames___default); l_Lean_Meta_AbstractMVars_State_fvars___default = _init_l_Lean_Meta_AbstractMVars_State_fvars___default(); lean_mark_persistent(l_Lean_Meta_AbstractMVars_State_fvars___default); l_Lean_Meta_AbstractMVars_State_lmap___default___closed__1 = _init_l_Lean_Meta_AbstractMVars_State_lmap___default___closed__1(); lean_mark_persistent(l_Lean_Meta_AbstractMVars_State_lmap___default___closed__1); l_Lean_Meta_AbstractMVars_State_lmap___default = _init_l_Lean_Meta_AbstractMVars_State_lmap___default(); lean_mark_persistent(l_Lean_Meta_AbstractMVars_State_lmap___default); l_Lean_Meta_AbstractMVars_State_emap___default___closed__1 = _init_l_Lean_Meta_AbstractMVars_State_emap___default___closed__1(); lean_mark_persistent(l_Lean_Meta_AbstractMVars_State_emap___default___closed__1); l_Lean_Meta_AbstractMVars_State_emap___default = _init_l_Lean_Meta_AbstractMVars_State_emap___default(); lean_mark_persistent(l_Lean_Meta_AbstractMVars_State_emap___default); l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___closed__1 = _init_l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___closed__1(); lean_mark_persistent(l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___closed__1); l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___closed__2 = _init_l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___closed__2(); lean_mark_persistent(l___private_Lean_Meta_AbstractMVars_0__Lean_Meta_AbstractMVars_abstractLevelMVars___closed__2); l_Lean_Meta_openAbstractMVarsResult___boxed__const__1 = _init_l_Lean_Meta_openAbstractMVarsResult___boxed__const__1(); lean_mark_persistent(l_Lean_Meta_openAbstractMVarsResult___boxed__const__1); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus } #endif
ChrisHughes24/lean4
stage0/stdlib/Lean/Meta/Reduce.c
<reponame>ChrisHughes24/lean4 // Lean compiler output // Module: Lean.Meta.Reduce // Imports: Init Lean.Meta.Basic Lean.Meta.FunInfo Lean.Util.MonadCache #include <lean/lean.h> #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wunused-label" #elif defined(__GNUC__) && !defined(__CLANG__) #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif #ifdef __cplusplus extern "C" { #endif lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_forallTelescopeReducingAuxAux___rarg(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_ReaderT_pure___at_Lean_Meta_reduce_visit___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_forallTelescope___at_Lean_Meta_reduce_visit___spec__7(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*); extern lean_object* l_Lean_withIncRecDepth___rarg___lambda__2___closed__2; lean_object* l_Std_HashMapImp_insert___at_Lean_Meta_reduce_visit___spec__9(lean_object*, lean_object*, lean_object*); lean_object* lean_array_uget(lean_object*, size_t); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); lean_object* l_Lean_Meta_reduce_visit___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_Core_withIncRecDepth___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_reduce_visit___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*); lean_object* l_Std_AssocList_find_x3f___at_Lean_Meta_reduce_visit___spec__2(lean_object*, lean_object*); lean_object* l_Lean_Meta_reduce(lean_object*, uint8_t, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_reduce_visit___spec__5(uint8_t, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* l_Lean_Core_withIncRecDepth___at_Lean_Meta_reduce_visit___spec__8___lambda__1___boxed(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_Std_AssocList_foldlM___at_Lean_Meta_reduce_visit___spec__13(lean_object*, lean_object*); lean_object* l_ReaderT_pure___at_Lean_Meta_reduce_visit___spec__3___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_mkAppN(lean_object*, lean_object*); lean_object* l_ReaderT_bind___at_Lean_Meta_reduce_visit___spec__4(lean_object*, lean_object*); lean_object* l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(lean_object*, lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* l_Lean_Core_withIncRecDepth___at_Lean_Meta_reduce_visit___spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_HashMapImp_find_x3f___at_Lean_Meta_reduce_visit___spec__1___boxed(lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_Meta_reduce_visit___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_st_ref_take(lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_Meta_reduce_visit_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); 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_Std_HashMapImp_find_x3f___at_Lean_Meta_reduce_visit___spec__1(lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_Std_mkHashMapImp___rarg(lean_object*); lean_object* l_Lean_Meta_reduce_visit___lambda__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_mk_ref(lean_object*, lean_object*); size_t l_Lean_Expr_hash(lean_object*); lean_object* l_Lean_Meta_reduce_visit___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_lambdaTelescope___at_Lean_Meta_reduce_visit___spec__6___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_mkHashMap___at_Lean_Meta_reduce___spec__1(lean_object*); size_t lean_usize_modn(size_t, lean_object*); lean_object* l_Std_AssocList_contains___at_Lean_Meta_reduce_visit___spec__10___boxed(lean_object*, lean_object*); lean_object* l_Lean_Meta_isProof(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_whnf(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_reduce___closed__1; lean_object* l_Lean_Meta_forallTelescope___at_Lean_Meta_reduce_visit___spec__7___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_ReaderT_pure___at_Lean_Meta_reduce_visit___spec__3(lean_object*); uint8_t l_Lean_Meta_ParamInfo_isExplicit(lean_object*); extern lean_object* l_Lean_Meta_instInhabitedParamInfo; lean_object* l_Lean_Meta_reduce___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_reduce_visit___lambda__4(lean_object*, uint8_t, uint8_t, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppNumArgsAux(lean_object*, lean_object*); lean_object* l_Lean_Meta_lambdaTelescope___at_Lean_Meta_reduce_visit___spec__6___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_expr_eqv(lean_object*, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_Std_HashMapImp_moveEntries___at_Lean_Meta_reduce_visit___spec__12(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedExpr___closed__1; lean_object* lean_nat_mul(lean_object*, lean_object*); lean_object* l_Lean_Meta_getFunInfoNArgs(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_reduce_visit(uint8_t, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_reduce_visit___lambda__2(uint8_t, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_reduce_visit___lambda__3(uint8_t, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Std_AssocList_contains___at_Lean_Meta_reduce_visit___spec__10(lean_object*, lean_object*); lean_object* l_Lean_Meta_reduce_visit_match__1(lean_object*); lean_object* lean_mk_array(lean_object*, lean_object*); lean_object* l_Std_HashMapImp_expand___at_Lean_Meta_reduce_visit___spec__11(lean_object*, lean_object*); lean_object* l_ReaderT_bind___at_Lean_Meta_reduce_visit___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_reduce_visit___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_lambdaTelescope___at_Lean_Meta_reduce_visit___spec__6(lean_object*); lean_object* l_Lean_Meta_reduce_visit___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_AssocList_replace___at_Lean_Meta_reduce_visit___spec__14(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppFn(lean_object*); lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_lambdaTelescopeImp___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_AssocList_find_x3f___at_Lean_Meta_reduce_visit___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_Meta_isType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_Lean_Core_withIncRecDepth___at_Lean_Meta_reduce_visit___spec__8___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_reduce_visit_match__1___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)) { case 5: { lean_object* x_6; lean_object* x_7; uint64_t x_8; lean_object* x_9; lean_object* x_10; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_1, 1); lean_inc(x_7); x_8 = lean_ctor_get_uint64(x_1, sizeof(void*)*2); lean_dec(x_1); x_9 = lean_box_uint64(x_8); x_10 = lean_apply_3(x_2, x_6, x_7, x_9); return x_10; } case 6: { lean_object* x_11; lean_object* x_12; lean_object* x_13; uint64_t x_14; lean_object* x_15; lean_object* x_16; lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); x_11 = lean_ctor_get(x_1, 0); lean_inc(x_11); x_12 = lean_ctor_get(x_1, 1); lean_inc(x_12); x_13 = lean_ctor_get(x_1, 2); lean_inc(x_13); x_14 = lean_ctor_get_uint64(x_1, sizeof(void*)*3); lean_dec(x_1); x_15 = lean_box_uint64(x_14); x_16 = lean_apply_4(x_3, x_11, x_12, x_13, x_15); return x_16; } case 7: { lean_object* x_17; lean_object* x_18; lean_object* x_19; uint64_t x_20; lean_object* x_21; lean_object* x_22; lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); x_17 = lean_ctor_get(x_1, 0); lean_inc(x_17); x_18 = lean_ctor_get(x_1, 1); lean_inc(x_18); x_19 = lean_ctor_get(x_1, 2); lean_inc(x_19); x_20 = lean_ctor_get_uint64(x_1, sizeof(void*)*3); lean_dec(x_1); x_21 = lean_box_uint64(x_20); x_22 = lean_apply_4(x_4, x_17, x_18, x_19, x_21); return x_22; } default: { lean_object* x_23; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_23 = lean_apply_1(x_5, x_1); return x_23; } } } } lean_object* l_Lean_Meta_reduce_visit_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Meta_reduce_visit_match__1___rarg), 5, 0); return x_2; } } lean_object* l_Std_AssocList_find_x3f___at_Lean_Meta_reduce_visit___spec__2(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { lean_object* x_3; x_3 = lean_box(0); return x_3; } else { lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; x_4 = lean_ctor_get(x_2, 0); x_5 = lean_ctor_get(x_2, 1); x_6 = lean_ctor_get(x_2, 2); x_7 = lean_expr_eqv(x_4, x_1); if (x_7 == 0) { x_2 = x_6; goto _start; } else { lean_object* x_9; lean_inc(x_5); x_9 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_9, 0, x_5); return x_9; } } } } lean_object* l_Std_HashMapImp_find_x3f___at_Lean_Meta_reduce_visit___spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; size_t x_5; size_t x_6; lean_object* x_7; lean_object* x_8; x_3 = lean_ctor_get(x_1, 1); x_4 = lean_array_get_size(x_3); x_5 = l_Lean_Expr_hash(x_2); x_6 = lean_usize_modn(x_5, x_4); lean_dec(x_4); x_7 = lean_array_uget(x_3, x_6); x_8 = l_Std_AssocList_find_x3f___at_Lean_Meta_reduce_visit___spec__2(x_2, x_7); lean_dec(x_7); return x_8; } } lean_object* l_ReaderT_pure___at_Lean_Meta_reduce_visit___spec__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* x_7) { _start: { lean_object* x_8; x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_1); lean_ctor_set(x_8, 1, x_7); return x_8; } } lean_object* l_ReaderT_pure___at_Lean_Meta_reduce_visit___spec__3(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Meta_reduce_visit___spec__3___rarg___boxed), 7, 0); return x_2; } } lean_object* l_ReaderT_bind___at_Lean_Meta_reduce_visit___spec__4___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* x_7, lean_object* x_8) { _start: { lean_object* x_9; lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); x_9 = lean_apply_6(x_1, x_3, x_4, x_5, x_6, x_7, x_8); if (lean_obj_tag(x_9) == 0) { lean_object* x_10; lean_object* x_11; lean_object* x_12; 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_apply_7(x_2, x_10, x_3, x_4, x_5, x_6, x_7, x_11); return x_12; } else { uint8_t x_13; 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_13 = !lean_is_exclusive(x_9); if (x_13 == 0) { return x_9; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; x_14 = lean_ctor_get(x_9, 0); x_15 = lean_ctor_get(x_9, 1); lean_inc(x_15); lean_inc(x_14); lean_dec(x_9); x_16 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_16, 0, x_14); lean_ctor_set(x_16, 1, x_15); return x_16; } } } } lean_object* l_ReaderT_bind___at_Lean_Meta_reduce_visit___spec__4(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_reduce_visit___spec__4___rarg), 8, 0); return x_3; } } lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_reduce_visit___spec__5(uint8_t x_1, uint8_t x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { _start: { lean_object* x_15; uint8_t x_16; x_15 = lean_ctor_get(x_5, 1); x_16 = lean_nat_dec_le(x_15, x_7); if (x_16 == 0) { lean_object* x_17; uint8_t x_18; x_17 = lean_unsigned_to_nat(0u); x_18 = lean_nat_dec_eq(x_6, x_17); if (x_18 == 0) { lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_28; lean_object* x_29; uint8_t x_30; x_19 = lean_unsigned_to_nat(1u); x_20 = lean_nat_sub(x_6, x_19); lean_dec(x_6); x_28 = lean_ctor_get(x_4, 0); x_29 = lean_array_get_size(x_28); x_30 = lean_nat_dec_lt(x_7, x_29); lean_dec(x_29); if (x_30 == 0) { lean_object* x_31; uint8_t x_32; x_31 = lean_array_get_size(x_8); x_32 = lean_nat_dec_lt(x_7, x_31); lean_dec(x_31); if (x_32 == 0) { lean_object* x_33; x_33 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_33, 0, x_8); x_21 = x_33; x_22 = x_14; goto block_27; } else { lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; x_34 = lean_array_fget(x_8, x_7); x_35 = l_Lean_instInhabitedExpr___closed__1; x_36 = lean_array_fset(x_8, x_7, x_35); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_37 = l_Lean_Meta_reduce_visit(x_1, x_2, x_3, x_34, x_9, x_10, x_11, x_12, x_13, x_14); if (lean_obj_tag(x_37) == 0) { lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; x_38 = lean_ctor_get(x_37, 0); lean_inc(x_38); x_39 = lean_ctor_get(x_37, 1); lean_inc(x_39); lean_dec(x_37); x_40 = lean_array_fset(x_36, x_7, x_38); x_41 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_41, 0, x_40); x_21 = x_41; x_22 = x_39; goto block_27; } else { uint8_t x_42; lean_dec(x_36); lean_dec(x_20); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_7); x_42 = !lean_is_exclusive(x_37); if (x_42 == 0) { return x_37; } else { lean_object* x_43; lean_object* x_44; lean_object* x_45; x_43 = lean_ctor_get(x_37, 0); x_44 = lean_ctor_get(x_37, 1); lean_inc(x_44); lean_inc(x_43); lean_dec(x_37); 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 { if (x_1 == 0) { lean_object* x_46; uint8_t x_47; x_46 = lean_array_get_size(x_8); x_47 = lean_nat_dec_lt(x_7, x_46); lean_dec(x_46); if (x_47 == 0) { lean_object* x_48; x_48 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_48, 0, x_8); x_21 = x_48; x_22 = x_14; goto block_27; } else { lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; x_49 = lean_array_fget(x_8, x_7); x_50 = l_Lean_instInhabitedExpr___closed__1; x_51 = lean_array_fset(x_8, x_7, x_50); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_52 = l_Lean_Meta_reduce_visit(x_1, x_2, x_3, x_49, x_9, x_10, x_11, x_12, x_13, x_14); if (lean_obj_tag(x_52) == 0) { lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; x_53 = lean_ctor_get(x_52, 0); lean_inc(x_53); x_54 = lean_ctor_get(x_52, 1); lean_inc(x_54); lean_dec(x_52); x_55 = lean_array_fset(x_51, x_7, x_53); x_56 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_56, 0, x_55); x_21 = x_56; x_22 = x_54; goto block_27; } else { uint8_t x_57; lean_dec(x_51); lean_dec(x_20); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_7); x_57 = !lean_is_exclusive(x_52); if (x_57 == 0) { return x_52; } else { lean_object* x_58; lean_object* x_59; lean_object* x_60; x_58 = lean_ctor_get(x_52, 0); x_59 = lean_ctor_get(x_52, 1); lean_inc(x_59); lean_inc(x_58); lean_dec(x_52); 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; uint8_t x_63; x_61 = l_Lean_Meta_instInhabitedParamInfo; x_62 = lean_array_get(x_61, x_28, x_7); x_63 = l_Lean_Meta_ParamInfo_isExplicit(x_62); lean_dec(x_62); if (x_63 == 0) { lean_object* x_64; x_64 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_64, 0, x_8); x_21 = x_64; x_22 = x_14; goto block_27; } else { lean_object* x_65; uint8_t x_66; x_65 = lean_array_get_size(x_8); x_66 = lean_nat_dec_lt(x_7, x_65); lean_dec(x_65); if (x_66 == 0) { lean_object* x_67; x_67 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_67, 0, x_8); x_21 = x_67; x_22 = x_14; goto block_27; } else { lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; x_68 = lean_array_fget(x_8, x_7); x_69 = l_Lean_instInhabitedExpr___closed__1; x_70 = lean_array_fset(x_8, x_7, x_69); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_71 = l_Lean_Meta_reduce_visit(x_1, x_2, x_3, x_68, x_9, x_10, x_11, x_12, x_13, x_14); if (lean_obj_tag(x_71) == 0) { lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; x_72 = lean_ctor_get(x_71, 0); lean_inc(x_72); x_73 = lean_ctor_get(x_71, 1); lean_inc(x_73); lean_dec(x_71); x_74 = lean_array_fset(x_70, x_7, x_72); x_75 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_75, 0, x_74); x_21 = x_75; x_22 = x_73; goto block_27; } else { uint8_t x_76; lean_dec(x_70); lean_dec(x_20); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_7); x_76 = !lean_is_exclusive(x_71); if (x_76 == 0) { return x_71; } else { lean_object* x_77; lean_object* x_78; lean_object* x_79; x_77 = lean_ctor_get(x_71, 0); x_78 = lean_ctor_get(x_71, 1); lean_inc(x_78); lean_inc(x_77); lean_dec(x_71); x_79 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_79, 0, x_77); lean_ctor_set(x_79, 1, x_78); return x_79; } } } } } } block_27: { lean_object* x_23; lean_object* x_24; lean_object* x_25; x_23 = lean_ctor_get(x_21, 0); lean_inc(x_23); lean_dec(x_21); x_24 = lean_ctor_get(x_5, 2); x_25 = lean_nat_add(x_7, x_24); lean_dec(x_7); x_6 = x_20; x_7 = x_25; x_8 = x_23; x_14 = x_22; goto _start; } } else { lean_object* x_80; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); x_80 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_80, 0, x_8); lean_ctor_set(x_80, 1, x_14); return x_80; } } else { lean_object* x_81; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); x_81 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_81, 0, x_8); lean_ctor_set(x_81, 1, x_14); return x_81; } } } lean_object* l_Lean_Meta_lambdaTelescope___at_Lean_Meta_reduce_visit___spec__6___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* x_7, lean_object* x_8, lean_object* x_9) { _start: { lean_object* x_10; x_10 = lean_apply_8(x_1, x_3, x_4, x_2, x_5, x_6, x_7, x_8, x_9); return x_10; } } lean_object* l_Lean_Meta_lambdaTelescope___at_Lean_Meta_reduce_visit___spec__6___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* x_7, lean_object* x_8) { _start: { lean_object* x_9; uint8_t x_10; lean_object* x_11; x_9 = lean_alloc_closure((void*)(l_Lean_Meta_lambdaTelescope___at_Lean_Meta_reduce_visit___spec__6___rarg___lambda__1), 9, 2); lean_closure_set(x_9, 0, x_2); lean_closure_set(x_9, 1, x_3); x_10 = 0; x_11 = l___private_Lean_Meta_Basic_0__Lean_Meta_lambdaTelescopeImp___rarg(x_1, x_10, x_9, x_4, x_5, x_6, x_7, x_8); if (lean_obj_tag(x_11) == 0) { uint8_t x_12; x_12 = !lean_is_exclusive(x_11); if (x_12 == 0) { return x_11; } else { lean_object* x_13; lean_object* x_14; lean_object* x_15; x_13 = lean_ctor_get(x_11, 0); x_14 = lean_ctor_get(x_11, 1); lean_inc(x_14); lean_inc(x_13); lean_dec(x_11); x_15 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_15, 0, x_13); lean_ctor_set(x_15, 1, x_14); return x_15; } } else { uint8_t x_16; x_16 = !lean_is_exclusive(x_11); if (x_16 == 0) { return x_11; } else { lean_object* x_17; lean_object* x_18; lean_object* x_19; x_17 = lean_ctor_get(x_11, 0); x_18 = lean_ctor_get(x_11, 1); lean_inc(x_18); lean_inc(x_17); lean_dec(x_11); x_19 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_19, 0, x_17); lean_ctor_set(x_19, 1, x_18); return x_19; } } } } lean_object* l_Lean_Meta_lambdaTelescope___at_Lean_Meta_reduce_visit___spec__6(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Meta_lambdaTelescope___at_Lean_Meta_reduce_visit___spec__6___rarg), 8, 0); return x_2; } } lean_object* l_Lean_Meta_forallTelescope___at_Lean_Meta_reduce_visit___spec__7___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* x_7, lean_object* x_8) { _start: { lean_object* x_9; lean_object* x_10; uint8_t x_11; lean_object* x_12; x_9 = lean_alloc_closure((void*)(l_Lean_Meta_lambdaTelescope___at_Lean_Meta_reduce_visit___spec__6___rarg___lambda__1), 9, 2); lean_closure_set(x_9, 0, x_2); lean_closure_set(x_9, 1, x_3); x_10 = lean_box(0); x_11 = 0; x_12 = l___private_Lean_Meta_Basic_0__Lean_Meta_forallTelescopeReducingAuxAux___rarg(x_11, x_10, x_1, x_9, x_4, x_5, x_6, x_7, x_8); if (lean_obj_tag(x_12) == 0) { uint8_t x_13; x_13 = !lean_is_exclusive(x_12); if (x_13 == 0) { return x_12; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; x_14 = lean_ctor_get(x_12, 0); x_15 = lean_ctor_get(x_12, 1); lean_inc(x_15); lean_inc(x_14); lean_dec(x_12); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_14); lean_ctor_set(x_16, 1, x_15); return x_16; } } else { uint8_t x_17; x_17 = !lean_is_exclusive(x_12); if (x_17 == 0) { return x_12; } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; x_18 = lean_ctor_get(x_12, 0); x_19 = lean_ctor_get(x_12, 1); lean_inc(x_19); lean_inc(x_18); lean_dec(x_12); x_20 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_20, 0, x_18); lean_ctor_set(x_20, 1, x_19); return x_20; } } } } lean_object* l_Lean_Meta_forallTelescope___at_Lean_Meta_reduce_visit___spec__7(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Meta_forallTelescope___at_Lean_Meta_reduce_visit___spec__7___rarg), 8, 0); return x_2; } } lean_object* l_Lean_Core_withIncRecDepth___at_Lean_Meta_reduce_visit___spec__8___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) { _start: { lean_object* x_10; lean_object* x_11; uint8_t x_12; x_10 = lean_unsigned_to_nat(1u); x_11 = lean_nat_add(x_1, x_10); x_12 = !lean_is_exclusive(x_7); if (x_12 == 0) { lean_object* x_13; lean_object* x_14; x_13 = lean_ctor_get(x_7, 1); lean_dec(x_13); lean_ctor_set(x_7, 1, x_11); x_14 = lean_apply_6(x_2, x_3, x_4, x_5, x_7, x_8, x_9); 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_7, 0); x_16 = lean_ctor_get(x_7, 2); x_17 = lean_ctor_get(x_7, 3); x_18 = lean_ctor_get(x_7, 4); x_19 = lean_ctor_get(x_7, 5); x_20 = lean_ctor_get(x_7, 6); x_21 = lean_ctor_get(x_7, 7); lean_inc(x_21); lean_inc(x_20); lean_inc(x_19); lean_inc(x_18); lean_inc(x_17); lean_inc(x_16); lean_inc(x_15); lean_dec(x_7); x_22 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_22, 0, x_15); lean_ctor_set(x_22, 1, x_11); lean_ctor_set(x_22, 2, x_16); lean_ctor_set(x_22, 3, x_17); lean_ctor_set(x_22, 4, x_18); lean_ctor_set(x_22, 5, x_19); lean_ctor_set(x_22, 6, x_20); lean_ctor_set(x_22, 7, x_21); x_23 = lean_apply_6(x_2, x_3, x_4, x_5, x_22, x_8, x_9); return x_23; } } } lean_object* l_Lean_Core_withIncRecDepth___at_Lean_Meta_reduce_visit___spec__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; x_8 = lean_ctor_get(x_5, 1); lean_inc(x_8); x_9 = lean_ctor_get(x_5, 2); lean_inc(x_9); x_10 = lean_nat_dec_eq(x_8, x_9); lean_dec(x_9); if (x_10 == 0) { lean_object* x_11; lean_object* x_12; x_11 = lean_box(0); x_12 = l_Lean_Core_withIncRecDepth___at_Lean_Meta_reduce_visit___spec__8___lambda__1(x_8, x_1, x_2, x_3, x_4, x_11, x_5, x_6, x_7); lean_dec(x_8); if (lean_obj_tag(x_12) == 0) { uint8_t x_13; x_13 = !lean_is_exclusive(x_12); if (x_13 == 0) { return x_12; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; x_14 = lean_ctor_get(x_12, 0); x_15 = lean_ctor_get(x_12, 1); lean_inc(x_15); lean_inc(x_14); lean_dec(x_12); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_14); lean_ctor_set(x_16, 1, x_15); return x_16; } } else { uint8_t x_17; x_17 = !lean_is_exclusive(x_12); if (x_17 == 0) { return x_12; } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; x_18 = lean_ctor_get(x_12, 0); x_19 = lean_ctor_get(x_12, 1); lean_inc(x_19); lean_inc(x_18); lean_dec(x_12); x_20 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_20, 0, x_18); lean_ctor_set(x_20, 1, x_19); return x_20; } } } else { lean_object* x_21; lean_object* x_22; uint8_t x_23; lean_dec(x_8); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_21 = l_Lean_withIncRecDepth___rarg___lambda__2___closed__2; x_22 = l_Lean_throwError___at_Lean_Core_withIncRecDepth___spec__1(x_21, x_5, x_6, x_7); lean_dec(x_6); lean_dec(x_5); x_23 = !lean_is_exclusive(x_22); if (x_23 == 0) { return x_22; } else { lean_object* x_24; lean_object* x_25; lean_object* x_26; x_24 = lean_ctor_get(x_22, 0); x_25 = lean_ctor_get(x_22, 1); lean_inc(x_25); lean_inc(x_24); lean_dec(x_22); 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; } } } } uint8_t l_Std_AssocList_contains___at_Lean_Meta_reduce_visit___spec__10(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { uint8_t x_3; x_3 = 0; return x_3; } else { lean_object* x_4; lean_object* x_5; uint8_t x_6; x_4 = lean_ctor_get(x_2, 0); x_5 = lean_ctor_get(x_2, 2); x_6 = lean_expr_eqv(x_4, x_1); if (x_6 == 0) { x_2 = x_5; goto _start; } else { uint8_t x_8; x_8 = 1; return x_8; } } } } lean_object* l_Std_AssocList_foldlM___at_Lean_Meta_reduce_visit___spec__13(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { return x_1; } else { uint8_t x_3; x_3 = !lean_is_exclusive(x_2); if (x_3 == 0) { lean_object* x_4; lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; x_4 = lean_ctor_get(x_2, 0); x_5 = lean_ctor_get(x_2, 2); x_6 = lean_array_get_size(x_1); x_7 = l_Lean_Expr_hash(x_4); x_8 = lean_usize_modn(x_7, x_6); lean_dec(x_6); x_9 = lean_array_uget(x_1, x_8); lean_ctor_set(x_2, 2, x_9); x_10 = lean_array_uset(x_1, x_8, x_2); x_1 = x_10; x_2 = x_5; goto _start; } else { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; x_12 = lean_ctor_get(x_2, 0); x_13 = lean_ctor_get(x_2, 1); x_14 = lean_ctor_get(x_2, 2); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_dec(x_2); x_15 = lean_array_get_size(x_1); x_16 = l_Lean_Expr_hash(x_12); x_17 = lean_usize_modn(x_16, x_15); lean_dec(x_15); x_18 = lean_array_uget(x_1, x_17); x_19 = lean_alloc_ctor(1, 3, 0); lean_ctor_set(x_19, 0, x_12); lean_ctor_set(x_19, 1, x_13); lean_ctor_set(x_19, 2, x_18); x_20 = lean_array_uset(x_1, x_17, x_19); x_1 = x_20; x_2 = x_14; goto _start; } } } } lean_object* l_Std_HashMapImp_moveEntries___at_Lean_Meta_reduce_visit___spec__12(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_5; x_4 = lean_array_get_size(x_2); x_5 = lean_nat_dec_lt(x_1, x_4); lean_dec(x_4); if (x_5 == 0) { lean_dec(x_2); lean_dec(x_1); return x_3; } 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; x_6 = lean_array_fget(x_2, x_1); x_7 = lean_box(0); x_8 = lean_array_fset(x_2, x_1, x_7); x_9 = l_Std_AssocList_foldlM___at_Lean_Meta_reduce_visit___spec__13(x_3, x_6); x_10 = lean_unsigned_to_nat(1u); x_11 = lean_nat_add(x_1, x_10); lean_dec(x_1); x_1 = x_11; x_2 = x_8; x_3 = x_9; goto _start; } } } lean_object* l_Std_HashMapImp_expand___at_Lean_Meta_reduce_visit___spec__11(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_3 = lean_array_get_size(x_2); x_4 = lean_unsigned_to_nat(2u); x_5 = lean_nat_mul(x_3, x_4); lean_dec(x_3); x_6 = lean_box(0); x_7 = lean_mk_array(x_5, x_6); x_8 = lean_unsigned_to_nat(0u); x_9 = l_Std_HashMapImp_moveEntries___at_Lean_Meta_reduce_visit___spec__12(x_8, x_2, x_7); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_1); lean_ctor_set(x_10, 1, x_9); return x_10; } } lean_object* l_Std_AssocList_replace___at_Lean_Meta_reduce_visit___spec__14(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_3) == 0) { lean_object* x_4; lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(0); return x_4; } else { uint8_t x_5; x_5 = !lean_is_exclusive(x_3); if (x_5 == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; x_6 = lean_ctor_get(x_3, 0); x_7 = lean_ctor_get(x_3, 1); x_8 = lean_ctor_get(x_3, 2); x_9 = lean_expr_eqv(x_6, x_1); if (x_9 == 0) { lean_object* x_10; x_10 = l_Std_AssocList_replace___at_Lean_Meta_reduce_visit___spec__14(x_1, x_2, x_8); lean_ctor_set(x_3, 2, x_10); return x_3; } else { lean_dec(x_7); lean_dec(x_6); lean_ctor_set(x_3, 1, x_2); lean_ctor_set(x_3, 0, x_1); return x_3; } } else { lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; x_11 = lean_ctor_get(x_3, 0); x_12 = lean_ctor_get(x_3, 1); x_13 = lean_ctor_get(x_3, 2); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_dec(x_3); x_14 = lean_expr_eqv(x_11, x_1); if (x_14 == 0) { lean_object* x_15; lean_object* x_16; x_15 = l_Std_AssocList_replace___at_Lean_Meta_reduce_visit___spec__14(x_1, x_2, x_13); x_16 = lean_alloc_ctor(1, 3, 0); lean_ctor_set(x_16, 0, x_11); lean_ctor_set(x_16, 1, x_12); lean_ctor_set(x_16, 2, x_15); return x_16; } else { lean_object* x_17; lean_dec(x_12); lean_dec(x_11); x_17 = lean_alloc_ctor(1, 3, 0); lean_ctor_set(x_17, 0, x_1); lean_ctor_set(x_17, 1, x_2); lean_ctor_set(x_17, 2, x_13); return x_17; } } } } } lean_object* l_Std_HashMapImp_insert___at_Lean_Meta_reduce_visit___spec__9(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { uint8_t x_4; x_4 = !lean_is_exclusive(x_1); if (x_4 == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; uint8_t x_11; x_5 = lean_ctor_get(x_1, 0); x_6 = lean_ctor_get(x_1, 1); x_7 = lean_array_get_size(x_6); x_8 = l_Lean_Expr_hash(x_2); x_9 = lean_usize_modn(x_8, x_7); x_10 = lean_array_uget(x_6, x_9); x_11 = l_Std_AssocList_contains___at_Lean_Meta_reduce_visit___spec__10(x_2, x_10); if (x_11 == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; x_12 = lean_unsigned_to_nat(1u); x_13 = lean_nat_add(x_5, x_12); lean_dec(x_5); x_14 = lean_alloc_ctor(1, 3, 0); lean_ctor_set(x_14, 0, x_2); lean_ctor_set(x_14, 1, x_3); lean_ctor_set(x_14, 2, x_10); x_15 = lean_array_uset(x_6, x_9, x_14); x_16 = lean_nat_dec_le(x_13, x_7); lean_dec(x_7); if (x_16 == 0) { lean_object* x_17; lean_free_object(x_1); x_17 = l_Std_HashMapImp_expand___at_Lean_Meta_reduce_visit___spec__11(x_13, x_15); return x_17; } else { lean_ctor_set(x_1, 1, x_15); lean_ctor_set(x_1, 0, x_13); return x_1; } } else { lean_object* x_18; lean_object* x_19; lean_dec(x_7); x_18 = l_Std_AssocList_replace___at_Lean_Meta_reduce_visit___spec__14(x_2, x_3, x_10); x_19 = lean_array_uset(x_6, x_9, x_18); lean_ctor_set(x_1, 1, x_19); return x_1; } } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; uint8_t x_26; x_20 = lean_ctor_get(x_1, 0); x_21 = lean_ctor_get(x_1, 1); lean_inc(x_21); lean_inc(x_20); lean_dec(x_1); x_22 = lean_array_get_size(x_21); x_23 = l_Lean_Expr_hash(x_2); x_24 = lean_usize_modn(x_23, x_22); x_25 = lean_array_uget(x_21, x_24); x_26 = l_Std_AssocList_contains___at_Lean_Meta_reduce_visit___spec__10(x_2, x_25); if (x_26 == 0) { lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; x_27 = lean_unsigned_to_nat(1u); x_28 = lean_nat_add(x_20, x_27); lean_dec(x_20); x_29 = lean_alloc_ctor(1, 3, 0); lean_ctor_set(x_29, 0, x_2); lean_ctor_set(x_29, 1, x_3); lean_ctor_set(x_29, 2, x_25); x_30 = lean_array_uset(x_21, x_24, x_29); x_31 = lean_nat_dec_le(x_28, x_22); lean_dec(x_22); if (x_31 == 0) { lean_object* x_32; x_32 = l_Std_HashMapImp_expand___at_Lean_Meta_reduce_visit___spec__11(x_28, x_30); return x_32; } else { lean_object* x_33; x_33 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_33, 0, x_28); lean_ctor_set(x_33, 1, x_30); return x_33; } } else { lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_dec(x_22); x_34 = l_Std_AssocList_replace___at_Lean_Meta_reduce_visit___spec__14(x_2, x_3, x_25); x_35 = lean_array_uset(x_21, x_24, x_34); x_36 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_36, 0, x_20); lean_ctor_set(x_36, 1, x_35); return x_36; } } } } lean_object* l_Lean_Meta_reduce_visit___lambda__1(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { if (x_2 == 0) { lean_object* x_9; lean_object* x_10; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); x_9 = lean_box(x_2); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_10, 1, x_8); return x_10; } else { lean_object* x_11; x_11 = l_Lean_Meta_isType(x_1, x_4, x_5, x_6, x_7, x_8); return x_11; } } } lean_object* l_Lean_Meta_reduce_visit___lambda__2(uint8_t x_1, uint8_t x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { lean_object* x_12; lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); x_12 = l_Lean_Meta_reduce_visit(x_1, x_2, x_3, x_5, x_6, x_7, x_8, x_9, x_10, x_11); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; lean_object* x_14; uint8_t x_15; uint8_t x_16; lean_object* x_17; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_12, 1); lean_inc(x_14); lean_dec(x_12); x_15 = 0; x_16 = 1; x_17 = l_Lean_Meta_mkLambdaFVars(x_4, x_13, x_15, x_16, x_7, x_8, x_9, x_10, x_14); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); return x_17; } else { uint8_t x_18; lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_4); x_18 = !lean_is_exclusive(x_12); if (x_18 == 0) { return x_12; } else { lean_object* x_19; lean_object* x_20; lean_object* x_21; x_19 = lean_ctor_get(x_12, 0); x_20 = lean_ctor_get(x_12, 1); lean_inc(x_20); lean_inc(x_19); lean_dec(x_12); x_21 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_21, 0, x_19); lean_ctor_set(x_21, 1, x_20); return x_21; } } } } lean_object* l_Lean_Meta_reduce_visit___lambda__3(uint8_t x_1, uint8_t x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { lean_object* x_12; lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); x_12 = l_Lean_Meta_reduce_visit(x_1, x_2, x_3, x_5, x_6, x_7, x_8, x_9, x_10, x_11); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; lean_object* x_14; uint8_t x_15; uint8_t x_16; lean_object* x_17; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_12, 1); lean_inc(x_14); lean_dec(x_12); x_15 = 0; x_16 = 1; x_17 = l_Lean_Meta_mkForallFVars(x_4, x_13, x_15, x_16, x_7, x_8, x_9, x_10, x_14); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); return x_17; } else { uint8_t x_18; lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_4); x_18 = !lean_is_exclusive(x_12); if (x_18 == 0) { return x_12; } else { lean_object* x_19; lean_object* x_20; lean_object* x_21; x_19 = lean_ctor_get(x_12, 0); x_20 = lean_ctor_get(x_12, 1); lean_inc(x_20); lean_inc(x_19); lean_dec(x_12); x_21 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_21, 0, x_19); lean_ctor_set(x_21, 1, x_20); return x_21; } } } } lean_object* l_Lean_Meta_reduce_visit___lambda__4(lean_object* x_1, uint8_t x_2, uint8_t x_3, uint8_t x_4, uint8_t 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) { _start: { uint8_t x_12; lean_object* x_13; if (x_5 == 0) { if (x_4 == 0) { x_12 = x_4; x_13 = x_11; goto block_67; } else { lean_object* x_68; lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_1); x_68 = l_Lean_Meta_isProof(x_1, x_7, x_8, x_9, x_10, x_11); 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 = lean_unbox(x_69); lean_dec(x_69); x_12 = x_71; x_13 = x_70; goto block_67; } else { uint8_t x_72; lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_1); x_72 = !lean_is_exclusive(x_68); if (x_72 == 0) { return x_68; } else { lean_object* x_73; lean_object* x_74; lean_object* x_75; x_73 = lean_ctor_get(x_68, 0); x_74 = lean_ctor_get(x_68, 1); lean_inc(x_74); lean_inc(x_73); lean_dec(x_68); x_75 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_75, 0, x_73); lean_ctor_set(x_75, 1, x_74); return x_75; } } } } else { lean_object* x_76; lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); x_76 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_76, 0, x_1); lean_ctor_set(x_76, 1, x_11); return x_76; } block_67: { if (x_12 == 0) { lean_object* x_14; lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); x_14 = l_Lean_Meta_whnf(x_1, x_7, x_8, x_9, x_10, x_13); if (lean_obj_tag(x_14) == 0) { lean_object* x_15; x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); switch (lean_obj_tag(x_15)) { case 5: { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; x_16 = lean_ctor_get(x_14, 1); lean_inc(x_16); lean_dec(x_14); x_17 = l_Lean_Expr_getAppFn(x_15); x_18 = lean_unsigned_to_nat(0u); x_19 = l_Lean_Expr_getAppNumArgsAux(x_15, x_18); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_19); lean_inc(x_17); x_20 = l_Lean_Meta_getFunInfoNArgs(x_17, x_19, x_7, x_8, x_9, x_10, x_16); if (lean_obj_tag(x_20) == 0) { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; x_21 = lean_ctor_get(x_20, 0); lean_inc(x_21); x_22 = lean_ctor_get(x_20, 1); lean_inc(x_22); lean_dec(x_20); x_23 = l_Lean_Expr_getAppArgs___closed__1; lean_inc(x_19); x_24 = lean_mk_array(x_19, x_23); x_25 = lean_unsigned_to_nat(1u); x_26 = lean_nat_sub(x_19, x_25); lean_dec(x_19); x_27 = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(x_15, x_24, x_26); x_28 = lean_array_get_size(x_27); lean_inc(x_28); x_29 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_29, 0, x_18); lean_ctor_set(x_29, 1, x_28); lean_ctor_set(x_29, 2, x_25); x_30 = l_Std_Range_forIn_loop___at_Lean_Meta_reduce_visit___spec__5(x_2, x_3, x_4, x_21, x_29, x_28, x_18, x_27, x_6, x_7, x_8, x_9, x_10, x_22); lean_dec(x_29); lean_dec(x_21); if (lean_obj_tag(x_30) == 0) { uint8_t x_31; x_31 = !lean_is_exclusive(x_30); if (x_31 == 0) { lean_object* x_32; lean_object* x_33; x_32 = lean_ctor_get(x_30, 0); x_33 = l_Lean_mkAppN(x_17, x_32); lean_dec(x_32); lean_ctor_set(x_30, 0, x_33); return x_30; } else { lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; x_34 = lean_ctor_get(x_30, 0); x_35 = lean_ctor_get(x_30, 1); lean_inc(x_35); lean_inc(x_34); lean_dec(x_30); x_36 = l_Lean_mkAppN(x_17, x_34); lean_dec(x_34); x_37 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_37, 0, x_36); lean_ctor_set(x_37, 1, x_35); return x_37; } } else { uint8_t x_38; lean_dec(x_17); x_38 = !lean_is_exclusive(x_30); if (x_38 == 0) { return x_30; } else { lean_object* x_39; lean_object* x_40; lean_object* x_41; x_39 = lean_ctor_get(x_30, 0); x_40 = lean_ctor_get(x_30, 1); lean_inc(x_40); lean_inc(x_39); lean_dec(x_30); x_41 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_41, 0, x_39); lean_ctor_set(x_41, 1, x_40); return x_41; } } } else { uint8_t x_42; lean_dec(x_19); lean_dec(x_17); lean_dec(x_15); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); x_42 = !lean_is_exclusive(x_20); if (x_42 == 0) { return x_20; } else { lean_object* x_43; lean_object* x_44; lean_object* x_45; x_43 = lean_ctor_get(x_20, 0); x_44 = lean_ctor_get(x_20, 1); lean_inc(x_44); lean_inc(x_43); lean_dec(x_20); 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; } } } case 6: { lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; x_46 = lean_ctor_get(x_14, 1); lean_inc(x_46); lean_dec(x_14); x_47 = lean_box(x_2); x_48 = lean_box(x_3); x_49 = lean_box(x_4); x_50 = lean_alloc_closure((void*)(l_Lean_Meta_reduce_visit___lambda__2___boxed), 11, 3); lean_closure_set(x_50, 0, x_47); lean_closure_set(x_50, 1, x_48); lean_closure_set(x_50, 2, x_49); x_51 = l_Lean_Meta_lambdaTelescope___at_Lean_Meta_reduce_visit___spec__6___rarg(x_15, x_50, x_6, x_7, x_8, x_9, x_10, x_46); return x_51; } case 7: { 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_52 = lean_ctor_get(x_14, 1); lean_inc(x_52); lean_dec(x_14); x_53 = lean_box(x_2); x_54 = lean_box(x_3); x_55 = lean_box(x_4); x_56 = lean_alloc_closure((void*)(l_Lean_Meta_reduce_visit___lambda__3___boxed), 11, 3); lean_closure_set(x_56, 0, x_53); lean_closure_set(x_56, 1, x_54); lean_closure_set(x_56, 2, x_55); x_57 = l_Lean_Meta_forallTelescope___at_Lean_Meta_reduce_visit___spec__7___rarg(x_15, x_56, x_6, x_7, x_8, x_9, x_10, x_52); return x_57; } default: { uint8_t x_58; lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); x_58 = !lean_is_exclusive(x_14); if (x_58 == 0) { lean_object* x_59; x_59 = lean_ctor_get(x_14, 0); lean_dec(x_59); return x_14; } else { lean_object* x_60; lean_object* x_61; x_60 = lean_ctor_get(x_14, 1); lean_inc(x_60); lean_dec(x_14); x_61 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_61, 0, x_15); lean_ctor_set(x_61, 1, x_60); return x_61; } } } } else { uint8_t x_62; lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); x_62 = !lean_is_exclusive(x_14); if (x_62 == 0) { return x_14; } else { lean_object* x_63; lean_object* x_64; lean_object* x_65; x_63 = lean_ctor_get(x_14, 0); x_64 = lean_ctor_get(x_14, 1); lean_inc(x_64); lean_inc(x_63); lean_dec(x_14); x_65 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_65, 0, x_63); lean_ctor_set(x_65, 1, x_64); return x_65; } } } else { lean_object* x_66; lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); x_66 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_66, 0, x_1); lean_ctor_set(x_66, 1, x_13); return x_66; } } } } lean_object* l_Lean_Meta_reduce_visit(uint8_t x_1, uint8_t x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; x_11 = lean_st_ref_get(x_9, x_10); x_12 = lean_ctor_get(x_11, 1); lean_inc(x_12); lean_dec(x_11); x_13 = lean_st_ref_get(x_5, x_12); x_14 = !lean_is_exclusive(x_13); if (x_14 == 0) { lean_object* x_15; lean_object* x_16; lean_object* x_17; x_15 = lean_ctor_get(x_13, 0); x_16 = lean_ctor_get(x_13, 1); x_17 = l_Std_HashMapImp_find_x3f___at_Lean_Meta_reduce_visit___spec__1(x_15, x_4); lean_dec(x_15); if (lean_obj_tag(x_17) == 0) { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_free_object(x_13); x_18 = lean_box(x_2); x_19 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Meta_reduce_visit___spec__3___rarg___boxed), 7, 1); lean_closure_set(x_19, 0, x_18); lean_inc(x_4); x_20 = lean_alloc_closure((void*)(l_Lean_Meta_reduce_visit___lambda__1___boxed), 8, 1); lean_closure_set(x_20, 0, x_4); x_21 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_reduce_visit___spec__4___rarg), 8, 2); lean_closure_set(x_21, 0, x_19); lean_closure_set(x_21, 1, x_20); x_22 = lean_box(x_1); x_23 = lean_box(x_2); x_24 = lean_box(x_3); lean_inc(x_4); x_25 = lean_alloc_closure((void*)(l_Lean_Meta_reduce_visit___lambda__4___boxed), 11, 4); lean_closure_set(x_25, 0, x_4); lean_closure_set(x_25, 1, x_22); lean_closure_set(x_25, 2, x_23); lean_closure_set(x_25, 3, x_24); x_26 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_reduce_visit___spec__4___rarg), 8, 2); lean_closure_set(x_26, 0, x_21); lean_closure_set(x_26, 1, x_25); lean_inc(x_9); lean_inc(x_5); x_27 = l_Lean_Core_withIncRecDepth___at_Lean_Meta_reduce_visit___spec__8(x_26, x_5, x_6, x_7, x_8, x_9, x_16); if (lean_obj_tag(x_27) == 0) { lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; uint8_t x_37; x_28 = lean_ctor_get(x_27, 0); lean_inc(x_28); x_29 = lean_ctor_get(x_27, 1); lean_inc(x_29); lean_dec(x_27); x_30 = lean_st_ref_get(x_9, x_29); lean_dec(x_9); x_31 = lean_ctor_get(x_30, 1); lean_inc(x_31); lean_dec(x_30); x_32 = lean_st_ref_take(x_5, x_31); x_33 = lean_ctor_get(x_32, 0); lean_inc(x_33); x_34 = lean_ctor_get(x_32, 1); lean_inc(x_34); lean_dec(x_32); lean_inc(x_28); x_35 = l_Std_HashMapImp_insert___at_Lean_Meta_reduce_visit___spec__9(x_33, x_4, x_28); x_36 = lean_st_ref_set(x_5, x_35, x_34); lean_dec(x_5); x_37 = !lean_is_exclusive(x_36); if (x_37 == 0) { lean_object* x_38; x_38 = lean_ctor_get(x_36, 0); lean_dec(x_38); lean_ctor_set(x_36, 0, x_28); return x_36; } else { lean_object* x_39; lean_object* x_40; x_39 = lean_ctor_get(x_36, 1); lean_inc(x_39); lean_dec(x_36); x_40 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_40, 0, x_28); lean_ctor_set(x_40, 1, x_39); return x_40; } } else { uint8_t x_41; lean_dec(x_9); lean_dec(x_5); lean_dec(x_4); x_41 = !lean_is_exclusive(x_27); if (x_41 == 0) { return x_27; } else { lean_object* x_42; lean_object* x_43; lean_object* x_44; x_42 = lean_ctor_get(x_27, 0); x_43 = lean_ctor_get(x_27, 1); lean_inc(x_43); lean_inc(x_42); lean_dec(x_27); 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; } } } else { lean_object* x_45; lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_45 = lean_ctor_get(x_17, 0); lean_inc(x_45); lean_dec(x_17); lean_ctor_set(x_13, 0, x_45); return x_13; } } else { lean_object* x_46; lean_object* x_47; lean_object* x_48; x_46 = lean_ctor_get(x_13, 0); x_47 = lean_ctor_get(x_13, 1); lean_inc(x_47); lean_inc(x_46); lean_dec(x_13); x_48 = l_Std_HashMapImp_find_x3f___at_Lean_Meta_reduce_visit___spec__1(x_46, x_4); lean_dec(x_46); if (lean_obj_tag(x_48) == 0) { lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; x_49 = lean_box(x_2); x_50 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Meta_reduce_visit___spec__3___rarg___boxed), 7, 1); lean_closure_set(x_50, 0, x_49); lean_inc(x_4); x_51 = lean_alloc_closure((void*)(l_Lean_Meta_reduce_visit___lambda__1___boxed), 8, 1); lean_closure_set(x_51, 0, x_4); x_52 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_reduce_visit___spec__4___rarg), 8, 2); lean_closure_set(x_52, 0, x_50); lean_closure_set(x_52, 1, x_51); x_53 = lean_box(x_1); x_54 = lean_box(x_2); x_55 = lean_box(x_3); lean_inc(x_4); x_56 = lean_alloc_closure((void*)(l_Lean_Meta_reduce_visit___lambda__4___boxed), 11, 4); lean_closure_set(x_56, 0, x_4); lean_closure_set(x_56, 1, x_53); lean_closure_set(x_56, 2, x_54); lean_closure_set(x_56, 3, x_55); x_57 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_reduce_visit___spec__4___rarg), 8, 2); lean_closure_set(x_57, 0, x_52); lean_closure_set(x_57, 1, x_56); lean_inc(x_9); lean_inc(x_5); x_58 = l_Lean_Core_withIncRecDepth___at_Lean_Meta_reduce_visit___spec__8(x_57, x_5, x_6, x_7, x_8, x_9, x_47); if (lean_obj_tag(x_58) == 0) { lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; x_59 = lean_ctor_get(x_58, 0); lean_inc(x_59); x_60 = lean_ctor_get(x_58, 1); lean_inc(x_60); lean_dec(x_58); x_61 = lean_st_ref_get(x_9, x_60); lean_dec(x_9); x_62 = lean_ctor_get(x_61, 1); lean_inc(x_62); lean_dec(x_61); x_63 = lean_st_ref_take(x_5, x_62); x_64 = lean_ctor_get(x_63, 0); lean_inc(x_64); x_65 = lean_ctor_get(x_63, 1); lean_inc(x_65); lean_dec(x_63); lean_inc(x_59); x_66 = l_Std_HashMapImp_insert___at_Lean_Meta_reduce_visit___spec__9(x_64, x_4, x_59); x_67 = lean_st_ref_set(x_5, x_66, x_65); lean_dec(x_5); x_68 = lean_ctor_get(x_67, 1); lean_inc(x_68); if (lean_is_exclusive(x_67)) { lean_ctor_release(x_67, 0); lean_ctor_release(x_67, 1); x_69 = x_67; } else { lean_dec_ref(x_67); x_69 = lean_box(0); } if (lean_is_scalar(x_69)) { x_70 = lean_alloc_ctor(0, 2, 0); } else { x_70 = x_69; } lean_ctor_set(x_70, 0, x_59); lean_ctor_set(x_70, 1, x_68); return x_70; } else { lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_dec(x_9); lean_dec(x_5); lean_dec(x_4); x_71 = lean_ctor_get(x_58, 0); lean_inc(x_71); x_72 = lean_ctor_get(x_58, 1); lean_inc(x_72); if (lean_is_exclusive(x_58)) { lean_ctor_release(x_58, 0); lean_ctor_release(x_58, 1); x_73 = x_58; } else { lean_dec_ref(x_58); x_73 = lean_box(0); } if (lean_is_scalar(x_73)) { x_74 = lean_alloc_ctor(1, 2, 0); } else { x_74 = x_73; } lean_ctor_set(x_74, 0, x_71); lean_ctor_set(x_74, 1, x_72); return x_74; } } else { lean_object* x_75; lean_object* x_76; lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_75 = lean_ctor_get(x_48, 0); lean_inc(x_75); lean_dec(x_48); x_76 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_76, 0, x_75); lean_ctor_set(x_76, 1, x_47); return x_76; } } } } lean_object* l_Std_AssocList_find_x3f___at_Lean_Meta_reduce_visit___spec__2___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Std_AssocList_find_x3f___at_Lean_Meta_reduce_visit___spec__2(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l_Std_HashMapImp_find_x3f___at_Lean_Meta_reduce_visit___spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Std_HashMapImp_find_x3f___at_Lean_Meta_reduce_visit___spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l_ReaderT_pure___at_Lean_Meta_reduce_visit___spec__3___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { lean_object* x_8; x_8 = l_ReaderT_pure___at_Lean_Meta_reduce_visit___spec__3___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); return x_8; } } lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_reduce_visit___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* 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_15; uint8_t x_16; uint8_t x_17; lean_object* x_18; x_15 = lean_unbox(x_1); lean_dec(x_1); x_16 = lean_unbox(x_2); lean_dec(x_2); x_17 = lean_unbox(x_3); lean_dec(x_3); x_18 = l_Std_Range_forIn_loop___at_Lean_Meta_reduce_visit___spec__5(x_15, x_16, x_17, 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_5); lean_dec(x_4); return x_18; } } lean_object* l_Lean_Core_withIncRecDepth___at_Lean_Meta_reduce_visit___spec__8___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) { _start: { lean_object* x_10; x_10 = l_Lean_Core_withIncRecDepth___at_Lean_Meta_reduce_visit___spec__8___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); lean_dec(x_6); lean_dec(x_1); return x_10; } } lean_object* l_Std_AssocList_contains___at_Lean_Meta_reduce_visit___spec__10___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l_Std_AssocList_contains___at_Lean_Meta_reduce_visit___spec__10(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } lean_object* l_Lean_Meta_reduce_visit___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { uint8_t x_9; lean_object* x_10; x_9 = lean_unbox(x_2); lean_dec(x_2); x_10 = l_Lean_Meta_reduce_visit___lambda__1(x_1, x_9, x_3, x_4, x_5, x_6, x_7, x_8); lean_dec(x_3); return x_10; } } lean_object* l_Lean_Meta_reduce_visit___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) { _start: { uint8_t x_12; uint8_t x_13; uint8_t x_14; lean_object* x_15; x_12 = lean_unbox(x_1); lean_dec(x_1); x_13 = lean_unbox(x_2); lean_dec(x_2); x_14 = lean_unbox(x_3); lean_dec(x_3); x_15 = l_Lean_Meta_reduce_visit___lambda__2(x_12, x_13, x_14, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); return x_15; } } lean_object* l_Lean_Meta_reduce_visit___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, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { uint8_t x_12; uint8_t x_13; uint8_t x_14; lean_object* x_15; x_12 = lean_unbox(x_1); lean_dec(x_1); x_13 = lean_unbox(x_2); lean_dec(x_2); x_14 = lean_unbox(x_3); lean_dec(x_3); x_15 = l_Lean_Meta_reduce_visit___lambda__3(x_12, x_13, x_14, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); return x_15; } } lean_object* l_Lean_Meta_reduce_visit___lambda__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { uint8_t x_12; uint8_t x_13; uint8_t x_14; uint8_t x_15; lean_object* x_16; x_12 = lean_unbox(x_2); lean_dec(x_2); x_13 = lean_unbox(x_3); lean_dec(x_3); x_14 = lean_unbox(x_4); lean_dec(x_4); x_15 = lean_unbox(x_5); lean_dec(x_5); x_16 = l_Lean_Meta_reduce_visit___lambda__4(x_1, x_12, x_13, x_14, x_15, x_6, x_7, x_8, x_9, x_10, x_11); return x_16; } } lean_object* l_Lean_Meta_reduce_visit___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: { uint8_t x_11; uint8_t x_12; uint8_t x_13; lean_object* x_14; x_11 = lean_unbox(x_1); lean_dec(x_1); x_12 = lean_unbox(x_2); lean_dec(x_2); x_13 = lean_unbox(x_3); lean_dec(x_3); x_14 = l_Lean_Meta_reduce_visit(x_11, x_12, x_13, x_4, x_5, x_6, x_7, x_8, x_9, x_10); return x_14; } } lean_object* l_Std_mkHashMap___at_Lean_Meta_reduce___spec__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Std_mkHashMapImp___rarg(x_1); return x_2; } } static lean_object* _init_l_Lean_Meta_reduce___closed__1() { _start: { lean_object* x_1; lean_object* x_2; x_1 = lean_unsigned_to_nat(8u); x_2 = l_Std_mkHashMapImp___rarg(x_1); return x_2; } } lean_object* l_Lean_Meta_reduce(lean_object* x_1, uint8_t x_2, uint8_t x_3, uint8_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { 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; x_10 = lean_st_ref_get(x_8, x_9); x_11 = lean_ctor_get(x_10, 1); lean_inc(x_11); lean_dec(x_10); x_12 = l_Lean_Meta_reduce___closed__1; x_13 = lean_st_mk_ref(x_12, x_11); 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); lean_inc(x_8); lean_inc(x_14); x_16 = l_Lean_Meta_reduce_visit(x_2, x_3, x_4, x_1, x_14, x_5, x_6, x_7, x_8, 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; uint8_t x_22; x_17 = lean_ctor_get(x_16, 0); lean_inc(x_17); x_18 = lean_ctor_get(x_16, 1); lean_inc(x_18); lean_dec(x_16); x_19 = lean_st_ref_get(x_8, x_18); lean_dec(x_8); x_20 = lean_ctor_get(x_19, 1); lean_inc(x_20); lean_dec(x_19); x_21 = lean_st_ref_get(x_14, x_20); lean_dec(x_14); x_22 = !lean_is_exclusive(x_21); if (x_22 == 0) { lean_object* x_23; x_23 = lean_ctor_get(x_21, 0); lean_dec(x_23); lean_ctor_set(x_21, 0, x_17); return x_21; } else { lean_object* x_24; lean_object* x_25; x_24 = lean_ctor_get(x_21, 1); lean_inc(x_24); lean_dec(x_21); x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_17); lean_ctor_set(x_25, 1, x_24); return x_25; } } else { uint8_t x_26; lean_dec(x_14); lean_dec(x_8); x_26 = !lean_is_exclusive(x_16); if (x_26 == 0) { return x_16; } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; x_27 = lean_ctor_get(x_16, 0); x_28 = lean_ctor_get(x_16, 1); lean_inc(x_28); lean_inc(x_27); lean_dec(x_16); x_29 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_29, 0, x_27); lean_ctor_set(x_29, 1, x_28); return x_29; } } } } lean_object* l_Lean_Meta_reduce___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { uint8_t x_10; uint8_t x_11; uint8_t x_12; lean_object* x_13; x_10 = lean_unbox(x_2); lean_dec(x_2); x_11 = lean_unbox(x_3); lean_dec(x_3); x_12 = lean_unbox(x_4); lean_dec(x_4); x_13 = l_Lean_Meta_reduce(x_1, x_10, x_11, x_12, x_5, x_6, x_7, x_8, x_9); return x_13; } } lean_object* initialize_Init(lean_object*); lean_object* initialize_Lean_Meta_Basic(lean_object*); lean_object* initialize_Lean_Meta_FunInfo(lean_object*); lean_object* initialize_Lean_Util_MonadCache(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Meta_Reduce(lean_object* w) { lean_object * res; if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); _G_initialized = true; res = initialize_Init(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Meta_Basic(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Meta_FunInfo(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Util_MonadCache(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_Meta_reduce___closed__1 = _init_l_Lean_Meta_reduce___closed__1(); lean_mark_persistent(l_Lean_Meta_reduce___closed__1); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus } #endif
ChrisHughes24/lean4
stage0/stdlib/Lean/Elab/Tactic/Rewrite.c
<filename>stage0/stdlib/Lean/Elab/Tactic/Rewrite.c<gh_stars>0 // Lean compiler output // Module: Lean.Elab.Tactic.Rewrite // Imports: Init Lean.Meta.Tactic.Rewrite Lean.Meta.Tactic.Replace Lean.Elab.Tactic.Basic Lean.Elab.Tactic.ElabTerm Lean.Elab.Tactic.Location #include <lean/lean.h> #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wunused-label" #elif defined(__GNUC__) && !defined(__CLANG__) #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif #ifdef __cplusplus extern "C" { #endif lean_object* l_Lean_Elab_Tactic_rewriteAll___lambda__1___closed__2; lean_object* l___regBuiltin_Lean_Elab_Tactic_evalERewriteSeq(lean_object*); size_t l_USize_add(size_t, size_t); lean_object* l_Lean_Elab_Tactic_rewriteAll___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_Array_forInUnsafe_loop___at_Lean_Elab_Tactic_rewriteAll___spec__1(lean_object*, uint8_t, uint8_t, lean_object*, size_t, size_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_div(lean_object*, lean_object*); extern lean_object* l_Lean_nullKind; lean_object* l_Lean_Elab_Tactic_rewriteTarget___lambda__1(uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_USize_decEq(size_t, size_t); lean_object* lean_array_uget(lean_object*, size_t); lean_object* l_Lean_Elab_Tactic_rewriteAll___lambda__1___closed__1; lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Tactic_evalRewriteCore___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*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_rewriteAll(lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_rewrite___closed__1; lean_object* lean_st_ref_get(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_Elab_Tactic_withMainContext___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Tactic_rewriteAll___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_rewriteLocalDeclFVarId___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_KeyedDeclsAttribute_addBuiltin___rarg(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_USize_decLt(size_t, size_t); lean_object* l_Lean_Elab_Tactic_rewriteTarget___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_Meta_replaceLocalDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_rewriteAll___lambda__1(lean_object*, uint8_t, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Tactic_evalERewriteSeq___closed__1; lean_object* lean_array_fget(lean_object*, lean_object*); extern lean_object* l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1; uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_rewriteTarget(lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_replaceTargetEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Tactic_evalRewriteCore___spec__3___boxed(lean_object**); lean_object* lean_st_ref_take(lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_evalERewriteSeq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_rewriteLocalDecl___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_Tactic_rewriteAll___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_Tactic_rewriteLocalDecl___lambda__2(lean_object*, uint8_t, uint8_t, 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_Tactic_expandOptLocation(lean_object*); lean_object* l_Lean_replaceRef(lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_InfoTree_0__Lean_Elab_getResetInfoTrees___at_Lean_Elab_Tactic_withTacticInfoContext___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_rewriteLocalDeclFVarId___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_Tactic_getMainTarget(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_getGoals___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_rewriteAll___lambda__1___closed__3; lean_object* l_Lean_Elab_Tactic_rewriteTarget___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*); extern lean_object* l___private_Lean_Elab_Tactic_Basic_0__Lean_Elab_Tactic_sortFVarIds___closed__1; lean_object* l_Lean_Elab_Tactic_evalRewriteCore___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_Tactic_rewriteLocalDeclFVarId___lambda__1(lean_object*, uint8_t, uint8_t, 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_Tactic_getMainGoal(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_rewrite(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_reverse___rarg(lean_object*); lean_object* l_Lean_Elab_Tactic_rewriteLocalDecl(lean_object*, uint8_t, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedSyntax; lean_object* l_Lean_Elab_Tactic_rewriteLocalDecl___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_usize_of_nat(lean_object*); lean_object* l_Lean_Elab_Tactic_evalRewriteCore_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_rewriteLocalDeclFVarId(lean_object*, uint8_t, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Tactic_tacticElabAttribute; lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Tactic_evalRewriteCore___spec__1(uint8_t, lean_object*, uint8_t, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalDecl_fvarId(lean_object*); lean_object* l_Lean_LocalDecl_type(lean_object*); lean_object* l_Lean_Meta_throwTacticEx___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_evalRewriteCore(uint8_t, 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_Syntax_mkApp___closed__1; lean_object* l_Std_PersistentArray_push___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_evalERewriteSeq___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_getLocalDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_Lean_Syntax_getArgs(lean_object*); lean_object* l_Lean_Elab_Tactic_rewriteLocalDecl___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___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalContext_getFVarIds(lean_object*); lean_object* l_Lean_Meta_getLocalDeclFromUserName(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Tactic_evalRewriteCore___spec__2(uint8_t, lean_object*, uint8_t, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_evalRewriteSeq___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Tactic_evalRewriteSeq(lean_object*); lean_object* lean_nat_mul(lean_object*, lean_object*); lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Syntax_isNone(lean_object*); lean_object* l_ReaderT_bind___at_Lean_Elab_Tactic_focusAndDone___spec__1___rarg(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_Tactic_tryTactic___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Tactic_evalRewriteSeq___closed__1; lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Tactic_evalRewriteCore___spec__3(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_replaceMainGoal(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Tactic_evalRewriteCore___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Tactic_erewriteSeq___closed__2; lean_object* l_Lean_Elab_Tactic_evalRewriteSeq(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_Tactic_evalRewriteCore_match__1(lean_object*); lean_object* l_Lean_Elab_Tactic_elabTerm___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_Tactic_rewriteLocalDecl___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_Elab_Tactic_mkTacticInfo(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_Parser_Tactic_rewriteSeq___closed__2; uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_rewriteTarget___lambda__1(uint8_t x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { lean_object* x_13; x_13 = l_Lean_Elab_Tactic_getMainGoal(x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); if (lean_obj_tag(x_13) == 0) { lean_object* x_14; lean_object* x_15; lean_object* x_16; x_14 = lean_ctor_get(x_13, 0); lean_inc(x_14); x_15 = lean_ctor_get(x_13, 1); lean_inc(x_15); lean_dec(x_13); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); x_16 = l_Lean_Elab_Tactic_getMainTarget(x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, 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; x_17 = lean_ctor_get(x_16, 0); lean_inc(x_17); x_18 = lean_ctor_get(x_16, 1); lean_inc(x_18); lean_dec(x_16); x_19 = lean_box(0); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); x_20 = l_Lean_Meta_rewrite(x_14, x_17, x_3, x_1, x_19, x_2, x_8, x_9, x_10, x_11, x_18); if (lean_obj_tag(x_20) == 0) { lean_object* x_21; lean_object* x_22; lean_object* x_23; x_21 = lean_ctor_get(x_20, 0); lean_inc(x_21); x_22 = lean_ctor_get(x_20, 1); lean_inc(x_22); lean_dec(x_20); x_23 = l_Lean_Elab_Tactic_getMainGoal(x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_22); if (lean_obj_tag(x_23) == 0) { lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; x_24 = lean_ctor_get(x_23, 0); lean_inc(x_24); x_25 = lean_ctor_get(x_23, 1); lean_inc(x_25); lean_dec(x_23); x_26 = lean_ctor_get(x_21, 0); lean_inc(x_26); x_27 = lean_ctor_get(x_21, 1); lean_inc(x_27); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); x_28 = l_Lean_Meta_replaceTargetEq(x_24, x_26, x_27, x_8, x_9, x_10, x_11, x_25); if (lean_obj_tag(x_28) == 0) { lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; x_29 = lean_ctor_get(x_28, 0); lean_inc(x_29); x_30 = lean_ctor_get(x_28, 1); lean_inc(x_30); lean_dec(x_28); x_31 = lean_ctor_get(x_21, 2); lean_inc(x_31); lean_dec(x_21); x_32 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_32, 0, x_29); lean_ctor_set(x_32, 1, x_31); x_33 = l_Lean_Elab_Tactic_replaceMainGoal(x_32, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_30); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); return x_33; } else { uint8_t x_34; lean_dec(x_21); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); x_34 = !lean_is_exclusive(x_28); if (x_34 == 0) { return x_28; } else { lean_object* x_35; lean_object* x_36; lean_object* x_37; x_35 = lean_ctor_get(x_28, 0); x_36 = lean_ctor_get(x_28, 1); lean_inc(x_36); lean_inc(x_35); lean_dec(x_28); x_37 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_37, 0, x_35); lean_ctor_set(x_37, 1, x_36); return x_37; } } } else { uint8_t x_38; lean_dec(x_21); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); x_38 = !lean_is_exclusive(x_23); if (x_38 == 0) { return x_23; } else { lean_object* x_39; lean_object* x_40; lean_object* x_41; x_39 = lean_ctor_get(x_23, 0); x_40 = lean_ctor_get(x_23, 1); lean_inc(x_40); lean_inc(x_39); lean_dec(x_23); x_41 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_41, 0, x_39); lean_ctor_set(x_41, 1, x_40); return x_41; } } } else { uint8_t x_42; lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); x_42 = !lean_is_exclusive(x_20); if (x_42 == 0) { return x_20; } else { lean_object* x_43; lean_object* x_44; lean_object* x_45; x_43 = lean_ctor_get(x_20, 0); x_44 = lean_ctor_get(x_20, 1); lean_inc(x_44); lean_inc(x_43); lean_dec(x_20); 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_14); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_3); x_46 = !lean_is_exclusive(x_16); if (x_46 == 0) { return x_16; } else { lean_object* x_47; lean_object* x_48; lean_object* x_49; x_47 = lean_ctor_get(x_16, 0); x_48 = lean_ctor_get(x_16, 1); lean_inc(x_48); lean_inc(x_47); lean_dec(x_16); 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; } } } else { uint8_t x_50; lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_3); x_50 = !lean_is_exclusive(x_13); if (x_50 == 0) { return x_13; } else { lean_object* x_51; lean_object* x_52; lean_object* x_53; x_51 = lean_ctor_get(x_13, 0); x_52 = lean_ctor_get(x_13, 1); lean_inc(x_52); lean_inc(x_51); lean_dec(x_13); x_53 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_53, 0, x_51); lean_ctor_set(x_53, 1, x_52); return x_53; } } } } lean_object* l_Lean_Elab_Tactic_rewriteTarget(lean_object* x_1, uint8_t x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { lean_object* x_13; uint8_t x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; lean_object* x_23; x_13 = lean_box(0); x_14 = 1; x_15 = lean_box(x_14); x_16 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_elabTerm___boxed), 12, 3); lean_closure_set(x_16, 0, x_1); lean_closure_set(x_16, 1, x_13); lean_closure_set(x_16, 2, x_15); x_17 = lean_box(x_2); x_18 = lean_box(x_3); x_19 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_rewriteTarget___lambda__1___boxed), 12, 2); lean_closure_set(x_19, 0, x_17); lean_closure_set(x_19, 1, x_18); x_20 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Tactic_focusAndDone___spec__1___rarg), 11, 2); lean_closure_set(x_20, 0, x_16); lean_closure_set(x_20, 1, x_19); x_21 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_withMainContext___rarg), 10, 3); lean_closure_set(x_21, 0, x_20); lean_closure_set(x_21, 1, x_4); lean_closure_set(x_21, 2, x_5); x_22 = 0; x_23 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp___rarg(x_21, x_22, x_6, x_7, x_8, x_9, x_10, x_11, x_12); return x_23; } } lean_object* l_Lean_Elab_Tactic_rewriteTarget___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) { _start: { uint8_t x_13; uint8_t x_14; lean_object* x_15; x_13 = lean_unbox(x_1); lean_dec(x_1); x_14 = lean_unbox(x_2); lean_dec(x_2); x_15 = l_Lean_Elab_Tactic_rewriteTarget___lambda__1(x_13, x_14, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); return x_15; } } lean_object* l_Lean_Elab_Tactic_rewriteTarget___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { uint8_t x_13; uint8_t x_14; lean_object* x_15; x_13 = lean_unbox(x_2); lean_dec(x_2); x_14 = lean_unbox(x_3); lean_dec(x_3); x_15 = l_Lean_Elab_Tactic_rewriteTarget(x_1, x_13, x_14, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); return x_15; } } lean_object* l_Lean_Elab_Tactic_rewriteLocalDeclFVarId___lambda__1(lean_object* x_1, uint8_t x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { _start: { lean_object* x_14; lean_inc(x_9); lean_inc(x_1); x_14 = l_Lean_Meta_getLocalDecl(x_1, x_9, x_10, x_11, x_12, x_13); if (lean_obj_tag(x_14) == 0) { lean_object* x_15; lean_object* x_16; lean_object* x_17; x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); x_16 = lean_ctor_get(x_14, 1); lean_inc(x_16); lean_dec(x_14); x_17 = l_Lean_Elab_Tactic_getMainGoal(x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_16); if (lean_obj_tag(x_17) == 0) { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; x_18 = lean_ctor_get(x_17, 0); lean_inc(x_18); x_19 = lean_ctor_get(x_17, 1); lean_inc(x_19); lean_dec(x_17); x_20 = l_Lean_LocalDecl_type(x_15); lean_dec(x_15); x_21 = lean_box(0); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_22 = l_Lean_Meta_rewrite(x_18, x_20, x_4, x_2, x_21, x_3, x_9, x_10, x_11, x_12, x_19); if (lean_obj_tag(x_22) == 0) { lean_object* x_23; lean_object* x_24; lean_object* 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_Elab_Tactic_getMainGoal(x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_24); if (lean_obj_tag(x_25) == 0) { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; x_26 = lean_ctor_get(x_25, 0); lean_inc(x_26); x_27 = lean_ctor_get(x_25, 1); lean_inc(x_27); lean_dec(x_25); x_28 = lean_ctor_get(x_23, 0); lean_inc(x_28); x_29 = lean_ctor_get(x_23, 1); lean_inc(x_29); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_30 = l_Lean_Meta_replaceLocalDecl(x_26, x_1, x_28, x_29, x_9, x_10, x_11, x_12, x_27); if (lean_obj_tag(x_30) == 0) { 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_31 = lean_ctor_get(x_30, 0); lean_inc(x_31); x_32 = lean_ctor_get(x_30, 1); lean_inc(x_32); lean_dec(x_30); x_33 = lean_ctor_get(x_31, 1); lean_inc(x_33); lean_dec(x_31); x_34 = lean_ctor_get(x_23, 2); lean_inc(x_34); lean_dec(x_23); x_35 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_35, 0, x_33); lean_ctor_set(x_35, 1, x_34); x_36 = l_Lean_Elab_Tactic_replaceMainGoal(x_35, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_32); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); return x_36; } else { uint8_t x_37; lean_dec(x_23); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); x_37 = !lean_is_exclusive(x_30); if (x_37 == 0) { return x_30; } else { lean_object* x_38; lean_object* x_39; lean_object* x_40; x_38 = lean_ctor_get(x_30, 0); x_39 = lean_ctor_get(x_30, 1); lean_inc(x_39); lean_inc(x_38); lean_dec(x_30); 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 { uint8_t x_41; lean_dec(x_23); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_1); x_41 = !lean_is_exclusive(x_25); if (x_41 == 0) { return x_25; } else { lean_object* x_42; lean_object* x_43; lean_object* x_44; x_42 = lean_ctor_get(x_25, 0); x_43 = lean_ctor_get(x_25, 1); lean_inc(x_43); lean_inc(x_42); lean_dec(x_25); 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; } } } else { uint8_t x_45; lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_1); x_45 = !lean_is_exclusive(x_22); if (x_45 == 0) { return x_22; } else { lean_object* x_46; lean_object* x_47; lean_object* x_48; x_46 = lean_ctor_get(x_22, 0); x_47 = lean_ctor_get(x_22, 1); lean_inc(x_47); lean_inc(x_46); lean_dec(x_22); x_48 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_48, 0, x_46); lean_ctor_set(x_48, 1, x_47); return x_48; } } } else { uint8_t x_49; lean_dec(x_15); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_4); lean_dec(x_1); x_49 = !lean_is_exclusive(x_17); if (x_49 == 0) { return x_17; } else { lean_object* x_50; lean_object* x_51; lean_object* x_52; x_50 = lean_ctor_get(x_17, 0); x_51 = lean_ctor_get(x_17, 1); lean_inc(x_51); lean_inc(x_50); lean_dec(x_17); 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_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_4); lean_dec(x_1); x_53 = !lean_is_exclusive(x_14); if (x_53 == 0) { return x_14; } else { lean_object* x_54; lean_object* x_55; lean_object* x_56; x_54 = lean_ctor_get(x_14, 0); x_55 = lean_ctor_get(x_14, 1); lean_inc(x_55); lean_inc(x_54); lean_dec(x_14); 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; } } } } lean_object* l_Lean_Elab_Tactic_rewriteLocalDeclFVarId(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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { _start: { lean_object* x_14; uint8_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; lean_object* x_22; uint8_t x_23; lean_object* x_24; x_14 = lean_box(0); x_15 = 1; x_16 = lean_box(x_15); x_17 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_elabTerm___boxed), 12, 3); lean_closure_set(x_17, 0, x_1); lean_closure_set(x_17, 1, x_14); lean_closure_set(x_17, 2, x_16); x_18 = lean_box(x_2); x_19 = lean_box(x_4); x_20 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_rewriteLocalDeclFVarId___lambda__1___boxed), 13, 3); lean_closure_set(x_20, 0, x_3); lean_closure_set(x_20, 1, x_18); lean_closure_set(x_20, 2, x_19); x_21 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Tactic_focusAndDone___spec__1___rarg), 11, 2); lean_closure_set(x_21, 0, x_17); lean_closure_set(x_21, 1, x_20); x_22 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_withMainContext___rarg), 10, 3); lean_closure_set(x_22, 0, x_21); lean_closure_set(x_22, 1, x_5); lean_closure_set(x_22, 2, x_6); x_23 = 0; x_24 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp___rarg(x_22, x_23, x_7, x_8, x_9, x_10, x_11, x_12, x_13); return x_24; } } lean_object* l_Lean_Elab_Tactic_rewriteLocalDeclFVarId___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) { _start: { uint8_t x_14; uint8_t x_15; lean_object* x_16; x_14 = lean_unbox(x_2); lean_dec(x_2); x_15 = lean_unbox(x_3); lean_dec(x_3); x_16 = l_Lean_Elab_Tactic_rewriteLocalDeclFVarId___lambda__1(x_1, x_14, x_15, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); return x_16; } } lean_object* l_Lean_Elab_Tactic_rewriteLocalDeclFVarId___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) { _start: { uint8_t x_14; uint8_t x_15; lean_object* x_16; x_14 = lean_unbox(x_2); lean_dec(x_2); x_15 = lean_unbox(x_4); lean_dec(x_4); x_16 = l_Lean_Elab_Tactic_rewriteLocalDeclFVarId(x_1, x_14, x_3, x_15, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); return x_16; } } lean_object* l_Lean_Elab_Tactic_rewriteLocalDecl___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_11; x_11 = l_Lean_Meta_getLocalDeclFromUserName(x_1, x_6, x_7, x_8, x_9, x_10); return x_11; } } lean_object* l_Lean_Elab_Tactic_rewriteLocalDecl___lambda__2(lean_object* x_1, uint8_t x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { _start: { lean_object* x_14; lean_object* x_15; x_14 = l_Lean_LocalDecl_fvarId(x_4); x_15 = l_Lean_Elab_Tactic_rewriteLocalDeclFVarId(x_1, x_2, x_14, x_3, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); return x_15; } } lean_object* l_Lean_Elab_Tactic_rewriteLocalDecl(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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { _start: { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_14 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_rewriteLocalDecl___lambda__1___boxed), 10, 1); lean_closure_set(x_14, 0, x_3); x_15 = lean_box(x_2); x_16 = lean_box(x_4); x_17 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_rewriteLocalDecl___lambda__2___boxed), 13, 3); lean_closure_set(x_17, 0, x_1); lean_closure_set(x_17, 1, x_15); lean_closure_set(x_17, 2, x_16); x_18 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Tactic_focusAndDone___spec__1___rarg), 11, 2); lean_closure_set(x_18, 0, x_14); lean_closure_set(x_18, 1, x_17); x_19 = l_Lean_Elab_Tactic_withMainContext___rarg(x_18, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); return x_19; } } lean_object* l_Lean_Elab_Tactic_rewriteLocalDecl___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_11; x_11 = l_Lean_Elab_Tactic_rewriteLocalDecl___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_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); return x_11; } } lean_object* l_Lean_Elab_Tactic_rewriteLocalDecl___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) { _start: { uint8_t x_14; uint8_t x_15; lean_object* x_16; x_14 = lean_unbox(x_2); lean_dec(x_2); x_15 = lean_unbox(x_3); lean_dec(x_3); x_16 = l_Lean_Elab_Tactic_rewriteLocalDecl___lambda__2(x_1, x_14, x_15, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); lean_dec(x_4); return x_16; } } lean_object* l_Lean_Elab_Tactic_rewriteLocalDecl___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) { _start: { uint8_t x_14; uint8_t x_15; lean_object* x_16; x_14 = lean_unbox(x_2); lean_dec(x_2); x_15 = lean_unbox(x_4); lean_dec(x_4); x_16 = l_Lean_Elab_Tactic_rewriteLocalDecl(x_1, x_14, x_3, x_15, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); return x_16; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Tactic_rewriteAll___spec__1(lean_object* x_1, uint8_t x_2, uint8_t x_3, lean_object* x_4, size_t x_5, size_t x_6, uint8_t x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { _start: { uint8_t x_17; x_17 = x_6 < x_5; if (x_17 == 0) { lean_object* x_18; lean_object* x_19; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_1); x_18 = lean_box(x_7); x_19 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_16); return x_19; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; x_20 = lean_array_uget(x_4, x_6); x_21 = lean_box(x_2); x_22 = lean_box(x_3); lean_inc(x_1); x_23 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_rewriteLocalDeclFVarId___boxed), 13, 4); lean_closure_set(x_23, 0, x_1); lean_closure_set(x_23, 1, x_21); lean_closure_set(x_23, 2, x_20); lean_closure_set(x_23, 3, x_22); lean_inc(x_15); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); x_24 = l_Lean_Elab_Tactic_tryTactic___rarg(x_23, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16); if (x_7 == 0) { lean_object* x_25; lean_object* x_26; size_t x_27; size_t x_28; uint8_t x_29; x_25 = lean_ctor_get(x_24, 0); lean_inc(x_25); x_26 = lean_ctor_get(x_24, 1); lean_inc(x_26); lean_dec(x_24); x_27 = 1; x_28 = x_6 + x_27; x_29 = lean_unbox(x_25); lean_dec(x_25); x_6 = x_28; x_7 = x_29; x_16 = x_26; goto _start; } else { lean_object* x_31; size_t x_32; size_t x_33; uint8_t x_34; x_31 = lean_ctor_get(x_24, 1); lean_inc(x_31); lean_dec(x_24); x_32 = 1; x_33 = x_6 + x_32; x_34 = 1; x_6 = x_33; x_7 = x_34; x_16 = x_31; goto _start; } } } } static lean_object* _init_l_Lean_Elab_Tactic_rewriteAll___lambda__1___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("did not find instance of the pattern in the current goal"); return x_1; } } static lean_object* _init_l_Lean_Elab_Tactic_rewriteAll___lambda__1___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Elab_Tactic_rewriteAll___lambda__1___closed__1; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l_Lean_Elab_Tactic_rewriteAll___lambda__1___closed__3() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Elab_Tactic_rewriteAll___lambda__1___closed__2; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } lean_object* l_Lean_Elab_Tactic_rewriteAll___lambda__1(lean_object* x_1, uint8_t x_2, uint8_t x_3, uint8_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { _start: { lean_object* x_15; lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; x_15 = l_Lean_LocalContext_getFVarIds(x_5); x_16 = l_Array_reverse___rarg(x_15); x_17 = lean_array_get_size(x_16); x_18 = lean_usize_of_nat(x_17); lean_dec(x_17); x_19 = 0; lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); x_20 = l_Array_forInUnsafe_loop___at_Lean_Elab_Tactic_rewriteAll___spec__1(x_1, x_2, x_3, x_16, x_18, x_19, x_4, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14); lean_dec(x_16); x_21 = lean_ctor_get(x_20, 0); lean_inc(x_21); x_22 = lean_unbox(x_21); lean_dec(x_21); if (x_22 == 0) { lean_object* x_23; lean_object* x_24; x_23 = lean_ctor_get(x_20, 1); lean_inc(x_23); lean_dec(x_20); x_24 = l_Lean_Elab_Tactic_getMainGoal(x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_23); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); if (lean_obj_tag(x_24) == 0) { lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; x_25 = lean_ctor_get(x_24, 0); lean_inc(x_25); x_26 = lean_ctor_get(x_24, 1); lean_inc(x_26); lean_dec(x_24); x_27 = l_Lean_Meta_rewrite___closed__1; x_28 = l_Lean_Elab_Tactic_rewriteAll___lambda__1___closed__3; x_29 = lean_box(0); x_30 = l_Lean_Meta_throwTacticEx___rarg(x_27, x_25, x_28, x_29, x_10, x_11, x_12, x_13, x_26); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); return x_30; } else { uint8_t x_31; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); x_31 = !lean_is_exclusive(x_24); if (x_31 == 0) { return x_24; } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; x_32 = lean_ctor_get(x_24, 0); x_33 = lean_ctor_get(x_24, 1); lean_inc(x_33); lean_inc(x_32); lean_dec(x_24); x_34 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_34, 0, x_32); lean_ctor_set(x_34, 1, x_33); return x_34; } } } else { uint8_t x_35; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); x_35 = !lean_is_exclusive(x_20); if (x_35 == 0) { lean_object* x_36; lean_object* x_37; x_36 = lean_ctor_get(x_20, 0); lean_dec(x_36); x_37 = lean_box(0); lean_ctor_set(x_20, 0, x_37); return x_20; } else { lean_object* x_38; lean_object* x_39; lean_object* x_40; x_38 = lean_ctor_get(x_20, 1); lean_inc(x_38); lean_dec(x_20); 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_38); return x_40; } } } } lean_object* l_Lean_Elab_Tactic_rewriteAll(lean_object* x_1, uint8_t x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; x_13 = lean_box(x_2); x_14 = lean_box(x_3); lean_inc(x_1); x_15 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_rewriteTarget___boxed), 12, 3); lean_closure_set(x_15, 0, x_1); lean_closure_set(x_15, 1, x_13); lean_closure_set(x_15, 2, x_14); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); x_16 = l_Lean_Elab_Tactic_tryTactic___rarg(x_15, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); x_17 = lean_ctor_get(x_16, 0); lean_inc(x_17); x_18 = lean_ctor_get(x_16, 1); lean_inc(x_18); lean_dec(x_16); x_19 = lean_box(x_2); x_20 = lean_box(x_3); x_21 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_rewriteAll___lambda__1___boxed), 14, 4); lean_closure_set(x_21, 0, x_1); lean_closure_set(x_21, 1, x_19); lean_closure_set(x_21, 2, x_20); lean_closure_set(x_21, 3, x_17); x_22 = l___private_Lean_Elab_Tactic_Basic_0__Lean_Elab_Tactic_sortFVarIds___closed__1; x_23 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Tactic_focusAndDone___spec__1___rarg), 11, 2); lean_closure_set(x_23, 0, x_22); lean_closure_set(x_23, 1, x_21); x_24 = l_Lean_Elab_Tactic_withMainContext___rarg(x_23, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_18); return x_24; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Tactic_rewriteAll___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { _start: { uint8_t x_17; uint8_t x_18; size_t x_19; size_t x_20; uint8_t x_21; lean_object* x_22; x_17 = lean_unbox(x_2); lean_dec(x_2); x_18 = lean_unbox(x_3); lean_dec(x_3); x_19 = lean_unbox_usize(x_5); lean_dec(x_5); x_20 = lean_unbox_usize(x_6); lean_dec(x_6); x_21 = lean_unbox(x_7); lean_dec(x_7); x_22 = l_Array_forInUnsafe_loop___at_Lean_Elab_Tactic_rewriteAll___spec__1(x_1, x_17, x_18, x_4, x_19, x_20, x_21, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16); lean_dec(x_4); return x_22; } } lean_object* l_Lean_Elab_Tactic_rewriteAll___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: { uint8_t x_15; uint8_t x_16; uint8_t x_17; lean_object* x_18; x_15 = lean_unbox(x_2); lean_dec(x_2); x_16 = lean_unbox(x_3); lean_dec(x_3); x_17 = lean_unbox(x_4); lean_dec(x_4); x_18 = l_Lean_Elab_Tactic_rewriteAll___lambda__1(x_1, x_15, x_16, x_17, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14); lean_dec(x_5); return x_18; } } lean_object* l_Lean_Elab_Tactic_rewriteAll___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { uint8_t x_13; uint8_t x_14; lean_object* x_15; x_13 = lean_unbox(x_2); lean_dec(x_2); x_14 = lean_unbox(x_3); lean_dec(x_3); x_15 = l_Lean_Elab_Tactic_rewriteAll(x_1, x_13, x_14, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); return x_15; } } lean_object* l_Lean_Elab_Tactic_evalRewriteCore_match__1___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; uint8_t x_7; lean_object* x_8; lean_object* x_9; lean_dec(x_3); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); x_7 = lean_ctor_get_uint8(x_1, sizeof(void*)*1); lean_dec(x_1); x_8 = lean_box(x_7); x_9 = lean_apply_2(x_2, x_6, x_8); return x_9; } } } lean_object* l_Lean_Elab_Tactic_evalRewriteCore_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_evalRewriteCore_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Tactic_evalRewriteCore___spec__1(uint8_t x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, size_t x_5, size_t x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { _start: { uint8_t x_17; x_17 = x_5 == x_6; if (x_17 == 0) { lean_object* x_18; lean_object* x_19; lean_dec(x_7); x_18 = lean_array_uget(x_4, x_5); lean_inc(x_15); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_2); x_19 = l_Lean_Elab_Tactic_rewriteLocalDecl(x_2, x_3, x_18, x_1, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16); if (lean_obj_tag(x_19) == 0) { lean_object* x_20; lean_object* x_21; size_t x_22; size_t x_23; x_20 = lean_ctor_get(x_19, 0); lean_inc(x_20); x_21 = lean_ctor_get(x_19, 1); lean_inc(x_21); lean_dec(x_19); x_22 = 1; x_23 = x_5 + x_22; x_5 = x_23; x_7 = x_20; x_16 = x_21; goto _start; } else { uint8_t x_25; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_2); x_25 = !lean_is_exclusive(x_19); if (x_25 == 0) { return x_19; } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; x_26 = lean_ctor_get(x_19, 0); x_27 = lean_ctor_get(x_19, 1); lean_inc(x_27); lean_inc(x_26); lean_dec(x_19); x_28 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_28, 0, x_26); lean_ctor_set(x_28, 1, x_27); return x_28; } } } else { lean_object* x_29; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_2); x_29 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_29, 0, x_7); lean_ctor_set(x_29, 1, x_16); return x_29; } } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Tactic_evalRewriteCore___spec__2(uint8_t x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, size_t x_5, size_t x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { _start: { uint8_t x_17; x_17 = x_5 == x_6; if (x_17 == 0) { lean_object* x_18; lean_object* x_19; lean_dec(x_7); x_18 = lean_array_uget(x_4, x_5); lean_inc(x_15); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_2); x_19 = l_Lean_Elab_Tactic_rewriteLocalDecl(x_2, x_3, x_18, x_1, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16); if (lean_obj_tag(x_19) == 0) { lean_object* x_20; lean_object* x_21; size_t x_22; size_t x_23; x_20 = lean_ctor_get(x_19, 0); lean_inc(x_20); x_21 = lean_ctor_get(x_19, 1); lean_inc(x_21); lean_dec(x_19); x_22 = 1; x_23 = x_5 + x_22; x_5 = x_23; x_7 = x_20; x_16 = x_21; goto _start; } else { uint8_t x_25; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_2); x_25 = !lean_is_exclusive(x_19); if (x_25 == 0) { return x_19; } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; x_26 = lean_ctor_get(x_19, 0); x_27 = lean_ctor_get(x_19, 1); lean_inc(x_27); lean_inc(x_26); lean_dec(x_19); x_28 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_28, 0, x_26); lean_ctor_set(x_28, 1, x_27); return x_28; } } } else { lean_object* x_29; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_2); x_29 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_29, 0, x_7); lean_ctor_set(x_29, 1, x_16); return x_29; } } } lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Tactic_evalRewriteCore___spec__3(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* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16, lean_object* x_17) { _start: { lean_object* x_18; uint8_t x_19; x_18 = lean_ctor_get(x_5, 1); x_19 = lean_nat_dec_le(x_18, x_7); if (x_19 == 0) { lean_object* x_20; uint8_t x_21; x_20 = lean_unsigned_to_nat(0u); x_21 = lean_nat_dec_eq(x_6, x_20); if (x_21 == 0) { lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_42; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; uint8_t x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; uint8_t x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_dec(x_8); x_22 = lean_unsigned_to_nat(1u); x_23 = lean_nat_sub(x_6, x_22); lean_dec(x_6); x_54 = lean_unsigned_to_nat(2u); x_55 = lean_nat_mul(x_7, x_54); x_56 = l_Lean_instInhabitedSyntax; x_57 = lean_array_get(x_56, x_2, x_55); x_58 = lean_nat_add(x_55, x_22); lean_dec(x_55); x_59 = lean_nat_dec_lt(x_58, x_4); x_60 = l_Lean_Syntax_mkApp___closed__1; lean_inc(x_57); x_61 = lean_array_push(x_60, x_57); x_62 = l_Lean_Syntax_getArg(x_57, x_20); x_63 = l_Lean_Syntax_isNone(x_62); lean_dec(x_62); x_64 = l_Lean_Syntax_getArg(x_57, x_22); x_65 = lean_st_ref_get(x_16, x_17); if (x_59 == 0) { lean_object* x_579; lean_dec(x_58); x_579 = lean_box(0); x_66 = x_579; goto block_578; } else { lean_object* x_580; x_580 = lean_array_fget(x_2, x_58); lean_dec(x_58); x_66 = x_580; goto block_578; } block_41: { if (lean_obj_tag(x_24) == 0) { lean_object* x_25; x_25 = lean_ctor_get(x_24, 0); lean_inc(x_25); if (lean_obj_tag(x_25) == 0) { uint8_t x_26; lean_dec(x_23); lean_dec(x_16); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_7); x_26 = !lean_is_exclusive(x_24); if (x_26 == 0) { lean_object* x_27; lean_object* x_28; x_27 = lean_ctor_get(x_24, 0); lean_dec(x_27); x_28 = lean_ctor_get(x_25, 0); lean_inc(x_28); lean_dec(x_25); lean_ctor_set(x_24, 0, x_28); return x_24; } else { lean_object* x_29; lean_object* x_30; lean_object* x_31; x_29 = lean_ctor_get(x_24, 1); lean_inc(x_29); lean_dec(x_24); x_30 = lean_ctor_get(x_25, 0); lean_inc(x_30); lean_dec(x_25); x_31 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_31, 0, x_30); lean_ctor_set(x_31, 1, x_29); return x_31; } } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; x_32 = lean_ctor_get(x_24, 1); lean_inc(x_32); lean_dec(x_24); x_33 = lean_ctor_get(x_25, 0); lean_inc(x_33); lean_dec(x_25); x_34 = lean_ctor_get(x_5, 2); x_35 = lean_nat_add(x_7, x_34); lean_dec(x_7); x_6 = x_23; x_7 = x_35; x_8 = x_33; x_17 = x_32; goto _start; } } else { uint8_t x_37; lean_dec(x_23); lean_dec(x_16); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_7); x_37 = !lean_is_exclusive(x_24); if (x_37 == 0) { return x_24; } else { lean_object* x_38; lean_object* x_39; lean_object* x_40; x_38 = lean_ctor_get(x_24, 0); x_39 = lean_ctor_get(x_24, 1); lean_inc(x_39); lean_inc(x_38); lean_dec(x_24); 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; } } } block_53: { if (lean_obj_tag(x_42) == 0) { uint8_t x_43; x_43 = !lean_is_exclusive(x_42); if (x_43 == 0) { lean_object* x_44; lean_object* x_45; x_44 = lean_ctor_get(x_42, 0); lean_dec(x_44); x_45 = l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1; lean_ctor_set(x_42, 0, x_45); x_24 = x_42; goto block_41; } else { lean_object* x_46; lean_object* x_47; lean_object* x_48; x_46 = lean_ctor_get(x_42, 1); lean_inc(x_46); lean_dec(x_42); x_47 = l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1; x_48 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_48, 0, x_47); lean_ctor_set(x_48, 1, x_46); x_24 = x_48; goto block_41; } } else { uint8_t x_49; x_49 = !lean_is_exclusive(x_42); if (x_49 == 0) { x_24 = x_42; goto block_41; } else { lean_object* x_50; lean_object* x_51; lean_object* x_52; x_50 = lean_ctor_get(x_42, 0); x_51 = lean_ctor_get(x_42, 1); lean_inc(x_51); lean_inc(x_50); lean_dec(x_42); x_52 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_52, 0, x_50); lean_ctor_set(x_52, 1, x_51); x_24 = x_52; goto block_41; } } } block_578: { lean_object* x_67; lean_object* x_68; lean_object* x_69; x_67 = lean_array_push(x_61, x_66); x_68 = l_Lean_nullKind; x_69 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_69, 0, x_68); lean_ctor_set(x_69, 1, x_67); if (x_63 == 0) { lean_object* x_70; lean_object* x_71; 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; lean_object* x_81; lean_object* x_82; uint8_t x_83; x_70 = lean_ctor_get(x_65, 1); lean_inc(x_70); lean_dec(x_65); x_71 = lean_st_ref_get(x_14, x_70); x_72 = lean_ctor_get(x_71, 0); lean_inc(x_72); x_73 = lean_ctor_get(x_71, 1); lean_inc(x_73); lean_dec(x_71); x_74 = lean_ctor_get(x_72, 0); lean_inc(x_74); lean_dec(x_72); x_75 = l_Lean_Elab_Tactic_getGoals___rarg(x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_73); x_76 = lean_ctor_get(x_75, 0); lean_inc(x_76); x_77 = lean_ctor_get(x_75, 1); lean_inc(x_77); lean_dec(x_75); x_78 = lean_st_ref_get(x_16, x_77); x_79 = lean_ctor_get(x_78, 1); lean_inc(x_79); lean_dec(x_78); x_80 = lean_st_ref_get(x_12, x_79); x_81 = lean_ctor_get(x_80, 0); lean_inc(x_81); x_82 = lean_ctor_get(x_81, 5); lean_inc(x_82); lean_dec(x_81); x_83 = lean_ctor_get_uint8(x_82, sizeof(void*)*2); lean_dec(x_82); if (x_83 == 0) { uint8_t x_84; lean_dec(x_76); lean_dec(x_74); lean_dec(x_69); x_84 = !lean_is_exclusive(x_80); if (x_84 == 0) { 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_85 = lean_ctor_get(x_80, 1); x_86 = lean_ctor_get(x_80, 0); lean_dec(x_86); x_87 = lean_ctor_get(x_15, 0); x_88 = lean_ctor_get(x_15, 1); x_89 = lean_ctor_get(x_15, 2); x_90 = lean_ctor_get(x_15, 3); x_91 = lean_ctor_get(x_15, 4); x_92 = lean_ctor_get(x_15, 5); x_93 = lean_ctor_get(x_15, 6); x_94 = lean_ctor_get(x_15, 7); x_95 = l_Lean_replaceRef(x_57, x_90); lean_dec(x_57); lean_inc(x_94); lean_inc(x_93); lean_inc(x_92); lean_inc(x_91); lean_inc(x_89); lean_inc(x_88); lean_inc(x_87); x_96 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_96, 0, x_87); lean_ctor_set(x_96, 1, x_88); lean_ctor_set(x_96, 2, x_89); lean_ctor_set(x_96, 3, x_95); lean_ctor_set(x_96, 4, x_91); lean_ctor_set(x_96, 5, x_92); lean_ctor_set(x_96, 6, x_93); lean_ctor_set(x_96, 7, x_94); if (lean_obj_tag(x_3) == 0) { uint8_t x_97; lean_object* x_98; lean_free_object(x_80); x_97 = 1; lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_98 = l_Lean_Elab_Tactic_rewriteAll(x_64, x_97, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_96, x_16, x_85); x_42 = x_98; goto block_53; } else { lean_object* x_99; uint8_t x_100; lean_object* x_101; uint8_t x_102; x_99 = lean_ctor_get(x_3, 0); x_100 = lean_ctor_get_uint8(x_3, sizeof(void*)*1); x_101 = lean_array_get_size(x_99); x_102 = lean_nat_dec_lt(x_20, x_101); if (x_102 == 0) { lean_dec(x_101); if (x_100 == 0) { lean_object* x_103; lean_dec(x_96); lean_dec(x_64); x_103 = lean_box(0); lean_ctor_set(x_80, 0, x_103); x_42 = x_80; goto block_53; } else { uint8_t x_104; lean_object* x_105; lean_free_object(x_80); x_104 = 1; lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_105 = l_Lean_Elab_Tactic_rewriteTarget(x_64, x_104, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_96, x_16, x_85); x_42 = x_105; goto block_53; } } else { uint8_t x_106; x_106 = lean_nat_dec_le(x_101, x_101); if (x_106 == 0) { lean_dec(x_101); if (x_100 == 0) { lean_object* x_107; lean_dec(x_96); lean_dec(x_64); x_107 = lean_box(0); lean_ctor_set(x_80, 0, x_107); x_42 = x_80; goto block_53; } else { uint8_t x_108; lean_object* x_109; lean_free_object(x_80); x_108 = 1; lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_109 = l_Lean_Elab_Tactic_rewriteTarget(x_64, x_108, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_96, x_16, x_85); x_42 = x_109; goto block_53; } } else { size_t x_110; size_t x_111; uint8_t x_112; lean_object* x_113; lean_object* x_114; lean_free_object(x_80); x_110 = 0; x_111 = lean_usize_of_nat(x_101); lean_dec(x_101); x_112 = 1; x_113 = lean_box(0); lean_inc(x_16); lean_inc(x_96); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_64); x_114 = l_Array_foldlMUnsafe_fold___at_Lean_Elab_Tactic_evalRewriteCore___spec__1(x_1, x_64, x_112, x_99, x_110, x_111, x_113, x_9, x_10, x_11, x_12, x_13, x_14, x_96, x_16, x_85); if (lean_obj_tag(x_114) == 0) { if (x_100 == 0) { uint8_t x_115; lean_dec(x_96); lean_dec(x_64); x_115 = !lean_is_exclusive(x_114); if (x_115 == 0) { lean_object* x_116; x_116 = lean_ctor_get(x_114, 0); lean_dec(x_116); lean_ctor_set(x_114, 0, x_113); x_42 = x_114; goto block_53; } else { lean_object* x_117; lean_object* x_118; x_117 = lean_ctor_get(x_114, 1); lean_inc(x_117); lean_dec(x_114); x_118 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_118, 0, x_113); lean_ctor_set(x_118, 1, x_117); x_42 = x_118; goto block_53; } } else { lean_object* x_119; lean_object* x_120; x_119 = lean_ctor_get(x_114, 1); lean_inc(x_119); lean_dec(x_114); lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_120 = l_Lean_Elab_Tactic_rewriteTarget(x_64, x_112, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_96, x_16, x_119); x_42 = x_120; goto block_53; } } else { uint8_t x_121; lean_dec(x_96); lean_dec(x_64); x_121 = !lean_is_exclusive(x_114); if (x_121 == 0) { x_42 = x_114; goto block_53; } else { lean_object* x_122; lean_object* x_123; lean_object* x_124; x_122 = lean_ctor_get(x_114, 0); x_123 = lean_ctor_get(x_114, 1); lean_inc(x_123); lean_inc(x_122); lean_dec(x_114); x_124 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_124, 0, x_122); lean_ctor_set(x_124, 1, x_123); x_42 = x_124; goto block_53; } } } } } } else { 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; x_125 = lean_ctor_get(x_80, 1); lean_inc(x_125); lean_dec(x_80); x_126 = lean_ctor_get(x_15, 0); x_127 = lean_ctor_get(x_15, 1); x_128 = lean_ctor_get(x_15, 2); x_129 = lean_ctor_get(x_15, 3); x_130 = lean_ctor_get(x_15, 4); x_131 = lean_ctor_get(x_15, 5); x_132 = lean_ctor_get(x_15, 6); x_133 = lean_ctor_get(x_15, 7); x_134 = l_Lean_replaceRef(x_57, x_129); lean_dec(x_57); lean_inc(x_133); lean_inc(x_132); lean_inc(x_131); lean_inc(x_130); lean_inc(x_128); lean_inc(x_127); lean_inc(x_126); x_135 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_135, 0, x_126); lean_ctor_set(x_135, 1, x_127); lean_ctor_set(x_135, 2, x_128); lean_ctor_set(x_135, 3, x_134); lean_ctor_set(x_135, 4, x_130); lean_ctor_set(x_135, 5, x_131); lean_ctor_set(x_135, 6, x_132); lean_ctor_set(x_135, 7, x_133); if (lean_obj_tag(x_3) == 0) { uint8_t x_136; lean_object* x_137; x_136 = 1; lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_137 = l_Lean_Elab_Tactic_rewriteAll(x_64, x_136, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_135, x_16, x_125); x_42 = x_137; goto block_53; } else { lean_object* x_138; uint8_t x_139; lean_object* x_140; uint8_t x_141; x_138 = lean_ctor_get(x_3, 0); x_139 = lean_ctor_get_uint8(x_3, sizeof(void*)*1); x_140 = lean_array_get_size(x_138); x_141 = lean_nat_dec_lt(x_20, x_140); if (x_141 == 0) { lean_dec(x_140); if (x_139 == 0) { lean_object* x_142; lean_object* x_143; lean_dec(x_135); lean_dec(x_64); x_142 = lean_box(0); x_143 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_143, 0, x_142); lean_ctor_set(x_143, 1, x_125); x_42 = x_143; goto block_53; } else { uint8_t x_144; lean_object* x_145; x_144 = 1; lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_145 = l_Lean_Elab_Tactic_rewriteTarget(x_64, x_144, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_135, x_16, x_125); x_42 = x_145; goto block_53; } } else { uint8_t x_146; x_146 = lean_nat_dec_le(x_140, x_140); if (x_146 == 0) { lean_dec(x_140); if (x_139 == 0) { lean_object* x_147; lean_object* x_148; lean_dec(x_135); lean_dec(x_64); x_147 = lean_box(0); x_148 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_148, 0, x_147); lean_ctor_set(x_148, 1, x_125); x_42 = x_148; goto block_53; } else { uint8_t x_149; lean_object* x_150; x_149 = 1; lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_150 = l_Lean_Elab_Tactic_rewriteTarget(x_64, x_149, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_135, x_16, x_125); x_42 = x_150; goto block_53; } } else { size_t x_151; size_t x_152; uint8_t x_153; lean_object* x_154; lean_object* x_155; x_151 = 0; x_152 = lean_usize_of_nat(x_140); lean_dec(x_140); x_153 = 1; x_154 = lean_box(0); lean_inc(x_16); lean_inc(x_135); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_64); x_155 = l_Array_foldlMUnsafe_fold___at_Lean_Elab_Tactic_evalRewriteCore___spec__1(x_1, x_64, x_153, x_138, x_151, x_152, x_154, x_9, x_10, x_11, x_12, x_13, x_14, x_135, x_16, x_125); if (lean_obj_tag(x_155) == 0) { if (x_139 == 0) { lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_dec(x_135); lean_dec(x_64); x_156 = lean_ctor_get(x_155, 1); lean_inc(x_156); if (lean_is_exclusive(x_155)) { lean_ctor_release(x_155, 0); lean_ctor_release(x_155, 1); x_157 = x_155; } else { lean_dec_ref(x_155); x_157 = lean_box(0); } if (lean_is_scalar(x_157)) { x_158 = lean_alloc_ctor(0, 2, 0); } else { x_158 = x_157; } lean_ctor_set(x_158, 0, x_154); lean_ctor_set(x_158, 1, x_156); x_42 = x_158; goto block_53; } else { lean_object* x_159; lean_object* x_160; x_159 = lean_ctor_get(x_155, 1); lean_inc(x_159); lean_dec(x_155); lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_160 = l_Lean_Elab_Tactic_rewriteTarget(x_64, x_153, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_135, x_16, x_159); x_42 = x_160; goto block_53; } } else { lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_dec(x_135); lean_dec(x_64); x_161 = lean_ctor_get(x_155, 0); lean_inc(x_161); x_162 = lean_ctor_get(x_155, 1); lean_inc(x_162); if (lean_is_exclusive(x_155)) { lean_ctor_release(x_155, 0); lean_ctor_release(x_155, 1); x_163 = x_155; } else { lean_dec_ref(x_155); x_163 = lean_box(0); } if (lean_is_scalar(x_163)) { x_164 = lean_alloc_ctor(1, 2, 0); } else { x_164 = x_163; } lean_ctor_set(x_164, 0, x_161); lean_ctor_set(x_164, 1, x_162); x_42 = x_164; goto block_53; } } } } } } else { lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_222; lean_object* x_223; 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; lean_object* x_284; x_165 = lean_ctor_get(x_80, 1); lean_inc(x_165); lean_dec(x_80); x_166 = l___private_Lean_Elab_InfoTree_0__Lean_Elab_getResetInfoTrees___at_Lean_Elab_Tactic_withTacticInfoContext___spec__1___rarg(x_12, x_13, x_14, x_15, x_16, x_165); x_167 = lean_ctor_get(x_166, 0); lean_inc(x_167); x_168 = lean_ctor_get(x_166, 1); lean_inc(x_168); lean_dec(x_166); x_275 = lean_ctor_get(x_15, 0); x_276 = lean_ctor_get(x_15, 1); x_277 = lean_ctor_get(x_15, 2); x_278 = lean_ctor_get(x_15, 3); x_279 = lean_ctor_get(x_15, 4); x_280 = lean_ctor_get(x_15, 5); x_281 = lean_ctor_get(x_15, 6); x_282 = lean_ctor_get(x_15, 7); x_283 = l_Lean_replaceRef(x_57, x_278); lean_dec(x_57); lean_inc(x_282); lean_inc(x_281); lean_inc(x_280); lean_inc(x_279); lean_inc(x_277); lean_inc(x_276); lean_inc(x_275); x_284 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_284, 0, x_275); lean_ctor_set(x_284, 1, x_276); lean_ctor_set(x_284, 2, x_277); lean_ctor_set(x_284, 3, x_283); lean_ctor_set(x_284, 4, x_279); lean_ctor_set(x_284, 5, x_280); lean_ctor_set(x_284, 6, x_281); lean_ctor_set(x_284, 7, x_282); if (lean_obj_tag(x_3) == 0) { uint8_t x_285; lean_object* x_286; x_285 = 1; lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_286 = l_Lean_Elab_Tactic_rewriteAll(x_64, x_285, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_284, x_16, x_168); if (lean_obj_tag(x_286) == 0) { lean_object* x_287; lean_object* x_288; x_287 = lean_ctor_get(x_286, 0); lean_inc(x_287); x_288 = lean_ctor_get(x_286, 1); lean_inc(x_288); lean_dec(x_286); x_169 = x_287; x_170 = x_288; goto block_221; } else { lean_object* x_289; lean_object* x_290; x_289 = lean_ctor_get(x_286, 0); lean_inc(x_289); x_290 = lean_ctor_get(x_286, 1); lean_inc(x_290); lean_dec(x_286); x_222 = x_289; x_223 = x_290; goto block_274; } } else { lean_object* x_291; uint8_t x_292; lean_object* x_293; uint8_t x_294; x_291 = lean_ctor_get(x_3, 0); x_292 = lean_ctor_get_uint8(x_3, sizeof(void*)*1); x_293 = lean_array_get_size(x_291); x_294 = lean_nat_dec_lt(x_20, x_293); if (x_294 == 0) { lean_dec(x_293); if (x_292 == 0) { lean_object* x_295; lean_dec(x_284); lean_dec(x_64); x_295 = lean_box(0); x_169 = x_295; x_170 = x_168; goto block_221; } else { uint8_t x_296; lean_object* x_297; x_296 = 1; lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_297 = l_Lean_Elab_Tactic_rewriteTarget(x_64, x_296, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_284, x_16, x_168); if (lean_obj_tag(x_297) == 0) { lean_object* x_298; lean_object* x_299; x_298 = lean_ctor_get(x_297, 0); lean_inc(x_298); x_299 = lean_ctor_get(x_297, 1); lean_inc(x_299); lean_dec(x_297); x_169 = x_298; x_170 = x_299; goto block_221; } else { lean_object* x_300; lean_object* x_301; x_300 = lean_ctor_get(x_297, 0); lean_inc(x_300); x_301 = lean_ctor_get(x_297, 1); lean_inc(x_301); lean_dec(x_297); x_222 = x_300; x_223 = x_301; goto block_274; } } } else { uint8_t x_302; x_302 = lean_nat_dec_le(x_293, x_293); if (x_302 == 0) { lean_dec(x_293); if (x_292 == 0) { lean_object* x_303; lean_dec(x_284); lean_dec(x_64); x_303 = lean_box(0); x_169 = x_303; x_170 = x_168; goto block_221; } else { uint8_t x_304; lean_object* x_305; x_304 = 1; lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_305 = l_Lean_Elab_Tactic_rewriteTarget(x_64, x_304, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_284, x_16, x_168); if (lean_obj_tag(x_305) == 0) { lean_object* x_306; lean_object* x_307; x_306 = lean_ctor_get(x_305, 0); lean_inc(x_306); x_307 = lean_ctor_get(x_305, 1); lean_inc(x_307); lean_dec(x_305); x_169 = x_306; x_170 = x_307; goto block_221; } else { lean_object* x_308; lean_object* x_309; x_308 = lean_ctor_get(x_305, 0); lean_inc(x_308); x_309 = lean_ctor_get(x_305, 1); lean_inc(x_309); lean_dec(x_305); x_222 = x_308; x_223 = x_309; goto block_274; } } } else { size_t x_310; size_t x_311; uint8_t x_312; lean_object* x_313; lean_object* x_314; x_310 = 0; x_311 = lean_usize_of_nat(x_293); lean_dec(x_293); x_312 = 1; x_313 = lean_box(0); lean_inc(x_16); lean_inc(x_284); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_64); x_314 = l_Array_foldlMUnsafe_fold___at_Lean_Elab_Tactic_evalRewriteCore___spec__2(x_1, x_64, x_312, x_291, x_310, x_311, x_313, x_9, x_10, x_11, x_12, x_13, x_14, x_284, x_16, x_168); if (lean_obj_tag(x_314) == 0) { if (x_292 == 0) { lean_object* x_315; lean_dec(x_284); lean_dec(x_64); x_315 = lean_ctor_get(x_314, 1); lean_inc(x_315); lean_dec(x_314); x_169 = x_313; x_170 = x_315; goto block_221; } else { lean_object* x_316; lean_object* x_317; x_316 = lean_ctor_get(x_314, 1); lean_inc(x_316); lean_dec(x_314); lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_317 = l_Lean_Elab_Tactic_rewriteTarget(x_64, x_312, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_284, x_16, x_316); if (lean_obj_tag(x_317) == 0) { lean_object* x_318; lean_object* x_319; 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_169 = x_318; x_170 = x_319; goto block_221; } else { lean_object* x_320; lean_object* x_321; x_320 = lean_ctor_get(x_317, 0); lean_inc(x_320); x_321 = lean_ctor_get(x_317, 1); lean_inc(x_321); lean_dec(x_317); x_222 = x_320; x_223 = x_321; goto block_274; } } } else { lean_object* x_322; lean_object* x_323; lean_dec(x_284); lean_dec(x_64); x_322 = lean_ctor_get(x_314, 0); lean_inc(x_322); x_323 = lean_ctor_get(x_314, 1); lean_inc(x_323); lean_dec(x_314); x_222 = x_322; x_223 = x_323; goto block_274; } } } } block_221: { 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; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; uint8_t x_188; x_171 = lean_st_ref_get(x_16, x_170); x_172 = lean_ctor_get(x_171, 1); lean_inc(x_172); lean_dec(x_171); x_173 = lean_st_ref_get(x_12, x_172); x_174 = lean_ctor_get(x_173, 0); lean_inc(x_174); x_175 = lean_ctor_get(x_173, 1); lean_inc(x_175); lean_dec(x_173); x_176 = lean_ctor_get(x_174, 5); lean_inc(x_176); lean_dec(x_174); x_177 = lean_ctor_get(x_176, 1); lean_inc(x_177); lean_dec(x_176); x_178 = l_Lean_Elab_Tactic_mkTacticInfo(x_74, x_76, x_69, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_175); x_179 = lean_ctor_get(x_178, 0); lean_inc(x_179); x_180 = lean_ctor_get(x_178, 1); lean_inc(x_180); lean_dec(x_178); x_181 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_181, 0, x_179); lean_ctor_set(x_181, 1, x_177); x_182 = lean_st_ref_get(x_16, x_180); x_183 = lean_ctor_get(x_182, 1); lean_inc(x_183); lean_dec(x_182); x_184 = lean_st_ref_take(x_12, x_183); x_185 = lean_ctor_get(x_184, 0); lean_inc(x_185); x_186 = lean_ctor_get(x_185, 5); lean_inc(x_186); x_187 = lean_ctor_get(x_184, 1); lean_inc(x_187); lean_dec(x_184); x_188 = !lean_is_exclusive(x_185); if (x_188 == 0) { lean_object* x_189; uint8_t x_190; x_189 = lean_ctor_get(x_185, 5); lean_dec(x_189); x_190 = !lean_is_exclusive(x_186); if (x_190 == 0) { lean_object* x_191; lean_object* x_192; lean_object* x_193; uint8_t x_194; x_191 = lean_ctor_get(x_186, 1); lean_dec(x_191); x_192 = l_Std_PersistentArray_push___rarg(x_167, x_181); lean_ctor_set(x_186, 1, x_192); x_193 = lean_st_ref_set(x_12, x_185, x_187); x_194 = !lean_is_exclusive(x_193); if (x_194 == 0) { lean_object* x_195; x_195 = lean_ctor_get(x_193, 0); lean_dec(x_195); lean_ctor_set(x_193, 0, x_169); x_42 = x_193; goto block_53; } else { lean_object* x_196; lean_object* x_197; x_196 = lean_ctor_get(x_193, 1); lean_inc(x_196); lean_dec(x_193); x_197 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_197, 0, x_169); lean_ctor_set(x_197, 1, x_196); x_42 = x_197; goto block_53; } } else { uint8_t 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; x_198 = lean_ctor_get_uint8(x_186, sizeof(void*)*2); x_199 = lean_ctor_get(x_186, 0); lean_inc(x_199); lean_dec(x_186); x_200 = l_Std_PersistentArray_push___rarg(x_167, x_181); x_201 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_201, 0, x_199); lean_ctor_set(x_201, 1, x_200); lean_ctor_set_uint8(x_201, sizeof(void*)*2, x_198); lean_ctor_set(x_185, 5, x_201); x_202 = lean_st_ref_set(x_12, x_185, x_187); x_203 = lean_ctor_get(x_202, 1); lean_inc(x_203); if (lean_is_exclusive(x_202)) { lean_ctor_release(x_202, 0); lean_ctor_release(x_202, 1); x_204 = x_202; } else { lean_dec_ref(x_202); x_204 = lean_box(0); } if (lean_is_scalar(x_204)) { x_205 = lean_alloc_ctor(0, 2, 0); } else { x_205 = x_204; } lean_ctor_set(x_205, 0, x_169); lean_ctor_set(x_205, 1, x_203); x_42 = x_205; goto block_53; } } else { lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; uint8_t x_211; 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; x_206 = lean_ctor_get(x_185, 0); x_207 = lean_ctor_get(x_185, 1); x_208 = lean_ctor_get(x_185, 2); x_209 = lean_ctor_get(x_185, 3); x_210 = lean_ctor_get(x_185, 4); lean_inc(x_210); lean_inc(x_209); lean_inc(x_208); lean_inc(x_207); lean_inc(x_206); lean_dec(x_185); x_211 = lean_ctor_get_uint8(x_186, sizeof(void*)*2); x_212 = lean_ctor_get(x_186, 0); lean_inc(x_212); if (lean_is_exclusive(x_186)) { lean_ctor_release(x_186, 0); lean_ctor_release(x_186, 1); x_213 = x_186; } else { lean_dec_ref(x_186); x_213 = lean_box(0); } x_214 = l_Std_PersistentArray_push___rarg(x_167, x_181); if (lean_is_scalar(x_213)) { x_215 = lean_alloc_ctor(0, 2, 1); } else { x_215 = x_213; } lean_ctor_set(x_215, 0, x_212); lean_ctor_set(x_215, 1, x_214); lean_ctor_set_uint8(x_215, sizeof(void*)*2, x_211); x_216 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_216, 0, x_206); lean_ctor_set(x_216, 1, x_207); lean_ctor_set(x_216, 2, x_208); lean_ctor_set(x_216, 3, x_209); lean_ctor_set(x_216, 4, x_210); lean_ctor_set(x_216, 5, x_215); x_217 = lean_st_ref_set(x_12, x_216, x_187); x_218 = lean_ctor_get(x_217, 1); lean_inc(x_218); if (lean_is_exclusive(x_217)) { lean_ctor_release(x_217, 0); lean_ctor_release(x_217, 1); x_219 = x_217; } else { lean_dec_ref(x_217); x_219 = lean_box(0); } if (lean_is_scalar(x_219)) { x_220 = lean_alloc_ctor(0, 2, 0); } else { x_220 = x_219; } lean_ctor_set(x_220, 0, x_169); lean_ctor_set(x_220, 1, x_218); x_42 = x_220; goto block_53; } } block_274: { lean_object* x_224; lean_object* x_225; lean_object* x_226; lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232; lean_object* x_233; 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_224 = lean_st_ref_get(x_16, x_223); x_225 = lean_ctor_get(x_224, 1); lean_inc(x_225); lean_dec(x_224); x_226 = lean_st_ref_get(x_12, x_225); x_227 = lean_ctor_get(x_226, 0); lean_inc(x_227); x_228 = lean_ctor_get(x_226, 1); lean_inc(x_228); lean_dec(x_226); x_229 = lean_ctor_get(x_227, 5); lean_inc(x_229); lean_dec(x_227); x_230 = lean_ctor_get(x_229, 1); lean_inc(x_230); lean_dec(x_229); x_231 = l_Lean_Elab_Tactic_mkTacticInfo(x_74, x_76, x_69, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_228); x_232 = lean_ctor_get(x_231, 0); lean_inc(x_232); x_233 = lean_ctor_get(x_231, 1); lean_inc(x_233); lean_dec(x_231); x_234 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_234, 0, x_232); lean_ctor_set(x_234, 1, x_230); x_235 = lean_st_ref_get(x_16, x_233); x_236 = lean_ctor_get(x_235, 1); lean_inc(x_236); lean_dec(x_235); x_237 = lean_st_ref_take(x_12, x_236); x_238 = lean_ctor_get(x_237, 0); lean_inc(x_238); x_239 = lean_ctor_get(x_238, 5); lean_inc(x_239); x_240 = lean_ctor_get(x_237, 1); lean_inc(x_240); lean_dec(x_237); x_241 = !lean_is_exclusive(x_238); if (x_241 == 0) { lean_object* x_242; uint8_t x_243; x_242 = lean_ctor_get(x_238, 5); lean_dec(x_242); x_243 = !lean_is_exclusive(x_239); if (x_243 == 0) { lean_object* x_244; lean_object* x_245; lean_object* x_246; uint8_t x_247; x_244 = lean_ctor_get(x_239, 1); lean_dec(x_244); x_245 = l_Std_PersistentArray_push___rarg(x_167, x_234); lean_ctor_set(x_239, 1, x_245); x_246 = lean_st_ref_set(x_12, x_238, x_240); x_247 = !lean_is_exclusive(x_246); if (x_247 == 0) { lean_object* x_248; x_248 = lean_ctor_get(x_246, 0); lean_dec(x_248); lean_ctor_set_tag(x_246, 1); lean_ctor_set(x_246, 0, x_222); x_42 = x_246; goto block_53; } else { lean_object* x_249; lean_object* x_250; x_249 = lean_ctor_get(x_246, 1); lean_inc(x_249); lean_dec(x_246); x_250 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_250, 0, x_222); lean_ctor_set(x_250, 1, x_249); x_42 = x_250; goto block_53; } } else { uint8_t x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; x_251 = lean_ctor_get_uint8(x_239, sizeof(void*)*2); x_252 = lean_ctor_get(x_239, 0); lean_inc(x_252); lean_dec(x_239); x_253 = l_Std_PersistentArray_push___rarg(x_167, x_234); x_254 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_254, 0, x_252); lean_ctor_set(x_254, 1, x_253); lean_ctor_set_uint8(x_254, sizeof(void*)*2, x_251); lean_ctor_set(x_238, 5, x_254); x_255 = lean_st_ref_set(x_12, x_238, x_240); x_256 = lean_ctor_get(x_255, 1); lean_inc(x_256); if (lean_is_exclusive(x_255)) { lean_ctor_release(x_255, 0); lean_ctor_release(x_255, 1); x_257 = x_255; } else { lean_dec_ref(x_255); x_257 = lean_box(0); } if (lean_is_scalar(x_257)) { x_258 = lean_alloc_ctor(1, 2, 0); } else { x_258 = x_257; lean_ctor_set_tag(x_258, 1); } lean_ctor_set(x_258, 0, x_222); lean_ctor_set(x_258, 1, x_256); x_42 = x_258; goto block_53; } } else { lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; lean_object* x_263; uint8_t x_264; 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; lean_object* x_272; lean_object* x_273; x_259 = lean_ctor_get(x_238, 0); x_260 = lean_ctor_get(x_238, 1); x_261 = lean_ctor_get(x_238, 2); x_262 = lean_ctor_get(x_238, 3); x_263 = lean_ctor_get(x_238, 4); lean_inc(x_263); lean_inc(x_262); lean_inc(x_261); lean_inc(x_260); lean_inc(x_259); lean_dec(x_238); x_264 = lean_ctor_get_uint8(x_239, sizeof(void*)*2); x_265 = lean_ctor_get(x_239, 0); lean_inc(x_265); if (lean_is_exclusive(x_239)) { lean_ctor_release(x_239, 0); lean_ctor_release(x_239, 1); x_266 = x_239; } else { lean_dec_ref(x_239); x_266 = lean_box(0); } x_267 = l_Std_PersistentArray_push___rarg(x_167, x_234); if (lean_is_scalar(x_266)) { x_268 = lean_alloc_ctor(0, 2, 1); } else { x_268 = x_266; } lean_ctor_set(x_268, 0, x_265); lean_ctor_set(x_268, 1, x_267); lean_ctor_set_uint8(x_268, sizeof(void*)*2, x_264); x_269 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_269, 0, x_259); lean_ctor_set(x_269, 1, x_260); lean_ctor_set(x_269, 2, x_261); lean_ctor_set(x_269, 3, x_262); lean_ctor_set(x_269, 4, x_263); lean_ctor_set(x_269, 5, x_268); x_270 = lean_st_ref_set(x_12, x_269, x_240); x_271 = lean_ctor_get(x_270, 1); lean_inc(x_271); if (lean_is_exclusive(x_270)) { lean_ctor_release(x_270, 0); lean_ctor_release(x_270, 1); x_272 = x_270; } else { lean_dec_ref(x_270); x_272 = lean_box(0); } if (lean_is_scalar(x_272)) { x_273 = lean_alloc_ctor(1, 2, 0); } else { x_273 = x_272; lean_ctor_set_tag(x_273, 1); } lean_ctor_set(x_273, 0, x_222); lean_ctor_set(x_273, 1, x_271); x_42 = x_273; goto block_53; } } } } else { 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; lean_object* x_333; lean_object* x_334; lean_object* x_335; lean_object* x_336; uint8_t x_337; x_324 = lean_ctor_get(x_65, 1); lean_inc(x_324); lean_dec(x_65); x_325 = lean_st_ref_get(x_14, x_324); 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_ctor_get(x_326, 0); lean_inc(x_328); lean_dec(x_326); x_329 = l_Lean_Elab_Tactic_getGoals___rarg(x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_327); x_330 = lean_ctor_get(x_329, 0); lean_inc(x_330); x_331 = lean_ctor_get(x_329, 1); lean_inc(x_331); lean_dec(x_329); x_332 = lean_st_ref_get(x_16, x_331); x_333 = lean_ctor_get(x_332, 1); lean_inc(x_333); lean_dec(x_332); x_334 = lean_st_ref_get(x_12, x_333); x_335 = lean_ctor_get(x_334, 0); lean_inc(x_335); x_336 = lean_ctor_get(x_335, 5); lean_inc(x_336); lean_dec(x_335); x_337 = lean_ctor_get_uint8(x_336, sizeof(void*)*2); lean_dec(x_336); if (x_337 == 0) { uint8_t x_338; lean_dec(x_330); lean_dec(x_328); lean_dec(x_69); x_338 = !lean_is_exclusive(x_334); if (x_338 == 0) { lean_object* x_339; lean_object* x_340; lean_object* x_341; lean_object* x_342; lean_object* x_343; lean_object* x_344; lean_object* x_345; lean_object* x_346; lean_object* x_347; lean_object* x_348; lean_object* x_349; lean_object* x_350; x_339 = lean_ctor_get(x_334, 1); x_340 = lean_ctor_get(x_334, 0); lean_dec(x_340); x_341 = lean_ctor_get(x_15, 0); x_342 = lean_ctor_get(x_15, 1); x_343 = lean_ctor_get(x_15, 2); x_344 = lean_ctor_get(x_15, 3); x_345 = lean_ctor_get(x_15, 4); x_346 = lean_ctor_get(x_15, 5); x_347 = lean_ctor_get(x_15, 6); x_348 = lean_ctor_get(x_15, 7); x_349 = l_Lean_replaceRef(x_57, x_344); lean_dec(x_57); lean_inc(x_348); lean_inc(x_347); lean_inc(x_346); lean_inc(x_345); lean_inc(x_343); lean_inc(x_342); lean_inc(x_341); x_350 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_350, 0, x_341); lean_ctor_set(x_350, 1, x_342); lean_ctor_set(x_350, 2, x_343); lean_ctor_set(x_350, 3, x_349); lean_ctor_set(x_350, 4, x_345); lean_ctor_set(x_350, 5, x_346); lean_ctor_set(x_350, 6, x_347); lean_ctor_set(x_350, 7, x_348); if (lean_obj_tag(x_3) == 0) { uint8_t x_351; lean_object* x_352; lean_free_object(x_334); x_351 = 0; lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_352 = l_Lean_Elab_Tactic_rewriteAll(x_64, x_351, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_350, x_16, x_339); x_42 = x_352; goto block_53; } else { lean_object* x_353; uint8_t x_354; lean_object* x_355; uint8_t x_356; x_353 = lean_ctor_get(x_3, 0); x_354 = lean_ctor_get_uint8(x_3, sizeof(void*)*1); x_355 = lean_array_get_size(x_353); x_356 = lean_nat_dec_lt(x_20, x_355); if (x_356 == 0) { lean_dec(x_355); if (x_354 == 0) { lean_object* x_357; lean_dec(x_350); lean_dec(x_64); x_357 = lean_box(0); lean_ctor_set(x_334, 0, x_357); x_42 = x_334; goto block_53; } else { uint8_t x_358; lean_object* x_359; lean_free_object(x_334); x_358 = 0; lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_359 = l_Lean_Elab_Tactic_rewriteTarget(x_64, x_358, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_350, x_16, x_339); x_42 = x_359; goto block_53; } } else { uint8_t x_360; x_360 = lean_nat_dec_le(x_355, x_355); if (x_360 == 0) { lean_dec(x_355); if (x_354 == 0) { lean_object* x_361; lean_dec(x_350); lean_dec(x_64); x_361 = lean_box(0); lean_ctor_set(x_334, 0, x_361); x_42 = x_334; goto block_53; } else { uint8_t x_362; lean_object* x_363; lean_free_object(x_334); x_362 = 0; lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_363 = l_Lean_Elab_Tactic_rewriteTarget(x_64, x_362, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_350, x_16, x_339); x_42 = x_363; goto block_53; } } else { size_t x_364; size_t x_365; uint8_t x_366; lean_object* x_367; lean_object* x_368; lean_free_object(x_334); x_364 = 0; x_365 = lean_usize_of_nat(x_355); lean_dec(x_355); x_366 = 0; x_367 = lean_box(0); lean_inc(x_16); lean_inc(x_350); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_64); x_368 = l_Array_foldlMUnsafe_fold___at_Lean_Elab_Tactic_evalRewriteCore___spec__1(x_1, x_64, x_366, x_353, x_364, x_365, x_367, x_9, x_10, x_11, x_12, x_13, x_14, x_350, x_16, x_339); if (lean_obj_tag(x_368) == 0) { if (x_354 == 0) { uint8_t x_369; lean_dec(x_350); lean_dec(x_64); x_369 = !lean_is_exclusive(x_368); if (x_369 == 0) { lean_object* x_370; x_370 = lean_ctor_get(x_368, 0); lean_dec(x_370); lean_ctor_set(x_368, 0, x_367); x_42 = x_368; goto block_53; } else { lean_object* x_371; lean_object* x_372; x_371 = lean_ctor_get(x_368, 1); lean_inc(x_371); lean_dec(x_368); x_372 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_372, 0, x_367); lean_ctor_set(x_372, 1, x_371); x_42 = x_372; goto block_53; } } else { lean_object* x_373; lean_object* x_374; x_373 = lean_ctor_get(x_368, 1); lean_inc(x_373); lean_dec(x_368); lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_374 = l_Lean_Elab_Tactic_rewriteTarget(x_64, x_366, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_350, x_16, x_373); x_42 = x_374; goto block_53; } } else { uint8_t x_375; lean_dec(x_350); lean_dec(x_64); x_375 = !lean_is_exclusive(x_368); if (x_375 == 0) { x_42 = x_368; goto block_53; } else { lean_object* x_376; lean_object* x_377; lean_object* x_378; x_376 = lean_ctor_get(x_368, 0); x_377 = lean_ctor_get(x_368, 1); lean_inc(x_377); lean_inc(x_376); lean_dec(x_368); x_378 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_378, 0, x_376); lean_ctor_set(x_378, 1, x_377); x_42 = x_378; goto block_53; } } } } } } else { 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; lean_object* x_386; lean_object* x_387; lean_object* x_388; lean_object* x_389; x_379 = lean_ctor_get(x_334, 1); lean_inc(x_379); lean_dec(x_334); x_380 = lean_ctor_get(x_15, 0); x_381 = lean_ctor_get(x_15, 1); x_382 = lean_ctor_get(x_15, 2); x_383 = lean_ctor_get(x_15, 3); x_384 = lean_ctor_get(x_15, 4); x_385 = lean_ctor_get(x_15, 5); x_386 = lean_ctor_get(x_15, 6); x_387 = lean_ctor_get(x_15, 7); x_388 = l_Lean_replaceRef(x_57, x_383); lean_dec(x_57); lean_inc(x_387); lean_inc(x_386); lean_inc(x_385); lean_inc(x_384); lean_inc(x_382); lean_inc(x_381); lean_inc(x_380); x_389 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_389, 0, x_380); lean_ctor_set(x_389, 1, x_381); lean_ctor_set(x_389, 2, x_382); lean_ctor_set(x_389, 3, x_388); lean_ctor_set(x_389, 4, x_384); lean_ctor_set(x_389, 5, x_385); lean_ctor_set(x_389, 6, x_386); lean_ctor_set(x_389, 7, x_387); if (lean_obj_tag(x_3) == 0) { uint8_t x_390; lean_object* x_391; x_390 = 0; lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_391 = l_Lean_Elab_Tactic_rewriteAll(x_64, x_390, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_389, x_16, x_379); x_42 = x_391; goto block_53; } else { lean_object* x_392; uint8_t x_393; lean_object* x_394; uint8_t x_395; x_392 = lean_ctor_get(x_3, 0); x_393 = lean_ctor_get_uint8(x_3, sizeof(void*)*1); x_394 = lean_array_get_size(x_392); x_395 = lean_nat_dec_lt(x_20, x_394); if (x_395 == 0) { lean_dec(x_394); if (x_393 == 0) { lean_object* x_396; lean_object* x_397; lean_dec(x_389); lean_dec(x_64); x_396 = lean_box(0); x_397 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_397, 0, x_396); lean_ctor_set(x_397, 1, x_379); x_42 = x_397; goto block_53; } else { uint8_t x_398; lean_object* x_399; x_398 = 0; lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_399 = l_Lean_Elab_Tactic_rewriteTarget(x_64, x_398, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_389, x_16, x_379); x_42 = x_399; goto block_53; } } else { uint8_t x_400; x_400 = lean_nat_dec_le(x_394, x_394); if (x_400 == 0) { lean_dec(x_394); if (x_393 == 0) { lean_object* x_401; lean_object* x_402; lean_dec(x_389); lean_dec(x_64); x_401 = lean_box(0); x_402 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_402, 0, x_401); lean_ctor_set(x_402, 1, x_379); x_42 = x_402; goto block_53; } else { uint8_t x_403; lean_object* x_404; x_403 = 0; lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_404 = l_Lean_Elab_Tactic_rewriteTarget(x_64, x_403, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_389, x_16, x_379); x_42 = x_404; goto block_53; } } else { size_t x_405; size_t x_406; uint8_t x_407; lean_object* x_408; lean_object* x_409; x_405 = 0; x_406 = lean_usize_of_nat(x_394); lean_dec(x_394); x_407 = 0; x_408 = lean_box(0); lean_inc(x_16); lean_inc(x_389); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_64); x_409 = l_Array_foldlMUnsafe_fold___at_Lean_Elab_Tactic_evalRewriteCore___spec__1(x_1, x_64, x_407, x_392, x_405, x_406, x_408, x_9, x_10, x_11, x_12, x_13, x_14, x_389, x_16, x_379); if (lean_obj_tag(x_409) == 0) { if (x_393 == 0) { lean_object* x_410; lean_object* x_411; lean_object* x_412; lean_dec(x_389); lean_dec(x_64); x_410 = lean_ctor_get(x_409, 1); lean_inc(x_410); if (lean_is_exclusive(x_409)) { lean_ctor_release(x_409, 0); lean_ctor_release(x_409, 1); x_411 = x_409; } else { lean_dec_ref(x_409); x_411 = lean_box(0); } if (lean_is_scalar(x_411)) { x_412 = lean_alloc_ctor(0, 2, 0); } else { x_412 = x_411; } lean_ctor_set(x_412, 0, x_408); lean_ctor_set(x_412, 1, x_410); x_42 = x_412; goto block_53; } else { lean_object* x_413; lean_object* x_414; x_413 = lean_ctor_get(x_409, 1); lean_inc(x_413); lean_dec(x_409); lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_414 = l_Lean_Elab_Tactic_rewriteTarget(x_64, x_407, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_389, x_16, x_413); x_42 = x_414; goto block_53; } } else { lean_object* x_415; lean_object* x_416; lean_object* x_417; lean_object* x_418; lean_dec(x_389); lean_dec(x_64); x_415 = lean_ctor_get(x_409, 0); lean_inc(x_415); x_416 = lean_ctor_get(x_409, 1); lean_inc(x_416); if (lean_is_exclusive(x_409)) { lean_ctor_release(x_409, 0); lean_ctor_release(x_409, 1); x_417 = x_409; } else { lean_dec_ref(x_409); x_417 = lean_box(0); } if (lean_is_scalar(x_417)) { x_418 = lean_alloc_ctor(1, 2, 0); } else { x_418 = x_417; } lean_ctor_set(x_418, 0, x_415); lean_ctor_set(x_418, 1, x_416); x_42 = x_418; goto block_53; } } } } } } else { lean_object* x_419; lean_object* x_420; lean_object* x_421; lean_object* x_422; lean_object* x_423; lean_object* x_424; lean_object* x_476; lean_object* x_477; 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; x_419 = lean_ctor_get(x_334, 1); lean_inc(x_419); lean_dec(x_334); x_420 = l___private_Lean_Elab_InfoTree_0__Lean_Elab_getResetInfoTrees___at_Lean_Elab_Tactic_withTacticInfoContext___spec__1___rarg(x_12, x_13, x_14, x_15, x_16, x_419); 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_529 = lean_ctor_get(x_15, 0); x_530 = lean_ctor_get(x_15, 1); x_531 = lean_ctor_get(x_15, 2); x_532 = lean_ctor_get(x_15, 3); x_533 = lean_ctor_get(x_15, 4); x_534 = lean_ctor_get(x_15, 5); x_535 = lean_ctor_get(x_15, 6); x_536 = lean_ctor_get(x_15, 7); x_537 = l_Lean_replaceRef(x_57, x_532); lean_dec(x_57); lean_inc(x_536); lean_inc(x_535); lean_inc(x_534); lean_inc(x_533); lean_inc(x_531); lean_inc(x_530); lean_inc(x_529); x_538 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_538, 0, x_529); lean_ctor_set(x_538, 1, x_530); lean_ctor_set(x_538, 2, x_531); lean_ctor_set(x_538, 3, x_537); lean_ctor_set(x_538, 4, x_533); lean_ctor_set(x_538, 5, x_534); lean_ctor_set(x_538, 6, x_535); lean_ctor_set(x_538, 7, x_536); if (lean_obj_tag(x_3) == 0) { uint8_t x_539; lean_object* x_540; x_539 = 0; lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_540 = l_Lean_Elab_Tactic_rewriteAll(x_64, x_539, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_538, x_16, x_422); if (lean_obj_tag(x_540) == 0) { lean_object* x_541; lean_object* x_542; x_541 = lean_ctor_get(x_540, 0); lean_inc(x_541); x_542 = lean_ctor_get(x_540, 1); lean_inc(x_542); lean_dec(x_540); x_423 = x_541; x_424 = x_542; goto block_475; } else { lean_object* x_543; lean_object* x_544; x_543 = lean_ctor_get(x_540, 0); lean_inc(x_543); x_544 = lean_ctor_get(x_540, 1); lean_inc(x_544); lean_dec(x_540); x_476 = x_543; x_477 = x_544; goto block_528; } } else { lean_object* x_545; uint8_t x_546; lean_object* x_547; uint8_t x_548; x_545 = lean_ctor_get(x_3, 0); x_546 = lean_ctor_get_uint8(x_3, sizeof(void*)*1); x_547 = lean_array_get_size(x_545); x_548 = lean_nat_dec_lt(x_20, x_547); if (x_548 == 0) { lean_dec(x_547); if (x_546 == 0) { lean_object* x_549; lean_dec(x_538); lean_dec(x_64); x_549 = lean_box(0); x_423 = x_549; x_424 = x_422; goto block_475; } else { uint8_t x_550; lean_object* x_551; x_550 = 0; lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_551 = l_Lean_Elab_Tactic_rewriteTarget(x_64, x_550, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_538, x_16, x_422); if (lean_obj_tag(x_551) == 0) { lean_object* x_552; lean_object* x_553; x_552 = lean_ctor_get(x_551, 0); lean_inc(x_552); x_553 = lean_ctor_get(x_551, 1); lean_inc(x_553); lean_dec(x_551); x_423 = x_552; x_424 = x_553; goto block_475; } else { lean_object* x_554; lean_object* x_555; x_554 = lean_ctor_get(x_551, 0); lean_inc(x_554); x_555 = lean_ctor_get(x_551, 1); lean_inc(x_555); lean_dec(x_551); x_476 = x_554; x_477 = x_555; goto block_528; } } } else { uint8_t x_556; x_556 = lean_nat_dec_le(x_547, x_547); if (x_556 == 0) { lean_dec(x_547); if (x_546 == 0) { lean_object* x_557; lean_dec(x_538); lean_dec(x_64); x_557 = lean_box(0); x_423 = x_557; x_424 = x_422; goto block_475; } else { uint8_t x_558; lean_object* x_559; x_558 = 0; lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_559 = l_Lean_Elab_Tactic_rewriteTarget(x_64, x_558, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_538, x_16, x_422); if (lean_obj_tag(x_559) == 0) { lean_object* x_560; lean_object* x_561; x_560 = lean_ctor_get(x_559, 0); lean_inc(x_560); x_561 = lean_ctor_get(x_559, 1); lean_inc(x_561); lean_dec(x_559); x_423 = x_560; x_424 = x_561; goto block_475; } else { lean_object* x_562; lean_object* x_563; x_562 = lean_ctor_get(x_559, 0); lean_inc(x_562); x_563 = lean_ctor_get(x_559, 1); lean_inc(x_563); lean_dec(x_559); x_476 = x_562; x_477 = x_563; goto block_528; } } } else { size_t x_564; size_t x_565; uint8_t x_566; lean_object* x_567; lean_object* x_568; x_564 = 0; x_565 = lean_usize_of_nat(x_547); lean_dec(x_547); x_566 = 0; x_567 = lean_box(0); lean_inc(x_16); lean_inc(x_538); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_64); x_568 = l_Array_foldlMUnsafe_fold___at_Lean_Elab_Tactic_evalRewriteCore___spec__2(x_1, x_64, x_566, x_545, x_564, x_565, x_567, x_9, x_10, x_11, x_12, x_13, x_14, x_538, x_16, x_422); if (lean_obj_tag(x_568) == 0) { if (x_546 == 0) { lean_object* x_569; lean_dec(x_538); lean_dec(x_64); x_569 = lean_ctor_get(x_568, 1); lean_inc(x_569); lean_dec(x_568); x_423 = x_567; x_424 = x_569; goto block_475; } else { lean_object* x_570; lean_object* x_571; x_570 = lean_ctor_get(x_568, 1); lean_inc(x_570); lean_dec(x_568); lean_inc(x_16); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); x_571 = l_Lean_Elab_Tactic_rewriteTarget(x_64, x_566, x_1, x_9, x_10, x_11, x_12, x_13, x_14, x_538, x_16, x_570); if (lean_obj_tag(x_571) == 0) { lean_object* x_572; lean_object* x_573; x_572 = lean_ctor_get(x_571, 0); lean_inc(x_572); x_573 = lean_ctor_get(x_571, 1); lean_inc(x_573); lean_dec(x_571); x_423 = x_572; x_424 = x_573; goto block_475; } else { lean_object* x_574; lean_object* x_575; x_574 = lean_ctor_get(x_571, 0); lean_inc(x_574); x_575 = lean_ctor_get(x_571, 1); lean_inc(x_575); lean_dec(x_571); x_476 = x_574; x_477 = x_575; goto block_528; } } } else { lean_object* x_576; lean_object* x_577; lean_dec(x_538); lean_dec(x_64); x_576 = lean_ctor_get(x_568, 0); lean_inc(x_576); x_577 = lean_ctor_get(x_568, 1); lean_inc(x_577); lean_dec(x_568); x_476 = x_576; x_477 = x_577; goto block_528; } } } } block_475: { 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; uint8_t x_442; x_425 = lean_st_ref_get(x_16, x_424); x_426 = lean_ctor_get(x_425, 1); lean_inc(x_426); lean_dec(x_425); x_427 = lean_st_ref_get(x_12, x_426); x_428 = lean_ctor_get(x_427, 0); lean_inc(x_428); x_429 = lean_ctor_get(x_427, 1); lean_inc(x_429); lean_dec(x_427); x_430 = lean_ctor_get(x_428, 5); lean_inc(x_430); lean_dec(x_428); x_431 = lean_ctor_get(x_430, 1); lean_inc(x_431); lean_dec(x_430); x_432 = l_Lean_Elab_Tactic_mkTacticInfo(x_328, x_330, x_69, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_429); x_433 = lean_ctor_get(x_432, 0); lean_inc(x_433); x_434 = lean_ctor_get(x_432, 1); lean_inc(x_434); lean_dec(x_432); x_435 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_435, 0, x_433); lean_ctor_set(x_435, 1, x_431); x_436 = lean_st_ref_get(x_16, x_434); x_437 = lean_ctor_get(x_436, 1); lean_inc(x_437); lean_dec(x_436); x_438 = lean_st_ref_take(x_12, x_437); x_439 = lean_ctor_get(x_438, 0); lean_inc(x_439); x_440 = lean_ctor_get(x_439, 5); lean_inc(x_440); x_441 = lean_ctor_get(x_438, 1); lean_inc(x_441); lean_dec(x_438); x_442 = !lean_is_exclusive(x_439); if (x_442 == 0) { lean_object* x_443; uint8_t x_444; x_443 = lean_ctor_get(x_439, 5); lean_dec(x_443); x_444 = !lean_is_exclusive(x_440); if (x_444 == 0) { lean_object* x_445; lean_object* x_446; lean_object* x_447; uint8_t x_448; x_445 = lean_ctor_get(x_440, 1); lean_dec(x_445); x_446 = l_Std_PersistentArray_push___rarg(x_421, x_435); lean_ctor_set(x_440, 1, x_446); x_447 = lean_st_ref_set(x_12, x_439, x_441); x_448 = !lean_is_exclusive(x_447); if (x_448 == 0) { lean_object* x_449; x_449 = lean_ctor_get(x_447, 0); lean_dec(x_449); lean_ctor_set(x_447, 0, x_423); x_42 = x_447; goto block_53; } else { lean_object* x_450; lean_object* x_451; x_450 = lean_ctor_get(x_447, 1); lean_inc(x_450); lean_dec(x_447); x_451 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_451, 0, x_423); lean_ctor_set(x_451, 1, x_450); x_42 = x_451; goto block_53; } } else { uint8_t 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; lean_object* x_459; x_452 = lean_ctor_get_uint8(x_440, sizeof(void*)*2); x_453 = lean_ctor_get(x_440, 0); lean_inc(x_453); lean_dec(x_440); x_454 = l_Std_PersistentArray_push___rarg(x_421, x_435); x_455 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_455, 0, x_453); lean_ctor_set(x_455, 1, x_454); lean_ctor_set_uint8(x_455, sizeof(void*)*2, x_452); lean_ctor_set(x_439, 5, x_455); x_456 = lean_st_ref_set(x_12, x_439, x_441); x_457 = lean_ctor_get(x_456, 1); lean_inc(x_457); if (lean_is_exclusive(x_456)) { lean_ctor_release(x_456, 0); lean_ctor_release(x_456, 1); x_458 = x_456; } else { lean_dec_ref(x_456); x_458 = lean_box(0); } if (lean_is_scalar(x_458)) { x_459 = lean_alloc_ctor(0, 2, 0); } else { x_459 = x_458; } lean_ctor_set(x_459, 0, x_423); lean_ctor_set(x_459, 1, x_457); x_42 = x_459; goto block_53; } } else { 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_467; lean_object* x_468; lean_object* x_469; lean_object* x_470; lean_object* x_471; lean_object* x_472; lean_object* x_473; lean_object* x_474; x_460 = lean_ctor_get(x_439, 0); x_461 = lean_ctor_get(x_439, 1); x_462 = lean_ctor_get(x_439, 2); x_463 = lean_ctor_get(x_439, 3); x_464 = lean_ctor_get(x_439, 4); lean_inc(x_464); lean_inc(x_463); lean_inc(x_462); lean_inc(x_461); lean_inc(x_460); lean_dec(x_439); x_465 = lean_ctor_get_uint8(x_440, sizeof(void*)*2); x_466 = lean_ctor_get(x_440, 0); lean_inc(x_466); if (lean_is_exclusive(x_440)) { lean_ctor_release(x_440, 0); lean_ctor_release(x_440, 1); x_467 = x_440; } else { lean_dec_ref(x_440); x_467 = lean_box(0); } x_468 = l_Std_PersistentArray_push___rarg(x_421, x_435); if (lean_is_scalar(x_467)) { x_469 = lean_alloc_ctor(0, 2, 1); } else { x_469 = x_467; } lean_ctor_set(x_469, 0, x_466); lean_ctor_set(x_469, 1, x_468); lean_ctor_set_uint8(x_469, sizeof(void*)*2, x_465); x_470 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_470, 0, x_460); lean_ctor_set(x_470, 1, x_461); lean_ctor_set(x_470, 2, x_462); lean_ctor_set(x_470, 3, x_463); lean_ctor_set(x_470, 4, x_464); lean_ctor_set(x_470, 5, x_469); x_471 = lean_st_ref_set(x_12, x_470, x_441); x_472 = lean_ctor_get(x_471, 1); lean_inc(x_472); if (lean_is_exclusive(x_471)) { lean_ctor_release(x_471, 0); lean_ctor_release(x_471, 1); x_473 = x_471; } else { lean_dec_ref(x_471); x_473 = lean_box(0); } if (lean_is_scalar(x_473)) { x_474 = lean_alloc_ctor(0, 2, 0); } else { x_474 = x_473; } lean_ctor_set(x_474, 0, x_423); lean_ctor_set(x_474, 1, x_472); x_42 = x_474; goto block_53; } } block_528: { 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; lean_object* x_489; lean_object* x_490; lean_object* x_491; lean_object* x_492; lean_object* x_493; lean_object* x_494; uint8_t x_495; x_478 = lean_st_ref_get(x_16, x_477); x_479 = lean_ctor_get(x_478, 1); lean_inc(x_479); lean_dec(x_478); x_480 = lean_st_ref_get(x_12, x_479); x_481 = lean_ctor_get(x_480, 0); lean_inc(x_481); x_482 = lean_ctor_get(x_480, 1); lean_inc(x_482); lean_dec(x_480); x_483 = lean_ctor_get(x_481, 5); lean_inc(x_483); lean_dec(x_481); x_484 = lean_ctor_get(x_483, 1); lean_inc(x_484); lean_dec(x_483); x_485 = l_Lean_Elab_Tactic_mkTacticInfo(x_328, x_330, x_69, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_482); x_486 = lean_ctor_get(x_485, 0); lean_inc(x_486); x_487 = lean_ctor_get(x_485, 1); lean_inc(x_487); lean_dec(x_485); x_488 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_488, 0, x_486); lean_ctor_set(x_488, 1, x_484); x_489 = lean_st_ref_get(x_16, x_487); x_490 = lean_ctor_get(x_489, 1); lean_inc(x_490); lean_dec(x_489); x_491 = lean_st_ref_take(x_12, x_490); x_492 = lean_ctor_get(x_491, 0); lean_inc(x_492); x_493 = lean_ctor_get(x_492, 5); lean_inc(x_493); x_494 = lean_ctor_get(x_491, 1); lean_inc(x_494); lean_dec(x_491); x_495 = !lean_is_exclusive(x_492); if (x_495 == 0) { lean_object* x_496; uint8_t x_497; x_496 = lean_ctor_get(x_492, 5); lean_dec(x_496); x_497 = !lean_is_exclusive(x_493); if (x_497 == 0) { lean_object* x_498; lean_object* x_499; lean_object* x_500; uint8_t x_501; x_498 = lean_ctor_get(x_493, 1); lean_dec(x_498); x_499 = l_Std_PersistentArray_push___rarg(x_421, x_488); lean_ctor_set(x_493, 1, x_499); x_500 = lean_st_ref_set(x_12, x_492, x_494); x_501 = !lean_is_exclusive(x_500); if (x_501 == 0) { lean_object* x_502; x_502 = lean_ctor_get(x_500, 0); lean_dec(x_502); lean_ctor_set_tag(x_500, 1); lean_ctor_set(x_500, 0, x_476); x_42 = x_500; goto block_53; } else { lean_object* x_503; lean_object* x_504; x_503 = lean_ctor_get(x_500, 1); lean_inc(x_503); lean_dec(x_500); x_504 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_504, 0, x_476); lean_ctor_set(x_504, 1, x_503); x_42 = x_504; goto block_53; } } else { uint8_t x_505; lean_object* x_506; lean_object* x_507; lean_object* x_508; lean_object* x_509; lean_object* x_510; lean_object* x_511; lean_object* x_512; x_505 = lean_ctor_get_uint8(x_493, sizeof(void*)*2); x_506 = lean_ctor_get(x_493, 0); lean_inc(x_506); lean_dec(x_493); x_507 = l_Std_PersistentArray_push___rarg(x_421, x_488); x_508 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_508, 0, x_506); lean_ctor_set(x_508, 1, x_507); lean_ctor_set_uint8(x_508, sizeof(void*)*2, x_505); lean_ctor_set(x_492, 5, x_508); x_509 = lean_st_ref_set(x_12, x_492, x_494); x_510 = lean_ctor_get(x_509, 1); lean_inc(x_510); if (lean_is_exclusive(x_509)) { lean_ctor_release(x_509, 0); lean_ctor_release(x_509, 1); x_511 = x_509; } else { lean_dec_ref(x_509); x_511 = lean_box(0); } if (lean_is_scalar(x_511)) { x_512 = lean_alloc_ctor(1, 2, 0); } else { x_512 = x_511; lean_ctor_set_tag(x_512, 1); } lean_ctor_set(x_512, 0, x_476); lean_ctor_set(x_512, 1, x_510); x_42 = x_512; goto block_53; } } else { lean_object* x_513; lean_object* x_514; lean_object* x_515; lean_object* x_516; lean_object* x_517; uint8_t 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; x_513 = lean_ctor_get(x_492, 0); x_514 = lean_ctor_get(x_492, 1); x_515 = lean_ctor_get(x_492, 2); x_516 = lean_ctor_get(x_492, 3); x_517 = lean_ctor_get(x_492, 4); lean_inc(x_517); lean_inc(x_516); lean_inc(x_515); lean_inc(x_514); lean_inc(x_513); lean_dec(x_492); x_518 = lean_ctor_get_uint8(x_493, sizeof(void*)*2); x_519 = lean_ctor_get(x_493, 0); lean_inc(x_519); if (lean_is_exclusive(x_493)) { lean_ctor_release(x_493, 0); lean_ctor_release(x_493, 1); x_520 = x_493; } else { lean_dec_ref(x_493); x_520 = lean_box(0); } x_521 = l_Std_PersistentArray_push___rarg(x_421, x_488); if (lean_is_scalar(x_520)) { x_522 = lean_alloc_ctor(0, 2, 1); } else { x_522 = x_520; } lean_ctor_set(x_522, 0, x_519); lean_ctor_set(x_522, 1, x_521); lean_ctor_set_uint8(x_522, sizeof(void*)*2, x_518); x_523 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_523, 0, x_513); lean_ctor_set(x_523, 1, x_514); lean_ctor_set(x_523, 2, x_515); lean_ctor_set(x_523, 3, x_516); lean_ctor_set(x_523, 4, x_517); lean_ctor_set(x_523, 5, x_522); x_524 = lean_st_ref_set(x_12, x_523, x_494); x_525 = lean_ctor_get(x_524, 1); lean_inc(x_525); if (lean_is_exclusive(x_524)) { lean_ctor_release(x_524, 0); lean_ctor_release(x_524, 1); x_526 = x_524; } else { lean_dec_ref(x_524); x_526 = lean_box(0); } if (lean_is_scalar(x_526)) { x_527 = lean_alloc_ctor(1, 2, 0); } else { x_527 = x_526; lean_ctor_set_tag(x_527, 1); } lean_ctor_set(x_527, 0, x_476); lean_ctor_set(x_527, 1, x_525); x_42 = x_527; goto block_53; } } } } } } else { lean_object* x_581; lean_dec(x_16); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); x_581 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_581, 0, x_8); lean_ctor_set(x_581, 1, x_17); return x_581; } } else { lean_object* x_582; lean_dec(x_16); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); x_582 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_582, 0, x_8); lean_ctor_set(x_582, 1, x_17); return x_582; } } } lean_object* l_Lean_Elab_Tactic_evalRewriteCore(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* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_39; lean_object* x_40; 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; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; uint8_t x_58; x_12 = lean_unsigned_to_nat(0u); x_13 = l_Lean_Syntax_getArg(x_2, x_12); x_14 = lean_unsigned_to_nat(1u); x_15 = l_Lean_Syntax_getArg(x_2, x_14); x_16 = l_Lean_Syntax_getArg(x_15, x_12); x_17 = l_Lean_Syntax_getArg(x_15, x_14); lean_dec(x_15); x_18 = l_Lean_Syntax_getArgs(x_17); lean_dec(x_17); x_19 = lean_unsigned_to_nat(2u); x_20 = l_Lean_Syntax_getArg(x_2, x_19); x_21 = l_Lean_Elab_Tactic_expandOptLocation(x_20); lean_dec(x_20); x_39 = l_Lean_Syntax_mkApp___closed__1; x_40 = lean_array_push(x_39, x_13); x_41 = lean_array_push(x_40, x_16); x_42 = l_Lean_nullKind; x_43 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_43, 0, x_42); lean_ctor_set(x_43, 1, x_41); x_44 = lean_st_ref_get(x_10, x_11); x_45 = lean_ctor_get(x_44, 1); lean_inc(x_45); lean_dec(x_44); x_46 = lean_st_ref_get(x_8, x_45); x_47 = lean_ctor_get(x_46, 0); lean_inc(x_47); x_48 = lean_ctor_get(x_46, 1); lean_inc(x_48); lean_dec(x_46); x_49 = lean_ctor_get(x_47, 0); lean_inc(x_49); lean_dec(x_47); x_50 = l_Lean_Elab_Tactic_getGoals___rarg(x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_48); x_51 = lean_ctor_get(x_50, 0); lean_inc(x_51); x_52 = lean_ctor_get(x_50, 1); lean_inc(x_52); lean_dec(x_50); x_53 = lean_st_ref_get(x_10, x_52); x_54 = lean_ctor_get(x_53, 1); lean_inc(x_54); lean_dec(x_53); x_55 = lean_st_ref_get(x_6, x_54); x_56 = lean_ctor_get(x_55, 0); lean_inc(x_56); x_57 = lean_ctor_get(x_56, 5); lean_inc(x_57); lean_dec(x_56); x_58 = lean_ctor_get_uint8(x_57, sizeof(void*)*2); lean_dec(x_57); if (x_58 == 0) { uint8_t x_59; lean_dec(x_51); lean_dec(x_49); lean_dec(x_43); x_59 = !lean_is_exclusive(x_55); if (x_59 == 0) { lean_object* x_60; lean_object* x_61; x_60 = lean_ctor_get(x_55, 0); lean_dec(x_60); x_61 = lean_box(0); lean_ctor_set(x_55, 0, x_61); x_22 = x_55; goto block_38; } else { lean_object* x_62; lean_object* x_63; lean_object* x_64; x_62 = lean_ctor_get(x_55, 1); lean_inc(x_62); lean_dec(x_55); x_63 = lean_box(0); x_64 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_64, 0, x_63); lean_ctor_set(x_64, 1, x_62); x_22 = x_64; goto block_38; } } else { lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; uint8_t x_86; x_65 = lean_ctor_get(x_55, 1); lean_inc(x_65); lean_dec(x_55); x_66 = l___private_Lean_Elab_InfoTree_0__Lean_Elab_getResetInfoTrees___at_Lean_Elab_Tactic_withTacticInfoContext___spec__1___rarg(x_6, x_7, x_8, x_9, x_10, x_65); x_67 = lean_ctor_get(x_66, 0); lean_inc(x_67); x_68 = lean_ctor_get(x_66, 1); lean_inc(x_68); lean_dec(x_66); x_69 = lean_st_ref_get(x_10, x_68); x_70 = lean_ctor_get(x_69, 1); lean_inc(x_70); lean_dec(x_69); x_71 = lean_st_ref_get(x_6, x_70); x_72 = lean_ctor_get(x_71, 0); lean_inc(x_72); x_73 = lean_ctor_get(x_71, 1); lean_inc(x_73); lean_dec(x_71); x_74 = lean_ctor_get(x_72, 5); lean_inc(x_74); lean_dec(x_72); x_75 = lean_ctor_get(x_74, 1); lean_inc(x_75); lean_dec(x_74); x_76 = l_Lean_Elab_Tactic_mkTacticInfo(x_49, x_51, x_43, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_73); 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 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_79, 0, x_77); lean_ctor_set(x_79, 1, x_75); x_80 = lean_st_ref_get(x_10, x_78); x_81 = lean_ctor_get(x_80, 1); lean_inc(x_81); lean_dec(x_80); x_82 = lean_st_ref_take(x_6, x_81); x_83 = lean_ctor_get(x_82, 0); lean_inc(x_83); x_84 = lean_ctor_get(x_83, 5); lean_inc(x_84); x_85 = lean_ctor_get(x_82, 1); lean_inc(x_85); lean_dec(x_82); x_86 = !lean_is_exclusive(x_83); if (x_86 == 0) { lean_object* x_87; uint8_t x_88; x_87 = lean_ctor_get(x_83, 5); lean_dec(x_87); x_88 = !lean_is_exclusive(x_84); if (x_88 == 0) { lean_object* x_89; lean_object* x_90; lean_object* x_91; uint8_t x_92; x_89 = lean_ctor_get(x_84, 1); lean_dec(x_89); x_90 = l_Std_PersistentArray_push___rarg(x_67, x_79); lean_ctor_set(x_84, 1, x_90); x_91 = lean_st_ref_set(x_6, x_83, x_85); x_92 = !lean_is_exclusive(x_91); if (x_92 == 0) { lean_object* x_93; lean_object* x_94; x_93 = lean_ctor_get(x_91, 0); lean_dec(x_93); x_94 = lean_box(0); lean_ctor_set(x_91, 0, x_94); x_22 = x_91; goto block_38; } else { lean_object* x_95; lean_object* x_96; lean_object* x_97; x_95 = lean_ctor_get(x_91, 1); lean_inc(x_95); lean_dec(x_91); x_96 = lean_box(0); x_97 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_97, 0, x_96); lean_ctor_set(x_97, 1, x_95); x_22 = x_97; goto block_38; } } else { uint8_t 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; x_98 = lean_ctor_get_uint8(x_84, sizeof(void*)*2); x_99 = lean_ctor_get(x_84, 0); lean_inc(x_99); lean_dec(x_84); x_100 = l_Std_PersistentArray_push___rarg(x_67, x_79); x_101 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_101, 0, x_99); lean_ctor_set(x_101, 1, x_100); lean_ctor_set_uint8(x_101, sizeof(void*)*2, x_98); lean_ctor_set(x_83, 5, x_101); x_102 = lean_st_ref_set(x_6, x_83, x_85); x_103 = lean_ctor_get(x_102, 1); lean_inc(x_103); if (lean_is_exclusive(x_102)) { lean_ctor_release(x_102, 0); lean_ctor_release(x_102, 1); x_104 = x_102; } else { lean_dec_ref(x_102); x_104 = lean_box(0); } x_105 = lean_box(0); if (lean_is_scalar(x_104)) { x_106 = lean_alloc_ctor(0, 2, 0); } else { x_106 = x_104; } lean_ctor_set(x_106, 0, x_105); lean_ctor_set(x_106, 1, x_103); x_22 = x_106; goto block_38; } } else { lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; uint8_t x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; x_107 = lean_ctor_get(x_83, 0); x_108 = lean_ctor_get(x_83, 1); x_109 = lean_ctor_get(x_83, 2); x_110 = lean_ctor_get(x_83, 3); x_111 = lean_ctor_get(x_83, 4); lean_inc(x_111); lean_inc(x_110); lean_inc(x_109); lean_inc(x_108); lean_inc(x_107); lean_dec(x_83); x_112 = lean_ctor_get_uint8(x_84, sizeof(void*)*2); x_113 = lean_ctor_get(x_84, 0); lean_inc(x_113); if (lean_is_exclusive(x_84)) { lean_ctor_release(x_84, 0); lean_ctor_release(x_84, 1); x_114 = x_84; } else { lean_dec_ref(x_84); x_114 = lean_box(0); } x_115 = l_Std_PersistentArray_push___rarg(x_67, x_79); if (lean_is_scalar(x_114)) { x_116 = lean_alloc_ctor(0, 2, 1); } else { x_116 = x_114; } lean_ctor_set(x_116, 0, x_113); lean_ctor_set(x_116, 1, x_115); lean_ctor_set_uint8(x_116, sizeof(void*)*2, x_112); x_117 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_117, 0, x_107); lean_ctor_set(x_117, 1, x_108); lean_ctor_set(x_117, 2, x_109); lean_ctor_set(x_117, 3, x_110); lean_ctor_set(x_117, 4, x_111); lean_ctor_set(x_117, 5, x_116); x_118 = lean_st_ref_set(x_6, x_117, x_85); x_119 = lean_ctor_get(x_118, 1); lean_inc(x_119); if (lean_is_exclusive(x_118)) { lean_ctor_release(x_118, 0); lean_ctor_release(x_118, 1); x_120 = x_118; } else { lean_dec_ref(x_118); x_120 = lean_box(0); } x_121 = lean_box(0); if (lean_is_scalar(x_120)) { x_122 = lean_alloc_ctor(0, 2, 0); } else { x_122 = x_120; } lean_ctor_set(x_122, 0, x_121); lean_ctor_set(x_122, 1, x_119); x_22 = x_122; goto block_38; } } block_38: { lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; x_23 = lean_ctor_get(x_22, 1); lean_inc(x_23); lean_dec(x_22); x_24 = lean_array_get_size(x_18); x_25 = lean_nat_add(x_24, x_14); x_26 = lean_nat_div(x_25, x_19); lean_dec(x_25); lean_inc(x_26); x_27 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_27, 0, x_12); lean_ctor_set(x_27, 1, x_26); lean_ctor_set(x_27, 2, x_14); x_28 = lean_box(0); x_29 = l_Std_Range_forIn_loop___at_Lean_Elab_Tactic_evalRewriteCore___spec__3(x_1, x_18, x_21, x_24, x_27, x_26, x_12, x_28, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_23); lean_dec(x_27); lean_dec(x_24); lean_dec(x_21); lean_dec(x_18); if (lean_obj_tag(x_29) == 0) { uint8_t x_30; x_30 = !lean_is_exclusive(x_29); if (x_30 == 0) { lean_object* x_31; x_31 = lean_ctor_get(x_29, 0); lean_dec(x_31); lean_ctor_set(x_29, 0, x_28); return x_29; } else { lean_object* x_32; lean_object* x_33; x_32 = lean_ctor_get(x_29, 1); lean_inc(x_32); lean_dec(x_29); x_33 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_33, 0, x_28); lean_ctor_set(x_33, 1, x_32); return x_33; } } else { uint8_t x_34; x_34 = !lean_is_exclusive(x_29); if (x_34 == 0) { return x_29; } else { lean_object* x_35; lean_object* x_36; lean_object* x_37; x_35 = lean_ctor_get(x_29, 0); x_36 = lean_ctor_get(x_29, 1); lean_inc(x_36); lean_inc(x_35); lean_dec(x_29); x_37 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_37, 0, x_35); lean_ctor_set(x_37, 1, x_36); return x_37; } } } } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Tactic_evalRewriteCore___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { _start: { uint8_t x_17; uint8_t x_18; size_t x_19; size_t x_20; lean_object* x_21; x_17 = lean_unbox(x_1); lean_dec(x_1); x_18 = lean_unbox(x_3); lean_dec(x_3); x_19 = lean_unbox_usize(x_5); lean_dec(x_5); x_20 = lean_unbox_usize(x_6); lean_dec(x_6); x_21 = l_Array_foldlMUnsafe_fold___at_Lean_Elab_Tactic_evalRewriteCore___spec__1(x_17, x_2, x_18, x_4, x_19, x_20, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16); lean_dec(x_4); return x_21; } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Tactic_evalRewriteCore___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { _start: { uint8_t x_17; uint8_t x_18; size_t x_19; size_t x_20; lean_object* x_21; x_17 = lean_unbox(x_1); lean_dec(x_1); x_18 = lean_unbox(x_3); lean_dec(x_3); x_19 = lean_unbox_usize(x_5); lean_dec(x_5); x_20 = lean_unbox_usize(x_6); lean_dec(x_6); x_21 = l_Array_foldlMUnsafe_fold___at_Lean_Elab_Tactic_evalRewriteCore___spec__2(x_17, x_2, x_18, x_4, x_19, x_20, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16); lean_dec(x_4); return x_21; } } lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Tactic_evalRewriteCore___spec__3___boxed(lean_object** _args) { lean_object* x_1 = _args[0]; lean_object* x_2 = _args[1]; lean_object* x_3 = _args[2]; lean_object* x_4 = _args[3]; lean_object* x_5 = _args[4]; lean_object* x_6 = _args[5]; lean_object* x_7 = _args[6]; lean_object* x_8 = _args[7]; lean_object* x_9 = _args[8]; lean_object* x_10 = _args[9]; lean_object* x_11 = _args[10]; lean_object* x_12 = _args[11]; lean_object* x_13 = _args[12]; lean_object* x_14 = _args[13]; lean_object* x_15 = _args[14]; lean_object* x_16 = _args[15]; lean_object* x_17 = _args[16]; _start: { uint8_t x_18; lean_object* x_19; x_18 = lean_unbox(x_1); lean_dec(x_1); x_19 = l_Std_Range_forIn_loop___at_Lean_Elab_Tactic_evalRewriteCore___spec__3(x_18, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_17); lean_dec(x_15); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); return x_19; } } lean_object* l_Lean_Elab_Tactic_evalRewriteCore___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) { _start: { uint8_t x_12; lean_object* x_13; x_12 = lean_unbox(x_1); lean_dec(x_1); x_13 = l_Lean_Elab_Tactic_evalRewriteCore(x_12, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); lean_dec(x_9); lean_dec(x_2); return x_13; } } lean_object* l_Lean_Elab_Tactic_evalRewriteSeq(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: { uint8_t x_11; lean_object* x_12; x_11 = 3; x_12 = l_Lean_Elab_Tactic_evalRewriteCore(x_11, x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); return x_12; } } lean_object* l_Lean_Elab_Tactic_evalRewriteSeq___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_11; x_11 = l_Lean_Elab_Tactic_evalRewriteSeq(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); lean_dec(x_8); lean_dec(x_1); return x_11; } } static lean_object* _init_l___regBuiltin_Lean_Elab_Tactic_evalRewriteSeq___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_evalRewriteSeq___boxed), 10, 0); return x_1; } } lean_object* l___regBuiltin_Lean_Elab_Tactic_evalRewriteSeq(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_2 = l_Lean_Elab_Tactic_tacticElabAttribute; x_3 = l_Lean_Parser_Tactic_rewriteSeq___closed__2; x_4 = l___regBuiltin_Lean_Elab_Tactic_evalRewriteSeq___closed__1; x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1); return x_5; } } lean_object* l_Lean_Elab_Tactic_evalERewriteSeq(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: { uint8_t x_11; lean_object* x_12; x_11 = 1; x_12 = l_Lean_Elab_Tactic_evalRewriteCore(x_11, x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); return x_12; } } lean_object* l_Lean_Elab_Tactic_evalERewriteSeq___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_11; x_11 = l_Lean_Elab_Tactic_evalERewriteSeq(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); lean_dec(x_8); lean_dec(x_1); return x_11; } } static lean_object* _init_l___regBuiltin_Lean_Elab_Tactic_evalERewriteSeq___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_evalERewriteSeq___boxed), 10, 0); return x_1; } } lean_object* l___regBuiltin_Lean_Elab_Tactic_evalERewriteSeq(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_2 = l_Lean_Elab_Tactic_tacticElabAttribute; x_3 = l_Lean_Parser_Tactic_erewriteSeq___closed__2; x_4 = l___regBuiltin_Lean_Elab_Tactic_evalERewriteSeq___closed__1; x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1); return x_5; } } lean_object* initialize_Init(lean_object*); lean_object* initialize_Lean_Meta_Tactic_Rewrite(lean_object*); lean_object* initialize_Lean_Meta_Tactic_Replace(lean_object*); lean_object* initialize_Lean_Elab_Tactic_Basic(lean_object*); lean_object* initialize_Lean_Elab_Tactic_ElabTerm(lean_object*); lean_object* initialize_Lean_Elab_Tactic_Location(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Elab_Tactic_Rewrite(lean_object* w) { lean_object * res; if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); _G_initialized = true; res = initialize_Init(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Meta_Tactic_Rewrite(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Meta_Tactic_Replace(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Elab_Tactic_Basic(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Elab_Tactic_ElabTerm(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Elab_Tactic_Location(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_Elab_Tactic_rewriteAll___lambda__1___closed__1 = _init_l_Lean_Elab_Tactic_rewriteAll___lambda__1___closed__1(); lean_mark_persistent(l_Lean_Elab_Tactic_rewriteAll___lambda__1___closed__1); l_Lean_Elab_Tactic_rewriteAll___lambda__1___closed__2 = _init_l_Lean_Elab_Tactic_rewriteAll___lambda__1___closed__2(); lean_mark_persistent(l_Lean_Elab_Tactic_rewriteAll___lambda__1___closed__2); l_Lean_Elab_Tactic_rewriteAll___lambda__1___closed__3 = _init_l_Lean_Elab_Tactic_rewriteAll___lambda__1___closed__3(); lean_mark_persistent(l_Lean_Elab_Tactic_rewriteAll___lambda__1___closed__3); l___regBuiltin_Lean_Elab_Tactic_evalRewriteSeq___closed__1 = _init_l___regBuiltin_Lean_Elab_Tactic_evalRewriteSeq___closed__1(); lean_mark_persistent(l___regBuiltin_Lean_Elab_Tactic_evalRewriteSeq___closed__1); res = l___regBuiltin_Lean_Elab_Tactic_evalRewriteSeq(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l___regBuiltin_Lean_Elab_Tactic_evalERewriteSeq___closed__1 = _init_l___regBuiltin_Lean_Elab_Tactic_evalERewriteSeq___closed__1(); lean_mark_persistent(l___regBuiltin_Lean_Elab_Tactic_evalERewriteSeq___closed__1); res = l___regBuiltin_Lean_Elab_Tactic_evalERewriteSeq(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus } #endif
ChrisHughes24/lean4
stage0/stdlib/Lean/Server/FileWorker.c
<reponame>ChrisHughes24/lean4<gh_stars>0 // Lean compiler output // Module: Lean.Server.FileWorker // Imports: Init Init.System.IO Std.Data.RBMap Lean.Environment Lean.PrettyPrinter Lean.DeclarationRange Lean.Data.Lsp Lean.Data.Json.FromToJson Lean.Server.Snapshots Lean.Server.Utils Lean.Server.AsyncList Lean.Server.InfoUtils Lean.Server.Completion #include <lean/lean.h> #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wunused-label" #elif defined(__GNUC__) && !defined(__CLANG__) #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif #ifdef __cplusplus extern "C" { #endif lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___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* l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__3; lean_object* l_ReaderT_pure___at_Lean_Server_FileWorker_handleCompletion___spec__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MapDeclarationExtension_find_x3f___at_Lean_findDeclarationRangesCore_x3f___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3(lean_object*, lean_object*); lean_object* lean_string_push(lean_object*, uint32_t); extern lean_object* l_Lean_Name_toString___closed__1; lean_object* l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__1___boxed(lean_object*); size_t l_USize_add(size_t, size_t); extern lean_object* l_Lean_Name_getString_x21___closed__3; lean_object* l_Lean_Server_FileWorker_handleSemanticTokensRange(lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleDefinition___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* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleNotification___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleCompletion___spec__6___boxed(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_FileWorker_leanpkgSetupSearchPath___closed__5; uint8_t l_Lean_Server_FileWorker_hasRange(lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_handleRequest___spec__10(size_t, size_t, lean_object*); lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDefinition_match__5(lean_object*); lean_object* l_Lean_Server_FileWorker_handleDidChange_match__1(lean_object*); lean_object* lean_get_stdin(lean_object*); lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_match__1___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* lean_mk_empty_array_with_capacity(lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols_match__2(lean_object*); lean_object* l_IO_FS_Stream_readLspRequestAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokens___lambda__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__4___closed__2; lean_object* l_Lean_Server_FileWorker_handleRequest_match__2(lean_object*); lean_object* lean_io_prim_handle_get_line(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_100_(lean_object*); extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_5711____closed__24; lean_object* l_Lean_Server_FileWorker_handleHover___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Syntax_mkAntiquotNode___closed__12; lean_object* l_Lean_Server_FileWorker_RequestError_fileChanged___closed__2; lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_logSnapContent___closed__1; lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1533_(lean_object*); lean_object* l_Lean_Server_FileWorker_handleDidChange_match__1___rarg(lean_object*, lean_object*); extern lean_object* l_Lean_nullKind; lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__2; lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__8(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Char_quote___closed__1; lean_object* l_Std_RBNode_erase___at_Lean_Server_FileWorker_handleCancelRequest___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__5___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l_Lean_Syntax_getOptional_x3f(lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__3; uint8_t l_USize_decEq(size_t, size_t); lean_object* l_Lean_Parser_parseHeader(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentHighlight___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_uget(lean_object*, size_t); lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__3(lean_object*, lean_object*, lean_object*); lean_object* lean_io_error_to_string(lean_object*); lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__4; lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonHoverParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_559_(lean_object*); lean_object* l_Lean_Server_FileWorker_workerMain_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoalParams____x40_Lean_Data_Lsp_Extra___hyg_133_(lean_object*); lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__7(lean_object*, lean_object*, lean_object*); lean_object* l_List_map___at_Lean_Server_FileWorker_handleDocumentSymbol___spec__1(lean_object*); lean_object* l_Array_append___rarg(lean_object*, lean_object*); lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleDefinition___spec__5(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonRange____x40_Lean_Data_Lsp_Basic___hyg_409____closed__1; lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__6; lean_object* l_String_split___at_Lean_stringToMessageData___spec__1(lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokensRange___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_noConfusionExt; extern lean_object* l_Std_Format_defWidth; lean_object* l_Lean_Server_FileWorker_initAndRunWorker_match__2___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleHover___closed__1; lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__3(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_FileWorker_RequestError_fileChanged___closed__1; extern lean_object* l_Lean_Parser_Command_namedPrio___elambda__1___closed__2; lean_object* l_Lean_Server_FileWorker_handleDocumentHighlight___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__4; lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleDefinition___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* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleNotification___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Option_get___at_Lean_initFn____x40_Lean_Util_PPExt___hyg_251____spec__1(lean_object*, lean_object*); lean_object* l_Lean_findDeclarationRangesCore_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightId_match__2(lean_object*); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); extern lean_object* l_Lean_Lsp_Ipc_collectDiagnostics___closed__1; extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__28; extern lean_object* l_Lean_identKind___closed__2; extern lean_object* l_Lean_Parser_Term_type___elambda__1___closed__2; extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__6; lean_object* l_Lean_Server_FileWorker_handleDocumentHighlight_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___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* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__15(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDefinition_match__1(lean_object*); extern lean_object* l_Lean_searchPathRef; uint8_t l_Lean_Syntax_structEq(lean_object*, lean_object*); lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handlePlainGoal___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_JsonNumber_toString(lean_object*); lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_compileHeader_match__2___rarg(lean_object*, lean_object*); lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__3; lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__4(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_noHighlightKinds___closed__2; extern lean_object* l_Lean_Lsp_instInhabitedRange___closed__1; extern lean_object* l_Array_empty___closed__1; extern lean_object* l_Lean_Elab_Info_fmtHover_x3f___lambda__2___closed__3; extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__16; lean_object* l_Lean_getConstInfo___at_Lean_Meta_mkConstWithFreshMVarLevels___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleNotification___closed__1; lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Completion_find_x3f(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__5; lean_object* l_Lean_Server_FileWorker_handleCompletion___closed__3; extern lean_object* l_Lean_Parser_Command_section___elambda__1___closed__2; lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedEnvironment___closed__4; lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap_match__1(lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedParserDescr___closed__1; lean_object* l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDidChange_match__2(lean_object*); lean_object* l_List_append___rarg(lean_object*, lean_object*); lean_object* lean_get_stderr(lean_object*); lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handlePlainGoal_match__3___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_getBuiltinSearchPath(lean_object*); lean_object* l_Lean_Server_FileWorker_handleRequest_match__1(lean_object*, lean_object*); extern lean_object* l_Lean_declRangeExt; lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_readLspMessage(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1___closed__1; lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics_match__1(lean_object*); lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1(lean_object*, lean_object*, lean_object*); extern lean_object* l_instInhabitedNat; lean_object* l_Lean_Server_FileWorker_noHighlightKinds___closed__1; extern lean_object* l_IO_AsyncList_waitFind_x3f___rarg___closed__2; lean_object* l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__10; lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightId_match__4___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_headerToImports(lean_object*); lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_mkInputContext(lean_object*, lean_object*); lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); extern lean_object* l_Lean_Compiler_checkIsDefinition___closed__3; lean_object* l_IO_mkRef___at_Lean_Server_FileWorker_initializeWorker___spec__2(lean_object*, lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); extern lean_object* l_List_getLast_x21___rarg___closed__2; lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_addToken___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_string_utf8_extract(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_FileMap_lspPosToUtf8Pos(lean_object*, lean_object*); lean_object* l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1___lambda__2___boxed(lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightId_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_noHighlightKinds___closed__4; lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_sleep(uint32_t, lean_object*); extern lean_object* l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__2; lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleCompletion___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*); extern lean_object* l_ExceptT_lift___rarg___closed__1; lean_object* l_Lean_Server_FileWorker_handleHover_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_IO_throwServerError___rarg(lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__2; lean_object* l_List_map___at_Lean_Server_FileWorker_handlePlainGoal___spec__2(lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__2___closed__1; extern lean_object* l_Lean_Parser_Term_proj___elambda__1___closed__1; lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__6___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_term___u2264_____closed__3; lean_object* l_Lean_Server_FileWorker_handleCompletion___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_string_utf8_byte_size(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_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__16___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols_match__1___rarg(lean_object*, lean_object*); extern lean_object* l_Std_instInhabitedPersistentArray___closed__1; lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__24; lean_object* l_Lean_Server_FileWorker_handleHover_match__3___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_List_join___rarg(lean_object*); uint8_t l_USize_decLt(size_t, size_t); lean_object* l_IO_FS_Stream_readRequestAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___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*); lean_object* l_Lean_Server_FileWorker_instInhabitedCancelToken; lean_object* l_Lean_Server_FileWorker_handleDefinition_match__2(lean_object*); lean_object* l_Lean_Server_FileWorker_rangeOfSyntax_x21___boxed(lean_object*, lean_object*); extern lean_object* l_Lean_auxRecExt; lean_object* l_Lean_Server_FileWorker_unfoldCmdSnaps___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_CancelToken_new(lean_object*); lean_object* lean_io_map_task(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_initAndRunWorker_match__1(lean_object*); lean_object* l_IO_FS_Stream_readMessage(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_logSnapContent___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*); extern uint8_t l_Lean_expandExternPatternAux___closed__1; lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol___boxed(lean_object*); lean_object* l_Lean_Elab_processHeader(lean_object*, lean_object*, lean_object*, lean_object*, uint32_t, lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams___rarg___closed__1; extern lean_object* l_Lean_Elab_parseImports___closed__1; extern lean_object* l_Lean_LocalContext_mkEmpty___closed__1; lean_object* l_IO_AsyncList_waitAll___rarg___lambda__1(lean_object*, lean_object*); lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___closed__1; lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___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_FileWorker_initAndRunWorker___closed__2; lean_object* l_Lean_Server_FileWorker_withWaitFindSnap(lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleCompletion___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__11___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_findModuleOf_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_CancelToken_check___rarg(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_298____closed__1; lean_object* l_Lean_Name_toStringWithSep(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__1; lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleNotification___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___closed__2; lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_handleSemanticTokens_go___spec__1(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_FileMap_utf8PosToLspPos(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleHover_match__2(lean_object*); lean_object* l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__5___closed__1; lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializeParams___spec__6(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_compileHeader___closed__1; lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_handleSemanticTokens_go___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Info_fmtHover_x3f___lambda__2___closed__1; extern lean_object* l_Lean_maxRecDepth; lean_object* l_Lean_Server_FileWorker_compileHeader(lean_object*, lean_object*, lean_object*); lean_object* lean_io_bind_task(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__1(lean_object*); lean_object* l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__5___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__9; extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__10; lean_object* l_Lean_Server_FileWorker_queueRequest___lambda__1(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__5; lean_object* l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__8; lean_object* l_Lean_Elab_InfoTree_deepestNodes___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_updateDocument_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_initAndRunWorker_match__3___rarg(lean_object*, lean_object*); extern lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_298____closed__2; lean_object* l_Lean_Server_FileWorker_handleNotification___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__4; lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__4; extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__7; lean_object* l_IO_getStdin___at_Lean_Server_FileWorker_workerMain___spec__1(lean_object*); lean_object* lean_io_as_task(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics_waitLoop(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_withPPInaccessibleNames___at_Lean_Server_FileWorker_handlePlainGoal___spec__3(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_rangeOfSyntax_x21(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_compileHeader___closed__2; lean_object* l_Lean_Server_FileWorker_handleDocumentHighlight(lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_setBlack___rarg(lean_object*); lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__4; lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___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_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__2(lean_object*, lean_object*, lean_object*); extern lean_object* l_List_get_x21___rarg___closed__4; lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_handleRequest___spec__13(size_t, size_t, lean_object*); extern lean_object* l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1; lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonHover____x40_Lean_Data_Lsp_LanguageFeatures___hyg_474_(lean_object*); lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonWaitForDiagnosticsParams____x40_Lean_Data_Lsp_Extra___hyg_57_(lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__14(lean_object*, lean_object*, lean_object*); lean_object* l_List_forIn_loop___at_Lean_Server_FileWorker_handleSemanticTokens___spec__2___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDefinition___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__7(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_mainLoop___closed__1; lean_object* l_Lean_Server_FileWorker_initAndRunWorker_match__1___rarg(lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleCompletion___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_InfoTree_goalsAt_x3f(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleCancelRequest___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_initialize___elambda__1___closed__1; lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__4___boxed(lean_object*); lean_object* l_Lean_Server_Snapshots_parseAhead(lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_298____closed__4; lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__4___closed__1; extern lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_298____closed__8; 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_Lean_Server_FileWorker_handleWaitForDiagnostics___closed__1; lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_handleRequest___spec__13___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_updateDocument_match__2(lean_object*); lean_object* l_EStateM_bind___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_CancelToken_check(lean_object*); lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocationLink____x40_Lean_Data_Lsp_Basic___hyg_692_(lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializeParams___spec__1(lean_object*, lean_object*); extern lean_object* l_Task_Priority_dedicated; lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleNotification_match__1___rarg___closed__2; lean_object* l_Array_mapMUnsafe_map___at_Lean_Lsp_instToJsonDocumentSymbol_go___spec__3(size_t, size_t, lean_object*); lean_object* l_IO_eprintln___at___private_Init_System_IO_0__IO_eprintlnAux___spec__1(lean_object*, lean_object*); lean_object* l_IO_FS_Stream_ofBuffer___lambda__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleNotification(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__11(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleNotification___spec__2(lean_object*, lean_object*, lean_object*); lean_object* lean_get_set_stderr(lean_object*, lean_object*); lean_object* l_Lean_Lsp_SemanticTokenType_toNat(uint8_t); lean_object* l_Lean_Server_FileWorker_RequestError_fileChanged; lean_object* l_IO_FS_Stream_putStrLn___at_Lean_Server_FileWorker_workerMain___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_match__1(lean_object*); lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__2; lean_object* l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__5(lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__6___boxed(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_Snapshots_reparseHeader(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__7; lean_object* l_List_mapM___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2(lean_object*, lean_object*); lean_object* l_Lean_findDeclarationRangesCore_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_AsyncList_append___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handlePlainGoal_match__2___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_IO_FS_Stream_readLspNotificationAs___closed__1; lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonSemanticTokens____x40_Lean_Data_Lsp_LanguageFeatures___hyg_1903_(lean_object*); lean_object* l_Std_RBNode_insert___at_Lean_Server_FileWorker_queueRequest___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__5(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_withWaitFindSnap___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_logSnapContent(lean_object*, lean_object*, lean_object*); extern lean_object* l_IO_FS_Stream_readRequestAs___closed__3; lean_object* l_IO_FS_Handle_readToEnd_read___at_IO_Process_output___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__3; lean_object* l_Lean_Server_FileWorker_handleSemanticTokensFull___rarg___boxed(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__3; lean_object* l_ST_Prim_Ref_get___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern uint8_t l_Lean_expandExternPatternAux___closed__2; lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__2(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_FileWorker_handleNotification_match__1___rarg___closed__1; lean_object* l_Lean_Server_FileWorker_handleDefinition___closed__2; lean_object* l_Lean_Server_FileWorker_unfoldCmdSnaps___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__18___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_appendTrees___rarg(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_18784____closed__2; lean_object* l_Lean_Server_FileWorker_handleCompletion_match__2(lean_object*); lean_object* l_Lean_Elab_Command_mkState(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath_processStderr___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_namespace___elambda__1___closed__2; lean_object* l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_withWaitFindSnap___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_initAndRunWorker___closed__1; lean_object* l_Std_RBNode_balRight___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_unfoldCmdSnaps___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Std_RBNode_isBlack___rarg(lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightKeyword(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDefinition___closed__1; lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightId___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_AsyncList_unfoldAsync___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokensFull___rarg___closed__1; lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonSemanticTokensRangeParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_1781_(lean_object*); lean_object* l_Lean_Meta_withPPInaccessibleNames___at_Lean_Server_FileWorker_handlePlainGoal___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Init_Util_0__mkPanicMessage___closed__2; lean_object* l_Lean_Server_FileWorker_handleSemanticTokensFull(lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__5; lean_object* l_Lean_Server_FileWorker_initAndRunWorker___boxed__const__1; lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightId_match__3___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* lean_task_map(lean_object*, lean_object*, lean_object*); lean_object* l_Nat_repr(lean_object*); lean_object* l_List_getLast_x21___at_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols___spec__1(lean_object*); lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_mapTask(lean_object*, lean_object*); 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_IO_FS_Stream_writeLspMessage(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_initAndRunWorker_match__3(lean_object*); lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__2___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_addToken_match__1(lean_object*); lean_object* lean_st_mk_ref(lean_object*, lean_object*); lean_object* l_IO_FS_Stream_readNotificationAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__4(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__19___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__4___closed__1; lean_object* l_Lean_Syntax_getId(lean_object*); lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_format_pretty(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__3___closed__1; extern lean_object* l_Lean_choiceKind; lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_queueRequest___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__2; lean_object* l_List_get_x21___at_Lean_Server_FileWorker_updateDocument___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightId(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_mainLoop_match__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__1; lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1___closed__1; lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializeParams___spec__2(lean_object*, lean_object*); lean_object* l_Lean_SearchPath_findWithExt(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams(lean_object*); lean_object* l_Lean_Server_FileWorker_handleRequest(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_IO_AsyncList_waitAll___rarg___closed__1; lean_object* l_IO_FS_Stream_readLspNotificationAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__8(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDidChange_match__2___rarg(lean_object*, lean_object*, lean_object*); lean_object* lean_array_to_list(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDidChange___closed__1; lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonSemanticTokensParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_1706_(lean_object*); extern lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_298____closed__3; lean_object* l_Lean_Server_FileWorker_handlePlainGoal(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDidChange___closed__2; lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__9(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handlePlainGoal_match__1(lean_object*); lean_object* l_Lean_Server_FileWorker_mapTask___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDefinition___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__6(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_mapTask___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__5___boxed(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_Command_docComment___elambda__1___closed__2; uint32_t lean_string_utf8_get(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_ordRequestID____x40_Lean_Data_JsonRpc___hyg_107_(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__16(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_opt___at_Lean_JsonRpc_instToJsonMessage___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_compileHeader_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_IO_appDir___at_Lean_getBuiltinSearchPath___spec__1(lean_object*); lean_object* l_Lean_Server_FileWorker_handleDefinition_match__2___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__8___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleCompletion(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_toJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_277_(lean_object*); lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_1084_(lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams_match__1(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentHighlight____x40_Lean_Data_Lsp_LanguageFeatures___hyg_1040_(lean_object*); extern lean_object* l_Lean_Parser_instInhabitedModuleParserState___closed__1; lean_object* l_Lean_Server_FileWorker_handleCompletion___closed__1; extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__22; lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonCancelParams____x40_Lean_Data_Lsp_Basic___hyg_96_(lean_object*); lean_object* l_Lean_FileMap_toPosition(lean_object*, lean_object*); lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleCompletion___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_takeWhile___rarg(lean_object*, lean_object*); lean_object* l_Lean_realPathNormalized(lean_object*, lean_object*); uint8_t l_Array_isEmpty___rarg(lean_object*); lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokensFull___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_updatePendingRequests___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedSyntax; extern lean_object* l_Lean_mkEmptyEnvironment___lambda__1___closed__1; lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleCompletion___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Unhygienic_run___rarg___closed__2; lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__2___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___lambda__2(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__6; extern lean_object* l_IO_AsyncList_waitFind_x3f___rarg___closed__1; extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__44; lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__5; lean_object* l_Lean_FileMap_ofString(lean_object*); extern lean_object* l_Lean_Server_Snapshots_instInhabitedSnapshot; lean_object* l_Std_RBNode_balLeft___rarg(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_ContextInfo_ppGoals___closed__2; lean_object* l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3___closed__1; lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols_match__2(lean_object*); extern lean_object* l_Lean_Lsp_instToJsonWaitForDiagnostics___closed__1; lean_object* l_Lean_Server_FileWorker_mainLoop(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonCompletionParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_374_(lean_object*); lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleDefinition___spec__4(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Task_Priority_default; lean_object* lean_io_has_finished(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols_match__2___rarg(lean_object*, lean_object*); lean_object* l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_isRec___at___private_Lean_Server_Completion_0__Lean_Server_Completion_isBlackListed___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_usize_of_nat(lean_object*); extern lean_object* l_Lean_nullKind___closed__1; lean_object* l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_withWaitFindSnap___spec__1___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightKeyword_match__1(lean_object*); lean_object* l_Lean_Server_FileWorker_handleCompletion___closed__2; lean_object* l_Lean_Server_publishDiagnostics(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath_match__1(lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializeParams___spec__5(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_match__1(lean_object*); extern lean_object* l_Lean_Parser_Term_doReturn___elambda__1___closed__2; lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleCompletion___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* l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3___lambda__1(lean_object*); lean_object* l_Lean_Server_FileWorker_handleNotification_match__1(lean_object*); lean_object* l_IO_mkRef___at_Lean_Server_FileWorker_CancelToken_new___spec__1(uint8_t, lean_object*); lean_object* l_Lean_Server_FileWorker_noHighlightKinds___closed__3; lean_object* l_IO_AsyncList_ofList___rarg(lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__36; lean_object* l_Lean_Server_FileWorker_withWaitFindSnap_match__1(lean_object*); lean_object* l_Lean_Server_FileWorker_handleCompletion___lambda__1___boxed(lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__1(size_t, size_t, lean_object*); uint8_t l_Lean_Server_FileWorker_handleCompletion___lambda__1(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_initializeWorker_match__1(lean_object*); uint8_t l_Char_isAlpha(uint32_t); lean_object* l_Lean_Server_FileWorker_CancelToken_check___rarg___lambda__1(lean_object*, lean_object*, uint8_t); lean_object* l_Lean_Server_FileWorker_noHighlightKinds___closed__5; lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonCompletionList____x40_Lean_Data_Lsp_LanguageFeatures___hyg_329_(lean_object*); extern lean_object* l_IO_FS_Stream_readNotificationAs___closed__1; lean_object* l_Lean_Server_FileWorker_handleCompletion_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleRequest___closed__1; lean_object* l_Lean_Server_Snapshots_parseNextCmd(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_initAndRunWorker_match__2(lean_object*); extern lean_object* l_Lean_Server_instInhabitedDocumentMeta___closed__1; lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__2; lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_initializeWorker(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__3___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Syntax_isNodeOf(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedNameGenerator___closed__1; extern lean_object* l_Lean_instInhabitedTraceState___closed__1; lean_object* l_Lean_Server_FileWorker_handleRequest___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_drop___rarg(lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_isIdOrAtom_x3f(lean_object*); lean_object* l_Lean_Server_FileWorker_handlePlainGoal_match__2(lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightId_match__3(lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightKeyword_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__3___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_prop___elambda__1___closed__2; lean_object* l_Lean_Syntax_getPos_x3f(lean_object*, uint8_t); lean_object* lean_io_file_exists(lean_object*, lean_object*); lean_object* lean_mk_empty_environment(uint32_t, lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__14___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_instCoeErrorElabTaskError(lean_object*); lean_object* l_IO_AsyncList_updateFinishedPrefix___rarg(lean_object*, lean_object*); extern lean_object* l_Option_get_x21___rarg___closed__4; lean_object* l_Lean_Server_FileWorker_handleHover(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Syntax_mkApp___closed__1; uint8_t l_UInt32_decEq(uint32_t, uint32_t); extern lean_object* l_Lean_Name_instReprName___closed__1; extern lean_object* l_term_x5b___x5d___closed__5; lean_object* l_String_intercalate(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols_match__1(lean_object*); lean_object* l_List_redLength___rarg(lean_object*); lean_object* l_Std_PersistentArray_push___rarg(lean_object*, lean_object*); extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__5; extern lean_object* l_List_partition___rarg___closed__1; lean_object* l_Lean_Server_FileWorker_handleDefinition___lambda__1(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_opt___at_Lean_JsonRpc_instToJsonMessage___spec__2(lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__9___closed__1; lean_object* l_Lean_Server_FileWorker_handleDefinition_match__3(lean_object*); lean_object* l_Lean_Server_FileWorker_CancelToken_check___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_MessageLog_empty; lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_server_worker_main(lean_object*); lean_object* l_List_forIn_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleHover_match__1(lean_object*); lean_object* l_Lean_Server_FileWorker_queueRequest(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_compileHeader_match__2(lean_object*); lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__12(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__6(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokensFull___boxed(lean_object*); lean_object* l_IO_AsyncList_finishedPrefix___rarg(lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__12; lean_object* l_List_forIn_loop___at_Lean_Server_FileWorker_handleSemanticTokens___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__1; extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__8; lean_object* l_Lean_Server_FileWorker_handleDefinition(uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleHover___lambda__1___boxed(lean_object*, lean_object*); lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument; 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_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__18(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__1; lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__2; lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleCompletion_match__2___rarg(lean_object*, lean_object*, lean_object*); uint8_t l_Std_RBNode_isRed___rarg(lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokens___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8___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*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__32; lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1___lambda__2(lean_object*); lean_object* l_Lean_Elab_Info_tailPos_x3f(lean_object*); lean_object* l_Lean_Syntax_getArgs(lean_object*); lean_object* l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__1; lean_object* l_Lean_Server_FileWorker_handleHover_match__2___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getKind(lean_object*); lean_object* l_List_get_x21___at_Lean_Server_FileWorker_updateDocument___spec__2(lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__20; lean_object* l_IO_AsyncList_unfoldAsync_step___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_initAndRunWorker___closed__3; extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_5711____closed__21; lean_object* l_Lean_Server_FileWorker_workerMain_match__1(lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1___closed__1; lean_object* l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__4; lean_object* lean_panic_fn(lean_object*, lean_object*); lean_object* l_Lean_addSearchPathFromEnv(lean_object*, lean_object*); extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__3; lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__9(lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__5___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_get_stdout(lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l_Lean_Server_FileWorker_updateDocument(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__3; lean_object* l_IO_ofExcept___at_IO_Process_output___spec__3(lean_object*, lean_object*); lean_object* l_Lean_findDeclarationRanges_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__3___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_withPPInaccessibleNamesImp___rarg(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Communication_0__IO_FS_Stream_readLspHeader(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_updateDocument_match__2___rarg(lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__4; lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightId_match__1(lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__40; lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6; lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_findDeclarationRanges_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols_match__2___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_parseParams___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Info_fmtHover_x3f(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_mkObj(lean_object*); lean_object* l_Lean_Elab_InfoTree_hoverableInfoAt_x3f(lean_object*, lean_object*); lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handlePlainGoal___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__11; lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_addToken_match__1___rarg(lean_object*, lean_object*); lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__4; lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_shiftl(lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_IO_eprintln___at_Lean_Server_FileWorker_initAndRunWorker___spec__5(lean_object*, lean_object*); extern lean_object* l_IO_FS_Stream_readRequestAs___closed__2; lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightKeyword___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_getPrefix(lean_object*); lean_object* l_IO_FS_Stream_readNotificationAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Snapshots_Snapshot_endPos(lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__8; lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_addToken(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_compileHeader_match__3(lean_object*); lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_initializeWorker_match__1___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDefinition_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_ins___at_Lean_Server_FileWorker_queueRequest___spec__2(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedName; extern lean_object* l_IO_FS_Stream_readRequestAs___closed__1; lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_mainLoop_match__1(lean_object*); extern lean_object* l_Lean_JsonRpc_instToStringRequestID___closed__1; lean_object* l_Lean_Expr_constName_x3f(lean_object*); lean_object* l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3(lean_object*); lean_object* l_Lean_Environment_getModuleIdxFor_x3f(lean_object*, lean_object*); lean_object* l_List_toArrayAux___rarg(lean_object*, lean_object*); uint8_t l_Lean_Syntax_isNone(lean_object*); extern lean_object* l_IO_FS_Stream_readLspRequestAs___closed__1; lean_object* l_Lean_Meta_inferType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDefinition_match__5___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_parseSearchPath(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol(lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightId_match__4(lean_object*); lean_object* l_EStateM_instInhabitedEStateM___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_mainLoop_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_List_map___at_Lean_Server_FileWorker_handlePlainGoal___spec__1(lean_object*); lean_object* l_Lean_Server_toFileUri(lean_object*); lean_object* l_IO_eprint___at_IO_eprintln___spec__1(lean_object*, lean_object*); lean_object* l_String_trim(lean_object*); lean_object* l_List_forIn_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_dropLast___rarg(lean_object*); lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__7; lean_object* l_IO_mkRef___at_Lean_Server_FileWorker_initializeWorker___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Environment_allImportedModuleNames(lean_object*); extern lean_object* l_IO_FS_Stream_readRequestAs___closed__4; uint8_t l_Lean_Server_FileWorker_updateDocument___lambda__1(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_noHighlightKinds; lean_object* l_Lean_Server_FileWorker_compileHeader_match__3___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_foldDocumentChanges(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleHover___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_instantiateMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_TagDeclarationExtension_isTagged(lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_withPrefix(lean_object*, lean_object*); lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Term_mkExplicitBinder___closed__1; lean_object* l_Lean_Meta_ppGoal___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath_processStderr(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*); lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Util_Trace_0__Lean_addNode___rarg___lambda__1___closed__2; lean_object* l_Lean_Syntax_getTailPos_x3f(lean_object*, uint8_t); lean_object* l_Lean_Server_Snapshots_Snapshot_msgLog(lean_object*); extern lean_object* l_Std_HashMap_instInhabitedHashMap___closed__1; lean_object* l_Lean_Server_FileWorker_handleDidChange(lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_CancelToken_set___boxed(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__2___boxed(lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__4; lean_object* l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__5; lean_object* l_Lean_Server_FileWorker_handleSemanticTokens(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_updatePendingRequests(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedPosition___closed__1; lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightId_match__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__17(lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handlePlainGoal___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__4(lean_object*); lean_object* l_Lean_Server_FileWorker_handleHover_match__3(lean_object*); lean_object* l_ReaderT_pure___at_Lean_Server_FileWorker_handleCompletion___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_unfoldCmdSnaps(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Server_FileWorker_handleHover___lambda__1(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_CancelToken_set(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_initAndRunWorker(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_contains___at_Lean_Elab_InfoTree_hoverableInfoAt_x3f___spec__1(lean_object*, lean_object*); extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_36____closed__6; lean_object* l_Lean_Server_publishMessages(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_hasRange___boxed(lean_object*); lean_object* l_Lean_Server_FileWorker_handleDefinition_match__3___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); extern lean_object* l_Lean_mkOptionalNode___closed__2; lean_object* l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__3; lean_object* l_Lean_Server_maybeTee(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_compileHeader___closed__3; lean_object* l_Lean_Server_FileWorker_updateDocument___closed__1; lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokens___lambda__2___closed__1; lean_object* l_Lean_Server_FileWorker_parseParams___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Info_pos_x3f(lean_object*); lean_object* l_Lean_Server_FileWorker_handleNotification_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_ReaderT_pure___at_Lean_Server_FileWorker_handleCompletion___spec__1(lean_object*); extern lean_object* l_IO_instInhabitedError; lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol___rarg(lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handlePlainGoal___spec__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Std_PersistentArray_anyM___at_Lean_MessageLog_hasErrors___spec__1(lean_object*); uint8_t l_Lean_Server_FileWorker_handleSemanticTokens___lambda__1(lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__5___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_workerMain___closed__1; extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__13; lean_object* l_Lean_Server_FileWorker_withWaitFindSnap_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_mkRef___at_Lean_Server_FileWorker_CancelToken_new___spec__1___boxed(lean_object*, lean_object*); lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_mainLoop_match__2(lean_object*); extern lean_object* l_System_FilePath_exeSuffix; uint8_t l_List_isEmpty___rarg(lean_object*); lean_object* l_List_lengthAux___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics_waitLoop___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__6(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handlePlainGoal_match__3(lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___closed__2; lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_376_(lean_object*); lean_object* l_Lean_Server_FileWorker_handlePlainGoal___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__12; lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__2___closed__1; lean_object* l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__21; lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___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* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__6___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_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_List_getLast_x21___at_Lean_Server_FileWorker_updateDocument___spec__1(lean_object*); lean_object* l_Lean_Server_FileWorker_workerMain___boxed__const__1; lean_object* l_Lean_Elab_ContextInfo_runMetaM___rarg(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__9; lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__10(lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_go(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__2; lean_object* l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_myMacro____x40_Lean_Parser_Extra___hyg_276____closed__2; lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___boxed(lean_object*, lean_object*); lean_object* lean_task_pure(lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___closed__1; lean_object* l_Lean_Server_FileWorker_updateDocument_match__1(lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___closed__1; lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__2(lean_object*, 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__3(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handlePlainGoal_match__1___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; lean_object* l_Lean_Server_FileWorker_handleRequest_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleSemanticTokens___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_handleRequest___spec__10___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__1; lean_object* l_Lean_Server_FileWorker_handleCancelRequest(lean_object*, lean_object*, lean_object*); lean_object* lean_task_get_own(lean_object*); extern lean_object* l_Array_findSomeM_x3f___rarg___closed__1; lean_object* l_Lean_Server_FileWorker_handleDocumentHighlight_match__1(lean_object*); lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__2(lean_object*); lean_object* l_Lean_Syntax_reprint(lean_object*); lean_object* l_Lean_Server_FileWorker_handleCompletion_match__1(lean_object*); lean_object* l_Lean_Server_FileWorker_handleDefinition_match__4(lean_object*); lean_object* l_List_getLast___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___closed__1; lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__19(lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_readRequestAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_del___at_Lean_Server_FileWorker_handleCancelRequest___spec__2(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_compileHeader_match__1(lean_object*); lean_object* l_Lean_Server_FileWorker_initAndRunWorker___boxed__const__2; lean_object* l_List_getLastD___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handlePlainGoal___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_FileWorker_handleDefinition_match__4___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Snapshots_compileNextCmd(lean_object*, lean_object*, lean_object*); lean_object* l_List_forIn_loop___at_Lean_Server_FileWorker_handleSemanticTokens___spec__2___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_term_x5b___x5d___closed__3; lean_object* l_Lean_findModuleOf_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__1; lean_object* l_Lean_Server_FileWorker_handleRequest_match__2___rarg(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_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_string_dec_eq(lean_object*, lean_object*); lean_object* l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_withWaitFindSnap___spec__2(lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentHighlightParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_919_(lean_object*); extern lean_object* l_Lean_Elab_instInhabitedInfoState___closed__1; extern lean_object* l_Lean_Parser_Command_instance___elambda__1___closed__6; extern lean_object* l_Lean_Lsp_instInhabitedPosition___closed__1; lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_go___boxed(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_FileWorker_handleDocumentSymbol_toDocumentSymbols_match__1(lean_object*); static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_logSnapContent___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("]: `"); return x_1; } } lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_logSnapContent(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; x_4 = lean_ctor_get(x_1, 0); lean_inc(x_4); lean_inc(x_4); x_5 = l_Nat_repr(x_4); x_6 = l_term_x5b___x5d___closed__3; x_7 = lean_string_append(x_6, x_5); lean_dec(x_5); x_8 = l_term_x5b___x5d___closed__5; x_9 = lean_string_append(x_7, x_8); x_10 = l_Lean_Server_Snapshots_Snapshot_endPos(x_1); lean_dec(x_1); lean_inc(x_10); x_11 = l_Nat_repr(x_10); x_12 = lean_string_append(x_9, x_11); lean_dec(x_11); x_13 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_logSnapContent___closed__1; x_14 = lean_string_append(x_12, x_13); x_15 = lean_ctor_get(x_2, 0); x_16 = lean_unsigned_to_nat(1u); x_17 = lean_nat_sub(x_10, x_16); lean_dec(x_10); x_18 = lean_string_utf8_extract(x_15, x_4, x_17); lean_dec(x_17); lean_dec(x_4); x_19 = lean_string_append(x_14, x_18); lean_dec(x_18); x_20 = l_Lean_Name_instReprName___closed__1; x_21 = lean_string_append(x_19, x_20); x_22 = l_IO_eprintln___at___private_Init_System_IO_0__IO_eprintlnAux___spec__1(x_21, x_3); return x_22; } } lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_logSnapContent___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_logSnapContent(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Lean_Server_FileWorker_instCoeErrorElabTaskError(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l_Lean_Server_FileWorker_instInhabitedCancelToken() { _start: { lean_object* x_1; x_1 = lean_box(0); return x_1; } } lean_object* l_IO_mkRef___at_Lean_Server_FileWorker_CancelToken_new___spec__1(uint8_t x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; uint8_t x_5; x_3 = lean_box(x_1); x_4 = lean_st_mk_ref(x_3, x_2); x_5 = !lean_is_exclusive(x_4); if (x_5 == 0) { return x_4; } else { lean_object* x_6; lean_object* x_7; lean_object* x_8; x_6 = lean_ctor_get(x_4, 0); x_7 = lean_ctor_get(x_4, 1); lean_inc(x_7); lean_inc(x_6); lean_dec(x_4); x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_6); lean_ctor_set(x_8, 1, x_7); return x_8; } } } lean_object* l_Lean_Server_FileWorker_CancelToken_new(lean_object* x_1) { _start: { uint8_t x_2; lean_object* x_3; uint8_t x_4; x_2 = 0; x_3 = l_IO_mkRef___at_Lean_Server_FileWorker_CancelToken_new___spec__1(x_2, x_1); x_4 = !lean_is_exclusive(x_3); if (x_4 == 0) { return x_3; } else { lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_ctor_get(x_3, 0); x_6 = lean_ctor_get(x_3, 1); lean_inc(x_6); lean_inc(x_5); lean_dec(x_3); x_7 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_7, 0, x_5); lean_ctor_set(x_7, 1, x_6); return x_7; } } } lean_object* l_IO_mkRef___at_Lean_Server_FileWorker_CancelToken_new___spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = lean_unbox(x_1); lean_dec(x_1); x_4 = l_IO_mkRef___at_Lean_Server_FileWorker_CancelToken_new___spec__1(x_3, x_2); return x_4; } } lean_object* l_Lean_Server_FileWorker_CancelToken_check___rarg___lambda__1(lean_object* x_1, lean_object* x_2, uint8_t x_3) { _start: { if (x_3 == 0) { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_dec(x_2); x_4 = lean_ctor_get(x_1, 0); lean_inc(x_4); lean_dec(x_1); x_5 = lean_ctor_get(x_4, 1); lean_inc(x_5); lean_dec(x_4); x_6 = lean_box(0); x_7 = lean_apply_2(x_5, lean_box(0), x_6); return x_7; } else { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_dec(x_1); x_8 = lean_ctor_get(x_2, 0); lean_inc(x_8); lean_dec(x_2); x_9 = lean_box(0); x_10 = lean_apply_2(x_8, lean_box(0), x_9); return x_10; } } } lean_object* l_Lean_Server_FileWorker_CancelToken_check___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_5 = lean_ctor_get(x_3, 1); lean_inc(x_5); x_6 = lean_alloc_closure((void*)(l_ST_Prim_Ref_get___boxed), 4, 3); lean_closure_set(x_6, 0, lean_box(0)); lean_closure_set(x_6, 1, lean_box(0)); lean_closure_set(x_6, 2, x_4); x_7 = lean_apply_2(x_2, lean_box(0), x_6); x_8 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_CancelToken_check___rarg___lambda__1___boxed), 3, 2); lean_closure_set(x_8, 0, x_3); lean_closure_set(x_8, 1, x_1); x_9 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_7, x_8); return x_9; } } lean_object* l_Lean_Server_FileWorker_CancelToken_check(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_CancelToken_check___rarg), 4, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_CancelToken_check___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { uint8_t x_4; lean_object* x_5; x_4 = lean_unbox(x_3); lean_dec(x_3); x_5 = l_Lean_Server_FileWorker_CancelToken_check___rarg___lambda__1(x_1, x_2, x_4); return x_5; } } lean_object* l_Lean_Server_FileWorker_CancelToken_set(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; lean_object* x_5; uint8_t x_6; x_3 = 1; x_4 = lean_box(x_3); x_5 = lean_st_ref_set(x_1, x_4, x_2); x_6 = !lean_is_exclusive(x_5); if (x_6 == 0) { return x_5; } else { lean_object* x_7; lean_object* x_8; lean_object* x_9; x_7 = lean_ctor_get(x_5, 0); x_8 = lean_ctor_get(x_5, 1); lean_inc(x_8); lean_inc(x_7); lean_dec(x_5); x_9 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_9, 0, x_7); lean_ctor_set(x_9, 1, x_8); return x_9; } } } lean_object* l_Lean_Server_FileWorker_CancelToken_set___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Server_FileWorker_CancelToken_set(x_1, x_2); lean_dec(x_1); return x_3; } } static lean_object* _init_l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l_Std_HashMap_instInhabitedHashMap___closed__1; x_2 = l_Lean_mkEmptyEnvironment___lambda__1___closed__1; x_3 = l_Array_empty___closed__1; x_4 = l_Lean_instInhabitedEnvironment___closed__4; x_5 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_5, 0, x_1); lean_ctor_set(x_5, 1, x_2); lean_ctor_set(x_5, 2, x_3); lean_ctor_set(x_5, 3, x_4); return x_5; } } static lean_object* _init_l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__2() { _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; lean_object* x_7; lean_object* x_8; x_1 = lean_box(0); x_2 = l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__1; x_3 = l_Std_instInhabitedPersistentArray___closed__1; x_4 = lean_unsigned_to_nat(0u); x_5 = l_Lean_instInhabitedNameGenerator___closed__1; x_6 = l_Lean_Elab_instInhabitedInfoState___closed__1; x_7 = l_Lean_instInhabitedTraceState___closed__1; x_8 = lean_alloc_ctor(0, 9, 0); lean_ctor_set(x_8, 0, x_2); lean_ctor_set(x_8, 1, x_3); lean_ctor_set(x_8, 2, x_1); lean_ctor_set(x_8, 3, x_4); lean_ctor_set(x_8, 4, x_4); lean_ctor_set(x_8, 5, x_4); lean_ctor_set(x_8, 6, x_5); lean_ctor_set(x_8, 7, x_6); lean_ctor_set(x_8, 8, x_7); return x_8; } } static lean_object* _init_l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = lean_unsigned_to_nat(0u); x_2 = lean_box(0); x_3 = l_Lean_Parser_instInhabitedModuleParserState___closed__1; x_4 = l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__2; x_5 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_5, 0, x_1); lean_ctor_set(x_5, 1, x_2); lean_ctor_set(x_5, 2, x_3); lean_ctor_set(x_5, 3, x_4); return x_5; } } static lean_object* _init_l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = lean_box(2); x_2 = l_Lean_Server_instInhabitedDocumentMeta___closed__1; x_3 = l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__3; x_4 = lean_box(0); x_5 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_5, 0, x_2); lean_ctor_set(x_5, 1, x_3); lean_ctor_set(x_5, 2, x_1); lean_ctor_set(x_5, 3, x_4); return x_5; } } static lean_object* _init_l_Lean_Server_FileWorker_instInhabitedEditableDocument() { _start: { lean_object* x_1; x_1 = l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__4; return x_1; } } lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap_match__1___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); lean_dec(x_1); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_apply_1(x_3, x_6); return x_7; } } } lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap_match__1___rarg), 3, 0); return x_2; } } static lean_object* _init_l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1___closed__1() { _start: { lean_object* x_1; lean_object* x_2; x_1 = lean_box(0); x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } lean_object* l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; uint8_t x_5; x_3 = lean_st_ref_get(x_1, x_2); x_4 = lean_ctor_get(x_3, 0); lean_inc(x_4); x_5 = lean_unbox(x_4); lean_dec(x_4); if (x_5 == 0) { uint8_t x_6; x_6 = !lean_is_exclusive(x_3); if (x_6 == 0) { lean_object* x_7; lean_object* x_8; x_7 = lean_ctor_get(x_3, 0); lean_dec(x_7); x_8 = l_Lean_Compiler_checkIsDefinition___closed__3; lean_ctor_set(x_3, 0, x_8); return x_3; } else { lean_object* x_9; lean_object* x_10; lean_object* x_11; x_9 = lean_ctor_get(x_3, 1); lean_inc(x_9); lean_dec(x_3); x_10 = l_Lean_Compiler_checkIsDefinition___closed__3; x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_9); return x_11; } } else { uint8_t x_12; x_12 = !lean_is_exclusive(x_3); if (x_12 == 0) { lean_object* x_13; lean_object* x_14; x_13 = lean_ctor_get(x_3, 0); lean_dec(x_13); x_14 = l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1___closed__1; lean_ctor_set(x_3, 0, x_14); return x_3; } else { lean_object* x_15; lean_object* x_16; lean_object* x_17; x_15 = lean_ctor_get(x_3, 1); lean_inc(x_15); lean_dec(x_3); x_16 = l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1___closed__1; x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_15); return x_17; } } } } static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("processing..."); return x_1; } } static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__1; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__3() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__2; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__4() { _start: { lean_object* x_1; x_1 = lean_mk_string("<ignored>"); return x_1; } } static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__5() { _start: { lean_object* x_1; lean_object* x_2; x_1 = lean_box(1); x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap(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; lean_object* x_7; x_6 = l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1(x_3, x_5); x_7 = lean_ctor_get(x_6, 0); lean_inc(x_7); if (lean_obj_tag(x_7) == 0) { uint8_t x_8; lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); x_8 = !lean_is_exclusive(x_6); if (x_8 == 0) { lean_object* x_9; uint8_t x_10; x_9 = lean_ctor_get(x_6, 0); lean_dec(x_9); x_10 = !lean_is_exclusive(x_7); if (x_10 == 0) { return x_6; } else { lean_object* x_11; lean_object* x_12; x_11 = lean_ctor_get(x_7, 0); lean_inc(x_11); lean_dec(x_7); x_12 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_6, 0, x_12); return x_6; } } else { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; x_13 = lean_ctor_get(x_6, 1); lean_inc(x_13); lean_dec(x_6); x_14 = lean_ctor_get(x_7, 0); lean_inc(x_14); if (lean_is_exclusive(x_7)) { lean_ctor_release(x_7, 0); x_15 = x_7; } else { lean_dec_ref(x_7); x_15 = lean_box(0); } if (lean_is_scalar(x_15)) { x_16 = lean_alloc_ctor(0, 1, 0); } else { x_16 = x_15; } lean_ctor_set(x_16, 0, x_14); x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_13); return x_17; } } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_dec(x_7); x_18 = lean_ctor_get(x_6, 1); lean_inc(x_18); lean_dec(x_6); x_19 = lean_ctor_get(x_1, 2); lean_inc(x_19); x_20 = lean_ctor_get(x_19, 0); lean_inc(x_20); x_21 = l_Lean_Server_Snapshots_compileNextCmd(x_20, x_2, x_18); x_22 = lean_ctor_get(x_21, 0); lean_inc(x_22); x_23 = lean_ctor_get(x_21, 1); lean_inc(x_23); lean_dec(x_21); x_24 = l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1(x_3, x_23); x_25 = lean_ctor_get(x_24, 0); lean_inc(x_25); if (lean_obj_tag(x_25) == 0) { uint8_t x_26; lean_dec(x_22); lean_dec(x_19); lean_dec(x_4); lean_dec(x_1); x_26 = !lean_is_exclusive(x_24); if (x_26 == 0) { lean_object* x_27; uint8_t x_28; x_27 = lean_ctor_get(x_24, 0); lean_dec(x_27); x_28 = !lean_is_exclusive(x_25); if (x_28 == 0) { return x_24; } else { lean_object* x_29; lean_object* x_30; x_29 = lean_ctor_get(x_25, 0); lean_inc(x_29); lean_dec(x_25); x_30 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_30, 0, x_29); lean_ctor_set(x_24, 0, x_30); return x_24; } } else { lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; x_31 = lean_ctor_get(x_24, 1); lean_inc(x_31); lean_dec(x_24); x_32 = lean_ctor_get(x_25, 0); lean_inc(x_32); if (lean_is_exclusive(x_25)) { lean_ctor_release(x_25, 0); x_33 = x_25; } else { lean_dec_ref(x_25); x_33 = lean_box(0); } if (lean_is_scalar(x_33)) { x_34 = lean_alloc_ctor(0, 1, 0); } else { x_34 = x_33; } lean_ctor_set(x_34, 0, x_32); x_35 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_35, 0, x_34); lean_ctor_set(x_35, 1, x_31); return x_35; } } else { uint8_t x_36; x_36 = !lean_is_exclusive(x_25); if (x_36 == 0) { lean_object* x_37; x_37 = lean_ctor_get(x_25, 0); lean_dec(x_37); if (lean_obj_tag(x_22) == 0) { lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; uint8_t 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; x_38 = lean_ctor_get(x_24, 1); lean_inc(x_38); lean_dec(x_24); x_39 = lean_ctor_get(x_22, 0); lean_inc(x_39); lean_dec(x_22); x_40 = l_Lean_Server_Snapshots_Snapshot_endPos(x_39); x_41 = l_Lean_FileMap_toPosition(x_19, x_40); lean_dec(x_40); lean_dec(x_19); x_42 = lean_box(0); x_43 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__4; x_44 = 0; x_45 = l_Lean_instInhabitedParserDescr___closed__1; x_46 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__3; x_47 = lean_alloc_ctor(0, 5, 1); lean_ctor_set(x_47, 0, x_43); lean_ctor_set(x_47, 1, x_41); lean_ctor_set(x_47, 2, x_42); lean_ctor_set(x_47, 3, x_45); lean_ctor_set(x_47, 4, x_46); lean_ctor_set_uint8(x_47, sizeof(void*)*5, x_44); x_48 = l_Lean_Server_Snapshots_Snapshot_msgLog(x_39); x_49 = l_Std_PersistentArray_push___rarg(x_48, x_47); x_50 = l_Lean_Server_publishMessages(x_1, x_49, x_4, x_38); if (lean_obj_tag(x_50) == 0) { uint8_t x_51; x_51 = !lean_is_exclusive(x_50); if (x_51 == 0) { lean_object* x_52; x_52 = lean_ctor_get(x_50, 0); lean_dec(x_52); lean_ctor_set(x_25, 0, x_39); lean_ctor_set(x_50, 0, x_25); return x_50; } else { lean_object* x_53; lean_object* x_54; x_53 = lean_ctor_get(x_50, 1); lean_inc(x_53); lean_dec(x_50); lean_ctor_set(x_25, 0, x_39); x_54 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_54, 0, x_25); lean_ctor_set(x_54, 1, x_53); return x_54; } } else { uint8_t x_55; lean_dec(x_39); lean_free_object(x_25); x_55 = !lean_is_exclusive(x_50); if (x_55 == 0) { return x_50; } else { lean_object* x_56; lean_object* x_57; lean_object* x_58; x_56 = lean_ctor_get(x_50, 0); x_57 = lean_ctor_get(x_50, 1); lean_inc(x_57); lean_inc(x_56); lean_dec(x_50); 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; lean_free_object(x_25); lean_dec(x_19); x_59 = lean_ctor_get(x_24, 1); lean_inc(x_59); lean_dec(x_24); x_60 = lean_ctor_get(x_22, 0); lean_inc(x_60); lean_dec(x_22); x_61 = l_Lean_Server_publishMessages(x_1, x_60, x_4, x_59); if (lean_obj_tag(x_61) == 0) { uint8_t x_62; x_62 = !lean_is_exclusive(x_61); if (x_62 == 0) { lean_object* x_63; lean_object* x_64; x_63 = lean_ctor_get(x_61, 0); lean_dec(x_63); x_64 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__5; lean_ctor_set(x_61, 0, x_64); return x_61; } else { lean_object* x_65; lean_object* x_66; lean_object* x_67; x_65 = lean_ctor_get(x_61, 1); lean_inc(x_65); lean_dec(x_61); x_66 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__5; x_67 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_67, 0, x_66); lean_ctor_set(x_67, 1, x_65); return x_67; } } else { uint8_t x_68; x_68 = !lean_is_exclusive(x_61); if (x_68 == 0) { return x_61; } else { lean_object* x_69; lean_object* x_70; lean_object* x_71; x_69 = lean_ctor_get(x_61, 0); x_70 = lean_ctor_get(x_61, 1); lean_inc(x_70); lean_inc(x_69); lean_dec(x_61); x_71 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_71, 0, x_69); lean_ctor_set(x_71, 1, x_70); return x_71; } } } } else { lean_dec(x_25); if (lean_obj_tag(x_22) == 0) { lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; uint8_t x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; x_72 = lean_ctor_get(x_24, 1); lean_inc(x_72); lean_dec(x_24); x_73 = lean_ctor_get(x_22, 0); lean_inc(x_73); lean_dec(x_22); x_74 = l_Lean_Server_Snapshots_Snapshot_endPos(x_73); x_75 = l_Lean_FileMap_toPosition(x_19, x_74); lean_dec(x_74); lean_dec(x_19); x_76 = lean_box(0); x_77 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__4; x_78 = 0; x_79 = l_Lean_instInhabitedParserDescr___closed__1; x_80 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__3; x_81 = lean_alloc_ctor(0, 5, 1); lean_ctor_set(x_81, 0, x_77); lean_ctor_set(x_81, 1, x_75); lean_ctor_set(x_81, 2, x_76); lean_ctor_set(x_81, 3, x_79); lean_ctor_set(x_81, 4, x_80); lean_ctor_set_uint8(x_81, sizeof(void*)*5, x_78); x_82 = l_Lean_Server_Snapshots_Snapshot_msgLog(x_73); x_83 = l_Std_PersistentArray_push___rarg(x_82, x_81); x_84 = l_Lean_Server_publishMessages(x_1, x_83, x_4, x_72); if (lean_obj_tag(x_84) == 0) { lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; x_85 = lean_ctor_get(x_84, 1); lean_inc(x_85); if (lean_is_exclusive(x_84)) { lean_ctor_release(x_84, 0); lean_ctor_release(x_84, 1); x_86 = x_84; } else { lean_dec_ref(x_84); x_86 = lean_box(0); } x_87 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_87, 0, x_73); if (lean_is_scalar(x_86)) { x_88 = lean_alloc_ctor(0, 2, 0); } else { x_88 = x_86; } lean_ctor_set(x_88, 0, x_87); lean_ctor_set(x_88, 1, x_85); return x_88; } else { lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_dec(x_73); x_89 = lean_ctor_get(x_84, 0); lean_inc(x_89); x_90 = lean_ctor_get(x_84, 1); lean_inc(x_90); if (lean_is_exclusive(x_84)) { lean_ctor_release(x_84, 0); lean_ctor_release(x_84, 1); x_91 = x_84; } else { lean_dec_ref(x_84); x_91 = lean_box(0); } if (lean_is_scalar(x_91)) { x_92 = lean_alloc_ctor(1, 2, 0); } else { x_92 = x_91; } lean_ctor_set(x_92, 0, x_89); lean_ctor_set(x_92, 1, x_90); return x_92; } } else { lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_dec(x_19); x_93 = lean_ctor_get(x_24, 1); lean_inc(x_93); lean_dec(x_24); x_94 = lean_ctor_get(x_22, 0); lean_inc(x_94); lean_dec(x_22); x_95 = l_Lean_Server_publishMessages(x_1, x_94, x_4, x_93); if (lean_obj_tag(x_95) == 0) { lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; x_96 = lean_ctor_get(x_95, 1); lean_inc(x_96); if (lean_is_exclusive(x_95)) { lean_ctor_release(x_95, 0); lean_ctor_release(x_95, 1); x_97 = x_95; } else { lean_dec_ref(x_95); x_97 = lean_box(0); } x_98 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__5; if (lean_is_scalar(x_97)) { x_99 = lean_alloc_ctor(0, 2, 0); } else { x_99 = x_97; } lean_ctor_set(x_99, 0, x_98); lean_ctor_set(x_99, 1, x_96); return x_99; } else { lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; x_100 = lean_ctor_get(x_95, 0); lean_inc(x_100); x_101 = lean_ctor_get(x_95, 1); lean_inc(x_101); if (lean_is_exclusive(x_95)) { lean_ctor_release(x_95, 0); lean_ctor_release(x_95, 1); x_102 = x_95; } else { lean_dec_ref(x_95); x_102 = lean_box(0); } if (lean_is_scalar(x_102)) { x_103 = lean_alloc_ctor(1, 2, 0); } else { x_103 = x_102; } lean_ctor_set(x_103, 0, x_100); lean_ctor_set(x_103, 1, x_101); return x_103; } } } } } } } lean_object* l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1(x_1, x_2); lean_dec(x_1); return x_3; } } lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___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___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap(x_1, x_2, x_3, x_4, x_5); lean_dec(x_3); return x_6; } } lean_object* l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3___lambda__1(lean_object* x_1) { _start: { if (lean_obj_tag(x_1) == 0) { uint8_t x_2; x_2 = !lean_is_exclusive(x_1); if (x_2 == 0) { lean_object* x_3; lean_object* x_4; x_3 = lean_ctor_get(x_1, 0); x_4 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_4, 0, x_3); lean_ctor_set(x_1, 0, x_4); return x_1; } else { lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); lean_dec(x_1); x_6 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_6, 0, x_5); x_7 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_7, 0, x_6); return x_7; } } else { lean_object* x_8; x_8 = lean_ctor_get(x_1, 0); lean_inc(x_8); lean_dec(x_1); return x_8; } } } static lean_object* _init_l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3___lambda__1), 1, 0); return x_1; } } lean_object* l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; x_2 = l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3___closed__1; x_3 = l_Task_Priority_default; x_4 = lean_task_map(x_2, x_1, x_3); return x_4; } } lean_object* l_IO_AsyncList_unfoldAsync_step___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_inc(x_1); x_4 = lean_apply_2(x_1, x_2, x_3); if (lean_obj_tag(x_4) == 0) { lean_object* x_5; x_5 = lean_ctor_get(x_4, 0); lean_inc(x_5); if (lean_obj_tag(x_5) == 0) { uint8_t x_6; lean_dec(x_1); x_6 = !lean_is_exclusive(x_4); if (x_6 == 0) { lean_object* x_7; uint8_t x_8; x_7 = lean_ctor_get(x_4, 0); lean_dec(x_7); x_8 = !lean_is_exclusive(x_5); if (x_8 == 0) { return x_4; } else { lean_object* x_9; lean_object* x_10; x_9 = lean_ctor_get(x_5, 0); lean_inc(x_9); lean_dec(x_5); x_10 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_4, 0, x_10); return x_4; } } else { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_11 = lean_ctor_get(x_4, 1); lean_inc(x_11); lean_dec(x_4); x_12 = lean_ctor_get(x_5, 0); lean_inc(x_12); if (lean_is_exclusive(x_5)) { lean_ctor_release(x_5, 0); x_13 = x_5; } else { lean_dec_ref(x_5); x_13 = lean_box(0); } if (lean_is_scalar(x_13)) { x_14 = lean_alloc_ctor(0, 1, 0); } else { x_14 = x_13; } lean_ctor_set(x_14, 0, x_12); x_15 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_11); return x_15; } } else { lean_object* x_16; uint8_t x_17; x_16 = lean_ctor_get(x_4, 1); lean_inc(x_16); lean_dec(x_4); x_17 = !lean_is_exclusive(x_5); if (x_17 == 0) { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; x_18 = lean_ctor_get(x_5, 0); lean_inc(x_18); x_19 = lean_alloc_closure((void*)(l_IO_AsyncList_unfoldAsync_step___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__2), 3, 2); lean_closure_set(x_19, 0, x_1); lean_closure_set(x_19, 1, x_18); x_20 = l_Task_Priority_default; x_21 = lean_io_as_task(x_19, x_20, x_16); if (lean_obj_tag(x_21) == 0) { uint8_t x_22; x_22 = !lean_is_exclusive(x_21); if (x_22 == 0) { lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; x_23 = lean_ctor_get(x_21, 0); x_24 = lean_alloc_closure((void*)(l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3___lambda__1), 1, 0); x_25 = lean_task_map(x_24, x_23, x_20); x_26 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_26, 0, x_25); x_27 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_27, 0, x_18); lean_ctor_set(x_27, 1, x_26); lean_ctor_set(x_5, 0, x_27); lean_ctor_set(x_21, 0, x_5); return x_21; } else { lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; x_28 = lean_ctor_get(x_21, 0); x_29 = lean_ctor_get(x_21, 1); lean_inc(x_29); lean_inc(x_28); lean_dec(x_21); x_30 = lean_alloc_closure((void*)(l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3___lambda__1), 1, 0); x_31 = lean_task_map(x_30, x_28, x_20); x_32 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_32, 0, x_31); x_33 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_33, 0, x_18); lean_ctor_set(x_33, 1, x_32); lean_ctor_set(x_5, 0, x_33); x_34 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_34, 0, x_5); lean_ctor_set(x_34, 1, x_29); return x_34; } } else { uint8_t x_35; lean_free_object(x_5); lean_dec(x_18); x_35 = !lean_is_exclusive(x_21); if (x_35 == 0) { return x_21; } else { lean_object* x_36; lean_object* x_37; lean_object* x_38; x_36 = lean_ctor_get(x_21, 0); x_37 = lean_ctor_get(x_21, 1); lean_inc(x_37); lean_inc(x_36); lean_dec(x_21); x_38 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_38, 0, x_36); lean_ctor_set(x_38, 1, x_37); return x_38; } } } else { lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; x_39 = lean_ctor_get(x_5, 0); lean_inc(x_39); lean_dec(x_5); lean_inc(x_39); x_40 = lean_alloc_closure((void*)(l_IO_AsyncList_unfoldAsync_step___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__2), 3, 2); lean_closure_set(x_40, 0, x_1); lean_closure_set(x_40, 1, x_39); x_41 = l_Task_Priority_default; x_42 = lean_io_as_task(x_40, x_41, x_16); if (lean_obj_tag(x_42) == 0) { lean_object* x_43; 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; x_43 = lean_ctor_get(x_42, 0); lean_inc(x_43); x_44 = lean_ctor_get(x_42, 1); lean_inc(x_44); if (lean_is_exclusive(x_42)) { lean_ctor_release(x_42, 0); lean_ctor_release(x_42, 1); x_45 = x_42; } else { lean_dec_ref(x_42); x_45 = lean_box(0); } x_46 = lean_alloc_closure((void*)(l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3___lambda__1), 1, 0); x_47 = lean_task_map(x_46, x_43, x_41); x_48 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_48, 0, x_47); x_49 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_49, 0, x_39); lean_ctor_set(x_49, 1, x_48); x_50 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_50, 0, x_49); if (lean_is_scalar(x_45)) { x_51 = lean_alloc_ctor(0, 2, 0); } else { x_51 = x_45; } lean_ctor_set(x_51, 0, x_50); lean_ctor_set(x_51, 1, x_44); return x_51; } else { lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_dec(x_39); x_52 = lean_ctor_get(x_42, 0); lean_inc(x_52); x_53 = lean_ctor_get(x_42, 1); lean_inc(x_53); if (lean_is_exclusive(x_42)) { lean_ctor_release(x_42, 0); lean_ctor_release(x_42, 1); x_54 = x_42; } else { lean_dec_ref(x_42); x_54 = lean_box(0); } if (lean_is_scalar(x_54)) { x_55 = lean_alloc_ctor(1, 2, 0); } else { x_55 = x_54; } lean_ctor_set(x_55, 0, x_52); lean_ctor_set(x_55, 1, x_53); return x_55; } } } } else { uint8_t x_56; lean_dec(x_1); x_56 = !lean_is_exclusive(x_4); if (x_56 == 0) { return x_4; } else { lean_object* x_57; lean_object* x_58; lean_object* x_59; x_57 = lean_ctor_get(x_4, 0); x_58 = lean_ctor_get(x_4, 1); lean_inc(x_58); lean_inc(x_57); lean_dec(x_4); x_59 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_59, 0, x_57); lean_ctor_set(x_59, 1, x_58); return x_59; } } } } lean_object* l_IO_AsyncList_unfoldAsync___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; x_4 = lean_alloc_closure((void*)(l_IO_AsyncList_unfoldAsync_step___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__2), 3, 2); lean_closure_set(x_4, 0, x_1); lean_closure_set(x_4, 1, x_2); x_5 = l_Task_Priority_default; x_6 = lean_io_as_task(x_4, x_5, x_3); if (lean_obj_tag(x_6) == 0) { uint8_t x_7; x_7 = !lean_is_exclusive(x_6); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_8 = lean_ctor_get(x_6, 0); x_9 = lean_alloc_closure((void*)(l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3___lambda__1), 1, 0); x_10 = lean_task_map(x_9, x_8, x_5); x_11 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_6, 0, x_11); return x_6; } else { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; x_12 = lean_ctor_get(x_6, 0); x_13 = lean_ctor_get(x_6, 1); lean_inc(x_13); lean_inc(x_12); lean_dec(x_6); x_14 = lean_alloc_closure((void*)(l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3___lambda__1), 1, 0); x_15 = lean_task_map(x_14, x_12, x_5); x_16 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_16, 0, x_15); x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_13); return x_17; } } else { uint8_t x_18; x_18 = !lean_is_exclusive(x_6); if (x_18 == 0) { return x_6; } else { lean_object* x_19; lean_object* x_20; lean_object* x_21; x_19 = lean_ctor_get(x_6, 0); x_20 = lean_ctor_get(x_6, 1); lean_inc(x_20); lean_inc(x_19); lean_dec(x_6); x_21 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_21, 0, x_19); lean_ctor_set(x_21, 1, x_20); return x_21; } } } } lean_object* l_Lean_Server_FileWorker_unfoldCmdSnaps___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap(x_1, x_4, x_2, x_3, x_5); return x_6; } } lean_object* l_Lean_Server_FileWorker_unfoldCmdSnaps(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, uint8_t x_5, lean_object* x_6) { _start: { if (x_5 == 0) { lean_object* x_7; lean_object* x_8; x_7 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_unfoldCmdSnaps___lambda__1___boxed), 5, 3); lean_closure_set(x_7, 0, x_1); lean_closure_set(x_7, 1, x_3); lean_closure_set(x_7, 2, x_4); x_8 = l_IO_AsyncList_unfoldAsync___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__1(x_7, x_2, x_6); return x_8; } else { lean_object* x_9; uint8_t x_10; x_9 = l_Lean_Server_Snapshots_Snapshot_msgLog(x_2); x_10 = l_Std_PersistentArray_anyM___at_Lean_MessageLog_hasErrors___spec__1(x_9); lean_dec(x_9); if (x_10 == 0) { lean_object* x_11; lean_object* x_12; x_11 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_unfoldCmdSnaps___lambda__1___boxed), 5, 3); lean_closure_set(x_11, 0, x_1); lean_closure_set(x_11, 1, x_3); lean_closure_set(x_11, 2, x_4); x_12 = l_IO_AsyncList_unfoldAsync___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__1(x_11, x_2, x_6); return x_12; } else { lean_object* x_13; lean_object* x_14; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_13 = lean_box(2); x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_6); return x_14; } } } } lean_object* l_Lean_Server_FileWorker_unfoldCmdSnaps___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_Server_FileWorker_unfoldCmdSnaps___lambda__1(x_1, x_2, x_3, x_4, x_5); lean_dec(x_2); return x_6; } } lean_object* l_Lean_Server_FileWorker_unfoldCmdSnaps___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { uint8_t x_7; lean_object* x_8; x_7 = lean_unbox(x_5); lean_dec(x_5); x_8 = l_Lean_Server_FileWorker_unfoldCmdSnaps(x_1, x_2, x_3, x_4, x_7, x_6); return x_8; } } lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_5; lean_dec(x_3); lean_dec(x_2); x_5 = lean_apply_1(x_4, x_1); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_1, 1); lean_inc(x_7); x_8 = l_Lean_instInhabitedParserDescr___closed__1; x_9 = lean_string_dec_eq(x_6, x_8); if (x_9 == 0) { lean_dec(x_2); if (lean_obj_tag(x_7) == 0) { lean_object* x_10; lean_dec(x_6); lean_dec(x_3); x_10 = lean_apply_1(x_4, x_1); return x_10; } else { lean_object* x_11; x_11 = lean_ctor_get(x_7, 1); lean_inc(x_11); if (lean_obj_tag(x_11) == 0) { lean_object* x_12; lean_object* x_13; lean_dec(x_4); lean_dec(x_1); x_12 = lean_ctor_get(x_7, 0); lean_inc(x_12); lean_dec(x_7); x_13 = lean_apply_2(x_3, x_6, x_12); return x_13; } else { lean_object* x_14; lean_dec(x_11); lean_dec(x_7); lean_dec(x_6); lean_dec(x_3); x_14 = lean_apply_1(x_4, x_1); return x_14; } } } else { lean_dec(x_6); lean_dec(x_1); if (lean_obj_tag(x_7) == 0) { lean_object* x_15; lean_object* x_16; lean_dec(x_4); lean_dec(x_3); x_15 = lean_box(0); x_16 = lean_apply_1(x_2, x_15); return x_16; } else { lean_object* x_17; lean_dec(x_2); x_17 = lean_ctor_get(x_7, 1); lean_inc(x_17); if (lean_obj_tag(x_17) == 0) { lean_object* x_18; lean_object* x_19; lean_dec(x_4); x_18 = lean_ctor_get(x_7, 0); lean_inc(x_18); lean_dec(x_7); x_19 = lean_apply_2(x_3, x_8, x_18); return x_19; } else { uint8_t x_20; lean_dec(x_3); x_20 = !lean_is_exclusive(x_17); if (x_20 == 0) { lean_object* x_21; lean_object* x_22; lean_object* x_23; x_21 = lean_ctor_get(x_17, 1); lean_dec(x_21); x_22 = lean_ctor_get(x_17, 0); lean_dec(x_22); lean_ctor_set(x_17, 1, x_7); lean_ctor_set(x_17, 0, x_8); x_23 = lean_apply_1(x_4, x_17); return x_23; } else { lean_object* x_24; lean_object* x_25; lean_dec(x_17); x_24 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_24, 0, x_8); lean_ctor_set(x_24, 1, x_7); x_25 = lean_apply_1(x_4, x_24); return x_25; } } } } } } } lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_leanpkgSetupSearchPath_match__1___rarg), 4, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath_processStderr(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { lean_object* x_8; lean_object* x_9; x_8 = lean_ctor_get(x_5, 2); x_9 = lean_io_prim_handle_get_line(x_8, x_7); if (lean_obj_tag(x_9) == 0) { uint8_t x_10; x_10 = !lean_is_exclusive(x_9); if (x_10 == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; x_11 = lean_ctor_get(x_9, 0); x_12 = lean_ctor_get(x_9, 1); x_13 = l_Lean_instInhabitedParserDescr___closed__1; x_14 = lean_string_dec_eq(x_11, x_13); 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_free_object(x_9); x_15 = lean_box(0); x_16 = l_Lean_Lsp_instInhabitedRange___closed__1; x_17 = l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__2; lean_inc(x_11); x_18 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_18, 0, x_16); lean_ctor_set(x_18, 1, x_16); lean_ctor_set(x_18, 2, x_17); lean_ctor_set(x_18, 3, x_15); lean_ctor_set(x_18, 4, x_15); lean_ctor_set(x_18, 5, x_11); lean_ctor_set(x_18, 6, x_15); lean_ctor_set(x_18, 7, x_15); x_19 = l_Lean_mkOptionalNode___closed__2; x_20 = lean_array_push(x_19, x_18); lean_inc(x_4); lean_inc(x_2); x_21 = l_Lean_Server_publishDiagnostics(x_2, x_20, x_4, x_12); if (lean_obj_tag(x_21) == 0) { lean_object* x_22; lean_object* x_23; x_22 = lean_ctor_get(x_21, 1); lean_inc(x_22); lean_dec(x_21); x_23 = lean_string_append(x_6, x_11); lean_dec(x_11); x_6 = x_23; x_7 = x_22; goto _start; } else { uint8_t x_25; lean_dec(x_11); lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); x_25 = !lean_is_exclusive(x_21); if (x_25 == 0) { return x_21; } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; x_26 = lean_ctor_get(x_21, 0); x_27 = lean_ctor_get(x_21, 1); lean_inc(x_27); lean_inc(x_26); lean_dec(x_21); x_28 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_28, 0, x_26); lean_ctor_set(x_28, 1, x_27); return x_28; } } } else { lean_dec(x_11); lean_dec(x_4); lean_dec(x_2); lean_ctor_set(x_9, 0, x_6); return x_9; } } else { lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; x_29 = lean_ctor_get(x_9, 0); x_30 = lean_ctor_get(x_9, 1); lean_inc(x_30); lean_inc(x_29); lean_dec(x_9); x_31 = l_Lean_instInhabitedParserDescr___closed__1; x_32 = lean_string_dec_eq(x_29, x_31); if (x_32 == 0) { lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; x_33 = lean_box(0); x_34 = l_Lean_Lsp_instInhabitedRange___closed__1; x_35 = l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__2; lean_inc(x_29); x_36 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_36, 0, x_34); lean_ctor_set(x_36, 1, x_34); lean_ctor_set(x_36, 2, x_35); lean_ctor_set(x_36, 3, x_33); lean_ctor_set(x_36, 4, x_33); lean_ctor_set(x_36, 5, x_29); lean_ctor_set(x_36, 6, x_33); lean_ctor_set(x_36, 7, x_33); x_37 = l_Lean_mkOptionalNode___closed__2; x_38 = lean_array_push(x_37, x_36); lean_inc(x_4); lean_inc(x_2); x_39 = l_Lean_Server_publishDiagnostics(x_2, x_38, x_4, x_30); if (lean_obj_tag(x_39) == 0) { lean_object* x_40; lean_object* x_41; x_40 = lean_ctor_get(x_39, 1); lean_inc(x_40); lean_dec(x_39); x_41 = lean_string_append(x_6, x_29); lean_dec(x_29); x_6 = x_41; x_7 = x_40; goto _start; } else { lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_dec(x_29); lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); x_43 = lean_ctor_get(x_39, 0); lean_inc(x_43); x_44 = lean_ctor_get(x_39, 1); lean_inc(x_44); if (lean_is_exclusive(x_39)) { lean_ctor_release(x_39, 0); lean_ctor_release(x_39, 1); x_45 = x_39; } else { lean_dec_ref(x_39); x_45 = lean_box(0); } if (lean_is_scalar(x_45)) { x_46 = lean_alloc_ctor(1, 2, 0); } else { x_46 = x_45; } lean_ctor_set(x_46, 0, x_43); lean_ctor_set(x_46, 1, x_44); return x_46; } } else { lean_object* x_47; lean_dec(x_29); lean_dec(x_4); lean_dec(x_2); x_47 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_47, 0, x_6); lean_ctor_set(x_47, 1, x_30); return x_47; } } } else { uint8_t x_48; lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); x_48 = !lean_is_exclusive(x_9); if (x_48 == 0) { return x_9; } else { lean_object* x_49; lean_object* x_50; lean_object* x_51; x_49 = lean_ctor_get(x_9, 0); x_50 = lean_ctor_get(x_9, 1); lean_inc(x_50); lean_inc(x_49); lean_dec(x_9); x_51 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_51, 0, x_49); lean_ctor_set(x_51, 1, x_50); return x_51; } } } } lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath_processStderr___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_FileWorker_leanpkgSetupSearchPath_processStderr(x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_5); lean_dec(x_3); lean_dec(x_1); return x_8; } } lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__1(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; size_t x_13; size_t x_14; lean_object* x_15; lean_object* x_16; 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); lean_dec(x_9); x_11 = l_Lean_Name_toString___closed__1; x_12 = l_Lean_Name_toStringWithSep(x_11, x_10); x_13 = 1; x_14 = x_2 + x_13; x_15 = x_12; x_16 = lean_array_uset(x_8, x_2, x_15); x_2 = x_14; x_3 = x_16; goto _start; } } } lean_object* l_List_mapM___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_3; lean_object* x_4; x_3 = lean_box(0); x_4 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_4, 0, x_3); lean_ctor_set(x_4, 1, x_2); return x_4; } else { uint8_t x_5; x_5 = !lean_is_exclusive(x_1); if (x_5 == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; x_6 = lean_ctor_get(x_1, 0); x_7 = lean_ctor_get(x_1, 1); x_8 = l_Lean_realPathNormalized(x_6, x_2); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; 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 = l_List_mapM___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2(x_7, x_10); if (lean_obj_tag(x_11) == 0) { uint8_t x_12; x_12 = !lean_is_exclusive(x_11); if (x_12 == 0) { lean_object* x_13; x_13 = lean_ctor_get(x_11, 0); lean_ctor_set(x_1, 1, x_13); lean_ctor_set(x_1, 0, x_9); lean_ctor_set(x_11, 0, x_1); return x_11; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; x_14 = lean_ctor_get(x_11, 0); x_15 = lean_ctor_get(x_11, 1); lean_inc(x_15); lean_inc(x_14); lean_dec(x_11); lean_ctor_set(x_1, 1, x_14); lean_ctor_set(x_1, 0, x_9); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_1); lean_ctor_set(x_16, 1, x_15); return x_16; } } else { uint8_t x_17; lean_dec(x_9); lean_free_object(x_1); x_17 = !lean_is_exclusive(x_11); if (x_17 == 0) { return x_11; } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; x_18 = lean_ctor_get(x_11, 0); x_19 = lean_ctor_get(x_11, 1); lean_inc(x_19); lean_inc(x_18); lean_dec(x_11); x_20 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_20, 0, x_18); lean_ctor_set(x_20, 1, x_19); return x_20; } } } else { uint8_t x_21; lean_free_object(x_1); lean_dec(x_7); x_21 = !lean_is_exclusive(x_8); if (x_21 == 0) { return x_8; } else { lean_object* x_22; lean_object* x_23; lean_object* x_24; x_22 = lean_ctor_get(x_8, 0); x_23 = lean_ctor_get(x_8, 1); lean_inc(x_23); lean_inc(x_22); lean_dec(x_8); x_24 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_24, 0, x_22); lean_ctor_set(x_24, 1, x_23); return x_24; } } } else { lean_object* x_25; lean_object* x_26; lean_object* x_27; x_25 = lean_ctor_get(x_1, 0); x_26 = lean_ctor_get(x_1, 1); lean_inc(x_26); lean_inc(x_25); lean_dec(x_1); x_27 = l_Lean_realPathNormalized(x_25, x_2); if (lean_obj_tag(x_27) == 0) { lean_object* x_28; lean_object* x_29; lean_object* x_30; x_28 = lean_ctor_get(x_27, 0); lean_inc(x_28); x_29 = lean_ctor_get(x_27, 1); lean_inc(x_29); lean_dec(x_27); x_30 = l_List_mapM___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2(x_26, x_29); if (lean_obj_tag(x_30) == 0) { lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; x_31 = lean_ctor_get(x_30, 0); lean_inc(x_31); x_32 = lean_ctor_get(x_30, 1); lean_inc(x_32); if (lean_is_exclusive(x_30)) { lean_ctor_release(x_30, 0); lean_ctor_release(x_30, 1); x_33 = x_30; } else { lean_dec_ref(x_30); x_33 = lean_box(0); } x_34 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_34, 0, x_28); lean_ctor_set(x_34, 1, x_31); if (lean_is_scalar(x_33)) { x_35 = lean_alloc_ctor(0, 2, 0); } else { x_35 = x_33; } lean_ctor_set(x_35, 0, x_34); lean_ctor_set(x_35, 1, x_32); return x_35; } else { lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_dec(x_28); x_36 = lean_ctor_get(x_30, 0); lean_inc(x_36); x_37 = lean_ctor_get(x_30, 1); lean_inc(x_37); if (lean_is_exclusive(x_30)) { lean_ctor_release(x_30, 0); lean_ctor_release(x_30, 1); x_38 = x_30; } else { lean_dec_ref(x_30); x_38 = lean_box(0); } if (lean_is_scalar(x_38)) { x_39 = lean_alloc_ctor(1, 2, 0); } else { x_39 = x_38; } lean_ctor_set(x_39, 0, x_36); lean_ctor_set(x_39, 1, x_37); return x_39; } } else { lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_dec(x_26); x_40 = lean_ctor_get(x_27, 0); lean_inc(x_40); x_41 = lean_ctor_get(x_27, 1); lean_inc(x_41); if (lean_is_exclusive(x_27)) { lean_ctor_release(x_27, 0); lean_ctor_release(x_27, 1); x_42 = x_27; } else { lean_dec_ref(x_27); x_42 = lean_box(0); } if (lean_is_scalar(x_42)) { x_43 = lean_alloc_ctor(1, 2, 0); } else { x_43 = x_42; } lean_ctor_set(x_43, 0, x_40); lean_ctor_set(x_43, 1, x_41); return x_43; } } } } } static lean_object* _init_l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__1() { _start: { uint8_t x_1; uint8_t x_2; lean_object* x_3; x_1 = 2; x_2 = 0; x_3 = lean_alloc_ctor(0, 0, 3); lean_ctor_set_uint8(x_3, 0, x_1); lean_ctor_set_uint8(x_3, 1, x_2); lean_ctor_set_uint8(x_3, 2, x_2); return x_3; } } static lean_object* _init_l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("print-paths"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_mkOptionalNode___closed__2; x_2 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__2; x_3 = lean_array_push(x_1, x_2); return x_3; } } static lean_object* _init_l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__4() { _start: { lean_object* x_1; x_1 = lean_mk_string("`leanpkg print-paths` failed:\n"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5() { _start: { lean_object* x_1; x_1 = lean_mk_string("\nstderr:\n"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6() { _start: { lean_object* x_1; x_1 = lean_mk_string("unexpected output from `leanpkg print-paths`:\n"); return x_1; } } lean_object* l_Lean_Server_FileWorker_leanpkgSetupSearchPath(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; lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_6 = lean_box(0); x_7 = lean_array_get_size(x_3); x_8 = lean_usize_of_nat(x_7); lean_dec(x_7); x_9 = 0; lean_inc(x_3); x_10 = x_3; x_11 = l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__1(x_8, x_9, x_10); x_12 = x_11; x_13 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__3; x_14 = l_Array_append___rarg(x_13, x_12); lean_dec(x_12); x_15 = lean_box(0); x_16 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__1; x_17 = l_Array_empty___closed__1; lean_inc(x_1); x_18 = lean_alloc_ctor(0, 5, 0); lean_ctor_set(x_18, 0, x_16); lean_ctor_set(x_18, 1, x_1); lean_ctor_set(x_18, 2, x_14); lean_ctor_set(x_18, 3, x_15); lean_ctor_set(x_18, 4, x_17); x_19 = lean_io_process_spawn(x_18, x_5); if (lean_obj_tag(x_19) == 0) { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_20 = lean_ctor_get(x_19, 0); lean_inc(x_20); x_21 = lean_ctor_get(x_19, 1); lean_inc(x_21); lean_dec(x_19); x_22 = l_Lean_instInhabitedParserDescr___closed__1; lean_inc(x_20); x_23 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_leanpkgSetupSearchPath_processStderr___boxed), 7, 6); lean_closure_set(x_23, 0, x_1); lean_closure_set(x_23, 1, x_2); lean_closure_set(x_23, 2, x_3); lean_closure_set(x_23, 3, x_4); lean_closure_set(x_23, 4, x_20); lean_closure_set(x_23, 5, x_22); x_24 = l_Task_Priority_dedicated; x_25 = lean_io_as_task(x_23, x_24, x_21); if (lean_obj_tag(x_25) == 0) { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; x_26 = lean_ctor_get(x_25, 0); lean_inc(x_26); x_27 = lean_ctor_get(x_25, 1); lean_inc(x_27); lean_dec(x_25); x_28 = lean_ctor_get(x_20, 1); lean_inc(x_28); x_29 = l_IO_FS_Handle_readToEnd_read___at_IO_Process_output___spec__1(x_28, x_22, x_27); lean_dec(x_28); if (lean_obj_tag(x_29) == 0) { lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; x_30 = lean_ctor_get(x_29, 0); lean_inc(x_30); x_31 = lean_ctor_get(x_29, 1); lean_inc(x_31); lean_dec(x_29); x_32 = l_String_trim(x_30); lean_dec(x_30); x_33 = lean_task_get_own(x_26); x_34 = l_IO_ofExcept___at_IO_Process_output___spec__3(x_33, x_31); if (lean_obj_tag(x_34) == 0) { lean_object* x_35; lean_object* x_36; lean_object* x_37; x_35 = lean_ctor_get(x_34, 0); lean_inc(x_35); x_36 = lean_ctor_get(x_34, 1); lean_inc(x_36); lean_dec(x_34); x_37 = lean_io_process_child_wait(x_16, x_20, x_36); lean_dec(x_20); if (lean_obj_tag(x_37) == 0) { uint8_t x_38; x_38 = !lean_is_exclusive(x_37); if (x_38 == 0) { lean_object* x_39; lean_object* x_40; uint32_t x_41; uint32_t x_42; uint8_t x_43; x_39 = lean_ctor_get(x_37, 0); x_40 = lean_ctor_get(x_37, 1); x_41 = 0; x_42 = lean_unbox_uint32(x_39); lean_dec(x_39); x_43 = x_42 == x_41; if (x_43 == 0) { 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; x_44 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__4; x_45 = lean_string_append(x_44, x_32); lean_dec(x_32); x_46 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; x_47 = lean_string_append(x_45, x_46); x_48 = lean_string_append(x_47, x_35); lean_dec(x_35); x_49 = lean_string_append(x_48, x_22); x_50 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_50, 0, x_49); lean_ctor_set_tag(x_37, 1); lean_ctor_set(x_37, 0, x_50); return x_37; } else { lean_object* x_51; x_51 = l_String_split___at_Lean_stringToMessageData___spec__1(x_32); if (lean_obj_tag(x_51) == 0) { lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; x_52 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6; x_53 = lean_string_append(x_52, x_32); lean_dec(x_32); x_54 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; x_55 = lean_string_append(x_53, x_54); x_56 = lean_string_append(x_55, x_35); lean_dec(x_35); x_57 = lean_string_append(x_56, x_22); x_58 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_58, 0, x_57); lean_ctor_set_tag(x_37, 1); lean_ctor_set(x_37, 0, x_58); return x_37; } else { lean_object* x_59; lean_object* x_60; uint8_t x_61; x_59 = lean_ctor_get(x_51, 0); lean_inc(x_59); x_60 = lean_ctor_get(x_51, 1); lean_inc(x_60); lean_dec(x_51); x_61 = lean_string_dec_eq(x_59, x_22); if (x_61 == 0) { if (lean_obj_tag(x_60) == 0) { 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_dec(x_59); x_62 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6; x_63 = lean_string_append(x_62, x_32); lean_dec(x_32); x_64 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; x_65 = lean_string_append(x_63, x_64); x_66 = lean_string_append(x_65, x_35); lean_dec(x_35); x_67 = lean_string_append(x_66, x_22); x_68 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_68, 0, x_67); lean_ctor_set_tag(x_37, 1); lean_ctor_set(x_37, 0, x_68); return x_37; } else { lean_object* x_69; x_69 = lean_ctor_get(x_60, 1); lean_inc(x_69); if (lean_obj_tag(x_69) == 0) { lean_object* x_70; lean_object* x_71; lean_free_object(x_37); lean_dec(x_35); lean_dec(x_32); x_70 = lean_ctor_get(x_60, 0); lean_inc(x_70); lean_dec(x_60); x_71 = l_Lean_getBuiltinSearchPath(x_40); if (lean_obj_tag(x_71) == 0) { lean_object* x_72; lean_object* x_73; lean_object* x_74; 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_addSearchPathFromEnv(x_72, x_73); if (lean_obj_tag(x_74) == 0) { 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; x_75 = lean_ctor_get(x_74, 0); lean_inc(x_75); x_76 = lean_ctor_get(x_74, 1); lean_inc(x_76); lean_dec(x_74); x_77 = l_Lean_parseSearchPath(x_59, x_75); lean_dec(x_59); x_78 = l_Lean_searchPathRef; x_79 = lean_st_ref_set(x_78, x_77, x_76); x_80 = lean_ctor_get(x_79, 1); lean_inc(x_80); lean_dec(x_79); x_81 = l_Lean_parseSearchPath(x_70, x_6); lean_dec(x_70); x_82 = l_List_mapM___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2(x_81, x_80); return x_82; } else { uint8_t x_83; lean_dec(x_70); lean_dec(x_59); x_83 = !lean_is_exclusive(x_74); if (x_83 == 0) { return x_74; } else { lean_object* x_84; lean_object* x_85; lean_object* x_86; x_84 = lean_ctor_get(x_74, 0); x_85 = lean_ctor_get(x_74, 1); lean_inc(x_85); lean_inc(x_84); lean_dec(x_74); x_86 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_86, 0, x_84); lean_ctor_set(x_86, 1, x_85); return x_86; } } } else { uint8_t x_87; lean_dec(x_70); lean_dec(x_59); x_87 = !lean_is_exclusive(x_71); if (x_87 == 0) { return x_71; } else { lean_object* x_88; lean_object* x_89; lean_object* x_90; x_88 = lean_ctor_get(x_71, 0); x_89 = lean_ctor_get(x_71, 1); lean_inc(x_89); lean_inc(x_88); lean_dec(x_71); x_90 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_90, 0, x_88); lean_ctor_set(x_90, 1, x_89); return x_90; } } } else { lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_dec(x_69); lean_dec(x_60); lean_dec(x_59); x_91 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6; x_92 = lean_string_append(x_91, x_32); lean_dec(x_32); x_93 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; x_94 = lean_string_append(x_92, x_93); x_95 = lean_string_append(x_94, x_35); lean_dec(x_35); x_96 = lean_string_append(x_95, x_22); x_97 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_97, 0, x_96); lean_ctor_set_tag(x_37, 1); lean_ctor_set(x_37, 0, x_97); return x_37; } } } else { lean_dec(x_59); if (lean_obj_tag(x_60) == 0) { lean_dec(x_35); lean_dec(x_32); lean_ctor_set(x_37, 0, x_6); return x_37; } else { lean_object* x_98; x_98 = lean_ctor_get(x_60, 1); lean_inc(x_98); if (lean_obj_tag(x_98) == 0) { lean_object* x_99; lean_object* x_100; lean_free_object(x_37); lean_dec(x_35); lean_dec(x_32); x_99 = lean_ctor_get(x_60, 0); lean_inc(x_99); lean_dec(x_60); x_100 = l_Lean_getBuiltinSearchPath(x_40); if (lean_obj_tag(x_100) == 0) { lean_object* x_101; lean_object* x_102; lean_object* x_103; x_101 = lean_ctor_get(x_100, 0); lean_inc(x_101); x_102 = lean_ctor_get(x_100, 1); lean_inc(x_102); lean_dec(x_100); x_103 = l_Lean_addSearchPathFromEnv(x_101, x_102); if (lean_obj_tag(x_103) == 0) { 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_104 = lean_ctor_get(x_103, 0); lean_inc(x_104); x_105 = lean_ctor_get(x_103, 1); lean_inc(x_105); lean_dec(x_103); x_106 = l_Lean_parseSearchPath(x_22, x_104); x_107 = l_Lean_searchPathRef; x_108 = lean_st_ref_set(x_107, x_106, x_105); x_109 = lean_ctor_get(x_108, 1); lean_inc(x_109); lean_dec(x_108); x_110 = l_Lean_parseSearchPath(x_99, x_6); lean_dec(x_99); x_111 = l_List_mapM___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2(x_110, x_109); return x_111; } else { uint8_t x_112; lean_dec(x_99); x_112 = !lean_is_exclusive(x_103); if (x_112 == 0) { return x_103; } else { lean_object* x_113; lean_object* x_114; lean_object* x_115; x_113 = lean_ctor_get(x_103, 0); x_114 = lean_ctor_get(x_103, 1); lean_inc(x_114); lean_inc(x_113); lean_dec(x_103); x_115 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_115, 0, x_113); lean_ctor_set(x_115, 1, x_114); return x_115; } } } else { uint8_t x_116; lean_dec(x_99); x_116 = !lean_is_exclusive(x_100); if (x_116 == 0) { return x_100; } else { lean_object* x_117; lean_object* x_118; lean_object* x_119; x_117 = lean_ctor_get(x_100, 0); x_118 = lean_ctor_get(x_100, 1); lean_inc(x_118); lean_inc(x_117); lean_dec(x_100); 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_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_dec(x_98); lean_dec(x_60); x_120 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6; x_121 = lean_string_append(x_120, x_32); lean_dec(x_32); x_122 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; x_123 = lean_string_append(x_121, x_122); x_124 = lean_string_append(x_123, x_35); lean_dec(x_35); x_125 = lean_string_append(x_124, x_22); x_126 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_126, 0, x_125); lean_ctor_set_tag(x_37, 1); lean_ctor_set(x_37, 0, x_126); return x_37; } } } } } } else { lean_object* x_127; lean_object* x_128; uint32_t x_129; uint32_t x_130; uint8_t x_131; x_127 = lean_ctor_get(x_37, 0); x_128 = lean_ctor_get(x_37, 1); lean_inc(x_128); lean_inc(x_127); lean_dec(x_37); x_129 = 0; x_130 = lean_unbox_uint32(x_127); lean_dec(x_127); x_131 = x_130 == x_129; if (x_131 == 0) { 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; x_132 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__4; x_133 = lean_string_append(x_132, x_32); lean_dec(x_32); x_134 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; x_135 = lean_string_append(x_133, x_134); x_136 = lean_string_append(x_135, x_35); lean_dec(x_35); x_137 = lean_string_append(x_136, x_22); x_138 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_138, 0, x_137); x_139 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_139, 0, x_138); lean_ctor_set(x_139, 1, x_128); return x_139; } else { lean_object* x_140; x_140 = l_String_split___at_Lean_stringToMessageData___spec__1(x_32); if (lean_obj_tag(x_140) == 0) { lean_object* x_141; 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_141 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6; x_142 = lean_string_append(x_141, x_32); lean_dec(x_32); x_143 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; x_144 = lean_string_append(x_142, x_143); x_145 = lean_string_append(x_144, x_35); lean_dec(x_35); x_146 = lean_string_append(x_145, x_22); x_147 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_147, 0, x_146); x_148 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_148, 0, x_147); lean_ctor_set(x_148, 1, x_128); return x_148; } else { lean_object* x_149; lean_object* x_150; uint8_t x_151; x_149 = lean_ctor_get(x_140, 0); lean_inc(x_149); x_150 = lean_ctor_get(x_140, 1); lean_inc(x_150); lean_dec(x_140); x_151 = lean_string_dec_eq(x_149, x_22); if (x_151 == 0) { if (lean_obj_tag(x_150) == 0) { lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_dec(x_149); x_152 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6; x_153 = lean_string_append(x_152, x_32); lean_dec(x_32); x_154 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; x_155 = lean_string_append(x_153, x_154); x_156 = lean_string_append(x_155, x_35); lean_dec(x_35); x_157 = lean_string_append(x_156, x_22); x_158 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_158, 0, x_157); x_159 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_159, 0, x_158); lean_ctor_set(x_159, 1, x_128); return x_159; } else { lean_object* x_160; x_160 = lean_ctor_get(x_150, 1); lean_inc(x_160); if (lean_obj_tag(x_160) == 0) { lean_object* x_161; lean_object* x_162; lean_dec(x_35); lean_dec(x_32); x_161 = lean_ctor_get(x_150, 0); lean_inc(x_161); lean_dec(x_150); x_162 = l_Lean_getBuiltinSearchPath(x_128); if (lean_obj_tag(x_162) == 0) { lean_object* x_163; lean_object* x_164; lean_object* x_165; x_163 = lean_ctor_get(x_162, 0); lean_inc(x_163); x_164 = lean_ctor_get(x_162, 1); lean_inc(x_164); lean_dec(x_162); x_165 = l_Lean_addSearchPathFromEnv(x_163, x_164); if (lean_obj_tag(x_165) == 0) { 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; lean_object* x_173; x_166 = lean_ctor_get(x_165, 0); lean_inc(x_166); x_167 = lean_ctor_get(x_165, 1); lean_inc(x_167); lean_dec(x_165); x_168 = l_Lean_parseSearchPath(x_149, x_166); lean_dec(x_149); x_169 = l_Lean_searchPathRef; x_170 = lean_st_ref_set(x_169, x_168, x_167); x_171 = lean_ctor_get(x_170, 1); lean_inc(x_171); lean_dec(x_170); x_172 = l_Lean_parseSearchPath(x_161, x_6); lean_dec(x_161); x_173 = l_List_mapM___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2(x_172, x_171); return x_173; } else { lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_dec(x_161); lean_dec(x_149); x_174 = lean_ctor_get(x_165, 0); lean_inc(x_174); x_175 = lean_ctor_get(x_165, 1); lean_inc(x_175); if (lean_is_exclusive(x_165)) { lean_ctor_release(x_165, 0); lean_ctor_release(x_165, 1); x_176 = x_165; } else { lean_dec_ref(x_165); x_176 = lean_box(0); } if (lean_is_scalar(x_176)) { x_177 = lean_alloc_ctor(1, 2, 0); } else { x_177 = x_176; } lean_ctor_set(x_177, 0, x_174); lean_ctor_set(x_177, 1, x_175); return x_177; } } else { lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_dec(x_161); lean_dec(x_149); x_178 = lean_ctor_get(x_162, 0); lean_inc(x_178); x_179 = lean_ctor_get(x_162, 1); lean_inc(x_179); if (lean_is_exclusive(x_162)) { lean_ctor_release(x_162, 0); lean_ctor_release(x_162, 1); x_180 = x_162; } else { lean_dec_ref(x_162); x_180 = lean_box(0); } if (lean_is_scalar(x_180)) { x_181 = lean_alloc_ctor(1, 2, 0); } else { x_181 = x_180; } lean_ctor_set(x_181, 0, x_178); lean_ctor_set(x_181, 1, x_179); return x_181; } } else { lean_object* x_182; lean_object* x_183; 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_dec(x_160); lean_dec(x_150); lean_dec(x_149); x_182 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6; x_183 = lean_string_append(x_182, x_32); lean_dec(x_32); x_184 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; x_185 = lean_string_append(x_183, x_184); x_186 = lean_string_append(x_185, x_35); lean_dec(x_35); x_187 = lean_string_append(x_186, x_22); x_188 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_188, 0, x_187); x_189 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_189, 0, x_188); lean_ctor_set(x_189, 1, x_128); return x_189; } } } else { lean_dec(x_149); if (lean_obj_tag(x_150) == 0) { lean_object* x_190; lean_dec(x_35); lean_dec(x_32); x_190 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_190, 0, x_6); lean_ctor_set(x_190, 1, x_128); return x_190; } else { lean_object* x_191; x_191 = lean_ctor_get(x_150, 1); lean_inc(x_191); if (lean_obj_tag(x_191) == 0) { lean_object* x_192; lean_object* x_193; lean_dec(x_35); lean_dec(x_32); x_192 = lean_ctor_get(x_150, 0); lean_inc(x_192); lean_dec(x_150); x_193 = l_Lean_getBuiltinSearchPath(x_128); if (lean_obj_tag(x_193) == 0) { lean_object* x_194; lean_object* x_195; lean_object* x_196; x_194 = lean_ctor_get(x_193, 0); lean_inc(x_194); x_195 = lean_ctor_get(x_193, 1); lean_inc(x_195); lean_dec(x_193); x_196 = l_Lean_addSearchPathFromEnv(x_194, x_195); if (lean_obj_tag(x_196) == 0) { 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; x_197 = lean_ctor_get(x_196, 0); lean_inc(x_197); x_198 = lean_ctor_get(x_196, 1); lean_inc(x_198); lean_dec(x_196); x_199 = l_Lean_parseSearchPath(x_22, x_197); x_200 = l_Lean_searchPathRef; x_201 = lean_st_ref_set(x_200, x_199, x_198); x_202 = lean_ctor_get(x_201, 1); lean_inc(x_202); lean_dec(x_201); x_203 = l_Lean_parseSearchPath(x_192, x_6); lean_dec(x_192); x_204 = l_List_mapM___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__2(x_203, x_202); return x_204; } else { lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_dec(x_192); x_205 = lean_ctor_get(x_196, 0); lean_inc(x_205); x_206 = lean_ctor_get(x_196, 1); lean_inc(x_206); if (lean_is_exclusive(x_196)) { lean_ctor_release(x_196, 0); lean_ctor_release(x_196, 1); x_207 = x_196; } else { lean_dec_ref(x_196); x_207 = lean_box(0); } if (lean_is_scalar(x_207)) { x_208 = lean_alloc_ctor(1, 2, 0); } else { x_208 = x_207; } lean_ctor_set(x_208, 0, x_205); lean_ctor_set(x_208, 1, x_206); return x_208; } } else { lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_dec(x_192); x_209 = lean_ctor_get(x_193, 0); lean_inc(x_209); x_210 = lean_ctor_get(x_193, 1); lean_inc(x_210); if (lean_is_exclusive(x_193)) { lean_ctor_release(x_193, 0); lean_ctor_release(x_193, 1); x_211 = x_193; } else { lean_dec_ref(x_193); x_211 = lean_box(0); } if (lean_is_scalar(x_211)) { x_212 = lean_alloc_ctor(1, 2, 0); } else { x_212 = x_211; } lean_ctor_set(x_212, 0, x_209); lean_ctor_set(x_212, 1, x_210); return x_212; } } else { 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_dec(x_191); lean_dec(x_150); x_213 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6; x_214 = lean_string_append(x_213, x_32); lean_dec(x_32); x_215 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5; x_216 = lean_string_append(x_214, x_215); x_217 = lean_string_append(x_216, x_35); lean_dec(x_35); x_218 = lean_string_append(x_217, x_22); x_219 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_219, 0, x_218); x_220 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_220, 0, x_219); lean_ctor_set(x_220, 1, x_128); return x_220; } } } } } } } else { uint8_t x_221; lean_dec(x_35); lean_dec(x_32); x_221 = !lean_is_exclusive(x_37); if (x_221 == 0) { return x_37; } else { lean_object* x_222; lean_object* x_223; lean_object* x_224; x_222 = lean_ctor_get(x_37, 0); x_223 = lean_ctor_get(x_37, 1); lean_inc(x_223); lean_inc(x_222); lean_dec(x_37); x_224 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_224, 0, x_222); lean_ctor_set(x_224, 1, x_223); return x_224; } } } else { uint8_t x_225; lean_dec(x_32); lean_dec(x_20); x_225 = !lean_is_exclusive(x_34); if (x_225 == 0) { return x_34; } else { lean_object* x_226; lean_object* x_227; lean_object* x_228; x_226 = lean_ctor_get(x_34, 0); x_227 = lean_ctor_get(x_34, 1); lean_inc(x_227); lean_inc(x_226); lean_dec(x_34); 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; } } } else { uint8_t x_229; lean_dec(x_26); lean_dec(x_20); x_229 = !lean_is_exclusive(x_29); if (x_229 == 0) { return x_29; } else { lean_object* x_230; lean_object* x_231; lean_object* x_232; x_230 = lean_ctor_get(x_29, 0); x_231 = lean_ctor_get(x_29, 1); lean_inc(x_231); lean_inc(x_230); lean_dec(x_29); x_232 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_232, 0, x_230); lean_ctor_set(x_232, 1, x_231); return x_232; } } } else { uint8_t x_233; lean_dec(x_20); x_233 = !lean_is_exclusive(x_25); if (x_233 == 0) { return x_25; } else { lean_object* x_234; lean_object* x_235; lean_object* x_236; x_234 = lean_ctor_get(x_25, 0); x_235 = lean_ctor_get(x_25, 1); lean_inc(x_235); lean_inc(x_234); lean_dec(x_25); x_236 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_236, 0, x_234); lean_ctor_set(x_236, 1, x_235); return x_236; } } } else { uint8_t x_237; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_237 = !lean_is_exclusive(x_19); if (x_237 == 0) { return x_19; } else { lean_object* x_238; lean_object* x_239; lean_object* x_240; x_238 = lean_ctor_get(x_19, 0); x_239 = lean_ctor_get(x_19, 1); lean_inc(x_239); lean_inc(x_238); lean_dec(x_19); x_240 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_240, 0, x_238); lean_ctor_set(x_240, 1, x_239); return x_240; } } } } lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_leanpkgSetupSearchPath___spec__1___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_FileWorker_leanpkgSetupSearchPath___spec__1(x_4, x_5, x_3); return x_6; } } lean_object* l_Lean_Server_FileWorker_compileHeader_match__1___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_dec(x_2); x_4 = lean_apply_1(x_3, x_1); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_dec(x_3); x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); lean_dec(x_1); x_6 = lean_apply_1(x_2, x_5); return x_6; } } } lean_object* l_Lean_Server_FileWorker_compileHeader_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_compileHeader_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_compileHeader_match__2___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_2(x_2, x_3, x_4); return x_5; } } lean_object* l_Lean_Server_FileWorker_compileHeader_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_compileHeader_match__2___rarg), 2, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_compileHeader_match__3___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; x_3 = lean_ctor_get(x_1, 1); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 0); lean_inc(x_4); lean_dec(x_1); x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); x_6 = lean_ctor_get(x_3, 1); lean_inc(x_6); lean_dec(x_3); x_7 = lean_apply_3(x_2, x_4, x_5, x_6); return x_7; } } lean_object* l_Lean_Server_FileWorker_compileHeader_match__3(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_compileHeader_match__3___rarg), 2, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_compileHeader___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: { uint8_t x_7; x_7 = !lean_is_exclusive(x_5); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; x_8 = lean_ctor_get(x_5, 0); x_9 = lean_ctor_get(x_5, 1); lean_inc(x_1); lean_inc(x_9); lean_inc(x_8); x_10 = l_Lean_Elab_Command_mkState(x_8, x_9, x_1); x_11 = l_Lean_instInhabitedParserDescr___closed__1; x_12 = lean_box(0); x_13 = l_Array_empty___closed__1; lean_inc_n(x_1, 3); x_14 = lean_alloc_ctor(0, 7, 0); lean_ctor_set(x_14, 0, x_11); lean_ctor_set(x_14, 1, x_1); lean_ctor_set(x_14, 2, x_12); lean_ctor_set(x_14, 3, x_1); lean_ctor_set(x_14, 4, x_1); lean_ctor_set(x_14, 5, x_13); lean_ctor_set(x_14, 6, x_13); lean_inc(x_1); x_15 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_1); x_16 = l_Lean_maxRecDepth; x_17 = l_Lean_Option_get___at_Lean_initFn____x40_Lean_Util_PPExt___hyg_251____spec__1(x_1, x_16); lean_dec(x_1); x_18 = !lean_is_exclusive(x_10); if (x_18 == 0) { lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; x_19 = lean_ctor_get(x_10, 7); x_20 = lean_ctor_get(x_10, 5); lean_dec(x_20); x_21 = lean_ctor_get(x_10, 4); lean_dec(x_21); x_22 = lean_ctor_get(x_10, 3); lean_dec(x_22); x_23 = lean_ctor_get(x_10, 2); lean_dec(x_23); x_24 = lean_ctor_get(x_10, 1); lean_dec(x_24); x_25 = lean_ctor_get(x_10, 0); lean_dec(x_25); x_26 = !lean_is_exclusive(x_19); if (x_26 == 0) { uint8_t x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; x_27 = 1; lean_ctor_set_uint8(x_19, sizeof(void*)*2, x_27); x_28 = l_Lean_Unhygienic_run___rarg___closed__2; x_29 = lean_unsigned_to_nat(1u); lean_ctor_set(x_10, 5, x_29); lean_ctor_set(x_10, 4, x_17); lean_ctor_set(x_10, 3, x_28); lean_ctor_set(x_10, 2, x_15); lean_ctor_set(x_10, 1, x_9); lean_ctor_set(x_10, 0, x_8); x_30 = lean_unsigned_to_nat(0u); x_31 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_31, 0, x_30); lean_ctor_set(x_31, 1, x_2); lean_ctor_set(x_31, 2, x_3); lean_ctor_set(x_31, 3, x_10); lean_ctor_set(x_5, 1, x_4); lean_ctor_set(x_5, 0, x_31); x_32 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_32, 0, x_5); lean_ctor_set(x_32, 1, x_6); return x_32; } else { lean_object* x_33; lean_object* x_34; uint8_t x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; x_33 = lean_ctor_get(x_19, 0); x_34 = lean_ctor_get(x_19, 1); lean_inc(x_34); lean_inc(x_33); lean_dec(x_19); x_35 = 1; x_36 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_36, 0, x_33); lean_ctor_set(x_36, 1, x_34); lean_ctor_set_uint8(x_36, sizeof(void*)*2, x_35); x_37 = l_Lean_Unhygienic_run___rarg___closed__2; x_38 = lean_unsigned_to_nat(1u); lean_ctor_set(x_10, 7, x_36); lean_ctor_set(x_10, 5, x_38); lean_ctor_set(x_10, 4, x_17); lean_ctor_set(x_10, 3, x_37); lean_ctor_set(x_10, 2, x_15); lean_ctor_set(x_10, 1, x_9); lean_ctor_set(x_10, 0, x_8); x_39 = lean_unsigned_to_nat(0u); x_40 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_40, 0, x_39); lean_ctor_set(x_40, 1, x_2); lean_ctor_set(x_40, 2, x_3); lean_ctor_set(x_40, 3, x_10); lean_ctor_set(x_5, 1, x_4); lean_ctor_set(x_5, 0, x_40); x_41 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_41, 0, x_5); lean_ctor_set(x_41, 1, x_6); return x_41; } } else { lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; uint8_t x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; x_42 = lean_ctor_get(x_10, 7); x_43 = lean_ctor_get(x_10, 6); x_44 = lean_ctor_get(x_10, 8); lean_inc(x_44); lean_inc(x_42); lean_inc(x_43); lean_dec(x_10); x_45 = lean_ctor_get(x_42, 0); lean_inc(x_45); x_46 = lean_ctor_get(x_42, 1); lean_inc(x_46); if (lean_is_exclusive(x_42)) { lean_ctor_release(x_42, 0); lean_ctor_release(x_42, 1); x_47 = x_42; } else { lean_dec_ref(x_42); x_47 = lean_box(0); } x_48 = 1; if (lean_is_scalar(x_47)) { x_49 = lean_alloc_ctor(0, 2, 1); } else { x_49 = x_47; } lean_ctor_set(x_49, 0, x_45); lean_ctor_set(x_49, 1, x_46); lean_ctor_set_uint8(x_49, sizeof(void*)*2, x_48); x_50 = l_Lean_Unhygienic_run___rarg___closed__2; x_51 = lean_unsigned_to_nat(1u); x_52 = lean_alloc_ctor(0, 9, 0); lean_ctor_set(x_52, 0, x_8); lean_ctor_set(x_52, 1, x_9); lean_ctor_set(x_52, 2, x_15); lean_ctor_set(x_52, 3, x_50); lean_ctor_set(x_52, 4, x_17); lean_ctor_set(x_52, 5, x_51); lean_ctor_set(x_52, 6, x_43); lean_ctor_set(x_52, 7, x_49); lean_ctor_set(x_52, 8, x_44); x_53 = lean_unsigned_to_nat(0u); x_54 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_54, 0, x_53); lean_ctor_set(x_54, 1, x_2); lean_ctor_set(x_54, 2, x_3); lean_ctor_set(x_54, 3, x_52); lean_ctor_set(x_5, 1, x_4); lean_ctor_set(x_5, 0, x_54); x_55 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_55, 0, x_5); lean_ctor_set(x_55, 1, x_6); return x_55; } } else { lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; 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; uint8_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; lean_object* x_80; lean_object* x_81; x_56 = lean_ctor_get(x_5, 0); x_57 = lean_ctor_get(x_5, 1); lean_inc(x_57); lean_inc(x_56); lean_dec(x_5); lean_inc(x_1); lean_inc(x_57); lean_inc(x_56); x_58 = l_Lean_Elab_Command_mkState(x_56, x_57, x_1); x_59 = l_Lean_instInhabitedParserDescr___closed__1; x_60 = lean_box(0); x_61 = l_Array_empty___closed__1; lean_inc_n(x_1, 3); x_62 = lean_alloc_ctor(0, 7, 0); lean_ctor_set(x_62, 0, x_59); lean_ctor_set(x_62, 1, x_1); lean_ctor_set(x_62, 2, x_60); lean_ctor_set(x_62, 3, x_1); lean_ctor_set(x_62, 4, x_1); lean_ctor_set(x_62, 5, x_61); lean_ctor_set(x_62, 6, x_61); lean_inc(x_1); x_63 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_63, 0, x_62); lean_ctor_set(x_63, 1, x_1); x_64 = l_Lean_maxRecDepth; x_65 = l_Lean_Option_get___at_Lean_initFn____x40_Lean_Util_PPExt___hyg_251____spec__1(x_1, x_64); lean_dec(x_1); x_66 = lean_ctor_get(x_58, 7); lean_inc(x_66); x_67 = lean_ctor_get(x_58, 6); lean_inc(x_67); x_68 = lean_ctor_get(x_58, 8); lean_inc(x_68); if (lean_is_exclusive(x_58)) { lean_ctor_release(x_58, 0); lean_ctor_release(x_58, 1); lean_ctor_release(x_58, 2); lean_ctor_release(x_58, 3); lean_ctor_release(x_58, 4); lean_ctor_release(x_58, 5); lean_ctor_release(x_58, 6); lean_ctor_release(x_58, 7); lean_ctor_release(x_58, 8); x_69 = x_58; } else { lean_dec_ref(x_58); x_69 = lean_box(0); } x_70 = lean_ctor_get(x_66, 0); lean_inc(x_70); x_71 = lean_ctor_get(x_66, 1); lean_inc(x_71); if (lean_is_exclusive(x_66)) { lean_ctor_release(x_66, 0); lean_ctor_release(x_66, 1); x_72 = x_66; } else { lean_dec_ref(x_66); x_72 = lean_box(0); } x_73 = 1; if (lean_is_scalar(x_72)) { x_74 = lean_alloc_ctor(0, 2, 1); } else { x_74 = x_72; } lean_ctor_set(x_74, 0, x_70); lean_ctor_set(x_74, 1, x_71); lean_ctor_set_uint8(x_74, sizeof(void*)*2, x_73); x_75 = l_Lean_Unhygienic_run___rarg___closed__2; x_76 = lean_unsigned_to_nat(1u); if (lean_is_scalar(x_69)) { x_77 = lean_alloc_ctor(0, 9, 0); } else { x_77 = x_69; } lean_ctor_set(x_77, 0, x_56); lean_ctor_set(x_77, 1, x_57); lean_ctor_set(x_77, 2, x_63); lean_ctor_set(x_77, 3, x_75); lean_ctor_set(x_77, 4, x_65); lean_ctor_set(x_77, 5, x_76); lean_ctor_set(x_77, 6, x_67); lean_ctor_set(x_77, 7, x_74); lean_ctor_set(x_77, 8, x_68); x_78 = lean_unsigned_to_nat(0u); x_79 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_79, 0, x_78); lean_ctor_set(x_79, 1, x_2); lean_ctor_set(x_79, 2, x_3); lean_ctor_set(x_79, 3, x_77); x_80 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_80, 0, x_79); lean_ctor_set(x_80, 1, x_4); x_81 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_81, 0, x_80); lean_ctor_set(x_81, 1, x_6); return x_81; } } } lean_object* l_Lean_Server_FileWorker_compileHeader___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) { _start: { uint32_t x_8; lean_object* x_9; x_8 = 0; x_9 = l_Lean_Elab_processHeader(x_1, x_2, x_3, x_4, x_8, x_7); if (lean_obj_tag(x_9) == 0) { uint8_t x_10; x_10 = !lean_is_exclusive(x_9); if (x_10 == 0) { lean_object* x_11; lean_object* x_12; x_11 = lean_ctor_get(x_9, 0); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_5); lean_ctor_set(x_9, 0, x_12); return x_9; } else { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_13 = lean_ctor_get(x_9, 0); x_14 = lean_ctor_get(x_9, 1); lean_inc(x_14); lean_inc(x_13); lean_dec(x_9); x_15 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_15, 0, x_13); lean_ctor_set(x_15, 1, x_5); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_15); lean_ctor_set(x_16, 1, x_14); return x_16; } } else { uint8_t x_17; lean_dec(x_5); x_17 = !lean_is_exclusive(x_9); if (x_17 == 0) { return x_9; } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; x_18 = lean_ctor_get(x_9, 0); x_19 = lean_ctor_get(x_9, 1); lean_inc(x_19); lean_inc(x_18); lean_dec(x_9); x_20 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_20, 0, x_18); lean_ctor_set(x_20, 1, x_19); return x_20; } } } } lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { lean_object* x_12; lean_object* x_13; lean_object* x_42; x_42 = lean_io_file_exists(x_6, x_11); if (lean_obj_tag(x_42) == 0) { lean_object* x_43; uint8_t x_44; x_43 = lean_ctor_get(x_42, 0); lean_inc(x_43); x_44 = lean_unbox(x_43); lean_dec(x_43); if (x_44 == 0) { lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_dec(x_6); x_45 = lean_ctor_get(x_42, 1); lean_inc(x_45); lean_dec(x_42); x_46 = lean_box(0); lean_inc(x_9); lean_inc(x_1); x_47 = l_Lean_Server_FileWorker_compileHeader___lambda__2(x_2, x_1, x_7, x_8, x_9, x_46, x_45); if (lean_obj_tag(x_47) == 0) { lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_dec(x_9); lean_dec(x_5); lean_dec(x_4); x_48 = lean_ctor_get(x_47, 0); lean_inc(x_48); x_49 = lean_ctor_get(x_47, 1); lean_inc(x_49); lean_dec(x_47); x_50 = lean_ctor_get(x_48, 1); lean_inc(x_50); x_51 = lean_ctor_get(x_48, 0); lean_inc(x_51); lean_dec(x_48); x_52 = l_Lean_Server_FileWorker_compileHeader___lambda__1(x_1, x_2, x_3, x_50, x_51, x_49); return x_52; } else { lean_object* x_53; lean_object* x_54; x_53 = lean_ctor_get(x_47, 0); lean_inc(x_53); x_54 = lean_ctor_get(x_47, 1); lean_inc(x_54); lean_dec(x_47); x_12 = x_53; x_13 = x_54; goto block_41; } } 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; x_55 = lean_ctor_get(x_42, 1); lean_inc(x_55); lean_dec(x_42); x_56 = l_Lean_Elab_headerToImports(x_2); x_57 = l_List_redLength___rarg(x_56); x_58 = lean_mk_empty_array_with_capacity(x_57); lean_dec(x_57); x_59 = l_List_toArrayAux___rarg(x_56, x_58); lean_inc(x_5); lean_inc(x_4); x_60 = l_Lean_Server_FileWorker_leanpkgSetupSearchPath(x_6, x_4, x_59, x_5, x_55); if (lean_obj_tag(x_60) == 0) { lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; x_61 = lean_ctor_get(x_60, 0); lean_inc(x_61); x_62 = lean_ctor_get(x_60, 1); lean_inc(x_62); lean_dec(x_60); lean_inc(x_9); x_63 = l_List_append___rarg(x_9, x_61); x_64 = lean_box(0); lean_inc(x_1); x_65 = l_Lean_Server_FileWorker_compileHeader___lambda__2(x_2, x_1, x_7, x_8, x_63, x_64, x_62); if (lean_obj_tag(x_65) == 0) { lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_dec(x_9); lean_dec(x_5); lean_dec(x_4); x_66 = lean_ctor_get(x_65, 0); lean_inc(x_66); x_67 = lean_ctor_get(x_65, 1); lean_inc(x_67); lean_dec(x_65); x_68 = lean_ctor_get(x_66, 1); lean_inc(x_68); x_69 = lean_ctor_get(x_66, 0); lean_inc(x_69); lean_dec(x_66); x_70 = l_Lean_Server_FileWorker_compileHeader___lambda__1(x_1, x_2, x_3, x_68, x_69, x_67); return x_70; } else { lean_object* x_71; lean_object* x_72; x_71 = lean_ctor_get(x_65, 0); lean_inc(x_71); x_72 = lean_ctor_get(x_65, 1); lean_inc(x_72); lean_dec(x_65); x_12 = x_71; x_13 = x_72; goto block_41; } } else { lean_object* x_73; lean_object* x_74; lean_dec(x_7); x_73 = lean_ctor_get(x_60, 0); lean_inc(x_73); x_74 = lean_ctor_get(x_60, 1); lean_inc(x_74); lean_dec(x_60); x_12 = x_73; x_13 = x_74; goto block_41; } } } else { lean_object* x_75; lean_object* x_76; lean_dec(x_7); lean_dec(x_6); x_75 = lean_ctor_get(x_42, 0); lean_inc(x_75); x_76 = lean_ctor_get(x_42, 1); lean_inc(x_76); lean_dec(x_42); x_12 = x_75; x_13 = x_76; goto block_41; } block_41: { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_14 = lean_box(0); x_15 = lean_io_error_to_string(x_12); x_16 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_16, 0, x_15); x_17 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_17, 0, x_16); x_18 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__4; x_19 = l_Lean_instInhabitedPosition___closed__1; x_20 = 2; x_21 = l_Lean_instInhabitedParserDescr___closed__1; x_22 = lean_alloc_ctor(0, 5, 1); lean_ctor_set(x_22, 0, x_18); lean_ctor_set(x_22, 1, x_19); lean_ctor_set(x_22, 2, x_14); lean_ctor_set(x_22, 3, x_21); lean_ctor_set(x_22, 4, x_17); lean_ctor_set_uint8(x_22, sizeof(void*)*5, x_20); x_23 = l_Lean_MessageLog_empty; x_24 = l_Std_PersistentArray_push___rarg(x_23, x_22); lean_inc(x_24); x_25 = l_Lean_Server_publishMessages(x_4, x_24, x_5, x_13); if (lean_obj_tag(x_25) == 0) { lean_object* x_26; uint32_t x_27; lean_object* x_28; x_26 = lean_ctor_get(x_25, 1); lean_inc(x_26); lean_dec(x_25); x_27 = 0; x_28 = lean_mk_empty_environment(x_27, x_26); if (lean_obj_tag(x_28) == 0) { lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; x_29 = lean_ctor_get(x_28, 0); lean_inc(x_29); x_30 = lean_ctor_get(x_28, 1); lean_inc(x_30); lean_dec(x_28); x_31 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_31, 0, x_29); lean_ctor_set(x_31, 1, x_24); x_32 = l_Lean_Server_FileWorker_compileHeader___lambda__1(x_1, x_2, x_3, x_9, x_31, x_30); return x_32; } else { uint8_t x_33; lean_dec(x_24); lean_dec(x_9); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_33 = !lean_is_exclusive(x_28); if (x_33 == 0) { return x_28; } else { lean_object* x_34; lean_object* x_35; lean_object* x_36; x_34 = lean_ctor_get(x_28, 0); x_35 = lean_ctor_get(x_28, 1); lean_inc(x_35); lean_inc(x_34); lean_dec(x_28); 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; } } } else { uint8_t x_37; lean_dec(x_24); lean_dec(x_9); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_37 = !lean_is_exclusive(x_25); if (x_37 == 0) { return x_25; } else { lean_object* x_38; lean_object* x_39; lean_object* x_40; x_38 = lean_ctor_get(x_25, 0); x_39 = lean_ctor_get(x_25, 1); lean_inc(x_39); lean_inc(x_38); lean_dec(x_25); 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; } } } } } static lean_object* _init_l_Lean_Server_FileWorker_compileHeader___lambda__4___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("/../lib/lean/src"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_compileHeader___lambda__4___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("LEAN_SRC_PATH"); return x_1; } } lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { lean_object* x_10; x_10 = l_IO_appDir___at_Lean_getBuiltinSearchPath___spec__1(x_9); if (lean_obj_tag(x_10) == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); x_12 = lean_ctor_get(x_10, 1); lean_inc(x_12); lean_dec(x_10); x_13 = l_Lean_instInhabitedParserDescr___closed__1; x_14 = lean_string_append(x_13, x_11); lean_dec(x_11); x_15 = l_Lean_Server_FileWorker_compileHeader___lambda__4___closed__1; x_16 = lean_string_append(x_14, x_15); lean_inc(x_1); x_17 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_1); x_18 = l_Lean_Server_FileWorker_compileHeader___lambda__4___closed__2; x_19 = lean_io_getenv(x_18, x_12); if (lean_obj_tag(x_19) == 0) { lean_object* x_20; x_20 = lean_ctor_get(x_19, 0); lean_inc(x_20); if (lean_obj_tag(x_20) == 0) { lean_object* x_21; lean_object* x_22; lean_object* x_23; x_21 = lean_ctor_get(x_19, 1); lean_inc(x_21); lean_dec(x_19); x_22 = lean_box(0); x_23 = l_Lean_Server_FileWorker_compileHeader___lambda__3(x_1, x_2, x_3, x_4, x_5, x_8, x_6, x_7, x_17, x_22, x_21); return x_23; } else { lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; x_24 = lean_ctor_get(x_19, 1); lean_inc(x_24); lean_dec(x_19); x_25 = lean_ctor_get(x_20, 0); lean_inc(x_25); lean_dec(x_20); lean_inc(x_1); x_26 = l_Lean_parseSearchPath(x_25, x_1); lean_dec(x_25); x_27 = l_List_append___rarg(x_17, x_26); x_28 = lean_box(0); x_29 = l_Lean_Server_FileWorker_compileHeader___lambda__3(x_1, x_2, x_3, x_4, x_5, x_8, x_6, x_7, x_27, x_28, x_24); return x_29; } } else { uint8_t x_30; lean_dec(x_17); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_30 = !lean_is_exclusive(x_19); if (x_30 == 0) { return x_19; } else { lean_object* x_31; lean_object* x_32; lean_object* x_33; x_31 = lean_ctor_get(x_19, 0); x_32 = lean_ctor_get(x_19, 1); lean_inc(x_32); lean_inc(x_31); lean_dec(x_19); x_33 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_33, 0, x_31); lean_ctor_set(x_33, 1, x_32); return x_33; } } } else { uint8_t x_34; lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_34 = !lean_is_exclusive(x_10); if (x_34 == 0) { return x_10; } else { lean_object* x_35; lean_object* x_36; lean_object* x_37; x_35 = lean_ctor_get(x_10, 0); x_36 = lean_ctor_get(x_10, 1); lean_inc(x_36); lean_inc(x_35); lean_dec(x_10); x_37 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_37, 0, x_35); lean_ctor_set(x_37, 1, x_36); return x_37; } } } } static lean_object* _init_l_Lean_Server_FileWorker_compileHeader___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("LEAN_SYSROOT"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_compileHeader___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("/leanpkg"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_compileHeader___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("/bin/leanpkg"); return x_1; } } lean_object* l_Lean_Server_FileWorker_compileHeader(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_box(0); x_5 = lean_ctor_get(x_1, 2); lean_inc(x_5); x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); lean_dec(x_5); x_7 = l_Lean_Elab_parseImports___closed__1; x_8 = l_Lean_Parser_mkInputContext(x_6, x_7); lean_inc(x_8); x_9 = l_Lean_Parser_parseHeader(x_8, x_3); if (lean_obj_tag(x_9) == 0) { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; x_10 = lean_ctor_get(x_9, 0); lean_inc(x_10); x_11 = lean_ctor_get(x_10, 1); lean_inc(x_11); x_12 = lean_ctor_get(x_9, 1); lean_inc(x_12); lean_dec(x_9); x_13 = lean_ctor_get(x_10, 0); lean_inc(x_13); lean_dec(x_10); x_14 = lean_ctor_get(x_11, 0); lean_inc(x_14); x_15 = lean_ctor_get(x_11, 1); lean_inc(x_15); lean_dec(x_11); x_16 = l_Lean_Server_FileWorker_compileHeader___closed__1; x_17 = lean_io_getenv(x_16, x_12); if (lean_obj_tag(x_17) == 0) { lean_object* x_18; x_18 = lean_ctor_get(x_17, 0); lean_inc(x_18); if (lean_obj_tag(x_18) == 0) { lean_object* x_19; lean_object* x_20; x_19 = lean_ctor_get(x_17, 1); lean_inc(x_19); lean_dec(x_17); x_20 = l_IO_appDir___at_Lean_getBuiltinSearchPath___spec__1(x_19); if (lean_obj_tag(x_20) == 0) { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; x_21 = lean_ctor_get(x_20, 0); lean_inc(x_21); x_22 = lean_ctor_get(x_20, 1); lean_inc(x_22); lean_dec(x_20); x_23 = l_Lean_instInhabitedParserDescr___closed__1; x_24 = lean_string_append(x_23, x_21); lean_dec(x_21); x_25 = l_Lean_Server_FileWorker_compileHeader___closed__2; x_26 = lean_string_append(x_24, x_25); x_27 = l_System_FilePath_exeSuffix; x_28 = lean_string_append(x_26, x_27); x_29 = lean_string_append(x_28, x_23); x_30 = l_Lean_Server_FileWorker_compileHeader___lambda__4(x_4, x_13, x_14, x_1, x_2, x_15, x_8, x_29, x_22); lean_dec(x_8); return x_30; } else { uint8_t x_31; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_8); lean_dec(x_2); lean_dec(x_1); x_31 = !lean_is_exclusive(x_20); if (x_31 == 0) { return x_20; } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; x_32 = lean_ctor_get(x_20, 0); x_33 = lean_ctor_get(x_20, 1); lean_inc(x_33); lean_inc(x_32); lean_dec(x_20); x_34 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_34, 0, x_32); lean_ctor_set(x_34, 1, x_33); return x_34; } } } else { lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; x_35 = lean_ctor_get(x_17, 1); lean_inc(x_35); lean_dec(x_17); x_36 = lean_ctor_get(x_18, 0); lean_inc(x_36); lean_dec(x_18); x_37 = l_Lean_instInhabitedParserDescr___closed__1; x_38 = lean_string_append(x_37, x_36); lean_dec(x_36); x_39 = l_Lean_Server_FileWorker_compileHeader___closed__3; x_40 = lean_string_append(x_38, x_39); x_41 = l_System_FilePath_exeSuffix; x_42 = lean_string_append(x_40, x_41); x_43 = lean_string_append(x_42, x_37); x_44 = l_Lean_Server_FileWorker_compileHeader___lambda__4(x_4, x_13, x_14, x_1, x_2, x_15, x_8, x_43, x_35); lean_dec(x_8); return x_44; } } else { uint8_t x_45; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_8); lean_dec(x_2); lean_dec(x_1); x_45 = !lean_is_exclusive(x_17); if (x_45 == 0) { return x_17; } else { lean_object* x_46; lean_object* x_47; lean_object* x_48; x_46 = lean_ctor_get(x_17, 0); x_47 = lean_ctor_get(x_17, 1); lean_inc(x_47); lean_inc(x_46); lean_dec(x_17); x_48 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_48, 0, x_46); lean_ctor_set(x_48, 1, x_47); return x_48; } } } else { uint8_t x_49; lean_dec(x_8); lean_dec(x_2); lean_dec(x_1); x_49 = !lean_is_exclusive(x_9); if (x_49 == 0) { return x_9; } else { lean_object* x_50; lean_object* x_51; lean_object* x_52; x_50 = lean_ctor_get(x_9, 0); x_51 = lean_ctor_get(x_9, 1); lean_inc(x_51); lean_inc(x_50); lean_dec(x_9); 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; } } } } lean_object* l_Lean_Server_FileWorker_compileHeader___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: { lean_object* x_8; x_8 = l_Lean_Server_FileWorker_compileHeader___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_6); lean_dec(x_4); lean_dec(x_1); return x_8; } } lean_object* l_Lean_Server_FileWorker_compileHeader___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, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { lean_object* x_12; x_12 = l_Lean_Server_FileWorker_compileHeader___lambda__3(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_10); lean_dec(x_8); return x_12; } } lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { lean_object* x_10; x_10 = l_Lean_Server_FileWorker_compileHeader___lambda__4(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); lean_dec(x_7); return x_10; } } lean_object* l_Lean_Server_FileWorker_initializeWorker_match__1___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_2(x_2, x_3, x_4); return x_5; } } lean_object* l_Lean_Server_FileWorker_initializeWorker_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_initializeWorker_match__1___rarg), 2, 0); return x_2; } } lean_object* l_IO_mkRef___at_Lean_Server_FileWorker_initializeWorker___spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; uint8_t x_4; x_3 = lean_st_mk_ref(x_1, x_2); x_4 = !lean_is_exclusive(x_3); if (x_4 == 0) { return x_3; } else { lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_ctor_get(x_3, 0); x_6 = lean_ctor_get(x_3, 1); lean_inc(x_6); lean_inc(x_5); lean_dec(x_3); x_7 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_7, 0, x_5); lean_ctor_set(x_7, 1, x_6); return x_7; } } } lean_object* l_IO_mkRef___at_Lean_Server_FileWorker_initializeWorker___spec__2(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; uint8_t x_4; x_3 = lean_st_mk_ref(x_1, x_2); x_4 = !lean_is_exclusive(x_3); if (x_4 == 0) { return x_3; } else { lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_ctor_get(x_3, 0); x_6 = lean_ctor_get(x_3, 1); lean_inc(x_6); lean_inc(x_5); lean_dec(x_3); x_7 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_7, 0, x_5); lean_ctor_set(x_7, 1, x_6); return x_7; } } } lean_object* l_Lean_Server_FileWorker_initializeWorker(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; lean_inc(x_3); lean_inc(x_1); x_6 = l_Lean_Server_FileWorker_compileHeader(x_1, x_3, x_5); 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; uint8_t x_14; lean_object* x_15; x_7 = lean_ctor_get(x_6, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_6, 1); lean_inc(x_8); lean_dec(x_6); x_9 = lean_ctor_get(x_7, 0); lean_inc(x_9); x_10 = lean_ctor_get(x_7, 1); lean_inc(x_10); lean_dec(x_7); x_11 = l_Lean_Server_FileWorker_CancelToken_new(x_8); x_12 = lean_ctor_get(x_11, 0); lean_inc(x_12); x_13 = lean_ctor_get(x_11, 1); lean_inc(x_13); lean_dec(x_11); x_14 = 1; lean_inc(x_3); lean_inc(x_12); lean_inc(x_9); lean_inc(x_1); x_15 = l_Lean_Server_FileWorker_unfoldCmdSnaps(x_1, x_9, x_12, x_3, x_14, x_13); if (lean_obj_tag(x_15) == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); x_17 = lean_ctor_get(x_15, 1); lean_inc(x_17); lean_dec(x_15); x_18 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_18, 0, x_1); lean_ctor_set(x_18, 1, x_9); lean_ctor_set(x_18, 2, x_16); lean_ctor_set(x_18, 3, x_12); x_19 = l_IO_mkRef___at_Lean_Server_FileWorker_initializeWorker___spec__1(x_18, x_17); x_20 = lean_ctor_get(x_19, 0); lean_inc(x_20); x_21 = lean_ctor_get(x_19, 1); lean_inc(x_21); lean_dec(x_19); x_22 = lean_box(0); x_23 = l_IO_mkRef___at_Lean_Server_FileWorker_initializeWorker___spec__2(x_22, x_21); x_24 = !lean_is_exclusive(x_23); if (x_24 == 0) { lean_object* x_25; lean_object* x_26; x_25 = lean_ctor_get(x_23, 0); x_26 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_26, 0, x_2); lean_ctor_set(x_26, 1, x_3); lean_ctor_set(x_26, 2, x_4); lean_ctor_set(x_26, 3, x_10); lean_ctor_set(x_26, 4, x_20); lean_ctor_set(x_26, 5, x_25); lean_ctor_set(x_23, 0, x_26); return x_23; } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; x_27 = lean_ctor_get(x_23, 0); x_28 = lean_ctor_get(x_23, 1); lean_inc(x_28); lean_inc(x_27); lean_dec(x_23); x_29 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_29, 0, x_2); lean_ctor_set(x_29, 1, x_3); lean_ctor_set(x_29, 2, x_4); lean_ctor_set(x_29, 3, x_10); lean_ctor_set(x_29, 4, x_20); lean_ctor_set(x_29, 5, x_27); x_30 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_30, 0, x_29); lean_ctor_set(x_30, 1, x_28); return x_30; } } else { uint8_t x_31; lean_dec(x_12); lean_dec(x_10); lean_dec(x_9); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_31 = !lean_is_exclusive(x_15); if (x_31 == 0) { return x_15; } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; x_32 = lean_ctor_get(x_15, 0); x_33 = lean_ctor_get(x_15, 1); lean_inc(x_33); lean_inc(x_32); lean_dec(x_15); x_34 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_34, 0, x_32); lean_ctor_set(x_34, 1, x_33); return x_34; } } } else { uint8_t x_35; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_35 = !lean_is_exclusive(x_6); if (x_35 == 0) { return x_6; } else { lean_object* x_36; lean_object* x_37; lean_object* x_38; x_36 = lean_ctor_get(x_6, 0); x_37 = lean_ctor_get(x_6, 1); lean_inc(x_37); lean_inc(x_36); lean_dec(x_6); x_38 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_38, 0, x_36); lean_ctor_set(x_38, 1, x_37); return x_38; } } } } lean_object* l_Lean_Server_FileWorker_updatePendingRequests(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; uint8_t x_10; x_4 = lean_ctor_get(x_2, 5); x_5 = lean_st_ref_take(x_4, x_3); x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = lean_apply_1(x_1, x_6); x_9 = lean_st_ref_set(x_4, x_8, x_7); x_10 = !lean_is_exclusive(x_9); if (x_10 == 0) { return x_9; } else { lean_object* x_11; lean_object* x_12; lean_object* x_13; x_11 = lean_ctor_get(x_9, 0); x_12 = lean_ctor_get(x_9, 1); lean_inc(x_12); lean_inc(x_11); lean_dec(x_9); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_11); lean_ctor_set(x_13, 1, x_12); return x_13; } } } lean_object* l_Lean_Server_FileWorker_updatePendingRequests___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_Server_FileWorker_updatePendingRequests(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Lean_Server_FileWorker_updateDocument_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_5; lean_dec(x_3); lean_dec(x_2); x_5 = lean_apply_1(x_4, x_1); return x_5; } else { lean_object* x_6; x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); switch (lean_obj_tag(x_6)) { case 0: { lean_object* x_7; lean_object* x_8; lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); x_7 = lean_box(0); x_8 = lean_apply_1(x_2, x_7); return x_8; } case 1: { lean_object* x_9; lean_dec(x_3); lean_dec(x_2); x_9 = lean_apply_1(x_4, x_1); return x_9; } default: { lean_object* x_10; lean_object* x_11; lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); x_10 = lean_ctor_get(x_6, 0); lean_inc(x_10); lean_dec(x_6); x_11 = lean_apply_1(x_3, x_10); return x_11; } } } } } lean_object* l_Lean_Server_FileWorker_updateDocument_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_updateDocument_match__1___rarg), 4, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_updateDocument_match__2___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_2(x_2, x_3, x_4); return x_5; } } lean_object* l_Lean_Server_FileWorker_updateDocument_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_updateDocument_match__2___rarg), 2, 0); return x_2; } } lean_object* l_List_getLast_x21___at_Lean_Server_FileWorker_updateDocument___spec__1(lean_object* x_1) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_2; lean_object* x_3; lean_object* x_4; x_2 = l_Lean_Server_Snapshots_instInhabitedSnapshot; x_3 = l_List_getLast_x21___rarg___closed__2; x_4 = lean_panic_fn(x_2, x_3); return x_4; } else { uint8_t x_5; x_5 = !lean_is_exclusive(x_1); if (x_5 == 0) { lean_object* x_6; x_6 = l_List_getLast___rarg(x_1, lean_box(0)); return x_6; } else { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_7 = lean_ctor_get(x_1, 0); x_8 = lean_ctor_get(x_1, 1); lean_inc(x_8); lean_inc(x_7); lean_dec(x_1); x_9 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_9, 0, x_7); lean_ctor_set(x_9, 1, x_8); x_10 = l_List_getLast___rarg(x_9, lean_box(0)); return x_10; } } } } lean_object* l_List_get_x21___at_Lean_Server_FileWorker_updateDocument___spec__2(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; uint8_t x_4; x_3 = lean_unsigned_to_nat(0u); x_4 = lean_nat_dec_eq(x_1, x_3); if (x_4 == 0) { if (lean_obj_tag(x_2) == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_dec(x_1); x_5 = l_Lean_Server_Snapshots_instInhabitedSnapshot; x_6 = l_List_get_x21___rarg___closed__4; x_7 = lean_panic_fn(x_5, x_6); return x_7; } else { lean_object* x_8; lean_object* x_9; lean_object* x_10; x_8 = lean_ctor_get(x_2, 1); x_9 = lean_unsigned_to_nat(1u); x_10 = lean_nat_sub(x_1, x_9); lean_dec(x_1); x_1 = x_10; x_2 = x_8; goto _start; } } else { lean_dec(x_1); if (lean_obj_tag(x_2) == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; x_12 = l_Lean_Server_Snapshots_instInhabitedSnapshot; x_13 = l_List_get_x21___rarg___closed__4; x_14 = lean_panic_fn(x_12, x_13); return x_14; } else { lean_object* x_15; x_15 = lean_ctor_get(x_2, 0); lean_inc(x_15); return x_15; } } } } uint8_t l_Lean_Server_FileWorker_updateDocument___lambda__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; uint8_t x_4; x_3 = l_Lean_Server_Snapshots_Snapshot_endPos(x_2); x_4 = lean_nat_dec_lt(x_3, x_1); lean_dec(x_3); return x_4; } } lean_object* l_Lean_Server_FileWorker_updateDocument___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) { _start: { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; lean_object* x_15; x_10 = l_Lean_Server_FileWorker_CancelToken_new(x_9); x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); x_12 = lean_ctor_get(x_10, 1); lean_inc(x_12); lean_dec(x_10); x_13 = lean_ctor_get(x_1, 1); lean_inc(x_13); lean_dec(x_1); x_14 = 0; lean_inc(x_11); lean_inc(x_2); x_15 = l_Lean_Server_FileWorker_unfoldCmdSnaps(x_2, x_6, x_11, x_13, x_14, x_12); if (lean_obj_tag(x_15) == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); x_17 = lean_ctor_get(x_15, 1); lean_inc(x_17); lean_dec(x_15); x_18 = l_IO_AsyncList_ofList___rarg(x_5); x_19 = l_IO_AsyncList_append___rarg(x_18, x_16); x_20 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_20, 0, x_2); lean_ctor_set(x_20, 1, x_3); lean_ctor_set(x_20, 2, x_19); lean_ctor_set(x_20, 3, x_11); x_21 = lean_st_ref_set(x_4, x_20, x_17); x_22 = !lean_is_exclusive(x_21); if (x_22 == 0) { return x_21; } else { lean_object* x_23; lean_object* x_24; lean_object* x_25; x_23 = lean_ctor_get(x_21, 0); x_24 = lean_ctor_get(x_21, 1); lean_inc(x_24); lean_inc(x_23); lean_dec(x_21); x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_23); lean_ctor_set(x_25, 1, x_24); return x_25; } } else { uint8_t x_26; lean_dec(x_11); lean_dec(x_3); lean_dec(x_2); x_26 = !lean_is_exclusive(x_15); if (x_26 == 0) { return x_15; } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; x_27 = lean_ctor_get(x_15, 0); x_28 = lean_ctor_get(x_15, 1); lean_inc(x_28); lean_inc(x_27); lean_dec(x_15); x_29 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_29, 0, x_27); lean_ctor_set(x_29, 1, x_28); return x_29; } } } } static lean_object* _init_l_Lean_Server_FileWorker_updateDocument___lambda__3___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("Internal server error: elab task was aborted while still in use."); return x_1; } } lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; lean_object* x_12; x_11 = lean_ctor_get(x_1, 2); lean_inc(x_11); x_12 = l_IO_AsyncList_updateFinishedPrefix___rarg(x_11, x_10); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; lean_object* x_14; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_13, 1); lean_inc(x_14); if (lean_obj_tag(x_14) == 0) { lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; x_15 = lean_ctor_get(x_12, 1); lean_inc(x_15); lean_dec(x_12); x_16 = lean_ctor_get(x_13, 0); lean_inc(x_16); lean_dec(x_13); x_17 = lean_ctor_get(x_1, 3); lean_inc(x_17); lean_dec(x_1); x_18 = l_Lean_Server_FileWorker_CancelToken_set(x_17, x_15); lean_dec(x_17); x_19 = lean_ctor_get(x_18, 1); lean_inc(x_19); lean_dec(x_18); x_20 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_updateDocument___lambda__1___boxed), 2, 1); lean_closure_set(x_20, 0, x_2); x_21 = l_IO_AsyncList_finishedPrefix___rarg(x_16); lean_dec(x_16); x_22 = l_List_takeWhile___rarg(x_20, x_21); x_23 = lean_unsigned_to_nat(0u); x_24 = l_List_lengthAux___rarg(x_22, x_23); x_25 = lean_nat_dec_eq(x_24, x_23); if (x_25 == 0) { lean_object* x_26; lean_object* x_27; lean_object* x_39; uint8_t x_40; lean_inc(x_22); x_26 = l_List_getLast_x21___at_Lean_Server_FileWorker_updateDocument___spec__1(x_22); x_39 = lean_unsigned_to_nat(2u); x_40 = lean_nat_dec_le(x_39, x_24); if (x_40 == 0) { lean_dec(x_24); lean_inc(x_6); x_27 = x_6; goto block_38; } else { lean_object* x_41; lean_object* x_42; x_41 = lean_nat_sub(x_24, x_39); lean_dec(x_24); x_42 = l_List_get_x21___at_Lean_Server_FileWorker_updateDocument___spec__2(x_41, x_22); x_27 = x_42; goto block_38; } block_38: { lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; lean_inc(x_27); x_28 = l_Lean_Server_Snapshots_parseNextCmd(x_3, x_27, x_19); x_29 = lean_ctor_get(x_28, 0); lean_inc(x_29); x_30 = lean_ctor_get(x_28, 1); lean_inc(x_30); lean_dec(x_28); x_31 = lean_ctor_get(x_26, 1); lean_inc(x_31); x_32 = l_Lean_Syntax_structEq(x_29, x_31); lean_dec(x_31); lean_dec(x_29); if (x_32 == 0) { lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_dec(x_26); x_33 = l_List_dropLast___rarg(x_22); x_34 = lean_box(0); x_35 = l_Lean_Server_FileWorker_updateDocument___lambda__2(x_4, x_5, x_6, x_7, x_33, x_27, x_34, x_9, x_30); lean_dec(x_33); return x_35; } else { lean_object* x_36; lean_object* x_37; lean_dec(x_27); x_36 = lean_box(0); x_37 = l_Lean_Server_FileWorker_updateDocument___lambda__2(x_4, x_5, x_6, x_7, x_22, x_26, x_36, x_9, x_30); lean_dec(x_22); return x_37; } } } else { lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47; lean_object* x_48; lean_dec(x_24); lean_dec(x_22); lean_dec(x_3); x_43 = l_Lean_Server_FileWorker_CancelToken_new(x_19); x_44 = lean_ctor_get(x_43, 0); lean_inc(x_44); x_45 = lean_ctor_get(x_43, 1); lean_inc(x_45); lean_dec(x_43); x_46 = lean_ctor_get(x_4, 1); lean_inc(x_46); lean_dec(x_4); x_47 = 1; lean_inc(x_44); lean_inc(x_6); lean_inc(x_5); x_48 = l_Lean_Server_FileWorker_unfoldCmdSnaps(x_5, x_6, x_44, x_46, x_47, x_45); if (lean_obj_tag(x_48) == 0) { lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; uint8_t x_53; x_49 = lean_ctor_get(x_48, 0); lean_inc(x_49); x_50 = lean_ctor_get(x_48, 1); lean_inc(x_50); lean_dec(x_48); x_51 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_51, 0, x_5); lean_ctor_set(x_51, 1, x_6); lean_ctor_set(x_51, 2, x_49); lean_ctor_set(x_51, 3, x_44); x_52 = lean_st_ref_set(x_7, x_51, x_50); x_53 = !lean_is_exclusive(x_52); if (x_53 == 0) { return x_52; } else { lean_object* x_54; lean_object* x_55; lean_object* x_56; x_54 = lean_ctor_get(x_52, 0); x_55 = lean_ctor_get(x_52, 1); lean_inc(x_55); lean_inc(x_54); lean_dec(x_52); x_56 = lean_alloc_ctor(0, 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_44); lean_dec(x_6); lean_dec(x_5); x_57 = !lean_is_exclusive(x_48); if (x_57 == 0) { return x_48; } else { lean_object* x_58; lean_object* x_59; lean_object* x_60; x_58 = lean_ctor_get(x_48, 0); x_59 = lean_ctor_get(x_48, 1); lean_inc(x_59); lean_inc(x_58); lean_dec(x_48); 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; x_61 = lean_ctor_get(x_14, 0); lean_inc(x_61); lean_dec(x_14); switch (lean_obj_tag(x_61)) { case 0: { lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_dec(x_13); 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_62 = lean_ctor_get(x_12, 1); lean_inc(x_62); lean_dec(x_12); x_63 = l_Lean_Server_FileWorker_updateDocument___lambda__3___closed__1; x_64 = l_IO_throwServerError___rarg(x_63, x_62); return x_64; } case 1: { lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; uint8_t x_75; x_65 = lean_ctor_get(x_12, 1); lean_inc(x_65); lean_dec(x_12); x_66 = lean_ctor_get(x_13, 0); lean_inc(x_66); lean_dec(x_13); x_67 = lean_ctor_get(x_1, 3); lean_inc(x_67); lean_dec(x_1); x_68 = l_Lean_Server_FileWorker_CancelToken_set(x_67, x_65); lean_dec(x_67); x_69 = lean_ctor_get(x_68, 1); lean_inc(x_69); lean_dec(x_68); x_70 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_updateDocument___lambda__1___boxed), 2, 1); lean_closure_set(x_70, 0, x_2); x_71 = l_IO_AsyncList_finishedPrefix___rarg(x_66); lean_dec(x_66); x_72 = l_List_takeWhile___rarg(x_70, x_71); x_73 = lean_unsigned_to_nat(0u); x_74 = l_List_lengthAux___rarg(x_72, x_73); x_75 = lean_nat_dec_eq(x_74, x_73); if (x_75 == 0) { lean_object* x_76; lean_object* x_77; lean_object* x_89; uint8_t x_90; lean_inc(x_72); x_76 = l_List_getLast_x21___at_Lean_Server_FileWorker_updateDocument___spec__1(x_72); x_89 = lean_unsigned_to_nat(2u); x_90 = lean_nat_dec_le(x_89, x_74); if (x_90 == 0) { lean_dec(x_74); lean_inc(x_6); x_77 = x_6; goto block_88; } else { lean_object* x_91; lean_object* x_92; x_91 = lean_nat_sub(x_74, x_89); lean_dec(x_74); x_92 = l_List_get_x21___at_Lean_Server_FileWorker_updateDocument___spec__2(x_91, x_72); x_77 = x_92; goto block_88; } block_88: { lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; uint8_t x_82; lean_inc(x_77); x_78 = l_Lean_Server_Snapshots_parseNextCmd(x_3, x_77, x_69); x_79 = lean_ctor_get(x_78, 0); lean_inc(x_79); x_80 = lean_ctor_get(x_78, 1); lean_inc(x_80); lean_dec(x_78); x_81 = lean_ctor_get(x_76, 1); lean_inc(x_81); x_82 = l_Lean_Syntax_structEq(x_79, x_81); lean_dec(x_81); lean_dec(x_79); if (x_82 == 0) { lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_dec(x_76); x_83 = l_List_dropLast___rarg(x_72); x_84 = lean_box(0); x_85 = l_Lean_Server_FileWorker_updateDocument___lambda__2(x_4, x_5, x_6, x_7, x_83, x_77, x_84, x_9, x_80); lean_dec(x_83); return x_85; } else { lean_object* x_86; lean_object* x_87; lean_dec(x_77); x_86 = lean_box(0); x_87 = l_Lean_Server_FileWorker_updateDocument___lambda__2(x_4, x_5, x_6, x_7, x_72, x_76, x_86, x_9, x_80); lean_dec(x_72); return x_87; } } } else { lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; uint8_t x_97; lean_object* x_98; lean_dec(x_74); lean_dec(x_72); lean_dec(x_3); x_93 = l_Lean_Server_FileWorker_CancelToken_new(x_69); x_94 = lean_ctor_get(x_93, 0); lean_inc(x_94); x_95 = lean_ctor_get(x_93, 1); lean_inc(x_95); lean_dec(x_93); x_96 = lean_ctor_get(x_4, 1); lean_inc(x_96); lean_dec(x_4); x_97 = 1; lean_inc(x_94); lean_inc(x_6); lean_inc(x_5); x_98 = l_Lean_Server_FileWorker_unfoldCmdSnaps(x_5, x_6, x_94, x_96, x_97, x_95); if (lean_obj_tag(x_98) == 0) { lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; uint8_t x_103; x_99 = lean_ctor_get(x_98, 0); lean_inc(x_99); x_100 = lean_ctor_get(x_98, 1); lean_inc(x_100); lean_dec(x_98); x_101 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_101, 0, x_5); lean_ctor_set(x_101, 1, x_6); lean_ctor_set(x_101, 2, x_99); lean_ctor_set(x_101, 3, x_94); x_102 = lean_st_ref_set(x_7, x_101, x_100); x_103 = !lean_is_exclusive(x_102); if (x_103 == 0) { return x_102; } else { lean_object* x_104; lean_object* x_105; lean_object* x_106; x_104 = lean_ctor_get(x_102, 0); x_105 = lean_ctor_get(x_102, 1); lean_inc(x_105); lean_inc(x_104); lean_dec(x_102); x_106 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_106, 0, x_104); lean_ctor_set(x_106, 1, x_105); return x_106; } } else { uint8_t x_107; lean_dec(x_94); lean_dec(x_6); lean_dec(x_5); x_107 = !lean_is_exclusive(x_98); if (x_107 == 0) { return x_98; } else { lean_object* x_108; lean_object* x_109; lean_object* x_110; x_108 = lean_ctor_get(x_98, 0); x_109 = lean_ctor_get(x_98, 1); lean_inc(x_109); lean_inc(x_108); lean_dec(x_98); x_110 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_110, 0, x_108); lean_ctor_set(x_110, 1, x_109); return x_110; } } } } default: { uint8_t x_111; lean_dec(x_13); 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_111 = !lean_is_exclusive(x_12); if (x_111 == 0) { lean_object* x_112; lean_object* x_113; x_112 = lean_ctor_get(x_12, 0); lean_dec(x_112); x_113 = lean_ctor_get(x_61, 0); lean_inc(x_113); lean_dec(x_61); lean_ctor_set_tag(x_12, 1); lean_ctor_set(x_12, 0, x_113); return x_12; } else { lean_object* x_114; lean_object* x_115; lean_object* x_116; x_114 = lean_ctor_get(x_12, 1); lean_inc(x_114); lean_dec(x_12); x_115 = lean_ctor_get(x_61, 0); lean_inc(x_115); lean_dec(x_61); x_116 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_116, 0, x_115); lean_ctor_set(x_116, 1, x_114); return x_116; } } } } } else { uint8_t x_117; 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_117 = !lean_is_exclusive(x_12); if (x_117 == 0) { return x_12; } else { lean_object* x_118; lean_object* x_119; lean_object* x_120; x_118 = lean_ctor_get(x_12, 0); x_119 = lean_ctor_get(x_12, 1); lean_inc(x_119); lean_inc(x_118); lean_dec(x_12); x_120 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_120, 0, x_118); lean_ctor_set(x_120, 1, x_119); return x_120; } } } } static lean_object* _init_l_Lean_Server_FileWorker_updateDocument___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("Internal server error: header changed but worker wasn't restarted."); return x_1; } } lean_object* l_Lean_Server_FileWorker_updateDocument(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_5 = lean_ctor_get(x_3, 4); lean_inc(x_5); x_6 = lean_st_ref_get(x_5, x_4); x_7 = lean_ctor_get(x_6, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_6, 1); lean_inc(x_8); lean_dec(x_6); x_9 = lean_ctor_get(x_1, 2); lean_inc(x_9); x_10 = lean_ctor_get(x_9, 0); lean_inc(x_10); lean_dec(x_9); x_11 = lean_ctor_get(x_7, 1); lean_inc(x_11); x_12 = lean_box(0); lean_inc(x_11); lean_inc(x_10); x_13 = l_Lean_Server_Snapshots_reparseHeader(x_10, x_11, x_12, x_8); if (lean_obj_tag(x_13) == 0) { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; 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_ctor_get(x_14, 1); lean_inc(x_16); x_17 = lean_ctor_get(x_11, 1); lean_inc(x_17); lean_dec(x_11); x_18 = l_Lean_Syntax_structEq(x_16, x_17); lean_dec(x_17); lean_dec(x_16); if (x_18 == 0) { lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_dec(x_14); lean_dec(x_10); lean_dec(x_7); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_19 = l_Lean_Server_FileWorker_updateDocument___closed__1; x_20 = l_IO_throwServerError___rarg(x_19, x_15); x_21 = !lean_is_exclusive(x_20); if (x_21 == 0) { return x_20; } else { lean_object* x_22; lean_object* x_23; lean_object* x_24; x_22 = lean_ctor_get(x_20, 0); x_23 = lean_ctor_get(x_20, 1); lean_inc(x_23); lean_inc(x_22); lean_dec(x_20); x_24 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_24, 0, x_22); lean_ctor_set(x_24, 1, x_23); return x_24; } } else { lean_object* x_25; lean_object* x_26; x_25 = lean_box(0); lean_inc(x_3); x_26 = l_Lean_Server_FileWorker_updateDocument___lambda__3(x_7, x_2, x_10, x_3, x_1, x_14, x_5, x_25, x_3, x_15); lean_dec(x_5); lean_dec(x_3); return x_26; } } else { uint8_t x_27; lean_dec(x_11); lean_dec(x_10); lean_dec(x_7); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_27 = !lean_is_exclusive(x_13); if (x_27 == 0) { return x_13; } else { lean_object* x_28; lean_object* x_29; lean_object* x_30; x_28 = lean_ctor_get(x_13, 0); x_29 = lean_ctor_get(x_13, 1); lean_inc(x_29); lean_inc(x_28); lean_dec(x_13); x_30 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_30, 0, x_28); lean_ctor_set(x_30, 1, x_29); return x_30; } } } } lean_object* l_List_get_x21___at_Lean_Server_FileWorker_updateDocument___spec__2___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_List_get_x21___at_Lean_Server_FileWorker_updateDocument___spec__2(x_1, x_2); lean_dec(x_2); return x_3; } } lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l_Lean_Server_FileWorker_updateDocument___lambda__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } lean_object* l_Lean_Server_FileWorker_updateDocument___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) { _start: { lean_object* x_10; x_10 = l_Lean_Server_FileWorker_updateDocument___lambda__2(x_1, 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_5); lean_dec(x_4); return x_10; } } lean_object* l_Lean_Server_FileWorker_updateDocument___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, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; x_11 = l_Lean_Server_FileWorker_updateDocument___lambda__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); return x_11; } } lean_object* l_Lean_Server_FileWorker_handleDidChange_match__1___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_2(x_2, x_3, x_4); return x_5; } } lean_object* l_Lean_Server_FileWorker_handleDidChange_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDidChange_match__1___rarg), 2, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleDidChange_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_dec(x_2); x_4 = lean_apply_1(x_3, x_1); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_dec(x_3); x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); lean_dec(x_1); x_6 = lean_apply_1(x_2, x_5); return x_6; } } } lean_object* l_Lean_Server_FileWorker_handleDidChange_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDidChange_match__2___rarg), 3, 0); return x_2; } } static lean_object* _init_l_Lean_Server_FileWorker_handleDidChange___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("Expected version number"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_handleDidChange___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("Got outdated version number: "); return x_1; } } lean_object* l_Lean_Server_FileWorker_handleDidChange(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_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_ctor_get(x_2, 4); lean_inc(x_6); x_7 = lean_st_ref_get(x_6, x_3); lean_dec(x_6); x_8 = lean_ctor_get(x_4, 1); lean_inc(x_8); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); x_9 = lean_ctor_get(x_7, 1); lean_inc(x_9); lean_dec(x_7); x_10 = l_Lean_Server_FileWorker_handleDidChange___closed__1; x_11 = l_IO_throwServerError___rarg(x_10, x_9); return x_11; } else { uint8_t x_12; x_12 = !lean_is_exclusive(x_7); if (x_12 == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; x_13 = lean_ctor_get(x_7, 0); x_14 = lean_ctor_get(x_7, 1); x_15 = lean_ctor_get(x_4, 0); lean_inc(x_15); lean_dec(x_4); x_16 = lean_ctor_get(x_8, 0); lean_inc(x_16); lean_dec(x_8); x_17 = lean_ctor_get(x_13, 0); lean_inc(x_17); lean_dec(x_13); x_18 = lean_ctor_get(x_17, 1); lean_inc(x_18); x_19 = lean_nat_dec_le(x_16, x_18); if (x_19 == 0) { uint8_t x_20; lean_dec(x_18); x_20 = l_Array_isEmpty___rarg(x_5); if (x_20 == 0) { uint8_t x_21; x_21 = l_Lean_expandExternPatternAux___closed__1; if (x_21 == 0) { lean_object* x_22; lean_dec(x_17); lean_dec(x_16); lean_dec(x_15); lean_dec(x_5); lean_dec(x_2); x_22 = lean_box(0); lean_ctor_set(x_7, 0, x_22); return x_7; } else { lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_free_object(x_7); x_23 = lean_ctor_get(x_17, 2); lean_inc(x_23); lean_dec(x_17); x_24 = l_Lean_Server_foldDocumentChanges(x_5, x_23); lean_dec(x_5); x_25 = lean_ctor_get(x_24, 0); lean_inc(x_25); x_26 = lean_ctor_get(x_24, 1); lean_inc(x_26); lean_dec(x_24); x_27 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_27, 0, x_15); lean_ctor_set(x_27, 1, x_16); lean_ctor_set(x_27, 2, x_25); x_28 = l_Lean_Server_FileWorker_updateDocument(x_27, x_26, x_2, x_14); return x_28; } } else { uint8_t x_29; x_29 = l_Lean_expandExternPatternAux___closed__2; if (x_29 == 0) { lean_object* x_30; lean_dec(x_17); lean_dec(x_16); lean_dec(x_15); lean_dec(x_5); lean_dec(x_2); x_30 = lean_box(0); lean_ctor_set(x_7, 0, x_30); return x_7; } else { lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_free_object(x_7); x_31 = lean_ctor_get(x_17, 2); lean_inc(x_31); lean_dec(x_17); x_32 = l_Lean_Server_foldDocumentChanges(x_5, x_31); lean_dec(x_5); x_33 = lean_ctor_get(x_32, 0); lean_inc(x_33); x_34 = lean_ctor_get(x_32, 1); lean_inc(x_34); lean_dec(x_32); x_35 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_35, 0, x_15); lean_ctor_set(x_35, 1, x_16); lean_ctor_set(x_35, 2, x_33); x_36 = l_Lean_Server_FileWorker_updateDocument(x_35, x_34, x_2, x_14); return x_36; } } } else { lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_dec(x_17); lean_dec(x_15); lean_free_object(x_7); lean_dec(x_5); lean_dec(x_2); x_37 = l_Nat_repr(x_16); x_38 = l_Lean_Server_FileWorker_handleDidChange___closed__2; x_39 = lean_string_append(x_38, x_37); lean_dec(x_37); x_40 = l_term___u2264_____closed__3; x_41 = lean_string_append(x_39, x_40); x_42 = l_Nat_repr(x_18); x_43 = lean_string_append(x_41, x_42); lean_dec(x_42); x_44 = l_Lean_instInhabitedParserDescr___closed__1; x_45 = lean_string_append(x_43, x_44); x_46 = l_IO_eprintln___at___private_Init_System_IO_0__IO_eprintlnAux___spec__1(x_45, x_14); return x_46; } } else { lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; uint8_t x_53; x_47 = lean_ctor_get(x_7, 0); x_48 = lean_ctor_get(x_7, 1); lean_inc(x_48); lean_inc(x_47); lean_dec(x_7); x_49 = lean_ctor_get(x_4, 0); lean_inc(x_49); lean_dec(x_4); x_50 = lean_ctor_get(x_8, 0); lean_inc(x_50); lean_dec(x_8); x_51 = lean_ctor_get(x_47, 0); lean_inc(x_51); lean_dec(x_47); x_52 = lean_ctor_get(x_51, 1); lean_inc(x_52); x_53 = lean_nat_dec_le(x_50, x_52); if (x_53 == 0) { uint8_t x_54; lean_dec(x_52); x_54 = l_Array_isEmpty___rarg(x_5); if (x_54 == 0) { uint8_t x_55; x_55 = l_Lean_expandExternPatternAux___closed__1; if (x_55 == 0) { lean_object* x_56; lean_object* x_57; lean_dec(x_51); lean_dec(x_50); lean_dec(x_49); lean_dec(x_5); lean_dec(x_2); x_56 = lean_box(0); x_57 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_57, 0, x_56); lean_ctor_set(x_57, 1, x_48); return x_57; } else { lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; x_58 = lean_ctor_get(x_51, 2); lean_inc(x_58); lean_dec(x_51); x_59 = l_Lean_Server_foldDocumentChanges(x_5, x_58); lean_dec(x_5); x_60 = lean_ctor_get(x_59, 0); lean_inc(x_60); x_61 = lean_ctor_get(x_59, 1); lean_inc(x_61); lean_dec(x_59); x_62 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_62, 0, x_49); lean_ctor_set(x_62, 1, x_50); lean_ctor_set(x_62, 2, x_60); x_63 = l_Lean_Server_FileWorker_updateDocument(x_62, x_61, x_2, x_48); return x_63; } } else { uint8_t x_64; x_64 = l_Lean_expandExternPatternAux___closed__2; if (x_64 == 0) { lean_object* x_65; lean_object* x_66; lean_dec(x_51); lean_dec(x_50); lean_dec(x_49); lean_dec(x_5); lean_dec(x_2); x_65 = lean_box(0); x_66 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_66, 0, x_65); lean_ctor_set(x_66, 1, x_48); return x_66; } else { lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; x_67 = lean_ctor_get(x_51, 2); lean_inc(x_67); lean_dec(x_51); x_68 = l_Lean_Server_foldDocumentChanges(x_5, x_67); lean_dec(x_5); 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 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_71, 0, x_49); lean_ctor_set(x_71, 1, x_50); lean_ctor_set(x_71, 2, x_69); x_72 = l_Lean_Server_FileWorker_updateDocument(x_71, x_70, x_2, x_48); return x_72; } } } else { 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; lean_object* x_81; lean_object* x_82; lean_dec(x_51); lean_dec(x_49); lean_dec(x_5); lean_dec(x_2); x_73 = l_Nat_repr(x_50); x_74 = l_Lean_Server_FileWorker_handleDidChange___closed__2; x_75 = lean_string_append(x_74, x_73); lean_dec(x_73); x_76 = l_term___u2264_____closed__3; x_77 = lean_string_append(x_75, x_76); x_78 = l_Nat_repr(x_52); x_79 = lean_string_append(x_77, x_78); lean_dec(x_78); x_80 = l_Lean_instInhabitedParserDescr___closed__1; x_81 = lean_string_append(x_79, x_80); x_82 = l_IO_eprintln___at___private_Init_System_IO_0__IO_eprintlnAux___spec__1(x_81, x_48); return x_82; } } } } } lean_object* l_Std_RBNode_del___at_Lean_Server_FileWorker_handleCancelRequest___spec__2(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { lean_object* x_3; lean_dec(x_1); x_3 = lean_box(0); return x_3; } else { uint8_t x_4; x_4 = !lean_is_exclusive(x_2); if (x_4 == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; x_5 = lean_ctor_get(x_2, 0); x_6 = lean_ctor_get(x_2, 1); x_7 = lean_ctor_get(x_2, 2); x_8 = lean_ctor_get(x_2, 3); lean_inc(x_6); lean_inc(x_1); x_9 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_ordRequestID____x40_Lean_Data_JsonRpc___hyg_107_(x_1, x_6); switch (x_9) { case 0: { uint8_t x_10; x_10 = l_Std_RBNode_isBlack___rarg(x_5); if (x_10 == 0) { lean_object* x_11; uint8_t x_12; x_11 = l_Std_RBNode_del___at_Lean_Server_FileWorker_handleCancelRequest___spec__2(x_1, x_5); x_12 = 0; lean_ctor_set(x_2, 0, x_11); lean_ctor_set_uint8(x_2, sizeof(void*)*4, x_12); return x_2; } else { lean_object* x_13; lean_object* x_14; lean_free_object(x_2); x_13 = l_Std_RBNode_del___at_Lean_Server_FileWorker_handleCancelRequest___spec__2(x_1, x_5); x_14 = l_Std_RBNode_balLeft___rarg(x_13, x_6, x_7, x_8); return x_14; } } case 1: { lean_object* x_15; lean_free_object(x_2); lean_dec(x_7); lean_dec(x_6); lean_dec(x_1); x_15 = l_Std_RBNode_appendTrees___rarg(x_5, x_8); return x_15; } default: { uint8_t x_16; x_16 = l_Std_RBNode_isBlack___rarg(x_8); if (x_16 == 0) { lean_object* x_17; uint8_t x_18; x_17 = l_Std_RBNode_del___at_Lean_Server_FileWorker_handleCancelRequest___spec__2(x_1, x_8); x_18 = 0; lean_ctor_set(x_2, 3, x_17); lean_ctor_set_uint8(x_2, sizeof(void*)*4, x_18); return x_2; } else { lean_object* x_19; lean_object* x_20; lean_free_object(x_2); x_19 = l_Std_RBNode_del___at_Lean_Server_FileWorker_handleCancelRequest___spec__2(x_1, x_8); x_20 = l_Std_RBNode_balRight___rarg(x_5, x_6, x_7, x_19); return x_20; } } } } else { 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_2, 0); x_22 = lean_ctor_get(x_2, 1); x_23 = lean_ctor_get(x_2, 2); x_24 = lean_ctor_get(x_2, 3); lean_inc(x_24); lean_inc(x_23); lean_inc(x_22); lean_inc(x_21); lean_dec(x_2); lean_inc(x_22); lean_inc(x_1); x_25 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_ordRequestID____x40_Lean_Data_JsonRpc___hyg_107_(x_1, x_22); switch (x_25) { case 0: { uint8_t x_26; x_26 = l_Std_RBNode_isBlack___rarg(x_21); if (x_26 == 0) { lean_object* x_27; uint8_t x_28; lean_object* x_29; x_27 = l_Std_RBNode_del___at_Lean_Server_FileWorker_handleCancelRequest___spec__2(x_1, x_21); x_28 = 0; x_29 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_29, 0, x_27); lean_ctor_set(x_29, 1, x_22); lean_ctor_set(x_29, 2, x_23); lean_ctor_set(x_29, 3, x_24); lean_ctor_set_uint8(x_29, sizeof(void*)*4, x_28); return x_29; } else { lean_object* x_30; lean_object* x_31; x_30 = l_Std_RBNode_del___at_Lean_Server_FileWorker_handleCancelRequest___spec__2(x_1, x_21); x_31 = l_Std_RBNode_balLeft___rarg(x_30, x_22, x_23, x_24); return x_31; } } case 1: { lean_object* x_32; lean_dec(x_23); lean_dec(x_22); lean_dec(x_1); x_32 = l_Std_RBNode_appendTrees___rarg(x_21, x_24); return x_32; } default: { uint8_t x_33; x_33 = l_Std_RBNode_isBlack___rarg(x_24); if (x_33 == 0) { lean_object* x_34; uint8_t x_35; lean_object* x_36; x_34 = l_Std_RBNode_del___at_Lean_Server_FileWorker_handleCancelRequest___spec__2(x_1, x_24); x_35 = 0; x_36 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_36, 0, x_21); lean_ctor_set(x_36, 1, x_22); lean_ctor_set(x_36, 2, x_23); lean_ctor_set(x_36, 3, x_34); lean_ctor_set_uint8(x_36, sizeof(void*)*4, x_35); return x_36; } else { lean_object* x_37; lean_object* x_38; x_37 = l_Std_RBNode_del___at_Lean_Server_FileWorker_handleCancelRequest___spec__2(x_1, x_24); x_38 = l_Std_RBNode_balRight___rarg(x_21, x_22, x_23, x_37); return x_38; } } } } } } } lean_object* l_Std_RBNode_erase___at_Lean_Server_FileWorker_handleCancelRequest___spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; x_3 = l_Std_RBNode_del___at_Lean_Server_FileWorker_handleCancelRequest___spec__2(x_1, x_2); x_4 = l_Std_RBNode_setBlack___rarg(x_3); return x_4; } } lean_object* l_Lean_Server_FileWorker_handleCancelRequest(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; x_4 = lean_alloc_closure((void*)(l_Std_RBNode_erase___at_Lean_Server_FileWorker_handleCancelRequest___spec__1), 2, 1); lean_closure_set(x_4, 0, x_1); x_5 = l_Lean_Server_FileWorker_updatePendingRequests(x_4, x_2, x_3); return x_5; } } lean_object* l_Lean_Server_FileWorker_handleCancelRequest___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_Server_FileWorker_handleCancelRequest(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } static lean_object* _init_l_Lean_Server_FileWorker_RequestError_fileChanged___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("File changed."); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_RequestError_fileChanged___closed__2() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; x_1 = 10; x_2 = l_Lean_Server_FileWorker_RequestError_fileChanged___closed__1; x_3 = lean_alloc_ctor(0, 1, 1); lean_ctor_set(x_3, 0, x_2); lean_ctor_set_uint8(x_3, sizeof(void*)*1, x_1); return x_3; } } static lean_object* _init_l_Lean_Server_FileWorker_RequestError_fileChanged() { _start: { lean_object* x_1; x_1 = l_Lean_Server_FileWorker_RequestError_fileChanged___closed__2; return x_1; } } lean_object* l_Lean_Server_FileWorker_mapTask___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = lean_apply_3(x_1, x_3, x_2, x_4); return x_5; } } lean_object* l_Lean_Server_FileWorker_mapTask___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_mapTask___rarg___lambda__1), 4, 2); lean_closure_set(x_5, 0, x_2); lean_closure_set(x_5, 1, x_3); x_6 = l_Task_Priority_default; x_7 = lean_io_map_task(x_5, x_1, x_6, x_4); return x_7; } } lean_object* l_Lean_Server_FileWorker_mapTask(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_mapTask___rarg), 4, 0); return x_3; } } lean_object* l_Lean_Server_FileWorker_withWaitFindSnap_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_7; lean_dec(x_6); lean_dec(x_5); x_7 = lean_ctor_get(x_1, 0); lean_inc(x_7); lean_dec(x_1); switch (lean_obj_tag(x_7)) { case 0: { lean_object* x_8; lean_object* x_9; lean_dec(x_4); lean_dec(x_3); x_8 = lean_box(0); x_9 = lean_apply_1(x_2, x_8); return x_9; } case 1: { lean_object* x_10; lean_object* x_11; lean_dec(x_3); lean_dec(x_2); x_10 = lean_box(0); x_11 = lean_apply_1(x_4, x_10); return x_11; } default: { lean_object* x_12; lean_object* x_13; lean_dec(x_4); lean_dec(x_2); x_12 = lean_ctor_get(x_7, 0); lean_inc(x_12); lean_dec(x_7); x_13 = lean_apply_1(x_3, x_12); return x_13; } } } else { lean_object* x_14; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_14 = lean_ctor_get(x_1, 0); lean_inc(x_14); lean_dec(x_1); if (lean_obj_tag(x_14) == 0) { lean_object* x_15; lean_object* x_16; lean_dec(x_6); x_15 = lean_box(0); x_16 = lean_apply_1(x_5, x_15); return x_16; } else { lean_object* x_17; lean_object* x_18; lean_dec(x_5); x_17 = lean_ctor_get(x_14, 0); lean_inc(x_17); lean_dec(x_14); x_18 = lean_apply_1(x_6, x_17); return x_18; } } } } lean_object* l_Lean_Server_FileWorker_withWaitFindSnap_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_withWaitFindSnap_match__1___rarg), 6, 0); return x_2; } } lean_object* l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_withWaitFindSnap___spec__2(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; x_2 = l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3___closed__1; x_3 = l_Task_Priority_default; x_4 = lean_task_map(x_2, x_1, x_3); return x_4; } } lean_object* l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_withWaitFindSnap___spec__1___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_2) == 0) { uint8_t x_4; lean_dec(x_1); x_4 = !lean_is_exclusive(x_2); if (x_4 == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_5, 0, x_2); x_6 = lean_task_pure(x_5); x_7 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_7, 0, x_6); lean_ctor_set(x_7, 1, x_3); return x_7; } else { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; x_8 = lean_ctor_get(x_2, 0); lean_inc(x_8); lean_dec(x_2); x_9 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_9, 0, x_8); x_10 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_10, 0, x_9); x_11 = lean_task_pure(x_10); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_3); return x_12; } } else { lean_object* x_13; lean_object* x_14; x_13 = lean_ctor_get(x_2, 0); lean_inc(x_13); lean_dec(x_2); x_14 = l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_withWaitFindSnap___spec__1(x_1, x_13, x_3); if (lean_obj_tag(x_14) == 0) { uint8_t x_15; x_15 = !lean_is_exclusive(x_14); if (x_15 == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_16 = lean_ctor_get(x_14, 0); x_17 = l_ExceptT_lift___rarg___closed__1; x_18 = l_Task_Priority_default; x_19 = lean_task_map(x_17, x_16, x_18); lean_ctor_set(x_14, 0, x_19); return x_14; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_20 = lean_ctor_get(x_14, 0); x_21 = lean_ctor_get(x_14, 1); lean_inc(x_21); lean_inc(x_20); lean_dec(x_14); x_22 = l_ExceptT_lift___rarg___closed__1; x_23 = l_Task_Priority_default; x_24 = lean_task_map(x_22, x_20, x_23); x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_21); return x_25; } } else { uint8_t x_26; x_26 = !lean_is_exclusive(x_14); if (x_26 == 0) { return x_14; } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; x_27 = lean_ctor_get(x_14, 0); x_28 = lean_ctor_get(x_14, 1); lean_inc(x_28); lean_inc(x_27); lean_dec(x_14); x_29 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_29, 0, x_27); lean_ctor_set(x_29, 1, x_28); return x_29; } } } } } lean_object* l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_withWaitFindSnap___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { switch (lean_obj_tag(x_2)) { case 0: { lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; 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); lean_inc(x_1); lean_inc(x_4); x_6 = lean_apply_1(x_1, x_4); x_7 = lean_unbox(x_6); lean_dec(x_6); if (x_7 == 0) { lean_dec(x_4); x_2 = x_5; goto _start; } else { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_dec(x_5); lean_dec(x_1); x_9 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_9, 0, x_4); x_10 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_10, 0, x_9); x_11 = lean_task_pure(x_10); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_3); return x_12; } } case 1: { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_13 = lean_ctor_get(x_2, 0); lean_inc(x_13); lean_dec(x_2); x_14 = lean_alloc_closure((void*)(l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_withWaitFindSnap___spec__1___lambda__1), 3, 1); lean_closure_set(x_14, 0, x_1); x_15 = l_Task_Priority_default; x_16 = lean_io_bind_task(x_13, x_14, x_15, x_3); if (lean_obj_tag(x_16) == 0) { uint8_t x_17; x_17 = !lean_is_exclusive(x_16); if (x_17 == 0) { lean_object* x_18; lean_object* x_19; lean_object* x_20; x_18 = lean_ctor_get(x_16, 0); x_19 = lean_alloc_closure((void*)(l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3___lambda__1), 1, 0); x_20 = lean_task_map(x_19, x_18, x_15); lean_ctor_set(x_16, 0, x_20); return x_16; } else { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_21 = lean_ctor_get(x_16, 0); x_22 = lean_ctor_get(x_16, 1); lean_inc(x_22); lean_inc(x_21); lean_dec(x_16); x_23 = lean_alloc_closure((void*)(l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3___lambda__1), 1, 0); x_24 = lean_task_map(x_23, x_21, x_15); x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_22); return x_25; } } else { uint8_t x_26; x_26 = !lean_is_exclusive(x_16); if (x_26 == 0) { return x_16; } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; x_27 = lean_ctor_get(x_16, 0); x_28 = lean_ctor_get(x_16, 1); lean_inc(x_28); lean_inc(x_27); lean_dec(x_16); x_29 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_29, 0, x_27); lean_ctor_set(x_29, 1, x_28); return x_29; } } } default: { lean_object* x_30; lean_object* x_31; lean_dec(x_1); x_30 = l_IO_AsyncList_waitFind_x3f___rarg___closed__2; x_31 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_31, 0, x_30); lean_ctor_set(x_31, 1, x_3); return x_31; } } } } static lean_object* _init_l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1___closed__1() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Server_FileWorker_RequestError_fileChanged; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } lean_object* l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1(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_3) == 0) { lean_object* x_6; lean_dec(x_2); x_6 = lean_ctor_get(x_3, 0); lean_inc(x_6); lean_dec(x_3); switch (lean_obj_tag(x_6)) { case 0: { lean_object* x_7; lean_object* x_8; lean_dec(x_4); lean_dec(x_1); x_7 = l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1___closed__1; x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_7); lean_ctor_set(x_8, 1, x_5); return x_8; } case 1: { lean_object* x_9; x_9 = lean_apply_2(x_1, x_4, x_5); return x_9; } default: { lean_object* x_10; lean_object* x_11; lean_dec(x_4); lean_dec(x_1); x_10 = lean_ctor_get(x_6, 0); lean_inc(x_10); lean_dec(x_6); x_11 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_5); return x_11; } } } else { lean_object* x_12; x_12 = lean_ctor_get(x_3, 0); lean_inc(x_12); lean_dec(x_3); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; lean_dec(x_2); x_13 = lean_apply_2(x_1, x_4, x_5); return x_13; } else { lean_object* x_14; lean_object* x_15; lean_dec(x_1); x_14 = lean_ctor_get(x_12, 0); lean_inc(x_14); lean_dec(x_12); x_15 = lean_apply_3(x_2, x_14, x_4, x_5); return x_15; } } } } lean_object* l_Lean_Server_FileWorker_withWaitFindSnap___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; lean_object* x_8; x_7 = lean_ctor_get(x_1, 2); lean_inc(x_7); lean_dec(x_1); x_8 = l_IO_AsyncList_waitFind_x3f___at_Lean_Server_FileWorker_withWaitFindSnap___spec__1(x_2, x_7, x_6); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; x_9 = lean_ctor_get(x_8, 0); lean_inc(x_9); x_10 = lean_ctor_get(x_8, 1); lean_inc(x_10); lean_dec(x_8); x_11 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1), 5, 2); lean_closure_set(x_11, 0, x_3); lean_closure_set(x_11, 1, x_4); x_12 = l_Lean_Server_FileWorker_mapTask___rarg(x_9, x_11, x_5, x_10); return x_12; } else { uint8_t x_13; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_13 = !lean_is_exclusive(x_8); if (x_13 == 0) { return x_8; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; x_14 = lean_ctor_get(x_8, 0); x_15 = lean_ctor_get(x_8, 1); lean_inc(x_15); lean_inc(x_14); lean_dec(x_8); x_16 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_16, 0, x_14); lean_ctor_set(x_16, 1, x_15); return x_16; } } } } lean_object* l_Lean_Server_FileWorker_withWaitFindSnap(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_withWaitFindSnap___rarg), 6, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleCompletion_match__1___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_dec(x_2); x_4 = lean_apply_1(x_3, x_1); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_dec(x_3); x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); lean_dec(x_1); x_6 = lean_apply_1(x_2, x_5); return x_6; } } } lean_object* l_Lean_Server_FileWorker_handleCompletion_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleCompletion_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleCompletion_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_box(0); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_apply_1(x_3, x_6); return x_7; } } } lean_object* l_Lean_Server_FileWorker_handleCompletion_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleCompletion_match__2___rarg), 3, 0); return x_2; } } lean_object* l_ReaderT_pure___at_Lean_Server_FileWorker_handleCompletion___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_4, 0, x_1); lean_ctor_set(x_4, 1, x_3); return x_4; } } lean_object* l_ReaderT_pure___at_Lean_Server_FileWorker_handleCompletion___spec__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Server_FileWorker_handleCompletion___spec__1___rarg___boxed), 3, 0); return x_2; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleCompletion___spec__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, size_t x_7, size_t x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { lean_object* x_12; lean_object* x_13; uint8_t x_36; x_36 = x_8 < x_7; if (x_36 == 0) { lean_object* x_37; lean_object* x_38; lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_37 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_37, 0, x_9); x_38 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_38, 0, x_37); lean_ctor_set(x_38, 1, x_11); return x_38; } else { lean_object* x_39; lean_object* x_40; lean_object* x_41; x_39 = lean_array_uget(x_6, x_8); x_40 = lean_ctor_get(x_9, 1); lean_inc(x_40); lean_dec(x_9); lean_inc(x_3); lean_inc(x_2); lean_inc(x_1); x_41 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3(x_1, x_2, x_3, x_4, x_39, x_40, x_10, x_11); lean_dec(x_39); if (lean_obj_tag(x_41) == 0) { lean_object* x_42; x_42 = lean_ctor_get(x_41, 0); lean_inc(x_42); if (lean_obj_tag(x_42) == 0) { lean_object* x_43; uint8_t x_44; x_43 = lean_ctor_get(x_41, 1); lean_inc(x_43); lean_dec(x_41); x_44 = !lean_is_exclusive(x_42); if (x_44 == 0) { x_12 = x_42; x_13 = x_43; goto block_35; } else { lean_object* x_45; lean_object* x_46; x_45 = lean_ctor_get(x_42, 0); lean_inc(x_45); lean_dec(x_42); x_46 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_46, 0, x_45); x_12 = x_46; x_13 = x_43; goto block_35; } } else { uint8_t x_47; x_47 = !lean_is_exclusive(x_42); if (x_47 == 0) { lean_object* x_48; x_48 = lean_ctor_get(x_42, 0); if (lean_obj_tag(x_48) == 0) { lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; x_49 = lean_ctor_get(x_41, 1); lean_inc(x_49); lean_dec(x_41); x_50 = lean_ctor_get(x_48, 0); lean_inc(x_50); x_51 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_51, 0, x_48); x_52 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_52, 0, x_51); lean_ctor_set(x_52, 1, x_50); x_53 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_53, 0, x_52); lean_ctor_set(x_42, 0, x_53); x_12 = x_42; x_13 = x_49; goto block_35; } else { lean_object* x_54; uint8_t x_55; x_54 = lean_ctor_get(x_41, 1); lean_inc(x_54); lean_dec(x_41); x_55 = !lean_is_exclusive(x_48); if (x_55 == 0) { lean_object* x_56; lean_object* x_57; x_56 = lean_ctor_get(x_48, 0); lean_inc(x_5); x_57 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_57, 0, x_5); lean_ctor_set(x_57, 1, x_56); lean_ctor_set(x_48, 0, x_57); x_12 = x_42; x_13 = x_54; goto block_35; } else { lean_object* x_58; lean_object* x_59; lean_object* x_60; x_58 = lean_ctor_get(x_48, 0); lean_inc(x_58); lean_dec(x_48); lean_inc(x_5); x_59 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_59, 0, x_5); lean_ctor_set(x_59, 1, x_58); x_60 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_60, 0, x_59); lean_ctor_set(x_42, 0, x_60); x_12 = x_42; x_13 = x_54; goto block_35; } } } else { lean_object* x_61; x_61 = lean_ctor_get(x_42, 0); lean_inc(x_61); lean_dec(x_42); if (lean_obj_tag(x_61) == 0) { lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; x_62 = lean_ctor_get(x_41, 1); lean_inc(x_62); lean_dec(x_41); x_63 = lean_ctor_get(x_61, 0); lean_inc(x_63); x_64 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_64, 0, x_61); x_65 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_65, 0, x_64); lean_ctor_set(x_65, 1, x_63); x_66 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_66, 0, x_65); x_67 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_67, 0, x_66); x_12 = x_67; x_13 = x_62; goto block_35; } else { 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_68 = lean_ctor_get(x_41, 1); lean_inc(x_68); lean_dec(x_41); x_69 = lean_ctor_get(x_61, 0); lean_inc(x_69); if (lean_is_exclusive(x_61)) { lean_ctor_release(x_61, 0); x_70 = x_61; } else { lean_dec_ref(x_61); x_70 = lean_box(0); } lean_inc(x_5); x_71 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_71, 0, x_5); lean_ctor_set(x_71, 1, x_69); if (lean_is_scalar(x_70)) { x_72 = lean_alloc_ctor(1, 1, 0); } else { x_72 = x_70; } lean_ctor_set(x_72, 0, x_71); x_73 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_73, 0, x_72); x_12 = x_73; x_13 = x_68; goto block_35; } } } } else { uint8_t x_74; lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_74 = !lean_is_exclusive(x_41); if (x_74 == 0) { return x_41; } else { lean_object* x_75; lean_object* x_76; lean_object* x_77; x_75 = lean_ctor_get(x_41, 0); x_76 = lean_ctor_get(x_41, 1); lean_inc(x_76); lean_inc(x_75); lean_dec(x_41); x_77 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_77, 0, x_75); lean_ctor_set(x_77, 1, x_76); return x_77; } } } block_35: { if (lean_obj_tag(x_12) == 0) { uint8_t x_14; lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_14 = !lean_is_exclusive(x_12); if (x_14 == 0) { lean_object* x_15; x_15 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_15, 0, x_12); lean_ctor_set(x_15, 1, x_13); return x_15; } else { lean_object* x_16; lean_object* x_17; lean_object* x_18; x_16 = lean_ctor_get(x_12, 0); lean_inc(x_16); lean_dec(x_12); x_17 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_17, 0, x_16); x_18 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_13); return x_18; } } else { uint8_t x_19; x_19 = !lean_is_exclusive(x_12); if (x_19 == 0) { lean_object* x_20; x_20 = lean_ctor_get(x_12, 0); if (lean_obj_tag(x_20) == 0) { lean_object* x_21; lean_object* x_22; lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_21 = lean_ctor_get(x_20, 0); lean_inc(x_21); lean_dec(x_20); lean_ctor_set(x_12, 0, x_21); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_12); lean_ctor_set(x_22, 1, x_13); return x_22; } else { lean_object* x_23; size_t x_24; size_t x_25; lean_free_object(x_12); x_23 = lean_ctor_get(x_20, 0); lean_inc(x_23); lean_dec(x_20); x_24 = 1; x_25 = x_8 + x_24; x_8 = x_25; x_9 = x_23; x_11 = x_13; goto _start; } } else { lean_object* x_27; x_27 = lean_ctor_get(x_12, 0); lean_inc(x_27); lean_dec(x_12); if (lean_obj_tag(x_27) == 0) { lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_28 = lean_ctor_get(x_27, 0); lean_inc(x_28); lean_dec(x_27); x_29 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_29, 0, x_28); x_30 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_30, 0, x_29); lean_ctor_set(x_30, 1, x_13); return x_30; } else { lean_object* x_31; size_t x_32; size_t x_33; x_31 = lean_ctor_get(x_27, 0); lean_inc(x_31); lean_dec(x_27); x_32 = 1; x_33 = x_8 + x_32; x_8 = x_33; x_9 = x_31; x_11 = x_13; goto _start; } } } } } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleCompletion___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, size_t x_6, size_t x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; lean_object* x_12; lean_object* x_30; lean_object* x_31; uint8_t x_56; x_56 = x_7 < x_6; if (x_56 == 0) { lean_object* x_57; lean_object* x_58; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_57 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_57, 0, x_8); x_58 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_58, 0, x_57); lean_ctor_set(x_58, 1, x_10); return x_58; } else { lean_object* x_59; lean_object* x_60; lean_dec(x_8); x_59 = lean_array_uget(x_5, x_7); lean_inc(x_2); lean_inc(x_1); x_60 = l_Lean_Server_Completion_find_x3f(x_1, x_2, x_59, x_10); if (lean_obj_tag(x_60) == 0) { lean_object* x_61; x_61 = lean_ctor_get(x_60, 0); lean_inc(x_61); if (lean_obj_tag(x_61) == 0) { lean_object* x_62; lean_object* x_63; lean_object* x_64; x_62 = lean_ctor_get(x_60, 1); lean_inc(x_62); lean_dec(x_60); lean_inc(x_3); x_63 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_63, 0, x_3); x_64 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_64, 0, x_63); x_30 = x_64; x_31 = x_62; goto block_55; } else { lean_object* x_65; uint8_t x_66; x_65 = lean_ctor_get(x_60, 1); lean_inc(x_65); lean_dec(x_60); x_66 = !lean_is_exclusive(x_61); if (x_66 == 0) { lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; x_67 = lean_box(0); x_68 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_68, 0, x_61); lean_ctor_set(x_68, 1, x_67); x_69 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_69, 0, x_68); x_70 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_70, 0, x_69); x_30 = x_70; x_31 = x_65; goto block_55; } else { lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; x_71 = lean_ctor_get(x_61, 0); lean_inc(x_71); lean_dec(x_61); x_72 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_72, 0, x_71); x_73 = lean_box(0); x_74 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_74, 0, x_72); lean_ctor_set(x_74, 1, x_73); x_75 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_75, 0, x_74); x_76 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_76, 0, x_75); x_30 = x_76; x_31 = x_65; goto block_55; } } } else { uint8_t x_77; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_77 = !lean_is_exclusive(x_60); if (x_77 == 0) { return x_60; } else { lean_object* x_78; lean_object* x_79; lean_object* x_80; x_78 = lean_ctor_get(x_60, 0); x_79 = lean_ctor_get(x_60, 1); lean_inc(x_79); lean_inc(x_78); lean_dec(x_60); x_80 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_80, 0, x_78); lean_ctor_set(x_80, 1, x_79); return x_80; } } } block_29: { uint8_t x_13; x_13 = !lean_is_exclusive(x_11); if (x_13 == 0) { lean_object* x_14; x_14 = lean_ctor_get(x_11, 0); if (lean_obj_tag(x_14) == 0) { lean_object* x_15; lean_object* x_16; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); lean_dec(x_14); lean_ctor_set(x_11, 0, x_15); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_11); lean_ctor_set(x_16, 1, x_12); return x_16; } else { lean_object* x_17; size_t x_18; size_t x_19; lean_free_object(x_11); x_17 = lean_ctor_get(x_14, 0); lean_inc(x_17); lean_dec(x_14); x_18 = 1; x_19 = x_7 + x_18; x_7 = x_19; x_8 = x_17; x_10 = x_12; goto _start; } } else { lean_object* x_21; x_21 = lean_ctor_get(x_11, 0); lean_inc(x_21); lean_dec(x_11); if (lean_obj_tag(x_21) == 0) { lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_22 = lean_ctor_get(x_21, 0); lean_inc(x_22); lean_dec(x_21); x_23 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_23, 0, x_22); x_24 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_12); return x_24; } else { lean_object* x_25; size_t x_26; size_t x_27; x_25 = lean_ctor_get(x_21, 0); lean_inc(x_25); lean_dec(x_21); x_26 = 1; x_27 = x_7 + x_26; x_7 = x_27; x_8 = x_25; x_10 = x_12; goto _start; } } } block_55: { uint8_t x_32; x_32 = !lean_is_exclusive(x_30); if (x_32 == 0) { lean_object* x_33; x_33 = lean_ctor_get(x_30, 0); if (lean_obj_tag(x_33) == 0) { lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; x_34 = lean_ctor_get(x_33, 0); lean_inc(x_34); x_35 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_35, 0, x_33); x_36 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_36, 0, x_35); lean_ctor_set(x_36, 1, x_34); x_37 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_37, 0, x_36); lean_ctor_set(x_30, 0, x_37); x_11 = x_30; x_12 = x_31; goto block_29; } else { uint8_t x_38; x_38 = !lean_is_exclusive(x_33); if (x_38 == 0) { lean_object* x_39; lean_object* x_40; x_39 = lean_ctor_get(x_33, 0); lean_inc(x_4); x_40 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_40, 0, x_4); lean_ctor_set(x_40, 1, x_39); lean_ctor_set(x_33, 0, x_40); x_11 = x_30; x_12 = x_31; goto block_29; } else { lean_object* x_41; lean_object* x_42; lean_object* x_43; x_41 = lean_ctor_get(x_33, 0); lean_inc(x_41); lean_dec(x_33); lean_inc(x_4); x_42 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_42, 0, x_4); lean_ctor_set(x_42, 1, x_41); x_43 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_43, 0, x_42); lean_ctor_set(x_30, 0, x_43); x_11 = x_30; x_12 = x_31; goto block_29; } } } else { lean_object* x_44; x_44 = lean_ctor_get(x_30, 0); lean_inc(x_44); lean_dec(x_30); if (lean_obj_tag(x_44) == 0) { lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; x_45 = lean_ctor_get(x_44, 0); lean_inc(x_45); x_46 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_46, 0, x_44); x_47 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_47, 0, x_46); lean_ctor_set(x_47, 1, x_45); x_48 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_48, 0, x_47); x_49 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_49, 0, x_48); x_11 = x_49; x_12 = x_31; goto block_29; } else { lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; x_50 = lean_ctor_get(x_44, 0); lean_inc(x_50); if (lean_is_exclusive(x_44)) { lean_ctor_release(x_44, 0); x_51 = x_44; } else { lean_dec_ref(x_44); x_51 = lean_box(0); } lean_inc(x_4); x_52 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_52, 0, x_4); lean_ctor_set(x_52, 1, x_50); if (lean_is_scalar(x_51)) { x_53 = lean_alloc_ctor(1, 1, 0); } else { x_53 = x_51; } lean_ctor_set(x_53, 0, x_52); x_54 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_54, 0, x_53); x_11 = x_54; x_12 = x_31; goto block_29; } } } } } lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_5, 0, x_1); x_6 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_6, 0, x_5); x_7 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_7, 0, x_6); lean_ctor_set(x_7, 1, x_4); return x_7; } } lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { if (lean_obj_tag(x_5) == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; size_t x_13; size_t x_14; lean_object* x_15; x_9 = lean_ctor_get(x_5, 0); x_10 = lean_box(0); x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_6); x_12 = lean_array_get_size(x_9); x_13 = lean_usize_of_nat(x_12); lean_dec(x_12); x_14 = 0; x_15 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleCompletion___spec__4(x_1, x_2, x_3, x_4, x_10, x_9, x_13, x_14, x_11, x_7, x_8); if (lean_obj_tag(x_15) == 0) { lean_object* x_16; x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); if (lean_obj_tag(x_16) == 0) { uint8_t x_17; x_17 = !lean_is_exclusive(x_15); if (x_17 == 0) { lean_object* x_18; uint8_t x_19; x_18 = lean_ctor_get(x_15, 0); lean_dec(x_18); x_19 = !lean_is_exclusive(x_16); if (x_19 == 0) { return x_15; } else { lean_object* x_20; lean_object* x_21; x_20 = lean_ctor_get(x_16, 0); lean_inc(x_20); lean_dec(x_16); x_21 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_21, 0, x_20); lean_ctor_set(x_15, 0, x_21); return x_15; } } else { lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; x_22 = lean_ctor_get(x_15, 1); lean_inc(x_22); lean_dec(x_15); x_23 = lean_ctor_get(x_16, 0); lean_inc(x_23); if (lean_is_exclusive(x_16)) { lean_ctor_release(x_16, 0); x_24 = x_16; } else { lean_dec_ref(x_16); x_24 = lean_box(0); } if (lean_is_scalar(x_24)) { x_25 = lean_alloc_ctor(0, 1, 0); } else { x_25 = x_24; } lean_ctor_set(x_25, 0, x_23); x_26 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_22); return x_26; } } else { uint8_t x_27; x_27 = !lean_is_exclusive(x_16); if (x_27 == 0) { lean_object* x_28; lean_object* x_29; x_28 = lean_ctor_get(x_16, 0); x_29 = lean_ctor_get(x_28, 0); lean_inc(x_29); if (lean_obj_tag(x_29) == 0) { lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_free_object(x_16); x_30 = lean_ctor_get(x_15, 1); lean_inc(x_30); lean_dec(x_15); x_31 = lean_ctor_get(x_28, 1); lean_inc(x_31); lean_dec(x_28); x_32 = lean_box(0); x_33 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1(x_31, x_32, x_7, x_30); return x_33; } else { uint8_t x_34; lean_dec(x_28); x_34 = !lean_is_exclusive(x_15); if (x_34 == 0) { lean_object* x_35; lean_object* x_36; x_35 = lean_ctor_get(x_15, 0); lean_dec(x_35); x_36 = lean_ctor_get(x_29, 0); lean_inc(x_36); lean_dec(x_29); lean_ctor_set(x_16, 0, x_36); return x_15; } else { lean_object* x_37; lean_object* x_38; lean_object* x_39; x_37 = lean_ctor_get(x_15, 1); lean_inc(x_37); lean_dec(x_15); x_38 = lean_ctor_get(x_29, 0); lean_inc(x_38); lean_dec(x_29); lean_ctor_set(x_16, 0, x_38); x_39 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_39, 0, x_16); lean_ctor_set(x_39, 1, x_37); return x_39; } } } else { lean_object* x_40; lean_object* x_41; x_40 = lean_ctor_get(x_16, 0); lean_inc(x_40); lean_dec(x_16); x_41 = lean_ctor_get(x_40, 0); lean_inc(x_41); if (lean_obj_tag(x_41) == 0) { lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; x_42 = lean_ctor_get(x_15, 1); lean_inc(x_42); lean_dec(x_15); x_43 = lean_ctor_get(x_40, 1); lean_inc(x_43); lean_dec(x_40); x_44 = lean_box(0); x_45 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1(x_43, x_44, x_7, x_42); return x_45; } else { lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_dec(x_40); x_46 = lean_ctor_get(x_15, 1); lean_inc(x_46); if (lean_is_exclusive(x_15)) { lean_ctor_release(x_15, 0); lean_ctor_release(x_15, 1); x_47 = x_15; } else { lean_dec_ref(x_15); x_47 = lean_box(0); } x_48 = lean_ctor_get(x_41, 0); lean_inc(x_48); lean_dec(x_41); x_49 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_49, 0, x_48); if (lean_is_scalar(x_47)) { x_50 = lean_alloc_ctor(0, 2, 0); } else { x_50 = x_47; } lean_ctor_set(x_50, 0, x_49); lean_ctor_set(x_50, 1, x_46); return x_50; } } } } else { uint8_t x_51; x_51 = !lean_is_exclusive(x_15); if (x_51 == 0) { return x_15; } else { lean_object* x_52; lean_object* x_53; lean_object* x_54; x_52 = lean_ctor_get(x_15, 0); x_53 = lean_ctor_get(x_15, 1); lean_inc(x_53); lean_inc(x_52); lean_dec(x_15); x_54 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_54, 0, x_52); lean_ctor_set(x_54, 1, x_53); return x_54; } } } else { lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; size_t x_59; size_t x_60; lean_object* x_61; x_55 = lean_ctor_get(x_5, 0); x_56 = lean_box(0); x_57 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_57, 0, x_56); lean_ctor_set(x_57, 1, x_6); x_58 = lean_array_get_size(x_55); x_59 = lean_usize_of_nat(x_58); lean_dec(x_58); x_60 = 0; x_61 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleCompletion___spec__5(x_1, x_2, x_3, x_56, x_55, x_59, x_60, x_57, x_7, x_8); if (lean_obj_tag(x_61) == 0) { lean_object* x_62; x_62 = lean_ctor_get(x_61, 0); lean_inc(x_62); if (lean_obj_tag(x_62) == 0) { uint8_t x_63; x_63 = !lean_is_exclusive(x_61); if (x_63 == 0) { lean_object* x_64; uint8_t x_65; x_64 = lean_ctor_get(x_61, 0); lean_dec(x_64); x_65 = !lean_is_exclusive(x_62); if (x_65 == 0) { return x_61; } else { lean_object* x_66; lean_object* x_67; x_66 = lean_ctor_get(x_62, 0); lean_inc(x_66); lean_dec(x_62); x_67 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_67, 0, x_66); lean_ctor_set(x_61, 0, x_67); return x_61; } } else { lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; x_68 = lean_ctor_get(x_61, 1); lean_inc(x_68); lean_dec(x_61); x_69 = lean_ctor_get(x_62, 0); lean_inc(x_69); if (lean_is_exclusive(x_62)) { lean_ctor_release(x_62, 0); x_70 = x_62; } else { lean_dec_ref(x_62); x_70 = lean_box(0); } if (lean_is_scalar(x_70)) { x_71 = lean_alloc_ctor(0, 1, 0); } else { x_71 = x_70; } lean_ctor_set(x_71, 0, x_69); x_72 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_72, 0, x_71); lean_ctor_set(x_72, 1, x_68); return x_72; } } else { uint8_t x_73; x_73 = !lean_is_exclusive(x_62); if (x_73 == 0) { lean_object* x_74; lean_object* x_75; x_74 = lean_ctor_get(x_62, 0); x_75 = lean_ctor_get(x_74, 0); lean_inc(x_75); if (lean_obj_tag(x_75) == 0) { lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_free_object(x_62); x_76 = lean_ctor_get(x_61, 1); lean_inc(x_76); lean_dec(x_61); x_77 = lean_ctor_get(x_74, 1); lean_inc(x_77); lean_dec(x_74); x_78 = lean_box(0); x_79 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1(x_77, x_78, x_7, x_76); return x_79; } else { uint8_t x_80; lean_dec(x_74); x_80 = !lean_is_exclusive(x_61); if (x_80 == 0) { lean_object* x_81; lean_object* x_82; x_81 = lean_ctor_get(x_61, 0); lean_dec(x_81); x_82 = lean_ctor_get(x_75, 0); lean_inc(x_82); lean_dec(x_75); lean_ctor_set(x_62, 0, x_82); return x_61; } else { lean_object* x_83; lean_object* x_84; lean_object* x_85; x_83 = lean_ctor_get(x_61, 1); lean_inc(x_83); lean_dec(x_61); x_84 = lean_ctor_get(x_75, 0); lean_inc(x_84); lean_dec(x_75); lean_ctor_set(x_62, 0, x_84); x_85 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_85, 0, x_62); lean_ctor_set(x_85, 1, x_83); return x_85; } } } else { lean_object* x_86; lean_object* x_87; x_86 = lean_ctor_get(x_62, 0); lean_inc(x_86); lean_dec(x_62); x_87 = lean_ctor_get(x_86, 0); lean_inc(x_87); if (lean_obj_tag(x_87) == 0) { lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; x_88 = lean_ctor_get(x_61, 1); lean_inc(x_88); lean_dec(x_61); x_89 = lean_ctor_get(x_86, 1); lean_inc(x_89); lean_dec(x_86); x_90 = lean_box(0); x_91 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1(x_89, x_90, x_7, x_88); return x_91; } else { lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_dec(x_86); x_92 = lean_ctor_get(x_61, 1); lean_inc(x_92); if (lean_is_exclusive(x_61)) { lean_ctor_release(x_61, 0); lean_ctor_release(x_61, 1); x_93 = x_61; } else { lean_dec_ref(x_61); x_93 = lean_box(0); } x_94 = lean_ctor_get(x_87, 0); lean_inc(x_94); lean_dec(x_87); x_95 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_95, 0, x_94); if (lean_is_scalar(x_93)) { x_96 = lean_alloc_ctor(0, 2, 0); } else { x_96 = x_93; } lean_ctor_set(x_96, 0, x_95); lean_ctor_set(x_96, 1, x_92); return x_96; } } } } else { uint8_t x_97; x_97 = !lean_is_exclusive(x_61); if (x_97 == 0) { return x_61; } else { lean_object* x_98; lean_object* x_99; lean_object* x_100; x_98 = lean_ctor_get(x_61, 0); x_99 = lean_ctor_get(x_61, 1); lean_inc(x_99); lean_inc(x_98); lean_dec(x_61); x_100 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_100, 0, x_98); lean_ctor_set(x_100, 1, x_99); return x_100; } } } } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleCompletion___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, size_t x_6, size_t x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; lean_object* x_12; lean_object* x_30; lean_object* x_31; uint8_t x_61; x_61 = x_7 < x_6; if (x_61 == 0) { lean_object* x_62; lean_object* x_63; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_62 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_62, 0, x_8); x_63 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_63, 0, x_62); lean_ctor_set(x_63, 1, x_10); return x_63; } else { lean_object* x_64; lean_object* x_65; lean_dec(x_8); x_64 = lean_array_uget(x_5, x_7); lean_inc(x_2); lean_inc(x_1); x_65 = l_Lean_Server_Completion_find_x3f(x_1, x_2, x_64, x_10); if (lean_obj_tag(x_65) == 0) { lean_object* x_66; x_66 = lean_ctor_get(x_65, 0); lean_inc(x_66); if (lean_obj_tag(x_66) == 0) { lean_object* x_67; lean_object* x_68; lean_object* x_69; x_67 = lean_ctor_get(x_65, 1); lean_inc(x_67); lean_dec(x_65); lean_inc(x_3); x_68 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_68, 0, x_3); x_69 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_69, 0, x_68); x_30 = x_69; x_31 = x_67; goto block_60; } else { lean_object* x_70; uint8_t x_71; x_70 = lean_ctor_get(x_65, 1); lean_inc(x_70); lean_dec(x_65); x_71 = !lean_is_exclusive(x_66); if (x_71 == 0) { lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; x_72 = lean_box(0); x_73 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_73, 0, x_66); lean_ctor_set(x_73, 1, x_72); x_74 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_74, 0, x_73); x_75 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_75, 0, x_74); x_30 = x_75; x_31 = x_70; goto block_60; } 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; x_76 = lean_ctor_get(x_66, 0); lean_inc(x_76); lean_dec(x_66); x_77 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_77, 0, x_76); x_78 = lean_box(0); x_79 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_79, 0, x_77); lean_ctor_set(x_79, 1, x_78); x_80 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_80, 0, x_79); x_81 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_81, 0, x_80); x_30 = x_81; x_31 = x_70; goto block_60; } } } else { uint8_t x_82; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_82 = !lean_is_exclusive(x_65); if (x_82 == 0) { return x_65; } else { lean_object* x_83; lean_object* x_84; lean_object* x_85; x_83 = lean_ctor_get(x_65, 0); x_84 = lean_ctor_get(x_65, 1); lean_inc(x_84); lean_inc(x_83); lean_dec(x_65); x_85 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_85, 0, x_83); lean_ctor_set(x_85, 1, x_84); return x_85; } } } block_29: { uint8_t x_13; x_13 = !lean_is_exclusive(x_11); if (x_13 == 0) { lean_object* x_14; x_14 = lean_ctor_get(x_11, 0); if (lean_obj_tag(x_14) == 0) { lean_object* x_15; lean_object* x_16; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); lean_dec(x_14); lean_ctor_set(x_11, 0, x_15); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_11); lean_ctor_set(x_16, 1, x_12); return x_16; } else { lean_object* x_17; size_t x_18; size_t x_19; lean_free_object(x_11); x_17 = lean_ctor_get(x_14, 0); lean_inc(x_17); lean_dec(x_14); x_18 = 1; x_19 = x_7 + x_18; x_7 = x_19; x_8 = x_17; x_10 = x_12; goto _start; } } else { lean_object* x_21; x_21 = lean_ctor_get(x_11, 0); lean_inc(x_21); lean_dec(x_11); if (lean_obj_tag(x_21) == 0) { lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_22 = lean_ctor_get(x_21, 0); lean_inc(x_22); lean_dec(x_21); x_23 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_23, 0, x_22); x_24 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_12); return x_24; } else { lean_object* x_25; size_t x_26; size_t x_27; x_25 = lean_ctor_get(x_21, 0); lean_inc(x_25); lean_dec(x_21); x_26 = 1; x_27 = x_7 + x_26; x_7 = x_27; x_8 = x_25; x_10 = x_12; goto _start; } } } block_60: { uint8_t x_32; x_32 = !lean_is_exclusive(x_30); if (x_32 == 0) { lean_object* x_33; x_33 = lean_ctor_get(x_30, 0); if (lean_obj_tag(x_33) == 0) { uint8_t x_34; x_34 = !lean_is_exclusive(x_33); if (x_34 == 0) { lean_object* x_35; lean_object* x_36; lean_object* x_37; x_35 = lean_ctor_get(x_33, 0); lean_inc(x_35); x_36 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_36, 0, x_35); x_37 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_37, 0, x_36); lean_ctor_set(x_37, 1, x_35); lean_ctor_set(x_33, 0, x_37); x_11 = x_30; x_12 = x_31; goto block_29; } else { lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; x_38 = lean_ctor_get(x_33, 0); lean_inc(x_38); lean_dec(x_33); lean_inc(x_38); x_39 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_39, 0, x_38); x_40 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_40, 0, x_39); lean_ctor_set(x_40, 1, x_38); x_41 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_41, 0, x_40); lean_ctor_set(x_30, 0, x_41); x_11 = x_30; x_12 = x_31; goto block_29; } } else { uint8_t x_42; x_42 = !lean_is_exclusive(x_33); if (x_42 == 0) { lean_object* x_43; lean_object* x_44; x_43 = lean_ctor_get(x_33, 0); lean_inc(x_4); x_44 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_44, 0, x_4); lean_ctor_set(x_44, 1, x_43); lean_ctor_set(x_33, 0, x_44); x_11 = x_30; x_12 = x_31; goto block_29; } else { lean_object* x_45; lean_object* x_46; lean_object* x_47; x_45 = lean_ctor_get(x_33, 0); lean_inc(x_45); lean_dec(x_33); lean_inc(x_4); x_46 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_46, 0, x_4); lean_ctor_set(x_46, 1, x_45); x_47 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_47, 0, x_46); lean_ctor_set(x_30, 0, x_47); x_11 = x_30; x_12 = x_31; goto block_29; } } } else { lean_object* x_48; x_48 = lean_ctor_get(x_30, 0); lean_inc(x_48); lean_dec(x_30); if (lean_obj_tag(x_48) == 0) { 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_49 = lean_ctor_get(x_48, 0); lean_inc(x_49); if (lean_is_exclusive(x_48)) { lean_ctor_release(x_48, 0); x_50 = x_48; } else { lean_dec_ref(x_48); x_50 = lean_box(0); } lean_inc(x_49); x_51 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_51, 0, x_49); x_52 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_52, 0, x_51); lean_ctor_set(x_52, 1, x_49); if (lean_is_scalar(x_50)) { x_53 = lean_alloc_ctor(0, 1, 0); } else { x_53 = x_50; } lean_ctor_set(x_53, 0, x_52); x_54 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_54, 0, x_53); x_11 = x_54; x_12 = x_31; goto block_29; } else { lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; x_55 = lean_ctor_get(x_48, 0); lean_inc(x_55); if (lean_is_exclusive(x_48)) { lean_ctor_release(x_48, 0); x_56 = x_48; } else { lean_dec_ref(x_48); x_56 = lean_box(0); } lean_inc(x_4); x_57 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_57, 0, x_4); lean_ctor_set(x_57, 1, x_55); if (lean_is_scalar(x_56)) { x_58 = lean_alloc_ctor(1, 1, 0); } else { x_58 = x_56; } lean_ctor_set(x_58, 0, x_57); x_59 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_59, 0, x_58); x_11 = x_59; x_12 = x_31; goto block_29; } } } } } lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; x_5 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_5, 0, x_1); x_6 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_6, 0, x_5); lean_ctor_set(x_6, 1, x_4); return x_6; } } lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__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) { _start: { lean_object* x_8; lean_object* x_9; x_8 = lean_ctor_get(x_4, 0); lean_inc(x_5); lean_inc(x_3); lean_inc(x_2); lean_inc(x_1); x_9 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3(x_1, x_2, x_3, x_5, x_8, x_5, x_6, x_7); lean_dec(x_5); if (lean_obj_tag(x_9) == 0) { lean_object* x_10; x_10 = lean_ctor_get(x_9, 0); lean_inc(x_10); if (lean_obj_tag(x_10) == 0) { uint8_t x_11; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_11 = !lean_is_exclusive(x_9); if (x_11 == 0) { lean_object* x_12; uint8_t x_13; x_12 = lean_ctor_get(x_9, 0); lean_dec(x_12); x_13 = !lean_is_exclusive(x_10); if (x_13 == 0) { return x_9; } else { lean_object* x_14; lean_object* x_15; x_14 = lean_ctor_get(x_10, 0); lean_inc(x_14); lean_dec(x_10); x_15 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_9, 0, x_15); return x_9; } } else { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; x_16 = lean_ctor_get(x_9, 1); lean_inc(x_16); lean_dec(x_9); x_17 = lean_ctor_get(x_10, 0); lean_inc(x_17); if (lean_is_exclusive(x_10)) { lean_ctor_release(x_10, 0); x_18 = x_10; } else { lean_dec_ref(x_10); x_18 = lean_box(0); } if (lean_is_scalar(x_18)) { x_19 = lean_alloc_ctor(0, 1, 0); } else { x_19 = x_18; } lean_ctor_set(x_19, 0, x_17); x_20 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_20, 0, x_19); lean_ctor_set(x_20, 1, x_16); return x_20; } } else { uint8_t x_21; x_21 = !lean_is_exclusive(x_10); if (x_21 == 0) { lean_object* x_22; x_22 = lean_ctor_get(x_10, 0); if (lean_obj_tag(x_22) == 0) { uint8_t x_23; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_23 = !lean_is_exclusive(x_9); if (x_23 == 0) { lean_object* x_24; lean_object* x_25; x_24 = lean_ctor_get(x_9, 0); lean_dec(x_24); x_25 = lean_ctor_get(x_22, 0); lean_inc(x_25); lean_dec(x_22); lean_ctor_set(x_10, 0, x_25); return x_9; } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; x_26 = lean_ctor_get(x_9, 1); lean_inc(x_26); lean_dec(x_9); x_27 = lean_ctor_get(x_22, 0); lean_inc(x_27); lean_dec(x_22); lean_ctor_set(x_10, 0, x_27); x_28 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_28, 0, x_10); lean_ctor_set(x_28, 1, x_26); 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; size_t x_35; size_t x_36; lean_object* x_37; lean_free_object(x_10); x_29 = lean_ctor_get(x_9, 1); lean_inc(x_29); lean_dec(x_9); x_30 = lean_ctor_get(x_22, 0); lean_inc(x_30); lean_dec(x_22); x_31 = lean_ctor_get(x_4, 1); x_32 = lean_box(0); x_33 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_33, 0, x_32); lean_ctor_set(x_33, 1, x_30); 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 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleCompletion___spec__6(x_1, x_2, x_3, x_32, x_31, x_35, x_36, x_33, x_6, x_29); if (lean_obj_tag(x_37) == 0) { lean_object* x_38; x_38 = lean_ctor_get(x_37, 0); lean_inc(x_38); if (lean_obj_tag(x_38) == 0) { uint8_t x_39; x_39 = !lean_is_exclusive(x_37); if (x_39 == 0) { lean_object* x_40; uint8_t x_41; x_40 = lean_ctor_get(x_37, 0); lean_dec(x_40); x_41 = !lean_is_exclusive(x_38); if (x_41 == 0) { return x_37; } else { lean_object* x_42; lean_object* x_43; x_42 = lean_ctor_get(x_38, 0); lean_inc(x_42); lean_dec(x_38); x_43 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_43, 0, x_42); lean_ctor_set(x_37, 0, x_43); return x_37; } } else { lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; x_44 = lean_ctor_get(x_37, 1); lean_inc(x_44); lean_dec(x_37); x_45 = lean_ctor_get(x_38, 0); lean_inc(x_45); if (lean_is_exclusive(x_38)) { lean_ctor_release(x_38, 0); x_46 = x_38; } else { lean_dec_ref(x_38); x_46 = lean_box(0); } if (lean_is_scalar(x_46)) { x_47 = lean_alloc_ctor(0, 1, 0); } else { x_47 = x_46; } lean_ctor_set(x_47, 0, x_45); x_48 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_48, 0, x_47); lean_ctor_set(x_48, 1, x_44); return x_48; } } else { uint8_t x_49; x_49 = !lean_is_exclusive(x_38); if (x_49 == 0) { lean_object* x_50; lean_object* x_51; x_50 = lean_ctor_get(x_38, 0); x_51 = lean_ctor_get(x_50, 0); lean_inc(x_51); if (lean_obj_tag(x_51) == 0) { lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_free_object(x_38); x_52 = lean_ctor_get(x_37, 1); lean_inc(x_52); lean_dec(x_37); x_53 = lean_ctor_get(x_50, 1); lean_inc(x_53); lean_dec(x_50); x_54 = lean_box(0); x_55 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2___lambda__1(x_53, x_54, x_6, x_52); return x_55; } else { uint8_t x_56; lean_dec(x_50); x_56 = !lean_is_exclusive(x_37); if (x_56 == 0) { lean_object* x_57; lean_object* x_58; x_57 = lean_ctor_get(x_37, 0); lean_dec(x_57); x_58 = lean_ctor_get(x_51, 0); lean_inc(x_58); lean_dec(x_51); lean_ctor_set(x_38, 0, x_58); return x_37; } else { lean_object* x_59; lean_object* x_60; lean_object* x_61; x_59 = lean_ctor_get(x_37, 1); lean_inc(x_59); lean_dec(x_37); x_60 = lean_ctor_get(x_51, 0); lean_inc(x_60); lean_dec(x_51); lean_ctor_set(x_38, 0, x_60); x_61 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_61, 0, x_38); lean_ctor_set(x_61, 1, x_59); return x_61; } } } else { lean_object* x_62; lean_object* x_63; x_62 = lean_ctor_get(x_38, 0); lean_inc(x_62); lean_dec(x_38); x_63 = lean_ctor_get(x_62, 0); lean_inc(x_63); if (lean_obj_tag(x_63) == 0) { lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; x_64 = lean_ctor_get(x_37, 1); lean_inc(x_64); lean_dec(x_37); x_65 = lean_ctor_get(x_62, 1); lean_inc(x_65); lean_dec(x_62); x_66 = lean_box(0); x_67 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2___lambda__1(x_65, x_66, x_6, x_64); return x_67; } else { lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_dec(x_62); x_68 = lean_ctor_get(x_37, 1); lean_inc(x_68); if (lean_is_exclusive(x_37)) { lean_ctor_release(x_37, 0); lean_ctor_release(x_37, 1); x_69 = x_37; } else { lean_dec_ref(x_37); x_69 = lean_box(0); } x_70 = lean_ctor_get(x_63, 0); lean_inc(x_70); lean_dec(x_63); x_71 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_71, 0, x_70); if (lean_is_scalar(x_69)) { x_72 = lean_alloc_ctor(0, 2, 0); } else { x_72 = x_69; } lean_ctor_set(x_72, 0, x_71); lean_ctor_set(x_72, 1, x_68); return x_72; } } } } else { uint8_t x_73; x_73 = !lean_is_exclusive(x_37); if (x_73 == 0) { return x_37; } else { lean_object* x_74; lean_object* x_75; lean_object* x_76; x_74 = lean_ctor_get(x_37, 0); x_75 = lean_ctor_get(x_37, 1); lean_inc(x_75); lean_inc(x_74); lean_dec(x_37); x_76 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_76, 0, x_74); lean_ctor_set(x_76, 1, x_75); return x_76; } } } } else { lean_object* x_77; x_77 = lean_ctor_get(x_10, 0); lean_inc(x_77); lean_dec(x_10); if (lean_obj_tag(x_77) == 0) { lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_78 = lean_ctor_get(x_9, 1); lean_inc(x_78); if (lean_is_exclusive(x_9)) { lean_ctor_release(x_9, 0); lean_ctor_release(x_9, 1); x_79 = x_9; } else { lean_dec_ref(x_9); x_79 = lean_box(0); } x_80 = lean_ctor_get(x_77, 0); lean_inc(x_80); lean_dec(x_77); x_81 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_81, 0, x_80); if (lean_is_scalar(x_79)) { x_82 = lean_alloc_ctor(0, 2, 0); } else { x_82 = x_79; } lean_ctor_set(x_82, 0, x_81); lean_ctor_set(x_82, 1, x_78); return x_82; } else { lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; size_t x_89; size_t x_90; lean_object* x_91; x_83 = lean_ctor_get(x_9, 1); lean_inc(x_83); lean_dec(x_9); x_84 = lean_ctor_get(x_77, 0); lean_inc(x_84); lean_dec(x_77); x_85 = lean_ctor_get(x_4, 1); x_86 = lean_box(0); x_87 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_87, 0, x_86); lean_ctor_set(x_87, 1, x_84); x_88 = lean_array_get_size(x_85); x_89 = lean_usize_of_nat(x_88); lean_dec(x_88); x_90 = 0; x_91 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleCompletion___spec__6(x_1, x_2, x_3, x_86, x_85, x_89, x_90, x_87, x_6, x_83); if (lean_obj_tag(x_91) == 0) { lean_object* x_92; x_92 = lean_ctor_get(x_91, 0); lean_inc(x_92); if (lean_obj_tag(x_92) == 0) { lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; x_93 = lean_ctor_get(x_91, 1); lean_inc(x_93); if (lean_is_exclusive(x_91)) { lean_ctor_release(x_91, 0); lean_ctor_release(x_91, 1); x_94 = x_91; } else { lean_dec_ref(x_91); x_94 = lean_box(0); } x_95 = lean_ctor_get(x_92, 0); lean_inc(x_95); if (lean_is_exclusive(x_92)) { lean_ctor_release(x_92, 0); x_96 = x_92; } else { lean_dec_ref(x_92); x_96 = lean_box(0); } if (lean_is_scalar(x_96)) { x_97 = lean_alloc_ctor(0, 1, 0); } else { x_97 = x_96; } lean_ctor_set(x_97, 0, x_95); if (lean_is_scalar(x_94)) { x_98 = lean_alloc_ctor(0, 2, 0); } else { x_98 = x_94; } lean_ctor_set(x_98, 0, x_97); lean_ctor_set(x_98, 1, x_93); return x_98; } else { lean_object* x_99; lean_object* x_100; lean_object* x_101; x_99 = lean_ctor_get(x_92, 0); lean_inc(x_99); if (lean_is_exclusive(x_92)) { lean_ctor_release(x_92, 0); x_100 = x_92; } else { lean_dec_ref(x_92); x_100 = lean_box(0); } x_101 = lean_ctor_get(x_99, 0); lean_inc(x_101); if (lean_obj_tag(x_101) == 0) { lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_dec(x_100); x_102 = lean_ctor_get(x_91, 1); lean_inc(x_102); lean_dec(x_91); x_103 = lean_ctor_get(x_99, 1); lean_inc(x_103); lean_dec(x_99); x_104 = lean_box(0); x_105 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2___lambda__1(x_103, x_104, x_6, x_102); return x_105; } else { lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_dec(x_99); x_106 = lean_ctor_get(x_91, 1); lean_inc(x_106); if (lean_is_exclusive(x_91)) { lean_ctor_release(x_91, 0); lean_ctor_release(x_91, 1); x_107 = x_91; } else { lean_dec_ref(x_91); x_107 = lean_box(0); } x_108 = lean_ctor_get(x_101, 0); lean_inc(x_108); lean_dec(x_101); if (lean_is_scalar(x_100)) { x_109 = lean_alloc_ctor(1, 1, 0); } else { x_109 = x_100; } lean_ctor_set(x_109, 0, x_108); if (lean_is_scalar(x_107)) { x_110 = lean_alloc_ctor(0, 2, 0); } else { x_110 = x_107; } lean_ctor_set(x_110, 0, x_109); lean_ctor_set(x_110, 1, x_106); return x_110; } } } else { lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; x_111 = lean_ctor_get(x_91, 0); lean_inc(x_111); x_112 = lean_ctor_get(x_91, 1); lean_inc(x_112); if (lean_is_exclusive(x_91)) { lean_ctor_release(x_91, 0); lean_ctor_release(x_91, 1); x_113 = x_91; } else { lean_dec_ref(x_91); x_113 = lean_box(0); } if (lean_is_scalar(x_113)) { x_114 = lean_alloc_ctor(1, 2, 0); } else { x_114 = x_113; } lean_ctor_set(x_114, 0, x_111); lean_ctor_set(x_114, 1, x_112); return x_114; } } } } } else { uint8_t x_115; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_115 = !lean_is_exclusive(x_9); if (x_115 == 0) { return x_9; } else { lean_object* x_116; lean_object* x_117; lean_object* x_118; x_116 = lean_ctor_get(x_9, 0); x_117 = lean_ctor_get(x_9, 1); lean_inc(x_117); lean_inc(x_116); lean_dec(x_9); x_118 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_118, 0, x_116); lean_ctor_set(x_118, 1, x_117); return x_118; } } } } uint8_t l_Lean_Server_FileWorker_handleCompletion___lambda__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; uint8_t x_4; x_3 = l_Lean_Server_Snapshots_Snapshot_endPos(x_2); x_4 = lean_nat_dec_le(x_1, x_3); lean_dec(x_3); return x_4; } } lean_object* l_Lean_Server_FileWorker_handleCompletion___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; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_7 = lean_ctor_get(x_4, 3); x_8 = lean_ctor_get(x_7, 7); x_9 = lean_ctor_get(x_8, 1); x_10 = l_Array_findSomeM_x3f___rarg___closed__1; x_11 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2(x_1, x_2, x_10, x_9, x_10, x_5, x_6); if (lean_obj_tag(x_11) == 0) { lean_object* x_12; x_12 = lean_ctor_get(x_11, 0); lean_inc(x_12); if (lean_obj_tag(x_12) == 0) { uint8_t x_13; lean_dec(x_3); x_13 = !lean_is_exclusive(x_11); if (x_13 == 0) { lean_object* x_14; uint8_t x_15; x_14 = lean_ctor_get(x_11, 0); lean_dec(x_14); x_15 = !lean_is_exclusive(x_12); if (x_15 == 0) { return x_11; } else { lean_object* x_16; lean_object* x_17; x_16 = lean_ctor_get(x_12, 0); lean_inc(x_16); lean_dec(x_12); x_17 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_11, 0, x_17); return x_11; } } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; x_18 = lean_ctor_get(x_11, 1); lean_inc(x_18); lean_dec(x_11); x_19 = lean_ctor_get(x_12, 0); lean_inc(x_19); if (lean_is_exclusive(x_12)) { lean_ctor_release(x_12, 0); x_20 = x_12; } else { lean_dec_ref(x_12); x_20 = lean_box(0); } if (lean_is_scalar(x_20)) { x_21 = lean_alloc_ctor(0, 1, 0); } else { x_21 = x_20; } lean_ctor_set(x_21, 0, x_19); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_21); lean_ctor_set(x_22, 1, x_18); return x_22; } } else { uint8_t x_23; x_23 = !lean_is_exclusive(x_12); if (x_23 == 0) { lean_object* x_24; lean_object* x_25; x_24 = lean_ctor_get(x_12, 0); x_25 = lean_ctor_get(x_24, 0); lean_inc(x_25); lean_dec(x_24); if (lean_obj_tag(x_25) == 0) { uint8_t x_26; lean_free_object(x_12); x_26 = !lean_is_exclusive(x_11); if (x_26 == 0) { lean_object* x_27; x_27 = lean_ctor_get(x_11, 0); lean_dec(x_27); lean_ctor_set(x_11, 0, x_3); return x_11; } else { lean_object* x_28; lean_object* x_29; x_28 = lean_ctor_get(x_11, 1); lean_inc(x_28); lean_dec(x_11); x_29 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_29, 0, x_3); lean_ctor_set(x_29, 1, x_28); return x_29; } } else { uint8_t x_30; lean_dec(x_3); x_30 = !lean_is_exclusive(x_11); if (x_30 == 0) { lean_object* x_31; lean_object* x_32; x_31 = lean_ctor_get(x_11, 0); lean_dec(x_31); x_32 = lean_ctor_get(x_25, 0); lean_inc(x_32); lean_dec(x_25); lean_ctor_set(x_12, 0, x_32); return x_11; } else { lean_object* x_33; lean_object* x_34; lean_object* x_35; x_33 = lean_ctor_get(x_11, 1); lean_inc(x_33); lean_dec(x_11); x_34 = lean_ctor_get(x_25, 0); lean_inc(x_34); lean_dec(x_25); lean_ctor_set(x_12, 0, x_34); x_35 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_35, 0, x_12); lean_ctor_set(x_35, 1, x_33); return x_35; } } } else { lean_object* x_36; lean_object* x_37; x_36 = lean_ctor_get(x_12, 0); lean_inc(x_36); lean_dec(x_12); x_37 = lean_ctor_get(x_36, 0); lean_inc(x_37); lean_dec(x_36); if (lean_obj_tag(x_37) == 0) { lean_object* x_38; lean_object* x_39; lean_object* x_40; x_38 = lean_ctor_get(x_11, 1); lean_inc(x_38); if (lean_is_exclusive(x_11)) { lean_ctor_release(x_11, 0); lean_ctor_release(x_11, 1); x_39 = x_11; } else { lean_dec_ref(x_11); x_39 = lean_box(0); } if (lean_is_scalar(x_39)) { x_40 = lean_alloc_ctor(0, 2, 0); } else { x_40 = x_39; } lean_ctor_set(x_40, 0, x_3); lean_ctor_set(x_40, 1, x_38); 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_dec(x_3); x_41 = lean_ctor_get(x_11, 1); lean_inc(x_41); if (lean_is_exclusive(x_11)) { lean_ctor_release(x_11, 0); lean_ctor_release(x_11, 1); x_42 = x_11; } else { lean_dec_ref(x_11); x_42 = lean_box(0); } x_43 = lean_ctor_get(x_37, 0); lean_inc(x_43); lean_dec(x_37); x_44 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_44, 0, x_43); if (lean_is_scalar(x_42)) { x_45 = lean_alloc_ctor(0, 2, 0); } else { x_45 = x_42; } lean_ctor_set(x_45, 0, x_44); lean_ctor_set(x_45, 1, x_41); return x_45; } } } } else { uint8_t x_46; lean_dec(x_3); 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; } } } } static lean_object* _init_l_Lean_Server_FileWorker_handleCompletion___closed__1() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; x_1 = 1; x_2 = l_Array_empty___closed__1; x_3 = lean_alloc_ctor(0, 1, 1); lean_ctor_set(x_3, 0, x_2); lean_ctor_set_uint8(x_3, sizeof(void*)*1, x_1); return x_3; } } static lean_object* _init_l_Lean_Server_FileWorker_handleCompletion___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Server_FileWorker_handleCompletion___closed__1; x_2 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l_Lean_Server_FileWorker_handleCompletion___closed__3() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Server_FileWorker_handleCompletion___closed__2; x_2 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Server_FileWorker_handleCompletion___spec__1___rarg___boxed), 3, 1); lean_closure_set(x_2, 0, x_1); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleCompletion(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_4 = lean_ctor_get(x_2, 4); lean_inc(x_4); x_5 = lean_st_ref_get(x_4, x_3); lean_dec(x_4); x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = lean_ctor_get(x_6, 0); lean_inc(x_8); x_9 = lean_ctor_get(x_8, 2); lean_inc(x_9); lean_dec(x_8); x_10 = lean_ctor_get(x_1, 1); lean_inc(x_10); lean_dec(x_1); x_11 = l_Lean_FileMap_lspPosToUtf8Pos(x_9, x_10); lean_inc(x_11); x_12 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleCompletion___lambda__1___boxed), 2, 1); lean_closure_set(x_12, 0, x_11); x_13 = l_Lean_Server_FileWorker_handleCompletion___closed__2; x_14 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleCompletion___lambda__2___boxed), 6, 3); lean_closure_set(x_14, 0, x_9); lean_closure_set(x_14, 1, x_11); lean_closure_set(x_14, 2, x_13); x_15 = l_Lean_Server_FileWorker_handleCompletion___closed__3; x_16 = l_Lean_Server_FileWorker_withWaitFindSnap___rarg(x_6, x_12, x_15, x_14, x_2, x_7); return x_16; } } lean_object* l_ReaderT_pure___at_Lean_Server_FileWorker_handleCompletion___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_ReaderT_pure___at_Lean_Server_FileWorker_handleCompletion___spec__1___rarg(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleCompletion___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, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { size_t x_12; size_t x_13; lean_object* x_14; x_12 = lean_unbox_usize(x_7); lean_dec(x_7); x_13 = lean_unbox_usize(x_8); lean_dec(x_8); x_14 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleCompletion___spec__4(x_1, x_2, x_3, x_4, x_5, x_6, x_12, x_13, x_9, x_10, x_11); lean_dec(x_10); lean_dec(x_6); lean_dec(x_4); return x_14; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleCompletion___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* x_8, lean_object* x_9, lean_object* x_10) { _start: { size_t x_11; size_t x_12; lean_object* x_13; x_11 = lean_unbox_usize(x_6); lean_dec(x_6); x_12 = lean_unbox_usize(x_7); lean_dec(x_7); x_13 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleCompletion___spec__5(x_1, x_2, x_3, x_4, x_5, x_11, x_12, x_8, x_9, x_10); lean_dec(x_9); lean_dec(x_5); return x_13; } } lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); return x_5; } } lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__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: { lean_object* x_9; x_9 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); lean_dec(x_7); lean_dec(x_5); lean_dec(x_4); return x_9; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleCompletion___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* x_8, lean_object* x_9, lean_object* x_10) { _start: { size_t x_11; size_t x_12; lean_object* x_13; x_11 = lean_unbox_usize(x_6); lean_dec(x_6); x_12 = lean_unbox_usize(x_7); lean_dec(x_7); x_13 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleCompletion___spec__6(x_1, x_2, x_3, x_4, x_5, x_11, x_12, x_8, x_9, x_10); lean_dec(x_9); lean_dec(x_5); return x_13; } } lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2___lambda__1(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); return x_5; } } lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___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: { lean_object* x_8; x_8 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_6); lean_dec(x_4); return x_8; } } lean_object* l_Lean_Server_FileWorker_handleCompletion___lambda__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l_Lean_Server_FileWorker_handleCompletion___lambda__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } lean_object* l_Lean_Server_FileWorker_handleCompletion___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_FileWorker_handleCompletion___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_4); return x_7; } } lean_object* l_Lean_Server_FileWorker_handleHover_match__1___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_dec(x_2); x_4 = lean_apply_1(x_3, x_1); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_dec(x_3); x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); lean_dec(x_1); x_6 = lean_apply_1(x_2, x_5); return x_6; } } } lean_object* l_Lean_Server_FileWorker_handleHover_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleHover_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_dec(x_2); x_4 = lean_apply_1(x_3, x_1); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_dec(x_3); x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); lean_dec(x_1); x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = lean_apply_2(x_2, x_6, x_7); return x_8; } } } lean_object* l_Lean_Server_FileWorker_handleHover_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover_match__2___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleHover_match__3___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_box(0); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_apply_1(x_3, x_6); return x_7; } } } lean_object* l_Lean_Server_FileWorker_handleHover_match__3(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover_match__3___rarg), 3, 0); return x_2; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, size_t x_7, size_t x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { lean_object* x_12; lean_object* x_13; uint8_t x_36; x_36 = x_8 < x_7; if (x_36 == 0) { lean_object* x_37; lean_object* x_38; lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); x_37 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_37, 0, x_9); x_38 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_38, 0, x_37); lean_ctor_set(x_38, 1, x_11); return x_38; } else { lean_object* x_39; lean_object* x_40; lean_object* x_41; x_39 = lean_array_uget(x_6, x_8); x_40 = lean_ctor_get(x_9, 1); lean_inc(x_40); lean_dec(x_9); lean_inc(x_3); lean_inc(x_2); x_41 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__2(x_1, x_2, x_3, x_4, x_39, x_40, x_10, x_11); lean_dec(x_39); if (lean_obj_tag(x_41) == 0) { lean_object* x_42; x_42 = lean_ctor_get(x_41, 0); lean_inc(x_42); if (lean_obj_tag(x_42) == 0) { lean_object* x_43; uint8_t x_44; x_43 = lean_ctor_get(x_41, 1); lean_inc(x_43); lean_dec(x_41); x_44 = !lean_is_exclusive(x_42); if (x_44 == 0) { x_12 = x_42; x_13 = x_43; goto block_35; } else { lean_object* x_45; lean_object* x_46; x_45 = lean_ctor_get(x_42, 0); lean_inc(x_45); lean_dec(x_42); x_46 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_46, 0, x_45); x_12 = x_46; x_13 = x_43; goto block_35; } } else { uint8_t x_47; x_47 = !lean_is_exclusive(x_42); if (x_47 == 0) { lean_object* x_48; x_48 = lean_ctor_get(x_42, 0); if (lean_obj_tag(x_48) == 0) { lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; x_49 = lean_ctor_get(x_41, 1); lean_inc(x_49); lean_dec(x_41); x_50 = lean_ctor_get(x_48, 0); lean_inc(x_50); x_51 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_51, 0, x_48); x_52 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_52, 0, x_51); lean_ctor_set(x_52, 1, x_50); x_53 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_53, 0, x_52); lean_ctor_set(x_42, 0, x_53); x_12 = x_42; x_13 = x_49; goto block_35; } else { lean_object* x_54; uint8_t x_55; x_54 = lean_ctor_get(x_41, 1); lean_inc(x_54); lean_dec(x_41); x_55 = !lean_is_exclusive(x_48); if (x_55 == 0) { lean_object* x_56; lean_object* x_57; x_56 = lean_ctor_get(x_48, 0); lean_inc(x_5); x_57 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_57, 0, x_5); lean_ctor_set(x_57, 1, x_56); lean_ctor_set(x_48, 0, x_57); x_12 = x_42; x_13 = x_54; goto block_35; } else { lean_object* x_58; lean_object* x_59; lean_object* x_60; x_58 = lean_ctor_get(x_48, 0); lean_inc(x_58); lean_dec(x_48); lean_inc(x_5); x_59 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_59, 0, x_5); lean_ctor_set(x_59, 1, x_58); x_60 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_60, 0, x_59); lean_ctor_set(x_42, 0, x_60); x_12 = x_42; x_13 = x_54; goto block_35; } } } else { lean_object* x_61; x_61 = lean_ctor_get(x_42, 0); lean_inc(x_61); lean_dec(x_42); if (lean_obj_tag(x_61) == 0) { lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; x_62 = lean_ctor_get(x_41, 1); lean_inc(x_62); lean_dec(x_41); x_63 = lean_ctor_get(x_61, 0); lean_inc(x_63); x_64 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_64, 0, x_61); x_65 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_65, 0, x_64); lean_ctor_set(x_65, 1, x_63); x_66 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_66, 0, x_65); x_67 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_67, 0, x_66); x_12 = x_67; x_13 = x_62; goto block_35; } else { 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_68 = lean_ctor_get(x_41, 1); lean_inc(x_68); lean_dec(x_41); x_69 = lean_ctor_get(x_61, 0); lean_inc(x_69); if (lean_is_exclusive(x_61)) { lean_ctor_release(x_61, 0); x_70 = x_61; } else { lean_dec_ref(x_61); x_70 = lean_box(0); } lean_inc(x_5); x_71 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_71, 0, x_5); lean_ctor_set(x_71, 1, x_69); if (lean_is_scalar(x_70)) { x_72 = lean_alloc_ctor(1, 1, 0); } else { x_72 = x_70; } lean_ctor_set(x_72, 0, x_71); x_73 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_73, 0, x_72); x_12 = x_73; x_13 = x_68; goto block_35; } } } } else { uint8_t x_74; lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); x_74 = !lean_is_exclusive(x_41); if (x_74 == 0) { return x_41; } else { lean_object* x_75; lean_object* x_76; lean_object* x_77; x_75 = lean_ctor_get(x_41, 0); x_76 = lean_ctor_get(x_41, 1); lean_inc(x_76); lean_inc(x_75); lean_dec(x_41); x_77 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_77, 0, x_75); lean_ctor_set(x_77, 1, x_76); return x_77; } } } block_35: { if (lean_obj_tag(x_12) == 0) { uint8_t x_14; lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); x_14 = !lean_is_exclusive(x_12); if (x_14 == 0) { lean_object* x_15; x_15 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_15, 0, x_12); lean_ctor_set(x_15, 1, x_13); return x_15; } else { lean_object* x_16; lean_object* x_17; lean_object* x_18; x_16 = lean_ctor_get(x_12, 0); lean_inc(x_16); lean_dec(x_12); x_17 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_17, 0, x_16); x_18 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_13); return x_18; } } else { uint8_t x_19; x_19 = !lean_is_exclusive(x_12); if (x_19 == 0) { lean_object* x_20; x_20 = lean_ctor_get(x_12, 0); if (lean_obj_tag(x_20) == 0) { lean_object* x_21; lean_object* x_22; lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); x_21 = lean_ctor_get(x_20, 0); lean_inc(x_21); lean_dec(x_20); lean_ctor_set(x_12, 0, x_21); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_12); lean_ctor_set(x_22, 1, x_13); return x_22; } else { lean_object* x_23; size_t x_24; size_t x_25; lean_free_object(x_12); x_23 = lean_ctor_get(x_20, 0); lean_inc(x_23); lean_dec(x_20); x_24 = 1; x_25 = x_8 + x_24; x_8 = x_25; x_9 = x_23; x_11 = x_13; goto _start; } } else { lean_object* x_27; x_27 = lean_ctor_get(x_12, 0); lean_inc(x_27); lean_dec(x_12); if (lean_obj_tag(x_27) == 0) { lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); x_28 = lean_ctor_get(x_27, 0); lean_inc(x_28); lean_dec(x_27); x_29 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_29, 0, x_28); x_30 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_30, 0, x_29); lean_ctor_set(x_30, 1, x_13); return x_30; } else { lean_object* x_31; size_t x_32; size_t x_33; x_31 = lean_ctor_get(x_27, 0); lean_inc(x_31); lean_dec(x_27); x_32 = 1; x_33 = x_8 + x_32; x_8 = x_33; x_9 = x_31; x_11 = x_13; goto _start; } } } } } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, size_t x_6, size_t x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; lean_object* x_12; lean_object* x_30; lean_object* x_31; uint8_t x_56; x_56 = x_7 < x_6; if (x_56 == 0) { lean_object* x_57; lean_object* x_58; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_57 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_57, 0, x_8); x_58 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_58, 0, x_57); lean_ctor_set(x_58, 1, x_10); return x_58; } else { lean_object* x_59; lean_object* x_60; lean_dec(x_8); x_59 = lean_array_uget(x_5, x_7); lean_inc(x_2); x_60 = l_Lean_Elab_InfoTree_hoverableInfoAt_x3f(x_59, x_2); if (lean_obj_tag(x_60) == 0) { lean_object* x_61; lean_object* x_62; lean_inc(x_3); x_61 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_61, 0, x_3); x_62 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_62, 0, x_61); x_30 = x_62; x_31 = x_10; goto block_55; } else { lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; x_63 = lean_ctor_get(x_60, 0); lean_inc(x_63); if (lean_is_exclusive(x_60)) { lean_ctor_release(x_60, 0); x_64 = x_60; } else { lean_dec_ref(x_60); x_64 = lean_box(0); } x_65 = lean_ctor_get(x_63, 0); lean_inc(x_65); x_66 = lean_ctor_get(x_63, 1); lean_inc(x_66); lean_dec(x_63); lean_inc(x_66); x_67 = l_Lean_Elab_Info_fmtHover_x3f(x_65, x_66, x_10); lean_dec(x_65); if (lean_obj_tag(x_67) == 0) { lean_object* x_68; x_68 = lean_ctor_get(x_67, 0); lean_inc(x_68); if (lean_obj_tag(x_68) == 0) { lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_dec(x_66); lean_dec(x_64); x_69 = lean_ctor_get(x_67, 1); lean_inc(x_69); lean_dec(x_67); lean_inc(x_3); x_70 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_70, 0, x_3); x_71 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_71, 0, x_70); x_30 = x_71; x_31 = x_69; goto block_55; } else { 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; uint8_t x_79; lean_object* x_80; lean_object* x_81; x_72 = lean_ctor_get(x_67, 1); lean_inc(x_72); lean_dec(x_67); x_73 = lean_ctor_get(x_68, 0); lean_inc(x_73); if (lean_is_exclusive(x_68)) { lean_ctor_release(x_68, 0); x_74 = x_68; } else { lean_dec_ref(x_68); x_74 = lean_box(0); } x_75 = l_Std_Format_defWidth; x_76 = lean_format_pretty(x_73, x_75); x_77 = l_Lean_Elab_Info_pos_x3f(x_66); x_78 = l_Lean_Elab_Info_tailPos_x3f(x_66); lean_dec(x_66); x_79 = 1; x_80 = lean_alloc_ctor(0, 1, 1); lean_ctor_set(x_80, 0, x_76); lean_ctor_set_uint8(x_80, sizeof(void*)*1, x_79); if (lean_obj_tag(x_77) == 0) { lean_object* x_119; lean_object* x_120; lean_object* x_121; x_119 = l_instInhabitedNat; x_120 = l_Option_get_x21___rarg___closed__4; x_121 = lean_panic_fn(x_119, x_120); x_81 = x_121; goto block_118; } else { lean_object* x_122; x_122 = lean_ctor_get(x_77, 0); lean_inc(x_122); lean_dec(x_77); x_81 = x_122; goto block_118; } block_118: { lean_object* x_82; x_82 = l_Lean_FileMap_utf8PosToLspPos(x_1, x_81); lean_dec(x_81); if (lean_obj_tag(x_78) == 0) { 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_83 = l_instInhabitedNat; x_84 = l_Option_get_x21___rarg___closed__4; x_85 = lean_panic_fn(x_83, x_84); x_86 = l_Lean_FileMap_utf8PosToLspPos(x_1, x_85); lean_dec(x_85); x_87 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_87, 0, x_82); lean_ctor_set(x_87, 1, x_86); if (lean_is_scalar(x_74)) { x_88 = lean_alloc_ctor(1, 1, 0); } else { x_88 = x_74; } lean_ctor_set(x_88, 0, x_87); x_89 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_89, 0, x_80); lean_ctor_set(x_89, 1, x_88); if (lean_is_scalar(x_64)) { x_90 = lean_alloc_ctor(1, 1, 0); } else { x_90 = x_64; } lean_ctor_set(x_90, 0, x_89); x_91 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_91, 0, x_90); x_92 = lean_box(0); x_93 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_93, 0, x_91); lean_ctor_set(x_93, 1, x_92); x_94 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_94, 0, x_93); x_95 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_95, 0, x_94); x_30 = x_95; x_31 = x_72; goto block_55; } else { uint8_t x_96; x_96 = !lean_is_exclusive(x_78); if (x_96 == 0) { 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; x_97 = lean_ctor_get(x_78, 0); x_98 = l_Lean_FileMap_utf8PosToLspPos(x_1, x_97); lean_dec(x_97); x_99 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_99, 0, x_82); lean_ctor_set(x_99, 1, x_98); lean_ctor_set(x_78, 0, x_99); x_100 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_100, 0, x_80); lean_ctor_set(x_100, 1, x_78); if (lean_is_scalar(x_74)) { x_101 = lean_alloc_ctor(1, 1, 0); } else { x_101 = x_74; } lean_ctor_set(x_101, 0, x_100); if (lean_is_scalar(x_64)) { x_102 = lean_alloc_ctor(1, 1, 0); } else { x_102 = x_64; } lean_ctor_set(x_102, 0, x_101); x_103 = lean_box(0); x_104 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_104, 0, x_102); lean_ctor_set(x_104, 1, x_103); x_105 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_105, 0, x_104); x_106 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_106, 0, x_105); x_30 = x_106; x_31 = x_72; goto block_55; } else { lean_object* x_107; 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; lean_object* x_115; lean_object* x_116; lean_object* x_117; x_107 = lean_ctor_get(x_78, 0); lean_inc(x_107); lean_dec(x_78); x_108 = l_Lean_FileMap_utf8PosToLspPos(x_1, x_107); lean_dec(x_107); x_109 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_109, 0, x_82); lean_ctor_set(x_109, 1, x_108); x_110 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_110, 0, x_109); x_111 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_111, 0, x_80); lean_ctor_set(x_111, 1, x_110); if (lean_is_scalar(x_74)) { x_112 = lean_alloc_ctor(1, 1, 0); } else { x_112 = x_74; } lean_ctor_set(x_112, 0, x_111); if (lean_is_scalar(x_64)) { x_113 = lean_alloc_ctor(1, 1, 0); } else { x_113 = x_64; } lean_ctor_set(x_113, 0, x_112); x_114 = lean_box(0); x_115 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_115, 0, x_113); lean_ctor_set(x_115, 1, x_114); x_116 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_116, 0, x_115); x_117 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_117, 0, x_116); x_30 = x_117; x_31 = x_72; goto block_55; } } } } } else { uint8_t x_123; lean_dec(x_66); lean_dec(x_64); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_123 = !lean_is_exclusive(x_67); if (x_123 == 0) { return x_67; } else { lean_object* x_124; lean_object* x_125; lean_object* x_126; x_124 = lean_ctor_get(x_67, 0); x_125 = lean_ctor_get(x_67, 1); lean_inc(x_125); lean_inc(x_124); lean_dec(x_67); x_126 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_126, 0, x_124); lean_ctor_set(x_126, 1, x_125); return x_126; } } } } block_29: { uint8_t x_13; x_13 = !lean_is_exclusive(x_11); if (x_13 == 0) { lean_object* x_14; x_14 = lean_ctor_get(x_11, 0); if (lean_obj_tag(x_14) == 0) { lean_object* x_15; lean_object* x_16; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); lean_dec(x_14); lean_ctor_set(x_11, 0, x_15); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_11); lean_ctor_set(x_16, 1, x_12); return x_16; } else { lean_object* x_17; size_t x_18; size_t x_19; lean_free_object(x_11); x_17 = lean_ctor_get(x_14, 0); lean_inc(x_17); lean_dec(x_14); x_18 = 1; x_19 = x_7 + x_18; x_7 = x_19; x_8 = x_17; x_10 = x_12; goto _start; } } else { lean_object* x_21; x_21 = lean_ctor_get(x_11, 0); lean_inc(x_21); lean_dec(x_11); if (lean_obj_tag(x_21) == 0) { lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_22 = lean_ctor_get(x_21, 0); lean_inc(x_22); lean_dec(x_21); x_23 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_23, 0, x_22); x_24 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_12); return x_24; } else { lean_object* x_25; size_t x_26; size_t x_27; x_25 = lean_ctor_get(x_21, 0); lean_inc(x_25); lean_dec(x_21); x_26 = 1; x_27 = x_7 + x_26; x_7 = x_27; x_8 = x_25; x_10 = x_12; goto _start; } } } block_55: { uint8_t x_32; x_32 = !lean_is_exclusive(x_30); if (x_32 == 0) { lean_object* x_33; x_33 = lean_ctor_get(x_30, 0); if (lean_obj_tag(x_33) == 0) { lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; x_34 = lean_ctor_get(x_33, 0); lean_inc(x_34); x_35 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_35, 0, x_33); x_36 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_36, 0, x_35); lean_ctor_set(x_36, 1, x_34); x_37 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_37, 0, x_36); lean_ctor_set(x_30, 0, x_37); x_11 = x_30; x_12 = x_31; goto block_29; } else { uint8_t x_38; x_38 = !lean_is_exclusive(x_33); if (x_38 == 0) { lean_object* x_39; lean_object* x_40; x_39 = lean_ctor_get(x_33, 0); lean_inc(x_4); x_40 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_40, 0, x_4); lean_ctor_set(x_40, 1, x_39); lean_ctor_set(x_33, 0, x_40); x_11 = x_30; x_12 = x_31; goto block_29; } else { lean_object* x_41; lean_object* x_42; lean_object* x_43; x_41 = lean_ctor_get(x_33, 0); lean_inc(x_41); lean_dec(x_33); lean_inc(x_4); x_42 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_42, 0, x_4); lean_ctor_set(x_42, 1, x_41); x_43 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_43, 0, x_42); lean_ctor_set(x_30, 0, x_43); x_11 = x_30; x_12 = x_31; goto block_29; } } } else { lean_object* x_44; x_44 = lean_ctor_get(x_30, 0); lean_inc(x_44); lean_dec(x_30); if (lean_obj_tag(x_44) == 0) { lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; x_45 = lean_ctor_get(x_44, 0); lean_inc(x_45); x_46 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_46, 0, x_44); x_47 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_47, 0, x_46); lean_ctor_set(x_47, 1, x_45); x_48 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_48, 0, x_47); x_49 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_49, 0, x_48); x_11 = x_49; x_12 = x_31; goto block_29; } else { lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; x_50 = lean_ctor_get(x_44, 0); lean_inc(x_50); if (lean_is_exclusive(x_44)) { lean_ctor_release(x_44, 0); x_51 = x_44; } else { lean_dec_ref(x_44); x_51 = lean_box(0); } lean_inc(x_4); x_52 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_52, 0, x_4); lean_ctor_set(x_52, 1, x_50); if (lean_is_scalar(x_51)) { x_53 = lean_alloc_ctor(1, 1, 0); } else { x_53 = x_51; } lean_ctor_set(x_53, 0, x_52); x_54 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_54, 0, x_53); x_11 = x_54; x_12 = x_31; goto block_29; } } } } } lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__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) { _start: { if (lean_obj_tag(x_5) == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; size_t x_13; size_t x_14; lean_object* x_15; x_9 = lean_ctor_get(x_5, 0); x_10 = lean_box(0); x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_6); x_12 = lean_array_get_size(x_9); x_13 = lean_usize_of_nat(x_12); lean_dec(x_12); x_14 = 0; x_15 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__3(x_1, x_2, x_3, x_4, x_10, x_9, x_13, x_14, x_11, x_7, x_8); if (lean_obj_tag(x_15) == 0) { lean_object* x_16; x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); if (lean_obj_tag(x_16) == 0) { uint8_t x_17; x_17 = !lean_is_exclusive(x_15); if (x_17 == 0) { lean_object* x_18; uint8_t x_19; x_18 = lean_ctor_get(x_15, 0); lean_dec(x_18); x_19 = !lean_is_exclusive(x_16); if (x_19 == 0) { return x_15; } else { lean_object* x_20; lean_object* x_21; x_20 = lean_ctor_get(x_16, 0); lean_inc(x_20); lean_dec(x_16); x_21 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_21, 0, x_20); lean_ctor_set(x_15, 0, x_21); return x_15; } } else { lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; x_22 = lean_ctor_get(x_15, 1); lean_inc(x_22); lean_dec(x_15); x_23 = lean_ctor_get(x_16, 0); lean_inc(x_23); if (lean_is_exclusive(x_16)) { lean_ctor_release(x_16, 0); x_24 = x_16; } else { lean_dec_ref(x_16); x_24 = lean_box(0); } if (lean_is_scalar(x_24)) { x_25 = lean_alloc_ctor(0, 1, 0); } else { x_25 = x_24; } lean_ctor_set(x_25, 0, x_23); x_26 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_22); return x_26; } } else { uint8_t x_27; x_27 = !lean_is_exclusive(x_16); if (x_27 == 0) { lean_object* x_28; lean_object* x_29; x_28 = lean_ctor_get(x_16, 0); x_29 = lean_ctor_get(x_28, 0); lean_inc(x_29); if (lean_obj_tag(x_29) == 0) { lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_free_object(x_16); x_30 = lean_ctor_get(x_15, 1); lean_inc(x_30); lean_dec(x_15); x_31 = lean_ctor_get(x_28, 1); lean_inc(x_31); lean_dec(x_28); x_32 = lean_box(0); x_33 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1(x_31, x_32, x_7, x_30); return x_33; } else { uint8_t x_34; lean_dec(x_28); x_34 = !lean_is_exclusive(x_15); if (x_34 == 0) { lean_object* x_35; lean_object* x_36; x_35 = lean_ctor_get(x_15, 0); lean_dec(x_35); x_36 = lean_ctor_get(x_29, 0); lean_inc(x_36); lean_dec(x_29); lean_ctor_set(x_16, 0, x_36); return x_15; } else { lean_object* x_37; lean_object* x_38; lean_object* x_39; x_37 = lean_ctor_get(x_15, 1); lean_inc(x_37); lean_dec(x_15); x_38 = lean_ctor_get(x_29, 0); lean_inc(x_38); lean_dec(x_29); lean_ctor_set(x_16, 0, x_38); x_39 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_39, 0, x_16); lean_ctor_set(x_39, 1, x_37); return x_39; } } } else { lean_object* x_40; lean_object* x_41; x_40 = lean_ctor_get(x_16, 0); lean_inc(x_40); lean_dec(x_16); x_41 = lean_ctor_get(x_40, 0); lean_inc(x_41); if (lean_obj_tag(x_41) == 0) { lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; x_42 = lean_ctor_get(x_15, 1); lean_inc(x_42); lean_dec(x_15); x_43 = lean_ctor_get(x_40, 1); lean_inc(x_43); lean_dec(x_40); x_44 = lean_box(0); x_45 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1(x_43, x_44, x_7, x_42); return x_45; } else { lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_dec(x_40); x_46 = lean_ctor_get(x_15, 1); lean_inc(x_46); if (lean_is_exclusive(x_15)) { lean_ctor_release(x_15, 0); lean_ctor_release(x_15, 1); x_47 = x_15; } else { lean_dec_ref(x_15); x_47 = lean_box(0); } x_48 = lean_ctor_get(x_41, 0); lean_inc(x_48); lean_dec(x_41); x_49 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_49, 0, x_48); if (lean_is_scalar(x_47)) { x_50 = lean_alloc_ctor(0, 2, 0); } else { x_50 = x_47; } lean_ctor_set(x_50, 0, x_49); lean_ctor_set(x_50, 1, x_46); return x_50; } } } } else { uint8_t x_51; x_51 = !lean_is_exclusive(x_15); if (x_51 == 0) { return x_15; } else { lean_object* x_52; lean_object* x_53; lean_object* x_54; x_52 = lean_ctor_get(x_15, 0); x_53 = lean_ctor_get(x_15, 1); lean_inc(x_53); lean_inc(x_52); lean_dec(x_15); x_54 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_54, 0, x_52); lean_ctor_set(x_54, 1, x_53); return x_54; } } } else { lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; size_t x_59; size_t x_60; lean_object* x_61; x_55 = lean_ctor_get(x_5, 0); x_56 = lean_box(0); x_57 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_57, 0, x_56); lean_ctor_set(x_57, 1, x_6); x_58 = lean_array_get_size(x_55); x_59 = lean_usize_of_nat(x_58); lean_dec(x_58); x_60 = 0; x_61 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__4(x_1, x_2, x_3, x_56, x_55, x_59, x_60, x_57, x_7, x_8); if (lean_obj_tag(x_61) == 0) { lean_object* x_62; x_62 = lean_ctor_get(x_61, 0); lean_inc(x_62); if (lean_obj_tag(x_62) == 0) { uint8_t x_63; x_63 = !lean_is_exclusive(x_61); if (x_63 == 0) { lean_object* x_64; uint8_t x_65; x_64 = lean_ctor_get(x_61, 0); lean_dec(x_64); x_65 = !lean_is_exclusive(x_62); if (x_65 == 0) { return x_61; } else { lean_object* x_66; lean_object* x_67; x_66 = lean_ctor_get(x_62, 0); lean_inc(x_66); lean_dec(x_62); x_67 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_67, 0, x_66); lean_ctor_set(x_61, 0, x_67); return x_61; } } else { lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; x_68 = lean_ctor_get(x_61, 1); lean_inc(x_68); lean_dec(x_61); x_69 = lean_ctor_get(x_62, 0); lean_inc(x_69); if (lean_is_exclusive(x_62)) { lean_ctor_release(x_62, 0); x_70 = x_62; } else { lean_dec_ref(x_62); x_70 = lean_box(0); } if (lean_is_scalar(x_70)) { x_71 = lean_alloc_ctor(0, 1, 0); } else { x_71 = x_70; } lean_ctor_set(x_71, 0, x_69); x_72 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_72, 0, x_71); lean_ctor_set(x_72, 1, x_68); return x_72; } } else { uint8_t x_73; x_73 = !lean_is_exclusive(x_62); if (x_73 == 0) { lean_object* x_74; lean_object* x_75; x_74 = lean_ctor_get(x_62, 0); x_75 = lean_ctor_get(x_74, 0); lean_inc(x_75); if (lean_obj_tag(x_75) == 0) { lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_free_object(x_62); x_76 = lean_ctor_get(x_61, 1); lean_inc(x_76); lean_dec(x_61); x_77 = lean_ctor_get(x_74, 1); lean_inc(x_77); lean_dec(x_74); x_78 = lean_box(0); x_79 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1(x_77, x_78, x_7, x_76); return x_79; } else { uint8_t x_80; lean_dec(x_74); x_80 = !lean_is_exclusive(x_61); if (x_80 == 0) { lean_object* x_81; lean_object* x_82; x_81 = lean_ctor_get(x_61, 0); lean_dec(x_81); x_82 = lean_ctor_get(x_75, 0); lean_inc(x_82); lean_dec(x_75); lean_ctor_set(x_62, 0, x_82); return x_61; } else { lean_object* x_83; lean_object* x_84; lean_object* x_85; x_83 = lean_ctor_get(x_61, 1); lean_inc(x_83); lean_dec(x_61); x_84 = lean_ctor_get(x_75, 0); lean_inc(x_84); lean_dec(x_75); lean_ctor_set(x_62, 0, x_84); x_85 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_85, 0, x_62); lean_ctor_set(x_85, 1, x_83); return x_85; } } } else { lean_object* x_86; lean_object* x_87; x_86 = lean_ctor_get(x_62, 0); lean_inc(x_86); lean_dec(x_62); x_87 = lean_ctor_get(x_86, 0); lean_inc(x_87); if (lean_obj_tag(x_87) == 0) { lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; x_88 = lean_ctor_get(x_61, 1); lean_inc(x_88); lean_dec(x_61); x_89 = lean_ctor_get(x_86, 1); lean_inc(x_89); lean_dec(x_86); x_90 = lean_box(0); x_91 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1(x_89, x_90, x_7, x_88); return x_91; } else { lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_dec(x_86); x_92 = lean_ctor_get(x_61, 1); lean_inc(x_92); if (lean_is_exclusive(x_61)) { lean_ctor_release(x_61, 0); lean_ctor_release(x_61, 1); x_93 = x_61; } else { lean_dec_ref(x_61); x_93 = lean_box(0); } x_94 = lean_ctor_get(x_87, 0); lean_inc(x_94); lean_dec(x_87); x_95 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_95, 0, x_94); if (lean_is_scalar(x_93)) { x_96 = lean_alloc_ctor(0, 2, 0); } else { x_96 = x_93; } lean_ctor_set(x_96, 0, x_95); lean_ctor_set(x_96, 1, x_92); return x_96; } } } } else { uint8_t x_97; x_97 = !lean_is_exclusive(x_61); if (x_97 == 0) { return x_61; } else { lean_object* x_98; lean_object* x_99; lean_object* x_100; x_98 = lean_ctor_get(x_61, 0); x_99 = lean_ctor_get(x_61, 1); lean_inc(x_99); lean_inc(x_98); lean_dec(x_61); x_100 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_100, 0, x_98); lean_ctor_set(x_100, 1, x_99); return x_100; } } } } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, size_t x_6, size_t x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; lean_object* x_12; lean_object* x_30; lean_object* x_31; uint8_t x_61; x_61 = x_7 < x_6; if (x_61 == 0) { lean_object* x_62; lean_object* x_63; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_62 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_62, 0, x_8); x_63 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_63, 0, x_62); lean_ctor_set(x_63, 1, x_10); return x_63; } else { lean_object* x_64; lean_object* x_65; lean_dec(x_8); x_64 = lean_array_uget(x_5, x_7); lean_inc(x_2); x_65 = l_Lean_Elab_InfoTree_hoverableInfoAt_x3f(x_64, x_2); if (lean_obj_tag(x_65) == 0) { lean_object* x_66; lean_object* x_67; lean_inc(x_3); x_66 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_66, 0, x_3); x_67 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_67, 0, x_66); x_30 = x_67; x_31 = x_10; goto block_60; } else { lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; x_68 = lean_ctor_get(x_65, 0); lean_inc(x_68); if (lean_is_exclusive(x_65)) { lean_ctor_release(x_65, 0); x_69 = x_65; } else { lean_dec_ref(x_65); x_69 = lean_box(0); } x_70 = lean_ctor_get(x_68, 0); lean_inc(x_70); x_71 = lean_ctor_get(x_68, 1); lean_inc(x_71); lean_dec(x_68); lean_inc(x_71); x_72 = l_Lean_Elab_Info_fmtHover_x3f(x_70, x_71, x_10); lean_dec(x_70); if (lean_obj_tag(x_72) == 0) { lean_object* x_73; x_73 = lean_ctor_get(x_72, 0); lean_inc(x_73); if (lean_obj_tag(x_73) == 0) { lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_dec(x_71); lean_dec(x_69); x_74 = lean_ctor_get(x_72, 1); lean_inc(x_74); lean_dec(x_72); lean_inc(x_3); x_75 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_75, 0, x_3); x_76 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_76, 0, x_75); x_30 = x_76; x_31 = x_74; goto block_60; } else { lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; uint8_t x_84; lean_object* x_85; lean_object* x_86; x_77 = lean_ctor_get(x_72, 1); lean_inc(x_77); lean_dec(x_72); x_78 = lean_ctor_get(x_73, 0); lean_inc(x_78); if (lean_is_exclusive(x_73)) { lean_ctor_release(x_73, 0); x_79 = x_73; } else { lean_dec_ref(x_73); x_79 = lean_box(0); } x_80 = l_Std_Format_defWidth; x_81 = lean_format_pretty(x_78, x_80); x_82 = l_Lean_Elab_Info_pos_x3f(x_71); x_83 = l_Lean_Elab_Info_tailPos_x3f(x_71); lean_dec(x_71); x_84 = 1; x_85 = lean_alloc_ctor(0, 1, 1); lean_ctor_set(x_85, 0, x_81); lean_ctor_set_uint8(x_85, sizeof(void*)*1, x_84); if (lean_obj_tag(x_82) == 0) { lean_object* x_124; lean_object* x_125; lean_object* x_126; x_124 = l_instInhabitedNat; x_125 = l_Option_get_x21___rarg___closed__4; x_126 = lean_panic_fn(x_124, x_125); x_86 = x_126; goto block_123; } else { lean_object* x_127; x_127 = lean_ctor_get(x_82, 0); lean_inc(x_127); lean_dec(x_82); x_86 = x_127; goto block_123; } block_123: { lean_object* x_87; x_87 = l_Lean_FileMap_utf8PosToLspPos(x_1, x_86); lean_dec(x_86); if (lean_obj_tag(x_83) == 0) { 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; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; x_88 = l_instInhabitedNat; x_89 = l_Option_get_x21___rarg___closed__4; x_90 = lean_panic_fn(x_88, x_89); x_91 = l_Lean_FileMap_utf8PosToLspPos(x_1, x_90); lean_dec(x_90); x_92 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_92, 0, x_87); lean_ctor_set(x_92, 1, x_91); if (lean_is_scalar(x_79)) { x_93 = lean_alloc_ctor(1, 1, 0); } else { x_93 = x_79; } lean_ctor_set(x_93, 0, x_92); x_94 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_94, 0, x_85); lean_ctor_set(x_94, 1, x_93); if (lean_is_scalar(x_69)) { x_95 = lean_alloc_ctor(1, 1, 0); } else { x_95 = x_69; } lean_ctor_set(x_95, 0, x_94); x_96 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_96, 0, x_95); x_97 = lean_box(0); x_98 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_98, 0, x_96); lean_ctor_set(x_98, 1, x_97); x_99 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_99, 0, x_98); x_100 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_100, 0, x_99); x_30 = x_100; x_31 = x_77; goto block_60; } else { uint8_t x_101; x_101 = !lean_is_exclusive(x_83); if (x_101 == 0) { 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_102 = lean_ctor_get(x_83, 0); x_103 = l_Lean_FileMap_utf8PosToLspPos(x_1, x_102); lean_dec(x_102); x_104 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_104, 0, x_87); lean_ctor_set(x_104, 1, x_103); lean_ctor_set(x_83, 0, x_104); x_105 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_105, 0, x_85); lean_ctor_set(x_105, 1, x_83); if (lean_is_scalar(x_79)) { x_106 = lean_alloc_ctor(1, 1, 0); } else { x_106 = x_79; } lean_ctor_set(x_106, 0, x_105); if (lean_is_scalar(x_69)) { x_107 = lean_alloc_ctor(1, 1, 0); } else { x_107 = x_69; } lean_ctor_set(x_107, 0, x_106); x_108 = lean_box(0); x_109 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_109, 0, x_107); lean_ctor_set(x_109, 1, x_108); x_110 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_110, 0, x_109); x_111 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_111, 0, x_110); x_30 = x_111; x_31 = x_77; goto block_60; } else { lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; x_112 = lean_ctor_get(x_83, 0); lean_inc(x_112); lean_dec(x_83); x_113 = l_Lean_FileMap_utf8PosToLspPos(x_1, x_112); lean_dec(x_112); x_114 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_114, 0, x_87); lean_ctor_set(x_114, 1, x_113); x_115 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_115, 0, x_114); x_116 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_116, 0, x_85); lean_ctor_set(x_116, 1, x_115); if (lean_is_scalar(x_79)) { x_117 = lean_alloc_ctor(1, 1, 0); } else { x_117 = x_79; } lean_ctor_set(x_117, 0, x_116); if (lean_is_scalar(x_69)) { x_118 = lean_alloc_ctor(1, 1, 0); } else { x_118 = x_69; } lean_ctor_set(x_118, 0, x_117); x_119 = lean_box(0); x_120 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_120, 0, x_118); lean_ctor_set(x_120, 1, x_119); x_121 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_121, 0, x_120); x_122 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_122, 0, x_121); x_30 = x_122; x_31 = x_77; goto block_60; } } } } } else { uint8_t x_128; lean_dec(x_71); lean_dec(x_69); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_128 = !lean_is_exclusive(x_72); if (x_128 == 0) { return x_72; } else { lean_object* x_129; lean_object* x_130; lean_object* x_131; x_129 = lean_ctor_get(x_72, 0); x_130 = lean_ctor_get(x_72, 1); lean_inc(x_130); lean_inc(x_129); lean_dec(x_72); x_131 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_131, 0, x_129); lean_ctor_set(x_131, 1, x_130); return x_131; } } } } block_29: { uint8_t x_13; x_13 = !lean_is_exclusive(x_11); if (x_13 == 0) { lean_object* x_14; x_14 = lean_ctor_get(x_11, 0); if (lean_obj_tag(x_14) == 0) { lean_object* x_15; lean_object* x_16; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); lean_dec(x_14); lean_ctor_set(x_11, 0, x_15); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_11); lean_ctor_set(x_16, 1, x_12); return x_16; } else { lean_object* x_17; size_t x_18; size_t x_19; lean_free_object(x_11); x_17 = lean_ctor_get(x_14, 0); lean_inc(x_17); lean_dec(x_14); x_18 = 1; x_19 = x_7 + x_18; x_7 = x_19; x_8 = x_17; x_10 = x_12; goto _start; } } else { lean_object* x_21; x_21 = lean_ctor_get(x_11, 0); lean_inc(x_21); lean_dec(x_11); if (lean_obj_tag(x_21) == 0) { lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_22 = lean_ctor_get(x_21, 0); lean_inc(x_22); lean_dec(x_21); x_23 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_23, 0, x_22); x_24 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_12); return x_24; } else { lean_object* x_25; size_t x_26; size_t x_27; x_25 = lean_ctor_get(x_21, 0); lean_inc(x_25); lean_dec(x_21); x_26 = 1; x_27 = x_7 + x_26; x_7 = x_27; x_8 = x_25; x_10 = x_12; goto _start; } } } block_60: { uint8_t x_32; x_32 = !lean_is_exclusive(x_30); if (x_32 == 0) { lean_object* x_33; x_33 = lean_ctor_get(x_30, 0); if (lean_obj_tag(x_33) == 0) { uint8_t x_34; x_34 = !lean_is_exclusive(x_33); if (x_34 == 0) { lean_object* x_35; lean_object* x_36; lean_object* x_37; x_35 = lean_ctor_get(x_33, 0); lean_inc(x_35); x_36 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_36, 0, x_35); x_37 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_37, 0, x_36); lean_ctor_set(x_37, 1, x_35); lean_ctor_set(x_33, 0, x_37); x_11 = x_30; x_12 = x_31; goto block_29; } else { lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; x_38 = lean_ctor_get(x_33, 0); lean_inc(x_38); lean_dec(x_33); lean_inc(x_38); x_39 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_39, 0, x_38); x_40 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_40, 0, x_39); lean_ctor_set(x_40, 1, x_38); x_41 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_41, 0, x_40); lean_ctor_set(x_30, 0, x_41); x_11 = x_30; x_12 = x_31; goto block_29; } } else { uint8_t x_42; x_42 = !lean_is_exclusive(x_33); if (x_42 == 0) { lean_object* x_43; lean_object* x_44; x_43 = lean_ctor_get(x_33, 0); lean_inc(x_4); x_44 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_44, 0, x_4); lean_ctor_set(x_44, 1, x_43); lean_ctor_set(x_33, 0, x_44); x_11 = x_30; x_12 = x_31; goto block_29; } else { lean_object* x_45; lean_object* x_46; lean_object* x_47; x_45 = lean_ctor_get(x_33, 0); lean_inc(x_45); lean_dec(x_33); lean_inc(x_4); x_46 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_46, 0, x_4); lean_ctor_set(x_46, 1, x_45); x_47 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_47, 0, x_46); lean_ctor_set(x_30, 0, x_47); x_11 = x_30; x_12 = x_31; goto block_29; } } } else { lean_object* x_48; x_48 = lean_ctor_get(x_30, 0); lean_inc(x_48); lean_dec(x_30); if (lean_obj_tag(x_48) == 0) { 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_49 = lean_ctor_get(x_48, 0); lean_inc(x_49); if (lean_is_exclusive(x_48)) { lean_ctor_release(x_48, 0); x_50 = x_48; } else { lean_dec_ref(x_48); x_50 = lean_box(0); } lean_inc(x_49); x_51 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_51, 0, x_49); x_52 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_52, 0, x_51); lean_ctor_set(x_52, 1, x_49); if (lean_is_scalar(x_50)) { x_53 = lean_alloc_ctor(0, 1, 0); } else { x_53 = x_50; } lean_ctor_set(x_53, 0, x_52); x_54 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_54, 0, x_53); x_11 = x_54; x_12 = x_31; goto block_29; } else { lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; x_55 = lean_ctor_get(x_48, 0); lean_inc(x_55); if (lean_is_exclusive(x_48)) { lean_ctor_release(x_48, 0); x_56 = x_48; } else { lean_dec_ref(x_48); x_56 = lean_box(0); } lean_inc(x_4); x_57 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_57, 0, x_4); lean_ctor_set(x_57, 1, x_55); if (lean_is_scalar(x_56)) { x_58 = lean_alloc_ctor(1, 1, 0); } else { x_58 = x_56; } lean_ctor_set(x_58, 0, x_57); x_59 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_59, 0, x_58); x_11 = x_59; x_12 = x_31; goto block_29; } } } } } lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { lean_object* x_8; lean_object* x_9; x_8 = lean_ctor_get(x_4, 0); lean_inc(x_5); lean_inc(x_3); lean_inc(x_2); x_9 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__2(x_1, x_2, x_3, x_5, x_8, x_5, x_6, x_7); lean_dec(x_5); if (lean_obj_tag(x_9) == 0) { lean_object* x_10; x_10 = lean_ctor_get(x_9, 0); lean_inc(x_10); if (lean_obj_tag(x_10) == 0) { uint8_t x_11; lean_dec(x_3); lean_dec(x_2); x_11 = !lean_is_exclusive(x_9); if (x_11 == 0) { lean_object* x_12; uint8_t x_13; x_12 = lean_ctor_get(x_9, 0); lean_dec(x_12); x_13 = !lean_is_exclusive(x_10); if (x_13 == 0) { return x_9; } else { lean_object* x_14; lean_object* x_15; x_14 = lean_ctor_get(x_10, 0); lean_inc(x_14); lean_dec(x_10); x_15 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_9, 0, x_15); return x_9; } } else { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; x_16 = lean_ctor_get(x_9, 1); lean_inc(x_16); lean_dec(x_9); x_17 = lean_ctor_get(x_10, 0); lean_inc(x_17); if (lean_is_exclusive(x_10)) { lean_ctor_release(x_10, 0); x_18 = x_10; } else { lean_dec_ref(x_10); x_18 = lean_box(0); } if (lean_is_scalar(x_18)) { x_19 = lean_alloc_ctor(0, 1, 0); } else { x_19 = x_18; } lean_ctor_set(x_19, 0, x_17); x_20 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_20, 0, x_19); lean_ctor_set(x_20, 1, x_16); return x_20; } } else { uint8_t x_21; x_21 = !lean_is_exclusive(x_10); if (x_21 == 0) { lean_object* x_22; x_22 = lean_ctor_get(x_10, 0); if (lean_obj_tag(x_22) == 0) { uint8_t x_23; lean_dec(x_3); lean_dec(x_2); x_23 = !lean_is_exclusive(x_9); if (x_23 == 0) { lean_object* x_24; lean_object* x_25; x_24 = lean_ctor_get(x_9, 0); lean_dec(x_24); x_25 = lean_ctor_get(x_22, 0); lean_inc(x_25); lean_dec(x_22); lean_ctor_set(x_10, 0, x_25); return x_9; } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; x_26 = lean_ctor_get(x_9, 1); lean_inc(x_26); lean_dec(x_9); x_27 = lean_ctor_get(x_22, 0); lean_inc(x_27); lean_dec(x_22); lean_ctor_set(x_10, 0, x_27); x_28 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_28, 0, x_10); lean_ctor_set(x_28, 1, x_26); 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; size_t x_35; size_t x_36; lean_object* x_37; lean_free_object(x_10); x_29 = lean_ctor_get(x_9, 1); lean_inc(x_29); lean_dec(x_9); x_30 = lean_ctor_get(x_22, 0); lean_inc(x_30); lean_dec(x_22); x_31 = lean_ctor_get(x_4, 1); x_32 = lean_box(0); x_33 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_33, 0, x_32); lean_ctor_set(x_33, 1, x_30); 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 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__5(x_1, x_2, x_3, x_32, x_31, x_35, x_36, x_33, x_6, x_29); if (lean_obj_tag(x_37) == 0) { lean_object* x_38; x_38 = lean_ctor_get(x_37, 0); lean_inc(x_38); if (lean_obj_tag(x_38) == 0) { uint8_t x_39; x_39 = !lean_is_exclusive(x_37); if (x_39 == 0) { lean_object* x_40; uint8_t x_41; x_40 = lean_ctor_get(x_37, 0); lean_dec(x_40); x_41 = !lean_is_exclusive(x_38); if (x_41 == 0) { return x_37; } else { lean_object* x_42; lean_object* x_43; x_42 = lean_ctor_get(x_38, 0); lean_inc(x_42); lean_dec(x_38); x_43 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_43, 0, x_42); lean_ctor_set(x_37, 0, x_43); return x_37; } } else { lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; x_44 = lean_ctor_get(x_37, 1); lean_inc(x_44); lean_dec(x_37); x_45 = lean_ctor_get(x_38, 0); lean_inc(x_45); if (lean_is_exclusive(x_38)) { lean_ctor_release(x_38, 0); x_46 = x_38; } else { lean_dec_ref(x_38); x_46 = lean_box(0); } if (lean_is_scalar(x_46)) { x_47 = lean_alloc_ctor(0, 1, 0); } else { x_47 = x_46; } lean_ctor_set(x_47, 0, x_45); x_48 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_48, 0, x_47); lean_ctor_set(x_48, 1, x_44); return x_48; } } else { uint8_t x_49; x_49 = !lean_is_exclusive(x_38); if (x_49 == 0) { lean_object* x_50; lean_object* x_51; x_50 = lean_ctor_get(x_38, 0); x_51 = lean_ctor_get(x_50, 0); lean_inc(x_51); if (lean_obj_tag(x_51) == 0) { lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_free_object(x_38); x_52 = lean_ctor_get(x_37, 1); lean_inc(x_52); lean_dec(x_37); x_53 = lean_ctor_get(x_50, 1); lean_inc(x_53); lean_dec(x_50); x_54 = lean_box(0); x_55 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2___lambda__1(x_53, x_54, x_6, x_52); return x_55; } else { uint8_t x_56; lean_dec(x_50); x_56 = !lean_is_exclusive(x_37); if (x_56 == 0) { lean_object* x_57; lean_object* x_58; x_57 = lean_ctor_get(x_37, 0); lean_dec(x_57); x_58 = lean_ctor_get(x_51, 0); lean_inc(x_58); lean_dec(x_51); lean_ctor_set(x_38, 0, x_58); return x_37; } else { lean_object* x_59; lean_object* x_60; lean_object* x_61; x_59 = lean_ctor_get(x_37, 1); lean_inc(x_59); lean_dec(x_37); x_60 = lean_ctor_get(x_51, 0); lean_inc(x_60); lean_dec(x_51); lean_ctor_set(x_38, 0, x_60); x_61 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_61, 0, x_38); lean_ctor_set(x_61, 1, x_59); return x_61; } } } else { lean_object* x_62; lean_object* x_63; x_62 = lean_ctor_get(x_38, 0); lean_inc(x_62); lean_dec(x_38); x_63 = lean_ctor_get(x_62, 0); lean_inc(x_63); if (lean_obj_tag(x_63) == 0) { lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; x_64 = lean_ctor_get(x_37, 1); lean_inc(x_64); lean_dec(x_37); x_65 = lean_ctor_get(x_62, 1); lean_inc(x_65); lean_dec(x_62); x_66 = lean_box(0); x_67 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2___lambda__1(x_65, x_66, x_6, x_64); return x_67; } else { lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_dec(x_62); x_68 = lean_ctor_get(x_37, 1); lean_inc(x_68); if (lean_is_exclusive(x_37)) { lean_ctor_release(x_37, 0); lean_ctor_release(x_37, 1); x_69 = x_37; } else { lean_dec_ref(x_37); x_69 = lean_box(0); } x_70 = lean_ctor_get(x_63, 0); lean_inc(x_70); lean_dec(x_63); x_71 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_71, 0, x_70); if (lean_is_scalar(x_69)) { x_72 = lean_alloc_ctor(0, 2, 0); } else { x_72 = x_69; } lean_ctor_set(x_72, 0, x_71); lean_ctor_set(x_72, 1, x_68); return x_72; } } } } else { uint8_t x_73; x_73 = !lean_is_exclusive(x_37); if (x_73 == 0) { return x_37; } else { lean_object* x_74; lean_object* x_75; lean_object* x_76; x_74 = lean_ctor_get(x_37, 0); x_75 = lean_ctor_get(x_37, 1); lean_inc(x_75); lean_inc(x_74); lean_dec(x_37); x_76 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_76, 0, x_74); lean_ctor_set(x_76, 1, x_75); return x_76; } } } } else { lean_object* x_77; x_77 = lean_ctor_get(x_10, 0); lean_inc(x_77); lean_dec(x_10); if (lean_obj_tag(x_77) == 0) { lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_dec(x_3); lean_dec(x_2); x_78 = lean_ctor_get(x_9, 1); lean_inc(x_78); if (lean_is_exclusive(x_9)) { lean_ctor_release(x_9, 0); lean_ctor_release(x_9, 1); x_79 = x_9; } else { lean_dec_ref(x_9); x_79 = lean_box(0); } x_80 = lean_ctor_get(x_77, 0); lean_inc(x_80); lean_dec(x_77); x_81 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_81, 0, x_80); if (lean_is_scalar(x_79)) { x_82 = lean_alloc_ctor(0, 2, 0); } else { x_82 = x_79; } lean_ctor_set(x_82, 0, x_81); lean_ctor_set(x_82, 1, x_78); return x_82; } else { lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; size_t x_89; size_t x_90; lean_object* x_91; x_83 = lean_ctor_get(x_9, 1); lean_inc(x_83); lean_dec(x_9); x_84 = lean_ctor_get(x_77, 0); lean_inc(x_84); lean_dec(x_77); x_85 = lean_ctor_get(x_4, 1); x_86 = lean_box(0); x_87 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_87, 0, x_86); lean_ctor_set(x_87, 1, x_84); x_88 = lean_array_get_size(x_85); x_89 = lean_usize_of_nat(x_88); lean_dec(x_88); x_90 = 0; x_91 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__5(x_1, x_2, x_3, x_86, x_85, x_89, x_90, x_87, x_6, x_83); if (lean_obj_tag(x_91) == 0) { lean_object* x_92; x_92 = lean_ctor_get(x_91, 0); lean_inc(x_92); if (lean_obj_tag(x_92) == 0) { lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; x_93 = lean_ctor_get(x_91, 1); lean_inc(x_93); if (lean_is_exclusive(x_91)) { lean_ctor_release(x_91, 0); lean_ctor_release(x_91, 1); x_94 = x_91; } else { lean_dec_ref(x_91); x_94 = lean_box(0); } x_95 = lean_ctor_get(x_92, 0); lean_inc(x_95); if (lean_is_exclusive(x_92)) { lean_ctor_release(x_92, 0); x_96 = x_92; } else { lean_dec_ref(x_92); x_96 = lean_box(0); } if (lean_is_scalar(x_96)) { x_97 = lean_alloc_ctor(0, 1, 0); } else { x_97 = x_96; } lean_ctor_set(x_97, 0, x_95); if (lean_is_scalar(x_94)) { x_98 = lean_alloc_ctor(0, 2, 0); } else { x_98 = x_94; } lean_ctor_set(x_98, 0, x_97); lean_ctor_set(x_98, 1, x_93); return x_98; } else { lean_object* x_99; lean_object* x_100; lean_object* x_101; x_99 = lean_ctor_get(x_92, 0); lean_inc(x_99); if (lean_is_exclusive(x_92)) { lean_ctor_release(x_92, 0); x_100 = x_92; } else { lean_dec_ref(x_92); x_100 = lean_box(0); } x_101 = lean_ctor_get(x_99, 0); lean_inc(x_101); if (lean_obj_tag(x_101) == 0) { lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_dec(x_100); x_102 = lean_ctor_get(x_91, 1); lean_inc(x_102); lean_dec(x_91); x_103 = lean_ctor_get(x_99, 1); lean_inc(x_103); lean_dec(x_99); x_104 = lean_box(0); x_105 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2___lambda__1(x_103, x_104, x_6, x_102); return x_105; } else { lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_dec(x_99); x_106 = lean_ctor_get(x_91, 1); lean_inc(x_106); if (lean_is_exclusive(x_91)) { lean_ctor_release(x_91, 0); lean_ctor_release(x_91, 1); x_107 = x_91; } else { lean_dec_ref(x_91); x_107 = lean_box(0); } x_108 = lean_ctor_get(x_101, 0); lean_inc(x_108); lean_dec(x_101); if (lean_is_scalar(x_100)) { x_109 = lean_alloc_ctor(1, 1, 0); } else { x_109 = x_100; } lean_ctor_set(x_109, 0, x_108); if (lean_is_scalar(x_107)) { x_110 = lean_alloc_ctor(0, 2, 0); } else { x_110 = x_107; } lean_ctor_set(x_110, 0, x_109); lean_ctor_set(x_110, 1, x_106); return x_110; } } } else { lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; x_111 = lean_ctor_get(x_91, 0); lean_inc(x_111); x_112 = lean_ctor_get(x_91, 1); lean_inc(x_112); if (lean_is_exclusive(x_91)) { lean_ctor_release(x_91, 0); lean_ctor_release(x_91, 1); x_113 = x_91; } else { lean_dec_ref(x_91); x_113 = lean_box(0); } if (lean_is_scalar(x_113)) { x_114 = lean_alloc_ctor(1, 2, 0); } else { x_114 = x_113; } lean_ctor_set(x_114, 0, x_111); lean_ctor_set(x_114, 1, x_112); return x_114; } } } } } else { uint8_t x_115; lean_dec(x_3); lean_dec(x_2); x_115 = !lean_is_exclusive(x_9); if (x_115 == 0) { return x_9; } else { lean_object* x_116; lean_object* x_117; lean_object* x_118; x_116 = lean_ctor_get(x_9, 0); x_117 = lean_ctor_get(x_9, 1); lean_inc(x_117); lean_inc(x_116); lean_dec(x_9); x_118 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_118, 0, x_116); lean_ctor_set(x_118, 1, x_117); return x_118; } } } } uint8_t l_Lean_Server_FileWorker_handleHover___lambda__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; uint8_t x_4; x_3 = l_Lean_Server_Snapshots_Snapshot_endPos(x_2); x_4 = lean_nat_dec_lt(x_1, x_3); lean_dec(x_3); return x_4; } } lean_object* l_Lean_Server_FileWorker_handleHover___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) { _start: { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_8 = lean_ctor_get(x_5, 3); x_9 = lean_ctor_get(x_8, 7); x_10 = lean_ctor_get(x_9, 1); x_11 = lean_box(0); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_1); lean_ctor_set(x_12, 1, x_11); lean_inc(x_12); x_13 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__1(x_2, x_3, x_12, x_10, x_12, x_6, x_7); if (lean_obj_tag(x_13) == 0) { lean_object* x_14; x_14 = lean_ctor_get(x_13, 0); lean_inc(x_14); if (lean_obj_tag(x_14) == 0) { uint8_t x_15; lean_dec(x_4); x_15 = !lean_is_exclusive(x_13); if (x_15 == 0) { lean_object* x_16; uint8_t x_17; x_16 = lean_ctor_get(x_13, 0); lean_dec(x_16); x_17 = !lean_is_exclusive(x_14); if (x_17 == 0) { return x_13; } else { lean_object* x_18; lean_object* x_19; x_18 = lean_ctor_get(x_14, 0); lean_inc(x_18); lean_dec(x_14); x_19 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_13, 0, x_19); return x_13; } } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; x_20 = lean_ctor_get(x_13, 1); lean_inc(x_20); lean_dec(x_13); x_21 = lean_ctor_get(x_14, 0); lean_inc(x_21); if (lean_is_exclusive(x_14)) { lean_ctor_release(x_14, 0); x_22 = x_14; } else { lean_dec_ref(x_14); x_22 = lean_box(0); } if (lean_is_scalar(x_22)) { x_23 = lean_alloc_ctor(0, 1, 0); } else { x_23 = x_22; } lean_ctor_set(x_23, 0, x_21); x_24 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_20); return x_24; } } else { uint8_t x_25; x_25 = !lean_is_exclusive(x_14); if (x_25 == 0) { lean_object* x_26; lean_object* x_27; x_26 = lean_ctor_get(x_14, 0); x_27 = lean_ctor_get(x_26, 0); lean_inc(x_27); lean_dec(x_26); if (lean_obj_tag(x_27) == 0) { uint8_t x_28; lean_free_object(x_14); x_28 = !lean_is_exclusive(x_13); if (x_28 == 0) { lean_object* x_29; x_29 = lean_ctor_get(x_13, 0); lean_dec(x_29); lean_ctor_set(x_13, 0, x_4); return x_13; } else { lean_object* x_30; lean_object* x_31; x_30 = lean_ctor_get(x_13, 1); lean_inc(x_30); lean_dec(x_13); x_31 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_31, 0, x_4); lean_ctor_set(x_31, 1, x_30); return x_31; } } else { uint8_t x_32; lean_dec(x_4); x_32 = !lean_is_exclusive(x_13); if (x_32 == 0) { lean_object* x_33; lean_object* x_34; x_33 = lean_ctor_get(x_13, 0); lean_dec(x_33); x_34 = lean_ctor_get(x_27, 0); lean_inc(x_34); lean_dec(x_27); lean_ctor_set(x_14, 0, x_34); return x_13; } else { lean_object* x_35; lean_object* x_36; lean_object* x_37; x_35 = lean_ctor_get(x_13, 1); lean_inc(x_35); lean_dec(x_13); x_36 = lean_ctor_get(x_27, 0); lean_inc(x_36); lean_dec(x_27); lean_ctor_set(x_14, 0, x_36); x_37 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_37, 0, x_14); lean_ctor_set(x_37, 1, x_35); return x_37; } } } else { lean_object* x_38; lean_object* x_39; x_38 = lean_ctor_get(x_14, 0); lean_inc(x_38); lean_dec(x_14); x_39 = lean_ctor_get(x_38, 0); lean_inc(x_39); lean_dec(x_38); if (lean_obj_tag(x_39) == 0) { lean_object* x_40; lean_object* x_41; lean_object* x_42; x_40 = lean_ctor_get(x_13, 1); lean_inc(x_40); if (lean_is_exclusive(x_13)) { lean_ctor_release(x_13, 0); lean_ctor_release(x_13, 1); x_41 = x_13; } else { lean_dec_ref(x_13); x_41 = lean_box(0); } if (lean_is_scalar(x_41)) { x_42 = lean_alloc_ctor(0, 2, 0); } else { x_42 = x_41; } lean_ctor_set(x_42, 0, x_4); lean_ctor_set(x_42, 1, x_40); return x_42; } else { lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_dec(x_4); x_43 = lean_ctor_get(x_13, 1); lean_inc(x_43); if (lean_is_exclusive(x_13)) { lean_ctor_release(x_13, 0); lean_ctor_release(x_13, 1); x_44 = x_13; } else { lean_dec_ref(x_13); x_44 = lean_box(0); } x_45 = lean_ctor_get(x_39, 0); lean_inc(x_45); lean_dec(x_39); x_46 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_46, 0, x_45); if (lean_is_scalar(x_44)) { x_47 = lean_alloc_ctor(0, 2, 0); } else { x_47 = x_44; } lean_ctor_set(x_47, 0, x_46); lean_ctor_set(x_47, 1, x_43); return x_47; } } } } else { uint8_t x_48; lean_dec(x_4); x_48 = !lean_is_exclusive(x_13); if (x_48 == 0) { return x_13; } else { lean_object* x_49; lean_object* x_50; lean_object* x_51; x_49 = lean_ctor_get(x_13, 0); x_50 = lean_ctor_get(x_13, 1); lean_inc(x_50); lean_inc(x_49); lean_dec(x_13); x_51 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_51, 0, x_49); lean_ctor_set(x_51, 1, x_50); return x_51; } } } } static lean_object* _init_l_Lean_Server_FileWorker_handleHover___closed__1() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_IO_AsyncList_waitFind_x3f___rarg___closed__1; x_2 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Server_FileWorker_handleCompletion___spec__1___rarg___boxed), 3, 1); lean_closure_set(x_2, 0, x_1); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleHover(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; x_4 = lean_ctor_get(x_2, 4); lean_inc(x_4); x_5 = lean_st_ref_get(x_4, x_3); lean_dec(x_4); x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = lean_ctor_get(x_6, 0); lean_inc(x_8); x_9 = lean_ctor_get(x_8, 2); lean_inc(x_9); lean_dec(x_8); x_10 = lean_ctor_get(x_1, 1); lean_inc(x_10); lean_dec(x_1); x_11 = l_Lean_FileMap_lspPosToUtf8Pos(x_9, x_10); lean_inc(x_11); x_12 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover___lambda__1___boxed), 2, 1); lean_closure_set(x_12, 0, x_11); x_13 = lean_box(0); x_14 = l_IO_AsyncList_waitFind_x3f___rarg___closed__1; x_15 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover___lambda__2___boxed), 7, 4); lean_closure_set(x_15, 0, x_13); lean_closure_set(x_15, 1, x_9); lean_closure_set(x_15, 2, x_11); lean_closure_set(x_15, 3, x_14); x_16 = l_Lean_Server_FileWorker_handleHover___closed__1; x_17 = l_Lean_Server_FileWorker_withWaitFindSnap___rarg(x_6, x_12, x_16, x_15, x_2, x_7); return x_17; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__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, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { size_t x_12; size_t x_13; lean_object* x_14; x_12 = lean_unbox_usize(x_7); lean_dec(x_7); x_13 = lean_unbox_usize(x_8); lean_dec(x_8); x_14 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__3(x_1, x_2, x_3, x_4, x_5, x_6, x_12, x_13, x_9, x_10, x_11); lean_dec(x_10); lean_dec(x_6); lean_dec(x_4); lean_dec(x_1); return x_14; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___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, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { size_t x_11; size_t x_12; lean_object* x_13; x_11 = lean_unbox_usize(x_6); lean_dec(x_6); x_12 = lean_unbox_usize(x_7); lean_dec(x_7); x_13 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__4(x_1, x_2, x_3, x_4, x_5, x_11, x_12, x_8, x_9, x_10); lean_dec(x_9); lean_dec(x_5); lean_dec(x_1); return x_13; } } lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; x_9 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleHover___spec__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); lean_dec(x_7); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); return x_9; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___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* x_8, lean_object* x_9, lean_object* x_10) { _start: { size_t x_11; size_t x_12; lean_object* x_13; x_11 = lean_unbox_usize(x_6); lean_dec(x_6); x_12 = lean_unbox_usize(x_7); lean_dec(x_7); x_13 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleHover___spec__5(x_1, x_2, x_3, x_4, x_5, x_11, x_12, x_8, x_9, x_10); lean_dec(x_9); lean_dec(x_5); lean_dec(x_1); return x_13; } } lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___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) { _start: { lean_object* x_8; x_8 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleHover___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_6); lean_dec(x_4); lean_dec(x_1); return x_8; } } lean_object* l_Lean_Server_FileWorker_handleHover___lambda__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l_Lean_Server_FileWorker_handleHover___lambda__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } lean_object* l_Lean_Server_FileWorker_handleHover___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: { lean_object* x_8; x_8 = l_Lean_Server_FileWorker_handleHover___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_2); return x_8; } } lean_object* l_Lean_Server_FileWorker_handleDefinition_match__1___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_FileWorker_handleDefinition_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDefinition_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleDefinition_match__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = lean_ctor_get(x_1, 0); lean_inc(x_4); if (lean_obj_tag(x_4) == 0) { lean_object* x_5; lean_dec(x_2); x_5 = lean_apply_1(x_3, x_1); return x_5; } else { lean_object* x_6; x_6 = lean_ctor_get(x_1, 1); lean_inc(x_6); if (lean_obj_tag(x_6) == 0) { lean_object* x_7; lean_dec(x_4); lean_dec(x_2); x_7 = lean_apply_1(x_3, x_1); return x_7; } else { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_dec(x_3); lean_dec(x_1); x_8 = lean_ctor_get(x_4, 0); lean_inc(x_8); lean_dec(x_4); x_9 = lean_ctor_get(x_6, 0); lean_inc(x_9); lean_dec(x_6); x_10 = lean_apply_2(x_2, x_8, x_9); return x_10; } } } } lean_object* l_Lean_Server_FileWorker_handleDefinition_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDefinition_match__2___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleDefinition_match__3___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_dec(x_2); x_4 = lean_apply_1(x_3, x_1); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_dec(x_3); x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); lean_dec(x_1); x_6 = lean_apply_1(x_2, x_5); return x_6; } } } lean_object* l_Lean_Server_FileWorker_handleDefinition_match__3(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDefinition_match__3___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleDefinition_match__4___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_dec(x_2); x_4 = lean_apply_1(x_3, x_1); return x_4; } else { lean_object* x_5; lean_object* x_6; x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); x_6 = lean_ctor_get(x_5, 1); lean_inc(x_6); if (lean_obj_tag(x_6) == 1) { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_dec(x_3); lean_dec(x_1); x_7 = lean_ctor_get(x_5, 0); lean_inc(x_7); lean_dec(x_5); x_8 = lean_ctor_get(x_6, 0); lean_inc(x_8); lean_dec(x_6); x_9 = lean_apply_2(x_2, x_7, x_8); return x_9; } else { lean_object* x_10; lean_dec(x_6); lean_dec(x_5); lean_dec(x_2); x_10 = lean_apply_1(x_3, x_1); return x_10; } } } } lean_object* l_Lean_Server_FileWorker_handleDefinition_match__4(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDefinition_match__4___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleDefinition_match__5___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_box(0); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_apply_1(x_3, x_6); return x_7; } } } lean_object* l_Lean_Server_FileWorker_handleDefinition_match__5(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDefinition_match__5___rarg), 3, 0); return x_2; } } lean_object* l_Lean_findModuleOf_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; lean_inc(x_1); x_7 = l_Lean_getConstInfo___at_Lean_Meta_mkConstWithFreshMVarLevels___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); if (lean_obj_tag(x_7) == 0) { lean_object* x_8; lean_object* x_9; uint8_t x_10; x_8 = lean_ctor_get(x_7, 1); lean_inc(x_8); lean_dec(x_7); x_9 = lean_st_ref_get(x_5, x_8); x_10 = !lean_is_exclusive(x_9); if (x_10 == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_11 = lean_ctor_get(x_9, 0); x_12 = lean_ctor_get(x_9, 1); x_13 = lean_ctor_get(x_11, 0); lean_inc(x_13); lean_dec(x_11); x_14 = l_Lean_Environment_getModuleIdxFor_x3f(x_13, x_1); lean_dec(x_1); lean_dec(x_13); if (lean_obj_tag(x_14) == 0) { lean_object* x_15; x_15 = lean_box(0); lean_ctor_set(x_9, 0, x_15); return x_9; } else { uint8_t x_16; lean_free_object(x_9); x_16 = !lean_is_exclusive(x_14); if (x_16 == 0) { lean_object* x_17; lean_object* x_18; uint8_t x_19; x_17 = lean_ctor_get(x_14, 0); x_18 = lean_st_ref_get(x_5, x_12); x_19 = !lean_is_exclusive(x_18); if (x_19 == 0) { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; x_20 = lean_ctor_get(x_18, 0); x_21 = lean_ctor_get(x_20, 0); lean_inc(x_21); lean_dec(x_20); x_22 = l_Lean_Environment_allImportedModuleNames(x_21); lean_dec(x_21); x_23 = l_Lean_instInhabitedName; x_24 = lean_array_get(x_23, x_22, x_17); lean_dec(x_17); lean_dec(x_22); lean_ctor_set(x_14, 0, x_24); lean_ctor_set(x_18, 0, x_14); return x_18; } else { lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; x_25 = lean_ctor_get(x_18, 0); x_26 = lean_ctor_get(x_18, 1); lean_inc(x_26); lean_inc(x_25); lean_dec(x_18); x_27 = lean_ctor_get(x_25, 0); lean_inc(x_27); lean_dec(x_25); x_28 = l_Lean_Environment_allImportedModuleNames(x_27); lean_dec(x_27); x_29 = l_Lean_instInhabitedName; x_30 = lean_array_get(x_29, x_28, x_17); lean_dec(x_17); lean_dec(x_28); lean_ctor_set(x_14, 0, x_30); x_31 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_31, 0, x_14); lean_ctor_set(x_31, 1, x_26); return x_31; } } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; x_32 = lean_ctor_get(x_14, 0); lean_inc(x_32); lean_dec(x_14); x_33 = lean_st_ref_get(x_5, x_12); x_34 = lean_ctor_get(x_33, 0); lean_inc(x_34); x_35 = lean_ctor_get(x_33, 1); lean_inc(x_35); if (lean_is_exclusive(x_33)) { lean_ctor_release(x_33, 0); lean_ctor_release(x_33, 1); x_36 = x_33; } else { lean_dec_ref(x_33); x_36 = lean_box(0); } x_37 = lean_ctor_get(x_34, 0); lean_inc(x_37); lean_dec(x_34); x_38 = l_Lean_Environment_allImportedModuleNames(x_37); lean_dec(x_37); x_39 = l_Lean_instInhabitedName; x_40 = lean_array_get(x_39, x_38, x_32); lean_dec(x_32); lean_dec(x_38); x_41 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_41, 0, x_40); if (lean_is_scalar(x_36)) { x_42 = lean_alloc_ctor(0, 2, 0); } else { x_42 = x_36; } lean_ctor_set(x_42, 0, x_41); lean_ctor_set(x_42, 1, x_35); return x_42; } } } else { lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; x_43 = lean_ctor_get(x_9, 0); x_44 = lean_ctor_get(x_9, 1); lean_inc(x_44); lean_inc(x_43); lean_dec(x_9); x_45 = lean_ctor_get(x_43, 0); lean_inc(x_45); lean_dec(x_43); x_46 = l_Lean_Environment_getModuleIdxFor_x3f(x_45, x_1); lean_dec(x_1); lean_dec(x_45); if (lean_obj_tag(x_46) == 0) { lean_object* x_47; lean_object* x_48; x_47 = lean_box(0); x_48 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_48, 0, x_47); lean_ctor_set(x_48, 1, x_44); return x_48; } else { lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; x_49 = lean_ctor_get(x_46, 0); lean_inc(x_49); if (lean_is_exclusive(x_46)) { lean_ctor_release(x_46, 0); x_50 = x_46; } else { lean_dec_ref(x_46); x_50 = lean_box(0); } x_51 = lean_st_ref_get(x_5, x_44); x_52 = lean_ctor_get(x_51, 0); lean_inc(x_52); x_53 = lean_ctor_get(x_51, 1); lean_inc(x_53); if (lean_is_exclusive(x_51)) { lean_ctor_release(x_51, 0); lean_ctor_release(x_51, 1); x_54 = x_51; } else { lean_dec_ref(x_51); x_54 = lean_box(0); } x_55 = lean_ctor_get(x_52, 0); lean_inc(x_55); lean_dec(x_52); x_56 = l_Lean_Environment_allImportedModuleNames(x_55); lean_dec(x_55); x_57 = l_Lean_instInhabitedName; x_58 = lean_array_get(x_57, x_56, x_49); lean_dec(x_49); lean_dec(x_56); if (lean_is_scalar(x_50)) { x_59 = lean_alloc_ctor(1, 1, 0); } else { x_59 = x_50; } lean_ctor_set(x_59, 0, x_58); if (lean_is_scalar(x_54)) { x_60 = lean_alloc_ctor(0, 2, 0); } else { x_60 = x_54; } lean_ctor_set(x_60, 0, x_59); lean_ctor_set(x_60, 1, x_53); return x_60; } } } else { uint8_t x_61; lean_dec(x_1); x_61 = !lean_is_exclusive(x_7); if (x_61 == 0) { return x_7; } else { lean_object* x_62; lean_object* x_63; lean_object* x_64; x_62 = lean_ctor_get(x_7, 0); x_63 = lean_ctor_get(x_7, 1); lean_inc(x_63); lean_inc(x_62); lean_dec(x_7); x_64 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_64, 0, x_62); lean_ctor_set(x_64, 1, x_63); return x_64; } } } } lean_object* l_Lean_findDeclarationRangesCore_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; uint8_t x_8; x_7 = lean_st_ref_get(x_5, x_6); x_8 = !lean_is_exclusive(x_7); if (x_8 == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; x_9 = lean_ctor_get(x_7, 0); x_10 = lean_ctor_get(x_9, 0); lean_inc(x_10); lean_dec(x_9); x_11 = l_Lean_declRangeExt; x_12 = l_Lean_MapDeclarationExtension_find_x3f___at_Lean_findDeclarationRangesCore_x3f___spec__1(x_11, x_10, x_1); lean_dec(x_10); lean_ctor_set(x_7, 0, x_12); return x_7; } else { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; x_13 = lean_ctor_get(x_7, 0); x_14 = lean_ctor_get(x_7, 1); lean_inc(x_14); lean_inc(x_13); lean_dec(x_7); x_15 = lean_ctor_get(x_13, 0); lean_inc(x_15); lean_dec(x_13); x_16 = l_Lean_declRangeExt; x_17 = l_Lean_MapDeclarationExtension_find_x3f___at_Lean_findDeclarationRangesCore_x3f___spec__1(x_16, x_15, x_1); lean_dec(x_15); x_18 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_14); return x_18; } } } lean_object* l_Lean_findDeclarationRanges_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__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; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; x_7 = lean_st_ref_get(x_5, x_6); x_8 = lean_ctor_get(x_7, 0); lean_inc(x_8); x_9 = lean_ctor_get(x_7, 1); lean_inc(x_9); lean_dec(x_7); x_10 = lean_ctor_get(x_8, 0); lean_inc(x_10); lean_dec(x_8); lean_inc(x_1); x_11 = l_Lean_isRec___at___private_Lean_Server_Completion_0__Lean_Server_Completion_isBlackListed___spec__1(x_1, x_2, x_3, x_4, x_5, x_9); x_12 = lean_ctor_get(x_11, 0); lean_inc(x_12); x_13 = lean_ctor_get(x_11, 1); lean_inc(x_13); lean_dec(x_11); x_14 = l_Lean_auxRecExt; x_15 = l_Lean_TagDeclarationExtension_isTagged(x_14, x_10, x_1); if (x_15 == 0) { lean_object* x_16; uint8_t x_17; x_16 = l_Lean_noConfusionExt; x_17 = l_Lean_TagDeclarationExtension_isTagged(x_16, x_10, x_1); lean_dec(x_10); if (x_17 == 0) { uint8_t x_18; x_18 = lean_unbox(x_12); lean_dec(x_12); if (x_18 == 0) { lean_object* x_19; x_19 = l_Lean_findDeclarationRangesCore_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__3(x_1, x_2, x_3, x_4, x_5, x_13); return x_19; } else { lean_object* x_20; lean_object* x_21; x_20 = l_Lean_Name_getPrefix(x_1); lean_dec(x_1); x_21 = l_Lean_findDeclarationRangesCore_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__3(x_20, x_2, x_3, x_4, x_5, x_13); return x_21; } } else { lean_object* x_22; lean_object* x_23; lean_dec(x_12); x_22 = l_Lean_Name_getPrefix(x_1); lean_dec(x_1); x_23 = l_Lean_findDeclarationRangesCore_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__3(x_22, x_2, x_3, x_4, x_5, x_13); return x_23; } } else { lean_object* x_24; lean_object* x_25; lean_dec(x_12); lean_dec(x_10); x_24 = l_Lean_Name_getPrefix(x_1); lean_dec(x_1); x_25 = l_Lean_findDeclarationRangesCore_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__3(x_24, x_2, x_3, x_4, x_5, x_13); return x_25; } } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__6(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* x_8, lean_object* x_9, size_t x_10, size_t x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { _start: { lean_object* x_15; lean_object* x_16; uint8_t x_39; x_39 = x_11 < x_10; if (x_39 == 0) { lean_object* x_40; lean_object* x_41; lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); x_40 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_40, 0, x_12); x_41 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_41, 0, x_40); lean_ctor_set(x_41, 1, x_14); return x_41; } else { lean_object* x_42; lean_object* x_43; lean_object* x_44; x_42 = lean_array_uget(x_9, x_11); x_43 = lean_ctor_get(x_12, 1); lean_inc(x_43); lean_dec(x_12); lean_inc(x_6); lean_inc(x_5); x_44 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleDefinition___spec__5(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_42, x_43, x_13, x_14); lean_dec(x_42); if (lean_obj_tag(x_44) == 0) { lean_object* x_45; x_45 = lean_ctor_get(x_44, 0); lean_inc(x_45); if (lean_obj_tag(x_45) == 0) { lean_object* x_46; uint8_t x_47; x_46 = lean_ctor_get(x_44, 1); lean_inc(x_46); lean_dec(x_44); x_47 = !lean_is_exclusive(x_45); if (x_47 == 0) { x_15 = x_45; x_16 = x_46; goto block_38; } else { lean_object* x_48; lean_object* x_49; x_48 = lean_ctor_get(x_45, 0); lean_inc(x_48); lean_dec(x_45); x_49 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_49, 0, x_48); x_15 = x_49; x_16 = x_46; goto block_38; } } else { uint8_t x_50; x_50 = !lean_is_exclusive(x_45); if (x_50 == 0) { lean_object* x_51; x_51 = lean_ctor_get(x_45, 0); if (lean_obj_tag(x_51) == 0) { lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; x_52 = lean_ctor_get(x_44, 1); lean_inc(x_52); lean_dec(x_44); x_53 = lean_ctor_get(x_51, 0); lean_inc(x_53); x_54 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_54, 0, x_51); x_55 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_55, 0, x_54); lean_ctor_set(x_55, 1, x_53); x_56 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_56, 0, x_55); lean_ctor_set(x_45, 0, x_56); x_15 = x_45; x_16 = x_52; goto block_38; } else { lean_object* x_57; uint8_t x_58; x_57 = lean_ctor_get(x_44, 1); lean_inc(x_57); lean_dec(x_44); x_58 = !lean_is_exclusive(x_51); if (x_58 == 0) { lean_object* x_59; lean_object* x_60; x_59 = lean_ctor_get(x_51, 0); lean_inc(x_8); x_60 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_60, 0, x_8); lean_ctor_set(x_60, 1, x_59); lean_ctor_set(x_51, 0, x_60); x_15 = x_45; x_16 = x_57; goto block_38; } else { lean_object* x_61; lean_object* x_62; lean_object* x_63; x_61 = lean_ctor_get(x_51, 0); lean_inc(x_61); lean_dec(x_51); lean_inc(x_8); x_62 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_62, 0, x_8); lean_ctor_set(x_62, 1, x_61); x_63 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_63, 0, x_62); lean_ctor_set(x_45, 0, x_63); x_15 = x_45; x_16 = x_57; goto block_38; } } } else { lean_object* x_64; x_64 = lean_ctor_get(x_45, 0); lean_inc(x_64); lean_dec(x_45); if (lean_obj_tag(x_64) == 0) { lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; x_65 = lean_ctor_get(x_44, 1); lean_inc(x_65); lean_dec(x_44); x_66 = lean_ctor_get(x_64, 0); lean_inc(x_66); x_67 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_67, 0, x_64); x_68 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_68, 0, x_67); lean_ctor_set(x_68, 1, x_66); x_69 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_69, 0, x_68); x_70 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_70, 0, x_69); x_15 = x_70; x_16 = x_65; goto block_38; } else { lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; x_71 = lean_ctor_get(x_44, 1); lean_inc(x_71); lean_dec(x_44); x_72 = lean_ctor_get(x_64, 0); lean_inc(x_72); if (lean_is_exclusive(x_64)) { lean_ctor_release(x_64, 0); x_73 = x_64; } else { lean_dec_ref(x_64); x_73 = lean_box(0); } lean_inc(x_8); x_74 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_74, 0, x_8); lean_ctor_set(x_74, 1, x_72); if (lean_is_scalar(x_73)) { x_75 = lean_alloc_ctor(1, 1, 0); } else { x_75 = x_73; } lean_ctor_set(x_75, 0, x_74); x_76 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_76, 0, x_75); x_15 = x_76; x_16 = x_71; goto block_38; } } } } else { uint8_t x_77; lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); x_77 = !lean_is_exclusive(x_44); if (x_77 == 0) { return x_44; } else { lean_object* x_78; lean_object* x_79; lean_object* x_80; x_78 = lean_ctor_get(x_44, 0); x_79 = lean_ctor_get(x_44, 1); lean_inc(x_79); lean_inc(x_78); lean_dec(x_44); x_80 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_80, 0, x_78); lean_ctor_set(x_80, 1, x_79); return x_80; } } } block_38: { if (lean_obj_tag(x_15) == 0) { uint8_t x_17; lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); x_17 = !lean_is_exclusive(x_15); if (x_17 == 0) { lean_object* x_18; x_18 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_18, 0, x_15); lean_ctor_set(x_18, 1, x_16); return x_18; } else { lean_object* x_19; lean_object* x_20; lean_object* x_21; x_19 = lean_ctor_get(x_15, 0); lean_inc(x_19); lean_dec(x_15); x_20 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_20, 0, x_19); x_21 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_21, 0, x_20); lean_ctor_set(x_21, 1, x_16); return x_21; } } else { uint8_t x_22; x_22 = !lean_is_exclusive(x_15); if (x_22 == 0) { lean_object* x_23; x_23 = lean_ctor_get(x_15, 0); if (lean_obj_tag(x_23) == 0) { lean_object* x_24; lean_object* x_25; lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); x_24 = lean_ctor_get(x_23, 0); lean_inc(x_24); lean_dec(x_23); lean_ctor_set(x_15, 0, x_24); x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_15); lean_ctor_set(x_25, 1, x_16); return x_25; } else { lean_object* x_26; size_t x_27; size_t x_28; lean_free_object(x_15); x_26 = lean_ctor_get(x_23, 0); lean_inc(x_26); lean_dec(x_23); x_27 = 1; x_28 = x_11 + x_27; x_11 = x_28; x_12 = x_26; x_14 = x_16; goto _start; } } else { lean_object* x_30; x_30 = lean_ctor_get(x_15, 0); lean_inc(x_30); lean_dec(x_15); if (lean_obj_tag(x_30) == 0) { lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); x_31 = lean_ctor_get(x_30, 0); lean_inc(x_31); lean_dec(x_30); x_32 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_32, 0, x_31); x_33 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_33, 0, x_32); lean_ctor_set(x_33, 1, x_16); return x_33; } else { lean_object* x_34; size_t x_35; size_t x_36; x_34 = lean_ctor_get(x_30, 0); lean_inc(x_34); lean_dec(x_30); x_35 = 1; x_36 = x_11 + x_35; x_11 = x_36; x_12 = x_34; x_14 = x_16; goto _start; } } } } } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___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) { _start: { lean_object* x_10; lean_object* x_11; x_10 = lean_alloc_closure((void*)(l_Lean_findDeclarationRanges_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__2___boxed), 6, 1); lean_closure_set(x_10, 0, x_1); x_11 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_2, x_3, x_10, x_9); if (lean_obj_tag(x_11) == 0) { lean_object* x_12; x_12 = lean_ctor_get(x_11, 0); lean_inc(x_12); if (lean_obj_tag(x_12) == 0) { uint8_t x_13; lean_dec(x_7); x_13 = !lean_is_exclusive(x_11); if (x_13 == 0) { lean_object* x_14; lean_object* x_15; lean_object* x_16; x_14 = lean_ctor_get(x_11, 0); lean_dec(x_14); x_15 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_15, 0, x_4); x_16 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_16, 0, x_15); lean_ctor_set(x_11, 0, x_16); return x_11; } else { lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; x_17 = lean_ctor_get(x_11, 1); lean_inc(x_17); lean_dec(x_11); x_18 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_18, 0, x_4); x_19 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_19, 0, x_18); x_20 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_20, 0, x_19); lean_ctor_set(x_20, 1, x_17); return x_20; } } else { if (lean_obj_tag(x_7) == 0) { uint8_t x_21; lean_dec(x_12); x_21 = !lean_is_exclusive(x_11); if (x_21 == 0) { lean_object* x_22; lean_object* x_23; lean_object* x_24; x_22 = lean_ctor_get(x_11, 0); lean_dec(x_22); x_23 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_23, 0, x_4); x_24 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_11, 0, x_24); return x_11; } else { lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; x_25 = lean_ctor_get(x_11, 1); lean_inc(x_25); lean_dec(x_11); x_26 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_26, 0, x_4); x_27 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_27, 0, x_26); x_28 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_28, 0, x_27); lean_ctor_set(x_28, 1, x_25); 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; lean_object* x_35; uint8_t x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; 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; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_dec(x_4); x_29 = lean_ctor_get(x_11, 1); lean_inc(x_29); if (lean_is_exclusive(x_11)) { lean_ctor_release(x_11, 0); lean_ctor_release(x_11, 1); x_30 = x_11; } else { lean_dec_ref(x_11); x_30 = lean_box(0); } x_31 = lean_ctor_get(x_12, 0); lean_inc(x_31); if (lean_is_exclusive(x_12)) { lean_ctor_release(x_12, 0); x_32 = x_12; } else { lean_dec_ref(x_12); x_32 = lean_box(0); } x_33 = lean_ctor_get(x_7, 0); lean_inc(x_33); if (lean_is_exclusive(x_7)) { lean_ctor_release(x_7, 0); x_34 = x_7; } else { lean_dec_ref(x_7); x_34 = lean_box(0); } x_35 = lean_ctor_get(x_5, 2); x_36 = 0; x_37 = l_Lean_Syntax_getPos_x3f(x_35, x_36); x_38 = l_Lean_Syntax_getTailPos_x3f(x_35, x_36); x_39 = lean_ctor_get(x_31, 0); lean_inc(x_39); x_40 = lean_ctor_get(x_39, 0); lean_inc(x_40); x_41 = lean_ctor_get(x_39, 1); lean_inc(x_41); x_42 = lean_ctor_get(x_39, 2); lean_inc(x_42); x_43 = lean_ctor_get(x_39, 3); lean_inc(x_43); lean_dec(x_39); x_44 = lean_ctor_get(x_40, 0); lean_inc(x_44); lean_dec(x_40); x_45 = lean_unsigned_to_nat(1u); x_46 = lean_nat_sub(x_44, x_45); lean_dec(x_44); x_47 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_47, 0, x_46); lean_ctor_set(x_47, 1, x_41); x_48 = lean_ctor_get(x_42, 0); lean_inc(x_48); lean_dec(x_42); x_49 = lean_nat_sub(x_48, x_45); lean_dec(x_48); x_50 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_50, 0, x_49); lean_ctor_set(x_50, 1, x_43); x_51 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_51, 0, x_47); lean_ctor_set(x_51, 1, x_50); x_52 = lean_ctor_get(x_31, 1); lean_inc(x_52); lean_dec(x_31); x_53 = lean_ctor_get(x_52, 0); lean_inc(x_53); x_54 = lean_ctor_get(x_52, 1); lean_inc(x_54); x_55 = lean_ctor_get(x_52, 2); lean_inc(x_55); x_56 = lean_ctor_get(x_52, 3); lean_inc(x_56); lean_dec(x_52); x_57 = lean_ctor_get(x_53, 0); lean_inc(x_57); lean_dec(x_53); x_58 = lean_nat_sub(x_57, x_45); lean_dec(x_57); x_59 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_59, 0, x_58); lean_ctor_set(x_59, 1, x_54); x_60 = lean_ctor_get(x_55, 0); lean_inc(x_60); lean_dec(x_55); x_61 = lean_nat_sub(x_60, x_45); lean_dec(x_60); x_62 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_62, 0, x_61); lean_ctor_set(x_62, 1, x_56); x_63 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_63, 0, x_59); lean_ctor_set(x_63, 1, x_62); if (lean_obj_tag(x_37) == 0) { lean_object* x_108; lean_object* x_109; lean_object* x_110; x_108 = l_instInhabitedNat; x_109 = l_Option_get_x21___rarg___closed__4; x_110 = lean_panic_fn(x_108, x_109); x_64 = x_110; goto block_107; } else { lean_object* x_111; x_111 = lean_ctor_get(x_37, 0); lean_inc(x_111); lean_dec(x_37); x_64 = x_111; goto block_107; } block_107: { lean_object* x_65; x_65 = l_Lean_FileMap_utf8PosToLspPos(x_6, x_64); lean_dec(x_64); if (lean_obj_tag(x_38) == 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; 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; x_66 = l_instInhabitedNat; x_67 = l_Option_get_x21___rarg___closed__4; x_68 = lean_panic_fn(x_66, x_67); x_69 = l_Lean_FileMap_utf8PosToLspPos(x_6, x_68); lean_dec(x_68); x_70 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_70, 0, x_65); lean_ctor_set(x_70, 1, x_69); if (lean_is_scalar(x_34)) { x_71 = lean_alloc_ctor(1, 1, 0); } else { x_71 = x_34; } lean_ctor_set(x_71, 0, x_70); x_72 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_72, 0, x_71); lean_ctor_set(x_72, 1, x_33); lean_ctor_set(x_72, 2, x_51); lean_ctor_set(x_72, 3, x_63); x_73 = l_Lean_mkOptionalNode___closed__2; x_74 = lean_array_push(x_73, x_72); if (lean_is_scalar(x_32)) { x_75 = lean_alloc_ctor(1, 1, 0); } else { x_75 = x_32; } lean_ctor_set(x_75, 0, x_74); x_76 = lean_box(0); x_77 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_77, 0, x_75); lean_ctor_set(x_77, 1, x_76); x_78 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_78, 0, x_77); x_79 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_79, 0, x_78); if (lean_is_scalar(x_30)) { x_80 = lean_alloc_ctor(0, 2, 0); } else { x_80 = x_30; } lean_ctor_set(x_80, 0, x_79); lean_ctor_set(x_80, 1, x_29); return x_80; } else { uint8_t x_81; lean_dec(x_32); x_81 = !lean_is_exclusive(x_38); if (x_81 == 0) { lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; x_82 = lean_ctor_get(x_38, 0); x_83 = l_Lean_FileMap_utf8PosToLspPos(x_6, x_82); lean_dec(x_82); x_84 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_84, 0, x_65); lean_ctor_set(x_84, 1, x_83); lean_ctor_set(x_38, 0, x_84); x_85 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_85, 0, x_38); lean_ctor_set(x_85, 1, x_33); lean_ctor_set(x_85, 2, x_51); lean_ctor_set(x_85, 3, x_63); x_86 = l_Lean_mkOptionalNode___closed__2; x_87 = lean_array_push(x_86, x_85); if (lean_is_scalar(x_34)) { x_88 = lean_alloc_ctor(1, 1, 0); } else { x_88 = x_34; } lean_ctor_set(x_88, 0, x_87); x_89 = lean_box(0); x_90 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_90, 0, x_88); lean_ctor_set(x_90, 1, x_89); x_91 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_91, 0, x_90); x_92 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_92, 0, x_91); if (lean_is_scalar(x_30)) { x_93 = lean_alloc_ctor(0, 2, 0); } else { x_93 = x_30; } lean_ctor_set(x_93, 0, x_92); lean_ctor_set(x_93, 1, x_29); return x_93; } else { lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; x_94 = lean_ctor_get(x_38, 0); lean_inc(x_94); lean_dec(x_38); x_95 = l_Lean_FileMap_utf8PosToLspPos(x_6, x_94); lean_dec(x_94); x_96 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_96, 0, x_65); lean_ctor_set(x_96, 1, x_95); x_97 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_97, 0, x_96); x_98 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_98, 0, x_97); lean_ctor_set(x_98, 1, x_33); lean_ctor_set(x_98, 2, x_51); lean_ctor_set(x_98, 3, x_63); x_99 = l_Lean_mkOptionalNode___closed__2; x_100 = lean_array_push(x_99, x_98); if (lean_is_scalar(x_34)) { x_101 = lean_alloc_ctor(1, 1, 0); } else { x_101 = x_34; } lean_ctor_set(x_101, 0, x_100); x_102 = lean_box(0); x_103 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_103, 0, x_101); lean_ctor_set(x_103, 1, x_102); x_104 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_104, 0, x_103); x_105 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_105, 0, x_104); if (lean_is_scalar(x_30)) { x_106 = lean_alloc_ctor(0, 2, 0); } else { x_106 = x_30; } lean_ctor_set(x_106, 0, x_105); lean_ctor_set(x_106, 1, x_29); return x_106; } } } } } } else { uint8_t x_112; lean_dec(x_7); lean_dec(x_4); x_112 = !lean_is_exclusive(x_11); if (x_112 == 0) { return x_11; } else { lean_object* x_113; lean_object* x_114; lean_object* x_115; x_113 = lean_ctor_get(x_11, 0); x_114 = lean_ctor_get(x_11, 1); lean_inc(x_114); lean_inc(x_113); lean_dec(x_11); x_115 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_115, 0, x_113); lean_ctor_set(x_115, 1, x_114); return x_115; } } } } static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__2___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string(".lean"); return x_1; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___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) { _start: { lean_object* x_11; x_11 = l_Lean_Expr_constName_x3f(x_7); if (lean_obj_tag(x_11) == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_dec(x_2); x_12 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_12, 0, x_1); x_13 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_13, 0, x_12); x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_10); return x_14; } else { uint8_t x_15; x_15 = !lean_is_exclusive(x_11); if (x_15 == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_16 = lean_ctor_get(x_11, 0); x_17 = lean_ctor_get(x_2, 0); lean_inc(x_17); lean_inc(x_16); x_18 = lean_alloc_closure((void*)(l_Lean_findModuleOf_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__1___boxed), 6, 1); lean_closure_set(x_18, 0, x_16); lean_inc(x_17); x_19 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_3, x_17, x_18, x_10); if (lean_obj_tag(x_19) == 0) { lean_object* x_20; x_20 = lean_ctor_get(x_19, 0); lean_inc(x_20); if (lean_obj_tag(x_20) == 0) { lean_object* x_21; lean_object* x_22; lean_object* x_23; x_21 = lean_ctor_get(x_19, 1); lean_inc(x_21); lean_dec(x_19); x_22 = lean_ctor_get(x_5, 0); lean_inc(x_22); lean_ctor_set(x_11, 0, x_22); x_23 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__1(x_16, x_3, x_17, x_1, x_2, x_4, x_11, x_9, x_21); lean_dec(x_2); return x_23; } else { lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_free_object(x_11); x_24 = lean_ctor_get(x_19, 1); lean_inc(x_24); lean_dec(x_19); x_25 = lean_ctor_get(x_20, 0); lean_inc(x_25); lean_dec(x_20); x_26 = lean_ctor_get(x_6, 3); x_27 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__2___closed__1; x_28 = l_Lean_SearchPath_findWithExt(x_26, x_27, x_25, x_24); lean_dec(x_25); if (lean_obj_tag(x_28) == 0) { lean_object* x_29; x_29 = lean_ctor_get(x_28, 0); lean_inc(x_29); if (lean_obj_tag(x_29) == 0) { lean_object* x_30; lean_object* x_31; lean_object* x_32; x_30 = lean_ctor_get(x_28, 1); lean_inc(x_30); lean_dec(x_28); x_31 = lean_box(0); x_32 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__1(x_16, x_3, x_17, x_1, x_2, x_4, x_31, x_9, x_30); lean_dec(x_2); return x_32; } else { lean_object* x_33; uint8_t x_34; x_33 = lean_ctor_get(x_28, 1); lean_inc(x_33); lean_dec(x_28); x_34 = !lean_is_exclusive(x_29); if (x_34 == 0) { lean_object* x_35; lean_object* x_36; lean_object* x_37; x_35 = lean_ctor_get(x_29, 0); x_36 = l_Lean_Server_toFileUri(x_35); lean_ctor_set(x_29, 0, x_36); x_37 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__1(x_16, x_3, x_17, x_1, x_2, x_4, x_29, x_9, x_33); lean_dec(x_2); return x_37; } else { lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; x_38 = lean_ctor_get(x_29, 0); lean_inc(x_38); lean_dec(x_29); x_39 = l_Lean_Server_toFileUri(x_38); x_40 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_40, 0, x_39); x_41 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__1(x_16, x_3, x_17, x_1, x_2, x_4, x_40, x_9, x_33); lean_dec(x_2); return x_41; } } } else { uint8_t x_42; lean_dec(x_17); lean_dec(x_16); lean_dec(x_2); lean_dec(x_1); x_42 = !lean_is_exclusive(x_28); if (x_42 == 0) { return x_28; } else { lean_object* x_43; lean_object* x_44; lean_object* x_45; x_43 = lean_ctor_get(x_28, 0); x_44 = lean_ctor_get(x_28, 1); lean_inc(x_44); lean_inc(x_43); lean_dec(x_28); 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_17); lean_free_object(x_11); lean_dec(x_16); lean_dec(x_2); lean_dec(x_1); x_46 = !lean_is_exclusive(x_19); if (x_46 == 0) { return x_19; } else { lean_object* x_47; lean_object* x_48; lean_object* x_49; x_47 = lean_ctor_get(x_19, 0); x_48 = lean_ctor_get(x_19, 1); lean_inc(x_48); lean_inc(x_47); lean_dec(x_19); 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; } } } else { lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; x_50 = lean_ctor_get(x_11, 0); lean_inc(x_50); lean_dec(x_11); x_51 = lean_ctor_get(x_2, 0); lean_inc(x_51); lean_inc(x_50); x_52 = lean_alloc_closure((void*)(l_Lean_findModuleOf_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__1___boxed), 6, 1); lean_closure_set(x_52, 0, x_50); lean_inc(x_51); x_53 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_3, x_51, x_52, x_10); if (lean_obj_tag(x_53) == 0) { lean_object* x_54; x_54 = lean_ctor_get(x_53, 0); lean_inc(x_54); if (lean_obj_tag(x_54) == 0) { lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; x_55 = lean_ctor_get(x_53, 1); lean_inc(x_55); lean_dec(x_53); x_56 = lean_ctor_get(x_5, 0); lean_inc(x_56); x_57 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_57, 0, x_56); x_58 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__1(x_50, x_3, x_51, x_1, x_2, x_4, x_57, x_9, x_55); lean_dec(x_2); return x_58; } else { lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; x_59 = lean_ctor_get(x_53, 1); lean_inc(x_59); lean_dec(x_53); x_60 = lean_ctor_get(x_54, 0); lean_inc(x_60); lean_dec(x_54); x_61 = lean_ctor_get(x_6, 3); x_62 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__2___closed__1; x_63 = l_Lean_SearchPath_findWithExt(x_61, x_62, x_60, x_59); lean_dec(x_60); if (lean_obj_tag(x_63) == 0) { lean_object* x_64; x_64 = lean_ctor_get(x_63, 0); lean_inc(x_64); if (lean_obj_tag(x_64) == 0) { lean_object* x_65; lean_object* x_66; lean_object* x_67; x_65 = lean_ctor_get(x_63, 1); lean_inc(x_65); lean_dec(x_63); x_66 = lean_box(0); x_67 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__1(x_50, x_3, x_51, x_1, x_2, x_4, x_66, x_9, x_65); lean_dec(x_2); return x_67; } else { 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_68 = lean_ctor_get(x_63, 1); lean_inc(x_68); lean_dec(x_63); x_69 = lean_ctor_get(x_64, 0); lean_inc(x_69); if (lean_is_exclusive(x_64)) { lean_ctor_release(x_64, 0); x_70 = x_64; } else { lean_dec_ref(x_64); x_70 = lean_box(0); } x_71 = l_Lean_Server_toFileUri(x_69); if (lean_is_scalar(x_70)) { x_72 = lean_alloc_ctor(1, 1, 0); } else { x_72 = x_70; } lean_ctor_set(x_72, 0, x_71); x_73 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__1(x_50, x_3, x_51, x_1, x_2, x_4, x_72, x_9, x_68); lean_dec(x_2); return x_73; } } else { lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_dec(x_51); lean_dec(x_50); lean_dec(x_2); lean_dec(x_1); x_74 = lean_ctor_get(x_63, 0); lean_inc(x_74); x_75 = lean_ctor_get(x_63, 1); lean_inc(x_75); if (lean_is_exclusive(x_63)) { lean_ctor_release(x_63, 0); lean_ctor_release(x_63, 1); x_76 = x_63; } else { lean_dec_ref(x_63); x_76 = lean_box(0); } if (lean_is_scalar(x_76)) { x_77 = lean_alloc_ctor(1, 2, 0); } else { x_77 = x_76; } lean_ctor_set(x_77, 0, x_74); lean_ctor_set(x_77, 1, x_75); return x_77; } } } else { lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_dec(x_51); lean_dec(x_50); lean_dec(x_2); lean_dec(x_1); x_78 = lean_ctor_get(x_53, 0); lean_inc(x_78); x_79 = lean_ctor_get(x_53, 1); lean_inc(x_79); if (lean_is_exclusive(x_53)) { lean_ctor_release(x_53, 0); lean_ctor_release(x_53, 1); x_80 = x_53; } else { lean_dec_ref(x_53); x_80 = lean_box(0); } if (lean_is_scalar(x_80)) { x_81 = lean_alloc_ctor(1, 2, 0); } else { x_81 = x_80; } lean_ctor_set(x_81, 0, x_78); lean_ctor_set(x_81, 1, x_79); return x_81; } } } } } static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_Lean_Meta_instantiateMVars), 6, 0); return x_1; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7(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* x_8, size_t x_9, size_t x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { _start: { lean_object* x_14; lean_object* x_15; lean_object* x_38; lean_object* x_39; uint8_t x_67; x_67 = x_10 < x_9; if (x_67 == 0) { lean_object* x_68; lean_object* x_69; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); x_68 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_68, 0, x_11); x_69 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_69, 0, x_68); lean_ctor_set(x_69, 1, x_13); return x_69; } else { lean_object* x_70; lean_object* x_71; lean_dec(x_11); x_70 = lean_array_uget(x_8, x_10); lean_inc(x_5); x_71 = l_Lean_Elab_InfoTree_hoverableInfoAt_x3f(x_70, x_5); if (lean_obj_tag(x_71) == 0) { lean_object* x_72; lean_object* x_73; lean_inc(x_6); x_72 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_72, 0, x_6); x_73 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_73, 0, x_72); x_38 = x_73; x_39 = x_13; goto block_66; } else { lean_object* x_74; lean_object* x_75; x_74 = lean_ctor_get(x_71, 0); lean_inc(x_74); lean_dec(x_71); x_75 = lean_ctor_get(x_74, 1); lean_inc(x_75); if (lean_obj_tag(x_75) == 1) { if (x_1 == 0) { lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; x_76 = lean_ctor_get(x_74, 0); lean_inc(x_76); lean_dec(x_74); x_77 = lean_ctor_get(x_75, 0); lean_inc(x_77); lean_dec(x_75); x_78 = lean_ctor_get(x_77, 1); lean_inc(x_78); x_79 = lean_box(0); lean_inc(x_6); x_80 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__2(x_6, x_77, x_76, x_4, x_3, x_2, x_78, x_79, x_12, x_13); lean_dec(x_78); lean_dec(x_76); if (lean_obj_tag(x_80) == 0) { lean_object* x_81; lean_object* x_82; x_81 = lean_ctor_get(x_80, 0); lean_inc(x_81); x_82 = lean_ctor_get(x_80, 1); lean_inc(x_82); lean_dec(x_80); x_38 = x_81; x_39 = x_82; goto block_66; } else { uint8_t x_83; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); x_83 = !lean_is_exclusive(x_80); if (x_83 == 0) { return x_80; } else { lean_object* x_84; lean_object* x_85; lean_object* x_86; x_84 = lean_ctor_get(x_80, 0); x_85 = lean_ctor_get(x_80, 1); lean_inc(x_85); lean_inc(x_84); lean_dec(x_80); x_86 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_86, 0, x_84); lean_ctor_set(x_86, 1, x_85); return x_86; } } } else { 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; x_87 = lean_ctor_get(x_74, 0); lean_inc(x_87); lean_dec(x_74); x_88 = lean_ctor_get(x_75, 0); lean_inc(x_88); lean_dec(x_75); x_89 = lean_ctor_get(x_88, 1); lean_inc(x_89); x_90 = lean_ctor_get(x_88, 0); lean_inc(x_90); x_91 = lean_alloc_closure((void*)(l_Lean_Meta_inferType), 6, 1); lean_closure_set(x_91, 0, x_89); x_92 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___closed__1; x_93 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg), 7, 2); lean_closure_set(x_93, 0, x_91); lean_closure_set(x_93, 1, x_92); x_94 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_87, x_90, x_93, x_13); if (lean_obj_tag(x_94) == 0) { lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; x_95 = lean_ctor_get(x_94, 0); lean_inc(x_95); x_96 = lean_ctor_get(x_94, 1); lean_inc(x_96); lean_dec(x_94); x_97 = lean_box(0); lean_inc(x_6); x_98 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__2(x_6, x_88, x_87, x_4, x_3, x_2, x_95, x_97, x_12, x_96); lean_dec(x_95); lean_dec(x_87); if (lean_obj_tag(x_98) == 0) { lean_object* x_99; lean_object* x_100; x_99 = lean_ctor_get(x_98, 0); lean_inc(x_99); x_100 = lean_ctor_get(x_98, 1); lean_inc(x_100); lean_dec(x_98); x_38 = x_99; x_39 = x_100; goto block_66; } else { uint8_t x_101; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); x_101 = !lean_is_exclusive(x_98); if (x_101 == 0) { return x_98; } else { lean_object* x_102; lean_object* x_103; lean_object* x_104; x_102 = lean_ctor_get(x_98, 0); x_103 = lean_ctor_get(x_98, 1); lean_inc(x_103); lean_inc(x_102); lean_dec(x_98); x_104 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_104, 0, x_102); lean_ctor_set(x_104, 1, x_103); return x_104; } } } else { uint8_t x_105; lean_dec(x_88); lean_dec(x_87); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); x_105 = !lean_is_exclusive(x_94); if (x_105 == 0) { return x_94; } else { lean_object* x_106; lean_object* x_107; lean_object* x_108; x_106 = lean_ctor_get(x_94, 0); x_107 = lean_ctor_get(x_94, 1); lean_inc(x_107); lean_inc(x_106); lean_dec(x_94); x_108 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_108, 0, x_106); lean_ctor_set(x_108, 1, x_107); return x_108; } } } } else { lean_object* x_109; lean_object* x_110; lean_dec(x_75); lean_dec(x_74); lean_inc(x_6); x_109 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_109, 0, x_6); x_110 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_110, 0, x_109); x_38 = x_110; x_39 = x_13; goto block_66; } } } block_37: { if (lean_obj_tag(x_14) == 0) { uint8_t x_16; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); x_16 = !lean_is_exclusive(x_14); if (x_16 == 0) { lean_object* x_17; x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_14); lean_ctor_set(x_17, 1, x_15); return x_17; } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; x_18 = lean_ctor_get(x_14, 0); lean_inc(x_18); lean_dec(x_14); x_19 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_19, 0, x_18); x_20 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_20, 0, x_19); lean_ctor_set(x_20, 1, x_15); return x_20; } } else { uint8_t x_21; x_21 = !lean_is_exclusive(x_14); if (x_21 == 0) { lean_object* x_22; x_22 = lean_ctor_get(x_14, 0); if (lean_obj_tag(x_22) == 0) { lean_object* x_23; lean_object* x_24; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); x_23 = lean_ctor_get(x_22, 0); lean_inc(x_23); lean_dec(x_22); lean_ctor_set(x_14, 0, x_23); x_24 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_24, 0, x_14); lean_ctor_set(x_24, 1, x_15); return x_24; } else { lean_object* x_25; size_t x_26; size_t x_27; lean_free_object(x_14); x_25 = lean_ctor_get(x_22, 0); lean_inc(x_25); lean_dec(x_22); x_26 = 1; x_27 = x_10 + x_26; x_10 = x_27; x_11 = x_25; x_13 = x_15; goto _start; } } else { lean_object* x_29; x_29 = lean_ctor_get(x_14, 0); lean_inc(x_29); lean_dec(x_14); if (lean_obj_tag(x_29) == 0) { lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); x_30 = lean_ctor_get(x_29, 0); lean_inc(x_30); lean_dec(x_29); x_31 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_31, 0, 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_15); return x_32; } else { lean_object* x_33; size_t x_34; size_t x_35; x_33 = lean_ctor_get(x_29, 0); lean_inc(x_33); lean_dec(x_29); x_34 = 1; x_35 = x_10 + x_34; x_10 = x_35; x_11 = x_33; x_13 = x_15; goto _start; } } } } block_66: { if (lean_obj_tag(x_38) == 0) { uint8_t x_40; x_40 = !lean_is_exclusive(x_38); if (x_40 == 0) { x_14 = x_38; x_15 = x_39; goto block_37; } else { lean_object* x_41; lean_object* x_42; x_41 = lean_ctor_get(x_38, 0); lean_inc(x_41); lean_dec(x_38); x_42 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_42, 0, x_41); x_14 = x_42; x_15 = x_39; goto block_37; } } else { uint8_t x_43; x_43 = !lean_is_exclusive(x_38); if (x_43 == 0) { lean_object* x_44; x_44 = lean_ctor_get(x_38, 0); if (lean_obj_tag(x_44) == 0) { lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; x_45 = lean_ctor_get(x_44, 0); lean_inc(x_45); x_46 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_46, 0, x_44); x_47 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_47, 0, x_46); lean_ctor_set(x_47, 1, x_45); x_48 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_48, 0, x_47); lean_ctor_set(x_38, 0, x_48); x_14 = x_38; x_15 = x_39; goto block_37; } else { uint8_t x_49; x_49 = !lean_is_exclusive(x_44); if (x_49 == 0) { lean_object* x_50; lean_object* x_51; x_50 = lean_ctor_get(x_44, 0); lean_inc(x_7); x_51 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_51, 0, x_7); lean_ctor_set(x_51, 1, x_50); lean_ctor_set(x_44, 0, x_51); x_14 = x_38; x_15 = x_39; goto block_37; } else { lean_object* x_52; lean_object* x_53; lean_object* x_54; x_52 = lean_ctor_get(x_44, 0); lean_inc(x_52); lean_dec(x_44); lean_inc(x_7); x_53 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_53, 0, x_7); lean_ctor_set(x_53, 1, x_52); x_54 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_54, 0, x_53); lean_ctor_set(x_38, 0, x_54); x_14 = x_38; x_15 = x_39; goto block_37; } } } else { lean_object* x_55; x_55 = lean_ctor_get(x_38, 0); lean_inc(x_55); lean_dec(x_38); if (lean_obj_tag(x_55) == 0) { lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; x_56 = lean_ctor_get(x_55, 0); lean_inc(x_56); x_57 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_57, 0, x_55); x_58 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_58, 0, x_57); lean_ctor_set(x_58, 1, x_56); x_59 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_59, 0, x_58); x_60 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_60, 0, x_59); x_14 = x_60; x_15 = x_39; goto block_37; } else { lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; x_61 = lean_ctor_get(x_55, 0); lean_inc(x_61); if (lean_is_exclusive(x_55)) { lean_ctor_release(x_55, 0); x_62 = x_55; } else { lean_dec_ref(x_55); x_62 = lean_box(0); } lean_inc(x_7); x_63 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_63, 0, x_7); lean_ctor_set(x_63, 1, x_61); if (lean_is_scalar(x_62)) { x_64 = lean_alloc_ctor(1, 1, 0); } else { x_64 = x_62; } lean_ctor_set(x_64, 0, x_63); x_65 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_65, 0, x_64); x_14 = x_65; x_15 = x_39; goto block_37; } } } } } } lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleDefinition___spec__5(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* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { if (lean_obj_tag(x_8) == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18; x_12 = lean_ctor_get(x_8, 0); x_13 = lean_box(0); x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_9); x_15 = lean_array_get_size(x_12); x_16 = lean_usize_of_nat(x_15); lean_dec(x_15); x_17 = 0; x_18 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__6(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_13, x_12, x_16, x_17, x_14, x_10, x_11); if (lean_obj_tag(x_18) == 0) { lean_object* x_19; x_19 = lean_ctor_get(x_18, 0); lean_inc(x_19); if (lean_obj_tag(x_19) == 0) { uint8_t x_20; x_20 = !lean_is_exclusive(x_18); if (x_20 == 0) { lean_object* x_21; uint8_t x_22; x_21 = lean_ctor_get(x_18, 0); lean_dec(x_21); x_22 = !lean_is_exclusive(x_19); if (x_22 == 0) { return x_18; } else { lean_object* x_23; lean_object* x_24; x_23 = lean_ctor_get(x_19, 0); lean_inc(x_23); lean_dec(x_19); x_24 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_18, 0, x_24); return x_18; } } else { lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; x_25 = lean_ctor_get(x_18, 1); lean_inc(x_25); lean_dec(x_18); x_26 = lean_ctor_get(x_19, 0); lean_inc(x_26); if (lean_is_exclusive(x_19)) { lean_ctor_release(x_19, 0); x_27 = x_19; } else { lean_dec_ref(x_19); x_27 = lean_box(0); } if (lean_is_scalar(x_27)) { x_28 = lean_alloc_ctor(0, 1, 0); } else { x_28 = x_27; } lean_ctor_set(x_28, 0, x_26); x_29 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_29, 0, x_28); lean_ctor_set(x_29, 1, x_25); return x_29; } } else { uint8_t x_30; x_30 = !lean_is_exclusive(x_19); if (x_30 == 0) { lean_object* x_31; lean_object* x_32; x_31 = lean_ctor_get(x_19, 0); x_32 = lean_ctor_get(x_31, 0); lean_inc(x_32); if (lean_obj_tag(x_32) == 0) { lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_free_object(x_19); x_33 = lean_ctor_get(x_18, 1); lean_inc(x_33); lean_dec(x_18); x_34 = lean_ctor_get(x_31, 1); lean_inc(x_34); lean_dec(x_31); x_35 = lean_box(0); x_36 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1(x_34, x_35, x_10, x_33); return x_36; } else { uint8_t x_37; lean_dec(x_31); x_37 = !lean_is_exclusive(x_18); if (x_37 == 0) { lean_object* x_38; lean_object* x_39; x_38 = lean_ctor_get(x_18, 0); lean_dec(x_38); x_39 = lean_ctor_get(x_32, 0); lean_inc(x_39); lean_dec(x_32); lean_ctor_set(x_19, 0, x_39); return x_18; } else { lean_object* x_40; lean_object* x_41; lean_object* x_42; x_40 = lean_ctor_get(x_18, 1); lean_inc(x_40); lean_dec(x_18); x_41 = lean_ctor_get(x_32, 0); lean_inc(x_41); lean_dec(x_32); lean_ctor_set(x_19, 0, x_41); x_42 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_42, 0, x_19); lean_ctor_set(x_42, 1, x_40); return x_42; } } } else { lean_object* x_43; lean_object* x_44; x_43 = lean_ctor_get(x_19, 0); lean_inc(x_43); lean_dec(x_19); x_44 = lean_ctor_get(x_43, 0); lean_inc(x_44); if (lean_obj_tag(x_44) == 0) { lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; x_45 = lean_ctor_get(x_18, 1); lean_inc(x_45); lean_dec(x_18); x_46 = lean_ctor_get(x_43, 1); lean_inc(x_46); lean_dec(x_43); x_47 = lean_box(0); x_48 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1(x_46, x_47, x_10, x_45); return x_48; } else { lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_dec(x_43); x_49 = lean_ctor_get(x_18, 1); lean_inc(x_49); if (lean_is_exclusive(x_18)) { lean_ctor_release(x_18, 0); lean_ctor_release(x_18, 1); x_50 = x_18; } else { lean_dec_ref(x_18); x_50 = lean_box(0); } x_51 = lean_ctor_get(x_44, 0); lean_inc(x_51); lean_dec(x_44); x_52 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_52, 0, x_51); if (lean_is_scalar(x_50)) { x_53 = lean_alloc_ctor(0, 2, 0); } else { x_53 = x_50; } lean_ctor_set(x_53, 0, x_52); lean_ctor_set(x_53, 1, x_49); return x_53; } } } } else { uint8_t x_54; x_54 = !lean_is_exclusive(x_18); if (x_54 == 0) { return x_18; } else { lean_object* x_55; lean_object* x_56; lean_object* x_57; x_55 = lean_ctor_get(x_18, 0); x_56 = lean_ctor_get(x_18, 1); lean_inc(x_56); lean_inc(x_55); lean_dec(x_18); x_57 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_57, 0, x_55); lean_ctor_set(x_57, 1, x_56); return x_57; } } } else { lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; size_t x_62; size_t x_63; lean_object* x_64; x_58 = lean_ctor_get(x_8, 0); x_59 = lean_box(0); x_60 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_60, 0, x_59); lean_ctor_set(x_60, 1, x_9); x_61 = lean_array_get_size(x_58); x_62 = lean_usize_of_nat(x_61); lean_dec(x_61); x_63 = 0; x_64 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7(x_1, x_2, x_3, x_4, x_5, x_6, x_59, x_58, x_62, x_63, x_60, x_10, x_11); if (lean_obj_tag(x_64) == 0) { lean_object* x_65; x_65 = lean_ctor_get(x_64, 0); lean_inc(x_65); if (lean_obj_tag(x_65) == 0) { uint8_t x_66; x_66 = !lean_is_exclusive(x_64); if (x_66 == 0) { lean_object* x_67; uint8_t x_68; x_67 = lean_ctor_get(x_64, 0); lean_dec(x_67); x_68 = !lean_is_exclusive(x_65); if (x_68 == 0) { return x_64; } else { lean_object* x_69; lean_object* x_70; x_69 = lean_ctor_get(x_65, 0); lean_inc(x_69); lean_dec(x_65); x_70 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_70, 0, x_69); lean_ctor_set(x_64, 0, x_70); return x_64; } } else { lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; x_71 = lean_ctor_get(x_64, 1); lean_inc(x_71); lean_dec(x_64); x_72 = lean_ctor_get(x_65, 0); lean_inc(x_72); if (lean_is_exclusive(x_65)) { lean_ctor_release(x_65, 0); x_73 = x_65; } else { lean_dec_ref(x_65); x_73 = lean_box(0); } if (lean_is_scalar(x_73)) { x_74 = lean_alloc_ctor(0, 1, 0); } else { x_74 = x_73; } lean_ctor_set(x_74, 0, x_72); x_75 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_75, 0, x_74); lean_ctor_set(x_75, 1, x_71); return x_75; } } else { uint8_t x_76; x_76 = !lean_is_exclusive(x_65); if (x_76 == 0) { lean_object* x_77; lean_object* x_78; x_77 = lean_ctor_get(x_65, 0); x_78 = lean_ctor_get(x_77, 0); lean_inc(x_78); if (lean_obj_tag(x_78) == 0) { lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_free_object(x_65); x_79 = lean_ctor_get(x_64, 1); lean_inc(x_79); lean_dec(x_64); x_80 = lean_ctor_get(x_77, 1); lean_inc(x_80); lean_dec(x_77); x_81 = lean_box(0); x_82 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1(x_80, x_81, x_10, x_79); return x_82; } else { uint8_t x_83; lean_dec(x_77); x_83 = !lean_is_exclusive(x_64); if (x_83 == 0) { lean_object* x_84; lean_object* x_85; x_84 = lean_ctor_get(x_64, 0); lean_dec(x_84); x_85 = lean_ctor_get(x_78, 0); lean_inc(x_85); lean_dec(x_78); lean_ctor_set(x_65, 0, x_85); return x_64; } else { lean_object* x_86; lean_object* x_87; lean_object* x_88; x_86 = lean_ctor_get(x_64, 1); lean_inc(x_86); lean_dec(x_64); x_87 = lean_ctor_get(x_78, 0); lean_inc(x_87); lean_dec(x_78); lean_ctor_set(x_65, 0, x_87); x_88 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_88, 0, x_65); lean_ctor_set(x_88, 1, x_86); return x_88; } } } else { lean_object* x_89; lean_object* x_90; x_89 = lean_ctor_get(x_65, 0); lean_inc(x_89); lean_dec(x_65); x_90 = lean_ctor_get(x_89, 0); lean_inc(x_90); if (lean_obj_tag(x_90) == 0) { lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; x_91 = lean_ctor_get(x_64, 1); lean_inc(x_91); lean_dec(x_64); x_92 = lean_ctor_get(x_89, 1); lean_inc(x_92); lean_dec(x_89); x_93 = lean_box(0); x_94 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1(x_92, x_93, x_10, x_91); return x_94; } else { lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_dec(x_89); x_95 = lean_ctor_get(x_64, 1); lean_inc(x_95); if (lean_is_exclusive(x_64)) { lean_ctor_release(x_64, 0); lean_ctor_release(x_64, 1); x_96 = x_64; } else { lean_dec_ref(x_64); x_96 = lean_box(0); } x_97 = lean_ctor_get(x_90, 0); lean_inc(x_97); lean_dec(x_90); x_98 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_98, 0, x_97); if (lean_is_scalar(x_96)) { x_99 = lean_alloc_ctor(0, 2, 0); } else { x_99 = x_96; } lean_ctor_set(x_99, 0, x_98); lean_ctor_set(x_99, 1, x_95); return x_99; } } } } else { uint8_t x_100; x_100 = !lean_is_exclusive(x_64); if (x_100 == 0) { return x_64; } else { lean_object* x_101; lean_object* x_102; lean_object* x_103; x_101 = lean_ctor_get(x_64, 0); x_102 = lean_ctor_get(x_64, 1); lean_inc(x_102); lean_inc(x_101); lean_dec(x_64); x_103 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_103, 0, x_101); lean_ctor_set(x_103, 1, x_102); return x_103; } } } } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8(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* x_8, size_t x_9, size_t x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { _start: { lean_object* x_14; lean_object* x_15; lean_object* x_38; lean_object* x_39; uint8_t x_72; x_72 = x_10 < x_9; if (x_72 == 0) { lean_object* x_73; lean_object* x_74; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); x_73 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_73, 0, x_11); x_74 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_74, 0, x_73); lean_ctor_set(x_74, 1, x_13); return x_74; } else { lean_object* x_75; lean_object* x_76; lean_dec(x_11); x_75 = lean_array_uget(x_8, x_10); lean_inc(x_5); x_76 = l_Lean_Elab_InfoTree_hoverableInfoAt_x3f(x_75, x_5); if (lean_obj_tag(x_76) == 0) { lean_object* x_77; lean_object* x_78; lean_inc(x_6); x_77 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_77, 0, x_6); x_78 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_78, 0, x_77); x_38 = x_78; x_39 = x_13; goto block_71; } else { lean_object* x_79; lean_object* x_80; x_79 = lean_ctor_get(x_76, 0); lean_inc(x_79); lean_dec(x_76); x_80 = lean_ctor_get(x_79, 1); lean_inc(x_80); if (lean_obj_tag(x_80) == 1) { if (x_1 == 0) { lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; x_81 = lean_ctor_get(x_79, 0); lean_inc(x_81); lean_dec(x_79); x_82 = lean_ctor_get(x_80, 0); lean_inc(x_82); lean_dec(x_80); x_83 = lean_ctor_get(x_82, 1); lean_inc(x_83); x_84 = lean_box(0); lean_inc(x_6); x_85 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__2(x_6, x_82, x_81, x_4, x_3, x_2, x_83, x_84, x_12, x_13); lean_dec(x_83); lean_dec(x_81); if (lean_obj_tag(x_85) == 0) { lean_object* x_86; lean_object* x_87; x_86 = lean_ctor_get(x_85, 0); lean_inc(x_86); x_87 = lean_ctor_get(x_85, 1); lean_inc(x_87); lean_dec(x_85); x_38 = x_86; x_39 = x_87; goto block_71; } else { uint8_t x_88; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); x_88 = !lean_is_exclusive(x_85); if (x_88 == 0) { return x_85; } else { lean_object* x_89; lean_object* x_90; lean_object* x_91; x_89 = lean_ctor_get(x_85, 0); x_90 = lean_ctor_get(x_85, 1); lean_inc(x_90); lean_inc(x_89); lean_dec(x_85); 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; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; x_92 = lean_ctor_get(x_79, 0); lean_inc(x_92); lean_dec(x_79); x_93 = lean_ctor_get(x_80, 0); lean_inc(x_93); lean_dec(x_80); x_94 = lean_ctor_get(x_93, 1); lean_inc(x_94); x_95 = lean_ctor_get(x_93, 0); lean_inc(x_95); x_96 = lean_alloc_closure((void*)(l_Lean_Meta_inferType), 6, 1); lean_closure_set(x_96, 0, x_94); x_97 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___closed__1; x_98 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg), 7, 2); lean_closure_set(x_98, 0, x_96); lean_closure_set(x_98, 1, x_97); x_99 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_92, x_95, x_98, x_13); if (lean_obj_tag(x_99) == 0) { lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; x_100 = lean_ctor_get(x_99, 0); lean_inc(x_100); x_101 = lean_ctor_get(x_99, 1); lean_inc(x_101); lean_dec(x_99); x_102 = lean_box(0); lean_inc(x_6); x_103 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__2(x_6, x_93, x_92, x_4, x_3, x_2, x_100, x_102, x_12, x_101); lean_dec(x_100); lean_dec(x_92); if (lean_obj_tag(x_103) == 0) { lean_object* x_104; lean_object* x_105; x_104 = lean_ctor_get(x_103, 0); lean_inc(x_104); x_105 = lean_ctor_get(x_103, 1); lean_inc(x_105); lean_dec(x_103); x_38 = x_104; x_39 = x_105; goto block_71; } else { uint8_t x_106; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); x_106 = !lean_is_exclusive(x_103); if (x_106 == 0) { return x_103; } else { lean_object* x_107; lean_object* x_108; lean_object* x_109; x_107 = lean_ctor_get(x_103, 0); x_108 = lean_ctor_get(x_103, 1); lean_inc(x_108); lean_inc(x_107); lean_dec(x_103); x_109 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_109, 0, x_107); lean_ctor_set(x_109, 1, x_108); return x_109; } } } else { uint8_t x_110; lean_dec(x_93); lean_dec(x_92); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); x_110 = !lean_is_exclusive(x_99); if (x_110 == 0) { return x_99; } else { lean_object* x_111; lean_object* x_112; lean_object* x_113; x_111 = lean_ctor_get(x_99, 0); x_112 = lean_ctor_get(x_99, 1); lean_inc(x_112); lean_inc(x_111); lean_dec(x_99); x_113 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_113, 0, x_111); lean_ctor_set(x_113, 1, x_112); return x_113; } } } } else { lean_object* x_114; lean_object* x_115; lean_dec(x_80); lean_dec(x_79); lean_inc(x_6); x_114 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_114, 0, x_6); x_115 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_115, 0, x_114); x_38 = x_115; x_39 = x_13; goto block_71; } } } block_37: { if (lean_obj_tag(x_14) == 0) { uint8_t x_16; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); x_16 = !lean_is_exclusive(x_14); if (x_16 == 0) { lean_object* x_17; x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_14); lean_ctor_set(x_17, 1, x_15); return x_17; } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; x_18 = lean_ctor_get(x_14, 0); lean_inc(x_18); lean_dec(x_14); x_19 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_19, 0, x_18); x_20 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_20, 0, x_19); lean_ctor_set(x_20, 1, x_15); return x_20; } } else { uint8_t x_21; x_21 = !lean_is_exclusive(x_14); if (x_21 == 0) { lean_object* x_22; x_22 = lean_ctor_get(x_14, 0); if (lean_obj_tag(x_22) == 0) { lean_object* x_23; lean_object* x_24; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); x_23 = lean_ctor_get(x_22, 0); lean_inc(x_23); lean_dec(x_22); lean_ctor_set(x_14, 0, x_23); x_24 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_24, 0, x_14); lean_ctor_set(x_24, 1, x_15); return x_24; } else { lean_object* x_25; size_t x_26; size_t x_27; lean_free_object(x_14); x_25 = lean_ctor_get(x_22, 0); lean_inc(x_25); lean_dec(x_22); x_26 = 1; x_27 = x_10 + x_26; x_10 = x_27; x_11 = x_25; x_13 = x_15; goto _start; } } else { lean_object* x_29; x_29 = lean_ctor_get(x_14, 0); lean_inc(x_29); lean_dec(x_14); if (lean_obj_tag(x_29) == 0) { lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); x_30 = lean_ctor_get(x_29, 0); lean_inc(x_30); lean_dec(x_29); x_31 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_31, 0, 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_15); return x_32; } else { lean_object* x_33; size_t x_34; size_t x_35; x_33 = lean_ctor_get(x_29, 0); lean_inc(x_33); lean_dec(x_29); x_34 = 1; x_35 = x_10 + x_34; x_10 = x_35; x_11 = x_33; x_13 = x_15; goto _start; } } } } block_71: { if (lean_obj_tag(x_38) == 0) { uint8_t x_40; x_40 = !lean_is_exclusive(x_38); if (x_40 == 0) { x_14 = x_38; x_15 = x_39; goto block_37; } else { lean_object* x_41; lean_object* x_42; x_41 = lean_ctor_get(x_38, 0); lean_inc(x_41); lean_dec(x_38); x_42 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_42, 0, x_41); x_14 = x_42; x_15 = x_39; goto block_37; } } else { uint8_t x_43; x_43 = !lean_is_exclusive(x_38); if (x_43 == 0) { lean_object* x_44; x_44 = lean_ctor_get(x_38, 0); 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; lean_object* x_47; lean_object* x_48; x_46 = lean_ctor_get(x_44, 0); lean_inc(x_46); x_47 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_47, 0, x_46); x_48 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_48, 0, x_47); lean_ctor_set(x_48, 1, x_46); lean_ctor_set(x_44, 0, x_48); x_14 = x_38; x_15 = x_39; goto block_37; } else { lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; x_49 = lean_ctor_get(x_44, 0); lean_inc(x_49); lean_dec(x_44); lean_inc(x_49); x_50 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_50, 0, x_49); x_51 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_51, 0, x_50); lean_ctor_set(x_51, 1, x_49); x_52 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_52, 0, x_51); lean_ctor_set(x_38, 0, x_52); x_14 = x_38; x_15 = x_39; goto block_37; } } else { uint8_t x_53; x_53 = !lean_is_exclusive(x_44); if (x_53 == 0) { lean_object* x_54; lean_object* x_55; x_54 = lean_ctor_get(x_44, 0); lean_inc(x_7); x_55 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_55, 0, x_7); lean_ctor_set(x_55, 1, x_54); lean_ctor_set(x_44, 0, x_55); x_14 = x_38; x_15 = x_39; goto block_37; } else { lean_object* x_56; lean_object* x_57; lean_object* x_58; x_56 = lean_ctor_get(x_44, 0); lean_inc(x_56); lean_dec(x_44); lean_inc(x_7); x_57 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_57, 0, x_7); lean_ctor_set(x_57, 1, x_56); x_58 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_58, 0, x_57); lean_ctor_set(x_38, 0, x_58); x_14 = x_38; x_15 = x_39; goto block_37; } } } else { lean_object* x_59; x_59 = lean_ctor_get(x_38, 0); lean_inc(x_59); lean_dec(x_38); if (lean_obj_tag(x_59) == 0) { lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; x_60 = lean_ctor_get(x_59, 0); lean_inc(x_60); if (lean_is_exclusive(x_59)) { lean_ctor_release(x_59, 0); x_61 = x_59; } else { lean_dec_ref(x_59); x_61 = lean_box(0); } lean_inc(x_60); x_62 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_62, 0, x_60); x_63 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_63, 0, x_62); lean_ctor_set(x_63, 1, x_60); if (lean_is_scalar(x_61)) { x_64 = lean_alloc_ctor(0, 1, 0); } else { x_64 = x_61; } lean_ctor_set(x_64, 0, x_63); x_65 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_65, 0, x_64); x_14 = x_65; x_15 = x_39; goto block_37; } else { lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; x_66 = lean_ctor_get(x_59, 0); lean_inc(x_66); if (lean_is_exclusive(x_59)) { lean_ctor_release(x_59, 0); x_67 = x_59; } else { lean_dec_ref(x_59); x_67 = lean_box(0); } lean_inc(x_7); x_68 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_68, 0, x_7); lean_ctor_set(x_68, 1, x_66); if (lean_is_scalar(x_67)) { x_69 = lean_alloc_ctor(1, 1, 0); } else { x_69 = x_67; } lean_ctor_set(x_69, 0, x_68); x_70 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_70, 0, x_69); x_14 = x_70; x_15 = x_39; goto block_37; } } } } } } lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleDefinition___spec__4(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* x_8, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; lean_object* x_12; x_11 = lean_ctor_get(x_7, 0); lean_inc(x_8); lean_inc(x_6); lean_inc(x_5); x_12 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleDefinition___spec__5(x_1, x_2, x_3, x_4, x_5, x_6, x_8, x_11, x_8, x_9, x_10); lean_dec(x_8); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); if (lean_obj_tag(x_13) == 0) { uint8_t x_14; lean_dec(x_6); lean_dec(x_5); x_14 = !lean_is_exclusive(x_12); if (x_14 == 0) { lean_object* x_15; uint8_t x_16; x_15 = lean_ctor_get(x_12, 0); lean_dec(x_15); x_16 = !lean_is_exclusive(x_13); if (x_16 == 0) { return x_12; } else { lean_object* x_17; lean_object* x_18; x_17 = lean_ctor_get(x_13, 0); lean_inc(x_17); lean_dec(x_13); x_18 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_12, 0, x_18); return x_12; } } else { lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_19 = lean_ctor_get(x_12, 1); lean_inc(x_19); lean_dec(x_12); x_20 = lean_ctor_get(x_13, 0); lean_inc(x_20); if (lean_is_exclusive(x_13)) { lean_ctor_release(x_13, 0); x_21 = x_13; } else { lean_dec_ref(x_13); x_21 = lean_box(0); } if (lean_is_scalar(x_21)) { x_22 = lean_alloc_ctor(0, 1, 0); } else { x_22 = x_21; } lean_ctor_set(x_22, 0, x_20); x_23 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_23, 0, x_22); lean_ctor_set(x_23, 1, x_19); return x_23; } } else { uint8_t x_24; x_24 = !lean_is_exclusive(x_13); if (x_24 == 0) { lean_object* x_25; x_25 = lean_ctor_get(x_13, 0); if (lean_obj_tag(x_25) == 0) { uint8_t x_26; lean_dec(x_6); lean_dec(x_5); x_26 = !lean_is_exclusive(x_12); if (x_26 == 0) { lean_object* x_27; lean_object* x_28; x_27 = lean_ctor_get(x_12, 0); lean_dec(x_27); x_28 = lean_ctor_get(x_25, 0); lean_inc(x_28); lean_dec(x_25); lean_ctor_set(x_13, 0, x_28); return x_12; } else { lean_object* x_29; lean_object* x_30; lean_object* x_31; x_29 = lean_ctor_get(x_12, 1); lean_inc(x_29); lean_dec(x_12); x_30 = lean_ctor_get(x_25, 0); lean_inc(x_30); lean_dec(x_25); lean_ctor_set(x_13, 0, x_30); x_31 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_31, 0, x_13); lean_ctor_set(x_31, 1, x_29); return x_31; } } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; size_t x_38; size_t x_39; lean_object* x_40; lean_free_object(x_13); x_32 = lean_ctor_get(x_12, 1); lean_inc(x_32); lean_dec(x_12); x_33 = lean_ctor_get(x_25, 0); lean_inc(x_33); lean_dec(x_25); x_34 = lean_ctor_get(x_7, 1); 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_33); x_37 = lean_array_get_size(x_34); x_38 = lean_usize_of_nat(x_37); lean_dec(x_37); x_39 = 0; x_40 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8(x_1, x_2, x_3, x_4, x_5, x_6, x_35, x_34, x_38, x_39, x_36, x_9, x_32); if (lean_obj_tag(x_40) == 0) { lean_object* x_41; x_41 = lean_ctor_get(x_40, 0); lean_inc(x_41); if (lean_obj_tag(x_41) == 0) { uint8_t x_42; x_42 = !lean_is_exclusive(x_40); if (x_42 == 0) { lean_object* x_43; uint8_t x_44; x_43 = lean_ctor_get(x_40, 0); lean_dec(x_43); x_44 = !lean_is_exclusive(x_41); if (x_44 == 0) { return x_40; } else { lean_object* x_45; lean_object* x_46; x_45 = lean_ctor_get(x_41, 0); lean_inc(x_45); lean_dec(x_41); x_46 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_46, 0, x_45); lean_ctor_set(x_40, 0, x_46); return x_40; } } else { lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; x_47 = lean_ctor_get(x_40, 1); lean_inc(x_47); lean_dec(x_40); x_48 = lean_ctor_get(x_41, 0); lean_inc(x_48); if (lean_is_exclusive(x_41)) { lean_ctor_release(x_41, 0); x_49 = x_41; } else { lean_dec_ref(x_41); x_49 = lean_box(0); } if (lean_is_scalar(x_49)) { x_50 = lean_alloc_ctor(0, 1, 0); } else { x_50 = x_49; } lean_ctor_set(x_50, 0, x_48); x_51 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_51, 0, x_50); lean_ctor_set(x_51, 1, x_47); return x_51; } } else { uint8_t x_52; x_52 = !lean_is_exclusive(x_41); if (x_52 == 0) { lean_object* x_53; lean_object* x_54; x_53 = lean_ctor_get(x_41, 0); x_54 = lean_ctor_get(x_53, 0); lean_inc(x_54); if (lean_obj_tag(x_54) == 0) { lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_free_object(x_41); x_55 = lean_ctor_get(x_40, 1); lean_inc(x_55); lean_dec(x_40); x_56 = lean_ctor_get(x_53, 1); lean_inc(x_56); lean_dec(x_53); x_57 = lean_box(0); x_58 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2___lambda__1(x_56, x_57, x_9, x_55); return x_58; } else { uint8_t x_59; lean_dec(x_53); x_59 = !lean_is_exclusive(x_40); if (x_59 == 0) { lean_object* x_60; lean_object* x_61; x_60 = lean_ctor_get(x_40, 0); lean_dec(x_60); x_61 = lean_ctor_get(x_54, 0); lean_inc(x_61); lean_dec(x_54); lean_ctor_set(x_41, 0, x_61); return x_40; } else { lean_object* x_62; lean_object* x_63; lean_object* x_64; x_62 = lean_ctor_get(x_40, 1); lean_inc(x_62); lean_dec(x_40); x_63 = lean_ctor_get(x_54, 0); lean_inc(x_63); lean_dec(x_54); lean_ctor_set(x_41, 0, x_63); x_64 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_64, 0, x_41); lean_ctor_set(x_64, 1, x_62); return x_64; } } } else { lean_object* x_65; lean_object* x_66; x_65 = lean_ctor_get(x_41, 0); lean_inc(x_65); lean_dec(x_41); x_66 = lean_ctor_get(x_65, 0); lean_inc(x_66); if (lean_obj_tag(x_66) == 0) { lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; x_67 = lean_ctor_get(x_40, 1); lean_inc(x_67); lean_dec(x_40); x_68 = lean_ctor_get(x_65, 1); lean_inc(x_68); lean_dec(x_65); x_69 = lean_box(0); x_70 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2___lambda__1(x_68, x_69, x_9, x_67); return x_70; } else { lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_dec(x_65); x_71 = lean_ctor_get(x_40, 1); lean_inc(x_71); if (lean_is_exclusive(x_40)) { lean_ctor_release(x_40, 0); lean_ctor_release(x_40, 1); x_72 = x_40; } else { lean_dec_ref(x_40); x_72 = lean_box(0); } x_73 = lean_ctor_get(x_66, 0); lean_inc(x_73); lean_dec(x_66); x_74 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_74, 0, x_73); if (lean_is_scalar(x_72)) { x_75 = lean_alloc_ctor(0, 2, 0); } else { x_75 = x_72; } lean_ctor_set(x_75, 0, x_74); lean_ctor_set(x_75, 1, x_71); return x_75; } } } } else { uint8_t x_76; x_76 = !lean_is_exclusive(x_40); if (x_76 == 0) { return x_40; } else { lean_object* x_77; lean_object* x_78; lean_object* x_79; x_77 = lean_ctor_get(x_40, 0); x_78 = lean_ctor_get(x_40, 1); lean_inc(x_78); lean_inc(x_77); lean_dec(x_40); x_79 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_79, 0, x_77); lean_ctor_set(x_79, 1, x_78); return x_79; } } } } else { lean_object* x_80; x_80 = lean_ctor_get(x_13, 0); lean_inc(x_80); lean_dec(x_13); if (lean_obj_tag(x_80) == 0) { lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_dec(x_6); lean_dec(x_5); x_81 = lean_ctor_get(x_12, 1); lean_inc(x_81); if (lean_is_exclusive(x_12)) { lean_ctor_release(x_12, 0); lean_ctor_release(x_12, 1); x_82 = x_12; } else { lean_dec_ref(x_12); x_82 = lean_box(0); } x_83 = lean_ctor_get(x_80, 0); lean_inc(x_83); lean_dec(x_80); x_84 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_84, 0, x_83); if (lean_is_scalar(x_82)) { x_85 = lean_alloc_ctor(0, 2, 0); } else { x_85 = x_82; } lean_ctor_set(x_85, 0, x_84); lean_ctor_set(x_85, 1, x_81); return x_85; } else { lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; size_t x_92; size_t x_93; lean_object* x_94; x_86 = lean_ctor_get(x_12, 1); lean_inc(x_86); lean_dec(x_12); x_87 = lean_ctor_get(x_80, 0); lean_inc(x_87); lean_dec(x_80); x_88 = lean_ctor_get(x_7, 1); x_89 = lean_box(0); x_90 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_90, 0, x_89); lean_ctor_set(x_90, 1, x_87); x_91 = lean_array_get_size(x_88); x_92 = lean_usize_of_nat(x_91); lean_dec(x_91); x_93 = 0; x_94 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8(x_1, x_2, x_3, x_4, x_5, x_6, x_89, x_88, x_92, x_93, x_90, x_9, x_86); if (lean_obj_tag(x_94) == 0) { lean_object* x_95; x_95 = lean_ctor_get(x_94, 0); lean_inc(x_95); 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; x_96 = lean_ctor_get(x_94, 1); lean_inc(x_96); if (lean_is_exclusive(x_94)) { lean_ctor_release(x_94, 0); lean_ctor_release(x_94, 1); x_97 = x_94; } else { lean_dec_ref(x_94); x_97 = lean_box(0); } x_98 = lean_ctor_get(x_95, 0); lean_inc(x_98); if (lean_is_exclusive(x_95)) { lean_ctor_release(x_95, 0); x_99 = x_95; } else { lean_dec_ref(x_95); x_99 = lean_box(0); } if (lean_is_scalar(x_99)) { x_100 = lean_alloc_ctor(0, 1, 0); } else { x_100 = x_99; } lean_ctor_set(x_100, 0, x_98); if (lean_is_scalar(x_97)) { x_101 = lean_alloc_ctor(0, 2, 0); } else { x_101 = x_97; } lean_ctor_set(x_101, 0, x_100); lean_ctor_set(x_101, 1, x_96); return x_101; } else { lean_object* x_102; lean_object* x_103; lean_object* x_104; x_102 = lean_ctor_get(x_95, 0); lean_inc(x_102); if (lean_is_exclusive(x_95)) { lean_ctor_release(x_95, 0); x_103 = x_95; } else { lean_dec_ref(x_95); x_103 = lean_box(0); } x_104 = lean_ctor_get(x_102, 0); lean_inc(x_104); if (lean_obj_tag(x_104) == 0) { lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_dec(x_103); x_105 = lean_ctor_get(x_94, 1); lean_inc(x_105); lean_dec(x_94); x_106 = lean_ctor_get(x_102, 1); lean_inc(x_106); lean_dec(x_102); x_107 = lean_box(0); x_108 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2___lambda__1(x_106, x_107, x_9, x_105); return x_108; } else { lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_dec(x_102); x_109 = lean_ctor_get(x_94, 1); lean_inc(x_109); if (lean_is_exclusive(x_94)) { lean_ctor_release(x_94, 0); lean_ctor_release(x_94, 1); x_110 = x_94; } else { lean_dec_ref(x_94); x_110 = lean_box(0); } x_111 = lean_ctor_get(x_104, 0); lean_inc(x_111); lean_dec(x_104); if (lean_is_scalar(x_103)) { x_112 = lean_alloc_ctor(1, 1, 0); } else { x_112 = x_103; } lean_ctor_set(x_112, 0, x_111); if (lean_is_scalar(x_110)) { x_113 = lean_alloc_ctor(0, 2, 0); } else { x_113 = x_110; } lean_ctor_set(x_113, 0, x_112); lean_ctor_set(x_113, 1, x_109); return x_113; } } } else { lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; x_114 = lean_ctor_get(x_94, 0); lean_inc(x_114); x_115 = lean_ctor_get(x_94, 1); lean_inc(x_115); if (lean_is_exclusive(x_94)) { lean_ctor_release(x_94, 0); lean_ctor_release(x_94, 1); x_116 = x_94; } else { lean_dec_ref(x_94); x_116 = lean_box(0); } if (lean_is_scalar(x_116)) { x_117 = lean_alloc_ctor(1, 2, 0); } else { x_117 = x_116; } lean_ctor_set(x_117, 0, x_114); lean_ctor_set(x_117, 1, x_115); return x_117; } } } } } else { uint8_t x_118; lean_dec(x_6); lean_dec(x_5); x_118 = !lean_is_exclusive(x_12); if (x_118 == 0) { return x_12; } else { lean_object* x_119; lean_object* x_120; lean_object* x_121; x_119 = lean_ctor_get(x_12, 0); x_120 = lean_ctor_get(x_12, 1); lean_inc(x_120); lean_inc(x_119); lean_dec(x_12); x_121 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_121, 0, x_119); lean_ctor_set(x_121, 1, x_120); return x_121; } } } } lean_object* l_Lean_Server_FileWorker_handleDefinition___lambda__1(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* x_8, lean_object* x_9) { _start: { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_10 = lean_ctor_get(x_7, 3); x_11 = lean_ctor_get(x_10, 7); x_12 = lean_ctor_get(x_11, 1); x_13 = l_Array_findSomeM_x3f___rarg___closed__1; x_14 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleDefinition___spec__4(x_1, x_2, x_3, x_4, x_5, x_13, x_12, x_13, x_8, x_9); if (lean_obj_tag(x_14) == 0) { lean_object* x_15; x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); if (lean_obj_tag(x_15) == 0) { uint8_t x_16; lean_dec(x_6); x_16 = !lean_is_exclusive(x_14); if (x_16 == 0) { lean_object* x_17; uint8_t x_18; x_17 = lean_ctor_get(x_14, 0); lean_dec(x_17); x_18 = !lean_is_exclusive(x_15); if (x_18 == 0) { return x_14; } else { lean_object* x_19; lean_object* x_20; x_19 = lean_ctor_get(x_15, 0); lean_inc(x_19); lean_dec(x_15); x_20 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_20, 0, x_19); lean_ctor_set(x_14, 0, x_20); return x_14; } } else { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_21 = lean_ctor_get(x_14, 1); lean_inc(x_21); lean_dec(x_14); x_22 = lean_ctor_get(x_15, 0); lean_inc(x_22); if (lean_is_exclusive(x_15)) { lean_ctor_release(x_15, 0); x_23 = x_15; } else { lean_dec_ref(x_15); x_23 = lean_box(0); } if (lean_is_scalar(x_23)) { x_24 = lean_alloc_ctor(0, 1, 0); } else { x_24 = x_23; } lean_ctor_set(x_24, 0, x_22); x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_21); return x_25; } } else { uint8_t x_26; x_26 = !lean_is_exclusive(x_15); if (x_26 == 0) { lean_object* x_27; lean_object* x_28; x_27 = lean_ctor_get(x_15, 0); x_28 = lean_ctor_get(x_27, 0); lean_inc(x_28); lean_dec(x_27); if (lean_obj_tag(x_28) == 0) { uint8_t x_29; lean_free_object(x_15); x_29 = !lean_is_exclusive(x_14); if (x_29 == 0) { lean_object* x_30; x_30 = lean_ctor_get(x_14, 0); lean_dec(x_30); lean_ctor_set(x_14, 0, x_6); return x_14; } else { lean_object* x_31; lean_object* x_32; x_31 = lean_ctor_get(x_14, 1); lean_inc(x_31); lean_dec(x_14); x_32 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_32, 0, x_6); lean_ctor_set(x_32, 1, x_31); return x_32; } } else { uint8_t x_33; lean_dec(x_6); x_33 = !lean_is_exclusive(x_14); if (x_33 == 0) { lean_object* x_34; lean_object* x_35; x_34 = lean_ctor_get(x_14, 0); lean_dec(x_34); x_35 = lean_ctor_get(x_28, 0); lean_inc(x_35); lean_dec(x_28); lean_ctor_set(x_15, 0, x_35); return x_14; } else { lean_object* x_36; lean_object* x_37; lean_object* x_38; x_36 = lean_ctor_get(x_14, 1); lean_inc(x_36); lean_dec(x_14); x_37 = lean_ctor_get(x_28, 0); lean_inc(x_37); lean_dec(x_28); lean_ctor_set(x_15, 0, x_37); x_38 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_38, 0, x_15); lean_ctor_set(x_38, 1, x_36); return x_38; } } } else { lean_object* x_39; lean_object* x_40; x_39 = lean_ctor_get(x_15, 0); lean_inc(x_39); lean_dec(x_15); x_40 = lean_ctor_get(x_39, 0); lean_inc(x_40); lean_dec(x_39); if (lean_obj_tag(x_40) == 0) { lean_object* x_41; lean_object* x_42; lean_object* x_43; x_41 = lean_ctor_get(x_14, 1); lean_inc(x_41); if (lean_is_exclusive(x_14)) { lean_ctor_release(x_14, 0); lean_ctor_release(x_14, 1); x_42 = x_14; } else { lean_dec_ref(x_14); x_42 = lean_box(0); } if (lean_is_scalar(x_42)) { x_43 = lean_alloc_ctor(0, 2, 0); } else { x_43 = x_42; } lean_ctor_set(x_43, 0, x_6); lean_ctor_set(x_43, 1, x_41); return x_43; } else { lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_dec(x_6); x_44 = lean_ctor_get(x_14, 1); lean_inc(x_44); if (lean_is_exclusive(x_14)) { lean_ctor_release(x_14, 0); lean_ctor_release(x_14, 1); x_45 = x_14; } else { lean_dec_ref(x_14); x_45 = lean_box(0); } x_46 = lean_ctor_get(x_40, 0); lean_inc(x_46); lean_dec(x_40); x_47 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_47, 0, x_46); if (lean_is_scalar(x_45)) { x_48 = lean_alloc_ctor(0, 2, 0); } else { x_48 = x_45; } lean_ctor_set(x_48, 0, x_47); lean_ctor_set(x_48, 1, x_44); return x_48; } } } } else { uint8_t x_49; lean_dec(x_6); x_49 = !lean_is_exclusive(x_14); if (x_49 == 0) { return x_14; } else { lean_object* x_50; lean_object* x_51; lean_object* x_52; x_50 = lean_ctor_get(x_14, 0); x_51 = lean_ctor_get(x_14, 1); lean_inc(x_51); lean_inc(x_50); lean_dec(x_14); 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; } } } } static lean_object* _init_l_Lean_Server_FileWorker_handleDefinition___closed__1() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Array_empty___closed__1; x_2 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l_Lean_Server_FileWorker_handleDefinition___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Server_FileWorker_handleDefinition___closed__1; x_2 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Server_FileWorker_handleCompletion___spec__1___rarg___boxed), 3, 1); lean_closure_set(x_2, 0, x_1); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleDefinition(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; 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; x_5 = lean_ctor_get(x_3, 4); lean_inc(x_5); x_6 = lean_st_ref_get(x_5, x_4); lean_dec(x_5); x_7 = lean_ctor_get(x_6, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_6, 1); lean_inc(x_8); lean_dec(x_6); x_9 = lean_ctor_get(x_7, 0); lean_inc(x_9); x_10 = lean_ctor_get(x_9, 2); lean_inc(x_10); x_11 = lean_ctor_get(x_2, 1); lean_inc(x_11); lean_dec(x_2); x_12 = l_Lean_FileMap_lspPosToUtf8Pos(x_10, x_11); lean_inc(x_12); x_13 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover___lambda__1___boxed), 2, 1); lean_closure_set(x_13, 0, x_12); x_14 = l_Lean_Server_FileWorker_handleDefinition___closed__1; x_15 = lean_box(x_1); lean_inc(x_3); x_16 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDefinition___lambda__1___boxed), 9, 6); lean_closure_set(x_16, 0, x_15); lean_closure_set(x_16, 1, x_3); lean_closure_set(x_16, 2, x_9); lean_closure_set(x_16, 3, x_10); lean_closure_set(x_16, 4, x_12); lean_closure_set(x_16, 5, x_14); x_17 = l_Lean_Server_FileWorker_handleDefinition___closed__2; x_18 = l_Lean_Server_FileWorker_withWaitFindSnap___rarg(x_7, x_13, x_17, x_16, x_3, x_8); return x_18; } } lean_object* l_Lean_findModuleOf_x3f___at_Lean_Server_FileWorker_handleDefinition___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: { lean_object* x_7; x_7 = l_Lean_findModuleOf_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); return x_7; } } lean_object* l_Lean_findDeclarationRangesCore_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__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) { _start: { lean_object* x_7; x_7 = l_Lean_findDeclarationRangesCore_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__3(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); return x_7; } } lean_object* l_Lean_findDeclarationRanges_x3f___at_Lean_Server_FileWorker_handleDefinition___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) { _start: { lean_object* x_7; x_7 = l_Lean_findDeclarationRanges_x3f___at_Lean_Server_FileWorker_handleDefinition___spec__2(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); return x_7; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___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* 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_15; size_t x_16; size_t x_17; lean_object* x_18; x_15 = lean_unbox(x_1); lean_dec(x_1); x_16 = lean_unbox_usize(x_10); lean_dec(x_10); x_17 = lean_unbox_usize(x_11); lean_dec(x_11); x_18 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__6(x_15, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_16, x_17, x_12, x_13, x_14); lean_dec(x_13); lean_dec(x_9); lean_dec(x_7); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); return x_18; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___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) { _start: { lean_object* x_10; x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_2); return x_10; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___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) { _start: { lean_object* x_11; x_11 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); return x_11; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__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, 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_14; size_t x_15; size_t x_16; lean_object* x_17; x_14 = lean_unbox(x_1); lean_dec(x_1); x_15 = lean_unbox_usize(x_9); lean_dec(x_9); x_16 = lean_unbox_usize(x_10); lean_dec(x_10); x_17 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7(x_14, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_15, x_16, x_11, x_12, x_13); lean_dec(x_12); lean_dec(x_8); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); return x_17; } } lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleDefinition___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* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { uint8_t x_12; lean_object* x_13; x_12 = lean_unbox(x_1); lean_dec(x_1); x_13 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleDefinition___spec__5(x_12, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); lean_dec(x_10); lean_dec(x_8); lean_dec(x_7); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); return x_13; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___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* 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_14; size_t x_15; size_t x_16; lean_object* x_17; x_14 = lean_unbox(x_1); lean_dec(x_1); x_15 = lean_unbox_usize(x_9); lean_dec(x_9); x_16 = lean_unbox_usize(x_10); lean_dec(x_10); x_17 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__8(x_14, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_15, x_16, x_11, x_12, x_13); lean_dec(x_12); lean_dec(x_8); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); return x_17; } } lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleDefinition___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, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { uint8_t x_11; lean_object* x_12; x_11 = lean_unbox(x_1); lean_dec(x_1); x_12 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleDefinition___spec__4(x_11, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); lean_dec(x_9); lean_dec(x_7); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); return x_12; } } lean_object* l_Lean_Server_FileWorker_handleDefinition___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) { _start: { uint8_t x_10; lean_object* x_11; x_10 = lean_unbox(x_1); lean_dec(x_1); x_11 = l_Lean_Server_FileWorker_handleDefinition___lambda__1(x_10, 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_4); lean_dec(x_3); lean_dec(x_2); return x_11; } } lean_object* l_Lean_Server_FileWorker_handleDefinition___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { uint8_t x_5; lean_object* x_6; x_5 = lean_unbox(x_1); lean_dec(x_1); x_6 = l_Lean_Server_FileWorker_handleDefinition(x_5, x_2, x_3, x_4); return x_6; } } lean_object* l_Lean_Server_FileWorker_handlePlainGoal_match__1___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; uint8_t x_5; lean_object* x_6; lean_object* x_7; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); x_5 = lean_ctor_get_uint8(x_1, sizeof(void*)*2); lean_dec(x_1); x_6 = lean_box(x_5); x_7 = lean_apply_3(x_2, x_3, x_4, x_6); return x_7; } } lean_object* l_Lean_Server_FileWorker_handlePlainGoal_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handlePlainGoal_match__1___rarg), 2, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handlePlainGoal_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_dec(x_2); x_4 = lean_apply_1(x_3, x_1); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_object* x_7; 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); x_7 = lean_apply_3(x_2, x_1, x_5, x_6); return x_7; } } } lean_object* l_Lean_Server_FileWorker_handlePlainGoal_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handlePlainGoal_match__2___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handlePlainGoal_match__3___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_box(0); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_apply_1(x_3, x_6); return x_7; } } } lean_object* l_Lean_Server_FileWorker_handlePlainGoal_match__3(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handlePlainGoal_match__3___rarg), 3, 0); return x_2; } } lean_object* l_List_map___at_Lean_Server_FileWorker_handlePlainGoal___spec__1(lean_object* x_1) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_2; x_2 = lean_box(0); return x_2; } else { uint8_t x_3; x_3 = !lean_is_exclusive(x_1); if (x_3 == 0) { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_4 = lean_ctor_get(x_1, 0); x_5 = lean_ctor_get(x_1, 1); x_6 = l_Std_Format_defWidth; x_7 = lean_format_pretty(x_4, x_6); x_8 = l_List_map___at_Lean_Server_FileWorker_handlePlainGoal___spec__1(x_5); lean_ctor_set(x_1, 1, x_8); lean_ctor_set(x_1, 0, x_7); return x_1; } else { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_9 = lean_ctor_get(x_1, 0); x_10 = lean_ctor_get(x_1, 1); lean_inc(x_10); lean_inc(x_9); lean_dec(x_1); x_11 = l_Std_Format_defWidth; x_12 = lean_format_pretty(x_9, x_11); x_13 = l_List_map___at_Lean_Server_FileWorker_handlePlainGoal___spec__1(x_10); x_14 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_14, 0, x_12); lean_ctor_set(x_14, 1, x_13); return x_14; } } } } lean_object* l_List_map___at_Lean_Server_FileWorker_handlePlainGoal___spec__2(lean_object* x_1) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_2; x_2 = lean_box(0); return x_2; } else { uint8_t x_3; x_3 = !lean_is_exclusive(x_1); if (x_3 == 0) { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; x_4 = lean_ctor_get(x_1, 0); x_5 = lean_ctor_get(x_1, 1); x_6 = l_Std_Format_defWidth; x_7 = lean_format_pretty(x_4, x_6); x_8 = l_Lean_Elab_Info_fmtHover_x3f___lambda__2___closed__1; x_9 = lean_string_append(x_8, x_7); lean_dec(x_7); x_10 = l_Lean_Elab_Info_fmtHover_x3f___lambda__2___closed__3; x_11 = lean_string_append(x_9, x_10); x_12 = l_List_map___at_Lean_Server_FileWorker_handlePlainGoal___spec__2(x_5); lean_ctor_set(x_1, 1, x_12); lean_ctor_set(x_1, 0, x_11); return x_1; } else { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; x_13 = lean_ctor_get(x_1, 0); x_14 = lean_ctor_get(x_1, 1); lean_inc(x_14); lean_inc(x_13); lean_dec(x_1); x_15 = l_Std_Format_defWidth; x_16 = lean_format_pretty(x_13, x_15); x_17 = l_Lean_Elab_Info_fmtHover_x3f___lambda__2___closed__1; x_18 = lean_string_append(x_17, x_16); lean_dec(x_16); x_19 = l_Lean_Elab_Info_fmtHover_x3f___lambda__2___closed__3; x_20 = lean_string_append(x_18, x_19); x_21 = l_List_map___at_Lean_Server_FileWorker_handlePlainGoal___spec__2(x_14); 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; } } } } lean_object* l_Lean_Meta_withPPInaccessibleNames___at_Lean_Server_FileWorker_handlePlainGoal___spec__3(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { lean_object* x_8; x_8 = l_Lean_Meta_withPPInaccessibleNamesImp___rarg(x_2, x_1, x_3, x_4, x_5, x_6, x_7); if (lean_obj_tag(x_8) == 0) { uint8_t x_9; x_9 = !lean_is_exclusive(x_8); if (x_9 == 0) { return x_8; } else { lean_object* x_10; lean_object* x_11; lean_object* x_12; x_10 = lean_ctor_get(x_8, 0); x_11 = lean_ctor_get(x_8, 1); lean_inc(x_11); lean_inc(x_10); lean_dec(x_8); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_10); lean_ctor_set(x_12, 1, x_11); return x_12; } } else { uint8_t x_13; x_13 = !lean_is_exclusive(x_8); if (x_13 == 0) { return x_8; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; x_14 = lean_ctor_get(x_8, 0); x_15 = lean_ctor_get(x_8, 1); lean_inc(x_15); lean_inc(x_14); lean_dec(x_8); x_16 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_16, 0, x_14); lean_ctor_set(x_16, 1, x_15); return x_16; } } } } lean_object* l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__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: { if (lean_obj_tag(x_1) == 0) { lean_object* x_7; lean_object* x_8; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_7 = lean_box(0); x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_7); lean_ctor_set(x_8, 1, x_6); return x_8; } else { uint8_t x_9; x_9 = !lean_is_exclusive(x_1); if (x_9 == 0) { lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; lean_object* x_14; x_10 = lean_ctor_get(x_1, 0); x_11 = lean_ctor_get(x_1, 1); x_12 = lean_alloc_closure((void*)(l_Lean_Meta_ppGoal___boxed), 6, 1); lean_closure_set(x_12, 0, x_10); x_13 = 1; lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); x_14 = l_Lean_Meta_withPPInaccessibleNames___at_Lean_Server_FileWorker_handlePlainGoal___spec__3(x_12, x_13, x_2, x_3, x_4, x_5, x_6); if (lean_obj_tag(x_14) == 0) { lean_object* x_15; lean_object* x_16; lean_object* x_17; x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); x_16 = lean_ctor_get(x_14, 1); lean_inc(x_16); lean_dec(x_14); x_17 = l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__4(x_11, x_2, x_3, x_4, x_5, x_16); if (lean_obj_tag(x_17) == 0) { uint8_t x_18; x_18 = !lean_is_exclusive(x_17); if (x_18 == 0) { lean_object* x_19; x_19 = lean_ctor_get(x_17, 0); lean_ctor_set(x_1, 1, x_19); lean_ctor_set(x_1, 0, x_15); lean_ctor_set(x_17, 0, x_1); return x_17; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; x_20 = lean_ctor_get(x_17, 0); x_21 = lean_ctor_get(x_17, 1); lean_inc(x_21); lean_inc(x_20); lean_dec(x_17); lean_ctor_set(x_1, 1, x_20); lean_ctor_set(x_1, 0, x_15); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_1); lean_ctor_set(x_22, 1, x_21); return x_22; } } else { uint8_t x_23; lean_dec(x_15); lean_free_object(x_1); x_23 = !lean_is_exclusive(x_17); if (x_23 == 0) { return x_17; } else { lean_object* x_24; lean_object* x_25; lean_object* x_26; x_24 = lean_ctor_get(x_17, 0); x_25 = lean_ctor_get(x_17, 1); lean_inc(x_25); lean_inc(x_24); lean_dec(x_17); x_26 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_26, 0, x_24); lean_ctor_set(x_26, 1, x_25); return x_26; } } } else { uint8_t x_27; lean_free_object(x_1); lean_dec(x_11); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_27 = !lean_is_exclusive(x_14); if (x_27 == 0) { return x_14; } else { lean_object* x_28; lean_object* x_29; lean_object* x_30; x_28 = lean_ctor_get(x_14, 0); x_29 = lean_ctor_get(x_14, 1); lean_inc(x_29); lean_inc(x_28); lean_dec(x_14); x_30 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_30, 0, x_28); lean_ctor_set(x_30, 1, x_29); return x_30; } } } else { lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; lean_object* x_35; x_31 = lean_ctor_get(x_1, 0); x_32 = lean_ctor_get(x_1, 1); lean_inc(x_32); lean_inc(x_31); lean_dec(x_1); x_33 = lean_alloc_closure((void*)(l_Lean_Meta_ppGoal___boxed), 6, 1); lean_closure_set(x_33, 0, x_31); x_34 = 1; lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); x_35 = l_Lean_Meta_withPPInaccessibleNames___at_Lean_Server_FileWorker_handlePlainGoal___spec__3(x_33, x_34, x_2, x_3, x_4, x_5, x_6); if (lean_obj_tag(x_35) == 0) { lean_object* x_36; lean_object* x_37; lean_object* x_38; x_36 = lean_ctor_get(x_35, 0); lean_inc(x_36); x_37 = lean_ctor_get(x_35, 1); lean_inc(x_37); lean_dec(x_35); x_38 = l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__4(x_32, x_2, x_3, x_4, x_5, x_37); if (lean_obj_tag(x_38) == 0) { lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; x_39 = lean_ctor_get(x_38, 0); lean_inc(x_39); x_40 = lean_ctor_get(x_38, 1); lean_inc(x_40); if (lean_is_exclusive(x_38)) { lean_ctor_release(x_38, 0); lean_ctor_release(x_38, 1); x_41 = x_38; } else { lean_dec_ref(x_38); x_41 = lean_box(0); } x_42 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_42, 0, x_36); lean_ctor_set(x_42, 1, x_39); if (lean_is_scalar(x_41)) { x_43 = lean_alloc_ctor(0, 2, 0); } else { x_43 = x_41; } lean_ctor_set(x_43, 0, x_42); lean_ctor_set(x_43, 1, x_40); return x_43; } else { lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_dec(x_36); x_44 = lean_ctor_get(x_38, 0); lean_inc(x_44); x_45 = lean_ctor_get(x_38, 1); lean_inc(x_45); if (lean_is_exclusive(x_38)) { lean_ctor_release(x_38, 0); lean_ctor_release(x_38, 1); x_46 = x_38; } else { lean_dec_ref(x_38); x_46 = lean_box(0); } if (lean_is_scalar(x_46)) { x_47 = lean_alloc_ctor(1, 2, 0); } else { x_47 = x_46; } lean_ctor_set(x_47, 0, x_44); lean_ctor_set(x_47, 1, x_45); return x_47; } } else { lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_dec(x_32); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_48 = lean_ctor_get(x_35, 0); lean_inc(x_48); x_49 = lean_ctor_get(x_35, 1); lean_inc(x_49); if (lean_is_exclusive(x_35)) { lean_ctor_release(x_35, 0); lean_ctor_release(x_35, 1); x_50 = x_35; } else { lean_dec_ref(x_35); x_50 = lean_box(0); } if (lean_is_scalar(x_50)) { x_51 = lean_alloc_ctor(1, 2, 0); } else { x_51 = x_50; } lean_ctor_set(x_51, 0, x_48); lean_ctor_set(x_51, 1, x_49); return x_51; } } } } } static lean_object* _init_l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__5___closed__1() { _start: { lean_object* x_1; lean_object* x_2; x_1 = lean_box(0); x_2 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } lean_object* l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__5(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; x_4 = l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__5___closed__1; x_5 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_5, 0, x_4); lean_ctor_set(x_5, 1, 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; uint8_t x_43; x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_1, 1); lean_inc(x_7); if (lean_is_exclusive(x_1)) { lean_ctor_release(x_1, 0); lean_ctor_release(x_1, 1); x_8 = x_1; } else { lean_dec_ref(x_1); x_8 = lean_box(0); } x_43 = lean_ctor_get_uint8(x_6, sizeof(void*)*2); if (x_43 == 0) { lean_object* x_44; lean_object* x_45; uint8_t x_46; x_44 = lean_ctor_get(x_6, 0); lean_inc(x_44); x_45 = lean_ctor_get(x_6, 1); lean_inc(x_45); lean_dec(x_6); x_46 = !lean_is_exclusive(x_44); if (x_46 == 0) { lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; x_47 = lean_ctor_get(x_44, 2); lean_dec(x_47); x_48 = lean_ctor_get(x_45, 0); lean_inc(x_48); lean_ctor_set(x_44, 2, x_48); x_49 = lean_ctor_get(x_45, 1); lean_inc(x_49); lean_dec(x_45); x_50 = lean_alloc_closure((void*)(l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__4), 6, 1); lean_closure_set(x_50, 0, x_49); x_51 = l_Lean_LocalContext_mkEmpty___closed__1; x_52 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_44, x_51, x_50, x_3); lean_dec(x_44); if (lean_obj_tag(x_52) == 0) { lean_object* x_53; lean_object* x_54; lean_object* x_55; x_53 = lean_ctor_get(x_52, 0); lean_inc(x_53); x_54 = lean_ctor_get(x_52, 1); lean_inc(x_54); lean_dec(x_52); x_55 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_55, 0, x_53); x_9 = x_55; x_10 = x_54; goto block_42; } else { uint8_t x_56; lean_dec(x_8); lean_dec(x_7); x_56 = !lean_is_exclusive(x_52); if (x_56 == 0) { return x_52; } else { lean_object* x_57; lean_object* x_58; lean_object* x_59; x_57 = lean_ctor_get(x_52, 0); x_58 = lean_ctor_get(x_52, 1); lean_inc(x_58); lean_inc(x_57); lean_dec(x_52); x_59 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_59, 0, x_57); lean_ctor_set(x_59, 1, x_58); return x_59; } } } else { lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; x_60 = lean_ctor_get(x_44, 0); x_61 = lean_ctor_get(x_44, 1); x_62 = lean_ctor_get(x_44, 3); x_63 = lean_ctor_get(x_44, 4); x_64 = lean_ctor_get(x_44, 5); lean_inc(x_64); lean_inc(x_63); lean_inc(x_62); lean_inc(x_61); lean_inc(x_60); lean_dec(x_44); x_65 = lean_ctor_get(x_45, 0); lean_inc(x_65); x_66 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_66, 0, x_60); lean_ctor_set(x_66, 1, x_61); lean_ctor_set(x_66, 2, x_65); lean_ctor_set(x_66, 3, x_62); lean_ctor_set(x_66, 4, x_63); lean_ctor_set(x_66, 5, x_64); x_67 = lean_ctor_get(x_45, 1); lean_inc(x_67); lean_dec(x_45); x_68 = lean_alloc_closure((void*)(l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__4), 6, 1); lean_closure_set(x_68, 0, x_67); x_69 = l_Lean_LocalContext_mkEmpty___closed__1; x_70 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_66, x_69, x_68, x_3); lean_dec(x_66); if (lean_obj_tag(x_70) == 0) { lean_object* x_71; lean_object* x_72; lean_object* x_73; x_71 = lean_ctor_get(x_70, 0); lean_inc(x_71); x_72 = lean_ctor_get(x_70, 1); lean_inc(x_72); lean_dec(x_70); x_73 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_73, 0, x_71); x_9 = x_73; x_10 = x_72; goto block_42; } else { lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_dec(x_8); lean_dec(x_7); x_74 = lean_ctor_get(x_70, 0); lean_inc(x_74); x_75 = lean_ctor_get(x_70, 1); lean_inc(x_75); if (lean_is_exclusive(x_70)) { lean_ctor_release(x_70, 0); lean_ctor_release(x_70, 1); x_76 = x_70; } else { lean_dec_ref(x_70); x_76 = lean_box(0); } if (lean_is_scalar(x_76)) { x_77 = lean_alloc_ctor(1, 2, 0); } else { x_77 = x_76; } lean_ctor_set(x_77, 0, x_74); lean_ctor_set(x_77, 1, x_75); return x_77; } } } else { lean_object* x_78; lean_object* x_79; uint8_t x_80; x_78 = lean_ctor_get(x_6, 0); lean_inc(x_78); x_79 = lean_ctor_get(x_6, 1); lean_inc(x_79); lean_dec(x_6); x_80 = !lean_is_exclusive(x_78); if (x_80 == 0) { lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; x_81 = lean_ctor_get(x_78, 2); lean_dec(x_81); x_82 = lean_ctor_get(x_79, 3); lean_inc(x_82); lean_ctor_set(x_78, 2, x_82); x_83 = lean_ctor_get(x_79, 4); lean_inc(x_83); lean_dec(x_79); x_84 = lean_alloc_closure((void*)(l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__4), 6, 1); lean_closure_set(x_84, 0, x_83); x_85 = l_Lean_LocalContext_mkEmpty___closed__1; x_86 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_78, x_85, x_84, x_3); lean_dec(x_78); if (lean_obj_tag(x_86) == 0) { lean_object* x_87; lean_object* x_88; lean_object* x_89; x_87 = lean_ctor_get(x_86, 0); lean_inc(x_87); x_88 = lean_ctor_get(x_86, 1); lean_inc(x_88); lean_dec(x_86); x_89 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_89, 0, x_87); x_9 = x_89; x_10 = x_88; goto block_42; } else { uint8_t x_90; lean_dec(x_8); lean_dec(x_7); x_90 = !lean_is_exclusive(x_86); if (x_90 == 0) { return x_86; } else { lean_object* x_91; lean_object* x_92; lean_object* x_93; x_91 = lean_ctor_get(x_86, 0); x_92 = lean_ctor_get(x_86, 1); lean_inc(x_92); lean_inc(x_91); lean_dec(x_86); x_93 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_93, 0, x_91); lean_ctor_set(x_93, 1, x_92); return x_93; } } } else { lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; x_94 = lean_ctor_get(x_78, 0); x_95 = lean_ctor_get(x_78, 1); x_96 = lean_ctor_get(x_78, 3); x_97 = lean_ctor_get(x_78, 4); x_98 = lean_ctor_get(x_78, 5); lean_inc(x_98); lean_inc(x_97); lean_inc(x_96); lean_inc(x_95); lean_inc(x_94); lean_dec(x_78); x_99 = lean_ctor_get(x_79, 3); lean_inc(x_99); x_100 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_100, 0, x_94); lean_ctor_set(x_100, 1, x_95); lean_ctor_set(x_100, 2, x_99); lean_ctor_set(x_100, 3, x_96); lean_ctor_set(x_100, 4, x_97); lean_ctor_set(x_100, 5, x_98); x_101 = lean_ctor_get(x_79, 4); lean_inc(x_101); lean_dec(x_79); x_102 = lean_alloc_closure((void*)(l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__4), 6, 1); lean_closure_set(x_102, 0, x_101); x_103 = l_Lean_LocalContext_mkEmpty___closed__1; x_104 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_100, x_103, x_102, x_3); lean_dec(x_100); if (lean_obj_tag(x_104) == 0) { lean_object* x_105; lean_object* x_106; lean_object* x_107; x_105 = lean_ctor_get(x_104, 0); lean_inc(x_105); x_106 = lean_ctor_get(x_104, 1); lean_inc(x_106); lean_dec(x_104); x_107 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_107, 0, x_105); x_9 = x_107; x_10 = x_106; goto block_42; } else { lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_dec(x_8); lean_dec(x_7); x_108 = lean_ctor_get(x_104, 0); lean_inc(x_108); x_109 = lean_ctor_get(x_104, 1); lean_inc(x_109); if (lean_is_exclusive(x_104)) { lean_ctor_release(x_104, 0); lean_ctor_release(x_104, 1); x_110 = x_104; } else { lean_dec_ref(x_104); x_110 = lean_box(0); } if (lean_is_scalar(x_110)) { x_111 = lean_alloc_ctor(1, 2, 0); } else { x_111 = x_110; } lean_ctor_set(x_111, 0, x_108); lean_ctor_set(x_111, 1, x_109); return x_111; } } } block_42: { lean_object* x_11; lean_object* x_12; x_11 = lean_ctor_get(x_9, 0); lean_inc(x_11); lean_dec(x_9); x_12 = l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__5(x_7, x_2, x_10); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); if (lean_obj_tag(x_13) == 0) { uint8_t x_14; lean_dec(x_11); lean_dec(x_8); x_14 = !lean_is_exclusive(x_12); if (x_14 == 0) { lean_object* x_15; uint8_t x_16; x_15 = lean_ctor_get(x_12, 0); lean_dec(x_15); x_16 = !lean_is_exclusive(x_13); if (x_16 == 0) { return x_12; } else { lean_object* x_17; lean_object* x_18; x_17 = lean_ctor_get(x_13, 0); lean_inc(x_17); lean_dec(x_13); x_18 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_12, 0, x_18); return x_12; } } else { lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_19 = lean_ctor_get(x_12, 1); lean_inc(x_19); lean_dec(x_12); x_20 = lean_ctor_get(x_13, 0); lean_inc(x_20); if (lean_is_exclusive(x_13)) { lean_ctor_release(x_13, 0); x_21 = x_13; } else { lean_dec_ref(x_13); x_21 = lean_box(0); } if (lean_is_scalar(x_21)) { x_22 = lean_alloc_ctor(0, 1, 0); } else { x_22 = x_21; } lean_ctor_set(x_22, 0, x_20); x_23 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_23, 0, x_22); lean_ctor_set(x_23, 1, x_19); return x_23; } } else { uint8_t x_24; x_24 = !lean_is_exclusive(x_12); if (x_24 == 0) { lean_object* x_25; uint8_t x_26; x_25 = lean_ctor_get(x_12, 0); lean_dec(x_25); x_26 = !lean_is_exclusive(x_13); if (x_26 == 0) { lean_object* x_27; lean_object* x_28; x_27 = lean_ctor_get(x_13, 0); if (lean_is_scalar(x_8)) { x_28 = lean_alloc_ctor(1, 2, 0); } else { x_28 = x_8; } lean_ctor_set(x_28, 0, x_11); lean_ctor_set(x_28, 1, x_27); lean_ctor_set(x_13, 0, x_28); return x_12; } else { lean_object* x_29; lean_object* x_30; lean_object* x_31; x_29 = lean_ctor_get(x_13, 0); lean_inc(x_29); lean_dec(x_13); if (lean_is_scalar(x_8)) { x_30 = lean_alloc_ctor(1, 2, 0); } else { x_30 = x_8; } lean_ctor_set(x_30, 0, x_11); lean_ctor_set(x_30, 1, x_29); x_31 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_31, 0, x_30); lean_ctor_set(x_12, 0, x_31); return x_12; } } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; x_32 = lean_ctor_get(x_12, 1); lean_inc(x_32); lean_dec(x_12); x_33 = lean_ctor_get(x_13, 0); lean_inc(x_33); if (lean_is_exclusive(x_13)) { lean_ctor_release(x_13, 0); x_34 = x_13; } else { lean_dec_ref(x_13); x_34 = lean_box(0); } if (lean_is_scalar(x_8)) { x_35 = lean_alloc_ctor(1, 2, 0); } else { x_35 = x_8; } lean_ctor_set(x_35, 0, x_11); lean_ctor_set(x_35, 1, x_33); if (lean_is_scalar(x_34)) { x_36 = lean_alloc_ctor(1, 1, 0); } else { x_36 = x_34; } lean_ctor_set(x_36, 0, x_35); x_37 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_37, 0, x_36); lean_ctor_set(x_37, 1, x_32); return x_37; } } } else { uint8_t x_38; lean_dec(x_11); lean_dec(x_8); x_38 = !lean_is_exclusive(x_12); if (x_38 == 0) { return x_12; } else { lean_object* x_39; lean_object* x_40; lean_object* x_41; x_39 = lean_ctor_get(x_12, 0); x_40 = lean_ctor_get(x_12, 1); lean_inc(x_40); lean_inc(x_39); lean_dec(x_12); x_41 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_41, 0, x_39); lean_ctor_set(x_41, 1, x_40); return x_41; } } } } } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, size_t x_6, size_t x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; lean_object* x_12; uint8_t x_35; x_35 = x_7 < x_6; if (x_35 == 0) { lean_object* x_36; lean_object* x_37; lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); x_36 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_36, 0, x_8); x_37 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_37, 0, x_36); lean_ctor_set(x_37, 1, x_10); return x_37; } else { lean_object* x_38; lean_object* x_39; lean_object* x_40; x_38 = lean_array_uget(x_5, x_7); x_39 = lean_ctor_get(x_8, 1); lean_inc(x_39); lean_dec(x_8); lean_inc(x_2); lean_inc(x_1); x_40 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handlePlainGoal___spec__7(x_1, x_2, x_3, x_38, x_39, x_9, x_10); lean_dec(x_38); if (lean_obj_tag(x_40) == 0) { lean_object* x_41; x_41 = lean_ctor_get(x_40, 0); lean_inc(x_41); if (lean_obj_tag(x_41) == 0) { lean_object* x_42; uint8_t x_43; x_42 = lean_ctor_get(x_40, 1); lean_inc(x_42); lean_dec(x_40); x_43 = !lean_is_exclusive(x_41); if (x_43 == 0) { x_11 = x_41; x_12 = x_42; goto block_34; } else { lean_object* x_44; lean_object* x_45; x_44 = lean_ctor_get(x_41, 0); lean_inc(x_44); lean_dec(x_41); x_45 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_45, 0, x_44); x_11 = x_45; x_12 = x_42; goto block_34; } } else { uint8_t x_46; x_46 = !lean_is_exclusive(x_41); if (x_46 == 0) { lean_object* x_47; x_47 = lean_ctor_get(x_41, 0); if (lean_obj_tag(x_47) == 0) { lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; x_48 = lean_ctor_get(x_40, 1); lean_inc(x_48); lean_dec(x_40); x_49 = lean_ctor_get(x_47, 0); lean_inc(x_49); x_50 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_50, 0, x_47); x_51 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_51, 0, x_50); lean_ctor_set(x_51, 1, x_49); x_52 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_52, 0, x_51); lean_ctor_set(x_41, 0, x_52); x_11 = x_41; x_12 = x_48; goto block_34; } else { lean_object* x_53; uint8_t x_54; x_53 = lean_ctor_get(x_40, 1); lean_inc(x_53); lean_dec(x_40); x_54 = !lean_is_exclusive(x_47); if (x_54 == 0) { lean_object* x_55; lean_object* x_56; x_55 = lean_ctor_get(x_47, 0); lean_inc(x_4); x_56 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_56, 0, x_4); lean_ctor_set(x_56, 1, x_55); lean_ctor_set(x_47, 0, x_56); x_11 = x_41; x_12 = x_53; goto block_34; } else { lean_object* x_57; lean_object* x_58; lean_object* x_59; x_57 = lean_ctor_get(x_47, 0); lean_inc(x_57); lean_dec(x_47); lean_inc(x_4); x_58 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_58, 0, x_4); lean_ctor_set(x_58, 1, x_57); x_59 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_59, 0, x_58); lean_ctor_set(x_41, 0, x_59); x_11 = x_41; x_12 = x_53; goto block_34; } } } else { lean_object* x_60; x_60 = lean_ctor_get(x_41, 0); lean_inc(x_60); lean_dec(x_41); if (lean_obj_tag(x_60) == 0) { lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; x_61 = lean_ctor_get(x_40, 1); lean_inc(x_61); lean_dec(x_40); x_62 = lean_ctor_get(x_60, 0); lean_inc(x_62); x_63 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_63, 0, x_60); x_64 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_64, 0, x_63); lean_ctor_set(x_64, 1, x_62); x_65 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_65, 0, x_64); x_66 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_66, 0, x_65); x_11 = x_66; x_12 = x_61; goto block_34; } else { lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; x_67 = lean_ctor_get(x_40, 1); lean_inc(x_67); lean_dec(x_40); x_68 = lean_ctor_get(x_60, 0); lean_inc(x_68); if (lean_is_exclusive(x_60)) { lean_ctor_release(x_60, 0); x_69 = x_60; } else { lean_dec_ref(x_60); x_69 = lean_box(0); } lean_inc(x_4); x_70 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_70, 0, x_4); lean_ctor_set(x_70, 1, x_68); if (lean_is_scalar(x_69)) { x_71 = lean_alloc_ctor(1, 1, 0); } else { x_71 = x_69; } lean_ctor_set(x_71, 0, x_70); x_72 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_72, 0, x_71); x_11 = x_72; x_12 = x_67; goto block_34; } } } } else { uint8_t x_73; lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); x_73 = !lean_is_exclusive(x_40); if (x_73 == 0) { return x_40; } else { lean_object* x_74; lean_object* x_75; lean_object* x_76; x_74 = lean_ctor_get(x_40, 0); x_75 = lean_ctor_get(x_40, 1); lean_inc(x_75); lean_inc(x_74); lean_dec(x_40); x_76 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_76, 0, x_74); lean_ctor_set(x_76, 1, x_75); return x_76; } } } block_34: { if (lean_obj_tag(x_11) == 0) { uint8_t x_13; lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); x_13 = !lean_is_exclusive(x_11); if (x_13 == 0) { lean_object* x_14; x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_11); lean_ctor_set(x_14, 1, x_12); return x_14; } else { lean_object* x_15; lean_object* x_16; lean_object* x_17; x_15 = lean_ctor_get(x_11, 0); lean_inc(x_15); lean_dec(x_11); x_16 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_16, 0, x_15); x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_12); return x_17; } } else { uint8_t x_18; x_18 = !lean_is_exclusive(x_11); if (x_18 == 0) { lean_object* x_19; x_19 = lean_ctor_get(x_11, 0); if (lean_obj_tag(x_19) == 0) { lean_object* x_20; lean_object* x_21; lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); x_20 = lean_ctor_get(x_19, 0); lean_inc(x_20); lean_dec(x_19); lean_ctor_set(x_11, 0, x_20); x_21 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_21, 0, x_11); lean_ctor_set(x_21, 1, x_12); return x_21; } else { lean_object* x_22; size_t x_23; size_t x_24; lean_free_object(x_11); x_22 = lean_ctor_get(x_19, 0); lean_inc(x_22); lean_dec(x_19); x_23 = 1; x_24 = x_7 + x_23; x_7 = x_24; x_8 = x_22; x_10 = x_12; goto _start; } } else { lean_object* x_26; x_26 = lean_ctor_get(x_11, 0); lean_inc(x_26); lean_dec(x_11); if (lean_obj_tag(x_26) == 0) { lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); x_27 = lean_ctor_get(x_26, 0); lean_inc(x_27); lean_dec(x_26); x_28 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_28, 0, x_27); x_29 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_29, 0, x_28); lean_ctor_set(x_29, 1, x_12); return x_29; } else { lean_object* x_30; size_t x_31; size_t x_32; x_30 = lean_ctor_get(x_26, 0); lean_inc(x_30); lean_dec(x_26); x_31 = 1; x_32 = x_7 + x_31; x_7 = x_32; x_8 = x_30; x_10 = x_12; goto _start; } } } } } } static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__9___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("\n---\n"); return x_1; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__9(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, size_t x_5, size_t x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { lean_object* x_10; lean_object* x_11; lean_object* x_34; lean_object* x_35; lean_object* x_63; lean_object* x_64; uint8_t x_116; x_116 = x_6 < x_5; if (x_116 == 0) { lean_object* x_117; lean_object* x_118; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_117 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_117, 0, x_7); x_118 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_118, 0, x_117); lean_ctor_set(x_118, 1, x_9); return x_118; } else { lean_object* x_119; lean_object* x_120; lean_dec(x_7); x_119 = lean_array_uget(x_4, x_6); lean_inc(x_1); x_120 = l_Lean_Elab_InfoTree_goalsAt_x3f(x_119, x_1); if (lean_obj_tag(x_120) == 0) { lean_object* x_121; lean_object* x_122; lean_inc(x_2); x_121 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_121, 0, x_2); x_122 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_122, 0, x_121); x_34 = x_122; x_35 = x_9; goto block_62; } else { lean_object* x_123; x_123 = l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__5(x_120, x_8, x_9); if (lean_obj_tag(x_123) == 0) { lean_object* x_124; x_124 = lean_ctor_get(x_123, 0); lean_inc(x_124); if (lean_obj_tag(x_124) == 0) { lean_object* x_125; uint8_t x_126; x_125 = lean_ctor_get(x_123, 1); lean_inc(x_125); lean_dec(x_123); x_126 = !lean_is_exclusive(x_124); if (x_126 == 0) { x_63 = x_124; x_64 = x_125; goto block_115; } else { lean_object* x_127; lean_object* x_128; x_127 = lean_ctor_get(x_124, 0); lean_inc(x_127); lean_dec(x_124); x_128 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_128, 0, x_127); x_63 = x_128; x_64 = x_125; goto block_115; } } else { lean_object* x_129; uint8_t x_130; x_129 = lean_ctor_get(x_123, 1); lean_inc(x_129); lean_dec(x_123); x_130 = !lean_is_exclusive(x_124); if (x_130 == 0) { lean_object* x_131; lean_object* x_132; x_131 = lean_ctor_get(x_124, 0); x_132 = l_List_join___rarg(x_131); lean_ctor_set(x_124, 0, x_132); x_63 = x_124; x_64 = x_129; goto block_115; } else { lean_object* x_133; lean_object* x_134; lean_object* x_135; x_133 = lean_ctor_get(x_124, 0); lean_inc(x_133); lean_dec(x_124); x_134 = l_List_join___rarg(x_133); x_135 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_135, 0, x_134); x_63 = x_135; x_64 = x_129; goto block_115; } } } else { uint8_t x_136; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_136 = !lean_is_exclusive(x_123); if (x_136 == 0) { return x_123; } else { lean_object* x_137; lean_object* x_138; lean_object* x_139; x_137 = lean_ctor_get(x_123, 0); x_138 = lean_ctor_get(x_123, 1); lean_inc(x_138); lean_inc(x_137); lean_dec(x_123); x_139 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_139, 0, x_137); lean_ctor_set(x_139, 1, x_138); return x_139; } } } } block_33: { if (lean_obj_tag(x_10) == 0) { uint8_t x_12; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_12 = !lean_is_exclusive(x_10); if (x_12 == 0) { lean_object* x_13; x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_10); lean_ctor_set(x_13, 1, x_11); return x_13; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; x_14 = lean_ctor_get(x_10, 0); lean_inc(x_14); lean_dec(x_10); x_15 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_15, 0, x_14); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_15); lean_ctor_set(x_16, 1, x_11); return x_16; } } else { uint8_t x_17; x_17 = !lean_is_exclusive(x_10); if (x_17 == 0) { lean_object* x_18; x_18 = lean_ctor_get(x_10, 0); if (lean_obj_tag(x_18) == 0) { lean_object* x_19; lean_object* x_20; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_19 = lean_ctor_get(x_18, 0); lean_inc(x_19); lean_dec(x_18); lean_ctor_set(x_10, 0, x_19); x_20 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_20, 0, x_10); lean_ctor_set(x_20, 1, x_11); return x_20; } else { lean_object* x_21; size_t x_22; size_t x_23; lean_free_object(x_10); x_21 = lean_ctor_get(x_18, 0); lean_inc(x_21); lean_dec(x_18); x_22 = 1; x_23 = x_6 + x_22; x_6 = x_23; x_7 = x_21; x_9 = x_11; goto _start; } } else { lean_object* x_25; x_25 = lean_ctor_get(x_10, 0); lean_inc(x_25); lean_dec(x_10); if (lean_obj_tag(x_25) == 0) { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_26 = lean_ctor_get(x_25, 0); lean_inc(x_26); lean_dec(x_25); x_27 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_27, 0, x_26); x_28 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_28, 0, x_27); lean_ctor_set(x_28, 1, x_11); return x_28; } else { lean_object* x_29; size_t x_30; size_t x_31; x_29 = lean_ctor_get(x_25, 0); lean_inc(x_29); lean_dec(x_25); x_30 = 1; x_31 = x_6 + x_30; x_6 = x_31; x_7 = x_29; x_9 = x_11; goto _start; } } } } block_62: { if (lean_obj_tag(x_34) == 0) { uint8_t x_36; x_36 = !lean_is_exclusive(x_34); if (x_36 == 0) { x_10 = x_34; x_11 = x_35; goto block_33; } else { lean_object* x_37; lean_object* x_38; x_37 = lean_ctor_get(x_34, 0); lean_inc(x_37); lean_dec(x_34); x_38 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_38, 0, x_37); x_10 = x_38; x_11 = x_35; goto block_33; } } else { uint8_t x_39; x_39 = !lean_is_exclusive(x_34); if (x_39 == 0) { lean_object* x_40; x_40 = lean_ctor_get(x_34, 0); if (lean_obj_tag(x_40) == 0) { lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; x_41 = lean_ctor_get(x_40, 0); lean_inc(x_41); x_42 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_42, 0, x_40); x_43 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_43, 0, x_42); lean_ctor_set(x_43, 1, x_41); x_44 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_44, 0, x_43); lean_ctor_set(x_34, 0, x_44); x_10 = x_34; x_11 = x_35; goto block_33; } else { uint8_t x_45; x_45 = !lean_is_exclusive(x_40); if (x_45 == 0) { lean_object* x_46; lean_object* x_47; x_46 = lean_ctor_get(x_40, 0); lean_inc(x_3); x_47 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_47, 0, x_3); lean_ctor_set(x_47, 1, x_46); lean_ctor_set(x_40, 0, x_47); x_10 = x_34; x_11 = x_35; goto block_33; } else { lean_object* x_48; lean_object* x_49; lean_object* x_50; x_48 = lean_ctor_get(x_40, 0); lean_inc(x_48); lean_dec(x_40); lean_inc(x_3); x_49 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_49, 0, x_3); lean_ctor_set(x_49, 1, x_48); x_50 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_50, 0, x_49); lean_ctor_set(x_34, 0, x_50); x_10 = x_34; x_11 = x_35; goto block_33; } } } else { lean_object* x_51; x_51 = lean_ctor_get(x_34, 0); lean_inc(x_51); lean_dec(x_34); if (lean_obj_tag(x_51) == 0) { lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; x_52 = lean_ctor_get(x_51, 0); lean_inc(x_52); x_53 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_53, 0, x_51); x_54 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_54, 0, x_53); lean_ctor_set(x_54, 1, x_52); x_55 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_55, 0, x_54); x_56 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_56, 0, x_55); x_10 = x_56; x_11 = x_35; goto block_33; } else { lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; x_57 = lean_ctor_get(x_51, 0); lean_inc(x_57); if (lean_is_exclusive(x_51)) { lean_ctor_release(x_51, 0); x_58 = x_51; } else { lean_dec_ref(x_51); x_58 = lean_box(0); } lean_inc(x_3); x_59 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_59, 0, x_3); lean_ctor_set(x_59, 1, x_57); if (lean_is_scalar(x_58)) { x_60 = lean_alloc_ctor(1, 1, 0); } else { x_60 = x_58; } lean_ctor_set(x_60, 0, x_59); x_61 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_61, 0, x_60); x_10 = x_61; x_11 = x_35; goto block_33; } } } } block_115: { if (lean_obj_tag(x_63) == 0) { uint8_t x_65; x_65 = !lean_is_exclusive(x_63); if (x_65 == 0) { x_34 = x_63; x_35 = x_64; goto block_62; } else { lean_object* x_66; lean_object* x_67; x_66 = lean_ctor_get(x_63, 0); lean_inc(x_66); lean_dec(x_63); x_67 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_67, 0, x_66); x_34 = x_67; x_35 = x_64; goto block_62; } } else { uint8_t x_68; x_68 = !lean_is_exclusive(x_63); if (x_68 == 0) { lean_object* x_69; uint8_t x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; x_69 = lean_ctor_get(x_63, 0); x_70 = l_List_isEmpty___rarg(x_69); lean_inc(x_69); x_71 = l_List_map___at_Lean_Server_FileWorker_handlePlainGoal___spec__1(x_69); x_72 = l_List_redLength___rarg(x_71); x_73 = lean_mk_empty_array_with_capacity(x_72); lean_dec(x_72); x_74 = l_List_toArrayAux___rarg(x_71, x_73); if (x_70 == 0) { lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; x_75 = l_List_map___at_Lean_Server_FileWorker_handlePlainGoal___spec__2(x_69); x_76 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__9___closed__1; x_77 = l_String_intercalate(x_76, x_75); x_78 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_78, 0, x_77); lean_ctor_set(x_78, 1, x_74); x_79 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_79, 0, x_78); x_80 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_80, 0, x_79); x_81 = lean_box(0); x_82 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_82, 0, x_80); lean_ctor_set(x_82, 1, x_81); x_83 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_83, 0, x_82); lean_ctor_set(x_63, 0, x_83); x_34 = x_63; x_35 = x_64; goto block_62; } else { 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_dec(x_69); x_84 = l_Lean_Elab_ContextInfo_ppGoals___closed__2; x_85 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_85, 0, x_84); lean_ctor_set(x_85, 1, x_74); x_86 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_86, 0, x_85); x_87 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_87, 0, x_86); x_88 = lean_box(0); x_89 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_89, 0, x_87); lean_ctor_set(x_89, 1, x_88); x_90 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_90, 0, x_89); lean_ctor_set(x_63, 0, x_90); x_34 = x_63; x_35 = x_64; goto block_62; } } else { lean_object* x_91; uint8_t x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; x_91 = lean_ctor_get(x_63, 0); lean_inc(x_91); lean_dec(x_63); x_92 = l_List_isEmpty___rarg(x_91); lean_inc(x_91); x_93 = l_List_map___at_Lean_Server_FileWorker_handlePlainGoal___spec__1(x_91); x_94 = l_List_redLength___rarg(x_93); x_95 = lean_mk_empty_array_with_capacity(x_94); lean_dec(x_94); x_96 = l_List_toArrayAux___rarg(x_93, x_95); if (x_92 == 0) { 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; x_97 = l_List_map___at_Lean_Server_FileWorker_handlePlainGoal___spec__2(x_91); x_98 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__9___closed__1; x_99 = l_String_intercalate(x_98, x_97); x_100 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_100, 0, x_99); lean_ctor_set(x_100, 1, x_96); x_101 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_101, 0, x_100); x_102 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_102, 0, x_101); x_103 = lean_box(0); x_104 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_104, 0, x_102); lean_ctor_set(x_104, 1, x_103); x_105 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_105, 0, x_104); x_106 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_106, 0, x_105); x_34 = x_106; x_35 = x_64; goto block_62; } else { lean_object* x_107; 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; lean_dec(x_91); x_107 = l_Lean_Elab_ContextInfo_ppGoals___closed__2; x_108 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_108, 0, x_107); lean_ctor_set(x_108, 1, x_96); x_109 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_109, 0, x_108); x_110 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_110, 0, x_109); x_111 = lean_box(0); x_112 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_112, 0, x_110); lean_ctor_set(x_112, 1, x_111); x_113 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_113, 0, x_112); x_114 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_114, 0, x_113); x_34 = x_114; x_35 = x_64; goto block_62; } } } } } } lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handlePlainGoal___spec__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: { if (lean_obj_tag(x_4) == 0) { 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; x_8 = lean_ctor_get(x_4, 0); x_9 = lean_box(0); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_10, 1, x_5); x_11 = lean_array_get_size(x_8); x_12 = lean_usize_of_nat(x_11); lean_dec(x_11); x_13 = 0; x_14 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__8(x_1, x_2, x_3, x_9, x_8, x_12, x_13, x_10, x_6, x_7); if (lean_obj_tag(x_14) == 0) { lean_object* x_15; x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); if (lean_obj_tag(x_15) == 0) { uint8_t x_16; x_16 = !lean_is_exclusive(x_14); if (x_16 == 0) { lean_object* x_17; uint8_t x_18; x_17 = lean_ctor_get(x_14, 0); lean_dec(x_17); x_18 = !lean_is_exclusive(x_15); if (x_18 == 0) { return x_14; } else { lean_object* x_19; lean_object* x_20; x_19 = lean_ctor_get(x_15, 0); lean_inc(x_19); lean_dec(x_15); x_20 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_20, 0, x_19); lean_ctor_set(x_14, 0, x_20); return x_14; } } else { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_21 = lean_ctor_get(x_14, 1); lean_inc(x_21); lean_dec(x_14); x_22 = lean_ctor_get(x_15, 0); lean_inc(x_22); if (lean_is_exclusive(x_15)) { lean_ctor_release(x_15, 0); x_23 = x_15; } else { lean_dec_ref(x_15); x_23 = lean_box(0); } if (lean_is_scalar(x_23)) { x_24 = lean_alloc_ctor(0, 1, 0); } else { x_24 = x_23; } lean_ctor_set(x_24, 0, x_22); x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_21); return x_25; } } else { uint8_t x_26; x_26 = !lean_is_exclusive(x_15); if (x_26 == 0) { lean_object* x_27; lean_object* x_28; x_27 = lean_ctor_get(x_15, 0); x_28 = lean_ctor_get(x_27, 0); lean_inc(x_28); if (lean_obj_tag(x_28) == 0) { lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_free_object(x_15); x_29 = lean_ctor_get(x_14, 1); lean_inc(x_29); lean_dec(x_14); x_30 = lean_ctor_get(x_27, 1); lean_inc(x_30); lean_dec(x_27); x_31 = lean_box(0); x_32 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1(x_30, x_31, x_6, x_29); return x_32; } else { uint8_t x_33; lean_dec(x_27); x_33 = !lean_is_exclusive(x_14); if (x_33 == 0) { lean_object* x_34; lean_object* x_35; x_34 = lean_ctor_get(x_14, 0); lean_dec(x_34); x_35 = lean_ctor_get(x_28, 0); lean_inc(x_35); lean_dec(x_28); lean_ctor_set(x_15, 0, x_35); return x_14; } else { lean_object* x_36; lean_object* x_37; lean_object* x_38; x_36 = lean_ctor_get(x_14, 1); lean_inc(x_36); lean_dec(x_14); x_37 = lean_ctor_get(x_28, 0); lean_inc(x_37); lean_dec(x_28); lean_ctor_set(x_15, 0, x_37); x_38 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_38, 0, x_15); lean_ctor_set(x_38, 1, x_36); return x_38; } } } else { lean_object* x_39; lean_object* x_40; x_39 = lean_ctor_get(x_15, 0); lean_inc(x_39); lean_dec(x_15); x_40 = lean_ctor_get(x_39, 0); lean_inc(x_40); if (lean_obj_tag(x_40) == 0) { lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; x_41 = lean_ctor_get(x_14, 1); lean_inc(x_41); lean_dec(x_14); x_42 = lean_ctor_get(x_39, 1); lean_inc(x_42); lean_dec(x_39); x_43 = lean_box(0); x_44 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1(x_42, x_43, x_6, x_41); 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_dec(x_39); x_45 = lean_ctor_get(x_14, 1); lean_inc(x_45); if (lean_is_exclusive(x_14)) { lean_ctor_release(x_14, 0); lean_ctor_release(x_14, 1); x_46 = x_14; } else { lean_dec_ref(x_14); x_46 = lean_box(0); } x_47 = lean_ctor_get(x_40, 0); lean_inc(x_47); lean_dec(x_40); x_48 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_48, 0, x_47); if (lean_is_scalar(x_46)) { x_49 = lean_alloc_ctor(0, 2, 0); } else { x_49 = x_46; } lean_ctor_set(x_49, 0, x_48); lean_ctor_set(x_49, 1, x_45); return x_49; } } } } else { uint8_t x_50; x_50 = !lean_is_exclusive(x_14); if (x_50 == 0) { return x_14; } else { lean_object* x_51; lean_object* x_52; lean_object* x_53; x_51 = lean_ctor_get(x_14, 0); x_52 = lean_ctor_get(x_14, 1); lean_inc(x_52); lean_inc(x_51); lean_dec(x_14); x_53 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_53, 0, x_51); lean_ctor_set(x_53, 1, x_52); return x_53; } } } else { lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; size_t x_58; size_t x_59; lean_object* x_60; x_54 = lean_ctor_get(x_4, 0); x_55 = lean_box(0); x_56 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_56, 0, x_55); lean_ctor_set(x_56, 1, x_5); x_57 = lean_array_get_size(x_54); x_58 = lean_usize_of_nat(x_57); lean_dec(x_57); x_59 = 0; x_60 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__9(x_1, x_2, x_55, x_54, x_58, x_59, x_56, x_6, x_7); if (lean_obj_tag(x_60) == 0) { lean_object* x_61; x_61 = lean_ctor_get(x_60, 0); lean_inc(x_61); if (lean_obj_tag(x_61) == 0) { uint8_t x_62; x_62 = !lean_is_exclusive(x_60); if (x_62 == 0) { lean_object* x_63; uint8_t x_64; x_63 = lean_ctor_get(x_60, 0); lean_dec(x_63); x_64 = !lean_is_exclusive(x_61); if (x_64 == 0) { return x_60; } else { lean_object* x_65; lean_object* x_66; x_65 = lean_ctor_get(x_61, 0); lean_inc(x_65); lean_dec(x_61); x_66 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_66, 0, x_65); lean_ctor_set(x_60, 0, x_66); return x_60; } } else { lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; x_67 = lean_ctor_get(x_60, 1); lean_inc(x_67); lean_dec(x_60); x_68 = lean_ctor_get(x_61, 0); lean_inc(x_68); if (lean_is_exclusive(x_61)) { lean_ctor_release(x_61, 0); x_69 = x_61; } else { lean_dec_ref(x_61); x_69 = lean_box(0); } if (lean_is_scalar(x_69)) { x_70 = lean_alloc_ctor(0, 1, 0); } else { x_70 = x_69; } lean_ctor_set(x_70, 0, x_68); x_71 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_71, 0, x_70); lean_ctor_set(x_71, 1, x_67); return x_71; } } else { uint8_t x_72; x_72 = !lean_is_exclusive(x_61); if (x_72 == 0) { lean_object* x_73; lean_object* x_74; x_73 = lean_ctor_get(x_61, 0); x_74 = lean_ctor_get(x_73, 0); lean_inc(x_74); if (lean_obj_tag(x_74) == 0) { lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_free_object(x_61); x_75 = lean_ctor_get(x_60, 1); lean_inc(x_75); lean_dec(x_60); x_76 = lean_ctor_get(x_73, 1); lean_inc(x_76); lean_dec(x_73); x_77 = lean_box(0); x_78 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1(x_76, x_77, x_6, x_75); return x_78; } else { uint8_t x_79; lean_dec(x_73); x_79 = !lean_is_exclusive(x_60); if (x_79 == 0) { lean_object* x_80; lean_object* x_81; x_80 = lean_ctor_get(x_60, 0); lean_dec(x_80); x_81 = lean_ctor_get(x_74, 0); lean_inc(x_81); lean_dec(x_74); lean_ctor_set(x_61, 0, x_81); return x_60; } else { lean_object* x_82; lean_object* x_83; lean_object* x_84; x_82 = lean_ctor_get(x_60, 1); lean_inc(x_82); lean_dec(x_60); x_83 = lean_ctor_get(x_74, 0); lean_inc(x_83); lean_dec(x_74); lean_ctor_set(x_61, 0, x_83); x_84 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_84, 0, x_61); lean_ctor_set(x_84, 1, x_82); return x_84; } } } else { lean_object* x_85; lean_object* x_86; x_85 = lean_ctor_get(x_61, 0); lean_inc(x_85); lean_dec(x_61); x_86 = lean_ctor_get(x_85, 0); lean_inc(x_86); if (lean_obj_tag(x_86) == 0) { lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; x_87 = lean_ctor_get(x_60, 1); lean_inc(x_87); lean_dec(x_60); x_88 = lean_ctor_get(x_85, 1); lean_inc(x_88); lean_dec(x_85); x_89 = lean_box(0); x_90 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleCompletion___spec__3___lambda__1(x_88, x_89, x_6, x_87); return x_90; } else { lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_dec(x_85); x_91 = lean_ctor_get(x_60, 1); lean_inc(x_91); if (lean_is_exclusive(x_60)) { lean_ctor_release(x_60, 0); lean_ctor_release(x_60, 1); x_92 = x_60; } else { lean_dec_ref(x_60); x_92 = lean_box(0); } x_93 = lean_ctor_get(x_86, 0); lean_inc(x_93); lean_dec(x_86); x_94 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_94, 0, x_93); if (lean_is_scalar(x_92)) { x_95 = lean_alloc_ctor(0, 2, 0); } else { x_95 = x_92; } lean_ctor_set(x_95, 0, x_94); lean_ctor_set(x_95, 1, x_91); return x_95; } } } } else { uint8_t x_96; x_96 = !lean_is_exclusive(x_60); if (x_96 == 0) { return x_60; } else { lean_object* x_97; lean_object* x_98; lean_object* x_99; x_97 = lean_ctor_get(x_60, 0); x_98 = lean_ctor_get(x_60, 1); lean_inc(x_98); lean_inc(x_97); lean_dec(x_60); x_99 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_99, 0, x_97); lean_ctor_set(x_99, 1, x_98); return x_99; } } } } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__10(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, size_t x_5, size_t x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { lean_object* x_10; lean_object* x_11; lean_object* x_34; lean_object* x_35; lean_object* x_68; lean_object* x_69; uint8_t x_121; x_121 = x_6 < x_5; if (x_121 == 0) { lean_object* x_122; lean_object* x_123; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_122 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_122, 0, x_7); x_123 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_123, 0, x_122); lean_ctor_set(x_123, 1, x_9); return x_123; } else { lean_object* x_124; lean_object* x_125; lean_dec(x_7); x_124 = lean_array_uget(x_4, x_6); lean_inc(x_1); x_125 = l_Lean_Elab_InfoTree_goalsAt_x3f(x_124, x_1); if (lean_obj_tag(x_125) == 0) { lean_object* x_126; lean_object* x_127; lean_inc(x_2); x_126 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_126, 0, x_2); x_127 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_127, 0, x_126); x_34 = x_127; x_35 = x_9; goto block_67; } else { lean_object* x_128; x_128 = l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__5(x_125, x_8, x_9); if (lean_obj_tag(x_128) == 0) { lean_object* x_129; x_129 = lean_ctor_get(x_128, 0); lean_inc(x_129); if (lean_obj_tag(x_129) == 0) { lean_object* x_130; uint8_t x_131; x_130 = lean_ctor_get(x_128, 1); lean_inc(x_130); lean_dec(x_128); x_131 = !lean_is_exclusive(x_129); if (x_131 == 0) { x_68 = x_129; x_69 = x_130; goto block_120; } else { lean_object* x_132; lean_object* x_133; x_132 = lean_ctor_get(x_129, 0); lean_inc(x_132); lean_dec(x_129); x_133 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_133, 0, x_132); x_68 = x_133; x_69 = x_130; goto block_120; } } else { lean_object* x_134; uint8_t x_135; x_134 = lean_ctor_get(x_128, 1); lean_inc(x_134); lean_dec(x_128); x_135 = !lean_is_exclusive(x_129); if (x_135 == 0) { lean_object* x_136; lean_object* x_137; x_136 = lean_ctor_get(x_129, 0); x_137 = l_List_join___rarg(x_136); lean_ctor_set(x_129, 0, x_137); x_68 = x_129; x_69 = x_134; goto block_120; } else { lean_object* x_138; lean_object* x_139; lean_object* x_140; x_138 = lean_ctor_get(x_129, 0); lean_inc(x_138); lean_dec(x_129); x_139 = l_List_join___rarg(x_138); x_140 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_140, 0, x_139); x_68 = x_140; x_69 = x_134; goto block_120; } } } else { uint8_t x_141; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_141 = !lean_is_exclusive(x_128); if (x_141 == 0) { return x_128; } else { lean_object* x_142; lean_object* x_143; lean_object* x_144; x_142 = lean_ctor_get(x_128, 0); x_143 = lean_ctor_get(x_128, 1); lean_inc(x_143); lean_inc(x_142); lean_dec(x_128); x_144 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_144, 0, x_142); lean_ctor_set(x_144, 1, x_143); return x_144; } } } } block_33: { if (lean_obj_tag(x_10) == 0) { uint8_t x_12; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_12 = !lean_is_exclusive(x_10); if (x_12 == 0) { lean_object* x_13; x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_10); lean_ctor_set(x_13, 1, x_11); return x_13; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; x_14 = lean_ctor_get(x_10, 0); lean_inc(x_14); lean_dec(x_10); x_15 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_15, 0, x_14); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_15); lean_ctor_set(x_16, 1, x_11); return x_16; } } else { uint8_t x_17; x_17 = !lean_is_exclusive(x_10); if (x_17 == 0) { lean_object* x_18; x_18 = lean_ctor_get(x_10, 0); if (lean_obj_tag(x_18) == 0) { lean_object* x_19; lean_object* x_20; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_19 = lean_ctor_get(x_18, 0); lean_inc(x_19); lean_dec(x_18); lean_ctor_set(x_10, 0, x_19); x_20 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_20, 0, x_10); lean_ctor_set(x_20, 1, x_11); return x_20; } else { lean_object* x_21; size_t x_22; size_t x_23; lean_free_object(x_10); x_21 = lean_ctor_get(x_18, 0); lean_inc(x_21); lean_dec(x_18); x_22 = 1; x_23 = x_6 + x_22; x_6 = x_23; x_7 = x_21; x_9 = x_11; goto _start; } } else { lean_object* x_25; x_25 = lean_ctor_get(x_10, 0); lean_inc(x_25); lean_dec(x_10); if (lean_obj_tag(x_25) == 0) { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_26 = lean_ctor_get(x_25, 0); lean_inc(x_26); lean_dec(x_25); x_27 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_27, 0, x_26); x_28 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_28, 0, x_27); lean_ctor_set(x_28, 1, x_11); return x_28; } else { lean_object* x_29; size_t x_30; size_t x_31; x_29 = lean_ctor_get(x_25, 0); lean_inc(x_29); lean_dec(x_25); x_30 = 1; x_31 = x_6 + x_30; x_6 = x_31; x_7 = x_29; x_9 = x_11; goto _start; } } } } block_67: { if (lean_obj_tag(x_34) == 0) { uint8_t x_36; x_36 = !lean_is_exclusive(x_34); if (x_36 == 0) { x_10 = x_34; x_11 = x_35; goto block_33; } else { lean_object* x_37; lean_object* x_38; x_37 = lean_ctor_get(x_34, 0); lean_inc(x_37); lean_dec(x_34); x_38 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_38, 0, x_37); x_10 = x_38; x_11 = x_35; goto block_33; } } else { uint8_t x_39; x_39 = !lean_is_exclusive(x_34); if (x_39 == 0) { lean_object* x_40; x_40 = lean_ctor_get(x_34, 0); if (lean_obj_tag(x_40) == 0) { uint8_t x_41; x_41 = !lean_is_exclusive(x_40); if (x_41 == 0) { lean_object* x_42; lean_object* x_43; lean_object* x_44; x_42 = lean_ctor_get(x_40, 0); lean_inc(x_42); x_43 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_43, 0, x_42); x_44 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_44, 0, x_43); lean_ctor_set(x_44, 1, x_42); lean_ctor_set(x_40, 0, x_44); x_10 = x_34; x_11 = x_35; goto block_33; } else { lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; x_45 = lean_ctor_get(x_40, 0); lean_inc(x_45); lean_dec(x_40); lean_inc(x_45); x_46 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_46, 0, x_45); x_47 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_47, 0, x_46); lean_ctor_set(x_47, 1, x_45); x_48 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_48, 0, x_47); lean_ctor_set(x_34, 0, x_48); x_10 = x_34; x_11 = x_35; goto block_33; } } else { uint8_t x_49; x_49 = !lean_is_exclusive(x_40); if (x_49 == 0) { lean_object* x_50; lean_object* x_51; x_50 = lean_ctor_get(x_40, 0); lean_inc(x_3); x_51 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_51, 0, x_3); lean_ctor_set(x_51, 1, x_50); lean_ctor_set(x_40, 0, x_51); x_10 = x_34; x_11 = x_35; goto block_33; } else { lean_object* x_52; lean_object* x_53; lean_object* x_54; x_52 = lean_ctor_get(x_40, 0); lean_inc(x_52); lean_dec(x_40); lean_inc(x_3); x_53 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_53, 0, x_3); lean_ctor_set(x_53, 1, x_52); x_54 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_54, 0, x_53); lean_ctor_set(x_34, 0, x_54); x_10 = x_34; x_11 = x_35; goto block_33; } } } else { lean_object* x_55; x_55 = lean_ctor_get(x_34, 0); lean_inc(x_55); lean_dec(x_34); if (lean_obj_tag(x_55) == 0) { lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; x_56 = lean_ctor_get(x_55, 0); lean_inc(x_56); if (lean_is_exclusive(x_55)) { lean_ctor_release(x_55, 0); x_57 = x_55; } else { lean_dec_ref(x_55); x_57 = lean_box(0); } lean_inc(x_56); x_58 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_58, 0, x_56); x_59 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_59, 0, x_58); lean_ctor_set(x_59, 1, x_56); if (lean_is_scalar(x_57)) { x_60 = lean_alloc_ctor(0, 1, 0); } else { x_60 = x_57; } lean_ctor_set(x_60, 0, x_59); x_61 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_61, 0, x_60); x_10 = x_61; x_11 = x_35; goto block_33; } else { lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; x_62 = lean_ctor_get(x_55, 0); lean_inc(x_62); if (lean_is_exclusive(x_55)) { lean_ctor_release(x_55, 0); x_63 = x_55; } else { lean_dec_ref(x_55); x_63 = lean_box(0); } lean_inc(x_3); x_64 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_64, 0, x_3); lean_ctor_set(x_64, 1, x_62); if (lean_is_scalar(x_63)) { x_65 = lean_alloc_ctor(1, 1, 0); } else { x_65 = x_63; } lean_ctor_set(x_65, 0, x_64); x_66 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_66, 0, x_65); x_10 = x_66; x_11 = x_35; goto block_33; } } } } block_120: { if (lean_obj_tag(x_68) == 0) { uint8_t x_70; x_70 = !lean_is_exclusive(x_68); if (x_70 == 0) { x_34 = x_68; x_35 = x_69; goto block_67; } else { lean_object* x_71; lean_object* x_72; x_71 = lean_ctor_get(x_68, 0); lean_inc(x_71); lean_dec(x_68); x_72 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_72, 0, x_71); x_34 = x_72; x_35 = x_69; goto block_67; } } else { uint8_t x_73; x_73 = !lean_is_exclusive(x_68); if (x_73 == 0) { lean_object* x_74; uint8_t x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; x_74 = lean_ctor_get(x_68, 0); x_75 = l_List_isEmpty___rarg(x_74); lean_inc(x_74); x_76 = l_List_map___at_Lean_Server_FileWorker_handlePlainGoal___spec__1(x_74); x_77 = l_List_redLength___rarg(x_76); x_78 = lean_mk_empty_array_with_capacity(x_77); lean_dec(x_77); x_79 = l_List_toArrayAux___rarg(x_76, x_78); if (x_75 == 0) { lean_object* x_80; lean_object* x_81; 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; x_80 = l_List_map___at_Lean_Server_FileWorker_handlePlainGoal___spec__2(x_74); x_81 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__9___closed__1; x_82 = l_String_intercalate(x_81, x_80); x_83 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_83, 0, x_82); lean_ctor_set(x_83, 1, x_79); x_84 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_84, 0, x_83); x_85 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_85, 0, x_84); x_86 = lean_box(0); x_87 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_87, 0, x_85); lean_ctor_set(x_87, 1, x_86); x_88 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_88, 0, x_87); lean_ctor_set(x_68, 0, x_88); x_34 = x_68; x_35 = x_69; goto block_67; } else { 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_dec(x_74); x_89 = l_Lean_Elab_ContextInfo_ppGoals___closed__2; x_90 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_90, 0, x_89); lean_ctor_set(x_90, 1, x_79); x_91 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_91, 0, x_90); x_92 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_92, 0, x_91); x_93 = lean_box(0); x_94 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_94, 0, x_92); lean_ctor_set(x_94, 1, x_93); x_95 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_95, 0, x_94); lean_ctor_set(x_68, 0, x_95); x_34 = x_68; x_35 = x_69; goto block_67; } } else { lean_object* x_96; uint8_t x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; x_96 = lean_ctor_get(x_68, 0); lean_inc(x_96); lean_dec(x_68); x_97 = l_List_isEmpty___rarg(x_96); lean_inc(x_96); x_98 = l_List_map___at_Lean_Server_FileWorker_handlePlainGoal___spec__1(x_96); x_99 = l_List_redLength___rarg(x_98); x_100 = lean_mk_empty_array_with_capacity(x_99); lean_dec(x_99); x_101 = l_List_toArrayAux___rarg(x_98, x_100); if (x_97 == 0) { 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_102 = l_List_map___at_Lean_Server_FileWorker_handlePlainGoal___spec__2(x_96); x_103 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__9___closed__1; x_104 = l_String_intercalate(x_103, x_102); x_105 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_105, 0, x_104); lean_ctor_set(x_105, 1, x_101); x_106 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_106, 0, x_105); x_107 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_107, 0, x_106); x_108 = lean_box(0); x_109 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_109, 0, x_107); lean_ctor_set(x_109, 1, x_108); x_110 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_110, 0, x_109); x_111 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_111, 0, x_110); x_34 = x_111; x_35 = x_69; goto block_67; } else { lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_dec(x_96); x_112 = l_Lean_Elab_ContextInfo_ppGoals___closed__2; x_113 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_113, 0, x_112); lean_ctor_set(x_113, 1, x_101); x_114 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_114, 0, x_113); x_115 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_115, 0, x_114); x_116 = lean_box(0); x_117 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_117, 0, x_115); lean_ctor_set(x_117, 1, x_116); x_118 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_118, 0, x_117); x_119 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_119, 0, x_118); x_34 = x_119; x_35 = x_69; goto block_67; } } } } } } lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handlePlainGoal___spec__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) { _start: { lean_object* x_7; lean_object* x_8; x_7 = lean_ctor_get(x_3, 0); lean_inc(x_4); lean_inc(x_2); lean_inc(x_1); x_8 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handlePlainGoal___spec__7(x_1, x_2, x_4, x_7, x_4, x_5, x_6); lean_dec(x_4); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; x_9 = lean_ctor_get(x_8, 0); lean_inc(x_9); if (lean_obj_tag(x_9) == 0) { uint8_t x_10; lean_dec(x_2); lean_dec(x_1); x_10 = !lean_is_exclusive(x_8); if (x_10 == 0) { lean_object* x_11; uint8_t x_12; x_11 = lean_ctor_get(x_8, 0); lean_dec(x_11); x_12 = !lean_is_exclusive(x_9); if (x_12 == 0) { return x_8; } else { lean_object* x_13; lean_object* x_14; x_13 = lean_ctor_get(x_9, 0); lean_inc(x_13); lean_dec(x_9); x_14 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_8, 0, x_14); return x_8; } } else { lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_15 = lean_ctor_get(x_8, 1); lean_inc(x_15); lean_dec(x_8); x_16 = lean_ctor_get(x_9, 0); lean_inc(x_16); if (lean_is_exclusive(x_9)) { lean_ctor_release(x_9, 0); x_17 = x_9; } else { lean_dec_ref(x_9); x_17 = lean_box(0); } if (lean_is_scalar(x_17)) { x_18 = lean_alloc_ctor(0, 1, 0); } else { x_18 = x_17; } lean_ctor_set(x_18, 0, x_16); x_19 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_15); return x_19; } } else { uint8_t x_20; x_20 = !lean_is_exclusive(x_9); if (x_20 == 0) { lean_object* x_21; x_21 = lean_ctor_get(x_9, 0); if (lean_obj_tag(x_21) == 0) { uint8_t x_22; lean_dec(x_2); lean_dec(x_1); x_22 = !lean_is_exclusive(x_8); if (x_22 == 0) { lean_object* x_23; lean_object* x_24; x_23 = lean_ctor_get(x_8, 0); lean_dec(x_23); x_24 = lean_ctor_get(x_21, 0); lean_inc(x_24); lean_dec(x_21); lean_ctor_set(x_9, 0, x_24); return x_8; } else { lean_object* x_25; lean_object* x_26; lean_object* x_27; x_25 = lean_ctor_get(x_8, 1); lean_inc(x_25); lean_dec(x_8); x_26 = lean_ctor_get(x_21, 0); lean_inc(x_26); lean_dec(x_21); lean_ctor_set(x_9, 0, x_26); x_27 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_27, 0, x_9); lean_ctor_set(x_27, 1, x_25); return x_27; } } else { lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; size_t x_34; size_t x_35; lean_object* x_36; lean_free_object(x_9); x_28 = lean_ctor_get(x_8, 1); lean_inc(x_28); lean_dec(x_8); x_29 = lean_ctor_get(x_21, 0); lean_inc(x_29); lean_dec(x_21); x_30 = lean_ctor_get(x_3, 1); x_31 = lean_box(0); x_32 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_32, 0, x_31); lean_ctor_set(x_32, 1, x_29); x_33 = lean_array_get_size(x_30); x_34 = lean_usize_of_nat(x_33); lean_dec(x_33); x_35 = 0; x_36 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__10(x_1, x_2, x_31, x_30, x_34, x_35, x_32, x_5, x_28); if (lean_obj_tag(x_36) == 0) { lean_object* x_37; x_37 = lean_ctor_get(x_36, 0); lean_inc(x_37); if (lean_obj_tag(x_37) == 0) { uint8_t x_38; x_38 = !lean_is_exclusive(x_36); if (x_38 == 0) { lean_object* x_39; uint8_t x_40; x_39 = lean_ctor_get(x_36, 0); lean_dec(x_39); x_40 = !lean_is_exclusive(x_37); if (x_40 == 0) { return x_36; } else { lean_object* x_41; lean_object* x_42; x_41 = lean_ctor_get(x_37, 0); lean_inc(x_41); lean_dec(x_37); x_42 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_42, 0, x_41); lean_ctor_set(x_36, 0, x_42); return x_36; } } else { lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; x_43 = lean_ctor_get(x_36, 1); lean_inc(x_43); lean_dec(x_36); x_44 = lean_ctor_get(x_37, 0); lean_inc(x_44); if (lean_is_exclusive(x_37)) { lean_ctor_release(x_37, 0); x_45 = x_37; } else { lean_dec_ref(x_37); x_45 = lean_box(0); } if (lean_is_scalar(x_45)) { x_46 = lean_alloc_ctor(0, 1, 0); } else { x_46 = x_45; } lean_ctor_set(x_46, 0, x_44); x_47 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_47, 0, x_46); lean_ctor_set(x_47, 1, x_43); return x_47; } } else { uint8_t x_48; x_48 = !lean_is_exclusive(x_37); if (x_48 == 0) { lean_object* x_49; lean_object* x_50; x_49 = lean_ctor_get(x_37, 0); x_50 = lean_ctor_get(x_49, 0); lean_inc(x_50); if (lean_obj_tag(x_50) == 0) { lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_free_object(x_37); x_51 = lean_ctor_get(x_36, 1); lean_inc(x_51); lean_dec(x_36); x_52 = lean_ctor_get(x_49, 1); lean_inc(x_52); lean_dec(x_49); x_53 = lean_box(0); x_54 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2___lambda__1(x_52, x_53, x_5, x_51); return x_54; } else { uint8_t x_55; lean_dec(x_49); x_55 = !lean_is_exclusive(x_36); if (x_55 == 0) { lean_object* x_56; lean_object* x_57; x_56 = lean_ctor_get(x_36, 0); lean_dec(x_56); x_57 = lean_ctor_get(x_50, 0); lean_inc(x_57); lean_dec(x_50); lean_ctor_set(x_37, 0, x_57); return x_36; } else { lean_object* x_58; lean_object* x_59; lean_object* x_60; x_58 = lean_ctor_get(x_36, 1); lean_inc(x_58); lean_dec(x_36); x_59 = lean_ctor_get(x_50, 0); lean_inc(x_59); lean_dec(x_50); lean_ctor_set(x_37, 0, x_59); x_60 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_60, 0, x_37); lean_ctor_set(x_60, 1, x_58); return x_60; } } } else { lean_object* x_61; lean_object* x_62; x_61 = lean_ctor_get(x_37, 0); lean_inc(x_61); lean_dec(x_37); x_62 = lean_ctor_get(x_61, 0); lean_inc(x_62); if (lean_obj_tag(x_62) == 0) { lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; x_63 = lean_ctor_get(x_36, 1); lean_inc(x_63); lean_dec(x_36); x_64 = lean_ctor_get(x_61, 1); lean_inc(x_64); lean_dec(x_61); x_65 = lean_box(0); x_66 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2___lambda__1(x_64, x_65, x_5, x_63); return x_66; } else { lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_dec(x_61); x_67 = lean_ctor_get(x_36, 1); lean_inc(x_67); if (lean_is_exclusive(x_36)) { lean_ctor_release(x_36, 0); lean_ctor_release(x_36, 1); x_68 = x_36; } else { lean_dec_ref(x_36); x_68 = lean_box(0); } x_69 = lean_ctor_get(x_62, 0); lean_inc(x_69); lean_dec(x_62); x_70 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_70, 0, x_69); if (lean_is_scalar(x_68)) { x_71 = lean_alloc_ctor(0, 2, 0); } else { x_71 = x_68; } lean_ctor_set(x_71, 0, x_70); lean_ctor_set(x_71, 1, x_67); return x_71; } } } } else { uint8_t x_72; x_72 = !lean_is_exclusive(x_36); if (x_72 == 0) { return x_36; } else { lean_object* x_73; lean_object* x_74; lean_object* x_75; x_73 = lean_ctor_get(x_36, 0); x_74 = lean_ctor_get(x_36, 1); lean_inc(x_74); lean_inc(x_73); lean_dec(x_36); x_75 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_75, 0, x_73); lean_ctor_set(x_75, 1, x_74); return x_75; } } } } else { lean_object* x_76; x_76 = lean_ctor_get(x_9, 0); lean_inc(x_76); lean_dec(x_9); if (lean_obj_tag(x_76) == 0) { lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_dec(x_2); lean_dec(x_1); x_77 = lean_ctor_get(x_8, 1); lean_inc(x_77); if (lean_is_exclusive(x_8)) { lean_ctor_release(x_8, 0); lean_ctor_release(x_8, 1); x_78 = x_8; } else { lean_dec_ref(x_8); x_78 = lean_box(0); } x_79 = lean_ctor_get(x_76, 0); lean_inc(x_79); lean_dec(x_76); x_80 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_80, 0, x_79); if (lean_is_scalar(x_78)) { x_81 = lean_alloc_ctor(0, 2, 0); } else { x_81 = x_78; } lean_ctor_set(x_81, 0, x_80); lean_ctor_set(x_81, 1, x_77); return x_81; } else { lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; size_t x_88; size_t x_89; lean_object* x_90; x_82 = lean_ctor_get(x_8, 1); lean_inc(x_82); lean_dec(x_8); x_83 = lean_ctor_get(x_76, 0); lean_inc(x_83); lean_dec(x_76); x_84 = lean_ctor_get(x_3, 1); x_85 = lean_box(0); x_86 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_86, 0, x_85); lean_ctor_set(x_86, 1, x_83); x_87 = lean_array_get_size(x_84); x_88 = lean_usize_of_nat(x_87); lean_dec(x_87); x_89 = 0; x_90 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__10(x_1, x_2, x_85, x_84, x_88, x_89, x_86, x_5, x_82); if (lean_obj_tag(x_90) == 0) { lean_object* x_91; x_91 = lean_ctor_get(x_90, 0); lean_inc(x_91); if (lean_obj_tag(x_91) == 0) { lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; x_92 = lean_ctor_get(x_90, 1); lean_inc(x_92); if (lean_is_exclusive(x_90)) { lean_ctor_release(x_90, 0); lean_ctor_release(x_90, 1); x_93 = x_90; } else { lean_dec_ref(x_90); x_93 = lean_box(0); } x_94 = lean_ctor_get(x_91, 0); lean_inc(x_94); if (lean_is_exclusive(x_91)) { lean_ctor_release(x_91, 0); x_95 = x_91; } else { lean_dec_ref(x_91); x_95 = lean_box(0); } if (lean_is_scalar(x_95)) { x_96 = lean_alloc_ctor(0, 1, 0); } else { x_96 = x_95; } lean_ctor_set(x_96, 0, x_94); if (lean_is_scalar(x_93)) { x_97 = lean_alloc_ctor(0, 2, 0); } else { x_97 = x_93; } lean_ctor_set(x_97, 0, x_96); lean_ctor_set(x_97, 1, x_92); return x_97; } else { lean_object* x_98; lean_object* x_99; lean_object* x_100; x_98 = lean_ctor_get(x_91, 0); lean_inc(x_98); if (lean_is_exclusive(x_91)) { lean_ctor_release(x_91, 0); x_99 = x_91; } else { lean_dec_ref(x_91); x_99 = lean_box(0); } x_100 = lean_ctor_get(x_98, 0); lean_inc(x_100); if (lean_obj_tag(x_100) == 0) { lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_dec(x_99); x_101 = lean_ctor_get(x_90, 1); lean_inc(x_101); lean_dec(x_90); x_102 = lean_ctor_get(x_98, 1); lean_inc(x_102); lean_dec(x_98); x_103 = lean_box(0); x_104 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleCompletion___spec__2___lambda__1(x_102, x_103, x_5, x_101); return x_104; } else { lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_dec(x_98); x_105 = lean_ctor_get(x_90, 1); lean_inc(x_105); if (lean_is_exclusive(x_90)) { lean_ctor_release(x_90, 0); lean_ctor_release(x_90, 1); x_106 = x_90; } else { lean_dec_ref(x_90); x_106 = lean_box(0); } x_107 = lean_ctor_get(x_100, 0); lean_inc(x_107); lean_dec(x_100); if (lean_is_scalar(x_99)) { x_108 = lean_alloc_ctor(1, 1, 0); } else { x_108 = x_99; } lean_ctor_set(x_108, 0, x_107); if (lean_is_scalar(x_106)) { x_109 = lean_alloc_ctor(0, 2, 0); } else { x_109 = x_106; } lean_ctor_set(x_109, 0, x_108); lean_ctor_set(x_109, 1, x_105); return x_109; } } } else { lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; x_110 = lean_ctor_get(x_90, 0); lean_inc(x_110); x_111 = lean_ctor_get(x_90, 1); lean_inc(x_111); if (lean_is_exclusive(x_90)) { lean_ctor_release(x_90, 0); lean_ctor_release(x_90, 1); x_112 = x_90; } else { lean_dec_ref(x_90); x_112 = lean_box(0); } if (lean_is_scalar(x_112)) { x_113 = lean_alloc_ctor(1, 2, 0); } else { x_113 = x_112; } lean_ctor_set(x_113, 0, x_110); lean_ctor_set(x_113, 1, x_111); return x_113; } } } } } else { uint8_t x_114; lean_dec(x_2); lean_dec(x_1); x_114 = !lean_is_exclusive(x_8); if (x_114 == 0) { return x_8; } else { lean_object* x_115; lean_object* x_116; lean_object* x_117; x_115 = lean_ctor_get(x_8, 0); x_116 = lean_ctor_get(x_8, 1); lean_inc(x_116); lean_inc(x_115); lean_dec(x_8); x_117 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_117, 0, x_115); lean_ctor_set(x_117, 1, x_116); return x_117; } } } } lean_object* l_Lean_Server_FileWorker_handlePlainGoal___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; lean_object* x_12; x_7 = lean_ctor_get(x_4, 3); x_8 = lean_ctor_get(x_7, 7); x_9 = lean_ctor_get(x_8, 1); x_10 = lean_box(0); x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_1); lean_ctor_set(x_11, 1, x_10); lean_inc(x_11); x_12 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handlePlainGoal___spec__6(x_2, x_11, x_9, x_11, x_5, x_6); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); if (lean_obj_tag(x_13) == 0) { uint8_t x_14; lean_dec(x_3); x_14 = !lean_is_exclusive(x_12); if (x_14 == 0) { lean_object* x_15; uint8_t x_16; x_15 = lean_ctor_get(x_12, 0); lean_dec(x_15); x_16 = !lean_is_exclusive(x_13); if (x_16 == 0) { return x_12; } else { lean_object* x_17; lean_object* x_18; x_17 = lean_ctor_get(x_13, 0); lean_inc(x_17); lean_dec(x_13); x_18 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_12, 0, x_18); return x_12; } } else { lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_19 = lean_ctor_get(x_12, 1); lean_inc(x_19); lean_dec(x_12); x_20 = lean_ctor_get(x_13, 0); lean_inc(x_20); if (lean_is_exclusive(x_13)) { lean_ctor_release(x_13, 0); x_21 = x_13; } else { lean_dec_ref(x_13); x_21 = lean_box(0); } if (lean_is_scalar(x_21)) { x_22 = lean_alloc_ctor(0, 1, 0); } else { x_22 = x_21; } lean_ctor_set(x_22, 0, x_20); x_23 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_23, 0, x_22); lean_ctor_set(x_23, 1, x_19); return x_23; } } else { uint8_t x_24; x_24 = !lean_is_exclusive(x_13); if (x_24 == 0) { lean_object* x_25; lean_object* x_26; x_25 = lean_ctor_get(x_13, 0); x_26 = lean_ctor_get(x_25, 0); lean_inc(x_26); lean_dec(x_25); if (lean_obj_tag(x_26) == 0) { uint8_t x_27; lean_free_object(x_13); x_27 = !lean_is_exclusive(x_12); if (x_27 == 0) { lean_object* x_28; x_28 = lean_ctor_get(x_12, 0); lean_dec(x_28); lean_ctor_set(x_12, 0, x_3); return x_12; } else { lean_object* x_29; lean_object* x_30; x_29 = lean_ctor_get(x_12, 1); lean_inc(x_29); lean_dec(x_12); x_30 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_30, 0, x_3); lean_ctor_set(x_30, 1, x_29); return x_30; } } else { uint8_t x_31; lean_dec(x_3); x_31 = !lean_is_exclusive(x_12); if (x_31 == 0) { lean_object* x_32; lean_object* x_33; x_32 = lean_ctor_get(x_12, 0); lean_dec(x_32); x_33 = lean_ctor_get(x_26, 0); lean_inc(x_33); lean_dec(x_26); lean_ctor_set(x_13, 0, x_33); return x_12; } else { lean_object* x_34; lean_object* x_35; lean_object* x_36; x_34 = lean_ctor_get(x_12, 1); lean_inc(x_34); lean_dec(x_12); x_35 = lean_ctor_get(x_26, 0); lean_inc(x_35); lean_dec(x_26); lean_ctor_set(x_13, 0, x_35); x_36 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_36, 0, x_13); lean_ctor_set(x_36, 1, x_34); return x_36; } } } else { lean_object* x_37; lean_object* x_38; x_37 = lean_ctor_get(x_13, 0); lean_inc(x_37); lean_dec(x_13); x_38 = lean_ctor_get(x_37, 0); lean_inc(x_38); lean_dec(x_37); if (lean_obj_tag(x_38) == 0) { lean_object* x_39; lean_object* x_40; lean_object* x_41; x_39 = lean_ctor_get(x_12, 1); lean_inc(x_39); if (lean_is_exclusive(x_12)) { lean_ctor_release(x_12, 0); lean_ctor_release(x_12, 1); x_40 = x_12; } else { lean_dec_ref(x_12); x_40 = lean_box(0); } if (lean_is_scalar(x_40)) { x_41 = lean_alloc_ctor(0, 2, 0); } else { x_41 = x_40; } lean_ctor_set(x_41, 0, x_3); lean_ctor_set(x_41, 1, x_39); return x_41; } else { lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_dec(x_3); x_42 = lean_ctor_get(x_12, 1); lean_inc(x_42); if (lean_is_exclusive(x_12)) { lean_ctor_release(x_12, 0); lean_ctor_release(x_12, 1); x_43 = x_12; } else { lean_dec_ref(x_12); x_43 = lean_box(0); } x_44 = lean_ctor_get(x_38, 0); lean_inc(x_44); lean_dec(x_38); x_45 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_45, 0, x_44); if (lean_is_scalar(x_43)) { x_46 = lean_alloc_ctor(0, 2, 0); } else { x_46 = x_43; } lean_ctor_set(x_46, 0, x_45); lean_ctor_set(x_46, 1, x_42); return x_46; } } } } else { uint8_t x_47; lean_dec(x_3); x_47 = !lean_is_exclusive(x_12); if (x_47 == 0) { return x_12; } else { lean_object* x_48; lean_object* x_49; lean_object* x_50; x_48 = lean_ctor_get(x_12, 0); x_49 = lean_ctor_get(x_12, 1); lean_inc(x_49); lean_inc(x_48); lean_dec(x_12); x_50 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_50, 0, x_48); lean_ctor_set(x_50, 1, x_49); return x_50; } } } } lean_object* l_Lean_Server_FileWorker_handlePlainGoal(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; x_4 = lean_ctor_get(x_2, 4); lean_inc(x_4); x_5 = lean_st_ref_get(x_4, x_3); lean_dec(x_4); x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = lean_ctor_get(x_6, 0); lean_inc(x_8); x_9 = lean_ctor_get(x_8, 2); lean_inc(x_9); lean_dec(x_8); x_10 = lean_ctor_get(x_1, 1); lean_inc(x_10); lean_dec(x_1); x_11 = l_Lean_FileMap_lspPosToUtf8Pos(x_9, x_10); lean_dec(x_9); lean_inc(x_11); x_12 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleCompletion___lambda__1___boxed), 2, 1); lean_closure_set(x_12, 0, x_11); x_13 = lean_box(0); x_14 = l_IO_AsyncList_waitFind_x3f___rarg___closed__1; x_15 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handlePlainGoal___lambda__1___boxed), 6, 3); lean_closure_set(x_15, 0, x_13); lean_closure_set(x_15, 1, x_11); lean_closure_set(x_15, 2, x_14); x_16 = l_Lean_Server_FileWorker_handleHover___closed__1; x_17 = l_Lean_Server_FileWorker_withWaitFindSnap___rarg(x_6, x_12, x_16, x_15, x_2, x_7); return x_17; } } lean_object* l_Lean_Meta_withPPInaccessibleNames___at_Lean_Server_FileWorker_handlePlainGoal___spec__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: { uint8_t x_8; lean_object* x_9; x_8 = lean_unbox(x_2); lean_dec(x_2); x_9 = l_Lean_Meta_withPPInaccessibleNames___at_Lean_Server_FileWorker_handlePlainGoal___spec__3(x_1, x_8, x_3, x_4, x_5, x_6, x_7); return x_9; } } lean_object* l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__5(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___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* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { size_t x_11; size_t x_12; lean_object* x_13; x_11 = lean_unbox_usize(x_6); lean_dec(x_6); x_12 = lean_unbox_usize(x_7); lean_dec(x_7); x_13 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__8(x_1, x_2, x_3, x_4, x_5, x_11, x_12, x_8, x_9, x_10); lean_dec(x_9); lean_dec(x_5); lean_dec(x_3); return x_13; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__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, lean_object* x_8, lean_object* x_9) { _start: { size_t x_10; size_t x_11; lean_object* x_12; x_10 = lean_unbox_usize(x_5); lean_dec(x_5); x_11 = lean_unbox_usize(x_6); lean_dec(x_6); x_12 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__9(x_1, x_2, x_3, x_4, x_10, x_11, x_7, x_8, x_9); lean_dec(x_8); lean_dec(x_4); return x_12; } } lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handlePlainGoal___spec__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_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handlePlainGoal___spec__7(x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_6); lean_dec(x_4); lean_dec(x_3); return x_8; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__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, lean_object* x_8, lean_object* x_9) { _start: { size_t x_10; size_t x_11; lean_object* x_12; x_10 = lean_unbox_usize(x_5); lean_dec(x_5); x_11 = lean_unbox_usize(x_6); lean_dec(x_6); x_12 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__10(x_1, x_2, x_3, x_4, x_10, x_11, x_7, x_8, x_9); lean_dec(x_8); lean_dec(x_4); return x_12; } } lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handlePlainGoal___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) { _start: { lean_object* x_7; x_7 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handlePlainGoal___spec__6(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_3); return x_7; } } lean_object* l_Lean_Server_FileWorker_handlePlainGoal___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_FileWorker_handlePlainGoal___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_4); return x_7; } } uint8_t l_Lean_Server_FileWorker_hasRange(lean_object* x_1) { _start: { uint8_t x_2; lean_object* x_3; x_2 = 0; x_3 = l_Lean_Syntax_getPos_x3f(x_1, x_2); if (lean_obj_tag(x_3) == 0) { uint8_t x_4; x_4 = 0; return x_4; } else { lean_object* x_5; lean_dec(x_3); x_5 = l_Lean_Syntax_getTailPos_x3f(x_1, x_2); if (lean_obj_tag(x_5) == 0) { uint8_t x_6; x_6 = 0; return x_6; } else { uint8_t x_7; lean_dec(x_5); x_7 = 1; return x_7; } } } } lean_object* l_Lean_Server_FileWorker_hasRange___boxed(lean_object* x_1) { _start: { uint8_t x_2; lean_object* x_3; x_2 = l_Lean_Server_FileWorker_hasRange(x_1); lean_dec(x_1); x_3 = lean_box(x_2); return x_3; } } lean_object* l_Lean_Server_FileWorker_rangeOfSyntax_x21(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; lean_object* x_5; x_3 = 0; x_4 = l_Lean_Syntax_getPos_x3f(x_2, x_3); x_5 = l_Lean_Syntax_getTailPos_x3f(x_2, x_3); if (lean_obj_tag(x_4) == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_6 = l_instInhabitedNat; x_7 = l_Option_get_x21___rarg___closed__4; x_8 = lean_panic_fn(x_6, x_7); x_9 = l_Lean_FileMap_utf8PosToLspPos(x_1, x_8); lean_dec(x_8); if (lean_obj_tag(x_5) == 0) { lean_object* x_10; lean_object* x_11; lean_object* x_12; x_10 = lean_panic_fn(x_6, x_7); x_11 = l_Lean_FileMap_utf8PosToLspPos(x_1, x_10); lean_dec(x_10); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_9); lean_ctor_set(x_12, 1, x_11); return x_12; } else { lean_object* x_13; lean_object* x_14; lean_object* x_15; x_13 = lean_ctor_get(x_5, 0); lean_inc(x_13); lean_dec(x_5); x_14 = l_Lean_FileMap_utf8PosToLspPos(x_1, x_13); lean_dec(x_13); x_15 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_15, 0, x_9); lean_ctor_set(x_15, 1, x_14); return x_15; } } else { lean_object* x_16; lean_object* x_17; x_16 = lean_ctor_get(x_4, 0); lean_inc(x_16); lean_dec(x_4); x_17 = l_Lean_FileMap_utf8PosToLspPos(x_1, x_16); lean_dec(x_16); if (lean_obj_tag(x_5) == 0) { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; x_18 = l_instInhabitedNat; x_19 = l_Option_get_x21___rarg___closed__4; x_20 = lean_panic_fn(x_18, x_19); x_21 = l_Lean_FileMap_utf8PosToLspPos(x_1, x_20); lean_dec(x_20); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_17); lean_ctor_set(x_22, 1, x_21); return x_22; } else { lean_object* x_23; lean_object* x_24; lean_object* x_25; x_23 = lean_ctor_get(x_5, 0); lean_inc(x_23); lean_dec(x_5); x_24 = l_Lean_FileMap_utf8PosToLspPos(x_1, x_23); lean_dec(x_23); x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_17); lean_ctor_set(x_25, 1, x_24); return x_25; } } } } lean_object* l_Lean_Server_FileWorker_rangeOfSyntax_x21___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l_Lean_Server_FileWorker_handleDocumentHighlight_match__1___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_dec(x_2); x_4 = lean_apply_1(x_3, x_1); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_dec(x_3); x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); lean_dec(x_1); x_6 = lean_apply_1(x_2, x_5); return x_6; } } } lean_object* l_Lean_Server_FileWorker_handleDocumentHighlight_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDocumentHighlight_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, size_t x_6, size_t x_7, lean_object* x_8) { _start: { uint8_t x_9; x_9 = x_7 < x_6; if (x_9 == 0) { lean_dec(x_3); lean_dec(x_1); lean_inc(x_8); return x_8; } else { lean_object* x_10; lean_object* x_11; x_10 = lean_array_uget(x_5, x_7); lean_inc(x_3); lean_inc(x_1); x_11 = l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f(x_1, x_2, x_3, x_10); if (lean_obj_tag(x_11) == 0) { size_t x_12; size_t x_13; x_12 = 1; x_13 = x_7 + x_12; { size_t _tmp_6 = x_13; lean_object* _tmp_7 = x_4; x_7 = _tmp_6; x_8 = _tmp_7; } goto _start; } else { uint8_t x_15; lean_dec(x_3); lean_dec(x_1); x_15 = !lean_is_exclusive(x_11); if (x_15 == 0) { lean_object* x_16; lean_object* x_17; x_16 = lean_box(0); x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_11); lean_ctor_set(x_17, 1, x_16); return x_17; } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; x_18 = lean_ctor_get(x_11, 0); lean_inc(x_18); lean_dec(x_11); x_19 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_19, 0, x_18); x_20 = lean_box(0); 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; } } } } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, size_t x_6, size_t x_7, lean_object* x_8) { _start: { uint8_t x_9; x_9 = x_7 < x_6; if (x_9 == 0) { lean_dec(x_3); lean_dec(x_1); lean_inc(x_8); return x_8; } else { lean_object* x_10; lean_object* x_11; x_10 = lean_array_uget(x_5, x_7); lean_inc(x_3); lean_inc(x_1); x_11 = l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f(x_1, x_2, x_3, x_10); if (lean_obj_tag(x_11) == 0) { size_t x_12; size_t x_13; x_12 = 1; x_13 = x_7 + x_12; { size_t _tmp_6 = x_13; lean_object* _tmp_7 = x_4; x_7 = _tmp_6; x_8 = _tmp_7; } goto _start; } else { uint8_t x_15; lean_dec(x_3); lean_dec(x_1); x_15 = !lean_is_exclusive(x_11); if (x_15 == 0) { lean_object* x_16; lean_object* x_17; x_16 = lean_box(0); x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_11); lean_ctor_set(x_17, 1, x_16); return x_17; } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; x_18 = lean_ctor_get(x_11, 0); lean_inc(x_18); lean_dec(x_11); x_19 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_19, 0, x_18); x_20 = lean_box(0); 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; } } } } } static lean_object* _init_l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___closed__1() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; x_1 = 0; x_2 = lean_box(x_1); x_3 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_3, 0, x_2); return x_3; } } lean_object* l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; x_5 = lean_ctor_get(x_1, 1); lean_inc(x_5); x_6 = l_Lean_FileMap_lspPosToUtf8Pos(x_2, x_5); x_7 = l_Lean_Parser_Term_doReturn___elambda__1___closed__2; lean_inc(x_4); x_8 = l_Lean_Syntax_isOfKind(x_4, x_7); if (x_8 == 0) { lean_object* x_9; uint8_t x_10; lean_dec(x_6); x_9 = l_Lean_Parser_myMacro____x40_Lean_Parser_Extra___hyg_276____closed__2; lean_inc(x_4); x_10 = l_Lean_Syntax_isOfKind(x_4, x_9); if (x_10 == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; size_t x_14; size_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; x_11 = l_Lean_Syntax_getArgs(x_4); lean_dec(x_4); x_12 = lean_box(0); x_13 = lean_array_get_size(x_11); x_14 = lean_usize_of_nat(x_13); lean_dec(x_13); x_15 = 0; x_16 = l_Array_findSomeM_x3f___rarg___closed__1; x_17 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___spec__1(x_1, x_2, x_3, x_16, x_11, x_14, x_15, x_16); lean_dec(x_11); x_18 = lean_ctor_get(x_17, 0); lean_inc(x_18); lean_dec(x_17); if (lean_obj_tag(x_18) == 0) { return x_12; } else { uint8_t x_19; x_19 = !lean_is_exclusive(x_18); if (x_19 == 0) { return x_18; } else { lean_object* x_20; lean_object* x_21; x_20 = lean_ctor_get(x_18, 0); lean_inc(x_20); lean_dec(x_18); x_21 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_21, 0, x_20); return x_21; } } } else { lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_dec(x_3); x_22 = lean_unsigned_to_nat(0u); x_23 = l_Lean_Syntax_getArg(x_4, x_22); x_24 = lean_unsigned_to_nat(1u); x_25 = l_Lean_Syntax_getArg(x_4, x_24); lean_dec(x_4); x_26 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_2, x_23); lean_dec(x_23); x_27 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_27, 0, x_26); x_3 = x_27; x_4 = x_25; goto _start; } } else { lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; x_29 = lean_unsigned_to_nat(0u); x_30 = l_Lean_Syntax_getArg(x_4, x_29); x_31 = lean_unsigned_to_nat(1u); x_32 = l_Lean_Syntax_getArg(x_4, x_31); x_33 = l_Lean_nullKind; lean_inc(x_32); x_34 = l_Lean_Syntax_isNodeOf(x_32, x_33, x_31); if (x_34 == 0) { lean_object* x_35; lean_object* x_36; lean_object* x_37; size_t x_38; size_t x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_dec(x_32); lean_dec(x_30); lean_dec(x_6); x_35 = l_Lean_Syntax_getArgs(x_4); lean_dec(x_4); x_36 = lean_box(0); x_37 = lean_array_get_size(x_35); x_38 = lean_usize_of_nat(x_37); lean_dec(x_37); x_39 = 0; x_40 = l_Array_findSomeM_x3f___rarg___closed__1; x_41 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___spec__2(x_1, x_2, x_3, x_40, x_35, x_38, x_39, x_40); lean_dec(x_35); x_42 = lean_ctor_get(x_41, 0); lean_inc(x_42); lean_dec(x_41); if (lean_obj_tag(x_42) == 0) { return x_36; } else { uint8_t x_43; x_43 = !lean_is_exclusive(x_42); if (x_43 == 0) { return x_42; } else { lean_object* x_44; lean_object* x_45; x_44 = lean_ctor_get(x_42, 0); lean_inc(x_44); lean_dec(x_42); x_45 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_45, 0, x_44); return x_45; } } } else { lean_object* x_46; lean_object* x_47; uint8_t x_97; lean_object* x_98; x_46 = l_Lean_Syntax_getArg(x_32, x_29); lean_dec(x_32); x_97 = 0; x_98 = l_Lean_Syntax_getPos_x3f(x_4, x_97); if (lean_obj_tag(x_98) == 0) { lean_object* x_99; lean_object* x_100; lean_object* x_101; x_99 = l_instInhabitedNat; x_100 = l_Option_get_x21___rarg___closed__4; x_101 = lean_panic_fn(x_99, x_100); x_47 = x_101; goto block_96; } else { lean_object* x_102; x_102 = lean_ctor_get(x_98, 0); lean_inc(x_102); lean_dec(x_98); x_47 = x_102; goto block_96; } block_96: { uint8_t x_48; x_48 = lean_nat_dec_le(x_47, x_6); lean_dec(x_47); if (x_48 == 0) { lean_dec(x_30); lean_dec(x_6); lean_dec(x_4); x_4 = x_46; goto _start; } else { uint8_t x_50; lean_object* x_51; x_50 = 0; x_51 = l_Lean_Syntax_getTailPos_x3f(x_4, x_50); lean_dec(x_4); if (lean_obj_tag(x_51) == 0) { lean_object* x_52; lean_object* x_53; lean_object* x_54; uint8_t x_55; x_52 = l_instInhabitedNat; x_53 = l_Option_get_x21___rarg___closed__4; x_54 = lean_panic_fn(x_52, x_53); x_55 = lean_nat_dec_lt(x_6, x_54); lean_dec(x_54); lean_dec(x_6); if (x_55 == 0) { lean_dec(x_30); x_4 = x_46; goto _start; } else { lean_dec(x_46); lean_dec(x_1); if (lean_obj_tag(x_3) == 0) { lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; x_57 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_2, x_30); lean_dec(x_30); x_58 = l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___closed__1; x_59 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_59, 0, x_57); lean_ctor_set(x_59, 1, x_58); x_60 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_60, 0, x_59); return x_60; } else { uint8_t x_61; lean_dec(x_30); x_61 = !lean_is_exclusive(x_3); if (x_61 == 0) { lean_object* x_62; lean_object* x_63; lean_object* x_64; x_62 = lean_ctor_get(x_3, 0); x_63 = l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___closed__1; x_64 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_64, 0, x_62); lean_ctor_set(x_64, 1, x_63); lean_ctor_set(x_3, 0, x_64); return x_3; } else { lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; x_65 = lean_ctor_get(x_3, 0); lean_inc(x_65); lean_dec(x_3); x_66 = l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___closed__1; x_67 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_67, 0, x_65); lean_ctor_set(x_67, 1, x_66); x_68 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_68, 0, x_67); return x_68; } } } } else { uint8_t x_69; x_69 = !lean_is_exclusive(x_51); if (x_69 == 0) { lean_object* x_70; uint8_t x_71; x_70 = lean_ctor_get(x_51, 0); x_71 = lean_nat_dec_lt(x_6, x_70); lean_dec(x_70); lean_dec(x_6); if (x_71 == 0) { lean_free_object(x_51); lean_dec(x_30); x_4 = x_46; goto _start; } else { lean_dec(x_46); lean_dec(x_1); if (lean_obj_tag(x_3) == 0) { lean_object* x_73; lean_object* x_74; lean_object* x_75; x_73 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_2, x_30); lean_dec(x_30); x_74 = l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___closed__1; x_75 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_75, 0, x_73); lean_ctor_set(x_75, 1, x_74); lean_ctor_set(x_51, 0, x_75); return x_51; } else { uint8_t x_76; lean_free_object(x_51); lean_dec(x_30); x_76 = !lean_is_exclusive(x_3); if (x_76 == 0) { lean_object* x_77; lean_object* x_78; lean_object* x_79; x_77 = lean_ctor_get(x_3, 0); x_78 = l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___closed__1; x_79 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_79, 0, x_77); lean_ctor_set(x_79, 1, x_78); lean_ctor_set(x_3, 0, x_79); return x_3; } else { lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; x_80 = lean_ctor_get(x_3, 0); lean_inc(x_80); lean_dec(x_3); x_81 = l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___closed__1; x_82 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_82, 0, x_80); lean_ctor_set(x_82, 1, x_81); x_83 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_83, 0, x_82); return x_83; } } } } else { lean_object* x_84; uint8_t x_85; x_84 = lean_ctor_get(x_51, 0); lean_inc(x_84); lean_dec(x_51); x_85 = lean_nat_dec_lt(x_6, x_84); lean_dec(x_84); lean_dec(x_6); if (x_85 == 0) { lean_dec(x_30); x_4 = x_46; goto _start; } else { lean_dec(x_46); lean_dec(x_1); if (lean_obj_tag(x_3) == 0) { lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; x_87 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_2, x_30); lean_dec(x_30); x_88 = l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___closed__1; x_89 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_89, 0, x_87); lean_ctor_set(x_89, 1, x_88); x_90 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_90, 0, x_89); return x_90; } else { lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_dec(x_30); x_91 = lean_ctor_get(x_3, 0); lean_inc(x_91); if (lean_is_exclusive(x_3)) { lean_ctor_release(x_3, 0); x_92 = x_3; } else { lean_dec_ref(x_3); x_92 = lean_box(0); } x_93 = l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___closed__1; x_94 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_94, 0, x_91); lean_ctor_set(x_94, 1, x_93); if (lean_is_scalar(x_92)) { x_95 = lean_alloc_ctor(1, 1, 0); } else { x_95 = x_92; } lean_ctor_set(x_95, 0, x_94); return x_95; } } } } } } } } } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { size_t x_9; size_t x_10; lean_object* x_11; x_9 = lean_unbox_usize(x_6); lean_dec(x_6); x_10 = lean_unbox_usize(x_7); lean_dec(x_7); x_11 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___spec__1(x_1, x_2, x_3, x_4, x_5, x_9, x_10, x_8); lean_dec(x_8); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); return x_11; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { size_t x_9; size_t x_10; lean_object* x_11; x_9 = lean_unbox_usize(x_6); lean_dec(x_6); x_10 = lean_unbox_usize(x_7); lean_dec(x_7); x_11 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___spec__2(x_1, x_2, x_3, x_4, x_5, x_9, x_10, x_8); lean_dec(x_8); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); return x_11; } } lean_object* l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f(x_1, x_2, x_3, x_4); lean_dec(x_2); return x_5; } } lean_object* l_Lean_Server_FileWorker_handleDocumentHighlight___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; x_7 = lean_box(0); x_8 = lean_ctor_get(x_4, 1); lean_inc(x_8); lean_dec(x_4); x_9 = l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f(x_2, x_3, x_7, x_8); if (lean_obj_tag(x_9) == 0) { lean_object* x_10; x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_1); lean_ctor_set(x_10, 1, x_6); return x_10; } else { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_dec(x_1); x_11 = lean_ctor_get(x_9, 0); lean_inc(x_11); lean_dec(x_9); x_12 = l_Lean_mkOptionalNode___closed__2; x_13 = lean_array_push(x_12, x_11); x_14 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_14, 0, x_13); x_15 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_6); return x_15; } } } lean_object* l_Lean_Server_FileWorker_handleDocumentHighlight(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_4 = lean_ctor_get(x_2, 4); lean_inc(x_4); x_5 = lean_st_ref_get(x_4, x_3); lean_dec(x_4); x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = lean_ctor_get(x_6, 0); lean_inc(x_8); x_9 = lean_ctor_get(x_8, 2); lean_inc(x_9); lean_dec(x_8); x_10 = lean_ctor_get(x_1, 1); lean_inc(x_10); x_11 = l_Lean_FileMap_lspPosToUtf8Pos(x_9, x_10); x_12 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleHover___lambda__1___boxed), 2, 1); lean_closure_set(x_12, 0, x_11); x_13 = l_Lean_Server_FileWorker_handleDefinition___closed__1; x_14 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDocumentHighlight___lambda__1___boxed), 6, 3); lean_closure_set(x_14, 0, x_13); lean_closure_set(x_14, 1, x_1); lean_closure_set(x_14, 2, x_9); x_15 = l_Lean_Server_FileWorker_handleDefinition___closed__2; x_16 = l_Lean_Server_FileWorker_withWaitFindSnap___rarg(x_6, x_12, x_15, x_14, x_2, x_7); return x_16; } } lean_object* l_Lean_Server_FileWorker_handleDocumentHighlight___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_FileWorker_handleDocumentHighlight___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_3); return x_7; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_5; lean_object* x_6; lean_dec(x_3); lean_dec(x_2); x_5 = lean_box(0); x_6 = lean_apply_1(x_4, x_5); return x_6; } else { lean_object* x_7; lean_dec(x_4); x_7 = lean_ctor_get(x_1, 0); lean_inc(x_7); lean_dec(x_1); if (lean_obj_tag(x_7) == 0) { lean_object* x_8; lean_object* x_9; lean_dec(x_3); x_8 = lean_box(0); x_9 = lean_apply_1(x_2, x_8); return x_9; } else { lean_object* x_10; lean_dec(x_2); x_10 = lean_apply_1(x_3, x_7); return x_10; } } } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDocumentSymbol_match__1___rarg), 4, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols_match__1___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_object* x_8; lean_dec(x_3); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_1, 1); lean_inc(x_7); lean_dec(x_1); x_8 = lean_apply_2(x_2, x_6, x_7); return x_8; } } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols_match__2___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_2(x_2, x_3, x_4); return x_5; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols_match__2___rarg), 2, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols_match__1___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_2(x_2, x_3, x_4); return x_5; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols_match__1___rarg), 2, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols_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_box(0); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_1, 1); lean_inc(x_7); lean_dec(x_1); x_8 = lean_apply_2(x_3, x_6, x_7); return x_8; } } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols_match__2___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(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; x_4 = l_Lean_Syntax_getId(x_1); x_5 = l_Lean_Name_toString___closed__1; x_6 = l_Lean_Name_toStringWithSep(x_5, x_4); x_7 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_7, 0, x_6); lean_ctor_set(x_7, 1, x_1); return x_7; } } static lean_object* _init_l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("<unknown>"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Parser_Command_instance___elambda__1___closed__6; x_2 = l_Lean_instInhabitedParserDescr___closed__1; x_3 = lean_string_append(x_1, x_2); return x_3; } } static lean_object* _init_l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__2; x_2 = l_Lean_instInhabitedParserDescr___closed__1; x_3 = lean_string_append(x_1, x_2); return x_3; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___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; lean_object* x_9; lean_object* x_10; uint8_t x_11; x_7 = lean_unsigned_to_nat(4u); x_8 = l_Lean_Syntax_getArg(x_1, x_7); x_9 = l_myMacro____x40_Init_NotationExtra___hyg_5711____closed__24; lean_inc(x_2); x_10 = lean_name_mk_string(x_2, x_9); lean_inc(x_8); x_11 = l_Lean_Syntax_isOfKind(x_8, x_10); lean_dec(x_10); if (x_11 == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; lean_dec(x_8); x_12 = lean_unsigned_to_nat(1u); x_13 = l_Lean_Syntax_getArg(x_3, x_12); x_14 = l_Lean_Syntax_getArg(x_13, x_12); x_15 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__21; x_16 = lean_name_mk_string(x_2, x_15); lean_inc(x_14); x_17 = l_Lean_Syntax_isOfKind(x_14, x_16); lean_dec(x_16); if (x_17 == 0) { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_dec(x_14); x_18 = lean_unsigned_to_nat(0u); x_19 = l_Lean_Syntax_getArg(x_13, x_18); lean_dec(x_13); x_20 = l_Lean_Syntax_isIdOrAtom_x3f(x_19); if (lean_obj_tag(x_20) == 0) { lean_object* x_21; lean_object* x_22; x_21 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_21); lean_ctor_set(x_22, 1, x_19); return x_22; } else { lean_object* x_23; lean_object* x_24; x_23 = lean_ctor_get(x_20, 0); lean_inc(x_23); lean_dec(x_20); x_24 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_19); return x_24; } } else { lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; x_25 = lean_unsigned_to_nat(0u); x_26 = l_Lean_Syntax_getArg(x_14, x_25); x_27 = l_Lean_identKind___closed__2; lean_inc(x_26); x_28 = l_Lean_Syntax_isOfKind(x_26, x_27); if (x_28 == 0) { lean_object* x_29; lean_object* x_30; lean_dec(x_26); lean_dec(x_14); x_29 = l_Lean_Syntax_getArg(x_13, x_25); lean_dec(x_13); x_30 = l_Lean_Syntax_isIdOrAtom_x3f(x_29); if (lean_obj_tag(x_30) == 0) { lean_object* x_31; lean_object* x_32; x_31 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_32 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_32, 0, x_31); lean_ctor_set(x_32, 1, x_29); return x_32; } else { lean_object* x_33; lean_object* x_34; x_33 = lean_ctor_get(x_30, 0); lean_inc(x_33); lean_dec(x_30); x_34 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_34, 0, x_33); lean_ctor_set(x_34, 1, x_29); return x_34; } } else { lean_object* x_35; uint8_t x_36; x_35 = l_Lean_Syntax_getArg(x_14, x_12); lean_dec(x_14); x_36 = l_Lean_Syntax_isNone(x_35); if (x_36 == 0) { lean_object* x_37; lean_object* x_38; uint8_t x_39; x_37 = l_Lean_nullKind; x_38 = lean_unsigned_to_nat(3u); lean_inc(x_35); x_39 = l_Lean_Syntax_isNodeOf(x_35, x_37, x_38); if (x_39 == 0) { lean_object* x_40; lean_object* x_41; lean_dec(x_35); lean_dec(x_26); x_40 = l_Lean_Syntax_getArg(x_13, x_25); lean_dec(x_13); x_41 = l_Lean_Syntax_isIdOrAtom_x3f(x_40); if (lean_obj_tag(x_41) == 0) { lean_object* x_42; lean_object* x_43; x_42 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_43 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_43, 0, x_42); lean_ctor_set(x_43, 1, x_40); return x_43; } else { lean_object* x_44; lean_object* x_45; x_44 = lean_ctor_get(x_41, 0); lean_inc(x_44); lean_dec(x_41); x_45 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_45, 0, x_44); lean_ctor_set(x_45, 1, x_40); return x_45; } } else { lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_dec(x_13); x_46 = l_Lean_Syntax_getArg(x_35, x_12); lean_dec(x_35); x_47 = l_Lean_Syntax_getArgs(x_46); lean_dec(x_46); x_48 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_48, 0, x_47); x_49 = lean_box(0); x_50 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_26, x_49, x_48); lean_dec(x_48); return x_50; } } else { lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_dec(x_35); lean_dec(x_13); x_51 = lean_box(0); x_52 = lean_box(0); x_53 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_26, x_52, x_51); return x_53; } } } } else { lean_dec(x_2); if (lean_obj_tag(x_5) == 0) { lean_object* x_54; lean_inc(x_8); x_54 = l_Lean_Syntax_reprint(x_8); if (lean_obj_tag(x_54) == 0) { lean_object* x_55; lean_object* x_56; x_55 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__3; x_56 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_56, 0, x_55); lean_ctor_set(x_56, 1, x_8); return x_56; } else { lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; x_57 = lean_ctor_get(x_54, 0); lean_inc(x_57); lean_dec(x_54); x_58 = l_Lean_Parser_Command_instance___elambda__1___closed__6; x_59 = lean_string_append(x_58, x_57); lean_dec(x_57); x_60 = l_Lean_instInhabitedParserDescr___closed__1; x_61 = lean_string_append(x_59, x_60); x_62 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_62, 0, x_61); lean_ctor_set(x_62, 1, x_8); return x_62; } } else { lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_dec(x_8); x_63 = lean_ctor_get(x_5, 0); x_64 = l_Lean_Syntax_getId(x_63); x_65 = l_Lean_Name_toString___closed__1; x_66 = l_Lean_Name_toStringWithSep(x_65, x_64); lean_inc(x_63); x_67 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_67, 0, x_66); lean_ctor_set(x_67, 1, x_63); return x_67; } } } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_5 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_5, 0, x_1); x_6 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_6, 0, x_4); x_7 = lean_box(0); x_8 = lean_apply_3(x_2, x_7, x_5, x_6); return x_8; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__4(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; lean_object* x_7; lean_object* x_8; uint8_t x_9; x_6 = lean_unsigned_to_nat(3u); x_7 = l_Lean_Syntax_getArg(x_1, x_6); lean_inc(x_3); lean_inc(x_2); lean_inc(x_1); x_8 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___boxed), 6, 3); lean_closure_set(x_8, 0, x_1); lean_closure_set(x_8, 1, x_2); lean_closure_set(x_8, 2, x_3); x_9 = l_Lean_Syntax_isNone(x_7); if (x_9 == 0) { lean_object* x_10; lean_object* x_11; uint8_t x_12; lean_dec(x_1); x_10 = l_Lean_nullKind; x_11 = lean_unsigned_to_nat(1u); lean_inc(x_7); x_12 = l_Lean_Syntax_isNodeOf(x_7, x_10, x_11); if (x_12 == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; lean_dec(x_8); lean_dec(x_7); x_13 = l_Lean_Syntax_getArg(x_3, x_11); lean_dec(x_3); x_14 = l_Lean_Syntax_getArg(x_13, x_11); x_15 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__21; x_16 = lean_name_mk_string(x_2, x_15); lean_inc(x_14); x_17 = l_Lean_Syntax_isOfKind(x_14, x_16); lean_dec(x_16); if (x_17 == 0) { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_dec(x_14); x_18 = lean_unsigned_to_nat(0u); x_19 = l_Lean_Syntax_getArg(x_13, x_18); lean_dec(x_13); x_20 = l_Lean_Syntax_isIdOrAtom_x3f(x_19); if (lean_obj_tag(x_20) == 0) { lean_object* x_21; lean_object* x_22; x_21 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_21); lean_ctor_set(x_22, 1, x_19); return x_22; } else { lean_object* x_23; lean_object* x_24; x_23 = lean_ctor_get(x_20, 0); lean_inc(x_23); lean_dec(x_20); x_24 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_19); return x_24; } } else { lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; x_25 = lean_unsigned_to_nat(0u); x_26 = l_Lean_Syntax_getArg(x_14, x_25); x_27 = l_Lean_identKind___closed__2; lean_inc(x_26); x_28 = l_Lean_Syntax_isOfKind(x_26, x_27); if (x_28 == 0) { lean_object* x_29; lean_object* x_30; lean_dec(x_26); lean_dec(x_14); x_29 = l_Lean_Syntax_getArg(x_13, x_25); lean_dec(x_13); x_30 = l_Lean_Syntax_isIdOrAtom_x3f(x_29); if (lean_obj_tag(x_30) == 0) { lean_object* x_31; lean_object* x_32; x_31 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_32 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_32, 0, x_31); lean_ctor_set(x_32, 1, x_29); return x_32; } else { lean_object* x_33; lean_object* x_34; x_33 = lean_ctor_get(x_30, 0); lean_inc(x_33); lean_dec(x_30); x_34 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_34, 0, x_33); lean_ctor_set(x_34, 1, x_29); return x_34; } } else { lean_object* x_35; uint8_t x_36; x_35 = l_Lean_Syntax_getArg(x_14, x_11); lean_dec(x_14); x_36 = l_Lean_Syntax_isNone(x_35); if (x_36 == 0) { uint8_t x_37; lean_inc(x_35); x_37 = l_Lean_Syntax_isNodeOf(x_35, x_10, x_6); if (x_37 == 0) { lean_object* x_38; lean_object* x_39; lean_dec(x_35); lean_dec(x_26); x_38 = l_Lean_Syntax_getArg(x_13, x_25); lean_dec(x_13); x_39 = l_Lean_Syntax_isIdOrAtom_x3f(x_38); if (lean_obj_tag(x_39) == 0) { lean_object* x_40; lean_object* x_41; x_40 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_41 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_41, 0, x_40); lean_ctor_set(x_41, 1, x_38); return x_41; } else { lean_object* x_42; lean_object* x_43; x_42 = lean_ctor_get(x_39, 0); lean_inc(x_42); lean_dec(x_39); x_43 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_43, 0, x_42); lean_ctor_set(x_43, 1, x_38); return x_43; } } else { lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_dec(x_13); x_44 = l_Lean_Syntax_getArg(x_35, x_11); lean_dec(x_35); x_45 = l_Lean_Syntax_getArgs(x_44); lean_dec(x_44); x_46 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_46, 0, x_45); x_47 = lean_box(0); x_48 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_26, x_47, x_46); lean_dec(x_46); return x_48; } } else { lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_dec(x_35); lean_dec(x_13); x_49 = lean_box(0); x_50 = lean_box(0); x_51 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_26, x_50, x_49); return x_51; } } } } else { lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; uint8_t x_56; x_52 = lean_unsigned_to_nat(0u); x_53 = l_Lean_Syntax_getArg(x_7, x_52); lean_dec(x_7); x_54 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__21; x_55 = lean_name_mk_string(x_2, x_54); lean_inc(x_53); x_56 = l_Lean_Syntax_isOfKind(x_53, x_55); if (x_56 == 0) { lean_object* x_57; lean_object* x_58; uint8_t x_59; lean_dec(x_53); lean_dec(x_8); x_57 = l_Lean_Syntax_getArg(x_3, x_11); lean_dec(x_3); x_58 = l_Lean_Syntax_getArg(x_57, x_11); lean_inc(x_58); x_59 = l_Lean_Syntax_isOfKind(x_58, x_55); lean_dec(x_55); if (x_59 == 0) { lean_object* x_60; lean_object* x_61; lean_dec(x_58); x_60 = l_Lean_Syntax_getArg(x_57, x_52); lean_dec(x_57); x_61 = l_Lean_Syntax_isIdOrAtom_x3f(x_60); if (lean_obj_tag(x_61) == 0) { lean_object* x_62; lean_object* x_63; x_62 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_63 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_63, 0, x_62); lean_ctor_set(x_63, 1, x_60); return x_63; } else { lean_object* x_64; lean_object* x_65; x_64 = lean_ctor_get(x_61, 0); lean_inc(x_64); lean_dec(x_61); x_65 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_65, 0, x_64); lean_ctor_set(x_65, 1, x_60); return x_65; } } else { lean_object* x_66; lean_object* x_67; uint8_t x_68; x_66 = l_Lean_Syntax_getArg(x_58, x_52); x_67 = l_Lean_identKind___closed__2; lean_inc(x_66); x_68 = l_Lean_Syntax_isOfKind(x_66, x_67); if (x_68 == 0) { lean_object* x_69; lean_object* x_70; lean_dec(x_66); lean_dec(x_58); x_69 = l_Lean_Syntax_getArg(x_57, x_52); lean_dec(x_57); x_70 = l_Lean_Syntax_isIdOrAtom_x3f(x_69); if (lean_obj_tag(x_70) == 0) { lean_object* x_71; lean_object* x_72; x_71 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_72 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_72, 0, x_71); lean_ctor_set(x_72, 1, x_69); return x_72; } else { lean_object* x_73; lean_object* x_74; x_73 = lean_ctor_get(x_70, 0); lean_inc(x_73); lean_dec(x_70); x_74 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_74, 0, x_73); lean_ctor_set(x_74, 1, x_69); return x_74; } } else { lean_object* x_75; uint8_t x_76; x_75 = l_Lean_Syntax_getArg(x_58, x_11); lean_dec(x_58); x_76 = l_Lean_Syntax_isNone(x_75); if (x_76 == 0) { uint8_t x_77; lean_inc(x_75); x_77 = l_Lean_Syntax_isNodeOf(x_75, x_10, x_6); if (x_77 == 0) { lean_object* x_78; lean_object* x_79; lean_dec(x_75); lean_dec(x_66); x_78 = l_Lean_Syntax_getArg(x_57, x_52); lean_dec(x_57); x_79 = l_Lean_Syntax_isIdOrAtom_x3f(x_78); if (lean_obj_tag(x_79) == 0) { lean_object* x_80; lean_object* x_81; x_80 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_81 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_81, 0, x_80); lean_ctor_set(x_81, 1, x_78); return x_81; } else { lean_object* x_82; lean_object* x_83; x_82 = lean_ctor_get(x_79, 0); lean_inc(x_82); lean_dec(x_79); x_83 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_83, 0, x_82); lean_ctor_set(x_83, 1, x_78); return x_83; } } else { lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_dec(x_57); x_84 = l_Lean_Syntax_getArg(x_75, x_11); lean_dec(x_75); x_85 = l_Lean_Syntax_getArgs(x_84); lean_dec(x_84); x_86 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_86, 0, x_85); x_87 = lean_box(0); x_88 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_66, x_87, x_86); lean_dec(x_86); return x_88; } } else { lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_dec(x_75); lean_dec(x_57); x_89 = lean_box(0); x_90 = lean_box(0); x_91 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_66, x_90, x_89); return x_91; } } } } else { lean_object* x_92; lean_object* x_93; uint8_t x_94; x_92 = l_Lean_Syntax_getArg(x_53, x_52); x_93 = l_Lean_identKind___closed__2; lean_inc(x_92); x_94 = l_Lean_Syntax_isOfKind(x_92, x_93); if (x_94 == 0) { lean_object* x_95; lean_object* x_96; uint8_t x_97; lean_dec(x_92); lean_dec(x_53); lean_dec(x_8); x_95 = l_Lean_Syntax_getArg(x_3, x_11); lean_dec(x_3); x_96 = l_Lean_Syntax_getArg(x_95, x_11); lean_inc(x_96); x_97 = l_Lean_Syntax_isOfKind(x_96, x_55); lean_dec(x_55); if (x_97 == 0) { lean_object* x_98; lean_object* x_99; lean_dec(x_96); x_98 = l_Lean_Syntax_getArg(x_95, x_52); lean_dec(x_95); x_99 = l_Lean_Syntax_isIdOrAtom_x3f(x_98); if (lean_obj_tag(x_99) == 0) { lean_object* x_100; lean_object* x_101; x_100 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_101 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_101, 0, x_100); lean_ctor_set(x_101, 1, x_98); return x_101; } else { lean_object* x_102; lean_object* x_103; x_102 = lean_ctor_get(x_99, 0); lean_inc(x_102); lean_dec(x_99); x_103 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_103, 0, x_102); lean_ctor_set(x_103, 1, x_98); return x_103; } } else { lean_object* x_104; uint8_t x_105; x_104 = l_Lean_Syntax_getArg(x_96, x_52); lean_inc(x_104); x_105 = l_Lean_Syntax_isOfKind(x_104, x_93); if (x_105 == 0) { lean_object* x_106; lean_object* x_107; lean_dec(x_104); lean_dec(x_96); x_106 = l_Lean_Syntax_getArg(x_95, x_52); lean_dec(x_95); x_107 = l_Lean_Syntax_isIdOrAtom_x3f(x_106); if (lean_obj_tag(x_107) == 0) { lean_object* x_108; lean_object* x_109; x_108 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_109 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_109, 0, x_108); lean_ctor_set(x_109, 1, x_106); return x_109; } else { lean_object* x_110; lean_object* x_111; x_110 = lean_ctor_get(x_107, 0); lean_inc(x_110); lean_dec(x_107); x_111 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_111, 0, x_110); lean_ctor_set(x_111, 1, x_106); return x_111; } } else { lean_object* x_112; uint8_t x_113; x_112 = l_Lean_Syntax_getArg(x_96, x_11); lean_dec(x_96); x_113 = l_Lean_Syntax_isNone(x_112); if (x_113 == 0) { uint8_t x_114; lean_inc(x_112); x_114 = l_Lean_Syntax_isNodeOf(x_112, x_10, x_6); if (x_114 == 0) { lean_object* x_115; lean_object* x_116; lean_dec(x_112); lean_dec(x_104); x_115 = l_Lean_Syntax_getArg(x_95, x_52); lean_dec(x_95); x_116 = l_Lean_Syntax_isIdOrAtom_x3f(x_115); if (lean_obj_tag(x_116) == 0) { lean_object* x_117; lean_object* x_118; x_117 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_118 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_118, 0, x_117); lean_ctor_set(x_118, 1, x_115); return x_118; } else { lean_object* x_119; lean_object* x_120; x_119 = lean_ctor_get(x_116, 0); lean_inc(x_119); lean_dec(x_116); x_120 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_120, 0, x_119); lean_ctor_set(x_120, 1, x_115); return x_120; } } else { lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_dec(x_95); x_121 = l_Lean_Syntax_getArg(x_112, x_11); lean_dec(x_112); x_122 = l_Lean_Syntax_getArgs(x_121); lean_dec(x_121); x_123 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_123, 0, x_122); x_124 = lean_box(0); x_125 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_104, x_124, x_123); lean_dec(x_123); return x_125; } } else { lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_dec(x_112); lean_dec(x_95); x_126 = lean_box(0); x_127 = lean_box(0); x_128 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_104, x_127, x_126); return x_128; } } } } else { lean_object* x_129; uint8_t x_130; x_129 = l_Lean_Syntax_getArg(x_53, x_11); lean_dec(x_53); x_130 = l_Lean_Syntax_isNone(x_129); if (x_130 == 0) { uint8_t x_131; lean_inc(x_129); x_131 = l_Lean_Syntax_isNodeOf(x_129, x_10, x_6); if (x_131 == 0) { lean_object* x_132; lean_object* x_133; uint8_t x_134; lean_dec(x_129); lean_dec(x_92); lean_dec(x_8); x_132 = l_Lean_Syntax_getArg(x_3, x_11); lean_dec(x_3); x_133 = l_Lean_Syntax_getArg(x_132, x_11); lean_inc(x_133); x_134 = l_Lean_Syntax_isOfKind(x_133, x_55); lean_dec(x_55); if (x_134 == 0) { lean_object* x_135; lean_object* x_136; lean_dec(x_133); x_135 = l_Lean_Syntax_getArg(x_132, x_52); lean_dec(x_132); x_136 = l_Lean_Syntax_isIdOrAtom_x3f(x_135); if (lean_obj_tag(x_136) == 0) { lean_object* x_137; lean_object* x_138; x_137 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_138 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_138, 0, x_137); lean_ctor_set(x_138, 1, x_135); return x_138; } else { lean_object* x_139; lean_object* x_140; x_139 = lean_ctor_get(x_136, 0); lean_inc(x_139); lean_dec(x_136); x_140 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_140, 0, x_139); lean_ctor_set(x_140, 1, x_135); return x_140; } } else { lean_object* x_141; uint8_t x_142; x_141 = l_Lean_Syntax_getArg(x_133, x_52); lean_inc(x_141); x_142 = l_Lean_Syntax_isOfKind(x_141, x_93); if (x_142 == 0) { lean_object* x_143; lean_object* x_144; lean_dec(x_141); lean_dec(x_133); x_143 = l_Lean_Syntax_getArg(x_132, x_52); lean_dec(x_132); x_144 = l_Lean_Syntax_isIdOrAtom_x3f(x_143); if (lean_obj_tag(x_144) == 0) { lean_object* x_145; lean_object* x_146; x_145 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_146 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_146, 0, x_145); lean_ctor_set(x_146, 1, x_143); return x_146; } else { lean_object* x_147; lean_object* x_148; x_147 = lean_ctor_get(x_144, 0); lean_inc(x_147); lean_dec(x_144); x_148 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_148, 0, x_147); lean_ctor_set(x_148, 1, x_143); return x_148; } } else { lean_object* x_149; uint8_t x_150; x_149 = l_Lean_Syntax_getArg(x_133, x_11); lean_dec(x_133); x_150 = l_Lean_Syntax_isNone(x_149); if (x_150 == 0) { uint8_t x_151; lean_inc(x_149); x_151 = l_Lean_Syntax_isNodeOf(x_149, x_10, x_6); if (x_151 == 0) { lean_object* x_152; lean_object* x_153; lean_dec(x_149); lean_dec(x_141); x_152 = l_Lean_Syntax_getArg(x_132, x_52); lean_dec(x_132); x_153 = l_Lean_Syntax_isIdOrAtom_x3f(x_152); if (lean_obj_tag(x_153) == 0) { lean_object* x_154; lean_object* x_155; x_154 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_155 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_155, 0, x_154); lean_ctor_set(x_155, 1, x_152); return x_155; } else { lean_object* x_156; lean_object* x_157; x_156 = lean_ctor_get(x_153, 0); lean_inc(x_156); lean_dec(x_153); x_157 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_157, 0, x_156); lean_ctor_set(x_157, 1, x_152); return x_157; } } else { lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_dec(x_132); x_158 = l_Lean_Syntax_getArg(x_149, x_11); lean_dec(x_149); x_159 = l_Lean_Syntax_getArgs(x_158); lean_dec(x_158); x_160 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_160, 0, x_159); x_161 = lean_box(0); x_162 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_141, x_161, x_160); lean_dec(x_160); return x_162; } } else { lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_dec(x_149); lean_dec(x_132); x_163 = lean_box(0); x_164 = lean_box(0); x_165 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_141, x_164, x_163); return x_165; } } } } else { lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_dec(x_55); lean_dec(x_3); x_166 = l_Lean_Syntax_getArg(x_129, x_11); lean_dec(x_129); x_167 = l_Lean_Syntax_getArgs(x_166); lean_dec(x_166); x_168 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_168, 0, x_167); x_169 = lean_box(0); x_170 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__3(x_92, x_8, x_169, x_168); return x_170; } } else { lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_dec(x_129); lean_dec(x_55); lean_dec(x_3); x_171 = lean_box(0); x_172 = lean_box(0); x_173 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__3(x_92, x_8, x_172, x_171); return x_173; } } } } } else { lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_dec(x_8); lean_dec(x_7); x_174 = lean_box(0); x_175 = lean_box(0); x_176 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2(x_1, x_2, x_3, x_175, x_174, x_174); lean_dec(x_3); lean_dec(x_1); return x_176; } } } static lean_object* _init_l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__3; x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonRange____x40_Lean_Data_Lsp_Basic___hyg_409____closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } static lean_object* _init_l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("<section>"); return x_1; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { lean_object* x_3; x_3 = l_List_partition___rarg___closed__1; return x_3; } else { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; x_4 = lean_ctor_get(x_2, 0); lean_inc(x_4); x_5 = lean_ctor_get(x_2, 1); lean_inc(x_5); if (lean_is_exclusive(x_2)) { lean_ctor_release(x_2, 0); lean_ctor_release(x_2, 1); x_6 = x_2; } else { lean_dec_ref(x_2); x_6 = lean_box(0); } x_7 = l_Lean_Parser_Command_namespace___elambda__1___closed__2; lean_inc(x_4); x_8 = l_Lean_Syntax_isOfKind(x_4, x_7); if (x_8 == 0) { lean_object* x_9; uint8_t x_10; x_9 = l_Lean_Parser_Command_section___elambda__1___closed__2; lean_inc(x_4); x_10 = l_Lean_Syntax_isOfKind(x_4, x_9); if (x_10 == 0) { lean_object* x_11; uint8_t x_12; x_11 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___closed__1; lean_inc(x_4); x_12 = l_Lean_Syntax_isOfKind(x_4, x_11); if (x_12 == 0) { lean_object* x_13; uint8_t x_14; x_13 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols(x_1, x_5); x_14 = !lean_is_exclusive(x_13); if (x_14 == 0) { lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_40; uint8_t x_41; x_15 = lean_ctor_get(x_13, 0); x_16 = lean_ctor_get(x_13, 1); x_40 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__5; lean_inc(x_4); x_41 = l_Lean_Syntax_isOfKind(x_4, x_40); if (x_41 == 0) { lean_dec(x_6); lean_dec(x_4); return x_13; } else { uint8_t x_42; x_42 = l_Lean_Server_FileWorker_hasRange(x_4); if (x_42 == 0) { lean_dec(x_6); lean_dec(x_4); return x_13; } else { uint8_t x_43; lean_inc(x_4); x_43 = l_Lean_Syntax_isOfKind(x_4, x_40); if (x_43 == 0) { lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; uint8_t x_48; x_44 = lean_unsigned_to_nat(1u); x_45 = l_Lean_Syntax_getArg(x_4, x_44); x_46 = l_Lean_Syntax_getArg(x_45, x_44); x_47 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__22; lean_inc(x_46); x_48 = l_Lean_Syntax_isOfKind(x_46, x_47); if (x_48 == 0) { lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_dec(x_46); x_49 = lean_unsigned_to_nat(0u); x_50 = l_Lean_Syntax_getArg(x_45, x_49); lean_dec(x_45); x_51 = l_Lean_Syntax_isIdOrAtom_x3f(x_50); if (lean_obj_tag(x_51) == 0) { lean_object* x_52; x_52 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; lean_ctor_set(x_13, 1, x_50); lean_ctor_set(x_13, 0, x_52); x_17 = x_13; goto block_39; } else { lean_object* x_53; x_53 = lean_ctor_get(x_51, 0); lean_inc(x_53); lean_dec(x_51); lean_ctor_set(x_13, 1, x_50); lean_ctor_set(x_13, 0, x_53); x_17 = x_13; goto block_39; } } else { lean_object* x_54; lean_object* x_55; lean_object* x_56; uint8_t x_57; x_54 = lean_unsigned_to_nat(0u); x_55 = l_Lean_Syntax_getArg(x_46, x_54); x_56 = l_Lean_identKind___closed__2; lean_inc(x_55); x_57 = l_Lean_Syntax_isOfKind(x_55, x_56); if (x_57 == 0) { lean_object* x_58; lean_object* x_59; lean_dec(x_55); lean_dec(x_46); x_58 = l_Lean_Syntax_getArg(x_45, x_54); lean_dec(x_45); x_59 = l_Lean_Syntax_isIdOrAtom_x3f(x_58); if (lean_obj_tag(x_59) == 0) { lean_object* x_60; x_60 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; lean_ctor_set(x_13, 1, x_58); lean_ctor_set(x_13, 0, x_60); x_17 = x_13; goto block_39; } else { lean_object* x_61; x_61 = lean_ctor_get(x_59, 0); lean_inc(x_61); lean_dec(x_59); lean_ctor_set(x_13, 1, x_58); lean_ctor_set(x_13, 0, x_61); x_17 = x_13; goto block_39; } } else { lean_object* x_62; uint8_t x_63; x_62 = l_Lean_Syntax_getArg(x_46, x_44); lean_dec(x_46); x_63 = l_Lean_Syntax_isNone(x_62); if (x_63 == 0) { lean_object* x_64; lean_object* x_65; uint8_t x_66; x_64 = l_Lean_nullKind; x_65 = lean_unsigned_to_nat(3u); lean_inc(x_62); x_66 = l_Lean_Syntax_isNodeOf(x_62, x_64, x_65); if (x_66 == 0) { lean_object* x_67; lean_object* x_68; lean_dec(x_62); lean_dec(x_55); x_67 = l_Lean_Syntax_getArg(x_45, x_54); lean_dec(x_45); x_68 = l_Lean_Syntax_isIdOrAtom_x3f(x_67); if (lean_obj_tag(x_68) == 0) { lean_object* x_69; x_69 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; lean_ctor_set(x_13, 1, x_67); lean_ctor_set(x_13, 0, x_69); x_17 = x_13; goto block_39; } else { lean_object* x_70; x_70 = lean_ctor_get(x_68, 0); lean_inc(x_70); lean_dec(x_68); lean_ctor_set(x_13, 1, x_67); lean_ctor_set(x_13, 0, x_70); x_17 = x_13; goto block_39; } } else { lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_dec(x_45); lean_free_object(x_13); x_71 = l_Lean_Syntax_getArg(x_62, x_44); lean_dec(x_62); x_72 = l_Lean_Syntax_getArgs(x_71); lean_dec(x_71); x_73 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_73, 0, x_72); x_74 = lean_box(0); x_75 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_55, x_74, x_73); lean_dec(x_73); x_17 = x_75; goto block_39; } } else { lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_dec(x_62); lean_dec(x_45); lean_free_object(x_13); x_76 = lean_box(0); x_77 = lean_box(0); x_78 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_55, x_77, x_76); x_17 = x_78; goto block_39; } } } } else { lean_object* x_79; lean_object* x_80; lean_object* x_81; uint8_t x_82; x_79 = lean_unsigned_to_nat(0u); x_80 = l_Lean_Syntax_getArg(x_4, x_79); x_81 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__7; x_82 = l_Lean_Syntax_isOfKind(x_80, x_81); if (x_82 == 0) { lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; uint8_t x_87; x_83 = lean_unsigned_to_nat(1u); x_84 = l_Lean_Syntax_getArg(x_4, x_83); x_85 = l_Lean_Syntax_getArg(x_84, x_83); x_86 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__22; lean_inc(x_85); x_87 = l_Lean_Syntax_isOfKind(x_85, x_86); if (x_87 == 0) { lean_object* x_88; lean_object* x_89; lean_dec(x_85); x_88 = l_Lean_Syntax_getArg(x_84, x_79); lean_dec(x_84); x_89 = l_Lean_Syntax_isIdOrAtom_x3f(x_88); if (lean_obj_tag(x_89) == 0) { lean_object* x_90; x_90 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; lean_ctor_set(x_13, 1, x_88); lean_ctor_set(x_13, 0, x_90); x_17 = x_13; goto block_39; } else { lean_object* x_91; x_91 = lean_ctor_get(x_89, 0); lean_inc(x_91); lean_dec(x_89); lean_ctor_set(x_13, 1, x_88); lean_ctor_set(x_13, 0, x_91); x_17 = x_13; goto block_39; } } else { lean_object* x_92; lean_object* x_93; uint8_t x_94; x_92 = l_Lean_Syntax_getArg(x_85, x_79); x_93 = l_Lean_identKind___closed__2; lean_inc(x_92); x_94 = l_Lean_Syntax_isOfKind(x_92, x_93); if (x_94 == 0) { lean_object* x_95; lean_object* x_96; lean_dec(x_92); lean_dec(x_85); x_95 = l_Lean_Syntax_getArg(x_84, x_79); lean_dec(x_84); x_96 = l_Lean_Syntax_isIdOrAtom_x3f(x_95); if (lean_obj_tag(x_96) == 0) { lean_object* x_97; x_97 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; lean_ctor_set(x_13, 1, x_95); lean_ctor_set(x_13, 0, x_97); x_17 = x_13; goto block_39; } else { lean_object* x_98; x_98 = lean_ctor_get(x_96, 0); lean_inc(x_98); lean_dec(x_96); lean_ctor_set(x_13, 1, x_95); lean_ctor_set(x_13, 0, x_98); x_17 = x_13; goto block_39; } } else { lean_object* x_99; uint8_t x_100; x_99 = l_Lean_Syntax_getArg(x_85, x_83); lean_dec(x_85); x_100 = l_Lean_Syntax_isNone(x_99); if (x_100 == 0) { lean_object* x_101; lean_object* x_102; uint8_t x_103; x_101 = l_Lean_nullKind; x_102 = lean_unsigned_to_nat(3u); lean_inc(x_99); x_103 = l_Lean_Syntax_isNodeOf(x_99, x_101, x_102); if (x_103 == 0) { lean_object* x_104; lean_object* x_105; lean_dec(x_99); lean_dec(x_92); x_104 = l_Lean_Syntax_getArg(x_84, x_79); lean_dec(x_84); x_105 = l_Lean_Syntax_isIdOrAtom_x3f(x_104); if (lean_obj_tag(x_105) == 0) { lean_object* x_106; x_106 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; lean_ctor_set(x_13, 1, x_104); lean_ctor_set(x_13, 0, x_106); x_17 = x_13; goto block_39; } else { lean_object* x_107; x_107 = lean_ctor_get(x_105, 0); lean_inc(x_107); lean_dec(x_105); lean_ctor_set(x_13, 1, x_104); lean_ctor_set(x_13, 0, x_107); x_17 = x_13; goto block_39; } } else { lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_dec(x_84); lean_free_object(x_13); x_108 = l_Lean_Syntax_getArg(x_99, x_83); lean_dec(x_99); x_109 = l_Lean_Syntax_getArgs(x_108); lean_dec(x_108); x_110 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_110, 0, x_109); x_111 = lean_box(0); x_112 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_92, x_111, x_110); lean_dec(x_110); x_17 = x_112; goto block_39; } } else { lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_dec(x_99); lean_dec(x_84); lean_free_object(x_13); x_113 = lean_box(0); x_114 = lean_box(0); x_115 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_92, x_114, x_113); x_17 = x_115; goto block_39; } } } } else { lean_object* x_116; lean_object* x_117; lean_object* x_118; uint8_t x_119; x_116 = lean_unsigned_to_nat(1u); x_117 = l_Lean_Syntax_getArg(x_4, x_116); x_118 = l_myMacro____x40_Init_NotationExtra___hyg_5711____closed__21; lean_inc(x_117); x_119 = l_Lean_Syntax_isOfKind(x_117, x_118); if (x_119 == 0) { lean_object* x_120; lean_object* x_121; lean_object* x_122; uint8_t x_123; lean_dec(x_117); x_120 = l_Lean_Syntax_getArg(x_4, x_116); x_121 = l_Lean_Syntax_getArg(x_120, x_116); x_122 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__22; lean_inc(x_121); x_123 = l_Lean_Syntax_isOfKind(x_121, x_122); if (x_123 == 0) { lean_object* x_124; lean_object* x_125; lean_dec(x_121); x_124 = l_Lean_Syntax_getArg(x_120, x_79); lean_dec(x_120); x_125 = l_Lean_Syntax_isIdOrAtom_x3f(x_124); if (lean_obj_tag(x_125) == 0) { lean_object* x_126; x_126 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; lean_ctor_set(x_13, 1, x_124); lean_ctor_set(x_13, 0, x_126); x_17 = x_13; goto block_39; } else { lean_object* x_127; x_127 = lean_ctor_get(x_125, 0); lean_inc(x_127); lean_dec(x_125); lean_ctor_set(x_13, 1, x_124); lean_ctor_set(x_13, 0, x_127); x_17 = x_13; goto block_39; } } else { lean_object* x_128; lean_object* x_129; uint8_t x_130; x_128 = l_Lean_Syntax_getArg(x_121, x_79); x_129 = l_Lean_identKind___closed__2; lean_inc(x_128); x_130 = l_Lean_Syntax_isOfKind(x_128, x_129); if (x_130 == 0) { lean_object* x_131; lean_object* x_132; lean_dec(x_128); lean_dec(x_121); x_131 = l_Lean_Syntax_getArg(x_120, x_79); lean_dec(x_120); x_132 = l_Lean_Syntax_isIdOrAtom_x3f(x_131); if (lean_obj_tag(x_132) == 0) { lean_object* x_133; x_133 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; lean_ctor_set(x_13, 1, x_131); lean_ctor_set(x_13, 0, x_133); x_17 = x_13; goto block_39; } else { lean_object* x_134; x_134 = lean_ctor_get(x_132, 0); lean_inc(x_134); lean_dec(x_132); lean_ctor_set(x_13, 1, x_131); lean_ctor_set(x_13, 0, x_134); x_17 = x_13; goto block_39; } } else { lean_object* x_135; uint8_t x_136; x_135 = l_Lean_Syntax_getArg(x_121, x_116); lean_dec(x_121); x_136 = l_Lean_Syntax_isNone(x_135); if (x_136 == 0) { lean_object* x_137; lean_object* x_138; uint8_t x_139; x_137 = l_Lean_nullKind; x_138 = lean_unsigned_to_nat(3u); lean_inc(x_135); x_139 = l_Lean_Syntax_isNodeOf(x_135, x_137, x_138); if (x_139 == 0) { lean_object* x_140; lean_object* x_141; lean_dec(x_135); lean_dec(x_128); x_140 = l_Lean_Syntax_getArg(x_120, x_79); lean_dec(x_120); x_141 = l_Lean_Syntax_isIdOrAtom_x3f(x_140); if (lean_obj_tag(x_141) == 0) { lean_object* x_142; x_142 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; lean_ctor_set(x_13, 1, x_140); lean_ctor_set(x_13, 0, x_142); x_17 = x_13; goto block_39; } else { lean_object* x_143; x_143 = lean_ctor_get(x_141, 0); lean_inc(x_143); lean_dec(x_141); lean_ctor_set(x_13, 1, x_140); lean_ctor_set(x_13, 0, x_143); x_17 = x_13; goto block_39; } } else { lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_dec(x_120); lean_free_object(x_13); x_144 = l_Lean_Syntax_getArg(x_135, x_116); lean_dec(x_135); x_145 = l_Lean_Syntax_getArgs(x_144); lean_dec(x_144); x_146 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_146, 0, x_145); x_147 = lean_box(0); x_148 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_128, x_147, x_146); lean_dec(x_146); x_17 = x_148; goto block_39; } } else { lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_dec(x_135); lean_dec(x_120); lean_free_object(x_13); x_149 = lean_box(0); x_150 = lean_box(0); x_151 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_128, x_150, x_149); x_17 = x_151; goto block_39; } } } } else { lean_object* x_152; lean_object* x_153; uint8_t x_154; x_152 = l_Lean_Syntax_getArg(x_117, x_79); x_153 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__1; x_154 = l_Lean_Syntax_isOfKind(x_152, x_153); if (x_154 == 0) { lean_object* x_155; lean_object* x_156; lean_object* x_157; uint8_t x_158; lean_dec(x_117); x_155 = l_Lean_Syntax_getArg(x_4, x_116); x_156 = l_Lean_Syntax_getArg(x_155, x_116); x_157 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__22; lean_inc(x_156); x_158 = l_Lean_Syntax_isOfKind(x_156, x_157); if (x_158 == 0) { lean_object* x_159; lean_object* x_160; lean_dec(x_156); x_159 = l_Lean_Syntax_getArg(x_155, x_79); lean_dec(x_155); x_160 = l_Lean_Syntax_isIdOrAtom_x3f(x_159); if (lean_obj_tag(x_160) == 0) { lean_object* x_161; x_161 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; lean_ctor_set(x_13, 1, x_159); lean_ctor_set(x_13, 0, x_161); x_17 = x_13; goto block_39; } else { lean_object* x_162; x_162 = lean_ctor_get(x_160, 0); lean_inc(x_162); lean_dec(x_160); lean_ctor_set(x_13, 1, x_159); lean_ctor_set(x_13, 0, x_162); x_17 = x_13; goto block_39; } } else { lean_object* x_163; lean_object* x_164; uint8_t x_165; x_163 = l_Lean_Syntax_getArg(x_156, x_79); x_164 = l_Lean_identKind___closed__2; lean_inc(x_163); x_165 = l_Lean_Syntax_isOfKind(x_163, x_164); if (x_165 == 0) { lean_object* x_166; lean_object* x_167; lean_dec(x_163); lean_dec(x_156); x_166 = l_Lean_Syntax_getArg(x_155, x_79); lean_dec(x_155); x_167 = l_Lean_Syntax_isIdOrAtom_x3f(x_166); if (lean_obj_tag(x_167) == 0) { lean_object* x_168; x_168 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; lean_ctor_set(x_13, 1, x_166); lean_ctor_set(x_13, 0, x_168); x_17 = x_13; goto block_39; } else { lean_object* x_169; x_169 = lean_ctor_get(x_167, 0); lean_inc(x_169); lean_dec(x_167); lean_ctor_set(x_13, 1, x_166); lean_ctor_set(x_13, 0, x_169); x_17 = x_13; goto block_39; } } else { lean_object* x_170; uint8_t x_171; x_170 = l_Lean_Syntax_getArg(x_156, x_116); lean_dec(x_156); x_171 = l_Lean_Syntax_isNone(x_170); if (x_171 == 0) { lean_object* x_172; lean_object* x_173; uint8_t x_174; x_172 = l_Lean_nullKind; x_173 = lean_unsigned_to_nat(3u); lean_inc(x_170); x_174 = l_Lean_Syntax_isNodeOf(x_170, x_172, x_173); if (x_174 == 0) { lean_object* x_175; lean_object* x_176; lean_dec(x_170); lean_dec(x_163); x_175 = l_Lean_Syntax_getArg(x_155, x_79); lean_dec(x_155); x_176 = l_Lean_Syntax_isIdOrAtom_x3f(x_175); if (lean_obj_tag(x_176) == 0) { lean_object* x_177; x_177 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; lean_ctor_set(x_13, 1, x_175); lean_ctor_set(x_13, 0, x_177); x_17 = x_13; goto block_39; } else { lean_object* x_178; x_178 = lean_ctor_get(x_176, 0); lean_inc(x_178); lean_dec(x_176); lean_ctor_set(x_13, 1, x_175); lean_ctor_set(x_13, 0, x_178); x_17 = x_13; goto block_39; } } else { lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_dec(x_155); lean_free_object(x_13); x_179 = l_Lean_Syntax_getArg(x_170, x_116); lean_dec(x_170); x_180 = l_Lean_Syntax_getArgs(x_179); lean_dec(x_179); x_181 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_181, 0, x_180); x_182 = lean_box(0); x_183 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_163, x_182, x_181); lean_dec(x_181); x_17 = x_183; goto block_39; } } else { lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_dec(x_170); lean_dec(x_155); lean_free_object(x_13); x_184 = lean_box(0); x_185 = lean_box(0); x_186 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_163, x_185, x_184); x_17 = x_186; goto block_39; } } } } else { lean_object* x_187; lean_object* x_188; uint8_t x_189; x_187 = lean_unsigned_to_nat(2u); x_188 = l_Lean_Syntax_getArg(x_117, x_187); x_189 = l_Lean_Syntax_isNone(x_188); if (x_189 == 0) { lean_object* x_190; uint8_t x_191; x_190 = l_Lean_nullKind; lean_inc(x_188); x_191 = l_Lean_Syntax_isNodeOf(x_188, x_190, x_116); if (x_191 == 0) { lean_object* x_192; lean_object* x_193; lean_object* x_194; uint8_t x_195; lean_dec(x_188); lean_dec(x_117); x_192 = l_Lean_Syntax_getArg(x_4, x_116); x_193 = l_Lean_Syntax_getArg(x_192, x_116); x_194 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__22; lean_inc(x_193); x_195 = l_Lean_Syntax_isOfKind(x_193, x_194); if (x_195 == 0) { lean_object* x_196; lean_object* x_197; lean_dec(x_193); x_196 = l_Lean_Syntax_getArg(x_192, x_79); lean_dec(x_192); x_197 = l_Lean_Syntax_isIdOrAtom_x3f(x_196); if (lean_obj_tag(x_197) == 0) { lean_object* x_198; x_198 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; lean_ctor_set(x_13, 1, x_196); lean_ctor_set(x_13, 0, x_198); x_17 = x_13; goto block_39; } else { lean_object* x_199; x_199 = lean_ctor_get(x_197, 0); lean_inc(x_199); lean_dec(x_197); lean_ctor_set(x_13, 1, x_196); lean_ctor_set(x_13, 0, x_199); x_17 = x_13; goto block_39; } } else { lean_object* x_200; lean_object* x_201; uint8_t x_202; x_200 = l_Lean_Syntax_getArg(x_193, x_79); x_201 = l_Lean_identKind___closed__2; lean_inc(x_200); x_202 = l_Lean_Syntax_isOfKind(x_200, x_201); if (x_202 == 0) { lean_object* x_203; lean_object* x_204; lean_dec(x_200); lean_dec(x_193); x_203 = l_Lean_Syntax_getArg(x_192, x_79); lean_dec(x_192); x_204 = l_Lean_Syntax_isIdOrAtom_x3f(x_203); if (lean_obj_tag(x_204) == 0) { lean_object* x_205; x_205 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; lean_ctor_set(x_13, 1, x_203); lean_ctor_set(x_13, 0, x_205); x_17 = x_13; goto block_39; } else { lean_object* x_206; x_206 = lean_ctor_get(x_204, 0); lean_inc(x_206); lean_dec(x_204); lean_ctor_set(x_13, 1, x_203); lean_ctor_set(x_13, 0, x_206); x_17 = x_13; goto block_39; } } else { lean_object* x_207; uint8_t x_208; x_207 = l_Lean_Syntax_getArg(x_193, x_116); lean_dec(x_193); x_208 = l_Lean_Syntax_isNone(x_207); if (x_208 == 0) { lean_object* x_209; uint8_t x_210; x_209 = lean_unsigned_to_nat(3u); lean_inc(x_207); x_210 = l_Lean_Syntax_isNodeOf(x_207, x_190, x_209); if (x_210 == 0) { lean_object* x_211; lean_object* x_212; lean_dec(x_207); lean_dec(x_200); x_211 = l_Lean_Syntax_getArg(x_192, x_79); lean_dec(x_192); x_212 = l_Lean_Syntax_isIdOrAtom_x3f(x_211); if (lean_obj_tag(x_212) == 0) { lean_object* x_213; x_213 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; lean_ctor_set(x_13, 1, x_211); lean_ctor_set(x_13, 0, x_213); x_17 = x_13; goto block_39; } else { lean_object* x_214; x_214 = lean_ctor_get(x_212, 0); lean_inc(x_214); lean_dec(x_212); lean_ctor_set(x_13, 1, x_211); lean_ctor_set(x_13, 0, x_214); x_17 = x_13; goto block_39; } } else { lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_dec(x_192); lean_free_object(x_13); x_215 = l_Lean_Syntax_getArg(x_207, x_116); lean_dec(x_207); x_216 = l_Lean_Syntax_getArgs(x_215); lean_dec(x_215); x_217 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_217, 0, x_216); x_218 = lean_box(0); x_219 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_200, x_218, x_217); lean_dec(x_217); x_17 = x_219; goto block_39; } } else { lean_object* x_220; lean_object* x_221; lean_object* x_222; lean_dec(x_207); lean_dec(x_192); lean_free_object(x_13); x_220 = lean_box(0); x_221 = lean_box(0); x_222 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_200, x_221, x_220); x_17 = x_222; goto block_39; } } } } else { lean_object* x_223; lean_object* x_224; uint8_t x_225; x_223 = l_Lean_Syntax_getArg(x_188, x_79); lean_dec(x_188); x_224 = l_Lean_Parser_Command_namedPrio___elambda__1___closed__2; lean_inc(x_223); x_225 = l_Lean_Syntax_isOfKind(x_223, x_224); if (x_225 == 0) { lean_object* x_226; lean_object* x_227; lean_object* x_228; uint8_t x_229; lean_dec(x_223); lean_dec(x_117); x_226 = l_Lean_Syntax_getArg(x_4, x_116); x_227 = l_Lean_Syntax_getArg(x_226, x_116); x_228 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__22; lean_inc(x_227); x_229 = l_Lean_Syntax_isOfKind(x_227, x_228); if (x_229 == 0) { lean_object* x_230; lean_object* x_231; lean_dec(x_227); x_230 = l_Lean_Syntax_getArg(x_226, x_79); lean_dec(x_226); x_231 = l_Lean_Syntax_isIdOrAtom_x3f(x_230); if (lean_obj_tag(x_231) == 0) { lean_object* x_232; x_232 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; lean_ctor_set(x_13, 1, x_230); lean_ctor_set(x_13, 0, x_232); x_17 = x_13; goto block_39; } else { lean_object* x_233; x_233 = lean_ctor_get(x_231, 0); lean_inc(x_233); lean_dec(x_231); lean_ctor_set(x_13, 1, x_230); lean_ctor_set(x_13, 0, x_233); x_17 = x_13; goto block_39; } } else { lean_object* x_234; lean_object* x_235; uint8_t x_236; x_234 = l_Lean_Syntax_getArg(x_227, x_79); x_235 = l_Lean_identKind___closed__2; lean_inc(x_234); x_236 = l_Lean_Syntax_isOfKind(x_234, x_235); if (x_236 == 0) { lean_object* x_237; lean_object* x_238; lean_dec(x_234); lean_dec(x_227); x_237 = l_Lean_Syntax_getArg(x_226, x_79); lean_dec(x_226); x_238 = l_Lean_Syntax_isIdOrAtom_x3f(x_237); if (lean_obj_tag(x_238) == 0) { lean_object* x_239; x_239 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; lean_ctor_set(x_13, 1, x_237); lean_ctor_set(x_13, 0, x_239); x_17 = x_13; goto block_39; } else { lean_object* x_240; x_240 = lean_ctor_get(x_238, 0); lean_inc(x_240); lean_dec(x_238); lean_ctor_set(x_13, 1, x_237); lean_ctor_set(x_13, 0, x_240); x_17 = x_13; goto block_39; } } else { lean_object* x_241; uint8_t x_242; x_241 = l_Lean_Syntax_getArg(x_227, x_116); lean_dec(x_227); x_242 = l_Lean_Syntax_isNone(x_241); if (x_242 == 0) { lean_object* x_243; uint8_t x_244; x_243 = lean_unsigned_to_nat(3u); lean_inc(x_241); x_244 = l_Lean_Syntax_isNodeOf(x_241, x_190, x_243); if (x_244 == 0) { lean_object* x_245; lean_object* x_246; lean_dec(x_241); lean_dec(x_234); x_245 = l_Lean_Syntax_getArg(x_226, x_79); lean_dec(x_226); x_246 = l_Lean_Syntax_isIdOrAtom_x3f(x_245); if (lean_obj_tag(x_246) == 0) { lean_object* x_247; x_247 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; lean_ctor_set(x_13, 1, x_245); lean_ctor_set(x_13, 0, x_247); x_17 = x_13; goto block_39; } else { lean_object* x_248; x_248 = lean_ctor_get(x_246, 0); lean_inc(x_248); lean_dec(x_246); lean_ctor_set(x_13, 1, x_245); lean_ctor_set(x_13, 0, x_248); x_17 = x_13; goto block_39; } } else { lean_object* x_249; lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_dec(x_226); lean_free_object(x_13); x_249 = l_Lean_Syntax_getArg(x_241, x_116); lean_dec(x_241); x_250 = l_Lean_Syntax_getArgs(x_249); lean_dec(x_249); x_251 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_251, 0, x_250); x_252 = lean_box(0); x_253 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_234, x_252, x_251); lean_dec(x_251); x_17 = x_253; goto block_39; } } else { lean_object* x_254; lean_object* x_255; lean_object* x_256; lean_dec(x_241); lean_dec(x_226); lean_free_object(x_13); x_254 = lean_box(0); x_255 = lean_box(0); x_256 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_234, x_255, x_254); x_17 = x_256; goto block_39; } } } } else { lean_object* x_257; lean_object* x_258; lean_object* x_259; lean_object* x_260; lean_free_object(x_13); x_257 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_257, 0, x_223); x_258 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__3; x_259 = lean_box(0); lean_inc(x_4); x_260 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__4(x_117, x_258, x_4, x_259, x_257); lean_dec(x_257); x_17 = x_260; goto block_39; } } } else { lean_object* x_261; lean_object* x_262; lean_object* x_263; lean_object* x_264; lean_dec(x_188); lean_free_object(x_13); x_261 = lean_box(0); x_262 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__3; x_263 = lean_box(0); lean_inc(x_4); x_264 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__4(x_117, x_262, x_4, x_263, x_261); x_17 = x_264; goto block_39; } } } } } } } block_39: { uint8_t x_18; x_18 = !lean_is_exclusive(x_17); if (x_18 == 0) { lean_object* x_19; lean_object* x_20; uint8_t x_21; x_19 = lean_ctor_get(x_17, 0); x_20 = lean_ctor_get(x_17, 1); x_21 = l_Lean_Server_FileWorker_hasRange(x_20); if (x_21 == 0) { lean_dec(x_20); lean_dec(x_19); lean_dec(x_6); lean_dec(x_4); lean_ctor_set(x_17, 1, x_16); lean_ctor_set(x_17, 0, x_15); return x_17; } else { lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; lean_object* x_26; lean_object* x_27; x_22 = lean_box(0); x_23 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_1, x_4); lean_dec(x_4); x_24 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_1, x_20); lean_dec(x_20); x_25 = 5; x_26 = lean_alloc_ctor(0, 5, 1); lean_ctor_set(x_26, 0, x_19); lean_ctor_set(x_26, 1, x_22); lean_ctor_set(x_26, 2, x_23); lean_ctor_set(x_26, 3, x_24); lean_ctor_set(x_26, 4, x_22); lean_ctor_set_uint8(x_26, sizeof(void*)*5, x_25); if (lean_is_scalar(x_6)) { x_27 = lean_alloc_ctor(1, 2, 0); } else { x_27 = x_6; } lean_ctor_set(x_27, 0, x_26); lean_ctor_set(x_27, 1, x_15); lean_ctor_set(x_17, 1, x_16); lean_ctor_set(x_17, 0, x_27); return x_17; } } else { lean_object* x_28; lean_object* x_29; uint8_t x_30; x_28 = lean_ctor_get(x_17, 0); x_29 = lean_ctor_get(x_17, 1); lean_inc(x_29); lean_inc(x_28); lean_dec(x_17); x_30 = l_Lean_Server_FileWorker_hasRange(x_29); if (x_30 == 0) { lean_object* x_31; lean_dec(x_29); lean_dec(x_28); lean_dec(x_6); lean_dec(x_4); x_31 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_31, 0, x_15); lean_ctor_set(x_31, 1, x_16); return x_31; } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; x_32 = lean_box(0); x_33 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_1, x_4); lean_dec(x_4); x_34 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_1, x_29); lean_dec(x_29); x_35 = 5; x_36 = lean_alloc_ctor(0, 5, 1); lean_ctor_set(x_36, 0, x_28); lean_ctor_set(x_36, 1, x_32); lean_ctor_set(x_36, 2, x_33); lean_ctor_set(x_36, 3, x_34); lean_ctor_set(x_36, 4, x_32); lean_ctor_set_uint8(x_36, sizeof(void*)*5, x_35); if (lean_is_scalar(x_6)) { x_37 = lean_alloc_ctor(1, 2, 0); } else { x_37 = x_6; } lean_ctor_set(x_37, 0, x_36); lean_ctor_set(x_37, 1, x_15); x_38 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_38, 0, x_37); lean_ctor_set(x_38, 1, x_16); return x_38; } } } } else { lean_object* x_265; lean_object* x_266; lean_object* x_267; lean_object* x_281; uint8_t x_282; x_265 = lean_ctor_get(x_13, 0); x_266 = lean_ctor_get(x_13, 1); lean_inc(x_266); lean_inc(x_265); lean_dec(x_13); x_281 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__5; lean_inc(x_4); x_282 = l_Lean_Syntax_isOfKind(x_4, x_281); if (x_282 == 0) { lean_object* x_283; lean_dec(x_6); lean_dec(x_4); x_283 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_283, 0, x_265); lean_ctor_set(x_283, 1, x_266); return x_283; } else { uint8_t x_284; x_284 = l_Lean_Server_FileWorker_hasRange(x_4); if (x_284 == 0) { lean_object* x_285; lean_dec(x_6); lean_dec(x_4); x_285 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_285, 0, x_265); lean_ctor_set(x_285, 1, x_266); return x_285; } else { uint8_t x_286; lean_inc(x_4); x_286 = l_Lean_Syntax_isOfKind(x_4, x_281); if (x_286 == 0) { lean_object* x_287; lean_object* x_288; lean_object* x_289; lean_object* x_290; uint8_t x_291; x_287 = lean_unsigned_to_nat(1u); x_288 = l_Lean_Syntax_getArg(x_4, x_287); x_289 = l_Lean_Syntax_getArg(x_288, x_287); x_290 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__22; lean_inc(x_289); x_291 = l_Lean_Syntax_isOfKind(x_289, x_290); if (x_291 == 0) { lean_object* x_292; lean_object* x_293; lean_object* x_294; lean_dec(x_289); x_292 = lean_unsigned_to_nat(0u); x_293 = l_Lean_Syntax_getArg(x_288, x_292); lean_dec(x_288); x_294 = l_Lean_Syntax_isIdOrAtom_x3f(x_293); if (lean_obj_tag(x_294) == 0) { lean_object* x_295; lean_object* x_296; x_295 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_296 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_296, 0, x_295); lean_ctor_set(x_296, 1, x_293); x_267 = x_296; goto block_280; } else { lean_object* x_297; lean_object* x_298; x_297 = lean_ctor_get(x_294, 0); lean_inc(x_297); lean_dec(x_294); x_298 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_298, 0, x_297); lean_ctor_set(x_298, 1, x_293); x_267 = x_298; goto block_280; } } else { lean_object* x_299; lean_object* x_300; lean_object* x_301; uint8_t x_302; x_299 = lean_unsigned_to_nat(0u); x_300 = l_Lean_Syntax_getArg(x_289, x_299); x_301 = l_Lean_identKind___closed__2; lean_inc(x_300); x_302 = l_Lean_Syntax_isOfKind(x_300, x_301); if (x_302 == 0) { lean_object* x_303; lean_object* x_304; lean_dec(x_300); lean_dec(x_289); x_303 = l_Lean_Syntax_getArg(x_288, x_299); lean_dec(x_288); x_304 = l_Lean_Syntax_isIdOrAtom_x3f(x_303); if (lean_obj_tag(x_304) == 0) { lean_object* x_305; lean_object* x_306; x_305 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_306 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_306, 0, x_305); lean_ctor_set(x_306, 1, x_303); x_267 = x_306; goto block_280; } else { lean_object* x_307; lean_object* x_308; x_307 = lean_ctor_get(x_304, 0); lean_inc(x_307); lean_dec(x_304); x_308 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_308, 0, x_307); lean_ctor_set(x_308, 1, x_303); x_267 = x_308; goto block_280; } } else { lean_object* x_309; uint8_t x_310; x_309 = l_Lean_Syntax_getArg(x_289, x_287); lean_dec(x_289); x_310 = l_Lean_Syntax_isNone(x_309); if (x_310 == 0) { lean_object* x_311; lean_object* x_312; uint8_t x_313; x_311 = l_Lean_nullKind; x_312 = lean_unsigned_to_nat(3u); lean_inc(x_309); x_313 = l_Lean_Syntax_isNodeOf(x_309, x_311, x_312); if (x_313 == 0) { lean_object* x_314; lean_object* x_315; lean_dec(x_309); lean_dec(x_300); x_314 = l_Lean_Syntax_getArg(x_288, x_299); lean_dec(x_288); x_315 = l_Lean_Syntax_isIdOrAtom_x3f(x_314); if (lean_obj_tag(x_315) == 0) { lean_object* x_316; lean_object* x_317; x_316 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_317 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_317, 0, x_316); lean_ctor_set(x_317, 1, x_314); x_267 = x_317; goto block_280; } else { lean_object* x_318; lean_object* x_319; x_318 = lean_ctor_get(x_315, 0); lean_inc(x_318); lean_dec(x_315); x_319 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_319, 0, x_318); lean_ctor_set(x_319, 1, x_314); x_267 = x_319; goto block_280; } } else { lean_object* x_320; lean_object* x_321; lean_object* x_322; lean_object* x_323; lean_object* x_324; lean_dec(x_288); x_320 = l_Lean_Syntax_getArg(x_309, x_287); lean_dec(x_309); x_321 = l_Lean_Syntax_getArgs(x_320); lean_dec(x_320); x_322 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_322, 0, x_321); x_323 = lean_box(0); x_324 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_300, x_323, x_322); lean_dec(x_322); x_267 = x_324; goto block_280; } } else { lean_object* x_325; lean_object* x_326; lean_object* x_327; lean_dec(x_309); lean_dec(x_288); x_325 = lean_box(0); x_326 = lean_box(0); x_327 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_300, x_326, x_325); x_267 = x_327; goto block_280; } } } } else { lean_object* x_328; lean_object* x_329; lean_object* x_330; uint8_t x_331; x_328 = lean_unsigned_to_nat(0u); x_329 = l_Lean_Syntax_getArg(x_4, x_328); x_330 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__7; x_331 = l_Lean_Syntax_isOfKind(x_329, x_330); if (x_331 == 0) { lean_object* x_332; lean_object* x_333; lean_object* x_334; lean_object* x_335; uint8_t x_336; x_332 = lean_unsigned_to_nat(1u); x_333 = l_Lean_Syntax_getArg(x_4, x_332); x_334 = l_Lean_Syntax_getArg(x_333, x_332); x_335 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__22; lean_inc(x_334); x_336 = l_Lean_Syntax_isOfKind(x_334, x_335); if (x_336 == 0) { lean_object* x_337; lean_object* x_338; lean_dec(x_334); x_337 = l_Lean_Syntax_getArg(x_333, x_328); lean_dec(x_333); x_338 = l_Lean_Syntax_isIdOrAtom_x3f(x_337); if (lean_obj_tag(x_338) == 0) { lean_object* x_339; lean_object* x_340; x_339 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_340 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_340, 0, x_339); lean_ctor_set(x_340, 1, x_337); x_267 = x_340; goto block_280; } else { lean_object* x_341; lean_object* x_342; x_341 = lean_ctor_get(x_338, 0); lean_inc(x_341); lean_dec(x_338); x_342 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_342, 0, x_341); lean_ctor_set(x_342, 1, x_337); x_267 = x_342; goto block_280; } } else { lean_object* x_343; lean_object* x_344; uint8_t x_345; x_343 = l_Lean_Syntax_getArg(x_334, x_328); x_344 = l_Lean_identKind___closed__2; lean_inc(x_343); x_345 = l_Lean_Syntax_isOfKind(x_343, x_344); if (x_345 == 0) { lean_object* x_346; lean_object* x_347; lean_dec(x_343); lean_dec(x_334); x_346 = l_Lean_Syntax_getArg(x_333, x_328); lean_dec(x_333); x_347 = l_Lean_Syntax_isIdOrAtom_x3f(x_346); if (lean_obj_tag(x_347) == 0) { lean_object* x_348; lean_object* x_349; x_348 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_349 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_349, 0, x_348); lean_ctor_set(x_349, 1, x_346); x_267 = x_349; goto block_280; } else { lean_object* x_350; lean_object* x_351; x_350 = lean_ctor_get(x_347, 0); lean_inc(x_350); lean_dec(x_347); x_351 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_351, 0, x_350); lean_ctor_set(x_351, 1, x_346); x_267 = x_351; goto block_280; } } else { lean_object* x_352; uint8_t x_353; x_352 = l_Lean_Syntax_getArg(x_334, x_332); lean_dec(x_334); x_353 = l_Lean_Syntax_isNone(x_352); if (x_353 == 0) { lean_object* x_354; lean_object* x_355; uint8_t x_356; x_354 = l_Lean_nullKind; x_355 = lean_unsigned_to_nat(3u); lean_inc(x_352); x_356 = l_Lean_Syntax_isNodeOf(x_352, x_354, x_355); if (x_356 == 0) { lean_object* x_357; lean_object* x_358; lean_dec(x_352); lean_dec(x_343); x_357 = l_Lean_Syntax_getArg(x_333, x_328); lean_dec(x_333); x_358 = l_Lean_Syntax_isIdOrAtom_x3f(x_357); if (lean_obj_tag(x_358) == 0) { lean_object* x_359; lean_object* x_360; x_359 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_360 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_360, 0, x_359); lean_ctor_set(x_360, 1, x_357); x_267 = x_360; goto block_280; } else { lean_object* x_361; lean_object* x_362; x_361 = lean_ctor_get(x_358, 0); lean_inc(x_361); lean_dec(x_358); x_362 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_362, 0, x_361); lean_ctor_set(x_362, 1, x_357); x_267 = x_362; goto block_280; } } else { lean_object* x_363; lean_object* x_364; lean_object* x_365; lean_object* x_366; lean_object* x_367; lean_dec(x_333); x_363 = l_Lean_Syntax_getArg(x_352, x_332); lean_dec(x_352); x_364 = l_Lean_Syntax_getArgs(x_363); lean_dec(x_363); x_365 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_365, 0, x_364); x_366 = lean_box(0); x_367 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_343, x_366, x_365); lean_dec(x_365); x_267 = x_367; goto block_280; } } else { lean_object* x_368; lean_object* x_369; lean_object* x_370; lean_dec(x_352); lean_dec(x_333); x_368 = lean_box(0); x_369 = lean_box(0); x_370 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_343, x_369, x_368); x_267 = x_370; goto block_280; } } } } else { lean_object* x_371; lean_object* x_372; lean_object* x_373; uint8_t x_374; x_371 = lean_unsigned_to_nat(1u); x_372 = l_Lean_Syntax_getArg(x_4, x_371); x_373 = l_myMacro____x40_Init_NotationExtra___hyg_5711____closed__21; lean_inc(x_372); x_374 = l_Lean_Syntax_isOfKind(x_372, x_373); if (x_374 == 0) { lean_object* x_375; lean_object* x_376; lean_object* x_377; uint8_t x_378; lean_dec(x_372); x_375 = l_Lean_Syntax_getArg(x_4, x_371); x_376 = l_Lean_Syntax_getArg(x_375, x_371); x_377 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__22; lean_inc(x_376); x_378 = l_Lean_Syntax_isOfKind(x_376, x_377); if (x_378 == 0) { lean_object* x_379; lean_object* x_380; lean_dec(x_376); x_379 = l_Lean_Syntax_getArg(x_375, x_328); lean_dec(x_375); x_380 = l_Lean_Syntax_isIdOrAtom_x3f(x_379); if (lean_obj_tag(x_380) == 0) { lean_object* x_381; lean_object* x_382; x_381 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_382 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_382, 0, x_381); lean_ctor_set(x_382, 1, x_379); x_267 = x_382; goto block_280; } else { lean_object* x_383; lean_object* x_384; x_383 = lean_ctor_get(x_380, 0); lean_inc(x_383); lean_dec(x_380); x_384 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_384, 0, x_383); lean_ctor_set(x_384, 1, x_379); x_267 = x_384; goto block_280; } } else { lean_object* x_385; lean_object* x_386; uint8_t x_387; x_385 = l_Lean_Syntax_getArg(x_376, x_328); x_386 = l_Lean_identKind___closed__2; lean_inc(x_385); x_387 = l_Lean_Syntax_isOfKind(x_385, x_386); if (x_387 == 0) { lean_object* x_388; lean_object* x_389; lean_dec(x_385); lean_dec(x_376); x_388 = l_Lean_Syntax_getArg(x_375, x_328); lean_dec(x_375); x_389 = l_Lean_Syntax_isIdOrAtom_x3f(x_388); if (lean_obj_tag(x_389) == 0) { lean_object* x_390; lean_object* x_391; x_390 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_391 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_391, 0, x_390); lean_ctor_set(x_391, 1, x_388); x_267 = x_391; goto block_280; } else { lean_object* x_392; lean_object* x_393; x_392 = lean_ctor_get(x_389, 0); lean_inc(x_392); lean_dec(x_389); x_393 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_393, 0, x_392); lean_ctor_set(x_393, 1, x_388); x_267 = x_393; goto block_280; } } else { lean_object* x_394; uint8_t x_395; x_394 = l_Lean_Syntax_getArg(x_376, x_371); lean_dec(x_376); x_395 = l_Lean_Syntax_isNone(x_394); if (x_395 == 0) { lean_object* x_396; lean_object* x_397; uint8_t x_398; x_396 = l_Lean_nullKind; x_397 = lean_unsigned_to_nat(3u); lean_inc(x_394); x_398 = l_Lean_Syntax_isNodeOf(x_394, x_396, x_397); if (x_398 == 0) { lean_object* x_399; lean_object* x_400; lean_dec(x_394); lean_dec(x_385); x_399 = l_Lean_Syntax_getArg(x_375, x_328); lean_dec(x_375); x_400 = l_Lean_Syntax_isIdOrAtom_x3f(x_399); if (lean_obj_tag(x_400) == 0) { lean_object* x_401; lean_object* x_402; x_401 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_402 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_402, 0, x_401); lean_ctor_set(x_402, 1, x_399); x_267 = x_402; goto block_280; } else { lean_object* x_403; lean_object* x_404; x_403 = lean_ctor_get(x_400, 0); lean_inc(x_403); lean_dec(x_400); x_404 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_404, 0, x_403); lean_ctor_set(x_404, 1, x_399); x_267 = x_404; goto block_280; } } else { lean_object* x_405; lean_object* x_406; lean_object* x_407; lean_object* x_408; lean_object* x_409; lean_dec(x_375); x_405 = l_Lean_Syntax_getArg(x_394, x_371); lean_dec(x_394); x_406 = l_Lean_Syntax_getArgs(x_405); lean_dec(x_405); x_407 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_407, 0, x_406); x_408 = lean_box(0); x_409 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_385, x_408, x_407); lean_dec(x_407); x_267 = x_409; goto block_280; } } else { lean_object* x_410; lean_object* x_411; lean_object* x_412; lean_dec(x_394); lean_dec(x_375); x_410 = lean_box(0); x_411 = lean_box(0); x_412 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_385, x_411, x_410); x_267 = x_412; goto block_280; } } } } else { lean_object* x_413; lean_object* x_414; uint8_t x_415; x_413 = l_Lean_Syntax_getArg(x_372, x_328); x_414 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__1; x_415 = l_Lean_Syntax_isOfKind(x_413, x_414); if (x_415 == 0) { lean_object* x_416; lean_object* x_417; lean_object* x_418; uint8_t x_419; lean_dec(x_372); x_416 = l_Lean_Syntax_getArg(x_4, x_371); x_417 = l_Lean_Syntax_getArg(x_416, x_371); x_418 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__22; lean_inc(x_417); x_419 = l_Lean_Syntax_isOfKind(x_417, x_418); if (x_419 == 0) { lean_object* x_420; lean_object* x_421; lean_dec(x_417); x_420 = l_Lean_Syntax_getArg(x_416, x_328); lean_dec(x_416); x_421 = l_Lean_Syntax_isIdOrAtom_x3f(x_420); if (lean_obj_tag(x_421) == 0) { lean_object* x_422; lean_object* x_423; x_422 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_423 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_423, 0, x_422); lean_ctor_set(x_423, 1, x_420); x_267 = x_423; goto block_280; } else { lean_object* x_424; lean_object* x_425; x_424 = lean_ctor_get(x_421, 0); lean_inc(x_424); lean_dec(x_421); x_425 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_425, 0, x_424); lean_ctor_set(x_425, 1, x_420); x_267 = x_425; goto block_280; } } else { lean_object* x_426; lean_object* x_427; uint8_t x_428; x_426 = l_Lean_Syntax_getArg(x_417, x_328); x_427 = l_Lean_identKind___closed__2; lean_inc(x_426); x_428 = l_Lean_Syntax_isOfKind(x_426, x_427); if (x_428 == 0) { lean_object* x_429; lean_object* x_430; lean_dec(x_426); lean_dec(x_417); x_429 = l_Lean_Syntax_getArg(x_416, x_328); lean_dec(x_416); x_430 = l_Lean_Syntax_isIdOrAtom_x3f(x_429); if (lean_obj_tag(x_430) == 0) { lean_object* x_431; lean_object* x_432; x_431 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_432 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_432, 0, x_431); lean_ctor_set(x_432, 1, x_429); x_267 = x_432; goto block_280; } else { lean_object* x_433; lean_object* x_434; x_433 = lean_ctor_get(x_430, 0); lean_inc(x_433); lean_dec(x_430); x_434 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_434, 0, x_433); lean_ctor_set(x_434, 1, x_429); x_267 = x_434; goto block_280; } } else { lean_object* x_435; uint8_t x_436; x_435 = l_Lean_Syntax_getArg(x_417, x_371); lean_dec(x_417); x_436 = l_Lean_Syntax_isNone(x_435); if (x_436 == 0) { lean_object* x_437; lean_object* x_438; uint8_t x_439; x_437 = l_Lean_nullKind; x_438 = lean_unsigned_to_nat(3u); lean_inc(x_435); x_439 = l_Lean_Syntax_isNodeOf(x_435, x_437, x_438); if (x_439 == 0) { lean_object* x_440; lean_object* x_441; lean_dec(x_435); lean_dec(x_426); x_440 = l_Lean_Syntax_getArg(x_416, x_328); lean_dec(x_416); x_441 = l_Lean_Syntax_isIdOrAtom_x3f(x_440); if (lean_obj_tag(x_441) == 0) { lean_object* x_442; lean_object* x_443; x_442 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_443 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_443, 0, x_442); lean_ctor_set(x_443, 1, x_440); x_267 = x_443; goto block_280; } else { lean_object* x_444; lean_object* x_445; x_444 = lean_ctor_get(x_441, 0); lean_inc(x_444); lean_dec(x_441); x_445 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_445, 0, x_444); lean_ctor_set(x_445, 1, x_440); x_267 = x_445; goto block_280; } } else { lean_object* x_446; lean_object* x_447; lean_object* x_448; lean_object* x_449; lean_object* x_450; lean_dec(x_416); x_446 = l_Lean_Syntax_getArg(x_435, x_371); lean_dec(x_435); x_447 = l_Lean_Syntax_getArgs(x_446); lean_dec(x_446); x_448 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_448, 0, x_447); x_449 = lean_box(0); x_450 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_426, x_449, x_448); lean_dec(x_448); x_267 = x_450; goto block_280; } } else { lean_object* x_451; lean_object* x_452; lean_object* x_453; lean_dec(x_435); lean_dec(x_416); x_451 = lean_box(0); x_452 = lean_box(0); x_453 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_426, x_452, x_451); x_267 = x_453; goto block_280; } } } } else { lean_object* x_454; lean_object* x_455; uint8_t x_456; x_454 = lean_unsigned_to_nat(2u); x_455 = l_Lean_Syntax_getArg(x_372, x_454); x_456 = l_Lean_Syntax_isNone(x_455); if (x_456 == 0) { lean_object* x_457; uint8_t x_458; x_457 = l_Lean_nullKind; lean_inc(x_455); x_458 = l_Lean_Syntax_isNodeOf(x_455, x_457, x_371); if (x_458 == 0) { lean_object* x_459; lean_object* x_460; lean_object* x_461; uint8_t x_462; lean_dec(x_455); lean_dec(x_372); x_459 = l_Lean_Syntax_getArg(x_4, x_371); x_460 = l_Lean_Syntax_getArg(x_459, x_371); x_461 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__22; lean_inc(x_460); x_462 = l_Lean_Syntax_isOfKind(x_460, x_461); if (x_462 == 0) { lean_object* x_463; lean_object* x_464; lean_dec(x_460); x_463 = l_Lean_Syntax_getArg(x_459, x_328); lean_dec(x_459); x_464 = l_Lean_Syntax_isIdOrAtom_x3f(x_463); if (lean_obj_tag(x_464) == 0) { lean_object* x_465; lean_object* x_466; x_465 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_466 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_466, 0, x_465); lean_ctor_set(x_466, 1, x_463); x_267 = x_466; goto block_280; } else { lean_object* x_467; lean_object* x_468; x_467 = lean_ctor_get(x_464, 0); lean_inc(x_467); lean_dec(x_464); x_468 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_468, 0, x_467); lean_ctor_set(x_468, 1, x_463); x_267 = x_468; goto block_280; } } else { lean_object* x_469; lean_object* x_470; uint8_t x_471; x_469 = l_Lean_Syntax_getArg(x_460, x_328); x_470 = l_Lean_identKind___closed__2; lean_inc(x_469); x_471 = l_Lean_Syntax_isOfKind(x_469, x_470); if (x_471 == 0) { lean_object* x_472; lean_object* x_473; lean_dec(x_469); lean_dec(x_460); x_472 = l_Lean_Syntax_getArg(x_459, x_328); lean_dec(x_459); x_473 = l_Lean_Syntax_isIdOrAtom_x3f(x_472); if (lean_obj_tag(x_473) == 0) { lean_object* x_474; lean_object* x_475; x_474 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_475 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_475, 0, x_474); lean_ctor_set(x_475, 1, x_472); x_267 = x_475; goto block_280; } else { lean_object* x_476; lean_object* x_477; x_476 = lean_ctor_get(x_473, 0); lean_inc(x_476); lean_dec(x_473); x_477 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_477, 0, x_476); lean_ctor_set(x_477, 1, x_472); x_267 = x_477; goto block_280; } } else { lean_object* x_478; uint8_t x_479; x_478 = l_Lean_Syntax_getArg(x_460, x_371); lean_dec(x_460); x_479 = l_Lean_Syntax_isNone(x_478); if (x_479 == 0) { lean_object* x_480; uint8_t x_481; x_480 = lean_unsigned_to_nat(3u); lean_inc(x_478); x_481 = l_Lean_Syntax_isNodeOf(x_478, x_457, x_480); if (x_481 == 0) { lean_object* x_482; lean_object* x_483; lean_dec(x_478); lean_dec(x_469); x_482 = l_Lean_Syntax_getArg(x_459, x_328); lean_dec(x_459); x_483 = l_Lean_Syntax_isIdOrAtom_x3f(x_482); if (lean_obj_tag(x_483) == 0) { lean_object* x_484; lean_object* x_485; x_484 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_485 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_485, 0, x_484); lean_ctor_set(x_485, 1, x_482); x_267 = x_485; goto block_280; } else { lean_object* x_486; lean_object* x_487; x_486 = lean_ctor_get(x_483, 0); lean_inc(x_486); lean_dec(x_483); x_487 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_487, 0, x_486); lean_ctor_set(x_487, 1, x_482); x_267 = x_487; goto block_280; } } else { lean_object* x_488; lean_object* x_489; lean_object* x_490; lean_object* x_491; lean_object* x_492; lean_dec(x_459); x_488 = l_Lean_Syntax_getArg(x_478, x_371); lean_dec(x_478); x_489 = l_Lean_Syntax_getArgs(x_488); lean_dec(x_488); x_490 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_490, 0, x_489); x_491 = lean_box(0); x_492 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_469, x_491, x_490); lean_dec(x_490); x_267 = x_492; goto block_280; } } else { lean_object* x_493; lean_object* x_494; lean_object* x_495; lean_dec(x_478); lean_dec(x_459); x_493 = lean_box(0); x_494 = lean_box(0); x_495 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_469, x_494, x_493); x_267 = x_495; goto block_280; } } } } else { lean_object* x_496; lean_object* x_497; uint8_t x_498; x_496 = l_Lean_Syntax_getArg(x_455, x_328); lean_dec(x_455); x_497 = l_Lean_Parser_Command_namedPrio___elambda__1___closed__2; lean_inc(x_496); x_498 = l_Lean_Syntax_isOfKind(x_496, x_497); if (x_498 == 0) { lean_object* x_499; lean_object* x_500; lean_object* x_501; uint8_t x_502; lean_dec(x_496); lean_dec(x_372); x_499 = l_Lean_Syntax_getArg(x_4, x_371); x_500 = l_Lean_Syntax_getArg(x_499, x_371); x_501 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__22; lean_inc(x_500); x_502 = l_Lean_Syntax_isOfKind(x_500, x_501); if (x_502 == 0) { lean_object* x_503; lean_object* x_504; lean_dec(x_500); x_503 = l_Lean_Syntax_getArg(x_499, x_328); lean_dec(x_499); x_504 = l_Lean_Syntax_isIdOrAtom_x3f(x_503); if (lean_obj_tag(x_504) == 0) { lean_object* x_505; lean_object* x_506; x_505 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_506 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_506, 0, x_505); lean_ctor_set(x_506, 1, x_503); x_267 = x_506; goto block_280; } else { lean_object* x_507; lean_object* x_508; x_507 = lean_ctor_get(x_504, 0); lean_inc(x_507); lean_dec(x_504); x_508 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_508, 0, x_507); lean_ctor_set(x_508, 1, x_503); x_267 = x_508; goto block_280; } } else { lean_object* x_509; lean_object* x_510; uint8_t x_511; x_509 = l_Lean_Syntax_getArg(x_500, x_328); x_510 = l_Lean_identKind___closed__2; lean_inc(x_509); x_511 = l_Lean_Syntax_isOfKind(x_509, x_510); if (x_511 == 0) { lean_object* x_512; lean_object* x_513; lean_dec(x_509); lean_dec(x_500); x_512 = l_Lean_Syntax_getArg(x_499, x_328); lean_dec(x_499); x_513 = l_Lean_Syntax_isIdOrAtom_x3f(x_512); if (lean_obj_tag(x_513) == 0) { lean_object* x_514; lean_object* x_515; x_514 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_515 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_515, 0, x_514); lean_ctor_set(x_515, 1, x_512); x_267 = x_515; goto block_280; } else { lean_object* x_516; lean_object* x_517; x_516 = lean_ctor_get(x_513, 0); lean_inc(x_516); lean_dec(x_513); x_517 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_517, 0, x_516); lean_ctor_set(x_517, 1, x_512); x_267 = x_517; goto block_280; } } else { lean_object* x_518; uint8_t x_519; x_518 = l_Lean_Syntax_getArg(x_500, x_371); lean_dec(x_500); x_519 = l_Lean_Syntax_isNone(x_518); if (x_519 == 0) { lean_object* x_520; uint8_t x_521; x_520 = lean_unsigned_to_nat(3u); lean_inc(x_518); x_521 = l_Lean_Syntax_isNodeOf(x_518, x_457, x_520); if (x_521 == 0) { lean_object* x_522; lean_object* x_523; lean_dec(x_518); lean_dec(x_509); x_522 = l_Lean_Syntax_getArg(x_499, x_328); lean_dec(x_499); x_523 = l_Lean_Syntax_isIdOrAtom_x3f(x_522); if (lean_obj_tag(x_523) == 0) { lean_object* x_524; lean_object* x_525; x_524 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1; x_525 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_525, 0, x_524); lean_ctor_set(x_525, 1, x_522); x_267 = x_525; goto block_280; } else { lean_object* x_526; lean_object* x_527; x_526 = lean_ctor_get(x_523, 0); lean_inc(x_526); lean_dec(x_523); x_527 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_527, 0, x_526); lean_ctor_set(x_527, 1, x_522); x_267 = x_527; goto block_280; } } else { lean_object* x_528; lean_object* x_529; lean_object* x_530; lean_object* x_531; lean_object* x_532; lean_dec(x_499); x_528 = l_Lean_Syntax_getArg(x_518, x_371); lean_dec(x_518); x_529 = l_Lean_Syntax_getArgs(x_528); lean_dec(x_528); x_530 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_530, 0, x_529); x_531 = lean_box(0); x_532 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_509, x_531, x_530); lean_dec(x_530); x_267 = x_532; goto block_280; } } else { lean_object* x_533; lean_object* x_534; lean_object* x_535; lean_dec(x_518); lean_dec(x_499); x_533 = lean_box(0); x_534 = lean_box(0); x_535 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_509, x_534, x_533); x_267 = x_535; goto block_280; } } } } else { lean_object* x_536; lean_object* x_537; lean_object* x_538; lean_object* x_539; x_536 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_536, 0, x_496); x_537 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__3; x_538 = lean_box(0); lean_inc(x_4); x_539 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__4(x_372, x_537, x_4, x_538, x_536); lean_dec(x_536); x_267 = x_539; goto block_280; } } } else { lean_object* x_540; lean_object* x_541; lean_object* x_542; lean_object* x_543; lean_dec(x_455); x_540 = lean_box(0); x_541 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__3; x_542 = lean_box(0); lean_inc(x_4); x_543 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__4(x_372, x_541, x_4, x_542, x_540); x_267 = x_543; goto block_280; } } } } } } } block_280: { lean_object* x_268; lean_object* x_269; lean_object* x_270; uint8_t x_271; x_268 = lean_ctor_get(x_267, 0); lean_inc(x_268); x_269 = lean_ctor_get(x_267, 1); lean_inc(x_269); if (lean_is_exclusive(x_267)) { lean_ctor_release(x_267, 0); lean_ctor_release(x_267, 1); x_270 = x_267; } else { lean_dec_ref(x_267); x_270 = lean_box(0); } x_271 = l_Lean_Server_FileWorker_hasRange(x_269); if (x_271 == 0) { lean_object* x_272; lean_dec(x_269); lean_dec(x_268); lean_dec(x_6); lean_dec(x_4); if (lean_is_scalar(x_270)) { x_272 = lean_alloc_ctor(0, 2, 0); } else { x_272 = x_270; } lean_ctor_set(x_272, 0, x_265); lean_ctor_set(x_272, 1, x_266); return x_272; } else { lean_object* x_273; lean_object* x_274; lean_object* x_275; uint8_t x_276; lean_object* x_277; lean_object* x_278; lean_object* x_279; x_273 = lean_box(0); x_274 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_1, x_4); lean_dec(x_4); x_275 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_1, x_269); lean_dec(x_269); x_276 = 5; x_277 = lean_alloc_ctor(0, 5, 1); lean_ctor_set(x_277, 0, x_268); lean_ctor_set(x_277, 1, x_273); lean_ctor_set(x_277, 2, x_274); lean_ctor_set(x_277, 3, x_275); lean_ctor_set(x_277, 4, x_273); lean_ctor_set_uint8(x_277, sizeof(void*)*5, x_276); if (lean_is_scalar(x_6)) { x_278 = lean_alloc_ctor(1, 2, 0); } else { x_278 = x_6; } lean_ctor_set(x_278, 0, x_277); lean_ctor_set(x_278, 1, x_265); if (lean_is_scalar(x_270)) { x_279 = lean_alloc_ctor(0, 2, 0); } else { x_279 = x_270; } lean_ctor_set(x_279, 0, x_278); lean_ctor_set(x_279, 1, x_266); return x_279; } } } } else { lean_object* x_544; lean_object* x_545; lean_object* x_546; x_544 = lean_box(0); if (lean_is_scalar(x_6)) { x_545 = lean_alloc_ctor(1, 2, 0); } else { x_545 = x_6; } lean_ctor_set(x_545, 0, x_4); lean_ctor_set(x_545, 1, x_5); x_546 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_546, 0, x_544); lean_ctor_set(x_546, 1, x_545); return x_546; } } else { lean_object* x_547; lean_object* x_548; lean_object* x_549; lean_dec(x_6); x_547 = lean_unsigned_to_nat(1u); x_548 = l_Lean_Syntax_getArg(x_4, x_547); x_549 = l_Lean_Syntax_getOptional_x3f(x_548); lean_dec(x_548); if (lean_obj_tag(x_549) == 0) { lean_object* x_550; uint8_t x_551; lean_object* x_552; x_550 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___closed__2; x_551 = 2; lean_inc(x_4); x_552 = l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols(x_1, x_4, x_5, x_550, x_551, x_4); lean_dec(x_4); return x_552; } else { lean_object* x_553; lean_object* x_554; lean_object* x_555; lean_object* x_556; uint8_t x_557; lean_object* x_558; x_553 = lean_ctor_get(x_549, 0); lean_inc(x_553); lean_dec(x_549); x_554 = l_Lean_Syntax_getId(x_553); x_555 = l_Lean_Name_toString___closed__1; x_556 = l_Lean_Name_toStringWithSep(x_555, x_554); x_557 = 2; x_558 = l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols(x_1, x_4, x_5, x_556, x_557, x_553); lean_dec(x_553); return x_558; } } } else { lean_object* x_559; lean_object* x_560; lean_object* x_561; lean_object* x_562; lean_object* x_563; uint8_t x_564; lean_object* x_565; lean_dec(x_6); x_559 = lean_unsigned_to_nat(1u); x_560 = l_Lean_Syntax_getArg(x_4, x_559); x_561 = l_Lean_Syntax_getId(x_560); x_562 = l_Lean_Name_toString___closed__1; x_563 = l_Lean_Name_toStringWithSep(x_562, x_561); x_564 = 2; x_565 = l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols(x_1, x_4, x_5, x_563, x_564, x_560); lean_dec(x_560); return x_565; } } } } lean_object* l_List_getLast_x21___at_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols___spec__1(lean_object* x_1) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_2; lean_object* x_3; lean_object* x_4; x_2 = l_Lean_instInhabitedSyntax; x_3 = l_List_getLast_x21___rarg___closed__2; x_4 = lean_panic_fn(x_2, x_3); return x_4; } else { uint8_t x_5; x_5 = !lean_is_exclusive(x_1); if (x_5 == 0) { lean_object* x_6; x_6 = l_List_getLast___rarg(x_1, lean_box(0)); return x_6; } else { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_7 = lean_ctor_get(x_1, 0); x_8 = lean_ctor_get(x_1, 1); lean_inc(x_8); lean_inc(x_7); lean_dec(x_1); x_9 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_9, 0, x_7); lean_ctor_set(x_9, 1, x_8); x_10 = l_List_getLast___rarg(x_9, lean_box(0)); return x_10; } } } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, uint8_t x_5, lean_object* x_6) { _start: { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; x_7 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols(x_1, x_3); x_8 = lean_ctor_get(x_7, 0); lean_inc(x_8); x_9 = lean_ctor_get(x_7, 1); lean_inc(x_9); lean_dec(x_7); x_10 = lean_unsigned_to_nat(1u); x_11 = l_List_drop___rarg(x_10, x_9); x_12 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols(x_1, x_11); x_13 = !lean_is_exclusive(x_12); if (x_13 == 0) { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; x_14 = lean_ctor_get(x_12, 0); x_15 = l_Lean_Syntax_mkApp___closed__1; lean_inc(x_2); x_16 = lean_array_push(x_15, x_2); x_17 = lean_box(0); x_18 = l_Lean_Server_FileWorker_hasRange(x_6); x_19 = l_List_redLength___rarg(x_8); x_20 = lean_mk_empty_array_with_capacity(x_19); lean_dec(x_19); x_21 = l_List_toArrayAux___rarg(x_8, x_20); x_22 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_22, 0, x_21); if (lean_obj_tag(x_9) == 0) { lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; x_23 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_23, 0, x_2); lean_ctor_set(x_23, 1, x_9); x_24 = l_List_getLast_x21___at_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols___spec__1(x_23); x_25 = lean_array_push(x_16, x_24); 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 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_1, x_27); lean_dec(x_27); if (x_18 == 0) { lean_object* x_29; lean_object* x_30; lean_inc(x_28); x_29 = lean_alloc_ctor(0, 5, 1); lean_ctor_set(x_29, 0, x_4); lean_ctor_set(x_29, 1, x_17); lean_ctor_set(x_29, 2, x_28); lean_ctor_set(x_29, 3, x_28); lean_ctor_set(x_29, 4, x_22); lean_ctor_set_uint8(x_29, sizeof(void*)*5, x_5); x_30 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_30, 0, x_29); lean_ctor_set(x_30, 1, x_14); lean_ctor_set(x_12, 0, x_30); return x_12; } else { lean_object* x_31; lean_object* x_32; lean_object* x_33; x_31 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_1, x_6); x_32 = lean_alloc_ctor(0, 5, 1); lean_ctor_set(x_32, 0, x_4); lean_ctor_set(x_32, 1, x_17); lean_ctor_set(x_32, 2, x_28); lean_ctor_set(x_32, 3, x_31); lean_ctor_set(x_32, 4, x_22); lean_ctor_set_uint8(x_32, sizeof(void*)*5, x_5); x_33 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_33, 0, x_32); lean_ctor_set(x_33, 1, x_14); lean_ctor_set(x_12, 0, x_33); return x_12; } } else { uint8_t x_34; lean_dec(x_2); x_34 = !lean_is_exclusive(x_9); if (x_34 == 0) { lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; x_35 = lean_ctor_get(x_9, 0); x_36 = lean_ctor_get(x_9, 1); lean_dec(x_36); x_37 = lean_array_push(x_16, x_35); x_38 = l_Lean_nullKind; x_39 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_39, 0, x_38); lean_ctor_set(x_39, 1, x_37); x_40 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_1, x_39); lean_dec(x_39); if (x_18 == 0) { lean_object* x_41; lean_inc(x_40); x_41 = lean_alloc_ctor(0, 5, 1); lean_ctor_set(x_41, 0, x_4); lean_ctor_set(x_41, 1, x_17); lean_ctor_set(x_41, 2, x_40); lean_ctor_set(x_41, 3, x_40); lean_ctor_set(x_41, 4, x_22); lean_ctor_set_uint8(x_41, sizeof(void*)*5, x_5); lean_ctor_set(x_9, 1, x_14); lean_ctor_set(x_9, 0, x_41); lean_ctor_set(x_12, 0, x_9); return x_12; } else { lean_object* x_42; lean_object* x_43; x_42 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_1, x_6); x_43 = lean_alloc_ctor(0, 5, 1); lean_ctor_set(x_43, 0, x_4); lean_ctor_set(x_43, 1, x_17); lean_ctor_set(x_43, 2, x_40); lean_ctor_set(x_43, 3, x_42); lean_ctor_set(x_43, 4, x_22); lean_ctor_set_uint8(x_43, sizeof(void*)*5, x_5); lean_ctor_set(x_9, 1, x_14); lean_ctor_set(x_9, 0, x_43); lean_ctor_set(x_12, 0, x_9); return x_12; } } else { lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; x_44 = lean_ctor_get(x_9, 0); lean_inc(x_44); lean_dec(x_9); x_45 = lean_array_push(x_16, x_44); x_46 = l_Lean_nullKind; x_47 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_47, 0, x_46); lean_ctor_set(x_47, 1, x_45); x_48 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_1, x_47); lean_dec(x_47); if (x_18 == 0) { lean_object* x_49; lean_object* x_50; lean_inc(x_48); x_49 = lean_alloc_ctor(0, 5, 1); lean_ctor_set(x_49, 0, x_4); lean_ctor_set(x_49, 1, x_17); lean_ctor_set(x_49, 2, x_48); lean_ctor_set(x_49, 3, x_48); lean_ctor_set(x_49, 4, x_22); lean_ctor_set_uint8(x_49, sizeof(void*)*5, x_5); x_50 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_50, 0, x_49); lean_ctor_set(x_50, 1, x_14); lean_ctor_set(x_12, 0, x_50); return x_12; } else { lean_object* x_51; lean_object* x_52; lean_object* x_53; x_51 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_1, x_6); x_52 = lean_alloc_ctor(0, 5, 1); lean_ctor_set(x_52, 0, x_4); lean_ctor_set(x_52, 1, x_17); lean_ctor_set(x_52, 2, x_48); lean_ctor_set(x_52, 3, x_51); lean_ctor_set(x_52, 4, x_22); lean_ctor_set_uint8(x_52, sizeof(void*)*5, x_5); x_53 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_53, 0, x_52); lean_ctor_set(x_53, 1, x_14); lean_ctor_set(x_12, 0, x_53); return x_12; } } } } else { lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; uint8_t x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; x_54 = lean_ctor_get(x_12, 0); x_55 = lean_ctor_get(x_12, 1); lean_inc(x_55); lean_inc(x_54); lean_dec(x_12); x_56 = l_Lean_Syntax_mkApp___closed__1; lean_inc(x_2); x_57 = lean_array_push(x_56, x_2); x_58 = lean_box(0); x_59 = l_Lean_Server_FileWorker_hasRange(x_6); x_60 = l_List_redLength___rarg(x_8); x_61 = lean_mk_empty_array_with_capacity(x_60); lean_dec(x_60); x_62 = l_List_toArrayAux___rarg(x_8, x_61); x_63 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_63, 0, x_62); if (lean_obj_tag(x_9) == 0) { 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_64 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_64, 0, x_2); lean_ctor_set(x_64, 1, x_9); x_65 = l_List_getLast_x21___at_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols___spec__1(x_64); x_66 = lean_array_push(x_57, x_65); x_67 = l_Lean_nullKind; x_68 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_68, 0, x_67); lean_ctor_set(x_68, 1, x_66); x_69 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_1, x_68); lean_dec(x_68); if (x_59 == 0) { lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_inc(x_69); x_70 = lean_alloc_ctor(0, 5, 1); lean_ctor_set(x_70, 0, x_4); lean_ctor_set(x_70, 1, x_58); lean_ctor_set(x_70, 2, x_69); lean_ctor_set(x_70, 3, x_69); lean_ctor_set(x_70, 4, x_63); lean_ctor_set_uint8(x_70, sizeof(void*)*5, x_5); x_71 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_71, 0, x_70); lean_ctor_set(x_71, 1, x_54); x_72 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_72, 0, x_71); lean_ctor_set(x_72, 1, x_55); return x_72; } else { lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; x_73 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_1, x_6); x_74 = lean_alloc_ctor(0, 5, 1); lean_ctor_set(x_74, 0, x_4); lean_ctor_set(x_74, 1, x_58); lean_ctor_set(x_74, 2, x_69); lean_ctor_set(x_74, 3, x_73); lean_ctor_set(x_74, 4, x_63); lean_ctor_set_uint8(x_74, sizeof(void*)*5, x_5); x_75 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_75, 0, x_74); lean_ctor_set(x_75, 1, x_54); x_76 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_76, 0, x_75); lean_ctor_set(x_76, 1, x_55); return x_76; } } else { lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_dec(x_2); x_77 = lean_ctor_get(x_9, 0); lean_inc(x_77); if (lean_is_exclusive(x_9)) { lean_ctor_release(x_9, 0); lean_ctor_release(x_9, 1); x_78 = x_9; } else { lean_dec_ref(x_9); x_78 = lean_box(0); } x_79 = lean_array_push(x_57, x_77); x_80 = l_Lean_nullKind; 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 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_1, x_81); lean_dec(x_81); if (x_59 == 0) { lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_inc(x_82); x_83 = lean_alloc_ctor(0, 5, 1); lean_ctor_set(x_83, 0, x_4); lean_ctor_set(x_83, 1, x_58); lean_ctor_set(x_83, 2, x_82); lean_ctor_set(x_83, 3, x_82); lean_ctor_set(x_83, 4, x_63); lean_ctor_set_uint8(x_83, sizeof(void*)*5, x_5); if (lean_is_scalar(x_78)) { x_84 = lean_alloc_ctor(1, 2, 0); } else { x_84 = x_78; } lean_ctor_set(x_84, 0, x_83); lean_ctor_set(x_84, 1, x_54); x_85 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_85, 0, x_84); lean_ctor_set(x_85, 1, x_55); return x_85; } else { lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; x_86 = l_Lean_Server_FileWorker_rangeOfSyntax_x21(x_1, x_6); x_87 = lean_alloc_ctor(0, 5, 1); lean_ctor_set(x_87, 0, x_4); lean_ctor_set(x_87, 1, x_58); lean_ctor_set(x_87, 2, x_82); lean_ctor_set(x_87, 3, x_86); lean_ctor_set(x_87, 4, x_63); lean_ctor_set_uint8(x_87, sizeof(void*)*5, x_5); if (lean_is_scalar(x_78)) { x_88 = lean_alloc_ctor(1, 2, 0); } else { x_88 = x_78; } lean_ctor_set(x_88, 0, x_87); lean_ctor_set(x_88, 1, x_54); x_89 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_89, 0, x_88); lean_ctor_set(x_89, 1, x_55); return x_89; } } } } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__1(x_1, x_2, x_3); lean_dec(x_3); lean_dec(x_2); return x_4; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___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_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); return x_7; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__3(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__4(x_1, x_2, x_3, x_4, x_5); lean_dec(x_5); lean_dec(x_4); return x_6; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols(x_1, x_2); lean_dec(x_1); return x_3; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { uint8_t x_7; lean_object* x_8; x_7 = lean_unbox(x_5); lean_dec(x_5); x_8 = l_Lean_Server_FileWorker_handleDocumentSymbol_sectionLikeToDocumentSymbols(x_1, x_2, x_3, x_4, x_7, x_6); lean_dec(x_6); lean_dec(x_1); return x_8; } } lean_object* l_List_map___at_Lean_Server_FileWorker_handleDocumentSymbol___spec__1(lean_object* x_1) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_2; x_2 = lean_box(0); return x_2; } else { uint8_t x_3; x_3 = !lean_is_exclusive(x_1); if (x_3 == 0) { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; x_4 = lean_ctor_get(x_1, 0); x_5 = lean_ctor_get(x_1, 1); x_6 = lean_ctor_get(x_4, 1); lean_inc(x_6); lean_dec(x_4); x_7 = l_List_map___at_Lean_Server_FileWorker_handleDocumentSymbol___spec__1(x_5); lean_ctor_set(x_1, 1, x_7); lean_ctor_set(x_1, 0, x_6); return x_1; } else { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; x_8 = lean_ctor_get(x_1, 0); x_9 = lean_ctor_get(x_1, 1); lean_inc(x_9); lean_inc(x_8); lean_dec(x_1); x_10 = lean_ctor_get(x_8, 1); lean_inc(x_10); lean_dec(x_8); x_11 = l_List_map___at_Lean_Server_FileWorker_handleDocumentSymbol___spec__1(x_9); x_12 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_12, 0, x_10); lean_ctor_set(x_12, 1, x_11); return x_12; } } } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_5 = lean_ctor_get(x_1, 0); x_6 = lean_ctor_get(x_5, 2); x_7 = l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols(x_6, x_2); x_8 = lean_ctor_get(x_7, 0); lean_inc(x_8); lean_dec(x_7); x_9 = l_List_redLength___rarg(x_8); x_10 = lean_mk_empty_array_with_capacity(x_9); lean_dec(x_9); x_11 = l_List_toArrayAux___rarg(x_8, x_10); x_12 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_12, 0, x_11); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_4); return x_13; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___lambda__2(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; x_3 = lean_ctor_get(x_1, 2); lean_inc(x_3); x_4 = l_IO_AsyncList_updateFinishedPrefix___rarg(x_3, x_2); if (lean_obj_tag(x_4) == 0) { uint8_t x_5; x_5 = !lean_is_exclusive(x_4); if (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; x_6 = lean_ctor_get(x_4, 0); x_7 = lean_ctor_get(x_4, 1); x_8 = lean_ctor_get(x_6, 0); lean_inc(x_8); x_9 = lean_ctor_get(x_6, 1); lean_inc(x_9); lean_dec(x_6); x_10 = l_IO_AsyncList_finishedPrefix___rarg(x_8); lean_dec(x_8); lean_inc(x_10); x_11 = l_List_map___at_Lean_Server_FileWorker_handleDocumentSymbol___spec__1(x_10); if (lean_obj_tag(x_9) == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_free_object(x_4); x_12 = lean_ctor_get(x_1, 1); lean_inc(x_12); x_13 = l_List_getLastD___rarg(x_10, x_12); lean_dec(x_12); x_14 = lean_ctor_get(x_1, 0); lean_inc(x_14); x_15 = lean_ctor_get(x_14, 2); lean_inc(x_15); lean_dec(x_14); x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); lean_dec(x_15); x_17 = l_Lean_Server_Snapshots_parseAhead(x_16, x_13, x_7); x_18 = lean_ctor_get(x_17, 0); lean_inc(x_18); x_19 = lean_ctor_get(x_17, 1); lean_inc(x_19); lean_dec(x_17); x_20 = lean_array_to_list(lean_box(0), x_18); x_21 = l_List_append___rarg(x_11, x_20); x_22 = lean_box(0); x_23 = l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___lambda__1(x_1, x_21, x_22, x_19); lean_dec(x_1); return x_23; } else { lean_object* x_24; lean_dec(x_10); x_24 = lean_ctor_get(x_9, 0); lean_inc(x_24); lean_dec(x_9); if (lean_obj_tag(x_24) == 0) { lean_object* x_25; lean_dec(x_11); lean_dec(x_1); x_25 = l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1___closed__1; lean_ctor_set(x_4, 0, x_25); return x_4; } else { lean_object* x_26; lean_object* x_27; lean_dec(x_24); lean_free_object(x_4); x_26 = lean_box(0); x_27 = l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___lambda__1(x_1, x_11, x_26, x_7); lean_dec(x_1); return x_27; } } } else { lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; x_28 = lean_ctor_get(x_4, 0); x_29 = lean_ctor_get(x_4, 1); lean_inc(x_29); lean_inc(x_28); lean_dec(x_4); x_30 = lean_ctor_get(x_28, 0); lean_inc(x_30); x_31 = lean_ctor_get(x_28, 1); lean_inc(x_31); lean_dec(x_28); x_32 = l_IO_AsyncList_finishedPrefix___rarg(x_30); lean_dec(x_30); lean_inc(x_32); x_33 = l_List_map___at_Lean_Server_FileWorker_handleDocumentSymbol___spec__1(x_32); if (lean_obj_tag(x_31) == 0) { lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; x_34 = lean_ctor_get(x_1, 1); lean_inc(x_34); x_35 = l_List_getLastD___rarg(x_32, x_34); lean_dec(x_34); x_36 = lean_ctor_get(x_1, 0); lean_inc(x_36); x_37 = lean_ctor_get(x_36, 2); lean_inc(x_37); lean_dec(x_36); x_38 = lean_ctor_get(x_37, 0); lean_inc(x_38); lean_dec(x_37); x_39 = l_Lean_Server_Snapshots_parseAhead(x_38, x_35, x_29); x_40 = lean_ctor_get(x_39, 0); lean_inc(x_40); x_41 = lean_ctor_get(x_39, 1); lean_inc(x_41); lean_dec(x_39); x_42 = lean_array_to_list(lean_box(0), x_40); x_43 = l_List_append___rarg(x_33, x_42); x_44 = lean_box(0); x_45 = l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___lambda__1(x_1, x_43, x_44, x_41); lean_dec(x_1); return x_45; } else { lean_object* x_46; lean_dec(x_32); x_46 = lean_ctor_get(x_31, 0); lean_inc(x_46); lean_dec(x_31); if (lean_obj_tag(x_46) == 0) { lean_object* x_47; lean_object* x_48; lean_dec(x_33); lean_dec(x_1); x_47 = l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1___closed__1; x_48 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_48, 0, x_47); lean_ctor_set(x_48, 1, x_29); return x_48; } else { lean_object* x_49; lean_object* x_50; lean_dec(x_46); x_49 = lean_box(0); x_50 = l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___lambda__1(x_1, x_33, x_49, x_29); lean_dec(x_1); return x_50; } } } } else { uint8_t x_51; lean_dec(x_1); x_51 = !lean_is_exclusive(x_4); if (x_51 == 0) { return x_4; } else { lean_object* x_52; lean_object* x_53; lean_object* x_54; x_52 = lean_ctor_get(x_4, 0); x_53 = lean_ctor_get(x_4, 1); lean_inc(x_53); lean_inc(x_52); lean_dec(x_4); x_54 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_54, 0, x_52); lean_ctor_set(x_54, 1, x_53); return x_54; } } } } static lean_object* _init_l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___lambda__2), 2, 0); return x_1; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_3 = lean_ctor_get(x_1, 4); lean_inc(x_3); lean_dec(x_1); x_4 = lean_alloc_closure((void*)(l_IO_FS_Stream_ofBuffer___lambda__1___boxed), 2, 1); lean_closure_set(x_4, 0, x_3); x_5 = l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___closed__1; x_6 = lean_alloc_closure((void*)(l_EStateM_bind___rarg), 3, 2); lean_closure_set(x_6, 0, x_4); lean_closure_set(x_6, 1, x_5); x_7 = l_Task_Priority_default; x_8 = lean_io_as_task(x_6, x_7, x_2); return x_8; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDocumentSymbol___rarg), 2, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___lambda__1(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_1); return x_5; } } lean_object* l_Lean_Server_FileWorker_handleDocumentSymbol___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Server_FileWorker_handleDocumentSymbol(x_1); lean_dec(x_1); return x_2; } } static lean_object* _init_l_Lean_Server_FileWorker_noHighlightKinds___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Elab_Term_mkExplicitBinder___closed__1; x_2 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_18784____closed__2; x_3 = lean_array_push(x_1, x_2); return x_3; } } static lean_object* _init_l_Lean_Server_FileWorker_noHighlightKinds___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Server_FileWorker_noHighlightKinds___closed__1; x_2 = l_Lean_Parser_Term_type___elambda__1___closed__2; x_3 = lean_array_push(x_1, x_2); return x_3; } } static lean_object* _init_l_Lean_Server_FileWorker_noHighlightKinds___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Server_FileWorker_noHighlightKinds___closed__2; x_2 = l_Lean_Parser_Term_prop___elambda__1___closed__2; x_3 = lean_array_push(x_1, x_2); return x_3; } } static lean_object* _init_l_Lean_Server_FileWorker_noHighlightKinds___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Server_FileWorker_noHighlightKinds___closed__3; x_2 = l_Lean_Syntax_mkAntiquotNode___closed__12; x_3 = lean_array_push(x_1, x_2); return x_3; } } static lean_object* _init_l_Lean_Server_FileWorker_noHighlightKinds___closed__5() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Server_FileWorker_noHighlightKinds___closed__4; x_2 = l_Lean_Parser_Command_docComment___elambda__1___closed__2; x_3 = lean_array_push(x_1, x_2); return x_3; } } static lean_object* _init_l_Lean_Server_FileWorker_noHighlightKinds() { _start: { lean_object* x_1; x_1 = l_Lean_Server_FileWorker_noHighlightKinds___closed__5; return x_1; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightId_match__1___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_dec(x_2); x_4 = lean_apply_1(x_3, x_1); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_dec(x_3); x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); lean_dec(x_1); x_6 = lean_apply_1(x_2, x_5); return x_6; } } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightId_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleSemanticTokens_highlightId_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightId_match__2___rarg(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) == 1) { lean_object* x_6; lean_object* x_7; lean_dec(x_5); x_6 = lean_ctor_get(x_2, 0); lean_inc(x_6); x_7 = lean_apply_4(x_4, x_1, x_2, x_6, x_3); return x_7; } else { lean_object* x_8; lean_dec(x_4); x_8 = lean_apply_3(x_5, x_1, x_2, x_3); return x_8; } } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightId_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleSemanticTokens_highlightId_match__2___rarg), 5, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightId_match__3___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; uint64_t x_5; lean_object* x_6; lean_object* x_7; lean_dec(x_3); x_4 = lean_ctor_get(x_1, 0); lean_inc(x_4); x_5 = lean_ctor_get_uint64(x_1, sizeof(void*)*1); lean_dec(x_1); x_6 = lean_box_uint64(x_5); x_7 = lean_apply_2(x_2, x_4, x_6); return x_7; } else { lean_object* x_8; lean_dec(x_2); x_8 = lean_apply_1(x_3, x_1); return x_8; } } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightId_match__3(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleSemanticTokens_highlightId_match__3___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightId_match__4___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = lean_ctor_get(x_1, 0); lean_inc(x_4); if (lean_obj_tag(x_4) == 0) { lean_object* x_5; lean_dec(x_2); x_5 = lean_apply_1(x_3, x_1); return x_5; } else { lean_object* x_6; x_6 = lean_ctor_get(x_1, 1); lean_inc(x_6); if (lean_obj_tag(x_6) == 0) { lean_object* x_7; lean_dec(x_4); lean_dec(x_2); x_7 = lean_apply_1(x_3, x_1); return x_7; } else { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_dec(x_3); lean_dec(x_1); x_8 = lean_ctor_get(x_4, 0); lean_inc(x_8); lean_dec(x_4); x_9 = lean_ctor_get(x_6, 0); lean_inc(x_9); lean_dec(x_6); x_10 = lean_apply_2(x_2, x_8, x_9); return x_10; } } } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightId_match__4(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleSemanticTokens_highlightId_match__4___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_addToken_match__1___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); x_5 = lean_ctor_get(x_1, 2); lean_inc(x_5); x_6 = lean_ctor_get(x_1, 3); lean_inc(x_6); lean_dec(x_1); x_7 = lean_apply_4(x_2, x_3, x_4, x_5, x_6); return x_7; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_addToken_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleSemanticTokens_addToken_match__1___rarg), 2, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_match__1___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_2(x_2, x_3, x_4); return x_5; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleSemanticTokens_match__1___rarg), 2, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightKeyword_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_1) == 2) { 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_Lean_Server_FileWorker_handleSemanticTokens_highlightKeyword_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleSemanticTokens_highlightKeyword_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_addToken(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_10; x_6 = lean_ctor_get(x_3, 0); x_7 = lean_ctor_get(x_3, 1); x_8 = lean_ctor_get(x_3, 2); x_9 = 0; x_10 = l_Lean_Syntax_getPos_x3f(x_1, x_9); if (lean_obj_tag(x_10) == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; x_11 = lean_box(0); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_4); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_5); return x_13; } else { lean_object* x_14; lean_object* x_15; x_14 = lean_ctor_get(x_10, 0); lean_inc(x_14); lean_dec(x_10); x_15 = l_Lean_Syntax_getTailPos_x3f(x_1, x_9); if (lean_obj_tag(x_15) == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_dec(x_14); x_16 = lean_box(0); x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_4); x_18 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_5); return x_18; } else { lean_object* x_19; uint8_t x_20; x_19 = lean_ctor_get(x_15, 0); lean_inc(x_19); lean_dec(x_15); x_20 = lean_nat_dec_le(x_6, x_14); if (x_20 == 0) { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_dec(x_19); lean_dec(x_14); x_21 = lean_box(0); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_21); lean_ctor_set(x_22, 1, x_4); x_23 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_23, 0, x_22); lean_ctor_set(x_23, 1, x_5); return x_23; } else { uint8_t x_24; x_24 = lean_nat_dec_lt(x_14, x_7); if (x_24 == 0) { lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_dec(x_19); lean_dec(x_14); x_25 = lean_box(0); x_26 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_4); x_27 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_27, 0, x_26); lean_ctor_set(x_27, 1, x_5); return x_27; } else { lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; x_28 = lean_ctor_get(x_4, 1); lean_inc(x_28); x_29 = l_Lean_FileMap_utf8PosToLspPos(x_8, x_14); lean_dec(x_14); x_30 = lean_ctor_get(x_29, 0); lean_inc(x_30); x_31 = lean_ctor_get(x_28, 0); lean_inc(x_31); x_32 = lean_nat_sub(x_30, x_31); x_33 = lean_ctor_get(x_29, 1); lean_inc(x_33); x_34 = lean_nat_dec_eq(x_30, x_31); lean_dec(x_31); lean_dec(x_30); x_35 = l_Lean_FileMap_utf8PosToLspPos(x_8, x_19); lean_dec(x_19); x_36 = lean_ctor_get(x_35, 1); lean_inc(x_36); lean_dec(x_35); x_37 = lean_nat_sub(x_36, x_33); lean_dec(x_36); x_38 = l_Lean_Lsp_SemanticTokenType_toNat(x_2); x_39 = lean_ctor_get(x_4, 0); lean_inc(x_39); lean_dec(x_4); x_40 = l_Lean_Elab_Term_mkExplicitBinder___closed__1; x_41 = lean_array_push(x_40, x_32); if (x_34 == 0) { 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; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_dec(x_28); x_42 = lean_unsigned_to_nat(0u); x_43 = lean_nat_sub(x_33, x_42); lean_dec(x_33); x_44 = lean_array_push(x_41, x_43); x_45 = lean_array_push(x_44, x_37); x_46 = lean_array_push(x_45, x_38); x_47 = lean_array_push(x_46, x_42); x_48 = l_Array_append___rarg(x_39, x_47); lean_dec(x_47); x_49 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_49, 0, x_48); lean_ctor_set(x_49, 1, x_29); x_50 = lean_box(0); x_51 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_51, 0, x_50); lean_ctor_set(x_51, 1, x_49); x_52 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_52, 0, x_51); lean_ctor_set(x_52, 1, x_5); return x_52; } else { lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; x_53 = lean_ctor_get(x_28, 1); lean_inc(x_53); lean_dec(x_28); x_54 = lean_nat_sub(x_33, x_53); lean_dec(x_53); lean_dec(x_33); x_55 = lean_array_push(x_41, x_54); x_56 = lean_array_push(x_55, x_37); x_57 = lean_array_push(x_56, x_38); x_58 = lean_unsigned_to_nat(0u); x_59 = lean_array_push(x_57, x_58); x_60 = l_Array_append___rarg(x_39, x_59); lean_dec(x_59); x_61 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_61, 0, x_60); lean_ctor_set(x_61, 1, x_29); x_62 = lean_box(0); x_63 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_63, 0, x_62); lean_ctor_set(x_63, 1, x_61); x_64 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_64, 0, x_63); lean_ctor_set(x_64, 1, x_5); return x_64; } } } } } } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_addToken___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { uint8_t x_6; lean_object* x_7; x_6 = lean_unbox(x_2); lean_dec(x_2); x_7 = l_Lean_Server_FileWorker_handleSemanticTokens_addToken(x_1, x_6, x_3, x_4, x_5); lean_dec(x_3); lean_dec(x_1); return x_7; } } lean_object* l_List_forIn_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { if (lean_obj_tag(x_2) == 0) { lean_object* x_7; lean_object* x_8; x_7 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_7, 0, x_3); lean_ctor_set(x_7, 1, x_5); x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_7); lean_ctor_set(x_8, 1, x_6); return x_8; } else { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_18; lean_dec(x_3); x_9 = lean_ctor_get(x_2, 0); x_10 = lean_ctor_get(x_2, 1); x_18 = lean_ctor_get(x_9, 1); if (lean_obj_tag(x_18) == 1) { lean_object* x_19; uint8_t x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; x_19 = lean_ctor_get(x_9, 2); x_20 = 1; x_21 = l_Lean_Server_FileWorker_handleSemanticTokens_addToken(x_19, x_20, x_4, x_5, x_6); x_22 = lean_ctor_get(x_21, 0); lean_inc(x_22); x_23 = lean_ctor_get(x_21, 1); lean_inc(x_23); lean_dec(x_21); x_24 = !lean_is_exclusive(x_22); if (x_24 == 0) { lean_object* x_25; lean_object* x_26; x_25 = lean_ctor_get(x_22, 0); lean_dec(x_25); x_26 = l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1; lean_ctor_set(x_22, 0, x_26); x_11 = x_22; x_12 = x_23; goto block_17; } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; x_27 = lean_ctor_get(x_22, 1); lean_inc(x_27); lean_dec(x_22); x_28 = l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1; x_29 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_29, 0, x_28); lean_ctor_set(x_29, 1, x_27); x_11 = x_29; x_12 = x_23; goto block_17; } } else { lean_object* x_30; uint8_t x_31; lean_object* x_32; x_30 = lean_ctor_get(x_9, 2); x_31 = 0; x_32 = l_Lean_Syntax_getPos_x3f(x_30, x_31); if (lean_obj_tag(x_32) == 0) { lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36; x_33 = l_instInhabitedNat; x_34 = l_Option_get_x21___rarg___closed__4; x_35 = lean_panic_fn(x_33, x_34); x_36 = lean_nat_dec_lt(x_1, x_35); lean_dec(x_35); if (x_36 == 0) { lean_object* x_37; lean_object* x_38; x_37 = l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1; x_38 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_38, 0, x_37); lean_ctor_set(x_38, 1, x_5); x_11 = x_38; x_12 = x_6; goto block_17; } else { uint8_t x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; uint8_t x_43; x_39 = 2; x_40 = l_Lean_Server_FileWorker_handleSemanticTokens_addToken(x_30, x_39, x_4, x_5, x_6); x_41 = lean_ctor_get(x_40, 0); lean_inc(x_41); x_42 = lean_ctor_get(x_40, 1); lean_inc(x_42); lean_dec(x_40); x_43 = !lean_is_exclusive(x_41); if (x_43 == 0) { lean_object* x_44; lean_object* x_45; x_44 = lean_ctor_get(x_41, 0); lean_dec(x_44); x_45 = l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1; lean_ctor_set(x_41, 0, x_45); x_11 = x_41; x_12 = x_42; goto block_17; } else { lean_object* x_46; lean_object* x_47; lean_object* x_48; x_46 = lean_ctor_get(x_41, 1); lean_inc(x_46); lean_dec(x_41); x_47 = l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1; x_48 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_48, 0, x_47); lean_ctor_set(x_48, 1, x_46); x_11 = x_48; x_12 = x_42; goto block_17; } } } else { lean_object* x_49; uint8_t x_50; x_49 = lean_ctor_get(x_32, 0); lean_inc(x_49); lean_dec(x_32); x_50 = lean_nat_dec_lt(x_1, x_49); lean_dec(x_49); if (x_50 == 0) { lean_object* x_51; lean_object* x_52; x_51 = l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1; x_52 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_52, 0, x_51); lean_ctor_set(x_52, 1, x_5); x_11 = x_52; x_12 = x_6; goto block_17; } else { uint8_t x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; uint8_t x_57; x_53 = 2; x_54 = l_Lean_Server_FileWorker_handleSemanticTokens_addToken(x_30, x_53, x_4, x_5, x_6); x_55 = lean_ctor_get(x_54, 0); lean_inc(x_55); x_56 = lean_ctor_get(x_54, 1); lean_inc(x_56); lean_dec(x_54); x_57 = !lean_is_exclusive(x_55); if (x_57 == 0) { lean_object* x_58; lean_object* x_59; x_58 = lean_ctor_get(x_55, 0); lean_dec(x_58); x_59 = l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1; lean_ctor_set(x_55, 0, x_59); x_11 = x_55; x_12 = x_56; goto block_17; } else { lean_object* x_60; lean_object* x_61; lean_object* x_62; x_60 = lean_ctor_get(x_55, 1); lean_inc(x_60); lean_dec(x_55); x_61 = l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1; x_62 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_62, 0, x_61); lean_ctor_set(x_62, 1, x_60); x_11 = x_62; x_12 = x_56; goto block_17; } } } } block_17: { lean_object* x_13; lean_object* x_14; lean_object* x_15; x_13 = lean_ctor_get(x_11, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_11, 1); lean_inc(x_14); lean_dec(x_11); x_15 = lean_ctor_get(x_13, 0); lean_inc(x_15); lean_dec(x_13); x_2 = x_10; x_3 = x_15; x_5 = x_14; x_6 = x_12; goto _start; } } } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, size_t x_6, size_t x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { uint8_t x_12; x_12 = x_7 < x_6; if (x_12 == 0) { lean_object* x_13; lean_object* x_14; lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_8); lean_ctor_set(x_13, 1, x_10); x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_11); return x_14; } else { lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_15 = lean_array_uget(x_5, x_7); x_16 = lean_ctor_get(x_8, 1); lean_inc(x_16); lean_dec(x_8); lean_inc(x_2); lean_inc(x_1); x_17 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__3(x_1, x_2, x_3, x_15, x_16, x_9, x_10, x_11); lean_dec(x_15); x_18 = lean_ctor_get(x_17, 0); lean_inc(x_18); x_19 = lean_ctor_get(x_18, 0); lean_inc(x_19); if (lean_obj_tag(x_19) == 0) { uint8_t x_20; lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); x_20 = !lean_is_exclusive(x_17); if (x_20 == 0) { lean_object* x_21; uint8_t x_22; x_21 = lean_ctor_get(x_17, 0); lean_dec(x_21); x_22 = !lean_is_exclusive(x_18); if (x_22 == 0) { lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; x_23 = lean_ctor_get(x_18, 0); lean_dec(x_23); x_24 = lean_ctor_get(x_19, 0); lean_inc(x_24); x_25 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_25, 0, x_19); x_26 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_24); lean_ctor_set(x_18, 0, x_26); return x_17; } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; x_27 = lean_ctor_get(x_18, 1); lean_inc(x_27); lean_dec(x_18); x_28 = lean_ctor_get(x_19, 0); lean_inc(x_28); x_29 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_29, 0, x_19); x_30 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_30, 0, x_29); lean_ctor_set(x_30, 1, x_28); x_31 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_31, 0, x_30); lean_ctor_set(x_31, 1, x_27); lean_ctor_set(x_17, 0, x_31); return x_17; } } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; x_32 = lean_ctor_get(x_17, 1); lean_inc(x_32); lean_dec(x_17); x_33 = lean_ctor_get(x_18, 1); lean_inc(x_33); if (lean_is_exclusive(x_18)) { lean_ctor_release(x_18, 0); lean_ctor_release(x_18, 1); x_34 = x_18; } else { lean_dec_ref(x_18); x_34 = lean_box(0); } x_35 = lean_ctor_get(x_19, 0); lean_inc(x_35); x_36 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_36, 0, x_19); x_37 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_37, 0, x_36); lean_ctor_set(x_37, 1, x_35); if (lean_is_scalar(x_34)) { x_38 = lean_alloc_ctor(0, 2, 0); } else { x_38 = x_34; } lean_ctor_set(x_38, 0, x_37); lean_ctor_set(x_38, 1, x_33); x_39 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_39, 0, x_38); lean_ctor_set(x_39, 1, x_32); return x_39; } } else { lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; size_t x_44; size_t x_45; x_40 = lean_ctor_get(x_17, 1); lean_inc(x_40); lean_dec(x_17); x_41 = lean_ctor_get(x_18, 1); lean_inc(x_41); lean_dec(x_18); x_42 = lean_ctor_get(x_19, 0); lean_inc(x_42); lean_dec(x_19); lean_inc(x_4); x_43 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_43, 0, x_4); lean_ctor_set(x_43, 1, x_42); x_44 = 1; x_45 = x_7 + x_44; x_7 = x_45; x_8 = x_43; x_10 = x_41; x_11 = x_40; goto _start; } } } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__5___lambda__1(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_4) == 1) { lean_object* x_6; lean_object* x_7; x_6 = lean_ctor_get(x_4, 0); x_7 = l_Lean_Elab_Info_pos_x3f(x_4); if (lean_obj_tag(x_7) == 0) { lean_object* x_8; x_8 = lean_box(0); return x_8; } else { uint8_t x_9; x_9 = !lean_is_exclusive(x_7); if (x_9 == 0) { lean_object* x_10; uint8_t x_11; x_10 = lean_ctor_get(x_7, 0); x_11 = lean_nat_dec_le(x_1, x_10); if (x_11 == 0) { lean_object* x_12; lean_free_object(x_7); lean_dec(x_10); x_12 = lean_box(0); return x_12; } else { uint8_t x_13; x_13 = lean_nat_dec_lt(x_10, x_2); lean_dec(x_10); if (x_13 == 0) { lean_object* x_14; lean_free_object(x_7); x_14 = lean_box(0); return x_14; } else { lean_inc(x_6); lean_ctor_set(x_7, 0, x_6); return x_7; } } } else { lean_object* x_15; uint8_t x_16; x_15 = lean_ctor_get(x_7, 0); lean_inc(x_15); lean_dec(x_7); x_16 = lean_nat_dec_le(x_1, x_15); if (x_16 == 0) { lean_object* x_17; lean_dec(x_15); x_17 = lean_box(0); return x_17; } else { uint8_t x_18; x_18 = lean_nat_dec_lt(x_15, x_2); lean_dec(x_15); if (x_18 == 0) { lean_object* x_19; x_19 = lean_box(0); return x_19; } else { lean_object* x_20; lean_inc(x_6); x_20 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_20, 0, x_6); return x_20; } } } } } else { lean_object* x_21; x_21 = lean_box(0); return x_21; } } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, size_t x_5, size_t x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { uint8_t x_11; x_11 = x_6 < x_5; if (x_11 == 0) { lean_object* x_12; lean_object* x_13; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_7); lean_ctor_set(x_12, 1, x_9); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_10); return x_13; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_dec(x_7); x_14 = lean_array_uget(x_4, x_6); lean_inc(x_2); lean_inc(x_1); x_15 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__5___lambda__1___boxed), 5, 2); lean_closure_set(x_15, 0, x_1); lean_closure_set(x_15, 1, x_2); x_16 = l_Lean_Elab_InfoTree_deepestNodes___rarg(x_15, x_14); x_17 = lean_box(0); x_18 = l_List_forIn_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__1(x_1, x_16, x_17, x_8, x_9, x_10); lean_dec(x_16); 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_ctor_get(x_19, 1); lean_inc(x_21); lean_dec(x_19); lean_inc(x_3); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_3); lean_ctor_set(x_22, 1, x_17); x_23 = 1; x_24 = x_6 + x_23; x_6 = x_24; x_7 = x_22; x_9 = x_21; x_10 = x_20; goto _start; } } } lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__3___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; lean_object* x_7; lean_object* x_8; x_6 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_6, 0, x_1); x_7 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_7, 0, x_6); lean_ctor_set(x_7, 1, x_4); x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_7); lean_ctor_set(x_8, 1, x_5); return x_8; } } lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { if (lean_obj_tag(x_4) == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; size_t x_13; size_t x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; x_9 = lean_ctor_get(x_4, 0); x_10 = lean_box(0); x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_5); x_12 = lean_array_get_size(x_9); x_13 = lean_usize_of_nat(x_12); lean_dec(x_12); x_14 = 0; x_15 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__4(x_1, x_2, x_3, x_10, x_9, x_13, x_14, x_11, x_6, x_7, x_8); x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); x_17 = lean_ctor_get(x_16, 0); lean_inc(x_17); x_18 = lean_ctor_get(x_17, 0); lean_inc(x_18); if (lean_obj_tag(x_18) == 0) { lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_19 = lean_ctor_get(x_15, 1); lean_inc(x_19); lean_dec(x_15); x_20 = lean_ctor_get(x_16, 1); lean_inc(x_20); lean_dec(x_16); x_21 = lean_ctor_get(x_17, 1); lean_inc(x_21); lean_dec(x_17); x_22 = lean_box(0); x_23 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__3___lambda__1(x_21, x_22, x_6, x_20, x_19); return x_23; } else { uint8_t x_24; lean_dec(x_17); x_24 = !lean_is_exclusive(x_15); if (x_24 == 0) { lean_object* x_25; uint8_t x_26; x_25 = lean_ctor_get(x_15, 0); lean_dec(x_25); x_26 = !lean_is_exclusive(x_16); if (x_26 == 0) { lean_object* x_27; lean_object* x_28; x_27 = lean_ctor_get(x_16, 0); lean_dec(x_27); x_28 = lean_ctor_get(x_18, 0); lean_inc(x_28); lean_dec(x_18); lean_ctor_set(x_16, 0, x_28); return x_15; } else { lean_object* x_29; lean_object* x_30; lean_object* x_31; x_29 = lean_ctor_get(x_16, 1); lean_inc(x_29); lean_dec(x_16); x_30 = lean_ctor_get(x_18, 0); lean_inc(x_30); lean_dec(x_18); x_31 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_31, 0, x_30); lean_ctor_set(x_31, 1, x_29); lean_ctor_set(x_15, 0, x_31); return x_15; } } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; x_32 = lean_ctor_get(x_15, 1); lean_inc(x_32); lean_dec(x_15); x_33 = lean_ctor_get(x_16, 1); lean_inc(x_33); if (lean_is_exclusive(x_16)) { lean_ctor_release(x_16, 0); lean_ctor_release(x_16, 1); x_34 = x_16; } else { lean_dec_ref(x_16); x_34 = lean_box(0); } x_35 = lean_ctor_get(x_18, 0); lean_inc(x_35); lean_dec(x_18); if (lean_is_scalar(x_34)) { x_36 = lean_alloc_ctor(0, 2, 0); } else { x_36 = x_34; } lean_ctor_set(x_36, 0, x_35); lean_ctor_set(x_36, 1, x_33); x_37 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_37, 0, x_36); lean_ctor_set(x_37, 1, x_32); return x_37; } } } else { lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; size_t x_42; size_t x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; x_38 = lean_ctor_get(x_4, 0); 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_5); x_41 = lean_array_get_size(x_38); x_42 = lean_usize_of_nat(x_41); lean_dec(x_41); x_43 = 0; x_44 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__5(x_1, x_2, x_39, x_38, x_42, x_43, x_40, x_6, x_7, x_8); x_45 = lean_ctor_get(x_44, 0); lean_inc(x_45); x_46 = lean_ctor_get(x_45, 0); lean_inc(x_46); x_47 = lean_ctor_get(x_46, 0); lean_inc(x_47); if (lean_obj_tag(x_47) == 0) { lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; x_48 = lean_ctor_get(x_44, 1); lean_inc(x_48); lean_dec(x_44); x_49 = lean_ctor_get(x_45, 1); lean_inc(x_49); lean_dec(x_45); x_50 = lean_ctor_get(x_46, 1); lean_inc(x_50); lean_dec(x_46); x_51 = lean_box(0); x_52 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__3___lambda__1(x_50, x_51, x_6, x_49, x_48); return x_52; } else { uint8_t x_53; lean_dec(x_46); x_53 = !lean_is_exclusive(x_44); if (x_53 == 0) { lean_object* x_54; uint8_t x_55; x_54 = lean_ctor_get(x_44, 0); lean_dec(x_54); x_55 = !lean_is_exclusive(x_45); if (x_55 == 0) { lean_object* x_56; lean_object* x_57; x_56 = lean_ctor_get(x_45, 0); lean_dec(x_56); x_57 = lean_ctor_get(x_47, 0); lean_inc(x_57); lean_dec(x_47); lean_ctor_set(x_45, 0, x_57); return x_44; } else { lean_object* x_58; lean_object* x_59; lean_object* x_60; x_58 = lean_ctor_get(x_45, 1); lean_inc(x_58); lean_dec(x_45); x_59 = lean_ctor_get(x_47, 0); lean_inc(x_59); lean_dec(x_47); x_60 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_60, 0, x_59); lean_ctor_set(x_60, 1, x_58); lean_ctor_set(x_44, 0, x_60); return x_44; } } 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; x_61 = lean_ctor_get(x_44, 1); lean_inc(x_61); lean_dec(x_44); x_62 = lean_ctor_get(x_45, 1); lean_inc(x_62); if (lean_is_exclusive(x_45)) { lean_ctor_release(x_45, 0); lean_ctor_release(x_45, 1); x_63 = x_45; } else { lean_dec_ref(x_45); x_63 = lean_box(0); } x_64 = lean_ctor_get(x_47, 0); lean_inc(x_64); lean_dec(x_47); if (lean_is_scalar(x_63)) { x_65 = lean_alloc_ctor(0, 2, 0); } else { x_65 = x_63; } lean_ctor_set(x_65, 0, x_64); lean_ctor_set(x_65, 1, x_62); x_66 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_66, 0, x_65); lean_ctor_set(x_66, 1, x_61); return x_66; } } } } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, size_t x_5, size_t x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { uint8_t x_11; x_11 = x_6 < x_5; if (x_11 == 0) { lean_object* x_12; lean_object* x_13; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_7); lean_ctor_set(x_12, 1, x_9); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_10); return x_13; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_dec(x_7); x_14 = lean_array_uget(x_4, x_6); lean_inc(x_2); lean_inc(x_1); x_15 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__5___lambda__1___boxed), 5, 2); lean_closure_set(x_15, 0, x_1); lean_closure_set(x_15, 1, x_2); x_16 = l_Lean_Elab_InfoTree_deepestNodes___rarg(x_15, x_14); x_17 = lean_box(0); x_18 = l_List_forIn_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__1(x_1, x_16, x_17, x_8, x_9, x_10); lean_dec(x_16); 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_ctor_get(x_19, 1); lean_inc(x_21); lean_dec(x_19); lean_inc(x_3); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_3); lean_ctor_set(x_22, 1, x_17); x_23 = 1; x_24 = x_6 + x_23; x_6 = x_24; x_7 = x_22; x_9 = x_21; x_10 = x_20; goto _start; } } } lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__2___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; lean_object* x_7; x_6 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_6, 0, x_1); lean_ctor_set(x_6, 1, x_4); x_7 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_7, 0, x_6); lean_ctor_set(x_7, 1, x_5); return x_7; } } lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__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) { _start: { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_8 = lean_ctor_get(x_3, 0); lean_inc(x_4); lean_inc(x_2); lean_inc(x_1); x_9 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__3(x_1, x_2, x_4, x_8, x_4, x_5, x_6, x_7); lean_dec(x_4); x_10 = lean_ctor_get(x_9, 0); lean_inc(x_10); x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); if (lean_obj_tag(x_11) == 0) { uint8_t x_12; lean_dec(x_2); lean_dec(x_1); x_12 = !lean_is_exclusive(x_9); if (x_12 == 0) { lean_object* x_13; uint8_t x_14; x_13 = lean_ctor_get(x_9, 0); lean_dec(x_13); x_14 = !lean_is_exclusive(x_10); if (x_14 == 0) { lean_object* x_15; lean_object* x_16; x_15 = lean_ctor_get(x_10, 0); lean_dec(x_15); x_16 = lean_ctor_get(x_11, 0); lean_inc(x_16); lean_dec(x_11); lean_ctor_set(x_10, 0, x_16); return x_9; } else { lean_object* x_17; lean_object* x_18; lean_object* x_19; x_17 = lean_ctor_get(x_10, 1); lean_inc(x_17); lean_dec(x_10); x_18 = lean_ctor_get(x_11, 0); lean_inc(x_18); lean_dec(x_11); x_19 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_17); lean_ctor_set(x_9, 0, x_19); return x_9; } } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_20 = lean_ctor_get(x_9, 1); lean_inc(x_20); lean_dec(x_9); x_21 = lean_ctor_get(x_10, 1); lean_inc(x_21); if (lean_is_exclusive(x_10)) { lean_ctor_release(x_10, 0); lean_ctor_release(x_10, 1); x_22 = x_10; } else { lean_dec_ref(x_10); x_22 = lean_box(0); } x_23 = lean_ctor_get(x_11, 0); lean_inc(x_23); lean_dec(x_11); if (lean_is_scalar(x_22)) { x_24 = lean_alloc_ctor(0, 2, 0); } else { x_24 = x_22; } lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_21); x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_20); return x_25; } } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; size_t x_33; size_t x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; x_26 = lean_ctor_get(x_9, 1); lean_inc(x_26); lean_dec(x_9); x_27 = lean_ctor_get(x_10, 1); lean_inc(x_27); lean_dec(x_10); x_28 = lean_ctor_get(x_11, 0); lean_inc(x_28); lean_dec(x_11); x_29 = lean_ctor_get(x_3, 1); x_30 = lean_box(0); x_31 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_31, 0, x_30); lean_ctor_set(x_31, 1, x_28); x_32 = lean_array_get_size(x_29); x_33 = lean_usize_of_nat(x_32); lean_dec(x_32); x_34 = 0; x_35 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__6(x_1, x_2, x_30, x_29, x_33, x_34, x_31, x_5, x_27, x_26); x_36 = lean_ctor_get(x_35, 0); lean_inc(x_36); x_37 = lean_ctor_get(x_36, 0); lean_inc(x_37); x_38 = lean_ctor_get(x_37, 0); lean_inc(x_38); if (lean_obj_tag(x_38) == 0) { lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; x_39 = lean_ctor_get(x_35, 1); lean_inc(x_39); lean_dec(x_35); x_40 = lean_ctor_get(x_36, 1); lean_inc(x_40); lean_dec(x_36); x_41 = lean_ctor_get(x_37, 1); lean_inc(x_41); lean_dec(x_37); x_42 = lean_box(0); x_43 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__2___lambda__1(x_41, x_42, x_5, x_40, x_39); return x_43; } else { uint8_t x_44; lean_dec(x_37); x_44 = !lean_is_exclusive(x_35); if (x_44 == 0) { lean_object* x_45; uint8_t x_46; x_45 = lean_ctor_get(x_35, 0); lean_dec(x_45); x_46 = !lean_is_exclusive(x_36); if (x_46 == 0) { lean_object* x_47; lean_object* x_48; x_47 = lean_ctor_get(x_36, 0); lean_dec(x_47); x_48 = lean_ctor_get(x_38, 0); lean_inc(x_48); lean_dec(x_38); lean_ctor_set(x_36, 0, x_48); return x_35; } else { lean_object* x_49; lean_object* x_50; lean_object* x_51; x_49 = lean_ctor_get(x_36, 1); lean_inc(x_49); lean_dec(x_36); x_50 = lean_ctor_get(x_38, 0); lean_inc(x_50); lean_dec(x_38); x_51 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_51, 0, x_50); lean_ctor_set(x_51, 1, x_49); lean_ctor_set(x_35, 0, x_51); return x_35; } } else { 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_52 = lean_ctor_get(x_35, 1); lean_inc(x_52); lean_dec(x_35); x_53 = lean_ctor_get(x_36, 1); lean_inc(x_53); if (lean_is_exclusive(x_36)) { lean_ctor_release(x_36, 0); lean_ctor_release(x_36, 1); x_54 = x_36; } else { lean_dec_ref(x_36); x_54 = lean_box(0); } x_55 = lean_ctor_get(x_38, 0); lean_inc(x_55); lean_dec(x_38); if (lean_is_scalar(x_54)) { x_56 = lean_alloc_ctor(0, 2, 0); } else { x_56 = x_54; } lean_ctor_set(x_56, 0, x_55); lean_ctor_set(x_56, 1, x_53); x_57 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_57, 0, x_56); lean_ctor_set(x_57, 1, x_52); return x_57; } } } } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightId(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { uint8_t x_5; lean_object* x_6; x_5 = 0; x_6 = l_Lean_Syntax_getPos_x3f(x_1, x_5); if (lean_obj_tag(x_6) == 0) { lean_object* x_7; lean_object* x_8; lean_object* x_9; x_7 = lean_box(0); x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_7); lean_ctor_set(x_8, 1, x_3); x_9 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_9, 0, x_8); lean_ctor_set(x_9, 1, x_4); return x_9; } else { lean_object* x_10; lean_object* x_11; x_10 = lean_ctor_get(x_6, 0); lean_inc(x_10); lean_dec(x_6); x_11 = l_Lean_Syntax_getTailPos_x3f(x_1, x_5); if (lean_obj_tag(x_11) == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_dec(x_10); x_12 = lean_box(0); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_3); x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_4); return x_14; } else { lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; x_15 = lean_ctor_get(x_11, 0); lean_inc(x_15); lean_dec(x_11); x_16 = lean_ctor_get(x_2, 3); x_17 = lean_ctor_get(x_16, 1); x_18 = lean_box(0); x_19 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__2(x_10, x_15, x_17, x_18, x_2, x_3, x_4); x_20 = !lean_is_exclusive(x_19); if (x_20 == 0) { lean_object* x_21; uint8_t x_22; x_21 = lean_ctor_get(x_19, 0); x_22 = !lean_is_exclusive(x_21); if (x_22 == 0) { lean_object* x_23; x_23 = lean_ctor_get(x_21, 0); lean_dec(x_23); lean_ctor_set(x_21, 0, x_18); return x_19; } else { lean_object* x_24; lean_object* x_25; x_24 = lean_ctor_get(x_21, 1); lean_inc(x_24); lean_dec(x_21); x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_18); lean_ctor_set(x_25, 1, x_24); lean_ctor_set(x_19, 0, x_25); return x_19; } } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; x_26 = lean_ctor_get(x_19, 0); x_27 = lean_ctor_get(x_19, 1); lean_inc(x_27); lean_inc(x_26); lean_dec(x_19); x_28 = lean_ctor_get(x_26, 1); lean_inc(x_28); if (lean_is_exclusive(x_26)) { lean_ctor_release(x_26, 0); lean_ctor_release(x_26, 1); x_29 = x_26; } else { lean_dec_ref(x_26); x_29 = lean_box(0); } if (lean_is_scalar(x_29)) { x_30 = lean_alloc_ctor(0, 2, 0); } else { x_30 = x_29; } lean_ctor_set(x_30, 0, x_18); lean_ctor_set(x_30, 1, x_28); x_31 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_31, 0, x_30); lean_ctor_set(x_31, 1, x_27); return x_31; } } } } } lean_object* l_List_forIn_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___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: { lean_object* x_7; x_7 = l_List_forIn_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); return x_7; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___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, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { size_t x_12; size_t x_13; lean_object* x_14; x_12 = lean_unbox_usize(x_6); lean_dec(x_6); x_13 = lean_unbox_usize(x_7); lean_dec(x_7); x_14 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__4(x_1, x_2, x_3, x_4, x_5, x_12, x_13, x_8, x_9, x_10, x_11); lean_dec(x_9); lean_dec(x_5); lean_dec(x_3); return x_14; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___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) { _start: { lean_object* x_6; x_6 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__5___lambda__1(x_1, x_2, x_3, x_4, x_5); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_6; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___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* x_8, lean_object* x_9, lean_object* x_10) { _start: { size_t x_11; size_t x_12; lean_object* x_13; x_11 = lean_unbox_usize(x_5); lean_dec(x_5); x_12 = lean_unbox_usize(x_6); lean_dec(x_6); x_13 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__5(x_1, x_2, x_3, x_4, x_11, x_12, x_7, x_8, x_9, x_10); lean_dec(x_8); lean_dec(x_4); return x_13; } } lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__3___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__3___lambda__1(x_1, x_2, x_3, x_4, x_5); lean_dec(x_3); lean_dec(x_2); return x_6; } } lean_object* l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__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: { lean_object* x_9; x_9 = l_Std_PersistentArray_forInAux___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); lean_dec(x_6); lean_dec(x_4); lean_dec(x_3); return x_9; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___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* x_8, lean_object* x_9, lean_object* x_10) { _start: { size_t x_11; size_t x_12; lean_object* x_13; x_11 = lean_unbox_usize(x_5); lean_dec(x_5); x_12 = lean_unbox_usize(x_6); lean_dec(x_6); x_13 = l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__6(x_1, x_2, x_3, x_4, x_11, x_12, x_7, x_8, x_9, x_10); lean_dec(x_8); lean_dec(x_4); return x_13; } } lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__2___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__2___lambda__1(x_1, x_2, x_3, x_4, x_5); lean_dec(x_3); lean_dec(x_2); return x_6; } } lean_object* l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___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: { lean_object* x_8; x_8 = l_Std_PersistentArray_forIn___at_Lean_Server_FileWorker_handleSemanticTokens_highlightId___spec__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_5); lean_dec(x_3); return x_8; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightId___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_Server_FileWorker_handleSemanticTokens_highlightId(x_1, x_2, x_3, x_4); lean_dec(x_2); lean_dec(x_1); return x_5; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightKeyword(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_1) == 2) { lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; x_5 = lean_ctor_get(x_1, 1); x_6 = lean_string_utf8_byte_size(x_5); x_7 = lean_unsigned_to_nat(0u); x_8 = lean_nat_dec_lt(x_7, x_6); lean_dec(x_6); if (x_8 == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; x_9 = lean_box(0); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_10, 1, x_3); x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_4); return x_11; } else { uint32_t x_12; uint8_t x_13; x_12 = lean_string_utf8_get(x_5, x_7); x_13 = l_Char_isAlpha(x_12); if (x_13 == 0) { lean_object* x_14; lean_object* x_15; lean_object* x_16; x_14 = lean_box(0); x_15 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_3); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_15); lean_ctor_set(x_16, 1, x_4); return x_16; } else { uint8_t x_17; lean_object* x_18; x_17 = 0; x_18 = l_Lean_Server_FileWorker_handleSemanticTokens_addToken(x_1, x_17, x_2, x_3, x_4); return x_18; } } } else { lean_object* x_19; lean_object* x_20; lean_object* x_21; x_19 = lean_box(0); x_20 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_20, 0, x_19); lean_ctor_set(x_20, 1, x_3); x_21 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_21, 0, x_20); lean_ctor_set(x_21, 1, x_4); return x_21; } } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_highlightKeyword___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_Server_FileWorker_handleSemanticTokens_highlightKeyword(x_1, x_2, x_3, x_4); lean_dec(x_2); lean_dec(x_1); return x_5; } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_handleSemanticTokens_go___spec__1(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { uint8_t x_8; x_8 = x_2 == x_3; if (x_8 == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; size_t x_15; size_t x_16; lean_dec(x_4); x_9 = lean_array_uget(x_1, x_2); x_10 = l_Lean_Server_FileWorker_handleSemanticTokens_go(x_9, x_5, x_6, x_7); x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); x_12 = lean_ctor_get(x_10, 1); lean_inc(x_12); lean_dec(x_10); x_13 = lean_ctor_get(x_11, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_11, 1); lean_inc(x_14); lean_dec(x_11); x_15 = 1; x_16 = x_2 + x_15; x_2 = x_16; x_4 = x_13; x_6 = x_14; x_7 = x_12; goto _start; } else { lean_object* x_18; lean_object* x_19; x_18 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_18, 0, x_4); lean_ctor_set(x_18, 1, x_6); x_19 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_7); return x_19; } } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_go(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; uint8_t x_6; x_5 = l_Lean_Parser_Term_proj___elambda__1___closed__1; lean_inc(x_1); x_6 = l_Lean_Syntax_isOfKind(x_1, x_5); if (x_6 == 0) { lean_object* x_7; uint8_t x_8; x_7 = l_Lean_identKind___closed__2; lean_inc(x_1); x_8 = l_Lean_Syntax_isOfKind(x_1, x_7); if (x_8 == 0) { 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_Server_FileWorker_noHighlightKinds; x_11 = l_Array_contains___at_Lean_Elab_InfoTree_hoverableInfoAt_x3f___spec__1(x_10, x_9); lean_dec(x_9); if (x_11 == 0) { lean_object* x_12; uint8_t x_13; x_12 = l_Lean_Server_FileWorker_handleSemanticTokens_highlightKeyword(x_1, x_2, x_3, x_4); x_13 = !lean_is_exclusive(x_12); if (x_13 == 0) { lean_object* x_14; uint8_t x_15; x_14 = lean_ctor_get(x_12, 0); x_15 = !lean_is_exclusive(x_14); if (x_15 == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; x_16 = lean_ctor_get(x_12, 1); x_17 = lean_ctor_get(x_14, 1); x_18 = lean_ctor_get(x_14, 0); lean_dec(x_18); x_19 = l_Lean_choiceKind; lean_inc(x_1); x_20 = l_Lean_Syntax_isOfKind(x_1, x_19); if (x_20 == 0) { lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; x_21 = l_Lean_Syntax_getArgs(x_1); lean_dec(x_1); x_22 = lean_array_get_size(x_21); x_23 = lean_unsigned_to_nat(0u); x_24 = lean_nat_dec_lt(x_23, x_22); if (x_24 == 0) { lean_object* x_25; lean_dec(x_22); lean_dec(x_21); x_25 = lean_box(0); lean_ctor_set(x_14, 0, x_25); return x_12; } else { uint8_t x_26; x_26 = lean_nat_dec_le(x_22, x_22); if (x_26 == 0) { lean_object* x_27; lean_dec(x_22); lean_dec(x_21); x_27 = lean_box(0); lean_ctor_set(x_14, 0, x_27); return x_12; } else { size_t x_28; size_t x_29; lean_object* x_30; lean_object* x_31; lean_free_object(x_14); lean_free_object(x_12); x_28 = 0; x_29 = lean_usize_of_nat(x_22); lean_dec(x_22); x_30 = lean_box(0); x_31 = l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_handleSemanticTokens_go___spec__1(x_21, x_28, x_29, x_30, x_2, x_17, x_16); lean_dec(x_21); return x_31; } } } else { lean_object* x_32; lean_object* x_33; lean_free_object(x_14); lean_free_object(x_12); x_32 = lean_unsigned_to_nat(0u); x_33 = l_Lean_Syntax_getArg(x_1, x_32); lean_dec(x_1); x_1 = x_33; x_3 = x_17; x_4 = x_16; goto _start; } } else { lean_object* x_35; lean_object* x_36; lean_object* x_37; uint8_t x_38; x_35 = lean_ctor_get(x_12, 1); x_36 = lean_ctor_get(x_14, 1); lean_inc(x_36); lean_dec(x_14); x_37 = l_Lean_choiceKind; lean_inc(x_1); x_38 = l_Lean_Syntax_isOfKind(x_1, x_37); if (x_38 == 0) { lean_object* x_39; lean_object* x_40; lean_object* x_41; uint8_t x_42; x_39 = l_Lean_Syntax_getArgs(x_1); lean_dec(x_1); x_40 = lean_array_get_size(x_39); x_41 = lean_unsigned_to_nat(0u); x_42 = lean_nat_dec_lt(x_41, x_40); if (x_42 == 0) { lean_object* x_43; lean_object* x_44; lean_dec(x_40); lean_dec(x_39); x_43 = lean_box(0); x_44 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_44, 0, x_43); lean_ctor_set(x_44, 1, x_36); lean_ctor_set(x_12, 0, x_44); return x_12; } else { uint8_t x_45; x_45 = lean_nat_dec_le(x_40, x_40); if (x_45 == 0) { lean_object* x_46; lean_object* x_47; lean_dec(x_40); lean_dec(x_39); x_46 = lean_box(0); x_47 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_47, 0, x_46); lean_ctor_set(x_47, 1, x_36); lean_ctor_set(x_12, 0, x_47); return x_12; } else { size_t x_48; size_t x_49; lean_object* x_50; lean_object* x_51; lean_free_object(x_12); x_48 = 0; x_49 = lean_usize_of_nat(x_40); lean_dec(x_40); x_50 = lean_box(0); x_51 = l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_handleSemanticTokens_go___spec__1(x_39, x_48, x_49, x_50, x_2, x_36, x_35); lean_dec(x_39); return x_51; } } } else { lean_object* x_52; lean_object* x_53; lean_free_object(x_12); x_52 = lean_unsigned_to_nat(0u); x_53 = l_Lean_Syntax_getArg(x_1, x_52); lean_dec(x_1); x_1 = x_53; x_3 = x_36; x_4 = x_35; goto _start; } } } else { lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; uint8_t x_60; x_55 = lean_ctor_get(x_12, 0); x_56 = lean_ctor_get(x_12, 1); lean_inc(x_56); lean_inc(x_55); lean_dec(x_12); x_57 = lean_ctor_get(x_55, 1); lean_inc(x_57); if (lean_is_exclusive(x_55)) { lean_ctor_release(x_55, 0); lean_ctor_release(x_55, 1); x_58 = x_55; } else { lean_dec_ref(x_55); x_58 = lean_box(0); } x_59 = l_Lean_choiceKind; lean_inc(x_1); x_60 = l_Lean_Syntax_isOfKind(x_1, x_59); if (x_60 == 0) { lean_object* x_61; lean_object* x_62; lean_object* x_63; uint8_t x_64; x_61 = l_Lean_Syntax_getArgs(x_1); lean_dec(x_1); x_62 = lean_array_get_size(x_61); x_63 = lean_unsigned_to_nat(0u); x_64 = lean_nat_dec_lt(x_63, x_62); if (x_64 == 0) { lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_dec(x_62); lean_dec(x_61); x_65 = lean_box(0); if (lean_is_scalar(x_58)) { x_66 = lean_alloc_ctor(0, 2, 0); } else { x_66 = x_58; } lean_ctor_set(x_66, 0, x_65); lean_ctor_set(x_66, 1, x_57); x_67 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_67, 0, x_66); lean_ctor_set(x_67, 1, x_56); return x_67; } else { uint8_t x_68; x_68 = lean_nat_dec_le(x_62, x_62); if (x_68 == 0) { lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_dec(x_62); lean_dec(x_61); x_69 = lean_box(0); if (lean_is_scalar(x_58)) { x_70 = lean_alloc_ctor(0, 2, 0); } else { x_70 = x_58; } lean_ctor_set(x_70, 0, x_69); lean_ctor_set(x_70, 1, x_57); x_71 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_71, 0, x_70); lean_ctor_set(x_71, 1, x_56); return x_71; } else { size_t x_72; size_t x_73; lean_object* x_74; lean_object* x_75; lean_dec(x_58); x_72 = 0; x_73 = lean_usize_of_nat(x_62); lean_dec(x_62); x_74 = lean_box(0); x_75 = l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_handleSemanticTokens_go___spec__1(x_61, x_72, x_73, x_74, x_2, x_57, x_56); lean_dec(x_61); return x_75; } } } else { lean_object* x_76; lean_object* x_77; lean_dec(x_58); x_76 = lean_unsigned_to_nat(0u); x_77 = l_Lean_Syntax_getArg(x_1, x_76); lean_dec(x_1); x_1 = x_77; x_3 = x_57; x_4 = x_56; goto _start; } } } else { lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_dec(x_1); x_79 = lean_box(0); x_80 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_80, 0, x_79); lean_ctor_set(x_80, 1, x_3); x_81 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_81, 0, x_80); lean_ctor_set(x_81, 1, x_4); return x_81; } } else { lean_object* x_82; x_82 = l_Lean_Server_FileWorker_handleSemanticTokens_highlightId(x_1, x_2, x_3, x_4); lean_dec(x_1); return x_82; } } else { lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; uint8_t x_88; x_83 = lean_unsigned_to_nat(0u); x_84 = l_Lean_Syntax_getArg(x_1, x_83); x_85 = lean_unsigned_to_nat(2u); x_86 = l_Lean_Syntax_getArg(x_1, x_85); x_87 = l_Lean_identKind___closed__2; lean_inc(x_86); x_88 = l_Lean_Syntax_isOfKind(x_86, x_87); if (x_88 == 0) { lean_object* x_89; lean_object* x_90; uint8_t x_91; lean_dec(x_86); lean_dec(x_84); lean_inc(x_1); x_89 = l_Lean_Syntax_getKind(x_1); x_90 = l_Lean_Server_FileWorker_noHighlightKinds; x_91 = l_Array_contains___at_Lean_Elab_InfoTree_hoverableInfoAt_x3f___spec__1(x_90, x_89); lean_dec(x_89); if (x_91 == 0) { lean_object* x_92; uint8_t x_93; x_92 = l_Lean_Server_FileWorker_handleSemanticTokens_highlightKeyword(x_1, x_2, x_3, x_4); x_93 = !lean_is_exclusive(x_92); if (x_93 == 0) { lean_object* x_94; uint8_t x_95; x_94 = lean_ctor_get(x_92, 0); x_95 = !lean_is_exclusive(x_94); if (x_95 == 0) { lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; uint8_t x_100; x_96 = lean_ctor_get(x_92, 1); x_97 = lean_ctor_get(x_94, 1); x_98 = lean_ctor_get(x_94, 0); lean_dec(x_98); x_99 = l_Lean_choiceKind; lean_inc(x_1); x_100 = l_Lean_Syntax_isOfKind(x_1, x_99); if (x_100 == 0) { lean_object* x_101; lean_object* x_102; uint8_t x_103; x_101 = l_Lean_Syntax_getArgs(x_1); lean_dec(x_1); x_102 = lean_array_get_size(x_101); x_103 = lean_nat_dec_lt(x_83, x_102); if (x_103 == 0) { lean_object* x_104; lean_dec(x_102); lean_dec(x_101); x_104 = lean_box(0); lean_ctor_set(x_94, 0, x_104); return x_92; } else { uint8_t x_105; x_105 = lean_nat_dec_le(x_102, x_102); if (x_105 == 0) { lean_object* x_106; lean_dec(x_102); lean_dec(x_101); x_106 = lean_box(0); lean_ctor_set(x_94, 0, x_106); return x_92; } else { size_t x_107; size_t x_108; lean_object* x_109; lean_object* x_110; lean_free_object(x_94); lean_free_object(x_92); x_107 = 0; x_108 = lean_usize_of_nat(x_102); lean_dec(x_102); x_109 = lean_box(0); x_110 = l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_handleSemanticTokens_go___spec__1(x_101, x_107, x_108, x_109, x_2, x_97, x_96); lean_dec(x_101); return x_110; } } } else { lean_object* x_111; lean_free_object(x_94); lean_free_object(x_92); x_111 = l_Lean_Syntax_getArg(x_1, x_83); lean_dec(x_1); x_1 = x_111; x_3 = x_97; x_4 = x_96; goto _start; } } else { lean_object* x_113; lean_object* x_114; lean_object* x_115; uint8_t x_116; x_113 = lean_ctor_get(x_92, 1); x_114 = lean_ctor_get(x_94, 1); lean_inc(x_114); lean_dec(x_94); x_115 = l_Lean_choiceKind; lean_inc(x_1); x_116 = l_Lean_Syntax_isOfKind(x_1, x_115); if (x_116 == 0) { lean_object* x_117; lean_object* x_118; uint8_t x_119; x_117 = l_Lean_Syntax_getArgs(x_1); lean_dec(x_1); x_118 = lean_array_get_size(x_117); x_119 = lean_nat_dec_lt(x_83, x_118); if (x_119 == 0) { lean_object* x_120; lean_object* x_121; lean_dec(x_118); lean_dec(x_117); x_120 = lean_box(0); x_121 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_121, 0, x_120); lean_ctor_set(x_121, 1, x_114); lean_ctor_set(x_92, 0, x_121); return x_92; } else { uint8_t x_122; x_122 = lean_nat_dec_le(x_118, x_118); if (x_122 == 0) { lean_object* x_123; lean_object* x_124; lean_dec(x_118); lean_dec(x_117); x_123 = lean_box(0); x_124 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_124, 0, x_123); lean_ctor_set(x_124, 1, x_114); lean_ctor_set(x_92, 0, x_124); return x_92; } else { size_t x_125; size_t x_126; lean_object* x_127; lean_object* x_128; lean_free_object(x_92); x_125 = 0; x_126 = lean_usize_of_nat(x_118); lean_dec(x_118); x_127 = lean_box(0); x_128 = l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_handleSemanticTokens_go___spec__1(x_117, x_125, x_126, x_127, x_2, x_114, x_113); lean_dec(x_117); return x_128; } } } else { lean_object* x_129; lean_free_object(x_92); x_129 = l_Lean_Syntax_getArg(x_1, x_83); lean_dec(x_1); x_1 = x_129; x_3 = x_114; x_4 = x_113; goto _start; } } } else { lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; uint8_t x_136; x_131 = lean_ctor_get(x_92, 0); x_132 = lean_ctor_get(x_92, 1); lean_inc(x_132); lean_inc(x_131); lean_dec(x_92); x_133 = lean_ctor_get(x_131, 1); lean_inc(x_133); if (lean_is_exclusive(x_131)) { lean_ctor_release(x_131, 0); lean_ctor_release(x_131, 1); x_134 = x_131; } else { lean_dec_ref(x_131); x_134 = lean_box(0); } x_135 = l_Lean_choiceKind; lean_inc(x_1); x_136 = l_Lean_Syntax_isOfKind(x_1, x_135); if (x_136 == 0) { lean_object* x_137; lean_object* x_138; uint8_t x_139; x_137 = l_Lean_Syntax_getArgs(x_1); lean_dec(x_1); x_138 = lean_array_get_size(x_137); x_139 = lean_nat_dec_lt(x_83, x_138); if (x_139 == 0) { lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_dec(x_138); lean_dec(x_137); x_140 = lean_box(0); if (lean_is_scalar(x_134)) { x_141 = lean_alloc_ctor(0, 2, 0); } else { x_141 = x_134; } lean_ctor_set(x_141, 0, x_140); lean_ctor_set(x_141, 1, x_133); x_142 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_142, 0, x_141); lean_ctor_set(x_142, 1, x_132); return x_142; } else { uint8_t x_143; x_143 = lean_nat_dec_le(x_138, x_138); if (x_143 == 0) { lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_dec(x_138); lean_dec(x_137); x_144 = lean_box(0); if (lean_is_scalar(x_134)) { x_145 = lean_alloc_ctor(0, 2, 0); } else { x_145 = x_134; } lean_ctor_set(x_145, 0, x_144); lean_ctor_set(x_145, 1, x_133); x_146 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_146, 0, x_145); lean_ctor_set(x_146, 1, x_132); return x_146; } else { size_t x_147; size_t x_148; lean_object* x_149; lean_object* x_150; lean_dec(x_134); x_147 = 0; x_148 = lean_usize_of_nat(x_138); lean_dec(x_138); x_149 = lean_box(0); x_150 = l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_handleSemanticTokens_go___spec__1(x_137, x_147, x_148, x_149, x_2, x_133, x_132); lean_dec(x_137); return x_150; } } } else { lean_object* x_151; lean_dec(x_134); x_151 = l_Lean_Syntax_getArg(x_1, x_83); lean_dec(x_1); x_1 = x_151; x_3 = x_133; x_4 = x_132; goto _start; } } } else { lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_dec(x_1); x_153 = lean_box(0); x_154 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_154, 0, x_153); lean_ctor_set(x_154, 1, x_3); x_155 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_155, 0, x_154); lean_ctor_set(x_155, 1, x_4); return x_155; } } else { lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; uint8_t x_160; lean_object* x_161; lean_dec(x_1); x_156 = l_Lean_Server_FileWorker_handleSemanticTokens_go(x_84, x_2, x_3, x_4); x_157 = lean_ctor_get(x_156, 0); lean_inc(x_157); x_158 = lean_ctor_get(x_156, 1); lean_inc(x_158); lean_dec(x_156); x_159 = lean_ctor_get(x_157, 1); lean_inc(x_159); lean_dec(x_157); x_160 = 2; x_161 = l_Lean_Server_FileWorker_handleSemanticTokens_addToken(x_86, x_160, x_2, x_159, x_158); lean_dec(x_86); return x_161; } } } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_handleSemanticTokens_go___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) { _start: { size_t x_8; size_t x_9; lean_object* x_10; x_8 = lean_unbox_usize(x_2); lean_dec(x_2); x_9 = lean_unbox_usize(x_3); lean_dec(x_3); x_10 = l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_handleSemanticTokens_go___spec__1(x_1, x_8, x_9, x_4, x_5, x_6, x_7); lean_dec(x_5); lean_dec(x_1); return x_10; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens_go___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_Server_FileWorker_handleSemanticTokens_go(x_1, x_2, x_3, x_4); lean_dec(x_2); return x_5; } } lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_2) == 0) { uint8_t x_4; lean_dec(x_1); x_4 = !lean_is_exclusive(x_2); if (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; x_5 = lean_ctor_get(x_2, 0); x_6 = lean_box(0); x_7 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_7, 0, x_5); x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_6); lean_ctor_set(x_8, 1, x_7); lean_ctor_set_tag(x_2, 1); lean_ctor_set(x_2, 0, x_8); x_9 = lean_task_pure(x_2); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_10, 1, x_3); return x_10; } else { 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; x_11 = lean_ctor_get(x_2, 0); lean_inc(x_11); lean_dec(x_2); x_12 = lean_box(0); x_13 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_13, 0, x_11); x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_12); lean_ctor_set(x_14, 1, x_13); x_15 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_15, 0, x_14); x_16 = lean_task_pure(x_15); x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_3); return x_17; } } else { lean_object* x_18; lean_object* x_19; x_18 = lean_ctor_get(x_2, 0); lean_inc(x_18); lean_dec(x_2); x_19 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1(x_1, x_18, x_3); if (lean_obj_tag(x_19) == 0) { uint8_t x_20; x_20 = !lean_is_exclusive(x_19); if (x_20 == 0) { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; x_21 = lean_ctor_get(x_19, 0); x_22 = l_ExceptT_lift___rarg___closed__1; x_23 = l_Task_Priority_default; x_24 = lean_task_map(x_22, x_21, x_23); lean_ctor_set(x_19, 0, x_24); return x_19; } else { lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; x_25 = lean_ctor_get(x_19, 0); x_26 = lean_ctor_get(x_19, 1); lean_inc(x_26); lean_inc(x_25); lean_dec(x_19); x_27 = l_ExceptT_lift___rarg___closed__1; x_28 = l_Task_Priority_default; x_29 = lean_task_map(x_27, x_25, x_28); x_30 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_30, 0, x_29); lean_ctor_set(x_30, 1, x_26); return x_30; } } else { uint8_t x_31; x_31 = !lean_is_exclusive(x_19); if (x_31 == 0) { return x_19; } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; x_32 = lean_ctor_get(x_19, 0); x_33 = lean_ctor_get(x_19, 1); lean_inc(x_33); lean_inc(x_32); lean_dec(x_19); x_34 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_34, 0, x_32); lean_ctor_set(x_34, 1, x_33); return x_34; } } } } } lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1___lambda__2(lean_object* x_1) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_2 = lean_ctor_get(x_1, 0); x_3 = lean_box(0); lean_inc(x_2); x_4 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_4, 0, x_2); x_5 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_5, 0, x_4); x_6 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_6, 0, x_3); lean_ctor_set(x_6, 1, x_5); return x_6; } else { lean_object* x_7; x_7 = lean_ctor_get(x_1, 0); lean_inc(x_7); return x_7; } } } static lean_object* _init_l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1___lambda__2___boxed), 1, 0); return x_1; } } lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { switch (lean_obj_tag(x_2)) { case 0: { lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; 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); lean_inc(x_1); lean_inc(x_4); x_6 = lean_apply_1(x_1, x_4); x_7 = lean_unbox(x_6); lean_dec(x_6); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_dec(x_5); lean_dec(x_1); x_8 = lean_box(0); x_9 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_9, 0, x_4); lean_ctor_set(x_9, 1, x_8); x_10 = lean_box(0); x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_9); lean_ctor_set(x_11, 1, x_10); x_12 = lean_task_pure(x_11); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_3); return x_13; } else { lean_object* x_14; x_14 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1(x_1, x_5, x_3); if (lean_obj_tag(x_14) == 0) { uint8_t x_15; x_15 = !lean_is_exclusive(x_14); if (x_15 == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_16 = lean_ctor_get(x_14, 0); x_17 = lean_alloc_closure((void*)(l_IO_AsyncList_waitAll___rarg___lambda__1), 2, 1); lean_closure_set(x_17, 0, x_4); x_18 = l_Task_Priority_default; x_19 = lean_task_map(x_17, x_16, x_18); lean_ctor_set(x_14, 0, x_19); return x_14; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_20 = lean_ctor_get(x_14, 0); x_21 = lean_ctor_get(x_14, 1); lean_inc(x_21); lean_inc(x_20); lean_dec(x_14); x_22 = lean_alloc_closure((void*)(l_IO_AsyncList_waitAll___rarg___lambda__1), 2, 1); lean_closure_set(x_22, 0, x_4); x_23 = l_Task_Priority_default; x_24 = lean_task_map(x_22, x_20, x_23); x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_21); return x_25; } } else { uint8_t x_26; lean_dec(x_4); x_26 = !lean_is_exclusive(x_14); if (x_26 == 0) { return x_14; } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; x_27 = lean_ctor_get(x_14, 0); x_28 = lean_ctor_get(x_14, 1); lean_inc(x_28); lean_inc(x_27); lean_dec(x_14); x_29 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_29, 0, x_27); lean_ctor_set(x_29, 1, x_28); return x_29; } } } } case 1: { lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; x_30 = lean_ctor_get(x_2, 0); lean_inc(x_30); lean_dec(x_2); x_31 = lean_alloc_closure((void*)(l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1___lambda__1), 3, 1); lean_closure_set(x_31, 0, x_1); x_32 = l_Task_Priority_default; x_33 = lean_io_bind_task(x_30, x_31, x_32, x_3); if (lean_obj_tag(x_33) == 0) { uint8_t x_34; x_34 = !lean_is_exclusive(x_33); if (x_34 == 0) { lean_object* x_35; lean_object* x_36; lean_object* x_37; x_35 = lean_ctor_get(x_33, 0); x_36 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1___closed__1; x_37 = lean_task_map(x_36, x_35, x_32); lean_ctor_set(x_33, 0, x_37); return x_33; } else { lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; x_38 = lean_ctor_get(x_33, 0); x_39 = lean_ctor_get(x_33, 1); lean_inc(x_39); lean_inc(x_38); lean_dec(x_33); x_40 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1___closed__1; x_41 = lean_task_map(x_40, x_38, x_32); x_42 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_42, 0, x_41); lean_ctor_set(x_42, 1, x_39); return x_42; } } else { uint8_t x_43; x_43 = !lean_is_exclusive(x_33); if (x_43 == 0) { return x_33; } else { lean_object* x_44; lean_object* x_45; lean_object* x_46; x_44 = lean_ctor_get(x_33, 0); x_45 = lean_ctor_get(x_33, 1); lean_inc(x_45); lean_inc(x_44); lean_dec(x_33); 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; } } } default: { lean_object* x_47; lean_object* x_48; lean_dec(x_1); x_47 = l_IO_AsyncList_waitAll___rarg___closed__1; x_48 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_48, 0, x_47); lean_ctor_set(x_48, 1, x_3); return x_48; } } } } lean_object* l_List_forIn_loop___at_Lean_Server_FileWorker_handleSemanticTokens___spec__2___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; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; x_8 = lean_ctor_get(x_1, 1); lean_inc(x_8); x_9 = lean_ctor_get(x_1, 3); lean_inc(x_9); lean_dec(x_1); x_10 = lean_ctor_get(x_9, 7); lean_inc(x_10); lean_dec(x_9); x_11 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_11, 0, x_2); lean_ctor_set(x_11, 1, x_3); lean_ctor_set(x_11, 2, x_4); lean_ctor_set(x_11, 3, x_10); x_12 = l_Lean_Server_FileWorker_handleSemanticTokens_go(x_8, x_11, x_6, x_7); lean_dec(x_11); x_13 = !lean_is_exclusive(x_12); if (x_13 == 0) { lean_object* x_14; uint8_t x_15; x_14 = lean_ctor_get(x_12, 0); x_15 = !lean_is_exclusive(x_14); if (x_15 == 0) { lean_object* x_16; lean_object* x_17; x_16 = lean_ctor_get(x_14, 0); lean_dec(x_16); x_17 = l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1; lean_ctor_set(x_14, 0, x_17); return x_12; } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; x_18 = lean_ctor_get(x_14, 1); lean_inc(x_18); lean_dec(x_14); x_19 = l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1; x_20 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_20, 0, x_19); lean_ctor_set(x_20, 1, x_18); lean_ctor_set(x_12, 0, x_20); return x_12; } } else { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; x_21 = lean_ctor_get(x_12, 0); x_22 = lean_ctor_get(x_12, 1); lean_inc(x_22); lean_inc(x_21); lean_dec(x_12); x_23 = lean_ctor_get(x_21, 1); lean_inc(x_23); if (lean_is_exclusive(x_21)) { lean_ctor_release(x_21, 0); lean_ctor_release(x_21, 1); x_24 = x_21; } else { lean_dec_ref(x_21); x_24 = lean_box(0); } x_25 = l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1; if (lean_is_scalar(x_24)) { x_26 = lean_alloc_ctor(0, 2, 0); } else { x_26 = x_24; } lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_23); x_27 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_27, 0, x_26); lean_ctor_set(x_27, 1, x_22); return x_27; } } } lean_object* l_List_forIn_loop___at_Lean_Server_FileWorker_handleSemanticTokens___spec__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) { _start: { if (lean_obj_tag(x_4) == 0) { lean_object* x_8; lean_object* x_9; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_5); lean_ctor_set(x_8, 1, x_6); 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; lean_object* x_12; uint8_t x_13; lean_dec(x_5); x_10 = lean_ctor_get(x_4, 0); lean_inc(x_10); x_11 = lean_ctor_get(x_4, 1); lean_inc(x_11); lean_dec(x_4); x_12 = l_Lean_Server_Snapshots_Snapshot_endPos(x_10); x_13 = lean_nat_dec_le(x_12, x_1); lean_dec(x_12); if (x_13 == 0) { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; x_14 = lean_box(0); lean_inc(x_3); lean_inc(x_2); lean_inc(x_1); x_15 = l_List_forIn_loop___at_Lean_Server_FileWorker_handleSemanticTokens___spec__2___lambda__1(x_10, x_1, x_2, x_3, x_14, x_6, x_7); x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); x_17 = lean_ctor_get(x_16, 0); lean_inc(x_17); x_18 = lean_ctor_get(x_15, 1); lean_inc(x_18); lean_dec(x_15); x_19 = lean_ctor_get(x_16, 1); lean_inc(x_19); lean_dec(x_16); x_20 = lean_ctor_get(x_17, 0); lean_inc(x_20); lean_dec(x_17); x_4 = x_11; x_5 = x_20; x_6 = x_19; x_7 = x_18; goto _start; } else { lean_object* x_22; lean_dec(x_10); x_22 = lean_box(0); x_4 = x_11; x_5 = x_22; goto _start; } } } } uint8_t l_Lean_Server_FileWorker_handleSemanticTokens___lambda__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; uint8_t x_4; x_3 = lean_ctor_get(x_2, 0); x_4 = lean_nat_dec_lt(x_3, x_1); return x_4; } } static lean_object* _init_l_Lean_Server_FileWorker_handleSemanticTokens___lambda__2___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Array_empty___closed__1; x_2 = l_Lean_Lsp_instInhabitedPosition___closed__1; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens___lambda__2(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; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; x_6 = lean_ctor_get(x_4, 0); lean_inc(x_6); lean_dec(x_4); x_7 = lean_box(0); x_8 = l_Lean_Server_FileWorker_handleSemanticTokens___lambda__2___closed__1; x_9 = l_List_forIn_loop___at_Lean_Server_FileWorker_handleSemanticTokens___spec__2(x_1, x_2, x_3, x_6, x_7, x_8, x_5); x_10 = lean_ctor_get(x_9, 0); lean_inc(x_10); x_11 = lean_ctor_get(x_10, 1); lean_inc(x_11); lean_dec(x_10); x_12 = !lean_is_exclusive(x_9); if (x_12 == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; x_13 = lean_ctor_get(x_9, 0); lean_dec(x_13); x_14 = lean_ctor_get(x_11, 0); lean_inc(x_14); lean_dec(x_11); x_15 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_9, 0, x_15); return x_9; } else { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_16 = lean_ctor_get(x_9, 1); lean_inc(x_16); lean_dec(x_9); x_17 = lean_ctor_get(x_11, 0); lean_inc(x_17); lean_dec(x_11); x_18 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_18, 0, x_17); x_19 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_16); return x_19; } } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_5 = lean_ctor_get(x_3, 4); x_6 = lean_st_ref_get(x_5, x_4); x_7 = lean_ctor_get(x_6, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_6, 1); lean_inc(x_8); lean_dec(x_6); x_9 = lean_ctor_get(x_7, 0); lean_inc(x_9); x_10 = lean_ctor_get(x_9, 2); lean_inc(x_10); lean_dec(x_9); lean_inc(x_2); x_11 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleSemanticTokens___lambda__1___boxed), 2, 1); lean_closure_set(x_11, 0, x_2); x_12 = lean_ctor_get(x_7, 2); lean_inc(x_12); lean_dec(x_7); x_13 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1(x_11, x_12, x_8); if (lean_obj_tag(x_13) == 0) { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; 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_alloc_closure((void*)(l_Lean_Server_FileWorker_handleSemanticTokens___lambda__2), 5, 3); lean_closure_set(x_16, 0, x_1); lean_closure_set(x_16, 1, x_2); lean_closure_set(x_16, 2, x_10); x_17 = l_Task_Priority_default; x_18 = lean_io_map_task(x_16, x_14, x_17, x_15); return x_18; } else { uint8_t x_19; lean_dec(x_10); lean_dec(x_2); lean_dec(x_1); x_19 = !lean_is_exclusive(x_13); if (x_19 == 0) { return x_13; } else { 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_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; } } } } lean_object* l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1___lambda__2___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1___lambda__2(x_1); lean_dec(x_1); return x_2; } } lean_object* l_List_forIn_loop___at_Lean_Server_FileWorker_handleSemanticTokens___spec__2___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: { lean_object* x_8; x_8 = l_List_forIn_loop___at_Lean_Server_FileWorker_handleSemanticTokens___spec__2___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_5); return x_8; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens___lambda__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l_Lean_Server_FileWorker_handleSemanticTokens___lambda__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokens___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_Server_FileWorker_handleSemanticTokens(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } static lean_object* _init_l_Lean_Server_FileWorker_handleSemanticTokensFull___rarg___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_unsigned_to_nat(1u); x_2 = lean_unsigned_to_nat(16u); x_3 = lean_nat_shiftl(x_1, x_2); return x_3; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokensFull___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_unsigned_to_nat(0u); x_4 = l_Lean_Server_FileWorker_handleSemanticTokensFull___rarg___closed__1; x_5 = l_Lean_Server_FileWorker_handleSemanticTokens(x_3, x_4, x_1, x_2); return x_5; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokensFull(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleSemanticTokensFull___rarg___boxed), 2, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokensFull___rarg___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Server_FileWorker_handleSemanticTokensFull___rarg(x_1, x_2); lean_dec(x_1); return x_3; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokensFull___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Server_FileWorker_handleSemanticTokensFull(x_1); lean_dec(x_1); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokensRange(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_4 = lean_ctor_get(x_2, 4); x_5 = lean_st_ref_get(x_4, x_3); x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = lean_ctor_get(x_6, 0); lean_inc(x_8); lean_dec(x_6); x_9 = lean_ctor_get(x_8, 2); lean_inc(x_9); lean_dec(x_8); x_10 = lean_ctor_get(x_1, 1); lean_inc(x_10); lean_dec(x_1); x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); x_12 = l_Lean_FileMap_lspPosToUtf8Pos(x_9, x_11); x_13 = lean_ctor_get(x_10, 1); lean_inc(x_13); lean_dec(x_10); x_14 = l_Lean_FileMap_lspPosToUtf8Pos(x_9, x_13); lean_dec(x_9); x_15 = l_Lean_Server_FileWorker_handleSemanticTokens(x_12, x_14, x_2, x_7); return x_15; } } lean_object* l_Lean_Server_FileWorker_handleSemanticTokensRange___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_Server_FileWorker_handleSemanticTokensRange(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics_match__1___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); lean_dec(x_1); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_apply_1(x_3, x_6); return x_7; } } } lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleWaitForDiagnostics_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics_waitLoop(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; uint8_t x_6; x_4 = lean_ctor_get(x_2, 4); x_5 = lean_st_ref_get(x_4, x_3); x_6 = !lean_is_exclusive(x_5); if (x_6 == 0) { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; x_7 = lean_ctor_get(x_5, 0); x_8 = lean_ctor_get(x_5, 1); x_9 = lean_ctor_get(x_1, 1); x_10 = lean_ctor_get(x_7, 0); lean_inc(x_10); x_11 = lean_ctor_get(x_10, 1); lean_inc(x_11); lean_dec(x_10); x_12 = lean_nat_dec_le(x_9, x_11); lean_dec(x_11); if (x_12 == 0) { uint32_t x_13; lean_object* x_14; lean_free_object(x_5); lean_dec(x_7); x_13 = 50; x_14 = l_IO_sleep(x_13, x_8); if (lean_obj_tag(x_14) == 0) { lean_object* x_15; x_15 = lean_ctor_get(x_14, 1); lean_inc(x_15); lean_dec(x_14); x_3 = x_15; goto _start; } else { uint8_t x_17; x_17 = !lean_is_exclusive(x_14); if (x_17 == 0) { return x_14; } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; x_18 = lean_ctor_get(x_14, 0); x_19 = lean_ctor_get(x_14, 1); lean_inc(x_19); lean_inc(x_18); lean_dec(x_14); x_20 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_20, 0, x_18); lean_ctor_set(x_20, 1, x_19); return x_20; } } } else { return x_5; } } else { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; x_21 = lean_ctor_get(x_5, 0); x_22 = lean_ctor_get(x_5, 1); lean_inc(x_22); lean_inc(x_21); lean_dec(x_5); x_23 = lean_ctor_get(x_1, 1); x_24 = lean_ctor_get(x_21, 0); lean_inc(x_24); x_25 = lean_ctor_get(x_24, 1); lean_inc(x_25); lean_dec(x_24); x_26 = lean_nat_dec_le(x_23, x_25); lean_dec(x_25); if (x_26 == 0) { uint32_t x_27; lean_object* x_28; lean_dec(x_21); x_27 = 50; x_28 = l_IO_sleep(x_27, x_22); if (lean_obj_tag(x_28) == 0) { lean_object* x_29; x_29 = lean_ctor_get(x_28, 1); lean_inc(x_29); lean_dec(x_28); x_3 = x_29; goto _start; } else { lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; x_31 = lean_ctor_get(x_28, 0); lean_inc(x_31); x_32 = lean_ctor_get(x_28, 1); lean_inc(x_32); if (lean_is_exclusive(x_28)) { lean_ctor_release(x_28, 0); lean_ctor_release(x_28, 1); x_33 = x_28; } else { lean_dec_ref(x_28); x_33 = lean_box(0); } if (lean_is_scalar(x_33)) { x_34 = lean_alloc_ctor(1, 2, 0); } else { x_34 = x_33; } lean_ctor_set(x_34, 0, x_31); lean_ctor_set(x_34, 1, x_32); return x_34; } } else { lean_object* x_35; x_35 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_35, 0, x_21); lean_ctor_set(x_35, 1, x_22); return x_35; } } } } lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics_waitLoop___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_Server_FileWorker_handleWaitForDiagnostics_waitLoop(x_1, x_2, x_3); lean_dec(x_2); lean_dec(x_1); return x_4; } } uint8_t l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__1(lean_object* x_1) { _start: { uint8_t x_2; x_2 = 1; return x_2; } } static lean_object* _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__2___closed__1() { _start: { lean_object* x_1; lean_object* x_2; x_1 = lean_box(0); x_2 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__2___closed__1; return x_2; } } static lean_object* _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__1() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_IO_instInhabitedError; x_2 = lean_alloc_closure((void*)(l_EStateM_instInhabitedEStateM___rarg), 2, 1); lean_closure_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("Lean.Server.FileWorker"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("Lean.Server.FileWorker.handleWaitForDiagnostics"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__2; x_2 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__3; x_3 = lean_unsigned_to_nat(651u); x_4 = lean_unsigned_to_nat(26u); 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); return x_6; } } static lean_object* _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__5() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__1___boxed), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__6() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__2___boxed), 1, 0); return x_1; } } lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_dec(x_1); x_3 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__1; x_4 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__4; x_5 = lean_panic_fn(x_3, x_4); x_6 = lean_apply_1(x_5, x_2); return x_6; } else { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_7 = lean_ctor_get(x_1, 0); lean_inc(x_7); lean_dec(x_1); x_8 = lean_ctor_get(x_7, 2); lean_inc(x_8); lean_dec(x_7); x_9 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__5; x_10 = l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1(x_9, x_8, x_2); if (lean_obj_tag(x_10) == 0) { uint8_t x_11; x_11 = !lean_is_exclusive(x_10); if (x_11 == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_12 = lean_ctor_get(x_10, 0); x_13 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__6; x_14 = l_Task_Priority_default; x_15 = lean_task_map(x_13, x_12, x_14); lean_ctor_set(x_10, 0, x_15); return x_10; } 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_10, 0); x_17 = lean_ctor_get(x_10, 1); lean_inc(x_17); lean_inc(x_16); lean_dec(x_10); x_18 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__6; x_19 = l_Task_Priority_default; x_20 = lean_task_map(x_18, x_16, x_19); x_21 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_21, 0, x_20); lean_ctor_set(x_21, 1, x_17); return x_21; } } else { uint8_t x_22; x_22 = !lean_is_exclusive(x_10); if (x_22 == 0) { return x_10; } else { lean_object* x_23; lean_object* x_24; lean_object* x_25; x_23 = lean_ctor_get(x_10, 0); x_24 = lean_ctor_get(x_10, 1); lean_inc(x_24); lean_inc(x_23); lean_dec(x_10); 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; } } } } } static lean_object* _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__4___closed__1() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__2___closed__1; x_2 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__4(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__4___closed__1; return x_2; } } static lean_object* _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3), 2, 0); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___closed__2() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__4___boxed), 1, 0); return x_1; } } lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; x_4 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleWaitForDiagnostics_waitLoop___boxed), 3, 2); lean_closure_set(x_4, 0, x_1); lean_closure_set(x_4, 1, x_2); x_5 = l_Task_Priority_default; x_6 = lean_io_as_task(x_4, x_5, x_3); if (lean_obj_tag(x_6) == 0) { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_7 = lean_ctor_get(x_6, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_6, 1); lean_inc(x_8); lean_dec(x_6); x_9 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___closed__1; x_10 = lean_io_bind_task(x_7, x_9, x_5, x_8); if (lean_obj_tag(x_10) == 0) { uint8_t x_11; x_11 = !lean_is_exclusive(x_10); if (x_11 == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; x_12 = lean_ctor_get(x_10, 0); x_13 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___closed__2; x_14 = lean_task_map(x_13, x_12, x_5); lean_ctor_set(x_10, 0, x_14); return x_10; } else { lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_15 = lean_ctor_get(x_10, 0); x_16 = lean_ctor_get(x_10, 1); lean_inc(x_16); lean_inc(x_15); lean_dec(x_10); x_17 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___closed__2; x_18 = lean_task_map(x_17, x_15, x_5); x_19 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_16); return x_19; } } else { uint8_t x_20; x_20 = !lean_is_exclusive(x_10); if (x_20 == 0) { return x_10; } else { lean_object* x_21; lean_object* x_22; lean_object* x_23; x_21 = lean_ctor_get(x_10, 0); x_22 = lean_ctor_get(x_10, 1); lean_inc(x_22); lean_inc(x_21); lean_dec(x_10); x_23 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_23, 0, x_21); lean_ctor_set(x_23, 1, x_22); return x_23; } } } else { uint8_t x_24; x_24 = !lean_is_exclusive(x_6); if (x_24 == 0) { return x_6; } else { lean_object* x_25; lean_object* x_26; lean_object* x_27; x_25 = lean_ctor_get(x_6, 0); x_26 = lean_ctor_get(x_6, 1); lean_inc(x_26); lean_inc(x_25); lean_dec(x_6); x_27 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_27, 0, x_25); lean_ctor_set(x_27, 1, x_26); return x_27; } } } } lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__1___boxed(lean_object* x_1) { _start: { uint8_t x_2; lean_object* x_3; x_2 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__1(x_1); lean_dec(x_1); x_3 = lean_box(x_2); return x_3; } } lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__2___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__2(x_1); lean_dec(x_1); return x_2; } } lean_object* l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__4___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__4(x_1); lean_dec(x_1); return x_2; } } lean_object* l_Lean_Server_FileWorker_parseParams_match__1___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_FileWorker_parseParams_match__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_parseParams_match__1___rarg), 3, 0); return x_3; } } static lean_object* _init_l_Lean_Server_FileWorker_parseParams___rarg___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("Got param with wrong structure: "); return x_1; } } lean_object* l_Lean_Server_FileWorker_parseParams___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_inc(x_2); x_5 = lean_apply_1(x_1, x_2); 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; x_6 = l_Lean_Json_compress(x_2); x_7 = l_Lean_Server_FileWorker_parseParams___rarg___closed__1; x_8 = lean_string_append(x_7, x_6); lean_dec(x_6); x_9 = l_Lean_instInhabitedParserDescr___closed__1; x_10 = lean_string_append(x_8, x_9); x_11 = l_IO_throwServerError___rarg(x_10, x_4); return x_11; } else { lean_object* x_12; lean_object* x_13; lean_dec(x_2); x_12 = lean_ctor_get(x_5, 0); lean_inc(x_12); lean_dec(x_5); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_4); return x_13; } } } lean_object* l_Lean_Server_FileWorker_parseParams(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_parseParams___rarg___boxed), 4, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_parseParams___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_Server_FileWorker_parseParams___rarg(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } static lean_object* _init_l_Lean_Server_FileWorker_handleNotification_match__1___rarg___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("textDocument/didChange"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_handleNotification_match__1___rarg___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("$/cancelRequest"); return x_1; } } lean_object* l_Lean_Server_FileWorker_handleNotification_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; uint8_t x_6; x_5 = l_Lean_Server_FileWorker_handleNotification_match__1___rarg___closed__1; x_6 = lean_string_dec_eq(x_1, x_5); if (x_6 == 0) { lean_object* x_7; uint8_t x_8; lean_dec(x_2); x_7 = l_Lean_Server_FileWorker_handleNotification_match__1___rarg___closed__2; x_8 = lean_string_dec_eq(x_1, x_7); if (x_8 == 0) { lean_object* x_9; lean_dec(x_3); x_9 = lean_apply_1(x_4, x_1); return x_9; } else { lean_object* x_10; lean_object* x_11; lean_dec(x_4); lean_dec(x_1); x_10 = lean_box(0); x_11 = lean_apply_1(x_3, x_10); return x_11; } } else { lean_object* x_12; lean_object* x_13; lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); x_12 = lean_box(0); x_13 = lean_apply_1(x_2, x_12); return x_13; } } } lean_object* l_Lean_Server_FileWorker_handleNotification_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleNotification_match__1___rarg), 4, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleNotification___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonCancelParams____x40_Lean_Data_Lsp_Basic___hyg_96_(x_1); 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; x_5 = l_Lean_Json_compress(x_1); x_6 = l_Lean_Server_FileWorker_parseParams___rarg___closed__1; x_7 = lean_string_append(x_6, x_5); lean_dec(x_5); x_8 = l_Lean_instInhabitedParserDescr___closed__1; x_9 = lean_string_append(x_7, x_8); x_10 = l_IO_throwServerError___rarg(x_9, x_3); return x_10; } else { lean_object* x_11; lean_object* x_12; lean_dec(x_1); x_11 = lean_ctor_get(x_4, 0); lean_inc(x_11); lean_dec(x_4); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_3); return x_12; } } } lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleNotification___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_376_(x_1); 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; x_5 = l_Lean_Json_compress(x_1); x_6 = l_Lean_Server_FileWorker_parseParams___rarg___closed__1; x_7 = lean_string_append(x_6, x_5); lean_dec(x_5); x_8 = l_Lean_instInhabitedParserDescr___closed__1; x_9 = lean_string_append(x_7, x_8); x_10 = l_IO_throwServerError___rarg(x_9, x_3); return x_10; } else { lean_object* x_11; lean_object* x_12; lean_dec(x_1); x_11 = lean_ctor_get(x_4, 0); lean_inc(x_11); lean_dec(x_4); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_3); return x_12; } } } static lean_object* _init_l_Lean_Server_FileWorker_handleNotification___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("Got unsupported notification method: "); return x_1; } } lean_object* l_Lean_Server_FileWorker_handleNotification(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; uint8_t x_6; x_5 = l_Lean_Server_FileWorker_handleNotification_match__1___rarg___closed__1; x_6 = lean_string_dec_eq(x_1, x_5); if (x_6 == 0) { lean_object* x_7; uint8_t x_8; x_7 = l_Lean_Server_FileWorker_handleNotification_match__1___rarg___closed__2; x_8 = lean_string_dec_eq(x_1, x_7); if (x_8 == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_dec(x_3); lean_dec(x_2); x_9 = l_Lean_Server_FileWorker_handleNotification___closed__1; x_10 = lean_string_append(x_9, x_1); x_11 = l_Lean_instInhabitedParserDescr___closed__1; x_12 = lean_string_append(x_10, x_11); x_13 = l_IO_throwServerError___rarg(x_12, x_4); return x_13; } else { lean_object* x_14; x_14 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleNotification___spec__1(x_2, x_3, x_4); if (lean_obj_tag(x_14) == 0) { lean_object* x_15; lean_object* x_16; lean_object* x_17; x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); x_16 = lean_ctor_get(x_14, 1); lean_inc(x_16); lean_dec(x_14); x_17 = l_Lean_Server_FileWorker_handleCancelRequest(x_15, x_3, x_16); lean_dec(x_3); return x_17; } else { uint8_t x_18; lean_dec(x_3); x_18 = !lean_is_exclusive(x_14); if (x_18 == 0) { return x_14; } else { lean_object* x_19; lean_object* x_20; lean_object* x_21; x_19 = lean_ctor_get(x_14, 0); x_20 = lean_ctor_get(x_14, 1); lean_inc(x_20); lean_inc(x_19); lean_dec(x_14); x_21 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_21, 0, x_19); lean_ctor_set(x_21, 1, x_20); return x_21; } } } } else { lean_object* x_22; x_22 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleNotification___spec__2(x_2, x_3, x_4); if (lean_obj_tag(x_22) == 0) { lean_object* x_23; lean_object* x_24; lean_object* 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_Server_FileWorker_handleDidChange(x_23, x_3, x_24); return x_25; } else { uint8_t x_26; lean_dec(x_3); x_26 = !lean_is_exclusive(x_22); if (x_26 == 0) { return x_22; } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; x_27 = lean_ctor_get(x_22, 0); x_28 = lean_ctor_get(x_22, 1); lean_inc(x_28); lean_inc(x_27); lean_dec(x_22); x_29 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_29, 0, x_27); lean_ctor_set(x_29, 1, x_28); return x_29; } } } } } lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleNotification___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleNotification___spec__1(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleNotification___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_FileWorker_parseParams___at_Lean_Server_FileWorker_handleNotification___spec__2(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Lean_Server_FileWorker_handleNotification___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_Server_FileWorker_handleNotification(x_1, x_2, x_3, x_4); lean_dec(x_1); return x_5; } } lean_object* l_Std_RBNode_ins___at_Lean_Server_FileWorker_queueRequest___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_ordRequestID____x40_Lean_Data_JsonRpc___hyg_107_(x_2, x_10); switch (x_13) { case 0: { lean_object* x_14; uint8_t x_15; x_14 = l_Std_RBNode_ins___at_Lean_Server_FileWorker_queueRequest___spec__2(x_9, x_2, x_3); x_15 = 0; lean_ctor_set(x_1, 0, x_14); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_15); return x_1; } case 1: { uint8_t x_16; lean_dec(x_11); lean_dec(x_10); x_16 = 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_16); return x_1; } default: { lean_object* x_17; uint8_t x_18; x_17 = l_Std_RBNode_ins___at_Lean_Server_FileWorker_queueRequest___spec__2(x_12, x_2, x_3); x_18 = 0; lean_ctor_set(x_1, 3, x_17); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_18); return x_1; } } } else { lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; x_19 = lean_ctor_get(x_1, 0); x_20 = lean_ctor_get(x_1, 1); x_21 = lean_ctor_get(x_1, 2); x_22 = lean_ctor_get(x_1, 3); lean_inc(x_22); lean_inc(x_21); lean_inc(x_20); lean_inc(x_19); lean_dec(x_1); lean_inc(x_20); lean_inc(x_2); x_23 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_ordRequestID____x40_Lean_Data_JsonRpc___hyg_107_(x_2, x_20); switch (x_23) { case 0: { lean_object* x_24; uint8_t x_25; lean_object* x_26; x_24 = l_Std_RBNode_ins___at_Lean_Server_FileWorker_queueRequest___spec__2(x_19, x_2, x_3); x_25 = 0; x_26 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_26, 0, x_24); lean_ctor_set(x_26, 1, x_20); lean_ctor_set(x_26, 2, x_21); lean_ctor_set(x_26, 3, x_22); lean_ctor_set_uint8(x_26, sizeof(void*)*4, x_25); return x_26; } case 1: { uint8_t x_27; lean_object* x_28; lean_dec(x_21); lean_dec(x_20); x_27 = 0; x_28 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_28, 0, x_19); lean_ctor_set(x_28, 1, x_2); lean_ctor_set(x_28, 2, x_3); lean_ctor_set(x_28, 3, x_22); lean_ctor_set_uint8(x_28, sizeof(void*)*4, x_27); return x_28; } default: { lean_object* x_29; uint8_t x_30; lean_object* x_31; x_29 = l_Std_RBNode_ins___at_Lean_Server_FileWorker_queueRequest___spec__2(x_22, x_2, x_3); x_30 = 0; x_31 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_31, 0, x_19); lean_ctor_set(x_31, 1, x_20); lean_ctor_set(x_31, 2, x_21); lean_ctor_set(x_31, 3, x_29); lean_ctor_set_uint8(x_31, sizeof(void*)*4, x_30); return x_31; } } } } else { uint8_t x_32; x_32 = !lean_is_exclusive(x_1); if (x_32 == 0) { lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; uint8_t x_37; x_33 = lean_ctor_get(x_1, 0); x_34 = lean_ctor_get(x_1, 1); x_35 = lean_ctor_get(x_1, 2); x_36 = lean_ctor_get(x_1, 3); lean_inc(x_34); lean_inc(x_2); x_37 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_ordRequestID____x40_Lean_Data_JsonRpc___hyg_107_(x_2, x_34); switch (x_37) { case 0: { uint8_t x_38; x_38 = l_Std_RBNode_isRed___rarg(x_33); if (x_38 == 0) { lean_object* x_39; uint8_t x_40; x_39 = l_Std_RBNode_ins___at_Lean_Server_FileWorker_queueRequest___spec__2(x_33, x_2, x_3); x_40 = 1; lean_ctor_set(x_1, 0, x_39); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_40); return x_1; } else { lean_object* x_41; lean_object* x_42; x_41 = l_Std_RBNode_ins___at_Lean_Server_FileWorker_queueRequest___spec__2(x_33, x_2, x_3); x_42 = lean_ctor_get(x_41, 0); lean_inc(x_42); if (lean_obj_tag(x_42) == 0) { lean_object* x_43; x_43 = lean_ctor_get(x_41, 3); lean_inc(x_43); if (lean_obj_tag(x_43) == 0) { uint8_t x_44; x_44 = !lean_is_exclusive(x_41); if (x_44 == 0) { lean_object* x_45; lean_object* x_46; uint8_t x_47; uint8_t x_48; x_45 = lean_ctor_get(x_41, 3); lean_dec(x_45); x_46 = lean_ctor_get(x_41, 0); lean_dec(x_46); x_47 = 0; lean_ctor_set(x_41, 0, x_43); lean_ctor_set_uint8(x_41, sizeof(void*)*4, x_47); x_48 = 1; lean_ctor_set(x_1, 0, x_41); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_48); return x_1; } else { lean_object* x_49; lean_object* x_50; uint8_t x_51; lean_object* x_52; uint8_t x_53; x_49 = lean_ctor_get(x_41, 1); x_50 = lean_ctor_get(x_41, 2); lean_inc(x_50); lean_inc(x_49); lean_dec(x_41); x_51 = 0; x_52 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_52, 0, x_43); lean_ctor_set(x_52, 1, x_49); lean_ctor_set(x_52, 2, x_50); lean_ctor_set(x_52, 3, x_43); lean_ctor_set_uint8(x_52, sizeof(void*)*4, x_51); x_53 = 1; lean_ctor_set(x_1, 0, x_52); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_53); return x_1; } } else { uint8_t x_54; x_54 = lean_ctor_get_uint8(x_43, sizeof(void*)*4); if (x_54 == 0) { uint8_t x_55; x_55 = !lean_is_exclusive(x_41); if (x_55 == 0) { lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; uint8_t x_60; x_56 = lean_ctor_get(x_41, 1); x_57 = lean_ctor_get(x_41, 2); x_58 = lean_ctor_get(x_41, 3); lean_dec(x_58); x_59 = lean_ctor_get(x_41, 0); lean_dec(x_59); x_60 = !lean_is_exclusive(x_43); if (x_60 == 0) { lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; uint8_t x_65; uint8_t x_66; x_61 = lean_ctor_get(x_43, 0); x_62 = lean_ctor_get(x_43, 1); x_63 = lean_ctor_get(x_43, 2); x_64 = lean_ctor_get(x_43, 3); x_65 = 1; lean_ctor_set(x_43, 3, x_61); lean_ctor_set(x_43, 2, x_57); lean_ctor_set(x_43, 1, x_56); lean_ctor_set(x_43, 0, x_42); lean_ctor_set_uint8(x_43, sizeof(void*)*4, x_65); lean_ctor_set(x_41, 3, x_36); lean_ctor_set(x_41, 2, x_35); lean_ctor_set(x_41, 1, x_34); lean_ctor_set(x_41, 0, x_64); lean_ctor_set_uint8(x_41, sizeof(void*)*4, x_65); x_66 = 0; lean_ctor_set(x_1, 3, x_41); lean_ctor_set(x_1, 2, x_63); lean_ctor_set(x_1, 1, x_62); lean_ctor_set(x_1, 0, x_43); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_66); return x_1; } else { lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; uint8_t x_71; lean_object* x_72; uint8_t x_73; x_67 = lean_ctor_get(x_43, 0); x_68 = lean_ctor_get(x_43, 1); x_69 = lean_ctor_get(x_43, 2); x_70 = lean_ctor_get(x_43, 3); lean_inc(x_70); lean_inc(x_69); lean_inc(x_68); lean_inc(x_67); lean_dec(x_43); x_71 = 1; x_72 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_72, 0, x_42); lean_ctor_set(x_72, 1, x_56); lean_ctor_set(x_72, 2, x_57); lean_ctor_set(x_72, 3, x_67); lean_ctor_set_uint8(x_72, sizeof(void*)*4, x_71); lean_ctor_set(x_41, 3, x_36); lean_ctor_set(x_41, 2, x_35); lean_ctor_set(x_41, 1, x_34); lean_ctor_set(x_41, 0, x_70); lean_ctor_set_uint8(x_41, sizeof(void*)*4, x_71); x_73 = 0; lean_ctor_set(x_1, 3, x_41); lean_ctor_set(x_1, 2, x_69); lean_ctor_set(x_1, 1, x_68); lean_ctor_set(x_1, 0, x_72); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_73); return x_1; } } else { 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; lean_object* x_82; lean_object* x_83; uint8_t x_84; x_74 = lean_ctor_get(x_41, 1); x_75 = lean_ctor_get(x_41, 2); lean_inc(x_75); lean_inc(x_74); lean_dec(x_41); x_76 = lean_ctor_get(x_43, 0); lean_inc(x_76); x_77 = lean_ctor_get(x_43, 1); lean_inc(x_77); x_78 = lean_ctor_get(x_43, 2); lean_inc(x_78); x_79 = lean_ctor_get(x_43, 3); lean_inc(x_79); if (lean_is_exclusive(x_43)) { lean_ctor_release(x_43, 0); lean_ctor_release(x_43, 1); lean_ctor_release(x_43, 2); lean_ctor_release(x_43, 3); x_80 = x_43; } else { lean_dec_ref(x_43); x_80 = lean_box(0); } x_81 = 1; if (lean_is_scalar(x_80)) { x_82 = lean_alloc_ctor(1, 4, 1); } else { x_82 = x_80; } lean_ctor_set(x_82, 0, x_42); lean_ctor_set(x_82, 1, x_74); lean_ctor_set(x_82, 2, x_75); lean_ctor_set(x_82, 3, x_76); lean_ctor_set_uint8(x_82, sizeof(void*)*4, x_81); x_83 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_83, 0, x_79); lean_ctor_set(x_83, 1, x_34); lean_ctor_set(x_83, 2, x_35); lean_ctor_set(x_83, 3, x_36); lean_ctor_set_uint8(x_83, sizeof(void*)*4, x_81); x_84 = 0; lean_ctor_set(x_1, 3, x_83); lean_ctor_set(x_1, 2, x_78); lean_ctor_set(x_1, 1, x_77); lean_ctor_set(x_1, 0, x_82); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_84); return x_1; } } else { uint8_t x_85; x_85 = !lean_is_exclusive(x_41); if (x_85 == 0) { lean_object* x_86; lean_object* x_87; uint8_t x_88; uint8_t x_89; x_86 = lean_ctor_get(x_41, 3); lean_dec(x_86); x_87 = lean_ctor_get(x_41, 0); lean_dec(x_87); x_88 = 0; lean_ctor_set_uint8(x_41, sizeof(void*)*4, x_88); x_89 = 1; lean_ctor_set(x_1, 0, x_41); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_89); return x_1; } else { lean_object* x_90; lean_object* x_91; uint8_t x_92; lean_object* x_93; uint8_t x_94; x_90 = lean_ctor_get(x_41, 1); x_91 = lean_ctor_get(x_41, 2); lean_inc(x_91); lean_inc(x_90); lean_dec(x_41); x_92 = 0; x_93 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_93, 0, x_42); lean_ctor_set(x_93, 1, x_90); lean_ctor_set(x_93, 2, x_91); lean_ctor_set(x_93, 3, x_43); lean_ctor_set_uint8(x_93, sizeof(void*)*4, x_92); x_94 = 1; lean_ctor_set(x_1, 0, x_93); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_94); return x_1; } } } } else { uint8_t x_95; x_95 = lean_ctor_get_uint8(x_42, sizeof(void*)*4); if (x_95 == 0) { uint8_t x_96; x_96 = !lean_is_exclusive(x_41); if (x_96 == 0) { lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; uint8_t x_101; x_97 = lean_ctor_get(x_41, 1); x_98 = lean_ctor_get(x_41, 2); x_99 = lean_ctor_get(x_41, 3); x_100 = lean_ctor_get(x_41, 0); lean_dec(x_100); x_101 = !lean_is_exclusive(x_42); if (x_101 == 0) { uint8_t x_102; uint8_t x_103; x_102 = 1; lean_ctor_set_uint8(x_42, sizeof(void*)*4, x_102); lean_ctor_set(x_41, 3, x_36); lean_ctor_set(x_41, 2, x_35); lean_ctor_set(x_41, 1, x_34); lean_ctor_set(x_41, 0, x_99); lean_ctor_set_uint8(x_41, sizeof(void*)*4, x_102); x_103 = 0; lean_ctor_set(x_1, 3, x_41); lean_ctor_set(x_1, 2, x_98); lean_ctor_set(x_1, 1, x_97); lean_ctor_set(x_1, 0, x_42); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_103); return x_1; } else { lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; uint8_t x_108; lean_object* x_109; uint8_t x_110; x_104 = lean_ctor_get(x_42, 0); x_105 = lean_ctor_get(x_42, 1); x_106 = lean_ctor_get(x_42, 2); x_107 = lean_ctor_get(x_42, 3); lean_inc(x_107); lean_inc(x_106); lean_inc(x_105); lean_inc(x_104); lean_dec(x_42); x_108 = 1; x_109 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_109, 0, x_104); lean_ctor_set(x_109, 1, x_105); lean_ctor_set(x_109, 2, x_106); lean_ctor_set(x_109, 3, x_107); lean_ctor_set_uint8(x_109, sizeof(void*)*4, x_108); lean_ctor_set(x_41, 3, x_36); lean_ctor_set(x_41, 2, x_35); lean_ctor_set(x_41, 1, x_34); lean_ctor_set(x_41, 0, x_99); lean_ctor_set_uint8(x_41, sizeof(void*)*4, x_108); x_110 = 0; lean_ctor_set(x_1, 3, x_41); lean_ctor_set(x_1, 2, x_98); lean_ctor_set(x_1, 1, x_97); lean_ctor_set(x_1, 0, x_109); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_110); return x_1; } } else { lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; uint8_t x_119; lean_object* x_120; lean_object* x_121; uint8_t x_122; x_111 = lean_ctor_get(x_41, 1); x_112 = lean_ctor_get(x_41, 2); x_113 = lean_ctor_get(x_41, 3); lean_inc(x_113); lean_inc(x_112); lean_inc(x_111); lean_dec(x_41); x_114 = lean_ctor_get(x_42, 0); lean_inc(x_114); x_115 = lean_ctor_get(x_42, 1); lean_inc(x_115); x_116 = lean_ctor_get(x_42, 2); lean_inc(x_116); x_117 = lean_ctor_get(x_42, 3); lean_inc(x_117); if (lean_is_exclusive(x_42)) { lean_ctor_release(x_42, 0); lean_ctor_release(x_42, 1); lean_ctor_release(x_42, 2); lean_ctor_release(x_42, 3); x_118 = x_42; } else { lean_dec_ref(x_42); x_118 = lean_box(0); } x_119 = 1; if (lean_is_scalar(x_118)) { x_120 = lean_alloc_ctor(1, 4, 1); } else { x_120 = x_118; } lean_ctor_set(x_120, 0, x_114); lean_ctor_set(x_120, 1, x_115); lean_ctor_set(x_120, 2, x_116); lean_ctor_set(x_120, 3, x_117); lean_ctor_set_uint8(x_120, sizeof(void*)*4, x_119); x_121 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_121, 0, x_113); lean_ctor_set(x_121, 1, x_34); lean_ctor_set(x_121, 2, x_35); lean_ctor_set(x_121, 3, x_36); lean_ctor_set_uint8(x_121, sizeof(void*)*4, x_119); x_122 = 0; lean_ctor_set(x_1, 3, x_121); lean_ctor_set(x_1, 2, x_112); lean_ctor_set(x_1, 1, x_111); lean_ctor_set(x_1, 0, x_120); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_122); return x_1; } } else { lean_object* x_123; x_123 = lean_ctor_get(x_41, 3); lean_inc(x_123); if (lean_obj_tag(x_123) == 0) { uint8_t x_124; x_124 = !lean_is_exclusive(x_41); if (x_124 == 0) { lean_object* x_125; lean_object* x_126; uint8_t x_127; uint8_t x_128; x_125 = lean_ctor_get(x_41, 3); lean_dec(x_125); x_126 = lean_ctor_get(x_41, 0); lean_dec(x_126); x_127 = 0; lean_ctor_set_uint8(x_41, sizeof(void*)*4, x_127); x_128 = 1; lean_ctor_set(x_1, 0, x_41); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_128); return x_1; } else { lean_object* x_129; lean_object* x_130; uint8_t x_131; lean_object* x_132; uint8_t x_133; x_129 = lean_ctor_get(x_41, 1); x_130 = lean_ctor_get(x_41, 2); lean_inc(x_130); lean_inc(x_129); lean_dec(x_41); x_131 = 0; x_132 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_132, 0, x_42); lean_ctor_set(x_132, 1, x_129); lean_ctor_set(x_132, 2, x_130); lean_ctor_set(x_132, 3, x_123); lean_ctor_set_uint8(x_132, sizeof(void*)*4, x_131); x_133 = 1; lean_ctor_set(x_1, 0, x_132); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_133); return x_1; } } else { uint8_t x_134; x_134 = lean_ctor_get_uint8(x_123, sizeof(void*)*4); if (x_134 == 0) { uint8_t x_135; lean_free_object(x_1); x_135 = !lean_is_exclusive(x_41); if (x_135 == 0) { lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; uint8_t x_140; x_136 = lean_ctor_get(x_41, 1); x_137 = lean_ctor_get(x_41, 2); x_138 = lean_ctor_get(x_41, 3); lean_dec(x_138); x_139 = lean_ctor_get(x_41, 0); lean_dec(x_139); x_140 = !lean_is_exclusive(x_123); if (x_140 == 0) { lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; uint8_t x_145; uint8_t x_146; x_141 = lean_ctor_get(x_123, 0); x_142 = lean_ctor_get(x_123, 1); x_143 = lean_ctor_get(x_123, 2); x_144 = lean_ctor_get(x_123, 3); x_145 = 1; lean_inc(x_42); lean_ctor_set(x_123, 3, x_141); lean_ctor_set(x_123, 2, x_137); lean_ctor_set(x_123, 1, x_136); lean_ctor_set(x_123, 0, x_42); x_146 = !lean_is_exclusive(x_42); if (x_146 == 0) { lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; uint8_t x_151; x_147 = lean_ctor_get(x_42, 3); lean_dec(x_147); x_148 = lean_ctor_get(x_42, 2); lean_dec(x_148); x_149 = lean_ctor_get(x_42, 1); lean_dec(x_149); x_150 = lean_ctor_get(x_42, 0); lean_dec(x_150); lean_ctor_set_uint8(x_123, sizeof(void*)*4, x_145); lean_ctor_set(x_42, 3, x_36); lean_ctor_set(x_42, 2, x_35); lean_ctor_set(x_42, 1, x_34); lean_ctor_set(x_42, 0, x_144); lean_ctor_set_uint8(x_42, sizeof(void*)*4, x_145); x_151 = 0; lean_ctor_set(x_41, 3, x_42); lean_ctor_set(x_41, 2, x_143); lean_ctor_set(x_41, 1, x_142); lean_ctor_set(x_41, 0, x_123); lean_ctor_set_uint8(x_41, sizeof(void*)*4, x_151); return x_41; } else { lean_object* x_152; uint8_t x_153; lean_dec(x_42); lean_ctor_set_uint8(x_123, sizeof(void*)*4, x_145); x_152 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_152, 0, x_144); lean_ctor_set(x_152, 1, x_34); lean_ctor_set(x_152, 2, x_35); lean_ctor_set(x_152, 3, x_36); lean_ctor_set_uint8(x_152, sizeof(void*)*4, x_145); x_153 = 0; lean_ctor_set(x_41, 3, x_152); lean_ctor_set(x_41, 2, x_143); lean_ctor_set(x_41, 1, x_142); lean_ctor_set(x_41, 0, x_123); lean_ctor_set_uint8(x_41, sizeof(void*)*4, x_153); return x_41; } } else { lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; uint8_t x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; uint8_t x_162; x_154 = lean_ctor_get(x_123, 0); x_155 = lean_ctor_get(x_123, 1); x_156 = lean_ctor_get(x_123, 2); x_157 = lean_ctor_get(x_123, 3); lean_inc(x_157); lean_inc(x_156); lean_inc(x_155); lean_inc(x_154); lean_dec(x_123); x_158 = 1; lean_inc(x_42); x_159 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_159, 0, x_42); lean_ctor_set(x_159, 1, x_136); lean_ctor_set(x_159, 2, x_137); lean_ctor_set(x_159, 3, x_154); if (lean_is_exclusive(x_42)) { lean_ctor_release(x_42, 0); lean_ctor_release(x_42, 1); lean_ctor_release(x_42, 2); lean_ctor_release(x_42, 3); x_160 = x_42; } else { lean_dec_ref(x_42); x_160 = lean_box(0); } lean_ctor_set_uint8(x_159, sizeof(void*)*4, x_158); if (lean_is_scalar(x_160)) { x_161 = lean_alloc_ctor(1, 4, 1); } else { x_161 = x_160; } lean_ctor_set(x_161, 0, x_157); lean_ctor_set(x_161, 1, x_34); lean_ctor_set(x_161, 2, x_35); lean_ctor_set(x_161, 3, x_36); lean_ctor_set_uint8(x_161, sizeof(void*)*4, x_158); x_162 = 0; lean_ctor_set(x_41, 3, x_161); lean_ctor_set(x_41, 2, x_156); lean_ctor_set(x_41, 1, x_155); lean_ctor_set(x_41, 0, x_159); lean_ctor_set_uint8(x_41, sizeof(void*)*4, x_162); return x_41; } } else { lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; uint8_t x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; uint8_t x_174; lean_object* x_175; x_163 = lean_ctor_get(x_41, 1); x_164 = lean_ctor_get(x_41, 2); lean_inc(x_164); lean_inc(x_163); lean_dec(x_41); x_165 = lean_ctor_get(x_123, 0); lean_inc(x_165); x_166 = lean_ctor_get(x_123, 1); lean_inc(x_166); x_167 = lean_ctor_get(x_123, 2); lean_inc(x_167); x_168 = lean_ctor_get(x_123, 3); lean_inc(x_168); if (lean_is_exclusive(x_123)) { lean_ctor_release(x_123, 0); lean_ctor_release(x_123, 1); lean_ctor_release(x_123, 2); lean_ctor_release(x_123, 3); x_169 = x_123; } else { lean_dec_ref(x_123); x_169 = lean_box(0); } x_170 = 1; lean_inc(x_42); if (lean_is_scalar(x_169)) { x_171 = lean_alloc_ctor(1, 4, 1); } else { x_171 = x_169; } lean_ctor_set(x_171, 0, x_42); lean_ctor_set(x_171, 1, x_163); lean_ctor_set(x_171, 2, x_164); lean_ctor_set(x_171, 3, x_165); if (lean_is_exclusive(x_42)) { lean_ctor_release(x_42, 0); lean_ctor_release(x_42, 1); lean_ctor_release(x_42, 2); lean_ctor_release(x_42, 3); x_172 = x_42; } else { lean_dec_ref(x_42); x_172 = lean_box(0); } lean_ctor_set_uint8(x_171, sizeof(void*)*4, x_170); if (lean_is_scalar(x_172)) { x_173 = lean_alloc_ctor(1, 4, 1); } else { x_173 = x_172; } lean_ctor_set(x_173, 0, x_168); lean_ctor_set(x_173, 1, x_34); lean_ctor_set(x_173, 2, x_35); lean_ctor_set(x_173, 3, x_36); lean_ctor_set_uint8(x_173, sizeof(void*)*4, x_170); x_174 = 0; x_175 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_175, 0, x_171); lean_ctor_set(x_175, 1, x_166); lean_ctor_set(x_175, 2, x_167); lean_ctor_set(x_175, 3, x_173); lean_ctor_set_uint8(x_175, sizeof(void*)*4, x_174); return x_175; } } else { uint8_t x_176; x_176 = !lean_is_exclusive(x_41); if (x_176 == 0) { lean_object* x_177; lean_object* x_178; uint8_t x_179; x_177 = lean_ctor_get(x_41, 3); lean_dec(x_177); x_178 = lean_ctor_get(x_41, 0); lean_dec(x_178); x_179 = !lean_is_exclusive(x_42); if (x_179 == 0) { uint8_t x_180; uint8_t x_181; lean_ctor_set_uint8(x_42, sizeof(void*)*4, x_134); x_180 = 0; lean_ctor_set_uint8(x_41, sizeof(void*)*4, x_180); x_181 = 1; lean_ctor_set(x_1, 0, x_41); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_181); return x_1; } else { lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; uint8_t x_187; uint8_t x_188; x_182 = lean_ctor_get(x_42, 0); x_183 = lean_ctor_get(x_42, 1); x_184 = lean_ctor_get(x_42, 2); x_185 = lean_ctor_get(x_42, 3); lean_inc(x_185); lean_inc(x_184); lean_inc(x_183); lean_inc(x_182); lean_dec(x_42); x_186 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_186, 0, x_182); lean_ctor_set(x_186, 1, x_183); lean_ctor_set(x_186, 2, x_184); lean_ctor_set(x_186, 3, x_185); lean_ctor_set_uint8(x_186, sizeof(void*)*4, x_134); x_187 = 0; lean_ctor_set(x_41, 0, x_186); lean_ctor_set_uint8(x_41, sizeof(void*)*4, x_187); x_188 = 1; lean_ctor_set(x_1, 0, x_41); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_188); return x_1; } } 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; lean_object* x_196; uint8_t x_197; lean_object* x_198; uint8_t x_199; x_189 = lean_ctor_get(x_41, 1); x_190 = lean_ctor_get(x_41, 2); lean_inc(x_190); lean_inc(x_189); lean_dec(x_41); x_191 = lean_ctor_get(x_42, 0); lean_inc(x_191); x_192 = lean_ctor_get(x_42, 1); lean_inc(x_192); x_193 = lean_ctor_get(x_42, 2); lean_inc(x_193); x_194 = lean_ctor_get(x_42, 3); lean_inc(x_194); if (lean_is_exclusive(x_42)) { lean_ctor_release(x_42, 0); lean_ctor_release(x_42, 1); lean_ctor_release(x_42, 2); lean_ctor_release(x_42, 3); x_195 = x_42; } else { lean_dec_ref(x_42); x_195 = lean_box(0); } if (lean_is_scalar(x_195)) { x_196 = lean_alloc_ctor(1, 4, 1); } else { x_196 = x_195; } lean_ctor_set(x_196, 0, x_191); lean_ctor_set(x_196, 1, x_192); lean_ctor_set(x_196, 2, x_193); lean_ctor_set(x_196, 3, x_194); lean_ctor_set_uint8(x_196, sizeof(void*)*4, x_134); x_197 = 0; x_198 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_198, 0, x_196); lean_ctor_set(x_198, 1, x_189); lean_ctor_set(x_198, 2, x_190); lean_ctor_set(x_198, 3, x_123); lean_ctor_set_uint8(x_198, sizeof(void*)*4, x_197); x_199 = 1; lean_ctor_set(x_1, 0, x_198); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_199); return x_1; } } } } } } } case 1: { uint8_t x_200; lean_dec(x_35); lean_dec(x_34); x_200 = 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_200); return x_1; } default: { uint8_t x_201; x_201 = l_Std_RBNode_isRed___rarg(x_36); if (x_201 == 0) { lean_object* x_202; uint8_t x_203; x_202 = l_Std_RBNode_ins___at_Lean_Server_FileWorker_queueRequest___spec__2(x_36, x_2, x_3); x_203 = 1; lean_ctor_set(x_1, 3, x_202); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_203); return x_1; } else { lean_object* x_204; lean_object* x_205; x_204 = l_Std_RBNode_ins___at_Lean_Server_FileWorker_queueRequest___spec__2(x_36, x_2, x_3); x_205 = lean_ctor_get(x_204, 0); lean_inc(x_205); if (lean_obj_tag(x_205) == 0) { lean_object* x_206; x_206 = lean_ctor_get(x_204, 3); lean_inc(x_206); if (lean_obj_tag(x_206) == 0) { uint8_t x_207; x_207 = !lean_is_exclusive(x_204); if (x_207 == 0) { lean_object* x_208; lean_object* x_209; uint8_t x_210; uint8_t x_211; x_208 = lean_ctor_get(x_204, 3); lean_dec(x_208); x_209 = lean_ctor_get(x_204, 0); lean_dec(x_209); x_210 = 0; lean_ctor_set(x_204, 0, x_206); lean_ctor_set_uint8(x_204, sizeof(void*)*4, x_210); x_211 = 1; lean_ctor_set(x_1, 3, x_204); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_211); return x_1; } else { lean_object* x_212; lean_object* x_213; uint8_t x_214; lean_object* x_215; uint8_t x_216; x_212 = lean_ctor_get(x_204, 1); x_213 = lean_ctor_get(x_204, 2); lean_inc(x_213); lean_inc(x_212); lean_dec(x_204); x_214 = 0; x_215 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_215, 0, x_206); lean_ctor_set(x_215, 1, x_212); lean_ctor_set(x_215, 2, x_213); lean_ctor_set(x_215, 3, x_206); lean_ctor_set_uint8(x_215, sizeof(void*)*4, x_214); x_216 = 1; lean_ctor_set(x_1, 3, x_215); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_216); return x_1; } } else { uint8_t x_217; x_217 = lean_ctor_get_uint8(x_206, sizeof(void*)*4); if (x_217 == 0) { uint8_t x_218; x_218 = !lean_is_exclusive(x_204); if (x_218 == 0) { lean_object* x_219; lean_object* x_220; lean_object* x_221; lean_object* x_222; uint8_t x_223; x_219 = lean_ctor_get(x_204, 1); x_220 = lean_ctor_get(x_204, 2); x_221 = lean_ctor_get(x_204, 3); lean_dec(x_221); x_222 = lean_ctor_get(x_204, 0); lean_dec(x_222); x_223 = !lean_is_exclusive(x_206); if (x_223 == 0) { lean_object* x_224; lean_object* x_225; lean_object* x_226; lean_object* x_227; uint8_t x_228; uint8_t x_229; x_224 = lean_ctor_get(x_206, 0); x_225 = lean_ctor_get(x_206, 1); x_226 = lean_ctor_get(x_206, 2); x_227 = lean_ctor_get(x_206, 3); x_228 = 1; lean_ctor_set(x_206, 3, x_205); lean_ctor_set(x_206, 2, x_35); lean_ctor_set(x_206, 1, x_34); lean_ctor_set(x_206, 0, x_33); lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_228); lean_ctor_set(x_204, 3, x_227); lean_ctor_set(x_204, 2, x_226); lean_ctor_set(x_204, 1, x_225); lean_ctor_set(x_204, 0, x_224); lean_ctor_set_uint8(x_204, sizeof(void*)*4, x_228); x_229 = 0; lean_ctor_set(x_1, 3, x_204); lean_ctor_set(x_1, 2, x_220); lean_ctor_set(x_1, 1, x_219); lean_ctor_set(x_1, 0, x_206); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_229); return x_1; } else { lean_object* x_230; lean_object* x_231; lean_object* x_232; lean_object* x_233; uint8_t x_234; lean_object* x_235; uint8_t x_236; x_230 = lean_ctor_get(x_206, 0); x_231 = lean_ctor_get(x_206, 1); x_232 = lean_ctor_get(x_206, 2); x_233 = lean_ctor_get(x_206, 3); lean_inc(x_233); lean_inc(x_232); lean_inc(x_231); lean_inc(x_230); lean_dec(x_206); x_234 = 1; x_235 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_235, 0, x_33); lean_ctor_set(x_235, 1, x_34); lean_ctor_set(x_235, 2, x_35); lean_ctor_set(x_235, 3, x_205); lean_ctor_set_uint8(x_235, sizeof(void*)*4, x_234); lean_ctor_set(x_204, 3, x_233); lean_ctor_set(x_204, 2, x_232); lean_ctor_set(x_204, 1, x_231); lean_ctor_set(x_204, 0, x_230); lean_ctor_set_uint8(x_204, sizeof(void*)*4, x_234); x_236 = 0; lean_ctor_set(x_1, 3, x_204); lean_ctor_set(x_1, 2, x_220); lean_ctor_set(x_1, 1, x_219); lean_ctor_set(x_1, 0, x_235); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_236); return x_1; } } else { lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; uint8_t x_244; lean_object* x_245; lean_object* x_246; uint8_t x_247; x_237 = lean_ctor_get(x_204, 1); x_238 = lean_ctor_get(x_204, 2); lean_inc(x_238); lean_inc(x_237); lean_dec(x_204); x_239 = lean_ctor_get(x_206, 0); lean_inc(x_239); x_240 = lean_ctor_get(x_206, 1); lean_inc(x_240); x_241 = lean_ctor_get(x_206, 2); lean_inc(x_241); x_242 = lean_ctor_get(x_206, 3); lean_inc(x_242); if (lean_is_exclusive(x_206)) { lean_ctor_release(x_206, 0); lean_ctor_release(x_206, 1); lean_ctor_release(x_206, 2); lean_ctor_release(x_206, 3); x_243 = x_206; } else { lean_dec_ref(x_206); x_243 = lean_box(0); } x_244 = 1; if (lean_is_scalar(x_243)) { x_245 = lean_alloc_ctor(1, 4, 1); } else { x_245 = x_243; } lean_ctor_set(x_245, 0, x_33); lean_ctor_set(x_245, 1, x_34); lean_ctor_set(x_245, 2, x_35); lean_ctor_set(x_245, 3, x_205); lean_ctor_set_uint8(x_245, sizeof(void*)*4, x_244); x_246 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_246, 0, x_239); lean_ctor_set(x_246, 1, x_240); lean_ctor_set(x_246, 2, x_241); lean_ctor_set(x_246, 3, x_242); lean_ctor_set_uint8(x_246, sizeof(void*)*4, x_244); x_247 = 0; lean_ctor_set(x_1, 3, x_246); lean_ctor_set(x_1, 2, x_238); lean_ctor_set(x_1, 1, x_237); lean_ctor_set(x_1, 0, x_245); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_247); return x_1; } } else { uint8_t x_248; x_248 = !lean_is_exclusive(x_204); if (x_248 == 0) { lean_object* x_249; lean_object* x_250; uint8_t x_251; uint8_t x_252; x_249 = lean_ctor_get(x_204, 3); lean_dec(x_249); x_250 = lean_ctor_get(x_204, 0); lean_dec(x_250); x_251 = 0; lean_ctor_set_uint8(x_204, sizeof(void*)*4, x_251); x_252 = 1; lean_ctor_set(x_1, 3, x_204); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_252); return x_1; } else { lean_object* x_253; lean_object* x_254; uint8_t x_255; lean_object* x_256; uint8_t x_257; x_253 = lean_ctor_get(x_204, 1); x_254 = lean_ctor_get(x_204, 2); lean_inc(x_254); lean_inc(x_253); lean_dec(x_204); x_255 = 0; x_256 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_256, 0, x_205); lean_ctor_set(x_256, 1, x_253); lean_ctor_set(x_256, 2, x_254); lean_ctor_set(x_256, 3, x_206); lean_ctor_set_uint8(x_256, sizeof(void*)*4, x_255); x_257 = 1; lean_ctor_set(x_1, 3, x_256); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_257); return x_1; } } } } else { uint8_t x_258; x_258 = lean_ctor_get_uint8(x_205, sizeof(void*)*4); if (x_258 == 0) { uint8_t x_259; x_259 = !lean_is_exclusive(x_204); if (x_259 == 0) { lean_object* x_260; uint8_t x_261; x_260 = lean_ctor_get(x_204, 0); lean_dec(x_260); x_261 = !lean_is_exclusive(x_205); if (x_261 == 0) { lean_object* x_262; lean_object* x_263; lean_object* x_264; lean_object* x_265; uint8_t x_266; uint8_t x_267; x_262 = lean_ctor_get(x_205, 0); x_263 = lean_ctor_get(x_205, 1); x_264 = lean_ctor_get(x_205, 2); x_265 = lean_ctor_get(x_205, 3); x_266 = 1; lean_ctor_set(x_205, 3, x_262); lean_ctor_set(x_205, 2, x_35); lean_ctor_set(x_205, 1, x_34); lean_ctor_set(x_205, 0, x_33); lean_ctor_set_uint8(x_205, sizeof(void*)*4, x_266); lean_ctor_set(x_204, 0, x_265); lean_ctor_set_uint8(x_204, sizeof(void*)*4, x_266); x_267 = 0; lean_ctor_set(x_1, 3, x_204); lean_ctor_set(x_1, 2, x_264); lean_ctor_set(x_1, 1, x_263); lean_ctor_set(x_1, 0, x_205); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_267); return x_1; } else { lean_object* x_268; lean_object* x_269; lean_object* x_270; lean_object* x_271; uint8_t x_272; lean_object* x_273; uint8_t x_274; x_268 = lean_ctor_get(x_205, 0); x_269 = lean_ctor_get(x_205, 1); x_270 = lean_ctor_get(x_205, 2); x_271 = lean_ctor_get(x_205, 3); lean_inc(x_271); lean_inc(x_270); lean_inc(x_269); lean_inc(x_268); lean_dec(x_205); x_272 = 1; x_273 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_273, 0, x_33); lean_ctor_set(x_273, 1, x_34); lean_ctor_set(x_273, 2, x_35); lean_ctor_set(x_273, 3, x_268); lean_ctor_set_uint8(x_273, sizeof(void*)*4, x_272); lean_ctor_set(x_204, 0, x_271); lean_ctor_set_uint8(x_204, sizeof(void*)*4, x_272); x_274 = 0; lean_ctor_set(x_1, 3, x_204); lean_ctor_set(x_1, 2, x_270); lean_ctor_set(x_1, 1, x_269); lean_ctor_set(x_1, 0, x_273); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_274); return x_1; } } else { 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; uint8_t x_283; lean_object* x_284; lean_object* x_285; uint8_t x_286; x_275 = lean_ctor_get(x_204, 1); x_276 = lean_ctor_get(x_204, 2); x_277 = lean_ctor_get(x_204, 3); lean_inc(x_277); lean_inc(x_276); lean_inc(x_275); lean_dec(x_204); x_278 = lean_ctor_get(x_205, 0); lean_inc(x_278); x_279 = lean_ctor_get(x_205, 1); lean_inc(x_279); x_280 = lean_ctor_get(x_205, 2); lean_inc(x_280); x_281 = lean_ctor_get(x_205, 3); lean_inc(x_281); if (lean_is_exclusive(x_205)) { lean_ctor_release(x_205, 0); lean_ctor_release(x_205, 1); lean_ctor_release(x_205, 2); lean_ctor_release(x_205, 3); x_282 = x_205; } else { lean_dec_ref(x_205); x_282 = lean_box(0); } x_283 = 1; if (lean_is_scalar(x_282)) { x_284 = lean_alloc_ctor(1, 4, 1); } else { x_284 = x_282; } lean_ctor_set(x_284, 0, x_33); lean_ctor_set(x_284, 1, x_34); lean_ctor_set(x_284, 2, x_35); lean_ctor_set(x_284, 3, x_278); lean_ctor_set_uint8(x_284, sizeof(void*)*4, x_283); x_285 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_285, 0, x_281); lean_ctor_set(x_285, 1, x_275); lean_ctor_set(x_285, 2, x_276); lean_ctor_set(x_285, 3, x_277); lean_ctor_set_uint8(x_285, sizeof(void*)*4, x_283); x_286 = 0; lean_ctor_set(x_1, 3, x_285); lean_ctor_set(x_1, 2, x_280); lean_ctor_set(x_1, 1, x_279); lean_ctor_set(x_1, 0, x_284); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_286); return x_1; } } else { lean_object* x_287; x_287 = lean_ctor_get(x_204, 3); lean_inc(x_287); if (lean_obj_tag(x_287) == 0) { uint8_t x_288; x_288 = !lean_is_exclusive(x_204); if (x_288 == 0) { lean_object* x_289; lean_object* x_290; uint8_t x_291; uint8_t x_292; x_289 = lean_ctor_get(x_204, 3); lean_dec(x_289); x_290 = lean_ctor_get(x_204, 0); lean_dec(x_290); x_291 = 0; lean_ctor_set_uint8(x_204, sizeof(void*)*4, x_291); x_292 = 1; lean_ctor_set(x_1, 3, x_204); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_292); return x_1; } else { lean_object* x_293; lean_object* x_294; uint8_t x_295; lean_object* x_296; uint8_t x_297; x_293 = lean_ctor_get(x_204, 1); x_294 = lean_ctor_get(x_204, 2); lean_inc(x_294); lean_inc(x_293); lean_dec(x_204); x_295 = 0; x_296 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_296, 0, x_205); lean_ctor_set(x_296, 1, x_293); lean_ctor_set(x_296, 2, x_294); lean_ctor_set(x_296, 3, x_287); lean_ctor_set_uint8(x_296, sizeof(void*)*4, x_295); x_297 = 1; lean_ctor_set(x_1, 3, x_296); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_297); return x_1; } } else { uint8_t x_298; x_298 = lean_ctor_get_uint8(x_287, sizeof(void*)*4); if (x_298 == 0) { uint8_t x_299; lean_free_object(x_1); x_299 = !lean_is_exclusive(x_204); if (x_299 == 0) { lean_object* x_300; lean_object* x_301; uint8_t x_302; x_300 = lean_ctor_get(x_204, 3); lean_dec(x_300); x_301 = lean_ctor_get(x_204, 0); lean_dec(x_301); x_302 = !lean_is_exclusive(x_287); if (x_302 == 0) { lean_object* x_303; lean_object* x_304; lean_object* x_305; lean_object* x_306; uint8_t x_307; uint8_t x_308; x_303 = lean_ctor_get(x_287, 0); x_304 = lean_ctor_get(x_287, 1); x_305 = lean_ctor_get(x_287, 2); x_306 = lean_ctor_get(x_287, 3); x_307 = 1; lean_inc(x_205); lean_ctor_set(x_287, 3, x_205); lean_ctor_set(x_287, 2, x_35); lean_ctor_set(x_287, 1, x_34); lean_ctor_set(x_287, 0, x_33); x_308 = !lean_is_exclusive(x_205); if (x_308 == 0) { lean_object* x_309; lean_object* x_310; lean_object* x_311; lean_object* x_312; uint8_t x_313; x_309 = lean_ctor_get(x_205, 3); lean_dec(x_309); x_310 = lean_ctor_get(x_205, 2); lean_dec(x_310); x_311 = lean_ctor_get(x_205, 1); lean_dec(x_311); x_312 = lean_ctor_get(x_205, 0); lean_dec(x_312); lean_ctor_set_uint8(x_287, sizeof(void*)*4, x_307); lean_ctor_set(x_205, 3, x_306); lean_ctor_set(x_205, 2, x_305); lean_ctor_set(x_205, 1, x_304); lean_ctor_set(x_205, 0, x_303); lean_ctor_set_uint8(x_205, sizeof(void*)*4, x_307); x_313 = 0; lean_ctor_set(x_204, 3, x_205); lean_ctor_set(x_204, 0, x_287); lean_ctor_set_uint8(x_204, sizeof(void*)*4, x_313); return x_204; } else { lean_object* x_314; uint8_t x_315; lean_dec(x_205); lean_ctor_set_uint8(x_287, sizeof(void*)*4, x_307); x_314 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_314, 0, x_303); lean_ctor_set(x_314, 1, x_304); lean_ctor_set(x_314, 2, x_305); lean_ctor_set(x_314, 3, x_306); lean_ctor_set_uint8(x_314, sizeof(void*)*4, x_307); x_315 = 0; lean_ctor_set(x_204, 3, x_314); lean_ctor_set(x_204, 0, x_287); lean_ctor_set_uint8(x_204, sizeof(void*)*4, x_315); return x_204; } } else { lean_object* x_316; lean_object* x_317; lean_object* x_318; lean_object* x_319; uint8_t x_320; lean_object* x_321; lean_object* x_322; lean_object* x_323; uint8_t x_324; x_316 = lean_ctor_get(x_287, 0); x_317 = lean_ctor_get(x_287, 1); x_318 = lean_ctor_get(x_287, 2); x_319 = lean_ctor_get(x_287, 3); lean_inc(x_319); lean_inc(x_318); lean_inc(x_317); lean_inc(x_316); lean_dec(x_287); x_320 = 1; lean_inc(x_205); x_321 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_321, 0, x_33); lean_ctor_set(x_321, 1, x_34); lean_ctor_set(x_321, 2, x_35); lean_ctor_set(x_321, 3, x_205); if (lean_is_exclusive(x_205)) { lean_ctor_release(x_205, 0); lean_ctor_release(x_205, 1); lean_ctor_release(x_205, 2); lean_ctor_release(x_205, 3); x_322 = x_205; } else { lean_dec_ref(x_205); x_322 = lean_box(0); } lean_ctor_set_uint8(x_321, sizeof(void*)*4, x_320); if (lean_is_scalar(x_322)) { x_323 = lean_alloc_ctor(1, 4, 1); } else { x_323 = x_322; } lean_ctor_set(x_323, 0, x_316); lean_ctor_set(x_323, 1, x_317); lean_ctor_set(x_323, 2, x_318); lean_ctor_set(x_323, 3, x_319); lean_ctor_set_uint8(x_323, sizeof(void*)*4, x_320); x_324 = 0; lean_ctor_set(x_204, 3, x_323); lean_ctor_set(x_204, 0, x_321); lean_ctor_set_uint8(x_204, sizeof(void*)*4, x_324); return x_204; } } else { 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; uint8_t x_332; lean_object* x_333; lean_object* x_334; lean_object* x_335; uint8_t x_336; lean_object* x_337; x_325 = lean_ctor_get(x_204, 1); x_326 = lean_ctor_get(x_204, 2); lean_inc(x_326); lean_inc(x_325); lean_dec(x_204); x_327 = lean_ctor_get(x_287, 0); lean_inc(x_327); x_328 = lean_ctor_get(x_287, 1); lean_inc(x_328); x_329 = lean_ctor_get(x_287, 2); lean_inc(x_329); x_330 = lean_ctor_get(x_287, 3); lean_inc(x_330); if (lean_is_exclusive(x_287)) { lean_ctor_release(x_287, 0); lean_ctor_release(x_287, 1); lean_ctor_release(x_287, 2); lean_ctor_release(x_287, 3); x_331 = x_287; } else { lean_dec_ref(x_287); x_331 = lean_box(0); } x_332 = 1; lean_inc(x_205); if (lean_is_scalar(x_331)) { x_333 = lean_alloc_ctor(1, 4, 1); } else { x_333 = x_331; } lean_ctor_set(x_333, 0, x_33); lean_ctor_set(x_333, 1, x_34); lean_ctor_set(x_333, 2, x_35); lean_ctor_set(x_333, 3, x_205); if (lean_is_exclusive(x_205)) { lean_ctor_release(x_205, 0); lean_ctor_release(x_205, 1); lean_ctor_release(x_205, 2); lean_ctor_release(x_205, 3); x_334 = x_205; } else { lean_dec_ref(x_205); x_334 = lean_box(0); } lean_ctor_set_uint8(x_333, sizeof(void*)*4, x_332); if (lean_is_scalar(x_334)) { x_335 = lean_alloc_ctor(1, 4, 1); } else { x_335 = x_334; } lean_ctor_set(x_335, 0, x_327); lean_ctor_set(x_335, 1, x_328); lean_ctor_set(x_335, 2, x_329); lean_ctor_set(x_335, 3, x_330); lean_ctor_set_uint8(x_335, sizeof(void*)*4, x_332); x_336 = 0; x_337 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_337, 0, x_333); lean_ctor_set(x_337, 1, x_325); lean_ctor_set(x_337, 2, x_326); lean_ctor_set(x_337, 3, x_335); lean_ctor_set_uint8(x_337, sizeof(void*)*4, x_336); return x_337; } } else { uint8_t x_338; x_338 = !lean_is_exclusive(x_204); if (x_338 == 0) { lean_object* x_339; lean_object* x_340; uint8_t x_341; x_339 = lean_ctor_get(x_204, 3); lean_dec(x_339); x_340 = lean_ctor_get(x_204, 0); lean_dec(x_340); x_341 = !lean_is_exclusive(x_205); if (x_341 == 0) { uint8_t x_342; uint8_t x_343; lean_ctor_set_uint8(x_205, sizeof(void*)*4, x_298); x_342 = 0; lean_ctor_set_uint8(x_204, sizeof(void*)*4, x_342); x_343 = 1; lean_ctor_set(x_1, 3, x_204); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_343); return x_1; } else { lean_object* x_344; lean_object* x_345; lean_object* x_346; lean_object* x_347; lean_object* x_348; uint8_t x_349; uint8_t x_350; x_344 = lean_ctor_get(x_205, 0); x_345 = lean_ctor_get(x_205, 1); x_346 = lean_ctor_get(x_205, 2); x_347 = lean_ctor_get(x_205, 3); lean_inc(x_347); lean_inc(x_346); lean_inc(x_345); lean_inc(x_344); lean_dec(x_205); x_348 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_348, 0, x_344); lean_ctor_set(x_348, 1, x_345); lean_ctor_set(x_348, 2, x_346); lean_ctor_set(x_348, 3, x_347); lean_ctor_set_uint8(x_348, sizeof(void*)*4, x_298); x_349 = 0; lean_ctor_set(x_204, 0, x_348); lean_ctor_set_uint8(x_204, sizeof(void*)*4, x_349); x_350 = 1; lean_ctor_set(x_1, 3, x_204); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_350); return x_1; } } else { lean_object* x_351; lean_object* x_352; lean_object* x_353; lean_object* x_354; lean_object* x_355; lean_object* x_356; lean_object* x_357; lean_object* x_358; uint8_t x_359; lean_object* x_360; uint8_t x_361; x_351 = lean_ctor_get(x_204, 1); x_352 = lean_ctor_get(x_204, 2); lean_inc(x_352); lean_inc(x_351); lean_dec(x_204); x_353 = lean_ctor_get(x_205, 0); lean_inc(x_353); x_354 = lean_ctor_get(x_205, 1); lean_inc(x_354); x_355 = lean_ctor_get(x_205, 2); lean_inc(x_355); x_356 = lean_ctor_get(x_205, 3); lean_inc(x_356); if (lean_is_exclusive(x_205)) { lean_ctor_release(x_205, 0); lean_ctor_release(x_205, 1); lean_ctor_release(x_205, 2); lean_ctor_release(x_205, 3); x_357 = x_205; } else { lean_dec_ref(x_205); x_357 = lean_box(0); } if (lean_is_scalar(x_357)) { x_358 = lean_alloc_ctor(1, 4, 1); } else { x_358 = x_357; } lean_ctor_set(x_358, 0, x_353); lean_ctor_set(x_358, 1, x_354); lean_ctor_set(x_358, 2, x_355); lean_ctor_set(x_358, 3, x_356); lean_ctor_set_uint8(x_358, sizeof(void*)*4, x_298); x_359 = 0; x_360 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_360, 0, x_358); lean_ctor_set(x_360, 1, x_351); lean_ctor_set(x_360, 2, x_352); lean_ctor_set(x_360, 3, x_287); lean_ctor_set_uint8(x_360, sizeof(void*)*4, x_359); x_361 = 1; lean_ctor_set(x_1, 3, x_360); lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_361); return x_1; } } } } } } } } } else { lean_object* x_362; lean_object* x_363; lean_object* x_364; lean_object* x_365; uint8_t x_366; x_362 = lean_ctor_get(x_1, 0); x_363 = lean_ctor_get(x_1, 1); x_364 = lean_ctor_get(x_1, 2); x_365 = lean_ctor_get(x_1, 3); lean_inc(x_365); lean_inc(x_364); lean_inc(x_363); lean_inc(x_362); lean_dec(x_1); lean_inc(x_363); lean_inc(x_2); x_366 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_ordRequestID____x40_Lean_Data_JsonRpc___hyg_107_(x_2, x_363); switch (x_366) { case 0: { uint8_t x_367; x_367 = l_Std_RBNode_isRed___rarg(x_362); if (x_367 == 0) { lean_object* x_368; uint8_t x_369; lean_object* x_370; x_368 = l_Std_RBNode_ins___at_Lean_Server_FileWorker_queueRequest___spec__2(x_362, x_2, x_3); x_369 = 1; x_370 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_370, 0, x_368); lean_ctor_set(x_370, 1, x_363); lean_ctor_set(x_370, 2, x_364); lean_ctor_set(x_370, 3, x_365); lean_ctor_set_uint8(x_370, sizeof(void*)*4, x_369); return x_370; } else { lean_object* x_371; lean_object* x_372; x_371 = l_Std_RBNode_ins___at_Lean_Server_FileWorker_queueRequest___spec__2(x_362, x_2, x_3); x_372 = lean_ctor_get(x_371, 0); lean_inc(x_372); if (lean_obj_tag(x_372) == 0) { lean_object* x_373; x_373 = lean_ctor_get(x_371, 3); lean_inc(x_373); if (lean_obj_tag(x_373) == 0) { lean_object* x_374; lean_object* x_375; lean_object* x_376; uint8_t x_377; lean_object* x_378; uint8_t x_379; lean_object* x_380; x_374 = lean_ctor_get(x_371, 1); lean_inc(x_374); x_375 = lean_ctor_get(x_371, 2); lean_inc(x_375); if (lean_is_exclusive(x_371)) { lean_ctor_release(x_371, 0); lean_ctor_release(x_371, 1); lean_ctor_release(x_371, 2); lean_ctor_release(x_371, 3); x_376 = x_371; } else { lean_dec_ref(x_371); x_376 = lean_box(0); } x_377 = 0; if (lean_is_scalar(x_376)) { x_378 = lean_alloc_ctor(1, 4, 1); } else { x_378 = x_376; } lean_ctor_set(x_378, 0, x_373); lean_ctor_set(x_378, 1, x_374); lean_ctor_set(x_378, 2, x_375); lean_ctor_set(x_378, 3, x_373); lean_ctor_set_uint8(x_378, sizeof(void*)*4, x_377); x_379 = 1; x_380 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_380, 0, x_378); lean_ctor_set(x_380, 1, x_363); lean_ctor_set(x_380, 2, x_364); lean_ctor_set(x_380, 3, x_365); lean_ctor_set_uint8(x_380, sizeof(void*)*4, x_379); return x_380; } else { uint8_t x_381; x_381 = lean_ctor_get_uint8(x_373, sizeof(void*)*4); if (x_381 == 0) { lean_object* x_382; lean_object* x_383; lean_object* x_384; lean_object* x_385; lean_object* x_386; lean_object* x_387; lean_object* x_388; lean_object* x_389; uint8_t x_390; lean_object* x_391; lean_object* x_392; uint8_t x_393; lean_object* x_394; x_382 = lean_ctor_get(x_371, 1); lean_inc(x_382); x_383 = lean_ctor_get(x_371, 2); lean_inc(x_383); if (lean_is_exclusive(x_371)) { lean_ctor_release(x_371, 0); lean_ctor_release(x_371, 1); lean_ctor_release(x_371, 2); lean_ctor_release(x_371, 3); x_384 = x_371; } else { lean_dec_ref(x_371); x_384 = lean_box(0); } x_385 = lean_ctor_get(x_373, 0); lean_inc(x_385); x_386 = lean_ctor_get(x_373, 1); lean_inc(x_386); x_387 = lean_ctor_get(x_373, 2); lean_inc(x_387); x_388 = lean_ctor_get(x_373, 3); lean_inc(x_388); if (lean_is_exclusive(x_373)) { lean_ctor_release(x_373, 0); lean_ctor_release(x_373, 1); lean_ctor_release(x_373, 2); lean_ctor_release(x_373, 3); x_389 = x_373; } else { lean_dec_ref(x_373); x_389 = lean_box(0); } x_390 = 1; if (lean_is_scalar(x_389)) { x_391 = lean_alloc_ctor(1, 4, 1); } else { x_391 = x_389; } lean_ctor_set(x_391, 0, x_372); lean_ctor_set(x_391, 1, x_382); lean_ctor_set(x_391, 2, x_383); lean_ctor_set(x_391, 3, x_385); lean_ctor_set_uint8(x_391, sizeof(void*)*4, x_390); if (lean_is_scalar(x_384)) { x_392 = lean_alloc_ctor(1, 4, 1); } else { x_392 = x_384; } lean_ctor_set(x_392, 0, x_388); lean_ctor_set(x_392, 1, x_363); lean_ctor_set(x_392, 2, x_364); lean_ctor_set(x_392, 3, x_365); lean_ctor_set_uint8(x_392, sizeof(void*)*4, x_390); x_393 = 0; x_394 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_394, 0, x_391); lean_ctor_set(x_394, 1, x_386); lean_ctor_set(x_394, 2, x_387); lean_ctor_set(x_394, 3, x_392); lean_ctor_set_uint8(x_394, sizeof(void*)*4, x_393); return x_394; } else { lean_object* x_395; lean_object* x_396; lean_object* x_397; uint8_t x_398; lean_object* x_399; uint8_t x_400; lean_object* x_401; x_395 = lean_ctor_get(x_371, 1); lean_inc(x_395); x_396 = lean_ctor_get(x_371, 2); lean_inc(x_396); if (lean_is_exclusive(x_371)) { lean_ctor_release(x_371, 0); lean_ctor_release(x_371, 1); lean_ctor_release(x_371, 2); lean_ctor_release(x_371, 3); x_397 = x_371; } else { lean_dec_ref(x_371); x_397 = lean_box(0); } x_398 = 0; if (lean_is_scalar(x_397)) { x_399 = lean_alloc_ctor(1, 4, 1); } else { x_399 = x_397; } lean_ctor_set(x_399, 0, x_372); lean_ctor_set(x_399, 1, x_395); lean_ctor_set(x_399, 2, x_396); lean_ctor_set(x_399, 3, x_373); lean_ctor_set_uint8(x_399, sizeof(void*)*4, x_398); x_400 = 1; x_401 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_401, 0, x_399); lean_ctor_set(x_401, 1, x_363); lean_ctor_set(x_401, 2, x_364); lean_ctor_set(x_401, 3, x_365); lean_ctor_set_uint8(x_401, sizeof(void*)*4, x_400); return x_401; } } } else { uint8_t x_402; x_402 = lean_ctor_get_uint8(x_372, sizeof(void*)*4); if (x_402 == 0) { 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; uint8_t x_412; lean_object* x_413; lean_object* x_414; uint8_t x_415; lean_object* x_416; x_403 = lean_ctor_get(x_371, 1); lean_inc(x_403); x_404 = lean_ctor_get(x_371, 2); lean_inc(x_404); x_405 = lean_ctor_get(x_371, 3); lean_inc(x_405); if (lean_is_exclusive(x_371)) { lean_ctor_release(x_371, 0); lean_ctor_release(x_371, 1); lean_ctor_release(x_371, 2); lean_ctor_release(x_371, 3); x_406 = x_371; } else { lean_dec_ref(x_371); x_406 = lean_box(0); } x_407 = lean_ctor_get(x_372, 0); lean_inc(x_407); x_408 = lean_ctor_get(x_372, 1); lean_inc(x_408); x_409 = lean_ctor_get(x_372, 2); lean_inc(x_409); x_410 = lean_ctor_get(x_372, 3); lean_inc(x_410); if (lean_is_exclusive(x_372)) { lean_ctor_release(x_372, 0); lean_ctor_release(x_372, 1); lean_ctor_release(x_372, 2); lean_ctor_release(x_372, 3); x_411 = x_372; } else { lean_dec_ref(x_372); x_411 = lean_box(0); } x_412 = 1; if (lean_is_scalar(x_411)) { x_413 = lean_alloc_ctor(1, 4, 1); } else { x_413 = x_411; } lean_ctor_set(x_413, 0, x_407); lean_ctor_set(x_413, 1, x_408); lean_ctor_set(x_413, 2, x_409); lean_ctor_set(x_413, 3, x_410); lean_ctor_set_uint8(x_413, sizeof(void*)*4, x_412); if (lean_is_scalar(x_406)) { x_414 = lean_alloc_ctor(1, 4, 1); } else { x_414 = x_406; } lean_ctor_set(x_414, 0, x_405); lean_ctor_set(x_414, 1, x_363); lean_ctor_set(x_414, 2, x_364); lean_ctor_set(x_414, 3, x_365); lean_ctor_set_uint8(x_414, sizeof(void*)*4, x_412); x_415 = 0; x_416 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_416, 0, x_413); lean_ctor_set(x_416, 1, x_403); lean_ctor_set(x_416, 2, x_404); lean_ctor_set(x_416, 3, x_414); lean_ctor_set_uint8(x_416, sizeof(void*)*4, x_415); return x_416; } else { lean_object* x_417; x_417 = lean_ctor_get(x_371, 3); lean_inc(x_417); if (lean_obj_tag(x_417) == 0) { lean_object* x_418; lean_object* x_419; lean_object* x_420; uint8_t x_421; lean_object* x_422; uint8_t x_423; lean_object* x_424; x_418 = lean_ctor_get(x_371, 1); lean_inc(x_418); x_419 = lean_ctor_get(x_371, 2); lean_inc(x_419); if (lean_is_exclusive(x_371)) { lean_ctor_release(x_371, 0); lean_ctor_release(x_371, 1); lean_ctor_release(x_371, 2); lean_ctor_release(x_371, 3); x_420 = x_371; } else { lean_dec_ref(x_371); x_420 = lean_box(0); } x_421 = 0; if (lean_is_scalar(x_420)) { x_422 = lean_alloc_ctor(1, 4, 1); } else { x_422 = x_420; } lean_ctor_set(x_422, 0, x_372); lean_ctor_set(x_422, 1, x_418); lean_ctor_set(x_422, 2, x_419); lean_ctor_set(x_422, 3, x_417); lean_ctor_set_uint8(x_422, sizeof(void*)*4, x_421); x_423 = 1; x_424 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_424, 0, x_422); lean_ctor_set(x_424, 1, x_363); lean_ctor_set(x_424, 2, x_364); lean_ctor_set(x_424, 3, x_365); lean_ctor_set_uint8(x_424, sizeof(void*)*4, x_423); return x_424; } else { uint8_t x_425; x_425 = lean_ctor_get_uint8(x_417, sizeof(void*)*4); if (x_425 == 0) { 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_object* x_435; lean_object* x_436; lean_object* x_437; uint8_t x_438; lean_object* x_439; x_426 = lean_ctor_get(x_371, 1); lean_inc(x_426); x_427 = lean_ctor_get(x_371, 2); lean_inc(x_427); if (lean_is_exclusive(x_371)) { lean_ctor_release(x_371, 0); lean_ctor_release(x_371, 1); lean_ctor_release(x_371, 2); lean_ctor_release(x_371, 3); x_428 = x_371; } else { lean_dec_ref(x_371); x_428 = lean_box(0); } x_429 = lean_ctor_get(x_417, 0); lean_inc(x_429); x_430 = lean_ctor_get(x_417, 1); lean_inc(x_430); x_431 = lean_ctor_get(x_417, 2); lean_inc(x_431); x_432 = lean_ctor_get(x_417, 3); lean_inc(x_432); if (lean_is_exclusive(x_417)) { lean_ctor_release(x_417, 0); lean_ctor_release(x_417, 1); lean_ctor_release(x_417, 2); lean_ctor_release(x_417, 3); x_433 = x_417; } else { lean_dec_ref(x_417); x_433 = lean_box(0); } x_434 = 1; lean_inc(x_372); if (lean_is_scalar(x_433)) { x_435 = lean_alloc_ctor(1, 4, 1); } else { x_435 = x_433; } lean_ctor_set(x_435, 0, x_372); lean_ctor_set(x_435, 1, x_426); lean_ctor_set(x_435, 2, x_427); lean_ctor_set(x_435, 3, x_429); if (lean_is_exclusive(x_372)) { lean_ctor_release(x_372, 0); lean_ctor_release(x_372, 1); lean_ctor_release(x_372, 2); lean_ctor_release(x_372, 3); x_436 = x_372; } else { lean_dec_ref(x_372); x_436 = lean_box(0); } lean_ctor_set_uint8(x_435, sizeof(void*)*4, x_434); if (lean_is_scalar(x_436)) { x_437 = lean_alloc_ctor(1, 4, 1); } else { x_437 = x_436; } lean_ctor_set(x_437, 0, x_432); lean_ctor_set(x_437, 1, x_363); lean_ctor_set(x_437, 2, x_364); lean_ctor_set(x_437, 3, x_365); lean_ctor_set_uint8(x_437, sizeof(void*)*4, x_434); x_438 = 0; if (lean_is_scalar(x_428)) { x_439 = lean_alloc_ctor(1, 4, 1); } else { x_439 = x_428; } lean_ctor_set(x_439, 0, x_435); lean_ctor_set(x_439, 1, x_430); lean_ctor_set(x_439, 2, x_431); lean_ctor_set(x_439, 3, x_437); lean_ctor_set_uint8(x_439, sizeof(void*)*4, x_438); return x_439; } else { 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; lean_object* x_447; lean_object* x_448; uint8_t x_449; lean_object* x_450; uint8_t x_451; lean_object* x_452; x_440 = lean_ctor_get(x_371, 1); lean_inc(x_440); x_441 = lean_ctor_get(x_371, 2); lean_inc(x_441); if (lean_is_exclusive(x_371)) { lean_ctor_release(x_371, 0); lean_ctor_release(x_371, 1); lean_ctor_release(x_371, 2); lean_ctor_release(x_371, 3); x_442 = x_371; } else { lean_dec_ref(x_371); x_442 = lean_box(0); } x_443 = lean_ctor_get(x_372, 0); lean_inc(x_443); x_444 = lean_ctor_get(x_372, 1); lean_inc(x_444); x_445 = lean_ctor_get(x_372, 2); lean_inc(x_445); x_446 = lean_ctor_get(x_372, 3); lean_inc(x_446); if (lean_is_exclusive(x_372)) { lean_ctor_release(x_372, 0); lean_ctor_release(x_372, 1); lean_ctor_release(x_372, 2); lean_ctor_release(x_372, 3); x_447 = x_372; } else { lean_dec_ref(x_372); x_447 = lean_box(0); } if (lean_is_scalar(x_447)) { x_448 = lean_alloc_ctor(1, 4, 1); } else { x_448 = x_447; } lean_ctor_set(x_448, 0, x_443); lean_ctor_set(x_448, 1, x_444); lean_ctor_set(x_448, 2, x_445); lean_ctor_set(x_448, 3, x_446); lean_ctor_set_uint8(x_448, sizeof(void*)*4, x_425); x_449 = 0; if (lean_is_scalar(x_442)) { x_450 = lean_alloc_ctor(1, 4, 1); } else { x_450 = x_442; } lean_ctor_set(x_450, 0, x_448); lean_ctor_set(x_450, 1, x_440); lean_ctor_set(x_450, 2, x_441); lean_ctor_set(x_450, 3, x_417); lean_ctor_set_uint8(x_450, sizeof(void*)*4, x_449); x_451 = 1; x_452 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_452, 0, x_450); lean_ctor_set(x_452, 1, x_363); lean_ctor_set(x_452, 2, x_364); lean_ctor_set(x_452, 3, x_365); lean_ctor_set_uint8(x_452, sizeof(void*)*4, x_451); return x_452; } } } } } } case 1: { uint8_t x_453; lean_object* x_454; lean_dec(x_364); lean_dec(x_363); x_453 = 1; x_454 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_454, 0, x_362); lean_ctor_set(x_454, 1, x_2); lean_ctor_set(x_454, 2, x_3); lean_ctor_set(x_454, 3, x_365); lean_ctor_set_uint8(x_454, sizeof(void*)*4, x_453); return x_454; } default: { uint8_t x_455; x_455 = l_Std_RBNode_isRed___rarg(x_365); if (x_455 == 0) { lean_object* x_456; uint8_t x_457; lean_object* x_458; x_456 = l_Std_RBNode_ins___at_Lean_Server_FileWorker_queueRequest___spec__2(x_365, x_2, x_3); x_457 = 1; x_458 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_458, 0, x_362); lean_ctor_set(x_458, 1, x_363); lean_ctor_set(x_458, 2, x_364); lean_ctor_set(x_458, 3, x_456); lean_ctor_set_uint8(x_458, sizeof(void*)*4, x_457); return x_458; } else { lean_object* x_459; lean_object* x_460; x_459 = l_Std_RBNode_ins___at_Lean_Server_FileWorker_queueRequest___spec__2(x_365, x_2, x_3); x_460 = lean_ctor_get(x_459, 0); lean_inc(x_460); if (lean_obj_tag(x_460) == 0) { lean_object* x_461; x_461 = lean_ctor_get(x_459, 3); lean_inc(x_461); if (lean_obj_tag(x_461) == 0) { lean_object* x_462; lean_object* x_463; lean_object* x_464; uint8_t x_465; lean_object* x_466; uint8_t x_467; lean_object* x_468; x_462 = lean_ctor_get(x_459, 1); lean_inc(x_462); x_463 = lean_ctor_get(x_459, 2); lean_inc(x_463); if (lean_is_exclusive(x_459)) { lean_ctor_release(x_459, 0); lean_ctor_release(x_459, 1); lean_ctor_release(x_459, 2); lean_ctor_release(x_459, 3); x_464 = x_459; } else { lean_dec_ref(x_459); x_464 = lean_box(0); } x_465 = 0; if (lean_is_scalar(x_464)) { x_466 = lean_alloc_ctor(1, 4, 1); } else { x_466 = x_464; } lean_ctor_set(x_466, 0, x_461); lean_ctor_set(x_466, 1, x_462); lean_ctor_set(x_466, 2, x_463); lean_ctor_set(x_466, 3, x_461); lean_ctor_set_uint8(x_466, sizeof(void*)*4, x_465); x_467 = 1; x_468 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_468, 0, x_362); lean_ctor_set(x_468, 1, x_363); lean_ctor_set(x_468, 2, x_364); lean_ctor_set(x_468, 3, x_466); lean_ctor_set_uint8(x_468, sizeof(void*)*4, x_467); return x_468; } else { uint8_t x_469; x_469 = lean_ctor_get_uint8(x_461, sizeof(void*)*4); if (x_469 == 0) { lean_object* x_470; 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; uint8_t x_478; lean_object* x_479; lean_object* x_480; uint8_t x_481; lean_object* x_482; x_470 = lean_ctor_get(x_459, 1); lean_inc(x_470); x_471 = lean_ctor_get(x_459, 2); lean_inc(x_471); if (lean_is_exclusive(x_459)) { lean_ctor_release(x_459, 0); lean_ctor_release(x_459, 1); lean_ctor_release(x_459, 2); lean_ctor_release(x_459, 3); x_472 = x_459; } else { lean_dec_ref(x_459); x_472 = lean_box(0); } x_473 = lean_ctor_get(x_461, 0); lean_inc(x_473); x_474 = lean_ctor_get(x_461, 1); lean_inc(x_474); x_475 = lean_ctor_get(x_461, 2); lean_inc(x_475); x_476 = lean_ctor_get(x_461, 3); lean_inc(x_476); if (lean_is_exclusive(x_461)) { lean_ctor_release(x_461, 0); lean_ctor_release(x_461, 1); lean_ctor_release(x_461, 2); lean_ctor_release(x_461, 3); x_477 = x_461; } else { lean_dec_ref(x_461); x_477 = lean_box(0); } x_478 = 1; if (lean_is_scalar(x_477)) { x_479 = lean_alloc_ctor(1, 4, 1); } else { x_479 = x_477; } lean_ctor_set(x_479, 0, x_362); lean_ctor_set(x_479, 1, x_363); lean_ctor_set(x_479, 2, x_364); lean_ctor_set(x_479, 3, x_460); lean_ctor_set_uint8(x_479, sizeof(void*)*4, x_478); if (lean_is_scalar(x_472)) { x_480 = lean_alloc_ctor(1, 4, 1); } else { x_480 = x_472; } lean_ctor_set(x_480, 0, x_473); lean_ctor_set(x_480, 1, x_474); lean_ctor_set(x_480, 2, x_475); lean_ctor_set(x_480, 3, x_476); lean_ctor_set_uint8(x_480, sizeof(void*)*4, x_478); x_481 = 0; x_482 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_482, 0, x_479); lean_ctor_set(x_482, 1, x_470); lean_ctor_set(x_482, 2, x_471); lean_ctor_set(x_482, 3, x_480); lean_ctor_set_uint8(x_482, sizeof(void*)*4, x_481); return x_482; } else { lean_object* x_483; lean_object* x_484; lean_object* x_485; uint8_t x_486; lean_object* x_487; uint8_t x_488; lean_object* x_489; x_483 = lean_ctor_get(x_459, 1); lean_inc(x_483); x_484 = lean_ctor_get(x_459, 2); lean_inc(x_484); if (lean_is_exclusive(x_459)) { lean_ctor_release(x_459, 0); lean_ctor_release(x_459, 1); lean_ctor_release(x_459, 2); lean_ctor_release(x_459, 3); x_485 = x_459; } else { lean_dec_ref(x_459); x_485 = lean_box(0); } x_486 = 0; if (lean_is_scalar(x_485)) { x_487 = lean_alloc_ctor(1, 4, 1); } else { x_487 = x_485; } lean_ctor_set(x_487, 0, x_460); lean_ctor_set(x_487, 1, x_483); lean_ctor_set(x_487, 2, x_484); lean_ctor_set(x_487, 3, x_461); lean_ctor_set_uint8(x_487, sizeof(void*)*4, x_486); x_488 = 1; x_489 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_489, 0, x_362); lean_ctor_set(x_489, 1, x_363); lean_ctor_set(x_489, 2, x_364); lean_ctor_set(x_489, 3, x_487); lean_ctor_set_uint8(x_489, sizeof(void*)*4, x_488); return x_489; } } } else { uint8_t x_490; x_490 = lean_ctor_get_uint8(x_460, sizeof(void*)*4); if (x_490 == 0) { lean_object* x_491; lean_object* x_492; lean_object* x_493; lean_object* x_494; lean_object* x_495; lean_object* x_496; lean_object* x_497; lean_object* x_498; lean_object* x_499; uint8_t x_500; lean_object* x_501; lean_object* x_502; uint8_t x_503; lean_object* x_504; x_491 = lean_ctor_get(x_459, 1); lean_inc(x_491); x_492 = lean_ctor_get(x_459, 2); lean_inc(x_492); x_493 = lean_ctor_get(x_459, 3); lean_inc(x_493); if (lean_is_exclusive(x_459)) { lean_ctor_release(x_459, 0); lean_ctor_release(x_459, 1); lean_ctor_release(x_459, 2); lean_ctor_release(x_459, 3); x_494 = x_459; } else { lean_dec_ref(x_459); x_494 = lean_box(0); } x_495 = lean_ctor_get(x_460, 0); lean_inc(x_495); x_496 = lean_ctor_get(x_460, 1); lean_inc(x_496); x_497 = lean_ctor_get(x_460, 2); lean_inc(x_497); x_498 = lean_ctor_get(x_460, 3); lean_inc(x_498); if (lean_is_exclusive(x_460)) { lean_ctor_release(x_460, 0); lean_ctor_release(x_460, 1); lean_ctor_release(x_460, 2); lean_ctor_release(x_460, 3); x_499 = x_460; } else { lean_dec_ref(x_460); x_499 = lean_box(0); } x_500 = 1; if (lean_is_scalar(x_499)) { x_501 = lean_alloc_ctor(1, 4, 1); } else { x_501 = x_499; } lean_ctor_set(x_501, 0, x_362); lean_ctor_set(x_501, 1, x_363); lean_ctor_set(x_501, 2, x_364); lean_ctor_set(x_501, 3, x_495); lean_ctor_set_uint8(x_501, sizeof(void*)*4, x_500); if (lean_is_scalar(x_494)) { x_502 = lean_alloc_ctor(1, 4, 1); } else { x_502 = x_494; } lean_ctor_set(x_502, 0, x_498); lean_ctor_set(x_502, 1, x_491); lean_ctor_set(x_502, 2, x_492); lean_ctor_set(x_502, 3, x_493); lean_ctor_set_uint8(x_502, sizeof(void*)*4, x_500); x_503 = 0; x_504 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_504, 0, x_501); lean_ctor_set(x_504, 1, x_496); lean_ctor_set(x_504, 2, x_497); lean_ctor_set(x_504, 3, x_502); lean_ctor_set_uint8(x_504, sizeof(void*)*4, x_503); return x_504; } else { lean_object* x_505; x_505 = lean_ctor_get(x_459, 3); lean_inc(x_505); if (lean_obj_tag(x_505) == 0) { lean_object* x_506; lean_object* x_507; lean_object* x_508; uint8_t x_509; lean_object* x_510; uint8_t x_511; lean_object* x_512; x_506 = lean_ctor_get(x_459, 1); lean_inc(x_506); x_507 = lean_ctor_get(x_459, 2); lean_inc(x_507); if (lean_is_exclusive(x_459)) { lean_ctor_release(x_459, 0); lean_ctor_release(x_459, 1); lean_ctor_release(x_459, 2); lean_ctor_release(x_459, 3); x_508 = x_459; } else { lean_dec_ref(x_459); x_508 = lean_box(0); } x_509 = 0; if (lean_is_scalar(x_508)) { x_510 = lean_alloc_ctor(1, 4, 1); } else { x_510 = x_508; } lean_ctor_set(x_510, 0, x_460); lean_ctor_set(x_510, 1, x_506); lean_ctor_set(x_510, 2, x_507); lean_ctor_set(x_510, 3, x_505); lean_ctor_set_uint8(x_510, sizeof(void*)*4, x_509); x_511 = 1; x_512 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_512, 0, x_362); lean_ctor_set(x_512, 1, x_363); lean_ctor_set(x_512, 2, x_364); lean_ctor_set(x_512, 3, x_510); lean_ctor_set_uint8(x_512, sizeof(void*)*4, x_511); return x_512; } else { uint8_t x_513; x_513 = lean_ctor_get_uint8(x_505, sizeof(void*)*4); if (x_513 == 0) { 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; uint8_t x_522; lean_object* x_523; lean_object* x_524; lean_object* x_525; uint8_t x_526; lean_object* x_527; x_514 = lean_ctor_get(x_459, 1); lean_inc(x_514); x_515 = lean_ctor_get(x_459, 2); lean_inc(x_515); if (lean_is_exclusive(x_459)) { lean_ctor_release(x_459, 0); lean_ctor_release(x_459, 1); lean_ctor_release(x_459, 2); lean_ctor_release(x_459, 3); x_516 = x_459; } else { lean_dec_ref(x_459); x_516 = lean_box(0); } x_517 = lean_ctor_get(x_505, 0); lean_inc(x_517); x_518 = lean_ctor_get(x_505, 1); lean_inc(x_518); x_519 = lean_ctor_get(x_505, 2); lean_inc(x_519); x_520 = lean_ctor_get(x_505, 3); lean_inc(x_520); if (lean_is_exclusive(x_505)) { lean_ctor_release(x_505, 0); lean_ctor_release(x_505, 1); lean_ctor_release(x_505, 2); lean_ctor_release(x_505, 3); x_521 = x_505; } else { lean_dec_ref(x_505); x_521 = lean_box(0); } x_522 = 1; lean_inc(x_460); if (lean_is_scalar(x_521)) { x_523 = lean_alloc_ctor(1, 4, 1); } else { x_523 = x_521; } lean_ctor_set(x_523, 0, x_362); lean_ctor_set(x_523, 1, x_363); lean_ctor_set(x_523, 2, x_364); lean_ctor_set(x_523, 3, x_460); if (lean_is_exclusive(x_460)) { lean_ctor_release(x_460, 0); lean_ctor_release(x_460, 1); lean_ctor_release(x_460, 2); lean_ctor_release(x_460, 3); x_524 = x_460; } else { lean_dec_ref(x_460); x_524 = lean_box(0); } lean_ctor_set_uint8(x_523, sizeof(void*)*4, x_522); if (lean_is_scalar(x_524)) { x_525 = lean_alloc_ctor(1, 4, 1); } else { x_525 = x_524; } lean_ctor_set(x_525, 0, x_517); lean_ctor_set(x_525, 1, x_518); lean_ctor_set(x_525, 2, x_519); lean_ctor_set(x_525, 3, x_520); lean_ctor_set_uint8(x_525, sizeof(void*)*4, x_522); x_526 = 0; if (lean_is_scalar(x_516)) { x_527 = lean_alloc_ctor(1, 4, 1); } else { x_527 = x_516; } lean_ctor_set(x_527, 0, x_523); lean_ctor_set(x_527, 1, x_514); lean_ctor_set(x_527, 2, x_515); lean_ctor_set(x_527, 3, x_525); lean_ctor_set_uint8(x_527, sizeof(void*)*4, x_526); return x_527; } else { 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; uint8_t x_537; lean_object* x_538; uint8_t x_539; lean_object* x_540; x_528 = lean_ctor_get(x_459, 1); lean_inc(x_528); x_529 = lean_ctor_get(x_459, 2); lean_inc(x_529); if (lean_is_exclusive(x_459)) { lean_ctor_release(x_459, 0); lean_ctor_release(x_459, 1); lean_ctor_release(x_459, 2); lean_ctor_release(x_459, 3); x_530 = x_459; } else { lean_dec_ref(x_459); x_530 = lean_box(0); } x_531 = lean_ctor_get(x_460, 0); lean_inc(x_531); x_532 = lean_ctor_get(x_460, 1); lean_inc(x_532); x_533 = lean_ctor_get(x_460, 2); lean_inc(x_533); x_534 = lean_ctor_get(x_460, 3); lean_inc(x_534); if (lean_is_exclusive(x_460)) { lean_ctor_release(x_460, 0); lean_ctor_release(x_460, 1); lean_ctor_release(x_460, 2); lean_ctor_release(x_460, 3); x_535 = x_460; } else { lean_dec_ref(x_460); x_535 = lean_box(0); } if (lean_is_scalar(x_535)) { x_536 = lean_alloc_ctor(1, 4, 1); } else { x_536 = x_535; } lean_ctor_set(x_536, 0, x_531); lean_ctor_set(x_536, 1, x_532); lean_ctor_set(x_536, 2, x_533); lean_ctor_set(x_536, 3, x_534); lean_ctor_set_uint8(x_536, sizeof(void*)*4, x_513); x_537 = 0; if (lean_is_scalar(x_530)) { x_538 = lean_alloc_ctor(1, 4, 1); } else { x_538 = x_530; } lean_ctor_set(x_538, 0, x_536); lean_ctor_set(x_538, 1, x_528); lean_ctor_set(x_538, 2, x_529); lean_ctor_set(x_538, 3, x_505); lean_ctor_set_uint8(x_538, sizeof(void*)*4, x_537); x_539 = 1; x_540 = lean_alloc_ctor(1, 4, 1); lean_ctor_set(x_540, 0, x_362); lean_ctor_set(x_540, 1, x_363); lean_ctor_set(x_540, 2, x_364); lean_ctor_set(x_540, 3, x_538); lean_ctor_set_uint8(x_540, sizeof(void*)*4, x_539); return x_540; } } } } } } } } } } } } lean_object* l_Std_RBNode_insert___at_Lean_Server_FileWorker_queueRequest___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_FileWorker_queueRequest___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_FileWorker_queueRequest___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_FileWorker_queueRequest___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Std_RBNode_insert___at_Lean_Server_FileWorker_queueRequest___spec__1(x_3, x_1, x_2); return x_4; } } lean_object* l_Lean_Server_FileWorker_queueRequest(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; x_5 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_queueRequest___lambda__1), 3, 2); lean_closure_set(x_5, 0, x_1); lean_closure_set(x_5, 1, x_2); x_6 = l_Lean_Server_FileWorker_updatePendingRequests(x_5, x_3, x_4); return x_6; } } lean_object* l_Lean_Server_FileWorker_queueRequest___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_Server_FileWorker_queueRequest(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } lean_object* l_Lean_Server_FileWorker_handleRequest_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_5; lean_object* x_6; lean_dec(x_3); lean_dec(x_2); x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); lean_dec(x_1); x_6 = lean_apply_1(x_4, x_5); return x_6; } else { lean_object* x_7; lean_dec(x_4); x_7 = lean_ctor_get(x_1, 0); lean_inc(x_7); lean_dec(x_1); if (lean_obj_tag(x_7) == 0) { lean_object* x_8; lean_object* x_9; lean_dec(x_2); x_8 = lean_ctor_get(x_7, 0); lean_inc(x_8); lean_dec(x_7); x_9 = lean_apply_1(x_3, x_8); return x_9; } else { lean_object* x_10; lean_object* x_11; lean_dec(x_3); x_10 = lean_ctor_get(x_7, 0); lean_inc(x_10); lean_dec(x_7); x_11 = lean_apply_1(x_2, x_10); return x_11; } } } } lean_object* l_Lean_Server_FileWorker_handleRequest_match__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest_match__1___rarg), 4, 0); return x_3; } } static lean_object* _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("textDocument/completion"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("textDocument/hover"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("textDocument/declaration"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__4() { _start: { lean_object* x_1; x_1 = lean_mk_string("textDocument/definition"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__5() { _start: { lean_object* x_1; x_1 = lean_mk_string("textDocument/typeDefinition"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__6() { _start: { lean_object* x_1; x_1 = lean_mk_string("textDocument/documentHighlight"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__7() { _start: { lean_object* x_1; x_1 = lean_mk_string("textDocument/documentSymbol"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__8() { _start: { lean_object* x_1; x_1 = lean_mk_string("textDocument/semanticTokens/full"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__9() { _start: { lean_object* x_1; x_1 = lean_mk_string("textDocument/semanticTokens/range"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__10() { _start: { lean_object* x_1; x_1 = lean_mk_string("$/lean/plainGoal"); return x_1; } } lean_object* l_Lean_Server_FileWorker_handleRequest_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, 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: { lean_object* x_14; uint8_t x_15; x_14 = l_Lean_Lsp_Ipc_collectDiagnostics___closed__1; x_15 = lean_string_dec_eq(x_1, x_14); if (x_15 == 0) { lean_object* x_16; uint8_t x_17; lean_dec(x_2); x_16 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__1; x_17 = lean_string_dec_eq(x_1, x_16); if (x_17 == 0) { lean_object* x_18; uint8_t x_19; lean_dec(x_3); x_18 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__2; x_19 = lean_string_dec_eq(x_1, x_18); if (x_19 == 0) { lean_object* x_20; uint8_t x_21; lean_dec(x_4); x_20 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__3; x_21 = lean_string_dec_eq(x_1, x_20); if (x_21 == 0) { lean_object* x_22; uint8_t x_23; lean_dec(x_5); x_22 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__4; x_23 = lean_string_dec_eq(x_1, x_22); if (x_23 == 0) { lean_object* x_24; uint8_t x_25; lean_dec(x_6); x_24 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__5; x_25 = lean_string_dec_eq(x_1, x_24); if (x_25 == 0) { lean_object* x_26; uint8_t x_27; lean_dec(x_7); x_26 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__6; x_27 = lean_string_dec_eq(x_1, x_26); if (x_27 == 0) { lean_object* x_28; uint8_t x_29; lean_dec(x_8); x_28 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__7; x_29 = lean_string_dec_eq(x_1, x_28); if (x_29 == 0) { lean_object* x_30; uint8_t x_31; lean_dec(x_9); x_30 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__8; x_31 = lean_string_dec_eq(x_1, x_30); if (x_31 == 0) { lean_object* x_32; uint8_t x_33; lean_dec(x_10); x_32 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__9; x_33 = lean_string_dec_eq(x_1, x_32); if (x_33 == 0) { lean_object* x_34; uint8_t x_35; lean_dec(x_11); x_34 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__10; x_35 = lean_string_dec_eq(x_1, x_34); if (x_35 == 0) { lean_object* x_36; lean_dec(x_12); x_36 = lean_apply_1(x_13, x_1); return x_36; } else { lean_object* x_37; lean_object* x_38; lean_dec(x_13); lean_dec(x_1); x_37 = lean_box(0); x_38 = lean_apply_1(x_12, x_37); return x_38; } } else { lean_object* x_39; lean_object* x_40; lean_dec(x_13); lean_dec(x_12); lean_dec(x_1); x_39 = lean_box(0); x_40 = lean_apply_1(x_11, x_39); return x_40; } } else { lean_object* x_41; lean_object* x_42; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_1); x_41 = lean_box(0); x_42 = lean_apply_1(x_10, x_41); return x_42; } } else { lean_object* x_43; lean_object* x_44; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_1); x_43 = lean_box(0); x_44 = lean_apply_1(x_9, x_43); return x_44; } } else { lean_object* x_45; lean_object* x_46; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_1); x_45 = lean_box(0); x_46 = lean_apply_1(x_8, x_45); return x_46; } } else { lean_object* x_47; lean_object* x_48; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_1); x_47 = lean_box(0); x_48 = lean_apply_1(x_7, x_47); return x_48; } } else { lean_object* x_49; lean_object* x_50; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_1); x_49 = lean_box(0); x_50 = lean_apply_1(x_6, x_49); return x_50; } } else { lean_object* x_51; lean_object* x_52; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_1); x_51 = lean_box(0); x_52 = lean_apply_1(x_5, x_51); return x_52; } } else { lean_object* x_53; lean_object* x_54; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_1); x_53 = lean_box(0); x_54 = lean_apply_1(x_4, x_53); return x_54; } } else { lean_object* x_55; lean_object* x_56; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); x_55 = lean_box(0); x_56 = lean_apply_1(x_3, x_55); return x_56; } } else { lean_object* x_57; lean_object* x_58; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); x_57 = lean_box(0); x_58 = lean_apply_1(x_2, x_57); return x_58; } } } lean_object* l_Lean_Server_FileWorker_handleRequest_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest_match__2___rarg), 13, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoalParams____x40_Lean_Data_Lsp_Extra___hyg_133_(x_1); 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; x_5 = l_Lean_Json_compress(x_1); x_6 = l_Lean_Server_FileWorker_parseParams___rarg___closed__1; x_7 = lean_string_append(x_6, x_5); lean_dec(x_5); x_8 = l_Lean_instInhabitedParserDescr___closed__1; x_9 = lean_string_append(x_7, x_8); x_10 = l_IO_throwServerError___rarg(x_9, x_3); return x_10; } else { lean_object* x_11; lean_object* x_12; lean_dec(x_1); x_11 = lean_ctor_get(x_4, 0); lean_inc(x_11); lean_dec(x_4); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_3); return x_12; } } } lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = lean_ctor_get(x_2, 1); lean_inc(x_4); if (lean_obj_tag(x_4) == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_5 = lean_ctor_get(x_2, 0); lean_inc(x_5); lean_dec(x_2); x_6 = lean_box(0); x_7 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_7, 0, x_5); 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; } else { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_9 = lean_ctor_get(x_2, 0); lean_inc(x_9); lean_dec(x_2); x_10 = lean_ctor_get(x_4, 0); lean_inc(x_10); lean_dec(x_4); x_11 = l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_toJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_277_(x_10); x_12 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_12, 0, x_9); lean_ctor_set(x_12, 1, x_11); x_13 = l_IO_FS_Stream_writeLspMessage(x_1, x_12, x_3); lean_dec(x_12); return x_13; } } } lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonSemanticTokensRangeParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_1781_(x_1); 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; x_5 = l_Lean_Json_compress(x_1); x_6 = l_Lean_Server_FileWorker_parseParams___rarg___closed__1; x_7 = lean_string_append(x_6, x_5); lean_dec(x_5); x_8 = l_Lean_instInhabitedParserDescr___closed__1; x_9 = lean_string_append(x_7, x_8); x_10 = l_IO_throwServerError___rarg(x_9, x_3); return x_10; } else { lean_object* x_11; lean_object* x_12; lean_dec(x_1); x_11 = lean_ctor_get(x_4, 0); lean_inc(x_11); lean_dec(x_4); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_3); return x_12; } } } lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_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_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___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonSemanticTokens____x40_Lean_Data_Lsp_LanguageFeatures___hyg_1903_(x_5); x_7 = lean_alloc_ctor(2, 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_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonSemanticTokensParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_1706_(x_1); 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; x_5 = l_Lean_Json_compress(x_1); x_6 = l_Lean_Server_FileWorker_parseParams___rarg___closed__1; x_7 = lean_string_append(x_6, x_5); lean_dec(x_5); x_8 = l_Lean_instInhabitedParserDescr___closed__1; x_9 = lean_string_append(x_7, x_8); x_10 = l_IO_throwServerError___rarg(x_9, x_3); return x_10; } else { lean_object* x_11; lean_object* x_12; lean_dec(x_1); x_11 = lean_ctor_get(x_4, 0); lean_inc(x_11); lean_dec(x_4); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_3); return x_12; } } } lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_1084_(x_1); 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; x_5 = l_Lean_Json_compress(x_1); x_6 = l_Lean_Server_FileWorker_parseParams___rarg___closed__1; x_7 = lean_string_append(x_6, x_5); lean_dec(x_5); x_8 = l_Lean_instInhabitedParserDescr___closed__1; x_9 = lean_string_append(x_7, x_8); x_10 = l_IO_throwServerError___rarg(x_9, x_3); return x_10; } else { lean_object* x_11; lean_object* x_12; lean_dec(x_1); x_11 = lean_ctor_get(x_4, 0); lean_inc(x_11); lean_dec(x_4); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_3); return x_12; } } } lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__7(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; size_t x_7; size_t 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; 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 = lean_array_get_size(x_5); x_7 = lean_usize_of_nat(x_6); lean_dec(x_6); x_8 = 0; x_9 = x_5; x_10 = l_Array_mapMUnsafe_map___at_Lean_Lsp_instToJsonDocumentSymbol_go___spec__3(x_7, x_8, x_9); x_11 = x_10; x_12 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_12, 0, x_11); x_13 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_13, 0, x_4); lean_ctor_set(x_13, 1, x_12); x_14 = l_IO_FS_Stream_writeLspMessage(x_1, x_13, x_3); lean_dec(x_13); return x_14; } } lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentHighlightParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_919_(x_1); 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; x_5 = l_Lean_Json_compress(x_1); x_6 = l_Lean_Server_FileWorker_parseParams___rarg___closed__1; x_7 = lean_string_append(x_6, x_5); lean_dec(x_5); x_8 = l_Lean_instInhabitedParserDescr___closed__1; x_9 = lean_string_append(x_7, x_8); x_10 = l_IO_throwServerError___rarg(x_9, x_3); return x_10; } else { lean_object* x_11; lean_object* x_12; lean_dec(x_1); x_11 = lean_ctor_get(x_4, 0); lean_inc(x_11); lean_dec(x_4); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_3); return x_12; } } } lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_handleRequest___spec__10(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; size_t x_11; size_t x_12; lean_object* x_13; lean_object* x_14; 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 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentHighlight____x40_Lean_Data_Lsp_LanguageFeatures___hyg_1040_(x_9); x_11 = 1; x_12 = x_2 + x_11; x_13 = x_10; x_14 = lean_array_uset(x_8, x_2, x_13); x_2 = x_12; x_3 = x_14; goto _start; } } } lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_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_object* x_6; size_t x_7; size_t 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; 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 = lean_array_get_size(x_5); x_7 = lean_usize_of_nat(x_6); lean_dec(x_6); x_8 = 0; x_9 = x_5; x_10 = l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_handleRequest___spec__10(x_7, x_8, x_9); x_11 = x_10; x_12 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_12, 0, x_11); x_13 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_13, 0, x_4); lean_ctor_set(x_13, 1, x_12); x_14 = l_IO_FS_Stream_writeLspMessage(x_1, x_13, x_3); lean_dec(x_13); return x_14; } } lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__11(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1533_(x_1); 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; x_5 = l_Lean_Json_compress(x_1); x_6 = l_Lean_Server_FileWorker_parseParams___rarg___closed__1; x_7 = lean_string_append(x_6, x_5); lean_dec(x_5); x_8 = l_Lean_instInhabitedParserDescr___closed__1; x_9 = lean_string_append(x_7, x_8); x_10 = l_IO_throwServerError___rarg(x_9, x_3); return x_10; } else { lean_object* x_11; lean_object* x_12; lean_dec(x_1); x_11 = lean_ctor_get(x_4, 0); lean_inc(x_11); lean_dec(x_4); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_3); return x_12; } } } lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_handleRequest___spec__13(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; size_t x_11; size_t x_12; lean_object* x_13; lean_object* x_14; 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 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocationLink____x40_Lean_Data_Lsp_Basic___hyg_692_(x_9); x_11 = 1; x_12 = x_2 + x_11; x_13 = x_10; x_14 = lean_array_uset(x_8, x_2, x_13); x_2 = x_12; x_3 = x_14; goto _start; } } } lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__12(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; size_t x_7; size_t 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; 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 = lean_array_get_size(x_5); x_7 = lean_usize_of_nat(x_6); lean_dec(x_6); x_8 = 0; x_9 = x_5; x_10 = l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_handleRequest___spec__13(x_7, x_8, x_9); x_11 = x_10; x_12 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_12, 0, x_11); x_13 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_13, 0, x_4); lean_ctor_set(x_13, 1, x_12); x_14 = l_IO_FS_Stream_writeLspMessage(x_1, x_13, x_3); lean_dec(x_13); return x_14; } } lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__14(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonHoverParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_559_(x_1); 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; x_5 = l_Lean_Json_compress(x_1); x_6 = l_Lean_Server_FileWorker_parseParams___rarg___closed__1; x_7 = lean_string_append(x_6, x_5); lean_dec(x_5); x_8 = l_Lean_instInhabitedParserDescr___closed__1; x_9 = lean_string_append(x_7, x_8); x_10 = l_IO_throwServerError___rarg(x_9, x_3); return x_10; } else { lean_object* x_11; lean_object* x_12; lean_dec(x_1); x_11 = lean_ctor_get(x_4, 0); lean_inc(x_11); lean_dec(x_4); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_3); return x_12; } } } lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__15(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = lean_ctor_get(x_2, 1); lean_inc(x_4); if (lean_obj_tag(x_4) == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_5 = lean_ctor_get(x_2, 0); lean_inc(x_5); lean_dec(x_2); x_6 = lean_box(0); x_7 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_7, 0, x_5); 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; } else { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_9 = lean_ctor_get(x_2, 0); lean_inc(x_9); lean_dec(x_2); x_10 = lean_ctor_get(x_4, 0); lean_inc(x_10); lean_dec(x_4); x_11 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonHover____x40_Lean_Data_Lsp_LanguageFeatures___hyg_474_(x_10); x_12 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_12, 0, x_9); lean_ctor_set(x_12, 1, x_11); x_13 = l_IO_FS_Stream_writeLspMessage(x_1, x_12, x_3); lean_dec(x_12); return x_13; } } } lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__16(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonCompletionParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_374_(x_1); 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; x_5 = l_Lean_Json_compress(x_1); x_6 = l_Lean_Server_FileWorker_parseParams___rarg___closed__1; x_7 = lean_string_append(x_6, x_5); lean_dec(x_5); x_8 = l_Lean_instInhabitedParserDescr___closed__1; x_9 = lean_string_append(x_7, x_8); x_10 = l_IO_throwServerError___rarg(x_9, x_3); return x_10; } else { lean_object* x_11; lean_object* x_12; lean_dec(x_1); x_11 = lean_ctor_get(x_4, 0); lean_inc(x_11); lean_dec(x_4); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_3); return x_12; } } } lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_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; 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___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonCompletionList____x40_Lean_Data_Lsp_LanguageFeatures___hyg_329_(x_5); x_7 = lean_alloc_ctor(2, 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_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__18(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonWaitForDiagnosticsParams____x40_Lean_Data_Lsp_Extra___hyg_57_(x_1); 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; x_5 = l_Lean_Json_compress(x_1); x_6 = l_Lean_Server_FileWorker_parseParams___rarg___closed__1; x_7 = lean_string_append(x_6, x_5); lean_dec(x_5); x_8 = l_Lean_instInhabitedParserDescr___closed__1; x_9 = lean_string_append(x_7, x_8); x_10 = l_IO_throwServerError___rarg(x_9, x_3); return x_10; } else { lean_object* x_11; lean_object* x_12; lean_dec(x_1); x_11 = lean_ctor_get(x_4, 0); lean_inc(x_11); lean_dec(x_4); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_3); return x_12; } } } lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__19(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; x_4 = lean_ctor_get(x_2, 0); x_5 = l_Lean_Lsp_instToJsonWaitForDiagnostics___closed__1; lean_inc(x_4); x_6 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_6, 0, x_4); lean_ctor_set(x_6, 1, x_5); x_7 = l_IO_FS_Stream_writeLspMessage(x_1, x_6, x_3); lean_dec(x_6); return x_7; } } lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_3) == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); x_6 = lean_ctor_get(x_1, 1); lean_inc(x_6); lean_dec(x_1); x_7 = lean_io_error_to_string(x_5); x_8 = lean_box(0); x_9 = 4; x_10 = lean_alloc_ctor(0, 3, 1); lean_ctor_set(x_10, 0, x_2); lean_ctor_set(x_10, 1, x_7); lean_ctor_set(x_10, 2, x_8); lean_ctor_set_uint8(x_10, sizeof(void*)*3, x_9); x_11 = l_IO_FS_Stream_writeLspResponseError(x_6, x_10, x_4); lean_dec(x_10); return x_11; } else { lean_object* x_12; x_12 = lean_ctor_get(x_3, 0); lean_inc(x_12); lean_dec(x_3); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); lean_dec(x_12); x_14 = lean_ctor_get(x_1, 1); lean_inc(x_14); lean_dec(x_1); x_15 = lean_ctor_get_uint8(x_13, sizeof(void*)*1); x_16 = lean_ctor_get(x_13, 0); lean_inc(x_16); lean_dec(x_13); x_17 = lean_box(0); x_18 = lean_alloc_ctor(0, 3, 1); lean_ctor_set(x_18, 0, x_2); lean_ctor_set(x_18, 1, x_16); lean_ctor_set(x_18, 2, x_17); lean_ctor_set_uint8(x_18, sizeof(void*)*3, x_15); x_19 = l_IO_FS_Stream_writeLspResponseError(x_14, x_18, x_4); lean_dec(x_18); return x_19; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_20 = lean_ctor_get(x_12, 0); lean_inc(x_20); lean_dec(x_12); x_21 = lean_ctor_get(x_1, 1); lean_inc(x_21); lean_dec(x_1); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_2); lean_ctor_set(x_22, 1, x_20); x_23 = l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__2(x_21, x_22, x_4); return x_23; } } } } lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_3) == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); x_6 = lean_ctor_get(x_1, 1); lean_inc(x_6); lean_dec(x_1); x_7 = lean_io_error_to_string(x_5); x_8 = lean_box(0); x_9 = 4; x_10 = lean_alloc_ctor(0, 3, 1); lean_ctor_set(x_10, 0, x_2); lean_ctor_set(x_10, 1, x_7); lean_ctor_set(x_10, 2, x_8); lean_ctor_set_uint8(x_10, sizeof(void*)*3, x_9); x_11 = l_IO_FS_Stream_writeLspResponseError(x_6, x_10, x_4); lean_dec(x_10); return x_11; } else { lean_object* x_12; x_12 = lean_ctor_get(x_3, 0); lean_inc(x_12); lean_dec(x_3); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); lean_dec(x_12); x_14 = lean_ctor_get(x_1, 1); lean_inc(x_14); lean_dec(x_1); x_15 = lean_ctor_get_uint8(x_13, sizeof(void*)*1); x_16 = lean_ctor_get(x_13, 0); lean_inc(x_16); lean_dec(x_13); x_17 = lean_box(0); x_18 = lean_alloc_ctor(0, 3, 1); lean_ctor_set(x_18, 0, x_2); lean_ctor_set(x_18, 1, x_16); lean_ctor_set(x_18, 2, x_17); lean_ctor_set_uint8(x_18, sizeof(void*)*3, x_15); x_19 = l_IO_FS_Stream_writeLspResponseError(x_14, x_18, x_4); lean_dec(x_18); return x_19; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_20 = lean_ctor_get(x_12, 0); lean_inc(x_20); lean_dec(x_12); x_21 = lean_ctor_get(x_1, 1); lean_inc(x_21); lean_dec(x_1); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_2); lean_ctor_set(x_22, 1, x_20); x_23 = l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__4(x_21, x_22, x_4); return x_23; } } } } lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_3) == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); x_6 = lean_ctor_get(x_1, 1); lean_inc(x_6); lean_dec(x_1); x_7 = lean_io_error_to_string(x_5); x_8 = lean_box(0); x_9 = 4; x_10 = lean_alloc_ctor(0, 3, 1); lean_ctor_set(x_10, 0, x_2); lean_ctor_set(x_10, 1, x_7); lean_ctor_set(x_10, 2, x_8); lean_ctor_set_uint8(x_10, sizeof(void*)*3, x_9); x_11 = l_IO_FS_Stream_writeLspResponseError(x_6, x_10, x_4); lean_dec(x_10); return x_11; } else { lean_object* x_12; x_12 = lean_ctor_get(x_3, 0); lean_inc(x_12); lean_dec(x_3); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); lean_dec(x_12); x_14 = lean_ctor_get(x_1, 1); lean_inc(x_14); lean_dec(x_1); x_15 = lean_ctor_get_uint8(x_13, sizeof(void*)*1); x_16 = lean_ctor_get(x_13, 0); lean_inc(x_16); lean_dec(x_13); x_17 = lean_box(0); x_18 = lean_alloc_ctor(0, 3, 1); lean_ctor_set(x_18, 0, x_2); lean_ctor_set(x_18, 1, x_16); lean_ctor_set(x_18, 2, x_17); lean_ctor_set_uint8(x_18, sizeof(void*)*3, x_15); x_19 = l_IO_FS_Stream_writeLspResponseError(x_14, x_18, x_4); lean_dec(x_18); return x_19; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_20 = lean_ctor_get(x_12, 0); lean_inc(x_20); lean_dec(x_12); x_21 = lean_ctor_get(x_1, 1); lean_inc(x_21); lean_dec(x_1); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_2); lean_ctor_set(x_22, 1, x_20); x_23 = l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__7(x_21, x_22, x_4); return x_23; } } } } lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_3) == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); x_6 = lean_ctor_get(x_1, 1); lean_inc(x_6); lean_dec(x_1); x_7 = lean_io_error_to_string(x_5); x_8 = lean_box(0); x_9 = 4; x_10 = lean_alloc_ctor(0, 3, 1); lean_ctor_set(x_10, 0, x_2); lean_ctor_set(x_10, 1, x_7); lean_ctor_set(x_10, 2, x_8); lean_ctor_set_uint8(x_10, sizeof(void*)*3, x_9); x_11 = l_IO_FS_Stream_writeLspResponseError(x_6, x_10, x_4); lean_dec(x_10); return x_11; } else { lean_object* x_12; x_12 = lean_ctor_get(x_3, 0); lean_inc(x_12); lean_dec(x_3); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); lean_dec(x_12); x_14 = lean_ctor_get(x_1, 1); lean_inc(x_14); lean_dec(x_1); x_15 = lean_ctor_get_uint8(x_13, sizeof(void*)*1); x_16 = lean_ctor_get(x_13, 0); lean_inc(x_16); lean_dec(x_13); x_17 = lean_box(0); x_18 = lean_alloc_ctor(0, 3, 1); lean_ctor_set(x_18, 0, x_2); lean_ctor_set(x_18, 1, x_16); lean_ctor_set(x_18, 2, x_17); lean_ctor_set_uint8(x_18, sizeof(void*)*3, x_15); x_19 = l_IO_FS_Stream_writeLspResponseError(x_14, x_18, x_4); lean_dec(x_18); return x_19; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_20 = lean_ctor_get(x_12, 0); lean_inc(x_20); lean_dec(x_12); x_21 = lean_ctor_get(x_1, 1); lean_inc(x_21); lean_dec(x_1); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_2); lean_ctor_set(x_22, 1, x_20); x_23 = l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__9(x_21, x_22, x_4); return x_23; } } } } lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_3) == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); x_6 = lean_ctor_get(x_1, 1); lean_inc(x_6); lean_dec(x_1); x_7 = lean_io_error_to_string(x_5); x_8 = lean_box(0); x_9 = 4; x_10 = lean_alloc_ctor(0, 3, 1); lean_ctor_set(x_10, 0, x_2); lean_ctor_set(x_10, 1, x_7); lean_ctor_set(x_10, 2, x_8); lean_ctor_set_uint8(x_10, sizeof(void*)*3, x_9); x_11 = l_IO_FS_Stream_writeLspResponseError(x_6, x_10, x_4); lean_dec(x_10); return x_11; } else { lean_object* x_12; x_12 = lean_ctor_get(x_3, 0); lean_inc(x_12); lean_dec(x_3); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); lean_dec(x_12); x_14 = lean_ctor_get(x_1, 1); lean_inc(x_14); lean_dec(x_1); x_15 = lean_ctor_get_uint8(x_13, sizeof(void*)*1); x_16 = lean_ctor_get(x_13, 0); lean_inc(x_16); lean_dec(x_13); x_17 = lean_box(0); x_18 = lean_alloc_ctor(0, 3, 1); lean_ctor_set(x_18, 0, x_2); lean_ctor_set(x_18, 1, x_16); lean_ctor_set(x_18, 2, x_17); lean_ctor_set_uint8(x_18, sizeof(void*)*3, x_15); x_19 = l_IO_FS_Stream_writeLspResponseError(x_14, x_18, x_4); lean_dec(x_18); return x_19; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_20 = lean_ctor_get(x_12, 0); lean_inc(x_20); lean_dec(x_12); x_21 = lean_ctor_get(x_1, 1); lean_inc(x_21); lean_dec(x_1); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_2); lean_ctor_set(x_22, 1, x_20); x_23 = l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__12(x_21, x_22, x_4); return x_23; } } } } lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_3) == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); x_6 = lean_ctor_get(x_1, 1); lean_inc(x_6); lean_dec(x_1); x_7 = lean_io_error_to_string(x_5); x_8 = lean_box(0); x_9 = 4; x_10 = lean_alloc_ctor(0, 3, 1); lean_ctor_set(x_10, 0, x_2); lean_ctor_set(x_10, 1, x_7); lean_ctor_set(x_10, 2, x_8); lean_ctor_set_uint8(x_10, sizeof(void*)*3, x_9); x_11 = l_IO_FS_Stream_writeLspResponseError(x_6, x_10, x_4); lean_dec(x_10); return x_11; } else { lean_object* x_12; x_12 = lean_ctor_get(x_3, 0); lean_inc(x_12); lean_dec(x_3); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); lean_dec(x_12); x_14 = lean_ctor_get(x_1, 1); lean_inc(x_14); lean_dec(x_1); x_15 = lean_ctor_get_uint8(x_13, sizeof(void*)*1); x_16 = lean_ctor_get(x_13, 0); lean_inc(x_16); lean_dec(x_13); x_17 = lean_box(0); x_18 = lean_alloc_ctor(0, 3, 1); lean_ctor_set(x_18, 0, x_2); lean_ctor_set(x_18, 1, x_16); lean_ctor_set(x_18, 2, x_17); lean_ctor_set_uint8(x_18, sizeof(void*)*3, x_15); x_19 = l_IO_FS_Stream_writeLspResponseError(x_14, x_18, x_4); lean_dec(x_18); return x_19; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_20 = lean_ctor_get(x_12, 0); lean_inc(x_20); lean_dec(x_12); x_21 = lean_ctor_get(x_1, 1); lean_inc(x_21); lean_dec(x_1); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_2); lean_ctor_set(x_22, 1, x_20); x_23 = l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__15(x_21, x_22, x_4); return x_23; } } } } lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__7(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_3) == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); x_6 = lean_ctor_get(x_1, 1); lean_inc(x_6); lean_dec(x_1); x_7 = lean_io_error_to_string(x_5); x_8 = lean_box(0); x_9 = 4; x_10 = lean_alloc_ctor(0, 3, 1); lean_ctor_set(x_10, 0, x_2); lean_ctor_set(x_10, 1, x_7); lean_ctor_set(x_10, 2, x_8); lean_ctor_set_uint8(x_10, sizeof(void*)*3, x_9); x_11 = l_IO_FS_Stream_writeLspResponseError(x_6, x_10, x_4); lean_dec(x_10); return x_11; } else { lean_object* x_12; x_12 = lean_ctor_get(x_3, 0); lean_inc(x_12); lean_dec(x_3); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); lean_dec(x_12); x_14 = lean_ctor_get(x_1, 1); lean_inc(x_14); lean_dec(x_1); x_15 = lean_ctor_get_uint8(x_13, sizeof(void*)*1); x_16 = lean_ctor_get(x_13, 0); lean_inc(x_16); lean_dec(x_13); x_17 = lean_box(0); x_18 = lean_alloc_ctor(0, 3, 1); lean_ctor_set(x_18, 0, x_2); lean_ctor_set(x_18, 1, x_16); lean_ctor_set(x_18, 2, x_17); lean_ctor_set_uint8(x_18, sizeof(void*)*3, x_15); x_19 = l_IO_FS_Stream_writeLspResponseError(x_14, x_18, x_4); lean_dec(x_18); return x_19; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_20 = lean_ctor_get(x_12, 0); lean_inc(x_20); lean_dec(x_12); x_21 = lean_ctor_get(x_1, 1); lean_inc(x_21); lean_dec(x_1); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_2); lean_ctor_set(x_22, 1, x_20); x_23 = l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__17(x_21, x_22, x_4); return x_23; } } } } lean_object* l_Lean_Server_FileWorker_handleRequest___lambda__8(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_3) == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); x_6 = lean_ctor_get(x_1, 1); lean_inc(x_6); lean_dec(x_1); x_7 = lean_io_error_to_string(x_5); x_8 = lean_box(0); x_9 = 4; x_10 = lean_alloc_ctor(0, 3, 1); lean_ctor_set(x_10, 0, x_2); lean_ctor_set(x_10, 1, x_7); lean_ctor_set(x_10, 2, x_8); lean_ctor_set_uint8(x_10, sizeof(void*)*3, x_9); x_11 = l_IO_FS_Stream_writeLspResponseError(x_6, x_10, x_4); lean_dec(x_10); return x_11; } else { lean_object* x_12; x_12 = lean_ctor_get(x_3, 0); lean_inc(x_12); lean_dec(x_3); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); lean_dec(x_12); x_14 = lean_ctor_get(x_1, 1); lean_inc(x_14); lean_dec(x_1); x_15 = lean_ctor_get_uint8(x_13, sizeof(void*)*1); x_16 = lean_ctor_get(x_13, 0); lean_inc(x_16); lean_dec(x_13); x_17 = lean_box(0); x_18 = lean_alloc_ctor(0, 3, 1); lean_ctor_set(x_18, 0, x_2); lean_ctor_set(x_18, 1, x_16); lean_ctor_set(x_18, 2, x_17); lean_ctor_set_uint8(x_18, sizeof(void*)*3, x_15); x_19 = l_IO_FS_Stream_writeLspResponseError(x_14, x_18, x_4); lean_dec(x_18); return x_19; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_20 = lean_ctor_get(x_12, 0); lean_inc(x_20); lean_dec(x_12); x_21 = lean_ctor_get(x_1, 1); lean_inc(x_21); lean_dec(x_1); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_2); lean_ctor_set(x_22, 1, x_20); x_23 = l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__19(x_21, x_22, x_4); lean_dec(x_22); return x_23; } } } } static lean_object* _init_l_Lean_Server_FileWorker_handleRequest___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("Got unsupported request: "); return x_1; } } lean_object* l_Lean_Server_FileWorker_handleRequest(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; uint8_t x_7; x_6 = l_Lean_Lsp_Ipc_collectDiagnostics___closed__1; x_7 = lean_string_dec_eq(x_2, x_6); if (x_7 == 0) { lean_object* x_8; uint8_t x_9; x_8 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__1; x_9 = lean_string_dec_eq(x_2, x_8); if (x_9 == 0) { lean_object* x_10; uint8_t x_11; x_10 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__2; x_11 = lean_string_dec_eq(x_2, x_10); if (x_11 == 0) { lean_object* x_12; uint8_t x_13; x_12 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__3; x_13 = lean_string_dec_eq(x_2, x_12); if (x_13 == 0) { lean_object* x_14; uint8_t x_15; x_14 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__4; x_15 = lean_string_dec_eq(x_2, x_14); if (x_15 == 0) { lean_object* x_16; uint8_t x_17; x_16 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__5; x_17 = lean_string_dec_eq(x_2, x_16); if (x_17 == 0) { lean_object* x_18; uint8_t x_19; x_18 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__6; x_19 = lean_string_dec_eq(x_2, x_18); if (x_19 == 0) { lean_object* x_20; uint8_t x_21; x_20 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__7; x_21 = lean_string_dec_eq(x_2, x_20); if (x_21 == 0) { lean_object* x_22; uint8_t x_23; x_22 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__8; x_23 = lean_string_dec_eq(x_2, x_22); if (x_23 == 0) { lean_object* x_24; uint8_t x_25; x_24 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__9; x_25 = lean_string_dec_eq(x_2, x_24); if (x_25 == 0) { lean_object* x_26; uint8_t x_27; x_26 = l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__10; x_27 = lean_string_dec_eq(x_2, x_26); if (x_27 == 0) { lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); x_28 = l_Lean_Server_FileWorker_handleRequest___closed__1; x_29 = lean_string_append(x_28, x_2); x_30 = l_Lean_instInhabitedParserDescr___closed__1; x_31 = lean_string_append(x_29, x_30); x_32 = l_IO_throwServerError___rarg(x_31, x_5); return x_32; } else { lean_object* x_33; x_33 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__1(x_3, x_4, x_5); if (lean_obj_tag(x_33) == 0) { lean_object* x_34; lean_object* x_35; lean_object* x_36; x_34 = lean_ctor_get(x_33, 0); lean_inc(x_34); x_35 = lean_ctor_get(x_33, 1); lean_inc(x_35); lean_dec(x_33); lean_inc(x_4); x_36 = l_Lean_Server_FileWorker_handlePlainGoal(x_34, x_4, x_35); if (lean_obj_tag(x_36) == 0) { lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; x_37 = lean_ctor_get(x_36, 0); lean_inc(x_37); x_38 = lean_ctor_get(x_36, 1); lean_inc(x_38); lean_dec(x_36); lean_inc(x_1); lean_inc(x_4); x_39 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__1), 4, 2); lean_closure_set(x_39, 0, x_4); lean_closure_set(x_39, 1, x_1); x_40 = l_Task_Priority_default; x_41 = lean_io_map_task(x_39, x_37, x_40, x_38); if (lean_obj_tag(x_41) == 0) { lean_object* x_42; lean_object* x_43; lean_object* x_44; 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 = l_Lean_Server_FileWorker_queueRequest(x_1, x_42, x_4, x_43); lean_dec(x_4); return x_44; } else { uint8_t x_45; lean_dec(x_4); lean_dec(x_1); x_45 = !lean_is_exclusive(x_41); if (x_45 == 0) { return x_41; } else { lean_object* x_46; lean_object* x_47; lean_object* x_48; x_46 = lean_ctor_get(x_41, 0); x_47 = lean_ctor_get(x_41, 1); lean_inc(x_47); lean_inc(x_46); lean_dec(x_41); x_48 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_48, 0, x_46); lean_ctor_set(x_48, 1, x_47); return x_48; } } } else { uint8_t x_49; lean_dec(x_4); lean_dec(x_1); x_49 = !lean_is_exclusive(x_36); if (x_49 == 0) { return x_36; } else { lean_object* x_50; lean_object* x_51; lean_object* x_52; x_50 = lean_ctor_get(x_36, 0); x_51 = lean_ctor_get(x_36, 1); lean_inc(x_51); lean_inc(x_50); lean_dec(x_36); 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_4); lean_dec(x_1); x_53 = !lean_is_exclusive(x_33); if (x_53 == 0) { return x_33; } else { lean_object* x_54; lean_object* x_55; lean_object* x_56; x_54 = lean_ctor_get(x_33, 0); x_55 = lean_ctor_get(x_33, 1); lean_inc(x_55); lean_inc(x_54); lean_dec(x_33); 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 { lean_object* x_57; x_57 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__3(x_3, x_4, x_5); if (lean_obj_tag(x_57) == 0) { lean_object* x_58; lean_object* x_59; lean_object* x_60; x_58 = lean_ctor_get(x_57, 0); lean_inc(x_58); x_59 = lean_ctor_get(x_57, 1); lean_inc(x_59); lean_dec(x_57); x_60 = l_Lean_Server_FileWorker_handleSemanticTokensRange(x_58, x_4, x_59); if (lean_obj_tag(x_60) == 0) { lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; x_61 = lean_ctor_get(x_60, 0); lean_inc(x_61); x_62 = lean_ctor_get(x_60, 1); lean_inc(x_62); lean_dec(x_60); lean_inc(x_1); lean_inc(x_4); x_63 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__2), 4, 2); lean_closure_set(x_63, 0, x_4); lean_closure_set(x_63, 1, x_1); x_64 = l_Task_Priority_default; x_65 = lean_io_map_task(x_63, x_61, x_64, x_62); if (lean_obj_tag(x_65) == 0) { lean_object* x_66; lean_object* x_67; lean_object* x_68; x_66 = lean_ctor_get(x_65, 0); lean_inc(x_66); x_67 = lean_ctor_get(x_65, 1); lean_inc(x_67); lean_dec(x_65); x_68 = l_Lean_Server_FileWorker_queueRequest(x_1, x_66, x_4, x_67); lean_dec(x_4); return x_68; } else { uint8_t x_69; lean_dec(x_4); lean_dec(x_1); x_69 = !lean_is_exclusive(x_65); if (x_69 == 0) { return x_65; } else { lean_object* x_70; lean_object* x_71; lean_object* x_72; x_70 = lean_ctor_get(x_65, 0); x_71 = lean_ctor_get(x_65, 1); lean_inc(x_71); lean_inc(x_70); lean_dec(x_65); x_72 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_72, 0, x_70); lean_ctor_set(x_72, 1, x_71); return x_72; } } } else { uint8_t x_73; lean_dec(x_4); lean_dec(x_1); x_73 = !lean_is_exclusive(x_60); if (x_73 == 0) { return x_60; } else { lean_object* x_74; lean_object* x_75; lean_object* x_76; x_74 = lean_ctor_get(x_60, 0); x_75 = lean_ctor_get(x_60, 1); lean_inc(x_75); lean_inc(x_74); lean_dec(x_60); x_76 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_76, 0, x_74); lean_ctor_set(x_76, 1, x_75); return x_76; } } } else { uint8_t x_77; lean_dec(x_4); lean_dec(x_1); x_77 = !lean_is_exclusive(x_57); if (x_77 == 0) { return x_57; } else { lean_object* x_78; lean_object* x_79; lean_object* x_80; x_78 = lean_ctor_get(x_57, 0); x_79 = lean_ctor_get(x_57, 1); lean_inc(x_79); lean_inc(x_78); lean_dec(x_57); x_80 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_80, 0, x_78); lean_ctor_set(x_80, 1, x_79); return x_80; } } } } else { lean_object* x_81; x_81 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__5(x_3, x_4, x_5); if (lean_obj_tag(x_81) == 0) { lean_object* x_82; lean_object* x_83; x_82 = lean_ctor_get(x_81, 1); lean_inc(x_82); lean_dec(x_81); x_83 = l_Lean_Server_FileWorker_handleSemanticTokensFull___rarg(x_4, x_82); if (lean_obj_tag(x_83) == 0) { lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; x_84 = lean_ctor_get(x_83, 0); lean_inc(x_84); x_85 = lean_ctor_get(x_83, 1); lean_inc(x_85); lean_dec(x_83); lean_inc(x_1); lean_inc(x_4); x_86 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__2), 4, 2); lean_closure_set(x_86, 0, x_4); lean_closure_set(x_86, 1, x_1); x_87 = l_Task_Priority_default; x_88 = lean_io_map_task(x_86, x_84, x_87, x_85); if (lean_obj_tag(x_88) == 0) { lean_object* x_89; lean_object* x_90; lean_object* x_91; x_89 = lean_ctor_get(x_88, 0); lean_inc(x_89); x_90 = lean_ctor_get(x_88, 1); lean_inc(x_90); lean_dec(x_88); x_91 = l_Lean_Server_FileWorker_queueRequest(x_1, x_89, x_4, x_90); lean_dec(x_4); return x_91; } else { uint8_t x_92; lean_dec(x_4); lean_dec(x_1); x_92 = !lean_is_exclusive(x_88); if (x_92 == 0) { return x_88; } else { lean_object* x_93; lean_object* x_94; lean_object* x_95; x_93 = lean_ctor_get(x_88, 0); x_94 = lean_ctor_get(x_88, 1); lean_inc(x_94); lean_inc(x_93); lean_dec(x_88); x_95 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_95, 0, x_93); lean_ctor_set(x_95, 1, x_94); return x_95; } } } else { uint8_t x_96; lean_dec(x_4); lean_dec(x_1); x_96 = !lean_is_exclusive(x_83); if (x_96 == 0) { return x_83; } else { lean_object* x_97; lean_object* x_98; lean_object* x_99; x_97 = lean_ctor_get(x_83, 0); x_98 = lean_ctor_get(x_83, 1); lean_inc(x_98); lean_inc(x_97); lean_dec(x_83); x_99 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_99, 0, x_97); lean_ctor_set(x_99, 1, x_98); return x_99; } } } else { uint8_t x_100; lean_dec(x_4); lean_dec(x_1); x_100 = !lean_is_exclusive(x_81); if (x_100 == 0) { return x_81; } else { lean_object* x_101; lean_object* x_102; lean_object* x_103; x_101 = lean_ctor_get(x_81, 0); x_102 = lean_ctor_get(x_81, 1); lean_inc(x_102); lean_inc(x_101); lean_dec(x_81); x_103 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_103, 0, x_101); lean_ctor_set(x_103, 1, x_102); return x_103; } } } } else { lean_object* x_104; x_104 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__6(x_3, x_4, x_5); if (lean_obj_tag(x_104) == 0) { lean_object* x_105; lean_object* x_106; x_105 = lean_ctor_get(x_104, 1); lean_inc(x_105); lean_dec(x_104); lean_inc(x_4); x_106 = l_Lean_Server_FileWorker_handleDocumentSymbol___rarg(x_4, x_105); if (lean_obj_tag(x_106) == 0) { lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; x_107 = lean_ctor_get(x_106, 0); lean_inc(x_107); x_108 = lean_ctor_get(x_106, 1); lean_inc(x_108); lean_dec(x_106); lean_inc(x_1); lean_inc(x_4); x_109 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__3), 4, 2); lean_closure_set(x_109, 0, x_4); lean_closure_set(x_109, 1, x_1); x_110 = l_Task_Priority_default; x_111 = lean_io_map_task(x_109, x_107, x_110, x_108); if (lean_obj_tag(x_111) == 0) { lean_object* x_112; lean_object* x_113; lean_object* x_114; x_112 = lean_ctor_get(x_111, 0); lean_inc(x_112); x_113 = lean_ctor_get(x_111, 1); lean_inc(x_113); lean_dec(x_111); x_114 = l_Lean_Server_FileWorker_queueRequest(x_1, x_112, x_4, x_113); lean_dec(x_4); return x_114; } else { uint8_t x_115; lean_dec(x_4); lean_dec(x_1); x_115 = !lean_is_exclusive(x_111); if (x_115 == 0) { return x_111; } else { lean_object* x_116; lean_object* x_117; lean_object* x_118; x_116 = lean_ctor_get(x_111, 0); x_117 = lean_ctor_get(x_111, 1); lean_inc(x_117); lean_inc(x_116); lean_dec(x_111); x_118 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_118, 0, x_116); lean_ctor_set(x_118, 1, x_117); return x_118; } } } else { uint8_t x_119; lean_dec(x_4); lean_dec(x_1); x_119 = !lean_is_exclusive(x_106); if (x_119 == 0) { return x_106; } else { lean_object* x_120; lean_object* x_121; lean_object* x_122; x_120 = lean_ctor_get(x_106, 0); x_121 = lean_ctor_get(x_106, 1); lean_inc(x_121); lean_inc(x_120); lean_dec(x_106); x_122 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_122, 0, x_120); lean_ctor_set(x_122, 1, x_121); return x_122; } } } else { uint8_t x_123; lean_dec(x_4); lean_dec(x_1); x_123 = !lean_is_exclusive(x_104); if (x_123 == 0) { return x_104; } else { lean_object* x_124; lean_object* x_125; lean_object* x_126; x_124 = lean_ctor_get(x_104, 0); x_125 = lean_ctor_get(x_104, 1); lean_inc(x_125); lean_inc(x_124); lean_dec(x_104); x_126 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_126, 0, x_124); lean_ctor_set(x_126, 1, x_125); return x_126; } } } } else { lean_object* x_127; x_127 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__8(x_3, x_4, x_5); if (lean_obj_tag(x_127) == 0) { lean_object* x_128; lean_object* x_129; lean_object* x_130; x_128 = lean_ctor_get(x_127, 0); lean_inc(x_128); x_129 = lean_ctor_get(x_127, 1); lean_inc(x_129); lean_dec(x_127); lean_inc(x_4); x_130 = l_Lean_Server_FileWorker_handleDocumentHighlight(x_128, x_4, x_129); if (lean_obj_tag(x_130) == 0) { lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; x_131 = lean_ctor_get(x_130, 0); lean_inc(x_131); x_132 = lean_ctor_get(x_130, 1); lean_inc(x_132); lean_dec(x_130); lean_inc(x_1); lean_inc(x_4); x_133 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__4), 4, 2); lean_closure_set(x_133, 0, x_4); lean_closure_set(x_133, 1, x_1); x_134 = l_Task_Priority_default; x_135 = lean_io_map_task(x_133, x_131, x_134, x_132); if (lean_obj_tag(x_135) == 0) { lean_object* x_136; lean_object* x_137; lean_object* x_138; x_136 = lean_ctor_get(x_135, 0); 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_FileWorker_queueRequest(x_1, x_136, x_4, x_137); lean_dec(x_4); return x_138; } else { uint8_t x_139; lean_dec(x_4); lean_dec(x_1); x_139 = !lean_is_exclusive(x_135); if (x_139 == 0) { return x_135; } else { lean_object* x_140; lean_object* x_141; lean_object* x_142; x_140 = lean_ctor_get(x_135, 0); x_141 = lean_ctor_get(x_135, 1); lean_inc(x_141); lean_inc(x_140); lean_dec(x_135); x_142 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_142, 0, x_140); lean_ctor_set(x_142, 1, x_141); return x_142; } } } else { uint8_t x_143; lean_dec(x_4); lean_dec(x_1); x_143 = !lean_is_exclusive(x_130); if (x_143 == 0) { return x_130; } else { lean_object* x_144; lean_object* x_145; lean_object* x_146; x_144 = lean_ctor_get(x_130, 0); x_145 = lean_ctor_get(x_130, 1); lean_inc(x_145); lean_inc(x_144); lean_dec(x_130); x_146 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_146, 0, x_144); lean_ctor_set(x_146, 1, x_145); return x_146; } } } else { uint8_t x_147; lean_dec(x_4); lean_dec(x_1); x_147 = !lean_is_exclusive(x_127); if (x_147 == 0) { return x_127; } else { lean_object* x_148; lean_object* x_149; lean_object* x_150; x_148 = lean_ctor_get(x_127, 0); x_149 = lean_ctor_get(x_127, 1); lean_inc(x_149); lean_inc(x_148); lean_dec(x_127); 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; } } } } else { lean_object* x_151; x_151 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__11(x_3, x_4, x_5); if (lean_obj_tag(x_151) == 0) { lean_object* x_152; lean_object* x_153; uint8_t x_154; lean_object* x_155; x_152 = lean_ctor_get(x_151, 0); lean_inc(x_152); x_153 = lean_ctor_get(x_151, 1); lean_inc(x_153); lean_dec(x_151); x_154 = 1; lean_inc(x_4); x_155 = l_Lean_Server_FileWorker_handleDefinition(x_154, x_152, x_4, x_153); if (lean_obj_tag(x_155) == 0) { lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; x_156 = lean_ctor_get(x_155, 0); lean_inc(x_156); x_157 = lean_ctor_get(x_155, 1); lean_inc(x_157); lean_dec(x_155); lean_inc(x_1); lean_inc(x_4); x_158 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__5), 4, 2); lean_closure_set(x_158, 0, x_4); lean_closure_set(x_158, 1, x_1); x_159 = l_Task_Priority_default; x_160 = lean_io_map_task(x_158, x_156, x_159, x_157); if (lean_obj_tag(x_160) == 0) { lean_object* x_161; lean_object* x_162; lean_object* x_163; x_161 = lean_ctor_get(x_160, 0); lean_inc(x_161); x_162 = lean_ctor_get(x_160, 1); lean_inc(x_162); lean_dec(x_160); x_163 = l_Lean_Server_FileWorker_queueRequest(x_1, x_161, x_4, x_162); lean_dec(x_4); return x_163; } else { uint8_t x_164; lean_dec(x_4); lean_dec(x_1); x_164 = !lean_is_exclusive(x_160); if (x_164 == 0) { return x_160; } else { lean_object* x_165; lean_object* x_166; lean_object* x_167; x_165 = lean_ctor_get(x_160, 0); x_166 = lean_ctor_get(x_160, 1); lean_inc(x_166); lean_inc(x_165); lean_dec(x_160); x_167 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_167, 0, x_165); lean_ctor_set(x_167, 1, x_166); return x_167; } } } else { uint8_t x_168; lean_dec(x_4); lean_dec(x_1); x_168 = !lean_is_exclusive(x_155); if (x_168 == 0) { return x_155; } else { lean_object* x_169; lean_object* x_170; lean_object* x_171; x_169 = lean_ctor_get(x_155, 0); x_170 = lean_ctor_get(x_155, 1); lean_inc(x_170); lean_inc(x_169); lean_dec(x_155); x_171 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_171, 0, x_169); lean_ctor_set(x_171, 1, x_170); return x_171; } } } else { uint8_t x_172; lean_dec(x_4); lean_dec(x_1); x_172 = !lean_is_exclusive(x_151); if (x_172 == 0) { return x_151; } else { lean_object* x_173; lean_object* x_174; lean_object* x_175; x_173 = lean_ctor_get(x_151, 0); x_174 = lean_ctor_get(x_151, 1); lean_inc(x_174); lean_inc(x_173); lean_dec(x_151); x_175 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_175, 0, x_173); lean_ctor_set(x_175, 1, x_174); return x_175; } } } } else { lean_object* x_176; x_176 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__11(x_3, x_4, x_5); if (lean_obj_tag(x_176) == 0) { lean_object* x_177; lean_object* x_178; uint8_t x_179; lean_object* x_180; 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 = 0; lean_inc(x_4); x_180 = l_Lean_Server_FileWorker_handleDefinition(x_179, x_177, x_4, x_178); if (lean_obj_tag(x_180) == 0) { lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; x_181 = lean_ctor_get(x_180, 0); lean_inc(x_181); x_182 = lean_ctor_get(x_180, 1); lean_inc(x_182); lean_dec(x_180); lean_inc(x_1); lean_inc(x_4); x_183 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__5), 4, 2); lean_closure_set(x_183, 0, x_4); lean_closure_set(x_183, 1, x_1); x_184 = l_Task_Priority_default; x_185 = lean_io_map_task(x_183, x_181, x_184, x_182); if (lean_obj_tag(x_185) == 0) { lean_object* x_186; lean_object* x_187; lean_object* x_188; 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 = l_Lean_Server_FileWorker_queueRequest(x_1, x_186, x_4, x_187); lean_dec(x_4); return x_188; } else { uint8_t x_189; lean_dec(x_4); lean_dec(x_1); x_189 = !lean_is_exclusive(x_185); if (x_189 == 0) { return x_185; } else { lean_object* x_190; lean_object* x_191; lean_object* x_192; x_190 = lean_ctor_get(x_185, 0); x_191 = lean_ctor_get(x_185, 1); lean_inc(x_191); lean_inc(x_190); lean_dec(x_185); x_192 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_192, 0, x_190); lean_ctor_set(x_192, 1, x_191); return x_192; } } } else { uint8_t x_193; lean_dec(x_4); lean_dec(x_1); x_193 = !lean_is_exclusive(x_180); if (x_193 == 0) { return x_180; } else { lean_object* x_194; lean_object* x_195; lean_object* x_196; x_194 = lean_ctor_get(x_180, 0); x_195 = lean_ctor_get(x_180, 1); lean_inc(x_195); lean_inc(x_194); lean_dec(x_180); 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; } } } else { uint8_t x_197; lean_dec(x_4); lean_dec(x_1); x_197 = !lean_is_exclusive(x_176); if (x_197 == 0) { return x_176; } else { lean_object* x_198; lean_object* x_199; lean_object* x_200; x_198 = lean_ctor_get(x_176, 0); x_199 = lean_ctor_get(x_176, 1); lean_inc(x_199); lean_inc(x_198); lean_dec(x_176); 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; x_201 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__11(x_3, x_4, x_5); if (lean_obj_tag(x_201) == 0) { lean_object* x_202; lean_object* x_203; uint8_t x_204; lean_object* x_205; x_202 = lean_ctor_get(x_201, 0); lean_inc(x_202); x_203 = lean_ctor_get(x_201, 1); lean_inc(x_203); lean_dec(x_201); x_204 = 0; lean_inc(x_4); x_205 = l_Lean_Server_FileWorker_handleDefinition(x_204, x_202, x_4, x_203); if (lean_obj_tag(x_205) == 0) { 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_205, 0); lean_inc(x_206); x_207 = lean_ctor_get(x_205, 1); lean_inc(x_207); lean_dec(x_205); lean_inc(x_1); lean_inc(x_4); x_208 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__5), 4, 2); lean_closure_set(x_208, 0, x_4); lean_closure_set(x_208, 1, x_1); x_209 = l_Task_Priority_default; x_210 = lean_io_map_task(x_208, x_206, x_209, x_207); if (lean_obj_tag(x_210) == 0) { lean_object* x_211; lean_object* x_212; lean_object* x_213; x_211 = lean_ctor_get(x_210, 0); lean_inc(x_211); x_212 = lean_ctor_get(x_210, 1); lean_inc(x_212); lean_dec(x_210); x_213 = l_Lean_Server_FileWorker_queueRequest(x_1, x_211, x_4, x_212); lean_dec(x_4); return x_213; } else { uint8_t x_214; lean_dec(x_4); lean_dec(x_1); x_214 = !lean_is_exclusive(x_210); if (x_214 == 0) { return x_210; } else { lean_object* x_215; lean_object* x_216; lean_object* x_217; x_215 = lean_ctor_get(x_210, 0); x_216 = lean_ctor_get(x_210, 1); lean_inc(x_216); lean_inc(x_215); lean_dec(x_210); x_217 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_217, 0, x_215); lean_ctor_set(x_217, 1, x_216); return x_217; } } } else { uint8_t x_218; lean_dec(x_4); lean_dec(x_1); x_218 = !lean_is_exclusive(x_205); if (x_218 == 0) { return x_205; } else { lean_object* x_219; lean_object* x_220; lean_object* x_221; x_219 = lean_ctor_get(x_205, 0); x_220 = lean_ctor_get(x_205, 1); lean_inc(x_220); lean_inc(x_219); lean_dec(x_205); 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_222; lean_dec(x_4); lean_dec(x_1); x_222 = !lean_is_exclusive(x_201); if (x_222 == 0) { return x_201; } else { lean_object* x_223; lean_object* x_224; lean_object* x_225; x_223 = lean_ctor_get(x_201, 0); x_224 = lean_ctor_get(x_201, 1); lean_inc(x_224); lean_inc(x_223); lean_dec(x_201); x_225 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_225, 0, x_223); lean_ctor_set(x_225, 1, x_224); return x_225; } } } } else { lean_object* x_226; x_226 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__14(x_3, x_4, x_5); if (lean_obj_tag(x_226) == 0) { lean_object* x_227; lean_object* x_228; lean_object* x_229; x_227 = lean_ctor_get(x_226, 0); lean_inc(x_227); x_228 = lean_ctor_get(x_226, 1); lean_inc(x_228); lean_dec(x_226); lean_inc(x_4); x_229 = l_Lean_Server_FileWorker_handleHover(x_227, x_4, x_228); if (lean_obj_tag(x_229) == 0) { lean_object* x_230; lean_object* x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; x_230 = lean_ctor_get(x_229, 0); lean_inc(x_230); x_231 = lean_ctor_get(x_229, 1); lean_inc(x_231); lean_dec(x_229); lean_inc(x_1); lean_inc(x_4); x_232 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__6), 4, 2); lean_closure_set(x_232, 0, x_4); lean_closure_set(x_232, 1, x_1); x_233 = l_Task_Priority_default; x_234 = lean_io_map_task(x_232, x_230, x_233, x_231); if (lean_obj_tag(x_234) == 0) { lean_object* x_235; lean_object* x_236; lean_object* x_237; x_235 = lean_ctor_get(x_234, 0); lean_inc(x_235); x_236 = lean_ctor_get(x_234, 1); lean_inc(x_236); lean_dec(x_234); x_237 = l_Lean_Server_FileWorker_queueRequest(x_1, x_235, x_4, x_236); lean_dec(x_4); return x_237; } else { uint8_t x_238; lean_dec(x_4); lean_dec(x_1); x_238 = !lean_is_exclusive(x_234); if (x_238 == 0) { return x_234; } else { lean_object* x_239; lean_object* x_240; lean_object* x_241; x_239 = lean_ctor_get(x_234, 0); x_240 = lean_ctor_get(x_234, 1); lean_inc(x_240); lean_inc(x_239); lean_dec(x_234); x_241 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_241, 0, x_239); lean_ctor_set(x_241, 1, x_240); return x_241; } } } else { uint8_t x_242; lean_dec(x_4); lean_dec(x_1); x_242 = !lean_is_exclusive(x_229); if (x_242 == 0) { return x_229; } else { lean_object* x_243; lean_object* x_244; lean_object* x_245; x_243 = lean_ctor_get(x_229, 0); x_244 = lean_ctor_get(x_229, 1); lean_inc(x_244); lean_inc(x_243); lean_dec(x_229); x_245 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_245, 0, x_243); lean_ctor_set(x_245, 1, x_244); return x_245; } } } else { uint8_t x_246; lean_dec(x_4); lean_dec(x_1); x_246 = !lean_is_exclusive(x_226); if (x_246 == 0) { return x_226; } else { lean_object* x_247; lean_object* x_248; lean_object* x_249; x_247 = lean_ctor_get(x_226, 0); x_248 = lean_ctor_get(x_226, 1); lean_inc(x_248); lean_inc(x_247); lean_dec(x_226); x_249 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_249, 0, x_247); lean_ctor_set(x_249, 1, x_248); return x_249; } } } } else { lean_object* x_250; x_250 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__16(x_3, x_4, x_5); if (lean_obj_tag(x_250) == 0) { lean_object* x_251; lean_object* x_252; lean_object* x_253; x_251 = lean_ctor_get(x_250, 0); lean_inc(x_251); x_252 = lean_ctor_get(x_250, 1); lean_inc(x_252); lean_dec(x_250); lean_inc(x_4); x_253 = l_Lean_Server_FileWorker_handleCompletion(x_251, x_4, x_252); if (lean_obj_tag(x_253) == 0) { lean_object* x_254; lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; x_254 = lean_ctor_get(x_253, 0); lean_inc(x_254); x_255 = lean_ctor_get(x_253, 1); lean_inc(x_255); lean_dec(x_253); lean_inc(x_1); lean_inc(x_4); x_256 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__7), 4, 2); lean_closure_set(x_256, 0, x_4); lean_closure_set(x_256, 1, x_1); x_257 = l_Task_Priority_default; x_258 = lean_io_map_task(x_256, x_254, x_257, x_255); if (lean_obj_tag(x_258) == 0) { lean_object* x_259; lean_object* x_260; lean_object* x_261; x_259 = lean_ctor_get(x_258, 0); lean_inc(x_259); x_260 = lean_ctor_get(x_258, 1); lean_inc(x_260); lean_dec(x_258); x_261 = l_Lean_Server_FileWorker_queueRequest(x_1, x_259, x_4, x_260); lean_dec(x_4); return x_261; } else { uint8_t x_262; lean_dec(x_4); lean_dec(x_1); x_262 = !lean_is_exclusive(x_258); if (x_262 == 0) { return x_258; } else { lean_object* x_263; lean_object* x_264; lean_object* x_265; x_263 = lean_ctor_get(x_258, 0); x_264 = lean_ctor_get(x_258, 1); lean_inc(x_264); lean_inc(x_263); lean_dec(x_258); x_265 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_265, 0, x_263); lean_ctor_set(x_265, 1, x_264); return x_265; } } } else { uint8_t x_266; lean_dec(x_4); lean_dec(x_1); x_266 = !lean_is_exclusive(x_253); if (x_266 == 0) { return x_253; } else { lean_object* x_267; lean_object* x_268; lean_object* x_269; x_267 = lean_ctor_get(x_253, 0); x_268 = lean_ctor_get(x_253, 1); lean_inc(x_268); lean_inc(x_267); lean_dec(x_253); x_269 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_269, 0, x_267); lean_ctor_set(x_269, 1, x_268); return x_269; } } } else { uint8_t x_270; lean_dec(x_4); lean_dec(x_1); x_270 = !lean_is_exclusive(x_250); if (x_270 == 0) { return x_250; } else { lean_object* x_271; lean_object* x_272; lean_object* x_273; x_271 = lean_ctor_get(x_250, 0); x_272 = lean_ctor_get(x_250, 1); lean_inc(x_272); lean_inc(x_271); lean_dec(x_250); x_273 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_273, 0, x_271); lean_ctor_set(x_273, 1, x_272); return x_273; } } } } else { lean_object* x_274; x_274 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__18(x_3, x_4, x_5); if (lean_obj_tag(x_274) == 0) { lean_object* x_275; lean_object* x_276; lean_object* x_277; x_275 = lean_ctor_get(x_274, 0); lean_inc(x_275); x_276 = lean_ctor_get(x_274, 1); lean_inc(x_276); lean_dec(x_274); lean_inc(x_4); x_277 = l_Lean_Server_FileWorker_handleWaitForDiagnostics(x_275, x_4, x_276); if (lean_obj_tag(x_277) == 0) { lean_object* x_278; lean_object* x_279; lean_object* x_280; lean_object* x_281; lean_object* x_282; x_278 = lean_ctor_get(x_277, 0); lean_inc(x_278); x_279 = lean_ctor_get(x_277, 1); lean_inc(x_279); lean_dec(x_277); lean_inc(x_1); lean_inc(x_4); x_280 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__8), 4, 2); lean_closure_set(x_280, 0, x_4); lean_closure_set(x_280, 1, x_1); x_281 = l_Task_Priority_default; x_282 = lean_io_map_task(x_280, x_278, x_281, x_279); if (lean_obj_tag(x_282) == 0) { lean_object* x_283; lean_object* x_284; lean_object* x_285; 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 = l_Lean_Server_FileWorker_queueRequest(x_1, x_283, x_4, x_284); lean_dec(x_4); return x_285; } else { uint8_t x_286; lean_dec(x_4); lean_dec(x_1); x_286 = !lean_is_exclusive(x_282); if (x_286 == 0) { return x_282; } else { lean_object* x_287; lean_object* x_288; lean_object* x_289; x_287 = lean_ctor_get(x_282, 0); x_288 = lean_ctor_get(x_282, 1); lean_inc(x_288); lean_inc(x_287); lean_dec(x_282); x_289 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_289, 0, x_287); lean_ctor_set(x_289, 1, x_288); return x_289; } } } else { uint8_t x_290; lean_dec(x_4); lean_dec(x_1); x_290 = !lean_is_exclusive(x_277); if (x_290 == 0) { return x_277; } else { lean_object* x_291; lean_object* x_292; lean_object* x_293; x_291 = lean_ctor_get(x_277, 0); x_292 = lean_ctor_get(x_277, 1); lean_inc(x_292); lean_inc(x_291); lean_dec(x_277); x_293 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_293, 0, x_291); lean_ctor_set(x_293, 1, x_292); return x_293; } } } else { uint8_t x_294; lean_dec(x_4); lean_dec(x_1); x_294 = !lean_is_exclusive(x_274); if (x_294 == 0) { return x_274; } else { lean_object* x_295; lean_object* x_296; lean_object* x_297; x_295 = lean_ctor_get(x_274, 0); x_296 = lean_ctor_get(x_274, 1); lean_inc(x_296); lean_inc(x_295); lean_dec(x_274); x_297 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_297, 0, x_295); lean_ctor_set(x_297, 1, x_296); return x_297; } } } } } lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__1(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__3(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_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_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__5(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__6(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__8___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__8(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_handleRequest___spec__10___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_FileWorker_handleRequest___spec__10(x_4, x_5, x_3); return x_6; } } lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_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_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__11(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_FileWorker_handleRequest___spec__13___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_FileWorker_handleRequest___spec__13(x_4, x_5, x_3); return x_6; } } lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_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_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__14(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__16___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__16(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__18___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_Server_FileWorker_parseParams___at_Lean_Server_FileWorker_handleRequest___spec__18(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__19___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__19(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Lean_Server_FileWorker_handleRequest___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_Server_FileWorker_handleRequest(x_1, x_2, x_3, x_4, x_5); lean_dec(x_2); return x_6; } } lean_object* l_Lean_Server_FileWorker_mainLoop_match__1___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); lean_dec(x_1); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_dec(x_2); x_6 = lean_apply_1(x_3, x_1); return x_6; } } } lean_object* l_Lean_Server_FileWorker_mainLoop_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_mainLoop_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_mainLoop_match__2___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)) { case 0: { lean_object* x_6; lean_dec(x_4); lean_dec(x_3); x_6 = lean_ctor_get(x_1, 2); lean_inc(x_6); if (lean_obj_tag(x_6) == 0) { lean_object* x_7; lean_dec(x_2); x_7 = lean_apply_1(x_5, x_1); return x_7; } else { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_dec(x_5); x_8 = lean_ctor_get(x_1, 0); lean_inc(x_8); x_9 = lean_ctor_get(x_1, 1); lean_inc(x_9); lean_dec(x_1); x_10 = lean_ctor_get(x_6, 0); lean_inc(x_10); lean_dec(x_6); x_11 = lean_apply_3(x_2, x_8, x_9, x_10); return x_11; } } case 1: { lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_dec(x_2); x_12 = lean_ctor_get(x_1, 0); lean_inc(x_12); x_13 = lean_ctor_get(x_1, 1); lean_inc(x_13); x_14 = l_Lean_Parser_Command_exit___elambda__1___closed__1; x_15 = lean_string_dec_eq(x_12, x_14); if (x_15 == 0) { lean_dec(x_3); if (lean_obj_tag(x_13) == 0) { lean_object* x_16; lean_dec(x_12); lean_dec(x_4); x_16 = lean_apply_1(x_5, x_1); return x_16; } else { lean_object* x_17; lean_object* x_18; lean_dec(x_5); lean_dec(x_1); x_17 = lean_ctor_get(x_13, 0); lean_inc(x_17); lean_dec(x_13); x_18 = lean_apply_2(x_4, x_12, x_17); return x_18; } } else { lean_dec(x_12); lean_dec(x_5); lean_dec(x_1); if (lean_obj_tag(x_13) == 0) { lean_object* x_19; lean_object* x_20; lean_dec(x_4); x_19 = lean_box(0); x_20 = lean_apply_1(x_3, x_19); return x_20; } else { lean_object* x_21; lean_object* x_22; lean_dec(x_3); x_21 = lean_ctor_get(x_13, 0); lean_inc(x_21); lean_dec(x_13); x_22 = lean_apply_2(x_4, x_14, x_21); return x_22; } } } default: { lean_object* x_23; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_23 = lean_apply_1(x_5, x_1); return x_23; } } } } lean_object* l_Lean_Server_FileWorker_mainLoop_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_mainLoop_match__2___rarg), 5, 0); return x_2; } } lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; lean_object* x_7; x_6 = l_Std_RBNode_erase___at_Lean_Server_FileWorker_handleCancelRequest___spec__1(x_1, x_2); x_7 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_7, 0, x_6); lean_ctor_set(x_7, 1, x_5); return x_7; } } static lean_object* _init_l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("Failed responding to request "); return x_1; } } static lean_object* _init_l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__1; x_2 = l_Lean_JsonRpc_instToStringRequestID___closed__1; x_3 = lean_string_append(x_1, x_2); return x_3; } } static lean_object* _init_l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__2; x_2 = l___private_Init_Util_0__mkPanicMessage___closed__2; x_3 = lean_string_append(x_1, x_2); return x_3; } } static lean_object* _init_l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__1; x_2 = l_Lean_nullKind___closed__1; x_3 = lean_string_append(x_1, x_2); return x_3; } } static lean_object* _init_l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__5() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__4; x_2 = l___private_Init_Util_0__mkPanicMessage___closed__2; x_3 = lean_string_append(x_1, x_2); return x_3; } } lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_2) == 0) { lean_object* x_5; x_5 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_5, 0, x_1); lean_ctor_set(x_5, 1, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_6 = lean_ctor_get(x_2, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_2, 1); lean_inc(x_7); x_8 = lean_ctor_get(x_2, 2); lean_inc(x_8); x_9 = lean_ctor_get(x_2, 3); lean_inc(x_9); lean_dec(x_2); x_10 = l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1(x_1, x_6, x_3, x_4); if (lean_obj_tag(x_10) == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); x_12 = lean_ctor_get(x_10, 1); lean_inc(x_12); lean_dec(x_10); x_13 = lean_io_has_finished(x_8, x_12); if (lean_obj_tag(x_13) == 0) { lean_object* x_14; uint8_t x_15; x_14 = lean_ctor_get(x_13, 0); lean_inc(x_14); x_15 = lean_unbox(x_14); lean_dec(x_14); if (x_15 == 0) { lean_object* x_16; lean_dec(x_8); lean_dec(x_7); x_16 = lean_ctor_get(x_13, 1); lean_inc(x_16); lean_dec(x_13); x_1 = x_11; x_2 = x_9; x_4 = x_16; goto _start; } else { lean_object* x_18; lean_object* x_19; x_18 = lean_ctor_get(x_13, 1); lean_inc(x_18); lean_dec(x_13); x_19 = lean_task_get_own(x_8); if (lean_obj_tag(x_19) == 0) { lean_object* x_20; lean_object* x_21; lean_dec(x_11); lean_dec(x_9); x_20 = lean_ctor_get(x_19, 0); lean_inc(x_20); lean_dec(x_19); x_21 = lean_io_error_to_string(x_20); switch (lean_obj_tag(x_7)) { case 0: { lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_27; lean_dec(x_7); x_22 = l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__3; x_23 = lean_string_append(x_22, x_21); lean_dec(x_21); x_24 = l_Lean_instInhabitedParserDescr___closed__1; x_25 = lean_string_append(x_23, x_24); x_26 = l_IO_throwServerError___rarg(x_25, x_18); x_27 = !lean_is_exclusive(x_26); if (x_27 == 0) { return x_26; } else { lean_object* x_28; lean_object* x_29; lean_object* x_30; x_28 = lean_ctor_get(x_26, 0); x_29 = lean_ctor_get(x_26, 1); lean_inc(x_29); lean_inc(x_28); lean_dec(x_26); x_30 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_30, 0, x_28); lean_ctor_set(x_30, 1, x_29); return x_30; } } case 1: { lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; uint8_t x_41; x_31 = lean_ctor_get(x_7, 0); lean_inc(x_31); lean_dec(x_7); x_32 = l_Lean_JsonNumber_toString(x_31); x_33 = l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__1; x_34 = lean_string_append(x_33, x_32); lean_dec(x_32); x_35 = l___private_Init_Util_0__mkPanicMessage___closed__2; x_36 = lean_string_append(x_34, x_35); x_37 = lean_string_append(x_36, x_21); lean_dec(x_21); x_38 = l_Lean_instInhabitedParserDescr___closed__1; x_39 = lean_string_append(x_37, x_38); x_40 = l_IO_throwServerError___rarg(x_39, x_18); x_41 = !lean_is_exclusive(x_40); if (x_41 == 0) { return x_40; } else { lean_object* x_42; lean_object* x_43; lean_object* x_44; x_42 = lean_ctor_get(x_40, 0); x_43 = lean_ctor_get(x_40, 1); lean_inc(x_43); lean_inc(x_42); lean_dec(x_40); 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; } } default: { lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; uint8_t x_50; x_45 = l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__5; x_46 = lean_string_append(x_45, x_21); lean_dec(x_21); x_47 = l_Lean_instInhabitedParserDescr___closed__1; x_48 = lean_string_append(x_46, x_47); x_49 = l_IO_throwServerError___rarg(x_48, x_18); x_50 = !lean_is_exclusive(x_49); if (x_50 == 0) { return x_49; } else { lean_object* x_51; lean_object* x_52; lean_object* x_53; x_51 = lean_ctor_get(x_49, 0); x_52 = lean_ctor_get(x_49, 1); lean_inc(x_52); lean_inc(x_51); lean_dec(x_49); x_53 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_53, 0, x_51); lean_ctor_set(x_53, 1, x_52); return x_53; } } } } else { lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_dec(x_19); x_54 = lean_box(0); x_55 = l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___lambda__1(x_7, x_11, x_54, x_3, x_18); x_56 = lean_ctor_get(x_55, 0); lean_inc(x_56); x_57 = lean_ctor_get(x_55, 1); lean_inc(x_57); lean_dec(x_55); x_1 = x_56; x_2 = x_9; x_4 = x_57; goto _start; } } } else { uint8_t x_59; lean_dec(x_11); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); x_59 = !lean_is_exclusive(x_13); if (x_59 == 0) { return x_13; } else { lean_object* x_60; lean_object* x_61; lean_object* x_62; x_60 = lean_ctor_get(x_13, 0); x_61 = lean_ctor_get(x_13, 1); lean_inc(x_61); lean_inc(x_60); lean_dec(x_13); x_62 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_62, 0, x_60); lean_ctor_set(x_62, 1, x_61); return x_62; } } } else { uint8_t x_63; lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); x_63 = !lean_is_exclusive(x_10); if (x_63 == 0) { return x_10; } else { lean_object* x_64; lean_object* x_65; lean_object* x_66; x_64 = lean_ctor_get(x_10, 0); x_65 = lean_ctor_get(x_10, 1); lean_inc(x_65); lean_inc(x_64); lean_dec(x_10); x_66 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_66, 0, x_64); lean_ctor_set(x_66, 1, x_65); return x_66; } } } } } static lean_object* _init_l_Lean_Server_FileWorker_mainLoop___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("Got invalid JSON-RPC message"); return x_1; } } lean_object* l_Lean_Server_FileWorker_mainLoop(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = l_IO_FS_Stream_readLspMessage(x_3, x_2); 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_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 = lean_ctor_get(x_1, 5); lean_inc(x_7); x_8 = lean_st_ref_get(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); lean_inc(x_9); x_11 = l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1(x_9, x_9, x_1, x_10); if (lean_obj_tag(x_11) == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; x_12 = lean_ctor_get(x_11, 0); lean_inc(x_12); x_13 = lean_ctor_get(x_11, 1); lean_inc(x_13); lean_dec(x_11); x_14 = lean_st_ref_set(x_7, x_12, x_13); lean_dec(x_7); switch (lean_obj_tag(x_5)) { case 0: { lean_object* x_15; x_15 = lean_ctor_get(x_5, 2); lean_inc(x_15); if (lean_obj_tag(x_15) == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_dec(x_5); lean_dec(x_1); x_16 = lean_ctor_get(x_14, 1); lean_inc(x_16); lean_dec(x_14); x_17 = l_Lean_Server_FileWorker_mainLoop___closed__1; x_18 = l_IO_throwServerError___rarg(x_17, x_16); return x_18; } else { lean_object* x_19; x_19 = lean_ctor_get(x_15, 0); lean_inc(x_19); lean_dec(x_15); if (lean_obj_tag(x_19) == 0) { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_20 = lean_ctor_get(x_14, 1); lean_inc(x_20); lean_dec(x_14); x_21 = lean_ctor_get(x_5, 0); lean_inc(x_21); x_22 = lean_ctor_get(x_5, 1); lean_inc(x_22); lean_dec(x_5); x_23 = lean_ctor_get(x_19, 0); lean_inc(x_23); lean_dec(x_19); x_24 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_24, 0, x_23); lean_inc(x_1); x_25 = l_Lean_Server_FileWorker_handleRequest(x_21, x_22, x_24, x_1, x_20); lean_dec(x_22); if (lean_obj_tag(x_25) == 0) { lean_object* x_26; x_26 = lean_ctor_get(x_25, 1); lean_inc(x_26); lean_dec(x_25); x_2 = x_26; goto _start; } else { uint8_t x_28; lean_dec(x_1); x_28 = !lean_is_exclusive(x_25); if (x_28 == 0) { return x_25; } else { lean_object* x_29; lean_object* x_30; lean_object* x_31; x_29 = lean_ctor_get(x_25, 0); x_30 = lean_ctor_get(x_25, 1); lean_inc(x_30); lean_inc(x_29); lean_dec(x_25); x_31 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_31, 0, x_29); lean_ctor_set(x_31, 1, x_30); return x_31; } } } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; x_32 = lean_ctor_get(x_14, 1); lean_inc(x_32); lean_dec(x_14); x_33 = lean_ctor_get(x_5, 0); lean_inc(x_33); x_34 = lean_ctor_get(x_5, 1); lean_inc(x_34); lean_dec(x_5); x_35 = lean_ctor_get(x_19, 0); lean_inc(x_35); lean_dec(x_19); x_36 = lean_alloc_ctor(5, 1, 0); lean_ctor_set(x_36, 0, x_35); lean_inc(x_1); x_37 = l_Lean_Server_FileWorker_handleRequest(x_33, x_34, x_36, x_1, x_32); lean_dec(x_34); if (lean_obj_tag(x_37) == 0) { lean_object* x_38; x_38 = lean_ctor_get(x_37, 1); lean_inc(x_38); lean_dec(x_37); x_2 = x_38; goto _start; } else { uint8_t x_40; lean_dec(x_1); x_40 = !lean_is_exclusive(x_37); if (x_40 == 0) { return x_37; } else { lean_object* x_41; lean_object* x_42; lean_object* x_43; x_41 = lean_ctor_get(x_37, 0); x_42 = lean_ctor_get(x_37, 1); lean_inc(x_42); lean_inc(x_41); lean_dec(x_37); x_43 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_43, 0, x_41); lean_ctor_set(x_43, 1, x_42); return x_43; } } } } } case 1: { lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; uint8_t x_48; x_44 = lean_ctor_get(x_14, 1); lean_inc(x_44); lean_dec(x_14); x_45 = lean_ctor_get(x_5, 0); lean_inc(x_45); x_46 = lean_ctor_get(x_5, 1); lean_inc(x_46); lean_dec(x_5); x_47 = l_Lean_Parser_Command_exit___elambda__1___closed__1; x_48 = lean_string_dec_eq(x_45, x_47); if (x_48 == 0) { if (lean_obj_tag(x_46) == 0) { lean_object* x_49; lean_object* x_50; lean_dec(x_45); lean_dec(x_1); x_49 = l_Lean_Server_FileWorker_mainLoop___closed__1; x_50 = l_IO_throwServerError___rarg(x_49, x_44); return x_50; } else { lean_object* x_51; x_51 = lean_ctor_get(x_46, 0); lean_inc(x_51); lean_dec(x_46); if (lean_obj_tag(x_51) == 0) { lean_object* x_52; lean_object* x_53; lean_object* x_54; x_52 = lean_ctor_get(x_51, 0); lean_inc(x_52); lean_dec(x_51); x_53 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_53, 0, x_52); lean_inc(x_1); x_54 = l_Lean_Server_FileWorker_handleNotification(x_45, x_53, x_1, x_44); lean_dec(x_45); if (lean_obj_tag(x_54) == 0) { lean_object* x_55; x_55 = lean_ctor_get(x_54, 1); lean_inc(x_55); lean_dec(x_54); x_2 = x_55; goto _start; } else { uint8_t x_57; lean_dec(x_1); x_57 = !lean_is_exclusive(x_54); if (x_57 == 0) { return x_54; } else { lean_object* x_58; lean_object* x_59; lean_object* x_60; x_58 = lean_ctor_get(x_54, 0); x_59 = lean_ctor_get(x_54, 1); lean_inc(x_59); lean_inc(x_58); lean_dec(x_54); 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; x_61 = lean_ctor_get(x_51, 0); lean_inc(x_61); lean_dec(x_51); x_62 = lean_alloc_ctor(5, 1, 0); lean_ctor_set(x_62, 0, x_61); lean_inc(x_1); x_63 = l_Lean_Server_FileWorker_handleNotification(x_45, x_62, x_1, x_44); lean_dec(x_45); if (lean_obj_tag(x_63) == 0) { lean_object* x_64; x_64 = lean_ctor_get(x_63, 1); lean_inc(x_64); lean_dec(x_63); x_2 = x_64; goto _start; } else { uint8_t x_66; lean_dec(x_1); x_66 = !lean_is_exclusive(x_63); if (x_66 == 0) { return x_63; } else { lean_object* x_67; lean_object* x_68; lean_object* x_69; x_67 = lean_ctor_get(x_63, 0); x_68 = lean_ctor_get(x_63, 1); lean_inc(x_68); lean_inc(x_67); lean_dec(x_63); x_69 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_69, 0, x_67); lean_ctor_set(x_69, 1, x_68); return x_69; } } } } } else { lean_dec(x_45); if (lean_obj_tag(x_46) == 0) { lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; uint8_t x_76; x_70 = lean_ctor_get(x_1, 4); lean_inc(x_70); lean_dec(x_1); x_71 = lean_st_ref_get(x_70, x_44); lean_dec(x_70); x_72 = lean_ctor_get(x_71, 0); lean_inc(x_72); x_73 = lean_ctor_get(x_71, 1); lean_inc(x_73); lean_dec(x_71); x_74 = lean_ctor_get(x_72, 3); lean_inc(x_74); lean_dec(x_72); x_75 = l_Lean_Server_FileWorker_CancelToken_set(x_74, x_73); lean_dec(x_74); x_76 = !lean_is_exclusive(x_75); if (x_76 == 0) { lean_object* x_77; lean_object* x_78; x_77 = lean_ctor_get(x_75, 0); lean_dec(x_77); x_78 = lean_box(0); lean_ctor_set(x_75, 0, x_78); return x_75; } else { lean_object* x_79; lean_object* x_80; lean_object* x_81; x_79 = lean_ctor_get(x_75, 1); lean_inc(x_79); lean_dec(x_75); x_80 = lean_box(0); x_81 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_81, 0, x_80); lean_ctor_set(x_81, 1, x_79); return x_81; } } else { lean_object* x_82; x_82 = lean_ctor_get(x_46, 0); lean_inc(x_82); lean_dec(x_46); if (lean_obj_tag(x_82) == 0) { lean_object* x_83; lean_object* x_84; lean_object* x_85; x_83 = lean_ctor_get(x_82, 0); lean_inc(x_83); lean_dec(x_82); x_84 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_84, 0, x_83); lean_inc(x_1); x_85 = l_Lean_Server_FileWorker_handleNotification(x_47, x_84, x_1, x_44); if (lean_obj_tag(x_85) == 0) { lean_object* x_86; x_86 = lean_ctor_get(x_85, 1); lean_inc(x_86); lean_dec(x_85); x_2 = x_86; goto _start; } else { uint8_t x_88; lean_dec(x_1); x_88 = !lean_is_exclusive(x_85); if (x_88 == 0) { return x_85; } else { lean_object* x_89; lean_object* x_90; lean_object* x_91; x_89 = lean_ctor_get(x_85, 0); x_90 = lean_ctor_get(x_85, 1); lean_inc(x_90); lean_inc(x_89); lean_dec(x_85); 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; x_92 = lean_ctor_get(x_82, 0); lean_inc(x_92); lean_dec(x_82); x_93 = lean_alloc_ctor(5, 1, 0); lean_ctor_set(x_93, 0, x_92); lean_inc(x_1); x_94 = l_Lean_Server_FileWorker_handleNotification(x_47, x_93, x_1, x_44); if (lean_obj_tag(x_94) == 0) { lean_object* x_95; x_95 = lean_ctor_get(x_94, 1); lean_inc(x_95); lean_dec(x_94); x_2 = x_95; goto _start; } else { uint8_t x_97; lean_dec(x_1); x_97 = !lean_is_exclusive(x_94); if (x_97 == 0) { return x_94; } else { lean_object* x_98; lean_object* x_99; lean_object* x_100; x_98 = lean_ctor_get(x_94, 0); x_99 = lean_ctor_get(x_94, 1); lean_inc(x_99); lean_inc(x_98); lean_dec(x_94); x_100 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_100, 0, x_98); lean_ctor_set(x_100, 1, x_99); return x_100; } } } } } } default: { lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_dec(x_5); lean_dec(x_1); x_101 = lean_ctor_get(x_14, 1); lean_inc(x_101); lean_dec(x_14); x_102 = l_Lean_Server_FileWorker_mainLoop___closed__1; x_103 = l_IO_throwServerError___rarg(x_102, x_101); return x_103; } } } else { uint8_t x_104; lean_dec(x_7); lean_dec(x_5); lean_dec(x_1); x_104 = !lean_is_exclusive(x_11); if (x_104 == 0) { return x_11; } else { lean_object* x_105; lean_object* x_106; lean_object* x_107; x_105 = lean_ctor_get(x_11, 0); x_106 = lean_ctor_get(x_11, 1); lean_inc(x_106); lean_inc(x_105); lean_dec(x_11); 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 { uint8_t x_108; lean_dec(x_1); x_108 = !lean_is_exclusive(x_4); if (x_108 == 0) { return x_4; } else { lean_object* x_109; lean_object* x_110; lean_object* x_111; x_109 = lean_ctor_get(x_4, 0); x_110 = lean_ctor_get(x_4, 1); lean_inc(x_110); lean_inc(x_109); lean_dec(x_4); x_111 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_111, 0, x_109); lean_ctor_set(x_111, 1, x_110); return x_111; } } } } lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___lambda__1(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_3); return x_6; } } lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } lean_object* l_Lean_Server_FileWorker_initAndRunWorker_match__1___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = lean_apply_1(x_2, x_1); return x_3; } } lean_object* l_Lean_Server_FileWorker_initAndRunWorker_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_initAndRunWorker_match__1___rarg), 2, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_initAndRunWorker_match__2___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_2(x_2, x_3, x_4); return x_5; } } lean_object* l_Lean_Server_FileWorker_initAndRunWorker_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_initAndRunWorker_match__2___rarg), 2, 0); return x_2; } } lean_object* l_Lean_Server_FileWorker_initAndRunWorker_match__3___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = lean_apply_1(x_2, x_1); return x_3; } } lean_object* l_Lean_Server_FileWorker_initAndRunWorker_match__3(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_initAndRunWorker_match__3___rarg), 2, 0); return x_2; } } lean_object* l_IO_FS_Stream_readRequestAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_IO_FS_Stream_readMessage(x_1, x_2, x_4); if (lean_obj_tag(x_5) == 0) { lean_object* x_6; x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); switch (lean_obj_tag(x_6)) { case 0: { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); if (lean_is_exclusive(x_5)) { lean_ctor_release(x_5, 0); lean_ctor_release(x_5, 1); x_8 = x_5; } else { lean_dec_ref(x_5); x_8 = lean_box(0); } x_9 = lean_ctor_get(x_6, 0); lean_inc(x_9); x_10 = lean_ctor_get(x_6, 1); lean_inc(x_10); x_11 = lean_ctor_get(x_6, 2); lean_inc(x_11); lean_dec(x_6); x_12 = lean_string_dec_eq(x_10, x_3); if (x_12 == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_dec(x_11); lean_dec(x_9); x_13 = l_IO_FS_Stream_readRequestAs___closed__1; x_14 = lean_string_append(x_13, x_3); lean_dec(x_3); x_15 = l_IO_FS_Stream_readRequestAs___closed__2; x_16 = lean_string_append(x_14, x_15); x_17 = lean_string_append(x_16, x_10); lean_dec(x_10); x_18 = l_Char_quote___closed__1; x_19 = lean_string_append(x_17, x_18); x_20 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_20, 0, x_19); if (lean_is_scalar(x_8)) { x_21 = lean_alloc_ctor(1, 2, 0); } else { x_21 = x_8; lean_ctor_set_tag(x_21, 1); } lean_ctor_set(x_21, 0, x_20); lean_ctor_set(x_21, 1, x_7); return x_21; } else { lean_object* x_22; lean_dec(x_10); if (lean_obj_tag(x_11) == 0) { lean_object* x_47; x_47 = lean_box(0); x_22 = x_47; goto block_46; } else { lean_object* x_48; x_48 = lean_ctor_get(x_11, 0); lean_inc(x_48); lean_dec(x_11); if (lean_obj_tag(x_48) == 0) { lean_object* x_49; lean_object* x_50; x_49 = lean_ctor_get(x_48, 0); lean_inc(x_49); lean_dec(x_48); x_50 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_50, 0, x_49); x_22 = x_50; goto block_46; } else { lean_object* x_51; lean_object* x_52; x_51 = lean_ctor_get(x_48, 0); lean_inc(x_51); lean_dec(x_48); x_52 = lean_alloc_ctor(5, 1, 0); lean_ctor_set(x_52, 0, x_51); x_22 = x_52; goto block_46; } } block_46: { lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; x_23 = l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_298____closed__1; x_24 = l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializeParams___spec__1(x_22, x_23); x_25 = l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_298____closed__2; x_26 = l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializeParams___spec__2(x_22, x_25); x_27 = l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_298____closed__3; x_28 = l_Lean_Json_getObjValAs_x3f___at_Lean_JsonRpc_instFromJsonMessage___spec__2(x_22, x_27); x_29 = l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_298____closed__4; x_30 = l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializeParams___spec__3(x_22, x_29); x_31 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_36____closed__6; x_32 = l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializeParams___spec__5(x_22, x_31); x_33 = l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_298____closed__8; x_34 = l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializeParams___spec__6(x_22, x_33); lean_dec(x_22); if (lean_obj_tag(x_32) == 0) { lean_object* x_35; uint8_t x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; x_35 = lean_box(0); x_36 = 0; x_37 = lean_alloc_ctor(0, 6, 1); lean_ctor_set(x_37, 0, x_24); lean_ctor_set(x_37, 1, x_26); lean_ctor_set(x_37, 2, x_28); lean_ctor_set(x_37, 3, x_30); lean_ctor_set(x_37, 4, x_35); lean_ctor_set(x_37, 5, x_34); lean_ctor_set_uint8(x_37, sizeof(void*)*6, x_36); x_38 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_38, 0, x_9); lean_ctor_set(x_38, 1, x_3); lean_ctor_set(x_38, 2, x_37); if (lean_is_scalar(x_8)) { x_39 = lean_alloc_ctor(0, 2, 0); } else { x_39 = x_8; } lean_ctor_set(x_39, 0, x_38); lean_ctor_set(x_39, 1, x_7); return x_39; } else { lean_object* x_40; lean_object* x_41; lean_object* x_42; uint8_t x_43; lean_object* x_44; lean_object* x_45; x_40 = lean_ctor_get(x_32, 0); lean_inc(x_40); lean_dec(x_32); x_41 = lean_box(0); x_42 = lean_alloc_ctor(0, 6, 1); lean_ctor_set(x_42, 0, x_24); lean_ctor_set(x_42, 1, x_26); lean_ctor_set(x_42, 2, x_28); lean_ctor_set(x_42, 3, x_30); lean_ctor_set(x_42, 4, x_41); lean_ctor_set(x_42, 5, x_34); x_43 = lean_unbox(x_40); lean_dec(x_40); lean_ctor_set_uint8(x_42, sizeof(void*)*6, x_43); x_44 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_44, 0, x_9); lean_ctor_set(x_44, 1, x_3); lean_ctor_set(x_44, 2, x_42); if (lean_is_scalar(x_8)) { x_45 = lean_alloc_ctor(0, 2, 0); } else { x_45 = x_8; } lean_ctor_set(x_45, 0, x_44); lean_ctor_set(x_45, 1, x_7); return x_45; } } } } case 1: { uint8_t x_53; lean_dec(x_3); x_53 = !lean_is_exclusive(x_5); if (x_53 == 0) { lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; 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; lean_object* x_70; lean_object* x_71; x_54 = lean_ctor_get(x_5, 0); lean_dec(x_54); x_55 = lean_ctor_get(x_6, 0); lean_inc(x_55); x_56 = lean_ctor_get(x_6, 1); lean_inc(x_56); lean_dec(x_6); x_57 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_57, 0, x_55); x_58 = l_Lean_JsonRpc_instToJsonMessage___closed__5; x_59 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_59, 0, x_58); lean_ctor_set(x_59, 1, x_57); x_60 = l_Lean_JsonRpc_instToJsonMessage___closed__6; x_61 = l_Lean_Json_opt___at_Lean_JsonRpc_instToJsonMessage___spec__1(x_60, x_56); lean_dec(x_56); x_62 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_62, 0, x_59); lean_ctor_set(x_62, 1, x_61); x_63 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_64 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_64, 0, x_63); lean_ctor_set(x_64, 1, x_62); x_65 = l_Lean_Json_mkObj(x_64); x_66 = l_Lean_Json_compress(x_65); x_67 = l_IO_FS_Stream_readRequestAs___closed__5; x_68 = lean_string_append(x_67, x_66); lean_dec(x_66); x_69 = l_Char_quote___closed__1; x_70 = lean_string_append(x_68, x_69); x_71 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_71, 0, x_70); lean_ctor_set_tag(x_5, 1); lean_ctor_set(x_5, 0, x_71); return x_5; } else { 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; lean_object* x_81; 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; x_72 = lean_ctor_get(x_5, 1); lean_inc(x_72); lean_dec(x_5); x_73 = lean_ctor_get(x_6, 0); lean_inc(x_73); x_74 = lean_ctor_get(x_6, 1); lean_inc(x_74); lean_dec(x_6); x_75 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_75, 0, x_73); x_76 = l_Lean_JsonRpc_instToJsonMessage___closed__5; x_77 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_77, 0, x_76); lean_ctor_set(x_77, 1, x_75); x_78 = l_Lean_JsonRpc_instToJsonMessage___closed__6; x_79 = l_Lean_Json_opt___at_Lean_JsonRpc_instToJsonMessage___spec__1(x_78, x_74); lean_dec(x_74); x_80 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_80, 0, x_77); lean_ctor_set(x_80, 1, x_79); x_81 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_82 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_82, 0, x_81); lean_ctor_set(x_82, 1, x_80); x_83 = l_Lean_Json_mkObj(x_82); x_84 = l_Lean_Json_compress(x_83); x_85 = l_IO_FS_Stream_readRequestAs___closed__5; x_86 = lean_string_append(x_85, x_84); lean_dec(x_84); x_87 = l_Char_quote___closed__1; x_88 = lean_string_append(x_86, x_87); x_89 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_89, 0, x_88); x_90 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_90, 0, x_89); lean_ctor_set(x_90, 1, x_72); return x_90; } } case 2: { uint8_t x_91; lean_dec(x_3); x_91 = !lean_is_exclusive(x_5); if (x_91 == 0) { lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; x_92 = lean_ctor_get(x_5, 0); lean_dec(x_92); x_93 = lean_ctor_get(x_6, 0); lean_inc(x_93); x_94 = lean_ctor_get(x_6, 1); lean_inc(x_94); lean_dec(x_6); x_95 = l_Lean_JsonRpc_instToJsonMessage___closed__9; x_96 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_96, 0, x_95); lean_ctor_set(x_96, 1, x_94); x_97 = lean_box(0); x_98 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_98, 0, x_96); lean_ctor_set(x_98, 1, x_97); switch (lean_obj_tag(x_93)) { case 0: { 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; lean_object* x_112; x_99 = lean_ctor_get(x_93, 0); lean_inc(x_99); lean_dec(x_93); x_100 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_100, 0, x_99); x_101 = l_Lean_JsonRpc_instToJsonMessage___closed__7; x_102 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_102, 0, x_101); lean_ctor_set(x_102, 1, x_100); x_103 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_103, 0, x_102); lean_ctor_set(x_103, 1, x_98); x_104 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_105 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_105, 0, x_104); lean_ctor_set(x_105, 1, x_103); x_106 = l_Lean_Json_mkObj(x_105); x_107 = l_Lean_Json_compress(x_106); x_108 = l_IO_FS_Stream_readRequestAs___closed__5; x_109 = lean_string_append(x_108, x_107); lean_dec(x_107); x_110 = l_Char_quote___closed__1; x_111 = lean_string_append(x_109, x_110); x_112 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_112, 0, x_111); lean_ctor_set_tag(x_5, 1); lean_ctor_set(x_5, 0, x_112); return x_5; } case 1: { lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; x_113 = lean_ctor_get(x_93, 0); lean_inc(x_113); lean_dec(x_93); x_114 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_114, 0, x_113); x_115 = l_Lean_JsonRpc_instToJsonMessage___closed__7; x_116 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_116, 0, x_115); lean_ctor_set(x_116, 1, x_114); x_117 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_117, 0, x_116); lean_ctor_set(x_117, 1, x_98); x_118 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_119 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_119, 0, x_118); lean_ctor_set(x_119, 1, x_117); x_120 = l_Lean_Json_mkObj(x_119); x_121 = l_Lean_Json_compress(x_120); x_122 = l_IO_FS_Stream_readRequestAs___closed__5; x_123 = lean_string_append(x_122, x_121); lean_dec(x_121); x_124 = l_Char_quote___closed__1; x_125 = lean_string_append(x_123, x_124); x_126 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_126, 0, x_125); lean_ctor_set_tag(x_5, 1); lean_ctor_set(x_5, 0, x_126); return x_5; } default: { 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; x_127 = l_Lean_JsonRpc_instToJsonMessage___closed__8; x_128 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_128, 0, x_127); lean_ctor_set(x_128, 1, x_98); x_129 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_130 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_130, 0, x_129); lean_ctor_set(x_130, 1, x_128); x_131 = l_Lean_Json_mkObj(x_130); x_132 = l_Lean_Json_compress(x_131); x_133 = l_IO_FS_Stream_readRequestAs___closed__5; x_134 = lean_string_append(x_133, x_132); lean_dec(x_132); x_135 = l_Char_quote___closed__1; x_136 = lean_string_append(x_134, x_135); x_137 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_137, 0, x_136); lean_ctor_set_tag(x_5, 1); lean_ctor_set(x_5, 0, x_137); return x_5; } } } else { lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; x_138 = lean_ctor_get(x_5, 1); lean_inc(x_138); lean_dec(x_5); x_139 = lean_ctor_get(x_6, 0); lean_inc(x_139); x_140 = lean_ctor_get(x_6, 1); lean_inc(x_140); lean_dec(x_6); x_141 = l_Lean_JsonRpc_instToJsonMessage___closed__9; x_142 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_142, 0, x_141); lean_ctor_set(x_142, 1, x_140); x_143 = lean_box(0); x_144 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_144, 0, x_142); lean_ctor_set(x_144, 1, x_143); switch (lean_obj_tag(x_139)) { case 0: { lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; 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; lean_object* x_158; lean_object* x_159; x_145 = lean_ctor_get(x_139, 0); lean_inc(x_145); lean_dec(x_139); x_146 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_146, 0, x_145); x_147 = l_Lean_JsonRpc_instToJsonMessage___closed__7; x_148 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_148, 0, x_147); lean_ctor_set(x_148, 1, x_146); x_149 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_149, 0, x_148); lean_ctor_set(x_149, 1, x_144); x_150 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_151 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_151, 0, x_150); lean_ctor_set(x_151, 1, x_149); x_152 = l_Lean_Json_mkObj(x_151); x_153 = l_Lean_Json_compress(x_152); x_154 = l_IO_FS_Stream_readRequestAs___closed__5; x_155 = lean_string_append(x_154, x_153); lean_dec(x_153); x_156 = l_Char_quote___closed__1; x_157 = lean_string_append(x_155, x_156); x_158 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_158, 0, x_157); x_159 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_159, 0, x_158); lean_ctor_set(x_159, 1, x_138); return x_159; } case 1: { lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; 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; lean_object* x_173; lean_object* x_174; x_160 = lean_ctor_get(x_139, 0); lean_inc(x_160); lean_dec(x_139); x_161 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_161, 0, x_160); x_162 = l_Lean_JsonRpc_instToJsonMessage___closed__7; x_163 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_163, 0, x_162); lean_ctor_set(x_163, 1, x_161); x_164 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_164, 0, x_163); lean_ctor_set(x_164, 1, x_144); x_165 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_166 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_166, 0, x_165); lean_ctor_set(x_166, 1, x_164); x_167 = l_Lean_Json_mkObj(x_166); x_168 = l_Lean_Json_compress(x_167); x_169 = l_IO_FS_Stream_readRequestAs___closed__5; x_170 = lean_string_append(x_169, x_168); lean_dec(x_168); x_171 = l_Char_quote___closed__1; x_172 = lean_string_append(x_170, x_171); x_173 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_173, 0, x_172); x_174 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_174, 0, x_173); lean_ctor_set(x_174, 1, x_138); return x_174; } default: { lean_object* x_175; lean_object* x_176; 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; lean_object* x_184; lean_object* x_185; lean_object* x_186; x_175 = l_Lean_JsonRpc_instToJsonMessage___closed__8; x_176 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_176, 0, x_175); lean_ctor_set(x_176, 1, x_144); x_177 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_178 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_178, 0, x_177); lean_ctor_set(x_178, 1, x_176); x_179 = l_Lean_Json_mkObj(x_178); x_180 = l_Lean_Json_compress(x_179); x_181 = l_IO_FS_Stream_readRequestAs___closed__5; x_182 = lean_string_append(x_181, x_180); lean_dec(x_180); x_183 = l_Char_quote___closed__1; x_184 = lean_string_append(x_182, x_183); x_185 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_185, 0, x_184); x_186 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_186, 0, x_185); lean_ctor_set(x_186, 1, x_138); return x_186; } } } } default: { lean_object* x_187; lean_object* x_188; lean_object* x_189; uint8_t x_190; lean_object* x_191; 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; lean_object* x_200; lean_dec(x_3); x_187 = lean_ctor_get(x_5, 1); lean_inc(x_187); if (lean_is_exclusive(x_5)) { lean_ctor_release(x_5, 0); lean_ctor_release(x_5, 1); x_188 = x_5; } else { lean_dec_ref(x_5); x_188 = lean_box(0); } x_189 = lean_ctor_get(x_6, 0); lean_inc(x_189); x_190 = lean_ctor_get_uint8(x_6, sizeof(void*)*3); x_191 = lean_ctor_get(x_6, 1); lean_inc(x_191); x_192 = lean_ctor_get(x_6, 2); lean_inc(x_192); lean_dec(x_6); x_193 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_193, 0, x_191); x_194 = l_Lean_JsonRpc_instToJsonMessage___closed__10; x_195 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_195, 0, x_194); lean_ctor_set(x_195, 1, x_193); x_196 = lean_box(0); x_197 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_197, 0, x_195); lean_ctor_set(x_197, 1, x_196); x_198 = l_Lean_JsonRpc_instToJsonMessage___closed__11; x_199 = l_Lean_Json_opt___at_Lean_JsonRpc_instToJsonMessage___spec__2(x_198, x_192); lean_dec(x_192); switch (lean_obj_tag(x_189)) { case 0: { lean_object* x_236; lean_object* x_237; x_236 = lean_ctor_get(x_189, 0); lean_inc(x_236); lean_dec(x_189); x_237 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_237, 0, x_236); x_200 = x_237; goto block_235; } case 1: { lean_object* x_238; lean_object* x_239; x_238 = lean_ctor_get(x_189, 0); lean_inc(x_238); lean_dec(x_189); x_239 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_239, 0, x_238); x_200 = x_239; goto block_235; } default: { lean_object* x_240; x_240 = lean_box(0); x_200 = x_240; goto block_235; } } block_235: { lean_object* x_201; lean_object* x_202; lean_object* x_203; x_201 = l_Lean_JsonRpc_instToJsonMessage___closed__7; x_202 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_202, 0, x_201); lean_ctor_set(x_202, 1, x_200); switch (x_190) { case 0: { lean_object* x_224; x_224 = l_Lean_JsonRpc_instToJsonErrorCode___closed__4; x_203 = x_224; goto block_223; } case 1: { lean_object* x_225; x_225 = l_Lean_JsonRpc_instToJsonErrorCode___closed__8; x_203 = x_225; goto block_223; } case 2: { lean_object* x_226; x_226 = l_Lean_JsonRpc_instToJsonErrorCode___closed__12; x_203 = x_226; goto block_223; } case 3: { lean_object* x_227; x_227 = l_Lean_JsonRpc_instToJsonErrorCode___closed__16; x_203 = x_227; goto block_223; } case 4: { lean_object* x_228; x_228 = l_Lean_JsonRpc_instToJsonErrorCode___closed__20; x_203 = x_228; goto block_223; } case 5: { lean_object* x_229; x_229 = l_Lean_JsonRpc_instToJsonErrorCode___closed__24; x_203 = x_229; goto block_223; } case 6: { lean_object* x_230; x_230 = l_Lean_JsonRpc_instToJsonErrorCode___closed__28; x_203 = x_230; goto block_223; } case 7: { lean_object* x_231; x_231 = l_Lean_JsonRpc_instToJsonErrorCode___closed__32; x_203 = x_231; goto block_223; } case 8: { lean_object* x_232; x_232 = l_Lean_JsonRpc_instToJsonErrorCode___closed__36; x_203 = x_232; goto block_223; } case 9: { lean_object* x_233; x_233 = l_Lean_JsonRpc_instToJsonErrorCode___closed__40; x_203 = x_233; goto block_223; } default: { lean_object* x_234; x_234 = l_Lean_JsonRpc_instToJsonErrorCode___closed__44; x_203 = x_234; goto block_223; } } block_223: { lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; 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; lean_object* x_222; x_204 = l_Lean_JsonRpc_instToJsonMessage___closed__12; x_205 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_205, 0, x_204); lean_ctor_set(x_205, 1, x_203); x_206 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_206, 0, x_205); lean_ctor_set(x_206, 1, x_197); x_207 = l_List_append___rarg(x_206, x_199); x_208 = l_Lean_Json_mkObj(x_207); x_209 = l_Lean_JsonRpc_instToJsonMessage___closed__13; x_210 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_210, 0, x_209); lean_ctor_set(x_210, 1, x_208); x_211 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_211, 0, x_210); lean_ctor_set(x_211, 1, x_196); x_212 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_212, 0, x_202); lean_ctor_set(x_212, 1, x_211); x_213 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_214 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_214, 0, x_213); lean_ctor_set(x_214, 1, x_212); x_215 = l_Lean_Json_mkObj(x_214); x_216 = l_Lean_Json_compress(x_215); x_217 = l_IO_FS_Stream_readRequestAs___closed__5; x_218 = lean_string_append(x_217, x_216); lean_dec(x_216); x_219 = l_Char_quote___closed__1; x_220 = lean_string_append(x_218, x_219); x_221 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_221, 0, x_220); if (lean_is_scalar(x_188)) { x_222 = lean_alloc_ctor(1, 2, 0); } else { x_222 = x_188; lean_ctor_set_tag(x_222, 1); } lean_ctor_set(x_222, 0, x_221); lean_ctor_set(x_222, 1, x_187); return x_222; } } } } } else { uint8_t x_241; lean_dec(x_3); x_241 = !lean_is_exclusive(x_5); if (x_241 == 0) { return x_5; } else { lean_object* x_242; lean_object* x_243; lean_object* x_244; x_242 = lean_ctor_get(x_5, 0); x_243 = lean_ctor_get(x_5, 1); lean_inc(x_243); lean_inc(x_242); lean_dec(x_5); x_244 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_244, 0, x_242); lean_ctor_set(x_244, 1, x_243); return x_244; } } } } lean_object* l_IO_FS_Stream_readLspRequestAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_inc(x_1); x_4 = l___private_Lean_Data_Lsp_Communication_0__IO_FS_Stream_readLspHeader(x_1, x_3); if (lean_obj_tag(x_4) == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; 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_IO_FS_Stream_readRequestAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__2(x_1, x_5, x_2, x_6); lean_dec(x_5); if (lean_obj_tag(x_7) == 0) { return x_7; } else { uint8_t x_8; x_8 = !lean_is_exclusive(x_7); if (x_8 == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_9 = lean_ctor_get(x_7, 0); x_10 = lean_io_error_to_string(x_9); x_11 = l_IO_FS_Stream_readLspRequestAs___closed__1; x_12 = lean_string_append(x_11, x_10); lean_dec(x_10); x_13 = l_Lean_instInhabitedParserDescr___closed__1; x_14 = lean_string_append(x_12, x_13); x_15 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_7, 0, x_15); return x_7; } 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; lean_object* x_22; lean_object* x_23; lean_object* x_24; x_16 = lean_ctor_get(x_7, 0); x_17 = lean_ctor_get(x_7, 1); lean_inc(x_17); lean_inc(x_16); lean_dec(x_7); x_18 = lean_io_error_to_string(x_16); x_19 = l_IO_FS_Stream_readLspRequestAs___closed__1; x_20 = lean_string_append(x_19, x_18); lean_dec(x_18); x_21 = l_Lean_instInhabitedParserDescr___closed__1; x_22 = lean_string_append(x_20, x_21); x_23 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_23, 0, x_22); x_24 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_17); return x_24; } } } else { uint8_t x_25; lean_dec(x_2); lean_dec(x_1); x_25 = !lean_is_exclusive(x_4); if (x_25 == 0) { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; x_26 = lean_ctor_get(x_4, 0); x_27 = lean_io_error_to_string(x_26); x_28 = l_IO_FS_Stream_readLspRequestAs___closed__1; x_29 = lean_string_append(x_28, x_27); lean_dec(x_27); x_30 = l_Lean_instInhabitedParserDescr___closed__1; x_31 = lean_string_append(x_29, x_30); x_32 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_32, 0, x_31); lean_ctor_set(x_4, 0, x_32); return x_4; } else { lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; x_33 = lean_ctor_get(x_4, 0); x_34 = lean_ctor_get(x_4, 1); lean_inc(x_34); lean_inc(x_33); lean_dec(x_4); x_35 = lean_io_error_to_string(x_33); x_36 = l_IO_FS_Stream_readLspRequestAs___closed__1; x_37 = lean_string_append(x_36, x_35); lean_dec(x_35); x_38 = l_Lean_instInhabitedParserDescr___closed__1; x_39 = lean_string_append(x_37, x_38); x_40 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_40, 0, x_39); x_41 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_41, 0, x_40); lean_ctor_set(x_41, 1, x_34); return x_41; } } } } lean_object* l_IO_FS_Stream_readNotificationAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_IO_FS_Stream_readMessage(x_1, x_2, x_4); if (lean_obj_tag(x_5) == 0) { lean_object* x_6; x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); switch (lean_obj_tag(x_6)) { case 0: { uint8_t x_7; lean_dec(x_3); x_7 = !lean_is_exclusive(x_5); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; x_8 = lean_ctor_get(x_5, 0); lean_dec(x_8); x_9 = lean_ctor_get(x_6, 0); lean_inc(x_9); x_10 = lean_ctor_get(x_6, 1); lean_inc(x_10); x_11 = lean_ctor_get(x_6, 2); lean_inc(x_11); lean_dec(x_6); x_12 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_12, 0, x_10); x_13 = l_Lean_JsonRpc_instToJsonMessage___closed__5; x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_12); x_15 = lean_box(0); x_16 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_16, 0, x_14); lean_ctor_set(x_16, 1, x_15); x_17 = l_Lean_JsonRpc_instToJsonMessage___closed__6; x_18 = l_Lean_Json_opt___at_Lean_JsonRpc_instToJsonMessage___spec__1(x_17, x_11); lean_dec(x_11); switch (lean_obj_tag(x_9)) { case 0: { lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; x_19 = lean_ctor_get(x_9, 0); lean_inc(x_19); lean_dec(x_9); x_20 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_20, 0, x_19); x_21 = l_Lean_JsonRpc_instToJsonMessage___closed__7; x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_21); lean_ctor_set(x_22, 1, x_20); x_23 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_23, 0, x_22); lean_ctor_set(x_23, 1, x_16); x_24 = l_List_append___rarg(x_23, x_18); x_25 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_26 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_24); x_27 = l_Lean_Json_mkObj(x_26); x_28 = l_Lean_Json_compress(x_27); x_29 = l_IO_FS_Stream_readNotificationAs___closed__1; x_30 = lean_string_append(x_29, x_28); lean_dec(x_28); x_31 = l_Char_quote___closed__1; x_32 = lean_string_append(x_30, x_31); x_33 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_33, 0, x_32); lean_ctor_set_tag(x_5, 1); lean_ctor_set(x_5, 0, x_33); return x_5; } case 1: { lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; x_34 = lean_ctor_get(x_9, 0); lean_inc(x_34); lean_dec(x_9); x_35 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_35, 0, x_34); x_36 = l_Lean_JsonRpc_instToJsonMessage___closed__7; x_37 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_37, 0, x_36); lean_ctor_set(x_37, 1, x_35); x_38 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_38, 0, x_37); lean_ctor_set(x_38, 1, x_16); x_39 = l_List_append___rarg(x_38, x_18); x_40 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_41 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_41, 0, x_40); lean_ctor_set(x_41, 1, x_39); x_42 = l_Lean_Json_mkObj(x_41); x_43 = l_Lean_Json_compress(x_42); x_44 = l_IO_FS_Stream_readNotificationAs___closed__1; x_45 = lean_string_append(x_44, x_43); lean_dec(x_43); x_46 = l_Char_quote___closed__1; x_47 = lean_string_append(x_45, x_46); x_48 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_48, 0, x_47); lean_ctor_set_tag(x_5, 1); lean_ctor_set(x_5, 0, x_48); return x_5; } default: { lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; x_49 = l_Lean_JsonRpc_instToJsonMessage___closed__8; x_50 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_50, 0, x_49); lean_ctor_set(x_50, 1, x_16); x_51 = l_List_append___rarg(x_50, x_18); x_52 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_53 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_53, 0, x_52); lean_ctor_set(x_53, 1, x_51); x_54 = l_Lean_Json_mkObj(x_53); x_55 = l_Lean_Json_compress(x_54); x_56 = l_IO_FS_Stream_readNotificationAs___closed__1; x_57 = lean_string_append(x_56, x_55); lean_dec(x_55); x_58 = l_Char_quote___closed__1; x_59 = lean_string_append(x_57, x_58); x_60 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_60, 0, x_59); lean_ctor_set_tag(x_5, 1); lean_ctor_set(x_5, 0, x_60); return x_5; } } } 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; lean_object* x_69; lean_object* x_70; lean_object* x_71; x_61 = lean_ctor_get(x_5, 1); lean_inc(x_61); lean_dec(x_5); x_62 = lean_ctor_get(x_6, 0); lean_inc(x_62); x_63 = lean_ctor_get(x_6, 1); lean_inc(x_63); x_64 = lean_ctor_get(x_6, 2); lean_inc(x_64); lean_dec(x_6); x_65 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_65, 0, x_63); x_66 = l_Lean_JsonRpc_instToJsonMessage___closed__5; x_67 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_67, 0, x_66); lean_ctor_set(x_67, 1, x_65); x_68 = lean_box(0); x_69 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_69, 0, x_67); lean_ctor_set(x_69, 1, x_68); x_70 = l_Lean_JsonRpc_instToJsonMessage___closed__6; x_71 = l_Lean_Json_opt___at_Lean_JsonRpc_instToJsonMessage___spec__1(x_70, x_64); lean_dec(x_64); switch (lean_obj_tag(x_62)) { case 0: { lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; 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; lean_object* x_85; lean_object* x_86; lean_object* x_87; x_72 = lean_ctor_get(x_62, 0); lean_inc(x_72); lean_dec(x_62); x_73 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_73, 0, x_72); x_74 = l_Lean_JsonRpc_instToJsonMessage___closed__7; x_75 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_75, 0, x_74); lean_ctor_set(x_75, 1, x_73); x_76 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_76, 0, x_75); lean_ctor_set(x_76, 1, x_69); x_77 = l_List_append___rarg(x_76, x_71); x_78 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_79 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_79, 0, x_78); lean_ctor_set(x_79, 1, x_77); x_80 = l_Lean_Json_mkObj(x_79); x_81 = l_Lean_Json_compress(x_80); x_82 = l_IO_FS_Stream_readNotificationAs___closed__1; x_83 = lean_string_append(x_82, x_81); lean_dec(x_81); x_84 = l_Char_quote___closed__1; x_85 = lean_string_append(x_83, x_84); x_86 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_86, 0, x_85); x_87 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_87, 0, x_86); lean_ctor_set(x_87, 1, x_61); return x_87; } case 1: { 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; 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; x_88 = lean_ctor_get(x_62, 0); lean_inc(x_88); lean_dec(x_62); x_89 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_89, 0, x_88); x_90 = l_Lean_JsonRpc_instToJsonMessage___closed__7; x_91 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_91, 0, x_90); lean_ctor_set(x_91, 1, x_89); x_92 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_92, 0, x_91); lean_ctor_set(x_92, 1, x_69); x_93 = l_List_append___rarg(x_92, x_71); x_94 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_95 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_95, 0, x_94); lean_ctor_set(x_95, 1, x_93); x_96 = l_Lean_Json_mkObj(x_95); x_97 = l_Lean_Json_compress(x_96); x_98 = l_IO_FS_Stream_readNotificationAs___closed__1; x_99 = lean_string_append(x_98, x_97); lean_dec(x_97); x_100 = l_Char_quote___closed__1; x_101 = lean_string_append(x_99, x_100); x_102 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_102, 0, x_101); x_103 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_103, 0, x_102); lean_ctor_set(x_103, 1, x_61); return x_103; } default: { 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; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; x_104 = l_Lean_JsonRpc_instToJsonMessage___closed__8; x_105 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_105, 0, x_104); lean_ctor_set(x_105, 1, x_69); x_106 = l_List_append___rarg(x_105, x_71); x_107 = l_Lean_JsonRpc_instToJsonMessage___closed__4; 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 = l_Lean_Json_mkObj(x_108); x_110 = l_Lean_Json_compress(x_109); x_111 = l_IO_FS_Stream_readNotificationAs___closed__1; x_112 = lean_string_append(x_111, x_110); lean_dec(x_110); x_113 = l_Char_quote___closed__1; x_114 = lean_string_append(x_112, x_113); x_115 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_115, 0, x_114); x_116 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_116, 0, x_115); lean_ctor_set(x_116, 1, x_61); return x_116; } } } } case 1: { lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; uint8_t x_121; x_117 = lean_ctor_get(x_5, 1); lean_inc(x_117); if (lean_is_exclusive(x_5)) { lean_ctor_release(x_5, 0); lean_ctor_release(x_5, 1); x_118 = x_5; } else { lean_dec_ref(x_5); x_118 = lean_box(0); } x_119 = lean_ctor_get(x_6, 0); lean_inc(x_119); x_120 = lean_ctor_get(x_6, 1); lean_inc(x_120); lean_dec(x_6); x_121 = lean_string_dec_eq(x_119, x_3); if (x_121 == 0) { 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_dec(x_120); x_122 = l_IO_FS_Stream_readRequestAs___closed__1; x_123 = lean_string_append(x_122, x_3); lean_dec(x_3); x_124 = l_IO_FS_Stream_readRequestAs___closed__2; x_125 = lean_string_append(x_123, x_124); x_126 = lean_string_append(x_125, x_119); lean_dec(x_119); x_127 = l_Char_quote___closed__1; x_128 = lean_string_append(x_126, x_127); x_129 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_129, 0, x_128); if (lean_is_scalar(x_118)) { x_130 = lean_alloc_ctor(1, 2, 0); } else { x_130 = x_118; lean_ctor_set_tag(x_130, 1); } lean_ctor_set(x_130, 0, x_129); lean_ctor_set(x_130, 1, x_117); return x_130; } else { lean_object* x_131; lean_dec(x_119); if (lean_obj_tag(x_120) == 0) { lean_object* x_147; x_147 = lean_box(0); x_131 = x_147; goto block_146; } else { lean_object* x_148; x_148 = lean_ctor_get(x_120, 0); lean_inc(x_148); lean_dec(x_120); if (lean_obj_tag(x_148) == 0) { lean_object* x_149; lean_object* x_150; x_149 = lean_ctor_get(x_148, 0); lean_inc(x_149); lean_dec(x_148); x_150 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_150, 0, x_149); x_131 = x_150; goto block_146; } else { lean_object* x_151; lean_object* x_152; x_151 = lean_ctor_get(x_148, 0); lean_inc(x_151); lean_dec(x_148); x_152 = lean_alloc_ctor(5, 1, 0); lean_ctor_set(x_152, 0, x_151); x_131 = x_152; goto block_146; } } block_146: { lean_object* x_132; x_132 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_100_(x_131); if (lean_obj_tag(x_132) == 0) { 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_133 = l_Lean_Json_compress(x_131); x_134 = l_IO_FS_Stream_readRequestAs___closed__3; x_135 = lean_string_append(x_134, x_133); lean_dec(x_133); x_136 = l_IO_FS_Stream_readRequestAs___closed__4; x_137 = lean_string_append(x_135, x_136); x_138 = lean_string_append(x_137, x_3); lean_dec(x_3); x_139 = l_Char_quote___closed__1; x_140 = lean_string_append(x_138, x_139); x_141 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_141, 0, x_140); if (lean_is_scalar(x_118)) { x_142 = lean_alloc_ctor(1, 2, 0); } else { x_142 = x_118; lean_ctor_set_tag(x_142, 1); } lean_ctor_set(x_142, 0, x_141); lean_ctor_set(x_142, 1, x_117); return x_142; } else { lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_dec(x_131); x_143 = lean_ctor_get(x_132, 0); lean_inc(x_143); lean_dec(x_132); x_144 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_144, 0, x_3); lean_ctor_set(x_144, 1, x_143); if (lean_is_scalar(x_118)) { x_145 = lean_alloc_ctor(0, 2, 0); } else { x_145 = x_118; } lean_ctor_set(x_145, 0, x_144); lean_ctor_set(x_145, 1, x_117); return x_145; } } } } case 2: { uint8_t x_153; lean_dec(x_3); x_153 = !lean_is_exclusive(x_5); if (x_153 == 0) { lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; x_154 = lean_ctor_get(x_5, 0); lean_dec(x_154); x_155 = lean_ctor_get(x_6, 0); lean_inc(x_155); x_156 = lean_ctor_get(x_6, 1); lean_inc(x_156); lean_dec(x_6); x_157 = l_Lean_JsonRpc_instToJsonMessage___closed__9; x_158 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_158, 0, x_157); lean_ctor_set(x_158, 1, x_156); x_159 = lean_box(0); x_160 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_160, 0, x_158); lean_ctor_set(x_160, 1, x_159); switch (lean_obj_tag(x_155)) { case 0: { lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; 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; lean_object* x_173; lean_object* x_174; x_161 = lean_ctor_get(x_155, 0); lean_inc(x_161); lean_dec(x_155); x_162 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_162, 0, x_161); x_163 = l_Lean_JsonRpc_instToJsonMessage___closed__7; x_164 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_164, 0, x_163); lean_ctor_set(x_164, 1, x_162); x_165 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_165, 0, x_164); lean_ctor_set(x_165, 1, x_160); x_166 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_167 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_167, 0, x_166); lean_ctor_set(x_167, 1, x_165); x_168 = l_Lean_Json_mkObj(x_167); x_169 = l_Lean_Json_compress(x_168); x_170 = l_IO_FS_Stream_readNotificationAs___closed__1; x_171 = lean_string_append(x_170, x_169); lean_dec(x_169); x_172 = l_Char_quote___closed__1; x_173 = lean_string_append(x_171, x_172); x_174 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_174, 0, x_173); lean_ctor_set_tag(x_5, 1); lean_ctor_set(x_5, 0, x_174); return x_5; } case 1: { lean_object* x_175; lean_object* x_176; 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; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; x_175 = lean_ctor_get(x_155, 0); lean_inc(x_175); lean_dec(x_155); x_176 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_176, 0, x_175); x_177 = l_Lean_JsonRpc_instToJsonMessage___closed__7; x_178 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_178, 0, x_177); lean_ctor_set(x_178, 1, x_176); x_179 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_179, 0, x_178); lean_ctor_set(x_179, 1, x_160); x_180 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_181 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_181, 0, x_180); lean_ctor_set(x_181, 1, x_179); x_182 = l_Lean_Json_mkObj(x_181); x_183 = l_Lean_Json_compress(x_182); x_184 = l_IO_FS_Stream_readNotificationAs___closed__1; x_185 = lean_string_append(x_184, x_183); lean_dec(x_183); x_186 = l_Char_quote___closed__1; x_187 = lean_string_append(x_185, x_186); x_188 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_188, 0, x_187); lean_ctor_set_tag(x_5, 1); lean_ctor_set(x_5, 0, x_188); return x_5; } default: { 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; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; x_189 = l_Lean_JsonRpc_instToJsonMessage___closed__8; x_190 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_190, 0, x_189); lean_ctor_set(x_190, 1, x_160); x_191 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_192 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_192, 0, x_191); lean_ctor_set(x_192, 1, x_190); x_193 = l_Lean_Json_mkObj(x_192); x_194 = l_Lean_Json_compress(x_193); x_195 = l_IO_FS_Stream_readNotificationAs___closed__1; x_196 = lean_string_append(x_195, x_194); lean_dec(x_194); x_197 = l_Char_quote___closed__1; x_198 = lean_string_append(x_196, x_197); x_199 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_199, 0, x_198); lean_ctor_set_tag(x_5, 1); lean_ctor_set(x_5, 0, x_199); return x_5; } } } else { 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_200 = lean_ctor_get(x_5, 1); lean_inc(x_200); lean_dec(x_5); x_201 = lean_ctor_get(x_6, 0); lean_inc(x_201); x_202 = lean_ctor_get(x_6, 1); lean_inc(x_202); lean_dec(x_6); x_203 = l_Lean_JsonRpc_instToJsonMessage___closed__9; x_204 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_204, 0, x_203); lean_ctor_set(x_204, 1, x_202); x_205 = lean_box(0); x_206 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_206, 0, x_204); lean_ctor_set(x_206, 1, x_205); switch (lean_obj_tag(x_201)) { case 0: { lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; 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_207 = lean_ctor_get(x_201, 0); lean_inc(x_207); lean_dec(x_201); x_208 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_208, 0, x_207); x_209 = l_Lean_JsonRpc_instToJsonMessage___closed__7; x_210 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_210, 0, x_209); lean_ctor_set(x_210, 1, x_208); x_211 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_211, 0, x_210); lean_ctor_set(x_211, 1, x_206); x_212 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_213 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_213, 0, x_212); lean_ctor_set(x_213, 1, x_211); x_214 = l_Lean_Json_mkObj(x_213); x_215 = l_Lean_Json_compress(x_214); x_216 = l_IO_FS_Stream_readNotificationAs___closed__1; x_217 = lean_string_append(x_216, x_215); lean_dec(x_215); x_218 = l_Char_quote___closed__1; x_219 = lean_string_append(x_217, x_218); x_220 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_220, 0, x_219); x_221 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_221, 0, x_220); lean_ctor_set(x_221, 1, x_200); return x_221; } case 1: { lean_object* x_222; lean_object* x_223; lean_object* x_224; lean_object* x_225; lean_object* x_226; lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; lean_object* x_235; lean_object* x_236; x_222 = lean_ctor_get(x_201, 0); lean_inc(x_222); lean_dec(x_201); x_223 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_223, 0, x_222); x_224 = l_Lean_JsonRpc_instToJsonMessage___closed__7; x_225 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_225, 0, x_224); lean_ctor_set(x_225, 1, x_223); x_226 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_226, 0, x_225); lean_ctor_set(x_226, 1, x_206); x_227 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_228 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_228, 0, x_227); lean_ctor_set(x_228, 1, x_226); x_229 = l_Lean_Json_mkObj(x_228); x_230 = l_Lean_Json_compress(x_229); x_231 = l_IO_FS_Stream_readNotificationAs___closed__1; x_232 = lean_string_append(x_231, x_230); lean_dec(x_230); x_233 = l_Char_quote___closed__1; x_234 = lean_string_append(x_232, x_233); x_235 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_235, 0, x_234); x_236 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_236, 0, x_235); lean_ctor_set(x_236, 1, x_200); return x_236; } default: { lean_object* x_237; 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; lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; x_237 = l_Lean_JsonRpc_instToJsonMessage___closed__8; x_238 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_238, 0, x_237); lean_ctor_set(x_238, 1, x_206); x_239 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_240 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_240, 0, x_239); lean_ctor_set(x_240, 1, x_238); x_241 = l_Lean_Json_mkObj(x_240); x_242 = l_Lean_Json_compress(x_241); x_243 = l_IO_FS_Stream_readNotificationAs___closed__1; x_244 = lean_string_append(x_243, x_242); lean_dec(x_242); x_245 = l_Char_quote___closed__1; x_246 = lean_string_append(x_244, x_245); x_247 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_247, 0, x_246); x_248 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_248, 0, x_247); lean_ctor_set(x_248, 1, x_200); return x_248; } } } } default: { lean_object* x_249; lean_object* x_250; lean_object* x_251; uint8_t x_252; lean_object* x_253; 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_dec(x_3); x_249 = lean_ctor_get(x_5, 1); lean_inc(x_249); if (lean_is_exclusive(x_5)) { lean_ctor_release(x_5, 0); lean_ctor_release(x_5, 1); x_250 = x_5; } else { lean_dec_ref(x_5); x_250 = lean_box(0); } x_251 = lean_ctor_get(x_6, 0); lean_inc(x_251); x_252 = lean_ctor_get_uint8(x_6, sizeof(void*)*3); x_253 = lean_ctor_get(x_6, 1); lean_inc(x_253); x_254 = lean_ctor_get(x_6, 2); lean_inc(x_254); lean_dec(x_6); x_255 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_255, 0, x_253); x_256 = l_Lean_JsonRpc_instToJsonMessage___closed__10; x_257 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_257, 0, x_256); lean_ctor_set(x_257, 1, x_255); x_258 = lean_box(0); x_259 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_259, 0, x_257); lean_ctor_set(x_259, 1, x_258); x_260 = l_Lean_JsonRpc_instToJsonMessage___closed__11; x_261 = l_Lean_Json_opt___at_Lean_JsonRpc_instToJsonMessage___spec__2(x_260, x_254); lean_dec(x_254); switch (lean_obj_tag(x_251)) { case 0: { lean_object* x_298; lean_object* x_299; x_298 = lean_ctor_get(x_251, 0); lean_inc(x_298); lean_dec(x_251); x_299 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_299, 0, x_298); x_262 = x_299; goto block_297; } case 1: { lean_object* x_300; lean_object* x_301; x_300 = lean_ctor_get(x_251, 0); lean_inc(x_300); lean_dec(x_251); x_301 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_301, 0, x_300); x_262 = x_301; goto block_297; } default: { lean_object* x_302; x_302 = lean_box(0); x_262 = x_302; goto block_297; } } block_297: { lean_object* x_263; lean_object* x_264; lean_object* x_265; x_263 = l_Lean_JsonRpc_instToJsonMessage___closed__7; x_264 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_264, 0, x_263); lean_ctor_set(x_264, 1, x_262); switch (x_252) { case 0: { lean_object* x_286; x_286 = l_Lean_JsonRpc_instToJsonErrorCode___closed__4; x_265 = x_286; goto block_285; } case 1: { lean_object* x_287; x_287 = l_Lean_JsonRpc_instToJsonErrorCode___closed__8; x_265 = x_287; goto block_285; } case 2: { lean_object* x_288; x_288 = l_Lean_JsonRpc_instToJsonErrorCode___closed__12; x_265 = x_288; goto block_285; } case 3: { lean_object* x_289; x_289 = l_Lean_JsonRpc_instToJsonErrorCode___closed__16; x_265 = x_289; goto block_285; } case 4: { lean_object* x_290; x_290 = l_Lean_JsonRpc_instToJsonErrorCode___closed__20; x_265 = x_290; goto block_285; } case 5: { lean_object* x_291; x_291 = l_Lean_JsonRpc_instToJsonErrorCode___closed__24; x_265 = x_291; goto block_285; } case 6: { lean_object* x_292; x_292 = l_Lean_JsonRpc_instToJsonErrorCode___closed__28; x_265 = x_292; goto block_285; } case 7: { lean_object* x_293; x_293 = l_Lean_JsonRpc_instToJsonErrorCode___closed__32; x_265 = x_293; goto block_285; } case 8: { lean_object* x_294; x_294 = l_Lean_JsonRpc_instToJsonErrorCode___closed__36; x_265 = x_294; goto block_285; } case 9: { lean_object* x_295; x_295 = l_Lean_JsonRpc_instToJsonErrorCode___closed__40; x_265 = x_295; goto block_285; } default: { lean_object* x_296; x_296 = l_Lean_JsonRpc_instToJsonErrorCode___closed__44; x_265 = x_296; goto block_285; } } block_285: { lean_object* x_266; 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; 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; lean_object* x_284; x_266 = l_Lean_JsonRpc_instToJsonMessage___closed__12; x_267 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_267, 0, x_266); lean_ctor_set(x_267, 1, x_265); x_268 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_268, 0, x_267); lean_ctor_set(x_268, 1, x_259); x_269 = l_List_append___rarg(x_268, x_261); x_270 = l_Lean_Json_mkObj(x_269); x_271 = l_Lean_JsonRpc_instToJsonMessage___closed__13; x_272 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_272, 0, x_271); lean_ctor_set(x_272, 1, x_270); x_273 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_273, 0, x_272); lean_ctor_set(x_273, 1, x_258); x_274 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_274, 0, x_264); lean_ctor_set(x_274, 1, x_273); x_275 = l_Lean_JsonRpc_instToJsonMessage___closed__4; x_276 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_276, 0, x_275); lean_ctor_set(x_276, 1, x_274); x_277 = l_Lean_Json_mkObj(x_276); x_278 = l_Lean_Json_compress(x_277); x_279 = l_IO_FS_Stream_readNotificationAs___closed__1; x_280 = lean_string_append(x_279, x_278); lean_dec(x_278); x_281 = l_Char_quote___closed__1; x_282 = lean_string_append(x_280, x_281); x_283 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_283, 0, x_282); if (lean_is_scalar(x_250)) { x_284 = lean_alloc_ctor(1, 2, 0); } else { x_284 = x_250; lean_ctor_set_tag(x_284, 1); } lean_ctor_set(x_284, 0, x_283); lean_ctor_set(x_284, 1, x_249); return x_284; } } } } } else { uint8_t x_303; lean_dec(x_3); x_303 = !lean_is_exclusive(x_5); if (x_303 == 0) { return x_5; } else { lean_object* x_304; lean_object* x_305; lean_object* x_306; x_304 = lean_ctor_get(x_5, 0); x_305 = lean_ctor_get(x_5, 1); lean_inc(x_305); lean_inc(x_304); lean_dec(x_5); x_306 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_306, 0, x_304); lean_ctor_set(x_306, 1, x_305); return x_306; } } } } lean_object* l_IO_FS_Stream_readLspNotificationAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_inc(x_1); x_4 = l___private_Lean_Data_Lsp_Communication_0__IO_FS_Stream_readLspHeader(x_1, x_3); if (lean_obj_tag(x_4) == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; 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_IO_FS_Stream_readNotificationAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__4(x_1, x_5, x_2, x_6); lean_dec(x_5); if (lean_obj_tag(x_7) == 0) { return x_7; } else { uint8_t x_8; x_8 = !lean_is_exclusive(x_7); if (x_8 == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_9 = lean_ctor_get(x_7, 0); x_10 = lean_io_error_to_string(x_9); x_11 = l_IO_FS_Stream_readLspNotificationAs___closed__1; x_12 = lean_string_append(x_11, x_10); lean_dec(x_10); x_13 = l_Lean_instInhabitedParserDescr___closed__1; x_14 = lean_string_append(x_12, x_13); x_15 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_7, 0, x_15); return x_7; } 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; lean_object* x_22; lean_object* x_23; lean_object* x_24; x_16 = lean_ctor_get(x_7, 0); x_17 = lean_ctor_get(x_7, 1); lean_inc(x_17); lean_inc(x_16); lean_dec(x_7); x_18 = lean_io_error_to_string(x_16); x_19 = l_IO_FS_Stream_readLspNotificationAs___closed__1; x_20 = lean_string_append(x_19, x_18); lean_dec(x_18); x_21 = l_Lean_instInhabitedParserDescr___closed__1; x_22 = lean_string_append(x_20, x_21); x_23 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_23, 0, x_22); x_24 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_17); return x_24; } } } else { uint8_t x_25; lean_dec(x_2); lean_dec(x_1); x_25 = !lean_is_exclusive(x_4); if (x_25 == 0) { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; x_26 = lean_ctor_get(x_4, 0); x_27 = lean_io_error_to_string(x_26); x_28 = l_IO_FS_Stream_readLspNotificationAs___closed__1; x_29 = lean_string_append(x_28, x_27); lean_dec(x_27); x_30 = l_Lean_instInhabitedParserDescr___closed__1; x_31 = lean_string_append(x_29, x_30); x_32 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_32, 0, x_31); lean_ctor_set(x_4, 0, x_32); return x_4; } else { lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; x_33 = lean_ctor_get(x_4, 0); x_34 = lean_ctor_get(x_4, 1); lean_inc(x_34); lean_inc(x_33); lean_dec(x_4); x_35 = lean_io_error_to_string(x_33); x_36 = l_IO_FS_Stream_readLspNotificationAs___closed__1; x_37 = lean_string_append(x_36, x_35); lean_dec(x_35); x_38 = l_Lean_instInhabitedParserDescr___closed__1; x_39 = lean_string_append(x_37, x_38); x_40 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_40, 0, x_39); x_41 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_41, 0, x_40); lean_ctor_set(x_41, 1, x_34); return x_41; } } } } lean_object* l_IO_eprintln___at_Lean_Server_FileWorker_initAndRunWorker___spec__5(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; uint32_t x_4; lean_object* x_5; lean_object* x_6; x_3 = lean_io_error_to_string(x_1); x_4 = 10; x_5 = lean_string_push(x_3, x_4); x_6 = l_IO_eprint___at_IO_eprintln___spec__1(x_5, x_2); return x_6; } } static lean_object* _init_l_Lean_Server_FileWorker_initAndRunWorker___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("fwIn.txt"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_initAndRunWorker___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("fwOut.txt"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_initAndRunWorker___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("textDocument/didOpen"); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_initAndRunWorker___boxed__const__1() { _start: { uint32_t x_1; lean_object* x_2; x_1 = 1; x_2 = lean_box_uint32(x_1); return x_2; } } static lean_object* _init_l_Lean_Server_FileWorker_initAndRunWorker___boxed__const__2() { _start: { uint32_t x_1; lean_object* x_2; x_1 = 0; x_2 = lean_box_uint32(x_1); return x_2; } } lean_object* l_Lean_Server_FileWorker_initAndRunWorker(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; uint8_t x_6; lean_object* x_7; x_5 = l_Lean_Server_FileWorker_initAndRunWorker___closed__1; x_6 = 0; x_7 = l_Lean_Server_maybeTee(x_5, x_6, x_1, x_4); 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; x_8 = lean_ctor_get(x_7, 0); lean_inc(x_8); x_9 = lean_ctor_get(x_7, 1); lean_inc(x_9); lean_dec(x_7); x_10 = l_Lean_Server_FileWorker_initAndRunWorker___closed__2; x_11 = 1; x_12 = l_Lean_Server_maybeTee(x_10, x_11, x_2, x_9); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_12, 1); lean_inc(x_14); lean_dec(x_12); x_15 = l_Lean_Parser_Command_initialize___elambda__1___closed__1; lean_inc(x_8); x_16 = l_IO_FS_Stream_readLspRequestAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__1(x_8, x_15, x_14); if (lean_obj_tag(x_16) == 0) { lean_object* x_17; lean_object* x_18; lean_object* x_19; x_17 = lean_ctor_get(x_16, 1); lean_inc(x_17); lean_dec(x_16); x_18 = l_Lean_Server_FileWorker_initAndRunWorker___closed__3; lean_inc(x_8); x_19 = l_IO_FS_Stream_readLspNotificationAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__3(x_8, x_18, x_17); if (lean_obj_tag(x_19) == 0) { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; x_20 = lean_ctor_get(x_19, 0); lean_inc(x_20); x_21 = lean_ctor_get(x_20, 1); lean_inc(x_21); lean_dec(x_20); x_22 = lean_ctor_get(x_19, 1); lean_inc(x_22); lean_dec(x_19); x_23 = lean_ctor_get(x_21, 0); lean_inc(x_23); x_24 = lean_ctor_get(x_21, 2); lean_inc(x_24); x_25 = lean_ctor_get(x_21, 3); lean_inc(x_25); lean_dec(x_21); x_26 = l_Lean_FileMap_ofString(x_25); lean_inc(x_23); x_27 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_27, 0, x_23); lean_ctor_set(x_27, 1, x_24); lean_ctor_set(x_27, 2, x_26); x_55 = l_term_x5b___x5d___closed__3; x_56 = lean_string_append(x_55, x_23); lean_dec(x_23); x_57 = l___private_Lean_Util_Trace_0__Lean_addNode___rarg___lambda__1___closed__2; x_58 = lean_string_append(x_56, x_57); x_59 = l_IO_FS_Stream_withPrefix(x_3, x_58); lean_inc(x_59); x_60 = lean_get_set_stderr(x_59, x_22); if (lean_obj_tag(x_60) == 0) { lean_object* x_61; lean_object* x_62; x_61 = lean_ctor_get(x_60, 1); lean_inc(x_61); lean_dec(x_60); lean_inc(x_13); lean_inc(x_27); x_62 = l_Lean_Server_FileWorker_initializeWorker(x_27, x_8, x_13, x_59, x_61); if (lean_obj_tag(x_62) == 0) { lean_object* x_63; lean_object* x_64; lean_object* x_65; x_63 = lean_ctor_get(x_62, 0); lean_inc(x_63); x_64 = lean_ctor_get(x_62, 1); lean_inc(x_64); lean_dec(x_62); x_65 = l_Lean_Server_FileWorker_mainLoop(x_63, x_64); if (lean_obj_tag(x_65) == 0) { uint8_t x_66; lean_dec(x_27); lean_dec(x_13); x_66 = !lean_is_exclusive(x_65); if (x_66 == 0) { lean_object* x_67; lean_object* x_68; x_67 = lean_ctor_get(x_65, 0); lean_dec(x_67); x_68 = l_Lean_Server_FileWorker_initAndRunWorker___boxed__const__2; lean_ctor_set(x_65, 0, x_68); return x_65; } else { lean_object* x_69; lean_object* x_70; lean_object* x_71; x_69 = lean_ctor_get(x_65, 1); lean_inc(x_69); lean_dec(x_65); x_70 = l_Lean_Server_FileWorker_initAndRunWorker___boxed__const__2; x_71 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_71, 0, x_70); lean_ctor_set(x_71, 1, x_69); return x_71; } } else { lean_object* x_72; lean_object* x_73; x_72 = lean_ctor_get(x_65, 0); lean_inc(x_72); x_73 = lean_ctor_get(x_65, 1); lean_inc(x_73); lean_dec(x_65); x_28 = x_72; x_29 = x_73; goto block_54; } } else { lean_object* x_74; lean_object* x_75; x_74 = lean_ctor_get(x_62, 0); lean_inc(x_74); x_75 = lean_ctor_get(x_62, 1); lean_inc(x_75); lean_dec(x_62); x_28 = x_74; x_29 = x_75; goto block_54; } } else { uint8_t x_76; lean_dec(x_59); lean_dec(x_27); lean_dec(x_13); lean_dec(x_8); x_76 = !lean_is_exclusive(x_60); if (x_76 == 0) { return x_60; } else { lean_object* x_77; lean_object* x_78; lean_object* x_79; x_77 = lean_ctor_get(x_60, 0); x_78 = lean_ctor_get(x_60, 1); lean_inc(x_78); lean_inc(x_77); lean_dec(x_60); x_79 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_79, 0, x_77); lean_ctor_set(x_79, 1, x_78); return x_79; } } block_54: { lean_object* x_30; lean_inc(x_28); x_30 = l_IO_eprintln___at_Lean_Server_FileWorker_initAndRunWorker___spec__5(x_28, x_29); if (lean_obj_tag(x_30) == 0) { lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; x_31 = lean_ctor_get(x_30, 1); lean_inc(x_31); lean_dec(x_30); x_32 = lean_box(0); x_33 = lean_io_error_to_string(x_28); x_34 = l_Lean_Lsp_instInhabitedRange___closed__1; x_35 = l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__4; x_36 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_36, 0, x_34); lean_ctor_set(x_36, 1, x_34); lean_ctor_set(x_36, 2, x_35); lean_ctor_set(x_36, 3, x_32); lean_ctor_set(x_36, 4, x_32); lean_ctor_set(x_36, 5, x_33); lean_ctor_set(x_36, 6, x_32); lean_ctor_set(x_36, 7, x_32); x_37 = l_Lean_mkOptionalNode___closed__2; x_38 = lean_array_push(x_37, x_36); x_39 = l_Lean_Server_publishDiagnostics(x_27, x_38, x_13, x_31); if (lean_obj_tag(x_39) == 0) { uint8_t x_40; x_40 = !lean_is_exclusive(x_39); if (x_40 == 0) { lean_object* x_41; lean_object* x_42; x_41 = lean_ctor_get(x_39, 0); lean_dec(x_41); x_42 = l_Lean_Server_FileWorker_initAndRunWorker___boxed__const__1; lean_ctor_set(x_39, 0, x_42); return x_39; } else { lean_object* x_43; lean_object* x_44; lean_object* x_45; x_43 = lean_ctor_get(x_39, 1); lean_inc(x_43); lean_dec(x_39); x_44 = l_Lean_Server_FileWorker_initAndRunWorker___boxed__const__1; x_45 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_45, 0, x_44); lean_ctor_set(x_45, 1, x_43); return x_45; } } else { uint8_t x_46; x_46 = !lean_is_exclusive(x_39); if (x_46 == 0) { return x_39; } else { lean_object* x_47; lean_object* x_48; lean_object* x_49; x_47 = lean_ctor_get(x_39, 0); x_48 = lean_ctor_get(x_39, 1); lean_inc(x_48); lean_inc(x_47); lean_dec(x_39); 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; } } } else { uint8_t x_50; lean_dec(x_28); lean_dec(x_27); lean_dec(x_13); x_50 = !lean_is_exclusive(x_30); if (x_50 == 0) { return x_30; } else { lean_object* x_51; lean_object* x_52; lean_object* x_53; x_51 = lean_ctor_get(x_30, 0); x_52 = lean_ctor_get(x_30, 1); lean_inc(x_52); lean_inc(x_51); lean_dec(x_30); x_53 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_53, 0, x_51); lean_ctor_set(x_53, 1, x_52); return x_53; } } } } else { uint8_t x_80; lean_dec(x_13); lean_dec(x_8); lean_dec(x_3); x_80 = !lean_is_exclusive(x_19); if (x_80 == 0) { return x_19; } else { lean_object* x_81; lean_object* x_82; lean_object* x_83; x_81 = lean_ctor_get(x_19, 0); x_82 = lean_ctor_get(x_19, 1); lean_inc(x_82); lean_inc(x_81); lean_dec(x_19); 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_13); lean_dec(x_8); lean_dec(x_3); x_84 = !lean_is_exclusive(x_16); if (x_84 == 0) { return x_16; } else { lean_object* x_85; lean_object* x_86; lean_object* x_87; x_85 = lean_ctor_get(x_16, 0); x_86 = lean_ctor_get(x_16, 1); lean_inc(x_86); lean_inc(x_85); lean_dec(x_16); x_87 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_87, 0, x_85); lean_ctor_set(x_87, 1, x_86); return x_87; } } } else { uint8_t x_88; lean_dec(x_8); lean_dec(x_3); x_88 = !lean_is_exclusive(x_12); if (x_88 == 0) { return x_12; } else { lean_object* x_89; lean_object* x_90; lean_object* x_91; x_89 = lean_ctor_get(x_12, 0); x_90 = lean_ctor_get(x_12, 1); lean_inc(x_90); lean_inc(x_89); lean_dec(x_12); 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 { uint8_t x_92; lean_dec(x_3); lean_dec(x_2); x_92 = !lean_is_exclusive(x_7); if (x_92 == 0) { return x_7; } else { lean_object* x_93; lean_object* x_94; lean_object* x_95; x_93 = lean_ctor_get(x_7, 0); x_94 = lean_ctor_get(x_7, 1); lean_inc(x_94); lean_inc(x_93); lean_dec(x_7); x_95 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_95, 0, x_93); lean_ctor_set(x_95, 1, x_94); return x_95; } } } } lean_object* l_IO_FS_Stream_readRequestAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_IO_FS_Stream_readRequestAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__2(x_1, x_2, x_3, x_4); lean_dec(x_2); return x_5; } } lean_object* l_IO_FS_Stream_readNotificationAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_IO_FS_Stream_readNotificationAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__4(x_1, x_2, x_3, x_4); lean_dec(x_2); return x_5; } } lean_object* l_Lean_Server_FileWorker_workerMain_match__1___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_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_object* x_8; lean_object* x_9; lean_dec(x_2); x_7 = lean_ctor_get(x_1, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_1, 1); lean_inc(x_8); lean_dec(x_1); x_9 = lean_apply_2(x_3, x_7, x_8); return x_9; } } } lean_object* l_Lean_Server_FileWorker_workerMain_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_workerMain_match__1___rarg), 3, 0); return x_2; } } lean_object* l_IO_getStdin___at_Lean_Server_FileWorker_workerMain___spec__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_get_stdin(x_1); return x_2; } } lean_object* l_IO_FS_Stream_putStrLn___at_Lean_Server_FileWorker_workerMain___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint32_t x_5; lean_object* x_6; lean_object* x_7; x_4 = lean_ctor_get(x_1, 5); lean_inc(x_4); lean_dec(x_1); x_5 = 10; x_6 = lean_string_push(x_2, x_5); x_7 = lean_apply_2(x_4, x_6, x_3); return x_7; } } static lean_object* _init_l_Lean_Server_FileWorker_workerMain___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("worker initialization error: "); return x_1; } } static lean_object* _init_l_Lean_Server_FileWorker_workerMain___boxed__const__1() { _start: { uint32_t x_1; lean_object* x_2; x_1 = 1; x_2 = lean_box_uint32(x_1); return x_2; } } lean_object* lean_server_worker_main(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_get_stdin(x_1); if (lean_obj_tag(x_2) == 0) { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_2, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_2, 1); lean_inc(x_4); lean_dec(x_2); x_5 = lean_get_stdout(x_4); if (lean_obj_tag(x_5) == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = lean_get_stderr(x_7); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; 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); lean_inc(x_9); x_11 = l_Lean_Server_FileWorker_initAndRunWorker(x_3, x_6, x_9, x_10); if (lean_obj_tag(x_11) == 0) { uint8_t x_12; lean_dec(x_9); x_12 = !lean_is_exclusive(x_11); if (x_12 == 0) { return x_11; } else { lean_object* x_13; lean_object* x_14; lean_object* x_15; x_13 = lean_ctor_get(x_11, 0); x_14 = lean_ctor_get(x_11, 1); lean_inc(x_14); lean_inc(x_13); lean_dec(x_11); x_15 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_15, 0, x_13); lean_ctor_set(x_15, 1, x_14); return x_15; } } 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; lean_object* x_22; lean_object* x_23; x_16 = lean_ctor_get(x_11, 0); lean_inc(x_16); x_17 = lean_ctor_get(x_11, 1); lean_inc(x_17); lean_dec(x_11); x_18 = lean_io_error_to_string(x_16); x_19 = l_Lean_Server_FileWorker_workerMain___closed__1; x_20 = lean_string_append(x_19, x_18); lean_dec(x_18); x_21 = l_Lean_instInhabitedParserDescr___closed__1; x_22 = lean_string_append(x_20, x_21); x_23 = l_IO_FS_Stream_putStrLn___at_Lean_Server_FileWorker_workerMain___spec__2(x_9, x_22, x_17); if (lean_obj_tag(x_23) == 0) { uint8_t x_24; x_24 = !lean_is_exclusive(x_23); if (x_24 == 0) { lean_object* x_25; lean_object* x_26; x_25 = lean_ctor_get(x_23, 0); lean_dec(x_25); x_26 = l_Lean_Server_FileWorker_workerMain___boxed__const__1; lean_ctor_set(x_23, 0, x_26); return x_23; } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; x_27 = lean_ctor_get(x_23, 1); lean_inc(x_27); lean_dec(x_23); x_28 = l_Lean_Server_FileWorker_workerMain___boxed__const__1; x_29 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_29, 0, x_28); lean_ctor_set(x_29, 1, x_27); return x_29; } } else { uint8_t x_30; x_30 = !lean_is_exclusive(x_23); if (x_30 == 0) { return x_23; } else { lean_object* x_31; lean_object* x_32; lean_object* x_33; x_31 = lean_ctor_get(x_23, 0); x_32 = lean_ctor_get(x_23, 1); lean_inc(x_32); lean_inc(x_31); lean_dec(x_23); x_33 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_33, 0, x_31); lean_ctor_set(x_33, 1, x_32); return x_33; } } } } else { uint8_t x_34; lean_dec(x_6); lean_dec(x_3); x_34 = !lean_is_exclusive(x_8); if (x_34 == 0) { return x_8; } else { lean_object* x_35; lean_object* x_36; lean_object* x_37; x_35 = lean_ctor_get(x_8, 0); x_36 = lean_ctor_get(x_8, 1); lean_inc(x_36); lean_inc(x_35); lean_dec(x_8); x_37 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_37, 0, x_35); lean_ctor_set(x_37, 1, x_36); return x_37; } } } else { uint8_t x_38; lean_dec(x_3); x_38 = !lean_is_exclusive(x_5); if (x_38 == 0) { return x_5; } else { lean_object* x_39; lean_object* x_40; lean_object* x_41; x_39 = lean_ctor_get(x_5, 0); x_40 = lean_ctor_get(x_5, 1); lean_inc(x_40); lean_inc(x_39); lean_dec(x_5); x_41 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_41, 0, x_39); lean_ctor_set(x_41, 1, x_40); return x_41; } } } else { uint8_t x_42; x_42 = !lean_is_exclusive(x_2); if (x_42 == 0) { return x_2; } else { lean_object* x_43; lean_object* x_44; lean_object* x_45; x_43 = lean_ctor_get(x_2, 0); x_44 = lean_ctor_get(x_2, 1); lean_inc(x_44); lean_inc(x_43); lean_dec(x_2); 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* initialize_Init(lean_object*); lean_object* initialize_Init_System_IO(lean_object*); lean_object* initialize_Std_Data_RBMap(lean_object*); lean_object* initialize_Lean_Environment(lean_object*); lean_object* initialize_Lean_PrettyPrinter(lean_object*); lean_object* initialize_Lean_DeclarationRange(lean_object*); lean_object* initialize_Lean_Data_Lsp(lean_object*); lean_object* initialize_Lean_Data_Json_FromToJson(lean_object*); lean_object* initialize_Lean_Server_Snapshots(lean_object*); lean_object* initialize_Lean_Server_Utils(lean_object*); lean_object* initialize_Lean_Server_AsyncList(lean_object*); lean_object* initialize_Lean_Server_InfoUtils(lean_object*); lean_object* initialize_Lean_Server_Completion(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Server_FileWorker(lean_object* w) { lean_object * res; if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); _G_initialized = true; res = initialize_Init(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Init_System_IO(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Std_Data_RBMap(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Environment(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_PrettyPrinter(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_DeclarationRange(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Data_Lsp(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Data_Json_FromToJson(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Server_Snapshots(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Server_Utils(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Server_AsyncList(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Server_InfoUtils(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Server_Completion(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_logSnapContent___closed__1 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_logSnapContent___closed__1(); lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_logSnapContent___closed__1); l_Lean_Server_FileWorker_instInhabitedCancelToken = _init_l_Lean_Server_FileWorker_instInhabitedCancelToken(); lean_mark_persistent(l_Lean_Server_FileWorker_instInhabitedCancelToken); l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__1 = _init_l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__1); l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__2 = _init_l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__2(); lean_mark_persistent(l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__2); l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__3 = _init_l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__3(); lean_mark_persistent(l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__3); l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__4 = _init_l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__4(); lean_mark_persistent(l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__4); l_Lean_Server_FileWorker_instInhabitedEditableDocument = _init_l_Lean_Server_FileWorker_instInhabitedEditableDocument(); lean_mark_persistent(l_Lean_Server_FileWorker_instInhabitedEditableDocument); l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1___closed__1 = _init_l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_CancelToken_check___at___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___spec__1___closed__1); l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__1 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__1(); lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__1); l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__2 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__2(); lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__2); l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__3 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__3(); lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__3); l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__4 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__4(); lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__4); l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__5 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__5(); lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__5); l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3___closed__1 = _init_l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3___closed__1(); lean_mark_persistent(l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3___closed__1); l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__1 = _init_l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__1); l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__2 = _init_l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__2(); lean_mark_persistent(l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__2); l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__3 = _init_l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__3(); lean_mark_persistent(l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__3); l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__4 = _init_l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__4(); lean_mark_persistent(l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__4); l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5 = _init_l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5(); lean_mark_persistent(l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__5); l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6 = _init_l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6(); lean_mark_persistent(l_Lean_Server_FileWorker_leanpkgSetupSearchPath___closed__6); l_Lean_Server_FileWorker_compileHeader___lambda__4___closed__1 = _init_l_Lean_Server_FileWorker_compileHeader___lambda__4___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_compileHeader___lambda__4___closed__1); l_Lean_Server_FileWorker_compileHeader___lambda__4___closed__2 = _init_l_Lean_Server_FileWorker_compileHeader___lambda__4___closed__2(); lean_mark_persistent(l_Lean_Server_FileWorker_compileHeader___lambda__4___closed__2); l_Lean_Server_FileWorker_compileHeader___closed__1 = _init_l_Lean_Server_FileWorker_compileHeader___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_compileHeader___closed__1); l_Lean_Server_FileWorker_compileHeader___closed__2 = _init_l_Lean_Server_FileWorker_compileHeader___closed__2(); lean_mark_persistent(l_Lean_Server_FileWorker_compileHeader___closed__2); l_Lean_Server_FileWorker_compileHeader___closed__3 = _init_l_Lean_Server_FileWorker_compileHeader___closed__3(); lean_mark_persistent(l_Lean_Server_FileWorker_compileHeader___closed__3); l_Lean_Server_FileWorker_updateDocument___lambda__3___closed__1 = _init_l_Lean_Server_FileWorker_updateDocument___lambda__3___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_updateDocument___lambda__3___closed__1); l_Lean_Server_FileWorker_updateDocument___closed__1 = _init_l_Lean_Server_FileWorker_updateDocument___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_updateDocument___closed__1); l_Lean_Server_FileWorker_handleDidChange___closed__1 = _init_l_Lean_Server_FileWorker_handleDidChange___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleDidChange___closed__1); l_Lean_Server_FileWorker_handleDidChange___closed__2 = _init_l_Lean_Server_FileWorker_handleDidChange___closed__2(); lean_mark_persistent(l_Lean_Server_FileWorker_handleDidChange___closed__2); l_Lean_Server_FileWorker_RequestError_fileChanged___closed__1 = _init_l_Lean_Server_FileWorker_RequestError_fileChanged___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_RequestError_fileChanged___closed__1); l_Lean_Server_FileWorker_RequestError_fileChanged___closed__2 = _init_l_Lean_Server_FileWorker_RequestError_fileChanged___closed__2(); lean_mark_persistent(l_Lean_Server_FileWorker_RequestError_fileChanged___closed__2); l_Lean_Server_FileWorker_RequestError_fileChanged = _init_l_Lean_Server_FileWorker_RequestError_fileChanged(); lean_mark_persistent(l_Lean_Server_FileWorker_RequestError_fileChanged); l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1___closed__1 = _init_l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_withWaitFindSnap___rarg___lambda__1___closed__1); l_Lean_Server_FileWorker_handleCompletion___closed__1 = _init_l_Lean_Server_FileWorker_handleCompletion___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleCompletion___closed__1); l_Lean_Server_FileWorker_handleCompletion___closed__2 = _init_l_Lean_Server_FileWorker_handleCompletion___closed__2(); lean_mark_persistent(l_Lean_Server_FileWorker_handleCompletion___closed__2); l_Lean_Server_FileWorker_handleCompletion___closed__3 = _init_l_Lean_Server_FileWorker_handleCompletion___closed__3(); lean_mark_persistent(l_Lean_Server_FileWorker_handleCompletion___closed__3); l_Lean_Server_FileWorker_handleHover___closed__1 = _init_l_Lean_Server_FileWorker_handleHover___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleHover___closed__1); l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__2___closed__1 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__2___closed__1(); lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___lambda__2___closed__1); l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___closed__1 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___closed__1(); lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handleDefinition___spec__7___closed__1); l_Lean_Server_FileWorker_handleDefinition___closed__1 = _init_l_Lean_Server_FileWorker_handleDefinition___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleDefinition___closed__1); l_Lean_Server_FileWorker_handleDefinition___closed__2 = _init_l_Lean_Server_FileWorker_handleDefinition___closed__2(); lean_mark_persistent(l_Lean_Server_FileWorker_handleDefinition___closed__2); l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__5___closed__1 = _init_l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__5___closed__1(); lean_mark_persistent(l_List_mapM___at_Lean_Server_FileWorker_handlePlainGoal___spec__5___closed__1); l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__9___closed__1 = _init_l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__9___closed__1(); lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Server_FileWorker_handlePlainGoal___spec__9___closed__1); l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___closed__1 = _init_l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleDocumentHighlight_highlightReturn_x3f___closed__1); l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1 = _init_l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__1); l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__2 = _init_l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__2(); lean_mark_persistent(l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__2); l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__3 = _init_l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__3(); lean_mark_persistent(l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___lambda__2___closed__3); l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___closed__1 = _init_l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___closed__1); l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___closed__2 = _init_l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___closed__2(); lean_mark_persistent(l_Lean_Server_FileWorker_handleDocumentSymbol_toDocumentSymbols___closed__2); l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___closed__1 = _init_l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleDocumentSymbol___rarg___closed__1); l_Lean_Server_FileWorker_noHighlightKinds___closed__1 = _init_l_Lean_Server_FileWorker_noHighlightKinds___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_noHighlightKinds___closed__1); l_Lean_Server_FileWorker_noHighlightKinds___closed__2 = _init_l_Lean_Server_FileWorker_noHighlightKinds___closed__2(); lean_mark_persistent(l_Lean_Server_FileWorker_noHighlightKinds___closed__2); l_Lean_Server_FileWorker_noHighlightKinds___closed__3 = _init_l_Lean_Server_FileWorker_noHighlightKinds___closed__3(); lean_mark_persistent(l_Lean_Server_FileWorker_noHighlightKinds___closed__3); l_Lean_Server_FileWorker_noHighlightKinds___closed__4 = _init_l_Lean_Server_FileWorker_noHighlightKinds___closed__4(); lean_mark_persistent(l_Lean_Server_FileWorker_noHighlightKinds___closed__4); l_Lean_Server_FileWorker_noHighlightKinds___closed__5 = _init_l_Lean_Server_FileWorker_noHighlightKinds___closed__5(); lean_mark_persistent(l_Lean_Server_FileWorker_noHighlightKinds___closed__5); l_Lean_Server_FileWorker_noHighlightKinds = _init_l_Lean_Server_FileWorker_noHighlightKinds(); lean_mark_persistent(l_Lean_Server_FileWorker_noHighlightKinds); l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1___closed__1 = _init_l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1___closed__1(); lean_mark_persistent(l_IO_AsyncList_waitAll___at_Lean_Server_FileWorker_handleSemanticTokens___spec__1___closed__1); l_Lean_Server_FileWorker_handleSemanticTokens___lambda__2___closed__1 = _init_l_Lean_Server_FileWorker_handleSemanticTokens___lambda__2___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleSemanticTokens___lambda__2___closed__1); l_Lean_Server_FileWorker_handleSemanticTokensFull___rarg___closed__1 = _init_l_Lean_Server_FileWorker_handleSemanticTokensFull___rarg___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleSemanticTokensFull___rarg___closed__1); l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__2___closed__1 = _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__2___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__2___closed__1); l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__1 = _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__1); l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__2 = _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__2(); lean_mark_persistent(l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__2); l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__3 = _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__3(); lean_mark_persistent(l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__3); l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__4 = _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__4(); lean_mark_persistent(l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__4); l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__5 = _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__5(); lean_mark_persistent(l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__5); l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__6 = _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__6(); lean_mark_persistent(l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__3___closed__6); l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__4___closed__1 = _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__4___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleWaitForDiagnostics___lambda__4___closed__1); l_Lean_Server_FileWorker_handleWaitForDiagnostics___closed__1 = _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleWaitForDiagnostics___closed__1); l_Lean_Server_FileWorker_handleWaitForDiagnostics___closed__2 = _init_l_Lean_Server_FileWorker_handleWaitForDiagnostics___closed__2(); lean_mark_persistent(l_Lean_Server_FileWorker_handleWaitForDiagnostics___closed__2); l_Lean_Server_FileWorker_parseParams___rarg___closed__1 = _init_l_Lean_Server_FileWorker_parseParams___rarg___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_parseParams___rarg___closed__1); l_Lean_Server_FileWorker_handleNotification_match__1___rarg___closed__1 = _init_l_Lean_Server_FileWorker_handleNotification_match__1___rarg___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleNotification_match__1___rarg___closed__1); l_Lean_Server_FileWorker_handleNotification_match__1___rarg___closed__2 = _init_l_Lean_Server_FileWorker_handleNotification_match__1___rarg___closed__2(); lean_mark_persistent(l_Lean_Server_FileWorker_handleNotification_match__1___rarg___closed__2); l_Lean_Server_FileWorker_handleNotification___closed__1 = _init_l_Lean_Server_FileWorker_handleNotification___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleNotification___closed__1); l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__1 = _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__1); l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__2 = _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__2(); lean_mark_persistent(l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__2); l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__3 = _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__3(); lean_mark_persistent(l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__3); l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__4 = _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__4(); lean_mark_persistent(l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__4); l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__5 = _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__5(); lean_mark_persistent(l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__5); l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__6 = _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__6(); lean_mark_persistent(l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__6); l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__7 = _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__7(); lean_mark_persistent(l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__7); l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__8 = _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__8(); lean_mark_persistent(l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__8); l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__9 = _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__9(); lean_mark_persistent(l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__9); l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__10 = _init_l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__10(); lean_mark_persistent(l_Lean_Server_FileWorker_handleRequest_match__2___rarg___closed__10); l_Lean_Server_FileWorker_handleRequest___closed__1 = _init_l_Lean_Server_FileWorker_handleRequest___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_handleRequest___closed__1); l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__1 = _init_l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__1(); lean_mark_persistent(l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__1); l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__2 = _init_l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__2(); lean_mark_persistent(l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__2); l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__3 = _init_l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__3(); lean_mark_persistent(l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__3); l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__4 = _init_l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__4(); lean_mark_persistent(l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__4); l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__5 = _init_l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__5(); lean_mark_persistent(l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___closed__5); l_Lean_Server_FileWorker_mainLoop___closed__1 = _init_l_Lean_Server_FileWorker_mainLoop___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_mainLoop___closed__1); l_Lean_Server_FileWorker_initAndRunWorker___closed__1 = _init_l_Lean_Server_FileWorker_initAndRunWorker___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_initAndRunWorker___closed__1); l_Lean_Server_FileWorker_initAndRunWorker___closed__2 = _init_l_Lean_Server_FileWorker_initAndRunWorker___closed__2(); lean_mark_persistent(l_Lean_Server_FileWorker_initAndRunWorker___closed__2); l_Lean_Server_FileWorker_initAndRunWorker___closed__3 = _init_l_Lean_Server_FileWorker_initAndRunWorker___closed__3(); lean_mark_persistent(l_Lean_Server_FileWorker_initAndRunWorker___closed__3); l_Lean_Server_FileWorker_initAndRunWorker___boxed__const__1 = _init_l_Lean_Server_FileWorker_initAndRunWorker___boxed__const__1(); lean_mark_persistent(l_Lean_Server_FileWorker_initAndRunWorker___boxed__const__1); l_Lean_Server_FileWorker_initAndRunWorker___boxed__const__2 = _init_l_Lean_Server_FileWorker_initAndRunWorker___boxed__const__2(); lean_mark_persistent(l_Lean_Server_FileWorker_initAndRunWorker___boxed__const__2); l_Lean_Server_FileWorker_workerMain___closed__1 = _init_l_Lean_Server_FileWorker_workerMain___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_workerMain___closed__1); l_Lean_Server_FileWorker_workerMain___boxed__const__1 = _init_l_Lean_Server_FileWorker_workerMain___boxed__const__1(); lean_mark_persistent(l_Lean_Server_FileWorker_workerMain___boxed__const__1); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus } #endif
ChrisHughes24/lean4
stage0/stdlib/Lean/Meta/Match/CaseArraySizes.c
<filename>stage0/stdlib/Lean/Meta/Match/CaseArraySizes.c // Lean compiler output // Module: Lean.Meta.Match.CaseArraySizes // Imports: Init Lean.Meta.Tactic.Assert Lean.Meta.Match.CaseValues #include <lean/lean.h> #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wunused-label" #elif defined(__GNUC__) && !defined(__CLANG__) #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif #ifdef __cplusplus extern "C" { #endif lean_object* l_Lean_Meta_CaseArraySizesSubgoal_subst___default; size_t l_USize_add(size_t, size_t); extern lean_object* l_Array_term_____x5b___x3a___x5d___closed__2; lean_object* l_Lean_Expr_mvarId_x21(lean_object*); lean_object* l_Lean_Meta_withMVarContext___at_Lean_Meta_admit___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Syntax_mkAntiquotNode___closed__3; lean_object* l_Lean_stringToMessageData(lean_object*); lean_object* lean_mk_empty_array_with_capacity(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_throwError___at_Lean_Meta_whnf___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* lean_array_uget(lean_object*, size_t); lean_object* l_Lean_Meta_mkAppM(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_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* l_Lean_Meta_CaseArraySizesSubgoal_diseqs___default; lean_object* lean_array_uset(lean_object*, size_t, lean_object*); extern lean_object* l_Array_empty___closed__1; lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_substCore___spec__2___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_caseArraySizes___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_Meta_getMVarTag(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_caseArraySizes___lambda__1___closed__2; lean_object* l_Lean_Meta_CaseArraySizesSubgoal_elems___default; extern lean_object* l_Lean_Literal_type___closed__3; lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapIdxM_map___at_Lean_Meta_caseArraySizes___spec__3___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_mkArrayGetLit___closed__2; lean_object* l_Lean_Meta_caseArraySizes___lambda__1___closed__1; lean_object* l_Lean_Expr_appArg_x21(lean_object*); lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_mkArrayGetLit___closed__1; uint8_t l_USize_decLt(size_t, size_t); lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_caseArraySizes___spec__2(lean_object*, size_t, size_t, lean_object*); lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_mkAppN(lean_object*, lean_object*); lean_object* l_Array_mapIdxM_map___at_Lean_Meta_caseArraySizes___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_intro1Core(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* l_Lean_Meta_substCore(lean_object*, lean_object*, uint8_t, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_Meta_getMVarType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__3; lean_object* l_Lean_Meta_caseArraySizes_match__1___rarg(lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_Meta_getArrayArgType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkEqSymm(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_caseValue___closed__2; lean_object* l_Lean_Meta_getArrayArgType___closed__1; lean_object* l_Lean_Expr_fvarId_x21(lean_object*); lean_object* l_Lean_Meta_clear(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_name_append_index_after(lean_object*, lean_object*); lean_object* l_Lean_Meta_getArrayArgType___closed__2; lean_object* l_Lean_Meta_mkArrayLit(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_instInhabitedCaseArraySizesSubgoal; lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_caseArraySizes___spec__1(size_t, size_t, lean_object*); lean_object* lean_array_to_list(lean_object*, lean_object*); lean_object* l_Lean_Meta_mkDecideProof(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isAppOfArity(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_KernelException_toMessageData___closed__15; lean_object* l_Lean_Meta_introNCore(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_mkArrayGetLit(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_caseArraySizes_match__2___rarg(lean_object*, lean_object*); lean_object* l_Lean_mkFVar(lean_object*); size_t lean_usize_of_nat(lean_object*); extern lean_object* l_Lean_Syntax_mkAntiquotNode___closed__9; lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_match__1(lean_object*); lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___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_Meta_FVarSubst_get(lean_object*, lean_object*); lean_object* l_Lean_Meta_getArrayArgType___lambda__1___boxed(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*); lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__2; lean_object* l_Lean_Meta_assertExt(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_instInhabitedCaseArraySizesSubgoal___closed__1; lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_caseArraySizes___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_caseArraySizes_match__2(lean_object*); lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__1; lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__4; lean_object* l_Lean_Meta_caseArraySizes_match__3(lean_object*); lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_caseValues(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedName; lean_object* l_Lean_Meta_inferType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_caseArraySizes___lambda__1___closed__3; lean_object* l_Lean_Meta_caseArraySizes___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_Meta_getArrayArgType___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_caseArraySizes_match__1(lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_caseArraySizes___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_whnfD(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_mkOptionalNode___closed__2; extern lean_object* l_Array_myMacro____x40_Init_Data_Array_Subarray___hyg_969____closed__10; lean_object* l_Lean_mkNatLit(lean_object*); lean_object* l_Lean_Meta_mkFreshExprSyntheticOpaqueMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapIdxM_map___at_Lean_Meta_caseArraySizes___spec__3___boxed(lean_object**); lean_object* l_Lean_Meta_mkEq(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_caseArraySizes(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_caseArraySizes_match__3___rarg(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_match__1___rarg(lean_object*, lean_object*); lean_object* l_Lean_Meta_mkLt(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); static lean_object* _init_l_Lean_Meta_CaseArraySizesSubgoal_elems___default() { _start: { lean_object* x_1; x_1 = l_Array_empty___closed__1; return x_1; } } static lean_object* _init_l_Lean_Meta_CaseArraySizesSubgoal_diseqs___default() { _start: { lean_object* x_1; x_1 = l_Array_empty___closed__1; return x_1; } } static lean_object* _init_l_Lean_Meta_CaseArraySizesSubgoal_subst___default() { _start: { lean_object* x_1; x_1 = lean_box(0); return x_1; } } static lean_object* _init_l_Lean_Meta_instInhabitedCaseArraySizesSubgoal___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = lean_box(0); x_2 = lean_box(0); x_3 = l_Array_empty___closed__1; x_4 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_4, 0, x_2); lean_ctor_set(x_4, 1, x_3); lean_ctor_set(x_4, 2, x_3); lean_ctor_set(x_4, 3, x_1); return x_4; } } static lean_object* _init_l_Lean_Meta_instInhabitedCaseArraySizesSubgoal() { _start: { lean_object* x_1; x_1 = l_Lean_Meta_instInhabitedCaseArraySizesSubgoal___closed__1; return x_1; } } lean_object* l_Lean_Meta_getArrayArgType___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; x_8 = l_Lean_Expr_appArg_x21(x_1); 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; } } static lean_object* _init_l_Lean_Meta_getArrayArgType___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("array expected"); return x_1; } } static lean_object* _init_l_Lean_Meta_getArrayArgType___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Meta_getArrayArgType___closed__1; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } lean_object* l_Lean_Meta_getArrayArgType(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); lean_inc(x_1); x_7 = l_Lean_Meta_inferType(x_1, x_2, x_3, x_4, x_5, x_6); if (lean_obj_tag(x_7) == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; x_8 = lean_ctor_get(x_7, 0); lean_inc(x_8); x_9 = lean_ctor_get(x_7, 1); lean_inc(x_9); lean_dec(x_7); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); x_10 = l_Lean_Meta_whnfD(x_8, x_2, x_3, x_4, x_5, x_9); if (lean_obj_tag(x_10) == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); x_12 = lean_ctor_get(x_10, 1); lean_inc(x_12); lean_dec(x_10); x_13 = l_Array_term_____x5b___x3a___x5d___closed__2; x_14 = lean_unsigned_to_nat(1u); x_15 = l_Lean_Expr_isAppOfArity(x_11, x_13, x_14); if (x_15 == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; lean_dec(x_11); x_16 = l_Lean_indentExpr(x_1); x_17 = l_Lean_Meta_getArrayArgType___closed__2; x_18 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_16); x_19 = l_Lean_KernelException_toMessageData___closed__15; x_20 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_20, 0, x_18); lean_ctor_set(x_20, 1, x_19); x_21 = l_Lean_throwError___at_Lean_Meta_whnf___spec__1(x_20, x_2, x_3, x_4, x_5, x_12); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_22 = !lean_is_exclusive(x_21); if (x_22 == 0) { return x_21; } else { lean_object* x_23; lean_object* x_24; lean_object* x_25; x_23 = lean_ctor_get(x_21, 0); x_24 = lean_ctor_get(x_21, 1); lean_inc(x_24); lean_inc(x_23); lean_dec(x_21); 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; } } else { lean_object* x_26; lean_object* x_27; lean_dec(x_1); x_26 = lean_box(0); x_27 = l_Lean_Meta_getArrayArgType___lambda__1(x_11, x_26, x_2, x_3, x_4, x_5, x_12); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_11); return x_27; } } else { uint8_t x_28; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_28 = !lean_is_exclusive(x_10); if (x_28 == 0) { return x_10; } else { lean_object* x_29; lean_object* x_30; lean_object* x_31; x_29 = lean_ctor_get(x_10, 0); x_30 = lean_ctor_get(x_10, 1); lean_inc(x_30); lean_inc(x_29); lean_dec(x_10); x_31 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_31, 0, x_29); lean_ctor_set(x_31, 1, x_30); return x_31; } } } else { uint8_t x_32; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_32 = !lean_is_exclusive(x_7); if (x_32 == 0) { return x_7; } else { lean_object* x_33; lean_object* x_34; lean_object* x_35; x_33 = lean_ctor_get(x_7, 0); x_34 = lean_ctor_get(x_7, 1); lean_inc(x_34); lean_inc(x_33); lean_dec(x_7); x_35 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_35, 0, x_33); lean_ctor_set(x_35, 1, x_34); return x_35; } } } } lean_object* l_Lean_Meta_getArrayArgType___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: { lean_object* x_8; x_8 = l_Lean_Meta_getArrayArgType___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_8; } } static lean_object* _init_l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_mkArrayGetLit___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("getLit"); return x_1; } } static lean_object* _init_l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_mkArrayGetLit___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Array_term_____x5b___x3a___x5d___closed__2; x_2 = l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_mkArrayGetLit___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_mkArrayGetLit(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: { lean_object* x_10; lean_object* x_11; lean_object* x_12; x_10 = l_Lean_mkNatLit(x_2); x_11 = l_Lean_mkNatLit(x_3); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_10); x_12 = l_Lean_Meta_mkLt(x_10, x_11, x_5, x_6, x_7, x_8, x_9); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_12, 1); lean_inc(x_14); lean_dec(x_12); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); x_15 = l_Lean_Meta_mkDecideProof(x_13, x_5, x_6, x_7, x_8, 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; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); x_17 = lean_ctor_get(x_15, 1); lean_inc(x_17); lean_dec(x_15); x_18 = l_Lean_Syntax_mkAntiquotNode___closed__3; x_19 = lean_array_push(x_18, x_1); x_20 = lean_array_push(x_19, x_10); x_21 = lean_array_push(x_20, x_4); x_22 = lean_array_push(x_21, x_16); x_23 = l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_mkArrayGetLit___closed__2; x_24 = l_Lean_Meta_mkAppM(x_23, x_22, x_5, x_6, x_7, x_8, x_17); return x_24; } else { uint8_t x_25; lean_dec(x_10); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); x_25 = !lean_is_exclusive(x_15); if (x_25 == 0) { return x_15; } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; x_26 = lean_ctor_get(x_15, 0); x_27 = lean_ctor_get(x_15, 1); lean_inc(x_27); lean_inc(x_26); lean_dec(x_15); x_28 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_28, 0, x_26); lean_ctor_set(x_28, 1, x_27); return x_28; } } } else { uint8_t x_29; lean_dec(x_10); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); x_29 = !lean_is_exclusive(x_12); if (x_29 == 0) { return x_12; } else { lean_object* x_30; lean_object* x_31; lean_object* x_32; x_30 = lean_ctor_get(x_12, 0); x_31 = lean_ctor_get(x_12, 1); lean_inc(x_31); lean_inc(x_30); lean_dec(x_12); x_32 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_32, 0, x_30); lean_ctor_set(x_32, 1, x_31); return x_32; } } } } lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_match__1___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_2(x_2, x_3, x_4); return x_5; } } lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_match__1___rarg), 2, 0); return x_2; } } lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___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_11; x_11 = l_Lean_Meta_getMVarType(x_1, x_6, x_7, x_8, x_9, x_10); if (lean_obj_tag(x_11) == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; uint8_t x_16; lean_object* x_17; x_12 = lean_ctor_get(x_11, 0); lean_inc(x_12); x_13 = lean_ctor_get(x_11, 1); lean_inc(x_13); lean_dec(x_11); x_14 = lean_array_push(x_2, x_5); x_15 = 0; x_16 = 1; x_17 = l_Lean_Meta_mkForallFVars(x_14, x_12, x_15, x_16, x_6, x_7, x_8, x_9, x_13); if (lean_obj_tag(x_17) == 0) { uint8_t x_18; x_18 = !lean_is_exclusive(x_17); if (x_18 == 0) { lean_object* x_19; lean_object* x_20; lean_object* x_21; x_19 = lean_ctor_get(x_17, 0); x_20 = lean_array_push(x_3, x_4); x_21 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_21, 0, x_19); lean_ctor_set(x_21, 1, x_20); lean_ctor_set(x_17, 0, x_21); return x_17; } else { lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; x_22 = lean_ctor_get(x_17, 0); x_23 = lean_ctor_get(x_17, 1); lean_inc(x_23); lean_inc(x_22); lean_dec(x_17); x_24 = lean_array_push(x_3, x_4); x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_22); lean_ctor_set(x_25, 1, x_24); x_26 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_23); return x_26; } } else { uint8_t x_27; lean_dec(x_4); lean_dec(x_3); x_27 = !lean_is_exclusive(x_17); if (x_27 == 0) { return x_17; } else { lean_object* x_28; lean_object* x_29; lean_object* x_30; x_28 = lean_ctor_get(x_17, 0); x_29 = lean_ctor_get(x_17, 1); lean_inc(x_29); lean_inc(x_28); lean_dec(x_17); x_30 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_30, 0, x_28); lean_ctor_set(x_30, 1, x_29); return x_30; } } } else { uint8_t x_31; lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_31 = !lean_is_exclusive(x_11); if (x_31 == 0) { return x_11; } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; x_32 = lean_ctor_get(x_11, 0); x_33 = lean_ctor_get(x_11, 1); lean_inc(x_33); lean_inc(x_32); lean_dec(x_11); x_34 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_34, 0, x_32); lean_ctor_set(x_34, 1, x_33); return x_34; } } } } lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { _start: { lean_object* x_17; lean_object* x_18; x_17 = lean_array_push(x_1, x_11); lean_inc(x_15); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_5); lean_inc(x_4); lean_inc(x_2); x_18 = l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_mkArrayGetLit(x_2, x_3, x_4, x_5, x_12, x_13, x_14, x_15, x_16); if (lean_obj_tag(x_18) == 0) { lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; 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_array_push(x_6, x_19); x_22 = l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop(x_7, x_2, x_4, x_8, x_5, x_9, x_10, x_17, x_21, x_12, x_13, x_14, x_15, x_20); return x_22; } else { uint8_t x_23; lean_dec(x_17); lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); 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_4); lean_dec(x_2); x_23 = !lean_is_exclusive(x_18); if (x_23 == 0) { return x_18; } else { lean_object* x_24; lean_object* x_25; lean_object* x_26; x_24 = lean_ctor_get(x_18, 0); x_25 = lean_ctor_get(x_18, 1); lean_inc(x_25); lean_inc(x_24); lean_dec(x_18); 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; } } } } static lean_object* _init_l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("toArrayLitEq"); return x_1; } } static lean_object* _init_l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Array_term_____x5b___x3a___x5d___closed__2; x_2 = l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } static lean_object* _init_l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("hEqALit"); return x_1; } } static lean_object* _init_l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); x_2 = l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__3; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop(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_15; x_15 = lean_nat_dec_lt(x_7, x_3); if (x_15 == 0) { lean_object* x_16; lean_object* x_17; lean_dec(x_7); lean_dec(x_4); lean_inc(x_8); x_16 = lean_array_to_list(lean_box(0), x_8); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); x_17 = l_Lean_Meta_mkArrayLit(x_6, x_16, x_10, x_11, x_12, x_13, x_14); if (lean_obj_tag(x_17) == 0) { lean_object* x_18; lean_object* x_19; lean_object* x_20; x_18 = lean_ctor_get(x_17, 0); lean_inc(x_18); x_19 = lean_ctor_get(x_17, 1); lean_inc(x_19); lean_dec(x_17); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_2); x_20 = l_Lean_Meta_mkEq(x_2, x_18, x_10, x_11, x_12, x_13, x_19); if (lean_obj_tag(x_20) == 0) { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; x_21 = lean_ctor_get(x_20, 0); lean_inc(x_21); x_22 = lean_ctor_get(x_20, 1); lean_inc(x_22); lean_dec(x_20); x_23 = l_Lean_mkNatLit(x_3); x_24 = l_Lean_Syntax_mkAntiquotNode___closed__9; x_25 = lean_array_push(x_24, x_2); x_26 = lean_array_push(x_25, x_23); x_27 = lean_array_push(x_26, x_5); x_28 = l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__2; lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); x_29 = l_Lean_Meta_mkAppM(x_28, x_27, x_10, x_11, x_12, x_13, x_22); if (lean_obj_tag(x_29) == 0) { lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; lean_object* x_35; x_30 = lean_ctor_get(x_29, 0); lean_inc(x_30); x_31 = lean_ctor_get(x_29, 1); lean_inc(x_31); lean_dec(x_29); x_32 = lean_alloc_closure((void*)(l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___lambda__1___boxed), 10, 4); lean_closure_set(x_32, 0, x_1); lean_closure_set(x_32, 1, x_8); lean_closure_set(x_32, 2, x_9); lean_closure_set(x_32, 3, x_30); x_33 = l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__4; x_34 = 0; x_35 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_substCore___spec__2___rarg(x_33, x_34, x_21, x_32, x_10, x_11, x_12, x_13, x_31); return x_35; } else { uint8_t x_36; lean_dec(x_21); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_1); x_36 = !lean_is_exclusive(x_29); if (x_36 == 0) { return x_29; } else { lean_object* x_37; lean_object* x_38; lean_object* x_39; x_37 = lean_ctor_get(x_29, 0); x_38 = lean_ctor_get(x_29, 1); lean_inc(x_38); lean_inc(x_37); lean_dec(x_29); x_39 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_39, 0, x_37); lean_ctor_set(x_39, 1, x_38); return x_39; } } } else { uint8_t x_40; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_40 = !lean_is_exclusive(x_20); if (x_40 == 0) { return x_20; } else { lean_object* x_41; lean_object* x_42; lean_object* x_43; x_41 = lean_ctor_get(x_20, 0); x_42 = lean_ctor_get(x_20, 1); lean_inc(x_42); lean_inc(x_41); lean_dec(x_20); x_43 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_43, 0, x_41); lean_ctor_set(x_43, 1, x_42); return x_43; } } } else { uint8_t x_44; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_44 = !lean_is_exclusive(x_17); if (x_44 == 0) { return x_17; } else { lean_object* x_45; lean_object* x_46; lean_object* x_47; x_45 = lean_ctor_get(x_17, 0); x_46 = lean_ctor_get(x_17, 1); lean_inc(x_46); lean_inc(x_45); lean_dec(x_17); x_47 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_47, 0, x_45); lean_ctor_set(x_47, 1, x_46); return x_47; } } } else { lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; uint8_t x_52; lean_object* x_53; x_48 = lean_unsigned_to_nat(1u); x_49 = lean_nat_add(x_7, x_48); lean_inc(x_49); lean_inc(x_4); x_50 = lean_name_append_index_after(x_4, x_49); lean_inc(x_6); x_51 = lean_alloc_closure((void*)(l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___lambda__2), 16, 10); lean_closure_set(x_51, 0, x_8); lean_closure_set(x_51, 1, x_2); lean_closure_set(x_51, 2, x_7); lean_closure_set(x_51, 3, x_3); lean_closure_set(x_51, 4, x_5); lean_closure_set(x_51, 5, x_9); lean_closure_set(x_51, 6, x_1); lean_closure_set(x_51, 7, x_4); lean_closure_set(x_51, 8, x_6); lean_closure_set(x_51, 9, x_49); x_52 = 0; x_53 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_substCore___spec__2___rarg(x_50, x_52, x_6, x_51, x_10, x_11, x_12, x_13, x_14); return x_53; } } } lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___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_11; x_11 = l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___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_9); lean_dec(x_8); lean_dec(x_7); return x_11; } } lean_object* l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit(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_11; lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_2); x_11 = l_Lean_Meta_getArrayArgType(x_2, x_6, x_7, x_8, x_9, x_10); if (lean_obj_tag(x_11) == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_12 = lean_ctor_get(x_11, 0); lean_inc(x_12); x_13 = lean_ctor_get(x_11, 1); lean_inc(x_13); lean_dec(x_11); x_14 = lean_unsigned_to_nat(0u); x_15 = l_Array_empty___closed__1; lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_1); x_16 = l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop(x_1, x_2, x_3, x_4, x_5, x_12, x_14, x_15, x_15, x_6, x_7, x_8, x_9, x_13); 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; x_17 = lean_ctor_get(x_16, 0); lean_inc(x_17); x_18 = lean_ctor_get(x_16, 1); lean_inc(x_18); lean_dec(x_16); x_19 = lean_ctor_get(x_17, 0); lean_inc(x_19); x_20 = lean_ctor_get(x_17, 1); lean_inc(x_20); lean_dec(x_17); lean_inc(x_1); x_21 = l_Lean_Meta_getMVarTag(x_1, x_6, x_7, x_8, x_9, x_18); if (lean_obj_tag(x_21) == 0) { lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; uint8_t x_29; x_22 = lean_ctor_get(x_21, 0); lean_inc(x_22); x_23 = lean_ctor_get(x_21, 1); lean_inc(x_23); lean_dec(x_21); lean_inc(x_6); x_24 = l_Lean_Meta_mkFreshExprSyntheticOpaqueMVar(x_19, x_22, x_6, x_7, x_8, x_9, x_23); x_25 = lean_ctor_get(x_24, 0); lean_inc(x_25); x_26 = lean_ctor_get(x_24, 1); lean_inc(x_26); lean_dec(x_24); lean_inc(x_25); x_27 = l_Lean_mkAppN(x_25, x_20); lean_dec(x_20); x_28 = l_Lean_Meta_assignExprMVar(x_1, x_27, x_6, x_7, x_8, x_9, x_26); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); x_29 = !lean_is_exclusive(x_28); if (x_29 == 0) { lean_object* x_30; lean_object* x_31; x_30 = lean_ctor_get(x_28, 0); lean_dec(x_30); x_31 = l_Lean_Expr_mvarId_x21(x_25); lean_dec(x_25); lean_ctor_set(x_28, 0, x_31); return x_28; } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; x_32 = lean_ctor_get(x_28, 1); lean_inc(x_32); lean_dec(x_28); x_33 = l_Lean_Expr_mvarId_x21(x_25); lean_dec(x_25); x_34 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_34, 0, x_33); lean_ctor_set(x_34, 1, x_32); return x_34; } } else { uint8_t x_35; lean_dec(x_20); lean_dec(x_19); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_1); x_35 = !lean_is_exclusive(x_21); if (x_35 == 0) { return x_21; } else { lean_object* x_36; lean_object* x_37; lean_object* x_38; x_36 = lean_ctor_get(x_21, 0); x_37 = lean_ctor_get(x_21, 1); lean_inc(x_37); lean_inc(x_36); lean_dec(x_21); x_38 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_38, 0, x_36); lean_ctor_set(x_38, 1, x_37); return x_38; } } } else { uint8_t x_39; lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_1); x_39 = !lean_is_exclusive(x_16); if (x_39 == 0) { return x_16; } else { lean_object* x_40; lean_object* x_41; lean_object* x_42; x_40 = lean_ctor_get(x_16, 0); x_41 = lean_ctor_get(x_16, 1); lean_inc(x_41); lean_inc(x_40); lean_dec(x_16); x_42 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_42, 0, x_40); lean_ctor_set(x_42, 1, x_41); return x_42; } } } else { uint8_t x_43; lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_43 = !lean_is_exclusive(x_11); if (x_43 == 0) { return x_11; } else { lean_object* x_44; lean_object* x_45; lean_object* x_46; x_44 = lean_ctor_get(x_11, 0); x_45 = lean_ctor_get(x_11, 1); lean_inc(x_45); lean_inc(x_44); lean_dec(x_11); 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_object* l_Lean_Meta_caseArraySizes_match__1___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_2(x_2, x_3, x_4); return x_5; } } lean_object* l_Lean_Meta_caseArraySizes_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Meta_caseArraySizes_match__1___rarg), 2, 0); return x_2; } } lean_object* l_Lean_Meta_caseArraySizes_match__2___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_2(x_2, x_3, x_4); return x_5; } } lean_object* l_Lean_Meta_caseArraySizes_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Meta_caseArraySizes_match__2___rarg), 2, 0); return x_2; } } lean_object* l_Lean_Meta_caseArraySizes_match__3___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_2(x_2, x_3, x_4); return x_5; } } lean_object* l_Lean_Meta_caseArraySizes_match__3(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Meta_caseArraySizes_match__3___rarg), 2, 0); return x_2; } } lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_caseArraySizes___spec__1(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; size_t x_11; size_t x_12; lean_object* x_13; lean_object* x_14; 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 = l_Lean_mkNatLit(x_9); x_11 = 1; x_12 = x_2 + x_11; x_13 = x_10; x_14 = lean_array_uset(x_8, x_2, x_13); x_2 = x_12; x_3 = x_14; goto _start; } } } lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_caseArraySizes___spec__2(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; 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; lean_object* x_12; size_t x_13; size_t x_14; lean_object* x_15; lean_object* x_16; 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; x_11 = l_Lean_Meta_FVarSubst_get(x_1, x_10); x_12 = l_Lean_Expr_fvarId_x21(x_11); lean_dec(x_11); x_13 = 1; x_14 = x_3 + x_13; x_15 = x_12; x_16 = lean_array_uset(x_9, x_3, x_15); x_3 = x_14; x_4 = x_16; goto _start; } } } lean_object* l_Array_mapIdxM_map___at_Lean_Meta_caseArraySizes___spec__3___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) { _start: { lean_object* x_13; lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_3); x_13 = l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit(x_1, x_2, x_3, x_4, x_7, x_8, x_9, x_10, x_11, x_12); if (lean_obj_tag(x_13) == 0) { lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; lean_object* x_18; 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_box(0); x_17 = 0; lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); x_18 = l_Lean_Meta_introNCore(x_14, x_3, x_16, x_17, x_17, x_8, x_9, x_10, x_11, x_15); if (lean_obj_tag(x_18) == 0) { lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; 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_ctor_get(x_19, 0); lean_inc(x_21); x_22 = lean_ctor_get(x_19, 1); lean_inc(x_22); lean_dec(x_19); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); x_23 = l_Lean_Meta_intro1Core(x_22, x_17, x_8, x_9, x_10, x_11, x_20); if (lean_obj_tag(x_23) == 0) { lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; x_24 = lean_ctor_get(x_23, 0); lean_inc(x_24); x_25 = lean_ctor_get(x_23, 1); lean_inc(x_25); lean_dec(x_23); x_26 = lean_ctor_get(x_24, 0); lean_inc(x_26); x_27 = lean_ctor_get(x_24, 1); lean_inc(x_27); lean_dec(x_24); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); x_28 = l_Lean_Meta_clear(x_27, x_5, x_8, x_9, x_10, x_11, x_25); if (lean_obj_tag(x_28) == 0) { lean_object* x_29; lean_object* x_30; uint8_t x_31; lean_object* x_32; x_29 = lean_ctor_get(x_28, 0); lean_inc(x_29); x_30 = lean_ctor_get(x_28, 1); lean_inc(x_30); lean_dec(x_28); x_31 = 1; x_32 = l_Lean_Meta_substCore(x_29, x_26, x_17, x_6, x_31, x_17, x_8, x_9, x_10, x_11, x_30); if (lean_obj_tag(x_32) == 0) { uint8_t x_33; x_33 = !lean_is_exclusive(x_32); if (x_33 == 0) { lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; x_34 = lean_ctor_get(x_32, 0); x_35 = lean_ctor_get(x_34, 0); lean_inc(x_35); x_36 = lean_ctor_get(x_34, 1); lean_inc(x_36); lean_dec(x_34); x_37 = l_Array_empty___closed__1; x_38 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_38, 0, x_36); lean_ctor_set(x_38, 1, x_21); lean_ctor_set(x_38, 2, x_37); lean_ctor_set(x_38, 3, x_35); lean_ctor_set(x_32, 0, x_38); return x_32; } else { lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; x_39 = lean_ctor_get(x_32, 0); x_40 = lean_ctor_get(x_32, 1); lean_inc(x_40); lean_inc(x_39); lean_dec(x_32); x_41 = lean_ctor_get(x_39, 0); lean_inc(x_41); x_42 = lean_ctor_get(x_39, 1); lean_inc(x_42); lean_dec(x_39); x_43 = l_Array_empty___closed__1; x_44 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_44, 0, x_42); lean_ctor_set(x_44, 1, x_21); lean_ctor_set(x_44, 2, x_43); lean_ctor_set(x_44, 3, x_41); x_45 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_45, 0, x_44); lean_ctor_set(x_45, 1, x_40); return x_45; } } else { uint8_t x_46; lean_dec(x_21); x_46 = !lean_is_exclusive(x_32); if (x_46 == 0) { return x_32; } else { lean_object* x_47; lean_object* x_48; lean_object* x_49; x_47 = lean_ctor_get(x_32, 0); x_48 = lean_ctor_get(x_32, 1); lean_inc(x_48); lean_inc(x_47); lean_dec(x_32); 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; } } } else { uint8_t x_50; lean_dec(x_26); lean_dec(x_21); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_6); x_50 = !lean_is_exclusive(x_28); if (x_50 == 0) { return x_28; } else { lean_object* x_51; lean_object* x_52; lean_object* x_53; x_51 = lean_ctor_get(x_28, 0); x_52 = lean_ctor_get(x_28, 1); lean_inc(x_52); lean_inc(x_51); lean_dec(x_28); x_53 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_53, 0, x_51); lean_ctor_set(x_53, 1, x_52); return x_53; } } } else { uint8_t x_54; lean_dec(x_21); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); x_54 = !lean_is_exclusive(x_23); if (x_54 == 0) { return x_23; } else { lean_object* x_55; lean_object* x_56; lean_object* x_57; x_55 = lean_ctor_get(x_23, 0); x_56 = lean_ctor_get(x_23, 1); lean_inc(x_56); lean_inc(x_55); lean_dec(x_23); x_57 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_57, 0, x_55); lean_ctor_set(x_57, 1, x_56); return x_57; } } } else { uint8_t x_58; lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); x_58 = !lean_is_exclusive(x_18); if (x_58 == 0) { return x_18; } else { lean_object* x_59; lean_object* x_60; lean_object* x_61; x_59 = lean_ctor_get(x_18, 0); x_60 = lean_ctor_get(x_18, 1); lean_inc(x_60); lean_inc(x_59); lean_dec(x_18); 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 { uint8_t x_62; lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); x_62 = !lean_is_exclusive(x_13); if (x_62 == 0) { return x_13; } else { lean_object* x_63; lean_object* x_64; lean_object* x_65; x_63 = lean_ctor_get(x_13, 0); x_64 = lean_ctor_get(x_13, 1); lean_inc(x_64); lean_inc(x_63); lean_dec(x_13); x_65 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_65, 0, x_63); lean_ctor_set(x_65, 1, x_64); return x_65; } } } } lean_object* l_Array_mapIdxM_map___at_Lean_Meta_caseArraySizes___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, size_t x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16, lean_object* x_17, lean_object* x_18) { _start: { lean_object* x_19; uint8_t x_20; x_19 = lean_unsigned_to_nat(0u); x_20 = lean_nat_dec_eq(x_10, x_19); if (x_20 == 0) { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; x_21 = lean_unsigned_to_nat(1u); x_22 = lean_nat_sub(x_10, x_21); lean_dec(x_10); x_23 = lean_array_fget(x_9, x_11); x_24 = lean_ctor_get(x_23, 2); lean_inc(x_24); x_25 = lean_ctor_get(x_23, 0); lean_inc(x_25); lean_inc(x_5); x_26 = l_Lean_Meta_FVarSubst_get(x_24, x_5); x_27 = l_Lean_Expr_fvarId_x21(x_26); lean_dec(x_26); x_28 = lean_nat_dec_lt(x_11, x_6); if (x_28 == 0) { uint8_t x_29; uint8_t x_30; lean_object* x_31; lean_dec(x_27); x_29 = 0; x_30 = 1; lean_inc(x_17); lean_inc(x_16); lean_inc(x_15); lean_inc(x_14); lean_inc(x_5); x_31 = l_Lean_Meta_substCore(x_25, x_5, x_29, x_24, x_30, x_29, x_14, x_15, x_16, x_17, x_18); if (lean_obj_tag(x_31) == 0) { lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; size_t x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; x_32 = lean_ctor_get(x_31, 0); lean_inc(x_32); x_33 = lean_ctor_get(x_31, 1); lean_inc(x_33); lean_dec(x_31); x_34 = lean_ctor_get(x_32, 0); lean_inc(x_34); x_35 = lean_ctor_get(x_32, 1); lean_inc(x_35); lean_dec(x_32); x_36 = lean_ctor_get(x_23, 1); lean_inc(x_36); lean_dec(x_23); x_37 = lean_array_get_size(x_36); x_38 = lean_usize_of_nat(x_37); lean_dec(x_37); x_39 = x_36; x_40 = l_Array_mapMUnsafe_map___at_Lean_Meta_caseArraySizes___spec__2(x_34, x_38, x_7, x_39); x_41 = x_40; x_42 = l_Array_empty___closed__1; x_43 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_43, 0, x_35); lean_ctor_set(x_43, 1, x_42); lean_ctor_set(x_43, 2, x_41); lean_ctor_set(x_43, 3, x_34); x_44 = lean_nat_add(x_11, x_21); lean_dec(x_11); x_45 = lean_array_push(x_13, x_43); x_10 = x_22; x_11 = x_44; x_12 = lean_box(0); x_13 = x_45; x_18 = x_33; goto _start; } else { uint8_t x_47; lean_dec(x_23); lean_dec(x_22); lean_dec(x_17); lean_dec(x_16); lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_11); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_47 = !lean_is_exclusive(x_31); if (x_47 == 0) { return x_31; } else { lean_object* x_48; lean_object* x_49; lean_object* x_50; x_48 = lean_ctor_get(x_31, 0); x_49 = lean_ctor_get(x_31, 1); lean_inc(x_49); lean_inc(x_48); lean_dec(x_31); x_50 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_50, 0, x_48); lean_ctor_set(x_50, 1, x_49); return x_50; } } } else { lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; x_51 = lean_array_fget(x_1, x_11); x_52 = lean_ctor_get(x_23, 1); lean_inc(x_52); lean_dec(x_23); x_53 = l_Lean_instInhabitedName; x_54 = lean_array_get(x_53, x_52, x_19); lean_dec(x_52); lean_inc(x_17); lean_inc(x_16); lean_inc(x_15); lean_inc(x_14); x_55 = l_Lean_Meta_clear(x_25, x_54, x_14, x_15, x_16, x_17, x_18); if (lean_obj_tag(x_55) == 0) { lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; x_56 = lean_ctor_get(x_55, 0); lean_inc(x_56); x_57 = lean_ctor_get(x_55, 1); lean_inc(x_57); lean_dec(x_55); lean_inc(x_4); x_58 = l_Lean_Meta_FVarSubst_get(x_24, x_4); x_59 = l_Lean_Expr_fvarId_x21(x_58); lean_dec(x_58); lean_inc(x_17); lean_inc(x_16); lean_inc(x_15); lean_inc(x_14); x_60 = l_Lean_Meta_clear(x_56, x_59, x_14, x_15, x_16, x_17, x_57); if (lean_obj_tag(x_60) == 0) { lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; x_61 = lean_ctor_get(x_60, 0); lean_inc(x_61); x_62 = lean_ctor_get(x_60, 1); lean_inc(x_62); lean_dec(x_60); lean_inc(x_27); x_63 = l_Lean_mkFVar(x_27); x_64 = lean_alloc_closure((void*)(l_Lean_Meta_mkEqSymm), 6, 1); lean_closure_set(x_64, 0, x_63); lean_inc(x_2); lean_inc(x_3); lean_inc(x_61); x_65 = lean_alloc_closure((void*)(l_Array_mapIdxM_map___at_Lean_Meta_caseArraySizes___spec__3___lambda__1), 12, 6); lean_closure_set(x_65, 0, x_61); lean_closure_set(x_65, 1, x_3); lean_closure_set(x_65, 2, x_51); lean_closure_set(x_65, 3, x_2); lean_closure_set(x_65, 4, x_27); lean_closure_set(x_65, 5, x_24); x_66 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg), 7, 2); lean_closure_set(x_66, 0, x_64); lean_closure_set(x_66, 1, x_65); lean_inc(x_17); lean_inc(x_16); lean_inc(x_15); lean_inc(x_14); x_67 = l_Lean_Meta_withMVarContext___at_Lean_Meta_admit___spec__1___rarg(x_61, x_66, x_14, x_15, x_16, x_17, x_62); if (lean_obj_tag(x_67) == 0) { lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; x_68 = lean_ctor_get(x_67, 0); lean_inc(x_68); x_69 = lean_ctor_get(x_67, 1); lean_inc(x_69); lean_dec(x_67); x_70 = lean_nat_add(x_11, x_21); lean_dec(x_11); x_71 = lean_array_push(x_13, x_68); x_10 = x_22; x_11 = x_70; x_12 = lean_box(0); x_13 = x_71; x_18 = x_69; goto _start; } else { uint8_t x_73; lean_dec(x_22); lean_dec(x_17); lean_dec(x_16); lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_11); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_73 = !lean_is_exclusive(x_67); if (x_73 == 0) { return x_67; } else { lean_object* x_74; lean_object* x_75; lean_object* x_76; x_74 = lean_ctor_get(x_67, 0); x_75 = lean_ctor_get(x_67, 1); lean_inc(x_75); lean_inc(x_74); lean_dec(x_67); x_76 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_76, 0, x_74); lean_ctor_set(x_76, 1, x_75); return x_76; } } } else { uint8_t x_77; lean_dec(x_51); lean_dec(x_27); lean_dec(x_24); lean_dec(x_22); lean_dec(x_17); lean_dec(x_16); lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_11); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_77 = !lean_is_exclusive(x_60); if (x_77 == 0) { return x_60; } else { lean_object* x_78; lean_object* x_79; lean_object* x_80; x_78 = lean_ctor_get(x_60, 0); x_79 = lean_ctor_get(x_60, 1); lean_inc(x_79); lean_inc(x_78); lean_dec(x_60); x_80 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_80, 0, x_78); lean_ctor_set(x_80, 1, x_79); return x_80; } } } else { uint8_t x_81; lean_dec(x_51); lean_dec(x_27); lean_dec(x_24); lean_dec(x_22); lean_dec(x_17); lean_dec(x_16); lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_11); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_81 = !lean_is_exclusive(x_55); if (x_81 == 0) { return x_55; } else { lean_object* x_82; lean_object* x_83; lean_object* x_84; x_82 = lean_ctor_get(x_55, 0); x_83 = lean_ctor_get(x_55, 1); lean_inc(x_83); lean_inc(x_82); lean_dec(x_55); x_84 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_84, 0, x_82); lean_ctor_set(x_84, 1, x_83); return x_84; } } } } else { lean_object* x_85; lean_dec(x_17); lean_dec(x_16); lean_dec(x_15); lean_dec(x_14); lean_dec(x_11); lean_dec(x_10); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_85 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_85, 0, x_13); lean_ctor_set(x_85, 1, x_18); return x_85; } } } static lean_object* _init_l_Lean_Meta_caseArraySizes___lambda__1___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Array_term_____x5b___x3a___x5d___closed__2; x_2 = l_Array_myMacro____x40_Init_Data_Array_Subarray___hyg_969____closed__10; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } static lean_object* _init_l_Lean_Meta_caseArraySizes___lambda__1___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("aSize"); return x_1; } } static lean_object* _init_l_Lean_Meta_caseArraySizes___lambda__1___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); x_2 = l_Lean_Meta_caseArraySizes___lambda__1___closed__2; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } lean_object* l_Lean_Meta_caseArraySizes___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) { _start: { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_12 = l_Lean_mkOptionalNode___closed__2; lean_inc(x_1); x_13 = lean_array_push(x_12, x_1); x_14 = l_Lean_Meta_caseArraySizes___lambda__1___closed__1; lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); x_15 = l_Lean_Meta_mkAppM(x_14, x_13, x_7, x_8, x_9, x_10, x_11); if (lean_obj_tag(x_15) == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); x_17 = lean_ctor_get(x_15, 1); lean_inc(x_17); lean_dec(x_15); x_18 = l_Lean_Meta_caseArraySizes___lambda__1___closed__3; x_19 = l_Lean_Literal_type___closed__3; x_20 = l_Lean_Meta_caseValue___closed__2; lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); x_21 = l_Lean_Meta_assertExt(x_2, x_18, x_19, x_16, x_20, x_7, x_8, x_9, x_10, x_17); if (lean_obj_tag(x_21) == 0) { lean_object* x_22; lean_object* x_23; uint8_t x_24; lean_object* x_25; x_22 = lean_ctor_get(x_21, 0); lean_inc(x_22); x_23 = lean_ctor_get(x_21, 1); lean_inc(x_23); lean_dec(x_21); x_24 = 0; lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); x_25 = l_Lean_Meta_intro1Core(x_22, x_24, x_7, x_8, x_9, x_10, x_23); if (lean_obj_tag(x_25) == 0) { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; x_26 = lean_ctor_get(x_25, 0); lean_inc(x_26); x_27 = lean_ctor_get(x_25, 1); lean_inc(x_27); lean_dec(x_25); x_28 = lean_ctor_get(x_26, 0); lean_inc(x_28); x_29 = lean_ctor_get(x_26, 1); lean_inc(x_29); lean_dec(x_26); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); x_30 = l_Lean_Meta_intro1Core(x_29, x_24, x_7, x_8, x_9, x_10, x_27); if (lean_obj_tag(x_30) == 0) { lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; size_t x_36; size_t x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; x_31 = lean_ctor_get(x_30, 0); lean_inc(x_31); x_32 = lean_ctor_get(x_30, 1); lean_inc(x_32); lean_dec(x_30); x_33 = lean_ctor_get(x_31, 0); lean_inc(x_33); x_34 = lean_ctor_get(x_31, 1); lean_inc(x_34); lean_dec(x_31); x_35 = lean_array_get_size(x_3); x_36 = lean_usize_of_nat(x_35); x_37 = 0; lean_inc(x_3); x_38 = x_3; x_39 = l_Array_mapMUnsafe_map___at_Lean_Meta_caseArraySizes___spec__1(x_36, x_37, x_38); x_40 = x_39; lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_28); x_41 = l_Lean_Meta_caseValues(x_34, x_28, x_40, x_4, x_7, x_8, x_9, x_10, x_32); if (lean_obj_tag(x_41) == 0) { lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; x_42 = lean_ctor_get(x_41, 0); lean_inc(x_42); x_43 = lean_ctor_get(x_41, 1); lean_inc(x_43); lean_dec(x_41); x_44 = lean_array_get_size(x_42); x_45 = lean_mk_empty_array_with_capacity(x_44); x_46 = lean_unsigned_to_nat(0u); x_47 = l_Array_mapIdxM_map___at_Lean_Meta_caseArraySizes___spec__3(x_3, x_5, x_1, x_28, x_33, x_35, x_37, x_42, x_42, x_44, x_46, lean_box(0), x_45, x_7, x_8, x_9, x_10, x_43); lean_dec(x_42); lean_dec(x_35); lean_dec(x_3); return x_47; } else { uint8_t x_48; lean_dec(x_35); lean_dec(x_33); lean_dec(x_28); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_5); lean_dec(x_3); lean_dec(x_1); x_48 = !lean_is_exclusive(x_41); if (x_48 == 0) { return x_41; } else { lean_object* x_49; lean_object* x_50; lean_object* x_51; x_49 = lean_ctor_get(x_41, 0); x_50 = lean_ctor_get(x_41, 1); lean_inc(x_50); lean_inc(x_49); lean_dec(x_41); x_51 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_51, 0, x_49); lean_ctor_set(x_51, 1, x_50); return x_51; } } } else { uint8_t x_52; lean_dec(x_28); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); x_52 = !lean_is_exclusive(x_30); if (x_52 == 0) { return x_30; } else { lean_object* x_53; lean_object* x_54; lean_object* x_55; x_53 = lean_ctor_get(x_30, 0); x_54 = lean_ctor_get(x_30, 1); lean_inc(x_54); lean_inc(x_53); lean_dec(x_30); x_55 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_55, 0, x_53); lean_ctor_set(x_55, 1, x_54); return x_55; } } } else { uint8_t x_56; lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); x_56 = !lean_is_exclusive(x_25); if (x_56 == 0) { return x_25; } else { lean_object* x_57; lean_object* x_58; lean_object* x_59; x_57 = lean_ctor_get(x_25, 0); x_58 = lean_ctor_get(x_25, 1); lean_inc(x_58); lean_inc(x_57); lean_dec(x_25); x_59 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_59, 0, x_57); lean_ctor_set(x_59, 1, x_58); return x_59; } } } else { uint8_t x_60; lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); x_60 = !lean_is_exclusive(x_21); if (x_60 == 0) { return x_21; } else { lean_object* x_61; lean_object* x_62; lean_object* x_63; x_61 = lean_ctor_get(x_21, 0); x_62 = lean_ctor_get(x_21, 1); lean_inc(x_62); lean_inc(x_61); lean_dec(x_21); x_63 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_63, 0, x_61); lean_ctor_set(x_63, 1, x_62); return x_63; } } } else { uint8_t x_64; lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_64 = !lean_is_exclusive(x_15); if (x_64 == 0) { return x_15; } else { lean_object* x_65; lean_object* x_66; lean_object* x_67; x_65 = lean_ctor_get(x_15, 0); x_66 = lean_ctor_get(x_15, 1); lean_inc(x_66); lean_inc(x_65); lean_dec(x_15); x_67 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_67, 0, x_65); lean_ctor_set(x_67, 1, x_66); return x_67; } } } } lean_object* l_Lean_Meta_caseArraySizes(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_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_11 = l_Lean_mkFVar(x_2); lean_inc(x_11); x_12 = lean_alloc_closure((void*)(l_Lean_Meta_getArrayArgType), 6, 1); lean_closure_set(x_12, 0, x_11); lean_inc(x_1); x_13 = lean_alloc_closure((void*)(l_Lean_Meta_caseArraySizes___lambda__1___boxed), 11, 5); lean_closure_set(x_13, 0, x_11); lean_closure_set(x_13, 1, x_1); lean_closure_set(x_13, 2, x_3); lean_closure_set(x_13, 3, x_5); lean_closure_set(x_13, 4, x_4); x_14 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg), 7, 2); lean_closure_set(x_14, 0, x_12); lean_closure_set(x_14, 1, x_13); x_15 = l_Lean_Meta_withMVarContext___at_Lean_Meta_admit___spec__1___rarg(x_1, x_14, x_6, x_7, x_8, x_9, x_10); return x_15; } } lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_caseArraySizes___spec__1___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_Meta_caseArraySizes___spec__1(x_4, x_5, x_3); return x_6; } } lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_caseArraySizes___spec__2___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_Meta_caseArraySizes___spec__2(x_1, x_5, x_6, x_4); lean_dec(x_1); return x_7; } } lean_object* l_Array_mapIdxM_map___at_Lean_Meta_caseArraySizes___spec__3___boxed(lean_object** _args) { lean_object* x_1 = _args[0]; lean_object* x_2 = _args[1]; lean_object* x_3 = _args[2]; lean_object* x_4 = _args[3]; lean_object* x_5 = _args[4]; lean_object* x_6 = _args[5]; lean_object* x_7 = _args[6]; lean_object* x_8 = _args[7]; lean_object* x_9 = _args[8]; lean_object* x_10 = _args[9]; lean_object* x_11 = _args[10]; lean_object* x_12 = _args[11]; lean_object* x_13 = _args[12]; lean_object* x_14 = _args[13]; lean_object* x_15 = _args[14]; lean_object* x_16 = _args[15]; lean_object* x_17 = _args[16]; lean_object* x_18 = _args[17]; _start: { size_t x_19; lean_object* x_20; x_19 = lean_unbox_usize(x_7); lean_dec(x_7); x_20 = l_Array_mapIdxM_map___at_Lean_Meta_caseArraySizes___spec__3(x_1, x_2, x_3, x_4, x_5, x_6, x_19, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_17, x_18); lean_dec(x_9); lean_dec(x_8); lean_dec(x_6); lean_dec(x_1); return x_20; } } lean_object* l_Lean_Meta_caseArraySizes___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) { _start: { lean_object* x_12; x_12 = l_Lean_Meta_caseArraySizes___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_6); return x_12; } } lean_object* initialize_Init(lean_object*); lean_object* initialize_Lean_Meta_Tactic_Assert(lean_object*); lean_object* initialize_Lean_Meta_Match_CaseValues(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Meta_Match_CaseArraySizes(lean_object* w) { lean_object * res; if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); _G_initialized = true; res = initialize_Init(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Meta_Tactic_Assert(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Meta_Match_CaseValues(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_Meta_CaseArraySizesSubgoal_elems___default = _init_l_Lean_Meta_CaseArraySizesSubgoal_elems___default(); lean_mark_persistent(l_Lean_Meta_CaseArraySizesSubgoal_elems___default); l_Lean_Meta_CaseArraySizesSubgoal_diseqs___default = _init_l_Lean_Meta_CaseArraySizesSubgoal_diseqs___default(); lean_mark_persistent(l_Lean_Meta_CaseArraySizesSubgoal_diseqs___default); l_Lean_Meta_CaseArraySizesSubgoal_subst___default = _init_l_Lean_Meta_CaseArraySizesSubgoal_subst___default(); lean_mark_persistent(l_Lean_Meta_CaseArraySizesSubgoal_subst___default); l_Lean_Meta_instInhabitedCaseArraySizesSubgoal___closed__1 = _init_l_Lean_Meta_instInhabitedCaseArraySizesSubgoal___closed__1(); lean_mark_persistent(l_Lean_Meta_instInhabitedCaseArraySizesSubgoal___closed__1); l_Lean_Meta_instInhabitedCaseArraySizesSubgoal = _init_l_Lean_Meta_instInhabitedCaseArraySizesSubgoal(); lean_mark_persistent(l_Lean_Meta_instInhabitedCaseArraySizesSubgoal); l_Lean_Meta_getArrayArgType___closed__1 = _init_l_Lean_Meta_getArrayArgType___closed__1(); lean_mark_persistent(l_Lean_Meta_getArrayArgType___closed__1); l_Lean_Meta_getArrayArgType___closed__2 = _init_l_Lean_Meta_getArrayArgType___closed__2(); lean_mark_persistent(l_Lean_Meta_getArrayArgType___closed__2); l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_mkArrayGetLit___closed__1 = _init_l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_mkArrayGetLit___closed__1(); lean_mark_persistent(l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_mkArrayGetLit___closed__1); l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_mkArrayGetLit___closed__2 = _init_l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_mkArrayGetLit___closed__2(); lean_mark_persistent(l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_mkArrayGetLit___closed__2); l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__1 = _init_l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__1(); lean_mark_persistent(l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__1); l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__2 = _init_l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__2(); lean_mark_persistent(l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__2); l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__3 = _init_l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__3(); lean_mark_persistent(l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__3); l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__4 = _init_l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__4(); lean_mark_persistent(l___private_Lean_Meta_Match_CaseArraySizes_0__Lean_Meta_introArrayLit_loop___closed__4); l_Lean_Meta_caseArraySizes___lambda__1___closed__1 = _init_l_Lean_Meta_caseArraySizes___lambda__1___closed__1(); lean_mark_persistent(l_Lean_Meta_caseArraySizes___lambda__1___closed__1); l_Lean_Meta_caseArraySizes___lambda__1___closed__2 = _init_l_Lean_Meta_caseArraySizes___lambda__1___closed__2(); lean_mark_persistent(l_Lean_Meta_caseArraySizes___lambda__1___closed__2); l_Lean_Meta_caseArraySizes___lambda__1___closed__3 = _init_l_Lean_Meta_caseArraySizes___lambda__1___closed__3(); lean_mark_persistent(l_Lean_Meta_caseArraySizes___lambda__1___closed__3); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus } #endif
ChrisHughes24/lean4
stage0/stdlib/Lean/Elab/GenInjective.c
// Lean compiler output // Module: Lean.Elab.GenInjective // Imports: Init Lean.Elab.Command Lean.Meta.Injective #include <lean/lean.h> #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wunused-label" #elif defined(__GNUC__) && !defined(__CLANG__) #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif #ifdef __cplusplus extern "C" { #endif lean_object* l_Lean_Elab_Command_elabGenInjectiveTheorems___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_liftTermElabM___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_toString___at_Lean_resolveGlobalConstNoOverload___spec__2(lean_object*); extern lean_object* l_Lean_Elab_Command_commandElabAttribute; lean_object* l_Lean_Elab_Command_elabGenInjectiveTheorems___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkInjectiveTheorems(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedParserDescr___closed__1; lean_object* lean_string_append(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabGenInjectiveTheorems___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__2; lean_object* l_List_map___at_Lean_resolveGlobalConstNoOverload___spec__1(lean_object*, lean_object*); lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__4(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_Elab_Command_elabCommand___spec__21(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Command_elabGenInjectiveTheorems___closed__1; lean_object* l_Lean_Syntax_getId(lean_object*); lean_object* l_Lean_throwError___at_Lean_Elab_Command_elabExport___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_filterAux___at_Lean_resolveGlobalConst___spec__1(lean_object*, lean_object*); lean_object* lean_expr_dbg_to_string(lean_object*); extern lean_object* l_Lean_Parser_Command_genInjectiveTheorems___elambda__1___closed__2; lean_object* l_Lean_ResolveName_resolveGlobalName(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_KernelException_toMessageData___closed__3; extern lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__1; extern lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__2; lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_resolveGlobalConst___at_Lean_registerInitAttrUnsafe___spec__4___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_List_isEmpty___rarg(lean_object*); lean_object* l_Lean_Elab_Command_getScope___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabGenInjectiveTheorems(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkConst(lean_object*, lean_object*); lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Command_elabGenInjectiveTheorems(lean_object*); lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; 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; uint8_t x_14; x_5 = lean_st_ref_get(x_3, x_4); x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = lean_ctor_get(x_6, 0); lean_inc(x_8); lean_dec(x_6); x_9 = l_Lean_Elab_Command_getScope___rarg(x_3, 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_10, 2); lean_inc(x_12); lean_dec(x_10); x_13 = l_Lean_Elab_Command_getScope___rarg(x_3, x_11); x_14 = !lean_is_exclusive(x_13); if (x_14 == 0) { lean_object* x_15; lean_object* x_16; lean_object* x_17; x_15 = lean_ctor_get(x_13, 0); x_16 = lean_ctor_get(x_15, 3); lean_inc(x_16); lean_dec(x_15); x_17 = l_Lean_ResolveName_resolveGlobalName(x_8, x_12, x_16, x_1); lean_dec(x_12); lean_ctor_set(x_13, 0, x_17); return x_13; } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; x_18 = lean_ctor_get(x_13, 0); x_19 = lean_ctor_get(x_13, 1); lean_inc(x_19); lean_inc(x_18); lean_dec(x_13); x_20 = lean_ctor_get(x_18, 3); lean_inc(x_20); lean_dec(x_18); x_21 = l_Lean_ResolveName_resolveGlobalName(x_8, x_12, x_20, x_1); lean_dec(x_12); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_21); lean_ctor_set(x_22, 1, x_19); return x_22; } } } lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; x_5 = lean_box(0); x_6 = l_Lean_mkConst(x_1, x_5); x_7 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_7, 0, x_6); x_8 = l_Lean_throwUnknownConstant___rarg___closed__2; x_9 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_9, 0, x_8); lean_ctor_set(x_9, 1, x_7); x_10 = l_Lean_KernelException_toMessageData___closed__3; x_11 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_11, 0, x_9); lean_ctor_set(x_11, 1, x_10); x_12 = l_Lean_throwError___at_Lean_Elab_Command_elabCommand___spec__21(x_11, x_2, x_3, x_4); return x_12; } } lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; lean_inc(x_1); x_5 = l_Lean_resolveGlobalName___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__3(x_1, x_2, x_3, x_4); x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = lean_box(0); x_9 = l_List_filterAux___at_Lean_resolveGlobalConst___spec__1(x_6, x_8); x_10 = l_List_isEmpty___rarg(x_9); if (x_10 == 0) { lean_object* x_11; lean_object* x_12; lean_dec(x_1); x_11 = lean_box(0); x_12 = l_Lean_resolveGlobalConst___at_Lean_registerInitAttrUnsafe___spec__4___lambda__1(x_9, x_11, x_2, x_3, x_7); lean_dec(x_2); return x_12; } else { lean_object* x_13; uint8_t x_14; lean_dec(x_9); x_13 = l_Lean_throwUnknownConstant___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__4(x_1, x_2, x_3, x_7); x_14 = !lean_is_exclusive(x_13); if (x_14 == 0) { return x_13; } else { lean_object* x_15; lean_object* x_16; lean_object* x_17; x_15 = lean_ctor_get(x_13, 0); x_16 = lean_ctor_get(x_13, 1); lean_inc(x_16); lean_inc(x_15); lean_dec(x_13); x_17 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_17, 0, x_15); lean_ctor_set(x_17, 1, x_16); return x_17; } } } } lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_inc(x_2); lean_inc(x_1); x_5 = l_Lean_resolveGlobalConst___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__2(x_1, x_2, x_3, x_4); if (lean_obj_tag(x_5) == 0) { lean_object* x_6; x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); 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; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = lean_box(0); x_9 = l_Lean_mkConst(x_1, x_8); x_10 = lean_expr_dbg_to_string(x_9); lean_dec(x_9); x_11 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__1; x_12 = lean_string_append(x_11, x_10); lean_dec(x_10); x_13 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__2; x_14 = lean_string_append(x_12, x_13); x_15 = l_List_map___at_Lean_resolveGlobalConstNoOverload___spec__1(x_8, x_6); x_16 = l_List_toString___at_Lean_resolveGlobalConstNoOverload___spec__2(x_15); x_17 = lean_string_append(x_14, x_16); lean_dec(x_16); x_18 = l_Lean_instInhabitedParserDescr___closed__1; x_19 = lean_string_append(x_17, x_18); x_20 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_20, 0, x_19); x_21 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_21, 0, x_20); x_22 = l_Lean_throwError___at_Lean_Elab_Command_elabExport___spec__2(x_21, x_2, x_3, x_7); return x_22; } else { lean_object* x_23; x_23 = lean_ctor_get(x_6, 1); lean_inc(x_23); if (lean_obj_tag(x_23) == 0) { uint8_t x_24; lean_dec(x_2); lean_dec(x_1); x_24 = !lean_is_exclusive(x_5); if (x_24 == 0) { lean_object* x_25; lean_object* x_26; x_25 = lean_ctor_get(x_5, 0); lean_dec(x_25); x_26 = lean_ctor_get(x_6, 0); lean_inc(x_26); lean_dec(x_6); lean_ctor_set(x_5, 0, x_26); return x_5; } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; x_27 = lean_ctor_get(x_5, 1); lean_inc(x_27); lean_dec(x_5); x_28 = lean_ctor_get(x_6, 0); lean_inc(x_28); lean_dec(x_6); x_29 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_29, 0, x_28); lean_ctor_set(x_29, 1, x_27); return x_29; } } 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; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_dec(x_23); x_30 = lean_ctor_get(x_5, 1); lean_inc(x_30); lean_dec(x_5); x_31 = lean_box(0); x_32 = l_Lean_mkConst(x_1, x_31); x_33 = lean_expr_dbg_to_string(x_32); lean_dec(x_32); x_34 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__1; x_35 = lean_string_append(x_34, x_33); lean_dec(x_33); x_36 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__2; x_37 = lean_string_append(x_35, x_36); x_38 = l_List_map___at_Lean_resolveGlobalConstNoOverload___spec__1(x_31, x_6); x_39 = l_List_toString___at_Lean_resolveGlobalConstNoOverload___spec__2(x_38); x_40 = lean_string_append(x_37, x_39); lean_dec(x_39); x_41 = l_Lean_instInhabitedParserDescr___closed__1; x_42 = lean_string_append(x_40, x_41); x_43 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_43, 0, x_42); x_44 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_44, 0, x_43); x_45 = l_Lean_throwError___at_Lean_Elab_Command_elabExport___spec__2(x_44, x_2, x_3, x_30); return x_45; } } } else { uint8_t x_46; lean_dec(x_2); lean_dec(x_1); x_46 = !lean_is_exclusive(x_5); if (x_46 == 0) { return x_5; } else { lean_object* x_47; lean_object* x_48; lean_object* x_49; x_47 = lean_ctor_get(x_5, 0); x_48 = lean_ctor_get(x_5, 1); lean_inc(x_48); lean_inc(x_47); lean_dec(x_5); 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_Elab_Command_elabGenInjectiveTheorems___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; x_9 = l_Lean_Meta_mkInjectiveTheorems(x_1, x_4, x_5, x_6, x_7, x_8); return x_9; } } lean_object* l_Lean_Elab_Command_elabGenInjectiveTheorems(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_5 = lean_unsigned_to_nat(1u); x_6 = l_Lean_Syntax_getArg(x_1, x_5); x_7 = l_Lean_Syntax_getId(x_6); lean_dec(x_6); lean_inc(x_2); x_8 = l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__1(x_7, x_2, x_3, x_4); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; 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_box(0); x_12 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabGenInjectiveTheorems___lambda__1___boxed), 8, 1); lean_closure_set(x_12, 0, x_9); x_13 = l_Lean_Elab_Command_liftTermElabM___rarg(x_11, x_12, x_2, x_3, x_10); return x_13; } else { uint8_t x_14; lean_dec(x_2); x_14 = !lean_is_exclusive(x_8); if (x_14 == 0) { return x_8; } else { lean_object* x_15; lean_object* x_16; lean_object* x_17; x_15 = lean_ctor_get(x_8, 0); x_16 = lean_ctor_get(x_8, 1); lean_inc(x_16); lean_inc(x_15); lean_dec(x_8); x_17 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_17, 0, x_15); lean_ctor_set(x_17, 1, x_16); return x_17; } } } } lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_resolveGlobalName___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__3(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); return x_5; } } lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_throwUnknownConstant___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__4(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_resolveGlobalConst___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__2(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Command_elabGenInjectiveTheorems___spec__1(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } lean_object* l_Lean_Elab_Command_elabGenInjectiveTheorems___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; x_9 = l_Lean_Elab_Command_elabGenInjectiveTheorems___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); lean_dec(x_3); lean_dec(x_2); return x_9; } } lean_object* l_Lean_Elab_Command_elabGenInjectiveTheorems___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_Elab_Command_elabGenInjectiveTheorems(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_1); return x_5; } } static lean_object* _init_l___regBuiltin_Lean_Elab_Command_elabGenInjectiveTheorems___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabGenInjectiveTheorems___boxed), 4, 0); return x_1; } } lean_object* l___regBuiltin_Lean_Elab_Command_elabGenInjectiveTheorems(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_2 = l_Lean_Elab_Command_commandElabAttribute; x_3 = l_Lean_Parser_Command_genInjectiveTheorems___elambda__1___closed__2; x_4 = l___regBuiltin_Lean_Elab_Command_elabGenInjectiveTheorems___closed__1; x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1); return x_5; } } lean_object* initialize_Init(lean_object*); lean_object* initialize_Lean_Elab_Command(lean_object*); lean_object* initialize_Lean_Meta_Injective(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Elab_GenInjective(lean_object* w) { lean_object * res; if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); _G_initialized = true; res = initialize_Init(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Elab_Command(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Meta_Injective(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l___regBuiltin_Lean_Elab_Command_elabGenInjectiveTheorems___closed__1 = _init_l___regBuiltin_Lean_Elab_Command_elabGenInjectiveTheorems___closed__1(); lean_mark_persistent(l___regBuiltin_Lean_Elab_Command_elabGenInjectiveTheorems___closed__1); res = l___regBuiltin_Lean_Elab_Command_elabGenInjectiveTheorems(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus } #endif
ChrisHughes24/lean4
stage0/stdlib/Lean/Data/Lsp/Extra.c
<reponame>ChrisHughes24/lean4 // Lean compiler output // Module: Lean.Data.Lsp.Extra // Imports: Init Lean.Data.Json Lean.Data.JsonRpc Lean.Data.Lsp.Basic #include <lean/lean.h> #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wunused-label" #elif defined(__GNUC__) && !defined(__CLANG__) #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif #ifdef __cplusplus extern "C" { #endif extern lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentEdit____x40_Lean_Data_Lsp_Basic___hyg_1241____closed__1; size_t l_USize_add(size_t, size_t); lean_object* lean_array_uget(lean_object*, size_t); lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoalParams____x40_Lean_Data_Lsp_Extra___hyg_133_(lean_object*); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonRange____x40_Lean_Data_Lsp_Basic___hyg_443____spec__1(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instFromJsonPlainGoal; lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____closed__2; lean_object* l_Lean_Json_getStr_x3f(lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* l_Lean_Lsp_instToJsonPlainGoalParams; lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____spec__1(lean_object*, lean_object*); lean_object* l_List_join___rarg(lean_object*); uint8_t l_USize_decLt(size_t, size_t); lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoalParams____x40_Lean_Data_Lsp_Extra___hyg_133____boxed(lean_object*); lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____closed__1; lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____boxed(lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1533____spec__1(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232_(lean_object*); extern lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonVersionedTextDocumentIdentifier____x40_Lean_Data_Lsp_Basic___hyg_1148____closed__1; lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_toJsonWaitForDiagnosticsParams____x40_Lean_Data_Lsp_Extra___hyg_23_(lean_object*); lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonWaitForDiagnosticsParams____x40_Lean_Data_Lsp_Extra___hyg_57_(lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_toJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_277____spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonWaitForDiagnosticsParams; lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____spec__2(size_t, size_t, lean_object*); lean_object* l_Lean_Lsp_instFromJsonWaitForDiagnostics(lean_object*); lean_object* l_Lean_Lsp_instFromJsonPlainGoal___closed__1; lean_object* l_Lean_Lsp_instToJsonPlainGoalParams___closed__1; lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_toJsonPlainGoalParams____x40_Lean_Data_Lsp_Extra___hyg_178_(lean_object*); lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_toJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_277_(lean_object*); lean_object* l_Lean_Lsp_instFromJsonWaitForDiagnostics___closed__1; lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonPosition____x40_Lean_Data_Lsp_Basic___hyg_253____spec__1(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonWaitForDiagnosticsParams___closed__1; lean_object* l_Lean_Lsp_instFromJsonWaitForDiagnostics___boxed(lean_object*); lean_object* l_Lean_Lsp_instToJsonWaitForDiagnostics___closed__1; size_t lean_usize_of_nat(lean_object*); lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentIdentifier____x40_Lean_Data_Lsp_Basic___hyg_1071_(lean_object*); lean_object* l_Lean_Lsp_instToJsonWaitForDiagnostics(lean_object*); lean_object* l_Lean_Lsp_instToJsonPlainGoal___closed__1; lean_object* l_Lean_Lsp_instFromJsonPlainGoalParams___closed__1; lean_object* l_Lean_JsonNumber_fromNat(lean_object*); lean_object* l_Lean_Json_getObjValD(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonWaitForDiagnostics___boxed(lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_toJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_277____spec__1(size_t, size_t, lean_object*); lean_object* l_Lean_Json_mkObj(lean_object*); extern lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1499____closed__1; extern lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_577____closed__1; lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instFromJsonWaitForDiagnosticsParams___closed__1; lean_object* l_Lean_Lsp_instToJsonPlainGoal; lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instFromJsonWaitForDiagnosticsParams; lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonPosition____x40_Lean_Data_Lsp_Basic___hyg_219_(lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_611____spec__1(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonWaitForDiagnosticsParams____x40_Lean_Data_Lsp_Extra___hyg_57____boxed(lean_object*); lean_object* l_Lean_Lsp_instFromJsonPlainGoalParams; lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_JsonRpc_instFromJsonMessage___spec__2(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_toJsonWaitForDiagnosticsParams____x40_Lean_Data_Lsp_Extra___hyg_23_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 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; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); x_3 = lean_ctor_get(x_1, 1); lean_inc(x_3); lean_dec(x_1); x_4 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_4, 0, x_2); x_5 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_577____closed__1; x_6 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_6, 0, x_5); lean_ctor_set(x_6, 1, x_4); x_7 = lean_box(0); x_8 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_8, 0, x_6); lean_ctor_set(x_8, 1, x_7); x_9 = l_Lean_JsonNumber_fromNat(x_3); x_10 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_10, 0, x_9); x_11 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonVersionedTextDocumentIdentifier____x40_Lean_Data_Lsp_Basic___hyg_1148____closed__1; x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_10); x_13 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_7); x_14 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_7); x_15 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_15, 0, x_8); lean_ctor_set(x_15, 1, x_14); x_16 = l_List_join___rarg(x_15); x_17 = l_Lean_Json_mkObj(x_16); return x_17; } } static lean_object* _init_l_Lean_Lsp_instToJsonWaitForDiagnosticsParams___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_toJsonWaitForDiagnosticsParams____x40_Lean_Data_Lsp_Extra___hyg_23_), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instToJsonWaitForDiagnosticsParams() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instToJsonWaitForDiagnosticsParams___closed__1; return x_1; } } lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonWaitForDiagnosticsParams____x40_Lean_Data_Lsp_Extra___hyg_57_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_577____closed__1; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_611____spec__1(x_1, x_2); if (lean_obj_tag(x_3) == 0) { lean_object* x_4; x_4 = lean_box(0); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); x_6 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonVersionedTextDocumentIdentifier____x40_Lean_Data_Lsp_Basic___hyg_1148____closed__1; x_7 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonPosition____x40_Lean_Data_Lsp_Basic___hyg_253____spec__1(x_1, x_6); if (lean_obj_tag(x_7) == 0) { lean_object* x_8; lean_dec(x_5); x_8 = lean_box(0); return x_8; } else { uint8_t x_9; x_9 = !lean_is_exclusive(x_7); if (x_9 == 0) { lean_object* x_10; lean_object* x_11; x_10 = lean_ctor_get(x_7, 0); x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_5); lean_ctor_set(x_11, 1, x_10); lean_ctor_set(x_7, 0, x_11); return x_7; } else { lean_object* x_12; lean_object* x_13; lean_object* x_14; x_12 = lean_ctor_get(x_7, 0); lean_inc(x_12); lean_dec(x_7); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_5); lean_ctor_set(x_13, 1, x_12); x_14 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_14, 0, x_13); return x_14; } } } } } lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonWaitForDiagnosticsParams____x40_Lean_Data_Lsp_Extra___hyg_57____boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonWaitForDiagnosticsParams____x40_Lean_Data_Lsp_Extra___hyg_57_(x_1); lean_dec(x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instFromJsonWaitForDiagnosticsParams___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonWaitForDiagnosticsParams____x40_Lean_Data_Lsp_Extra___hyg_57____boxed), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instFromJsonWaitForDiagnosticsParams() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instFromJsonWaitForDiagnosticsParams___closed__1; return x_1; } } static lean_object* _init_l_Lean_Lsp_instFromJsonWaitForDiagnostics___closed__1() { _start: { lean_object* x_1; lean_object* x_2; x_1 = lean_box(0); x_2 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } lean_object* l_Lean_Lsp_instFromJsonWaitForDiagnostics(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Lsp_instFromJsonWaitForDiagnostics___closed__1; return x_2; } } lean_object* l_Lean_Lsp_instFromJsonWaitForDiagnostics___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Lsp_instFromJsonWaitForDiagnostics(x_1); lean_dec(x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instToJsonWaitForDiagnostics___closed__1() { _start: { lean_object* x_1; lean_object* x_2; x_1 = lean_box(0); x_2 = l_Lean_Json_mkObj(x_1); return x_2; } } lean_object* l_Lean_Lsp_instToJsonWaitForDiagnostics(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Lsp_instToJsonWaitForDiagnostics___closed__1; return x_2; } } lean_object* l_Lean_Lsp_instToJsonWaitForDiagnostics___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Lsp_instToJsonWaitForDiagnostics(x_1); lean_dec(x_1); return x_2; } } lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoalParams____x40_Lean_Data_Lsp_Extra___hyg_133_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentEdit____x40_Lean_Data_Lsp_Basic___hyg_1241____closed__1; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1533____spec__1(x_1, x_2); if (lean_obj_tag(x_3) == 0) { lean_object* x_4; x_4 = lean_box(0); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); x_6 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1499____closed__1; x_7 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonRange____x40_Lean_Data_Lsp_Basic___hyg_443____spec__1(x_1, x_6); if (lean_obj_tag(x_7) == 0) { lean_object* x_8; lean_dec(x_5); x_8 = lean_box(0); return x_8; } else { uint8_t x_9; x_9 = !lean_is_exclusive(x_7); if (x_9 == 0) { lean_object* x_10; lean_object* x_11; x_10 = lean_ctor_get(x_7, 0); x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_5); lean_ctor_set(x_11, 1, x_10); lean_ctor_set(x_7, 0, x_11); return x_7; } else { lean_object* x_12; lean_object* x_13; lean_object* x_14; x_12 = lean_ctor_get(x_7, 0); lean_inc(x_12); lean_dec(x_7); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_5); lean_ctor_set(x_13, 1, x_12); x_14 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_14, 0, x_13); return x_14; } } } } } lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoalParams____x40_Lean_Data_Lsp_Extra___hyg_133____boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoalParams____x40_Lean_Data_Lsp_Extra___hyg_133_(x_1); lean_dec(x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instFromJsonPlainGoalParams___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoalParams____x40_Lean_Data_Lsp_Extra___hyg_133____boxed), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instFromJsonPlainGoalParams() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instFromJsonPlainGoalParams___closed__1; return x_1; } } lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_toJsonPlainGoalParams____x40_Lean_Data_Lsp_Extra___hyg_178_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); x_3 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentIdentifier____x40_Lean_Data_Lsp_Basic___hyg_1071_(x_2); x_4 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentEdit____x40_Lean_Data_Lsp_Basic___hyg_1241____closed__1; x_5 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_5, 0, x_4); lean_ctor_set(x_5, 1, x_3); x_6 = lean_box(0); x_7 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_7, 0, x_5); lean_ctor_set(x_7, 1, x_6); x_8 = lean_ctor_get(x_1, 1); lean_inc(x_8); lean_dec(x_1); x_9 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonPosition____x40_Lean_Data_Lsp_Basic___hyg_219_(x_8); x_10 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1499____closed__1; x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_9); x_12 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_6); x_13 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_6); x_14 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_14, 0, x_7); lean_ctor_set(x_14, 1, x_13); x_15 = l_List_join___rarg(x_14); x_16 = l_Lean_Json_mkObj(x_15); return x_16; } } static lean_object* _init_l_Lean_Lsp_instToJsonPlainGoalParams___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_toJsonPlainGoalParams____x40_Lean_Data_Lsp_Extra___hyg_178_), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instToJsonPlainGoalParams() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instToJsonPlainGoalParams___closed__1; return x_1; } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____spec__2(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; lean_object* x_6; x_5 = x_3; x_6 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_6, 0, x_5); return x_6; } else { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_7 = lean_array_uget(x_3, x_2); x_8 = lean_unsigned_to_nat(0u); x_9 = lean_array_uset(x_3, x_2, x_8); x_10 = x_7; x_11 = l_Lean_Json_getStr_x3f(x_10); lean_dec(x_10); if (lean_obj_tag(x_11) == 0) { lean_object* x_12; lean_dec(x_9); x_12 = lean_box(0); return x_12; } else { lean_object* x_13; size_t x_14; size_t x_15; lean_object* x_16; lean_object* x_17; x_13 = lean_ctor_get(x_11, 0); lean_inc(x_13); lean_dec(x_11); x_14 = 1; x_15 = x_2 + x_14; x_16 = x_13; x_17 = lean_array_uset(x_9, x_2, x_16); x_2 = x_15; x_3 = x_17; goto _start; } } } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValD(x_1, x_2); if (lean_obj_tag(x_3) == 4) { lean_object* x_4; lean_object* x_5; size_t x_6; size_t x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_4 = lean_ctor_get(x_3, 0); lean_inc(x_4); lean_dec(x_3); x_5 = lean_array_get_size(x_4); x_6 = lean_usize_of_nat(x_5); lean_dec(x_5); x_7 = 0; x_8 = x_4; x_9 = l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____spec__2(x_6, x_7, x_8); x_10 = x_9; return x_10; } else { lean_object* x_11; lean_dec(x_3); x_11 = lean_box(0); return x_11; } } } static lean_object* _init_l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("rendered"); return x_1; } } static lean_object* _init_l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("goals"); return x_1; } } lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____closed__1; x_3 = l_Lean_Json_getObjValAs_x3f___at_Lean_JsonRpc_instFromJsonMessage___spec__2(x_1, x_2); if (lean_obj_tag(x_3) == 0) { lean_object* x_4; x_4 = lean_box(0); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); x_6 = l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____closed__2; x_7 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____spec__1(x_1, x_6); if (lean_obj_tag(x_7) == 0) { lean_object* x_8; lean_dec(x_5); x_8 = lean_box(0); return x_8; } else { uint8_t x_9; x_9 = !lean_is_exclusive(x_7); if (x_9 == 0) { lean_object* x_10; lean_object* x_11; x_10 = lean_ctor_get(x_7, 0); x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_5); lean_ctor_set(x_11, 1, x_10); lean_ctor_set(x_7, 0, x_11); return x_7; } else { lean_object* x_12; lean_object* x_13; lean_object* x_14; x_12 = lean_ctor_get(x_7, 0); lean_inc(x_12); lean_dec(x_7); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_5); lean_ctor_set(x_13, 1, x_12); x_14 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_14, 0, x_13); return x_14; } } } } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____spec__2___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___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____spec__2(x_4, x_5, x_3); return x_6; } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232_(x_1); lean_dec(x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instFromJsonPlainGoal___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____boxed), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instFromJsonPlainGoal() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instFromJsonPlainGoal___closed__1; return x_1; } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_toJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_277____spec__1(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; size_t x_11; size_t x_12; lean_object* x_13; lean_object* x_14; 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_alloc_ctor(3, 1, 0); lean_ctor_set(x_10, 0, x_9); x_11 = 1; x_12 = x_2 + x_11; x_13 = x_10; x_14 = lean_array_uset(x_8, x_2, x_13); x_2 = x_12; x_3 = x_14; goto _start; } } } lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_toJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_277_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; size_t x_10; size_t x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); x_3 = lean_ctor_get(x_1, 1); lean_inc(x_3); lean_dec(x_1); x_4 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_4, 0, x_2); x_5 = l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____closed__1; x_6 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_6, 0, x_5); lean_ctor_set(x_6, 1, x_4); x_7 = lean_box(0); x_8 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_8, 0, x_6); lean_ctor_set(x_8, 1, x_7); x_9 = lean_array_get_size(x_3); x_10 = lean_usize_of_nat(x_9); lean_dec(x_9); x_11 = 0; x_12 = x_3; x_13 = l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_toJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_277____spec__1(x_10, x_11, x_12); x_14 = x_13; x_15 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_15, 0, x_14); x_16 = l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____closed__2; x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_15); x_18 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_7); x_19 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_7); x_20 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_20, 0, x_8); lean_ctor_set(x_20, 1, x_19); x_21 = l_List_join___rarg(x_20); x_22 = l_Lean_Json_mkObj(x_21); return x_22; } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_toJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_277____spec__1___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___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_toJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_277____spec__1(x_4, x_5, x_3); return x_6; } } static lean_object* _init_l_Lean_Lsp_instToJsonPlainGoal___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_toJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_277_), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instToJsonPlainGoal() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instToJsonPlainGoal___closed__1; return x_1; } } lean_object* initialize_Init(lean_object*); lean_object* initialize_Lean_Data_Json(lean_object*); lean_object* initialize_Lean_Data_JsonRpc(lean_object*); lean_object* initialize_Lean_Data_Lsp_Basic(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Data_Lsp_Extra(lean_object* w) { lean_object * res; if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); _G_initialized = true; res = initialize_Init(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Data_Json(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Data_JsonRpc(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Data_Lsp_Basic(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_Lsp_instToJsonWaitForDiagnosticsParams___closed__1 = _init_l_Lean_Lsp_instToJsonWaitForDiagnosticsParams___closed__1(); lean_mark_persistent(l_Lean_Lsp_instToJsonWaitForDiagnosticsParams___closed__1); l_Lean_Lsp_instToJsonWaitForDiagnosticsParams = _init_l_Lean_Lsp_instToJsonWaitForDiagnosticsParams(); lean_mark_persistent(l_Lean_Lsp_instToJsonWaitForDiagnosticsParams); l_Lean_Lsp_instFromJsonWaitForDiagnosticsParams___closed__1 = _init_l_Lean_Lsp_instFromJsonWaitForDiagnosticsParams___closed__1(); lean_mark_persistent(l_Lean_Lsp_instFromJsonWaitForDiagnosticsParams___closed__1); l_Lean_Lsp_instFromJsonWaitForDiagnosticsParams = _init_l_Lean_Lsp_instFromJsonWaitForDiagnosticsParams(); lean_mark_persistent(l_Lean_Lsp_instFromJsonWaitForDiagnosticsParams); l_Lean_Lsp_instFromJsonWaitForDiagnostics___closed__1 = _init_l_Lean_Lsp_instFromJsonWaitForDiagnostics___closed__1(); lean_mark_persistent(l_Lean_Lsp_instFromJsonWaitForDiagnostics___closed__1); l_Lean_Lsp_instToJsonWaitForDiagnostics___closed__1 = _init_l_Lean_Lsp_instToJsonWaitForDiagnostics___closed__1(); lean_mark_persistent(l_Lean_Lsp_instToJsonWaitForDiagnostics___closed__1); l_Lean_Lsp_instFromJsonPlainGoalParams___closed__1 = _init_l_Lean_Lsp_instFromJsonPlainGoalParams___closed__1(); lean_mark_persistent(l_Lean_Lsp_instFromJsonPlainGoalParams___closed__1); l_Lean_Lsp_instFromJsonPlainGoalParams = _init_l_Lean_Lsp_instFromJsonPlainGoalParams(); lean_mark_persistent(l_Lean_Lsp_instFromJsonPlainGoalParams); l_Lean_Lsp_instToJsonPlainGoalParams___closed__1 = _init_l_Lean_Lsp_instToJsonPlainGoalParams___closed__1(); lean_mark_persistent(l_Lean_Lsp_instToJsonPlainGoalParams___closed__1); l_Lean_Lsp_instToJsonPlainGoalParams = _init_l_Lean_Lsp_instToJsonPlainGoalParams(); lean_mark_persistent(l_Lean_Lsp_instToJsonPlainGoalParams); l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____closed__1 = _init_l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____closed__1(); lean_mark_persistent(l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____closed__1); l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____closed__2 = _init_l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____closed__2(); lean_mark_persistent(l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoal____x40_Lean_Data_Lsp_Extra___hyg_232____closed__2); l_Lean_Lsp_instFromJsonPlainGoal___closed__1 = _init_l_Lean_Lsp_instFromJsonPlainGoal___closed__1(); lean_mark_persistent(l_Lean_Lsp_instFromJsonPlainGoal___closed__1); l_Lean_Lsp_instFromJsonPlainGoal = _init_l_Lean_Lsp_instFromJsonPlainGoal(); lean_mark_persistent(l_Lean_Lsp_instFromJsonPlainGoal); l_Lean_Lsp_instToJsonPlainGoal___closed__1 = _init_l_Lean_Lsp_instToJsonPlainGoal___closed__1(); lean_mark_persistent(l_Lean_Lsp_instToJsonPlainGoal___closed__1); l_Lean_Lsp_instToJsonPlainGoal = _init_l_Lean_Lsp_instToJsonPlainGoal(); lean_mark_persistent(l_Lean_Lsp_instToJsonPlainGoal); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus } #endif
ChrisHughes24/lean4
stage0/stdlib/Lean/Server/Utils.c
<gh_stars>1-10 // Lean compiler output // Module: Lean.Server.Utils // Imports: Init Lean.Data.Position Lean.Data.Lsp Init.System.FilePath #include <lean/lean.h> #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wunused-label" #elif defined(__GNUC__) && !defined(__CLANG__) #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif #ifdef __cplusplus extern "C" { #endif lean_object* l_IO_FS_Stream_chainLeft___elambda__3___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); size_t l_USize_add(size_t, size_t); uint8_t l_Lean_Server_toFileUri___lambda__1(uint32_t); lean_object* l_IO_FS_Stream_chainLeft___elambda__4___boxed(lean_object*, lean_object*, lean_object*); extern uint8_t l_System_Platform_isWindows; lean_object* l_Std_PersistentArray_mapM___at_Lean_Server_publishMessages___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_chainRight___elambda__6(lean_object*, lean_object*); lean_object* l_IO_FS_Stream_writeLspNotification___at_Lean_Server_publishDiagnostics___spec__1(lean_object*, lean_object*, lean_object*); uint8_t l_USize_decEq(size_t, size_t); lean_object* lean_array_uget(lean_object*, size_t); lean_object* l_Lean_Server_foldDocumentChanges_match__1(lean_object*); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); lean_object* l_IO_FS_Stream_withPrefix___elambda__4(lean_object*, size_t, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__3(lean_object*, size_t, size_t, lean_object*, lean_object*); lean_object* l_System_mkFilePath(lean_object*); lean_object* l_Std_PersistentArray_mapM___at_Lean_Server_publishMessages___spec__1___boxed__const__1; lean_object* l_IO_FS_Stream_chainLeft___elambda__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_toFileUri___closed__1; lean_object* l_List_takeWhile_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_chainRight___lambda__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_chainLeft___elambda__6(lean_object*, lean_object*); lean_object* l_IO_FS_Handle_mk___at_Lean_Server_maybeTee___spec__1(lean_object*, uint8_t, uint8_t, lean_object*); extern lean_object* l_Lean_instInhabitedParserDescr___closed__1; lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Server_foldDocumentChanges___spec__1(lean_object*, lean_object*, size_t, size_t, lean_object*); extern lean_object* l_instInhabitedNat; lean_object* l_Std_PersistentArray_mapMAux___at_Lean_Server_publishMessages___spec__2(lean_object*, lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* l_IO_FS_Stream_withPrefix___elambda__5(lean_object*, lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); lean_object* lean_string_utf8_set(lean_object*, lean_object*, uint32_t); lean_object* lean_string_utf8_extract(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_FileMap_lspPosToUtf8Pos(lean_object*, lean_object*); lean_object* l_IO_throwServerError___rarg(lean_object*, lean_object*); lean_object* l_String_dropWhile(lean_object*, lean_object*); lean_object* lean_string_utf8_byte_size(lean_object*); lean_object* lean_io_getenv(lean_object*, lean_object*); uint8_t l_USize_decLt(size_t, size_t); lean_object* l_Lean_Server_foldDocumentChanges___closed__3; lean_object* l_IO_FS_Stream_chainLeft___elambda__5(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_instInhabitedDocumentMeta; lean_object* lean_string_utf8_next(lean_object*, lean_object*); lean_object* l_IO_FS_Stream_chainRight___elambda__4(lean_object*, lean_object*, uint8_t, lean_object*, size_t, lean_object*); lean_object* l_IO_FS_Stream_withPrefix___elambda__3(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_throwServerError(lean_object*); lean_object* l_IO_FS_Handle_mk___at_Lean_Server_maybeTee___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_foldDocumentChanges_match__2___rarg(lean_object*, lean_object*); lean_object* l_IO_FS_Stream_withPrefix___elambda__4___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_maybeTee___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_maybeTee___closed__1; lean_object* l_Lean_Server_foldDocumentChanges_match__2(lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_toFileUri___closed__2; lean_object* l_IO_FS_Stream_chainLeft(lean_object*, lean_object*, uint8_t); lean_object* l_IO_FS_Stream_chainRight___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_chainLeft___elambda__2(lean_object*, lean_object*); extern lean_object* l_Lean_Lsp_Ipc_collectDiagnostics_loop_match__2___rarg___closed__1; lean_object* l_List_takeWhile_match__1(lean_object*, lean_object*); lean_object* l_IO_Prim_fopenFlags(uint8_t, uint8_t); lean_object* l_System_FilePath_normalizePath(lean_object*); lean_object* l_IO_FS_Stream_writeLspMessage(lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_chainLeft___elambda__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_chainRight___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__4(lean_object*, size_t, size_t, lean_object*, lean_object*); lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_publishDiagnostics___spec__2(lean_object*); lean_object* lean_stream_of_handle(lean_object*); uint32_t lean_string_utf8_get(lean_object*, lean_object*); lean_object* l_Lean_Server_maybeTee_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_chainLeft___elambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_takeWhile___rarg(lean_object*, lean_object*); uint8_t l_Array_isEmpty___rarg(lean_object*); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101_(lean_object*); lean_object* l_Lean_FileMap_ofString(lean_object*); lean_object* l_Std_PersistentArray_mapMAux___at_Lean_Server_publishMessages___spec__2___boxed__const__1; size_t lean_usize_of_nat(lean_object*); lean_object* l_Lean_Server_publishDiagnostics(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_withPrefix___elambda__2(lean_object*, lean_object*); lean_object* l_Lean_Server_replaceLspRange___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_replaceLspRange(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_foldDocumentChanges___closed__5; lean_object* l_Lean_Server_instInhabitedDocumentMeta___closed__1; lean_object* l_IO_FS_Stream_chainLeft___elambda__1(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); uint8_t l_UInt32_decEq(uint32_t, uint32_t); lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_msgToDiagnostic(lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_IO_FS_Stream_chainLeft___elambda__3(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentArray_toArray___rarg(lean_object*); lean_object* l_IO_FS_Stream_chainLeft___elambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_panic_fn(lean_object*, lean_object*); lean_object* l_IO_FS_Stream_chainRight___elambda__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_maybeTee_match__1(lean_object*); lean_object* l_IO_FS_Stream_chainLeft___elambda__3___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_toFileUri___lambda__1___boxed(lean_object*); extern lean_object* l_Lean_instInhabitedFileMap___closed__1; lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__5(lean_object*, size_t, size_t, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_chainRight(lean_object*, lean_object*, uint8_t); lean_object* l_Lean_Server_toFileUri(lean_object*); lean_object* l_Lean_Server_foldDocumentChanges_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_foldDocumentChanges(lean_object*, lean_object*); lean_object* l_Lean_Server_foldDocumentChanges___boxed(lean_object*, lean_object*); lean_object* l_Lean_Server_foldDocumentChanges___closed__1; lean_object* l_IO_FS_Stream_withPrefix___elambda__6(lean_object*, lean_object*); lean_object* l_IO_FS_Stream_withPrefix(lean_object*, lean_object*); lean_object* l_IO_FS_Stream_chainRight___elambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_foldDocumentChanges___closed__2; lean_object* l_Lean_Server_foldDocumentChanges___closed__4; lean_object* l_Lean_Server_publishMessages(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_maybeTee(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_withPrefix___elambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_min(lean_object*, lean_object*); lean_object* l_IO_FS_Stream_chainLeft___elambda__4(lean_object*, size_t, lean_object*); lean_object* l_IO_FS_Stream_chainRight___elambda__5(lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_withPrefix___elambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_chainRight___elambda__2(lean_object*, lean_object*, lean_object*); uint8_t lean_string_utf8_at_end(lean_object*, lean_object*); lean_object* lean_io_prim_handle_mk(lean_object*, lean_object*, lean_object*); lean_object* l_List_takeWhile(lean_object*); lean_object* l_IO_FS_Stream_chainLeft___boxed(lean_object*, lean_object*, lean_object*); lean_object* lean_nat_to_int(lean_object*); lean_object* l_IO_FS_Stream_chainRight___elambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedFileMap; lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Server_foldDocumentChanges___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_String_mapAux___at_Lean_Server_toFileUri___spec__1(lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_IO_throwServerError___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; x_3 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_3, 0, x_1); x_4 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_4, 0, x_3); lean_ctor_set(x_4, 1, x_2); return x_4; } } lean_object* l_IO_throwServerError(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_IO_throwServerError___rarg), 2, 0); return x_2; } } lean_object* l_IO_FS_Stream_chainRight___elambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; x_4 = lean_ctor_get(x_1, 5); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_2(x_4, x_2, x_3); return x_5; } } lean_object* l_IO_FS_Stream_chainRight___elambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = lean_apply_1(x_1, x_3); if (lean_obj_tag(x_4) == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; 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 = lean_apply_2(x_2, x_5, x_6); return x_7; } else { uint8_t x_8; lean_dec(x_2); x_8 = !lean_is_exclusive(x_4); if (x_8 == 0) { return x_4; } else { lean_object* x_9; lean_object* x_10; lean_object* x_11; x_9 = lean_ctor_get(x_4, 0); x_10 = lean_ctor_get(x_4, 1); lean_inc(x_10); lean_inc(x_9); lean_dec(x_4); x_11 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_11, 0, x_9); lean_ctor_set(x_11, 1, x_10); return x_11; } } } } lean_object* l_IO_FS_Stream_chainRight___elambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; x_4 = lean_ctor_get(x_1, 3); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_2(x_4, x_2, x_3); return x_5; } } lean_object* l_IO_FS_Stream_chainRight___elambda__4(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, size_t x_5, lean_object* x_6) { _start: { lean_object* x_7; lean_object* x_8; lean_object* x_9; x_7 = lean_ctor_get(x_1, 2); lean_inc(x_7); lean_dec(x_1); x_8 = lean_box_usize(x_5); x_9 = lean_apply_2(x_7, x_8, x_6); if (lean_obj_tag(x_9) == 0) { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_10 = lean_ctor_get(x_9, 0); lean_inc(x_10); x_11 = lean_ctor_get(x_9, 1); lean_inc(x_11); lean_dec(x_9); x_12 = lean_ctor_get(x_2, 3); lean_inc(x_12); lean_dec(x_2); lean_inc(x_10); x_13 = lean_apply_2(x_12, x_10, x_11); if (lean_obj_tag(x_13) == 0) { if (x_3 == 0) { uint8_t x_14; lean_dec(x_4); x_14 = !lean_is_exclusive(x_13); if (x_14 == 0) { lean_object* x_15; x_15 = lean_ctor_get(x_13, 0); lean_dec(x_15); lean_ctor_set(x_13, 0, x_10); return x_13; } else { lean_object* x_16; lean_object* x_17; x_16 = lean_ctor_get(x_13, 1); lean_inc(x_16); lean_dec(x_13); x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_10); lean_ctor_set(x_17, 1, x_16); return x_17; } } else { lean_object* x_18; lean_object* x_19; x_18 = lean_ctor_get(x_13, 1); lean_inc(x_18); lean_dec(x_13); x_19 = lean_apply_1(x_4, x_18); if (lean_obj_tag(x_19) == 0) { uint8_t x_20; x_20 = !lean_is_exclusive(x_19); if (x_20 == 0) { lean_object* x_21; x_21 = lean_ctor_get(x_19, 0); lean_dec(x_21); lean_ctor_set(x_19, 0, x_10); return x_19; } else { lean_object* x_22; lean_object* x_23; x_22 = lean_ctor_get(x_19, 1); lean_inc(x_22); lean_dec(x_19); x_23 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_23, 0, x_10); lean_ctor_set(x_23, 1, x_22); return x_23; } } else { uint8_t x_24; lean_dec(x_10); x_24 = !lean_is_exclusive(x_19); if (x_24 == 0) { return x_19; } else { lean_object* x_25; lean_object* x_26; lean_object* x_27; x_25 = lean_ctor_get(x_19, 0); x_26 = lean_ctor_get(x_19, 1); lean_inc(x_26); lean_inc(x_25); lean_dec(x_19); x_27 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_27, 0, x_25); lean_ctor_set(x_27, 1, x_26); return x_27; } } } } else { uint8_t x_28; lean_dec(x_10); lean_dec(x_4); x_28 = !lean_is_exclusive(x_13); if (x_28 == 0) { return x_13; } else { lean_object* x_29; lean_object* x_30; lean_object* x_31; x_29 = lean_ctor_get(x_13, 0); x_30 = lean_ctor_get(x_13, 1); lean_inc(x_30); lean_inc(x_29); lean_dec(x_13); x_31 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_31, 0, x_29); lean_ctor_set(x_31, 1, x_30); return x_31; } } } else { uint8_t x_32; lean_dec(x_4); lean_dec(x_2); x_32 = !lean_is_exclusive(x_9); if (x_32 == 0) { return x_9; } else { lean_object* x_33; lean_object* x_34; lean_object* x_35; x_33 = lean_ctor_get(x_9, 0); x_34 = lean_ctor_get(x_9, 1); lean_inc(x_34); lean_inc(x_33); lean_dec(x_9); x_35 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_35, 0, x_33); lean_ctor_set(x_35, 1, x_34); return x_35; } } } } lean_object* l_IO_FS_Stream_chainRight___elambda__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = lean_apply_1(x_1, x_3); if (lean_obj_tag(x_4) == 0) { lean_object* x_5; lean_object* x_6; x_5 = lean_ctor_get(x_4, 1); lean_inc(x_5); lean_dec(x_4); x_6 = lean_apply_1(x_2, x_5); return x_6; } else { uint8_t x_7; lean_dec(x_2); x_7 = !lean_is_exclusive(x_4); if (x_7 == 0) { return x_4; } else { lean_object* x_8; lean_object* x_9; lean_object* x_10; x_8 = lean_ctor_get(x_4, 0); x_9 = lean_ctor_get(x_4, 1); lean_inc(x_9); lean_inc(x_8); lean_dec(x_4); x_10 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_10, 0, x_8); lean_ctor_set(x_10, 1, x_9); return x_10; } } } } lean_object* l_IO_FS_Stream_chainRight___elambda__6(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); lean_dec(x_1); x_4 = lean_apply_1(x_3, x_2); return x_4; } } lean_object* l_IO_FS_Stream_chainRight___lambda__1(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; lean_object* x_7; x_6 = lean_ctor_get(x_1, 5); lean_inc(x_6); lean_dec(x_1); lean_inc(x_4); x_7 = lean_apply_2(x_6, x_4, x_5); if (lean_obj_tag(x_7) == 0) { if (x_2 == 0) { uint8_t x_8; lean_dec(x_3); x_8 = !lean_is_exclusive(x_7); if (x_8 == 0) { lean_object* x_9; x_9 = lean_ctor_get(x_7, 0); lean_dec(x_9); lean_ctor_set(x_7, 0, x_4); return x_7; } else { lean_object* x_10; lean_object* x_11; x_10 = lean_ctor_get(x_7, 1); lean_inc(x_10); lean_dec(x_7); x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_4); lean_ctor_set(x_11, 1, x_10); return x_11; } } else { lean_object* x_12; lean_object* x_13; x_12 = lean_ctor_get(x_7, 1); lean_inc(x_12); lean_dec(x_7); x_13 = lean_apply_1(x_3, x_12); if (lean_obj_tag(x_13) == 0) { uint8_t x_14; x_14 = !lean_is_exclusive(x_13); if (x_14 == 0) { lean_object* x_15; x_15 = lean_ctor_get(x_13, 0); lean_dec(x_15); lean_ctor_set(x_13, 0, x_4); return x_13; } else { lean_object* x_16; lean_object* x_17; x_16 = lean_ctor_get(x_13, 1); lean_inc(x_16); lean_dec(x_13); x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_4); lean_ctor_set(x_17, 1, x_16); return x_17; } } else { uint8_t x_18; lean_dec(x_4); x_18 = !lean_is_exclusive(x_13); if (x_18 == 0) { return x_13; } else { lean_object* x_19; lean_object* x_20; lean_object* x_21; x_19 = lean_ctor_get(x_13, 0); x_20 = lean_ctor_get(x_13, 1); lean_inc(x_20); lean_inc(x_19); lean_dec(x_13); x_21 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_21, 0, x_19); lean_ctor_set(x_21, 1, x_20); return x_21; } } } } else { uint8_t x_22; lean_dec(x_4); lean_dec(x_3); x_22 = !lean_is_exclusive(x_7); if (x_22 == 0) { return x_7; } else { lean_object* x_23; lean_object* x_24; lean_object* x_25; x_23 = lean_ctor_get(x_7, 0); x_24 = lean_ctor_get(x_7, 1); lean_inc(x_24); lean_inc(x_23); lean_dec(x_7); 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_IO_FS_Stream_chainRight(lean_object* x_1, lean_object* x_2, uint8_t x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_inc(x_1); x_4 = lean_alloc_closure((void*)(l_IO_FS_Stream_chainRight___elambda__6), 2, 1); lean_closure_set(x_4, 0, x_1); x_5 = lean_ctor_get(x_1, 1); lean_inc(x_5); x_6 = lean_ctor_get(x_2, 1); lean_inc(x_6); lean_inc(x_6); x_7 = lean_alloc_closure((void*)(l_IO_FS_Stream_chainRight___elambda__5), 3, 2); lean_closure_set(x_7, 0, x_5); lean_closure_set(x_7, 1, x_6); x_8 = lean_box(x_3); lean_inc(x_6); lean_inc(x_2); lean_inc(x_1); x_9 = lean_alloc_closure((void*)(l_IO_FS_Stream_chainRight___elambda__4___boxed), 6, 4); lean_closure_set(x_9, 0, x_1); lean_closure_set(x_9, 1, x_2); lean_closure_set(x_9, 2, x_8); lean_closure_set(x_9, 3, x_6); lean_inc(x_1); x_10 = lean_alloc_closure((void*)(l_IO_FS_Stream_chainRight___elambda__3), 3, 1); lean_closure_set(x_10, 0, x_1); x_11 = lean_ctor_get(x_1, 4); lean_inc(x_11); x_12 = lean_box(x_3); x_13 = lean_alloc_closure((void*)(l_IO_FS_Stream_chainRight___lambda__1___boxed), 5, 3); lean_closure_set(x_13, 0, x_2); lean_closure_set(x_13, 1, x_12); lean_closure_set(x_13, 2, x_6); x_14 = lean_alloc_closure((void*)(l_IO_FS_Stream_chainRight___elambda__2), 3, 2); lean_closure_set(x_14, 0, x_11); lean_closure_set(x_14, 1, x_13); x_15 = lean_alloc_closure((void*)(l_IO_FS_Stream_chainRight___elambda__1), 3, 1); lean_closure_set(x_15, 0, x_1); x_16 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_16, 0, x_4); lean_ctor_set(x_16, 1, x_7); lean_ctor_set(x_16, 2, x_9); lean_ctor_set(x_16, 3, x_10); lean_ctor_set(x_16, 4, x_14); lean_ctor_set(x_16, 5, x_15); return x_16; } } lean_object* l_IO_FS_Stream_chainRight___elambda__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: { uint8_t x_7; size_t x_8; lean_object* x_9; x_7 = lean_unbox(x_3); lean_dec(x_3); x_8 = lean_unbox_usize(x_5); lean_dec(x_5); x_9 = l_IO_FS_Stream_chainRight___elambda__4(x_1, x_2, x_7, x_4, x_8, x_6); return x_9; } } lean_object* l_IO_FS_Stream_chainRight___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { uint8_t x_6; lean_object* x_7; x_6 = lean_unbox(x_2); lean_dec(x_2); x_7 = l_IO_FS_Stream_chainRight___lambda__1(x_1, x_6, x_3, x_4, x_5); return x_7; } } lean_object* l_IO_FS_Stream_chainRight___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { uint8_t x_4; lean_object* x_5; x_4 = lean_unbox(x_3); lean_dec(x_3); x_5 = l_IO_FS_Stream_chainRight(x_1, x_2, x_4); return x_5; } } lean_object* l_IO_FS_Stream_chainLeft___elambda__1___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; x_5 = lean_ctor_get(x_1, 5); lean_inc(x_5); lean_dec(x_1); x_6 = lean_apply_2(x_5, x_2, x_4); return x_6; } } lean_object* l_IO_FS_Stream_chainLeft___elambda__1(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; lean_object* x_8; x_7 = lean_ctor_get(x_1, 5); lean_inc(x_7); lean_dec(x_1); lean_inc(x_5); x_8 = lean_apply_2(x_7, x_5, x_6); if (lean_obj_tag(x_8) == 0) { if (x_3 == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_dec(x_4); x_9 = lean_ctor_get(x_8, 1); lean_inc(x_9); lean_dec(x_8); x_10 = lean_box(0); x_11 = l_IO_FS_Stream_chainLeft___elambda__1___lambda__1(x_2, x_5, x_10, x_9); return x_11; } else { lean_object* x_12; lean_object* x_13; x_12 = lean_ctor_get(x_8, 1); lean_inc(x_12); lean_dec(x_8); x_13 = lean_apply_1(x_4, x_12); if (lean_obj_tag(x_13) == 0) { lean_object* x_14; lean_object* x_15; lean_object* x_16; x_14 = lean_ctor_get(x_13, 0); lean_inc(x_14); x_15 = lean_ctor_get(x_13, 1); lean_inc(x_15); lean_dec(x_13); x_16 = l_IO_FS_Stream_chainLeft___elambda__1___lambda__1(x_2, x_5, x_14, x_15); lean_dec(x_14); return x_16; } else { uint8_t x_17; lean_dec(x_5); lean_dec(x_2); x_17 = !lean_is_exclusive(x_13); if (x_17 == 0) { return x_13; } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; x_18 = lean_ctor_get(x_13, 0); x_19 = lean_ctor_get(x_13, 1); lean_inc(x_19); lean_inc(x_18); lean_dec(x_13); x_20 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_20, 0, x_18); lean_ctor_set(x_20, 1, x_19); return x_20; } } } } else { uint8_t x_21; lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); x_21 = !lean_is_exclusive(x_8); if (x_21 == 0) { return x_8; } else { lean_object* x_22; lean_object* x_23; lean_object* x_24; x_22 = lean_ctor_get(x_8, 0); x_23 = lean_ctor_get(x_8, 1); lean_inc(x_23); lean_inc(x_22); lean_dec(x_8); x_24 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_24, 0, x_22); lean_ctor_set(x_24, 1, x_23); return x_24; } } } } lean_object* l_IO_FS_Stream_chainLeft___elambda__2(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; x_3 = lean_ctor_get(x_1, 4); lean_inc(x_3); lean_dec(x_1); x_4 = lean_apply_1(x_3, x_2); return x_4; } } lean_object* l_IO_FS_Stream_chainLeft___elambda__3___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; x_5 = lean_ctor_get(x_1, 3); lean_inc(x_5); lean_dec(x_1); x_6 = lean_apply_2(x_5, x_2, x_4); return x_6; } } lean_object* l_IO_FS_Stream_chainLeft___elambda__3(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; lean_object* x_8; x_7 = lean_ctor_get(x_1, 3); lean_inc(x_7); lean_dec(x_1); lean_inc(x_5); x_8 = lean_apply_2(x_7, x_5, x_6); if (lean_obj_tag(x_8) == 0) { if (x_3 == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_dec(x_4); x_9 = lean_ctor_get(x_8, 1); lean_inc(x_9); lean_dec(x_8); x_10 = lean_box(0); x_11 = l_IO_FS_Stream_chainLeft___elambda__3___lambda__1(x_2, x_5, x_10, x_9); return x_11; } else { lean_object* x_12; lean_object* x_13; x_12 = lean_ctor_get(x_8, 1); lean_inc(x_12); lean_dec(x_8); x_13 = lean_apply_1(x_4, x_12); if (lean_obj_tag(x_13) == 0) { lean_object* x_14; lean_object* x_15; lean_object* x_16; x_14 = lean_ctor_get(x_13, 0); lean_inc(x_14); x_15 = lean_ctor_get(x_13, 1); lean_inc(x_15); lean_dec(x_13); x_16 = l_IO_FS_Stream_chainLeft___elambda__3___lambda__1(x_2, x_5, x_14, x_15); lean_dec(x_14); return x_16; } else { uint8_t x_17; lean_dec(x_5); lean_dec(x_2); x_17 = !lean_is_exclusive(x_13); if (x_17 == 0) { return x_13; } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; x_18 = lean_ctor_get(x_13, 0); x_19 = lean_ctor_get(x_13, 1); lean_inc(x_19); lean_inc(x_18); lean_dec(x_13); x_20 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_20, 0, x_18); lean_ctor_set(x_20, 1, x_19); return x_20; } } } } else { uint8_t x_21; lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); x_21 = !lean_is_exclusive(x_8); if (x_21 == 0) { return x_8; } else { lean_object* x_22; lean_object* x_23; lean_object* x_24; x_22 = lean_ctor_get(x_8, 0); x_23 = lean_ctor_get(x_8, 1); lean_inc(x_23); lean_inc(x_22); lean_dec(x_8); x_24 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_24, 0, x_22); lean_ctor_set(x_24, 1, x_23); return x_24; } } } } lean_object* l_IO_FS_Stream_chainLeft___elambda__4(lean_object* x_1, size_t x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; x_4 = lean_ctor_get(x_1, 2); lean_inc(x_4); lean_dec(x_1); x_5 = lean_box_usize(x_2); x_6 = lean_apply_2(x_4, x_5, x_3); return x_6; } } lean_object* l_IO_FS_Stream_chainLeft___elambda__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = lean_apply_1(x_1, x_3); if (lean_obj_tag(x_4) == 0) { lean_object* x_5; lean_object* x_6; x_5 = lean_ctor_get(x_4, 1); lean_inc(x_5); lean_dec(x_4); x_6 = lean_apply_1(x_2, x_5); return x_6; } else { uint8_t x_7; lean_dec(x_2); x_7 = !lean_is_exclusive(x_4); if (x_7 == 0) { return x_4; } else { lean_object* x_8; lean_object* x_9; lean_object* x_10; x_8 = lean_ctor_get(x_4, 0); x_9 = lean_ctor_get(x_4, 1); lean_inc(x_9); lean_inc(x_8); lean_dec(x_4); x_10 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_10, 0, x_8); lean_ctor_set(x_10, 1, x_9); return x_10; } } } } lean_object* l_IO_FS_Stream_chainLeft___elambda__6(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); lean_dec(x_1); x_4 = lean_apply_1(x_3, x_2); return x_4; } } lean_object* l_IO_FS_Stream_chainLeft(lean_object* x_1, lean_object* x_2, uint8_t x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_inc(x_2); x_4 = lean_alloc_closure((void*)(l_IO_FS_Stream_chainLeft___elambda__6), 2, 1); lean_closure_set(x_4, 0, x_2); x_5 = lean_ctor_get(x_1, 1); lean_inc(x_5); x_6 = lean_ctor_get(x_2, 1); lean_inc(x_6); lean_inc(x_5); x_7 = lean_alloc_closure((void*)(l_IO_FS_Stream_chainLeft___elambda__5), 3, 2); lean_closure_set(x_7, 0, x_5); lean_closure_set(x_7, 1, x_6); lean_inc(x_2); x_8 = lean_alloc_closure((void*)(l_IO_FS_Stream_chainLeft___elambda__4___boxed), 3, 1); lean_closure_set(x_8, 0, x_2); x_9 = lean_box(x_3); lean_inc(x_5); lean_inc(x_2); lean_inc(x_1); x_10 = lean_alloc_closure((void*)(l_IO_FS_Stream_chainLeft___elambda__3___boxed), 6, 4); lean_closure_set(x_10, 0, x_1); lean_closure_set(x_10, 1, x_2); lean_closure_set(x_10, 2, x_9); lean_closure_set(x_10, 3, x_5); lean_inc(x_2); x_11 = lean_alloc_closure((void*)(l_IO_FS_Stream_chainLeft___elambda__2), 2, 1); lean_closure_set(x_11, 0, x_2); x_12 = lean_box(x_3); x_13 = lean_alloc_closure((void*)(l_IO_FS_Stream_chainLeft___elambda__1___boxed), 6, 4); lean_closure_set(x_13, 0, x_1); lean_closure_set(x_13, 1, x_2); lean_closure_set(x_13, 2, x_12); lean_closure_set(x_13, 3, x_5); x_14 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_14, 0, x_4); lean_ctor_set(x_14, 1, x_7); lean_ctor_set(x_14, 2, x_8); lean_ctor_set(x_14, 3, x_10); lean_ctor_set(x_14, 4, x_11); lean_ctor_set(x_14, 5, x_13); return x_14; } } lean_object* l_IO_FS_Stream_chainLeft___elambda__1___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_IO_FS_Stream_chainLeft___elambda__1___lambda__1(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } lean_object* l_IO_FS_Stream_chainLeft___elambda__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: { uint8_t x_7; lean_object* x_8; x_7 = lean_unbox(x_3); lean_dec(x_3); x_8 = l_IO_FS_Stream_chainLeft___elambda__1(x_1, x_2, x_7, x_4, x_5, x_6); return x_8; } } lean_object* l_IO_FS_Stream_chainLeft___elambda__3___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_IO_FS_Stream_chainLeft___elambda__3___lambda__1(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } lean_object* l_IO_FS_Stream_chainLeft___elambda__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) { _start: { uint8_t x_7; lean_object* x_8; x_7 = lean_unbox(x_3); lean_dec(x_3); x_8 = l_IO_FS_Stream_chainLeft___elambda__3(x_1, x_2, x_7, x_4, x_5, x_6); return x_8; } } lean_object* l_IO_FS_Stream_chainLeft___elambda__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { size_t x_4; lean_object* x_5; x_4 = lean_unbox_usize(x_2); lean_dec(x_2); x_5 = l_IO_FS_Stream_chainLeft___elambda__4(x_1, x_4, x_3); return x_5; } } lean_object* l_IO_FS_Stream_chainLeft___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { uint8_t x_4; lean_object* x_5; x_4 = lean_unbox(x_3); lean_dec(x_3); x_5 = l_IO_FS_Stream_chainLeft(x_1, x_2, x_4); return x_5; } } lean_object* l_IO_FS_Stream_withPrefix___elambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_ctor_get(x_1, 5); lean_inc(x_5); lean_dec(x_1); x_6 = lean_string_append(x_2, x_3); x_7 = lean_apply_2(x_5, x_6, x_4); return x_7; } } lean_object* l_IO_FS_Stream_withPrefix___elambda__2(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; x_3 = lean_ctor_get(x_1, 4); lean_inc(x_3); lean_dec(x_1); x_4 = lean_apply_1(x_3, x_2); return x_4; } } lean_object* l_IO_FS_Stream_withPrefix___elambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; x_5 = lean_ctor_get(x_1, 5); lean_inc(x_5); x_6 = lean_apply_2(x_5, x_2, x_4); if (lean_obj_tag(x_6) == 0) { lean_object* x_7; lean_object* x_8; lean_object* x_9; x_7 = lean_ctor_get(x_6, 1); lean_inc(x_7); lean_dec(x_6); x_8 = lean_ctor_get(x_1, 3); lean_inc(x_8); lean_dec(x_1); x_9 = lean_apply_2(x_8, x_3, x_7); return x_9; } else { uint8_t x_10; lean_dec(x_3); lean_dec(x_1); x_10 = !lean_is_exclusive(x_6); if (x_10 == 0) { return x_6; } else { lean_object* x_11; lean_object* x_12; lean_object* x_13; x_11 = lean_ctor_get(x_6, 0); x_12 = lean_ctor_get(x_6, 1); lean_inc(x_12); lean_inc(x_11); lean_dec(x_6); x_13 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_13, 0, x_11); lean_ctor_set(x_13, 1, x_12); return x_13; } } } } lean_object* l_IO_FS_Stream_withPrefix___elambda__4(lean_object* x_1, size_t x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; x_4 = lean_ctor_get(x_1, 2); lean_inc(x_4); lean_dec(x_1); x_5 = lean_box_usize(x_2); x_6 = lean_apply_2(x_4, x_5, x_3); return x_6; } } lean_object* l_IO_FS_Stream_withPrefix___elambda__5(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; x_3 = lean_ctor_get(x_1, 1); lean_inc(x_3); lean_dec(x_1); x_4 = lean_apply_1(x_3, x_2); return x_4; } } lean_object* l_IO_FS_Stream_withPrefix___elambda__6(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); lean_dec(x_1); x_4 = lean_apply_1(x_3, x_2); return x_4; } } lean_object* l_IO_FS_Stream_withPrefix(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_inc(x_1); x_3 = lean_alloc_closure((void*)(l_IO_FS_Stream_withPrefix___elambda__6), 2, 1); lean_closure_set(x_3, 0, x_1); lean_inc(x_1); x_4 = lean_alloc_closure((void*)(l_IO_FS_Stream_withPrefix___elambda__5), 2, 1); lean_closure_set(x_4, 0, x_1); lean_inc(x_1); x_5 = lean_alloc_closure((void*)(l_IO_FS_Stream_withPrefix___elambda__4___boxed), 3, 1); lean_closure_set(x_5, 0, x_1); lean_inc(x_2); lean_inc(x_1); x_6 = lean_alloc_closure((void*)(l_IO_FS_Stream_withPrefix___elambda__3), 4, 2); lean_closure_set(x_6, 0, x_1); lean_closure_set(x_6, 1, x_2); lean_inc(x_1); x_7 = lean_alloc_closure((void*)(l_IO_FS_Stream_withPrefix___elambda__2), 2, 1); lean_closure_set(x_7, 0, x_1); x_8 = lean_alloc_closure((void*)(l_IO_FS_Stream_withPrefix___elambda__1___boxed), 4, 2); lean_closure_set(x_8, 0, x_1); lean_closure_set(x_8, 1, x_2); x_9 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_9, 0, x_3); lean_ctor_set(x_9, 1, x_4); lean_ctor_set(x_9, 2, x_5); lean_ctor_set(x_9, 3, x_6); lean_ctor_set(x_9, 4, x_7); lean_ctor_set(x_9, 5, x_8); return x_9; } } lean_object* l_IO_FS_Stream_withPrefix___elambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_IO_FS_Stream_withPrefix___elambda__1(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } lean_object* l_IO_FS_Stream_withPrefix___elambda__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { size_t x_4; lean_object* x_5; x_4 = lean_unbox_usize(x_2); lean_dec(x_2); x_5 = l_IO_FS_Stream_withPrefix___elambda__4(x_1, x_4, x_3); return x_5; } } static lean_object* _init_l_Lean_Server_instInhabitedDocumentMeta___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l_Lean_instInhabitedParserDescr___closed__1; x_2 = lean_unsigned_to_nat(0u); x_3 = l_Lean_instInhabitedFileMap___closed__1; x_4 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_4, 0, x_1); lean_ctor_set(x_4, 1, x_2); lean_ctor_set(x_4, 2, x_3); return x_4; } } static lean_object* _init_l_Lean_Server_instInhabitedDocumentMeta() { _start: { lean_object* x_1; x_1 = l_Lean_Server_instInhabitedDocumentMeta___closed__1; return x_1; } } lean_object* l_Lean_Server_replaceLspRange(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_4 = lean_ctor_get(x_2, 0); lean_inc(x_4); x_5 = l_Lean_FileMap_lspPosToUtf8Pos(x_1, x_4); x_6 = lean_ctor_get(x_2, 1); lean_inc(x_6); lean_dec(x_2); x_7 = l_Lean_FileMap_lspPosToUtf8Pos(x_1, x_6); x_8 = lean_ctor_get(x_1, 0); x_9 = lean_unsigned_to_nat(0u); x_10 = lean_string_utf8_extract(x_8, x_9, x_5); lean_dec(x_5); x_11 = lean_string_utf8_byte_size(x_8); x_12 = lean_string_utf8_extract(x_8, x_7, x_11); lean_dec(x_11); lean_dec(x_7); x_13 = lean_string_append(x_10, x_3); x_14 = lean_string_append(x_13, x_12); lean_dec(x_12); x_15 = l_Lean_FileMap_ofString(x_14); return x_15; } } lean_object* l_Lean_Server_replaceLspRange___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_Server_replaceLspRange(x_1, x_2, x_3); lean_dec(x_3); lean_dec(x_1); return x_4; } } lean_object* l_Lean_Server_maybeTee_match__1___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_box(0); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_apply_1(x_3, x_6); return x_7; } } } lean_object* l_Lean_Server_maybeTee_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_maybeTee_match__1___rarg), 3, 0); return x_2; } } lean_object* l_IO_FS_Handle_mk___at_Lean_Server_maybeTee___spec__1(lean_object* x_1, uint8_t x_2, uint8_t x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; x_5 = l_IO_Prim_fopenFlags(x_2, x_3); x_6 = lean_io_prim_handle_mk(x_1, x_5, x_4); lean_dec(x_5); return x_6; } } static lean_object* _init_l_Lean_Server_maybeTee___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("LEAN_SERVER_LOG_DIR"); return x_1; } } lean_object* l_Lean_Server_maybeTee(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; x_5 = l_Lean_Server_maybeTee___closed__1; x_6 = lean_io_getenv(x_5, x_4); if (lean_obj_tag(x_6) == 0) { lean_object* x_7; x_7 = lean_ctor_get(x_6, 0); lean_inc(x_7); if (lean_obj_tag(x_7) == 0) { uint8_t x_8; lean_dec(x_1); x_8 = !lean_is_exclusive(x_6); if (x_8 == 0) { lean_object* x_9; x_9 = lean_ctor_get(x_6, 0); lean_dec(x_9); lean_ctor_set(x_6, 0, x_3); return x_6; } else { lean_object* x_10; lean_object* x_11; x_10 = lean_ctor_get(x_6, 1); lean_inc(x_10); lean_dec(x_6); x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_3); lean_ctor_set(x_11, 1, x_10); return x_11; } } else { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; uint8_t x_19; lean_object* x_20; x_12 = lean_ctor_get(x_6, 1); lean_inc(x_12); lean_dec(x_6); x_13 = lean_ctor_get(x_7, 0); lean_inc(x_13); lean_dec(x_7); x_14 = lean_box(0); x_15 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_15, 0, x_1); lean_ctor_set(x_15, 1, x_14); x_16 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_16, 0, x_13); lean_ctor_set(x_16, 1, x_15); x_17 = l_System_mkFilePath(x_16); x_18 = 1; x_19 = 1; x_20 = l_IO_FS_Handle_mk___at_Lean_Server_maybeTee___spec__1(x_17, x_18, x_19, x_12); lean_dec(x_17); if (lean_obj_tag(x_20) == 0) { uint8_t x_21; x_21 = !lean_is_exclusive(x_20); if (x_21 == 0) { lean_object* x_22; lean_object* x_23; x_22 = lean_ctor_get(x_20, 0); x_23 = lean_stream_of_handle(x_22); if (x_2 == 0) { lean_object* x_24; x_24 = l_IO_FS_Stream_chainRight(x_3, x_23, x_19); lean_ctor_set(x_20, 0, x_24); return x_20; } else { lean_object* x_25; x_25 = l_IO_FS_Stream_chainLeft(x_23, x_3, x_19); lean_ctor_set(x_20, 0, x_25); return x_20; } } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; x_26 = lean_ctor_get(x_20, 0); x_27 = lean_ctor_get(x_20, 1); lean_inc(x_27); lean_inc(x_26); lean_dec(x_20); x_28 = lean_stream_of_handle(x_26); if (x_2 == 0) { lean_object* x_29; lean_object* x_30; x_29 = l_IO_FS_Stream_chainRight(x_3, x_28, x_19); x_30 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_30, 0, x_29); lean_ctor_set(x_30, 1, x_27); return x_30; } else { lean_object* x_31; lean_object* x_32; x_31 = l_IO_FS_Stream_chainLeft(x_28, x_3, x_19); x_32 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_32, 0, x_31); lean_ctor_set(x_32, 1, x_27); return x_32; } } } else { uint8_t x_33; lean_dec(x_3); x_33 = !lean_is_exclusive(x_20); if (x_33 == 0) { return x_20; } else { lean_object* x_34; lean_object* x_35; lean_object* x_36; x_34 = lean_ctor_get(x_20, 0); x_35 = lean_ctor_get(x_20, 1); lean_inc(x_35); lean_inc(x_34); lean_dec(x_20); 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; } } } } else { uint8_t x_37; lean_dec(x_3); lean_dec(x_1); x_37 = !lean_is_exclusive(x_6); if (x_37 == 0) { return x_6; } else { lean_object* x_38; lean_object* x_39; lean_object* x_40; x_38 = lean_ctor_get(x_6, 0); x_39 = lean_ctor_get(x_6, 1); lean_inc(x_39); lean_inc(x_38); lean_dec(x_6); 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* l_IO_FS_Handle_mk___at_Lean_Server_maybeTee___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { uint8_t x_5; uint8_t x_6; lean_object* x_7; x_5 = lean_unbox(x_2); lean_dec(x_2); x_6 = lean_unbox(x_3); lean_dec(x_3); x_7 = l_IO_FS_Handle_mk___at_Lean_Server_maybeTee___spec__1(x_1, x_5, x_6, x_4); lean_dec(x_1); return x_7; } } lean_object* l_Lean_Server_maybeTee___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { uint8_t x_5; lean_object* x_6; x_5 = lean_unbox(x_2); lean_dec(x_2); x_6 = l_Lean_Server_maybeTee(x_1, x_5, x_3, x_4); return x_6; } } lean_object* l_String_mapAux___at_Lean_Server_toFileUri___spec__1(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; x_3 = lean_string_utf8_at_end(x_2, x_1); if (x_3 == 0) { uint32_t x_4; uint32_t x_5; uint8_t x_6; x_4 = lean_string_utf8_get(x_2, x_1); x_5 = 92; x_6 = x_4 == x_5; if (x_6 == 0) { lean_object* x_7; lean_object* x_8; x_7 = lean_string_utf8_set(x_2, x_1, x_4); x_8 = lean_string_utf8_next(x_7, x_1); lean_dec(x_1); x_1 = x_8; x_2 = x_7; goto _start; } else { uint32_t x_10; lean_object* x_11; lean_object* x_12; x_10 = 47; x_11 = lean_string_utf8_set(x_2, x_1, x_10); x_12 = lean_string_utf8_next(x_11, x_1); lean_dec(x_1); x_1 = x_12; x_2 = x_11; goto _start; } } else { lean_dec(x_1); return x_2; } } } uint8_t l_Lean_Server_toFileUri___lambda__1(uint32_t x_1) { _start: { uint32_t x_2; uint8_t x_3; x_2 = 47; x_3 = x_1 == x_2; return x_3; } } static lean_object* _init_l_Lean_Server_toFileUri___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_Lean_Server_toFileUri___lambda__1___boxed), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Server_toFileUri___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("file:///"); return x_1; } } lean_object* l_Lean_Server_toFileUri(lean_object* x_1) { _start: { lean_object* x_2; uint8_t x_3; x_2 = l_System_FilePath_normalizePath(x_1); x_3 = l_System_Platform_isWindows; if (x_3 == 0) { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; x_4 = l_Lean_Server_toFileUri___closed__1; x_5 = l_String_dropWhile(x_2, x_4); lean_dec(x_2); x_6 = l_Lean_Server_toFileUri___closed__2; x_7 = lean_string_append(x_6, x_5); lean_dec(x_5); return x_7; } else { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_8 = lean_unsigned_to_nat(0u); x_9 = l_String_mapAux___at_Lean_Server_toFileUri___spec__1(x_8, x_2); x_10 = l_Lean_Server_toFileUri___closed__1; x_11 = l_String_dropWhile(x_9, x_10); lean_dec(x_9); x_12 = l_Lean_Server_toFileUri___closed__2; x_13 = lean_string_append(x_12, x_11); lean_dec(x_11); return x_13; } } } lean_object* l_Lean_Server_toFileUri___lambda__1___boxed(lean_object* x_1) { _start: { uint32_t x_2; uint8_t x_3; lean_object* x_4; x_2 = lean_unbox_uint32(x_1); lean_dec(x_1); x_3 = l_Lean_Server_toFileUri___lambda__1(x_2); x_4 = lean_box(x_3); return x_4; } } lean_object* l_Lean_Server_foldDocumentChanges_match__1___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_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_object* x_8; lean_dec(x_2); x_7 = lean_ctor_get(x_1, 0); lean_inc(x_7); lean_dec(x_1); x_8 = lean_apply_1(x_3, x_7); return x_8; } } } lean_object* l_Lean_Server_foldDocumentChanges_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_foldDocumentChanges_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Server_foldDocumentChanges_match__2___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_2(x_2, x_3, x_4); return x_5; } } lean_object* l_Lean_Server_foldDocumentChanges_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_foldDocumentChanges_match__2___rarg), 2, 0); return x_2; } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Server_foldDocumentChanges___spec__1(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5) { _start: { uint8_t x_6; x_6 = x_3 == x_4; if (x_6 == 0) { lean_object* x_7; size_t x_8; size_t x_9; x_7 = lean_array_uget(x_2, x_3); x_8 = 1; x_9 = x_3 + x_8; if (lean_obj_tag(x_7) == 0) { uint8_t x_10; x_10 = !lean_is_exclusive(x_5); if (x_10 == 0) { 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; x_11 = lean_ctor_get(x_5, 0); x_12 = lean_ctor_get(x_5, 1); x_13 = lean_ctor_get(x_7, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_7, 1); lean_inc(x_14); lean_dec(x_7); x_15 = lean_ctor_get(x_13, 0); lean_inc(x_15); x_16 = l_Lean_FileMap_lspPosToUtf8Pos(x_1, x_15); x_17 = l_Lean_Server_replaceLspRange(x_11, x_13, x_14); lean_dec(x_14); lean_dec(x_11); x_18 = l_Nat_min(x_12, x_16); lean_dec(x_16); lean_dec(x_12); lean_ctor_set(x_5, 1, x_18); lean_ctor_set(x_5, 0, x_17); x_3 = x_9; goto _start; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; x_20 = lean_ctor_get(x_5, 0); x_21 = lean_ctor_get(x_5, 1); lean_inc(x_21); lean_inc(x_20); lean_dec(x_5); x_22 = lean_ctor_get(x_7, 0); lean_inc(x_22); x_23 = lean_ctor_get(x_7, 1); lean_inc(x_23); lean_dec(x_7); x_24 = lean_ctor_get(x_22, 0); lean_inc(x_24); x_25 = l_Lean_FileMap_lspPosToUtf8Pos(x_1, x_24); x_26 = l_Lean_Server_replaceLspRange(x_20, x_22, x_23); lean_dec(x_23); lean_dec(x_20); x_27 = l_Nat_min(x_21, x_25); lean_dec(x_25); lean_dec(x_21); x_28 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_28, 0, x_26); lean_ctor_set(x_28, 1, x_27); x_3 = x_9; x_5 = x_28; goto _start; } } else { uint8_t x_30; x_30 = !lean_is_exclusive(x_5); if (x_30 == 0) { lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; x_31 = lean_ctor_get(x_5, 1); lean_dec(x_31); x_32 = lean_ctor_get(x_5, 0); lean_dec(x_32); x_33 = lean_ctor_get(x_7, 0); lean_inc(x_33); lean_dec(x_7); x_34 = l_Lean_FileMap_ofString(x_33); x_35 = lean_unsigned_to_nat(0u); lean_ctor_set(x_5, 1, x_35); lean_ctor_set(x_5, 0, x_34); x_3 = x_9; goto _start; } else { lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_dec(x_5); x_37 = lean_ctor_get(x_7, 0); lean_inc(x_37); lean_dec(x_7); x_38 = l_Lean_FileMap_ofString(x_37); x_39 = lean_unsigned_to_nat(0u); x_40 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_40, 0, x_38); lean_ctor_set(x_40, 1, x_39); x_3 = x_9; x_5 = x_40; goto _start; } } } else { return x_5; } } } static lean_object* _init_l_Lean_Server_foldDocumentChanges___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_instInhabitedFileMap; x_2 = l_instInhabitedNat; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_Server_foldDocumentChanges___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("Lean.Server.Utils"); return x_1; } } static lean_object* _init_l_Lean_Server_foldDocumentChanges___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("Lean.Server.foldDocumentChanges"); return x_1; } } static lean_object* _init_l_Lean_Server_foldDocumentChanges___closed__4() { _start: { lean_object* x_1; x_1 = lean_mk_string("Lean.Server.foldDocumentChanges: empty change array"); return x_1; } } static lean_object* _init_l_Lean_Server_foldDocumentChanges___closed__5() { _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_Server_foldDocumentChanges___closed__2; x_2 = l_Lean_Server_foldDocumentChanges___closed__3; x_3 = lean_unsigned_to_nat(110u); x_4 = lean_unsigned_to_nat(26u); x_5 = l_Lean_Server_foldDocumentChanges___closed__4; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); return x_6; } } lean_object* l_Lean_Server_foldDocumentChanges(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; x_3 = l_Array_isEmpty___rarg(x_1); if (x_3 == 0) { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; x_4 = lean_unsigned_to_nat(4294967295u); lean_inc(x_2); x_5 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_5, 0, x_2); lean_ctor_set(x_5, 1, x_4); x_6 = lean_array_get_size(x_1); x_7 = lean_unsigned_to_nat(0u); x_8 = lean_nat_dec_lt(x_7, x_6); if (x_8 == 0) { lean_dec(x_6); lean_dec(x_2); return x_5; } else { uint8_t x_9; x_9 = lean_nat_dec_le(x_6, x_6); if (x_9 == 0) { lean_dec(x_6); lean_dec(x_2); return x_5; } else { size_t x_10; size_t x_11; lean_object* x_12; x_10 = 0; x_11 = lean_usize_of_nat(x_6); lean_dec(x_6); x_12 = l_Array_foldlMUnsafe_fold___at_Lean_Server_foldDocumentChanges___spec__1(x_2, x_1, x_10, x_11, x_5); lean_dec(x_2); return x_12; } } } else { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_dec(x_2); x_13 = l_Lean_Server_foldDocumentChanges___closed__1; x_14 = l_Lean_Server_foldDocumentChanges___closed__5; x_15 = lean_panic_fn(x_13, x_14); return x_15; } } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Server_foldDocumentChanges___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { size_t x_6; size_t x_7; lean_object* x_8; x_6 = lean_unbox_usize(x_3); lean_dec(x_3); x_7 = lean_unbox_usize(x_4); lean_dec(x_4); x_8 = l_Array_foldlMUnsafe_fold___at_Lean_Server_foldDocumentChanges___spec__1(x_1, x_2, x_6, x_7, x_5); lean_dec(x_2); lean_dec(x_1); return x_8; } } lean_object* l_Lean_Server_foldDocumentChanges___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Server_foldDocumentChanges(x_1, x_2); lean_dec(x_1); return x_3; } } lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_publishDiagnostics___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_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101_(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_writeLspNotification___at_Lean_Server_publishDiagnostics___spec__1(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_publishDiagnostics___spec__2(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_publishDiagnostics(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 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_nat_to_int(x_6); x_8 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_8, 0, x_7); x_9 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_9, 0, x_5); lean_ctor_set(x_9, 1, x_8); lean_ctor_set(x_9, 2, x_2); x_10 = l_Lean_Lsp_Ipc_collectDiagnostics_loop_match__2___rarg___closed__1; x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_9); x_12 = l_IO_FS_Stream_writeLspNotification___at_Lean_Server_publishDiagnostics___spec__1(x_3, x_11, x_4); return x_12; } } lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__3(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5) { _start: { uint8_t x_6; x_6 = x_3 < x_2; if (x_6 == 0) { lean_object* x_7; lean_object* x_8; lean_dec(x_1); x_7 = x_4; x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_7); lean_ctor_set(x_8, 1, x_5); return x_8; } else { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_9 = lean_array_uget(x_4, x_3); x_10 = lean_unsigned_to_nat(0u); x_11 = lean_array_uset(x_4, x_3, x_10); x_12 = x_9; lean_inc(x_1); x_13 = l_Std_PersistentArray_mapMAux___at_Lean_Server_publishMessages___spec__2(x_1, x_12, x_5); if (lean_obj_tag(x_13) == 0) { lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18; lean_object* x_19; x_14 = lean_ctor_get(x_13, 0); lean_inc(x_14); x_15 = lean_ctor_get(x_13, 1); lean_inc(x_15); lean_dec(x_13); x_16 = 1; x_17 = x_3 + x_16; x_18 = x_14; x_19 = lean_array_uset(x_11, x_3, x_18); x_3 = x_17; x_4 = x_19; x_5 = x_15; goto _start; } else { uint8_t x_21; lean_dec(x_11); lean_dec(x_1); x_21 = !lean_is_exclusive(x_13); if (x_21 == 0) { return x_13; } else { lean_object* x_22; lean_object* x_23; lean_object* x_24; x_22 = lean_ctor_get(x_13, 0); x_23 = lean_ctor_get(x_13, 1); lean_inc(x_23); lean_inc(x_22); lean_dec(x_13); x_24 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_24, 0, x_22); lean_ctor_set(x_24, 1, x_23); return x_24; } } } } } lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__4(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; uint8_t x_7; x_6 = lean_ctor_get(x_1, 2); x_7 = x_3 < x_2; if (x_7 == 0) { lean_object* x_8; lean_object* x_9; x_8 = x_4; x_9 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_9, 0, x_8); lean_ctor_set(x_9, 1, x_5); return x_9; } else { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_10 = lean_array_uget(x_4, x_3); x_11 = lean_unsigned_to_nat(0u); x_12 = lean_array_uset(x_4, x_3, x_11); x_13 = x_10; x_14 = l_Lean_Lsp_msgToDiagnostic(x_6, x_13, x_5); if (lean_obj_tag(x_14) == 0) { lean_object* x_15; lean_object* x_16; size_t x_17; size_t x_18; lean_object* x_19; lean_object* x_20; x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); x_16 = lean_ctor_get(x_14, 1); lean_inc(x_16); lean_dec(x_14); x_17 = 1; x_18 = x_3 + x_17; x_19 = x_15; x_20 = lean_array_uset(x_12, x_3, x_19); x_3 = x_18; x_4 = x_20; x_5 = x_16; goto _start; } else { uint8_t x_22; lean_dec(x_12); x_22 = !lean_is_exclusive(x_14); if (x_22 == 0) { return x_14; } else { lean_object* x_23; lean_object* x_24; lean_object* x_25; x_23 = lean_ctor_get(x_14, 0); x_24 = lean_ctor_get(x_14, 1); lean_inc(x_24); lean_inc(x_23); lean_dec(x_14); 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; } } } } } static lean_object* _init_l_Std_PersistentArray_mapMAux___at_Lean_Server_publishMessages___spec__2___boxed__const__1() { _start: { size_t x_1; lean_object* x_2; x_1 = 0; x_2 = lean_box_usize(x_1); return x_2; } } lean_object* l_Std_PersistentArray_mapMAux___at_Lean_Server_publishMessages___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_2) == 0) { uint8_t x_4; x_4 = !lean_is_exclusive(x_2); if (x_4 == 0) { lean_object* x_5; lean_object* x_6; size_t x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_5 = lean_ctor_get(x_2, 0); x_6 = lean_array_get_size(x_5); x_7 = lean_usize_of_nat(x_6); lean_dec(x_6); x_8 = x_5; x_9 = lean_box_usize(x_7); x_10 = l_Std_PersistentArray_mapMAux___at_Lean_Server_publishMessages___spec__2___boxed__const__1; x_11 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__3___boxed), 5, 4); lean_closure_set(x_11, 0, x_1); lean_closure_set(x_11, 1, x_9); lean_closure_set(x_11, 2, x_10); lean_closure_set(x_11, 3, x_8); x_12 = x_11; x_13 = lean_apply_1(x_12, x_3); if (lean_obj_tag(x_13) == 0) { uint8_t x_14; x_14 = !lean_is_exclusive(x_13); if (x_14 == 0) { lean_object* x_15; x_15 = lean_ctor_get(x_13, 0); lean_ctor_set(x_2, 0, x_15); lean_ctor_set(x_13, 0, x_2); return x_13; } else { lean_object* x_16; lean_object* x_17; lean_object* x_18; x_16 = lean_ctor_get(x_13, 0); x_17 = lean_ctor_get(x_13, 1); lean_inc(x_17); lean_inc(x_16); lean_dec(x_13); lean_ctor_set(x_2, 0, x_16); x_18 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_18, 0, x_2); lean_ctor_set(x_18, 1, x_17); return x_18; } } else { uint8_t x_19; lean_free_object(x_2); x_19 = !lean_is_exclusive(x_13); if (x_19 == 0) { return x_13; } else { 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_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 { lean_object* x_23; lean_object* x_24; size_t x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; x_23 = lean_ctor_get(x_2, 0); lean_inc(x_23); lean_dec(x_2); x_24 = lean_array_get_size(x_23); x_25 = lean_usize_of_nat(x_24); lean_dec(x_24); x_26 = x_23; x_27 = lean_box_usize(x_25); x_28 = l_Std_PersistentArray_mapMAux___at_Lean_Server_publishMessages___spec__2___boxed__const__1; x_29 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__3___boxed), 5, 4); lean_closure_set(x_29, 0, x_1); lean_closure_set(x_29, 1, x_27); lean_closure_set(x_29, 2, x_28); lean_closure_set(x_29, 3, x_26); x_30 = x_29; x_31 = lean_apply_1(x_30, x_3); if (lean_obj_tag(x_31) == 0) { lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; x_32 = lean_ctor_get(x_31, 0); lean_inc(x_32); x_33 = lean_ctor_get(x_31, 1); lean_inc(x_33); if (lean_is_exclusive(x_31)) { lean_ctor_release(x_31, 0); lean_ctor_release(x_31, 1); x_34 = x_31; } else { lean_dec_ref(x_31); x_34 = lean_box(0); } x_35 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_35, 0, x_32); if (lean_is_scalar(x_34)) { x_36 = lean_alloc_ctor(0, 2, 0); } else { x_36 = x_34; } lean_ctor_set(x_36, 0, x_35); lean_ctor_set(x_36, 1, x_33); return x_36; } else { lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; x_37 = lean_ctor_get(x_31, 0); lean_inc(x_37); x_38 = lean_ctor_get(x_31, 1); lean_inc(x_38); if (lean_is_exclusive(x_31)) { lean_ctor_release(x_31, 0); lean_ctor_release(x_31, 1); x_39 = x_31; } else { lean_dec_ref(x_31); x_39 = lean_box(0); } if (lean_is_scalar(x_39)) { x_40 = lean_alloc_ctor(1, 2, 0); } else { x_40 = x_39; } lean_ctor_set(x_40, 0, x_37); lean_ctor_set(x_40, 1, x_38); return x_40; } } } else { uint8_t x_41; x_41 = !lean_is_exclusive(x_2); if (x_41 == 0) { lean_object* x_42; lean_object* x_43; size_t 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; x_42 = lean_ctor_get(x_2, 0); x_43 = lean_array_get_size(x_42); x_44 = lean_usize_of_nat(x_43); lean_dec(x_43); x_45 = x_42; x_46 = lean_box_usize(x_44); x_47 = l_Std_PersistentArray_mapMAux___at_Lean_Server_publishMessages___spec__2___boxed__const__1; x_48 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__4___boxed), 5, 4); lean_closure_set(x_48, 0, x_1); lean_closure_set(x_48, 1, x_46); lean_closure_set(x_48, 2, x_47); lean_closure_set(x_48, 3, x_45); x_49 = x_48; x_50 = lean_apply_1(x_49, x_3); if (lean_obj_tag(x_50) == 0) { uint8_t x_51; x_51 = !lean_is_exclusive(x_50); if (x_51 == 0) { lean_object* x_52; x_52 = lean_ctor_get(x_50, 0); lean_ctor_set(x_2, 0, x_52); lean_ctor_set(x_50, 0, x_2); return x_50; } else { lean_object* x_53; lean_object* x_54; lean_object* x_55; x_53 = lean_ctor_get(x_50, 0); x_54 = lean_ctor_get(x_50, 1); lean_inc(x_54); lean_inc(x_53); lean_dec(x_50); lean_ctor_set(x_2, 0, x_53); x_55 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_55, 0, x_2); lean_ctor_set(x_55, 1, x_54); return x_55; } } else { uint8_t x_56; lean_free_object(x_2); x_56 = !lean_is_exclusive(x_50); if (x_56 == 0) { return x_50; } else { lean_object* x_57; lean_object* x_58; lean_object* x_59; x_57 = lean_ctor_get(x_50, 0); x_58 = lean_ctor_get(x_50, 1); lean_inc(x_58); lean_inc(x_57); lean_dec(x_50); x_59 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_59, 0, x_57); lean_ctor_set(x_59, 1, x_58); return x_59; } } } else { lean_object* x_60; lean_object* x_61; size_t 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_60 = lean_ctor_get(x_2, 0); lean_inc(x_60); lean_dec(x_2); x_61 = lean_array_get_size(x_60); x_62 = lean_usize_of_nat(x_61); lean_dec(x_61); x_63 = x_60; x_64 = lean_box_usize(x_62); x_65 = l_Std_PersistentArray_mapMAux___at_Lean_Server_publishMessages___spec__2___boxed__const__1; x_66 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__4___boxed), 5, 4); lean_closure_set(x_66, 0, x_1); lean_closure_set(x_66, 1, x_64); lean_closure_set(x_66, 2, x_65); lean_closure_set(x_66, 3, x_63); x_67 = x_66; x_68 = lean_apply_1(x_67, x_3); if (lean_obj_tag(x_68) == 0) { lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; x_69 = lean_ctor_get(x_68, 0); lean_inc(x_69); x_70 = lean_ctor_get(x_68, 1); lean_inc(x_70); if (lean_is_exclusive(x_68)) { lean_ctor_release(x_68, 0); lean_ctor_release(x_68, 1); x_71 = x_68; } else { lean_dec_ref(x_68); x_71 = lean_box(0); } x_72 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_72, 0, x_69); if (lean_is_scalar(x_71)) { x_73 = lean_alloc_ctor(0, 2, 0); } else { x_73 = x_71; } lean_ctor_set(x_73, 0, x_72); lean_ctor_set(x_73, 1, x_70); return x_73; } else { lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; x_74 = lean_ctor_get(x_68, 0); lean_inc(x_74); x_75 = lean_ctor_get(x_68, 1); lean_inc(x_75); if (lean_is_exclusive(x_68)) { lean_ctor_release(x_68, 0); lean_ctor_release(x_68, 1); x_76 = x_68; } else { lean_dec_ref(x_68); x_76 = lean_box(0); } if (lean_is_scalar(x_76)) { x_77 = lean_alloc_ctor(1, 2, 0); } else { x_77 = x_76; } lean_ctor_set(x_77, 0, x_74); lean_ctor_set(x_77, 1, x_75); return x_77; } } } } } lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__5(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; uint8_t x_7; x_6 = lean_ctor_get(x_1, 2); x_7 = x_3 < x_2; if (x_7 == 0) { lean_object* x_8; lean_object* x_9; x_8 = x_4; x_9 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_9, 0, x_8); lean_ctor_set(x_9, 1, x_5); return x_9; } else { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_10 = lean_array_uget(x_4, x_3); x_11 = lean_unsigned_to_nat(0u); x_12 = lean_array_uset(x_4, x_3, x_11); x_13 = x_10; x_14 = l_Lean_Lsp_msgToDiagnostic(x_6, x_13, x_5); if (lean_obj_tag(x_14) == 0) { lean_object* x_15; lean_object* x_16; size_t x_17; size_t x_18; lean_object* x_19; lean_object* x_20; x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); x_16 = lean_ctor_get(x_14, 1); lean_inc(x_16); lean_dec(x_14); x_17 = 1; x_18 = x_3 + x_17; x_19 = x_15; x_20 = lean_array_uset(x_12, x_3, x_19); x_3 = x_18; x_4 = x_20; x_5 = x_16; goto _start; } else { uint8_t x_22; lean_dec(x_12); x_22 = !lean_is_exclusive(x_14); if (x_22 == 0) { return x_14; } else { lean_object* x_23; lean_object* x_24; lean_object* x_25; x_23 = lean_ctor_get(x_14, 0); x_24 = lean_ctor_get(x_14, 1); lean_inc(x_24); lean_inc(x_23); lean_dec(x_14); 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; } } } } } static lean_object* _init_l_Std_PersistentArray_mapM___at_Lean_Server_publishMessages___spec__1___boxed__const__1() { _start: { size_t x_1; lean_object* x_2; x_1 = 0; x_2 = lean_box_usize(x_1); return x_2; } } lean_object* l_Std_PersistentArray_mapM___at_Lean_Server_publishMessages___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { uint8_t x_4; x_4 = !lean_is_exclusive(x_2); if (x_4 == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_5 = lean_ctor_get(x_2, 0); x_6 = lean_ctor_get(x_2, 1); x_7 = lean_ctor_get(x_2, 2); x_8 = lean_ctor_get(x_2, 3); lean_inc(x_1); x_9 = l_Std_PersistentArray_mapMAux___at_Lean_Server_publishMessages___spec__2(x_1, x_5, x_3); if (lean_obj_tag(x_9) == 0) { lean_object* x_10; lean_object* x_11; lean_object* x_12; size_t x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; 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_array_get_size(x_6); x_13 = lean_usize_of_nat(x_12); lean_dec(x_12); x_14 = x_6; x_15 = lean_box_usize(x_13); x_16 = l_Std_PersistentArray_mapM___at_Lean_Server_publishMessages___spec__1___boxed__const__1; x_17 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__5___boxed), 5, 4); lean_closure_set(x_17, 0, x_1); lean_closure_set(x_17, 1, x_15); lean_closure_set(x_17, 2, x_16); lean_closure_set(x_17, 3, x_14); x_18 = x_17; x_19 = lean_apply_1(x_18, x_11); if (lean_obj_tag(x_19) == 0) { uint8_t x_20; x_20 = !lean_is_exclusive(x_19); if (x_20 == 0) { lean_object* x_21; x_21 = lean_ctor_get(x_19, 0); lean_ctor_set(x_2, 1, x_21); lean_ctor_set(x_2, 0, x_10); lean_ctor_set(x_19, 0, x_2); return x_19; } else { lean_object* x_22; lean_object* x_23; lean_object* x_24; x_22 = lean_ctor_get(x_19, 0); x_23 = lean_ctor_get(x_19, 1); lean_inc(x_23); lean_inc(x_22); lean_dec(x_19); lean_ctor_set(x_2, 1, x_22); lean_ctor_set(x_2, 0, x_10); x_24 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_24, 0, x_2); lean_ctor_set(x_24, 1, x_23); return x_24; } } else { uint8_t x_25; lean_dec(x_10); lean_free_object(x_2); lean_dec(x_8); lean_dec(x_7); x_25 = !lean_is_exclusive(x_19); if (x_25 == 0) { return x_19; } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; x_26 = lean_ctor_get(x_19, 0); x_27 = lean_ctor_get(x_19, 1); lean_inc(x_27); lean_inc(x_26); lean_dec(x_19); x_28 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_28, 0, x_26); lean_ctor_set(x_28, 1, x_27); return x_28; } } } else { uint8_t x_29; lean_free_object(x_2); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_1); x_29 = !lean_is_exclusive(x_9); if (x_29 == 0) { return x_9; } else { lean_object* x_30; lean_object* x_31; lean_object* x_32; x_30 = lean_ctor_get(x_9, 0); x_31 = lean_ctor_get(x_9, 1); lean_inc(x_31); lean_inc(x_30); lean_dec(x_9); x_32 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_32, 0, x_30); lean_ctor_set(x_32, 1, x_31); return x_32; } } } else { lean_object* x_33; lean_object* x_34; lean_object* x_35; size_t x_36; lean_object* x_37; lean_object* x_38; x_33 = lean_ctor_get(x_2, 0); x_34 = lean_ctor_get(x_2, 1); x_35 = lean_ctor_get(x_2, 2); x_36 = lean_ctor_get_usize(x_2, 4); x_37 = lean_ctor_get(x_2, 3); lean_inc(x_37); lean_inc(x_35); lean_inc(x_34); lean_inc(x_33); lean_dec(x_2); lean_inc(x_1); x_38 = l_Std_PersistentArray_mapMAux___at_Lean_Server_publishMessages___spec__2(x_1, x_33, x_3); if (lean_obj_tag(x_38) == 0) { lean_object* x_39; lean_object* x_40; lean_object* x_41; size_t 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_39 = lean_ctor_get(x_38, 0); lean_inc(x_39); x_40 = lean_ctor_get(x_38, 1); lean_inc(x_40); lean_dec(x_38); x_41 = lean_array_get_size(x_34); x_42 = lean_usize_of_nat(x_41); lean_dec(x_41); x_43 = x_34; x_44 = lean_box_usize(x_42); x_45 = l_Std_PersistentArray_mapM___at_Lean_Server_publishMessages___spec__1___boxed__const__1; x_46 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__5___boxed), 5, 4); lean_closure_set(x_46, 0, x_1); lean_closure_set(x_46, 1, x_44); lean_closure_set(x_46, 2, x_45); lean_closure_set(x_46, 3, x_43); x_47 = x_46; x_48 = lean_apply_1(x_47, x_40); if (lean_obj_tag(x_48) == 0) { lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; x_49 = lean_ctor_get(x_48, 0); lean_inc(x_49); x_50 = lean_ctor_get(x_48, 1); lean_inc(x_50); if (lean_is_exclusive(x_48)) { lean_ctor_release(x_48, 0); lean_ctor_release(x_48, 1); x_51 = x_48; } else { lean_dec_ref(x_48); x_51 = lean_box(0); } x_52 = lean_alloc_ctor(0, 4, sizeof(size_t)*1); lean_ctor_set(x_52, 0, x_39); lean_ctor_set(x_52, 1, x_49); lean_ctor_set(x_52, 2, x_35); lean_ctor_set(x_52, 3, x_37); lean_ctor_set_usize(x_52, 4, x_36); if (lean_is_scalar(x_51)) { x_53 = lean_alloc_ctor(0, 2, 0); } else { x_53 = x_51; } lean_ctor_set(x_53, 0, x_52); lean_ctor_set(x_53, 1, x_50); return x_53; } else { lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_dec(x_39); lean_dec(x_37); lean_dec(x_35); x_54 = lean_ctor_get(x_48, 0); lean_inc(x_54); x_55 = lean_ctor_get(x_48, 1); lean_inc(x_55); if (lean_is_exclusive(x_48)) { lean_ctor_release(x_48, 0); lean_ctor_release(x_48, 1); x_56 = x_48; } else { lean_dec_ref(x_48); x_56 = lean_box(0); } if (lean_is_scalar(x_56)) { x_57 = lean_alloc_ctor(1, 2, 0); } else { x_57 = x_56; } lean_ctor_set(x_57, 0, x_54); lean_ctor_set(x_57, 1, x_55); return x_57; } } else { lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_dec(x_37); lean_dec(x_35); lean_dec(x_34); lean_dec(x_1); x_58 = lean_ctor_get(x_38, 0); lean_inc(x_58); x_59 = lean_ctor_get(x_38, 1); lean_inc(x_59); if (lean_is_exclusive(x_38)) { lean_ctor_release(x_38, 0); lean_ctor_release(x_38, 1); x_60 = x_38; } else { lean_dec_ref(x_38); x_60 = lean_box(0); } if (lean_is_scalar(x_60)) { x_61 = lean_alloc_ctor(1, 2, 0); } else { x_61 = x_60; } lean_ctor_set(x_61, 0, x_58); lean_ctor_set(x_61, 1, x_59); return x_61; } } } } lean_object* l_Lean_Server_publishMessages(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_inc(x_1); x_5 = l_Std_PersistentArray_mapM___at_Lean_Server_publishMessages___spec__1(x_1, x_2, x_4); if (lean_obj_tag(x_5) == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = l_Std_PersistentArray_toArray___rarg(x_6); lean_dec(x_6); x_9 = l_Lean_Server_publishDiagnostics(x_1, x_8, x_3, x_7); return x_9; } else { uint8_t x_10; lean_dec(x_3); lean_dec(x_1); x_10 = !lean_is_exclusive(x_5); if (x_10 == 0) { return x_5; } else { lean_object* x_11; lean_object* x_12; lean_object* x_13; x_11 = lean_ctor_get(x_5, 0); x_12 = lean_ctor_get(x_5, 1); lean_inc(x_12); lean_inc(x_11); lean_dec(x_5); x_13 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_13, 0, x_11); lean_ctor_set(x_13, 1, x_12); return x_13; } } } } lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { size_t x_6; size_t x_7; lean_object* x_8; x_6 = lean_unbox_usize(x_2); lean_dec(x_2); x_7 = lean_unbox_usize(x_3); lean_dec(x_3); x_8 = l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__3(x_1, x_6, x_7, x_4, x_5); return x_8; } } lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { size_t x_6; size_t x_7; lean_object* x_8; x_6 = lean_unbox_usize(x_2); lean_dec(x_2); x_7 = lean_unbox_usize(x_3); lean_dec(x_3); x_8 = l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__4(x_1, x_6, x_7, x_4, x_5); lean_dec(x_1); return x_8; } } lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { size_t x_6; size_t x_7; lean_object* x_8; x_6 = lean_unbox_usize(x_2); lean_dec(x_2); x_7 = lean_unbox_usize(x_3); lean_dec(x_3); x_8 = l_Array_mapMUnsafe_map___at_Lean_Server_publishMessages___spec__5(x_1, x_6, x_7, x_4, x_5); lean_dec(x_1); return x_8; } } lean_object* l_List_takeWhile_match__1___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_box(0); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_1, 1); lean_inc(x_7); lean_dec(x_1); x_8 = lean_apply_2(x_3, x_6, x_7); return x_8; } } } lean_object* l_List_takeWhile_match__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = lean_alloc_closure((void*)(l_List_takeWhile_match__1___rarg), 3, 0); return x_3; } } lean_object* l_List_takeWhile___rarg(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { lean_object* x_3; lean_dec(x_1); x_3 = lean_box(0); return x_3; } else { uint8_t x_4; x_4 = !lean_is_exclusive(x_2); if (x_4 == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; x_5 = lean_ctor_get(x_2, 0); x_6 = lean_ctor_get(x_2, 1); lean_inc(x_1); lean_inc(x_5); x_7 = lean_apply_1(x_1, x_5); x_8 = lean_unbox(x_7); lean_dec(x_7); if (x_8 == 0) { lean_object* x_9; lean_free_object(x_2); lean_dec(x_6); lean_dec(x_5); lean_dec(x_1); x_9 = lean_box(0); return x_9; } else { lean_object* x_10; x_10 = l_List_takeWhile___rarg(x_1, x_6); lean_ctor_set(x_2, 1, x_10); return x_2; } } else { lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; x_11 = lean_ctor_get(x_2, 0); x_12 = lean_ctor_get(x_2, 1); lean_inc(x_12); lean_inc(x_11); lean_dec(x_2); lean_inc(x_1); lean_inc(x_11); x_13 = lean_apply_1(x_1, x_11); x_14 = lean_unbox(x_13); lean_dec(x_13); if (x_14 == 0) { lean_object* x_15; lean_dec(x_12); lean_dec(x_11); lean_dec(x_1); x_15 = lean_box(0); return x_15; } else { lean_object* x_16; lean_object* x_17; x_16 = l_List_takeWhile___rarg(x_1, x_12); x_17 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_17, 0, x_11); lean_ctor_set(x_17, 1, x_16); return x_17; } } } } } lean_object* l_List_takeWhile(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_List_takeWhile___rarg), 2, 0); return x_2; } } lean_object* initialize_Init(lean_object*); lean_object* initialize_Lean_Data_Position(lean_object*); lean_object* initialize_Lean_Data_Lsp(lean_object*); lean_object* initialize_Init_System_FilePath(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Server_Utils(lean_object* w) { lean_object * res; if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); _G_initialized = true; res = initialize_Init(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Data_Position(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Data_Lsp(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Init_System_FilePath(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_Server_instInhabitedDocumentMeta___closed__1 = _init_l_Lean_Server_instInhabitedDocumentMeta___closed__1(); lean_mark_persistent(l_Lean_Server_instInhabitedDocumentMeta___closed__1); l_Lean_Server_instInhabitedDocumentMeta = _init_l_Lean_Server_instInhabitedDocumentMeta(); lean_mark_persistent(l_Lean_Server_instInhabitedDocumentMeta); l_Lean_Server_maybeTee___closed__1 = _init_l_Lean_Server_maybeTee___closed__1(); lean_mark_persistent(l_Lean_Server_maybeTee___closed__1); l_Lean_Server_toFileUri___closed__1 = _init_l_Lean_Server_toFileUri___closed__1(); lean_mark_persistent(l_Lean_Server_toFileUri___closed__1); l_Lean_Server_toFileUri___closed__2 = _init_l_Lean_Server_toFileUri___closed__2(); lean_mark_persistent(l_Lean_Server_toFileUri___closed__2); l_Lean_Server_foldDocumentChanges___closed__1 = _init_l_Lean_Server_foldDocumentChanges___closed__1(); lean_mark_persistent(l_Lean_Server_foldDocumentChanges___closed__1); l_Lean_Server_foldDocumentChanges___closed__2 = _init_l_Lean_Server_foldDocumentChanges___closed__2(); lean_mark_persistent(l_Lean_Server_foldDocumentChanges___closed__2); l_Lean_Server_foldDocumentChanges___closed__3 = _init_l_Lean_Server_foldDocumentChanges___closed__3(); lean_mark_persistent(l_Lean_Server_foldDocumentChanges___closed__3); l_Lean_Server_foldDocumentChanges___closed__4 = _init_l_Lean_Server_foldDocumentChanges___closed__4(); lean_mark_persistent(l_Lean_Server_foldDocumentChanges___closed__4); l_Lean_Server_foldDocumentChanges___closed__5 = _init_l_Lean_Server_foldDocumentChanges___closed__5(); lean_mark_persistent(l_Lean_Server_foldDocumentChanges___closed__5); l_Std_PersistentArray_mapMAux___at_Lean_Server_publishMessages___spec__2___boxed__const__1 = _init_l_Std_PersistentArray_mapMAux___at_Lean_Server_publishMessages___spec__2___boxed__const__1(); lean_mark_persistent(l_Std_PersistentArray_mapMAux___at_Lean_Server_publishMessages___spec__2___boxed__const__1); l_Std_PersistentArray_mapM___at_Lean_Server_publishMessages___spec__1___boxed__const__1 = _init_l_Std_PersistentArray_mapM___at_Lean_Server_publishMessages___spec__1___boxed__const__1(); lean_mark_persistent(l_Std_PersistentArray_mapM___at_Lean_Server_publishMessages___spec__1___boxed__const__1); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus } #endif
ChrisHughes24/lean4
stage0/stdlib/Lean/Meta/UnificationHint.c
<filename>stage0/stdlib/Lean/Meta/UnificationHint.c // Lean compiler output // Module: Lean.Meta.UnificationHint // Imports: Init Lean.ScopedEnvExtension Lean.Util.Recognizers Lean.Meta.DiscrTree Lean.Meta.LevelDefEq Lean.Meta.SynthInstance #include <lean/lean.h> #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wunused-label" #elif defined(__GNUC__) && !defined(__CLANG__) #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif #ifdef __cplusplus extern "C" { #endif lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__1; lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint(lean_object*); extern lean_object* l_Lean_Name_toString___closed__1; lean_object* l_Lean_Meta_getResetPostponed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__4; size_t l_USize_add(size_t, size_t); extern lean_object* l_Lean_Syntax_instForInTopDownSyntax_loop___at_Lean_Syntax_hasMissing___spec__1___closed__3; lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__3; lean_object* l_Std_Format_join(lean_object*); lean_object* l_Lean_registerTraceClass(lean_object*, lean_object*); lean_object* l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__3; lean_object* l_Lean_stringToMessageData(lean_object*); lean_object* l_Lean_Meta_tryUnificationHints___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_div(lean_object*, lean_object*); extern lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_processPostponedStep___spec__4___closed__1; lean_object* l_List_forIn_loop___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_Meta_whnf___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_Instances_discrTree___default___closed__1; lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode___closed__1; lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_1653_(lean_object*); lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75_(lean_object*); lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681_(lean_object*); extern lean_object* l_Array_back___at___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertAux___spec__2___rarg___closed__2; lean_object* l_Std_Format_joinSep___at_Lean_Meta_instToFormatUnificationHints___spec__9(lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); uint8_t l_USize_decEq(size_t, size_t); lean_object* lean_array_uget(lean_object*, size_t); lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___boxed(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_Meta_isExprDefEq___closed__2; lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__4; extern lean_object* l_myMacro____x40_Init_Notation___hyg_8668____closed__4; lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__1; lean_object* l_Lean_Meta_DiscrTree_insertCore___at_Lean_Meta_UnificationHints_add___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_findAtAux___at_Lean_Meta_UnificationHints_add___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerSimpleScopedEnvExtension___rarg(lean_object*, lean_object*); lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate___closed__3; lean_object* l_Lean_Meta_addUnificationHint_match__3(lean_object*); lean_object* l_Lean_Meta_saveState___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t l_USize_sub(size_t, size_t); extern lean_object* l_Array_empty___closed__1; extern lean_object* l_instReprProd___rarg___closed__2; lean_object* l_Std_PersistentHashMap_findAux___at_Lean_Meta_UnificationHints_add___spec__3___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__3(lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_isExprDefEqAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__2; lean_object* l_Lean_getConstInfo___at_Lean_Meta_mkConstWithFreshMVarLevels___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentArray_append___rarg(lean_object*, lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_foldlM___at_Lean_Meta_instToFormatUnificationHints___spec__10(lean_object*, lean_object*); lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_addUnificationHint___lambda__1___closed__2; lean_object* l_Std_PersistentHashMap_findAux___at_Lean_Meta_UnificationHints_add___spec__3(lean_object*, size_t, lean_object*); lean_object* l_Std_fmt___at_Lean_Meta_instToFormatUnificationHints___spec__1___boxed(lean_object*); lean_object* l_Lean_Expr_appFn_x21(lean_object*); lean_object* l_Lean_Meta_UnificationHints_discrTree___default; extern lean_object* l___private_Lean_Meta_SynthInstance_0__Lean_Meta_SynthInstance_mkAnswer___closed__4; lean_object* l_Array_toSubarray___rarg(lean_object*, lean_object*, lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* l_Array_back___at_Lean_Meta_UnificationHints_add___spec__12___boxed(lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* l_Std_PersistentHashMap_getCollisionNodeSize___rarg(lean_object*); lean_object* l_Std_PersistentHashMap_insert___at_Lean_Meta_UnificationHints_add___spec__5(lean_object*, lean_object*, lean_object*); lean_object* l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Applicative_seqRight___default___rarg___closed__1; extern lean_object* l_Std_Format_sbracket___closed__4; lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate_match__1(lean_object*); lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate_match__4___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_DiscrTree_Key_format(lean_object*); size_t l_USize_shiftRight(size_t, size_t); lean_object* l_Lean_Meta_DiscrTree_format___at_Lean_Meta_instToFormatUnificationHints___spec__2___boxed(lean_object*); lean_object* l_Lean_ScopedEnvExtension_addScopedEntry___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_appArg_x21(lean_object*); extern lean_object* l_Std_Format_paren___closed__2; lean_object* l_Array_binInsertM___at_Lean_Meta_UnificationHints_add___spec__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_DiscrTree_Trie_format___rarg___closed__3; lean_object* l_Lean_Meta_instInhabitedUnificationHintEntry; uint8_t l_USize_decLt(size_t, size_t); lean_object* l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertVal___at_Lean_Meta_UnificationHints_add___spec__10(lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_find_x3f___at_Lean_Meta_UnificationHints_add___spec__2(lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_insertAux_traverse___at_Lean_Meta_UnificationHints_add___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____lambda__1(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__2; lean_object* l_Lean_Meta_getPostponed___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_Meta_unificationHintExtension___lambda__1(lean_object*); lean_object* l_Lean_Meta_UnificationHints_add(lean_object*, lean_object*); extern lean_object* l_Lean_ScopedEnvExtension_instInhabitedDescr___rarg___closed__1; lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__3___closed__1; lean_object* l_Lean_Meta_tryUnificationHints___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_toStringWithSep(lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_foldlMAux___at_Lean_Meta_instToFormatUnificationHints___spec__11___boxed(lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_foldlMAux___at_Lean_Meta_instToFormatUnificationHints___spec__11___closed__1; lean_object* l_Lean_Meta_addUnificationHint_match__1(lean_object*); uint8_t l___private_Lean_Meta_DiscrTreeTypes_0__Lean_Meta_DiscrTree_beqKey____x40_Lean_Meta_DiscrTreeTypes___hyg_73_(lean_object*, lean_object*); extern lean_object* l_Lean_registerTagAttribute___closed__5; lean_object* l_Lean_addTrace___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_postponeIsLevelDefEq___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ConstantInfo_levelParams(lean_object*); lean_object* l_Lean_Meta_tryUnificationHints(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ScopedEnvExtension_getState___at_Lean_Meta_addUnificationHint___spec__2(lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_foldlMAux___at_Lean_Meta_instToFormatUnificationHints___spec__11(lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* l_List_format___at_Lean_Meta_instToFormatUnificationHints___spec__8(lean_object*); extern lean_object* l___private_Init_Data_Array_BinSearch_0__Array_binInsertAux___at___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertAux___spec__3___rarg___closed__1; lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___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*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); extern lean_object* l_Lean_Meta_DiscrTree_insertCore___rarg___closed__5; lean_object* lean_st_ref_take(lean_object*, lean_object*); extern lean_object* l_Std_PersistentHashMap_insertAux___rarg___closed__3; lean_object* l_Lean_ScopedEnvExtension_addLocalEntry___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_insertAux_traverse___at_Lean_Meta_UnificationHints_add___spec__7(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_tryUnificationHints___spec__1(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* l_Std_fmt___at_Lean_Meta_instToFormatUnificationHints___spec__7(lean_object*); lean_object* l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_createNodes___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_processPostponedStep___spec__6___rarg(lean_object*, lean_object*); extern lean_object* l_Lean_Meta_DiscrTree_root___default___closed__1; lean_object* l_Std_PersistentHashMap_insertAtCollisionNodeAux___at_Lean_Meta_UnificationHints_add___spec__8(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__3; extern lean_object* l_Lean_instInhabitedPersistentEnvExtension___closed__2; lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate___closed__1; extern lean_object* l_Lean_Meta_instMetaEvalMetaM___rarg___closed__2; lean_object* l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertAux___at_Lean_Meta_UnificationHints_add___spec__9(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_addUnificationHint___lambda__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_addUnificationHint(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_tryUnificationHints___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate_match__3___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_foldlMAux___at_Lean_Meta_instToFormatUnificationHints___spec__11___lambda__1___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_instMetaEvalMetaM___rarg___closed__1; lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate___closed__2; lean_object* l_Lean_Meta_addUnificationHint___lambda__1___closed__3; lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__4; lean_object* l_Lean_Meta_instToFormatUnificationHints___boxed(lean_object*); lean_object* l_Std_fmt___at_Lean_Meta_addUnificationHint___spec__3(lean_object*); lean_object* l_Lean_Meta_instInhabitedUnificationHints; lean_object* l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__1; lean_object* l_Std_PersistentHashMap_foldlMAux_traverse___at_Lean_Meta_instToFormatUnificationHints___spec__13___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_insertAux___at_Lean_Meta_UnificationHints_add___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate___closed__4; lean_object* lean_st_mk_ref(lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_foldlMAux___at_Lean_Meta_instToFormatUnificationHints___spec__11___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint(lean_object*); lean_object* l_Lean_Meta_addUnificationHint_match__2___rarg(lean_object*, lean_object*); lean_object* l_Lean_Meta_addUnificationHint___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1037____closed__4; lean_object* l_Lean_getConstInfo___at_Lean_Meta_mkConstWithFreshMVarLevels___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__2; lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode_match__1___rarg(lean_object*, lean_object*, lean_object*); uint8_t l_Array_contains___at_Lean_registerInternalExceptionId___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__3___closed__2; lean_object* l_Lean_Meta_DiscrTree_insertCore___at_Lean_Meta_UnificationHints_add___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_lambdaMetaTelescope(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_to_list(lean_object*, lean_object*); extern lean_object* l___private_Lean_Meta_LevelDefEq_0__Lean_Meta_postponeIsLevelDefEq___closed__5; lean_object* l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertAux___at_Lean_Meta_UnificationHints_add___spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isAppOfArity(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate_match__4(lean_object*); lean_object* l_Lean_Meta_unificationHintExtension___closed__3; lean_object* l_List_mapM___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Std_Format_paren___closed__4; lean_object* l_Lean_registerBuiltinAttribute(lean_object*, lean_object*); extern lean_object* l_Lean_KernelException_toMessageData___closed__15; uint8_t l_Array_isEmpty___rarg(lean_object*); lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_insertAux___at_Lean_Meta_UnificationHints_add___spec__6(lean_object*, size_t, size_t, lean_object*, lean_object*); size_t l_USize_mul(size_t, size_t); extern lean_object* l_instReprList___rarg___closed__2; lean_object* l_Std_PersistentHashMap_foldlMAux_traverse___at_Lean_Meta_instToFormatUnificationHints___spec__13(lean_object*); lean_object* l_Lean_ScopedEnvExtension_add___at_Lean_Meta_addUnificationHint___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_SavedState_restore(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_usize_of_nat(lean_object*); lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Std_Format_sbracket___closed__3; lean_object* l_Lean_ConstantInfo_value_x3f(lean_object*); lean_object* l___private_Init_Data_Array_BinSearch_0__Array_binInsertAux___at_Lean_Meta_UnificationHints_add___spec__13(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_unificationHintExtension___closed__2; size_t l_USize_land(size_t, size_t); lean_object* l_Lean_Meta_tryUnificationHints___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__1; lean_object* l_Lean_Meta_DiscrTree_mkPath(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___boxed(lean_object*); lean_object* l___private_Init_Data_Array_BinSearch_0__Array_binInsertAux___at_Lean_Meta_UnificationHints_add___spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__2; lean_object* l_Lean_Meta_unificationHintExtension___closed__1; lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__4; lean_object* l_Lean_ScopedEnvExtension_getState___at_Lean_Meta_addUnificationHint___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Std_fmt___at_Lean_Meta_addUnificationHint___spec__3___boxed(lean_object*); lean_object* lean_instantiate_value_lparams(lean_object*, lean_object*); lean_object* l_Lean_Meta_addUnificationHint_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_trySynthInstance(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_DiscrTree_instInhabitedKey; lean_object* l_Lean_ScopedEnvExtension_add___at_Lean_Meta_addUnificationHint___spec__1(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__18; lean_object* l_Std_PersistentHashMap_foldlM___at_Lean_Meta_instToFormatUnificationHints___spec__10___boxed(lean_object*, lean_object*); extern lean_object* l_Lean_Meta_DiscrTree_Trie_format___rarg___closed__2; uint8_t l_Lean_Expr_isMVar(lean_object*); extern lean_object* l_Lean_Meta_DiscrTree_insertCore___rarg___closed__1; uint8_t lean_nat_dec_le(lean_object*, lean_object*); uint8_t l_USize_decLe(size_t, size_t); lean_object* l_List_map___at_Lean_Meta_instToFormatUnificationHints___spec__5(lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Meta_instToFormatUnificationHints___spec__12___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_panic_fn(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode___closed__2; lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint(lean_object*); lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode(lean_object*, lean_object*); uint8_t l_Lean_Meta_DiscrTree_Key_lt(lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedPersistentEnvExtension___closed__5; lean_object* l_Std_PersistentHashMap_findAtAux___at_Lean_Meta_UnificationHints_add___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_postponeIsLevelDefEq___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__33; lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate_match__2___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_DiscrTree_format___rarg___closed__1; lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___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_st_ref_set(lean_object*, lean_object*, lean_object*); lean_object* l_List_mapM___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_addUnificationHint___lambda__1___closed__4; extern lean_object* l_instReprIterator___closed__3; lean_object* l_Lean_Meta_tryUnificationHints_isDefEqPattern(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_inferType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_ScopedEnvExtension_getState___rarg___closed__3; lean_object* l_Lean_Meta_isExprDefEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_withNewMCtxDepth___at___private_Lean_Meta_Instances_0__Lean_Meta_mkInstanceKey___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_hasLooseBVars(lean_object*); lean_object* l_Std_fmt___at_Lean_Meta_instToFormatUnificationHints___spec__3(lean_object*); lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__3; lean_object* l_Array_binInsertM___at_Lean_Meta_UnificationHints_add___spec__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_DiscrTree_format___at_Lean_Meta_instToFormatUnificationHints___spec__2(lean_object*); extern lean_object* l_Lean_EnvExtensionInterfaceUnsafe_instInhabitedExt___closed__1; lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Meta_instToFormatUnificationHints___spec__12(lean_object*, size_t, size_t, lean_object*); extern size_t l_Std_PersistentHashMap_insertAux___rarg___closed__2; extern lean_object* l_List_map___at_Lean_Meta_DiscrTree_Trie_format___spec__2___rarg___closed__1; uint8_t l___private_Lean_Expr_0__Lean_beqBinderInfo____x40_Lean_Expr___hyg_237_(uint8_t, uint8_t); lean_object* l_Lean_PersistentEnvExtension_getState___rarg(lean_object*, lean_object*); lean_object* l_Lean_Meta_DiscrTree_getMatch___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate_match__3(lean_object*); lean_object* l_Array_back___at_Lean_Meta_UnificationHints_add___spec__12(lean_object*); lean_object* l_Lean_ScopedEnvExtension_addEntry___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_addUnificationHint___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_fmt___at_Lean_Meta_instToFormatUnificationHints___spec__6(lean_object*); extern lean_object* l_Std_Format_sbracket___closed__2; lean_object* l_ReaderT_instMonadReaderT___rarg(lean_object*); lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode_match__1(lean_object*); lean_object* l_Lean_Meta_DiscrTree_Trie_format___at_Lean_Meta_instToFormatUnificationHints___spec__4(lean_object*); lean_object* l_Lean_Meta_addUnificationHint___lambda__1___closed__1; lean_object* l_Lean_Attribute_Builtin_ensureNoArgs(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkFreshLevelMVar___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_instToFormatUnificationHints(lean_object*); extern lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_processPostponedStep___spec__4___closed__2; lean_object* l_Lean_Meta_addUnificationHint_match__2(lean_object*); lean_object* l_Std_fmt___at_Lean_Meta_instToFormatUnificationHints___spec__1(lean_object*); lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint_match__1(lean_object*); lean_object* lean_usize_to_nat(size_t); lean_object* l_Lean_Meta_instInhabitedUnificationHintEntry___closed__1; lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___rarg___closed__1; lean_object* l_Std_PersistentHashMap_find_x3f___at_Lean_Meta_UnificationHints_add___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_indentExpr(lean_object*); lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___rarg___closed__2; lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint___closed__2; lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate_match__2(lean_object*); lean_object* l_Lean_Meta_unificationHintExtension___lambda__1___boxed(lean_object*); lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___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* l_Lean_Meta_tryUnificationHints___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_setPostponed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Util_Trace_0__Lean_addNode___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_processPostponedStep___spec__12(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_processPostponed(uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_insertAt___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_tryUnificationHints_tryCandidate___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*); size_t l_Lean_Meta_DiscrTree_Key_hash(lean_object*); lean_object* l_Std_PersistentHashMap_foldlMAux_traverse___at_Lean_Meta_instToFormatUnificationHints___spec__13___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Array_findSomeM_x3f___rarg___closed__1; lean_object* l___private_Lean_Meta_SynthInstance_0__Lean_Meta_SynthInstance_mkAnswer___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_instToFormatArray___rarg___closed__1; lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint___closed__1; lean_object* l_Lean_Meta_unificationHintExtension; extern lean_object* l_Lean_MetavarContext_MkBinding_mkBinding___closed__1; extern lean_object* l_Lean_Meta_DiscrTree_instInhabitedTrie___closed__1; extern lean_object* l_Std_Format_paren___closed__3; lean_object* l_Std_PersistentHashMap_mkCollisionNode___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_addUnificationHint_match__3___rarg(lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* _init_l_Lean_Meta_instInhabitedUnificationHintEntry___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Array_empty___closed__1; x_2 = lean_box(0); x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_Meta_instInhabitedUnificationHintEntry() { _start: { lean_object* x_1; x_1 = l_Lean_Meta_instInhabitedUnificationHintEntry___closed__1; return x_1; } } static lean_object* _init_l_Lean_Meta_UnificationHints_discrTree___default() { _start: { lean_object* x_1; x_1 = l_Lean_Meta_Instances_discrTree___default___closed__1; return x_1; } } static lean_object* _init_l_Lean_Meta_instInhabitedUnificationHints() { _start: { lean_object* x_1; x_1 = l_Lean_Meta_DiscrTree_root___default___closed__1; return x_1; } } lean_object* l_List_map___at_Lean_Meta_instToFormatUnificationHints___spec__5(lean_object* x_1) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_2; x_2 = lean_box(0); return x_2; } else { uint8_t x_3; x_3 = !lean_is_exclusive(x_1); if (x_3 == 0) { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_4 = lean_ctor_get(x_1, 0); x_5 = lean_ctor_get(x_1, 1); x_6 = l_List_map___at_Lean_Meta_instToFormatUnificationHints___spec__5(x_5); x_7 = lean_ctor_get(x_4, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_4, 1); lean_inc(x_8); lean_dec(x_4); x_9 = l_Lean_Meta_DiscrTree_Key_format(x_7); x_10 = l_List_map___at_Lean_Meta_DiscrTree_Trie_format___spec__2___rarg___closed__1; x_11 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_11, 0, x_9); lean_ctor_set(x_11, 1, x_10); x_12 = l_Lean_Meta_DiscrTree_Trie_format___at_Lean_Meta_instToFormatUnificationHints___spec__4(x_8); x_13 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_13, 0, x_11); lean_ctor_set(x_13, 1, x_12); x_14 = l_Std_Format_paren___closed__3; x_15 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_13); x_16 = l_Std_Format_paren___closed__4; x_17 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_17, 0, x_15); lean_ctor_set(x_17, 1, x_16); x_18 = l_Std_Format_paren___closed__2; x_19 = lean_alloc_ctor(3, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_17); x_20 = 0; x_21 = lean_alloc_ctor(5, 1, 1); lean_ctor_set(x_21, 0, x_19); lean_ctor_set_uint8(x_21, sizeof(void*)*1, x_20); x_22 = lean_box(1); x_23 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_23, 0, x_22); lean_ctor_set(x_23, 1, x_21); lean_ctor_set(x_1, 1, x_6); lean_ctor_set(x_1, 0, x_23); return x_1; } else { lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; x_24 = lean_ctor_get(x_1, 0); x_25 = lean_ctor_get(x_1, 1); lean_inc(x_25); lean_inc(x_24); lean_dec(x_1); x_26 = l_List_map___at_Lean_Meta_instToFormatUnificationHints___spec__5(x_25); x_27 = lean_ctor_get(x_24, 0); lean_inc(x_27); x_28 = lean_ctor_get(x_24, 1); lean_inc(x_28); lean_dec(x_24); x_29 = l_Lean_Meta_DiscrTree_Key_format(x_27); x_30 = l_List_map___at_Lean_Meta_DiscrTree_Trie_format___spec__2___rarg___closed__1; x_31 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_31, 0, x_29); lean_ctor_set(x_31, 1, x_30); x_32 = l_Lean_Meta_DiscrTree_Trie_format___at_Lean_Meta_instToFormatUnificationHints___spec__4(x_28); x_33 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_33, 0, x_31); lean_ctor_set(x_33, 1, x_32); x_34 = l_Std_Format_paren___closed__3; x_35 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_35, 0, x_34); lean_ctor_set(x_35, 1, x_33); x_36 = l_Std_Format_paren___closed__4; x_37 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_37, 0, x_35); lean_ctor_set(x_37, 1, x_36); x_38 = l_Std_Format_paren___closed__2; x_39 = lean_alloc_ctor(3, 2, 0); lean_ctor_set(x_39, 0, x_38); lean_ctor_set(x_39, 1, x_37); x_40 = 0; x_41 = lean_alloc_ctor(5, 1, 1); lean_ctor_set(x_41, 0, x_39); lean_ctor_set_uint8(x_41, sizeof(void*)*1, x_40); x_42 = lean_box(1); x_43 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_43, 0, x_42); lean_ctor_set(x_43, 1, x_41); x_44 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_44, 0, x_43); lean_ctor_set(x_44, 1, x_26); return x_44; } } } } lean_object* l_Std_Format_joinSep___at_Lean_Meta_instToFormatUnificationHints___spec__9(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_3; lean_dec(x_2); x_3 = lean_box(0); return x_3; } else { lean_object* x_4; x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); if (lean_obj_tag(x_4) == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_dec(x_2); x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); lean_dec(x_1); x_6 = l_Lean_Name_toString___closed__1; x_7 = l_Lean_Name_toStringWithSep(x_6, x_5); x_8 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_8, 0, x_7); return x_8; } else { 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; x_9 = lean_ctor_get(x_1, 0); lean_inc(x_9); lean_dec(x_1); x_10 = l_Lean_Name_toString___closed__1; x_11 = l_Lean_Name_toStringWithSep(x_10, x_9); x_12 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_12, 0, x_11); lean_inc(x_2); x_13 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_2); x_14 = l_Std_Format_joinSep___at_Lean_Meta_instToFormatUnificationHints___spec__9(x_4, x_2); x_15 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_15, 0, x_13); lean_ctor_set(x_15, 1, x_14); return x_15; } } } } lean_object* l_List_format___at_Lean_Meta_instToFormatUnificationHints___spec__8(lean_object* x_1) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_2; x_2 = l_instReprList___rarg___closed__2; return x_2; } else { 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; uint8_t x_11; lean_object* x_12; x_3 = l_instReprProd___rarg___closed__2; x_4 = l_Std_Format_joinSep___at_Lean_Meta_instToFormatUnificationHints___spec__9(x_1, x_3); x_5 = l_Std_Format_sbracket___closed__3; x_6 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_6, 0, x_5); lean_ctor_set(x_6, 1, x_4); x_7 = l_Std_Format_sbracket___closed__4; x_8 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_8, 0, x_6); lean_ctor_set(x_8, 1, x_7); x_9 = l_Std_Format_sbracket___closed__2; x_10 = lean_alloc_ctor(3, 2, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_10, 1, x_8); x_11 = 0; x_12 = lean_alloc_ctor(5, 1, 1); lean_ctor_set(x_12, 0, x_10); lean_ctor_set_uint8(x_12, sizeof(void*)*1, x_11); return x_12; } } } lean_object* l_Std_fmt___at_Lean_Meta_instToFormatUnificationHints___spec__7(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_List_format___at_Lean_Meta_instToFormatUnificationHints___spec__8(x_1); return x_2; } } lean_object* l_Std_fmt___at_Lean_Meta_instToFormatUnificationHints___spec__6(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_2 = lean_array_to_list(lean_box(0), x_1); x_3 = l_List_format___at_Lean_Meta_instToFormatUnificationHints___spec__8(x_2); x_4 = l_instToFormatArray___rarg___closed__1; x_5 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_5, 0, x_4); lean_ctor_set(x_5, 1, x_3); return x_5; } } lean_object* l_Lean_Meta_DiscrTree_Trie_format___at_Lean_Meta_instToFormatUnificationHints___spec__4(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; uint8_t x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); x_3 = lean_ctor_get(x_1, 1); lean_inc(x_3); lean_dec(x_1); x_4 = l_Array_isEmpty___rarg(x_2); x_5 = lean_array_to_list(lean_box(0), x_3); x_6 = l_List_map___at_Lean_Meta_instToFormatUnificationHints___spec__5(x_5); x_7 = l_Std_Format_join(x_6); lean_dec(x_6); if (x_4 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; lean_object* x_21; lean_object* x_22; x_8 = l_Std_fmt___at_Lean_Meta_instToFormatUnificationHints___spec__6(x_2); x_9 = l_instReprIterator___closed__3; x_10 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_10, 1, x_8); x_11 = l_Lean_Meta_DiscrTree_Trie_format___rarg___closed__2; x_12 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_10); x_13 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_7); x_14 = l_Std_Format_paren___closed__3; x_15 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_13); x_16 = l_Std_Format_paren___closed__4; x_17 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_17, 0, x_15); lean_ctor_set(x_17, 1, x_16); x_18 = l_Std_Format_paren___closed__2; x_19 = lean_alloc_ctor(3, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_17); x_20 = 0; x_21 = lean_alloc_ctor(5, 1, 1); lean_ctor_set(x_21, 0, x_19); lean_ctor_set_uint8(x_21, sizeof(void*)*1, x_20); x_22 = lean_alloc_ctor(5, 1, 1); lean_ctor_set(x_22, 0, x_21); lean_ctor_set_uint8(x_22, sizeof(void*)*1, x_20); return x_22; } else { lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; lean_object* x_32; lean_object* x_33; lean_dec(x_2); x_23 = l_Lean_Meta_DiscrTree_Trie_format___rarg___closed__3; x_24 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_7); x_25 = l_Std_Format_paren___closed__3; x_26 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_24); x_27 = l_Std_Format_paren___closed__4; x_28 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_28, 0, x_26); lean_ctor_set(x_28, 1, x_27); x_29 = l_Std_Format_paren___closed__2; x_30 = lean_alloc_ctor(3, 2, 0); lean_ctor_set(x_30, 0, x_29); lean_ctor_set(x_30, 1, x_28); x_31 = 0; x_32 = lean_alloc_ctor(5, 1, 1); lean_ctor_set(x_32, 0, x_30); lean_ctor_set_uint8(x_32, sizeof(void*)*1, x_31); x_33 = lean_alloc_ctor(5, 1, 1); lean_ctor_set(x_33, 0, x_32); lean_ctor_set_uint8(x_33, sizeof(void*)*1, x_31); return x_33; } } } lean_object* l_Std_fmt___at_Lean_Meta_instToFormatUnificationHints___spec__3(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Meta_DiscrTree_Trie_format___at_Lean_Meta_instToFormatUnificationHints___spec__4(x_1); return x_2; } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Meta_instToFormatUnificationHints___spec__12(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) { _start: { uint8_t x_5; x_5 = x_2 == x_3; if (x_5 == 0) { lean_object* x_6; size_t x_7; size_t x_8; x_6 = lean_array_uget(x_1, x_2); x_7 = 1; x_8 = x_2 + x_7; switch (lean_obj_tag(x_6)) { case 0: { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; 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; uint8_t x_24; lean_object* x_25; uint8_t x_26; x_9 = lean_ctor_get(x_6, 0); lean_inc(x_9); x_10 = lean_ctor_get(x_6, 1); lean_inc(x_10); lean_dec(x_6); x_11 = lean_ctor_get(x_4, 1); lean_inc(x_11); x_12 = lean_ctor_get(x_4, 0); lean_inc(x_12); lean_dec(x_4); x_13 = l_Lean_Meta_DiscrTree_Key_format(x_9); x_14 = l_List_map___at_Lean_Meta_DiscrTree_Trie_format___spec__2___rarg___closed__1; x_15 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_15, 0, x_13); lean_ctor_set(x_15, 1, x_14); x_16 = l_Lean_Meta_DiscrTree_Trie_format___at_Lean_Meta_instToFormatUnificationHints___spec__4(x_10); x_17 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_17, 0, x_15); lean_ctor_set(x_17, 1, x_16); x_18 = l_Std_Format_paren___closed__3; x_19 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_17); x_20 = l_Std_Format_paren___closed__4; x_21 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_21, 0, x_19); lean_ctor_set(x_21, 1, x_20); x_22 = l_Std_Format_paren___closed__2; x_23 = lean_alloc_ctor(3, 2, 0); lean_ctor_set(x_23, 0, x_22); lean_ctor_set(x_23, 1, x_21); x_24 = 0; x_25 = lean_alloc_ctor(5, 1, 1); lean_ctor_set(x_25, 0, x_23); lean_ctor_set_uint8(x_25, sizeof(void*)*1, x_24); x_26 = lean_unbox(x_12); lean_dec(x_12); if (x_26 == 0) { lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; lean_object* x_31; lean_object* x_32; x_27 = lean_box(1); x_28 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_28, 0, x_11); lean_ctor_set(x_28, 1, x_27); x_29 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_29, 0, x_28); lean_ctor_set(x_29, 1, x_25); x_30 = 0; x_31 = lean_box(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_29); x_2 = x_8; x_4 = x_32; goto _start; } else { lean_object* x_34; lean_object* x_35; lean_object* x_36; uint8_t x_37; lean_object* x_38; lean_object* x_39; x_34 = lean_box(0); x_35 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_35, 0, x_11); lean_ctor_set(x_35, 1, x_34); x_36 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_36, 0, x_35); lean_ctor_set(x_36, 1, x_25); x_37 = 0; x_38 = lean_box(x_37); x_39 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_39, 0, x_38); lean_ctor_set(x_39, 1, x_36); x_2 = x_8; x_4 = x_39; goto _start; } } case 1: { lean_object* x_41; lean_object* x_42; x_41 = lean_ctor_get(x_6, 0); lean_inc(x_41); lean_dec(x_6); x_42 = l_Std_PersistentHashMap_foldlMAux___at_Lean_Meta_instToFormatUnificationHints___spec__11(x_41, x_4); lean_dec(x_41); x_2 = x_8; x_4 = x_42; goto _start; } default: { x_2 = x_8; goto _start; } } } else { return x_4; } } } lean_object* l_Std_PersistentHashMap_foldlMAux_traverse___at_Lean_Meta_instToFormatUnificationHints___spec__13___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; uint8_t x_8; x_7 = lean_array_get_size(x_2); x_8 = lean_nat_dec_lt(x_5, x_7); lean_dec(x_7); if (x_8 == 0) { lean_dec(x_5); lean_dec(x_1); return x_6; } else { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_9 = lean_array_fget(x_2, x_5); x_10 = lean_array_fget(x_3, x_5); lean_inc(x_1); x_11 = lean_apply_3(x_1, x_6, x_9, x_10); x_12 = lean_unsigned_to_nat(1u); x_13 = lean_nat_add(x_5, x_12); lean_dec(x_5); x_4 = lean_box(0); x_5 = x_13; x_6 = x_11; goto _start; } } } lean_object* l_Std_PersistentHashMap_foldlMAux_traverse___at_Lean_Meta_instToFormatUnificationHints___spec__13(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Std_PersistentHashMap_foldlMAux_traverse___at_Lean_Meta_instToFormatUnificationHints___spec__13___rarg___boxed), 6, 0); return x_2; } } lean_object* l_Std_PersistentHashMap_foldlMAux___at_Lean_Meta_instToFormatUnificationHints___spec__11___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; lean_object* x_18; uint8_t x_19; x_4 = lean_ctor_get(x_1, 1); x_5 = lean_ctor_get(x_1, 0); x_6 = l_Lean_Meta_DiscrTree_Key_format(x_2); x_7 = l_List_map___at_Lean_Meta_DiscrTree_Trie_format___spec__2___rarg___closed__1; x_8 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_8, 0, x_6); lean_ctor_set(x_8, 1, x_7); x_9 = l_Lean_Meta_DiscrTree_Trie_format___at_Lean_Meta_instToFormatUnificationHints___spec__4(x_3); x_10 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_10, 0, x_8); lean_ctor_set(x_10, 1, x_9); x_11 = l_Std_Format_paren___closed__3; x_12 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_10); x_13 = l_Std_Format_paren___closed__4; x_14 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_14, 0, x_12); lean_ctor_set(x_14, 1, x_13); x_15 = l_Std_Format_paren___closed__2; x_16 = lean_alloc_ctor(3, 2, 0); lean_ctor_set(x_16, 0, x_15); lean_ctor_set(x_16, 1, x_14); x_17 = 0; x_18 = lean_alloc_ctor(5, 1, 1); lean_ctor_set(x_18, 0, x_16); lean_ctor_set_uint8(x_18, sizeof(void*)*1, x_17); x_19 = lean_unbox(x_5); if (x_19 == 0) { lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; lean_object* x_24; lean_object* x_25; x_20 = lean_box(1); lean_inc(x_4); x_21 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_21, 0, x_4); lean_ctor_set(x_21, 1, x_20); x_22 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_22, 0, x_21); lean_ctor_set(x_22, 1, x_18); x_23 = 0; x_24 = lean_box(x_23); x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_22); return x_25; } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; uint8_t x_29; lean_object* x_30; lean_object* x_31; x_26 = lean_box(0); lean_inc(x_4); x_27 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_27, 0, x_4); lean_ctor_set(x_27, 1, x_26); x_28 = lean_alloc_ctor(4, 2, 0); lean_ctor_set(x_28, 0, x_27); lean_ctor_set(x_28, 1, x_18); x_29 = 0; x_30 = lean_box(x_29); x_31 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_31, 0, x_30); lean_ctor_set(x_31, 1, x_28); return x_31; } } } static lean_object* _init_l_Std_PersistentHashMap_foldlMAux___at_Lean_Meta_instToFormatUnificationHints___spec__11___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_Std_PersistentHashMap_foldlMAux___at_Lean_Meta_instToFormatUnificationHints___spec__11___lambda__1___boxed), 3, 0); return x_1; } } lean_object* l_Std_PersistentHashMap_foldlMAux___at_Lean_Meta_instToFormatUnificationHints___spec__11(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_3; lean_object* x_4; lean_object* x_5; uint8_t x_6; x_3 = lean_ctor_get(x_1, 0); x_4 = lean_array_get_size(x_3); x_5 = lean_unsigned_to_nat(0u); x_6 = lean_nat_dec_lt(x_5, x_4); if (x_6 == 0) { lean_dec(x_4); return x_2; } else { uint8_t x_7; x_7 = lean_nat_dec_le(x_4, x_4); if (x_7 == 0) { lean_dec(x_4); return x_2; } else { size_t x_8; size_t x_9; lean_object* x_10; x_8 = 0; x_9 = lean_usize_of_nat(x_4); lean_dec(x_4); x_10 = l_Array_foldlMUnsafe_fold___at_Lean_Meta_instToFormatUnificationHints___spec__12(x_3, x_8, x_9, x_2); return x_10; } } } else { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_11 = lean_ctor_get(x_1, 0); x_12 = lean_ctor_get(x_1, 1); x_13 = l_Std_PersistentHashMap_foldlMAux___at_Lean_Meta_instToFormatUnificationHints___spec__11___closed__1; x_14 = lean_unsigned_to_nat(0u); x_15 = l_Std_PersistentHashMap_foldlMAux_traverse___at_Lean_Meta_instToFormatUnificationHints___spec__13___rarg(x_13, x_11, x_12, lean_box(0), x_14, x_2); return x_15; } } } lean_object* l_Std_PersistentHashMap_foldlM___at_Lean_Meta_instToFormatUnificationHints___spec__10(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; x_3 = lean_ctor_get(x_1, 0); x_4 = l_Std_PersistentHashMap_foldlMAux___at_Lean_Meta_instToFormatUnificationHints___spec__11(x_3, x_2); return x_4; } } lean_object* l_Lean_Meta_DiscrTree_format___at_Lean_Meta_instToFormatUnificationHints___spec__2(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; uint8_t x_5; lean_object* x_6; x_2 = l_Lean_Meta_DiscrTree_format___rarg___closed__1; x_3 = l_Std_PersistentHashMap_foldlM___at_Lean_Meta_instToFormatUnificationHints___spec__10(x_1, x_2); x_4 = lean_ctor_get(x_3, 1); lean_inc(x_4); lean_dec(x_3); x_5 = 0; x_6 = lean_alloc_ctor(5, 1, 1); lean_ctor_set(x_6, 0, x_4); lean_ctor_set_uint8(x_6, sizeof(void*)*1, x_5); return x_6; } } lean_object* l_Std_fmt___at_Lean_Meta_instToFormatUnificationHints___spec__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Meta_DiscrTree_format___at_Lean_Meta_instToFormatUnificationHints___spec__2(x_1); return x_2; } } lean_object* l_Lean_Meta_instToFormatUnificationHints(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Meta_DiscrTree_format___at_Lean_Meta_instToFormatUnificationHints___spec__2(x_1); return x_2; } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Meta_instToFormatUnificationHints___spec__12___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_foldlMUnsafe_fold___at_Lean_Meta_instToFormatUnificationHints___spec__12(x_1, x_5, x_6, x_4); lean_dec(x_1); return x_7; } } lean_object* l_Std_PersistentHashMap_foldlMAux_traverse___at_Lean_Meta_instToFormatUnificationHints___spec__13___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; x_7 = l_Std_PersistentHashMap_foldlMAux_traverse___at_Lean_Meta_instToFormatUnificationHints___spec__13___rarg(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_3); lean_dec(x_2); return x_7; } } lean_object* l_Std_PersistentHashMap_foldlMAux___at_Lean_Meta_instToFormatUnificationHints___spec__11___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Std_PersistentHashMap_foldlMAux___at_Lean_Meta_instToFormatUnificationHints___spec__11___lambda__1(x_1, x_2, x_3); lean_dec(x_1); return x_4; } } lean_object* l_Std_PersistentHashMap_foldlMAux___at_Lean_Meta_instToFormatUnificationHints___spec__11___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Std_PersistentHashMap_foldlMAux___at_Lean_Meta_instToFormatUnificationHints___spec__11(x_1, x_2); lean_dec(x_1); return x_3; } } lean_object* l_Std_PersistentHashMap_foldlM___at_Lean_Meta_instToFormatUnificationHints___spec__10___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Std_PersistentHashMap_foldlM___at_Lean_Meta_instToFormatUnificationHints___spec__10(x_1, x_2); lean_dec(x_1); return x_3; } } lean_object* l_Lean_Meta_DiscrTree_format___at_Lean_Meta_instToFormatUnificationHints___spec__2___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Meta_DiscrTree_format___at_Lean_Meta_instToFormatUnificationHints___spec__2(x_1); lean_dec(x_1); return x_2; } } lean_object* l_Std_fmt___at_Lean_Meta_instToFormatUnificationHints___spec__1___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Std_fmt___at_Lean_Meta_instToFormatUnificationHints___spec__1(x_1); lean_dec(x_1); return x_2; } } lean_object* l_Lean_Meta_instToFormatUnificationHints___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Meta_instToFormatUnificationHints(x_1); lean_dec(x_1); return x_2; } } lean_object* l_Std_PersistentHashMap_findAtAux___at_Lean_Meta_UnificationHints_add___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; uint8_t x_7; x_6 = lean_array_get_size(x_1); x_7 = lean_nat_dec_lt(x_4, x_6); lean_dec(x_6); if (x_7 == 0) { lean_object* x_8; lean_dec(x_4); x_8 = lean_box(0); return x_8; } else { lean_object* x_9; uint8_t x_10; x_9 = lean_array_fget(x_1, x_4); x_10 = l___private_Lean_Meta_DiscrTreeTypes_0__Lean_Meta_DiscrTree_beqKey____x40_Lean_Meta_DiscrTreeTypes___hyg_73_(x_5, x_9); lean_dec(x_9); if (x_10 == 0) { lean_object* x_11; lean_object* x_12; x_11 = lean_unsigned_to_nat(1u); x_12 = lean_nat_add(x_4, x_11); lean_dec(x_4); x_3 = lean_box(0); x_4 = x_12; goto _start; } else { lean_object* x_14; lean_object* x_15; x_14 = lean_array_fget(x_2, x_4); lean_dec(x_4); x_15 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_15, 0, x_14); return x_15; } } } } lean_object* l_Std_PersistentHashMap_findAux___at_Lean_Meta_UnificationHints_add___spec__3(lean_object* x_1, size_t x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_4; size_t x_5; size_t x_6; size_t x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_4 = lean_ctor_get(x_1, 0); lean_inc(x_4); lean_dec(x_1); x_5 = 5; x_6 = l_Std_PersistentHashMap_insertAux___rarg___closed__2; x_7 = x_2 & x_6; x_8 = lean_usize_to_nat(x_7); x_9 = lean_box(2); x_10 = lean_array_get(x_9, x_4, x_8); lean_dec(x_8); lean_dec(x_4); switch (lean_obj_tag(x_10)) { case 0: { lean_object* x_11; lean_object* x_12; uint8_t x_13; x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); x_12 = lean_ctor_get(x_10, 1); lean_inc(x_12); lean_dec(x_10); x_13 = l___private_Lean_Meta_DiscrTreeTypes_0__Lean_Meta_DiscrTree_beqKey____x40_Lean_Meta_DiscrTreeTypes___hyg_73_(x_3, x_11); lean_dec(x_11); if (x_13 == 0) { lean_object* x_14; lean_dec(x_12); x_14 = lean_box(0); return x_14; } else { lean_object* x_15; x_15 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_15, 0, x_12); return x_15; } } case 1: { lean_object* x_16; size_t x_17; x_16 = lean_ctor_get(x_10, 0); lean_inc(x_16); lean_dec(x_10); x_17 = x_2 >> x_5 % (sizeof(size_t) * 8); x_1 = x_16; x_2 = x_17; goto _start; } default: { lean_object* x_19; x_19 = lean_box(0); return x_19; } } } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_20 = lean_ctor_get(x_1, 0); lean_inc(x_20); x_21 = lean_ctor_get(x_1, 1); lean_inc(x_21); lean_dec(x_1); x_22 = lean_unsigned_to_nat(0u); x_23 = l_Std_PersistentHashMap_findAtAux___at_Lean_Meta_UnificationHints_add___spec__4(x_20, x_21, lean_box(0), x_22, x_3); lean_dec(x_21); lean_dec(x_20); return x_23; } } } lean_object* l_Std_PersistentHashMap_find_x3f___at_Lean_Meta_UnificationHints_add___spec__2(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; size_t x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); lean_dec(x_1); x_4 = l_Lean_Meta_DiscrTree_Key_hash(x_2); x_5 = l_Std_PersistentHashMap_findAux___at_Lean_Meta_UnificationHints_add___spec__3(x_3, x_4, x_2); return x_5; } } lean_object* l_Std_PersistentHashMap_insertAux_traverse___at_Lean_Meta_UnificationHints_add___spec__7(size_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; uint8_t x_8; x_7 = lean_array_get_size(x_2); x_8 = lean_nat_dec_lt(x_5, x_7); lean_dec(x_7); if (x_8 == 0) { lean_dec(x_5); return x_6; } else { lean_object* x_9; lean_object* x_10; size_t x_11; size_t x_12; size_t x_13; size_t x_14; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_9 = lean_array_fget(x_2, x_5); x_10 = lean_array_fget(x_3, x_5); x_11 = l_Lean_Meta_DiscrTree_Key_hash(x_9); x_12 = 1; x_13 = x_1 - x_12; x_14 = 5; x_15 = x_14 * x_13; x_16 = x_11 >> x_15 % (sizeof(size_t) * 8); x_17 = lean_unsigned_to_nat(1u); x_18 = lean_nat_add(x_5, x_17); lean_dec(x_5); x_19 = l_Std_PersistentHashMap_insertAux___at_Lean_Meta_UnificationHints_add___spec__6(x_6, x_16, x_1, x_9, x_10); x_4 = lean_box(0); x_5 = x_18; x_6 = x_19; goto _start; } } } lean_object* l_Std_PersistentHashMap_insertAtCollisionNodeAux___at_Lean_Meta_UnificationHints_add___spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); x_6 = lean_ctor_get(x_1, 1); lean_inc(x_6); x_7 = lean_array_get_size(x_5); x_8 = lean_nat_dec_lt(x_2, x_7); lean_dec(x_7); if (x_8 == 0) { uint8_t x_9; lean_dec(x_2); x_9 = !lean_is_exclusive(x_1); if (x_9 == 0) { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_10 = lean_ctor_get(x_1, 1); lean_dec(x_10); x_11 = lean_ctor_get(x_1, 0); lean_dec(x_11); x_12 = lean_array_push(x_5, x_3); x_13 = lean_array_push(x_6, x_4); lean_ctor_set(x_1, 1, x_13); lean_ctor_set(x_1, 0, x_12); return x_1; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_dec(x_1); x_14 = lean_array_push(x_5, x_3); x_15 = lean_array_push(x_6, x_4); x_16 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_16, 0, x_14); lean_ctor_set(x_16, 1, x_15); return x_16; } } else { lean_object* x_17; uint8_t x_18; x_17 = lean_array_fget(x_5, x_2); x_18 = l___private_Lean_Meta_DiscrTreeTypes_0__Lean_Meta_DiscrTree_beqKey____x40_Lean_Meta_DiscrTreeTypes___hyg_73_(x_3, x_17); lean_dec(x_17); if (x_18 == 0) { lean_object* x_19; lean_object* x_20; lean_dec(x_6); lean_dec(x_5); x_19 = lean_unsigned_to_nat(1u); x_20 = lean_nat_add(x_2, x_19); lean_dec(x_2); x_2 = x_20; goto _start; } else { uint8_t x_22; x_22 = !lean_is_exclusive(x_1); if (x_22 == 0) { lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; x_23 = lean_ctor_get(x_1, 1); lean_dec(x_23); x_24 = lean_ctor_get(x_1, 0); lean_dec(x_24); x_25 = lean_array_fset(x_5, x_2, x_3); x_26 = lean_array_fset(x_6, x_2, x_4); lean_dec(x_2); lean_ctor_set(x_1, 1, x_26); lean_ctor_set(x_1, 0, x_25); return x_1; } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_dec(x_1); x_27 = lean_array_fset(x_5, x_2, x_3); x_28 = lean_array_fset(x_6, x_2, x_4); lean_dec(x_2); x_29 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_29, 0, x_27); lean_ctor_set(x_29, 1, x_28); return x_29; } } } } } lean_object* l_Std_PersistentHashMap_insertAux___at_Lean_Meta_UnificationHints_add___spec__6(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5) { _start: { if (lean_obj_tag(x_1) == 0) { uint8_t x_6; x_6 = !lean_is_exclusive(x_1); if (x_6 == 0) { lean_object* x_7; size_t x_8; size_t x_9; size_t x_10; size_t x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; x_7 = lean_ctor_get(x_1, 0); x_8 = 1; x_9 = 5; x_10 = l_Std_PersistentHashMap_insertAux___rarg___closed__2; x_11 = x_2 & x_10; x_12 = lean_usize_to_nat(x_11); x_13 = lean_array_get_size(x_7); x_14 = lean_nat_dec_lt(x_12, x_13); lean_dec(x_13); if (x_14 == 0) { lean_dec(x_12); lean_dec(x_5); lean_dec(x_4); return x_1; } else { lean_object* x_15; lean_object* x_16; lean_object* x_17; x_15 = lean_array_fget(x_7, x_12); x_16 = lean_box(2); x_17 = lean_array_fset(x_7, x_12, x_16); switch (lean_obj_tag(x_15)) { case 0: { uint8_t x_18; x_18 = !lean_is_exclusive(x_15); if (x_18 == 0) { lean_object* x_19; lean_object* x_20; uint8_t x_21; x_19 = lean_ctor_get(x_15, 0); x_20 = lean_ctor_get(x_15, 1); x_21 = l___private_Lean_Meta_DiscrTreeTypes_0__Lean_Meta_DiscrTree_beqKey____x40_Lean_Meta_DiscrTreeTypes___hyg_73_(x_4, x_19); if (x_21 == 0) { lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_free_object(x_15); x_22 = l_Std_PersistentHashMap_mkCollisionNode___rarg(x_19, x_20, x_4, x_5); x_23 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_23, 0, x_22); x_24 = lean_array_fset(x_17, x_12, x_23); lean_dec(x_12); lean_ctor_set(x_1, 0, x_24); return x_1; } else { lean_object* x_25; lean_dec(x_20); lean_dec(x_19); lean_ctor_set(x_15, 1, x_5); lean_ctor_set(x_15, 0, x_4); x_25 = lean_array_fset(x_17, x_12, x_15); lean_dec(x_12); lean_ctor_set(x_1, 0, x_25); return x_1; } } else { lean_object* x_26; lean_object* x_27; uint8_t x_28; x_26 = lean_ctor_get(x_15, 0); x_27 = lean_ctor_get(x_15, 1); lean_inc(x_27); lean_inc(x_26); lean_dec(x_15); x_28 = l___private_Lean_Meta_DiscrTreeTypes_0__Lean_Meta_DiscrTree_beqKey____x40_Lean_Meta_DiscrTreeTypes___hyg_73_(x_4, x_26); if (x_28 == 0) { lean_object* x_29; lean_object* x_30; lean_object* x_31; x_29 = l_Std_PersistentHashMap_mkCollisionNode___rarg(x_26, x_27, x_4, x_5); x_30 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_30, 0, x_29); x_31 = lean_array_fset(x_17, x_12, x_30); lean_dec(x_12); lean_ctor_set(x_1, 0, x_31); return x_1; } else { lean_object* x_32; lean_object* x_33; lean_dec(x_27); lean_dec(x_26); x_32 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_32, 0, x_4); lean_ctor_set(x_32, 1, x_5); x_33 = lean_array_fset(x_17, x_12, x_32); lean_dec(x_12); lean_ctor_set(x_1, 0, x_33); return x_1; } } } case 1: { uint8_t x_34; x_34 = !lean_is_exclusive(x_15); if (x_34 == 0) { lean_object* x_35; size_t x_36; size_t x_37; lean_object* x_38; lean_object* x_39; x_35 = lean_ctor_get(x_15, 0); x_36 = x_2 >> x_9 % (sizeof(size_t) * 8); x_37 = x_3 + x_8; x_38 = l_Std_PersistentHashMap_insertAux___at_Lean_Meta_UnificationHints_add___spec__6(x_35, x_36, x_37, x_4, x_5); lean_ctor_set(x_15, 0, x_38); x_39 = lean_array_fset(x_17, x_12, x_15); lean_dec(x_12); lean_ctor_set(x_1, 0, x_39); return x_1; } else { lean_object* x_40; size_t x_41; size_t x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; x_40 = lean_ctor_get(x_15, 0); lean_inc(x_40); lean_dec(x_15); x_41 = x_2 >> x_9 % (sizeof(size_t) * 8); x_42 = x_3 + x_8; x_43 = l_Std_PersistentHashMap_insertAux___at_Lean_Meta_UnificationHints_add___spec__6(x_40, x_41, x_42, x_4, x_5); x_44 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_44, 0, x_43); x_45 = lean_array_fset(x_17, x_12, x_44); lean_dec(x_12); lean_ctor_set(x_1, 0, x_45); return x_1; } } default: { lean_object* x_46; lean_object* x_47; x_46 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_46, 0, x_4); lean_ctor_set(x_46, 1, x_5); x_47 = lean_array_fset(x_17, x_12, x_46); lean_dec(x_12); lean_ctor_set(x_1, 0, x_47); return x_1; } } } } else { lean_object* x_48; size_t x_49; size_t x_50; size_t x_51; size_t x_52; lean_object* x_53; lean_object* x_54; uint8_t x_55; x_48 = lean_ctor_get(x_1, 0); lean_inc(x_48); lean_dec(x_1); x_49 = 1; x_50 = 5; x_51 = l_Std_PersistentHashMap_insertAux___rarg___closed__2; x_52 = x_2 & x_51; x_53 = lean_usize_to_nat(x_52); x_54 = lean_array_get_size(x_48); x_55 = lean_nat_dec_lt(x_53, x_54); lean_dec(x_54); if (x_55 == 0) { lean_object* x_56; lean_dec(x_53); lean_dec(x_5); lean_dec(x_4); x_56 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_56, 0, x_48); return x_56; } else { lean_object* x_57; lean_object* x_58; lean_object* x_59; x_57 = lean_array_fget(x_48, x_53); x_58 = lean_box(2); x_59 = lean_array_fset(x_48, x_53, x_58); switch (lean_obj_tag(x_57)) { case 0: { lean_object* x_60; lean_object* x_61; lean_object* x_62; uint8_t x_63; x_60 = lean_ctor_get(x_57, 0); lean_inc(x_60); x_61 = lean_ctor_get(x_57, 1); lean_inc(x_61); if (lean_is_exclusive(x_57)) { lean_ctor_release(x_57, 0); lean_ctor_release(x_57, 1); x_62 = x_57; } else { lean_dec_ref(x_57); x_62 = lean_box(0); } x_63 = l___private_Lean_Meta_DiscrTreeTypes_0__Lean_Meta_DiscrTree_beqKey____x40_Lean_Meta_DiscrTreeTypes___hyg_73_(x_4, x_60); if (x_63 == 0) { lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_dec(x_62); x_64 = l_Std_PersistentHashMap_mkCollisionNode___rarg(x_60, x_61, x_4, x_5); x_65 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_65, 0, x_64); x_66 = lean_array_fset(x_59, x_53, x_65); lean_dec(x_53); x_67 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_67, 0, x_66); return x_67; } else { lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_dec(x_61); lean_dec(x_60); if (lean_is_scalar(x_62)) { x_68 = lean_alloc_ctor(0, 2, 0); } else { x_68 = x_62; } lean_ctor_set(x_68, 0, x_4); lean_ctor_set(x_68, 1, x_5); x_69 = lean_array_fset(x_59, x_53, x_68); lean_dec(x_53); x_70 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_70, 0, x_69); return x_70; } } case 1: { lean_object* x_71; lean_object* x_72; size_t x_73; size_t x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; x_71 = lean_ctor_get(x_57, 0); lean_inc(x_71); if (lean_is_exclusive(x_57)) { lean_ctor_release(x_57, 0); x_72 = x_57; } else { lean_dec_ref(x_57); x_72 = lean_box(0); } x_73 = x_2 >> x_50 % (sizeof(size_t) * 8); x_74 = x_3 + x_49; x_75 = l_Std_PersistentHashMap_insertAux___at_Lean_Meta_UnificationHints_add___spec__6(x_71, x_73, x_74, x_4, x_5); if (lean_is_scalar(x_72)) { x_76 = lean_alloc_ctor(1, 1, 0); } else { x_76 = x_72; } lean_ctor_set(x_76, 0, x_75); x_77 = lean_array_fset(x_59, x_53, x_76); lean_dec(x_53); x_78 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_78, 0, x_77); return x_78; } default: { lean_object* x_79; lean_object* x_80; lean_object* x_81; x_79 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_79, 0, x_4); lean_ctor_set(x_79, 1, x_5); x_80 = lean_array_fset(x_59, x_53, x_79); lean_dec(x_53); x_81 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_81, 0, x_80); return x_81; } } } } } else { uint8_t x_82; x_82 = !lean_is_exclusive(x_1); if (x_82 == 0) { lean_object* x_83; lean_object* x_84; size_t x_85; uint8_t x_86; x_83 = lean_unsigned_to_nat(0u); x_84 = l_Std_PersistentHashMap_insertAtCollisionNodeAux___at_Lean_Meta_UnificationHints_add___spec__8(x_1, x_83, x_4, x_5); x_85 = 7; x_86 = x_85 <= x_3; if (x_86 == 0) { lean_object* x_87; lean_object* x_88; uint8_t x_89; x_87 = l_Std_PersistentHashMap_getCollisionNodeSize___rarg(x_84); x_88 = lean_unsigned_to_nat(4u); x_89 = lean_nat_dec_lt(x_87, x_88); lean_dec(x_87); if (x_89 == 0) { lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; x_90 = lean_ctor_get(x_84, 0); lean_inc(x_90); x_91 = lean_ctor_get(x_84, 1); lean_inc(x_91); lean_dec(x_84); x_92 = l_Std_PersistentHashMap_insertAux___rarg___closed__3; x_93 = l_Std_PersistentHashMap_insertAux_traverse___at_Lean_Meta_UnificationHints_add___spec__7(x_3, x_90, x_91, lean_box(0), x_83, x_92); lean_dec(x_91); lean_dec(x_90); return x_93; } else { return x_84; } } else { return x_84; } } else { lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; size_t x_99; uint8_t x_100; x_94 = lean_ctor_get(x_1, 0); x_95 = lean_ctor_get(x_1, 1); lean_inc(x_95); lean_inc(x_94); lean_dec(x_1); x_96 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_96, 0, x_94); lean_ctor_set(x_96, 1, x_95); x_97 = lean_unsigned_to_nat(0u); x_98 = l_Std_PersistentHashMap_insertAtCollisionNodeAux___at_Lean_Meta_UnificationHints_add___spec__8(x_96, x_97, x_4, x_5); x_99 = 7; x_100 = x_99 <= x_3; if (x_100 == 0) { lean_object* x_101; lean_object* x_102; uint8_t x_103; x_101 = l_Std_PersistentHashMap_getCollisionNodeSize___rarg(x_98); x_102 = lean_unsigned_to_nat(4u); x_103 = lean_nat_dec_lt(x_101, x_102); lean_dec(x_101); if (x_103 == 0) { lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; x_104 = lean_ctor_get(x_98, 0); lean_inc(x_104); x_105 = lean_ctor_get(x_98, 1); lean_inc(x_105); lean_dec(x_98); x_106 = l_Std_PersistentHashMap_insertAux___rarg___closed__3; x_107 = l_Std_PersistentHashMap_insertAux_traverse___at_Lean_Meta_UnificationHints_add___spec__7(x_3, x_104, x_105, lean_box(0), x_97, x_106); lean_dec(x_105); lean_dec(x_104); return x_107; } else { return x_98; } } else { return x_98; } } } } } lean_object* l_Std_PersistentHashMap_insert___at_Lean_Meta_UnificationHints_add___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { uint8_t x_4; x_4 = !lean_is_exclusive(x_1); if (x_4 == 0) { lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_5 = lean_ctor_get(x_1, 0); x_6 = lean_ctor_get(x_1, 1); x_7 = l_Lean_Meta_DiscrTree_Key_hash(x_2); x_8 = 1; x_9 = l_Std_PersistentHashMap_insertAux___at_Lean_Meta_UnificationHints_add___spec__6(x_5, x_7, x_8, x_2, x_3); x_10 = lean_unsigned_to_nat(1u); x_11 = lean_nat_add(x_6, x_10); lean_dec(x_6); lean_ctor_set(x_1, 1, x_11); lean_ctor_set(x_1, 0, x_9); return x_1; } else { lean_object* x_12; lean_object* x_13; size_t x_14; size_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_12 = lean_ctor_get(x_1, 0); x_13 = lean_ctor_get(x_1, 1); lean_inc(x_13); lean_inc(x_12); lean_dec(x_1); x_14 = l_Lean_Meta_DiscrTree_Key_hash(x_2); x_15 = 1; x_16 = l_Std_PersistentHashMap_insertAux___at_Lean_Meta_UnificationHints_add___spec__6(x_12, x_14, x_15, x_2, x_3); x_17 = lean_unsigned_to_nat(1u); x_18 = lean_nat_add(x_13, x_17); lean_dec(x_13); x_19 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_19, 0, x_16); lean_ctor_set(x_19, 1, x_18); return x_19; } } } lean_object* l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertVal___at_Lean_Meta_UnificationHints_add___spec__10(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; x_3 = l_Array_contains___at_Lean_registerInternalExceptionId___spec__1(x_1, x_2); if (x_3 == 0) { lean_object* x_4; x_4 = lean_array_push(x_1, x_2); return x_4; } else { lean_dec(x_2); return x_1; } } } lean_object* l_Array_back___at_Lean_Meta_UnificationHints_add___spec__12(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_2 = lean_array_get_size(x_1); x_3 = lean_unsigned_to_nat(1u); x_4 = lean_nat_sub(x_2, x_3); lean_dec(x_2); x_5 = l_Array_back___at___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertAux___spec__2___rarg___closed__2; x_6 = lean_array_get(x_5, x_1, x_4); lean_dec(x_4); return x_6; } } lean_object* l___private_Init_Data_Array_BinSearch_0__Array_binInsertAux___at_Lean_Meta_UnificationHints_add___spec__13(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; x_9 = lean_nat_add(x_7, x_8); x_10 = lean_unsigned_to_nat(2u); x_11 = lean_nat_div(x_9, x_10); lean_dec(x_9); x_12 = l_Array_back___at___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertAux___spec__2___rarg___closed__2; x_13 = lean_array_get(x_12, x_5, x_11); x_14 = lean_ctor_get(x_13, 0); lean_inc(x_14); lean_dec(x_13); x_15 = lean_ctor_get(x_6, 0); x_16 = l_Lean_Meta_DiscrTree_Key_lt(x_14, x_15); if (x_16 == 0) { uint8_t x_17; lean_dec(x_8); x_17 = l_Lean_Meta_DiscrTree_Key_lt(x_15, x_14); lean_dec(x_14); if (x_17 == 0) { lean_object* x_18; uint8_t x_19; lean_dec(x_7); x_18 = lean_array_get_size(x_5); x_19 = lean_nat_dec_lt(x_11, x_18); lean_dec(x_18); if (x_19 == 0) { lean_dec(x_11); lean_dec(x_4); lean_dec(x_2); return x_5; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; x_20 = lean_array_fget(x_5, x_11); x_21 = l___private_Init_Data_Array_BinSearch_0__Array_binInsertAux___at___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertAux___spec__3___rarg___closed__1; x_22 = lean_array_fset(x_5, x_11, x_21); x_23 = !lean_is_exclusive(x_20); if (x_23 == 0) { lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; x_24 = lean_ctor_get(x_20, 1); x_25 = lean_ctor_get(x_20, 0); lean_dec(x_25); x_26 = lean_unsigned_to_nat(1u); x_27 = lean_nat_add(x_3, x_26); x_28 = l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertAux___at_Lean_Meta_UnificationHints_add___spec__9(x_1, x_2, x_27, x_24); lean_dec(x_27); lean_ctor_set(x_20, 1, x_28); lean_ctor_set(x_20, 0, x_4); x_29 = lean_array_fset(x_22, x_11, x_20); lean_dec(x_11); return x_29; } 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; x_30 = lean_ctor_get(x_20, 1); lean_inc(x_30); lean_dec(x_20); x_31 = lean_unsigned_to_nat(1u); x_32 = lean_nat_add(x_3, x_31); x_33 = l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertAux___at_Lean_Meta_UnificationHints_add___spec__9(x_1, x_2, x_32, x_30); lean_dec(x_32); x_34 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_34, 0, x_4); lean_ctor_set(x_34, 1, x_33); x_35 = lean_array_fset(x_22, x_11, x_34); lean_dec(x_11); return x_35; } } } else { x_8 = x_11; goto _start; } } else { uint8_t x_37; lean_dec(x_14); x_37 = lean_nat_dec_eq(x_11, x_7); if (x_37 == 0) { lean_dec(x_7); x_7 = x_11; goto _start; } else { lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_dec(x_11); lean_dec(x_8); x_39 = lean_unsigned_to_nat(1u); x_40 = lean_nat_add(x_3, x_39); x_41 = l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_createNodes___rarg(x_1, x_2, x_40); lean_dec(x_40); x_42 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_42, 0, x_4); lean_ctor_set(x_42, 1, x_41); x_43 = lean_nat_add(x_7, x_39); lean_dec(x_7); x_44 = l_Array_insertAt___rarg(x_5, x_43, x_42); lean_dec(x_43); return x_44; } } } } lean_object* l_Array_binInsertM___at_Lean_Meta_UnificationHints_add___spec__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) { _start: { uint8_t x_7; x_7 = l_Array_isEmpty___rarg(x_5); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; x_8 = l_Array_back___at___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertAux___spec__2___rarg___closed__2; x_9 = lean_unsigned_to_nat(0u); x_10 = lean_array_get(x_8, x_5, x_9); x_11 = lean_ctor_get(x_6, 0); x_12 = lean_ctor_get(x_10, 0); lean_inc(x_12); lean_dec(x_10); x_13 = l_Lean_Meta_DiscrTree_Key_lt(x_11, x_12); if (x_13 == 0) { uint8_t x_14; x_14 = l_Lean_Meta_DiscrTree_Key_lt(x_12, x_11); lean_dec(x_12); if (x_14 == 0) { lean_object* x_15; uint8_t x_16; x_15 = lean_array_get_size(x_5); x_16 = lean_nat_dec_lt(x_9, x_15); lean_dec(x_15); if (x_16 == 0) { lean_dec(x_4); lean_dec(x_2); return x_5; } else { lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; x_17 = lean_array_fget(x_5, x_9); x_18 = l___private_Init_Data_Array_BinSearch_0__Array_binInsertAux___at___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertAux___spec__3___rarg___closed__1; x_19 = lean_array_fset(x_5, x_9, x_18); x_20 = !lean_is_exclusive(x_17); if (x_20 == 0) { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; x_21 = lean_ctor_get(x_17, 1); x_22 = lean_ctor_get(x_17, 0); lean_dec(x_22); x_23 = lean_unsigned_to_nat(1u); x_24 = lean_nat_add(x_3, x_23); x_25 = l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertAux___at_Lean_Meta_UnificationHints_add___spec__9(x_1, x_2, x_24, x_21); lean_dec(x_24); lean_ctor_set(x_17, 1, x_25); lean_ctor_set(x_17, 0, x_4); x_26 = lean_array_fset(x_19, x_9, x_17); return x_26; } else { 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_17, 1); lean_inc(x_27); lean_dec(x_17); x_28 = lean_unsigned_to_nat(1u); x_29 = lean_nat_add(x_3, x_28); x_30 = l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertAux___at_Lean_Meta_UnificationHints_add___spec__9(x_1, x_2, x_29, x_27); lean_dec(x_29); x_31 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_31, 0, x_4); lean_ctor_set(x_31, 1, x_30); x_32 = lean_array_fset(x_19, x_9, x_31); return x_32; } } } else { lean_object* x_33; lean_object* x_34; uint8_t x_35; x_33 = l_Array_back___at_Lean_Meta_UnificationHints_add___spec__12(x_5); x_34 = lean_ctor_get(x_33, 0); lean_inc(x_34); lean_dec(x_33); x_35 = l_Lean_Meta_DiscrTree_Key_lt(x_34, x_11); if (x_35 == 0) { uint8_t x_36; x_36 = l_Lean_Meta_DiscrTree_Key_lt(x_11, x_34); lean_dec(x_34); if (x_36 == 0) { lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; x_37 = lean_array_get_size(x_5); x_38 = lean_unsigned_to_nat(1u); x_39 = lean_nat_sub(x_37, x_38); x_40 = lean_nat_dec_lt(x_39, x_37); lean_dec(x_37); if (x_40 == 0) { lean_dec(x_39); lean_dec(x_4); lean_dec(x_2); return x_5; } else { lean_object* x_41; lean_object* x_42; lean_object* x_43; uint8_t x_44; x_41 = lean_array_fget(x_5, x_39); x_42 = l___private_Init_Data_Array_BinSearch_0__Array_binInsertAux___at___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertAux___spec__3___rarg___closed__1; x_43 = lean_array_fset(x_5, x_39, x_42); x_44 = !lean_is_exclusive(x_41); if (x_44 == 0) { lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; x_45 = lean_ctor_get(x_41, 1); x_46 = lean_ctor_get(x_41, 0); lean_dec(x_46); x_47 = lean_nat_add(x_3, x_38); x_48 = l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertAux___at_Lean_Meta_UnificationHints_add___spec__9(x_1, x_2, x_47, x_45); lean_dec(x_47); lean_ctor_set(x_41, 1, x_48); lean_ctor_set(x_41, 0, x_4); x_49 = lean_array_fset(x_43, x_39, x_41); lean_dec(x_39); return x_49; } else { lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; x_50 = lean_ctor_get(x_41, 1); lean_inc(x_50); lean_dec(x_41); x_51 = lean_nat_add(x_3, x_38); x_52 = l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertAux___at_Lean_Meta_UnificationHints_add___spec__9(x_1, x_2, x_51, x_50); lean_dec(x_51); x_53 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_53, 0, x_4); lean_ctor_set(x_53, 1, x_52); x_54 = lean_array_fset(x_43, x_39, x_53); lean_dec(x_39); return x_54; } } } else { lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; x_55 = lean_array_get_size(x_5); x_56 = lean_unsigned_to_nat(1u); x_57 = lean_nat_sub(x_55, x_56); lean_dec(x_55); x_58 = l___private_Init_Data_Array_BinSearch_0__Array_binInsertAux___at_Lean_Meta_UnificationHints_add___spec__13(x_1, x_2, x_3, x_4, x_5, x_6, x_9, x_57); return x_58; } } else { lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_dec(x_34); x_59 = lean_unsigned_to_nat(1u); x_60 = lean_nat_add(x_3, x_59); x_61 = l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_createNodes___rarg(x_1, x_2, x_60); lean_dec(x_60); x_62 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_62, 0, x_4); lean_ctor_set(x_62, 1, x_61); x_63 = lean_array_push(x_5, x_62); return x_63; } } } else { lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_dec(x_12); x_64 = lean_unsigned_to_nat(1u); x_65 = lean_nat_add(x_3, x_64); x_66 = l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_createNodes___rarg(x_1, x_2, x_65); lean_dec(x_65); x_67 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_67, 0, x_4); lean_ctor_set(x_67, 1, x_66); x_68 = l_Array_insertAt___rarg(x_5, x_9, x_67); return x_68; } } else { lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; x_69 = lean_unsigned_to_nat(1u); x_70 = lean_nat_add(x_3, x_69); x_71 = l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_createNodes___rarg(x_1, x_2, x_70); lean_dec(x_70); x_72 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_72, 0, x_4); lean_ctor_set(x_72, 1, x_71); x_73 = lean_array_push(x_5, x_72); return x_73; } } } lean_object* l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertAux___at_Lean_Meta_UnificationHints_add___spec__9(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { uint8_t x_5; x_5 = !lean_is_exclusive(x_4); if (x_5 == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; x_6 = lean_ctor_get(x_4, 0); x_7 = lean_ctor_get(x_4, 1); x_8 = lean_array_get_size(x_1); x_9 = lean_nat_dec_lt(x_3, x_8); lean_dec(x_8); if (x_9 == 0) { lean_object* x_10; x_10 = l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertVal___at_Lean_Meta_UnificationHints_add___spec__10(x_6, x_2); lean_ctor_set(x_4, 0, x_10); return x_4; } else { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_11 = lean_array_fget(x_1, x_3); x_12 = l_Lean_Meta_DiscrTree_instInhabitedTrie___closed__1; lean_inc(x_11); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_11); lean_ctor_set(x_13, 1, x_12); x_14 = l_Array_binInsertM___at_Lean_Meta_UnificationHints_add___spec__11(x_1, x_2, x_3, x_11, x_7, x_13); lean_dec(x_13); lean_ctor_set(x_4, 1, x_14); return x_4; } } else { lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; x_15 = lean_ctor_get(x_4, 0); x_16 = lean_ctor_get(x_4, 1); lean_inc(x_16); lean_inc(x_15); lean_dec(x_4); x_17 = lean_array_get_size(x_1); x_18 = lean_nat_dec_lt(x_3, x_17); lean_dec(x_17); if (x_18 == 0) { lean_object* x_19; lean_object* x_20; x_19 = l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertVal___at_Lean_Meta_UnificationHints_add___spec__10(x_15, x_2); x_20 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_20, 0, x_19); lean_ctor_set(x_20, 1, x_16); return x_20; } else { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_21 = lean_array_fget(x_1, x_3); x_22 = l_Lean_Meta_DiscrTree_instInhabitedTrie___closed__1; lean_inc(x_21); x_23 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_23, 0, x_21); lean_ctor_set(x_23, 1, x_22); x_24 = l_Array_binInsertM___at_Lean_Meta_UnificationHints_add___spec__11(x_1, x_2, x_3, x_21, x_16, x_23); lean_dec(x_23); x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_15); lean_ctor_set(x_25, 1, x_24); return x_25; } } } } lean_object* l_Lean_Meta_DiscrTree_insertCore___at_Lean_Meta_UnificationHints_add___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { uint8_t x_4; x_4 = l_Array_isEmpty___rarg(x_2); if (x_4 == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_5 = l_Lean_Meta_DiscrTree_instInhabitedKey; x_6 = lean_unsigned_to_nat(0u); x_7 = lean_array_get(x_5, x_2, x_6); lean_inc(x_1); x_8 = l_Std_PersistentHashMap_find_x3f___at_Lean_Meta_UnificationHints_add___spec__2(x_1, x_7); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; x_9 = lean_unsigned_to_nat(1u); x_10 = l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_createNodes___rarg(x_2, x_3, x_9); x_11 = l_Std_PersistentHashMap_insert___at_Lean_Meta_UnificationHints_add___spec__5(x_1, x_7, x_10); return x_11; } else { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_12 = lean_ctor_get(x_8, 0); lean_inc(x_12); lean_dec(x_8); x_13 = lean_unsigned_to_nat(1u); x_14 = l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertAux___at_Lean_Meta_UnificationHints_add___spec__9(x_2, x_3, x_13, x_12); x_15 = l_Std_PersistentHashMap_insert___at_Lean_Meta_UnificationHints_add___spec__5(x_1, x_7, x_14); return x_15; } } else { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_dec(x_3); lean_dec(x_1); x_16 = l_Lean_Meta_DiscrTree_insertCore___rarg___closed__1; x_17 = l_Lean_Meta_DiscrTree_insertCore___rarg___closed__5; x_18 = lean_panic_fn(x_16, x_17); return x_18; } } } lean_object* l_Lean_Meta_UnificationHints_add(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_2, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_2, 1); lean_inc(x_4); lean_dec(x_2); x_5 = l_Lean_Meta_DiscrTree_insertCore___at_Lean_Meta_UnificationHints_add___spec__1(x_1, x_3, x_4); lean_dec(x_3); return x_5; } } lean_object* l_Std_PersistentHashMap_findAtAux___at_Lean_Meta_UnificationHints_add___spec__4___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_PersistentHashMap_findAtAux___at_Lean_Meta_UnificationHints_add___spec__4(x_1, x_2, x_3, x_4, x_5); lean_dec(x_5); lean_dec(x_2); lean_dec(x_1); return x_6; } } lean_object* l_Std_PersistentHashMap_findAux___at_Lean_Meta_UnificationHints_add___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { size_t x_4; lean_object* x_5; x_4 = lean_unbox_usize(x_2); lean_dec(x_2); x_5 = l_Std_PersistentHashMap_findAux___at_Lean_Meta_UnificationHints_add___spec__3(x_1, x_4, x_3); lean_dec(x_3); return x_5; } } lean_object* l_Std_PersistentHashMap_find_x3f___at_Lean_Meta_UnificationHints_add___spec__2___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Std_PersistentHashMap_find_x3f___at_Lean_Meta_UnificationHints_add___spec__2(x_1, x_2); lean_dec(x_2); return x_3; } } lean_object* l_Std_PersistentHashMap_insertAux_traverse___at_Lean_Meta_UnificationHints_add___spec__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) { _start: { size_t x_7; lean_object* x_8; x_7 = lean_unbox_usize(x_1); lean_dec(x_1); x_8 = l_Std_PersistentHashMap_insertAux_traverse___at_Lean_Meta_UnificationHints_add___spec__7(x_7, x_2, x_3, x_4, x_5, x_6); lean_dec(x_3); lean_dec(x_2); return x_8; } } lean_object* l_Std_PersistentHashMap_insertAux___at_Lean_Meta_UnificationHints_add___spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { size_t x_6; size_t x_7; lean_object* x_8; x_6 = lean_unbox_usize(x_2); lean_dec(x_2); x_7 = lean_unbox_usize(x_3); lean_dec(x_3); x_8 = l_Std_PersistentHashMap_insertAux___at_Lean_Meta_UnificationHints_add___spec__6(x_1, x_6, x_7, x_4, x_5); return x_8; } } lean_object* l_Array_back___at_Lean_Meta_UnificationHints_add___spec__12___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Array_back___at_Lean_Meta_UnificationHints_add___spec__12(x_1); lean_dec(x_1); return x_2; } } lean_object* l___private_Init_Data_Array_BinSearch_0__Array_binInsertAux___at_Lean_Meta_UnificationHints_add___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, lean_object* x_8) { _start: { lean_object* x_9; x_9 = l___private_Init_Data_Array_BinSearch_0__Array_binInsertAux___at_Lean_Meta_UnificationHints_add___spec__13(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); lean_dec(x_6); lean_dec(x_3); lean_dec(x_1); return x_9; } } lean_object* l_Array_binInsertM___at_Lean_Meta_UnificationHints_add___spec__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) { _start: { lean_object* x_7; x_7 = l_Array_binInsertM___at_Lean_Meta_UnificationHints_add___spec__11(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_6); lean_dec(x_3); lean_dec(x_1); return x_7; } } lean_object* l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertAux___at_Lean_Meta_UnificationHints_add___spec__9___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l___private_Lean_Meta_DiscrTree_0__Lean_Meta_DiscrTree_insertAux___at_Lean_Meta_UnificationHints_add___spec__9(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_1); return x_5; } } lean_object* l_Lean_Meta_DiscrTree_insertCore___at_Lean_Meta_UnificationHints_add___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_Meta_DiscrTree_insertCore___at_Lean_Meta_UnificationHints_add___spec__1(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("unifHints"); return x_1; } } static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__3() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_Lean_Meta_UnificationHints_add), 2, 0); return x_1; } } static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__2; x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__3; x_3 = l_Lean_Meta_Instances_discrTree___default___closed__1; x_4 = l_Applicative_seqRight___default___rarg___closed__1; x_5 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_5, 0, x_1); lean_ctor_set(x_5, 1, x_2); lean_ctor_set(x_5, 2, x_3); lean_ctor_set(x_5, 3, x_4); return x_5; } } lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__4; x_3 = l_Lean_registerSimpleScopedEnvExtension___rarg(x_2, x_1); return x_3; } } lean_object* l_Lean_Meta_unificationHintExtension___lambda__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Meta_instInhabitedUnificationHintEntry___closed__1; return x_2; } } static lean_object* _init_l_Lean_Meta_unificationHintExtension___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_Lean_Meta_unificationHintExtension___lambda__1___boxed), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Meta_unificationHintExtension___closed__2() { _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; lean_object* x_7; x_1 = lean_box(0); x_2 = l_Lean_EnvExtensionInterfaceUnsafe_instInhabitedExt___closed__1; x_3 = l_Lean_ScopedEnvExtension_instInhabitedDescr___rarg___closed__1; x_4 = l_Lean_Meta_unificationHintExtension___closed__1; x_5 = l_Lean_instInhabitedPersistentEnvExtension___closed__2; x_6 = l_Applicative_seqRight___default___rarg___closed__1; x_7 = lean_alloc_ctor(0, 6, 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); lean_ctor_set(x_7, 3, x_4); lean_ctor_set(x_7, 4, x_5); lean_ctor_set(x_7, 5, x_6); return x_7; } } static lean_object* _init_l_Lean_Meta_unificationHintExtension___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Meta_unificationHintExtension___closed__2; x_2 = l_Lean_instInhabitedPersistentEnvExtension___closed__5; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } lean_object* l_Lean_Meta_unificationHintExtension___lambda__1___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Meta_unificationHintExtension___lambda__1(x_1); lean_dec(x_1); return x_2; } } lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint_match__1___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_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_dec(x_3); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_ctor_get(x_6, 1); lean_inc(x_7); x_8 = lean_ctor_get(x_6, 0); lean_inc(x_8); lean_dec(x_6); x_9 = lean_ctor_get(x_7, 0); lean_inc(x_9); x_10 = lean_ctor_get(x_7, 1); lean_inc(x_10); lean_dec(x_7); x_11 = lean_apply_3(x_2, x_8, x_9, x_10); return x_11; } } } lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint_match__1___rarg), 3, 0); return x_2; } } lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_1) == 7) { lean_object* x_4; lean_object* x_5; lean_object* x_6; uint64_t x_7; lean_object* x_8; lean_object* x_9; 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); x_6 = lean_ctor_get(x_1, 2); lean_inc(x_6); x_7 = lean_ctor_get_uint64(x_1, sizeof(void*)*3); lean_dec(x_1); x_8 = lean_box_uint64(x_7); x_9 = lean_apply_4(x_2, x_4, x_5, x_6, x_8); return x_9; } else { lean_object* x_10; lean_dec(x_2); x_10 = lean_apply_1(x_3, x_1); return x_10; } } } lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode_match__1___rarg), 3, 0); return x_2; } } static lean_object* _init_l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("invalid unification hint constraint, unexpected term"); return x_1; } } static lean_object* _init_l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint___closed__1; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; uint8_t x_4; x_2 = l_myMacro____x40_Init_Notation___hyg_8668____closed__4; x_3 = lean_unsigned_to_nat(3u); x_4 = l_Lean_Expr_isAppOfArity(x_1, x_2, x_3); if (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; x_5 = l_Lean_indentExpr(x_1); x_6 = l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint___closed__2; x_7 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_7, 0, x_6); lean_ctor_set(x_7, 1, x_5); x_8 = l_Lean_KernelException_toMessageData___closed__15; x_9 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_9, 0, x_7); lean_ctor_set(x_9, 1, x_8); x_10 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_10, 0, x_9); return x_10; } else { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_11 = l_Lean_Expr_appFn_x21(x_1); x_12 = l_Lean_Expr_appArg_x21(x_11); lean_dec(x_11); x_13 = l_Lean_Expr_appArg_x21(x_1); lean_dec(x_1); x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_12); lean_ctor_set(x_14, 1, x_13); x_15 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_15, 0, x_14); return x_15; } } } lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; x_5 = lean_array_push(x_1, x_2); x_6 = l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode(x_3, x_5); return x_6; } } static lean_object* _init_l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("invalid unification hint constraint, unexpected dependency"); return x_1; } } static lean_object* _init_l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode___closed__1; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_1) == 7) { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 1); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 2); lean_inc(x_4); x_5 = l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint(x_3); if (lean_obj_tag(x_5) == 0) { uint8_t x_6; lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); x_6 = !lean_is_exclusive(x_5); if (x_6 == 0) { return x_5; } else { lean_object* x_7; lean_object* x_8; x_7 = lean_ctor_get(x_5, 0); lean_inc(x_7); lean_dec(x_5); x_8 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_8, 0, x_7); return x_8; } } else { uint8_t x_9; x_9 = !lean_is_exclusive(x_5); if (x_9 == 0) { lean_object* x_10; uint8_t x_11; x_10 = lean_ctor_get(x_5, 0); x_11 = l_Lean_Expr_hasLooseBVars(x_4); if (x_11 == 0) { lean_object* x_12; lean_object* x_13; lean_free_object(x_5); lean_dec(x_1); x_12 = lean_box(0); x_13 = l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode___lambda__1(x_2, x_10, x_4, x_12); return x_13; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_dec(x_10); lean_dec(x_4); lean_dec(x_2); x_14 = l_Lean_indentExpr(x_1); x_15 = l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode___closed__2; x_16 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_16, 0, x_15); lean_ctor_set(x_16, 1, x_14); x_17 = l_Lean_KernelException_toMessageData___closed__15; x_18 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_18, 0, x_16); lean_ctor_set(x_18, 1, x_17); lean_ctor_set_tag(x_5, 0); lean_ctor_set(x_5, 0, x_18); return x_5; } } else { lean_object* x_19; uint8_t x_20; x_19 = lean_ctor_get(x_5, 0); lean_inc(x_19); lean_dec(x_5); x_20 = l_Lean_Expr_hasLooseBVars(x_4); if (x_20 == 0) { lean_object* x_21; lean_object* x_22; lean_dec(x_1); x_21 = lean_box(0); x_22 = l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode___lambda__1(x_2, x_19, x_4, x_21); return x_22; } else { lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_dec(x_19); lean_dec(x_4); lean_dec(x_2); x_23 = l_Lean_indentExpr(x_1); x_24 = l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode___closed__2; x_25 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_23); x_26 = l_Lean_KernelException_toMessageData___closed__15; x_27 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_27, 0, x_25); lean_ctor_set(x_27, 1, x_26); x_28 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_28, 0, x_27); return x_28; } } } } else { lean_object* x_29; x_29 = l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint(x_1); if (lean_obj_tag(x_29) == 0) { uint8_t x_30; lean_dec(x_2); x_30 = !lean_is_exclusive(x_29); if (x_30 == 0) { return x_29; } else { lean_object* x_31; lean_object* x_32; x_31 = lean_ctor_get(x_29, 0); lean_inc(x_31); lean_dec(x_29); x_32 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_32, 0, x_31); return x_32; } } else { uint8_t x_33; x_33 = !lean_is_exclusive(x_29); if (x_33 == 0) { lean_object* x_34; lean_object* x_35; lean_object* x_36; x_34 = lean_ctor_get(x_29, 0); x_35 = lean_array_to_list(lean_box(0), x_2); x_36 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_36, 0, x_34); lean_ctor_set(x_36, 1, x_35); lean_ctor_set(x_29, 0, x_36); return x_29; } else { lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; x_37 = lean_ctor_get(x_29, 0); lean_inc(x_37); lean_dec(x_29); x_38 = lean_array_to_list(lean_box(0), x_2); x_39 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_39, 0, x_37); lean_ctor_set(x_39, 1, x_38); x_40 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_40, 0, x_39); return x_40; } } } } } lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode___lambda__1(x_1, x_2, x_3, x_4); lean_dec(x_4); return x_5; } } lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = l_Array_empty___closed__1; x_3 = l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode(x_1, x_2); return x_3; } } static lean_object* _init_l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("invalid unification hint, failed to unify constraint left-hand-side"); return x_1; } } static lean_object* _init_l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__1; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } static lean_object* _init_l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("\nwith right-hand-side"); return x_1; } } static lean_object* _init_l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__4() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__3; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } lean_object* l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_7; lean_object* x_8; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_7 = lean_box(0); x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_7); lean_ctor_set(x_8, 1, x_6); return x_8; } else { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_9 = lean_ctor_get(x_1, 0); lean_inc(x_9); x_10 = lean_ctor_get(x_1, 1); lean_inc(x_10); lean_dec(x_1); x_11 = lean_ctor_get(x_9, 0); lean_inc(x_11); x_12 = lean_ctor_get(x_9, 1); lean_inc(x_12); lean_dec(x_9); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); lean_inc(x_12); lean_inc(x_11); x_13 = l_Lean_Meta_isExprDefEq(x_11, x_12, x_2, x_3, x_4, x_5, x_6); if (lean_obj_tag(x_13) == 0) { lean_object* x_14; uint8_t x_15; x_14 = lean_ctor_get(x_13, 0); lean_inc(x_14); x_15 = lean_unbox(x_14); lean_dec(x_14); if (x_15 == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_27; lean_dec(x_10); x_16 = lean_ctor_get(x_13, 1); lean_inc(x_16); lean_dec(x_13); x_17 = l_Lean_indentExpr(x_11); x_18 = l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__2; x_19 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_17); x_20 = l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__4; x_21 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_21, 0, x_19); lean_ctor_set(x_21, 1, x_20); x_22 = l_Lean_indentExpr(x_12); x_23 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_23, 0, x_21); lean_ctor_set(x_23, 1, x_22); x_24 = l_Lean_KernelException_toMessageData___closed__15; x_25 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_25, 0, x_23); lean_ctor_set(x_25, 1, x_24); x_26 = l_Lean_throwError___at_Lean_Meta_whnf___spec__1(x_25, x_2, x_3, x_4, x_5, x_16); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_27 = !lean_is_exclusive(x_26); if (x_27 == 0) { return x_26; } else { lean_object* x_28; lean_object* x_29; lean_object* x_30; x_28 = lean_ctor_get(x_26, 0); x_29 = lean_ctor_get(x_26, 1); lean_inc(x_29); lean_inc(x_28); lean_dec(x_26); x_30 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_30, 0, x_28); lean_ctor_set(x_30, 1, x_29); return x_30; } } else { lean_object* x_31; lean_dec(x_12); lean_dec(x_11); x_31 = lean_ctor_get(x_13, 1); lean_inc(x_31); lean_dec(x_13); x_1 = x_10; x_6 = x_31; goto _start; } } else { uint8_t x_33; lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_33 = !lean_is_exclusive(x_13); if (x_33 == 0) { return x_13; } else { lean_object* x_34; lean_object* x_35; lean_object* x_36; x_34 = lean_ctor_get(x_13, 0); x_35 = lean_ctor_get(x_13, 1); lean_inc(x_35); lean_inc(x_34); lean_dec(x_13); 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; } } } } } static lean_object* _init_l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___rarg___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("invalid unification hint, failed to unify pattern left-hand-side"); return x_1; } } static lean_object* _init_l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___rarg___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___rarg___closed__1; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; lean_object* x_8; x_7 = lean_ctor_get(x_1, 1); lean_inc(x_7); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); x_8 = l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1(x_7, x_2, x_3, x_4, x_5, x_6); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_9 = lean_ctor_get(x_8, 1); lean_inc(x_9); lean_dec(x_8); x_10 = lean_ctor_get(x_1, 0); lean_inc(x_10); lean_dec(x_1); x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); x_12 = lean_ctor_get(x_10, 1); lean_inc(x_12); lean_dec(x_10); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); lean_inc(x_12); lean_inc(x_11); x_13 = l_Lean_Meta_isExprDefEq(x_11, x_12, x_2, x_3, x_4, x_5, x_9); if (lean_obj_tag(x_13) == 0) { lean_object* x_14; uint8_t x_15; x_14 = lean_ctor_get(x_13, 0); lean_inc(x_14); x_15 = lean_unbox(x_14); lean_dec(x_14); if (x_15 == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; x_16 = lean_ctor_get(x_13, 1); lean_inc(x_16); lean_dec(x_13); x_17 = l_Lean_indentExpr(x_11); x_18 = l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___rarg___closed__2; x_19 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_17); x_20 = l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__4; x_21 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_21, 0, x_19); lean_ctor_set(x_21, 1, x_20); x_22 = l_Lean_indentExpr(x_12); x_23 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_23, 0, x_21); lean_ctor_set(x_23, 1, x_22); x_24 = l_Lean_KernelException_toMessageData___closed__15; x_25 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_25, 0, x_23); lean_ctor_set(x_25, 1, x_24); x_26 = l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(x_25, x_2, x_3, x_4, x_5, x_16); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); return x_26; } else { uint8_t x_27; lean_dec(x_12); lean_dec(x_11); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_27 = !lean_is_exclusive(x_13); if (x_27 == 0) { lean_object* x_28; lean_object* x_29; x_28 = lean_ctor_get(x_13, 0); lean_dec(x_28); x_29 = lean_box(0); lean_ctor_set(x_13, 0, x_29); return x_13; } else { lean_object* x_30; lean_object* x_31; lean_object* x_32; x_30 = lean_ctor_get(x_13, 1); lean_inc(x_30); lean_dec(x_13); x_31 = lean_box(0); x_32 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_32, 0, x_31); lean_ctor_set(x_32, 1, x_30); return x_32; } } } else { uint8_t x_33; lean_dec(x_12); lean_dec(x_11); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_33 = !lean_is_exclusive(x_13); if (x_33 == 0) { return x_13; } else { lean_object* x_34; lean_object* x_35; lean_object* x_36; x_34 = lean_ctor_get(x_13, 0); x_35 = lean_ctor_get(x_13, 1); lean_inc(x_35); lean_inc(x_34); lean_dec(x_13); 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; } } } else { uint8_t x_37; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_37 = !lean_is_exclusive(x_8); if (x_37 == 0) { return x_8; } else { lean_object* x_38; lean_object* x_39; lean_object* x_40; x_38 = lean_ctor_get(x_8, 0); x_39 = lean_ctor_get(x_8, 1); lean_inc(x_39); lean_inc(x_38); lean_dec(x_8); 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* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___rarg), 6, 0); return x_2; } } lean_object* l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint(x_1); lean_dec(x_1); return x_2; } } lean_object* l_Lean_Meta_addUnificationHint_match__1___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); lean_dec(x_1); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_apply_1(x_3, x_6); return x_7; } } } lean_object* l_Lean_Meta_addUnificationHint_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Meta_addUnificationHint_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Meta_addUnificationHint_match__2___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; x_3 = lean_ctor_get(x_1, 1); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 0); lean_inc(x_4); lean_dec(x_1); x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); x_6 = lean_ctor_get(x_3, 1); lean_inc(x_6); lean_dec(x_3); x_7 = lean_apply_3(x_2, x_4, x_5, x_6); return x_7; } } lean_object* l_Lean_Meta_addUnificationHint_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Meta_addUnificationHint_match__2___rarg), 2, 0); return x_2; } } lean_object* l_Lean_Meta_addUnificationHint_match__3___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_box(0); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_apply_1(x_3, x_6); return x_7; } } } lean_object* l_Lean_Meta_addUnificationHint_match__3(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Meta_addUnificationHint_match__3___rarg), 3, 0); return x_2; } } lean_object* l_Lean_ScopedEnvExtension_add___at_Lean_Meta_addUnificationHint___spec__1(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { switch (x_3) { case 0: { lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; lean_dec(x_6); x_9 = lean_st_ref_take(x_7, x_8); 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_is_exclusive(x_10); if (x_12 == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; x_13 = lean_ctor_get(x_10, 0); x_14 = l_Lean_ScopedEnvExtension_addEntry___rarg(x_1, x_13, x_2); lean_ctor_set(x_10, 0, x_14); x_15 = lean_st_ref_set(x_7, x_10, x_11); x_16 = !lean_is_exclusive(x_15); if (x_16 == 0) { lean_object* x_17; lean_object* x_18; x_17 = lean_ctor_get(x_15, 0); lean_dec(x_17); x_18 = lean_box(0); lean_ctor_set(x_15, 0, x_18); return x_15; } else { lean_object* x_19; lean_object* x_20; lean_object* x_21; x_19 = lean_ctor_get(x_15, 1); lean_inc(x_19); lean_dec(x_15); x_20 = lean_box(0); x_21 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_21, 0, x_20); lean_ctor_set(x_21, 1, x_19); return x_21; } } else { lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; x_22 = lean_ctor_get(x_10, 0); x_23 = lean_ctor_get(x_10, 1); x_24 = lean_ctor_get(x_10, 2); x_25 = lean_ctor_get(x_10, 3); lean_inc(x_25); lean_inc(x_24); lean_inc(x_23); lean_inc(x_22); lean_dec(x_10); x_26 = l_Lean_ScopedEnvExtension_addEntry___rarg(x_1, x_22, x_2); x_27 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_27, 0, x_26); lean_ctor_set(x_27, 1, x_23); lean_ctor_set(x_27, 2, x_24); lean_ctor_set(x_27, 3, x_25); x_28 = lean_st_ref_set(x_7, x_27, x_11); x_29 = lean_ctor_get(x_28, 1); lean_inc(x_29); if (lean_is_exclusive(x_28)) { lean_ctor_release(x_28, 0); lean_ctor_release(x_28, 1); x_30 = x_28; } else { lean_dec_ref(x_28); x_30 = lean_box(0); } x_31 = lean_box(0); if (lean_is_scalar(x_30)) { x_32 = lean_alloc_ctor(0, 2, 0); } else { x_32 = x_30; } lean_ctor_set(x_32, 0, x_31); lean_ctor_set(x_32, 1, x_29); return x_32; } } case 1: { lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36; lean_dec(x_6); x_33 = lean_st_ref_take(x_7, x_8); x_34 = lean_ctor_get(x_33, 0); lean_inc(x_34); x_35 = lean_ctor_get(x_33, 1); lean_inc(x_35); lean_dec(x_33); x_36 = !lean_is_exclusive(x_34); if (x_36 == 0) { lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; x_37 = lean_ctor_get(x_34, 0); x_38 = l_Lean_ScopedEnvExtension_addLocalEntry___rarg(x_1, x_37, x_2); lean_ctor_set(x_34, 0, x_38); x_39 = lean_st_ref_set(x_7, x_34, x_35); x_40 = !lean_is_exclusive(x_39); if (x_40 == 0) { lean_object* x_41; lean_object* x_42; x_41 = lean_ctor_get(x_39, 0); lean_dec(x_41); x_42 = lean_box(0); lean_ctor_set(x_39, 0, x_42); return x_39; } else { lean_object* x_43; lean_object* x_44; lean_object* x_45; x_43 = lean_ctor_get(x_39, 1); lean_inc(x_43); lean_dec(x_39); x_44 = lean_box(0); x_45 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_45, 0, x_44); lean_ctor_set(x_45, 1, x_43); return x_45; } } else { 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; lean_object* x_56; x_46 = lean_ctor_get(x_34, 0); x_47 = lean_ctor_get(x_34, 1); x_48 = lean_ctor_get(x_34, 2); x_49 = lean_ctor_get(x_34, 3); lean_inc(x_49); lean_inc(x_48); lean_inc(x_47); lean_inc(x_46); lean_dec(x_34); x_50 = l_Lean_ScopedEnvExtension_addLocalEntry___rarg(x_1, x_46, x_2); x_51 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_51, 0, x_50); lean_ctor_set(x_51, 1, x_47); lean_ctor_set(x_51, 2, x_48); lean_ctor_set(x_51, 3, x_49); x_52 = lean_st_ref_set(x_7, x_51, x_35); x_53 = lean_ctor_get(x_52, 1); lean_inc(x_53); if (lean_is_exclusive(x_52)) { lean_ctor_release(x_52, 0); lean_ctor_release(x_52, 1); x_54 = x_52; } else { lean_dec_ref(x_52); x_54 = lean_box(0); } x_55 = lean_box(0); if (lean_is_scalar(x_54)) { x_56 = lean_alloc_ctor(0, 2, 0); } else { x_56 = x_54; } lean_ctor_set(x_56, 0, x_55); lean_ctor_set(x_56, 1, x_53); return x_56; } } default: { lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; uint8_t x_61; x_57 = lean_ctor_get(x_6, 4); lean_inc(x_57); lean_dec(x_6); x_58 = lean_st_ref_take(x_7, x_8); x_59 = lean_ctor_get(x_58, 0); lean_inc(x_59); x_60 = lean_ctor_get(x_58, 1); lean_inc(x_60); lean_dec(x_58); x_61 = !lean_is_exclusive(x_59); if (x_61 == 0) { lean_object* x_62; lean_object* x_63; lean_object* x_64; uint8_t x_65; x_62 = lean_ctor_get(x_59, 0); x_63 = l_Lean_ScopedEnvExtension_addScopedEntry___rarg(x_1, x_62, x_57, x_2); lean_ctor_set(x_59, 0, x_63); x_64 = lean_st_ref_set(x_7, x_59, x_60); x_65 = !lean_is_exclusive(x_64); if (x_65 == 0) { lean_object* x_66; lean_object* x_67; x_66 = lean_ctor_get(x_64, 0); lean_dec(x_66); x_67 = lean_box(0); lean_ctor_set(x_64, 0, x_67); return x_64; } else { lean_object* x_68; lean_object* x_69; lean_object* x_70; x_68 = lean_ctor_get(x_64, 1); lean_inc(x_68); lean_dec(x_64); x_69 = lean_box(0); x_70 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_70, 0, x_69); lean_ctor_set(x_70, 1, x_68); return x_70; } } else { lean_object* x_71; 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; lean_object* x_81; x_71 = lean_ctor_get(x_59, 0); x_72 = lean_ctor_get(x_59, 1); x_73 = lean_ctor_get(x_59, 2); x_74 = lean_ctor_get(x_59, 3); lean_inc(x_74); lean_inc(x_73); lean_inc(x_72); lean_inc(x_71); lean_dec(x_59); x_75 = l_Lean_ScopedEnvExtension_addScopedEntry___rarg(x_1, x_71, x_57, x_2); x_76 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_76, 0, x_75); lean_ctor_set(x_76, 1, x_72); lean_ctor_set(x_76, 2, x_73); lean_ctor_set(x_76, 3, x_74); x_77 = lean_st_ref_set(x_7, x_76, x_60); x_78 = lean_ctor_get(x_77, 1); lean_inc(x_78); if (lean_is_exclusive(x_77)) { lean_ctor_release(x_77, 0); lean_ctor_release(x_77, 1); x_79 = x_77; } else { lean_dec_ref(x_77); x_79 = lean_box(0); } x_80 = lean_box(0); if (lean_is_scalar(x_79)) { x_81 = lean_alloc_ctor(0, 2, 0); } else { x_81 = x_79; } lean_ctor_set(x_81, 0, x_80); lean_ctor_set(x_81, 1, x_78); return x_81; } } } } } lean_object* l_Lean_ScopedEnvExtension_getState___at_Lean_Meta_addUnificationHint___spec__2(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 1); x_4 = l_Lean_PersistentEnvExtension_getState___rarg(x_3, x_2); x_5 = lean_ctor_get(x_4, 0); lean_inc(x_5); lean_dec(x_4); if (lean_obj_tag(x_5) == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; x_6 = l_Lean_Meta_instInhabitedUnificationHints; x_7 = l_Lean_ScopedEnvExtension_getState___rarg___closed__3; x_8 = lean_panic_fn(x_6, x_7); return x_8; } else { lean_object* x_9; lean_object* x_10; x_9 = lean_ctor_get(x_5, 0); lean_inc(x_9); lean_dec(x_5); x_10 = lean_ctor_get(x_9, 0); lean_inc(x_10); lean_dec(x_9); return x_10; } } } lean_object* l_Std_fmt___at_Lean_Meta_addUnificationHint___spec__3(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Meta_DiscrTree_format___at_Lean_Meta_instToFormatUnificationHints___spec__2(x_1); return x_2; } } static lean_object* _init_l_Lean_Meta_addUnificationHint___lambda__1___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("invalid unification hint, it must be a definition"); return x_1; } } static lean_object* _init_l_Lean_Meta_addUnificationHint___lambda__1___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Meta_addUnificationHint___lambda__1___closed__1; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } static lean_object* _init_l_Lean_Meta_addUnificationHint___lambda__1___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("addUnificationHint: "); return x_1; } } static lean_object* _init_l_Lean_Meta_addUnificationHint___lambda__1___closed__4() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Meta_addUnificationHint___lambda__1___closed__3; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } lean_object* l_Lean_Meta_addUnificationHint___lambda__1(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; x_9 = l_Lean_ConstantInfo_value_x3f(x_3); if (lean_obj_tag(x_9) == 0) { lean_object* x_10; lean_object* x_11; lean_dec(x_1); x_10 = l_Lean_Meta_addUnificationHint___lambda__1___closed__2; x_11 = l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(x_10, 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); return x_11; } else { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_12 = lean_ctor_get(x_9, 0); lean_inc(x_12); lean_dec(x_9); x_13 = lean_box(0); lean_inc(x_4); x_14 = l_Lean_Meta_lambdaMetaTelescope(x_12, x_13, x_4, x_5, x_6, x_7, x_8); lean_dec(x_12); x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); x_16 = lean_ctor_get(x_15, 1); lean_inc(x_16); lean_dec(x_15); x_17 = lean_ctor_get(x_14, 1); lean_inc(x_17); lean_dec(x_14); x_18 = lean_ctor_get(x_16, 1); lean_inc(x_18); lean_dec(x_16); x_19 = l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint(x_18); if (lean_obj_tag(x_19) == 0) { lean_object* x_20; lean_object* x_21; lean_dec(x_1); x_20 = lean_ctor_get(x_19, 0); lean_inc(x_20); lean_dec(x_19); x_21 = l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(x_20, x_4, x_5, x_6, x_7, x_17); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); return x_21; } else { lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_22 = lean_ctor_get(x_19, 0); lean_inc(x_22); lean_dec(x_19); x_23 = lean_ctor_get(x_22, 0); lean_inc(x_23); x_24 = lean_ctor_get(x_23, 0); lean_inc(x_24); lean_dec(x_23); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); x_25 = l_Lean_Meta_DiscrTree_mkPath(x_24, x_4, x_5, x_6, x_7, x_17); if (lean_obj_tag(x_25) == 0) { lean_object* x_26; lean_object* x_27; lean_object* x_28; x_26 = lean_ctor_get(x_25, 0); lean_inc(x_26); x_27 = lean_ctor_get(x_25, 1); lean_inc(x_27); lean_dec(x_25); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); x_28 = l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___rarg(x_22, x_4, x_5, x_6, x_7, x_27); if (lean_obj_tag(x_28) == 0) { lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; uint8_t x_41; x_29 = lean_ctor_get(x_28, 1); lean_inc(x_29); lean_dec(x_28); x_30 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_30, 0, x_26); lean_ctor_set(x_30, 1, x_1); x_31 = l_Lean_Meta_unificationHintExtension; lean_inc(x_6); x_32 = l_Lean_ScopedEnvExtension_add___at_Lean_Meta_addUnificationHint___spec__1(x_31, x_30, x_2, x_4, x_5, x_6, x_7, x_29); x_33 = lean_ctor_get(x_32, 1); lean_inc(x_33); lean_dec(x_32); x_34 = lean_st_ref_get(x_7, x_33); x_35 = lean_ctor_get(x_34, 0); lean_inc(x_35); x_36 = lean_ctor_get(x_34, 1); lean_inc(x_36); lean_dec(x_34); x_37 = lean_ctor_get(x_35, 0); lean_inc(x_37); lean_dec(x_35); x_38 = lean_st_ref_get(x_7, x_36); x_39 = lean_ctor_get(x_38, 0); lean_inc(x_39); x_40 = lean_ctor_get(x_39, 3); lean_inc(x_40); lean_dec(x_39); x_41 = lean_ctor_get_uint8(x_40, sizeof(void*)*1); lean_dec(x_40); if (x_41 == 0) { uint8_t x_42; lean_dec(x_37); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_42 = !lean_is_exclusive(x_38); if (x_42 == 0) { lean_object* x_43; lean_object* x_44; x_43 = lean_ctor_get(x_38, 0); lean_dec(x_43); x_44 = lean_box(0); lean_ctor_set(x_38, 0, x_44); return x_38; } else { lean_object* x_45; lean_object* x_46; lean_object* x_47; x_45 = lean_ctor_get(x_38, 1); lean_inc(x_45); lean_dec(x_38); x_46 = lean_box(0); x_47 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_47, 0, x_46); lean_ctor_set(x_47, 1, x_45); return x_47; } } else { lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; uint8_t x_52; x_48 = lean_ctor_get(x_38, 1); lean_inc(x_48); lean_dec(x_38); x_49 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1037____closed__4; x_50 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_postponeIsLevelDefEq___spec__2(x_49, x_4, x_5, x_6, x_7, x_48); x_51 = lean_ctor_get(x_50, 0); lean_inc(x_51); x_52 = lean_unbox(x_51); lean_dec(x_51); if (x_52 == 0) { uint8_t x_53; lean_dec(x_37); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_53 = !lean_is_exclusive(x_50); if (x_53 == 0) { lean_object* x_54; lean_object* x_55; x_54 = lean_ctor_get(x_50, 0); lean_dec(x_54); x_55 = lean_box(0); lean_ctor_set(x_50, 0, x_55); return x_50; } else { lean_object* x_56; lean_object* x_57; lean_object* x_58; x_56 = lean_ctor_get(x_50, 1); lean_inc(x_56); lean_dec(x_50); x_57 = lean_box(0); x_58 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_58, 0, x_57); lean_ctor_set(x_58, 1, x_56); return x_58; } } else { lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; x_59 = lean_ctor_get(x_50, 1); lean_inc(x_59); lean_dec(x_50); x_60 = l_Lean_ScopedEnvExtension_getState___at_Lean_Meta_addUnificationHint___spec__2(x_31, x_37); lean_dec(x_37); x_61 = l_Lean_Meta_DiscrTree_format___at_Lean_Meta_instToFormatUnificationHints___spec__2(x_60); lean_dec(x_60); x_62 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_62, 0, x_61); x_63 = l_Lean_Meta_addUnificationHint___lambda__1___closed__4; x_64 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_64, 0, x_63); lean_ctor_set(x_64, 1, x_62); x_65 = l_Lean_KernelException_toMessageData___closed__15; x_66 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_66, 0, x_64); lean_ctor_set(x_66, 1, x_65); x_67 = l_Lean_addTrace___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_postponeIsLevelDefEq___spec__1(x_49, x_66, x_4, x_5, x_6, x_7, x_59); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); return x_67; } } } else { uint8_t x_68; lean_dec(x_26); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); x_68 = !lean_is_exclusive(x_28); if (x_68 == 0) { return x_28; } else { lean_object* x_69; lean_object* x_70; lean_object* x_71; x_69 = lean_ctor_get(x_28, 0); x_70 = lean_ctor_get(x_28, 1); lean_inc(x_70); lean_inc(x_69); lean_dec(x_28); x_71 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_71, 0, x_69); lean_ctor_set(x_71, 1, x_70); return x_71; } } } else { uint8_t x_72; lean_dec(x_22); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); x_72 = !lean_is_exclusive(x_25); if (x_72 == 0) { return x_25; } else { lean_object* x_73; lean_object* x_74; lean_object* x_75; x_73 = lean_ctor_get(x_25, 0); x_74 = lean_ctor_get(x_25, 1); lean_inc(x_74); lean_inc(x_73); lean_dec(x_25); x_75 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_75, 0, x_73); lean_ctor_set(x_75, 1, x_74); return x_75; } } } } } } lean_object* l_Lean_Meta_addUnificationHint(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_inc(x_1); x_8 = lean_alloc_closure((void*)(l_Lean_getConstInfo___at_Lean_Meta_mkConstWithFreshMVarLevels___spec__1___boxed), 6, 1); lean_closure_set(x_8, 0, x_1); x_9 = lean_box(x_2); x_10 = lean_alloc_closure((void*)(l_Lean_Meta_addUnificationHint___lambda__1___boxed), 8, 2); lean_closure_set(x_10, 0, x_1); lean_closure_set(x_10, 1, x_9); x_11 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg), 7, 2); lean_closure_set(x_11, 0, x_8); lean_closure_set(x_11, 1, x_10); x_12 = l_Lean_Meta_withNewMCtxDepth___at___private_Lean_Meta_Instances_0__Lean_Meta_mkInstanceKey___spec__1___rarg(x_11, x_3, x_4, x_5, x_6, x_7); return x_12; } } lean_object* l_Lean_ScopedEnvExtension_add___at_Lean_Meta_addUnificationHint___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { uint8_t x_9; lean_object* x_10; x_9 = lean_unbox(x_3); lean_dec(x_3); x_10 = l_Lean_ScopedEnvExtension_add___at_Lean_Meta_addUnificationHint___spec__1(x_1, x_2, x_9, x_4, x_5, x_6, x_7, x_8); lean_dec(x_7); lean_dec(x_5); lean_dec(x_4); return x_10; } } lean_object* l_Lean_ScopedEnvExtension_getState___at_Lean_Meta_addUnificationHint___spec__2___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_ScopedEnvExtension_getState___at_Lean_Meta_addUnificationHint___spec__2(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l_Std_fmt___at_Lean_Meta_addUnificationHint___spec__3___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Std_fmt___at_Lean_Meta_addUnificationHint___spec__3(x_1); lean_dec(x_1); return x_2; } } lean_object* l_Lean_Meta_addUnificationHint___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { uint8_t x_9; lean_object* x_10; x_9 = lean_unbox(x_2); lean_dec(x_2); x_10 = l_Lean_Meta_addUnificationHint___lambda__1(x_1, x_9, x_3, x_4, x_5, x_6, x_7, x_8); lean_dec(x_3); return x_10; } } lean_object* l_Lean_Meta_addUnificationHint___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { uint8_t x_8; lean_object* x_9; x_8 = lean_unbox(x_2); lean_dec(x_2); x_9 = l_Lean_Meta_addUnificationHint(x_1, x_8, x_3, x_4, x_5, x_6, x_7); return x_9; } } lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____lambda__1(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; lean_inc(x_4); x_7 = l_Lean_Attribute_Builtin_ensureNoArgs(x_2, x_4, x_5, x_6); if (lean_obj_tag(x_7) == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_8 = lean_ctor_get(x_7, 1); lean_inc(x_8); lean_dec(x_7); x_9 = lean_st_ref_get(x_5, x_8); x_10 = lean_ctor_get(x_9, 1); lean_inc(x_10); lean_dec(x_9); x_11 = l_Lean_Meta_instMetaEvalMetaM___rarg___closed__2; x_12 = lean_st_mk_ref(x_11, x_10); x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_12, 1); lean_inc(x_14); lean_dec(x_12); x_15 = l_Lean_Meta_instMetaEvalMetaM___rarg___closed__1; lean_inc(x_5); lean_inc(x_13); x_16 = l_Lean_Meta_addUnificationHint(x_1, x_3, x_15, x_13, x_4, x_5, x_14); if (lean_obj_tag(x_16) == 0) { lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; x_17 = lean_ctor_get(x_16, 1); lean_inc(x_17); lean_dec(x_16); x_18 = lean_st_ref_get(x_5, x_17); lean_dec(x_5); x_19 = lean_ctor_get(x_18, 1); lean_inc(x_19); lean_dec(x_18); x_20 = lean_st_ref_get(x_13, x_19); lean_dec(x_13); x_21 = !lean_is_exclusive(x_20); if (x_21 == 0) { lean_object* x_22; lean_object* x_23; x_22 = lean_ctor_get(x_20, 0); lean_dec(x_22); x_23 = lean_box(0); lean_ctor_set(x_20, 0, x_23); return x_20; } else { lean_object* x_24; lean_object* x_25; lean_object* x_26; x_24 = lean_ctor_get(x_20, 1); lean_inc(x_24); lean_dec(x_20); x_25 = lean_box(0); x_26 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_24); return x_26; } } else { uint8_t x_27; lean_dec(x_13); lean_dec(x_5); x_27 = !lean_is_exclusive(x_16); if (x_27 == 0) { return x_16; } else { lean_object* x_28; lean_object* x_29; lean_object* x_30; x_28 = lean_ctor_get(x_16, 0); x_29 = lean_ctor_get(x_16, 1); lean_inc(x_29); lean_inc(x_28); lean_dec(x_16); x_30 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_30, 0, x_28); lean_ctor_set(x_30, 1, x_29); return x_30; } } } else { uint8_t x_31; lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); x_31 = !lean_is_exclusive(x_7); if (x_31 == 0) { return x_7; } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; x_32 = lean_ctor_get(x_7, 0); x_33 = lean_ctor_get(x_7, 1); lean_inc(x_33); lean_inc(x_32); lean_dec(x_7); x_34 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_34, 0, x_32); lean_ctor_set(x_34, 1, x_33); return x_34; } } } } static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("unification hint"); return x_1; } } static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__2() { _start: { lean_object* x_1; lean_object* x_2; uint8_t x_3; lean_object* x_4; x_1 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__18; x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__1; x_3 = 0; x_4 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_4, 0, x_1); lean_ctor_set(x_4, 1, x_2); lean_ctor_set_uint8(x_4, sizeof(void*)*2, x_3); return x_4; } } static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__3() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____lambda__1___boxed), 6, 0); return x_1; } } static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__2; x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__3; x_3 = l_Lean_registerTagAttribute___closed__5; x_4 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_4, 0, x_1); lean_ctor_set(x_4, 1, x_2); lean_ctor_set(x_4, 2, x_3); return x_4; } } lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__4; x_3 = l_Lean_registerBuiltinAttribute(x_2, x_1); return x_3; } } lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____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: { uint8_t x_7; lean_object* x_8; x_7 = lean_unbox(x_3); lean_dec(x_3); x_8 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____lambda__1(x_1, x_2, x_7, x_4, x_5, x_6); return x_8; } } lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate_match__1___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_box(0); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_apply_1(x_3, x_6); return x_7; } } } lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Meta_tryUnificationHints_tryCandidate_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate_match__2___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_dec(x_3); x_4 = lean_ctor_get(x_1, 0); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_dec(x_2); x_6 = lean_apply_1(x_3, x_1); return x_6; } } } lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Meta_tryUnificationHints_tryCandidate_match__2___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate_match__3___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_box(0); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_ctor_get(x_6, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_6, 1); lean_inc(x_8); lean_dec(x_6); x_9 = lean_apply_2(x_3, x_7, x_8); return x_9; } } } lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate_match__3(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Meta_tryUnificationHints_tryCandidate_match__3___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate_match__4___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_box(0); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_apply_1(x_3, x_6); return x_7; } } } lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate_match__4(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Meta_tryUnificationHints_tryCandidate_match__4___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Meta_tryUnificationHints_isDefEqPattern(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { uint8_t x_8; x_8 = !lean_is_exclusive(x_3); if (x_8 == 0) { lean_object* x_9; uint8_t x_10; x_9 = lean_ctor_get(x_3, 0); x_10 = !lean_is_exclusive(x_9); if (x_10 == 0) { uint8_t x_11; lean_object* x_12; x_11 = 2; lean_ctor_set_uint8(x_9, 5, x_11); x_12 = l_Lean_Meta_isExprDefEqAux(x_1, x_2, x_3, x_4, x_5, x_6, x_7); if (lean_obj_tag(x_12) == 0) { uint8_t x_13; x_13 = !lean_is_exclusive(x_12); if (x_13 == 0) { return x_12; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; x_14 = lean_ctor_get(x_12, 0); x_15 = lean_ctor_get(x_12, 1); lean_inc(x_15); lean_inc(x_14); lean_dec(x_12); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_14); lean_ctor_set(x_16, 1, x_15); return x_16; } } else { uint8_t x_17; x_17 = !lean_is_exclusive(x_12); if (x_17 == 0) { return x_12; } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; x_18 = lean_ctor_get(x_12, 0); x_19 = lean_ctor_get(x_12, 1); lean_inc(x_19); lean_inc(x_18); lean_dec(x_12); x_20 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_20, 0, x_18); lean_ctor_set(x_20, 1, x_19); return x_20; } } } else { uint8_t x_21; uint8_t x_22; uint8_t x_23; uint8_t x_24; uint8_t x_25; uint8_t x_26; uint8_t x_27; uint8_t x_28; uint8_t x_29; lean_object* x_30; lean_object* x_31; x_21 = lean_ctor_get_uint8(x_9, 0); x_22 = lean_ctor_get_uint8(x_9, 1); x_23 = lean_ctor_get_uint8(x_9, 2); x_24 = lean_ctor_get_uint8(x_9, 3); x_25 = lean_ctor_get_uint8(x_9, 4); x_26 = lean_ctor_get_uint8(x_9, 6); x_27 = lean_ctor_get_uint8(x_9, 7); x_28 = lean_ctor_get_uint8(x_9, 8); lean_dec(x_9); x_29 = 2; x_30 = lean_alloc_ctor(0, 0, 9); lean_ctor_set_uint8(x_30, 0, x_21); lean_ctor_set_uint8(x_30, 1, x_22); lean_ctor_set_uint8(x_30, 2, x_23); lean_ctor_set_uint8(x_30, 3, x_24); lean_ctor_set_uint8(x_30, 4, x_25); lean_ctor_set_uint8(x_30, 5, x_29); lean_ctor_set_uint8(x_30, 6, x_26); lean_ctor_set_uint8(x_30, 7, x_27); lean_ctor_set_uint8(x_30, 8, x_28); lean_ctor_set(x_3, 0, x_30); x_31 = l_Lean_Meta_isExprDefEqAux(x_1, x_2, x_3, x_4, x_5, x_6, x_7); if (lean_obj_tag(x_31) == 0) { lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; x_32 = lean_ctor_get(x_31, 0); lean_inc(x_32); x_33 = lean_ctor_get(x_31, 1); lean_inc(x_33); if (lean_is_exclusive(x_31)) { lean_ctor_release(x_31, 0); lean_ctor_release(x_31, 1); x_34 = x_31; } else { lean_dec_ref(x_31); x_34 = lean_box(0); } if (lean_is_scalar(x_34)) { x_35 = lean_alloc_ctor(0, 2, 0); } else { x_35 = x_34; } lean_ctor_set(x_35, 0, x_32); lean_ctor_set(x_35, 1, x_33); return x_35; } else { lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; x_36 = lean_ctor_get(x_31, 0); lean_inc(x_36); x_37 = lean_ctor_get(x_31, 1); lean_inc(x_37); if (lean_is_exclusive(x_31)) { lean_ctor_release(x_31, 0); lean_ctor_release(x_31, 1); x_38 = x_31; } else { lean_dec_ref(x_31); x_38 = lean_box(0); } if (lean_is_scalar(x_38)) { x_39 = lean_alloc_ctor(1, 2, 0); } else { x_39 = x_38; } lean_ctor_set(x_39, 0, x_36); lean_ctor_set(x_39, 1, x_37); return x_39; } } } else { lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; uint8_t x_44; uint8_t x_45; uint8_t x_46; uint8_t x_47; uint8_t x_48; uint8_t x_49; uint8_t x_50; uint8_t x_51; lean_object* x_52; uint8_t x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; x_40 = lean_ctor_get(x_3, 0); x_41 = lean_ctor_get(x_3, 1); x_42 = lean_ctor_get(x_3, 2); x_43 = lean_ctor_get(x_3, 3); lean_inc(x_43); lean_inc(x_42); lean_inc(x_41); lean_inc(x_40); lean_dec(x_3); x_44 = lean_ctor_get_uint8(x_40, 0); x_45 = lean_ctor_get_uint8(x_40, 1); x_46 = lean_ctor_get_uint8(x_40, 2); x_47 = lean_ctor_get_uint8(x_40, 3); x_48 = lean_ctor_get_uint8(x_40, 4); x_49 = lean_ctor_get_uint8(x_40, 6); x_50 = lean_ctor_get_uint8(x_40, 7); x_51 = lean_ctor_get_uint8(x_40, 8); if (lean_is_exclusive(x_40)) { x_52 = x_40; } else { lean_dec_ref(x_40); x_52 = lean_box(0); } x_53 = 2; if (lean_is_scalar(x_52)) { x_54 = lean_alloc_ctor(0, 0, 9); } else { x_54 = x_52; } lean_ctor_set_uint8(x_54, 0, x_44); lean_ctor_set_uint8(x_54, 1, x_45); lean_ctor_set_uint8(x_54, 2, x_46); lean_ctor_set_uint8(x_54, 3, x_47); lean_ctor_set_uint8(x_54, 4, x_48); lean_ctor_set_uint8(x_54, 5, x_53); lean_ctor_set_uint8(x_54, 6, x_49); lean_ctor_set_uint8(x_54, 7, x_50); lean_ctor_set_uint8(x_54, 8, x_51); x_55 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_55, 0, x_54); lean_ctor_set(x_55, 1, x_41); lean_ctor_set(x_55, 2, x_42); lean_ctor_set(x_55, 3, x_43); x_56 = l_Lean_Meta_isExprDefEqAux(x_1, x_2, x_55, x_4, x_5, x_6, x_7); if (lean_obj_tag(x_56) == 0) { lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; x_57 = lean_ctor_get(x_56, 0); lean_inc(x_57); x_58 = lean_ctor_get(x_56, 1); lean_inc(x_58); if (lean_is_exclusive(x_56)) { lean_ctor_release(x_56, 0); lean_ctor_release(x_56, 1); x_59 = x_56; } else { lean_dec_ref(x_56); x_59 = lean_box(0); } if (lean_is_scalar(x_59)) { x_60 = lean_alloc_ctor(0, 2, 0); } else { x_60 = x_59; } lean_ctor_set(x_60, 0, x_57); lean_ctor_set(x_60, 1, x_58); return x_60; } else { lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; x_61 = lean_ctor_get(x_56, 0); lean_inc(x_61); x_62 = lean_ctor_get(x_56, 1); lean_inc(x_62); if (lean_is_exclusive(x_56)) { lean_ctor_release(x_56, 0); lean_ctor_release(x_56, 1); x_63 = x_56; } else { lean_dec_ref(x_56); x_63 = lean_box(0); } if (lean_is_scalar(x_63)) { x_64 = lean_alloc_ctor(1, 2, 0); } else { x_64 = x_63; } lean_ctor_set(x_64, 0, x_61); lean_ctor_set(x_64, 1, x_62); return x_64; } } } } lean_object* l_List_mapM___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_7; lean_object* x_8; x_7 = lean_box(0); x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_7); lean_ctor_set(x_8, 1, x_6); return x_8; } else { uint8_t x_9; x_9 = !lean_is_exclusive(x_1); if (x_9 == 0) { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; x_10 = lean_ctor_get(x_1, 1); x_11 = lean_ctor_get(x_1, 0); lean_dec(x_11); x_12 = l_Lean_Meta_mkFreshLevelMVar___rarg(x_3, x_4, x_5, x_6); x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_12, 1); lean_inc(x_14); lean_dec(x_12); x_15 = l_List_mapM___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__1(x_10, x_2, x_3, x_4, x_5, x_14); x_16 = !lean_is_exclusive(x_15); if (x_16 == 0) { lean_object* x_17; x_17 = lean_ctor_get(x_15, 0); lean_ctor_set(x_1, 1, x_17); lean_ctor_set(x_1, 0, x_13); lean_ctor_set(x_15, 0, x_1); return x_15; } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; x_18 = lean_ctor_get(x_15, 0); x_19 = lean_ctor_get(x_15, 1); lean_inc(x_19); lean_inc(x_18); lean_dec(x_15); lean_ctor_set(x_1, 1, x_18); lean_ctor_set(x_1, 0, x_13); x_20 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_20, 0, x_1); lean_ctor_set(x_20, 1, x_19); return x_20; } } else { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; x_21 = lean_ctor_get(x_1, 1); lean_inc(x_21); lean_dec(x_1); x_22 = l_Lean_Meta_mkFreshLevelMVar___rarg(x_3, x_4, x_5, x_6); 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_List_mapM___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__1(x_21, x_2, x_3, x_4, x_5, x_24); x_26 = lean_ctor_get(x_25, 0); lean_inc(x_26); x_27 = lean_ctor_get(x_25, 1); lean_inc(x_27); if (lean_is_exclusive(x_25)) { lean_ctor_release(x_25, 0); lean_ctor_release(x_25, 1); x_28 = x_25; } else { lean_dec_ref(x_25); x_28 = lean_box(0); } x_29 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_29, 0, x_23); lean_ctor_set(x_29, 1, x_26); if (lean_is_scalar(x_28)) { x_30 = lean_alloc_ctor(0, 2, 0); } else { x_30 = x_28; } lean_ctor_set(x_30, 0, x_29); lean_ctor_set(x_30, 1, x_27); return x_30; } } } } lean_object* l_List_forIn_loop___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__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) { _start: { if (lean_obj_tag(x_2) == 0) { lean_object* x_9; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); x_9 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_9, 0, x_3); lean_ctor_set(x_9, 1, x_8); return x_9; } else { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_dec(x_3); x_10 = lean_ctor_get(x_2, 0); lean_inc(x_10); x_11 = lean_ctor_get(x_2, 1); lean_inc(x_11); lean_dec(x_2); x_12 = lean_ctor_get(x_10, 0); lean_inc(x_12); x_13 = lean_ctor_get(x_10, 1); lean_inc(x_13); lean_dec(x_10); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); x_14 = l_Lean_Meta_isExprDefEqAux(x_12, x_13, x_4, x_5, x_6, x_7, x_8); if (lean_obj_tag(x_14) == 0) { lean_object* x_15; uint8_t x_16; x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); x_16 = lean_unbox(x_15); lean_dec(x_15); if (x_16 == 0) { uint8_t x_17; lean_dec(x_11); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); x_17 = !lean_is_exclusive(x_14); if (x_17 == 0) { lean_object* x_18; lean_object* x_19; x_18 = lean_ctor_get(x_14, 0); lean_dec(x_18); x_19 = l_Array_forInUnsafe_loop___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_processPostponedStep___spec__4___closed__2; lean_ctor_set(x_14, 0, x_19); return x_14; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; x_20 = lean_ctor_get(x_14, 1); lean_inc(x_20); lean_dec(x_14); x_21 = l_Array_forInUnsafe_loop___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_processPostponedStep___spec__4___closed__2; x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_21); lean_ctor_set(x_22, 1, x_20); return x_22; } } else { lean_object* x_23; x_23 = lean_ctor_get(x_14, 1); lean_inc(x_23); lean_dec(x_14); lean_inc(x_1); { lean_object* _tmp_1 = x_11; lean_object* _tmp_2 = x_1; lean_object* _tmp_7 = x_23; x_2 = _tmp_1; x_3 = _tmp_2; x_8 = _tmp_7; } goto _start; } } else { uint8_t x_25; lean_dec(x_11); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); x_25 = !lean_is_exclusive(x_14); if (x_25 == 0) { return x_14; } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; x_26 = lean_ctor_get(x_14, 0); x_27 = lean_ctor_get(x_14, 1); lean_inc(x_27); lean_inc(x_26); lean_dec(x_14); x_28 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_28, 0, x_26); lean_ctor_set(x_28, 1, x_27); return x_28; } } } } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, size_t x_4, size_t 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) { _start: { lean_object* x_12; lean_object* x_13; uint8_t x_21; x_21 = x_5 < x_4; if (x_21 == 0) { lean_object* x_22; lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_2); lean_dec(x_1); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_6); lean_ctor_set(x_22, 1, x_11); return x_22; } else { lean_object* x_23; uint8_t x_24; x_23 = lean_array_uget(x_3, x_5); x_24 = !lean_is_exclusive(x_6); if (x_24 == 0) { lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; x_25 = lean_ctor_get(x_6, 1); x_26 = lean_ctor_get(x_6, 0); lean_dec(x_26); x_27 = lean_ctor_get(x_25, 0); lean_inc(x_27); x_28 = lean_ctor_get(x_25, 1); lean_inc(x_28); x_29 = lean_ctor_get(x_25, 2); lean_inc(x_29); x_30 = lean_nat_dec_lt(x_28, x_29); if (x_30 == 0) { lean_object* x_31; lean_dec(x_29); lean_dec(x_28); lean_dec(x_27); lean_dec(x_23); lean_inc(x_2); lean_ctor_set(x_6, 0, x_2); x_31 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_31, 0, x_6); x_12 = x_31; x_13 = x_11; goto block_20; } else { uint8_t x_32; x_32 = !lean_is_exclusive(x_25); if (x_32 == 0) { lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; uint8_t x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; uint8_t x_41; x_33 = lean_ctor_get(x_25, 2); lean_dec(x_33); x_34 = lean_ctor_get(x_25, 1); lean_dec(x_34); x_35 = lean_ctor_get(x_25, 0); lean_dec(x_35); x_36 = lean_array_fget(x_27, x_28); x_37 = lean_unbox(x_36); lean_dec(x_36); x_38 = lean_unsigned_to_nat(1u); x_39 = lean_nat_add(x_28, x_38); lean_dec(x_28); lean_ctor_set(x_25, 1, x_39); x_40 = 3; x_41 = l___private_Lean_Expr_0__Lean_beqBinderInfo____x40_Lean_Expr___hyg_237_(x_37, x_40); if (x_41 == 0) { lean_object* x_42; lean_dec(x_23); lean_inc(x_2); lean_ctor_set(x_6, 0, x_2); x_42 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_42, 0, x_6); x_12 = x_42; x_13 = x_11; goto block_20; } else { lean_object* x_43; lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_23); x_43 = l_Lean_Meta_inferType(x_23, x_7, x_8, x_9, x_10, x_11); if (lean_obj_tag(x_43) == 0) { lean_object* x_44; lean_object* x_45; lean_object* x_46; x_44 = lean_ctor_get(x_43, 0); lean_inc(x_44); x_45 = lean_ctor_get(x_43, 1); lean_inc(x_45); lean_dec(x_43); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_1); x_46 = l_Lean_Meta_trySynthInstance(x_44, x_1, x_7, x_8, x_9, x_10, x_45); if (lean_obj_tag(x_46) == 0) { lean_object* x_47; x_47 = lean_ctor_get(x_46, 0); lean_inc(x_47); if (lean_obj_tag(x_47) == 1) { lean_object* x_48; lean_object* x_49; lean_object* x_50; x_48 = lean_ctor_get(x_46, 1); lean_inc(x_48); lean_dec(x_46); x_49 = lean_ctor_get(x_47, 0); lean_inc(x_49); lean_dec(x_47); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); x_50 = l_Lean_Meta_isExprDefEq(x_23, x_49, x_7, x_8, x_9, x_10, x_48); if (lean_obj_tag(x_50) == 0) { lean_object* x_51; uint8_t x_52; x_51 = lean_ctor_get(x_50, 0); lean_inc(x_51); x_52 = lean_unbox(x_51); lean_dec(x_51); if (x_52 == 0) { lean_object* x_53; lean_object* x_54; lean_object* x_55; x_53 = lean_ctor_get(x_50, 1); lean_inc(x_53); lean_dec(x_50); x_54 = l_Array_forInUnsafe_loop___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_processPostponedStep___spec__4___closed__1; lean_ctor_set(x_6, 0, x_54); x_55 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_55, 0, x_6); x_12 = x_55; x_13 = x_53; goto block_20; } else { lean_object* x_56; lean_object* x_57; x_56 = lean_ctor_get(x_50, 1); lean_inc(x_56); lean_dec(x_50); lean_inc(x_2); lean_ctor_set(x_6, 0, x_2); x_57 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_57, 0, x_6); x_12 = x_57; x_13 = x_56; goto block_20; } } else { uint8_t x_58; lean_dec(x_25); lean_free_object(x_6); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_2); lean_dec(x_1); x_58 = !lean_is_exclusive(x_50); if (x_58 == 0) { return x_50; } else { lean_object* x_59; lean_object* x_60; lean_object* x_61; x_59 = lean_ctor_get(x_50, 0); x_60 = lean_ctor_get(x_50, 1); lean_inc(x_60); lean_inc(x_59); lean_dec(x_50); 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_dec(x_47); lean_dec(x_23); x_62 = lean_ctor_get(x_46, 1); lean_inc(x_62); lean_dec(x_46); x_63 = l_Array_forInUnsafe_loop___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_processPostponedStep___spec__4___closed__1; lean_ctor_set(x_6, 0, x_63); x_64 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_64, 0, x_6); x_12 = x_64; x_13 = x_62; goto block_20; } } else { uint8_t x_65; lean_dec(x_25); lean_free_object(x_6); lean_dec(x_23); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_2); lean_dec(x_1); x_65 = !lean_is_exclusive(x_46); if (x_65 == 0) { return x_46; } else { lean_object* x_66; lean_object* x_67; lean_object* x_68; x_66 = lean_ctor_get(x_46, 0); x_67 = lean_ctor_get(x_46, 1); lean_inc(x_67); lean_inc(x_66); lean_dec(x_46); x_68 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_68, 0, x_66); lean_ctor_set(x_68, 1, x_67); return x_68; } } } else { uint8_t x_69; lean_dec(x_25); lean_free_object(x_6); lean_dec(x_23); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_2); lean_dec(x_1); x_69 = !lean_is_exclusive(x_43); if (x_69 == 0) { return x_43; } else { lean_object* x_70; lean_object* x_71; lean_object* x_72; x_70 = lean_ctor_get(x_43, 0); x_71 = lean_ctor_get(x_43, 1); lean_inc(x_71); lean_inc(x_70); lean_dec(x_43); x_72 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_72, 0, x_70); lean_ctor_set(x_72, 1, x_71); return x_72; } } } } else { lean_object* x_73; uint8_t x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; uint8_t x_78; uint8_t x_79; lean_dec(x_25); x_73 = lean_array_fget(x_27, x_28); x_74 = lean_unbox(x_73); lean_dec(x_73); x_75 = lean_unsigned_to_nat(1u); x_76 = lean_nat_add(x_28, x_75); lean_dec(x_28); x_77 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_77, 0, x_27); lean_ctor_set(x_77, 1, x_76); lean_ctor_set(x_77, 2, x_29); x_78 = 3; x_79 = l___private_Lean_Expr_0__Lean_beqBinderInfo____x40_Lean_Expr___hyg_237_(x_74, x_78); if (x_79 == 0) { lean_object* x_80; lean_dec(x_23); lean_inc(x_2); lean_ctor_set(x_6, 1, x_77); lean_ctor_set(x_6, 0, x_2); x_80 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_80, 0, x_6); x_12 = x_80; x_13 = x_11; goto block_20; } else { lean_object* x_81; lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_23); x_81 = l_Lean_Meta_inferType(x_23, x_7, x_8, x_9, x_10, x_11); if (lean_obj_tag(x_81) == 0) { lean_object* x_82; lean_object* x_83; lean_object* x_84; x_82 = lean_ctor_get(x_81, 0); lean_inc(x_82); x_83 = lean_ctor_get(x_81, 1); lean_inc(x_83); lean_dec(x_81); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_1); x_84 = l_Lean_Meta_trySynthInstance(x_82, x_1, x_7, x_8, x_9, x_10, x_83); if (lean_obj_tag(x_84) == 0) { lean_object* x_85; x_85 = lean_ctor_get(x_84, 0); lean_inc(x_85); if (lean_obj_tag(x_85) == 1) { lean_object* x_86; lean_object* x_87; lean_object* x_88; x_86 = lean_ctor_get(x_84, 1); lean_inc(x_86); lean_dec(x_84); x_87 = lean_ctor_get(x_85, 0); lean_inc(x_87); lean_dec(x_85); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); x_88 = l_Lean_Meta_isExprDefEq(x_23, x_87, x_7, x_8, x_9, x_10, x_86); if (lean_obj_tag(x_88) == 0) { lean_object* x_89; uint8_t x_90; x_89 = lean_ctor_get(x_88, 0); lean_inc(x_89); x_90 = lean_unbox(x_89); lean_dec(x_89); if (x_90 == 0) { lean_object* x_91; lean_object* x_92; lean_object* x_93; x_91 = lean_ctor_get(x_88, 1); lean_inc(x_91); lean_dec(x_88); x_92 = l_Array_forInUnsafe_loop___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_processPostponedStep___spec__4___closed__1; lean_ctor_set(x_6, 1, x_77); lean_ctor_set(x_6, 0, x_92); x_93 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_93, 0, x_6); x_12 = x_93; x_13 = x_91; goto block_20; } else { lean_object* x_94; lean_object* x_95; x_94 = lean_ctor_get(x_88, 1); lean_inc(x_94); lean_dec(x_88); lean_inc(x_2); lean_ctor_set(x_6, 1, x_77); lean_ctor_set(x_6, 0, x_2); x_95 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_95, 0, x_6); x_12 = x_95; x_13 = x_94; goto block_20; } } else { lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_dec(x_77); lean_free_object(x_6); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_2); lean_dec(x_1); x_96 = lean_ctor_get(x_88, 0); lean_inc(x_96); x_97 = lean_ctor_get(x_88, 1); lean_inc(x_97); if (lean_is_exclusive(x_88)) { lean_ctor_release(x_88, 0); lean_ctor_release(x_88, 1); x_98 = x_88; } else { lean_dec_ref(x_88); x_98 = lean_box(0); } if (lean_is_scalar(x_98)) { x_99 = lean_alloc_ctor(1, 2, 0); } else { x_99 = x_98; } lean_ctor_set(x_99, 0, x_96); lean_ctor_set(x_99, 1, x_97); return x_99; } } else { lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_dec(x_85); lean_dec(x_23); x_100 = lean_ctor_get(x_84, 1); lean_inc(x_100); lean_dec(x_84); x_101 = l_Array_forInUnsafe_loop___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_processPostponedStep___spec__4___closed__1; lean_ctor_set(x_6, 1, x_77); lean_ctor_set(x_6, 0, x_101); x_102 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_102, 0, x_6); x_12 = x_102; x_13 = x_100; goto block_20; } } else { lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_dec(x_77); lean_free_object(x_6); lean_dec(x_23); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_2); lean_dec(x_1); x_103 = lean_ctor_get(x_84, 0); lean_inc(x_103); x_104 = lean_ctor_get(x_84, 1); lean_inc(x_104); if (lean_is_exclusive(x_84)) { lean_ctor_release(x_84, 0); lean_ctor_release(x_84, 1); x_105 = x_84; } else { lean_dec_ref(x_84); x_105 = lean_box(0); } if (lean_is_scalar(x_105)) { x_106 = lean_alloc_ctor(1, 2, 0); } else { x_106 = x_105; } lean_ctor_set(x_106, 0, x_103); lean_ctor_set(x_106, 1, x_104); return x_106; } } else { lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_dec(x_77); lean_free_object(x_6); lean_dec(x_23); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_2); lean_dec(x_1); x_107 = lean_ctor_get(x_81, 0); lean_inc(x_107); x_108 = lean_ctor_get(x_81, 1); lean_inc(x_108); if (lean_is_exclusive(x_81)) { lean_ctor_release(x_81, 0); lean_ctor_release(x_81, 1); x_109 = x_81; } else { lean_dec_ref(x_81); x_109 = lean_box(0); } if (lean_is_scalar(x_109)) { x_110 = lean_alloc_ctor(1, 2, 0); } else { x_110 = x_109; } lean_ctor_set(x_110, 0, x_107); lean_ctor_set(x_110, 1, x_108); return x_110; } } } } } else { lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; uint8_t x_115; x_111 = lean_ctor_get(x_6, 1); lean_inc(x_111); lean_dec(x_6); x_112 = lean_ctor_get(x_111, 0); lean_inc(x_112); x_113 = lean_ctor_get(x_111, 1); lean_inc(x_113); x_114 = lean_ctor_get(x_111, 2); lean_inc(x_114); x_115 = lean_nat_dec_lt(x_113, x_114); if (x_115 == 0) { lean_object* x_116; lean_object* x_117; lean_dec(x_114); lean_dec(x_113); lean_dec(x_112); lean_dec(x_23); lean_inc(x_2); x_116 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_116, 0, x_2); lean_ctor_set(x_116, 1, x_111); x_117 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_117, 0, x_116); x_12 = x_117; x_13 = x_11; goto block_20; } else { lean_object* x_118; lean_object* x_119; uint8_t x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; uint8_t x_124; uint8_t x_125; if (lean_is_exclusive(x_111)) { lean_ctor_release(x_111, 0); lean_ctor_release(x_111, 1); lean_ctor_release(x_111, 2); x_118 = x_111; } else { lean_dec_ref(x_111); x_118 = lean_box(0); } x_119 = lean_array_fget(x_112, x_113); x_120 = lean_unbox(x_119); lean_dec(x_119); x_121 = lean_unsigned_to_nat(1u); x_122 = lean_nat_add(x_113, x_121); lean_dec(x_113); if (lean_is_scalar(x_118)) { x_123 = lean_alloc_ctor(0, 3, 0); } else { x_123 = x_118; } lean_ctor_set(x_123, 0, x_112); lean_ctor_set(x_123, 1, x_122); lean_ctor_set(x_123, 2, x_114); x_124 = 3; x_125 = l___private_Lean_Expr_0__Lean_beqBinderInfo____x40_Lean_Expr___hyg_237_(x_120, x_124); if (x_125 == 0) { lean_object* x_126; lean_object* x_127; lean_dec(x_23); lean_inc(x_2); x_126 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_126, 0, x_2); lean_ctor_set(x_126, 1, x_123); x_127 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_127, 0, x_126); x_12 = x_127; x_13 = x_11; goto block_20; } else { lean_object* x_128; lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_23); x_128 = l_Lean_Meta_inferType(x_23, x_7, x_8, x_9, x_10, x_11); if (lean_obj_tag(x_128) == 0) { lean_object* x_129; lean_object* x_130; lean_object* x_131; x_129 = lean_ctor_get(x_128, 0); lean_inc(x_129); x_130 = lean_ctor_get(x_128, 1); lean_inc(x_130); lean_dec(x_128); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_1); x_131 = l_Lean_Meta_trySynthInstance(x_129, x_1, x_7, x_8, x_9, x_10, x_130); if (lean_obj_tag(x_131) == 0) { lean_object* x_132; x_132 = lean_ctor_get(x_131, 0); lean_inc(x_132); if (lean_obj_tag(x_132) == 1) { lean_object* x_133; lean_object* x_134; lean_object* x_135; x_133 = lean_ctor_get(x_131, 1); lean_inc(x_133); lean_dec(x_131); x_134 = lean_ctor_get(x_132, 0); lean_inc(x_134); lean_dec(x_132); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); x_135 = l_Lean_Meta_isExprDefEq(x_23, x_134, x_7, x_8, x_9, x_10, x_133); if (lean_obj_tag(x_135) == 0) { lean_object* x_136; uint8_t x_137; x_136 = lean_ctor_get(x_135, 0); lean_inc(x_136); x_137 = lean_unbox(x_136); lean_dec(x_136); if (x_137 == 0) { lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; x_138 = lean_ctor_get(x_135, 1); lean_inc(x_138); lean_dec(x_135); x_139 = l_Array_forInUnsafe_loop___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_processPostponedStep___spec__4___closed__1; x_140 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_140, 0, x_139); lean_ctor_set(x_140, 1, x_123); x_141 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_141, 0, x_140); x_12 = x_141; x_13 = x_138; goto block_20; } else { lean_object* x_142; lean_object* x_143; lean_object* x_144; x_142 = lean_ctor_get(x_135, 1); lean_inc(x_142); lean_dec(x_135); lean_inc(x_2); x_143 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_143, 0, x_2); lean_ctor_set(x_143, 1, x_123); x_144 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_144, 0, x_143); x_12 = x_144; x_13 = x_142; goto block_20; } } else { lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_dec(x_123); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_2); lean_dec(x_1); x_145 = lean_ctor_get(x_135, 0); lean_inc(x_145); x_146 = lean_ctor_get(x_135, 1); lean_inc(x_146); if (lean_is_exclusive(x_135)) { lean_ctor_release(x_135, 0); lean_ctor_release(x_135, 1); x_147 = x_135; } else { lean_dec_ref(x_135); x_147 = lean_box(0); } if (lean_is_scalar(x_147)) { x_148 = lean_alloc_ctor(1, 2, 0); } else { x_148 = x_147; } lean_ctor_set(x_148, 0, x_145); lean_ctor_set(x_148, 1, x_146); return x_148; } } else { lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_dec(x_132); lean_dec(x_23); x_149 = lean_ctor_get(x_131, 1); lean_inc(x_149); lean_dec(x_131); x_150 = l_Array_forInUnsafe_loop___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_processPostponedStep___spec__4___closed__1; x_151 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_151, 0, x_150); lean_ctor_set(x_151, 1, x_123); x_152 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_152, 0, x_151); x_12 = x_152; x_13 = x_149; goto block_20; } } else { lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_dec(x_123); lean_dec(x_23); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_2); lean_dec(x_1); x_153 = lean_ctor_get(x_131, 0); lean_inc(x_153); x_154 = lean_ctor_get(x_131, 1); lean_inc(x_154); if (lean_is_exclusive(x_131)) { lean_ctor_release(x_131, 0); lean_ctor_release(x_131, 1); x_155 = x_131; } else { lean_dec_ref(x_131); x_155 = lean_box(0); } if (lean_is_scalar(x_155)) { x_156 = lean_alloc_ctor(1, 2, 0); } else { x_156 = x_155; } lean_ctor_set(x_156, 0, x_153); lean_ctor_set(x_156, 1, x_154); return x_156; } } else { lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_dec(x_123); lean_dec(x_23); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_2); lean_dec(x_1); x_157 = lean_ctor_get(x_128, 0); lean_inc(x_157); x_158 = lean_ctor_get(x_128, 1); lean_inc(x_158); if (lean_is_exclusive(x_128)) { lean_ctor_release(x_128, 0); lean_ctor_release(x_128, 1); x_159 = x_128; } else { lean_dec_ref(x_128); x_159 = lean_box(0); } if (lean_is_scalar(x_159)) { x_160 = lean_alloc_ctor(1, 2, 0); } else { x_160 = x_159; } lean_ctor_set(x_160, 0, x_157); lean_ctor_set(x_160, 1, x_158); return x_160; } } } } } block_20: { if (lean_obj_tag(x_12) == 0) { lean_object* x_14; lean_object* x_15; lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_2); lean_dec(x_1); x_14 = lean_ctor_get(x_12, 0); lean_inc(x_14); lean_dec(x_12); x_15 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_13); return x_15; } else { lean_object* x_16; size_t x_17; size_t x_18; x_16 = lean_ctor_get(x_12, 0); lean_inc(x_16); lean_dec(x_12); x_17 = 1; x_18 = x_5 + x_17; x_5 = x_18; x_6 = x_16; x_11 = x_13; goto _start; } } } } static lean_object* _init_l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("trying hint "); return x_1; } } static lean_object* _init_l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__1; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } static lean_object* _init_l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string(" at "); return x_1; } } static lean_object* _init_l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__4() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__3; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { if (x_5 == 0) { lean_object* x_11; lean_object* x_12; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_11 = lean_box(0); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_10); return x_12; } else { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; x_13 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_13, 0, x_1); x_14 = l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__2; x_15 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_13); x_16 = l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__4; x_17 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_17, 0, x_15); lean_ctor_set(x_17, 1, x_16); x_18 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_18, 0, x_2); x_19 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_19, 0, x_17); lean_ctor_set(x_19, 1, x_18); x_20 = l___private_Lean_Meta_LevelDefEq_0__Lean_Meta_postponeIsLevelDefEq___closed__5; x_21 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_21, 0, x_19); lean_ctor_set(x_21, 1, x_20); x_22 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_22, 0, x_3); x_23 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_23, 0, x_21); lean_ctor_set(x_23, 1, x_22); x_24 = l_Lean_KernelException_toMessageData___closed__15; x_25 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_25, 0, x_23); lean_ctor_set(x_25, 1, x_24); x_26 = l_Lean_addTrace___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_postponeIsLevelDefEq___spec__1(x_4, x_25, x_6, x_7, x_8, x_9, x_10); return x_26; } } } lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___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) { _start: { 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; x_10 = lean_array_get_size(x_1); x_11 = lean_unsigned_to_nat(0u); x_12 = l_Array_toSubarray___rarg(x_1, x_11, x_10); lean_inc(x_2); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_2); lean_ctor_set(x_13, 1, x_12); x_14 = lean_array_get_size(x_3); x_15 = lean_usize_of_nat(x_14); lean_dec(x_14); x_16 = 0; lean_inc(x_2); x_17 = l_Array_forInUnsafe_loop___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__3(x_2, x_2, x_3, x_15, x_16, x_13, x_5, x_6, x_7, x_8, x_9); if (lean_obj_tag(x_17) == 0) { lean_object* x_18; lean_object* x_19; x_18 = lean_ctor_get(x_17, 0); lean_inc(x_18); x_19 = lean_ctor_get(x_18, 0); lean_inc(x_19); lean_dec(x_18); if (lean_obj_tag(x_19) == 0) { uint8_t x_20; x_20 = !lean_is_exclusive(x_17); if (x_20 == 0) { lean_object* x_21; uint8_t x_22; lean_object* x_23; x_21 = lean_ctor_get(x_17, 0); lean_dec(x_21); x_22 = 1; x_23 = lean_box(x_22); lean_ctor_set(x_17, 0, x_23); return x_17; } else { lean_object* x_24; uint8_t x_25; lean_object* x_26; lean_object* x_27; x_24 = lean_ctor_get(x_17, 1); lean_inc(x_24); lean_dec(x_17); x_25 = 1; x_26 = lean_box(x_25); x_27 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_27, 0, x_26); lean_ctor_set(x_27, 1, x_24); return x_27; } } else { uint8_t x_28; x_28 = !lean_is_exclusive(x_17); if (x_28 == 0) { lean_object* x_29; lean_object* x_30; x_29 = lean_ctor_get(x_17, 0); lean_dec(x_29); x_30 = lean_ctor_get(x_19, 0); lean_inc(x_30); lean_dec(x_19); lean_ctor_set(x_17, 0, x_30); return x_17; } else { lean_object* x_31; lean_object* x_32; lean_object* x_33; x_31 = lean_ctor_get(x_17, 1); lean_inc(x_31); lean_dec(x_17); x_32 = lean_ctor_get(x_19, 0); lean_inc(x_32); lean_dec(x_19); x_33 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_33, 0, x_32); lean_ctor_set(x_33, 1, x_31); return x_33; } } } else { uint8_t x_34; x_34 = !lean_is_exclusive(x_17); if (x_34 == 0) { return x_17; } else { lean_object* x_35; lean_object* x_36; lean_object* x_37; x_35 = lean_ctor_get(x_17, 0); x_36 = lean_ctor_get(x_17, 1); lean_inc(x_36); lean_inc(x_35); lean_dec(x_17); x_37 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_37, 0, x_35); lean_ctor_set(x_37, 1, x_36); return x_37; } } } } static lean_object* _init_l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__3___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string(" succeeded, applying constraints"); return x_1; } } static lean_object* _init_l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__3___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__3___closed__1; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; lean_inc(x_1); x_11 = l_Lean_getConstInfo___at_Lean_Meta_mkConstWithFreshMVarLevels___spec__1(x_1, x_6, x_7, x_8, x_9, x_10); if (lean_obj_tag(x_11) == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_76; x_12 = lean_ctor_get(x_11, 0); lean_inc(x_12); x_13 = lean_ctor_get(x_11, 1); lean_inc(x_13); lean_dec(x_11); x_14 = l_Lean_ConstantInfo_levelParams(x_12); x_15 = l_List_mapM___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__1(x_14, x_6, x_7, x_8, x_9, x_13); x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); x_17 = lean_ctor_get(x_15, 1); lean_inc(x_17); lean_dec(x_15); x_18 = lean_instantiate_value_lparams(x_12, x_16); lean_dec(x_16); lean_dec(x_12); x_19 = lean_box(0); lean_inc(x_6); x_20 = l_Lean_Meta_lambdaMetaTelescope(x_18, x_19, x_6, x_7, x_8, x_9, x_17); lean_dec(x_18); x_21 = lean_ctor_get(x_20, 0); lean_inc(x_21); x_22 = lean_ctor_get(x_21, 1); lean_inc(x_22); x_23 = lean_ctor_get(x_20, 1); lean_inc(x_23); if (lean_is_exclusive(x_20)) { lean_ctor_release(x_20, 0); lean_ctor_release(x_20, 1); x_24 = x_20; } else { lean_dec_ref(x_20); x_24 = lean_box(0); } x_25 = lean_ctor_get(x_21, 0); lean_inc(x_25); lean_dec(x_21); x_26 = lean_ctor_get(x_22, 0); lean_inc(x_26); x_27 = lean_ctor_get(x_22, 1); lean_inc(x_27); lean_dec(x_22); x_76 = l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint(x_27); if (lean_obj_tag(x_76) == 0) { lean_dec(x_76); lean_dec(x_4); lean_dec(x_3); x_28 = x_19; x_29 = x_23; goto block_75; } else { lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; uint8_t x_82; x_77 = lean_ctor_get(x_6, 0); lean_inc(x_77); x_78 = lean_ctor_get(x_76, 0); lean_inc(x_78); lean_dec(x_76); x_79 = lean_ctor_get(x_6, 1); lean_inc(x_79); x_80 = lean_ctor_get(x_6, 2); lean_inc(x_80); x_81 = lean_ctor_get(x_6, 3); lean_inc(x_81); x_82 = !lean_is_exclusive(x_77); if (x_82 == 0) { uint8_t x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; x_83 = 0; lean_ctor_set_uint8(x_77, 8, x_83); x_84 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_84, 0, x_77); lean_ctor_set(x_84, 1, x_79); lean_ctor_set(x_84, 2, x_80); lean_ctor_set(x_84, 3, x_81); x_85 = lean_ctor_get(x_78, 0); lean_inc(x_85); x_86 = lean_ctor_get(x_85, 0); lean_inc(x_86); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_84); x_87 = l_Lean_Meta_tryUnificationHints_isDefEqPattern(x_86, x_3, x_84, x_7, x_8, x_9, x_23); if (lean_obj_tag(x_87) == 0) { lean_object* x_88; uint8_t x_89; x_88 = lean_ctor_get(x_87, 0); lean_inc(x_88); x_89 = lean_unbox(x_88); lean_dec(x_88); if (x_89 == 0) { lean_object* x_90; lean_dec(x_85); lean_dec(x_84); lean_dec(x_78); lean_dec(x_4); x_90 = lean_ctor_get(x_87, 1); lean_inc(x_90); lean_dec(x_87); x_28 = x_19; x_29 = x_90; goto block_75; } else { lean_object* x_91; lean_object* x_92; lean_object* x_93; x_91 = lean_ctor_get(x_87, 1); lean_inc(x_91); lean_dec(x_87); x_92 = lean_ctor_get(x_85, 1); lean_inc(x_92); lean_dec(x_85); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); x_93 = l_Lean_Meta_tryUnificationHints_isDefEqPattern(x_92, x_4, x_84, x_7, x_8, x_9, x_91); if (lean_obj_tag(x_93) == 0) { lean_object* x_94; uint8_t x_95; x_94 = lean_ctor_get(x_93, 0); lean_inc(x_94); x_95 = lean_unbox(x_94); lean_dec(x_94); if (x_95 == 0) { lean_object* x_96; lean_dec(x_78); x_96 = lean_ctor_get(x_93, 1); lean_inc(x_96); lean_dec(x_93); x_28 = x_19; x_29 = x_96; goto block_75; } else { lean_object* x_97; lean_object* x_98; x_97 = lean_ctor_get(x_93, 1); lean_inc(x_97); lean_dec(x_93); x_98 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_98, 0, x_78); x_28 = x_98; x_29 = x_97; goto block_75; } } else { uint8_t x_99; lean_dec(x_78); lean_dec(x_26); lean_dec(x_25); lean_dec(x_24); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_2); lean_dec(x_1); x_99 = !lean_is_exclusive(x_93); if (x_99 == 0) { return x_93; } else { lean_object* x_100; lean_object* x_101; lean_object* x_102; x_100 = lean_ctor_get(x_93, 0); x_101 = lean_ctor_get(x_93, 1); lean_inc(x_101); lean_inc(x_100); lean_dec(x_93); x_102 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_102, 0, x_100); lean_ctor_set(x_102, 1, x_101); return x_102; } } } } else { uint8_t x_103; lean_dec(x_85); lean_dec(x_84); lean_dec(x_78); lean_dec(x_26); lean_dec(x_25); lean_dec(x_24); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); x_103 = !lean_is_exclusive(x_87); if (x_103 == 0) { return x_87; } else { lean_object* x_104; lean_object* x_105; lean_object* x_106; x_104 = lean_ctor_get(x_87, 0); x_105 = lean_ctor_get(x_87, 1); lean_inc(x_105); lean_inc(x_104); lean_dec(x_87); x_106 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_106, 0, x_104); lean_ctor_set(x_106, 1, x_105); return x_106; } } } else { uint8_t x_107; uint8_t x_108; uint8_t x_109; uint8_t x_110; uint8_t x_111; uint8_t x_112; uint8_t x_113; uint8_t x_114; uint8_t x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; x_107 = lean_ctor_get_uint8(x_77, 0); x_108 = lean_ctor_get_uint8(x_77, 1); x_109 = lean_ctor_get_uint8(x_77, 2); x_110 = lean_ctor_get_uint8(x_77, 3); x_111 = lean_ctor_get_uint8(x_77, 4); x_112 = lean_ctor_get_uint8(x_77, 5); x_113 = lean_ctor_get_uint8(x_77, 6); x_114 = lean_ctor_get_uint8(x_77, 7); lean_dec(x_77); x_115 = 0; x_116 = lean_alloc_ctor(0, 0, 9); lean_ctor_set_uint8(x_116, 0, x_107); lean_ctor_set_uint8(x_116, 1, x_108); lean_ctor_set_uint8(x_116, 2, x_109); lean_ctor_set_uint8(x_116, 3, x_110); lean_ctor_set_uint8(x_116, 4, x_111); lean_ctor_set_uint8(x_116, 5, x_112); lean_ctor_set_uint8(x_116, 6, x_113); lean_ctor_set_uint8(x_116, 7, x_114); lean_ctor_set_uint8(x_116, 8, x_115); x_117 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_117, 0, x_116); lean_ctor_set(x_117, 1, x_79); lean_ctor_set(x_117, 2, x_80); lean_ctor_set(x_117, 3, x_81); x_118 = lean_ctor_get(x_78, 0); lean_inc(x_118); x_119 = lean_ctor_get(x_118, 0); lean_inc(x_119); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_117); x_120 = l_Lean_Meta_tryUnificationHints_isDefEqPattern(x_119, x_3, x_117, x_7, x_8, x_9, x_23); if (lean_obj_tag(x_120) == 0) { lean_object* x_121; uint8_t x_122; x_121 = lean_ctor_get(x_120, 0); lean_inc(x_121); x_122 = lean_unbox(x_121); lean_dec(x_121); if (x_122 == 0) { lean_object* x_123; lean_dec(x_118); lean_dec(x_117); lean_dec(x_78); lean_dec(x_4); x_123 = lean_ctor_get(x_120, 1); lean_inc(x_123); lean_dec(x_120); x_28 = x_19; x_29 = x_123; goto block_75; } else { lean_object* x_124; lean_object* x_125; lean_object* x_126; x_124 = lean_ctor_get(x_120, 1); lean_inc(x_124); lean_dec(x_120); x_125 = lean_ctor_get(x_118, 1); lean_inc(x_125); lean_dec(x_118); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); x_126 = l_Lean_Meta_tryUnificationHints_isDefEqPattern(x_125, x_4, x_117, x_7, x_8, x_9, x_124); if (lean_obj_tag(x_126) == 0) { lean_object* x_127; uint8_t x_128; x_127 = lean_ctor_get(x_126, 0); lean_inc(x_127); x_128 = lean_unbox(x_127); lean_dec(x_127); if (x_128 == 0) { lean_object* x_129; lean_dec(x_78); x_129 = lean_ctor_get(x_126, 1); lean_inc(x_129); lean_dec(x_126); x_28 = x_19; x_29 = x_129; goto block_75; } else { lean_object* x_130; lean_object* x_131; x_130 = lean_ctor_get(x_126, 1); lean_inc(x_130); lean_dec(x_126); x_131 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_131, 0, x_78); x_28 = x_131; x_29 = x_130; goto block_75; } } else { lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_dec(x_78); lean_dec(x_26); lean_dec(x_25); lean_dec(x_24); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_2); lean_dec(x_1); x_132 = lean_ctor_get(x_126, 0); lean_inc(x_132); x_133 = lean_ctor_get(x_126, 1); lean_inc(x_133); if (lean_is_exclusive(x_126)) { lean_ctor_release(x_126, 0); lean_ctor_release(x_126, 1); x_134 = x_126; } else { lean_dec_ref(x_126); x_134 = lean_box(0); } if (lean_is_scalar(x_134)) { x_135 = lean_alloc_ctor(1, 2, 0); } else { x_135 = x_134; } lean_ctor_set(x_135, 0, x_132); lean_ctor_set(x_135, 1, x_133); return x_135; } } } else { lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_dec(x_118); lean_dec(x_117); lean_dec(x_78); lean_dec(x_26); lean_dec(x_25); lean_dec(x_24); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); x_136 = lean_ctor_get(x_120, 0); lean_inc(x_136); x_137 = lean_ctor_get(x_120, 1); lean_inc(x_137); if (lean_is_exclusive(x_120)) { lean_ctor_release(x_120, 0); lean_ctor_release(x_120, 1); x_138 = x_120; } else { lean_dec_ref(x_120); x_138 = lean_box(0); } if (lean_is_scalar(x_138)) { x_139 = lean_alloc_ctor(1, 2, 0); } else { x_139 = x_138; } lean_ctor_set(x_139, 0, x_136); lean_ctor_set(x_139, 1, x_137); return x_139; } } } block_75: { if (lean_obj_tag(x_28) == 0) { uint8_t x_30; lean_object* x_31; lean_object* x_32; lean_dec(x_26); lean_dec(x_25); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_2); lean_dec(x_1); x_30 = 0; x_31 = lean_box(x_30); if (lean_is_scalar(x_24)) { x_32 = lean_alloc_ctor(0, 2, 0); } else { x_32 = x_24; } lean_ctor_set(x_32, 0, x_31); lean_ctor_set(x_32, 1, x_29); return x_32; } else { lean_object* x_33; lean_object* x_34; uint8_t x_54; lean_object* x_55; lean_object* x_64; lean_object* x_65; lean_object* x_66; uint8_t x_67; lean_dec(x_24); x_33 = lean_ctor_get(x_28, 0); lean_inc(x_33); lean_dec(x_28); x_64 = lean_st_ref_get(x_9, x_29); x_65 = lean_ctor_get(x_64, 0); lean_inc(x_65); x_66 = lean_ctor_get(x_65, 3); lean_inc(x_66); lean_dec(x_65); x_67 = lean_ctor_get_uint8(x_66, sizeof(void*)*1); lean_dec(x_66); if (x_67 == 0) { lean_object* x_68; uint8_t x_69; x_68 = lean_ctor_get(x_64, 1); lean_inc(x_68); lean_dec(x_64); x_69 = 0; x_54 = x_69; x_55 = x_68; goto block_63; } else { lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; uint8_t x_74; x_70 = lean_ctor_get(x_64, 1); lean_inc(x_70); lean_dec(x_64); lean_inc(x_2); x_71 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_postponeIsLevelDefEq___spec__2(x_2, x_6, x_7, x_8, x_9, x_70); x_72 = lean_ctor_get(x_71, 0); lean_inc(x_72); x_73 = lean_ctor_get(x_71, 1); lean_inc(x_73); lean_dec(x_71); x_74 = lean_unbox(x_72); lean_dec(x_72); x_54 = x_74; x_55 = x_73; goto block_63; } block_53: { lean_object* x_35; lean_object* x_36; lean_object* x_37; x_35 = lean_ctor_get(x_33, 1); lean_inc(x_35); lean_dec(x_33); x_36 = l_Array_findSomeM_x3f___rarg___closed__1; lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); x_37 = l_List_forIn_loop___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__2(x_36, x_35, x_36, x_6, x_7, x_8, x_9, x_34); if (lean_obj_tag(x_37) == 0) { lean_object* x_38; lean_object* x_39; x_38 = lean_ctor_get(x_37, 0); lean_inc(x_38); x_39 = lean_ctor_get(x_38, 0); lean_inc(x_39); lean_dec(x_38); if (lean_obj_tag(x_39) == 0) { lean_object* x_40; lean_object* x_41; lean_object* x_42; x_40 = lean_ctor_get(x_37, 1); lean_inc(x_40); lean_dec(x_37); x_41 = lean_box(0); x_42 = l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__2(x_26, x_19, x_25, x_41, x_6, x_7, x_8, x_9, x_40); lean_dec(x_25); return x_42; } else { uint8_t x_43; lean_dec(x_26); lean_dec(x_25); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); x_43 = !lean_is_exclusive(x_37); if (x_43 == 0) { lean_object* x_44; lean_object* x_45; x_44 = lean_ctor_get(x_37, 0); lean_dec(x_44); x_45 = lean_ctor_get(x_39, 0); lean_inc(x_45); lean_dec(x_39); lean_ctor_set(x_37, 0, x_45); return x_37; } else { lean_object* x_46; lean_object* x_47; lean_object* x_48; x_46 = lean_ctor_get(x_37, 1); lean_inc(x_46); lean_dec(x_37); x_47 = lean_ctor_get(x_39, 0); lean_inc(x_47); lean_dec(x_39); x_48 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_48, 0, x_47); lean_ctor_set(x_48, 1, x_46); return x_48; } } } else { uint8_t x_49; lean_dec(x_26); lean_dec(x_25); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); x_49 = !lean_is_exclusive(x_37); if (x_49 == 0) { return x_37; } else { lean_object* x_50; lean_object* x_51; lean_object* x_52; x_50 = lean_ctor_get(x_37, 0); x_51 = lean_ctor_get(x_37, 1); lean_inc(x_51); lean_inc(x_50); lean_dec(x_37); 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; } } } block_63: { if (x_54 == 0) { lean_dec(x_2); lean_dec(x_1); x_34 = x_55; goto block_53; } else { lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; x_56 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_56, 0, x_1); x_57 = l_Lean_KernelException_toMessageData___closed__15; x_58 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_58, 0, x_57); lean_ctor_set(x_58, 1, x_56); x_59 = l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__3___closed__2; x_60 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_60, 0, x_58); lean_ctor_set(x_60, 1, x_59); x_61 = l_Lean_addTrace___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_postponeIsLevelDefEq___spec__1(x_2, x_60, x_6, x_7, x_8, x_9, x_55); x_62 = lean_ctor_get(x_61, 1); lean_inc(x_62); lean_dec(x_61); x_34 = x_62; goto block_53; } } } } } else { uint8_t x_140; lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_140 = !lean_is_exclusive(x_11); if (x_140 == 0) { return x_11; } else { lean_object* x_141; lean_object* x_142; lean_object* x_143; x_141 = lean_ctor_get(x_11, 0); x_142 = lean_ctor_get(x_11, 1); lean_inc(x_142); lean_inc(x_141); lean_dec(x_11); x_143 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_143, 0, x_141); lean_ctor_set(x_143, 1, x_142); return x_143; } } } } lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, uint8_t x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_inc(x_5); x_12 = lean_alloc_closure((void*)(l___private_Lean_Meta_SynthInstance_0__Lean_Meta_SynthInstance_mkAnswer___lambda__2___boxed), 7, 1); lean_closure_set(x_12, 0, x_5); x_13 = l___private_Lean_Meta_SynthInstance_0__Lean_Meta_SynthInstance_mkAnswer___closed__4; x_14 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg), 7, 2); lean_closure_set(x_14, 0, x_13); lean_closure_set(x_14, 1, x_12); lean_inc(x_5); lean_inc(x_2); lean_inc(x_1); lean_inc(x_3); x_15 = lean_alloc_closure((void*)(l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___boxed), 10, 4); lean_closure_set(x_15, 0, x_3); lean_closure_set(x_15, 1, x_1); lean_closure_set(x_15, 2, x_2); lean_closure_set(x_15, 3, x_5); x_16 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg), 7, 2); lean_closure_set(x_16, 0, x_14); lean_closure_set(x_16, 1, x_15); x_17 = lean_alloc_closure((void*)(l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__3___boxed), 10, 4); lean_closure_set(x_17, 0, x_3); lean_closure_set(x_17, 1, x_5); lean_closure_set(x_17, 2, x_1); lean_closure_set(x_17, 3, x_2); x_18 = l_Lean_Meta_saveState___rarg(x_8, x_9, x_10, x_11); 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_29 = l_Lean_Meta_getResetPostponed(x_7, x_8, x_9, x_10, x_20); x_30 = lean_ctor_get(x_29, 0); lean_inc(x_30); x_31 = lean_ctor_get(x_29, 1); lean_inc(x_31); lean_dec(x_29); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); x_32 = l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg(x_16, x_17, x_7, x_8, x_9, x_10, x_31); if (lean_obj_tag(x_32) == 0) { lean_object* x_33; uint8_t x_34; x_33 = lean_ctor_get(x_32, 0); lean_inc(x_33); x_34 = lean_unbox(x_33); lean_dec(x_33); if (x_34 == 0) { lean_object* x_35; lean_object* x_36; uint8_t x_37; lean_dec(x_30); x_35 = lean_ctor_get(x_32, 1); lean_inc(x_35); lean_dec(x_32); x_36 = l_Lean_Meta_SavedState_restore(x_19, x_7, x_8, x_9, x_10, x_35); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_19); x_37 = !lean_is_exclusive(x_36); if (x_37 == 0) { lean_object* x_38; uint8_t x_39; lean_object* x_40; x_38 = lean_ctor_get(x_36, 0); lean_dec(x_38); x_39 = 0; x_40 = lean_box(x_39); lean_ctor_set(x_36, 0, x_40); return x_36; } else { lean_object* x_41; uint8_t x_42; lean_object* x_43; lean_object* x_44; x_41 = lean_ctor_get(x_36, 1); lean_inc(x_41); lean_dec(x_36); x_42 = 0; x_43 = lean_box(x_42); x_44 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_44, 0, x_43); lean_ctor_set(x_44, 1, x_41); return x_44; } } else { lean_object* x_45; uint8_t x_46; lean_object* x_47; x_45 = lean_ctor_get(x_32, 1); lean_inc(x_45); lean_dec(x_32); x_46 = 0; lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); x_47 = l_Lean_Meta_processPostponed(x_6, x_46, x_7, x_8, x_9, x_10, x_45); if (lean_obj_tag(x_47) == 0) { lean_object* x_48; uint8_t x_49; x_48 = lean_ctor_get(x_47, 0); lean_inc(x_48); x_49 = lean_unbox(x_48); lean_dec(x_48); if (x_49 == 0) { lean_object* x_50; lean_object* x_51; uint8_t x_52; lean_dec(x_30); x_50 = lean_ctor_get(x_47, 1); lean_inc(x_50); lean_dec(x_47); x_51 = l_Lean_Meta_SavedState_restore(x_19, x_7, x_8, x_9, x_10, x_50); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_19); x_52 = !lean_is_exclusive(x_51); if (x_52 == 0) { lean_object* x_53; lean_object* x_54; x_53 = lean_ctor_get(x_51, 0); lean_dec(x_53); x_54 = lean_box(x_46); lean_ctor_set(x_51, 0, x_54); return x_51; } else { lean_object* x_55; lean_object* x_56; lean_object* x_57; x_55 = lean_ctor_get(x_51, 1); lean_inc(x_55); lean_dec(x_51); x_56 = lean_box(x_46); x_57 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_57, 0, x_56); lean_ctor_set(x_57, 1, x_55); return x_57; } } else { lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; uint8_t x_64; lean_dec(x_19); x_58 = lean_ctor_get(x_47, 1); lean_inc(x_58); lean_dec(x_47); x_59 = l_Lean_Meta_getPostponed___rarg(x_8, x_9, x_10, x_58); x_60 = lean_ctor_get(x_59, 0); lean_inc(x_60); x_61 = lean_ctor_get(x_59, 1); lean_inc(x_61); lean_dec(x_59); x_62 = l_Std_PersistentArray_append___rarg(x_30, x_60); lean_dec(x_60); x_63 = l_Lean_Meta_setPostponed(x_62, x_7, x_8, x_9, x_10, x_61); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); x_64 = !lean_is_exclusive(x_63); if (x_64 == 0) { lean_object* x_65; uint8_t x_66; lean_object* x_67; x_65 = lean_ctor_get(x_63, 0); lean_dec(x_65); x_66 = 1; x_67 = lean_box(x_66); lean_ctor_set(x_63, 0, x_67); return x_63; } else { lean_object* x_68; uint8_t x_69; lean_object* x_70; lean_object* x_71; x_68 = lean_ctor_get(x_63, 1); lean_inc(x_68); lean_dec(x_63); x_69 = 1; x_70 = lean_box(x_69); x_71 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_71, 0, x_70); lean_ctor_set(x_71, 1, x_68); return x_71; } } } else { lean_object* x_72; lean_object* x_73; lean_dec(x_30); x_72 = lean_ctor_get(x_47, 0); lean_inc(x_72); x_73 = lean_ctor_get(x_47, 1); lean_inc(x_73); lean_dec(x_47); x_21 = x_72; x_22 = x_73; goto block_28; } } } else { lean_object* x_74; lean_object* x_75; lean_dec(x_30); x_74 = lean_ctor_get(x_32, 0); lean_inc(x_74); x_75 = lean_ctor_get(x_32, 1); lean_inc(x_75); lean_dec(x_32); x_21 = x_74; x_22 = x_75; goto block_28; } block_28: { lean_object* x_23; uint8_t x_24; x_23 = l_Lean_Meta_SavedState_restore(x_19, x_7, x_8, x_9, x_10, x_22); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_19); x_24 = !lean_is_exclusive(x_23); if (x_24 == 0) { lean_object* x_25; x_25 = lean_ctor_get(x_23, 0); lean_dec(x_25); lean_ctor_set_tag(x_23, 1); lean_ctor_set(x_23, 0, x_21); return x_23; } else { lean_object* x_26; lean_object* x_27; x_26 = lean_ctor_get(x_23, 1); lean_inc(x_26); lean_dec(x_23); x_27 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_27, 0, x_21); lean_ctor_set(x_27, 1, x_26); return x_27; } } } } lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, uint8_t x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_inc(x_5); x_12 = lean_alloc_closure((void*)(l___private_Lean_Meta_SynthInstance_0__Lean_Meta_SynthInstance_mkAnswer___lambda__2___boxed), 7, 1); lean_closure_set(x_12, 0, x_5); x_13 = l___private_Lean_Meta_SynthInstance_0__Lean_Meta_SynthInstance_mkAnswer___closed__4; x_14 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg), 7, 2); lean_closure_set(x_14, 0, x_13); lean_closure_set(x_14, 1, x_12); lean_inc(x_5); lean_inc(x_2); lean_inc(x_1); lean_inc(x_3); x_15 = lean_alloc_closure((void*)(l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___boxed), 10, 4); lean_closure_set(x_15, 0, x_3); lean_closure_set(x_15, 1, x_1); lean_closure_set(x_15, 2, x_2); lean_closure_set(x_15, 3, x_5); x_16 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg), 7, 2); lean_closure_set(x_16, 0, x_14); lean_closure_set(x_16, 1, x_15); x_17 = lean_alloc_closure((void*)(l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__3___boxed), 10, 4); lean_closure_set(x_17, 0, x_3); lean_closure_set(x_17, 1, x_5); lean_closure_set(x_17, 2, x_1); lean_closure_set(x_17, 3, x_2); x_18 = l_Lean_Meta_saveState___rarg(x_8, x_9, x_10, x_11); 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_29 = l_Lean_Meta_getResetPostponed(x_7, x_8, x_9, x_10, x_20); x_30 = lean_ctor_get(x_29, 0); lean_inc(x_30); x_31 = lean_ctor_get(x_29, 1); lean_inc(x_31); lean_dec(x_29); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); x_32 = l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg(x_16, x_17, x_7, x_8, x_9, x_10, x_31); if (lean_obj_tag(x_32) == 0) { lean_object* x_33; uint8_t x_34; x_33 = lean_ctor_get(x_32, 0); lean_inc(x_33); x_34 = lean_unbox(x_33); lean_dec(x_33); if (x_34 == 0) { lean_object* x_35; lean_object* x_36; uint8_t x_37; lean_dec(x_30); x_35 = lean_ctor_get(x_32, 1); lean_inc(x_35); lean_dec(x_32); x_36 = l_Lean_Meta_SavedState_restore(x_19, x_7, x_8, x_9, x_10, x_35); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_19); x_37 = !lean_is_exclusive(x_36); if (x_37 == 0) { lean_object* x_38; uint8_t x_39; lean_object* x_40; x_38 = lean_ctor_get(x_36, 0); lean_dec(x_38); x_39 = 0; x_40 = lean_box(x_39); lean_ctor_set(x_36, 0, x_40); return x_36; } else { lean_object* x_41; uint8_t x_42; lean_object* x_43; lean_object* x_44; x_41 = lean_ctor_get(x_36, 1); lean_inc(x_41); lean_dec(x_36); x_42 = 0; x_43 = lean_box(x_42); x_44 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_44, 0, x_43); lean_ctor_set(x_44, 1, x_41); return x_44; } } else { lean_object* x_45; uint8_t x_46; lean_object* x_47; x_45 = lean_ctor_get(x_32, 1); lean_inc(x_45); lean_dec(x_32); x_46 = 0; lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); x_47 = l_Lean_Meta_processPostponed(x_6, x_46, x_7, x_8, x_9, x_10, x_45); if (lean_obj_tag(x_47) == 0) { lean_object* x_48; uint8_t x_49; x_48 = lean_ctor_get(x_47, 0); lean_inc(x_48); x_49 = lean_unbox(x_48); lean_dec(x_48); if (x_49 == 0) { lean_object* x_50; lean_object* x_51; uint8_t x_52; lean_dec(x_30); x_50 = lean_ctor_get(x_47, 1); lean_inc(x_50); lean_dec(x_47); x_51 = l_Lean_Meta_SavedState_restore(x_19, x_7, x_8, x_9, x_10, x_50); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_19); x_52 = !lean_is_exclusive(x_51); if (x_52 == 0) { lean_object* x_53; lean_object* x_54; x_53 = lean_ctor_get(x_51, 0); lean_dec(x_53); x_54 = lean_box(x_46); lean_ctor_set(x_51, 0, x_54); return x_51; } else { lean_object* x_55; lean_object* x_56; lean_object* x_57; x_55 = lean_ctor_get(x_51, 1); lean_inc(x_55); lean_dec(x_51); x_56 = lean_box(x_46); x_57 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_57, 0, x_56); lean_ctor_set(x_57, 1, x_55); return x_57; } } else { lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; uint8_t x_64; lean_dec(x_19); x_58 = lean_ctor_get(x_47, 1); lean_inc(x_58); lean_dec(x_47); x_59 = l_Lean_Meta_getPostponed___rarg(x_8, x_9, x_10, x_58); x_60 = lean_ctor_get(x_59, 0); lean_inc(x_60); x_61 = lean_ctor_get(x_59, 1); lean_inc(x_61); lean_dec(x_59); x_62 = l_Std_PersistentArray_append___rarg(x_30, x_60); lean_dec(x_60); x_63 = l_Lean_Meta_setPostponed(x_62, x_7, x_8, x_9, x_10, x_61); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); x_64 = !lean_is_exclusive(x_63); if (x_64 == 0) { lean_object* x_65; uint8_t x_66; lean_object* x_67; x_65 = lean_ctor_get(x_63, 0); lean_dec(x_65); x_66 = 1; x_67 = lean_box(x_66); lean_ctor_set(x_63, 0, x_67); return x_63; } else { lean_object* x_68; uint8_t x_69; lean_object* x_70; lean_object* x_71; x_68 = lean_ctor_get(x_63, 1); lean_inc(x_68); lean_dec(x_63); x_69 = 1; x_70 = lean_box(x_69); x_71 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_71, 0, x_70); lean_ctor_set(x_71, 1, x_68); return x_71; } } } else { lean_object* x_72; lean_object* x_73; lean_dec(x_30); x_72 = lean_ctor_get(x_47, 0); lean_inc(x_72); x_73 = lean_ctor_get(x_47, 1); lean_inc(x_73); lean_dec(x_47); x_21 = x_72; x_22 = x_73; goto block_28; } } } else { lean_object* x_74; lean_object* x_75; lean_dec(x_30); x_74 = lean_ctor_get(x_32, 0); lean_inc(x_74); x_75 = lean_ctor_get(x_32, 1); lean_inc(x_75); lean_dec(x_32); x_21 = x_74; x_22 = x_75; goto block_28; } block_28: { lean_object* x_23; uint8_t x_24; x_23 = l_Lean_Meta_SavedState_restore(x_19, x_7, x_8, x_9, x_10, x_22); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_19); x_24 = !lean_is_exclusive(x_23); if (x_24 == 0) { lean_object* x_25; x_25 = lean_ctor_get(x_23, 0); lean_dec(x_25); lean_ctor_set_tag(x_23, 1); lean_ctor_set(x_23, 0, x_21); return x_23; } else { lean_object* x_26; lean_object* x_27; x_26 = lean_ctor_get(x_23, 1); lean_inc(x_26); lean_dec(x_23); x_27 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_27, 0, x_21); lean_ctor_set(x_27, 1, x_26); return x_27; } } } } static lean_object* _init_l_Lean_Meta_tryUnificationHints_tryCandidate___closed__1() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_MetavarContext_MkBinding_mkBinding___closed__1; x_2 = l_ReaderT_instMonadReaderT___rarg(x_1); return x_2; } } static lean_object* _init_l_Lean_Meta_tryUnificationHints_tryCandidate___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Meta_tryUnificationHints_tryCandidate___closed__1; x_2 = l_ReaderT_instMonadReaderT___rarg(x_1); return x_2; } } static lean_object* _init_l_Lean_Meta_tryUnificationHints_tryCandidate___closed__3() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Meta_tryUnificationHints_tryCandidate___closed__2; x_2 = l_ReaderT_instMonadReaderT___rarg(x_1); return x_2; } } static lean_object* _init_l_Lean_Meta_tryUnificationHints_tryCandidate___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Meta_isExprDefEq___closed__2; x_2 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1354____closed__33; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } lean_object* l_Lean_Meta_tryUnificationHints_tryCandidate(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; lean_object* x_10; lean_object* x_222; lean_object* x_223; lean_object* x_224; uint8_t x_225; x_222 = lean_st_ref_get(x_7, x_8); x_223 = lean_ctor_get(x_222, 0); lean_inc(x_223); x_224 = lean_ctor_get(x_223, 3); lean_inc(x_224); lean_dec(x_223); x_225 = lean_ctor_get_uint8(x_224, sizeof(void*)*1); lean_dec(x_224); if (x_225 == 0) { lean_object* x_226; uint8_t x_227; x_226 = lean_ctor_get(x_222, 1); lean_inc(x_226); lean_dec(x_222); x_227 = 0; x_9 = x_227; x_10 = x_226; goto block_221; } else { 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_228 = lean_ctor_get(x_222, 1); lean_inc(x_228); lean_dec(x_222); x_229 = l_Lean_Meta_tryUnificationHints_tryCandidate___closed__4; x_230 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_postponeIsLevelDefEq___spec__2(x_229, x_4, x_5, x_6, x_7, x_228); x_231 = lean_ctor_get(x_230, 0); lean_inc(x_231); x_232 = lean_ctor_get(x_230, 1); lean_inc(x_232); lean_dec(x_230); x_233 = lean_unbox(x_231); lean_dec(x_231); x_9 = x_233; x_10 = x_232; goto block_221; } block_221: { if (x_9 == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; x_11 = lean_st_ref_get(x_7, x_10); x_12 = lean_ctor_get(x_11, 0); lean_inc(x_12); x_13 = lean_ctor_get(x_12, 3); lean_inc(x_13); lean_dec(x_12); x_14 = lean_ctor_get(x_11, 1); lean_inc(x_14); lean_dec(x_11); x_15 = lean_ctor_get_uint8(x_13, sizeof(void*)*1); lean_dec(x_13); x_16 = lean_st_ref_take(x_7, x_14); x_17 = lean_ctor_get(x_16, 0); lean_inc(x_17); x_18 = lean_ctor_get(x_17, 3); lean_inc(x_18); x_19 = lean_ctor_get(x_16, 1); lean_inc(x_19); lean_dec(x_16); x_20 = !lean_is_exclusive(x_17); if (x_20 == 0) { lean_object* x_21; uint8_t x_22; x_21 = lean_ctor_get(x_17, 3); lean_dec(x_21); x_22 = !lean_is_exclusive(x_18); if (x_22 == 0) { uint8_t x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; lean_object* x_29; x_23 = 0; lean_ctor_set_uint8(x_18, sizeof(void*)*1, x_23); x_24 = lean_st_ref_set(x_7, x_17, x_19); x_25 = lean_ctor_get(x_24, 1); lean_inc(x_25); lean_dec(x_24); x_26 = l_Lean_Meta_tryUnificationHints_tryCandidate___closed__3; x_27 = l_Lean_Meta_tryUnificationHints_tryCandidate___closed__4; x_28 = 1; lean_inc(x_7); x_29 = l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4(x_1, x_2, x_3, x_26, x_27, x_28, x_4, x_5, x_6, x_7, x_25); if (lean_obj_tag(x_29) == 0) { lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; uint8_t x_38; x_30 = lean_ctor_get(x_29, 0); lean_inc(x_30); x_31 = lean_ctor_get(x_29, 1); lean_inc(x_31); lean_dec(x_29); x_32 = lean_st_ref_get(x_7, x_31); x_33 = lean_ctor_get(x_32, 1); lean_inc(x_33); lean_dec(x_32); x_34 = lean_st_ref_take(x_7, x_33); x_35 = lean_ctor_get(x_34, 0); lean_inc(x_35); x_36 = lean_ctor_get(x_35, 3); lean_inc(x_36); x_37 = lean_ctor_get(x_34, 1); lean_inc(x_37); lean_dec(x_34); x_38 = !lean_is_exclusive(x_35); if (x_38 == 0) { lean_object* x_39; uint8_t x_40; x_39 = lean_ctor_get(x_35, 3); lean_dec(x_39); x_40 = !lean_is_exclusive(x_36); if (x_40 == 0) { lean_object* x_41; uint8_t x_42; lean_ctor_set_uint8(x_36, sizeof(void*)*1, x_15); x_41 = lean_st_ref_set(x_7, x_35, x_37); lean_dec(x_7); x_42 = !lean_is_exclusive(x_41); if (x_42 == 0) { lean_object* x_43; x_43 = lean_ctor_get(x_41, 0); lean_dec(x_43); lean_ctor_set(x_41, 0, x_30); return x_41; } else { lean_object* x_44; lean_object* x_45; x_44 = lean_ctor_get(x_41, 1); lean_inc(x_44); lean_dec(x_41); x_45 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_45, 0, x_30); lean_ctor_set(x_45, 1, x_44); return x_45; } } else { lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; x_46 = lean_ctor_get(x_36, 0); lean_inc(x_46); lean_dec(x_36); x_47 = lean_alloc_ctor(0, 1, 1); lean_ctor_set(x_47, 0, x_46); lean_ctor_set_uint8(x_47, sizeof(void*)*1, x_15); lean_ctor_set(x_35, 3, x_47); x_48 = lean_st_ref_set(x_7, x_35, x_37); lean_dec(x_7); x_49 = lean_ctor_get(x_48, 1); lean_inc(x_49); if (lean_is_exclusive(x_48)) { lean_ctor_release(x_48, 0); lean_ctor_release(x_48, 1); x_50 = x_48; } else { lean_dec_ref(x_48); x_50 = lean_box(0); } if (lean_is_scalar(x_50)) { x_51 = lean_alloc_ctor(0, 2, 0); } else { x_51 = x_50; } lean_ctor_set(x_51, 0, x_30); lean_ctor_set(x_51, 1, x_49); return x_51; } } else { lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; x_52 = lean_ctor_get(x_35, 0); x_53 = lean_ctor_get(x_35, 1); x_54 = lean_ctor_get(x_35, 2); lean_inc(x_54); lean_inc(x_53); lean_inc(x_52); lean_dec(x_35); x_55 = lean_ctor_get(x_36, 0); lean_inc(x_55); if (lean_is_exclusive(x_36)) { lean_ctor_release(x_36, 0); x_56 = x_36; } else { lean_dec_ref(x_36); x_56 = lean_box(0); } if (lean_is_scalar(x_56)) { x_57 = lean_alloc_ctor(0, 1, 1); } else { x_57 = x_56; } lean_ctor_set(x_57, 0, x_55); lean_ctor_set_uint8(x_57, sizeof(void*)*1, x_15); x_58 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_58, 0, x_52); lean_ctor_set(x_58, 1, x_53); lean_ctor_set(x_58, 2, x_54); lean_ctor_set(x_58, 3, x_57); x_59 = lean_st_ref_set(x_7, x_58, x_37); lean_dec(x_7); x_60 = lean_ctor_get(x_59, 1); lean_inc(x_60); if (lean_is_exclusive(x_59)) { lean_ctor_release(x_59, 0); lean_ctor_release(x_59, 1); x_61 = x_59; } else { lean_dec_ref(x_59); x_61 = lean_box(0); } if (lean_is_scalar(x_61)) { x_62 = lean_alloc_ctor(0, 2, 0); } else { x_62 = x_61; } lean_ctor_set(x_62, 0, x_30); lean_ctor_set(x_62, 1, x_60); return x_62; } } else { 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; lean_object* x_70; uint8_t x_71; x_63 = lean_ctor_get(x_29, 0); lean_inc(x_63); x_64 = lean_ctor_get(x_29, 1); lean_inc(x_64); lean_dec(x_29); x_65 = lean_st_ref_get(x_7, x_64); x_66 = lean_ctor_get(x_65, 1); lean_inc(x_66); lean_dec(x_65); x_67 = lean_st_ref_take(x_7, x_66); x_68 = lean_ctor_get(x_67, 0); lean_inc(x_68); x_69 = lean_ctor_get(x_68, 3); lean_inc(x_69); x_70 = lean_ctor_get(x_67, 1); lean_inc(x_70); lean_dec(x_67); x_71 = !lean_is_exclusive(x_68); if (x_71 == 0) { lean_object* x_72; uint8_t x_73; x_72 = lean_ctor_get(x_68, 3); lean_dec(x_72); x_73 = !lean_is_exclusive(x_69); if (x_73 == 0) { lean_object* x_74; uint8_t x_75; lean_ctor_set_uint8(x_69, sizeof(void*)*1, x_15); x_74 = lean_st_ref_set(x_7, x_68, x_70); lean_dec(x_7); x_75 = !lean_is_exclusive(x_74); if (x_75 == 0) { lean_object* x_76; x_76 = lean_ctor_get(x_74, 0); lean_dec(x_76); lean_ctor_set_tag(x_74, 1); lean_ctor_set(x_74, 0, x_63); return x_74; } else { lean_object* x_77; lean_object* x_78; x_77 = lean_ctor_get(x_74, 1); lean_inc(x_77); lean_dec(x_74); x_78 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_78, 0, x_63); lean_ctor_set(x_78, 1, x_77); return x_78; } } else { lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; x_79 = lean_ctor_get(x_69, 0); lean_inc(x_79); lean_dec(x_69); x_80 = lean_alloc_ctor(0, 1, 1); lean_ctor_set(x_80, 0, x_79); lean_ctor_set_uint8(x_80, sizeof(void*)*1, x_15); lean_ctor_set(x_68, 3, x_80); x_81 = lean_st_ref_set(x_7, x_68, x_70); lean_dec(x_7); x_82 = lean_ctor_get(x_81, 1); lean_inc(x_82); if (lean_is_exclusive(x_81)) { lean_ctor_release(x_81, 0); lean_ctor_release(x_81, 1); x_83 = x_81; } else { lean_dec_ref(x_81); x_83 = lean_box(0); } if (lean_is_scalar(x_83)) { x_84 = lean_alloc_ctor(1, 2, 0); } else { x_84 = x_83; lean_ctor_set_tag(x_84, 1); } lean_ctor_set(x_84, 0, x_63); lean_ctor_set(x_84, 1, x_82); return x_84; } } else { 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_85 = lean_ctor_get(x_68, 0); x_86 = lean_ctor_get(x_68, 1); x_87 = lean_ctor_get(x_68, 2); lean_inc(x_87); lean_inc(x_86); lean_inc(x_85); lean_dec(x_68); x_88 = lean_ctor_get(x_69, 0); lean_inc(x_88); if (lean_is_exclusive(x_69)) { lean_ctor_release(x_69, 0); x_89 = x_69; } else { lean_dec_ref(x_69); x_89 = lean_box(0); } if (lean_is_scalar(x_89)) { x_90 = lean_alloc_ctor(0, 1, 1); } else { x_90 = x_89; } lean_ctor_set(x_90, 0, x_88); lean_ctor_set_uint8(x_90, sizeof(void*)*1, x_15); x_91 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_91, 0, x_85); lean_ctor_set(x_91, 1, x_86); lean_ctor_set(x_91, 2, x_87); lean_ctor_set(x_91, 3, x_90); x_92 = lean_st_ref_set(x_7, x_91, x_70); lean_dec(x_7); x_93 = lean_ctor_get(x_92, 1); lean_inc(x_93); if (lean_is_exclusive(x_92)) { lean_ctor_release(x_92, 0); lean_ctor_release(x_92, 1); x_94 = x_92; } else { lean_dec_ref(x_92); x_94 = lean_box(0); } if (lean_is_scalar(x_94)) { x_95 = lean_alloc_ctor(1, 2, 0); } else { x_95 = x_94; lean_ctor_set_tag(x_95, 1); } lean_ctor_set(x_95, 0, x_63); lean_ctor_set(x_95, 1, x_93); return x_95; } } } else { lean_object* x_96; uint8_t x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; uint8_t x_103; lean_object* x_104; x_96 = lean_ctor_get(x_18, 0); lean_inc(x_96); lean_dec(x_18); x_97 = 0; x_98 = lean_alloc_ctor(0, 1, 1); lean_ctor_set(x_98, 0, x_96); lean_ctor_set_uint8(x_98, sizeof(void*)*1, x_97); lean_ctor_set(x_17, 3, x_98); x_99 = lean_st_ref_set(x_7, x_17, x_19); x_100 = lean_ctor_get(x_99, 1); lean_inc(x_100); lean_dec(x_99); x_101 = l_Lean_Meta_tryUnificationHints_tryCandidate___closed__3; x_102 = l_Lean_Meta_tryUnificationHints_tryCandidate___closed__4; x_103 = 1; lean_inc(x_7); x_104 = l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4(x_1, x_2, x_3, x_101, x_102, x_103, x_4, x_5, x_6, x_7, x_100); if (lean_obj_tag(x_104) == 0) { lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; x_105 = lean_ctor_get(x_104, 0); lean_inc(x_105); x_106 = lean_ctor_get(x_104, 1); lean_inc(x_106); lean_dec(x_104); x_107 = lean_st_ref_get(x_7, x_106); x_108 = lean_ctor_get(x_107, 1); lean_inc(x_108); lean_dec(x_107); x_109 = lean_st_ref_take(x_7, x_108); x_110 = lean_ctor_get(x_109, 0); lean_inc(x_110); x_111 = lean_ctor_get(x_110, 3); lean_inc(x_111); x_112 = lean_ctor_get(x_109, 1); lean_inc(x_112); lean_dec(x_109); x_113 = lean_ctor_get(x_110, 0); lean_inc(x_113); x_114 = lean_ctor_get(x_110, 1); lean_inc(x_114); x_115 = lean_ctor_get(x_110, 2); lean_inc(x_115); if (lean_is_exclusive(x_110)) { lean_ctor_release(x_110, 0); lean_ctor_release(x_110, 1); lean_ctor_release(x_110, 2); lean_ctor_release(x_110, 3); x_116 = x_110; } else { lean_dec_ref(x_110); x_116 = lean_box(0); } x_117 = lean_ctor_get(x_111, 0); lean_inc(x_117); if (lean_is_exclusive(x_111)) { lean_ctor_release(x_111, 0); x_118 = x_111; } else { lean_dec_ref(x_111); x_118 = lean_box(0); } if (lean_is_scalar(x_118)) { x_119 = lean_alloc_ctor(0, 1, 1); } else { x_119 = x_118; } lean_ctor_set(x_119, 0, x_117); lean_ctor_set_uint8(x_119, sizeof(void*)*1, x_15); if (lean_is_scalar(x_116)) { x_120 = lean_alloc_ctor(0, 4, 0); } else { x_120 = x_116; } lean_ctor_set(x_120, 0, x_113); lean_ctor_set(x_120, 1, x_114); lean_ctor_set(x_120, 2, x_115); lean_ctor_set(x_120, 3, x_119); x_121 = lean_st_ref_set(x_7, x_120, x_112); lean_dec(x_7); x_122 = lean_ctor_get(x_121, 1); lean_inc(x_122); if (lean_is_exclusive(x_121)) { lean_ctor_release(x_121, 0); lean_ctor_release(x_121, 1); x_123 = x_121; } else { lean_dec_ref(x_121); x_123 = lean_box(0); } if (lean_is_scalar(x_123)) { x_124 = lean_alloc_ctor(0, 2, 0); } else { x_124 = x_123; } lean_ctor_set(x_124, 0, x_105); lean_ctor_set(x_124, 1, x_122); return x_124; } else { 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; lean_object* x_143; lean_object* x_144; x_125 = lean_ctor_get(x_104, 0); lean_inc(x_125); x_126 = lean_ctor_get(x_104, 1); lean_inc(x_126); lean_dec(x_104); x_127 = lean_st_ref_get(x_7, x_126); x_128 = lean_ctor_get(x_127, 1); lean_inc(x_128); lean_dec(x_127); x_129 = lean_st_ref_take(x_7, x_128); x_130 = lean_ctor_get(x_129, 0); lean_inc(x_130); x_131 = lean_ctor_get(x_130, 3); lean_inc(x_131); x_132 = lean_ctor_get(x_129, 1); lean_inc(x_132); lean_dec(x_129); x_133 = lean_ctor_get(x_130, 0); lean_inc(x_133); x_134 = lean_ctor_get(x_130, 1); lean_inc(x_134); x_135 = lean_ctor_get(x_130, 2); lean_inc(x_135); if (lean_is_exclusive(x_130)) { lean_ctor_release(x_130, 0); lean_ctor_release(x_130, 1); lean_ctor_release(x_130, 2); lean_ctor_release(x_130, 3); x_136 = x_130; } else { lean_dec_ref(x_130); x_136 = lean_box(0); } x_137 = lean_ctor_get(x_131, 0); lean_inc(x_137); if (lean_is_exclusive(x_131)) { lean_ctor_release(x_131, 0); x_138 = x_131; } else { lean_dec_ref(x_131); x_138 = lean_box(0); } if (lean_is_scalar(x_138)) { x_139 = lean_alloc_ctor(0, 1, 1); } else { x_139 = x_138; } lean_ctor_set(x_139, 0, x_137); lean_ctor_set_uint8(x_139, sizeof(void*)*1, x_15); if (lean_is_scalar(x_136)) { x_140 = lean_alloc_ctor(0, 4, 0); } else { x_140 = x_136; } lean_ctor_set(x_140, 0, x_133); lean_ctor_set(x_140, 1, x_134); lean_ctor_set(x_140, 2, x_135); lean_ctor_set(x_140, 3, x_139); x_141 = lean_st_ref_set(x_7, x_140, x_132); lean_dec(x_7); x_142 = lean_ctor_get(x_141, 1); lean_inc(x_142); if (lean_is_exclusive(x_141)) { lean_ctor_release(x_141, 0); lean_ctor_release(x_141, 1); x_143 = x_141; } else { lean_dec_ref(x_141); x_143 = lean_box(0); } if (lean_is_scalar(x_143)) { x_144 = lean_alloc_ctor(1, 2, 0); } else { x_144 = x_143; lean_ctor_set_tag(x_144, 1); } lean_ctor_set(x_144, 0, x_125); lean_ctor_set(x_144, 1, x_142); return x_144; } } } else { lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; uint8_t 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; uint8_t x_157; lean_object* x_158; x_145 = lean_ctor_get(x_17, 0); x_146 = lean_ctor_get(x_17, 1); x_147 = lean_ctor_get(x_17, 2); lean_inc(x_147); lean_inc(x_146); lean_inc(x_145); lean_dec(x_17); x_148 = lean_ctor_get(x_18, 0); lean_inc(x_148); if (lean_is_exclusive(x_18)) { lean_ctor_release(x_18, 0); x_149 = x_18; } else { lean_dec_ref(x_18); x_149 = lean_box(0); } x_150 = 0; if (lean_is_scalar(x_149)) { x_151 = lean_alloc_ctor(0, 1, 1); } else { x_151 = x_149; } lean_ctor_set(x_151, 0, x_148); lean_ctor_set_uint8(x_151, sizeof(void*)*1, x_150); x_152 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_152, 0, x_145); lean_ctor_set(x_152, 1, x_146); lean_ctor_set(x_152, 2, x_147); lean_ctor_set(x_152, 3, x_151); x_153 = lean_st_ref_set(x_7, x_152, x_19); x_154 = lean_ctor_get(x_153, 1); lean_inc(x_154); lean_dec(x_153); x_155 = l_Lean_Meta_tryUnificationHints_tryCandidate___closed__3; x_156 = l_Lean_Meta_tryUnificationHints_tryCandidate___closed__4; x_157 = 1; lean_inc(x_7); x_158 = l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4(x_1, x_2, x_3, x_155, x_156, x_157, x_4, x_5, x_6, x_7, x_154); 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; lean_object* x_164; lean_object* x_165; 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; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; x_159 = lean_ctor_get(x_158, 0); lean_inc(x_159); x_160 = lean_ctor_get(x_158, 1); lean_inc(x_160); lean_dec(x_158); x_161 = lean_st_ref_get(x_7, x_160); x_162 = lean_ctor_get(x_161, 1); lean_inc(x_162); lean_dec(x_161); x_163 = lean_st_ref_take(x_7, x_162); x_164 = lean_ctor_get(x_163, 0); lean_inc(x_164); x_165 = lean_ctor_get(x_164, 3); lean_inc(x_165); x_166 = lean_ctor_get(x_163, 1); lean_inc(x_166); lean_dec(x_163); x_167 = lean_ctor_get(x_164, 0); lean_inc(x_167); x_168 = lean_ctor_get(x_164, 1); lean_inc(x_168); x_169 = lean_ctor_get(x_164, 2); lean_inc(x_169); if (lean_is_exclusive(x_164)) { lean_ctor_release(x_164, 0); lean_ctor_release(x_164, 1); lean_ctor_release(x_164, 2); lean_ctor_release(x_164, 3); x_170 = x_164; } else { lean_dec_ref(x_164); x_170 = lean_box(0); } x_171 = lean_ctor_get(x_165, 0); lean_inc(x_171); if (lean_is_exclusive(x_165)) { lean_ctor_release(x_165, 0); x_172 = x_165; } else { lean_dec_ref(x_165); x_172 = lean_box(0); } if (lean_is_scalar(x_172)) { x_173 = lean_alloc_ctor(0, 1, 1); } else { x_173 = x_172; } lean_ctor_set(x_173, 0, x_171); lean_ctor_set_uint8(x_173, sizeof(void*)*1, x_15); if (lean_is_scalar(x_170)) { x_174 = lean_alloc_ctor(0, 4, 0); } else { x_174 = x_170; } lean_ctor_set(x_174, 0, x_167); lean_ctor_set(x_174, 1, x_168); lean_ctor_set(x_174, 2, x_169); lean_ctor_set(x_174, 3, x_173); x_175 = lean_st_ref_set(x_7, x_174, x_166); lean_dec(x_7); x_176 = lean_ctor_get(x_175, 1); lean_inc(x_176); if (lean_is_exclusive(x_175)) { lean_ctor_release(x_175, 0); lean_ctor_release(x_175, 1); x_177 = x_175; } else { lean_dec_ref(x_175); x_177 = lean_box(0); } if (lean_is_scalar(x_177)) { x_178 = lean_alloc_ctor(0, 2, 0); } else { x_178 = x_177; } lean_ctor_set(x_178, 0, x_159); lean_ctor_set(x_178, 1, x_176); return x_178; } else { lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; 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; lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; x_179 = lean_ctor_get(x_158, 0); lean_inc(x_179); x_180 = lean_ctor_get(x_158, 1); lean_inc(x_180); lean_dec(x_158); x_181 = lean_st_ref_get(x_7, x_180); x_182 = lean_ctor_get(x_181, 1); lean_inc(x_182); lean_dec(x_181); x_183 = lean_st_ref_take(x_7, x_182); x_184 = lean_ctor_get(x_183, 0); lean_inc(x_184); x_185 = lean_ctor_get(x_184, 3); lean_inc(x_185); x_186 = lean_ctor_get(x_183, 1); lean_inc(x_186); lean_dec(x_183); x_187 = lean_ctor_get(x_184, 0); lean_inc(x_187); x_188 = lean_ctor_get(x_184, 1); lean_inc(x_188); x_189 = lean_ctor_get(x_184, 2); lean_inc(x_189); if (lean_is_exclusive(x_184)) { lean_ctor_release(x_184, 0); lean_ctor_release(x_184, 1); lean_ctor_release(x_184, 2); lean_ctor_release(x_184, 3); x_190 = x_184; } else { lean_dec_ref(x_184); x_190 = lean_box(0); } x_191 = lean_ctor_get(x_185, 0); lean_inc(x_191); if (lean_is_exclusive(x_185)) { lean_ctor_release(x_185, 0); x_192 = x_185; } else { lean_dec_ref(x_185); x_192 = lean_box(0); } if (lean_is_scalar(x_192)) { x_193 = lean_alloc_ctor(0, 1, 1); } else { x_193 = x_192; } lean_ctor_set(x_193, 0, x_191); lean_ctor_set_uint8(x_193, sizeof(void*)*1, x_15); if (lean_is_scalar(x_190)) { x_194 = lean_alloc_ctor(0, 4, 0); } else { x_194 = x_190; } lean_ctor_set(x_194, 0, x_187); lean_ctor_set(x_194, 1, x_188); lean_ctor_set(x_194, 2, x_189); lean_ctor_set(x_194, 3, x_193); x_195 = lean_st_ref_set(x_7, x_194, x_186); lean_dec(x_7); x_196 = lean_ctor_get(x_195, 1); lean_inc(x_196); if (lean_is_exclusive(x_195)) { lean_ctor_release(x_195, 0); lean_ctor_release(x_195, 1); x_197 = x_195; } else { lean_dec_ref(x_195); x_197 = lean_box(0); } if (lean_is_scalar(x_197)) { x_198 = lean_alloc_ctor(1, 2, 0); } else { x_198 = x_197; lean_ctor_set_tag(x_198, 1); } lean_ctor_set(x_198, 0, x_179); lean_ctor_set(x_198, 1, x_196); return x_198; } } } else { lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; uint8_t x_205; lean_object* x_206; x_199 = lean_ctor_get(x_6, 3); lean_inc(x_199); x_200 = l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_processPostponedStep___spec__6___rarg(x_7, x_10); x_201 = lean_ctor_get(x_200, 0); lean_inc(x_201); x_202 = lean_ctor_get(x_200, 1); lean_inc(x_202); lean_dec(x_200); x_203 = l_Lean_Meta_tryUnificationHints_tryCandidate___closed__3; x_204 = l_Lean_Meta_tryUnificationHints_tryCandidate___closed__4; x_205 = 1; lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); x_206 = l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__5(x_1, x_2, x_3, x_203, x_204, x_205, x_4, x_5, x_6, x_7, x_202); if (lean_obj_tag(x_206) == 0) { lean_object* x_207; lean_object* x_208; lean_object* x_209; uint8_t x_210; x_207 = lean_ctor_get(x_206, 0); lean_inc(x_207); x_208 = lean_ctor_get(x_206, 1); lean_inc(x_208); lean_dec(x_206); x_209 = l___private_Lean_Util_Trace_0__Lean_addNode___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_processPostponedStep___spec__12(x_201, x_204, x_199, x_4, x_5, x_6, x_7, x_208); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_210 = !lean_is_exclusive(x_209); if (x_210 == 0) { lean_object* x_211; x_211 = lean_ctor_get(x_209, 0); lean_dec(x_211); lean_ctor_set(x_209, 0, x_207); return x_209; } else { lean_object* x_212; lean_object* x_213; x_212 = lean_ctor_get(x_209, 1); lean_inc(x_212); lean_dec(x_209); x_213 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_213, 0, x_207); lean_ctor_set(x_213, 1, x_212); return x_213; } } else { lean_object* x_214; lean_object* x_215; lean_object* x_216; uint8_t x_217; x_214 = lean_ctor_get(x_206, 0); lean_inc(x_214); x_215 = lean_ctor_get(x_206, 1); lean_inc(x_215); lean_dec(x_206); x_216 = l___private_Lean_Util_Trace_0__Lean_addNode___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_processPostponedStep___spec__12(x_201, x_204, x_199, x_4, x_5, x_6, x_7, x_215); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_217 = !lean_is_exclusive(x_216); if (x_217 == 0) { lean_object* x_218; x_218 = lean_ctor_get(x_216, 0); lean_dec(x_218); lean_ctor_set_tag(x_216, 1); lean_ctor_set(x_216, 0, x_214); return x_216; } else { lean_object* x_219; lean_object* x_220; x_219 = lean_ctor_get(x_216, 1); lean_inc(x_219); lean_dec(x_216); x_220 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_220, 0, x_214); lean_ctor_set(x_220, 1, x_219); return x_220; } } } } } } lean_object* l_List_mapM___at_Lean_Meta_tryUnificationHints_tryCandidate___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: { lean_object* x_7; x_7 = l_List_mapM___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); return x_7; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__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, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { size_t x_12; size_t x_13; lean_object* x_14; x_12 = lean_unbox_usize(x_4); lean_dec(x_4); x_13 = lean_unbox_usize(x_5); lean_dec(x_5); x_14 = l_Array_forInUnsafe_loop___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__3(x_1, x_2, x_3, x_12, x_13, x_6, x_7, x_8, x_9, x_10, x_11); lean_dec(x_3); return x_14; } } lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___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, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { uint8_t x_11; lean_object* x_12; x_11 = lean_unbox(x_5); lean_dec(x_5); x_12 = l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1(x_1, x_2, x_3, x_4, x_11, x_6, x_7, x_8, x_9, x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); return x_12; } } lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___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, lean_object* x_8, lean_object* x_9) { _start: { lean_object* x_10; x_10 = l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); lean_dec(x_4); lean_dec(x_3); return x_10; } } lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___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, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; x_11 = l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); lean_dec(x_5); return x_11; } } lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___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, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { uint8_t x_12; lean_object* x_13; x_12 = lean_unbox(x_6); lean_dec(x_6); x_13 = l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4(x_1, x_2, x_3, x_4, x_5, x_12, x_7, x_8, x_9, x_10, x_11); lean_dec(x_4); return x_13; } } lean_object* l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___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* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { uint8_t x_12; lean_object* x_13; x_12 = lean_unbox(x_6); lean_dec(x_6); x_13 = l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__5(x_1, x_2, x_3, x_4, x_5, x_12, x_7, x_8, x_9, x_10, x_11); lean_dec(x_4); return x_13; } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_tryUnificationHints___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, size_t x_5, size_t x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { uint8_t x_13; x_13 = x_6 < x_5; if (x_13 == 0) { lean_object* x_14; lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_7); lean_ctor_set(x_14, 1, x_12); return x_14; } else { lean_object* x_15; lean_object* x_16; lean_dec(x_7); x_15 = lean_array_uget(x_4, x_6); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_2); lean_inc(x_1); x_16 = l_Lean_Meta_tryUnificationHints_tryCandidate(x_1, x_2, x_15, x_8, x_9, x_10, x_11, x_12); if (lean_obj_tag(x_16) == 0) { lean_object* x_17; uint8_t x_18; x_17 = lean_ctor_get(x_16, 0); lean_inc(x_17); x_18 = lean_unbox(x_17); lean_dec(x_17); if (x_18 == 0) { lean_object* x_19; size_t x_20; size_t x_21; x_19 = lean_ctor_get(x_16, 1); lean_inc(x_19); lean_dec(x_16); x_20 = 1; x_21 = x_6 + x_20; lean_inc(x_3); { size_t _tmp_5 = x_21; lean_object* _tmp_6 = x_3; lean_object* _tmp_11 = x_19; x_6 = _tmp_5; x_7 = _tmp_6; x_12 = _tmp_11; } goto _start; } else { uint8_t x_23; lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_23 = !lean_is_exclusive(x_16); if (x_23 == 0) { lean_object* x_24; lean_object* x_25; x_24 = lean_ctor_get(x_16, 0); lean_dec(x_24); x_25 = l_Lean_Syntax_instForInTopDownSyntax_loop___at_Lean_Syntax_hasMissing___spec__1___closed__3; lean_ctor_set(x_16, 0, x_25); return x_16; } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; x_26 = lean_ctor_get(x_16, 1); lean_inc(x_26); lean_dec(x_16); x_27 = l_Lean_Syntax_instForInTopDownSyntax_loop___at_Lean_Syntax_hasMissing___spec__1___closed__3; x_28 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_28, 0, x_27); lean_ctor_set(x_28, 1, x_26); return x_28; } } } else { uint8_t x_29; lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_29 = !lean_is_exclusive(x_16); if (x_29 == 0) { return x_16; } else { lean_object* x_30; lean_object* x_31; lean_object* x_32; x_30 = lean_ctor_get(x_16, 0); x_31 = lean_ctor_get(x_16, 1); lean_inc(x_31); lean_inc(x_30); lean_dec(x_16); x_32 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_32, 0, x_30); lean_ctor_set(x_32, 1, x_31); return x_32; } } } } } lean_object* l_Lean_Meta_tryUnificationHints___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_9 = lean_st_ref_get(x_7, x_8); 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_10, 0); lean_inc(x_12); lean_dec(x_10); x_13 = l_Lean_Meta_unificationHintExtension; x_14 = l_Lean_ScopedEnvExtension_getState___at_Lean_Meta_addUnificationHint___spec__2(x_13, x_12); lean_dec(x_12); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_1); x_15 = l_Lean_Meta_DiscrTree_getMatch___rarg(x_14, x_1, x_4, x_5, x_6, x_7, x_11); if (lean_obj_tag(x_15) == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; size_t x_19; size_t x_20; lean_object* x_21; lean_object* x_22; x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); x_17 = lean_ctor_get(x_15, 1); lean_inc(x_17); lean_dec(x_15); x_18 = lean_array_get_size(x_16); x_19 = lean_usize_of_nat(x_18); lean_dec(x_18); x_20 = 0; x_21 = l_Array_findSomeM_x3f___rarg___closed__1; x_22 = l_Array_forInUnsafe_loop___at_Lean_Meta_tryUnificationHints___spec__1(x_1, x_2, x_21, x_16, x_19, x_20, x_21, x_4, x_5, x_6, x_7, x_17); lean_dec(x_16); if (lean_obj_tag(x_22) == 0) { lean_object* x_23; lean_object* x_24; x_23 = lean_ctor_get(x_22, 0); lean_inc(x_23); x_24 = lean_ctor_get(x_23, 0); lean_inc(x_24); lean_dec(x_23); if (lean_obj_tag(x_24) == 0) { uint8_t x_25; x_25 = !lean_is_exclusive(x_22); if (x_25 == 0) { lean_object* x_26; uint8_t x_27; lean_object* x_28; x_26 = lean_ctor_get(x_22, 0); lean_dec(x_26); x_27 = 0; x_28 = lean_box(x_27); lean_ctor_set(x_22, 0, x_28); return x_22; } else { lean_object* x_29; uint8_t x_30; lean_object* x_31; lean_object* x_32; x_29 = lean_ctor_get(x_22, 1); lean_inc(x_29); lean_dec(x_22); x_30 = 0; x_31 = lean_box(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_29); return x_32; } } else { uint8_t x_33; x_33 = !lean_is_exclusive(x_22); if (x_33 == 0) { lean_object* x_34; lean_object* x_35; x_34 = lean_ctor_get(x_22, 0); lean_dec(x_34); x_35 = lean_ctor_get(x_24, 0); lean_inc(x_35); lean_dec(x_24); lean_ctor_set(x_22, 0, x_35); return x_22; } else { lean_object* x_36; lean_object* x_37; lean_object* x_38; x_36 = lean_ctor_get(x_22, 1); lean_inc(x_36); lean_dec(x_22); x_37 = lean_ctor_get(x_24, 0); lean_inc(x_37); lean_dec(x_24); x_38 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_38, 0, x_37); lean_ctor_set(x_38, 1, x_36); return x_38; } } } else { uint8_t x_39; x_39 = !lean_is_exclusive(x_22); if (x_39 == 0) { return x_22; } else { lean_object* x_40; lean_object* x_41; lean_object* x_42; x_40 = lean_ctor_get(x_22, 0); x_41 = lean_ctor_get(x_22, 1); lean_inc(x_41); lean_inc(x_40); lean_dec(x_22); x_42 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_42, 0, x_40); lean_ctor_set(x_42, 1, x_41); return x_42; } } } else { uint8_t x_43; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); x_43 = !lean_is_exclusive(x_15); if (x_43 == 0) { return x_15; } else { lean_object* x_44; lean_object* x_45; lean_object* x_46; x_44 = lean_ctor_get(x_15, 0); x_45 = lean_ctor_get(x_15, 1); lean_inc(x_45); lean_inc(x_44); lean_dec(x_15); 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_object* l_Lean_Meta_tryUnificationHints___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) { _start: { uint8_t x_9; x_9 = l_Lean_Expr_isMVar(x_1); if (x_9 == 0) { lean_object* x_10; lean_object* x_11; x_10 = lean_box(0); x_11 = l_Lean_Meta_tryUnificationHints___lambda__1(x_1, x_2, x_10, x_4, x_5, x_6, x_7, x_8); return x_11; } else { uint8_t x_12; lean_object* x_13; lean_object* x_14; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); x_12 = 0; x_13 = lean_box(x_12); x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_8); return x_14; } } } lean_object* l_Lean_Meta_tryUnificationHints(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { lean_object* x_8; uint8_t x_17; lean_object* x_18; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; x_31 = lean_st_ref_get(x_6, x_7); x_32 = lean_ctor_get(x_31, 0); lean_inc(x_32); x_33 = lean_ctor_get(x_32, 3); lean_inc(x_33); lean_dec(x_32); x_34 = lean_ctor_get_uint8(x_33, sizeof(void*)*1); lean_dec(x_33); if (x_34 == 0) { lean_object* x_35; uint8_t x_36; x_35 = lean_ctor_get(x_31, 1); lean_inc(x_35); lean_dec(x_31); x_36 = 0; x_17 = x_36; x_18 = x_35; goto block_30; } else { lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; uint8_t x_42; x_37 = lean_ctor_get(x_31, 1); lean_inc(x_37); lean_dec(x_31); x_38 = l_Lean_Meta_tryUnificationHints_tryCandidate___closed__4; x_39 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_postponeIsLevelDefEq___spec__2(x_38, x_3, x_4, x_5, x_6, x_37); x_40 = lean_ctor_get(x_39, 0); lean_inc(x_40); x_41 = lean_ctor_get(x_39, 1); lean_inc(x_41); lean_dec(x_39); x_42 = lean_unbox(x_40); lean_dec(x_40); x_17 = x_42; x_18 = x_41; goto block_30; } block_16: { lean_object* x_9; uint8_t x_10; x_9 = lean_ctor_get(x_3, 0); lean_inc(x_9); x_10 = lean_ctor_get_uint8(x_9, 8); lean_dec(x_9); if (x_10 == 0) { uint8_t x_11; lean_object* x_12; lean_object* x_13; 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_11 = 0; x_12 = lean_box(x_11); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_8); return x_13; } else { lean_object* x_14; lean_object* x_15; x_14 = lean_box(0); x_15 = l_Lean_Meta_tryUnificationHints___lambda__2(x_1, x_2, x_14, x_3, x_4, x_5, x_6, x_8); return x_15; } } block_30: { if (x_17 == 0) { x_8 = x_18; goto block_16; } else { lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_inc(x_1); x_19 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_19, 0, x_1); x_20 = l_Lean_KernelException_toMessageData___closed__15; x_21 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_21, 0, x_20); lean_ctor_set(x_21, 1, x_19); x_22 = l___private_Lean_Meta_LevelDefEq_0__Lean_Meta_postponeIsLevelDefEq___closed__5; x_23 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_23, 0, x_21); lean_ctor_set(x_23, 1, x_22); lean_inc(x_2); x_24 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_24, 0, x_2); x_25 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_25, 0, x_23); lean_ctor_set(x_25, 1, x_24); x_26 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_20); x_27 = l_Lean_Meta_tryUnificationHints_tryCandidate___closed__4; x_28 = l_Lean_addTrace___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_postponeIsLevelDefEq___spec__1(x_27, x_26, x_3, x_4, x_5, x_6, x_18); x_29 = lean_ctor_get(x_28, 1); lean_inc(x_29); lean_dec(x_28); x_8 = x_29; goto block_16; } } } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_tryUnificationHints___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { size_t x_13; size_t x_14; lean_object* x_15; x_13 = lean_unbox_usize(x_5); lean_dec(x_5); x_14 = lean_unbox_usize(x_6); lean_dec(x_6); x_15 = l_Array_forInUnsafe_loop___at_Lean_Meta_tryUnificationHints___spec__1(x_1, x_2, x_3, x_4, x_13, x_14, x_7, x_8, x_9, x_10, x_11, x_12); lean_dec(x_4); return x_15; } } lean_object* l_Lean_Meta_tryUnificationHints___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; x_9 = l_Lean_Meta_tryUnificationHints___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); lean_dec(x_3); return x_9; } } lean_object* l_Lean_Meta_tryUnificationHints___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) { _start: { lean_object* x_9; x_9 = l_Lean_Meta_tryUnificationHints___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); lean_dec(x_3); return x_9; } } lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_1653_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = l_Lean_Meta_tryUnificationHints_tryCandidate___closed__4; x_3 = l_Lean_registerTraceClass(x_2, x_1); return x_3; } } lean_object* initialize_Init(lean_object*); lean_object* initialize_Lean_ScopedEnvExtension(lean_object*); lean_object* initialize_Lean_Util_Recognizers(lean_object*); lean_object* initialize_Lean_Meta_DiscrTree(lean_object*); lean_object* initialize_Lean_Meta_LevelDefEq(lean_object*); lean_object* initialize_Lean_Meta_SynthInstance(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Meta_UnificationHint(lean_object* w) { lean_object * res; if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); _G_initialized = true; res = initialize_Init(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_ScopedEnvExtension(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Util_Recognizers(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Meta_DiscrTree(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Meta_LevelDefEq(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Meta_SynthInstance(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_Meta_instInhabitedUnificationHintEntry___closed__1 = _init_l_Lean_Meta_instInhabitedUnificationHintEntry___closed__1(); lean_mark_persistent(l_Lean_Meta_instInhabitedUnificationHintEntry___closed__1); l_Lean_Meta_instInhabitedUnificationHintEntry = _init_l_Lean_Meta_instInhabitedUnificationHintEntry(); lean_mark_persistent(l_Lean_Meta_instInhabitedUnificationHintEntry); l_Lean_Meta_UnificationHints_discrTree___default = _init_l_Lean_Meta_UnificationHints_discrTree___default(); lean_mark_persistent(l_Lean_Meta_UnificationHints_discrTree___default); l_Lean_Meta_instInhabitedUnificationHints = _init_l_Lean_Meta_instInhabitedUnificationHints(); lean_mark_persistent(l_Lean_Meta_instInhabitedUnificationHints); l_Std_PersistentHashMap_foldlMAux___at_Lean_Meta_instToFormatUnificationHints___spec__11___closed__1 = _init_l_Std_PersistentHashMap_foldlMAux___at_Lean_Meta_instToFormatUnificationHints___spec__11___closed__1(); lean_mark_persistent(l_Std_PersistentHashMap_foldlMAux___at_Lean_Meta_instToFormatUnificationHints___spec__11___closed__1); l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__1 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__1(); lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__1); l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__2 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__2(); lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__2); l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__3 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__3(); lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__3); l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__4 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__4(); lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75____closed__4); l_Lean_Meta_unificationHintExtension___closed__1 = _init_l_Lean_Meta_unificationHintExtension___closed__1(); lean_mark_persistent(l_Lean_Meta_unificationHintExtension___closed__1); l_Lean_Meta_unificationHintExtension___closed__2 = _init_l_Lean_Meta_unificationHintExtension___closed__2(); lean_mark_persistent(l_Lean_Meta_unificationHintExtension___closed__2); l_Lean_Meta_unificationHintExtension___closed__3 = _init_l_Lean_Meta_unificationHintExtension___closed__3(); lean_mark_persistent(l_Lean_Meta_unificationHintExtension___closed__3); res = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_75_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; l_Lean_Meta_unificationHintExtension = lean_io_result_get_value(res); lean_mark_persistent(l_Lean_Meta_unificationHintExtension); lean_dec_ref(res); l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint___closed__1 = _init_l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint___closed__1(); lean_mark_persistent(l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint___closed__1); l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint___closed__2 = _init_l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint___closed__2(); lean_mark_persistent(l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decodeConstraint___closed__2); l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode___closed__1 = _init_l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode___closed__1(); lean_mark_persistent(l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode___closed__1); l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode___closed__2 = _init_l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode___closed__2(); lean_mark_persistent(l___private_Lean_Meta_UnificationHint_0__Lean_Meta_decodeUnificationHint_decode___closed__2); l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__1 = _init_l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__1(); lean_mark_persistent(l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__1); l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__2 = _init_l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__2(); lean_mark_persistent(l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__2); l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__3 = _init_l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__3(); lean_mark_persistent(l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__3); l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__4 = _init_l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__4(); lean_mark_persistent(l_List_forM___at___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___spec__1___closed__4); l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___rarg___closed__1 = _init_l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___rarg___closed__1(); lean_mark_persistent(l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___rarg___closed__1); l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___rarg___closed__2 = _init_l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___rarg___closed__2(); lean_mark_persistent(l___private_Lean_Meta_UnificationHint_0__Lean_Meta_validateHint___rarg___closed__2); l_Lean_Meta_addUnificationHint___lambda__1___closed__1 = _init_l_Lean_Meta_addUnificationHint___lambda__1___closed__1(); lean_mark_persistent(l_Lean_Meta_addUnificationHint___lambda__1___closed__1); l_Lean_Meta_addUnificationHint___lambda__1___closed__2 = _init_l_Lean_Meta_addUnificationHint___lambda__1___closed__2(); lean_mark_persistent(l_Lean_Meta_addUnificationHint___lambda__1___closed__2); l_Lean_Meta_addUnificationHint___lambda__1___closed__3 = _init_l_Lean_Meta_addUnificationHint___lambda__1___closed__3(); lean_mark_persistent(l_Lean_Meta_addUnificationHint___lambda__1___closed__3); l_Lean_Meta_addUnificationHint___lambda__1___closed__4 = _init_l_Lean_Meta_addUnificationHint___lambda__1___closed__4(); lean_mark_persistent(l_Lean_Meta_addUnificationHint___lambda__1___closed__4); l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__1 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__1(); lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__1); l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__2 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__2(); lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__2); l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__3 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__3(); lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__3); l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__4 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__4(); lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681____closed__4); res = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_681_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__1 = _init_l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__1(); lean_mark_persistent(l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__1); l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__2 = _init_l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__2(); lean_mark_persistent(l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__2); l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__3 = _init_l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__3(); lean_mark_persistent(l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__3); l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__4 = _init_l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__4(); lean_mark_persistent(l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__1___closed__4); l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__3___closed__1 = _init_l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__3___closed__1(); lean_mark_persistent(l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__3___closed__1); l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__3___closed__2 = _init_l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__3___closed__2(); lean_mark_persistent(l_Lean_Meta_checkpointDefEq___at_Lean_Meta_tryUnificationHints_tryCandidate___spec__4___lambda__3___closed__2); l_Lean_Meta_tryUnificationHints_tryCandidate___closed__1 = _init_l_Lean_Meta_tryUnificationHints_tryCandidate___closed__1(); lean_mark_persistent(l_Lean_Meta_tryUnificationHints_tryCandidate___closed__1); l_Lean_Meta_tryUnificationHints_tryCandidate___closed__2 = _init_l_Lean_Meta_tryUnificationHints_tryCandidate___closed__2(); lean_mark_persistent(l_Lean_Meta_tryUnificationHints_tryCandidate___closed__2); l_Lean_Meta_tryUnificationHints_tryCandidate___closed__3 = _init_l_Lean_Meta_tryUnificationHints_tryCandidate___closed__3(); lean_mark_persistent(l_Lean_Meta_tryUnificationHints_tryCandidate___closed__3); l_Lean_Meta_tryUnificationHints_tryCandidate___closed__4 = _init_l_Lean_Meta_tryUnificationHints_tryCandidate___closed__4(); lean_mark_persistent(l_Lean_Meta_tryUnificationHints_tryCandidate___closed__4); res = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_1653_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus } #endif
ChrisHughes24/lean4
stage0/stdlib/Lean/Server/Snapshots.c
<reponame>ChrisHughes24/lean4 // Lean compiler output // Module: Lean.Server.Snapshots // Imports: Init Init.System.IO Lean.Elab.Import Lean.Elab.Command #include <lean/lean.h> #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wunused-label" #elif defined(__GNUC__) && !defined(__CLANG__) #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif #ifdef __cplusplus extern "C" { #endif lean_object* l_Lean_Server_Snapshots_reparseHeader___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Snapshots_Snapshot_msgLog___boxed(lean_object*); lean_object* l___private_Lean_Server_Snapshots_0__Lean_Server_Snapshots_ioErrorFromEmpty_match__1(lean_object*, uint8_t); lean_object* l_List_head_x21___at_Lean_Elab_Command_instMonadOptionsCommandElabM___spec__1(lean_object*); lean_object* l_Lean_Parser_parseHeader(lean_object*, lean_object*); extern lean_object* l_Array_empty___closed__1; lean_object* lean_st_ref_get(lean_object*, lean_object*); lean_object* l_Lean_Server_Snapshots_parseAhead_go___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_instInhabitedNat; lean_object* l_Lean_Parser_mkInputContext(lean_object*, lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* l_Lean_Server_Snapshots_parseAhead_go(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Snapshots_compileCmdsAfter(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_Snapshots_0__Lean_Server_Snapshots_ioErrorFromEmpty(uint8_t); extern lean_object* l_Lean_Elab_parseImports___closed__1; lean_object* l_Lean_Server_Snapshots_reparseHeader_match__1___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_Snapshots_compileCmdsAfter_match__2(lean_object*); lean_object* l_Lean_Server_Snapshots_compileCmdsAfter_match__1___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_Snapshots_parseAhead(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Snapshots_compileCmdsAfter_match__2___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Command_instInhabitedState___closed__1; lean_object* l_Lean_Server_Snapshots_reparseHeader_match__1(lean_object*); lean_object* l_Lean_Server_Snapshots_reparseHeader(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Snapshots_Snapshot_env___boxed(lean_object*); lean_object* lean_st_mk_ref(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_instInhabitedModuleParserState___closed__1; extern lean_object* l_Lean_firstFrontendMacroScope; lean_object* l_Lean_Elab_Command_elabCommand(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_FileMap_ofString(lean_object*); lean_object* l_Lean_Server_Snapshots_instInhabitedSnapshot; lean_object* l_Lean_Server_Snapshots_Snapshot_endPos___boxed(lean_object*); lean_object* l_IO_mkRef___at_Lean_Server_Snapshots_compileNextCmd___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Server_Snapshots_parseNextCmd(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getPos_x3f(lean_object*, uint8_t); extern lean_object* l_Option_get_x21___rarg___closed__4; lean_object* l_Lean_Parser_parseCommand_parse(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_Snapshots_0__Lean_Server_Snapshots_ioErrorFromEmpty___boxed(lean_object*); lean_object* l_Lean_Elab_logException___at_Lean_Elab_Command_runLinters___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Parser_isExitCommand(lean_object*); lean_object* lean_panic_fn(lean_object*, lean_object*); lean_object* l_Lean_Server_Snapshots_Snapshot_endPos(lean_object*); lean_object* l___private_Lean_Server_Snapshots_0__Lean_Server_Snapshots_ioErrorFromEmpty_match__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Server_Snapshots_Snapshot_msgLog(lean_object*); lean_object* l_Lean_Server_Snapshots_compileCmdsAfter_match__1(lean_object*); uint8_t l_Lean_Parser_isEOI(lean_object*); lean_object* l_Lean_Server_Snapshots_instInhabitedSnapshot___closed__1; lean_object* l_Lean_Server_Snapshots_Snapshot_env(lean_object*); lean_object* l_Lean_Server_Snapshots_compileNextCmd(lean_object*, lean_object*, lean_object*); static lean_object* _init_l_Lean_Server_Snapshots_instInhabitedSnapshot___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = lean_unsigned_to_nat(0u); x_2 = lean_box(0); x_3 = l_Lean_Parser_instInhabitedModuleParserState___closed__1; x_4 = l_Lean_Elab_Command_instInhabitedState___closed__1; x_5 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_5, 0, x_1); lean_ctor_set(x_5, 1, x_2); lean_ctor_set(x_5, 2, x_3); lean_ctor_set(x_5, 3, x_4); return x_5; } } static lean_object* _init_l_Lean_Server_Snapshots_instInhabitedSnapshot() { _start: { lean_object* x_1; x_1 = l_Lean_Server_Snapshots_instInhabitedSnapshot___closed__1; return x_1; } } lean_object* l_Lean_Server_Snapshots_Snapshot_endPos(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = lean_ctor_get(x_1, 2); x_3 = lean_ctor_get(x_2, 0); lean_inc(x_3); return x_3; } } lean_object* l_Lean_Server_Snapshots_Snapshot_endPos___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Server_Snapshots_Snapshot_endPos(x_1); lean_dec(x_1); return x_2; } } lean_object* l_Lean_Server_Snapshots_Snapshot_env(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = lean_ctor_get(x_1, 3); x_3 = lean_ctor_get(x_2, 0); lean_inc(x_3); return x_3; } } lean_object* l_Lean_Server_Snapshots_Snapshot_env___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Server_Snapshots_Snapshot_env(x_1); lean_dec(x_1); return x_2; } } lean_object* l_Lean_Server_Snapshots_Snapshot_msgLog(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = lean_ctor_get(x_1, 3); x_3 = lean_ctor_get(x_2, 1); lean_inc(x_3); return x_3; } } lean_object* l_Lean_Server_Snapshots_Snapshot_msgLog___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Server_Snapshots_Snapshot_msgLog(x_1); lean_dec(x_1); return x_2; } } lean_object* l_Lean_Server_Snapshots_reparseHeader_match__1___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; x_3 = lean_ctor_get(x_1, 1); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 0); lean_inc(x_4); lean_dec(x_1); x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); x_6 = lean_ctor_get(x_3, 1); lean_inc(x_6); lean_dec(x_3); x_7 = lean_apply_3(x_2, x_4, x_5, x_6); return x_7; } } lean_object* l_Lean_Server_Snapshots_reparseHeader_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_Snapshots_reparseHeader_match__1___rarg), 2, 0); return x_2; } } lean_object* l_Lean_Server_Snapshots_reparseHeader(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = l_Lean_Elab_parseImports___closed__1; x_6 = l_Lean_Parser_mkInputContext(x_1, x_5); x_7 = l_Lean_Parser_parseHeader(x_6, x_4); if (lean_obj_tag(x_7) == 0) { lean_object* x_8; lean_object* x_9; uint8_t x_10; x_8 = lean_ctor_get(x_7, 0); lean_inc(x_8); x_9 = lean_ctor_get(x_8, 1); lean_inc(x_9); lean_dec(x_8); x_10 = !lean_is_exclusive(x_7); if (x_10 == 0) { lean_object* x_11; lean_object* x_12; uint8_t x_13; x_11 = lean_ctor_get(x_7, 0); lean_dec(x_11); x_12 = lean_ctor_get(x_9, 0); lean_inc(x_12); lean_dec(x_9); x_13 = !lean_is_exclusive(x_2); if (x_13 == 0) { lean_object* x_14; x_14 = lean_ctor_get(x_2, 2); lean_dec(x_14); lean_ctor_set(x_2, 2, x_12); lean_ctor_set(x_7, 0, x_2); return x_7; } else { lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; x_15 = lean_ctor_get(x_2, 0); x_16 = lean_ctor_get(x_2, 1); x_17 = lean_ctor_get(x_2, 3); lean_inc(x_17); lean_inc(x_16); lean_inc(x_15); lean_dec(x_2); x_18 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_18, 0, x_15); lean_ctor_set(x_18, 1, x_16); lean_ctor_set(x_18, 2, x_12); lean_ctor_set(x_18, 3, x_17); lean_ctor_set(x_7, 0, x_18); return x_7; } } else { lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; x_19 = lean_ctor_get(x_7, 1); lean_inc(x_19); lean_dec(x_7); x_20 = lean_ctor_get(x_9, 0); lean_inc(x_20); lean_dec(x_9); x_21 = lean_ctor_get(x_2, 0); lean_inc(x_21); x_22 = lean_ctor_get(x_2, 1); lean_inc(x_22); x_23 = lean_ctor_get(x_2, 3); lean_inc(x_23); if (lean_is_exclusive(x_2)) { lean_ctor_release(x_2, 0); lean_ctor_release(x_2, 1); lean_ctor_release(x_2, 2); lean_ctor_release(x_2, 3); x_24 = x_2; } else { lean_dec_ref(x_2); x_24 = lean_box(0); } if (lean_is_scalar(x_24)) { x_25 = lean_alloc_ctor(0, 4, 0); } else { x_25 = x_24; } lean_ctor_set(x_25, 0, x_21); lean_ctor_set(x_25, 1, x_22); lean_ctor_set(x_25, 2, x_20); lean_ctor_set(x_25, 3, x_23); x_26 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_19); return x_26; } } else { uint8_t x_27; lean_dec(x_2); x_27 = !lean_is_exclusive(x_7); if (x_27 == 0) { return x_7; } else { lean_object* x_28; lean_object* x_29; lean_object* x_30; x_28 = lean_ctor_get(x_7, 0); x_29 = lean_ctor_get(x_7, 1); lean_inc(x_29); lean_inc(x_28); lean_dec(x_7); x_30 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_30, 0, x_28); lean_ctor_set(x_30, 1, x_29); return x_30; } } } } lean_object* l_Lean_Server_Snapshots_reparseHeader___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_Server_Snapshots_reparseHeader(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } lean_object* l___private_Lean_Server_Snapshots_0__Lean_Server_Snapshots_ioErrorFromEmpty_match__1(lean_object* x_1, uint8_t x_2) { _start: { lean_internal_panic_unreachable(); } } lean_object* l___private_Lean_Server_Snapshots_0__Lean_Server_Snapshots_ioErrorFromEmpty_match__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = lean_unbox(x_2); lean_dec(x_2); x_4 = l___private_Lean_Server_Snapshots_0__Lean_Server_Snapshots_ioErrorFromEmpty_match__1(x_1, x_3); return x_4; } } lean_object* l___private_Lean_Server_Snapshots_0__Lean_Server_Snapshots_ioErrorFromEmpty(uint8_t x_1) { _start: { lean_internal_panic_unreachable(); } } lean_object* l___private_Lean_Server_Snapshots_0__Lean_Server_Snapshots_ioErrorFromEmpty___boxed(lean_object* x_1) { _start: { uint8_t x_2; lean_object* x_3; x_2 = lean_unbox(x_1); lean_dec(x_1); x_3 = l___private_Lean_Server_Snapshots_0__Lean_Server_Snapshots_ioErrorFromEmpty(x_2); return x_3; } } lean_object* l_Lean_Server_Snapshots_parseNextCmd(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; x_4 = l_Lean_Elab_parseImports___closed__1; x_5 = l_Lean_Parser_mkInputContext(x_1, x_4); x_6 = lean_ctor_get(x_2, 3); lean_inc(x_6); x_7 = lean_ctor_get(x_6, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_6, 2); lean_inc(x_8); lean_dec(x_6); x_9 = l_List_head_x21___at_Lean_Elab_Command_instMonadOptionsCommandElabM___spec__1(x_8); lean_dec(x_8); x_10 = lean_ctor_get(x_9, 1); lean_inc(x_10); x_11 = lean_ctor_get(x_9, 2); lean_inc(x_11); x_12 = lean_ctor_get(x_9, 3); lean_inc(x_12); lean_dec(x_9); x_13 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_13, 0, x_7); lean_ctor_set(x_13, 1, x_10); lean_ctor_set(x_13, 2, x_11); lean_ctor_set(x_13, 3, x_12); x_14 = lean_ctor_get(x_2, 2); lean_inc(x_14); x_15 = l_Lean_Server_Snapshots_Snapshot_msgLog(x_2); lean_dec(x_2); x_16 = l_Lean_Parser_parseCommand_parse(x_5, x_13, x_14, x_15); x_17 = lean_ctor_get(x_16, 0); lean_inc(x_17); lean_dec(x_16); x_18 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_3); return x_18; } } lean_object* l_Lean_Server_Snapshots_parseAhead_go(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; x_7 = l_Lean_Server_Snapshots_Snapshot_msgLog(x_1); lean_inc(x_3); lean_inc(x_2); x_8 = l_Lean_Parser_parseCommand_parse(x_2, x_3, x_4, x_7); x_9 = lean_ctor_get(x_8, 1); lean_inc(x_9); x_10 = lean_ctor_get(x_8, 0); lean_inc(x_10); lean_dec(x_8); x_11 = lean_ctor_get(x_9, 0); lean_inc(x_11); lean_dec(x_9); lean_inc(x_10); x_12 = l_Lean_Parser_isEOI(x_10); if (x_12 == 0) { uint8_t x_13; lean_inc(x_10); x_13 = l_Lean_Parser_isExitCommand(x_10); if (x_13 == 0) { lean_object* x_14; x_14 = lean_array_push(x_5, x_10); x_4 = x_11; x_5 = x_14; goto _start; } else { lean_object* x_16; lean_object* x_17; lean_dec(x_11); lean_dec(x_3); lean_dec(x_2); x_16 = lean_array_push(x_5, x_10); x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_6); return x_17; } } else { lean_object* x_18; lean_object* x_19; lean_dec(x_11); lean_dec(x_3); lean_dec(x_2); x_18 = lean_array_push(x_5, x_10); x_19 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_6); return x_19; } } } lean_object* l_Lean_Server_Snapshots_parseAhead_go___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_Snapshots_parseAhead_go(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_1); return x_7; } } lean_object* l_Lean_Server_Snapshots_parseAhead(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_4 = l_Lean_Elab_parseImports___closed__1; x_5 = l_Lean_Parser_mkInputContext(x_1, x_4); x_6 = lean_ctor_get(x_2, 3); lean_inc(x_6); x_7 = lean_ctor_get(x_6, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_6, 2); lean_inc(x_8); lean_dec(x_6); x_9 = l_List_head_x21___at_Lean_Elab_Command_instMonadOptionsCommandElabM___spec__1(x_8); lean_dec(x_8); x_10 = lean_ctor_get(x_9, 1); lean_inc(x_10); x_11 = lean_ctor_get(x_9, 2); lean_inc(x_11); x_12 = lean_ctor_get(x_9, 3); lean_inc(x_12); lean_dec(x_9); x_13 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_13, 0, x_7); lean_ctor_set(x_13, 1, x_10); lean_ctor_set(x_13, 2, x_11); lean_ctor_set(x_13, 3, x_12); x_14 = lean_ctor_get(x_2, 2); lean_inc(x_14); x_15 = l_Array_empty___closed__1; x_16 = l_Lean_Server_Snapshots_parseAhead_go(x_2, x_5, x_13, x_14, x_15, x_3); lean_dec(x_2); return x_16; } } lean_object* l_IO_mkRef___at_Lean_Server_Snapshots_compileNextCmd___spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; uint8_t x_4; x_3 = lean_st_mk_ref(x_1, x_2); x_4 = !lean_is_exclusive(x_3); if (x_4 == 0) { return x_3; } else { lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_ctor_get(x_3, 0); x_6 = lean_ctor_get(x_3, 1); lean_inc(x_6); lean_inc(x_5); lean_dec(x_3); x_7 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_7, 0, x_5); lean_ctor_set(x_7, 1, x_6); return x_7; } } } lean_object* l_Lean_Server_Snapshots_compileNextCmd(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; lean_object* x_29; uint8_t x_30; lean_object* x_31; x_4 = l_Lean_Elab_parseImports___closed__1; lean_inc(x_1); x_5 = l_Lean_Parser_mkInputContext(x_1, x_4); x_6 = lean_ctor_get(x_2, 3); lean_inc(x_6); x_7 = lean_ctor_get(x_6, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_6, 2); lean_inc(x_8); x_9 = lean_ctor_get(x_6, 3); lean_inc(x_9); x_10 = lean_ctor_get(x_6, 4); lean_inc(x_10); x_11 = lean_ctor_get(x_6, 5); lean_inc(x_11); x_12 = lean_ctor_get(x_6, 6); lean_inc(x_12); x_13 = lean_ctor_get(x_6, 7); lean_inc(x_13); x_14 = lean_ctor_get(x_6, 8); lean_inc(x_14); if (lean_is_exclusive(x_6)) { lean_ctor_release(x_6, 0); lean_ctor_release(x_6, 1); lean_ctor_release(x_6, 2); lean_ctor_release(x_6, 3); lean_ctor_release(x_6, 4); lean_ctor_release(x_6, 5); lean_ctor_release(x_6, 6); lean_ctor_release(x_6, 7); lean_ctor_release(x_6, 8); x_15 = x_6; } else { lean_dec_ref(x_6); x_15 = lean_box(0); } x_16 = l_List_head_x21___at_Lean_Elab_Command_instMonadOptionsCommandElabM___spec__1(x_8); x_17 = lean_ctor_get(x_16, 1); lean_inc(x_17); x_18 = lean_ctor_get(x_16, 2); lean_inc(x_18); x_19 = lean_ctor_get(x_16, 3); lean_inc(x_19); lean_dec(x_16); lean_inc(x_7); x_20 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_20, 0, x_7); lean_ctor_set(x_20, 1, x_17); lean_ctor_set(x_20, 2, x_18); lean_ctor_set(x_20, 3, x_19); x_21 = lean_ctor_get(x_2, 2); lean_inc(x_21); x_22 = l_Lean_Server_Snapshots_Snapshot_msgLog(x_2); x_23 = l_Lean_Parser_parseCommand_parse(x_5, x_20, x_21, x_22); x_24 = lean_ctor_get(x_23, 1); lean_inc(x_24); x_25 = lean_ctor_get(x_23, 0); lean_inc(x_25); lean_dec(x_23); x_26 = lean_ctor_get(x_24, 0); lean_inc(x_26); x_27 = lean_ctor_get(x_24, 1); lean_inc(x_27); lean_dec(x_24); x_28 = 0; x_29 = l_Lean_Syntax_getPos_x3f(x_25, x_28); lean_inc(x_25); x_30 = l_Lean_Parser_isEOI(x_25); if (lean_obj_tag(x_29) == 0) { lean_object* x_67; lean_object* x_68; lean_object* x_69; x_67 = l_instInhabitedNat; x_68 = l_Option_get_x21___rarg___closed__4; x_69 = lean_panic_fn(x_67, x_68); x_31 = x_69; goto block_66; } else { lean_object* x_70; x_70 = lean_ctor_get(x_29, 0); lean_inc(x_70); lean_dec(x_29); x_31 = x_70; goto block_66; } block_66: { if (x_30 == 0) { uint8_t x_32; lean_inc(x_25); x_32 = l_Lean_Parser_isExitCommand(x_25); if (x_32 == 0) { lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; if (lean_is_scalar(x_15)) { x_33 = lean_alloc_ctor(0, 9, 0); } else { x_33 = x_15; } lean_ctor_set(x_33, 0, x_7); lean_ctor_set(x_33, 1, x_27); lean_ctor_set(x_33, 2, x_8); lean_ctor_set(x_33, 3, x_9); lean_ctor_set(x_33, 4, x_10); lean_ctor_set(x_33, 5, x_11); lean_ctor_set(x_33, 6, x_12); lean_ctor_set(x_33, 7, x_13); lean_ctor_set(x_33, 8, x_14); x_34 = l_IO_mkRef___at_Lean_Server_Snapshots_compileNextCmd___spec__1(x_33, x_3); x_35 = lean_ctor_get(x_34, 0); lean_inc(x_35); x_36 = lean_ctor_get(x_34, 1); lean_inc(x_36); lean_dec(x_34); x_49 = l_Lean_FileMap_ofString(x_1); x_50 = l_Lean_Server_Snapshots_Snapshot_endPos(x_2); lean_dec(x_2); x_51 = lean_box(0); x_52 = lean_unsigned_to_nat(0u); x_53 = l_Lean_firstFrontendMacroScope; x_54 = lean_box(0); x_55 = lean_alloc_ctor(0, 7, 0); lean_ctor_set(x_55, 0, x_4); lean_ctor_set(x_55, 1, x_49); lean_ctor_set(x_55, 2, x_52); lean_ctor_set(x_55, 3, x_50); lean_ctor_set(x_55, 4, x_51); lean_ctor_set(x_55, 5, x_53); lean_ctor_set(x_55, 6, x_54); lean_inc(x_35); lean_inc(x_25); x_56 = l_Lean_Elab_Command_elabCommand(x_25, x_55, x_35, x_36); if (lean_obj_tag(x_56) == 0) { lean_object* x_57; lean_dec(x_55); x_57 = lean_ctor_get(x_56, 1); lean_inc(x_57); lean_dec(x_56); x_37 = x_57; goto block_48; } else { lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; x_58 = lean_ctor_get(x_56, 0); lean_inc(x_58); x_59 = lean_ctor_get(x_56, 1); lean_inc(x_59); lean_dec(x_56); x_60 = l_Lean_Elab_logException___at_Lean_Elab_Command_runLinters___spec__1(x_58, x_55, x_35, x_59); lean_dec(x_55); x_61 = lean_ctor_get(x_60, 1); lean_inc(x_61); lean_dec(x_60); x_37 = x_61; goto block_48; } block_48: { lean_object* x_38; uint8_t x_39; x_38 = lean_st_ref_get(x_35, x_37); lean_dec(x_35); x_39 = !lean_is_exclusive(x_38); if (x_39 == 0) { lean_object* x_40; lean_object* x_41; lean_object* x_42; x_40 = lean_ctor_get(x_38, 0); x_41 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_41, 0, x_31); lean_ctor_set(x_41, 1, x_25); lean_ctor_set(x_41, 2, x_26); lean_ctor_set(x_41, 3, x_40); x_42 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_42, 0, x_41); lean_ctor_set(x_38, 0, x_42); return x_38; } else { lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; x_43 = lean_ctor_get(x_38, 0); x_44 = lean_ctor_get(x_38, 1); lean_inc(x_44); lean_inc(x_43); lean_dec(x_38); x_45 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_45, 0, x_31); lean_ctor_set(x_45, 1, x_25); lean_ctor_set(x_45, 2, x_26); lean_ctor_set(x_45, 3, x_43); x_46 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_46, 0, x_45); x_47 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_47, 0, x_46); lean_ctor_set(x_47, 1, x_44); return x_47; } } } else { lean_object* x_62; lean_object* x_63; lean_dec(x_31); lean_dec(x_26); lean_dec(x_25); lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_2); lean_dec(x_1); x_62 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_62, 0, x_27); x_63 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_63, 0, x_62); lean_ctor_set(x_63, 1, x_3); return x_63; } } else { lean_object* x_64; lean_object* x_65; lean_dec(x_31); lean_dec(x_26); lean_dec(x_25); lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_2); lean_dec(x_1); x_64 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_64, 0, x_27); x_65 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_65, 0, x_64); lean_ctor_set(x_65, 1, x_3); return x_65; } } } } lean_object* l_Lean_Server_Snapshots_compileCmdsAfter_match__1___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_2(x_2, x_3, x_4); return x_5; } } lean_object* l_Lean_Server_Snapshots_compileCmdsAfter_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_Snapshots_compileCmdsAfter_match__1___rarg), 2, 0); return x_2; } } lean_object* l_Lean_Server_Snapshots_compileCmdsAfter_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); lean_dec(x_1); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_apply_1(x_3, x_6); return x_7; } } } lean_object* l_Lean_Server_Snapshots_compileCmdsAfter_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Server_Snapshots_compileCmdsAfter_match__2___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Server_Snapshots_compileCmdsAfter(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_Snapshots_compileNextCmd(x_1, x_2, x_3); x_5 = lean_ctor_get(x_4, 0); lean_inc(x_5); if (lean_obj_tag(x_5) == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; x_6 = lean_ctor_get(x_4, 1); lean_inc(x_6); lean_dec(x_4); x_7 = lean_ctor_get(x_5, 0); lean_inc(x_7); lean_dec(x_5); lean_inc(x_7); x_8 = l_Lean_Server_Snapshots_compileCmdsAfter(x_1, x_7, x_6); x_9 = !lean_is_exclusive(x_8); if (x_9 == 0) { lean_object* x_10; uint8_t x_11; x_10 = lean_ctor_get(x_8, 0); x_11 = !lean_is_exclusive(x_10); if (x_11 == 0) { lean_object* x_12; lean_object* x_13; x_12 = lean_ctor_get(x_10, 0); x_13 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_13, 0, x_7); lean_ctor_set(x_13, 1, x_12); lean_ctor_set(x_10, 0, x_13); return x_8; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; x_14 = lean_ctor_get(x_10, 0); x_15 = lean_ctor_get(x_10, 1); lean_inc(x_15); lean_inc(x_14); lean_dec(x_10); x_16 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_16, 0, x_7); lean_ctor_set(x_16, 1, x_14); x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_15); lean_ctor_set(x_8, 0, x_17); return x_8; } } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_18 = lean_ctor_get(x_8, 0); x_19 = lean_ctor_get(x_8, 1); lean_inc(x_19); lean_inc(x_18); lean_dec(x_8); x_20 = lean_ctor_get(x_18, 0); lean_inc(x_20); x_21 = lean_ctor_get(x_18, 1); lean_inc(x_21); if (lean_is_exclusive(x_18)) { lean_ctor_release(x_18, 0); lean_ctor_release(x_18, 1); x_22 = x_18; } else { lean_dec_ref(x_18); x_22 = lean_box(0); } x_23 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_23, 0, x_7); lean_ctor_set(x_23, 1, x_20); if (lean_is_scalar(x_22)) { x_24 = lean_alloc_ctor(0, 2, 0); } else { x_24 = x_22; } lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_21); x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_19); return x_25; } } else { uint8_t x_26; lean_dec(x_1); x_26 = !lean_is_exclusive(x_4); if (x_26 == 0) { lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; x_27 = lean_ctor_get(x_4, 0); lean_dec(x_27); x_28 = lean_ctor_get(x_5, 0); lean_inc(x_28); lean_dec(x_5); x_29 = lean_box(0); x_30 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_30, 0, x_29); lean_ctor_set(x_30, 1, x_28); lean_ctor_set(x_4, 0, x_30); return x_4; } else { lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; x_31 = lean_ctor_get(x_4, 1); lean_inc(x_31); lean_dec(x_4); x_32 = lean_ctor_get(x_5, 0); lean_inc(x_32); lean_dec(x_5); x_33 = lean_box(0); x_34 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_34, 0, x_33); lean_ctor_set(x_34, 1, x_32); x_35 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_35, 0, x_34); lean_ctor_set(x_35, 1, x_31); return x_35; } } } } lean_object* initialize_Init(lean_object*); lean_object* initialize_Init_System_IO(lean_object*); lean_object* initialize_Lean_Elab_Import(lean_object*); lean_object* initialize_Lean_Elab_Command(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Server_Snapshots(lean_object* w) { lean_object * res; if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); _G_initialized = true; res = initialize_Init(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Init_System_IO(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Elab_Import(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Elab_Command(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_Server_Snapshots_instInhabitedSnapshot___closed__1 = _init_l_Lean_Server_Snapshots_instInhabitedSnapshot___closed__1(); lean_mark_persistent(l_Lean_Server_Snapshots_instInhabitedSnapshot___closed__1); l_Lean_Server_Snapshots_instInhabitedSnapshot = _init_l_Lean_Server_Snapshots_instInhabitedSnapshot(); lean_mark_persistent(l_Lean_Server_Snapshots_instInhabitedSnapshot); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus } #endif
ChrisHughes24/lean4
stage0/stdlib/Lean/Data/Lsp/Diagnostics.c
<filename>stage0/stdlib/Lean/Data/Lsp/Diagnostics.c // Lean compiler output // Module: Lean.Data.Lsp.Diagnostics // Imports: Init Lean.Data.Json Lean.Data.Lsp.Basic Lean.Data.Lsp.Utf16 Lean.Message #include <lean/lean.h> #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wunused-label" #elif defined(__GNUC__) && !defined(__CLANG__) #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif #ifdef __cplusplus extern "C" { #endif lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__1(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instBEqDiagnostic___closed__1; lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__2; lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__4(size_t, size_t, lean_object*); extern lean_object* l_Lean_instFromJsonOption___rarg___closed__1; uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026____spec__1(lean_object*, lean_object*); size_t l_USize_add(size_t, size_t); lean_object* l_Lean_Lsp_instToJsonDiagnosticCode___boxed(lean_object*); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_473_(lean_object*); lean_object* l_Lean_Lsp_msgToDiagnostic_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_Diagnostic_source_x3f___default; lean_object* l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__7; lean_object* l_Lean_Lsp_instFromJsonDiagnosticSeverity___boxed(lean_object*); lean_object* l_Lean_Lsp_instFromJsonDiagnostic___closed__1; lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_577_(lean_object*); lean_object* l_Lean_Lsp_instFromJsonDiagnosticTag_match__1(lean_object*); lean_object* l_Lean_Lsp_msgToDiagnostic_match__2(lean_object*); uint8_t l_Lean_Lsp_instInhabitedDiagnosticTag; lean_object* l_Lean_Lsp_instFromJsonDiagnosticCode___boxed(lean_object*); lean_object* l_Lean_Lsp_instBEqDiagnosticTag; lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticCode____x40_Lean_Data_Lsp_Diagnostics___hyg_155____boxed(lean_object*, lean_object*); lean_object* l_Lean_Lsp_Diagnostic_relatedInformation_x3f___default; lean_object* lean_array_uget(lean_object*, size_t); lean_object* l_Lean_Lsp_instFromJsonDiagnosticCode(lean_object*); uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__3(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____boxed(lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__2(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__3; lean_object* l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__1___boxed(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__1; lean_object* l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__4; uint8_t l_Array_isEqvAux___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_getNat_x3f(lean_object*); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139_(lean_object*); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857_(lean_object*); lean_object* l_Lean_Lsp_instInhabitedDiagnosticRelatedInformation; lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticSeverity____x40_Lean_Data_Lsp_Diagnostics___hyg_13__match__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Lsp_instInhabitedRange___closed__1; extern lean_object* l_Array_empty___closed__1; lean_object* l_Lean_Lsp_instBEqDiagnosticCode; lean_object* l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__3; lean_object* l_Lean_Lsp_instToJsonDiagnosticTag___closed__4; extern lean_object* l_Lean_instInhabitedParserDescr___closed__1; lean_object* l_Lean_Lsp_instInhabitedDiagnosticRelatedInformation___closed__1; uint8_t l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_412_(lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__6(size_t, size_t, lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnostic; lean_object* l_Lean_Lsp_msgToDiagnostic_match__1(lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__6___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticCode(lean_object*); uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__4(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticCode____x40_Lean_Data_Lsp_Diagnostics___hyg_155__match__1(lean_object*); lean_object* l_Lean_Lsp_instInhabitedDiagnosticCode; lean_object* l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__2; lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_412____boxed(lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1(lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_507____spec__1___boxed(lean_object*, lean_object*); lean_object* l_List_join___rarg(lean_object*); uint8_t l_USize_decLt(size_t, size_t); lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonDocumentFilter____x40_Lean_Data_Lsp_Basic___hyg_1611____spec__1(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticTag____x40_Lean_Data_Lsp_Diagnostics___hyg_293__match__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026__match__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__10; lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_611_(lean_object*); lean_object* l_Lean_Lsp_instFromJsonDiagnosticSeverity(lean_object*); extern lean_object* l_Int_Int_pow___closed__1; lean_object* l_Lean_Lsp_instFromJsonDiagnosticRelatedInformation; extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__10; lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__5(lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__6___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonVersionedTextDocumentIdentifier____x40_Lean_Data_Lsp_Basic___hyg_1148____closed__1; lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____spec__3___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026__match__1(lean_object*); lean_object* l_Lean_Lsp_PublishDiagnosticsParams_version_x3f___default; lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649__match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__2(lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* l_Lean_Lsp_msgToDiagnostic___closed__2; uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_MessageData_toString(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instBEqDiagnostic; lean_object* l_Lean_Lsp_instToJsonDiagnosticRelatedInformation; lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticSeverity____x40_Lean_Data_Lsp_Diagnostics___hyg_13__match__1(lean_object*); lean_object* l_Lean_Lsp_msgToDiagnostic___closed__1; lean_object* l_Lean_Lsp_msgToDiagnostic___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__4___closed__1; lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__4___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instFromJsonDiagnosticCode_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonPublishDiagnosticsParams___closed__1; lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__4; extern lean_object* l_Lean_Parser_Tactic_location___closed__1; lean_object* l_Array_isEqvAux___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticTag_match__1(lean_object*); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649__match__1(lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__4___closed__2; lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticTag____x40_Lean_Data_Lsp_Diagnostics___hyg_293__match__1(lean_object*); lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101____spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Json_getInt_x3f(lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticRelatedInformation___closed__1; lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__5(lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonDocumentFilter____x40_Lean_Data_Lsp_Basic___hyg_1639____spec__1(lean_object*, lean_object*); extern lean_object* l___private_Init_Data_Repr_0__reprSourceInfo____x40_Init_Data_Repr___hyg_1438____closed__4; lean_object* l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__2___boxed(lean_object*, lean_object*); uint8_t l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_beqRange____x40_Lean_Data_Lsp_Basic___hyg_348_(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649__match__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instBEqDiagnosticRelatedInformation; lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticSeverity____x40_Lean_Data_Lsp_Diagnostics___hyg_13____boxed(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instInhabitedPublishDiagnosticsParams; lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticTag____x40_Lean_Data_Lsp_Diagnostics___hyg_293__match__1___rarg(uint8_t, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticCode_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticSeverity_match__1(lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticSeverity_match__1___rarg(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026____boxed(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instFromJsonPublishDiagnosticsParams___closed__1; lean_object* l_Lean_Lsp_instToJsonDiagnostic___closed__1; lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101____closed__1; lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026__match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_507_(lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__3; lean_object* l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__9; lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101_(lean_object*); lean_object* l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__4___boxed(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticTag(uint8_t); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticSeverity____x40_Lean_Data_Lsp_Diagnostics___hyg_13__match__1___rarg(uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__6(size_t, size_t, lean_object*); uint8_t l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649_(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instBEqDiagnosticTag___closed__1; lean_object* l_Lean_Lsp_msgToDiagnostic_match__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instInhabitedDiagnostic___closed__1; uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__2(lean_object*, lean_object*); size_t lean_usize_of_nat(lean_object*); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794_(lean_object*); lean_object* l_Lean_Lsp_Diagnostic_tags_x3f___default; lean_object* l_Lean_Lsp_instFromJsonDiagnosticTag___boxed(lean_object*); lean_object* l_Lean_Lsp_msgToDiagnostic_match__2___rarg(uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__3___boxed(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__5; lean_object* l_Lean_Lsp_instBEqDiagnosticSeverity___closed__1; uint8_t l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_beqLocation____x40_Lean_Data_Lsp_Basic___hyg_516_(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instFromJsonDiagnosticTag___closed__1; lean_object* l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__3___boxed(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__3; lean_object* l_Lean_Lsp_instToJsonPublishDiagnosticsParams; lean_object* l_Lean_Lsp_instFromJsonDiagnostic; lean_object* l_Lean_Lsp_instFromJsonDiagnosticRelatedInformation___closed__1; lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__1; lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_507____boxed(lean_object*); lean_object* l_Lean_Lsp_instInhabitedDiagnostic; lean_object* l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__1; lean_object* l_Lean_Lsp_Diagnostic_fullRange___default(lean_object*); uint8_t l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticCode____x40_Lean_Data_Lsp_Diagnostics___hyg_155_(lean_object*, lean_object*); lean_object* l_Lean_JsonNumber_fromNat(lean_object*); lean_object* l_Lean_Json_getObjValD(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticTag_match__1___rarg(uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Lsp_msgToDiagnostic(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__5___boxed(lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticSeverity_match__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__12; uint8_t l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticSeverity____x40_Lean_Data_Lsp_Diagnostics___hyg_13_(uint8_t, uint8_t); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__2; lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101____spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instFromJsonPublishDiagnosticsParams; lean_object* l_Lean_Lsp_Diagnostic_fullRange___default___boxed(lean_object*); lean_object* l_Lean_Lsp_instFromJsonDiagnosticTag___closed__2; lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____boxed(lean_object*); lean_object* l_Lean_Lsp_instFromJsonDiagnosticCode_match__1(lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__4; lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____spec__2(lean_object*, lean_object*); uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__1(lean_object*, lean_object*); lean_object* l_Array_isEqvAux___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instBEqDiagnosticSeverity; lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__4(size_t, size_t, lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticSeverity(uint8_t); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__4___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Int_instInhabitedInt___closed__1; uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__6(lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__2___boxed(lean_object*, lean_object*); uint8_t l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticTag____x40_Lean_Data_Lsp_Diagnostics___hyg_293_(uint8_t, uint8_t); lean_object* l_Lean_Json_mkObj(lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__2; extern lean_object* l_Lean_Lsp_instInhabitedLocation___closed__1; lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_412__match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticTag_match__1___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____spec__1(lean_object*, lean_object*); lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101____spec__1(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticTag___closed__3; extern lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_577____closed__1; lean_object* l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__6; lean_object* l_Array_isEqvAux___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026____spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_isEqvAux___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__4___closed__2; lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__4; lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticCode____x40_Lean_Data_Lsp_Diagnostics___hyg_155__match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_577____closed__2; lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instBEqDiagnosticRelatedInformation___closed__1; lean_object* l_Lean_Lsp_instFromJsonDiagnosticTag_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__8; lean_object* l_Lean_Lsp_instToJsonDiagnosticCode_match__1(lean_object*); lean_object* l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026____spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__1; lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_611____spec__2(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instBEqDiagnosticCode___closed__1; lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_412__match__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instInhabitedDiagnosticCode___closed__1; lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____boxed(lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__4___closed__1; lean_object* l_Lean_Lsp_instFromJsonDiagnosticTag(lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticSeverity___boxed(lean_object*); lean_object* l_Lean_Lsp_instBEqPublishDiagnosticsParams___closed__1; lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____spec__1___boxed(lean_object*, lean_object*); uint8_t l_Array_isEqvAux___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026____spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonRange____x40_Lean_Data_Lsp_Basic___hyg_409_(lean_object*); lean_object* l_Lean_FileMap_leanPosToLspPos(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_412__match__1(lean_object*); lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_Diagnostic_code_x3f___default; lean_object* l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__5; lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_507____spec__1(lean_object*, lean_object*); lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__2___boxed(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticTag____x40_Lean_Data_Lsp_Diagnostics___hyg_293____boxed(lean_object*, lean_object*); lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__3(lean_object*, lean_object*); uint8_t lean_int_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticTag___closed__2; uint8_t l_Lean_Lsp_instInhabitedDiagnosticSeverity; lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__3(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonDiagnosticTag___boxed(lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_611____spec__1(lean_object*, lean_object*); lean_object* l_Lean_Lsp_Diagnostic_severity_x3f___default; lean_object* lean_nat_to_int(lean_object*); lean_object* l_Lean_Lsp_instBEqPublishDiagnosticsParams; lean_object* l_Lean_Lsp_instToJsonDiagnosticTag___closed__1; lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101____spec__2(size_t, size_t, lean_object*); lean_object* l_Lean_Lsp_instFromJsonDiagnosticSeverity_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instFromJsonDiagnosticSeverity_match__1(lean_object*); lean_object* l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__6___boxed(lean_object*, lean_object*); uint8_t l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026_(lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____spec__3(size_t, size_t, lean_object*); uint8_t lean_string_dec_eq(lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instInhabitedPublishDiagnosticsParams___closed__1; lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_JsonRpc_instFromJsonMessage___spec__2(lean_object*, lean_object*); static uint8_t _init_l_Lean_Lsp_instInhabitedDiagnosticSeverity() { _start: { uint8_t x_1; x_1 = 0; return x_1; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticSeverity____x40_Lean_Data_Lsp_Diagnostics___hyg_13__match__1___rarg(uint8_t x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { switch (x_1) { case 0: { lean_object* x_8; lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_8 = lean_box(x_2); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; lean_object* x_10; lean_dec(x_7); x_9 = lean_box(0); x_10 = lean_apply_1(x_3, x_9); return x_10; } else { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_dec(x_8); lean_dec(x_3); x_11 = lean_box(x_1); x_12 = lean_box(x_2); x_13 = lean_apply_2(x_7, x_11, x_12); return x_13; } } case 1: { lean_object* x_14; lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); x_14 = lean_box(x_2); if (lean_obj_tag(x_14) == 1) { lean_object* x_15; lean_object* x_16; lean_dec(x_7); x_15 = lean_box(0); x_16 = lean_apply_1(x_4, x_15); return x_16; } else { lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_dec(x_14); lean_dec(x_4); x_17 = lean_box(x_1); x_18 = lean_box(x_2); x_19 = lean_apply_2(x_7, x_17, x_18); return x_19; } } case 2: { lean_object* x_20; lean_dec(x_6); lean_dec(x_4); lean_dec(x_3); x_20 = lean_box(x_2); if (lean_obj_tag(x_20) == 2) { lean_object* x_21; lean_object* x_22; lean_dec(x_7); x_21 = lean_box(0); x_22 = lean_apply_1(x_5, x_21); return x_22; } else { lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_dec(x_20); lean_dec(x_5); x_23 = lean_box(x_1); x_24 = lean_box(x_2); x_25 = lean_apply_2(x_7, x_23, x_24); return x_25; } } default: { lean_object* x_26; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_26 = lean_box(x_2); if (lean_obj_tag(x_26) == 3) { lean_object* x_27; lean_object* x_28; lean_dec(x_7); x_27 = lean_box(0); x_28 = lean_apply_1(x_6, x_27); return x_28; } else { lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_dec(x_26); lean_dec(x_6); x_29 = lean_box(x_1); x_30 = lean_box(x_2); x_31 = lean_apply_2(x_7, x_29, x_30); return x_31; } } } } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticSeverity____x40_Lean_Data_Lsp_Diagnostics___hyg_13__match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticSeverity____x40_Lean_Data_Lsp_Diagnostics___hyg_13__match__1___rarg___boxed), 7, 0); return x_2; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticSeverity____x40_Lean_Data_Lsp_Diagnostics___hyg_13__match__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { uint8_t x_8; uint8_t x_9; lean_object* x_10; x_8 = lean_unbox(x_1); lean_dec(x_1); x_9 = lean_unbox(x_2); lean_dec(x_2); x_10 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticSeverity____x40_Lean_Data_Lsp_Diagnostics___hyg_13__match__1___rarg(x_8, x_9, x_3, x_4, x_5, x_6, x_7); return x_10; } } uint8_t l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticSeverity____x40_Lean_Data_Lsp_Diagnostics___hyg_13_(uint8_t x_1, uint8_t x_2) { _start: { switch (x_1) { case 0: { lean_object* x_3; x_3 = lean_box(x_2); if (lean_obj_tag(x_3) == 0) { uint8_t x_4; x_4 = 1; return x_4; } else { uint8_t x_5; lean_dec(x_3); x_5 = 0; return x_5; } } case 1: { lean_object* x_6; x_6 = lean_box(x_2); if (lean_obj_tag(x_6) == 1) { uint8_t x_7; x_7 = 1; return x_7; } else { uint8_t x_8; lean_dec(x_6); x_8 = 0; return x_8; } } case 2: { lean_object* x_9; x_9 = lean_box(x_2); if (lean_obj_tag(x_9) == 2) { uint8_t x_10; x_10 = 1; return x_10; } else { uint8_t x_11; lean_dec(x_9); x_11 = 0; return x_11; } } default: { lean_object* x_12; x_12 = lean_box(x_2); if (lean_obj_tag(x_12) == 3) { uint8_t x_13; x_13 = 1; return x_13; } else { uint8_t x_14; lean_dec(x_12); x_14 = 0; return x_14; } } } } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticSeverity____x40_Lean_Data_Lsp_Diagnostics___hyg_13____boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); lean_dec(x_1); x_4 = lean_unbox(x_2); lean_dec(x_2); x_5 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticSeverity____x40_Lean_Data_Lsp_Diagnostics___hyg_13_(x_3, x_4); x_6 = lean_box(x_5); return x_6; } } static lean_object* _init_l_Lean_Lsp_instBEqDiagnosticSeverity___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticSeverity____x40_Lean_Data_Lsp_Diagnostics___hyg_13____boxed), 2, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instBEqDiagnosticSeverity() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instBEqDiagnosticSeverity___closed__1; return x_1; } } lean_object* l_Lean_Lsp_instFromJsonDiagnosticSeverity_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_7; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_7 = lean_apply_1(x_6, x_1); return x_7; } else { lean_object* x_8; lean_object* x_9; uint8_t x_10; x_8 = lean_ctor_get(x_1, 0); lean_inc(x_8); x_9 = lean_unsigned_to_nat(1u); x_10 = lean_nat_dec_eq(x_8, x_9); if (x_10 == 0) { lean_object* x_11; uint8_t x_12; lean_dec(x_2); x_11 = lean_unsigned_to_nat(2u); x_12 = lean_nat_dec_eq(x_8, x_11); if (x_12 == 0) { lean_object* x_13; uint8_t x_14; lean_dec(x_3); x_13 = lean_unsigned_to_nat(3u); x_14 = lean_nat_dec_eq(x_8, x_13); if (x_14 == 0) { lean_object* x_15; uint8_t x_16; lean_dec(x_4); x_15 = lean_unsigned_to_nat(4u); x_16 = lean_nat_dec_eq(x_8, x_15); lean_dec(x_8); if (x_16 == 0) { lean_object* x_17; lean_dec(x_5); x_17 = lean_apply_1(x_6, x_1); return x_17; } else { lean_object* x_18; lean_object* x_19; lean_dec(x_6); lean_dec(x_1); x_18 = lean_box(0); x_19 = lean_apply_1(x_5, x_18); return x_19; } } else { lean_object* x_20; lean_object* x_21; lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_1); x_20 = lean_box(0); x_21 = lean_apply_1(x_4, x_20); return x_21; } } else { lean_object* x_22; lean_object* x_23; lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); x_22 = lean_box(0); x_23 = lean_apply_1(x_3, x_22); return x_23; } } else { lean_object* x_24; lean_object* x_25; lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); x_24 = lean_box(0); x_25 = lean_apply_1(x_2, x_24); return x_25; } } } } lean_object* l_Lean_Lsp_instFromJsonDiagnosticSeverity_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Lsp_instFromJsonDiagnosticSeverity_match__1___rarg), 6, 0); return x_2; } } static lean_object* _init_l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__1() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; x_1 = 3; x_2 = lean_box(x_1); x_3 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_3, 0, x_2); return x_3; } } static lean_object* _init_l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__2() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; x_1 = 2; x_2 = lean_box(x_1); x_3 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_3, 0, x_2); return x_3; } } static lean_object* _init_l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__3() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; x_1 = 1; x_2 = lean_box(x_1); x_3 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_3, 0, x_2); return x_3; } } static lean_object* _init_l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__4() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; x_1 = 0; x_2 = lean_box(x_1); x_3 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_3, 0, x_2); return x_3; } } lean_object* l_Lean_Lsp_instFromJsonDiagnosticSeverity(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Json_getNat_x3f(x_1); if (lean_obj_tag(x_2) == 0) { lean_object* x_3; x_3 = lean_box(0); return x_3; } else { lean_object* x_4; lean_object* x_5; uint8_t x_6; x_4 = lean_ctor_get(x_2, 0); lean_inc(x_4); lean_dec(x_2); x_5 = lean_unsigned_to_nat(1u); x_6 = lean_nat_dec_eq(x_4, x_5); if (x_6 == 0) { lean_object* x_7; uint8_t x_8; x_7 = lean_unsigned_to_nat(2u); x_8 = lean_nat_dec_eq(x_4, x_7); if (x_8 == 0) { lean_object* x_9; uint8_t x_10; x_9 = lean_unsigned_to_nat(3u); x_10 = lean_nat_dec_eq(x_4, x_9); if (x_10 == 0) { lean_object* x_11; uint8_t x_12; x_11 = lean_unsigned_to_nat(4u); x_12 = lean_nat_dec_eq(x_4, x_11); lean_dec(x_4); if (x_12 == 0) { lean_object* x_13; x_13 = lean_box(0); return x_13; } else { lean_object* x_14; x_14 = l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__1; return x_14; } } else { lean_object* x_15; lean_dec(x_4); x_15 = l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__2; return x_15; } } else { lean_object* x_16; lean_dec(x_4); x_16 = l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__3; return x_16; } } else { lean_object* x_17; lean_dec(x_4); x_17 = l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__4; return x_17; } } } } lean_object* l_Lean_Lsp_instFromJsonDiagnosticSeverity___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Lsp_instFromJsonDiagnosticSeverity(x_1); lean_dec(x_1); return x_2; } } lean_object* l_Lean_Lsp_instToJsonDiagnosticSeverity_match__1___rarg(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { switch (x_1) { case 0: { lean_object* x_6; lean_object* x_7; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_6 = lean_box(0); x_7 = lean_apply_1(x_2, x_6); return x_7; } case 1: { lean_object* x_8; lean_object* x_9; lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); x_8 = lean_box(0); x_9 = lean_apply_1(x_3, x_8); return x_9; } case 2: { lean_object* x_10; lean_object* x_11; lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); x_10 = lean_box(0); x_11 = lean_apply_1(x_4, x_10); return x_11; } default: { lean_object* x_12; lean_object* x_13; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_12 = lean_box(0); x_13 = lean_apply_1(x_5, x_12); return x_13; } } } } lean_object* l_Lean_Lsp_instToJsonDiagnosticSeverity_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Lsp_instToJsonDiagnosticSeverity_match__1___rarg___boxed), 5, 0); return x_2; } } lean_object* l_Lean_Lsp_instToJsonDiagnosticSeverity_match__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { uint8_t x_6; lean_object* x_7; x_6 = lean_unbox(x_1); lean_dec(x_1); x_7 = l_Lean_Lsp_instToJsonDiagnosticSeverity_match__1___rarg(x_6, x_2, x_3, x_4, x_5); return x_7; } } static lean_object* _init_l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Int_Int_pow___closed__1; x_2 = lean_unsigned_to_nat(0u); x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__1; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l___private_Init_Data_Repr_0__reprSourceInfo____x40_Init_Data_Repr___hyg_1438____closed__4; x_2 = lean_unsigned_to_nat(0u); x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__4() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__3; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__5() { _start: { lean_object* x_1; lean_object* x_2; x_1 = lean_unsigned_to_nat(3u); x_2 = lean_nat_to_int(x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__6() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__5; x_2 = lean_unsigned_to_nat(0u); x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__7() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__6; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__8() { _start: { lean_object* x_1; lean_object* x_2; x_1 = lean_unsigned_to_nat(4u); x_2 = lean_nat_to_int(x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__9() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__8; x_2 = lean_unsigned_to_nat(0u); x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__10() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__9; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } lean_object* l_Lean_Lsp_instToJsonDiagnosticSeverity(uint8_t x_1) { _start: { switch (x_1) { case 0: { lean_object* x_2; x_2 = l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__2; return x_2; } case 1: { lean_object* x_3; x_3 = l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__4; return x_3; } case 2: { lean_object* x_4; x_4 = l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__7; return x_4; } default: { lean_object* x_5; x_5 = l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__10; return x_5; } } } } lean_object* l_Lean_Lsp_instToJsonDiagnosticSeverity___boxed(lean_object* x_1) { _start: { uint8_t x_2; lean_object* x_3; x_2 = lean_unbox(x_1); lean_dec(x_1); x_3 = l_Lean_Lsp_instToJsonDiagnosticSeverity(x_2); return x_3; } } static lean_object* _init_l_Lean_Lsp_instInhabitedDiagnosticCode___closed__1() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Int_instInhabitedInt___closed__1; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instInhabitedDiagnosticCode() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instInhabitedDiagnosticCode___closed__1; return x_1; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticCode____x40_Lean_Data_Lsp_Diagnostics___hyg_155__match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { if (lean_obj_tag(x_1) == 0) { lean_dec(x_4); if (lean_obj_tag(x_2) == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_dec(x_5); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_ctor_get(x_2, 0); lean_inc(x_7); lean_dec(x_2); x_8 = lean_apply_2(x_3, x_6, x_7); return x_8; } else { lean_object* x_9; lean_dec(x_3); x_9 = lean_apply_2(x_5, x_1, x_2); return x_9; } } else { lean_dec(x_3); if (lean_obj_tag(x_2) == 0) { lean_object* x_10; lean_dec(x_4); x_10 = lean_apply_2(x_5, x_1, x_2); return x_10; } else { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_dec(x_5); x_11 = lean_ctor_get(x_1, 0); lean_inc(x_11); lean_dec(x_1); x_12 = lean_ctor_get(x_2, 0); lean_inc(x_12); lean_dec(x_2); x_13 = lean_apply_2(x_4, x_11, x_12); return x_13; } } } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticCode____x40_Lean_Data_Lsp_Diagnostics___hyg_155__match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticCode____x40_Lean_Data_Lsp_Diagnostics___hyg_155__match__1___rarg), 5, 0); return x_2; } } uint8_t l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticCode____x40_Lean_Data_Lsp_Diagnostics___hyg_155_(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_1) == 0) { if (lean_obj_tag(x_2) == 0) { lean_object* x_3; lean_object* x_4; uint8_t x_5; x_3 = lean_ctor_get(x_1, 0); x_4 = lean_ctor_get(x_2, 0); x_5 = lean_int_dec_eq(x_3, x_4); return x_5; } else { uint8_t x_6; x_6 = 0; return x_6; } } else { if (lean_obj_tag(x_2) == 0) { uint8_t x_7; x_7 = 0; return x_7; } else { lean_object* x_8; lean_object* x_9; uint8_t x_10; x_8 = lean_ctor_get(x_1, 0); x_9 = lean_ctor_get(x_2, 0); x_10 = lean_string_dec_eq(x_8, x_9); return x_10; } } } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticCode____x40_Lean_Data_Lsp_Diagnostics___hyg_155____boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticCode____x40_Lean_Data_Lsp_Diagnostics___hyg_155_(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } static lean_object* _init_l_Lean_Lsp_instBEqDiagnosticCode___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticCode____x40_Lean_Data_Lsp_Diagnostics___hyg_155____boxed), 2, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instBEqDiagnosticCode() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instBEqDiagnosticCode___closed__1; return x_1; } } lean_object* l_Lean_Lsp_instFromJsonDiagnosticCode_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 2: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_dec(x_3); x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = lean_unsigned_to_nat(0u); x_9 = lean_nat_dec_eq(x_7, x_8); lean_dec(x_7); if (x_9 == 0) { lean_object* x_10; lean_dec(x_6); lean_dec(x_2); x_10 = lean_apply_1(x_4, x_1); return x_10; } else { lean_object* x_11; lean_dec(x_4); lean_dec(x_1); x_11 = lean_apply_1(x_2, x_6); return x_11; } } case 3: { lean_object* x_12; lean_object* x_13; lean_dec(x_4); lean_dec(x_2); x_12 = lean_ctor_get(x_1, 0); lean_inc(x_12); lean_dec(x_1); x_13 = lean_apply_1(x_3, x_12); return x_13; } default: { lean_object* x_14; lean_dec(x_3); lean_dec(x_2); x_14 = lean_apply_1(x_4, x_1); return x_14; } } } } lean_object* l_Lean_Lsp_instFromJsonDiagnosticCode_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Lsp_instFromJsonDiagnosticCode_match__1___rarg), 4, 0); return x_2; } } lean_object* l_Lean_Lsp_instFromJsonDiagnosticCode(lean_object* x_1) { _start: { switch (lean_obj_tag(x_1)) { case 2: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; uint8_t x_6; x_2 = lean_ctor_get(x_1, 0); x_3 = lean_ctor_get(x_2, 0); x_4 = lean_ctor_get(x_2, 1); x_5 = lean_unsigned_to_nat(0u); x_6 = lean_nat_dec_eq(x_4, x_5); if (x_6 == 0) { lean_object* x_7; x_7 = lean_box(0); return x_7; } else { lean_object* x_8; lean_object* x_9; lean_inc(x_3); x_8 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_8, 0, x_3); x_9 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_9, 0, x_8); return x_9; } } case 3: { lean_object* x_10; lean_object* x_11; lean_object* x_12; x_10 = lean_ctor_get(x_1, 0); lean_inc(x_10); x_11 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_11, 0, x_10); x_12 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_12, 0, x_11); return x_12; } default: { lean_object* x_13; x_13 = lean_box(0); return x_13; } } } } lean_object* l_Lean_Lsp_instFromJsonDiagnosticCode___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Lsp_instFromJsonDiagnosticCode(x_1); lean_dec(x_1); return x_2; } } lean_object* l_Lean_Lsp_instToJsonDiagnosticCode_match__1___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); lean_dec(x_1); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_apply_1(x_3, x_6); return x_7; } } } lean_object* l_Lean_Lsp_instToJsonDiagnosticCode_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Lsp_instToJsonDiagnosticCode_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Lsp_instToJsonDiagnosticCode(lean_object* x_1) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_2 = lean_ctor_get(x_1, 0); x_3 = lean_unsigned_to_nat(0u); lean_inc(x_2); x_4 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_4, 0, x_2); lean_ctor_set(x_4, 1, x_3); x_5 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_5, 0, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); x_7 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_7, 0, x_6); return x_7; } } } lean_object* l_Lean_Lsp_instToJsonDiagnosticCode___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Lsp_instToJsonDiagnosticCode(x_1); lean_dec(x_1); return x_2; } } static uint8_t _init_l_Lean_Lsp_instInhabitedDiagnosticTag() { _start: { uint8_t x_1; x_1 = 0; return x_1; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticTag____x40_Lean_Data_Lsp_Diagnostics___hyg_293__match__1___rarg(uint8_t x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { if (x_1 == 0) { lean_dec(x_4); if (x_2 == 0) { lean_object* x_6; lean_object* x_7; lean_dec(x_5); x_6 = lean_box(0); x_7 = lean_apply_1(x_3, x_6); return x_7; } else { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_dec(x_3); x_8 = lean_box(x_1); x_9 = lean_box(x_2); x_10 = lean_apply_2(x_5, x_8, x_9); return x_10; } } else { lean_dec(x_3); if (x_2 == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_dec(x_4); x_11 = lean_box(x_1); x_12 = lean_box(x_2); x_13 = lean_apply_2(x_5, x_11, x_12); return x_13; } else { lean_object* x_14; lean_object* x_15; lean_dec(x_5); x_14 = lean_box(0); x_15 = lean_apply_1(x_4, x_14); return x_15; } } } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticTag____x40_Lean_Data_Lsp_Diagnostics___hyg_293__match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticTag____x40_Lean_Data_Lsp_Diagnostics___hyg_293__match__1___rarg___boxed), 5, 0); return x_2; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticTag____x40_Lean_Data_Lsp_Diagnostics___hyg_293__match__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { uint8_t x_6; uint8_t x_7; lean_object* x_8; x_6 = lean_unbox(x_1); lean_dec(x_1); x_7 = lean_unbox(x_2); lean_dec(x_2); x_8 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticTag____x40_Lean_Data_Lsp_Diagnostics___hyg_293__match__1___rarg(x_6, x_7, x_3, x_4, x_5); return x_8; } } uint8_t l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticTag____x40_Lean_Data_Lsp_Diagnostics___hyg_293_(uint8_t x_1, uint8_t x_2) { _start: { if (x_1 == 0) { if (x_2 == 0) { uint8_t x_3; x_3 = 1; return x_3; } else { uint8_t x_4; x_4 = 0; return x_4; } } else { if (x_2 == 0) { uint8_t x_5; x_5 = 0; return x_5; } else { uint8_t x_6; x_6 = 1; return x_6; } } } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticTag____x40_Lean_Data_Lsp_Diagnostics___hyg_293____boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); lean_dec(x_1); x_4 = lean_unbox(x_2); lean_dec(x_2); x_5 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticTag____x40_Lean_Data_Lsp_Diagnostics___hyg_293_(x_3, x_4); x_6 = lean_box(x_5); return x_6; } } static lean_object* _init_l_Lean_Lsp_instBEqDiagnosticTag___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticTag____x40_Lean_Data_Lsp_Diagnostics___hyg_293____boxed), 2, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instBEqDiagnosticTag() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instBEqDiagnosticTag___closed__1; return x_1; } } lean_object* l_Lean_Lsp_instFromJsonDiagnosticTag_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_5; lean_dec(x_3); lean_dec(x_2); x_5 = lean_apply_1(x_4, x_1); return x_5; } else { lean_object* x_6; lean_object* x_7; uint8_t x_8; x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); x_7 = lean_unsigned_to_nat(1u); x_8 = lean_nat_dec_eq(x_6, x_7); if (x_8 == 0) { lean_object* x_9; uint8_t x_10; lean_dec(x_2); x_9 = lean_unsigned_to_nat(2u); x_10 = lean_nat_dec_eq(x_6, x_9); lean_dec(x_6); if (x_10 == 0) { lean_object* x_11; lean_dec(x_3); x_11 = lean_apply_1(x_4, x_1); return x_11; } else { lean_object* x_12; lean_object* x_13; lean_dec(x_4); lean_dec(x_1); x_12 = lean_box(0); x_13 = lean_apply_1(x_3, x_12); return x_13; } } else { lean_object* x_14; lean_object* x_15; lean_dec(x_6); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); x_14 = lean_box(0); x_15 = lean_apply_1(x_2, x_14); return x_15; } } } } lean_object* l_Lean_Lsp_instFromJsonDiagnosticTag_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Lsp_instFromJsonDiagnosticTag_match__1___rarg), 4, 0); return x_2; } } static lean_object* _init_l_Lean_Lsp_instFromJsonDiagnosticTag___closed__1() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; x_1 = 1; x_2 = lean_box(x_1); x_3 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_3, 0, x_2); return x_3; } } static lean_object* _init_l_Lean_Lsp_instFromJsonDiagnosticTag___closed__2() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; x_1 = 0; x_2 = lean_box(x_1); x_3 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_3, 0, x_2); return x_3; } } lean_object* l_Lean_Lsp_instFromJsonDiagnosticTag(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Json_getNat_x3f(x_1); if (lean_obj_tag(x_2) == 0) { lean_object* x_3; x_3 = lean_box(0); return x_3; } else { lean_object* x_4; lean_object* x_5; uint8_t x_6; x_4 = lean_ctor_get(x_2, 0); lean_inc(x_4); lean_dec(x_2); x_5 = lean_unsigned_to_nat(1u); x_6 = lean_nat_dec_eq(x_4, x_5); if (x_6 == 0) { lean_object* x_7; uint8_t x_8; x_7 = lean_unsigned_to_nat(2u); x_8 = lean_nat_dec_eq(x_4, x_7); lean_dec(x_4); if (x_8 == 0) { lean_object* x_9; x_9 = lean_box(0); return x_9; } else { lean_object* x_10; x_10 = l_Lean_Lsp_instFromJsonDiagnosticTag___closed__1; return x_10; } } else { lean_object* x_11; lean_dec(x_4); x_11 = l_Lean_Lsp_instFromJsonDiagnosticTag___closed__2; return x_11; } } } } lean_object* l_Lean_Lsp_instFromJsonDiagnosticTag___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Lsp_instFromJsonDiagnosticTag(x_1); lean_dec(x_1); return x_2; } } lean_object* l_Lean_Lsp_instToJsonDiagnosticTag_match__1___rarg(uint8_t x_1, lean_object* x_2, lean_object* x_3) { _start: { if (x_1 == 0) { lean_object* x_4; lean_object* x_5; lean_dec(x_3); x_4 = lean_box(0); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_dec(x_2); x_6 = lean_box(0); x_7 = lean_apply_1(x_3, x_6); return x_7; } } } lean_object* l_Lean_Lsp_instToJsonDiagnosticTag_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Lsp_instToJsonDiagnosticTag_match__1___rarg___boxed), 3, 0); return x_2; } } lean_object* l_Lean_Lsp_instToJsonDiagnosticTag_match__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { uint8_t x_4; lean_object* x_5; x_4 = lean_unbox(x_1); lean_dec(x_1); x_5 = l_Lean_Lsp_instToJsonDiagnosticTag_match__1___rarg(x_4, x_2, x_3); return x_5; } } static lean_object* _init_l_Lean_Lsp_instToJsonDiagnosticTag___closed__1() { _start: { lean_object* x_1; lean_object* x_2; x_1 = lean_unsigned_to_nat(1u); x_2 = l_Lean_JsonNumber_fromNat(x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instToJsonDiagnosticTag___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Lsp_instToJsonDiagnosticTag___closed__1; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instToJsonDiagnosticTag___closed__3() { _start: { lean_object* x_1; lean_object* x_2; x_1 = lean_unsigned_to_nat(2u); x_2 = l_Lean_JsonNumber_fromNat(x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instToJsonDiagnosticTag___closed__4() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Lsp_instToJsonDiagnosticTag___closed__3; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } lean_object* l_Lean_Lsp_instToJsonDiagnosticTag(uint8_t x_1) { _start: { if (x_1 == 0) { lean_object* x_2; x_2 = l_Lean_Lsp_instToJsonDiagnosticTag___closed__2; return x_2; } else { lean_object* x_3; x_3 = l_Lean_Lsp_instToJsonDiagnosticTag___closed__4; return x_3; } } } lean_object* l_Lean_Lsp_instToJsonDiagnosticTag___boxed(lean_object* x_1) { _start: { uint8_t x_2; lean_object* x_3; x_2 = lean_unbox(x_1); lean_dec(x_1); x_3 = l_Lean_Lsp_instToJsonDiagnosticTag(x_2); return x_3; } } static lean_object* _init_l_Lean_Lsp_instInhabitedDiagnosticRelatedInformation___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Lsp_instInhabitedLocation___closed__1; x_2 = l_Lean_instInhabitedParserDescr___closed__1; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_Lsp_instInhabitedDiagnosticRelatedInformation() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instInhabitedDiagnosticRelatedInformation___closed__1; return x_1; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_412__match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; 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_ctor_get(x_2, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_2, 1); lean_inc(x_8); lean_dec(x_2); x_9 = lean_apply_4(x_3, x_5, x_6, x_7, x_8); return x_9; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_412__match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_412__match__1___rarg___boxed), 4, 0); return x_2; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_412__match__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_412__match__1___rarg(x_1, x_2, x_3, x_4); lean_dec(x_4); return x_5; } } uint8_t l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_412_(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; x_3 = lean_ctor_get(x_1, 0); x_4 = lean_ctor_get(x_1, 1); x_5 = lean_ctor_get(x_2, 0); x_6 = lean_ctor_get(x_2, 1); x_7 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_beqLocation____x40_Lean_Data_Lsp_Basic___hyg_516_(x_3, x_5); if (x_7 == 0) { uint8_t x_8; x_8 = 0; return x_8; } else { uint8_t x_9; x_9 = lean_string_dec_eq(x_4, x_6); return x_9; } } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_412____boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_412_(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } static lean_object* _init_l_Lean_Lsp_instBEqDiagnosticRelatedInformation___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_412____boxed), 2, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instBEqDiagnosticRelatedInformation() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instBEqDiagnosticRelatedInformation___closed__1; return x_1; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_473_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); x_3 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_577_(x_2); x_4 = l_Lean_Parser_Tactic_location___closed__1; x_5 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_5, 0, x_4); lean_ctor_set(x_5, 1, x_3); x_6 = lean_box(0); x_7 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_7, 0, x_5); lean_ctor_set(x_7, 1, x_6); x_8 = lean_ctor_get(x_1, 1); lean_inc(x_8); lean_dec(x_1); x_9 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_9, 0, x_8); x_10 = l_Lean_JsonRpc_instToJsonMessage___closed__10; x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_9); x_12 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_6); x_13 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_6); x_14 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_14, 0, x_7); lean_ctor_set(x_14, 1, x_13); x_15 = l_List_join___rarg(x_14); x_16 = l_Lean_Json_mkObj(x_15); return x_16; } } static lean_object* _init_l_Lean_Lsp_instToJsonDiagnosticRelatedInformation___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_473_), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instToJsonDiagnosticRelatedInformation() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instToJsonDiagnosticRelatedInformation___closed__1; return x_1; } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_507____spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; x_3 = l_Lean_Json_getObjValD(x_1, x_2); x_4 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_611_(x_3); lean_dec(x_3); return x_4; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_507_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = l_Lean_Parser_Tactic_location___closed__1; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_507____spec__1(x_1, x_2); if (lean_obj_tag(x_3) == 0) { lean_object* x_4; x_4 = lean_box(0); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); x_6 = l_Lean_JsonRpc_instToJsonMessage___closed__10; x_7 = l_Lean_Json_getObjValAs_x3f___at_Lean_JsonRpc_instFromJsonMessage___spec__2(x_1, x_6); if (lean_obj_tag(x_7) == 0) { lean_object* x_8; lean_dec(x_5); x_8 = lean_box(0); return x_8; } else { uint8_t x_9; x_9 = !lean_is_exclusive(x_7); if (x_9 == 0) { lean_object* x_10; lean_object* x_11; x_10 = lean_ctor_get(x_7, 0); x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_5); lean_ctor_set(x_11, 1, x_10); lean_ctor_set(x_7, 0, x_11); return x_7; } else { lean_object* x_12; lean_object* x_13; lean_object* x_14; x_12 = lean_ctor_get(x_7, 0); lean_inc(x_12); lean_dec(x_7); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_5); lean_ctor_set(x_13, 1, x_12); x_14 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_14, 0, x_13); return x_14; } } } } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_507____spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_507____spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_507____boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_507_(x_1); lean_dec(x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instFromJsonDiagnosticRelatedInformation___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_507____boxed), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instFromJsonDiagnosticRelatedInformation() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instFromJsonDiagnosticRelatedInformation___closed__1; return x_1; } } lean_object* l_Lean_Lsp_Diagnostic_fullRange___default(lean_object* x_1) { _start: { lean_inc(x_1); return x_1; } } lean_object* l_Lean_Lsp_Diagnostic_fullRange___default___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Lsp_Diagnostic_fullRange___default(x_1); lean_dec(x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_Diagnostic_severity_x3f___default() { _start: { lean_object* x_1; x_1 = lean_box(0); return x_1; } } static lean_object* _init_l_Lean_Lsp_Diagnostic_code_x3f___default() { _start: { lean_object* x_1; x_1 = lean_box(0); return x_1; } } static lean_object* _init_l_Lean_Lsp_Diagnostic_source_x3f___default() { _start: { lean_object* x_1; x_1 = lean_box(0); return x_1; } } static lean_object* _init_l_Lean_Lsp_Diagnostic_tags_x3f___default() { _start: { lean_object* x_1; x_1 = lean_box(0); return x_1; } } static lean_object* _init_l_Lean_Lsp_Diagnostic_relatedInformation_x3f___default() { _start: { lean_object* x_1; x_1 = lean_box(0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instInhabitedDiagnostic___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = lean_box(0); x_2 = l_Lean_Lsp_instInhabitedRange___closed__1; x_3 = l_Lean_instInhabitedParserDescr___closed__1; x_4 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_4, 0, x_2); lean_ctor_set(x_4, 1, x_2); lean_ctor_set(x_4, 2, x_1); lean_ctor_set(x_4, 3, x_1); lean_ctor_set(x_4, 4, x_1); lean_ctor_set(x_4, 5, x_3); lean_ctor_set(x_4, 6, x_1); lean_ctor_set(x_4, 7, x_1); return x_4; } } static lean_object* _init_l_Lean_Lsp_instInhabitedDiagnostic() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instInhabitedDiagnostic___closed__1; return x_1; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649__match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); x_6 = lean_ctor_get(x_1, 1); lean_inc(x_6); x_7 = lean_ctor_get(x_1, 2); lean_inc(x_7); x_8 = lean_ctor_get(x_1, 3); lean_inc(x_8); x_9 = lean_ctor_get(x_1, 4); lean_inc(x_9); x_10 = lean_ctor_get(x_1, 5); lean_inc(x_10); x_11 = lean_ctor_get(x_1, 6); lean_inc(x_11); x_12 = lean_ctor_get(x_1, 7); lean_inc(x_12); lean_dec(x_1); x_13 = lean_ctor_get(x_2, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_2, 1); lean_inc(x_14); x_15 = lean_ctor_get(x_2, 2); lean_inc(x_15); x_16 = lean_ctor_get(x_2, 3); lean_inc(x_16); x_17 = lean_ctor_get(x_2, 4); lean_inc(x_17); x_18 = lean_ctor_get(x_2, 5); lean_inc(x_18); x_19 = lean_ctor_get(x_2, 6); lean_inc(x_19); x_20 = lean_ctor_get(x_2, 7); lean_inc(x_20); lean_dec(x_2); x_21 = lean_apply_16(x_3, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_17, x_18, x_19, x_20); return x_21; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649__match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649__match__1___rarg___boxed), 4, 0); return x_2; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649__match__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649__match__1___rarg(x_1, x_2, x_3, x_4); lean_dec(x_4); return x_5; } } uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__1(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_1) == 0) { if (lean_obj_tag(x_2) == 0) { uint8_t x_3; x_3 = 1; return x_3; } else { uint8_t x_4; lean_dec(x_2); x_4 = 0; return x_4; } } else { if (lean_obj_tag(x_2) == 0) { uint8_t x_5; lean_dec(x_1); x_5 = 0; return x_5; } else { lean_object* x_6; lean_object* x_7; uint8_t x_8; uint8_t x_9; uint8_t x_10; x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_ctor_get(x_2, 0); lean_inc(x_7); lean_dec(x_2); x_8 = lean_unbox(x_6); lean_dec(x_6); x_9 = lean_unbox(x_7); lean_dec(x_7); x_10 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticSeverity____x40_Lean_Data_Lsp_Diagnostics___hyg_13_(x_8, x_9); return x_10; } } } } uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__2(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_1) == 0) { if (lean_obj_tag(x_2) == 0) { uint8_t x_3; x_3 = 1; return x_3; } else { uint8_t x_4; x_4 = 0; return x_4; } } else { if (lean_obj_tag(x_2) == 0) { uint8_t x_5; x_5 = 0; return x_5; } else { lean_object* x_6; lean_object* x_7; uint8_t x_8; x_6 = lean_ctor_get(x_1, 0); x_7 = lean_ctor_get(x_2, 0); x_8 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticCode____x40_Lean_Data_Lsp_Diagnostics___hyg_155_(x_6, x_7); return x_8; } } } } uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__3(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_1) == 0) { if (lean_obj_tag(x_2) == 0) { uint8_t x_3; x_3 = 1; return x_3; } else { uint8_t x_4; x_4 = 0; return x_4; } } else { if (lean_obj_tag(x_2) == 0) { uint8_t x_5; x_5 = 0; return x_5; } else { lean_object* x_6; lean_object* x_7; uint8_t x_8; x_6 = lean_ctor_get(x_1, 0); x_7 = lean_ctor_get(x_2, 0); x_8 = lean_string_dec_eq(x_6, x_7); return x_8; } } } } uint8_t l_Array_isEqvAux___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__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) { _start: { lean_object* x_7; uint8_t x_8; x_7 = lean_array_get_size(x_4); x_8 = lean_nat_dec_lt(x_6, x_7); lean_dec(x_7); if (x_8 == 0) { uint8_t x_9; lean_dec(x_6); x_9 = 1; return x_9; } else { lean_object* x_10; uint8_t x_11; lean_object* x_12; uint8_t x_13; uint8_t x_14; x_10 = lean_array_fget(x_4, x_6); x_11 = lean_unbox(x_10); lean_dec(x_10); x_12 = lean_array_fget(x_5, x_6); x_13 = lean_unbox(x_12); lean_dec(x_12); x_14 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticTag____x40_Lean_Data_Lsp_Diagnostics___hyg_293_(x_11, x_13); if (x_14 == 0) { uint8_t x_15; lean_dec(x_6); x_15 = 0; return x_15; } else { lean_object* x_16; lean_object* x_17; x_16 = lean_unsigned_to_nat(1u); x_17 = lean_nat_add(x_6, x_16); lean_dec(x_6); x_3 = lean_box(0); x_6 = x_17; goto _start; } } } } uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__4(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_1) == 0) { if (lean_obj_tag(x_2) == 0) { uint8_t x_3; x_3 = 1; return x_3; } else { uint8_t x_4; x_4 = 0; return x_4; } } else { if (lean_obj_tag(x_2) == 0) { uint8_t x_5; x_5 = 0; return x_5; } else { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; x_6 = lean_ctor_get(x_1, 0); x_7 = lean_ctor_get(x_2, 0); x_8 = lean_array_get_size(x_6); x_9 = lean_array_get_size(x_7); x_10 = lean_nat_dec_eq(x_8, x_9); lean_dec(x_9); lean_dec(x_8); if (x_10 == 0) { uint8_t x_11; x_11 = 0; return x_11; } else { lean_object* x_12; uint8_t x_13; x_12 = lean_unsigned_to_nat(0u); x_13 = l_Array_isEqvAux___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__5(x_6, x_7, lean_box(0), x_6, x_7, x_12); return x_13; } } } } } uint8_t l_Array_isEqvAux___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__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) { _start: { lean_object* x_7; uint8_t x_8; x_7 = lean_array_get_size(x_4); x_8 = lean_nat_dec_lt(x_6, x_7); lean_dec(x_7); if (x_8 == 0) { uint8_t x_9; lean_dec(x_6); x_9 = 1; return x_9; } else { lean_object* x_10; lean_object* x_11; uint8_t x_12; x_10 = lean_array_fget(x_4, x_6); x_11 = lean_array_fget(x_5, x_6); x_12 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_412_(x_10, x_11); lean_dec(x_11); lean_dec(x_10); if (x_12 == 0) { uint8_t x_13; lean_dec(x_6); x_13 = 0; return x_13; } else { lean_object* x_14; lean_object* x_15; x_14 = lean_unsigned_to_nat(1u); x_15 = lean_nat_add(x_6, x_14); lean_dec(x_6); x_3 = lean_box(0); x_6 = x_15; goto _start; } } } } uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__6(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_1) == 0) { if (lean_obj_tag(x_2) == 0) { uint8_t x_3; x_3 = 1; return x_3; } else { uint8_t x_4; x_4 = 0; return x_4; } } else { if (lean_obj_tag(x_2) == 0) { uint8_t x_5; x_5 = 0; return x_5; } else { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; x_6 = lean_ctor_get(x_1, 0); x_7 = lean_ctor_get(x_2, 0); x_8 = lean_array_get_size(x_6); x_9 = lean_array_get_size(x_7); x_10 = lean_nat_dec_eq(x_8, x_9); lean_dec(x_9); lean_dec(x_8); if (x_10 == 0) { uint8_t x_11; x_11 = 0; return x_11; } else { lean_object* x_12; uint8_t x_13; x_12 = lean_unsigned_to_nat(0u); x_13 = l_Array_isEqvAux___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__7(x_6, x_7, lean_box(0), x_6, x_7, x_12); return x_13; } } } } } uint8_t l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649_(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 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_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); x_5 = lean_ctor_get(x_1, 2); lean_inc(x_5); x_6 = lean_ctor_get(x_1, 3); lean_inc(x_6); x_7 = lean_ctor_get(x_1, 4); lean_inc(x_7); x_8 = lean_ctor_get(x_1, 5); lean_inc(x_8); x_9 = lean_ctor_get(x_1, 6); lean_inc(x_9); x_10 = lean_ctor_get(x_1, 7); lean_inc(x_10); lean_dec(x_1); 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); x_14 = lean_ctor_get(x_2, 3); lean_inc(x_14); x_15 = lean_ctor_get(x_2, 4); lean_inc(x_15); x_16 = lean_ctor_get(x_2, 5); lean_inc(x_16); x_17 = lean_ctor_get(x_2, 6); lean_inc(x_17); x_18 = lean_ctor_get(x_2, 7); lean_inc(x_18); lean_dec(x_2); x_19 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_beqRange____x40_Lean_Data_Lsp_Basic___hyg_348_(x_3, x_11); lean_dec(x_11); lean_dec(x_3); if (x_19 == 0) { uint8_t x_20; lean_dec(x_18); lean_dec(x_17); lean_dec(x_16); lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_20 = 0; return x_20; } else { uint8_t x_21; x_21 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_beqRange____x40_Lean_Data_Lsp_Basic___hyg_348_(x_4, x_12); lean_dec(x_12); lean_dec(x_4); if (x_21 == 0) { uint8_t x_22; lean_dec(x_18); lean_dec(x_17); lean_dec(x_16); lean_dec(x_15); lean_dec(x_14); 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); x_22 = 0; return x_22; } else { uint8_t x_23; x_23 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__1(x_5, x_13); if (x_23 == 0) { uint8_t x_24; lean_dec(x_18); lean_dec(x_17); lean_dec(x_16); lean_dec(x_15); lean_dec(x_14); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); x_24 = 0; return x_24; } else { uint8_t x_25; x_25 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__2(x_6, x_14); lean_dec(x_14); lean_dec(x_6); if (x_25 == 0) { uint8_t x_26; lean_dec(x_18); lean_dec(x_17); lean_dec(x_16); lean_dec(x_15); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); x_26 = 0; return x_26; } else { uint8_t x_27; x_27 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__3(x_7, x_15); lean_dec(x_15); lean_dec(x_7); if (x_27 == 0) { uint8_t x_28; lean_dec(x_18); lean_dec(x_17); lean_dec(x_16); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); x_28 = 0; return x_28; } else { uint8_t x_29; x_29 = lean_string_dec_eq(x_8, x_16); lean_dec(x_16); lean_dec(x_8); if (x_29 == 0) { uint8_t x_30; lean_dec(x_18); lean_dec(x_17); lean_dec(x_10); lean_dec(x_9); x_30 = 0; return x_30; } else { uint8_t x_31; x_31 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__4(x_9, x_17); lean_dec(x_17); lean_dec(x_9); if (x_31 == 0) { uint8_t x_32; lean_dec(x_18); lean_dec(x_10); x_32 = 0; return x_32; } else { uint8_t x_33; x_33 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__6(x_10, x_18); lean_dec(x_18); lean_dec(x_10); return x_33; } } } } } } } } } lean_object* l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__1(x_1, x_2); x_4 = lean_box(x_3); return x_4; } } lean_object* l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__2___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__2(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } lean_object* l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__3___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__3(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } lean_object* l_Array_isEqvAux___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____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) { _start: { uint8_t x_7; lean_object* x_8; x_7 = l_Array_isEqvAux___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__5(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); x_8 = lean_box(x_7); return x_8; } } lean_object* l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__4___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__4(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } lean_object* l_Array_isEqvAux___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__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) { _start: { uint8_t x_7; lean_object* x_8; x_7 = l_Array_isEqvAux___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__7(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); x_8 = lean_box(x_7); return x_8; } } lean_object* l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__6___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____spec__6(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649_(x_1, x_2); x_4 = lean_box(x_3); return x_4; } } static lean_object* _init_l_Lean_Lsp_instBEqDiagnostic___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649____boxed), 2, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instBEqDiagnostic() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instBEqDiagnostic___closed__1; return x_1; } } lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__1(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { lean_object* x_3; lean_dec(x_1); x_3 = lean_box(0); return x_3; } else { lean_object* x_4; lean_object* x_5; uint8_t x_6; x_4 = lean_ctor_get(x_2, 0); x_5 = lean_box(0); x_6 = lean_unbox(x_4); switch (x_6) { case 0: { lean_object* x_7; lean_object* x_8; lean_object* x_9; x_7 = l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__2; x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_1); lean_ctor_set(x_8, 1, x_7); x_9 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_9, 0, x_8); lean_ctor_set(x_9, 1, x_5); return x_9; } case 1: { lean_object* x_10; lean_object* x_11; lean_object* x_12; x_10 = l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__4; x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_1); lean_ctor_set(x_11, 1, x_10); x_12 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_5); return x_12; } case 2: { lean_object* x_13; lean_object* x_14; lean_object* x_15; x_13 = l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__7; x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_1); lean_ctor_set(x_14, 1, x_13); x_15 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_5); return x_15; } default: { lean_object* x_16; lean_object* x_17; lean_object* x_18; x_16 = l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__10; x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_1); lean_ctor_set(x_17, 1, x_16); x_18 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_5); return x_18; } } } } } lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__2(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { lean_object* x_3; lean_dec(x_1); x_3 = lean_box(0); return x_3; } else { lean_object* x_4; lean_object* x_5; x_4 = lean_ctor_get(x_2, 0); x_5 = lean_box(0); if (lean_obj_tag(x_4) == 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; x_6 = lean_ctor_get(x_4, 0); x_7 = lean_unsigned_to_nat(0u); lean_inc(x_6); x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_6); lean_ctor_set(x_8, 1, x_7); x_9 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_9, 0, x_8); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_1); lean_ctor_set(x_10, 1, x_9); x_11 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_5); return x_11; } else { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_12 = lean_ctor_get(x_4, 0); lean_inc(x_12); x_13 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_13, 0, x_12); x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_1); lean_ctor_set(x_14, 1, x_13); x_15 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_5); return x_15; } } } } static lean_object* _init_l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__4___closed__1() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Lsp_instToJsonDiagnosticTag___closed__2; x_2 = x_1; return x_2; } } static lean_object* _init_l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__4___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Lsp_instToJsonDiagnosticTag___closed__4; x_2 = x_1; return x_2; } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__4(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; uint8_t x_10; size_t x_11; size_t x_12; 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_unbox(x_9); lean_dec(x_9); x_11 = 1; x_12 = x_2 + x_11; if (x_10 == 0) { lean_object* x_13; lean_object* x_14; x_13 = l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__4___closed__1; x_14 = lean_array_uset(x_8, x_2, x_13); x_2 = x_12; x_3 = x_14; goto _start; } else { lean_object* x_16; lean_object* x_17; x_16 = l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__4___closed__2; x_17 = lean_array_uset(x_8, x_2, x_16); x_2 = x_12; x_3 = x_17; goto _start; } } } } lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__3(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { lean_object* x_3; lean_dec(x_1); x_3 = lean_box(0); return x_3; } else { lean_object* x_4; lean_object* x_5; size_t x_6; size_t x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_4 = lean_ctor_get(x_2, 0); lean_inc(x_4); lean_dec(x_2); x_5 = lean_array_get_size(x_4); x_6 = lean_usize_of_nat(x_5); lean_dec(x_5); x_7 = 0; x_8 = x_4; x_9 = l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__4(x_6, x_7, x_8); x_10 = x_9; x_11 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_11, 0, x_10); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_1); lean_ctor_set(x_12, 1, x_11); x_13 = lean_box(0); x_14 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_14, 0, x_12); lean_ctor_set(x_14, 1, x_13); return x_14; } } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____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; size_t x_11; size_t x_12; lean_object* x_13; lean_object* x_14; 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 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_473_(x_9); x_11 = 1; x_12 = x_2 + x_11; x_13 = x_10; x_14 = lean_array_uset(x_8, x_2, x_13); x_2 = x_12; x_3 = x_14; goto _start; } } } lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__5(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { lean_object* x_3; lean_dec(x_1); x_3 = lean_box(0); return x_3; } else { lean_object* x_4; lean_object* x_5; size_t x_6; size_t x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_4 = lean_ctor_get(x_2, 0); lean_inc(x_4); lean_dec(x_2); x_5 = lean_array_get_size(x_4); x_6 = lean_usize_of_nat(x_5); lean_dec(x_5); x_7 = 0; x_8 = x_4; x_9 = l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__6(x_6, x_7, x_8); x_10 = x_9; x_11 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_11, 0, x_10); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_1); lean_ctor_set(x_12, 1, x_11); x_13 = lean_box(0); x_14 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_14, 0, x_12); lean_ctor_set(x_14, 1, x_13); return x_14; } } } static lean_object* _init_l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("fullRange"); return x_1; } } static lean_object* _init_l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("severity"); return x_1; } } static lean_object* _init_l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("source"); return x_1; } } static lean_object* _init_l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__4() { _start: { lean_object* x_1; x_1 = lean_mk_string("tags"); return x_1; } } static lean_object* _init_l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__5() { _start: { lean_object* x_1; x_1 = lean_mk_string("relatedInformation"); return x_1; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); x_3 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonRange____x40_Lean_Data_Lsp_Basic___hyg_409_(x_2); x_4 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_577____closed__2; x_5 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_5, 0, x_4); lean_ctor_set(x_5, 1, x_3); x_6 = lean_box(0); x_7 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_7, 0, x_5); lean_ctor_set(x_7, 1, x_6); x_8 = lean_ctor_get(x_1, 1); lean_inc(x_8); x_9 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonRange____x40_Lean_Data_Lsp_Basic___hyg_409_(x_8); x_10 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__1; x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_9); x_12 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_6); x_13 = lean_ctor_get(x_1, 2); lean_inc(x_13); x_14 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__2; x_15 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__1(x_14, x_13); lean_dec(x_13); x_16 = lean_ctor_get(x_1, 3); lean_inc(x_16); x_17 = l_Lean_JsonRpc_instToJsonMessage___closed__12; x_18 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__2(x_17, x_16); lean_dec(x_16); x_19 = lean_ctor_get(x_1, 4); lean_inc(x_19); x_20 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__3; x_21 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonDocumentFilter____x40_Lean_Data_Lsp_Basic___hyg_1611____spec__1(x_20, x_19); lean_dec(x_19); x_22 = lean_ctor_get(x_1, 5); lean_inc(x_22); x_23 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_23, 0, x_22); x_24 = l_Lean_JsonRpc_instToJsonMessage___closed__10; x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_23); x_26 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_6); x_27 = lean_ctor_get(x_1, 6); lean_inc(x_27); x_28 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__4; x_29 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__3(x_28, x_27); x_30 = lean_ctor_get(x_1, 7); lean_inc(x_30); lean_dec(x_1); x_31 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__5; x_32 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__5(x_31, x_30); x_33 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_33, 0, x_32); lean_ctor_set(x_33, 1, x_6); x_34 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_34, 0, x_29); lean_ctor_set(x_34, 1, x_33); x_35 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_35, 0, x_26); lean_ctor_set(x_35, 1, x_34); x_36 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_36, 0, x_21); lean_ctor_set(x_36, 1, x_35); x_37 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_37, 0, x_18); lean_ctor_set(x_37, 1, x_36); x_38 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_38, 0, x_15); lean_ctor_set(x_38, 1, x_37); x_39 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_39, 0, x_12); lean_ctor_set(x_39, 1, x_38); x_40 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_40, 0, x_7); lean_ctor_set(x_40, 1, x_39); x_41 = l_List_join___rarg(x_40); x_42 = l_Lean_Json_mkObj(x_41); return x_42; } } lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__1(x_1, x_2); lean_dec(x_2); return x_3; } } lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__2___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__2(x_1, x_2); lean_dec(x_2); return x_3; } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__4___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___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__4(x_4, x_5, x_3); return x_6; } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____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___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__6(x_4, x_5, x_3); return x_6; } } static lean_object* _init_l_Lean_Lsp_instToJsonDiagnostic___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794_), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instToJsonDiagnostic() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instToJsonDiagnostic___closed__1; return x_1; } } static lean_object* _init_l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__1() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__1; x_2 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__2; x_2 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__3() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__3; x_2 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__4() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__4; x_2 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValD(x_1, x_2); if (lean_obj_tag(x_3) == 0) { lean_object* x_4; x_4 = l_Lean_instFromJsonOption___rarg___closed__1; return x_4; } else { lean_object* x_5; x_5 = l_Lean_Json_getNat_x3f(x_3); lean_dec(x_3); if (lean_obj_tag(x_5) == 0) { lean_object* x_6; x_6 = lean_box(0); return x_6; } else { lean_object* x_7; lean_object* x_8; uint8_t x_9; x_7 = lean_ctor_get(x_5, 0); lean_inc(x_7); lean_dec(x_5); x_8 = lean_unsigned_to_nat(1u); x_9 = lean_nat_dec_eq(x_7, x_8); if (x_9 == 0) { lean_object* x_10; uint8_t x_11; x_10 = lean_unsigned_to_nat(2u); x_11 = lean_nat_dec_eq(x_7, x_10); if (x_11 == 0) { lean_object* x_12; uint8_t x_13; x_12 = lean_unsigned_to_nat(3u); x_13 = lean_nat_dec_eq(x_7, x_12); if (x_13 == 0) { lean_object* x_14; uint8_t x_15; x_14 = lean_unsigned_to_nat(4u); x_15 = lean_nat_dec_eq(x_7, x_14); lean_dec(x_7); if (x_15 == 0) { lean_object* x_16; x_16 = lean_box(0); return x_16; } else { lean_object* x_17; x_17 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__1; return x_17; } } else { lean_object* x_18; lean_dec(x_7); x_18 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__2; return x_18; } } else { lean_object* x_19; lean_dec(x_7); x_19 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__3; return x_19; } } else { lean_object* x_20; lean_dec(x_7); x_20 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__4; return x_20; } } } } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__2(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValD(x_1, x_2); switch (lean_obj_tag(x_3)) { case 0: { lean_object* x_4; x_4 = l_Lean_instFromJsonOption___rarg___closed__1; return x_4; } case 2: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = lean_unsigned_to_nat(0u); x_9 = lean_nat_dec_eq(x_7, x_8); lean_dec(x_7); if (x_9 == 0) { lean_object* x_10; lean_dec(x_6); x_10 = lean_box(0); return x_10; } else { lean_object* x_11; lean_object* x_12; lean_object* x_13; x_11 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_11, 0, x_6); x_12 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_12, 0, x_11); x_13 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_13, 0, x_12); return x_13; } } case 3: { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; x_14 = lean_ctor_get(x_3, 0); lean_inc(x_14); lean_dec(x_3); x_15 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_15, 0, x_14); x_16 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_16, 0, x_15); x_17 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_17, 0, x_16); return x_17; } default: { lean_object* x_18; lean_dec(x_3); x_18 = lean_box(0); return x_18; } } } } static lean_object* _init_l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__4___closed__1() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; x_1 = 1; x_2 = lean_box(x_1); x_3 = x_2; return x_3; } } static lean_object* _init_l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__4___closed__2() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; x_1 = 0; x_2 = lean_box(x_1); x_3 = x_2; return x_3; } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__4(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; lean_object* x_6; x_5 = x_3; x_6 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_6, 0, x_5); return x_6; } else { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_7 = lean_array_uget(x_3, x_2); x_8 = lean_unsigned_to_nat(0u); x_9 = lean_array_uset(x_3, x_2, x_8); x_10 = x_7; x_11 = l_Lean_Json_getNat_x3f(x_10); lean_dec(x_10); if (lean_obj_tag(x_11) == 0) { lean_object* x_12; lean_dec(x_9); x_12 = lean_box(0); return x_12; } else { lean_object* x_13; lean_object* x_14; uint8_t x_15; x_13 = lean_ctor_get(x_11, 0); lean_inc(x_13); lean_dec(x_11); x_14 = lean_unsigned_to_nat(1u); x_15 = lean_nat_dec_eq(x_13, x_14); if (x_15 == 0) { lean_object* x_16; uint8_t x_17; x_16 = lean_unsigned_to_nat(2u); x_17 = lean_nat_dec_eq(x_13, x_16); lean_dec(x_13); if (x_17 == 0) { lean_object* x_18; lean_dec(x_9); x_18 = lean_box(0); return x_18; } else { size_t x_19; size_t x_20; lean_object* x_21; lean_object* x_22; x_19 = 1; x_20 = x_2 + x_19; x_21 = l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__4___closed__1; x_22 = lean_array_uset(x_9, x_2, x_21); x_2 = x_20; x_3 = x_22; goto _start; } } else { size_t x_24; size_t x_25; lean_object* x_26; lean_object* x_27; lean_dec(x_13); x_24 = 1; x_25 = x_2 + x_24; x_26 = l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__4___closed__2; x_27 = lean_array_uset(x_9, x_2, x_26); x_2 = x_25; x_3 = x_27; goto _start; } } } } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__3(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValD(x_1, x_2); switch (lean_obj_tag(x_3)) { case 0: { lean_object* x_4; x_4 = l_Lean_instFromJsonOption___rarg___closed__1; return x_4; } case 4: { lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); x_6 = lean_array_get_size(x_5); x_7 = lean_usize_of_nat(x_6); lean_dec(x_6); x_8 = 0; x_9 = x_5; x_10 = l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__4(x_7, x_8, x_9); x_11 = x_10; if (lean_obj_tag(x_11) == 0) { lean_object* x_12; x_12 = lean_box(0); return x_12; } else { uint8_t x_13; x_13 = !lean_is_exclusive(x_11); if (x_13 == 0) { lean_object* x_14; x_14 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_14, 0, x_11); return x_14; } else { lean_object* x_15; lean_object* x_16; lean_object* x_17; x_15 = lean_ctor_get(x_11, 0); lean_inc(x_15); lean_dec(x_11); x_16 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_16, 0, x_15); x_17 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_17, 0, x_16); return x_17; } } } default: { lean_object* x_18; lean_dec(x_3); x_18 = lean_box(0); return x_18; } } } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____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; lean_object* x_6; x_5 = x_3; x_6 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_6, 0, x_5); return x_6; } else { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_7 = lean_array_uget(x_3, x_2); x_8 = lean_unsigned_to_nat(0u); x_9 = lean_array_uset(x_3, x_2, x_8); x_10 = x_7; x_11 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnosticRelatedInformation____x40_Lean_Data_Lsp_Diagnostics___hyg_507_(x_10); lean_dec(x_10); if (lean_obj_tag(x_11) == 0) { lean_object* x_12; lean_dec(x_9); x_12 = lean_box(0); return x_12; } else { lean_object* x_13; size_t x_14; size_t x_15; lean_object* x_16; lean_object* x_17; x_13 = lean_ctor_get(x_11, 0); lean_inc(x_13); lean_dec(x_11); x_14 = 1; x_15 = x_2 + x_14; x_16 = x_13; x_17 = lean_array_uset(x_9, x_2, x_16); x_2 = x_15; x_3 = x_17; goto _start; } } } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__5(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValD(x_1, x_2); switch (lean_obj_tag(x_3)) { case 0: { lean_object* x_4; x_4 = l_Lean_instFromJsonOption___rarg___closed__1; return x_4; } case 4: { lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); x_6 = lean_array_get_size(x_5); x_7 = lean_usize_of_nat(x_6); lean_dec(x_6); x_8 = 0; x_9 = x_5; x_10 = l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__6(x_7, x_8, x_9); x_11 = x_10; if (lean_obj_tag(x_11) == 0) { lean_object* x_12; x_12 = lean_box(0); return x_12; } else { uint8_t x_13; x_13 = !lean_is_exclusive(x_11); if (x_13 == 0) { lean_object* x_14; x_14 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_14, 0, x_11); return x_14; } else { lean_object* x_15; lean_object* x_16; lean_object* x_17; x_15 = lean_ctor_get(x_11, 0); lean_inc(x_15); lean_dec(x_11); x_16 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_16, 0, x_15); x_17 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_17, 0, x_16); return x_17; } } } default: { lean_object* x_18; lean_dec(x_3); x_18 = lean_box(0); return x_18; } } } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_577____closed__2; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_611____spec__2(x_1, x_2); if (lean_obj_tag(x_3) == 0) { lean_object* x_4; x_4 = lean_box(0); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); x_6 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__1; x_7 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_611____spec__2(x_1, x_6); if (lean_obj_tag(x_7) == 0) { lean_object* x_8; lean_dec(x_5); x_8 = lean_box(0); return x_8; } else { lean_object* x_9; lean_object* x_10; lean_object* x_11; x_9 = lean_ctor_get(x_7, 0); lean_inc(x_9); lean_dec(x_7); x_10 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__2; x_11 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1(x_1, x_10); if (lean_obj_tag(x_11) == 0) { lean_object* x_12; lean_dec(x_9); lean_dec(x_5); x_12 = lean_box(0); return x_12; } else { lean_object* x_13; lean_object* x_14; lean_object* x_15; x_13 = lean_ctor_get(x_11, 0); lean_inc(x_13); lean_dec(x_11); x_14 = l_Lean_JsonRpc_instToJsonMessage___closed__12; x_15 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__2(x_1, x_14); if (lean_obj_tag(x_15) == 0) { lean_object* x_16; lean_dec(x_13); lean_dec(x_9); lean_dec(x_5); x_16 = lean_box(0); return x_16; } else { lean_object* x_17; lean_object* x_18; lean_object* x_19; x_17 = lean_ctor_get(x_15, 0); lean_inc(x_17); lean_dec(x_15); x_18 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__3; x_19 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonDocumentFilter____x40_Lean_Data_Lsp_Basic___hyg_1639____spec__1(x_1, x_18); if (lean_obj_tag(x_19) == 0) { lean_object* x_20; lean_dec(x_17); lean_dec(x_13); lean_dec(x_9); lean_dec(x_5); x_20 = lean_box(0); return x_20; } else { lean_object* x_21; lean_object* x_22; lean_object* x_23; x_21 = lean_ctor_get(x_19, 0); lean_inc(x_21); lean_dec(x_19); x_22 = l_Lean_JsonRpc_instToJsonMessage___closed__10; x_23 = l_Lean_Json_getObjValAs_x3f___at_Lean_JsonRpc_instFromJsonMessage___spec__2(x_1, x_22); if (lean_obj_tag(x_23) == 0) { lean_object* x_24; lean_dec(x_21); lean_dec(x_17); lean_dec(x_13); lean_dec(x_9); lean_dec(x_5); x_24 = lean_box(0); return x_24; } else { lean_object* x_25; lean_object* x_26; lean_object* x_27; x_25 = lean_ctor_get(x_23, 0); lean_inc(x_25); lean_dec(x_23); x_26 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__4; x_27 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__3(x_1, x_26); if (lean_obj_tag(x_27) == 0) { lean_object* x_28; lean_dec(x_25); lean_dec(x_21); lean_dec(x_17); lean_dec(x_13); lean_dec(x_9); lean_dec(x_5); x_28 = lean_box(0); return x_28; } else { lean_object* x_29; lean_object* x_30; lean_object* x_31; x_29 = lean_ctor_get(x_27, 0); lean_inc(x_29); lean_dec(x_27); x_30 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__5; x_31 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__5(x_1, x_30); if (lean_obj_tag(x_31) == 0) { lean_object* x_32; lean_dec(x_29); lean_dec(x_25); lean_dec(x_21); lean_dec(x_17); lean_dec(x_13); lean_dec(x_9); lean_dec(x_5); x_32 = lean_box(0); return x_32; } else { uint8_t x_33; x_33 = !lean_is_exclusive(x_31); if (x_33 == 0) { lean_object* x_34; lean_object* x_35; x_34 = lean_ctor_get(x_31, 0); x_35 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_35, 0, x_5); lean_ctor_set(x_35, 1, x_9); lean_ctor_set(x_35, 2, x_13); lean_ctor_set(x_35, 3, x_17); lean_ctor_set(x_35, 4, x_21); lean_ctor_set(x_35, 5, x_25); lean_ctor_set(x_35, 6, x_29); lean_ctor_set(x_35, 7, x_34); lean_ctor_set(x_31, 0, x_35); return x_31; } else { lean_object* x_36; lean_object* x_37; lean_object* x_38; x_36 = lean_ctor_get(x_31, 0); lean_inc(x_36); lean_dec(x_31); x_37 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_37, 0, x_5); lean_ctor_set(x_37, 1, x_9); lean_ctor_set(x_37, 2, x_13); lean_ctor_set(x_37, 3, x_17); lean_ctor_set(x_37, 4, x_21); lean_ctor_set(x_37, 5, x_25); lean_ctor_set(x_37, 6, x_29); lean_ctor_set(x_37, 7, x_36); x_38 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_38, 0, x_37); return x_38; } } } } } } } } } } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__2___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__2(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__4___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___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__4(x_4, x_5, x_3); return x_6; } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__3___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__3(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____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___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__6(x_4, x_5, x_3); return x_6; } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__5___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__5(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857_(x_1); lean_dec(x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instFromJsonDiagnostic___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____boxed), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instFromJsonDiagnostic() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instFromJsonDiagnostic___closed__1; return x_1; } } static lean_object* _init_l_Lean_Lsp_PublishDiagnosticsParams_version_x3f___default() { _start: { lean_object* x_1; x_1 = lean_box(0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instInhabitedPublishDiagnosticsParams___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = lean_box(0); x_2 = l_Lean_instInhabitedParserDescr___closed__1; x_3 = l_Array_empty___closed__1; x_4 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_4, 0, x_2); lean_ctor_set(x_4, 1, x_1); lean_ctor_set(x_4, 2, x_3); return x_4; } } static lean_object* _init_l_Lean_Lsp_instInhabitedPublishDiagnosticsParams() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instInhabitedPublishDiagnosticsParams___closed__1; return x_1; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026__match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); x_6 = lean_ctor_get(x_1, 1); lean_inc(x_6); x_7 = lean_ctor_get(x_1, 2); lean_inc(x_7); lean_dec(x_1); x_8 = lean_ctor_get(x_2, 0); lean_inc(x_8); x_9 = lean_ctor_get(x_2, 1); lean_inc(x_9); x_10 = lean_ctor_get(x_2, 2); lean_inc(x_10); lean_dec(x_2); x_11 = lean_apply_6(x_3, x_5, x_6, x_7, x_8, x_9, x_10); return x_11; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026__match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026__match__1___rarg___boxed), 4, 0); return x_2; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026__match__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026__match__1___rarg(x_1, x_2, x_3, x_4); lean_dec(x_4); return x_5; } } uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026____spec__1(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_1) == 0) { if (lean_obj_tag(x_2) == 0) { uint8_t x_3; x_3 = 1; return x_3; } else { uint8_t x_4; x_4 = 0; return x_4; } } else { if (lean_obj_tag(x_2) == 0) { uint8_t x_5; x_5 = 0; return x_5; } else { lean_object* x_6; lean_object* x_7; uint8_t x_8; x_6 = lean_ctor_get(x_1, 0); x_7 = lean_ctor_get(x_2, 0); x_8 = lean_int_dec_eq(x_6, x_7); return x_8; } } } } uint8_t l_Array_isEqvAux___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026____spec__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; uint8_t x_8; x_7 = lean_array_get_size(x_4); x_8 = lean_nat_dec_lt(x_6, x_7); lean_dec(x_7); if (x_8 == 0) { uint8_t x_9; lean_dec(x_6); x_9 = 1; return x_9; } else { lean_object* x_10; lean_object* x_11; uint8_t x_12; x_10 = lean_array_fget(x_4, x_6); x_11 = lean_array_fget(x_5, x_6); x_12 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_649_(x_10, x_11); if (x_12 == 0) { uint8_t x_13; lean_dec(x_6); x_13 = 0; return x_13; } else { lean_object* x_14; lean_object* x_15; x_14 = lean_unsigned_to_nat(1u); x_15 = lean_nat_add(x_6, x_14); lean_dec(x_6); x_3 = lean_box(0); x_6 = x_15; goto _start; } } } } uint8_t l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026_(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; x_3 = lean_ctor_get(x_1, 0); x_4 = lean_ctor_get(x_1, 1); x_5 = lean_ctor_get(x_1, 2); x_6 = lean_ctor_get(x_2, 0); x_7 = lean_ctor_get(x_2, 1); x_8 = lean_ctor_get(x_2, 2); x_9 = lean_string_dec_eq(x_3, x_6); if (x_9 == 0) { uint8_t x_10; x_10 = 0; return x_10; } else { uint8_t x_11; x_11 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026____spec__1(x_4, x_7); if (x_11 == 0) { uint8_t x_12; x_12 = 0; return x_12; } else { lean_object* x_13; lean_object* x_14; uint8_t x_15; x_13 = lean_array_get_size(x_5); x_14 = lean_array_get_size(x_8); x_15 = lean_nat_dec_eq(x_13, x_14); lean_dec(x_14); lean_dec(x_13); if (x_15 == 0) { uint8_t x_16; x_16 = 0; return x_16; } else { lean_object* x_17; uint8_t x_18; x_17 = lean_unsigned_to_nat(0u); x_18 = l_Array_isEqvAux___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026____spec__2(x_5, x_8, lean_box(0), x_5, x_8, x_17); return x_18; } } } } } lean_object* l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026____spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_671____at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026____spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } lean_object* l_Array_isEqvAux___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026____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) { _start: { uint8_t x_7; lean_object* x_8; x_7 = l_Array_isEqvAux___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026____spec__2(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); x_8 = lean_box(x_7); return x_8; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026____boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026_(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } static lean_object* _init_l_Lean_Lsp_instBEqPublishDiagnosticsParams___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_beqPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1026____boxed), 2, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instBEqPublishDiagnosticsParams() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instBEqPublishDiagnosticsParams___closed__1; return x_1; } } lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101____spec__1(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { lean_object* x_3; lean_dec(x_1); x_3 = lean_box(0); return x_3; } else { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_4 = lean_ctor_get(x_2, 0); x_5 = lean_unsigned_to_nat(0u); lean_inc(x_4); x_6 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_6, 0, x_4); lean_ctor_set(x_6, 1, x_5); x_7 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_7, 0, x_6); x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_1); lean_ctor_set(x_8, 1, x_7); x_9 = lean_box(0); x_10 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_10, 0, x_8); lean_ctor_set(x_10, 1, x_9); return x_10; } } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101____spec__2(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; size_t x_11; size_t x_12; lean_object* x_13; lean_object* x_14; 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 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794_(x_9); x_11 = 1; x_12 = x_2 + x_11; x_13 = x_10; x_14 = lean_array_uset(x_8, x_2, x_13); x_2 = x_12; x_3 = x_14; goto _start; } } } static lean_object* _init_l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101____closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("diagnostics"); return x_1; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; size_t x_13; size_t x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); x_3 = lean_ctor_get(x_1, 1); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 2); lean_inc(x_4); lean_dec(x_1); x_5 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_5, 0, x_2); x_6 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_577____closed__1; x_7 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_7, 0, x_6); lean_ctor_set(x_7, 1, x_5); x_8 = lean_box(0); x_9 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_9, 0, x_7); lean_ctor_set(x_9, 1, x_8); x_10 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonVersionedTextDocumentIdentifier____x40_Lean_Data_Lsp_Basic___hyg_1148____closed__1; x_11 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101____spec__1(x_10, x_3); lean_dec(x_3); x_12 = lean_array_get_size(x_4); x_13 = lean_usize_of_nat(x_12); lean_dec(x_12); x_14 = 0; x_15 = x_4; x_16 = l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101____spec__2(x_13, x_14, x_15); x_17 = x_16; x_18 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_18, 0, x_17); x_19 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101____closed__1; x_20 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_20, 0, x_19); lean_ctor_set(x_20, 1, x_18); x_21 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_21, 0, x_20); lean_ctor_set(x_21, 1, x_8); x_22 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_22, 0, x_21); lean_ctor_set(x_22, 1, x_8); x_23 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_23, 0, x_11); lean_ctor_set(x_23, 1, x_22); x_24 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_24, 0, x_9); lean_ctor_set(x_24, 1, x_23); x_25 = l_List_join___rarg(x_24); x_26 = l_Lean_Json_mkObj(x_25); return x_26; } } lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101____spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101____spec__1(x_1, x_2); lean_dec(x_2); return x_3; } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101____spec__2___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___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101____spec__2(x_4, x_5, x_3); return x_6; } } static lean_object* _init_l_Lean_Lsp_instToJsonPublishDiagnosticsParams___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101_), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instToJsonPublishDiagnosticsParams() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instToJsonPublishDiagnosticsParams___closed__1; return x_1; } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValD(x_1, x_2); if (lean_obj_tag(x_3) == 0) { lean_object* x_4; x_4 = l_Lean_instFromJsonOption___rarg___closed__1; return x_4; } else { lean_object* x_5; x_5 = l_Lean_Json_getInt_x3f(x_3); lean_dec(x_3); if (lean_obj_tag(x_5) == 0) { lean_object* x_6; x_6 = lean_box(0); return x_6; } else { uint8_t x_7; x_7 = !lean_is_exclusive(x_5); if (x_7 == 0) { lean_object* x_8; x_8 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_8, 0, x_5); return x_8; } else { lean_object* x_9; lean_object* x_10; lean_object* x_11; x_9 = lean_ctor_get(x_5, 0); lean_inc(x_9); lean_dec(x_5); x_10 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_10, 0, x_9); x_11 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_11, 0, x_10); return x_11; } } } } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____spec__3(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; lean_object* x_6; x_5 = x_3; x_6 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_6, 0, x_5); return x_6; } else { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_7 = lean_array_uget(x_3, x_2); x_8 = lean_unsigned_to_nat(0u); x_9 = lean_array_uset(x_3, x_2, x_8); x_10 = x_7; x_11 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857_(x_10); lean_dec(x_10); if (lean_obj_tag(x_11) == 0) { lean_object* x_12; lean_dec(x_9); x_12 = lean_box(0); return x_12; } else { lean_object* x_13; size_t x_14; size_t x_15; lean_object* x_16; lean_object* x_17; x_13 = lean_ctor_get(x_11, 0); lean_inc(x_13); lean_dec(x_11); x_14 = 1; x_15 = x_2 + x_14; x_16 = x_13; x_17 = lean_array_uset(x_9, x_2, x_16); x_2 = x_15; x_3 = x_17; goto _start; } } } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____spec__2(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValD(x_1, x_2); if (lean_obj_tag(x_3) == 4) { lean_object* x_4; lean_object* x_5; size_t x_6; size_t x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_4 = lean_ctor_get(x_3, 0); lean_inc(x_4); lean_dec(x_3); x_5 = lean_array_get_size(x_4); x_6 = lean_usize_of_nat(x_5); lean_dec(x_5); x_7 = 0; x_8 = x_4; x_9 = l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____spec__3(x_6, x_7, x_8); x_10 = x_9; return x_10; } else { lean_object* x_11; lean_dec(x_3); x_11 = lean_box(0); return x_11; } } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_577____closed__1; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_611____spec__1(x_1, x_2); if (lean_obj_tag(x_3) == 0) { lean_object* x_4; x_4 = lean_box(0); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); x_6 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonVersionedTextDocumentIdentifier____x40_Lean_Data_Lsp_Basic___hyg_1148____closed__1; x_7 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____spec__1(x_1, x_6); if (lean_obj_tag(x_7) == 0) { lean_object* x_8; lean_dec(x_5); x_8 = lean_box(0); return x_8; } else { lean_object* x_9; lean_object* x_10; lean_object* x_11; x_9 = lean_ctor_get(x_7, 0); lean_inc(x_9); lean_dec(x_7); x_10 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101____closed__1; x_11 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____spec__2(x_1, x_10); if (lean_obj_tag(x_11) == 0) { lean_object* x_12; lean_dec(x_9); lean_dec(x_5); x_12 = lean_box(0); return x_12; } else { uint8_t x_13; x_13 = !lean_is_exclusive(x_11); if (x_13 == 0) { lean_object* x_14; lean_object* x_15; x_14 = lean_ctor_get(x_11, 0); x_15 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_15, 0, x_5); lean_ctor_set(x_15, 1, x_9); lean_ctor_set(x_15, 2, x_14); lean_ctor_set(x_11, 0, x_15); return x_11; } else { lean_object* x_16; lean_object* x_17; lean_object* x_18; x_16 = lean_ctor_get(x_11, 0); lean_inc(x_16); lean_dec(x_11); x_17 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_17, 0, x_5); lean_ctor_set(x_17, 1, x_9); lean_ctor_set(x_17, 2, x_16); x_18 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_18, 0, x_17); return x_18; } } } } } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____spec__3___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___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____spec__3(x_4, x_5, x_3); return x_6; } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____spec__2___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____spec__2(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139_(x_1); lean_dec(x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instFromJsonPublishDiagnosticsParams___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1139____boxed), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instFromJsonPublishDiagnosticsParams() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instFromJsonPublishDiagnosticsParams___closed__1; return x_1; } } lean_object* l_Lean_Lsp_msgToDiagnostic_match__1___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_Lsp_msgToDiagnostic_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Lsp_msgToDiagnostic_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Lsp_msgToDiagnostic_match__2___rarg(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { switch (x_1) { case 0: { lean_object* x_5; lean_object* x_6; lean_dec(x_4); lean_dec(x_3); x_5 = lean_box(0); x_6 = lean_apply_1(x_2, x_5); return x_6; } case 1: { lean_object* x_7; lean_object* x_8; lean_dec(x_4); lean_dec(x_2); x_7 = lean_box(0); x_8 = lean_apply_1(x_3, x_7); return x_8; } default: { lean_object* x_9; lean_object* x_10; lean_dec(x_3); lean_dec(x_2); x_9 = lean_box(0); x_10 = lean_apply_1(x_4, x_9); return x_10; } } } } lean_object* l_Lean_Lsp_msgToDiagnostic_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Lsp_msgToDiagnostic_match__2___rarg___boxed), 4, 0); return x_2; } } lean_object* l_Lean_Lsp_msgToDiagnostic_match__2___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { uint8_t x_5; lean_object* x_6; x_5 = lean_unbox(x_1); lean_dec(x_1); x_6 = l_Lean_Lsp_msgToDiagnostic_match__2___rarg(x_5, x_2, x_3, x_4); return x_6; } } static lean_object* _init_l_Lean_Lsp_msgToDiagnostic___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("Lean 4 server"); return x_1; } } static lean_object* _init_l_Lean_Lsp_msgToDiagnostic___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Lsp_msgToDiagnostic___closed__1; x_2 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } lean_object* l_Lean_Lsp_msgToDiagnostic(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; uint8_t x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_4 = lean_ctor_get(x_2, 1); lean_inc(x_4); lean_inc(x_4); x_5 = l_Lean_FileMap_leanPosToLspPos(x_1, x_4); x_6 = lean_ctor_get(x_2, 2); lean_inc(x_6); x_7 = lean_ctor_get_uint8(x_2, sizeof(void*)*5); x_8 = lean_ctor_get(x_2, 4); lean_inc(x_8); lean_dec(x_2); x_9 = l_Lean_MessageData_toString(x_8, x_3); if (lean_obj_tag(x_6) == 0) { lean_inc(x_4); x_10 = x_4; goto block_77; } else { lean_object* x_78; x_78 = lean_ctor_get(x_6, 0); lean_inc(x_78); x_10 = x_78; goto block_77; } block_77: { lean_object* x_11; lean_object* x_12; lean_object* x_13; x_11 = l_Lean_FileMap_leanPosToLspPos(x_1, x_10); lean_inc(x_5); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_5); lean_ctor_set(x_12, 1, x_11); if (lean_obj_tag(x_6) == 0) { lean_dec(x_4); lean_inc(x_5); x_13 = x_5; goto block_66; } else { lean_object* x_67; lean_object* x_68; lean_object* x_69; uint8_t x_70; x_67 = lean_ctor_get(x_6, 0); lean_inc(x_67); lean_dec(x_6); x_68 = lean_ctor_get(x_4, 0); lean_inc(x_68); lean_dec(x_4); x_69 = lean_ctor_get(x_67, 0); lean_inc(x_69); x_70 = lean_nat_dec_lt(x_68, x_69); lean_dec(x_69); if (x_70 == 0) { lean_object* x_71; lean_dec(x_68); x_71 = l_Lean_FileMap_leanPosToLspPos(x_1, x_67); x_13 = x_71; goto block_66; } else { lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_dec(x_67); x_72 = lean_unsigned_to_nat(1u); x_73 = lean_nat_add(x_68, x_72); lean_dec(x_68); x_74 = lean_unsigned_to_nat(0u); x_75 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_75, 0, x_73); lean_ctor_set(x_75, 1, x_74); x_76 = l_Lean_FileMap_leanPosToLspPos(x_1, x_75); x_13 = x_76; goto block_66; } } block_66: { lean_object* x_14; x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_5); lean_ctor_set(x_14, 1, x_13); switch (x_7) { case 0: { if (lean_obj_tag(x_9) == 0) { uint8_t x_15; x_15 = !lean_is_exclusive(x_9); if (x_15 == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; x_16 = lean_ctor_get(x_9, 0); x_17 = lean_box(0); x_18 = l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__2; x_19 = l_Lean_Lsp_msgToDiagnostic___closed__2; x_20 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_20, 0, x_14); lean_ctor_set(x_20, 1, x_12); lean_ctor_set(x_20, 2, x_18); lean_ctor_set(x_20, 3, x_17); lean_ctor_set(x_20, 4, x_19); lean_ctor_set(x_20, 5, x_16); lean_ctor_set(x_20, 6, x_17); lean_ctor_set(x_20, 7, x_17); lean_ctor_set(x_9, 0, x_20); return x_9; } else { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; x_21 = lean_ctor_get(x_9, 0); x_22 = lean_ctor_get(x_9, 1); lean_inc(x_22); lean_inc(x_21); lean_dec(x_9); x_23 = lean_box(0); x_24 = l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__2; x_25 = l_Lean_Lsp_msgToDiagnostic___closed__2; x_26 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_26, 0, x_14); lean_ctor_set(x_26, 1, x_12); lean_ctor_set(x_26, 2, x_24); lean_ctor_set(x_26, 3, x_23); lean_ctor_set(x_26, 4, x_25); lean_ctor_set(x_26, 5, x_21); lean_ctor_set(x_26, 6, x_23); lean_ctor_set(x_26, 7, x_23); x_27 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_27, 0, x_26); lean_ctor_set(x_27, 1, x_22); return x_27; } } else { uint8_t x_28; lean_dec(x_14); lean_dec(x_12); x_28 = !lean_is_exclusive(x_9); if (x_28 == 0) { return x_9; } else { lean_object* x_29; lean_object* x_30; lean_object* x_31; x_29 = lean_ctor_get(x_9, 0); x_30 = lean_ctor_get(x_9, 1); lean_inc(x_30); lean_inc(x_29); lean_dec(x_9); x_31 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_31, 0, x_29); lean_ctor_set(x_31, 1, x_30); return x_31; } } } case 1: { if (lean_obj_tag(x_9) == 0) { uint8_t x_32; x_32 = !lean_is_exclusive(x_9); if (x_32 == 0) { lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; x_33 = lean_ctor_get(x_9, 0); x_34 = lean_box(0); x_35 = l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__3; x_36 = l_Lean_Lsp_msgToDiagnostic___closed__2; x_37 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_37, 0, x_14); lean_ctor_set(x_37, 1, x_12); lean_ctor_set(x_37, 2, x_35); lean_ctor_set(x_37, 3, x_34); lean_ctor_set(x_37, 4, x_36); lean_ctor_set(x_37, 5, x_33); lean_ctor_set(x_37, 6, x_34); lean_ctor_set(x_37, 7, x_34); lean_ctor_set(x_9, 0, x_37); return x_9; } else { lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; x_38 = lean_ctor_get(x_9, 0); x_39 = lean_ctor_get(x_9, 1); lean_inc(x_39); lean_inc(x_38); lean_dec(x_9); x_40 = lean_box(0); x_41 = l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__3; x_42 = l_Lean_Lsp_msgToDiagnostic___closed__2; x_43 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_43, 0, x_14); lean_ctor_set(x_43, 1, x_12); lean_ctor_set(x_43, 2, x_41); lean_ctor_set(x_43, 3, x_40); lean_ctor_set(x_43, 4, x_42); lean_ctor_set(x_43, 5, x_38); lean_ctor_set(x_43, 6, x_40); lean_ctor_set(x_43, 7, x_40); x_44 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_44, 0, x_43); lean_ctor_set(x_44, 1, x_39); return x_44; } } else { uint8_t x_45; lean_dec(x_14); lean_dec(x_12); x_45 = !lean_is_exclusive(x_9); if (x_45 == 0) { return x_9; } else { lean_object* x_46; lean_object* x_47; lean_object* x_48; x_46 = lean_ctor_get(x_9, 0); x_47 = lean_ctor_get(x_9, 1); lean_inc(x_47); lean_inc(x_46); lean_dec(x_9); x_48 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_48, 0, x_46); lean_ctor_set(x_48, 1, x_47); return x_48; } } } default: { if (lean_obj_tag(x_9) == 0) { uint8_t x_49; x_49 = !lean_is_exclusive(x_9); if (x_49 == 0) { lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; x_50 = lean_ctor_get(x_9, 0); x_51 = lean_box(0); x_52 = l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__4; x_53 = l_Lean_Lsp_msgToDiagnostic___closed__2; x_54 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_54, 0, x_14); lean_ctor_set(x_54, 1, x_12); lean_ctor_set(x_54, 2, x_52); lean_ctor_set(x_54, 3, x_51); lean_ctor_set(x_54, 4, x_53); lean_ctor_set(x_54, 5, x_50); lean_ctor_set(x_54, 6, x_51); lean_ctor_set(x_54, 7, x_51); lean_ctor_set(x_9, 0, x_54); return x_9; } 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; x_55 = lean_ctor_get(x_9, 0); x_56 = lean_ctor_get(x_9, 1); lean_inc(x_56); lean_inc(x_55); lean_dec(x_9); x_57 = lean_box(0); x_58 = l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__4; x_59 = l_Lean_Lsp_msgToDiagnostic___closed__2; x_60 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_60, 0, x_14); lean_ctor_set(x_60, 1, x_12); lean_ctor_set(x_60, 2, x_58); lean_ctor_set(x_60, 3, x_57); lean_ctor_set(x_60, 4, x_59); lean_ctor_set(x_60, 5, x_55); lean_ctor_set(x_60, 6, x_57); lean_ctor_set(x_60, 7, x_57); x_61 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_61, 0, x_60); lean_ctor_set(x_61, 1, x_56); return x_61; } } else { uint8_t x_62; lean_dec(x_14); lean_dec(x_12); x_62 = !lean_is_exclusive(x_9); if (x_62 == 0) { return x_9; } else { lean_object* x_63; lean_object* x_64; lean_object* x_65; x_63 = lean_ctor_get(x_9, 0); x_64 = lean_ctor_get(x_9, 1); lean_inc(x_64); lean_inc(x_63); lean_dec(x_9); x_65 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_65, 0, x_63); lean_ctor_set(x_65, 1, x_64); return x_65; } } } } } } } } lean_object* l_Lean_Lsp_msgToDiagnostic___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_Lsp_msgToDiagnostic(x_1, x_2, x_3); lean_dec(x_1); return x_4; } } lean_object* initialize_Init(lean_object*); lean_object* initialize_Lean_Data_Json(lean_object*); lean_object* initialize_Lean_Data_Lsp_Basic(lean_object*); lean_object* initialize_Lean_Data_Lsp_Utf16(lean_object*); lean_object* initialize_Lean_Message(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Data_Lsp_Diagnostics(lean_object* w) { lean_object * res; if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); _G_initialized = true; res = initialize_Init(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Data_Json(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Data_Lsp_Basic(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Data_Lsp_Utf16(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Message(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_Lsp_instInhabitedDiagnosticSeverity = _init_l_Lean_Lsp_instInhabitedDiagnosticSeverity(); l_Lean_Lsp_instBEqDiagnosticSeverity___closed__1 = _init_l_Lean_Lsp_instBEqDiagnosticSeverity___closed__1(); lean_mark_persistent(l_Lean_Lsp_instBEqDiagnosticSeverity___closed__1); l_Lean_Lsp_instBEqDiagnosticSeverity = _init_l_Lean_Lsp_instBEqDiagnosticSeverity(); lean_mark_persistent(l_Lean_Lsp_instBEqDiagnosticSeverity); l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__1 = _init_l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__1(); lean_mark_persistent(l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__1); l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__2 = _init_l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__2(); lean_mark_persistent(l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__2); l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__3 = _init_l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__3(); lean_mark_persistent(l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__3); l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__4 = _init_l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__4(); lean_mark_persistent(l_Lean_Lsp_instFromJsonDiagnosticSeverity___closed__4); l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__1 = _init_l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__1(); lean_mark_persistent(l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__1); l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__2 = _init_l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__2(); lean_mark_persistent(l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__2); l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__3 = _init_l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__3(); lean_mark_persistent(l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__3); l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__4 = _init_l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__4(); lean_mark_persistent(l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__4); l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__5 = _init_l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__5(); lean_mark_persistent(l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__5); l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__6 = _init_l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__6(); lean_mark_persistent(l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__6); l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__7 = _init_l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__7(); lean_mark_persistent(l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__7); l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__8 = _init_l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__8(); lean_mark_persistent(l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__8); l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__9 = _init_l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__9(); lean_mark_persistent(l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__9); l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__10 = _init_l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__10(); lean_mark_persistent(l_Lean_Lsp_instToJsonDiagnosticSeverity___closed__10); l_Lean_Lsp_instInhabitedDiagnosticCode___closed__1 = _init_l_Lean_Lsp_instInhabitedDiagnosticCode___closed__1(); lean_mark_persistent(l_Lean_Lsp_instInhabitedDiagnosticCode___closed__1); l_Lean_Lsp_instInhabitedDiagnosticCode = _init_l_Lean_Lsp_instInhabitedDiagnosticCode(); lean_mark_persistent(l_Lean_Lsp_instInhabitedDiagnosticCode); l_Lean_Lsp_instBEqDiagnosticCode___closed__1 = _init_l_Lean_Lsp_instBEqDiagnosticCode___closed__1(); lean_mark_persistent(l_Lean_Lsp_instBEqDiagnosticCode___closed__1); l_Lean_Lsp_instBEqDiagnosticCode = _init_l_Lean_Lsp_instBEqDiagnosticCode(); lean_mark_persistent(l_Lean_Lsp_instBEqDiagnosticCode); l_Lean_Lsp_instInhabitedDiagnosticTag = _init_l_Lean_Lsp_instInhabitedDiagnosticTag(); l_Lean_Lsp_instBEqDiagnosticTag___closed__1 = _init_l_Lean_Lsp_instBEqDiagnosticTag___closed__1(); lean_mark_persistent(l_Lean_Lsp_instBEqDiagnosticTag___closed__1); l_Lean_Lsp_instBEqDiagnosticTag = _init_l_Lean_Lsp_instBEqDiagnosticTag(); lean_mark_persistent(l_Lean_Lsp_instBEqDiagnosticTag); l_Lean_Lsp_instFromJsonDiagnosticTag___closed__1 = _init_l_Lean_Lsp_instFromJsonDiagnosticTag___closed__1(); lean_mark_persistent(l_Lean_Lsp_instFromJsonDiagnosticTag___closed__1); l_Lean_Lsp_instFromJsonDiagnosticTag___closed__2 = _init_l_Lean_Lsp_instFromJsonDiagnosticTag___closed__2(); lean_mark_persistent(l_Lean_Lsp_instFromJsonDiagnosticTag___closed__2); l_Lean_Lsp_instToJsonDiagnosticTag___closed__1 = _init_l_Lean_Lsp_instToJsonDiagnosticTag___closed__1(); lean_mark_persistent(l_Lean_Lsp_instToJsonDiagnosticTag___closed__1); l_Lean_Lsp_instToJsonDiagnosticTag___closed__2 = _init_l_Lean_Lsp_instToJsonDiagnosticTag___closed__2(); lean_mark_persistent(l_Lean_Lsp_instToJsonDiagnosticTag___closed__2); l_Lean_Lsp_instToJsonDiagnosticTag___closed__3 = _init_l_Lean_Lsp_instToJsonDiagnosticTag___closed__3(); lean_mark_persistent(l_Lean_Lsp_instToJsonDiagnosticTag___closed__3); l_Lean_Lsp_instToJsonDiagnosticTag___closed__4 = _init_l_Lean_Lsp_instToJsonDiagnosticTag___closed__4(); lean_mark_persistent(l_Lean_Lsp_instToJsonDiagnosticTag___closed__4); l_Lean_Lsp_instInhabitedDiagnosticRelatedInformation___closed__1 = _init_l_Lean_Lsp_instInhabitedDiagnosticRelatedInformation___closed__1(); lean_mark_persistent(l_Lean_Lsp_instInhabitedDiagnosticRelatedInformation___closed__1); l_Lean_Lsp_instInhabitedDiagnosticRelatedInformation = _init_l_Lean_Lsp_instInhabitedDiagnosticRelatedInformation(); lean_mark_persistent(l_Lean_Lsp_instInhabitedDiagnosticRelatedInformation); l_Lean_Lsp_instBEqDiagnosticRelatedInformation___closed__1 = _init_l_Lean_Lsp_instBEqDiagnosticRelatedInformation___closed__1(); lean_mark_persistent(l_Lean_Lsp_instBEqDiagnosticRelatedInformation___closed__1); l_Lean_Lsp_instBEqDiagnosticRelatedInformation = _init_l_Lean_Lsp_instBEqDiagnosticRelatedInformation(); lean_mark_persistent(l_Lean_Lsp_instBEqDiagnosticRelatedInformation); l_Lean_Lsp_instToJsonDiagnosticRelatedInformation___closed__1 = _init_l_Lean_Lsp_instToJsonDiagnosticRelatedInformation___closed__1(); lean_mark_persistent(l_Lean_Lsp_instToJsonDiagnosticRelatedInformation___closed__1); l_Lean_Lsp_instToJsonDiagnosticRelatedInformation = _init_l_Lean_Lsp_instToJsonDiagnosticRelatedInformation(); lean_mark_persistent(l_Lean_Lsp_instToJsonDiagnosticRelatedInformation); l_Lean_Lsp_instFromJsonDiagnosticRelatedInformation___closed__1 = _init_l_Lean_Lsp_instFromJsonDiagnosticRelatedInformation___closed__1(); lean_mark_persistent(l_Lean_Lsp_instFromJsonDiagnosticRelatedInformation___closed__1); l_Lean_Lsp_instFromJsonDiagnosticRelatedInformation = _init_l_Lean_Lsp_instFromJsonDiagnosticRelatedInformation(); lean_mark_persistent(l_Lean_Lsp_instFromJsonDiagnosticRelatedInformation); l_Lean_Lsp_Diagnostic_severity_x3f___default = _init_l_Lean_Lsp_Diagnostic_severity_x3f___default(); lean_mark_persistent(l_Lean_Lsp_Diagnostic_severity_x3f___default); l_Lean_Lsp_Diagnostic_code_x3f___default = _init_l_Lean_Lsp_Diagnostic_code_x3f___default(); lean_mark_persistent(l_Lean_Lsp_Diagnostic_code_x3f___default); l_Lean_Lsp_Diagnostic_source_x3f___default = _init_l_Lean_Lsp_Diagnostic_source_x3f___default(); lean_mark_persistent(l_Lean_Lsp_Diagnostic_source_x3f___default); l_Lean_Lsp_Diagnostic_tags_x3f___default = _init_l_Lean_Lsp_Diagnostic_tags_x3f___default(); lean_mark_persistent(l_Lean_Lsp_Diagnostic_tags_x3f___default); l_Lean_Lsp_Diagnostic_relatedInformation_x3f___default = _init_l_Lean_Lsp_Diagnostic_relatedInformation_x3f___default(); lean_mark_persistent(l_Lean_Lsp_Diagnostic_relatedInformation_x3f___default); l_Lean_Lsp_instInhabitedDiagnostic___closed__1 = _init_l_Lean_Lsp_instInhabitedDiagnostic___closed__1(); lean_mark_persistent(l_Lean_Lsp_instInhabitedDiagnostic___closed__1); l_Lean_Lsp_instInhabitedDiagnostic = _init_l_Lean_Lsp_instInhabitedDiagnostic(); lean_mark_persistent(l_Lean_Lsp_instInhabitedDiagnostic); l_Lean_Lsp_instBEqDiagnostic___closed__1 = _init_l_Lean_Lsp_instBEqDiagnostic___closed__1(); lean_mark_persistent(l_Lean_Lsp_instBEqDiagnostic___closed__1); l_Lean_Lsp_instBEqDiagnostic = _init_l_Lean_Lsp_instBEqDiagnostic(); lean_mark_persistent(l_Lean_Lsp_instBEqDiagnostic); l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__4___closed__1 = _init_l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__4___closed__1(); lean_mark_persistent(l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__4___closed__1); l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__4___closed__2 = _init_l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__4___closed__2(); lean_mark_persistent(l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____spec__4___closed__2); l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__1 = _init_l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__1(); lean_mark_persistent(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__1); l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__2 = _init_l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__2(); lean_mark_persistent(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__2); l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__3 = _init_l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__3(); lean_mark_persistent(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__3); l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__4 = _init_l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__4(); lean_mark_persistent(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__4); l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__5 = _init_l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__5(); lean_mark_persistent(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_794____closed__5); l_Lean_Lsp_instToJsonDiagnostic___closed__1 = _init_l_Lean_Lsp_instToJsonDiagnostic___closed__1(); lean_mark_persistent(l_Lean_Lsp_instToJsonDiagnostic___closed__1); l_Lean_Lsp_instToJsonDiagnostic = _init_l_Lean_Lsp_instToJsonDiagnostic(); lean_mark_persistent(l_Lean_Lsp_instToJsonDiagnostic); l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__1 = _init_l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__1(); lean_mark_persistent(l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__1); l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__2 = _init_l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__2(); lean_mark_persistent(l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__2); l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__3 = _init_l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__3(); lean_mark_persistent(l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__3); l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__4 = _init_l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__4(); lean_mark_persistent(l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__1___closed__4); l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__4___closed__1 = _init_l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__4___closed__1(); lean_mark_persistent(l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__4___closed__1); l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__4___closed__2 = _init_l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__4___closed__2(); lean_mark_persistent(l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_fromJsonDiagnostic____x40_Lean_Data_Lsp_Diagnostics___hyg_857____spec__4___closed__2); l_Lean_Lsp_instFromJsonDiagnostic___closed__1 = _init_l_Lean_Lsp_instFromJsonDiagnostic___closed__1(); lean_mark_persistent(l_Lean_Lsp_instFromJsonDiagnostic___closed__1); l_Lean_Lsp_instFromJsonDiagnostic = _init_l_Lean_Lsp_instFromJsonDiagnostic(); lean_mark_persistent(l_Lean_Lsp_instFromJsonDiagnostic); l_Lean_Lsp_PublishDiagnosticsParams_version_x3f___default = _init_l_Lean_Lsp_PublishDiagnosticsParams_version_x3f___default(); lean_mark_persistent(l_Lean_Lsp_PublishDiagnosticsParams_version_x3f___default); l_Lean_Lsp_instInhabitedPublishDiagnosticsParams___closed__1 = _init_l_Lean_Lsp_instInhabitedPublishDiagnosticsParams___closed__1(); lean_mark_persistent(l_Lean_Lsp_instInhabitedPublishDiagnosticsParams___closed__1); l_Lean_Lsp_instInhabitedPublishDiagnosticsParams = _init_l_Lean_Lsp_instInhabitedPublishDiagnosticsParams(); lean_mark_persistent(l_Lean_Lsp_instInhabitedPublishDiagnosticsParams); l_Lean_Lsp_instBEqPublishDiagnosticsParams___closed__1 = _init_l_Lean_Lsp_instBEqPublishDiagnosticsParams___closed__1(); lean_mark_persistent(l_Lean_Lsp_instBEqPublishDiagnosticsParams___closed__1); l_Lean_Lsp_instBEqPublishDiagnosticsParams = _init_l_Lean_Lsp_instBEqPublishDiagnosticsParams(); lean_mark_persistent(l_Lean_Lsp_instBEqPublishDiagnosticsParams); l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101____closed__1 = _init_l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101____closed__1(); lean_mark_persistent(l___private_Lean_Data_Lsp_Diagnostics_0__Lean_Lsp_toJsonPublishDiagnosticsParams____x40_Lean_Data_Lsp_Diagnostics___hyg_1101____closed__1); l_Lean_Lsp_instToJsonPublishDiagnosticsParams___closed__1 = _init_l_Lean_Lsp_instToJsonPublishDiagnosticsParams___closed__1(); lean_mark_persistent(l_Lean_Lsp_instToJsonPublishDiagnosticsParams___closed__1); l_Lean_Lsp_instToJsonPublishDiagnosticsParams = _init_l_Lean_Lsp_instToJsonPublishDiagnosticsParams(); lean_mark_persistent(l_Lean_Lsp_instToJsonPublishDiagnosticsParams); l_Lean_Lsp_instFromJsonPublishDiagnosticsParams___closed__1 = _init_l_Lean_Lsp_instFromJsonPublishDiagnosticsParams___closed__1(); lean_mark_persistent(l_Lean_Lsp_instFromJsonPublishDiagnosticsParams___closed__1); l_Lean_Lsp_instFromJsonPublishDiagnosticsParams = _init_l_Lean_Lsp_instFromJsonPublishDiagnosticsParams(); lean_mark_persistent(l_Lean_Lsp_instFromJsonPublishDiagnosticsParams); l_Lean_Lsp_msgToDiagnostic___closed__1 = _init_l_Lean_Lsp_msgToDiagnostic___closed__1(); lean_mark_persistent(l_Lean_Lsp_msgToDiagnostic___closed__1); l_Lean_Lsp_msgToDiagnostic___closed__2 = _init_l_Lean_Lsp_msgToDiagnostic___closed__2(); lean_mark_persistent(l_Lean_Lsp_msgToDiagnostic___closed__2); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus } #endif
ChrisHughes24/lean4
stage0/stdlib/Lean/Compiler/IR/EmitC.c
// Lean compiler output // Module: Lean.Compiler.IR.EmitC // Imports: Init Lean.Runtime Lean.Compiler.NameMangling Lean.Compiler.ExportAttr Lean.Compiler.InitAttr Lean.Compiler.IR.CompilerM Lean.Compiler.IR.EmitUtil Lean.Compiler.IR.NormIds Lean.Compiler.IR.SimpCase Lean.Compiler.IR.Boxing #include <lean/lean.h> #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wunused-label" #elif defined(__GNUC__) && !defined(__CLANG__) #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif #ifdef __cplusplus extern "C" { #endif lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFnBody___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_reverse___rarg(lean_object*); lean_object* l_Std_RBNode_revFold___at_Lean_IR_EmitC_emitFnDecls___spec__4(lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitFileHeader___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMarkPersistent___closed__1; lean_object* l_Lean_IR_EmitC_emitCase___closed__1; lean_object* l_Lean_IR_EmitC_emitBlock___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_argToCString___closed__1; lean_object* l_Lean_IR_EmitC_emitReuse___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitSSet___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_string_push(lean_object*, uint32_t); extern lean_object* l_Lean_Name_toString___closed__1; lean_object* l_Lean_IR_EmitC_toStringArgs(lean_object*); lean_object* l_Lean_IR_EmitC_emitSProj___closed__4; lean_object* l_Lean_IR_EmitC_toCType___closed__7; lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__1; lean_object* l_Lean_IR_EmitC_emitCInitName(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitInc___lambda__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_List_forM___at_Lean_IR_EmitC_emitFnDecls___spec__5___closed__2; lean_object* l_Lean_IR_EmitC_emitMarkPersistent___boxed(lean_object*, lean_object*, lean_object*, lean_object*); size_t l_USize_add(size_t, size_t); lean_object* l_Std_HashMapImp_find_x3f___at_Lean_IR_EmitC_getJPParams___spec__1(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitUnbox___closed__4; lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__4; lean_object* l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; lean_object* l_Lean_IR_EmitC_quoteString___lambda__1(lean_object*, uint32_t); lean_object* l_Lean_IR_EmitC_emitSetTag(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_forM___at_Lean_IR_EmitC_emitMainFn___spec__3___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitProj(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_forM___at_Lean_IR_EmitC_emitInitFn___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__3___closed__3; lean_object* l_Lean_IR_EmitC_emitDel___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_getJPParams_match__1___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l_String_instInhabitedString; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__4___closed__1; lean_object* l_Lean_IR_EmitC_emitMainFn___closed__1; lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__8; lean_object* l_Lean_IR_EmitC_emitFileHeader___boxed(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitDeclAux___lambda__1___closed__1; lean_object* l_Lean_IR_EmitC_emitDel___closed__1; lean_object* l_Lean_IR_EmitC_emit(lean_object*); lean_object* l_List_foldl___at_Lean_IR_EmitC_emitFnDecls___spec__1(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__17; lean_object* l_Lean_IR_EmitC_emitDeclAux___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitIsShared(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_div(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_throwUnknownVar___rarg___closed__1; lean_object* l_Std_RBNode_insert___at_Lean_NameSet_insert___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__4___closed__2; lean_object* l_Lean_IR_EmitC_emitInitFn___closed__10; lean_object* l_Lean_IR_EmitC_declareVars___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitCase___closed__2; lean_object* l_List_foldl___at_Lean_IR_EmitC_emitFnDecls___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__11; lean_object* l_Nat_anyAux___at_Lean_IR_EmitC_overwriteParam___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFnDeclAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitAllocCtor___closed__1; lean_object* l_Lean_IR_EmitC_emitCName___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Char_quote___closed__1; lean_object* l_Lean_IR_EmitC_emitFnDeclAux(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___closed__2; extern lean_object* l_Lean_Parser_Syntax_addPrec___closed__2; lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitCtor(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_USize_decEq(size_t, size_t); lean_object* lean_array_uget(lean_object*, size_t); lean_object* l_Nat_foldM_loop___at_Lean_IR_EmitC_emitSimpleExternalCall___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitAllocCtor___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_toCType___closed__3; lean_object* l_Lean_IR_EmitC_emitInc___closed__3; extern lean_object* l_Lean_IR_instToStringJoinPointId___closed__1; lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__9; lean_object* l_Lean_IR_EmitC_getDecl___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_toHexDigit(lean_object*); lean_object* l_Lean_IR_EmitC_emitJmp___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Environment_imports(lean_object*); lean_object* l_Lean_IR_EmitC_getDecl_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitSProj___closed__2; lean_object* l_Lean_IR_EmitC_throwUnknownVar___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitDeclInit_match__1(lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitArgs___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_collectUsedDecls(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitSSet___closed__6; lean_object* l_Lean_IR_EmitC_emitInc___closed__5; lean_object* l_Lean_IR_EmitC_isTailCall_match__1(lean_object*); lean_object* l_Lean_IR_EmitC_emitSProj___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__20; lean_object* l_Lean_IR_EmitC_emitBlock_match__1(lean_object*); lean_object* l_Lean_IR_EmitC_isIf_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitSProj___closed__1; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__10; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__4; extern lean_object* l_Array_empty___closed__1; lean_object* l_Lean_IR_EmitC_emitBoxFn_match__1(lean_object*); lean_object* l_Lean_IR_EmitC_emitSProj(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitSSet_match__1(lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitJmp___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_getEnv___boxed(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_toCType___closed__5; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__7; lean_object* l_Lean_IR_EmitC_getJPParams_match__1(lean_object*); lean_object* l_Lean_IR_EmitC_emitDeclAux___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitUnbox___closed__2; lean_object* l_Lean_IR_EmitC_emitVDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitDeclAux___lambda__2___closed__1; lean_object* l_Lean_IR_EmitC_emitBoxFn_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_expandExternPattern(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitDel(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFullApp_match__1(lean_object*); extern lean_object* l_Lean_instInhabitedParserDescr___closed__1; extern lean_object* l_Lean_closureMaxArgs; uint8_t l_Lean_IR_IRType_isIrrelevant(lean_object*); lean_object* l_Lean_IR_EmitC_emitMarkPersistent(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_name_eq(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitApp___closed__3; lean_object* lean_ir_emit_c(lean_object*, lean_object*); uint8_t l_Nat_anyAux___at_Lean_IR_EmitC_overwriteParam___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitApp___closed__5; lean_object* l_Lean_IR_EmitC_emitLhs___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_String_quote___closed__2; lean_object* l_Lean_IR_EmitC_emitBlock___closed__2; lean_object* l_Lean_IR_EmitC_Context_mainFn___default; lean_object* l_Lean_IR_EmitC_emitUnbox___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitReset___closed__4; lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__19; lean_object* l_Lean_IR_EmitC_emitSProj___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitLn___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__3; lean_object* l_Lean_IR_EmitC_emitDeclInit___closed__3; lean_object* lean_array_get_size(lean_object*); lean_object* l_Lean_IR_EmitC_emitReuse___closed__2; extern lean_object* l_termDepIfThenElse___closed__24; lean_object* lean_string_append(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitBlock___closed__1; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__16; lean_object* l_Lean_IR_EmitC_emitFnDecl(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitCase_match__2___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitExternCall_match__1(lean_object*); lean_object* l_Std_HashMapImp_find_x3f___at_Lean_IR_EmitC_getJPParams___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitLit_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_getExternNameFor(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_quoteString___closed__1; lean_object* l_Lean_IR_EmitC_toCName_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_quoteString___boxed(lean_object*); lean_object* l_Lean_IR_EmitC_emitSet(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitCase___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitCtorSetArgs___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitCase___spec__1___closed__1; lean_object* l_Lean_IR_EmitC_emitCase___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_hasMainFn___boxed(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitUnbox___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_string_utf8_byte_size(lean_object*); lean_object* l_Lean_IR_EmitC_emitCtorScalarSize(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_IR_isTailCallTo(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_throwUnknownVar___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___spec__2(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitInitFn(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_declareVars(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitCtorSetArgs(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitUnbox___closed__1; uint8_t l_Lean_IR_IRType_isObj(lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_AssocList_find_x3f___at_Lean_IR_EmitC_getJPParams___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFnDeclAux___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFnDecls(lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitReset___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitBlock___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitApp___closed__4; lean_object* l_Nat_foldM_loop___at_Lean_IR_EmitC_emitSimpleExternalCall___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitJmp___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_toCType___closed__6; lean_object* l_Lean_IR_Decl_resultType(lean_object*); lean_object* l_Lean_Name_toStringWithSep(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__3___closed__1; extern lean_object* l_Char_quoteCore___closed__1; lean_object* l_Lean_IR_Decl_name(lean_object*); lean_object* l_Lean_IR_EmitC_emitUnbox___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFnBody___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitInc___closed__2; lean_object* l_Lean_IR_EmitC_emitArg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_toCInitName___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitLns___at_Lean_IR_EmitC_emitMainFn___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__25; lean_object* l_List_forM___at_Lean_IR_EmitC_emitFnDecls___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitJmp___closed__1; lean_object* l_Lean_IR_EmitC_getDecl_match__1(lean_object*); lean_object* l_Lean_IR_EmitC_toCInitName___closed__1; lean_object* l_Lean_IR_EmitC_leanMainFn___closed__1; lean_object* l_Lean_IR_EmitC_main(lean_object*, lean_object*); extern lean_object* l_Char_quoteCore___closed__2; lean_object* l_Lean_IR_EmitC_emit___rarg(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_IR_instToStringVarId___closed__1; lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitIf(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitReset(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__26; lean_object* l_Lean_IR_AltCore_body(lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitCtorSetArgs___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Nat_anyAux___at_Lean_IR_EmitC_overwriteParam___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_argToCString(lean_object*); lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__6; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__3(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitReset___closed__3; lean_object* l_List_forM___at_Lean_IR_EmitC_emitLns___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_isExternC(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFnDeclAux___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitInc___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_isIf___boxed(lean_object*); lean_object* lean_get_init_fn_name_for(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitCtorScalarSize___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitCtorScalarSize___closed__1; uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitApp___closed__2; lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitCase___spec__1(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitDeclAux___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_toCInitName(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_overwriteParam___boxed(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitTailCall___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitTag___closed__1; lean_object* l_Lean_IR_EmitC_emitTailCall(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitUProj(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitTag___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitApp___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitArg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitApp___closed__1; lean_object* l_Lean_IR_EmitC_emitInitFn___closed__5; lean_object* l_Lean_IR_EmitC_toCType___closed__2; lean_object* l_Lean_IR_EmitC_emitMainFn_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_isExport___closed__2; lean_object* l_Lean_IR_EmitC_emitExternCall___closed__1; lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_toHexDigit___boxed(lean_object*); lean_object* l_Nat_anyAux___at_Lean_IR_EmitC_overwriteParam___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitNumLit___closed__3; lean_object* l_Lean_IR_EmitC_emitFnDeclAux___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_Context_mainParams___default; lean_object* l_List_forM___at_Lean_IR_EmitC_emitInitFn___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitCtor___closed__1; lean_object* l_Lean_IR_EmitC_emitExternCall___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitLns___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitLhs(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitCtor___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitSimpleExternalCall___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitBoxFn___closed__4; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__3___closed__2; lean_object* l_Lean_IR_EmitC_emitJmp(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_map___at_Lean_IR_EmitC_toStringArgs___spec__1(lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__6; lean_object* l_Lean_IR_EmitC_emitDeclAux___lambda__3___closed__1; lean_object* l_Lean_IR_EmitC_emitMainFnIfNeeded(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__13; lean_object* l_Lean_IR_EmitC_hasMainFn(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitOffset___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitJmp___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_IR_FnBody_isTerminal(lean_object*); lean_object* l_Lean_IR_EmitC_emitTailCall___lambda__2___closed__1; lean_object* l_Lean_IR_EmitC_emitUnbox___closed__5; lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__23; lean_object* l_Lean_IR_EmitC_emitArgs(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_declareVars_match__1(lean_object*); extern lean_object* l_Lean_IR_formatDecl___closed__3; lean_object* l_Lean_IR_EmitC_argToCString_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitPartialApp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitBox___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_forM___at_Lean_IR_EmitC_emitLns___spec__1(lean_object*); lean_object* l_Lean_IR_EmitC_toCName___closed__1; lean_object* l_Nat_repr(lean_object*); lean_object* l_Lean_IR_EmitC_toCType___closed__8; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__1; lean_object* l_Lean_IR_EmitC_emitDeclInit___closed__2; lean_object* l_Lean_IR_EmitC_emitDeclInit___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitSet___closed__1; lean_object* l_Lean_IR_EmitC_emitBox(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitDeclAux_match__1(lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__2; lean_object* l_Lean_IR_EmitC_emitSet___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitReset___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitOffset___closed__1; lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitDeclInit___closed__1; lean_object* l_Lean_IR_EmitC_emitArgs___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_toCType___boxed(lean_object*); lean_object* l_Lean_IR_EmitC_emitLn___at_Lean_IR_EmitC_emitMainFn___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitReset___closed__1; lean_object* l_Lean_IR_EmitC_emitSProj___closed__3; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__11; lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__21; lean_object* l_Lean_IR_EmitC_toCName(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitInitFn___closed__7; lean_object* l_Lean_IR_EmitC_emitDeclInit(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitIf___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__12; lean_object* l_Lean_IR_EmitC_emitIf___closed__1; lean_object* l_Lean_IR_EmitC_toCName___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitDeclAux___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_to_list(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFnDeclAux___lambda__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__2; lean_object* l_Lean_SimplePersistentEnvExtension_getEntries___rarg(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitLit_match__1(lean_object*); lean_object* l_Lean_IR_EmitC_emitVDecl_match__1(lean_object*); extern lean_object* l_myMacro____x40_Init_Notation___hyg_16821____closed__12; lean_object* l_Lean_IR_EmitC_toCType___closed__1; lean_object* l_Lean_IR_EmitC_emitInc(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_leanMainFn; lean_object* l_Lean_IR_EmitC_emitNumLit___closed__4; lean_object* l_Lean_IR_EmitC_emitDecl___closed__1; lean_object* l_Lean_IR_EmitC_emitSSet_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_emitC_match__1(lean_object*); lean_object* l_Lean_IR_EmitC_emitInitFn___boxed(lean_object*, lean_object*); uint32_t l_Nat_digitChar(lean_object*); extern lean_object* l_term_x7b_x7d___closed__3; lean_object* l_Lean_IR_EmitC_emitDeclAux_match__1___rarg(lean_object*, lean_object*); size_t lean_usize_modn(size_t, lean_object*); lean_object* l_Lean_IR_EmitC_throwInvalidExportName(lean_object*); lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__16; lean_object* l_Lean_IR_EmitC_emitCase_match__2(lean_object*); lean_object* l_Lean_IR_EmitC_declareVar(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_toCType___closed__9; uint8_t l_Array_isEmpty___rarg(lean_object*); extern lean_object* l_Lean_IR_instInhabitedParam; lean_object* l_Std_AssocList_find_x3f___at_Lean_IR_EmitC_getJPParams___spec__2(lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitReset___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitTailCall_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitIsShared___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitInitFn___closed__1; lean_object* l_Lean_IR_EmitC_emitIsTaggedPtr___closed__1; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ParametricAttribute_getParam___at_Lean_getInitFnNameForCore_x3f___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitBoxFn___closed__2; lean_object* l_Lean_IR_EmitC_toCType___closed__4; lean_object* l_Std_RBTree_toList___at_Lean_IR_EmitC_emitFnDecls___spec__3(lean_object*); lean_object* l_Lean_IR_EmitC_emitProj___closed__1; lean_object* l_Lean_IR_EmitC_emitIsShared___closed__1; lean_object* l_Lean_IR_EmitC_emitCase_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__5; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__1; lean_object* l_Lean_IR_EmitC_emitMainFn(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitVDecl___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__17; lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitFileHeader___spec__1(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_isTailCall_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__14; lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__7; lean_object* l_Lean_IR_EmitC_emitUProj___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_foldr___at_Lean_IR_EmitC_hasMainFn___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitCInitName___boxed(lean_object*, lean_object*, lean_object*); size_t lean_usize_of_nat(lean_object*); lean_object* l_Lean_IR_EmitC_emitReuse___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_NameSet_empty; lean_object* l_Lean_IR_EmitC_emitFnBody(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_List_foldr___at_Lean_IR_EmitC_hasMainFn___spec__1(uint8_t, lean_object*); lean_object* l_Lean_IR_ensureHasDefault(lean_object*); extern lean_object* l_term_x7b_x7d___closed__5; lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitArgs___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitUProj___closed__1; lean_object* l_Lean_IR_EmitC_emitUnbox___closed__3; lean_object* l_Lean_IR_EmitC_emitBoxFn___closed__3; lean_object* l_Lean_IR_EmitC_emitNumLit(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitExternCall(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitTailCall___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* lean_ir_decl_to_string(lean_object*); uint8_t l_Lean_hasInitAttr(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitExternCall_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_Context_jpMap___default; extern lean_object* l_Lean_exportAttr; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__21; lean_object* l_Lean_IR_EmitC_emitSimpleExternalCall(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Char_quoteCore___closed__3; lean_object* l_Lean_IR_EmitC_emitUSet(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFnDecl___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_declareParams(lean_object*, lean_object*, lean_object*); lean_object* l_List_foldl___at_Lean_IR_EmitC_emitFnDecls___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___spec__3___closed__1; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__2; lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitReset___closed__2; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__3; lean_object* l_Lean_IR_EmitC_emitAllocCtor(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitLn___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_toCName_match__1(lean_object*); lean_object* l_Lean_IR_EmitC_quoteString___lambda__1___boxed(lean_object*, lean_object*); uint8_t l_UInt32_decEq(uint32_t, uint32_t); lean_object* l_Lean_IR_EmitC_emitTailCall___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_term_x5b___x5d___closed__5; lean_object* l_Lean_IR_EmitC_emitLit(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instToStringImport___closed__1; lean_object* l_Lean_IR_EmitC_emitJmp___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitTailCall___lambda__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitJPs_match__1(lean_object*); lean_object* l_Lean_IR_EmitC_emitExternDeclAux(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Tactic_case___closed__3; lean_object* l_List_forM___at_Lean_IR_EmitC_emitLns___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_declareParams___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitJmp___lambda__1___closed__1; lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__15; lean_object* l_Lean_IR_EmitC_emitBlock_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitDec___closed__2; lean_object* l_Lean_IR_EmitC_emitSetTag___closed__1; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__7; lean_object* l_Lean_IR_EmitC_emitFnDeclAux___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_instReprUnit___closed__1; lean_object* l_Lean_IR_EmitC_emitJPs_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitSetTag___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFnIfNeeded___boxed(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitSProj___closed__5; lean_object* l_Std_RBTree_toList___at_Lean_IR_EmitC_emitFnDecls___spec__3___boxed(lean_object*); lean_object* l_Lean_IR_EmitC_emitTailCall___lambda__1___closed__1; lean_object* lean_mk_module_initialization_function_name(lean_object*); lean_object* l_Lean_IR_EmitC_toCType___closed__11; lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__3; lean_object* l_Lean_IR_EmitC_emitReuse(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitLns(lean_object*); lean_object* l_Lean_IR_EmitC_paramEqArg___boxed(lean_object*, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__19; lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitFnDeclAux___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFileHeader(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitDeclAux(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitNumLit___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitUSet___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitInitFn___closed__3; lean_object* l_Lean_IR_EmitC_emitBoxFn___closed__1; lean_object* l_Lean_IR_EmitC_emitInc___closed__4; lean_object* l_Lean_IR_EmitC_emitFnDecls_match__1(lean_object*); lean_object* l_Lean_IR_EmitC_emitDeclAux___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__5; lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitReset___spec__1___closed__1; lean_object* l_Lean_IR_EmitC_emitUSet___closed__1; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__8; lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_panic_fn(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitNumLit___closed__2; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__9; lean_object* l_Lean_IR_EmitC_isTailCall___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitBoxFn___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__22; lean_object* l_Lean_IR_EmitC_emitFileFooter___closed__1; lean_object* l_Lean_IR_EmitC_toCType_match__1___rarg(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_String_foldlAux_loop___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__18; lean_object* l_Lean_IR_EmitC_emitMainFn_match__1(lean_object*); uint8_t l_Lean_IR_ExplicitBoxing_isBoxedName(lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__4; lean_object* l_Lean_IR_EmitC_emitIsTaggedPtr(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitInitFn___closed__6; lean_object* l_Lean_IR_EmitC_emitProj___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_IR_EmitC_overwriteParam(lean_object*, lean_object*); lean_object* l_List_forM___at_Lean_IR_EmitC_emitFns___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_emitC_match__1___rarg(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_isIOUnitInitFn(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__27; lean_object* l_Lean_getExternEntryFor(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitNumLit___closed__1; lean_object* l_Lean_IR_EmitC_emitSSet___closed__5; lean_object* l_Lean_IR_EmitC_emitTailCall_match__1(lean_object*); lean_object* l_Lean_IR_EmitC_emitApp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_myMacro____x40_Init_Notation___hyg_16268____closed__9; lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitArgs___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_foldM_loop___at_Lean_IR_EmitC_emitSimpleExternalCall___spec__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_foldM_loop___at_Lean_IR_EmitC_emitSimpleExternalCall___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitTag(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_term___x3d_x3d_____closed__3; lean_object* l_Lean_IR_EmitC_emitDecl(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_throwUnknownVar(lean_object*); lean_object* l_Lean_IR_EmitC_isIf(lean_object*); lean_object* l_Lean_IR_EmitC_emitTailCall___closed__2; lean_object* l_Lean_IR_EmitC_emitBlock(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitSSet___closed__3; lean_object* l_Lean_IR_EmitC_emitBoxFn(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_isTailCall(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_throwInvalidExportName___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFileFooter___boxed(lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__2___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFnDeclAux___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFnDeclAux___lambda__3___closed__1; lean_object* l_Lean_IR_EmitC_throwInvalidExportName___rarg___closed__1; lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitArgs___spec__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_getModName___boxed(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFnDeclAux___lambda__3___closed__2; lean_object* l_Lean_IR_EmitC_toCType___closed__12; lean_object* l_Lean_IR_EmitC_emitInc___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__3___closed__1; lean_object* l_Lean_IR_EmitC_emitTailCall___closed__1; lean_object* l_Lean_IR_EmitC_emitInc___closed__1; lean_object* l_Lean_IR_EmitC_emit___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitLit___closed__1; lean_object* l_Lean_IR_EmitC_emitFileFooter___closed__2; lean_object* l_Lean_IR_EmitC_emitDec(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_toCType_match__1(lean_object*); lean_object* l_Lean_IR_EmitC_emitDec___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitLit___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitTailCall___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFullApp_match__1___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_IR_instInhabitedAlt; lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__12; extern lean_object* l_UInt32_size; lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_getJPParams___closed__1; lean_object* lean_ir_find_env_decl(lean_object*, lean_object*); extern lean_object* l_Std_HashMap_instInhabitedHashMap___closed__1; lean_object* lean_name_mangle(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitDec___closed__1; extern lean_object* l_Lean_IR_instInhabitedArg; lean_object* l_Lean_IR_mkVarJPMaps(lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__5; extern lean_object* l_prec_x28___x29___closed__7; lean_object* l_Lean_IR_EmitC_emitPartialApp___closed__2; lean_object* l_Lean_IR_EmitC_emitFns(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_declareVars_match__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__3; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__24; lean_object* l_Lean_IR_Decl_normalizeIds(lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__15; uint8_t l_Lean_NameSet_contains(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitCName(lean_object*, lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__18; extern lean_object* l_prec_x28___x29___closed__3; lean_object* l_Lean_IR_EmitC_emitReuse___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFullApp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___boxed(lean_object*, lean_object*); uint8_t l_Lean_IR_usesModuleFrom(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitPartialApp___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_declareVar___closed__1; lean_object* l_Lean_IR_EmitC_isIf_match__1(lean_object*); lean_object* l_Lean_IR_EmitC_emitDeclInit_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_declareVar___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitSSet(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_mod(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFileFooter(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_declareVars_match__1___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_toCType___closed__10; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__22; lean_object* l_Lean_IR_EmitC_getJPParams___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Char_quoteCore___closed__5; lean_object* l_Lean_IR_EmitC_emitUnbox(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitJPs(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__6; lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__2___closed__1; lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__1; lean_object* l_Std_RBNode_revFold___at_Lean_IR_EmitC_emitFnDecls___spec__4___boxed(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitOffset(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitExternDeclAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFnDecls_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___spec__3(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitSSet___closed__4; lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitInitFn___closed__2; extern lean_object* l_Lean_Parser_Syntax_addPrec___closed__11; lean_object* l_List_forM___at_Lean_IR_EmitC_emitMainFn___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitLn(lean_object*); lean_object* l_Lean_IR_EmitC_emitSSet___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_IR_declMapExt; extern lean_object* l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_declareParams___spec__1(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_FnBody_body(lean_object*); lean_object* l_Lean_IR_EmitC_emitReuse___closed__1; extern lean_object* l_Lean_addClass___closed__1; lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitPartialApp___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitLns___at_Lean_IR_EmitC_emitMainFn___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__2___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__13; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__23; lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__24; lean_object* l_Lean_IR_EmitC_emitSSet___closed__1; lean_object* l_Lean_IR_EmitC_emitInitFn___closed__8; lean_object* l_Lean_IR_Decl_params(lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__25; extern lean_object* l_term___x3d_____closed__3; lean_object* l_Lean_IR_EmitC_emitCase_match__1(lean_object*); lean_object* l_Lean_IR_EmitC_argToCString_match__1(lean_object*); lean_object* lean_uint32_to_nat(uint32_t); lean_object* l_Lean_IR_EmitC_throwInvalidExportName___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitInitFn___closed__4; uint8_t l_Lean_IR_EmitC_paramEqArg(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitLn___at_Lean_IR_EmitC_emitMainFn___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitCase(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitSSet___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitLns___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__10; lean_object* l_Lean_IR_EmitC_getModName(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitSSet___closed__2; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__28; lean_object* l_Lean_IR_EmitC_quoteString(lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__14; lean_object* l_Lean_IR_EmitC_emitDeclAux___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__2; lean_object* l_Lean_IR_EmitC_emitVDecl_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_toCType(lean_object*); lean_object* l_Lean_IR_EmitC_emitDeclAux___closed__1; lean_object* l_Lean_IR_EmitC_emitInitFn___closed__9; lean_object* l_List_forM___at_Lean_IR_EmitC_emitFnDecls___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__20; extern lean_object* l___private_Init_Data_Format_Basic_0__Std_Format_be___closed__1; lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitFnDeclAux___spec__3(lean_object*, size_t, size_t, lean_object*); lean_object* l_Lean_IR_EmitC_getEnv(lean_object*, lean_object*); lean_object* l_List_forM___at_Lean_IR_EmitC_emitFnDecls___spec__5___closed__1; lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitPartialApp___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_getJPParams(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitBoxFn___closed__5; lean_object* l_Lean_IR_EmitC_emitPartialApp___closed__1; uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitSProj___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitPartialApp___spec__1___closed__1; lean_object* l_Lean_IR_EmitC_emitIsTaggedPtr___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitCtorSetArgs___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_getDecl(lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_declareParams___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* _init_l_Lean_IR_EmitC_leanMainFn___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("_lean_main"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_leanMainFn() { _start: { lean_object* x_1; x_1 = l_Lean_IR_EmitC_leanMainFn___closed__1; return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_Context_jpMap___default() { _start: { lean_object* x_1; x_1 = l_Std_HashMap_instInhabitedHashMap___closed__1; return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_Context_mainFn___default() { _start: { lean_object* x_1; x_1 = lean_box(0); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_Context_mainParams___default() { _start: { lean_object* x_1; x_1 = l_Array_empty___closed__1; return x_1; } } lean_object* l_Lean_IR_EmitC_getEnv(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_4, 0, x_3); lean_ctor_set(x_4, 1, x_2); return x_4; } } lean_object* l_Lean_IR_EmitC_getEnv___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_IR_EmitC_getEnv(x_1, x_2); lean_dec(x_1); return x_3; } } lean_object* l_Lean_IR_EmitC_getModName(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; x_3 = lean_ctor_get(x_1, 1); lean_inc(x_3); x_4 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_4, 0, x_3); lean_ctor_set(x_4, 1, x_2); return x_4; } } lean_object* l_Lean_IR_EmitC_getModName___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_IR_EmitC_getModName(x_1, x_2); lean_dec(x_1); return x_3; } } lean_object* l_Lean_IR_EmitC_getDecl_match__1___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_IR_EmitC_getDecl_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_getDecl_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_IR_EmitC_getDecl(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_5; x_4 = l_Lean_IR_EmitC_getEnv(x_2, x_3); x_5 = !lean_is_exclusive(x_4); if (x_5 == 0) { lean_object* x_6; lean_object* x_7; x_6 = lean_ctor_get(x_4, 0); lean_inc(x_1); x_7 = lean_ir_find_env_decl(x_6, x_1); if (lean_obj_tag(x_7) == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_8 = l_Lean_Name_toString___closed__1; x_9 = l_Lean_Name_toStringWithSep(x_8, x_1); x_10 = l_Lean_addClass___closed__1; x_11 = lean_string_append(x_10, x_9); lean_dec(x_9); x_12 = l_Char_quote___closed__1; x_13 = lean_string_append(x_11, x_12); lean_ctor_set_tag(x_4, 1); lean_ctor_set(x_4, 0, x_13); return x_4; } else { lean_object* x_14; lean_dec(x_1); x_14 = lean_ctor_get(x_7, 0); lean_inc(x_14); lean_dec(x_7); lean_ctor_set(x_4, 0, x_14); return x_4; } } else { lean_object* x_15; lean_object* x_16; lean_object* x_17; x_15 = lean_ctor_get(x_4, 0); x_16 = lean_ctor_get(x_4, 1); lean_inc(x_16); lean_inc(x_15); lean_dec(x_4); lean_inc(x_1); x_17 = lean_ir_find_env_decl(x_15, x_1); if (lean_obj_tag(x_17) == 0) { 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_18 = l_Lean_Name_toString___closed__1; x_19 = l_Lean_Name_toStringWithSep(x_18, x_1); x_20 = l_Lean_addClass___closed__1; x_21 = lean_string_append(x_20, x_19); lean_dec(x_19); x_22 = l_Char_quote___closed__1; x_23 = lean_string_append(x_21, x_22); x_24 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_16); return x_24; } else { lean_object* x_25; lean_object* x_26; lean_dec(x_1); x_25 = lean_ctor_get(x_17, 0); lean_inc(x_25); lean_dec(x_17); x_26 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_16); return x_26; } } } } lean_object* l_Lean_IR_EmitC_getDecl___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_getDecl(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Lean_IR_EmitC_emit___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_5 = lean_apply_1(x_1, x_2); x_6 = lean_string_append(x_4, x_5); lean_dec(x_5); x_7 = lean_box(0); x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_7); lean_ctor_set(x_8, 1, x_6); return x_8; } } lean_object* l_Lean_IR_EmitC_emit(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emit___rarg___boxed), 4, 0); return x_2; } } lean_object* l_Lean_IR_EmitC_emit___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emit___rarg(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } lean_object* l_Lean_IR_EmitC_emitLn___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_5 = lean_apply_1(x_1, x_2); x_6 = lean_string_append(x_4, x_5); lean_dec(x_5); x_7 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_8 = lean_string_append(x_6, x_7); x_9 = lean_box(0); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_10, 1, x_8); return x_10; } } lean_object* l_Lean_IR_EmitC_emitLn(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitLn___rarg___boxed), 4, 0); return x_2; } } lean_object* l_Lean_IR_EmitC_emitLn___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitLn___rarg(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } lean_object* l_List_forM___at_Lean_IR_EmitC_emitLns___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_2) == 0) { lean_object* x_5; lean_object* x_6; lean_dec(x_1); x_5 = lean_box(0); x_6 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_6, 0, x_5); lean_ctor_set(x_6, 1, 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; lean_object* x_12; x_7 = lean_ctor_get(x_2, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_2, 1); lean_inc(x_8); lean_dec(x_2); lean_inc(x_1); x_9 = lean_apply_1(x_1, x_7); x_10 = lean_string_append(x_4, x_9); lean_dec(x_9); x_11 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_12 = lean_string_append(x_10, x_11); x_2 = x_8; x_4 = x_12; goto _start; } } } lean_object* l_List_forM___at_Lean_IR_EmitC_emitLns___spec__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_List_forM___at_Lean_IR_EmitC_emitLns___spec__1___rarg___boxed), 4, 0); return x_2; } } lean_object* l_Lean_IR_EmitC_emitLns___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_List_forM___at_Lean_IR_EmitC_emitLns___spec__1___rarg(x_1, x_2, x_3, x_4); return x_5; } } lean_object* l_Lean_IR_EmitC_emitLns(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitLns___rarg___boxed), 4, 0); return x_2; } } lean_object* l_List_forM___at_Lean_IR_EmitC_emitLns___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_List_forM___at_Lean_IR_EmitC_emitLns___spec__1___rarg(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } lean_object* l_Lean_IR_EmitC_emitLns___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitLns___rarg(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } lean_object* l_Lean_IR_EmitC_argToCString_match__1___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); lean_dec(x_1); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_dec(x_2); x_6 = lean_apply_1(x_3, x_1); return x_6; } } } lean_object* l_Lean_IR_EmitC_argToCString_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_argToCString_match__1___rarg), 3, 0); return x_2; } } static lean_object* _init_l_Lean_IR_EmitC_argToCString___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_box(0)"); return x_1; } } lean_object* l_Lean_IR_EmitC_argToCString(lean_object* x_1) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); lean_dec(x_1); x_3 = l_Nat_repr(x_2); x_4 = l_Lean_IR_instToStringVarId___closed__1; x_5 = lean_string_append(x_4, x_3); lean_dec(x_3); return x_5; } else { lean_object* x_6; x_6 = l_Lean_IR_EmitC_argToCString___closed__1; return x_6; } } } lean_object* l_Lean_IR_EmitC_emitArg(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; x_4 = l_Lean_IR_EmitC_argToCString(x_1); x_5 = lean_string_append(x_3, x_4); lean_dec(x_4); x_6 = lean_box(0); x_7 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_7, 0, x_6); lean_ctor_set(x_7, 1, x_5); return x_7; } } lean_object* l_Lean_IR_EmitC_emitArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_emitArg(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Lean_IR_EmitC_toCType_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { switch (lean_obj_tag(x_1)) { case 0: { lean_object* x_13; lean_object* x_14; lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_13 = lean_box(0); x_14 = lean_apply_1(x_2, x_13); return x_14; } case 1: { lean_object* x_15; lean_object* x_16; lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); x_15 = lean_box(0); x_16 = lean_apply_1(x_3, x_15); return x_16; } case 2: { lean_object* x_17; lean_object* x_18; lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); x_17 = lean_box(0); x_18 = lean_apply_1(x_4, x_17); return x_18; } case 3: { lean_object* x_19; lean_object* x_20; lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_19 = lean_box(0); x_20 = lean_apply_1(x_5, x_19); return x_20; } case 4: { lean_object* x_21; lean_object* x_22; lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_21 = lean_box(0); x_22 = lean_apply_1(x_6, x_21); return x_22; } case 5: { lean_object* x_23; lean_object* x_24; lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_23 = lean_box(0); x_24 = lean_apply_1(x_7, x_23); return x_24; } case 6: { lean_object* x_25; lean_object* x_26; lean_dec(x_12); lean_dec(x_11); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_25 = lean_box(0); x_26 = lean_apply_1(x_10, x_25); return x_26; } case 7: { lean_object* x_27; lean_object* x_28; lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); 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_27 = lean_box(0); x_28 = lean_apply_1(x_8, x_27); return x_28; } case 8: { lean_object* x_29; lean_object* x_30; lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_29 = lean_box(0); x_30 = lean_apply_1(x_9, x_29); return x_30; } case 9: { lean_object* x_31; lean_object* x_32; lean_object* x_33; 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_4); lean_dec(x_3); lean_dec(x_2); x_31 = lean_ctor_get(x_1, 0); lean_inc(x_31); x_32 = lean_ctor_get(x_1, 1); lean_inc(x_32); lean_dec(x_1); x_33 = lean_apply_2(x_11, x_31, x_32); return x_33; } default: { lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_34 = lean_ctor_get(x_1, 0); lean_inc(x_34); x_35 = lean_ctor_get(x_1, 1); lean_inc(x_35); lean_dec(x_1); x_36 = lean_apply_2(x_12, x_34, x_35); return x_36; } } } } lean_object* l_Lean_IR_EmitC_toCType_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_toCType_match__1___rarg), 12, 0); return x_2; } } static lean_object* _init_l_Lean_IR_EmitC_toCType___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("double"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_toCType___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("uint8_t"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_toCType___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("uint16_t"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_toCType___closed__4() { _start: { lean_object* x_1; x_1 = lean_mk_string("uint32_t"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_toCType___closed__5() { _start: { lean_object* x_1; x_1 = lean_mk_string("uint64_t"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_toCType___closed__6() { _start: { lean_object* x_1; x_1 = lean_mk_string("size_t"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_toCType___closed__7() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_object*"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_toCType___closed__8() { _start: { lean_object* x_1; x_1 = lean_mk_string("Lean.Compiler.IR.EmitC"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_toCType___closed__9() { _start: { lean_object* x_1; x_1 = lean_mk_string("Lean.IR.EmitC.toCType"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_toCType___closed__10() { _start: { lean_object* x_1; x_1 = lean_mk_string("not implemented yet"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_toCType___closed__11() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_IR_EmitC_toCType___closed__8; x_2 = l_Lean_IR_EmitC_toCType___closed__9; x_3 = lean_unsigned_to_nat(65u); x_4 = lean_unsigned_to_nat(25u); x_5 = l_Lean_IR_EmitC_toCType___closed__10; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); return x_6; } } static lean_object* _init_l_Lean_IR_EmitC_toCType___closed__12() { _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_IR_EmitC_toCType___closed__8; x_2 = l_Lean_IR_EmitC_toCType___closed__9; x_3 = lean_unsigned_to_nat(66u); x_4 = lean_unsigned_to_nat(25u); x_5 = l_Lean_IR_EmitC_toCType___closed__10; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); return x_6; } } lean_object* l_Lean_IR_EmitC_toCType(lean_object* x_1) { _start: { switch (lean_obj_tag(x_1)) { case 0: { lean_object* x_2; x_2 = l_Lean_IR_EmitC_toCType___closed__1; return x_2; } case 1: { lean_object* x_3; x_3 = l_Lean_IR_EmitC_toCType___closed__2; return x_3; } case 2: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_toCType___closed__3; return x_4; } case 3: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_toCType___closed__4; return x_5; } case 4: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_toCType___closed__5; return x_6; } case 5: { lean_object* x_7; x_7 = l_Lean_IR_EmitC_toCType___closed__6; return x_7; } case 9: { lean_object* x_8; lean_object* x_9; lean_object* x_10; x_8 = l_String_instInhabitedString; x_9 = l_Lean_IR_EmitC_toCType___closed__11; x_10 = lean_panic_fn(x_8, x_9); return x_10; } case 10: { lean_object* x_11; lean_object* x_12; lean_object* x_13; x_11 = l_String_instInhabitedString; x_12 = l_Lean_IR_EmitC_toCType___closed__12; x_13 = lean_panic_fn(x_11, x_12); return x_13; } default: { lean_object* x_14; x_14 = l_Lean_IR_EmitC_toCType___closed__7; return x_14; } } } } lean_object* l_Lean_IR_EmitC_toCType___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_IR_EmitC_toCType(x_1); lean_dec(x_1); return x_2; } } static lean_object* _init_l_Lean_IR_EmitC_throwInvalidExportName___rarg___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("invalid export name '"); return x_1; } } lean_object* l_Lean_IR_EmitC_throwInvalidExportName___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_4 = l_Lean_Name_toString___closed__1; x_5 = l_Lean_Name_toStringWithSep(x_4, x_1); x_6 = l_Lean_IR_EmitC_throwInvalidExportName___rarg___closed__1; x_7 = lean_string_append(x_6, x_5); lean_dec(x_5); x_8 = l_Char_quote___closed__1; x_9 = lean_string_append(x_7, x_8); x_10 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_10, 1, x_3); return x_10; } } lean_object* l_Lean_IR_EmitC_throwInvalidExportName(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_throwInvalidExportName___rarg___boxed), 3, 0); return x_2; } } lean_object* l_Lean_IR_EmitC_throwInvalidExportName___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_throwInvalidExportName___rarg(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Lean_IR_EmitC_toCName_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_5; lean_object* x_6; lean_dec(x_3); lean_dec(x_2); x_5 = lean_box(0); x_6 = lean_apply_1(x_4, x_5); return x_6; } else { lean_object* x_7; lean_dec(x_4); x_7 = lean_ctor_get(x_1, 0); lean_inc(x_7); lean_dec(x_1); if (lean_obj_tag(x_7) == 1) { lean_object* x_8; x_8 = lean_ctor_get(x_7, 0); lean_inc(x_8); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; size_t x_10; lean_object* x_11; lean_object* x_12; lean_dec(x_3); x_9 = lean_ctor_get(x_7, 1); lean_inc(x_9); x_10 = lean_ctor_get_usize(x_7, 2); lean_dec(x_7); x_11 = lean_box_usize(x_10); x_12 = lean_apply_2(x_2, x_9, x_11); return x_12; } else { lean_object* x_13; lean_dec(x_8); lean_dec(x_2); x_13 = lean_apply_1(x_3, x_7); return x_13; } } else { lean_object* x_14; lean_dec(x_2); x_14 = lean_apply_1(x_3, x_7); return x_14; } } } } lean_object* l_Lean_IR_EmitC_toCName_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_toCName_match__1___rarg), 4, 0); return x_2; } } static lean_object* _init_l_Lean_IR_EmitC_toCName___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("l_"); return x_1; } } lean_object* l_Lean_IR_EmitC_toCName(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_5; x_4 = l_Lean_IR_EmitC_getEnv(x_2, x_3); x_5 = !lean_is_exclusive(x_4); if (x_5 == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_6 = lean_ctor_get(x_4, 0); x_7 = lean_ctor_get(x_4, 1); x_8 = l_Lean_exportAttr; lean_inc(x_1); x_9 = l_Lean_ParametricAttribute_getParam___at_Lean_getInitFnNameForCore_x3f___spec__1(x_8, x_6, x_1); lean_dec(x_6); if (lean_obj_tag(x_9) == 0) { lean_object* x_10; uint8_t x_11; x_10 = l_Lean_isExport___closed__2; x_11 = lean_name_eq(x_1, x_10); if (x_11 == 0) { lean_object* x_12; lean_object* x_13; x_12 = l_Lean_IR_EmitC_toCName___closed__1; x_13 = lean_name_mangle(x_1, x_12); lean_ctor_set(x_4, 0, x_13); return x_4; } else { lean_object* x_14; lean_dec(x_1); x_14 = l_Lean_IR_EmitC_leanMainFn; lean_ctor_set(x_4, 0, x_14); return x_4; } } else { lean_object* x_15; x_15 = lean_ctor_get(x_9, 0); lean_inc(x_15); lean_dec(x_9); if (lean_obj_tag(x_15) == 1) { lean_object* x_16; x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); if (lean_obj_tag(x_16) == 0) { lean_object* x_17; lean_dec(x_1); x_17 = lean_ctor_get(x_15, 1); lean_inc(x_17); lean_dec(x_15); lean_ctor_set(x_4, 0, x_17); return x_4; } else { lean_object* x_18; lean_dec(x_16); lean_dec(x_15); lean_free_object(x_4); x_18 = l_Lean_IR_EmitC_throwInvalidExportName___rarg(x_1, x_2, x_7); return x_18; } } else { lean_object* x_19; lean_dec(x_15); lean_free_object(x_4); x_19 = l_Lean_IR_EmitC_throwInvalidExportName___rarg(x_1, x_2, x_7); return x_19; } } } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_20 = lean_ctor_get(x_4, 0); x_21 = lean_ctor_get(x_4, 1); lean_inc(x_21); lean_inc(x_20); lean_dec(x_4); x_22 = l_Lean_exportAttr; lean_inc(x_1); x_23 = l_Lean_ParametricAttribute_getParam___at_Lean_getInitFnNameForCore_x3f___spec__1(x_22, x_20, x_1); lean_dec(x_20); if (lean_obj_tag(x_23) == 0) { lean_object* x_24; uint8_t x_25; x_24 = l_Lean_isExport___closed__2; x_25 = lean_name_eq(x_1, x_24); if (x_25 == 0) { lean_object* x_26; lean_object* x_27; lean_object* x_28; x_26 = l_Lean_IR_EmitC_toCName___closed__1; x_27 = lean_name_mangle(x_1, x_26); x_28 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_28, 0, x_27); lean_ctor_set(x_28, 1, x_21); return x_28; } else { lean_object* x_29; lean_object* x_30; lean_dec(x_1); x_29 = l_Lean_IR_EmitC_leanMainFn; x_30 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_30, 0, x_29); lean_ctor_set(x_30, 1, x_21); return x_30; } } else { lean_object* x_31; x_31 = lean_ctor_get(x_23, 0); lean_inc(x_31); lean_dec(x_23); if (lean_obj_tag(x_31) == 1) { lean_object* x_32; x_32 = lean_ctor_get(x_31, 0); lean_inc(x_32); if (lean_obj_tag(x_32) == 0) { lean_object* x_33; lean_object* x_34; lean_dec(x_1); x_33 = lean_ctor_get(x_31, 1); lean_inc(x_33); lean_dec(x_31); x_34 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_34, 0, x_33); lean_ctor_set(x_34, 1, x_21); return x_34; } else { lean_object* x_35; lean_dec(x_32); lean_dec(x_31); x_35 = l_Lean_IR_EmitC_throwInvalidExportName___rarg(x_1, x_2, x_21); return x_35; } } else { lean_object* x_36; lean_dec(x_31); x_36 = l_Lean_IR_EmitC_throwInvalidExportName___rarg(x_1, x_2, x_21); return x_36; } } } } } lean_object* l_Lean_IR_EmitC_toCName___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_toCName(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Lean_IR_EmitC_emitCName(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_toCName(x_1, x_2, x_3); if (lean_obj_tag(x_4) == 0) { uint8_t x_5; x_5 = !lean_is_exclusive(x_4); if (x_5 == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_6 = lean_ctor_get(x_4, 0); x_7 = lean_ctor_get(x_4, 1); x_8 = lean_string_append(x_7, x_6); lean_dec(x_6); x_9 = lean_box(0); lean_ctor_set(x_4, 1, x_8); lean_ctor_set(x_4, 0, x_9); return x_4; } else { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_10 = lean_ctor_get(x_4, 0); x_11 = lean_ctor_get(x_4, 1); lean_inc(x_11); lean_inc(x_10); lean_dec(x_4); x_12 = lean_string_append(x_11, x_10); lean_dec(x_10); x_13 = lean_box(0); x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_12); return x_14; } } else { uint8_t x_15; x_15 = !lean_is_exclusive(x_4); if (x_15 == 0) { return x_4; } else { lean_object* x_16; lean_object* x_17; lean_object* x_18; x_16 = lean_ctor_get(x_4, 0); x_17 = lean_ctor_get(x_4, 1); lean_inc(x_17); lean_inc(x_16); lean_dec(x_4); x_18 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_18, 0, x_16); lean_ctor_set(x_18, 1, x_17); return x_18; } } } } lean_object* l_Lean_IR_EmitC_emitCName___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_emitCName(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } static lean_object* _init_l_Lean_IR_EmitC_toCInitName___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("_init_"); return x_1; } } lean_object* l_Lean_IR_EmitC_toCInitName(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_5; x_4 = l_Lean_IR_EmitC_getEnv(x_2, x_3); x_5 = !lean_is_exclusive(x_4); if (x_5 == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_6 = lean_ctor_get(x_4, 0); x_7 = lean_ctor_get(x_4, 1); x_8 = l_Lean_exportAttr; lean_inc(x_1); x_9 = l_Lean_ParametricAttribute_getParam___at_Lean_getInitFnNameForCore_x3f___spec__1(x_8, x_6, x_1); lean_dec(x_6); if (lean_obj_tag(x_9) == 0) { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_10 = l_Lean_IR_EmitC_toCName___closed__1; x_11 = lean_name_mangle(x_1, x_10); x_12 = l_Lean_IR_EmitC_toCInitName___closed__1; x_13 = lean_string_append(x_12, x_11); lean_dec(x_11); lean_ctor_set(x_4, 0, x_13); return x_4; } else { lean_object* x_14; x_14 = lean_ctor_get(x_9, 0); lean_inc(x_14); lean_dec(x_9); if (lean_obj_tag(x_14) == 1) { lean_object* x_15; x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); if (lean_obj_tag(x_15) == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_dec(x_1); x_16 = lean_ctor_get(x_14, 1); lean_inc(x_16); lean_dec(x_14); x_17 = l_Lean_IR_EmitC_toCInitName___closed__1; x_18 = lean_string_append(x_17, x_16); lean_dec(x_16); lean_ctor_set(x_4, 0, x_18); return x_4; } else { lean_object* x_19; lean_dec(x_15); lean_dec(x_14); lean_free_object(x_4); x_19 = l_Lean_IR_EmitC_throwInvalidExportName___rarg(x_1, x_2, x_7); return x_19; } } else { lean_object* x_20; lean_dec(x_14); lean_free_object(x_4); x_20 = l_Lean_IR_EmitC_throwInvalidExportName___rarg(x_1, x_2, x_7); return x_20; } } } else { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; x_21 = lean_ctor_get(x_4, 0); x_22 = lean_ctor_get(x_4, 1); lean_inc(x_22); lean_inc(x_21); lean_dec(x_4); x_23 = l_Lean_exportAttr; lean_inc(x_1); x_24 = l_Lean_ParametricAttribute_getParam___at_Lean_getInitFnNameForCore_x3f___spec__1(x_23, x_21, x_1); lean_dec(x_21); if (lean_obj_tag(x_24) == 0) { lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; x_25 = l_Lean_IR_EmitC_toCName___closed__1; x_26 = lean_name_mangle(x_1, x_25); x_27 = l_Lean_IR_EmitC_toCInitName___closed__1; x_28 = lean_string_append(x_27, x_26); lean_dec(x_26); x_29 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_29, 0, x_28); lean_ctor_set(x_29, 1, x_22); return x_29; } else { lean_object* x_30; x_30 = lean_ctor_get(x_24, 0); lean_inc(x_30); lean_dec(x_24); if (lean_obj_tag(x_30) == 1) { lean_object* x_31; x_31 = lean_ctor_get(x_30, 0); lean_inc(x_31); if (lean_obj_tag(x_31) == 0) { lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_dec(x_1); x_32 = lean_ctor_get(x_30, 1); lean_inc(x_32); lean_dec(x_30); x_33 = l_Lean_IR_EmitC_toCInitName___closed__1; x_34 = lean_string_append(x_33, x_32); lean_dec(x_32); x_35 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_35, 0, x_34); lean_ctor_set(x_35, 1, x_22); return x_35; } else { lean_object* x_36; lean_dec(x_31); lean_dec(x_30); x_36 = l_Lean_IR_EmitC_throwInvalidExportName___rarg(x_1, x_2, x_22); return x_36; } } else { lean_object* x_37; lean_dec(x_30); x_37 = l_Lean_IR_EmitC_throwInvalidExportName___rarg(x_1, x_2, x_22); return x_37; } } } } } lean_object* l_Lean_IR_EmitC_toCInitName___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_toCInitName(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Lean_IR_EmitC_emitCInitName(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_toCInitName(x_1, x_2, x_3); if (lean_obj_tag(x_4) == 0) { uint8_t x_5; x_5 = !lean_is_exclusive(x_4); if (x_5 == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_6 = lean_ctor_get(x_4, 0); x_7 = lean_ctor_get(x_4, 1); x_8 = lean_string_append(x_7, x_6); lean_dec(x_6); x_9 = lean_box(0); lean_ctor_set(x_4, 1, x_8); lean_ctor_set(x_4, 0, x_9); return x_4; } else { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_10 = lean_ctor_get(x_4, 0); x_11 = lean_ctor_get(x_4, 1); lean_inc(x_11); lean_inc(x_10); lean_dec(x_4); x_12 = lean_string_append(x_11, x_10); lean_dec(x_10); x_13 = lean_box(0); x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_12); return x_14; } } else { uint8_t x_15; x_15 = !lean_is_exclusive(x_4); if (x_15 == 0) { return x_4; } else { lean_object* x_16; lean_object* x_17; lean_object* x_18; x_16 = lean_ctor_get(x_4, 0); x_17 = lean_ctor_get(x_4, 1); lean_inc(x_17); lean_inc(x_16); lean_dec(x_4); x_18 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_18, 0, x_16); lean_ctor_set(x_18, 1, x_17); return x_18; } } } } lean_object* l_Lean_IR_EmitC_emitCInitName___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_emitCInitName(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__1___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; x_6 = l_Lean_IR_instInhabitedParam; x_7 = lean_array_get(x_6, x_1, x_2); x_8 = lean_ctor_get(x_7, 1); lean_inc(x_8); lean_dec(x_7); x_9 = l_Lean_IR_EmitC_toCType(x_8); lean_dec(x_8); x_10 = lean_string_append(x_5, x_9); lean_dec(x_9); x_11 = lean_box(0); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_10); return x_12; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; uint8_t x_7; x_6 = lean_unsigned_to_nat(0u); x_7 = lean_nat_dec_eq(x_3, x_6); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; x_8 = lean_unsigned_to_nat(1u); x_9 = lean_nat_sub(x_3, x_8); lean_dec(x_3); x_10 = lean_nat_sub(x_2, x_9); x_11 = lean_nat_sub(x_10, x_8); lean_dec(x_10); x_12 = lean_nat_dec_lt(x_6, x_11); if (x_12 == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; x_13 = lean_box(0); x_14 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__1___lambda__1(x_1, x_11, x_13, x_4, x_5); lean_dec(x_11); x_15 = lean_ctor_get(x_14, 1); lean_inc(x_15); lean_dec(x_14); x_3 = x_9; x_5 = x_15; goto _start; } else { lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; x_17 = l_term_x5b___x5d___closed__5; x_18 = lean_string_append(x_5, x_17); x_19 = lean_box(0); x_20 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__1___lambda__1(x_1, x_11, x_19, x_4, x_18); lean_dec(x_11); x_21 = lean_ctor_get(x_20, 1); lean_inc(x_21); lean_dec(x_20); x_3 = x_9; x_5 = x_21; goto _start; } } else { lean_object* x_23; lean_object* x_24; lean_dec(x_3); x_23 = lean_box(0); x_24 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_5); return x_24; } } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; uint8_t x_7; x_6 = lean_unsigned_to_nat(0u); x_7 = lean_nat_dec_eq(x_3, x_6); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; x_8 = lean_unsigned_to_nat(1u); x_9 = lean_nat_sub(x_3, x_8); lean_dec(x_3); x_10 = lean_nat_sub(x_2, x_9); x_11 = lean_nat_sub(x_10, x_8); lean_dec(x_10); x_12 = lean_nat_dec_lt(x_6, x_11); if (x_12 == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; x_13 = lean_box(0); x_14 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__1___lambda__1(x_1, x_11, x_13, x_4, x_5); lean_dec(x_11); x_15 = lean_ctor_get(x_14, 1); lean_inc(x_15); lean_dec(x_14); x_3 = x_9; x_5 = x_15; goto _start; } else { lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; x_17 = l_term_x5b___x5d___closed__5; x_18 = lean_string_append(x_5, x_17); x_19 = lean_box(0); x_20 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__1___lambda__1(x_1, x_11, x_19, x_4, x_18); lean_dec(x_11); x_21 = lean_ctor_get(x_20, 1); lean_inc(x_21); lean_dec(x_20); x_3 = x_9; x_5 = x_21; goto _start; } } else { lean_object* x_23; lean_object* x_24; lean_dec(x_3); x_23 = lean_box(0); x_24 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_5); return x_24; } } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitFnDeclAux___spec__3(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) { _start: { uint8_t x_5; x_5 = x_2 == x_3; if (x_5 == 0) { lean_object* x_6; lean_object* x_7; uint8_t x_8; size_t x_9; size_t x_10; x_6 = lean_array_uget(x_1, x_2); x_7 = lean_ctor_get(x_6, 1); lean_inc(x_7); x_8 = l_Lean_IR_IRType_isIrrelevant(x_7); lean_dec(x_7); x_9 = 1; x_10 = x_2 + x_9; if (x_8 == 0) { lean_object* x_11; x_11 = lean_array_push(x_4, x_6); x_2 = x_10; x_4 = x_11; goto _start; } else { lean_dec(x_6); x_2 = x_10; goto _start; } } else { return x_4; } } } lean_object* l_Lean_IR_EmitC_emitFnDeclAux___lambda__1(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 = l_myMacro____x40_Init_Notation___hyg_16821____closed__12; x_5 = lean_string_append(x_3, x_4); x_6 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_7 = lean_string_append(x_5, x_6); 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; } } lean_object* l_Lean_IR_EmitC_emitFnDeclAux___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_5 = l_prec_x28___x29___closed__7; x_6 = lean_string_append(x_4, x_5); x_7 = lean_box(0); x_8 = lean_apply_3(x_1, x_7, x_3, x_6); return x_8; } } static lean_object* _init_l_Lean_IR_EmitC_emitFnDeclAux___lambda__3___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitFnDeclAux___lambda__1___boxed), 3, 0); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitFnDeclAux___lambda__3___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_object**"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitFnDeclAux___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; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; x_8 = l_Lean_IR_Decl_resultType(x_1); x_9 = l_Lean_IR_EmitC_toCType(x_8); lean_dec(x_8); x_10 = l___private_Init_Data_Format_Basic_0__Std_Format_be___closed__1; x_11 = lean_string_append(x_9, x_10); x_12 = lean_string_append(x_11, x_2); x_13 = lean_string_append(x_7, x_12); lean_dec(x_12); x_14 = l_Lean_IR_EmitC_emitFnDeclAux___lambda__3___closed__1; x_15 = l_Array_isEmpty___rarg(x_3); if (x_15 == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; lean_object* x_20; x_16 = l_prec_x28___x29___closed__3; x_17 = lean_string_append(x_13, x_16); x_18 = l_Lean_IR_Decl_name(x_1); lean_inc(x_18); x_19 = l_Lean_isExternC(x_4, x_18); if (x_19 == 0) { x_20 = x_3; goto block_37; } else { lean_object* x_38; lean_object* x_39; uint8_t x_40; x_38 = lean_array_get_size(x_3); x_39 = lean_unsigned_to_nat(0u); x_40 = lean_nat_dec_lt(x_39, x_38); if (x_40 == 0) { lean_object* x_41; lean_dec(x_38); lean_dec(x_3); x_41 = l_Array_empty___closed__1; x_20 = x_41; goto block_37; } else { uint8_t x_42; x_42 = lean_nat_dec_le(x_38, x_38); if (x_42 == 0) { lean_object* x_43; lean_dec(x_38); lean_dec(x_3); x_43 = l_Array_empty___closed__1; x_20 = x_43; goto block_37; } else { size_t x_44; size_t x_45; lean_object* x_46; lean_object* x_47; x_44 = 0; x_45 = lean_usize_of_nat(x_38); lean_dec(x_38); x_46 = l_Array_empty___closed__1; x_47 = l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitFnDeclAux___spec__3(x_3, x_44, x_45, x_46); lean_dec(x_3); x_20 = x_47; goto block_37; } } } block_37: { lean_object* x_21; lean_object* x_22; uint8_t x_23; x_21 = lean_array_get_size(x_20); x_22 = l_Lean_closureMaxArgs; x_23 = lean_nat_dec_lt(x_22, x_21); if (x_23 == 0) { lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_dec(x_18); lean_inc(x_21); x_24 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__1(x_20, x_21, x_21, x_6, x_17); lean_dec(x_21); lean_dec(x_20); x_25 = lean_ctor_get(x_24, 0); lean_inc(x_25); x_26 = lean_ctor_get(x_24, 1); lean_inc(x_26); lean_dec(x_24); x_27 = l_Lean_IR_EmitC_emitFnDeclAux___lambda__2(x_14, x_25, x_6, x_26); lean_dec(x_25); return x_27; } else { uint8_t x_28; x_28 = l_Lean_IR_ExplicitBoxing_isBoxedName(x_18); lean_dec(x_18); if (x_28 == 0) { lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_inc(x_21); x_29 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__2(x_20, x_21, x_21, x_6, x_17); lean_dec(x_21); lean_dec(x_20); x_30 = lean_ctor_get(x_29, 0); lean_inc(x_30); x_31 = lean_ctor_get(x_29, 1); lean_inc(x_31); lean_dec(x_29); x_32 = l_Lean_IR_EmitC_emitFnDeclAux___lambda__2(x_14, x_30, x_6, x_31); lean_dec(x_30); return x_32; } else { lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_dec(x_21); lean_dec(x_20); x_33 = l_Lean_IR_EmitC_emitFnDeclAux___lambda__3___closed__2; x_34 = lean_string_append(x_17, x_33); x_35 = lean_box(0); x_36 = l_Lean_IR_EmitC_emitFnDeclAux___lambda__2(x_14, x_35, x_6, x_34); return x_36; } } } } else { lean_object* x_48; lean_object* x_49; lean_dec(x_3); x_48 = lean_box(0); x_49 = lean_apply_3(x_14, x_48, x_6, x_13); return x_49; } } } lean_object* l_Lean_IR_EmitC_emitFnDeclAux(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; x_6 = l_Lean_IR_Decl_params(x_1); x_7 = l_Lean_IR_EmitC_getEnv(x_4, x_5); x_8 = lean_ctor_get(x_7, 0); lean_inc(x_8); x_9 = lean_ctor_get(x_7, 1); lean_inc(x_9); lean_dec(x_7); x_10 = l_Array_isEmpty___rarg(x_6); if (x_10 == 0) { lean_object* x_11; lean_object* x_12; x_11 = lean_box(0); x_12 = l_Lean_IR_EmitC_emitFnDeclAux___lambda__3(x_1, x_2, x_6, x_8, x_11, x_4, x_9); lean_dec(x_8); return x_12; } else { if (x_3 == 0) { lean_object* x_13; lean_object* x_14; x_13 = lean_box(0); x_14 = l_Lean_IR_EmitC_emitFnDeclAux___lambda__3(x_1, x_2, x_6, x_8, x_13, x_4, x_9); lean_dec(x_8); return x_14; } else { lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; x_15 = l_Lean_IR_formatDecl___closed__3; x_16 = lean_string_append(x_9, x_15); x_17 = lean_box(0); x_18 = l_Lean_IR_EmitC_emitFnDeclAux___lambda__3(x_1, x_2, x_6, x_8, x_17, x_4, x_16); lean_dec(x_8); return x_18; } } } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__1___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__1___lambda__1(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_6; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__1(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); return x_6; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__2___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_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__2(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); return x_6; } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitFnDeclAux___spec__3___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_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitFnDeclAux___spec__3(x_1, x_5, x_6, x_4); lean_dec(x_1); return x_7; } } lean_object* l_Lean_IR_EmitC_emitFnDeclAux___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_emitFnDeclAux___lambda__1(x_1, x_2, x_3); lean_dec(x_2); lean_dec(x_1); return x_4; } } lean_object* l_Lean_IR_EmitC_emitFnDeclAux___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitFnDeclAux___lambda__2(x_1, x_2, x_3, x_4); lean_dec(x_2); return x_5; } } lean_object* l_Lean_IR_EmitC_emitFnDeclAux___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_IR_EmitC_emitFnDeclAux___lambda__3(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_2); lean_dec(x_1); return x_8; } } lean_object* l_Lean_IR_EmitC_emitFnDeclAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { uint8_t x_6; lean_object* x_7; x_6 = lean_unbox(x_3); lean_dec(x_3); x_7 = l_Lean_IR_EmitC_emitFnDeclAux(x_1, x_2, x_6, x_4, x_5); lean_dec(x_2); lean_dec(x_1); return x_7; } } lean_object* l_Lean_IR_EmitC_emitFnDecl(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; x_5 = l_Lean_IR_Decl_name(x_1); x_6 = l_Lean_IR_EmitC_toCName(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; x_7 = lean_ctor_get(x_6, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_6, 1); lean_inc(x_8); lean_dec(x_6); x_9 = l_Lean_IR_EmitC_emitFnDeclAux(x_1, x_7, x_2, x_3, x_8); lean_dec(x_7); return x_9; } else { uint8_t x_10; lean_dec(x_3); x_10 = !lean_is_exclusive(x_6); if (x_10 == 0) { return x_6; } else { lean_object* x_11; lean_object* x_12; lean_object* x_13; x_11 = lean_ctor_get(x_6, 0); x_12 = lean_ctor_get(x_6, 1); lean_inc(x_12); lean_inc(x_11); lean_dec(x_6); x_13 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_13, 0, x_11); lean_ctor_set(x_13, 1, x_12); return x_13; } } } } lean_object* l_Lean_IR_EmitC_emitFnDecl___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { uint8_t x_5; lean_object* x_6; x_5 = lean_unbox(x_2); lean_dec(x_2); x_6 = l_Lean_IR_EmitC_emitFnDecl(x_1, x_5, x_3, x_4); lean_dec(x_1); return x_6; } } lean_object* l_Lean_IR_EmitC_emitExternDeclAux(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; x_5 = l_Lean_IR_EmitC_getEnv(x_3, x_4); x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = l_Lean_IR_Decl_name(x_1); x_9 = l_Lean_isExternC(x_6, x_8); lean_dec(x_6); if (x_9 == 0) { uint8_t x_10; lean_object* x_11; x_10 = 1; x_11 = l_Lean_IR_EmitC_emitFnDeclAux(x_1, x_2, x_10, x_3, x_7); return x_11; } else { uint8_t x_12; lean_object* x_13; x_12 = 0; x_13 = l_Lean_IR_EmitC_emitFnDeclAux(x_1, x_2, x_12, x_3, x_7); return x_13; } } } lean_object* l_Lean_IR_EmitC_emitExternDeclAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitExternDeclAux(x_1, x_2, x_3, x_4); lean_dec(x_2); lean_dec(x_1); return x_5; } } lean_object* l_Lean_IR_EmitC_emitFnDecls_match__1___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_IR_EmitC_emitFnDecls_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitFnDecls_match__1___rarg), 3, 0); return x_2; } } lean_object* l_List_foldl___at_Lean_IR_EmitC_emitFnDecls___spec__1(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { return x_1; } else { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; x_3 = lean_ctor_get(x_2, 0); x_4 = lean_ctor_get(x_2, 1); x_5 = l_Lean_IR_Decl_name(x_3); x_6 = lean_box(0); x_7 = l_Std_RBNode_insert___at_Lean_NameSet_insert___spec__1(x_1, x_5, x_6); x_1 = x_7; x_2 = x_4; goto _start; } } } lean_object* l_List_foldl___at_Lean_IR_EmitC_emitFnDecls___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_3) == 0) { lean_dec(x_1); return x_2; } else { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_4 = lean_ctor_get(x_3, 0); lean_inc(x_4); x_5 = lean_ctor_get(x_3, 1); lean_inc(x_5); lean_dec(x_3); x_6 = l_Lean_IR_Decl_name(x_4); x_7 = lean_box(0); x_8 = l_Std_RBNode_insert___at_Lean_NameSet_insert___spec__1(x_2, x_6, x_7); lean_inc(x_1); x_9 = l_Lean_IR_collectUsedDecls(x_1, x_4, x_8); x_2 = x_9; x_3 = x_5; goto _start; } } } lean_object* l_Std_RBNode_revFold___at_Lean_IR_EmitC_emitFnDecls___spec__4(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { return x_1; } else { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; x_3 = lean_ctor_get(x_2, 0); x_4 = lean_ctor_get(x_2, 1); x_5 = lean_ctor_get(x_2, 3); x_6 = l_Std_RBNode_revFold___at_Lean_IR_EmitC_emitFnDecls___spec__4(x_1, 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_1 = x_7; x_2 = x_3; goto _start; } } } lean_object* l_Std_RBTree_toList___at_Lean_IR_EmitC_emitFnDecls___spec__3(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = lean_box(0); x_3 = l_Std_RBNode_revFold___at_Lean_IR_EmitC_emitFnDecls___spec__4(x_2, x_1); return x_3; } } static lean_object* _init_l_List_forM___at_Lean_IR_EmitC_emitFnDecls___spec__5___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("c"); return x_1; } } static lean_object* _init_l_List_forM___at_Lean_IR_EmitC_emitFnDecls___spec__5___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); x_2 = l_List_forM___at_Lean_IR_EmitC_emitFnDecls___spec__5___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } lean_object* l_List_forM___at_Lean_IR_EmitC_emitFnDecls___spec__5(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_3) == 0) { lean_object* x_6; lean_object* x_7; lean_dec(x_4); x_6 = lean_box(0); x_7 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_7, 0, x_6); lean_ctor_set(x_7, 1, x_5); return x_7; } else { lean_object* x_8; lean_object* x_9; lean_object* x_10; x_8 = lean_ctor_get(x_3, 0); lean_inc(x_8); x_9 = lean_ctor_get(x_3, 1); lean_inc(x_9); lean_dec(x_3); lean_inc(x_8); x_10 = l_Lean_IR_EmitC_getDecl(x_8, x_4, x_5); if (lean_obj_tag(x_10) == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); x_12 = lean_ctor_get(x_10, 1); lean_inc(x_12); lean_dec(x_10); x_13 = l_Lean_IR_Decl_name(x_11); x_14 = l_List_forM___at_Lean_IR_EmitC_emitFnDecls___spec__5___closed__2; x_15 = l_Lean_getExternNameFor(x_1, x_14, x_13); if (lean_obj_tag(x_15) == 0) { uint8_t x_16; x_16 = l_Lean_NameSet_contains(x_2, x_8); lean_dec(x_8); if (x_16 == 0) { uint8_t x_17; lean_object* x_18; x_17 = 1; lean_inc(x_4); x_18 = l_Lean_IR_EmitC_emitFnDecl(x_11, x_17, x_4, x_12); lean_dec(x_11); if (lean_obj_tag(x_18) == 0) { lean_object* x_19; x_19 = lean_ctor_get(x_18, 1); lean_inc(x_19); lean_dec(x_18); x_3 = x_9; x_5 = x_19; goto _start; } else { uint8_t x_21; lean_dec(x_9); lean_dec(x_4); x_21 = !lean_is_exclusive(x_18); if (x_21 == 0) { return x_18; } else { lean_object* x_22; lean_object* x_23; lean_object* x_24; x_22 = lean_ctor_get(x_18, 0); x_23 = lean_ctor_get(x_18, 1); lean_inc(x_23); lean_inc(x_22); lean_dec(x_18); x_24 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_24, 0, x_22); lean_ctor_set(x_24, 1, x_23); return x_24; } } } else { uint8_t x_25; lean_object* x_26; x_25 = 0; lean_inc(x_4); x_26 = l_Lean_IR_EmitC_emitFnDecl(x_11, x_25, x_4, x_12); lean_dec(x_11); if (lean_obj_tag(x_26) == 0) { lean_object* x_27; x_27 = lean_ctor_get(x_26, 1); lean_inc(x_27); lean_dec(x_26); x_3 = x_9; x_5 = x_27; goto _start; } else { uint8_t x_29; lean_dec(x_9); lean_dec(x_4); x_29 = !lean_is_exclusive(x_26); if (x_29 == 0) { return x_26; } else { lean_object* x_30; lean_object* x_31; lean_object* x_32; x_30 = lean_ctor_get(x_26, 0); x_31 = lean_ctor_get(x_26, 1); lean_inc(x_31); lean_inc(x_30); lean_dec(x_26); x_32 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_32, 0, x_30); lean_ctor_set(x_32, 1, x_31); return x_32; } } } } else { lean_object* x_33; lean_object* x_34; lean_dec(x_8); x_33 = lean_ctor_get(x_15, 0); lean_inc(x_33); lean_dec(x_15); lean_inc(x_4); x_34 = l_Lean_IR_EmitC_emitExternDeclAux(x_11, x_33, x_4, x_12); lean_dec(x_33); lean_dec(x_11); if (lean_obj_tag(x_34) == 0) { lean_object* x_35; x_35 = lean_ctor_get(x_34, 1); lean_inc(x_35); lean_dec(x_34); x_3 = x_9; x_5 = x_35; goto _start; } else { uint8_t x_37; lean_dec(x_9); lean_dec(x_4); x_37 = !lean_is_exclusive(x_34); if (x_37 == 0) { return x_34; } else { lean_object* x_38; lean_object* x_39; lean_object* x_40; x_38 = lean_ctor_get(x_34, 0); x_39 = lean_ctor_get(x_34, 1); lean_inc(x_39); lean_inc(x_38); lean_dec(x_34); 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 { uint8_t x_41; lean_dec(x_9); lean_dec(x_8); lean_dec(x_4); x_41 = !lean_is_exclusive(x_10); if (x_41 == 0) { return x_10; } else { lean_object* x_42; lean_object* x_43; lean_object* x_44; x_42 = lean_ctor_get(x_10, 0); x_43 = lean_ctor_get(x_10, 1); lean_inc(x_43); lean_inc(x_42); lean_dec(x_10); 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; } } } } } lean_object* l_Lean_IR_EmitC_emitFnDecls(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; x_3 = l_Lean_IR_EmitC_getEnv(x_1, x_2); x_4 = lean_ctor_get(x_3, 0); lean_inc(x_4); x_5 = lean_ctor_get(x_3, 1); lean_inc(x_5); lean_dec(x_3); x_6 = l_Lean_IR_declMapExt; x_7 = l_Lean_SimplePersistentEnvExtension_getEntries___rarg(x_6, x_4); x_8 = l_Lean_NameSet_empty; x_9 = l_List_foldl___at_Lean_IR_EmitC_emitFnDecls___spec__1(x_8, x_7); lean_inc(x_4); x_10 = l_List_foldl___at_Lean_IR_EmitC_emitFnDecls___spec__2(x_4, x_8, x_7); x_11 = l_Std_RBTree_toList___at_Lean_IR_EmitC_emitFnDecls___spec__3(x_10); lean_dec(x_10); x_12 = l_List_forM___at_Lean_IR_EmitC_emitFnDecls___spec__5(x_4, x_9, x_11, x_1, x_5); lean_dec(x_9); lean_dec(x_4); return x_12; } } lean_object* l_List_foldl___at_Lean_IR_EmitC_emitFnDecls___spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_List_foldl___at_Lean_IR_EmitC_emitFnDecls___spec__1(x_1, x_2); lean_dec(x_2); return x_3; } } lean_object* l_Std_RBNode_revFold___at_Lean_IR_EmitC_emitFnDecls___spec__4___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Std_RBNode_revFold___at_Lean_IR_EmitC_emitFnDecls___spec__4(x_1, x_2); lean_dec(x_2); return x_3; } } lean_object* l_Std_RBTree_toList___at_Lean_IR_EmitC_emitFnDecls___spec__3___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Std_RBTree_toList___at_Lean_IR_EmitC_emitFnDecls___spec__3(x_1); lean_dec(x_1); return x_2; } } lean_object* l_List_forM___at_Lean_IR_EmitC_emitFnDecls___spec__5___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_List_forM___at_Lean_IR_EmitC_emitFnDecls___spec__5(x_1, x_2, x_3, x_4, x_5); lean_dec(x_2); lean_dec(x_1); return x_6; } } lean_object* l_Lean_IR_EmitC_emitMainFn_match__1___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_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; 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); x_6 = lean_ctor_get(x_1, 2); lean_inc(x_6); x_7 = lean_ctor_get(x_1, 3); lean_inc(x_7); x_8 = lean_ctor_get(x_1, 4); lean_inc(x_8); lean_dec(x_1); x_9 = lean_apply_5(x_2, x_4, x_5, x_6, x_7, x_8); return x_9; } else { lean_object* x_10; lean_dec(x_2); x_10 = lean_apply_1(x_3, x_1); return x_10; } } } lean_object* l_Lean_IR_EmitC_emitMainFn_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitMainFn_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_IR_EmitC_emitLn___at_Lean_IR_EmitC_emitMainFn___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_string_append(x_3, x_1); x_5 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_6 = lean_string_append(x_4, x_5); x_7 = lean_box(0); x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_7); lean_ctor_set(x_8, 1, x_6); return x_8; } } lean_object* l_List_forM___at_Lean_IR_EmitC_emitMainFn___spec__3(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; x_4 = lean_box(0); x_5 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_5, 0, x_4); lean_ctor_set(x_5, 1, x_3); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_6 = lean_ctor_get(x_1, 0); x_7 = lean_ctor_get(x_1, 1); x_8 = l_Lean_IR_EmitC_emitLn___at_Lean_IR_EmitC_emitMainFn___spec__2(x_6, x_2, x_3); x_9 = lean_ctor_get(x_8, 1); lean_inc(x_9); lean_dec(x_8); x_1 = x_7; x_3 = x_9; goto _start; } } } lean_object* l_Lean_IR_EmitC_emitLns___at_Lean_IR_EmitC_emitMainFn___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_List_forM___at_Lean_IR_EmitC_emitMainFn___spec__3(x_1, x_2, x_3); return x_4; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string(" return 1;"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string(" lean_dec_ref(res);"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string(" lean_io_result_show_error(res);"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__4() { _start: { lean_object* x_1; x_1 = lean_mk_string("} else {"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__5() { _start: { lean_object* x_1; x_1 = lean_mk_string(" return ret;"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__6() { _start: { lean_object* x_1; x_1 = lean_mk_string(" int ret = lean_unbox(lean_io_result_get_value(res));"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__7() { _start: { lean_object* x_1; x_1 = lean_mk_string("if (lean_io_result_is_ok(res)) {"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; x_5 = l_term_x7b_x7d___closed__5; x_6 = lean_string_append(x_4, x_5); x_7 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_8 = lean_string_append(x_6, x_7); x_9 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_9, 0, x_5); lean_ctor_set(x_9, 1, x_1); x_10 = l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__1; x_11 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_9); x_12 = l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__2; x_13 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_11); x_14 = l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__3; x_15 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_13); x_16 = l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__4; x_17 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_15); x_18 = l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__5; x_19 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_17); x_20 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_20, 0, x_12); lean_ctor_set(x_20, 1, x_19); x_21 = l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__6; x_22 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_22, 0, x_21); lean_ctor_set(x_22, 1, x_20); x_23 = l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__7; x_24 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_22); x_25 = l_List_forM___at_Lean_IR_EmitC_emitMainFn___spec__3(x_24, x_3, x_8); lean_dec(x_24); x_26 = !lean_is_exclusive(x_25); if (x_26 == 0) { lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; x_27 = lean_ctor_get(x_25, 1); x_28 = lean_ctor_get(x_25, 0); lean_dec(x_28); x_29 = lean_string_append(x_27, x_5); x_30 = lean_string_append(x_29, x_7); x_31 = lean_box(0); lean_ctor_set(x_25, 1, x_30); lean_ctor_set(x_25, 0, x_31); return x_25; } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; x_32 = lean_ctor_get(x_25, 1); lean_inc(x_32); lean_dec(x_25); x_33 = lean_string_append(x_32, x_5); x_34 = lean_string_append(x_33, x_7); 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_34); return x_36; } } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("res = "); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("(lean_io_mk_world());"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_init_task_manager();"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); x_2 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__3; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__5() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_dec_ref(res);"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__6() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__5; x_2 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__4; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__7() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__7; x_2 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__6; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__8() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_io_mark_end_initialization();"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__9() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__8; x_2 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__7; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__10() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__1; x_2 = l_Lean_IR_EmitC_leanMainFn; x_3 = lean_string_append(x_1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__11() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__10; x_2 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__2; x_3 = lean_string_append(x_1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__12() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); x_2 = l_term_x7b_x7d___closed__5; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__13() { _start: { lean_object* x_1; x_1 = lean_mk_string(" in = n;"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__14() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__13; x_2 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__12; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__15() { _start: { lean_object* x_1; x_1 = lean_mk_string(" n = lean_alloc_ctor(1,2,0); lean_ctor_set(n, 0, lean_mk_string(argv[i])); lean_ctor_set(n, 1, in);"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__16() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__15; x_2 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__14; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__17() { _start: { lean_object* x_1; x_1 = lean_mk_string(" i--;"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__18() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__17; x_2 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__16; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__19() { _start: { lean_object* x_1; x_1 = lean_mk_string(" lean_object* n;"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__20() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__19; x_2 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__18; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__21() { _start: { lean_object* x_1; x_1 = lean_mk_string("while (i > 1) {"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__22() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__21; x_2 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__20; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__23() { _start: { lean_object* x_1; x_1 = lean_mk_string("int i = argc;"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__24() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__23; x_2 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__22; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__25() { _start: { lean_object* x_1; x_1 = lean_mk_string("in = lean_box(0);"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__26() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__25; x_2 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__24; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__27() { _start: { lean_object* x_1; x_1 = lean_mk_string("(in, lean_io_mk_world());"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__28() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__10; x_2 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__27; x_3 = lean_string_append(x_1, x_2); return x_3; } } lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; x_5 = l_Lean_IR_EmitC_getModName(x_3, x_4); x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = lean_mk_module_initialization_function_name(x_6); x_9 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__1; x_10 = lean_string_append(x_9, x_8); lean_dec(x_8); x_11 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__2; x_12 = lean_string_append(x_10, x_11); x_13 = lean_string_append(x_7, x_12); lean_dec(x_12); x_14 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_15 = lean_string_append(x_13, x_14); x_16 = lean_box(0); x_17 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__9; x_18 = l_List_forM___at_Lean_IR_EmitC_emitMainFn___spec__3(x_17, x_3, x_15); x_19 = lean_ctor_get(x_18, 1); lean_inc(x_19); lean_dec(x_18); x_20 = lean_array_get_size(x_1); x_21 = lean_unsigned_to_nat(2u); x_22 = lean_nat_dec_eq(x_20, x_21); lean_dec(x_20); if (x_22 == 0) { lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; x_23 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__11; x_24 = lean_string_append(x_19, x_23); x_25 = lean_string_append(x_24, x_14); x_26 = lean_box(0); x_27 = l_Lean_IR_EmitC_emitMainFn___lambda__1(x_16, x_26, x_3, x_25); return x_27; } else { lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; x_28 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__26; x_29 = l_List_forM___at_Lean_IR_EmitC_emitMainFn___spec__3(x_28, x_3, x_19); x_30 = lean_ctor_get(x_29, 1); lean_inc(x_30); lean_dec(x_29); x_31 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__28; x_32 = lean_string_append(x_30, x_31); x_33 = lean_string_append(x_32, x_14); x_34 = lean_box(0); x_35 = l_Lean_IR_EmitC_emitMainFn___lambda__1(x_16, x_34, x_3, x_33); return x_35; } } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__3___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("\n #if defined(WIN32) || defined(_WIN32)\n #include <windows.h>\n #endif\n\n int main(int argc, char ** argv) {\n #if defined(WIN32) || defined(_WIN32)\n SetErrorMode(SEM_FAILCRITICALERRORS);\n #endif\n lean_object* in; lean_object* res;"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__3___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_initialize_runtime_module();"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__3___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_initialize();"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__3(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_6 = l_Lean_IR_EmitC_emitMainFn___lambda__3___closed__1; x_7 = lean_string_append(x_5, x_6); x_8 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_9 = lean_string_append(x_7, x_8); if (x_2 == 0) { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_10 = l_Lean_IR_EmitC_emitMainFn___lambda__3___closed__2; x_11 = lean_string_append(x_9, x_10); x_12 = lean_string_append(x_11, x_8); x_13 = lean_box(0); x_14 = l_Lean_IR_EmitC_emitMainFn___lambda__2(x_1, x_13, x_4, 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; x_15 = l_Lean_IR_EmitC_emitMainFn___lambda__3___closed__3; x_16 = lean_string_append(x_9, x_15); x_17 = lean_string_append(x_16, x_8); x_18 = lean_box(0); x_19 = l_Lean_IR_EmitC_emitMainFn___lambda__2(x_1, x_18, x_4, x_17); return x_19; } } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__4___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("void lean_initialize_runtime_module();"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___lambda__4___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("void lean_initialize();"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; x_5 = l_Lean_IR_EmitC_getEnv(x_3, x_4); x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = l_Lean_Parser_Syntax_addPrec___closed__2; x_9 = l_Lean_IR_usesModuleFrom(x_6, x_8); lean_dec(x_6); if (x_9 == 0) { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_10 = l_Lean_IR_EmitC_emitMainFn___lambda__4___closed__1; x_11 = lean_string_append(x_7, x_10); x_12 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_13 = lean_string_append(x_11, x_12); x_14 = lean_box(0); x_15 = l_Lean_IR_EmitC_emitMainFn___lambda__3(x_1, x_9, x_14, x_3, x_13); return x_15; } 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 = l_Lean_IR_EmitC_emitMainFn___lambda__4___closed__2; x_17 = lean_string_append(x_7, x_16); x_18 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_19 = lean_string_append(x_17, x_18); x_20 = lean_box(0); x_21 = l_Lean_IR_EmitC_emitMainFn___lambda__3(x_1, x_9, x_20, x_3, x_19); return x_21; } } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("invalid main function, incorrect arity when generating code"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitMainFn___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("function declaration expected"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitMainFn(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; x_3 = l_Lean_isExport___closed__2; x_4 = l_Lean_IR_EmitC_getDecl(x_3, x_1, x_2); if (lean_obj_tag(x_4) == 0) { lean_object* x_5; x_5 = lean_ctor_get(x_4, 0); lean_inc(x_5); if (lean_obj_tag(x_5) == 0) { uint8_t x_6; x_6 = !lean_is_exclusive(x_4); if (x_6 == 0) { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; x_7 = lean_ctor_get(x_4, 1); x_8 = lean_ctor_get(x_4, 0); lean_dec(x_8); x_9 = lean_ctor_get(x_5, 1); lean_inc(x_9); lean_dec(x_5); x_10 = lean_array_get_size(x_9); x_11 = lean_unsigned_to_nat(2u); x_12 = lean_nat_dec_eq(x_10, x_11); if (x_12 == 0) { lean_object* x_13; uint8_t x_14; x_13 = lean_unsigned_to_nat(1u); x_14 = lean_nat_dec_eq(x_10, x_13); lean_dec(x_10); if (x_14 == 0) { lean_object* x_15; lean_dec(x_9); x_15 = l_Lean_IR_EmitC_emitMainFn___closed__1; lean_ctor_set_tag(x_4, 1); lean_ctor_set(x_4, 0, x_15); return x_4; } else { lean_object* x_16; lean_object* x_17; lean_free_object(x_4); x_16 = lean_box(0); x_17 = l_Lean_IR_EmitC_emitMainFn___lambda__4(x_9, x_16, x_1, x_7); lean_dec(x_9); return x_17; } } else { lean_object* x_18; lean_object* x_19; lean_dec(x_10); lean_free_object(x_4); x_18 = lean_box(0); x_19 = l_Lean_IR_EmitC_emitMainFn___lambda__4(x_9, x_18, x_1, x_7); lean_dec(x_9); return x_19; } } 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_4, 1); lean_inc(x_20); lean_dec(x_4); x_21 = lean_ctor_get(x_5, 1); lean_inc(x_21); lean_dec(x_5); x_22 = lean_array_get_size(x_21); x_23 = lean_unsigned_to_nat(2u); x_24 = lean_nat_dec_eq(x_22, x_23); if (x_24 == 0) { lean_object* x_25; uint8_t x_26; x_25 = lean_unsigned_to_nat(1u); x_26 = lean_nat_dec_eq(x_22, x_25); lean_dec(x_22); if (x_26 == 0) { lean_object* x_27; lean_object* x_28; lean_dec(x_21); x_27 = l_Lean_IR_EmitC_emitMainFn___closed__1; x_28 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_28, 0, x_27); lean_ctor_set(x_28, 1, x_20); return x_28; } else { lean_object* x_29; lean_object* x_30; x_29 = lean_box(0); x_30 = l_Lean_IR_EmitC_emitMainFn___lambda__4(x_21, x_29, x_1, x_20); lean_dec(x_21); return x_30; } } else { lean_object* x_31; lean_object* x_32; lean_dec(x_22); x_31 = lean_box(0); x_32 = l_Lean_IR_EmitC_emitMainFn___lambda__4(x_21, x_31, x_1, x_20); lean_dec(x_21); return x_32; } } } else { uint8_t x_33; lean_dec(x_5); x_33 = !lean_is_exclusive(x_4); if (x_33 == 0) { lean_object* x_34; lean_object* x_35; x_34 = lean_ctor_get(x_4, 0); lean_dec(x_34); x_35 = l_Lean_IR_EmitC_emitMainFn___closed__2; lean_ctor_set_tag(x_4, 1); lean_ctor_set(x_4, 0, x_35); return x_4; } else { lean_object* x_36; lean_object* x_37; lean_object* x_38; x_36 = lean_ctor_get(x_4, 1); lean_inc(x_36); lean_dec(x_4); x_37 = l_Lean_IR_EmitC_emitMainFn___closed__2; x_38 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_38, 0, x_37); lean_ctor_set(x_38, 1, x_36); return x_38; } } } else { uint8_t x_39; x_39 = !lean_is_exclusive(x_4); if (x_39 == 0) { return x_4; } else { lean_object* x_40; lean_object* x_41; lean_object* x_42; x_40 = lean_ctor_get(x_4, 0); x_41 = lean_ctor_get(x_4, 1); lean_inc(x_41); lean_inc(x_40); lean_dec(x_4); x_42 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_42, 0, x_40); lean_ctor_set(x_42, 1, x_41); return x_42; } } } } lean_object* l_Lean_IR_EmitC_emitLn___at_Lean_IR_EmitC_emitMainFn___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_emitLn___at_Lean_IR_EmitC_emitMainFn___spec__2(x_1, x_2, x_3); lean_dec(x_2); lean_dec(x_1); return x_4; } } lean_object* l_List_forM___at_Lean_IR_EmitC_emitMainFn___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_List_forM___at_Lean_IR_EmitC_emitMainFn___spec__3(x_1, x_2, x_3); lean_dec(x_2); lean_dec(x_1); return x_4; } } lean_object* l_Lean_IR_EmitC_emitLns___at_Lean_IR_EmitC_emitMainFn___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_emitLns___at_Lean_IR_EmitC_emitMainFn___spec__1(x_1, x_2, x_3); lean_dec(x_2); lean_dec(x_1); return x_4; } } lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitMainFn___lambda__1(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); return x_5; } } lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitMainFn___lambda__2(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_5; } } lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { uint8_t x_6; lean_object* x_7; x_6 = lean_unbox(x_2); lean_dec(x_2); x_7 = l_Lean_IR_EmitC_emitMainFn___lambda__3(x_1, x_6, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); return x_7; } } lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitMainFn___lambda__4(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_5; } } lean_object* l_Lean_IR_EmitC_emitMainFn___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_IR_EmitC_emitMainFn(x_1, x_2); lean_dec(x_1); return x_3; } } uint8_t l_List_foldr___at_Lean_IR_EmitC_hasMainFn___spec__1(uint8_t x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { return x_1; } else { lean_object* x_3; lean_object* x_4; uint8_t x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; x_3 = lean_ctor_get(x_2, 0); x_4 = lean_ctor_get(x_2, 1); x_5 = l_List_foldr___at_Lean_IR_EmitC_hasMainFn___spec__1(x_1, x_4); x_6 = l_Lean_IR_Decl_name(x_3); x_7 = l_Lean_isExport___closed__2; x_8 = lean_name_eq(x_6, x_7); lean_dec(x_6); if (x_8 == 0) { return x_5; } else { uint8_t x_9; x_9 = 1; return x_9; } } } } lean_object* l_Lean_IR_EmitC_hasMainFn(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; uint8_t x_4; x_3 = l_Lean_IR_EmitC_getEnv(x_1, x_2); x_4 = !lean_is_exclusive(x_3); if (x_4 == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; uint8_t x_9; lean_object* x_10; x_5 = lean_ctor_get(x_3, 0); x_6 = l_Lean_IR_declMapExt; x_7 = l_Lean_SimplePersistentEnvExtension_getEntries___rarg(x_6, x_5); lean_dec(x_5); x_8 = 0; x_9 = l_List_foldr___at_Lean_IR_EmitC_hasMainFn___spec__1(x_8, x_7); lean_dec(x_7); x_10 = lean_box(x_9); lean_ctor_set(x_3, 0, x_10); return x_3; } else { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; uint8_t x_16; lean_object* x_17; lean_object* x_18; x_11 = lean_ctor_get(x_3, 0); x_12 = lean_ctor_get(x_3, 1); lean_inc(x_12); lean_inc(x_11); lean_dec(x_3); x_13 = l_Lean_IR_declMapExt; x_14 = l_Lean_SimplePersistentEnvExtension_getEntries___rarg(x_13, x_11); lean_dec(x_11); x_15 = 0; x_16 = l_List_foldr___at_Lean_IR_EmitC_hasMainFn___spec__1(x_15, x_14); lean_dec(x_14); x_17 = lean_box(x_16); x_18 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_12); return x_18; } } } lean_object* l_List_foldr___at_Lean_IR_EmitC_hasMainFn___spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; uint8_t x_4; lean_object* x_5; x_3 = lean_unbox(x_1); lean_dec(x_1); x_4 = l_List_foldr___at_Lean_IR_EmitC_hasMainFn___spec__1(x_3, x_2); lean_dec(x_2); x_5 = lean_box(x_4); return x_5; } } lean_object* l_Lean_IR_EmitC_hasMainFn___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_IR_EmitC_hasMainFn(x_1, x_2); lean_dec(x_1); return x_3; } } lean_object* l_Lean_IR_EmitC_emitMainFnIfNeeded(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; uint8_t x_5; x_3 = l_Lean_IR_EmitC_hasMainFn(x_1, x_2); x_4 = lean_ctor_get(x_3, 0); lean_inc(x_4); x_5 = lean_unbox(x_4); lean_dec(x_4); if (x_5 == 0) { uint8_t x_6; x_6 = !lean_is_exclusive(x_3); if (x_6 == 0) { lean_object* x_7; lean_object* x_8; x_7 = lean_ctor_get(x_3, 0); lean_dec(x_7); x_8 = lean_box(0); lean_ctor_set(x_3, 0, x_8); return x_3; } else { lean_object* x_9; lean_object* x_10; lean_object* x_11; x_9 = lean_ctor_get(x_3, 1); lean_inc(x_9); lean_dec(x_3); x_10 = lean_box(0); x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_9); return x_11; } } else { lean_object* x_12; lean_object* x_13; x_12 = lean_ctor_get(x_3, 1); lean_inc(x_12); lean_dec(x_3); x_13 = l_Lean_IR_EmitC_emitMainFn(x_1, x_12); return x_13; } } } lean_object* l_Lean_IR_EmitC_emitMainFnIfNeeded___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_IR_EmitC_emitMainFnIfNeeded(x_1, x_2); lean_dec(x_1); return x_3; } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitFileHeader___spec__1(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { uint8_t x_7; x_7 = x_2 == x_3; if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; lean_dec(x_4); x_8 = lean_array_uget(x_1, x_2); x_9 = lean_ctor_get(x_8, 0); lean_inc(x_9); x_10 = l_Lean_Name_toString___closed__1; x_11 = l_Lean_Name_toStringWithSep(x_10, x_9); x_12 = lean_ctor_get_uint8(x_8, sizeof(void*)*1); lean_dec(x_8); if (x_12 == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; lean_object* x_20; x_13 = l_Lean_instInhabitedParserDescr___closed__1; x_14 = lean_string_append(x_11, x_13); x_15 = l___private_Init_Data_Format_Basic_0__Std_Format_be___closed__1; x_16 = lean_string_append(x_15, x_14); lean_dec(x_14); x_17 = lean_string_append(x_6, x_16); lean_dec(x_16); x_18 = 1; x_19 = x_2 + x_18; x_20 = lean_box(0); x_2 = x_19; x_4 = x_20; x_6 = x_17; goto _start; } else { lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; size_t x_27; size_t x_28; lean_object* x_29; x_22 = l_Lean_instToStringImport___closed__1; x_23 = lean_string_append(x_11, x_22); x_24 = l___private_Init_Data_Format_Basic_0__Std_Format_be___closed__1; x_25 = lean_string_append(x_24, x_23); lean_dec(x_23); x_26 = lean_string_append(x_6, x_25); lean_dec(x_25); x_27 = 1; x_28 = x_2 + x_27; x_29 = lean_box(0); x_2 = x_28; x_4 = x_29; x_6 = x_26; goto _start; } } else { lean_object* x_31; x_31 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_31, 0, x_4); lean_ctor_set(x_31, 1, x_6); return x_31; } } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("#include <lean/lean.h>"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("#endif"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); x_2 = l_Lean_IR_EmitC_emitFileHeader___closed__2; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__4() { _start: { lean_object* x_1; x_1 = lean_mk_string("extern \"C\" {"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__5() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitFileHeader___closed__4; x_2 = l_Lean_IR_EmitC_emitFileHeader___closed__3; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__6() { _start: { lean_object* x_1; x_1 = lean_mk_string("#ifdef __cplusplus"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__7() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitFileHeader___closed__6; x_2 = l_Lean_IR_EmitC_emitFileHeader___closed__5; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__8() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitFileHeader___closed__2; x_2 = l_Lean_IR_EmitC_emitFileHeader___closed__7; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__9() { _start: { lean_object* x_1; x_1 = lean_mk_string("#pragma GCC diagnostic ignored \"-Wunused-but-set-variable\""); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__10() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitFileHeader___closed__9; x_2 = l_Lean_IR_EmitC_emitFileHeader___closed__8; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__11() { _start: { lean_object* x_1; x_1 = lean_mk_string("#pragma GCC diagnostic ignored \"-Wunused-label\""); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__12() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitFileHeader___closed__11; x_2 = l_Lean_IR_EmitC_emitFileHeader___closed__10; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__13() { _start: { lean_object* x_1; x_1 = lean_mk_string("#pragma GCC diagnostic ignored \"-Wunused-parameter\""); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__14() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitFileHeader___closed__13; x_2 = l_Lean_IR_EmitC_emitFileHeader___closed__12; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__15() { _start: { lean_object* x_1; x_1 = lean_mk_string("#elif defined(__GNUC__) && !defined(__CLANG__)"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__16() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitFileHeader___closed__15; x_2 = l_Lean_IR_EmitC_emitFileHeader___closed__14; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__17() { _start: { lean_object* x_1; x_1 = lean_mk_string("#pragma clang diagnostic ignored \"-Wunused-label\""); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__18() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitFileHeader___closed__17; x_2 = l_Lean_IR_EmitC_emitFileHeader___closed__16; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__19() { _start: { lean_object* x_1; x_1 = lean_mk_string("#pragma clang diagnostic ignored \"-Wunused-parameter\""); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__20() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitFileHeader___closed__19; x_2 = l_Lean_IR_EmitC_emitFileHeader___closed__18; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__21() { _start: { lean_object* x_1; x_1 = lean_mk_string("#if defined(__clang__)"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__22() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitFileHeader___closed__21; x_2 = l_Lean_IR_EmitC_emitFileHeader___closed__20; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__23() { _start: { lean_object* x_1; x_1 = lean_mk_string("// Lean compiler output"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__24() { _start: { lean_object* x_1; x_1 = lean_mk_string("// Module: "); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileHeader___closed__25() { _start: { lean_object* x_1; x_1 = lean_mk_string("// Imports:"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitFileHeader(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; x_14 = l_Lean_IR_EmitC_getEnv(x_1, x_2); x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); x_16 = lean_ctor_get(x_14, 1); lean_inc(x_16); lean_dec(x_14); x_17 = l_Lean_IR_EmitC_getModName(x_1, x_16); x_18 = lean_ctor_get(x_17, 0); lean_inc(x_18); x_19 = lean_ctor_get(x_17, 1); lean_inc(x_19); lean_dec(x_17); x_20 = l_Lean_IR_EmitC_emitFileHeader___closed__23; x_21 = lean_string_append(x_19, x_20); x_22 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_23 = lean_string_append(x_21, x_22); x_24 = l_Lean_Name_toString___closed__1; x_25 = l_Lean_Name_toStringWithSep(x_24, x_18); x_26 = l_Lean_IR_EmitC_emitFileHeader___closed__24; x_27 = lean_string_append(x_26, x_25); lean_dec(x_25); x_28 = lean_string_append(x_23, x_27); lean_dec(x_27); x_29 = lean_string_append(x_28, x_22); x_30 = l_Lean_IR_EmitC_emitFileHeader___closed__25; x_31 = lean_string_append(x_29, x_30); x_32 = l_Lean_Environment_imports(x_15); lean_dec(x_15); x_33 = lean_array_get_size(x_32); x_34 = lean_unsigned_to_nat(0u); x_35 = lean_nat_dec_lt(x_34, x_33); if (x_35 == 0) { lean_dec(x_33); lean_dec(x_32); x_3 = x_31; goto block_13; } else { uint8_t x_36; x_36 = lean_nat_dec_le(x_33, x_33); if (x_36 == 0) { lean_dec(x_33); lean_dec(x_32); x_3 = x_31; goto block_13; } else { size_t x_37; size_t x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; x_37 = 0; x_38 = lean_usize_of_nat(x_33); lean_dec(x_33); x_39 = lean_box(0); x_40 = l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitFileHeader___spec__1(x_32, x_37, x_38, x_39, x_1, x_31); lean_dec(x_32); x_41 = lean_ctor_get(x_40, 1); lean_inc(x_41); lean_dec(x_40); x_3 = x_41; goto block_13; } } block_13: { 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; x_4 = l_Lean_instInhabitedParserDescr___closed__1; x_5 = lean_string_append(x_3, x_4); x_6 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_7 = lean_string_append(x_5, x_6); x_8 = l_Lean_IR_EmitC_emitFileHeader___closed__1; x_9 = lean_string_append(x_7, x_8); x_10 = lean_string_append(x_9, x_6); x_11 = l_Lean_IR_EmitC_emitFileHeader___closed__22; x_12 = l_List_forM___at_Lean_IR_EmitC_emitMainFn___spec__3(x_11, x_1, x_10); return x_12; } } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitFileHeader___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: { size_t x_7; size_t x_8; lean_object* x_9; x_7 = lean_unbox_usize(x_2); lean_dec(x_2); x_8 = lean_unbox_usize(x_3); lean_dec(x_3); x_9 = l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitFileHeader___spec__1(x_1, x_7, x_8, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_1); return x_9; } } lean_object* l_Lean_IR_EmitC_emitFileHeader___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_IR_EmitC_emitFileHeader(x_1, x_2); lean_dec(x_1); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileFooter___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_term_x7b_x7d___closed__5; x_2 = l_Lean_IR_EmitC_emitFileHeader___closed__3; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitFileFooter___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitFileHeader___closed__6; x_2 = l_Lean_IR_EmitC_emitFileFooter___closed__1; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } lean_object* l_Lean_IR_EmitC_emitFileFooter(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; x_3 = l_Lean_IR_EmitC_emitFileFooter___closed__2; x_4 = l_List_forM___at_Lean_IR_EmitC_emitMainFn___spec__3(x_3, x_1, x_2); return x_4; } } lean_object* l_Lean_IR_EmitC_emitFileFooter___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_IR_EmitC_emitFileFooter(x_1, x_2); lean_dec(x_1); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_throwUnknownVar___rarg___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("unknown variable '"); return x_1; } } lean_object* l_Lean_IR_EmitC_throwUnknownVar___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_4 = l_Nat_repr(x_1); x_5 = l_Lean_IR_instToStringVarId___closed__1; x_6 = lean_string_append(x_5, x_4); lean_dec(x_4); x_7 = l_Lean_IR_EmitC_throwUnknownVar___rarg___closed__1; x_8 = lean_string_append(x_7, x_6); lean_dec(x_6); x_9 = l_Char_quote___closed__1; x_10 = lean_string_append(x_8, x_9); x_11 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_3); return x_11; } } lean_object* l_Lean_IR_EmitC_throwUnknownVar(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_throwUnknownVar___rarg___boxed), 3, 0); return x_2; } } lean_object* l_Lean_IR_EmitC_throwUnknownVar___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_throwUnknownVar___rarg(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Lean_IR_EmitC_getJPParams_match__1___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_IR_EmitC_getJPParams_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_getJPParams_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Std_AssocList_find_x3f___at_Lean_IR_EmitC_getJPParams___spec__2(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { lean_object* x_3; x_3 = lean_box(0); return x_3; } else { lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; x_4 = lean_ctor_get(x_2, 0); x_5 = lean_ctor_get(x_2, 1); x_6 = lean_ctor_get(x_2, 2); x_7 = lean_nat_dec_eq(x_4, x_1); if (x_7 == 0) { x_2 = x_6; goto _start; } else { lean_object* x_9; lean_inc(x_5); x_9 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_9, 0, x_5); return x_9; } } } } lean_object* l_Std_HashMapImp_find_x3f___at_Lean_IR_EmitC_getJPParams___spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; size_t x_5; size_t x_6; lean_object* x_7; lean_object* x_8; x_3 = lean_ctor_get(x_1, 1); x_4 = lean_array_get_size(x_3); x_5 = lean_usize_of_nat(x_2); x_6 = lean_usize_modn(x_5, x_4); lean_dec(x_4); x_7 = lean_array_uget(x_3, x_6); x_8 = l_Std_AssocList_find_x3f___at_Lean_IR_EmitC_getJPParams___spec__2(x_2, x_7); lean_dec(x_7); return x_8; } } static lean_object* _init_l_Lean_IR_EmitC_getJPParams___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("unknown join point"); return x_1; } } lean_object* l_Lean_IR_EmitC_getJPParams(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; x_4 = lean_ctor_get(x_2, 2); x_5 = l_Std_HashMapImp_find_x3f___at_Lean_IR_EmitC_getJPParams___spec__1(x_4, x_1); if (lean_obj_tag(x_5) == 0) { lean_object* x_6; lean_object* x_7; x_6 = l_Lean_IR_EmitC_getJPParams___closed__1; x_7 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_7, 0, x_6); lean_ctor_set(x_7, 1, x_3); return x_7; } else { lean_object* x_8; lean_object* x_9; x_8 = lean_ctor_get(x_5, 0); lean_inc(x_8); lean_dec(x_5); x_9 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_9, 0, x_8); lean_ctor_set(x_9, 1, x_3); return x_9; } } } lean_object* l_Std_AssocList_find_x3f___at_Lean_IR_EmitC_getJPParams___spec__2___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Std_AssocList_find_x3f___at_Lean_IR_EmitC_getJPParams___spec__2(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l_Std_HashMapImp_find_x3f___at_Lean_IR_EmitC_getJPParams___spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Std_HashMapImp_find_x3f___at_Lean_IR_EmitC_getJPParams___spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l_Lean_IR_EmitC_getJPParams___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_getJPParams(x_1, x_2, x_3); lean_dec(x_2); lean_dec(x_1); return x_4; } } static lean_object* _init_l_Lean_IR_EmitC_declareVar___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("; "); return x_1; } } lean_object* l_Lean_IR_EmitC_declareVar(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; 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; x_5 = l_Lean_IR_EmitC_toCType(x_2); x_6 = lean_string_append(x_4, x_5); lean_dec(x_5); x_7 = l___private_Init_Data_Format_Basic_0__Std_Format_be___closed__1; x_8 = lean_string_append(x_6, x_7); x_9 = l_Nat_repr(x_1); x_10 = l_Lean_IR_instToStringVarId___closed__1; x_11 = lean_string_append(x_10, x_9); lean_dec(x_9); x_12 = lean_string_append(x_8, x_11); lean_dec(x_11); x_13 = l_Lean_IR_EmitC_declareVar___closed__1; x_14 = lean_string_append(x_12, x_13); x_15 = lean_box(0); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_15); lean_ctor_set(x_16, 1, x_14); return x_16; } } lean_object* l_Lean_IR_EmitC_declareVar___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_declareVar(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); return x_5; } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_declareParams___spec__1(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { uint8_t x_7; x_7 = x_2 == x_3; if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; size_t x_14; size_t x_15; lean_dec(x_4); x_8 = lean_array_uget(x_1, x_2); 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 = l_Lean_IR_EmitC_declareVar(x_9, x_10, x_5, x_6); lean_dec(x_10); x_12 = lean_ctor_get(x_11, 0); lean_inc(x_12); x_13 = lean_ctor_get(x_11, 1); lean_inc(x_13); lean_dec(x_11); x_14 = 1; x_15 = x_2 + x_14; x_2 = x_15; x_4 = x_12; x_6 = x_13; goto _start; } else { lean_object* x_17; x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_4); lean_ctor_set(x_17, 1, x_6); return x_17; } } } lean_object* l_Lean_IR_EmitC_declareParams(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; uint8_t x_6; x_4 = lean_array_get_size(x_1); x_5 = lean_unsigned_to_nat(0u); x_6 = lean_nat_dec_lt(x_5, x_4); if (x_6 == 0) { lean_object* x_7; lean_object* x_8; lean_dec(x_4); x_7 = lean_box(0); x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_7); lean_ctor_set(x_8, 1, x_3); return x_8; } else { uint8_t x_9; x_9 = lean_nat_dec_le(x_4, x_4); if (x_9 == 0) { lean_object* x_10; lean_object* x_11; lean_dec(x_4); x_10 = lean_box(0); x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_3); return x_11; } else { size_t x_12; size_t x_13; lean_object* x_14; lean_object* x_15; x_12 = 0; x_13 = lean_usize_of_nat(x_4); lean_dec(x_4); x_14 = lean_box(0); x_15 = l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_declareParams___spec__1(x_1, x_12, x_13, x_14, x_2, x_3); return x_15; } } } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_declareParams___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: { size_t x_7; size_t x_8; lean_object* x_9; x_7 = lean_unbox_usize(x_2); lean_dec(x_2); x_8 = lean_unbox_usize(x_3); lean_dec(x_3); x_9 = l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_declareParams___spec__1(x_1, x_7, x_8, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_1); return x_9; } } lean_object* l_Lean_IR_EmitC_declareParams___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_declareParams(x_1, x_2, x_3); lean_dec(x_2); lean_dec(x_1); return x_4; } } lean_object* l_Lean_IR_EmitC_declareVars_match__1___rarg(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { switch (lean_obj_tag(x_1)) { case 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_dec(x_5); lean_dec(x_4); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_1, 1); lean_inc(x_7); x_8 = lean_ctor_get(x_1, 2); lean_inc(x_8); x_9 = lean_ctor_get(x_1, 3); lean_inc(x_9); x_10 = lean_box(x_2); x_11 = lean_apply_6(x_3, x_1, x_6, x_7, x_8, x_9, x_10); return x_11; } case 1: { 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_dec(x_5); lean_dec(x_3); x_12 = lean_ctor_get(x_1, 0); lean_inc(x_12); x_13 = lean_ctor_get(x_1, 1); lean_inc(x_13); x_14 = lean_ctor_get(x_1, 2); lean_inc(x_14); x_15 = lean_ctor_get(x_1, 3); lean_inc(x_15); lean_dec(x_1); x_16 = lean_box(x_2); x_17 = lean_apply_5(x_4, x_12, x_13, x_14, x_15, x_16); return x_17; } default: { lean_object* x_18; lean_object* x_19; lean_dec(x_4); lean_dec(x_3); x_18 = lean_box(x_2); x_19 = lean_apply_2(x_5, x_1, x_18); return x_19; } } } } lean_object* l_Lean_IR_EmitC_declareVars_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_declareVars_match__1___rarg___boxed), 5, 0); return x_2; } } lean_object* l_Lean_IR_EmitC_declareVars_match__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { uint8_t x_6; lean_object* x_7; x_6 = lean_unbox(x_2); lean_dec(x_2); x_7 = l_Lean_IR_EmitC_declareVars_match__1___rarg(x_1, x_6, x_3, x_4, x_5); return x_7; } } lean_object* l_Lean_IR_EmitC_declareVars(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4) { _start: { switch (lean_obj_tag(x_1)) { case 0: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); x_6 = lean_ctor_get(x_1, 1); lean_inc(x_6); x_7 = lean_ctor_get(x_1, 3); lean_inc(x_7); x_8 = lean_ctor_get(x_3, 3); x_9 = l_Lean_IR_isTailCallTo(x_8, x_1); lean_dec(x_1); if (x_9 == 0) { lean_object* x_10; lean_object* x_11; uint8_t x_12; x_10 = l_Lean_IR_EmitC_declareVar(x_5, x_6, x_3, x_4); lean_dec(x_6); x_11 = lean_ctor_get(x_10, 1); lean_inc(x_11); lean_dec(x_10); x_12 = 1; x_1 = x_7; x_2 = x_12; x_4 = x_11; goto _start; } else { lean_object* x_14; lean_object* x_15; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); x_14 = lean_box(x_2); x_15 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_4); return x_15; } } case 1: { lean_object* x_16; lean_object* x_17; lean_object* x_18; x_16 = lean_ctor_get(x_1, 1); lean_inc(x_16); x_17 = lean_ctor_get(x_1, 3); lean_inc(x_17); lean_dec(x_1); x_18 = l_Lean_IR_EmitC_declareParams(x_16, x_3, x_4); if (x_2 == 0) { lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; x_19 = lean_ctor_get(x_18, 1); lean_inc(x_19); lean_dec(x_18); x_20 = lean_array_get_size(x_16); lean_dec(x_16); x_21 = lean_unsigned_to_nat(0u); x_22 = lean_nat_dec_lt(x_21, x_20); lean_dec(x_20); x_1 = x_17; x_2 = x_22; x_4 = x_19; goto _start; } else { lean_object* x_24; uint8_t x_25; lean_dec(x_16); x_24 = lean_ctor_get(x_18, 1); lean_inc(x_24); lean_dec(x_18); x_25 = 1; x_1 = x_17; x_2 = x_25; x_4 = x_24; goto _start; } } default: { uint8_t x_27; x_27 = l_Lean_IR_FnBody_isTerminal(x_1); if (x_27 == 0) { lean_object* x_28; x_28 = l_Lean_IR_FnBody_body(x_1); lean_dec(x_1); x_1 = x_28; goto _start; } else { lean_object* x_30; lean_object* x_31; lean_dec(x_1); x_30 = lean_box(x_2); x_31 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_31, 0, x_30); lean_ctor_set(x_31, 1, x_4); return x_31; } } } } } lean_object* l_Lean_IR_EmitC_declareVars___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { uint8_t x_5; lean_object* x_6; x_5 = lean_unbox(x_2); lean_dec(x_2); x_6 = l_Lean_IR_EmitC_declareVars(x_1, x_5, x_3, x_4); lean_dec(x_3); return x_6; } } static lean_object* _init_l_Lean_IR_EmitC_emitTag___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_obj_tag("); return x_1; } } lean_object* l_Lean_IR_EmitC_emitTag(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { uint8_t x_5; x_5 = l_Lean_IR_IRType_isObj(x_2); if (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; x_6 = l_Nat_repr(x_1); x_7 = l_Lean_IR_instToStringVarId___closed__1; x_8 = lean_string_append(x_7, x_6); lean_dec(x_6); x_9 = lean_string_append(x_4, x_8); lean_dec(x_8); x_10 = lean_box(0); x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_9); return x_11; } else { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; x_12 = l_Lean_IR_EmitC_emitTag___closed__1; x_13 = lean_string_append(x_4, x_12); x_14 = l_Nat_repr(x_1); x_15 = l_Lean_IR_instToStringVarId___closed__1; x_16 = lean_string_append(x_15, x_14); lean_dec(x_14); x_17 = lean_string_append(x_13, x_16); lean_dec(x_16); x_18 = l_prec_x28___x29___closed__7; x_19 = lean_string_append(x_17, x_18); x_20 = lean_box(0); x_21 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_21, 0, x_20); lean_ctor_set(x_21, 1, x_19); return x_21; } } } lean_object* l_Lean_IR_EmitC_emitTag___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitTag(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); return x_5; } } lean_object* l_Lean_IR_EmitC_isIf_match__1___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_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_Lean_IR_EmitC_isIf_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_isIf_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_IR_EmitC_isIf(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; uint8_t x_4; x_2 = lean_array_get_size(x_1); x_3 = lean_unsigned_to_nat(2u); x_4 = lean_nat_dec_eq(x_2, x_3); lean_dec(x_2); if (x_4 == 0) { lean_object* x_5; x_5 = lean_box(0); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_object* x_8; x_6 = l_Lean_IR_instInhabitedAlt; x_7 = lean_unsigned_to_nat(0u); x_8 = lean_array_get(x_6, x_1, x_7); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; 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_9, 1); lean_inc(x_11); lean_dec(x_9); x_12 = lean_unsigned_to_nat(1u); x_13 = lean_array_get(x_6, x_1, x_12); x_14 = l_Lean_IR_AltCore_body(x_13); lean_dec(x_13); x_15 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_15, 0, x_10); lean_ctor_set(x_15, 1, x_14); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_11); lean_ctor_set(x_16, 1, x_15); x_17 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_17, 0, x_16); return x_17; } else { lean_object* x_18; lean_dec(x_8); x_18 = lean_box(0); return x_18; } } } } lean_object* l_Lean_IR_EmitC_isIf___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_IR_EmitC_isIf(x_1); lean_dec(x_1); return x_2; } } static lean_object* _init_l_Lean_IR_EmitC_emitInc___lambda__1___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string(");"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitInc___lambda__1(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 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_5 = lean_string_append(x_3, x_4); x_6 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_7 = lean_string_append(x_5, x_6); 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; } } static lean_object* _init_l_Lean_IR_EmitC_emitInc___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitInc___lambda__1___boxed), 3, 0); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitInc___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_inc_ref_n"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitInc___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_inc_ref"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitInc___closed__4() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_inc_n"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitInc___closed__5() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_inc"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitInc(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; lean_object* x_12; x_6 = l_Nat_repr(x_1); x_7 = l_Lean_IR_instToStringVarId___closed__1; x_8 = lean_string_append(x_7, x_6); lean_dec(x_6); x_9 = l_Lean_IR_EmitC_emitInc___closed__1; x_10 = lean_unsigned_to_nat(1u); x_11 = lean_nat_dec_eq(x_2, x_10); if (x_3 == 0) { if (x_11 == 0) { lean_object* x_26; x_26 = l_Lean_IR_EmitC_emitInc___closed__2; x_12 = x_26; goto block_25; } else { lean_object* x_27; x_27 = l_Lean_IR_EmitC_emitInc___closed__3; x_12 = x_27; goto block_25; } } else { if (x_11 == 0) { lean_object* x_28; x_28 = l_Lean_IR_EmitC_emitInc___closed__4; x_12 = x_28; goto block_25; } else { lean_object* x_29; x_29 = l_Lean_IR_EmitC_emitInc___closed__5; x_12 = x_29; goto block_25; } } block_25: { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_13 = lean_string_append(x_5, x_12); lean_dec(x_12); x_14 = l_prec_x28___x29___closed__3; x_15 = lean_string_append(x_13, x_14); x_16 = lean_string_append(x_15, x_8); lean_dec(x_8); if (x_11 == 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; x_17 = l_term_x5b___x5d___closed__5; x_18 = lean_string_append(x_16, x_17); x_19 = l_Nat_repr(x_2); x_20 = lean_string_append(x_18, x_19); lean_dec(x_19); x_21 = lean_box(0); x_22 = lean_apply_3(x_9, x_21, x_4, x_20); return x_22; } else { lean_object* x_23; lean_object* x_24; lean_dec(x_2); x_23 = lean_box(0); x_24 = lean_apply_3(x_9, x_23, x_4, x_16); return x_24; } } } } lean_object* l_Lean_IR_EmitC_emitInc___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_emitInc___lambda__1(x_1, x_2, x_3); lean_dec(x_2); lean_dec(x_1); return x_4; } } lean_object* l_Lean_IR_EmitC_emitInc___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { uint8_t x_6; lean_object* x_7; x_6 = lean_unbox(x_3); lean_dec(x_3); x_7 = l_Lean_IR_EmitC_emitInc(x_1, x_2, x_6, x_4, x_5); return x_7; } } static lean_object* _init_l_Lean_IR_EmitC_emitDec___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_dec_ref"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitDec___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_dec"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitDec(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; x_6 = l_Nat_repr(x_1); x_7 = l_Lean_IR_instToStringVarId___closed__1; x_8 = lean_string_append(x_7, x_6); lean_dec(x_6); x_9 = l_Lean_IR_EmitC_emitInc___closed__1; x_10 = lean_unsigned_to_nat(1u); x_11 = lean_nat_dec_eq(x_2, x_10); if (x_3 == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_12 = l_Lean_IR_EmitC_emitDec___closed__1; x_13 = lean_string_append(x_5, x_12); x_14 = l_prec_x28___x29___closed__3; x_15 = lean_string_append(x_13, x_14); x_16 = lean_string_append(x_15, x_8); lean_dec(x_8); if (x_11 == 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; x_17 = l_term_x5b___x5d___closed__5; x_18 = lean_string_append(x_16, x_17); x_19 = l_Nat_repr(x_2); x_20 = lean_string_append(x_18, x_19); lean_dec(x_19); x_21 = lean_box(0); x_22 = lean_apply_3(x_9, x_21, x_4, x_20); return x_22; } else { lean_object* x_23; lean_object* x_24; lean_dec(x_2); x_23 = lean_box(0); x_24 = lean_apply_3(x_9, x_23, x_4, x_16); return x_24; } } else { lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; x_25 = l_Lean_IR_EmitC_emitDec___closed__2; x_26 = lean_string_append(x_5, x_25); x_27 = l_prec_x28___x29___closed__3; x_28 = lean_string_append(x_26, x_27); x_29 = lean_string_append(x_28, x_8); lean_dec(x_8); if (x_11 == 0) { lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; x_30 = l_term_x5b___x5d___closed__5; x_31 = lean_string_append(x_29, x_30); x_32 = l_Nat_repr(x_2); x_33 = lean_string_append(x_31, x_32); lean_dec(x_32); x_34 = lean_box(0); x_35 = lean_apply_3(x_9, x_34, x_4, x_33); return x_35; } else { lean_object* x_36; lean_object* x_37; lean_dec(x_2); x_36 = lean_box(0); x_37 = lean_apply_3(x_9, x_36, x_4, x_29); return x_37; } } } } lean_object* l_Lean_IR_EmitC_emitDec___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { uint8_t x_6; lean_object* x_7; x_6 = lean_unbox(x_3); lean_dec(x_3); x_7 = l_Lean_IR_EmitC_emitDec(x_1, x_2, x_6, x_4, x_5); return x_7; } } static lean_object* _init_l_Lean_IR_EmitC_emitDel___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_free_object("); return x_1; } } lean_object* l_Lean_IR_EmitC_emitDel(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_4 = l_Lean_IR_EmitC_emitDel___closed__1; x_5 = lean_string_append(x_3, x_4); x_6 = l_Nat_repr(x_1); x_7 = l_Lean_IR_instToStringVarId___closed__1; x_8 = lean_string_append(x_7, x_6); lean_dec(x_6); x_9 = lean_string_append(x_5, x_8); lean_dec(x_8); x_10 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_11 = lean_string_append(x_9, x_10); x_12 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_13 = lean_string_append(x_11, x_12); x_14 = lean_box(0); x_15 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_13); return x_15; } } lean_object* l_Lean_IR_EmitC_emitDel___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_emitDel(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } static lean_object* _init_l_Lean_IR_EmitC_emitSetTag___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_ctor_set_tag("); return x_1; } } lean_object* l_Lean_IR_EmitC_emitSetTag(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; x_5 = l_Lean_IR_EmitC_emitSetTag___closed__1; x_6 = lean_string_append(x_4, x_5); x_7 = l_Nat_repr(x_1); x_8 = l_Lean_IR_instToStringVarId___closed__1; x_9 = lean_string_append(x_8, x_7); lean_dec(x_7); x_10 = lean_string_append(x_6, x_9); lean_dec(x_9); x_11 = l_term_x5b___x5d___closed__5; x_12 = lean_string_append(x_10, x_11); x_13 = l_Nat_repr(x_2); x_14 = lean_string_append(x_12, x_13); lean_dec(x_13); x_15 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_16 = lean_string_append(x_14, x_15); x_17 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_18 = lean_string_append(x_16, x_17); x_19 = lean_box(0); x_20 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_20, 0, x_19); lean_ctor_set(x_20, 1, x_18); return x_20; } } lean_object* l_Lean_IR_EmitC_emitSetTag___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitSetTag(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } static lean_object* _init_l_Lean_IR_EmitC_emitSet___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_ctor_set("); return x_1; } } lean_object* l_Lean_IR_EmitC_emitSet(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; 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 = l_Lean_IR_EmitC_emitSet___closed__1; x_7 = lean_string_append(x_5, x_6); x_8 = l_Nat_repr(x_1); x_9 = l_Lean_IR_instToStringVarId___closed__1; x_10 = lean_string_append(x_9, x_8); lean_dec(x_8); x_11 = lean_string_append(x_7, x_10); lean_dec(x_10); x_12 = l_term_x5b___x5d___closed__5; x_13 = lean_string_append(x_11, x_12); x_14 = l_Nat_repr(x_2); x_15 = lean_string_append(x_13, x_14); lean_dec(x_14); x_16 = lean_string_append(x_15, x_12); x_17 = l_Lean_IR_EmitC_emitArg(x_3, x_4, x_16); x_18 = !lean_is_exclusive(x_17); if (x_18 == 0) { lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_19 = lean_ctor_get(x_17, 1); x_20 = lean_ctor_get(x_17, 0); lean_dec(x_20); x_21 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_22 = lean_string_append(x_19, x_21); x_23 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_24 = lean_string_append(x_22, x_23); x_25 = lean_box(0); lean_ctor_set(x_17, 1, x_24); lean_ctor_set(x_17, 0, x_25); return x_17; } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; x_26 = lean_ctor_get(x_17, 1); lean_inc(x_26); lean_dec(x_17); x_27 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_28 = lean_string_append(x_26, x_27); x_29 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_30 = lean_string_append(x_28, x_29); x_31 = lean_box(0); x_32 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_32, 0, x_31); lean_ctor_set(x_32, 1, x_30); return x_32; } } } lean_object* l_Lean_IR_EmitC_emitSet___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_emitSet(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); return x_6; } } static lean_object* _init_l_Lean_IR_EmitC_emitOffset___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("sizeof(void*)*"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitOffset(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; uint8_t x_6; x_5 = lean_unsigned_to_nat(0u); x_6 = lean_nat_dec_lt(x_5, x_1); if (x_6 == 0) { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_dec(x_1); x_7 = l_Nat_repr(x_2); x_8 = lean_string_append(x_4, x_7); lean_dec(x_7); x_9 = lean_box(0); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_10, 1, x_8); return x_10; } else { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; x_11 = l_Lean_IR_EmitC_emitOffset___closed__1; x_12 = lean_string_append(x_4, x_11); x_13 = l_Nat_repr(x_1); x_14 = lean_string_append(x_12, x_13); lean_dec(x_13); x_15 = lean_nat_dec_lt(x_5, x_2); if (x_15 == 0) { lean_object* x_16; lean_object* x_17; lean_dec(x_2); x_16 = lean_box(0); x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_14); return x_17; } else { 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_18 = l_Lean_Parser_Syntax_addPrec___closed__11; x_19 = lean_string_append(x_14, x_18); x_20 = l_Nat_repr(x_2); x_21 = lean_string_append(x_19, x_20); lean_dec(x_20); x_22 = lean_box(0); x_23 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_23, 0, x_22); lean_ctor_set(x_23, 1, x_21); return x_23; } } } } lean_object* l_Lean_IR_EmitC_emitOffset___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitOffset(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } static lean_object* _init_l_Lean_IR_EmitC_emitUSet___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_ctor_set_usize("); return x_1; } } lean_object* l_Lean_IR_EmitC_emitUSet(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; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_6 = l_Lean_IR_EmitC_emitUSet___closed__1; x_7 = lean_string_append(x_5, x_6); x_8 = l_Nat_repr(x_1); x_9 = l_Lean_IR_instToStringVarId___closed__1; x_10 = lean_string_append(x_9, x_8); lean_dec(x_8); x_11 = lean_string_append(x_7, x_10); lean_dec(x_10); x_12 = l_term_x5b___x5d___closed__5; x_13 = lean_string_append(x_11, x_12); x_14 = l_Nat_repr(x_2); x_15 = lean_string_append(x_13, x_14); lean_dec(x_14); x_16 = lean_string_append(x_15, x_12); x_17 = l_Nat_repr(x_3); x_18 = lean_string_append(x_9, x_17); lean_dec(x_17); x_19 = lean_string_append(x_16, x_18); lean_dec(x_18); x_20 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_21 = lean_string_append(x_19, x_20); x_22 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_23 = lean_string_append(x_21, x_22); x_24 = lean_box(0); x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_23); return x_25; } } lean_object* l_Lean_IR_EmitC_emitUSet___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_emitUSet(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); return x_6; } } lean_object* l_Lean_IR_EmitC_emitSSet_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { switch (lean_obj_tag(x_1)) { case 0: { lean_object* x_8; lean_object* x_9; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_8 = lean_box(0); x_9 = lean_apply_1(x_2, x_8); return x_9; } case 1: { lean_object* x_10; lean_object* x_11; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); x_10 = lean_box(0); x_11 = lean_apply_1(x_3, x_10); return x_11; } case 2: { lean_object* x_12; lean_object* x_13; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); x_12 = lean_box(0); x_13 = lean_apply_1(x_4, x_12); return x_13; } case 3: { lean_object* x_14; lean_object* x_15; lean_dec(x_7); lean_dec(x_6); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_14 = lean_box(0); x_15 = lean_apply_1(x_5, x_14); return x_15; } case 4: { lean_object* x_16; lean_object* x_17; lean_dec(x_7); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_16 = lean_box(0); x_17 = lean_apply_1(x_6, x_16); return x_17; } default: { lean_object* x_18; lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_18 = lean_apply_1(x_7, x_1); return x_18; } } } } lean_object* l_Lean_IR_EmitC_emitSSet_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitSSet_match__1___rarg), 7, 0); return x_2; } } lean_object* l_Lean_IR_EmitC_emitSSet___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; 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; x_8 = l_prec_x28___x29___closed__3; x_9 = lean_string_append(x_7, x_8); x_10 = l_Nat_repr(x_1); x_11 = l_Lean_IR_instToStringVarId___closed__1; x_12 = lean_string_append(x_11, x_10); lean_dec(x_10); x_13 = lean_string_append(x_9, x_12); lean_dec(x_12); x_14 = l_term_x5b___x5d___closed__5; x_15 = lean_string_append(x_13, x_14); x_16 = l_Lean_IR_EmitC_emitOffset(x_2, x_3, x_6, x_15); x_17 = !lean_is_exclusive(x_16); if (x_17 == 0) { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; x_18 = lean_ctor_get(x_16, 1); x_19 = lean_ctor_get(x_16, 0); lean_dec(x_19); x_20 = lean_string_append(x_18, x_14); x_21 = l_Nat_repr(x_4); x_22 = lean_string_append(x_11, x_21); lean_dec(x_21); x_23 = lean_string_append(x_20, x_22); lean_dec(x_22); x_24 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_25 = lean_string_append(x_23, x_24); x_26 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_27 = lean_string_append(x_25, x_26); x_28 = lean_box(0); lean_ctor_set(x_16, 1, x_27); lean_ctor_set(x_16, 0, x_28); return x_16; } 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; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; x_29 = lean_ctor_get(x_16, 1); lean_inc(x_29); lean_dec(x_16); x_30 = lean_string_append(x_29, x_14); x_31 = l_Nat_repr(x_4); x_32 = lean_string_append(x_11, x_31); lean_dec(x_31); x_33 = lean_string_append(x_30, x_32); lean_dec(x_32); x_34 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_35 = lean_string_append(x_33, x_34); x_36 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_37 = lean_string_append(x_35, x_36); x_38 = lean_box(0); x_39 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_39, 0, x_38); lean_ctor_set(x_39, 1, x_37); return x_39; } } } static lean_object* _init_l_Lean_IR_EmitC_emitSSet___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_ctor_set_float"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitSSet___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_ctor_set_uint8"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitSSet___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_ctor_set_uint16"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitSSet___closed__4() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_ctor_set_uint32"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitSSet___closed__5() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_ctor_set_uint64"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitSSet___closed__6() { _start: { lean_object* x_1; x_1 = lean_mk_string("invalid instruction"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitSSet(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { switch (lean_obj_tag(x_5)) { case 0: { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_8 = l_Lean_IR_EmitC_emitSSet___closed__1; x_9 = lean_string_append(x_7, x_8); x_10 = lean_box(0); x_11 = l_Lean_IR_EmitC_emitSSet___lambda__1(x_1, x_2, x_3, x_4, x_10, x_6, x_9); return x_11; } case 1: { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_12 = l_Lean_IR_EmitC_emitSSet___closed__2; x_13 = lean_string_append(x_7, x_12); x_14 = lean_box(0); x_15 = l_Lean_IR_EmitC_emitSSet___lambda__1(x_1, x_2, x_3, x_4, x_14, x_6, x_13); return x_15; } case 2: { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_16 = l_Lean_IR_EmitC_emitSSet___closed__3; x_17 = lean_string_append(x_7, x_16); x_18 = lean_box(0); x_19 = l_Lean_IR_EmitC_emitSSet___lambda__1(x_1, x_2, x_3, x_4, x_18, x_6, x_17); return x_19; } case 3: { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_20 = l_Lean_IR_EmitC_emitSSet___closed__4; x_21 = lean_string_append(x_7, x_20); x_22 = lean_box(0); x_23 = l_Lean_IR_EmitC_emitSSet___lambda__1(x_1, x_2, x_3, x_4, x_22, x_6, x_21); return x_23; } case 4: { lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; x_24 = l_Lean_IR_EmitC_emitSSet___closed__5; x_25 = lean_string_append(x_7, x_24); x_26 = lean_box(0); x_27 = l_Lean_IR_EmitC_emitSSet___lambda__1(x_1, x_2, x_3, x_4, x_26, x_6, x_25); return x_27; } default: { lean_object* x_28; lean_object* x_29; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_28 = l_Lean_IR_EmitC_emitSSet___closed__6; x_29 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_29, 0, x_28); lean_ctor_set(x_29, 1, x_7); return x_29; } } } } lean_object* l_Lean_IR_EmitC_emitSSet___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: { lean_object* x_8; x_8 = l_Lean_IR_EmitC_emitSSet___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_6); lean_dec(x_5); return x_8; } } lean_object* l_Lean_IR_EmitC_emitSSet___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_IR_EmitC_emitSSet(x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_6); lean_dec(x_5); return x_8; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitJmp___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; uint8_t x_8; x_7 = lean_unsigned_to_nat(0u); x_8 = lean_nat_dec_eq(x_4, x_7); if (x_8 == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; x_9 = lean_unsigned_to_nat(1u); x_10 = lean_nat_sub(x_4, x_9); lean_dec(x_4); x_11 = lean_nat_sub(x_3, x_10); x_12 = lean_nat_sub(x_11, x_9); lean_dec(x_11); x_13 = l_Lean_IR_instInhabitedParam; x_14 = lean_array_get(x_13, x_2, x_12); x_15 = l_Lean_IR_instInhabitedArg; x_16 = lean_array_get(x_15, x_1, x_12); lean_dec(x_12); x_17 = lean_ctor_get(x_14, 0); lean_inc(x_17); lean_dec(x_14); x_18 = l_Nat_repr(x_17); x_19 = l_Lean_IR_instToStringVarId___closed__1; x_20 = lean_string_append(x_19, x_18); lean_dec(x_18); x_21 = lean_string_append(x_6, x_20); lean_dec(x_20); x_22 = l_term___x3d_____closed__3; x_23 = lean_string_append(x_21, x_22); x_24 = l_Lean_IR_EmitC_emitArg(x_16, x_5, x_23); x_25 = lean_ctor_get(x_24, 1); lean_inc(x_25); lean_dec(x_24); x_26 = l_myMacro____x40_Init_Notation___hyg_16821____closed__12; x_27 = lean_string_append(x_25, x_26); x_28 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_29 = lean_string_append(x_27, x_28); x_4 = x_10; x_6 = x_29; goto _start; } else { lean_object* x_31; lean_object* x_32; lean_dec(x_4); x_31 = lean_box(0); x_32 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_32, 0, x_31); lean_ctor_set(x_32, 1, x_6); return x_32; } } } static lean_object* _init_l_Lean_IR_EmitC_emitJmp___lambda__1___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("goto "); return x_1; } } lean_object* l_Lean_IR_EmitC_emitJmp___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; uint8_t x_9; x_7 = lean_array_get_size(x_1); lean_inc(x_7); x_8 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitJmp___spec__1(x_1, x_2, x_7, x_7, x_5, x_6); lean_dec(x_7); x_9 = !lean_is_exclusive(x_8); if (x_9 == 0) { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_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_10 = lean_ctor_get(x_8, 1); x_11 = lean_ctor_get(x_8, 0); lean_dec(x_11); x_12 = l_Lean_IR_EmitC_emitJmp___lambda__1___closed__1; x_13 = lean_string_append(x_10, x_12); x_14 = l_Nat_repr(x_3); x_15 = l_Lean_IR_instToStringJoinPointId___closed__1; x_16 = lean_string_append(x_15, x_14); lean_dec(x_14); x_17 = lean_string_append(x_13, x_16); lean_dec(x_16); x_18 = l_myMacro____x40_Init_Notation___hyg_16821____closed__12; x_19 = lean_string_append(x_17, x_18); x_20 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_21 = lean_string_append(x_19, x_20); x_22 = lean_box(0); lean_ctor_set(x_8, 1, x_21); lean_ctor_set(x_8, 0, x_22); return x_8; } else { lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; x_23 = lean_ctor_get(x_8, 1); lean_inc(x_23); lean_dec(x_8); x_24 = l_Lean_IR_EmitC_emitJmp___lambda__1___closed__1; x_25 = lean_string_append(x_23, x_24); x_26 = l_Nat_repr(x_3); x_27 = l_Lean_IR_instToStringJoinPointId___closed__1; x_28 = lean_string_append(x_27, x_26); lean_dec(x_26); x_29 = lean_string_append(x_25, x_28); lean_dec(x_28); x_30 = l_myMacro____x40_Init_Notation___hyg_16821____closed__12; x_31 = lean_string_append(x_29, x_30); x_32 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_33 = lean_string_append(x_31, x_32); x_34 = lean_box(0); x_35 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_35, 0, x_34); lean_ctor_set(x_35, 1, x_33); return x_35; } } } static lean_object* _init_l_Lean_IR_EmitC_emitJmp___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("invalid goto"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitJmp(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_getJPParams(x_1, x_3, x_4); if (lean_obj_tag(x_5) == 0) { uint8_t x_6; x_6 = !lean_is_exclusive(x_5); if (x_6 == 0) { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; x_7 = lean_ctor_get(x_5, 0); x_8 = lean_ctor_get(x_5, 1); x_9 = lean_array_get_size(x_2); x_10 = lean_array_get_size(x_7); x_11 = lean_nat_dec_eq(x_9, x_10); lean_dec(x_10); lean_dec(x_9); if (x_11 == 0) { lean_object* x_12; lean_dec(x_7); lean_dec(x_1); x_12 = l_Lean_IR_EmitC_emitJmp___closed__1; lean_ctor_set_tag(x_5, 1); lean_ctor_set(x_5, 0, x_12); return x_5; } else { lean_object* x_13; lean_object* x_14; lean_free_object(x_5); x_13 = lean_box(0); x_14 = l_Lean_IR_EmitC_emitJmp___lambda__1(x_2, x_7, x_1, x_13, x_3, x_8); lean_dec(x_7); return x_14; } } else { lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; x_15 = lean_ctor_get(x_5, 0); x_16 = lean_ctor_get(x_5, 1); lean_inc(x_16); lean_inc(x_15); lean_dec(x_5); x_17 = lean_array_get_size(x_2); x_18 = lean_array_get_size(x_15); x_19 = lean_nat_dec_eq(x_17, x_18); lean_dec(x_18); lean_dec(x_17); if (x_19 == 0) { lean_object* x_20; lean_object* x_21; lean_dec(x_15); lean_dec(x_1); x_20 = l_Lean_IR_EmitC_emitJmp___closed__1; x_21 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_21, 0, x_20); lean_ctor_set(x_21, 1, x_16); return x_21; } else { lean_object* x_22; lean_object* x_23; x_22 = lean_box(0); x_23 = l_Lean_IR_EmitC_emitJmp___lambda__1(x_2, x_15, x_1, x_22, x_3, x_16); lean_dec(x_15); return x_23; } } } else { uint8_t x_24; lean_dec(x_1); x_24 = !lean_is_exclusive(x_5); if (x_24 == 0) { return x_5; } else { lean_object* x_25; lean_object* x_26; lean_object* x_27; x_25 = lean_ctor_get(x_5, 0); x_26 = lean_ctor_get(x_5, 1); lean_inc(x_26); lean_inc(x_25); lean_dec(x_5); x_27 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_27, 0, x_25); lean_ctor_set(x_27, 1, x_26); return x_27; } } } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitJmp___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: { lean_object* x_7; x_7 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitJmp___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_7; } } lean_object* l_Lean_IR_EmitC_emitJmp___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_IR_EmitC_emitJmp___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); return x_7; } } lean_object* l_Lean_IR_EmitC_emitJmp___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitJmp(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); return x_5; } } lean_object* l_Lean_IR_EmitC_emitLhs(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_4 = l_Nat_repr(x_1); x_5 = l_Lean_IR_instToStringVarId___closed__1; x_6 = lean_string_append(x_5, x_4); lean_dec(x_4); x_7 = lean_string_append(x_3, x_6); lean_dec(x_6); x_8 = l_term___x3d_____closed__3; x_9 = lean_string_append(x_7, x_8); x_10 = lean_box(0); x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_9); return x_11; } } lean_object* l_Lean_IR_EmitC_emitLhs___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_emitLhs(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitArgs___spec__1___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; lean_object* x_7; lean_object* x_8; x_6 = l_Lean_IR_instInhabitedArg; x_7 = lean_array_get(x_6, x_1, x_2); x_8 = l_Lean_IR_EmitC_emitArg(x_7, x_4, x_5); return x_8; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitArgs___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; uint8_t x_7; x_6 = lean_unsigned_to_nat(0u); x_7 = lean_nat_dec_eq(x_3, x_6); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; x_8 = lean_unsigned_to_nat(1u); x_9 = lean_nat_sub(x_3, x_8); lean_dec(x_3); x_10 = lean_nat_sub(x_2, x_9); x_11 = lean_nat_sub(x_10, x_8); lean_dec(x_10); x_12 = lean_nat_dec_lt(x_6, x_11); if (x_12 == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; x_13 = lean_box(0); x_14 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitArgs___spec__1___lambda__1(x_1, x_11, x_13, x_4, x_5); lean_dec(x_11); x_15 = lean_ctor_get(x_14, 1); lean_inc(x_15); lean_dec(x_14); x_3 = x_9; x_5 = x_15; goto _start; } else { lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; x_17 = l_term_x5b___x5d___closed__5; x_18 = lean_string_append(x_5, x_17); x_19 = lean_box(0); x_20 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitArgs___spec__1___lambda__1(x_1, x_11, x_19, x_4, x_18); lean_dec(x_11); x_21 = lean_ctor_get(x_20, 1); lean_inc(x_21); lean_dec(x_20); x_3 = x_9; x_5 = x_21; goto _start; } } else { lean_object* x_23; lean_object* x_24; lean_dec(x_3); x_23 = lean_box(0); x_24 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_5); return x_24; } } } lean_object* l_Lean_IR_EmitC_emitArgs(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; x_4 = lean_array_get_size(x_1); lean_inc(x_4); x_5 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitArgs___spec__1(x_1, x_4, x_4, x_2, x_3); lean_dec(x_4); return x_5; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitArgs___spec__1___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitArgs___spec__1___lambda__1(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_6; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitArgs___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitArgs___spec__1(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); return x_6; } } lean_object* l_Lean_IR_EmitC_emitArgs___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_emitArgs(x_1, x_2, x_3); lean_dec(x_2); lean_dec(x_1); return x_4; } } static lean_object* _init_l_Lean_IR_EmitC_emitCtorScalarSize___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("sizeof(size_t)*"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitCtorScalarSize(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; uint8_t x_6; x_5 = lean_unsigned_to_nat(0u); x_6 = lean_nat_dec_eq(x_1, x_5); if (x_6 == 0) { uint8_t x_7; x_7 = lean_nat_dec_eq(x_2, x_5); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; x_8 = l_Lean_IR_EmitC_emitCtorScalarSize___closed__1; x_9 = lean_string_append(x_4, x_8); x_10 = l_Nat_repr(x_1); x_11 = lean_string_append(x_9, x_10); lean_dec(x_10); x_12 = l_Lean_Parser_Syntax_addPrec___closed__11; x_13 = lean_string_append(x_11, x_12); x_14 = l_Nat_repr(x_2); x_15 = lean_string_append(x_13, x_14); lean_dec(x_14); x_16 = lean_box(0); x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_15); return x_17; } else { 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_dec(x_2); x_18 = l_Lean_IR_EmitC_emitCtorScalarSize___closed__1; x_19 = lean_string_append(x_4, x_18); x_20 = l_Nat_repr(x_1); x_21 = lean_string_append(x_19, x_20); lean_dec(x_20); x_22 = lean_box(0); x_23 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_23, 0, x_22); lean_ctor_set(x_23, 1, x_21); return x_23; } } else { lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_dec(x_1); x_24 = l_Nat_repr(x_2); x_25 = lean_string_append(x_4, x_24); lean_dec(x_24); x_26 = lean_box(0); x_27 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_27, 0, x_26); lean_ctor_set(x_27, 1, x_25); return x_27; } } } lean_object* l_Lean_IR_EmitC_emitCtorScalarSize___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitCtorScalarSize(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } static lean_object* _init_l_Lean_IR_EmitC_emitAllocCtor___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_alloc_ctor("); return x_1; } } lean_object* l_Lean_IR_EmitC_emitAllocCtor(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; 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_4 = l_Lean_IR_EmitC_emitAllocCtor___closed__1; x_5 = lean_string_append(x_3, x_4); x_6 = lean_ctor_get(x_1, 1); lean_inc(x_6); x_7 = l_Nat_repr(x_6); x_8 = lean_string_append(x_5, x_7); lean_dec(x_7); x_9 = l_term_x5b___x5d___closed__5; x_10 = lean_string_append(x_8, x_9); x_11 = lean_ctor_get(x_1, 2); lean_inc(x_11); x_12 = l_Nat_repr(x_11); x_13 = lean_string_append(x_10, x_12); lean_dec(x_12); x_14 = lean_string_append(x_13, x_9); x_15 = lean_ctor_get(x_1, 3); lean_inc(x_15); x_16 = lean_ctor_get(x_1, 4); lean_inc(x_16); lean_dec(x_1); x_17 = l_Lean_IR_EmitC_emitCtorScalarSize(x_15, x_16, x_2, x_14); x_18 = !lean_is_exclusive(x_17); if (x_18 == 0) { lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_19 = lean_ctor_get(x_17, 1); x_20 = lean_ctor_get(x_17, 0); lean_dec(x_20); x_21 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_22 = lean_string_append(x_19, x_21); x_23 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_24 = lean_string_append(x_22, x_23); x_25 = lean_box(0); lean_ctor_set(x_17, 1, x_24); lean_ctor_set(x_17, 0, x_25); return x_17; } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; x_26 = lean_ctor_get(x_17, 1); lean_inc(x_26); lean_dec(x_17); x_27 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_28 = lean_string_append(x_26, x_27); x_29 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_30 = lean_string_append(x_28, x_29); x_31 = lean_box(0); x_32 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_32, 0, x_31); lean_ctor_set(x_32, 1, x_30); return x_32; } } } lean_object* l_Lean_IR_EmitC_emitAllocCtor___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_emitAllocCtor(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitCtorSetArgs___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; uint8_t x_8; x_7 = lean_unsigned_to_nat(0u); x_8 = lean_nat_dec_eq(x_4, x_7); if (x_8 == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; x_9 = lean_unsigned_to_nat(1u); x_10 = lean_nat_sub(x_4, x_9); lean_dec(x_4); x_11 = lean_nat_sub(x_3, x_10); x_12 = lean_nat_sub(x_11, x_9); lean_dec(x_11); x_13 = l_Lean_IR_EmitC_emitSet___closed__1; x_14 = lean_string_append(x_6, x_13); lean_inc(x_1); x_15 = l_Nat_repr(x_1); x_16 = l_Lean_IR_instToStringVarId___closed__1; x_17 = lean_string_append(x_16, x_15); lean_dec(x_15); x_18 = lean_string_append(x_14, x_17); lean_dec(x_17); x_19 = l_term_x5b___x5d___closed__5; x_20 = lean_string_append(x_18, x_19); lean_inc(x_12); x_21 = l_Nat_repr(x_12); x_22 = lean_string_append(x_20, x_21); lean_dec(x_21); x_23 = lean_string_append(x_22, x_19); x_24 = l_Lean_IR_instInhabitedArg; x_25 = lean_array_get(x_24, x_2, x_12); lean_dec(x_12); x_26 = l_Lean_IR_EmitC_emitArg(x_25, x_5, x_23); x_27 = lean_ctor_get(x_26, 1); lean_inc(x_27); lean_dec(x_26); x_28 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_29 = lean_string_append(x_27, x_28); x_30 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_31 = lean_string_append(x_29, x_30); x_4 = x_10; x_6 = x_31; goto _start; } else { lean_object* x_33; lean_object* x_34; lean_dec(x_4); lean_dec(x_1); x_33 = lean_box(0); x_34 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_34, 0, x_33); lean_ctor_set(x_34, 1, x_6); return x_34; } } } lean_object* l_Lean_IR_EmitC_emitCtorSetArgs(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; x_5 = lean_array_get_size(x_2); lean_inc(x_5); x_6 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitCtorSetArgs___spec__1(x_1, x_2, x_5, x_5, x_3, x_4); lean_dec(x_5); return x_6; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitCtorSetArgs___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: { lean_object* x_7; x_7 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitCtorSetArgs___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); return x_7; } } lean_object* l_Lean_IR_EmitC_emitCtorSetArgs___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitCtorSetArgs(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); return x_5; } } static lean_object* _init_l_Lean_IR_EmitC_emitCtor___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_box("); return x_1; } } lean_object* l_Lean_IR_EmitC_emitCtor(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; uint8_t x_7; lean_inc(x_1); x_6 = l_Lean_IR_EmitC_emitLhs(x_1, x_4, x_5); x_7 = !lean_is_exclusive(x_6); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; x_8 = lean_ctor_get(x_6, 1); x_9 = lean_ctor_get(x_6, 0); lean_dec(x_9); x_10 = lean_ctor_get(x_2, 2); lean_inc(x_10); x_11 = lean_unsigned_to_nat(0u); x_12 = lean_nat_dec_eq(x_10, x_11); lean_dec(x_10); if (x_12 == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_free_object(x_6); x_13 = l_Lean_IR_EmitC_emitAllocCtor(x_2, x_4, x_8); x_14 = lean_ctor_get(x_13, 1); lean_inc(x_14); lean_dec(x_13); x_15 = l_Lean_IR_EmitC_emitCtorSetArgs(x_1, x_3, x_4, x_14); return x_15; } else { lean_object* x_16; uint8_t x_17; x_16 = lean_ctor_get(x_2, 3); lean_inc(x_16); x_17 = lean_nat_dec_eq(x_16, x_11); lean_dec(x_16); if (x_17 == 0) { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_free_object(x_6); x_18 = l_Lean_IR_EmitC_emitAllocCtor(x_2, x_4, x_8); x_19 = lean_ctor_get(x_18, 1); lean_inc(x_19); lean_dec(x_18); x_20 = l_Lean_IR_EmitC_emitCtorSetArgs(x_1, x_3, x_4, x_19); return x_20; } else { lean_object* x_21; uint8_t x_22; x_21 = lean_ctor_get(x_2, 4); lean_inc(x_21); x_22 = lean_nat_dec_eq(x_21, x_11); lean_dec(x_21); if (x_22 == 0) { lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_free_object(x_6); x_23 = l_Lean_IR_EmitC_emitAllocCtor(x_2, x_4, x_8); x_24 = lean_ctor_get(x_23, 1); lean_inc(x_24); lean_dec(x_23); x_25 = l_Lean_IR_EmitC_emitCtorSetArgs(x_1, x_3, x_4, x_24); return x_25; } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_dec(x_1); x_26 = l_Lean_IR_EmitC_emitCtor___closed__1; x_27 = lean_string_append(x_8, x_26); x_28 = lean_ctor_get(x_2, 1); lean_inc(x_28); lean_dec(x_2); x_29 = l_Nat_repr(x_28); x_30 = lean_string_append(x_27, x_29); lean_dec(x_29); x_31 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_32 = lean_string_append(x_30, x_31); x_33 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_34 = lean_string_append(x_32, x_33); x_35 = lean_box(0); lean_ctor_set(x_6, 1, x_34); lean_ctor_set(x_6, 0, x_35); return x_6; } } } } else { lean_object* x_36; lean_object* x_37; lean_object* x_38; uint8_t x_39; x_36 = lean_ctor_get(x_6, 1); lean_inc(x_36); lean_dec(x_6); x_37 = lean_ctor_get(x_2, 2); lean_inc(x_37); x_38 = lean_unsigned_to_nat(0u); x_39 = lean_nat_dec_eq(x_37, x_38); lean_dec(x_37); if (x_39 == 0) { lean_object* x_40; lean_object* x_41; lean_object* x_42; x_40 = l_Lean_IR_EmitC_emitAllocCtor(x_2, x_4, x_36); x_41 = lean_ctor_get(x_40, 1); lean_inc(x_41); lean_dec(x_40); x_42 = l_Lean_IR_EmitC_emitCtorSetArgs(x_1, x_3, x_4, x_41); return x_42; } else { lean_object* x_43; uint8_t x_44; x_43 = lean_ctor_get(x_2, 3); lean_inc(x_43); x_44 = lean_nat_dec_eq(x_43, x_38); lean_dec(x_43); if (x_44 == 0) { lean_object* x_45; lean_object* x_46; lean_object* x_47; x_45 = l_Lean_IR_EmitC_emitAllocCtor(x_2, x_4, x_36); x_46 = lean_ctor_get(x_45, 1); lean_inc(x_46); lean_dec(x_45); x_47 = l_Lean_IR_EmitC_emitCtorSetArgs(x_1, x_3, x_4, x_46); return x_47; } else { lean_object* x_48; uint8_t x_49; x_48 = lean_ctor_get(x_2, 4); lean_inc(x_48); x_49 = lean_nat_dec_eq(x_48, x_38); lean_dec(x_48); if (x_49 == 0) { lean_object* x_50; lean_object* x_51; lean_object* x_52; x_50 = l_Lean_IR_EmitC_emitAllocCtor(x_2, x_4, x_36); x_51 = lean_ctor_get(x_50, 1); lean_inc(x_51); lean_dec(x_50); x_52 = l_Lean_IR_EmitC_emitCtorSetArgs(x_1, x_3, x_4, x_51); return x_52; } else { lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_dec(x_1); x_53 = l_Lean_IR_EmitC_emitCtor___closed__1; x_54 = lean_string_append(x_36, x_53); x_55 = lean_ctor_get(x_2, 1); lean_inc(x_55); lean_dec(x_2); x_56 = l_Nat_repr(x_55); x_57 = lean_string_append(x_54, x_56); lean_dec(x_56); x_58 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_59 = lean_string_append(x_57, x_58); x_60 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_61 = lean_string_append(x_59, x_60); x_62 = lean_box(0); x_63 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_63, 0, x_62); lean_ctor_set(x_63, 1, x_61); return x_63; } } } } } } lean_object* l_Lean_IR_EmitC_emitCtor___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_emitCtor(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_3); return x_6; } } static lean_object* _init_l_Nat_forM_loop___at_Lean_IR_EmitC_emitReset___spec__1___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string(" lean_ctor_release("); return x_1; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitReset___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; uint8_t x_7; x_6 = lean_unsigned_to_nat(0u); x_7 = lean_nat_dec_eq(x_3, x_6); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; x_8 = lean_unsigned_to_nat(1u); x_9 = lean_nat_sub(x_3, x_8); lean_dec(x_3); x_10 = lean_nat_sub(x_2, x_9); x_11 = lean_nat_sub(x_10, x_8); lean_dec(x_10); x_12 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitReset___spec__1___closed__1; x_13 = lean_string_append(x_5, x_12); x_14 = lean_string_append(x_13, x_1); x_15 = l_term_x5b___x5d___closed__5; x_16 = lean_string_append(x_14, x_15); x_17 = l_Nat_repr(x_11); x_18 = lean_string_append(x_16, x_17); lean_dec(x_17); x_19 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_20 = lean_string_append(x_18, x_19); x_21 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_22 = lean_string_append(x_20, x_21); x_3 = x_9; x_5 = x_22; goto _start; } else { lean_object* x_24; lean_object* x_25; lean_dec(x_3); x_24 = lean_box(0); x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_5); return x_25; } } } static lean_object* _init_l_Lean_IR_EmitC_emitReset___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("if (lean_is_exclusive("); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitReset___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string(")) {"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitReset___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string(" lean_dec_ref("); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitReset___closed__4() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_box(0);"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitReset(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; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; uint8_t x_37; x_6 = l_Lean_IR_EmitC_emitReset___closed__1; x_7 = lean_string_append(x_5, x_6); x_8 = l_Nat_repr(x_3); x_9 = l_Lean_IR_instToStringVarId___closed__1; x_10 = lean_string_append(x_9, x_8); lean_dec(x_8); x_11 = lean_string_append(x_7, x_10); x_12 = l_Lean_IR_EmitC_emitReset___closed__2; x_13 = lean_string_append(x_11, x_12); x_14 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_15 = lean_string_append(x_13, x_14); lean_inc(x_2); x_16 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitReset___spec__1(x_10, x_2, x_2, x_4, x_15); lean_dec(x_2); x_17 = lean_ctor_get(x_16, 1); lean_inc(x_17); lean_dec(x_16); x_18 = l___private_Init_Data_Format_Basic_0__Std_Format_be___closed__1; x_19 = lean_string_append(x_17, x_18); lean_inc(x_1); x_20 = l_Lean_IR_EmitC_emitLhs(x_1, x_4, x_19); x_21 = lean_ctor_get(x_20, 1); lean_inc(x_21); lean_dec(x_20); x_22 = lean_string_append(x_21, x_10); x_23 = l_myMacro____x40_Init_Notation___hyg_16821____closed__12; x_24 = lean_string_append(x_22, x_23); x_25 = lean_string_append(x_24, x_14); x_26 = l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__4; x_27 = lean_string_append(x_25, x_26); x_28 = lean_string_append(x_27, x_14); x_29 = l_Lean_IR_EmitC_emitReset___closed__3; x_30 = lean_string_append(x_28, x_29); x_31 = lean_string_append(x_30, x_10); lean_dec(x_10); x_32 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_33 = lean_string_append(x_31, x_32); x_34 = lean_string_append(x_33, x_14); x_35 = lean_string_append(x_34, x_18); x_36 = l_Lean_IR_EmitC_emitLhs(x_1, x_4, x_35); x_37 = !lean_is_exclusive(x_36); if (x_37 == 0) { lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; x_38 = lean_ctor_get(x_36, 1); x_39 = lean_ctor_get(x_36, 0); lean_dec(x_39); x_40 = l_Lean_IR_EmitC_emitReset___closed__4; x_41 = lean_string_append(x_38, x_40); x_42 = lean_string_append(x_41, x_14); x_43 = l_term_x7b_x7d___closed__5; x_44 = lean_string_append(x_42, x_43); x_45 = lean_string_append(x_44, x_14); x_46 = lean_box(0); lean_ctor_set(x_36, 1, x_45); lean_ctor_set(x_36, 0, x_46); return x_36; } else { lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; x_47 = lean_ctor_get(x_36, 1); lean_inc(x_47); lean_dec(x_36); x_48 = l_Lean_IR_EmitC_emitReset___closed__4; x_49 = lean_string_append(x_47, x_48); x_50 = lean_string_append(x_49, x_14); x_51 = l_term_x7b_x7d___closed__5; x_52 = lean_string_append(x_50, x_51); x_53 = lean_string_append(x_52, x_14); x_54 = lean_box(0); x_55 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_55, 0, x_54); lean_ctor_set(x_55, 1, x_53); return x_55; } } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitReset___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitReset___spec__1(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); return x_6; } } lean_object* l_Lean_IR_EmitC_emitReset___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_emitReset(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); return x_6; } } lean_object* l_Lean_IR_EmitC_emitReuse___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_6 = l_term_x7b_x7d___closed__5; x_7 = lean_string_append(x_5, x_6); x_8 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_9 = lean_string_append(x_7, x_8); x_10 = l_Lean_IR_EmitC_emitCtorSetArgs(x_1, x_2, x_4, x_9); return x_10; } } static lean_object* _init_l_Lean_IR_EmitC_emitReuse___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("if (lean_is_scalar("); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitReuse___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string(" lean_ctor_set_tag("); return x_1; } } lean_object* l_Lean_IR_EmitC_emitReuse(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; x_8 = l_Lean_IR_EmitC_emitReuse___closed__1; x_9 = lean_string_append(x_7, x_8); x_10 = l_Nat_repr(x_2); x_11 = l_Lean_IR_instToStringVarId___closed__1; x_12 = lean_string_append(x_11, x_10); lean_dec(x_10); x_13 = lean_string_append(x_9, x_12); x_14 = l_Lean_IR_EmitC_emitReset___closed__2; x_15 = lean_string_append(x_13, x_14); x_16 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_17 = lean_string_append(x_15, x_16); x_18 = l___private_Init_Data_Format_Basic_0__Std_Format_be___closed__1; x_19 = lean_string_append(x_17, x_18); lean_inc(x_1); x_20 = l_Lean_IR_EmitC_emitLhs(x_1, x_6, x_19); x_21 = lean_ctor_get(x_20, 1); lean_inc(x_21); lean_dec(x_20); lean_inc(x_3); x_22 = l_Lean_IR_EmitC_emitAllocCtor(x_3, x_6, x_21); x_23 = lean_ctor_get(x_22, 1); lean_inc(x_23); lean_dec(x_22); x_24 = l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__4; x_25 = lean_string_append(x_23, x_24); x_26 = lean_string_append(x_25, x_16); x_27 = lean_string_append(x_26, x_18); lean_inc(x_1); x_28 = l_Lean_IR_EmitC_emitLhs(x_1, x_6, x_27); x_29 = lean_ctor_get(x_28, 1); lean_inc(x_29); lean_dec(x_28); x_30 = lean_string_append(x_29, x_12); lean_dec(x_12); x_31 = l_myMacro____x40_Init_Notation___hyg_16821____closed__12; x_32 = lean_string_append(x_30, x_31); x_33 = lean_string_append(x_32, x_16); if (x_4 == 0) { lean_object* x_34; lean_object* x_35; lean_dec(x_3); x_34 = lean_box(0); x_35 = l_Lean_IR_EmitC_emitReuse___lambda__1(x_1, x_5, x_34, x_6, x_33); return x_35; } else { lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; x_36 = l_Lean_IR_EmitC_emitReuse___closed__2; x_37 = lean_string_append(x_33, x_36); lean_inc(x_1); x_38 = l_Nat_repr(x_1); x_39 = lean_string_append(x_11, x_38); lean_dec(x_38); x_40 = lean_string_append(x_37, x_39); lean_dec(x_39); x_41 = l_term_x5b___x5d___closed__5; x_42 = lean_string_append(x_40, x_41); x_43 = lean_ctor_get(x_3, 1); lean_inc(x_43); lean_dec(x_3); x_44 = l_Nat_repr(x_43); x_45 = lean_string_append(x_42, x_44); lean_dec(x_44); x_46 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_47 = lean_string_append(x_45, x_46); x_48 = lean_string_append(x_47, x_16); x_49 = lean_box(0); x_50 = l_Lean_IR_EmitC_emitReuse___lambda__1(x_1, x_5, x_49, x_6, x_48); return x_50; } } } lean_object* l_Lean_IR_EmitC_emitReuse___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_emitReuse___lambda__1(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); return x_6; } } lean_object* l_Lean_IR_EmitC_emitReuse___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_4); lean_dec(x_4); x_9 = l_Lean_IR_EmitC_emitReuse(x_1, x_2, x_3, x_8, x_5, x_6, x_7); lean_dec(x_6); lean_dec(x_5); return x_9; } } static lean_object* _init_l_Lean_IR_EmitC_emitProj___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_ctor_get("); return x_1; } } lean_object* l_Lean_IR_EmitC_emitProj(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; uint8_t x_7; x_6 = l_Lean_IR_EmitC_emitLhs(x_1, x_4, x_5); x_7 = !lean_is_exclusive(x_6); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; x_8 = lean_ctor_get(x_6, 1); x_9 = lean_ctor_get(x_6, 0); lean_dec(x_9); x_10 = l_Lean_IR_EmitC_emitProj___closed__1; x_11 = lean_string_append(x_8, x_10); x_12 = l_Nat_repr(x_3); x_13 = l_Lean_IR_instToStringVarId___closed__1; x_14 = lean_string_append(x_13, x_12); lean_dec(x_12); x_15 = lean_string_append(x_11, x_14); lean_dec(x_14); x_16 = l_term_x5b___x5d___closed__5; x_17 = lean_string_append(x_15, x_16); x_18 = l_Nat_repr(x_2); x_19 = lean_string_append(x_17, x_18); lean_dec(x_18); x_20 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_21 = lean_string_append(x_19, x_20); x_22 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_23 = lean_string_append(x_21, x_22); x_24 = lean_box(0); lean_ctor_set(x_6, 1, x_23); lean_ctor_set(x_6, 0, x_24); return x_6; } else { lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; x_25 = lean_ctor_get(x_6, 1); lean_inc(x_25); lean_dec(x_6); x_26 = l_Lean_IR_EmitC_emitProj___closed__1; x_27 = lean_string_append(x_25, x_26); x_28 = l_Nat_repr(x_3); x_29 = l_Lean_IR_instToStringVarId___closed__1; x_30 = lean_string_append(x_29, x_28); lean_dec(x_28); x_31 = lean_string_append(x_27, x_30); lean_dec(x_30); x_32 = l_term_x5b___x5d___closed__5; x_33 = lean_string_append(x_31, x_32); x_34 = l_Nat_repr(x_2); x_35 = lean_string_append(x_33, x_34); lean_dec(x_34); x_36 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_37 = lean_string_append(x_35, x_36); x_38 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_39 = lean_string_append(x_37, x_38); x_40 = lean_box(0); x_41 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_41, 0, x_40); lean_ctor_set(x_41, 1, x_39); return x_41; } } } lean_object* l_Lean_IR_EmitC_emitProj___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_emitProj(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); return x_6; } } static lean_object* _init_l_Lean_IR_EmitC_emitUProj___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_ctor_get_usize("); return x_1; } } lean_object* l_Lean_IR_EmitC_emitUProj(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; uint8_t x_7; x_6 = l_Lean_IR_EmitC_emitLhs(x_1, x_4, x_5); x_7 = !lean_is_exclusive(x_6); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; x_8 = lean_ctor_get(x_6, 1); x_9 = lean_ctor_get(x_6, 0); lean_dec(x_9); x_10 = l_Lean_IR_EmitC_emitUProj___closed__1; x_11 = lean_string_append(x_8, x_10); x_12 = l_Nat_repr(x_3); x_13 = l_Lean_IR_instToStringVarId___closed__1; x_14 = lean_string_append(x_13, x_12); lean_dec(x_12); x_15 = lean_string_append(x_11, x_14); lean_dec(x_14); x_16 = l_term_x5b___x5d___closed__5; x_17 = lean_string_append(x_15, x_16); x_18 = l_Nat_repr(x_2); x_19 = lean_string_append(x_17, x_18); lean_dec(x_18); x_20 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_21 = lean_string_append(x_19, x_20); x_22 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_23 = lean_string_append(x_21, x_22); x_24 = lean_box(0); lean_ctor_set(x_6, 1, x_23); lean_ctor_set(x_6, 0, x_24); return x_6; } else { lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; x_25 = lean_ctor_get(x_6, 1); lean_inc(x_25); lean_dec(x_6); x_26 = l_Lean_IR_EmitC_emitUProj___closed__1; x_27 = lean_string_append(x_25, x_26); x_28 = l_Nat_repr(x_3); x_29 = l_Lean_IR_instToStringVarId___closed__1; x_30 = lean_string_append(x_29, x_28); lean_dec(x_28); x_31 = lean_string_append(x_27, x_30); lean_dec(x_30); x_32 = l_term_x5b___x5d___closed__5; x_33 = lean_string_append(x_31, x_32); x_34 = l_Nat_repr(x_2); x_35 = lean_string_append(x_33, x_34); lean_dec(x_34); x_36 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_37 = lean_string_append(x_35, x_36); x_38 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_39 = lean_string_append(x_37, x_38); x_40 = lean_box(0); x_41 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_41, 0, x_40); lean_ctor_set(x_41, 1, x_39); return x_41; } } } lean_object* l_Lean_IR_EmitC_emitUProj___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_emitUProj(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); return x_6; } } lean_object* l_Lean_IR_EmitC_emitSProj___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; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; x_7 = l_prec_x28___x29___closed__3; x_8 = lean_string_append(x_6, x_7); x_9 = l_Nat_repr(x_1); x_10 = l_Lean_IR_instToStringVarId___closed__1; x_11 = lean_string_append(x_10, x_9); lean_dec(x_9); x_12 = lean_string_append(x_8, x_11); lean_dec(x_11); x_13 = l_term_x5b___x5d___closed__5; x_14 = lean_string_append(x_12, x_13); x_15 = l_Lean_IR_EmitC_emitOffset(x_2, x_3, x_5, x_14); x_16 = !lean_is_exclusive(x_15); if (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; x_17 = lean_ctor_get(x_15, 1); x_18 = lean_ctor_get(x_15, 0); lean_dec(x_18); x_19 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_20 = lean_string_append(x_17, x_19); x_21 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_22 = lean_string_append(x_20, x_21); x_23 = lean_box(0); lean_ctor_set(x_15, 1, x_22); lean_ctor_set(x_15, 0, x_23); return x_15; } else { lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; x_24 = lean_ctor_get(x_15, 1); lean_inc(x_24); lean_dec(x_15); x_25 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_26 = lean_string_append(x_24, x_25); x_27 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_28 = lean_string_append(x_26, x_27); x_29 = lean_box(0); x_30 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_30, 0, x_29); lean_ctor_set(x_30, 1, x_28); return x_30; } } } static lean_object* _init_l_Lean_IR_EmitC_emitSProj___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_ctor_get_float"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitSProj___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_ctor_get_uint8"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitSProj___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_ctor_get_uint16"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitSProj___closed__4() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_ctor_get_uint32"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitSProj___closed__5() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_ctor_get_uint64"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitSProj(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_IR_EmitC_emitLhs(x_1, x_6, x_7); switch (lean_obj_tag(x_2)) { case 0: { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_9 = lean_ctor_get(x_8, 1); lean_inc(x_9); lean_dec(x_8); x_10 = l_Lean_IR_EmitC_emitSProj___closed__1; x_11 = lean_string_append(x_9, x_10); x_12 = lean_box(0); x_13 = l_Lean_IR_EmitC_emitSProj___lambda__1(x_5, x_3, x_4, x_12, x_6, x_11); return x_13; } case 1: { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; x_14 = lean_ctor_get(x_8, 1); lean_inc(x_14); lean_dec(x_8); x_15 = l_Lean_IR_EmitC_emitSProj___closed__2; x_16 = lean_string_append(x_14, x_15); x_17 = lean_box(0); x_18 = l_Lean_IR_EmitC_emitSProj___lambda__1(x_5, x_3, x_4, x_17, x_6, x_16); return x_18; } case 2: { lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_19 = lean_ctor_get(x_8, 1); lean_inc(x_19); lean_dec(x_8); x_20 = l_Lean_IR_EmitC_emitSProj___closed__3; x_21 = lean_string_append(x_19, x_20); x_22 = lean_box(0); x_23 = l_Lean_IR_EmitC_emitSProj___lambda__1(x_5, x_3, x_4, x_22, x_6, x_21); return x_23; } case 3: { lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; x_24 = lean_ctor_get(x_8, 1); lean_inc(x_24); lean_dec(x_8); x_25 = l_Lean_IR_EmitC_emitSProj___closed__4; x_26 = lean_string_append(x_24, x_25); x_27 = lean_box(0); x_28 = l_Lean_IR_EmitC_emitSProj___lambda__1(x_5, x_3, x_4, x_27, x_6, x_26); return x_28; } case 4: { lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; x_29 = lean_ctor_get(x_8, 1); lean_inc(x_29); lean_dec(x_8); x_30 = l_Lean_IR_EmitC_emitSProj___closed__5; x_31 = lean_string_append(x_29, x_30); x_32 = lean_box(0); x_33 = l_Lean_IR_EmitC_emitSProj___lambda__1(x_5, x_3, x_4, x_32, x_6, x_31); return x_33; } default: { uint8_t x_34; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_34 = !lean_is_exclusive(x_8); if (x_34 == 0) { lean_object* x_35; lean_object* x_36; x_35 = lean_ctor_get(x_8, 0); lean_dec(x_35); x_36 = l_Lean_IR_EmitC_emitSSet___closed__6; lean_ctor_set_tag(x_8, 1); lean_ctor_set(x_8, 0, x_36); return x_8; } else { lean_object* x_37; lean_object* x_38; lean_object* x_39; x_37 = lean_ctor_get(x_8, 1); lean_inc(x_37); lean_dec(x_8); x_38 = l_Lean_IR_EmitC_emitSSet___closed__6; x_39 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_39, 0, x_38); lean_ctor_set(x_39, 1, x_37); return x_39; } } } } } lean_object* l_Lean_IR_EmitC_emitSProj___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_IR_EmitC_emitSProj___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_4); return x_7; } } lean_object* l_Lean_IR_EmitC_emitSProj___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_IR_EmitC_emitSProj(x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_6); lean_dec(x_2); return x_8; } } lean_object* l_List_map___at_Lean_IR_EmitC_toStringArgs___spec__1(lean_object* x_1) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_2; x_2 = lean_box(0); return x_2; } else { uint8_t x_3; x_3 = !lean_is_exclusive(x_1); if (x_3 == 0) { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; x_4 = lean_ctor_get(x_1, 0); x_5 = lean_ctor_get(x_1, 1); x_6 = l_Lean_IR_EmitC_argToCString(x_4); x_7 = l_List_map___at_Lean_IR_EmitC_toStringArgs___spec__1(x_5); lean_ctor_set(x_1, 1, x_7); lean_ctor_set(x_1, 0, x_6); return x_1; } else { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; x_8 = lean_ctor_get(x_1, 0); x_9 = lean_ctor_get(x_1, 1); lean_inc(x_9); lean_inc(x_8); lean_dec(x_1); x_10 = l_Lean_IR_EmitC_argToCString(x_8); x_11 = l_List_map___at_Lean_IR_EmitC_toStringArgs___spec__1(x_9); x_12 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_12, 0, x_10); lean_ctor_set(x_12, 1, x_11); return x_12; } } } } lean_object* l_Lean_IR_EmitC_toStringArgs(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = lean_array_to_list(lean_box(0), x_1); x_3 = l_List_map___at_Lean_IR_EmitC_toStringArgs___spec__1(x_2); return x_3; } } lean_object* l_Nat_foldM_loop___at_Lean_IR_EmitC_emitSimpleExternalCall___spec__1___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; x_6 = l_Lean_IR_instInhabitedArg; x_7 = lean_array_get(x_6, x_1, x_2); x_8 = l_Lean_IR_EmitC_emitArg(x_7, x_4, x_5); x_9 = !lean_is_exclusive(x_8); if (x_9 == 0) { lean_object* x_10; uint8_t x_11; lean_object* x_12; x_10 = lean_ctor_get(x_8, 0); lean_dec(x_10); x_11 = 0; x_12 = lean_box(x_11); lean_ctor_set(x_8, 0, x_12); return x_8; } else { lean_object* x_13; uint8_t x_14; lean_object* x_15; lean_object* x_16; x_13 = lean_ctor_get(x_8, 1); lean_inc(x_13); lean_dec(x_8); x_14 = 0; x_15 = lean_box(x_14); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_15); lean_ctor_set(x_16, 1, x_13); return x_16; } } } lean_object* l_Nat_foldM_loop___at_Lean_IR_EmitC_emitSimpleExternalCall___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7) { _start: { lean_object* x_8; uint8_t x_9; x_8 = lean_unsigned_to_nat(0u); x_9 = lean_nat_dec_eq(x_4, x_8); if (x_9 == 0) { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; x_10 = lean_unsigned_to_nat(1u); x_11 = lean_nat_sub(x_4, x_10); lean_dec(x_4); x_12 = lean_nat_sub(x_3, x_11); x_13 = lean_nat_sub(x_12, x_10); lean_dec(x_12); x_14 = l_Lean_IR_instInhabitedParam; x_15 = lean_array_get(x_14, x_1, x_13); x_16 = lean_ctor_get(x_15, 1); lean_inc(x_16); lean_dec(x_15); x_17 = l_Lean_IR_IRType_isIrrelevant(x_16); lean_dec(x_16); if (x_17 == 0) { if (x_5 == 0) { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; x_18 = l_term_x5b___x5d___closed__5; x_19 = lean_string_append(x_7, x_18); x_20 = lean_box(0); x_21 = l_Nat_foldM_loop___at_Lean_IR_EmitC_emitSimpleExternalCall___spec__1___lambda__1(x_2, x_13, x_20, x_6, x_19); lean_dec(x_13); x_22 = lean_ctor_get(x_21, 0); lean_inc(x_22); x_23 = lean_ctor_get(x_21, 1); lean_inc(x_23); lean_dec(x_21); x_24 = lean_unbox(x_22); lean_dec(x_22); x_4 = x_11; x_5 = x_24; x_7 = x_23; goto _start; } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; x_26 = lean_box(0); x_27 = l_Nat_foldM_loop___at_Lean_IR_EmitC_emitSimpleExternalCall___spec__1___lambda__1(x_2, x_13, x_26, x_6, x_7); lean_dec(x_13); x_28 = lean_ctor_get(x_27, 0); lean_inc(x_28); x_29 = lean_ctor_get(x_27, 1); lean_inc(x_29); lean_dec(x_27); x_30 = lean_unbox(x_28); lean_dec(x_28); x_4 = x_11; x_5 = x_30; x_7 = x_29; goto _start; } } else { lean_dec(x_13); x_4 = x_11; goto _start; } } else { lean_object* x_33; lean_object* x_34; lean_dec(x_4); x_33 = lean_box(x_5); x_34 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_34, 0, x_33); lean_ctor_set(x_34, 1, x_7); return x_34; } } } lean_object* l_Lean_IR_EmitC_emitSimpleExternalCall(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; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; lean_object* x_11; uint8_t x_12; x_6 = lean_string_append(x_5, x_1); x_7 = l_prec_x28___x29___closed__3; x_8 = lean_string_append(x_6, x_7); x_9 = lean_array_get_size(x_3); x_10 = 1; lean_inc(x_9); x_11 = l_Nat_foldM_loop___at_Lean_IR_EmitC_emitSimpleExternalCall___spec__1(x_2, x_3, x_9, x_9, x_10, x_4, x_8); lean_dec(x_9); x_12 = !lean_is_exclusive(x_11); if (x_12 == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_13 = lean_ctor_get(x_11, 1); x_14 = lean_ctor_get(x_11, 0); lean_dec(x_14); x_15 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_16 = lean_string_append(x_13, x_15); x_17 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_18 = lean_string_append(x_16, x_17); x_19 = lean_box(0); lean_ctor_set(x_11, 1, x_18); lean_ctor_set(x_11, 0, x_19); return x_11; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; x_20 = lean_ctor_get(x_11, 1); lean_inc(x_20); lean_dec(x_11); x_21 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_22 = lean_string_append(x_20, x_21); x_23 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_24 = lean_string_append(x_22, x_23); x_25 = lean_box(0); x_26 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_24); return x_26; } } } lean_object* l_Nat_foldM_loop___at_Lean_IR_EmitC_emitSimpleExternalCall___spec__1___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Nat_foldM_loop___at_Lean_IR_EmitC_emitSimpleExternalCall___spec__1___lambda__1(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_6; } } lean_object* l_Nat_foldM_loop___at_Lean_IR_EmitC_emitSimpleExternalCall___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) { _start: { uint8_t x_8; lean_object* x_9; x_8 = lean_unbox(x_5); lean_dec(x_5); x_9 = l_Nat_foldM_loop___at_Lean_IR_EmitC_emitSimpleExternalCall___spec__1(x_1, x_2, x_3, x_4, x_8, x_6, x_7); lean_dec(x_6); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_9; } } lean_object* l_Lean_IR_EmitC_emitSimpleExternalCall___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_emitSimpleExternalCall(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_6; } } lean_object* l_Lean_IR_EmitC_emitExternCall_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_6; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_6 = lean_apply_1(x_5, x_1); return x_6; } else { lean_object* x_7; x_7 = lean_ctor_get(x_1, 0); lean_inc(x_7); switch (lean_obj_tag(x_7)) { case 0: { lean_object* x_8; lean_dec(x_7); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_8 = lean_apply_1(x_5, x_1); return x_8; } case 1: { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); x_9 = lean_ctor_get(x_7, 0); lean_inc(x_9); x_10 = lean_ctor_get(x_7, 1); lean_inc(x_10); lean_dec(x_7); x_11 = lean_apply_2(x_3, x_9, x_10); return x_11; } case 2: { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); x_12 = lean_ctor_get(x_7, 0); lean_inc(x_12); x_13 = lean_ctor_get(x_7, 1); lean_inc(x_13); lean_dec(x_7); x_14 = lean_apply_2(x_2, x_12, x_13); return x_14; } default: { lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_15 = lean_ctor_get(x_7, 0); lean_inc(x_15); x_16 = lean_ctor_get(x_7, 1); lean_inc(x_16); lean_dec(x_7); x_17 = lean_apply_2(x_4, x_15, x_16); return x_17; } } } } } lean_object* l_Lean_IR_EmitC_emitExternCall_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitExternCall_match__1___rarg), 5, 0); return x_2; } } static lean_object* _init_l_Lean_IR_EmitC_emitExternCall___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("failed to emit extern application '"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitExternCall(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; lean_object* x_8; x_7 = l_List_forM___at_Lean_IR_EmitC_emitFnDecls___spec__5___closed__2; x_8 = l_Lean_getExternEntryFor(x_3, x_7); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_dec(x_4); x_9 = l_Lean_Name_toString___closed__1; x_10 = l_Lean_Name_toStringWithSep(x_9, x_1); x_11 = l_Lean_IR_EmitC_emitExternCall___closed__1; x_12 = lean_string_append(x_11, x_10); lean_dec(x_10); x_13 = l_Char_quote___closed__1; x_14 = lean_string_append(x_12, x_13); x_15 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_6); return x_15; } else { lean_object* x_16; x_16 = lean_ctor_get(x_8, 0); lean_inc(x_16); lean_dec(x_8); switch (lean_obj_tag(x_16)) { case 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; lean_dec(x_16); lean_dec(x_4); x_17 = l_Lean_Name_toString___closed__1; x_18 = l_Lean_Name_toStringWithSep(x_17, x_1); x_19 = l_Lean_IR_EmitC_emitExternCall___closed__1; x_20 = lean_string_append(x_19, x_18); lean_dec(x_18); x_21 = l_Char_quote___closed__1; x_22 = lean_string_append(x_20, x_21); x_23 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_23, 0, x_22); lean_ctor_set(x_23, 1, x_6); return x_23; } case 1: { lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_dec(x_1); x_24 = lean_ctor_get(x_16, 1); lean_inc(x_24); lean_dec(x_16); x_25 = l_Lean_IR_EmitC_toStringArgs(x_4); x_26 = l_Lean_expandExternPattern(x_24, x_25); lean_dec(x_25); x_27 = lean_string_append(x_6, x_26); lean_dec(x_26); x_28 = l_myMacro____x40_Init_Notation___hyg_16821____closed__12; x_29 = lean_string_append(x_27, x_28); x_30 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_31 = lean_string_append(x_29, x_30); x_32 = lean_box(0); x_33 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_33, 0, x_32); lean_ctor_set(x_33, 1, x_31); return x_33; } default: { lean_object* x_34; lean_object* x_35; lean_dec(x_1); x_34 = lean_ctor_get(x_16, 1); lean_inc(x_34); lean_dec(x_16); x_35 = l_Lean_IR_EmitC_emitSimpleExternalCall(x_34, x_2, x_4, x_5, x_6); lean_dec(x_4); lean_dec(x_34); return x_35; } } } } } lean_object* l_Lean_IR_EmitC_emitExternCall___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_IR_EmitC_emitExternCall(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); return x_7; } } lean_object* l_Lean_IR_EmitC_emitFullApp_match__1___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_dec(x_2); x_4 = lean_apply_1(x_3, x_1); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; 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); x_7 = lean_ctor_get(x_1, 2); lean_inc(x_7); x_8 = lean_ctor_get(x_1, 3); lean_inc(x_8); lean_dec(x_1); x_9 = lean_apply_4(x_2, x_5, x_6, x_7, x_8); return x_9; } } } lean_object* l_Lean_IR_EmitC_emitFullApp_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitFullApp_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_IR_EmitC_emitFullApp(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; lean_object* x_7; lean_object* x_8; x_6 = l_Lean_IR_EmitC_emitLhs(x_1, x_4, x_5); x_7 = lean_ctor_get(x_6, 1); lean_inc(x_7); lean_dec(x_6); lean_inc(x_2); x_8 = l_Lean_IR_EmitC_getDecl(x_2, x_4, x_7); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; x_9 = lean_ctor_get(x_8, 0); lean_inc(x_9); if (lean_obj_tag(x_9) == 0) { lean_object* x_10; lean_object* x_11; lean_dec(x_9); x_10 = lean_ctor_get(x_8, 1); lean_inc(x_10); lean_dec(x_8); x_11 = l_Lean_IR_EmitC_emitCName(x_2, x_4, x_10); if (lean_obj_tag(x_11) == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; x_12 = lean_ctor_get(x_11, 1); lean_inc(x_12); lean_dec(x_11); x_13 = l_Lean_IR_EmitC_emitFnDeclAux___lambda__3___closed__1; x_14 = lean_array_get_size(x_3); x_15 = lean_unsigned_to_nat(0u); x_16 = lean_nat_dec_lt(x_15, x_14); lean_dec(x_14); if (x_16 == 0) { lean_object* x_17; lean_object* x_18; lean_dec(x_3); x_17 = lean_box(0); x_18 = lean_apply_3(x_13, x_17, x_4, x_12); return x_18; } else { lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; x_19 = l_prec_x28___x29___closed__3; x_20 = lean_string_append(x_12, x_19); x_21 = l_Lean_IR_EmitC_emitArgs(x_3, x_4, x_20); lean_dec(x_3); x_22 = lean_ctor_get(x_21, 1); lean_inc(x_22); lean_dec(x_21); x_23 = l_prec_x28___x29___closed__7; x_24 = lean_string_append(x_22, x_23); x_25 = lean_box(0); x_26 = lean_apply_3(x_13, x_25, x_4, x_24); return x_26; } } else { uint8_t x_27; lean_dec(x_4); lean_dec(x_3); x_27 = !lean_is_exclusive(x_11); if (x_27 == 0) { return x_11; } else { lean_object* x_28; lean_object* x_29; lean_object* x_30; x_28 = lean_ctor_get(x_11, 0); x_29 = lean_ctor_get(x_11, 1); lean_inc(x_29); lean_inc(x_28); lean_dec(x_11); x_30 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_30, 0, x_28); lean_ctor_set(x_30, 1, x_29); return x_30; } } } else { lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; x_31 = lean_ctor_get(x_8, 1); lean_inc(x_31); lean_dec(x_8); x_32 = lean_ctor_get(x_9, 1); lean_inc(x_32); x_33 = lean_ctor_get(x_9, 3); lean_inc(x_33); lean_dec(x_9); x_34 = l_Lean_IR_EmitC_emitExternCall(x_2, x_32, x_33, x_3, x_4, x_31); lean_dec(x_4); lean_dec(x_33); lean_dec(x_32); return x_34; } } else { uint8_t x_35; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_35 = !lean_is_exclusive(x_8); if (x_35 == 0) { return x_8; } else { lean_object* x_36; lean_object* x_37; lean_object* x_38; x_36 = lean_ctor_get(x_8, 0); x_37 = lean_ctor_get(x_8, 1); lean_inc(x_37); lean_inc(x_36); lean_dec(x_8); x_38 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_38, 0, x_36); lean_ctor_set(x_38, 1, x_37); return x_38; } } } } static lean_object* _init_l_Nat_forM_loop___at_Lean_IR_EmitC_emitPartialApp___spec__1___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_closure_set("); return x_1; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitPartialApp___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; uint8_t x_8; x_7 = lean_unsigned_to_nat(0u); x_8 = lean_nat_dec_eq(x_4, x_7); if (x_8 == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; x_9 = lean_unsigned_to_nat(1u); x_10 = lean_nat_sub(x_4, x_9); lean_dec(x_4); x_11 = lean_nat_sub(x_3, x_10); x_12 = lean_nat_sub(x_11, x_9); lean_dec(x_11); x_13 = l_Lean_IR_instInhabitedArg; x_14 = lean_array_get(x_13, x_2, x_12); x_15 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitPartialApp___spec__1___closed__1; x_16 = lean_string_append(x_6, x_15); lean_inc(x_1); x_17 = l_Nat_repr(x_1); x_18 = l_Lean_IR_instToStringVarId___closed__1; x_19 = lean_string_append(x_18, x_17); lean_dec(x_17); x_20 = lean_string_append(x_16, x_19); lean_dec(x_19); x_21 = l_term_x5b___x5d___closed__5; x_22 = lean_string_append(x_20, x_21); x_23 = l_Nat_repr(x_12); x_24 = lean_string_append(x_22, x_23); lean_dec(x_23); x_25 = lean_string_append(x_24, x_21); x_26 = l_Lean_IR_EmitC_emitArg(x_14, x_5, x_25); x_27 = lean_ctor_get(x_26, 1); lean_inc(x_27); lean_dec(x_26); x_28 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_29 = lean_string_append(x_27, x_28); x_30 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_31 = lean_string_append(x_29, x_30); x_4 = x_10; x_6 = x_31; goto _start; } else { lean_object* x_33; lean_object* x_34; lean_dec(x_4); lean_dec(x_1); x_33 = lean_box(0); x_34 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_34, 0, x_33); lean_ctor_set(x_34, 1, x_6); return x_34; } } } static lean_object* _init_l_Lean_IR_EmitC_emitPartialApp___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_alloc_closure((void*)("); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitPartialApp___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("), "); return x_1; } } lean_object* l_Lean_IR_EmitC_emitPartialApp(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; lean_inc(x_2); x_6 = l_Lean_IR_EmitC_getDecl(x_2, x_4, x_5); 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; x_7 = lean_ctor_get(x_6, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_6, 1); lean_inc(x_8); lean_dec(x_6); x_9 = l_Lean_IR_Decl_params(x_7); lean_dec(x_7); x_10 = lean_array_get_size(x_9); lean_dec(x_9); lean_inc(x_1); x_11 = l_Lean_IR_EmitC_emitLhs(x_1, x_4, x_8); x_12 = lean_ctor_get(x_11, 1); lean_inc(x_12); lean_dec(x_11); x_13 = l_Lean_IR_EmitC_emitPartialApp___closed__1; x_14 = lean_string_append(x_12, x_13); x_15 = l_Lean_IR_EmitC_emitCName(x_2, x_4, 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; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; x_16 = lean_ctor_get(x_15, 1); lean_inc(x_16); lean_dec(x_15); x_17 = l_Lean_IR_EmitC_emitPartialApp___closed__2; x_18 = lean_string_append(x_16, x_17); x_19 = l_Nat_repr(x_10); x_20 = lean_string_append(x_18, x_19); lean_dec(x_19); x_21 = l_term_x5b___x5d___closed__5; x_22 = lean_string_append(x_20, x_21); x_23 = lean_array_get_size(x_3); lean_inc(x_23); x_24 = l_Nat_repr(x_23); x_25 = lean_string_append(x_22, x_24); lean_dec(x_24); x_26 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_27 = lean_string_append(x_25, x_26); x_28 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_29 = lean_string_append(x_27, x_28); lean_inc(x_23); x_30 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitPartialApp___spec__1(x_1, x_3, x_23, x_23, x_4, x_29); lean_dec(x_23); return x_30; } else { uint8_t x_31; lean_dec(x_10); lean_dec(x_1); x_31 = !lean_is_exclusive(x_15); if (x_31 == 0) { return x_15; } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; x_32 = lean_ctor_get(x_15, 0); x_33 = lean_ctor_get(x_15, 1); lean_inc(x_33); lean_inc(x_32); lean_dec(x_15); x_34 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_34, 0, x_32); lean_ctor_set(x_34, 1, x_33); return x_34; } } } else { uint8_t x_35; lean_dec(x_2); lean_dec(x_1); x_35 = !lean_is_exclusive(x_6); if (x_35 == 0) { return x_6; } else { lean_object* x_36; lean_object* x_37; lean_object* x_38; x_36 = lean_ctor_get(x_6, 0); x_37 = lean_ctor_get(x_6, 1); lean_inc(x_37); lean_inc(x_36); lean_dec(x_6); x_38 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_38, 0, x_36); lean_ctor_set(x_38, 1, x_37); return x_38; } } } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitPartialApp___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: { lean_object* x_7; x_7 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitPartialApp___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); return x_7; } } lean_object* l_Lean_IR_EmitC_emitPartialApp___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_emitPartialApp(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_3); return x_6; } } static lean_object* _init_l_Lean_IR_EmitC_emitApp___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_apply_"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitApp___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("{ lean_object* _aargs[] = {"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitApp___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("};"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitApp___closed__4() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_apply_m("); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitApp___closed__5() { _start: { lean_object* x_1; x_1 = lean_mk_string(", _aargs); }"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitApp(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; lean_object* x_7; uint8_t x_8; x_6 = lean_array_get_size(x_3); x_7 = l_Lean_closureMaxArgs; x_8 = lean_nat_dec_lt(x_7, x_6); if (x_8 == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; 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; uint8_t x_24; x_9 = l_Lean_IR_EmitC_emitLhs(x_1, x_4, x_5); x_10 = lean_ctor_get(x_9, 1); lean_inc(x_10); lean_dec(x_9); x_11 = l_Lean_IR_EmitC_emitApp___closed__1; x_12 = lean_string_append(x_10, x_11); x_13 = l_Nat_repr(x_6); x_14 = lean_string_append(x_12, x_13); lean_dec(x_13); x_15 = l_prec_x28___x29___closed__3; x_16 = lean_string_append(x_14, x_15); x_17 = l_Nat_repr(x_2); x_18 = l_Lean_IR_instToStringVarId___closed__1; x_19 = lean_string_append(x_18, x_17); lean_dec(x_17); x_20 = lean_string_append(x_16, x_19); lean_dec(x_19); x_21 = l_term_x5b___x5d___closed__5; x_22 = lean_string_append(x_20, x_21); x_23 = l_Lean_IR_EmitC_emitArgs(x_3, x_4, x_22); x_24 = !lean_is_exclusive(x_23); if (x_24 == 0) { lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; x_25 = lean_ctor_get(x_23, 1); x_26 = lean_ctor_get(x_23, 0); lean_dec(x_26); x_27 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_28 = lean_string_append(x_25, x_27); x_29 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_30 = lean_string_append(x_28, x_29); x_31 = lean_box(0); lean_ctor_set(x_23, 1, x_30); lean_ctor_set(x_23, 0, x_31); return x_23; } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; x_32 = lean_ctor_get(x_23, 1); lean_inc(x_32); lean_dec(x_23); x_33 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_34 = lean_string_append(x_32, x_33); x_35 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_36 = lean_string_append(x_34, x_35); x_37 = lean_box(0); x_38 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_38, 0, x_37); lean_ctor_set(x_38, 1, x_36); return x_38; } } else { lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; uint8_t x_48; x_39 = l_Lean_IR_EmitC_emitApp___closed__2; x_40 = lean_string_append(x_5, x_39); x_41 = l_Lean_IR_EmitC_emitArgs(x_3, x_4, x_40); x_42 = lean_ctor_get(x_41, 1); lean_inc(x_42); lean_dec(x_41); x_43 = l_Lean_IR_EmitC_emitApp___closed__3; x_44 = lean_string_append(x_42, x_43); x_45 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_46 = lean_string_append(x_44, x_45); x_47 = l_Lean_IR_EmitC_emitLhs(x_1, x_4, x_46); x_48 = !lean_is_exclusive(x_47); if (x_48 == 0) { lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; x_49 = lean_ctor_get(x_47, 1); x_50 = lean_ctor_get(x_47, 0); lean_dec(x_50); x_51 = l_Lean_IR_EmitC_emitApp___closed__4; x_52 = lean_string_append(x_49, x_51); x_53 = l_Nat_repr(x_2); x_54 = l_Lean_IR_instToStringVarId___closed__1; x_55 = lean_string_append(x_54, x_53); lean_dec(x_53); x_56 = lean_string_append(x_52, x_55); lean_dec(x_55); x_57 = l_term_x5b___x5d___closed__5; x_58 = lean_string_append(x_56, x_57); x_59 = l_Nat_repr(x_6); x_60 = lean_string_append(x_58, x_59); lean_dec(x_59); x_61 = l_Lean_IR_EmitC_emitApp___closed__5; x_62 = lean_string_append(x_60, x_61); x_63 = lean_string_append(x_62, x_45); x_64 = lean_box(0); lean_ctor_set(x_47, 1, x_63); lean_ctor_set(x_47, 0, x_64); return x_47; } else { lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; x_65 = lean_ctor_get(x_47, 1); lean_inc(x_65); lean_dec(x_47); x_66 = l_Lean_IR_EmitC_emitApp___closed__4; x_67 = lean_string_append(x_65, x_66); x_68 = l_Nat_repr(x_2); x_69 = l_Lean_IR_instToStringVarId___closed__1; x_70 = lean_string_append(x_69, x_68); lean_dec(x_68); x_71 = lean_string_append(x_67, x_70); lean_dec(x_70); x_72 = l_term_x5b___x5d___closed__5; x_73 = lean_string_append(x_71, x_72); x_74 = l_Nat_repr(x_6); x_75 = lean_string_append(x_73, x_74); lean_dec(x_74); x_76 = l_Lean_IR_EmitC_emitApp___closed__5; x_77 = lean_string_append(x_75, x_76); x_78 = lean_string_append(x_77, x_45); x_79 = lean_box(0); x_80 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_80, 0, x_79); lean_ctor_set(x_80, 1, x_78); return x_80; } } } } lean_object* l_Lean_IR_EmitC_emitApp___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_emitApp(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_3); return x_6; } } lean_object* l_Lean_IR_EmitC_emitBoxFn_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { switch (lean_obj_tag(x_1)) { case 0: { lean_object* x_7; lean_object* x_8; lean_dec(x_6); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_7 = lean_box(0); x_8 = lean_apply_1(x_5, x_7); return x_8; } case 3: { lean_object* x_9; lean_object* x_10; lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); x_9 = lean_box(0); x_10 = lean_apply_1(x_3, x_9); return x_10; } case 4: { lean_object* x_11; lean_object* x_12; lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); x_11 = lean_box(0); x_12 = lean_apply_1(x_4, x_11); return x_12; } case 5: { lean_object* x_13; lean_object* x_14; lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_13 = lean_box(0); x_14 = lean_apply_1(x_2, x_13); return x_14; } default: { lean_object* x_15; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_15 = lean_apply_1(x_6, x_1); return x_15; } } } } lean_object* l_Lean_IR_EmitC_emitBoxFn_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitBoxFn_match__1___rarg), 6, 0); return x_2; } } static lean_object* _init_l_Lean_IR_EmitC_emitBoxFn___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_box_float"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitBoxFn___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_box"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitBoxFn___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_box_uint32"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitBoxFn___closed__4() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_box_uint64"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitBoxFn___closed__5() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_box_usize"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitBoxFn(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { switch (lean_obj_tag(x_1)) { case 0: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; x_4 = l_Lean_IR_EmitC_emitBoxFn___closed__1; x_5 = lean_string_append(x_3, x_4); x_6 = lean_box(0); x_7 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_7, 0, x_6); lean_ctor_set(x_7, 1, x_5); return x_7; } case 3: { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_8 = l_Lean_IR_EmitC_emitBoxFn___closed__3; x_9 = lean_string_append(x_3, x_8); x_10 = lean_box(0); x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_9); return x_11; } case 4: { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_12 = l_Lean_IR_EmitC_emitBoxFn___closed__4; x_13 = lean_string_append(x_3, x_12); x_14 = lean_box(0); x_15 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_13); return x_15; } case 5: { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_16 = l_Lean_IR_EmitC_emitBoxFn___closed__5; x_17 = lean_string_append(x_3, x_16); x_18 = lean_box(0); x_19 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_17); return x_19; } default: { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_20 = l_Lean_IR_EmitC_emitBoxFn___closed__2; x_21 = lean_string_append(x_3, x_20); x_22 = lean_box(0); x_23 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_23, 0, x_22); lean_ctor_set(x_23, 1, x_21); return x_23; } } } } lean_object* l_Lean_IR_EmitC_emitBoxFn___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_emitBoxFn(x_1, x_2, x_3); lean_dec(x_2); lean_dec(x_1); return x_4; } } lean_object* l_Lean_IR_EmitC_emitBox(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; lean_object* x_7; lean_object* x_8; uint8_t x_9; x_6 = l_Lean_IR_EmitC_emitLhs(x_1, x_4, x_5); x_7 = lean_ctor_get(x_6, 1); lean_inc(x_7); lean_dec(x_6); x_8 = l_Lean_IR_EmitC_emitBoxFn(x_3, x_4, x_7); x_9 = !lean_is_exclusive(x_8); if (x_9 == 0) { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_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_10 = lean_ctor_get(x_8, 1); x_11 = lean_ctor_get(x_8, 0); lean_dec(x_11); x_12 = l_prec_x28___x29___closed__3; x_13 = lean_string_append(x_10, x_12); x_14 = l_Nat_repr(x_2); x_15 = l_Lean_IR_instToStringVarId___closed__1; x_16 = lean_string_append(x_15, x_14); lean_dec(x_14); x_17 = lean_string_append(x_13, x_16); lean_dec(x_16); x_18 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_19 = lean_string_append(x_17, x_18); x_20 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_21 = lean_string_append(x_19, x_20); x_22 = lean_box(0); lean_ctor_set(x_8, 1, x_21); lean_ctor_set(x_8, 0, x_22); return x_8; } else { lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; x_23 = lean_ctor_get(x_8, 1); lean_inc(x_23); lean_dec(x_8); x_24 = l_prec_x28___x29___closed__3; x_25 = lean_string_append(x_23, x_24); x_26 = l_Nat_repr(x_2); x_27 = l_Lean_IR_instToStringVarId___closed__1; x_28 = lean_string_append(x_27, x_26); lean_dec(x_26); x_29 = lean_string_append(x_25, x_28); lean_dec(x_28); x_30 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_31 = lean_string_append(x_29, x_30); x_32 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_33 = lean_string_append(x_31, x_32); x_34 = lean_box(0); x_35 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_35, 0, x_34); lean_ctor_set(x_35, 1, x_33); return x_35; } } } lean_object* l_Lean_IR_EmitC_emitBox___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_emitBox(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_3); return x_6; } } lean_object* l_Lean_IR_EmitC_emitUnbox___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; 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; x_5 = l_prec_x28___x29___closed__3; x_6 = lean_string_append(x_4, x_5); x_7 = l_Nat_repr(x_1); x_8 = l_Lean_IR_instToStringVarId___closed__1; x_9 = lean_string_append(x_8, x_7); lean_dec(x_7); x_10 = lean_string_append(x_6, x_9); lean_dec(x_9); x_11 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_12 = lean_string_append(x_10, x_11); x_13 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_14 = lean_string_append(x_12, x_13); x_15 = lean_box(0); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_15); lean_ctor_set(x_16, 1, x_14); return x_16; } } static lean_object* _init_l_Lean_IR_EmitC_emitUnbox___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_unbox_float"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitUnbox___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_unbox"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitUnbox___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_unbox_uint32"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitUnbox___closed__4() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_unbox_uint64"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitUnbox___closed__5() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_unbox_usize"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitUnbox(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_emitLhs(x_1, x_4, x_5); switch (lean_obj_tag(x_2)) { case 0: { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_7 = lean_ctor_get(x_6, 1); lean_inc(x_7); lean_dec(x_6); x_8 = l_Lean_IR_EmitC_emitUnbox___closed__1; x_9 = lean_string_append(x_7, x_8); x_10 = lean_box(0); x_11 = l_Lean_IR_EmitC_emitUnbox___lambda__1(x_3, x_10, x_4, x_9); return x_11; } case 3: { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_12 = lean_ctor_get(x_6, 1); lean_inc(x_12); lean_dec(x_6); x_13 = l_Lean_IR_EmitC_emitUnbox___closed__3; x_14 = lean_string_append(x_12, x_13); x_15 = lean_box(0); x_16 = l_Lean_IR_EmitC_emitUnbox___lambda__1(x_3, x_15, x_4, x_14); return x_16; } case 4: { lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; x_17 = lean_ctor_get(x_6, 1); lean_inc(x_17); lean_dec(x_6); x_18 = l_Lean_IR_EmitC_emitUnbox___closed__4; x_19 = lean_string_append(x_17, x_18); x_20 = lean_box(0); x_21 = l_Lean_IR_EmitC_emitUnbox___lambda__1(x_3, x_20, x_4, x_19); return x_21; } case 5: { lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; x_22 = lean_ctor_get(x_6, 1); lean_inc(x_22); lean_dec(x_6); x_23 = l_Lean_IR_EmitC_emitUnbox___closed__5; x_24 = lean_string_append(x_22, x_23); x_25 = lean_box(0); x_26 = l_Lean_IR_EmitC_emitUnbox___lambda__1(x_3, x_25, x_4, x_24); return x_26; } default: { lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; x_27 = lean_ctor_get(x_6, 1); lean_inc(x_27); lean_dec(x_6); x_28 = l_Lean_IR_EmitC_emitUnbox___closed__2; x_29 = lean_string_append(x_27, x_28); x_30 = lean_box(0); x_31 = l_Lean_IR_EmitC_emitUnbox___lambda__1(x_3, x_30, x_4, x_29); return x_31; } } } } lean_object* l_Lean_IR_EmitC_emitUnbox___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitUnbox___lambda__1(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); return x_5; } } lean_object* l_Lean_IR_EmitC_emitUnbox___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_emitUnbox(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_2); return x_6; } } static lean_object* _init_l_Lean_IR_EmitC_emitIsShared___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("!lean_is_exclusive("); return x_1; } } lean_object* l_Lean_IR_EmitC_emitIsShared(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; uint8_t x_6; x_5 = l_Lean_IR_EmitC_emitLhs(x_1, x_3, x_4); x_6 = !lean_is_exclusive(x_5); if (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; lean_object* x_19; x_7 = lean_ctor_get(x_5, 1); x_8 = lean_ctor_get(x_5, 0); lean_dec(x_8); x_9 = l_Lean_IR_EmitC_emitIsShared___closed__1; x_10 = lean_string_append(x_7, x_9); x_11 = l_Nat_repr(x_2); x_12 = l_Lean_IR_instToStringVarId___closed__1; x_13 = lean_string_append(x_12, x_11); lean_dec(x_11); x_14 = lean_string_append(x_10, x_13); lean_dec(x_13); x_15 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_16 = lean_string_append(x_14, x_15); x_17 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_18 = lean_string_append(x_16, x_17); x_19 = lean_box(0); lean_ctor_set(x_5, 1, x_18); lean_ctor_set(x_5, 0, x_19); return x_5; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; x_20 = lean_ctor_get(x_5, 1); lean_inc(x_20); lean_dec(x_5); x_21 = l_Lean_IR_EmitC_emitIsShared___closed__1; x_22 = lean_string_append(x_20, x_21); x_23 = l_Nat_repr(x_2); x_24 = l_Lean_IR_instToStringVarId___closed__1; x_25 = lean_string_append(x_24, x_23); lean_dec(x_23); x_26 = lean_string_append(x_22, x_25); lean_dec(x_25); x_27 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_28 = lean_string_append(x_26, x_27); x_29 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_30 = lean_string_append(x_28, x_29); x_31 = lean_box(0); x_32 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_32, 0, x_31); lean_ctor_set(x_32, 1, x_30); return x_32; } } } lean_object* l_Lean_IR_EmitC_emitIsShared___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitIsShared(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } static lean_object* _init_l_Lean_IR_EmitC_emitIsTaggedPtr___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("!lean_is_scalar("); return x_1; } } lean_object* l_Lean_IR_EmitC_emitIsTaggedPtr(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; uint8_t x_6; x_5 = l_Lean_IR_EmitC_emitLhs(x_1, x_3, x_4); x_6 = !lean_is_exclusive(x_5); if (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; lean_object* x_19; x_7 = lean_ctor_get(x_5, 1); x_8 = lean_ctor_get(x_5, 0); lean_dec(x_8); x_9 = l_Lean_IR_EmitC_emitIsTaggedPtr___closed__1; x_10 = lean_string_append(x_7, x_9); x_11 = l_Nat_repr(x_2); x_12 = l_Lean_IR_instToStringVarId___closed__1; x_13 = lean_string_append(x_12, x_11); lean_dec(x_11); x_14 = lean_string_append(x_10, x_13); lean_dec(x_13); x_15 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_16 = lean_string_append(x_14, x_15); x_17 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_18 = lean_string_append(x_16, x_17); x_19 = lean_box(0); lean_ctor_set(x_5, 1, x_18); lean_ctor_set(x_5, 0, x_19); return x_5; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; x_20 = lean_ctor_get(x_5, 1); lean_inc(x_20); lean_dec(x_5); x_21 = l_Lean_IR_EmitC_emitIsTaggedPtr___closed__1; x_22 = lean_string_append(x_20, x_21); x_23 = l_Nat_repr(x_2); x_24 = l_Lean_IR_instToStringVarId___closed__1; x_25 = lean_string_append(x_24, x_23); lean_dec(x_23); x_26 = lean_string_append(x_22, x_25); lean_dec(x_25); x_27 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_28 = lean_string_append(x_26, x_27); x_29 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_30 = lean_string_append(x_28, x_29); x_31 = lean_box(0); x_32 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_32, 0, x_31); lean_ctor_set(x_32, 1, x_30); return x_32; } } } lean_object* l_Lean_IR_EmitC_emitIsTaggedPtr___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitIsTaggedPtr(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } lean_object* l_Lean_IR_EmitC_toHexDigit(lean_object* x_1) { _start: { uint32_t x_2; lean_object* x_3; lean_object* x_4; x_2 = l_Nat_digitChar(x_1); x_3 = l_Lean_instInhabitedParserDescr___closed__1; x_4 = lean_string_push(x_3, x_2); return x_4; } } lean_object* l_Lean_IR_EmitC_toHexDigit___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_IR_EmitC_toHexDigit(x_1); lean_dec(x_1); return x_2; } } lean_object* l_Lean_IR_EmitC_quoteString___lambda__1(lean_object* x_1, uint32_t x_2) { _start: { uint32_t x_3; uint8_t x_4; x_3 = 10; x_4 = x_2 == x_3; if (x_4 == 0) { uint32_t x_5; uint8_t x_6; x_5 = 92; x_6 = x_2 == x_5; if (x_6 == 0) { uint32_t x_7; uint8_t x_8; x_7 = 34; x_8 = x_2 == x_7; if (x_8 == 0) { lean_object* x_9; lean_object* x_10; uint8_t x_11; x_9 = lean_uint32_to_nat(x_2); x_10 = lean_unsigned_to_nat(31u); x_11 = lean_nat_dec_le(x_9, x_10); if (x_11 == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_dec(x_9); x_12 = l_Lean_instInhabitedParserDescr___closed__1; x_13 = lean_string_push(x_12, x_2); x_14 = lean_string_append(x_1, x_13); lean_dec(x_13); 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_unsigned_to_nat(16u); x_16 = lean_nat_div(x_9, x_15); x_17 = l_Lean_IR_EmitC_toHexDigit(x_16); lean_dec(x_16); x_18 = l_Char_quoteCore___closed__1; x_19 = lean_string_append(x_18, x_17); lean_dec(x_17); x_20 = lean_nat_mod(x_9, x_15); lean_dec(x_9); x_21 = l_Lean_IR_EmitC_toHexDigit(x_20); lean_dec(x_20); x_22 = lean_string_append(x_19, x_21); lean_dec(x_21); x_23 = lean_string_append(x_1, x_22); lean_dec(x_22); return x_23; } } else { lean_object* x_24; lean_object* x_25; x_24 = l_Char_quoteCore___closed__2; x_25 = lean_string_append(x_1, x_24); return x_25; } } else { lean_object* x_26; lean_object* x_27; x_26 = l_Char_quoteCore___closed__3; x_27 = lean_string_append(x_1, x_26); return x_27; } } else { lean_object* x_28; lean_object* x_29; x_28 = l_Char_quoteCore___closed__5; x_29 = lean_string_append(x_1, x_28); return x_29; } } } static lean_object* _init_l_Lean_IR_EmitC_quoteString___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_quoteString___lambda__1___boxed), 2, 0); return x_1; } } lean_object* l_Lean_IR_EmitC_quoteString(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; x_2 = lean_string_utf8_byte_size(x_1); x_3 = l_Lean_IR_EmitC_quoteString___closed__1; x_4 = lean_unsigned_to_nat(0u); x_5 = l_String_quote___closed__2; x_6 = l_String_foldlAux_loop___rarg(x_3, x_1, x_2, x_4, x_5); lean_dec(x_2); x_7 = lean_string_append(x_6, x_5); return x_7; } } lean_object* l_Lean_IR_EmitC_quoteString___lambda__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint32_t x_3; lean_object* x_4; x_3 = lean_unbox_uint32(x_2); lean_dec(x_2); x_4 = l_Lean_IR_EmitC_quoteString___lambda__1(x_1, x_3); return x_4; } } lean_object* l_Lean_IR_EmitC_quoteString___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_IR_EmitC_quoteString(x_1); lean_dec(x_1); return x_2; } } static lean_object* _init_l_Lean_IR_EmitC_emitNumLit___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_cstr_to_nat(\""); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitNumLit___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("\")"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitNumLit___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_unsigned_to_nat("); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitNumLit___closed__4() { _start: { lean_object* x_1; x_1 = lean_mk_string("u)"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitNumLit(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { uint8_t x_5; x_5 = l_Lean_IR_IRType_isObj(x_1); if (x_5 == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_6 = l_Nat_repr(x_2); x_7 = lean_string_append(x_4, x_6); lean_dec(x_6); 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; uint8_t x_11; x_10 = l_UInt32_size; x_11 = lean_nat_dec_lt(x_2, x_10); if (x_11 == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_12 = l_Lean_IR_EmitC_emitNumLit___closed__1; x_13 = lean_string_append(x_4, x_12); x_14 = l_Nat_repr(x_2); x_15 = lean_string_append(x_13, x_14); lean_dec(x_14); x_16 = l_Lean_IR_EmitC_emitNumLit___closed__2; x_17 = lean_string_append(x_15, x_16); x_18 = lean_box(0); x_19 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_17); return x_19; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; x_20 = l_Lean_IR_EmitC_emitNumLit___closed__3; x_21 = lean_string_append(x_4, x_20); x_22 = l_Nat_repr(x_2); x_23 = lean_string_append(x_21, x_22); lean_dec(x_22); x_24 = l_Lean_IR_EmitC_emitNumLit___closed__4; x_25 = lean_string_append(x_23, x_24); x_26 = lean_box(0); x_27 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_27, 0, x_26); lean_ctor_set(x_27, 1, x_25); return x_27; } } } } lean_object* l_Lean_IR_EmitC_emitNumLit___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitNumLit(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_1); return x_5; } } lean_object* l_Lean_IR_EmitC_emitLit_match__1___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); lean_dec(x_1); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_apply_1(x_3, x_6); return x_7; } } } lean_object* l_Lean_IR_EmitC_emitLit_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitLit_match__1___rarg), 3, 0); return x_2; } } static lean_object* _init_l_Lean_IR_EmitC_emitLit___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_mk_string("); return x_1; } } lean_object* l_Lean_IR_EmitC_emitLit(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_emitLhs(x_1, x_4, x_5); if (lean_obj_tag(x_3) == 0) { lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; x_7 = lean_ctor_get(x_6, 1); lean_inc(x_7); lean_dec(x_6); x_8 = lean_ctor_get(x_3, 0); lean_inc(x_8); lean_dec(x_3); x_9 = l_Lean_IR_EmitC_emitNumLit(x_2, x_8, x_4, x_7); x_10 = !lean_is_exclusive(x_9); if (x_10 == 0) { 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; x_11 = lean_ctor_get(x_9, 1); x_12 = lean_ctor_get(x_9, 0); lean_dec(x_12); x_13 = l_myMacro____x40_Init_Notation___hyg_16821____closed__12; x_14 = lean_string_append(x_11, x_13); x_15 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_16 = lean_string_append(x_14, x_15); x_17 = lean_box(0); lean_ctor_set(x_9, 1, x_16); lean_ctor_set(x_9, 0, x_17); return x_9; } else { 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_18 = lean_ctor_get(x_9, 1); lean_inc(x_18); lean_dec(x_9); x_19 = l_myMacro____x40_Init_Notation___hyg_16821____closed__12; x_20 = lean_string_append(x_18, x_19); x_21 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_22 = lean_string_append(x_20, x_21); x_23 = lean_box(0); x_24 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_22); return x_24; } } else { uint8_t x_25; x_25 = !lean_is_exclusive(x_6); if (x_25 == 0) { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; x_26 = lean_ctor_get(x_6, 1); x_27 = lean_ctor_get(x_6, 0); lean_dec(x_27); x_28 = lean_ctor_get(x_3, 0); lean_inc(x_28); lean_dec(x_3); x_29 = l_Lean_IR_EmitC_emitLit___closed__1; x_30 = lean_string_append(x_26, x_29); x_31 = l_Lean_IR_EmitC_quoteString(x_28); lean_dec(x_28); x_32 = lean_string_append(x_30, x_31); lean_dec(x_31); x_33 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_34 = lean_string_append(x_32, x_33); x_35 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_36 = lean_string_append(x_34, x_35); x_37 = lean_box(0); lean_ctor_set(x_6, 1, x_36); lean_ctor_set(x_6, 0, x_37); return x_6; } else { lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; x_38 = lean_ctor_get(x_6, 1); lean_inc(x_38); lean_dec(x_6); x_39 = lean_ctor_get(x_3, 0); lean_inc(x_39); lean_dec(x_3); x_40 = l_Lean_IR_EmitC_emitLit___closed__1; x_41 = lean_string_append(x_38, x_40); x_42 = l_Lean_IR_EmitC_quoteString(x_39); lean_dec(x_39); x_43 = lean_string_append(x_41, x_42); lean_dec(x_42); x_44 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_45 = lean_string_append(x_43, x_44); x_46 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_47 = lean_string_append(x_45, x_46); x_48 = lean_box(0); x_49 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_49, 0, x_48); lean_ctor_set(x_49, 1, x_47); return x_49; } } } } lean_object* l_Lean_IR_EmitC_emitLit___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_emitLit(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_2); return x_6; } } lean_object* l_Lean_IR_EmitC_emitVDecl_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, 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) { _start: { switch (lean_obj_tag(x_1)) { case 0: { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_16 = lean_ctor_get(x_1, 0); lean_inc(x_16); x_17 = lean_ctor_get(x_1, 1); lean_inc(x_17); lean_dec(x_1); x_18 = lean_apply_2(x_2, x_16, x_17); return x_18; } case 1: { lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); x_19 = lean_ctor_get(x_1, 0); lean_inc(x_19); x_20 = lean_ctor_get(x_1, 1); lean_inc(x_20); lean_dec(x_1); x_21 = lean_apply_2(x_3, x_19, x_20); return x_21; } case 2: { lean_object* x_22; lean_object* x_23; uint8_t x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); x_22 = lean_ctor_get(x_1, 0); lean_inc(x_22); x_23 = lean_ctor_get(x_1, 1); lean_inc(x_23); x_24 = lean_ctor_get_uint8(x_1, sizeof(void*)*3); x_25 = lean_ctor_get(x_1, 2); lean_inc(x_25); lean_dec(x_1); x_26 = lean_box(x_24); x_27 = lean_apply_4(x_4, x_22, x_23, x_26, x_25); return x_27; } case 3: { lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_28 = lean_ctor_get(x_1, 0); lean_inc(x_28); x_29 = lean_ctor_get(x_1, 1); lean_inc(x_29); lean_dec(x_1); x_30 = lean_apply_2(x_5, x_28, x_29); return x_30; } case 4: { lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_31 = lean_ctor_get(x_1, 0); lean_inc(x_31); x_32 = lean_ctor_get(x_1, 1); lean_inc(x_32); lean_dec(x_1); x_33 = lean_apply_2(x_6, x_31, x_32); return x_33; } case 5: { lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_34 = lean_ctor_get(x_1, 0); lean_inc(x_34); x_35 = lean_ctor_get(x_1, 1); lean_inc(x_35); x_36 = lean_ctor_get(x_1, 2); lean_inc(x_36); lean_dec(x_1); x_37 = lean_apply_3(x_7, x_34, x_35, x_36); return x_37; } case 6: { lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_38 = lean_ctor_get(x_1, 0); lean_inc(x_38); x_39 = lean_ctor_get(x_1, 1); lean_inc(x_39); lean_dec(x_1); x_40 = lean_apply_2(x_8, x_38, x_39); return x_40; } case 7: { lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_41 = lean_ctor_get(x_1, 0); lean_inc(x_41); x_42 = lean_ctor_get(x_1, 1); lean_inc(x_42); lean_dec(x_1); x_43 = lean_apply_2(x_9, x_41, x_42); return x_43; } case 8: { lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_44 = lean_ctor_get(x_1, 0); lean_inc(x_44); x_45 = lean_ctor_get(x_1, 1); lean_inc(x_45); lean_dec(x_1); x_46 = lean_apply_2(x_10, x_44, x_45); return x_46; } case 9: { lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); 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_4); lean_dec(x_3); lean_dec(x_2); x_47 = lean_ctor_get(x_1, 0); lean_inc(x_47); x_48 = lean_ctor_get(x_1, 1); lean_inc(x_48); lean_dec(x_1); x_49 = lean_apply_2(x_11, x_47, x_48); return x_49; } case 10: { lean_object* x_50; lean_object* x_51; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_50 = lean_ctor_get(x_1, 0); lean_inc(x_50); lean_dec(x_1); x_51 = lean_apply_1(x_12, x_50); return x_51; } case 11: { lean_object* x_52; lean_object* x_53; lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_52 = lean_ctor_get(x_1, 0); lean_inc(x_52); lean_dec(x_1); x_53 = lean_apply_1(x_15, x_52); return x_53; } case 12: { lean_object* x_54; lean_object* x_55; lean_dec(x_15); lean_dec(x_14); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_54 = lean_ctor_get(x_1, 0); lean_inc(x_54); lean_dec(x_1); x_55 = lean_apply_1(x_13, x_54); return x_55; } default: { lean_object* x_56; lean_object* x_57; lean_dec(x_15); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_56 = lean_ctor_get(x_1, 0); lean_inc(x_56); lean_dec(x_1); x_57 = lean_apply_1(x_14, x_56); return x_57; } } } } lean_object* l_Lean_IR_EmitC_emitVDecl_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitVDecl_match__1___rarg), 15, 0); return x_2; } } lean_object* l_Lean_IR_EmitC_emitVDecl(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_3)) { case 0: { lean_object* x_6; lean_object* x_7; lean_object* x_8; x_6 = lean_ctor_get(x_3, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_3, 1); lean_inc(x_7); lean_dec(x_3); x_8 = l_Lean_IR_EmitC_emitCtor(x_1, x_6, x_7, x_4, x_5); lean_dec(x_4); lean_dec(x_7); return x_8; } case 1: { lean_object* x_9; lean_object* x_10; lean_object* x_11; x_9 = lean_ctor_get(x_3, 0); lean_inc(x_9); x_10 = lean_ctor_get(x_3, 1); lean_inc(x_10); lean_dec(x_3); x_11 = l_Lean_IR_EmitC_emitReset(x_1, x_9, x_10, x_4, x_5); lean_dec(x_4); return x_11; } case 2: { lean_object* x_12; lean_object* x_13; uint8_t x_14; lean_object* x_15; lean_object* x_16; 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_uint8(x_3, sizeof(void*)*3); x_15 = lean_ctor_get(x_3, 2); lean_inc(x_15); lean_dec(x_3); x_16 = l_Lean_IR_EmitC_emitReuse(x_1, x_12, x_13, x_14, x_15, x_4, x_5); lean_dec(x_4); lean_dec(x_15); return x_16; } case 3: { lean_object* x_17; lean_object* x_18; lean_object* x_19; x_17 = lean_ctor_get(x_3, 0); lean_inc(x_17); x_18 = lean_ctor_get(x_3, 1); lean_inc(x_18); lean_dec(x_3); x_19 = l_Lean_IR_EmitC_emitProj(x_1, x_17, x_18, x_4, x_5); lean_dec(x_4); return x_19; } case 4: { lean_object* x_20; lean_object* x_21; lean_object* x_22; x_20 = lean_ctor_get(x_3, 0); lean_inc(x_20); x_21 = lean_ctor_get(x_3, 1); lean_inc(x_21); lean_dec(x_3); x_22 = l_Lean_IR_EmitC_emitUProj(x_1, x_20, x_21, x_4, x_5); lean_dec(x_4); return x_22; } case 5: { lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; x_23 = lean_ctor_get(x_3, 0); lean_inc(x_23); x_24 = lean_ctor_get(x_3, 1); lean_inc(x_24); x_25 = lean_ctor_get(x_3, 2); lean_inc(x_25); lean_dec(x_3); x_26 = l_Lean_IR_EmitC_emitSProj(x_1, x_2, x_23, x_24, x_25, x_4, x_5); lean_dec(x_4); return x_26; } case 6: { lean_object* x_27; lean_object* x_28; lean_object* x_29; x_27 = lean_ctor_get(x_3, 0); lean_inc(x_27); x_28 = lean_ctor_get(x_3, 1); lean_inc(x_28); lean_dec(x_3); x_29 = l_Lean_IR_EmitC_emitFullApp(x_1, x_27, x_28, x_4, x_5); return x_29; } case 7: { lean_object* x_30; lean_object* x_31; lean_object* x_32; x_30 = lean_ctor_get(x_3, 0); lean_inc(x_30); x_31 = lean_ctor_get(x_3, 1); lean_inc(x_31); lean_dec(x_3); x_32 = l_Lean_IR_EmitC_emitPartialApp(x_1, x_30, x_31, x_4, x_5); lean_dec(x_4); lean_dec(x_31); return x_32; } case 8: { lean_object* x_33; lean_object* x_34; lean_object* x_35; x_33 = lean_ctor_get(x_3, 0); lean_inc(x_33); x_34 = lean_ctor_get(x_3, 1); lean_inc(x_34); lean_dec(x_3); x_35 = l_Lean_IR_EmitC_emitApp(x_1, x_33, x_34, x_4, x_5); lean_dec(x_4); lean_dec(x_34); return x_35; } case 9: { lean_object* x_36; lean_object* x_37; lean_object* x_38; x_36 = lean_ctor_get(x_3, 0); lean_inc(x_36); x_37 = lean_ctor_get(x_3, 1); lean_inc(x_37); lean_dec(x_3); x_38 = l_Lean_IR_EmitC_emitBox(x_1, x_37, x_36, x_4, x_5); lean_dec(x_4); lean_dec(x_36); return x_38; } case 10: { lean_object* x_39; lean_object* x_40; x_39 = lean_ctor_get(x_3, 0); lean_inc(x_39); lean_dec(x_3); x_40 = l_Lean_IR_EmitC_emitUnbox(x_1, x_2, x_39, x_4, x_5); lean_dec(x_4); return x_40; } case 11: { lean_object* x_41; lean_object* x_42; x_41 = lean_ctor_get(x_3, 0); lean_inc(x_41); lean_dec(x_3); x_42 = l_Lean_IR_EmitC_emitLit(x_1, x_2, x_41, x_4, x_5); lean_dec(x_4); return x_42; } case 12: { lean_object* x_43; lean_object* x_44; x_43 = lean_ctor_get(x_3, 0); lean_inc(x_43); lean_dec(x_3); x_44 = l_Lean_IR_EmitC_emitIsShared(x_1, x_43, x_4, x_5); lean_dec(x_4); return x_44; } default: { lean_object* x_45; lean_object* x_46; x_45 = lean_ctor_get(x_3, 0); lean_inc(x_45); lean_dec(x_3); x_46 = l_Lean_IR_EmitC_emitIsTaggedPtr(x_1, x_45, x_4, x_5); lean_dec(x_4); return x_46; } } } } lean_object* l_Lean_IR_EmitC_emitVDecl___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_emitVDecl(x_1, x_2, x_3, x_4, x_5); lean_dec(x_2); return x_6; } } lean_object* l_Lean_IR_EmitC_isTailCall_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_1) == 6) { if (lean_obj_tag(x_2) == 11) { lean_object* x_5; x_5 = lean_ctor_get(x_2, 0); lean_inc(x_5); if (lean_obj_tag(x_5) == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_dec(x_4); lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_1, 1); lean_inc(x_7); lean_dec(x_1); x_8 = lean_ctor_get(x_5, 0); lean_inc(x_8); lean_dec(x_5); x_9 = lean_apply_3(x_3, x_6, x_7, x_8); return x_9; } else { lean_object* x_10; lean_dec(x_3); x_10 = lean_apply_2(x_4, x_1, x_2); return x_10; } } else { lean_object* x_11; lean_dec(x_3); x_11 = lean_apply_2(x_4, x_1, x_2); return x_11; } } else { lean_object* x_12; lean_dec(x_3); x_12 = lean_apply_2(x_4, x_1, x_2); return x_12; } } } lean_object* l_Lean_IR_EmitC_isTailCall_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_isTailCall_match__1___rarg), 4, 0); return x_2; } } lean_object* l_Lean_IR_EmitC_isTailCall(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) == 6) { if (lean_obj_tag(x_3) == 11) { lean_object* x_6; x_6 = lean_ctor_get(x_3, 0); if (lean_obj_tag(x_6) == 0) { lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; x_7 = lean_ctor_get(x_2, 0); x_8 = lean_ctor_get(x_6, 0); x_9 = lean_ctor_get(x_4, 3); x_10 = lean_name_eq(x_7, x_9); if (x_10 == 0) { uint8_t x_11; lean_object* x_12; lean_object* x_13; x_11 = 0; x_12 = lean_box(x_11); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_5); return x_13; } else { uint8_t x_14; lean_object* x_15; lean_object* x_16; x_14 = lean_nat_dec_eq(x_1, x_8); x_15 = lean_box(x_14); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_15); lean_ctor_set(x_16, 1, x_5); return x_16; } } else { uint8_t x_17; lean_object* x_18; lean_object* x_19; x_17 = 0; x_18 = lean_box(x_17); x_19 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_5); return x_19; } } else { uint8_t x_20; lean_object* x_21; lean_object* x_22; x_20 = 0; x_21 = lean_box(x_20); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_21); lean_ctor_set(x_22, 1, x_5); return x_22; } } else { uint8_t x_23; lean_object* x_24; lean_object* x_25; x_23 = 0; x_24 = lean_box(x_23); x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_5); return x_25; } } } lean_object* l_Lean_IR_EmitC_isTailCall___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_isTailCall(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_6; } } uint8_t l_Lean_IR_EmitC_paramEqArg(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { lean_object* x_3; lean_object* x_4; uint8_t x_5; x_3 = lean_ctor_get(x_2, 0); x_4 = lean_ctor_get(x_1, 0); x_5 = lean_nat_dec_eq(x_4, x_3); return x_5; } else { uint8_t x_6; x_6 = 0; return x_6; } } } lean_object* l_Lean_IR_EmitC_paramEqArg___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l_Lean_IR_EmitC_paramEqArg(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } uint8_t l_Nat_anyAux___at_Lean_IR_EmitC_overwriteParam___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; uint8_t x_6; x_5 = lean_unsigned_to_nat(0u); x_6 = lean_nat_dec_eq(x_4, x_5); if (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; uint8_t x_13; x_7 = lean_unsigned_to_nat(1u); x_8 = lean_nat_sub(x_4, x_7); lean_dec(x_4); x_9 = lean_nat_add(x_8, x_7); x_10 = lean_nat_sub(x_3, x_9); lean_dec(x_9); x_11 = l_Lean_IR_instInhabitedArg; x_12 = lean_array_get(x_11, x_1, x_10); lean_dec(x_10); x_13 = l_Lean_IR_EmitC_paramEqArg(x_2, x_12); lean_dec(x_12); if (x_13 == 0) { x_4 = x_8; goto _start; } else { uint8_t x_15; lean_dec(x_8); x_15 = 1; return x_15; } } else { uint8_t x_16; lean_dec(x_4); x_16 = 0; return x_16; } } } uint8_t l_Nat_anyAux___at_Lean_IR_EmitC_overwriteParam___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; uint8_t x_7; x_6 = lean_unsigned_to_nat(0u); x_7 = lean_nat_dec_eq(x_5, x_6); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; x_8 = lean_unsigned_to_nat(1u); x_9 = lean_nat_sub(x_5, x_8); lean_dec(x_5); x_10 = lean_nat_add(x_9, x_8); x_11 = lean_nat_sub(x_4, x_10); lean_dec(x_10); x_12 = l_Lean_IR_instInhabitedParam; x_13 = lean_array_get(x_12, x_1, x_11); x_14 = lean_nat_add(x_11, x_8); lean_dec(x_11); x_15 = lean_nat_sub(x_3, x_14); lean_dec(x_14); x_16 = l_Nat_anyAux___at_Lean_IR_EmitC_overwriteParam___spec__1(x_2, x_13, x_3, x_15); lean_dec(x_13); if (x_16 == 0) { x_5 = x_9; goto _start; } else { uint8_t x_18; lean_dec(x_9); x_18 = 1; return x_18; } } else { uint8_t x_19; lean_dec(x_5); x_19 = 0; return x_19; } } } uint8_t l_Lean_IR_EmitC_overwriteParam(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; uint8_t x_4; x_3 = lean_array_get_size(x_1); lean_inc(x_3); x_4 = l_Nat_anyAux___at_Lean_IR_EmitC_overwriteParam___spec__2(x_1, x_2, x_3, x_3, x_3); lean_dec(x_3); return x_4; } } lean_object* l_Nat_anyAux___at_Lean_IR_EmitC_overwriteParam___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { uint8_t x_5; lean_object* x_6; x_5 = l_Nat_anyAux___at_Lean_IR_EmitC_overwriteParam___spec__1(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_6 = lean_box(x_5); return x_6; } } lean_object* l_Nat_anyAux___at_Lean_IR_EmitC_overwriteParam___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { uint8_t x_6; lean_object* x_7; x_6 = l_Nat_anyAux___at_Lean_IR_EmitC_overwriteParam___spec__2(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_7 = lean_box(x_6); return x_7; } } lean_object* l_Lean_IR_EmitC_overwriteParam___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; x_3 = l_Lean_IR_EmitC_overwriteParam(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } lean_object* l_Lean_IR_EmitC_emitTailCall_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_1) == 6) { 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_Lean_IR_EmitC_emitTailCall_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitTailCall_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; uint8_t x_8; x_7 = lean_unsigned_to_nat(0u); x_8 = lean_nat_dec_eq(x_4, x_7); if (x_8 == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; x_9 = lean_unsigned_to_nat(1u); x_10 = lean_nat_sub(x_4, x_9); lean_dec(x_4); x_11 = lean_nat_sub(x_3, x_10); x_12 = lean_nat_sub(x_11, x_9); lean_dec(x_11); x_13 = l_Lean_IR_instInhabitedParam; x_14 = lean_array_get(x_13, x_2, x_12); x_15 = l_Lean_IR_instInhabitedArg; x_16 = lean_array_get(x_15, x_1, x_12); lean_dec(x_12); x_17 = l_Lean_IR_EmitC_paramEqArg(x_14, x_16); if (x_17 == 0) { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; x_18 = lean_ctor_get(x_14, 0); lean_inc(x_18); lean_dec(x_14); x_19 = l_Nat_repr(x_18); x_20 = l_Lean_IR_instToStringVarId___closed__1; x_21 = lean_string_append(x_20, x_19); lean_dec(x_19); x_22 = lean_string_append(x_6, x_21); lean_dec(x_21); x_23 = l_term___x3d_____closed__3; x_24 = lean_string_append(x_22, x_23); x_25 = l_Lean_IR_EmitC_emitArg(x_16, x_5, x_24); x_26 = lean_ctor_get(x_25, 1); lean_inc(x_26); lean_dec(x_25); x_27 = l_myMacro____x40_Init_Notation___hyg_16821____closed__12; x_28 = lean_string_append(x_26, x_27); x_29 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_30 = lean_string_append(x_28, x_29); x_4 = x_10; x_6 = x_30; goto _start; } else { lean_dec(x_16); lean_dec(x_14); x_4 = x_10; goto _start; } } else { lean_object* x_33; lean_object* x_34; lean_dec(x_4); x_33 = lean_box(0); x_34 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_34, 0, x_33); lean_ctor_set(x_34, 1, x_6); return x_34; } } } static lean_object* _init_l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__2___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string(" _tmp_"); return x_1; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__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; uint8_t x_8; x_7 = lean_unsigned_to_nat(0u); x_8 = lean_nat_dec_eq(x_4, x_7); if (x_8 == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; x_9 = lean_unsigned_to_nat(1u); x_10 = lean_nat_sub(x_4, x_9); lean_dec(x_4); x_11 = lean_nat_sub(x_3, x_10); x_12 = lean_nat_sub(x_11, x_9); lean_dec(x_11); x_13 = l_Lean_IR_instInhabitedParam; x_14 = lean_array_get(x_13, x_2, x_12); x_15 = l_Lean_IR_instInhabitedArg; x_16 = lean_array_get(x_15, x_1, x_12); x_17 = l_Lean_IR_EmitC_paramEqArg(x_14, x_16); if (x_17 == 0) { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; x_18 = lean_ctor_get(x_14, 1); lean_inc(x_18); lean_dec(x_14); x_19 = l_Lean_IR_EmitC_toCType(x_18); lean_dec(x_18); x_20 = lean_string_append(x_6, x_19); lean_dec(x_19); x_21 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__2___closed__1; x_22 = lean_string_append(x_20, x_21); x_23 = l_Nat_repr(x_12); x_24 = lean_string_append(x_22, x_23); lean_dec(x_23); x_25 = l_term___x3d_____closed__3; x_26 = lean_string_append(x_24, x_25); x_27 = l_Lean_IR_EmitC_emitArg(x_16, x_5, x_26); x_28 = lean_ctor_get(x_27, 1); lean_inc(x_28); lean_dec(x_27); x_29 = l_myMacro____x40_Init_Notation___hyg_16821____closed__12; x_30 = lean_string_append(x_28, x_29); x_31 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_32 = lean_string_append(x_30, x_31); x_4 = x_10; x_6 = x_32; goto _start; } else { lean_dec(x_16); lean_dec(x_14); lean_dec(x_12); x_4 = x_10; goto _start; } } else { lean_object* x_35; lean_object* x_36; lean_dec(x_4); 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_6); return x_36; } } } static lean_object* _init_l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__3___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string(" = _tmp_"); return x_1; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; uint8_t x_8; x_7 = lean_unsigned_to_nat(0u); x_8 = lean_nat_dec_eq(x_4, x_7); if (x_8 == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; x_9 = lean_unsigned_to_nat(1u); x_10 = lean_nat_sub(x_4, x_9); lean_dec(x_4); x_11 = lean_nat_sub(x_3, x_10); x_12 = lean_nat_sub(x_11, x_9); lean_dec(x_11); x_13 = l_Lean_IR_instInhabitedParam; x_14 = lean_array_get(x_13, x_2, x_12); x_15 = l_Lean_IR_instInhabitedArg; x_16 = lean_array_get(x_15, x_1, x_12); x_17 = l_Lean_IR_EmitC_paramEqArg(x_14, x_16); lean_dec(x_16); if (x_17 == 0) { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; x_18 = lean_ctor_get(x_14, 0); lean_inc(x_18); lean_dec(x_14); x_19 = l_Nat_repr(x_18); x_20 = l_Lean_IR_instToStringVarId___closed__1; x_21 = lean_string_append(x_20, x_19); lean_dec(x_19); x_22 = lean_string_append(x_6, x_21); lean_dec(x_21); x_23 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__3___closed__1; x_24 = lean_string_append(x_22, x_23); x_25 = l_Nat_repr(x_12); x_26 = lean_string_append(x_24, x_25); lean_dec(x_25); x_27 = l_myMacro____x40_Init_Notation___hyg_16821____closed__12; x_28 = lean_string_append(x_26, x_27); x_29 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_30 = lean_string_append(x_28, x_29); x_4 = x_10; x_6 = x_30; goto _start; } else { lean_dec(x_14); lean_dec(x_12); x_4 = x_10; goto _start; } } else { lean_object* x_33; lean_object* x_34; lean_dec(x_4); x_33 = lean_box(0); x_34 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_34, 0, x_33); lean_ctor_set(x_34, 1, x_6); return x_34; } } } static lean_object* _init_l_Lean_IR_EmitC_emitTailCall___lambda__1___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("goto _start;"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitTailCall___lambda__1(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 = l_Lean_IR_EmitC_emitTailCall___lambda__1___closed__1; x_5 = lean_string_append(x_3, x_4); x_6 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_7 = lean_string_append(x_5, x_6); 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; } } static lean_object* _init_l_Lean_IR_EmitC_emitTailCall___lambda__2___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitTailCall___lambda__1___boxed), 3, 0); return x_1; } } lean_object* l_Lean_IR_EmitC_emitTailCall___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; uint8_t x_7; x_6 = l_Lean_IR_EmitC_emitTailCall___lambda__2___closed__1; x_7 = l_Lean_IR_EmitC_overwriteParam(x_1, x_2); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; x_8 = lean_array_get_size(x_2); lean_inc(x_8); x_9 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__1(x_2, x_1, x_8, x_8, x_4, x_5); lean_dec(x_8); 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_apply_3(x_6, x_10, x_4, x_11); return x_12; } else { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; x_13 = l_term_x7b_x7d___closed__3; x_14 = lean_string_append(x_5, x_13); x_15 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_16 = lean_string_append(x_14, x_15); x_17 = lean_array_get_size(x_1); lean_inc(x_17); x_18 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__2(x_2, x_1, x_17, x_17, x_4, x_16); x_19 = lean_ctor_get(x_18, 1); lean_inc(x_19); lean_dec(x_18); lean_inc(x_17); x_20 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__3(x_2, x_1, x_17, x_17, x_4, x_19); lean_dec(x_17); x_21 = lean_ctor_get(x_20, 1); lean_inc(x_21); lean_dec(x_20); x_22 = l_term_x7b_x7d___closed__5; x_23 = lean_string_append(x_21, x_22); x_24 = lean_string_append(x_23, x_15); x_25 = lean_box(0); x_26 = lean_apply_3(x_6, x_25, x_4, x_24); return x_26; } } } static lean_object* _init_l_Lean_IR_EmitC_emitTailCall___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("bug at emitTailCall"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitTailCall___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("invalid tail call"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitTailCall(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_1) == 6) { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; x_4 = lean_ctor_get(x_1, 1); x_5 = lean_ctor_get(x_2, 4); lean_inc(x_5); x_6 = lean_array_get_size(x_5); x_7 = lean_array_get_size(x_4); x_8 = lean_nat_dec_eq(x_6, x_7); lean_dec(x_7); lean_dec(x_6); if (x_8 == 0) { lean_object* x_9; lean_object* x_10; lean_dec(x_5); lean_dec(x_2); x_9 = l_Lean_IR_EmitC_emitTailCall___closed__2; x_10 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_10, 1, x_3); return x_10; } else { lean_object* x_11; lean_object* x_12; x_11 = lean_box(0); x_12 = l_Lean_IR_EmitC_emitTailCall___lambda__2(x_5, x_4, x_11, x_2, x_3); lean_dec(x_5); return x_12; } } else { lean_object* x_13; lean_object* x_14; lean_dec(x_2); x_13 = l_Lean_IR_EmitC_emitTailCall___closed__1; x_14 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_3); return x_14; } } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___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: { lean_object* x_7; x_7 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_7; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___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) { _start: { lean_object* x_7; x_7 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__2(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_7; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__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) { _start: { lean_object* x_7; x_7 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__3(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_7; } } lean_object* l_Lean_IR_EmitC_emitTailCall___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_emitTailCall___lambda__1(x_1, x_2, x_3); lean_dec(x_2); lean_dec(x_1); return x_4; } } lean_object* l_Lean_IR_EmitC_emitTailCall___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_emitTailCall___lambda__2(x_1, x_2, x_3, x_4, x_5); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_6; } } lean_object* l_Lean_IR_EmitC_emitTailCall___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_emitTailCall(x_1, x_2, x_3); lean_dec(x_1); return x_4; } } lean_object* l_Lean_IR_EmitC_emitCase_match__1___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_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_object* x_8; lean_dec(x_2); x_7 = lean_ctor_get(x_1, 0); lean_inc(x_7); lean_dec(x_1); x_8 = lean_apply_1(x_3, x_7); return x_8; } } } lean_object* l_Lean_IR_EmitC_emitCase_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitCase_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_IR_EmitC_emitCase_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_dec(x_2); x_4 = lean_apply_1(x_3, x_1); return x_4; } else { 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_dec(x_3); x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); lean_dec(x_1); x_6 = lean_ctor_get(x_5, 1); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 0); lean_inc(x_7); lean_dec(x_5); x_8 = lean_ctor_get(x_6, 0); lean_inc(x_8); x_9 = lean_ctor_get(x_6, 1); lean_inc(x_9); lean_dec(x_6); x_10 = lean_apply_3(x_2, x_7, x_8, x_9); return x_10; } } } lean_object* l_Lean_IR_EmitC_emitCase_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitCase_match__2___rarg), 3, 0); return x_2; } } lean_object* l_Lean_IR_EmitC_emitBlock_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, 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) { _start: { switch (lean_obj_tag(x_1)) { case 0: { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); x_16 = lean_ctor_get(x_1, 0); lean_inc(x_16); x_17 = lean_ctor_get(x_1, 1); lean_inc(x_17); x_18 = lean_ctor_get(x_1, 2); lean_inc(x_18); x_19 = lean_ctor_get(x_1, 3); lean_inc(x_19); x_20 = lean_apply_5(x_3, x_1, x_16, x_17, x_18, x_19); return x_20; } case 1: { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_21 = lean_ctor_get(x_1, 0); lean_inc(x_21); x_22 = lean_ctor_get(x_1, 1); lean_inc(x_22); x_23 = lean_ctor_get(x_1, 2); lean_inc(x_23); x_24 = lean_ctor_get(x_1, 3); lean_inc(x_24); lean_dec(x_1); x_25 = lean_apply_4(x_2, x_21, x_22, x_23, x_24); return x_25; } case 2: { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_26 = lean_ctor_get(x_1, 0); lean_inc(x_26); x_27 = lean_ctor_get(x_1, 1); lean_inc(x_27); x_28 = lean_ctor_get(x_1, 2); lean_inc(x_28); x_29 = lean_ctor_get(x_1, 3); lean_inc(x_29); lean_dec(x_1); x_30 = lean_apply_4(x_8, x_26, x_27, x_28, x_29); return x_30; } case 3: { lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_31 = lean_ctor_get(x_1, 0); lean_inc(x_31); x_32 = lean_ctor_get(x_1, 1); lean_inc(x_32); x_33 = lean_ctor_get(x_1, 2); lean_inc(x_33); lean_dec(x_1); x_34 = lean_apply_3(x_7, x_31, x_32, x_33); return x_34; } case 4: { lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_35 = lean_ctor_get(x_1, 0); lean_inc(x_35); x_36 = lean_ctor_get(x_1, 1); lean_inc(x_36); x_37 = lean_ctor_get(x_1, 2); lean_inc(x_37); x_38 = lean_ctor_get(x_1, 3); lean_inc(x_38); lean_dec(x_1); x_39 = lean_apply_4(x_9, x_35, x_36, x_37, x_38); return x_39; } case 5: { lean_object* x_40; 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_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_40 = lean_ctor_get(x_1, 0); lean_inc(x_40); x_41 = lean_ctor_get(x_1, 1); lean_inc(x_41); x_42 = lean_ctor_get(x_1, 2); lean_inc(x_42); x_43 = lean_ctor_get(x_1, 3); lean_inc(x_43); x_44 = lean_ctor_get(x_1, 4); lean_inc(x_44); x_45 = lean_ctor_get(x_1, 5); lean_inc(x_45); lean_dec(x_1); x_46 = lean_apply_6(x_10, x_40, x_41, x_42, x_43, x_44, x_45); return x_46; } case 6: { lean_object* x_47; lean_object* x_48; uint8_t x_49; uint8_t x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); x_47 = lean_ctor_get(x_1, 0); lean_inc(x_47); x_48 = lean_ctor_get(x_1, 1); lean_inc(x_48); x_49 = lean_ctor_get_uint8(x_1, sizeof(void*)*3); x_50 = lean_ctor_get_uint8(x_1, sizeof(void*)*3 + 1); x_51 = lean_ctor_get(x_1, 2); lean_inc(x_51); lean_dec(x_1); x_52 = lean_box(x_49); x_53 = lean_box(x_50); x_54 = lean_apply_5(x_4, x_47, x_48, x_52, x_53, x_51); return x_54; } case 7: { lean_object* x_55; lean_object* x_56; uint8_t x_57; uint8_t x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_55 = lean_ctor_get(x_1, 0); lean_inc(x_55); x_56 = lean_ctor_get(x_1, 1); lean_inc(x_56); x_57 = lean_ctor_get_uint8(x_1, sizeof(void*)*3); x_58 = lean_ctor_get_uint8(x_1, sizeof(void*)*3 + 1); x_59 = lean_ctor_get(x_1, 2); lean_inc(x_59); lean_dec(x_1); x_60 = lean_box(x_57); x_61 = lean_box(x_58); x_62 = lean_apply_5(x_5, x_55, x_56, x_60, x_61, x_59); return x_62; } case 8: { lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_63 = lean_ctor_get(x_1, 0); lean_inc(x_63); x_64 = lean_ctor_get(x_1, 1); lean_inc(x_64); lean_dec(x_1); x_65 = lean_apply_2(x_6, x_63, x_64); return x_65; } case 9: { lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); 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_4); lean_dec(x_3); lean_dec(x_2); x_66 = lean_ctor_get(x_1, 0); lean_inc(x_66); x_67 = lean_ctor_get(x_1, 1); lean_inc(x_67); lean_dec(x_1); x_68 = lean_apply_2(x_11, x_66, x_67); return x_68; } case 10: { lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_dec(x_15); lean_dec(x_14); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_69 = lean_ctor_get(x_1, 0); lean_inc(x_69); x_70 = lean_ctor_get(x_1, 1); lean_inc(x_70); x_71 = lean_ctor_get(x_1, 2); lean_inc(x_71); x_72 = lean_ctor_get(x_1, 3); lean_inc(x_72); lean_dec(x_1); x_73 = lean_apply_4(x_13, x_69, x_70, x_71, x_72); return x_73; } case 11: { lean_object* x_74; lean_object* x_75; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_74 = lean_ctor_get(x_1, 0); lean_inc(x_74); lean_dec(x_1); x_75 = lean_apply_1(x_12, x_74); return x_75; } case 12: { lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_dec(x_15); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_76 = lean_ctor_get(x_1, 0); lean_inc(x_76); x_77 = lean_ctor_get(x_1, 1); lean_inc(x_77); lean_dec(x_1); x_78 = lean_apply_2(x_14, x_76, x_77); return x_78; } default: { lean_object* x_79; lean_object* x_80; lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_79 = lean_box(0); x_80 = lean_apply_1(x_15, x_79); return x_80; } } } } lean_object* l_Lean_IR_EmitC_emitBlock_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitBlock_match__1___rarg), 15, 0); return x_2; } } lean_object* l_Lean_IR_EmitC_emitJPs_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_object* x_7; lean_object* x_8; 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); x_6 = lean_ctor_get(x_1, 2); lean_inc(x_6); x_7 = lean_ctor_get(x_1, 3); lean_inc(x_7); lean_dec(x_1); x_8 = lean_apply_4(x_2, x_4, x_5, x_6, x_7); return x_8; } else { lean_object* x_9; lean_dec(x_2); x_9 = lean_apply_1(x_3, x_1); return x_9; } } } lean_object* l_Lean_IR_EmitC_emitJPs_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitJPs_match__1___rarg), 3, 0); return x_2; } } static lean_object* _init_l_Lean_IR_EmitC_emitIf___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("if ("); return x_1; } } lean_object* l_Lean_IR_EmitC_emitIf(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; x_8 = l_Lean_IR_EmitC_emitIf___closed__1; x_9 = lean_string_append(x_7, x_8); x_10 = l_Lean_IR_EmitC_emitTag(x_1, x_2, x_6, x_9); x_11 = lean_ctor_get(x_10, 1); lean_inc(x_11); lean_dec(x_10); x_12 = l_term___x3d_x3d_____closed__3; x_13 = lean_string_append(x_11, x_12); x_14 = l_Nat_repr(x_3); x_15 = lean_string_append(x_13, x_14); lean_dec(x_14); x_16 = l_prec_x28___x29___closed__7; x_17 = lean_string_append(x_15, x_16); x_18 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_19 = lean_string_append(x_17, x_18); lean_inc(x_6); x_20 = l_Lean_IR_EmitC_emitFnBody(x_4, x_6, x_19); if (lean_obj_tag(x_20) == 0) { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_21 = lean_ctor_get(x_20, 1); lean_inc(x_21); lean_dec(x_20); x_22 = l_termDepIfThenElse___closed__24; x_23 = lean_string_append(x_21, x_22); x_24 = lean_string_append(x_23, x_18); x_25 = l_Lean_IR_EmitC_emitFnBody(x_5, x_6, x_24); return x_25; } else { uint8_t x_26; lean_dec(x_6); lean_dec(x_5); x_26 = !lean_is_exclusive(x_20); if (x_26 == 0) { return x_20; } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; x_27 = lean_ctor_get(x_20, 0); x_28 = lean_ctor_get(x_20, 1); lean_inc(x_28); lean_inc(x_27); lean_dec(x_20); x_29 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_29, 0, x_27); lean_ctor_set(x_29, 1, x_28); return x_29; } } } } lean_object* l_Lean_IR_EmitC_emitFnBody___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_inc(x_3); lean_inc(x_1); x_5 = l_Lean_IR_EmitC_emitBlock(x_1, x_3, x_4); if (lean_obj_tag(x_5) == 0) { lean_object* x_6; lean_object* x_7; x_6 = lean_ctor_get(x_5, 1); lean_inc(x_6); lean_dec(x_5); x_7 = l_Lean_IR_EmitC_emitJPs(x_1, x_3, x_6); if (lean_obj_tag(x_7) == 0) { uint8_t x_8; x_8 = !lean_is_exclusive(x_7); if (x_8 == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_9 = lean_ctor_get(x_7, 1); x_10 = lean_ctor_get(x_7, 0); lean_dec(x_10); x_11 = l_term_x7b_x7d___closed__5; x_12 = lean_string_append(x_9, x_11); x_13 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_14 = lean_string_append(x_12, x_13); x_15 = lean_box(0); lean_ctor_set(x_7, 1, x_14); lean_ctor_set(x_7, 0, x_15); return x_7; } 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; lean_object* x_22; x_16 = lean_ctor_get(x_7, 1); lean_inc(x_16); lean_dec(x_7); x_17 = l_term_x7b_x7d___closed__5; x_18 = lean_string_append(x_16, x_17); x_19 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_20 = lean_string_append(x_18, x_19); x_21 = lean_box(0); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_21); lean_ctor_set(x_22, 1, x_20); return x_22; } } else { uint8_t x_23; x_23 = !lean_is_exclusive(x_7); if (x_23 == 0) { return x_7; } else { lean_object* x_24; lean_object* x_25; lean_object* x_26; x_24 = lean_ctor_get(x_7, 0); x_25 = lean_ctor_get(x_7, 1); lean_inc(x_25); lean_inc(x_24); lean_dec(x_7); x_26 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_26, 0, x_24); lean_ctor_set(x_26, 1, x_25); return x_26; } } } else { uint8_t x_27; lean_dec(x_3); lean_dec(x_1); x_27 = !lean_is_exclusive(x_5); if (x_27 == 0) { return x_5; } else { lean_object* x_28; lean_object* x_29; lean_object* x_30; x_28 = lean_ctor_get(x_5, 0); x_29 = lean_ctor_get(x_5, 1); lean_inc(x_29); lean_inc(x_28); lean_dec(x_5); x_30 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_30, 0, x_28); lean_ctor_set(x_30, 1, x_29); return x_30; } } } } lean_object* l_Lean_IR_EmitC_emitFnBody(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; uint8_t x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; x_4 = l_term_x7b_x7d___closed__3; x_5 = lean_string_append(x_3, x_4); x_6 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_7 = lean_string_append(x_5, x_6); x_8 = 0; lean_inc(x_1); x_9 = l_Lean_IR_EmitC_declareVars(x_1, x_8, x_2, x_7); x_10 = lean_ctor_get(x_9, 0); lean_inc(x_10); x_11 = lean_unbox(x_10); lean_dec(x_10); if (x_11 == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; x_12 = lean_ctor_get(x_9, 1); lean_inc(x_12); lean_dec(x_9); x_13 = lean_box(0); x_14 = l_Lean_IR_EmitC_emitFnBody___lambda__1(x_1, x_13, x_2, 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; x_15 = lean_ctor_get(x_9, 1); lean_inc(x_15); lean_dec(x_9); x_16 = l_Lean_instInhabitedParserDescr___closed__1; x_17 = lean_string_append(x_15, x_16); x_18 = lean_string_append(x_17, x_6); x_19 = lean_box(0); x_20 = l_Lean_IR_EmitC_emitFnBody___lambda__1(x_1, x_19, x_2, x_18); return x_20; } } } lean_object* l_Lean_IR_EmitC_emitJPs(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_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; x_4 = lean_ctor_get(x_1, 0); lean_inc(x_4); x_5 = lean_ctor_get(x_1, 2); lean_inc(x_5); x_6 = lean_ctor_get(x_1, 3); lean_inc(x_6); lean_dec(x_1); x_7 = l_Nat_repr(x_4); x_8 = l_Lean_IR_instToStringJoinPointId___closed__1; x_9 = lean_string_append(x_8, x_7); lean_dec(x_7); x_10 = lean_string_append(x_3, x_9); lean_dec(x_9); x_11 = l_myMacro____x40_Init_Notation___hyg_16268____closed__9; x_12 = lean_string_append(x_10, x_11); x_13 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_14 = lean_string_append(x_12, x_13); lean_inc(x_2); x_15 = l_Lean_IR_EmitC_emitFnBody(x_5, x_2, x_14); if (lean_obj_tag(x_15) == 0) { lean_object* x_16; x_16 = lean_ctor_get(x_15, 1); lean_inc(x_16); lean_dec(x_15); x_1 = x_6; x_3 = x_16; goto _start; } else { uint8_t x_18; lean_dec(x_6); lean_dec(x_2); x_18 = !lean_is_exclusive(x_15); if (x_18 == 0) { return x_15; } else { lean_object* x_19; lean_object* x_20; lean_object* x_21; x_19 = lean_ctor_get(x_15, 0); x_20 = lean_ctor_get(x_15, 1); lean_inc(x_20); lean_inc(x_19); lean_dec(x_15); x_21 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_21, 0, x_19); lean_ctor_set(x_21, 1, x_20); return x_21; } } } else { uint8_t x_22; x_22 = l_Lean_IR_FnBody_isTerminal(x_1); if (x_22 == 0) { lean_object* x_23; x_23 = l_Lean_IR_FnBody_body(x_1); lean_dec(x_1); x_1 = x_23; goto _start; } else { lean_object* x_25; lean_object* x_26; lean_dec(x_2); lean_dec(x_1); x_25 = lean_box(0); x_26 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_3); return x_26; } } } } lean_object* l_Lean_IR_EmitC_emitBlock___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitBlock(x_1, x_3, x_4); return x_5; } } static lean_object* _init_l_Lean_IR_EmitC_emitBlock___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("return "); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitBlock___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_internal_panic_unreachable();"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitBlock(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { switch (lean_obj_tag(x_1)) { case 0: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; x_4 = lean_ctor_get(x_1, 0); lean_inc(x_4); x_5 = lean_ctor_get(x_1, 1); lean_inc(x_5); x_6 = lean_ctor_get(x_1, 2); lean_inc(x_6); x_7 = lean_ctor_get(x_1, 3); lean_inc(x_7); x_8 = lean_ctor_get(x_2, 3); lean_inc(x_8); x_9 = l_Lean_IR_isTailCallTo(x_8, x_1); lean_dec(x_1); lean_dec(x_8); if (x_9 == 0) { lean_object* x_10; lean_inc(x_2); x_10 = l_Lean_IR_EmitC_emitVDecl(x_4, x_5, x_6, x_2, x_3); lean_dec(x_5); if (lean_obj_tag(x_10) == 0) { lean_object* x_11; x_11 = lean_ctor_get(x_10, 1); lean_inc(x_11); lean_dec(x_10); x_1 = x_7; x_3 = x_11; goto _start; } else { uint8_t x_13; lean_dec(x_7); lean_dec(x_2); x_13 = !lean_is_exclusive(x_10); if (x_13 == 0) { return x_10; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; x_14 = lean_ctor_get(x_10, 0); x_15 = lean_ctor_get(x_10, 1); lean_inc(x_15); lean_inc(x_14); lean_dec(x_10); x_16 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_16, 0, x_14); lean_ctor_set(x_16, 1, x_15); return x_16; } } } else { lean_object* x_17; lean_dec(x_7); lean_dec(x_5); lean_dec(x_4); x_17 = l_Lean_IR_EmitC_emitTailCall(x_6, x_2, x_3); lean_dec(x_6); return x_17; } } case 1: { lean_object* x_18; x_18 = lean_ctor_get(x_1, 3); lean_inc(x_18); lean_dec(x_1); x_1 = x_18; goto _start; } case 2: { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_20 = lean_ctor_get(x_1, 0); lean_inc(x_20); x_21 = lean_ctor_get(x_1, 1); lean_inc(x_21); x_22 = lean_ctor_get(x_1, 2); lean_inc(x_22); x_23 = lean_ctor_get(x_1, 3); lean_inc(x_23); lean_dec(x_1); x_24 = l_Lean_IR_EmitC_emitSet(x_20, x_21, x_22, x_2, x_3); x_25 = lean_ctor_get(x_24, 1); lean_inc(x_25); lean_dec(x_24); x_1 = x_23; x_3 = x_25; goto _start; } case 3: { lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; x_27 = lean_ctor_get(x_1, 0); lean_inc(x_27); x_28 = lean_ctor_get(x_1, 1); lean_inc(x_28); x_29 = lean_ctor_get(x_1, 2); lean_inc(x_29); lean_dec(x_1); x_30 = l_Lean_IR_EmitC_emitSetTag(x_27, x_28, x_2, x_3); x_31 = lean_ctor_get(x_30, 1); lean_inc(x_31); lean_dec(x_30); x_1 = x_29; x_3 = x_31; goto _start; } case 4: { lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; x_33 = lean_ctor_get(x_1, 0); lean_inc(x_33); x_34 = lean_ctor_get(x_1, 1); lean_inc(x_34); x_35 = lean_ctor_get(x_1, 2); lean_inc(x_35); x_36 = lean_ctor_get(x_1, 3); lean_inc(x_36); lean_dec(x_1); x_37 = l_Lean_IR_EmitC_emitUSet(x_33, x_34, x_35, x_2, x_3); x_38 = lean_ctor_get(x_37, 1); lean_inc(x_38); lean_dec(x_37); x_1 = x_36; x_3 = x_38; goto _start; } case 5: { lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; x_40 = lean_ctor_get(x_1, 0); lean_inc(x_40); x_41 = lean_ctor_get(x_1, 1); lean_inc(x_41); x_42 = lean_ctor_get(x_1, 2); lean_inc(x_42); x_43 = lean_ctor_get(x_1, 3); lean_inc(x_43); x_44 = lean_ctor_get(x_1, 4); lean_inc(x_44); x_45 = lean_ctor_get(x_1, 5); lean_inc(x_45); lean_dec(x_1); x_46 = l_Lean_IR_EmitC_emitSSet(x_40, x_41, x_42, x_43, x_44, x_2, x_3); lean_dec(x_44); if (lean_obj_tag(x_46) == 0) { lean_object* x_47; x_47 = lean_ctor_get(x_46, 1); lean_inc(x_47); lean_dec(x_46); x_1 = x_45; x_3 = x_47; goto _start; } else { uint8_t x_49; lean_dec(x_45); lean_dec(x_2); x_49 = !lean_is_exclusive(x_46); if (x_49 == 0) { return x_46; } else { lean_object* x_50; lean_object* x_51; lean_object* x_52; x_50 = lean_ctor_get(x_46, 0); x_51 = lean_ctor_get(x_46, 1); lean_inc(x_51); lean_inc(x_50); lean_dec(x_46); x_52 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_52, 0, x_50); lean_ctor_set(x_52, 1, x_51); return x_52; } } } case 6: { uint8_t x_53; x_53 = lean_ctor_get_uint8(x_1, sizeof(void*)*3 + 1); if (x_53 == 0) { lean_object* x_54; lean_object* x_55; uint8_t x_56; lean_object* x_57; lean_object* x_58; x_54 = lean_ctor_get(x_1, 0); lean_inc(x_54); x_55 = lean_ctor_get(x_1, 1); lean_inc(x_55); x_56 = lean_ctor_get_uint8(x_1, sizeof(void*)*3); x_57 = lean_ctor_get(x_1, 2); lean_inc(x_57); lean_dec(x_1); lean_inc(x_2); x_58 = l_Lean_IR_EmitC_emitInc(x_54, x_55, x_56, x_2, x_3); if (lean_obj_tag(x_58) == 0) { lean_object* x_59; x_59 = lean_ctor_get(x_58, 1); lean_inc(x_59); lean_dec(x_58); x_1 = x_57; x_3 = x_59; goto _start; } else { uint8_t x_61; lean_dec(x_57); lean_dec(x_2); x_61 = !lean_is_exclusive(x_58); if (x_61 == 0) { return x_58; } else { lean_object* x_62; lean_object* x_63; lean_object* x_64; x_62 = lean_ctor_get(x_58, 0); x_63 = lean_ctor_get(x_58, 1); lean_inc(x_63); lean_inc(x_62); lean_dec(x_58); x_64 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_64, 0, x_62); lean_ctor_set(x_64, 1, x_63); return x_64; } } } else { lean_object* x_65; x_65 = lean_ctor_get(x_1, 2); lean_inc(x_65); lean_dec(x_1); x_1 = x_65; goto _start; } } case 7: { uint8_t x_67; x_67 = lean_ctor_get_uint8(x_1, sizeof(void*)*3 + 1); if (x_67 == 0) { lean_object* x_68; lean_object* x_69; uint8_t x_70; lean_object* x_71; lean_object* x_72; x_68 = lean_ctor_get(x_1, 0); lean_inc(x_68); x_69 = lean_ctor_get(x_1, 1); lean_inc(x_69); x_70 = lean_ctor_get_uint8(x_1, sizeof(void*)*3); x_71 = lean_ctor_get(x_1, 2); lean_inc(x_71); lean_dec(x_1); lean_inc(x_2); x_72 = l_Lean_IR_EmitC_emitDec(x_68, x_69, x_70, x_2, x_3); if (lean_obj_tag(x_72) == 0) { lean_object* x_73; x_73 = lean_ctor_get(x_72, 1); lean_inc(x_73); lean_dec(x_72); x_1 = x_71; x_3 = x_73; goto _start; } else { uint8_t x_75; lean_dec(x_71); lean_dec(x_2); x_75 = !lean_is_exclusive(x_72); if (x_75 == 0) { return x_72; } else { lean_object* x_76; lean_object* x_77; lean_object* x_78; x_76 = lean_ctor_get(x_72, 0); x_77 = lean_ctor_get(x_72, 1); lean_inc(x_77); lean_inc(x_76); lean_dec(x_72); x_78 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_78, 0, x_76); lean_ctor_set(x_78, 1, x_77); return x_78; } } } else { lean_object* x_79; x_79 = lean_ctor_get(x_1, 2); lean_inc(x_79); lean_dec(x_1); x_1 = x_79; goto _start; } } case 8: { lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; x_81 = lean_ctor_get(x_1, 0); lean_inc(x_81); x_82 = lean_ctor_get(x_1, 1); lean_inc(x_82); lean_dec(x_1); x_83 = l_Lean_IR_EmitC_emitDel(x_81, x_2, x_3); x_84 = lean_ctor_get(x_83, 1); lean_inc(x_84); lean_dec(x_83); x_1 = x_82; x_3 = x_84; goto _start; } case 9: { lean_object* x_86; x_86 = lean_ctor_get(x_1, 1); lean_inc(x_86); lean_dec(x_1); x_1 = x_86; goto _start; } case 10: { lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; x_88 = lean_ctor_get(x_1, 1); lean_inc(x_88); x_89 = lean_ctor_get(x_1, 2); lean_inc(x_89); x_90 = lean_ctor_get(x_1, 3); lean_inc(x_90); lean_dec(x_1); x_91 = l_Lean_IR_EmitC_emitCase(x_88, x_89, x_90, x_2, x_3); lean_dec(x_89); return x_91; } case 11: { lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; uint8_t x_96; x_92 = lean_ctor_get(x_1, 0); lean_inc(x_92); lean_dec(x_1); x_93 = l_Lean_IR_EmitC_emitBlock___closed__1; x_94 = lean_string_append(x_3, x_93); x_95 = l_Lean_IR_EmitC_emitArg(x_92, x_2, x_94); lean_dec(x_2); x_96 = !lean_is_exclusive(x_95); if (x_96 == 0) { 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; x_97 = lean_ctor_get(x_95, 1); x_98 = lean_ctor_get(x_95, 0); lean_dec(x_98); x_99 = l_myMacro____x40_Init_Notation___hyg_16821____closed__12; x_100 = lean_string_append(x_97, x_99); x_101 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_102 = lean_string_append(x_100, x_101); x_103 = lean_box(0); lean_ctor_set(x_95, 1, x_102); lean_ctor_set(x_95, 0, x_103); return x_95; } else { lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; x_104 = lean_ctor_get(x_95, 1); lean_inc(x_104); lean_dec(x_95); x_105 = l_myMacro____x40_Init_Notation___hyg_16821____closed__12; x_106 = lean_string_append(x_104, x_105); x_107 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_108 = lean_string_append(x_106, x_107); x_109 = lean_box(0); x_110 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_110, 0, x_109); lean_ctor_set(x_110, 1, x_108); return x_110; } } case 12: { lean_object* x_111; lean_object* x_112; lean_object* x_113; x_111 = lean_ctor_get(x_1, 0); lean_inc(x_111); x_112 = lean_ctor_get(x_1, 1); lean_inc(x_112); lean_dec(x_1); x_113 = l_Lean_IR_EmitC_emitJmp(x_111, x_112, x_2, x_3); lean_dec(x_2); lean_dec(x_112); return x_113; } default: { lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_dec(x_2); x_114 = l_Lean_IR_EmitC_emitBlock___closed__2; x_115 = lean_string_append(x_3, x_114); x_116 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_117 = lean_string_append(x_115, x_116); x_118 = lean_box(0); x_119 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_119, 0, x_118); lean_ctor_set(x_119, 1, x_117); return x_119; } } } } static lean_object* _init_l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitCase___spec__1___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("default: "); return x_1; } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitCase___spec__1(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { uint8_t x_7; x_7 = x_2 == x_3; if (x_7 == 0) { lean_object* x_8; lean_dec(x_4); x_8 = lean_array_uget(x_1, x_2); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; x_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 = l_Lean_Parser_Tactic_case___closed__3; x_12 = lean_string_append(x_6, x_11); x_13 = lean_ctor_get(x_9, 1); lean_inc(x_13); lean_dec(x_9); x_14 = l_Nat_repr(x_13); x_15 = lean_string_append(x_12, x_14); lean_dec(x_14); x_16 = l_myMacro____x40_Init_Notation___hyg_16268____closed__9; x_17 = lean_string_append(x_15, x_16); x_18 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_19 = lean_string_append(x_17, x_18); lean_inc(x_5); x_20 = l_Lean_IR_EmitC_emitFnBody(x_10, x_5, x_19); if (lean_obj_tag(x_20) == 0) { lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; x_21 = lean_ctor_get(x_20, 0); lean_inc(x_21); x_22 = lean_ctor_get(x_20, 1); lean_inc(x_22); lean_dec(x_20); x_23 = 1; x_24 = x_2 + x_23; x_2 = x_24; x_4 = x_21; x_6 = x_22; goto _start; } else { uint8_t x_26; lean_dec(x_5); x_26 = !lean_is_exclusive(x_20); if (x_26 == 0) { return x_20; } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; x_27 = lean_ctor_get(x_20, 0); x_28 = lean_ctor_get(x_20, 1); lean_inc(x_28); lean_inc(x_27); lean_dec(x_20); x_29 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_29, 0, x_27); lean_ctor_set(x_29, 1, x_28); return x_29; } } } else { lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; x_30 = lean_ctor_get(x_8, 0); lean_inc(x_30); lean_dec(x_8); x_31 = l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitCase___spec__1___closed__1; x_32 = lean_string_append(x_6, x_31); x_33 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_34 = lean_string_append(x_32, x_33); lean_inc(x_5); x_35 = l_Lean_IR_EmitC_emitFnBody(x_30, x_5, x_34); if (lean_obj_tag(x_35) == 0) { lean_object* x_36; lean_object* x_37; size_t x_38; size_t x_39; x_36 = lean_ctor_get(x_35, 0); lean_inc(x_36); x_37 = lean_ctor_get(x_35, 1); lean_inc(x_37); lean_dec(x_35); x_38 = 1; x_39 = x_2 + x_38; x_2 = x_39; x_4 = x_36; x_6 = x_37; goto _start; } else { uint8_t x_41; lean_dec(x_5); x_41 = !lean_is_exclusive(x_35); if (x_41 == 0) { return x_35; } else { lean_object* x_42; lean_object* x_43; lean_object* x_44; x_42 = lean_ctor_get(x_35, 0); x_43 = lean_ctor_get(x_35, 1); lean_inc(x_43); lean_inc(x_42); lean_dec(x_35); 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; } } } } else { lean_object* x_45; lean_dec(x_5); x_45 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_45, 0, x_4); lean_ctor_set(x_45, 1, x_6); return x_45; } } } static lean_object* _init_l_Lean_IR_EmitC_emitCase___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("switch ("); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitCase___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string(") {"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitCase(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_isIf(x_3); if (lean_obj_tag(x_6) == 0) { lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; x_7 = l_Lean_IR_EmitC_emitCase___closed__1; x_8 = lean_string_append(x_5, x_7); x_9 = l_Lean_IR_EmitC_emitTag(x_1, x_2, x_4, x_8); x_10 = !lean_is_exclusive(x_9); if (x_10 == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; x_11 = lean_ctor_get(x_9, 1); x_12 = lean_ctor_get(x_9, 0); lean_dec(x_12); x_13 = l_Lean_IR_EmitC_emitCase___closed__2; x_14 = lean_string_append(x_11, x_13); x_15 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_16 = lean_string_append(x_14, x_15); x_17 = l_Lean_IR_ensureHasDefault(x_3); x_18 = lean_array_get_size(x_17); x_19 = lean_unsigned_to_nat(0u); x_20 = lean_nat_dec_lt(x_19, x_18); if (x_20 == 0) { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_dec(x_18); lean_dec(x_17); lean_dec(x_4); x_21 = l_term_x7b_x7d___closed__5; x_22 = lean_string_append(x_16, x_21); x_23 = lean_string_append(x_22, x_15); x_24 = lean_box(0); lean_ctor_set(x_9, 1, x_23); lean_ctor_set(x_9, 0, x_24); return x_9; } else { uint8_t x_25; x_25 = lean_nat_dec_le(x_18, x_18); if (x_25 == 0) { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_dec(x_18); lean_dec(x_17); lean_dec(x_4); x_26 = l_term_x7b_x7d___closed__5; x_27 = lean_string_append(x_16, x_26); x_28 = lean_string_append(x_27, x_15); x_29 = lean_box(0); lean_ctor_set(x_9, 1, x_28); lean_ctor_set(x_9, 0, x_29); return x_9; } else { size_t x_30; size_t x_31; lean_object* x_32; lean_object* x_33; lean_free_object(x_9); x_30 = 0; x_31 = lean_usize_of_nat(x_18); lean_dec(x_18); x_32 = lean_box(0); x_33 = l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitCase___spec__1(x_17, x_30, x_31, x_32, x_4, x_16); lean_dec(x_17); if (lean_obj_tag(x_33) == 0) { uint8_t x_34; x_34 = !lean_is_exclusive(x_33); if (x_34 == 0) { lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; x_35 = lean_ctor_get(x_33, 1); x_36 = lean_ctor_get(x_33, 0); lean_dec(x_36); x_37 = l_term_x7b_x7d___closed__5; x_38 = lean_string_append(x_35, x_37); x_39 = lean_string_append(x_38, x_15); lean_ctor_set(x_33, 1, x_39); lean_ctor_set(x_33, 0, x_32); return x_33; } else { lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; x_40 = lean_ctor_get(x_33, 1); lean_inc(x_40); lean_dec(x_33); x_41 = l_term_x7b_x7d___closed__5; x_42 = lean_string_append(x_40, x_41); x_43 = lean_string_append(x_42, x_15); x_44 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_44, 0, x_32); lean_ctor_set(x_44, 1, x_43); return x_44; } } else { uint8_t x_45; x_45 = !lean_is_exclusive(x_33); if (x_45 == 0) { return x_33; } else { lean_object* x_46; lean_object* x_47; lean_object* x_48; x_46 = lean_ctor_get(x_33, 0); x_47 = lean_ctor_get(x_33, 1); lean_inc(x_47); lean_inc(x_46); lean_dec(x_33); x_48 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_48, 0, x_46); lean_ctor_set(x_48, 1, x_47); return x_48; } } } } } else { lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; uint8_t x_57; x_49 = lean_ctor_get(x_9, 1); lean_inc(x_49); lean_dec(x_9); x_50 = l_Lean_IR_EmitC_emitCase___closed__2; x_51 = lean_string_append(x_49, x_50); x_52 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_53 = lean_string_append(x_51, x_52); x_54 = l_Lean_IR_ensureHasDefault(x_3); x_55 = lean_array_get_size(x_54); x_56 = lean_unsigned_to_nat(0u); x_57 = lean_nat_dec_lt(x_56, x_55); if (x_57 == 0) { lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_dec(x_55); lean_dec(x_54); lean_dec(x_4); x_58 = l_term_x7b_x7d___closed__5; x_59 = lean_string_append(x_53, x_58); x_60 = lean_string_append(x_59, x_52); x_61 = lean_box(0); x_62 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_62, 0, x_61); lean_ctor_set(x_62, 1, x_60); return x_62; } else { uint8_t x_63; x_63 = lean_nat_dec_le(x_55, x_55); if (x_63 == 0) { lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_dec(x_55); lean_dec(x_54); lean_dec(x_4); x_64 = l_term_x7b_x7d___closed__5; x_65 = lean_string_append(x_53, x_64); x_66 = lean_string_append(x_65, x_52); x_67 = lean_box(0); x_68 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_68, 0, x_67); lean_ctor_set(x_68, 1, x_66); return x_68; } else { size_t x_69; size_t x_70; lean_object* x_71; lean_object* x_72; x_69 = 0; x_70 = lean_usize_of_nat(x_55); lean_dec(x_55); x_71 = lean_box(0); x_72 = l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitCase___spec__1(x_54, x_69, x_70, x_71, x_4, x_53); lean_dec(x_54); if (lean_obj_tag(x_72) == 0) { lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; x_73 = lean_ctor_get(x_72, 1); lean_inc(x_73); if (lean_is_exclusive(x_72)) { lean_ctor_release(x_72, 0); lean_ctor_release(x_72, 1); x_74 = x_72; } else { lean_dec_ref(x_72); x_74 = lean_box(0); } x_75 = l_term_x7b_x7d___closed__5; x_76 = lean_string_append(x_73, x_75); x_77 = lean_string_append(x_76, x_52); if (lean_is_scalar(x_74)) { x_78 = lean_alloc_ctor(0, 2, 0); } else { x_78 = x_74; } lean_ctor_set(x_78, 0, x_71); lean_ctor_set(x_78, 1, x_77); return x_78; } else { lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; x_79 = lean_ctor_get(x_72, 0); lean_inc(x_79); x_80 = lean_ctor_get(x_72, 1); lean_inc(x_80); if (lean_is_exclusive(x_72)) { lean_ctor_release(x_72, 0); lean_ctor_release(x_72, 1); x_81 = x_72; } else { lean_dec_ref(x_72); x_81 = lean_box(0); } if (lean_is_scalar(x_81)) { x_82 = lean_alloc_ctor(1, 2, 0); } else { x_82 = x_81; } lean_ctor_set(x_82, 0, x_79); lean_ctor_set(x_82, 1, x_80); return x_82; } } } } } else { 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_dec(x_3); x_83 = lean_ctor_get(x_6, 0); lean_inc(x_83); lean_dec(x_6); x_84 = lean_ctor_get(x_83, 1); lean_inc(x_84); x_85 = lean_ctor_get(x_83, 0); lean_inc(x_85); lean_dec(x_83); x_86 = lean_ctor_get(x_84, 0); lean_inc(x_86); x_87 = lean_ctor_get(x_84, 1); lean_inc(x_87); lean_dec(x_84); x_88 = l_Lean_IR_EmitC_emitIf(x_1, x_2, x_85, x_86, x_87, x_4, x_5); return x_88; } } } lean_object* l_Lean_IR_EmitC_emitIf___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_IR_EmitC_emitIf(x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_2); return x_8; } } lean_object* l_Lean_IR_EmitC_emitFnBody___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitFnBody___lambda__1(x_1, x_2, x_3, x_4); lean_dec(x_2); return x_5; } } lean_object* l_Lean_IR_EmitC_emitBlock___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitBlock___lambda__1(x_1, x_2, x_3, x_4); lean_dec(x_2); return x_5; } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitCase___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: { size_t x_7; size_t x_8; lean_object* x_9; x_7 = lean_unbox_usize(x_2); lean_dec(x_2); x_8 = lean_unbox_usize(x_3); lean_dec(x_3); x_9 = l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitCase___spec__1(x_1, x_7, x_8, x_4, x_5, x_6); lean_dec(x_1); return x_9; } } lean_object* l_Lean_IR_EmitC_emitCase___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_IR_EmitC_emitCase(x_1, x_2, x_3, x_4, x_5); lean_dec(x_2); return x_6; } } lean_object* l_Lean_IR_EmitC_emitDeclAux_match__1___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_2(x_2, x_3, x_4); return x_5; } } lean_object* l_Lean_IR_EmitC_emitDeclAux_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitDeclAux_match__1___rarg), 2, 0); return x_2; } } static lean_object* _init_l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_object* "); return x_1; } } static lean_object* _init_l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string(" = _args["); return x_1; } } static lean_object* _init_l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("];"); return x_1; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; uint8_t x_7; x_6 = lean_unsigned_to_nat(0u); x_7 = lean_nat_dec_eq(x_3, x_6); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; x_8 = lean_unsigned_to_nat(1u); x_9 = lean_nat_sub(x_3, x_8); lean_dec(x_3); x_10 = lean_nat_sub(x_2, x_9); x_11 = lean_nat_sub(x_10, x_8); lean_dec(x_10); x_12 = l_Lean_IR_instInhabitedParam; x_13 = lean_array_get(x_12, x_1, x_11); x_14 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__1; x_15 = lean_string_append(x_5, x_14); x_16 = lean_ctor_get(x_13, 0); lean_inc(x_16); lean_dec(x_13); x_17 = l_Nat_repr(x_16); x_18 = l_Lean_IR_instToStringVarId___closed__1; x_19 = lean_string_append(x_18, x_17); lean_dec(x_17); x_20 = lean_string_append(x_15, x_19); lean_dec(x_19); x_21 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__2; x_22 = lean_string_append(x_20, x_21); x_23 = l_Nat_repr(x_11); x_24 = lean_string_append(x_22, x_23); lean_dec(x_23); x_25 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__3; x_26 = lean_string_append(x_24, x_25); x_27 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_28 = lean_string_append(x_26, x_27); x_3 = x_9; x_5 = x_28; goto _start; } else { lean_object* x_30; lean_object* x_31; lean_dec(x_3); x_30 = lean_box(0); x_31 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_31, 0, x_30); lean_ctor_set(x_31, 1, x_5); return x_31; } } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__2___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_6 = l_Lean_IR_instInhabitedParam; x_7 = lean_array_get(x_6, x_1, x_2); x_8 = lean_ctor_get(x_7, 1); lean_inc(x_8); x_9 = l_Lean_IR_EmitC_toCType(x_8); lean_dec(x_8); x_10 = lean_string_append(x_5, x_9); lean_dec(x_9); x_11 = l___private_Init_Data_Format_Basic_0__Std_Format_be___closed__1; x_12 = lean_string_append(x_10, x_11); x_13 = lean_ctor_get(x_7, 0); lean_inc(x_13); lean_dec(x_7); x_14 = l_Nat_repr(x_13); x_15 = l_Lean_IR_instToStringVarId___closed__1; x_16 = lean_string_append(x_15, x_14); lean_dec(x_14); x_17 = lean_string_append(x_12, x_16); lean_dec(x_16); x_18 = lean_box(0); x_19 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_17); return x_19; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; uint8_t x_7; x_6 = lean_unsigned_to_nat(0u); x_7 = lean_nat_dec_eq(x_3, x_6); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; x_8 = lean_unsigned_to_nat(1u); x_9 = lean_nat_sub(x_3, x_8); lean_dec(x_3); x_10 = lean_nat_sub(x_2, x_9); x_11 = lean_nat_sub(x_10, x_8); lean_dec(x_10); x_12 = lean_nat_dec_lt(x_6, x_11); if (x_12 == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; x_13 = lean_box(0); x_14 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__2___lambda__1(x_1, x_11, x_13, x_4, x_5); lean_dec(x_11); x_15 = lean_ctor_get(x_14, 1); lean_inc(x_15); lean_dec(x_14); x_3 = x_9; x_5 = x_15; goto _start; } else { lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; x_17 = l_term_x5b___x5d___closed__5; x_18 = lean_string_append(x_5, x_17); x_19 = lean_box(0); x_20 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__2___lambda__1(x_1, x_11, x_19, x_4, x_18); lean_dec(x_11); x_21 = lean_ctor_get(x_20, 1); lean_inc(x_21); lean_dec(x_20); x_3 = x_9; x_5 = x_21; goto _start; } } else { lean_object* x_23; lean_object* x_24; lean_dec(x_3); x_23 = lean_box(0); x_24 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_5); return x_24; } } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; uint8_t x_7; x_6 = lean_unsigned_to_nat(0u); x_7 = lean_nat_dec_eq(x_3, x_6); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; x_8 = lean_unsigned_to_nat(1u); x_9 = lean_nat_sub(x_3, x_8); lean_dec(x_3); x_10 = lean_nat_sub(x_2, x_9); x_11 = lean_nat_sub(x_10, x_8); lean_dec(x_10); x_12 = lean_nat_dec_lt(x_6, x_11); if (x_12 == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; x_13 = lean_box(0); x_14 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__2___lambda__1(x_1, x_11, x_13, x_4, x_5); lean_dec(x_11); x_15 = lean_ctor_get(x_14, 1); lean_inc(x_15); lean_dec(x_14); x_3 = x_9; x_5 = x_15; goto _start; } else { lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; x_17 = l_term_x5b___x5d___closed__5; x_18 = lean_string_append(x_5, x_17); x_19 = lean_box(0); x_20 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__2___lambda__1(x_1, x_11, x_19, x_4, x_18); lean_dec(x_11); x_21 = lean_ctor_get(x_20, 1); lean_inc(x_21); lean_dec(x_20); x_3 = x_9; x_5 = x_21; goto _start; } } else { lean_object* x_23; lean_object* x_24; lean_dec(x_3); x_23 = lean_box(0); x_24 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_5); return x_24; } } } static lean_object* _init_l_Lean_IR_EmitC_emitDeclAux___lambda__1___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("_start:"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitDeclAux___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; uint8_t x_11; x_7 = l_Lean_IR_EmitC_emitDeclAux___lambda__1___closed__1; x_8 = lean_string_append(x_6, x_7); x_9 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_10 = lean_string_append(x_8, x_9); x_11 = !lean_is_exclusive(x_5); if (x_11 == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; x_12 = lean_ctor_get(x_5, 4); lean_dec(x_12); x_13 = lean_ctor_get(x_5, 3); lean_dec(x_13); lean_ctor_set(x_5, 4, x_2); lean_ctor_set(x_5, 3, x_1); x_14 = l_Lean_IR_EmitC_emitFnBody(x_3, x_5, x_10); if (lean_obj_tag(x_14) == 0) { uint8_t x_15; x_15 = !lean_is_exclusive(x_14); if (x_15 == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; x_16 = lean_ctor_get(x_14, 1); x_17 = lean_ctor_get(x_14, 0); lean_dec(x_17); x_18 = l_term_x7b_x7d___closed__5; x_19 = lean_string_append(x_16, x_18); x_20 = lean_string_append(x_19, x_9); x_21 = lean_box(0); lean_ctor_set(x_14, 1, x_20); lean_ctor_set(x_14, 0, x_21); return x_14; } else { lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; x_22 = lean_ctor_get(x_14, 1); lean_inc(x_22); lean_dec(x_14); x_23 = l_term_x7b_x7d___closed__5; x_24 = lean_string_append(x_22, x_23); x_25 = lean_string_append(x_24, x_9); x_26 = lean_box(0); x_27 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_27, 0, x_26); lean_ctor_set(x_27, 1, x_25); return x_27; } } else { uint8_t x_28; x_28 = !lean_is_exclusive(x_14); if (x_28 == 0) { return x_14; } else { lean_object* x_29; lean_object* x_30; lean_object* x_31; x_29 = lean_ctor_get(x_14, 0); x_30 = lean_ctor_get(x_14, 1); lean_inc(x_30); lean_inc(x_29); lean_dec(x_14); x_31 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_31, 0, x_29); lean_ctor_set(x_31, 1, x_30); return x_31; } } } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; x_32 = lean_ctor_get(x_5, 0); x_33 = lean_ctor_get(x_5, 1); x_34 = lean_ctor_get(x_5, 2); lean_inc(x_34); lean_inc(x_33); lean_inc(x_32); lean_dec(x_5); x_35 = lean_alloc_ctor(0, 5, 0); lean_ctor_set(x_35, 0, x_32); lean_ctor_set(x_35, 1, x_33); lean_ctor_set(x_35, 2, x_34); lean_ctor_set(x_35, 3, x_1); lean_ctor_set(x_35, 4, x_2); x_36 = l_Lean_IR_EmitC_emitFnBody(x_3, x_35, x_10); if (lean_obj_tag(x_36) == 0) { lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; x_37 = lean_ctor_get(x_36, 1); lean_inc(x_37); if (lean_is_exclusive(x_36)) { lean_ctor_release(x_36, 0); lean_ctor_release(x_36, 1); x_38 = x_36; } else { lean_dec_ref(x_36); x_38 = lean_box(0); } x_39 = l_term_x7b_x7d___closed__5; x_40 = lean_string_append(x_37, x_39); x_41 = lean_string_append(x_40, x_9); x_42 = lean_box(0); if (lean_is_scalar(x_38)) { x_43 = lean_alloc_ctor(0, 2, 0); } else { x_43 = x_38; } lean_ctor_set(x_43, 0, x_42); lean_ctor_set(x_43, 1, x_41); return x_43; } else { lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; x_44 = lean_ctor_get(x_36, 0); lean_inc(x_44); x_45 = lean_ctor_get(x_36, 1); lean_inc(x_45); if (lean_is_exclusive(x_36)) { lean_ctor_release(x_36, 0); lean_ctor_release(x_36, 1); x_46 = x_36; } else { lean_dec_ref(x_36); x_46 = lean_box(0); } if (lean_is_scalar(x_46)) { x_47 = lean_alloc_ctor(1, 2, 0); } else { x_47 = x_46; } lean_ctor_set(x_47, 0, x_44); lean_ctor_set(x_47, 1, x_45); return x_47; } } } } static lean_object* _init_l_Lean_IR_EmitC_emitDeclAux___lambda__2___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string(" {"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitDeclAux___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) { _start: { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; x_8 = l_Lean_IR_EmitC_emitDeclAux___lambda__2___closed__1; x_9 = lean_string_append(x_7, x_8); x_10 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_11 = lean_string_append(x_9, x_10); x_12 = lean_array_get_size(x_2); x_13 = l_Lean_closureMaxArgs; x_14 = lean_nat_dec_lt(x_13, x_12); if (x_14 == 0) { lean_object* x_15; lean_object* x_16; lean_dec(x_12); x_15 = lean_box(0); x_16 = l_Lean_IR_EmitC_emitDeclAux___lambda__1(x_1, x_2, x_3, x_15, x_6, x_11); return x_16; } else { uint8_t x_17; x_17 = l_Lean_IR_ExplicitBoxing_isBoxedName(x_4); if (x_17 == 0) { lean_object* x_18; lean_object* x_19; lean_dec(x_12); x_18 = lean_box(0); x_19 = l_Lean_IR_EmitC_emitDeclAux___lambda__1(x_1, x_2, x_3, x_18, x_6, x_11); return x_19; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_inc(x_12); x_20 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1(x_2, x_12, x_12, x_6, x_11); lean_dec(x_12); x_21 = lean_ctor_get(x_20, 0); lean_inc(x_21); x_22 = lean_ctor_get(x_20, 1); lean_inc(x_22); lean_dec(x_20); x_23 = l_Lean_IR_EmitC_emitDeclAux___lambda__1(x_1, x_2, x_3, x_21, x_6, x_22); lean_dec(x_21); return x_23; } } } } static lean_object* _init_l_Lean_IR_EmitC_emitDeclAux___lambda__3___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_object** _args"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitDeclAux___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { 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; x_10 = l_Lean_IR_EmitC_toCType(x_1); x_11 = lean_string_append(x_9, x_10); lean_dec(x_10); x_12 = l___private_Init_Data_Format_Basic_0__Std_Format_be___closed__1; x_13 = lean_string_append(x_11, x_12); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); x_14 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitDeclAux___lambda__2___boxed), 7, 4); lean_closure_set(x_14, 0, x_2); lean_closure_set(x_14, 1, x_3); lean_closure_set(x_14, 2, x_4); lean_closure_set(x_14, 3, x_5); x_15 = lean_array_get_size(x_3); x_16 = lean_unsigned_to_nat(0u); x_17 = lean_nat_dec_lt(x_16, x_15); if (x_17 == 0) { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_dec(x_15); lean_dec(x_14); x_18 = l_Lean_IR_EmitC_toCInitName___closed__1; x_19 = lean_string_append(x_18, x_6); x_20 = l_instReprUnit___closed__1; x_21 = lean_string_append(x_19, x_20); x_22 = lean_string_append(x_13, x_21); lean_dec(x_21); x_23 = lean_box(0); x_24 = l_Lean_IR_EmitC_emitDeclAux___lambda__2(x_2, x_3, x_4, x_5, x_23, x_8, x_22); lean_dec(x_5); return x_24; } else { lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; uint8_t x_29; lean_dec(x_4); lean_dec(x_2); x_25 = lean_string_append(x_13, x_6); x_26 = l_prec_x28___x29___closed__3; x_27 = lean_string_append(x_25, x_26); x_28 = l_Lean_closureMaxArgs; x_29 = lean_nat_dec_lt(x_28, x_15); if (x_29 == 0) { lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_dec(x_5); lean_inc(x_15); x_30 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__2(x_3, x_15, x_15, x_8, x_27); lean_dec(x_15); lean_dec(x_3); x_31 = lean_ctor_get(x_30, 0); lean_inc(x_31); x_32 = lean_ctor_get(x_30, 1); lean_inc(x_32); lean_dec(x_30); x_33 = l_Lean_IR_EmitC_emitFnDeclAux___lambda__2(x_14, x_31, x_8, x_32); lean_dec(x_31); return x_33; } else { uint8_t x_34; x_34 = l_Lean_IR_ExplicitBoxing_isBoxedName(x_5); lean_dec(x_5); if (x_34 == 0) { lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_inc(x_15); x_35 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__3(x_3, x_15, x_15, x_8, x_27); lean_dec(x_15); lean_dec(x_3); x_36 = lean_ctor_get(x_35, 0); lean_inc(x_36); x_37 = lean_ctor_get(x_35, 1); lean_inc(x_37); lean_dec(x_35); x_38 = l_Lean_IR_EmitC_emitFnDeclAux___lambda__2(x_14, x_36, x_8, x_37); lean_dec(x_36); return x_38; } else { lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_dec(x_15); lean_dec(x_3); x_39 = l_Lean_IR_EmitC_emitDeclAux___lambda__3___closed__1; x_40 = lean_string_append(x_27, x_39); x_41 = lean_box(0); x_42 = l_Lean_IR_EmitC_emitFnDeclAux___lambda__2(x_14, x_41, x_8, x_40); return x_42; } } } } } static lean_object* _init_l_Lean_IR_EmitC_emitDeclAux___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("static "); return x_1; } } lean_object* l_Lean_IR_EmitC_emitDeclAux(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; uint8_t x_12; x_4 = l_Lean_IR_EmitC_getEnv(x_2, x_3); x_5 = lean_ctor_get(x_4, 0); lean_inc(x_5); x_6 = lean_ctor_get(x_4, 1); lean_inc(x_6); if (lean_is_exclusive(x_4)) { lean_ctor_release(x_4, 0); lean_ctor_release(x_4, 1); x_7 = x_4; } else { lean_dec_ref(x_4); x_7 = lean_box(0); } lean_inc(x_1); x_8 = l_Lean_IR_mkVarJPMaps(x_1); x_9 = lean_ctor_get(x_8, 1); lean_inc(x_9); lean_dec(x_8); x_10 = l_Lean_IR_Decl_name(x_1); lean_inc(x_10); x_11 = l_Lean_hasInitAttr(x_5, x_10); if (x_11 == 0) { uint8_t x_61; x_61 = 0; x_12 = x_61; goto block_60; } else { uint8_t x_62; x_62 = 1; x_12 = x_62; goto block_60; } block_60: { if (x_12 == 0) { if (lean_obj_tag(x_1) == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; lean_dec(x_7); x_13 = lean_ctor_get(x_1, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_1, 1); lean_inc(x_14); x_15 = lean_ctor_get(x_1, 2); lean_inc(x_15); x_16 = lean_ctor_get(x_1, 3); lean_inc(x_16); lean_dec(x_1); x_17 = !lean_is_exclusive(x_2); if (x_17 == 0) { lean_object* x_18; lean_object* x_19; x_18 = lean_ctor_get(x_2, 2); lean_dec(x_18); lean_ctor_set(x_2, 2, x_9); lean_inc(x_13); x_19 = l_Lean_IR_EmitC_toCName(x_13, x_2, x_6); if (lean_obj_tag(x_19) == 0) { 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_19, 0); lean_inc(x_20); x_21 = lean_ctor_get(x_19, 1); lean_inc(x_21); lean_dec(x_19); x_22 = lean_array_get_size(x_14); x_23 = lean_unsigned_to_nat(0u); x_24 = lean_nat_dec_eq(x_22, x_23); lean_dec(x_22); if (x_24 == 0) { lean_object* x_25; lean_object* x_26; x_25 = lean_box(0); x_26 = l_Lean_IR_EmitC_emitDeclAux___lambda__3(x_15, x_13, x_14, x_16, x_10, x_20, x_25, x_2, x_21); lean_dec(x_20); lean_dec(x_15); return x_26; } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; x_27 = l_Lean_IR_EmitC_emitDeclAux___closed__1; x_28 = lean_string_append(x_21, x_27); x_29 = lean_box(0); x_30 = l_Lean_IR_EmitC_emitDeclAux___lambda__3(x_15, x_13, x_14, x_16, x_10, x_20, x_29, x_2, x_28); lean_dec(x_20); lean_dec(x_15); return x_30; } } else { uint8_t x_31; lean_dec(x_2); lean_dec(x_16); lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_10); x_31 = !lean_is_exclusive(x_19); if (x_31 == 0) { return x_19; } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; x_32 = lean_ctor_get(x_19, 0); x_33 = lean_ctor_get(x_19, 1); lean_inc(x_33); lean_inc(x_32); lean_dec(x_19); x_34 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_34, 0, x_32); lean_ctor_set(x_34, 1, x_33); return x_34; } } } else { lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; x_35 = lean_ctor_get(x_2, 0); x_36 = lean_ctor_get(x_2, 1); x_37 = lean_ctor_get(x_2, 3); x_38 = lean_ctor_get(x_2, 4); lean_inc(x_38); lean_inc(x_37); lean_inc(x_36); lean_inc(x_35); lean_dec(x_2); x_39 = lean_alloc_ctor(0, 5, 0); lean_ctor_set(x_39, 0, x_35); lean_ctor_set(x_39, 1, x_36); lean_ctor_set(x_39, 2, x_9); lean_ctor_set(x_39, 3, x_37); lean_ctor_set(x_39, 4, x_38); lean_inc(x_13); x_40 = l_Lean_IR_EmitC_toCName(x_13, x_39, x_6); if (lean_obj_tag(x_40) == 0) { lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; uint8_t x_45; x_41 = lean_ctor_get(x_40, 0); lean_inc(x_41); x_42 = lean_ctor_get(x_40, 1); lean_inc(x_42); lean_dec(x_40); x_43 = lean_array_get_size(x_14); x_44 = lean_unsigned_to_nat(0u); x_45 = lean_nat_dec_eq(x_43, x_44); lean_dec(x_43); if (x_45 == 0) { lean_object* x_46; lean_object* x_47; x_46 = lean_box(0); x_47 = l_Lean_IR_EmitC_emitDeclAux___lambda__3(x_15, x_13, x_14, x_16, x_10, x_41, x_46, x_39, x_42); lean_dec(x_41); lean_dec(x_15); return x_47; } else { lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; x_48 = l_Lean_IR_EmitC_emitDeclAux___closed__1; x_49 = lean_string_append(x_42, x_48); x_50 = lean_box(0); x_51 = l_Lean_IR_EmitC_emitDeclAux___lambda__3(x_15, x_13, x_14, x_16, x_10, x_41, x_50, x_39, x_49); lean_dec(x_41); lean_dec(x_15); return x_51; } } else { lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_dec(x_39); lean_dec(x_16); lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_10); x_52 = lean_ctor_get(x_40, 0); lean_inc(x_52); x_53 = lean_ctor_get(x_40, 1); lean_inc(x_53); if (lean_is_exclusive(x_40)) { lean_ctor_release(x_40, 0); lean_ctor_release(x_40, 1); x_54 = x_40; } else { lean_dec_ref(x_40); x_54 = lean_box(0); } if (lean_is_scalar(x_54)) { x_55 = lean_alloc_ctor(1, 2, 0); } else { x_55 = x_54; } lean_ctor_set(x_55, 0, x_52); lean_ctor_set(x_55, 1, x_53); return x_55; } } } else { lean_object* x_56; lean_object* x_57; lean_dec(x_10); lean_dec(x_9); lean_dec(x_2); lean_dec(x_1); x_56 = lean_box(0); if (lean_is_scalar(x_7)) { x_57 = lean_alloc_ctor(0, 2, 0); } else { x_57 = x_7; } lean_ctor_set(x_57, 0, x_56); lean_ctor_set(x_57, 1, x_6); return x_57; } } else { lean_object* x_58; lean_object* x_59; lean_dec(x_10); lean_dec(x_9); lean_dec(x_2); lean_dec(x_1); x_58 = lean_box(0); if (lean_is_scalar(x_7)) { x_59 = lean_alloc_ctor(0, 2, 0); } else { x_59 = x_7; } lean_ctor_set(x_59, 0, x_58); lean_ctor_set(x_59, 1, x_6); return x_59; } } } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); return x_6; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__2___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__2___lambda__1(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_6; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__2___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_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__2(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); return x_6; } } lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___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_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__3(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); return x_6; } } lean_object* l_Lean_IR_EmitC_emitDeclAux___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_IR_EmitC_emitDeclAux___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_4); return x_7; } } lean_object* l_Lean_IR_EmitC_emitDeclAux___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: { lean_object* x_8; x_8 = l_Lean_IR_EmitC_emitDeclAux___lambda__2(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_IR_EmitC_emitDeclAux___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, lean_object* x_9) { _start: { lean_object* x_10; x_10 = l_Lean_IR_EmitC_emitDeclAux___lambda__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_1); return x_10; } } static lean_object* _init_l_Lean_IR_EmitC_emitDecl___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("\ncompiling:\n"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitDecl(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_IR_Decl_normalizeIds(x_1); lean_inc(x_4); x_5 = l_Lean_IR_EmitC_emitDeclAux(x_4, x_2, x_3); if (lean_obj_tag(x_5) == 0) { lean_dec(x_4); return x_5; } else { uint8_t x_6; x_6 = !lean_is_exclusive(x_5); if (x_6 == 0) { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_7 = lean_ctor_get(x_5, 0); x_8 = l_Lean_instInhabitedParserDescr___closed__1; x_9 = lean_string_append(x_8, x_7); lean_dec(x_7); x_10 = l_Lean_IR_EmitC_emitDecl___closed__1; x_11 = lean_string_append(x_9, x_10); x_12 = lean_ir_decl_to_string(x_4); x_13 = lean_string_append(x_11, x_12); lean_dec(x_12); x_14 = lean_string_append(x_13, x_8); lean_ctor_set(x_5, 0, x_14); return x_5; } 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_5, 0); x_16 = lean_ctor_get(x_5, 1); lean_inc(x_16); lean_inc(x_15); lean_dec(x_5); x_17 = l_Lean_instInhabitedParserDescr___closed__1; x_18 = lean_string_append(x_17, x_15); lean_dec(x_15); x_19 = l_Lean_IR_EmitC_emitDecl___closed__1; x_20 = lean_string_append(x_18, x_19); x_21 = lean_ir_decl_to_string(x_4); x_22 = lean_string_append(x_20, x_21); lean_dec(x_21); x_23 = lean_string_append(x_22, x_17); x_24 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_16); return x_24; } } } } lean_object* l_List_forM___at_Lean_IR_EmitC_emitFns___spec__1(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_alloc_ctor(0, 2, 0); lean_ctor_set(x_5, 0, x_4); lean_ctor_set(x_5, 1, x_3); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_object* x_8; x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_1, 1); lean_inc(x_7); lean_dec(x_1); lean_inc(x_2); x_8 = l_Lean_IR_EmitC_emitDecl(x_6, x_2, x_3); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; x_9 = lean_ctor_get(x_8, 1); lean_inc(x_9); lean_dec(x_8); x_1 = x_7; x_3 = x_9; goto _start; } else { uint8_t x_11; lean_dec(x_7); lean_dec(x_2); x_11 = !lean_is_exclusive(x_8); if (x_11 == 0) { return x_8; } else { lean_object* x_12; lean_object* x_13; lean_object* x_14; x_12 = lean_ctor_get(x_8, 0); x_13 = lean_ctor_get(x_8, 1); lean_inc(x_13); lean_inc(x_12); lean_dec(x_8); x_14 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_14, 0, x_12); lean_ctor_set(x_14, 1, x_13); return x_14; } } } } } lean_object* l_Lean_IR_EmitC_emitFns(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_3 = l_Lean_IR_EmitC_getEnv(x_1, x_2); x_4 = lean_ctor_get(x_3, 0); lean_inc(x_4); x_5 = lean_ctor_get(x_3, 1); lean_inc(x_5); lean_dec(x_3); x_6 = l_Lean_IR_declMapExt; x_7 = l_Lean_SimplePersistentEnvExtension_getEntries___rarg(x_6, x_4); lean_dec(x_4); x_8 = l_List_reverse___rarg(x_7); x_9 = l_List_forM___at_Lean_IR_EmitC_emitFns___spec__1(x_8, x_1, x_5); return x_9; } } static lean_object* _init_l_Lean_IR_EmitC_emitMarkPersistent___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_mark_persistent("); return x_1; } } lean_object* l_Lean_IR_EmitC_emitMarkPersistent(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; uint8_t x_6; x_5 = l_Lean_IR_Decl_resultType(x_1); x_6 = l_Lean_IR_IRType_isObj(x_5); lean_dec(x_5); if (x_6 == 0) { lean_object* x_7; lean_object* x_8; lean_dec(x_2); x_7 = lean_box(0); x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_7); lean_ctor_set(x_8, 1, x_4); return x_8; } else { lean_object* x_9; lean_object* x_10; lean_object* x_11; x_9 = l_Lean_IR_EmitC_emitMarkPersistent___closed__1; x_10 = lean_string_append(x_4, x_9); x_11 = l_Lean_IR_EmitC_emitCName(x_2, x_3, x_10); if (lean_obj_tag(x_11) == 0) { uint8_t x_12; x_12 = !lean_is_exclusive(x_11); if (x_12 == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_13 = lean_ctor_get(x_11, 1); x_14 = lean_ctor_get(x_11, 0); lean_dec(x_14); x_15 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_16 = lean_string_append(x_13, x_15); x_17 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_18 = lean_string_append(x_16, x_17); x_19 = lean_box(0); lean_ctor_set(x_11, 1, x_18); lean_ctor_set(x_11, 0, x_19); return x_11; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; x_20 = lean_ctor_get(x_11, 1); lean_inc(x_20); lean_dec(x_11); x_21 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; x_22 = lean_string_append(x_20, x_21); x_23 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_24 = lean_string_append(x_22, x_23); x_25 = lean_box(0); x_26 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_24); return x_26; } } else { uint8_t x_27; x_27 = !lean_is_exclusive(x_11); if (x_27 == 0) { return x_11; } else { lean_object* x_28; lean_object* x_29; lean_object* x_30; x_28 = lean_ctor_get(x_11, 0); x_29 = lean_ctor_get(x_11, 1); lean_inc(x_29); lean_inc(x_28); lean_dec(x_11); x_30 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_30, 0, x_28); lean_ctor_set(x_30, 1, x_29); return x_30; } } } } } lean_object* l_Lean_IR_EmitC_emitMarkPersistent___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_IR_EmitC_emitMarkPersistent(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_1); return x_5; } } lean_object* l_Lean_IR_EmitC_emitDeclInit_match__1___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_dec(x_2); x_4 = lean_apply_1(x_3, x_1); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_dec(x_3); x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); lean_dec(x_1); x_6 = lean_apply_1(x_2, x_5); return x_6; } } } lean_object* l_Lean_IR_EmitC_emitDeclInit_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_EmitC_emitDeclInit_match__1___rarg), 3, 0); return x_2; } } static lean_object* _init_l_Lean_IR_EmitC_emitDeclInit___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("();"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitDeclInit___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("if (lean_io_result_is_error(res)) return res;"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitDeclInit___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string(" = lean_io_result_get_value(res);"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitDeclInit(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_5; x_4 = l_Lean_IR_EmitC_getEnv(x_2, x_3); x_5 = !lean_is_exclusive(x_4); if (x_5 == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; x_6 = lean_ctor_get(x_4, 0); x_7 = lean_ctor_get(x_4, 1); x_8 = l_Lean_IR_Decl_name(x_1); lean_inc(x_8); x_9 = l_Lean_isIOUnitInitFn(x_6, x_8); if (x_9 == 0) { lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; x_10 = l_Lean_IR_Decl_params(x_1); x_11 = lean_array_get_size(x_10); lean_dec(x_10); x_12 = lean_unsigned_to_nat(0u); x_13 = lean_nat_dec_eq(x_11, x_12); lean_dec(x_11); if (x_13 == 0) { lean_object* x_14; lean_dec(x_8); lean_dec(x_6); x_14 = lean_box(0); lean_ctor_set(x_4, 0, x_14); return x_4; } else { lean_object* x_15; lean_free_object(x_4); lean_inc(x_8); x_15 = lean_get_init_fn_name_for(x_6, x_8); if (lean_obj_tag(x_15) == 0) { lean_object* x_16; lean_inc(x_8); x_16 = l_Lean_IR_EmitC_emitCName(x_8, x_2, x_7); if (lean_obj_tag(x_16) == 0) { lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; x_17 = lean_ctor_get(x_16, 1); lean_inc(x_17); lean_dec(x_16); x_18 = l_term___x3d_____closed__3; x_19 = lean_string_append(x_17, x_18); lean_inc(x_8); x_20 = l_Lean_IR_EmitC_emitCInitName(x_8, x_2, x_19); if (lean_obj_tag(x_20) == 0) { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; x_21 = lean_ctor_get(x_20, 1); lean_inc(x_21); lean_dec(x_20); x_22 = l_Lean_IR_EmitC_emitDeclInit___closed__1; x_23 = lean_string_append(x_21, x_22); x_24 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_25 = lean_string_append(x_23, x_24); x_26 = l_Lean_IR_EmitC_emitMarkPersistent(x_1, x_8, x_2, x_25); return x_26; } else { uint8_t x_27; lean_dec(x_8); x_27 = !lean_is_exclusive(x_20); if (x_27 == 0) { return x_20; } else { lean_object* x_28; lean_object* x_29; lean_object* x_30; x_28 = lean_ctor_get(x_20, 0); x_29 = lean_ctor_get(x_20, 1); lean_inc(x_29); lean_inc(x_28); lean_dec(x_20); x_30 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_30, 0, x_28); lean_ctor_set(x_30, 1, x_29); return x_30; } } } else { uint8_t x_31; lean_dec(x_8); x_31 = !lean_is_exclusive(x_16); if (x_31 == 0) { return x_16; } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; x_32 = lean_ctor_get(x_16, 0); x_33 = lean_ctor_get(x_16, 1); lean_inc(x_33); lean_inc(x_32); lean_dec(x_16); x_34 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_34, 0, x_32); lean_ctor_set(x_34, 1, x_33); return x_34; } } } else { lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; x_35 = lean_ctor_get(x_15, 0); lean_inc(x_35); lean_dec(x_15); x_36 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__1; x_37 = lean_string_append(x_7, x_36); x_38 = l_Lean_IR_EmitC_emitCName(x_35, x_2, x_37); if (lean_obj_tag(x_38) == 0) { lean_object* x_39; lean_object* x_40; 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; x_39 = lean_ctor_get(x_38, 1); lean_inc(x_39); lean_dec(x_38); x_40 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__2; x_41 = lean_string_append(x_39, x_40); x_42 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_43 = lean_string_append(x_41, x_42); x_44 = l_Lean_IR_EmitC_emitDeclInit___closed__2; x_45 = lean_string_append(x_43, x_44); x_46 = lean_string_append(x_45, x_42); lean_inc(x_8); x_47 = l_Lean_IR_EmitC_emitCName(x_8, x_2, x_46); if (lean_obj_tag(x_47) == 0) { lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; x_48 = lean_ctor_get(x_47, 1); lean_inc(x_48); lean_dec(x_47); x_49 = l_Lean_IR_EmitC_emitDeclInit___closed__3; x_50 = lean_string_append(x_48, x_49); x_51 = lean_string_append(x_50, x_42); x_52 = l_Lean_IR_EmitC_emitMarkPersistent(x_1, x_8, x_2, x_51); if (lean_obj_tag(x_52) == 0) { uint8_t x_53; x_53 = !lean_is_exclusive(x_52); if (x_53 == 0) { lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; x_54 = lean_ctor_get(x_52, 1); x_55 = lean_ctor_get(x_52, 0); lean_dec(x_55); x_56 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__5; x_57 = lean_string_append(x_54, x_56); x_58 = lean_string_append(x_57, x_42); x_59 = lean_box(0); lean_ctor_set(x_52, 1, x_58); lean_ctor_set(x_52, 0, x_59); return x_52; } else { lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; x_60 = lean_ctor_get(x_52, 1); lean_inc(x_60); lean_dec(x_52); x_61 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__5; x_62 = lean_string_append(x_60, x_61); x_63 = lean_string_append(x_62, x_42); x_64 = lean_box(0); x_65 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_65, 0, x_64); lean_ctor_set(x_65, 1, x_63); return x_65; } } else { uint8_t x_66; x_66 = !lean_is_exclusive(x_52); if (x_66 == 0) { return x_52; } else { lean_object* x_67; lean_object* x_68; lean_object* x_69; x_67 = lean_ctor_get(x_52, 0); x_68 = lean_ctor_get(x_52, 1); lean_inc(x_68); lean_inc(x_67); lean_dec(x_52); x_69 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_69, 0, x_67); lean_ctor_set(x_69, 1, x_68); return x_69; } } } else { uint8_t x_70; lean_dec(x_8); x_70 = !lean_is_exclusive(x_47); if (x_70 == 0) { return x_47; } else { lean_object* x_71; lean_object* x_72; lean_object* x_73; x_71 = lean_ctor_get(x_47, 0); x_72 = lean_ctor_get(x_47, 1); lean_inc(x_72); lean_inc(x_71); lean_dec(x_47); x_73 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_73, 0, x_71); lean_ctor_set(x_73, 1, x_72); return x_73; } } } else { uint8_t x_74; lean_dec(x_8); x_74 = !lean_is_exclusive(x_38); if (x_74 == 0) { return x_38; } else { lean_object* x_75; lean_object* x_76; lean_object* x_77; x_75 = lean_ctor_get(x_38, 0); x_76 = lean_ctor_get(x_38, 1); lean_inc(x_76); lean_inc(x_75); lean_dec(x_38); x_77 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_77, 0, x_75); lean_ctor_set(x_77, 1, x_76); return x_77; } } } } } else { lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_free_object(x_4); lean_dec(x_6); x_78 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__1; x_79 = lean_string_append(x_7, x_78); x_80 = l_Lean_IR_EmitC_emitCName(x_8, x_2, x_79); if (lean_obj_tag(x_80) == 0) { uint8_t x_81; x_81 = !lean_is_exclusive(x_80); if (x_81 == 0) { lean_object* x_82; 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; x_82 = lean_ctor_get(x_80, 1); x_83 = lean_ctor_get(x_80, 0); lean_dec(x_83); x_84 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__2; x_85 = lean_string_append(x_82, x_84); x_86 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_87 = lean_string_append(x_85, x_86); x_88 = l_Lean_IR_EmitC_emitDeclInit___closed__2; x_89 = lean_string_append(x_87, x_88); x_90 = lean_string_append(x_89, x_86); x_91 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__5; x_92 = lean_string_append(x_90, x_91); x_93 = lean_string_append(x_92, x_86); x_94 = lean_box(0); lean_ctor_set(x_80, 1, x_93); lean_ctor_set(x_80, 0, x_94); return x_80; } else { lean_object* x_95; 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; x_95 = lean_ctor_get(x_80, 1); lean_inc(x_95); lean_dec(x_80); x_96 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__2; x_97 = lean_string_append(x_95, x_96); x_98 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_99 = lean_string_append(x_97, x_98); x_100 = l_Lean_IR_EmitC_emitDeclInit___closed__2; x_101 = lean_string_append(x_99, x_100); x_102 = lean_string_append(x_101, x_98); x_103 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__5; x_104 = lean_string_append(x_102, x_103); x_105 = lean_string_append(x_104, x_98); x_106 = lean_box(0); x_107 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_107, 0, x_106); lean_ctor_set(x_107, 1, x_105); return x_107; } } else { uint8_t x_108; x_108 = !lean_is_exclusive(x_80); if (x_108 == 0) { return x_80; } else { lean_object* x_109; lean_object* x_110; lean_object* x_111; x_109 = lean_ctor_get(x_80, 0); x_110 = lean_ctor_get(x_80, 1); lean_inc(x_110); lean_inc(x_109); lean_dec(x_80); x_111 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_111, 0, x_109); lean_ctor_set(x_111, 1, x_110); return x_111; } } } } else { lean_object* x_112; lean_object* x_113; lean_object* x_114; uint8_t x_115; x_112 = lean_ctor_get(x_4, 0); x_113 = lean_ctor_get(x_4, 1); lean_inc(x_113); lean_inc(x_112); lean_dec(x_4); x_114 = l_Lean_IR_Decl_name(x_1); lean_inc(x_114); x_115 = l_Lean_isIOUnitInitFn(x_112, x_114); if (x_115 == 0) { lean_object* x_116; lean_object* x_117; lean_object* x_118; uint8_t x_119; x_116 = l_Lean_IR_Decl_params(x_1); x_117 = lean_array_get_size(x_116); lean_dec(x_116); x_118 = lean_unsigned_to_nat(0u); x_119 = lean_nat_dec_eq(x_117, x_118); lean_dec(x_117); if (x_119 == 0) { lean_object* x_120; lean_object* x_121; lean_dec(x_114); lean_dec(x_112); x_120 = lean_box(0); x_121 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_121, 0, x_120); lean_ctor_set(x_121, 1, x_113); return x_121; } else { lean_object* x_122; lean_inc(x_114); x_122 = lean_get_init_fn_name_for(x_112, x_114); if (lean_obj_tag(x_122) == 0) { lean_object* x_123; lean_inc(x_114); x_123 = l_Lean_IR_EmitC_emitCName(x_114, x_2, x_113); if (lean_obj_tag(x_123) == 0) { lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; x_124 = lean_ctor_get(x_123, 1); lean_inc(x_124); lean_dec(x_123); x_125 = l_term___x3d_____closed__3; x_126 = lean_string_append(x_124, x_125); lean_inc(x_114); x_127 = l_Lean_IR_EmitC_emitCInitName(x_114, x_2, x_126); if (lean_obj_tag(x_127) == 0) { lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; x_128 = lean_ctor_get(x_127, 1); lean_inc(x_128); lean_dec(x_127); x_129 = l_Lean_IR_EmitC_emitDeclInit___closed__1; x_130 = lean_string_append(x_128, x_129); x_131 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_132 = lean_string_append(x_130, x_131); x_133 = l_Lean_IR_EmitC_emitMarkPersistent(x_1, x_114, x_2, x_132); return x_133; } else { lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_dec(x_114); x_134 = lean_ctor_get(x_127, 0); lean_inc(x_134); x_135 = lean_ctor_get(x_127, 1); lean_inc(x_135); if (lean_is_exclusive(x_127)) { lean_ctor_release(x_127, 0); lean_ctor_release(x_127, 1); x_136 = x_127; } else { lean_dec_ref(x_127); x_136 = lean_box(0); } if (lean_is_scalar(x_136)) { x_137 = lean_alloc_ctor(1, 2, 0); } else { x_137 = x_136; } lean_ctor_set(x_137, 0, x_134); lean_ctor_set(x_137, 1, x_135); return x_137; } } else { lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_dec(x_114); x_138 = lean_ctor_get(x_123, 0); lean_inc(x_138); x_139 = lean_ctor_get(x_123, 1); lean_inc(x_139); if (lean_is_exclusive(x_123)) { lean_ctor_release(x_123, 0); lean_ctor_release(x_123, 1); x_140 = x_123; } else { lean_dec_ref(x_123); x_140 = lean_box(0); } if (lean_is_scalar(x_140)) { x_141 = lean_alloc_ctor(1, 2, 0); } else { x_141 = x_140; } lean_ctor_set(x_141, 0, x_138); lean_ctor_set(x_141, 1, x_139); return x_141; } } else { lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; x_142 = lean_ctor_get(x_122, 0); lean_inc(x_142); lean_dec(x_122); x_143 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__1; x_144 = lean_string_append(x_113, x_143); x_145 = l_Lean_IR_EmitC_emitCName(x_142, x_2, x_144); if (lean_obj_tag(x_145) == 0) { lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; x_146 = lean_ctor_get(x_145, 1); lean_inc(x_146); lean_dec(x_145); x_147 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__2; x_148 = lean_string_append(x_146, x_147); x_149 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_150 = lean_string_append(x_148, x_149); x_151 = l_Lean_IR_EmitC_emitDeclInit___closed__2; x_152 = lean_string_append(x_150, x_151); x_153 = lean_string_append(x_152, x_149); lean_inc(x_114); x_154 = l_Lean_IR_EmitC_emitCName(x_114, x_2, x_153); if (lean_obj_tag(x_154) == 0) { lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; x_155 = lean_ctor_get(x_154, 1); lean_inc(x_155); lean_dec(x_154); x_156 = l_Lean_IR_EmitC_emitDeclInit___closed__3; x_157 = lean_string_append(x_155, x_156); x_158 = lean_string_append(x_157, x_149); x_159 = l_Lean_IR_EmitC_emitMarkPersistent(x_1, x_114, x_2, x_158); if (lean_obj_tag(x_159) == 0) { lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; x_160 = lean_ctor_get(x_159, 1); lean_inc(x_160); if (lean_is_exclusive(x_159)) { lean_ctor_release(x_159, 0); lean_ctor_release(x_159, 1); x_161 = x_159; } else { lean_dec_ref(x_159); x_161 = lean_box(0); } x_162 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__5; x_163 = lean_string_append(x_160, x_162); x_164 = lean_string_append(x_163, x_149); x_165 = lean_box(0); if (lean_is_scalar(x_161)) { x_166 = lean_alloc_ctor(0, 2, 0); } else { x_166 = x_161; } lean_ctor_set(x_166, 0, x_165); lean_ctor_set(x_166, 1, x_164); return x_166; } else { lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; x_167 = lean_ctor_get(x_159, 0); lean_inc(x_167); x_168 = lean_ctor_get(x_159, 1); lean_inc(x_168); if (lean_is_exclusive(x_159)) { lean_ctor_release(x_159, 0); lean_ctor_release(x_159, 1); x_169 = x_159; } else { lean_dec_ref(x_159); x_169 = lean_box(0); } if (lean_is_scalar(x_169)) { x_170 = lean_alloc_ctor(1, 2, 0); } else { x_170 = x_169; } lean_ctor_set(x_170, 0, x_167); lean_ctor_set(x_170, 1, x_168); return x_170; } } else { lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_dec(x_114); x_171 = lean_ctor_get(x_154, 0); lean_inc(x_171); x_172 = lean_ctor_get(x_154, 1); lean_inc(x_172); if (lean_is_exclusive(x_154)) { lean_ctor_release(x_154, 0); lean_ctor_release(x_154, 1); x_173 = x_154; } else { lean_dec_ref(x_154); x_173 = lean_box(0); } if (lean_is_scalar(x_173)) { x_174 = lean_alloc_ctor(1, 2, 0); } else { x_174 = x_173; } lean_ctor_set(x_174, 0, x_171); lean_ctor_set(x_174, 1, x_172); return x_174; } } else { lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_dec(x_114); x_175 = lean_ctor_get(x_145, 0); lean_inc(x_175); x_176 = lean_ctor_get(x_145, 1); lean_inc(x_176); if (lean_is_exclusive(x_145)) { lean_ctor_release(x_145, 0); lean_ctor_release(x_145, 1); x_177 = x_145; } else { lean_dec_ref(x_145); x_177 = lean_box(0); } if (lean_is_scalar(x_177)) { x_178 = lean_alloc_ctor(1, 2, 0); } else { x_178 = x_177; } lean_ctor_set(x_178, 0, x_175); lean_ctor_set(x_178, 1, x_176); return x_178; } } } } else { lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_dec(x_112); x_179 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__1; x_180 = lean_string_append(x_113, x_179); x_181 = l_Lean_IR_EmitC_emitCName(x_114, x_2, x_180); if (lean_obj_tag(x_181) == 0) { lean_object* x_182; lean_object* x_183; 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; lean_object* x_193; lean_object* x_194; lean_object* x_195; x_182 = lean_ctor_get(x_181, 1); lean_inc(x_182); if (lean_is_exclusive(x_181)) { lean_ctor_release(x_181, 0); lean_ctor_release(x_181, 1); x_183 = x_181; } else { lean_dec_ref(x_181); x_183 = lean_box(0); } x_184 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__2; x_185 = lean_string_append(x_182, x_184); x_186 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_187 = lean_string_append(x_185, x_186); x_188 = l_Lean_IR_EmitC_emitDeclInit___closed__2; x_189 = lean_string_append(x_187, x_188); x_190 = lean_string_append(x_189, x_186); x_191 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__5; x_192 = lean_string_append(x_190, x_191); x_193 = lean_string_append(x_192, x_186); x_194 = lean_box(0); if (lean_is_scalar(x_183)) { x_195 = lean_alloc_ctor(0, 2, 0); } else { x_195 = x_183; } lean_ctor_set(x_195, 0, x_194); lean_ctor_set(x_195, 1, x_193); return x_195; } else { lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; x_196 = lean_ctor_get(x_181, 0); lean_inc(x_196); x_197 = lean_ctor_get(x_181, 1); lean_inc(x_197); if (lean_is_exclusive(x_181)) { lean_ctor_release(x_181, 0); lean_ctor_release(x_181, 1); x_198 = x_181; } else { lean_dec_ref(x_181); x_198 = lean_box(0); } if (lean_is_scalar(x_198)) { x_199 = lean_alloc_ctor(1, 2, 0); } else { x_199 = x_198; } lean_ctor_set(x_199, 0, x_196); lean_ctor_set(x_199, 1, x_197); return x_199; } } } } } lean_object* l_Lean_IR_EmitC_emitDeclInit___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_Lean_IR_EmitC_emitDeclInit(x_1, x_2, x_3); lean_dec(x_2); lean_dec(x_1); return x_4; } } lean_object* l_List_forM___at_Lean_IR_EmitC_emitInitFn___spec__1(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; x_4 = lean_box(0); x_5 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_5, 0, x_4); lean_ctor_set(x_5, 1, x_3); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_object* x_8; x_6 = lean_ctor_get(x_1, 0); x_7 = lean_ctor_get(x_1, 1); x_8 = l_Lean_IR_EmitC_emitDeclInit(x_6, x_2, x_3); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; x_9 = lean_ctor_get(x_8, 1); lean_inc(x_9); lean_dec(x_8); x_1 = x_7; x_3 = x_9; goto _start; } else { uint8_t x_11; x_11 = !lean_is_exclusive(x_8); if (x_11 == 0) { return x_8; } else { lean_object* x_12; lean_object* x_13; lean_object* x_14; x_12 = lean_ctor_get(x_8, 0); x_13 = lean_ctor_get(x_8, 1); lean_inc(x_13); lean_inc(x_12); lean_dec(x_8); x_14 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_14, 0, x_12); lean_ctor_set(x_14, 1, x_13); return x_14; } } } } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___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; x_8 = x_3 == x_4; if (x_8 == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; 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; size_t x_24; size_t x_25; lean_dec(x_5); x_9 = lean_array_uget(x_2, x_3); x_10 = lean_ctor_get(x_9, 0); lean_inc(x_10); lean_dec(x_9); x_11 = lean_mk_module_initialization_function_name(x_10); x_12 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__1; x_13 = lean_string_append(x_12, x_11); lean_dec(x_11); x_14 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__2; x_15 = lean_string_append(x_13, x_14); x_16 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__5; lean_inc(x_1); x_17 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_1); x_18 = l_Lean_IR_EmitC_emitDeclInit___closed__2; x_19 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_17); x_20 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_20, 0, x_15); lean_ctor_set(x_20, 1, x_19); x_21 = l_List_forM___at_Lean_IR_EmitC_emitMainFn___spec__3(x_20, x_6, x_7); lean_dec(x_20); x_22 = lean_ctor_get(x_21, 0); lean_inc(x_22); x_23 = lean_ctor_get(x_21, 1); lean_inc(x_23); lean_dec(x_21); x_24 = 1; x_25 = x_3 + x_24; x_3 = x_25; x_5 = x_22; x_7 = x_23; goto _start; } else { lean_object* x_27; lean_dec(x_1); x_27 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_27, 0, x_5); lean_ctor_set(x_27, 1, x_7); return x_27; } } } static lean_object* _init_l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___spec__3___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("(lean_object*);"); return x_1; } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___spec__3(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { uint8_t x_7; x_7 = x_2 == x_3; if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; lean_object* x_20; lean_dec(x_4); x_8 = lean_array_uget(x_1, x_2); x_9 = lean_ctor_get(x_8, 0); lean_inc(x_9); lean_dec(x_8); x_10 = lean_mk_module_initialization_function_name(x_9); x_11 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__1; x_12 = lean_string_append(x_11, x_10); lean_dec(x_10); x_13 = l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___spec__3___closed__1; x_14 = lean_string_append(x_12, x_13); x_15 = lean_string_append(x_6, x_14); lean_dec(x_14); x_16 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; x_17 = lean_string_append(x_15, x_16); x_18 = 1; x_19 = x_2 + x_18; x_20 = lean_box(0); x_2 = x_19; x_4 = x_20; x_6 = x_17; goto _start; } else { lean_object* x_22; x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_4); lean_ctor_set(x_22, 1, x_6); return x_22; } } } static lean_object* _init_l_Lean_IR_EmitC_emitInitFn___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("(lean_object* w) {"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitInitFn___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("_G_initialized = true;"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitInitFn___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); x_2 = l_Lean_IR_EmitC_emitInitFn___closed__2; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitInitFn___closed__4() { _start: { lean_object* x_1; x_1 = lean_mk_string("if (_G_initialized) return lean_io_result_mk_ok(lean_box(0));"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitInitFn___closed__5() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitInitFn___closed__4; x_2 = l_Lean_IR_EmitC_emitInitFn___closed__3; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitInitFn___closed__6() { _start: { lean_object* x_1; x_1 = lean_mk_string("lean_object * res;"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitInitFn___closed__7() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitInitFn___closed__6; x_2 = l_Lean_IR_EmitC_emitInitFn___closed__5; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_IR_EmitC_emitInitFn___closed__8() { _start: { lean_object* x_1; x_1 = lean_mk_string("static bool _G_initialized = false;"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitInitFn___closed__9() { _start: { lean_object* x_1; x_1 = lean_mk_string("return lean_io_result_mk_ok(lean_box(0));"); return x_1; } } static lean_object* _init_l_Lean_IR_EmitC_emitInitFn___closed__10() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_IR_EmitC_emitInitFn___closed__9; x_2 = l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__12; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } lean_object* l_Lean_IR_EmitC_emitInitFn(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_66; uint8_t x_67; x_3 = l_Lean_IR_EmitC_getEnv(x_1, x_2); x_4 = lean_ctor_get(x_3, 0); lean_inc(x_4); x_5 = lean_ctor_get(x_3, 1); lean_inc(x_5); lean_dec(x_3); x_6 = l_Lean_IR_EmitC_getModName(x_1, x_5); x_7 = lean_ctor_get(x_6, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_6, 1); lean_inc(x_8); lean_dec(x_6); x_9 = l_Lean_Environment_imports(x_4); x_10 = lean_array_get_size(x_9); x_66 = lean_unsigned_to_nat(0u); x_67 = lean_nat_dec_lt(x_66, x_10); if (x_67 == 0) { x_11 = x_8; goto block_65; } else { uint8_t x_68; x_68 = lean_nat_dec_le(x_10, x_10); if (x_68 == 0) { x_11 = x_8; goto block_65; } else { size_t x_69; size_t x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; x_69 = 0; x_70 = lean_usize_of_nat(x_10); x_71 = lean_box(0); x_72 = l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___spec__3(x_9, x_69, x_70, x_71, x_1, x_8); x_73 = lean_ctor_get(x_72, 1); lean_inc(x_73); lean_dec(x_72); x_11 = x_73; goto block_65; } } block_65: { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; x_12 = lean_mk_module_initialization_function_name(x_7); x_13 = l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__1; x_14 = lean_string_append(x_13, x_12); lean_dec(x_12); x_15 = l_Lean_IR_EmitC_emitInitFn___closed__1; x_16 = lean_string_append(x_14, x_15); x_17 = lean_box(0); x_18 = l_Lean_IR_EmitC_emitInitFn___closed__7; x_19 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_19, 0, x_16); lean_ctor_set(x_19, 1, x_18); x_20 = l_Lean_IR_EmitC_emitInitFn___closed__8; x_21 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_21, 0, x_20); lean_ctor_set(x_21, 1, x_19); x_22 = l_List_forM___at_Lean_IR_EmitC_emitMainFn___spec__3(x_21, x_1, x_11); lean_dec(x_21); x_23 = lean_ctor_get(x_22, 1); lean_inc(x_23); lean_dec(x_22); x_24 = lean_unsigned_to_nat(0u); x_25 = lean_nat_dec_lt(x_24, x_10); if (x_25 == 0) { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_dec(x_10); lean_dec(x_9); x_26 = l_Lean_IR_declMapExt; x_27 = l_Lean_SimplePersistentEnvExtension_getEntries___rarg(x_26, x_4); lean_dec(x_4); x_28 = l_List_reverse___rarg(x_27); x_29 = l_List_forM___at_Lean_IR_EmitC_emitInitFn___spec__1(x_28, x_1, x_23); lean_dec(x_28); if (lean_obj_tag(x_29) == 0) { lean_object* x_30; lean_object* x_31; lean_object* x_32; x_30 = lean_ctor_get(x_29, 1); lean_inc(x_30); lean_dec(x_29); x_31 = l_Lean_IR_EmitC_emitInitFn___closed__10; x_32 = l_List_forM___at_Lean_IR_EmitC_emitMainFn___spec__3(x_31, x_1, x_30); return x_32; } else { uint8_t x_33; x_33 = !lean_is_exclusive(x_29); if (x_33 == 0) { return x_29; } else { lean_object* x_34; lean_object* x_35; lean_object* x_36; x_34 = lean_ctor_get(x_29, 0); x_35 = lean_ctor_get(x_29, 1); lean_inc(x_35); lean_inc(x_34); lean_dec(x_29); 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; } } } else { uint8_t x_37; x_37 = lean_nat_dec_le(x_10, x_10); if (x_37 == 0) { lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_dec(x_10); lean_dec(x_9); x_38 = l_Lean_IR_declMapExt; x_39 = l_Lean_SimplePersistentEnvExtension_getEntries___rarg(x_38, x_4); lean_dec(x_4); x_40 = l_List_reverse___rarg(x_39); x_41 = l_List_forM___at_Lean_IR_EmitC_emitInitFn___spec__1(x_40, x_1, x_23); lean_dec(x_40); if (lean_obj_tag(x_41) == 0) { lean_object* x_42; lean_object* x_43; lean_object* x_44; x_42 = lean_ctor_get(x_41, 1); lean_inc(x_42); lean_dec(x_41); x_43 = l_Lean_IR_EmitC_emitInitFn___closed__10; x_44 = l_List_forM___at_Lean_IR_EmitC_emitMainFn___spec__3(x_43, x_1, x_42); return x_44; } else { uint8_t x_45; x_45 = !lean_is_exclusive(x_41); if (x_45 == 0) { return x_41; } else { lean_object* x_46; lean_object* x_47; lean_object* x_48; x_46 = lean_ctor_get(x_41, 0); x_47 = lean_ctor_get(x_41, 1); lean_inc(x_47); lean_inc(x_46); lean_dec(x_41); x_48 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_48, 0, x_46); lean_ctor_set(x_48, 1, x_47); return x_48; } } } else { size_t x_49; size_t x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; x_49 = 0; x_50 = lean_usize_of_nat(x_10); lean_dec(x_10); x_51 = lean_box(0); x_52 = l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___spec__2(x_17, x_9, x_49, x_50, x_51, x_1, x_23); lean_dec(x_9); x_53 = lean_ctor_get(x_52, 1); lean_inc(x_53); lean_dec(x_52); x_54 = l_Lean_IR_declMapExt; x_55 = l_Lean_SimplePersistentEnvExtension_getEntries___rarg(x_54, x_4); lean_dec(x_4); x_56 = l_List_reverse___rarg(x_55); x_57 = l_List_forM___at_Lean_IR_EmitC_emitInitFn___spec__1(x_56, x_1, x_53); lean_dec(x_56); if (lean_obj_tag(x_57) == 0) { lean_object* x_58; lean_object* x_59; lean_object* x_60; x_58 = lean_ctor_get(x_57, 1); lean_inc(x_58); lean_dec(x_57); x_59 = l_Lean_IR_EmitC_emitInitFn___closed__10; x_60 = l_List_forM___at_Lean_IR_EmitC_emitMainFn___spec__3(x_59, x_1, x_58); return x_60; } else { uint8_t x_61; x_61 = !lean_is_exclusive(x_57); if (x_61 == 0) { return x_57; } else { lean_object* x_62; lean_object* x_63; lean_object* x_64; x_62 = lean_ctor_get(x_57, 0); x_63 = lean_ctor_get(x_57, 1); lean_inc(x_63); lean_inc(x_62); lean_dec(x_57); x_64 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_64, 0, x_62); lean_ctor_set(x_64, 1, x_63); return x_64; } } } } } } } lean_object* l_List_forM___at_Lean_IR_EmitC_emitInitFn___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; x_4 = l_List_forM___at_Lean_IR_EmitC_emitInitFn___spec__1(x_1, x_2, x_3); lean_dec(x_2); lean_dec(x_1); return x_4; } } lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___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; 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_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___spec__2(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_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___spec__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) { _start: { size_t x_7; size_t x_8; lean_object* x_9; x_7 = lean_unbox_usize(x_2); lean_dec(x_2); x_8 = lean_unbox_usize(x_3); lean_dec(x_3); x_9 = l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___spec__3(x_1, x_7, x_8, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_1); return x_9; } } lean_object* l_Lean_IR_EmitC_emitInitFn___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_IR_EmitC_emitInitFn(x_1, x_2); lean_dec(x_1); return x_3; } } lean_object* l_Lean_IR_EmitC_main(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = l_Lean_IR_EmitC_emitFileHeader(x_1, x_2); x_4 = lean_ctor_get(x_3, 1); lean_inc(x_4); lean_dec(x_3); lean_inc(x_1); x_5 = l_Lean_IR_EmitC_emitFnDecls(x_1, x_4); if (lean_obj_tag(x_5) == 0) { lean_object* x_6; lean_object* x_7; x_6 = lean_ctor_get(x_5, 1); lean_inc(x_6); lean_dec(x_5); lean_inc(x_1); x_7 = l_Lean_IR_EmitC_emitFns(x_1, x_6); if (lean_obj_tag(x_7) == 0) { lean_object* x_8; lean_object* x_9; x_8 = lean_ctor_get(x_7, 1); lean_inc(x_8); lean_dec(x_7); x_9 = l_Lean_IR_EmitC_emitInitFn(x_1, x_8); if (lean_obj_tag(x_9) == 0) { lean_object* x_10; lean_object* x_11; x_10 = lean_ctor_get(x_9, 1); lean_inc(x_10); lean_dec(x_9); x_11 = l_Lean_IR_EmitC_emitMainFnIfNeeded(x_1, x_10); 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_IR_EmitC_emitFileFooter(x_1, x_12); lean_dec(x_1); return x_13; } else { uint8_t x_14; lean_dec(x_1); x_14 = !lean_is_exclusive(x_11); if (x_14 == 0) { return x_11; } else { lean_object* x_15; lean_object* x_16; lean_object* x_17; x_15 = lean_ctor_get(x_11, 0); x_16 = lean_ctor_get(x_11, 1); lean_inc(x_16); lean_inc(x_15); lean_dec(x_11); x_17 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_17, 0, x_15); lean_ctor_set(x_17, 1, x_16); return x_17; } } } else { uint8_t x_18; lean_dec(x_1); x_18 = !lean_is_exclusive(x_9); if (x_18 == 0) { return x_9; } else { lean_object* x_19; lean_object* x_20; lean_object* x_21; x_19 = lean_ctor_get(x_9, 0); x_20 = lean_ctor_get(x_9, 1); lean_inc(x_20); lean_inc(x_19); lean_dec(x_9); x_21 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_21, 0, x_19); lean_ctor_set(x_21, 1, x_20); return x_21; } } } else { uint8_t x_22; lean_dec(x_1); x_22 = !lean_is_exclusive(x_7); if (x_22 == 0) { return x_7; } else { lean_object* x_23; lean_object* x_24; lean_object* x_25; x_23 = lean_ctor_get(x_7, 0); x_24 = lean_ctor_get(x_7, 1); lean_inc(x_24); lean_inc(x_23); lean_dec(x_7); 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; } } } else { uint8_t x_26; lean_dec(x_1); x_26 = !lean_is_exclusive(x_5); if (x_26 == 0) { return x_5; } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; x_27 = lean_ctor_get(x_5, 0); x_28 = lean_ctor_get(x_5, 1); lean_inc(x_28); lean_inc(x_27); lean_dec(x_5); x_29 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_29, 0, x_27); lean_ctor_set(x_29, 1, x_28); return x_29; } } } } lean_object* l_Lean_IR_emitC_match__1___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_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_object* x_8; lean_object* x_9; lean_dec(x_2); x_7 = lean_ctor_get(x_1, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_1, 1); lean_inc(x_8); lean_dec(x_1); x_9 = lean_apply_2(x_3, x_7, x_8); return x_9; } } } lean_object* l_Lean_IR_emitC_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_IR_emitC_match__1___rarg), 3, 0); return x_2; } } lean_object* lean_ir_emit_c(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_3 = l_Std_HashMap_instInhabitedHashMap___closed__1; x_4 = lean_box(0); x_5 = l_Array_empty___closed__1; x_6 = lean_alloc_ctor(0, 5, 0); lean_ctor_set(x_6, 0, x_1); 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(x_6, 4, x_5); x_7 = l_Lean_instInhabitedParserDescr___closed__1; x_8 = l_Lean_IR_EmitC_main(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, 1); lean_inc(x_9); lean_dec(x_8); x_10 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_10, 0, x_9); return x_10; } else { lean_object* x_11; lean_object* x_12; x_11 = lean_ctor_get(x_8, 0); lean_inc(x_11); lean_dec(x_8); x_12 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_12, 0, x_11); return x_12; } } } lean_object* initialize_Init(lean_object*); lean_object* initialize_Lean_Runtime(lean_object*); lean_object* initialize_Lean_Compiler_NameMangling(lean_object*); lean_object* initialize_Lean_Compiler_ExportAttr(lean_object*); lean_object* initialize_Lean_Compiler_InitAttr(lean_object*); lean_object* initialize_Lean_Compiler_IR_CompilerM(lean_object*); lean_object* initialize_Lean_Compiler_IR_EmitUtil(lean_object*); lean_object* initialize_Lean_Compiler_IR_NormIds(lean_object*); lean_object* initialize_Lean_Compiler_IR_SimpCase(lean_object*); lean_object* initialize_Lean_Compiler_IR_Boxing(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Compiler_IR_EmitC(lean_object* w) { lean_object * res; if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); _G_initialized = true; res = initialize_Init(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Runtime(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Compiler_NameMangling(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Compiler_ExportAttr(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Compiler_InitAttr(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Compiler_IR_CompilerM(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Compiler_IR_EmitUtil(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Compiler_IR_NormIds(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Compiler_IR_SimpCase(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Compiler_IR_Boxing(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_IR_EmitC_leanMainFn___closed__1 = _init_l_Lean_IR_EmitC_leanMainFn___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_leanMainFn___closed__1); l_Lean_IR_EmitC_leanMainFn = _init_l_Lean_IR_EmitC_leanMainFn(); lean_mark_persistent(l_Lean_IR_EmitC_leanMainFn); l_Lean_IR_EmitC_Context_jpMap___default = _init_l_Lean_IR_EmitC_Context_jpMap___default(); lean_mark_persistent(l_Lean_IR_EmitC_Context_jpMap___default); l_Lean_IR_EmitC_Context_mainFn___default = _init_l_Lean_IR_EmitC_Context_mainFn___default(); lean_mark_persistent(l_Lean_IR_EmitC_Context_mainFn___default); l_Lean_IR_EmitC_Context_mainParams___default = _init_l_Lean_IR_EmitC_Context_mainParams___default(); lean_mark_persistent(l_Lean_IR_EmitC_Context_mainParams___default); l_Lean_IR_EmitC_argToCString___closed__1 = _init_l_Lean_IR_EmitC_argToCString___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_argToCString___closed__1); l_Lean_IR_EmitC_toCType___closed__1 = _init_l_Lean_IR_EmitC_toCType___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_toCType___closed__1); l_Lean_IR_EmitC_toCType___closed__2 = _init_l_Lean_IR_EmitC_toCType___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_toCType___closed__2); l_Lean_IR_EmitC_toCType___closed__3 = _init_l_Lean_IR_EmitC_toCType___closed__3(); lean_mark_persistent(l_Lean_IR_EmitC_toCType___closed__3); l_Lean_IR_EmitC_toCType___closed__4 = _init_l_Lean_IR_EmitC_toCType___closed__4(); lean_mark_persistent(l_Lean_IR_EmitC_toCType___closed__4); l_Lean_IR_EmitC_toCType___closed__5 = _init_l_Lean_IR_EmitC_toCType___closed__5(); lean_mark_persistent(l_Lean_IR_EmitC_toCType___closed__5); l_Lean_IR_EmitC_toCType___closed__6 = _init_l_Lean_IR_EmitC_toCType___closed__6(); lean_mark_persistent(l_Lean_IR_EmitC_toCType___closed__6); l_Lean_IR_EmitC_toCType___closed__7 = _init_l_Lean_IR_EmitC_toCType___closed__7(); lean_mark_persistent(l_Lean_IR_EmitC_toCType___closed__7); l_Lean_IR_EmitC_toCType___closed__8 = _init_l_Lean_IR_EmitC_toCType___closed__8(); lean_mark_persistent(l_Lean_IR_EmitC_toCType___closed__8); l_Lean_IR_EmitC_toCType___closed__9 = _init_l_Lean_IR_EmitC_toCType___closed__9(); lean_mark_persistent(l_Lean_IR_EmitC_toCType___closed__9); l_Lean_IR_EmitC_toCType___closed__10 = _init_l_Lean_IR_EmitC_toCType___closed__10(); lean_mark_persistent(l_Lean_IR_EmitC_toCType___closed__10); l_Lean_IR_EmitC_toCType___closed__11 = _init_l_Lean_IR_EmitC_toCType___closed__11(); lean_mark_persistent(l_Lean_IR_EmitC_toCType___closed__11); l_Lean_IR_EmitC_toCType___closed__12 = _init_l_Lean_IR_EmitC_toCType___closed__12(); lean_mark_persistent(l_Lean_IR_EmitC_toCType___closed__12); l_Lean_IR_EmitC_throwInvalidExportName___rarg___closed__1 = _init_l_Lean_IR_EmitC_throwInvalidExportName___rarg___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_throwInvalidExportName___rarg___closed__1); l_Lean_IR_EmitC_toCName___closed__1 = _init_l_Lean_IR_EmitC_toCName___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_toCName___closed__1); l_Lean_IR_EmitC_toCInitName___closed__1 = _init_l_Lean_IR_EmitC_toCInitName___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_toCInitName___closed__1); l_Lean_IR_EmitC_emitFnDeclAux___lambda__3___closed__1 = _init_l_Lean_IR_EmitC_emitFnDeclAux___lambda__3___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitFnDeclAux___lambda__3___closed__1); l_Lean_IR_EmitC_emitFnDeclAux___lambda__3___closed__2 = _init_l_Lean_IR_EmitC_emitFnDeclAux___lambda__3___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitFnDeclAux___lambda__3___closed__2); l_List_forM___at_Lean_IR_EmitC_emitFnDecls___spec__5___closed__1 = _init_l_List_forM___at_Lean_IR_EmitC_emitFnDecls___spec__5___closed__1(); lean_mark_persistent(l_List_forM___at_Lean_IR_EmitC_emitFnDecls___spec__5___closed__1); l_List_forM___at_Lean_IR_EmitC_emitFnDecls___spec__5___closed__2 = _init_l_List_forM___at_Lean_IR_EmitC_emitFnDecls___spec__5___closed__2(); lean_mark_persistent(l_List_forM___at_Lean_IR_EmitC_emitFnDecls___spec__5___closed__2); l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__1 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__1); l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__2 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__2); l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__3 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__3(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__3); l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__4 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__4(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__4); l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__5 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__5(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__5); l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__6 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__6(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__6); l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__7 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__7(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__7); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__1 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__1); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__2 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__2); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__3 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__3(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__3); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__4 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__4(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__4); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__5 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__5(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__5); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__6 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__6(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__6); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__7 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__7(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__7); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__8 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__8(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__8); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__9 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__9(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__9); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__10 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__10(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__10); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__11 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__11(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__11); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__12 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__12(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__12); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__13 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__13(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__13); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__14 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__14(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__14); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__15 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__15(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__15); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__16 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__16(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__16); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__17 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__17(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__17); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__18 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__18(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__18); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__19 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__19(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__19); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__20 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__20(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__20); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__21 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__21(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__21); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__22 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__22(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__22); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__23 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__23(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__23); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__24 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__24(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__24); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__25 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__25(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__25); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__26 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__26(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__26); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__27 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__27(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__27); l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__28 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__28(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__28); l_Lean_IR_EmitC_emitMainFn___lambda__3___closed__1 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__3___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__3___closed__1); l_Lean_IR_EmitC_emitMainFn___lambda__3___closed__2 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__3___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__3___closed__2); l_Lean_IR_EmitC_emitMainFn___lambda__3___closed__3 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__3___closed__3(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__3___closed__3); l_Lean_IR_EmitC_emitMainFn___lambda__4___closed__1 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__4___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__4___closed__1); l_Lean_IR_EmitC_emitMainFn___lambda__4___closed__2 = _init_l_Lean_IR_EmitC_emitMainFn___lambda__4___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___lambda__4___closed__2); l_Lean_IR_EmitC_emitMainFn___closed__1 = _init_l_Lean_IR_EmitC_emitMainFn___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___closed__1); l_Lean_IR_EmitC_emitMainFn___closed__2 = _init_l_Lean_IR_EmitC_emitMainFn___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitMainFn___closed__2); l_Lean_IR_EmitC_emitFileHeader___closed__1 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__1); l_Lean_IR_EmitC_emitFileHeader___closed__2 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__2); l_Lean_IR_EmitC_emitFileHeader___closed__3 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__3(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__3); l_Lean_IR_EmitC_emitFileHeader___closed__4 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__4(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__4); l_Lean_IR_EmitC_emitFileHeader___closed__5 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__5(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__5); l_Lean_IR_EmitC_emitFileHeader___closed__6 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__6(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__6); l_Lean_IR_EmitC_emitFileHeader___closed__7 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__7(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__7); l_Lean_IR_EmitC_emitFileHeader___closed__8 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__8(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__8); l_Lean_IR_EmitC_emitFileHeader___closed__9 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__9(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__9); l_Lean_IR_EmitC_emitFileHeader___closed__10 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__10(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__10); l_Lean_IR_EmitC_emitFileHeader___closed__11 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__11(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__11); l_Lean_IR_EmitC_emitFileHeader___closed__12 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__12(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__12); l_Lean_IR_EmitC_emitFileHeader___closed__13 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__13(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__13); l_Lean_IR_EmitC_emitFileHeader___closed__14 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__14(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__14); l_Lean_IR_EmitC_emitFileHeader___closed__15 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__15(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__15); l_Lean_IR_EmitC_emitFileHeader___closed__16 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__16(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__16); l_Lean_IR_EmitC_emitFileHeader___closed__17 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__17(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__17); l_Lean_IR_EmitC_emitFileHeader___closed__18 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__18(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__18); l_Lean_IR_EmitC_emitFileHeader___closed__19 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__19(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__19); l_Lean_IR_EmitC_emitFileHeader___closed__20 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__20(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__20); l_Lean_IR_EmitC_emitFileHeader___closed__21 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__21(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__21); l_Lean_IR_EmitC_emitFileHeader___closed__22 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__22(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__22); l_Lean_IR_EmitC_emitFileHeader___closed__23 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__23(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__23); l_Lean_IR_EmitC_emitFileHeader___closed__24 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__24(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__24); l_Lean_IR_EmitC_emitFileHeader___closed__25 = _init_l_Lean_IR_EmitC_emitFileHeader___closed__25(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileHeader___closed__25); l_Lean_IR_EmitC_emitFileFooter___closed__1 = _init_l_Lean_IR_EmitC_emitFileFooter___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileFooter___closed__1); l_Lean_IR_EmitC_emitFileFooter___closed__2 = _init_l_Lean_IR_EmitC_emitFileFooter___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitFileFooter___closed__2); l_Lean_IR_EmitC_throwUnknownVar___rarg___closed__1 = _init_l_Lean_IR_EmitC_throwUnknownVar___rarg___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_throwUnknownVar___rarg___closed__1); l_Lean_IR_EmitC_getJPParams___closed__1 = _init_l_Lean_IR_EmitC_getJPParams___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_getJPParams___closed__1); l_Lean_IR_EmitC_declareVar___closed__1 = _init_l_Lean_IR_EmitC_declareVar___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_declareVar___closed__1); l_Lean_IR_EmitC_emitTag___closed__1 = _init_l_Lean_IR_EmitC_emitTag___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitTag___closed__1); l_Lean_IR_EmitC_emitInc___lambda__1___closed__1 = _init_l_Lean_IR_EmitC_emitInc___lambda__1___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitInc___lambda__1___closed__1); l_Lean_IR_EmitC_emitInc___closed__1 = _init_l_Lean_IR_EmitC_emitInc___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitInc___closed__1); l_Lean_IR_EmitC_emitInc___closed__2 = _init_l_Lean_IR_EmitC_emitInc___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitInc___closed__2); l_Lean_IR_EmitC_emitInc___closed__3 = _init_l_Lean_IR_EmitC_emitInc___closed__3(); lean_mark_persistent(l_Lean_IR_EmitC_emitInc___closed__3); l_Lean_IR_EmitC_emitInc___closed__4 = _init_l_Lean_IR_EmitC_emitInc___closed__4(); lean_mark_persistent(l_Lean_IR_EmitC_emitInc___closed__4); l_Lean_IR_EmitC_emitInc___closed__5 = _init_l_Lean_IR_EmitC_emitInc___closed__5(); lean_mark_persistent(l_Lean_IR_EmitC_emitInc___closed__5); l_Lean_IR_EmitC_emitDec___closed__1 = _init_l_Lean_IR_EmitC_emitDec___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitDec___closed__1); l_Lean_IR_EmitC_emitDec___closed__2 = _init_l_Lean_IR_EmitC_emitDec___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitDec___closed__2); l_Lean_IR_EmitC_emitDel___closed__1 = _init_l_Lean_IR_EmitC_emitDel___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitDel___closed__1); l_Lean_IR_EmitC_emitSetTag___closed__1 = _init_l_Lean_IR_EmitC_emitSetTag___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitSetTag___closed__1); l_Lean_IR_EmitC_emitSet___closed__1 = _init_l_Lean_IR_EmitC_emitSet___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitSet___closed__1); l_Lean_IR_EmitC_emitOffset___closed__1 = _init_l_Lean_IR_EmitC_emitOffset___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitOffset___closed__1); l_Lean_IR_EmitC_emitUSet___closed__1 = _init_l_Lean_IR_EmitC_emitUSet___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitUSet___closed__1); l_Lean_IR_EmitC_emitSSet___closed__1 = _init_l_Lean_IR_EmitC_emitSSet___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitSSet___closed__1); l_Lean_IR_EmitC_emitSSet___closed__2 = _init_l_Lean_IR_EmitC_emitSSet___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitSSet___closed__2); l_Lean_IR_EmitC_emitSSet___closed__3 = _init_l_Lean_IR_EmitC_emitSSet___closed__3(); lean_mark_persistent(l_Lean_IR_EmitC_emitSSet___closed__3); l_Lean_IR_EmitC_emitSSet___closed__4 = _init_l_Lean_IR_EmitC_emitSSet___closed__4(); lean_mark_persistent(l_Lean_IR_EmitC_emitSSet___closed__4); l_Lean_IR_EmitC_emitSSet___closed__5 = _init_l_Lean_IR_EmitC_emitSSet___closed__5(); lean_mark_persistent(l_Lean_IR_EmitC_emitSSet___closed__5); l_Lean_IR_EmitC_emitSSet___closed__6 = _init_l_Lean_IR_EmitC_emitSSet___closed__6(); lean_mark_persistent(l_Lean_IR_EmitC_emitSSet___closed__6); l_Lean_IR_EmitC_emitJmp___lambda__1___closed__1 = _init_l_Lean_IR_EmitC_emitJmp___lambda__1___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitJmp___lambda__1___closed__1); l_Lean_IR_EmitC_emitJmp___closed__1 = _init_l_Lean_IR_EmitC_emitJmp___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitJmp___closed__1); l_Lean_IR_EmitC_emitCtorScalarSize___closed__1 = _init_l_Lean_IR_EmitC_emitCtorScalarSize___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitCtorScalarSize___closed__1); l_Lean_IR_EmitC_emitAllocCtor___closed__1 = _init_l_Lean_IR_EmitC_emitAllocCtor___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitAllocCtor___closed__1); l_Lean_IR_EmitC_emitCtor___closed__1 = _init_l_Lean_IR_EmitC_emitCtor___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitCtor___closed__1); l_Nat_forM_loop___at_Lean_IR_EmitC_emitReset___spec__1___closed__1 = _init_l_Nat_forM_loop___at_Lean_IR_EmitC_emitReset___spec__1___closed__1(); lean_mark_persistent(l_Nat_forM_loop___at_Lean_IR_EmitC_emitReset___spec__1___closed__1); l_Lean_IR_EmitC_emitReset___closed__1 = _init_l_Lean_IR_EmitC_emitReset___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitReset___closed__1); l_Lean_IR_EmitC_emitReset___closed__2 = _init_l_Lean_IR_EmitC_emitReset___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitReset___closed__2); l_Lean_IR_EmitC_emitReset___closed__3 = _init_l_Lean_IR_EmitC_emitReset___closed__3(); lean_mark_persistent(l_Lean_IR_EmitC_emitReset___closed__3); l_Lean_IR_EmitC_emitReset___closed__4 = _init_l_Lean_IR_EmitC_emitReset___closed__4(); lean_mark_persistent(l_Lean_IR_EmitC_emitReset___closed__4); l_Lean_IR_EmitC_emitReuse___closed__1 = _init_l_Lean_IR_EmitC_emitReuse___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitReuse___closed__1); l_Lean_IR_EmitC_emitReuse___closed__2 = _init_l_Lean_IR_EmitC_emitReuse___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitReuse___closed__2); l_Lean_IR_EmitC_emitProj___closed__1 = _init_l_Lean_IR_EmitC_emitProj___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitProj___closed__1); l_Lean_IR_EmitC_emitUProj___closed__1 = _init_l_Lean_IR_EmitC_emitUProj___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitUProj___closed__1); l_Lean_IR_EmitC_emitSProj___closed__1 = _init_l_Lean_IR_EmitC_emitSProj___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitSProj___closed__1); l_Lean_IR_EmitC_emitSProj___closed__2 = _init_l_Lean_IR_EmitC_emitSProj___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitSProj___closed__2); l_Lean_IR_EmitC_emitSProj___closed__3 = _init_l_Lean_IR_EmitC_emitSProj___closed__3(); lean_mark_persistent(l_Lean_IR_EmitC_emitSProj___closed__3); l_Lean_IR_EmitC_emitSProj___closed__4 = _init_l_Lean_IR_EmitC_emitSProj___closed__4(); lean_mark_persistent(l_Lean_IR_EmitC_emitSProj___closed__4); l_Lean_IR_EmitC_emitSProj___closed__5 = _init_l_Lean_IR_EmitC_emitSProj___closed__5(); lean_mark_persistent(l_Lean_IR_EmitC_emitSProj___closed__5); l_Lean_IR_EmitC_emitExternCall___closed__1 = _init_l_Lean_IR_EmitC_emitExternCall___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitExternCall___closed__1); l_Nat_forM_loop___at_Lean_IR_EmitC_emitPartialApp___spec__1___closed__1 = _init_l_Nat_forM_loop___at_Lean_IR_EmitC_emitPartialApp___spec__1___closed__1(); lean_mark_persistent(l_Nat_forM_loop___at_Lean_IR_EmitC_emitPartialApp___spec__1___closed__1); l_Lean_IR_EmitC_emitPartialApp___closed__1 = _init_l_Lean_IR_EmitC_emitPartialApp___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitPartialApp___closed__1); l_Lean_IR_EmitC_emitPartialApp___closed__2 = _init_l_Lean_IR_EmitC_emitPartialApp___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitPartialApp___closed__2); l_Lean_IR_EmitC_emitApp___closed__1 = _init_l_Lean_IR_EmitC_emitApp___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitApp___closed__1); l_Lean_IR_EmitC_emitApp___closed__2 = _init_l_Lean_IR_EmitC_emitApp___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitApp___closed__2); l_Lean_IR_EmitC_emitApp___closed__3 = _init_l_Lean_IR_EmitC_emitApp___closed__3(); lean_mark_persistent(l_Lean_IR_EmitC_emitApp___closed__3); l_Lean_IR_EmitC_emitApp___closed__4 = _init_l_Lean_IR_EmitC_emitApp___closed__4(); lean_mark_persistent(l_Lean_IR_EmitC_emitApp___closed__4); l_Lean_IR_EmitC_emitApp___closed__5 = _init_l_Lean_IR_EmitC_emitApp___closed__5(); lean_mark_persistent(l_Lean_IR_EmitC_emitApp___closed__5); l_Lean_IR_EmitC_emitBoxFn___closed__1 = _init_l_Lean_IR_EmitC_emitBoxFn___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitBoxFn___closed__1); l_Lean_IR_EmitC_emitBoxFn___closed__2 = _init_l_Lean_IR_EmitC_emitBoxFn___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitBoxFn___closed__2); l_Lean_IR_EmitC_emitBoxFn___closed__3 = _init_l_Lean_IR_EmitC_emitBoxFn___closed__3(); lean_mark_persistent(l_Lean_IR_EmitC_emitBoxFn___closed__3); l_Lean_IR_EmitC_emitBoxFn___closed__4 = _init_l_Lean_IR_EmitC_emitBoxFn___closed__4(); lean_mark_persistent(l_Lean_IR_EmitC_emitBoxFn___closed__4); l_Lean_IR_EmitC_emitBoxFn___closed__5 = _init_l_Lean_IR_EmitC_emitBoxFn___closed__5(); lean_mark_persistent(l_Lean_IR_EmitC_emitBoxFn___closed__5); l_Lean_IR_EmitC_emitUnbox___closed__1 = _init_l_Lean_IR_EmitC_emitUnbox___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitUnbox___closed__1); l_Lean_IR_EmitC_emitUnbox___closed__2 = _init_l_Lean_IR_EmitC_emitUnbox___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitUnbox___closed__2); l_Lean_IR_EmitC_emitUnbox___closed__3 = _init_l_Lean_IR_EmitC_emitUnbox___closed__3(); lean_mark_persistent(l_Lean_IR_EmitC_emitUnbox___closed__3); l_Lean_IR_EmitC_emitUnbox___closed__4 = _init_l_Lean_IR_EmitC_emitUnbox___closed__4(); lean_mark_persistent(l_Lean_IR_EmitC_emitUnbox___closed__4); l_Lean_IR_EmitC_emitUnbox___closed__5 = _init_l_Lean_IR_EmitC_emitUnbox___closed__5(); lean_mark_persistent(l_Lean_IR_EmitC_emitUnbox___closed__5); l_Lean_IR_EmitC_emitIsShared___closed__1 = _init_l_Lean_IR_EmitC_emitIsShared___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitIsShared___closed__1); l_Lean_IR_EmitC_emitIsTaggedPtr___closed__1 = _init_l_Lean_IR_EmitC_emitIsTaggedPtr___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitIsTaggedPtr___closed__1); l_Lean_IR_EmitC_quoteString___closed__1 = _init_l_Lean_IR_EmitC_quoteString___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_quoteString___closed__1); l_Lean_IR_EmitC_emitNumLit___closed__1 = _init_l_Lean_IR_EmitC_emitNumLit___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitNumLit___closed__1); l_Lean_IR_EmitC_emitNumLit___closed__2 = _init_l_Lean_IR_EmitC_emitNumLit___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitNumLit___closed__2); l_Lean_IR_EmitC_emitNumLit___closed__3 = _init_l_Lean_IR_EmitC_emitNumLit___closed__3(); lean_mark_persistent(l_Lean_IR_EmitC_emitNumLit___closed__3); l_Lean_IR_EmitC_emitNumLit___closed__4 = _init_l_Lean_IR_EmitC_emitNumLit___closed__4(); lean_mark_persistent(l_Lean_IR_EmitC_emitNumLit___closed__4); l_Lean_IR_EmitC_emitLit___closed__1 = _init_l_Lean_IR_EmitC_emitLit___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitLit___closed__1); l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__2___closed__1 = _init_l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__2___closed__1(); lean_mark_persistent(l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__2___closed__1); l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__3___closed__1 = _init_l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__3___closed__1(); lean_mark_persistent(l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__3___closed__1); l_Lean_IR_EmitC_emitTailCall___lambda__1___closed__1 = _init_l_Lean_IR_EmitC_emitTailCall___lambda__1___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitTailCall___lambda__1___closed__1); l_Lean_IR_EmitC_emitTailCall___lambda__2___closed__1 = _init_l_Lean_IR_EmitC_emitTailCall___lambda__2___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitTailCall___lambda__2___closed__1); l_Lean_IR_EmitC_emitTailCall___closed__1 = _init_l_Lean_IR_EmitC_emitTailCall___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitTailCall___closed__1); l_Lean_IR_EmitC_emitTailCall___closed__2 = _init_l_Lean_IR_EmitC_emitTailCall___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitTailCall___closed__2); l_Lean_IR_EmitC_emitIf___closed__1 = _init_l_Lean_IR_EmitC_emitIf___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitIf___closed__1); l_Lean_IR_EmitC_emitBlock___closed__1 = _init_l_Lean_IR_EmitC_emitBlock___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitBlock___closed__1); l_Lean_IR_EmitC_emitBlock___closed__2 = _init_l_Lean_IR_EmitC_emitBlock___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitBlock___closed__2); l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitCase___spec__1___closed__1 = _init_l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitCase___spec__1___closed__1(); lean_mark_persistent(l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitCase___spec__1___closed__1); l_Lean_IR_EmitC_emitCase___closed__1 = _init_l_Lean_IR_EmitC_emitCase___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitCase___closed__1); l_Lean_IR_EmitC_emitCase___closed__2 = _init_l_Lean_IR_EmitC_emitCase___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitCase___closed__2); l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__1 = _init_l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__1(); lean_mark_persistent(l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__1); l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__2 = _init_l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__2(); lean_mark_persistent(l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__2); l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__3 = _init_l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__3(); lean_mark_persistent(l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__3); l_Lean_IR_EmitC_emitDeclAux___lambda__1___closed__1 = _init_l_Lean_IR_EmitC_emitDeclAux___lambda__1___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitDeclAux___lambda__1___closed__1); l_Lean_IR_EmitC_emitDeclAux___lambda__2___closed__1 = _init_l_Lean_IR_EmitC_emitDeclAux___lambda__2___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitDeclAux___lambda__2___closed__1); l_Lean_IR_EmitC_emitDeclAux___lambda__3___closed__1 = _init_l_Lean_IR_EmitC_emitDeclAux___lambda__3___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitDeclAux___lambda__3___closed__1); l_Lean_IR_EmitC_emitDeclAux___closed__1 = _init_l_Lean_IR_EmitC_emitDeclAux___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitDeclAux___closed__1); l_Lean_IR_EmitC_emitDecl___closed__1 = _init_l_Lean_IR_EmitC_emitDecl___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitDecl___closed__1); l_Lean_IR_EmitC_emitMarkPersistent___closed__1 = _init_l_Lean_IR_EmitC_emitMarkPersistent___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitMarkPersistent___closed__1); l_Lean_IR_EmitC_emitDeclInit___closed__1 = _init_l_Lean_IR_EmitC_emitDeclInit___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitDeclInit___closed__1); l_Lean_IR_EmitC_emitDeclInit___closed__2 = _init_l_Lean_IR_EmitC_emitDeclInit___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitDeclInit___closed__2); l_Lean_IR_EmitC_emitDeclInit___closed__3 = _init_l_Lean_IR_EmitC_emitDeclInit___closed__3(); lean_mark_persistent(l_Lean_IR_EmitC_emitDeclInit___closed__3); l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___spec__3___closed__1 = _init_l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___spec__3___closed__1(); lean_mark_persistent(l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___spec__3___closed__1); l_Lean_IR_EmitC_emitInitFn___closed__1 = _init_l_Lean_IR_EmitC_emitInitFn___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitInitFn___closed__1); l_Lean_IR_EmitC_emitInitFn___closed__2 = _init_l_Lean_IR_EmitC_emitInitFn___closed__2(); lean_mark_persistent(l_Lean_IR_EmitC_emitInitFn___closed__2); l_Lean_IR_EmitC_emitInitFn___closed__3 = _init_l_Lean_IR_EmitC_emitInitFn___closed__3(); lean_mark_persistent(l_Lean_IR_EmitC_emitInitFn___closed__3); l_Lean_IR_EmitC_emitInitFn___closed__4 = _init_l_Lean_IR_EmitC_emitInitFn___closed__4(); lean_mark_persistent(l_Lean_IR_EmitC_emitInitFn___closed__4); l_Lean_IR_EmitC_emitInitFn___closed__5 = _init_l_Lean_IR_EmitC_emitInitFn___closed__5(); lean_mark_persistent(l_Lean_IR_EmitC_emitInitFn___closed__5); l_Lean_IR_EmitC_emitInitFn___closed__6 = _init_l_Lean_IR_EmitC_emitInitFn___closed__6(); lean_mark_persistent(l_Lean_IR_EmitC_emitInitFn___closed__6); l_Lean_IR_EmitC_emitInitFn___closed__7 = _init_l_Lean_IR_EmitC_emitInitFn___closed__7(); lean_mark_persistent(l_Lean_IR_EmitC_emitInitFn___closed__7); l_Lean_IR_EmitC_emitInitFn___closed__8 = _init_l_Lean_IR_EmitC_emitInitFn___closed__8(); lean_mark_persistent(l_Lean_IR_EmitC_emitInitFn___closed__8); l_Lean_IR_EmitC_emitInitFn___closed__9 = _init_l_Lean_IR_EmitC_emitInitFn___closed__9(); lean_mark_persistent(l_Lean_IR_EmitC_emitInitFn___closed__9); l_Lean_IR_EmitC_emitInitFn___closed__10 = _init_l_Lean_IR_EmitC_emitInitFn___closed__10(); lean_mark_persistent(l_Lean_IR_EmitC_emitInitFn___closed__10); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus } #endif
ChrisHughes24/lean4
stage0/stdlib/Lean/PrettyPrinter/Basic.c
// Lean compiler output // Module: Lean.PrettyPrinter.Basic // Imports: Init Lean.InternalExceptionId Lean.KeyedDeclsAttribute #include <lean/lean.h> #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wunused-label" #elif defined(__GNUC__) && !defined(__CLANG__) #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif #ifdef __cplusplus extern "C" { #endif lean_object* l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_stringToMessageData(lean_object*); extern lean_object* l_Lean_Parser_Syntax_addPrec___closed__2; lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__5; lean_object* l_Lean_PrettyPrinter_runForNodeKind_match__1(lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_runForNodeKind(lean_object*); lean_object* l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__8; lean_object* lean_st_ref_get(lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__4; lean_object* l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__2; lean_object* l_Lean_PrettyPrinter_runForNodeKind___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__1; lean_object* l_Lean_ofExcept___at_Lean_PrettyPrinter_runForNodeKind___spec__3___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_runForNodeKind___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_evalConst___at_Lean_PrettyPrinter_runForNodeKind___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_initFn____x40_Lean_PrettyPrinter_Basic___hyg_4_(lean_object*); lean_object* l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__1(lean_object*); lean_object* l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__3; lean_object* l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__6; lean_object* lean_eval_const(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_KeyedDeclsAttribute_getValues___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__4___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isConstOf(lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_initFn____x40_Lean_PrettyPrinter_Basic___hyg_4____closed__1; extern lean_object* l_Lean_KernelException_toMessageData___closed__3; lean_object* l_Lean_getConstInfo___at_Lean_getExternConstArity___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ConstantInfo_type(lean_object*); lean_object* l_Lean_registerInternalExceptionId(lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_initFn____x40_Lean_PrettyPrinter_Basic___hyg_4____closed__2; lean_object* l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__7; lean_object* l_Lean_evalConst___at_Lean_PrettyPrinter_runForNodeKind___spec__2(lean_object*); lean_object* l_Lean_PrettyPrinter_runForNodeKind_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_evalConst___at_Lean_PrettyPrinter_runForNodeKind___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ofExcept___at_Lean_PrettyPrinter_runForNodeKind___spec__3(lean_object*); lean_object* l_Lean_ofExcept___at_Lean_PrettyPrinter_runForNodeKind___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__4(lean_object*); lean_object* l_Lean_PrettyPrinter_backtrackExceptionId; static lean_object* _init_l_Lean_PrettyPrinter_initFn____x40_Lean_PrettyPrinter_Basic___hyg_4____closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("backtrackFormatter"); return x_1; } } static lean_object* _init_l_Lean_PrettyPrinter_initFn____x40_Lean_PrettyPrinter_Basic___hyg_4____closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); x_2 = l_Lean_PrettyPrinter_initFn____x40_Lean_PrettyPrinter_Basic___hyg_4____closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } lean_object* l_Lean_PrettyPrinter_initFn____x40_Lean_PrettyPrinter_Basic___hyg_4_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = l_Lean_PrettyPrinter_initFn____x40_Lean_PrettyPrinter_Basic___hyg_4____closed__2; x_3 = l_Lean_registerInternalExceptionId(x_2, x_1); return x_3; } } lean_object* l_Lean_PrettyPrinter_runForNodeKind_match__1___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_dec(x_2); x_4 = lean_apply_1(x_3, x_1); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_object* x_7; 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; } } } lean_object* l_Lean_PrettyPrinter_runForNodeKind_match__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_runForNodeKind_match__1___rarg), 3, 0); return x_3; } } lean_object* l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__1___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; uint8_t x_7; x_5 = lean_ctor_get(x_2, 3); x_6 = l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1(x_1, x_2, x_3, x_4); x_7 = !lean_is_exclusive(x_6); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; x_8 = lean_ctor_get(x_6, 0); lean_inc(x_5); x_9 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_9, 0, x_5); lean_ctor_set(x_9, 1, x_8); lean_ctor_set_tag(x_6, 1); lean_ctor_set(x_6, 0, x_9); return x_6; } else { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_10 = lean_ctor_get(x_6, 0); x_11 = lean_ctor_get(x_6, 1); lean_inc(x_11); lean_inc(x_10); lean_dec(x_6); lean_inc(x_5); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_5); lean_ctor_set(x_12, 1, x_10); x_13 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_11); return x_13; } } } lean_object* l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__1___rarg___boxed), 4, 0); return x_2; } } lean_object* l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__4___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; uint8_t x_7; x_5 = lean_ctor_get(x_2, 3); x_6 = l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1(x_1, x_2, x_3, x_4); x_7 = !lean_is_exclusive(x_6); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; x_8 = lean_ctor_get(x_6, 0); lean_inc(x_5); x_9 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_9, 0, x_5); lean_ctor_set(x_9, 1, x_8); lean_ctor_set_tag(x_6, 1); lean_ctor_set(x_6, 0, x_9); return x_6; } else { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_10 = lean_ctor_get(x_6, 0); x_11 = lean_ctor_get(x_6, 1); lean_inc(x_11); lean_inc(x_10); lean_dec(x_6); lean_inc(x_5); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_5); lean_ctor_set(x_12, 1, x_10); x_13 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_11); return x_13; } } } lean_object* l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__4(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__4___rarg___boxed), 4, 0); return x_2; } } lean_object* l_Lean_ofExcept___at_Lean_PrettyPrinter_runForNodeKind___spec__3___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); x_6 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_6, 0, x_5); x_7 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_7, 0, x_6); x_8 = l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__4___rarg(x_7, x_2, x_3, x_4); return x_8; } else { lean_object* x_9; lean_object* x_10; x_9 = lean_ctor_get(x_1, 0); lean_inc(x_9); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_10, 1, x_4); return x_10; } } } lean_object* l_Lean_ofExcept___at_Lean_PrettyPrinter_runForNodeKind___spec__3(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_ofExcept___at_Lean_PrettyPrinter_runForNodeKind___spec__3___rarg___boxed), 4, 0); return x_2; } } lean_object* l_Lean_evalConst___at_Lean_PrettyPrinter_runForNodeKind___spec__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_5 = lean_st_ref_get(x_3, x_4); x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = lean_ctor_get(x_6, 0); lean_inc(x_8); lean_dec(x_6); x_9 = lean_ctor_get(x_2, 0); x_10 = lean_eval_const(x_8, x_9, x_1); lean_dec(x_8); x_11 = l_Lean_ofExcept___at_Lean_PrettyPrinter_runForNodeKind___spec__3___rarg(x_10, x_2, x_3, x_7); lean_dec(x_10); return x_11; } } lean_object* l_Lean_evalConst___at_Lean_PrettyPrinter_runForNodeKind___spec__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_evalConst___at_Lean_PrettyPrinter_runForNodeKind___spec__2___rarg___boxed), 4, 0); return x_2; } } static lean_object* _init_l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("ParserDescr"); return x_1; } } static lean_object* _init_l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Parser_Syntax_addPrec___closed__2; x_2 = l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } static lean_object* _init_l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("TrailingParserDescr"); return x_1; } } static lean_object* _init_l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Parser_Syntax_addPrec___closed__2; x_2 = l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__3; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } static lean_object* _init_l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__5() { _start: { lean_object* x_1; x_1 = lean_mk_string("no declaration of attribute ["); return x_1; } } static lean_object* _init_l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__6() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__5; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } static lean_object* _init_l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__7() { _start: { lean_object* x_1; x_1 = lean_mk_string("] found for '"); return x_1; } } static lean_object* _init_l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__8() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__7; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } lean_object* l_Lean_PrettyPrinter_runForNodeKind___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; uint8_t x_8; x_7 = lean_st_ref_get(x_5, x_6); x_8 = !lean_is_exclusive(x_7); if (x_8 == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; x_9 = lean_ctor_get(x_7, 0); x_10 = lean_ctor_get(x_7, 1); x_11 = lean_ctor_get(x_9, 0); lean_inc(x_11); lean_dec(x_9); x_12 = l_Lean_KeyedDeclsAttribute_getValues___rarg(x_1, x_11, x_2); lean_dec(x_11); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; lean_free_object(x_7); lean_inc(x_2); x_13 = l_Lean_getConstInfo___at_Lean_getExternConstArity___spec__1(x_2, x_4, x_5, x_10); if (lean_obj_tag(x_13) == 0) { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; x_14 = lean_ctor_get(x_13, 0); lean_inc(x_14); x_15 = lean_ctor_get(x_13, 1); lean_inc(x_15); lean_dec(x_13); x_16 = l_Lean_ConstantInfo_type(x_14); lean_dec(x_14); x_17 = l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__2; x_18 = l_Lean_Expr_isConstOf(x_16, x_17); if (x_18 == 0) { lean_object* x_19; uint8_t x_20; x_19 = l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__4; x_20 = l_Lean_Expr_isConstOf(x_16, x_19); lean_dec(x_16); if (x_20 == 0) { lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_dec(x_3); x_21 = lean_ctor_get(x_1, 0); x_22 = lean_ctor_get(x_21, 1); lean_inc(x_22); x_23 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_23, 0, x_22); x_24 = l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__6; x_25 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_23); x_26 = l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__8; x_27 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_27, 0, x_25); lean_ctor_set(x_27, 1, x_26); x_28 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_28, 0, x_2); x_29 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_29, 0, x_27); lean_ctor_set(x_29, 1, x_28); x_30 = l_Lean_KernelException_toMessageData___closed__3; x_31 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_31, 0, x_29); lean_ctor_set(x_31, 1, x_30); x_32 = l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__1___rarg(x_31, x_4, x_5, x_15); lean_dec(x_5); lean_dec(x_4); return x_32; } else { lean_object* x_33; x_33 = l_Lean_evalConst___at_Lean_PrettyPrinter_runForNodeKind___spec__2___rarg(x_2, x_4, x_5, x_15); lean_dec(x_2); if (lean_obj_tag(x_33) == 0) { lean_object* x_34; lean_object* x_35; lean_object* x_36; x_34 = lean_ctor_get(x_33, 0); lean_inc(x_34); x_35 = lean_ctor_get(x_33, 1); lean_inc(x_35); lean_dec(x_33); x_36 = lean_apply_4(x_3, x_34, x_4, x_5, x_35); return x_36; } else { uint8_t x_37; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_37 = !lean_is_exclusive(x_33); if (x_37 == 0) { return x_33; } else { lean_object* x_38; lean_object* x_39; lean_object* x_40; x_38 = lean_ctor_get(x_33, 0); x_39 = lean_ctor_get(x_33, 1); lean_inc(x_39); lean_inc(x_38); lean_dec(x_33); 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_dec(x_16); x_41 = l_Lean_evalConst___at_Lean_PrettyPrinter_runForNodeKind___spec__2___rarg(x_2, x_4, x_5, x_15); lean_dec(x_2); if (lean_obj_tag(x_41) == 0) { lean_object* x_42; lean_object* x_43; lean_object* x_44; 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_apply_4(x_3, x_42, x_4, x_5, x_43); return x_44; } else { uint8_t x_45; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_45 = !lean_is_exclusive(x_41); if (x_45 == 0) { return x_41; } else { lean_object* x_46; lean_object* x_47; lean_object* x_48; x_46 = lean_ctor_get(x_41, 0); x_47 = lean_ctor_get(x_41, 1); lean_inc(x_47); lean_inc(x_46); lean_dec(x_41); x_48 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_48, 0, x_46); lean_ctor_set(x_48, 1, x_47); return x_48; } } } } else { uint8_t x_49; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_49 = !lean_is_exclusive(x_13); if (x_49 == 0) { return x_13; } else { lean_object* x_50; lean_object* x_51; lean_object* x_52; x_50 = lean_ctor_get(x_13, 0); x_51 = lean_ctor_get(x_13, 1); lean_inc(x_51); lean_inc(x_50); lean_dec(x_13); x_52 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_52, 0, x_50); lean_ctor_set(x_52, 1, x_51); return x_52; } } } else { lean_object* x_53; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_53 = lean_ctor_get(x_12, 0); lean_inc(x_53); lean_dec(x_12); lean_ctor_set(x_7, 0, x_53); return x_7; } } else { lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; x_54 = lean_ctor_get(x_7, 0); x_55 = lean_ctor_get(x_7, 1); lean_inc(x_55); lean_inc(x_54); lean_dec(x_7); x_56 = lean_ctor_get(x_54, 0); lean_inc(x_56); lean_dec(x_54); x_57 = l_Lean_KeyedDeclsAttribute_getValues___rarg(x_1, x_56, x_2); lean_dec(x_56); if (lean_obj_tag(x_57) == 0) { lean_object* x_58; lean_inc(x_2); x_58 = l_Lean_getConstInfo___at_Lean_getExternConstArity___spec__1(x_2, x_4, x_5, x_55); if (lean_obj_tag(x_58) == 0) { lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; uint8_t x_63; x_59 = lean_ctor_get(x_58, 0); lean_inc(x_59); x_60 = lean_ctor_get(x_58, 1); lean_inc(x_60); lean_dec(x_58); x_61 = l_Lean_ConstantInfo_type(x_59); lean_dec(x_59); x_62 = l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__2; x_63 = l_Lean_Expr_isConstOf(x_61, x_62); if (x_63 == 0) { lean_object* x_64; uint8_t x_65; x_64 = l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__4; x_65 = l_Lean_Expr_isConstOf(x_61, x_64); lean_dec(x_61); if (x_65 == 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; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_dec(x_3); x_66 = lean_ctor_get(x_1, 0); x_67 = lean_ctor_get(x_66, 1); lean_inc(x_67); x_68 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_68, 0, x_67); x_69 = l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__6; x_70 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_70, 0, x_69); lean_ctor_set(x_70, 1, x_68); x_71 = l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__8; x_72 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_72, 0, x_70); lean_ctor_set(x_72, 1, x_71); x_73 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_73, 0, x_2); x_74 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_74, 0, x_72); lean_ctor_set(x_74, 1, x_73); x_75 = l_Lean_KernelException_toMessageData___closed__3; x_76 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_76, 0, x_74); lean_ctor_set(x_76, 1, x_75); x_77 = l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__1___rarg(x_76, x_4, x_5, x_60); lean_dec(x_5); lean_dec(x_4); return x_77; } else { lean_object* x_78; x_78 = l_Lean_evalConst___at_Lean_PrettyPrinter_runForNodeKind___spec__2___rarg(x_2, x_4, x_5, x_60); lean_dec(x_2); if (lean_obj_tag(x_78) == 0) { lean_object* x_79; lean_object* x_80; lean_object* x_81; x_79 = lean_ctor_get(x_78, 0); lean_inc(x_79); x_80 = lean_ctor_get(x_78, 1); lean_inc(x_80); lean_dec(x_78); x_81 = lean_apply_4(x_3, x_79, x_4, x_5, x_80); return x_81; } else { lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_82 = lean_ctor_get(x_78, 0); lean_inc(x_82); x_83 = lean_ctor_get(x_78, 1); lean_inc(x_83); if (lean_is_exclusive(x_78)) { lean_ctor_release(x_78, 0); lean_ctor_release(x_78, 1); x_84 = x_78; } else { lean_dec_ref(x_78); x_84 = lean_box(0); } if (lean_is_scalar(x_84)) { x_85 = lean_alloc_ctor(1, 2, 0); } else { x_85 = x_84; } lean_ctor_set(x_85, 0, x_82); lean_ctor_set(x_85, 1, x_83); return x_85; } } } else { lean_object* x_86; lean_dec(x_61); x_86 = l_Lean_evalConst___at_Lean_PrettyPrinter_runForNodeKind___spec__2___rarg(x_2, x_4, x_5, x_60); lean_dec(x_2); if (lean_obj_tag(x_86) == 0) { lean_object* x_87; lean_object* x_88; lean_object* x_89; x_87 = lean_ctor_get(x_86, 0); lean_inc(x_87); x_88 = lean_ctor_get(x_86, 1); lean_inc(x_88); lean_dec(x_86); x_89 = lean_apply_4(x_3, x_87, x_4, x_5, x_88); return x_89; } else { lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_90 = lean_ctor_get(x_86, 0); lean_inc(x_90); x_91 = lean_ctor_get(x_86, 1); lean_inc(x_91); if (lean_is_exclusive(x_86)) { lean_ctor_release(x_86, 0); lean_ctor_release(x_86, 1); x_92 = x_86; } else { lean_dec_ref(x_86); x_92 = lean_box(0); } if (lean_is_scalar(x_92)) { x_93 = lean_alloc_ctor(1, 2, 0); } else { x_93 = x_92; } lean_ctor_set(x_93, 0, x_90); 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; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_94 = lean_ctor_get(x_58, 0); lean_inc(x_94); x_95 = lean_ctor_get(x_58, 1); lean_inc(x_95); if (lean_is_exclusive(x_58)) { lean_ctor_release(x_58, 0); lean_ctor_release(x_58, 1); x_96 = x_58; } else { lean_dec_ref(x_58); 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_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_98 = lean_ctor_get(x_57, 0); lean_inc(x_98); lean_dec(x_57); x_99 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_99, 0, x_98); lean_ctor_set(x_99, 1, x_55); return x_99; } } } } lean_object* l_Lean_PrettyPrinter_runForNodeKind(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_runForNodeKind___rarg___boxed), 6, 0); return x_2; } } lean_object* l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__1___rarg(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); return x_5; } } lean_object* l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__4___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__4___rarg(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); return x_5; } } lean_object* l_Lean_ofExcept___at_Lean_PrettyPrinter_runForNodeKind___spec__3___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_ofExcept___at_Lean_PrettyPrinter_runForNodeKind___spec__3___rarg(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_5; } } lean_object* l_Lean_evalConst___at_Lean_PrettyPrinter_runForNodeKind___spec__2___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; x_5 = l_Lean_evalConst___at_Lean_PrettyPrinter_runForNodeKind___spec__2___rarg(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_5; } } lean_object* l_Lean_PrettyPrinter_runForNodeKind___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; x_7 = l_Lean_PrettyPrinter_runForNodeKind___rarg(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_1); return x_7; } } lean_object* initialize_Init(lean_object*); lean_object* initialize_Lean_InternalExceptionId(lean_object*); lean_object* initialize_Lean_KeyedDeclsAttribute(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_PrettyPrinter_Basic(lean_object* w) { lean_object * res; if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); _G_initialized = true; res = initialize_Init(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_InternalExceptionId(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_KeyedDeclsAttribute(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_PrettyPrinter_initFn____x40_Lean_PrettyPrinter_Basic___hyg_4____closed__1 = _init_l_Lean_PrettyPrinter_initFn____x40_Lean_PrettyPrinter_Basic___hyg_4____closed__1(); lean_mark_persistent(l_Lean_PrettyPrinter_initFn____x40_Lean_PrettyPrinter_Basic___hyg_4____closed__1); l_Lean_PrettyPrinter_initFn____x40_Lean_PrettyPrinter_Basic___hyg_4____closed__2 = _init_l_Lean_PrettyPrinter_initFn____x40_Lean_PrettyPrinter_Basic___hyg_4____closed__2(); lean_mark_persistent(l_Lean_PrettyPrinter_initFn____x40_Lean_PrettyPrinter_Basic___hyg_4____closed__2); res = l_Lean_PrettyPrinter_initFn____x40_Lean_PrettyPrinter_Basic___hyg_4_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; l_Lean_PrettyPrinter_backtrackExceptionId = lean_io_result_get_value(res); lean_mark_persistent(l_Lean_PrettyPrinter_backtrackExceptionId); lean_dec_ref(res); l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__1 = _init_l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__1(); lean_mark_persistent(l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__1); l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__2 = _init_l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__2(); lean_mark_persistent(l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__2); l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__3 = _init_l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__3(); lean_mark_persistent(l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__3); l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__4 = _init_l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__4(); lean_mark_persistent(l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__4); l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__5 = _init_l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__5(); lean_mark_persistent(l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__5); l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__6 = _init_l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__6(); lean_mark_persistent(l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__6); l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__7 = _init_l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__7(); lean_mark_persistent(l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__7); l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__8 = _init_l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__8(); lean_mark_persistent(l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__8); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus } #endif
ChrisHughes24/lean4
stage0/stdlib/Lean/Data/Lsp/TextSync.c
<filename>stage0/stdlib/Lean/Data/Lsp/TextSync.c // Lean compiler output // Module: Lean.Data.Lsp.TextSync // Imports: Init Lean.Data.Json Lean.Data.Lsp.Basic #include <lean/lean.h> #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wunused-label" #elif defined(__GNUC__) && !defined(__CLANG__) #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif #ifdef __cplusplus extern "C" { #endif extern lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentEdit____x40_Lean_Data_Lsp_Basic___hyg_1241____closed__1; lean_object* l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__2; lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_342____spec__1(lean_object*, size_t, size_t, lean_object*); lean_object* l_Lean_Lsp_instToJsonDidOpenTextDocumentParams___closed__1; extern lean_object* l_Lean_instFromJsonOption___rarg___closed__1; size_t l_USize_add(size_t, size_t); extern lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentItem____x40_Lean_Data_Lsp_Basic___hyg_1355____closed__2; lean_object* l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__4; lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_100_(lean_object*); lean_object* l_Lean_Lsp_instFromJsonTextDocumentContentChangeEvent___boxed(lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__7; lean_object* lean_array_uget(lean_object*, size_t); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_342____spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonSaveOptions; lean_object* l_Lean_Lsp_instFromJsonTextDocumentSyncKind_match__1(lean_object*); lean_object* l_Lean_Json_getNat_x3f(lean_object*); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_457____boxed(lean_object*); lean_object* l_Lean_Lsp_instFromJsonDidCloseTextDocumentParams___closed__1; lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentEdit____x40_Lean_Data_Lsp_Basic___hyg_1275____spec__1(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_457_(lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidCloseTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_524____boxed(lean_object*); extern lean_object* l_Lean_Parser_Tactic_change___closed__1; lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____spec__1___boxed(lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_376____spec__2(size_t, size_t, lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__3; lean_object* lean_array_get_size(lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentRegistrationOptions____x40_Lean_Data_Lsp_Basic___hyg_1817____spec__1(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentChangeRegistrationOptions____x40_Lean_Data_Lsp_TextSync___hyg_152_(lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentChangeRegistrationOptions____x40_Lean_Data_Lsp_TextSync___hyg_152____boxed(lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__1; lean_object* l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__3; lean_object* l_Lean_Lsp_instToJsonTextDocumentSyncKind___boxed(lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_100____spec__1(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentChangeRegistrationOptions____x40_Lean_Data_Lsp_TextSync___hyg_152____closed__1; lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentChangeRegistrationOptions____x40_Lean_Data_Lsp_TextSync___hyg_152____spec__1(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____boxed(lean_object*); lean_object* l_List_join___rarg(lean_object*); uint8_t l_USize_decLt(size_t, size_t); lean_object* l_Lean_Lsp_instFromJsonTextDocumentSyncKind(lean_object*); lean_object* l_Lean_Lsp_instToJsonSaveOptions___closed__1; lean_object* l_Lean_Lsp_instFromJsonTextDocumentSyncOptions; lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1533____spec__1(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentItem____x40_Lean_Data_Lsp_Basic___hyg_1355_(lean_object*); extern lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentRegistrationOptions____x40_Lean_Data_Lsp_Basic___hyg_1797____closed__1; lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_376____spec__1(lean_object*, lean_object*); extern lean_object* l_Int_Int_pow___closed__1; lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentItem____x40_Lean_Data_Lsp_Basic___hyg_1407_(lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__6; lean_object* l_Lean_Lsp_instToJsonDidCloseTextDocumentParams; uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600_(lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_457____spec__1(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonTextDocumentSyncKind(uint8_t); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentChangeRegistrationOptions____x40_Lean_Data_Lsp_TextSync___hyg_152____spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instFromJsonDidOpenTextDocumentParams; lean_object* l_Lean_Lsp_instToJsonTextDocumentSyncKind_match__1(lean_object*); extern lean_object* l___private_Init_Data_Repr_0__reprSourceInfo____x40_Init_Data_Repr___hyg_1438____closed__4; lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_432____closed__1; lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_432____boxed(lean_object*); lean_object* l_Lean_Lsp_instToJsonTextDocumentSyncKind_match__1___rarg(uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instFromJsonTextDocumentChangeRegistrationOptions___closed__1; lean_object* l_Lean_Lsp_instFromJsonDidChangeTextDocumentParams___closed__1; lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidCloseTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_524_(lean_object*); size_t lean_usize_of_nat(lean_object*); lean_object* l_Lean_Lsp_TextDocumentContentChangeEvent_hasToJson_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentIdentifier____x40_Lean_Data_Lsp_Basic___hyg_1071_(lean_object*); lean_object* l_Lean_Lsp_instFromJsonDidChangeTextDocumentParams; lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__8; lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____spec__1(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_100____boxed(lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_432_(lean_object*); lean_object* l_Lean_Json_getObjValD(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__1; lean_object* l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2; lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_342_(lean_object*); lean_object* l_Lean_Lsp_instToJsonTextDocumentSyncKind_match__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonDidChangeTextDocumentParams; lean_object* l_Lean_Lsp_TextDocumentSyncOptions_save_x3f___default; lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__10; lean_object* l_Lean_Lsp_instFromJsonSaveOptions___closed__1; lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_656____boxed(lean_object*); extern lean_object* l_Int_instInhabitedInt___closed__1; lean_object* l_Lean_Json_mkObj(lean_object*); lean_object* l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__3; lean_object* l_Lean_Lsp_instToJsonDidCloseTextDocumentParams___closed__1; lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_376____boxed(lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_342____closed__1; lean_object* l_Lean_Lsp_instToJsonDidChangeTextDocumentParams___closed__1; lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__9; lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_656____spec__1___boxed(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidCloseTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_499_(lean_object*); lean_object* l_Lean_Lsp_instFromJsonTextDocumentSyncOptions___closed__1; lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__4; lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_457____spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__5; lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__2; lean_object* l_Lean_Lsp_instToJsonTextDocumentSyncOptions___closed__1; lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_75_(lean_object*); extern lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_577____closed__2; lean_object* l_Lean_Lsp_instFromJsonTextDocumentContentChangeEvent(lean_object*); lean_object* l_Lean_Lsp_instFromJsonTextDocumentSyncKind_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_getBool_x3f(lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_611____spec__2(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__1; lean_object* l_Lean_Lsp_instFromJsonTextDocumentSyncKind___boxed(lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_656_(lean_object*); lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonRange____x40_Lean_Data_Lsp_Basic___hyg_409_(lean_object*); lean_object* l_Lean_Lsp_instFromJsonTextDocumentChangeRegistrationOptions; lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_376_(lean_object*); lean_object* l_Lean_Lsp_instFromJsonDidOpenTextDocumentParams___closed__1; lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonVersionedTextDocumentIdentifier____x40_Lean_Data_Lsp_Basic___hyg_1148_(lean_object*); lean_object* l_Lean_Lsp_instToJsonDidOpenTextDocumentParams; lean_object* l_Lean_Lsp_instFromJsonDidCloseTextDocumentParams; lean_object* l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__6; lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_100____spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Lsp_TextDocumentContentChangeEvent_hasToJson(lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__5; lean_object* l_Lean_Lsp_TextDocumentChangeRegistrationOptions_documentSelector_x3f___default; lean_object* l_Lean_Lsp_instFromJsonSaveOptions; lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_376____spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_656____spec__1(lean_object*, lean_object*); lean_object* l_Lean_Lsp_TextDocumentContentChangeEvent_hasToJson_match__1(lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_376____spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instToJsonTextDocumentSyncOptions; lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_JsonRpc_instFromJsonMessage___spec__2(lean_object*, lean_object*); lean_object* l_Lean_Lsp_instFromJsonTextDocumentSyncKind_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_6; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_6 = lean_apply_1(x_5, x_1); return x_6; } else { lean_object* x_7; lean_object* x_8; uint8_t x_9; x_7 = lean_ctor_get(x_1, 0); lean_inc(x_7); x_8 = lean_unsigned_to_nat(0u); x_9 = lean_nat_dec_eq(x_7, x_8); if (x_9 == 0) { lean_object* x_10; uint8_t x_11; lean_dec(x_2); x_10 = lean_unsigned_to_nat(1u); x_11 = lean_nat_dec_eq(x_7, x_10); if (x_11 == 0) { lean_object* x_12; uint8_t x_13; lean_dec(x_3); x_12 = lean_unsigned_to_nat(2u); x_13 = lean_nat_dec_eq(x_7, x_12); lean_dec(x_7); if (x_13 == 0) { lean_object* x_14; lean_dec(x_4); x_14 = lean_apply_1(x_5, x_1); return x_14; } else { lean_object* x_15; lean_object* x_16; lean_dec(x_5); lean_dec(x_1); x_15 = lean_box(0); x_16 = lean_apply_1(x_4, x_15); return x_16; } } else { lean_object* x_17; lean_object* x_18; lean_dec(x_7); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); x_17 = lean_box(0); x_18 = lean_apply_1(x_3, x_17); return x_18; } } else { lean_object* x_19; lean_object* x_20; lean_dec(x_7); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); x_19 = lean_box(0); x_20 = lean_apply_1(x_2, x_19); return x_20; } } } } lean_object* l_Lean_Lsp_instFromJsonTextDocumentSyncKind_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Lsp_instFromJsonTextDocumentSyncKind_match__1___rarg), 5, 0); return x_2; } } static lean_object* _init_l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__1() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; x_1 = 2; x_2 = lean_box(x_1); x_3 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_3, 0, x_2); return x_3; } } static lean_object* _init_l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; x_1 = 1; x_2 = lean_box(x_1); x_3 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_3, 0, x_2); return x_3; } } static lean_object* _init_l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__3() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; x_1 = 0; x_2 = lean_box(x_1); x_3 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_3, 0, x_2); return x_3; } } lean_object* l_Lean_Lsp_instFromJsonTextDocumentSyncKind(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Json_getNat_x3f(x_1); if (lean_obj_tag(x_2) == 0) { lean_object* x_3; x_3 = lean_box(0); return x_3; } else { lean_object* x_4; lean_object* x_5; uint8_t x_6; x_4 = lean_ctor_get(x_2, 0); lean_inc(x_4); lean_dec(x_2); x_5 = lean_unsigned_to_nat(0u); x_6 = lean_nat_dec_eq(x_4, x_5); if (x_6 == 0) { lean_object* x_7; uint8_t x_8; x_7 = lean_unsigned_to_nat(1u); x_8 = lean_nat_dec_eq(x_4, x_7); if (x_8 == 0) { lean_object* x_9; uint8_t x_10; x_9 = lean_unsigned_to_nat(2u); x_10 = lean_nat_dec_eq(x_4, x_9); lean_dec(x_4); if (x_10 == 0) { lean_object* x_11; x_11 = lean_box(0); return x_11; } else { lean_object* x_12; x_12 = l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__1; return x_12; } } else { lean_object* x_13; lean_dec(x_4); x_13 = l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2; return x_13; } } else { lean_object* x_14; lean_dec(x_4); x_14 = l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__3; return x_14; } } } } lean_object* l_Lean_Lsp_instFromJsonTextDocumentSyncKind___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Lsp_instFromJsonTextDocumentSyncKind(x_1); lean_dec(x_1); return x_2; } } lean_object* l_Lean_Lsp_instToJsonTextDocumentSyncKind_match__1___rarg(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { switch (x_1) { case 0: { lean_object* x_5; lean_object* x_6; lean_dec(x_4); lean_dec(x_3); x_5 = lean_box(0); x_6 = lean_apply_1(x_2, x_5); return x_6; } case 1: { lean_object* x_7; lean_object* x_8; lean_dec(x_4); lean_dec(x_2); x_7 = lean_box(0); x_8 = lean_apply_1(x_3, x_7); return x_8; } default: { lean_object* x_9; lean_object* x_10; lean_dec(x_3); lean_dec(x_2); x_9 = lean_box(0); x_10 = lean_apply_1(x_4, x_9); return x_10; } } } } lean_object* l_Lean_Lsp_instToJsonTextDocumentSyncKind_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Lsp_instToJsonTextDocumentSyncKind_match__1___rarg___boxed), 4, 0); return x_2; } } lean_object* l_Lean_Lsp_instToJsonTextDocumentSyncKind_match__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { uint8_t x_5; lean_object* x_6; x_5 = lean_unbox(x_1); lean_dec(x_1); x_6 = l_Lean_Lsp_instToJsonTextDocumentSyncKind_match__1___rarg(x_5, x_2, x_3, x_4); return x_6; } } static lean_object* _init_l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Int_instInhabitedInt___closed__1; x_2 = lean_unsigned_to_nat(0u); x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__1; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Int_Int_pow___closed__1; x_2 = lean_unsigned_to_nat(0u); x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__4() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__3; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__5() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l___private_Init_Data_Repr_0__reprSourceInfo____x40_Init_Data_Repr___hyg_1438____closed__4; x_2 = lean_unsigned_to_nat(0u); x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__6() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__5; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } lean_object* l_Lean_Lsp_instToJsonTextDocumentSyncKind(uint8_t x_1) { _start: { switch (x_1) { case 0: { lean_object* x_2; x_2 = l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__2; return x_2; } case 1: { lean_object* x_3; x_3 = l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__4; return x_3; } default: { lean_object* x_4; x_4 = l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__6; return x_4; } } } } lean_object* l_Lean_Lsp_instToJsonTextDocumentSyncKind___boxed(lean_object* x_1) { _start: { uint8_t x_2; lean_object* x_3; x_2 = lean_unbox(x_1); lean_dec(x_1); x_3 = l_Lean_Lsp_instToJsonTextDocumentSyncKind(x_2); return x_3; } } lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_75_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentItem____x40_Lean_Data_Lsp_Basic___hyg_1355_(x_1); x_3 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentEdit____x40_Lean_Data_Lsp_Basic___hyg_1241____closed__1; x_4 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_4, 0, x_3); lean_ctor_set(x_4, 1, x_2); x_5 = lean_box(0); x_6 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_6, 0, x_4); lean_ctor_set(x_6, 1, x_5); x_7 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_7, 0, x_6); lean_ctor_set(x_7, 1, x_5); x_8 = l_List_join___rarg(x_7); x_9 = l_Lean_Json_mkObj(x_8); return x_9; } } static lean_object* _init_l_Lean_Lsp_instToJsonDidOpenTextDocumentParams___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_75_), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instToJsonDidOpenTextDocumentParams() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instToJsonDidOpenTextDocumentParams___closed__1; return x_1; } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_100____spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; x_3 = l_Lean_Json_getObjValD(x_1, x_2); x_4 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentItem____x40_Lean_Data_Lsp_Basic___hyg_1407_(x_3); lean_dec(x_3); return x_4; } } lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_100_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentEdit____x40_Lean_Data_Lsp_Basic___hyg_1241____closed__1; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_100____spec__1(x_1, x_2); if (lean_obj_tag(x_3) == 0) { lean_object* x_4; x_4 = lean_box(0); return x_4; } else { uint8_t x_5; x_5 = !lean_is_exclusive(x_3); if (x_5 == 0) { return x_3; } else { lean_object* x_6; lean_object* x_7; x_6 = lean_ctor_get(x_3, 0); lean_inc(x_6); lean_dec(x_3); x_7 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_7, 0, x_6); return x_7; } } } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_100____spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_100____spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_100____boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_100_(x_1); lean_dec(x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instFromJsonDidOpenTextDocumentParams___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_100____boxed), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instFromJsonDidOpenTextDocumentParams() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instFromJsonDidOpenTextDocumentParams___closed__1; return x_1; } } static lean_object* _init_l_Lean_Lsp_TextDocumentChangeRegistrationOptions_documentSelector_x3f___default() { _start: { lean_object* x_1; x_1 = lean_box(0); return x_1; } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentChangeRegistrationOptions____x40_Lean_Data_Lsp_TextSync___hyg_152____spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; x_3 = l_Lean_Json_getObjValD(x_1, x_2); x_4 = l_Lean_Json_getNat_x3f(x_3); lean_dec(x_3); if (lean_obj_tag(x_4) == 0) { lean_object* x_5; x_5 = lean_box(0); return x_5; } else { lean_object* x_6; lean_object* x_7; uint8_t x_8; x_6 = lean_ctor_get(x_4, 0); lean_inc(x_6); lean_dec(x_4); x_7 = lean_unsigned_to_nat(0u); x_8 = lean_nat_dec_eq(x_6, x_7); if (x_8 == 0) { lean_object* x_9; uint8_t x_10; x_9 = lean_unsigned_to_nat(1u); x_10 = lean_nat_dec_eq(x_6, x_9); if (x_10 == 0) { lean_object* x_11; uint8_t x_12; x_11 = lean_unsigned_to_nat(2u); x_12 = lean_nat_dec_eq(x_6, x_11); lean_dec(x_6); if (x_12 == 0) { lean_object* x_13; x_13 = lean_box(0); return x_13; } else { lean_object* x_14; x_14 = l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__1; return x_14; } } else { lean_object* x_15; lean_dec(x_6); x_15 = l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2; return x_15; } } else { lean_object* x_16; lean_dec(x_6); x_16 = l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__3; return x_16; } } } } static lean_object* _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentChangeRegistrationOptions____x40_Lean_Data_Lsp_TextSync___hyg_152____closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("syncKind"); return x_1; } } lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentChangeRegistrationOptions____x40_Lean_Data_Lsp_TextSync___hyg_152_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentRegistrationOptions____x40_Lean_Data_Lsp_Basic___hyg_1797____closed__1; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentRegistrationOptions____x40_Lean_Data_Lsp_Basic___hyg_1817____spec__1(x_1, x_2); if (lean_obj_tag(x_3) == 0) { lean_object* x_4; x_4 = lean_box(0); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); x_6 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentChangeRegistrationOptions____x40_Lean_Data_Lsp_TextSync___hyg_152____closed__1; x_7 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentChangeRegistrationOptions____x40_Lean_Data_Lsp_TextSync___hyg_152____spec__1(x_1, x_6); if (lean_obj_tag(x_7) == 0) { lean_object* x_8; lean_dec(x_5); x_8 = lean_box(0); return x_8; } else { uint8_t x_9; x_9 = !lean_is_exclusive(x_7); if (x_9 == 0) { lean_object* x_10; lean_object* x_11; uint8_t x_12; x_10 = lean_ctor_get(x_7, 0); x_11 = lean_alloc_ctor(0, 1, 1); lean_ctor_set(x_11, 0, x_5); x_12 = lean_unbox(x_10); lean_dec(x_10); lean_ctor_set_uint8(x_11, sizeof(void*)*1, x_12); lean_ctor_set(x_7, 0, x_11); return x_7; } else { lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16; x_13 = lean_ctor_get(x_7, 0); lean_inc(x_13); lean_dec(x_7); x_14 = lean_alloc_ctor(0, 1, 1); lean_ctor_set(x_14, 0, x_5); x_15 = lean_unbox(x_13); lean_dec(x_13); lean_ctor_set_uint8(x_14, sizeof(void*)*1, x_15); x_16 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_16, 0, x_14); return x_16; } } } } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentChangeRegistrationOptions____x40_Lean_Data_Lsp_TextSync___hyg_152____spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentChangeRegistrationOptions____x40_Lean_Data_Lsp_TextSync___hyg_152____spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentChangeRegistrationOptions____x40_Lean_Data_Lsp_TextSync___hyg_152____boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentChangeRegistrationOptions____x40_Lean_Data_Lsp_TextSync___hyg_152_(x_1); lean_dec(x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instFromJsonTextDocumentChangeRegistrationOptions___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentChangeRegistrationOptions____x40_Lean_Data_Lsp_TextSync___hyg_152____boxed), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instFromJsonTextDocumentChangeRegistrationOptions() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instFromJsonTextDocumentChangeRegistrationOptions___closed__1; return x_1; } } lean_object* l_Lean_Lsp_instFromJsonTextDocumentContentChangeEvent(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_Basic_0__Lean_Lsp_toJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_577____closed__2; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_611____spec__2(x_1, x_2); x_4 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentItem____x40_Lean_Data_Lsp_Basic___hyg_1355____closed__2; x_5 = l_Lean_Json_getObjValAs_x3f___at_Lean_JsonRpc_instFromJsonMessage___spec__2(x_1, x_4); if (lean_obj_tag(x_3) == 0) { if (lean_obj_tag(x_5) == 0) { lean_object* x_6; x_6 = lean_box(0); return x_6; } else { uint8_t x_7; x_7 = !lean_is_exclusive(x_5); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; x_8 = lean_ctor_get(x_5, 0); x_9 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_9, 0, x_8); lean_ctor_set(x_5, 0, x_9); return x_5; } else { lean_object* x_10; lean_object* x_11; lean_object* x_12; x_10 = lean_ctor_get(x_5, 0); lean_inc(x_10); lean_dec(x_5); x_11 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_11, 0, x_10); x_12 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_12, 0, x_11); return x_12; } } } else { if (lean_obj_tag(x_5) == 0) { lean_object* x_13; lean_dec(x_3); x_13 = lean_box(0); return x_13; } else { lean_object* x_14; uint8_t x_15; x_14 = lean_ctor_get(x_3, 0); lean_inc(x_14); lean_dec(x_3); x_15 = !lean_is_exclusive(x_5); if (x_15 == 0) { lean_object* x_16; lean_object* x_17; x_16 = lean_ctor_get(x_5, 0); x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_14); lean_ctor_set(x_17, 1, x_16); lean_ctor_set(x_5, 0, x_17); return x_5; } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; x_18 = lean_ctor_get(x_5, 0); lean_inc(x_18); lean_dec(x_5); x_19 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_19, 0, x_14); lean_ctor_set(x_19, 1, x_18); x_20 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_20, 0, x_19); return x_20; } } } } } lean_object* l_Lean_Lsp_instFromJsonTextDocumentContentChangeEvent___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l_Lean_Lsp_instFromJsonTextDocumentContentChangeEvent(x_1); lean_dec(x_1); return x_2; } } lean_object* l_Lean_Lsp_TextDocumentContentChangeEvent_hasToJson_match__1___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_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_object* x_8; lean_dec(x_2); x_7 = lean_ctor_get(x_1, 0); lean_inc(x_7); lean_dec(x_1); x_8 = lean_apply_1(x_3, x_7); return x_8; } } } lean_object* l_Lean_Lsp_TextDocumentContentChangeEvent_hasToJson_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_Lean_Lsp_TextDocumentContentChangeEvent_hasToJson_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Lsp_TextDocumentContentChangeEvent_hasToJson(lean_object* x_1) { _start: { if (lean_obj_tag(x_1) == 0) { 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; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); x_3 = lean_ctor_get(x_1, 1); lean_inc(x_3); lean_dec(x_1); x_4 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonRange____x40_Lean_Data_Lsp_Basic___hyg_409_(x_2); x_5 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_577____closed__2; x_6 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_6, 0, x_5); lean_ctor_set(x_6, 1, x_4); x_7 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_7, 0, x_3); x_8 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentItem____x40_Lean_Data_Lsp_Basic___hyg_1355____closed__2; x_9 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_9, 0, x_8); lean_ctor_set(x_9, 1, x_7); x_10 = lean_box(0); x_11 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_11, 0, x_9); lean_ctor_set(x_11, 1, x_10); x_12 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_12, 0, x_6); lean_ctor_set(x_12, 1, x_11); x_13 = l_Lean_Json_mkObj(x_12); return x_13; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; x_14 = lean_ctor_get(x_1, 0); lean_inc(x_14); lean_dec(x_1); x_15 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_15, 0, x_14); x_16 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentItem____x40_Lean_Data_Lsp_Basic___hyg_1355____closed__2; x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_15); x_18 = lean_box(0); x_19 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_19, 0, x_17); lean_ctor_set(x_19, 1, x_18); x_20 = l_Lean_Json_mkObj(x_19); return x_20; } } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_342____spec__1(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; size_t x_11; size_t x_12; 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; x_11 = 1; x_12 = x_3 + x_11; if (lean_obj_tag(x_10) == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_13 = lean_ctor_get(x_10, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_10, 1); lean_inc(x_14); lean_dec(x_10); x_15 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonRange____x40_Lean_Data_Lsp_Basic___hyg_409_(x_13); x_16 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_577____closed__2; x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_15); x_18 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_18, 0, x_14); x_19 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentItem____x40_Lean_Data_Lsp_Basic___hyg_1355____closed__2; x_20 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_20, 0, x_19); lean_ctor_set(x_20, 1, x_18); lean_inc(x_1); x_21 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_21, 0, x_20); lean_ctor_set(x_21, 1, x_1); x_22 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_22, 0, x_17); lean_ctor_set(x_22, 1, x_21); x_23 = l_Lean_Json_mkObj(x_22); x_24 = x_23; x_25 = lean_array_uset(x_9, x_3, x_24); x_3 = x_12; x_4 = x_25; goto _start; } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; x_27 = lean_ctor_get(x_10, 0); lean_inc(x_27); lean_dec(x_10); x_28 = lean_alloc_ctor(3, 1, 0); lean_ctor_set(x_28, 0, x_27); x_29 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentItem____x40_Lean_Data_Lsp_Basic___hyg_1355____closed__2; x_30 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_30, 0, x_29); lean_ctor_set(x_30, 1, x_28); lean_inc(x_1); x_31 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_31, 0, x_30); lean_ctor_set(x_31, 1, x_1); x_32 = l_Lean_Json_mkObj(x_31); x_33 = x_32; x_34 = lean_array_uset(x_9, x_3, x_33); x_3 = x_12; x_4 = x_34; goto _start; } } } } static lean_object* _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_342____closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("contentChanges"); return x_1; } } lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_342_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; size_t x_10; size_t x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); x_3 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonVersionedTextDocumentIdentifier____x40_Lean_Data_Lsp_Basic___hyg_1148_(x_2); x_4 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentEdit____x40_Lean_Data_Lsp_Basic___hyg_1241____closed__1; x_5 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_5, 0, x_4); lean_ctor_set(x_5, 1, x_3); x_6 = lean_box(0); x_7 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_7, 0, x_5); lean_ctor_set(x_7, 1, x_6); x_8 = lean_ctor_get(x_1, 1); lean_inc(x_8); lean_dec(x_1); x_9 = lean_array_get_size(x_8); x_10 = lean_usize_of_nat(x_9); lean_dec(x_9); x_11 = 0; x_12 = x_8; x_13 = l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_342____spec__1(x_6, x_10, x_11, x_12); x_14 = x_13; x_15 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_15, 0, x_14); x_16 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_342____closed__1; x_17 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_15); x_18 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_6); x_19 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_6); x_20 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_20, 0, x_7); lean_ctor_set(x_20, 1, x_19); x_21 = l_List_join___rarg(x_20); x_22 = l_Lean_Json_mkObj(x_21); return x_22; } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_342____spec__1___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___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_342____spec__1(x_1, x_5, x_6, x_4); return x_7; } } static lean_object* _init_l_Lean_Lsp_instToJsonDidChangeTextDocumentParams___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_342_), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instToJsonDidChangeTextDocumentParams() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instToJsonDidChangeTextDocumentParams___closed__1; return x_1; } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_376____spec__2(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; lean_object* x_6; x_5 = x_3; x_6 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_6, 0, x_5); return x_6; } else { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_7 = lean_array_uget(x_3, x_2); x_8 = lean_unsigned_to_nat(0u); x_9 = lean_array_uset(x_3, x_2, x_8); x_10 = x_7; x_11 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_577____closed__2; x_12 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonLocation____x40_Lean_Data_Lsp_Basic___hyg_611____spec__2(x_10, x_11); x_13 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentItem____x40_Lean_Data_Lsp_Basic___hyg_1355____closed__2; x_14 = l_Lean_Json_getObjValAs_x3f___at_Lean_JsonRpc_instFromJsonMessage___spec__2(x_10, x_13); lean_dec(x_10); if (lean_obj_tag(x_12) == 0) { if (lean_obj_tag(x_14) == 0) { lean_object* x_15; lean_dec(x_9); x_15 = lean_box(0); return x_15; } else { lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; lean_object* x_20; lean_object* x_21; x_16 = lean_ctor_get(x_14, 0); lean_inc(x_16); lean_dec(x_14); x_17 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_17, 0, x_16); x_18 = 1; x_19 = x_2 + x_18; x_20 = x_17; x_21 = lean_array_uset(x_9, x_2, x_20); x_2 = x_19; x_3 = x_21; goto _start; } } else { if (lean_obj_tag(x_14) == 0) { lean_object* x_23; lean_dec(x_12); lean_dec(x_9); x_23 = lean_box(0); return x_23; } else { lean_object* x_24; lean_object* x_25; lean_object* x_26; size_t x_27; size_t x_28; lean_object* x_29; lean_object* x_30; x_24 = lean_ctor_get(x_12, 0); lean_inc(x_24); lean_dec(x_12); x_25 = lean_ctor_get(x_14, 0); lean_inc(x_25); lean_dec(x_14); x_26 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_26, 0, x_24); lean_ctor_set(x_26, 1, x_25); x_27 = 1; x_28 = x_2 + x_27; x_29 = x_26; x_30 = lean_array_uset(x_9, x_2, x_29); x_2 = x_28; x_3 = x_30; goto _start; } } } } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_376____spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValD(x_1, x_2); if (lean_obj_tag(x_3) == 4) { lean_object* x_4; lean_object* x_5; size_t x_6; size_t x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_4 = lean_ctor_get(x_3, 0); lean_inc(x_4); lean_dec(x_3); x_5 = lean_array_get_size(x_4); x_6 = lean_usize_of_nat(x_5); lean_dec(x_5); x_7 = 0; x_8 = x_4; x_9 = l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_376____spec__2(x_6, x_7, x_8); x_10 = x_9; return x_10; } else { lean_object* x_11; lean_dec(x_3); x_11 = lean_box(0); return x_11; } } } lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_376_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentEdit____x40_Lean_Data_Lsp_Basic___hyg_1241____closed__1; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentEdit____x40_Lean_Data_Lsp_Basic___hyg_1275____spec__1(x_1, x_2); if (lean_obj_tag(x_3) == 0) { lean_object* x_4; x_4 = lean_box(0); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); x_6 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_342____closed__1; x_7 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_376____spec__1(x_1, x_6); if (lean_obj_tag(x_7) == 0) { lean_object* x_8; lean_dec(x_5); x_8 = lean_box(0); return x_8; } else { uint8_t x_9; x_9 = !lean_is_exclusive(x_7); if (x_9 == 0) { lean_object* x_10; lean_object* x_11; x_10 = lean_ctor_get(x_7, 0); x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_5); lean_ctor_set(x_11, 1, x_10); lean_ctor_set(x_7, 0, x_11); return x_7; } else { lean_object* x_12; lean_object* x_13; lean_object* x_14; x_12 = lean_ctor_get(x_7, 0); lean_inc(x_12); lean_dec(x_7); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_5); lean_ctor_set(x_13, 1, x_12); x_14 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_14, 0, x_13); return x_14; } } } } } lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_376____spec__2___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___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_376____spec__2(x_4, x_5, x_3); return x_6; } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_376____spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_376____spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_376____boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_376_(x_1); lean_dec(x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instFromJsonDidChangeTextDocumentParams___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_376____boxed), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instFromJsonDidChangeTextDocumentParams() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instFromJsonDidChangeTextDocumentParams___closed__1; return x_1; } } static lean_object* _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_432____closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("includeText"); return x_1; } } lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_432_(lean_object* x_1) { _start: { lean_object* x_2; uint8_t x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_2 = lean_alloc_ctor(1, 0, 1); x_3 = lean_unbox(x_1); lean_ctor_set_uint8(x_2, 0, x_3); x_4 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_432____closed__1; x_5 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_5, 0, x_4); lean_ctor_set(x_5, 1, x_2); x_6 = lean_box(0); x_7 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_7, 0, x_5); lean_ctor_set(x_7, 1, x_6); x_8 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_8, 0, x_7); lean_ctor_set(x_8, 1, x_6); x_9 = l_List_join___rarg(x_8); x_10 = l_Lean_Json_mkObj(x_9); return x_10; } } lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_432____boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_432_(x_1); lean_dec(x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instToJsonSaveOptions___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_432____boxed), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instToJsonSaveOptions() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instToJsonSaveOptions___closed__1; return x_1; } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_457____spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; x_3 = l_Lean_Json_getObjValD(x_1, x_2); x_4 = l_Lean_Json_getBool_x3f(x_3); lean_dec(x_3); return x_4; } } lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_457_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_432____closed__1; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_457____spec__1(x_1, x_2); if (lean_obj_tag(x_3) == 0) { lean_object* x_4; x_4 = lean_box(0); return x_4; } else { uint8_t x_5; x_5 = !lean_is_exclusive(x_3); if (x_5 == 0) { return x_3; } else { lean_object* x_6; lean_object* x_7; x_6 = lean_ctor_get(x_3, 0); lean_inc(x_6); lean_dec(x_3); x_7 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_7, 0, x_6); return x_7; } } } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_457____spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_457____spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_457____boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_457_(x_1); lean_dec(x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instFromJsonSaveOptions___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_457____boxed), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instFromJsonSaveOptions() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instFromJsonSaveOptions___closed__1; return x_1; } } lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidCloseTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_499_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentIdentifier____x40_Lean_Data_Lsp_Basic___hyg_1071_(x_1); x_3 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentEdit____x40_Lean_Data_Lsp_Basic___hyg_1241____closed__1; x_4 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_4, 0, x_3); lean_ctor_set(x_4, 1, x_2); x_5 = lean_box(0); x_6 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_6, 0, x_4); lean_ctor_set(x_6, 1, x_5); x_7 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_7, 0, x_6); lean_ctor_set(x_7, 1, x_5); x_8 = l_List_join___rarg(x_7); x_9 = l_Lean_Json_mkObj(x_8); return x_9; } } static lean_object* _init_l_Lean_Lsp_instToJsonDidCloseTextDocumentParams___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidCloseTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_499_), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instToJsonDidCloseTextDocumentParams() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instToJsonDidCloseTextDocumentParams___closed__1; return x_1; } } lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidCloseTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_524_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonTextDocumentEdit____x40_Lean_Data_Lsp_Basic___hyg_1241____closed__1; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonTextDocumentPositionParams____x40_Lean_Data_Lsp_Basic___hyg_1533____spec__1(x_1, x_2); if (lean_obj_tag(x_3) == 0) { lean_object* x_4; x_4 = lean_box(0); return x_4; } else { uint8_t x_5; x_5 = !lean_is_exclusive(x_3); if (x_5 == 0) { return x_3; } else { lean_object* x_6; lean_object* x_7; x_6 = lean_ctor_get(x_3, 0); lean_inc(x_6); lean_dec(x_3); x_7 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_7, 0, x_6); return x_7; } } } } lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidCloseTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_524____boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidCloseTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_524_(x_1); lean_dec(x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instFromJsonDidCloseTextDocumentParams___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidCloseTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_524____boxed), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instFromJsonDidCloseTextDocumentParams() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instFromJsonDidCloseTextDocumentParams___closed__1; return x_1; } } static lean_object* _init_l_Lean_Lsp_TextDocumentSyncOptions_save_x3f___default() { _start: { lean_object* x_1; x_1 = lean_box(0); return x_1; } } lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____spec__1(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) { lean_object* x_3; lean_dec(x_1); x_3 = lean_box(0); return x_3; } else { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_4 = lean_ctor_get(x_2, 0); x_5 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_432_(x_4); x_6 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_6, 0, x_1); lean_ctor_set(x_6, 1, x_5); x_7 = lean_box(0); x_8 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_8, 0, x_6); lean_ctor_set(x_8, 1, x_7); return x_8; } } } static lean_object* _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("openClose"); return x_1; } } static lean_object* _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("willSave"); return x_1; } } static lean_object* _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("willSaveWaitUntil"); return x_1; } } static lean_object* _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__4() { _start: { lean_object* x_1; x_1 = lean_mk_string("save"); return x_1; } } static lean_object* _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__5() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Parser_Tactic_change___closed__1; x_2 = l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__2; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__6() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); x_2 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__5; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); return x_3; } } static lean_object* _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__7() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Parser_Tactic_change___closed__1; x_2 = l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__4; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__8() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); x_2 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__7; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); return x_3; } } static lean_object* _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__9() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Parser_Tactic_change___closed__1; x_2 = l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__6; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__10() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); x_2 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__9; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); return x_3; } } lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600_(lean_object* x_1) { _start: { uint8_t x_2; uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; x_2 = lean_ctor_get_uint8(x_1, sizeof(void*)*1); x_3 = lean_ctor_get_uint8(x_1, sizeof(void*)*1 + 1); x_4 = lean_ctor_get_uint8(x_1, sizeof(void*)*1 + 2); x_5 = lean_ctor_get_uint8(x_1, sizeof(void*)*1 + 3); x_6 = lean_ctor_get(x_1, 0); x_7 = lean_alloc_ctor(1, 0, 1); lean_ctor_set_uint8(x_7, 0, x_2); x_8 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__1; x_9 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_9, 0, x_8); lean_ctor_set(x_9, 1, x_7); x_10 = lean_box(0); x_11 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_11, 0, x_9); lean_ctor_set(x_11, 1, x_10); x_12 = lean_alloc_ctor(1, 0, 1); lean_ctor_set_uint8(x_12, 0, x_4); x_13 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__2; x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_12); x_15 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_10); x_16 = lean_alloc_ctor(1, 0, 1); lean_ctor_set_uint8(x_16, 0, x_5); x_17 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__3; x_18 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_16); x_19 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_10); x_20 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__4; x_21 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____spec__1(x_20, x_6); x_22 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_22, 0, x_21); lean_ctor_set(x_22, 1, x_10); x_23 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_23, 0, x_19); lean_ctor_set(x_23, 1, x_22); x_24 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_24, 0, x_15); lean_ctor_set(x_24, 1, x_23); switch (x_3) { case 0: { lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; x_25 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__6; x_26 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_24); x_27 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_27, 0, x_11); lean_ctor_set(x_27, 1, x_26); x_28 = l_List_join___rarg(x_27); x_29 = l_Lean_Json_mkObj(x_28); return x_29; } case 1: { lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; x_30 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__8; x_31 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_31, 0, x_30); lean_ctor_set(x_31, 1, x_24); x_32 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_32, 0, x_11); lean_ctor_set(x_32, 1, x_31); x_33 = l_List_join___rarg(x_32); x_34 = l_Lean_Json_mkObj(x_33); return x_34; } default: { lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; x_35 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__10; x_36 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_36, 0, x_35); lean_ctor_set(x_36, 1, x_24); x_37 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_37, 0, x_11); lean_ctor_set(x_37, 1, x_36); x_38 = l_List_join___rarg(x_37); x_39 = l_Lean_Json_mkObj(x_38); return x_39; } } } } lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____spec__1(x_1, x_2); lean_dec(x_2); return x_3; } } lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600_(x_1); lean_dec(x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instToJsonTextDocumentSyncOptions___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____boxed), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instToJsonTextDocumentSyncOptions() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instToJsonTextDocumentSyncOptions___closed__1; return x_1; } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_656____spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValD(x_1, x_2); if (lean_obj_tag(x_3) == 0) { lean_object* x_4; x_4 = l_Lean_instFromJsonOption___rarg___closed__1; return x_4; } else { lean_object* x_5; x_5 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_457_(x_3); lean_dec(x_3); if (lean_obj_tag(x_5) == 0) { lean_object* x_6; x_6 = lean_box(0); return x_6; } else { uint8_t x_7; x_7 = !lean_is_exclusive(x_5); if (x_7 == 0) { lean_object* x_8; x_8 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_8, 0, x_5); return x_8; } else { lean_object* x_9; lean_object* x_10; lean_object* x_11; x_9 = lean_ctor_get(x_5, 0); lean_inc(x_9); lean_dec(x_5); x_10 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_10, 0, x_9); x_11 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_11, 0, x_10); return x_11; } } } } } lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_656_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; x_2 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__1; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_457____spec__1(x_1, x_2); if (lean_obj_tag(x_3) == 0) { lean_object* x_4; x_4 = lean_box(0); return x_4; } else { lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); lean_dec(x_3); x_6 = l_Lean_Parser_Tactic_change___closed__1; x_7 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentChangeRegistrationOptions____x40_Lean_Data_Lsp_TextSync___hyg_152____spec__1(x_1, x_6); if (lean_obj_tag(x_7) == 0) { lean_object* x_8; lean_dec(x_5); x_8 = lean_box(0); return x_8; } else { lean_object* x_9; lean_object* x_10; lean_object* x_11; x_9 = lean_ctor_get(x_7, 0); lean_inc(x_9); lean_dec(x_7); x_10 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__2; x_11 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_457____spec__1(x_1, x_10); if (lean_obj_tag(x_11) == 0) { lean_object* x_12; lean_dec(x_9); lean_dec(x_5); x_12 = lean_box(0); return x_12; } else { lean_object* x_13; lean_object* x_14; lean_object* x_15; x_13 = lean_ctor_get(x_11, 0); lean_inc(x_13); lean_dec(x_11); x_14 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__3; x_15 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_457____spec__1(x_1, x_14); if (lean_obj_tag(x_15) == 0) { lean_object* x_16; lean_dec(x_13); lean_dec(x_9); lean_dec(x_5); x_16 = lean_box(0); return x_16; } else { lean_object* x_17; lean_object* x_18; lean_object* x_19; x_17 = lean_ctor_get(x_15, 0); lean_inc(x_17); lean_dec(x_15); x_18 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__4; x_19 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_656____spec__1(x_1, x_18); if (lean_obj_tag(x_19) == 0) { lean_object* x_20; lean_dec(x_17); lean_dec(x_13); lean_dec(x_9); lean_dec(x_5); x_20 = lean_box(0); return x_20; } else { uint8_t x_21; x_21 = !lean_is_exclusive(x_19); if (x_21 == 0) { lean_object* x_22; lean_object* x_23; uint8_t x_24; uint8_t x_25; uint8_t x_26; uint8_t x_27; x_22 = lean_ctor_get(x_19, 0); x_23 = lean_alloc_ctor(0, 1, 4); lean_ctor_set(x_23, 0, x_22); x_24 = lean_unbox(x_5); lean_dec(x_5); lean_ctor_set_uint8(x_23, sizeof(void*)*1, x_24); x_25 = lean_unbox(x_9); lean_dec(x_9); lean_ctor_set_uint8(x_23, sizeof(void*)*1 + 1, x_25); x_26 = lean_unbox(x_13); lean_dec(x_13); lean_ctor_set_uint8(x_23, sizeof(void*)*1 + 2, x_26); x_27 = lean_unbox(x_17); lean_dec(x_17); lean_ctor_set_uint8(x_23, sizeof(void*)*1 + 3, x_27); lean_ctor_set(x_19, 0, x_23); return x_19; } else { lean_object* x_28; lean_object* x_29; uint8_t x_30; uint8_t x_31; uint8_t x_32; uint8_t x_33; lean_object* x_34; x_28 = lean_ctor_get(x_19, 0); lean_inc(x_28); lean_dec(x_19); x_29 = lean_alloc_ctor(0, 1, 4); lean_ctor_set(x_29, 0, x_28); x_30 = lean_unbox(x_5); lean_dec(x_5); lean_ctor_set_uint8(x_29, sizeof(void*)*1, x_30); x_31 = lean_unbox(x_9); lean_dec(x_9); lean_ctor_set_uint8(x_29, sizeof(void*)*1 + 1, x_31); x_32 = lean_unbox(x_13); lean_dec(x_13); lean_ctor_set_uint8(x_29, sizeof(void*)*1 + 2, x_32); x_33 = lean_unbox(x_17); lean_dec(x_17); lean_ctor_set_uint8(x_29, sizeof(void*)*1 + 3, x_33); x_34 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_34, 0, x_29); return x_34; } } } } } } } } lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_656____spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_656____spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_656____boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_656_(x_1); lean_dec(x_1); return x_2; } } static lean_object* _init_l_Lean_Lsp_instFromJsonTextDocumentSyncOptions___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_656____boxed), 1, 0); return x_1; } } static lean_object* _init_l_Lean_Lsp_instFromJsonTextDocumentSyncOptions() { _start: { lean_object* x_1; x_1 = l_Lean_Lsp_instFromJsonTextDocumentSyncOptions___closed__1; return x_1; } } lean_object* initialize_Init(lean_object*); lean_object* initialize_Lean_Data_Json(lean_object*); lean_object* initialize_Lean_Data_Lsp_Basic(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Data_Lsp_TextSync(lean_object* w) { lean_object * res; if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); _G_initialized = true; res = initialize_Init(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Data_Json(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Data_Lsp_Basic(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__1 = _init_l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__1(); lean_mark_persistent(l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__1); l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2 = _init_l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2(); lean_mark_persistent(l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2); l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__3 = _init_l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__3(); lean_mark_persistent(l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__3); l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__1 = _init_l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__1(); lean_mark_persistent(l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__1); l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__2 = _init_l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__2(); lean_mark_persistent(l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__2); l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__3 = _init_l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__3(); lean_mark_persistent(l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__3); l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__4 = _init_l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__4(); lean_mark_persistent(l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__4); l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__5 = _init_l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__5(); lean_mark_persistent(l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__5); l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__6 = _init_l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__6(); lean_mark_persistent(l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__6); l_Lean_Lsp_instToJsonDidOpenTextDocumentParams___closed__1 = _init_l_Lean_Lsp_instToJsonDidOpenTextDocumentParams___closed__1(); lean_mark_persistent(l_Lean_Lsp_instToJsonDidOpenTextDocumentParams___closed__1); l_Lean_Lsp_instToJsonDidOpenTextDocumentParams = _init_l_Lean_Lsp_instToJsonDidOpenTextDocumentParams(); lean_mark_persistent(l_Lean_Lsp_instToJsonDidOpenTextDocumentParams); l_Lean_Lsp_instFromJsonDidOpenTextDocumentParams___closed__1 = _init_l_Lean_Lsp_instFromJsonDidOpenTextDocumentParams___closed__1(); lean_mark_persistent(l_Lean_Lsp_instFromJsonDidOpenTextDocumentParams___closed__1); l_Lean_Lsp_instFromJsonDidOpenTextDocumentParams = _init_l_Lean_Lsp_instFromJsonDidOpenTextDocumentParams(); lean_mark_persistent(l_Lean_Lsp_instFromJsonDidOpenTextDocumentParams); l_Lean_Lsp_TextDocumentChangeRegistrationOptions_documentSelector_x3f___default = _init_l_Lean_Lsp_TextDocumentChangeRegistrationOptions_documentSelector_x3f___default(); lean_mark_persistent(l_Lean_Lsp_TextDocumentChangeRegistrationOptions_documentSelector_x3f___default); l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentChangeRegistrationOptions____x40_Lean_Data_Lsp_TextSync___hyg_152____closed__1 = _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentChangeRegistrationOptions____x40_Lean_Data_Lsp_TextSync___hyg_152____closed__1(); lean_mark_persistent(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentChangeRegistrationOptions____x40_Lean_Data_Lsp_TextSync___hyg_152____closed__1); l_Lean_Lsp_instFromJsonTextDocumentChangeRegistrationOptions___closed__1 = _init_l_Lean_Lsp_instFromJsonTextDocumentChangeRegistrationOptions___closed__1(); lean_mark_persistent(l_Lean_Lsp_instFromJsonTextDocumentChangeRegistrationOptions___closed__1); l_Lean_Lsp_instFromJsonTextDocumentChangeRegistrationOptions = _init_l_Lean_Lsp_instFromJsonTextDocumentChangeRegistrationOptions(); lean_mark_persistent(l_Lean_Lsp_instFromJsonTextDocumentChangeRegistrationOptions); l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_342____closed__1 = _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_342____closed__1(); lean_mark_persistent(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_342____closed__1); l_Lean_Lsp_instToJsonDidChangeTextDocumentParams___closed__1 = _init_l_Lean_Lsp_instToJsonDidChangeTextDocumentParams___closed__1(); lean_mark_persistent(l_Lean_Lsp_instToJsonDidChangeTextDocumentParams___closed__1); l_Lean_Lsp_instToJsonDidChangeTextDocumentParams = _init_l_Lean_Lsp_instToJsonDidChangeTextDocumentParams(); lean_mark_persistent(l_Lean_Lsp_instToJsonDidChangeTextDocumentParams); l_Lean_Lsp_instFromJsonDidChangeTextDocumentParams___closed__1 = _init_l_Lean_Lsp_instFromJsonDidChangeTextDocumentParams___closed__1(); lean_mark_persistent(l_Lean_Lsp_instFromJsonDidChangeTextDocumentParams___closed__1); l_Lean_Lsp_instFromJsonDidChangeTextDocumentParams = _init_l_Lean_Lsp_instFromJsonDidChangeTextDocumentParams(); lean_mark_persistent(l_Lean_Lsp_instFromJsonDidChangeTextDocumentParams); l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_432____closed__1 = _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_432____closed__1(); lean_mark_persistent(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_432____closed__1); l_Lean_Lsp_instToJsonSaveOptions___closed__1 = _init_l_Lean_Lsp_instToJsonSaveOptions___closed__1(); lean_mark_persistent(l_Lean_Lsp_instToJsonSaveOptions___closed__1); l_Lean_Lsp_instToJsonSaveOptions = _init_l_Lean_Lsp_instToJsonSaveOptions(); lean_mark_persistent(l_Lean_Lsp_instToJsonSaveOptions); l_Lean_Lsp_instFromJsonSaveOptions___closed__1 = _init_l_Lean_Lsp_instFromJsonSaveOptions___closed__1(); lean_mark_persistent(l_Lean_Lsp_instFromJsonSaveOptions___closed__1); l_Lean_Lsp_instFromJsonSaveOptions = _init_l_Lean_Lsp_instFromJsonSaveOptions(); lean_mark_persistent(l_Lean_Lsp_instFromJsonSaveOptions); l_Lean_Lsp_instToJsonDidCloseTextDocumentParams___closed__1 = _init_l_Lean_Lsp_instToJsonDidCloseTextDocumentParams___closed__1(); lean_mark_persistent(l_Lean_Lsp_instToJsonDidCloseTextDocumentParams___closed__1); l_Lean_Lsp_instToJsonDidCloseTextDocumentParams = _init_l_Lean_Lsp_instToJsonDidCloseTextDocumentParams(); lean_mark_persistent(l_Lean_Lsp_instToJsonDidCloseTextDocumentParams); l_Lean_Lsp_instFromJsonDidCloseTextDocumentParams___closed__1 = _init_l_Lean_Lsp_instFromJsonDidCloseTextDocumentParams___closed__1(); lean_mark_persistent(l_Lean_Lsp_instFromJsonDidCloseTextDocumentParams___closed__1); l_Lean_Lsp_instFromJsonDidCloseTextDocumentParams = _init_l_Lean_Lsp_instFromJsonDidCloseTextDocumentParams(); lean_mark_persistent(l_Lean_Lsp_instFromJsonDidCloseTextDocumentParams); l_Lean_Lsp_TextDocumentSyncOptions_save_x3f___default = _init_l_Lean_Lsp_TextDocumentSyncOptions_save_x3f___default(); lean_mark_persistent(l_Lean_Lsp_TextDocumentSyncOptions_save_x3f___default); l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__1 = _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__1(); lean_mark_persistent(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__1); l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__2 = _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__2(); lean_mark_persistent(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__2); l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__3 = _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__3(); lean_mark_persistent(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__3); l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__4 = _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__4(); lean_mark_persistent(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__4); l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__5 = _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__5(); lean_mark_persistent(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__5); l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__6 = _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__6(); lean_mark_persistent(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__6); l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__7 = _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__7(); lean_mark_persistent(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__7); l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__8 = _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__8(); lean_mark_persistent(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__8); l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__9 = _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__9(); lean_mark_persistent(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__9); l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__10 = _init_l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__10(); lean_mark_persistent(l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_600____closed__10); l_Lean_Lsp_instToJsonTextDocumentSyncOptions___closed__1 = _init_l_Lean_Lsp_instToJsonTextDocumentSyncOptions___closed__1(); lean_mark_persistent(l_Lean_Lsp_instToJsonTextDocumentSyncOptions___closed__1); l_Lean_Lsp_instToJsonTextDocumentSyncOptions = _init_l_Lean_Lsp_instToJsonTextDocumentSyncOptions(); lean_mark_persistent(l_Lean_Lsp_instToJsonTextDocumentSyncOptions); l_Lean_Lsp_instFromJsonTextDocumentSyncOptions___closed__1 = _init_l_Lean_Lsp_instFromJsonTextDocumentSyncOptions___closed__1(); lean_mark_persistent(l_Lean_Lsp_instFromJsonTextDocumentSyncOptions___closed__1); l_Lean_Lsp_instFromJsonTextDocumentSyncOptions = _init_l_Lean_Lsp_instFromJsonTextDocumentSyncOptions(); lean_mark_persistent(l_Lean_Lsp_instFromJsonTextDocumentSyncOptions); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus } #endif
ChrisHughes24/lean4
stage0/stdlib/Lean/Elab/SyntheticMVars.c
<reponame>ChrisHughes24/lean4<gh_stars>0 // Lean compiler output // Module: Lean.Elab.SyntheticMVars // Imports: Init Lean.Util.ForEachExpr Lean.Elab.Term Lean.Elab.Tactic.Basic #include <lean/lean.h> #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wunused-label" #elif defined(__GNUC__) && !defined(__CLANG__) #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif #ifdef __cplusplus extern "C" { #endif lean_object* l_List_reverse___rarg(lean_object*); lean_object* l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__1; lean_object* l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__5(lean_object*); lean_object* l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__1___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l_List_forIn_loop___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__5___lambda__3___closed__1; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance_match__1(lean_object*); extern lean_object* l_Lean_Name_getString_x21___closed__3; lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___closed__3; lean_object* l_Lean_Expr_mvarId_x21(lean_object*); lean_object* l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__2; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___closed__1; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__2___rarg(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__1(lean_object*); lean_object* l_Lean_stringToMessageData(lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit_match__1(lean_object*); lean_object* l_Lean_Meta_getDefaultInstancesPriorities___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___spec__1___rarg(lean_object*, lean_object*); extern lean_object* l_Lean_withIncRecDepth___rarg___lambda__2___closed__2; lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar_match__1(lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_runTactic___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___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef(lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3___closed__1; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed_match__2(lean_object*); lean_object* l_Lean_Meta_mkConstWithFreshMVarLevels(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3___closed__2; lean_object* l_Lean_Meta_occursCheck(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___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_object*); lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___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*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkMVar(lean_object*); lean_object* l_Lean_Elab_Term_elabTermAndSynthesize(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumeElabTerm(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_checkTraceOption(lean_object*, lean_object*); lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__1___closed__1; extern lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign___closed__7; extern lean_object* l_Lean_Syntax_instForInTopDownSyntax_loop___at_Lean_Syntax_hasMissing___spec__1___closed__4; lean_object* lean_st_ref_get(lean_object*, lean_object*); lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___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___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_append___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_evalTactic(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_instReprBool___closed__1; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances(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_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__5; lean_object* l_Lean_Meta_isClass_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_getDefaultInstancesPriorities___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___spec__1___rarg___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_withSynthesize___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* l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__3; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault_match__1(lean_object*); lean_object* l_Lean_Expr_appArg_x21(lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__1___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_synthesizeSyntheticMVars(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__1___closed__2; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___lambda__2(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_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__4(lean_object*); lean_object* l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(lean_object*, lean_object*); lean_object* l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__2; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__5; lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___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_Elab_Term_withSynthesize___rarg___lambda__1(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_ensureHasType(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_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__2___closed__1; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp(lean_object*); extern lean_object* l_Lean_commitWhen___at_Lean_Meta_elimEmptyInductive___spec__3___at_Lean_Meta_elimEmptyInductive___spec__4___lambda__1___closed__1; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultLoop(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__3; lean_object* l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed_match__2___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__1; lean_object* l_Lean_mkAppN(lean_object*, lean_object*); 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_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar_match__1(lean_object*); lean_object* l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__5; lean_object* l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__4; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_insert___at_Lean_Elab_assignInfoHoleId___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_logTrace___at_Lean_Elab_Term_traceAtCmdPos___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__1; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar___closed__1; lean_object* l_Lean_Meta_getDefaultInstances___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_forIn_visit___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___spec__2(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_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_forallMetaTelescopeReducingAux(lean_object*, uint8_t, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_take(lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_Elab_logException___at___private_Lean_Elab_Term_0__Lean_Elab_Term_exceptionToSorry___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_ReaderT_pure___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar___spec__1___rarg(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_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___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___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed___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_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___closed__1; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars_match__1(lean_object*); lean_object* l_Lean_Meta_expandCoe(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___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_Elab_Term_elabTerm(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_withTacticInfoContext___rarg(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_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp_match__1(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___rarg___lambda__1___boxed(lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_replaceRef(lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1___closed__3; lean_object* l_Lean_Elab_Term_getMVarDecl___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_instReprBool___closed__3; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__6; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__6; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed_match__1(lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit_match__3(lean_object*); lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_isExprDefEqGuarded(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___closed__2; lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVars___boxed(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_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedExpr; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumeElabTerm___boxed(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_SyntheticMVars_0__Lean_Elab_Term_resumePostponed___lambda__2(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___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* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__2; extern lean_object* l_Lean_KernelException_toMessageData___closed__15; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3___closed__3; lean_object* l_Lean_Elab_Tactic_run(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep(uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_ReaderT_bind___at_Lean_Elab_Term_instMonadLogTermElabM___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_ReaderT_pure___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1___closed__1; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed___lambda__1(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Term_getFVarLocalDecl_x21___closed__1; lean_object* l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__4; lean_object* l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__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_runTactic(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit_match__2___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_Util___hyg_1262____closed__1; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVars_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* l_Lean_SimplePersistentEnvExtension_getState___rarg(lean_object*, lean_object*); lean_object* l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__8; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef_match__1(lean_object*); lean_object* l_Lean_Elab_Term_runTactic___closed__1; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1___closed__2; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance_match__1___rarg(lean_object*, lean_object*); extern uint8_t l_Lean_instInhabitedBinderInfo; lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVarsUsingDefault(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getPos_x3f(lean_object*, uint8_t); lean_object* l_Lean_Meta_assignExprMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_withMVarContext___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__4; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed___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_Std_Range_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_find_x3f___rarg(lean_object*, lean_object*); extern lean_object* l_Lean_Elab_postponeExceptionId; lean_object* l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__7; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___closed__1; extern lean_object* l_Lean_Elab_Term_instMonadInfoTreeTermElabM___closed__1; lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryLiftAndCoe___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_SavedState_restore(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_synthesizeInstMVarCore(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_withSynthesize(lean_object*, lean_object*); lean_object* lean_panic_fn(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__5___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Std_fmt___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__2___boxed(lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabTerm___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_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__3; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar(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___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_contradictionCore___spec__4___lambda__1___closed__4; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__2___closed__2; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_withSavedContext___rarg(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_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit___spec__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_runTactic___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_Lean_Elab_Term_synthesizeSyntheticMVarsNoPostponing(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_withSynthesize___rarg(lean_object*, lean_object*, lean_object*, uint8_t); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___rarg___closed__1; lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_ReaderT_bind___at_Lean_Elab_Tactic_focusAndDone___spec__1___rarg(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_Meta_inferType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_InfoTree_0__Lean_Elab_getResetInfoTrees___at_Lean_Elab_Term_withMacroExpansion___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_isExprDefEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___boxed(lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__3(lean_object*); lean_object* l_Lean_Meta_getMVarDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_instantiateMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_reportUnsolvedGoals(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l___private_Lean_Expr_0__Lean_beqBinderInfo____x40_Lean_Expr___hyg_237_(uint8_t, uint8_t); extern lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_Exception___hyg_3____closed__1; lean_object* l_Lean_Elab_Term_throwTypeMismatchError___rarg(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___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_getDefaultInstancesPriorities___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_instantiateMVarDeclMVars(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_fmt___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__2(uint8_t); lean_object* l_Lean_Elab_Term_registerMVarErrorImplicitArgInfo(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_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__3___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit_match__3___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar(lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___rarg___lambda__1(lean_object*); lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); lean_object* l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1(uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_ReaderT_pure___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar___spec__1(lean_object*); lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVars_loop___lambda__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Std_PersistentArray_anyM___at_Lean_MessageLog_hasErrors___spec__1(lean_object*); lean_object* l_Lean_Meta_getDefaultInstances___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_List_isEmpty___rarg(lean_object*); lean_object* l_List_lengthAux___rarg(lean_object*, lean_object*); lean_object* l_Lean_indentExpr(lean_object*); lean_object* l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_SynthInstance_resume___closed__4; lean_object* l_Lean_Elab_Term_synthesizeCoeInstMVarCore(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit_match__2(lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_defaultInstanceExtension; lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__2___closed__3; lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVars_loop___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_saveState___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed___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* l_Std_RBNode_find___at_Lean_Meta_addDefaultInstanceEntry___spec__3(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__2(lean_object*); extern lean_object* l_Array_findSomeM_x3f___rarg___closed__1; lean_object* l_Lean_Meta_getDefaultInstancesPriorities___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__4___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_withSynthesize___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar_match__1(lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumeElabTerm(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { uint8_t x_11; x_11 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 1); if (x_11 == 0) { uint8_t x_12; x_12 = !lean_is_exclusive(x_4); if (x_12 == 0) { uint8_t x_13; uint8_t x_14; lean_object* x_15; x_13 = 0; lean_ctor_set_uint8(x_4, sizeof(void*)*8 + 1, x_13); x_14 = 1; x_15 = l_Lean_Elab_Term_elabTerm(x_1, x_2, x_13, x_14, x_4, x_5, x_6, x_7, x_8, x_9, x_10); return x_15; } else { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; uint8_t x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; uint8_t x_27; lean_object* x_28; uint8_t x_29; lean_object* x_30; x_16 = lean_ctor_get(x_4, 0); x_17 = lean_ctor_get(x_4, 1); x_18 = lean_ctor_get(x_4, 2); x_19 = lean_ctor_get(x_4, 3); x_20 = lean_ctor_get(x_4, 4); x_21 = lean_ctor_get_uint8(x_4, sizeof(void*)*8); x_22 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 2); x_23 = lean_ctor_get(x_4, 5); x_24 = lean_ctor_get(x_4, 6); x_25 = lean_ctor_get(x_4, 7); x_26 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 3); lean_inc(x_25); lean_inc(x_24); lean_inc(x_23); lean_inc(x_20); lean_inc(x_19); lean_inc(x_18); lean_inc(x_17); lean_inc(x_16); lean_dec(x_4); x_27 = 0; x_28 = lean_alloc_ctor(0, 8, 4); lean_ctor_set(x_28, 0, x_16); lean_ctor_set(x_28, 1, x_17); lean_ctor_set(x_28, 2, x_18); lean_ctor_set(x_28, 3, x_19); lean_ctor_set(x_28, 4, x_20); lean_ctor_set(x_28, 5, x_23); lean_ctor_set(x_28, 6, x_24); lean_ctor_set(x_28, 7, x_25); lean_ctor_set_uint8(x_28, sizeof(void*)*8, x_21); lean_ctor_set_uint8(x_28, sizeof(void*)*8 + 1, x_27); lean_ctor_set_uint8(x_28, sizeof(void*)*8 + 2, x_22); lean_ctor_set_uint8(x_28, sizeof(void*)*8 + 3, x_26); x_29 = 1; x_30 = l_Lean_Elab_Term_elabTerm(x_1, x_2, x_27, x_29, x_28, x_5, x_6, x_7, x_8, x_9, x_10); return x_30; } } else { uint8_t x_31; x_31 = !lean_is_exclusive(x_4); if (x_31 == 0) { uint8_t x_32; uint8_t x_33; lean_object* x_34; lean_ctor_set_uint8(x_4, sizeof(void*)*8 + 1, x_3); x_32 = 0; x_33 = 1; x_34 = l_Lean_Elab_Term_elabTerm(x_1, x_2, x_32, x_33, x_4, x_5, x_6, x_7, x_8, x_9, x_10); return x_34; } else { lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; uint8_t x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; uint8_t x_45; lean_object* x_46; uint8_t x_47; uint8_t x_48; lean_object* x_49; x_35 = lean_ctor_get(x_4, 0); x_36 = lean_ctor_get(x_4, 1); x_37 = lean_ctor_get(x_4, 2); x_38 = lean_ctor_get(x_4, 3); x_39 = lean_ctor_get(x_4, 4); x_40 = lean_ctor_get_uint8(x_4, sizeof(void*)*8); x_41 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 2); x_42 = lean_ctor_get(x_4, 5); x_43 = lean_ctor_get(x_4, 6); x_44 = lean_ctor_get(x_4, 7); x_45 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 3); lean_inc(x_44); lean_inc(x_43); lean_inc(x_42); lean_inc(x_39); lean_inc(x_38); lean_inc(x_37); lean_inc(x_36); lean_inc(x_35); lean_dec(x_4); x_46 = lean_alloc_ctor(0, 8, 4); lean_ctor_set(x_46, 0, x_35); lean_ctor_set(x_46, 1, x_36); lean_ctor_set(x_46, 2, x_37); lean_ctor_set(x_46, 3, x_38); lean_ctor_set(x_46, 4, x_39); lean_ctor_set(x_46, 5, x_42); lean_ctor_set(x_46, 6, x_43); lean_ctor_set(x_46, 7, x_44); lean_ctor_set_uint8(x_46, sizeof(void*)*8, x_40); lean_ctor_set_uint8(x_46, sizeof(void*)*8 + 1, x_3); lean_ctor_set_uint8(x_46, sizeof(void*)*8 + 2, x_41); lean_ctor_set_uint8(x_46, sizeof(void*)*8 + 3, x_45); x_47 = 0; x_48 = 1; x_49 = l_Lean_Elab_Term_elabTerm(x_1, x_2, x_47, x_48, x_46, x_5, x_6, x_7, x_8, x_9, x_10); return x_49; } } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumeElabTerm___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: { uint8_t x_11; lean_object* x_12; x_11 = lean_unbox(x_3); lean_dec(x_3); x_12 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumeElabTerm(x_1, x_2, x_11, x_4, x_5, x_6, x_7, x_8, x_9, x_10); return x_12; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed_match__1___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_object* x_6; lean_dec(x_2); x_4 = lean_ctor_get(x_1, 0); lean_inc(x_4); x_5 = lean_ctor_get(x_1, 1); lean_inc(x_5); x_6 = lean_apply_3(x_3, x_1, x_4, x_5); return x_6; } else { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_dec(x_3); x_7 = lean_ctor_get(x_1, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_1, 1); lean_inc(x_8); x_9 = lean_apply_3(x_2, x_1, x_7, x_8); return x_9; } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed_match__1___rarg), 3, 0); return x_2; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed_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_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_object* x_8; lean_object* x_9; lean_dec(x_2); x_7 = lean_ctor_get(x_1, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_1, 1); lean_inc(x_8); lean_dec(x_1); x_9 = lean_apply_2(x_3, x_7, x_8); return x_9; } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed_match__2___rarg), 3, 0); return x_2; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed___lambda__1(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { lean_object* x_12; lean_object* x_25; lean_object* x_26; x_25 = lean_ctor_get(x_4, 2); lean_inc(x_25); lean_dec(x_4); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); x_26 = l_Lean_Meta_instantiateMVars(x_25, x_7, x_8, x_9, x_10, x_11); if (lean_obj_tag(x_26) == 0) { lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; x_27 = lean_ctor_get(x_26, 0); lean_inc(x_27); x_28 = lean_ctor_get(x_26, 1); lean_inc(x_28); lean_dec(x_26); x_29 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_29, 0, x_27); x_30 = lean_st_ref_get(x_10, x_28); if (x_3 == 0) { uint8_t x_301; x_301 = 1; x_31 = x_301; goto block_300; } else { uint8_t x_302; x_302 = 0; x_31 = x_302; goto block_300; } block_300: { lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36; x_32 = lean_ctor_get(x_30, 1); lean_inc(x_32); lean_dec(x_30); x_33 = lean_st_ref_get(x_6, x_32); x_34 = lean_ctor_get(x_33, 0); lean_inc(x_34); x_35 = lean_ctor_get(x_34, 5); lean_inc(x_35); lean_dec(x_34); x_36 = lean_ctor_get_uint8(x_35, sizeof(void*)*2); lean_dec(x_35); if (x_36 == 0) { lean_object* x_37; lean_object* x_38; x_37 = lean_ctor_get(x_33, 1); lean_inc(x_37); lean_dec(x_33); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_29); lean_inc(x_1); x_38 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumeElabTerm(x_1, x_29, x_31, x_5, x_6, x_7, x_8, x_9, x_10, x_37); if (lean_obj_tag(x_38) == 0) { lean_object* x_39; lean_object* x_40; 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; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; x_39 = lean_ctor_get(x_38, 0); lean_inc(x_39); x_40 = lean_ctor_get(x_38, 1); lean_inc(x_40); lean_dec(x_38); x_41 = lean_box(0); x_42 = lean_ctor_get(x_9, 0); lean_inc(x_42); x_43 = lean_ctor_get(x_9, 1); lean_inc(x_43); x_44 = lean_ctor_get(x_9, 2); lean_inc(x_44); x_45 = lean_ctor_get(x_9, 3); lean_inc(x_45); x_46 = lean_ctor_get(x_9, 4); lean_inc(x_46); x_47 = lean_ctor_get(x_9, 5); lean_inc(x_47); x_48 = lean_ctor_get(x_9, 6); lean_inc(x_48); x_49 = lean_ctor_get(x_9, 7); lean_inc(x_49); x_50 = l_Lean_replaceRef(x_1, x_45); lean_dec(x_45); lean_dec(x_1); x_51 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_51, 0, x_42); lean_ctor_set(x_51, 1, x_43); lean_ctor_set(x_51, 2, x_44); lean_ctor_set(x_51, 3, x_50); lean_ctor_set(x_51, 4, x_46); lean_ctor_set(x_51, 5, x_47); lean_ctor_set(x_51, 6, x_48); lean_ctor_set(x_51, 7, x_49); lean_inc(x_10); lean_inc(x_8); lean_inc(x_7); x_52 = l_Lean_Elab_Term_ensureHasType(x_29, x_39, x_41, x_5, x_6, x_7, x_8, x_51, x_10, x_40); if (lean_obj_tag(x_52) == 0) { lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; uint8_t x_57; x_53 = lean_ctor_get(x_52, 0); lean_inc(x_53); x_54 = lean_ctor_get(x_52, 1); lean_inc(x_54); lean_dec(x_52); lean_inc(x_53); x_55 = l_Lean_Meta_occursCheck(x_2, x_53, x_7, x_8, x_9, x_10, x_54); x_56 = lean_ctor_get(x_55, 0); lean_inc(x_56); x_57 = lean_unbox(x_56); lean_dec(x_56); if (x_57 == 0) { uint8_t x_58; lean_dec(x_53); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_2); x_58 = !lean_is_exclusive(x_55); if (x_58 == 0) { lean_object* x_59; uint8_t x_60; lean_object* x_61; x_59 = lean_ctor_get(x_55, 0); lean_dec(x_59); x_60 = 0; x_61 = lean_box(x_60); lean_ctor_set(x_55, 0, x_61); return x_55; } else { lean_object* x_62; uint8_t x_63; lean_object* x_64; lean_object* x_65; x_62 = lean_ctor_get(x_55, 1); lean_inc(x_62); lean_dec(x_55); x_63 = 0; x_64 = lean_box(x_63); x_65 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_65, 0, x_64); lean_ctor_set(x_65, 1, x_62); return x_65; } } else { lean_object* x_66; lean_object* x_67; uint8_t x_68; x_66 = lean_ctor_get(x_55, 1); lean_inc(x_66); lean_dec(x_55); x_67 = l_Lean_Meta_assignExprMVar(x_2, x_53, x_7, x_8, x_9, x_10, x_66); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); x_68 = !lean_is_exclusive(x_67); if (x_68 == 0) { lean_object* x_69; uint8_t x_70; lean_object* x_71; x_69 = lean_ctor_get(x_67, 0); lean_dec(x_69); x_70 = 1; x_71 = lean_box(x_70); lean_ctor_set(x_67, 0, x_71); return x_67; } else { lean_object* x_72; uint8_t x_73; lean_object* x_74; lean_object* x_75; x_72 = lean_ctor_get(x_67, 1); lean_inc(x_72); lean_dec(x_67); x_73 = 1; x_74 = lean_box(x_73); x_75 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_75, 0, x_74); lean_ctor_set(x_75, 1, x_72); return x_75; } } } else { uint8_t x_76; lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_2); x_76 = !lean_is_exclusive(x_52); if (x_76 == 0) { return x_52; } else { lean_object* x_77; lean_object* x_78; lean_object* x_79; x_77 = lean_ctor_get(x_52, 0); x_78 = lean_ctor_get(x_52, 1); lean_inc(x_78); lean_inc(x_77); lean_dec(x_52); x_79 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_79, 0, x_77); lean_ctor_set(x_79, 1, x_78); return x_79; } } } else { uint8_t x_80; lean_dec(x_29); 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_2); lean_dec(x_1); x_80 = !lean_is_exclusive(x_38); if (x_80 == 0) { return x_38; } else { lean_object* x_81; lean_object* x_82; lean_object* x_83; x_81 = lean_ctor_get(x_38, 0); x_82 = lean_ctor_get(x_38, 1); lean_inc(x_82); lean_inc(x_81); lean_dec(x_38); 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 { lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; uint8_t x_88; lean_object* x_89; lean_object* x_191; lean_object* x_192; lean_object* x_270; x_84 = lean_ctor_get(x_33, 1); lean_inc(x_84); lean_dec(x_33); x_85 = l___private_Lean_Elab_InfoTree_0__Lean_Elab_getResetInfoTrees___at_Lean_Elab_Term_withMacroExpansion___spec__2___rarg(x_6, x_7, x_8, x_9, x_10, x_84); x_86 = lean_ctor_get(x_85, 0); lean_inc(x_86); x_87 = lean_ctor_get(x_85, 1); lean_inc(x_87); lean_dec(x_85); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_29); lean_inc(x_1); x_270 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumeElabTerm(x_1, x_29, x_31, x_5, x_6, x_7, x_8, x_9, x_10, x_87); if (lean_obj_tag(x_270) == 0) { lean_object* x_271; lean_object* x_272; lean_object* x_273; lean_object* x_274; lean_object* x_275; 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; lean_object* x_284; x_271 = lean_ctor_get(x_270, 0); lean_inc(x_271); x_272 = lean_ctor_get(x_270, 1); lean_inc(x_272); lean_dec(x_270); x_273 = lean_box(0); x_274 = lean_ctor_get(x_9, 0); lean_inc(x_274); x_275 = lean_ctor_get(x_9, 1); lean_inc(x_275); x_276 = lean_ctor_get(x_9, 2); lean_inc(x_276); x_277 = lean_ctor_get(x_9, 3); lean_inc(x_277); x_278 = lean_ctor_get(x_9, 4); lean_inc(x_278); x_279 = lean_ctor_get(x_9, 5); lean_inc(x_279); x_280 = lean_ctor_get(x_9, 6); lean_inc(x_280); x_281 = lean_ctor_get(x_9, 7); lean_inc(x_281); x_282 = l_Lean_replaceRef(x_1, x_277); lean_dec(x_277); lean_dec(x_1); x_283 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_283, 0, x_274); lean_ctor_set(x_283, 1, x_275); lean_ctor_set(x_283, 2, x_276); lean_ctor_set(x_283, 3, x_282); lean_ctor_set(x_283, 4, x_278); lean_ctor_set(x_283, 5, x_279); lean_ctor_set(x_283, 6, x_280); lean_ctor_set(x_283, 7, x_281); lean_inc(x_10); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); x_284 = l_Lean_Elab_Term_ensureHasType(x_29, x_271, x_273, x_5, x_6, x_7, x_8, x_283, x_10, x_272); if (lean_obj_tag(x_284) == 0) { lean_object* x_285; lean_object* x_286; lean_object* x_287; lean_object* x_288; uint8_t x_289; x_285 = lean_ctor_get(x_284, 0); lean_inc(x_285); x_286 = lean_ctor_get(x_284, 1); lean_inc(x_286); lean_dec(x_284); lean_inc(x_285); x_287 = l_Lean_Meta_occursCheck(x_2, x_285, x_7, x_8, x_9, x_10, x_286); x_288 = lean_ctor_get(x_287, 0); lean_inc(x_288); x_289 = lean_unbox(x_288); lean_dec(x_288); if (x_289 == 0) { lean_object* x_290; uint8_t x_291; lean_dec(x_285); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); x_290 = lean_ctor_get(x_287, 1); lean_inc(x_290); lean_dec(x_287); x_291 = 0; x_88 = x_291; x_89 = x_290; goto block_190; } else { lean_object* x_292; lean_object* x_293; lean_object* x_294; uint8_t x_295; x_292 = lean_ctor_get(x_287, 1); lean_inc(x_292); lean_dec(x_287); lean_inc(x_2); x_293 = l_Lean_Meta_assignExprMVar(x_2, x_285, x_7, x_8, x_9, x_10, x_292); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); x_294 = lean_ctor_get(x_293, 1); lean_inc(x_294); lean_dec(x_293); x_295 = 1; x_88 = x_295; x_89 = x_294; goto block_190; } } else { lean_object* x_296; lean_object* x_297; lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); x_296 = lean_ctor_get(x_284, 0); lean_inc(x_296); x_297 = lean_ctor_get(x_284, 1); lean_inc(x_297); lean_dec(x_284); x_191 = x_296; x_192 = x_297; goto block_269; } } else { lean_object* x_298; lean_object* x_299; lean_dec(x_29); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_5); lean_dec(x_1); x_298 = lean_ctor_get(x_270, 0); lean_inc(x_298); x_299 = lean_ctor_get(x_270, 1); lean_inc(x_299); lean_dec(x_270); x_191 = x_298; x_192 = x_299; goto block_269; } block_190: { lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; uint8_t x_96; x_90 = lean_st_ref_get(x_10, x_89); lean_dec(x_10); x_91 = lean_ctor_get(x_90, 1); lean_inc(x_91); lean_dec(x_90); x_92 = lean_st_ref_take(x_6, x_91); x_93 = lean_ctor_get(x_92, 0); lean_inc(x_93); x_94 = lean_ctor_get(x_93, 5); lean_inc(x_94); x_95 = lean_ctor_get(x_92, 1); lean_inc(x_95); lean_dec(x_92); x_96 = !lean_is_exclusive(x_93); if (x_96 == 0) { lean_object* x_97; uint8_t x_98; x_97 = lean_ctor_get(x_93, 5); lean_dec(x_97); x_98 = !lean_is_exclusive(x_94); if (x_98 == 0) { lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; uint8_t x_103; x_99 = lean_ctor_get(x_94, 0); x_100 = lean_ctor_get(x_94, 1); x_101 = lean_ctor_get(x_100, 2); lean_inc(x_101); x_102 = lean_unsigned_to_nat(0u); x_103 = lean_nat_dec_lt(x_102, x_101); if (x_103 == 0) { lean_object* x_104; uint8_t x_105; lean_dec(x_101); lean_dec(x_100); lean_dec(x_2); lean_ctor_set(x_94, 1, x_86); x_104 = lean_st_ref_set(x_6, x_93, x_95); lean_dec(x_6); x_105 = !lean_is_exclusive(x_104); if (x_105 == 0) { lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; x_106 = lean_ctor_get(x_104, 0); lean_dec(x_106); x_107 = lean_box(0); x_108 = lean_box(x_88); x_109 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_109, 0, x_108); lean_ctor_set(x_109, 1, x_107); lean_ctor_set(x_104, 0, x_109); x_12 = x_104; goto block_24; } else { lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; x_110 = lean_ctor_get(x_104, 1); lean_inc(x_110); lean_dec(x_104); x_111 = lean_box(0); x_112 = lean_box(x_88); x_113 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_113, 0, x_112); lean_ctor_set(x_113, 1, x_111); x_114 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_114, 0, x_113); lean_ctor_set(x_114, 1, x_110); x_12 = x_114; goto block_24; } } else { lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; uint8_t x_120; x_115 = lean_unsigned_to_nat(1u); x_116 = lean_nat_sub(x_101, x_115); lean_dec(x_101); x_117 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_100, x_116); lean_dec(x_116); x_118 = l_Std_PersistentHashMap_insert___at_Lean_Elab_assignInfoHoleId___spec__1(x_99, x_2, x_117); lean_ctor_set(x_94, 1, x_86); lean_ctor_set(x_94, 0, x_118); x_119 = lean_st_ref_set(x_6, x_93, x_95); lean_dec(x_6); x_120 = !lean_is_exclusive(x_119); if (x_120 == 0) { lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; x_121 = lean_ctor_get(x_119, 0); lean_dec(x_121); x_122 = lean_box(0); x_123 = lean_box(x_88); x_124 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_124, 0, x_123); lean_ctor_set(x_124, 1, x_122); lean_ctor_set(x_119, 0, x_124); x_12 = x_119; goto block_24; } else { lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; x_125 = lean_ctor_get(x_119, 1); lean_inc(x_125); lean_dec(x_119); x_126 = lean_box(0); x_127 = lean_box(x_88); x_128 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_128, 0, x_127); lean_ctor_set(x_128, 1, x_126); x_129 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_129, 0, x_128); lean_ctor_set(x_129, 1, x_125); x_12 = x_129; goto block_24; } } } else { uint8_t x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; uint8_t x_135; x_130 = lean_ctor_get_uint8(x_94, sizeof(void*)*2); x_131 = lean_ctor_get(x_94, 0); x_132 = lean_ctor_get(x_94, 1); lean_inc(x_132); lean_inc(x_131); lean_dec(x_94); x_133 = lean_ctor_get(x_132, 2); lean_inc(x_133); x_134 = lean_unsigned_to_nat(0u); x_135 = lean_nat_dec_lt(x_134, x_133); if (x_135 == 0) { 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; lean_object* x_143; lean_dec(x_133); lean_dec(x_132); lean_dec(x_2); x_136 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_136, 0, x_131); lean_ctor_set(x_136, 1, x_86); lean_ctor_set_uint8(x_136, sizeof(void*)*2, x_130); lean_ctor_set(x_93, 5, x_136); x_137 = lean_st_ref_set(x_6, x_93, x_95); lean_dec(x_6); x_138 = lean_ctor_get(x_137, 1); lean_inc(x_138); if (lean_is_exclusive(x_137)) { lean_ctor_release(x_137, 0); lean_ctor_release(x_137, 1); x_139 = x_137; } else { lean_dec_ref(x_137); x_139 = lean_box(0); } x_140 = lean_box(0); x_141 = lean_box(x_88); x_142 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_142, 0, x_141); lean_ctor_set(x_142, 1, x_140); if (lean_is_scalar(x_139)) { x_143 = lean_alloc_ctor(0, 2, 0); } else { x_143 = x_139; } lean_ctor_set(x_143, 0, x_142); lean_ctor_set(x_143, 1, x_138); x_12 = x_143; goto block_24; } else { lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; 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; x_144 = lean_unsigned_to_nat(1u); x_145 = lean_nat_sub(x_133, x_144); lean_dec(x_133); x_146 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_132, x_145); lean_dec(x_145); x_147 = l_Std_PersistentHashMap_insert___at_Lean_Elab_assignInfoHoleId___spec__1(x_131, x_2, x_146); x_148 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_148, 0, x_147); lean_ctor_set(x_148, 1, x_86); lean_ctor_set_uint8(x_148, sizeof(void*)*2, x_130); lean_ctor_set(x_93, 5, x_148); x_149 = lean_st_ref_set(x_6, x_93, x_95); lean_dec(x_6); x_150 = lean_ctor_get(x_149, 1); lean_inc(x_150); if (lean_is_exclusive(x_149)) { lean_ctor_release(x_149, 0); lean_ctor_release(x_149, 1); x_151 = x_149; } else { lean_dec_ref(x_149); x_151 = lean_box(0); } x_152 = lean_box(0); x_153 = lean_box(x_88); x_154 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_154, 0, x_153); lean_ctor_set(x_154, 1, x_152); if (lean_is_scalar(x_151)) { x_155 = lean_alloc_ctor(0, 2, 0); } else { x_155 = x_151; } lean_ctor_set(x_155, 0, x_154); lean_ctor_set(x_155, 1, x_150); x_12 = x_155; goto block_24; } } } else { lean_object* x_156; 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; lean_object* x_165; lean_object* x_166; uint8_t x_167; x_156 = lean_ctor_get(x_93, 0); x_157 = lean_ctor_get(x_93, 1); x_158 = lean_ctor_get(x_93, 2); x_159 = lean_ctor_get(x_93, 3); x_160 = lean_ctor_get(x_93, 4); lean_inc(x_160); lean_inc(x_159); lean_inc(x_158); lean_inc(x_157); lean_inc(x_156); lean_dec(x_93); x_161 = lean_ctor_get_uint8(x_94, sizeof(void*)*2); x_162 = lean_ctor_get(x_94, 0); lean_inc(x_162); x_163 = lean_ctor_get(x_94, 1); lean_inc(x_163); if (lean_is_exclusive(x_94)) { lean_ctor_release(x_94, 0); lean_ctor_release(x_94, 1); x_164 = x_94; } else { lean_dec_ref(x_94); x_164 = lean_box(0); } x_165 = lean_ctor_get(x_163, 2); lean_inc(x_165); x_166 = lean_unsigned_to_nat(0u); x_167 = lean_nat_dec_lt(x_166, x_165); if (x_167 == 0) { lean_object* x_168; 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; lean_object* x_176; lean_dec(x_165); lean_dec(x_163); lean_dec(x_2); if (lean_is_scalar(x_164)) { x_168 = lean_alloc_ctor(0, 2, 1); } else { x_168 = x_164; } lean_ctor_set(x_168, 0, x_162); lean_ctor_set(x_168, 1, x_86); lean_ctor_set_uint8(x_168, sizeof(void*)*2, x_161); x_169 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_169, 0, x_156); lean_ctor_set(x_169, 1, x_157); lean_ctor_set(x_169, 2, x_158); lean_ctor_set(x_169, 3, x_159); lean_ctor_set(x_169, 4, x_160); lean_ctor_set(x_169, 5, x_168); x_170 = lean_st_ref_set(x_6, x_169, x_95); lean_dec(x_6); x_171 = lean_ctor_get(x_170, 1); lean_inc(x_171); if (lean_is_exclusive(x_170)) { lean_ctor_release(x_170, 0); lean_ctor_release(x_170, 1); x_172 = x_170; } else { lean_dec_ref(x_170); x_172 = lean_box(0); } x_173 = lean_box(0); x_174 = lean_box(x_88); x_175 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_175, 0, x_174); lean_ctor_set(x_175, 1, x_173); if (lean_is_scalar(x_172)) { x_176 = lean_alloc_ctor(0, 2, 0); } else { x_176 = x_172; } lean_ctor_set(x_176, 0, x_175); lean_ctor_set(x_176, 1, x_171); x_12 = x_176; goto block_24; } else { 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; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; x_177 = lean_unsigned_to_nat(1u); x_178 = lean_nat_sub(x_165, x_177); lean_dec(x_165); x_179 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_163, x_178); lean_dec(x_178); x_180 = l_Std_PersistentHashMap_insert___at_Lean_Elab_assignInfoHoleId___spec__1(x_162, x_2, x_179); if (lean_is_scalar(x_164)) { x_181 = lean_alloc_ctor(0, 2, 1); } else { x_181 = x_164; } lean_ctor_set(x_181, 0, x_180); lean_ctor_set(x_181, 1, x_86); lean_ctor_set_uint8(x_181, sizeof(void*)*2, x_161); x_182 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_182, 0, x_156); lean_ctor_set(x_182, 1, x_157); lean_ctor_set(x_182, 2, x_158); lean_ctor_set(x_182, 3, x_159); lean_ctor_set(x_182, 4, x_160); lean_ctor_set(x_182, 5, x_181); x_183 = lean_st_ref_set(x_6, x_182, x_95); lean_dec(x_6); x_184 = lean_ctor_get(x_183, 1); lean_inc(x_184); if (lean_is_exclusive(x_183)) { lean_ctor_release(x_183, 0); lean_ctor_release(x_183, 1); x_185 = x_183; } else { lean_dec_ref(x_183); x_185 = lean_box(0); } x_186 = lean_box(0); x_187 = lean_box(x_88); x_188 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_188, 0, x_187); lean_ctor_set(x_188, 1, x_186); if (lean_is_scalar(x_185)) { x_189 = lean_alloc_ctor(0, 2, 0); } else { x_189 = x_185; } lean_ctor_set(x_189, 0, x_188); lean_ctor_set(x_189, 1, x_184); x_12 = x_189; goto block_24; } } } block_269: { lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; uint8_t x_199; x_193 = lean_st_ref_get(x_10, x_192); lean_dec(x_10); x_194 = lean_ctor_get(x_193, 1); lean_inc(x_194); lean_dec(x_193); x_195 = lean_st_ref_take(x_6, x_194); x_196 = lean_ctor_get(x_195, 0); lean_inc(x_196); x_197 = lean_ctor_get(x_196, 5); lean_inc(x_197); x_198 = lean_ctor_get(x_195, 1); lean_inc(x_198); lean_dec(x_195); x_199 = !lean_is_exclusive(x_196); if (x_199 == 0) { lean_object* x_200; uint8_t x_201; x_200 = lean_ctor_get(x_196, 5); lean_dec(x_200); x_201 = !lean_is_exclusive(x_197); if (x_201 == 0) { lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; uint8_t x_206; x_202 = lean_ctor_get(x_197, 0); x_203 = lean_ctor_get(x_197, 1); x_204 = lean_ctor_get(x_203, 2); lean_inc(x_204); x_205 = lean_unsigned_to_nat(0u); x_206 = lean_nat_dec_lt(x_205, x_204); if (x_206 == 0) { lean_object* x_207; uint8_t x_208; lean_dec(x_204); lean_dec(x_203); lean_dec(x_2); lean_ctor_set(x_197, 1, x_86); x_207 = lean_st_ref_set(x_6, x_196, x_198); lean_dec(x_6); 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_tag(x_207, 1); lean_ctor_set(x_207, 0, x_191); x_12 = x_207; goto block_24; } 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(1, 2, 0); lean_ctor_set(x_211, 0, x_191); lean_ctor_set(x_211, 1, x_210); x_12 = x_211; goto block_24; } } else { lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; uint8_t x_217; x_212 = lean_unsigned_to_nat(1u); x_213 = lean_nat_sub(x_204, x_212); lean_dec(x_204); x_214 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_203, x_213); lean_dec(x_213); x_215 = l_Std_PersistentHashMap_insert___at_Lean_Elab_assignInfoHoleId___spec__1(x_202, x_2, x_214); lean_ctor_set(x_197, 1, x_86); lean_ctor_set(x_197, 0, x_215); x_216 = lean_st_ref_set(x_6, x_196, x_198); lean_dec(x_6); x_217 = !lean_is_exclusive(x_216); if (x_217 == 0) { lean_object* x_218; x_218 = lean_ctor_get(x_216, 0); lean_dec(x_218); lean_ctor_set_tag(x_216, 1); lean_ctor_set(x_216, 0, x_191); x_12 = x_216; goto block_24; } else { lean_object* x_219; lean_object* x_220; x_219 = lean_ctor_get(x_216, 1); lean_inc(x_219); lean_dec(x_216); x_220 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_220, 0, x_191); lean_ctor_set(x_220, 1, x_219); x_12 = x_220; goto block_24; } } } else { uint8_t x_221; lean_object* x_222; lean_object* x_223; lean_object* x_224; lean_object* x_225; uint8_t x_226; x_221 = lean_ctor_get_uint8(x_197, sizeof(void*)*2); x_222 = lean_ctor_get(x_197, 0); x_223 = lean_ctor_get(x_197, 1); lean_inc(x_223); lean_inc(x_222); lean_dec(x_197); x_224 = lean_ctor_get(x_223, 2); lean_inc(x_224); x_225 = lean_unsigned_to_nat(0u); x_226 = lean_nat_dec_lt(x_225, 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_dec(x_224); lean_dec(x_223); lean_dec(x_2); x_227 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_227, 0, x_222); lean_ctor_set(x_227, 1, x_86); lean_ctor_set_uint8(x_227, sizeof(void*)*2, x_221); lean_ctor_set(x_196, 5, x_227); x_228 = lean_st_ref_set(x_6, x_196, x_198); lean_dec(x_6); x_229 = lean_ctor_get(x_228, 1); lean_inc(x_229); if (lean_is_exclusive(x_228)) { lean_ctor_release(x_228, 0); lean_ctor_release(x_228, 1); x_230 = x_228; } else { lean_dec_ref(x_228); x_230 = lean_box(0); } if (lean_is_scalar(x_230)) { x_231 = lean_alloc_ctor(1, 2, 0); } else { x_231 = x_230; lean_ctor_set_tag(x_231, 1); } lean_ctor_set(x_231, 0, x_191); lean_ctor_set(x_231, 1, x_229); x_12 = x_231; goto block_24; } else { lean_object* x_232; lean_object* x_233; 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; x_232 = lean_unsigned_to_nat(1u); x_233 = lean_nat_sub(x_224, x_232); lean_dec(x_224); x_234 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_223, x_233); lean_dec(x_233); x_235 = l_Std_PersistentHashMap_insert___at_Lean_Elab_assignInfoHoleId___spec__1(x_222, x_2, x_234); x_236 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_236, 0, x_235); lean_ctor_set(x_236, 1, x_86); lean_ctor_set_uint8(x_236, sizeof(void*)*2, x_221); lean_ctor_set(x_196, 5, x_236); x_237 = lean_st_ref_set(x_6, x_196, x_198); lean_dec(x_6); x_238 = lean_ctor_get(x_237, 1); lean_inc(x_238); if (lean_is_exclusive(x_237)) { lean_ctor_release(x_237, 0); lean_ctor_release(x_237, 1); x_239 = x_237; } else { lean_dec_ref(x_237); x_239 = lean_box(0); } if (lean_is_scalar(x_239)) { x_240 = lean_alloc_ctor(1, 2, 0); } else { x_240 = x_239; lean_ctor_set_tag(x_240, 1); } lean_ctor_set(x_240, 0, x_191); lean_ctor_set(x_240, 1, x_238); x_12 = x_240; goto block_24; } } } else { 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; lean_object* x_249; lean_object* x_250; lean_object* x_251; uint8_t x_252; x_241 = lean_ctor_get(x_196, 0); x_242 = lean_ctor_get(x_196, 1); x_243 = lean_ctor_get(x_196, 2); x_244 = lean_ctor_get(x_196, 3); x_245 = lean_ctor_get(x_196, 4); lean_inc(x_245); lean_inc(x_244); lean_inc(x_243); lean_inc(x_242); lean_inc(x_241); lean_dec(x_196); x_246 = lean_ctor_get_uint8(x_197, sizeof(void*)*2); x_247 = lean_ctor_get(x_197, 0); lean_inc(x_247); x_248 = lean_ctor_get(x_197, 1); lean_inc(x_248); if (lean_is_exclusive(x_197)) { lean_ctor_release(x_197, 0); lean_ctor_release(x_197, 1); x_249 = x_197; } else { lean_dec_ref(x_197); x_249 = lean_box(0); } x_250 = lean_ctor_get(x_248, 2); lean_inc(x_250); x_251 = lean_unsigned_to_nat(0u); x_252 = lean_nat_dec_lt(x_251, x_250); if (x_252 == 0) { lean_object* x_253; lean_object* x_254; lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; lean_dec(x_250); lean_dec(x_248); lean_dec(x_2); if (lean_is_scalar(x_249)) { x_253 = lean_alloc_ctor(0, 2, 1); } else { x_253 = x_249; } lean_ctor_set(x_253, 0, x_247); lean_ctor_set(x_253, 1, x_86); lean_ctor_set_uint8(x_253, sizeof(void*)*2, x_246); x_254 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_254, 0, x_241); lean_ctor_set(x_254, 1, x_242); lean_ctor_set(x_254, 2, x_243); lean_ctor_set(x_254, 3, x_244); lean_ctor_set(x_254, 4, x_245); lean_ctor_set(x_254, 5, x_253); x_255 = lean_st_ref_set(x_6, x_254, x_198); lean_dec(x_6); x_256 = lean_ctor_get(x_255, 1); lean_inc(x_256); if (lean_is_exclusive(x_255)) { lean_ctor_release(x_255, 0); lean_ctor_release(x_255, 1); x_257 = x_255; } else { lean_dec_ref(x_255); x_257 = lean_box(0); } if (lean_is_scalar(x_257)) { x_258 = lean_alloc_ctor(1, 2, 0); } else { x_258 = x_257; lean_ctor_set_tag(x_258, 1); } lean_ctor_set(x_258, 0, x_191); lean_ctor_set(x_258, 1, x_256); x_12 = x_258; goto block_24; } else { 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; x_259 = lean_unsigned_to_nat(1u); x_260 = lean_nat_sub(x_250, x_259); lean_dec(x_250); x_261 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_248, x_260); lean_dec(x_260); x_262 = l_Std_PersistentHashMap_insert___at_Lean_Elab_assignInfoHoleId___spec__1(x_247, x_2, x_261); if (lean_is_scalar(x_249)) { x_263 = lean_alloc_ctor(0, 2, 1); } else { x_263 = x_249; } lean_ctor_set(x_263, 0, x_262); lean_ctor_set(x_263, 1, x_86); lean_ctor_set_uint8(x_263, sizeof(void*)*2, x_246); x_264 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_264, 0, x_241); lean_ctor_set(x_264, 1, x_242); lean_ctor_set(x_264, 2, x_243); lean_ctor_set(x_264, 3, x_244); lean_ctor_set(x_264, 4, x_245); lean_ctor_set(x_264, 5, x_263); x_265 = lean_st_ref_set(x_6, x_264, x_198); lean_dec(x_6); x_266 = lean_ctor_get(x_265, 1); lean_inc(x_266); if (lean_is_exclusive(x_265)) { lean_ctor_release(x_265, 0); lean_ctor_release(x_265, 1); x_267 = x_265; } else { lean_dec_ref(x_265); x_267 = lean_box(0); } if (lean_is_scalar(x_267)) { x_268 = lean_alloc_ctor(1, 2, 0); } else { x_268 = x_267; lean_ctor_set_tag(x_268, 1); } lean_ctor_set(x_268, 0, x_191); lean_ctor_set(x_268, 1, x_266); x_12 = x_268; goto block_24; } } } } } } else { uint8_t x_303; 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_2); lean_dec(x_1); x_303 = !lean_is_exclusive(x_26); if (x_303 == 0) { return x_26; } else { lean_object* x_304; lean_object* x_305; lean_object* x_306; x_304 = lean_ctor_get(x_26, 0); x_305 = lean_ctor_get(x_26, 1); lean_inc(x_305); lean_inc(x_304); lean_dec(x_26); x_306 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_306, 0, x_304); lean_ctor_set(x_306, 1, x_305); return x_306; } } block_24: { if (lean_obj_tag(x_12) == 0) { uint8_t x_13; x_13 = !lean_is_exclusive(x_12); if (x_13 == 0) { lean_object* x_14; lean_object* x_15; x_14 = lean_ctor_get(x_12, 0); x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); lean_dec(x_14); lean_ctor_set(x_12, 0, x_15); return x_12; } else { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_16 = lean_ctor_get(x_12, 0); x_17 = lean_ctor_get(x_12, 1); lean_inc(x_17); lean_inc(x_16); lean_dec(x_12); x_18 = lean_ctor_get(x_16, 0); lean_inc(x_18); lean_dec(x_16); x_19 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_17); return x_19; } } else { uint8_t x_20; x_20 = !lean_is_exclusive(x_12); if (x_20 == 0) { return x_12; } else { lean_object* x_21; lean_object* x_22; lean_object* x_23; x_21 = lean_ctor_get(x_12, 0); x_22 = lean_ctor_get(x_12, 1); lean_inc(x_22); lean_inc(x_21); lean_dec(x_12); x_23 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_23, 0, x_21); lean_ctor_set(x_23, 1, x_22); return x_23; } } } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed___lambda__2(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { lean_object* x_13; lean_object* x_14; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_inc(x_1); x_18 = lean_alloc_closure((void*)(l_Lean_Elab_Term_getMVarDecl___boxed), 8, 1); lean_closure_set(x_18, 0, x_1); x_19 = lean_box(x_3); x_20 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed___lambda__1___boxed), 11, 3); lean_closure_set(x_20, 0, x_2); lean_closure_set(x_20, 1, x_1); lean_closure_set(x_20, 2, x_19); x_21 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Term_instMonadLogTermElabM___spec__2___rarg), 9, 2); lean_closure_set(x_21, 0, x_18); lean_closure_set(x_21, 1, x_20); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); x_22 = l_Lean_Elab_Term_withSavedContext___rarg(x_4, x_21, x_6, x_7, x_8, x_9, x_10, x_11, x_12); if (lean_obj_tag(x_22) == 0) { lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); x_23 = lean_ctor_get(x_22, 0); lean_inc(x_23); x_24 = lean_ctor_get(x_22, 1); lean_inc(x_24); lean_dec(x_22); x_25 = lean_box(0); x_26 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_26, 0, x_23); lean_ctor_set(x_26, 1, x_25); x_13 = x_26; x_14 = x_24; goto block_17; } else { lean_object* x_27; x_27 = lean_ctor_get(x_22, 0); lean_inc(x_27); if (lean_obj_tag(x_27) == 0) { if (x_3 == 0) { lean_object* x_28; lean_object* x_29; lean_dec(x_5); x_28 = lean_ctor_get(x_22, 1); lean_inc(x_28); lean_dec(x_22); x_29 = l_Lean_Elab_logException___at___private_Lean_Elab_Term_0__Lean_Elab_Term_exceptionToSorry___spec__1(x_27, x_6, x_7, x_8, x_9, x_10, x_11, x_28); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); if (lean_obj_tag(x_29) == 0) { lean_object* x_30; lean_object* x_31; x_30 = lean_ctor_get(x_29, 1); lean_inc(x_30); lean_dec(x_29); x_31 = l_Array_forInUnsafe_loop___at_Lean_Meta_contradictionCore___spec__4___lambda__1___closed__4; x_13 = x_31; x_14 = x_30; goto block_17; } else { uint8_t x_32; x_32 = !lean_is_exclusive(x_29); if (x_32 == 0) { return x_29; } else { lean_object* x_33; lean_object* x_34; lean_object* x_35; x_33 = lean_ctor_get(x_29, 0); x_34 = lean_ctor_get(x_29, 1); lean_inc(x_34); lean_inc(x_33); lean_dec(x_29); x_35 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_35, 0, x_33); lean_ctor_set(x_35, 1, x_34); return x_35; } } } else { 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_dec(x_27); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_6); x_36 = lean_ctor_get(x_22, 1); lean_inc(x_36); lean_dec(x_22); x_37 = lean_st_ref_get(x_11, x_36); lean_dec(x_11); x_38 = lean_ctor_get(x_37, 1); lean_inc(x_38); lean_dec(x_37); x_39 = lean_st_ref_set(x_7, x_5, x_38); lean_dec(x_7); x_40 = lean_ctor_get(x_39, 1); lean_inc(x_40); lean_dec(x_39); x_41 = l_Lean_commitWhen___at_Lean_Meta_elimEmptyInductive___spec__3___at_Lean_Meta_elimEmptyInductive___spec__4___lambda__1___closed__1; x_13 = x_41; x_14 = x_40; goto block_17; } } else { uint8_t x_42; lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_6); x_42 = !lean_is_exclusive(x_22); if (x_42 == 0) { lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47; x_43 = lean_ctor_get(x_22, 1); x_44 = lean_ctor_get(x_22, 0); lean_dec(x_44); x_45 = lean_ctor_get(x_27, 0); lean_inc(x_45); x_46 = l_Lean_Elab_postponeExceptionId; x_47 = lean_nat_dec_eq(x_45, x_46); lean_dec(x_45); if (x_47 == 0) { lean_dec(x_11); lean_dec(x_7); lean_dec(x_5); return x_22; } else { lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_free_object(x_22); lean_dec(x_27); x_48 = lean_st_ref_get(x_11, x_43); lean_dec(x_11); x_49 = lean_ctor_get(x_48, 1); lean_inc(x_49); lean_dec(x_48); x_50 = lean_st_ref_set(x_7, x_5, x_49); lean_dec(x_7); x_51 = lean_ctor_get(x_50, 1); lean_inc(x_51); lean_dec(x_50); x_52 = l_Lean_commitWhen___at_Lean_Meta_elimEmptyInductive___spec__3___at_Lean_Meta_elimEmptyInductive___spec__4___lambda__1___closed__1; x_13 = x_52; x_14 = x_51; goto block_17; } } else { lean_object* x_53; lean_object* x_54; lean_object* x_55; uint8_t x_56; x_53 = lean_ctor_get(x_22, 1); lean_inc(x_53); lean_dec(x_22); x_54 = lean_ctor_get(x_27, 0); lean_inc(x_54); x_55 = l_Lean_Elab_postponeExceptionId; x_56 = lean_nat_dec_eq(x_54, x_55); lean_dec(x_54); if (x_56 == 0) { lean_object* x_57; lean_dec(x_11); lean_dec(x_7); lean_dec(x_5); x_57 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_57, 0, x_27); lean_ctor_set(x_57, 1, x_53); return x_57; } else { lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_dec(x_27); x_58 = lean_st_ref_get(x_11, x_53); lean_dec(x_11); x_59 = lean_ctor_get(x_58, 1); lean_inc(x_59); lean_dec(x_58); x_60 = lean_st_ref_set(x_7, x_5, x_59); lean_dec(x_7); x_61 = lean_ctor_get(x_60, 1); lean_inc(x_61); lean_dec(x_60); x_62 = l_Lean_commitWhen___at_Lean_Meta_elimEmptyInductive___spec__3___at_Lean_Meta_elimEmptyInductive___spec__4___lambda__1___closed__1; x_13 = x_62; x_14 = x_61; goto block_17; } } } } block_17: { lean_object* x_15; lean_object* x_16; x_15 = lean_ctor_get(x_13, 0); lean_inc(x_15); lean_dec(x_13); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_15); lean_ctor_set(x_16, 1, x_14); return x_16; } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed(lean_object* x_1, lean_object* 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, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; x_12 = lean_box(x_4); lean_inc(x_2); lean_inc(x_3); x_13 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed___lambda__2___boxed), 12, 4); lean_closure_set(x_13, 0, x_3); lean_closure_set(x_13, 1, x_2); lean_closure_set(x_13, 2, x_12); lean_closure_set(x_13, 3, x_1); x_14 = l_Lean_Elab_Term_instMonadInfoTreeTermElabM___closed__1; x_15 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Term_instMonadLogTermElabM___spec__2___rarg), 9, 2); lean_closure_set(x_15, 0, x_14); lean_closure_set(x_15, 1, x_13); x_16 = !lean_is_exclusive(x_9); if (x_16 == 0) { lean_object* x_17; lean_object* x_18; lean_object* x_19; x_17 = lean_ctor_get(x_9, 3); x_18 = l_Lean_replaceRef(x_2, x_17); lean_dec(x_17); lean_dec(x_2); lean_ctor_set(x_9, 3, x_18); x_19 = l_Lean_Meta_withMVarContext___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__4___rarg(x_3, x_15, x_5, x_6, x_7, x_8, x_9, x_10, x_11); return x_19; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; x_20 = lean_ctor_get(x_9, 0); x_21 = lean_ctor_get(x_9, 1); x_22 = lean_ctor_get(x_9, 2); x_23 = lean_ctor_get(x_9, 3); x_24 = lean_ctor_get(x_9, 4); x_25 = lean_ctor_get(x_9, 5); x_26 = lean_ctor_get(x_9, 6); x_27 = lean_ctor_get(x_9, 7); lean_inc(x_27); lean_inc(x_26); lean_inc(x_25); lean_inc(x_24); lean_inc(x_23); lean_inc(x_22); lean_inc(x_21); lean_inc(x_20); lean_dec(x_9); x_28 = l_Lean_replaceRef(x_2, x_23); lean_dec(x_23); lean_dec(x_2); x_29 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_29, 0, x_20); lean_ctor_set(x_29, 1, x_21); lean_ctor_set(x_29, 2, x_22); lean_ctor_set(x_29, 3, x_28); lean_ctor_set(x_29, 4, x_24); lean_ctor_set(x_29, 5, x_25); lean_ctor_set(x_29, 6, x_26); lean_ctor_set(x_29, 7, x_27); x_30 = l_Lean_Meta_withMVarContext___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__4___rarg(x_3, x_15, x_5, x_6, x_7, x_8, x_29, x_10, x_11); return x_30; } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed___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) { _start: { uint8_t x_12; lean_object* x_13; x_12 = lean_unbox(x_3); lean_dec(x_3); x_13 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed___lambda__1(x_1, x_2, x_12, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); return x_13; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { uint8_t x_13; lean_object* x_14; x_13 = lean_unbox(x_3); lean_dec(x_3); x_14 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed___lambda__2(x_1, x_2, x_13, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); lean_dec(x_4); return x_14; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed___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) { _start: { uint8_t x_12; lean_object* x_13; x_12 = lean_unbox(x_4); lean_dec(x_4); x_13 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed(x_1, x_2, x_3, x_12, x_5, x_6, x_7, x_8, x_9, x_10, x_11); return x_13; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar_match__1___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_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); x_6 = lean_apply_3(x_2, x_1, 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_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar_match__1___rarg), 3, 0); return x_2; } } static lean_object* _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("Lean.Elab.SyntheticMVars"); return x_1; } } static lean_object* _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("_private.Lean.Elab.SyntheticMVars.0.Lean.Elab.Term.synthesizePendingInstMVar"); return x_1; } } static lean_object* _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1___closed__1; x_2 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1___closed__2; x_3 = lean_unsigned_to_nat(66u); x_4 = lean_unsigned_to_nat(36u); 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); return x_6; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___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) { _start: { lean_object* x_10; lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_3); x_10 = l_Lean_Elab_Term_synthesizeInstMVarCore(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); if (lean_obj_tag(x_10) == 0) { uint8_t x_11; lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_11 = !lean_is_exclusive(x_10); if (x_11 == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; x_12 = lean_ctor_get(x_10, 0); x_13 = lean_box(0); x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_12); lean_ctor_set(x_14, 1, x_13); lean_ctor_set(x_10, 0, x_14); return x_10; } else { lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_15 = lean_ctor_get(x_10, 0); x_16 = lean_ctor_get(x_10, 1); lean_inc(x_16); lean_inc(x_15); lean_dec(x_10); x_17 = lean_box(0); x_18 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_18, 0, x_15); lean_ctor_set(x_18, 1, x_17); x_19 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_16); return x_19; } } else { lean_object* x_20; x_20 = lean_ctor_get(x_10, 0); lean_inc(x_20); if (lean_obj_tag(x_20) == 0) { lean_object* x_21; lean_object* x_22; x_21 = lean_ctor_get(x_10, 1); lean_inc(x_21); lean_dec(x_10); x_22 = l_Lean_Elab_logException___at___private_Lean_Elab_Term_0__Lean_Elab_Term_exceptionToSorry___spec__1(x_20, x_3, x_4, x_5, x_6, x_7, x_8, x_21); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); if (lean_obj_tag(x_22) == 0) { uint8_t x_23; x_23 = !lean_is_exclusive(x_22); if (x_23 == 0) { lean_object* x_24; lean_object* x_25; x_24 = lean_ctor_get(x_22, 0); lean_dec(x_24); x_25 = l_Array_forInUnsafe_loop___at_Lean_Meta_contradictionCore___spec__4___lambda__1___closed__4; lean_ctor_set(x_22, 0, x_25); return x_22; } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; x_26 = lean_ctor_get(x_22, 1); lean_inc(x_26); lean_dec(x_22); x_27 = l_Array_forInUnsafe_loop___at_Lean_Meta_contradictionCore___spec__4___lambda__1___closed__4; x_28 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_28, 0, x_27); lean_ctor_set(x_28, 1, x_26); return x_28; } } else { uint8_t x_29; x_29 = !lean_is_exclusive(x_22); if (x_29 == 0) { return x_22; } else { lean_object* x_30; lean_object* x_31; lean_object* x_32; x_30 = lean_ctor_get(x_22, 0); x_31 = lean_ctor_get(x_22, 1); lean_inc(x_31); lean_inc(x_30); lean_dec(x_22); x_32 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_32, 0, x_30); lean_ctor_set(x_32, 1, x_31); return x_32; } } } else { lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_dec(x_20); x_33 = lean_ctor_get(x_10, 1); lean_inc(x_33); lean_dec(x_10); x_34 = l_Lean_Elab_Term_getFVarLocalDecl_x21___closed__1; x_35 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1___closed__3; x_36 = lean_panic_fn(x_34, x_35); x_37 = lean_apply_7(x_36, x_3, x_4, x_5, x_6, x_7, x_8, x_33); if (lean_obj_tag(x_37) == 0) { uint8_t x_38; x_38 = !lean_is_exclusive(x_37); if (x_38 == 0) { lean_object* x_39; lean_object* x_40; lean_object* x_41; x_39 = lean_ctor_get(x_37, 0); x_40 = lean_box(0); x_41 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_41, 0, x_39); lean_ctor_set(x_41, 1, x_40); lean_ctor_set(x_37, 0, x_41); return x_37; } else { lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; x_42 = lean_ctor_get(x_37, 0); x_43 = lean_ctor_get(x_37, 1); lean_inc(x_43); lean_inc(x_42); lean_dec(x_37); x_44 = lean_box(0); x_45 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_45, 0, x_42); lean_ctor_set(x_45, 1, x_44); x_46 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_46, 0, x_45); lean_ctor_set(x_46, 1, x_43); return x_46; } } else { uint8_t x_47; x_47 = !lean_is_exclusive(x_37); if (x_47 == 0) { return x_37; } else { lean_object* x_48; lean_object* x_49; lean_object* x_50; x_48 = lean_ctor_get(x_37, 0); x_49 = lean_ctor_get(x_37, 1); lean_inc(x_49); lean_inc(x_48); lean_dec(x_37); x_50 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_50, 0, x_48); lean_ctor_set(x_50, 1, x_49); return x_50; } } } } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___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) { _start: { lean_object* x_9; lean_object* x_10; x_9 = lean_ctor_get(x_1, 0); lean_inc(x_9); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_10, 1, x_8); return x_10; } } static lean_object* _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__2___boxed), 8, 0); return x_1; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_9 = lean_box(0); lean_inc(x_1); x_10 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1), 9, 2); lean_closure_set(x_10, 0, x_1); lean_closure_set(x_10, 1, x_9); x_11 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___closed__1; x_12 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Term_instMonadLogTermElabM___spec__2___rarg), 9, 2); lean_closure_set(x_12, 0, x_10); lean_closure_set(x_12, 1, x_11); x_13 = l_Lean_Meta_withMVarContext___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__4___rarg(x_1, x_12, x_2, x_3, x_4, x_5, x_6, x_7, x_8); return x_13; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___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) { _start: { lean_object* x_9; x_9 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__2(x_1, 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_2); lean_dec(x_1); return x_9; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar_match__1___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_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_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar_match__1___rarg), 3, 0); return x_2; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___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) { _start: { lean_object* x_10; x_10 = l_Lean_Meta_isExprDefEq(x_1, x_2, x_5, x_6, x_7, x_8, x_9); return x_10; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___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) { _start: { lean_object* x_9; lean_object* x_10; x_9 = l_Lean_commitWhen___at_Lean_Meta_elimEmptyInductive___spec__3___at_Lean_Meta_elimEmptyInductive___spec__4___lambda__1___closed__1; x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_10, 1, x_8); return x_10; } } static lean_object* _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("_private.Lean.Elab.SyntheticMVars.0.Lean.Elab.Term.synthesizePendingCoeInstMVar"); return x_1; } } static lean_object* _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3___closed__2() { _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___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1___closed__1; x_2 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3___closed__1; x_3 = lean_unsigned_to_nat(96u); x_4 = lean_unsigned_to_nat(33u); 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); return x_6; } } static lean_object* _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3___closed__3() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__2___boxed), 8, 0); return x_1; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { _start: { lean_object* x_17; lean_object* x_18; lean_object* x_39; lean_inc(x_15); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_10); x_39 = l_Lean_Elab_Term_synthesizeCoeInstMVarCore(x_6, x_10, x_11, x_12, x_13, x_14, x_15, x_16); if (lean_obj_tag(x_39) == 0) { lean_object* x_40; lean_object* x_41; lean_object* x_42; uint8_t x_43; x_40 = lean_ctor_get(x_39, 0); lean_inc(x_40); x_41 = lean_ctor_get(x_39, 1); lean_inc(x_41); lean_dec(x_39); x_42 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3___closed__3; x_43 = lean_unbox(x_40); lean_dec(x_40); if (x_43 == 0) { lean_object* x_44; lean_object* x_45; lean_dec(x_8); lean_dec(x_7); x_44 = lean_box(0); lean_inc(x_15); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); x_45 = lean_apply_8(x_42, x_44, x_10, x_11, x_12, x_13, x_14, x_15, x_41); if (lean_obj_tag(x_45) == 0) { uint8_t x_46; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_46 = !lean_is_exclusive(x_45); if (x_46 == 0) { lean_object* x_47; lean_object* x_48; x_47 = lean_ctor_get(x_45, 0); x_48 = lean_ctor_get(x_47, 0); lean_inc(x_48); lean_dec(x_47); lean_ctor_set(x_45, 0, x_48); return x_45; } else { lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; x_49 = lean_ctor_get(x_45, 0); x_50 = lean_ctor_get(x_45, 1); lean_inc(x_50); lean_inc(x_49); lean_dec(x_45); x_51 = lean_ctor_get(x_49, 0); lean_inc(x_51); lean_dec(x_49); x_52 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_52, 0, x_51); lean_ctor_set(x_52, 1, x_50); return x_52; } } else { lean_object* x_53; lean_object* x_54; x_53 = lean_ctor_get(x_45, 0); lean_inc(x_53); x_54 = lean_ctor_get(x_45, 1); lean_inc(x_54); lean_dec(x_45); x_17 = x_53; x_18 = x_54; goto block_38; } } else { lean_object* x_55; lean_inc(x_15); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); x_55 = l_Lean_Meta_expandCoe(x_7, x_12, x_13, x_14, x_15, x_41); if (lean_obj_tag(x_55) == 0) { lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; uint8_t x_60; x_56 = lean_ctor_get(x_55, 0); lean_inc(x_56); x_57 = lean_ctor_get(x_55, 1); lean_inc(x_57); lean_dec(x_55); lean_inc(x_56); x_58 = l_Lean_Meta_occursCheck(x_8, x_56, x_12, x_13, x_14, x_15, x_57); x_59 = lean_ctor_get(x_58, 0); lean_inc(x_59); x_60 = lean_unbox(x_59); lean_dec(x_59); if (x_60 == 0) { lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_dec(x_56); lean_dec(x_8); x_61 = lean_ctor_get(x_58, 1); lean_inc(x_61); lean_dec(x_58); x_62 = lean_box(0); lean_inc(x_15); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); x_63 = lean_apply_8(x_42, x_62, x_10, x_11, x_12, x_13, x_14, x_15, x_61); if (lean_obj_tag(x_63) == 0) { uint8_t x_64; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_64 = !lean_is_exclusive(x_63); if (x_64 == 0) { lean_object* x_65; lean_object* x_66; x_65 = lean_ctor_get(x_63, 0); x_66 = lean_ctor_get(x_65, 0); lean_inc(x_66); lean_dec(x_65); lean_ctor_set(x_63, 0, x_66); return x_63; } else { lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; x_67 = lean_ctor_get(x_63, 0); x_68 = lean_ctor_get(x_63, 1); lean_inc(x_68); lean_inc(x_67); lean_dec(x_63); x_69 = lean_ctor_get(x_67, 0); lean_inc(x_69); lean_dec(x_67); x_70 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_70, 0, x_69); lean_ctor_set(x_70, 1, x_68); return x_70; } } else { lean_object* x_71; lean_object* x_72; x_71 = lean_ctor_get(x_63, 0); lean_inc(x_71); x_72 = lean_ctor_get(x_63, 1); lean_inc(x_72); lean_dec(x_63); x_17 = x_71; x_18 = x_72; goto block_38; } } else { lean_object* x_73; lean_object* x_74; uint8_t x_75; lean_dec(x_11); lean_dec(x_10); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_73 = lean_ctor_get(x_58, 1); lean_inc(x_73); lean_dec(x_58); x_74 = l_Lean_Meta_assignExprMVar(x_8, x_56, x_12, x_13, x_14, x_15, x_73); lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); x_75 = !lean_is_exclusive(x_74); if (x_75 == 0) { lean_object* x_76; uint8_t x_77; lean_object* x_78; x_76 = lean_ctor_get(x_74, 0); lean_dec(x_76); x_77 = 1; x_78 = lean_box(x_77); lean_ctor_set(x_74, 0, x_78); return x_74; } else { lean_object* x_79; uint8_t x_80; lean_object* x_81; lean_object* x_82; x_79 = lean_ctor_get(x_74, 1); lean_inc(x_79); lean_dec(x_74); x_80 = 1; x_81 = lean_box(x_80); x_82 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_82, 0, x_81); lean_ctor_set(x_82, 1, x_79); return x_82; } } } else { lean_object* x_83; lean_object* x_84; lean_dec(x_8); x_83 = lean_ctor_get(x_55, 0); lean_inc(x_83); x_84 = lean_ctor_get(x_55, 1); lean_inc(x_84); lean_dec(x_55); x_17 = x_83; x_18 = x_84; goto block_38; } } } else { lean_object* x_85; lean_object* x_86; lean_dec(x_8); lean_dec(x_7); x_85 = lean_ctor_get(x_39, 0); lean_inc(x_85); x_86 = lean_ctor_get(x_39, 1); lean_inc(x_86); lean_dec(x_39); x_17 = x_85; x_18 = x_86; goto block_38; } block_38: { if (lean_obj_tag(x_17) == 0) { lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; x_19 = lean_ctor_get(x_17, 1); lean_inc(x_19); lean_dec(x_17); x_20 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_20, 0, x_19); x_21 = l_Lean_Elab_Term_throwTypeMismatchError___rarg(x_1, x_2, x_3, x_4, x_5, x_20, x_10, x_11, x_12, x_13, x_14, x_15, x_18); lean_dec(x_11); lean_dec(x_20); x_22 = !lean_is_exclusive(x_21); if (x_22 == 0) { return x_21; } else { lean_object* x_23; lean_object* x_24; lean_object* x_25; x_23 = lean_ctor_get(x_21, 0); x_24 = lean_ctor_get(x_21, 1); lean_inc(x_24); lean_inc(x_23); lean_dec(x_21); 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; } } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_dec(x_17); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_26 = l_Lean_Elab_Term_getFVarLocalDecl_x21___closed__1; x_27 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3___closed__2; x_28 = lean_panic_fn(x_26, x_27); x_29 = lean_apply_7(x_28, x_10, x_11, x_12, x_13, x_14, x_15, x_18); if (lean_obj_tag(x_29) == 0) { uint8_t x_30; x_30 = !lean_is_exclusive(x_29); if (x_30 == 0) { return x_29; } else { lean_object* x_31; lean_object* x_32; lean_object* x_33; x_31 = lean_ctor_get(x_29, 0); x_32 = lean_ctor_get(x_29, 1); lean_inc(x_32); lean_inc(x_31); lean_dec(x_29); x_33 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_33, 0, x_31); lean_ctor_set(x_33, 1, x_32); return x_33; } } else { uint8_t x_34; x_34 = !lean_is_exclusive(x_29); if (x_34 == 0) { return x_29; } else { lean_object* x_35; lean_object* x_36; lean_object* x_37; x_35 = lean_ctor_get(x_29, 0); x_36 = lean_ctor_get(x_29, 1); lean_inc(x_36); lean_inc(x_35); lean_dec(x_29); x_37 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_37, 0, x_35); lean_ctor_set(x_37, 1, x_36); return x_37; } } } } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, uint8_t x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { _start: { if (x_9 == 0) { lean_object* x_17; lean_object* x_18; x_17 = lean_box(0); x_18 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_17, x_10, x_11, x_12, x_13, x_14, x_15, x_16); return x_18; } else { lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_dec(x_11); lean_dec(x_10); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); lean_inc(x_4); x_19 = l_Lean_Meta_occursCheck(x_8, x_4, x_12, x_13, x_14, x_15, x_16); x_20 = lean_ctor_get(x_19, 0); lean_inc(x_20); x_21 = lean_unbox(x_20); lean_dec(x_20); if (x_21 == 0) { uint8_t x_22; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_8); lean_dec(x_4); x_22 = !lean_is_exclusive(x_19); if (x_22 == 0) { lean_object* x_23; uint8_t x_24; lean_object* x_25; x_23 = lean_ctor_get(x_19, 0); lean_dec(x_23); x_24 = 0; x_25 = lean_box(x_24); lean_ctor_set(x_19, 0, x_25); return x_19; } else { lean_object* x_26; uint8_t x_27; lean_object* x_28; lean_object* x_29; x_26 = lean_ctor_get(x_19, 1); lean_inc(x_26); lean_dec(x_19); x_27 = 0; x_28 = lean_box(x_27); x_29 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_29, 0, x_28); lean_ctor_set(x_29, 1, x_26); return x_29; } } else { lean_object* x_30; lean_object* x_31; uint8_t x_32; x_30 = lean_ctor_get(x_19, 1); lean_inc(x_30); lean_dec(x_19); x_31 = l_Lean_Meta_assignExprMVar(x_8, x_4, x_12, x_13, x_14, x_15, x_30); lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); x_32 = !lean_is_exclusive(x_31); if (x_32 == 0) { lean_object* x_33; uint8_t x_34; lean_object* x_35; x_33 = lean_ctor_get(x_31, 0); lean_dec(x_33); x_34 = 1; x_35 = lean_box(x_34); lean_ctor_set(x_31, 0, x_35); return x_31; } else { lean_object* x_36; uint8_t x_37; lean_object* x_38; lean_object* x_39; x_36 = lean_ctor_get(x_31, 1); lean_inc(x_36); lean_dec(x_31); x_37 = 1; x_38 = lean_box(x_37); x_39 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_39, 0, x_38); lean_ctor_set(x_39, 1, x_36); return x_39; } } } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { _start: { lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; x_15 = l_Lean_Expr_appArg_x21(x_3); x_16 = l_Lean_Expr_mvarId_x21(x_15); lean_dec(x_15); lean_inc(x_5); lean_inc(x_4); x_17 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__1___boxed), 9, 2); lean_closure_set(x_17, 0, x_4); lean_closure_set(x_17, 1, x_5); lean_inc(x_16); x_18 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__4___boxed), 16, 8); lean_closure_set(x_18, 0, x_2); lean_closure_set(x_18, 1, x_4); lean_closure_set(x_18, 2, x_5); lean_closure_set(x_18, 3, x_6); lean_closure_set(x_18, 4, x_7); lean_closure_set(x_18, 5, x_16); lean_closure_set(x_18, 6, x_3); lean_closure_set(x_18, 7, x_1); x_19 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Term_instMonadLogTermElabM___spec__2___rarg), 9, 2); lean_closure_set(x_19, 0, x_17); lean_closure_set(x_19, 1, x_18); x_20 = l_Lean_Meta_withMVarContext___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__4___rarg(x_16, x_19, x_8, x_9, x_10, x_11, x_12, x_13, x_14); return x_20; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___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) { _start: { lean_object* x_10; x_10 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); lean_dec(x_4); lean_dec(x_3); return x_10; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___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) { _start: { lean_object* x_9; x_9 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__2(x_1, 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_2); lean_dec(x_1); return x_9; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { _start: { lean_object* x_17; x_17 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16); lean_dec(x_9); lean_dec(x_1); return x_17; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { _start: { uint8_t x_17; lean_object* x_18; x_17 = lean_unbox(x_9); lean_dec(x_9); x_18 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__4(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_17, x_10, x_11, x_12, x_13, x_14, x_15, x_16); lean_dec(x_1); return x_18; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance_match__1___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; x_3 = lean_ctor_get(x_1, 1); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 0); lean_inc(x_4); lean_dec(x_1); x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); x_6 = lean_ctor_get(x_3, 1); lean_inc(x_6); lean_dec(x_3); x_7 = lean_apply_3(x_2, x_4, x_5, x_6); return x_7; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance_match__1___rarg), 2, 0); return x_2; } } lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { _start: { lean_object* x_14; uint8_t x_15; x_14 = lean_ctor_get(x_3, 1); x_15 = lean_nat_dec_le(x_14, x_5); if (x_15 == 0) { lean_object* x_16; uint8_t x_17; x_16 = lean_unsigned_to_nat(0u); x_17 = lean_nat_dec_eq(x_4, x_16); if (x_17 == 0) { lean_object* x_18; lean_object* x_19; uint8_t x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; uint8_t x_24; uint8_t x_25; x_18 = lean_unsigned_to_nat(1u); x_19 = lean_nat_sub(x_4, x_18); lean_dec(x_4); x_20 = l_Lean_instInhabitedBinderInfo; x_21 = lean_box(x_20); x_22 = lean_array_get(x_21, x_2, x_5); x_23 = lean_unbox(x_22); lean_dec(x_22); x_24 = 3; x_25 = l___private_Lean_Expr_0__Lean_beqBinderInfo____x40_Lean_Expr___hyg_237_(x_23, x_24); if (x_25 == 0) { lean_object* x_26; lean_object* x_27; x_26 = lean_ctor_get(x_3, 2); x_27 = lean_nat_add(x_5, x_26); lean_dec(x_5); x_4 = x_19; x_5 = x_27; goto _start; } 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; lean_object* x_35; lean_object* x_36; lean_object* x_37; x_29 = lean_ctor_get(x_11, 3); x_30 = l_Lean_instInhabitedExpr; x_31 = lean_array_get(x_30, x_1, x_5); x_32 = l_Lean_Expr_mvarId_x21(x_31); lean_dec(x_31); x_33 = lean_box(0); lean_inc(x_29); x_34 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_34, 0, x_32); lean_ctor_set(x_34, 1, x_29); lean_ctor_set(x_34, 2, x_33); x_35 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_35, 0, x_34); lean_ctor_set(x_35, 1, x_6); x_36 = lean_ctor_get(x_3, 2); x_37 = lean_nat_add(x_5, x_36); lean_dec(x_5); x_4 = x_19; x_5 = x_37; x_6 = x_35; goto _start; } } else { lean_object* x_39; lean_dec(x_5); lean_dec(x_4); x_39 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_39, 0, x_6); lean_ctor_set(x_39, 1, x_13); return x_39; } } else { lean_object* x_40; lean_dec(x_5); lean_dec(x_4); x_40 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_40, 0, x_6); lean_ctor_set(x_40, 1, x_13); return x_40; } } } lean_object* l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__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) { _start: { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; x_9 = l_Lean_Elab_Term_saveState___rarg(x_3, x_4, x_5, x_6, x_7, x_8); x_10 = lean_ctor_get(x_9, 0); lean_inc(x_10); x_11 = lean_ctor_get(x_9, 1); lean_inc(x_11); lean_dec(x_9); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); x_12 = lean_apply_7(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_11); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); if (lean_obj_tag(x_13) == 0) { lean_object* x_14; uint8_t x_15; lean_object* x_16; uint8_t x_17; x_14 = lean_ctor_get(x_12, 1); lean_inc(x_14); lean_dec(x_12); x_15 = 0; x_16 = l_Lean_Elab_Term_SavedState_restore(x_10, x_15, x_2, x_3, x_4, x_5, x_6, x_7, x_14); 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_17 = !lean_is_exclusive(x_16); if (x_17 == 0) { lean_object* x_18; lean_object* x_19; x_18 = lean_ctor_get(x_16, 0); lean_dec(x_18); x_19 = lean_box(0); lean_ctor_set(x_16, 0, x_19); return x_16; } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; x_20 = lean_ctor_get(x_16, 1); lean_inc(x_20); lean_dec(x_16); x_21 = lean_box(0); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_21); lean_ctor_set(x_22, 1, x_20); return x_22; } } else { uint8_t x_23; lean_dec(x_10); 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_23 = !lean_is_exclusive(x_12); if (x_23 == 0) { lean_object* x_24; uint8_t x_25; x_24 = lean_ctor_get(x_12, 0); lean_dec(x_24); x_25 = !lean_is_exclusive(x_13); if (x_25 == 0) { return x_12; } else { lean_object* x_26; lean_object* x_27; x_26 = lean_ctor_get(x_13, 0); lean_inc(x_26); lean_dec(x_13); x_27 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_27, 0, x_26); lean_ctor_set(x_12, 0, x_27); return x_12; } } else { lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; x_28 = lean_ctor_get(x_12, 1); lean_inc(x_28); lean_dec(x_12); x_29 = lean_ctor_get(x_13, 0); lean_inc(x_29); if (lean_is_exclusive(x_13)) { lean_ctor_release(x_13, 0); x_30 = x_13; } else { lean_dec_ref(x_13); x_30 = lean_box(0); } if (lean_is_scalar(x_30)) { x_31 = lean_alloc_ctor(1, 1, 0); } else { x_31 = x_30; } lean_ctor_set(x_31, 0, x_29); 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 { lean_object* x_33; lean_object* x_34; uint8_t x_35; lean_object* x_36; uint8_t x_37; x_33 = lean_ctor_get(x_12, 0); lean_inc(x_33); x_34 = lean_ctor_get(x_12, 1); lean_inc(x_34); lean_dec(x_12); x_35 = 0; x_36 = l_Lean_Elab_Term_SavedState_restore(x_10, x_35, x_2, x_3, x_4, x_5, x_6, x_7, x_34); 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_37 = !lean_is_exclusive(x_36); if (x_37 == 0) { lean_object* x_38; x_38 = lean_ctor_get(x_36, 0); lean_dec(x_38); lean_ctor_set_tag(x_36, 1); lean_ctor_set(x_36, 0, x_33); return x_36; } else { lean_object* x_39; lean_object* x_40; x_39 = lean_ctor_get(x_36, 1); lean_inc(x_39); lean_dec(x_36); x_40 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_40, 0, x_33); lean_ctor_set(x_40, 1, x_39); return x_40; } } } } lean_object* l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; x_9 = l_Lean_Meta_mkConstWithFreshMVarLevels(x_1, x_4, x_5, x_6, x_7, x_8); return x_9; } } static lean_object* _init_l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Elab_initFn____x40_Lean_Elab_Util___hyg_1262____closed__1; x_2 = l_Lean_Meta_SynthInstance_resume___closed__4; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } static lean_object* _init_l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("worked"); return x_1; } } static lean_object* _init_l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__3() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__2; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } static lean_object* _init_l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__4() { _start: { lean_object* x_1; x_1 = lean_mk_string("trying default instance for "); return x_1; } } static lean_object* _init_l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__5() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__4; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } lean_object* l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { lean_object* x_10; lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_2); x_10 = l_Lean_Meta_inferType(x_2, x_5, x_6, x_7, x_8, x_9); if (lean_obj_tag(x_10) == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; uint8_t x_15; lean_object* x_16; x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); x_12 = lean_ctor_get(x_10, 1); lean_inc(x_12); lean_dec(x_10); x_13 = lean_box(0); x_14 = 1; x_15 = 0; lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); x_16 = l___private_Lean_Meta_Basic_0__Lean_Meta_forallMetaTelescopeReducingAux(x_11, x_14, x_13, x_15, x_5, x_6, x_7, x_8, x_12); 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; lean_object* x_24; uint8_t x_73; lean_object* x_74; lean_object* x_89; lean_object* x_90; lean_object* x_91; uint8_t x_92; x_17 = lean_ctor_get(x_16, 0); lean_inc(x_17); x_18 = lean_ctor_get(x_17, 1); lean_inc(x_18); x_19 = lean_ctor_get(x_16, 1); lean_inc(x_19); lean_dec(x_16); x_20 = lean_ctor_get(x_17, 0); lean_inc(x_20); lean_dec(x_17); x_21 = lean_ctor_get(x_18, 0); lean_inc(x_21); if (lean_is_exclusive(x_18)) { lean_ctor_release(x_18, 0); lean_ctor_release(x_18, 1); x_22 = x_18; } else { lean_dec_ref(x_18); x_22 = lean_box(0); } x_23 = l_Lean_mkAppN(x_2, x_20); x_89 = lean_st_ref_get(x_8, x_19); x_90 = lean_ctor_get(x_89, 0); lean_inc(x_90); x_91 = lean_ctor_get(x_90, 3); lean_inc(x_91); lean_dec(x_90); x_92 = lean_ctor_get_uint8(x_91, sizeof(void*)*1); lean_dec(x_91); if (x_92 == 0) { lean_object* x_93; uint8_t x_94; x_93 = lean_ctor_get(x_89, 1); lean_inc(x_93); lean_dec(x_89); x_94 = 0; x_73 = x_94; x_74 = x_93; goto block_88; } else { lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; uint8_t x_100; x_95 = lean_ctor_get(x_89, 1); lean_inc(x_95); lean_dec(x_89); x_96 = l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__1; x_97 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_96, x_3, x_4, x_5, x_6, x_7, x_8, x_95); x_98 = lean_ctor_get(x_97, 0); lean_inc(x_98); x_99 = lean_ctor_get(x_97, 1); lean_inc(x_99); lean_dec(x_97); x_100 = lean_unbox(x_98); lean_dec(x_98); x_73 = x_100; x_74 = x_99; goto block_88; } block_72: { lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; x_25 = l_Lean_mkMVar(x_1); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_23); x_26 = l_Lean_Meta_isExprDefEqGuarded(x_25, x_23, x_5, x_6, x_7, x_8, x_24); x_27 = lean_ctor_get(x_26, 0); lean_inc(x_27); x_28 = lean_unbox(x_27); lean_dec(x_27); if (x_28 == 0) { uint8_t x_29; lean_dec(x_23); lean_dec(x_22); lean_dec(x_21); lean_dec(x_20); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); x_29 = !lean_is_exclusive(x_26); if (x_29 == 0) { lean_object* x_30; x_30 = lean_ctor_get(x_26, 0); lean_dec(x_30); lean_ctor_set(x_26, 0, x_13); return x_26; } else { lean_object* x_31; lean_object* x_32; x_31 = lean_ctor_get(x_26, 1); lean_inc(x_31); lean_dec(x_26); x_32 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_32, 0, x_13); lean_ctor_set(x_32, 1, x_31); return x_32; } } else { lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; uint8_t x_43; lean_object* x_44; lean_object* x_60; lean_object* x_61; lean_object* x_62; uint8_t x_63; x_33 = lean_ctor_get(x_26, 1); lean_inc(x_33); lean_dec(x_26); x_34 = lean_box(0); x_35 = lean_array_get_size(x_21); x_36 = lean_unsigned_to_nat(0u); x_37 = lean_unsigned_to_nat(1u); lean_inc(x_35); x_38 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_38, 0, x_36); lean_ctor_set(x_38, 1, x_35); lean_ctor_set(x_38, 2, x_37); x_39 = l_Std_Range_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__1(x_20, x_21, x_38, x_35, x_36, x_34, x_3, x_4, x_5, x_6, x_7, x_8, x_33); lean_dec(x_38); lean_dec(x_21); lean_dec(x_20); x_40 = lean_ctor_get(x_39, 0); lean_inc(x_40); x_41 = lean_ctor_get(x_39, 1); lean_inc(x_41); if (lean_is_exclusive(x_39)) { lean_ctor_release(x_39, 0); lean_ctor_release(x_39, 1); x_42 = x_39; } else { lean_dec_ref(x_39); x_42 = lean_box(0); } x_60 = lean_st_ref_get(x_8, x_41); x_61 = lean_ctor_get(x_60, 0); lean_inc(x_61); x_62 = lean_ctor_get(x_61, 3); lean_inc(x_62); lean_dec(x_61); x_63 = lean_ctor_get_uint8(x_62, sizeof(void*)*1); lean_dec(x_62); if (x_63 == 0) { lean_object* x_64; uint8_t x_65; x_64 = lean_ctor_get(x_60, 1); lean_inc(x_64); lean_dec(x_60); x_65 = 0; x_43 = x_65; x_44 = x_64; goto block_59; } else { lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; uint8_t x_71; x_66 = lean_ctor_get(x_60, 1); lean_inc(x_66); lean_dec(x_60); x_67 = l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__1; x_68 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_67, x_3, x_4, x_5, x_6, x_7, x_8, x_66); 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 = lean_unbox(x_69); lean_dec(x_69); x_43 = x_71; x_44 = x_70; goto block_59; } block_59: { if (x_43 == 0) { lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); if (lean_is_scalar(x_22)) { x_45 = lean_alloc_ctor(0, 2, 0); } else { x_45 = x_22; } lean_ctor_set(x_45, 0, x_23); lean_ctor_set(x_45, 1, x_40); x_46 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_46, 0, x_45); if (lean_is_scalar(x_42)) { x_47 = lean_alloc_ctor(0, 2, 0); } else { x_47 = x_42; } lean_ctor_set(x_47, 0, x_46); lean_ctor_set(x_47, 1, x_44); return x_47; } else { lean_object* x_48; lean_object* x_49; lean_object* x_50; uint8_t x_51; lean_dec(x_42); x_48 = l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__1; x_49 = l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__3; x_50 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_48, x_49, x_3, x_4, x_5, x_6, x_7, x_8, x_44); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); x_51 = !lean_is_exclusive(x_50); if (x_51 == 0) { lean_object* x_52; lean_object* x_53; lean_object* x_54; x_52 = lean_ctor_get(x_50, 0); lean_dec(x_52); if (lean_is_scalar(x_22)) { x_53 = lean_alloc_ctor(0, 2, 0); } else { x_53 = x_22; } lean_ctor_set(x_53, 0, x_23); lean_ctor_set(x_53, 1, x_40); x_54 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_54, 0, x_53); lean_ctor_set(x_50, 0, x_54); return x_50; } else { lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; x_55 = lean_ctor_get(x_50, 1); lean_inc(x_55); lean_dec(x_50); if (lean_is_scalar(x_22)) { x_56 = lean_alloc_ctor(0, 2, 0); } else { x_56 = x_22; } lean_ctor_set(x_56, 0, x_23); lean_ctor_set(x_56, 1, x_40); x_57 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_57, 0, x_56); x_58 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_58, 0, x_57); lean_ctor_set(x_58, 1, x_55); return x_58; } } } } } block_88: { if (x_73 == 0) { x_24 = x_74; goto block_72; } else { lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_inc(x_1); x_75 = l_Lean_mkMVar(x_1); x_76 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_76, 0, x_75); x_77 = l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__5; x_78 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_78, 0, x_77); lean_ctor_set(x_78, 1, x_76); x_79 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign___closed__7; x_80 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_80, 0, x_78); lean_ctor_set(x_80, 1, x_79); lean_inc(x_23); x_81 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_81, 0, x_23); x_82 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_82, 0, x_80); lean_ctor_set(x_82, 1, x_81); x_83 = l_Lean_KernelException_toMessageData___closed__15; x_84 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_84, 0, x_82); lean_ctor_set(x_84, 1, x_83); x_85 = l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__1; x_86 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_85, x_84, x_3, x_4, x_5, x_6, x_7, x_8, x_74); x_87 = lean_ctor_get(x_86, 1); lean_inc(x_87); lean_dec(x_86); x_24 = x_87; goto block_72; } } } else { uint8_t x_101; lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_2); lean_dec(x_1); x_101 = !lean_is_exclusive(x_16); if (x_101 == 0) { return x_16; } else { lean_object* x_102; lean_object* x_103; lean_object* x_104; x_102 = lean_ctor_get(x_16, 0); x_103 = lean_ctor_get(x_16, 1); lean_inc(x_103); lean_inc(x_102); lean_dec(x_16); x_104 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_104, 0, x_102); lean_ctor_set(x_104, 1, x_103); return x_104; } } } else { uint8_t x_105; lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_2); lean_dec(x_1); x_105 = !lean_is_exclusive(x_10); if (x_105 == 0) { return x_10; } else { lean_object* x_106; lean_object* x_107; lean_object* x_108; x_106 = lean_ctor_get(x_10, 0); x_107 = lean_ctor_get(x_10, 1); lean_inc(x_107); lean_inc(x_106); lean_dec(x_10); x_108 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_108, 0, x_106); lean_ctor_set(x_108, 1, x_107); return x_108; } } } } lean_object* l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_10 = lean_alloc_closure((void*)(l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__1___boxed), 8, 1); lean_closure_set(x_10, 0, x_2); x_11 = lean_alloc_closure((void*)(l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___boxed), 9, 1); lean_closure_set(x_11, 0, x_1); x_12 = l_Lean_Elab_Term_saveState___rarg(x_4, x_5, x_6, x_7, x_8, x_9); x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_12, 1); lean_inc(x_14); lean_dec(x_12); 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_15 = l_ReaderT_bind___at_Lean_Elab_Term_instMonadLogTermElabM___spec__2___rarg(x_10, x_11, x_3, x_4, x_5, x_6, x_7, x_8, x_14); if (lean_obj_tag(x_15) == 0) { lean_object* x_16; x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); if (lean_obj_tag(x_16) == 0) { lean_object* x_17; uint8_t x_18; lean_object* x_19; uint8_t x_20; x_17 = lean_ctor_get(x_15, 1); lean_inc(x_17); lean_dec(x_15); x_18 = 0; x_19 = l_Lean_Elab_Term_SavedState_restore(x_13, x_18, x_3, x_4, x_5, x_6, x_7, x_8, x_17); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_20 = !lean_is_exclusive(x_19); if (x_20 == 0) { lean_object* x_21; lean_object* x_22; x_21 = lean_ctor_get(x_19, 0); lean_dec(x_21); x_22 = lean_box(0); lean_ctor_set(x_19, 0, x_22); return x_19; } else { lean_object* x_23; lean_object* x_24; lean_object* x_25; x_23 = lean_ctor_get(x_19, 1); lean_inc(x_23); lean_dec(x_19); x_24 = lean_box(0); x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_23); return x_25; } } else { uint8_t x_26; lean_dec(x_13); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_26 = !lean_is_exclusive(x_15); if (x_26 == 0) { lean_object* x_27; uint8_t x_28; x_27 = lean_ctor_get(x_15, 0); lean_dec(x_27); x_28 = !lean_is_exclusive(x_16); if (x_28 == 0) { return x_15; } else { lean_object* x_29; lean_object* x_30; x_29 = lean_ctor_get(x_16, 0); lean_inc(x_29); lean_dec(x_16); x_30 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_30, 0, x_29); lean_ctor_set(x_15, 0, x_30); return x_15; } } else { lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; x_31 = lean_ctor_get(x_15, 1); lean_inc(x_31); lean_dec(x_15); x_32 = lean_ctor_get(x_16, 0); lean_inc(x_32); if (lean_is_exclusive(x_16)) { lean_ctor_release(x_16, 0); x_33 = x_16; } else { lean_dec_ref(x_16); x_33 = lean_box(0); } if (lean_is_scalar(x_33)) { x_34 = lean_alloc_ctor(1, 1, 0); } else { x_34 = x_33; } lean_ctor_set(x_34, 0, x_32); x_35 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_35, 0, x_34); lean_ctor_set(x_35, 1, x_31); return x_35; } } } else { lean_object* x_36; lean_object* x_37; uint8_t x_38; lean_object* x_39; uint8_t x_40; x_36 = lean_ctor_get(x_15, 0); lean_inc(x_36); x_37 = lean_ctor_get(x_15, 1); lean_inc(x_37); lean_dec(x_15); x_38 = 0; x_39 = l_Lean_Elab_Term_SavedState_restore(x_13, x_38, x_3, x_4, x_5, x_6, x_7, x_8, x_37); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_40 = !lean_is_exclusive(x_39); if (x_40 == 0) { lean_object* x_41; x_41 = lean_ctor_get(x_39, 0); lean_dec(x_41); lean_ctor_set_tag(x_39, 1); lean_ctor_set(x_39, 0, x_36); return x_39; } else { lean_object* x_42; lean_object* x_43; x_42 = lean_ctor_get(x_39, 1); lean_inc(x_42); lean_dec(x_39); x_43 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_43, 0, x_36); lean_ctor_set(x_43, 1, x_42); return x_43; } } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance(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: { lean_object* x_10; x_10 = l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); return x_10; } } lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { _start: { lean_object* x_14; x_14 = l_Std_Range_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__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_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_14; } } lean_object* l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; x_9 = l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__1(x_1, 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_2); return x_9; } } lean_object* l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { lean_object* x_10; x_10 = l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); lean_dec(x_4); lean_dec(x_3); return x_10; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__1___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___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__1___rarg), 3, 0); return x_2; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__2___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); lean_dec(x_1); x_5 = lean_apply_2(x_2, x_3, x_4); return x_5; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__2___rarg), 2, 0); return x_2; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__3___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_box(0); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_apply_1(x_3, x_6); return x_7; } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__3(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__3___rarg), 3, 0); return x_2; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__4___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_box(0); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_dec(x_2); x_6 = lean_apply_1(x_3, x_1); return x_6; } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__4(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__4___rarg), 3, 0); return x_2; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__5___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_box(0); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_apply_1(x_3, x_6); return x_7; } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__5(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances_match__5___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Meta_getDefaultInstances___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; uint8_t x_10; x_9 = lean_st_ref_get(x_7, x_8); x_10 = !lean_is_exclusive(x_9); if (x_10 == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_11 = lean_ctor_get(x_9, 0); x_12 = lean_ctor_get(x_11, 0); lean_inc(x_12); lean_dec(x_11); x_13 = l_Lean_Meta_defaultInstanceExtension; x_14 = l_Lean_SimplePersistentEnvExtension_getState___rarg(x_13, x_12); lean_dec(x_12); x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); lean_dec(x_14); x_16 = l_Std_RBNode_find___at_Lean_Meta_addDefaultInstanceEntry___spec__3(x_15, x_1); lean_dec(x_15); if (lean_obj_tag(x_16) == 0) { lean_object* x_17; x_17 = lean_box(0); lean_ctor_set(x_9, 0, x_17); return x_9; } else { lean_object* x_18; x_18 = lean_ctor_get(x_16, 0); lean_inc(x_18); lean_dec(x_16); lean_ctor_set(x_9, 0, x_18); return x_9; } } else { lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_19 = lean_ctor_get(x_9, 0); x_20 = lean_ctor_get(x_9, 1); lean_inc(x_20); lean_inc(x_19); lean_dec(x_9); x_21 = lean_ctor_get(x_19, 0); lean_inc(x_21); lean_dec(x_19); x_22 = l_Lean_Meta_defaultInstanceExtension; x_23 = l_Lean_SimplePersistentEnvExtension_getState___rarg(x_22, x_21); lean_dec(x_21); x_24 = lean_ctor_get(x_23, 0); lean_inc(x_24); lean_dec(x_23); x_25 = l_Std_RBNode_find___at_Lean_Meta_addDefaultInstanceEntry___spec__3(x_24, x_1); lean_dec(x_24); if (lean_obj_tag(x_25) == 0) { lean_object* x_26; lean_object* x_27; x_26 = lean_box(0); x_27 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_27, 0, x_26); lean_ctor_set(x_27, 1, x_20); return x_27; } else { lean_object* x_28; lean_object* x_29; x_28 = lean_ctor_get(x_25, 0); lean_inc(x_28); lean_dec(x_25); x_29 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_29, 0, x_28); lean_ctor_set(x_29, 1, x_20); return x_29; } } } } lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___spec__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) { _start: { if (lean_obj_tag(x_4) == 0) { lean_object* x_13; lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_3); lean_dec(x_1); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_5); lean_ctor_set(x_13, 1, x_12); return x_13; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; lean_dec(x_5); x_14 = lean_ctor_get(x_4, 0); lean_inc(x_14); x_15 = lean_ctor_get(x_4, 1); lean_inc(x_15); lean_dec(x_4); x_16 = lean_ctor_get(x_14, 0); lean_inc(x_16); x_17 = lean_ctor_get(x_14, 1); lean_inc(x_17); lean_dec(x_14); x_18 = lean_nat_dec_eq(x_17, x_2); lean_dec(x_17); if (x_18 == 0) { lean_dec(x_16); lean_inc(x_3); { lean_object* _tmp_3 = x_15; lean_object* _tmp_4 = x_3; x_4 = _tmp_3; x_5 = _tmp_4; } goto _start; } else { lean_object* x_20; lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_1); x_20 = l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3(x_1, x_16, x_6, x_7, x_8, x_9, x_10, x_11, x_12); if (lean_obj_tag(x_20) == 0) { lean_object* x_21; x_21 = lean_ctor_get(x_20, 0); lean_inc(x_21); if (lean_obj_tag(x_21) == 0) { lean_object* x_22; x_22 = lean_ctor_get(x_20, 1); lean_inc(x_22); lean_dec(x_20); lean_inc(x_3); { lean_object* _tmp_3 = x_15; lean_object* _tmp_4 = x_3; lean_object* _tmp_11 = x_22; x_4 = _tmp_3; x_5 = _tmp_4; x_12 = _tmp_11; } goto _start; } else { uint8_t x_24; lean_dec(x_15); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_3); lean_dec(x_1); x_24 = !lean_is_exclusive(x_20); if (x_24 == 0) { lean_object* x_25; uint8_t x_26; x_25 = lean_ctor_get(x_20, 0); lean_dec(x_25); x_26 = !lean_is_exclusive(x_21); if (x_26 == 0) { lean_object* x_27; lean_object* x_28; lean_object* x_29; x_27 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_27, 0, x_21); x_28 = lean_box(0); x_29 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_29, 0, x_27); lean_ctor_set(x_29, 1, x_28); lean_ctor_set(x_20, 0, x_29); return x_20; } else { lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; x_30 = lean_ctor_get(x_21, 0); lean_inc(x_30); lean_dec(x_21); x_31 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_31, 0, x_30); x_32 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_32, 0, x_31); x_33 = lean_box(0); x_34 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_34, 0, x_32); lean_ctor_set(x_34, 1, x_33); lean_ctor_set(x_20, 0, x_34); return x_20; } } else { 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; x_35 = lean_ctor_get(x_20, 1); lean_inc(x_35); lean_dec(x_20); x_36 = lean_ctor_get(x_21, 0); lean_inc(x_36); if (lean_is_exclusive(x_21)) { lean_ctor_release(x_21, 0); x_37 = x_21; } else { lean_dec_ref(x_21); x_37 = lean_box(0); } if (lean_is_scalar(x_37)) { x_38 = lean_alloc_ctor(1, 1, 0); } else { x_38 = x_37; } lean_ctor_set(x_38, 0, x_36); x_39 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_39, 0, x_38); x_40 = lean_box(0); x_41 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_41, 0, x_39); lean_ctor_set(x_41, 1, x_40); x_42 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_42, 0, x_41); lean_ctor_set(x_42, 1, x_35); return x_42; } } } else { uint8_t x_43; lean_dec(x_15); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_3); lean_dec(x_1); x_43 = !lean_is_exclusive(x_20); if (x_43 == 0) { return x_20; } else { lean_object* x_44; lean_object* x_45; lean_object* x_46; x_44 = lean_ctor_get(x_20, 0); x_45 = lean_ctor_get(x_20, 1); lean_inc(x_45); lean_inc(x_44); lean_dec(x_20); 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_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; x_9 = l_Lean_Meta_getMVarDecl(x_1, x_4, x_5, x_6, x_7, x_8); return x_9; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___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) { _start: { lean_object* x_11; lean_object* x_12; x_11 = lean_ctor_get(x_3, 2); lean_inc(x_11); lean_dec(x_3); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); x_12 = l_Lean_Meta_isClass_x3f(x_11, x_6, x_7, x_8, x_9, x_10); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); if (lean_obj_tag(x_13) == 0) { uint8_t x_14; lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); x_14 = !lean_is_exclusive(x_12); if (x_14 == 0) { lean_object* x_15; lean_object* x_16; x_15 = lean_ctor_get(x_12, 0); lean_dec(x_15); x_16 = lean_box(0); lean_ctor_set(x_12, 0, x_16); return x_12; } else { lean_object* x_17; lean_object* x_18; lean_object* x_19; x_17 = lean_ctor_get(x_12, 1); lean_inc(x_17); lean_dec(x_12); x_18 = lean_box(0); x_19 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_19, 0, x_18); lean_ctor_set(x_19, 1, x_17); return x_19; } } else { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_20 = lean_ctor_get(x_12, 1); lean_inc(x_20); lean_dec(x_12); x_21 = lean_ctor_get(x_13, 0); lean_inc(x_21); lean_dec(x_13); x_22 = l_Lean_Meta_getDefaultInstances___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___spec__1(x_21, x_4, x_5, x_6, x_7, x_8, x_9, x_20); lean_dec(x_21); x_23 = lean_ctor_get(x_22, 0); lean_inc(x_23); if (lean_obj_tag(x_23) == 0) { uint8_t x_24; lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); x_24 = !lean_is_exclusive(x_22); if (x_24 == 0) { lean_object* x_25; lean_object* x_26; x_25 = lean_ctor_get(x_22, 0); lean_dec(x_25); x_26 = lean_box(0); lean_ctor_set(x_22, 0, x_26); return x_22; } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; x_27 = lean_ctor_get(x_22, 1); lean_inc(x_27); lean_dec(x_22); x_28 = lean_box(0); x_29 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_29, 0, x_28); lean_ctor_set(x_29, 1, x_27); 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_22, 1); lean_inc(x_30); lean_dec(x_22); x_31 = lean_box(0); x_32 = l_Array_findSomeM_x3f___rarg___closed__1; x_33 = l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___spec__2(x_1, x_2, x_32, x_23, x_32, x_4, x_5, x_6, x_7, x_8, x_9, x_30); if (lean_obj_tag(x_33) == 0) { lean_object* x_34; lean_object* x_35; x_34 = lean_ctor_get(x_33, 0); lean_inc(x_34); x_35 = lean_ctor_get(x_34, 0); lean_inc(x_35); lean_dec(x_34); if (lean_obj_tag(x_35) == 0) { uint8_t x_36; x_36 = !lean_is_exclusive(x_33); if (x_36 == 0) { lean_object* x_37; x_37 = lean_ctor_get(x_33, 0); lean_dec(x_37); lean_ctor_set(x_33, 0, x_31); return x_33; } else { lean_object* x_38; lean_object* x_39; x_38 = lean_ctor_get(x_33, 1); lean_inc(x_38); lean_dec(x_33); x_39 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_39, 0, x_31); lean_ctor_set(x_39, 1, x_38); return x_39; } } else { uint8_t x_40; x_40 = !lean_is_exclusive(x_33); if (x_40 == 0) { lean_object* x_41; lean_object* x_42; x_41 = lean_ctor_get(x_33, 0); lean_dec(x_41); x_42 = lean_ctor_get(x_35, 0); lean_inc(x_42); lean_dec(x_35); lean_ctor_set(x_33, 0, x_42); return x_33; } else { lean_object* x_43; lean_object* x_44; lean_object* x_45; x_43 = lean_ctor_get(x_33, 1); lean_inc(x_43); lean_dec(x_33); x_44 = lean_ctor_get(x_35, 0); lean_inc(x_44); lean_dec(x_35); x_45 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_45, 0, x_44); lean_ctor_set(x_45, 1, x_43); return x_45; } } } else { uint8_t x_46; x_46 = !lean_is_exclusive(x_33); if (x_46 == 0) { return x_33; } else { lean_object* x_47; lean_object* x_48; lean_object* x_49; x_47 = lean_ctor_get(x_33, 0); x_48 = lean_ctor_get(x_33, 1); lean_inc(x_48); lean_inc(x_47); lean_dec(x_33); 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; } } } } } else { uint8_t x_50; lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); x_50 = !lean_is_exclusive(x_12); if (x_50 == 0) { return x_12; } else { lean_object* x_51; lean_object* x_52; lean_object* x_53; x_51 = lean_ctor_get(x_12, 0); x_52 = lean_ctor_get(x_12, 1); lean_inc(x_52); lean_inc(x_51); lean_dec(x_12); x_53 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_53, 0, x_51); lean_ctor_set(x_53, 1, x_52); return x_53; } } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances(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: { lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_inc(x_1); x_10 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___lambda__1___boxed), 8, 1); lean_closure_set(x_10, 0, x_1); lean_inc(x_1); x_11 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___lambda__2___boxed), 10, 2); lean_closure_set(x_11, 0, x_1); lean_closure_set(x_11, 1, x_2); x_12 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Term_instMonadLogTermElabM___spec__2___rarg), 9, 2); lean_closure_set(x_12, 0, x_10); lean_closure_set(x_12, 1, x_11); x_13 = l_Lean_Meta_withMVarContext___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__4___rarg(x_1, x_12, x_3, x_4, x_5, x_6, x_7, x_8, x_9); return x_13; } } lean_object* l_Lean_Meta_getDefaultInstances___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; x_9 = l_Lean_Meta_getDefaultInstances___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___spec__1(x_1, 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_2); lean_dec(x_1); return x_9; } } lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { lean_object* x_13; x_13 = l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___spec__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); lean_dec(x_2); return x_13; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; x_9 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___lambda__1(x_1, 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_2); return x_9; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___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) { _start: { lean_object* x_11; x_11 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___lambda__2(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___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit_match__1___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_box(0); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_ctor_get(x_6, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_6, 1); lean_inc(x_8); lean_dec(x_6); x_9 = lean_apply_2(x_3, x_7, x_8); return x_9; } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit_match__1___rarg), 3, 0); return x_2; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit_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_box(0); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_dec(x_2); x_6 = lean_apply_1(x_3, x_1); return x_6; } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit_match__2(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit_match__2___rarg), 3, 0); return x_2; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit_match__3___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_box(0); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_1, 1); lean_inc(x_7); lean_dec(x_1); x_8 = lean_apply_2(x_3, x_6, x_7); return x_8; } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit_match__3(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit_match__3___rarg), 3, 0); return x_2; } } lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { if (lean_obj_tag(x_2) == 0) { lean_object* x_11; lean_dec(x_8); lean_dec(x_1); x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_3); lean_ctor_set(x_11, 1, x_10); return x_11; } else { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_dec(x_3); x_12 = lean_ctor_get(x_2, 0); lean_inc(x_12); x_13 = lean_ctor_get(x_2, 1); lean_inc(x_13); lean_dec(x_2); x_14 = lean_ctor_get(x_8, 3); lean_inc(x_14); x_15 = lean_ctor_get(x_12, 0); lean_inc(x_15); lean_dec(x_12); lean_inc(x_1); x_16 = l_Lean_Elab_Term_registerMVarErrorImplicitArgInfo(x_15, x_14, x_1, x_4, x_5, x_6, x_7, x_8, x_9, x_10); x_17 = lean_ctor_get(x_16, 1); lean_inc(x_17); lean_dec(x_16); x_18 = lean_box(0); x_2 = x_13; x_3 = x_18; x_10 = x_17; goto _start; } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit(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: { if (lean_obj_tag(x_2) == 0) { uint8_t x_11; lean_object* x_12; lean_object* x_13; lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); x_11 = 0; x_12 = lean_box(x_11); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_10); return x_13; } else { lean_object* x_14; lean_object* x_15; x_14 = lean_ctor_get(x_2, 0); lean_inc(x_14); x_15 = lean_ctor_get(x_14, 2); lean_inc(x_15); if (lean_obj_tag(x_15) == 0) { uint8_t x_16; x_16 = !lean_is_exclusive(x_2); if (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; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; x_17 = lean_ctor_get(x_2, 1); x_18 = lean_ctor_get(x_2, 0); lean_dec(x_18); x_19 = lean_ctor_get(x_14, 1); lean_inc(x_19); x_20 = lean_ctor_get(x_14, 0); lean_inc(x_20); x_21 = lean_ctor_get(x_8, 0); lean_inc(x_21); x_22 = lean_ctor_get(x_8, 1); lean_inc(x_22); x_23 = lean_ctor_get(x_8, 2); lean_inc(x_23); x_24 = lean_ctor_get(x_8, 3); lean_inc(x_24); x_25 = lean_ctor_get(x_8, 4); lean_inc(x_25); x_26 = lean_ctor_get(x_8, 5); lean_inc(x_26); x_27 = lean_ctor_get(x_8, 6); lean_inc(x_27); x_28 = lean_ctor_get(x_8, 7); lean_inc(x_28); x_29 = l_Lean_replaceRef(x_19, x_24); lean_dec(x_24); lean_dec(x_19); x_30 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_30, 0, x_21); lean_ctor_set(x_30, 1, x_22); lean_ctor_set(x_30, 2, x_23); lean_ctor_set(x_30, 3, x_29); lean_ctor_set(x_30, 4, x_25); lean_ctor_set(x_30, 5, x_26); lean_ctor_set(x_30, 6, x_27); lean_ctor_set(x_30, 7, x_28); lean_inc(x_9); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_1); x_31 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances(x_20, x_1, x_4, x_5, x_6, x_7, x_30, x_9, x_10); if (lean_obj_tag(x_31) == 0) { lean_object* x_32; x_32 = lean_ctor_get(x_31, 0); lean_inc(x_32); if (lean_obj_tag(x_32) == 0) { lean_object* x_33; x_33 = lean_ctor_get(x_31, 1); lean_inc(x_33); lean_dec(x_31); lean_ctor_set(x_2, 1, x_3); { lean_object* _tmp_1 = x_17; lean_object* _tmp_2 = x_2; lean_object* _tmp_9 = x_33; x_2 = _tmp_1; x_3 = _tmp_2; x_10 = _tmp_9; } goto _start; } else { lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; uint8_t x_50; lean_free_object(x_2); lean_dec(x_14); lean_dec(x_1); x_35 = lean_ctor_get(x_32, 0); lean_inc(x_35); lean_dec(x_32); x_36 = lean_ctor_get(x_31, 1); lean_inc(x_36); lean_dec(x_31); x_37 = lean_ctor_get(x_35, 0); lean_inc(x_37); x_38 = lean_ctor_get(x_35, 1); lean_inc(x_38); lean_dec(x_35); x_39 = lean_box(0); lean_inc(x_38); x_40 = l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit___spec__1(x_37, x_38, x_39, x_4, x_5, x_6, x_7, x_8, x_9, x_36); lean_dec(x_7); lean_dec(x_6); lean_dec(x_4); x_41 = lean_ctor_get(x_40, 1); lean_inc(x_41); lean_dec(x_40); x_42 = l_List_append___rarg(x_38, x_3); x_43 = l_List_reverse___rarg(x_17); x_44 = l_List_append___rarg(x_43, x_42); x_45 = lean_st_ref_get(x_9, x_41); lean_dec(x_9); x_46 = lean_ctor_get(x_45, 1); lean_inc(x_46); lean_dec(x_45); x_47 = lean_st_ref_take(x_5, x_46); x_48 = lean_ctor_get(x_47, 0); lean_inc(x_48); x_49 = lean_ctor_get(x_47, 1); lean_inc(x_49); lean_dec(x_47); x_50 = !lean_is_exclusive(x_48); if (x_50 == 0) { lean_object* x_51; lean_object* x_52; uint8_t x_53; x_51 = lean_ctor_get(x_48, 1); lean_dec(x_51); lean_ctor_set(x_48, 1, x_44); x_52 = lean_st_ref_set(x_5, x_48, x_49); lean_dec(x_5); x_53 = !lean_is_exclusive(x_52); if (x_53 == 0) { lean_object* x_54; uint8_t x_55; lean_object* x_56; x_54 = lean_ctor_get(x_52, 0); lean_dec(x_54); x_55 = 1; x_56 = lean_box(x_55); lean_ctor_set(x_52, 0, x_56); return x_52; } else { lean_object* x_57; uint8_t x_58; lean_object* x_59; lean_object* x_60; x_57 = lean_ctor_get(x_52, 1); lean_inc(x_57); lean_dec(x_52); x_58 = 1; x_59 = lean_box(x_58); x_60 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_60, 0, x_59); lean_ctor_set(x_60, 1, x_57); return x_60; } } else { 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; lean_object* x_69; uint8_t x_70; lean_object* x_71; lean_object* x_72; x_61 = lean_ctor_get(x_48, 0); x_62 = lean_ctor_get(x_48, 2); x_63 = lean_ctor_get(x_48, 3); x_64 = lean_ctor_get(x_48, 4); x_65 = lean_ctor_get(x_48, 5); lean_inc(x_65); lean_inc(x_64); lean_inc(x_63); lean_inc(x_62); lean_inc(x_61); lean_dec(x_48); x_66 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_66, 0, x_61); lean_ctor_set(x_66, 1, x_44); lean_ctor_set(x_66, 2, x_62); lean_ctor_set(x_66, 3, x_63); lean_ctor_set(x_66, 4, x_64); lean_ctor_set(x_66, 5, x_65); x_67 = lean_st_ref_set(x_5, x_66, x_49); lean_dec(x_5); x_68 = lean_ctor_get(x_67, 1); lean_inc(x_68); if (lean_is_exclusive(x_67)) { lean_ctor_release(x_67, 0); lean_ctor_release(x_67, 1); x_69 = x_67; } else { lean_dec_ref(x_67); x_69 = lean_box(0); } x_70 = 1; x_71 = lean_box(x_70); if (lean_is_scalar(x_69)) { x_72 = lean_alloc_ctor(0, 2, 0); } else { x_72 = x_69; } lean_ctor_set(x_72, 0, x_71); lean_ctor_set(x_72, 1, x_68); return x_72; } } } else { uint8_t x_73; lean_free_object(x_2); lean_dec(x_17); lean_dec(x_14); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); x_73 = !lean_is_exclusive(x_31); if (x_73 == 0) { return x_31; } else { lean_object* x_74; lean_object* x_75; lean_object* x_76; x_74 = lean_ctor_get(x_31, 0); x_75 = lean_ctor_get(x_31, 1); lean_inc(x_75); lean_inc(x_74); lean_dec(x_31); x_76 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_76, 0, x_74); lean_ctor_set(x_76, 1, x_75); return x_76; } } } else { lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; x_77 = lean_ctor_get(x_2, 1); lean_inc(x_77); lean_dec(x_2); x_78 = lean_ctor_get(x_14, 1); lean_inc(x_78); x_79 = lean_ctor_get(x_14, 0); lean_inc(x_79); x_80 = lean_ctor_get(x_8, 0); lean_inc(x_80); x_81 = lean_ctor_get(x_8, 1); lean_inc(x_81); x_82 = lean_ctor_get(x_8, 2); lean_inc(x_82); x_83 = lean_ctor_get(x_8, 3); lean_inc(x_83); x_84 = lean_ctor_get(x_8, 4); lean_inc(x_84); x_85 = lean_ctor_get(x_8, 5); lean_inc(x_85); x_86 = lean_ctor_get(x_8, 6); lean_inc(x_86); x_87 = lean_ctor_get(x_8, 7); lean_inc(x_87); x_88 = l_Lean_replaceRef(x_78, x_83); lean_dec(x_83); lean_dec(x_78); x_89 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_89, 0, x_80); lean_ctor_set(x_89, 1, x_81); lean_ctor_set(x_89, 2, x_82); lean_ctor_set(x_89, 3, x_88); lean_ctor_set(x_89, 4, x_84); lean_ctor_set(x_89, 5, x_85); lean_ctor_set(x_89, 6, x_86); lean_ctor_set(x_89, 7, x_87); lean_inc(x_9); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_1); x_90 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances(x_79, x_1, x_4, x_5, x_6, x_7, x_89, x_9, x_10); if (lean_obj_tag(x_90) == 0) { lean_object* x_91; x_91 = lean_ctor_get(x_90, 0); lean_inc(x_91); if (lean_obj_tag(x_91) == 0) { lean_object* x_92; lean_object* x_93; x_92 = lean_ctor_get(x_90, 1); lean_inc(x_92); lean_dec(x_90); x_93 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_93, 0, x_14); lean_ctor_set(x_93, 1, x_3); x_2 = x_77; x_3 = x_93; x_10 = x_92; goto _start; } else { lean_object* x_95; 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; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; uint8_t x_120; lean_object* x_121; lean_object* x_122; lean_dec(x_14); lean_dec(x_1); x_95 = lean_ctor_get(x_91, 0); lean_inc(x_95); lean_dec(x_91); x_96 = lean_ctor_get(x_90, 1); lean_inc(x_96); lean_dec(x_90); x_97 = lean_ctor_get(x_95, 0); lean_inc(x_97); x_98 = lean_ctor_get(x_95, 1); lean_inc(x_98); lean_dec(x_95); x_99 = lean_box(0); lean_inc(x_98); x_100 = l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit___spec__1(x_97, x_98, x_99, x_4, x_5, x_6, x_7, x_8, x_9, x_96); lean_dec(x_7); lean_dec(x_6); lean_dec(x_4); x_101 = lean_ctor_get(x_100, 1); lean_inc(x_101); lean_dec(x_100); x_102 = l_List_append___rarg(x_98, x_3); x_103 = l_List_reverse___rarg(x_77); x_104 = l_List_append___rarg(x_103, x_102); x_105 = lean_st_ref_get(x_9, x_101); lean_dec(x_9); x_106 = lean_ctor_get(x_105, 1); lean_inc(x_106); lean_dec(x_105); x_107 = lean_st_ref_take(x_5, x_106); x_108 = lean_ctor_get(x_107, 0); lean_inc(x_108); x_109 = lean_ctor_get(x_107, 1); lean_inc(x_109); lean_dec(x_107); x_110 = lean_ctor_get(x_108, 0); lean_inc(x_110); x_111 = lean_ctor_get(x_108, 2); lean_inc(x_111); x_112 = lean_ctor_get(x_108, 3); lean_inc(x_112); x_113 = lean_ctor_get(x_108, 4); lean_inc(x_113); x_114 = lean_ctor_get(x_108, 5); lean_inc(x_114); if (lean_is_exclusive(x_108)) { lean_ctor_release(x_108, 0); lean_ctor_release(x_108, 1); lean_ctor_release(x_108, 2); lean_ctor_release(x_108, 3); lean_ctor_release(x_108, 4); lean_ctor_release(x_108, 5); x_115 = x_108; } else { lean_dec_ref(x_108); x_115 = lean_box(0); } if (lean_is_scalar(x_115)) { x_116 = lean_alloc_ctor(0, 6, 0); } else { x_116 = x_115; } lean_ctor_set(x_116, 0, x_110); lean_ctor_set(x_116, 1, x_104); lean_ctor_set(x_116, 2, x_111); lean_ctor_set(x_116, 3, x_112); lean_ctor_set(x_116, 4, x_113); lean_ctor_set(x_116, 5, x_114); x_117 = lean_st_ref_set(x_5, x_116, x_109); lean_dec(x_5); x_118 = lean_ctor_get(x_117, 1); lean_inc(x_118); if (lean_is_exclusive(x_117)) { lean_ctor_release(x_117, 0); lean_ctor_release(x_117, 1); x_119 = x_117; } else { lean_dec_ref(x_117); x_119 = lean_box(0); } x_120 = 1; x_121 = lean_box(x_120); if (lean_is_scalar(x_119)) { x_122 = lean_alloc_ctor(0, 2, 0); } else { x_122 = x_119; } lean_ctor_set(x_122, 0, x_121); lean_ctor_set(x_122, 1, x_118); return x_122; } } else { lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_dec(x_77); lean_dec(x_14); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); x_123 = lean_ctor_get(x_90, 0); lean_inc(x_123); x_124 = lean_ctor_get(x_90, 1); lean_inc(x_124); if (lean_is_exclusive(x_90)) { lean_ctor_release(x_90, 0); lean_ctor_release(x_90, 1); x_125 = x_90; } else { lean_dec_ref(x_90); x_125 = lean_box(0); } if (lean_is_scalar(x_125)) { x_126 = lean_alloc_ctor(1, 2, 0); } else { x_126 = x_125; } lean_ctor_set(x_126, 0, x_123); lean_ctor_set(x_126, 1, x_124); return x_126; } } } else { uint8_t x_127; lean_dec(x_15); x_127 = !lean_is_exclusive(x_2); if (x_127 == 0) { lean_object* x_128; lean_object* x_129; x_128 = lean_ctor_get(x_2, 1); x_129 = lean_ctor_get(x_2, 0); lean_dec(x_129); lean_ctor_set(x_2, 1, x_3); { lean_object* _tmp_1 = x_128; lean_object* _tmp_2 = x_2; x_2 = _tmp_1; x_3 = _tmp_2; } goto _start; } else { lean_object* x_131; lean_object* x_132; x_131 = lean_ctor_get(x_2, 1); lean_inc(x_131); lean_dec(x_2); x_132 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_132, 0, x_14); lean_ctor_set(x_132, 1, x_3); x_2 = x_131; x_3 = x_132; goto _start; } } } } } lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; x_11 = l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); return x_11; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; x_9 = lean_st_ref_get(x_7, x_8); x_10 = lean_ctor_get(x_9, 1); lean_inc(x_10); lean_dec(x_9); x_11 = lean_st_ref_get(x_3, x_10); x_12 = lean_ctor_get(x_11, 0); lean_inc(x_12); x_13 = lean_ctor_get(x_11, 1); lean_inc(x_13); lean_dec(x_11); x_14 = lean_ctor_get(x_12, 1); lean_inc(x_14); lean_dec(x_12); x_15 = l_List_reverse___rarg(x_14); x_16 = lean_box(0); x_17 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio_visit(x_1, x_15, x_16, x_2, x_3, x_4, x_5, x_6, x_7, x_13); return x_17; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault_match__1___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_box(0); x_5 = lean_apply_1(x_2, x_4); return x_5; } else { lean_object* x_6; lean_object* x_7; lean_dec(x_2); x_6 = lean_ctor_get(x_1, 0); lean_inc(x_6); lean_dec(x_1); x_7 = lean_apply_1(x_3, x_6); return x_7; } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault_match__1___rarg), 3, 0); return x_2; } } lean_object* l_Lean_Meta_getDefaultInstancesPriorities___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___spec__1___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; uint8_t x_4; x_3 = lean_st_ref_get(x_1, x_2); x_4 = !lean_is_exclusive(x_3); if (x_4 == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_5 = lean_ctor_get(x_3, 0); x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); lean_dec(x_5); x_7 = l_Lean_Meta_defaultInstanceExtension; x_8 = l_Lean_SimplePersistentEnvExtension_getState___rarg(x_7, x_6); lean_dec(x_6); x_9 = lean_ctor_get(x_8, 1); lean_inc(x_9); lean_dec(x_8); lean_ctor_set(x_3, 0, x_9); return x_3; } else { 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; x_10 = lean_ctor_get(x_3, 0); x_11 = lean_ctor_get(x_3, 1); lean_inc(x_11); lean_inc(x_10); lean_dec(x_3); x_12 = lean_ctor_get(x_10, 0); lean_inc(x_12); lean_dec(x_10); x_13 = l_Lean_Meta_defaultInstanceExtension; x_14 = l_Lean_SimplePersistentEnvExtension_getState___rarg(x_13, x_12); lean_dec(x_12); x_15 = lean_ctor_get(x_14, 1); lean_inc(x_15); lean_dec(x_14); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_15); lean_ctor_set(x_16, 1, x_11); return x_16; } } } lean_object* l_Lean_Meta_getDefaultInstancesPriorities___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = lean_alloc_closure((void*)(l_Lean_Meta_getDefaultInstancesPriorities___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___spec__1___rarg___boxed), 2, 0); return x_6; } } lean_object* l_Std_RBNode_forIn_visit___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___spec__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) { _start: { if (lean_obj_tag(x_2) == 0) { lean_object* x_11; lean_object* x_12; lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); x_11 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_11, 0, x_3); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_10); return x_12; } else { lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_13 = lean_ctor_get(x_2, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_2, 1); lean_inc(x_14); x_15 = lean_ctor_get(x_2, 3); lean_inc(x_15); lean_dec(x_2); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_1); x_16 = l_Std_RBNode_forIn_visit___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___spec__2(x_1, x_13, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); if (lean_obj_tag(x_16) == 0) { lean_object* x_17; x_17 = lean_ctor_get(x_16, 0); lean_inc(x_17); if (lean_obj_tag(x_17) == 0) { uint8_t x_18; lean_dec(x_15); lean_dec(x_14); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); x_18 = !lean_is_exclusive(x_16); if (x_18 == 0) { lean_object* x_19; x_19 = lean_ctor_get(x_16, 0); lean_dec(x_19); return x_16; } else { lean_object* x_20; lean_object* x_21; x_20 = lean_ctor_get(x_16, 1); lean_inc(x_20); lean_dec(x_16); x_21 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_21, 0, x_17); lean_ctor_set(x_21, 1, x_20); return x_21; } } else { lean_object* x_22; lean_object* x_23; lean_dec(x_17); x_22 = lean_ctor_get(x_16, 1); lean_inc(x_22); lean_dec(x_16); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); x_23 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultPrio(x_14, x_4, x_5, x_6, x_7, x_8, x_9, x_22); if (lean_obj_tag(x_23) == 0) { lean_object* x_24; uint8_t x_25; x_24 = lean_ctor_get(x_23, 0); lean_inc(x_24); x_25 = lean_unbox(x_24); lean_dec(x_24); if (x_25 == 0) { lean_object* x_26; x_26 = lean_ctor_get(x_23, 1); lean_inc(x_26); lean_dec(x_23); lean_inc(x_1); { lean_object* _tmp_1 = x_15; lean_object* _tmp_2 = x_1; lean_object* _tmp_9 = x_26; x_2 = _tmp_1; x_3 = _tmp_2; x_10 = _tmp_9; } goto _start; } else { uint8_t x_28; lean_dec(x_15); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); x_28 = !lean_is_exclusive(x_23); if (x_28 == 0) { lean_object* x_29; lean_object* x_30; x_29 = lean_ctor_get(x_23, 0); lean_dec(x_29); x_30 = l_Lean_Syntax_instForInTopDownSyntax_loop___at_Lean_Syntax_hasMissing___spec__1___closed__4; lean_ctor_set(x_23, 0, x_30); return x_23; } else { lean_object* x_31; lean_object* x_32; lean_object* x_33; x_31 = lean_ctor_get(x_23, 1); lean_inc(x_31); lean_dec(x_23); x_32 = l_Lean_Syntax_instForInTopDownSyntax_loop___at_Lean_Syntax_hasMissing___spec__1___closed__4; x_33 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_33, 0, x_32); lean_ctor_set(x_33, 1, x_31); return x_33; } } } else { uint8_t x_34; lean_dec(x_15); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); x_34 = !lean_is_exclusive(x_23); if (x_34 == 0) { return x_23; } else { lean_object* x_35; lean_object* x_36; lean_object* x_37; x_35 = lean_ctor_get(x_23, 0); x_36 = lean_ctor_get(x_23, 1); lean_inc(x_36); lean_inc(x_35); lean_dec(x_23); x_37 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_37, 0, x_35); lean_ctor_set(x_37, 1, x_36); return x_37; } } } } else { uint8_t x_38; lean_dec(x_15); lean_dec(x_14); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); x_38 = !lean_is_exclusive(x_16); if (x_38 == 0) { return x_16; } else { lean_object* x_39; lean_object* x_40; lean_object* x_41; x_39 = lean_ctor_get(x_16, 0); x_40 = lean_ctor_get(x_16, 1); lean_inc(x_40); lean_inc(x_39); lean_dec(x_16); x_41 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_41, 0, x_39); lean_ctor_set(x_41, 1, x_40); return x_41; } } } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { uint8_t x_9; lean_object* x_10; lean_object* x_11; x_9 = 0; x_10 = lean_box(x_9); x_11 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_8); return x_11; } } static lean_object* _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___lambda__1___boxed), 8, 0); return x_1; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; x_8 = l_Lean_Meta_getDefaultInstancesPriorities___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___spec__1___rarg(x_6, x_7); 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 = l_Array_findSomeM_x3f___rarg___closed__1; lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); lean_inc(x_1); x_12 = l_Std_RBNode_forIn_visit___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___spec__2(x_11, x_9, x_11, x_1, x_2, x_3, x_4, x_5, x_6, x_10); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_13, 0); lean_inc(x_14); lean_dec(x_13); x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); 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; x_16 = lean_ctor_get(x_12, 1); lean_inc(x_16); lean_dec(x_12); x_17 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___closed__1; x_18 = lean_box(0); x_19 = lean_apply_8(x_17, x_18, x_1, x_2, x_3, x_4, x_5, x_6, x_16); return x_19; } else { uint8_t x_20; 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_20 = !lean_is_exclusive(x_12); if (x_20 == 0) { lean_object* x_21; lean_object* x_22; x_21 = lean_ctor_get(x_12, 0); lean_dec(x_21); x_22 = lean_ctor_get(x_15, 0); lean_inc(x_22); lean_dec(x_15); lean_ctor_set(x_12, 0, x_22); return x_12; } else { lean_object* x_23; lean_object* x_24; lean_object* x_25; x_23 = lean_ctor_get(x_12, 1); lean_inc(x_23); lean_dec(x_12); x_24 = lean_ctor_get(x_15, 0); lean_inc(x_24); lean_dec(x_15); x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_23); return x_25; } } } else { uint8_t x_26; lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_26 = !lean_is_exclusive(x_12); if (x_26 == 0) { return x_12; } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; x_27 = lean_ctor_get(x_12, 0); x_28 = lean_ctor_get(x_12, 1); lean_inc(x_28); lean_inc(x_27); lean_dec(x_12); x_29 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_29, 0, x_27); lean_ctor_set(x_29, 1, x_28); return x_29; } } } } lean_object* l_Lean_Meta_getDefaultInstancesPriorities___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = l_Lean_Meta_getDefaultInstancesPriorities___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___spec__1___rarg(x_1, x_2); lean_dec(x_1); return x_3; } } lean_object* l_Lean_Meta_getDefaultInstancesPriorities___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; x_6 = l_Lean_Meta_getDefaultInstancesPriorities___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___spec__1(x_1, x_2, x_3, x_4, x_5); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_6; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; x_9 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___lambda__1(x_1, 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_2); lean_dec(x_1); return x_9; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars_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 0: { lean_object* x_5; lean_object* x_6; lean_dec(x_4); lean_dec(x_3); x_5 = lean_box(0); x_6 = lean_apply_1(x_2, x_5); return x_6; } case 1: { 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_dec(x_4); lean_dec(x_2); x_7 = lean_ctor_get(x_1, 0); lean_inc(x_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 = lean_ctor_get(x_1, 3); lean_inc(x_10); x_11 = lean_ctor_get(x_1, 4); lean_inc(x_11); x_12 = lean_ctor_get(x_1, 5); lean_inc(x_12); lean_dec(x_1); x_13 = lean_apply_6(x_3, x_7, x_8, x_9, x_10, x_11, x_12); return x_13; } default: { lean_object* x_14; lean_dec(x_3); lean_dec(x_2); x_14 = lean_apply_1(x_4, x_1); return x_14; } } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars_match__1___rarg), 4, 0); return x_2; } } static lean_object* _init_l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__1___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("typeclass instance problem is stuck, it is often due to metavariables"); return x_1; } } static lean_object* _init_l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__1___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__1___closed__1; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; x_9 = lean_st_ref_get(x_7, x_8); x_10 = lean_ctor_get(x_9, 1); lean_inc(x_10); lean_dec(x_9); x_11 = lean_st_ref_get(x_3, x_10); x_12 = !lean_is_exclusive(x_11); if (x_12 == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; x_13 = lean_ctor_get(x_11, 0); x_14 = lean_ctor_get(x_11, 1); x_15 = lean_ctor_get(x_13, 3); lean_inc(x_15); lean_dec(x_13); x_16 = l_Std_PersistentArray_anyM___at_Lean_MessageLog_hasErrors___spec__1(x_15); lean_dec(x_15); if (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; lean_free_object(x_11); x_17 = lean_ctor_get(x_1, 2); lean_inc(x_17); lean_dec(x_1); x_18 = l_Lean_indentExpr(x_17); x_19 = l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__1___closed__2; x_20 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_20, 0, x_19); lean_ctor_set(x_20, 1, x_18); x_21 = l_Lean_KernelException_toMessageData___closed__15; x_22 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_22, 0, x_20); lean_ctor_set(x_22, 1, x_21); x_23 = l_Lean_throwError___at___private_Lean_Elab_Term_0__Lean_Elab_Term_applyAttributesCore___spec__1(x_22, x_2, x_3, x_4, x_5, x_6, x_7, x_14); return x_23; } else { lean_object* x_24; lean_dec(x_2); lean_dec(x_1); x_24 = lean_box(0); lean_ctor_set(x_11, 0, x_24); return x_11; } } else { lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; x_25 = lean_ctor_get(x_11, 0); x_26 = lean_ctor_get(x_11, 1); lean_inc(x_26); lean_inc(x_25); lean_dec(x_11); x_27 = lean_ctor_get(x_25, 3); lean_inc(x_27); lean_dec(x_25); x_28 = l_Std_PersistentArray_anyM___at_Lean_MessageLog_hasErrors___spec__1(x_27); lean_dec(x_27); if (x_28 == 0) { lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; x_29 = lean_ctor_get(x_1, 2); lean_inc(x_29); lean_dec(x_1); x_30 = l_Lean_indentExpr(x_29); x_31 = l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__1___closed__2; x_32 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_32, 0, x_31); lean_ctor_set(x_32, 1, x_30); x_33 = l_Lean_KernelException_toMessageData___closed__15; x_34 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_34, 0, x_32); lean_ctor_set(x_34, 1, x_33); x_35 = l_Lean_throwError___at___private_Lean_Elab_Term_0__Lean_Elab_Term_applyAttributesCore___spec__1(x_34, x_2, x_3, x_4, x_5, x_6, x_7, x_26); return x_35; } else { lean_object* x_36; lean_object* x_37; lean_dec(x_2); lean_dec(x_1); x_36 = lean_box(0); x_37 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_37, 0, x_36); lean_ctor_set(x_37, 1, x_26); return x_37; } } } } static lean_object* _init_l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__2___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("failed to create type class instance for "); return x_1; } } static lean_object* _init_l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__2___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__2___closed__1; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__2___closed__3() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__2___closed__2; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___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) { _start: { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_14 = lean_ctor_get(x_6, 2); lean_inc(x_14); lean_dec(x_6); x_15 = l_Lean_indentExpr(x_14); x_16 = l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__2___closed__3; x_17 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_15); x_18 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_18, 0, x_17); x_19 = l_Lean_Elab_Term_throwTypeMismatchError___rarg(x_1, x_2, x_3, x_4, x_5, x_18, x_7, x_8, x_9, x_10, x_11, x_12, x_13); lean_dec(x_18); return x_19; } } static lean_object* _init_l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__1___boxed), 8, 0); return x_1; } } static lean_object* _init_l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___closed__2() { _start: { lean_object* x_1; x_1 = lean_mk_string("_private.Lean.Elab.SyntheticMVars.0.Lean.Elab.Term.reportStuckSyntheticMVars"); return x_1; } } static lean_object* _init_l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1___closed__1; x_2 = l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___closed__2; x_3 = lean_unsigned_to_nat(186u); 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); return x_6; } } lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { if (lean_obj_tag(x_1) == 0) { lean_object* x_10; lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_2); lean_ctor_set(x_10, 1, x_9); return x_10; } else { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_dec(x_2); x_11 = lean_ctor_get(x_1, 0); lean_inc(x_11); x_12 = lean_ctor_get(x_1, 1); lean_inc(x_12); lean_dec(x_1); x_18 = lean_ctor_get(x_11, 1); lean_inc(x_18); x_19 = lean_ctor_get(x_11, 2); lean_inc(x_19); x_20 = lean_ctor_get(x_7, 0); x_21 = lean_ctor_get(x_7, 1); x_22 = lean_ctor_get(x_7, 2); x_23 = lean_ctor_get(x_7, 3); x_24 = lean_ctor_get(x_7, 4); x_25 = lean_ctor_get(x_7, 5); x_26 = lean_ctor_get(x_7, 6); x_27 = lean_ctor_get(x_7, 7); x_28 = l_Lean_replaceRef(x_18, x_23); lean_dec(x_18); lean_inc(x_27); lean_inc(x_26); lean_inc(x_25); lean_inc(x_24); lean_inc(x_22); lean_inc(x_21); lean_inc(x_20); x_29 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_29, 0, x_20); lean_ctor_set(x_29, 1, x_21); lean_ctor_set(x_29, 2, x_22); lean_ctor_set(x_29, 3, x_28); lean_ctor_set(x_29, 4, x_24); lean_ctor_set(x_29, 5, x_25); lean_ctor_set(x_29, 6, x_26); lean_ctor_set(x_29, 7, x_27); switch (lean_obj_tag(x_19)) { case 0: { lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; x_30 = lean_ctor_get(x_11, 0); lean_inc(x_30); lean_dec(x_11); lean_inc(x_30); x_31 = lean_alloc_closure((void*)(l_Lean_Elab_Term_getMVarDecl___boxed), 8, 1); lean_closure_set(x_31, 0, x_30); x_32 = l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___closed__1; x_33 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Term_instMonadLogTermElabM___spec__2___rarg), 9, 2); lean_closure_set(x_33, 0, x_31); lean_closure_set(x_33, 1, x_32); lean_inc(x_8); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); x_34 = l_Lean_Meta_withMVarContext___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__4___rarg(x_30, x_33, x_3, x_4, x_5, x_6, x_29, x_8, x_9); if (lean_obj_tag(x_34) == 0) { lean_object* x_35; lean_object* x_36; x_35 = lean_ctor_get(x_34, 1); lean_inc(x_35); lean_dec(x_34); x_36 = l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1; x_13 = x_36; x_14 = x_35; goto block_17; } else { uint8_t x_37; lean_dec(x_12); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_37 = !lean_is_exclusive(x_34); if (x_37 == 0) { return x_34; } else { lean_object* x_38; lean_object* x_39; lean_object* x_40; x_38 = lean_ctor_get(x_34, 0); x_39 = lean_ctor_get(x_34, 1); lean_inc(x_39); lean_inc(x_38); lean_dec(x_34); 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; } } } case 1: { 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; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_dec(x_11); x_41 = lean_ctor_get(x_19, 0); lean_inc(x_41); x_42 = lean_ctor_get(x_19, 1); lean_inc(x_42); x_43 = lean_ctor_get(x_19, 2); lean_inc(x_43); x_44 = lean_ctor_get(x_19, 3); lean_inc(x_44); x_45 = lean_ctor_get(x_19, 4); lean_inc(x_45); x_46 = lean_ctor_get(x_19, 5); lean_inc(x_46); lean_dec(x_19); x_47 = l_Lean_Expr_appArg_x21(x_42); lean_dec(x_42); x_48 = l_Lean_Expr_mvarId_x21(x_47); lean_dec(x_47); lean_inc(x_48); x_49 = lean_alloc_closure((void*)(l_Lean_Elab_Term_getMVarDecl___boxed), 8, 1); lean_closure_set(x_49, 0, x_48); x_50 = lean_alloc_closure((void*)(l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__2___boxed), 13, 5); lean_closure_set(x_50, 0, x_41); lean_closure_set(x_50, 1, x_43); lean_closure_set(x_50, 2, x_44); lean_closure_set(x_50, 3, x_45); lean_closure_set(x_50, 4, x_46); x_51 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Term_instMonadLogTermElabM___spec__2___rarg), 9, 2); lean_closure_set(x_51, 0, x_49); lean_closure_set(x_51, 1, x_50); lean_inc(x_8); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); x_52 = l_Lean_Meta_withMVarContext___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__4___rarg(x_48, x_51, x_3, x_4, x_5, x_6, x_29, x_8, x_9); if (lean_obj_tag(x_52) == 0) { lean_object* x_53; lean_object* x_54; x_53 = lean_ctor_get(x_52, 1); lean_inc(x_53); lean_dec(x_52); x_54 = l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1; x_13 = x_54; x_14 = x_53; goto block_17; } else { uint8_t x_55; lean_dec(x_12); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_55 = !lean_is_exclusive(x_52); if (x_55 == 0) { return x_52; } else { lean_object* x_56; lean_object* x_57; lean_object* x_58; x_56 = lean_ctor_get(x_52, 0); x_57 = lean_ctor_get(x_52, 1); lean_inc(x_57); lean_inc(x_56); lean_dec(x_52); 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; } } } default: { lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_dec(x_19); lean_dec(x_11); x_59 = l_Lean_Elab_Term_getFVarLocalDecl_x21___closed__1; x_60 = l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___closed__3; x_61 = lean_panic_fn(x_59, x_60); lean_inc(x_8); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); x_62 = lean_apply_7(x_61, x_3, x_4, x_5, x_6, x_29, x_8, x_9); if (lean_obj_tag(x_62) == 0) { lean_object* x_63; lean_object* x_64; x_63 = lean_ctor_get(x_62, 1); lean_inc(x_63); lean_dec(x_62); x_64 = l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1; x_13 = x_64; x_14 = x_63; goto block_17; } else { uint8_t x_65; lean_dec(x_12); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_65 = !lean_is_exclusive(x_62); if (x_65 == 0) { return x_62; } else { lean_object* x_66; lean_object* x_67; lean_object* x_68; x_66 = lean_ctor_get(x_62, 0); x_67 = lean_ctor_get(x_62, 1); lean_inc(x_67); lean_inc(x_66); lean_dec(x_62); x_68 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_68, 0, x_66); lean_ctor_set(x_68, 1, x_67); return x_68; } } } } block_17: { lean_object* x_15; x_15 = lean_ctor_get(x_13, 0); lean_inc(x_15); lean_dec(x_13); x_1 = x_12; x_2 = x_15; x_9 = x_14; goto _start; } } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; x_8 = lean_st_ref_get(x_6, x_7); x_9 = lean_ctor_get(x_8, 1); lean_inc(x_9); lean_dec(x_8); x_10 = lean_st_ref_take(x_2, x_9); x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); x_12 = lean_ctor_get(x_10, 1); lean_inc(x_12); lean_dec(x_10); x_13 = !lean_is_exclusive(x_11); if (x_13 == 0) { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_14 = lean_ctor_get(x_11, 1); x_15 = lean_box(0); lean_ctor_set(x_11, 1, x_15); x_16 = lean_st_ref_set(x_2, x_11, x_12); x_17 = lean_ctor_get(x_16, 1); lean_inc(x_17); lean_dec(x_16); x_18 = lean_box(0); x_19 = l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1(x_14, x_18, x_1, x_2, x_3, x_4, x_5, x_6, x_17); if (lean_obj_tag(x_19) == 0) { uint8_t x_20; x_20 = !lean_is_exclusive(x_19); if (x_20 == 0) { lean_object* x_21; x_21 = lean_ctor_get(x_19, 0); lean_dec(x_21); lean_ctor_set(x_19, 0, x_18); return x_19; } else { lean_object* x_22; lean_object* x_23; x_22 = lean_ctor_get(x_19, 1); lean_inc(x_22); lean_dec(x_19); x_23 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_23, 0, x_18); lean_ctor_set(x_23, 1, x_22); return x_23; } } else { uint8_t x_24; x_24 = !lean_is_exclusive(x_19); if (x_24 == 0) { return x_19; } else { lean_object* x_25; lean_object* x_26; lean_object* x_27; x_25 = lean_ctor_get(x_19, 0); x_26 = lean_ctor_get(x_19, 1); lean_inc(x_26); lean_inc(x_25); lean_dec(x_19); x_27 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_27, 0, x_25); lean_ctor_set(x_27, 1, x_26); return x_27; } } } else { lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; x_28 = lean_ctor_get(x_11, 0); x_29 = lean_ctor_get(x_11, 1); x_30 = lean_ctor_get(x_11, 2); x_31 = lean_ctor_get(x_11, 3); x_32 = lean_ctor_get(x_11, 4); x_33 = lean_ctor_get(x_11, 5); lean_inc(x_33); lean_inc(x_32); lean_inc(x_31); lean_inc(x_30); lean_inc(x_29); lean_inc(x_28); lean_dec(x_11); x_34 = lean_box(0); x_35 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_35, 0, x_28); lean_ctor_set(x_35, 1, x_34); lean_ctor_set(x_35, 2, x_30); lean_ctor_set(x_35, 3, x_31); lean_ctor_set(x_35, 4, x_32); lean_ctor_set(x_35, 5, x_33); x_36 = lean_st_ref_set(x_2, x_35, x_12); x_37 = lean_ctor_get(x_36, 1); lean_inc(x_37); lean_dec(x_36); x_38 = lean_box(0); x_39 = l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1(x_29, x_38, x_1, x_2, x_3, x_4, x_5, x_6, x_37); if (lean_obj_tag(x_39) == 0) { lean_object* x_40; lean_object* x_41; lean_object* x_42; x_40 = lean_ctor_get(x_39, 1); lean_inc(x_40); if (lean_is_exclusive(x_39)) { lean_ctor_release(x_39, 0); lean_ctor_release(x_39, 1); x_41 = x_39; } else { lean_dec_ref(x_39); x_41 = lean_box(0); } if (lean_is_scalar(x_41)) { x_42 = lean_alloc_ctor(0, 2, 0); } else { x_42 = x_41; } lean_ctor_set(x_42, 0, x_38); lean_ctor_set(x_42, 1, x_40); return x_42; } else { lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; x_43 = lean_ctor_get(x_39, 0); lean_inc(x_43); x_44 = lean_ctor_get(x_39, 1); lean_inc(x_44); if (lean_is_exclusive(x_39)) { lean_ctor_release(x_39, 0); lean_ctor_release(x_39, 1); x_45 = x_39; } else { lean_dec_ref(x_39); x_45 = lean_box(0); } if (lean_is_scalar(x_45)) { x_46 = lean_alloc_ctor(1, 2, 0); } else { x_46 = x_45; } lean_ctor_set(x_46, 0, x_43); lean_ctor_set(x_46, 1, x_44); return x_46; } } } } lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; x_9 = l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__1(x_1, 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); return x_9; } } lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___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) { _start: { lean_object* x_14; x_14 = l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___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_dec(x_8); lean_dec(x_1); return x_14; } } lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { lean_object* x_10; x_10 = l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); lean_dec(x_7); return x_10; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___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___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars(x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_5); return x_8; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef_match__1___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___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef_match__1___rarg), 3, 0); return x_2; } } uint8_t l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___rarg___lambda__1(lean_object* x_1) { _start: { lean_object* x_2; uint8_t x_3; lean_object* x_4; x_2 = lean_ctor_get(x_1, 1); x_3 = 0; x_4 = l_Lean_Syntax_getPos_x3f(x_2, x_3); if (lean_obj_tag(x_4) == 0) { uint8_t x_5; x_5 = 0; return x_5; } else { uint8_t x_6; lean_dec(x_4); x_6 = 1; return x_6; } } } static lean_object* _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___rarg___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___rarg___lambda__1___boxed), 1, 0); return x_1; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; x_7 = lean_st_ref_get(x_5, x_6); x_8 = lean_ctor_get(x_7, 1); lean_inc(x_8); lean_dec(x_7); x_9 = lean_st_ref_get(x_1, x_8); x_10 = !lean_is_exclusive(x_9); if (x_10 == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_11 = lean_ctor_get(x_9, 0); x_12 = lean_ctor_get(x_11, 1); lean_inc(x_12); lean_dec(x_11); x_13 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___rarg___closed__1; x_14 = l_List_find_x3f___rarg(x_13, x_12); if (lean_obj_tag(x_14) == 0) { lean_object* x_15; x_15 = lean_box(0); lean_ctor_set(x_9, 0, x_15); return x_9; } else { lean_object* x_16; lean_object* x_17; x_16 = lean_ctor_get(x_14, 0); lean_inc(x_16); lean_dec(x_14); x_17 = lean_ctor_get(x_16, 1); lean_inc(x_17); lean_dec(x_16); lean_ctor_set(x_9, 0, x_17); return x_9; } } else { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; x_18 = lean_ctor_get(x_9, 0); x_19 = lean_ctor_get(x_9, 1); lean_inc(x_19); lean_inc(x_18); lean_dec(x_9); x_20 = lean_ctor_get(x_18, 1); lean_inc(x_20); lean_dec(x_18); x_21 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___rarg___closed__1; x_22 = l_List_find_x3f___rarg(x_21, x_20); if (lean_obj_tag(x_22) == 0) { lean_object* x_23; lean_object* x_24; x_23 = lean_box(0); x_24 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_19); return x_24; } else { lean_object* x_25; lean_object* x_26; lean_object* x_27; x_25 = lean_ctor_get(x_22, 0); lean_inc(x_25); lean_dec(x_22); x_26 = lean_ctor_get(x_25, 1); lean_inc(x_26); lean_dec(x_25); x_27 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_27, 0, x_26); lean_ctor_set(x_27, 1, x_19); return x_27; } } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___rarg___boxed), 6, 0); return x_2; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___rarg___lambda__1___boxed(lean_object* x_1) { _start: { uint8_t x_2; lean_object* x_3; x_2 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___rarg___lambda__1(x_1); lean_dec(x_1); x_3 = lean_box(x_2); return x_3; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; x_7 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___rarg(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_7; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___boxed(lean_object* x_1) { _start: { lean_object* x_2; x_2 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef(x_1); lean_dec(x_1); return x_2; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar_match__1___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)) { case 0: { lean_object* x_6; lean_object* x_7; lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_6 = lean_box(0); x_7 = lean_apply_1(x_2, x_6); return x_7; } case 1: { 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_dec(x_5); 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); x_12 = lean_ctor_get(x_1, 4); lean_inc(x_12); x_13 = lean_ctor_get(x_1, 5); lean_inc(x_13); lean_dec(x_1); x_14 = lean_apply_6(x_3, x_8, x_9, x_10, x_11, x_12, x_13); return x_14; } case 2: { lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); x_15 = lean_ctor_get(x_1, 0); lean_inc(x_15); x_16 = lean_ctor_get(x_1, 1); lean_inc(x_16); lean_dec(x_1); x_17 = lean_apply_2(x_5, x_15, x_16); return x_17; } default: { lean_object* x_18; lean_object* x_19; lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); x_18 = lean_ctor_get(x_1, 0); lean_inc(x_18); lean_dec(x_1); x_19 = lean_apply_1(x_4, x_18); return x_19; } } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar_match__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar_match__1___rarg), 5, 0); return x_2; } } lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVars_loop___lambda__1(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; lean_object* x_12; uint8_t x_13; x_11 = lean_unsigned_to_nat(1u); x_12 = lean_nat_add(x_1, x_11); x_13 = !lean_is_exclusive(x_8); if (x_13 == 0) { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; x_14 = lean_ctor_get(x_8, 1); lean_dec(x_14); lean_ctor_set(x_8, 1, x_12); x_15 = lean_st_ref_get(x_9, x_10); x_16 = lean_ctor_get(x_15, 1); lean_inc(x_16); lean_dec(x_15); x_17 = lean_st_ref_get(x_5, x_16); x_18 = !lean_is_exclusive(x_17); if (x_18 == 0) { lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; x_19 = lean_ctor_get(x_17, 0); x_20 = lean_ctor_get(x_17, 1); x_21 = lean_ctor_get(x_19, 1); lean_inc(x_21); lean_dec(x_19); x_22 = l_List_isEmpty___rarg(x_21); lean_dec(x_21); if (x_22 == 0) { uint8_t x_23; lean_object* x_24; lean_free_object(x_17); x_23 = 0; lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); x_24 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep(x_23, x_23, x_4, x_5, x_6, x_7, x_8, x_9, x_20); if (lean_obj_tag(x_24) == 0) { lean_object* x_25; uint8_t x_26; x_25 = lean_ctor_get(x_24, 0); lean_inc(x_25); x_26 = lean_unbox(x_25); lean_dec(x_25); if (x_26 == 0) { if (x_2 == 0) { lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; uint8_t x_33; uint8_t x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; uint8_t x_38; lean_object* x_39; uint8_t x_40; lean_object* x_41; x_27 = lean_ctor_get(x_24, 1); lean_inc(x_27); lean_dec(x_24); x_28 = lean_ctor_get(x_4, 0); lean_inc(x_28); x_29 = lean_ctor_get(x_4, 1); lean_inc(x_29); x_30 = lean_ctor_get(x_4, 2); lean_inc(x_30); x_31 = lean_ctor_get(x_4, 3); lean_inc(x_31); x_32 = lean_ctor_get(x_4, 4); lean_inc(x_32); x_33 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 1); x_34 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 2); x_35 = lean_ctor_get(x_4, 5); lean_inc(x_35); x_36 = lean_ctor_get(x_4, 6); lean_inc(x_36); x_37 = lean_ctor_get(x_4, 7); lean_inc(x_37); x_38 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 3); x_39 = lean_alloc_ctor(0, 8, 4); lean_ctor_set(x_39, 0, x_28); lean_ctor_set(x_39, 1, x_29); lean_ctor_set(x_39, 2, x_30); lean_ctor_set(x_39, 3, x_31); lean_ctor_set(x_39, 4, x_32); lean_ctor_set(x_39, 5, x_35); lean_ctor_set(x_39, 6, x_36); lean_ctor_set(x_39, 7, x_37); lean_ctor_set_uint8(x_39, sizeof(void*)*8, x_23); lean_ctor_set_uint8(x_39, sizeof(void*)*8 + 1, x_33); lean_ctor_set_uint8(x_39, sizeof(void*)*8 + 2, x_34); lean_ctor_set_uint8(x_39, sizeof(void*)*8 + 3, x_38); x_40 = 1; lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_39); x_41 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep(x_40, x_23, x_39, x_5, x_6, x_7, x_8, x_9, x_27); if (lean_obj_tag(x_41) == 0) { lean_object* x_42; uint8_t x_43; x_42 = lean_ctor_get(x_41, 0); lean_inc(x_42); x_43 = lean_unbox(x_42); lean_dec(x_42); if (x_43 == 0) { lean_object* x_44; lean_object* x_45; x_44 = lean_ctor_get(x_41, 1); lean_inc(x_44); lean_dec(x_41); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); x_45 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault(x_4, x_5, x_6, x_7, x_8, x_9, x_44); if (lean_obj_tag(x_45) == 0) { lean_object* x_46; uint8_t x_47; x_46 = lean_ctor_get(x_45, 0); lean_inc(x_46); x_47 = lean_unbox(x_46); lean_dec(x_46); if (x_47 == 0) { lean_object* x_48; lean_object* x_49; x_48 = lean_ctor_get(x_45, 1); lean_inc(x_48); lean_dec(x_45); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); x_49 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep(x_23, x_23, x_39, x_5, x_6, x_7, x_8, x_9, x_48); if (lean_obj_tag(x_49) == 0) { lean_object* x_50; uint8_t x_51; x_50 = lean_ctor_get(x_49, 0); lean_inc(x_50); x_51 = lean_unbox(x_50); lean_dec(x_50); if (x_51 == 0) { lean_object* x_52; lean_object* x_53; x_52 = lean_ctor_get(x_49, 1); lean_inc(x_52); lean_dec(x_49); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); x_53 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep(x_23, x_40, x_4, x_5, x_6, x_7, x_8, x_9, x_52); if (lean_obj_tag(x_53) == 0) { lean_object* x_54; uint8_t x_55; x_54 = lean_ctor_get(x_53, 0); lean_inc(x_54); x_55 = lean_unbox(x_54); lean_dec(x_54); if (x_55 == 0) { lean_object* x_56; lean_object* x_57; x_56 = lean_ctor_get(x_53, 1); lean_inc(x_56); lean_dec(x_53); x_57 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars(x_4, x_5, x_6, x_7, x_8, x_9, x_56); lean_dec(x_8); return x_57; } else { lean_object* x_58; lean_object* x_59; lean_object* x_60; x_58 = lean_ctor_get(x_53, 1); lean_inc(x_58); lean_dec(x_53); x_59 = lean_box(0); x_60 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_2, x_59, x_4, x_5, x_6, x_7, x_8, x_9, x_58); return x_60; } } else { uint8_t x_61; lean_dec(x_8); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_61 = !lean_is_exclusive(x_53); if (x_61 == 0) { return x_53; } else { lean_object* x_62; lean_object* x_63; lean_object* x_64; x_62 = lean_ctor_get(x_53, 0); x_63 = lean_ctor_get(x_53, 1); lean_inc(x_63); lean_inc(x_62); lean_dec(x_53); x_64 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_64, 0, x_62); lean_ctor_set(x_64, 1, x_63); return x_64; } } } else { lean_object* x_65; lean_object* x_66; lean_object* x_67; x_65 = lean_ctor_get(x_49, 1); lean_inc(x_65); lean_dec(x_49); x_66 = lean_box(0); x_67 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_2, x_66, x_4, x_5, x_6, x_7, x_8, x_9, x_65); return x_67; } } else { uint8_t x_68; lean_dec(x_8); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_68 = !lean_is_exclusive(x_49); if (x_68 == 0) { return x_49; } else { lean_object* x_69; lean_object* x_70; lean_object* x_71; x_69 = lean_ctor_get(x_49, 0); x_70 = lean_ctor_get(x_49, 1); lean_inc(x_70); lean_inc(x_69); lean_dec(x_49); x_71 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_71, 0, x_69); lean_ctor_set(x_71, 1, x_70); return x_71; } } } else { lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_dec(x_39); x_72 = lean_ctor_get(x_45, 1); lean_inc(x_72); lean_dec(x_45); x_73 = lean_box(0); x_74 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_2, x_73, x_4, x_5, x_6, x_7, x_8, x_9, x_72); return x_74; } } else { uint8_t x_75; lean_dec(x_39); lean_dec(x_8); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_75 = !lean_is_exclusive(x_45); if (x_75 == 0) { return x_45; } else { lean_object* x_76; lean_object* x_77; lean_object* x_78; x_76 = lean_ctor_get(x_45, 0); x_77 = lean_ctor_get(x_45, 1); lean_inc(x_77); lean_inc(x_76); lean_dec(x_45); x_78 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_78, 0, x_76); lean_ctor_set(x_78, 1, x_77); return x_78; } } } else { lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_dec(x_39); x_79 = lean_ctor_get(x_41, 1); lean_inc(x_79); lean_dec(x_41); x_80 = lean_box(0); x_81 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_2, x_80, x_4, x_5, x_6, x_7, x_8, x_9, x_79); return x_81; } } else { uint8_t x_82; lean_dec(x_39); lean_dec(x_8); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_82 = !lean_is_exclusive(x_41); if (x_82 == 0) { return x_41; } else { lean_object* x_83; lean_object* x_84; lean_object* x_85; x_83 = lean_ctor_get(x_41, 0); x_84 = lean_ctor_get(x_41, 1); lean_inc(x_84); lean_inc(x_83); lean_dec(x_41); x_85 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_85, 0, x_83); lean_ctor_set(x_85, 1, x_84); return x_85; } } } else { uint8_t x_86; lean_dec(x_8); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_86 = !lean_is_exclusive(x_24); if (x_86 == 0) { lean_object* x_87; lean_object* x_88; x_87 = lean_ctor_get(x_24, 0); lean_dec(x_87); x_88 = lean_box(0); lean_ctor_set(x_24, 0, x_88); return x_24; } else { lean_object* x_89; lean_object* x_90; lean_object* x_91; x_89 = lean_ctor_get(x_24, 1); lean_inc(x_89); lean_dec(x_24); x_90 = lean_box(0); x_91 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_91, 0, x_90); lean_ctor_set(x_91, 1, x_89); return x_91; } } } else { lean_object* x_92; lean_object* x_93; lean_object* x_94; x_92 = lean_ctor_get(x_24, 1); lean_inc(x_92); lean_dec(x_24); x_93 = lean_box(0); x_94 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_2, x_93, x_4, x_5, x_6, x_7, x_8, x_9, x_92); return x_94; } } else { uint8_t x_95; lean_dec(x_8); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_95 = !lean_is_exclusive(x_24); if (x_95 == 0) { return x_24; } else { lean_object* x_96; lean_object* x_97; lean_object* x_98; x_96 = lean_ctor_get(x_24, 0); x_97 = lean_ctor_get(x_24, 1); lean_inc(x_97); lean_inc(x_96); lean_dec(x_24); x_98 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_98, 0, x_96); lean_ctor_set(x_98, 1, x_97); return x_98; } } } else { lean_object* x_99; lean_dec(x_8); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_99 = lean_box(0); lean_ctor_set(x_17, 0, x_99); return x_17; } } else { lean_object* x_100; lean_object* x_101; lean_object* x_102; uint8_t x_103; x_100 = lean_ctor_get(x_17, 0); x_101 = lean_ctor_get(x_17, 1); lean_inc(x_101); lean_inc(x_100); lean_dec(x_17); x_102 = lean_ctor_get(x_100, 1); lean_inc(x_102); lean_dec(x_100); x_103 = l_List_isEmpty___rarg(x_102); lean_dec(x_102); if (x_103 == 0) { uint8_t x_104; lean_object* x_105; x_104 = 0; lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); x_105 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep(x_104, x_104, x_4, x_5, x_6, x_7, x_8, x_9, x_101); if (lean_obj_tag(x_105) == 0) { lean_object* x_106; uint8_t x_107; x_106 = lean_ctor_get(x_105, 0); lean_inc(x_106); x_107 = lean_unbox(x_106); lean_dec(x_106); if (x_107 == 0) { if (x_2 == 0) { lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; uint8_t x_114; uint8_t x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; uint8_t x_119; lean_object* x_120; uint8_t x_121; lean_object* x_122; x_108 = lean_ctor_get(x_105, 1); lean_inc(x_108); lean_dec(x_105); x_109 = lean_ctor_get(x_4, 0); lean_inc(x_109); x_110 = lean_ctor_get(x_4, 1); lean_inc(x_110); x_111 = lean_ctor_get(x_4, 2); lean_inc(x_111); x_112 = lean_ctor_get(x_4, 3); lean_inc(x_112); x_113 = lean_ctor_get(x_4, 4); lean_inc(x_113); x_114 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 1); x_115 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 2); x_116 = lean_ctor_get(x_4, 5); lean_inc(x_116); x_117 = lean_ctor_get(x_4, 6); lean_inc(x_117); x_118 = lean_ctor_get(x_4, 7); lean_inc(x_118); x_119 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 3); x_120 = lean_alloc_ctor(0, 8, 4); lean_ctor_set(x_120, 0, x_109); lean_ctor_set(x_120, 1, x_110); lean_ctor_set(x_120, 2, x_111); lean_ctor_set(x_120, 3, x_112); lean_ctor_set(x_120, 4, x_113); lean_ctor_set(x_120, 5, x_116); lean_ctor_set(x_120, 6, x_117); lean_ctor_set(x_120, 7, x_118); lean_ctor_set_uint8(x_120, sizeof(void*)*8, x_104); lean_ctor_set_uint8(x_120, sizeof(void*)*8 + 1, x_114); lean_ctor_set_uint8(x_120, sizeof(void*)*8 + 2, x_115); lean_ctor_set_uint8(x_120, sizeof(void*)*8 + 3, x_119); x_121 = 1; lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_120); x_122 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep(x_121, x_104, x_120, x_5, x_6, x_7, x_8, x_9, x_108); if (lean_obj_tag(x_122) == 0) { lean_object* x_123; uint8_t x_124; x_123 = lean_ctor_get(x_122, 0); lean_inc(x_123); x_124 = lean_unbox(x_123); lean_dec(x_123); if (x_124 == 0) { lean_object* x_125; lean_object* x_126; x_125 = lean_ctor_get(x_122, 1); lean_inc(x_125); lean_dec(x_122); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); x_126 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault(x_4, x_5, x_6, x_7, x_8, x_9, x_125); if (lean_obj_tag(x_126) == 0) { lean_object* x_127; uint8_t x_128; x_127 = lean_ctor_get(x_126, 0); lean_inc(x_127); x_128 = lean_unbox(x_127); lean_dec(x_127); if (x_128 == 0) { lean_object* x_129; lean_object* x_130; x_129 = lean_ctor_get(x_126, 1); lean_inc(x_129); lean_dec(x_126); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); x_130 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep(x_104, x_104, x_120, x_5, x_6, x_7, x_8, x_9, x_129); if (lean_obj_tag(x_130) == 0) { lean_object* x_131; uint8_t x_132; x_131 = lean_ctor_get(x_130, 0); lean_inc(x_131); x_132 = lean_unbox(x_131); lean_dec(x_131); if (x_132 == 0) { lean_object* x_133; lean_object* x_134; x_133 = lean_ctor_get(x_130, 1); lean_inc(x_133); lean_dec(x_130); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); x_134 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep(x_104, x_121, x_4, x_5, x_6, x_7, x_8, x_9, x_133); if (lean_obj_tag(x_134) == 0) { lean_object* x_135; uint8_t x_136; x_135 = lean_ctor_get(x_134, 0); lean_inc(x_135); x_136 = lean_unbox(x_135); lean_dec(x_135); if (x_136 == 0) { lean_object* x_137; lean_object* x_138; x_137 = lean_ctor_get(x_134, 1); lean_inc(x_137); lean_dec(x_134); x_138 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars(x_4, x_5, x_6, x_7, x_8, x_9, x_137); lean_dec(x_8); return x_138; } else { lean_object* x_139; lean_object* x_140; lean_object* x_141; x_139 = lean_ctor_get(x_134, 1); lean_inc(x_139); lean_dec(x_134); x_140 = lean_box(0); x_141 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_2, x_140, x_4, x_5, x_6, x_7, x_8, x_9, x_139); return x_141; } } else { lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_dec(x_8); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_142 = lean_ctor_get(x_134, 0); lean_inc(x_142); x_143 = lean_ctor_get(x_134, 1); lean_inc(x_143); if (lean_is_exclusive(x_134)) { lean_ctor_release(x_134, 0); lean_ctor_release(x_134, 1); x_144 = x_134; } else { lean_dec_ref(x_134); x_144 = lean_box(0); } if (lean_is_scalar(x_144)) { x_145 = lean_alloc_ctor(1, 2, 0); } else { x_145 = x_144; } lean_ctor_set(x_145, 0, x_142); lean_ctor_set(x_145, 1, x_143); return x_145; } } else { lean_object* x_146; lean_object* x_147; lean_object* x_148; x_146 = lean_ctor_get(x_130, 1); lean_inc(x_146); lean_dec(x_130); x_147 = lean_box(0); x_148 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_2, x_147, x_4, x_5, x_6, x_7, x_8, x_9, x_146); return x_148; } } else { lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_dec(x_8); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_149 = lean_ctor_get(x_130, 0); lean_inc(x_149); x_150 = lean_ctor_get(x_130, 1); lean_inc(x_150); if (lean_is_exclusive(x_130)) { lean_ctor_release(x_130, 0); lean_ctor_release(x_130, 1); x_151 = x_130; } else { lean_dec_ref(x_130); x_151 = lean_box(0); } if (lean_is_scalar(x_151)) { x_152 = lean_alloc_ctor(1, 2, 0); } else { x_152 = x_151; } lean_ctor_set(x_152, 0, x_149); lean_ctor_set(x_152, 1, x_150); return x_152; } } else { lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_dec(x_120); x_153 = lean_ctor_get(x_126, 1); lean_inc(x_153); lean_dec(x_126); x_154 = lean_box(0); x_155 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_2, x_154, x_4, x_5, x_6, x_7, x_8, x_9, x_153); return x_155; } } else { lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_dec(x_120); lean_dec(x_8); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_156 = lean_ctor_get(x_126, 0); lean_inc(x_156); x_157 = lean_ctor_get(x_126, 1); lean_inc(x_157); if (lean_is_exclusive(x_126)) { lean_ctor_release(x_126, 0); lean_ctor_release(x_126, 1); x_158 = x_126; } else { lean_dec_ref(x_126); x_158 = lean_box(0); } if (lean_is_scalar(x_158)) { x_159 = lean_alloc_ctor(1, 2, 0); } else { x_159 = x_158; } lean_ctor_set(x_159, 0, x_156); lean_ctor_set(x_159, 1, x_157); return x_159; } } else { lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_dec(x_120); x_160 = lean_ctor_get(x_122, 1); lean_inc(x_160); lean_dec(x_122); x_161 = lean_box(0); x_162 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_2, x_161, x_4, x_5, x_6, x_7, x_8, x_9, x_160); return x_162; } } else { lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_dec(x_120); lean_dec(x_8); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_163 = lean_ctor_get(x_122, 0); lean_inc(x_163); x_164 = lean_ctor_get(x_122, 1); lean_inc(x_164); if (lean_is_exclusive(x_122)) { lean_ctor_release(x_122, 0); lean_ctor_release(x_122, 1); x_165 = x_122; } else { lean_dec_ref(x_122); x_165 = lean_box(0); } if (lean_is_scalar(x_165)) { x_166 = lean_alloc_ctor(1, 2, 0); } else { x_166 = x_165; } lean_ctor_set(x_166, 0, x_163); lean_ctor_set(x_166, 1, x_164); return x_166; } } else { lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_dec(x_8); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_167 = lean_ctor_get(x_105, 1); lean_inc(x_167); if (lean_is_exclusive(x_105)) { lean_ctor_release(x_105, 0); lean_ctor_release(x_105, 1); x_168 = x_105; } else { lean_dec_ref(x_105); x_168 = lean_box(0); } x_169 = lean_box(0); if (lean_is_scalar(x_168)) { x_170 = lean_alloc_ctor(0, 2, 0); } else { x_170 = x_168; } lean_ctor_set(x_170, 0, x_169); lean_ctor_set(x_170, 1, x_167); return x_170; } } else { lean_object* x_171; lean_object* x_172; lean_object* x_173; x_171 = lean_ctor_get(x_105, 1); lean_inc(x_171); lean_dec(x_105); x_172 = lean_box(0); x_173 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_2, x_172, x_4, x_5, x_6, x_7, x_8, x_9, x_171); return x_173; } } else { lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_dec(x_8); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_174 = lean_ctor_get(x_105, 0); lean_inc(x_174); x_175 = lean_ctor_get(x_105, 1); lean_inc(x_175); if (lean_is_exclusive(x_105)) { lean_ctor_release(x_105, 0); lean_ctor_release(x_105, 1); x_176 = x_105; } else { lean_dec_ref(x_105); x_176 = lean_box(0); } if (lean_is_scalar(x_176)) { x_177 = lean_alloc_ctor(1, 2, 0); } else { x_177 = x_176; } lean_ctor_set(x_177, 0, x_174); lean_ctor_set(x_177, 1, x_175); return x_177; } } else { lean_object* x_178; lean_object* x_179; lean_dec(x_8); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_178 = lean_box(0); x_179 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_179, 0, x_178); lean_ctor_set(x_179, 1, x_101); return x_179; } } } else { lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; 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; lean_object* x_193; lean_object* x_194; uint8_t x_195; x_180 = lean_ctor_get(x_8, 0); x_181 = lean_ctor_get(x_8, 2); x_182 = lean_ctor_get(x_8, 3); x_183 = lean_ctor_get(x_8, 4); x_184 = lean_ctor_get(x_8, 5); x_185 = lean_ctor_get(x_8, 6); x_186 = lean_ctor_get(x_8, 7); lean_inc(x_186); lean_inc(x_185); lean_inc(x_184); lean_inc(x_183); lean_inc(x_182); lean_inc(x_181); lean_inc(x_180); lean_dec(x_8); x_187 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_187, 0, x_180); lean_ctor_set(x_187, 1, x_12); lean_ctor_set(x_187, 2, x_181); lean_ctor_set(x_187, 3, x_182); lean_ctor_set(x_187, 4, x_183); lean_ctor_set(x_187, 5, x_184); lean_ctor_set(x_187, 6, x_185); lean_ctor_set(x_187, 7, x_186); x_188 = lean_st_ref_get(x_9, x_10); x_189 = lean_ctor_get(x_188, 1); lean_inc(x_189); lean_dec(x_188); x_190 = lean_st_ref_get(x_5, x_189); x_191 = lean_ctor_get(x_190, 0); lean_inc(x_191); x_192 = lean_ctor_get(x_190, 1); lean_inc(x_192); if (lean_is_exclusive(x_190)) { lean_ctor_release(x_190, 0); lean_ctor_release(x_190, 1); x_193 = x_190; } else { lean_dec_ref(x_190); x_193 = lean_box(0); } x_194 = lean_ctor_get(x_191, 1); lean_inc(x_194); lean_dec(x_191); x_195 = l_List_isEmpty___rarg(x_194); lean_dec(x_194); if (x_195 == 0) { uint8_t x_196; lean_object* x_197; lean_dec(x_193); x_196 = 0; lean_inc(x_9); lean_inc(x_187); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); x_197 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep(x_196, x_196, x_4, x_5, x_6, x_7, x_187, x_9, x_192); if (lean_obj_tag(x_197) == 0) { lean_object* x_198; uint8_t x_199; x_198 = lean_ctor_get(x_197, 0); lean_inc(x_198); x_199 = lean_unbox(x_198); lean_dec(x_198); if (x_199 == 0) { if (x_2 == 0) { lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; uint8_t x_206; uint8_t x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; uint8_t x_211; lean_object* x_212; uint8_t x_213; lean_object* x_214; x_200 = lean_ctor_get(x_197, 1); lean_inc(x_200); lean_dec(x_197); x_201 = lean_ctor_get(x_4, 0); lean_inc(x_201); x_202 = lean_ctor_get(x_4, 1); lean_inc(x_202); x_203 = lean_ctor_get(x_4, 2); lean_inc(x_203); x_204 = lean_ctor_get(x_4, 3); lean_inc(x_204); x_205 = lean_ctor_get(x_4, 4); lean_inc(x_205); x_206 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 1); x_207 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 2); x_208 = lean_ctor_get(x_4, 5); lean_inc(x_208); x_209 = lean_ctor_get(x_4, 6); lean_inc(x_209); x_210 = lean_ctor_get(x_4, 7); lean_inc(x_210); x_211 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 3); x_212 = lean_alloc_ctor(0, 8, 4); lean_ctor_set(x_212, 0, x_201); lean_ctor_set(x_212, 1, x_202); lean_ctor_set(x_212, 2, x_203); lean_ctor_set(x_212, 3, x_204); lean_ctor_set(x_212, 4, x_205); lean_ctor_set(x_212, 5, x_208); lean_ctor_set(x_212, 6, x_209); lean_ctor_set(x_212, 7, x_210); lean_ctor_set_uint8(x_212, sizeof(void*)*8, x_196); lean_ctor_set_uint8(x_212, sizeof(void*)*8 + 1, x_206); lean_ctor_set_uint8(x_212, sizeof(void*)*8 + 2, x_207); lean_ctor_set_uint8(x_212, sizeof(void*)*8 + 3, x_211); x_213 = 1; lean_inc(x_9); lean_inc(x_187); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_212); x_214 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep(x_213, x_196, x_212, x_5, x_6, x_7, x_187, x_9, x_200); if (lean_obj_tag(x_214) == 0) { lean_object* x_215; uint8_t x_216; x_215 = lean_ctor_get(x_214, 0); lean_inc(x_215); x_216 = lean_unbox(x_215); lean_dec(x_215); if (x_216 == 0) { lean_object* x_217; lean_object* x_218; x_217 = lean_ctor_get(x_214, 1); lean_inc(x_217); lean_dec(x_214); lean_inc(x_9); lean_inc(x_187); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); x_218 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault(x_4, x_5, x_6, x_7, x_187, x_9, x_217); if (lean_obj_tag(x_218) == 0) { lean_object* x_219; uint8_t x_220; x_219 = lean_ctor_get(x_218, 0); lean_inc(x_219); x_220 = lean_unbox(x_219); lean_dec(x_219); if (x_220 == 0) { lean_object* x_221; lean_object* x_222; x_221 = lean_ctor_get(x_218, 1); lean_inc(x_221); lean_dec(x_218); lean_inc(x_9); lean_inc(x_187); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); x_222 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep(x_196, x_196, x_212, x_5, x_6, x_7, x_187, x_9, x_221); if (lean_obj_tag(x_222) == 0) { lean_object* x_223; uint8_t x_224; x_223 = lean_ctor_get(x_222, 0); lean_inc(x_223); x_224 = lean_unbox(x_223); lean_dec(x_223); if (x_224 == 0) { lean_object* x_225; lean_object* x_226; x_225 = lean_ctor_get(x_222, 1); lean_inc(x_225); lean_dec(x_222); lean_inc(x_9); lean_inc(x_187); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); x_226 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep(x_196, x_213, x_4, x_5, x_6, x_7, x_187, x_9, x_225); if (lean_obj_tag(x_226) == 0) { lean_object* x_227; uint8_t x_228; x_227 = lean_ctor_get(x_226, 0); lean_inc(x_227); x_228 = lean_unbox(x_227); lean_dec(x_227); if (x_228 == 0) { lean_object* x_229; lean_object* x_230; x_229 = lean_ctor_get(x_226, 1); lean_inc(x_229); lean_dec(x_226); x_230 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars(x_4, x_5, x_6, x_7, x_187, x_9, x_229); lean_dec(x_187); return x_230; } else { lean_object* x_231; lean_object* x_232; lean_object* x_233; x_231 = lean_ctor_get(x_226, 1); lean_inc(x_231); lean_dec(x_226); x_232 = lean_box(0); x_233 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_2, x_232, x_4, x_5, x_6, x_7, x_187, x_9, x_231); return x_233; } } else { lean_object* x_234; lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_dec(x_187); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_234 = lean_ctor_get(x_226, 0); lean_inc(x_234); x_235 = lean_ctor_get(x_226, 1); lean_inc(x_235); if (lean_is_exclusive(x_226)) { lean_ctor_release(x_226, 0); lean_ctor_release(x_226, 1); x_236 = x_226; } else { lean_dec_ref(x_226); x_236 = lean_box(0); } if (lean_is_scalar(x_236)) { x_237 = lean_alloc_ctor(1, 2, 0); } else { x_237 = x_236; } lean_ctor_set(x_237, 0, x_234); lean_ctor_set(x_237, 1, x_235); return x_237; } } else { lean_object* x_238; lean_object* x_239; lean_object* x_240; x_238 = lean_ctor_get(x_222, 1); lean_inc(x_238); lean_dec(x_222); x_239 = lean_box(0); x_240 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_2, x_239, x_4, x_5, x_6, x_7, x_187, x_9, x_238); return x_240; } } else { lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_dec(x_187); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_241 = lean_ctor_get(x_222, 0); lean_inc(x_241); x_242 = lean_ctor_get(x_222, 1); lean_inc(x_242); if (lean_is_exclusive(x_222)) { lean_ctor_release(x_222, 0); lean_ctor_release(x_222, 1); x_243 = x_222; } else { lean_dec_ref(x_222); x_243 = lean_box(0); } if (lean_is_scalar(x_243)) { x_244 = lean_alloc_ctor(1, 2, 0); } else { x_244 = x_243; } lean_ctor_set(x_244, 0, x_241); lean_ctor_set(x_244, 1, x_242); return x_244; } } else { lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_dec(x_212); x_245 = lean_ctor_get(x_218, 1); lean_inc(x_245); lean_dec(x_218); x_246 = lean_box(0); x_247 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_2, x_246, x_4, x_5, x_6, x_7, x_187, x_9, x_245); return x_247; } } else { lean_object* x_248; lean_object* x_249; lean_object* x_250; lean_object* x_251; lean_dec(x_212); lean_dec(x_187); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_248 = lean_ctor_get(x_218, 0); lean_inc(x_248); x_249 = lean_ctor_get(x_218, 1); lean_inc(x_249); if (lean_is_exclusive(x_218)) { lean_ctor_release(x_218, 0); lean_ctor_release(x_218, 1); x_250 = x_218; } else { lean_dec_ref(x_218); x_250 = lean_box(0); } if (lean_is_scalar(x_250)) { x_251 = lean_alloc_ctor(1, 2, 0); } else { x_251 = x_250; } lean_ctor_set(x_251, 0, x_248); lean_ctor_set(x_251, 1, x_249); return x_251; } } else { lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_dec(x_212); x_252 = lean_ctor_get(x_214, 1); lean_inc(x_252); lean_dec(x_214); x_253 = lean_box(0); x_254 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_2, x_253, x_4, x_5, x_6, x_7, x_187, x_9, x_252); return x_254; } } else { lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; lean_dec(x_212); lean_dec(x_187); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_255 = lean_ctor_get(x_214, 0); lean_inc(x_255); x_256 = lean_ctor_get(x_214, 1); lean_inc(x_256); if (lean_is_exclusive(x_214)) { lean_ctor_release(x_214, 0); lean_ctor_release(x_214, 1); x_257 = x_214; } else { lean_dec_ref(x_214); x_257 = lean_box(0); } if (lean_is_scalar(x_257)) { x_258 = lean_alloc_ctor(1, 2, 0); } else { x_258 = x_257; } lean_ctor_set(x_258, 0, x_255); lean_ctor_set(x_258, 1, x_256); return x_258; } } else { lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; lean_dec(x_187); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_259 = lean_ctor_get(x_197, 1); lean_inc(x_259); if (lean_is_exclusive(x_197)) { lean_ctor_release(x_197, 0); lean_ctor_release(x_197, 1); x_260 = x_197; } else { lean_dec_ref(x_197); x_260 = lean_box(0); } x_261 = lean_box(0); if (lean_is_scalar(x_260)) { x_262 = lean_alloc_ctor(0, 2, 0); } else { x_262 = x_260; } lean_ctor_set(x_262, 0, x_261); lean_ctor_set(x_262, 1, x_259); return x_262; } } else { lean_object* x_263; lean_object* x_264; lean_object* x_265; x_263 = lean_ctor_get(x_197, 1); lean_inc(x_263); lean_dec(x_197); x_264 = lean_box(0); x_265 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_2, x_264, x_4, x_5, x_6, x_7, x_187, x_9, x_263); return x_265; } } else { lean_object* x_266; lean_object* x_267; lean_object* x_268; lean_object* x_269; lean_dec(x_187); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_266 = lean_ctor_get(x_197, 0); lean_inc(x_266); x_267 = lean_ctor_get(x_197, 1); lean_inc(x_267); if (lean_is_exclusive(x_197)) { lean_ctor_release(x_197, 0); lean_ctor_release(x_197, 1); x_268 = x_197; } else { lean_dec_ref(x_197); x_268 = lean_box(0); } if (lean_is_scalar(x_268)) { x_269 = lean_alloc_ctor(1, 2, 0); } else { x_269 = x_268; } lean_ctor_set(x_269, 0, x_266); lean_ctor_set(x_269, 1, x_267); return x_269; } } else { lean_object* x_270; lean_object* x_271; lean_dec(x_187); lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_270 = lean_box(0); if (lean_is_scalar(x_193)) { x_271 = lean_alloc_ctor(0, 2, 0); } else { x_271 = x_193; } lean_ctor_set(x_271, 0, x_270); lean_ctor_set(x_271, 1, x_192); return x_271; } } } } lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(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* x_8, lean_object* x_9) { _start: { lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; x_10 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___rarg(x_4, x_5, x_6, x_7, x_8, x_9); x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); x_12 = lean_ctor_get(x_10, 1); lean_inc(x_12); lean_dec(x_10); x_13 = !lean_is_exclusive(x_7); if (x_13 == 0) { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; x_14 = lean_ctor_get(x_7, 1); x_15 = lean_ctor_get(x_7, 2); x_16 = lean_ctor_get(x_7, 3); x_17 = l_Lean_replaceRef(x_11, x_16); lean_dec(x_16); lean_dec(x_11); lean_inc(x_15); lean_inc(x_14); lean_ctor_set(x_7, 3, x_17); x_18 = lean_nat_dec_eq(x_14, x_15); lean_dec(x_15); if (x_18 == 0) { lean_object* x_19; lean_object* x_20; x_19 = lean_box(0); x_20 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop___lambda__1(x_14, x_1, x_19, x_3, x_4, x_5, x_6, x_7, x_8, x_12); lean_dec(x_14); return x_20; } else { lean_object* x_21; lean_object* x_22; uint8_t x_23; lean_dec(x_14); x_21 = l_Lean_withIncRecDepth___rarg___lambda__2___closed__2; x_22 = l_Lean_throwError___at___private_Lean_Elab_Term_0__Lean_Elab_Term_applyAttributesCore___spec__1(x_21, x_3, x_4, x_5, x_6, x_7, x_8, x_12); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_23 = !lean_is_exclusive(x_22); if (x_23 == 0) { return x_22; } else { lean_object* x_24; lean_object* x_25; lean_object* x_26; x_24 = lean_ctor_get(x_22, 0); x_25 = lean_ctor_get(x_22, 1); lean_inc(x_25); lean_inc(x_24); lean_dec(x_22); x_26 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_26, 0, x_24); lean_ctor_set(x_26, 1, x_25); return x_26; } } } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; uint8_t x_37; x_27 = lean_ctor_get(x_7, 0); x_28 = lean_ctor_get(x_7, 1); x_29 = lean_ctor_get(x_7, 2); x_30 = lean_ctor_get(x_7, 3); x_31 = lean_ctor_get(x_7, 4); x_32 = lean_ctor_get(x_7, 5); x_33 = lean_ctor_get(x_7, 6); x_34 = lean_ctor_get(x_7, 7); lean_inc(x_34); lean_inc(x_33); lean_inc(x_32); lean_inc(x_31); lean_inc(x_30); lean_inc(x_29); lean_inc(x_28); lean_inc(x_27); lean_dec(x_7); x_35 = l_Lean_replaceRef(x_11, x_30); lean_dec(x_30); lean_dec(x_11); lean_inc(x_29); lean_inc(x_28); x_36 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_36, 0, x_27); lean_ctor_set(x_36, 1, x_28); lean_ctor_set(x_36, 2, x_29); lean_ctor_set(x_36, 3, x_35); lean_ctor_set(x_36, 4, x_31); lean_ctor_set(x_36, 5, x_32); lean_ctor_set(x_36, 6, x_33); lean_ctor_set(x_36, 7, x_34); x_37 = lean_nat_dec_eq(x_28, x_29); lean_dec(x_29); if (x_37 == 0) { lean_object* x_38; lean_object* x_39; x_38 = lean_box(0); x_39 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop___lambda__1(x_28, x_1, x_38, x_3, x_4, x_5, x_6, x_36, x_8, x_12); lean_dec(x_28); return x_39; } else { lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_dec(x_28); x_40 = l_Lean_withIncRecDepth___rarg___lambda__2___closed__2; x_41 = l_Lean_throwError___at___private_Lean_Elab_Term_0__Lean_Elab_Term_applyAttributesCore___spec__1(x_40, x_3, x_4, x_5, x_6, x_36, x_8, x_12); lean_dec(x_8); lean_dec(x_36); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); x_42 = lean_ctor_get(x_41, 0); lean_inc(x_42); x_43 = lean_ctor_get(x_41, 1); lean_inc(x_43); if (lean_is_exclusive(x_41)) { lean_ctor_release(x_41, 0); lean_ctor_release(x_41, 1); x_44 = x_41; } else { lean_dec_ref(x_41); x_44 = lean_box(0); } if (lean_is_scalar(x_44)) { x_45 = lean_alloc_ctor(1, 2, 0); } else { x_45 = x_44; } lean_ctor_set(x_45, 0, x_42); lean_ctor_set(x_45, 1, x_43); return x_45; } } } } lean_object* l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; x_9 = l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(x_1, x_4, x_5, x_6, x_7, x_8); return x_9; } } static lean_object* _init_l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("not ready yet"); return x_1; } } static lean_object* _init_l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__2() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__1; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__3() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__2; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__4() { _start: { lean_object* x_1; x_1 = lean_mk_string("succeeded"); return x_1; } } static lean_object* _init_l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__5() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__4; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__6() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__5; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } static lean_object* _init_l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__7() { _start: { lean_object* x_1; x_1 = lean_mk_string("resuming "); return x_1; } } static lean_object* _init_l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__8() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__7; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } lean_object* l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1(uint8_t x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { if (lean_obj_tag(x_4) == 0) { lean_object* x_13; lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_3); x_13 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_13, 0, x_5); lean_ctor_set(x_13, 1, x_12); return x_13; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; lean_object* x_18; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; uint8_t x_71; x_14 = lean_ctor_get(x_4, 0); lean_inc(x_14); x_15 = lean_ctor_get(x_4, 1); lean_inc(x_15); if (lean_is_exclusive(x_4)) { lean_ctor_release(x_4, 0); lean_ctor_release(x_4, 1); x_16 = x_4; } else { lean_dec_ref(x_4); x_16 = lean_box(0); } x_23 = l_Lean_Elab_initFn____x40_Lean_Elab_Exception___hyg_3____closed__1; lean_inc(x_3); x_24 = lean_name_mk_string(x_3, x_23); x_60 = lean_ctor_get(x_14, 0); lean_inc(x_60); lean_inc(x_60); x_61 = l_Lean_mkMVar(x_60); x_62 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_62, 0, x_61); x_63 = l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__8; x_64 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_64, 0, x_63); lean_ctor_set(x_64, 1, x_62); x_65 = l_Lean_KernelException_toMessageData___closed__15; x_66 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_66, 0, x_64); lean_ctor_set(x_66, 1, x_65); x_67 = lean_alloc_closure((void*)(l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___lambda__1___boxed), 8, 1); lean_closure_set(x_67, 0, x_66); x_68 = lean_st_ref_get(x_11, x_12); x_69 = lean_ctor_get(x_68, 0); lean_inc(x_69); x_70 = lean_ctor_get(x_69, 3); lean_inc(x_70); lean_dec(x_69); x_71 = lean_ctor_get_uint8(x_70, sizeof(void*)*1); lean_dec(x_70); if (x_71 == 0) { lean_object* x_72; lean_dec(x_67); lean_dec(x_60); x_72 = lean_ctor_get(x_68, 1); lean_inc(x_72); lean_dec(x_68); x_25 = x_72; goto block_59; } else { lean_object* x_73; lean_object* x_74; lean_object* x_75; uint8_t x_76; x_73 = lean_ctor_get(x_68, 1); lean_inc(x_73); lean_dec(x_68); lean_inc(x_24); x_74 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_24, x_6, x_7, x_8, x_9, x_10, x_11, x_73); x_75 = lean_ctor_get(x_74, 0); lean_inc(x_75); x_76 = lean_unbox(x_75); lean_dec(x_75); if (x_76 == 0) { lean_object* x_77; lean_dec(x_67); lean_dec(x_60); x_77 = lean_ctor_get(x_74, 1); lean_inc(x_77); lean_dec(x_74); x_25 = x_77; goto block_59; } else { lean_object* x_78; lean_object* x_79; x_78 = lean_ctor_get(x_74, 1); lean_inc(x_78); lean_dec(x_74); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); x_79 = l_Lean_Meta_withMVarContext___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__4___rarg(x_60, x_67, x_6, x_7, x_8, x_9, x_10, x_11, x_78); if (lean_obj_tag(x_79) == 0) { lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; 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); lean_inc(x_24); x_82 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_24, x_80, x_6, x_7, x_8, x_9, x_10, x_11, x_81); x_83 = lean_ctor_get(x_82, 1); lean_inc(x_83); lean_dec(x_82); x_25 = x_83; goto block_59; } else { uint8_t x_84; lean_dec(x_24); lean_dec(x_16); lean_dec(x_15); lean_dec(x_14); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); x_84 = !lean_is_exclusive(x_79); if (x_84 == 0) { return x_79; } else { lean_object* x_85; lean_object* x_86; lean_object* x_87; x_85 = lean_ctor_get(x_79, 0); x_86 = lean_ctor_get(x_79, 1); lean_inc(x_86); lean_inc(x_85); lean_dec(x_79); x_87 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_87, 0, x_85); lean_ctor_set(x_87, 1, x_86); return x_87; } } } } block_22: { if (x_17 == 0) { lean_dec(x_16); lean_dec(x_14); x_4 = x_15; x_12 = x_18; goto _start; } else { lean_object* x_20; if (lean_is_scalar(x_16)) { x_20 = lean_alloc_ctor(1, 2, 0); } else { x_20 = x_16; } lean_ctor_set(x_20, 0, x_14); lean_ctor_set(x_20, 1, x_5); x_4 = x_15; x_5 = x_20; x_12 = x_18; goto _start; } } block_59: { lean_object* x_26; lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_14); x_26 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar(x_14, x_1, x_2, x_6, x_7, x_8, x_9, x_10, x_11, x_25); if (lean_obj_tag(x_26) == 0) { lean_object* x_27; lean_object* x_28; uint8_t x_29; lean_object* x_30; lean_object* x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47; x_27 = lean_ctor_get(x_26, 0); lean_inc(x_27); x_28 = lean_ctor_get(x_26, 1); lean_inc(x_28); lean_dec(x_26); x_44 = lean_st_ref_get(x_11, x_28); x_45 = lean_ctor_get(x_44, 0); lean_inc(x_45); x_46 = lean_ctor_get(x_45, 3); lean_inc(x_46); lean_dec(x_45); x_47 = lean_ctor_get_uint8(x_46, sizeof(void*)*1); lean_dec(x_46); if (x_47 == 0) { lean_object* x_48; uint8_t x_49; x_48 = lean_ctor_get(x_44, 1); lean_inc(x_48); lean_dec(x_44); x_49 = 0; x_29 = x_49; x_30 = x_48; goto block_43; } else { lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; uint8_t x_54; x_50 = lean_ctor_get(x_44, 1); lean_inc(x_50); lean_dec(x_44); lean_inc(x_24); x_51 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_24, x_6, x_7, x_8, x_9, x_10, x_11, x_50); x_52 = lean_ctor_get(x_51, 0); lean_inc(x_52); x_53 = lean_ctor_get(x_51, 1); lean_inc(x_53); lean_dec(x_51); x_54 = lean_unbox(x_52); lean_dec(x_52); x_29 = x_54; x_30 = x_53; goto block_43; } block_43: { if (x_29 == 0) { uint8_t x_31; lean_dec(x_24); x_31 = lean_unbox(x_27); lean_dec(x_27); if (x_31 == 0) { uint8_t x_32; x_32 = 1; x_17 = x_32; x_18 = x_30; goto block_22; } else { uint8_t x_33; x_33 = 0; x_17 = x_33; x_18 = x_30; goto block_22; } } else { uint8_t x_34; x_34 = lean_unbox(x_27); lean_dec(x_27); if (x_34 == 0) { lean_object* x_35; lean_object* x_36; lean_object* x_37; uint8_t x_38; x_35 = l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__3; x_36 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_24, x_35, x_6, x_7, x_8, x_9, x_10, x_11, x_30); x_37 = lean_ctor_get(x_36, 1); lean_inc(x_37); lean_dec(x_36); x_38 = 1; x_17 = x_38; x_18 = x_37; goto block_22; } else { lean_object* x_39; lean_object* x_40; lean_object* x_41; uint8_t x_42; x_39 = l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__6; x_40 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_24, x_39, x_6, x_7, x_8, x_9, x_10, x_11, x_30); x_41 = lean_ctor_get(x_40, 1); lean_inc(x_41); lean_dec(x_40); x_42 = 0; x_17 = x_42; x_18 = x_41; goto block_22; } } } } else { uint8_t x_55; lean_dec(x_24); lean_dec(x_16); lean_dec(x_15); lean_dec(x_14); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); x_55 = !lean_is_exclusive(x_26); if (x_55 == 0) { return x_26; } else { lean_object* x_56; lean_object* x_57; lean_object* x_58; x_56 = lean_ctor_get(x_26, 0); x_57 = lean_ctor_get(x_26, 1); lean_inc(x_57); lean_inc(x_56); lean_dec(x_26); 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; } } } } } } lean_object* l_Std_fmt___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__2(uint8_t x_1) { _start: { if (x_1 == 0) { lean_object* x_2; x_2 = l_instReprBool___closed__1; return x_2; } else { lean_object* x_3; x_3 = l_instReprBool___closed__3; return x_3; } } } static lean_object* _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__1() { _start: { lean_object* x_1; x_1 = lean_mk_string("resuming"); return x_1; } } static lean_object* _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Elab_initFn____x40_Lean_Elab_Util___hyg_1262____closed__1; x_2 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } static lean_object* _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__3() { _start: { lean_object* x_1; x_1 = lean_mk_string("resuming synthetic metavariables, mayPostpone: "); return x_1; } } static lean_object* _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__4() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__3; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } static lean_object* _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__5() { _start: { lean_object* x_1; x_1 = lean_mk_string(", postponeOnError: "); return x_1; } } static lean_object* _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__6() { _start: { lean_object* x_1; lean_object* x_2; x_1 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__5; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep(uint8_t x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { lean_object* x_10; 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; uint8_t x_139; x_127 = lean_ctor_get(x_7, 0); lean_inc(x_127); x_128 = lean_ctor_get(x_7, 1); lean_inc(x_128); x_129 = lean_ctor_get(x_7, 2); lean_inc(x_129); x_130 = lean_ctor_get(x_7, 3); lean_inc(x_130); x_131 = lean_ctor_get(x_7, 4); lean_inc(x_131); x_132 = lean_ctor_get(x_7, 5); lean_inc(x_132); x_133 = lean_ctor_get(x_7, 6); lean_inc(x_133); x_134 = lean_ctor_get(x_7, 7); lean_inc(x_134); x_135 = lean_box(0); x_136 = l_Lean_replaceRef(x_135, x_130); lean_dec(x_130); lean_inc(x_127); x_137 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_137, 0, x_127); lean_ctor_set(x_137, 1, x_128); lean_ctor_set(x_137, 2, x_129); lean_ctor_set(x_137, 3, x_136); lean_ctor_set(x_137, 4, x_131); lean_ctor_set(x_137, 5, x_132); lean_ctor_set(x_137, 6, x_133); lean_ctor_set(x_137, 7, x_134); x_138 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__2; x_139 = l_Lean_checkTraceOption(x_127, x_138); lean_dec(x_127); if (x_139 == 0) { lean_dec(x_137); x_10 = x_9; goto block_126; } else { uint8_t x_140; lean_object* x_141; 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; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; x_140 = lean_ctor_get_uint8(x_3, sizeof(void*)*8); x_141 = l_Std_fmt___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__2(x_140); x_142 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_142, 0, x_141); x_143 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__4; x_144 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_144, 0, x_143); lean_ctor_set(x_144, 1, x_142); x_145 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__6; x_146 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_146, 0, x_144); lean_ctor_set(x_146, 1, x_145); x_147 = l_Std_fmt___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__2(x_1); x_148 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_148, 0, x_147); x_149 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_149, 0, x_146); lean_ctor_set(x_149, 1, x_148); x_150 = l_Lean_KernelException_toMessageData___closed__15; x_151 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_151, 0, x_149); lean_ctor_set(x_151, 1, x_150); x_152 = l_Lean_Elab_logTrace___at_Lean_Elab_Term_traceAtCmdPos___spec__1(x_138, x_151, x_3, x_4, x_5, x_6, x_137, x_8, x_9); lean_dec(x_137); x_153 = lean_ctor_get(x_152, 1); lean_inc(x_153); lean_dec(x_152); x_10 = x_153; goto block_126; } block_126: { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; x_11 = lean_st_ref_get(x_8, x_10); x_12 = lean_ctor_get(x_11, 1); lean_inc(x_12); lean_dec(x_11); x_13 = lean_st_ref_get(x_4, x_12); 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_ctor_get(x_14, 1); lean_inc(x_16); lean_dec(x_14); x_17 = lean_unsigned_to_nat(0u); x_18 = l_List_lengthAux___rarg(x_16, x_17); x_19 = lean_st_ref_get(x_8, x_15); x_20 = lean_ctor_get(x_19, 1); lean_inc(x_20); lean_dec(x_19); x_21 = lean_st_ref_take(x_4, x_20); x_22 = lean_ctor_get(x_21, 0); lean_inc(x_22); x_23 = lean_ctor_get(x_21, 1); lean_inc(x_23); lean_dec(x_21); x_24 = !lean_is_exclusive(x_22); if (x_24 == 0) { lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; x_25 = lean_ctor_get(x_22, 1); lean_dec(x_25); x_26 = lean_box(0); lean_ctor_set(x_22, 1, x_26); x_27 = lean_st_ref_set(x_4, x_22, x_23); x_28 = lean_ctor_get(x_27, 1); lean_inc(x_28); lean_dec(x_27); x_29 = l_List_reverse___rarg(x_16); x_30 = l_Lean_Elab_initFn____x40_Lean_Elab_Util___hyg_1262____closed__1; lean_inc(x_8); lean_inc(x_4); x_31 = l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1(x_1, x_2, x_30, x_29, x_26, x_3, x_4, x_5, x_6, x_7, x_8, x_28); if (lean_obj_tag(x_31) == 0) { lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; uint8_t x_39; x_32 = lean_ctor_get(x_31, 0); lean_inc(x_32); x_33 = lean_ctor_get(x_31, 1); lean_inc(x_33); lean_dec(x_31); x_34 = lean_st_ref_get(x_8, x_33); lean_dec(x_8); x_35 = lean_ctor_get(x_34, 1); lean_inc(x_35); lean_dec(x_34); x_36 = lean_st_ref_take(x_4, x_35); x_37 = lean_ctor_get(x_36, 0); lean_inc(x_37); x_38 = lean_ctor_get(x_36, 1); lean_inc(x_38); lean_dec(x_36); x_39 = !lean_is_exclusive(x_37); if (x_39 == 0) { lean_object* x_40; lean_object* x_41; lean_object* x_42; uint8_t x_43; x_40 = lean_ctor_get(x_37, 1); lean_inc(x_32); x_41 = l_List_append___rarg(x_40, x_32); lean_ctor_set(x_37, 1, x_41); x_42 = lean_st_ref_set(x_4, x_37, x_38); lean_dec(x_4); x_43 = !lean_is_exclusive(x_42); if (x_43 == 0) { lean_object* x_44; lean_object* x_45; uint8_t x_46; x_44 = lean_ctor_get(x_42, 0); lean_dec(x_44); x_45 = l_List_lengthAux___rarg(x_32, x_17); lean_dec(x_32); x_46 = lean_nat_dec_eq(x_18, x_45); lean_dec(x_45); lean_dec(x_18); if (x_46 == 0) { uint8_t x_47; lean_object* x_48; x_47 = 1; x_48 = lean_box(x_47); lean_ctor_set(x_42, 0, x_48); return x_42; } else { uint8_t x_49; lean_object* x_50; x_49 = 0; x_50 = lean_box(x_49); lean_ctor_set(x_42, 0, x_50); return x_42; } } else { lean_object* x_51; lean_object* x_52; uint8_t x_53; x_51 = lean_ctor_get(x_42, 1); lean_inc(x_51); lean_dec(x_42); x_52 = l_List_lengthAux___rarg(x_32, x_17); lean_dec(x_32); x_53 = lean_nat_dec_eq(x_18, x_52); lean_dec(x_52); lean_dec(x_18); if (x_53 == 0) { uint8_t x_54; lean_object* x_55; lean_object* x_56; x_54 = 1; x_55 = lean_box(x_54); x_56 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_56, 0, x_55); lean_ctor_set(x_56, 1, x_51); return x_56; } else { uint8_t x_57; lean_object* x_58; lean_object* x_59; x_57 = 0; x_58 = lean_box(x_57); x_59 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_59, 0, x_58); lean_ctor_set(x_59, 1, x_51); return x_59; } } } else { lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; uint8_t x_72; x_60 = lean_ctor_get(x_37, 0); x_61 = lean_ctor_get(x_37, 1); x_62 = lean_ctor_get(x_37, 2); x_63 = lean_ctor_get(x_37, 3); x_64 = lean_ctor_get(x_37, 4); x_65 = lean_ctor_get(x_37, 5); lean_inc(x_65); lean_inc(x_64); lean_inc(x_63); lean_inc(x_62); lean_inc(x_61); lean_inc(x_60); lean_dec(x_37); lean_inc(x_32); x_66 = l_List_append___rarg(x_61, x_32); x_67 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_67, 0, x_60); lean_ctor_set(x_67, 1, x_66); lean_ctor_set(x_67, 2, x_62); lean_ctor_set(x_67, 3, x_63); lean_ctor_set(x_67, 4, x_64); lean_ctor_set(x_67, 5, x_65); x_68 = lean_st_ref_set(x_4, x_67, x_38); lean_dec(x_4); x_69 = lean_ctor_get(x_68, 1); lean_inc(x_69); if (lean_is_exclusive(x_68)) { lean_ctor_release(x_68, 0); lean_ctor_release(x_68, 1); x_70 = x_68; } else { lean_dec_ref(x_68); x_70 = lean_box(0); } x_71 = l_List_lengthAux___rarg(x_32, x_17); lean_dec(x_32); x_72 = lean_nat_dec_eq(x_18, x_71); lean_dec(x_71); lean_dec(x_18); if (x_72 == 0) { uint8_t x_73; lean_object* x_74; lean_object* x_75; x_73 = 1; x_74 = lean_box(x_73); if (lean_is_scalar(x_70)) { x_75 = lean_alloc_ctor(0, 2, 0); } else { x_75 = x_70; } lean_ctor_set(x_75, 0, x_74); lean_ctor_set(x_75, 1, x_69); return x_75; } else { uint8_t x_76; lean_object* x_77; lean_object* x_78; x_76 = 0; x_77 = lean_box(x_76); if (lean_is_scalar(x_70)) { x_78 = lean_alloc_ctor(0, 2, 0); } else { x_78 = x_70; } lean_ctor_set(x_78, 0, x_77); lean_ctor_set(x_78, 1, x_69); return x_78; } } } else { uint8_t x_79; lean_dec(x_18); lean_dec(x_8); lean_dec(x_4); x_79 = !lean_is_exclusive(x_31); if (x_79 == 0) { return x_31; } else { lean_object* x_80; lean_object* x_81; lean_object* x_82; x_80 = lean_ctor_get(x_31, 0); x_81 = lean_ctor_get(x_31, 1); lean_inc(x_81); lean_inc(x_80); lean_dec(x_31); x_82 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_82, 0, x_80); lean_ctor_set(x_82, 1, x_81); return x_82; } } } else { 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; x_83 = lean_ctor_get(x_22, 0); x_84 = lean_ctor_get(x_22, 2); x_85 = lean_ctor_get(x_22, 3); x_86 = lean_ctor_get(x_22, 4); x_87 = lean_ctor_get(x_22, 5); lean_inc(x_87); lean_inc(x_86); lean_inc(x_85); lean_inc(x_84); lean_inc(x_83); lean_dec(x_22); x_88 = lean_box(0); x_89 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_89, 0, x_83); lean_ctor_set(x_89, 1, x_88); lean_ctor_set(x_89, 2, x_84); lean_ctor_set(x_89, 3, x_85); lean_ctor_set(x_89, 4, x_86); lean_ctor_set(x_89, 5, x_87); x_90 = lean_st_ref_set(x_4, x_89, x_23); x_91 = lean_ctor_get(x_90, 1); lean_inc(x_91); lean_dec(x_90); x_92 = l_List_reverse___rarg(x_16); x_93 = l_Lean_Elab_initFn____x40_Lean_Elab_Util___hyg_1262____closed__1; lean_inc(x_8); lean_inc(x_4); x_94 = l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1(x_1, x_2, x_93, x_92, x_88, x_3, x_4, x_5, x_6, x_7, x_8, x_91); if (lean_obj_tag(x_94) == 0) { lean_object* x_95; 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; lean_object* x_112; lean_object* x_113; lean_object* x_114; uint8_t x_115; x_95 = lean_ctor_get(x_94, 0); lean_inc(x_95); x_96 = lean_ctor_get(x_94, 1); lean_inc(x_96); lean_dec(x_94); x_97 = lean_st_ref_get(x_8, x_96); lean_dec(x_8); x_98 = lean_ctor_get(x_97, 1); lean_inc(x_98); lean_dec(x_97); x_99 = lean_st_ref_take(x_4, x_98); x_100 = lean_ctor_get(x_99, 0); lean_inc(x_100); x_101 = lean_ctor_get(x_99, 1); lean_inc(x_101); lean_dec(x_99); x_102 = lean_ctor_get(x_100, 0); lean_inc(x_102); x_103 = lean_ctor_get(x_100, 1); lean_inc(x_103); x_104 = lean_ctor_get(x_100, 2); lean_inc(x_104); x_105 = lean_ctor_get(x_100, 3); lean_inc(x_105); x_106 = lean_ctor_get(x_100, 4); lean_inc(x_106); x_107 = lean_ctor_get(x_100, 5); lean_inc(x_107); if (lean_is_exclusive(x_100)) { lean_ctor_release(x_100, 0); lean_ctor_release(x_100, 1); lean_ctor_release(x_100, 2); lean_ctor_release(x_100, 3); lean_ctor_release(x_100, 4); lean_ctor_release(x_100, 5); x_108 = x_100; } else { lean_dec_ref(x_100); x_108 = lean_box(0); } lean_inc(x_95); x_109 = l_List_append___rarg(x_103, x_95); if (lean_is_scalar(x_108)) { x_110 = lean_alloc_ctor(0, 6, 0); } else { x_110 = x_108; } lean_ctor_set(x_110, 0, x_102); lean_ctor_set(x_110, 1, x_109); lean_ctor_set(x_110, 2, x_104); lean_ctor_set(x_110, 3, x_105); lean_ctor_set(x_110, 4, x_106); lean_ctor_set(x_110, 5, x_107); x_111 = lean_st_ref_set(x_4, x_110, x_101); lean_dec(x_4); x_112 = lean_ctor_get(x_111, 1); lean_inc(x_112); if (lean_is_exclusive(x_111)) { lean_ctor_release(x_111, 0); lean_ctor_release(x_111, 1); x_113 = x_111; } else { lean_dec_ref(x_111); x_113 = lean_box(0); } x_114 = l_List_lengthAux___rarg(x_95, x_17); lean_dec(x_95); x_115 = lean_nat_dec_eq(x_18, x_114); lean_dec(x_114); lean_dec(x_18); if (x_115 == 0) { uint8_t x_116; lean_object* x_117; lean_object* x_118; x_116 = 1; x_117 = lean_box(x_116); if (lean_is_scalar(x_113)) { x_118 = lean_alloc_ctor(0, 2, 0); } else { x_118 = x_113; } lean_ctor_set(x_118, 0, x_117); lean_ctor_set(x_118, 1, x_112); return x_118; } else { uint8_t x_119; lean_object* x_120; lean_object* x_121; x_119 = 0; x_120 = lean_box(x_119); if (lean_is_scalar(x_113)) { x_121 = lean_alloc_ctor(0, 2, 0); } else { x_121 = x_113; } lean_ctor_set(x_121, 0, x_120); lean_ctor_set(x_121, 1, x_112); return x_121; } } else { lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_dec(x_18); lean_dec(x_8); lean_dec(x_4); x_122 = lean_ctor_get(x_94, 0); lean_inc(x_122); x_123 = lean_ctor_get(x_94, 1); lean_inc(x_123); if (lean_is_exclusive(x_94)) { lean_ctor_release(x_94, 0); lean_ctor_release(x_94, 1); x_124 = x_94; } else { lean_dec_ref(x_94); x_124 = lean_box(0); } if (lean_is_scalar(x_124)) { x_125 = lean_alloc_ctor(1, 2, 0); } else { x_125 = x_124; } lean_ctor_set(x_125, 0, x_122); lean_ctor_set(x_125, 1, x_123); return x_125; } } } } } lean_object* l_ReaderT_pure___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; x_9 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_9, 0, x_1); lean_ctor_set(x_9, 1, x_8); return x_9; } } lean_object* l_ReaderT_pure___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar___spec__1(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l_ReaderT_pure___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar___spec__1___rarg___boxed), 8, 0); return x_2; } } static lean_object* _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar___closed__1() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; x_1 = 0; x_2 = lean_box(x_1); x_3 = lean_alloc_closure((void*)(l_ReaderT_pure___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar___spec__1___rarg___boxed), 8, 1); lean_closure_set(x_3, 0, x_2); return x_3; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar(lean_object* x_1, uint8_t x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; lean_object* x_12; uint8_t x_13; x_11 = lean_ctor_get(x_1, 1); lean_inc(x_11); x_12 = lean_ctor_get(x_1, 2); lean_inc(x_12); x_13 = !lean_is_exclusive(x_8); if (x_13 == 0) { lean_object* x_14; lean_object* x_15; x_14 = lean_ctor_get(x_8, 3); x_15 = l_Lean_replaceRef(x_11, x_14); lean_dec(x_14); lean_ctor_set(x_8, 3, x_15); switch (lean_obj_tag(x_12)) { case 0: { lean_object* x_16; lean_object* x_17; lean_dec(x_11); x_16 = lean_ctor_get(x_1, 0); lean_inc(x_16); lean_dec(x_1); x_17 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar(x_16, x_4, x_5, x_6, x_7, x_8, x_9, x_10); return x_17; } case 1: { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_dec(x_11); x_18 = lean_ctor_get(x_12, 0); lean_inc(x_18); x_19 = lean_ctor_get(x_12, 1); lean_inc(x_19); x_20 = lean_ctor_get(x_12, 2); lean_inc(x_20); x_21 = lean_ctor_get(x_12, 3); lean_inc(x_21); x_22 = lean_ctor_get(x_12, 4); lean_inc(x_22); x_23 = lean_ctor_get(x_12, 5); lean_inc(x_23); lean_dec(x_12); x_24 = lean_ctor_get(x_1, 0); lean_inc(x_24); lean_dec(x_1); x_25 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar(x_24, x_18, x_19, x_20, x_21, x_22, x_23, x_4, x_5, x_6, x_7, x_8, x_9, x_10); return x_25; } case 2: { lean_dec(x_11); if (x_3 == 0) { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_dec(x_1); x_26 = lean_ctor_get(x_12, 1); lean_inc(x_26); lean_dec(x_12); x_27 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar___closed__1; x_28 = l_Lean_Elab_Term_withSavedContext___rarg(x_26, x_27, x_4, x_5, x_6, x_7, x_8, x_9, x_10); lean_dec(x_26); 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; lean_object* x_35; x_29 = lean_ctor_get(x_12, 0); lean_inc(x_29); x_30 = lean_ctor_get(x_12, 1); lean_inc(x_30); lean_dec(x_12); x_31 = lean_ctor_get(x_1, 0); lean_inc(x_31); lean_dec(x_1); x_32 = lean_alloc_closure((void*)(l_Lean_Elab_Term_runTactic), 9, 2); lean_closure_set(x_32, 0, x_31); lean_closure_set(x_32, 1, x_29); x_33 = l_List_forIn_loop___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__5___lambda__3___closed__1; x_34 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Term_instMonadLogTermElabM___spec__2___rarg), 9, 2); lean_closure_set(x_34, 0, x_32); lean_closure_set(x_34, 1, x_33); x_35 = l_Lean_Elab_Term_withSavedContext___rarg(x_30, x_34, x_4, x_5, x_6, x_7, x_8, x_9, x_10); lean_dec(x_30); return x_35; } } default: { lean_object* x_36; lean_object* x_37; lean_object* x_38; x_36 = lean_ctor_get(x_12, 0); lean_inc(x_36); lean_dec(x_12); x_37 = lean_ctor_get(x_1, 0); lean_inc(x_37); lean_dec(x_1); x_38 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed(x_36, x_11, x_37, x_2, x_4, x_5, x_6, x_7, x_8, x_9, x_10); return x_38; } } } else { lean_object* x_39; lean_object* x_40; 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_39 = lean_ctor_get(x_8, 0); x_40 = lean_ctor_get(x_8, 1); x_41 = lean_ctor_get(x_8, 2); x_42 = lean_ctor_get(x_8, 3); x_43 = lean_ctor_get(x_8, 4); x_44 = lean_ctor_get(x_8, 5); x_45 = lean_ctor_get(x_8, 6); x_46 = lean_ctor_get(x_8, 7); lean_inc(x_46); lean_inc(x_45); lean_inc(x_44); lean_inc(x_43); lean_inc(x_42); lean_inc(x_41); lean_inc(x_40); lean_inc(x_39); lean_dec(x_8); x_47 = l_Lean_replaceRef(x_11, x_42); lean_dec(x_42); x_48 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_48, 0, x_39); lean_ctor_set(x_48, 1, x_40); lean_ctor_set(x_48, 2, x_41); lean_ctor_set(x_48, 3, x_47); lean_ctor_set(x_48, 4, x_43); lean_ctor_set(x_48, 5, x_44); lean_ctor_set(x_48, 6, x_45); lean_ctor_set(x_48, 7, x_46); switch (lean_obj_tag(x_12)) { case 0: { lean_object* x_49; lean_object* x_50; lean_dec(x_11); x_49 = lean_ctor_get(x_1, 0); lean_inc(x_49); lean_dec(x_1); x_50 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar(x_49, x_4, x_5, x_6, x_7, x_48, x_9, x_10); return x_50; } case 1: { lean_object* 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; lean_object* x_58; lean_dec(x_11); x_51 = lean_ctor_get(x_12, 0); lean_inc(x_51); x_52 = lean_ctor_get(x_12, 1); lean_inc(x_52); x_53 = lean_ctor_get(x_12, 2); lean_inc(x_53); x_54 = lean_ctor_get(x_12, 3); lean_inc(x_54); x_55 = lean_ctor_get(x_12, 4); lean_inc(x_55); x_56 = lean_ctor_get(x_12, 5); lean_inc(x_56); lean_dec(x_12); x_57 = lean_ctor_get(x_1, 0); lean_inc(x_57); lean_dec(x_1); x_58 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar(x_57, x_51, x_52, x_53, x_54, x_55, x_56, x_4, x_5, x_6, x_7, x_48, x_9, x_10); return x_58; } case 2: { lean_dec(x_11); if (x_3 == 0) { lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_dec(x_1); x_59 = lean_ctor_get(x_12, 1); lean_inc(x_59); lean_dec(x_12); x_60 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar___closed__1; x_61 = l_Lean_Elab_Term_withSavedContext___rarg(x_59, x_60, x_4, x_5, x_6, x_7, x_48, x_9, x_10); lean_dec(x_59); return x_61; } else { 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_62 = lean_ctor_get(x_12, 0); lean_inc(x_62); x_63 = lean_ctor_get(x_12, 1); lean_inc(x_63); lean_dec(x_12); x_64 = lean_ctor_get(x_1, 0); lean_inc(x_64); lean_dec(x_1); x_65 = lean_alloc_closure((void*)(l_Lean_Elab_Term_runTactic), 9, 2); lean_closure_set(x_65, 0, x_64); lean_closure_set(x_65, 1, x_62); x_66 = l_List_forIn_loop___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__5___lambda__3___closed__1; x_67 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Term_instMonadLogTermElabM___spec__2___rarg), 9, 2); lean_closure_set(x_67, 0, x_65); lean_closure_set(x_67, 1, x_66); x_68 = l_Lean_Elab_Term_withSavedContext___rarg(x_63, x_67, x_4, x_5, x_6, x_7, x_48, x_9, x_10); lean_dec(x_63); return x_68; } } default: { lean_object* x_69; lean_object* x_70; lean_object* x_71; x_69 = lean_ctor_get(x_12, 0); lean_inc(x_69); lean_dec(x_12); x_70 = lean_ctor_get(x_1, 0); lean_inc(x_70); lean_dec(x_1); x_71 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed(x_69, x_11, x_70, x_2, x_4, x_5, x_6, x_7, x_48, x_9, x_10); return x_71; } } } } } lean_object* l_Lean_Elab_Term_runTactic___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: { uint8_t x_11; lean_object* x_12; lean_object* x_13; x_11 = 0; x_12 = lean_box(0); x_13 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_11, x_12, x_4, x_5, x_6, x_7, x_8, x_9, x_10); return x_13; } } static lean_object* _init_l_Lean_Elab_Term_runTactic___closed__1() { _start: { lean_object* x_1; x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Term_runTactic___lambda__1___boxed), 10, 0); return x_1; } } lean_object* l_Lean_Elab_Term_runTactic(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: { lean_object* x_10; lean_object* x_28; 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; uint8_t x_48; x_41 = lean_unsigned_to_nat(1u); x_42 = l_Lean_Syntax_getArg(x_2, x_41); x_43 = lean_st_ref_get(x_8, x_9); x_44 = lean_ctor_get(x_43, 1); lean_inc(x_44); lean_dec(x_43); x_45 = lean_st_ref_take(x_6, x_44); x_46 = lean_ctor_get(x_45, 0); lean_inc(x_46); x_47 = lean_ctor_get(x_45, 1); lean_inc(x_47); lean_dec(x_45); x_48 = !lean_is_exclusive(x_46); if (x_48 == 0) { lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; uint8_t x_62; x_49 = lean_ctor_get(x_46, 0); lean_inc(x_1); x_50 = l_Lean_MetavarContext_instantiateMVarDeclMVars(x_49, x_1); lean_ctor_set(x_46, 0, x_50); x_51 = lean_st_ref_set(x_6, x_46, x_47); x_52 = lean_ctor_get(x_51, 1); lean_inc(x_52); lean_dec(x_51); x_53 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_evalTactic), 10, 1); lean_closure_set(x_53, 0, x_42); x_54 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_withTacticInfoContext___rarg), 11, 2); lean_closure_set(x_54, 0, x_2); lean_closure_set(x_54, 1, x_53); x_55 = l_Lean_Elab_Term_runTactic___closed__1; x_56 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Tactic_focusAndDone___spec__1___rarg), 11, 2); lean_closure_set(x_56, 0, x_54); lean_closure_set(x_56, 1, x_55); x_57 = lean_st_ref_get(x_8, x_52); x_58 = lean_ctor_get(x_57, 1); lean_inc(x_58); lean_dec(x_57); x_59 = lean_st_ref_get(x_4, x_58); x_60 = lean_ctor_get(x_59, 0); lean_inc(x_60); x_61 = lean_ctor_get(x_60, 5); lean_inc(x_61); lean_dec(x_60); x_62 = lean_ctor_get_uint8(x_61, sizeof(void*)*2); lean_dec(x_61); if (x_62 == 0) { lean_object* x_63; lean_object* x_64; x_63 = lean_ctor_get(x_59, 1); lean_inc(x_63); lean_dec(x_59); 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_64 = l_Lean_Elab_Tactic_run(x_1, x_56, x_3, x_4, x_5, x_6, x_7, x_8, x_63); x_10 = x_64; goto block_27; } else { lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; x_65 = lean_ctor_get(x_59, 1); lean_inc(x_65); lean_dec(x_59); x_66 = l___private_Lean_Elab_InfoTree_0__Lean_Elab_getResetInfoTrees___at_Lean_Elab_Term_withMacroExpansion___spec__2___rarg(x_4, x_5, x_6, x_7, x_8, x_65); x_67 = lean_ctor_get(x_66, 0); lean_inc(x_67); x_68 = lean_ctor_get(x_66, 1); lean_inc(x_68); lean_dec(x_66); 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_1); x_69 = l_Lean_Elab_Tactic_run(x_1, x_56, x_3, x_4, x_5, x_6, x_7, x_8, x_68); if (lean_obj_tag(x_69) == 0) { lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; uint8_t x_78; 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_st_ref_get(x_8, x_71); x_73 = lean_ctor_get(x_72, 1); lean_inc(x_73); lean_dec(x_72); x_74 = lean_st_ref_take(x_4, x_73); x_75 = lean_ctor_get(x_74, 0); lean_inc(x_75); x_76 = lean_ctor_get(x_75, 5); lean_inc(x_76); x_77 = lean_ctor_get(x_74, 1); lean_inc(x_77); lean_dec(x_74); x_78 = !lean_is_exclusive(x_75); if (x_78 == 0) { lean_object* x_79; uint8_t x_80; x_79 = lean_ctor_get(x_75, 5); lean_dec(x_79); x_80 = !lean_is_exclusive(x_76); if (x_80 == 0) { lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; uint8_t x_85; x_81 = lean_ctor_get(x_76, 0); x_82 = lean_ctor_get(x_76, 1); x_83 = lean_ctor_get(x_82, 2); lean_inc(x_83); x_84 = lean_unsigned_to_nat(0u); x_85 = lean_nat_dec_lt(x_84, x_83); if (x_85 == 0) { lean_object* x_86; uint8_t x_87; lean_dec(x_83); lean_dec(x_82); lean_dec(x_1); lean_ctor_set(x_76, 1, x_67); x_86 = lean_st_ref_set(x_4, x_75, x_77); x_87 = !lean_is_exclusive(x_86); if (x_87 == 0) { lean_object* x_88; lean_object* x_89; lean_object* x_90; x_88 = lean_ctor_get(x_86, 0); lean_dec(x_88); x_89 = lean_box(0); x_90 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_90, 0, x_70); lean_ctor_set(x_90, 1, x_89); lean_ctor_set(x_86, 0, x_90); x_28 = x_86; goto block_40; } else { lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; x_91 = lean_ctor_get(x_86, 1); lean_inc(x_91); lean_dec(x_86); x_92 = lean_box(0); x_93 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_93, 0, x_70); lean_ctor_set(x_93, 1, x_92); x_94 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_94, 0, x_93); lean_ctor_set(x_94, 1, x_91); x_28 = x_94; goto block_40; } } else { lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; uint8_t x_99; x_95 = lean_nat_sub(x_83, x_41); lean_dec(x_83); x_96 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_82, x_95); lean_dec(x_95); x_97 = l_Std_PersistentHashMap_insert___at_Lean_Elab_assignInfoHoleId___spec__1(x_81, x_1, x_96); lean_ctor_set(x_76, 1, x_67); lean_ctor_set(x_76, 0, x_97); x_98 = lean_st_ref_set(x_4, x_75, x_77); x_99 = !lean_is_exclusive(x_98); if (x_99 == 0) { lean_object* x_100; lean_object* x_101; lean_object* x_102; x_100 = lean_ctor_get(x_98, 0); lean_dec(x_100); x_101 = lean_box(0); x_102 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_102, 0, x_70); lean_ctor_set(x_102, 1, x_101); lean_ctor_set(x_98, 0, x_102); x_28 = x_98; goto block_40; } else { lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; x_103 = lean_ctor_get(x_98, 1); lean_inc(x_103); lean_dec(x_98); x_104 = lean_box(0); x_105 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_105, 0, x_70); lean_ctor_set(x_105, 1, x_104); x_106 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_106, 0, x_105); lean_ctor_set(x_106, 1, x_103); x_28 = x_106; goto block_40; } } } else { uint8_t x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; uint8_t x_112; x_107 = lean_ctor_get_uint8(x_76, sizeof(void*)*2); x_108 = lean_ctor_get(x_76, 0); x_109 = lean_ctor_get(x_76, 1); lean_inc(x_109); lean_inc(x_108); lean_dec(x_76); x_110 = lean_ctor_get(x_109, 2); lean_inc(x_110); x_111 = lean_unsigned_to_nat(0u); x_112 = lean_nat_dec_lt(x_111, x_110); if (x_112 == 0) { lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_dec(x_110); lean_dec(x_109); lean_dec(x_1); x_113 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_113, 0, x_108); lean_ctor_set(x_113, 1, x_67); lean_ctor_set_uint8(x_113, sizeof(void*)*2, x_107); lean_ctor_set(x_75, 5, x_113); x_114 = lean_st_ref_set(x_4, x_75, x_77); x_115 = lean_ctor_get(x_114, 1); lean_inc(x_115); if (lean_is_exclusive(x_114)) { lean_ctor_release(x_114, 0); lean_ctor_release(x_114, 1); x_116 = x_114; } else { lean_dec_ref(x_114); x_116 = lean_box(0); } x_117 = lean_box(0); x_118 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_118, 0, x_70); lean_ctor_set(x_118, 1, x_117); if (lean_is_scalar(x_116)) { x_119 = lean_alloc_ctor(0, 2, 0); } else { x_119 = x_116; } lean_ctor_set(x_119, 0, x_118); lean_ctor_set(x_119, 1, x_115); x_28 = x_119; goto block_40; } else { 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; x_120 = lean_nat_sub(x_110, x_41); lean_dec(x_110); x_121 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_109, x_120); lean_dec(x_120); x_122 = l_Std_PersistentHashMap_insert___at_Lean_Elab_assignInfoHoleId___spec__1(x_108, x_1, x_121); x_123 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_123, 0, x_122); lean_ctor_set(x_123, 1, x_67); lean_ctor_set_uint8(x_123, sizeof(void*)*2, x_107); lean_ctor_set(x_75, 5, x_123); x_124 = lean_st_ref_set(x_4, x_75, x_77); x_125 = lean_ctor_get(x_124, 1); lean_inc(x_125); if (lean_is_exclusive(x_124)) { lean_ctor_release(x_124, 0); lean_ctor_release(x_124, 1); x_126 = x_124; } else { lean_dec_ref(x_124); x_126 = lean_box(0); } x_127 = lean_box(0); x_128 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_128, 0, x_70); lean_ctor_set(x_128, 1, x_127); if (lean_is_scalar(x_126)) { x_129 = lean_alloc_ctor(0, 2, 0); } else { x_129 = x_126; } lean_ctor_set(x_129, 0, x_128); lean_ctor_set(x_129, 1, x_125); x_28 = x_129; goto block_40; } } } else { lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; uint8_t x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; uint8_t x_141; x_130 = lean_ctor_get(x_75, 0); x_131 = lean_ctor_get(x_75, 1); x_132 = lean_ctor_get(x_75, 2); x_133 = lean_ctor_get(x_75, 3); x_134 = lean_ctor_get(x_75, 4); lean_inc(x_134); lean_inc(x_133); lean_inc(x_132); lean_inc(x_131); lean_inc(x_130); lean_dec(x_75); x_135 = lean_ctor_get_uint8(x_76, sizeof(void*)*2); x_136 = lean_ctor_get(x_76, 0); lean_inc(x_136); x_137 = lean_ctor_get(x_76, 1); lean_inc(x_137); if (lean_is_exclusive(x_76)) { lean_ctor_release(x_76, 0); lean_ctor_release(x_76, 1); x_138 = x_76; } else { lean_dec_ref(x_76); x_138 = lean_box(0); } x_139 = lean_ctor_get(x_137, 2); lean_inc(x_139); x_140 = lean_unsigned_to_nat(0u); x_141 = lean_nat_dec_lt(x_140, x_139); 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; lean_object* x_149; lean_dec(x_139); lean_dec(x_137); lean_dec(x_1); if (lean_is_scalar(x_138)) { x_142 = lean_alloc_ctor(0, 2, 1); } else { x_142 = x_138; } lean_ctor_set(x_142, 0, x_136); lean_ctor_set(x_142, 1, x_67); lean_ctor_set_uint8(x_142, sizeof(void*)*2, x_135); x_143 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_143, 0, x_130); lean_ctor_set(x_143, 1, x_131); lean_ctor_set(x_143, 2, x_132); lean_ctor_set(x_143, 3, x_133); lean_ctor_set(x_143, 4, x_134); lean_ctor_set(x_143, 5, x_142); x_144 = lean_st_ref_set(x_4, x_143, x_77); x_145 = lean_ctor_get(x_144, 1); lean_inc(x_145); if (lean_is_exclusive(x_144)) { lean_ctor_release(x_144, 0); lean_ctor_release(x_144, 1); x_146 = x_144; } else { lean_dec_ref(x_144); x_146 = lean_box(0); } x_147 = lean_box(0); x_148 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_148, 0, x_70); lean_ctor_set(x_148, 1, x_147); if (lean_is_scalar(x_146)) { x_149 = lean_alloc_ctor(0, 2, 0); } else { x_149 = x_146; } lean_ctor_set(x_149, 0, x_148); lean_ctor_set(x_149, 1, x_145); x_28 = x_149; goto block_40; } else { 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; lean_object* x_158; lean_object* x_159; lean_object* x_160; x_150 = lean_nat_sub(x_139, x_41); lean_dec(x_139); x_151 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_137, x_150); lean_dec(x_150); x_152 = l_Std_PersistentHashMap_insert___at_Lean_Elab_assignInfoHoleId___spec__1(x_136, x_1, x_151); if (lean_is_scalar(x_138)) { x_153 = lean_alloc_ctor(0, 2, 1); } else { x_153 = x_138; } lean_ctor_set(x_153, 0, x_152); lean_ctor_set(x_153, 1, x_67); lean_ctor_set_uint8(x_153, sizeof(void*)*2, x_135); x_154 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_154, 0, x_130); lean_ctor_set(x_154, 1, x_131); lean_ctor_set(x_154, 2, x_132); lean_ctor_set(x_154, 3, x_133); lean_ctor_set(x_154, 4, x_134); lean_ctor_set(x_154, 5, x_153); x_155 = lean_st_ref_set(x_4, x_154, x_77); x_156 = lean_ctor_get(x_155, 1); lean_inc(x_156); if (lean_is_exclusive(x_155)) { lean_ctor_release(x_155, 0); lean_ctor_release(x_155, 1); x_157 = x_155; } else { lean_dec_ref(x_155); x_157 = lean_box(0); } x_158 = lean_box(0); x_159 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_159, 0, x_70); lean_ctor_set(x_159, 1, x_158); if (lean_is_scalar(x_157)) { x_160 = lean_alloc_ctor(0, 2, 0); } else { x_160 = x_157; } lean_ctor_set(x_160, 0, x_159); lean_ctor_set(x_160, 1, x_156); x_28 = x_160; goto block_40; } } } else { lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; uint8_t x_169; x_161 = lean_ctor_get(x_69, 0); lean_inc(x_161); x_162 = lean_ctor_get(x_69, 1); lean_inc(x_162); lean_dec(x_69); x_163 = lean_st_ref_get(x_8, x_162); x_164 = lean_ctor_get(x_163, 1); lean_inc(x_164); lean_dec(x_163); x_165 = lean_st_ref_take(x_4, x_164); x_166 = lean_ctor_get(x_165, 0); lean_inc(x_166); x_167 = lean_ctor_get(x_166, 5); lean_inc(x_167); x_168 = lean_ctor_get(x_165, 1); lean_inc(x_168); lean_dec(x_165); x_169 = !lean_is_exclusive(x_166); if (x_169 == 0) { lean_object* x_170; uint8_t x_171; x_170 = lean_ctor_get(x_166, 5); lean_dec(x_170); x_171 = !lean_is_exclusive(x_167); if (x_171 == 0) { lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; uint8_t x_176; x_172 = lean_ctor_get(x_167, 0); x_173 = lean_ctor_get(x_167, 1); x_174 = lean_ctor_get(x_173, 2); lean_inc(x_174); x_175 = lean_unsigned_to_nat(0u); x_176 = lean_nat_dec_lt(x_175, x_174); if (x_176 == 0) { lean_object* x_177; uint8_t x_178; lean_dec(x_174); lean_dec(x_173); lean_dec(x_1); lean_ctor_set(x_167, 1, x_67); x_177 = lean_st_ref_set(x_4, x_166, x_168); x_178 = !lean_is_exclusive(x_177); if (x_178 == 0) { lean_object* x_179; x_179 = lean_ctor_get(x_177, 0); lean_dec(x_179); lean_ctor_set_tag(x_177, 1); lean_ctor_set(x_177, 0, x_161); x_28 = x_177; goto block_40; } else { lean_object* x_180; lean_object* x_181; x_180 = lean_ctor_get(x_177, 1); lean_inc(x_180); lean_dec(x_177); x_181 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_181, 0, x_161); lean_ctor_set(x_181, 1, x_180); x_28 = x_181; goto block_40; } } else { lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; uint8_t x_186; x_182 = lean_nat_sub(x_174, x_41); lean_dec(x_174); x_183 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_173, x_182); lean_dec(x_182); x_184 = l_Std_PersistentHashMap_insert___at_Lean_Elab_assignInfoHoleId___spec__1(x_172, x_1, x_183); lean_ctor_set(x_167, 1, x_67); lean_ctor_set(x_167, 0, x_184); x_185 = lean_st_ref_set(x_4, x_166, x_168); x_186 = !lean_is_exclusive(x_185); if (x_186 == 0) { lean_object* x_187; x_187 = lean_ctor_get(x_185, 0); lean_dec(x_187); lean_ctor_set_tag(x_185, 1); lean_ctor_set(x_185, 0, x_161); x_28 = x_185; goto block_40; } else { lean_object* x_188; lean_object* x_189; x_188 = lean_ctor_get(x_185, 1); lean_inc(x_188); lean_dec(x_185); x_189 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_189, 0, x_161); lean_ctor_set(x_189, 1, x_188); x_28 = x_189; goto block_40; } } } else { uint8_t x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; uint8_t x_195; x_190 = lean_ctor_get_uint8(x_167, sizeof(void*)*2); x_191 = lean_ctor_get(x_167, 0); x_192 = lean_ctor_get(x_167, 1); lean_inc(x_192); lean_inc(x_191); lean_dec(x_167); x_193 = lean_ctor_get(x_192, 2); lean_inc(x_193); x_194 = lean_unsigned_to_nat(0u); x_195 = lean_nat_dec_lt(x_194, x_193); if (x_195 == 0) { lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_dec(x_193); lean_dec(x_192); lean_dec(x_1); x_196 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_196, 0, x_191); lean_ctor_set(x_196, 1, x_67); lean_ctor_set_uint8(x_196, sizeof(void*)*2, x_190); lean_ctor_set(x_166, 5, x_196); x_197 = lean_st_ref_set(x_4, x_166, x_168); x_198 = lean_ctor_get(x_197, 1); lean_inc(x_198); if (lean_is_exclusive(x_197)) { lean_ctor_release(x_197, 0); lean_ctor_release(x_197, 1); x_199 = x_197; } else { lean_dec_ref(x_197); x_199 = lean_box(0); } if (lean_is_scalar(x_199)) { x_200 = lean_alloc_ctor(1, 2, 0); } else { x_200 = x_199; lean_ctor_set_tag(x_200, 1); } lean_ctor_set(x_200, 0, x_161); lean_ctor_set(x_200, 1, x_198); x_28 = x_200; goto block_40; } else { lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; x_201 = lean_nat_sub(x_193, x_41); lean_dec(x_193); x_202 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_192, x_201); lean_dec(x_201); x_203 = l_Std_PersistentHashMap_insert___at_Lean_Elab_assignInfoHoleId___spec__1(x_191, x_1, x_202); x_204 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_204, 0, x_203); lean_ctor_set(x_204, 1, x_67); lean_ctor_set_uint8(x_204, sizeof(void*)*2, x_190); lean_ctor_set(x_166, 5, x_204); x_205 = lean_st_ref_set(x_4, x_166, x_168); x_206 = lean_ctor_get(x_205, 1); lean_inc(x_206); if (lean_is_exclusive(x_205)) { lean_ctor_release(x_205, 0); lean_ctor_release(x_205, 1); x_207 = x_205; } else { lean_dec_ref(x_205); x_207 = lean_box(0); } if (lean_is_scalar(x_207)) { x_208 = lean_alloc_ctor(1, 2, 0); } else { x_208 = x_207; lean_ctor_set_tag(x_208, 1); } lean_ctor_set(x_208, 0, x_161); lean_ctor_set(x_208, 1, x_206); x_28 = x_208; goto block_40; } } } else { lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; uint8_t x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; lean_object* x_219; uint8_t x_220; x_209 = lean_ctor_get(x_166, 0); x_210 = lean_ctor_get(x_166, 1); x_211 = lean_ctor_get(x_166, 2); x_212 = lean_ctor_get(x_166, 3); x_213 = lean_ctor_get(x_166, 4); lean_inc(x_213); lean_inc(x_212); lean_inc(x_211); lean_inc(x_210); lean_inc(x_209); lean_dec(x_166); x_214 = lean_ctor_get_uint8(x_167, sizeof(void*)*2); x_215 = lean_ctor_get(x_167, 0); lean_inc(x_215); x_216 = lean_ctor_get(x_167, 1); lean_inc(x_216); if (lean_is_exclusive(x_167)) { lean_ctor_release(x_167, 0); lean_ctor_release(x_167, 1); x_217 = x_167; } else { lean_dec_ref(x_167); x_217 = lean_box(0); } x_218 = lean_ctor_get(x_216, 2); lean_inc(x_218); x_219 = lean_unsigned_to_nat(0u); x_220 = lean_nat_dec_lt(x_219, x_218); if (x_220 == 0) { lean_object* x_221; lean_object* x_222; lean_object* x_223; lean_object* x_224; lean_object* x_225; lean_object* x_226; lean_dec(x_218); lean_dec(x_216); lean_dec(x_1); if (lean_is_scalar(x_217)) { x_221 = lean_alloc_ctor(0, 2, 1); } else { x_221 = x_217; } lean_ctor_set(x_221, 0, x_215); lean_ctor_set(x_221, 1, x_67); lean_ctor_set_uint8(x_221, sizeof(void*)*2, x_214); x_222 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_222, 0, x_209); lean_ctor_set(x_222, 1, x_210); lean_ctor_set(x_222, 2, x_211); lean_ctor_set(x_222, 3, x_212); lean_ctor_set(x_222, 4, x_213); lean_ctor_set(x_222, 5, x_221); x_223 = lean_st_ref_set(x_4, x_222, x_168); x_224 = lean_ctor_get(x_223, 1); lean_inc(x_224); if (lean_is_exclusive(x_223)) { lean_ctor_release(x_223, 0); lean_ctor_release(x_223, 1); x_225 = x_223; } else { lean_dec_ref(x_223); x_225 = lean_box(0); } if (lean_is_scalar(x_225)) { x_226 = lean_alloc_ctor(1, 2, 0); } else { x_226 = x_225; lean_ctor_set_tag(x_226, 1); } lean_ctor_set(x_226, 0, x_161); lean_ctor_set(x_226, 1, x_224); x_28 = x_226; goto block_40; } else { lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; lean_object* x_235; x_227 = lean_nat_sub(x_218, x_41); lean_dec(x_218); x_228 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_216, x_227); lean_dec(x_227); x_229 = l_Std_PersistentHashMap_insert___at_Lean_Elab_assignInfoHoleId___spec__1(x_215, x_1, x_228); if (lean_is_scalar(x_217)) { x_230 = lean_alloc_ctor(0, 2, 1); } else { x_230 = x_217; } lean_ctor_set(x_230, 0, x_229); lean_ctor_set(x_230, 1, x_67); lean_ctor_set_uint8(x_230, sizeof(void*)*2, x_214); x_231 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_231, 0, x_209); lean_ctor_set(x_231, 1, x_210); lean_ctor_set(x_231, 2, x_211); lean_ctor_set(x_231, 3, x_212); lean_ctor_set(x_231, 4, x_213); lean_ctor_set(x_231, 5, x_230); x_232 = lean_st_ref_set(x_4, x_231, x_168); x_233 = lean_ctor_get(x_232, 1); lean_inc(x_233); if (lean_is_exclusive(x_232)) { lean_ctor_release(x_232, 0); lean_ctor_release(x_232, 1); x_234 = x_232; } else { lean_dec_ref(x_232); x_234 = lean_box(0); } if (lean_is_scalar(x_234)) { x_235 = lean_alloc_ctor(1, 2, 0); } else { x_235 = x_234; lean_ctor_set_tag(x_235, 1); } lean_ctor_set(x_235, 0, x_161); lean_ctor_set(x_235, 1, x_233); x_28 = x_235; goto block_40; } } } } } else { lean_object* x_236; lean_object* x_237; 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; 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_236 = lean_ctor_get(x_46, 0); x_237 = lean_ctor_get(x_46, 1); x_238 = lean_ctor_get(x_46, 2); x_239 = lean_ctor_get(x_46, 3); lean_inc(x_239); lean_inc(x_238); lean_inc(x_237); lean_inc(x_236); lean_dec(x_46); lean_inc(x_1); x_240 = l_Lean_MetavarContext_instantiateMVarDeclMVars(x_236, x_1); x_241 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_241, 0, x_240); lean_ctor_set(x_241, 1, x_237); lean_ctor_set(x_241, 2, x_238); lean_ctor_set(x_241, 3, x_239); x_242 = lean_st_ref_set(x_6, x_241, x_47); x_243 = lean_ctor_get(x_242, 1); lean_inc(x_243); lean_dec(x_242); x_244 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_evalTactic), 10, 1); lean_closure_set(x_244, 0, x_42); x_245 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_withTacticInfoContext___rarg), 11, 2); lean_closure_set(x_245, 0, x_2); lean_closure_set(x_245, 1, x_244); x_246 = l_Lean_Elab_Term_runTactic___closed__1; x_247 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Tactic_focusAndDone___spec__1___rarg), 11, 2); lean_closure_set(x_247, 0, x_245); lean_closure_set(x_247, 1, x_246); x_248 = lean_st_ref_get(x_8, x_243); x_249 = lean_ctor_get(x_248, 1); lean_inc(x_249); lean_dec(x_248); x_250 = lean_st_ref_get(x_4, x_249); x_251 = lean_ctor_get(x_250, 0); lean_inc(x_251); x_252 = lean_ctor_get(x_251, 5); lean_inc(x_252); lean_dec(x_251); x_253 = lean_ctor_get_uint8(x_252, sizeof(void*)*2); lean_dec(x_252); if (x_253 == 0) { lean_object* x_254; lean_object* x_255; x_254 = lean_ctor_get(x_250, 1); lean_inc(x_254); lean_dec(x_250); 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_255 = l_Lean_Elab_Tactic_run(x_1, x_247, x_3, x_4, x_5, x_6, x_7, x_8, x_254); x_10 = x_255; goto block_27; } else { lean_object* x_256; lean_object* x_257; lean_object* x_258; lean_object* x_259; lean_object* x_260; x_256 = lean_ctor_get(x_250, 1); lean_inc(x_256); lean_dec(x_250); x_257 = l___private_Lean_Elab_InfoTree_0__Lean_Elab_getResetInfoTrees___at_Lean_Elab_Term_withMacroExpansion___spec__2___rarg(x_4, x_5, x_6, x_7, x_8, x_256); x_258 = lean_ctor_get(x_257, 0); lean_inc(x_258); x_259 = lean_ctor_get(x_257, 1); lean_inc(x_259); lean_dec(x_257); 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_1); x_260 = l_Lean_Elab_Tactic_run(x_1, x_247, x_3, x_4, x_5, x_6, x_7, x_8, x_259); if (lean_obj_tag(x_260) == 0) { 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; lean_object* x_269; lean_object* x_270; lean_object* x_271; lean_object* x_272; lean_object* x_273; lean_object* x_274; uint8_t x_275; lean_object* x_276; lean_object* x_277; lean_object* x_278; lean_object* x_279; lean_object* x_280; uint8_t x_281; x_261 = lean_ctor_get(x_260, 0); lean_inc(x_261); x_262 = lean_ctor_get(x_260, 1); lean_inc(x_262); lean_dec(x_260); x_263 = lean_st_ref_get(x_8, x_262); x_264 = lean_ctor_get(x_263, 1); lean_inc(x_264); lean_dec(x_263); x_265 = lean_st_ref_take(x_4, x_264); x_266 = lean_ctor_get(x_265, 0); lean_inc(x_266); x_267 = lean_ctor_get(x_266, 5); lean_inc(x_267); x_268 = lean_ctor_get(x_265, 1); lean_inc(x_268); lean_dec(x_265); x_269 = lean_ctor_get(x_266, 0); lean_inc(x_269); x_270 = lean_ctor_get(x_266, 1); lean_inc(x_270); x_271 = lean_ctor_get(x_266, 2); lean_inc(x_271); x_272 = lean_ctor_get(x_266, 3); lean_inc(x_272); x_273 = lean_ctor_get(x_266, 4); lean_inc(x_273); if (lean_is_exclusive(x_266)) { lean_ctor_release(x_266, 0); lean_ctor_release(x_266, 1); lean_ctor_release(x_266, 2); lean_ctor_release(x_266, 3); lean_ctor_release(x_266, 4); lean_ctor_release(x_266, 5); x_274 = x_266; } else { lean_dec_ref(x_266); x_274 = lean_box(0); } x_275 = lean_ctor_get_uint8(x_267, sizeof(void*)*2); x_276 = lean_ctor_get(x_267, 0); lean_inc(x_276); x_277 = lean_ctor_get(x_267, 1); lean_inc(x_277); if (lean_is_exclusive(x_267)) { lean_ctor_release(x_267, 0); lean_ctor_release(x_267, 1); x_278 = x_267; } else { lean_dec_ref(x_267); x_278 = lean_box(0); } x_279 = lean_ctor_get(x_277, 2); lean_inc(x_279); x_280 = lean_unsigned_to_nat(0u); x_281 = lean_nat_dec_lt(x_280, x_279); if (x_281 == 0) { lean_object* x_282; lean_object* x_283; lean_object* x_284; lean_object* x_285; lean_object* x_286; lean_object* x_287; lean_object* x_288; lean_object* x_289; lean_dec(x_279); lean_dec(x_277); lean_dec(x_1); if (lean_is_scalar(x_278)) { x_282 = lean_alloc_ctor(0, 2, 1); } else { x_282 = x_278; } lean_ctor_set(x_282, 0, x_276); lean_ctor_set(x_282, 1, x_258); lean_ctor_set_uint8(x_282, sizeof(void*)*2, x_275); if (lean_is_scalar(x_274)) { x_283 = lean_alloc_ctor(0, 6, 0); } else { x_283 = x_274; } lean_ctor_set(x_283, 0, x_269); lean_ctor_set(x_283, 1, x_270); lean_ctor_set(x_283, 2, x_271); lean_ctor_set(x_283, 3, x_272); lean_ctor_set(x_283, 4, x_273); lean_ctor_set(x_283, 5, x_282); x_284 = lean_st_ref_set(x_4, x_283, x_268); x_285 = lean_ctor_get(x_284, 1); lean_inc(x_285); if (lean_is_exclusive(x_284)) { lean_ctor_release(x_284, 0); lean_ctor_release(x_284, 1); x_286 = x_284; } else { lean_dec_ref(x_284); x_286 = lean_box(0); } x_287 = lean_box(0); x_288 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_288, 0, x_261); lean_ctor_set(x_288, 1, x_287); if (lean_is_scalar(x_286)) { x_289 = lean_alloc_ctor(0, 2, 0); } else { x_289 = x_286; } lean_ctor_set(x_289, 0, x_288); lean_ctor_set(x_289, 1, x_285); x_28 = x_289; goto block_40; } else { lean_object* x_290; lean_object* x_291; lean_object* x_292; lean_object* x_293; lean_object* x_294; lean_object* x_295; lean_object* x_296; lean_object* x_297; lean_object* x_298; lean_object* x_299; lean_object* x_300; x_290 = lean_nat_sub(x_279, x_41); lean_dec(x_279); x_291 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_277, x_290); lean_dec(x_290); x_292 = l_Std_PersistentHashMap_insert___at_Lean_Elab_assignInfoHoleId___spec__1(x_276, x_1, x_291); if (lean_is_scalar(x_278)) { x_293 = lean_alloc_ctor(0, 2, 1); } else { x_293 = x_278; } lean_ctor_set(x_293, 0, x_292); lean_ctor_set(x_293, 1, x_258); lean_ctor_set_uint8(x_293, sizeof(void*)*2, x_275); if (lean_is_scalar(x_274)) { x_294 = lean_alloc_ctor(0, 6, 0); } else { x_294 = x_274; } lean_ctor_set(x_294, 0, x_269); lean_ctor_set(x_294, 1, x_270); lean_ctor_set(x_294, 2, x_271); lean_ctor_set(x_294, 3, x_272); lean_ctor_set(x_294, 4, x_273); lean_ctor_set(x_294, 5, x_293); x_295 = lean_st_ref_set(x_4, x_294, x_268); x_296 = lean_ctor_get(x_295, 1); lean_inc(x_296); if (lean_is_exclusive(x_295)) { lean_ctor_release(x_295, 0); lean_ctor_release(x_295, 1); x_297 = x_295; } else { lean_dec_ref(x_295); x_297 = lean_box(0); } x_298 = lean_box(0); x_299 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_299, 0, x_261); lean_ctor_set(x_299, 1, x_298); if (lean_is_scalar(x_297)) { x_300 = lean_alloc_ctor(0, 2, 0); } else { x_300 = x_297; } lean_ctor_set(x_300, 0, x_299); lean_ctor_set(x_300, 1, x_296); x_28 = x_300; goto block_40; } } else { lean_object* x_301; lean_object* x_302; lean_object* x_303; lean_object* x_304; lean_object* x_305; 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; uint8_t x_315; lean_object* x_316; lean_object* x_317; lean_object* x_318; lean_object* x_319; lean_object* x_320; uint8_t x_321; x_301 = lean_ctor_get(x_260, 0); lean_inc(x_301); x_302 = lean_ctor_get(x_260, 1); lean_inc(x_302); lean_dec(x_260); x_303 = lean_st_ref_get(x_8, x_302); x_304 = lean_ctor_get(x_303, 1); lean_inc(x_304); lean_dec(x_303); x_305 = lean_st_ref_take(x_4, x_304); x_306 = lean_ctor_get(x_305, 0); lean_inc(x_306); x_307 = lean_ctor_get(x_306, 5); lean_inc(x_307); x_308 = lean_ctor_get(x_305, 1); lean_inc(x_308); lean_dec(x_305); x_309 = lean_ctor_get(x_306, 0); lean_inc(x_309); x_310 = lean_ctor_get(x_306, 1); lean_inc(x_310); x_311 = lean_ctor_get(x_306, 2); lean_inc(x_311); x_312 = lean_ctor_get(x_306, 3); lean_inc(x_312); x_313 = lean_ctor_get(x_306, 4); lean_inc(x_313); if (lean_is_exclusive(x_306)) { lean_ctor_release(x_306, 0); lean_ctor_release(x_306, 1); lean_ctor_release(x_306, 2); lean_ctor_release(x_306, 3); lean_ctor_release(x_306, 4); lean_ctor_release(x_306, 5); x_314 = x_306; } else { lean_dec_ref(x_306); x_314 = lean_box(0); } x_315 = lean_ctor_get_uint8(x_307, sizeof(void*)*2); x_316 = lean_ctor_get(x_307, 0); lean_inc(x_316); x_317 = lean_ctor_get(x_307, 1); lean_inc(x_317); if (lean_is_exclusive(x_307)) { lean_ctor_release(x_307, 0); lean_ctor_release(x_307, 1); x_318 = x_307; } else { lean_dec_ref(x_307); x_318 = lean_box(0); } x_319 = lean_ctor_get(x_317, 2); lean_inc(x_319); x_320 = lean_unsigned_to_nat(0u); x_321 = lean_nat_dec_lt(x_320, x_319); if (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_319); lean_dec(x_317); lean_dec(x_1); if (lean_is_scalar(x_318)) { x_322 = lean_alloc_ctor(0, 2, 1); } else { x_322 = x_318; } lean_ctor_set(x_322, 0, x_316); lean_ctor_set(x_322, 1, x_258); lean_ctor_set_uint8(x_322, sizeof(void*)*2, x_315); if (lean_is_scalar(x_314)) { x_323 = lean_alloc_ctor(0, 6, 0); } else { x_323 = x_314; } lean_ctor_set(x_323, 0, x_309); lean_ctor_set(x_323, 1, x_310); lean_ctor_set(x_323, 2, x_311); lean_ctor_set(x_323, 3, x_312); lean_ctor_set(x_323, 4, x_313); lean_ctor_set(x_323, 5, x_322); x_324 = lean_st_ref_set(x_4, x_323, x_308); x_325 = lean_ctor_get(x_324, 1); lean_inc(x_325); if (lean_is_exclusive(x_324)) { lean_ctor_release(x_324, 0); lean_ctor_release(x_324, 1); x_326 = x_324; } else { lean_dec_ref(x_324); x_326 = lean_box(0); } if (lean_is_scalar(x_326)) { x_327 = lean_alloc_ctor(1, 2, 0); } else { x_327 = x_326; lean_ctor_set_tag(x_327, 1); } lean_ctor_set(x_327, 0, x_301); lean_ctor_set(x_327, 1, x_325); x_28 = x_327; goto block_40; } 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; lean_object* x_335; lean_object* x_336; x_328 = lean_nat_sub(x_319, x_41); lean_dec(x_319); x_329 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_317, x_328); lean_dec(x_328); x_330 = l_Std_PersistentHashMap_insert___at_Lean_Elab_assignInfoHoleId___spec__1(x_316, x_1, x_329); if (lean_is_scalar(x_318)) { x_331 = lean_alloc_ctor(0, 2, 1); } else { x_331 = x_318; } lean_ctor_set(x_331, 0, x_330); lean_ctor_set(x_331, 1, x_258); lean_ctor_set_uint8(x_331, sizeof(void*)*2, x_315); if (lean_is_scalar(x_314)) { x_332 = lean_alloc_ctor(0, 6, 0); } else { x_332 = x_314; } lean_ctor_set(x_332, 0, x_309); lean_ctor_set(x_332, 1, x_310); lean_ctor_set(x_332, 2, x_311); lean_ctor_set(x_332, 3, x_312); lean_ctor_set(x_332, 4, x_313); lean_ctor_set(x_332, 5, x_331); x_333 = lean_st_ref_set(x_4, x_332, x_308); x_334 = lean_ctor_get(x_333, 1); lean_inc(x_334); if (lean_is_exclusive(x_333)) { lean_ctor_release(x_333, 0); lean_ctor_release(x_333, 1); x_335 = x_333; } else { lean_dec_ref(x_333); 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_tag(x_336, 1); } lean_ctor_set(x_336, 0, x_301); lean_ctor_set(x_336, 1, x_334); x_28 = x_336; goto block_40; } } } } block_27: { if (lean_obj_tag(x_10) == 0) { uint8_t x_11; x_11 = !lean_is_exclusive(x_10); if (x_11 == 0) { lean_object* x_12; lean_object* x_13; uint8_t x_14; x_12 = lean_ctor_get(x_10, 0); x_13 = lean_ctor_get(x_10, 1); x_14 = l_List_isEmpty___rarg(x_12); if (x_14 == 0) { lean_object* x_15; lean_free_object(x_10); x_15 = l_Lean_Elab_Term_reportUnsolvedGoals(x_12, x_3, x_4, x_5, x_6, x_7, x_8, x_13); return x_15; } else { lean_object* x_16; lean_dec(x_12); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_16 = lean_box(0); lean_ctor_set(x_10, 0, x_16); return x_10; } } else { lean_object* x_17; lean_object* x_18; uint8_t x_19; x_17 = lean_ctor_get(x_10, 0); x_18 = lean_ctor_get(x_10, 1); lean_inc(x_18); lean_inc(x_17); lean_dec(x_10); x_19 = l_List_isEmpty___rarg(x_17); if (x_19 == 0) { lean_object* x_20; x_20 = l_Lean_Elab_Term_reportUnsolvedGoals(x_17, x_3, x_4, x_5, x_6, x_7, x_8, x_18); return x_20; } else { lean_object* x_21; lean_object* x_22; lean_dec(x_17); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_21 = lean_box(0); x_22 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_22, 0, x_21); lean_ctor_set(x_22, 1, x_18); return x_22; } } } else { uint8_t x_23; lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); x_23 = !lean_is_exclusive(x_10); if (x_23 == 0) { return x_10; } else { lean_object* x_24; lean_object* x_25; lean_object* x_26; x_24 = lean_ctor_get(x_10, 0); x_25 = lean_ctor_get(x_10, 1); lean_inc(x_25); lean_inc(x_24); lean_dec(x_10); 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; } } } block_40: { if (lean_obj_tag(x_28) == 0) { uint8_t x_29; x_29 = !lean_is_exclusive(x_28); if (x_29 == 0) { lean_object* x_30; lean_object* x_31; x_30 = lean_ctor_get(x_28, 0); x_31 = lean_ctor_get(x_30, 0); lean_inc(x_31); lean_dec(x_30); lean_ctor_set(x_28, 0, x_31); x_10 = x_28; goto block_27; } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; x_32 = lean_ctor_get(x_28, 0); x_33 = lean_ctor_get(x_28, 1); lean_inc(x_33); lean_inc(x_32); lean_dec(x_28); x_34 = lean_ctor_get(x_32, 0); lean_inc(x_34); lean_dec(x_32); x_35 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_35, 0, x_34); lean_ctor_set(x_35, 1, x_33); x_10 = x_35; goto block_27; } } else { uint8_t x_36; x_36 = !lean_is_exclusive(x_28); if (x_36 == 0) { x_10 = x_28; goto block_27; } else { lean_object* x_37; lean_object* x_38; lean_object* x_39; x_37 = lean_ctor_get(x_28, 0); x_38 = lean_ctor_get(x_28, 1); lean_inc(x_38); lean_inc(x_37); lean_dec(x_28); x_39 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_39, 0, x_37); lean_ctor_set(x_39, 1, x_38); x_10 = x_39; goto block_27; } } } } } lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVars(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* x_8) { _start: { lean_object* x_9; lean_object* x_10; x_9 = lean_box(0); x_10 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_1, x_9, x_2, x_3, x_4, x_5, x_6, x_7, x_8); return x_10; } } lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVars_loop___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: { uint8_t x_11; lean_object* x_12; x_11 = lean_unbox(x_2); lean_dec(x_2); x_12 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop___lambda__1(x_1, x_11, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); lean_dec(x_3); lean_dec(x_1); return x_12; } } lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVars_loop___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { uint8_t x_10; lean_object* x_11; x_10 = lean_unbox(x_1); lean_dec(x_1); x_11 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_10, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); lean_dec(x_2); return x_11; } } lean_object* l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; x_9 = l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___lambda__1(x_1, 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_2); return x_9; } } lean_object* l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { uint8_t x_13; uint8_t x_14; lean_object* x_15; x_13 = lean_unbox(x_1); lean_dec(x_1); x_14 = lean_unbox(x_2); lean_dec(x_2); x_15 = l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1(x_13, x_14, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); return x_15; } } lean_object* l_Std_fmt___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__2___boxed(lean_object* x_1) { _start: { uint8_t x_2; lean_object* x_3; x_2 = lean_unbox(x_1); lean_dec(x_1); x_3 = l_Std_fmt___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__2(x_2); return x_3; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { uint8_t x_10; uint8_t x_11; lean_object* x_12; x_10 = lean_unbox(x_1); lean_dec(x_1); x_11 = lean_unbox(x_2); lean_dec(x_2); x_12 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep(x_10, x_11, x_3, x_4, x_5, x_6, x_7, x_8, x_9); return x_12; } } lean_object* l_ReaderT_pure___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; x_9 = l_ReaderT_pure___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar___spec__1___rarg(x_1, 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_2); return x_9; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar___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: { uint8_t x_11; uint8_t x_12; lean_object* x_13; x_11 = lean_unbox(x_2); lean_dec(x_2); x_12 = lean_unbox(x_3); lean_dec(x_3); x_13 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar(x_1, x_11, x_12, x_4, x_5, x_6, x_7, x_8, x_9, x_10); return x_13; } } lean_object* l_Lean_Elab_Term_runTactic___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_11; x_11 = l_Lean_Elab_Term_runTactic___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_3); lean_dec(x_2); lean_dec(x_1); return x_11; } } lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVars___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; lean_object* x_10; x_9 = lean_unbox(x_1); lean_dec(x_1); x_10 = l_Lean_Elab_Term_synthesizeSyntheticMVars(x_9, x_2, x_3, x_4, x_5, x_6, x_7, x_8); return x_10; } } lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVarsNoPostponing(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; lean_object* x_10; x_8 = 0; x_9 = lean_box(0); x_10 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_8, x_9, x_1, x_2, x_3, x_4, x_5, x_6, x_7); return x_10; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultLoop(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_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); lean_inc(x_1); x_8 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault(x_1, x_2, x_3, x_4, x_5, x_6, x_7); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; uint8_t x_10; x_9 = lean_ctor_get(x_8, 0); lean_inc(x_9); x_10 = lean_unbox(x_9); lean_dec(x_9); if (x_10 == 0) { uint8_t x_11; 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_11 = !lean_is_exclusive(x_8); if (x_11 == 0) { lean_object* x_12; lean_object* x_13; x_12 = lean_ctor_get(x_8, 0); lean_dec(x_12); x_13 = lean_box(0); lean_ctor_set(x_8, 0, x_13); return x_8; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; x_14 = lean_ctor_get(x_8, 1); lean_inc(x_14); lean_dec(x_8); x_15 = lean_box(0); x_16 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_16, 0, x_15); lean_ctor_set(x_16, 1, x_14); return x_16; } } else { lean_object* x_17; uint8_t x_18; lean_object* x_19; lean_object* x_20; x_17 = lean_ctor_get(x_8, 1); lean_inc(x_17); lean_dec(x_8); x_18 = 1; x_19 = lean_box(0); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); lean_inc(x_1); x_20 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_18, x_19, x_1, x_2, x_3, x_4, x_5, x_6, x_17); if (lean_obj_tag(x_20) == 0) { lean_object* x_21; x_21 = lean_ctor_get(x_20, 1); lean_inc(x_21); lean_dec(x_20); x_7 = x_21; goto _start; } else { uint8_t x_23; 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_23 = !lean_is_exclusive(x_20); if (x_23 == 0) { return x_20; } else { lean_object* x_24; lean_object* x_25; lean_object* x_26; x_24 = lean_ctor_get(x_20, 0); x_25 = lean_ctor_get(x_20, 1); lean_inc(x_25); lean_inc(x_24); lean_dec(x_20); x_26 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_26, 0, x_24); lean_ctor_set(x_26, 1, x_25); return x_26; } } } } else { uint8_t x_27; lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_27 = !lean_is_exclusive(x_8); if (x_27 == 0) { return x_8; } else { lean_object* x_28; lean_object* x_29; lean_object* x_30; x_28 = lean_ctor_get(x_8, 0); x_29 = lean_ctor_get(x_8, 1); lean_inc(x_29); lean_inc(x_28); lean_dec(x_8); x_30 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_30, 0, x_28); lean_ctor_set(x_30, 1, x_29); return x_30; } } } } lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVarsUsingDefault(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; lean_object* x_10; x_8 = 1; x_9 = lean_box(0); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); lean_inc(x_1); x_10 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_8, x_9, x_1, x_2, x_3, x_4, x_5, x_6, x_7); if (lean_obj_tag(x_10) == 0) { lean_object* x_11; lean_object* x_12; x_11 = lean_ctor_get(x_10, 1); lean_inc(x_11); lean_dec(x_10); x_12 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultLoop(x_1, x_2, x_3, x_4, x_5, x_6, x_11); return x_12; } else { uint8_t x_13; 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_13 = !lean_is_exclusive(x_10); if (x_13 == 0) { return x_10; } else { lean_object* x_14; lean_object* x_15; lean_object* x_16; x_14 = lean_ctor_get(x_10, 0); x_15 = lean_ctor_get(x_10, 1); lean_inc(x_15); lean_inc(x_14); lean_dec(x_10); x_16 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_16, 0, x_14); lean_ctor_set(x_16, 1, x_15); return x_16; } } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp_match__1___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_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_object* x_8; lean_object* x_9; lean_dec(x_2); x_7 = lean_ctor_get(x_1, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_1, 1); lean_inc(x_8); lean_dec(x_1); x_9 = lean_apply_2(x_3, x_7, x_8); return x_9; } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp_match__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp_match__1___rarg), 3, 0); return x_3; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp___rarg(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { 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_47; lean_object* x_48; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; uint8_t x_80; x_10 = lean_st_ref_get(x_8, x_9); x_11 = lean_ctor_get(x_10, 1); lean_inc(x_11); lean_dec(x_10); x_12 = lean_st_ref_get(x_4, x_11); x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_12, 1); lean_inc(x_14); lean_dec(x_12); x_15 = lean_ctor_get(x_13, 1); lean_inc(x_15); lean_dec(x_13); x_75 = lean_st_ref_get(x_8, x_14); x_76 = lean_ctor_get(x_75, 1); lean_inc(x_76); lean_dec(x_75); x_77 = lean_st_ref_take(x_4, x_76); x_78 = lean_ctor_get(x_77, 0); lean_inc(x_78); x_79 = lean_ctor_get(x_77, 1); lean_inc(x_79); lean_dec(x_77); x_80 = !lean_is_exclusive(x_78); if (x_80 == 0) { lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; x_81 = lean_ctor_get(x_78, 1); lean_dec(x_81); x_82 = lean_box(0); lean_ctor_set(x_78, 1, x_82); x_83 = lean_st_ref_set(x_4, x_78, x_79); x_84 = lean_ctor_get(x_83, 1); lean_inc(x_84); lean_dec(x_83); 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_85 = lean_apply_7(x_1, x_3, x_4, x_5, x_6, x_7, x_8, x_84); if (lean_obj_tag(x_85) == 0) { lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; x_86 = lean_ctor_get(x_85, 0); lean_inc(x_86); x_87 = lean_ctor_get(x_85, 1); lean_inc(x_87); lean_dec(x_85); x_88 = 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_3); x_89 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_2, x_88, x_3, x_4, x_5, x_6, x_7, x_8, x_87); if (lean_obj_tag(x_89) == 0) { if (x_2 == 0) { lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; x_90 = lean_ctor_get(x_89, 1); lean_inc(x_90); lean_dec(x_89); x_91 = l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryLiftAndCoe___lambda__1(x_86, x_88, x_3, x_4, x_5, x_6, x_7, x_8, x_90); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); x_92 = lean_ctor_get(x_91, 0); lean_inc(x_92); x_93 = lean_ctor_get(x_91, 1); lean_inc(x_93); lean_dec(x_91); x_16 = x_92; x_17 = x_93; goto block_46; } else { lean_object* x_94; lean_object* x_95; x_94 = lean_ctor_get(x_89, 1); lean_inc(x_94); lean_dec(x_89); 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_95 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultLoop(x_3, x_4, x_5, x_6, x_7, x_8, 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; 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 = l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryLiftAndCoe___lambda__1(x_86, x_96, x_3, x_4, x_5, x_6, x_7, x_8, x_97); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_96); x_99 = lean_ctor_get(x_98, 0); lean_inc(x_99); x_100 = lean_ctor_get(x_98, 1); lean_inc(x_100); lean_dec(x_98); x_16 = x_99; x_17 = x_100; goto block_46; } else { lean_object* x_101; lean_object* x_102; lean_dec(x_86); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); x_101 = lean_ctor_get(x_95, 0); lean_inc(x_101); x_102 = lean_ctor_get(x_95, 1); lean_inc(x_102); lean_dec(x_95); x_47 = x_101; x_48 = x_102; goto block_74; } } } else { lean_object* x_103; lean_object* x_104; lean_dec(x_86); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); x_103 = lean_ctor_get(x_89, 0); lean_inc(x_103); x_104 = lean_ctor_get(x_89, 1); lean_inc(x_104); lean_dec(x_89); x_47 = x_103; x_48 = x_104; goto block_74; } } else { lean_object* x_105; lean_object* x_106; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); x_105 = lean_ctor_get(x_85, 0); lean_inc(x_105); x_106 = lean_ctor_get(x_85, 1); lean_inc(x_106); lean_dec(x_85); x_47 = x_105; x_48 = x_106; goto block_74; } } else { lean_object* x_107; 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; lean_object* x_115; lean_object* x_116; x_107 = lean_ctor_get(x_78, 0); x_108 = lean_ctor_get(x_78, 2); x_109 = lean_ctor_get(x_78, 3); x_110 = lean_ctor_get(x_78, 4); x_111 = lean_ctor_get(x_78, 5); lean_inc(x_111); lean_inc(x_110); lean_inc(x_109); lean_inc(x_108); lean_inc(x_107); lean_dec(x_78); x_112 = lean_box(0); x_113 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_113, 0, x_107); lean_ctor_set(x_113, 1, x_112); lean_ctor_set(x_113, 2, x_108); lean_ctor_set(x_113, 3, x_109); lean_ctor_set(x_113, 4, x_110); lean_ctor_set(x_113, 5, x_111); x_114 = lean_st_ref_set(x_4, x_113, x_79); x_115 = lean_ctor_get(x_114, 1); lean_inc(x_115); lean_dec(x_114); 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 = lean_apply_7(x_1, x_3, x_4, x_5, x_6, x_7, x_8, x_115); if (lean_obj_tag(x_116) == 0) { lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; x_117 = lean_ctor_get(x_116, 0); lean_inc(x_117); x_118 = lean_ctor_get(x_116, 1); lean_inc(x_118); lean_dec(x_116); x_119 = 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_3); x_120 = l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(x_2, x_119, x_3, x_4, x_5, x_6, x_7, x_8, x_118); if (lean_obj_tag(x_120) == 0) { if (x_2 == 0) { lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; x_121 = lean_ctor_get(x_120, 1); lean_inc(x_121); lean_dec(x_120); x_122 = l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryLiftAndCoe___lambda__1(x_117, x_119, 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_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_16 = x_123; x_17 = x_124; goto block_46; } else { lean_object* x_125; lean_object* x_126; x_125 = lean_ctor_get(x_120, 1); lean_inc(x_125); lean_dec(x_120); 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_126 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefaultLoop(x_3, x_4, x_5, x_6, x_7, x_8, x_125); if (lean_obj_tag(x_126) == 0) { lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; x_127 = lean_ctor_get(x_126, 0); lean_inc(x_127); x_128 = lean_ctor_get(x_126, 1); lean_inc(x_128); lean_dec(x_126); x_129 = l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryLiftAndCoe___lambda__1(x_117, x_127, x_3, x_4, x_5, x_6, x_7, x_8, x_128); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_127); x_130 = lean_ctor_get(x_129, 0); lean_inc(x_130); x_131 = lean_ctor_get(x_129, 1); lean_inc(x_131); lean_dec(x_129); x_16 = x_130; x_17 = x_131; goto block_46; } else { lean_object* x_132; lean_object* x_133; lean_dec(x_117); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); x_132 = lean_ctor_get(x_126, 0); lean_inc(x_132); x_133 = lean_ctor_get(x_126, 1); lean_inc(x_133); lean_dec(x_126); x_47 = x_132; x_48 = x_133; goto block_74; } } } else { lean_object* x_134; lean_object* x_135; lean_dec(x_117); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); x_134 = lean_ctor_get(x_120, 0); lean_inc(x_134); x_135 = lean_ctor_get(x_120, 1); lean_inc(x_135); lean_dec(x_120); x_47 = x_134; x_48 = x_135; goto block_74; } } else { lean_object* x_136; lean_object* x_137; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); x_136 = lean_ctor_get(x_116, 0); lean_inc(x_136); x_137 = lean_ctor_get(x_116, 1); lean_inc(x_137); lean_dec(x_116); x_47 = x_136; x_48 = x_137; goto block_74; } } block_46: { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; x_18 = lean_st_ref_get(x_8, x_17); lean_dec(x_8); x_19 = lean_ctor_get(x_18, 1); lean_inc(x_19); lean_dec(x_18); x_20 = lean_st_ref_take(x_4, x_19); x_21 = lean_ctor_get(x_20, 0); lean_inc(x_21); x_22 = lean_ctor_get(x_20, 1); lean_inc(x_22); lean_dec(x_20); x_23 = !lean_is_exclusive(x_21); if (x_23 == 0) { lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_27; x_24 = lean_ctor_get(x_21, 1); x_25 = l_List_append___rarg(x_24, x_15); lean_ctor_set(x_21, 1, x_25); x_26 = lean_st_ref_set(x_4, x_21, x_22); lean_dec(x_4); x_27 = !lean_is_exclusive(x_26); if (x_27 == 0) { lean_object* x_28; lean_object* x_29; x_28 = lean_ctor_get(x_26, 0); lean_dec(x_28); x_29 = lean_ctor_get(x_16, 0); lean_inc(x_29); lean_dec(x_16); lean_ctor_set(x_26, 0, x_29); return x_26; } else { lean_object* x_30; lean_object* x_31; lean_object* x_32; x_30 = lean_ctor_get(x_26, 1); lean_inc(x_30); lean_dec(x_26); x_31 = lean_ctor_get(x_16, 0); lean_inc(x_31); lean_dec(x_16); x_32 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_32, 0, x_31); lean_ctor_set(x_32, 1, x_30); return x_32; } } else { lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; x_33 = lean_ctor_get(x_21, 0); x_34 = lean_ctor_get(x_21, 1); x_35 = lean_ctor_get(x_21, 2); x_36 = lean_ctor_get(x_21, 3); x_37 = lean_ctor_get(x_21, 4); x_38 = lean_ctor_get(x_21, 5); lean_inc(x_38); lean_inc(x_37); lean_inc(x_36); lean_inc(x_35); lean_inc(x_34); lean_inc(x_33); lean_dec(x_21); x_39 = l_List_append___rarg(x_34, x_15); x_40 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_40, 0, x_33); lean_ctor_set(x_40, 1, x_39); lean_ctor_set(x_40, 2, x_35); lean_ctor_set(x_40, 3, x_36); lean_ctor_set(x_40, 4, x_37); lean_ctor_set(x_40, 5, x_38); x_41 = lean_st_ref_set(x_4, x_40, x_22); lean_dec(x_4); x_42 = lean_ctor_get(x_41, 1); lean_inc(x_42); if (lean_is_exclusive(x_41)) { lean_ctor_release(x_41, 0); lean_ctor_release(x_41, 1); x_43 = x_41; } else { lean_dec_ref(x_41); x_43 = lean_box(0); } x_44 = lean_ctor_get(x_16, 0); lean_inc(x_44); lean_dec(x_16); if (lean_is_scalar(x_43)) { x_45 = lean_alloc_ctor(0, 2, 0); } else { x_45 = x_43; } lean_ctor_set(x_45, 0, x_44); lean_ctor_set(x_45, 1, x_42); return x_45; } } block_74: { lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; uint8_t x_54; x_49 = lean_st_ref_get(x_8, x_48); lean_dec(x_8); x_50 = lean_ctor_get(x_49, 1); lean_inc(x_50); lean_dec(x_49); x_51 = lean_st_ref_take(x_4, x_50); x_52 = lean_ctor_get(x_51, 0); lean_inc(x_52); x_53 = lean_ctor_get(x_51, 1); lean_inc(x_53); lean_dec(x_51); x_54 = !lean_is_exclusive(x_52); if (x_54 == 0) { lean_object* x_55; lean_object* x_56; lean_object* x_57; uint8_t x_58; x_55 = lean_ctor_get(x_52, 1); x_56 = l_List_append___rarg(x_55, x_15); lean_ctor_set(x_52, 1, x_56); x_57 = lean_st_ref_set(x_4, x_52, x_53); lean_dec(x_4); x_58 = !lean_is_exclusive(x_57); if (x_58 == 0) { lean_object* x_59; x_59 = lean_ctor_get(x_57, 0); lean_dec(x_59); lean_ctor_set_tag(x_57, 1); lean_ctor_set(x_57, 0, x_47); return x_57; } else { lean_object* x_60; lean_object* x_61; x_60 = lean_ctor_get(x_57, 1); lean_inc(x_60); lean_dec(x_57); x_61 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_61, 0, x_47); 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; 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_62 = lean_ctor_get(x_52, 0); x_63 = lean_ctor_get(x_52, 1); x_64 = lean_ctor_get(x_52, 2); x_65 = lean_ctor_get(x_52, 3); x_66 = lean_ctor_get(x_52, 4); x_67 = lean_ctor_get(x_52, 5); lean_inc(x_67); lean_inc(x_66); lean_inc(x_65); lean_inc(x_64); lean_inc(x_63); lean_inc(x_62); lean_dec(x_52); x_68 = l_List_append___rarg(x_63, x_15); x_69 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_69, 0, x_62); lean_ctor_set(x_69, 1, x_68); lean_ctor_set(x_69, 2, x_64); lean_ctor_set(x_69, 3, x_65); lean_ctor_set(x_69, 4, x_66); lean_ctor_set(x_69, 5, x_67); x_70 = lean_st_ref_set(x_4, x_69, x_53); lean_dec(x_4); x_71 = lean_ctor_get(x_70, 1); lean_inc(x_71); if (lean_is_exclusive(x_70)) { lean_ctor_release(x_70, 0); lean_ctor_release(x_70, 1); x_72 = x_70; } else { lean_dec_ref(x_70); x_72 = lean_box(0); } if (lean_is_scalar(x_72)) { x_73 = lean_alloc_ctor(1, 2, 0); } else { x_73 = x_72; lean_ctor_set_tag(x_73, 1); } lean_ctor_set(x_73, 0, x_47); lean_ctor_set(x_73, 1, x_71); return x_73; } } } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp(lean_object* x_1) { _start: { lean_object* x_2; x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp___rarg___boxed), 9, 0); return x_2; } } lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp___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* x_9) { _start: { uint8_t x_10; lean_object* x_11; x_10 = lean_unbox(x_2); lean_dec(x_2); x_11 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp___rarg(x_1, x_10, x_3, x_4, x_5, x_6, x_7, x_8, x_9); return x_11; } } lean_object* l_Lean_Elab_Term_withSynthesize___rarg___lambda__1(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* x_8, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; x_11 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp___rarg(x_3, x_1, x_4, x_5, x_6, x_7, x_8, x_9, x_10); return x_11; } } lean_object* l_Lean_Elab_Term_withSynthesize___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4) { _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_box(x_4); x_6 = lean_alloc_closure((void*)(l_Lean_Elab_Term_withSynthesize___rarg___lambda__1___boxed), 10, 1); lean_closure_set(x_6, 0, x_5); x_7 = lean_apply_3(x_1, lean_box(0), x_6, x_3); return x_7; } } lean_object* l_Lean_Elab_Term_withSynthesize(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = lean_alloc_closure((void*)(l_Lean_Elab_Term_withSynthesize___rarg___boxed), 4, 0); return x_3; } } lean_object* l_Lean_Elab_Term_withSynthesize___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* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { uint8_t x_11; lean_object* x_12; x_11 = lean_unbox(x_1); lean_dec(x_1); x_12 = l_Lean_Elab_Term_withSynthesize___rarg___lambda__1(x_11, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); return x_12; } } lean_object* l_Lean_Elab_Term_withSynthesize___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { uint8_t x_5; lean_object* x_6; x_5 = lean_unbox(x_4); lean_dec(x_4); x_6 = l_Lean_Elab_Term_withSynthesize___rarg(x_1, x_2, x_3, x_5); lean_dec(x_2); return x_6; } } lean_object* l_Lean_Elab_Term_elabTermAndSynthesize(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: { uint8_t x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; x_10 = 1; x_11 = lean_box(x_10); x_12 = lean_box(x_10); lean_inc(x_1); x_13 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabTerm___boxed), 11, 4); lean_closure_set(x_13, 0, x_1); lean_closure_set(x_13, 1, x_2); lean_closure_set(x_13, 2, x_11); lean_closure_set(x_13, 3, x_12); x_14 = !lean_is_exclusive(x_7); if (x_14 == 0) { lean_object* x_15; lean_object* x_16; uint8_t x_17; lean_object* x_18; x_15 = lean_ctor_get(x_7, 3); x_16 = l_Lean_replaceRef(x_1, x_15); lean_dec(x_15); lean_dec(x_1); lean_ctor_set(x_7, 3, x_16); x_17 = 0; lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); x_18 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp___rarg(x_13, x_17, x_3, x_4, x_5, x_6, x_7, x_8, x_9); if (lean_obj_tag(x_18) == 0) { lean_object* x_19; lean_object* x_20; lean_object* x_21; 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 = l_Lean_Meta_instantiateMVars(x_19, x_5, x_6, x_7, x_8, x_20); return x_21; } else { uint8_t x_22; lean_dec(x_7); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); x_22 = !lean_is_exclusive(x_18); if (x_22 == 0) { return x_18; } else { lean_object* x_23; lean_object* x_24; lean_object* x_25; x_23 = lean_ctor_get(x_18, 0); x_24 = lean_ctor_get(x_18, 1); lean_inc(x_24); lean_inc(x_23); lean_dec(x_18); 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; } } } else { lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36; lean_object* x_37; x_26 = lean_ctor_get(x_7, 0); x_27 = lean_ctor_get(x_7, 1); x_28 = lean_ctor_get(x_7, 2); x_29 = lean_ctor_get(x_7, 3); x_30 = lean_ctor_get(x_7, 4); x_31 = lean_ctor_get(x_7, 5); x_32 = lean_ctor_get(x_7, 6); x_33 = lean_ctor_get(x_7, 7); lean_inc(x_33); lean_inc(x_32); lean_inc(x_31); lean_inc(x_30); lean_inc(x_29); lean_inc(x_28); lean_inc(x_27); lean_inc(x_26); lean_dec(x_7); x_34 = l_Lean_replaceRef(x_1, x_29); lean_dec(x_29); lean_dec(x_1); x_35 = lean_alloc_ctor(0, 8, 0); lean_ctor_set(x_35, 0, x_26); lean_ctor_set(x_35, 1, x_27); lean_ctor_set(x_35, 2, x_28); lean_ctor_set(x_35, 3, x_34); lean_ctor_set(x_35, 4, x_30); lean_ctor_set(x_35, 5, x_31); lean_ctor_set(x_35, 6, x_32); lean_ctor_set(x_35, 7, x_33); x_36 = 0; lean_inc(x_8); lean_inc(x_35); lean_inc(x_6); lean_inc(x_5); x_37 = l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp___rarg(x_13, x_36, x_3, x_4, x_5, x_6, x_35, x_8, x_9); if (lean_obj_tag(x_37) == 0) { lean_object* x_38; lean_object* x_39; lean_object* x_40; x_38 = lean_ctor_get(x_37, 0); lean_inc(x_38); x_39 = lean_ctor_get(x_37, 1); lean_inc(x_39); lean_dec(x_37); x_40 = l_Lean_Meta_instantiateMVars(x_38, x_5, x_6, x_35, x_8, x_39); return x_40; } else { lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_dec(x_35); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); x_41 = lean_ctor_get(x_37, 0); lean_inc(x_41); x_42 = lean_ctor_get(x_37, 1); lean_inc(x_42); if (lean_is_exclusive(x_37)) { lean_ctor_release(x_37, 0); lean_ctor_release(x_37, 1); x_43 = x_37; } else { lean_dec_ref(x_37); x_43 = lean_box(0); } if (lean_is_scalar(x_43)) { x_44 = lean_alloc_ctor(1, 2, 0); } else { x_44 = x_43; } lean_ctor_set(x_44, 0, x_41); lean_ctor_set(x_44, 1, x_42); return x_44; } } } } lean_object* initialize_Init(lean_object*); lean_object* initialize_Lean_Util_ForEachExpr(lean_object*); lean_object* initialize_Lean_Elab_Term(lean_object*); lean_object* initialize_Lean_Elab_Tactic_Basic(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Elab_SyntheticMVars(lean_object* w) { lean_object * res; if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); _G_initialized = true; res = initialize_Init(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Util_ForEachExpr(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Elab_Term(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Elab_Tactic_Basic(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1___closed__1 = _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1___closed__1(); lean_mark_persistent(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1___closed__1); l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1___closed__2 = _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1___closed__2(); lean_mark_persistent(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1___closed__2); l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1___closed__3 = _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1___closed__3(); lean_mark_persistent(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___lambda__1___closed__3); l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___closed__1 = _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___closed__1(); lean_mark_persistent(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar___closed__1); l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3___closed__1 = _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3___closed__1(); lean_mark_persistent(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3___closed__1); l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3___closed__2 = _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3___closed__2(); lean_mark_persistent(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3___closed__2); l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3___closed__3 = _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3___closed__3(); lean_mark_persistent(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingCoeInstMVar___lambda__3___closed__3); l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__1 = _init_l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__1(); lean_mark_persistent(l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__1); l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__2 = _init_l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__2(); lean_mark_persistent(l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__2); l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__3 = _init_l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__3(); lean_mark_persistent(l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__3); l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__4 = _init_l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__4(); lean_mark_persistent(l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__4); l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__5 = _init_l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__5(); lean_mark_persistent(l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___lambda__2___closed__5); l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___closed__1 = _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___closed__1(); lean_mark_persistent(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___closed__1); l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__1___closed__1 = _init_l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__1___closed__1(); lean_mark_persistent(l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__1___closed__1); l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__1___closed__2 = _init_l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__1___closed__2(); lean_mark_persistent(l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__1___closed__2); l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__2___closed__1 = _init_l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__2___closed__1(); lean_mark_persistent(l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__2___closed__1); l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__2___closed__2 = _init_l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__2___closed__2(); lean_mark_persistent(l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__2___closed__2); l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__2___closed__3 = _init_l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__2___closed__3(); lean_mark_persistent(l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__2___closed__3); l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___closed__1 = _init_l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___closed__1(); lean_mark_persistent(l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___closed__1); l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___closed__2 = _init_l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___closed__2(); lean_mark_persistent(l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___closed__2); l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___closed__3 = _init_l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___closed__3(); lean_mark_persistent(l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___closed__3); l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___rarg___closed__1 = _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___rarg___closed__1(); lean_mark_persistent(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_getSomeSynthethicMVarsRef___rarg___closed__1); l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__1 = _init_l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__1(); lean_mark_persistent(l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__1); l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__2 = _init_l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__2(); lean_mark_persistent(l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__2); l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__3 = _init_l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__3(); lean_mark_persistent(l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__3); l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__4 = _init_l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__4(); lean_mark_persistent(l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__4); l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__5 = _init_l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__5(); lean_mark_persistent(l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__5); l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__6 = _init_l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__6(); lean_mark_persistent(l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__6); l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__7 = _init_l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__7(); lean_mark_persistent(l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__7); l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__8 = _init_l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__8(); lean_mark_persistent(l_List_filterAuxM___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__1___closed__8); l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__1 = _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__1(); lean_mark_persistent(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__1); l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__2 = _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__2(); lean_mark_persistent(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__2); l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__3 = _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__3(); lean_mark_persistent(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__3); l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__4 = _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__4(); lean_mark_persistent(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__4); l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__5 = _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__5(); lean_mark_persistent(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__5); l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__6 = _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__6(); lean_mark_persistent(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___closed__6); l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar___closed__1 = _init_l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar___closed__1(); lean_mark_persistent(l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar___closed__1); l_Lean_Elab_Term_runTactic___closed__1 = _init_l_Lean_Elab_Term_runTactic___closed__1(); lean_mark_persistent(l_Lean_Elab_Term_runTactic___closed__1); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus } #endif
itsbriany/Spire
Spire.h
// // Created by itsbriany on 04/02/17. // #ifndef PROJECT_SPIRE_H #define PROJECT_SPIRE_H class Spire { public: void start(); }; #endif //PROJECT_SPIRE_H
Xrysnow/lstgx_Video
VideoCommon.h
#pragma once #include "platform/CCPlatformConfig.h" #include <functional> #include <string> namespace video { void setLoggingFunction(const std::function<void(const std::string&)>& callback); void logging(const char* format, ...); std::string getErrorString(int errorCode); } #define VINFO(_str, ...) video::logging("[VID] %s: " _str, __func__, ##__VA_ARGS__) #define VWARN(_str,...) video::logging("[VID] %s: " _str, __func__, ##__VA_ARGS__) #define VERRO(_str, ...) video::logging("[VID] %s: " _str, __func__, ##__VA_ARGS__) #if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #define av_sprintf sprintf_s #else #define av_sprintf snprintf #endif extern "C" { #include "../../external/ffmpeg/include/libavformat/avformat.h" #include "../../external/ffmpeg/include/libavformat/avio.h" #include "../../external/ffmpeg/include/libavcodec/avcodec.h" #include "../../external/ffmpeg/include/libswscale/swscale.h" #include "../../external/ffmpeg/include/libswresample/swresample.h" #include "../../external/ffmpeg/include/libavutil/frame.h" #include "../../external/ffmpeg/include/libavutil/mem.h" #include "../../external/ffmpeg/include/libavutil/file.h" #include "../../external/ffmpeg/include/libavutil/common.h" #include "../../external/ffmpeg/include/libavutil/rational.h" #include "../../external/ffmpeg/include/libavutil/avutil.h" #include "../../external/ffmpeg/include/libavutil/imgutils.h" } #include "VideoStruct.h"
Xrysnow/lstgx_Video
VideoDecoder.h
#pragma once #include "cocos2d.h" #include "VideoCommon.h" #include "VideoStream.h" #include <cstdint> namespace video { class Decoder : public cocos2d::Ref { friend class Player; public: static Decoder* create(const std::string& path); bool open(const std::string& path); bool open(VideoStream* stream, double loopA = 0, double loopB = -1); bool setup(); bool setup(const cocos2d::Size& target_size); bool isOpened() const; void close(); uint32_t read(uint8_t** vbuf); /** * can only seek key frame, not recommand to set a non-0 value. * will make next [read] give specified frame. */ bool seek(uint32_t frameOffset); uint32_t tell() const; uint32_t getTotalFrames() const; // raw size of the video cocos2d::Size getRawSize() const { return cocos2d::Size(raw_width, raw_height); } // size after convert cocos2d::Size getTargetSize() const { return targetSize; } const VideoInfo& getVideoInfo() const { return videoInfo; } const std::string& getReadableInfo() const { return readableInfo; } protected: // only used for frame control when playing bool playerSeekTime(double sec); bool send_packet(AVPacket* packet); bool receive_frame(AVFrame* frame); AVPixelFormat getHWPixelFormat(AVHWDeviceType type); bool createHWDevice(AVHWDeviceType type); bool usingHardware(); void setVideoInfo(bool print); Decoder(); ~Decoder(); bool _isOpened = false; VideoStream* stream = nullptr; uint32_t raw_width = 0; uint32_t raw_height = 0; cocos2d::Size targetSize; AVRational timeBaseV; AVRational timeBaseA; AVFormatContext* pFormatCtx = nullptr; AVCodecContext* pCodecCtx = nullptr; AVCodec* pCodecV = nullptr; int idxVideo = -1; int idxAudio = -1; AVHWDeviceType hw_device_type; AVPixelFormat hw_pix_fmt = AV_PIX_FMT_NONE; AVPixelFormat sw_pix_fmt = AV_PIX_FMT_NONE; AVBufferRef* hw_device_ctx = nullptr; SwsContext* img_convert_ctx = nullptr; uint8_t* sws_pointers[4] = { nullptr }; int sws_linesizes[4] = { 0 }; AVFrame* pFrame = nullptr; AVFrame* pFrameSW = nullptr; int64_t lastFrame = -2; int64_t currentFrame = -1; std::string filePath; double frame_dt = 0.0; int64_t totalFrames = 0; double durationV = 0.0; double durationCtx = 0.0; VideoInfo videoInfo; std::string readableInfo; }; }
Xrysnow/lstgx_Video
VideoStream.h
<filename>VideoStream.h #pragma once #include "base/CCRef.h" #include <mutex> namespace video { class VideoStream : public cocos2d::Ref { public: enum class SeekOrigin { /** Seek from the beginning. */ BEGINNING = 0, /** Seek from current position. */ CURRENT = 1, /** Seek from the end. */ END = 2 }; virtual uint64_t size() = 0; virtual uint64_t tell() = 0; virtual bool seek(SeekOrigin origin, int64_t offset) = 0; virtual bool read(uint8_t* dst, uint64_t length, uint64_t* bytesRead = nullptr) = 0; virtual void lock() = 0; virtual void unlock() = 0; virtual ~VideoStream() = default; }; template<typename T> class VideoStreamAdapter { }; template<> class VideoStreamAdapter<uint8_t*> : public VideoStream { uint64_t _pos = 0; uint8_t* _buffer; uint64_t _size; std::mutex _mut; public: explicit VideoStreamAdapter(uint8_t* buffer, uint64_t size) : _buffer(buffer), _size(size) { autorelease(); } uint64_t size() override { return _size; } uint64_t tell() override { return _pos; } bool seek(SeekOrigin origin, int64_t offset) override { switch (origin) { case SeekOrigin::BEGINNING: _pos = 0; break; case SeekOrigin::CURRENT: break; case SeekOrigin::END: _pos = _size; break; default: return false; } if (offset < 0 && uint64_t(-offset) > _pos) { _pos = 0; return false; } if (offset > 0 && offset + _pos >= _size) { _pos = _size; return false; } _pos += offset; return true; } bool read(uint8_t* dst, uint64_t length, uint64_t* bytesRead = nullptr) override { if (bytesRead) *bytesRead = 0; if (length == 0) return true; if (!dst) return false; const uint64_t rest_size = _size - _pos; if (rest_size == 0) return false; const size_t real_read = std::min(length, rest_size); memcpy(dst, _buffer + _pos, real_read); _pos += real_read; if (bytesRead) *bytesRead = real_read; return rest_size >= length; } void lock() override { _mut.lock(); } void unlock() override { _mut.unlock(); } }; }
its-izhar/char-device-driver
asp_mycdev.h
/** * @Author: <NAME> <izhar> * @Date: 2017-03-20T19:24:05-04:00 * @Email: <EMAIL> * @Filename: asp_mycdev.h * @Last modified by: izhar * @Last modified time: 2017-03-22T01:27:58-04:00 * @License: MIT */ #ifndef __ASP_MYCDEV__ #define __ASP_MYCDEV__ #include <linux/mutex.h> #include <linux/device.h> /* Defaul size of each device - keep it multiple of PAGE_SIZE */ #define DEFAULT_RAMDISK_SIZE 2*PAGE_SIZE /* Dynamic Major by default */ #define DEFAULT_MAJOR 0 #define DEFAULT_MINOR 0 /* Max number of devices by default */ /* mycdev0 to mycdev3 */ #define DEFAULT_NUM_DEVICES 3 /* Module name */ #define MODULE_NAME "asp_mycdev" #define MODULE_CLASS_NAME "asp_mycdev_class" #define MODULE_NODE_NAME "mycdev" #define MAX_NODE_NAME_SIZE 10 /* Device struct */ struct asp_mycdev { int devID; /* device ID */ char *ramdisk; /* device */ size_t ramdiskSize; /* device size */ struct mutex lock; /* mutex for this device */ struct cdev cdev; /* char device struct */ struct device *device; /* device node in sysfs */ bool devReset; /* flag to indicate that the device is reset */ }; /* IOCTLs */ #define ASP_MYCDEV_MAGIC 0x37 /* clear the ramdisk and sets the file position at the beginning */ #define ASP_CLEAR_BUF _IO(ASP_MYCDEV_MAGIC, 0) /* Maximum number of IOCTL defs implemented in this driver */ #define ASP_IOCTL_MAXNR 0 #endif /* __ASP_MYCDEV__ */
its-izhar/char-device-driver
asp_mycdev.c
<filename>asp_mycdev.c<gh_stars>1-10 /** * @Author: <NAME> <izhar> * @Date: 2017-03-20T19:44:34-04:00 * @Email: <EMAIL> * @Filename: asp_mycdev.c * @Last modified by: izhar * @Last modified time: 2017-03-26T23:24:24-04:00 * @License: MIT */ #include <linux/module.h> /* Needed by all modules */ #include <linux/kernel.h> /* Needed for KERN_INFO */ #include <linux/init.h> /* Needed for the macros */ #include <linux/cdev.h> /* Needed for cdev struct */ #include <linux/fs.h> /* Needed for file_operations */ #include <linux/slab.h> /* Needed for kmalloc, kzalloc etc. */ #include <linux/errno.h> /* Needed for error checking */ #include <linux/mutex.h> /* Sync primitives */ #include <linux/device.h> /* device class */ #include <asm/uaccess.h> /* copy_*_user */ #include "asp_mycdev.h" /* Custom header for the drivers */ /* Parameters that can be changed at load time */ static int mycdev_major = DEFAULT_MAJOR; static int mycdev_minor = DEFAULT_MINOR; static int max_devices = DEFAULT_NUM_DEVICES; static long ramdisk_size_in_bytes = DEFAULT_RAMDISK_SIZE; module_param(mycdev_major, int, S_IRUGO); module_param(mycdev_minor, int, S_IRUGO); module_param(max_devices, int, S_IRUGO); module_param(ramdisk_size_in_bytes, long, S_IRUGO); /* Other global variables */ static struct class *asp_mycdev_class = NULL; static struct asp_mycdev *mycdev_devices = NULL; static int lastSuccessfulRamdisk = -1; static int lastSuccessfulCdev = -1; static int lastSuccessfulNode = -1; /* Function declarations */ static int mycdev_init_module(void); static void mycdev_cleanup_module(void); static int asp_mycdev_open(struct inode *, struct file *); static int asp_mycdev_release(struct inode *, struct file *); static ssize_t asp_mycdev_read(struct file *, char __user *, size_t, loff_t *); static ssize_t asp_mycdev_write(struct file *, const char __user *, size_t, loff_t *); static loff_t asp_mycdev_lseek(struct file *, loff_t, int); static long asp_mycdev_ioctl(struct file *, unsigned int, unsigned long); /* Function definitions */ /* open function */ /** * asp_mycdev_open - * @i_ptr: pointer to current inode being pointed after open sys call * @filp: pointer to current file descriptor struct after open sys call * Description: Extracts the custom device struct from current cdev, and stores it in file's private_data field * Return: 0, Always succeeds */ static int asp_mycdev_open(struct inode *i_ptr, struct file *filp) { struct asp_mycdev *mycdev = NULL; /* Get the struct of current device */ mycdev = container_of(i_ptr->i_cdev, struct asp_mycdev, cdev); /* Make device ready for future use */ mycdev->devReset = false; filp->private_data = mycdev; /* for later use by other functions */ printk(KERN_INFO "%s: device %s%d opened [Major: %d, Minor: %d]\n",\ MODULE_NAME, "/dev/"MODULE_NODE_NAME, mycdev->devID, imajor(i_ptr), iminor(i_ptr)); return 0; } /* release function */ /** * asp_mycdev_release - * @i_ptr: current inode being referred to` * @filp: file descriptor pointer * Description: Releases the device * Return: 0, Always succeeds */ static int asp_mycdev_release(struct inode *i_ptr, struct file *filp) { struct asp_mycdev *mycdev = filp->private_data; printk(KERN_INFO "%s: device %s%d closed\n",\ MODULE_NAME, "/dev/"MODULE_NODE_NAME, mycdev->devID); return 0; } /* read from device */ /** * asp_mycdev_read - * @filp: file pointer * @buf: buffer handle provided from userspace * @count: bytes requested to read and store in buf * @f_offset: current position in the file * Description: Reads requested number of bytes from device and updates the current position in the file * Return: Number of bytes read from the device */ static ssize_t asp_mycdev_read(struct file *filp, char __user *buf, size_t count,\ loff_t *f_offset) { struct asp_mycdev *mycdev = filp->private_data; ssize_t retval = 0; if(mutex_lock_interruptible(&mycdev->lock)) /* ENTER Critical Section */ return -ERESTARTSYS; if(*f_offset > mycdev->ramdiskSize) /* already done */ goto EXIT; if((count + *f_offset) > mycdev->ramdiskSize) { /* read beyond our device size */ printk(KERN_WARNING "%s: device %s%d: Attempt to READ beyond the device size!\n",\ MODULE_NAME, "/dev/"MODULE_NODE_NAME, mycdev->devID); /* read only upte the device size */ count = mycdev->ramdiskSize - *f_offset; } /* copy to user and update the offset in the device */ retval = count - copy_to_user(buf, (mycdev->ramdisk + *f_offset), count); *f_offset += retval; printk(KERN_DEBUG "%s: device %s%d: bytes read: %d, current position: %d\n",\ MODULE_NAME, "/dev/"MODULE_NODE_NAME, mycdev->devID, (int)retval, (int)*f_offset); EXIT: mutex_unlock(&mycdev->lock); /* EXIT Critical Section */ return retval; } /* write to device */ /** * asp_mycdev_write * @filp: file pointer * @buf: buffer handle provided from userspace * @count: bytes requested to write from buffer * @f_offset: current position in the file * Description: Writes the requested number of bytes to the device and updates the file position in the device * Return: Number of bytes written to the device */ static ssize_t asp_mycdev_write(struct file *filp, const char __user *buf, \ size_t count, loff_t *f_offset) { struct asp_mycdev *mycdev = filp->private_data; ssize_t retval = -ENOMEM; if(mutex_lock_interruptible(&mycdev->lock)) /* ENTER Critical Section */ return -ERESTARTSYS; if((count + *f_offset) > mycdev->ramdiskSize) { /* write beyond our device size */ printk(KERN_WARNING "%s: device %s%d: Attempt to WRITE beyond the device size! Returning!\n",\ MODULE_NAME, "/dev/"MODULE_NODE_NAME, mycdev->devID); goto EXIT; } /* copy to user and update the offset in the device */ mycdev->devReset = false; retval = count - copy_from_user((mycdev-> ramdisk + *f_offset), buf, count); *f_offset += retval; printk(KERN_DEBUG "%s: device %s%d: bytes written: %d, current position: %d\n",\ MODULE_NAME, "/dev/"MODULE_NODE_NAME, mycdev->devID, (int)retval, (int)*f_offset); EXIT: mutex_unlock(&mycdev->lock); /* EXIT Critical Section */ return retval; } /* set the ramdisk offset to desired offset in the device */ /** * asp_mycdev_lseek - * @filp: file pointer * @f_offset: requested offset to be set the file * @action: SEEK_SET/ SEEK_CUR/ SEEK_END * Description: Set the current position in ramdisk to desired offset, based on action: SEEK_SET: set to requested offset SEEK_CUR: set to current offset + requested offset SEEK_END: set to the requested offset from the end of file This function also resizes the ramdisk in the device if the requested offset is beyond the current file ramdisk size, and fills the extra region with zeros * Return: */ loff_t asp_mycdev_lseek(struct file *filp, loff_t f_offset, int action) { loff_t new_offset; struct asp_mycdev *mycdev = filp->private_data; /* ENTER Critical Section */ if(mutex_lock_interruptible(&mycdev->lock)) return -ERESTARTSYS; switch (action) { case SEEK_SET: new_offset = f_offset; break; case SEEK_CUR: new_offset = filp->f_pos + f_offset; break; case SEEK_END: new_offset = mycdev->ramdiskSize + f_offset; break; default: new_offset = -EINVAL; goto EXIT; } /* validity checks (lower boundary) */ new_offset = (new_offset < 0)? 0: new_offset; printk(KERN_DEBUG "%s: device %s%d: Current offset: %ld, Requested offset: %ld\n",\ MODULE_NAME, "/dev/"MODULE_NODE_NAME, mycdev->devID, (long) filp->f_pos, (long) new_offset); /* if the new_offset is beyond the current size of ramdisk, reallocate ramdisk to hold double the current size and fill the remaining region with all zeros */ if(new_offset > mycdev->ramdiskSize) { char *new_ramdisk = NULL; int pages = -1; size_t old_ramdiskSize = -1; size_t new_ramdiskSize = -1; /* find the new ramdisk size which is multiple of PAGE_SIZE */ pages = new_offset / PAGE_SIZE; // Assert (pages >= 1) pages = (new_offset % PAGE_SIZE > 0)? pages+1 : pages; new_ramdiskSize = pages * PAGE_SIZE; /* reallocate ramdisk */ new_ramdisk = krealloc(mycdev->ramdisk, new_ramdiskSize, GFP_KERNEL); if(new_ramdisk != NULL) { /* save old ramdiskSize, we will need it to update the expanded memory */ old_ramdiskSize = mycdev->ramdiskSize; /* realloc succeeded, zero out the extra memory */ mycdev->ramdisk = new_ramdisk; mycdev->ramdiskSize = new_ramdiskSize; memset(mycdev->ramdisk + old_ramdiskSize, 0, new_ramdiskSize - old_ramdiskSize); printk(KERN_DEBUG "%s: device %s%d: Ramdisk resized! " "old_ramdiskSize: %d, new_ramdiskSize: %d, zerod out memory: %d\n",\ MODULE_NAME, "/dev/"MODULE_NODE_NAME, mycdev->devID, \ (int) old_ramdiskSize, (int) new_ramdiskSize, (int) (new_ramdiskSize - old_ramdiskSize)); } else { /* realloc failed, old ramdisk handle is still valid */ printk(KERN_DEBUG "%s: device %s%d: Failed to reallocate ramdisk!\n",\ MODULE_NAME, "/dev/"MODULE_NODE_NAME, mycdev->devID); new_offset = -ENOMEM; goto EXIT; } } /* update the current seek */ filp->f_pos = new_offset; printk(KERN_DEBUG "%s: device %s%d: Seeking to position: %ld\n",\ MODULE_NAME, "/dev/"MODULE_NODE_NAME, mycdev->devID, (long) new_offset); EXIT: mutex_unlock(&mycdev->lock); return new_offset; } /* IOCTL calls */ long asp_mycdev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { long retval = -1; struct asp_mycdev *mycdev = NULL; /* Extracts type and number bitfields; don't decode wrong commands; return -ENOTTY (Inappropriate IOCTL) */ if(_IOC_TYPE(cmd) != ASP_MYCDEV_MAGIC) return -ENOTTY; if(_IOC_NR(cmd) > ASP_IOCTL_MAXNR) return -ENOTTY; /* If everything is fine, extract the command and perform action */ mycdev = filp->private_data; /* Enter Critical Section */ if(mutex_lock_interruptible(&mycdev->lock)) return -ERESTARTSYS; switch (cmd) { /* clear the ramdisk & seek to start of the file */ case ASP_CLEAR_BUF: memset(mycdev->ramdisk, 0, mycdev->ramdiskSize); filp->f_pos = 0; mycdev->devReset = true; retval = 1; break; /* the control is unlikely to come here after MAXNR check above */ default: retval = -ENOTTY; } /* Exit Critical Section */ mutex_unlock(&mycdev->lock); /* Just to debug */ if(retval == 1){ printk(KERN_DEBUG "%s: device %s%d: Successful Reset!\n",\ MODULE_NAME, "/dev/"MODULE_NODE_NAME, mycdev->devID); } return retval; } /* fileops for asp_mycdev */ static struct file_operations asp_mycdev_fileops = { .owner = THIS_MODULE, .open = asp_mycdev_open, .read = asp_mycdev_read, .llseek = asp_mycdev_lseek, .write = asp_mycdev_write, .release = asp_mycdev_release, .unlocked_ioctl = asp_mycdev_ioctl, }; /** * setup_cdev - * @dev: custom device struct for this driver * @index: index/offset to add to start of minor * Description: Helper function for init to setup cdev struct in asp_mycdev. */ static int setup_cdev(struct asp_mycdev *dev, int index) { int error = 0; int retval = 0; dev_t devNo = 0; /* Device Number */ devNo = MKDEV(mycdev_major, mycdev_minor + index); /* Init cdev */ cdev_init(&dev->cdev, &asp_mycdev_fileops); dev->cdev.owner = THIS_MODULE, dev->cdev.ops = &asp_mycdev_fileops; /* Add the device, NOTE:: This makes the device go live! */ error = cdev_add(&dev->cdev, devNo, 1); /* report error */ if(error) { printk(KERN_WARNING "%s: Error %d adding mycdev%d\n", MODULE_NAME, error, index); retval = -1; } return retval; } /* Init function */ /** * mycdev_init_module - * Description: Initialization of Module * Return: zero if success, errno on perticular error */ static int mycdev_init_module(void) { dev_t devNum = 0; bool ramdiskAllocFailed = false; bool cdevSetupFailed = false; bool nodeSetupFailed = false; int i = 0, retval = 0; printk(KERN_INFO "%s: Initializing Module!\n", MODULE_NAME); /* Allocate major and range of minor numbers to work with the driver dynamically unless otherwise specified at load time */ if(mycdev_major || mycdev_minor) { devNum = MKDEV(mycdev_major, mycdev_minor); retval = register_chrdev_region(devNum, max_devices, MODULE_NODE_NAME); } else { retval = alloc_chrdev_region(&devNum, mycdev_minor, max_devices, MODULE_NODE_NAME); mycdev_major = MAJOR(devNum); } if(retval < 0){ printk(KERN_WARNING "%s: Unable to allocate major %d\n", MODULE_NAME, mycdev_major); return retval; } printk(KERN_DEBUG "%s: Requested Devices - %d, Major :- %d, Minor - %d\n",\ MODULE_NAME, max_devices, mycdev_major, mycdev_minor); /* Setup the device class, needed to create device nodes in sysfs */ asp_mycdev_class = class_create(THIS_MODULE, MODULE_CLASS_NAME); if(IS_ERR_OR_NULL(asp_mycdev_class)){ printk(KERN_WARNING "%s: Failed to Init Device Class %s\n",\ MODULE_NAME, MODULE_CLASS_NAME); retval = -1; goto FAIL; } printk(KERN_INFO "%s: Created device class: %s\n", MODULE_NAME, MODULE_CLASS_NAME); /* Allocate and setup the devices here */ mycdev_devices = kzalloc(max_devices * sizeof(struct asp_mycdev), GFP_KERNEL); if(mycdev_devices == NULL){ retval = -ENOMEM; goto FAIL; } /* Setup the devices */ for(i = 0; i < max_devices; i++) { char nodeName[MAX_NODE_NAME_SIZE] = { 0 }; int cdevStatus = 0; /* Device Reset flag */ mycdev_devices[i].devReset = true; /* Device number */ mycdev_devices[i].devID = i; /* Initializing Mutex */ mutex_init(&mycdev_devices[i].lock); /* Initializing ramdisk */ mycdev_devices[i].ramdisk = kzalloc((size_t) ramdisk_size_in_bytes, GFP_KERNEL); if(mycdev_devices[i].ramdisk == NULL){ /* mark that we failed to allocate current device memory, we will clean up previously allocated devices in cleanup module */ printk(KERN_WARNING "%s: Failed to allocate ramdisk for device %d\n", MODULE_NAME, i); ramdiskAllocFailed = true; break; /* exit for */ } lastSuccessfulRamdisk = i; mycdev_devices[i].ramdiskSize = ramdisk_size_in_bytes; /* Create device node here */ snprintf(nodeName, sizeof(nodeName), MODULE_NODE_NAME"%d", i); mycdev_devices[i].device = device_create(asp_mycdev_class, NULL,\ MKDEV(mycdev_major, mycdev_minor + i), NULL, nodeName); if(IS_ERR_OR_NULL(mycdev_devices[i].device)) { /* mark that we failed to create and register current device node with sysfs, we will clean up previously device nodes in cleanup module */ printk(KERN_WARNING "%s: Failed to Create Device Node %s\n", MODULE_NAME, nodeName); nodeSetupFailed = true; break; } lastSuccessfulNode = i; /* Setup cdev struct here */ cdevStatus = setup_cdev(&mycdev_devices[i], i); if(cdevStatus < 0){ /* mark that we failed to allocate current cdev, we will clean up previously allocated cdevs in cleanup module */ printk(KERN_WARNING "%s: Failed to setup cdev for device %d\n", MODULE_NAME, i); cdevSetupFailed = true; break; } lastSuccessfulCdev = i; } /* cleanup if we failed to allocate device memory */ if(ramdiskAllocFailed || nodeSetupFailed || cdevSetupFailed) { retval = -ENOMEM; goto FAIL; } printk(KERN_INFO "%s: Initialization Complete!\n", MODULE_NAME); printk(KERN_INFO "%s: lastSuccessfulRamdisk: %d, lastSuccessfulNode: %d, lastSuccessfulCdev: %d\n",\ MODULE_NAME, lastSuccessfulRamdisk, lastSuccessfulNode, lastSuccessfulCdev); return 0; FAIL: mycdev_cleanup_module(); return retval; } module_init(mycdev_init_module); /* Exit function */ /** * mycdev_cleanup_module - * Description: Cleanup routine for this module */ static void mycdev_cleanup_module(void) { int i = 0; printk(KERN_INFO "%s: Cleaning Up Module!\n", MODULE_NAME); /* we will free lastSuccessful constructs here */ /* Cleanup devices */ if(mycdev_devices != NULL) { /* ramdisk */ for(i = 0; i <= lastSuccessfulRamdisk; i++) { if(mycdev_devices[i].ramdisk != NULL) { kfree(mycdev_devices[i].ramdisk); mycdev_devices[i].ramdisk = NULL; } } /* cdev */ for(i = 0; i <= lastSuccessfulCdev; i++) { cdev_del(&mycdev_devices[i].cdev); } /* device nodes */ for(i = 0; i <= lastSuccessfulNode; i++) { device_destroy(asp_mycdev_class, MKDEV(mycdev_major, mycdev_minor + i)); } /* free up device array */ kfree(mycdev_devices); mycdev_devices = NULL; printk(KERN_DEBUG "%s: Freed up %d devices/ramdisks.\n",\ MODULE_NAME, lastSuccessfulRamdisk + 1); printk(KERN_DEBUG "%s: Freed up %d devices/nodes.\n",\ MODULE_NAME, lastSuccessfulNode + 1); printk(KERN_DEBUG "%s: Freed up %d devices/cdevs.\n",\ MODULE_NAME, lastSuccessfulCdev + 1); } /* Clean up device class */ if(!IS_ERR_OR_NULL(asp_mycdev_class)){ class_destroy(asp_mycdev_class); asp_mycdev_class = NULL; printk(KERN_DEBUG "%s: Freed up %s device class.\n", MODULE_NAME, MODULE_CLASS_NAME); } /* Cleaning up the chrdev_region, this is never called if the registration failes */ unregister_chrdev_region(MKDEV(mycdev_major, mycdev_minor), max_devices); printk(KERN_INFO "%s: Cleanup Done!\n", MODULE_NAME); } module_exit(mycdev_cleanup_module); /* Driver Info */ MODULE_LICENSE("GPL"); MODULE_AUTHOR("<NAME>"); MODULE_DESCRIPTION("ASP: Assignment 5 - Simple Char Driver");
its-izhar/char-device-driver
lseek_test.c
/** * @Author: <NAME> <izhar> * @Date: 2017-03-21T14:54:14-04:00 * @Email: <EMAIL> * @Filename: ltest.c * @Last modified by: izhar * @Last modified time: 2017-03-21T15:20:55-04:00 * @License: MIT */ /* * Keeping track of file position. (Testing application) @*/ #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <fcntl.h> #include <string.h> int main(int argc, char *argv[]) { int length = 20, position = 0, fd, rc; char *message, *nodename = "/dev/mycdrv0"; if(argc == 4) { nodename = argv[1]; position = atoi(argv[2]); length = atoi(argv[3]); } else { printf("USAGE:\n\t %s <device-node-name> <position-to-seek> <message-length>\n", argv[0]); return 0; } /* set up the message */ message = malloc(length); memset(message, 'x', length/2); memset(message + (length/2), 'y', length/2); message[length - 1] = '\0'; /* make sure it is null terminated */ /* open the device node */ fd = open(nodename, O_RDWR); printf(" I opened the device node, file descriptor = %d\n", fd); /* seek to position */ rc = lseek(fd, position, SEEK_SET); printf("return code from lseek = %d\n", rc); /* write to the device node twice */ rc = write(fd, message, length); printf("return code from write = %d\n", rc); //rc = write(fd, message, length); //printf("return code from write = %d\n", rc); /* reset the message to null */ memset(message, 0, length); /* seek to position */ rc = lseek(fd, position, SEEK_SET); printf("return code from lseek = %d\n", rc); /* read from the device node */ rc = read(fd, message, length); printf("return code from read = %d\n", rc); printf("the message read [len: %d]: %s\n", rc, message); close(fd); exit(0); }
its-izhar/char-device-driver
rw_test.c
/** * @Author: <NAME> <izhar> * @Date: 2017-03-21T14:54:08-04:00 * @Email: <EMAIL> * @Filename: ctest.c * @Last modified by: izhar * @Last modified time: 2017-03-21T15:30:14-04:00 * @License: MIT */ /* Basic read/write program @*/ #include <stdio.h> #include <unistd.h> #include <fcntl.h> #include <string.h> #include <stdlib.h> int main(int argc, char **argv) { int length, fd1, fd2, rc; char *nodename = "/dev/mycdrv0"; char message[] = " *** TESTING CHAR/DRIVER ***\n"; length = sizeof(message); if (argc == 2) { nodename = argv[1]; } else { printf("USAGE:\n\t %s <device-node-name>\n", argv[0]); return 0; } fd1 = open(nodename, O_RDWR); printf(" opened file descriptor first time = %d\n", fd1); fd2 = open(nodename, O_RDWR); printf(" opened file descriptor second time = %d\n", fd2); rc = write(fd1, message, length); printf("return code from write = %d on %d, message=%s\n", rc, fd1, message); memset(message, 0, length); rc = read(fd2, message, length); printf("return code from read = %d on %d, message=%s\n", rc, fd2, message); close(fd1); close(fd2); exit(0); }
aspose-cells-cloud/aspose-cells-cloud-cpp
include/aspose_cells_cloud/models/pdf_security_options.h
<gh_stars>0 /** -------------------------------------------------------------------------------------------------------------------- * <copyright company="Aspose" file=" pdf_security_options.h"> * Copyright (c) 2022 Aspose.Cells for Cloud * </copyright> * <summary> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * </summary> -------------------------------------------------------------------------------------------------------------------- **/ #pragma once #include "./model_base.h" namespace aspose::cells::cloud::models { /// <summary> /// /// </summary> class PdfSecurityOptions : public ModelBase { public: ASPOSE_CELLS_CLOUD_EXPORT virtual ~PdfSecurityOptions() = default; ASPOSE_CELLS_CLOUD_EXPORT virtual void toJson(void* jsonIfc) const override; ASPOSE_CELLS_CLOUD_EXPORT virtual void fromJson(const void* jsonIfc) override; ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getAnnotationsPermission() const; ASPOSE_CELLS_CLOUD_EXPORT void setAnnotationsPermission( std::shared_ptr< bool> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getAssembleDocumentPermission() const; ASPOSE_CELLS_CLOUD_EXPORT void setAssembleDocumentPermission( std::shared_ptr< bool> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getExtractContentPermission() const; ASPOSE_CELLS_CLOUD_EXPORT void setExtractContentPermission( std::shared_ptr< bool> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getExtractContentPermissionObsolete() const; ASPOSE_CELLS_CLOUD_EXPORT void setExtractContentPermissionObsolete( std::shared_ptr< bool> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getFillFormsPermission() const; ASPOSE_CELLS_CLOUD_EXPORT void setFillFormsPermission( std::shared_ptr< bool> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getFullQualityPrintPermission() const; ASPOSE_CELLS_CLOUD_EXPORT void setFullQualityPrintPermission( std::shared_ptr< bool> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getModifyDocumentPermission() const; ASPOSE_CELLS_CLOUD_EXPORT void setModifyDocumentPermission( std::shared_ptr< bool> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getOwnerPassword() const; ASPOSE_CELLS_CLOUD_EXPORT void setOwnerPassword( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getPrintPermission() const; ASPOSE_CELLS_CLOUD_EXPORT void setPrintPermission( std::shared_ptr< bool> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getUserPassword() const; ASPOSE_CELLS_CLOUD_EXPORT void setUserPassword( std::shared_ptr< std::wstring> value ); protected: std::shared_ptr< bool > m_AnnotationsPermission; std::shared_ptr< bool > m_AssembleDocumentPermission; std::shared_ptr< bool > m_ExtractContentPermission; std::shared_ptr< bool > m_ExtractContentPermissionObsolete; std::shared_ptr< bool > m_FillFormsPermission; std::shared_ptr< bool > m_FullQualityPrintPermission; std::shared_ptr< bool > m_ModifyDocumentPermission; std::shared_ptr< std::wstring > m_OwnerPassword; std::shared_ptr< bool > m_PrintPermission; std::shared_ptr< std::wstring > m_UserPassword; }; }
aspose-cells-cloud/aspose-cells-cloud-cpp
tests/api/protect_test.h
/** -------------------------------------------------------------------------------------------------------------------- * <copyright company="Aspose" file="protect_test.h"> * Copyright (c) 2022 Aspose.Cells for Cloud * </copyright> * <summary> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * </summary> -------------------------------------------------------------------------------------------------------------------- **/ #pragma once #include "../test_base.h" /// <summary> /// Example of how to work with files. /// </summary> class ProtectTests : public InfrastructureTest { protected: std::wstring remoteDataFolder = remoteBaseTestDataFolder + L"/Storage"; std::wstring localFile = L"source/Book1.xlsx"; std::wstring localFile2 = L"source/myDocument.xlsx"; }; /// <summary> /// Test for convert file. /// </summary> TEST_F(ProtectTests, TestProtectFile) { std::wstring remoteFileName = L"TestProtectFile_CPP.xlsx"; std::map< std::wstring ,std::shared_ptr< std::istream > > files; files.insert( std::pair< std::wstring ,std::shared_ptr< std::istream >>( std::wstring( L"Book1.xlsx"), std::shared_ptr<std::istream>(new std::ifstream(std::filesystem::path(getDataDir(localFile)), std::istream::binary)) ) ); files.insert( std::pair< std::wstring ,std::shared_ptr< std::istream >>( std::wstring( L"myDocument.xlsx"), std::shared_ptr<std::istream>(new std::ifstream(std::filesystem::path(getDataDir(localFile2)), std::istream::binary)) ) ); std::shared_ptr<std::map< std::wstring ,std::shared_ptr< std::istream >>> ptrFiles = std::make_shared<std::map< std::wstring ,std::shared_ptr< std::istream > >>(files); std::shared_ptr<requests::ProtectWorkbookRequest> request(new requests::ProtectWorkbookRequest( ptrFiles, std::make_shared< std::wstring >(L"12345") )); auto actual = getApi()->protectWorkbook(request); } /// <summary> /// Test for convert file. /// </summary> TEST_F(ProtectTests, TestProtectOnlineFile) { std::wstring remoteFileName = L"TestProtectOnlineFile_CPP.xlsx"; auto requestFileContent = std::shared_ptr<std::istream>(new std::ifstream(std::filesystem::path(getDataDir(localFile)), std::istream::binary)); std::shared_ptr<requests::UploadFileRequest> request(new requests::UploadFileRequest( requestFileContent, std::make_shared< std::wstring >(remoteDataFolder + L"/" + remoteFileName), nullptr )); auto actual = getApi()->uploadFile(request); std::shared_ptr<models::WorkbookEncryptionRequest> encryption = std::make_shared<models::WorkbookEncryptionRequest>(); encryption->setPassword(std::make_shared< std::wstring >(L"<PASSWORD>")); encryption->setEncryptionType(std::make_shared< std::wstring >(L"XOR")); encryption->setKeyLength(std::make_shared< int >(128)); std::shared_ptr<requests::EncryptionWorkbookRequest> requestEncryption(new requests::EncryptionWorkbookRequest( std::make_shared< std::wstring >( remoteFileName ), encryption, std::make_shared< std::wstring >(remoteDataFolder ), nullptr )); auto actualProtect = getApi()->protectWorkbook(requestEncryption); }
aspose-cells-cloud/aspose-cells-cloud-cpp
include/aspose_cells_cloud/models/workbook.h
<reponame>aspose-cells-cloud/aspose-cells-cloud-cpp<filename>include/aspose_cells_cloud/models/workbook.h /** -------------------------------------------------------------------------------------------------------------------- * <copyright company="Aspose" file="workbook.h"> * Copyright (c) 2022 Aspose.Cells for Cloud * </copyright> * <summary> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * </summary> -------------------------------------------------------------------------------------------------------------------- **/ #pragma once #include "./model_base.h" #include "link.h" namespace aspose::cells::cloud::models { /// <summary> /// File or folder information. /// </summary> class Workbook : public ModelBase { public: ASPOSE_CELLS_CLOUD_EXPORT virtual ~Workbook() = default; ASPOSE_CELLS_CLOUD_EXPORT virtual void toJson(void* jsonIfc) const override; ASPOSE_CELLS_CLOUD_EXPORT virtual void fromJson(const void* jsonIfc) override; /// <summary> /// Get filename of workbook. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getFileName() const; /// <summary> /// Set filename of workbook. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT void setFileName(std::shared_ptr< std::wstring > value); /// <summary> /// get password of workbook. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getPassword() const; /// <summary> /// Set password of workbook. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT void setPassword(std::shared_ptr< std::wstring > value); /// <summary> /// Gets or sets the list of links that originate from this document. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::vector<std::shared_ptr<aspose::cells::cloud::models::Link>> > getLinks() const; /// <summary> /// Gets or sets the list of links that originate from this document. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT void setLinks(std::shared_ptr< std::vector<std::shared_ptr<aspose::cells::cloud::models::Link>> > value); /// <summary> /// Gets or sets Worksheets link. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr<aspose::cells::cloud::models::Link> getWorksheets() const; /// <summary> /// Gets or sets Worksheets link. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT void setWorksheets(std::shared_ptr<aspose::cells::cloud::models::Link> value); /// <summary> /// Gets or sets DefaultStyle link. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr<aspose::cells::cloud::models::Link> getDefaultStyle() const; /// <summary> /// Gets or sets DefaultStyle link. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT void setDefaultStyle(std::shared_ptr<aspose::cells::cloud::models::Link> value); /// <summary> /// Gets or sets DocumentProperties link. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr<aspose::cells::cloud::models::Link> getDocumentProperties() const; /// <summary> /// Gets or sets DocumentProperties link. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT void setDocumentProperties(std::shared_ptr<aspose::cells::cloud::models::Link> value); /// <summary> /// Gets or sets Names link. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr<aspose::cells::cloud::models::Link> getNames() const; /// <summary> /// Gets or sets Names link. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT void setNames(std::shared_ptr<aspose::cells::cloud::models::Link> value); /// <summary> /// Gets or sets Settings link. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr<aspose::cells::cloud::models::Link> getSettings() const; /// <summary> /// Gets or sets Settings link. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT void setSettings(std::shared_ptr<aspose::cells::cloud::models::Link> value); protected: std::shared_ptr< std::wstring > m_Password; std::shared_ptr< std::wstring > m_FileName; std::shared_ptr< std::vector<std::shared_ptr<aspose::cells::cloud::models::Link>> > m_Links; std::shared_ptr<aspose::cells::cloud::models::Link> m_Worksheets; std::shared_ptr<aspose::cells::cloud::models::Link> m_DefaultStyle; std::shared_ptr<aspose::cells::cloud::models::Link> m_DocumentProperties; std::shared_ptr<aspose::cells::cloud::models::Link> m_Names; std::shared_ptr<aspose::cells::cloud::models::Link> m_Settings; }; }
aspose-cells-cloud/aspose-cells-cloud-cpp
include/aspose_cells_cloud/models/image_save_options.h
/** -------------------------------------------------------------------------------------------------------------------- * <copyright company="Aspose" file=" image_save_options.h"> * Copyright (c) 2022 Aspose.Cells for Cloud * </copyright> * <summary> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * </summary> -------------------------------------------------------------------------------------------------------------------- **/ #pragma once #include "./model_base.h" #include "./save_options.h" namespace aspose::cells::cloud::models { /// <summary> /// /// </summary> class ImageSaveOptions : public SaveOptions { public: ASPOSE_CELLS_CLOUD_EXPORT virtual ~ImageSaveOptions() = default; ASPOSE_CELLS_CLOUD_EXPORT virtual void toJson(void* jsonIfc) const override; ASPOSE_CELLS_CLOUD_EXPORT virtual void fromJson(const void* jsonIfc) override; ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getChartImageType() const; ASPOSE_CELLS_CLOUD_EXPORT void setChartImageType( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getEmbededImageNameInSvg() const; ASPOSE_CELLS_CLOUD_EXPORT void setEmbededImageNameInSvg( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< int > getHorizontalResolution() const; ASPOSE_CELLS_CLOUD_EXPORT void setHorizontalResolution( std::shared_ptr< int> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getImageFormat() const; ASPOSE_CELLS_CLOUD_EXPORT void setImageFormat( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getIsCellAutoFit() const; ASPOSE_CELLS_CLOUD_EXPORT void setIsCellAutoFit( std::shared_ptr< bool> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getOnePagePerSheet() const; ASPOSE_CELLS_CLOUD_EXPORT void setOnePagePerSheet( std::shared_ptr< bool> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getOnlyArea() const; ASPOSE_CELLS_CLOUD_EXPORT void setOnlyArea( std::shared_ptr< bool> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getPrintingPage() const; ASPOSE_CELLS_CLOUD_EXPORT void setPrintingPage( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< int > getPrintWithStatusDialog() const; ASPOSE_CELLS_CLOUD_EXPORT void setPrintWithStatusDialog( std::shared_ptr< int> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< int > getQuality() const; ASPOSE_CELLS_CLOUD_EXPORT void setQuality( std::shared_ptr< int> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getTiffCompression() const; ASPOSE_CELLS_CLOUD_EXPORT void setTiffCompression( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< int > getVerticalResolution() const; ASPOSE_CELLS_CLOUD_EXPORT void setVerticalResolution( std::shared_ptr< int> value ); protected: std::shared_ptr< std::wstring > m_ChartImageType; std::shared_ptr< std::wstring > m_EmbededImageNameInSvg; std::shared_ptr< int > m_HorizontalResolution; std::shared_ptr< std::wstring > m_ImageFormat; std::shared_ptr< bool > m_IsCellAutoFit; std::shared_ptr< bool > m_OnePagePerSheet; std::shared_ptr< bool > m_OnlyArea; std::shared_ptr< std::wstring > m_PrintingPage; std::shared_ptr< int > m_PrintWithStatusDialog; std::shared_ptr< int > m_Quality; std::shared_ptr< std::wstring > m_TiffCompression; std::shared_ptr< int > m_VerticalResolution; }; }
aspose-cells-cloud/aspose-cells-cloud-cpp
include/aspose_cells_cloud/requests/post_document_save_as_request.h
<filename>include/aspose_cells_cloud/requests/post_document_save_as_request.h /** -------------------------------------------------------------------------------------------------------------------- * <copyright company="Aspose" file=" post_document_save_as_request.h"> * Copyright (c) 2022 Aspose.Cells for Cloud * </copyright> * <summary> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * </summary> -------------------------------------------------------------------------------------------------------------------- **/ #pragma once #include "./request_model_base.h" namespace aspose::cells::cloud::requests { class postDocumentSaveAsRequest : public RequestModelBase { public: ASPOSE_CELLS_CLOUD_EXPORT postDocumentSaveAsRequest( const std::shared_ptr< std::wstring > name, const std::shared_ptr< aspose::cells::cloud::models::SaveOptions > saveOptions = nullptr, const std::shared_ptr< std::wstring > newfilename = nullptr, const std::shared_ptr< bool > isAutoFitRows = nullptr, const std::shared_ptr< bool > isAutoFitColumns = nullptr, const std::shared_ptr< std::wstring > folder = nullptr, const std::shared_ptr< std::wstring > storageName = nullptr, const std::shared_ptr< std::wstring > outStorageName = nullptr ); ASPOSE_CELLS_CLOUD_EXPORT const std::shared_ptr< std::wstring > getName() const; ASPOSE_CELLS_CLOUD_EXPORT const std::shared_ptr< aspose::cells::cloud::models::SaveOptions > getSaveOptions() const; ASPOSE_CELLS_CLOUD_EXPORT const std::shared_ptr< std::wstring > getNewfilename() const; ASPOSE_CELLS_CLOUD_EXPORT const std::shared_ptr< bool > getIsAutoFitRows() const; ASPOSE_CELLS_CLOUD_EXPORT const std::shared_ptr< bool > getIsAutoFitColumns() const; ASPOSE_CELLS_CLOUD_EXPORT const std::shared_ptr< std::wstring > getFolder() const; ASPOSE_CELLS_CLOUD_EXPORT const std::shared_ptr< std::wstring > getStorageName() const; ASPOSE_CELLS_CLOUD_EXPORT const std::shared_ptr< std::wstring > getOutStorageName() const; ASPOSE_CELLS_CLOUD_EXPORT virtual std::shared_ptr< aspose::cells::cloud::HttpRequestData > createHttpRequest() const override; ASPOSE_CELLS_CLOUD_EXPORT virtual std::shared_ptr< aspose::cells::cloud::responses::ResponseModelBase > createResponse() const override; private: const std::shared_ptr< std::wstring > m_Name; const std::shared_ptr< aspose::cells::cloud::models::SaveOptions > m_SaveOptions; const std::shared_ptr< std::wstring > m_Newfilename; const std::shared_ptr< bool > m_IsAutoFitRows; const std::shared_ptr< bool > m_IsAutoFitColumns; const std::shared_ptr< std::wstring > m_Folder; const std::shared_ptr< std::wstring > m_StorageName; const std::shared_ptr< std::wstring > m_OutStorageName; }; }
aspose-cells-cloud/aspose-cells-cloud-cpp
include/aspose_cells_cloud/models/pdf_save_options.h
<reponame>aspose-cells-cloud/aspose-cells-cloud-cpp<gh_stars>0 /** -------------------------------------------------------------------------------------------------------------------- * <copyright company="Aspose" file=" pdf_save_options.h"> * Copyright (c) 2022 Aspose.Cells for Cloud * </copyright> * <summary> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * </summary> -------------------------------------------------------------------------------------------------------------------- **/ #pragma once #include "./model_base.h" #include "./save_options.h" #include "./pdf_security_options.h" namespace aspose::cells::cloud::models { /// <summary> /// /// </summary> class PdfSaveOptions : public SaveOptions { public: ASPOSE_CELLS_CLOUD_EXPORT virtual ~PdfSaveOptions() = default; ASPOSE_CELLS_CLOUD_EXPORT virtual void toJson(void* jsonIfc) const override; ASPOSE_CELLS_CLOUD_EXPORT virtual void fromJson(const void* jsonIfc) override; ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getCalculateFormula() const; ASPOSE_CELLS_CLOUD_EXPORT void setCalculateFormula( std::shared_ptr< bool> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getCheckFontCompatibility() const; ASPOSE_CELLS_CLOUD_EXPORT void setCheckFontCompatibility( std::shared_ptr< bool> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getOnePagePerSheet() const; ASPOSE_CELLS_CLOUD_EXPORT void setOnePagePerSheet( std::shared_ptr< bool> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getCompliance() const; ASPOSE_CELLS_CLOUD_EXPORT void setCompliance( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getDefaultFont() const; ASPOSE_CELLS_CLOUD_EXPORT void setDefaultFont( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getPrintingPageType() const; ASPOSE_CELLS_CLOUD_EXPORT void setPrintingPageType( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getImageType() const; ASPOSE_CELLS_CLOUD_EXPORT void setImageType( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< int > getDesiredPPI() const; ASPOSE_CELLS_CLOUD_EXPORT void setDesiredPPI( std::shared_ptr< int> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< int > getJpegQuality() const; ASPOSE_CELLS_CLOUD_EXPORT void setJpegQuality( std::shared_ptr< int> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< aspose::cells::cloud::models::PdfSecurityOptions > getSecurityOptions() const; ASPOSE_CELLS_CLOUD_EXPORT void setSecurityOptions( std::shared_ptr< aspose::cells::cloud::models::PdfSecurityOptions> value ); protected: std::shared_ptr< bool > m_CalculateFormula; std::shared_ptr< bool > m_CheckFontCompatibility; std::shared_ptr< bool > m_OnePagePerSheet; std::shared_ptr< std::wstring > m_Compliance; std::shared_ptr< std::wstring > m_DefaultFont; std::shared_ptr< std::wstring > m_PrintingPageType; std::shared_ptr< std::wstring > m_ImageType; std::shared_ptr< int > m_DesiredPPI; std::shared_ptr< int > m_JpegQuality; std::shared_ptr< aspose::cells::cloud::models::PdfSecurityOptions > m_SecurityOptions; }; }
aspose-cells-cloud/aspose-cells-cloud-cpp
include/aspose_cells_cloud/models/link.h
<reponame>aspose-cells-cloud/aspose-cells-cloud-cpp /** -------------------------------------------------------------------------------------------------------------------- * <copyright company="Aspose" file="link.h"> * Copyright (c) 2021 Aspose.Cells for Cloud * </copyright> * <summary> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * </summary> -------------------------------------------------------------------------------------------------------------------- **/ #pragma once #include "./model_base.h" namespace aspose::cells::cloud::models { /// <summary> /// Provides information for the object link. /// This is supposed to be an atom:link, therefore it should have all attributes specified here http://tools.ietf.org/html/rfc4287#section-4.2.7. /// </summary> class Link : public ModelBase { public: ASPOSE_CELLS_CLOUD_EXPORT virtual ~Link() = default; ASPOSE_CELLS_CLOUD_EXPORT virtual void toJson(void* jsonIfc) const override; ASPOSE_CELLS_CLOUD_EXPORT virtual void fromJson(const void* jsonIfc) override; /// <summary> /// Gets or sets the "href" attribute with the link's IRI. atom:link elements MUST have an href attribute, whose value MUST be a IRI reference. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getHref() const; /// <summary> /// Gets or sets the "href" attribute with the link's IRI. atom:link elements MUST have an href attribute, whose value MUST be a IRI reference. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT void setHref(std::shared_ptr< std::wstring > value); /// <summary> /// Gets or sets the option that controls whether atom:link elements MAY have a "rel" attribute that indicates the link relation type. If the "rel" attribute is not present, the link element MUST be interpreted as if the link relation type is "alternate". /// </summary> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getRel() const; /// <summary> /// Gets or sets the option that controls whether atom:link elements MAY have a "rel" attribute that indicates the link relation type. If the "rel" attribute is not present, the link element MUST be interpreted as if the link relation type is "alternate". /// </summary> ASPOSE_CELLS_CLOUD_EXPORT void setRel(std::shared_ptr< std::wstring > value); /// <summary> /// Gets or sets the "title" attribute, that conveys human-readable information about the link. The content of the "title" attribute is Language-Sensitive. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getTitle() const; /// <summary> /// Gets or sets the "title" attribute, that conveys human-readable information about the link. The content of the "title" attribute is Language-Sensitive. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT void setTitle(std::shared_ptr< std::wstring > value); /// <summary> /// Gets or sets the "type" attribute. The "type" attribute's value is an advisory media type: it is a hint about the type of the representation that is expected to be returned when the value of the href attribute is dereferenced. Note that the type attribute does not override the actual media type returned with the representation. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getType() const; /// <summary> /// Gets or sets the "type" attribute. The "type" attribute's value is an advisory media type: it is a hint about the type of the representation that is expected to be returned when the value of the href attribute is dereferenced. Note that the type attribute does not override the actual media type returned with the representation. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT void setType(std::shared_ptr< std::wstring > value); protected: std::shared_ptr< std::wstring > m_Href; std::shared_ptr< std::wstring > m_Rel; std::shared_ptr< std::wstring > m_Title; std::shared_ptr< std::wstring > m_Type; }; }
aspose-cells-cloud/aspose-cells-cloud-cpp
include/aspose_cells_cloud/models/mhtml_save_options.h
<reponame>aspose-cells-cloud/aspose-cells-cloud-cpp<filename>include/aspose_cells_cloud/models/mhtml_save_options.h /** -------------------------------------------------------------------------------------------------------------------- * <copyright company="Aspose" file=" m_html_save_options.h"> * Copyright (c) 2022 Aspose.Cells for Cloud * </copyright> * <summary> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * </summary> -------------------------------------------------------------------------------------------------------------------- **/ #pragma once #include "./model_base.h" #include "./save_options.h" namespace aspose::cells::cloud::models { /// <summary> /// /// </summary> class MHtmlSaveOptions : public SaveOptions { public: ASPOSE_CELLS_CLOUD_EXPORT virtual ~MHtmlSaveOptions() = default; ASPOSE_CELLS_CLOUD_EXPORT virtual void toJson(void* jsonIfc) const override; ASPOSE_CELLS_CLOUD_EXPORT virtual void fromJson(const void* jsonIfc) override; ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getAttachedFilesDirectory() const; ASPOSE_CELLS_CLOUD_EXPORT void setAttachedFilesDirectory( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getAttachedFilesUrlPrefix() const; ASPOSE_CELLS_CLOUD_EXPORT void setAttachedFilesUrlPrefix( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getEncoding() const; ASPOSE_CELLS_CLOUD_EXPORT void setEncoding( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getExportActiveWorksheetOnly() const; ASPOSE_CELLS_CLOUD_EXPORT void setExportActiveWorksheetOnly( std::shared_ptr< bool> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getExportChartImageFormat() const; ASPOSE_CELLS_CLOUD_EXPORT void setExportChartImageFormat( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getExportImagesAsBase64() const; ASPOSE_CELLS_CLOUD_EXPORT void setExportImagesAsBase64( std::shared_ptr< bool> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getHiddenColDisplayType() const; ASPOSE_CELLS_CLOUD_EXPORT void setHiddenColDisplayType( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getHiddenRowDisplayType() const; ASPOSE_CELLS_CLOUD_EXPORT void setHiddenRowDisplayType( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getHtmlCrossStringType() const; ASPOSE_CELLS_CLOUD_EXPORT void setHtmlCrossStringType( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getIsExpImageToTempDir() const; ASPOSE_CELLS_CLOUD_EXPORT void setIsExpImageToTempDir( std::shared_ptr< bool> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getPageTitle() const; ASPOSE_CELLS_CLOUD_EXPORT void setPageTitle( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getParseHtmlTagInCell() const; ASPOSE_CELLS_CLOUD_EXPORT void setParseHtmlTagInCell( std::shared_ptr< bool> value ); protected: std::shared_ptr< std::wstring > m_AttachedFilesDirectory; std::shared_ptr< std::wstring > m_AttachedFilesUrlPrefix; std::shared_ptr< std::wstring > m_Encoding; std::shared_ptr< bool > m_ExportActiveWorksheetOnly; std::shared_ptr< std::wstring > m_ExportChartImageFormat; std::shared_ptr< bool > m_ExportImagesAsBase64; std::shared_ptr< std::wstring > m_HiddenColDisplayType; std::shared_ptr< std::wstring > m_HiddenRowDisplayType; std::shared_ptr< std::wstring > m_HtmlCrossStringType; std::shared_ptr< bool > m_IsExpImageToTempDir; std::shared_ptr< std::wstring > m_PageTitle; std::shared_ptr< bool > m_ParseHtmlTagInCell; }; }
aspose-cells-cloud/aspose-cells-cloud-cpp
include/aspose_cells_cloud/models/html_save_options.h
/** -------------------------------------------------------------------------------------------------------------------- * <copyright company="Aspose" file=" html_save_options.h"> * Copyright (c) 2022 Aspose.Cells for Cloud * </copyright> * <summary> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * </summary> -------------------------------------------------------------------------------------------------------------------- **/ #pragma once #include "./model_base.h" #include "./save_options.h" namespace aspose::cells::cloud::models { /// <summary> /// /// </summary> class HtmlSaveOptions : public SaveOptions { public: ASPOSE_CELLS_CLOUD_EXPORT virtual ~HtmlSaveOptions() = default; ASPOSE_CELLS_CLOUD_EXPORT virtual void toJson(void* jsonIfc) const override; ASPOSE_CELLS_CLOUD_EXPORT virtual void fromJson(const void* jsonIfc) override; ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getSaveAsSingleFile() const; ASPOSE_CELLS_CLOUD_EXPORT void setSaveAsSingleFile( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getExportHiddenWorksheet() const; ASPOSE_CELLS_CLOUD_EXPORT void setExportHiddenWorksheet( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getExportGridLines() const; ASPOSE_CELLS_CLOUD_EXPORT void setExportGridLines( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getPresentationPreference() const; ASPOSE_CELLS_CLOUD_EXPORT void setPresentationPreference( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getCellCssPrefix() const; ASPOSE_CELLS_CLOUD_EXPORT void setCellCssPrefix( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getTableCssId() const; ASPOSE_CELLS_CLOUD_EXPORT void setTableCssId( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getIsFullPathLink() const; ASPOSE_CELLS_CLOUD_EXPORT void setIsFullPathLink( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getExportWorksheetCSSSeparately() const; ASPOSE_CELLS_CLOUD_EXPORT void setExportWorksheetCSSSeparately( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getExportSimilarBorderStyle() const; ASPOSE_CELLS_CLOUD_EXPORT void setExportSimilarBorderStyle( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getMergeEmptyTdForcely() const; ASPOSE_CELLS_CLOUD_EXPORT void setMergeEmptyTdForcely( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getExportCellCoordinate() const; ASPOSE_CELLS_CLOUD_EXPORT void setExportCellCoordinate( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getExportExtraHeadings() const; ASPOSE_CELLS_CLOUD_EXPORT void setExportExtraHeadings( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getExportHeadings() const; ASPOSE_CELLS_CLOUD_EXPORT void setExportHeadings( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getExportFormula() const; ASPOSE_CELLS_CLOUD_EXPORT void setExportFormula( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getAddTooltipText() const; ASPOSE_CELLS_CLOUD_EXPORT void setAddTooltipText( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getExportBogusRowData() const; ASPOSE_CELLS_CLOUD_EXPORT void setExportBogusRowData( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getExcludeUnusedStyles() const; ASPOSE_CELLS_CLOUD_EXPORT void setExcludeUnusedStyles( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getExportDocumentProperties() const; ASPOSE_CELLS_CLOUD_EXPORT void setExportDocumentProperties( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getExportWorksheetProperties() const; ASPOSE_CELLS_CLOUD_EXPORT void setExportWorksheetProperties( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getExportWorkbookProperties() const; ASPOSE_CELLS_CLOUD_EXPORT void setExportWorkbookProperties( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getExportFrameScriptsAndProperties() const; ASPOSE_CELLS_CLOUD_EXPORT void setExportFrameScriptsAndProperties( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getAttachedFilesDirectory() const; ASPOSE_CELLS_CLOUD_EXPORT void setAttachedFilesDirectory( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getAttachedFilesUrlPrefix() const; ASPOSE_CELLS_CLOUD_EXPORT void setAttachedFilesUrlPrefix( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getEncoding() const; ASPOSE_CELLS_CLOUD_EXPORT void setEncoding( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getExportActiveWorksheetOnly() const; ASPOSE_CELLS_CLOUD_EXPORT void setExportActiveWorksheetOnly( std::shared_ptr< bool> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getExportChartImageFormat() const; ASPOSE_CELLS_CLOUD_EXPORT void setExportChartImageFormat( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getExportImagesAsBase64() const; ASPOSE_CELLS_CLOUD_EXPORT void setExportImagesAsBase64( std::shared_ptr< bool> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getHiddenColDisplayType() const; ASPOSE_CELLS_CLOUD_EXPORT void setHiddenColDisplayType( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getHiddenRowDisplayType() const; ASPOSE_CELLS_CLOUD_EXPORT void setHiddenRowDisplayType( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getHtmlCrossStringType() const; ASPOSE_CELLS_CLOUD_EXPORT void setHtmlCrossStringType( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getIsExpImageToTempDir() const; ASPOSE_CELLS_CLOUD_EXPORT void setIsExpImageToTempDir( std::shared_ptr< bool> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::wstring > getPageTitle() const; ASPOSE_CELLS_CLOUD_EXPORT void setPageTitle( std::shared_ptr< std::wstring> value ); ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< bool > getParseHtmlTagInCell() const; ASPOSE_CELLS_CLOUD_EXPORT void setParseHtmlTagInCell( std::shared_ptr< bool> value ); protected: std::shared_ptr< std::wstring > m_SaveAsSingleFile; std::shared_ptr< std::wstring > m_ExportHiddenWorksheet; std::shared_ptr< std::wstring > m_ExportGridLines; std::shared_ptr< std::wstring > m_PresentationPreference; std::shared_ptr< std::wstring > m_CellCssPrefix; std::shared_ptr< std::wstring > m_TableCssId; std::shared_ptr< std::wstring > m_IsFullPathLink; std::shared_ptr< std::wstring > m_ExportWorksheetCSSSeparately; std::shared_ptr< std::wstring > m_ExportSimilarBorderStyle; std::shared_ptr< std::wstring > m_MergeEmptyTdForcely; std::shared_ptr< std::wstring > m_ExportCellCoordinate; std::shared_ptr< std::wstring > m_ExportExtraHeadings; std::shared_ptr< std::wstring > m_ExportHeadings; std::shared_ptr< std::wstring > m_ExportFormula; std::shared_ptr< std::wstring > m_AddTooltipText; std::shared_ptr< std::wstring > m_ExportBogusRowData; std::shared_ptr< std::wstring > m_ExcludeUnusedStyles; std::shared_ptr< std::wstring > m_ExportDocumentProperties; std::shared_ptr< std::wstring > m_ExportWorksheetProperties; std::shared_ptr< std::wstring > m_ExportWorkbookProperties; std::shared_ptr< std::wstring > m_ExportFrameScriptsAndProperties; std::shared_ptr< std::wstring > m_AttachedFilesDirectory; std::shared_ptr< std::wstring > m_AttachedFilesUrlPrefix; std::shared_ptr< std::wstring > m_Encoding; std::shared_ptr< bool > m_ExportActiveWorksheetOnly; std::shared_ptr< std::wstring > m_ExportChartImageFormat; std::shared_ptr< bool > m_ExportImagesAsBase64; std::shared_ptr< std::wstring > m_HiddenColDisplayType; std::shared_ptr< std::wstring > m_HiddenRowDisplayType; std::shared_ptr< std::wstring > m_HtmlCrossStringType; std::shared_ptr< bool > m_IsExpImageToTempDir; std::shared_ptr< std::wstring > m_PageTitle; std::shared_ptr< bool > m_ParseHtmlTagInCell; }; }
aspose-cells-cloud/aspose-cells-cloud-cpp
include/aspose_cells_cloud.h
/** -------------------------------------------------------------------------------------------------------------------- * <copyright company="Aspose" file="aspose_cells_cloud.h"> * Copyright (c) 2022 Aspose.Cells for Cloud * </copyright> * <summary> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * </summary> -------------------------------------------------------------------------------------------------------------------- **/ #pragma once #include "./aspose_cells_cloud/api_exception.h" #include "./aspose_cells_cloud/api_configuration.h" #include "./aspose_cells_cloud/models/api_error.h" #include "./aspose_cells_cloud/models/batch_convert_request.h" #include "./aspose_cells_cloud/models/cells_cloud_file_info.h" #include "./aspose_cells_cloud/models/cells_cloud_response.h" #include "./aspose_cells_cloud/models/error.h" #include "./aspose_cells_cloud/models/error_details.h" #include "./aspose_cells_cloud/models/dif_save_options.h" #include "./aspose_cells_cloud/models/html_save_options.h" #include "./aspose_cells_cloud/models/image_save_options.h" #include "./aspose_cells_cloud/models/markdown_save_options.h" #include "./aspose_cells_cloud/models/mhtml_save_options.h" #include "./aspose_cells_cloud/models/ods_save_options.h" #include "./aspose_cells_cloud/models/ooxml_save_options.h" #include "./aspose_cells_cloud/models/pdf_save_options.h" #include "./aspose_cells_cloud/models/pdf_security_options.h" #include "./aspose_cells_cloud/models/save_options.h" #include "./aspose_cells_cloud/models/spreadsheet_ml2003_save_options.h" #include "./aspose_cells_cloud/models/svg_save_options.h" #include "./aspose_cells_cloud/models/txt_save_options.h" #include "./aspose_cells_cloud/models/xls_save_options.h" #include "./aspose_cells_cloud/models/xlsb_save_options.h" #include "./aspose_cells_cloud/models/xps_save_options.h" #include "./aspose_cells_cloud/models/files_list.h" #include "./aspose_cells_cloud/models/files_upload_result.h" #include "./aspose_cells_cloud/models/file_link.h" #include "./aspose_cells_cloud/models/file_info.h" #include "./aspose_cells_cloud/models/files_result.h" #include "./aspose_cells_cloud/models/link.h" #include "./aspose_cells_cloud/models/match_condition_request.h" #include "./aspose_cells_cloud/models/report_build_options.h" #include "./aspose_cells_cloud/models/storage_file.h" #include "./aspose_cells_cloud/models/save_response.h" #include "./aspose_cells_cloud/models/save_result.h" #include "./aspose_cells_cloud/models/split_result_document.h" #include "./aspose_cells_cloud/models/split_result_response.h" #include "./aspose_cells_cloud/models/split_result.h" #include "./aspose_cells_cloud/models/workbook.h" #include "./aspose_cells_cloud/models/workbook_response.h" #include "./aspose_cells_cloud/models/workbook_encryption_request.h" #include "./aspose_cells_cloud/requests/post_batch_convert_request.h" #include "./aspose_cells_cloud/requests/convert_request.h" #include "./aspose_cells_cloud/requests/copy_file_request.h" #include "./aspose_cells_cloud/requests/copy_folder_request.h" #include "./aspose_cells_cloud/requests/protect_workbook_request.h" #include "./aspose_cells_cloud/requests/post_replace_request.h" #include "./aspose_cells_cloud/requests/unlock_workbook_request.h" #include "./aspose_cells_cloud/requests/create_folder_request.h" #include "./aspose_cells_cloud/requests/delete_file_request.h" #include "./aspose_cells_cloud/requests/delete_folder_request.h" #include "./aspose_cells_cloud/requests/download_file_request.h" #include "./aspose_cells_cloud/requests/get_workbook_request.h" #include "./aspose_cells_cloud/requests/get_files_list_request.h" #include "./aspose_cells_cloud/requests/get_public_key_request.h" #include "./aspose_cells_cloud/requests/post_document_save_as_request.h" #include "./aspose_cells_cloud/requests/move_file_request.h" #include "./aspose_cells_cloud/requests/move_folder_request.h" #include "./aspose_cells_cloud/requests/encryption_workbook_request.h" #include "./aspose_cells_cloud/requests/upload_file_request.h" #include "./aspose_cells_cloud/requests/post_compress_request.h" #include "./aspose_cells_cloud/requests/post_workbook_split_request.h" #include "./aspose_cells_cloud/requests/post_split_request.h" #include "./aspose_cells_cloud/requests/post_workbooks_merge_request.h" #include "./aspose_cells_cloud/requests/post_merge_request.h" #include "./aspose_cells_cloud/requests/post_clear_objects_request.h" #include "./aspose_cells_cloud/requests/post_watermark_request.h" #include "./aspose_cells_cloud/responses/post_batch_convert_response.h" #include "./aspose_cells_cloud/responses/convert_response.h" #include "./aspose_cells_cloud/responses/copy_file_response.h" #include "./aspose_cells_cloud/responses/copy_folder_response.h" #include "./aspose_cells_cloud/responses/create_folder_response.h" #include "./aspose_cells_cloud/responses/delete_file_response.h" #include "./aspose_cells_cloud/responses/delete_folder_response.h" #include "./aspose_cells_cloud/responses/download_file_response.h" #include "./aspose_cells_cloud/responses/get_files_list_response.h" #include "./aspose_cells_cloud/responses/get_public_key_response.h" #include "./aspose_cells_cloud/responses/get_workbook_response.h" #include "./aspose_cells_cloud/responses/post_document_save_as_response.h" #include "./aspose_cells_cloud/responses/move_file_response.h" #include "./aspose_cells_cloud/responses/move_folder_response.h" #include "./aspose_cells_cloud/responses/protect_workbook_response.h" #include "./aspose_cells_cloud/responses/unlock_workbook_response.h" #include "./aspose_cells_cloud/responses/encryption_workbook_response.h" #include "./aspose_cells_cloud/responses/upload_file_response.h" #include "./aspose_cells_cloud/responses/post_compress_response.h" #include "./aspose_cells_cloud/responses/post_workbook_split_response.h" #include "./aspose_cells_cloud/responses/post_split_response.h" #include "./aspose_cells_cloud/responses/post_workbooks_merge_response.h" #include "./aspose_cells_cloud/responses/post_merge_response.h" #include "./aspose_cells_cloud/responses/post_replace_response.h" #include "./aspose_cells_cloud/responses/post_clear_objects_response.h" #include "./aspose_cells_cloud/responses/post_watermark_response.h" #include "./aspose_cells_cloud/api/cells_api.h"
aspose-cells-cloud/aspose-cells-cloud-cpp
tests/api/batch_convert_test.h
<reponame>aspose-cells-cloud/aspose-cells-cloud-cpp /** -------------------------------------------------------------------------------------------------------------------- * <copyright company="Aspose" file="batch_convert_test.h"> * Copyright (c) 2022 Aspose.Cells for Cloud * </copyright> * <summary> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * </summary> -------------------------------------------------------------------------------------------------------------------- **/ #pragma once #include "../test_base.h" /// <summary> /// Example of how to work with files. /// </summary> class BatchConvertTest : public InfrastructureTest { protected: std::wstring remoteDataFolder = remoteBaseTestDataFolder + L"/Storage"; std::wstring localFile = L"source/Book1.xlsx"; std::wstring localFile2 = L"source/myDocument.xlsx"; }; /// <summary> /// Test for convert file. /// </summary> TEST_F(BatchConvertTest, PostBatchConvertTest) { std::wstring remoteFileName = L"Book1.xlsx"; auto requestFileContent = std::shared_ptr<std::istream>(new std::ifstream(std::filesystem::path(getDataDir(localFile)), std::istream::binary)); std::shared_ptr<requests::UploadFileRequest> request(new requests::UploadFileRequest( requestFileContent, std::make_shared< std::wstring >(remoteDataFolder + L"/" + remoteFileName), nullptr )); auto actual = getApi()->uploadFile(request); std::wstring remoteFileName2 = L"myDocument.xlsx"; auto requestFileContent2 = std::shared_ptr<std::istream>(new std::ifstream(std::filesystem::path(getDataDir(localFile2)), std::istream::binary)); std::shared_ptr<requests::UploadFileRequest> request2(new requests::UploadFileRequest( requestFileContent2, std::make_shared< std::wstring >(remoteDataFolder + L"/" + remoteFileName2), nullptr )); auto actual2 = getApi()->uploadFile(request2); std::shared_ptr<models::MatchConditionRequest> matchConditionRequest ( new models::MatchConditionRequest()); matchConditionRequest->setRegexPattern(std::make_shared< std::wstring >( L"(^Book)(.+)(xlsx$)")); std::shared_ptr<models::BatchConvertRequest> batchConvertRequest ( new models::BatchConvertRequest() ); batchConvertRequest->setMatchCondition(matchConditionRequest); batchConvertRequest->setSourceFolder(std::make_shared< std::wstring >( remoteDataFolder)); batchConvertRequest->setFormat(std::make_shared< std::wstring >( L"pdf")); std::shared_ptr<requests::PostBatchConvertRequest> postBatchConvertRequest(new requests::PostBatchConvertRequest( batchConvertRequest )); auto actual3 = getApi()->postBatchConvert(postBatchConvertRequest); }
aspose-cells-cloud/aspose-cells-cloud-cpp
tests/api/folder_test.h
/** -------------------------------------------------------------------------------------------------------------------- * <copyright company="Aspose" file="folder_test.h"> * Copyright (c) 2022 Aspose.Cells for Cloud * </copyright> * <summary> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * </summary> -------------------------------------------------------------------------------------------------------------------- **/ #pragma once #include "../test_base.h" /// <summary> /// Example of how to work with folders. /// </summary> class FolderTests : public InfrastructureTest { protected: std::wstring remoteDataFolder = remoteBaseTestDataFolder + L"/Storage"; std::wstring localFile = L"source/myDocument.xlsx"; }; /// <summary> /// Test for create folder. /// </summary> TEST_F(FolderTests, TestCreateFolder) { std::shared_ptr<requests::CreateFolderRequest> request(new requests::CreateFolderRequest( std::make_shared< std::wstring >(remoteDataFolder + L"/TestCreateFolder_CPP"), nullptr )); getApi()->createFolder(request); } /// <summary> /// Test for delete folder. /// </summary> TEST_F(FolderTests, TestDeleteFolder) { std::wstring testDeleteFolder = remoteDataFolder + L"/TestCreateFolder_CPP"; uploadFileToStorage( localTestDataFolder + L"/" + localFile, testDeleteFolder + L"/TestDeleteFolder_CPP.xlsx" ); std::shared_ptr<requests::DeleteFolderRequest> request(new requests::DeleteFolderRequest( std::make_shared< std::wstring >(testDeleteFolder), nullptr, std::make_shared< bool >(true) )); getApi()->deleteFolder(request); } /// <summary> /// Test for get file list of folder. /// </summary> TEST_F(FolderTests, TestGetFilesList) { std::shared_ptr<requests::GetFilesListRequest> request(new requests::GetFilesListRequest( std::make_shared< std::wstring >(remoteDataFolder), nullptr )); auto actual = getApi()->getFilesList(request); ASSERT_TRUE(actual->getValue() != nullptr); } /// <summary> /// Test for copy folder. /// </summary> TEST_F(FolderTests, TestCopyFolder) { std::wstring folderToCopy = remoteDataFolder + L"/TestCopyFolder_CPP"; uploadFileToStorage( localTestDataFolder + L"/" + localFile, folderToCopy + L"Src/TestCopyFolderSrc_CPP.xlsx" ); std::shared_ptr<requests::CopyFolderRequest> request(new requests::CopyFolderRequest( std::make_shared< std::wstring >(folderToCopy + L"Dest"), std::make_shared< std::wstring >(folderToCopy + L"Src"), nullptr, nullptr )); getApi()->copyFolder(request); } /// <summary> /// Test for move folder. /// </summary> TEST_F(FolderTests, TestMoveFolder) { uploadFileToStorage( localTestDataFolder + L"/" + localFile, remoteDataFolder + L"/TestMoveFolderSrc_CPP/TestMoveFolderSrc_CPP.xlsx" ); std::shared_ptr<requests::MoveFolderRequest> request(new requests::MoveFolderRequest( std::make_shared< std::wstring >(baseTestOutPath + L"/TestMoveFolderDest_CPP" + createRandomGuid()), std::make_shared< std::wstring >(remoteDataFolder + L"/TestMoveFolderSrc_CPP"), nullptr, nullptr )); getApi()->moveFolder(request); }
aspose-cells-cloud/aspose-cells-cloud-cpp
include/aspose_cells_cloud/api/cells_api.h
<filename>include/aspose_cells_cloud/api/cells_api.h /** -------------------------------------------------------------------------------------------------------------------- * <copyright company="Aspose" file="cells_api.h"> * Copyright (c) 2022 Aspose.Cells for Cloud * </copyright> * <summary> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * </summary> -------------------------------------------------------------------------------------------------------------------- **/ #pragma once #include <vector> #include "aspose_cells_cloud/common.h" #include "aspose_cells_cloud/api_client.h" #include "aspose_cells_cloud/requests/copy_file_request.h" #include "aspose_cells_cloud/requests/copy_folder_request.h" #include "aspose_cells_cloud/requests/convert_request.h" #include "aspose_cells_cloud/requests/create_folder_request.h" #include "aspose_cells_cloud/requests/delete_file_request.h" #include "aspose_cells_cloud/requests/delete_folder_request.h" #include "aspose_cells_cloud/requests/download_file_request.h" #include "aspose_cells_cloud/requests/get_public_key_request.h" #include "aspose_cells_cloud/requests/get_files_list_request.h" #include "aspose_cells_cloud/requests/move_file_request.h" #include "aspose_cells_cloud/requests/move_folder_request.h" #include "aspose_cells_cloud/requests/post_clear_objects_request.h" #include "aspose_cells_cloud/requests/post_split_request.h" #include "aspose_cells_cloud/requests/post_workbook_split_request.h" #include "aspose_cells_cloud/requests/upload_file_request.h" #include "aspose_cells_cloud/responses/create_folder_response.h" #include "aspose_cells_cloud/responses/copy_file_response.h" #include "aspose_cells_cloud/responses/copy_folder_response.h" #include "aspose_cells_cloud/responses/delete_file_response.h" #include "aspose_cells_cloud/responses/delete_folder_response.h" #include "aspose_cells_cloud/responses/download_file_response.h" #include "aspose_cells_cloud/responses/get_files_list_response.h" #include "aspose_cells_cloud/responses/get_public_key_response.h" #include "aspose_cells_cloud/responses/move_file_response.h" #include "aspose_cells_cloud/responses/move_folder_response.h" #include "aspose_cells_cloud/responses/upload_file_response.h" namespace aspose::cells::cloud::api { class CellsApi { public: /// <summary> /// Copy file. /// </summary> /// <param name="destPath">Destination file path.</param> /// <param name="srcPath">Source file's path e.g. '/Folder 1/file.ext' or '/Bucket/Folder 1/file.ext'.</param> /// <param name="srcStorageName">Source storage name.</param> /// <param name="destStorageName">Destination storage name.</param> /// <param name="versionId">File version ID to copy.</param> ASPOSE_CELLS_CLOUD_EXPORT void copyFile(std::shared_ptr<aspose::cells::cloud::requests::CopyFileRequest> request); /// <summary> /// Copy folder. /// </summary> /// <param name="destPath">Destination folder path e.g. '/dst'.</param> /// <param name="srcPath">Source folder path e.g. /Folder1.</param> /// <param name="srcStorageName">Source storage name.</param> /// <param name="destStorageName">Destination storage name.</param> ASPOSE_CELLS_CLOUD_EXPORT void copyFolder(std::shared_ptr<aspose::cells::cloud::requests::CopyFolderRequest> request); /// <summary> /// Create the folder. /// </summary> /// <param name="path">Target folder's path e.g. Folder1/Folder2/. The folders will be created recursively.</param> /// <param name="storageName">Storage name.</param> ASPOSE_CELLS_CLOUD_EXPORT void createFolder(std::shared_ptr<aspose::cells::cloud::requests::CreateFolderRequest> request); /// <summary> /// Delete file. /// </summary> /// <param name="path">Path of the file including the file name and extension e.g. /folder1/file.ext.</param> /// <param name="storageName">Storage name.</param> /// <param name="versionId">File version ID to delete.</param> ASPOSE_CELLS_CLOUD_EXPORT void deleteFile(std::shared_ptr<aspose::cells::cloud::requests::DeleteFileRequest> request); /// <summary> /// Delete folder. /// </summary> /// <param name="path">Folder path e.g. '/folder'.</param> /// <param name="storageName">Storage name.</param> /// <param name="recursive">Enable to delete folders, subfolders and files.</param> ASPOSE_CELLS_CLOUD_EXPORT void deleteFolder(std::shared_ptr<aspose::cells::cloud::requests::DeleteFolderRequest> request); /// <summary> /// Download file. /// </summary> /// <param name="path">Path of the file including the file name and extension e.g. /folder1/file.ext.</param> /// <param name="storageName">Storage name.</param> /// <param name="versionId">File version ID to download.</param> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::istream > downloadFile(std::shared_ptr<aspose::cells::cloud::requests::DownloadFileRequest> request); // /// <summary> // /// Converts a document in cloud storage to the specified format. // /// </summary> // /// <param name="name">The filename of the input document.</param> // /// <param name="format">The destination format.</param> // /// <param name="folder">Original document folder.</param> // /// <param name="storage">Original document storage.</param> // /// <param name="loadEncoding">Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.</param> // /// <param name="password"><PASSWORD>.</param> // /// <param name="outPath">The path to the output document.</param> // /// <param name="fontsLocation">Folder in filestorage with custom fonts.</param> // ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::istream > getDocumentWithFormat(std::shared_ptr<aspose::cells::cloud::requests::GetDocumentWithFormatRequest> request); /// <summary> /// Get all files and folders within a folder. /// </summary> /// <param name="path">Folder path e.g. '/folder'.</param> /// <param name="storageName">Storage name.</param> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< aspose::cells::cloud::models::FilesList > getFilesList(std::shared_ptr<aspose::cells::cloud::requests::GetFilesListRequest> request); /// <summary> /// Get assymetric public key. /// </summary> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< aspose::cells::cloud::models::PublicKeyResponse > getPublicKey(std::shared_ptr<aspose::cells::cloud::requests::GetPublicKeyRequest> request); /// <summary> /// Move file. /// </summary> /// <param name="destPath">Destination file path e.g. '/dest.ext'.</param> /// <param name="srcPath">Source file's path e.g. '/Folder 1/file.ext' or '/Bucket/Folder 1/file.ext'.</param> /// <param name="srcStorageName">Source storage name.</param> /// <param name="destStorageName">Destination storage name.</param> /// <param name="versionId">File version ID to move.</param> ASPOSE_CELLS_CLOUD_EXPORT void moveFile(std::shared_ptr<aspose::cells::cloud::requests::MoveFileRequest> request); /// <summary> /// Move folder. /// </summary> /// <param name="destPath">Destination folder path to move to e.g '/dst'.</param> /// <param name="srcPath">Source folder path e.g. /Folder1.</param> /// <param name="srcStorageName">Source storage name.</param> /// <param name="destStorageName">Destination storage name.</param> ASPOSE_CELLS_CLOUD_EXPORT void moveFolder(std::shared_ptr<aspose::cells::cloud::requests::MoveFolderRequest> request); /// <summary> /// Upload file. /// </summary> /// <param name="fileContent">File to upload.</param> /// <param name="path">Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename parameter from Content-Disposition header.</param> /// <param name="storageName">Storage name.</param> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< aspose::cells::cloud::models::FilesUploadResult > uploadFile(std::shared_ptr<aspose::cells::cloud::requests::UploadFileRequest> request); public: /// <summary> /// Converts an Excel file on a local drive to the specified format. /// </summary> /// <param name="name">Converting excel name.</param> /// <param name="password">The password of the excel file</param> /// <param name="format">The format to convert.</param> /// <param name="outPath">The path to the output document on a local storage.</param> /// <param name="storageName">Original document storage.</param> /// <param name="saveOption">Folder in filestorage with custom fonts.</param> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::istream > convert(std::shared_ptr<aspose::cells::cloud::requests::ConvertRequest> request); /// <summary> /// Get a document in cloud storage to the specified format. /// </summary> /// <param name="name">The filename of the input document.</param> /// <param name="format">The destination format.</param> /// <param name="password">Password for opening an encrypted document.</param> /// <param name="isAutoFit"></param> /// <param name="onlySaveTable"></param> /// <param name="folder">Original document folder.</param> /// <param name="storageName">Original document storage.</param> /// <param name="outPath">The path to the output document.</param> /// <param name="outStorageName"></param> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::istream > getWorkbook(std::shared_ptr<aspose::cells::cloud::requests::GetWorkbookRequest> request); /// <summary> /// Protect an Excel file on a local drive. /// </summary> /// <param name="name">Converting excel name.</param> /// <param name="password">The password of the excel file</param> /// <param name="saveOption">Folder in filestorage with custom fonts.</param> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< aspose::cells::cloud::models::FilesResult > protectWorkbook(std::shared_ptr<aspose::cells::cloud::requests::ProtectWorkbookRequest> request); /// <summary> /// Unlock an Excel file on a local drive. /// </summary> /// <param name="name">Converting excel name.</param> /// <param name="password">The password of the excel file</param> /// <param name="saveOption">Folder in filestorage with custom fonts.</param> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< aspose::cells::cloud::models::FilesResult > unlockWorkbook(std::shared_ptr<aspose::cells::cloud::requests::UnlockWorkbookRequest> request); /// <summary> /// Protect an Excel file on a cloud drive. /// </summary> /// <param name="name">Converting excel name.</param> /// <param name="password">The password of the excel file</param> /// <param name="saveOption">Folder in filestorage with custom fonts.</param> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< aspose::cells::cloud::models::CellsResponse > protectWorkbook(std::shared_ptr<aspose::cells::cloud::requests::EncryptionWorkbookRequest> request); /// <summary> /// Convert document and save result to storage. /// </summary> /// <param name="name">The document name.</param> /// <param name="saveOptions">Save options.</param> /// <param name="newfilename">The new file name.</param> /// <param name="isAutoFitRows">False</param> /// <param name="isAutoFitColumns">False</param> /// <param name="folder">The document folder.</param> /// <param name="storageName">storage name.</param> /// <param name="outStorageName">output storage name.</param> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< aspose::cells::cloud::models::SaveResponse > postDocumentSaveAs(std::shared_ptr<aspose::cells::cloud::requests::postDocumentSaveAsRequest> request); /// <summary> /// Split workbook. /// </summary> /// <param name="name">The workbook name.</param> /// <param name="format">Split format.</param> /// <param name="from">0</param> /// <param name="to">0</param> /// <param name="horizontalResolution">0</param> /// <param name="verticalResolution">0</param> /// <param name="folder">The workbook folder.</param> /// <param name="outFolder">out Folder.</param> /// <param name="storageName">storage name.</param> /// <param name="outStorageName">output storage name.</param> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< aspose::cells::cloud::models::SplitResultResponse> postWorkbookSplit(std::shared_ptr<aspose::cells::cloud::requests::PostWorkbookSplitRequest> request); /// <summary> /// /// </summary> /// <param name="file">File to upload</param> /// <param name="format"> </param> /// <param name="password"> </param> /// <param name="from"> </param> /// <param name="to"> </param> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< aspose::cells::cloud::models::FilesResult> postSplit(std::shared_ptr<aspose::cells::cloud::requests::PostSplitRequest> request); /// <summary> /// Merge workbooks. /// </summary> /// <param name="name">Workbook name.</param> /// <param name="mergeWith">The workbook to merge with.</param> /// <param name="folder">Source workbook folder.</param> /// <param name="storageName">storage name.</param> /// <param name="mergedStorageName">merged file storage name.</param> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< aspose::cells::cloud::models::WorkbookResponse> postWorkbooksMerge(std::shared_ptr<aspose::cells::cloud::requests::PostWorkbooksMergeRequest> request); /// <summary> /// /// </summary> /// <param name="file">File to upload</param> /// <param name="format">xlsx</param> /// <param name="mergeToOneSheet">False</param> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< aspose::cells::cloud::models::FileInfo> postMerge(std::shared_ptr<aspose::cells::cloud::requests::PostMergeRequest> request); /// <summary> /// /// </summary> /// <param name="batchConvertRequest"> </param> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< std::istream> postBatchConvert(std::shared_ptr<aspose::cells::cloud::requests::PostBatchConvertRequest> request); /// <summary> /// /// </summary> /// <param name="file">File to upload</param> /// <param name="CompressLevel"> </param> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< aspose::cells::cloud::models::FilesResult> postCompress(std::shared_ptr<aspose::cells::cloud::requests::PostCompressRequest> request); /// <summary> /// /// </summary> /// <param name="file">File to upload</param> /// <param name="CompressLevel"> </param> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< aspose::cells::cloud::models::FilesResult> postReplace(std::shared_ptr<aspose::cells::cloud::requests::PostReplaceRequest> request); /// <summary> /// /// </summary> /// <param name="file">File to upload</param> /// <param name="CompressLevel"> </param> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< aspose::cells::cloud::models::FilesResult> postClearObjects(std::shared_ptr<aspose::cells::cloud::requests::PostClearObjectsRequest> request); /// <summary> /// /// </summary> /// <param name="file">File to upload</param> /// <param name="CompressLevel"> </param> ASPOSE_CELLS_CLOUD_EXPORT std::shared_ptr< aspose::cells::cloud::models::FilesResult> postWatermark(std::shared_ptr<aspose::cells::cloud::requests::PostWatermarkRequest> request); public: ASPOSE_CELLS_CLOUD_EXPORT CellsApi(std::shared_ptr<ApiConfiguration> configuration); ASPOSE_CELLS_CLOUD_EXPORT virtual ~CellsApi() = default; private: std::shared_ptr<ApiClient> m_ApiClient; }; }
aspose-cells-cloud/aspose-cells-cloud-cpp
tests/api/convert_test.h
<reponame>aspose-cells-cloud/aspose-cells-cloud-cpp /** -------------------------------------------------------------------------------------------------------------------- * <copyright company="Aspose" file="convert_test.h"> * Copyright (c) 2022 Aspose.Cells for Cloud * </copyright> * <summary> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * </summary> -------------------------------------------------------------------------------------------------------------------- **/ #pragma once #include "../test_base.h" /// <summary> /// Example of how to work with files. /// </summary> class ConvertTests : public InfrastructureTest { protected: std::wstring remoteDataFolder = remoteBaseTestDataFolder + L"/Storage"; std::wstring localFile = L"source/Book1.xlsx"; }; /// <summary> /// Test for convert file. /// </summary> TEST_F(ConvertTests, TestConvertFile) { std::wstring remoteFileName = L"TestConvertFile_CPP.xlsx"; auto requestFile = std::shared_ptr<std::istream>(new std::ifstream(std::filesystem::path(getDataDir(localFile)), std::istream::binary)); std::shared_ptr<requests::ConvertRequest> request(new requests::ConvertRequest( std::make_shared< std::wstring >(L"pdf") , requestFile, nullptr, nullptr, nullptr )); auto actual = getApi()->convert(request); if(actual->good()){ std::ofstream out("out/TestConvertFile_CPP.pdf", std::istream::binary); actual->seekg(0,std::ios_base::beg); while(!actual->eof()){ char* buffer = new char[256]; actual->read(buffer,256); out.write(buffer,256); } } } /// <summary> /// Test for get workbook. /// </summary> TEST_F(ConvertTests, TesGetWorkbookFormat) { std::wstring remoteFileName = L"TestGetWorkBook_CPP.xlsx"; uploadFileToStorage( localTestDataFolder + L"/" + localFile, remoteDataFolder + L"/" + remoteFileName ); std::shared_ptr<requests::GetWorkbookRequest> request(new requests::GetWorkbookRequest( std::make_shared< std::wstring >(remoteFileName) , std::make_shared< std::wstring >(L"pdf"), nullptr, nullptr, nullptr, std::make_shared< std::wstring >(remoteDataFolder), nullptr, nullptr, nullptr )); auto actual = getApi()->getWorkbook(request); if(actual->good()){ std::ofstream out("out/TestGetWorkBook_CPP.pdf", std::istream::binary); actual->seekg(0,std::ios_base::beg); while(!actual->eof()){ char* buffer = new char[256]; actual->read(buffer,256); out.write(buffer,256); } } } /// <summary> /// Test for get workbook. /// </summary> TEST_F(ConvertTests, TesGetWorkbook) { std::wstring remoteFileName = L"TestGetWorkBook_CPP.xlsx"; uploadFileToStorage( localTestDataFolder + L"/" + localFile, remoteDataFolder + L"/" + remoteFileName ); std::shared_ptr<requests::GetWorkbookRequest> request(new requests::GetWorkbookRequest( std::make_shared< std::wstring >(remoteFileName) , nullptr, nullptr, nullptr, nullptr, std::make_shared< std::wstring >(remoteDataFolder), nullptr, nullptr, nullptr )); auto actual = getApi()->getWorkbook(request); if(actual->good()){ std::ofstream out("out/TestGetWorkBook_CPP.xml", std::istream::binary); actual->seekg(0,std::ios_base::beg); while(!actual->eof()){ char* buffer = new char[256]; actual->read(buffer,256); out.write(buffer,256); } } } /// <summary> /// Test for get workbook. /// </summary> TEST_F(ConvertTests, TesGetWorkbookFormatOutPath) { std::wstring remoteFileName = L"TestGetWorkBook_CPP.xlsx"; uploadFileToStorage( localTestDataFolder + L"/" + localFile, remoteDataFolder + L"/" + remoteFileName ); std::shared_ptr<requests::GetWorkbookRequest> request(new requests::GetWorkbookRequest( std::make_shared< std::wstring >(remoteFileName) , std::make_shared< std::wstring >(L"pdf"), nullptr, nullptr, nullptr, std::make_shared< std::wstring >(remoteDataFolder), nullptr, std::make_shared< std::wstring >(L"TesGetWorkbookFormatOutPath.pdf") , nullptr )); auto actual = getApi()->getWorkbook(request); if(actual->good()){ std::ofstream out("out/TesGetWorkbookFormatOutPath.xml", std::istream::binary); actual->seekg(0,std::ios_base::beg); while(!actual->eof()){ char* buffer = new char[256]; actual->read(buffer,256); out.write(buffer,256); } } } /// <summary> /// Test for workbook save as. /// </summary> TEST_F(ConvertTests, TesWorkbookSaveAs) { std::wstring remoteFileName = L"TestWorkBookSaveAs_CPP.xlsx"; uploadFileToStorage( localTestDataFolder + L"/" + localFile, remoteDataFolder + L"/" + remoteFileName ); std::shared_ptr<requests::postDocumentSaveAsRequest> request(new requests::postDocumentSaveAsRequest( std::make_shared< std::wstring >(remoteFileName) , nullptr, std::make_shared< std::wstring >(L"OutResult/TestWorkBookSaveAs_CPP.xlsx.pdf"), nullptr, nullptr, std::make_shared< std::wstring >(remoteDataFolder), nullptr, nullptr )); auto actual = getApi()->postDocumentSaveAs(request); }
aspose-cells-cloud/aspose-cells-cloud-cpp
include/aspose_cells_cloud/api_configuration.h
/** -------------------------------------------------------------------------------------------------------------------- * <copyright company="Aspose" file="api_configuration.h"> * Copyright (c) 2022 Aspose.Cells for Cloud * </copyright> * <summary> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * </summary> -------------------------------------------------------------------------------------------------------------------- **/ #pragma once #include <string> #include "./common.h" namespace aspose::cells::cloud { class ApiConfiguration { public: ASPOSE_CELLS_CLOUD_EXPORT ApiConfiguration(const std::wstring& clientId, const std::wstring& clientSecret, const std::wstring& baseUrl = L"https://api.aspose.cloud"); ASPOSE_CELLS_CLOUD_EXPORT virtual ~ApiConfiguration() = default; ASPOSE_CELLS_CLOUD_EXPORT const std::wstring& getBaseUrl() const; ASPOSE_CELLS_CLOUD_EXPORT const std::wstring& getClientId() const; ASPOSE_CELLS_CLOUD_EXPORT const std::wstring& getClientSecret() const; ASPOSE_CELLS_CLOUD_EXPORT const std::wstring& getApiVersion() const; ASPOSE_CELLS_CLOUD_EXPORT bool isDebugMode() const; ASPOSE_CELLS_CLOUD_EXPORT void setDebugMode(bool debug); ASPOSE_CELLS_CLOUD_EXPORT size_t getTimeout() const; ASPOSE_CELLS_CLOUD_EXPORT void setTimeout(size_t seconds); protected: bool m_DebugMode = false; size_t m_Timeout = 300; const std::wstring m_Version = L"v3.0"; std::wstring m_BaseUrl; std::wstring m_ClientSecret; std::wstring m_ClientId; }; }
isshe/code-library
B.Operating-System/Linux/Application/B.lib/isshe_stdio.c
<gh_stars>1-10 #include <stdio.h> #include "isshe_stdio.h" #include "isshe_error.h" char *isshe_fgets(char *ptr, int n, FILE *stream) { char *rptr; if ( (rptr = fgets(ptr, n, stream)) == NULL && ferror(stream)) isshe_sys_error_exit("fgets error"); return (rptr); } void isshe_fputs(const char *ptr, FILE *stream) { if (fputs(ptr, stream) == EOF) { isshe_sys_error_exit("fputs error"); } }