max_stars_repo_path
stringlengths
4
261
max_stars_repo_name
stringlengths
6
106
max_stars_count
int64
0
38.8k
id
stringlengths
1
6
text
stringlengths
7
1.05M
45/runtime/rt/dvstmt.asm
minblock/msdos
0
15731
TITLE DVSTMT - Device Independent I/O Statements page 56,132 ;*** ; DVSTMT - Device Independent I/O Statements ; ; Copyright <C> 1986, Microsoft Corporation ; ;Purpose: ; ; BASIC Syntax mapping to included runtime entry points: ; ; - EOF Function: ; ; EOF(file number) ; | ; I2 B$FEOF ; ; - LOC Function: ; ; LOC(file number) ; | ; I4 B$FLOC ; ; - LOF Function: ; ; LOF(file number) ; | ; I4 B$FLOF ; ; - CLOSE Statement - B$CLOS, no matter having parameters or not ; ; CLOSE [[#]file number [,[#]filenumber...]] ; ; Examples: ; ; CLOSE CLOSE #1 CLOSE 1,2 ; | | | ; B$CLOS B$CLOS B$CLOS ; parameter count 0 parameter count 1 parameter count 2 ; no parameter 1 in stack 2 & 1 in stack ; ; - WIDTH Statement: ; ; Four different Syntax possibilities map to four runtime entry points: ; ; WIDTH size WIDTH LPRINT size ; | | ; B$WIDT B$LWID ; ; ; WIDTH filenumber, size WIDTH device, size ; | | ; B$DWID B$DWID ; ; - GET Statement - calls B$GET1 if no record number specified, or ; B$GET2 if a record number specified ; B$GET3 if record variable, but no record number ; B$GET4 if record variable, and record number ; ; GET [#]filenumber [,[record number][,record variable]] ; ; Examples: ; ; GET #1 GET #2,4 GET #2,,FOO GET #2,4,FOO ; | | | | ; B$GET1 B$GET2 B$GET3 B$GET4 ; ; Record Number is I4. ; ; - PUT Statement - calls B$PUT1 if no record number specified, or ; B$PUT2 if a record number specified ; B$PUT3 if record variable, but no record number ; B$PUT4 if record variable, and record number ; ; PUT [#]filenumber [,[record number][,record variable]] ; ; Examples: ; ; PUT #1 PUT #2,4 PUT #2,,FOO PUT #2,4,FOO ; | | | | ; B$PUT1 B$PUT2 B$PUT3 B$PUT4 ; ; - OPEN Statement: ; ; Two syntaxes are allowed: ; ; OPEN mode,[#]filenumber,"filespec" [,reclength] ; B$OOPN, which has C definition as follows with parameters in stack. ; B$OOPN(U2 mode, I2 channel, sd *psdName, I2 cbRecord) ; (refering the procedure head comments of B$OPEN for detail) ; ; OPEN "filespec" [FOR mode][locktype] AS [#]filenumber [LEN=reclength] ; B$OPEN, which has C definition as follows with parameters in stack. ; B$OPEN(sd *psdName,I2 channel,I2 cbRecord,U2 mode,I2 access,I2 lock) ; (refering the procedure head comments of B$OPEN for detail) ; ; - FILEATTR function ; ; FILEATTR(file number, field) ; | ; I4 B$FATR ; ; - FREEFILE function ; ; FREEFILE ; | ; I2 B$FREF ; ;****************************************************************************** INCLUDE switch.inc INCLUDE rmacros.inc ;Code segments: useSeg NH_TEXT ;near heap useSeg ER_TEXT ;error handling useSeg DV_TEXT ;device independent I/O ;Data segments: useSeg _DATA ;initialized variables useSeg _BSS ;uninitialized variable INCLUDE seg.inc ;set up segments INCLUDE baslibma.inc INCLUDE devdef.inc INCLUDE files.inc INCLUDE ascii.inc INCLUDE idmac.inc INCLUDE const.inc INCLUDE rtps.inc ; constants shared with QBI SUBTTL local constant definitions page InpSts EQU 6 ;input status for IOCTL TTY EQU 0 ;default b$PTRFIL is TTY PRSTM EQU 0 ;print statement CHANL EQU 1 ;# USING EQU 2 ;using WRSTM EQU 4 ;write statement LPSTM EQU 8 ;lprint statement SUBTTL data definitions page sBegin _DATA ;initialized variables externB b$IOFLAG ; Misc. IO flags. Defined in GWINI.ASM sEnd ;end of _DATA sBegin _BSS ;uninitialized variables staticW DispAddr,,1 ; kept the dispatch address externW b$Buf2 ; defined in GWINI.ASM PATH_LEN EQU b$Buf2 ; save area for pathname length ; sort of a waste, but convenient externW b$RECPTR sEnd ;_BSS SUBTTL code segments externals page sBegin DV_TEXT externNP B$PtrDispatch sEnd sBegin NH_TEXT ;near heap externNP B$LHFDBLOC externNP B$LHNXTFIL externNP B$LHLOCFDB externFP B$STDL externNP B$STALC sEnd sBegin ER_TEXT ;error code component externNP B$ERR_RVR externNP B$ERR_BFM externNP B$ERR_BRL ; Bad record length externNP B$ERR_FSA externNP B$ERR_BRN externNP B$ERR_IFN externNP B$ERR_FC sEnd assumes CS,DV_TEXT sBegin DV_TEXT ; device I/O SUBTTL LOC interface -- B$FLOC page ;*** ;B$FLOC -- the current file location ;I4 B$FLOC (I2 channel) ; ;Purpose: ; This function returns the current file location. For a random or ; sequential file, it returns the last record number been read/written ; (a sequential has fix record length -- 128 bytes). For a comm. ; file, it returns the number of bytes in the input buffer waiting to ; be read. ;Entry: ; Parameter is in stack. ; int Channel ;Exit: ; [DX|AX] = file location ;Uses: ; none ;Exceptions: ; illegal file number -- B$ERR_IFN ;******************************************************************************* cProc B$FLOC,<PUBLIC,FAR> ParmW Channel ;I2, channel # cBegin MOV AH,DV_LOC ;LOC function LocLof: ;common for LOC & LOF MOV BX,Channel ;BX has the file number cCall ComDsp ;dispatch to the actual working routine ;(xxxx_LOC return results in DX:AX) cEnd ;exit to caller SUBTTL LOF interface -- B$FLOF page ;*** ;B$FLOF -- return the length of the file ;I4 B$FLOF(I2 channel) ; ;Purpose: ; For a disk file, it returns the size of the file. For a comm. ; file, it returns the amount of free space in the input buffer. ;Entry: ; Parameter is in stack. ; int channel ;Exit: ; [DX|AX] = bytes allocated for the file ;Uses: ; none ;Exceptions: ; illegal file number -- B$ERR_IFN ;******************************************************************************* cProc B$FLOF,<PUBLIC,FAR> ParmW Channel ;I2 channel # cBegin MOV AH,DV_LOF ;LOF Function JMP SHORT LocLof ;dispatch to the actual working routine and ; exit via B$FLOC cEnd nogen ;no code generated SUBTTL WIDTH interface -- B$FWID page ;*** ;B$FWID -- change the width of a file ;void B$FWID(I2 channel, I2 size) ; ;Purpose: ; This routine changes the file width while the file is opened. ; This is meaningful for LPT?. ; ; Syntax is: WIDTH #filenum,filesiz ; ; The routine sets the file width BEFORE file open is B$DWID. ; The routine sets the screen width is B$WIDT. ; The routine sets the LPRINT width is B$LWID. ;Entry: ; Parameters in stack. ; int channel ; int wid ;Exit: ; none ;Uses: ; none ;Exceptions: ; illegal file number -- B$ERR_IFN ;******************************************************************************* cProc B$FWID,<PUBLIC,FAR> ParmW Channel ;I2, channel # ParmW Wid ;I2, width cBegin MOV BX,Channel ;BX has the file number MOV DX,Wid ;DL has the width or dh,dh ; if width > 255 error jnz ercfc ; and or dl,dl ; if width = 0 error jz ercfc MOV AH,DV_WIDTH ;File width function cCall ComDsp ;dispatch to the actual working routine cEnd ;exit to caller ercfc: JMP B$ERR_FC SUBTTL Sequential random I/O interfaces -- B$GET1 & B$PUT1 page ;*** ;B$GET1 -- get a record sequentially ;void B$GET1(I2 channel) ; ;Purpose: ; Get a record into random buffer if there is no record number specified. ;Entry: ; Parameter in stack. ; int Channel ;Exit: ; a record is read into the random buffer ; ; Note: while calling RndDsp, ; [BX] = file number (used by B$LHFDBLOC/B$LocateFDB) ; [AL] = GET + Sequential flag (refer to RndDsp) ;Uses: ; none ;Exceptions: ; illegal file number -- B$ERR_IFN ; bad file mode -- B$ERR_BFM ;******************************************************************************* cProc B$GET1,<PUBLIC,FAR> ParmW Channel ;I2, file number cBegin XOR AL,AL ;indicate GET without a specified RecNum RndIO1: MOV BX,Channel ;BX has the channel # cCall RndDsp ;do it cEnd ;exit to caller ;*** ;B$PUT1 -- put a record sequentially ;void B$PUT1(I2 Channel) ; ;Purpose: ; Put a record into random buffer with no specified record number. ;Entry: ; Parameter in stack. ; int Channel ;Exit: ; a record is put into the random buffer ; ; Note: while calling RndDsp, ; [BX] = file number (used by B$LHFDBLOC/B$LocateFDB) ; [AL] = PUT + Sequential flag (refer to RndDsp) ;Uses: ; none ;Exceptions: ; illegal file number -- B$ERR_IFN ; bad file mode -- B$ERR_BFM ;******************************************************************************* cProc B$PUT1,<PUBLIC,FAR> ParmW Channel ;I2 file number cBegin MOV AL,PutFlg ;indicate PUT without a specified RecNum JMP SHORT RndIO1 ;do it cEnd nogen ;exit to caller via B$GET1 SUBTTL Relative random I/O interfaces -- B$GET2 & B$PUT2 page ;*** ;B$GET2 -- get the record with record number specified ;void B$GET2(I2 Channel, I4 recnum) ; ;Purpose: ; Get the record specified into random buffer. ;Entry: ; Parameters in stack. ; int Channel ; long int RecNum ;Exit: ; the record is read into random buffer ; ; Note: while calling RndDsp, ; [BX] = file number (used by B$LHFDBLOC/B$LocateFDB) ; [AL] = GET + Relative flag (refer to RndDsp) ; [CX|DX] = I4 specified record number ;Uses: ; none ;Exceptions: ; illegal file number -- B$ERR_IFN ; bad file mode -- B$ERR_BFM ; bad record number -- B$ERR_BRN ;******************************************************************************* cProc B$GET2,<PUBLIC,FAR> ParmW Channel ;I2 file number ParmD RecNum ;I4 record number cBegin MOV AL,RelFlg ;indicate GET with record number specified RndIO2: MOV CX,Seg_RecNum ;CX = RecNum high OR CX,CX ;can't be negative number JS ERCBRN ;Brif negative, give "bad record number" MOV DX,Off_RecNum ;DX = RecNum low MOV BX,CX ;another copy of RecNum high in BX OR BX,DX ;can't be zero JZ ERCBRN ;Brif zero, give "bad record number" MOV BX,Channel ;BX has the channel number cCall RndDsp ;do the work cEnd ;exit to caller ERCBRN: JMP B$ERR_BRN ;bad record number ;*** ;B$PUT2 -- put a record with specified record number ;void B$PUT2(I2 Channel, I4 RecNum) ; ;Purpose: ; Put a record into random buffer with specified record number. ;Entry: ; Parmaters in stack. ; int Channel ; long int RecNum ;Exit: ; a record is put into the random buffer. ; ; Note: while calling RndDsp, ; [BX] = file number (used by B$LHFDBLOC/B$LocateFDB) ; [AL] = PUT + Relative flag (refer to RndDsp) ; [CX|DX] = I4 specified record number ;Uses: ; none ;Exceptions: ; illegal file number -- B$ERR_IFN ; bad file mode -- B$ERR_BFM ; bad record number -- B$ERR_BRN ;******************************************************************************* cProc B$PUT2,<PUBLIC,FAR> ParmW Channel ;I2 file number ParmD RecNum ;I4 record number cBegin MOV AL,RelFlg+PutFlg ;indicate this is PUT with specified Rec Num JMP SHORT RndIO2 ;do it cEnd nogen ;exit via B$GET2 SUBTTL Relative random I/O interfaces -- B$GET3 & B$PUT3 page ;*** ;B$GET3 -- get the record with a record variable specified ;void B$GET3(I2 Channel, TYP far *recptr, I2 reclen) ; ;Purpose: ; Get the record specified into the users record variable ; ; NOTE: This routine can take a far pointer to a movable item in a heap. This ; routine cannot directly or indirectly cause heap movement. ; ;Entry: ; Parameters in stack. ; int Channel ; typ far *RecPtr ; int RecLen ; ;Exit: ; ;Note: while calling RndDsp, ; [BX] = file number (used by B$LHFDBLOC/B$LocateFDB) ; [AL] = GET + Record flag (refer to RndDsp) ; [SI] = record length ; [ES:DI] = Pointer to the users record ; ;Uses: ; none ; ;Exceptions: ; illegal file number -- B$ERR_IFN ; bad file mode -- B$ERR_BFM ; bad record number -- B$ERR_BRN ;******************************************************************************* cProc B$GET3,<PUBLIC,FAR> ParmW Channel ; I2 file number ParmD RecPtr ; far record pointer ParmW RecLen ; i2 record length cBegin MOV AL,RecFlg ; indicate GET with record variable specified RndIO3: MOV BX,Channel ; [BX] = channel number PUSH SI PUSH DI PUSH ES MOV SI,RecLen ; [SI] = Record length LES DI,RecPtr ; [ES:DI] = Record Pointer cCall RndDsp ; do the work POP ES POP DI POP SI cEnd ; exit to caller ;*** ;B$PUT3 -- put a record from specified record variable ;void B$PUT3(I2 Channel, TYP far *recptr, I2 reclen) ; ;Purpose: ; Put a record from record var ; ; NOTE: This routine can take a far pointer to a movable item in a heap. This ; routine cannot directly or indirectly cause heap movement. ; ;Entry: ; Parameters in stack. ; int Channel ; typ far *RecPtr ; int RecLen ; ;Exit: ; ;Note: while calling RndDsp, ; [BX] = file number (used by B$LHFDBLOC/B$LocateFDB) ; [AL] = PUT + Record flag (refer to RndDsp) ; [SI] = record length ; [ES:DI] = Pointer to the users record ; ;Uses: ; none ; ;Exceptions: ; illegal file number -- B$ERR_IFN ; bad file mode -- B$ERR_BFM ; bad record number -- B$ERR_BRN ;******************************************************************************* cProc B$PUT3,<PUBLIC,FAR> ParmW Channel ; I2 file number ParmD RecPtr ; far record pointer ParmW RecLen ; i2 record length cBegin MOV AL,RecFlg+PutFlg; indicate this is PUT with record var JMP SHORT RndIO3 ; do it cEnd nogen ; exit via B$GET3 SUBTTL Relative random I/O interfaces -- B$GET4 & B$PUT4 page ;*** ;B$GET4 -- get the record with record number specified to record var ;void B$GET4(I2 Channel, I4 recnum, TYP far *recptr, I2 reclen) ; ;Purpose: ; Get the record specified into user record ; ; NOTE: This routine can take a far pointer to a movable item in a heap. This ; routine cannot directly or indirectly cause heap movement. ; ;Entry: ; Parameters in stack. ; int Channel ; long int RecNum ; typ far *RecPtr ; int RecLen ; ;Exit: ; ;Note: while calling RndDsp, ; [BX] = file number (used by B$LHFDBLOC/B$LocateFDB) ; [AL] = GET + Relative flag (refer to RndDsp) ; [CX|DX] = I4 specified record number ; [SI] = record length ; [ES:DI] = Pointer to the users record ; ;Uses: ; none ; ;Exceptions: ; illegal file number -- B$ERR_IFN ; bad file mode -- B$ERR_BFM ; bad record number -- B$ERR_BRN ;******************************************************************************* cProc B$GET4,<PUBLIC,FAR> ParmW Channel ; I2 file number ParmD RecNum ; I4 record number ParmD RecPtr ; far record pointer ParmW RecLen ; I2 record length cBegin MOV AL,RelFlg+RecFlg; indicate GET with record number & var RndIO4: MOV CX,Seg_RecNum ; CX = RecNum high OR CX,CX ; can't be negative number JS ERCBRN ; Brif negative, give "bad record number" MOV DX,Off_RecNum ; DX = RecNum low MOV BX,CX ; another copy of RecNum high in BX OR BX,DX ; can't be zero JZ ERCBRN ; Brif zero, give "bad record number" MOV BX,Channel ; BX has the channel number PUSH SI PUSH DI PUSH ES MOV SI,RecLen ; [SI] = Record length LES DI,RecPtr ; [ES:DI] = Record Pointer cCall RndDsp ; do the work POP ES POP DI POP SI cEnd ; exit to caller ;*** ;B$PUT4 -- put a record with specified record number from record var ;void B$PUT4(I2 Channel, I4 RecNum, TYP far *recptr, I2 reclen) ; ;Purpose: ; Put a record from record var with specified record number. ; ; NOTE: This routine can take a far pointer to a movable item in a heap. This ; routine cannot directly or indirectly cause heap movement. ; ;Entry: ; Parmaters in stack. ; int Channel ; long int RecNum ; typ far *RecPtr ; int RecLen ; ;Exit: ; ;Note: while calling RndDsp, ; [BX] = file number (used by B$LHFDBLOC/B$LocateFDB) ; [AL] = GET + Relative flag (refer to RndDsp) ; [CX|DX] = I4 specified record number ; [SI] = record length ; [ES:DI] = Pointer to the users record ; ;Uses: ; none ; ;Exceptions: ; illegal file number -- B$ERR_IFN ; bad file mode -- B$ERR_BFM ; bad record number -- B$ERR_BRN ;******************************************************************************* cProc B$PUT4,<PUBLIC,FAR> ParmW Channel ; I2 file number ParmD RecNum ; I4 record number ParmD RecPtr ; far record pointer ParmW RecLen ; I2 record length cBegin MOV AL,RelFlg+PutFlg+RecFlg ; indicate PUT Rec Num & Rec Var JMP SHORT RndIO4 ; do it cEnd nogen ; exit via B$GET4 Locals PROC NEAR SUBTTL B$FREF - Return next available file number PAGE ;*** ; B$FREF - Return next available file number ; int pascal B$FREF(void) ; ;Purpose: ; Runtime entry point to return the next available file number. This is done ; by a pretty dumb repetative linear search of all FDBs, trying all file ; numbers starting at 1. Anything more intelligent is probably more effort ; than it's worth, since the call to FREEFILE will more often than not be ; followed by an OPEN call, which is probably I/O bound. ; ;Entry: ; None. ; ;Exit: ; [AX] = Next available file number. ; ;Uses: ; Per convention. ; ;Exceptions: ; B$ERR_SSC, if the heap is screwed up. ; ;****************************************************************************** cProc B$FREF,<FAR,PUBLIC,FORCEFRAME>,<SI> cBegin XOR AX,AX ; [AX] = potential "next" file number FREF_5: ; Loop to restart at beging of FDB chain XOR SI,SI ; [SI] = Flag to get first FDB pointer INC AX ; [AX] = next potential "next" filenumber FREF_10: ; Loop for each FDB CALL B$LHNXTFIL ; [SI] = pointer to next FDB JZ FREF_90 ; Jump if no more FDB's (we're done) CALL B$LHLOCFDB ; [BL] = filenumber associated with FDB CMP AL,BL ; See if our "guess" is being used JNZ FREF_10 ; loop to go check next FDB if not used JMP FREF_5 ; else loop to attempt a new guess FREF_90: ; FDB chain end found, and guess not used cEnd SUBTTL EOF interface -- B$FEOF page ;*** ;B$FEOF -- function which detects the EOF for a file ;I2 B$FEOF(I2 Channel) ; ;Purpose: ; Detect whether the EOF is reached. This function is only significant ; for a input or communication file. ; ; Note: EOF won't return true (-1) for a random file, even if you GET ; a record beyond the file end. However, that GET gets a null ; record. ; ;Entry: ; Parameter in stack. ; int Channel ;Exit: ; [AX] = -1 EOF is reached for a sequential input file, or ; communication buffer is empty ; = 0 EOF is not reached yet ;Uses: ; none ;Exceptions: ; illegal file number -- B$ERR_IFN ;******************************************************************************* cProc B$FEOF,<PUBLIC,FAR> ParmW Channel ;I2, file number cBegin MOV BX,Channel ;BX has file number OR BX,BX ;special for standard input ? JZ REDIR ;Brif yes MOV AH,DV_EOF ;end of file function cCall ComDsp ; do it, on return [AX] has the result JMP SHORT EOFExit ;exit to caller REDIR: TEST b$IOFLAG,RED_INP ; is input file redirected ? JZ ERCIFN ; Brif not, give "illegal file number" MOV AX,C_IOCTL SHL 8 + InpSts ; get input status INT 21h ; is the end of a file ? ;[AL] = 0FFH if not end of file ;[AL] = 0 if end of file CBW ;result in AX NOT AX ; and pervert EOFExit: cEnd ;clear stack and return SUBTTL B$FATR - FILEATTR function PAGE ;*** ; B$FATR - FILEATTR function ; I4 pascal B$FATR(I2 channel, I2 fieldid) ; ;Purpose: ; Returns specific information from an FDB, based on the fieldid value. This ; interface allows us to muck with the FDB, and still provide the same info ; to the user in a stable fasion. ; ;Entry: ; channel = File number to be queried ; fieldid = field number to be returned ; ;Exit: ; [DX:AX] = requested information ; ;Uses: ; Per convention ; ;Exceptions: ; B$ERR_FC = Bad field number ; ;****************************************************************************** cProc B$FATR,<FAR,PUBLIC>,<SI> parmW channel ; file to futz with parmW fieldid ; field desired cBegin MOV BX,channel ; [BX] = File's channel # cCall B$LHFDBLOC ; [SI] = FDB pointer (NZ if found) JNZ FATR_3 ; Jump if so JMP B$ERR_IFN ; else bad file number FATR_3: MOV BX,fieldid ; [BX] = user requested field DEC BX ; Make it zero-relative CMP BX,FIELDID_MAX ; See if in range JB FATR_5 ; Jump if valid request JMP B$ERR_FC ; Else illegal function call FATR_5: ADD BX,BX ; [BX] = word offset into table XOR AX,AX ; Init I4 return value CWD FDB_PTR ES,SI,SI ;(ES:)[SI] = * FDB ADD SI,CS:[BX].FIELDOFF_TABLE ; FDB field by fun. (zero rel) JMP CS:[BX].FIELDDISP_TABLE ; Dispatches by fun. (zero rel) FATR_TWO: ; Dispatch point for two byte fields LODS WORD PTR FileDB ; Load FDB word JMP SHORT FATR_90 FATR_ONE: ; Dispatch point for one byte fields LODS BYTE PTR FileDB ; Load FDB byte FATR_90: cEnd ERCIFN: JMP B$ERR_IFN ;illegal file number SUBTTL general I/O supporting routines page ;*** ;ComDsp -- common dispatch routine ; ;Purpose: ; This common dispatch routine checks the legality of the channel ; and then dispatch to the actual working routine. ;Entry: ; [AH] = fucntion number (minor #) ; [BX] = file number ;Exit: ; depends on function ;Uses: ; none ;Exceptions: ; illegal file number -- B$ERR_IFN ;******************************************************************************* cProc ComDsp,<NEAR>,<SI> ;save SI cBegin CALL B$LHFDBLOC ;[SI] = file data block pointer JZ ERCIFN ;Error - illegal file number CALL B$PtrDispatch ; dispatch to the working routine cEnd ;pop si and exit to caller ;*** ;RndDsp -- dispatch for random I/O ; ;Purpose: ; Check the legality of the file number and the file mode. If both ; OK, dispatch to the working routine. ;Entry: ; [AL] = flags ; Bit 0: 1 if PUT, else GET ; BIT 1: 1 if explicit record number specified ; BIT 2: 1 if record variable specified ; [BX] = file number ; [CX:DX] = record number if RelFlg is on. Note: use [CX|DX] here ; for the consistence with DOS function call ; [ES:DI] = record variable address, if RecFlg is on ; [SI] = record variable length, if RecFlg is on ; ; ;Exit: ; a record is in random buffer ;Uses: ; none ;Exceptions: ; illegal file number -- B$ERR_IFN ; bad file mode -- B$ERR_BFM ;******************************************************************************* cProc VarStrLenDsp,<NEAR>,<SI,ES,DI> cBegin jmp VarStrLen_Entry cEnd <nogen> cProc RndDsp,<NEAR>,<SI,ES,DI> cBegin PUSH SI ; preserve record length CALL B$LHFDBLOC ;NZ & [SI]=*FDB if file number found POP BX ; [BX] = length of record variable JZ ERCIFN ;Brif not found, give "illegal file number" FDB_PTR ES,SI,SI ;(ES:)[SI] = *FDB TEST FileDB.FD_MODE,MD_RND+MD_BIN ; random or binary? JNZ RND_OR_BIN JMP ERCBFM ; brif not - bad file mode RND_OR_BIN: TEST AL,RecFlg ; See if record variable passed JNZ RndDsp_5 ; Jump if it was TEST FileDB.FD_MODE,MD_BIN ; binary mode? JZ NOT_BIN JMP ERCRVR ; brif so -- record variable required NOT_BIN: PUSH DS ; Form... POP ES ; pointer in... LEA DI,FileDB.FD_BUFFER ;[ES:DI] ptr to record (field buffer) MOV BX,FileDB.FD_VRECL ;[BX] = length of record (LEN= length) JMP SHORT RndDsp_15 ; go finish dispatch RndDsp_5: ; record variable was passed in OR BX,BX ; 0-length read/write? JNZ NotSD ; brif not -- not a string descriptor ; A 0-length means that we have a string ; descriptor and that we must dereference ; ES:DI = string descriptor address TEST FileDB.FD_MODE,MD_BIN ; binary mode? JNZ NotVarLenStr ; brif so -- no special string handling ; Special code to handle puts/gets from/into variable-length strings. ; For random files, the length of the string will be placed in the file ; before the string data. push ax ; save flags push cx ; save optional record # push dx mov bx,2 ; length to read/write or al,VarStrLen ; don't increment record # after next op. test AL,PutFlg ; PUT statement? jnz PutStrLen ; brif so -- output length ; GET statement ;(othewise, ES should be equal to ds/ss) push bx ; save '2' push di ; save SD offset push ax ; space for length on stack mov di,sp ; ES:DI = addr of length word call VarStrLenDsp ; read length of string into ES:DI pop ax ; AX = length to read (new str length) pop di ; DI = SD offset pop bx ; BX = 2 (total # to read) FDB_PTR ES,si,si ; restore (ES:)[SI] = *FDB for ChkRandom add bx,ax call ChkRandom ; do verification push ax ; save length cCall B$STDL,<DI> ; deallocate existing string pop cx ; restore CX = length jcxz RestoreState ; brif zero-length string -- don't do ALLOC mov bx,cx ; BX = new string length call B$STALC ; alloc string with new length, BX=*str data mov [di],cx ; set SD string length mov [di+2],bx ; set SD string address mov [bx-2],di ; set back pointer jmp short RestoreState PutStrLen: ; PUT statement, DS:[DI] = str len (from SD) push bx ; save '2' add bx,[di] ; bx = 2+string length call ChkRandom ; do verification pop bx ; restore bx = 2 call VarStrLenDsp ; write length of string to file RestoreState: pop dx ; restore optional record # pop cx pop ax ; restore flags or al,VarStrData ; don't seek before next get/put NotVarLenStr: MOV BX,ES:[DI] ; BX = string length MOV DI,ES:[DI+2] ; DS:DI = string address PUSH DS ; ES:DI = string address POP ES OR BX,BX ; null string? JZ RndExit ; brif so -- return without doing anything FDB_PTR ES ;restore FDG SEG in ES NotSD: TEST FileDB.FD_MODE,MD_BIN ; binary mode? JNZ RndDsp_15 ; brif so -- skip checks for bad record ; length and field statement VarStrLen_Entry: call ChkRandom RndDsp_15: MOV [b$RECPTR],DI MOV [b$RECPTR+2],ES ; [b$RECPTR] = record pointer MOV AH,DV_RANDIO ;AH=function number (minor #) CALL B$PtrDispatch ; dispatch to the working routine RndExit: cEnd ;pop si, exit to caller ;*** ;ChkRandom -- verify stuff before RANDOM file I/O ; ;Purpose: ; Added with revision [43] to save code. ; ;Entry: ; BX = length to read/write (includes count word for variable-length ; strings as record variables). ;Exit: ; None ;Uses: ; None ;Preserves: ; All ;Exceptions: ; Bad record length, Field statement active ; ;****************************************************************************** cProc ChkRandom,<NEAR> cBegin CMP BX,FileDB.FD_VRECL ; record too long? JA ERCBRL ; brif so -- Bad record length TEST FileDB.FD_FLAGS,FL_FIELD ; FIELD stmt active for this FDB? JNZ ERCFSA ; brif so -- FIELD statement active cEnd ERCBRL: JMP B$ERR_BRL ERCFSA: JMP B$ERR_FSA ; FIELDOFF_TABLE ; ; Table of FDB fields offsets that FILEATTR will return. Each entry contains ; the location within the FDB of the field to be returned. ; ; FIELDDISP_TABLE ; table of routine offsets to execute to fetch a particular field. ; labelW FIELDOFF_TABLE DW FD_MODE ; 1: File Mode DW FD_HANDLE ; 2: DOS file handle labelW FIELDDISP_TABLE DW FATR_ONE ; 1: File Mode: one byte DW FATR_TWO ; 2: DOS file handle: two byte FIELDID_MAX = 2 ; last entry in table Locals ENDP ERCBFM: JMP B$ERR_BFM ;bad file mode ERCRVR: JMP B$ERR_RVR ;record variable required sEnd ;DV_TEXT END
programs/oeis/130/A130543.asm
karttu/loda
1
13779
<filename>programs/oeis/130/A130543.asm ; A130543: Multiplicative persistence of n!. ; 0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 mov $2,4 trn $2,$0 pow $1,$2
libsrc/z80_crt0s/z80/sccz80/l_pint.asm
jpoikela/z88dk
38
9991
<reponame>jpoikela/z88dk ; Z88 Small C+ Run time Library ; Moved functions over to proper libdefs ; To make startup code smaller and neater! ; ; 6/9/98 djm SECTION code_crt0_sccz80 PUBLIC l_pint ; store int from HL into (DE) .l_pint IF EZ80 ex de,hl defb 0xed, 0x1f ;ld (hl),de ex de,hl ELSE ld a,l ld (de),a inc de ld a,h ld (de),a ENDIF ret
programs/oeis/186/A186181.asm
neoneye/loda
22
161993
; A186181: Period 4 sequence [ 2, 2, 3, 2, ...] except a(0) = 1. ; 1,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2 gcd $0,262156 mov $1,5 bin $1,$0 div $1,5 add $1,1 mov $0,$1
programs/oeis/329/A329533.asm
karttu/loda
0
244327
<filename>programs/oeis/329/A329533.asm ; A329533: First differences of A051924, or second differences of Central binomial coefficients A000984. ; 3,10,36,132,490,1836,6930,26312,100386,384540,1478048,5697720,22019556,85284920,330961950,1286562960,5009003250,19528599420,76231136520,297910080600,1165429743660,4563490674600,17884841191620,70148829799152,275344923755700,1081512966189656,4250730282412320 mov $2,$0 mov $6,2 lpb $6,1 mov $0,$2 sub $6,1 add $0,$6 sub $0,1 mov $4,2 mov $11,$0 lpb $4,1 mov $0,$11 sub $4,1 add $0,$4 add $0,1 mov $3,$4 mov $7,$0 add $7,$0 bin $7,$0 add $7,1 mov $9,$0 add $9,2 sub $7,$9 mov $10,$7 lpb $3,1 sub $3,1 mov $8,$10 lpe lpe lpb $11,1 sub $8,$10 mov $11,0 lpe mov $5,$6 mov $10,$8 lpb $5,1 mov $1,$10 sub $5,1 lpe lpe lpb $2,1 sub $1,$10 mov $2,0 lpe
source/amf/uml/amf-uml-object_nodes.ads
svn2github/matreshka
24
16626
<reponame>svn2github/matreshka ------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, <NAME> <<EMAIL>> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ -- Object nodes have support for token selection, limitation on the number of -- tokens, specifying the state required for tokens, and carrying control -- values. -- -- An object node is an abstract activity node that is part of defining -- object flow in an activity. ------------------------------------------------------------------------------ with AMF.UML.Activity_Nodes; limited with AMF.UML.Behaviors; limited with AMF.UML.States.Collections; with AMF.UML.Typed_Elements; limited with AMF.UML.Value_Specifications; package AMF.UML.Object_Nodes is pragma Preelaborate; type UML_Object_Node is limited interface and AMF.UML.Activity_Nodes.UML_Activity_Node and AMF.UML.Typed_Elements.UML_Typed_Element; type UML_Object_Node_Access is access all UML_Object_Node'Class; for UML_Object_Node_Access'Storage_Size use 0; not overriding function Get_In_State (Self : not null access constant UML_Object_Node) return AMF.UML.States.Collections.Set_Of_UML_State is abstract; -- Getter of ObjectNode::inState. -- -- The required states of the object available at this point in the -- activity. not overriding function Get_Is_Control_Type (Self : not null access constant UML_Object_Node) return Boolean is abstract; -- Getter of ObjectNode::isControlType. -- -- Tells whether the type of the object node is to be treated as control. not overriding procedure Set_Is_Control_Type (Self : not null access UML_Object_Node; To : Boolean) is abstract; -- Setter of ObjectNode::isControlType. -- -- Tells whether the type of the object node is to be treated as control. not overriding function Get_Ordering (Self : not null access constant UML_Object_Node) return AMF.UML.UML_Object_Node_Ordering_Kind is abstract; -- Getter of ObjectNode::ordering. -- -- Tells whether and how the tokens in the object node are ordered for -- selection to traverse edges outgoing from the object node. not overriding procedure Set_Ordering (Self : not null access UML_Object_Node; To : AMF.UML.UML_Object_Node_Ordering_Kind) is abstract; -- Setter of ObjectNode::ordering. -- -- Tells whether and how the tokens in the object node are ordered for -- selection to traverse edges outgoing from the object node. not overriding function Get_Selection (Self : not null access constant UML_Object_Node) return AMF.UML.Behaviors.UML_Behavior_Access is abstract; -- Getter of ObjectNode::selection. -- -- Selects tokens for outgoing edges. not overriding procedure Set_Selection (Self : not null access UML_Object_Node; To : AMF.UML.Behaviors.UML_Behavior_Access) is abstract; -- Setter of ObjectNode::selection. -- -- Selects tokens for outgoing edges. not overriding function Get_Upper_Bound (Self : not null access constant UML_Object_Node) return AMF.UML.Value_Specifications.UML_Value_Specification_Access is abstract; -- Getter of ObjectNode::upperBound. -- -- The maximum number of tokens allowed in the node. Objects cannot flow -- into the node if the upper bound is reached. not overriding procedure Set_Upper_Bound (Self : not null access UML_Object_Node; To : AMF.UML.Value_Specifications.UML_Value_Specification_Access) is abstract; -- Setter of ObjectNode::upperBound. -- -- The maximum number of tokens allowed in the node. Objects cannot flow -- into the node if the upper bound is reached. end AMF.UML.Object_Nodes;
vba/vba.g4
augustand/grammars-v4
0
1112
/* * Copyright (C) 2014 <NAME> <<EMAIL>> * * 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 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* * Visual Basic 6.0 Grammar for ANTLR4 * * This is an approximate grammar for Visual Basic 6.0, derived * from the Visual Basic 6.0 language reference * http://msdn.microsoft.com/en-us/library/aa338033%28v=vs.60%29.aspx * and tested against MSDN VB6 statement examples as well as several Visual * Basic 6.0 code repositories. * * Characteristics: * * 1. This grammar is line-based and takes into account whitespace, so that * member calls (e.g. "A.B") are distinguished from contextual object calls * in WITH statements (e.g. "A .B"). * * 2. Keywords can be used as identifiers depending on the context, enabling * e.g. "A.Type", but not "Type.B". * * * Known limitations: * * 1. Preprocessor statements (#if, #else, ...) must not interfere with regular * statements. * * Change log: * * v1.4 Rubberduck * - renamed to VBA; goal is to support VBA, and a shorter name is more practical. * - added moduleDeclarations rule, moved moduleOptions there; options can now be * located anywhere in declarations section, without breaking the parser. * - added support for Option Compare Database. * - added support for VBA 7.0 PtrSafe attribute for Declare statements. * - implemented a fileNumber rule to locate identifier usages in file numbers. * - added support for anonymous declarations in With blocks (With New Something) * - blockStmt rules being sorted alphabetically was wrong. moved implicit call statement last. * - '!' in dictionary call statement rule gets picked up as a type hint; changed member call * to accept '!' as well as '.', but this complicates resolving the '!' shorthand syntax. * - added a subscripts rule in procedure calls, to avoid breaking the parser with * a function call that returns an array that is immediately accessed. * - added missing macroConstStmt (#CONST) rule. * - amended selectCaseStmt rules to support all valid syntaxes. * - blockStmt is now illegal in declarations section. * - added ON_LOCAL_ERROR token, to support legacy ON LOCAL ERROR statements. * - added additional typeHint? token to declareStmt, to support "Declare Function Foo$". * - modified WS lexer rule to correctly account for line continuations; * - modified multi-word lexer rules to use WS lexer token instead of ' '; this makes * the grammar support "Option _\n Explicit" and other keywords being specified on multiple lines. * - modified moduleOption rules to account for WS token in corresponding lexer rules. * - modified NEWLINE lexer rule to properly support instructions separator (':'). * - tightened DATELITERAL lexer rule to the format enforced by the VBE, because "#fn: Close #" * in "Dim fn: fn = FreeFile: Open "filename" For Output As #fn: Close #fn" was picked up as a date literal. * - redefined IDENTIFIER lexer rule to support non-Latin characters (e.g. Japanese) * - made seekStmt, lockStmt, unlockStmt, getStmt and widthStmt accept a fileNumber (needed to support '#') * - fixed precompiler directives, which can now be nested. they still can't interfere with other blocks though. * - optional parameters can be a valueStmt. * - added support for Octal and Currency literals. * - implemented proper specs for DATELITERAL. * - added comments to parse tree (removes known limitation #2). * - macroConstStmt now allowed in blockStmt. * - allow type hints for parameters. * *====================================================================================== * * v1.3 * - call statement precedence * * v1.2 * - refined call statements * * v1.1 * - precedence of operators and of ELSE in select statements * - optimized member calls * * v1.0 Initial revision */ grammar vba; // module ---------------------------------- startRule : module EOF; module : WS? endOfLine* (moduleHeader endOfLine*)? moduleConfig? endOfLine* moduleAttributes? endOfLine* moduleDeclarations? endOfLine* moduleBody? endOfLine* WS? ; moduleHeader : VERSION WS DOUBLELITERAL WS CLASS; moduleConfig : BEGIN endOfLine* moduleConfigElement+ END ; moduleConfigElement : ambiguousIdentifier WS? EQ WS? literal endOfLine* ; moduleAttributes : (attributeStmt endOfLine+)+; moduleDeclarations : moduleDeclarationsElement (endOfLine+ moduleDeclarationsElement)* endOfLine*; moduleOption : OPTION_BASE WS SHORTLITERAL # optionBaseStmt | OPTION_COMPARE WS (BINARY | TEXT | DATABASE) # optionCompareStmt | OPTION_EXPLICIT # optionExplicitStmt | OPTION_PRIVATE_MODULE # optionPrivateModuleStmt ; moduleDeclarationsElement : comment | declareStmt | enumerationStmt | eventStmt | constStmt | implementsStmt | variableStmt | moduleOption | typeStmt | macroStmt ; macroStmt : macroConstStmt | macroIfThenElseStmt; moduleBody : moduleBodyElement (endOfLine+ moduleBodyElement)* endOfLine*; moduleBodyElement : functionStmt | propertyGetStmt | propertySetStmt | propertyLetStmt | subStmt | macroStmt ; // block ---------------------------------- attributeStmt : ATTRIBUTE WS implicitCallStmt_InStmt WS? EQ WS? literal (WS? ',' WS? literal)*; block : blockStmt (endOfStatement blockStmt)* endOfStatement; blockStmt : lineLabel | appactivateStmt | attributeStmt | beepStmt | chdirStmt | chdriveStmt | closeStmt | constStmt | dateStmt | deleteSettingStmt | deftypeStmt | doLoopStmt | endStmt | eraseStmt | errorStmt | exitStmt | explicitCallStmt | filecopyStmt | forEachStmt | forNextStmt | getStmt | goSubStmt | goToStmt | ifThenElseStmt | implementsStmt | inputStmt | killStmt | letStmt | lineInputStmt | loadStmt | lockStmt | lsetStmt | macroStmt | midStmt | mkdirStmt | nameStmt | onErrorStmt | onGoToStmt | onGoSubStmt | openStmt | printStmt | putStmt | raiseEventStmt | randomizeStmt | redimStmt | resetStmt | resumeStmt | returnStmt | rmdirStmt | rsetStmt | savepictureStmt | saveSettingStmt | seekStmt | selectCaseStmt | sendkeysStmt | setattrStmt | setStmt | stopStmt | timeStmt | unloadStmt | unlockStmt | variableStmt | whileWendStmt | widthStmt | withStmt | writeStmt | implicitCallStmt_InBlock ; // statements ---------------------------------- appactivateStmt : APPACTIVATE WS valueStmt (WS? ',' WS? valueStmt)?; beepStmt : BEEP; chdirStmt : CHDIR WS valueStmt; chdriveStmt : CHDRIVE WS valueStmt; closeStmt : CLOSE (WS fileNumber (WS? ',' WS? fileNumber)*)?; constStmt : (visibility WS)? CONST WS constSubStmt (WS? ',' WS? constSubStmt)*; constSubStmt : ambiguousIdentifier typeHint? (WS asTypeClause)? WS? EQ WS? valueStmt; dateStmt : DATE WS? EQ WS? valueStmt; declareStmt : (visibility WS)? DECLARE WS (PTRSAFE WS)? ((FUNCTION typeHint?) | SUB) WS ambiguousIdentifier typeHint? WS LIB WS STRINGLITERAL (WS ALIAS WS STRINGLITERAL)? (WS? argList)? (WS asTypeClause)?; deftypeStmt : ( DEFBOOL | DEFBYTE | DEFINT | DEFLNG | DEFCUR | DEFSNG | DEFDBL | DEFDEC | DEFDATE | DEFSTR | DEFOBJ | DEFVAR ) WS letterrange (WS? ',' WS? letterrange)* ; deleteSettingStmt : DELETESETTING WS valueStmt WS? ',' WS? valueStmt (WS? ',' WS? valueStmt)?; doLoopStmt : DO endOfStatement block? LOOP | DO WS (WHILE | UNTIL) WS valueStmt endOfStatement block? LOOP | DO endOfStatement block LOOP WS (WHILE | UNTIL) WS valueStmt ; endStmt : END; enumerationStmt: (visibility WS)? ENUM WS ambiguousIdentifier endOfStatement enumerationStmt_Constant* END_ENUM ; enumerationStmt_Constant : ambiguousIdentifier (WS? EQ WS? valueStmt)? endOfStatement; eraseStmt : ERASE WS valueStmt; errorStmt : ERROR WS valueStmt; eventStmt : (visibility WS)? EVENT WS ambiguousIdentifier WS? argList; exitStmt : EXIT_DO | EXIT_FOR | EXIT_FUNCTION | EXIT_PROPERTY | EXIT_SUB; filecopyStmt : FILECOPY WS valueStmt WS? ',' WS? valueStmt; forEachStmt : FOR WS EACH WS ambiguousIdentifier typeHint? WS IN WS valueStmt endOfStatement block? NEXT (WS ambiguousIdentifier)? ; forNextStmt : FOR WS ambiguousIdentifier typeHint? (WS asTypeClause)? WS? EQ WS? valueStmt WS TO WS valueStmt (WS STEP WS valueStmt)? endOfStatement block? NEXT (WS ambiguousIdentifier)? ; functionStmt : (visibility WS)? (STATIC WS)? FUNCTION WS? ambiguousIdentifier typeHint? (WS? argList)? (WS? asTypeClause)? endOfStatement block? END_FUNCTION ; getStmt : GET WS fileNumber WS? ',' WS? valueStmt? WS? ',' WS? valueStmt; goSubStmt : GOSUB WS valueStmt; goToStmt : GOTO WS valueStmt; ifThenElseStmt : IF WS ifConditionStmt WS THEN WS blockStmt (WS ELSE WS blockStmt)? # inlineIfThenElse | ifBlockStmt ifElseIfBlockStmt* ifElseBlockStmt? END_IF # blockIfThenElse ; ifBlockStmt : IF WS ifConditionStmt WS THEN endOfStatement block? ; ifConditionStmt : valueStmt; ifElseIfBlockStmt : ELSEIF WS ifConditionStmt WS THEN endOfStatement block? ; ifElseBlockStmt : ELSE endOfStatement block? ; implementsStmt : IMPLEMENTS WS ambiguousIdentifier; inputStmt : INPUT WS fileNumber (WS? ',' WS? valueStmt)+; killStmt : KILL WS valueStmt; letStmt : (LET WS)? implicitCallStmt_InStmt WS? (EQ | PLUS_EQ | MINUS_EQ) WS? valueStmt; lineInputStmt : LINE_INPUT WS fileNumber WS? ',' WS? valueStmt; loadStmt : LOAD WS valueStmt; lockStmt : LOCK WS valueStmt (WS? ',' WS? valueStmt (WS TO WS valueStmt)?)?; lsetStmt : LSET WS implicitCallStmt_InStmt WS? EQ WS? valueStmt; macroConstStmt : MACRO_CONST WS? ambiguousIdentifier WS? EQ WS? valueStmt; macroIfThenElseStmt : macroIfBlockStmt macroElseIfBlockStmt* macroElseBlockStmt? MACRO_END_IF; macroIfBlockStmt : MACRO_IF WS? ifConditionStmt WS THEN endOfStatement (moduleDeclarations | moduleBody | block)* ; macroElseIfBlockStmt : MACRO_ELSEIF WS? ifConditionStmt WS THEN endOfStatement (moduleDeclarations | moduleBody | block)* ; macroElseBlockStmt : MACRO_ELSE endOfStatement (moduleDeclarations | moduleBody | block)* ; midStmt : MID WS? LPAREN WS? argsCall WS? RPAREN; mkdirStmt : MKDIR WS valueStmt; nameStmt : NAME WS valueStmt WS AS WS valueStmt; onErrorStmt : (ON_ERROR | ON_LOCAL_ERROR) WS (GOTO WS valueStmt | RESUME WS NEXT); onGoToStmt : ON WS valueStmt WS GOTO WS valueStmt (WS? ',' WS? valueStmt)*; onGoSubStmt : ON WS valueStmt WS GOSUB WS valueStmt (WS? ',' WS? valueStmt)*; openStmt : OPEN WS valueStmt WS FOR WS (APPEND | BINARY | INPUT | OUTPUT | RANDOM) (WS ACCESS WS (READ | WRITE | READ_WRITE))? (WS (SHARED | LOCK_READ | LOCK_WRITE | LOCK_READ_WRITE))? WS AS WS fileNumber (WS LEN WS? EQ WS? valueStmt)? ; outputList : outputList_Expression (WS? (';' | ',') WS? outputList_Expression?)* | outputList_Expression? (WS? (';' | ',') WS? outputList_Expression?)+ ; outputList_Expression : valueStmt | (SPC | TAB) (WS? LPAREN WS? argsCall WS? RPAREN)? ; printStmt : PRINT WS fileNumber WS? ',' (WS? outputList)?; propertyGetStmt : (visibility WS)? (STATIC WS)? PROPERTY_GET WS ambiguousIdentifier typeHint? (WS? argList)? (WS asTypeClause)? endOfStatement block? END_PROPERTY ; propertySetStmt : (visibility WS)? (STATIC WS)? PROPERTY_SET WS ambiguousIdentifier (WS? argList)? endOfStatement block? END_PROPERTY ; propertyLetStmt : (visibility WS)? (STATIC WS)? PROPERTY_LET WS ambiguousIdentifier (WS? argList)? endOfStatement block? END_PROPERTY ; putStmt : PUT WS fileNumber WS? ',' WS? valueStmt? WS? ',' WS? valueStmt; raiseEventStmt : RAISEEVENT WS ambiguousIdentifier (WS? LPAREN WS? (argsCall WS?)? RPAREN)?; randomizeStmt : RANDOMIZE (WS valueStmt)?; redimStmt : REDIM WS (PRESERVE WS)? redimSubStmt (WS?',' WS? redimSubStmt)*; redimSubStmt : implicitCallStmt_InStmt WS? LPAREN WS? subscripts WS? RPAREN (WS asTypeClause)?; resetStmt : RESET; resumeStmt : RESUME (WS (NEXT | ambiguousIdentifier))?; returnStmt : RETURN; rmdirStmt : RMDIR WS valueStmt; rsetStmt : RSET WS implicitCallStmt_InStmt WS? EQ WS? valueStmt; savepictureStmt : SAVEPICTURE WS valueStmt WS? ',' WS? valueStmt; saveSettingStmt : SAVESETTING WS valueStmt WS? ',' WS? valueStmt WS? ',' WS? valueStmt WS? ',' WS? valueStmt; seekStmt : SEEK WS fileNumber WS? ',' WS? valueStmt; selectCaseStmt : SELECT WS CASE WS valueStmt endOfStatement sC_Case* END_SELECT ; sC_Selection : IS WS? comparisonOperator WS? valueStmt # caseCondIs | valueStmt WS TO WS valueStmt # caseCondTo | valueStmt # caseCondValue ; sC_Case : CASE WS sC_Cond endOfStatement block? ; // ELSE first, so that it is not interpreted as a variable call sC_Cond : ELSE # caseCondElse | sC_Selection (WS? ',' WS? sC_Selection)* # caseCondSelection ; sendkeysStmt : SENDKEYS WS valueStmt (WS? ',' WS? valueStmt)?; setattrStmt : SETATTR WS valueStmt WS? ',' WS? valueStmt; setStmt : SET WS implicitCallStmt_InStmt WS? EQ WS? valueStmt; stopStmt : STOP; subStmt : (visibility WS)? (STATIC WS)? SUB WS? ambiguousIdentifier (WS? argList)? endOfStatement block? END_SUB ; timeStmt : TIME WS? EQ WS? valueStmt; typeStmt : (visibility WS)? TYPE WS ambiguousIdentifier endOfStatement typeStmt_Element* END_TYPE ; typeStmt_Element : ambiguousIdentifier (WS? LPAREN (WS? subscripts)? WS? RPAREN)? (WS asTypeClause)? endOfStatement; typeOfStmt : TYPEOF WS valueStmt (WS IS WS type)?; unloadStmt : UNLOAD WS valueStmt; unlockStmt : UNLOCK WS fileNumber (WS? ',' WS? valueStmt (WS TO WS valueStmt)?)?; // operator precedence is represented by rule order valueStmt : literal # vsLiteral | implicitCallStmt_InStmt # vsICS | LPAREN WS? valueStmt (WS? ',' WS? valueStmt)* RPAREN # vsStruct | NEW WS? valueStmt # vsNew | typeOfStmt # vsTypeOf | midStmt # vsMid | ADDRESSOF WS? valueStmt # vsAddressOf | implicitCallStmt_InStmt WS? ASSIGN WS? valueStmt # vsAssign | valueStmt WS? IS WS? valueStmt # vsIs | valueStmt WS? LIKE WS? valueStmt # vsLike | valueStmt WS? GEQ WS? valueStmt # vsGeq | valueStmt WS? LEQ WS? valueStmt # vsLeq | valueStmt WS? GT WS? valueStmt # vsGt | valueStmt WS? LT WS? valueStmt # vsLt | valueStmt WS? NEQ WS? valueStmt # vsNeq | valueStmt WS? EQ WS? valueStmt # vsEq | valueStmt WS? POW WS? valueStmt # vsPow | MINUS WS? valueStmt # vsNegation | PLUS WS? valueStmt # vsPlus | valueStmt WS? DIV WS? valueStmt # vsDiv | valueStmt WS? MULT WS? valueStmt # vsMult | valueStmt WS? MOD WS? valueStmt # vsMod | valueStmt WS? PLUS WS? valueStmt # vsAdd | valueStmt WS? MINUS WS? valueStmt # vsMinus | valueStmt WS? AMPERSAND WS? valueStmt # vsAmp | valueStmt WS? IMP WS? valueStmt # vsImp | valueStmt WS? EQV WS? valueStmt # vsEqv | valueStmt WS? XOR WS? valueStmt # vsXor | valueStmt WS? OR WS? valueStmt # vsOr | valueStmt WS? AND WS? valueStmt # vsAnd | NOT WS? valueStmt # vsNot ; variableStmt : (DIM | STATIC | visibility) WS (WITHEVENTS WS)? variableListStmt; variableListStmt : variableSubStmt (WS? ',' WS? variableSubStmt)*; variableSubStmt : ambiguousIdentifier (WS? LPAREN WS? (subscripts WS?)? RPAREN WS?)? typeHint? (WS asTypeClause)?; whileWendStmt : WHILE WS valueStmt endOfStatement block? WEND ; widthStmt : WIDTH WS fileNumber WS? ',' WS? valueStmt; withStmt : WITH WS (implicitCallStmt_InStmt | (NEW WS type)) endOfStatement block? END_WITH ; writeStmt : WRITE WS fileNumber WS? ',' (WS? outputList)?; fileNumber : '#'? valueStmt; // complex call statements ---------------------------------- explicitCallStmt : eCS_ProcedureCall | eCS_MemberProcedureCall ; // parantheses are required in case of args -> empty parantheses are removed eCS_ProcedureCall : CALL WS ambiguousIdentifier typeHint? (WS? LPAREN WS? argsCall WS? RPAREN)? (WS? LPAREN subscripts RPAREN)*; // parantheses are required in case of args -> empty parantheses are removed eCS_MemberProcedureCall : CALL WS implicitCallStmt_InStmt? '.' ambiguousIdentifier typeHint? (WS? LPAREN WS? argsCall WS? RPAREN)? (WS? LPAREN subscripts RPAREN)*; implicitCallStmt_InBlock : iCS_B_MemberProcedureCall | iCS_B_ProcedureCall ; iCS_B_MemberProcedureCall : implicitCallStmt_InStmt? '.' ambiguousIdentifier typeHint? (WS argsCall)? dictionaryCallStmt? (WS? LPAREN subscripts RPAREN)*; // parantheses are forbidden in case of args // variables cannot be called in blocks // certainIdentifier instead of ambiguousIdentifier for preventing ambiguity with statement keywords iCS_B_ProcedureCall : certainIdentifier (WS argsCall)? (WS? LPAREN subscripts RPAREN)*; // iCS_S_MembersCall first, so that member calls are not resolved as separate iCS_S_VariableOrProcedureCalls implicitCallStmt_InStmt : iCS_S_MembersCall | iCS_S_VariableOrProcedureCall | iCS_S_ProcedureOrArrayCall | iCS_S_DictionaryCall ; iCS_S_VariableOrProcedureCall : ambiguousIdentifier typeHint? dictionaryCallStmt? (WS? LPAREN subscripts RPAREN)*; iCS_S_ProcedureOrArrayCall : (ambiguousIdentifier | baseType) typeHint? WS? LPAREN WS? (argsCall WS?)? RPAREN dictionaryCallStmt? (WS? LPAREN subscripts RPAREN)*; iCS_S_MembersCall : (iCS_S_VariableOrProcedureCall | iCS_S_ProcedureOrArrayCall)? iCS_S_MemberCall+ dictionaryCallStmt? (WS? LPAREN subscripts RPAREN)*; iCS_S_MemberCall : ('.' | '!') (iCS_S_VariableOrProcedureCall | iCS_S_ProcedureOrArrayCall); iCS_S_DictionaryCall : dictionaryCallStmt; // atomic call statements ---------------------------------- argsCall : (argCall? WS? (',' | ';') WS?)* argCall (WS? (',' | ';') WS? argCall?)*; argCall : LPAREN? ((BYVAL | BYREF | PARAMARRAY) WS)? RPAREN? valueStmt; dictionaryCallStmt : '!' ambiguousIdentifier typeHint?; // atomic rules for statements argList : LPAREN (WS? arg (WS? ',' WS? arg)*)? WS? RPAREN; arg : (OPTIONAL WS)? ((BYVAL | BYREF) WS)? (PARAMARRAY WS)? ambiguousIdentifier typeHint? (WS? LPAREN WS? RPAREN)? (WS? asTypeClause)? (WS? argDefaultValue)?; argDefaultValue : EQ WS? valueStmt; subscripts : subscript (WS? ',' WS? subscript)*; subscript : (valueStmt WS TO WS)? valueStmt; // atomic rules ---------------------------------- ambiguousIdentifier : (IDENTIFIER | ambiguousKeyword)+ ; asTypeClause : AS WS? (NEW WS)? type (WS? fieldLength)?; baseType : BOOLEAN | BYTE | COLLECTION | DATE | DOUBLE | INTEGER | LONG | SINGLE | STRING | VARIANT; certainIdentifier : IDENTIFIER (ambiguousKeyword | IDENTIFIER)* | ambiguousKeyword (ambiguousKeyword | IDENTIFIER)+ ; comparisonOperator : LT | LEQ | GT | GEQ | EQ | NEQ | IS | LIKE; complexType : ambiguousIdentifier (('.' | '!') ambiguousIdentifier)*; fieldLength : MULT WS? (INTEGERLITERAL | ambiguousIdentifier); letterrange : certainIdentifier (WS? MINUS WS? certainIdentifier)?; lineLabel : ambiguousIdentifier ':'; literal : HEXLITERAL | OCTLITERAL | DATELITERAL | DOUBLELITERAL | INTEGERLITERAL | SHORTLITERAL | STRINGLITERAL | TRUE | FALSE | NOTHING | NULL; type : (baseType | complexType) (WS? LPAREN WS? RPAREN)?; typeHint : '&' | '%' | '#' | '!' | '@' | '$'; visibility : PRIVATE | PUBLIC | FRIEND | GLOBAL; // ambiguous keywords ambiguousKeyword : ACCESS | ADDRESSOF | ALIAS | AND | ATTRIBUTE | APPACTIVATE | APPEND | AS | BEEP | BEGIN | BINARY | BOOLEAN | BYVAL | BYREF | BYTE | CALL | CASE | CLASS | CLOSE | CHDIR | CHDRIVE | COLLECTION | CONST | DATABASE | DATE | DECLARE | DEFBOOL | DEFBYTE | DEFCUR | DEFDBL | DEFDATE | DEFDEC | DEFINT | DEFLNG | DEFOBJ | DEFSNG | DEFSTR | DEFVAR | DELETESETTING | DIM | DO | DOUBLE | EACH | ELSE | ELSEIF | END | ENUM | EQV | ERASE | ERROR | EVENT | FALSE | FILECOPY | FRIEND | FOR | FUNCTION | GET | GLOBAL | GOSUB | GOTO | IF | IMP | IMPLEMENTS | IN | INPUT | IS | INTEGER | KILL | LOAD | LOCK | LONG | LOOP | LEN | LET | LIB | LIKE | LSET | ME | MID | MKDIR | MOD | NAME | NEXT | NEW | NOT | NOTHING | NULL | ON | OPEN | OPTIONAL | OR | OUTPUT | PARAMARRAY | PRESERVE | PRINT | PRIVATE | PUBLIC | PUT | RANDOM | RANDOMIZE | RAISEEVENT | READ | REDIM | REM | RESET | RESUME | RETURN | RMDIR | RSET | SAVEPICTURE | SAVESETTING | SEEK | SELECT | SENDKEYS | SET | SETATTR | SHARED | SINGLE | SPC | STATIC | STEP | STOP | STRING | SUB | TAB | TEXT | THEN | TIME | TO | TRUE | TYPE | TYPEOF | UNLOAD | UNLOCK | UNTIL | VARIANT | VERSION | WEND | WHILE | WIDTH | WITH | WITHEVENTS | WRITE | XOR ; remComment : REMCOMMENT; comment : COMMENT; endOfLine : WS? (NEWLINE | comment | remComment) WS?; endOfStatement : (endOfLine | WS? COLON WS?)*; // lexer rules -------------------------------------------------------------------------------- // keywords ACCESS : A C C E S S; ADDRESSOF : A D D R E S S O F; ALIAS : A L I A S; AND : A N D; ATTRIBUTE : A T T R I B U T E; APPACTIVATE : A P P A C T I V A T E; APPEND : A P P E N D; AS : A S; BEGIN : B E G I N; BEEP : B E E P; BINARY : B I N A R Y; BOOLEAN : B O O L E A N; BYVAL : B Y V A L; BYREF : B Y R E F; BYTE : B Y T E; CALL : C A L L; CASE : C A S E; CHDIR : C H D I R; CHDRIVE : C H D R I V E; CLASS : C L A S S; CLOSE : C L O S E; COLLECTION : C O L L E C T I O N; CONST : C O N S T; DATABASE : D A T A B A S E; DATE : D A T E; DECLARE : D E C L A R E; DEFBOOL : D E F B O O L; DEFBYTE : D E F B Y T E; DEFDATE : D E F D A T E; DEFDBL : D E F D B L; DEFDEC : D E F D E C; DEFCUR : D E F C U R; DEFINT : D E F I N T; DEFLNG : D E F L N G; DEFOBJ : D E F O B J; DEFSNG : D E F S N G; DEFSTR : D E F S T R; DEFVAR : D E F V A R; DELETESETTING : D E L E T E S E T T I N G; DIM : D I M; DO : D O; DOUBLE : D O U B L E; EACH : E A C H; ELSE : E L S E; ELSEIF : E L S E I F; END_ENUM : E N D WS E N U M; END_FUNCTION : E N D WS F U N C T I O N; END_IF : E N D WS I F; END_PROPERTY : E N D WS P R O P E R T Y; END_SELECT : E N D WS S E L E C T; END_SUB : E N D WS S U B; END_TYPE : E N D WS T Y P E; END_WITH : E N D WS W I T H; END : E N D; ENUM : E N U M; EQV : E Q V; ERASE : E R A S E; ERROR : E R R O R; EVENT : E V E N T; EXIT_DO : E X I T WS D O; EXIT_FOR : E X I T WS F O R; EXIT_FUNCTION : E X I T WS F U N C T I O N; EXIT_PROPERTY : E X I T WS P R O P E R T Y; EXIT_SUB : E X I T WS S U B; FALSE : F A L S E; FILECOPY : F I L E C O P Y; FRIEND : F R I E N D; FOR : F O R; FUNCTION : F U N C T I O N; GET : G E T; GLOBAL : G L O B A L; GOSUB : G O S U B; GOTO : G O T O; IF : I F; IMP : I M P; IMPLEMENTS : I M P L E M E N T S; IN : I N; INPUT : I N P U T; IS : I S; INTEGER : I N T E G E R; KILL: K I L L; LOAD : L O A D; LOCK : L O C K; LONG : L O N G; LOOP : L O O P; LEN : L E N; LET : L E T; LIB : L I B; LIKE : L I K E; LINE_INPUT : L I N E WS I N P U T; LOCK_READ : L O C K WS R E A D; LOCK_WRITE : L O C K WS W R I T E; LOCK_READ_WRITE : L O C K WS R E A D WS W R I T E; LSET : L S E T; MACRO_CONST : '#' C O N S T; MACRO_IF : '#' I F; MACRO_ELSEIF : '#' E L S E I F; MACRO_ELSE : '#' E L S E; MACRO_END_IF : '#' E N D WS? I F; ME : M E; MID : M I D; MKDIR : M K D I R; MOD : M O D; NAME : N A M E; NEXT : N E X T; NEW : N E W; NOT : N O T; NOTHING : N O T H I N G; NULL : N U L L; ON : O N; ON_ERROR : O N WS E R R O R; ON_LOCAL_ERROR : O N WS L O C A L WS E R R O R; OPEN : O P E N; OPTIONAL : O P T I O N A L; OPTION_BASE : O P T I O N WS B A S E; OPTION_EXPLICIT : O P T I O N WS E X P L I C I T; OPTION_COMPARE : O P T I O N WS C O M P A R E; OPTION_PRIVATE_MODULE : O P T I O N WS P R I V A T E WS M O D U L E; OR : O R; OUTPUT : O U T P U T; PARAMARRAY : P A R A M A R R A Y; PRESERVE : P R E S E R V E; PRINT : P R I N T; PRIVATE : P R I V A T E; PROPERTY_GET : P R O P E R T Y WS G E T; PROPERTY_LET : P R O P E R T Y WS L E T; PROPERTY_SET : P R O P E R T Y WS S E T; PTRSAFE : P T R S A F E; PUBLIC : P U B L I C; PUT : P U T; RANDOM : R A N D O M; RANDOMIZE : R A N D O M I Z E; RAISEEVENT : R A I S E E V E N T; READ : R E A D; READ_WRITE : R E A D WS W R I T E; REDIM : R E D I M; REM : R E M; RESET : R E S E T; RESUME : R E S U M E; RETURN : R E T U R N; RMDIR : R M D I R; RSET : R S E T; SAVEPICTURE : S A V E P I C T U R E; SAVESETTING : S A V E S E T T I N G; SEEK : S E E K; SELECT : S E L E C T; SENDKEYS : S E N D K E Y S; SET : S E T; SETATTR : S E T A T T R; SHARED : S H A R E D; SINGLE : S I N G L E; SPC : S P C; STATIC : S T A T I C; STEP : S T E P; STOP : S T O P; STRING : S T R I N G; SUB : S U B; TAB : T A B; TEXT : T E X T; THEN : T H E N; TIME : T I M E; TO : T O; TRUE : T R U E; TYPE : T Y P E; TYPEOF : T Y P E O F; UNLOAD : U N L O A D; UNLOCK : U N L O C K; UNTIL : U N T I L; VARIANT : V A R I A N T; VERSION : V E R S I O N; WEND : W E N D; WHILE : W H I L E; WIDTH : W I D T H; WITH : W I T H; WITHEVENTS : W I T H E V E N T S; WRITE : W R I T E; XOR : X O R; // symbols AMPERSAND : '&'; ASSIGN : ':='; DIV : '\\' | '/'; EQ : '='; GEQ : '>='; GT : '>'; LEQ : '<='; LPAREN : '('; LT : '<'; MINUS : '-'; MINUS_EQ : '-='; MULT : '*'; NEQ : '<>'; PLUS : '+'; PLUS_EQ : '+='; POW : '^'; RPAREN : ')'; L_SQUARE_BRACKET : '['; R_SQUARE_BRACKET : ']'; // literals STRINGLITERAL : '"' (~["\r\n] | '""')* '"'; OCTLITERAL : '&O' [0-8]+ '&'?; HEXLITERAL : '&H' [0-9A-F]+ '&'?; SHORTLITERAL : (PLUS|MINUS)? DIGIT+ ('#' | '&' | '@')?; INTEGERLITERAL : SHORTLITERAL (E SHORTLITERAL)?; DOUBLELITERAL : (PLUS|MINUS)? DIGIT* '.' DIGIT+ (E SHORTLITERAL)?; DATELITERAL : '#' DATEORTIME '#'; fragment DATEORTIME : DATEVALUE WS? TIMEVALUE | DATEVALUE | TIMEVALUE; fragment DATEVALUE : DATEVALUEPART DATESEPARATOR DATEVALUEPART (DATESEPARATOR DATEVALUEPART)?; fragment DATEVALUEPART : DIGIT+ | MONTHNAME; fragment DATESEPARATOR : WS? [/,-]? WS?; fragment MONTHNAME : ENGLISHMONTHNAME | ENGLISHMONTHABBREVIATION; fragment ENGLISHMONTHNAME : J A N U A R Y | F E B R U A R Y | M A R C H | A P R I L | M A Y | J U N E | A U G U S T | S E P T E M B E R | O C T O B E R | N O V E M B E R | D E C E M B E R; fragment ENGLISHMONTHABBREVIATION : J A N | F E B | M A R | A P R | J U N | J U L | A U G | S E P | O C T | N O V | D E C; fragment TIMEVALUE : DIGIT+ AMPM | DIGIT+ TIMESEPARATOR DIGIT+ (TIMESEPARATOR DIGIT+)? AMPM?; fragment TIMESEPARATOR : WS? (':' | '.') WS?; fragment AMPM : WS? (A M | P M | A | P); // whitespace, line breaks, comments, ... LINE_CONTINUATION : [ \t]+ UNDERSCORE '\r'? '\n' -> skip; NEWLINE : [\r\n\u2028\u2029]+; REMCOMMENT : COLON? REM WS (LINE_CONTINUATION | ~[\r\n\u2028\u2029])*; COMMENT : SINGLEQUOTE (LINE_CONTINUATION | ~[\r\n\u2028\u2029])*; SINGLEQUOTE : '\''; COLON : ':'; UNDERSCORE : '_'; WS : ([ \t] | LINE_CONTINUATION)+; // identifier IDENTIFIER : (~[\[\]\(\)\r\n\t.,'"|!@#$%^&*-+:=; ])+ | L_SQUARE_BRACKET (~[!\]\r\n])+ R_SQUARE_BRACKET; // letters fragment LETTER : [a-zA-Z_äöüÄÖÜ]; fragment DIGIT : [0-9]; fragment LETTERORDIGIT : [a-zA-Z0-9_äöüÄÖÜ]; // case insensitive chars fragment A:('a'|'A'); fragment B:('b'|'B'); fragment C:('c'|'C'); fragment D:('d'|'D'); fragment E:('e'|'E'); fragment F:('f'|'F'); fragment G:('g'|'G'); fragment H:('h'|'H'); fragment I:('i'|'I'); fragment J:('j'|'J'); fragment K:('k'|'K'); fragment L:('l'|'L'); fragment M:('m'|'M'); fragment N:('n'|'N'); fragment O:('o'|'O'); fragment P:('p'|'P'); fragment Q:('q'|'Q'); fragment R:('r'|'R'); fragment S:('s'|'S'); fragment T:('t'|'T'); fragment U:('u'|'U'); fragment V:('v'|'V'); fragment W:('w'|'W'); fragment X:('x'|'X'); fragment Y:('y'|'Y'); fragment Z:('z'|'Z');
test/asm/offsets.asm
nigelperks/BasicAssembler
0
28256
; Different kinds of offsets and relocations IDEAL ASSUME CS:SEG1, DS:SEG1, ES:SEG1, SS:SEG1 SEGMENT SEG1 ORG 100h start: ; absolute in main segment jmp near CS:90h call near CS:90h mov al, [90h] mov dh, [si+90h] frog: jmp near CS:40h call near CS:40h mov al, [40h] mov dh, [si+40h] ; symbolic in same segment jmp frog call frog ENDS SEG1 ASSUME CS:SEG1A, DS:SEG1A, ES:SEG1A, SS:SEG1A SEGMENT SEG1A ; absolute in second segment in main group jmp near CS:90h call near CS:90h mov al, [90h] mov dh, [si+90h] frog1a: jmp near CS:40h call near CS:40h mov al, [40h] mov dh, [si+40h] ; symbolic in same segment jmp frog1a call frog1a ; symbolic in different segment in same group gives Turbo fixup overflow ENDS SEG1A ; absolute in group ASSUME CS:GROUP1, DS:GROUP1, ES:GROUP1, SS:GROUP1 SEGMENT SEG1 jmp near CS:90h call near CS:90h mov al, [90h] mov dh, [si+90h] ENDS SEG1 SEGMENT SEG1A jmp near CS:90h call near CS:90h mov al, [90h] mov dh, [si+90h] ENDS SEG1A ASSUME CS:SEG2, DS:SEG2, ES:SEG2, SS:SEG2 SEGMENT SEG2 ; absolute in second segment, in same module, outside group jmp near CS:90h call near CS:90h mov al, [90h] mov dh, [si+90h] frog2: jmp near CS:40h call near CS:40h mov al, [40h] mov dh, [si+40h] ; symbolic in same segment jmp frog2 call frog2 ENDS SEG2 GROUP GROUP1 SEG1, SEG1A END start
tools-src/gnu/binutils/gas/testsuite/gasp/t2.asm
enfoTek/tomato.linksys.e2000.nvram-mod
80
91904
test + continued + lines .END
List 01/ex 01.asm
LeonardoSanBenitez/Assembly-exercises
0
29780
<filename>List 01/ex 01.asm<gh_stars>0 # Lista 1 ex 1 # Author: <NAME> # Variables map: # $t0=Base # $t1=A # $t2 = B # Pseudocode: # Load from memory to A and B # B = A + B # Store B in memory addi $t0, $zero, 0x10008000 # base addr #lw $t1, 0 ($t0) #lw $t2, 4 ($t0) addi $t1, $zero, 10 addi $t2, $zero, 20 add $t2, $t1, $t2 # B = A + B sw $t2, 8 ($t0) # store B
source/directories/machine-pc-freebsd/s-nadise.adb
ytomino/drake
33
9544
with Ada.Exception_Identification.From_Here; with System.Address_To_Named_Access_Conversions; with System.Standard_Allocators; with System.Storage_Elements; with System.Zero_Terminated_Strings; with C.errno; with C.fnmatch; with C.stdint; with C.sys.types; package body System.Native_Directories.Searching is use Ada.Exception_Identification.From_Here; use type Storage_Elements.Storage_Offset; use type C.char; use type C.signed_int; use type C.unsigned_char; -- d_namelen in FreeBSD use type C.dirent.DIR_ptr; use type C.size_t; use type C.sys.dirent.struct_dirent_ptr; use type C.sys.types.mode_t; package char_ptr_Conv is new Address_To_Named_Access_Conversions (C.char, C.char_ptr); package dirent_ptr_Conv is new Address_To_Named_Access_Conversions ( C.dirent.struct_dirent, C.sys.dirent.struct_dirent_ptr); procedure memcpy ( dst : not null C.sys.dirent.struct_dirent_ptr; src : not null C.sys.dirent.struct_dirent_ptr; n : Storage_Elements.Storage_Count) with Import, Convention => Intrinsic, External_Name => "__builtin_memcpy"; procedure Get_Information ( Directory : String; Directory_Entry : not null Directory_Entry_Access; Information : aliased out C.sys.stat.struct_stat; errno : out C.signed_int); procedure Get_Information ( Directory : String; Directory_Entry : not null Directory_Entry_Access; Information : aliased out C.sys.stat.struct_stat; errno : out C.signed_int) is S_Length : constant C.size_t := C.size_t (Directory_Entry.d_namlen); Full_Name : C.char_array ( 0 .. Directory'Length * Zero_Terminated_Strings.Expanding + 1 -- '/' + S_Length); Full_Name_Length : C.size_t; begin -- compose Zero_Terminated_Strings.To_C ( Directory, Full_Name (0)'Access, Full_Name_Length); Full_Name (Full_Name_Length) := '/'; Full_Name_Length := Full_Name_Length + 1; Full_Name (Full_Name_Length .. Full_Name_Length + S_Length - 1) := Directory_Entry.d_name (0 .. S_Length - 1); Full_Name_Length := Full_Name_Length + S_Length; Full_Name (Full_Name_Length) := C.char'Val (0); -- stat if C.sys.stat.lstat (Full_Name (0)'Access, Information'Access) < 0 then errno := C.errno.errno; else errno := 0; end if; end Get_Information; -- implementation function New_Directory_Entry (Source : not null Directory_Entry_Access) return not null Directory_Entry_Access is Result : constant Directory_Entry_Access := dirent_ptr_Conv.To_Pointer ( Standard_Allocators.Allocate ( Storage_Elements.Storage_Offset (Source.d_reclen))); begin memcpy ( Result, Source, Storage_Elements.Storage_Offset (Source.d_reclen)); return Result; end New_Directory_Entry; procedure Free (X : in out Directory_Entry_Access) is begin Standard_Allocators.Free (dirent_ptr_Conv.To_Address (X)); X := null; end Free; procedure Start_Search ( Search : aliased in out Search_Type; Directory : String; Pattern : String; Filter : Filter_Type; Directory_Entry : out Directory_Entry_Access; Has_Next_Entry : out Boolean) is begin if Directory'Length = 0 then -- reject Raise_Exception (Name_Error'Identity); end if; declare C_Directory : C.char_array ( 0 .. Directory'Length * Zero_Terminated_Strings.Expanding); Handle : C.dirent.DIR_ptr; begin Zero_Terminated_Strings.To_C ( Directory, C_Directory (0)'Access); Handle := C.dirent.opendir (C_Directory (0)'Access); if Handle = null then Raise_Exception (Named_IO_Exception_Id (C.errno.errno)); end if; Search.Handle := Handle; end; Search.Filter := Filter; Search.Pattern := char_ptr_Conv.To_Pointer ( Standard_Allocators.Allocate ( Storage_Elements.Storage_Offset (Pattern'Length) * Zero_Terminated_Strings.Expanding + 1)); -- NUL Zero_Terminated_Strings.To_C (Pattern, Search.Pattern); Get_Next_Entry (Search, Directory_Entry, Has_Next_Entry); end Start_Search; procedure End_Search ( Search : aliased in out Search_Type; Raise_On_Error : Boolean) is Handle : constant C.dirent.DIR_ptr := Search.Handle; begin Search.Handle := null; Standard_Allocators.Free (char_ptr_Conv.To_Address (Search.Pattern)); Search.Pattern := null; if C.dirent.closedir (Handle) < 0 and then Raise_On_Error then Raise_Exception (IO_Exception_Id (C.errno.errno)); end if; end End_Search; procedure Get_Next_Entry ( Search : aliased in out Search_Type; Directory_Entry : out Directory_Entry_Access; Has_Next_Entry : out Boolean) is begin loop C.errno.error.all := 0; -- clear errno Directory_Entry := C.dirent.readdir (Search.Handle); declare errno : constant C.signed_int := C.errno.errno; begin if errno /= 0 then Raise_Exception (IO_Exception_Id (errno)); elsif Directory_Entry = null then Has_Next_Entry := False; -- end exit; end if; end; if Search.Filter (Kind (Directory_Entry)) and then C.fnmatch.fnmatch ( Search.Pattern, Directory_Entry.d_name (0)'Access, 0) = 0 and then ( Directory_Entry.d_name (0) /= '.' or else ( Directory_Entry.d_namlen > 1 and then ( Directory_Entry.d_name (1) /= '.' or else Directory_Entry.d_namlen > 2))) then Has_Next_Entry := True; exit; -- found end if; end loop; end Get_Next_Entry; procedure Get_Entry ( Directory : String; Name : String; Directory_Entry : aliased out Directory_Entry_Access; Additional : aliased in out Directory_Entry_Additional_Type) is Dummy_dirent : C.sys.dirent.struct_dirent; -- to use 'Position Name_Length : constant C.size_t := Name'Length; Record_Length : constant Storage_Elements.Storage_Count := Storage_Elements.Storage_Offset'Max ( C.sys.dirent.struct_dirent'Size / Standard'Storage_Unit, Dummy_dirent.d_name'Position + Storage_Elements.Storage_Offset (Name_Length + 1)); errno : C.signed_int; begin -- allocation Directory_Entry := dirent_ptr_Conv.To_Pointer ( Standard_Allocators.Allocate (Record_Length)); -- filling components -- Directory_Entry.d_seekoff := 0; -- missing in FreeBSD Directory_Entry.d_reclen := C.stdint.uint16_t (Record_Length); declare function To_namlen (X : C.size_t) return C.stdint.uint16_t; -- OSX function To_namlen (X : C.size_t) return C.stdint.uint16_t is begin return C.stdint.uint16_t (X); end To_namlen; function To_namlen (X : C.size_t) return C.stdint.uint8_t; -- FreeBSD function To_namlen (X : C.size_t) return C.stdint.uint8_t is begin return C.stdint.uint8_t (X); end To_namlen; pragma Warnings (Off, To_namlen); begin Directory_Entry.d_namlen := To_namlen (Name_Length); end; Zero_Terminated_Strings.To_C (Name, Directory_Entry.d_name (0)'Access); Get_Information (Directory, Directory_Entry, Additional.Information, errno => errno); if errno /= 0 then Raise_Exception (Named_IO_Exception_Id (errno)); end if; Directory_Entry.d_ino := Additional.Information.st_ino; Directory_Entry.d_type := C.stdint.uint8_t ( C.Shift_Right (Additional.Information.st_mode, 12)); Additional.Filled := True; end Get_Entry; function Simple_Name (Directory_Entry : not null Directory_Entry_Access) return String is begin return Zero_Terminated_Strings.Value ( Directory_Entry.d_name (0)'Access, C.size_t (Directory_Entry.d_namlen)); end Simple_Name; function Kind (Directory_Entry : not null Directory_Entry_Access) return File_Kind is begin -- DTTOIF return Kind ( C.Shift_Left (C.sys.types.mode_t (Directory_Entry.d_type), 12)); end Kind; function Size ( Directory : String; Directory_Entry : not null Directory_Entry_Access; Additional : aliased in out Directory_Entry_Additional_Type) return Ada.Streams.Stream_Element_Count is begin if not Additional.Filled then Get_Information (Directory, Directory_Entry, Additional.Information); Additional.Filled := True; end if; return Ada.Streams.Stream_Element_Offset ( Additional.Information.st_size); end Size; function Modification_Time ( Directory : String; Directory_Entry : not null Directory_Entry_Access; Additional : aliased in out Directory_Entry_Additional_Type) return Native_Calendar.Native_Time is begin if not Additional.Filled then Get_Information (Directory, Directory_Entry, Additional.Information); Additional.Filled := True; end if; return Additional.Information.st_mtim; end Modification_Time; procedure Get_Information ( Directory : String; Directory_Entry : not null Directory_Entry_Access; Information : aliased out C.sys.stat.struct_stat) is errno : C.signed_int; begin Get_Information (Directory, Directory_Entry, Information, errno => errno); if errno /= 0 then Raise_Exception (IO_Exception_Id (errno)); end if; end Get_Information; end System.Native_Directories.Searching;
Globular-TT/Syntax.agda
thibautbenjamin/catt-formalization
0
5030
<gh_stars>0 {-# OPTIONS --rewriting --without-K #-} open import Agda.Primitive open import Prelude import GSeTT.Syntax {- Syntax for a globular type theory, with arbitrary term constructors -} module Globular-TT.Syntax {l} (index : Set l) where data Pre-Ty : Set (lsuc l) data Pre-Tm : Set (lsuc l) data Pre-Sub : Set (lsuc l) data Pre-Ctx : Set (lsuc l) data Pre-Ty where ∗ : Pre-Ty ⇒ : Pre-Ty → Pre-Tm → Pre-Tm → Pre-Ty data Pre-Tm where Var : ℕ → Pre-Tm Tm-constructor : ∀ (i : index) → Pre-Sub → Pre-Tm data Pre-Sub where <> : Pre-Sub <_,_↦_> : Pre-Sub → ℕ → Pre-Tm → Pre-Sub data Pre-Ctx where ⊘ : Pre-Ctx _∙_#_ : Pre-Ctx → ℕ → Pre-Ty → Pre-Ctx C-length : Pre-Ctx → ℕ C-length ⊘ = O C-length (Γ ∙ _ # _) = S (C-length Γ) -- Equality elimination ⇒= : ∀ {A B t t' u u'} → A == B → t == t' → u == u' → ⇒ A t u == ⇒ B t' u' ⇒= idp idp idp = idp =⇒ : ∀ {A B t t' u u'} → ⇒ A t u == ⇒ B t' u' → ((A == B) × (t == t')) × (u == u') =⇒ idp = (idp , idp) , idp Var= : ∀ {v w} → v == w → Var v == Var w Var= idp = idp Tm-constructor= : ∀ {i j γ δ} → i == j → γ == δ → (Tm-constructor i γ) == (Tm-constructor j δ) Tm-constructor= idp idp = idp =Tm-constructor : ∀ {i j γ δ} → (Tm-constructor i γ) == (Tm-constructor j δ) → i == j × γ == δ =Tm-constructor idp = idp , idp <,>= : ∀ {γ δ x y t u} → γ == δ → x == y → t == u → < γ , x ↦ t > == < δ , y ↦ u > <,>= idp idp idp = idp =<,> : ∀ {γ δ x y t u} → < γ , x ↦ t > == < δ , y ↦ u > → ((γ == δ) × (x == y)) × (t == u) =<,> idp = (idp , idp) , idp ∙= : ∀ {Γ Δ x y A B} → Γ == Δ → x == y → A == B → (Γ ∙ x # A) == (Δ ∙ y # B) ∙= idp idp idp = idp {- Action of substitutions on types and terms and substitutions on a syntactical level -} _[_]Pre-Ty : Pre-Ty → Pre-Sub → Pre-Ty _[_]Pre-Tm : Pre-Tm → Pre-Sub → Pre-Tm _∘_ : Pre-Sub → Pre-Sub → Pre-Sub ∗ [ σ ]Pre-Ty = ∗ ⇒ A t u [ σ ]Pre-Ty = ⇒ (A [ σ ]Pre-Ty) (t [ σ ]Pre-Tm) (u [ σ ]Pre-Tm) Var x [ <> ]Pre-Tm = Var x Var x [ < σ , v ↦ t > ]Pre-Tm = if x ≡ v then t else ((Var x) [ σ ]Pre-Tm) Tm-constructor i γ [ σ ]Pre-Tm = Tm-constructor i (γ ∘ σ) <> ∘ γ = <> < γ , x ↦ t > ∘ δ = < γ ∘ δ , x ↦ t [ δ ]Pre-Tm > _#_∈_ : ℕ → Pre-Ty → Pre-Ctx → Set (lsuc l) _ # _ ∈ ⊘ = ⊥ x # A ∈ (Γ ∙ y # B) = (x # A ∈ Γ) + ((x == y) × (A == B)) {- dimension of types -} dim : Pre-Ty → ℕ dim ∗ = O dim (⇒ A t u) = S (dim A) dim[] : ∀ (A : Pre-Ty) (γ : Pre-Sub) → dim (A [ γ ]Pre-Ty) == dim A dim[] ∗ γ = idp dim[] (⇒ A x x₁) γ = S= (dim[] A γ) dimC : Pre-Ctx → ℕ dimC ⊘ = O dimC (Γ ∙ x # A) = max (dimC Γ) (dim A) {- Identity and canonical projection -} Pre-id : ∀ (Γ : Pre-Ctx) → Pre-Sub Pre-id ⊘ = <> Pre-id (Γ ∙ x # A) = < Pre-id Γ , x ↦ Var x > Pre-π : ∀ (Γ : Pre-Ctx) (x : ℕ) (A : Pre-Ty) → Pre-Sub Pre-π Γ x A = Pre-id Γ {- Translation of GSeTT to a globular-TT -} GPre-Ctx : GSeTT.Syntax.Pre-Ctx → Pre-Ctx GPre-Ty : GSeTT.Syntax.Pre-Ty → Pre-Ty GPre-Tm : GSeTT.Syntax.Pre-Tm → Pre-Tm GPre-Ctx nil = ⊘ GPre-Ctx (Γ :: (x , A)) = (GPre-Ctx Γ) ∙ x # (GPre-Ty A) GPre-Ty GSeTT.Syntax.∗ = ∗ GPre-Ty (GSeTT.Syntax.⇒ A t u) = ⇒ (GPre-Ty A) (GPre-Tm t) (GPre-Tm u) GPre-Tm (GSeTT.Syntax.Var x) = Var x {- Depth of a term -} depth : Pre-Tm → ℕ depthS : Pre-Sub → ℕ depth (Var x) = O depth (Tm-constructor i γ) = S (depthS γ) depthS <> = O depthS < γ , x ↦ t > = max (depthS γ) (depth t)
programs/oeis/245/A245779.asm
neoneye/loda
22
105305
<filename>programs/oeis/245/A245779.asm ; A245779: Numbers n such that (n/tau(n) - sigma(n)/n) < 1. ; 1,2,3,4,6,8,10,12,18,24 lpb $0 mov $2,$0 mov $3,$0 cmp $3,0 add $0,$3 add $2,$0 div $4,$0 pow $0,2 sub $0,$4 div $0,10 add $1,$2 mul $4,10 add $4,$2 lpe div $1,2 add $1,1 mov $0,$1
non_regression/other_x64_macosx_7.o.asm
LRGH/plasmasm
1
22913
.macosx_version_min 10, 12 .section __TEXT,__text,regular,pure_instructions .align 4, 0x90 .globl _pari_init_evaluator _pari_init_evaluator: pushq %rbp pushq %r14 pushq %rbx movq $0, _sp(%rip) leaq _s_st(%rip), %rax leaq _st(%rip), %rcx subq %rax, %rcx movq %rcx, _s_st(%rip) movq $0, _st(%rip) movq $0, _s_st+8(%rip) movq $8, _s_st+24(%rip) movq $32, _s_st+16(%rip) movq _st(%rip), %rdi movq _PARI_SIGINT_block@GOTPCREL(%rip), %r14 movl (%r14), %ebp movl $1, (%r14) testq %rdi, %rdi je L0000007C L00000070: movl $256, %esi call _realloc L0000007A: jmp L00000086 L0000007C: movl $256, %edi call _malloc L00000086: movq %rax, %rbx movl %ebp, (%r14) testl %ebp, %ebp jne L000000A9 L00000090: movq _PARI_SIGINT_pending@GOTPCREL(%rip), %rax cmpl $0, (%rax) je L000000A9 L0000009C: movl (%rax), %edi movl $0, (%rax) call _raise L000000A9: testq %rbx, %rbx jne L000000BA L000000AE: movl $28, %edi xorl %eax, %eax call _pari_err L000000BA: movq %rbx, _st(%rip) movq _s_st+16(%rip), %rax movq %rax, _s_st+8(%rip) movq $0, _rp(%rip) leaq _s_ptrs(%rip), %rax leaq _ptrs(%rip), %rcx subq %rax, %rcx movq %rcx, _s_ptrs(%rip) movq $0, _ptrs(%rip) movq $0, _s_ptrs+8(%rip) movq $56, _s_ptrs+24(%rip) movq $16, _s_ptrs+16(%rip) movq _ptrs(%rip), %rdi movl (%r14), %ebp movl $1, (%r14) testq %rdi, %rdi je L00000140 L00000134: movl $896, %esi call _realloc L0000013E: jmp L0000014A L00000140: movl $896, %edi call _malloc L0000014A: movq %rax, %rbx movl %ebp, (%r14) testl %ebp, %ebp jne L0000016D L00000154: movq _PARI_SIGINT_pending@GOTPCREL(%rip), %rax cmpl $0, (%rax) je L0000016D L00000160: movl (%rax), %edi movl $0, (%rax) call _raise L0000016D: testq %rbx, %rbx jne L0000017E L00000172: movl $28, %edi xorl %eax, %eax call _pari_err L0000017E: movq %rbx, _ptrs(%rip) movq _s_ptrs+16(%rip), %rax movq %rax, _s_ptrs+8(%rip) leaq _s_var(%rip), %rax leaq _var(%rip), %rcx subq %rax, %rcx movq %rcx, _s_var(%rip) movq $0, _var(%rip) movq $0, _s_var+16(%rip) movq $0, _s_var+8(%rip) movq $16, _s_var+24(%rip) leaq _s_lvars(%rip), %rax leaq _lvars(%rip), %rcx subq %rax, %rcx movq %rcx, _s_lvars(%rip) movq $0, _lvars(%rip) movq $0, _s_lvars+16(%rip) movq $0, _s_lvars+8(%rip) movq $8, _s_lvars+24(%rip) leaq _s_trace(%rip), %rax leaq _trace(%rip), %rcx subq %rax, %rcx movq %rcx, _s_trace(%rip) movq $0, _trace(%rip) movq $0, _s_trace+16(%rip) movq $0, _s_trace+8(%rip) movq $16, _s_trace+24(%rip) popq %rbx popq %r14 popq %rbp ret # ---------------------- .align 4, 0x90 .globl _pari_close_evaluator _pari_close_evaluator: pushq %rax leaq _s_st(%rip), %rax movq _s_st(%rip), %rcx movq (%rcx,%rax), %rdi testq %rdi, %rdi je L0000028D L00000288: call _free L0000028D: leaq _s_ptrs(%rip), %rax movq _s_ptrs(%rip), %rcx movq (%rcx,%rax), %rdi testq %rdi, %rdi je L000002A9 L000002A4: call _free L000002A9: leaq _s_var(%rip), %rax movq _s_var(%rip), %rcx movq (%rcx,%rax), %rdi testq %rdi, %rdi je L000002C5 L000002C0: call _free L000002C5: leaq _s_lvars(%rip), %rax movq _s_lvars(%rip), %rcx movq (%rcx,%rax), %rdi testq %rdi, %rdi je L000002E1 L000002DC: call _free L000002E1: leaq _s_trace(%rip), %rax movq _s_trace(%rip), %rcx movq (%rcx,%rax), %rdi testq %rdi, %rdi je L000002FE L000002F8: popq %rax jmp _free L000002FE: popq %rax ret # ---------------------- .align 4, 0x90 .globl _closure_evalvoid _closure_evalvoid: pushq %r14 pushq %rbx pushq %rax movq _avma@GOTPCREL(%rip), %r14 movq (%r14), %rbx call _closure_eval L00000313: movq %rbx, (%r14) addq $8, %rsp popq %rbx popq %r14 ret L0000031E: .align 4, 0x90 _closure_eval: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $296, %rsp movq %rdi, %rcx movq %rcx, 264(%rsp) movq $72057594037927935, %r13 movq 16(%rcx), %rax movq %rax, 240(%rsp) movq 24(%rcx), %r14 movq %r14, 224(%rsp) movq 32(%rcx), %rax movq %rax, 192(%rsp) movq (%r14), %r12 andq %r13, %r12 movq %r12, 256(%rsp) movq _sp(%rip), %rax subq 8(%rcx), %rax movq %rax, 184(%rsp) movq _rp(%rip), %rax movq %rax, 176(%rsp) movq $0, 288(%rsp) leaq 1(%r13), %rax movq %rax, 216(%rsp) testq (%rcx), %rax je L000003BB L000003B7: incq -32(%rcx) L000003BB: xorl %ebx, %ebx leaq 288(%rsp), %rdi xorl %eax, %eax movq %rcx, %rsi movq %rcx, %rbp call _trace_push L000003D2: movq %rbp, %r8 movq (%r8), %rax andq %r13, %rax cmpq $8, %rax jne L000005A9 L000003E5: movq 56(%r8), %r12 movq (%r12), %r15 andq %r13, %r15 leaq -1(%r15), %rbx movq _s_var+8(%rip), %rcx leaq -1(%rcx,%r15), %rax movq _s_var+16(%rip), %rdx cmpq %rdx, %rax jle L000004EF L00000410: movq %rbx, %rcx movq %rcx, 248(%rsp) movq _s_var(%rip), %rbp testq %rdx, %rdx movq %rcx, %rsi je L00000438 L0000042A: movq %rdx, %rsi .align 4, 0x90 L00000430: addq %rsi, %rsi cmpq %rsi, %rax jg L00000430 L00000438: movq %rsi, _s_var+16(%rip) leaq _s_var(%rip), %rax movq (%rbp,%rax), %rdi movq %rbp, 232(%rsp) imulq _s_var+24(%rip), %rsi movq _PARI_SIGINT_block@GOTPCREL(%rip), %rbp movl (%rbp), %r13d movl $1, (%rbp) testq %rdi, %rdi je L00000479 L00000472: call _realloc L00000477: jmp L00000481 L00000479: movq %rsi, %rdi call _malloc L00000481: movq %rax, %rbx movl %r13d, (%rbp) testl %r13d, %r13d jne L000004A6 L0000048D: movq _PARI_SIGINT_pending@GOTPCREL(%rip), %rax cmpl $0, (%rax) je L000004A6 L00000499: movl (%rax), %edi movl $0, (%rax) call _raise L000004A6: testq %rbx, %rbx movq 264(%rsp), %r8 movq 224(%rsp), %r14 jne L000004CD L000004BB: movl $28, %edi xorl %eax, %eax movq %r8, %rbp call _pari_err L000004CA: movq %rbp, %r8 L000004CD: movq 232(%rsp), %rax leaq _s_var(%rip), %rcx movq %rbx, (%rax,%rcx) movq _s_var+8(%rip), %rcx movq 248(%rsp), %rbx L000004EF: addq %rbx, %rcx movq %rcx, _s_var+8(%rip) cmpq $2, %r15 jae L0000050C L000004FF: movq 256(%rsp), %r12 jmp L000005A9 L0000050C: shlq $4, %rcx movq _var(%rip), %rax movq $0, -16(%rcx,%rax) movq 8(%r12), %rax movq _s_var+8(%rip), %rcx shlq $4, %rcx movq _var(%rip), %rdx movq %rax, -8(%rcx,%rdx) cmpq $2, %rbx jl L000005A1 L00000542: movq $-2, %rax movl $1, %ecx .align 4, 0x90 L00000550: movq _var(%rip), %rdx movq _s_var+8(%rip), %rsi addq %rax, %rsi shlq $4, %rsi movq $0, (%rdx,%rsi) movq 8(%r12,%rcx,8), %rdx incq %rcx movq _var(%rip), %rsi movq _s_var+8(%rip), %rdi addq %rax, %rdi shlq $4, %rdi movq %rdx, 8(%rsi,%rdi) decq %rax cmpq %rbx, %rcx jl L00000550 L00000597: movq 256(%rsp), %r12 jmp L000005A9 L000005A1: movq 256(%rsp), %r12 L000005A9: movq %r8, 264(%rsp) movq %rbx, 248(%rsp) movq $1, 288(%rsp) cmpq $2, %r12 movq %r14, %r13 jb L000005EA L000005CE: movl $1, %eax xorl %ecx, %ecx movq %rcx, 232(%rsp) movq 240(%rsp), %r14 jmp L000013E0 L000005EA: xorl %eax, %eax movq %rax, 232(%rsp) jmp L00004ECF L000005F9: movq _sp(%rip), %rax leaq -1(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq -8(%rcx,%rax,8), %rdi xorl %eax, %eax call *16(%r15) L0000061D: jmp L00004E80 L00000622: movq _sp(%rip), %rax leaq -2(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq -16(%rcx,%rax,8), %rdi movq -8(%rcx,%rax,8), %rsi xorl %eax, %eax call *16(%r15) L0000064B: jmp L00004E80 L00000650: movq _sp(%rip), %rax leaq -3(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq -24(%rcx,%rax,8), %rdi movq -16(%rcx,%rax,8), %rsi movq -8(%rcx,%rax,8), %rdx xorl %eax, %eax call *16(%r15) L0000067E: jmp L00004E80 L00000683: movq _sp(%rip), %rax leaq -4(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq -32(%rcx,%rax,8), %rdi movq -24(%rcx,%rax,8), %rsi movq -16(%rcx,%rax,8), %rdx movq -8(%rcx,%rax,8), %rcx xorl %eax, %eax call *16(%r15) L000006B6: jmp L00004E80 L000006BB: movq _sp(%rip), %rax leaq -5(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -40(%rbp,%rax,8), %rdi movq -32(%rbp,%rax,8), %rsi movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %r8 xorl %eax, %eax call *16(%r15) L000006F3: jmp L00004E80 L000006F8: movq _sp(%rip), %rax leaq -6(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -48(%rbp,%rax,8), %rdi movq -40(%rbp,%rax,8), %rsi movq -32(%rbp,%rax,8), %rdx movq -24(%rbp,%rax,8), %rcx movq -16(%rbp,%rax,8), %r8 movq -8(%rbp,%rax,8), %r9 jmp L00000878 L00000734: movq _sp(%rip), %rax leaq -7(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -56(%rbp,%rax,8), %rdi movq -48(%rbp,%rax,8), %rsi movq -40(%rbp,%rax,8), %rdx movq -32(%rbp,%rax,8), %rcx movq -24(%rbp,%rax,8), %r8 movq -16(%rbp,%rax,8), %r9 movq -8(%rbp,%rax,8), %rax movq %rax, (%rsp) jmp L00000878 L00000779: movq _sp(%rip), %rax leaq -8(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -64(%rbp,%rax,8), %rdi movq -56(%rbp,%rax,8), %rsi movq -48(%rbp,%rax,8), %rdx movq -40(%rbp,%rax,8), %rcx movq -32(%rbp,%rax,8), %r8 movq -24(%rbp,%rax,8), %r9 movq -16(%rbp,%rax,8), %rbx movq -8(%rbp,%rax,8), %rax movq %rax, 8(%rsp) movq %rbx, (%rsp) jmp L00000878 L000007C8: movq _sp(%rip), %rax leaq -9(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -72(%rbp,%rax,8), %rdi movq -64(%rbp,%rax,8), %rsi movq -56(%rbp,%rax,8), %rdx movq -48(%rbp,%rax,8), %rcx movq -40(%rbp,%rax,8), %r8 movq -32(%rbp,%rax,8), %r9 movq -24(%rbp,%rax,8), %r10 movq -16(%rbp,%rax,8), %rbx movq -8(%rbp,%rax,8), %rax movq %rax, 16(%rsp) movq %rbx, 8(%rsp) jmp L00000874 L0000081A: movq _sp(%rip), %rax leaq -10(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -80(%rbp,%rax,8), %rdi movq -72(%rbp,%rax,8), %rsi movq -64(%rbp,%rax,8), %rdx movq -56(%rbp,%rax,8), %rcx movq -48(%rbp,%rax,8), %r8 movq -40(%rbp,%rax,8), %r9 movq -32(%rbp,%rax,8), %r10 movq -24(%rbp,%rax,8), %r11 movq -16(%rbp,%rax,8), %rbx movq -8(%rbp,%rax,8), %rax movq %rax, 24(%rsp) movq %rbx, 16(%rsp) movq %r11, 8(%rsp) L00000874: movq %r10, (%rsp) L00000878: xorl %eax, %eax call *16(%r15) L0000087E: jmp L00004E80 L00000883: movq _sp(%rip), %rax leaq -11(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -88(%rbp,%rax,8), %rdi movq -80(%rbp,%rax,8), %rsi movq -72(%rbp,%rax,8), %rdx movq -64(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -56(%rbp,%rax,8), %r8 movq -48(%rbp,%rax,8), %r9 movq -40(%rbp,%rax,8), %r10 movq -32(%rbp,%rax,8), %r11 movq %r12, %rcx movq %r14, %r12 movq -24(%rbp,%rax,8), %r14 movq -16(%rbp,%rax,8), %rbx movq -8(%rbp,%rax,8), %rax movq %rax, 32(%rsp) movq %rbx, 24(%rsp) movq %r14, 16(%rsp) movq %r12, %r14 movq %rcx, %r12 movq %r11, 8(%rsp) movq %r10, (%rsp) xorl %eax, %eax jmp L000009A4 L00000906: movq _sp(%rip), %rax leaq -12(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -96(%rbp,%rax,8), %rdi movq -88(%rbp,%rax,8), %rsi movq -80(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -72(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -64(%rbp,%rax,8), %r8 movq -56(%rbp,%rax,8), %r9 movq -48(%rbp,%rax,8), %r10 movq -40(%rbp,%rax,8), %r11 movq %r13, %rdx movq %r14, %r13 movq -32(%rbp,%rax,8), %r14 movq %r12, %rcx movq -24(%rbp,%rax,8), %r12 movq -16(%rbp,%rax,8), %rbx movq -8(%rbp,%rax,8), %rax movq %rax, 40(%rsp) movq %rbx, 32(%rsp) movq %r12, 24(%rsp) movq %rcx, %r12 movq %r14, 16(%rsp) movq %r13, %r14 movq %rdx, %r13 movq %r11, 8(%rsp) movq %r10, (%rsp) xorl %eax, %eax movq 200(%rsp), %rdx L000009A4: movq 208(%rsp), %rcx call *16(%r15) L000009B0: jmp L00004E80 L000009B5: movq _sp(%rip), %rax leaq -13(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -104(%rbp,%rax,8), %rdx movq -96(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -80(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -72(%rbp,%rax,8), %r8 movq -64(%rbp,%rax,8), %r9 movq -56(%rbp,%rax,8), %r10 movq -48(%rbp,%rax,8), %r11 movq %r14, %rdi movq -40(%rbp,%rax,8), %r14 movq %r12, %rsi movq -32(%rbp,%rax,8), %r12 movq %r13, %rcx movq -24(%rbp,%rax,8), %r13 movq -16(%rbp,%rax,8), %rbx movq -8(%rbp,%rax,8), %rax movq %rax, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %rcx, %r13 movq %r12, 24(%rsp) movq %rsi, %r12 movq %r14, 16(%rsp) movq %rdi, %r14 movq %r11, 8(%rsp) movq %r10, (%rsp) xorl %eax, %eax movq %rdx, %rdi movq 208(%rsp), %rsi movq 168(%rsp), %rdx jmp L00000B4A L00000A75: movq _sp(%rip), %rax leaq -14(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -112(%rbp,%rax,8), %rsi movq -104(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -96(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -80(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -72(%rbp,%rax,8), %r9 movq -64(%rbp,%rax,8), %r10 movq -56(%rbp,%rax,8), %r11 movq %r14, %r8 movq -48(%rbp,%rax,8), %r14 movq %r12, %rdi movq -40(%rbp,%rax,8), %r12 movq %r13, %rdx movq -32(%rbp,%rax,8), %r13 movq -24(%rbp,%rax,8), %rbx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 56(%rsp) movq %rcx, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %rdx, %r13 movq %r12, 24(%rsp) movq %rdi, %r12 movq %r14, 16(%rsp) movq %r8, %r14 movq %r11, 8(%rsp) movq %r10, (%rsp) xorl %eax, %eax movq %rsi, %rdi movq 208(%rsp), %rsi movq 168(%rsp), %rdx movq 160(%rsp), %r8 L00000B4A: movq 200(%rsp), %rcx call *16(%r15) L00000B56: jmp L00004E80 L00000B5B: movq _sp(%rip), %rax leaq -15(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -120(%rbp,%rax,8), %rdi movq -112(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -104(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -96(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -80(%rbp,%rax,8), %rcx movq %rcx, 152(%rsp) movq -72(%rbp,%rax,8), %r10 movq -64(%rbp,%rax,8), %r11 movq %r14, %r9 movq -56(%rbp,%rax,8), %r14 movq %r12, %r8 movq -48(%rbp,%rax,8), %r12 movq %r13, %rsi movq -40(%rbp,%rax,8), %r13 movq -32(%rbp,%rax,8), %rbx movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 64(%rsp) movq %rcx, 56(%rsp) movq %rdx, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %rsi, %r13 movq %r12, 24(%rsp) movq %r8, %r12 movq %r14, 16(%rsp) movq %r9, %r14 movq %r11, 8(%rsp) movq %r10, (%rsp) xorl %eax, %eax jmp L00001071 L00000C2C: movq _sp(%rip), %rax leaq -16(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -128(%rbp,%rax,8), %r8 movq -120(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -112(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -104(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -96(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 152(%rsp) movq -80(%rbp,%rax,8), %rcx movq %rcx, 144(%rsp) movq -72(%rbp,%rax,8), %r11 movq %r14, %r10 movq -64(%rbp,%rax,8), %r14 movq %r12, %r9 movq -56(%rbp,%rax,8), %r12 movq %r13, %rdi movq -48(%rbp,%rax,8), %r13 movq -40(%rbp,%rax,8), %rbx movq -32(%rbp,%rax,8), %rsi movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 72(%rsp) movq %rcx, 64(%rsp) movq %rdx, 56(%rsp) movq %rsi, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %rdi, %r13 movq %r12, 24(%rsp) movq %r9, %r12 movq %r14, 16(%rsp) movq %r10, %r14 movq %r11, 8(%rsp) movq 144(%rsp), %rax movq %rax, (%rsp) xorl %eax, %eax movq %r8, %rdi jmp L00001071 L00000D1A: movq _sp(%rip), %rax leaq -17(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -136(%rbp,%rax,8), %r9 movq -128(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -120(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -112(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -104(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -96(%rbp,%rax,8), %rcx movq %rcx, 152(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 144(%rsp) movq -80(%rbp,%rax,8), %rcx movq %rcx, 136(%rsp) movq %r14, %r11 movq -72(%rbp,%rax,8), %r14 movq %r12, %r10 movq -64(%rbp,%rax,8), %r12 movq %r13, %r8 movq -56(%rbp,%rax,8), %r13 movq -48(%rbp,%rax,8), %rbx movq -40(%rbp,%rax,8), %rdi movq -32(%rbp,%rax,8), %rsi movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 80(%rsp) movq %rcx, 72(%rsp) movq %rdx, 64(%rsp) movq %rsi, 56(%rsp) movq %rdi, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %r8, %r13 movq %r12, 24(%rsp) movq %r10, %r12 movq %r14, 16(%rsp) movq %r11, %r14 movq 136(%rsp), %rax movq %rax, 8(%rsp) movq 144(%rsp), %rax movq %rax, (%rsp) xorl %eax, %eax movq %r9, %rdi jmp L00001071 L00000E25: movq _sp(%rip), %rax leaq -18(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -144(%rbp,%rax,8), %r10 movq -136(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -128(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -120(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -112(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -104(%rbp,%rax,8), %rcx movq %rcx, 152(%rsp) movq -96(%rbp,%rax,8), %rcx movq %rcx, 144(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 136(%rsp) movq -80(%rbp,%rax,8), %r14 movq %r12, %r11 movq -72(%rbp,%rax,8), %r12 movq %r13, %r9 movq -64(%rbp,%rax,8), %r13 movq -56(%rbp,%rax,8), %rbx movq -48(%rbp,%rax,8), %r8 movq -40(%rbp,%rax,8), %rdi movq -32(%rbp,%rax,8), %rsi movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 88(%rsp) movq %rcx, 80(%rsp) movq %rdx, 72(%rsp) movq %rsi, 64(%rsp) movq %rdi, 56(%rsp) movq %r8, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %r9, %r13 movq %r12, 24(%rsp) movq %r11, %r12 movq %r14, 16(%rsp) movq 240(%rsp), %r14 movq 136(%rsp), %rax movq %rax, 8(%rsp) movq 144(%rsp), %rax movq %rax, (%rsp) xorl %eax, %eax movq %r10, %rdi jmp L00001071 L00000F3F: movq _sp(%rip), %rax leaq -19(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -152(%rbp,%rax,8), %r11 movq -144(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -136(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -128(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -120(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -112(%rbp,%rax,8), %rcx movq %rcx, 152(%rsp) movq -104(%rbp,%rax,8), %rcx movq %rcx, 144(%rsp) movq -96(%rbp,%rax,8), %rcx movq %rcx, 136(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 128(%rsp) movq %r12, %r14 movq -80(%rbp,%rax,8), %r12 movq %r13, %r10 movq -72(%rbp,%rax,8), %r13 movq -64(%rbp,%rax,8), %rbx movq -56(%rbp,%rax,8), %r9 movq -48(%rbp,%rax,8), %r8 movq -40(%rbp,%rax,8), %rdi movq -32(%rbp,%rax,8), %rsi movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 96(%rsp) movq %rcx, 88(%rsp) movq %rdx, 80(%rsp) movq %rsi, 72(%rsp) movq %rdi, 64(%rsp) movq %r8, 56(%rsp) movq %r9, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %r10, %r13 movq %r12, 24(%rsp) movq %r14, %r12 movq 128(%rsp), %rax movq %rax, 16(%rsp) movq 240(%rsp), %r14 movq 136(%rsp), %rax movq %rax, 8(%rsp) movq 144(%rsp), %rax movq %rax, (%rsp) xorl %eax, %eax movq %r11, %rdi L00001071: movq 200(%rsp), %rsi movq 160(%rsp), %r8 movq 152(%rsp), %r9 movq 208(%rsp), %rdx movq 168(%rsp), %rcx call *16(%r15) L0000109D: jmp L00004E80 L000010A2: movq _sp(%rip), %rax leaq -20(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -160(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -152(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -144(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -136(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -128(%rbp,%rax,8), %rcx movq %rcx, 152(%rsp) movq -120(%rbp,%rax,8), %rcx movq %rcx, 144(%rsp) movq -112(%rbp,%rax,8), %rcx movq %rcx, 136(%rsp) movq -104(%rbp,%rax,8), %rcx movq %rcx, 128(%rsp) movq -96(%rbp,%rax,8), %r14 movq -88(%rbp,%rax,8), %r12 movq %r13, %r11 movq -80(%rbp,%rax,8), %r13 movq -72(%rbp,%rax,8), %rbx movq -64(%rbp,%rax,8), %r10 movq -56(%rbp,%rax,8), %r9 movq -48(%rbp,%rax,8), %r8 movq -40(%rbp,%rax,8), %rdi movq -32(%rbp,%rax,8), %rsi movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 104(%rsp) movq %rcx, 96(%rsp) movq %rdx, 88(%rsp) movq %rsi, 80(%rsp) movq %rdi, 72(%rsp) movq %r8, 64(%rsp) movq %r9, 56(%rsp) movq %r10, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %r11, %r13 movq %r12, 24(%rsp) movq 256(%rsp), %r12 movq %r14, 16(%rsp) movq 240(%rsp), %r14 movq 128(%rsp), %rax movq %rax, 8(%rsp) movq 136(%rsp), %rax movq %rax, (%rsp) xorl %eax, %eax movq 208(%rsp), %rdi movq 168(%rsp), %rsi movq 152(%rsp), %r8 movq 144(%rsp), %r9 movq 200(%rsp), %rdx movq 160(%rsp), %rcx call *16(%r15) L0000120C: jmp L00004E80 L00001211: cmpq $1, %rax movq $72057594037927935, %r12 jne L000013A4 L00001225: movq 8(%rbx), %r10 movq %r10, %rdx andq %r12, %rdx leaq 0(,%rdx,8), %rax movq %rbp, %r15 subq %rax, %r15 cmpq $2, %rdx jb L0000136A L00001247: movq %r10, %rsi andq %r12, %rsi movq %rsi, %rdi negq %rdi cmpq $-3, %rdi movq $-2, %r11 movq $-2, %rax cmovg %rdi, %rax leaq (%rax,%rsi), %rcx cmpq $-1, %rcx movq %rdx, %rcx je L00001348 L0000127A: leaq 1(%rax,%rsi), %r8 incq %rax addl %r10d, %eax andq $3, %rax cmpq $-3, %rdi cmovg %rdi, %r11 xorl %r14d, %r14d movq %r8, %r9 subq %rax, %r9 movq %rdx, %rcx je L0000133B L000012A3: movq %r11, %rax notq %rax leaq (%rbx,%rax,8), %rax leaq -8(%rbp), %rcx xorl %r14d, %r14d cmpq %rax, %rcx ja L000012D1 L000012B9: leaq -8(%rbx,%rsi,8), %rax addq %rsi, %r11 notq %r11 leaq (%rbp,%r11,8), %rcx cmpq %rcx, %rax movq %rdx, %rcx jbe L0000133B L000012D1: movq %rdx, %rcx subq %r9, %rcx cmpq $-3, %rdi movq $-2, %r11 cmovg %rdi, %r11 cmpq $-2, %rdi movl $-2, %eax cmovg %edi, %eax leal 1(%r10,%rax), %edi andq $3, %rdi subq %r11, %rdi decq %rdi L00001301: movd %rsi, %xmm0 pshufd $68, %xmm0, %xmm0 paddq LC000055C0(%rip), %xmm0 movd %xmm0, %rax movups -8(%rbx,%rax,8), %xmm0 movups -24(%rbx,%rax,8), %xmm1 subq %rdx, %rax movups %xmm0, -8(%rbp,%rax,8) movups %xmm1, -24(%rbp,%rax,8) addq $-4, %rsi cmpq %rsi, %rdi jne L00001301 L00001338: movq %r9, %r14 L0000133B: cmpq %r14, %r8 movq 240(%rsp), %r14 je L0000136A L00001348: andq %r12, %r10 shlq $3, %r10 subq %r10, %rbp addq $-8, %rbp L00001356: movq -8(%rbx,%rcx,8), %rax movq %rax, (%rbp,%rcx,8) leaq -1(%rcx), %rcx cmpq $1, %rcx jg L00001356 L0000136A: movq $144115188075855875, %rax leaq -3(%rax), %rax orq %rax, %rdx movq %rdx, (%r15) movq _avma@GOTPCREL(%rip), %rax movq %r15, (%rax) movq %r15, %rbx jmp L000013B9 L0000138D: andq %rax, %r8 leaq (%rcx,%r8,8), %rsi movq %rcx, %rdx call _gerepile L0000139C: movq %rax, %rcx jmp L00002CB7 L000013A4: andq %r12, %r8 leaq (%rbx,%r8,8), %rsi movq %rbp, %rdi movq %rbx, %rdx call _gerepile L000013B6: movq %rax, %rbx L000013B9: movq 256(%rsp), %r12 L000013C1: movq _sp(%rip), %rax movq _st(%rip), %rcx movq %rbx, -8(%rcx,%rax,8) jmp L00004E80 L000013D9: .align 4, 0x90 L000013E0: movsbl 7(%r14,%rax), %ebp movq (%r13,%rax,8), %r15 cmpq $0, _sp(%rip) jns L00001408 L000013F5: movl $2, %edi xorl %eax, %eax leaq LC000055E0(%rip), %rsi call _pari_err L00001408: movl $16, %edi xorl %eax, %eax call _st_alloc L00001414: addl $-65, %ebp cmpl $56, %ebp ja L00004E80 L00001420: movq %r15, %rbx negq %rbx leaq L00004F1C(%rip), %rax movq %rax, %rcx movslq (%rcx,%rbp,4), %rax addq %rcx, %rax jmp *%rax L00001439: movq _gnil@GOTPCREL(%rip), %rax movq (%rax), %rax jmp L00004E5E L00001448: movq 192(%rsp), %rax movq (%rax,%r15,8), %rax jmp L00004E5E L00001459: movq 192(%rsp), %rax movq (%rax,%r15,8), %rdi addq $8, %rdi movq _precreal@GOTPCREL(%rip), %rax movq (%rax), %rsi call _strtor L00001478: jmp L00004E5E L0000147D: movq %r14, %r12 testq %r15, %r15 je L00002D24 L00001489: movq _avma@GOTPCREL(%rip), %rdx movq (%rdx), %rbp leaq -24(%rbp), %r14 movq _bot@GOTPCREL(%rip), %rcx movq %rbp, %rax subq (%rcx), %rax testq %r15, %r15 jle L00002E8E L000014AD: cmpq $23, %rax ja L000014C5 L000014B3: movl $14, %edi xorl %eax, %eax movq %rdx, %rbx call _pari_err L000014C2: movq %rbx, %rdx L000014C5: movq %r14, (%rdx) movq $144115188075855875, %rax movq %rax, -24(%rbp) movq $4611686018427387907, %rax movq %rax, -16(%rbp) movq %r15, -8(%rbp) jmp L00002EC9 L000014ED: movq %r15, %rdi call _pari_var_create L000014F5: addq $72, %r15 L000014F9: movq _sp(%rip), %rax leaq 1(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq %r15, (%rcx,%rax,8) jmp L00004E80 L0000151B: subq %r15, _sp(%rip) jmp L00004E80 L00001527: movq %r12, %r15 movq _sp(%rip), %rax movq _st(%rip), %rcx movq -8(%rcx,%rax,8), %rbx movq %r14, %r12 testq %rbx, %rbx je L00002D33 L00001549: jle L00002EF6 L0000154F: movq _avma@GOTPCREL(%rip), %rdx movq (%rdx), %rbp leaq -24(%rbp), %r14 movq _bot@GOTPCREL(%rip), %rax movq %rbp, %rcx subq (%rax), %rcx cmpq $23, %rcx ja L00001583 L00001570: movl $14, %edi xorl %eax, %eax call _pari_err L0000157C: movq _avma@GOTPCREL(%rip), %rdx L00001583: movq %r14, (%rdx) movq $144115188075855875, %rax movq %rax, -24(%rbp) movq $4611686018427387907, %rax jmp L00002F48 L000015A3: movq _sp(%rip), %rax addq %r15, %rax movq _st(%rip), %rcx movq (%rcx,%rax,8), %rbp jmp L000029F1 L000015BD: movq _sp(%rip), %rcx leaq (%rcx,%r15), %rax movq _st(%rip), %rdx movq (%rdx,%rax,8), %rax movq (%rax), %rsi movq $-144115188075855872, %rdi andq %rdi, %rsi movq $3026418949592973312, %rdi cmpq %rdi, %rsi je L00001608 L000015F2: movq %rax, %rdi call _GENtoGENstr L000015FA: movq _sp(%rip), %rcx movq _st(%rip), %rdx L00001608: addq $8, %rax addq %r15, %rcx movq %rax, (%rdx,%rcx,8) jmp L00004E80 L00001618: movq _sp(%rip), %rax addq %r15, %rax movq _st(%rip), %rcx movq (%rcx,%rax,8), %rdi xorl %eax, %eax call _closure_varn L00001634: cltq jmp L00002A7A L0000163B: movq _sp(%rip), %rax movq _st(%rip), %rcx movq -8(%rcx,%rax,8), %rdi jmp L00001674 L00001650: movq _sp(%rip), %rax movq _st(%rip), %rcx movq -8(%rcx,%rax,8), %rdi movq 216(%rsp), %rax testq (%rdi), %rax je L00004E80 L00001674: call _gcopy L00001679: movq _sp(%rip), %rcx movq _st(%rip), %rdx movq %rax, -8(%rdx,%rcx,8) jmp L00004E80 L00001691: movq _precreal@GOTPCREL(%rip), %rax movq (%rax), %rax jmp L00004E5E L000016A0: movq _precdl@GOTPCREL(%rip), %rax movq (%rax), %rax jmp L00004E5E L000016AF: movq _avma@GOTPCREL(%rip), %rbp movq (%rbp), %rax leaq (%rax,%rbx,8), %rbx movq _bot@GOTPCREL(%rip), %rcx subq (%rcx), %rax shrq $3, %rax cmpq %r15, %rax jae L000016DD L000016D1: movl $14, %edi xorl %eax, %eax call _pari_err L000016DD: movq %rbx, (%rbp) movq $72057594037927935, %rax cmpq %rax, %r15 jbe L00001703 L000016F0: leaq LC00005727(%rip), %rsi movl $15, %edi xorl %eax, %eax call _pari_err L00001703: movq $2449958197289549824, %rax jmp L00001947 L00001712: movq _sp(%rip), %rax movq _st(%rip), %rcx movq -8(%rcx,%rax,8), %r14 movq _avma@GOTPCREL(%rip), %rdx movq (%rdx), %rax movq %rax, 208(%rsp) leaq (%rax,%rbx,8), %rbp movq _bot@GOTPCREL(%rip), %rcx subq (%rcx), %rax shrq $3, %rax cmpq %r15, %rax jae L00001760 L0000174E: movl $14, %edi xorl %eax, %eax movq %rdx, %rbx call _pari_err L0000175D: movq %rbx, %rdx L00001760: movq %rbp, (%rdx) movq $72057594037927935, %rax cmpq %rax, %r15 jbe L0000178B L00001772: leaq LC00005727(%rip), %rsi movl $15, %edi xorl %eax, %eax movq %rdx, %rbx call _pari_err L00001788: movq %rbx, %rdx L0000178B: movq %r15, %rax movq $2738188573441261568, %rcx orq %rcx, %rax movq %rax, (%rbp) movq %rbp, 168(%rsp) cmpq $2, %r15 jl L000018A9 L000017B1: movq %r14, 200(%rsp) movq %r14, %r12 negq %r12 movq %r14, %r13 movq $2594073385365405696, %rax orq %rax, %r13 movq $72057594037927935, %rax movl $1, %ebx subq %r15, %rbx cmpq %rax, %r14 jbe L00001860 L000017E6: .align 4, 0x90 L000017F0: movq (%rdx), %rax leaq (%rax,%r12,8), %r14 movq _bot@GOTPCREL(%rip), %rcx subq (%rcx), %rax shrq $3, %rax cmpq 200(%rsp), %rax jae L00001821 L0000180F: movl $14, %edi xorl %eax, %eax movq %rdx, %r15 call _pari_err L0000181E: movq %r15, %rdx L00001821: movq %r14, (%rdx) leaq LC00005727(%rip), %rsi movl $15, %edi xorl %eax, %eax movq %rdx, %rbp call _pari_err L0000183A: movq %rbp, %rdx movq %r13, (%r14) movq 208(%rsp), %rax movq %r14, (%rax,%rbx,8) incq %rbx jne L000017F0 L00001851: jmp L000018A9 L00001853: .align 4, 0x90 L00001860: movq (%rdx), %rax leaq (%rax,%r12,8), %rbp movq _bot@GOTPCREL(%rip), %rcx subq (%rcx), %rax shrq $3, %rax cmpq 200(%rsp), %rax jae L00001891 L0000187F: movl $14, %edi xorl %eax, %eax movq %rdx, %r15 call _pari_err L0000188E: movq %r15, %rdx L00001891: movq %rbp, (%rdx) movq %r13, (%rbp) movq 208(%rsp), %rax movq %rbp, (%rax,%rbx,8) incq %rbx jne L00001860 L000018A9: movq _sp(%rip), %rax movq _st(%rip), %rcx movq 168(%rsp), %rsi movq %rsi, -8(%rcx,%rax,8) movq (%rdx), %rax movq _sp(%rip), %rcx leaq 1(%rcx), %rdx movq %rdx, _sp(%rip) movq _st(%rip), %rdx movq %rax, (%rdx,%rcx,8) jmp L000030D0 L000018E9: movq _avma@GOTPCREL(%rip), %rbp movq (%rbp), %rax leaq (%rax,%rbx,8), %rbx movq _bot@GOTPCREL(%rip), %rcx subq (%rcx), %rax shrq $3, %rax cmpq %r15, %rax jae L00001917 L0000190B: movl $14, %edi xorl %eax, %eax call _pari_err L00001917: movq %rbx, (%rbp) movq $72057594037927935, %rax cmpq %rax, %r15 jbe L0000193D L0000192A: leaq LC00005727(%rip), %rsi movl $15, %edi xorl %eax, %eax call _pari_err L0000193D: movq $2594073385365405696, %rax L00001947: orq %rax, %r15 movq %r15, (%rbx) movq _sp(%rip), %rax leaq 1(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq %rbx, (%rcx,%rax,8) movq (%rbp), %rax jmp L00004E5E L00001973: movq _sp(%rip), %rax movq _st(%rip), %rcx movq -16(%rcx,%rax,8), %rdi movq -8(%rcx,%rax,8), %rcx movq _bot@GOTPCREL(%rip), %rax cmpq (%rax), %rcx jb L00002CAD L0000199B: cmpq %rcx, %rdi jbe L00002CAD L000019A4: movq _top@GOTPCREL(%rip), %rax cmpq (%rax), %rcx jae L00002CAD L000019B4: movq (%rcx), %r8 movq %r8, %rax shrq $57, %rax leaq -21(%rax), %rsi cmpq $2, %rsi jb L000019D2 L000019C8: cmpq $2, %rax jne L00003FEB L000019D2: movq %r8, %rax movq $72057594037927935, %rbx andq %rbx, %rax shlq $3, %rax movq %rdi, %r11 subq %rax, %r11 movq %r8, %rsi andq %rbx, %rsi movq _avma@GOTPCREL(%rip), %rax movq %r11, (%rax) je L00003FE3 L00001A02: movq %r8, %rax movq $-72057594037927936, %rdx orq %rdx, %rax movq %rax, %rbp xorq %rbx, %rbp cmpq %rdx, %rax movq $-2, %r14 movq $-2, %r12 cmove %rbp, %r12 leaq (%r12,%rsi), %rbx cmpq $-2, %rbx je L00003388 L00001A3B: leaq 2(%r12), %rbx leaq 2(%r12,%rsi), %r9 addl %r8d, %ebx andq $3, %rbx cmpq %rdx, %rax movq %r9, %rdx cmove %rbp, %r14 xorl %r10d, %r10d subq %rbx, %r9 je L00001AED L00001A62: movq $-2, %rax movq $-2, %rbp subq %r14, %rbp leaq (%rcx,%rbp,8), %rbx leaq -8(%rdi), %rbp xorl %r10d, %r10d cmpq %rbx, %rbp ja L00001A97 L00001A83: leaq -8(%rcx,%rsi,8), %rbx addq %rsi, %r14 subq %r14, %rax leaq (%rdi,%rax,8), %rax cmpq %rax, %rbx jbe L00001AED L00001A97: movq %rsi, %r10 subq %r9, %r10 leal 2(%r12,%r8), %ebp andq $3, %rbp subq %r12, %rbp addq $-2, %rbp movq %rsi, %rax L00001AB0: movd %rax, %xmm0 pshufd $68, %xmm0, %xmm0 paddq LC000055C0(%rip), %xmm0 movd %xmm0, %rbx movups -8(%rcx,%rbx,8), %xmm0 movups -24(%rcx,%rbx,8), %xmm1 subq %rsi, %rbx movups %xmm0, -8(%rdi,%rbx,8) movups %xmm1, -24(%rdi,%rbx,8) addq $-4, %rax cmpq %rax, %rbp jne L00001AB0 L00001AE7: movq %r10, %rsi movq %r9, %r10 L00001AED: cmpq %r10, %rdx jne L00003388 L00001AF6: movq %r11, %rcx movq 240(%rsp), %r14 movq 256(%rsp), %r12 jmp L00002CB7 L00001B0E: movq _sp(%rip), %rax movq _st(%rip), %rcx movq -16(%rcx,%rax,8), %rbx movq -8(%rcx,%rax,8), %rbp leaq -2(%rax), %rax movq %rax, _sp(%rip) movq (%rbx), %rsi movq %rsi, %rax shrq $57, %rax cmpq $22, %rax je L00002D51 L00001B45: cmpq $20, %rax movq $72057594037927935, %rcx je L00002D7B L00001B59: addq $-17, %rax cmpq $1, %rax jbe L00002D8C L00001B67: leaq LC00005619(%rip), %rsi movl $5, %edi xorl %eax, %eax call _pari_err L00001B7A: jmp L00004E80 L00001B7F: movq %r14, %r13 movq _sp(%rip), %rax movq _st(%rip), %rcx movq -24(%rcx,%rax,8), %rbx movq -16(%rcx,%rax,8), %r14 movq -8(%rcx,%rax,8), %r12 movq (%rbx), %rsi movq %rsi, %rax movq $-144115188075855872, %rcx andq %rcx, %rax movq $2738188573441261568, %rcx cmpq %rcx, %rax je L00001BD7 L00001BC1: leaq LC0000562C(%rip), %rsi movl $5, %edi xorl %eax, %eax call _pari_err L00001BD4: movq (%rbx), %rsi L00001BD7: movq $72057594037927935, %rax movq %rax, %rbp andq %rbp, %rsi xorl %eax, %eax movq %r12, %rdi call _check_array_index L00001BF1: movq (%rbx,%r12,8), %rax movq (%rax), %rsi andq %rbp, %rsi xorl %eax, %eax movq %r14, %rdi call _check_array_index L00001C05: addq $-3, _sp(%rip) movq (%rbx,%r12,8), %rax movq (%rax,%r14,8), %rdi xorl %eax, %eax movq %r15, %rsi call _closure_castgen L00001C1F: movq %r13, %r14 jmp L000030D8 L00001C27: movq _sp(%rip), %rax movq _st(%rip), %rcx movq -16(%rcx,%rax,8), %rbp movq -8(%rcx,%rax,8), %rbx movq (%rbp), %rsi movq %rsi, %rax movq $-144115188075855872, %rcx andq %rcx, %rax movq $2738188573441261568, %rcx cmpq %rcx, %rax je L00001C79 L00001C62: leaq LC00005641(%rip), %rsi movl $5, %edi xorl %eax, %eax call _pari_err L00001C75: movq (%rbp), %rsi L00001C79: movq $72057594037927935, %rax andq %rax, %rsi xorl %eax, %eax movq %rbx, %rdi call _check_array_index L00001C90: movq _sp(%rip), %rax leaq -1(%rax), %rcx movq %rcx, _sp(%rip) movq (%rbp,%rbx,8), %rcx movq _st(%rip), %rdx movq %rcx, -16(%rdx,%rax,8) jmp L00004E80 L00001CB8: movq _sp(%rip), %rax movq _st(%rip), %rcx movq -16(%rcx,%rax,8), %r15 movq -8(%rcx,%rax,8), %r14 decq %rax movq %rax, _sp(%rip) movq (%r15), %rax movq %rax, %rcx movq $-144115188075855872, %rdx andq %rdx, %rcx movq $2738188573441261568, %rdx cmpq %rdx, %rcx je L00001D12 L00001CFC: leaq LC00005655(%rip), %rsi movl $5, %edi xorl %eax, %eax call _pari_err L00001D0F: movq (%r15), %rax L00001D12: movq $72057594037927935, %rbp andq %rbp, %rax cmpq $1, %rax jne L00001D38 L00001D25: leaq LC00005669(%rip), %rsi movl $5, %edi xorl %eax, %eax call _pari_err L00001D38: movq 8(%r15), %rax movq (%rax), %rsi andq %rbp, %rsi xorl %eax, %eax movq %r14, %rdi call _check_array_index L00001D4C: movq (%r15), %rbx andq %rbp, %rbx movq _avma@GOTPCREL(%rip), %r12 movq (%r12), %rax leaq 0(,%rbx,8), %rcx movq %rax, %rbp subq %rcx, %rbp movq _bot@GOTPCREL(%rip), %rcx subq (%rcx), %rax shrq $3, %rax cmpq %rbx, %rax jae L00001D8A L00001D7E: movl $14, %edi xorl %eax, %eax call _pari_err L00001D8A: movq %rbp, (%r12) movq %rbx, %rax movq $2449958197289549824, %rcx orq %rcx, %rax movq %rax, (%rbp) cmpq $2, %rbx jb L00001DC5 L00001DA8: movl $1, %eax .align 4, 0x90 L00001DB0: movq (%r15,%rax,8), %rcx movq (%rcx,%r14,8), %rcx movq %rcx, (%rbp,%rax,8) incq %rax cmpq %rbx, %rax jl L00001DB0 L00001DC5: movq _sp(%rip), %rax movq _st(%rip), %rcx movq %rbp, -8(%rcx,%rax,8) movq 240(%rsp), %r14 movq 256(%rsp), %r12 jmp L00004E80 L00001DED: imulq $56, _rp(%rip), %rax movq _ptrs(%rip), %rcx movq _sp(%rip), %rdx movq %rdx, -8(%rax,%rcx) leaq -32(%rax,%rcx), %rax jmp L00004E5E L00001E12: testq %r15, %r15 jle L00004E80 L00001E1B: .align 4, 0x90 L00001E20: movq _rp(%rip), %rcx decq %rcx movq %rcx, _rp(%rip) movq _ptrs(%rip), %rax imulq $56, %rcx, %rcx movq 32(%rax,%rcx), %rdi testq %rdi, %rdi je L00001E70 L00001E46: movq 24(%rax,%rcx), %rsi movq 40(%rax,%rcx), %rcx testq %rcx, %rcx je L00001E90 L00001E55: xorl %eax, %eax movq %rcx, %rdi call _changelex L00001E5F: jmp L00001E95 L00001E61: .align 4, 0x90 L00001E70: leaq (%rax,%rcx), %rdi movq 24(%rax,%rcx), %rsi xorl %eax, %eax call _change_compo L00001E80: jmp L00001E95 L00001E82: .align 4, 0x90 L00001E90: call _changevalue L00001E95: decq %r15 jne L00001E20 L00001E9A: jmp L00004E80 L00001E9F: movq _sp(%rip), %rax movq _st(%rip), %rcx movq -8(%rcx,%rax,8), %rbx decq %rax movq _rp(%rip), %rcx decq %rcx movq _ptrs(%rip), %r15 imulq $56, %rcx, %r12 leaq (%r15,%r12), %r14 leaq 24(%r15,%r12), %rcx movq %rcx, 208(%rsp) movq 24(%r15,%r12), %rbp movq %rax, _sp(%rip) movq (%rbp), %rsi movq %rsi, %rax shrq $57, %rax cmpq $22, %rax je L00002DAC L00001EFC: cmpq $20, %rax je L00002E33 L00001F06: addq $-17, %rax cmpq $1, %rax jbe L00002E45 L00001F14: leaq LC00005619(%rip), %rsi movl $5, %edi xorl %eax, %eax call _pari_err L00001F27: jmp L00002E74 L00001F2C: movq _sp(%rip), %rax movq _st(%rip), %rcx movq -16(%rcx,%rax,8), %r14 movq -8(%rcx,%rax,8), %r12 leaq -2(%rax), %rax movq _rp(%rip), %rcx decq %rcx movq _ptrs(%rip), %r13 imulq $56, %rcx, %rbp leaq 24(%r13,%rbp), %rcx movq %rcx, 208(%rsp) movq 24(%r13,%rbp), %rbx movq %rax, _sp(%rip) movq (%rbx), %rsi movq %rsi, %rax movq $-144115188075855872, %rcx andq %rcx, %rax movq $2738188573441261568, %rcx cmpq %rcx, %rax je L00001FAE L00001F98: leaq LC0000562C(%rip), %rsi movl $5, %edi xorl %eax, %eax call _pari_err L00001FAB: movq (%rbx), %rsi L00001FAE: movq $72057594037927935, %r15 andq %r15, %rsi xorl %eax, %eax movq %r12, %rdi call _check_array_index L00001FC5: movq (%rbx,%r12,8), %rax movq (%rax), %rsi andq %r15, %rsi xorl %eax, %eax movq %r14, %rdi call _check_array_index L00001FD9: movq (%rbx,%r12,8), %rax leaq (%rax,%r14,8), %rcx movq %rcx, (%r13,%rbp) movq %rbx, 8(%r13,%rbp) movq (%rax,%r14,8), %rax movq 208(%rsp), %rcx jmp L00002241 L00001FFC: movq _sp(%rip), %rax movq _st(%rip), %rcx movq -8(%rcx,%rax,8), %r15 decq %rax movq _rp(%rip), %rcx decq %rcx movq _ptrs(%rip), %rbp imulq $56, %rcx, %rbx leaq (%rbp,%rbx), %r13 leaq 24(%rbp,%rbx), %r14 movq 24(%rbp,%rbx), %r12 movq %rax, _sp(%rip) movq (%r12), %rsi movq %rsi, %rax movq $-144115188075855872, %rcx andq %rcx, %rax movq $2738188573441261568, %rcx cmpq %rcx, %rax je L00002077 L00002060: leaq LC00005641(%rip), %rsi movl $5, %edi xorl %eax, %eax call _pari_err L00002073: movq (%r12), %rsi L00002077: movq $72057594037927935, %rax andq %rax, %rsi xorl %eax, %eax movq %r15, %rdi call _check_array_index L0000208E: leaq (%r12,%r15,8), %rax movq %rax, (%r13) movl %r15d, 16(%rbp,%rbx) movq %r12, 8(%rbp,%rbx) movq (%r12,%r15,8), %rax movq %rax, (%r14) jmp L000030D0 L000020AC: movq _sp(%rip), %rax movq _st(%rip), %rcx movq -8(%rcx,%rax,8), %r12 decq %rax movq _rp(%rip), %rcx decq %rcx movq _ptrs(%rip), %r14 imulq $56, %rcx, %r15 movq 24(%r14,%r15), %r13 movq %rax, _sp(%rip) movq (%r13), %rax movq %rax, %rcx movq $-144115188075855872, %rdx andq %rdx, %rcx movq $2738188573441261568, %rdx cmpq %rdx, %rcx je L0000211D L00002106: leaq LC00005655(%rip), %rsi movl $5, %edi xorl %eax, %eax call _pari_err L00002119: movq (%r13), %rax L0000211D: movq $72057594037927935, %rcx andq %rcx, %rax cmpq $1, %rax jne L00002143 L00002130: leaq LC00005669(%rip), %rsi movl $5, %edi xorl %eax, %eax call _pari_err L00002143: movq 8(%r13), %rax movq (%rax), %rsi movq $72057594037927935, %rax movq %rax, %rbp andq %rbp, %rsi xorl %eax, %eax movq %r12, %rdi call _check_array_index L00002164: movq (%r13), %rbx andq %rbp, %rbx movq _avma@GOTPCREL(%rip), %rdx movq (%rdx), %rax leaq 0(,%rbx,8), %rcx movq %rax, %rbp subq %rcx, %rbp movq _bot@GOTPCREL(%rip), %rcx subq (%rcx), %rax shrq $3, %rax cmpq %rbx, %rax jae L000021B8 L00002196: movl $14, %edi xorl %eax, %eax movq %r14, 208(%rsp) movq %rdx, %r14 call _pari_err L000021AD: movq %r14, %rdx movq 208(%rsp), %r14 L000021B8: leaq 24(%r14,%r15), %rax movq %rax, 200(%rsp) movq %r14, 208(%rsp) movq %rbp, (%rdx) movq %rbx, %rax movq $2449958197289549824, %rcx orq %rcx, %rax movq %rax, (%rbp) cmpq $2, %rbx jb L0000220B L000021EA: movl $1, %r14d L000021F0: movq (%r13,%r14,8), %rax movq (%rax,%r12,8), %rdi call _gcopy L000021FE: movq %rax, (%rbp,%r14,8) incq %r14 cmpq %rbx, %r14 jl L000021F0 L0000220B: movq %rbp, 280(%rsp) movq 208(%rsp), %rcx movl %r12d, 20(%rcx,%r15) leaq 280(%rsp), %rax movq %rax, (%rcx,%r15) movq %r13, 8(%rcx,%r15) movq 280(%rsp), %rax movq 200(%rsp), %rcx L00002241: movq %rax, (%rcx) jmp L000030D0 L00002249: movq 56(%r15), %rax cmpq $20, %rax ja L00004E9E L00002257: leaq L000050A8(%rip), %rcx movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmp *%rax L00002267: movq 56(%r15), %rax cmpq $20, %rax ja L00004E9E L00002275: leaq L000050FC(%rip), %rcx movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmp *%rax L00002285: xorl %eax, %eax call *16(%r15) L0000228B: jmp L00004E5E L00002290: movq _sp(%rip), %rax leaq -2(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq -16(%rcx,%rax,8), %rdi movq -8(%rcx,%rax,8), %rsi call *16(%r15) L000022B7: jmp L00004E5E L000022BC: movq 56(%r15), %rax cmpq $20, %rax ja L00004E9E L000022CA: leaq L00005054(%rip), %rcx movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmp *%rax L000022DA: xorl %eax, %eax call *16(%r15) L000022E0: cltq jmp L00004E5E L000022E7: movq 56(%r15), %rax cmpq $20, %rax ja L00004E9E L000022F5: leaq L00005000(%rip), %rcx movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmp *%rax L00002305: xorl %eax, %eax call *16(%r15) L0000230B: jmp L00004E80 L00002310: movq %r15, %rax notq %rax addq _sp(%rip), %rax movq _st(%rip), %rcx movq (%rcx,%rax,8), %r12 movq (%r12), %rax movq $-144115188075855872, %rcx andq %rcx, %rax movq $3314649325744685056, %rcx cmpq %rcx, %rax je L00002357 L00002348: movl $9, %edi xorl %eax, %eax movq %r12, %rsi call _pari_err L00002357: movq 8(%r12), %rbx movq %rbx, %rbp subq %r15, %rbp je L000023B6 L00002364: jge L00002379 L00002366: leaq LC000056AD(%rip), %rsi movl $5, %edi xorl %eax, %eax call _pari_err L00002379: xorl %eax, %eax movq %rbp, %rdi call _st_alloc L00002383: subq %r15, %rbx jle L000023B6 L00002388: .align 4, 0x90 L00002390: movq _sp(%rip), %rax leaq 1(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq $0, (%rcx,%rax,8) decq %rbx jne L00002390 L000023B6: movq _PARI_stack_limit@GOTPCREL(%rip), %rax movq (%rax), %rax testq %rax, %rax je L000023E5 L000023C5: leaq 272(%rsp), %rcx cmpq %rax, %rcx ja L000023E5 L000023D2: leaq LC000056DF(%rip), %rsi movl $5, %edi xorl %eax, %eax call _pari_err L000023E5: xorl %eax, %eax movq %r12, %rdi call _closure_return L000023EF: cltq movq %rax, 272(%rsp) movq _sp(%rip), %rcx movq _st(%rip), %rdx movq %rax, -8(%rdx,%rcx,8) movq 256(%rsp), %r12 jmp L00004E80 L00002419: movq _s_var+8(%rip), %rcx leaq (%rcx,%r15), %rax movq _s_var+16(%rip), %rdx cmpq %rdx, %rax jle L00002FCE L00002434: movq _s_var(%rip), %r12 testq %rdx, %rdx movq %r15, %rsi je L0000245B L00002443: .align 4, 0x90 L00002450: addq %rdx, %rdx cmpq %rdx, %rax movq %rdx, %rsi jg L00002450 L0000245B: movq %rsi, _s_var+16(%rip) leaq _s_var(%rip), %r14 movq (%r12,%r14), %rdi imulq _s_var+24(%rip), %rsi movq _PARI_SIGINT_block@GOTPCREL(%rip), %r13 movl (%r13), %ebx movl $1, (%r13) testq %rdi, %rdi je L00002F6E L00002491: call _realloc L00002496: jmp L00002F76 L0000249B: testq %r15, %r15 leaq _shallowcopy(%rip), %rcx cmovne _gcopy@GOTPCREL(%rip), %rcx movq _sp(%rip), %rax movq _st(%rip), %rdx movq -8(%rdx,%rax,8), %rdi call *%rcx L000024C2: movq %rax, %r14 movq 56(%r14), %rax movq (%rax), %r13 movq $72057594037927935, %rax andq %rax, %r13 movq _avma@GOTPCREL(%rip), %rbx movq (%rbx), %rax leaq 0(,%r13,8), %rcx movq %rax, %r12 subq %rcx, %r12 movq _bot@GOTPCREL(%rip), %rcx subq (%rcx), %rax shrq $3, %rax cmpq %r13, %rax jae L00002510 L00002504: movl $14, %edi xorl %eax, %eax call _pari_err L00002510: movq %r12, (%rbx) movq %r13, %rax movq $2449958197289549824, %rcx orq %rcx, %rax movq %rax, (%r12) cmpq $2, %r13 jb L000030B9 L00002531: testq %r15, %r15 je L0000307D L0000253A: movq $-1, %rbp movl $1, %ebx .align 4, 0x90 L00002550: movq _var(%rip), %rax movq _s_var+8(%rip), %rcx addq %rbp, %rcx shlq $4, %rcx movq 8(%rax,%rcx), %rdi call _gcopy L0000256F: movq %rax, (%r12,%rbx,8) incq %rbx decq %rbp cmpq %r13, %rbx jl L00002550 L0000257E: jmp L000030B9 L00002583: xorl %eax, %eax movq %r15, %rdi call _checkvalue L0000258D: movq 16(%r15), %rax jmp L00004E5E L00002596: xorl %eax, %eax movq %r15, %rdi call _checkvalue L000025A0: movq _sp(%rip), %rax leaq -1(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq -8(%rcx,%rax,8), %rsi movq %r15, %rdi call _changevalue L000025C6: jmp L00004E80 L000025CB: xorl %eax, %eax call _new_ptr L000025D2: movslq %eax, %rbx xorl %eax, %eax movq %r15, %rdi call _checkvalue L000025DF: movq $-1, 48(%rbx) xorl %eax, %eax movq %r15, %rdi call _copyvalue L000025F1: jmp L0000269B L000025F6: xorl %eax, %eax call _new_ptr L000025FD: movslq %eax, %rbx movq $0, 40(%rbx) movq %r15, 32(%rbx) xorl %eax, %eax movq %r15, %rdi call _checkvalue L00002616: movq 32(%rbx), %rax movq 16(%rax), %rax movq %rax, 24(%rbx) movq _sp(%rip), %rax movq %rax, 48(%rbx) leaq 24(%rbx), %rax jmp L00004E5E L00002636: addq _s_var+8(%rip), %r15 movq _var(%rip), %rax shlq $4, %r15 movq 8(%rax,%r15), %rax jmp L00004E5E L00002652: movq _sp(%rip), %rax leaq -1(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq -8(%rcx,%rax,8), %rsi xorl %eax, %eax movq %r15, %rdi call _changelex L0000267A: jmp L00004E80 L0000267F: xorl %eax, %eax call _new_ptr L00002686: movslq %eax, %rbx movq $-1, 48(%rbx) xorl %eax, %eax movq %r15, %rdi call _copylex L0000269B: cltq leaq 24(%rbx), %rcx movq %rax, 24(%rbx) movq $0, 16(%rbx) movq $0, 40(%rbx) movq $0, 32(%rbx) movq %rax, 8(%rbx) movq %rcx, (%rbx) jmp L00004E80 L000026C9: xorl %eax, %eax call _new_ptr L000026D0: cltq movq %r15, 40(%rax) movq $1, 32(%rax) addq _s_var+8(%rip), %r15 movq _var(%rip), %rcx shlq $4, %r15 movq 8(%rcx,%r15), %rcx movq %rcx, 24(%rax) movq _sp(%rip), %rcx movq %rcx, 48(%rax) leaq 24(%rax), %rax jmp L00004E5E L0000270D: movq _s_var+8(%rip), %rdx leaq (%rdx,%r15), %rax movq _s_var+16(%rip), %rcx cmpq %rcx, %rax jle L00003154 L00002728: movq _s_var(%rip), %r14 testq %rcx, %rcx movq %r15, %rsi je L0000274B L00002737: .align 4, 0x90 L00002740: addq %rcx, %rcx cmpq %rcx, %rax movq %rcx, %rsi jg L00002740 L0000274B: movq %rsi, _s_var+16(%rip) leaq _s_var(%rip), %rax movq (%r14,%rax), %rdi imulq _s_var+24(%rip), %rsi movq _PARI_SIGINT_block@GOTPCREL(%rip), %r12 movl (%r12), %ebp movl $1, (%r12) testq %rdi, %rdi je L000030ED L00002781: call _realloc L00002786: jmp L000030F5 L0000278B: movq _s_var+8(%rip), %rax addq %r15, %rax movq _var(%rip), %rcx shlq $4, %rax cmpq $2, (%rcx,%rax) jne L000027CF L000027A7: movq _sp(%rip), %rax movq _st(%rip), %rcx movq -8(%rcx,%rax,8), %rdi call _closure_evalnobrk L000027BF: movq %rax, %rcx xorl %eax, %eax movq %r15, %rdi movq %rcx, %rsi call _pushlex L000027CF: decq _sp(%rip) jmp L00004E80 L000027DB: movq _s_lvars+8(%rip), %rbp movq _s_lvars+16(%rip), %rax cmpq %rax, %rbp jl L0000327E L000027F2: movq 264(%rsp), %r14 movq _s_lvars(%rip), %r12 movl $1, %esi testq %rax, %rax je L0000281B L0000280B: .align 4, 0x90 L00002810: addq %rax, %rax cmpq %rax, %rbp movq %rax, %rsi jge L00002810 L0000281B: movq %rsi, _s_lvars+16(%rip) leaq _s_lvars(%rip), %rax movq (%r12,%rax), %rdi imulq _s_lvars+24(%rip), %rsi movq _PARI_SIGINT_block@GOTPCREL(%rip), %r13 movl (%r13), %ebx movl $1, (%r13) testq %rdi, %rdi je L0000320F L00002851: call _realloc L00002856: jmp L00003217 L0000285B: movq _s_lvars+8(%rip), %rbp movq _s_lvars+16(%rip), %rax cmpq %rax, %rbp jl L00003342 L00002872: movq 264(%rsp), %r14 movq _s_lvars(%rip), %r12 movl $1, %esi testq %rax, %rax je L0000289B L0000288B: .align 4, 0x90 L00002890: addq %rax, %rax cmpq %rax, %rbp movq %rax, %rsi jge L00002890 L0000289B: movq %rsi, _s_lvars+16(%rip) leaq _s_lvars(%rip), %rax movq (%r12,%rax), %rdi imulq _s_lvars+24(%rip), %rsi movq _PARI_SIGINT_block@GOTPCREL(%rip), %r13 movl (%r13), %ebx movl $1, (%r13) testq %rdi, %rdi je L000032D3 L000028D1: call _realloc L000028D6: jmp L000032DB L000028DB: testq %r15, %r15 je L00004E80 L000028E4: movq _sp(%rip), %rax leaq -8(,%rax,8), %rbx .align 4, 0x90 L00002900: testb $1, %r15b je L00002930 L00002906: movq _st(%rip), %rax cmpq $0, (%rax,%rbx) jne L00002930 L00002914: leaq LC000056EE(%rip), %rsi movl $5, %edi xorl %eax, %eax call _pari_err L00002927: .align 4, 0x90 L00002930: sarq $1, %r15 addq $-8, %rbx testq %r15, %r15 jne L00002900 L0000293C: jmp L00004E80 L00002941: testq %r15, %r15 je L00004E80 L0000294A: movq _sp(%rip), %rax leaq -8(,%rax,8), %rbx .align 4, 0x90 L00002960: testb $1, %r15b je L00002987 L00002966: movq _st(%rip), %rax cmpq $0, (%rax,%rbx) je L00002987 L00002974: leaq LC00005709(%rip), %rsi movl $5, %edi xorl %eax, %eax call _pari_err L00002987: sarq $1, %r15 addq $-8, %rbx testq %r15, %r15 jne L00002960 L00002993: jmp L00004E80 L00002998: movq _sp(%rip), %rax leaq -1(%rax), %rcx movq %rcx, _sp(%rip) leaq -1(%rax,%r15), %rcx movq _st(%rip), %rdx cmpq $0, (%rdx,%rcx,8) jne L00004E80 L000029C1: jmp L00002D16 L000029C6: movq _sp(%rip), %rax leaq -1(%rax), %rcx movq %rcx, _sp(%rip) leaq -1(%rax,%r15), %rcx movq _st(%rip), %rdx movq (%rdx,%rcx,8), %rbp testq %rbp, %rbp je L00002D16 L000029F1: movq (%rbp), %rax movq $-144115188075855872, %rcx andq %rcx, %rax movq $144115188075855875, %rcx leaq -3(%rcx), %rcx cmpq %rcx, %rax je L00002A2B L00002A15: leaq LC0000572C(%rip), %rsi movl $5, %edi xorl %eax, %eax movq %rbp, %rdx call _pari_err L00002A2B: movq 8(%rbp), %rcx xorl %eax, %eax movq %rcx, %rbx sarq $62, %rbx movq $72057594037927935, %rdx je L00002A7A L00002A44: movq 16(%rbp), %rbp leaq -3(%rdx), %rax andq %rax, %rcx cmpq $3, %rcx ja L00002A5A L00002A55: testq %rbp, %rbp jns L00002A6D L00002A5A: leaq LC00005750(%rip), %rsi movl $15, %edi xorl %eax, %eax call _pari_err L00002A6D: movq %rbp, %rax negq %rax testq %rbx, %rbx cmovg %rbp, %rax L00002A7A: addq _sp(%rip), %r15 movq _st(%rip), %rcx movq %rax, (%rcx,%r15,8) jmp L00004E80 L00002A91: movq _avma@GOTPCREL(%rip), %rax movq (%rax), %rax jmp L00004E5E L00002AA0: movq _sp(%rip), %rax leaq -1(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq -16(%rcx,%rax,8), %rbp movq -8(%rcx,%rax,8), %rbx movq (%rbx), %rax movq $72057594037927935, %rcx andq %rcx, %rax leaq (%rbx,%rax,8), %rax movq %rbp, %rdx subq %rax, %rdx cmpq $1000001, %rdx jb L000013C1 L00002AEA: movq _DEBUGMEM@GOTPCREL(%rip), %rax cmpq $2, (%rax) jb L00002B0A L00002AF7: leaq LC000055FE(%rip), %rsi movl $3, %edi xorl %eax, %eax call _pari_warn L00002B0A: movq _bot@GOTPCREL(%rip), %rax cmpq (%rax), %rbx jb L00002D42 L00002B1A: cmpq %rbx, %rbp jbe L00002D42 L00002B23: movq _top@GOTPCREL(%rip), %rax cmpq (%rax), %rbx jae L00002D42 L00002B33: movq (%rbx), %r8 movq %r8, %rax shrq $57, %rax leaq -21(%rax), %rdx cmpq $2, %rdx jb L00002B51 L00002B47: cmpq $2, %rax jne L00001211 L00002B51: movq %r8, %rax movq $72057594037927935, %r12 andq %r12, %rax shlq $3, %rax movq %rbp, %r11 subq %rax, %r11 movq %r8, %rdx andq %r12, %rdx movq _avma@GOTPCREL(%rip), %rax movq %r11, (%rax) je L0000422F L00002B81: movq %r8, %rax movq $-72057594037927936, %rcx orq %rcx, %rax movq %rax, %rdi xorq %r12, %rdi cmpq %rcx, %rax movq $-2, %r14 movq $-2, %r15 cmove %rdi, %r15 leaq (%r15,%rdx), %rsi cmpq $-2, %rsi je L00004207 L00002BBA: leaq 2(%r15), %rsi leaq 2(%r15,%rdx), %r9 addl %r8d, %esi andq $3, %rsi cmpq %rcx, %rax movq %r9, %rcx cmove %rdi, %r14 xorl %r10d, %r10d subq %rsi, %r9 je L00002C6C L00002BE0: movq $-2, %rax movq $-2, %rsi subq %r14, %rsi leaq (%rbx,%rsi,8), %rsi leaq -8(%rbp), %rdi xorl %r10d, %r10d cmpq %rsi, %rdi ja L00002C16 L00002C01: leaq -8(%rbx,%rdx,8), %rsi addq %rdx, %r14 subq %r14, %rax leaq (%rbp,%rax,8), %rax cmpq %rax, %rsi jbe L00002C6C L00002C16: movq %rdx, %r10 subq %r9, %r10 leal 2(%r15,%r8), %edi andq $3, %rdi subq %r15, %rdi addq $-2, %rdi movq %rdx, %rax L00002C2F: movd %rax, %xmm0 pshufd $68, %xmm0, %xmm0 paddq LC000055C0(%rip), %xmm0 movd %xmm0, %rsi movups -8(%rbx,%rsi,8), %xmm0 movups -24(%rbx,%rsi,8), %xmm1 subq %rdx, %rsi movups %xmm0, -8(%rbp,%rsi,8) movups %xmm1, -24(%rbp,%rsi,8) addq $-4, %rax cmpq %rax, %rdi jne L00002C2F L00002C66: movq %r10, %rdx movq %r9, %r10 L00002C6C: cmpq %r10, %rcx jne L00004207 L00002C75: movq %r11, %rbx movq 240(%rsp), %r14 jmp L000013B9 L00002C85: xorl %eax, %eax movq %r15, %rdi call _checkvalue L00002C8F: xorl %eax, %eax movq %r15, %rdi call _copyvalue L00002C99: jmp L00004E80 L00002C9E: xorl %eax, %eax movq %r15, %rdi call _copylex L00002CA8: jmp L00004E80 L00002CAD: movq _avma@GOTPCREL(%rip), %rax movq %rdi, (%rax) L00002CB7: movq _sp(%rip), %rax movq _st(%rip), %rdx movq -16(%rdx,%rax,8), %rsi xorl %eax, %eax movq %rcx, %rdi call _copyupto L00002CD4: cltq movq _sp(%rip), %rcx movq _st(%rip), %rdx movq -24(%rdx,%rcx,8), %rcx movq %rax, (%rcx,%r15,8) movq _avma@GOTPCREL(%rip), %rax movq (%rax), %rax movq _sp(%rip), %rcx movq _st(%rip), %rdx movq %rax, -16(%rdx,%rcx,8) decq _sp(%rip) jmp L00004E80 L00002D16: movq -8(%rdx,%rax,8), %rax movq %rax, (%rdx,%rcx,8) jmp L00004E80 L00002D24: movq _gen_0@GOTPCREL(%rip), %rax movq (%rax), %r14 jmp L00002EC9 L00002D33: movq _gen_0@GOTPCREL(%rip), %rax movq (%rax), %r14 jmp L00002F50 L00002D42: movq _avma@GOTPCREL(%rip), %rax movq %rbp, (%rax) jmp L000013C1 L00002D51: movq $72057594037927935, %rax andq %rax, %rsi xorl %eax, %eax movq %rbp, %rdi call _check_array_index L00002D68: movq (%rbx,%rbp,8), %rdi xorl %eax, %eax movq %r15, %rsi call _closure_castlong L00002D76: jmp L00004E80 L00002D7B: movq 16(%rbx), %rbx movl $1, %esi testq %rbx, %rbx je L00002D8F L00002D89: movq (%rbx), %rsi L00002D8C: andq %rcx, %rsi L00002D8F: xorl %eax, %eax movq %rbp, %rdi call _check_array_index L00002D99: movq (%rbx,%rbp,8), %rdi xorl %eax, %eax movq %r15, %rsi call _closure_castgen L00002DA7: jmp L00004E80 L00002DAC: movq $72057594037927935, %rax andq %rax, %rsi xorl %eax, %eax movq %rbx, %rdi call _check_array_index L00002DC3: leaq (%rbp,%rbx,8), %rax movq %rax, (%r14) movq (%rbp,%rbx,8), %r14 testq %r14, %r14 je L00003379 L00002DD9: jle L0000418D L00002DDF: movq _avma@GOTPCREL(%rip), %rdx movq (%rdx), %rbx leaq -24(%rbx), %r13 movq _bot@GOTPCREL(%rip), %rax movq %rbx, %rcx subq (%rax), %rcx cmpq $23, %rcx ja L00002E13 L00002E00: movl $14, %edi xorl %eax, %eax call _pari_err L00002E0C: movq _avma@GOTPCREL(%rip), %rdx L00002E13: movq %r13, (%rdx) movq $144115188075855875, %rax movq %rax, -24(%rbx) movq $4611686018427387907, %rax jmp L000041DF L00002E33: movq 16(%rbp), %rbp movl $1, %esi testq %rbp, %rbp je L00002E52 L00002E41: movq (%rbp), %rsi L00002E45: movq $72057594037927935, %rax andq %rax, %rsi L00002E52: xorl %eax, %eax movq %rbx, %rdi call _check_array_index L00002E5C: leaq (%rbp,%rbx,8), %rax movq %rax, (%r14) movq (%rbp,%rbx,8), %rax L00002E69: movq 208(%rsp), %rcx movq %rax, (%rcx) L00002E74: movq 240(%rsp), %r14 L00002E7C: movq %rbp, 8(%r15,%r12) movq 256(%rsp), %r12 jmp L00004E80 L00002E8E: cmpq $23, %rax ja L00002EA6 L00002E94: movl $14, %edi xorl %eax, %eax movq %rdx, %r15 call _pari_err L00002EA3: movq %r15, %rdx L00002EA6: movq %r14, (%rdx) movq $144115188075855875, %rax movq %rax, -24(%rbp) movq $-4611686018427387901, %rax movq %rax, -16(%rbp) movq %rbx, -8(%rbp) L00002EC9: movq _sp(%rip), %rax leaq 1(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq %r14, (%rcx,%rax,8) movq %r12, %r14 movq 256(%rsp), %r12 jmp L00004E80 L00002EF6: negq %rbx movq _avma@GOTPCREL(%rip), %rdx movq (%rdx), %rbp leaq -24(%rbp), %r14 movq _bot@GOTPCREL(%rip), %rax movq %rbp, %rcx subq (%rax), %rcx cmpq $23, %rcx ja L00002F2D L00002F1A: movl $14, %edi xorl %eax, %eax call _pari_err L00002F26: movq _avma@GOTPCREL(%rip), %rdx L00002F2D: movq %r14, (%rdx) movq $144115188075855875, %rax movq %rax, -24(%rbp) movq $-4611686018427387901, %rax L00002F48: movq %rax, -16(%rbp) movq %rbx, -8(%rbp) L00002F50: movq _sp(%rip), %rax movq _st(%rip), %rcx movq %r14, -8(%rcx,%rax,8) movq %r12, %r14 movq %r15, %r12 jmp L00004E80 L00002F6E: movq %rsi, %rdi call _malloc L00002F76: movq %rax, %rbp movl %ebx, (%r13) testl %ebx, %ebx jne L00002F9A L00002F81: movq _PARI_SIGINT_pending@GOTPCREL(%rip), %rax cmpl $0, (%rax) je L00002F9A L00002F8D: movl (%rax), %edi movl $0, (%rax) call _raise L00002F9A: testq %rbp, %rbp movq 224(%rsp), %r13 jne L00002FB3 L00002FA7: movl $28, %edi xorl %eax, %eax call _pari_err L00002FB3: movq %rbp, (%r12,%r14) movq _s_var+8(%rip), %rcx movq 240(%rsp), %r14 movq 256(%rsp), %r12 L00002FCE: addq %r15, %rcx movq %rcx, _s_var+8(%rip) addq %r15, 248(%rsp) testq %r15, %r15 jle L00004E80 L00002FE9: shlq $4, %rcx movq _var(%rip), %rax movq $0, -16(%rcx,%rax) movq _gen_0@GOTPCREL(%rip), %rax movq (%rax), %rcx movq _s_var+8(%rip), %rdx shlq $4, %rdx movq _var(%rip), %rsi movq %rcx, -8(%rdx,%rsi) movq $-2, %rcx cmpq $1, %r15 je L00004E80 L0000302F: .align 4, 0x90 L00003030: movq _var(%rip), %rdx movq _s_var+8(%rip), %rsi addq %rcx, %rsi shlq $4, %rsi movq $0, (%rdx,%rsi) movq (%rax), %rdx movq _var(%rip), %rsi movq _s_var+8(%rip), %rdi addq %rcx, %rdi shlq $4, %rdi movq %rdx, 8(%rsi,%rdi) leaq -1(%r15,%rcx), %rdx decq %rcx cmpq $-1, %rdx jne L00003030 L00003078: jmp L00004E80 L0000307D: movq $-1, %rax movl $1, %ecx .align 4, 0x90 L00003090: movq _var(%rip), %rdx movq _s_var+8(%rip), %rsi addq %rax, %rsi shlq $4, %rsi movq 8(%rdx,%rsi), %rdx movq %rdx, (%r12,%rcx,8) incq %rcx decq %rax cmpq %r13, %rcx jl L00003090 L000030B9: movq %r12, 56(%r14) movq _sp(%rip), %rax movq _st(%rip), %rcx movq %r14, -8(%rcx,%rax,8) L000030D0: movq 240(%rsp), %r14 L000030D8: movq 224(%rsp), %r13 movq 256(%rsp), %r12 jmp L00004E80 L000030ED: movq %rsi, %rdi call _malloc L000030F5: movq %rax, %r13 movl %ebp, (%r12) testl %ebp, %ebp jne L00003119 L00003100: movq _PARI_SIGINT_pending@GOTPCREL(%rip), %rax cmpl $0, (%rax) je L00003119 L0000310C: movl (%rax), %edi movl $0, (%rax) call _raise L00003119: testq %r13, %r13 movq 256(%rsp), %r12 jne L00003132 L00003126: movl $28, %edi xorl %eax, %eax call _pari_err L00003132: leaq _s_var(%rip), %rax movq %r13, (%r14,%rax) movq _s_var+8(%rip), %rdx movq 240(%rsp), %r14 movq 224(%rsp), %r13 L00003154: addq %r15, %rdx movq %rdx, _s_var+8(%rip) addq %r15, 248(%rsp) movq _sp(%rip), %rax subq %r15, %rax movq %rax, _sp(%rip) testq %r15, %r15 jle L00004E80 L00003180: movq %r14, %r15 xorl %ebp, %ebp jmp L0000319A L00003187: .align 4, 0x90 L00003190: incq %rbp movq _sp(%rip), %rax L0000319A: leaq 1(%rbx,%rbp), %r14 movq _st(%rip), %rcx addq %rbp, %rax movq (%rcx,%rax,8), %rsi testq %rsi, %rsi je L000031C0 L000031B2: leaq (%rbx,%rbp), %rdi xorl %eax, %eax call _pushlex L000031BD: jmp L00003202 L000031BF: .align 4, 0x90 L000031C0: movq _var(%rip), %rax leaq (%rbx,%rbp), %rcx movq _s_var+8(%rip), %rdx addq %rcx, %rdx shlq $4, %rdx movq $2, (%rax,%rdx) movq _gen_0@GOTPCREL(%rip), %rax movq (%rax), %rax movq _var(%rip), %rdx addq _s_var+8(%rip), %rcx shlq $4, %rcx movq %rax, 8(%rdx,%rcx) L00003202: testq %r14, %r14 jne L00003190 L00003207: movq %r15, %r14 jmp L00004E80 L0000320F: movq %rsi, %rdi call _malloc L00003217: movq %rax, %rbp movl %ebx, (%r13) testl %ebx, %ebx jne L0000323B L00003222: movq _PARI_SIGINT_pending@GOTPCREL(%rip), %rax cmpl $0, (%rax) je L0000323B L0000322E: movl (%rax), %edi movl $0, (%rax) call _raise L0000323B: testq %rbp, %rbp movq 224(%rsp), %r13 jne L00003254 L00003248: movl $28, %edi xorl %eax, %eax call _pari_err L00003254: movq %r14, 264(%rsp) leaq _s_lvars(%rip), %rax movq %rbp, (%r12,%rax) movq _s_lvars+8(%rip), %rbp movq 240(%rsp), %r14 movq 256(%rsp), %r12 L0000327E: leaq 1(%rbp), %rax movq %rax, _s_lvars+8(%rip) xorl %eax, %eax movq %r15, %rdi call _checkvalue L00003293: movq _lvars(%rip), %rax movq %r15, (%rax,%rbp,8) incq 232(%rsp) movq _sp(%rip), %rax leaq -1(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq -8(%rcx,%rax,8), %rsi xorl %eax, %eax movq %r15, %rdi call _pushvalue L000032CE: jmp L00004E80 L000032D3: movq %rsi, %rdi call _malloc L000032DB: movq %rax, %rbp movl %ebx, (%r13) testl %ebx, %ebx jne L000032FF L000032E6: movq _PARI_SIGINT_pending@GOTPCREL(%rip), %rax cmpl $0, (%rax) je L000032FF L000032F2: movl (%rax), %edi movl $0, (%rax) call _raise L000032FF: testq %rbp, %rbp movq 224(%rsp), %r13 jne L00003318 L0000330C: movl $28, %edi xorl %eax, %eax call _pari_err L00003318: movq %r14, 264(%rsp) leaq _s_lvars(%rip), %rax movq %rbp, (%r12,%rax) movq _s_lvars+8(%rip), %rbp movq 240(%rsp), %r14 movq 256(%rsp), %r12 L00003342: leaq 1(%rbp), %rax movq %rax, _s_lvars+8(%rip) xorl %eax, %eax movq %r15, %rdi call _checkvalue L00003357: movq _lvars(%rip), %rax movq %r15, (%rax,%rbp,8) incq 232(%rsp) xorl %eax, %eax movq %r15, %rdi call _zerovalue L00003374: jmp L00004E80 L00003379: movq _gen_0@GOTPCREL(%rip), %rax movq (%rax), %rax jmp L00002E69 L00003388: incq %rsi movq $72057594037927935, %rax andq %rax, %r8 shlq $3, %r8 subq %r8, %rdi movq 240(%rsp), %r14 movq 256(%rsp), %r12 .align 4, 0x90 L000033B0: movq -16(%rcx,%rsi,8), %rax movq %rax, -16(%rdi,%rsi,8) decq %rsi cmpq $1, %rsi jg L000033B0 L000033C3: movq %r11, %rcx jmp L00002CB7 L000033CB: movq _sp(%rip), %rax leaq -1(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq -8(%rcx,%rax,8), %rdi xorl %eax, %eax call *16(%r15) L000033EF: jmp L00004E5E L000033F4: movq _sp(%rip), %rax leaq -2(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq -16(%rcx,%rax,8), %rdi movq -8(%rcx,%rax,8), %rsi xorl %eax, %eax call *16(%r15) L0000341D: jmp L00004E5E L00003422: movq _sp(%rip), %rax leaq -3(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq -24(%rcx,%rax,8), %rdi movq -16(%rcx,%rax,8), %rsi movq -8(%rcx,%rax,8), %rdx xorl %eax, %eax call *16(%r15) L00003450: jmp L00004E5E L00003455: movq _sp(%rip), %rax leaq -4(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq -32(%rcx,%rax,8), %rdi movq -24(%rcx,%rax,8), %rsi movq -16(%rcx,%rax,8), %rdx movq -8(%rcx,%rax,8), %rcx xorl %eax, %eax call *16(%r15) L00003488: jmp L00004E5E L0000348D: movq _sp(%rip), %rax leaq -5(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -40(%rbp,%rax,8), %rdi movq -32(%rbp,%rax,8), %rsi movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %r8 xorl %eax, %eax call *16(%r15) L000034C5: jmp L00004E5E L000034CA: movq _sp(%rip), %rax leaq -6(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -48(%rbp,%rax,8), %rdi movq -40(%rbp,%rax,8), %rsi movq -32(%rbp,%rax,8), %rdx movq -24(%rbp,%rax,8), %rcx movq -16(%rbp,%rax,8), %r8 movq -8(%rbp,%rax,8), %r9 jmp L0000364A L00003506: movq _sp(%rip), %rax leaq -7(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -56(%rbp,%rax,8), %rdi movq -48(%rbp,%rax,8), %rsi movq -40(%rbp,%rax,8), %rdx movq -32(%rbp,%rax,8), %rcx movq -24(%rbp,%rax,8), %r8 movq -16(%rbp,%rax,8), %r9 movq -8(%rbp,%rax,8), %rax movq %rax, (%rsp) jmp L0000364A L0000354B: movq _sp(%rip), %rax leaq -8(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -64(%rbp,%rax,8), %rdi movq -56(%rbp,%rax,8), %rsi movq -48(%rbp,%rax,8), %rdx movq -40(%rbp,%rax,8), %rcx movq -32(%rbp,%rax,8), %r8 movq -24(%rbp,%rax,8), %r9 movq -16(%rbp,%rax,8), %rbx movq -8(%rbp,%rax,8), %rax movq %rax, 8(%rsp) movq %rbx, (%rsp) jmp L0000364A L0000359A: movq _sp(%rip), %rax leaq -9(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -72(%rbp,%rax,8), %rdi movq -64(%rbp,%rax,8), %rsi movq -56(%rbp,%rax,8), %rdx movq -48(%rbp,%rax,8), %rcx movq -40(%rbp,%rax,8), %r8 movq -32(%rbp,%rax,8), %r9 movq -24(%rbp,%rax,8), %r10 movq -16(%rbp,%rax,8), %rbx movq -8(%rbp,%rax,8), %rax movq %rax, 16(%rsp) movq %rbx, 8(%rsp) jmp L00003646 L000035EC: movq _sp(%rip), %rax leaq -10(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -80(%rbp,%rax,8), %rdi movq -72(%rbp,%rax,8), %rsi movq -64(%rbp,%rax,8), %rdx movq -56(%rbp,%rax,8), %rcx movq -48(%rbp,%rax,8), %r8 movq -40(%rbp,%rax,8), %r9 movq -32(%rbp,%rax,8), %r10 movq -24(%rbp,%rax,8), %r11 movq -16(%rbp,%rax,8), %rbx movq -8(%rbp,%rax,8), %rax movq %rax, 24(%rsp) movq %rbx, 16(%rsp) movq %r11, 8(%rsp) L00003646: movq %r10, (%rsp) L0000364A: xorl %eax, %eax call *16(%r15) L00003650: jmp L00004E5E L00003655: movq _sp(%rip), %rax leaq -11(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -88(%rbp,%rax,8), %rdi movq -80(%rbp,%rax,8), %rsi movq -72(%rbp,%rax,8), %rdx movq -64(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -56(%rbp,%rax,8), %r8 movq -48(%rbp,%rax,8), %r9 movq -40(%rbp,%rax,8), %r10 movq -32(%rbp,%rax,8), %r11 movq %r12, %rcx movq %r14, %r12 movq -24(%rbp,%rax,8), %r14 movq -16(%rbp,%rax,8), %rbx movq -8(%rbp,%rax,8), %rax movq %rax, 32(%rsp) movq %rbx, 24(%rsp) movq %r14, 16(%rsp) movq %r12, %r14 movq %rcx, %r12 movq %r11, 8(%rsp) movq %r10, (%rsp) xorl %eax, %eax jmp L00003776 L000036D8: movq _sp(%rip), %rax leaq -12(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -96(%rbp,%rax,8), %rdi movq -88(%rbp,%rax,8), %rsi movq -80(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -72(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -64(%rbp,%rax,8), %r8 movq -56(%rbp,%rax,8), %r9 movq -48(%rbp,%rax,8), %r10 movq -40(%rbp,%rax,8), %r11 movq %r13, %rdx movq %r14, %r13 movq -32(%rbp,%rax,8), %r14 movq %r12, %rcx movq -24(%rbp,%rax,8), %r12 movq -16(%rbp,%rax,8), %rbx movq -8(%rbp,%rax,8), %rax movq %rax, 40(%rsp) movq %rbx, 32(%rsp) movq %r12, 24(%rsp) movq %rcx, %r12 movq %r14, 16(%rsp) movq %r13, %r14 movq %rdx, %r13 movq %r11, 8(%rsp) movq %r10, (%rsp) xorl %eax, %eax movq 200(%rsp), %rdx L00003776: movq 208(%rsp), %rcx call *16(%r15) L00003782: jmp L00004E5E L00003787: movq _sp(%rip), %rax leaq -13(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -104(%rbp,%rax,8), %rdx movq -96(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -80(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -72(%rbp,%rax,8), %r8 movq -64(%rbp,%rax,8), %r9 movq -56(%rbp,%rax,8), %r10 movq -48(%rbp,%rax,8), %r11 movq %r14, %rdi movq -40(%rbp,%rax,8), %r14 movq %r12, %rsi movq -32(%rbp,%rax,8), %r12 movq %r13, %rcx movq -24(%rbp,%rax,8), %r13 movq -16(%rbp,%rax,8), %rbx movq -8(%rbp,%rax,8), %rax movq %rax, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %rcx, %r13 movq %r12, 24(%rsp) movq %rsi, %r12 movq %r14, 16(%rsp) movq %rdi, %r14 movq %r11, 8(%rsp) movq %r10, (%rsp) xorl %eax, %eax movq %rdx, %rdi movq 208(%rsp), %rsi movq 168(%rsp), %rdx jmp L0000391C L00003847: movq _sp(%rip), %rax leaq -14(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -112(%rbp,%rax,8), %rsi movq -104(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -96(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -80(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -72(%rbp,%rax,8), %r9 movq -64(%rbp,%rax,8), %r10 movq -56(%rbp,%rax,8), %r11 movq %r14, %r8 movq -48(%rbp,%rax,8), %r14 movq %r12, %rdi movq -40(%rbp,%rax,8), %r12 movq %r13, %rdx movq -32(%rbp,%rax,8), %r13 movq -24(%rbp,%rax,8), %rbx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 56(%rsp) movq %rcx, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %rdx, %r13 movq %r12, 24(%rsp) movq %rdi, %r12 movq %r14, 16(%rsp) movq %r8, %r14 movq %r11, 8(%rsp) movq %r10, (%rsp) xorl %eax, %eax movq %rsi, %rdi movq 208(%rsp), %rsi movq 168(%rsp), %rdx movq 160(%rsp), %r8 L0000391C: movq 200(%rsp), %rcx call *16(%r15) L00003928: jmp L00004E5E L0000392D: movq _sp(%rip), %rax leaq -15(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -120(%rbp,%rax,8), %rdi movq -112(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -104(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -96(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -80(%rbp,%rax,8), %rcx movq %rcx, 152(%rsp) movq -72(%rbp,%rax,8), %r10 movq -64(%rbp,%rax,8), %r11 movq %r14, %r9 movq -56(%rbp,%rax,8), %r14 movq %r12, %r8 movq -48(%rbp,%rax,8), %r12 movq %r13, %rsi movq -40(%rbp,%rax,8), %r13 movq -32(%rbp,%rax,8), %rbx movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 64(%rsp) movq %rcx, 56(%rsp) movq %rdx, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %rsi, %r13 movq %r12, 24(%rsp) movq %r8, %r12 movq %r14, 16(%rsp) movq %r9, %r14 movq %r11, 8(%rsp) movq %r10, (%rsp) xorl %eax, %eax jmp L00003E43 L000039FE: movq _sp(%rip), %rax leaq -16(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -128(%rbp,%rax,8), %r8 movq -120(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -112(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -104(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -96(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 152(%rsp) movq -80(%rbp,%rax,8), %rcx movq %rcx, 144(%rsp) movq -72(%rbp,%rax,8), %r11 movq %r14, %r10 movq -64(%rbp,%rax,8), %r14 movq %r12, %r9 movq -56(%rbp,%rax,8), %r12 movq %r13, %rdi movq -48(%rbp,%rax,8), %r13 movq -40(%rbp,%rax,8), %rbx movq -32(%rbp,%rax,8), %rsi movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 72(%rsp) movq %rcx, 64(%rsp) movq %rdx, 56(%rsp) movq %rsi, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %rdi, %r13 movq %r12, 24(%rsp) movq %r9, %r12 movq %r14, 16(%rsp) movq %r10, %r14 movq %r11, 8(%rsp) movq 144(%rsp), %rax movq %rax, (%rsp) xorl %eax, %eax movq %r8, %rdi jmp L00003E43 L00003AEC: movq _sp(%rip), %rax leaq -17(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -136(%rbp,%rax,8), %r9 movq -128(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -120(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -112(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -104(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -96(%rbp,%rax,8), %rcx movq %rcx, 152(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 144(%rsp) movq -80(%rbp,%rax,8), %rcx movq %rcx, 136(%rsp) movq %r14, %r11 movq -72(%rbp,%rax,8), %r14 movq %r12, %r10 movq -64(%rbp,%rax,8), %r12 movq %r13, %r8 movq -56(%rbp,%rax,8), %r13 movq -48(%rbp,%rax,8), %rbx movq -40(%rbp,%rax,8), %rdi movq -32(%rbp,%rax,8), %rsi movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 80(%rsp) movq %rcx, 72(%rsp) movq %rdx, 64(%rsp) movq %rsi, 56(%rsp) movq %rdi, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %r8, %r13 movq %r12, 24(%rsp) movq %r10, %r12 movq %r14, 16(%rsp) movq %r11, %r14 movq 136(%rsp), %rax movq %rax, 8(%rsp) movq 144(%rsp), %rax movq %rax, (%rsp) xorl %eax, %eax movq %r9, %rdi jmp L00003E43 L00003BF7: movq _sp(%rip), %rax leaq -18(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -144(%rbp,%rax,8), %r10 movq -136(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -128(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -120(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -112(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -104(%rbp,%rax,8), %rcx movq %rcx, 152(%rsp) movq -96(%rbp,%rax,8), %rcx movq %rcx, 144(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 136(%rsp) movq -80(%rbp,%rax,8), %r14 movq %r12, %r11 movq -72(%rbp,%rax,8), %r12 movq %r13, %r9 movq -64(%rbp,%rax,8), %r13 movq -56(%rbp,%rax,8), %rbx movq -48(%rbp,%rax,8), %r8 movq -40(%rbp,%rax,8), %rdi movq -32(%rbp,%rax,8), %rsi movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 88(%rsp) movq %rcx, 80(%rsp) movq %rdx, 72(%rsp) movq %rsi, 64(%rsp) movq %rdi, 56(%rsp) movq %r8, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %r9, %r13 movq %r12, 24(%rsp) movq %r11, %r12 movq %r14, 16(%rsp) movq 240(%rsp), %r14 movq 136(%rsp), %rax movq %rax, 8(%rsp) movq 144(%rsp), %rax movq %rax, (%rsp) xorl %eax, %eax movq %r10, %rdi jmp L00003E43 L00003D11: movq _sp(%rip), %rax leaq -19(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -152(%rbp,%rax,8), %r11 movq -144(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -136(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -128(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -120(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -112(%rbp,%rax,8), %rcx movq %rcx, 152(%rsp) movq -104(%rbp,%rax,8), %rcx movq %rcx, 144(%rsp) movq -96(%rbp,%rax,8), %rcx movq %rcx, 136(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 128(%rsp) movq %r12, %r14 movq -80(%rbp,%rax,8), %r12 movq %r13, %r10 movq -72(%rbp,%rax,8), %r13 movq -64(%rbp,%rax,8), %rbx movq -56(%rbp,%rax,8), %r9 movq -48(%rbp,%rax,8), %r8 movq -40(%rbp,%rax,8), %rdi movq -32(%rbp,%rax,8), %rsi movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 96(%rsp) movq %rcx, 88(%rsp) movq %rdx, 80(%rsp) movq %rsi, 72(%rsp) movq %rdi, 64(%rsp) movq %r8, 56(%rsp) movq %r9, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %r10, %r13 movq %r12, 24(%rsp) movq %r14, %r12 movq 128(%rsp), %rax movq %rax, 16(%rsp) movq 240(%rsp), %r14 movq 136(%rsp), %rax movq %rax, 8(%rsp) movq 144(%rsp), %rax movq %rax, (%rsp) xorl %eax, %eax movq %r11, %rdi L00003E43: movq 200(%rsp), %rsi movq 160(%rsp), %r8 movq 152(%rsp), %r9 movq 208(%rsp), %rdx movq 168(%rsp), %rcx call *16(%r15) L00003E6F: jmp L00004E5E L00003E74: movq _sp(%rip), %rax leaq -20(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -160(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -152(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -144(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -136(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -128(%rbp,%rax,8), %rcx movq %rcx, 152(%rsp) movq -120(%rbp,%rax,8), %rcx movq %rcx, 144(%rsp) movq -112(%rbp,%rax,8), %rcx movq %rcx, 136(%rsp) movq -104(%rbp,%rax,8), %rcx movq %rcx, 128(%rsp) movq -96(%rbp,%rax,8), %r14 movq -88(%rbp,%rax,8), %r12 movq %r13, %r11 movq -80(%rbp,%rax,8), %r13 movq -72(%rbp,%rax,8), %rbx movq -64(%rbp,%rax,8), %r10 movq -56(%rbp,%rax,8), %r9 movq -48(%rbp,%rax,8), %r8 movq -40(%rbp,%rax,8), %rdi movq -32(%rbp,%rax,8), %rsi movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 104(%rsp) movq %rcx, 96(%rsp) movq %rdx, 88(%rsp) movq %rsi, 80(%rsp) movq %rdi, 72(%rsp) movq %r8, 64(%rsp) movq %r9, 56(%rsp) movq %r10, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %r11, %r13 movq %r12, 24(%rsp) movq 256(%rsp), %r12 movq %r14, 16(%rsp) movq 240(%rsp), %r14 movq 128(%rsp), %rax movq %rax, 8(%rsp) movq 136(%rsp), %rax movq %rax, (%rsp) xorl %eax, %eax movq 208(%rsp), %rdi movq 168(%rsp), %rsi movq 152(%rsp), %r8 movq 144(%rsp), %r9 movq 200(%rsp), %rdx movq 160(%rsp), %rcx call *16(%r15) L00003FDE: jmp L00004E5E L00003FE3: movq %r11, %rcx jmp L00002CB7 L00003FEB: cmpq $1, %rax movq $72057594037927935, %rax jne L0000138D L00003FFF: movq %r12, %r8 movq 8(%rcx), %r10 movq %r10, %rbp andq %rax, %rbp leaq 0(,%rbp,8), %rax movq %rdi, %r12 subq %rax, %r12 cmpq $2, %rbp jb L00004163 L00004024: movq %r10, %rsi movq $72057594037927935, %rax andq %rax, %rsi movq %rsi, %rbx negq %rbx cmpq $-3, %rbx movq $-2, %r11 movq $-2, %rax cmovg %rbx, %rax leaq (%rax,%rsi), %rdx cmpq $-1, %rdx movq %rbp, %rdx je L00004138 L00004061: leaq 1(%rax,%rsi), %r9 movq %r9, 208(%rsp) incq %rax addl %r10d, %eax andq $3, %rax cmpq $-3, %rbx cmovg %rbx, %r11 xorl %r14d, %r14d subq %rax, %r9 movq %rbp, %rdx je L00004126 L0000408F: movq %r11, %rax notq %rax leaq (%rcx,%rax,8), %rax leaq -8(%rdi), %rdx xorl %r14d, %r14d cmpq %rax, %rdx ja L000040BC L000040A5: leaq -8(%rcx,%rsi,8), %rax addq %rsi, %r11 notq %r11 leaq (%rdi,%r11,8), %rdx cmpq %rdx, %rax movq %rbp, %rdx jbe L00004126 L000040BC: movq %rbp, %rdx subq %r9, %rdx cmpq $-3, %rbx movq $-2, %r11 cmovg %rbx, %r11 cmpq $-2, %rbx movl $-2, %eax cmovg %ebx, %eax leal 1(%r10,%rax), %ebx andq $3, %rbx subq %r11, %rbx decq %rbx L000040EC: movd %rsi, %xmm0 pshufd $68, %xmm0, %xmm0 paddq LC000055C0(%rip), %xmm0 movd %xmm0, %rax movups -8(%rcx,%rax,8), %xmm0 movups -24(%rcx,%rax,8), %xmm1 subq %rbp, %rax movups %xmm0, -8(%rdi,%rax,8) movups %xmm1, -24(%rdi,%rax,8) addq $-4, %rsi cmpq %rsi, %rbx jne L000040EC L00004123: movq %r9, %r14 L00004126: cmpq %r14, 208(%rsp) movq 240(%rsp), %r14 je L00004163 L00004138: movq $72057594037927935, %rax andq %rax, %r10 shlq $3, %r10 subq %r10, %rdi addq $-8, %rdi L00004150: movq -8(%rcx,%rdx,8), %rax movq %rax, (%rdi,%rdx,8) leaq -1(%rdx), %rdx cmpq $1, %rdx jg L00004150 L00004163: movq $144115188075855875, %rax leaq -3(%rax), %rax orq %rax, %rbp movq %rbp, (%r12) movq _avma@GOTPCREL(%rip), %rax movq %r12, (%rax) movq %r12, %rcx movq %r8, %r12 jmp L00002CB7 L0000418D: negq %r14 movq _avma@GOTPCREL(%rip), %rdx movq (%rdx), %rbx leaq -24(%rbx), %r13 movq _bot@GOTPCREL(%rip), %rax movq %rbx, %rcx subq (%rax), %rcx cmpq $23, %rcx ja L000041C4 L000041B1: movl $14, %edi xorl %eax, %eax call _pari_err L000041BD: movq _avma@GOTPCREL(%rip), %rdx L000041C4: movq %r13, (%rdx) movq $144115188075855875, %rax movq %rax, -24(%rbx) movq $-4611686018427387901, %rax L000041DF: movq %rax, -16(%rbx) movq %r14, -8(%rbx) movq 208(%rsp), %rax movq %r13, (%rax) movq 240(%rsp), %r14 movq 224(%rsp), %r13 jmp L00002E7C L00004207: incq %rdx andq %r12, %r8 shlq $3, %r8 subq %r8, %rbp movq 240(%rsp), %r14 L0000421C: movq -16(%rbx,%rdx,8), %rax movq %rax, -16(%rbp,%rdx,8) decq %rdx cmpq $1, %rdx jg L0000421C L0000422F: movq %r11, %rbx jmp L000013B9 L00004237: movq _sp(%rip), %rax leaq -1(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq -8(%rcx,%rax,8), %rdi xorl %eax, %eax call *16(%r15) L0000425B: cltq jmp L00004E5E L00004262: movq _sp(%rip), %rax leaq -2(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq -16(%rcx,%rax,8), %rdi movq -8(%rcx,%rax,8), %rsi xorl %eax, %eax call *16(%r15) L0000428B: cltq jmp L00004E5E L00004292: movq _sp(%rip), %rax leaq -3(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq -24(%rcx,%rax,8), %rdi movq -16(%rcx,%rax,8), %rsi movq -8(%rcx,%rax,8), %rdx xorl %eax, %eax call *16(%r15) L000042C0: cltq jmp L00004E5E L000042C7: movq _sp(%rip), %rax leaq -4(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rcx movq -32(%rcx,%rax,8), %rdi movq -24(%rcx,%rax,8), %rsi movq -16(%rcx,%rax,8), %rdx movq -8(%rcx,%rax,8), %rcx xorl %eax, %eax call *16(%r15) L000042FA: cltq jmp L00004E5E L00004301: movq _sp(%rip), %rax leaq -5(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -40(%rbp,%rax,8), %rdi movq -32(%rbp,%rax,8), %rsi movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %r8 xorl %eax, %eax call *16(%r15) L00004339: cltq jmp L00004E5E L00004340: movq _sp(%rip), %rax leaq -6(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -48(%rbp,%rax,8), %rdi movq -40(%rbp,%rax,8), %rsi movq -32(%rbp,%rax,8), %rdx movq -24(%rbp,%rax,8), %rcx movq -16(%rbp,%rax,8), %r8 movq -8(%rbp,%rax,8), %r9 jmp L000044C0 L0000437C: movq _sp(%rip), %rax leaq -7(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -56(%rbp,%rax,8), %rdi movq -48(%rbp,%rax,8), %rsi movq -40(%rbp,%rax,8), %rdx movq -32(%rbp,%rax,8), %rcx movq -24(%rbp,%rax,8), %r8 movq -16(%rbp,%rax,8), %r9 movq -8(%rbp,%rax,8), %rax movq %rax, (%rsp) jmp L000044C0 L000043C1: movq _sp(%rip), %rax leaq -8(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -64(%rbp,%rax,8), %rdi movq -56(%rbp,%rax,8), %rsi movq -48(%rbp,%rax,8), %rdx movq -40(%rbp,%rax,8), %rcx movq -32(%rbp,%rax,8), %r8 movq -24(%rbp,%rax,8), %r9 movq -16(%rbp,%rax,8), %rbx movq -8(%rbp,%rax,8), %rax movq %rax, 8(%rsp) movq %rbx, (%rsp) jmp L000044C0 L00004410: movq _sp(%rip), %rax leaq -9(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -72(%rbp,%rax,8), %rdi movq -64(%rbp,%rax,8), %rsi movq -56(%rbp,%rax,8), %rdx movq -48(%rbp,%rax,8), %rcx movq -40(%rbp,%rax,8), %r8 movq -32(%rbp,%rax,8), %r9 movq -24(%rbp,%rax,8), %r10 movq -16(%rbp,%rax,8), %rbx movq -8(%rbp,%rax,8), %rax movq %rax, 16(%rsp) movq %rbx, 8(%rsp) jmp L000044BC L00004462: movq _sp(%rip), %rax leaq -10(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -80(%rbp,%rax,8), %rdi movq -72(%rbp,%rax,8), %rsi movq -64(%rbp,%rax,8), %rdx movq -56(%rbp,%rax,8), %rcx movq -48(%rbp,%rax,8), %r8 movq -40(%rbp,%rax,8), %r9 movq -32(%rbp,%rax,8), %r10 movq -24(%rbp,%rax,8), %r11 movq -16(%rbp,%rax,8), %rbx movq -8(%rbp,%rax,8), %rax movq %rax, 24(%rsp) movq %rbx, 16(%rsp) movq %r11, 8(%rsp) L000044BC: movq %r10, (%rsp) L000044C0: xorl %eax, %eax call *16(%r15) L000044C6: cltq jmp L00004E5E L000044CD: movq _sp(%rip), %rax leaq -11(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -88(%rbp,%rax,8), %rdi movq -80(%rbp,%rax,8), %rsi movq -72(%rbp,%rax,8), %rdx movq -64(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -56(%rbp,%rax,8), %r8 movq -48(%rbp,%rax,8), %r9 movq -40(%rbp,%rax,8), %r10 movq -32(%rbp,%rax,8), %r11 movq %r12, %rcx movq %r14, %r12 movq -24(%rbp,%rax,8), %r14 movq -16(%rbp,%rax,8), %rbx movq -8(%rbp,%rax,8), %rax movq %rax, 32(%rsp) movq %rbx, 24(%rsp) movq %r14, 16(%rsp) movq %r12, %r14 movq %rcx, %r12 movq %r11, 8(%rsp) movq %r10, (%rsp) xorl %eax, %eax jmp L000045EE L00004550: movq _sp(%rip), %rax leaq -12(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -96(%rbp,%rax,8), %rdi movq -88(%rbp,%rax,8), %rsi movq -80(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -72(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -64(%rbp,%rax,8), %r8 movq -56(%rbp,%rax,8), %r9 movq -48(%rbp,%rax,8), %r10 movq -40(%rbp,%rax,8), %r11 movq %r13, %rdx movq %r14, %r13 movq -32(%rbp,%rax,8), %r14 movq %r12, %rcx movq -24(%rbp,%rax,8), %r12 movq -16(%rbp,%rax,8), %rbx movq -8(%rbp,%rax,8), %rax movq %rax, 40(%rsp) movq %rbx, 32(%rsp) movq %r12, 24(%rsp) movq %rcx, %r12 movq %r14, 16(%rsp) movq %r13, %r14 movq %rdx, %r13 movq %r11, 8(%rsp) movq %r10, (%rsp) xorl %eax, %eax movq 200(%rsp), %rdx L000045EE: movq 208(%rsp), %rcx call *16(%r15) L000045FA: cltq jmp L00004E5E L00004601: movq _sp(%rip), %rax leaq -13(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -104(%rbp,%rax,8), %rdx movq -96(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -80(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -72(%rbp,%rax,8), %r8 movq -64(%rbp,%rax,8), %r9 movq -56(%rbp,%rax,8), %r10 movq -48(%rbp,%rax,8), %r11 movq %r14, %rdi movq -40(%rbp,%rax,8), %r14 movq %r12, %rsi movq -32(%rbp,%rax,8), %r12 movq %r13, %rcx movq -24(%rbp,%rax,8), %r13 movq -16(%rbp,%rax,8), %rbx movq -8(%rbp,%rax,8), %rax movq %rax, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %rcx, %r13 movq %r12, 24(%rsp) movq %rsi, %r12 movq %r14, 16(%rsp) movq %rdi, %r14 movq %r11, 8(%rsp) movq %r10, (%rsp) xorl %eax, %eax movq %rdx, %rdi movq 208(%rsp), %rsi movq 168(%rsp), %rdx jmp L00004796 L000046C1: movq _sp(%rip), %rax leaq -14(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -112(%rbp,%rax,8), %rsi movq -104(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -96(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -80(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -72(%rbp,%rax,8), %r9 movq -64(%rbp,%rax,8), %r10 movq -56(%rbp,%rax,8), %r11 movq %r14, %r8 movq -48(%rbp,%rax,8), %r14 movq %r12, %rdi movq -40(%rbp,%rax,8), %r12 movq %r13, %rdx movq -32(%rbp,%rax,8), %r13 movq -24(%rbp,%rax,8), %rbx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 56(%rsp) movq %rcx, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %rdx, %r13 movq %r12, 24(%rsp) movq %rdi, %r12 movq %r14, 16(%rsp) movq %r8, %r14 movq %r11, 8(%rsp) movq %r10, (%rsp) xorl %eax, %eax movq %rsi, %rdi movq 208(%rsp), %rsi movq 168(%rsp), %rdx movq 160(%rsp), %r8 L00004796: movq 200(%rsp), %rcx call *16(%r15) L000047A2: cltq jmp L00004E5E L000047A9: movq _sp(%rip), %rax leaq -15(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -120(%rbp,%rax,8), %rdi movq -112(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -104(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -96(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -80(%rbp,%rax,8), %rcx movq %rcx, 152(%rsp) movq -72(%rbp,%rax,8), %r10 movq -64(%rbp,%rax,8), %r11 movq %r14, %r9 movq -56(%rbp,%rax,8), %r14 movq %r12, %r8 movq -48(%rbp,%rax,8), %r12 movq %r13, %rsi movq -40(%rbp,%rax,8), %r13 movq -32(%rbp,%rax,8), %rbx movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 64(%rsp) movq %rcx, 56(%rsp) movq %rdx, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %rsi, %r13 movq %r12, 24(%rsp) movq %r8, %r12 movq %r14, 16(%rsp) movq %r9, %r14 movq %r11, 8(%rsp) movq %r10, (%rsp) xorl %eax, %eax jmp L00004CBF L0000487A: movq _sp(%rip), %rax leaq -16(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -128(%rbp,%rax,8), %r8 movq -120(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -112(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -104(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -96(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 152(%rsp) movq -80(%rbp,%rax,8), %rcx movq %rcx, 144(%rsp) movq -72(%rbp,%rax,8), %r11 movq %r14, %r10 movq -64(%rbp,%rax,8), %r14 movq %r12, %r9 movq -56(%rbp,%rax,8), %r12 movq %r13, %rdi movq -48(%rbp,%rax,8), %r13 movq -40(%rbp,%rax,8), %rbx movq -32(%rbp,%rax,8), %rsi movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 72(%rsp) movq %rcx, 64(%rsp) movq %rdx, 56(%rsp) movq %rsi, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %rdi, %r13 movq %r12, 24(%rsp) movq %r9, %r12 movq %r14, 16(%rsp) movq %r10, %r14 movq %r11, 8(%rsp) movq 144(%rsp), %rax movq %rax, (%rsp) xorl %eax, %eax movq %r8, %rdi jmp L00004CBF L00004968: movq _sp(%rip), %rax leaq -17(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -136(%rbp,%rax,8), %r9 movq -128(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -120(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -112(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -104(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -96(%rbp,%rax,8), %rcx movq %rcx, 152(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 144(%rsp) movq -80(%rbp,%rax,8), %rcx movq %rcx, 136(%rsp) movq %r14, %r11 movq -72(%rbp,%rax,8), %r14 movq %r12, %r10 movq -64(%rbp,%rax,8), %r12 movq %r13, %r8 movq -56(%rbp,%rax,8), %r13 movq -48(%rbp,%rax,8), %rbx movq -40(%rbp,%rax,8), %rdi movq -32(%rbp,%rax,8), %rsi movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 80(%rsp) movq %rcx, 72(%rsp) movq %rdx, 64(%rsp) movq %rsi, 56(%rsp) movq %rdi, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %r8, %r13 movq %r12, 24(%rsp) movq %r10, %r12 movq %r14, 16(%rsp) movq %r11, %r14 movq 136(%rsp), %rax movq %rax, 8(%rsp) movq 144(%rsp), %rax movq %rax, (%rsp) xorl %eax, %eax movq %r9, %rdi jmp L00004CBF L00004A73: movq _sp(%rip), %rax leaq -18(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -144(%rbp,%rax,8), %r10 movq -136(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -128(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -120(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -112(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -104(%rbp,%rax,8), %rcx movq %rcx, 152(%rsp) movq -96(%rbp,%rax,8), %rcx movq %rcx, 144(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 136(%rsp) movq -80(%rbp,%rax,8), %r14 movq %r12, %r11 movq -72(%rbp,%rax,8), %r12 movq %r13, %r9 movq -64(%rbp,%rax,8), %r13 movq -56(%rbp,%rax,8), %rbx movq -48(%rbp,%rax,8), %r8 movq -40(%rbp,%rax,8), %rdi movq -32(%rbp,%rax,8), %rsi movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 88(%rsp) movq %rcx, 80(%rsp) movq %rdx, 72(%rsp) movq %rsi, 64(%rsp) movq %rdi, 56(%rsp) movq %r8, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %r9, %r13 movq %r12, 24(%rsp) movq %r11, %r12 movq %r14, 16(%rsp) movq 240(%rsp), %r14 movq 136(%rsp), %rax movq %rax, 8(%rsp) movq 144(%rsp), %rax movq %rax, (%rsp) xorl %eax, %eax movq %r10, %rdi jmp L00004CBF L00004B8D: movq _sp(%rip), %rax leaq -19(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -152(%rbp,%rax,8), %r11 movq -144(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -136(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -128(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -120(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -112(%rbp,%rax,8), %rcx movq %rcx, 152(%rsp) movq -104(%rbp,%rax,8), %rcx movq %rcx, 144(%rsp) movq -96(%rbp,%rax,8), %rcx movq %rcx, 136(%rsp) movq -88(%rbp,%rax,8), %rcx movq %rcx, 128(%rsp) movq %r12, %r14 movq -80(%rbp,%rax,8), %r12 movq %r13, %r10 movq -72(%rbp,%rax,8), %r13 movq -64(%rbp,%rax,8), %rbx movq -56(%rbp,%rax,8), %r9 movq -48(%rbp,%rax,8), %r8 movq -40(%rbp,%rax,8), %rdi movq -32(%rbp,%rax,8), %rsi movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 96(%rsp) movq %rcx, 88(%rsp) movq %rdx, 80(%rsp) movq %rsi, 72(%rsp) movq %rdi, 64(%rsp) movq %r8, 56(%rsp) movq %r9, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %r10, %r13 movq %r12, 24(%rsp) movq %r14, %r12 movq 128(%rsp), %rax movq %rax, 16(%rsp) movq 240(%rsp), %r14 movq 136(%rsp), %rax movq %rax, 8(%rsp) movq 144(%rsp), %rax movq %rax, (%rsp) xorl %eax, %eax movq %r11, %rdi L00004CBF: movq 200(%rsp), %rsi movq 160(%rsp), %r8 movq 152(%rsp), %r9 movq 208(%rsp), %rdx movq 168(%rsp), %rcx call *16(%r15) L00004CEB: cltq jmp L00004E5E L00004CF2: movq _sp(%rip), %rax leaq -20(%rax), %rcx movq %rcx, _sp(%rip) movq _st(%rip), %rbp movq -160(%rbp,%rax,8), %rcx movq %rcx, 208(%rsp) movq -152(%rbp,%rax,8), %rcx movq %rcx, 168(%rsp) movq -144(%rbp,%rax,8), %rcx movq %rcx, 200(%rsp) movq -136(%rbp,%rax,8), %rcx movq %rcx, 160(%rsp) movq -128(%rbp,%rax,8), %rcx movq %rcx, 152(%rsp) movq -120(%rbp,%rax,8), %rcx movq %rcx, 144(%rsp) movq -112(%rbp,%rax,8), %rcx movq %rcx, 136(%rsp) movq -104(%rbp,%rax,8), %rcx movq %rcx, 128(%rsp) movq -96(%rbp,%rax,8), %r14 movq -88(%rbp,%rax,8), %r12 movq %r13, %r11 movq -80(%rbp,%rax,8), %r13 movq -72(%rbp,%rax,8), %rbx movq -64(%rbp,%rax,8), %r10 movq -56(%rbp,%rax,8), %r9 movq -48(%rbp,%rax,8), %r8 movq -40(%rbp,%rax,8), %rdi movq -32(%rbp,%rax,8), %rsi movq -24(%rbp,%rax,8), %rdx movq -16(%rbp,%rax,8), %rcx movq -8(%rbp,%rax,8), %rax movq %rax, 104(%rsp) movq %rcx, 96(%rsp) movq %rdx, 88(%rsp) movq %rsi, 80(%rsp) movq %rdi, 72(%rsp) movq %r8, 64(%rsp) movq %r9, 56(%rsp) movq %r10, 48(%rsp) movq %rbx, 40(%rsp) movq %r13, 32(%rsp) movq %r11, %r13 movq %r12, 24(%rsp) movq 256(%rsp), %r12 movq %r14, 16(%rsp) movq 240(%rsp), %r14 movq 128(%rsp), %rax movq %rax, 8(%rsp) movq 136(%rsp), %rax movq %rax, (%rsp) xorl %eax, %eax movq 208(%rsp), %rdi movq 168(%rsp), %rsi movq 152(%rsp), %r8 movq 144(%rsp), %r9 movq 200(%rsp), %rdx movq 160(%rsp), %rcx call *16(%r15) L00004E5C: cltq L00004E5E: movq _sp(%rip), %rcx leaq 1(%rcx), %rdx movq %rdx, _sp(%rip) movq _st(%rip), %rdx movq %rax, (%rdx,%rcx,8) .align 4, 0x90 L00004E80: movq 288(%rsp), %rax incq %rax movq %rax, 288(%rsp) cmpq %r12, %rax jl L000013E0 L00004E9C: jmp L00004ECF L00004E9E: leaq LC00005686(%rip), %rsi movl $7, %edi xorl %eax, %eax call _pari_err L00004EB1: movq 176(%rsp), %rcx movq 184(%rsp), %rax movq %rax, _sp(%rip) movq %rcx, _rp(%rip) L00004ECF: decq _s_trace+8(%rip) xorl %eax, %eax movq 248(%rsp), %rdi movq 232(%rsp), %rsi call _restore_vars L00004EED: movq 216(%rsp), %rax movq 264(%rsp), %rdi testq (%rdi), %rax je L00004F07 L00004F02: call _gunclone L00004F07: addq $296, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp ret L00004F19: .align 4, 0x90 # ---------------------- L00004F1C: .long L000014F9-L00004F1C .long L00001439-L00004F1C .long L00001448-L00004F1C .long L00001459-L00004F1C .long L0000147D-L00004F1C .long L000014ED-L00004F1C .long L0000151B-L00004F1C .long L00001527-L00004F1C .long L000015A3-L00004F1C .long L000015BD-L00004F1C .long L00001618-L00004F1C .long L0000163B-L00004F1C .long L00001650-L00004F1C .long L00001691-L00004F1C .long L000016A0-L00004F1C .long L000016AF-L00004F1C .long L00001712-L00004F1C .long L000018E9-L00004F1C .long L00001973-L00004F1C .long L00001B0E-L00004F1C .long L00001B7F-L00004F1C .long L00001C27-L00004F1C .long L00001CB8-L00004F1C .long L00001DED-L00004F1C .long L00001E12-L00004F1C .long L00001E9F-L00004F1C .long L00001F2C-L00004F1C .long L00001FFC-L00004F1C .long L000020AC-L00004F1C .long L00002249-L00004F1C .long L00002267-L00004F1C .long L00002290-L00004F1C .long L000022BC-L00004F1C .long L000022E7-L00004F1C .long L00002310-L00004F1C .long L00002419-L00004F1C .long L0000249B-L00004F1C .long L00002583-L00004F1C .long L00002596-L00004F1C .long L000025CB-L00004F1C .long L000025F6-L00004F1C .long L00002636-L00004F1C .long L00002652-L00004F1C .long L0000267F-L00004F1C .long L000026C9-L00004F1C .long L0000270D-L00004F1C .long L0000278B-L00004F1C .long L000027DB-L00004F1C .long L0000285B-L00004F1C .long L000028DB-L00004F1C .long L00002941-L00004F1C .long L00002998-L00004F1C .long L000029C6-L00004F1C .long L00002A91-L00004F1C .long L00002AA0-L00004F1C .long L00002C85-L00004F1C .long L00002C9E-L00004F1C # ---------------------- L00005000: .long L00002305-L00005000 .long L000005F9-L00005000 .long L00000622-L00005000 .long L00000650-L00005000 .long L00000683-L00005000 .long L000006BB-L00005000 .long L000006F8-L00005000 .long L00000734-L00005000 .long L00000779-L00005000 .long L000007C8-L00005000 .long L0000081A-L00005000 .long L00000883-L00005000 .long L00000906-L00005000 .long L000009B5-L00005000 .long L00000A75-L00005000 .long L00000B5B-L00005000 .long L00000C2C-L00005000 .long L00000D1A-L00005000 .long L00000E25-L00005000 .long L00000F3F-L00005000 .long L000010A2-L00005000 # ---------------------- L00005054: .long L000022DA-L00005054 .long L00004237-L00005054 .long L00004262-L00005054 .long L00004292-L00005054 .long L000042C7-L00005054 .long L00004301-L00005054 .long L00004340-L00005054 .long L0000437C-L00005054 .long L000043C1-L00005054 .long L00004410-L00005054 .long L00004462-L00005054 .long L000044CD-L00005054 .long L00004550-L00005054 .long L00004601-L00005054 .long L000046C1-L00005054 .long L000047A9-L00005054 .long L0000487A-L00005054 .long L00004968-L00005054 .long L00004A73-L00005054 .long L00004B8D-L00005054 .long L00004CF2-L00005054 # ---------------------- L000050A8: .long L00002285-L000050A8 .long L000033CB-L000050A8 .long L000033F4-L000050A8 .long L00003422-L000050A8 .long L00003455-L000050A8 .long L0000348D-L000050A8 .long L000034CA-L000050A8 .long L00003506-L000050A8 .long L0000354B-L000050A8 .long L0000359A-L000050A8 .long L000035EC-L000050A8 .long L00003655-L000050A8 .long L000036D8-L000050A8 .long L00003787-L000050A8 .long L00003847-L000050A8 .long L0000392D-L000050A8 .long L000039FE-L000050A8 .long L00003AEC-L000050A8 .long L00003BF7-L000050A8 .long L00003D11-L000050A8 .long L00003E74-L000050A8 # ---------------------- L000050FC: .long L00002285-L000050FC .long L000033CB-L000050FC .long L000033F4-L000050FC .long L00003422-L000050FC .long L00003455-L000050FC .long L0000348D-L000050FC .long L000034CA-L000050FC .long L00003506-L000050FC .long L0000354B-L000050FC .long L0000359A-L000050FC .long L000035EC-L000050FC .long L00003655-L000050FC .long L000036D8-L000050FC .long L00003787-L000050FC .long L00003847-L000050FC .long L0000392D-L000050FC .long L000039FE-L000050FC .long L00003AEC-L000050FC .long L00003BF7-L000050FC .long L00003D11-L000050FC .long L00003E74-L000050FC _shallowcopy: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $56, %rsp movq %rdi, 48(%rsp) movq $72057594037927935, %r13 movq (%rdi), %rbx movq %rbx, %r14 andq %r13, %r14 movq %r14, 16(%rsp) movq _avma@GOTPCREL(%rip), %r15 movq (%r15), %rcx movq %rcx, 24(%rsp) leaq 0(,%r14,8), %rax movq %rcx, %rbp subq %rax, %rbp movq _bot@GOTPCREL(%rip), %r9 movq %rcx, %rax subq (%r9), %rax shrq $3, %rax movq %rbx, %rcx shrq $57, %rcx cmpq $19, %rcx jne L00005432 L000051BA: cmpq %r14, %rax jae L000051D2 L000051BF: movl $14, %edi xorl %eax, %eax call _pari_err L000051CB: movq _bot@GOTPCREL(%rip), %r9 L000051D2: movq %r15, %r8 movq %rbp, (%r8) movq 48(%rsp), %rax movq (%rax), %rax movq $-72057594037927937, %rcx andq %rcx, %rax movq %rax, (%rbp) movq %rbp, 8(%rsp) cmpq $2, %r14 jb L000055A8 L00005200: movdqa LC000055D0(%rip), %xmm2 movq %r14, %rdi .align 4, 0x90 L00005210: movq 48(%rsp), %rax movq -8(%rax,%rdi,8), %r12 movq (%r12), %rdx movq %rdx, %r15 andq %r13, %r15 movq (%r8), %rbp leaq 0(,%r15,8), %rax movq %rbp, %rsi subq %rax, %rsi movq %rbp, %rax subq (%r9), %rax shrq $3, %rax cmpq %r15, %rax jae L0000528E L00005244: movq %rdi, 32(%rsp) movl $14, %edi xorl %eax, %eax movq %r9, %rbx movq %rsi, 40(%rsp) movq %rdx, %r13 call _pari_err L00005260: movq %r13, %rdx movq 40(%rsp), %rsi movq 32(%rsp), %rdi movdqa LC000055D0(%rip), %xmm2 movq %rbx, %r9 movq $72057594037927935, %r13 movq 16(%rsp), %r14 movq _avma@GOTPCREL(%rip), %r8 L0000528E: decq %rdi movq %rsi, (%r8) movq (%r12), %rax movq $-72057594037927937, %rcx andq %rcx, %rax movq %rax, (%rsi) cmpq $2, %r15 jb L00005414 L000052B2: movq %rdx, %rcx andq %r13, %rcx movq %rdx, %rbx movq %rcx, %r11 negq %r11 cmpq $-3, %r11 movq $-2, %rax cmovg %r11, %rax leaq (%rax,%rcx), %rdx cmpq $-1, %rdx je L000053EA L000052DE: movq %rsi, 40(%rsp) movq %rdi, 32(%rsp) leaq 1(%rax,%rcx), %rdx incq %rax addl %ebx, %eax movq %rbx, %rsi andq $3, %rax cmpq $-3, %r11 movq $-2, %rdi cmovg %r11, %rdi movq %rdx, %r10 subq %rax, %r10 jne L00005315 L00005310: xorl %r10d, %r10d jmp L00005347 L00005315: movq %rdi, %rax notq %rax leaq (%r12,%rax,8), %r9 leaq -8(%rbp), %rax cmpq %r9, %rax ja L00005354 L00005328: leaq -8(%r12,%rcx,8), %rax addq %rcx, %rdi notq %rdi leaq (%rbp,%rdi,8), %rdi cmpq %rdi, %rax ja L00005354 L0000533D: xorl %r10d, %r10d movq _bot@GOTPCREL(%rip), %r9 L00005347: movq 32(%rsp), %rdi movq %rsi, %rbx jmp L000053E0 L00005354: movq %r15, %rax subq %r10, %rax movq %rax, (%rsp) cmpq $-3, %r11 movq $-2, %rax cmovg %r11, %rax cmpq $-2, %r11 movl $-2, %edi cmovle %edi, %r11d movq %rsi, %rdi leal 1(%rdi,%r11), %esi movq %rdi, %rbx andq $3, %rsi subq %rax, %rsi decq %rsi movq _bot@GOTPCREL(%rip), %r9 .align 4, 0x90 L000053A0: movd %rcx, %xmm0 pshufd $68, %xmm0, %xmm0 paddq %xmm2, %xmm0 movd %xmm0, %rax movdqu -8(%r12,%rax,8), %xmm0 movups -24(%r12,%rax,8), %xmm1 subq %r15, %rax movdqu %xmm0, -8(%rbp,%rax,8) movups %xmm1, -24(%rbp,%rax,8) addq $-4, %rcx cmpq %rcx, %rsi jne L000053A0 L000053D7: movq (%rsp), %r15 movq 32(%rsp), %rdi L000053E0: cmpq %r10, %rdx movq 40(%rsp), %rsi je L00005414 L000053EA: andq %r13, %rbx shlq $3, %rbx subq %rbx, %rbp addq $-8, %rbp .align 4, 0x90 L00005400: movq -8(%r12,%r15,8), %rax movq %rax, (%rbp,%r15,8) leaq -1(%r15), %r15 cmpq $1, %r15 jg L00005400 L00005414: movq %rdi, %rax subq %r14, %rax movq 24(%rsp), %rcx movq %rsi, (%rcx,%rax,8) cmpq $1, %rdi jg L00005210 L0000542D: jmp L000055A8 L00005432: cmpq %r14, %rax jae L00005443 L00005437: movl $14, %edi xorl %eax, %eax call _pari_err L00005443: movq %rbp, (%r15) movq $-72057594037927937, %rax movq 48(%rsp), %rcx andq (%rcx), %rax movq %rax, (%rbp) movq %rbp, 8(%rsp) cmpq $2, %r14 jb L000055A8 L0000546B: andq %rbx, %r13 movq %r13, %rdx negq %rdx cmpq $-3, %rdx movq $-2, %rsi movq $-2, %rax cmovg %rdx, %rax addq %r13, %rax cmpq $-1, %rax je L0000556B L00005497: incq %rax cmpq $-3, %rdx cmovg %rdx, %rsi xorl %edi, %edi movq %rax, %r9 andq $-4, %r9 je L00005566 L000054B1: movq %rsi, %rdi notq %rdi movq 48(%rsp), %rcx leaq (%rcx,%rdi,8), %rbp movq 24(%rsp), %rcx leaq -8(%rcx), %rcx xorl %edi, %edi cmpq %rbp, %rcx ja L000054EF L000054D0: movq 48(%rsp), %rcx leaq -8(%rcx,%r13,8), %rcx addq %r13, %rsi notq %rsi movq 24(%rsp), %rbp leaq (%rbp,%rsi,8), %rsi cmpq %rsi, %rcx jbe L00005566 L000054EF: movq %r14, %rsi subq %r9, %rsi cmpq $-3, %rdx movq $-2, %rcx cmovg %rdx, %rcx leaq 1(%rcx,%r13), %rdx andq $-4, %rdx movdqa LC000055D0(%rip), %xmm0 .align 4, 0x90 L00005520: movd %r13, %xmm1 pshufd $68, %xmm1, %xmm1 paddq %xmm0, %xmm1 movd %xmm1, %rcx movq 48(%rsp), %rdi movups -8(%rdi,%rcx,8), %xmm1 movdqu -24(%rdi,%rcx,8), %xmm2 subq %r14, %rcx movq 24(%rsp), %rdi movups %xmm1, -8(%rdi,%rcx,8) movdqu %xmm2, -24(%rdi,%rcx,8) addq $-4, %r13 addq $-4, %rdx jne L00005520 L00005560: movq %rsi, %r14 movq %r9, %rdi L00005566: cmpq %rdi, %rax je L000055A8 L0000556B: notq %rbx movq $2233785415175766016, %rax orq %rbx, %rax movq 24(%rsp), %rcx leaq (%rcx,%rax,8), %rax .align 4, 0x90 L00005590: movq 48(%rsp), %rcx movq -8(%rcx,%r14,8), %rcx movq %rcx, (%rax,%r14,8) leaq -1(%r14), %r14 cmpq $1, %r14 jg L00005590 L000055A8: movq 8(%rsp), %rax addq $56, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp ret # ---------------------- .section __TEXT,__literal16,16byte_literals .align 4 LC000055C0: .long -1 .long -1 .long -2 .long -1 .align 4 LC000055D0: .long -1 .long -1 .long -2 .long -1 # ---------------------- .section __TEXT,__cstring,cstring_literals LC000055E0: .string "closure_eval, stack underflow" LC000055FE: .string "eval: recovering %ld bytes" LC00005619: .string "_[_]: not a vector" LC0000562C: .string "_[_,_]: not a matrix" LC00005641: .string "_[,_]: not a matrix" LC00005655: .string "_[_,]: not a matrix" LC00005669: .string "a 0x0 matrix has no elements" LC00005686: .string "functions with more than 20 parameters" LC000056AD: .string "too many parameters in user-defined function call" LC000056DF: .string "deep recursion" LC000056EE: .string "missing mandatory argument" LC00005709: .string "argument type not implemented" LC00005727: .string "lg()" LC0000572C: .string "gtos expected an integer, got '%Ps'" LC00005750: .string "t_INT-->long assignment" # ---------------------- .zerofill __DATA,__bss,_sp,8,3 # ---------------------- .zerofill __DATA,__bss,_s_st,32,3 # ---------------------- .zerofill __DATA,__bss,_st,8,3 # ---------------------- .zerofill __DATA,__bss,_rp,8,3 # ---------------------- .zerofill __DATA,__bss,_s_ptrs,32,3 # ---------------------- .zerofill __DATA,__bss,_ptrs,8,3 # ---------------------- .zerofill __DATA,__bss,_s_var,32,4 # ---------------------- .zerofill __DATA,__bss,_var,8,3 # ---------------------- .zerofill __DATA,__bss,_s_lvars,32,3 # ---------------------- .zerofill __DATA,__bss,_lvars,8,3 # ---------------------- .zerofill __DATA,__bss,_s_trace,32,5 # ---------------------- .zerofill __DATA,__bss,_trace,8,3 # ---------------------- .subsections_via_symbols
Light.agda
zamfofex/lightlib
1
8498
<gh_stars>1-10 {-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} module Light where open import Light.Library public module Implementation where open import Light.Implementation public
exampl01/resdlg2/resdlg2.asm
AlexRogalskiy/Masm
0
82725
<reponame>AlexRogalskiy/Masm ; ######################################################################### .386 .model flat, stdcall option casemap :none ; case sensitive ; ######################################################################### include \masm32\include\windows.inc include \masm32\include\user32.inc include \masm32\include\kernel32.inc include \masm32\include\gdi32.inc include \masm32\include\masm32.inc includelib \masm32\lib\user32.lib includelib \masm32\lib\kernel32.lib includelib \masm32\lib\gdi32.lib includelib \masm32\lib\masm32.lib ; ######################################################################### ;============= ; Local macros ;============= szText MACRO Name, Text:VARARG LOCAL lbl jmp lbl Name db Text,0 lbl: ENDM ;================= ; Local prototypes ;================= WndProc PROTO :DWORD,:DWORD,:DWORD,:DWORD .data hEdit1 dd 0 hEdit2 dd 0 hEdit3 dd 0 hEdit4 dd 0 hButn1 dd 0 hButn2 dd 0 hInstance dd 0 hIconImage dd 0 hIcon dd 0 dlgname db "TESTWIN",0 ; ######################################################################### .code start: invoke GetModuleHandle, NULL mov hInstance, eax ; ------------------------------------------- ; Call the dialog box stored in resource file ; ------------------------------------------- invoke DialogBoxParam,hInstance,ADDR dlgname,0,ADDR WndProc,0 invoke ExitProcess,eax ; ######################################################################### WndProc proc hWin :DWORD, uMsg :DWORD, wParam :DWORD, lParam :DWORD LOCAL Ps :PAINTSTRUCT .if uMsg == WM_INITDIALOG szText dlgTitle," Demo dialog box" invoke SendMessage,hWin,WM_SETTEXT,0,ADDR dlgTitle invoke LoadIcon,hInstance,200 mov hIcon, eax invoke SendMessage,hWin,WM_SETICON,1,hIcon invoke GetDlgItem,hWin,100 mov hEdit1, eax invoke GetDlgItem,hWin,101 mov hEdit2, eax invoke GetDlgItem,hWin,102 mov hEdit3, eax invoke GetDlgItem,hWin,103 mov hEdit4, eax invoke GetDlgItem,hWin,1000 mov hButn1, eax invoke GetDlgItem,hWin,1001 mov hButn2, eax xor eax, eax ret .elseif uMsg == WM_COMMAND .if wParam == 1000 szText calcMsg,"Calculate Button" invoke MessageBox,hWin,ADDR calcMsg, ADDR dlgTitle,MB_OK .elseif wParam == 1001 szText clearMsg,"Clear Button" invoke MessageBox,hWin,ADDR clearMsg, ADDR dlgTitle,MB_OK .endif .elseif uMsg == WM_CLOSE invoke EndDialog,hWin,0 .elseif uMsg == WM_PAINT invoke BeginPaint,hWin,ADDR Ps ; ---------------------------------------- ; The following function are in MASM32.LIB ; ---------------------------------------- invoke FrameGrp,hButn1,hButn2,6,1,0 invoke FrameGrp,hEdit1,hEdit3,4,1,0 invoke FrameCtrl,hEdit4,4,1,0 invoke FrameWindow,hWin,0,1,1 invoke FrameWindow,hWin,1,1,0 invoke EndPaint,hWin,ADDR Ps xor eax, eax ret .endif xor eax, eax ; this must be here in NT4 ret WndProc endp ; ######################################################################## end start
Ejercicio7.asm
CrysthelAparicio/TareaASM
1
83065
<filename>Ejercicio7.asm<gh_stars>1-10 ; ######################################################################### .386 .model flat, stdcall option casemap :none ; case sensitive ; ######################################################################### include \masm32\include\windows.inc include \masm32\include\user32.inc include \masm32\include\kernel32.inc includelib \masm32\lib\user32.lib includelib \masm32\lib\kernel32.lib ; ######################################################################### .data Titulo db "Primo",0 m_inicio1 db "El numero " numero1 db " " Mensaje1 db " es primo ",0 m_inicio2 db "El numero " numero2 db " " Mensaje2 db " no es primo",0 .code include primo.inc include bintotext.inc start: mov ax,48 call primo cmp cx,1 je es_primo jne no_es_primo es_primo: movzx esi,ax mov edi,offset numero1 call bintotxt push MB_OK push offset Titulo push offset m_inicio1 jmp final no_es_primo: movzx esi,ax mov edi,offset numero2 call bintotxt push MB_OK push offset Titulo push offset m_inicio2 final: push 0 call MessageBox push 0 call ExitProcess end start ; -------------------------------------------------------- ; The following are the same function calls using MASM ; "invoke" syntax. It is clearer code, it is type checked ; against a function prototype and it is less error prone. ; -------------------------------------------------------- ; invoke MessageBox,0,ADDR szMsg,ADDR szDlgTitle,MB_OK ; invoke ExitProcess,0
src/slots/bruteforce.agda
semenov-vladyslav/slots-agda
0
336
<gh_stars>0 open import slots.imports open import slots.defs module slots.bruteforce {cfg : config}(g : game cfg) where open config cfg open game g total : ℕ total = V.foldl _ (λ i r → i * L.length r) 1 reels lineWin : Line → Win/Bet lineWin [] = 0 lineWin (f₀ ∷ fs) = lineWin′ w ws fs where winLine = V.lookup f₀ winTable w = V.head winLine ws = V.tail winLine lineWin′ : ∀ {n} → Win/Bet → Vec Win/Bet n → Vec Fruit n → Win/Bet lineWin′ w [] [] = w lineWin′ w (w′ ∷ ws) (f ∷ fs) with f₀ F.≟ f ... | yes p = lineWin′ w′ ws fs ... | no ¬p = w allLines : List Line allLines = V.foldr (List ∘ Vec Fruit) (λ r → L.concatMap λ l → L.map (_∷ l) r) ([] ∷ []) reels win : ℕ win = L.sum ∘ L.map lineWin $ allLines rtp : ℕ × ℕ rtp = win , total
dino/lcs/enemy/6D.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
6
83641
<gh_stars>1-10 copyright zengfr site:http://github.com/zengfr/romhack 033D98 add.b D0, ($24,A6) 033D9C andi.b #$1, ($24,A6) [enemy+ 4, enemy+44, enemy+64, enemy+A4] 033DA2 jsr $12cb4.l [enemy+ 4, enemy+44, enemy+64, enemy+A4] 0342C8 beq $342cc [enemy+ D, enemy+6D] 0355F6 bne $35634 [enemy+ 9, enemy+29, enemy+49, enemy+69, enemy+89] 0355FE move.b #$0, ($ad,A6) [enemy+69] 035604 jsr $119c.l 03563C bne $35634 [enemy+ 9, enemy+29, enemy+49, enemy+69, enemy+89, enemy+A9] 035644 move.b #$1, ($ad,A6) [enemy+ 9, enemy+29, enemy+49, enemy+69, enemy+89, enemy+A9] 03564A jsr $119c.l [enemy+ D, enemy+2D, enemy+4D, enemy+6D, enemy+8D, enemy+AD] 03C3A2 tst.b ($2d,A6) [enemy+ 0, enemy+20, enemy+40, enemy+60, enemy+80, enemy+A0] 03C3AC jsr $a062.l 040316 move.w #$50, ($84,A6) [enemy+ 3, enemy+23, enemy+43, enemy+63, enemy+83, enemy+A3] 04031C move.l #$6df2a, ($40,A6) [enemy+ 4, enemy+24, enemy+44, enemy+64, enemy+84, enemy+A4] 040324 move.b #$1, ($2d,A6) [enemy+ 0, enemy+ 2, enemy+20, enemy+22, enemy+40, enemy+42, enemy+60, enemy+62, enemy+80, enemy+82, enemy+A0, enemy+A2] 04032A moveq #$1, D0 [enemy+ D, enemy+2D, enemy+4D, enemy+6D, enemy+8D, enemy+AD] 040624 move.b #$0, ($ad,A6) [enemy+ C, enemy+2C, enemy+4C, enemy+6C, enemy+8C, enemy+AC] 04062A rts 040630 beq $406be [enemy+98, enemy+B8] 040A96 rts [enemy+ D, enemy+2D, enemy+4D, enemy+6D, enemy+8D, enemy+AD] 040B24 jmp $32b68.l [enemy+ D, enemy+2D, enemy+4D, enemy+6D, enemy+8D, enemy+AD] 040BB6 jmp $32b68.l [enemy+ D, enemy+2D, enemy+4D, enemy+6D, enemy+8D, enemy+AD] 040F5E move.b #$0, ($ac,A6) [enemy+ D, enemy+2D, enemy+4D, enemy+6D, enemy+8D] 040F64 rts 04380E tst.b ($2d,A6) [base+502] 043818 bsr $4382a 048418 move.w D0, ($aa,A6) 04841C move.b D0, ($ac,A6) 048420 move.b D0, ($ad,A6) 048424 move.b D0, ($bd,A6) 048428 move.b #$ff, ($c0,A6) 04842E jsr $3140c.l [enemy+ 0, enemy+80] 04880C bra $49334 [enemy+6D, enemy+AD] 048814 bcc $48860 [enemy+B4] 048C6E move.b #$3, ($ad,A6) [enemy+6E, enemy+AE] 048C74 tst.b ($24,A6) [enemy+6D, enemy+AD] 04DF8A move.b #$1, ($2f,A6) 04DF90 jsr $121e.l [enemy+2F] 05AA9E move.w #$70, ($84,A6) [enemy+ 3, enemy+23, enemy+43, enemy+63, enemy+83, enemy+A3] 05AAA4 move.l #$6da40, ($40,A6) [enemy+ 4, enemy+24, enemy+44, enemy+64, enemy+84, enemy+A4] 05AAAC bra $5aac4 [enemy+ 0, enemy+ 2, enemy+20, enemy+22, enemy+40, enemy+42, enemy+60, enemy+62, enemy+80, enemy+82, enemy+A0, enemy+A2] 05AACA moveq #$1e, D0 [enemy+ D, enemy+2D, enemy+4D, enemy+6D, enemy+8D, enemy+AD] copyright zengfr site:http://github.com/zengfr/romhack
programs/oeis/286/A286032.asm
neoneye/loda
22
104210
<reponame>neoneye/loda ; A286032: a(n) = a(n-1) - n*a(n-2); a(0) = a(1) = 1. ; 1,1,-1,-4,0,20,20,-120,-280,800,3600,-5200,-48400,19200,696800,408800,-10740000,-17689600,175630400,511732800,-3000875200,-13747264000,52271990400,368459062400,-886068707200,-10097545267200,12940241120000,285573963334400,-76752788025600,-8358397724723200,-6055814083955200,253054515382464000,446840566069030400,-7903958441552281600,-23096537687899315200,253542007766430540800,1085017364530805888000,-8296036922827124121600,-49526696774997747865600,274018743215260092876800,2255086614215170007500800,-8979681857610493800448000,-103693319654647634115481600,282433000222603599303782400,4844939065027099500384972800,-7864545944990062468285235200,-230731742936236639485993984000,138901916478296296523412070400,11214025577417654991851123302400,4407831669981136462203931852800,-556293447200901613130352233267200,-781092862369939572702752757760000,28146166392076944310075563372134400,69544088097683741663321459533414400 mov $1,1 lpb $0 mul $1,$0 sub $0,1 add $2,$1 sub $1,$2 add $1,1 lpe mov $0,$1
sound/musicasm/Miniboss.asm
NatsumiFox/Sonic-3-93-Nov-03
7
167156
<filename>sound/musicasm/Miniboss.asm Miniboss_Header: sHeaderInit ; Z80 offset is $8412 sHeaderPatch Miniboss_Patches sHeaderCh $06, $03 sHeaderTempo $01, $00 sHeaderDAC Miniboss_DAC sHeaderFM Miniboss_FM1, $00, $0F sHeaderFM Miniboss_FM2, $00, $0F sHeaderFM Miniboss_FM3, $00, $0F sHeaderFM Miniboss_FM4, $00, $0F sHeaderFM Miniboss_FM5, $00, $11 sHeaderPSG Miniboss_PSG1, $E8, $02, $00, v00 sHeaderPSG Miniboss_PSG2, $E8, $02, $00, v00 sHeaderPSG Miniboss_PSG3, $E8, $02, $00, v00 Miniboss_FM1: sPatFM $00 ssModZ80 $0D, $01, $02, $06 sPan spCenter dc.b nE5, $06, nE5, nE5, nRst, $12, nE5, $06 dc.b nE5, nE5, nRst, $2A Miniboss_Loop1: sPatFM $00 dc.b nE5, $54, nF5, $60, nFs5, nF5, $6C sLoop $00, $02, Miniboss_Loop1 sPatFM $03 dc.b nRst, $18, nA4, nG5, nF5, $0C, nE5, $24 dc.b nD5, $18, nF5, nE5, $0C, nC5, $3C, nRst dc.b $0C, nD5, nC5, nE5, $6C, nRst, $18, nA4 dc.b nG5, nF5, $0C, nE5, $24, nD5, $18, nF5 dc.b nE5, $0C, nC5, $60, nA5, $54, nRst, $18 sJump Miniboss_Loop1 dc.b $F2 ; Unused Miniboss_FM2: sPatFM $01 ssModZ80 $0D, $01, $02, $06 sPan spCenter dc.b nE2, $06, nE2, nE2, $0C, nRst, nE2, $06 dc.b nE2, nE2, $0C, nRst, $24 Miniboss_Loop2: sPatFM $01 dc.b nA2, $06, nA2, nA3, nA3, nA2, nA2, nA3 dc.b nA3, nA2, nA2, nA3, nA3, nA2, nA2, nA3 dc.b nA3 sLoop $00, $08, Miniboss_Loop2 dc.b nF2, $06, nF2, nF3, nF3, nF2, nF2, nF3 dc.b nF3, nF2, nF2, nF3, nF3, nF2, nF2, nF3 dc.b nF3, nG2, nG2, nG3, nG3, nG2, nG2, nG3 dc.b nG3, nG2, nG2, nG3, nG3, nG2, nG2, nG3 dc.b nG3, nA2, nA2, nA3, nA3, nA2, nA2, nA3 dc.b nA3, nA2, nA2, nA3, nA3, nA2, nA2, nA3 dc.b nA3, nA2, nA2, nA3, nA3, nA2, nA2, nA3 dc.b nA3, nG2, nG2, nG3, nG3, nG2, nG2, nG3 dc.b nG3, nF2, nF2, nF3, nF3, nF2, nF2, nF3 dc.b nF3, nF2, nF2, nF3, nF3, nF2, nF2, nF3 dc.b nF3, nG2, nG2, nG3, nG3, nG2, nG2, nG3 dc.b nG3, nG2, nG2, nG3, nG3, nG2, nG2, nG3 dc.b nG3, nA2, nA2, nA3, nA3, nA2, nA2, nA3 dc.b nA3, nA2, nA2, nA3, nA3, nA2, nA2, nA3 dc.b nA3, nA2, nA2, nA2, $0C, nRst, nA2, $06 dc.b nA2, nA2, $0C, nRst, $24 sJump Miniboss_Loop2 dc.b $F2 ; Unused Miniboss_FM3: sPatFM $00 ssModZ80 $0D, $01, $02, $06 sPan spRight dc.b nB4, $06, nB4, nB4, nRst, $12, nB4, $06 dc.b nB4, nB4, nRst, $2A Miniboss_Loop3: sPatFM $00 dc.b nC5, $54, nC5, $60, nC5, nC5, $6C sLoop $00, $02, Miniboss_Loop3 sPatFM $04 dc.b nC5, $54, nB4, $3C, nD5, $24, nE5, $7F dc.b sHold, nE5, $1D, nD5, $30, nC5, $54, nB4 dc.b $3C, nD5, $24, nE5, $6C, nRst, $60 sJump Miniboss_Loop3 dc.b $F2 ; Unused Miniboss_FM4: ssModZ80 $0D, $01, $02, $06 sPan spLeft dc.b nRst, $60 Miniboss_Loop4: sPatFM $02 dc.b nA4, $06, nC5, nE5, nC5 sLoop $00, $04, Miniboss_Loop4 Miniboss_Loop5: dc.b nA4, $06, nC5, nF5, nC5 sLoop $00, $04, Miniboss_Loop5 Miniboss_Loop6: dc.b nA4, $06, nC5, nFs5, nC5 sLoop $00, $04, Miniboss_Loop6 Miniboss_Loop7: dc.b nA4, $06, nC5, nF5, nC5 sLoop $00, $04, Miniboss_Loop7 Miniboss_Loop8: dc.b nA4, $06, nC5, nE5, nC5 sLoop $00, $04, Miniboss_Loop8 Miniboss_Loop9: dc.b nA4, $06, nC5, nF5, nC5 sLoop $00, $04, Miniboss_Loop9 Miniboss_Loop10: dc.b nA4, $06, nC5, nFs5, nC5 sLoop $00, $04, Miniboss_Loop10 Miniboss_Loop11: dc.b nA4, $06, nC5, nF5, nC5 sLoop $00, $04, Miniboss_Loop11 dc.b nF4, $0C, nA4, nC5, nF5, $3C, nG4, $0C dc.b nB4, nD5, nG5, $3C, nA4, $0C, nC5, nE5 dc.b nA5, $3C, nA4, $0C, nC5, nE5, nA5, nG4 dc.b nB4, nD5, nG5, nF4, nA4, nC5, nF5, $3C dc.b nG4, $0C, nB4, nD5, nG5, $3C, nA4, $0C dc.b nC5, nE5, nA5, $3C, nRst, $60 sJump Miniboss_Loop4 dc.b $F2 ; Unused Miniboss_FM5: dc.b nRst, $10 sPatFM $00 ssModZ80 $0D, $01, $02, $06 sPan spCenter saVolFM $0C dc.b nE5, $06, nE5, nE5, nRst, $12, nE5, $06 dc.b nE5, nE5, nRst, $2A saVolFM $F4 Miniboss_Loop12: sPatFM $00 dc.b nE5, $54, nF5, $60, nFs5, nF5, $6C sLoop $00, $02, Miniboss_Loop12 sPatFM $03 dc.b nRst, $18, nA4, nG5, nF5, $0C, nE5, $24 dc.b nD5, $18, nF5, nE5, $0C, nC5, $3C, nRst dc.b $0C, nD5, nC5, nE5, $6C, nRst, $18, nA4 dc.b nG5, nF5, $0C, nE5, $24, nD5, $18, nF5 dc.b nE5, $0C, nC5, $60, nA5, $54, nRst, $18 sJump Miniboss_Loop12 dc.b $F2 ; Unused Miniboss_DAC: dc.b dSnare, $06, dSnare, dSnare, $18, dSnare, $06, dSnare dc.b dSnare, $18, dSnare, $06, dSnare, dSnare, dSnare Miniboss_Loop13: dc.b dKick, $18, dKick, dKick, dKick sLoop $00, $07, Miniboss_Loop13 Miniboss_Loop14: dc.b dKick, $18, dKick, dKick, $0C, dSnare, dSnare, $06 dc.b dSnare, dSnare, $0C sLoop $00, $03, Miniboss_Loop14 Miniboss_Loop15: dc.b dKick, $0C, dKick, dSnare, dKick, dKick, $06, dKick dc.b dKick, $0C, dSnare, dKick sLoop $00, $04, Miniboss_Loop15 dc.b dKick, $0C, dKick, dSnare, dKick, dKick, $06, dKick dc.b dKick, $0C, dSnare, $06, dSnare, dSnare, dSnare, dSnare dc.b dSnare, dSnare, $18, dSnare, $06, dSnare, dSnare, $18 dc.b dSnare, $06, dSnare, dSnare, dSnare sJump Miniboss_Loop13 dc.b $F2 ; Unused Miniboss_PSG1: sStop Miniboss_PSG2: sStop dc.b $F2 ; Unused Miniboss_PSG3: sStop Miniboss_Patches: ; Patch $00 ; $3D ; $41, $10, $72, $61, $0F, $14, $53, $14 ; $04, $06, $06, $03, $00, $0F, $00, $00 ; $1F, $3F, $5F, $1F, $1A, $8A, $8A, $8A spAlgorithm $05 spFeedback $07 spDetune $04, $07, $01, $06 spMultiple $01, $02, $00, $01 spRateScale $00, $01, $00, $00 spAttackRt $0F, $13, $14, $14 spAmpMod $00, $00, $00, $00 spSustainRt $04, $06, $06, $03 spSustainLv $01, $05, $03, $01 spDecayRt $00, $00, $0F, $00 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $1A, $0A, $0A, $0A ; Patch $01 ; $08 ; $07, $70, $30, $00, $9F, $9F, $9F, $9F ; $12, $0E, $0A, $0A, $00, $04, $04, $03 ; $28, $25, $25, $25, $1F, $2B, $11, $81 spAlgorithm $00 spFeedback $01 spDetune $00, $03, $07, $00 spMultiple $07, $00, $00, $00 spRateScale $02, $02, $02, $02 spAttackRt $1F, $1F, $1F, $1F spAmpMod $00, $00, $00, $00 spSustainRt $12, $0A, $0E, $0A spSustainLv $02, $02, $02, $02 spDecayRt $00, $04, $04, $03 spReleaseRt $08, $05, $05, $05 spTotalLv $1F, $11, $2B, $01 ; Patch $02 ; $04 ; $75, $11, $31, $71, $1F, $1F, $1F, $1F ; $08, $05, $0C, $09, $00, $00, $00, $00 ; $FF, $FF, $FF, $FF, $1E, $86, $22, $8D spAlgorithm $04 spFeedback $00 spDetune $07, $03, $01, $07 spMultiple $05, $01, $01, $01 spRateScale $00, $00, $00, $00 spAttackRt $1F, $1F, $1F, $1F spAmpMod $00, $00, $00, $00 spSustainRt $08, $0C, $05, $09 spSustainLv $0F, $0F, $0F, $0F spDecayRt $00, $00, $00, $00 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $1E, $22, $06, $0D ; Patch $03 ; $29 ; $20, $31, $51, $71, $0E, $11, $12, $17 ; $00, $00, $00, $00, $08, $00, $09, $00 ; $89, $F8, $F9, $F8, $20, $20, $10, $88 spAlgorithm $01 spFeedback $05 spDetune $02, $05, $03, $07 spMultiple $00, $01, $01, $01 spRateScale $00, $00, $00, $00 spAttackRt $0E, $12, $11, $17 spAmpMod $00, $00, $00, $00 spSustainRt $00, $00, $00, $00 spSustainLv $08, $0F, $0F, $0F spDecayRt $08, $09, $00, $00 spReleaseRt $09, $09, $08, $08 spTotalLv $20, $10, $20, $08 ; Patch $04 ; $3D ; $31, $50, $21, $41, $0D, $13, $13, $14 ; $03, $01, $06, $05, $05, $01, $05, $01 ; $FF, $FF, $FF, $FF, $1D, $8A, $88, $87 spAlgorithm $05 spFeedback $07 spDetune $03, $02, $05, $04 spMultiple $01, $01, $00, $01 spRateScale $00, $00, $00, $00 spAttackRt $0D, $13, $13, $14 spAmpMod $00, $00, $00, $00 spSustainRt $03, $06, $01, $05 spSustainLv $0F, $0F, $0F, $0F spDecayRt $05, $05, $01, $01 spReleaseRt $0F, $0F, $0F, $0F spTotalLv $1D, $08, $0A, $07
programs/oeis/219/A219768.asm
jmorken/loda
1
102042
; A219768: Number of n X 3 arrays of the minimum value of corresponding elements and their horizontal or antidiagonal neighbors in a random, but sorted with lexicographically nondecreasing rows and columns, 0..1 n X 3 array. ; 3,6,14,29,56,101,171,274,419,616,876,1211,1634,2159,2801,3576,4501,5594,6874,8361,10076,12041,14279,16814,19671,22876,26456,30439,34854,39731,45101,50996,57449,64494,72166,80501,89536,99309,109859,121226,133451 mov $16,$0 mov $18,$0 add $18,1 lpb $18 clr $0,16 mov $0,$16 sub $18,1 sub $0,$18 mov $13,$0 mov $15,$0 add $15,1 lpb $15 mov $0,$13 sub $15,1 sub $0,$15 mov $9,$0 mov $11,2 lpb $11 clr $0,9 mov $0,$9 sub $11,1 add $0,$11 sub $0,1 mov $6,$0 mov $8,3 add $8,$0 mov $0,4 mov $2,$8 bin $2,$6 mov $5,$8 sub $5,6 sub $2,$5 mov $4,$2 mov $7,5 lpb $0 sub $0,$2 mov $3,2 sub $4,1 add $7,2 sub $3,$7 add $3,4 lpe add $4,3 add $3,$4 mov $1,$3 mov $12,$11 lpb $12 mov $10,$1 sub $12,1 lpe lpe lpb $9 mov $9,0 sub $10,$1 lpe mov $1,$10 sub $1,2 add $14,$1 lpe add $17,$14 lpe mov $1,$17
test/Fail/InstanceArgumentsModNotParameterised.agda
shlevy/agda
1,989
15137
<reponame>shlevy/agda module InstanceArgumentsModNotParameterised where postulate A : Set a : A record B : Set where field bA : A b : B b = record {bA = a} module C = B b open C {{...}}
oeis/350/A350395.asm
neoneye/loda-programs
11
105101
; A350395: Numbers m such that a term with the largest coefficient in Product_{k=1..m} (1 + x^k) is unique. ; Submitted by <NAME> ; 0,3,8,11,12,15,16,19,20,23,24,27,28,31,32,35,36,39,40,43,44,47,48,51,52,55,56,59,60,63,64,67,68,71,72,75,76,79,80,83,84,87,88,91,92,95,96,99,100,103,104,107,108,111,112,115,116,119,120,123,124,127,128,131,132,135,136,139,140,143,144,147,148,151,152,155,156,159,160,163,164,167,168,171,172,175,176,179,180,183,184,187,188,191,192,195,196 mov $2,$0 lpb $0 mod $0,2 add $2,2 lpe add $0,$2 add $0,$2
alloy4fun_models/trainstlt/models/6/nYBNMEmyhKjjfCDxH.als
Kaixi26/org.alloytools.alloy
0
624
open main pred idnYBNMEmyhKjjfCDxH_prop7 { (all t:Train | some (t.pos & Entry ) implies eventually some (t.pos & Exit) ) } pred __repair { idnYBNMEmyhKjjfCDxH_prop7 } check __repair { idnYBNMEmyhKjjfCDxH_prop7 <=> prop7o }
4-high/gel/source/applet/gel-applet-gui_and_sim_world.ads
charlie5/lace-alire
1
72
<reponame>charlie5/lace-alire with gel.World, gel.Camera, gel.Window; package gel.Applet.gui_and_sim_world -- -- Provides an applet configured with a single window and -- two worlds (generally a simulation world and a gui world). -- is type Item is limited new gel.Applet.item with private; type View is access all Item'Class; package Forge is function to_Applet (Name : in String; use_Window : in gel.Window.view) return Item; function new_Applet (Name : in String; use_Window : in gel.Window.view) return View; end Forge; gui_world_Id : constant gel. world_Id := 1; gui_camera_Id : constant gel.camera_Id := 1; sim_world_Id : constant gel. world_Id := 2; sim_camera_Id : constant gel.camera_Id := 1; function gui_World (Self : in Item) return gel.World .view; function gui_Camera (Self : in Item) return gel.Camera.view; function sim_World (Self : in Item) return gel.World .view; function sim_Camera (Self : in Item) return gel.Camera.view; private type Item is limited new gel.Applet.item with record null; end record; end gel.Applet.gui_and_sim_world;
programs/oeis/266/A266180.asm
karttu/loda
1
5093
; A266180: Decimal representation of the n-th iteration of the "Rule 6" elementary cellular automaton starting with a single ON (black) cell. ; 1,6,16,96,256,1536,4096,24576,65536,393216,1048576,6291456,16777216,100663296,268435456,1610612736,4294967296,25769803776,68719476736,412316860416,1099511627776,6597069766656,17592186044416,105553116266496,281474976710656,1688849860263936,4503599627370496 mov $1,4 pow $1,$0 mov $2,$0 mod $2,2 add $2,2 mul $1,$2 div $1,10 mul $1,5 add $1,1
Transynther/x86/_processed/NONE/_ht_zr_un_/i7-7700_9_0x48.log_21829_580.asm
ljhsiun2/medusa
9
93493
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r13 push %r9 push %rax push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_WC_ht+0x1ec23, %rsi lea addresses_D_ht+0xd963, %rdi sub $22376, %r13 mov $28, %rcx rep movsl nop nop nop nop nop sub $27556, %rdi lea addresses_normal_ht+0x1cd9, %r9 clflush (%r9) nop and %rcx, %rcx mov $0x6162636465666768, %rbp movq %rbp, %xmm4 movups %xmm4, (%r9) nop nop nop nop xor $40494, %r13 lea addresses_A_ht+0x1b2e3, %rsi lea addresses_D_ht+0x187d3, %rdi nop xor %rax, %rax mov $28, %rcx rep movsq nop cmp $38810, %r9 lea addresses_A_ht+0x17d23, %r13 nop nop nop nop cmp %rsi, %rsi movb (%r13), %al nop nop nop nop nop add $62882, %rax lea addresses_WT_ht+0x17523, %rax nop nop nop nop nop xor $15006, %rbp movw $0x6162, (%rax) nop nop nop nop nop xor %rcx, %rcx lea addresses_D_ht+0x22e3, %rsi lea addresses_WT_ht+0x1ba23, %rdi nop nop cmp %rbx, %rbx mov $58, %rcx rep movsw nop nop nop and %rax, %rax lea addresses_WC_ht+0x99b3, %rsi lea addresses_WC_ht+0x2f23, %rdi nop xor $35668, %r9 mov $75, %rcx rep movsb nop nop cmp %r9, %r9 pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r9 pop %r13 ret .global s_faulty_load s_faulty_load: push %r11 push %rbx push %rcx push %rdx push %rsi // Faulty Load lea addresses_WT+0x16523, %r11 cmp $56276, %rcx vmovups (%r11), %ymm1 vextracti128 $1, %ymm1, %xmm1 vpextrq $1, %xmm1, %rdx lea oracles, %rcx and $0xff, %rdx shlq $12, %rdx mov (%rcx,%rdx,1), %rdx pop %rsi pop %rdx pop %rcx pop %rbx pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 1, 'size': 16, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 6, 'same': True}, 'dst': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 11, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 9, 'size': 2, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}} {'08': 1, '72': 2, '45': 20712, '00': 92, '48': 1, '46': 1021} 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 46 45 45 46 45 45 45 45 45 45 45 45 45 45 00 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 46 46 45 45 46 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 46 45 45 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 46 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 46 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 46 45 46 45 45 45 45 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 00 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 45 45 45 45 45 46 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 46 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 45 45 45 45 45 45 */
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/addr8.adb
best08618/asylo
7
29694
<filename>gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/addr8.adb -- { dg-do compile } package body Addr8 is procedure Proc (B: Bytes) is O: Integer; for O'Address use B'Address; begin null; end; end Addr8;
test/Succeed/OpenModule.agda
shlevy/agda
1,989
2003
<reponame>shlevy/agda module OpenModule where module A where postulate X : Set -- Both open import and open module applies the directives -- to the "open" rather than to the module. open import Nat hiding (zero) renaming (Nat to N) open module B = A renaming (X to Y) Test : Set Test = Y → B.X → N → Nat.Nat zero : N zero = Nat.zero -- If the module isn't opened the directives are applied to -- the module. import Nat as N renaming (Nat to N) module C = A renaming (X to Z) Test₂ : Set Test₂ = N.N → C.Z
examples/sinatra/Prelude.agda
asr/agda-kanso
1
437
module Prelude where infixr 50 _,_ infixl 40 _◄_ infix 30 _∈_ data _×_ (A B : Set) : Set where _,_ : A -> B -> A × B data List (A : Set) : Set where ε : List A _◄_ : List A -> A -> List A data _∈_ {A : Set}(x : A) : List A -> Set where hd : forall {xs} -> x ∈ xs ◄ x tl : forall {y xs} -> x ∈ xs -> x ∈ xs ◄ y data Box {A : Set}(P : A -> Set) : List A -> Set where ⟨⟩ : Box P ε _◃_ : forall {xs x} -> Box P xs -> P x -> Box P (xs ◄ x) _!_ : {A : Set}{P : A -> Set}{xs : List A}{x : A} -> Box P xs -> x ∈ xs -> P x ⟨⟩ ! () (_ ◃ v) ! hd = v (ρ ◃ _) ! tl x = ρ ! x
test.asm
jbush001/MiteCPU
12
162537
<gh_stars>10-100 # # Sum the digits 1-8 # res result res count res scratch start: ldi 8 st count loop: ldi 0 # Clear accumulator add result add count st result # result = result + count ldi -1 add count st count # count = count - 1 bl done # if count < 0 exit loop ldi -1 # Branch unconditionally bl loop done: ldi -1 bl done # Infinite loop
programs/oeis/009/A009970.asm
neoneye/loda
22
98944
<gh_stars>10-100 ; A009970: Powers of 26. ; 1,26,676,17576,456976,11881376,308915776,8031810176,208827064576,5429503678976,141167095653376,3670344486987776,95428956661682176,2481152873203736576,64509974703297150976,1677259342285725925376,43608742899428874059776,1133827315385150725554176,29479510200013918864408576,766467265200361890474622976,19928148895209409152340197376,518131871275444637960845131776,13471428653161560586981973426176,350257144982200575261531309080576,9106685769537214956799814036094976,236773830007967588876795164938469376 mov $1,26 pow $1,$0 mov $0,$1
misc/Parallel2.agda
yurrriq/parser-combinators
7
551
-- This code is based on "Parallel Parsing Processes" by Koen -- Claessen. -- This module is a variant of Parallel in which Parser uses mixed -- induction/coinduction. module Parallel2 {Tok : Set} where open import Coinduction open import Data.Bool import Data.Bool.Properties as Bool open import Algebra open import Data.Product open import Data.Function import Data.List as List open List using (List; []; _∷_) open import Data.Vec using ([]; _∷_) open import Data.Fin using (#_) open import Category.Monad.State open import Relation.Binary.PropositionalEquality open ≡-Reasoning ------------------------------------------------------------------------ -- Boring lemma private lem₁ : ∀ b₁ b₂ → b₁ ∨ b₂ ∧ b₁ ≡ b₁ lem₁ b₁ b₂ = begin b₁ ∨ b₂ ∧ b₁ ≡⟨ cong (_∨_ b₁) (B.∧-comm b₂ b₁) ⟩ b₁ ∨ b₁ ∧ b₂ ≡⟨ proj₁ B.absorptive b₁ b₂ ⟩ b₁ ∎ where module B = BooleanAlgebra Bool.booleanAlgebra ------------------------------------------------------------------------ -- Parser monad P : Set → Set P = StateT (List Tok) List ------------------------------------------------------------------------ -- Basic parsers (no CPS) -- Note that the recursive argument of symbolBind is coinductive, -- while that of returnPlus is inductive. An infinite choice is not -- acceptable, but an infinite tree of potential parsers is fine. data Parser (R : Set) : Bool → Set where symbolBind : {e : Tok → Bool} → (f : (x : Tok) → ∞ (Parser R (e x))) → Parser R false fail : Parser R false returnPlus : ∀ {e} (x : R) (p : Parser R e) → Parser R true parse : ∀ {R e} → Parser R e → P R parse (symbolBind f) [] = [] parse (symbolBind f) (x ∷ xs) = parse (♭ (f x)) xs parse fail _ = [] parse (returnPlus x p) xs = (x , xs) ∷ parse p xs cast : ∀ {R e₁ e₂} → e₁ ≡ e₂ → Parser R e₁ → Parser R e₂ cast refl = id return : ∀ {R} → R → Parser R true return x = returnPlus x fail module DirectImplementations where -- The definition of _∣_ is fine, but is the definition of _>>=_ -- acceptable? infixl 1 _>>=_ infixl 0 _∣_ _∣_ : ∀ {R e₁ e₂} → Parser R e₁ → Parser R e₂ → Parser R (e₁ ∨ e₂) symbolBind f₁ ∣ symbolBind f₂ = symbolBind (λ x → ♯ (♭ (f₁ x) ∣ ♭ (f₂ x))) fail ∣ p₂ = p₂ symbolBind f₁ ∣ fail = symbolBind f₁ returnPlus x₁ p₁ ∣ fail = returnPlus x₁ p₁ returnPlus x₁ p₁ ∣ p₂ = returnPlus x₁ (p₁ ∣ p₂) symbolBind f₁ ∣ returnPlus x₂ p₂ = returnPlus x₂ (symbolBind f₁ ∣ p₂) _>>=_ : ∀ {R₁ R₂ e₁ e₂} → Parser R₁ e₁ → (R₁ → Parser R₂ e₂) → Parser R₂ (e₁ ∧ e₂) symbolBind f₁ >>= f₂ = symbolBind (λ x → ♯ (♭ (f₁ x) >>= f₂)) fail >>= f₂ = fail returnPlus {e} x₁ p₁ >>= f₂ = cast (lem₁ _ e) (f₂ x₁ ∣ p₁ >>= f₂) -- Implementing _!>>=_ seems tricky. -- _!>>=_ : ∀ {R₁ R₂} {e₂ : R₁ → Bool} → -- Parser R₁ false → ((x : R₁) → Parser R₂ (e₂ x)) → -- Parser R₂ false -- symbolBind f !>>= p₂ = symbolBind (λ x → ♯ {!♭ (f x) !>>= p₂!}) -- fail !>>= p₂ = fail module IndirectImplementations where -- Can _>>=_ be implemented by using the productivity trick? infixl 1 _>>=_ infixl 0 _∣_ data PProg : Set → Bool → Set1 where symbolBind : ∀ {R} {e : Tok → Bool} → (f : (x : Tok) → ∞₁ (PProg R (e x))) → PProg R false fail : ∀ {R} → PProg R false returnPlus : ∀ {R e} (x : R) (p : PProg R e) → PProg R true _∣_ : ∀ {R e₁ e₂} (p₁ : PProg R e₁) (p₂ : PProg R e₂) → PProg R (e₁ ∨ e₂) _>>=_ : ∀ {R₁ R₂ e₁ e₂} (p₁ : PProg R₁ e₁) (f₂ : R₁ → PProg R₂ e₂) → PProg R₂ (e₁ ∧ e₂) data PWHNF (R : Set) : Bool → Set1 where symbolBind : {e : Tok → Bool} → (f : (x : Tok) → PProg R (e x)) → PWHNF R false fail : PWHNF R false returnPlus : ∀ {e} (x : R) (p : PWHNF R e) → PWHNF R true -- _∣_ is a program, so implementing whnf seems challenging. whnf : ∀ {R e} → PProg R e → PWHNF R e whnf (symbolBind f) = symbolBind (λ x → ♭₁ (f x)) whnf fail = fail whnf (returnPlus x p) = returnPlus x (whnf p) whnf (p₁ ∣ p₂) with whnf p₁ ... | fail = whnf p₂ ... | returnPlus x₁ p₁′ = returnPlus x₁ {!(p₁′ ∣ p₂)!} -- (p₁′ ∣ p₂) ... | symbolBind f₁ with whnf p₂ ... | symbolBind f₂ = symbolBind (λ x → f₁ x ∣ f₂ x) ... | fail = symbolBind f₁ ... | returnPlus x₂ p₂′ = returnPlus x₂ {!!} -- (symbolBind f₁ ∣ p₂′) whnf (p₁ >>= f₂) with whnf p₁ ... | symbolBind f₁ = symbolBind (λ x → f₁ x >>= f₂) ... | fail = fail ... | returnPlus x₁ p₁′ = {!f₂ x₁ ∣ p₁′ >>= f₂!} mutual value : ∀ {R e} → PWHNF R e → Parser R e value (symbolBind f) = symbolBind (λ x → ♯ ⟦ f x ⟧) value fail = fail value (returnPlus x p) = returnPlus x (value p) ⟦_⟧ : ∀ {R e} → PProg R e → Parser R e ⟦ p ⟧ = value (whnf p)
src/Lens/Non-dependent/Higher/Coinductive.agda
nad/dependent-lenses
3
14088
<reponame>nad/dependent-lenses<filename>src/Lens/Non-dependent/Higher/Coinductive.agda ------------------------------------------------------------------------ -- Coinductive higher lenses ------------------------------------------------------------------------ -- <NAME> came up with these lenses, and provided an informal -- proof showing that this lens type is pointwise equivalent to his -- higher lenses. I turned this proof into the proof presented below, -- with help from <NAME> (see -- Lens.Non-dependent.Higher.Coherently.Coinductive). {-# OPTIONS --cubical --guardedness #-} import Equality.Path as P module Lens.Non-dependent.Higher.Coinductive {e⁺} (eq : ∀ {a p} → P.Equality-with-paths a p e⁺) where open P.Derived-definitions-and-properties eq open import Logical-equivalence using (_⇔_) open import Prelude open import Bijection equality-with-J using (_↔_) import Coherently-constant eq as CC open import Colimit.Sequential eq as C using (∣_∣) open import Equality.Decidable-UIP equality-with-J using (Constant) open import Equality.Path.Isomorphisms eq open import Equivalence equality-with-J as Eq using (_≃_) import Equivalence.Half-adjoint equality-with-J as HA open import Function-universe equality-with-J as F hiding (id; _∘_) open import H-level equality-with-J open import H-level.Closure equality-with-J open import H-level.Truncation.Propositional eq as T using (∥_∥; ∣_∣) import H-level.Truncation.Propositional.Non-recursive eq as N open import H-level.Truncation.Propositional.One-step eq as O using (∥_∥¹; ∥_∥¹-out-^; ∥_∥¹-in-^; ∣_∣; ∣_,_∣-in-^) open import Preimage equality-with-J using (_⁻¹_) open import Univalence-axiom equality-with-J open import Lens.Non-dependent eq import Lens.Non-dependent.Higher eq as H import Lens.Non-dependent.Higher.Capriotti eq as Higher open import Lens.Non-dependent.Higher.Coherently.Coinductive eq private variable a b p : Level A B : Type a P : A → Type p f : (x : A) → P x ------------------------------------------------------------------------ -- Weakly constant functions -- A variant of Constant. Constant′ : {A : Type a} {B : Type b} → (A → B) → Type (a ⊔ b) Constant′ {A = A} {B = B} f = ∃ λ (g : ∥ A ∥¹ → B) → ∀ x → g ∣ x ∣ ≡ f x -- Constant and Constant′ are pointwise equivalent. Constant≃Constant′ : (f : A → B) → Constant f ≃ Constant′ f Constant≃Constant′ f = Eq.↔→≃ (λ c → O.rec′ f c , λ x → O.rec′ f c ∣ x ∣ ≡⟨⟩ f x ∎) (λ (g , h) x y → f x ≡⟨ sym (h x) ⟩ g ∣ x ∣ ≡⟨ cong g (O.∣∣-constant x y) ⟩ g ∣ y ∣ ≡⟨ h y ⟩∎ f y ∎) (λ (g , h) → let lem = O.elim λ where .O.Elim.∣∣ʳ x → f x ≡⟨ sym (h x) ⟩∎ g ∣ x ∣ ∎ .O.Elim.∣∣-constantʳ x y → let g′ = O.rec′ f λ x y → trans (sym (h x)) (trans (cong g (O.∣∣-constant x y)) (h y)) in subst (λ z → g′ z ≡ g z) (O.∣∣-constant x y) (sym (h x)) ≡⟨ subst-in-terms-of-trans-and-cong ⟩ trans (sym (cong g′ (O.∣∣-constant x y))) (trans (sym (h x)) (cong g (O.∣∣-constant x y))) ≡⟨ cong (flip trans _) $ cong sym O.rec-∣∣-constant ⟩ trans (sym (trans (sym (h x)) (trans (cong g (O.∣∣-constant x y)) (h y)))) (trans (sym (h x)) (cong g (O.∣∣-constant x y))) ≡⟨ trans (cong (flip trans _) $ trans (cong sym $ sym $ trans-assoc _ _ _) $ sym-trans _ _) $ trans-[trans-sym]- _ _ ⟩∎ sym (h y) ∎ in Σ-≡,≡→≡ (⟨ext⟩ lem) (⟨ext⟩ λ x → subst (λ g → ∀ x → g ∣ x ∣ ≡ f x) (⟨ext⟩ lem) (λ x → refl (f x)) x ≡⟨ sym $ push-subst-application _ _ ⟩ subst (λ g → g ∣ x ∣ ≡ f x) (⟨ext⟩ lem) (refl (f x)) ≡⟨ subst-∘ _ _ _ ⟩ subst (_≡ f x) (cong (_$ ∣ x ∣) (⟨ext⟩ lem)) (refl (f x)) ≡⟨ subst-trans-sym ⟩ trans (sym (cong (_$ ∣ x ∣) (⟨ext⟩ lem))) (refl (f x)) ≡⟨ trans-reflʳ _ ⟩ sym (cong (_$ ∣ x ∣) (⟨ext⟩ lem)) ≡⟨ cong sym $ cong-ext _ ⟩ sym (lem ∣ x ∣) ≡⟨⟩ sym (sym (h x)) ≡⟨ sym-sym _ ⟩∎ h x ∎)) (λ c → ⟨ext⟩ λ x → ⟨ext⟩ λ y → trans (sym (refl _)) (trans (cong (O.rec′ f c) (O.∣∣-constant x y)) (refl _)) ≡⟨ trans (cong₂ trans sym-refl (trans-reflʳ _)) $ trans-reflˡ _ ⟩ cong (O.rec′ f c) (O.∣∣-constant x y) ≡⟨ O.rec-∣∣-constant ⟩∎ c x y ∎) ------------------------------------------------------------------------ -- Coherently constant functions -- Coherently constant functions. Coherently-constant : {A : Type a} {B : Type b} (f : A → B) → Type (a ⊔ b) Coherently-constant = Coherently Constant O.rec′ -- Coherently constant functions are weakly constant. constant : Coherently-constant f → Constant f constant c = c .property -- An alternative to Coherently-constant. Coherently-constant′ : {A : Type a} {B : Type b} (f : A → B) → Type (a ⊔ b) Coherently-constant′ = Coherently Constant′ (λ _ → proj₁) -- Coherently-constant and Coherently-constant′ are pointwise -- equivalent (assuming univalence). Coherently-constant≃Coherently-constant′ : Block "Coherently-constant≃Coherently-constant′" → {A : Type a} {B : Type b} {f : A → B} → Univalence (a ⊔ b) → Coherently-constant f ≃ Coherently-constant′ f Coherently-constant≃Coherently-constant′ ⊠ univ = Coherently-cong univ Constant≃Constant′ (λ f c → O.rec′ f (_≃_.from (Constant≃Constant′ f) c) ≡⟨⟩ proj₁ (_≃_.to (Constant≃Constant′ f) (_≃_.from (Constant≃Constant′ f) c)) ≡⟨ cong proj₁ $ _≃_.right-inverse-of (Constant≃Constant′ f) _ ⟩∎ proj₁ c ∎) private -- Some definitions used in the implementation of -- ∃Coherently-constant′≃. module ∃Coherently-constant′≃ where to₁ : (f : A → B) → Coherently-constant′ f → ∀ n → ∥ A ∥¹-in-^ n → B to₁ f c zero = f to₁ f c (suc n) = to₁ (proj₁ (c .property)) (c .coherent) n to₂ : ∀ (f : A → B) (c : Coherently-constant′ f) n x → to₁ f c (suc n) ∣ n , x ∣-in-^ ≡ to₁ f c n x to₂ f c zero = proj₂ (c .property) to₂ f c (suc n) = to₂ (proj₁ (c .property)) (c .coherent) n from : (f : ∀ n → ∥ A ∥¹-in-^ n → B) → (∀ n x → f (suc n) ∣ n , x ∣-in-^ ≡ f n x) → Coherently-constant′ (f 0) from f c .property = f 1 , c 0 from f c .coherent = from (f ∘ suc) (c ∘ suc) from-to : (f : A → B) (c : Coherently-constant′ f) → from (to₁ f c) (to₂ f c) P.≡ c from-to f c i .property = (c .property P.∎) i from-to f c i .coherent = from-to (proj₁ (c .property)) (c .coherent) i to₁-from : (f : ∀ n → ∥ A ∥¹-in-^ n → B) (c : ∀ n x → f (suc n) ∣ n , x ∣-in-^ ≡ f n x) → ∀ n x → to₁ (f 0) (from f c) n x ≡ f n x to₁-from f c zero = refl ∘ f 0 to₁-from f c (suc n) = to₁-from (f ∘ suc) (c ∘ suc) n to₂-from : (f : ∀ n → ∥ A ∥¹-in-^ n → B) (c : ∀ n x → f (suc n) ∣ n , x ∣-in-^ ≡ f n x) → ∀ n x → trans (sym (to₁-from f c (suc n) ∣ n , x ∣-in-^)) (trans (to₂ (f 0) (from f c) n x) (to₁-from f c n x)) ≡ c n x to₂-from f c (suc n) = to₂-from (f ∘ suc) (c ∘ suc) n to₂-from f c zero = λ x → trans (sym (refl _)) (trans (c 0 x) (refl _)) ≡⟨ trans (cong (flip trans _) sym-refl) $ trans-reflˡ _ ⟩ trans (c 0 x) (refl _) ≡⟨ trans-reflʳ _ ⟩∎ c 0 x ∎ -- "Functions from A to B that are coherently constant" can be -- expressed in a different way. ∃Coherently-constant′≃ : (∃ λ (f : A → B) → Coherently-constant′ f) ≃ (∃ λ (f : ∀ n → ∥ A ∥¹-in-^ n → B) → ∀ n x → f (suc n) ∣ n , x ∣-in-^ ≡ f n x) ∃Coherently-constant′≃ = Eq.↔→≃ (λ (f , c) → to₁ f c , to₂ f c) (λ (f , c) → f 0 , from f c) (λ (f , c) → Σ-≡,≡→≡ (⟨ext⟩ λ n → ⟨ext⟩ λ x → to₁-from f c n x) (⟨ext⟩ λ n → ⟨ext⟩ λ x → subst (λ f → ∀ n x → f (suc n) ∣ n , x ∣-in-^ ≡ f n x) (⟨ext⟩ λ n → ⟨ext⟩ λ x → to₁-from f c n x) (to₂ (f 0) (from f c)) n x ≡⟨ trans (cong (_$ x) $ sym $ push-subst-application _ _) $ sym $ push-subst-application _ _ ⟩ subst (λ f → f (suc n) ∣ n , x ∣-in-^ ≡ f n x) (⟨ext⟩ λ n → ⟨ext⟩ λ x → to₁-from f c n x) (to₂ (f 0) (from f c) n x) ≡⟨ subst-in-terms-of-trans-and-cong ⟩ trans (sym (cong (λ f → f (suc n) ∣ n , x ∣-in-^) (⟨ext⟩ λ n → ⟨ext⟩ λ x → to₁-from f c n x))) (trans (to₂ (f 0) (from f c) n x) (cong (λ f → f n x) (⟨ext⟩ λ n → ⟨ext⟩ λ x → to₁-from f c n x))) ≡⟨ cong₂ (λ p q → trans (sym p) (trans (to₂ (f 0) (from f c) n x) q)) (trans (sym $ cong-∘ _ _ _) $ trans (cong (cong _) $ cong-ext _) $ cong-ext _) (trans (sym $ cong-∘ _ _ _) $ trans (cong (cong _) $ cong-ext _) $ cong-ext _) ⟩ trans (sym (to₁-from f c (suc n) ∣ n , x ∣-in-^)) (trans (to₂ (f 0) (from f c) n x) (to₁-from f c n x)) ≡⟨ to₂-from f c n x ⟩∎ c n x ∎)) (λ (f , c) → cong (f ,_) $ _↔_.from ≡↔≡ $ from-to f c) where open ∃Coherently-constant′≃ private -- A lemma that is used in the implementation of -- Coherently-constant′≃. Coherently-constant′≃-lemma : (∃ λ (f : A → B) → Coherently-constant′ f) ≃ (∃ λ (f : A → B) → ∃ λ (g : ∀ n → ∥ A ∥¹-in-^ (suc n) → B) → (∀ x → g 0 ∣ x ∣ ≡ f x) × (∀ n x → g (suc n) ∣ n , x ∣-in-^ ≡ g n x)) Coherently-constant′≃-lemma {A = A} {B = B} = (∃ λ (f : A → B) → Coherently-constant′ f) ↝⟨ ∃Coherently-constant′≃ ⟩ (∃ λ (f : ∀ n → ∥ A ∥¹-in-^ n → B) → ∀ n x → f (suc n) ∣ n , x ∣-in-^ ≡ f n x) ↝⟨ Eq.↔→≃ (λ (f , eq) → f 0 , f ∘ suc , ℕ-case (eq 0) (eq ∘ suc)) (λ (f , g , eq) → ℕ-case f g , eq) (λ (f , g , eq) → cong (λ eq → f , g , eq) $ ⟨ext⟩ $ ℕ-case (refl _) (λ _ → refl _)) lemma ⟩ (∃ λ (f : A → B) → ∃ λ (g : ∀ n → ∥ A ∥¹-in-^ (suc n) → B) → ∀ n x → g n ∣ n , x ∣-in-^ ≡ ℕ-case {P = λ n → ∥ A ∥¹-in-^ n → B} f g n x) ↝⟨ (∃-cong λ _ → ∃-cong λ _ → Πℕ≃ ext) ⟩□ (∃ λ (f : A → B) → ∃ λ (g : ∀ n → ∥ A ∥¹-in-^ (suc n) → B) → (∀ x → g 0 ∣ x ∣ ≡ f x) × (∀ n x → g (suc n) ∣ n , x ∣-in-^ ≡ g n x)) □ where -- An alternative (unused) proof of the second step above. If this -- proof is used instead of the other one, then the proof of -- from-Coherently-constant′≃ below fails (at least at the time of -- writing). second-step : (∃ λ (f : ∀ n → ∥ A ∥¹-in-^ n → B) → ∀ n x → f (suc n) ∣ n , x ∣-in-^ ≡ f n x) ≃ (∃ λ (f : A → B) → ∃ λ (g : ∀ n → ∥ A ∥¹-in-^ (suc n) → B) → ∀ n x → g n ∣ n , x ∣-in-^ ≡ ℕ-case {P = λ n → ∥ A ∥¹-in-^ n → B} f g n x) second-step = from-bijection $ inverse $ (Σ-cong (inverse $ Πℕ≃ {k = equivalence} ext) λ _ → F.id) F.∘ Σ-assoc abstract lemma : (p@(f , eq) : ∃ λ (f : ∀ n → ∥ A ∥¹-in-^ n → B) → ∀ n x → f (suc n) ∣ n , x ∣-in-^ ≡ f n x) → (ℕ-case (f 0) (f ∘ suc) , ℕ-case (eq 0) (eq ∘ suc)) ≡ p lemma (f , eq) = Σ-≡,≡→≡ (⟨ext⟩ $ ℕ-case (refl _) (λ _ → refl _)) (⟨ext⟩ λ n → ⟨ext⟩ λ x → let eq′ = ℕ-case (eq 0) (eq ∘ suc) r = ℕ-case (refl _) (λ _ → refl _) in subst {y = f} (λ f → ∀ n x → f (suc n) ∣ n , x ∣-in-^ ≡ f n x) (⟨ext⟩ r) eq′ n x ≡⟨ sym $ trans (push-subst-application _ _) $ cong (_$ x) $ push-subst-application _ _ ⟩ subst (λ f → f (suc n) ∣ n , x ∣-in-^ ≡ f n x) (⟨ext⟩ r) (eq′ n x) ≡⟨ subst-in-terms-of-trans-and-cong ⟩ trans (sym (cong (λ f → f (suc n) ∣ n , x ∣-in-^) (⟨ext⟩ r))) (trans (eq′ n x) (cong (λ f → f n x) (⟨ext⟩ r))) ≡⟨ trans (cong (flip trans _) $ trans (cong sym $ trans (sym $ cong-∘ _ _ _) $ trans (cong (cong (_$ ∣ n , x ∣-in-^)) $ cong-ext _) (cong-refl _)) sym-refl) $ trans-reflˡ _ ⟩ trans (eq′ n x) (cong (λ f → f n x) (⟨ext⟩ r)) ≡⟨ cong (trans _) $ trans (sym $ cong-∘ _ _ _) $ cong (cong (_$ x)) $ cong-ext _ ⟩ trans (eq′ n x) (cong (_$ x) $ r n) ≡⟨ ℕ-case {P = λ n → ∀ x → trans (eq′ n x) (cong (_$ x) $ r n) ≡ eq n x} (λ _ → trans (cong (trans _) $ cong-refl _) $ trans-reflʳ _) (λ _ _ → trans (cong (trans _) $ cong-refl _) $ trans-reflʳ _) n x ⟩∎ eq n x ∎) -- Coherently-constant′ can be expressed in a different way. Coherently-constant′≃ : Block "Coherently-constant′≃" → {f : A → B} → Coherently-constant′ f ≃ (∃ λ (g : ∀ n → ∥ A ∥¹-in-^ (suc n) → B) → (∀ x → g 0 ∣ x ∣ ≡ f x) × (∀ n x → g (suc n) ∣ n , x ∣-in-^ ≡ g n x)) Coherently-constant′≃ ⊠ {f = f} = Eq.⟨ _ , Eq.drop-Σ-map-id _ (_≃_.is-equivalence Coherently-constant′≃-lemma) f ⟩ -- A "computation" rule for Coherently-constant′≃. from-Coherently-constant′≃-property : (bl : Block "Coherently-constant′≃") → (f : A → B) {c@(g , g₀ , _) : ∃ λ (g : ∀ n → ∥ A ∥¹-in-^ (suc n) → B) → (∀ x → g 0 ∣ x ∣ ≡ f x) × (∀ n x → g (suc n) ∣ n , x ∣-in-^ ≡ g n x)} → _≃_.from (Coherently-constant′≃ bl) c .property ≡ (g 0 , g₀) from-Coherently-constant′≃-property {A = A} {B = B} ⊠ f {c = c@(g , g₀ , g₊)} = _≃_.from (Coherently-constant′≃ ⊠) c .property ≡⟨⟩ HA.inverse (Eq.drop-Σ-map-id _ (_≃_.is-equivalence Coherently-constant′≃-lemma) f) c .property ≡⟨ cong (λ c → c .property) $ Eq.inverse-drop-Σ-map-id {x = f} {eq = _≃_.is-equivalence Coherently-constant′≃-lemma} ⟩ subst Coherently-constant′ (cong proj₁ $ _≃_.right-inverse-of Coherently-constant′≃-lemma (f , c)) (proj₂ (_≃_.from Coherently-constant′≃-lemma (f , c))) .property ≡⟨ subst-Coherently-property ⟩ subst Constant′ (cong proj₁ $ _≃_.right-inverse-of Coherently-constant′≃-lemma (f , c)) (proj₂ (_≃_.from Coherently-constant′≃-lemma (f , c)) .property) ≡⟨⟩ subst Constant′ (cong proj₁ $ trans (cong {B = ∃ λ (f : A → B) → ∃ λ (g : ∀ n → ∥ A ∥¹-in-^ (suc n) → B) → (∀ x → g 0 ∣ x ∣ ≡ f x) × (∀ n x → g (suc n) ∣ n , x ∣-in-^ ≡ g n x)} (λ (f , eq) → f 0 , f ∘ suc , eq 0 , eq ∘ suc) $ _≃_.right-inverse-of ∃Coherently-constant′≃ (ℕ-case f g , ℕ-case g₀ g₊)) $ trans (cong (λ (f , g , eq) → f , g , eq 0 , eq ∘ suc) $ cong {B = ∃ λ (f : A → B) → ∃ λ (g : ∀ n → ∥ A ∥¹-in-^ (suc n) → B) → ∀ n x → g n ∣ n , x ∣-in-^ ≡ ℕ-case {P = λ n → ∥ A ∥¹-in-^ n → B} f g n x} {x = ℕ-case g₀ g₊} {y = ℕ-case g₀ g₊} (λ eq → f , g , eq) $ ⟨ext⟩ (ℕ-case (refl _) (λ _ → refl _))) $ cong (f ,_) (cong (g ,_) (refl _))) (g 0 , g₀) ≡⟨ cong (flip (subst Constant′) _) lemma ⟩ subst Constant′ (refl _) (g 0 , g₀) ≡⟨ subst-refl _ _ ⟩∎ g 0 , g₀ ∎ where lemma = (cong proj₁ $ trans (cong {B = ∃ λ (f : A → B) → ∃ λ (g : ∀ n → ∥ A ∥¹-in-^ (suc n) → B) → (∀ x → g 0 ∣ x ∣ ≡ f x) × (∀ n x → g (suc n) ∣ n , x ∣-in-^ ≡ g n x)} (λ (f , eq) → f 0 , f ∘ suc , eq 0 , eq ∘ suc) $ _≃_.right-inverse-of ∃Coherently-constant′≃ (ℕ-case f g , ℕ-case g₀ g₊)) $ trans (cong (λ (f , g , eq) → f , g , eq 0 , eq ∘ suc) $ cong {B = ∃ λ (f : A → B) → ∃ λ (g : ∀ n → ∥ A ∥¹-in-^ (suc n) → B) → ∀ n x → g n ∣ n , x ∣-in-^ ≡ ℕ-case {P = λ n → ∥ A ∥¹-in-^ n → B} f g n x} {x = ℕ-case g₀ g₊} {y = ℕ-case g₀ g₊} (λ eq → f , g , eq) $ ⟨ext⟩ (ℕ-case (refl _) (λ _ → refl _))) $ cong (f ,_) (cong (g ,_) (refl _))) ≡⟨ trans (cong-trans _ _ _) $ cong₂ trans (trans (cong-∘ _ _ _) $ sym $ cong-∘ _ _ _) (trans (cong-trans _ _ _) $ cong₂ trans (trans (cong-∘ _ _ _) $ cong-∘ _ _ _) (cong-∘ _ _ _)) ⟩ (trans (cong (_$ 0) $ cong proj₁ $ _≃_.right-inverse-of ∃Coherently-constant′≃ (ℕ-case f g , ℕ-case g₀ g₊)) $ trans (cong (const f) $ ⟨ext⟩ (ℕ-case (refl _) (λ _ → refl _))) $ cong (const f) (cong (g ,_) (refl _))) ≡⟨ trans (cong (trans _) $ trans (cong₂ trans (cong-const _) (cong-const _)) $ trans-refl-refl) $ trans-reflʳ _ ⟩ (cong (_$ 0) $ cong proj₁ $ _≃_.right-inverse-of ∃Coherently-constant′≃ (ℕ-case f g , ℕ-case g₀ g₊)) ≡⟨ cong (cong (_$ 0)) $ proj₁-Σ-≡,≡→≡ _ _ ⟩ (cong (_$ 0) $ ⟨ext⟩ λ n → ⟨ext⟩ λ x → ∃Coherently-constant′≃.to₁-from (ℕ-case f g) (ℕ-case g₀ g₊) n x) ≡⟨ cong-ext _ ⟩ (⟨ext⟩ λ x → ∃Coherently-constant′≃.to₁-from (ℕ-case f g) (ℕ-case g₀ g₊) 0 x) ≡⟨⟩ (⟨ext⟩ λ _ → refl _) ≡⟨ ext-refl ⟩∎ refl _ ∎ -- Functions from ∥ A ∥ can be expressed as coherently constant -- functions from A (assuming univalence). ∥∥→≃ : ∀ {A : Type a} {B : Type b} → Univalence (a ⊔ b) → (∥ A ∥ → B) ≃ (∃ λ (f : A → B) → Coherently-constant f) ∥∥→≃ {A = A} {B = B} univ = (∥ A ∥ → B) ↝⟨ N.∥∥→≃ ⟩ (∃ λ (f : ∀ n → ∥ A ∥¹-out-^ n → B) → ∀ n x → f (suc n) ∣ x ∣ ≡ f n x) ↝⟨ (Σ-cong {k₁ = equivalence} (∀-cong ext λ n → →-cong₁ ext (O.∥∥¹-out-^≃∥∥¹-in-^ n)) λ f → ∀-cong ext λ n → Π-cong-contra ext (inverse $ O.∥∥¹-out-^≃∥∥¹-in-^ n) λ x → ≡⇒↝ _ $ cong (λ y → f (suc n) y ≡ f n (_≃_.from (O.∥∥¹-out-^≃∥∥¹-in-^ n) x)) ( ∣ _≃_.from (O.∥∥¹-out-^≃∥∥¹-in-^ n) x ∣ ≡⟨ sym $ O.∣,∣-in-^≡∣∣ n ⟩∎ _≃_.from (O.∥∥¹-out-^≃∥∥¹-in-^ (suc n)) ∣ n , x ∣-in-^ ∎)) ⟩ (∃ λ (f : ∀ n → ∥ A ∥¹-in-^ n → B) → ∀ n x → f (suc n) ∣ n , x ∣-in-^ ≡ f n x) ↝⟨ inverse ∃Coherently-constant′≃ ⟩ (∃ λ (f : A → B) → Coherently-constant′ f) ↝⟨ (∃-cong λ _ → inverse $ Coherently-constant≃Coherently-constant′ ⊠ univ) ⟩□ (∃ λ (f : A → B) → Coherently-constant f) □ -- A function used in the statement of proj₂-to-∥∥→≃-property≡. proj₁-to-∥∥→≃-constant : {A : Type a} {B : Type b} (univ : Univalence (a ⊔ b)) → (f : ∥ A ∥ → B) → Constant (proj₁ (_≃_.to (∥∥→≃ univ) f)) proj₁-to-∥∥→≃-constant _ f x y = f ∣ x ∣ ≡⟨ cong f (T.truncation-is-proposition ∣ x ∣ ∣ y ∣) ⟩∎ f ∣ y ∣ ∎ -- A "computation rule" for ∥∥→≃. proj₂-to-∥∥→≃-property≡ : {A : Type a} {B : Type b} (univ : Univalence (a ⊔ b)) → {f : ∥ A ∥ → B} → proj₂ (_≃_.to (∥∥→≃ univ) f) .property ≡ proj₁-to-∥∥→≃-constant univ f proj₂-to-∥∥→≃-property≡ univ {f = f} = ⟨ext⟩ λ x → ⟨ext⟩ λ y → let g , c = _≃_.to C.universal-property (f ∘ _≃_.to N.∥∥≃∥∥) in proj₂ (_≃_.to (∥∥→≃ univ) f) .property x y ≡⟨⟩ _≃_.from (Coherently-constant≃Coherently-constant′ ⊠ univ) (proj₂ (_≃_.from ∃Coherently-constant′≃ (Σ-map (λ g n → g n ∘ _≃_.from (oi n)) (λ {g} c n x → ≡⇒→ (cong (λ y → g (suc n) y ≡ g n (_≃_.from (oi n) x)) (sym $ O.∣,∣-in-^≡∣∣ n)) (c n (_≃_.from (oi n) x))) (_≃_.to C.universal-property (f ∘ _≃_.to N.∥∥≃∥∥))))) .property x y ≡⟨⟩ _≃_.from (Constant≃Constant′ _) (proj₂ (_≃_.from ∃Coherently-constant′≃ (Σ-map (λ g n → g n ∘ _≃_.from (oi n)) (λ {g} c n x → ≡⇒→ (cong (λ y → g (suc n) y ≡ g n (_≃_.from (oi n) x)) (sym $ O.∣,∣-in-^≡∣∣ n)) (c n (_≃_.from (oi n) x))) (_≃_.to C.universal-property (f ∘ _≃_.to N.∥∥≃∥∥)))) .property) x y ≡⟨⟩ _≃_.from (Constant≃Constant′ _) ( g 1 , λ x → ≡⇒→ (cong (λ z → g 1 z ≡ g 0 x) (sym $ refl ∣ _ ∣)) (c 0 x) ) x y ≡⟨⟩ trans (sym (≡⇒→ (cong (λ z → g 1 z ≡ g 0 x) (sym $ refl ∣ _ ∣)) (c 0 x))) (trans (cong (g 1) (O.∣∣-constant x y)) (≡⇒→ (cong (λ z → g 1 z ≡ g 0 y) (sym $ refl ∣ _ ∣)) (c 0 y))) ≡⟨ cong₂ (λ p q → trans (sym p) (trans (cong (g 1) (O.∣∣-constant x y)) q)) (trans (cong (λ eq → ≡⇒→ (cong (λ z → g 1 z ≡ g 0 x) eq) (c 0 x)) sym-refl) $ trans (cong (λ eq → ≡⇒→ eq (c 0 x)) $ cong-refl _) $ cong (_$ c 0 x) ≡⇒→-refl) (trans (cong (λ eq → ≡⇒→ (cong (λ z → g 1 z ≡ g 0 y) eq) (c 0 y)) sym-refl) $ trans (cong (λ eq → ≡⇒→ eq (c 0 y)) $ cong-refl _) $ cong (_$ c 0 y) ≡⇒→-refl) ⟩ trans (sym (c 0 x)) (trans (cong (g 1) (O.∣∣-constant x y)) (c 0 y)) ≡⟨⟩ trans (sym (cong (f ∘ _≃_.to N.∥∥≃∥∥) (C.∣∣≡∣∣ x))) (trans (cong (f ∘ _≃_.to N.∥∥≃∥∥ ∘ ∣_∣) (O.∣∣-constant x y)) (cong (f ∘ _≃_.to N.∥∥≃∥∥) (C.∣∣≡∣∣ y))) ≡⟨ cong₂ (λ p q → trans (sym p) q) (sym $ cong-∘ _ _ _) (cong₂ trans (sym $ cong-∘ _ _ _) (sym $ cong-∘ _ _ _)) ⟩ trans (sym (cong f (cong (_≃_.to N.∥∥≃∥∥) (C.∣∣≡∣∣ x)))) (trans (cong f (cong (_≃_.to N.∥∥≃∥∥ ∘ ∣_∣) (O.∣∣-constant x y))) (cong f (cong (_≃_.to N.∥∥≃∥∥) (C.∣∣≡∣∣ y)))) ≡⟨ trans (cong₂ trans (sym $ cong-sym _ _) (sym $ cong-trans _ _ _)) $ sym $ cong-trans _ _ _ ⟩ cong f (trans (sym (cong (_≃_.to N.∥∥≃∥∥) (C.∣∣≡∣∣ x))) (trans (cong (_≃_.to N.∥∥≃∥∥ ∘ ∣_∣) (O.∣∣-constant x y)) (cong (_≃_.to N.∥∥≃∥∥) (C.∣∣≡∣∣ y)))) ≡⟨ cong (cong f) $ mono₁ 1 T.truncation-is-proposition _ _ ⟩∎ cong f (T.truncation-is-proposition ∣ x ∣ ∣ y ∣) ∎ where oi = O.∥∥¹-out-^≃∥∥¹-in-^ -- Two variants of Coherently-constant are pointwise equivalent -- (assuming univalence). Coherently-constant≃Coherently-constant : {A : Type a} {B : Type b} {f : A → B} → Univalence (a ⊔ b) → CC.Coherently-constant f ≃ Coherently-constant f Coherently-constant≃Coherently-constant {A = A} {B = B} {f = f} univ = CC.Coherently-constant f ↔⟨⟩ (∃ λ (g : ∥ A ∥ → B) → f ≡ g ∘ ∣_∣) ↝⟨ (Σ-cong (∥∥→≃ univ) λ _ → F.id) ⟩ (∃ λ ((g , _) : ∃ λ (g : A → B) → Coherently-constant g) → f ≡ g) ↔⟨ inverse Σ-assoc ⟩ (∃ λ (g : A → B) → Coherently-constant g × f ≡ g) ↝⟨ (∃-cong λ _ → ×-cong₁ λ eq → ≡⇒↝ _ $ cong Coherently-constant $ sym eq) ⟩ (∃ λ (g : A → B) → Coherently-constant f × f ≡ g) ↔⟨ ∃-comm ⟩ Coherently-constant f × (∃ λ (g : A → B) → f ≡ g) ↔⟨ (drop-⊤-right λ _ → _⇔_.to contractible⇔↔⊤ (other-singleton-contractible _)) ⟩□ Coherently-constant f □ -- A "computation rule" for Coherently-constant≃Coherently-constant. to-Coherently-constant≃Coherently-constant-property : ∀ {A : Type a} {B : Type b} {f : A → B} {c : CC.Coherently-constant f} {x y} (univ : Univalence (a ⊔ b)) → _≃_.to (Coherently-constant≃Coherently-constant univ) c .property x y ≡ trans (cong (_$ x) (proj₂ c)) (trans (proj₁-to-∥∥→≃-constant univ (proj₁ c) _ _) (cong (_$ y) (sym (proj₂ c)))) to-Coherently-constant≃Coherently-constant-property {f = f} {c = c} {x = x} {y = y} univ = _≃_.to (Coherently-constant≃Coherently-constant univ) c .property x y ≡⟨⟩ ≡⇒→ (cong Coherently-constant $ sym (proj₂ c)) (proj₂ (_≃_.to (∥∥→≃ univ) (proj₁ c))) .property x y ≡⟨ cong (λ (c : Coherently-constant _) → c .property x y) $ sym $ subst-in-terms-of-≡⇒↝ equivalence _ _ _ ⟩ subst Coherently-constant (sym (proj₂ c)) (proj₂ (_≃_.to (∥∥→≃ univ) (proj₁ c))) .property x y ≡⟨ cong (λ (f : Constant _) → f x y) subst-Coherently-property ⟩ subst Constant (sym (proj₂ c)) (proj₂ (_≃_.to (∥∥→≃ univ) (proj₁ c)) .property) x y ≡⟨ trans (cong (_$ y) $ sym $ push-subst-application _ _) $ sym $ push-subst-application _ _ ⟩ subst (λ f → f x ≡ f y) (sym (proj₂ c)) (proj₂ (_≃_.to (∥∥→≃ univ) (proj₁ c)) .property x y) ≡⟨ cong (λ (f : Constant _) → subst (λ f → f x ≡ f y) (sym (proj₂ c)) (f x y)) $ proj₂-to-∥∥→≃-property≡ univ ⟩ subst (λ f → f x ≡ f y) (sym (proj₂ c)) (proj₁-to-∥∥→≃-constant univ (proj₁ c) x y) ≡⟨ subst-in-terms-of-trans-and-cong ⟩ trans (sym (cong (_$ x) (sym (proj₂ c)))) (trans (proj₁-to-∥∥→≃-constant univ (proj₁ c) _ _) (cong (_$ y) (sym (proj₂ c)))) ≡⟨ cong (flip trans _) $ trans (sym $ cong-sym _ _) $ cong (cong (_$ x)) $ sym-sym _ ⟩∎ trans (cong (_$ x) (proj₂ c)) (trans (proj₁-to-∥∥→≃-constant univ (proj₁ c) _ _) (cong (_$ y) (sym (proj₂ c)))) ∎ ------------------------------------------------------------------------ -- Lenses, defined as getters with coherently constant fibres -- The lens type family. Lens : Type a → Type b → Type (lsuc (a ⊔ b)) Lens A B = ∃ λ (get : A → B) → Coherently-constant (get ⁻¹_) -- Some derived definitions. module Lens {A : Type a} {B : Type b} (l : Lens A B) where -- A getter. get : A → B get = proj₁ l -- The family of fibres of the getter is coherently constant. get⁻¹-coherently-constant : Coherently-constant (get ⁻¹_) get⁻¹-coherently-constant = proj₂ l -- All the getter's fibres are equivalent. get⁻¹-constant : (b₁ b₂ : B) → get ⁻¹ b₁ ≃ get ⁻¹ b₂ get⁻¹-constant b₁ b₂ = ≡⇒≃ (get⁻¹-coherently-constant .property b₁ b₂) -- A setter. set : A → B → A set a b = $⟨ _≃_.to (get⁻¹-constant (get a) b) ⟩ (get ⁻¹ get a → get ⁻¹ b) ↝⟨ _$ (a , refl _) ⟩ get ⁻¹ b ↝⟨ proj₁ ⟩□ A □ instance -- The lenses defined above have getters and setters. has-getter-and-setter : Has-getter-and-setter (Lens {a = a} {b = b}) has-getter-and-setter = record { get = Lens.get ; set = Lens.set } -- Lens is pointwise equivalent to Higher.Lens (assuming univalence). Higher-lens≃Lens : {A : Type a} {B : Type b} → Block "Higher-lens≃Lens" → Univalence (lsuc (a ⊔ b)) → Higher.Lens A B ≃ Lens A B Higher-lens≃Lens {A = A} {B = B} ⊠ univ = Higher.Lens A B ↔⟨⟩ (∃ λ (get : A → B) → CC.Coherently-constant (get ⁻¹_)) ↝⟨ (∃-cong λ _ → Coherently-constant≃Coherently-constant univ) ⟩□ (∃ λ (get : A → B) → Coherently-constant (get ⁻¹_)) □ -- The equivalence preserves getters and setters. Higher-lens≃Lens-preserves-getters-and-setters : {A : Type a} {B : Type b} (bl : Block "Higher-lens≃Lens") (univ : Univalence (lsuc (a ⊔ b))) → Preserves-getters-and-setters-⇔ A B (_≃_.logical-equivalence (Higher-lens≃Lens bl univ)) Higher-lens≃Lens-preserves-getters-and-setters {A = A} {B = B} bl univ = Preserves-getters-and-setters-→-↠-⇔ (_≃_.surjection (Higher-lens≃Lens bl univ)) (λ l → get-lemma bl l , set-lemma bl l) where get-lemma : ∀ bl (l : Higher.Lens A B) → Lens.get (_≃_.to (Higher-lens≃Lens bl univ) l) ≡ Higher.Lens.get l get-lemma ⊠ _ = refl _ set-lemma : ∀ bl (l : Higher.Lens A B) → Lens.set (_≃_.to (Higher-lens≃Lens bl univ) l) ≡ Higher.Lens.set l set-lemma bl@⊠ l = ⟨ext⟩ λ a → ⟨ext⟩ λ b → Lens.set (_≃_.to (Higher-lens≃Lens bl univ) l) a b ≡⟨⟩ proj₁ (≡⇒→ (≡⇒→ (cong Coherently-constant (sym get⁻¹-≡)) (proj₂ (_≃_.to (∥∥→≃ univ) H)) .property (get a) b) (a , refl (get a))) ≡⟨ cong (λ (c : Coherently-constant (get ⁻¹_)) → proj₁ (≡⇒→ (c .property (get a) b) (a , refl _))) $ sym $ subst-in-terms-of-≡⇒↝ equivalence _ _ _ ⟩ proj₁ (≡⇒→ (subst Coherently-constant (sym get⁻¹-≡) (proj₂ (_≃_.to (∥∥→≃ univ) H)) .property (get a) b) (a , refl (get a))) ≡⟨ cong (λ (c : Constant (get ⁻¹_)) → proj₁ (≡⇒→ (c (get a) b) (a , refl _))) subst-Coherently-property ⟩ proj₁ (≡⇒→ (subst Constant (sym get⁻¹-≡) (proj₂ (_≃_.to (∥∥→≃ univ) H) .property) (get a) b) (a , refl (get a))) ≡⟨ cong (λ c → proj₁ (≡⇒→ (subst Constant (sym get⁻¹-≡) c (get a) b) (a , refl _))) $ proj₂-to-∥∥→≃-property≡ univ ⟩ proj₁ (≡⇒→ (subst Constant (sym get⁻¹-≡) (proj₁-to-∥∥→≃-constant univ H) (get a) b) (a , refl (get a))) ≡⟨ cong (λ eq → proj₁ (≡⇒→ eq (a , refl _))) $ trans (cong (_$ b) $ sym $ push-subst-application _ _) $ sym $ push-subst-application _ _ ⟩ proj₁ (≡⇒→ (subst (λ f → f (get a) ≡ f b) (sym get⁻¹-≡) (proj₁-to-∥∥→≃-constant univ H (get a) b)) (a , refl (get a))) ≡⟨ cong (λ eq → proj₁ (≡⇒→ eq (a , refl _))) $ subst-in-terms-of-trans-and-cong ⟩ proj₁ (≡⇒→ (trans (sym (cong (_$ get a) (sym get⁻¹-≡))) (trans (proj₁-to-∥∥→≃-constant univ H (get a) b) (cong (_$ b) (sym get⁻¹-≡)))) (a , refl (get a))) ≡⟨⟩ proj₁ (≡⇒→ (trans (sym (cong (_$ get a) (sym get⁻¹-≡))) (trans (cong H (T.truncation-is-proposition _ _)) (cong (_$ b) (sym get⁻¹-≡)))) (a , refl (get a))) ≡⟨ cong (λ f → proj₁ (f (a , refl _))) $ ≡⇒↝-trans equivalence ⟩ proj₁ (≡⇒→ (trans (cong H (T.truncation-is-proposition _ _)) (cong (_$ b) (sym get⁻¹-≡))) (≡⇒→ (sym (cong (_$ get a) (sym get⁻¹-≡))) (a , refl (get a)))) ≡⟨ cong (λ f → proj₁ (f (≡⇒→ (sym (cong (_$ get a) (sym get⁻¹-≡))) (a , refl _)))) $ ≡⇒↝-trans equivalence ⟩ proj₁ (≡⇒→ (cong (_$ b) (sym get⁻¹-≡)) (≡⇒→ (cong H (T.truncation-is-proposition _ _)) (≡⇒→ (sym (cong (_$ get a) (sym get⁻¹-≡))) (a , refl (get a))))) ≡⟨ cong₂ (λ p q → proj₁ (≡⇒→ p (≡⇒→ (cong H (T.truncation-is-proposition _ _)) (≡⇒→ q (a , refl _))))) (cong-sym _ _) (trans (cong sym $ cong-sym _ _) $ sym-sym _) ⟩ proj₁ (≡⇒→ (sym $ cong (_$ b) get⁻¹-≡) (≡⇒→ (cong H (T.truncation-is-proposition _ _)) (≡⇒→ (cong (_$ get a) get⁻¹-≡) (a , refl (get a))))) ≡⟨ cong (λ f → proj₁ (f (≡⇒→ (cong H (T.truncation-is-proposition _ _)) (≡⇒→ (cong (_$ get a) get⁻¹-≡) (a , refl _))))) $ ≡⇒↝-sym equivalence ⟩ proj₁ (_≃_.from (≡⇒≃ (cong (_$ b) get⁻¹-≡)) (≡⇒→ (cong H (T.truncation-is-proposition _ _)) (≡⇒→ (cong (_$ get a) get⁻¹-≡) (a , refl (get a))))) ≡⟨⟩ set a b ∎ where open Higher.Lens l
programs/oeis/136/A136442.asm
karttu/loda
1
26260
; A136442: a(3n) = 1, a(3n-1) = 0 and a(3n+1) = a(n). ; 1,1,0,1,1,0,1,0,0,1,1,0,1,1,0,1,0,0,1,1,0,1,0,0,1,0,0,1,1,0,1,1,0,1,0,0,1,1,0,1,1,0,1,0,0,1,1,0,1,0,0,1,0,0,1,1,0,1,1,0,1,0,0,1,1,0,1,0,0,1,0,0,1,1,0,1,0,0,1,0,0,1,1,0,1,1,0,1,0,0,1,1,0,1,1,0,1,0,0,1,1,0,1,0,0 mul $0,2 add $0,1 mov $1,$0 add $1,$0 mov $2,$1 lpb $1,3 div $2,3 gcd $2,$1 lpe mov $1,$2 sub $1,1
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_922.asm
ljhsiun2/medusa
9
86131
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r12 push %r9 push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0xfa82, %rbp nop nop nop inc %rcx mov (%rbp), %r9w nop nop nop nop and $11119, %rsi lea addresses_A_ht+0x11305, %rdx nop nop nop nop inc %r12 and $0xffffffffffffffc0, %rdx movntdqa (%rdx), %xmm1 vpextrq $0, %xmm1, %rdi and $35607, %rdx lea addresses_UC_ht+0xb19e, %rdx nop nop nop nop inc %rsi mov (%rdx), %r12w nop nop nop nop nop dec %rdx lea addresses_D_ht+0x12e82, %rdi nop nop nop dec %r12 movw $0x6162, (%rdi) nop nop nop nop nop dec %rsi lea addresses_WC_ht+0x1bca2, %rsi lea addresses_D_ht+0x3ac2, %rdi and $58931, %r12 mov $85, %rcx rep movsl nop nop nop nop nop sub %rdi, %rdi lea addresses_WT_ht+0xe0a2, %r12 cmp %r9, %r9 mov $0x6162636465666768, %rdx movq %rdx, %xmm0 vmovups %ymm0, (%r12) inc %r12 lea addresses_WT_ht+0xce82, %r9 nop nop nop sub %rdx, %rdx mov (%r9), %r12w xor $49501, %rdi lea addresses_normal_ht+0x121c2, %r9 nop nop nop and %rbp, %rbp vmovups (%r9), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $1, %xmm5, %r12 nop cmp $11179, %rsi lea addresses_WT_ht+0x9bea, %r12 nop nop nop nop nop sub %rdx, %rdx mov $0x6162636465666768, %rcx movq %rcx, (%r12) nop nop nop nop sub $14532, %rsi lea addresses_D_ht+0x4282, %rdx nop nop nop nop dec %r12 movb (%rdx), %r9b nop nop and %rdx, %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r9 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r15 push %rbx push %rdx push %rsi // Faulty Load lea addresses_A+0xb682, %rdx nop nop dec %r10 movb (%rdx), %r15b lea oracles, %rdx and $0xff, %r15 shlq $12, %r15 mov (%rdx,%r15,1), %r15 pop %rsi pop %rdx pop %rbx pop %r15 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': True, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 8, 'size': 2, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 2, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 11, 'size': 2, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 5, 'size': 32, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 10, 'size': 2, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 6, 'size': 32, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 2, 'size': 8, 'same': False, 'NT': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 5, 'size': 1, 'same': False, 'NT': False}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
part1/quantifiers/Quantifiers.agda
akiomik/plfa-solutions
1
8430
<reponame>akiomik/plfa-solutions<gh_stars>1-10 module Quantifiers where -- Imports import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl) open import Data.Nat using (ℕ; zero; suc; _+_; _*_) open import Relation.Nullary using (¬_) open import Data.Product using (_×_; proj₁; proj₂) renaming (_,_ to ⟨_,_⟩) open import Data.Sum using (_⊎_; inj₁; inj₂) -- open import plfa.part1.Isomorphism using (_≃_; extensionality) -- 同型 (isomorphism) infix 0 _≃_ record _≃_ (A B : Set) : Set where field to : A → B from : B → A from∘to : ∀ (x : A) → from (to x) ≡ x to∘from : ∀ (y : B) → to (from y) ≡ y open _≃_ postulate -- 外延性の公理 extensionality : ∀ {A B : Set} {f g : A → B} → (∀ (x : A) → f x ≡ g x) ----------------------- → f ≡ g -- Universals -- 全称量化子の除去則 ∀-elim : ∀ {A : Set} {B : A → Set} → (L : ∀ (x : A) → B x) → (M : A) --------------------- → B M ∀-elim L M = L M -- Existentials -- 依存和型 (dependent sum type) data Σ (A : Set) (B : A → Set) : Set where ⟨_,_⟩ : (x : A) → B x → Σ A B Σ-syntax = Σ infix 2 Σ-syntax syntax Σ-syntax A (λ x → B) = Σ[ x ∈ A ] B record Σ′ (A : Set) (B : A → Set) : Set where field proj₁′ : A proj₂′ : B proj₁′ -- 存在量化子 (existential quantifier) ∃ : ∀ {A : Set} (B : A → Set) → Set ∃ {A} B = Σ A B ∃-syntax = ∃ syntax ∃-syntax (λ x → B) = ∃[ x ] B -- 存在量化子の除去則 ∃-elim : ∀ {A : Set} {B : A → Set} {C : Set} → (∀ x → B x → C) → ∃[ x ] B x --------------- → C ∃-elim f ⟨ x , y ⟩ = f x y ∀∃-currying : ∀ {A : Set} {B : A → Set} {C : Set} → (∀ x → B x → C) ≃ (∃[ x ] B x → C) ∀∃-currying = record { to = λ{ f → λ{ ⟨ x , y ⟩ → f x y }} ; from = λ{ g → λ{ x → λ{ y → g ⟨ x , y ⟩ }}} ; from∘to = λ{ f → refl } ; to∘from = λ{ g → extensionality λ{ ⟨ x , y ⟩ → refl }} } -- An existential example data even : ℕ → Set data odd : ℕ → Set data even where even-zero : even zero even-suc : ∀ {n : ℕ} → odd n ------------ → even (suc n) data odd where odd-suc : ∀ {n : ℕ} → even n ----------- → odd (suc n) even-∃ : ∀ {n : ℕ} → even n → ∃[ m ] ( m * 2 ≡ n) odd-∃ : ∀ {n : ℕ} → odd n → ∃[ m ] (1 + m * 2 ≡ n) even-∃ even-zero = ⟨ zero , refl ⟩ even-∃ (even-suc o) with odd-∃ o ... | ⟨ m , refl ⟩ = ⟨ suc m , refl ⟩ odd-∃ (odd-suc e) with even-∃ e ... | ⟨ m , refl ⟩ = ⟨ m , refl ⟩ ∃-even : ∀ {n : ℕ} → ∃[ m ] ( m * 2 ≡ n) → even n ∃-odd : ∀ {n : ℕ} → ∃[ m ] (1 + m * 2 ≡ n) → odd n ∃-even ⟨ zero , refl ⟩ = even-zero ∃-even ⟨ suc m , refl ⟩ = even-suc (∃-odd ⟨ m , refl ⟩) ∃-odd ⟨ m , refl ⟩ = odd-suc (∃-even ⟨ m , refl ⟩) -- Existentials, Universals, and Negation -- B(x)が成り立たないxが存在することと、任意のxについてB(x)が成り立たないことは同型 ¬∃≃∀¬ : ∀ {A : Set} {B : A → Set} → (¬ ∃[ x ] B x) ≃ ∀ x → ¬ B x ¬∃≃∀¬ = record { to = λ{ ¬∃xy x y → ¬∃xy ⟨ x , y ⟩ } ; from = λ{ ∀¬xy ⟨ x , y ⟩ → ∀¬xy x y } ; from∘to = λ{ ¬∃xy → extensionality λ{ ⟨ x , y ⟩ → refl } } ; to∘from = λ{ ∀¬xy → refl } }
source/lexer/webidl-token_handlers.adb
reznikmm/webidl
0
21372
<filename>source/lexer/webidl-token_handlers.adb -- SPDX-FileCopyrightText: 2021 <NAME> <<EMAIL>> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with League.Strings; package body WebIDL.Token_Handlers is ------------- -- Integer -- ------------- overriding procedure Integer (Self : not null access Handler; Scanner : not null access WebIDL.Scanners.Scanner'Class; Rule : WebIDL.Scanner_Types.Rule_Index; Token : out WebIDL.Tokens.Token_Kind; Skip : in out Boolean) is begin Token := WebIDL.Tokens.Integer_Token; Skip := False; end Integer; overriding procedure Decimal (Self : not null access Handler; Scanner : not null access WebIDL.Scanners.Scanner'Class; Rule : WebIDL.Scanner_Types.Rule_Index; Token : out WebIDL.Tokens.Token_Kind; Skip : in out Boolean) is pragma Unreferenced (Skip); begin Token := WebIDL.Tokens.Decimal_Token; Skip := False; end Decimal; overriding procedure Delimiter (Self : not null access Handler; Scanner : not null access WebIDL.Scanners.Scanner'Class; Rule : WebIDL.Scanner_Types.Rule_Index; Token : out WebIDL.Tokens.Token_Kind; Skip : in out Boolean) is Text : constant League.Strings.Universal_String := Scanner.Get_Text; begin case Text (1).To_Wide_Wide_Character is when '(' => Token := '('; when ')' => Token := ')'; when ',' => Token := ','; when '-' => Token := '-'; when '.' => Token := '.'; when ':' => Token := ':'; when ';' => Token := ';'; when '<' => Token := '<'; when '=' => Token := '='; when '>' => Token := '>'; when '?' => Token := '?'; when '[' => Token := '['; when ']' => Token := ']'; when '{' => Token := '{'; when '}' => Token := '}'; when others => raise Program_Error; end case; Skip := False; end Delimiter; overriding procedure Ellipsis (Self : not null access Handler; Scanner : not null access WebIDL.Scanners.Scanner'Class; Rule : WebIDL.Scanner_Types.Rule_Index; Token : out WebIDL.Tokens.Token_Kind; Skip : in out Boolean) is pragma Unreferenced (Skip); begin Token := WebIDL.Tokens.Ellipsis_Token; Skip := False; end Ellipsis; overriding procedure Identifier (Self : not null access Handler; Scanner : not null access WebIDL.Scanners.Scanner'Class; Rule : WebIDL.Scanner_Types.Rule_Index; Token : out WebIDL.Tokens.Token_Kind; Skip : in out Boolean) is pragma Unreferenced (Skip); Text : constant League.Strings.Universal_String := Scanner.Get_Text; Found : constant Keyword_Maps.Cursor := Self.Map.Find (Text); begin if Keyword_Maps.Has_Element (Found) then Token := Keyword_Maps.Element (Found); else Token := WebIDL.Tokens.Identifier_Token; end if; Skip := False; end Identifier; procedure Initialize (Self : in out Handler'Class) is use all type WebIDL.Tokens.Token_Kind; function "+" (Text : Wide_Wide_String) return League.Strings.Universal_String renames League.Strings.To_Universal_String; Map : Keyword_Maps.Map renames Self.Map; begin Map.Insert (+"any", Any_Token); Map.Insert (+"async", Async_Token); Map.Insert (+"attribute", Attribute_Token); Map.Insert (+"bigint", Bigint_Token); Map.Insert (+"boolean", Boolean_Token); Map.Insert (+"byte", Byte_Token); Map.Insert (+"callback", Callback_Token); Map.Insert (+"const", Const_Token); Map.Insert (+"constructor", Constructor_Token); Map.Insert (+"deleter", Deleter_Token); Map.Insert (+"dictionary", Dictionary_Token); Map.Insert (+"double", Double_Token); Map.Insert (+"enum", Enum_Token); Map.Insert (+"false", False_Token); Map.Insert (+"float", Float_Token); Map.Insert (+"getter", Getter_Token); Map.Insert (+"includes", Includes_Token); Map.Insert (+"inherit", Inherit_Token); Map.Insert (+"interface", Interface_Token); Map.Insert (+"iterable", Iterable_Token); Map.Insert (+"long", Long_Token); Map.Insert (+"maplike", Maplike_Token); Map.Insert (+"mixin", Mixin_Token); Map.Insert (+"namespace", Namespace_Token); Map.Insert (+"null", Null_Token); Map.Insert (+"object", Object_Token); Map.Insert (+"octet", Octet_Token); Map.Insert (+"optional", Optional_Token); Map.Insert (+"or", Or_Token); Map.Insert (+"other", Other_Token); Map.Insert (+"partial", Partial_Token); Map.Insert (+"readonly", Readonly_Token); Map.Insert (+"record", Record_Token); Map.Insert (+"required", Required_Token); Map.Insert (+"sequence", Sequence_Token); Map.Insert (+"setlike", Setlike_Token); Map.Insert (+"setter", Setter_Token); Map.Insert (+"short", Short_Token); Map.Insert (+"static", Static_Token); Map.Insert (+"stringifier", Stringifier_Token); Map.Insert (+"symbol", Symbol_Token); Map.Insert (+"true", True_Token); Map.Insert (+"typedef", Typedef_Token); Map.Insert (+"undefined", Undefined_Token); Map.Insert (+"unrestricted", Unrestricted_Token); Map.Insert (+"unsigned", Unsigned_Token); Map.Insert (+"ArrayBuffer", ArrayBuffer_Token); Map.Insert (+"ByteString", ByteString_Token); Map.Insert (+"DataView", DataView_Token); Map.Insert (+"DOMString", DOMString_Token); Map.Insert (+"Float32Array", Float32Array_Token); Map.Insert (+"Float64Array", Float64Array_Token); Map.Insert (+"FrozenArray", FrozenArray_Token); Map.Insert (+"Infinity", Infinity_Token); Map.Insert (+"Int16Array", Int16Array_Token); Map.Insert (+"Int32Array", Int32Array_Token); Map.Insert (+"Int8Array", Int8Array_Token); Map.Insert (+"NaN", NaN_Token); Map.Insert (+"ObservableArray", ObservableArray_Token); Map.Insert (+"Promise", Promise_Token); Map.Insert (+"Uint16Array", Uint16Array_Token); Map.Insert (+"Uint32Array", Uint32Array_Token); Map.Insert (+"Uint8Array", Uint8Array_Token); Map.Insert (+"Uint8ClampedArray", Uint8ClampedArray_Token); Map.Insert (+"USVString", USVString_Token); null; end Initialize; overriding procedure String (Self : not null access Handler; Scanner : not null access WebIDL.Scanners.Scanner'Class; Rule : WebIDL.Scanner_Types.Rule_Index; Token : out WebIDL.Tokens.Token_Kind; Skip : in out Boolean) is pragma Unreferenced (Skip); begin Token := WebIDL.Tokens.String_Token; Skip := False; end String; overriding procedure Whitespace (Self : not null access Handler; Scanner : not null access WebIDL.Scanners.Scanner'Class; Rule : WebIDL.Scanner_Types.Rule_Index; Token : out WebIDL.Tokens.Token_Kind; Skip : in out Boolean) is pragma Unreferenced (Token); begin Skip := True; end Whitespace; overriding procedure Line_Comment (Self : not null access Handler; Scanner : not null access WebIDL.Scanners.Scanner'Class; Rule : WebIDL.Scanner_Types.Rule_Index; Token : out WebIDL.Tokens.Token_Kind; Skip : in out Boolean) is pragma Unreferenced (Token); begin Skip := True; end Line_Comment; overriding procedure Comment_Start (Self : not null access Handler; Scanner : not null access WebIDL.Scanners.Scanner'Class; Rule : WebIDL.Scanner_Types.Rule_Index; Token : out WebIDL.Tokens.Token_Kind; Skip : in out Boolean) is pragma Unreferenced (Token); begin Scanner.Set_Start_Condition (WebIDL.Scanner_Types.In_Comment); Skip := True; end Comment_Start; overriding procedure Comment_End (Self : not null access Handler; Scanner : not null access WebIDL.Scanners.Scanner'Class; Rule : WebIDL.Scanner_Types.Rule_Index; Token : out WebIDL.Tokens.Token_Kind; Skip : in out Boolean) is pragma Unreferenced (Token); begin Scanner.Set_Start_Condition (WebIDL.Scanner_Types.INITIAL); Skip := True; end Comment_End; overriding procedure Comment_Text (Self : not null access Handler; Scanner : not null access WebIDL.Scanners.Scanner'Class; Rule : WebIDL.Scanner_Types.Rule_Index; Token : out WebIDL.Tokens.Token_Kind; Skip : in out Boolean) is pragma Unreferenced (Token); begin Skip := True; end Comment_Text; end WebIDL.Token_Handlers;
hmi_sdk/hmi_sdk/Tools/ffmpeg-2.6.2/libavutil/x86/cpuid.asm
APCVSRepo/android_packet
4
172379
<gh_stars>1-10 ;***************************************************************************** ;* Copyright (C) 2005-2010 x264 project ;* ;* Authors: <NAME> <<EMAIL>> ;* <NAME> <<EMAIL>> ;* ;* This file is part of FFmpeg. ;* ;* FFmpeg is free software; you can redistribute it and/or ;* modify it under the terms of the GNU Lesser General Public ;* License as published by the Free Software Foundation; either ;* version 2.1 of the License, or (at your option) any later version. ;* ;* FFmpeg is distributed in the hope that it will be useful, ;* but WITHOUT ANY WARRANTY; without even the implied warranty of ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;* Lesser General Public License for more details. ;* ;* You should have received a copy of the GNU Lesser General Public ;* License along with FFmpeg; if not, write to the Free Software ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;****************************************************************************** %include "x86util.asm" SECTION .text ;----------------------------------------------------------------------------- ; void ff_cpu_cpuid(int index, int *eax, int *ebx, int *ecx, int *edx) ;----------------------------------------------------------------------------- cglobal cpu_cpuid, 5,7 push rbx push r4 push r3 push r2 push r1 mov eax, r0d xor ecx, ecx cpuid pop r4 mov [r4], eax pop r4 mov [r4], ebx pop r4 mov [r4], ecx pop r4 mov [r4], edx pop rbx RET ;----------------------------------------------------------------------------- ; void ff_cpu_xgetbv(int op, int *eax, int *edx) ;----------------------------------------------------------------------------- cglobal cpu_xgetbv, 3,7 push r2 push r1 mov ecx, r0d xgetbv pop r4 mov [r4], eax pop r4 mov [r4], edx RET %if ARCH_X86_64 == 0 ;----------------------------------------------------------------------------- ; int ff_cpu_cpuid_test(void) ; return 0 if unsupported ;----------------------------------------------------------------------------- cglobal cpu_cpuid_test pushfd push ebx push ebp push esi push edi pushfd pop eax mov ebx, eax xor eax, 0x200000 push eax popfd pushfd pop eax xor eax, ebx pop edi pop esi pop ebp pop ebx popfd ret %endif
oeis/290/A290075.asm
neoneye/loda-programs
11
19871
<reponame>neoneye/loda-programs<gh_stars>10-100 ; A290075: Number of monomials in c(n) where c(1) = x, c(2) = y, c(n+2) = c(n+1) + c(n)^2. ; Submitted by <NAME> ; 1,1,2,3,5,8,14,24,44,80,152,288,560,1088,2144,4224,8384,16640,33152,66048,131840,263168,525824,1050624,2100224,4198400,8394752,16785408,33566720,67125248,134242304,268468224,536920064,1073807360,2147581952,4295098368,8590131200,17180131328,34360131584,68720001024,137439739904,274878955520,549757386752,1099513724928,2199026401280,4398050705408,8796099313664,17592194433024,35184384671744,70368760954880,140737513521152,281475010265088,562950003752960,1125899973951488,2251799914348544 trn $0,1 mov $3,$0 seq $0,209726 ; 1/4 the number of (n+1) X 8 0..2 arrays with every 2 X 2 subblock having distinct clockwise edge differences. mov $2,2 sub $3,1 pow $2,$3 add $0,$2 sub $0,16 div $0,2 add $0,1
src/extended/read_disk.asm
abxxbo/biboot
4
6673
<reponame>abxxbo/biboot ;; read_disk.asm: be able to read the disk. ;; read_disk: finally! the meat and bones of ;; this entire file _read_disk: mov ah, 0x02 ;; Danger: not having this will fail reading disk mov bx, 0x8000 ;; bx is where we will finally load the 32bit/64bit ;; section of our bootloader mov al, 32 ;; 32 sectors = 16384 bytes, ;; to change this, modify SECTOR_AMOUNT mov dl, [BOOT_DISK] mov ch, 0x00 ;; Disk specific stuff mov dh, 0x00 mov cl, 0x02 ;; BIOS has a special interrupt to read disk int 0x13 ;; If not successful, jump to disk_failed jc disk_failed ret ;; BOOT_DISK, shown above BOOT_DISK: db 0 ;; Amount of sectors to read SECTOR_AMOUNT: db 32 disk_failed_str: db 'BIBOOT cant load disk', 13, 10, 0 disk_failed: mov bx, disk_failed_str call printf jmp $
programs/oeis/000/A000332.asm
karttu/loda
1
162083
; A000332: Binomial coefficient binomial(n,4) = n*(n-1)*(n-2)*(n-3)/24. ; 0,0,0,0,1,5,15,35,70,126,210,330,495,715,1001,1365,1820,2380,3060,3876,4845,5985,7315,8855,10626,12650,14950,17550,20475,23751,27405,31465,35960,40920,46376,52360,58905,66045,73815,82251,91390,101270,111930,123410,135751,148995,163185,178365,194580,211876,230300,249900,270725,292825,316251,341055,367290,395010,424270,455126,487635,521855,557845,595665,635376,677040,720720,766480,814385,864501,916895,971635,1028790,1088430,1150626,1215450,1282975,1353275,1426425,1502501,1581580,1663740,1749060,1837620,1929501,2024785,2123555,2225895,2331890,2441626,2555190,2672670,2794155,2919735,3049501,3183545,3321960,3464840,3612280,3764376,3921225,4082925,4249575,4421275,4598126,4780230,4967690,5160610,5359095,5563251,5773185,5989005,6210820,6438740,6672876,6913340,7160245,7413705,7673835,7940751,8214570,8495410,8783390,9078630,9381251,9691375,10009125,10334625,10668000,11009376,11358880,11716640,12082785,12457445,12840751,13232835,13633830,14043870,14463090,14891626,15329615,15777195,16234505,16701685,17178876,17666220,18163860,18671940,19190605,19720001,20260275,20811575,21374050,21947850,22533126,23130030,23738715,24359335,24992045,25637001,26294360,26964280,27646920,28342440,29051001,29772765,30507895,31256555,32018910,32795126,33585370,34389810,35208615,36041955,36890001,37752925,38630900,39524100,40432700,41356876,42296805,43252665,44224635,45212895,46217626,47239010,48277230,49332470,50404915,51494751,52602165,53727345,54870480,56031760,57211376,58409520,59626385,60862165,62117055,63391251,64684950,65998350,67331650,68685050,70058751,71452955,72867865,74303685,75760620,77238876,78738660,80260180,81803645,83369265,84957251,86567815,88201170,89857530,91537110,93240126,94966795,96717335,98491965,100290905,102114376,103962600,105835800,107734200,109658025,111607501,113582855,115584315,117612110,119666470,121747626,123855810,125991255,128154195,130344865,132563501,134810340,137085620,139389580,141722460,144084501,146475945,148897035,151348015,153829130,156340626 bin $0,4 mov $1,$0
oeis/336/A336477.asm
neoneye/loda-programs
11
100288
; A336477: a(n) = 1 if a regular n-gon is constructible with ruler (or, more precisely, an unmarked straightedge) and compass, 0 otherwise. ; Submitted by <NAME> ; 1,1,1,1,1,1,0,1,0,1,0,1,0,0,1,1,1,0,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0 mov $3,7 lpb $3 seq $0,53575 ; Odd part of phi(n): a(n) = A000265(A000010(n)). mul $0,$3 div $0,4 mul $0,3 mov $2,$0 cmp $2,0 mov $3,$0 lpe mov $0,$2
programs/oeis/019/A019489.asm
neoneye/loda
22
24611
<reponame>neoneye/loda<gh_stars>10-100 ; A019489: Define the sequence T(a(0),a(1)) by a(n+2) is the greatest integer such that a(n+2)/a(n+1) < a(n+1)/a(n) for n >= 0. This is T(3,7). ; 3,7,16,36,80,177,391,863,1904,4200,9264,20433,45067,99399,219232,483532,1066464,2352161,5187855,11442175,25236512,55660880,122763936,270764385,597189651,1317143239,2905050864,6407291380,14131726000,31168502865,68744297111,151620320223,334409143312,737562583736,1626745487696,3587900118705,7913362821147,17453471129991,38494842378688,84903047578524,187259566287040,413013974952769,910930997484063,2009121561255167,4431257097463104,9773445192410272,21556011946075712,47543280989614529,104860007171639331,231276026289354375,510095333568323280,1125050674308285892,2481377374905926160,5472850083380175601,12070750841068637095,26622879057043200351,58718608197466576304,129507967236001789704,285638813529046779760,629996235255560135825,1389500437747122061355,3064639689023290902471,6759275613302141940768,14908051664351405942892,32880743017726102788256,72520761648754347517281,159949574961860100977455,352779892941446304743167,778080547531646957003616,1716110670025154014984688,3785001232991754334712544,8348083013515155626428705,18412276697055465267842099,40609554627102684870396743,89567192267720525367222192,197546661232496516002286484,435702877092095716874969712,960972946451911959117161617,2119492554136320434236609719,4674687985364736585348189151,10310348917181385129813539920,22740190388499090693863689560,50155068762362917973075568272,110620486441907221075964676465,243981163272313532845793042491,538117395306989983664661653255,1186855277055887188405287982976,2617691717384087909656369008444,5773500830075165802977399670144,12733856937206218794360087323265,28085405591796525498376543654975,61944312013668216799730486980095,136622480964542652393821061283456,301330367520881830286018666221888,664605047055431877371767819423872,1465832575075406407137356700131201,3232995517671694644560732066484291,7130596082398821166493231952392455,15727024739873048740123820604916112,34687044997417792124808373276316516 add $0,2 lpb $0 mov $2,$0 trn $0,2 seq $2,214260 ; First differences of A052980. add $1,$2 lpe mov $0,$1
oeis/253/A253546.asm
neoneye/loda-programs
11
168464
; A253546: Centered hexagonal numbers (A003215) which are also centered heptagonal numbers (A069099). ; Submitted by <NAME> ; 1,547,368551,248402701,167423051797,112842888508351,76055939431576651,51261590333994154297,34550235829172628419401,23286807687272017560521851,15695273830985510663163308047,10578591275276546914954509101701,7129954824262561635168675971238301,4805578972961691265556772650105513047,3238953097821355650423629597495144555251,2183049582352620746694260791939077324726001,1471372179552568561916281350137340621720769297,991702665968848858110826935731775639962473780051 mov $3,1 lpb $0 sub $0,1 mov $1,$3 mul $1,24 add $2,$1 add $3,$2 lpe pow $3,2 mov $0,$3 div $0,624 mul $0,546 add $0,1
oeis/063/A063012.asm
neoneye/loda-programs
11
105278
<reponame>neoneye/loda-programs ; A063012: Sum of distinct powers of 20; i.e., numbers with digits in {0,1} base 20; i.e., write n in base 2 and read as if written in base 20. ; Submitted by <NAME> ; 0,1,20,21,400,401,420,421,8000,8001,8020,8021,8400,8401,8420,8421,160000,160001,160020,160021,160400,160401,160420,160421,168000,168001,168020,168021,168400,168401,168420,168421,3200000,3200001,3200020,3200021,3200400,3200401,3200420,3200421,3208000,3208001,3208020,3208021,3208400,3208401,3208420,3208421,3360000,3360001,3360020,3360021,3360400,3360401,3360420,3360421,3368000,3368001,3368020,3368021,3368400,3368401,3368420,3368421,64000000,64000001,64000020,64000021,64000400,64000401,64000420 mov $3,9 lpb $0 mov $2,$0 div $0,2 mul $2,2 mod $2,4 mul $2,$3 add $1,$2 mul $3,20 lpe mov $0,$1 div $0,18
programs/oeis/061/A061646.asm
neoneye/loda
22
96920
<gh_stars>10-100 ; A061646: a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3) with a(-1) = 1, a(0) = 1, a(1) = 1. ; 1,1,1,3,7,19,49,129,337,883,2311,6051,15841,41473,108577,284259,744199,1948339,5100817,13354113,34961521,91530451,239629831,627359043,1642447297,4299982849,11257501249,29472520899,77160061447,202007663443,528862928881,1384581123201,3624880440721,9490060198963,24845300156167,65045840269539,170292220652449,445830821687809,1167200244410977,3055769911545123,8000109490224391,20944558559128051,54833566187159761,143556140002351233,375834853819893937,983948421457330579,2576010410552097799,6744082810198962819,17656238020044790657,46224631249935409153,121017655729761436801,316828335939348901251,829467352088285266951,2171573720325506899603,5685253808888235431857,14884187706339199395969,38967309310129362756049,102017740224048888872179,267085911362017303860487,699239993862003022709283,1830634070223991764267361,4792662216809972270092801,12547352580205925046011041,32849395523807802867940323,86000833991217483557809927,225153106449844647805489459,589458485358316459858658449,1543222349625104731770485889,4040208563516997735452799217,10577403340925888474587911763,27692001459260667688310936071,72498601036856114590344896451,189803801651307676082723753281,496912803917066913657826363393,1300934610099893064890755336897,3405891026382612281014439647299,8916738469047943778152563604999,23344324380761219053443251167699,61116234673235713382177189898097,160004379638945921093088318526593,418896904243602049897087765681681,1096686333091860228598174978518451,2871162095031978635897437169873671,7516799952004075679094136531102563,19679237760980248401384972423434017,51520913330936669525060780739199489,134883502231829760173797369794164449,353129593364552610996331328643293859,924505277861828072815196616135717127 trn $0,1 seq $0,5248 ; Bisection of Lucas numbers: a(n) = L(2*n) = A000032(2*n). div $0,5 mul $0,2 add $0,1
Projetos/I-VM/bin/nasm/StaticsTest.nasm
juanjorgegarcia/Z01
0
241916
; Inicialização para VM leaw $Main.main, %A jmp nop ; 0 - Declarando função Class2.set Class2.set: ; 1 - PUSH argument 0 leaw $0,%A movw %A,%D leaw $ARG,%A addw (%A),%D,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) ; 2 - POP static 0 leaw $SP,%A movw (%A),%D decw %D movw %D,(%A) movw (%A),%A movw (%A),%D leaw $Class2.0,%A movw %D,(%A) ; 3 - PUSH argument 1 leaw $1,%A movw %A,%D leaw $ARG,%A addw (%A),%D,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) ; 4 - POP static 1 leaw $SP,%A movw (%A),%D decw %D movw %D,(%A) movw (%A),%A movw (%A),%D leaw $Class2.1,%A movw %D,(%A) ; 5 - PUSH constant 0 leaw $0,%A movw %A,%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) ; 6 - Retorno de função ; Retorno de função leaw $LCL,%A movw (%A),%D leaw $R13,%A movw %D,(%A) leaw $5,%A subw %D,%A,%A movw (%A),%D leaw $R14,%A movw %D,(%A) leaw $ARG,%A movw (%A),%D leaw $R15,%A movw %D,(%A) leaw $SP,%A movw (%A),%D decw %D movw %D,(%A) movw %D,%A movw (%A),%D leaw $R15,%A movw (%A),%A movw %D,(%A) leaw $ARG,%A movw (%A),%D leaw $SP,%A addw %D,$1,(%A) leaw $R13,%A subw (%A),$1,%D movw %D,(%A) movw %D,%A movw (%A),%D leaw $THAT,%A movw %D,(%A) leaw $R13,%A subw (%A),$1,%D movw %D,(%A) movw %D,%A movw (%A),%D leaw $THIS,%A movw %D,(%A) leaw $R13,%A subw (%A),$1,%D movw %D,(%A) movw %D,%A movw (%A),%D leaw $ARG,%A movw %D,(%A) leaw $R13,%A subw (%A),$1,%D movw %D,(%A) movw %D,%A movw (%A),%D leaw $LCL,%A movw %D,(%A) leaw $R14,%A movw (%A),%A jmp nop ; 7 - Declarando função Class2.get Class2.get: ; 8 - PUSH static 0 leaw $Class2.0,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) ; 9 - PUSH static 1 leaw $Class2.1,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) ; 10 - SUB leaw $SP,%A movw (%A),%D decw %D movw %D,(%A) movw (%A),%A movw (%A),%D leaw $SP,%A subw (%A),$1,%A subw (%A),%D,%D movw %D,(%A) ; 11 - Retorno de função ; Retorno de função leaw $LCL,%A movw (%A),%D leaw $R13,%A movw %D,(%A) leaw $5,%A subw %D,%A,%A movw (%A),%D leaw $R14,%A movw %D,(%A) leaw $ARG,%A movw (%A),%D leaw $R15,%A movw %D,(%A) leaw $SP,%A movw (%A),%D decw %D movw %D,(%A) movw %D,%A movw (%A),%D leaw $R15,%A movw (%A),%A movw %D,(%A) leaw $ARG,%A movw (%A),%D leaw $SP,%A addw %D,$1,(%A) leaw $R13,%A subw (%A),$1,%D movw %D,(%A) movw %D,%A movw (%A),%D leaw $THAT,%A movw %D,(%A) leaw $R13,%A subw (%A),$1,%D movw %D,(%A) movw %D,%A movw (%A),%D leaw $THIS,%A movw %D,(%A) leaw $R13,%A subw (%A),$1,%D movw %D,(%A) movw %D,%A movw (%A),%D leaw $ARG,%A movw %D,(%A) leaw $R13,%A subw (%A),$1,%D movw %D,(%A) movw %D,%A movw (%A),%D leaw $LCL,%A movw %D,(%A) leaw $R14,%A movw (%A),%A jmp nop ; End ; 12 - Declarando função Main.main Main.main: ; 13 - PUSH constant 6 leaw $6,%A movw %A,%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) ; 14 - PUSH constant 8 leaw $8,%A movw %A,%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) ; 15 - chamada de funcao Class1.set leaw $Class1.set.ret.1,%A movw %A,%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) leaw $LCL,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) leaw $ARG,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) leaw $THIS,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) leaw $THAT,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) leaw $7,%A movw %A,%D leaw $SP,%A movw (%A),%A subw %A,%D,%D leaw $ARG,%A movw %D,(%A) leaw $SP,%A movw (%A),%D leaw $LCL,%A movw %D,(%A) leaw $Class1.set,%A jmp nop Class1.set.ret.1: ; 16 - POP temp 0 leaw $SP,%A movw (%A),%D decw %D movw %D,(%A) movw (%A),%A movw (%A),%D leaw $5,%A movw %D,(%A) ; 17 - PUSH constant 23 leaw $23,%A movw %A,%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) ; 18 - PUSH constant 15 leaw $15,%A movw %A,%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) ; 19 - chamada de funcao Class2.set leaw $Class2.set.ret.1,%A movw %A,%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) leaw $LCL,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) leaw $ARG,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) leaw $THIS,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) leaw $THAT,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) leaw $7,%A movw %A,%D leaw $SP,%A movw (%A),%A subw %A,%D,%D leaw $ARG,%A movw %D,(%A) leaw $SP,%A movw (%A),%D leaw $LCL,%A movw %D,(%A) leaw $Class2.set,%A jmp nop Class2.set.ret.1: ; 20 - POP temp 0 leaw $SP,%A movw (%A),%D decw %D movw %D,(%A) movw (%A),%A movw (%A),%D leaw $5,%A movw %D,(%A) ; 21 - chamada de funcao Class1.get leaw $Class1.get.ret.1,%A movw %A,%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) leaw $LCL,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) leaw $ARG,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) leaw $THIS,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) leaw $THAT,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) leaw $5,%A movw %A,%D leaw $SP,%A movw (%A),%A subw %A,%D,%D leaw $ARG,%A movw %D,(%A) leaw $SP,%A movw (%A),%D leaw $LCL,%A movw %D,(%A) leaw $Class1.get,%A jmp nop Class1.get.ret.1: ; 22 - chamada de funcao Class2.get leaw $Class2.get.ret.1,%A movw %A,%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) leaw $LCL,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) leaw $ARG,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) leaw $THIS,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) leaw $THAT,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) leaw $5,%A movw %A,%D leaw $SP,%A movw (%A),%A subw %A,%D,%D leaw $ARG,%A movw %D,(%A) leaw $SP,%A movw (%A),%D leaw $LCL,%A movw %D,(%A) leaw $Class2.get,%A jmp nop Class2.get.ret.1: ; Label (marcador) Sys.Main.main.WHILE: ; 23 - Goto Incondicional leaw $Sys.Main.main.WHILE,%A jmp nop ; End ; 24 - Declarando função Class1.set Class1.set: ; 25 - PUSH argument 0 leaw $0,%A movw %A,%D leaw $ARG,%A addw (%A),%D,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) ; 26 - POP static 0 leaw $SP,%A movw (%A),%D decw %D movw %D,(%A) movw (%A),%A movw (%A),%D leaw $Class1.0,%A movw %D,(%A) ; 27 - PUSH argument 1 leaw $1,%A movw %A,%D leaw $ARG,%A addw (%A),%D,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) ; 28 - POP static 1 leaw $SP,%A movw (%A),%D decw %D movw %D,(%A) movw (%A),%A movw (%A),%D leaw $Class1.1,%A movw %D,(%A) ; 29 - PUSH constant 0 leaw $0,%A movw %A,%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) ; 30 - Retorno de função ; Retorno de função leaw $LCL,%A movw (%A),%D leaw $R13,%A movw %D,(%A) leaw $5,%A subw %D,%A,%A movw (%A),%D leaw $R14,%A movw %D,(%A) leaw $ARG,%A movw (%A),%D leaw $R15,%A movw %D,(%A) leaw $SP,%A movw (%A),%D decw %D movw %D,(%A) movw %D,%A movw (%A),%D leaw $R15,%A movw (%A),%A movw %D,(%A) leaw $ARG,%A movw (%A),%D leaw $SP,%A addw %D,$1,(%A) leaw $R13,%A subw (%A),$1,%D movw %D,(%A) movw %D,%A movw (%A),%D leaw $THAT,%A movw %D,(%A) leaw $R13,%A subw (%A),$1,%D movw %D,(%A) movw %D,%A movw (%A),%D leaw $THIS,%A movw %D,(%A) leaw $R13,%A subw (%A),$1,%D movw %D,(%A) movw %D,%A movw (%A),%D leaw $ARG,%A movw %D,(%A) leaw $R13,%A subw (%A),$1,%D movw %D,(%A) movw %D,%A movw (%A),%D leaw $LCL,%A movw %D,(%A) leaw $R14,%A movw (%A),%A jmp nop ; 31 - Declarando função Class1.get Class1.get: ; 32 - PUSH static 0 leaw $Class1.0,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) ; 33 - PUSH static 1 leaw $Class1.1,%A movw (%A),%D leaw $SP,%A movw (%A),%A movw %D,(%A) leaw $SP,%A movw (%A),%D incw %D movw %D,(%A) ; 34 - SUB leaw $SP,%A movw (%A),%D decw %D movw %D,(%A) movw (%A),%A movw (%A),%D leaw $SP,%A subw (%A),$1,%A subw (%A),%D,%D movw %D,(%A) ; 35 - Retorno de função ; Retorno de função leaw $LCL,%A movw (%A),%D leaw $R13,%A movw %D,(%A) leaw $5,%A subw %D,%A,%A movw (%A),%D leaw $R14,%A movw %D,(%A) leaw $ARG,%A movw (%A),%D leaw $R15,%A movw %D,(%A) leaw $SP,%A movw (%A),%D decw %D movw %D,(%A) movw %D,%A movw (%A),%D leaw $R15,%A movw (%A),%A movw %D,(%A) leaw $ARG,%A movw (%A),%D leaw $SP,%A addw %D,$1,(%A) leaw $R13,%A subw (%A),$1,%D movw %D,(%A) movw %D,%A movw (%A),%D leaw $THAT,%A movw %D,(%A) leaw $R13,%A subw (%A),$1,%D movw %D,(%A) movw %D,%A movw (%A),%D leaw $THIS,%A movw %D,(%A) leaw $R13,%A subw (%A),$1,%D movw %D,(%A) movw %D,%A movw (%A),%D leaw $ARG,%A movw %D,(%A) leaw $R13,%A subw (%A),$1,%D movw %D,(%A) movw %D,%A movw (%A),%D leaw $LCL,%A movw %D,(%A) leaw $R14,%A movw (%A),%A jmp nop ; End
src/static/antlr4/grammars/CoverExpressions.g4
jlenoble/ecmascript-parser
0
6206
/* Source: ECMAScript® 2018 Language Specification - Annex A-2 */ grammar CoverExpressions; // CoverParenthesizedExpressionAndArrowParameterList[Yield, Await]: // ( Expression[+In, ?Yield, ?Await] ) // ( Expression[+In, ?Yield, ?Await] , ) // ( ) // ( ... BindingIdentifier[?Yield, ?Await] ) // ( ... BindingPattern[?Yield, ?Await] ) // ( Expression[+In, ?Yield, ?Await] , ... BindingIdentifier[?Yield, ?Await] ) // ( Expression[+In, ?Yield, ?Await] , ... BindingPattern[?Yield, ?Await] ) coverParenthesizedExpressionAndArrowParameterList : OpenParen (expressionList Comma?)? CloseParen | OpenParen Spread bindingIdentifier CloseParen | OpenParen Spread bindingPattern CloseParen | OpenParen expressionList Comma Spread bindingIdentifier CloseParen | OpenParen expressionList Comma Spread bindingPattern CloseParen ; // When processing an instance of the production PrimaryExpression: // CoverParenthesizedExpressionAndArrowParameterList the interpretation of // CoverParenthesizedExpressionAndArrowParameterList is refined using the // following grammar: // ParenthesizedExpression[Yield, Await]: // ( Expression[+In, ?Yield, ?Await] ) /* parenthesizedExpression : OpenParen expressionList CloseParen ;*/ // CoverCallExpressionAndAsyncArrowHead[Yield, Await]: // MemberExpression[?Yield, ?Await] Arguments[?Yield, ?Await] /* coverCallExpressionAndAsyncArrowHead : memberExpression arguments ;*/ // When processing an instance of the production CallExpression:CoverCallExpressionAndAsyncArrowHead the interpretation of CoverCallExpressionAndAsyncArrowHead is refined using the following grammar: // CallMemberExpression[Yield, Await]: // MemberExpression[?Yield, ?Await] Arguments[?Yield, ?Await] /*callMemberExpression : memberExpression arguments ;*/
software/modules/sensors/gps.adb
TUM-EI-RCS/StratoX
12
19794
<filename>software/modules/sensors/gps.adb<gh_stars>10-100 with ublox8.Driver; use ublox8; with Bounded_Image; use Bounded_Image; package body GPS with SPARK_Mode, Refined_State => (State => (null)) is --overriding procedure initialize (Self : in out GPS_Tag) is begin Driver.init; Self.state := READY; end initialize; --overriding procedure read_Measurement(Self : in out GPS_Tag) is pragma Unreferenced (Self); begin Driver.update_val; end read_Measurement; function get_Position(Self : GPS_Tag) return GPS_Data_Type is pragma Unreferenced (Self); begin return Driver.get_Position; end get_Position; function get_GPS_Fix(Self : GPS_Tag) return GPS_Fix_Type is pragma Unreferenced (Self); begin return Driver.get_Fix; end get_GPS_Fix; function get_Speed(Self : GPS_Tag) return Units.Linear_Velocity_Type is pragma Unreferenced (Self); begin return Driver.get_Velo; end get_Speed; function get_Pos_Accuracy(Self : GPS_Tag) return Units.Length_Type is pragma Unreferenced (Self); begin return Driver.get_Vertical_Accuracy; -- vertical is always worse than horizontal end get_Pos_Accuracy; function get_Time(Self : GPS_Tag) return GPS_DateTime is pragma Unreferenced (Self); begin return Driver.get_Time; end get_Time; function get_Num_Sats(Self : GPS_Tag) return Unsigned_8 is pragma Unreferenced (Self); begin return Driver.get_Nsat; end get_Num_Sats; function Image (tm : GPS_DateTime) return String is begin return Natural_Img ( Natural (tm.year)) & "-" & Unsigned8_Img ( Unsigned_8 (tm.mon)) & "-" & Unsigned8_Img ( Unsigned_8 (tm.day)) & " " & Unsigned8_Img (Unsigned_8 (tm.hour)) & ":" & Unsigned8_Img ( Unsigned_8 (tm.min)) & ":" & Unsigned8_Img ( Unsigned_8 (tm.sec)); end Image; end GPS;
src/auxiliar.asm
santiontanon/talesofpopolon-ext
4
162547
<gh_stars>1-10 ;----------------------------------------------- ; pletter v0.5c msx unpacker ; call unpack with hl pointing to some pletter5 data, and de pointing to the destination. ; changes all registers GETBIT: MACRO add a,a call z,pletter_getbit ENDM GETBITEXX: MACRO add a,a call z,pletter_getbitexx ENDM pletter_unpack: ld a,(hl) inc hl exx ld de,0 add a,a inc a rl e add a,a rl e add a,a rl e rl e ld hl,pletter_modes add hl,de ld e,(hl) ld ixl,e inc hl ld e,(hl) ld ixh,e ld e,1 exx ld iy,pletter_loop pletter_literal: ldi pletter_loop: GETBIT jr nc,pletter_literal exx ld h,d ld l,e pletter_getlen: GETBITEXX jr nc,pletter_lenok pletter_lus: GETBITEXX adc hl,hl ret c GETBITEXX jr nc,pletter_lenok GETBITEXX adc hl,hl ret c GETBITEXX jp c,pletter_lus pletter_lenok: inc hl exx ld c,(hl) inc hl ld b,0 bit 7,c jp z,pletter_offsok jp ix pletter_mode6: GETBIT rl b pletter_mode5: GETBIT rl b pletter_mode4: GETBIT rl b pletter_mode3: GETBIT rl b pletter_mode2: GETBIT rl b GETBIT jr nc,pletter_offsok or a inc b res 7,c pletter_offsok: inc bc push hl exx push hl exx ld l,e ld h,d sbc hl,bc pop bc ldir pop hl jp iy pletter_getbit: ld a,(hl) inc hl rla ret pletter_getbitexx: exx ld a,(hl) inc hl exx rla ret pletter_modes: dw pletter_offsok dw pletter_mode2 dw pletter_mode3 dw pletter_mode4 dw pletter_mode5 dw pletter_mode6 ;----------------------------------------------- ; Source: (thanks to ARTRAG) https://www.msx.org/forum/msx-talk/development/memory-pages-again ; Sets the memory pages to : BIOS, ROM, ROM, RAM setupROMRAMslots: call RSLREG ; Reads the primary slot register rrca rrca and #03 ; keep the two bits for page 1 ld c,a add a,#C1 ld l,a ld h,#FC ; HL = EXPTBL + a ld a,(hl) and #80 ; keep just the most significant bit (expanded or not) or c ld c,a ; c = a || c (a had #80 if slot was expanded, and #00 otherwise) inc l inc l inc l inc l ; increment 4, in order to get to the corresponding SLTTBL ld a,(hl) and #0C or c ; in A the rom slotvar ld h,#80 ; move page 1 of the ROM to page 2 in main memory jp ENASLT ;----------------------------------------------- ; Source: https://www.msx.org/forum/msx-talk/development/8-bit-atan2?page=0 ; 8-bit atan2 ; Calculate the angle, in a 256-degree circle. ; The trick is to use logarithmic division to get the y/x ratio and ; integrate the power function into the atan table. ; input ; B = x, C = y in -128,127 ; ; output ; A = angle in 0-255 ; | ; q1 | q0 ;------+------- ; q3 | q2 ; | atan2: ld de,#8000 ld a,c add a,d rl e ; y- ld a,b add a,d rl e ; x- dec e jp z,atan2_q1 dec e jp z,atan2_q2 dec e jp z,atan2_q3 atan2_q0: ld h,log2_tab / 256 ld l,b ld a,(hl) ; 32*log2(x) ld l,c sub (hl) ; 32*log2(x/y) jr nc,atan2_1f ; |x|>|y| neg ; |x|<|y| A = 32*log2(y/x) atan2_1f: ld l,a ld h,atan_tab / 256 ld a,(hl) ret c ; |x|<|y| neg and #3F ; |x|>|y| ret atan2_q1: ld a,b neg ld b,a call atan2_q0 neg and #7F ret atan2_q2: ld a,c neg ld c,a call atan2_q0 neg ret atan2_q3: ld a,b neg ld b,a ld a,c neg ld c,a call atan2_q0 add a,128 ret ;----------------------------------------------- ; calls "halt" "b" times waitBhalts: halt djnz waitBhalts ret ;----------------------------------------------- ; hl = a*32 hl_equal_a_times_32: ld h,0 ld l,a add hl,hl add hl,hl add hl,hl add hl,hl add hl,hl ret ;----------------------------------------------- ; clears an area of memory to 0s very fast (faster than with ldir) by using the stack. ; Method inspired in this idea: http://www.cpcwiki.eu/index.php/Programming:Filling_memory_with_a_byte#Using_the_stack ; - Interrupts are disabled, since we are messing with the SP register temporarily ; - can clear up to 4096 bytes (could be extended easily, but not needed for this game) ; - input: ; - hl: last memory address to clear + 1 ; - bc: amount of memory to clear ; - a: byte to write fast_memory_clear: di ld (SP_buffer_for_fast_memory_clear),sp ld sp,hl ; 1 byte beyond the last position to set to 0 sla c rl b sla c rl b sla c rl b sla c rl b ld h,a ; data we will write ld l,a ; Fill the memory fast_memory_clear_loop: push hl ; write 2 bytes push hl ; write 2 bytes push hl ; write 2 bytes push hl ; write 2 bytes push hl ; write 2 bytes push hl ; write 2 bytes push hl ; write 2 bytes push hl ; write 2 bytes djnz fast_memory_clear_loop ld sp,(SP_buffer_for_fast_memory_clear) ei ret ;----------------------------------------------- ; Check the amount of VRAM checkAmountOfVRAM: xor a ld hl,raycast_double_buffer ld (hl),a inc hl ; hl = raycast_use_double_buffer ld (hl),a ld a,(MODE) and #06 ret z inc (hl) ret ;----------------------------------------------- ; source: https://www.msx.org/forum/development/msx-development/how-0?page=0 ; returns 1 in a and clears z flag if vdp is 60Hz CheckIf60Hz: di in a,(#99) nop nop nop CheckIf60Hz_vdpSync: in a,(#99) and #80 jr z,CheckIf60Hz_vdpSync ld hl,#900 CheckIf60Hz_vdpLoop: dec hl ld a,h or l jr nz,CheckIf60Hz_vdpLoop in a,(#99) rlca and 1 ei ret ;----------------------------------------------- ; A couple of useful macros for adding 16 and 8 bit numbers ADD_HL_A: MACRO add a,l ld l,a jr nc, $+3 inc h ENDM ADD_DE_A: MACRO add a,e ld e,a jr nc, $+3 inc d ENDM ADD_HL_A_VIA_BC: MACRO ld b,0 ld c,a add hl,bc ENDM ;----------------------------------------------- ; macro to print a debug character to screen ;DEBUG: MACRO ?character,?position ; push hl ; push af ; ld hl,NAMTBL2+256+256+7*32 ; ld a,?position ; ADD_HL_A ; ld a,?character ; call WRTVRM ; pop af ; pop hl ; ENDM
src/net-protos-dispatchers.ads
stcarrez/ada-enet
16
16702
----------------------------------------------------------------------- -- net-protos-dispatchers -- Network protocol dispatchers -- Copyright (C) 2016, 2017 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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. ----------------------------------------------------------------------- with Net.Buffers; with Net.Interfaces; package Net.Protos.Dispatchers is -- Set a protocol handler to deal with a packet of the given protocol when it is received. -- Return the previous protocol handler. procedure Set_Handler (Proto : in Net.Uint8; Handler : in Receive_Handler; Previous : out Receive_Handler); -- Receive an IPv4 packet and dispatch it according to the protocol. procedure Receive (Ifnet : in out Net.Interfaces.Ifnet_Type'Class; Packet : in out Net.Buffers.Buffer_Type) with Pre => not Packet.Is_Null; end Net.Protos.Dispatchers;
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_2_707.asm
ljhsiun2/medusa
9
21435
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r12 push %r8 push %r9 push %rcx push %rdi push %rsi lea addresses_normal_ht+0x106a9, %r8 nop nop nop xor %r12, %r12 mov $0x6162636465666768, %rcx movq %rcx, (%r8) nop nop and %r10, %r10 lea addresses_normal_ht+0x18735, %rsi lea addresses_normal_ht+0x1e7cd, %rdi nop nop nop nop add %r8, %r8 mov $24, %rcx rep movsw sub %rsi, %rsi lea addresses_WC_ht+0x9361, %rsi lea addresses_UC_ht+0x194c9, %rdi nop nop nop nop add $53177, %r11 mov $43, %rcx rep movsq nop dec %rcx lea addresses_D_ht+0x103e9, %rsi clflush (%rsi) nop xor %r12, %r12 movb $0x61, (%rsi) nop nop nop nop and $4335, %r8 lea addresses_WT_ht+0x58c9, %r11 mfence movb (%r11), %r12b nop xor $46295, %rsi lea addresses_WC_ht+0x19aa1, %rsi lea addresses_UC_ht+0x15401, %rdi and $42764, %r9 mov $7, %rcx rep movsq nop nop nop add %r9, %r9 lea addresses_normal_ht+0x16849, %r9 xor $26443, %r11 and $0xffffffffffffffc0, %r9 vmovaps (%r9), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $0, %xmm2, %rcx nop xor %rdi, %rdi lea addresses_WT_ht+0x9a41, %rsi nop nop xor %r10, %r10 mov $0x6162636465666768, %rcx movq %rcx, %xmm5 and $0xffffffffffffffc0, %rsi movaps %xmm5, (%rsi) nop nop nop nop nop and $26694, %rcx lea addresses_WT_ht+0x16f61, %r12 clflush (%r12) nop nop nop nop nop mfence mov (%r12), %r10w nop nop nop xor %rsi, %rsi lea addresses_WC_ht+0x3cc9, %r10 nop nop nop nop inc %r11 vmovups (%r10), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $1, %xmm5, %rdi nop nop nop nop add %rcx, %rcx lea addresses_normal_ht+0x1db39, %rcx nop nop nop nop nop sub $62958, %rsi movw $0x6162, (%rcx) nop cmp $48175, %rdi lea addresses_WT_ht+0x1c8c9, %r12 nop nop nop nop and $54024, %rcx and $0xffffffffffffffc0, %r12 vmovaps (%r12), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $1, %xmm5, %r11 nop dec %rsi lea addresses_normal_ht+0x1cd89, %rsi lea addresses_WC_ht+0x1c1c9, %rdi nop dec %r12 mov $39, %rcx rep movsw nop cmp %r12, %r12 pop %rsi pop %rdi pop %rcx pop %r9 pop %r8 pop %r12 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r14 push %r15 push %r8 push %rbp push %rbx // Store lea addresses_RW+0xacb9, %r14 nop nop sub %rbp, %rbp mov $0x5152535455565758, %r15 movq %r15, %xmm1 movups %xmm1, (%r14) nop nop nop add %r10, %r10 // Store lea addresses_UC+0x92c9, %r10 nop nop nop nop add $15348, %r13 movb $0x51, (%r10) nop nop add $6721, %r8 // Store lea addresses_D+0x17f51, %r10 dec %r15 mov $0x5152535455565758, %rbp movq %rbp, %xmm1 vmovups %ymm1, (%r10) nop nop sub %r8, %r8 // Faulty Load lea addresses_normal+0x80c9, %r10 cmp $5836, %rbp movb (%r10), %r14b lea oracles, %rbx and $0xff, %r14 shlq $12, %r14 mov (%rbx,%r14,1), %r14 pop %rbx pop %rbp pop %r8 pop %r15 pop %r14 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': True}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': True, 'NT': False, 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 16, 'AVXalign': True, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': True, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}} {'34': 2} 34 34 */
Categories/Category/Monoidal/Symmetric.agda
rei1024/agda-categories
0
14159
{-# OPTIONS --without-K --safe #-} open import Categories.Category open import Categories.Category.Monoidal module Categories.Category.Monoidal.Symmetric {o ℓ e} {C : Category o ℓ e} (M : Monoidal C) where open import Level open import Data.Product using (Σ; _,_) open import Categories.Functor.Bifunctor open import Categories.NaturalTransformation.NaturalIsomorphism open import Categories.Morphism C open import Categories.Category.Monoidal.Braided M open Category C open Commutation private variable X Y Z : Obj -- symmetric monoidal category -- commutative braided monoidal category record Symmetric : Set (levelOfTerm M) where field braided : Braided module braided = Braided braided open braided public private B : ∀ {X Y} → X ⊗₀ Y ⇒ Y ⊗₀ X B {X} {Y} = braiding.⇒.η (X , Y) field commutative : B {X} {Y} ∘ B {Y} {X} ≈ id braided-iso : X ⊗₀ Y ≅ Y ⊗₀ X braided-iso = record { from = B ; to = B ; iso = record { isoˡ = commutative ; isoʳ = commutative } }
source/adam-compilation_unit.ads
charlie5/aIDE
3
23958
<filename>source/adam-compilation_unit.ads with AdaM.Any, AdaM.Entity, AdaM.Context, AdaM.library_Item, AdaM.Subunit, Ada.Containers.Vectors, Ada.Streams; package AdaM.compilation_Unit is type Item is new AdaM.Any.item with private; -- View -- type View is access all Item'Class; procedure View_write (Stream : not null access Ada.Streams.Root_Stream_Type'Class; Self : in View); procedure View_read (Stream : not null access Ada.Streams.Root_Stream_Type'Class; Self : out View); for View'write use View_write; for View'read use View_read; -- Vector -- package Vectors is new ada.Containers.Vectors (Positive, View); subtype Vector is Vectors.Vector; -- Forge -- function new_compilation_Unit (Name : in String := "") return compilation_Unit.view; type unit_Kind is (library_unit_Kind, subunit_Kind); function new_library_Unit (Name : in String := ""; the_Item : in library_Item.view) return compilation_Unit.view; function new_Subunit (Name : in String := ""; the_Unit : in Subunit.view) return compilation_Unit.view; procedure free (Self : in out compilation_Unit.view); procedure destruct (Self : in out Item); -- Attributes -- overriding function Id (Self : access Item) return AdaM.Id; function Kind (Self : in Item) return unit_Kind; function library_Item (Self : in Item) return AdaM.library_Item.view; function Name (Self : in Item) return String; procedure Name_is (Self : in out Item; Now : in String); function Entity (Self : in Item) return AdaM.Entity.view; procedure Entity_is (Self : in out Item; Now : in AdaM.Entity.view); private type library_Item_or_Subunit (Kind : unit_Kind := library_unit_Kind) is record case Kind is when library_unit_Kind => library_Item : AdaM.library_Item.view; when subunit_Kind => Subunit : AdaM.Subunit.view; end case; end record; type Item is new AdaM.Any.item with record Name : Text; Context : AdaM.Context.view; library_Item : library_Item_or_Subunit; Entity : AdaM.Entity.view; end record; -- Streams -- procedure Item_write (Stream : not null access Ada.Streams.Root_Stream_Type'Class; Self : in Item); procedure Item_read (Stream : not null access Ada.Streams.Root_Stream_Type'Class; Self : out Item); for Item'write use Item_write; for Item'read use Item_read; end AdaM.compilation_Unit;
code/zlib-1.2.11/contrib/masmx86/inffas32.asm
skrtbhtngr/presto
0
241978
;/* inffas32.asm is a hand tuned assembler version of inffast.c -- fast decoding ; * ; * inffas32.asm is derivated from inffas86.c, with translation of assembly code ; * ; * Copyright (C) 1995-2003 <NAME> ; * For conditions of distribution and use, see copyright notice in zlib.h ; * ; * Copyright (C) 2003 <NAME> <<EMAIL>> ; * Please use the copyright conditions above. ; * ; * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from ; * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at ; * the moment. I have successfully compiled and tested this code with gcc2.96, ; * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S ; * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX ; * enabled. I will attempt to merge the MMX code into this version. Newer ; * versions of this and inffast.S can be found at ; * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/ ; * ; * 2005 : modification by <NAME> ; */ ; For Visual C++ 4.x and higher and ML 6.x and higher ; ml.exe is in directory \MASM611C of Win95 DDK ; ml.exe is also distributed in http://www.masm32.com/masmdl.htm ; and in VC++2003 toolkit at http://msdn.microsoft.com/visualc/vctoolkit2003/ ; ; ; compile with command line option ; ml /coff /Zi /c /Flinffas32.lst inffas32.asm ; if you define NO_GZIP (see inflate.h), compile with ; ml /coff /Zi /c /Flinffas32.lst /DNO_GUNZIP inffas32.asm ; zlib122sup is 0 fort zlib 1.2.2.1 and lower ; zlib122sup is 8 fort zlib 1.2.2.2 and more (with addition of dmax and head ; in inflate_state in inflate.h) zlib1222sup equ 8 IFDEF GUNZIP INFLATE_MODE_TYPE equ 11 INFLATE_MODE_BAD equ 26 ELSE IFNDEF NO_GUNZIP INFLATE_MODE_TYPE equ 11 INFLATE_MODE_BAD equ 26 ELSE INFLATE_MODE_TYPE equ 3 INFLATE_MODE_BAD equ 17 ENDIF ENDIF ; 75 "inffast.S" ;FILE "inffast.S" ;;;GLOBAL _inflate_fast ;;;SECTION .text .586p .mmx name inflate_fast_x86 .MODEL FLAT _DATA segment inflate_fast_use_mmx: dd 1 _TEXT segment ALIGN 4 db 'Fast decoding Code from <NAME>' db 0 ALIGN 4 invalid_literal_length_code_msg: db 'invalid literal/length code' db 0 ALIGN 4 invalid_distance_code_msg: db 'invalid distance code' db 0 ALIGN 4 invalid_distance_too_far_msg: db 'invalid distance too far back' db 0 ALIGN 4 inflate_fast_mask: dd 0 dd 1 dd 3 dd 7 dd 15 dd 31 dd 63 dd 127 dd 255 dd 511 dd 1023 dd 2047 dd 4095 dd 8191 dd 16383 dd 32767 dd 65535 dd 131071 dd 262143 dd 524287 dd 1048575 dd 2097151 dd 4194303 dd 8388607 dd 16777215 dd 33554431 dd 67108863 dd 134217727 dd 268435455 dd 536870911 dd 1073741823 dd 2147483647 dd 4294967295 mode_state equ 0 ;/* state->mode */ wsize_state equ (32+zlib1222sup) ;/* state->wsize */ write_state equ (36+4+zlib1222sup) ;/* state->write */ window_state equ (40+4+zlib1222sup) ;/* state->window */ hold_state equ (44+4+zlib1222sup) ;/* state->hold */ bits_state equ (48+4+zlib1222sup) ;/* state->bits */ lencode_state equ (64+4+zlib1222sup) ;/* state->lencode */ distcode_state equ (68+4+zlib1222sup) ;/* state->distcode */ lenbits_state equ (72+4+zlib1222sup) ;/* state->lenbits */ distbits_state equ (76+4+zlib1222sup) ;/* state->distbits */ ;;SECTION .text ; 205 "inffast.S" ;GLOBAL inflate_fast_use_mmx ;SECTION .data ; GLOBAL inflate_fast_use_mmx:object ;.mem_usage inflate_fast_use_mmx, 4 ; 226 "inffast.S" ;SECTION .text ALIGN 4 _inflate_fast proc near .FPO (16, 4, 0, 0, 1, 0) push edi push esi push ebp push ebx pushfd sub esp,64 cld mov esi, [esp+88] mov edi, [esi+28] mov edx, [esi+4] mov eax, [esi+0] add edx,eax sub edx,11 mov [esp+44],eax mov [esp+20],edx mov ebp, [esp+92] mov ecx, [esi+16] mov ebx, [esi+12] sub ebp,ecx neg ebp add ebp,ebx sub ecx,257 add ecx,ebx mov [esp+60],ebx mov [esp+40],ebp mov [esp+16],ecx ; 285 "inffast.S" mov eax, [edi+lencode_state] mov ecx, [edi+distcode_state] mov [esp+8],eax mov [esp+12],ecx mov eax,1 mov ecx, [edi+lenbits_state] shl eax,cl dec eax mov [esp+0],eax mov eax,1 mov ecx, [edi+distbits_state] shl eax,cl dec eax mov [esp+4],eax mov eax, [edi+wsize_state] mov ecx, [edi+write_state] mov edx, [edi+window_state] mov [esp+52],eax mov [esp+48],ecx mov [esp+56],edx mov ebp, [edi+hold_state] mov ebx, [edi+bits_state] ; 321 "inffast.S" mov esi, [esp+44] mov ecx, [esp+20] cmp ecx,esi ja L_align_long add ecx,11 sub ecx,esi mov eax,12 sub eax,ecx lea edi, [esp+28] rep movsb mov ecx,eax xor eax,eax rep stosb lea esi, [esp+28] mov [esp+20],esi jmp L_is_aligned L_align_long: test esi,3 jz L_is_aligned xor eax,eax mov al, [esi] inc esi mov ecx,ebx add ebx,8 shl eax,cl or ebp,eax jmp L_align_long L_is_aligned: mov edi, [esp+60] ; 366 "inffast.S" L_check_mmx: cmp dword ptr [inflate_fast_use_mmx],2 je L_init_mmx ja L_do_loop push eax push ebx push ecx push edx pushfd mov eax, [esp] xor dword ptr [esp],0200000h popfd pushfd pop edx xor edx,eax jz L_dont_use_mmx xor eax,eax cpuid cmp ebx,0756e6547h jne L_dont_use_mmx cmp ecx,06c65746eh jne L_dont_use_mmx cmp edx,049656e69h jne L_dont_use_mmx mov eax,1 cpuid shr eax,8 and eax,15 cmp eax,6 jne L_dont_use_mmx test edx,0800000h jnz L_use_mmx jmp L_dont_use_mmx L_use_mmx: mov dword ptr [inflate_fast_use_mmx],2 jmp L_check_mmx_pop L_dont_use_mmx: mov dword ptr [inflate_fast_use_mmx],3 L_check_mmx_pop: pop edx pop ecx pop ebx pop eax jmp L_check_mmx ; 426 "inffast.S" ALIGN 4 L_do_loop: ; 437 "inffast.S" cmp bl,15 ja L_get_length_code xor eax,eax lodsw mov cl,bl add bl,16 shl eax,cl or ebp,eax L_get_length_code: mov edx, [esp+0] mov ecx, [esp+8] and edx,ebp mov eax, [ecx+edx*4] L_dolen: mov cl,ah sub bl,ah shr ebp,cl test al,al jnz L_test_for_length_base shr eax,16 stosb L_while_test: cmp [esp+16],edi jbe L_break_loop cmp [esp+20],esi ja L_do_loop jmp L_break_loop L_test_for_length_base: ; 502 "inffast.S" mov edx,eax shr edx,16 mov cl,al test al,16 jz L_test_for_second_level_length and cl,15 jz L_save_len cmp bl,cl jae L_add_bits_to_len mov ch,cl xor eax,eax lodsw mov cl,bl add bl,16 shl eax,cl or ebp,eax mov cl,ch L_add_bits_to_len: mov eax,1 shl eax,cl dec eax sub bl,cl and eax,ebp shr ebp,cl add edx,eax L_save_len: mov [esp+24],edx L_decode_distance: ; 549 "inffast.S" cmp bl,15 ja L_get_distance_code xor eax,eax lodsw mov cl,bl add bl,16 shl eax,cl or ebp,eax L_get_distance_code: mov edx, [esp+4] mov ecx, [esp+12] and edx,ebp mov eax, [ecx+edx*4] L_dodist: mov edx,eax shr edx,16 mov cl,ah sub bl,ah shr ebp,cl ; 584 "inffast.S" mov cl,al test al,16 jz L_test_for_second_level_dist and cl,15 jz L_check_dist_one cmp bl,cl jae L_add_bits_to_dist mov ch,cl xor eax,eax lodsw mov cl,bl add bl,16 shl eax,cl or ebp,eax mov cl,ch L_add_bits_to_dist: mov eax,1 shl eax,cl dec eax sub bl,cl and eax,ebp shr ebp,cl add edx,eax jmp L_check_window L_check_window: ; 625 "inffast.S" mov [esp+44],esi mov eax,edi sub eax, [esp+40] cmp eax,edx jb L_clip_window mov ecx, [esp+24] mov esi,edi sub esi,edx sub ecx,3 mov al, [esi] mov [edi],al mov al, [esi+1] mov dl, [esi+2] add esi,3 mov [edi+1],al mov [edi+2],dl add edi,3 rep movsb mov esi, [esp+44] jmp L_while_test ALIGN 4 L_check_dist_one: cmp edx,1 jne L_check_window cmp [esp+40],edi je L_check_window dec edi mov ecx, [esp+24] mov al, [edi] sub ecx,3 mov [edi+1],al mov [edi+2],al mov [edi+3],al add edi,4 rep stosb jmp L_while_test ALIGN 4 L_test_for_second_level_length: test al,64 jnz L_test_for_end_of_block mov eax,1 shl eax,cl dec eax and eax,ebp add eax,edx mov edx, [esp+8] mov eax, [edx+eax*4] jmp L_dolen ALIGN 4 L_test_for_second_level_dist: test al,64 jnz L_invalid_distance_code mov eax,1 shl eax,cl dec eax and eax,ebp add eax,edx mov edx, [esp+12] mov eax, [edx+eax*4] jmp L_dodist ALIGN 4 L_clip_window: ; 721 "inffast.S" mov ecx,eax mov eax, [esp+52] neg ecx mov esi, [esp+56] cmp eax,edx jb L_invalid_distance_too_far add ecx,edx cmp dword ptr [esp+48],0 jne L_wrap_around_window sub eax,ecx add esi,eax ; 749 "inffast.S" mov eax, [esp+24] cmp eax,ecx jbe L_do_copy1 sub eax,ecx rep movsb mov esi,edi sub esi,edx jmp L_do_copy1 cmp eax,ecx jbe L_do_copy1 sub eax,ecx rep movsb mov esi,edi sub esi,edx jmp L_do_copy1 L_wrap_around_window: ; 793 "inffast.S" mov eax, [esp+48] cmp ecx,eax jbe L_contiguous_in_window add esi, [esp+52] add esi,eax sub esi,ecx sub ecx,eax mov eax, [esp+24] cmp eax,ecx jbe L_do_copy1 sub eax,ecx rep movsb mov esi, [esp+56] mov ecx, [esp+48] cmp eax,ecx jbe L_do_copy1 sub eax,ecx rep movsb mov esi,edi sub esi,edx jmp L_do_copy1 L_contiguous_in_window: ; 836 "inffast.S" add esi,eax sub esi,ecx mov eax, [esp+24] cmp eax,ecx jbe L_do_copy1 sub eax,ecx rep movsb mov esi,edi sub esi,edx L_do_copy1: ; 862 "inffast.S" mov ecx,eax rep movsb mov esi, [esp+44] jmp L_while_test ; 878 "inffast.S" ALIGN 4 L_init_mmx: emms movd mm0,ebp mov ebp,ebx ; 896 "inffast.S" movd mm4,dword ptr [esp+0] movq mm3,mm4 movd mm5,dword ptr [esp+4] movq mm2,mm5 pxor mm1,mm1 mov ebx, [esp+8] jmp L_do_loop_mmx ALIGN 4 L_do_loop_mmx: psrlq mm0,mm1 cmp ebp,32 ja L_get_length_code_mmx movd mm6,ebp movd mm7,dword ptr [esi] add esi,4 psllq mm7,mm6 add ebp,32 por mm0,mm7 L_get_length_code_mmx: pand mm4,mm0 movd eax,mm4 movq mm4,mm3 mov eax, [ebx+eax*4] L_dolen_mmx: movzx ecx,ah movd mm1,ecx sub ebp,ecx test al,al jnz L_test_for_length_base_mmx shr eax,16 stosb L_while_test_mmx: cmp [esp+16],edi jbe L_break_loop cmp [esp+20],esi ja L_do_loop_mmx jmp L_break_loop L_test_for_length_base_mmx: mov edx,eax shr edx,16 test al,16 jz L_test_for_second_level_length_mmx and eax,15 jz L_decode_distance_mmx psrlq mm0,mm1 movd mm1,eax movd ecx,mm0 sub ebp,eax and ecx, [inflate_fast_mask+eax*4] add edx,ecx L_decode_distance_mmx: psrlq mm0,mm1 cmp ebp,32 ja L_get_dist_code_mmx movd mm6,ebp movd mm7,dword ptr [esi] add esi,4 psllq mm7,mm6 add ebp,32 por mm0,mm7 L_get_dist_code_mmx: mov ebx, [esp+12] pand mm5,mm0 movd eax,mm5 movq mm5,mm2 mov eax, [ebx+eax*4] L_dodist_mmx: movzx ecx,ah mov ebx,eax shr ebx,16 sub ebp,ecx movd mm1,ecx test al,16 jz L_test_for_second_level_dist_mmx and eax,15 jz L_check_dist_one_mmx L_add_bits_to_dist_mmx: psrlq mm0,mm1 movd mm1,eax movd ecx,mm0 sub ebp,eax and ecx, [inflate_fast_mask+eax*4] add ebx,ecx L_check_window_mmx: mov [esp+44],esi mov eax,edi sub eax, [esp+40] cmp eax,ebx jb L_clip_window_mmx mov ecx,edx mov esi,edi sub esi,ebx sub ecx,3 mov al, [esi] mov [edi],al mov al, [esi+1] mov dl, [esi+2] add esi,3 mov [edi+1],al mov [edi+2],dl add edi,3 rep movsb mov esi, [esp+44] mov ebx, [esp+8] jmp L_while_test_mmx ALIGN 4 L_check_dist_one_mmx: cmp ebx,1 jne L_check_window_mmx cmp [esp+40],edi je L_check_window_mmx dec edi mov ecx,edx mov al, [edi] sub ecx,3 mov [edi+1],al mov [edi+2],al mov [edi+3],al add edi,4 rep stosb mov ebx, [esp+8] jmp L_while_test_mmx ALIGN 4 L_test_for_second_level_length_mmx: test al,64 jnz L_test_for_end_of_block and eax,15 psrlq mm0,mm1 movd ecx,mm0 and ecx, [inflate_fast_mask+eax*4] add ecx,edx mov eax, [ebx+ecx*4] jmp L_dolen_mmx ALIGN 4 L_test_for_second_level_dist_mmx: test al,64 jnz L_invalid_distance_code and eax,15 psrlq mm0,mm1 movd ecx,mm0 and ecx, [inflate_fast_mask+eax*4] mov eax, [esp+12] add ecx,ebx mov eax, [eax+ecx*4] jmp L_dodist_mmx ALIGN 4 L_clip_window_mmx: mov ecx,eax mov eax, [esp+52] neg ecx mov esi, [esp+56] cmp eax,ebx jb L_invalid_distance_too_far add ecx,ebx cmp dword ptr [esp+48],0 jne L_wrap_around_window_mmx sub eax,ecx add esi,eax cmp edx,ecx jbe L_do_copy1_mmx sub edx,ecx rep movsb mov esi,edi sub esi,ebx jmp L_do_copy1_mmx cmp edx,ecx jbe L_do_copy1_mmx sub edx,ecx rep movsb mov esi,edi sub esi,ebx jmp L_do_copy1_mmx L_wrap_around_window_mmx: mov eax, [esp+48] cmp ecx,eax jbe L_contiguous_in_window_mmx add esi, [esp+52] add esi,eax sub esi,ecx sub ecx,eax cmp edx,ecx jbe L_do_copy1_mmx sub edx,ecx rep movsb mov esi, [esp+56] mov ecx, [esp+48] cmp edx,ecx jbe L_do_copy1_mmx sub edx,ecx rep movsb mov esi,edi sub esi,ebx jmp L_do_copy1_mmx L_contiguous_in_window_mmx: add esi,eax sub esi,ecx cmp edx,ecx jbe L_do_copy1_mmx sub edx,ecx rep movsb mov esi,edi sub esi,ebx L_do_copy1_mmx: mov ecx,edx rep movsb mov esi, [esp+44] mov ebx, [esp+8] jmp L_while_test_mmx ; 1174 "inffast.S" L_invalid_distance_code: mov ecx, invalid_distance_code_msg mov edx,INFLATE_MODE_BAD jmp L_update_stream_state L_test_for_end_of_block: test al,32 jz L_invalid_literal_length_code mov ecx,0 mov edx,INFLATE_MODE_TYPE jmp L_update_stream_state L_invalid_literal_length_code: mov ecx, invalid_literal_length_code_msg mov edx,INFLATE_MODE_BAD jmp L_update_stream_state L_invalid_distance_too_far: mov esi, [esp+44] mov ecx, invalid_distance_too_far_msg mov edx,INFLATE_MODE_BAD jmp L_update_stream_state L_update_stream_state: mov eax, [esp+88] test ecx,ecx jz L_skip_msg mov [eax+24],ecx L_skip_msg: mov eax, [eax+28] mov [eax+mode_state],edx jmp L_break_loop ALIGN 4 L_break_loop: ; 1243 "inffast.S" cmp dword ptr [inflate_fast_use_mmx],2 jne L_update_next_in mov ebx,ebp L_update_next_in: ; 1266 "inffast.S" mov eax, [esp+88] mov ecx,ebx mov edx, [eax+28] shr ecx,3 sub esi,ecx shl ecx,3 sub ebx,ecx mov [eax+12],edi mov [edx+bits_state],ebx mov ecx,ebx lea ebx, [esp+28] cmp [esp+20],ebx jne L_buf_not_used sub esi,ebx mov ebx, [eax+0] mov [esp+20],ebx add esi,ebx mov ebx, [eax+4] sub ebx,11 add [esp+20],ebx L_buf_not_used: mov [eax+0],esi mov ebx,1 shl ebx,cl dec ebx cmp dword ptr [inflate_fast_use_mmx],2 jne L_update_hold psrlq mm0,mm1 movd ebp,mm0 emms L_update_hold: and ebp,ebx mov [edx+hold_state],ebp mov ebx, [esp+20] cmp ebx,esi jbe L_last_is_smaller sub ebx,esi add ebx,11 mov [eax+4],ebx jmp L_fixup_out L_last_is_smaller: sub esi,ebx neg esi add esi,11 mov [eax+4],esi L_fixup_out: mov ebx, [esp+16] cmp ebx,edi jbe L_end_is_smaller sub ebx,edi add ebx,257 mov [eax+16],ebx jmp L_done L_end_is_smaller: sub edi,ebx neg edi add edi,257 mov [eax+16],edi L_done: add esp,64 popfd pop ebx pop ebp pop esi pop edi ret _inflate_fast endp _TEXT ends end
projects/batfish/src/main/antlr4/org/batfish/grammar/cisco/Cisco_rip.g4
sskausik08/Wilco
0
6509
<reponame>sskausik08/Wilco parser grammar Cisco_rip; import Cisco_common; options { tokenVocab = CiscoLexer; } rr_distance : DISTANCE distance = DEC NEWLINE ; rr_distribute_list : DISTRIBUTE_LIST ( ( PREFIX prefix_list = variable ) | acl = variable ) ( IN | OUT ) NEWLINE ; rr_network : NETWORK network = IP_ADDRESS NEWLINE ; rr_null : NO? ( AUTO_SUMMARY | ( NO SHUTDOWN ) | VERSION ) ~NEWLINE* NEWLINE ; rr_passive_interface : NO? PASSIVE_INTERFACE iname = interface_name NEWLINE ; rr_passive_interface_default : NO? PASSIVE_INTERFACE DEFAULT NEWLINE ; rr_redistribute : REDISTRIBUTE ~NEWLINE* NEWLINE ; s_router_rip : ROUTER RIP NEWLINE ( rr_distance | rr_distribute_list | rr_network | rr_null | rr_passive_interface | rr_passive_interface_default | rr_redistribute )* ;
dv3/q40/1sec.asm
olifink/smsqe
0
89070
<reponame>olifink/smsqe ; DV3 Q40 sets up 1 second loop timer  1999 <NAME> section fd xdef fd_1sec xdef hd_1sec xref.l fdc_stat include 'dev8_keys_sys' include 'dev8_keys_q40' include 'dev8_keys_qdos_sms' include 'dev8_smsq_smsq_base_keys' ;+++ ; Set up 1 second loop timer ; ; d0 r 1 second timer ; ;--- fd_1sec hd_1sec moveq #sms.xtop,d0 trap #1 movem.l d5/d6,-(sp) move #$2700,sr ; disable interrupts for this jsr sms.cenab ; enable both caches lea fdc_stat,a5 ; address of status register moveq #0,d0 moveq #0,d6 st q40_fack ; clear interrupt flag fd1s_wait btst #Q40..frame,q40_ir ; frame interrupt? beq.s fd1s_wait ; ... no st q40_fack ; clear interrupt flag fd1s_count move.l #4096/50,d5 ; dummy (large) counter fd1s_loop and.b (a5),d0 bne.s fd1s_loop ; never true subq.l #1,d5 bgt.s fd1s_loop ; time-out loop addq.l #1,d6 btst #Q40..frame,q40_ir ; frame interrupt? beq.s fd1s_count ; ... no st q40_fack ; clear interrupt flag lsl.l #8,d6 ; multiply loop timer by 4096 lsl.l #4,d6 jsr sms.cdisb ; disable caches again move.l d6,d0 movem.l (sp)+,d5/d6 rts end
.emacs.d/elpa/ada-mode-7.0.1/gpr_process_actions.adb
caqg/linux-home
0
29290
-- generated parser support file. -- command line: wisitoken-bnf-generate.exe --generate LR1 Ada_Emacs re2c PROCESS gpr.wy -- -- Copyright (C) 2013 - 2019 Free Software Foundation, Inc. -- 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 3, or (at -- your option) any later version. -- -- This software is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. with Wisi; use Wisi; with Wisi.Gpr; use Wisi.Gpr; package body Gpr_Process_Actions is use WisiToken.Semantic_Checks; procedure aggregate_g_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Int, 0))), (False, (Simple, (Anchored_0, 1, 1))), (False, (Simple, (Anchored_0, 1, 0))))); end case; end aggregate_g_0; procedure attribute_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 2, 0))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Int, 0))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, 0))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, 0))))); end case; end attribute_declaration_0; procedure attribute_declaration_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (8, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 2, 0))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Int, 0))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken - 1))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken - 1))), (False, (Simple, (Int, 0))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, 0))))); end case; end attribute_declaration_1; procedure attribute_declaration_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (10, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 2, 0))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Int, 0))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken - 1))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken - 1))), (False, (Simple, (Int, 0))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, 0))), (False, (Simple, (Int, 0))), (False, (Simple, (Int, 0))))); end case; end attribute_declaration_2; procedure attribute_declaration_3 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (8, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Int, 0))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken - 1))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken - 1))), (False, (Simple, (Int, 0))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, 0))))); end case; end attribute_declaration_3; procedure case_statement_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Int, 0))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, 0))), (True, (Simple, (Int, Gpr_Indent_When)), (Simple, (Int, Gpr_Indent_When))), (False, (Simple, (Int, 0))), (False, (Simple, (Int, 0))), (False, (Simple, (Int, 0))))); end case; end case_statement_0; procedure case_item_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, Motion))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Int, 0))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent))), (False, (Simple, (Int, Gpr_Indent))))); end case; end case_item_0; procedure compilation_unit_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Int, 0))), (False, (Simple, (Int, 0))), (True, (Simple, (Int, 0)), (Simple, (Int, 0))))); end case; end compilation_unit_0; function identifier_opt_1_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Lexer, Recover_Active); begin return Propagate_Name (Nonterm, Tokens, 1); end identifier_opt_1_check; procedure package_spec_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((2, 2, 0), (6, 2, 0))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Int, 0))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, 0))), (True, (Simple, (Int, Gpr_Indent)), (Simple, (Int, Gpr_Indent))), (False, (Simple, (Int, 0))), (False, (Simple, (Int, 0))), (False, (Simple, (Int, 0))))); end case; end package_spec_0; function package_spec_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 2, 6, End_Names_Optional); end package_spec_0_check; procedure package_extension_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (9, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((2, 2, 0), (8, 2, 0))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Int, 0))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, 0))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, 0))), (True, (Simple, (Int, Gpr_Indent)), (Simple, (Int, Gpr_Indent))), (False, (Simple, (Int, 0))), (False, (Simple, (Int, 0))), (False, (Simple, (Int, 0))))); end case; end package_extension_0; function package_extension_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 2, 8, End_Names_Optional); end package_extension_0_check; procedure package_renaming_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Statement_End))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((2, 2, 0), (4, 2, 0))); when Indent => null; end case; end package_renaming_0; procedure project_extension_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (9, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, 2, 1), (2, 2, 0), (8, 2, 0))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Int, 0))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, 0))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, 0))), (True, (Simple, (Int, Gpr_Indent)), (Simple, (Int, Gpr_Indent))), (False, (Simple, (Int, 0))), (False, (Simple, (Int, 0))), (False, (Simple, (Int, 0))))); end case; end project_extension_0; function project_extension_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 2, 8, End_Names_Optional); end project_extension_0_check; procedure simple_declarative_item_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (4, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Int, 0))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, 0))))); end case; end simple_declarative_item_0; procedure simple_declarative_item_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (6, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Int, 0))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, 0))))); end case; end simple_declarative_item_1; procedure simple_declarative_item_4 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_End))); when Face => null; when Indent => null; end case; end simple_declarative_item_4; procedure simple_project_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, 2, 1), (2, 2, 0), (6, 2, 0))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Int, 0))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, 0))), (True, (Simple, (Int, Gpr_Indent)), (Simple, (Int, Gpr_Indent))), (False, (Simple, (Int, 0))), (False, (Simple, (Int, 0))), (False, (Simple, (Int, 0))))); end case; end simple_project_declaration_0; function simple_project_declaration_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 2, 6, End_Names_Optional); end simple_project_declaration_0_check; procedure typed_string_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Int, 0))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Int, 0))))); end case; end typed_string_declaration_0; end Gpr_Process_Actions;
bfvmm/src/hve/arch/intel_x64/exit_handler_entry.asm
chp-io/hypervisor
1
171956
<filename>bfvmm/src/hve/arch/intel_x64/exit_handler_entry.asm<gh_stars>1-10 ; ; Copyright (C) 2019 Assured Information Security, Inc. ; ; 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. bits 64 default rel %define IA32_XSS_MSR 0xDA0 %define VMCS_GUEST_RSP 0x0000681C %define VMCS_GUEST_RIP 0x0000681E extern handle_exit global exit_handler_entry:function section .text ; Exit Handler Entry Point ; ; With respect to VT-x, when an exit occurs, the CPU keeps the state of the ; registers from the guest intact, and gives the state of the registers prior ; to vmresume, back to the guest. The only exception to this is RSP and RIP as ; these two registers are specific to the VMM (RIP is exit_handler_entry, ; and RSP is the exit_handler_stack). So the only job that this entry point ; has is to preserve the state of the guest ; exit_handler_entry: mov [gs:0x000], rax mov [gs:0x008], rbx mov [gs:0x010], rcx mov [gs:0x018], rdx mov [gs:0x020], rbp mov [gs:0x028], rsi mov [gs:0x030], rdi mov [gs:0x038], r8 mov [gs:0x040], r9 mov [gs:0x048], r10 mov [gs:0x050], r11 mov [gs:0x058], r12 mov [gs:0x060], r13 mov [gs:0x068], r14 mov [gs:0x070], r15 mov rsi, VMCS_GUEST_RIP vmread [gs:0x078], rsi mov rsi, VMCS_GUEST_RSP vmread [gs:0x080], rsi ; To handle the XSAVE data, we do not know what the guest is currently ; using. One approach would be to save all state and then restore all ; of that state. The problem with that approach is if the guest is only ; using a small amount of state, this would be wasteful. To prevent ; that we use the second approach. In this approach you save what the ; guest is using (i.e., save based on the guest's values for xcr0 and ; xss), and then restore all state. Any bits that are not saved here ; will be initialized to their defaults on restore during a resume. ; This ensures that we reduce how much we save (if possible) while still ; ensuring the state on resume does not include data from other guest VMs xor ecx, ecx xgetbv mov [gs:0x0A8], eax mov rcx, IA32_XSS_MSR rdmsr mov [gs:0x0B8], eax mov rsi, [gs:0x0C8] xor edx, edx mov eax, 0xFFFFFFFF xsaves64 [rsi] ; Now that we have saved the guest state based on what the guest was ; using, we need to set the xcr0 and xss to all bits (based on what the ; cpuid instruction reports). Once that is done, we will restore the ; state using a black save area. This ensures that the hypervisor always ; have initialized state when it executes. In addition, on resume, this ; will ensure that the restore of the state uses all bits as well. Any ; state that was not saved by the guest above will be initialized on ; resume. Note that since the host state that we restore above never ; gets saved (i.e., we never run xsave on it, we only use it for xrstor ; to initialize state), we need to flip the bit in the header that tells ; xrstor that it is compressed. This ensures we can use the xrstors ; instruction which is needed to include xss. mov eax, [gs:0x0B0] xor edx, edx xor ecx, ecx xsetbv mov eax, [gs:0x0C0] xor edx, edx mov ecx, IA32_XSS_MSR wrmsr mov rsi, [gs:0x0D0] mov al, 0x80 mov [rsi + 0x20f], al xor edx, edx mov eax, 0xFFFFFFFF xrstors64 [rsi] ; Finally, we need to initialize the remaining control and debug ; registers that are not handled by the VMCS. This ensures that the ; hypervisor has a clean control and debug register state as it ; executes. mov rsi, cr2 mov [gs:0x0D8], rsi mov rsi, cr8 mov [gs:0x0E0], rsi mov rsi, dr0 mov [gs:0x0E8], rsi mov rsi, dr1 mov [gs:0x0F0], rsi mov rsi, dr2 mov [gs:0x0F8], rsi mov rsi, dr3 mov [gs:0x100], rsi mov rsi, dr6 mov [gs:0x108], rsi mov rsi, 0x0 mov cr2, rsi mov rsi, 0xF mov cr8, rsi mov rsi, 0x0 mov dr0, rsi mov rsi, 0x0 mov dr1, rsi mov rsi, 0x0 mov dr2, rsi mov rsi, 0x0 mov dr3, rsi mov rsi, 0x0 mov dr6, rsi mov rdi, [gs:0x0098] mov rsi, [gs:0x00A0] call handle_exit wrt ..plt ; The code should never get this far as the exit handler should resume back ; into the guest using the VMCS's resume function. If we get this far, ; something really bad has happened as we also halt in exit_handler if the ; resume doesn't happen. hlt
cwiczenia2/enter_k.asm
adamczykpiotr/AGH_WIMiIP_Architektury_Komputerow
1
85281
section .data znak db "",0 section .text global _start: _start: mov rax, 3 mov rbx, 0 mov rcx, znak mov rdx, 1 int 80h cmp byte [znak], "k" jne _start mov rax, 1 mov rbx, 0 int 80h
Driver/Font/Nimbus/nimbusEC.asm
steakknife/pcgeos
504
84238
<gh_stars>100-1000 COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1992 -- All Rights Reserved PROJECT: PC/GEOS MODULE: nimbusEC.asm FILE: nimbusEC.asm AUTHOR: <NAME>, Apr 17, 1992 ROUTINES: Name Description ---- ----------- ECNukeVariableBlock nuke variables so we don't inadvertently re-use them REVISION HISTORY: Name Date Description ---- ---- ----------- Gene 4/17/92 Initial revision DESCRIPTION: Error checking code for Nimbus driver $Id: nimbusEC.asm,v 1.1 97/04/18 11:45:31 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if ERROR_CHECK CharMod segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECNukeVariableBlock %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Nuke the Nimbus variable block CALLED BY: NimbusStrategy() PASS: none RETURN: none DESTROYED: none (flags preserved) PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/17/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ECNukeVariableBlock proc far uses ax, bx, cx, di, es .enter pushf ; ; Lock the variable block ; mov ax, segment udata mov es, ax ;es <- seg addr of idata mov bx, es:variableHandle ;bx <- handle of vars tst bx ;block freed? jz done ;branch if freed call MemLock jc done ;branch if discarded mov es, ax ;es <- seg addr of vars ; ; Zero the block ; clr al ;al <- byte to store mov cx, (size NimbusVars) ;cx <- # of bytes clr di ;es:di <- ptr to vars rep stosb ; ; Nuke things we know are segments specially ; mov es:fontSegment, 0xa000 mov es:gstateSegment, 0xa000 mov es:infoSegment, 0xa000 ; ; All done... ; call MemUnlock done: popf .leave ret ECNukeVariableBlock endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECCheckFontSegment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Check that the font segment has been initialized CALLED BY: UTILITY PASS: none RETURN: none DESTROYED: none (flags preserved) PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/17/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ECCheckFontSegment proc far uses ax, bx, ds, es .enter pushf call LockNimbusVars mov ds, ax ;ds <- seg addr of vars ; ; Make sure the font segment is reasonable ; mov ax, ds:fontSegment cmp ax, 0xa000 ERROR_E NIMBUS_VARS_UNINITIALIZED mov es, ax ;es <- seg addr of font cmp es:FB_maker, FM_NIMBUSQ ERROR_NE NIMBUS_CALLED_WITH_NON_NIMBUS_FONT call MemUnlock popf .leave ret ECCheckFontSegment endp ECCheckFontHandle proc far uses ax, bx, ds, es .enter pushf call LockNimbusVars mov ds, ax ;ds <- seg addr of vars push bx ; ; Make sure the font handle is reasonable ; mov bx, ds:fontHandle tst bx ERROR_Z NIMBUS_VARS_UNINITIALIZED call MemDerefES ;es <- seg addr of font handle mov ax, es cmp ds:fontSegment, ax ;match seg addr of font? ERROR_NE NIMBUS_VARS_UNINITIALIZED pop bx call MemUnlock popf .leave ret ECCheckFontHandle endp ECCheckGStateSegment proc far uses ax, bx, di, ds, es .enter pushf call LockNimbusVars ; ; Make sure the GState segment is reasonable ; mov ax, ds:gstateSegment cmp ax, 0xa000 ERROR_E NIMBUS_VARS_UNINITIALIZED mov ds, ax ;ds <- seg addr of GState mov di, ds:LMBH_handle ;di <- handle of GState call ECCheckGStateHandle call MemUnlock popf .leave ret ECCheckGStateSegment endp ECCheckInfoSegment proc far uses ax, bx, ds, es .enter pushf call LockNimbusVars mov ds, ax ;ds <- seg addr of vars mov ax, ds:infoSegment ;ax <- seg addr of info cmp ax, 0xa000 ERROR_E NIMBUS_VARS_UNINITIALIZED mov es, ax cmp es:LMBH_lmemType, LMEM_TYPE_FONT_BLK ERROR_NE NIMBUS_NOT_PASSED_INFO_BLOCK call MemUnlock popf .leave ret ECCheckInfoSegment endp ECCheckFirstChar proc far if not DBCS_PCGEOS uses ax, bx, ds .enter pushf call LockNimbusVars mov ds, ax tst ds:firstChar ERROR_Z NIMBUS_VARS_UNINITIALIZED call MemUnlock popf .leave endif ret ECCheckFirstChar endp CharMod ends endif
alloy4fun_models/trainstlt/models/16/rrGWb4fYGConxAvZi.als
Kaixi26/org.alloytools.alloy
0
3653
<gh_stars>0 open main pred idrrGWb4fYGConxAvZi_prop17 { } pred __repair { idrrGWb4fYGConxAvZi_prop17 } check __repair { idrrGWb4fYGConxAvZi_prop17 <=> prop17o }
HW_Example/h801.asm
smallru8/smallMasmLib
0
170245
TITLE (.asm) INCLUDE Irvine32.inc INCLUDE Macros.inc .data INT9 DWORD 9 INT5 DWORD 5 INT32 DWORD 32 .code main PROC mWrite "攝氏度 : " FINIT fild INT32 ;32 call ReadFloat ;C fild INT9 ;9 fild INT5 ;5 fdiv ;/ fmul ;* fadd ;+ mWrite "華氏度 : " call WriteFloat call crlf exit main ENDP END main
bssn/code/src/bssnbase-text_io.ads
leo-brewin/adm-bssn-numerical
1
12500
package BSSNBase.Text_IO is procedure write_results; procedure write_history; procedure write_summary; procedure write_summary_header; procedure write_summary_trailer; procedure create_text_io_lists; xy_index_list_ptr : GridIndexList_ptr := new GridIndexList (1..max_num_x*max_num_y); xz_index_list_ptr : GridIndexList_ptr := new GridIndexList (1..max_num_x*max_num_z); yz_index_list_ptr : GridIndexList_ptr := new GridIndexList (1..max_num_y*max_num_z); xy_index_list : GridIndexList renames xy_index_list_ptr.all; xz_index_list : GridIndexList renames xz_index_list_ptr.all; yz_index_list : GridIndexList renames yz_index_list_ptr.all; xy_index_num : Integer := 0; xz_index_num : Integer := 0; yz_index_num : Integer := 0; sample_point : GridPoint; -- the grid point used by write_history end BSSNBase.Text_IO;
Serializer.agda
mathijsb/generic-in-agda
6
9537
<reponame>mathijsb/generic-in-agda<filename>Serializer.agda module Serializer where open import Data.List open import Data.Fin hiding (_+_) open import Data.Nat open import Data.Product open import Data.Bool open import Function using (_∘_ ; _$_ ; _∋_) open import Function.Injection hiding (_∘_) open import Function.Surjection hiding (_∘_) open import Function.Bijection hiding (_∘_) open import Relation.Binary.PropositionalEquality hiding ( [_] ) open import Reflection open import Helper.Fin open import Helper.CodeGeneration ----------------------------------- -- Generic ----------------------------------- -- Finite record Serializer (T : Set) : Set where constructor serializer field size : ℕ from : T -> Fin size to : Fin size -> T bijection : Bijection (setoid T) (setoid (Fin size))
src/LibraBFT/Impl/Consensus/ConsensusTypes/ExecutedBlock.agda
LaudateCorpus1/bft-consensus-agda
0
9349
<gh_stars>0 {- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2021, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} open import LibraBFT.Base.Types import LibraBFT.Impl.Consensus.ConsensusTypes.Block as Block import LibraBFT.Impl.Execution.ExecutorTypes.StateComputeResult as StateComputeResult import LibraBFT.Impl.OBM.Crypto as Crypto open import LibraBFT.ImplShared.Base.Types open import LibraBFT.ImplShared.Consensus.Types open import Optics.All open import Util.Prelude module LibraBFT.Impl.Consensus.ConsensusTypes.ExecutedBlock where isNilBlock : ExecutedBlock → Bool isNilBlock eb = Block.isNilBlock (eb ^∙ ebBlock) blockInfo : ExecutedBlock → BlockInfo blockInfo eb = Block.genBlockInfo (eb ^∙ ebBlock) (Crypto.obmHashVersion -- OBM-LBFT-DIFF - see SafetyRules.extensionCheck (eb ^∙ ebStateComputeResult ∙ scrObmNumLeaves)) (eb ^∙ ebStateComputeResult ∙ scrObmNumLeaves) (eb ^∙ ebStateComputeResult ∙ scrEpochState) maybeSignedVoteProposal : ExecutedBlock → MaybeSignedVoteProposal maybeSignedVoteProposal self = MaybeSignedVoteProposal∙new (VoteProposal∙new (StateComputeResult.extensionProof (self ^∙ ebStateComputeResult)) (self ^∙ ebBlock) (self ^∙ ebStateComputeResult ∙ scrEpochState))
src/Eilenberg-MacLane-space.agda
nad/equality
3
11169
<gh_stars>1-10 ------------------------------------------------------------------------ -- The Eilenberg-MacLane space K(G, 1) ------------------------------------------------------------------------ {-# OPTIONS --erased-cubical --safe #-} -- The module is parametrised by a notion of equality. The higher -- constructors of the HIT defining K(G, 1) use path equality, but the -- supplied notion of equality is used for many other things. import Equality.Path as P module Eilenberg-MacLane-space {e⁺} (eq : ∀ {a p} → P.Equality-with-paths a p e⁺) where open P.Derived-definitions-and-properties eq hiding (elim) open import Logical-equivalence using (_⇔_) open import Prelude as P hiding (id) renaming (_∘_ to _⊚_) open import Bijection equality-with-J as B using (_↔_) open import Embedding equality-with-J using (Embedding; Is-embedding) import Equality.Groupoid equality-with-J as EG open import Equality.Path.Isomorphisms eq open import Equivalence equality-with-J as Eq using (_≃_; Is-equivalence) import Equivalence P.equality-with-J as PEq open import Function-universe equality-with-J hiding (id; _∘_) open import Group equality-with-J open import H-level equality-with-J as H-level import H-level P.equality-with-J as PH open import H-level.Closure equality-with-J open import H-level.Truncation eq as T using (∥_∥[1+_]; ∣_∣) open import H-level.Truncation.Propositional eq as TP using (Surjective) open import Pointed-type equality-with-J open import Pointed-type.Connected eq open import Pointed-type.Homotopy-group eq open import Univalence-axiom equality-with-J private variable a p : Level A : Type a P : A → Type p e g x y : A G G₁ G₂ : Group g ------------------------------------------------------------------------ -- The type -- The Eilenberg-MacLane space K(G, 1). -- -- This definition is taken from "Eilenberg-MacLane Spaces in Homotopy -- Type Theory" by Licata and Finster. data K[_]1 (G : Group g) : Type g where base : K[ G ]1 loopᴾ : Group.Carrier G → base P.≡ base loop-idᴾ : loopᴾ (Group.id G) P.≡ P.refl loop-∘ᴾ : loopᴾ (Group._∘_ G x y) P.≡ P.trans (loopᴾ x) (loopᴾ y) is-groupoidᴾ : PH.H-level 3 K[ G ]1 -- Variants of the higher constructors. loop : Group.Carrier G → base ≡ base loop {G = G} = _↔_.from ≡↔≡ ⊚ loopᴾ {G = G} loop-id : loop {G = G} (Group.id G) ≡ refl base loop-id {G = G} = loop id ≡⟨ _≃_.from (Eq.≃-≡ (Eq.↔⇒≃ (inverse ≡↔≡))) (_↔_.from ≡↔≡ loop-idᴾ) ⟩ _↔_.from ≡↔≡ P.refl ≡⟨ from-≡↔≡-refl ⟩∎ refl base ∎ where open Group G loop-∘ : loop {G = G} (Group._∘_ G x y) ≡ trans (loop x) (loop y) loop-∘ {G = G} {x = x} {y = y} = loop (Group._∘_ G x y) ≡⟨ _≃_.from (Eq.≃-≡ (Eq.↔⇒≃ (inverse ≡↔≡))) (_↔_.from ≡↔≡ loop-∘ᴾ) ⟩ _↔_.from ≡↔≡ (P.trans (loopᴾ x) (loopᴾ y)) ≡⟨ sym trans≡trans ⟩∎ trans (loop x) (loop y) ∎ is-groupoid : H-level 3 K[ G ]1 is-groupoid = _↔_.from (H-level↔H-level 3) is-groupoidᴾ ------------------------------------------------------------------------ -- Eliminators -- A dependent eliminator, expressed using paths. -- -- This eliminator is based on one from "Eilenberg-MacLane Spaces in -- Homotopy Type Theory" by Licata and Finster. record Elimᴾ {G : Group g} (P : K[ G ]1 → Type p) : Type (g ⊔ p) where no-eta-equality open Group G field baseʳ : P base loopʳ : ∀ g → P.[ (λ i → P (loopᴾ g i)) ] baseʳ ≡ baseʳ loop-idʳ : P.[ (λ i → P.[ (λ j → P (loop-idᴾ i j)) ] baseʳ ≡ baseʳ) ] loopʳ id ≡ P.refl {x = baseʳ} loop-∘ʳ : P.[ (λ i → P.[ (λ j → P (loop-∘ᴾ {x = x} {y = y} i j)) ] baseʳ ≡ baseʳ) ] loopʳ (x ∘ y) ≡ P.htrans P (loopʳ x) (loopʳ y) is-groupoidʳ : ∀ x → PH.H-level 3 (P x) open Elimᴾ public elimᴾ : Elimᴾ P → (x : K[ G ]1) → P x elimᴾ {G = G} {P = P} e = helper where module E = Elimᴾ e helper : (x : K[ G ]1) → P x helper base = E.baseʳ helper (loopᴾ x i) = E.loopʳ x i helper (loop-idᴾ i j) = E.loop-idʳ i j helper (loop-∘ᴾ i j) = E.loop-∘ʳ i j helper (is-groupoidᴾ p q i j k) = P.heterogeneous-UIP₃ E.is-groupoidʳ (is-groupoidᴾ p q) (λ j k → helper (p j k)) (λ j k → helper (q j k)) i j k -- A non-dependent eliminator, expressed using paths. -- -- This eliminator is based on one from "Eilenberg-MacLane Spaces in -- Homotopy Type Theory" by Licata and Finster. record Recᴾ (G : Group g) (A : Type a) : Type (g ⊔ a) where no-eta-equality open Group G field baseʳ : A loopʳ : Carrier → baseʳ P.≡ baseʳ loop-idʳ : loopʳ id P.≡ P.refl loop-∘ʳ : loopʳ (x ∘ y) P.≡ P.trans (loopʳ x) (loopʳ y) is-groupoidʳ : PH.H-level 3 A open Recᴾ public recᴾ : Recᴾ G A → K[ G ]1 → A recᴾ {G = G} {A = A} r = elimᴾ λ where .is-groupoidʳ _ → R.is-groupoidʳ .baseʳ → R.baseʳ .loopʳ → R.loopʳ .loop-idʳ → R.loop-idʳ .loop-∘ʳ {x = x} {y = y} → R.loopʳ (x ∘ y) P.≡⟨ R.loop-∘ʳ ⟩ P.trans (R.loopʳ x) (R.loopʳ y) P.≡⟨ P.sym $ P.htrans-const (loopᴾ {G = G} x) (loopᴾ y) (R.loopʳ x) ⟩∎ P.htrans {x≡y = loopᴾ {G = G} x} {y≡z = loopᴾ y} (const A) (R.loopʳ x) (R.loopʳ y) ∎ where open Group G module R = Recᴾ r -- A non-dependent eliminator. -- -- This eliminator is based on one from "Eilenberg-MacLane Spaces in -- Homotopy Type Theory" by Licata and Finster. record Rec (G : Group g) (A : Type a) : Type (g ⊔ a) where no-eta-equality open Group G field baseʳ : A loopʳ : Carrier → baseʳ ≡ baseʳ loop-idʳ : loopʳ id ≡ refl baseʳ loop-∘ʳ : loopʳ (x ∘ y) ≡ trans (loopʳ x) (loopʳ y) is-groupoidʳ : H-level 3 A open Rec public rec : Rec G A → K[ G ]1 → A rec {G = G} {A = A} r = recᴾ λ where .is-groupoidʳ → _↔_.to (H-level↔H-level 3) R.is-groupoidʳ .baseʳ → R.baseʳ .loopʳ → _↔_.to ≡↔≡ ⊚ R.loopʳ .loop-idʳ → _↔_.to ≡↔≡ (R.loopʳ id) P.≡⟨ P.cong (_↔_.to ≡↔≡) $ _↔_.to ≡↔≡ R.loop-idʳ ⟩ _↔_.to ≡↔≡ (refl R.baseʳ) P.≡⟨ _↔_.to ≡↔≡ to-≡↔≡-refl ⟩∎ P.refl ∎ .loop-∘ʳ {x = x} {y = y} → _↔_.to ≡↔≡ (R.loopʳ (x ∘ y)) P.≡⟨ P.cong (_↔_.to ≡↔≡) $ _↔_.to ≡↔≡ R.loop-∘ʳ ⟩ _↔_.to ≡↔≡ (trans (R.loopʳ x) (R.loopʳ y)) P.≡⟨ _↔_.to ≡↔≡ $ sym $ cong₂ (λ p q → _↔_.to ≡↔≡ (trans p q)) (_↔_.left-inverse-of ≡↔≡ _) (_↔_.left-inverse-of ≡↔≡ _) ⟩ _↔_.to ≡↔≡ (trans (_↔_.from ≡↔≡ (_↔_.to ≡↔≡ (R.loopʳ x))) (_↔_.from ≡↔≡ (_↔_.to ≡↔≡ (R.loopʳ y)))) P.≡⟨ P.cong (_↔_.to ≡↔≡) $ _↔_.to ≡↔≡ trans≡trans ⟩ (_↔_.to ≡↔≡ $ _↔_.from ≡↔≡ $ P.trans (_↔_.to ≡↔≡ (R.loopʳ x)) (_↔_.to ≡↔≡ (R.loopʳ y))) P.≡⟨ _↔_.to ≡↔≡ $ _↔_.right-inverse-of ≡↔≡ _ ⟩∎ P.trans (_↔_.to ≡↔≡ (R.loopʳ x)) (_↔_.to ≡↔≡ (R.loopʳ y)) ∎ where open Group G module R = Rec r -- A "computation" rule. rec-loop : cong (rec e) (loop g) ≡ e .loopʳ g rec-loop = cong-≡↔≡ (refl _) -- A dependent eliminator that can be used when eliminating into sets, -- expressed using paths. record Elim-setᴾ {G : Group g} (P : K[ G ]1 → Type p) : Type (g ⊔ p) where no-eta-equality open Group G field baseʳ : P base loopʳ : ∀ g → P.[ (λ i → P (loopᴾ g i)) ] baseʳ ≡ baseʳ is-setʳ : ∀ x → P.Is-set (P x) open Elim-setᴾ public elim-setᴾ : Elim-setᴾ P → (x : K[ G ]1) → P x elim-setᴾ e = elimᴾ λ where .baseʳ → E.baseʳ .loopʳ → E.loopʳ .loop-idʳ → P.heterogeneous-UIP E.is-setʳ _ _ _ .loop-∘ʳ → P.heterogeneous-UIP E.is-setʳ _ _ _ .is-groupoidʳ → PH.mono₁ 2 ⊚ E.is-setʳ where module E = Elim-setᴾ e -- A dependent eliminator that can be used when eliminating into sets. record Elim-set {G : Group g} (P : K[ G ]1 → Type p) : Type (g ⊔ p) where no-eta-equality open Group G field baseʳ : P base loopʳ : ∀ g → subst P (loop g) baseʳ ≡ baseʳ is-setʳ : ∀ x → Is-set (P x) open Elim-set public elim-set : Elim-set P → (x : K[ G ]1) → P x elim-set e = elim-setᴾ λ where .baseʳ → E.baseʳ .loopʳ → subst≡→[]≡ ⊚ E.loopʳ .is-setʳ → _↔_.to (H-level↔H-level 2) ⊚ E.is-setʳ where module E = Elim-set e -- A "computation" rule. elim-set-loop : dcong (elim-set e) (loop g) ≡ e .loopʳ g elim-set-loop = dcong-subst≡→[]≡ (refl _) -- A non-dependent eliminator that can be used when eliminating into -- sets, expressed using paths. record Rec-setᴾ (G : Group g) (A : Type a) : Type (g ⊔ a) where no-eta-equality open Group G field baseʳ : A loopʳ : Carrier → baseʳ P.≡ baseʳ is-setʳ : P.Is-set A open Rec-setᴾ public rec-setᴾ : Rec-setᴾ G A → K[ G ]1 → A rec-setᴾ r = elim-setᴾ λ where .baseʳ → R.baseʳ .loopʳ → R.loopʳ .is-setʳ _ → R.is-setʳ where module R = Rec-setᴾ r -- A non-dependent eliminator that can be used when eliminating into -- sets. record Rec-set (G : Group g) (A : Type a) : Type (g ⊔ a) where no-eta-equality open Group G field baseʳ : A loopʳ : Carrier → baseʳ ≡ baseʳ is-setʳ : Is-set A open Rec-set public rec-set : Rec-set G A → K[ G ]1 → A rec-set r = rec-setᴾ λ where .baseʳ → R.baseʳ .loopʳ → _↔_.to ≡↔≡ ⊚ R.loopʳ .is-setʳ → _↔_.to (H-level↔H-level 2) R.is-setʳ where module R = Rec-set r -- A "computation" rule. rec-set-loop : cong (rec-set e) (loop g) ≡ e .loopʳ g rec-set-loop = cong-≡↔≡ (refl _) -- A dependent eliminator that can be used when eliminating into -- propositions. record Elim-prop {G : Group g} (P : K[ G ]1 → Type p) : Type (g ⊔ p) where no-eta-equality field baseʳ : P base is-propositionʳ : ∀ x → Is-proposition (P x) open Elim-prop public elim-prop : Elim-prop P → (x : K[ G ]1) → P x elim-prop e = elim-set λ where .baseʳ → E.baseʳ .loopʳ _ → E.is-propositionʳ _ _ _ .is-setʳ → mono₁ 1 ⊚ E.is-propositionʳ where module E = Elim-prop e ------------------------------------------------------------------------ -- Universal properties -- A dependent universal property, restricted to families of sets. -- -- This property is expressed using P.[_]_≡_. universal-property-Π-setᴾ : (∀ x → P.Is-set (P x)) → ((x : K[ G ]1) → P x) ≃ (∃ λ (x : P base) → ∀ g → P.[ (λ i → P (loopᴾ g i)) ] x ≡ x) universal-property-Π-setᴾ {G = G} {P = P} P-set = _↔_.from ≃↔≃ $ PEq.↔→≃ (λ f → f base , P.hcong f ⊚ loopᴾ) (λ (x , f) → elim-setᴾ λ where .baseʳ → x .loopʳ → f .is-setʳ → P-set) (λ _ → P.refl) (λ f → P.⟨ext⟩ $ elim-setᴾ λ where .baseʳ → P.refl .loopʳ _ _ → P.refl .is-setʳ _ → PH.mono₁ 2 (P-set _)) -- A variant of the dependent universal property, restricted to -- families of sets. -- -- This property is expressed using subst. universal-property-Π-set : (∀ x → Is-set (P x)) → ((x : K[ G ]1) → P x) ≃ (∃ λ (x : P base) → ∀ g → subst P (loop g) x ≡ x) universal-property-Π-set {G = G} {P = P} P-set = ((x : K[ G ]1) → P x) ↝⟨ universal-property-Π-setᴾ (_↔_.to (H-level↔H-level 2) ⊚ P-set) ⟩ (∃ λ (x : P base) → ∀ g → P.[ (λ i → P (loopᴾ g i)) ] x ≡ x) ↔⟨ (∃-cong λ _ → ∀-cong ext λ _ → inverse subst≡↔[]≡) ⟩□ (∃ λ (x : P base) → ∀ g → subst P (loop g) x ≡ x) □ -- A non-dependent universal property, restricted to sets. universal-property-set : Is-set A → (K[ G ]1 → A) ≃ (∃ λ (x : A) → Group.Carrier G → x ≡ x) universal-property-set {A = A} {G = G} A-set = (K[ G ]1 → A) ↝⟨ universal-property-Π-setᴾ (λ _ → _↔_.to (H-level↔H-level 2) A-set) ⟩ (∃ λ (x : A) → Carrier → x P.≡ x) ↔⟨ (∃-cong λ _ → ∀-cong ext λ _ → inverse ≡↔≡) ⟩□ (∃ λ (x : A) → Carrier → x ≡ x) □ where open Group G ------------------------------------------------------------------------ -- Some conversion functions -- A map function. -- -- The existence of such a function was suggested to me by Christian -- Sattler. map : G₁ →ᴳ G₂ → K[ G₁ ]1 → K[ G₂ ]1 map {G₁ = G₁} {G₂ = G₂} h = rec λ where .is-groupoidʳ → is-groupoid .baseʳ → base .loopʳ x → loop (to x) .loop-idʳ → loop (to G₁.id) ≡⟨ cong loop (→ᴳ-id h) ⟩ loop G₂.id ≡⟨ loop-id ⟩∎ refl _ ∎ .loop-∘ʳ {x = x} {y = y} → loop (to (x G₁.∘ y)) ≡⟨ cong loop (h .homomorphic x y) ⟩ loop (to x G₂.∘ to y) ≡⟨ loop-∘ ⟩∎ trans (loop (to x)) (loop (to y)) ∎ where module G₁ = Group G₁ module G₂ = Group G₂ open Homomorphic h using (to) -- If G₁ and G₂ are isomorphic groups, then K[ G₁ ]1 and K[ G₂ ]1 are -- equivalent. cong-≃ : G₁ ≃ᴳ G₂ → K[ G₁ ]1 ≃ K[ G₂ ]1 cong-≃ G₁≃G₂ = Eq.↔→≃ (map (↝ᴳ→→ᴳ G₁≃G₂)) (map (↝ᴳ→→ᴳ (≃ᴳ-sym G₁≃G₂))) (lemma (↝ᴳ→→ᴳ G₁≃G₂) (↝ᴳ→→ᴳ (≃ᴳ-sym G₁≃G₂)) (_≃_.right-inverse-of (related G₁≃G₂))) (lemma (↝ᴳ→→ᴳ (≃ᴳ-sym G₁≃G₂)) (↝ᴳ→→ᴳ G₁≃G₂) (_≃_.left-inverse-of (related G₁≃G₂))) where open Homomorphic using (to) lemma : (f₁ : G₁ →ᴳ G₂) (f₂ : G₂ →ᴳ G₁) → (∀ x → to f₁ (to f₂ x) ≡ x) → ∀ x → map f₁ (map f₂ x) ≡ x lemma f₁ f₂ hyp = elim-set λ where .is-setʳ _ → is-groupoid .baseʳ → refl _ .loopʳ g → subst (λ x → map f₁ (map f₂ x) ≡ x) (loop g) (refl _) ≡⟨ subst-in-terms-of-trans-and-cong ⟩ trans (sym $ cong (map f₁ ⊚ map f₂) (loop g)) (trans (refl _) (cong P.id (loop g))) ≡⟨ cong₂ (trans ⊚ sym) (sym $ cong-∘ _ _ _) (trans (trans-reflˡ _) $ sym $ cong-id _) ⟩ trans (sym $ cong (map f₁) $ cong (map f₂) (loop g)) (loop g) ≡⟨ cong (flip trans (loop g) ⊚ sym) $ trans (cong (cong _) rec-loop) rec-loop ⟩ trans (sym $ loop (to f₁ (to f₂ g))) (loop g) ≡⟨ cong (flip trans _ ⊚ sym ⊚ loop) $ hyp _ ⟩ trans (sym $ loop g) (loop g) ≡⟨ trans-symˡ _ ⟩∎ refl _ ∎ ------------------------------------------------------------------------ -- A lemma -- The pointed type (K[ G ]1 , base) is connected. -- -- This result was pointed out to me by <NAME>. connected : Connected (K[ G ]1 , base) connected = elim-prop λ where .is-propositionʳ _ → TP.truncation-is-proposition .baseʳ → TP.∣ refl _ ∣ ------------------------------------------------------------------------ -- Some lemmas related to the fundamental group of (K[ G ]1 , base) -- A variant of the fundamental group of (K[ G ]1 , base) is -- isomorphic to G (assuming univalence). -- -- The proof is based on the one given in "Eilenberg-MacLane Spaces in -- Homotopy Type Theory" by Licata and Finster. Fundamental-group′[K1]≃ᴳ : {G : Group g} → Univalence g → (s : Is-set (proj₁ (Ω (K[ G ]1 , base)))) → Fundamental-group′ (K[ G ]1 , base) s ≃ᴳ G Fundamental-group′[K1]≃ᴳ {g = g} {G = G} univ _ = λ where .related → equiv .homomorphic → hom where module FG = Group (Fundamental-group′ (K[ G ]1 , base) is-groupoid) open Group G -- Postcomposition is an equivalence. to-≃ : Carrier → Carrier ≃ Carrier to-≃ x = Eq.↔→≃ (_∘ x) (_∘ x ⁻¹) (λ y → (y ∘ x ⁻¹) ∘ x ≡⟨ sym $ assoc _ _ _ ⟩ y ∘ (x ⁻¹ ∘ x) ≡⟨ cong (y ∘_) $ left-inverse _ ⟩ y ∘ id ≡⟨ right-identity _ ⟩∎ y ∎) (λ y → (y ∘ x) ∘ x ⁻¹ ≡⟨ sym $ assoc _ _ _ ⟩ y ∘ (x ∘ x ⁻¹) ≡⟨ cong (y ∘_) $ right-inverse _ ⟩ y ∘ id ≡⟨ right-identity _ ⟩∎ y ∎) -- A family of codes. Code : K[ G ]1 → Set g Code = rec λ where .is-groupoidʳ → ∃-H-level-H-level-1+ ext univ 2 .baseʳ → Carrier , Carrier-is-set .loopʳ x → Σ-≡,≡→≡ (≃⇒≡ univ (to-≃ x)) (H-level-propositional ext 2 _ _) .loop-idʳ → Σ-≡,≡→≡ (≃⇒≡ univ (to-≃ id)) _ ≡⟨ _≃_.from (Eq.≃-≡ $ Eq.↔⇒≃ B.Σ-≡,≡↔≡) $ Σ-≡,≡→≡ ( ≃⇒≡ univ (to-≃ id) ≡⟨ cong (≃⇒≡ univ) $ Eq.lift-equality ext $ ⟨ext⟩ right-identity ⟩ ≃⇒≡ univ Eq.id ≡⟨ ≃⇒≡-id univ ⟩∎ refl _ ∎) (H-level.⇒≡ 1 (H-level-propositional ext 2) _ _) ⟩ Σ-≡,≡→≡ (refl _) (subst-refl _ _) ≡⟨ Σ-≡,≡→≡-refl-subst-refl ⟩∎ refl _ ∎ .loop-∘ʳ {x = x} {y = y} → Σ-≡,≡→≡ (≃⇒≡ univ (to-≃ (x ∘ y))) _ ≡⟨ _≃_.from (Eq.≃-≡ $ Eq.↔⇒≃ B.Σ-≡,≡↔≡) $ Σ-≡,≡→≡ ( ≃⇒≡ univ (to-≃ (x ∘ y)) ≡⟨ (cong (≃⇒≡ univ) $ Eq.lift-equality ext $ ⟨ext⟩ λ _ → assoc _ _ _) ⟩ ≃⇒≡ univ (to-≃ y Eq.∘ to-≃ x) ≡⟨ ≃⇒≡-∘ univ ext _ _ ⟩∎ trans (≃⇒≡ univ (to-≃ x)) (≃⇒≡ univ (to-≃ y)) ∎) (H-level.⇒≡ 1 (H-level-propositional ext 2) _ _) ⟩ Σ-≡,≡→≡ (trans (≃⇒≡ univ (to-≃ x)) (≃⇒≡ univ (to-≃ y))) _ ≡⟨ sym $ trans-Σ-≡,≡→≡ _ _ _ _ ⟩∎ trans (Σ-≡,≡→≡ (≃⇒≡ univ (to-≃ x)) _) (Σ-≡,≡→≡ (≃⇒≡ univ (to-≃ y)) _) ∎ -- Some "computation" rules. ≡⇒≃-cong-Code-loop : ≡⇒≃ (cong (proj₁ ⊚ Code) (loop x)) ≡ to-≃ x ≡⇒≃-cong-Code-loop {x = x} = ≡⇒≃ (cong (proj₁ ⊚ Code) (loop x)) ≡⟨ cong ≡⇒≃ $ sym $ cong-∘ proj₁ Code (loop x) ⟩ ≡⇒≃ (cong proj₁ (cong Code (loop x))) ≡⟨ cong (≡⇒≃ ⊚ cong proj₁) rec-loop ⟩ ≡⇒≃ (cong proj₁ $ Σ-≡,≡→≡ (≃⇒≡ univ (to-≃ x)) (H-level-propositional ext 2 _ _)) ≡⟨ cong ≡⇒≃ $ proj₁-Σ-≡,≡→≡ _ _ ⟩ ≡⇒≃ (≃⇒≡ univ (to-≃ x)) ≡⟨ _≃_.right-inverse-of (≡≃≃ univ) _ ⟩∎ to-≃ x ∎ subst-Code-loop : subst (proj₁ ⊚ Code) (loop x) ≡ _∘ x subst-Code-loop {x = x} = ⟨ext⟩ λ y → subst (proj₁ ⊚ Code) (loop x) y ≡⟨ subst-in-terms-of-≡⇒↝ equivalence _ _ _ ⟩ _≃_.to (≡⇒≃ (cong (proj₁ ⊚ Code) (loop x))) y ≡⟨ cong (λ eq → _≃_.to eq y) ≡⇒≃-cong-Code-loop ⟩∎ _≃_.to (to-≃ x) y ∎ subst-Code-sym-loop : subst (proj₁ ⊚ Code) (sym (loop x)) ≡ _∘ x ⁻¹ subst-Code-sym-loop {x = x} = ⟨ext⟩ λ y → subst (proj₁ ⊚ Code) (sym (loop x)) y ≡⟨ subst-in-terms-of-inverse∘≡⇒↝ equivalence _ _ _ ⟩ _≃_.from (≡⇒≃ (cong (proj₁ ⊚ Code) (loop x))) y ≡⟨ cong (λ eq → _≃_.from eq y) ≡⇒≃-cong-Code-loop ⟩∎ _≃_.from (to-≃ x) y ∎ -- An equivalence. to : base ≡ x → proj₁ (Code x) to eq = subst (proj₁ ⊚ Code) eq id from : ∀ x → proj₁ (Code x) → base ≡ x from = elim-set λ where .is-setʳ _ → Π-closure ext 2 λ _ → is-groupoid .baseʳ → loop .loopʳ x → ⟨ext⟩ λ y → subst (λ x → proj₁ (Code x) → base ≡ x) (loop x) loop y ≡⟨ subst-→ ⟩ subst (base ≡_) (loop x) (loop (subst (proj₁ ⊚ Code) (sym (loop x)) y)) ≡⟨ sym trans-subst ⟩ trans (loop (subst (proj₁ ⊚ Code) (sym (loop x)) y)) (loop x) ≡⟨ cong (flip trans (loop x) ⊚ loop ⊚ (_$ y)) subst-Code-sym-loop ⟩ trans (loop (y ∘ x ⁻¹)) (loop x) ≡⟨ cong (flip trans _) loop-∘ ⟩ trans (trans (loop y) (loop (x ⁻¹))) (loop x) ≡⟨ trans-assoc _ _ _ ⟩ trans (loop y) (trans (loop (x ⁻¹)) (loop x)) ≡⟨ cong (trans _) $ sym loop-∘ ⟩ trans (loop y) (loop (x ⁻¹ ∘ x)) ≡⟨ cong (trans (loop y) ⊚ loop) $ left-inverse _ ⟩ trans (loop y) (loop id) ≡⟨ cong (trans _) loop-id ⟩ trans (loop y) (refl base) ≡⟨ trans-reflʳ _ ⟩∎ loop y ∎ to-loop : ∀ x → to (loop x) ≡ x to-loop x = subst (proj₁ ⊚ Code) (loop x) id ≡⟨ cong (_$ id) subst-Code-loop ⟩ id ∘ x ≡⟨ left-identity _ ⟩∎ x ∎ from-to : ∀ eq → from x (to eq) ≡ eq from-to = elim¹ (λ {x} eq → from x (to eq) ≡ eq) (loop (subst (proj₁ ⊚ Code) (refl base) id) ≡⟨ cong loop $ subst-refl _ _ ⟩ loop id ≡⟨ loop-id ⟩∎ refl base ∎) equiv : proj₁ (Ω (K[ G ]1 , base)) ≃ Carrier equiv = base ≡ base ↝⟨ Eq.↔→≃ to loop to-loop from-to ⟩□ Carrier □ -- The equivalence is homomorphic. hom′ : ∀ x y → _≃_.from equiv (x ∘ y) ≡ _≃_.from equiv x FG.∘ _≃_.from equiv y hom′ x y = loop (x ∘ y) ≡⟨ loop-∘ ⟩∎ trans (loop x) (loop y) ∎ hom : ∀ p q → _≃_.to equiv (p FG.∘ q) ≡ _≃_.to equiv p ∘ _≃_.to equiv q hom p q = _≃_.from-to equiv (_≃_.from equiv (_≃_.to equiv p ∘ _≃_.to equiv q) ≡⟨ hom′ _ _ ⟩ _≃_.from equiv (_≃_.to equiv p) FG.∘ _≃_.from equiv (_≃_.to equiv q) ≡⟨ cong₂ FG._∘_ (_≃_.left-inverse-of equiv p) (_≃_.left-inverse-of equiv q) ⟩∎ p FG.∘ q ∎) -- The right-to-left direction of Fundamental-group′[K1]≃ᴳ is loop. _ : {G : Group g} {univ : Univalence g} {s : Is-set _} → _≃_.from (Fundamental-group′[K1]≃ᴳ {G = G} univ s .related) ≡ loop _ = refl _ -- The fundamental group of (K[ G ]1 , base) is isomorphic to G -- (assuming univalence). -- -- The proof is based on the one given in "Eilenberg-MacLane Spaces in -- Homotopy Type Theory" by Licata and Finster. Fundamental-group[K1]≃ᴳ : {G : Group g} → Univalence g → Fundamental-group (K[ G ]1 , base) ≃ᴳ G Fundamental-group[K1]≃ᴳ univ = ↝ᴳ-trans (≃ᴳ-sym Homotopy-group-[1+]′≃ᴳHomotopy-group-[1+]) (Fundamental-group′[K1]≃ᴳ univ is-groupoid) -- If G is abelian, then the fundamental group of (K[ G ]1 , base) is -- abelian. Abelian→Abelian-Fundamental-group′ : Abelian G → Abelian (Fundamental-group′ (K[ G ]1 , base) is-groupoid) Abelian→Abelian-Fundamental-group′ {G = G} abelian = flip $ EG.Transitivity-commutative.commutative base _∙_ ∙-base base-∙ where open Group G lemma : Carrier → (x : K[ G ]1) → x ≡ x lemma g₁ = elim-set λ where .is-setʳ → λ _ → is-groupoid .baseʳ → loop g₁ .loopʳ g₂ → ≡⇒↝ _ (sym [subst≡]≡[trans≡trans]) (trans (loop g₁) (loop g₂) ≡⟨ sym loop-∘ ⟩ loop (g₁ ∘ g₂) ≡⟨ cong loop (abelian g₁ g₂) ⟩ loop (g₂ ∘ g₁) ≡⟨ loop-∘ ⟩∎ trans (loop g₂) (loop g₁) ∎) lemma-id : ∀ x → lemma id x ≡ refl x lemma-id = elim-prop λ where .is-propositionʳ _ → is-groupoid .baseʳ → loop id ≡⟨ loop-id ⟩∎ refl base ∎ lemma-∘ : ∀ g₁ g₂ x → lemma (g₁ ∘ g₂) x ≡ trans (lemma g₁ x) (lemma g₂ x) lemma-∘ g₁ g₂ = elim-prop λ where .is-propositionʳ _ → is-groupoid .baseʳ → loop (g₁ ∘ g₂) ≡⟨ loop-∘ ⟩∎ trans (loop g₁) (loop g₂) ∎ _∙_ : K[ G ]1 → K[ G ]1 → K[ G ]1 _∙_ x = rec λ where .is-groupoidʳ → is-groupoid .baseʳ → x .loopʳ g → lemma g x .loop-idʳ → lemma-id x .loop-∘ʳ → lemma-∘ _ _ x base-∙ : ∀ x → x ∙ base ≡ x base-∙ _ = refl _ ∙-base : ∀ y → base ∙ y ≡ y ∙-base = elim-set λ where .is-setʳ _ → is-groupoid .baseʳ → refl _ .loopʳ y → subst (λ y → base ∙ y ≡ y) (loop y) (refl _) ≡⟨ subst-in-terms-of-trans-and-cong ⟩ trans (sym (cong (base ∙_) (loop y))) (trans (refl _) (cong P.id (loop y))) ≡⟨ cong (trans _) $ trans (trans-reflˡ _) $ sym $ cong-id _ ⟩ trans (sym (cong (base ∙_) (loop y))) (loop y) ≡⟨ cong (flip trans (loop y) ⊚ sym) $ rec-loop ⟩ trans (sym (loop y)) (loop y) ≡⟨ trans-symˡ _ ⟩∎ refl _ ∎ -- If P is a groupoid, then there is a based embedding from -- (K[ Fundamental-group′ P s ]1 , base) to P (assuming univalence). -- -- <NAME> showed me a similar proof of this result. K[Fundamental-group′]1↣ᴮ : {P : Pointed-type p} {s : Is-set (proj₁ (Ω P))} → Univalence p → H-level 3 (proj₁ P) → (K[ Fundamental-group′ P s ]1 , base) ↝[ embedding ]ᴮ P K[Fundamental-group′]1↣ᴮ {P = P@(A , a)} {s = s} univ g = record { to = to; is-embedding = emb } , refl _ where to : K[ Fundamental-group′ P s ]1 → A to = rec λ where .baseʳ → a .loopʳ → P.id .loop-idʳ → refl _ .loop-∘ʳ → refl _ .is-groupoidʳ → g iso : Fundamental-group′ P s ≃ᴳ Fundamental-group′ (K[ Fundamental-group′ P s ]1 , base) is-groupoid iso = ≃ᴳ-sym $ Fundamental-group′[K1]≃ᴳ univ is-groupoid cong-to-iso : cong to ⊚ Homomorphic.to iso ≡ P.id cong-to-iso = ⟨ext⟩ λ eq → cong to (loop eq) ≡⟨ rec-loop ⟩∎ eq ∎ cong-to-equivalence : Eq.Is-equivalence (cong {x = base} {y = base} to) cong-to-equivalence = Eq.Two-out-of-three.g∘f-f (Eq.two-out-of-three _ _) (Is-equivalence-cong _ (ext⁻¹ (sym cong-to-iso)) (_≃_.is-equivalence Eq.id)) (_≃_.is-equivalence (iso .related)) emb : Is-embedding to emb = elim-prop λ where .is-propositionʳ _ → Π-closure ext 1 λ _ → Eq.propositional ext _ .baseʳ → elim-prop λ where .is-propositionʳ _ → Eq.propositional ext _ .baseʳ → cong-to-equivalence -- If P is a connected groupoid, then there is a based equivalence -- from (K[ Fundamental-group′ P s ]1 , base) to P (assuming -- univalence). -- -- <NAME> showed me a similar proof of this result. K[Fundamental-group′]1≃ᴮ : {P : Pointed-type p} {s : Is-set (proj₁ (Ω P))} → Univalence p → H-level 3 (proj₁ P) → Connected P → (K[ Fundamental-group′ P s ]1 , base) ≃ᴮ P K[Fundamental-group′]1≃ᴮ {P = P@(A , a)} {s = s} univ g conn = Eq.⟨ Embedding.to (proj₁ f) , _≃_.to TP.surjective×embedding≃equivalence (surj , Embedding.is-embedding (proj₁ f)) ⟩ , proj₂ f where f = K[Fundamental-group′]1↣ᴮ univ g surj : Surjective (Embedding.to (proj₁ f)) surj x = flip TP.∥∥-map (conn x) λ a≡x → base , (Embedding.to (proj₁ f) base ≡⟨⟩ a ≡⟨ a≡x ⟩∎ x ∎) ------------------------------------------------------------------------ -- Another result related to a fundamental group -- If G is abelian, then the fundamental group of -- (K[ G ]1 ≃ K[ G ]1 , Eq.id) is isomorphic to G (assuming -- univalence). -- -- I was informed of a related result by <NAME>. Fundamental-group′[K1≃K1]≃ᴳ : {G : Group g} {s : Is-set _} → Univalence g → Abelian G → Fundamental-group′ ((K[ G ]1 ≃ K[ G ]1) , Eq.id) s ≃ᴳ G Fundamental-group′[K1≃K1]≃ᴳ {G = G} univ abelian = λ where .related → _≡_ {A = K[ G ]1 ≃ K[ G ]1} Eq.id Eq.id ↝⟨ inverse $ ≃-to-≡≃≡ ext ext ⟩ ((x : K[ G ]1) → x ≡ x) ↝⟨ Eq.↔→≃ to from to-from from-to ⟩□ Carrier □ .homomorphic p q → Homomorphic.to iso (cong (λ eq → _≃_.to eq base) (trans p q)) ≡⟨ cong (Homomorphic.to iso) $ cong-trans _ _ _ ⟩ Homomorphic.to iso (trans (cong (λ eq → _≃_.to eq base) p) (cong (λ eq → _≃_.to eq base) q)) ≡⟨ Homomorphic.homomorphic iso _ _ ⟩∎ Homomorphic.to iso (cong (λ eq → _≃_.to eq base) p) ∘ Homomorphic.to iso (cong (λ eq → _≃_.to eq base) q) ∎ where open Group G iso = Fundamental-group′[K1]≃ᴳ {G = G} univ is-groupoid to : ((x : K[ G ]1) → x ≡ x) → Carrier to f = Homomorphic.to iso (f base) from : Carrier → (x : K[ G ]1) → x ≡ x from x = elim-set λ where .is-setʳ _ → is-groupoid .baseʳ → loop x .loopʳ y → ≡⇒↝ _ (sym [subst≡]≡[trans≡trans]) (trans (loop x) (loop y) ≡⟨ sym loop-∘ ⟩ loop (x ∘ y) ≡⟨ cong loop $ abelian x y ⟩ loop (y ∘ x) ≡⟨ loop-∘ ⟩∎ trans (loop y) (loop x) ∎) to-from : ∀ p → to (from p) ≡ p to-from x = Homomorphic.to iso (loop x) ≡⟨ _≃_.right-inverse-of (Homomorphic.related iso) _ ⟩∎ x ∎ from-to : ∀ f → from (to f) ≡ f from-to f = ⟨ext⟩ $ elim-prop λ where .is-propositionʳ _ → is-groupoid .baseʳ → loop (Homomorphic.to iso (f base)) ≡⟨ _≃_.left-inverse-of (Homomorphic.related iso) _ ⟩∎ f base ∎
oeis/064/A064057.asm
neoneye/loda-programs
11
8580
; A064057: Eighth column of quintinomial coefficients. ; Submitted by <NAME> ; 2,18,80,255,666,1520,3144,6030,10890,18722,30888,49205,76050,114480,168368,242556,343026,477090,653600,883179,1178474,1554432,2028600,2621450,3356730,4261842,5368248 add $0,2 sub $2,$0 mov $0,$2 bin $0,2 mul $0,$2 bin $2,7 sub $0,$2
45/beef/drv/csd/inc/csd_std.asm
minblock/msdos
0
177172
;* ;* CW : Character Windows ;* ;* csd_std.asm : standard defaults ;* (not machine specific) ifndef ImodeGuessCurrentCsd_NonDefault ;***************************************************************************** ;********** ImodeGuessCurrentCsd ********** ;* * CSD entry point (see documentation for interface) cProc ImodeGuessCurrentCsd, <FAR, PUBLIC, ATOMIC>, <SI,DI> cBegin ImodeGuessCurrentCsd mov di,OFF_lpwDataCsd cCall FvmGetCur ;* get fvm push ax cCall ModeGetCur ;* al = mode, ah = ayMac (0=>unknown) pop bx ;* bx = fvm ;* * Search for current mode and fvm in rgdm mov si,drvOffset rgdm mov cx,cdmMax xor dx,dx ;* * al = current mode, ah = ayMac (or 0=>unknown) ;* * bx = fvm ;* * si = pdm ;* * dx = idm = imode ;* * cx = loop count imgc_next: cmp al,cs:[si].modeDm jne @F test bl,cs:[si].fvmReqAdapDm jz @F test bh,cs:[si].fvmReqDispDm jz @F ;* not available or ah,ah jz imgc_end ;* height unknown => use this one cmp ah,cs:[si].ayMacDm jz imgc_end ;* same height => use this one @@: add si,size DM inc dx loop imgc_next mov dx,-1 ;* unknown imgc_end: ;* dx = imode mov ax,dx ;* guess this mode cEnd ImodeGuessCurrentCsd ;***************************************************************************** endif ;* ImodeGuessCurrentCsd_NonDefault ifndef FQueryInstCsd_NonDefault ;***************************************************************************** ;********** FQueryInstCsd ********** ;* * CSD entry point (see documentation for interface) cProc FQueryInstCsd, <FAR, PUBLIC, ATOMIC>, <si, di> parmDP pinst parmW imode localW fvm cBegin FQueryInstCsd mov di,OFF_lpwDataCsd cCall FvmGetCur ;* find out what we got ... ;* will query hardware at first call mov fvm,ax mov si,imode cmp si,cdmMax jb got_imode fail_query: xor ax,ax ;* failure jmp end_qmode got_imode: ;* si = imode mov ax,SIZE DM mul si mov si,ax add si,drvOffset rgdm ;* CS:SI => INST info ;* * copy DM info into INST mov di,pinst ;* ds:di => dest ;* * clear out the INST structure push di push ds pop es mov cx,cbInstMin / 2 xor ax,ax rep stosw pop di ;* * move information from DM to INST ;* finst mov ax,fvm ;* al=adapter, ah=monitor mov dx,cs:[si].finstDm test al,cs:[si].fvmReqAdapDm jz @F test ah,cs:[si].fvmReqDispDm jz @F or dx,finstAvailable ;* this mode is currently available @@: ;* dx = finst IFDEF BUILTIN_SNOW ;* * KLUDGE: set finstQuestionable for a builtin CGA. test al,fvmCGA jz @F or dx,finstQuestionable @@: ENDIF ;BUILTIN_SNOW mov ds:[di].finstInst,dx IFDEF EARLIER Assert <ayMacDm EQ axMacDm+1> Assert <ayMacInst EQ axMacInst+1> ;* axMac, ayMac mov dx,word ptr cs:[si].axMacDm ELSE mov dl,cs:[si].axMacDm mov dh,cs:[si].ayMacDm ENDIF mov wo ds:[di].axMacInst,dx ;* move both axMac and ayMac ;* mode index mov dx,imode mov ds:[di].imodeInst,dx ;* coMac, covMac, coiMac mov dl,cs:[si].coMacDm mov ds:[di].coMacInst,dl cCall CoiCovFromFvm ;* al = fvm mov ds:[di].covMacInst,ah mov ds:[di].coiMacInst,dx ;* INFT information Assert <dyCharDm EQ dxCharDm+1> Assert <dyCharInft EQ dxCharInft+1> mov dx,word ptr cs:[si].dxCharDm mov word ptr ds:[di].inftInst.dxCharInft,dx ;* move both dxChar and dyChar mov dl,cs:[si].dyBaseDm mov ds:[di].inftInst.dyBaseLineInft,dl mov dl,cs:[si].ifontDm mov ds:[di].inftInst.ifontInft,dl mov dx,0FFFFh ;default ffont values mov ds:[di].ffontSupportedInst,dx ;* Buffer info mov ax,cs:[si].psVideoDm mov ds:[di].psPrimInst,ax AssertEQ ds:[di].psSecInst,0 AssertEQ ds:[di].cwExtraInst,0 ;* * set private info (store pointer to DM in the INST structure) mov [di].pdmInst,si mov ax,sp ;* ok end_qmode: cEnd FQueryInstCsd ;***************************************************************************** endif ;* FQueryInstCsd_NonDefault ifndef TermCsd_NonDefault ;***************************************************************************** ;********** TermCsd ********** ;* * CSD entry point (see documentation for interface) ;* * normally a no-op cProc TermCsd, <FAR, PUBLIC, ATOMIC> cBegin TermCsd ifdef KANJI cCall EnableBlinkBit endif ; KANJI cEnd TermCsd ;***************************************************************************** endif ;* TermCsd_NonDefault
misc/spriteDemo.asm
TheStormkeeper/c64_fun
13
245852
<gh_stars>10-100 ; ; Demo displaying a single sprite and handling joystick actions. ; Uses raster interrupt. ; !to "spritedemo.prg", cbm ; launch routine *=$0801 !byte $0c, $08, $0a, $00, $9e, $20, $38, $31, $39, $32 deltaX !byte $0 ; dx for joystick movement ( -1 - left, 1 - right, 0 - none) deltaY !byte $0 ; dy for joystick movement ( -1 - up, 1 - down, 0 - none) firePressed !byte $1 ; 1 - not pressed; 0 - pressed ; ----- MAIN PROGRAM ----- *=$2000 .init: jsr clearScreen .initSprites: lda #1 sta $d015 sta $d01c ; enable multicolor ; multicolor settings lda #$0A sta $d025 lda #$07 sta $d026 ; sprite 0 setup lda #$AA ; set coordinates sta $d000 lda #$88 sta $d001 lda #$c0 ; set sprite image sta $07f8 lda #$05 ; set sprite color sta $d027 .initInterrupt: sei lda #$7f sta $dc0d sta $dd0d lda #$01 sta $d01a ldx #$1b ; text mode lda #$08 ; single color text ldy #$14 ; uppercase text ($16 for lowercase) stx $d011 sta $d016 sty $d018 lda #<updateIRQ ldx #>updateIRQ sta $0314 stx $0315 ldy #$ff ; line to trigger interrupt sty $d012 lda $dc0d lda $dd0d asl $d019 cli .mainLoop: jmp .mainLoop rts ; ----- MAIN UPDATE SUBROUTINE (called on raster irq) ----- updateIRQ: asl $d019 jsr handleJoystick lda firePressed cmp #$1 beq .move inc $d020 ; change border color on fire press .move: jsr moveSprite jmp $ea81 ;----- MOVE SPRITE ----- moveSprite: lda deltaX cmp #$01 beq .checkHorizontalRight cmp #$ff beq .checkHorizontalLeft jmp .checkVertical .checkHorizontalRight: inc $d000 bne .checkVertical jsr flipPosBitX jmp .checkVertical .checkHorizontalLeft: lda $d000 bne .decX jsr flipPosBitX .decX: dec $d000 .checkVertical: lda $d001 clc adc deltaY sta $d001 .exitMoveProc: rts ; ----- SUBROUTINE FOR FLIPPING X DIR REGISTER ----- flipPosBitX: lda $d010 eor #$01 sta $d010 rts ; ----- HANDLE JOYSTICK (PORT 2) ----- handleJoystick: lda $dc00 ; get port 2 input ldy #0 ldx #0 lsr bcs .hj0 dey .hj0: lsr bcs .hj1 iny .hj1: lsr bcs .hj2 dex .hj2: lsr bcs .hj3 inx .hj3: lsr stx deltaX sty deltaY lda #$0 bcc .storeFire ; fire information stored in carry flag lda #$1 .storeFire: sta firePressed rts ; ----- CLEAR SCREEN ----- clearScreen: lda #$00 tax sta $d020 sta $d021 lda #$20 .clrLoop: sta $0400, x sta $0500, x sta $0600, x sta $0700, x ; be careful here - clearing all bytes starting from $0700 will corrupt sprite data dex bne .clrLoop ; use this code to clear the $0700 screen region skipping last 8 bytes (sprite pointers) ; ldx #$f7 ;clrLastSegment: ; sta $0700, x ; dex ; bne clrLastSegment rts ; ---- SPRITE DATA ----- *=$3000 !bin "spritedemo.spr"
test/interaction/Issue3417.agda
shlevy/agda
1,989
9502
<reponame>shlevy/agda<filename>test/interaction/Issue3417.agda -- Andreas, 2019-02-17, issue #3417 -- -- We want to see highlighting for all the warnings, -- even if the last thing is a hard error. open import Agda.Builtin.Nat reachable : Nat → Nat reachable zer = 0 reachable (suc n) = suc (reachable n) coverage : Nat → Nat coverage zero = zero Termination : Set Termination = Termination data Positivity : Set where abs : (Positivity → Nat) → Positivity Universe : Set Universe = Set -- Problem was: Termination and Positivity got no highlighting.
src/main/antlr4/com/formation/Formation.g4
cybermario/antlr4-demo
0
747
grammar Formation; // Parser Rules formation: sector? (DELIMITER? (group | vehicle))+; group: GROUP_START (DELIMITER? vehicle)+ GROUP_END; vehicle: STATUS? NO_LEFT_PASSAGE? vehicleType NO_RIGHT_PASSAGE? order? offer? sector?; sector: SECTOR_PREFIX sectorName; sectorName: TEXT; vehicleType: TEXT; order: ORDER_PREFIX orderNumber; orderNumber: TEXT; offer: OFFER_PREFIX (offerText OFFER_DELIMITER?)+; offerText: TEXT; // Lexer Rules DELIMITER: ','; GROUP_START: '['; GROUP_END: ']'; STATUS: '-' | 'R' ; NO_LEFT_PASSAGE: '('; NO_RIGHT_PASSAGE: ')'; SECTOR_PREFIX: '@'; ORDER_PREFIX: ':'; OFFER_PREFIX: '#'; OFFER_DELIMITER: ';'; TEXT : ( [a-zA-Z] | [0-9] )+ ; WHITESPACE : ( '\t' | ' ' | '\r' | '\n'| '\u000C' )+ -> skip ;
src/implementation/cl.adb
flyx/OpenCLAda
8
15407
<filename>src/implementation/cl.adb -------------------------------------------------------------------------------- -- Copyright (c) 2013, <NAME> <<EMAIL>> -- -- Permission to use, copy, modify, and/or distribute this software for any -- purpose with or without fee is hereby granted, provided that the above -- copyright notice and this permission notice appear in all copies. -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -------------------------------------------------------------------------------- with Ada.Strings.Fixed; with Ada.Strings; package body CL is use Ada.Strings; use Ada.Strings.Fixed; function "=" (Left, Right : CL_Object) return Boolean is use type System.Address; begin return Left.Location = Right.Location; end "="; function Initialized (Object : Runtime_Object) return Boolean is use type System.Address; begin return Object.Location /= System.Null_Address; end Initialized; function Raw (Source : Runtime_Object) return System.Address is begin return Source.Location; end Raw; function To_String (Value : Char) return String is begin return Trim (Value'Img, Both); end To_String; function To_String (Value : Short) return String is begin return Trim (Value'Img, Both); end To_String; function To_String (Value : Int) return String is begin return Trim (Value'Img, Both); end To_String; function To_String (Value : Long) return String is begin return Trim (Value'Img, Both); end To_String; function To_String (Value : UChar) return String is begin return Trim (Value'Img, Both); end To_String; function To_String (Value : UShort) return String is begin return Trim (Value'Img, Both); end To_String; function To_String (Value : UInt) return String is begin return Trim (Value'Img, Both); end To_String; function To_String (Value : ULong) return String is begin return Trim (Value'Img, Both); end To_String; function To_String (Value : CL.Float) return String is begin return Trim (Value'Img, Both); end To_String; function Float_Equals (Left, Right : Float) return Boolean is begin return abs (Left - Right) <= Epsilon; end Float_Equals; end CL;
Assets/Animations/Mannequin/ADB/Face.adb
CopyPasteBugs/ActionGameContestProject
0
23467
<gh_stars>0 <AnimDB FragDef="Animations/Mannequin/ADB/FaceFragmentIds.xml" TagDef="Animations/Mannequin/ADB/FaceTags.xml"> <FragmentList> <BodyMove> <Fragment BlendOutDuration="0.2" Tags=""> <AnimLayer> <Blend ExitTime="0" StartTime="0" Duration="0.2"/> <Animation name="BodyAnim" flags="Loop"/> </AnimLayer> <AnimLayer> <Blend ExitTime="0" StartTime="0" Duration="0.25999999"/> <Animation name="FaceAnim" flags="Loop"/> </AnimLayer> </Fragment> </BodyMove> </FragmentList> </AnimDB>
Application Support/BBEdit/AppleScript/conflict_select_start_of_next.applescript
bhdicaire/bbeditSetup
0
1556
<filename>Application Support/BBEdit/AppleScript/conflict_select_start_of_next.applescript<gh_stars>0 tell application "BBEdit" activate set theMatch to find "<<<<" searching in text 1 of text document 1 options {search mode:grep, starting at top:false, wrap around:true, backwards:false, case sensitive:false, match words:false, extend selection:false} with selecting match if found of theMatch then else display dialog "no more conflicts!" end if end tell
kernel.asm
jason-plainlog/osdev
0
172084
<filename>kernel.asm bits 32 section .text align 4 dd 0x1BADB002 dd 0x00 dd - (0x1BADB002 + 0x00) global start extern kmain start: cli call kmain hlt
commands/web-searches/search-gender-in-chosic.applescript
daviddzhou/script-commands
3,305
4470
<gh_stars>1000+ #!/usr/bin/osascript # Required parameters: # @raycast.schemaVersion 1 # @raycast.title Search Genre in Chosic # @raycast.mode inline # Optional parameters: # @raycast.packageName Web Searches # @raycast.icon images/chosic.png # Documentation: # @raycast.description Find the current Spotify track's gender in Chosic # @raycast.author quelhasu # @raycast.authorURL https://github.com/quelhasu tell application "Spotify" try set spotifyURI to spotify url of the current track set trackName to name of the current track set trackArtist to artist of the current track end try end tell set AppleScript's text item delimiters to ":" set trackID to third text item of spotifyURI log trackName & " ~ " & trackArtist open location "https://www.chosic.com/music-genre-finder/?track=" & trackID
verification/models/typesystem/ark_typesystem.als
openharmony-gitee-mirror/ark_runtime_core
1
3022
<filename>verification/models/typesystem/ark_typesystem.als /* * Copyright (c) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file 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. */ module ark_typesystem sig Sort {} sig Type {} enum Variance { Covariant, Contrvariant, Invariant } sig Param { variance: one Variance, type: one Type } { // all params are different all disj p1, p2 : Param | p1.@variance != p2.@variance or p1.@type != p2.@type } // to avoid higher-order relations, using one level of // indirection here, access to signatures via params atoms sig Params { signature: seq Param } { // all signatures are different for different params all disj p1, p2 : Params | p1.@signature != p2.@signature } // to help vizualization pred subtype_params_for_vizualization [ param_subtyping : Param -> Param, params_subtyping: Params -> Params, subtyping: Type -> Type ] { all p1,p2: Param | subtype[p1,p2,subtyping] iff p1 -> p2 in param_subtyping all ps1, ps2: Params | subtype[ps1,ps2, subtyping] iff ps1 -> ps2 in params_subtyping } // constraints for type universe pred is_correct [universe: Sort -> Params -> Type] { // one type per one pair sort->params all t: Type | one universe.t all disj t1,t2: Type | universe.t1 != universe.t2 all t: Type | one universe.sort[t] all t: Type | one universe.params[t] // if sort has several params tuples of equal length, // then their sequencies of variances should match // (otherwise it is unclear how to calculate subtyping) all s: Sort | all ps1, ps2: s.universe.Type | #ps1 = #ps2 implies all idx: ps1.signature.inds | ps1.signature[idx].variance = ps1.signature[idx].variance // type cannot be present in its own parameters all t: Type| t not in universe.signature[t].elems.type } // p1 <: p2 // check if params are in subtyping relation pred subtype [p1:Param, p2:Param, subtyping: Type -> Type] { let v1 = p1.variance, v2 = p2.variance { v1 = Invariant and v2 = Invariant implies p1.type -> p2.type in subtyping and p2.type -> p1.type in subtyping v1 = Covariant and v2 = Covariant implies p1.type -> p2.type in subtyping v1 = Contrvariant and v2 = Contrvariant implies p2.type -> p1.type in subtyping } } // sig1 <: sig2 // check signatures subtyping pred subtype [sig1:Params, sig2:Params, subtyping: Type -> Type] { // two signatures are in subtyping relation if let sig1 = sig1.signature, sig2 = sig2.signature { #sig1 = #sig2 // they are of same length all idx : sig1.inds // and all parameters in subtyping relation | subtype[sig1[idx], sig2[idx], subtyping] } } // aux functions for readbility fun sort[universe: Sort->Params->Type, t: Type] : Sort { universe.t.Params } fun params[universe: Sort->Params->Type, t: Type] : Params { universe.t[universe.sort[t]] } fun signature[universe: Sort->Params->Type, t: Type] : seq Param { universe.params[t].signature } pred non_parameterized[universe: Sort->Params->Type, t: Type] { universe.signature[t].isEmpty } fun same_sort_arity_subtypeable[universe: Sort->Params->Type, subtyping: Type -> Type] : Type -> Type { {t1, t2 : Type | universe.sort[t1] = universe.sort[t2] and subtype[universe.params[t1], universe.params[t2], subtyping] } } fun all_subtypeable[universe: Sort->Params->Type, subtyping: Type -> Type] : Type -> Type { {t1, t2 : Type | universe.sort[t1] != universe.sort[t2] or #universe.signature[t1] != #universe.signature[t2] or // of same sort + arity and signatures in corresponding relation subtype[universe.params[t1], universe.params[t2], subtyping] } } pred is_correct[universe: Sort->Params->Type, subtyping: Type -> Type] { all t : Type | t ->t in subtyping ^subtyping in subtyping subtyping in all_subtypeable[universe, subtyping] same_sort_arity_subtypeable[universe, subtyping] in subtyping } // panda type system private one sig TestTypeSystem { // each type - is parameterized sort universe: Sort -> Params -> Type, // subtyping relation subtyping: Type -> Type, // auxiliary, for better visual representation of // relations between params and signatures params_subtyping: Params -> Params, param_subtyping: Param -> Param } { universe.is_correct subtype_params_for_vizualization [ param_subtyping, params_subtyping, subtyping ] } // let's look at some instances of correct subtyping show: run { #universe > 2 #Params > 2 #Sort > 1 some disj t1,t2: Type | TestTypeSystem.universe.sort[t1] = TestTypeSystem.universe.sort[t2] TestTypeSystem.universe.is_correct[TestTypeSystem.subtyping] }
Toggle Skype Mic.lbaction/Contents/Scripts/default.applescript
universvm/lb6-actions
216
2052
on run tell application "Skype" if it is not running then return -- from https://gist.github.com/kylef/120887 if (send command "GET MUTE" script name "LaunchBar") is equal to "MUTE ON" then send command "SET MUTE OFF" script name "LaunchBar" else send command "SET MUTE ON" script name "LaunchBar" end if end tell end run
Transynther/x86/_processed/AVXALIGN/_ht_zr_/i3-7100_9_0xca_notsx.log_21829_1587.asm
ljhsiun2/medusa
9
174243
<filename>Transynther/x86/_processed/AVXALIGN/_ht_zr_/i3-7100_9_0xca_notsx.log_21829_1587.asm<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %r14 push %rax push %rbp push %rcx push %rdi push %rsi lea addresses_WT_ht+0x1803b, %rbp nop nop nop cmp $9749, %rcx movw $0x6162, (%rbp) nop nop nop cmp %r14, %r14 lea addresses_normal_ht+0xc173, %r10 nop and $47509, %rax mov $0x6162636465666768, %rcx movq %rcx, %xmm3 movups %xmm3, (%r10) nop and %rcx, %rcx lea addresses_D_ht+0xcffb, %rsi lea addresses_WT_ht+0xb6bb, %rdi nop nop nop nop xor %r10, %r10 mov $32, %rcx rep movsw nop nop nop add $51633, %rdi lea addresses_UC_ht+0x1dafb, %rdi nop nop nop nop nop sub %rcx, %rcx movb (%rdi), %r13b nop nop nop nop nop cmp $29965, %rdi lea addresses_WT_ht+0x9bfb, %rsi lea addresses_D_ht+0x1a1ad, %rdi nop cmp $54445, %r10 mov $68, %rcx rep movsl nop nop nop xor $3080, %r10 lea addresses_UC_ht+0x139fb, %rbp nop nop nop sub $33815, %r14 movups (%rbp), %xmm2 vpextrq $0, %xmm2, %rcx nop add %rdi, %rdi lea addresses_normal_ht+0x14f3b, %rsi lea addresses_D_ht+0x3ee1, %rdi xor %rbp, %rbp mov $22, %rcx rep movsq nop sub $25512, %rbp lea addresses_A_ht+0xae7b, %rbp add %r13, %r13 mov (%rbp), %di nop nop nop nop nop add %r14, %r14 lea addresses_WC_ht+0xaa5b, %rax clflush (%rax) nop nop nop nop dec %rsi vmovups (%rax), %ymm7 vextracti128 $1, %ymm7, %xmm7 vpextrq $1, %xmm7, %r13 nop nop nop nop cmp $52485, %r10 lea addresses_A_ht+0x837b, %rcx nop nop nop nop and %r14, %r14 mov $0x6162636465666768, %r13 movq %r13, %xmm2 vmovups %ymm2, (%rcx) cmp $61757, %r14 lea addresses_WT_ht+0x127b, %r13 clflush (%r13) nop nop nop sub %rbp, %rbp mov (%r13), %r14 nop nop nop sub %rsi, %rsi lea addresses_normal_ht+0x1ae5b, %rsi lea addresses_UC_ht+0x5dfb, %rdi sub %r14, %r14 mov $98, %rcx rep movsw nop nop nop nop xor $22561, %rcx pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r14 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r13 push %r15 push %rcx push %rdi push %rsi // REPMOV mov $0x1fb, %rsi lea addresses_WT+0x1921e, %rdi nop nop nop add %r15, %r15 mov $55, %rcx rep movsw nop and $64544, %rdi // Load lea addresses_PSE+0x66fb, %r15 cmp $61196, %r10 movups (%r15), %xmm3 vpextrq $1, %xmm3, %rcx nop nop nop nop nop and %rsi, %rsi // Faulty Load lea addresses_RW+0x57fb, %r11 nop nop nop nop sub $17382, %r13 movaps (%r11), %xmm6 vpextrq $1, %xmm6, %r10 lea oracles, %rsi and $0xff, %r10 shlq $12, %r10 mov (%rsi,%r10,1), %r10 pop %rsi pop %rdi pop %rcx pop %r15 pop %r13 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_RW', 'size': 8, 'AVXalign': True}, 'OP': 'LOAD'} {'src': {'type': 'addresses_P', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT', 'congruent': 0, 'same': False}} {'src': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_PSE', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_RW', 'size': 16, 'AVXalign': True}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_WT_ht', 'size': 2, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False}} {'src': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}} {'src': {'same': True, 'congruent': 8, 'NT': False, 'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}} {'src': {'same': False, 'congruent': 9, 'NT': False, 'type': 'addresses_UC_ht', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}} {'src': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_A_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_A_ht', 'size': 32, 'AVXalign': False}} {'src': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}} {'46': 19, '49': 3060, '48': 1, '00': 8000, '44': 10742, '47': 7} 00 44 44 44 00 00 44 00 00 00 49 00 44 00 49 00 44 44 00 44 00 44 44 44 44 44 00 49 00 49 49 44 44 44 44 00 44 00 00 49 00 49 44 00 49 44 44 44 44 44 44 44 00 44 44 49 00 44 44 44 00 00 49 49 44 44 00 00 00 44 44 00 00 00 00 49 44 00 00 00 00 44 44 44 44 00 44 00 00 00 49 00 44 49 44 00 49 00 49 44 00 49 44 44 00 00 44 00 44 44 00 00 49 44 44 44 44 00 49 49 44 00 44 44 00 00 49 44 44 44 44 00 44 44 00 00 44 44 44 00 00 44 44 00 49 00 00 44 44 49 00 00 44 44 44 44 44 49 44 44 49 00 00 00 00 00 44 44 49 00 49 00 49 44 49 00 44 44 00 00 00 00 00 44 44 00 44 44 44 00 49 49 44 44 44 44 44 00 44 00 44 00 44 44 44 00 00 00 00 44 00 00 44 44 00 49 44 44 44 44 00 44 44 00 44 49 00 00 49 00 44 00 00 44 44 49 44 00 44 00 44 44 00 44 00 49 44 00 00 44 44 44 44 44 44 44 44 44 44 00 00 00 49 00 44 00 00 00 00 00 49 00 00 49 00 44 44 00 44 00 00 44 00 00 44 44 00 49 00 49 44 00 44 00 44 44 00 00 00 00 44 44 44 49 44 44 49 44 00 49 44 00 49 44 49 00 49 44 44 00 49 49 44 44 44 44 00 00 44 00 00 00 00 49 00 00 00 49 44 44 00 44 44 44 00 44 00 00 00 49 00 00 44 44 00 44 44 44 44 44 44 00 49 00 00 00 44 49 00 44 44 00 49 44 44 44 00 49 49 00 00 00 49 44 00 00 44 00 00 49 49 00 44 00 44 44 44 00 44 44 44 00 44 00 44 44 00 44 00 44 49 00 44 00 00 00 44 00 00 44 44 44 44 44 44 44 44 44 44 44 49 00 00 00 00 00 00 49 00 00 00 00 49 44 44 44 44 44 44 44 00 44 00 44 44 44 49 00 00 49 49 00 44 00 49 44 49 00 00 44 00 44 44 44 44 00 00 44 44 00 00 44 44 44 44 44 49 49 49 44 44 00 00 44 49 44 00 00 00 00 00 44 44 44 44 44 44 00 00 44 00 00 49 44 49 49 44 44 44 44 00 44 44 00 44 44 00 00 00 49 44 44 44 44 44 44 00 44 44 00 44 44 49 44 00 44 44 44 00 49 00 00 44 44 00 44 44 44 00 00 44 00 00 44 49 44 00 49 44 00 44 44 00 00 00 49 49 00 00 44 44 00 44 44 00 44 44 44 00 44 44 49 44 00 00 00 00 44 44 00 44 00 00 44 00 00 49 00 49 44 00 00 00 44 44 00 00 44 44 00 49 44 00 44 44 44 44 44 44 44 44 44 44 44 44 44 00 44 00 00 00 00 49 44 44 00 00 49 44 00 00 00 00 44 49 49 49 00 44 00 49 00 00 44 44 44 00 44 44 00 00 44 00 00 49 49 44 44 44 49 44 44 44 44 49 44 49 44 44 44 44 00 00 44 44 44 44 44 00 44 49 00 44 44 44 00 00 44 00 00 44 44 00 00 44 44 44 49 44 44 44 44 44 44 44 44 44 44 00 00 44 00 49 00 00 49 44 44 44 00 49 49 44 44 44 46 44 44 49 00 00 00 44 00 44 00 44 00 44 00 44 44 44 00 49 00 44 00 44 44 49 44 00 44 44 00 00 44 44 00 44 00 49 49 49 00 49 00 49 00 00 00 00 44 49 00 49 49 00 00 00 00 00 44 44 44 44 00 49 00 00 44 00 44 44 44 44 00 00 44 00 00 44 00 00 49 00 00 49 44 44 49 00 00 00 44 00 49 00 44 00 00 00 44 00 44 44 44 00 44 00 00 49 44 44 00 49 00 00 00 49 00 00 44 44 44 00 49 49 00 44 44 00 49 00 49 44 00 00 44 00 44 44 44 00 49 49 00 00 00 44 44 44 44 44 44 44 00 49 49 00 49 00 44 44 00 44 00 00 49 00 00 49 00 00 44 44 00 44 00 44 44 00 44 44 44 49 44 00 44 44 00 44 44 44 44 00 44 44 44 00 00 00 44 00 00 44 44 44 44 44 00 44 44 44 00 49 44 44 44 44 44 00 49 00 49 00 00 44 00 00 44 44 44 44 44 00 44 49 44 44 00 49 44 00 44 00 44 00 00 49 49 44 44 00 44 44 44 00 00 */
Cubical/Algebra/CommAlgebra/Base.agda
lpw25/cubical
0
10938
{-# OPTIONS --safe #-} module Cubical.Algebra.CommAlgebra.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.HLevels open import Cubical.Foundations.SIP open import Cubical.Data.Sigma open import Cubical.Algebra.Semigroup open import Cubical.Algebra.Monoid open import Cubical.Algebra.CommRing open import Cubical.Algebra.Ring open import Cubical.Algebra.Algebra open import Cubical.Displayed.Base open import Cubical.Displayed.Auto open import Cubical.Displayed.Record open import Cubical.Displayed.Universe open import Cubical.Reflection.RecordEquiv private variable ℓ ℓ' : Level record IsCommAlgebra (R : CommRing ℓ) {A : Type ℓ'} (0a : A) (1a : A) (_+_ : A → A → A) (_·_ : A → A → A) (-_ : A → A) (_⋆_ : ⟨ R ⟩ → A → A) : Type (ℓ-max ℓ ℓ') where constructor iscommalgebra field isAlgebra : IsAlgebra (CommRing→Ring R) 0a 1a _+_ _·_ -_ _⋆_ ·-comm : (x y : A) → x · y ≡ y · x open IsAlgebra isAlgebra public unquoteDecl IsCommAlgebraIsoΣ = declareRecordIsoΣ IsCommAlgebraIsoΣ (quote IsCommAlgebra) record CommAlgebraStr (R : CommRing ℓ) (A : Type ℓ') : Type (ℓ-max ℓ ℓ') where constructor commalgebrastr field 0a : A 1a : A _+_ : A → A → A _·_ : A → A → A -_ : A → A _⋆_ : ⟨ R ⟩ → A → A isCommAlgebra : IsCommAlgebra R 0a 1a _+_ _·_ -_ _⋆_ open IsCommAlgebra isCommAlgebra public infix 8 -_ infixl 7 _·_ infixl 7 _⋆_ infixl 6 _+_ CommAlgebra : (R : CommRing ℓ) → ∀ ℓ' → Type (ℓ-max ℓ (ℓ-suc ℓ')) CommAlgebra R ℓ' = Σ[ A ∈ Type ℓ' ] CommAlgebraStr R A module _ {R : CommRing ℓ} where open CommRingStr (snd R) using (1r) renaming (_+_ to _+r_; _·_ to _·s_) CommAlgebraStr→AlgebraStr : {A : Type ℓ'} → CommAlgebraStr R A → AlgebraStr (CommRing→Ring R) A CommAlgebraStr→AlgebraStr (commalgebrastr _ _ _ _ _ _ (iscommalgebra isAlgebra ·-comm)) = algebrastr _ _ _ _ _ _ isAlgebra CommAlgebra→Algebra : (A : CommAlgebra R ℓ') → Algebra (CommRing→Ring R) ℓ' CommAlgebra→Algebra (_ , str) = (_ , CommAlgebraStr→AlgebraStr str) CommAlgebra→CommRing : (A : CommAlgebra R ℓ') → CommRing ℓ' CommAlgebra→CommRing (_ , commalgebrastr _ _ _ _ _ _ (iscommalgebra isAlgebra ·-comm)) = _ , commringstr _ _ _ _ _ (iscommring (IsAlgebra.isRing isAlgebra) ·-comm) isSetCommAlgebra : (A : CommAlgebra R ℓ') → isSet ⟨ A ⟩ isSetCommAlgebra A = isSetAlgebra (CommAlgebra→Algebra A) makeIsCommAlgebra : {A : Type ℓ'} {0a 1a : A} {_+_ _·_ : A → A → A} { -_ : A → A} {_⋆_ : ⟨ R ⟩ → A → A} (isSet-A : isSet A) (+-assoc : (x y z : A) → x + (y + z) ≡ (x + y) + z) (+-rid : (x : A) → x + 0a ≡ x) (+-rinv : (x : A) → x + (- x) ≡ 0a) (+-comm : (x y : A) → x + y ≡ y + x) (·-assoc : (x y z : A) → x · (y · z) ≡ (x · y) · z) (·-lid : (x : A) → 1a · x ≡ x) (·-ldist-+ : (x y z : A) → (x + y) · z ≡ (x · z) + (y · z)) (·-comm : (x y : A) → x · y ≡ y · x) (⋆-assoc : (r s : ⟨ R ⟩) (x : A) → (r ·s s) ⋆ x ≡ r ⋆ (s ⋆ x)) (⋆-ldist : (r s : ⟨ R ⟩) (x : A) → (r +r s) ⋆ x ≡ (r ⋆ x) + (s ⋆ x)) (⋆-rdist : (r : ⟨ R ⟩) (x y : A) → r ⋆ (x + y) ≡ (r ⋆ x) + (r ⋆ y)) (⋆-lid : (x : A) → 1r ⋆ x ≡ x) (⋆-lassoc : (r : ⟨ R ⟩) (x y : A) → (r ⋆ x) · y ≡ r ⋆ (x · y)) → IsCommAlgebra R 0a 1a _+_ _·_ -_ _⋆_ makeIsCommAlgebra {A = A} {0a} {1a} {_+_} {_·_} { -_} {_⋆_} isSet-A +-assoc +-rid +-rinv +-comm ·-assoc ·-lid ·-ldist-+ ·-comm ⋆-assoc ⋆-ldist ⋆-rdist ⋆-lid ⋆-lassoc = iscommalgebra (makeIsAlgebra isSet-A +-assoc +-rid +-rinv +-comm ·-assoc (λ x → x · 1a ≡⟨ ·-comm _ _ ⟩ 1a · x ≡⟨ ·-lid _ ⟩ x ∎) ·-lid (λ x y z → x · (y + z) ≡⟨ ·-comm _ _ ⟩ (y + z) · x ≡⟨ ·-ldist-+ _ _ _ ⟩ (y · x) + (z · x) ≡⟨ cong (λ u → (y · x) + u) (·-comm _ _) ⟩ (y · x) + (x · z) ≡⟨ cong (λ u → u + (x · z)) (·-comm _ _) ⟩ (x · y) + (x · z) ∎) ·-ldist-+ ⋆-assoc ⋆-ldist ⋆-rdist ⋆-lid ⋆-lassoc λ r x y → r ⋆ (x · y) ≡⟨ cong (λ u → r ⋆ u) (·-comm _ _) ⟩ r ⋆ (y · x) ≡⟨ sym (⋆-lassoc _ _ _) ⟩ (r ⋆ y) · x ≡⟨ ·-comm _ _ ⟩ x · (r ⋆ y) ∎) ·-comm module _ (S : CommRing ℓ) where open CommRingStr (snd S) renaming (1r to 1S) open CommRingStr (snd R) using () renaming (_·_ to _·R_; _+_ to _+R_; 1r to 1R) commAlgebraFromCommRing : (_⋆_ : fst R → fst S → fst S) → ((r s : fst R) (x : fst S) → (r ·R s) ⋆ x ≡ r ⋆ (s ⋆ x)) → ((r s : fst R) (x : fst S) → (r +R s) ⋆ x ≡ (r ⋆ x) + (s ⋆ x)) → ((r : fst R) (x y : fst S) → r ⋆ (x + y) ≡ (r ⋆ x) + (r ⋆ y)) → ((x : fst S) → 1R ⋆ x ≡ x) → ((r : fst R) (x y : fst S) → (r ⋆ x) · y ≡ r ⋆ (x · y)) → CommAlgebra R ℓ commAlgebraFromCommRing _⋆_ ·Assoc⋆ ⋆DistR ⋆DistL ⋆Lid ⋆Assoc· = fst S , commalgebrastr 0r 1S _+_ _·_ -_ _⋆_ (makeIsCommAlgebra is-set +Assoc +Rid +Rinv +Comm ·Assoc ·Lid ·Ldist+ ·Comm ·Assoc⋆ ⋆DistR ⋆DistL ⋆Lid ⋆Assoc·) IsCommAlgebraEquiv : {A B : Type ℓ'} (M : CommAlgebraStr R A) (e : A ≃ B) (N : CommAlgebraStr R B) → Type (ℓ-max ℓ ℓ') IsCommAlgebraEquiv M e N = IsAlgebraHom (CommAlgebraStr→AlgebraStr M) (e .fst) (CommAlgebraStr→AlgebraStr N) CommAlgebraEquiv : (M N : CommAlgebra R ℓ') → Type (ℓ-max ℓ ℓ') CommAlgebraEquiv M N = Σ[ e ∈ ⟨ M ⟩ ≃ ⟨ N ⟩ ] IsCommAlgebraEquiv (M .snd) e (N .snd) IsCommAlgebraHom : {A B : Type ℓ'} (M : CommAlgebraStr R A) (f : A → B) (N : CommAlgebraStr R B) → Type (ℓ-max ℓ ℓ') IsCommAlgebraHom M f N = IsAlgebraHom (CommAlgebraStr→AlgebraStr M) f (CommAlgebraStr→AlgebraStr N) CommAlgebraHom : (M N : CommAlgebra R ℓ') → Type (ℓ-max ℓ ℓ') CommAlgebraHom M N = Σ[ f ∈ (⟨ M ⟩ → ⟨ N ⟩) ] IsCommAlgebraHom (M .snd) f (N .snd) module _ {M N : CommAlgebra R ℓ'} where open CommAlgebraStr {{...}} open IsAlgebraHom private instance _ = snd M _ = snd N makeCommAlgebraHom : (f : fst M → fst N) → (fPres1 : f 1a ≡ 1a) → (fPres+ : (x y : fst M) → f (x + y) ≡ f x + f y) → (fPres· : (x y : fst M) → f (x · y) ≡ f x · f y) → (fPres⋆ : (r : fst R) (x : fst M) → f (r ⋆ x) ≡ r ⋆ f x) → CommAlgebraHom M N makeCommAlgebraHom f fPres1 fPres+ fPres· fPres⋆ = f , isHom where fPres0 = f 0a ≡⟨ sym (+-rid _) ⟩ f 0a + 0a ≡⟨ cong (λ u → f 0a + u) (sym (+-rinv (f 0a))) ⟩ f 0a + (f 0a - f 0a) ≡⟨ +-assoc (f 0a) (f 0a) (- f 0a) ⟩ (f 0a + f 0a) - f 0a ≡⟨ cong (λ u → u - f 0a) (sym (fPres+ 0a 0a)) ⟩ f (0a + 0a) - f 0a ≡⟨ cong (λ u → f u - f 0a) (+-lid 0a) ⟩ f 0a - f 0a ≡⟨ +-rinv (f 0a) ⟩ 0a ∎ isHom : IsCommAlgebraHom (snd M) f (snd N) pres0 isHom = fPres0 pres1 isHom = fPres1 pres+ isHom = fPres+ pres· isHom = fPres· pres- isHom = (λ x → f (- x) ≡⟨ sym (+-rid _) ⟩ (f (- x) + 0a) ≡⟨ cong (λ u → f (- x) + u) (sym (+-rinv (f x))) ⟩ (f (- x) + (f x - f x)) ≡⟨ +-assoc _ _ _ ⟩ ((f (- x) + f x) - f x) ≡⟨ cong (λ u → u - f x) (sym (fPres+ _ _)) ⟩ (f ((- x) + x) - f x) ≡⟨ cong (λ u → f u - f x) (+-linv x) ⟩ (f 0a - f x) ≡⟨ cong (λ u → u - f x) fPres0 ⟩ (0a - f x) ≡⟨ +-lid _ ⟩ (- f x) ∎) pres⋆ isHom = fPres⋆ isPropIsCommAlgebraHom : (f : fst M → fst N) → isProp (IsCommAlgebraHom (snd M) f (snd N)) isPropIsCommAlgebraHom f = isPropIsAlgebraHom (CommRing→Ring R) (snd (CommAlgebra→Algebra M)) f (snd (CommAlgebra→Algebra N)) isPropIsCommAlgebra : (R : CommRing ℓ) {A : Type ℓ'} (0a 1a : A) (_+_ _·_ : A → A → A) (-_ : A → A) (_⋆_ : ⟨ R ⟩ → A → A) → isProp (IsCommAlgebra R 0a 1a _+_ _·_ -_ _⋆_) isPropIsCommAlgebra R _ _ _ _ _ _ = isOfHLevelRetractFromIso 1 IsCommAlgebraIsoΣ (isPropΣ (isPropIsAlgebra _ _ _ _ _ _ _) (λ alg → isPropΠ2 λ _ _ → alg .IsAlgebra.is-set _ _)) 𝒮ᴰ-CommAlgebra : (R : CommRing ℓ) → DUARel (𝒮-Univ ℓ') (CommAlgebraStr R) (ℓ-max ℓ ℓ') 𝒮ᴰ-CommAlgebra R = 𝒮ᴰ-Record (𝒮-Univ _) (IsCommAlgebraEquiv {R = R}) (fields: data[ 0a ∣ nul ∣ pres0 ] data[ 1a ∣ nul ∣ pres1 ] data[ _+_ ∣ bin ∣ pres+ ] data[ _·_ ∣ bin ∣ pres· ] data[ -_ ∣ autoDUARel _ _ ∣ pres- ] data[ _⋆_ ∣ autoDUARel _ _ ∣ pres⋆ ] prop[ isCommAlgebra ∣ (λ _ _ → isPropIsCommAlgebra _ _ _ _ _ _ _) ]) where open CommAlgebraStr open IsAlgebraHom -- faster with some sharing nul = autoDUARel (𝒮-Univ _) (λ A → A) bin = autoDUARel (𝒮-Univ _) (λ A → A → A → A) CommAlgebraPath : (R : CommRing ℓ) → (A B : CommAlgebra R ℓ') → (CommAlgebraEquiv A B) ≃ (A ≡ B) CommAlgebraPath R = ∫ (𝒮ᴰ-CommAlgebra R) .UARel.ua isGroupoidCommAlgebra : {R : CommRing ℓ} → isGroupoid (CommAlgebra R ℓ') isGroupoidCommAlgebra A B = isOfHLevelRespectEquiv 2 (CommAlgebraPath _ _ _) (isSetAlgebraEquiv _ _)
programs/oeis/153/A153152.asm
neoneye/loda
22
241707
<filename>programs/oeis/153/A153152.asm ; A153152: Rotated binary incrementing: For n<2 a(n)=n, if n=(2^k)-1, a(n)=(n+1)/2, otherwise a(n)=n+1. ; 0,1,3,2,5,6,7,4,9,10,11,12,13,14,15,8,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,16,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,32,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100 add $0,1 mov $1,$0 lpb $1 mov $2,1 lpb $1 dif $1,2 mul $2,2 lpe mul $0,2 mov $1,$2 lpe div $0,2
software/kernel/crash.adb
TUM-EI-RCS/StratoX
12
18773
<filename>software/kernel/crash.adb with System.Machine_Reset; with Ada.Real_Time; use Ada.Real_Time; with System.Task_Primitives.Operations; with Config.Tasking; with Bounded_Image; use Bounded_Image; with Logger; with NVRAM; with HIL; with Interfaces; use Interfaces; with Unchecked_Conversion; -- @summary Catches all exceptions, logs them to NVRAM and reboots. package body Crash with SPARK_Mode => Off is -- XXX! SPARK must be off here, otherwise this function is not being implemented. -- Reasons see below. function To_Unsigned is new Unchecked_Conversion (System.Address, Unsigned_32); -- SPARK RM 6.5.1: a call to a non-returning procedure introduces the -- obligation to prove that the statement will not be executed. -- This is the same as a run-time check that fails unconditionally. -- RM 11.3: ...must provably never be executed. procedure Last_Chance_Handler(location : System.Address; line : Integer) is now : constant Time := Clock; line16 : constant Unsigned_16 := (if line >= 0 and line <= Integer (Unsigned_16'Last) then Unsigned_16 (line) else Unsigned_16'Last); begin -- if the task which called this handler is not flight critical, -- silently hang here. as an effect, the system lives on without this task. declare use System.Task_Primitives.Operations; prio : constant ST.Extended_Priority := Get_Priority (Self); begin if prio < Config.Tasking.TASK_PRIO_FLIGHTCRITICAL then Logger.log (Logger.ERROR, "Non-critical task crashed"); loop null; end loop; -- FIXME: there exists a "sleep infinite" procedure...just can't find it -- but that'll do. at least it doesn't block flight-critical tasks end if; end; -- first log to NVRAM declare ba : constant HIL.Byte_Array := HIL.toBytes (line16); begin NVRAM.Store (NVRAM.VAR_EXCEPTION_LINE_L, ba (1)); NVRAM.Store (NVRAM.VAR_EXCEPTION_LINE_H, ba (2)); NVRAM.Store (NVRAM.VAR_EXCEPTION_ADDR_A, To_Unsigned (location)); end; -- now write to console (which might fail) Logger.log (Logger.ERROR, "Exception: Addr: " & Unsigned_Img (To_Unsigned (location)) & ", line " & Integer_Img (line)); -- wait until write finished (interrupt based) delay until now + Milliseconds(80); -- DEBUG ONLY: hang here to let us read the console output -- loop -- null; -- end loop; -- XXX! A last chance handler must always terminate or suspend the -- thread that executes the handler. Suspending cannot be used here, -- because we cannot distinguish the tasks (?). So we reboot. -- Abruptly stop the program. -- On bareboard platform, this returns to the monitor or reset the board. -- In the context of an OS, this terminates the process. System.Machine_Reset.Stop; -- this is a non-returning function. SPARK assumes it is never executed. -- The following junk raise of Program_Error is required because -- this is a No_Return function, and unfortunately Suspend can -- return (although this particular call won't). raise Program_Error; end Last_Chance_Handler; end Crash;
llvm-gcc-4.2-2.9/gcc/ada/scans.adb
vidkidz/crossbridge
1
29648
<reponame>vidkidz/crossbridge ------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S C A N S -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2006, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Namet; use Namet; with Snames; use Snames; package body Scans is ----------------------------- -- Initialize_Ada_Keywords -- ----------------------------- procedure Initialize_Ada_Keywords is procedure Set_Reserved (N : Name_Id; T : Token_Type); pragma Inline (Set_Reserved); -- Set given name as a reserved word (T is the corresponding token) ------------------ -- Set_Reserved -- ------------------ procedure Set_Reserved (N : Name_Id; T : Token_Type) is begin -- Set up Token_Type values in Names table entries for reserved -- words. We use the Pos value of the Token_Type value. Note that -- Is_Keyword_Name relies on the fact that Token_Type'Val (0) is not -- a reserved word! Set_Name_Table_Byte (N, Token_Type'Pos (T)); end Set_Reserved; -- Start of processing for Initialize_Ada_Keywords begin -- Establish reserved words Set_Reserved (Name_Abort, Tok_Abort); Set_Reserved (Name_Abs, Tok_Abs); Set_Reserved (Name_Abstract, Tok_Abstract); Set_Reserved (Name_Accept, Tok_Accept); Set_Reserved (Name_Access, Tok_Access); Set_Reserved (Name_And, Tok_And); Set_Reserved (Name_Aliased, Tok_Aliased); Set_Reserved (Name_All, Tok_All); Set_Reserved (Name_Array, Tok_Array); Set_Reserved (Name_At, Tok_At); Set_Reserved (Name_Begin, Tok_Begin); Set_Reserved (Name_Body, Tok_Body); Set_Reserved (Name_Case, Tok_Case); Set_Reserved (Name_Constant, Tok_Constant); Set_Reserved (Name_Declare, Tok_Declare); Set_Reserved (Name_Delay, Tok_Delay); Set_Reserved (Name_Delta, Tok_Delta); Set_Reserved (Name_Digits, Tok_Digits); Set_Reserved (Name_Do, Tok_Do); Set_Reserved (Name_Else, Tok_Else); Set_Reserved (Name_Elsif, Tok_Elsif); Set_Reserved (Name_End, Tok_End); Set_Reserved (Name_Entry, Tok_Entry); Set_Reserved (Name_Exception, Tok_Exception); Set_Reserved (Name_Exit, Tok_Exit); Set_Reserved (Name_For, Tok_For); Set_Reserved (Name_Function, Tok_Function); Set_Reserved (Name_Generic, Tok_Generic); Set_Reserved (Name_Goto, Tok_Goto); Set_Reserved (Name_If, Tok_If); Set_Reserved (Name_In, Tok_In); Set_Reserved (Name_Is, Tok_Is); Set_Reserved (Name_Limited, Tok_Limited); Set_Reserved (Name_Loop, Tok_Loop); Set_Reserved (Name_Mod, Tok_Mod); Set_Reserved (Name_New, Tok_New); Set_Reserved (Name_Not, Tok_Not); Set_Reserved (Name_Null, Tok_Null); Set_Reserved (Name_Of, Tok_Of); Set_Reserved (Name_Or, Tok_Or); Set_Reserved (Name_Others, Tok_Others); Set_Reserved (Name_Out, Tok_Out); Set_Reserved (Name_Package, Tok_Package); Set_Reserved (Name_Pragma, Tok_Pragma); Set_Reserved (Name_Private, Tok_Private); Set_Reserved (Name_Procedure, Tok_Procedure); Set_Reserved (Name_Protected, Tok_Protected); Set_Reserved (Name_Raise, Tok_Raise); Set_Reserved (Name_Range, Tok_Range); Set_Reserved (Name_Record, Tok_Record); Set_Reserved (Name_Rem, Tok_Rem); Set_Reserved (Name_Renames, Tok_Renames); Set_Reserved (Name_Requeue, Tok_Requeue); Set_Reserved (Name_Return, Tok_Return); Set_Reserved (Name_Reverse, Tok_Reverse); Set_Reserved (Name_Select, Tok_Select); Set_Reserved (Name_Separate, Tok_Separate); Set_Reserved (Name_Subtype, Tok_Subtype); Set_Reserved (Name_Tagged, Tok_Tagged); Set_Reserved (Name_Task, Tok_Task); Set_Reserved (Name_Terminate, Tok_Terminate); Set_Reserved (Name_Then, Tok_Then); Set_Reserved (Name_Type, Tok_Type); Set_Reserved (Name_Until, Tok_Until); Set_Reserved (Name_Use, Tok_Use); Set_Reserved (Name_When, Tok_When); Set_Reserved (Name_While, Tok_While); Set_Reserved (Name_With, Tok_With); Set_Reserved (Name_Xor, Tok_Xor); -- Ada 2005 reserved words Set_Reserved (Name_Interface, Tok_Interface); Set_Reserved (Name_Overriding, Tok_Overriding); Set_Reserved (Name_Synchronized, Tok_Synchronized); end Initialize_Ada_Keywords; ------------------------ -- Restore_Scan_State -- ------------------------ procedure Restore_Scan_State (Saved_State : Saved_Scan_State) is begin Scan_Ptr := Saved_State.Save_Scan_Ptr; Token := Saved_State.Save_Token; Token_Ptr := Saved_State.Save_Token_Ptr; Current_Line_Start := Saved_State.Save_Current_Line_Start; Start_Column := Saved_State.Save_Start_Column; Checksum := Saved_State.Save_Checksum; First_Non_Blank_Location := Saved_State.Save_First_Non_Blank_Location; Token_Node := Saved_State.Save_Token_Node; Token_Name := Saved_State.Save_Token_Name; Prev_Token := Saved_State.Save_Prev_Token; Prev_Token_Ptr := Saved_State.Save_Prev_Token_Ptr; end Restore_Scan_State; --------------------- -- Save_Scan_State -- --------------------- procedure Save_Scan_State (Saved_State : out Saved_Scan_State) is begin Saved_State.Save_Scan_Ptr := Scan_Ptr; Saved_State.Save_Token := Token; Saved_State.Save_Token_Ptr := Token_Ptr; Saved_State.Save_Current_Line_Start := Current_Line_Start; Saved_State.Save_Start_Column := Start_Column; Saved_State.Save_Checksum := Checksum; Saved_State.Save_First_Non_Blank_Location := First_Non_Blank_Location; Saved_State.Save_Token_Node := Token_Node; Saved_State.Save_Token_Name := Token_Name; Saved_State.Save_Prev_Token := Prev_Token; Saved_State.Save_Prev_Token_Ptr := Prev_Token_Ptr; end Save_Scan_State; end Scans;
Src/Ant8/Tests/Ant8/basic/01_lc_r0.asm
geoffthorpe/ant-architecture
0
87811
<gh_stars>0 # $Id: 01_lc_r0.asm,v 1.2 2001/03/22 00:39:02 ellard Exp $ # # Copyright 1999-2000 by the President and Fellows of Harvard College. # See LICENSE.txt for license information. # #@ tests lc for r0 # OK lc r0, 1 hlt
mat/src/mat-interrupts.adb
stcarrez/mat
7
3060
----------------------------------------------------------------------- -- mat-interrupts - SIGINT management to stop long running commands -- Copyright (C) 2015 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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. ----------------------------------------------------------------------- with Ada.Interrupts; with Ada.Interrupts.Names; with Util.Log.Loggers; package body MAT.Interrupts is pragma Interrupt_State (Name => Ada.Interrupts.Names.SIGINT, State => USER); -- The logger Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("MAT.Interrupts"); protected Interrupts is procedure Interrupt; pragma Interrupt_Handler (Interrupt); function Is_Interrupted return Boolean; procedure Clear; private Interrupted : Boolean; end Interrupts; protected body Interrupts is function Is_Interrupted return Boolean is begin return Interrupted; end Is_Interrupted; procedure Clear is begin Interrupted := False; end Clear; procedure Interrupt is begin Interrupted := True; Log.Info ("SIGINT signal received"); end Interrupt; end Interrupts; -- ------------------------------ -- Install the SIGINT handler. -- ------------------------------ procedure Install is begin Ada.Interrupts.Attach_Handler (Interrupts.Interrupt'Access, Ada.Interrupts.Names.SIGINT); Log.Info ("Interrupt handler for SIGINT is installed"); end Install; -- ------------------------------ -- Reset the interrupted flag. -- ------------------------------ procedure Clear is begin Interrupts.Clear; end Clear; -- ------------------------------ -- Check if we have been interrupted. -- ------------------------------ function Is_Interrupted return Boolean is begin return Interrupts.Is_Interrupted; end Is_Interrupted; end MAT.Interrupts;
llvm-gcc-4.2-2.9/gcc/ada/a-numaux-libc-x86.ads
vidkidz/crossbridge
1
8455
<gh_stars>1-10 ------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . N U M E R I C S . A U X -- -- -- -- S p e c -- -- (C Library Version for x86) -- -- -- -- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package provides the basic computational interface for the generic -- elementary functions. The C library version interfaces with the routines -- in the C mathematical library, and is thus quite portable, although it may -- not necessarily meet the requirements for accuracy in the numerics annex. -- One advantage of using this package is that it will interface directly to -- hardware instructions, such as the those provided on the Intel x86. -- Note: there are two versions of this package. One using the 80-bit x86 -- long double format (which is this version), and one using 64-bit IEEE -- double (see file a-numaux.ads). package Ada.Numerics.Aux is pragma Pure; pragma Linker_Options ("-lm"); type Double is digits 18; -- We import these functions directly from C. Note that we label them -- all as pure functions, because indeed all of them are in fact pure! function Sin (X : Double) return Double; pragma Import (C, Sin, "sinl"); pragma Pure_Function (Sin); function Cos (X : Double) return Double; pragma Import (C, Cos, "cosl"); pragma Pure_Function (Cos); function Tan (X : Double) return Double; pragma Import (C, Tan, "tanl"); pragma Pure_Function (Tan); function Exp (X : Double) return Double; pragma Import (C, Exp, "expl"); pragma Pure_Function (Exp); function Sqrt (X : Double) return Double; pragma Import (C, Sqrt, "sqrtl"); pragma Pure_Function (Sqrt); function Log (X : Double) return Double; pragma Import (C, Log, "logl"); pragma Pure_Function (Log); function Acos (X : Double) return Double; pragma Import (C, Acos, "acosl"); pragma Pure_Function (Acos); function Asin (X : Double) return Double; pragma Import (C, Asin, "asinl"); pragma Pure_Function (Asin); function Atan (X : Double) return Double; pragma Import (C, Atan, "atanl"); pragma Pure_Function (Atan); function Sinh (X : Double) return Double; pragma Import (C, Sinh, "sinhl"); pragma Pure_Function (Sinh); function Cosh (X : Double) return Double; pragma Import (C, Cosh, "coshl"); pragma Pure_Function (Cosh); function Tanh (X : Double) return Double; pragma Import (C, Tanh, "tanhl"); pragma Pure_Function (Tanh); function Pow (X, Y : Double) return Double; pragma Import (C, Pow, "powl"); pragma Pure_Function (Pow); end Ada.Numerics.Aux;
tools/cracktro_v1_logo_converter.asm
alexanderbazhenoff/zx-spectrum-various
0
3753
ORG #6000 LD HL,30000 LD DE,#4000 LD BC,#1B00 LDIR LD HL,#4008 LD B,8 LD DE,40000 FUCK PUSH BC PUSH HL PUSH HL LD BC,#C001 CALL SCR POP HL PUSH DE LD DE,8 ADD HL,DE POP DE PUSH HL LD BC,#C001 CALL SCR POP HL PUSH DE LD DE,8 ADD HL,DE POP DE LD BC,#6801 CALL SCR POP HL INC HL POP BC DJNZ FUCK LD HL,#5808 LD BC,#1808 CALL ATTR LD HL,#5810 LD BC,#1808 CALL ATTR LD HL,#5818 LD BC,#0D08 CALL ATTR RET SCR LOOP PUSH BC PUSH HL LOOP1 LD A,(HL) LD (HL),#FF LD (DE),A INC DE INC H LD A,H AND 7 JR NZ,AROUND LD A,L ADD A,#20 LD L,A JR C,AROUND LD A,H SUB 8 LD H,A AROUND DJNZ LOOP1 HALT POP HL INC HL POP BC DEC C JR NZ,LOOP RET ATTR PUSH BC LD (REG_HL+1),HL LD B,0 LDIR PUSH HL REG_HL LD HL,0 LD A,1+4+16+64+128 LD (HL),A POP HL PUSH DE LD DE,#18 ADD HL,DE HALT HALT HALT HALT HALT POP DE POP BC DJNZ ATTR RET
scripts/.volume.applescript
looking-for-a-job/mac-volume
1
2176
#!/usr/bin/osascript on run argv if count of argv is 1 then set volume output volume (item 1 of argv) return else output volume of (get volume settings) end if end run
programs/oeis/086/A086746.asm
neoneye/loda
22
7059
; A086746: Multiples of 3018. ; 3018,6036,9054,12072,15090,18108,21126,24144,27162,30180,33198,36216,39234,42252,45270,48288,51306,54324,57342,60360,63378,66396,69414,72432,75450,78468,81486,84504,87522,90540,93558,96576,99594,102612 mul $0,3018 add $0,3018
arch/ARM/STM32/svd/stm32l151/stm32_svd-fsmc.ads
morbos/Ada_Drivers_Library
2
16754
<reponame>morbos/Ada_Drivers_Library -- This spec has been automatically generated from STM32L151.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package STM32_SVD.FSMC is pragma Preelaborate; --------------- -- Registers -- --------------- subtype BCR_MTYP_Field is HAL.UInt2; subtype BCR_MWID_Field is HAL.UInt2; -- BCR1 type BCR_Register is record -- MBKEN MBKEN : Boolean := False; -- MUXEN MUXEN : Boolean := False; -- MTYP MTYP : BCR_MTYP_Field := 16#0#; -- MWID MWID : BCR_MWID_Field := 16#0#; -- FACCEN FACCEN : Boolean := False; -- unspecified Reserved_7_7 : HAL.Bit := 16#0#; -- BURSTEN BURSTEN : Boolean := False; -- WAITPOL WAITPOL : Boolean := False; -- WRAPMOD WRAPMOD : Boolean := False; -- WAITCFG WAITCFG : Boolean := False; -- WREN WREN : Boolean := False; -- WAITEN WAITEN : Boolean := False; -- EXTMOD EXTMOD : Boolean := False; -- ASYNCWAIT ASYNCWAIT : Boolean := False; -- unspecified Reserved_16_18 : HAL.UInt3 := 16#0#; -- CBURSTRW CBURSTRW : Boolean := False; -- unspecified Reserved_20_31 : HAL.UInt12 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for BCR_Register use record MBKEN at 0 range 0 .. 0; MUXEN at 0 range 1 .. 1; MTYP at 0 range 2 .. 3; MWID at 0 range 4 .. 5; FACCEN at 0 range 6 .. 6; Reserved_7_7 at 0 range 7 .. 7; BURSTEN at 0 range 8 .. 8; WAITPOL at 0 range 9 .. 9; WRAPMOD at 0 range 10 .. 10; WAITCFG at 0 range 11 .. 11; WREN at 0 range 12 .. 12; WAITEN at 0 range 13 .. 13; EXTMOD at 0 range 14 .. 14; ASYNCWAIT at 0 range 15 .. 15; Reserved_16_18 at 0 range 16 .. 18; CBURSTRW at 0 range 19 .. 19; Reserved_20_31 at 0 range 20 .. 31; end record; subtype BTR_ADDSET_Field is HAL.UInt4; subtype BTR_ADDHLD_Field is HAL.UInt4; subtype BTR_DATAST_Field is HAL.UInt8; subtype BTR_BUSTURN_Field is HAL.UInt4; subtype BTR_CLKDIV_Field is HAL.UInt4; subtype BTR_DATLAT_Field is HAL.UInt4; subtype BTR_ACCMOD_Field is HAL.UInt2; -- BTR1 type BTR_Register is record -- ADDSET ADDSET : BTR_ADDSET_Field := 16#0#; -- ADDHLD ADDHLD : BTR_ADDHLD_Field := 16#0#; -- DATAST DATAST : BTR_DATAST_Field := 16#0#; -- BUSTURN BUSTURN : BTR_BUSTURN_Field := 16#0#; -- CLKDIV CLKDIV : BTR_CLKDIV_Field := 16#0#; -- DATLAT DATLAT : BTR_DATLAT_Field := 16#0#; -- ACCMOD ACCMOD : BTR_ACCMOD_Field := 16#0#; -- unspecified Reserved_30_31 : HAL.UInt2 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for BTR_Register use record ADDSET at 0 range 0 .. 3; ADDHLD at 0 range 4 .. 7; DATAST at 0 range 8 .. 15; BUSTURN at 0 range 16 .. 19; CLKDIV at 0 range 20 .. 23; DATLAT at 0 range 24 .. 27; ACCMOD at 0 range 28 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; subtype BWTR_ADDSET_Field is HAL.UInt4; subtype BWTR_ADDHLD_Field is HAL.UInt4; subtype BWTR_DATAST_Field is HAL.UInt8; subtype BWTR_CLKDIV_Field is HAL.UInt4; subtype BWTR_DATLAT_Field is HAL.UInt4; subtype BWTR_ACCMOD_Field is HAL.UInt2; -- BWTR1 type BWTR_Register is record -- ADDSET ADDSET : BWTR_ADDSET_Field := 16#0#; -- ADDHLD ADDHLD : BWTR_ADDHLD_Field := 16#0#; -- DATAST DATAST : BWTR_DATAST_Field := 16#0#; -- unspecified Reserved_16_19 : HAL.UInt4 := 16#0#; -- CLKDIV CLKDIV : BWTR_CLKDIV_Field := 16#0#; -- DATLAT DATLAT : BWTR_DATLAT_Field := 16#0#; -- ACCMOD ACCMOD : BWTR_ACCMOD_Field := 16#0#; -- unspecified Reserved_30_31 : HAL.UInt2 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for BWTR_Register use record ADDSET at 0 range 0 .. 3; ADDHLD at 0 range 4 .. 7; DATAST at 0 range 8 .. 15; Reserved_16_19 at 0 range 16 .. 19; CLKDIV at 0 range 20 .. 23; DATLAT at 0 range 24 .. 27; ACCMOD at 0 range 28 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Flexible static memory controller type FSMC_Peripheral is record -- BCR1 BCR1 : aliased BCR_Register; -- BTR1 BTR1 : aliased BTR_Register; -- BCR2 BCR2 : aliased BCR_Register; -- BTR2 BTR2 : aliased BTR_Register; -- BCR3 BCR3 : aliased BCR_Register; -- BTR3 BTR3 : aliased BTR_Register; -- BCR4 BCR4 : aliased BCR_Register; -- BTR4 BTR4 : aliased BTR_Register; -- BWTR1 BWTR1 : aliased BWTR_Register; -- BWTR2 BWTR2 : aliased BWTR_Register; -- BWTR3 BWTR3 : aliased BWTR_Register; -- BWTR4 BWTR4 : aliased BWTR_Register; end record with Volatile; for FSMC_Peripheral use record BCR1 at 16#0# range 0 .. 31; BTR1 at 16#4# range 0 .. 31; BCR2 at 16#8# range 0 .. 31; BTR2 at 16#C# range 0 .. 31; BCR3 at 16#10# range 0 .. 31; BTR3 at 16#14# range 0 .. 31; BCR4 at 16#18# range 0 .. 31; BTR4 at 16#1C# range 0 .. 31; BWTR1 at 16#104# range 0 .. 31; BWTR2 at 16#10C# range 0 .. 31; BWTR3 at 16#114# range 0 .. 31; BWTR4 at 16#11C# range 0 .. 31; end record; -- Flexible static memory controller FSMC_Periph : aliased FSMC_Peripheral with Import, Address => System'To_Address (16#A0000000#); end STM32_SVD.FSMC;
onnxruntime/core/mlas/lib/amd64/SgemmKernelM1Avx.asm
dennyac/onnxruntime
6,036
86801
<reponame>dennyac/onnxruntime ;++ ; ; Copyright (c) Microsoft Corporation. All rights reserved. ; ; Licensed under the MIT License. ; ; Module Name: ; ; SgemmKernelM1Avx.asm ; ; Abstract: ; ; This module implements the kernels for the single precision matrix/matrix ; multiply operation (SGEMM). This handles the special case of M=1. ; ; This implementation uses AVX instructions. ; ;-- .xlist INCLUDE mlasi.inc .list EXTERN MlasMaskMoveAvx:NEAR ; ; Stack frame layout for the SGEMM M=1 kernels. ; SgemmKernelM1Frame STRUCT SavedXmm6 OWORD ? SavedXmm7 OWORD ? SavedXmm8 OWORD ? SavedRsi QWORD ? SavedRbx QWORD ? SavedRbp QWORD ? ReturnAddress QWORD ? PreviousP1Home QWORD ? PreviousP2Home QWORD ? PreviousP3Home QWORD ? PreviousP4Home QWORD ? CountN QWORD ? ldb QWORD ? Beta QWORD ? SgemmKernelM1Frame ENDS ;++ ; ; Routine Description: ; ; This routine is an inner kernel to compute matrix multiplication for a ; set of rows. This handles the special case of M=1. ; ; The elements in matrix B are not transposed. ; ; Arguments: ; ; A (rcx) - Supplies the address of matrix A. ; ; B (rdx) - Supplies the address of matrix B. ; ; C (r8) - Supplies the address of matrix C. ; ; CountK (r9) - Supplies the number of columns from matrix A and the number ; of rows from matrix B to iterate over. ; ; CountN - Supplies the number of columns from matrix B and matrix C to iterate ; over. ; ; ldb - Supplies the first dimension of matrix B. ; ; Beta - Supplies the scalar beta multiplier (see SGEMM definition). ; ; Return Value: ; ; None. ; ;-- NESTED_ENTRY MlasSgemmKernelM1Avx, _TEXT rex_push_reg rbp push_reg rbx push_reg rsi alloc_stack (SgemmKernelM1Frame.SavedRsi) save_xmm128 xmm6,SgemmKernelM1Frame.SavedXmm6 save_xmm128 xmm7,SgemmKernelM1Frame.SavedXmm7 save_xmm128 xmm8,SgemmKernelM1Frame.SavedXmm8 END_PROLOGUE mov rbx,SgemmKernelM1Frame.ldb[rsp] shl rbx,2 ; convert ldb to bytes mov r10,r8 mov r11,rdx mov rbp,SgemmKernelM1Frame.CountN[rsp] ; ; Compute the initial results mask for zeroing or accumulate mode. ; vxorps xmm0,xmm0,xmm0 vcmpeqss xmm0,xmm0,DWORD PTR SgemmKernelM1Frame.Beta[rsp] vshufps xmm0,xmm0,xmm0,0 vinsertf128 ymm0,ymm0,xmm0,1 ; ; Compute the conditional load/store mask for an unaligned CountN. ; mov eax,ebp and eax,7 vmovd xmm7,eax vshufps xmm7,xmm7,xmm7,0 vpcmpgtd xmm6,xmm7,XMMWORD PTR [MlasMaskMoveAvx+16] vpcmpgtd xmm7,xmm7,XMMWORD PTR [MlasMaskMoveAvx] vinsertf128 ymm7,ymm7,xmm6,1 ; ; Process 4 rows of the matrices in a loop. ; sub r9,4 jb ProcessRemainingCountK ProcessRowLoop4: vbroadcastss ymm2,DWORD PTR [rcx] mov rax,rbp ; reload CountN vbroadcastss ymm3,DWORD PTR [rcx+4] mov rdx,r11 ; reload matrix B vbroadcastss ymm4,DWORD PTR [rcx+8] mov r8,r10 ; reload matrix C vbroadcastss ymm5,DWORD PTR [rcx+12] add rcx,4*4 ; advance matrix A by 4 columns lea r11,[rdx+rbx*4] ; advance matrix B by 4 rows sub rax,16 jb ProcessRemainingCountN4 ProcessColumnLoop4: lea rsi,[rdx+rbx*2] ; compute matrix B plus 2 rows vmulps ymm1,ymm2,YMMWORD PTR [rdx] vmulps ymm6,ymm2,YMMWORD PTR [rdx+32] vmulps ymm8,ymm3,YMMWORD PTR [rdx+rbx] vaddps ymm1,ymm1,ymm8 vmulps ymm8,ymm3,YMMWORD PTR [rdx+rbx+32] vaddps ymm6,ymm6,ymm8 vmulps ymm8,ymm4,YMMWORD PTR [rsi] vaddps ymm1,ymm1,ymm8 vmulps ymm8,ymm4,YMMWORD PTR [rsi+32] vaddps ymm6,ymm6,ymm8 vmulps ymm8,ymm5,YMMWORD PTR [rsi+rbx] vaddps ymm1,ymm1,ymm8 vmulps ymm8,ymm5,YMMWORD PTR [rsi+rbx+32] vaddps ymm6,ymm6,ymm8 vandnps ymm8,ymm0,YMMWORD PTR [r8] vaddps ymm1,ymm1,ymm8 vandnps ymm8,ymm0,YMMWORD PTR [r8+32] vaddps ymm6,ymm6,ymm8 vmovups YMMWORD PTR [r8],ymm1 vmovups YMMWORD PTR [r8+32],ymm6 add rdx,16*4 ; advance matrix B by 16 columns add r8,16*4 ; advance matrix C by 16 columns sub rax,16 jae ProcessColumnLoop4 ProcessRemainingCountN4: test al,15 ; test for unaligned columns jz ProcessedRemainingCountN4 test al,8 ; CountN >= 8? jz ProcessRemainingCountNSmall4 lea rsi,[rdx+rbx*2] ; compute matrix B plus 2 rows vmulps ymm1,ymm2,YMMWORD PTR [rdx] vmulps ymm8,ymm3,YMMWORD PTR [rdx+rbx] vaddps ymm1,ymm1,ymm8 vmulps ymm8,ymm4,YMMWORD PTR [rsi] vaddps ymm1,ymm1,ymm8 vmulps ymm8,ymm5,YMMWORD PTR [rsi+rbx] vaddps ymm1,ymm1,ymm8 vandnps ymm8,ymm0,YMMWORD PTR [r8] vaddps ymm1,ymm1,ymm8 vmovups YMMWORD PTR [r8],ymm1 add rdx,8*4 ; advance matrix B by 8 columns add r8,8*4 ; advance matrix C by 8 columns test al,7 jz ProcessedRemainingCountN4 ProcessRemainingCountNSmall4: lea rsi,[rdx+rbx*2] ; compute matrix B plus 2 rows vmaskmovps ymm6,ymm7,YMMWORD PTR [rdx] vmulps ymm1,ymm2,ymm6 vmaskmovps ymm6,ymm7,YMMWORD PTR [rdx+rbx] vmulps ymm8,ymm3,ymm6 vaddps ymm1,ymm1,ymm8 vmaskmovps ymm6,ymm7,YMMWORD PTR [rsi] vmulps ymm8,ymm4,ymm6 vaddps ymm1,ymm1,ymm8 vmaskmovps ymm6,ymm7,YMMWORD PTR [rsi+rbx] vmulps ymm8,ymm5,ymm6 vaddps ymm1,ymm1,ymm8 vmaskmovps ymm6,ymm7,YMMWORD PTR [r8] vandnps ymm6,ymm0,ymm6 vaddps ymm1,ymm1,ymm6 vmaskmovps YMMWORD PTR [r8],ymm7,ymm1 ProcessedRemainingCountN4: vxorps xmm0,xmm0,xmm0 ; switch to accumulate mode sub r9,4 jae ProcessRowLoop4 ProcessRemainingCountK: test r9d,2 jnz ProcessRowLoop2 test r9d,1 jnz ProcessRowLoop1 ExitKernel: vzeroupper movaps xmm6,SgemmKernelM1Frame.SavedXmm6[rsp] movaps xmm7,SgemmKernelM1Frame.SavedXmm7[rsp] movaps xmm8,SgemmKernelM1Frame.SavedXmm8[rsp] add rsp,(SgemmKernelM1Frame.SavedRsi) BEGIN_EPILOGUE pop rsi pop rbx pop rbp ret ; ; Process 2 rows of the matrices. ; ProcessRowLoop2: vbroadcastss ymm2,DWORD PTR [rcx] mov rax,rbp ; reload CountN vbroadcastss ymm3,DWORD PTR [rcx+4] mov rdx,r11 ; reload matrix B mov r8,r10 ; reload matrix C add rcx,2*4 ; advance matrix A by 2 columns lea r11,[rdx+rbx*2] ; advance matrix B by 2 rows sub rax,8 jb ProcessRemainingCountN2 ProcessColumnLoop2: vmulps ymm1,ymm2,YMMWORD PTR [rdx] vmulps ymm8,ymm3,YMMWORD PTR [rdx+rbx] vaddps ymm1,ymm1,ymm8 vandnps ymm6,ymm0,YMMWORD PTR [r8] vaddps ymm1,ymm1,ymm6 vmovups YMMWORD PTR [r8],ymm1 add rdx,8*4 ; advance matrix B by 8 columns add r8,8*4 ; advance matrix C by 8 columns sub rax,8 jae ProcessColumnLoop2 ProcessRemainingCountN2: test al,7 ; test for unaligned columns jz ProcessedRemainingCountN2 vmaskmovps ymm6,ymm7,YMMWORD PTR [rdx] vmulps ymm1,ymm2,ymm6 vmaskmovps ymm6,ymm7,YMMWORD PTR [rdx+rbx] vmulps ymm8,ymm3,ymm6 vaddps ymm1,ymm1,ymm8 vmaskmovps ymm6,ymm7,YMMWORD PTR [r8] vandnps ymm6,ymm0,ymm6 vaddps ymm1,ymm1,ymm6 vmaskmovps YMMWORD PTR [r8],ymm7,ymm1 ProcessedRemainingCountN2: test r9d,1 jz ExitKernel vxorps xmm0,xmm0,xmm0 ; switch to accumulate mode ; ; Process 1 row of the matrices. ; ProcessRowLoop1: vbroadcastss ymm2,DWORD PTR [rcx] mov rax,rbp ; reload CountN mov rdx,r11 ; reload matrix B mov r8,r10 ; reload matrix C sub rax,8 jb ProcessRemainingCountN1 ProcessColumnLoop1: vmulps ymm1,ymm2,YMMWORD PTR [rdx] vandnps ymm6,ymm0,YMMWORD PTR [r8] vaddps ymm1,ymm1,ymm6 vmovups YMMWORD PTR [r8],ymm1 add rdx,8*4 ; advance matrix B by 8 columns add r8,8*4 ; advance matrix C by 8 columns sub rax,8 jae ProcessColumnLoop1 ProcessRemainingCountN1: test al,7 ; test for unaligned columns jz ExitKernel vmaskmovps ymm6,ymm7,YMMWORD PTR [rdx] vmulps ymm1,ymm2,ymm6 vmaskmovps ymm6,ymm7,YMMWORD PTR [r8] vandnps ymm6,ymm0,ymm6 vaddps ymm1,ymm1,ymm6 vmaskmovps YMMWORD PTR [r8],ymm7,ymm1 jmp ExitKernel NESTED_END MlasSgemmKernelM1Avx, _TEXT ;++ ; ; Routine Description: ; ; This routine is an inner kernel to compute matrix multiplication for a ; set of rows. This handles the special case of M=1. ; ; The elements in matrix B are transposed. ; ; Arguments: ; ; A (rcx) - Supplies the address of matrix A. ; ; B (rdx) - Supplies the address of matrix B. The elements are transposed. ; ; C (r8) - Supplies the address of matrix C. ; ; CountK (r9) - Supplies the number of columns from matrix A and the number ; of columns from matrix B to iterate over. ; ; CountN - Supplies the number of rows from matrix B and the number of columns ; from matrix C to iterate over. ; ; ldb - Supplies the first dimension of matrix B. ; ; Beta - Supplies the scalar beta multiplier (see SGEMM definition). ; ; Return Value: ; ; None. ; ;-- NESTED_ENTRY MlasSgemmKernelM1TransposeBAvx, _TEXT rex_push_reg rbp push_reg rbx push_reg rsi alloc_stack (SgemmKernelM1Frame.SavedRsi) save_xmm128 xmm6,SgemmKernelM1Frame.SavedXmm6 save_xmm128 xmm7,SgemmKernelM1Frame.SavedXmm7 END_PROLOGUE mov rbx,SgemmKernelM1Frame.ldb[rsp] shl rbx,2 ; convert ldb to bytes mov r10,rcx mov r11,rdx mov rbp,SgemmKernelM1Frame.CountN[rsp] ; ; Compute the results mask for zeroing or accumulate mode. ; vxorps xmm0,xmm0,xmm0 vcmpeqss xmm0,xmm0,DWORD PTR SgemmKernelM1Frame.Beta[rsp] vshufps xmm0,xmm0,xmm0,0 ; ; Compute the conditional load/store mask for an unaligned CountK. ; mov eax,r9d and eax,7 vmovd xmm7,eax vshufps xmm7,xmm7,xmm7,0 vpcmpgtd xmm6,xmm7,XMMWORD PTR [MlasMaskMoveAvx+16] vpcmpgtd xmm7,xmm7,XMMWORD PTR [MlasMaskMoveAvx] vinsertf128 ymm7,ymm7,xmm6,1 ; ; Process 4 rows of the matrices in a loop. ; sub rbp,4 jb ProcessRemainingCountN ProcessRowLoop4: vxorps xmm2,xmm2,xmm2 ; clear row accumulators vxorps xmm3,xmm3,xmm3 vxorps xmm4,xmm4,xmm4 vxorps xmm5,xmm5,xmm5 mov rcx,r10 ; reload matrix A mov rdx,r11 ; reload matrix B mov rax,r9 ; reload CountK lea r11,[rdx+rbx*4] ; advance matrix B by 4 rows sub rax,8 jb ProcessRemainingCountK4 ProcessColumnLoop4: lea rsi,[rdx+rbx*2] ; compute matrix B plus 2 rows vmovups ymm1,YMMWORD PTR [rcx] vmulps ymm6,ymm1,YMMWORD PTR [rdx] vaddps ymm2,ymm2,ymm6 vmulps ymm6,ymm1,YMMWORD PTR [rdx+rbx] vaddps ymm3,ymm3,ymm6 vmulps ymm6,ymm1,YMMWORD PTR [rsi] vaddps ymm4,ymm4,ymm6 vmulps ymm6,ymm1,YMMWORD PTR [rsi+rbx] vaddps ymm5,ymm5,ymm6 add rcx,8*4 ; advance matrix A by 8 columns add rdx,8*4 ; advance matrix B by 8 columns sub rax,8 jae ProcessColumnLoop4 ProcessRemainingCountK4: test al,7 ; test for unaligned columns jz Output4x1Block lea rsi,[rdx+rbx*2] ; compute matrix B plus 2 rows vmaskmovps ymm1,ymm7,YMMWORD PTR [rcx] vmaskmovps ymm6,ymm7,YMMWORD PTR [rdx] vmulps ymm6,ymm1,ymm6 vaddps ymm2,ymm2,ymm6 vmaskmovps ymm6,ymm7,YMMWORD PTR [rdx+rbx] vmulps ymm6,ymm1,ymm6 vaddps ymm3,ymm3,ymm6 vmaskmovps ymm6,ymm7,YMMWORD PTR [rsi] vmulps ymm6,ymm1,ymm6 vaddps ymm4,ymm4,ymm6 vmaskmovps ymm6,ymm7,YMMWORD PTR [rsi+rbx] vmulps ymm6,ymm1,ymm6 vaddps ymm5,ymm5,ymm6 ; ; Reduce and output the row accumulators. ; Output4x1Block: vunpcklps ymm6,ymm2,ymm3 ; transpose row accumulators vunpckhps ymm1,ymm2,ymm3 vunpcklps ymm2,ymm4,ymm5 vunpckhps ymm3,ymm4,ymm5 vunpcklpd ymm4,ymm6,ymm2 vunpckhpd ymm5,ymm6,ymm2 vaddps ymm4,ymm4,ymm5 vunpcklpd ymm6,ymm1,ymm3 vunpckhpd ymm2,ymm1,ymm3 vaddps ymm4,ymm4,ymm6 vaddps ymm4,ymm4,ymm2 vextractf128 xmm5,ymm4,1 vaddps xmm4,xmm4,xmm5 vandnps xmm6,xmm0,XMMWORD PTR [r8] vaddps xmm4,xmm4,xmm6 vmovups XMMWORD PTR [r8],xmm4 add r8,4*4 ; advance matrix C by 4 columns sub rbp,4 jae ProcessRowLoop4 ProcessRemainingCountN: test ebp,2 jnz ProcessRowLoop2 test ebp,1 jnz ProcessRowLoop1 ExitKernel: vzeroupper movaps xmm6,SgemmKernelM1Frame.SavedXmm6[rsp] movaps xmm7,SgemmKernelM1Frame.SavedXmm7[rsp] add rsp,(SgemmKernelM1Frame.SavedRsi) BEGIN_EPILOGUE pop rsi pop rbx pop rbp ret ; ; Process 2 rows of the matrices. ; ProcessRowLoop2: vxorps xmm2,xmm2,xmm2 ; clear row accumulators vxorps xmm3,xmm3,xmm3 mov rcx,r10 ; reload matrix A mov rdx,r11 ; reload matrix B mov rax,r9 ; reload CountK lea r11,[rdx+rbx*2] ; advance matrix B by 2 rows sub rax,8 jb ProcessRemainingCountK2 ProcessColumnLoop2: vmovups ymm1,YMMWORD PTR [rcx] vmulps ymm6,ymm1,YMMWORD PTR [rdx] vaddps ymm2,ymm2,ymm6 vmulps ymm6,ymm1,YMMWORD PTR [rdx+rbx] vaddps ymm3,ymm3,ymm6 add rcx,8*4 ; advance matrix A by 8 columns add rdx,8*4 ; advance matrix B by 8 columns sub rax,8 jae ProcessColumnLoop2 ProcessRemainingCountK2: test al,7 ; test for unaligned columns jz Output2x1Block vmaskmovps ymm1,ymm7,YMMWORD PTR [rcx] vmaskmovps ymm6,ymm7,YMMWORD PTR [rdx] vmulps ymm6,ymm1,ymm6 vaddps ymm2,ymm2,ymm6 vmaskmovps ymm6,ymm7,YMMWORD PTR [rdx+rbx] vmulps ymm6,ymm1,ymm6 vaddps ymm3,ymm3,ymm6 ; ; Reduce and output the row accumulators. ; Output2x1Block: vunpcklps ymm4,ymm2,ymm3 ; reduce row accumulators vunpckhps ymm2,ymm2,ymm3 vaddps ymm2,ymm2,ymm4 vextractf128 xmm4,ymm2,1 vaddps xmm2,xmm2,xmm4 vmovhlps xmm4,xmm2,xmm2 vaddps xmm2,xmm2,xmm4 vmovsd xmm3,QWORD PTR [r8] vandnps xmm3,xmm0,xmm3 vaddps xmm2,xmm2,xmm3 vmovsd QWORD PTR [r8],xmm2 add r8,2*4 ; advance matrix C by 2 columns test ebp,1 jz ExitKernel ; ; Process 1 row of the matrices. ; ProcessRowLoop1: vxorps xmm2,xmm2,xmm2 ; clear row accumulators mov rcx,r10 ; reload matrix A mov rdx,r11 ; reload matrix B mov rax,r9 ; reload CountK sub rax,8 jb ProcessRemainingCountK1 ProcessColumnLoop1: vmovups ymm1,YMMWORD PTR [rcx] vmulps ymm6,ymm1,YMMWORD PTR [rdx] vaddps ymm2,ymm2,ymm6 add rcx,8*4 ; advance matrix A by 8 columns add rdx,8*4 ; advance matrix B by 8 columns sub rax,8 jae ProcessColumnLoop1 ProcessRemainingCountK1: test al,7 ; test for unaligned columns jz Output1x1Block vmaskmovps ymm1,ymm7,YMMWORD PTR [rcx] vmaskmovps ymm6,ymm7,YMMWORD PTR [rdx] vmulps ymm6,ymm1,ymm6 vaddps ymm2,ymm2,ymm6 ; ; Reduce and output the row accumulators. ; Output1x1Block: vhaddps ymm2,ymm2,ymm2 ; reduce row accumulators vhaddps ymm2,ymm2,ymm2 vextractf128 xmm4,ymm2,1 vaddss xmm2,xmm2,xmm4 vmovss xmm3,DWORD PTR [r8] vandnps xmm3,xmm0,xmm3 vaddss xmm2,xmm2,xmm3 vmovss DWORD PTR [r8],xmm2 jmp ExitKernel NESTED_END MlasSgemmKernelM1TransposeBAvx, _TEXT END
theorems/cw/cohomology/ReconstructedCochainsIsoCellularCochains.agda
mikeshulman/HoTT-Agda
0
10953
<reponame>mikeshulman/HoTT-Agda<gh_stars>0 {-# OPTIONS --without-K --rewriting #-} open import HoTT open import cw.CW open import homotopy.DisjointlyPointedSet open import cohomology.Theory open import cohomology.ChainComplex module cw.cohomology.ReconstructedCochainsIsoCellularCochains {i : ULevel} (OT : OrdinaryTheory i) where open OrdinaryTheory OT open import cw.cohomology.CellularChainComplex as CCC open import cw.cohomology.ReconstructedCochainComplex OT as RCC open import cw.cohomology.TipAndAugment OT open import cw.cohomology.WedgeOfCells OT private rcc-iso-ccc-nth : ∀ {n} (⊙skel : ⊙Skeleton n) {m} (m≤n : m ≤ n) → ⊙has-cells-with-choice 0 ⊙skel i → AbGroup.grp (RCC.cochain-template ⊙skel (inl m≤n)) ≃ᴳ hom-group (AbGroup.grp (CCC.chain-template (⊙Skeleton.skel ⊙skel) (inl m≤n))) (C2-abgroup 0) rcc-iso-ccc-nth ⊙skel {m = O} (inl idp) ac = FreeAbGroup-extend-iso (C2-abgroup 0) ∘eᴳ Πᴳ-emap-l (λ _ → C2 0) (separable-unite-equiv (⊙Skeleton.pt-dec ⊙skel)) ∘eᴳ Πᴳ₁-⊔-iso-×ᴳ {A = Unit} {B = MinusPoint (⊙cw-head ⊙skel)} (λ _ → C2 0) ⁻¹ᴳ ∘eᴳ ×ᴳ-emap (Πᴳ₁-Unit ⁻¹ᴳ) (CX₀-β ⊙skel 0 ac) rcc-iso-ccc-nth ⊙skel {m = S m} (inl idp) ac = FreeAbGroup-extend-iso (C2-abgroup 0) ∘eᴳ CXₙ/Xₙ₋₁-β-diag ⊙skel ac rcc-iso-ccc-nth ⊙skel {m = O} (inr ltS) ac = rcc-iso-ccc-nth (⊙cw-init ⊙skel) (inl idp) (⊙init-has-cells-with-choice ⊙skel ac) rcc-iso-ccc-nth ⊙skel {m = S m} (inr ltS) ac = rcc-iso-ccc-nth (⊙cw-init ⊙skel) (inl idp) (⊙init-has-cells-with-choice ⊙skel ac) rcc-iso-ccc-nth ⊙skel {m = O} (inr (ltSR lt)) ac = rcc-iso-ccc-nth (⊙cw-init ⊙skel) (inr lt) (⊙init-has-cells-with-choice ⊙skel ac) rcc-iso-ccc-nth ⊙skel {m = S m} (inr (ltSR lt)) ac = rcc-iso-ccc-nth (⊙cw-init ⊙skel) (inr lt) (⊙init-has-cells-with-choice ⊙skel ac) rcc-iso-ccc-above : ∀ {n} (⊙skel : ⊙Skeleton n) {m} (m≰n : ¬ (m ≤ n)) → AbGroup.grp (RCC.cochain-template ⊙skel (inr m≰n)) ≃ᴳ hom-group (AbGroup.grp (CCC.chain-template (⊙Skeleton.skel ⊙skel) (inr m≰n))) (C2-abgroup 0) rcc-iso-ccc-above ⊙skel _ = pre∘ᴳ-iso (C2-abgroup 0) lower-iso ∘eᴳ trivial-iso-Unit (hom₁-Unit-is-trivial (C2-abgroup 0)) ⁻¹ᴳ ∘eᴳ lower-iso rcc-iso-ccc : ∀ {n} (⊙skel : ⊙Skeleton n) (m : ℕ) → ⊙has-cells-with-choice 0 ⊙skel i → AbGroup.grp (RCC.cochain-template ⊙skel (≤-dec m n)) ≃ᴳ hom-group (AbGroup.grp (CCC.chain-template (⊙Skeleton.skel ⊙skel) (≤-dec m n))) (C2-abgroup 0) rcc-iso-ccc {n} ⊙skel m ac with ≤-dec m n rcc-iso-ccc ⊙skel m ac | inl m≤n = rcc-iso-ccc-nth ⊙skel m≤n ac rcc-iso-ccc ⊙skel m ac | inr m≰n = rcc-iso-ccc-above ⊙skel m≰n rhead-iso-chead : C2 0 ≃ᴳ hom-group ℤ-group (C2-abgroup 0) rhead-iso-chead = pre∘ᴳ-iso (C2-abgroup 0) ℤ-iso-FreeAbGroup-Unit ∘eᴳ FreeAbGroup-extend-iso (C2-abgroup 0) ∘eᴳ Πᴳ₁-Unit ⁻¹ᴳ
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_1737.asm
ljhsiun2/medusa
9
91521
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r15 push %r8 push %r9 push %rbx push %rcx push %rdi push %rsi lea addresses_WT_ht+0x6c64, %r8 nop nop nop nop nop mfence mov (%r8), %r11d nop nop nop nop nop sub %r10, %r10 lea addresses_UC_ht+0xe934, %rcx nop nop nop nop dec %r15 mov (%rcx), %r9 nop and $1803, %rcx lea addresses_A_ht+0x3134, %r10 nop nop sub %r15, %r15 movb $0x61, (%r10) nop sub %rbx, %rbx lea addresses_D_ht+0x9fb4, %r11 cmp $21866, %r8 mov $0x6162636465666768, %r15 movq %r15, (%r11) cmp %rcx, %rcx lea addresses_WC_ht+0xbdf4, %r8 nop nop nop nop cmp $61146, %r11 movw $0x6162, (%r8) nop nop nop nop inc %r8 lea addresses_WC_ht+0x18934, %rsi lea addresses_A_ht+0xe90c, %rdi clflush (%rdi) nop nop nop add $40769, %r15 mov $24, %rcx rep movsq nop sub $12515, %rdi pop %rsi pop %rdi pop %rcx pop %rbx pop %r9 pop %r8 pop %r15 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r14 push %r15 push %r8 push %r9 push %rbx push %rdx // Load lea addresses_RW+0xea2b, %r15 nop nop nop nop inc %r14 mov (%r15), %r8 inc %rbx // Load lea addresses_normal+0xce00, %r8 sub $50291, %rdx mov (%r8), %r10w nop nop lfence // Faulty Load lea addresses_RW+0x11134, %r15 add $49064, %r10 movb (%r15), %bl lea oracles, %r9 and $0xff, %rbx shlq $12, %rbx mov (%r9,%rbx,1), %rbx pop %rdx pop %rbx pop %r9 pop %r8 pop %r15 pop %r14 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': True, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 2, 'size': 2, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 4, 'size': 4, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 10, 'size': 8, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 10, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 6, 'size': 8, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 5, 'size': 2, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}} {'32': 21829} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
linear_algebra/peters_eigen.ads
jscparker/math_packages
30
2295
---------------------------------------------------------------------- -- package Peters_Eigen, eigendecomposition -- Copyright (C) 2008-2018 <NAME>. -- -- Permission to use, copy, modify, and/or distribute this software for any -- purpose with or without fee is hereby granted, provided that the above -- copyright notice and this permission notice appear in all copies. -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --------------------------------------------------------------------------- -- PACKAGE Peters_Eigen -- -- Performs an eigen-decomposition on general square real matrices. All -- arithmetic is real. The set of (potentially) complex eigenvalues is -- returned as a pair of vectors W_r, W_i. (If the Matrix is symmetric, -- then the eigenvalues should be real valued.) -- -- Peters_Eigen is based on the original Eispack hqr2.f [1] routine with -- several changes. The Hessenberg reduction was replaced with one based -- on Givens rotations. The Eispack QR algorithm is retained with small -- changes (guards to prevent floating point problems that occur with near- -- zero numbers, and slightly modified inner loops to improve accuracy). -- -- Eigenvalue error can be estimated if you have a higher precision floating -- point available. Most Intel CPUs provide 18 digit floating point, so -- instantiate Peters_Eigen with -- -- "type Real is digits 18". -- -- 1. <NAME> Wilkinson, Num. Math. 16, 181-204 (1970) -- -- 2. <NAME>, "The QR Transformation, I", The Computer Journal, -- vol. 4, no. 3, pages 265-271 (1961) -- -- 3. <NAME>, "On some algorithms for the solution of the -- complete eigenvalue problem," USSR Computational Mathematics and -- Mathematical Physics, vol. 1, no. 3, pages 637657 generic type Real is digits <>; type Index is range <>; type Matrix is array (Index, Index) of Real; package Peters_Eigen is type Col_Vector is array(Index) of Real; type Balance_Code is (Disabled, Partial, Full); -- The default disables balancing. Balancing isn't recommended for general use. -- If balancing is enabled, then eigenvectors are not orthogonal in general. procedure Decompose (A : in out Matrix; Z_r, Z_i : out Matrix; W_r, W_i : out Col_Vector; Id_of_Failed_Eig : out Integer; Starting_Col : in Index := Index'First; Final_Col : in Index := Index'Last; Eigenvectors_Desired : in Boolean := True; Balance_Policy : in Balance_Code := Disabled); -- -- If you set "Eigenvectors_Desired := False" then only Eigenvalues are -- calculated. -- -- Decomposition is performed on arbitrary diagonal blocks of matrix A. -- -- A is destroyed (overwritten) by procedure Decompose. -- -- Upper left corner of the diagonal block is (r,c) = (Starting_Col,Starting_Col) -- Lower right corner of the diagonal block is (r,c) = (Final_Col, Final_Col) -- -- Convergence is judged to be OK in range: Id_of_Failed_Eig+1 .. Final_Col. -- -- If Eigenvectors_Desired = True, then -- -- Real parts of eigvecs are returned as columns of Z_r. -- Imaginary parts of eigvecs are returned as columns of Z_i. -- -- Eigenvectors are normalized. -- Computes right eigenvectors z: A*z = lambda*z -- -- If Eigenvectors_Desired = False, then -- -- Z_i is *not* initialized, (which frees up space if matrices are large). -- -- Balancing is disabled by default. -- -- The Q matrices won't be orthogonal if the matrix is balanced. -- Sometimes balancing improves eigenvalue accuracy, sometimes it -- degrades accuracy. procedure Sort_Eigs_And_Vecs (Z_r, Z_i : in out Matrix; -- eigvecs are columns of Z W_r, W_i : in out Col_Vector; Starting_Col : in Index := Index'First; Final_Col : in Index := Index'Last); -- -- Sorted according to size of: Sqrt (W_r**2 + W_i**2), largest first. -- -- Notice that the eigvectors (Z_r, Z_i) are in out, so must be initialized. -- -- Largest Eigs and their associated vectors are placed at: -- Index'First, Index'First+1, ... -- Notice that Sqrt (W_r**2 + W_i**2) is used, so numerical noise may mean -- that the eigs are not sorted by magnitude of W_r**2 + W_i**2 alone. function Norm (V_r, V_i : in Col_Vector; Starting_Col : in Index := Index'First; Final_Col : in Index := Index'Last) return Real; -- -- Norm of complex vector V with components V(j) = (V_r(j), V_i(j)) end Peters_Eigen;
alloy4fun_models/trashltl/models/4/H7YN2cKdzeiiK5oie.als
Kaixi26/org.alloytools.alloy
0
161
<reponame>Kaixi26/org.alloytools.alloy open main pred idH7YN2cKdzeiiK5oie_prop5 { eventually (some f : File | f in Trash) } pred __repair { idH7YN2cKdzeiiK5oie_prop5 } check __repair { idH7YN2cKdzeiiK5oie_prop5 <=> prop5o }
Julian_calendar.adb
Louis-Aime/Milesian_calendar_Ada
0
10519
-- Package body Julian_calendar ---------------------------------------------------------------------------- -- Copyright Miletus 2016 -- 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: -- 1. The above copyright notice and this permission notice shall be included -- in all copies or substantial portions of the Software. -- 2. Changes with respect to any former version shall be documented. -- -- The software is provided "as is", without warranty of any kind, -- express of implied, including but not limited to the warranties of -- merchantability, fitness for a particular purpose and noninfringement. -- In no event shall the authors of 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. -- Inquiries: www.calendriermilesien.org ------------------------------------------------------------------------------ with Cycle_Computations; package body Julian_calendar is package Julian_Day_cycle is new Cycle_computations.Integer_cycle_computations (Num => Julian_Day'Base); use Julian_Day_cycle; subtype computation_month is integer range 0..12; function is_bissextile_year -- in the sense of Julian or Gregorian (year : Historical_year_number; Calendar : Calendar_type := Unspecified) return Boolean is Is_Julian : Boolean := Calendar = Julian or else (Calendar = Unspecified and then year < 1583); begin return year mod 4 = 0 and then (Is_Julian or else (year mod 100 /= 0 or else year mod 400 = 0)); end is_bissextile_year; function is_valid (date : Roman_date; Calendar : Calendar_type := Unspecified) return Boolean is -- whether the given date is an existing one -- on elaboration, the basic range cheks on record fields have been done begin case date.month is when 4|6|9|11 => return date.day <= 30; when 2 => return date.day <= 28 or else (date.day = 29 and is_bissextile_year (date.year , Calendar)); when others => return True; end case; end is_valid; function JD_to_Roman (jd : Julian_Day; Calendar : Calendar_type := Unspecified) -- Gregorian : Boolean := (jd > 299160)) return Roman_date is Is_Gregorian : Boolean := Calendar = Gregorian or else (Calendar = Unspecified and then jd > 299160); -- by default, the return date shall be specified in gregorian -- if it falls after 1582-10-04 (julian) cc : Cycle_coordinates := (0, jd+1401); -- Initiated for the julian calendar case; -- Base of cycle if julian calendar is 1/3/-4716 julian calendar Shifted_month : Integer; Shifted_year : Historical_year_number := -4716; begin -- 1. Find the year and day-of-year in the shifted Roman calendar, -- i.e. the calendar that begins on 1 March. -- 1.1 If Gregorian, find quadrisaeculum, then century, then quadriannum; -- else find directly quadriannum; -- 1.2 Find shifted year and rank of day in shifted year; -- 1.3 Find shifted month, find day rank in shifted month -- 2. Set to unshifted calendar. if Is_Gregorian then -- 1.1 cc := Decompose_cycle (jd+32044, 146097); -- intialise current day for the computations to -- day of a "gregorian epoch" such as 0 is 1/3/-4800 gregorian Shifted_year := (cc.cycle - 12) * 400; -- Initiated for the gregorian calendar cc := Decompose_cycle_ceiled (cc.phase, 36524, 4); -- cc.cycle is rank of century in quadriseculum, -- cc.phase is rank of days within century. -- rank of century is 0 to 3, phase can be 36524 if rank is 3. Shifted_year := Shifted_year + (cc.cycle) * 100; -- base century end if; -- 1.2; cc and shifted_year already initiated. cc := Decompose_cycle (cc.phase, 1461); -- quadriannum Shifted_year := Shifted_year + cc.cycle * 4; cc := Decompose_cycle_ceiled (cc.phase, 365, 4); -- year in quadriannum Shifted_year := Shifted_year + cc.cycle; -- here we get the (shifted) year and the rank of day, cc.phase. -- 1.3 use a variant of Troesch method cc := Decompose_cycle (5 * cc.Phase + 2 , 153); Shifted_month := cc.Cycle; -- here Shifted_day = cc.Phase / 5; if Shifted_month < 10 -- 0..9 meaning March to December then return (year => Shifted_year, month => Shifted_month + 3, day => cc.Phase/5 + 1); else return (year => Shifted_year + 1, month => Shifted_month - 9, day => cc.Phase/5 + 1); end if; end JD_to_Roman; function Roman_to_JD (Date : Roman_date; Calendar : Calendar_type := Unspecified) return Julian_Day is Is_Gregorian : Boolean := Calendar = Gregorian or else (Calendar = Unspecified and then (Date.year > 1583 or else (Date.year = 1582 and then (Date.month > 10 or else (Date.month = 10 and then Date.day > 4))))); Jd : Julian_Day; Days : Julian_Day_Duration; Shifted_month : integer := Date.month; Shifted_year : Integer := Date.year; Centuries : Integer; begin if not is_valid (date , Calendar) then raise Time_Error; end if; if Shifted_month in 1..2 then Shifted_month := Shifted_month + 9; -- 10 or 11 Shifted_year := Shifted_year - 1; else Shifted_month := Shifted_month - 3; -- 0 to 9 end if; Centuries := (Shifted_year + 4800)/100; -- Computed from -4800; Days := (Shifted_year + 4716) / 4 -- for each leap year + (Shifted_month*306 + 5) / 10 -- osssia + Integer (Fractional_day_in_year (Shifted_month * 30.6)) + date.day - 307; If Is_Gregorian then Days := Days - Centuries + Centuries/4 + 38; end if; Jd := (Shifted_year + 4713) * 365; -- 365 days per years Jd := Jd + Days; Return Jd; end Roman_to_JD; function Julian_to_Gregorian_Delay (Year : Historical_year_number) return Integer is A : Natural := Year + 4800 ; -- force positive. begin return -38 + A/100 - A/400; -- divisions use only with positive arguments end Julian_to_Gregorian_Delay; function Easter_days (Year : Natural; Calendar : Calendar_type := Unspecified) return Natural is Is_Gregorian : Boolean := Calendar = Gregorian or else (Calendar = Unspecified and then year > 1582); -- Initialisation: decompose year in suitable parts, -- Compute Gold number, compute Easter residue. -- Rank of century S : Natural := Year / 100; -- Rank of quadrisaeculum Q : Natural := S/4; -- Rank of quadriannum in current century B : Natural range 0..24 := (Year - S*100) / 4; -- Rank of year in current quadriannum N : Natural range 0..3 := (Year - S*100 - B*4); -- Gold number minus one in Meton's cycle G : Natural range 0..18 := Year mod 19; -- Easter residue, number of days from 21 March until Easter full moon R : Natural range 0..29 := (15 + 19*G -- Computation of Easter residue after Delambre... + Boolean'Pos (Is_Gregorian) * (S - Q - (8*S + 13)/25)) -- Gregorian: add Metemptose and Proemptose. -- Proemptose is computed with the Zeller-Troesch formula. mod 30; -- Take the remainder by 30 residue before correction. begin if Is_Gregorian then R := R - (G + 11*R) / 319 ; -- correction on residue end if; if Is_Gregorian then return 1 + R + (4 - Q + 2*S + 2*B - N - R) mod 7 ; else return 1 + R + (6 + S + 2*B - N - R) mod 7 ; end if; end Easter_days; end Julian_calendar;
oeis/145/A145641.asm
neoneye/loda-programs
11
179863
; A145641: Numbers whose binary representation is the concatenation of n 1's, n 0's and n 1's. ; Submitted by <NAME> ; 5,51,455,3855,31775,258111,2080895,16711935,133956095,1072694271,8585742335,68702703615,549688713215,4397778092031,35183298379775,281470681808895,2251782633947135,18014329790267391,144114913198473215,1152920405096267775,9223367638810361855 mov $3,2 pow $3,$0 mul $3,2 mov $0,$3 mov $1,1 pow $3,2 add $3,2 sub $3,$0 sub $1,$3 mul $1,$0 mov $2,1 sub $2,$1 mov $0,$2 sub $0,2