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
bb-runtimes/runtimes/ravenscar-full-stm32g474/gnat/a-crdlli.ads
JCGobbi/Nucleo-STM32G474RE
0
3327
<filename>bb-runtimes/runtimes/ravenscar-full-stm32g474/gnat/a-crdlli.ads ------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- ADA.CONTAINERS.RESTRICTED_DOUBLY_LINKED_LISTS -- -- -- -- S p e c -- -- -- -- Copyright (C) 2004-2021, 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 3, 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. -- -- -- -- -- -- -- -- -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- This unit was originally developed by <NAME>. -- ------------------------------------------------------------------------------ -- The doubly-linked list container provides constant-time insertion and -- deletion at all positions, and allows iteration in both the forward and -- reverse directions. This list form allocates storage for all nodes -- statically (there is no dynamic allocation), and a discriminant is used to -- specify the capacity. This container is also "restricted", meaning that -- even though it does raise exceptions (as described below), it does not use -- internal exception handlers. No state changes are made that would need to -- be reverted (in the event of an exception), and so as a consequence, this -- container cannot detect tampering (of cursors or elements). generic type Element_Type is private; with function "=" (Left, Right : Element_Type) return Boolean is <>; package Ada.Containers.Restricted_Doubly_Linked_Lists is pragma Pure; type List (Capacity : Count_Type) is tagged limited private; pragma Preelaborable_Initialization (List); type Cursor is private; pragma Preelaborable_Initialization (Cursor); Empty_List : constant List; -- The default value for list objects declared without an explicit -- initialization expression. No_Element : constant Cursor; -- The default value for cursor objects declared without an explicit -- initialization expression. function "=" (Left, Right : List) return Boolean; -- If Left denotes the same list object as Right, then equality returns -- True. If the length of Left is different from the length of Right, then -- it returns False. Otherwise, list equality iterates over Left and Right, -- comparing the element of Left to the corresponding element of Right -- using the generic actual equality operator for elements. If the elements -- compare False, then the iteration terminates and list equality returns -- False. Otherwise, if all elements return True, then list equality -- returns True. procedure Assign (Target : in out List; Source : List); -- If Target denotes the same list object as Source, the operation does -- nothing. If Target.Capacity is less than Source.Length, then it raises -- Constraint_Error. Otherwise, it clears Target, and then inserts each -- element of Source into Target. function Length (Container : List) return Count_Type; -- Returns the total number of (active) elements in Container function Is_Empty (Container : List) return Boolean; -- Returns True if Container.Length is 0 procedure Clear (Container : in out List); -- Deletes all elements from Container. Note that this is a bounded -- container and so the element is not "deallocated" in the same sense that -- an unbounded form would deallocate the element. Rather, the node is -- relinked off of the active part of the list and onto the inactive part -- of the list (the storage from which new elements are "allocated"). function Element (Position : Cursor) return Element_Type; -- If Position equals No_Element, then Constraint_Error is raised. -- Otherwise, function Element returns the element designed by Position. procedure Replace_Element (Container : in out List; Position : Cursor; New_Item : Element_Type); -- If Position equals No_Element, then Constraint_Error is raised. If -- Position is associated with a list object different from Container, -- Program_Error is raised. Otherwise, the element designated by Position -- is assigned the value New_Item. procedure Query_Element (Position : Cursor; Process : not null access procedure (Element : Element_Type)); -- If Position equals No_Element, then Constraint_Error is raised. -- Otherwise, it calls Process with (a constant view of) the element -- designated by Position as the parameter. procedure Update_Element (Container : in out List; Position : Cursor; Process : not null access procedure (Element : in out Element_Type)); -- If Position equals No_Element, then Constraint_Error is raised. -- Otherwise, it calls Process with (a variable view of) the element -- designated by Position as the parameter. procedure Insert (Container : in out List; Before : Cursor; New_Item : Element_Type; Count : Count_Type := 1); -- Inserts Count new elements, all with the value New_Item, into Container, -- immediately prior to the position specified by Before. If Before has the -- value No_Element, this is interpreted to mean that the elements are -- appended to the list. If Before is associated with a list object -- different from Container, then Program_Error is raised. If there are -- fewer than Count nodes available, then Constraint_Error is raised. procedure Insert (Container : in out List; Before : Cursor; New_Item : Element_Type; Position : out Cursor; Count : Count_Type := 1); -- Inserts elements into Container as described above, but with the -- difference that cursor Position is returned, which designates the first -- of the new elements inserted. If Count is 0, Position returns the value -- Before. procedure Insert (Container : in out List; Before : Cursor; Position : out Cursor; Count : Count_Type := 1); -- Inserts elements in Container as described above, but with the -- difference that the new elements are initialized to the default value -- for objects of type Element_Type. procedure Prepend (Container : in out List; New_Item : Element_Type; Count : Count_Type := 1); -- Inserts Count elements, all having the value New_Item, prior to the -- first element of Container. procedure Append (Container : in out List; New_Item : Element_Type; Count : Count_Type := 1); -- Inserts Count elements, all having the value New_Item, following the -- last element of Container. procedure Delete (Container : in out List; Position : in out Cursor; Count : Count_Type := 1); -- If Position equals No_Element, Constraint_Error is raised. If Position -- is associated with a list object different from Container, then -- Program_Error is raised. Otherwise, the Count nodes starting from -- Position are removed from Container ("removed" meaning that the nodes -- are unlinked from the active nodes of the list and relinked to inactive -- storage). On return, Position is set to No_Element. procedure Delete_First (Container : in out List; Count : Count_Type := 1); -- Removes the first Count nodes from Container procedure Delete_Last (Container : in out List; Count : Count_Type := 1); -- Removes the last Count nodes from Container procedure Reverse_Elements (Container : in out List); -- Relinks the nodes in reverse order procedure Swap (Container : in out List; I, J : Cursor); -- If I or J equals No_Element, then Constraint_Error is raised. If I or J -- is associated with a list object different from Container, then -- Program_Error is raised. Otherwise, Swap exchanges (copies) the values -- of the elements (on the nodes) designated by I and J. procedure Swap_Links (Container : in out List; I, J : Cursor); -- If I or J equals No_Element, then Constraint_Error is raised. If I or J -- is associated with a list object different from Container, then -- Program_Error is raised. Otherwise, Swap exchanges (relinks) the nodes -- designated by I and J. procedure Splice (Container : in out List; Before : Cursor; Position : in out Cursor); -- If Before is associated with a list object different from Container, -- then Program_Error is raised. If Position equals No_Element, then -- Constraint_Error is raised; if it associated with a list object -- different from Container, then Program_Error is raised. Otherwise, the -- node designated by Position is relinked immediately prior to Before. If -- Before equals No_Element, this is interpreted to mean to move the node -- designed by Position to the last end of the list. function First (Container : List) return Cursor; -- If Container is empty, the function returns No_Element. Otherwise, it -- returns a cursor designating the first element. function First_Element (Container : List) return Element_Type; -- Equivalent to Element (First (Container)) function Last (Container : List) return Cursor; -- If Container is empty, the function returns No_Element. Otherwise, it -- returns a cursor designating the last element. function Last_Element (Container : List) return Element_Type; -- Equivalent to Element (Last (Container)) function Next (Position : Cursor) return Cursor; -- If Position equals No_Element or Last (Container), the function returns -- No_Element. Otherwise, it returns a cursor designating the node that -- immediately follows the node designated by Position. procedure Next (Position : in out Cursor); -- Equivalent to Position := Next (Position) function Previous (Position : Cursor) return Cursor; -- If Position equals No_Element or First (Container), the function returns -- No_Element. Otherwise, it returns a cursor designating the node that -- immediately precedes the node designated by Position. procedure Previous (Position : in out Cursor); -- Equivalent to Position := Previous (Position) function Find (Container : List; Item : Element_Type; Position : Cursor := No_Element) return Cursor; -- Searches for the node whose element is equal to Item, starting from -- Position and continuing to the last end of the list. If Position equals -- No_Element, the search starts from the first node. If Position is -- associated with a list object different from Container, then -- Program_Error is raised. If no node is found having an element equal to -- Item, then Find returns No_Element. function Reverse_Find (Container : List; Item : Element_Type; Position : Cursor := No_Element) return Cursor; -- Searches in reverse for the node whose element is equal to Item, -- starting from Position and continuing to the first end of the list. If -- Position equals No_Element, the search starts from the last node. If -- Position is associated with a list object different from Container, then -- Program_Error is raised. If no node is found having an element equal to -- Item, then Reverse_Find returns No_Element. function Contains (Container : List; Item : Element_Type) return Boolean; -- Equivalent to Container.Find (Item) /= No_Element function Has_Element (Position : Cursor) return Boolean; -- Equivalent to Position /= No_Element procedure Iterate (Container : List; Process : not null access procedure (Position : Cursor)); -- Calls Process with a cursor designating each element of Container, in -- order from Container.First to Container.Last. procedure Reverse_Iterate (Container : List; Process : not null access procedure (Position : Cursor)); -- Calls Process with a cursor designating each element of Container, in -- order from Container.Last to Container.First. generic with function "<" (Left, Right : Element_Type) return Boolean is <>; package Generic_Sorting is function Is_Sorted (Container : List) return Boolean; -- Returns False if there exists an element which is less than its -- predecessor. procedure Sort (Container : in out List); -- Sorts the elements of Container (by relinking nodes), according to -- the order specified by the generic formal less-than operator, such -- that smaller elements are first in the list. The sort is stable, -- meaning that the relative order of elements is preserved. end Generic_Sorting; private type Node_Type is limited record Prev : Count_Type'Base; Next : Count_Type; Element : Element_Type; end record; type Node_Array is array (Count_Type range <>) of Node_Type; type List (Capacity : Count_Type) is tagged limited record Nodes : Node_Array (1 .. Capacity); Free : Count_Type'Base := -1; First : Count_Type := 0; Last : Count_Type := 0; Length : Count_Type := 0; end record; type List_Access is access all List; for List_Access'Storage_Size use 0; type Cursor is record Container : List_Access; Node : Count_Type := 0; end record; Empty_List : constant List := (0, others => <>); No_Element : constant Cursor := (null, 0); end Ada.Containers.Restricted_Doubly_Linked_Lists;
programs/oeis/000/A000480.asm
jmorken/loda
1
104037
<gh_stars>1-10 ; A000480: a(n) = floor(cos(n)). ; 1,0,-1,-1,-1,0,0,0,-1,-1,-1,0,0,0,0,-1,-1,-1,0,0,0,-1,-1,-1,0,0,0,-1,-1,-1,0,0,0,-1,-1,-1,-1,0,0,0,-1,-1,-1,0,0,0,-1,-1,-1,0,0,0,-1,-1,-1,0,0,0,0,-1,-1,-1,0,0,0,-1,-1,-1,0,0,0,-1,-1,-1,0,0,0,-1,-1,-1 mov $1,3 lpb $0 mov $2,$0 cal $2,330034 ; a(n) = sign(cos(n)). mov $0,0 mov $1,$2 lpe sub $1,1 div $1,2
oeis/069/A069726.asm
neoneye/loda-programs
11
174015
<reponame>neoneye/loda-programs<filename>oeis/069/A069726.asm ; A069726: Number of rooted planar bi-Eulerian maps with 2n edges. Bi-Eulerian: all its vertices and faces are of even valency. ; Submitted by <NAME> ; 1,1,6,54,594,7371,99144,1412802,21025818,323686935,5120138790,82812679560,1364498150904,22839100002036,387477144862128,6651170184185802,115346229450879978,2018559015390399615,35610482089433479410,632770874050702595670,11317118106279639106530,203600457770373338217795,3682512627498926465156640,66931625788105487933192760,1221980253674268765408862104,22402049763625791416533958436,412254073008610476004895360904,7613315478159014245181314327344,141060504022732080633495531702096 mov $1,3 pow $1,$0 seq $0,139 ; a(n) = 2*(3*n)!/((2*n+1)!*((n+1)!)). mul $1,$0 sub $1,3 mov $0,$1 div $0,3 add $0,1
source/modules/basic/expressions/floatonly/int.asm
paulscottrobson/mega-basic
3
8328
; ******************************************************************************************* ; ******************************************************************************************* ; ; Name : int.asm ; Purpose : int( unary function ; Date : 22nd August 2019 ; Review : 1st September 2019 ; Author : <NAME> (<EMAIL>) ; ; ******************************************************************************************* ; ******************************************************************************************* Unary_Int: ;; int( jsr EvaluateNumberX ; get value jsr CheckNextRParen ; check right bracket. jmp FPUToInteger ; Convert to integer.
examples/errors.asm
NibNerd/asm85
3
98467
<filename>examples/errors.asm sym1 equ 55 sym2 equ 55h sym3 equ 1234h num4 equ 0110b ; Binary constant bah equ 77h dater: dw 1234h,5678h modater:db 12h , 34hi ,56h,78h str: DB "LILY",00h str2: DB "Katie" , 80 str3: db "Tom","Rox" bad: db "where is the end hexy: db "cobb\xbe\xef" quote: db "\"air\"" quote2: db "\"bud\"more" slash: db "\\abc" special:db "\t\n\r",bah,beh, bad,sym1,sym2 123 "abc" + buffer ds 8 ; Can reserve space with DS. char2: mvi a,'A' char3: mvi b,'abc' ; ERR: Can't use string in expression. symbol: dw str,nope,str2,65535,cafeh,sym3 LXI SP,2100H VeryVeryVeryLongLabel: db "Labels can be up to 32 characters and must start with an alpha." single: db "'" char: db '"' ; Some common C-style string escapes are supported: CR, LF, tab, NULL, and ; hex value. Hex escapes can use upper or lower case and must be 2 digits. db "\r\n\t\x2a\x2B\0" ; The backslash can also be used to escape quotes or the backslash character itself. db '\\' ; Backslash character. db '\'' ; Single quote character. db "'" ; Same string using double quotes. db "A \"quoted\" string" ; Quotes within quotes. db 'A "quoted" string' ; Same string using single quotes. db "mismatch' ; ERR: quotes must match. CR equ 13 LF equ '\n' db "ABC123\r\n" db "ABC123",CR,LF db "ABC123",13,10 db 'A','B','C','1','2','3','\r','\n' db "ABC",31h,32h,"3",'\r',LF var6 equ 7+7*7+7/(7-7) var0 equ 01010111b org $ + 08000h var1 equ 32 var2 equ $ + 1 var3 equ 16* 3 var4 equ (2+3) stuff ds 20 ssize equ $ - stuff stuff2 dw 0ffffh & 01248h stuff3 db var0 |05ah stuff4 db "ABC" stuff5 db 'a','b','c' stuff6 db 020H | 'A' stuff7 db 'B'&11011111B stuff8 db "123",09H, "456", 0AH stuff9 db "abc\ndef\rghi\x00\x30" stuff10 db "abc\"d" var7: db 00dh, 00ah var8: equ 0 var9: db "yeah, baby" mvi c,'T' ; Send a test character mvi b,OUTBITS ; Number of output bits xra a ; Clear carry for start bit mvi a,080H ; Set the SDE flag rar ; Shift carry into SOD flag cmc ; and invert carry. Why? (serial is inverted?) sim ; Output data bit lxi h,BITTIME ; Load the time delay for one bit width dcr l ; Wait for bit time jnz CO2 dcr h jnz CO2 stc ; Shift in stop bit(s) mov a,c ; Get char to send rar ; LSB into carry mov c,a ; Store rotated data dcr b jnz CO1 ; Send next bit ei jmp START
Ada/Benchmark/src/aux_image.adb
kkirstein/proglang-playground
0
6609
<filename>Ada/Benchmark/src/aux_image.adb with Ada.Numerics.Big_Numbers.Big_Integers; use Ada.Numerics.Big_Numbers.Big_Integers; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Perfect_Number; use Perfect_Number; with Primes; use Primes; package body Aux_Image is function Generic_Image (X : T) return String is Res : Unbounded_String := Null_Unbounded_String; begin Res := Res & "["; for E of X loop Res := Res & To_String (E) & ","; end loop; Res := Res & "]"; return To_String (Res); end Generic_Image; --function Img is new Generic_Image (T => Pn_Vectors.Element_Type, -- I => Pn_Vectors.Index_Type, -- A => Pn_Vectors.Vector, -- To_String => Integer'Image); function Img (X : Pn_Vectors.Vector) return String is Res : Unbounded_String := Null_Unbounded_String; begin Res := Res & "["; for E of X loop Res := Res & Img (E) & ","; end loop; Res := Res & "]"; return To_String (Res); end Img; function Img (X : Prime_Vectors.Vector) return String is Res : Unbounded_String := Null_Unbounded_String; begin Res := Res & "["; for E of X loop Res := Res & Img (E) & ","; end loop; Res := Res & "]"; return To_String (Res); end Img; function Img (X : Big_Prime_Vectors.Vector) return String is Res : Unbounded_String := Null_Unbounded_String; begin Res := Res & "["; for E of X loop Res := Res & Img (E) & ","; end loop; Res := Res & "]"; return To_String (Res); end Img; end Aux_Image;
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48.log_21829_2903.asm
ljhsiun2/medusa
9
9326
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r14 push %r15 push %rbp push %rcx push %rdi push %rsi lea addresses_A_ht+0x5830, %rsi lea addresses_D_ht+0x1e270, %rdi clflush (%rsi) nop nop sub %r15, %r15 mov $90, %rcx rep movsq nop and %rbp, %rbp lea addresses_UC_ht+0x169d0, %rsi lea addresses_UC_ht+0x2550, %rdi nop nop nop nop inc %rbp mov $117, %rcx rep movsl nop nop nop cmp %rsi, %rsi lea addresses_normal_ht+0x17230, %rsi lea addresses_normal_ht+0x18d10, %rdi cmp %r12, %r12 mov $124, %rcx rep movsw nop nop nop nop dec %r12 lea addresses_D_ht+0x2728, %rsi nop nop cmp $9407, %r14 movups (%rsi), %xmm1 vpextrq $1, %xmm1, %rbp sub %rcx, %rcx pop %rsi pop %rdi pop %rcx pop %rbp pop %r15 pop %r14 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r14 push %r15 push %rax push %rbp // Store mov $0x53c73d0000000bd4, %r10 clflush (%r10) nop nop nop sub $36724, %r13 mov $0x5152535455565758, %r15 movq %r15, (%r10) nop nop nop sub %r10, %r10 // Faulty Load lea addresses_A+0x5cd0, %r15 nop nop nop and $13673, %r14 mov (%r15), %r13 lea oracles, %r14 and $0xff, %r13 shlq $12, %r13 mov (%r14,%r13,1), %r13 pop %rbp pop %rax pop %r15 pop %r14 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': True, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 2, 'size': 8, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': True}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': True}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, '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 */
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1265.asm
ljhsiun2/medusa
9
165881
.global s_prepare_buffers s_prepare_buffers: ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r14 push %r8 push %rbp push %rbx push %rdx // Store lea addresses_PSE+0x1a09e, %r10 nop nop nop nop nop xor %r12, %r12 movl $0x51525354, (%r10) nop nop nop dec %r12 // Faulty Load lea addresses_A+0x17316, %r14 nop nop nop nop inc %r8 movups (%r14), %xmm3 vpextrq $1, %xmm3, %rbp lea oracles, %r12 and $0xff, %rbp shlq $12, %rbp mov (%r12,%rbp,1), %rbp pop %rdx pop %rbx pop %rbp pop %r8 pop %r14 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_A'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 3, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': True, 'type': 'addresses_A'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'35': 21829} 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 */
msp430x2/mspgd-gpio.ads
ekoeppen/MSP430_Generic_Ada_Drivers
0
1239
with MSPGD; package MSPGD.GPIO is pragma Preelaborate; type Alt_Func_Type is (IO, Primary, Secondary, Device_Specific, Analog, Comparator); type Direction_Type is (Input, Output); type Resistor_Type is (None, Up, Down); subtype Pin_Type is Integer range 0 .. 7; subtype Port_Type is Unsigned_8 range 1 .. 8; end MSPGD.GPIO;
examples/simple-lib/Lib/Monad.agda
cruhland/agda
1,989
9657
module Lib.Monad where open import Lib.Nat open import Lib.List open import Lib.IO hiding (IO; mapM) open import Lib.Maybe open import Lib.Prelude infixr 40 _>>=_ _>>_ infixl 90 _<*>_ _<$>_ -- Wrapper type, used to ensure that ElM is constructor-headed. record IO (A : Set) : Set where constructor io field unIO : Lib.IO.IO A open IO -- State monad transformer data StateT (S : Set)(M : Set -> Set)(A : Set) : Set where stateT : (S -> M (A × S)) -> StateT S M A runStateT : forall {S M A} -> StateT S M A -> S -> M (A × S) runStateT (stateT f) = f -- Reader monad transformer data ReaderT (E : Set)(M : Set -> Set)(A : Set) : Set where readerT : (E -> M A) -> ReaderT E M A runReaderT : forall {E M A} -> ReaderT E M A -> E -> M A runReaderT (readerT f) = f -- The monad class data Monad : Set1 where maybe : Monad list : Monad io : Monad state : Set -> Monad -> Monad reader : Set -> Monad -> Monad ElM : Monad -> Set -> Set ElM maybe = Maybe ElM list = List ElM io = IO ElM (state S m) = StateT S (ElM m) ElM (reader E m) = ReaderT E (ElM m) return : {m : Monad}{A : Set} -> A -> ElM m A return {maybe} x = just x return {list} x = x :: [] return {io} x = io (returnIO x) return {state _ m} x = stateT \s -> return (x , s) return {reader _ m} x = readerT \_ -> return x _>>=_ : {m : Monad}{A B : Set} -> ElM m A -> (A -> ElM m B) -> ElM m B _>>=_ {maybe} nothing k = nothing _>>=_ {maybe} (just x) k = k x _>>=_ {list} xs k = foldr (\x ys -> k x ++ ys) [] xs _>>=_ {io} (io m) k = io (bindIO m (unIO ∘ k)) _>>=_ {state S m} (stateT f) k = stateT \s -> f s >>= rest where rest : _ × _ -> ElM m _ rest (x , s) = runStateT (k x) s _>>=_ {reader E m} (readerT f) k = readerT \e -> f e >>= \x -> runReaderT (k x) e -- State monad class data StateMonad (S : Set) : Set1 where state : Monad -> StateMonad S reader : Set -> StateMonad S -> StateMonad S ElStM : {S : Set} -> StateMonad S -> Monad ElStM {S} (state m) = state S m ElStM (reader E m) = reader E (ElStM m) ElSt : {S : Set} -> StateMonad S -> Set -> Set ElSt m = ElM (ElStM m) get : {S : Set}{m : StateMonad S} -> ElSt m S get {m = state m} = stateT \s -> return (s , s) get {m = reader E m} = readerT \_ -> get put : {S : Set}{m : StateMonad S} -> S -> ElSt m Unit put {m = state m} s = stateT \_ -> return (unit , s) put {m = reader E m} s = readerT \_ -> put s -- Reader monad class data ReaderMonad (E : Set) : Set1 where reader : Monad -> ReaderMonad E state : Set -> ReaderMonad E -> ReaderMonad E ElRdM : {E : Set} -> ReaderMonad E -> Monad ElRdM {E} (reader m) = reader E m ElRdM (state S m) = state S (ElRdM m) ElRd : {E : Set} -> ReaderMonad E -> Set -> Set ElRd m = ElM (ElRdM m) ask : {E : Set}{m : ReaderMonad E} -> ElRd m E ask {m = reader m } = readerT \e -> return e ask {m = state S m} = stateT \s -> ask >>= \e -> return (e , s) local : {E A : Set}{m : ReaderMonad E} -> (E -> E) -> ElRd m A -> ElRd m A local {m = reader _ } f (readerT m) = readerT \e -> m (f e) local {m = state S _} f (stateT m) = stateT \s -> local f (m s) -- Derived functions -- Monad operations _>>_ : {m : Monad}{A B : Set} -> ElM m A -> ElM m B -> ElM m B m₁ >> m₂ = m₁ >>= \_ -> m₂ _<*>_ : {m : Monad}{A B : Set} -> ElM m (A -> B) -> ElM m A -> ElM m B mf <*> mx = mf >>= \f -> mx >>= \x -> return (f x) _<$>_ : {m : Monad}{A B : Set} -> (A -> B) -> ElM m A -> ElM m B f <$> m = return f <*> m mapM : {m : Monad}{A B : Set} -> (A -> ElM m B) -> List A -> ElM m (List B) mapM f [] = return [] mapM f (x :: xs) = _::_ <$> f x <*> mapM f xs -- State monad operations modify : {S : Set}{m : StateMonad S} -> (S -> S) -> ElSt m Unit modify f = get >>= \s -> put (f s) -- Test -- foo : Nat -> Maybe (Nat × Nat) -- foo s = runReaderT (runStateT m s) s -- where -- m₁ : StateT Nat (ReaderT Nat Maybe) Nat -- m₁ = local suc (ask >>= \s -> put (s + 3) >> get) -- The problem: nested injective function don't seem to work -- as well as one could hope. In this case: -- ElM (ElRd ?0) == ReaderT Nat Maybe -- inverts to -- ElRd ?0 == reader Nat ?1 -- ElM ?1 == Maybe -- it seems that the injectivity of ElRd isn't taken into account(?) -- m : ReaderT Nat Maybe Nat -- m = ask
libsrc/_DEVELOPMENT/arch/zx/display/c/sdcc_iy/zx_aaddr2py.asm
teknoplop/z88dk
0
103187
<filename>libsrc/_DEVELOPMENT/arch/zx/display/c/sdcc_iy/zx_aaddr2py.asm ; uint zx_aaddr2py(void *attraddr) SECTION code_clib SECTION code_arch PUBLIC _zx_aaddr2py EXTERN asm_zx_aaddr2py _zx_aaddr2py: pop af pop hl push hl push af jp asm_zx_aaddr2py
src/features/misc macros.asm
FranchuFranchu/fran-os
1
244959
<gh_stars>1-10 %macro DEBUG_PRINT 1 mov esi, %%string call kernel_terminal_write_string section .data %%string: db %1, 0 section .text %endmacro %macro FATAL_ERROR 1 mov dl, VGA_COLOR_WHITE mov dH, VGA_COLOR_RED call kernel_terminal_set_color DEBUG_PRINT %1 call kernel_halt %endmacro
examples/textionum.adb
ytomino/drake
33
18018
with Ada.Text_IO; with Ada.Float_Text_IO; procedure textionum is type M is mod 100; type D1 is delta 0.1 digits 3; package D1IO is new Ada.Text_IO.Decimal_IO (D1); type D2 is delta 10.0 digits 3; package D2IO is new Ada.Text_IO.Decimal_IO (D2); S7 : String (1 .. 7); S : String (1 .. 12); begin D1IO.Put (S7, 10.0); pragma Assert (S7 = " 10.0"); D1IO.Put (S7, -12.3, Aft => 3); pragma Assert (S7 = "-12.300"); D2IO.Put (S7, 10.0); pragma Assert (S7 = " 10.0"); D2IO.Put (S7, -1230.0); pragma Assert (S7 = "-1230.0"); D2IO.Put (S7, 0.0); pragma Assert (S7 = " 0.0"); pragma Assert (Integer (Float'(5490.0)) = 5490); Ada.Float_Text_IO.Put (S, 5490.0); pragma Assert (S = " 5.49000E+03"); Test_Enumeration_IO : declare package Boolean_IO is new Ada.Text_IO.Enumeration_IO (Boolean); Boolean_Item : Boolean; package Character_IO is new Ada.Text_IO.Enumeration_IO (Character); Character_Item : Character; package Wide_Character_IO is new Ada.Text_IO.Enumeration_IO (Wide_Character); Wide_Character_Item : Wide_Character; package Wide_Wide_Character_IO is new Ada.Text_IO.Enumeration_IO (Wide_Wide_Character); Wide_Wide_Character_Item : Wide_Wide_Character; type E is (A, B, C); package E_IO is new Ada.Text_IO.Enumeration_IO (E); E_Item : E; package Integer_IO is new Ada.Text_IO.Enumeration_IO (Integer); Integer_Item : Integer; package M_IO is new Ada.Text_IO.Enumeration_IO (M); M_Item : M; Last : Natural; begin Boolean_IO.Get ("True", Boolean_Item, Last); pragma Assert (Boolean_Item and then Last = 4); begin Boolean_IO.Get ("null", Boolean_Item, Last); raise Program_Error; exception when Ada.Text_IO.Data_Error => null; end; Character_IO.Get ("Hex_FF", Character_Item, Last); pragma Assert (Character_Item = Character'Val (16#FF#) and then Last = 6); begin Character_IO.Get ("Hex_100", Character_Item, Last); raise Program_Error; exception when Ada.Text_IO.Data_Error => null; end; Wide_Character_IO.Get ("Hex_FFFF", Wide_Character_Item, Last); pragma Assert (Wide_Character_Item = Wide_Character'Val (16#FFFF#) and then Last = 8); begin Wide_Character_IO.Get ("Hex_10000", Wide_Character_Item, Last); raise Program_Error; exception when Ada.Text_IO.Data_Error => null; end; Wide_Wide_Character_IO.Get ("Hex_7FFFFFFF", Wide_Wide_Character_Item, Last); pragma Assert (Wide_Wide_Character_Item = Wide_Wide_Character'Val (16#7FFFFFFF#) and then Last = 12); begin Wide_Wide_Character_IO.Get ("Hex_80000000", Wide_Wide_Character_Item, Last); raise Program_Error; exception when Ada.Text_IO.Data_Error => null; end; E_IO.Get ("A", E_Item, Last); pragma Assert (E_Item = A and then Last = 1); begin E_IO.Get ("D", E_Item, Last); raise Program_Error; exception when Ada.Text_IO.Data_Error => null; end; Integer_IO.Get ("10", Integer_Item, Last); pragma Assert (Integer_Item = 10 and then Last = 2); begin Integer_IO.Get ("1A", Integer_Item, Last); raise Program_Error; exception when Ada.Text_IO.Data_Error => null; end; M_IO.Get ("10", M_Item, Last); pragma Assert (M_Item = 10 and then Last = 2); begin M_IO.Get ("1A", M_Item, Last); raise Program_Error; exception when Ada.Text_IO.Data_Error => null; end; end Test_Enumeration_IO; pragma Debug (Ada.Debug.Put ("OK")); end textionum;
src/room.asm
hundredrabbits/Donsol
113
179492
;; room enter@room: ; JSR pullCard@deck ; pull card1 LDY hand@deck TYA STA card1@room JSR pullCard@deck ; pull card2 LDY hand@deck TYA STA card2@room JSR pullCard@deck ; pull card3 LDY hand@deck TYA STA card3@room JSR pullCard@deck ; pull card4 LDY hand@deck TYA STA card4@room ; etcs JSR updateBuffers@room JSR updateExperience@player ; update experience ; need redraws LDA #$01 STA reqdraw_name ; new draws LDA #%11111111 STA redraws@game RTS ;; flip card from the table, used in controls when press tryFlip@room: ; ; LDA hp@player CMP #$00 BEQ @skip ; when player is alive LDX cursor@game ; load card at cursor position LDA card1@room, x CMP #$36 BEQ @skip ; when card is not flipped JSR flipCard@room @skip: ; RTS ;; flipCard@room: ; (x:card_pos) -> TAY ; pick card JSR pickCard@deck LDA #$36 ; flip card STA card1@room, x @done: ; post flipping a card JSR updateBuffers@room ; update card buffers JSR updateExperience@player ; update experience JSR updateScore@splash ; need redraws LDA #%11111111 ; TODO | be more selective with the redraw, don't redraw all cards if not needed! STA redraws@game ; start timer LDA #$20 ; timer length before running flipPost@room STA timer@room @skip RTS ;; flipPost@room: ; ; check if player is alive LDA hp@player CMP #$00 BEQ @death ; check if player reached end of deck LDA xp@player CMP #$36 BEQ @complete ; check if all cards are flipped JSR loadCardsLeft@room ; stores in regX CPX #$00 BEQ @proceed RTS @death: ; RTS @proceed: ; LDA #$00 STA has_run@player JSR enter@room ; RTS @complete: ; LDA #$10 ; dialog:victory JSR show@dialog JSR updateDifficulty@splash RTS ;; return non-flipped cards back to the end of the deck returnCards@room: ; LDY #$00 ; increment @loop LDA card1@room, y CMP #$36 BEQ @skip JSR returnCard@deck ; warning: write on regX @skip INY CPY #$04 BNE @loop RTS ;; count enemy cards left in play loadEnemiesLeft@room: ; () -> x:count LDX #$00 ; count LDY #$00 ; increment @loop LDA card1@room, y CMP #$20 BCC @skip ; heart/diamonds CMP #$36 BEQ @skip ; don't count flipped cards INX @skip INY CPY #$04 BNE @loop RTS ;; count cards left in play loadCardsLeft@room: ; () -> x:count LDX #$00 ; count LDY #$00 ; increment @loop LDA card1@room, y CMP #$36 BEQ @skip INX @skip INY CPY #$04 BNE @loop RTS ;; notes ; Form a 16-bit address contained in the given location, AND the one ; following. Add to that address the contents of the Y register. ; Fetch the value stored at that address. ; ; LDA ($B4),Y where Y contains 6 ; ; If $B4 contains $EE AND $B5 contains $12 then the value at memory ; location $12EE + Y (6) = $12F4 is fetched AND put in the accumulator. ;; updateBuffers@room: ; TODO maybe turn into a loop.. ; card 1 buffer LDA #$00 STA id@temp LDX #$00 LDY card1@room, x LDA cards_offset_low, y ; find card offset STA lb@temp LDA cards_offset_high, y STA hb@temp @loop1 LDY id@temp LDA (lb@temp), y ; load value at 16-bit address from (lb@temp + hb@temp) + y STA card1@buffers, y ; store in buffer INC id@temp LDA id@temp CMP #$36 BNE @loop1 ; card 2 buffer LDA #$00 STA id@temp LDX #$01 LDY card1@room, x LDA cards_offset_low, y ; find card offset STA lb@temp LDA cards_offset_high, y STA hb@temp @loop2 LDY id@temp LDA (lb@temp), y ; load value at 16-bit address from (lb@temp + hb@temp) + y STA card2@buffers, y ; store in buffer INC id@temp LDA id@temp CMP #$36 BNE @loop2 ; card 3 buffer LDA #$00 STA id@temp LDX #$02 LDY card1@room, x LDA cards_offset_low, y ; find card offset STA lb@temp LDA cards_offset_high, y STA hb@temp @loop3 LDY id@temp LDA (lb@temp), y ; load value at 16-bit address from (lb@temp + hb@temp) + y STA card3@buffers, y ; store in buffer INC id@temp LDA id@temp CMP #$36 BNE @loop3 ; card 4 buffer LDA #$00 STA id@temp LDX #$03 LDY card1@room, x LDA cards_offset_low, y ; find card offset STA lb@temp LDA cards_offset_high, y STA hb@temp @loop4 LDY id@temp LDA (lb@temp), y ; load value at 16-bit address from (lb@temp + hb@temp) + y STA card4@buffers, y ; store in buffer INC id@temp LDA id@temp CMP #$36 BNE @loop4 RTS
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/vect18.adb
best08618/asylo
7
15887
-- { dg-do compile { target i?86-*-* x86_64-*-* } } -- { dg-options "-O3 -msse2 -fdump-tree-vect-details" } package body Vect18 is procedure Comp (X, Y : Sarray; R : in out Sarray) is Tmp : Long_Float := R(4); begin for I in 1 .. 3 loop R(I+1) := R(I) + X(I) + Y(I); end loop; R(1) := Tmp + X(4) + Y(4); end; end Vect18; -- { dg-final { scan-tree-dump "bad data dependence" "vect" } }
Groups/FinitePermutations.agda
Smaug123/agdaproofs
4
7438
<filename>Groups/FinitePermutations.agda {-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Numbers.Naturals.Semiring -- for length open import Lists.Lists open import Functions.Definition --open import Groups.Actions module Groups.FinitePermutations where allInsertions : {a : _} {A : Set a} (x : A) (l : List A) → List (List A) allInsertions x [] = [ x ] :: [] allInsertions x (y :: l) = (x :: (y :: l)) :: (map (λ i → y :: i) (allInsertions x l)) permutations : {a : _} {A : Set a} (l : List A) → List (List A) permutations [] = [ [] ] permutations (x :: l) = flatten (map (allInsertions x) (permutations l)) factorial : ℕ → ℕ factorial zero = 1 factorial (succ n) = (succ n) *N factorial n factCheck : factorial 5 ≡ 120 factCheck = refl allInsertionsLength : {a : _} {A : Set a} (x : A) (l : List A) → length (allInsertions x l) ≡ succ (length l) allInsertionsLength x [] = refl allInsertionsLength x (y :: l) = applyEquality succ (transitivity (equalityCommutative (lengthMap (allInsertions x l) {f = y ::_})) (allInsertionsLength x l)) allInsertionsLength' : {a : _} {A : Set a} (x : A) (l : List A) → allTrue (λ i → length i ≡ succ (length l)) (allInsertions x l) allInsertionsLength' x [] = refl ,, record {} allInsertionsLength' x (y :: l) with allInsertionsLength' x l ... | bl = refl ,, allTrueMap (λ i → length i ≡ succ (succ (length l))) (y ::_) (allInsertions x l) (allTrueExtension (λ z → length z ≡ succ (length l)) ((λ i → length i ≡ succ (succ (length l))) ∘ (y ::_)) (allInsertions x l) (λ {x} → λ p → applyEquality succ p) bl) permutationsCheck : permutations (3 :: 4 :: []) ≡ (3 :: 4 :: []) :: (4 :: 3 :: []) :: [] permutationsCheck = refl permsAllSameLength : {a : _} {A : Set a} (l : List A) → allTrue (λ i → length i ≡ length l) (permutations l) permsAllSameLength [] = refl ,, record {} permsAllSameLength (x :: l) with permsAllSameLength l ... | bl = allTrueFlatten (λ i → length i ≡ succ (length l)) (map (allInsertions x) (permutations l)) (allTrueMap (allTrue (λ i → length i ≡ succ (length l))) (allInsertions x) (permutations l) (allTrueExtension (λ z → length z ≡ length l) (allTrue (λ i → length i ≡ succ (length l)) ∘ allInsertions x) (permutations l) lemma bl)) where lemma : {m : List _} → (lenM=lenL : length m ≡ length l) → allTrue (λ i → length i ≡ succ (length l)) (allInsertions x m) lemma {m} lm=ll rewrite equalityCommutative lm=ll = allInsertionsLength' x m allTrueEqual : {a b : _} {A : Set a} {B : Set b} (f : A → B) (equalTo : B) (l : List A) → allTrue (λ i → f i ≡ equalTo) l → map f l ≡ replicate (length l) equalTo allTrueEqual f equalTo [] pr = refl allTrueEqual f equalTo (x :: l) (fst ,, snd) rewrite fst | allTrueEqual f equalTo l snd = refl totalReplicate : (l len : ℕ) → fold _+N_ 0 (replicate len l) ≡ l *N len totalReplicate l zero rewrite multiplicationNIsCommutative l 0 = refl totalReplicate l (succ len) rewrite totalReplicate l len | multiplicationNIsCommutative l (succ len) = applyEquality (l +N_) (multiplicationNIsCommutative l len) permsLen : {a : _} {A : Set a} (l : List A) → length (permutations l) ≡ factorial (length l) permsLen [] = refl permsLen (x :: l) = transitivity (lengthFlatten (map (allInsertions x) (permutations l))) (transitivity (applyEquality (fold _+N_ 0) (mapMap (permutations l))) (transitivity (applyEquality (fold _+N_ 0) (mapExtension (permutations l) (length ∘ allInsertions x) (succ ∘ length) λ {y} → allInsertionsLength x y)) (transitivity (applyEquality (fold _+N_ 0) lemma) (transitivity (totalReplicate (succ (length l)) (length (permutations l))) ans)))) where lemma : map (λ a → succ (length a)) (permutations l) ≡ replicate (length (permutations l)) (succ (length l)) lemma = allTrueEqual (λ a → succ (length a)) (succ (length l)) (permutations l) (allTrueExtension (λ z → length z ≡ length l) (λ i → succ (length i) ≡ succ (length l)) (permutations l) (λ pr → applyEquality succ pr) (permsAllSameLength l)) ans : length (permutations l) +N length l *N length (permutations l) ≡ factorial (length l) +N length l *N factorial (length l) ans rewrite permsLen l = refl --act : GroupAction (symmetricGroup (symmetricSetoid (reflSetoid (FinSet n)))) --act = ? {- TODO: show that symmetricGroup acts in the obvious way on permutations FinSet listElements : {a : _} {A : Set a} (l : List A) → Set listElements [] = False listElements (x :: l) = True || listElements l listElement : {a : _} {A : Set a} {l : List A} (elt : listElements l) → A listElement {l = []} () listElement {l = x :: l} (inl record {}) = x listElement {l = x :: l} (inr elt) = listElement {l = l} elt backwardRange : ℕ → List ℕ backwardRange zero = [] backwardRange (succ n) = n :: backwardRange n backwardRangeLength : {n : ℕ} → length (backwardRange n) ≡ n backwardRangeLength {zero} = refl backwardRangeLength {succ n} rewrite backwardRangeLength {n} = refl applyPermutation : {n : ℕ} → (f : FinSet n → FinSet n) → listElements (permutations (backwardRange n)) → listElements (permutations (backwardRange n)) applyPermutation {zero} f (inl record {}) = inl (record {}) applyPermutation {zero} f (inr ()) applyPermutation {succ n} f elt = {!!} finitePermutations : (n : ℕ) → SetoidToSet (symmetricSetoid (reflSetoid (FinSet n))) (listElements (permutations (backwardRange n))) SetoidToSet.project (finitePermutations n) (sym {f} fBij) = {!!} SetoidToSet.wellDefined (finitePermutations n) = {!!} SetoidToSet.surj (finitePermutations n) = {!!} SetoidToSet.inj (finitePermutations n) = {!!} -}
LabWork_02.asm
Hanzallah/MIPS-Sorting-Statistics
0
94681
################################################################## # The program performs insertion sort and statistical operations. # Only $s registers have been used. ################################################################## ####################### # Text Segment ####################### .text .globl main main: jal interact li $v0, 10 syscall interact: addi $sp, $sp, -8 sw $s0, 4($sp) sw $ra, ($sp) la $a0, display li $v0, 4 syscall la $a0, displaya li $v0, 4 syscall la $a0, displayb li $v0, 4 syscall la $a0, displayc li $v0, 4 syscall la $a0, displayd li $v0, 4 syscall li $v0, 5 syscall sw $v0, opcode lw $s0, opcode beq $s0, 1, readArray beq $s0, 2, insertionSort beq $s0, 3, medianMode beq $s0, 4, cont cont: addi, $sp, $sp, 8 jr $ra readArray: # Get number of array elements la $a0, introString li $v0, 4 syscall addi $sp, $sp, -24 sw $ra, ($sp) sw $s0, 4($sp) sw $s1, 8($sp) sw $s2, 12($sp) sw $s3, 16($sp) sw $s4, 20($sp) li $v0, 5 syscall move $s0, $v0 sw $s0, size sll $s3, $s0, 2 # Create dynamic array move $a0, $s3 li $v0, 9 syscall sw $v0, array la $s1, array # Get the elements li $s4, 100 for: li $v0, 5 syscall bgt $v0, $zero, go1 blt $v0, $zero, go3 beq $v0, $zero, go3 go1: blt $v0, $s4, go2 bgt $v0, $s4, go3 beq $v0, $s4, go3 go2: move $s2, $v0 sw $s2, ($s1) addi $s1, $s1, 4 addi $s0, $s0, -1 go3: bgt $s0, $zero, for lw $s1, size # length la $s2, array forPrint3: lw $a0, ($s2) li $v0, 1 syscall la $a0, tab li $v0, 4 syscall addi $s2, $s2, 4 addi $s1, $s1, -1 bgt $s1, $zero, forPrint3 la $a0, endLine li $v0, 4 syscall addi $sp, $sp, 24 j main insertionSort: addi $sp, $sp, -28 li $s0, 1 # i lw $s2, size # length la $s3, array la $s6, array while: move $s1, $s0 # j move $s3, $s6 move $t6, $s1 addi $s3, $s3, -4 for2: addi $s3, $s3, 4 addi $t6, $t6, -1 bgt $t6, 0, for2 lw $s4, ($s3) # load 0th index value lw $s5, 4($s3) # load 1st index value sw $s0, ($sp) sw $s1, 4($sp) sw $s2, 8($sp) sw $s3, 12($sp) sw $s4, 16($sp) sw $s5, 20($sp) sw $s6, 24($sp) blt $s1, 1, cont3 bgt $s1, 0, cont2 while2: move $a0, $s1 jal swap # Restore saved registers lw $s0, ($sp) lw $s1, 4($sp) lw $s2, 8($sp) lw $s3, 12($sp) lw $s4, 16($sp) lw $s5, 20($sp) lw $s6, 24($sp) addi $s1, $s1, -1 # decrement j addi $s3, $s3, -4 # get next index values lw $s4, ($s3) lw $s5, 4($s3) sw $s0, ($sp) sw $s1, 4($sp) sw $s2, 8($sp) sw $s3, 12($sp) sw $s4, 16($sp) sw $s5, 20($sp) sw $s6, 24($sp) blt $s1, 1, cont3 # j greater than 0 cont2: bgt $s4, $s5, while2 # prev value greater than next value cont3: addi $s0, $s0, 1 # increment i blt $s0, $s2, while # i less than length go to while lw $s2, size # length la $s3, array forPrint2: lw $a0, ($s3) li $v0, 1 syscall la $a0, tab li $v0, 4 syscall addi $s3, $s3, 4 addi $s2, $s2, -1 bgt $s2, $zero, forPrint2 la $a0, endLine li $v0, 4 syscall addi $sp, $sp, 28 j main swap: la $s2, array #swap li $s0, 0 li $s1, 0 li $s3, 0 addi $s3, $a0, -1 move $s0, $s3 move $s1, $a0 sll $s0, $s0, 2 # $t0= 4 * $t0 sll $s1, $s1, 2 # $t1= 4 * $t1 add $s0, $s0, $s2 # $t0 points to the array element at index1 add $s1, $s1, $s2 # $t1 points to the array element at index2 # Perform swap. lw $s4, 0($s0) lw $s5, 0($s1) sw $s4, 0($s1) sw $s5, 0($s0) jr $ra medianMode: # Median lw $s0, size la $s2, array # if size is odd then add li $s3, 2 div $s0, $s3 # $t0 / $t1 mflo $s4 mfhi $s0 # $t3 = $t0 mod $t1 beq $s0, 0, adder bne $s0, 0, cont4 adder: sll $s4, $s4, 2 li $s5, 0 addi $s5, $s4, -4 add $s4, $s4, $s2 add $s5, $s5, $s2 lw $s5, ($s5) lw $s4, ($s4) add $s5, $s5, $s4 li $s4, 2 div $s5, $s4 # $s5 / $t1 mflo $s5 # $t2 = floor($s5 / $t1) lw $s0, size move $a0, $s5 li $v0, 1 syscall j getGo cont4: lw $s0, size srl $s0, $s0, 1 sll $s0, $s0, 2 add $s0, $s0, $s2 lw $s1, ($s0) move $a0, $s1 li $v0, 1 syscall getGo: la $a0, endLine li $v0, 4 syscall # Mode lw $s0, size la $s2, array # reg for number of times repeated li $s3, 0 # reg for number repeated lw $s4, ($s2) # counter li $s7, 0 # Two values ahead forStat: lw $s5, ($s2) lw $s6, 4($s2) beq $s5, $s6, go bne $s5, $s6, forget go: addi $s7, $s7, 1 bgt $s7, $s3, check1 beq $s7, $s3, check2 j cont5 check1: move $s4, $s5 move $s3, $s7 j cont5 check2: blt $s5, $s4, check3 j cont5 check3: move $s4, $s5 j cont5 forget: li $s7, 0 cont5: addi $s2, $s2, 4 addi $s0, $s0, -1 bgt $s0, $zero, forStat move $a0, $s4 li $v0, 1 syscall la $a0, endLine li $v0, 4 syscall j main ####################### # Data Segment ####################### .data .align 2 array: .space 1024 size: .word 0 opcode: .word 0 endLine: .asciiz "\n" tab: .asciiz "\t" display: .asciiz "Choose an option:\n" displaya: .asciiz "1 - Read an array\n" displayb: .asciiz "2 - Insertion Sort\n" displayc: .asciiz "3 - Find Median and Mode\n" displayd: .asciiz "4 - Quit\n" introString: .asciiz "Enter array size (Max. 256 elements):\n" elementString: .asciiz "Enter array elements:\n"
Transynther/x86/_processed/AVXALIGN/_un_/i9-9900K_12_0xa0.log_1_463.asm
ljhsiun2/medusa
9
244718
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r15 push %r9 push %rax push %rbp push %rcx lea addresses_WT_ht+0x52cc, %rcx nop nop nop cmp %r9, %r9 movups (%rcx), %xmm0 vpextrq $0, %xmm0, %r12 nop nop nop and $16032, %rcx lea addresses_UC_ht+0xb3ec, %r11 nop nop nop and %rbp, %rbp mov (%r11), %ax nop nop nop cmp %rbp, %rbp lea addresses_UC_ht+0xe32c, %rbp nop nop nop nop nop dec %r15 movb (%rbp), %cl nop nop and $52090, %r15 lea addresses_WT_ht+0x1080, %r15 nop nop nop nop nop dec %rcx movb $0x61, (%r15) nop nop cmp %rax, %rax lea addresses_D_ht+0x163ec, %rbp nop nop nop add %r15, %r15 mov (%rbp), %r9w nop nop nop xor $32265, %rbp lea addresses_normal_ht+0x1d63c, %rcx clflush (%rcx) nop nop inc %r11 mov $0x6162636465666768, %r12 movq %r12, %xmm1 movups %xmm1, (%rcx) nop nop xor $20664, %rbp lea addresses_WT_ht+0x6bec, %r9 nop dec %rax mov (%r9), %ebp nop sub $45183, %rax lea addresses_WC_ht+0x9fec, %r9 nop nop nop nop inc %r11 mov (%r9), %rbp nop nop nop and $59838, %r11 lea addresses_WC_ht+0x1bbec, %rax xor %r9, %r9 vmovups (%rax), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $1, %xmm1, %r15 nop nop nop nop add $45012, %rax lea addresses_WC_ht+0x14a8c, %rcx nop nop nop nop add %r12, %r12 mov $0x6162636465666768, %r15 movq %r15, %xmm4 and $0xffffffffffffffc0, %rcx vmovntdq %ymm4, (%rcx) nop nop nop nop add $58874, %rax pop %rcx pop %rbp pop %rax pop %r9 pop %r15 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r14 push %r9 push %rax push %rbx push %rdx // Store lea addresses_US+0x53ec, %rdx clflush (%rdx) nop and %rax, %rax movb $0x51, (%rdx) nop nop nop dec %r12 // Store lea addresses_WT+0x1e6ac, %rbx clflush (%rbx) nop and $34931, %r9 movw $0x5152, (%rbx) nop nop nop nop nop cmp $17574, %r9 // Store lea addresses_normal+0x3bc4, %rbx nop nop nop and $22624, %r11 mov $0x5152535455565758, %r12 movq %r12, %xmm7 movups %xmm7, (%rbx) nop and $50597, %r9 // Store lea addresses_WC+0x1c3ec, %r9 nop nop nop sub %rdx, %rdx mov $0x5152535455565758, %rax movq %rax, %xmm3 movups %xmm3, (%r9) nop nop nop nop inc %r11 // Store lea addresses_PSE+0x1f284, %rbx nop nop nop cmp %rdx, %rdx movl $0x51525354, (%rbx) nop cmp $33334, %rbx // Store mov $0xbec, %rax clflush (%rax) sub $3916, %r14 movw $0x5152, (%rax) nop nop nop sub %r14, %r14 // Store lea addresses_A+0x17fec, %r11 nop nop nop sub %r12, %r12 movw $0x5152, (%r11) nop nop nop nop nop sub $1829, %r9 // Store lea addresses_D+0x17ec, %rax cmp %r11, %r11 movb $0x51, (%rax) nop nop nop and %rax, %rax // Store mov $0x1843750000000dac, %r14 nop nop nop and %r12, %r12 mov $0x5152535455565758, %rdx movq %rdx, (%r14) nop cmp %r12, %r12 // Store lea addresses_A+0x71ac, %r9 nop cmp %rdx, %rdx mov $0x5152535455565758, %r12 movq %r12, %xmm4 vmovups %ymm4, (%r9) nop nop nop nop sub $9972, %rax // Faulty Load lea addresses_US+0xcbec, %rax nop cmp %rdx, %rdx mov (%rax), %r9w lea oracles, %r12 and $0xff, %r9 shlq $12, %r9 mov (%r12,%r9,1), %r9 pop %rdx pop %rbx pop %rax pop %r9 pop %r14 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_US', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_US', 'AVXalign': False, 'size': 1}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_WT', 'AVXalign': False, 'size': 2}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_normal', 'AVXalign': False, 'size': 16}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_WC', 'AVXalign': False, 'size': 16}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 4}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_P', 'AVXalign': False, 'size': 2}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_A', 'AVXalign': False, 'size': 2}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_D', 'AVXalign': False, 'size': 1}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_NC', 'AVXalign': False, 'size': 8}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_A', 'AVXalign': False, 'size': 32}} [Faulty Load] {'src': {'NT': True, 'same': True, 'congruent': 0, 'type': 'addresses_US', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1}} {'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 16}} {'src': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 3, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32}} {'2a': 1} 2a */
chat_procedures.ads
cborao/Ada-P4-chat
0
29293
--PRÁCTICA 4: <NAME> (Chat_Procedures.ads) with Ada.Text_IO; with Hash_Maps_G; with Ada.Calendar; with Ordered_Maps_G; with Lower_Layer_UDP; with Ada.Command_Line; with Ada.Strings.Unbounded; package Chat_Procedures is package ATI renames Ada.Text_IO; package LLU renames Lower_Layer_UDP; package ACL renames Ada.Command_Line; package ASU renames Ada.Strings.Unbounded; use type ASU.Unbounded_String; type Data is record Client_EP: LLU.End_Point_Type; Time: Ada.Calendar.Time; end record; type Old_Data is record Nick: ASU.Unbounded_String; Time: Ada.Calendar.Time; end record; function Max_Valid (Max_Clients: Natural) return Boolean; procedure Print_Active_Map; procedure Print_Old_Map; procedure Case_Init (I_Buffer: access LLU.Buffer_Type; O_Buffer: access LLU.Buffer_Type); procedure Case_Writer (I_Buffer: access LLU.Buffer_Type; O_Buffer: access LLU.Buffer_Type); procedure Case_Logout (I_Buffer: access LLU.Buffer_Type; O_Buffer: access LLU.Buffer_Type); end Chat_Procedures;
test/Interactive/Load.agda
cruhland/agda
1,989
13711
<reponame>cruhland/agda<filename>test/Interactive/Load.agda module Load where data Bool : Set where tt : Bool ff : Bool
TankBot_Code_Dev/TankBotTest/asm/src/demo_service.asm
CmdrZin/chips_avr_examples
5
89949
<reponame>CmdrZin/chips_avr_examples /* * Tank Bot Demo Code * * org: 11/13/2014 * auth: Nels "Chip" Pearson * * Target: Tank Bot Demo Board, 20MHz, ATmega164P. Tank Bot * * Dependentcies * pwm_dc_motor_lib * sys_timers * range_ir_service * range_sonar_service */ .equ DEMO_DELAY_COUNT = 1 ; 10msec .equ DEMO_MODE_SQUARE = 1 .equ DEMO_MODE_UPBACK = 2 .equ DEMO_MODE_AVOID = 3 ; avoid obsticals // SQUARE .equ DEMO_SQUARE_FWD = 0 ; go forward .equ DEMO_SQUARE_TURN90 = 2 ; turn right // AVOID .equ DEMO_AVOID_FWD = 0 ; go forward .equ DEMO_AVOID_CONTINUE = 1 ; continue forward .equ DEMO_AVOID_BACKUP = 2 ; go reverse .equ DEMO_AVOID_TURN180 = 3 ; spin in place .DSEG demo_delay: .BYTE 1 demo_mode: .BYTE 1 ; 0=Square, 1=Up-Back demo_state: .BYTE 1 ; mode state demo_s_time: .BYTE 1 ; state time .CSEG tank_demo_init: ldi R16, DEMO_DELAY_COUNT sts demo_delay, R16 ; ;; ldi R16, DEMO_MODE_SQUARE ldi R16, DEMO_MODE_AVOID sts demo_mode, R16 ; call pwm_stby_on ; ret /* * Some simple state machines to demonstrate to system. */ tank_demo: sbis GPIOR0, DEMO_10MS_TIC ; test 10ms tic ret ; EXIT..not set ; cbi GPIOR0, DEMO_10MS_TIC ; clear tic10ms flag set by interrup // Run service every 10ms ; Get MODE lds R16, demo_mode ; switch(mode) cpi R16, DEMO_MODE_SQUARE brne sd_skip10 lds R16, demo_state // DEMO - SQUARE ; switch(state) cpi R16, DEMO_SQUARE_FWD brne sd_skip010 ; Done with last state? lds R16, demo_s_time dec R16 sts demo_s_time, R16 ; update breq sd_skip001 rjmp sd_exit ; no sd_skip001: ; Go forward ldi R17, DIR_FWD call pwm_set_right_dir call pwm_set_left_dir ; at medium speed ldi R17, PWM_R_MED call pwm_set_right ldi R17, PWM_L_MED call pwm_set_left ; ldi R16, 100 sts demo_s_time, R16 ; run for 2 sec ; ldi R16, DEMO_SQUARE_TURN90 sts demo_state, R16 ; next state rjmp sd_exit ; sd_skip010: cpi R16, DEMO_SQUARE_TURN90 brne sd_skip020 ; Done with last state? lds R16, demo_s_time dec R16 sts demo_s_time, R16 ; update breq sd_skip011 rjmp sd_exit ; no ; yes sd_skip011: ; Turn Left ldi R17, DIR_REV call pwm_set_left_dir ; ldi R16, 79 ; Tune this to turn 90 degrees sts demo_s_time, R16 ; run for 2 sec ; ldi R16, DEMO_SQUARE_FWD sts demo_state, R16 ; next state rjmp sd_exit ; sd_skip020: clr R16 sts demo_state, R16 ; reset to default rjmp sd_exit ; sd_skip10: cpi R16, DEMO_MODE_UPBACK brne sd_skip20 ret ; not supported ; sd_skip20: cpi R16, DEMO_MODE_AVOID breq sd_skip21 rjmp sd_skip30 ; sd_skip21: // DEMO - AVOID lds R16, demo_state ; switch(state) cpi R16, DEMO_AVOID_FWD brne sd_skip210 ; Done with last state? lds R16, demo_s_time dec R16 sts demo_s_time, R16 ; update breq sd_skip201 rjmp sd_exit ; sd_skip201: ; Go forward ldi R17, DIR_FWD call pwm_set_right_dir call pwm_set_left_dir ; at medium speed ldi R17, PWM_R_MED call pwm_set_right ldi R17, PWM_L_MED call pwm_set_left ; ldi R16, DEMO_AVOID_CONTINUE sts demo_state, R16 ; next state rjmp sd_exit ; sd_skip210: cpi R16, DEMO_AVOID_CONTINUE brne sd_skip220 ; Check detectors..ALL must be zero call obstical_check cpi r17, 0 ; 0: no obsticals brne sd_skip211 rjmp sd_exit ; ok to continue ; Obstical detected sd_skip211: ; Backup at SLOW speed ldi R17, PWM_L_MED call pwm_set_left ldi R17, PWM_R_MED call pwm_set_right ; ldi R17, DIR_REV call pwm_set_right_dir call pwm_set_left_dir ; ldi R16, 60 sts demo_s_time, R16 ; run for 600ms ; ldi R16, DEMO_AVOID_BACKUP ; start back up and turn around sts demo_state, R16 ; next state rjmp sd_exit ; ok to continue ; sd_skip220: cpi R16, DEMO_AVOID_BACKUP brne sd_skip230 ; Done with last state? lds R16, demo_s_time dec R16 sts demo_s_time, R16 ; update brne sd_exit ; no ; Turn around ldi R17, DIR_FWD call pwm_set_right_dir ; ldi R16, 175 ; tune for 180 degree turn sts demo_s_time, R16 ; ldi R16, DEMO_AVOID_FWD sts demo_state, R16 ; next state rjmp sd_exit ; recover sd_skip230: ldi R16, DEMO_AVOID_FWD sts demo_state, R16 ; next state rjmp sd_exit ; sd_skip30: call pwm_stop_left call pwm_stop_right ; ERROR sd_exit: ret /* * Obstical Check * * Chech all Sonar range sensors for minimum return ranges. * * output: R17 0: Clear .. 1:Obstical * */ obstical_check: lds r16, range_s_left cpi r16, SONAR_LIMIT brsh oc_skip10 rjmp oc_block_exit ; oc_skip10: lds r16, range_s_center cpi r16, SONAR_LIMIT brsh oc_skip20 rjmp oc_block_exit ; oc_skip20: lds r16, range_s_right cpi r16, SONAR_LIMIT brsh oc_skip30 rjmp oc_block_exit ; oc_skip30: clr r17 ; no obsticals ret ; oc_block_exit: ldi r17, 1 ; obstical detected ret
courses/spark_for_ada_programmers/labs/source/160_interfacing/counter.ads
AdaCore/training_material
15
20160
<reponame>AdaCore/training_material with system.Storage_Elements; package Counter with SPARK_Mode => On -- Small external state tutorial exercise -- -- This package uses an external counter which is incremented -- by one every time: -- A. its clock ticks, -- B. it is read. -- -- It has one query procedure Bump_And_Monitor to check if the -- counter has reached its limit. is Port : Integer; Limit : constant Integer := 3_000_000; procedure Bump_And_Monitor (Alarm : out Boolean); end Counter;
lexparse/LXScript.g4
frenchie16/lxscript
2
1668
<reponame>frenchie16/lxscript grammar LXScript; // Lexer // Keywords and special characters LBRACE : '{'; RBRACE : '}'; LBRACKET : '['; RBRACKET : ']'; GO : 'go'; LOAD : 'load'; OUT : 'out'; FULL : 'full'; AT : '@'; EQUALS : '='; // Sigils for different types of IDs BANG : '!'; // Setting DOLLARS : '$'; // Sequence NUMBER : [0-9]+ ; NAME : [A-Za-z_]+ ; // Comments and whitespace COMMENT : '#' .*? ('\n' | EOF) -> skip; WHITESPACE : [ \t\r\n]+ -> skip; // Parser lxscript : (declaration | action)+ EOF ; action : setting # action_setting | LOAD sequence # action_load | GO # action_go ; declaration : identifier EQUALS system # declaration_system | BANG identifier EQUALS setting # declaration_setting | DOLLARS identifier EQUALS sequence # declaration_sequence ; identifier : NAME NUMBER? | NUMBER ; level : NUMBER | OUT | FULL ; system : identifier # system_reference | AT AT NUMBER # system_literal | LBRACE system+ RBRACE # system_compound ; setting : BANG identifier # setting_reference | system AT setting # setting_partial_reference | system AT level # setting_literal | LBRACE setting+ RBRACE # setting_compound ; sequence : DOLLARS identifier # sequence_reference | LBRACKET setting+ RBRACKET # sequence_literal ;
projects/batfish/src/main/antlr4/org/batfish/grammar/arista/Arista_common.g4
yushihui/batfish
1
800
parser grammar Arista_common; options { tokenVocab = AristaLexer; } interface_address : ip = IP_ADDRESS subnet = IP_ADDRESS | prefix = IP_PREFIX ; ospf_area : id_ip = IP_ADDRESS | id = DEC ; word : WORD ;
src/prothand.asm
DosWorld/zrdx
12
179708
; This file is part of the ZRDX 0.50 project ; (C) 1998, <NAME> ;Protected mode handlers for DPMI host ;handler for: ;hardware interrupts from PM PMHIntHand ;hardware interrupts from RM RMHIntHand ;default software interrupts from PM PMSDefIntHand ;default hardware interrupts from PM PMHDefIntHand ;iret from hardware interrupt PMHIretHand ;iret from first hardware interrupt PMH1IretHand ;iret form hardware interrupt to host ;retf from PM hook procedure PMHookHand ;iret from RM hardware interrupt redirection RMHIretHand ;iret from RM software interrupt redirection RMSIretHand ;leave RM for translation service RMTransRetHand ;raw mode switch from RM RMRawSwitchHand ;comments: ; int 31h hooked in module DPMI ; software interrupts traps points immediately to ring 3 and not hooked SEGM Text ;assume cs:DGroup, ss:DGroup, ds:DGroup, es:nothing assume cs:Text, ss:nothing, ds:nothing, es:nothing ;switch stack and return comment % DPROC Iret2FirstPMTrapH push ss:FirstSS ;for first interrupt push ss:FirstESP ;cannot change one of this values push ss:FirstFlags push ss:FirstCS push ss:FirstEIP mov ss:FirstCS, 0 iretd ENDP % ;default exception handler - terminate program DPROC DefaultExcTrapH cli mov [esp][8], ebp pop ebp add esp, 4 movzx ebp, byte ptr ss:FirstTrap3[ebp+3-7];load redirected int number and ebp, 0Fh mov [esp][4], ebp ;save error code on the stack jmp FatalExc1 ENDP ;return from exception - switch to DPROC RetFromExcTrapH add esp, 3*4 ;drop return address and errcode iretd ENDP ;Hardware interrupts gate for interrupts in 0-20h ;stack frame: ;esp ;if not from 0 ;ss ;eflags ;cs ;eip ;error code(for exceptions) ;int/exception number ;saved ebp DPROC PMHIntHandX LLabel ExceptionWOCodeH ;the entry for exceptions without error code push dword ptr ss:[esp] ;push exception number again and dword ptr ss:[esp+4], 0 ;store 0 as error code for common format LLabel ExceptionWithCodeH ;the entry for exceptions without error code ExceptionWithCodeHL: @@ExceptionWithCodeH: push ebp cmp esp, OffKernelStack-8*4 jne ExceptionFrom0 ExceptionFromNot0: test byte ptr ss:[esp][4*4], 2 ;check rpl in return CS jz FatalExc push es edi esi ds push ss pop ds mov esi, OffKernelStack-4 les edi, fword ptr ds:[esi][-4] ;load client ss:esp sub edi, 4+20 std REPT 6 movsd ;move exception frame to the client stack ENDM mov dword ptr es:[edi], Trap3Selector ;store to the client stack sub edi, 4 ;return address mov dword ptr es:[edi], OffRetFromExcTrap3 pop ds esi push es push edi imul edi, ss:[esp][4*4+4], 8 ;Exception number * 4 push ss:ClientExc[edi][4] push ss:ClientExc[edi] les edi, ss:[esp+4*4] ;restore original es:edi from kernel stack retf ;switch to client excepyion handler ExceptionFrom0: ;XXX FatalExc: cmp byte ptr [esp+4], 1 $ifnot jne F = 12 and [esp+F][1].IFrFlags, not 1 ;clear TF pop ebp add esp, 8 iretd $endif FatalExc1: F = 16 ;Log ;hlt push dword ptr [esp+4] ;exception number push dword ptr [esp+F].IFrCS push dword ptr [esp+F+4].IFrSS push es push ds push ss pop ds push ss pop es push dword ptr [esp+F+16].IFrEIP pushfd push ebp mov ebp, [esp+F+28].IFrESP push ebp push edi push esi push edx push ecx push ebx push eax ;Log IFDEF Release mov PrintToMem,1 mov HasExitMessage, 1 RRT 1 mov edi, OffRStackStart+4 RRT ELSE mov edi, 0B8000h ENDIF mov ecx, 4 lea esi, [esp+40] cld $do lodsd and eax, 1F8h push dword ptr LDT[eax] push dword ptr LDT[eax].4 push 8 call PrintNX push 8 call PrintNX $enddo loop mov ax, 0D0Ah stosw mov ecx, 8 $do push 8 call PrintNX $enddo loop mov ax, 0D0Ah stosw mov cx, 2 $do push 8 call PrintNX $enddo loop comment # movzx eax, dx and al, not 7h and eax, 0FFh push dword ptr LDT[eax] push dword ptr LDT[eax].4 push 8 call PrintNX push 8 call PrintNX # mov cx, 5 $do push 4 call PrintNX $enddo loop ;mov cl, 8 ;sub esp, 12 ifndef Release push ExtraDW push 8 call PrintNX endif ;IFNDEF Release ;hlt ;ENDIF mov al, '$' stosb ;mov al, 20h ;out 20h, al ;out 0A0h, al L098: IFNDEF Release mov PrintToMem,0 ENDIF ;Log mov bx, ROffInt214C mov esp, ROffExitStackEnd-NExitPages*4-TSFrameSize RRT jmp SimpleSwitchToVM LLabel Exception0DHandler cmp esp, OffKernelStack-6*4 je @@InterruptH F = 8 ;test [esp+F].IFrCS, 2 ;exception from kernel(CPL < 2)? ;jz @@ExceptionWithCodeH shr ss:Exception0DFlag, 1 $ifnot jc mov esp, ss:Exception0DStack jmp @@ExceptionWithCodeH $endif mov ss:Exception0DStack, esp push esi ds lds esi, fword ptr ss:[esp+F+8].IFrEIP ;cs:eip push eax mov eax, ds:[esi] cmp al, 0Fh jne @@ToCommonTrap ;mov ah, ds:[esi+1] cmp ah, 20h jb @@ToCommonTrap cmp ah, 23h ja @@ToCommonTrap shl eax, 8 ;mov al, ds:[esi+2] mov al, 0C3h ; RetNCode ror eax, 8 xchg eax, [esp] call esp add esp, 4 mov esi, cr0 mov ss:PMCR0, esi RRT pop ds pop esi add [esp+F].IFrEIP, 3 add esp, 8 ;drop exception number and error code mov ss:Exception0DFlag, 1 iretd @@ToCommonTrap: pop eax ds esi mov ss:Exception0DFlag, 1 jmp @@ExceptionWithCodeH LLabel ExceptionOrInterruptH ;the entry for exceptions/interrupts in range 8-F cmp esp, OffKernelStack-6*4 jne @@ExceptionWithCodeH LLabel InterruptH ;the entry for interrupts InterruptHL: @@InterruptH: push ebp ;hardware interrupts from PL0 not allowed InterruptFromNot0: push eax F = 12 ;eax, ebp, int number mov eax, [esp+F].IFrCS ; test al, 10b ;IFNDEF Release ;$ifnot jnz ; pop eax eax eax ; push 12 ; call RegDump ; mov ecx, 1000000000 ; loop $ ;cli ;jmp $ ; jmp @@ExceptionWithCodeH ;$endif ;ENDIF jz @@HIntFrom01 ;Interrupt from PL1, not from 2 or 3 push ds F = F+4 ;shift of interrupt frame IFDEF VMM cmp ss:LockedMode, 0 $ifnot jne mov ebp, Data3Selector ;selector of locked stack mov ds, ebp sub KernelStack1, 20 ;reserve space for current iret frame mov ds:LockedMode, 1 mov ebp, KernelStack1 mov ss:[ebp].IFrCS, eax mov eax, [esp+F].IFrEIP mov ss:[ebp].IFrEIP, eax mov eax, [esp+F].IFrSS mov ss:[ebp].IFrSS, eax mov eax, [esp+F].IFrESP mov ss:[ebp].IFrESP, eax ;we don't need to transfer eflags, because it will be transferred ;during IretTrapH mov eax, OffLockedStackBottom-12; mov ds:[eax].IFrCS, Trap3Selector mov ebp, OffIretPLTrap3 $else jmp ENDIF sub [esp+F].IFrESP, 12 mov ebp, eax lds eax, fword ptr [esp+F].IFrESP ;client ss mov ds:[eax].IFrCS, ebp ;client cs mov ebp, [esp+F].IFrEIP ; IFDEF VMM $endif ENDIF mov ds:[eax].IFrEIP, ebp ; mov ebp, [esp+F].IFrFlags ; mov ds:[eax].8, ebp ; and ebp, not 4300h ;clear IF and TF and NT push ds ;[esp+F].IFrSS ; push eax ;push .IFrESP, push ebp ;eflags movzx ebp, byte ptr [esp+24] ;load interrup number shl ebp, 3 push dword ptr ss:ClientIDT[ebp].4 push dword ptr ss:ClientIDT[ebp] mov ebp, [esp+28] mov eax, [esp+24] mov ds, [esp+20] iretd ;interrupt from level 1 @@HIntFrom01: ;----------------- save all registers in kernel stack --------------------- ;Log mov ebp, OffKernelStack mov esp, [ebp-8] ;get esp for level 1 ;exceptions & interrupts not allowed there ! mov eax, [ebp-12] ;eflags for interrupted server code push eax push dword ptr[ebp-20] ;eip, push edi esi push dword ptr [ebp-28] ;ebp from stack push ebx edx ecx push dword ptr [ebp-32] ;eax from stack push ds es fs gs ;because stack0 is dropped ;push cs not needed, cs == Code1Selector movzx ecx, byte ptr [ebp-24] ;get interrupt number mov ebp, ss:KernelStack1 push ebp ;save stack1 frame ;cmp esp, XXX ;test for stack overflow ;jb KernelStack1Overflow ;--------------------------- jmp to client vector -------------------------- and ah, not 43h ;IFBitMask;return to client with server flags and IF=0 mov ss:KernelStack1, esp ;new frame started from there IFDEF VMM cmp ss:LockedMode, 0 $ifnot jne mov ebx, Data3Selector mov ds, ebx mov ss:LockedMode, 1 mov ebx, OffLockedStackBottom-12 mov dword ptr [ebx], OffIret2KernelAsincLTrap3 ;address of trap $else jmp ENDIF lds ebx, ss:[ebp-8] ;client ss:esp sub ebx, 12 mov dword ptr [ebx], OffIret2KernelAsincTrap3 ;address of trap IFDEF VMM $endif ENDIF ;Log push ds ;new client ss push ebx ;new client esp push eax ;new client eflags mov [ebx+8], eax mov dword ptr [ebx+4], Trap3Selector push ss:ClientIDT[ecx*8][4] push ss:ClientIDT[ecx*8] iretd ENDP IFDEF VMM LLabel Iret2KernelAsincLTrapH mov ss:LockedMode, 0 ;disable locked mode ENDIF ;PL1 handler ;return to interrupted by hardware int place of server PL1 code DPROC Iret2KernelAsincTrapH cli ;Log add esp, 16 ;drop call gate stack frame pop ss:KernelStack1 ;restore level 1 stack pointer in the TSS pop gs fs es ds pop eax ecx edx ebx ebp esi edi push dword ptr [esp] ;push eip again mov dword ptr [esp+4], Code1Selector ;replace it with CS to complete simple iret frame ;Log iretd ;from PL1 to PL1 ENDP IFDEF VMM DPROC IretPLTrapH pushfd ;transfer current eflags to old frame cli pop [esp+16].IFrFlags add esp, 16 ;drop current return frame and switch to prev frame mov ss:LockedMode, 0 ;disable locked mode add ss:KernelStack1, 20 ;free frame in kernel stack1 iretd ENDP ENDIF ;prepare RM stack and switch to ;rewrite return address to client stack ;save client ss:esp DPROC DefIntTrapH push ebx push ebp pushfd cli mov ebp, OffPMStack-4 RRT push eax F = 4*4 ;ebx, eax ;sub dword ptr [esp+F].CFrESP, 8 mov eax, ds mov ebx, [esp+F].CFrESP mov ds, dword ptr [esp+F].CFrSS sub ebx, 8 mov dword ptr ss:[ebp+4][4], ds push ss mov ss:[ebp+4][0], ebx mov ds:[ebx].PMI_DS, ax mov dword ptr ds:[ebx].PMI_ES, es mov eax, Data1Selector mov ebp, ds:[ebx].PMI_EFlags mov dword ptr ds:[ebx].PMI_FS, fs mov dword ptr ds:[ebx].PMI_GS, gs pop ds @@RSeg equ EAX @@RSegW equ AX @@RDisp equ EBX @@RDispW equ BX mov @@RSeg, RMStack[0] RRT movzx @@RDisp, @@RSegW shr @@RSeg, 16 dec @@RDispW push @@RSeg sub @@RDisp, size VMIStruct-1 shl @@RSeg, 4 add @@RSeg, @@RDisp add @@RDisp, VMI_EAX @@CS equ @@RSeg mov [@@CS].VMI_ESP, @@RDisp ;mov ebx, 0F000h xor ebx, ebx pop [@@CS].VMI_SS mov word ptr [@@CS].VMI_EndFlags, bp ;flags to real iret frame mov [eax].VMI_DS, ebx mov [eax].VMI_ES, ebx mov ebp, [esp+F].CFrEIP ;assume call from Trap3 segment mov [eax].VMI_FS, ebx mov [eax].VMI_GS, ebx mov dword ptr [@@CS].VMI_EndIP, 0 org $-4 DW RMIretSwitchCode, seg dgroup16 movzx ebx, byte ptr ss:FirstTrap3[OffDefIntTrap3+ebp+3-7];load redirected int number bt RIntFlags, ebx $ifnot jc mov ebx, [ebx*4] ;CS:IP from current real mode vector $else jmp mov ebx, SavedRealVectors[ebx*4] ;CS:IP from saved real vector $endif mov dword ptr [eax].VMI_IP, ebx pop dword ptr [eax].VMI_EAX ;write eax for restoring after mode switch pop ebx and bh, not 43h ;clear IF and TF and NT for initial flags pop ebp mov [eax].VMI_Flags, bx ;write flags for restoring pop ebx SwitcherToVM: VCPICallTrap ENDP DPROC PMSaveStateTrapH push esi edi ds es pushfd mov esi, OffRMStack RRT cmp al, 0 cld push ss $ifnot jne pop ds $else jmp xchg esi, edi push es pop ds pop es $endif movsd movsd movsd popfd pop es ds edi esi retf ENDP DPROC PMRawSwitchTrapH movzx eax, ax push ebp pushfd cli mov ebp, OffPMStack RRT push eax F = 12 mov eax, [esp+F].CFrESP mov ss:[ebp], eax mov eax, [esp+F].CFrSS mov ss:[ebp][4], eax movzx ecx, cx movzx edx, dx push edx ;RM ss shl edx, 4 movzx eax, bx ;esp dec ax sub bx, 10 sub eax, size VMIShortStruct-1 ;jc RStackOverflow add eax, edx mov ebp, eax pop [ebp].VMI_SS pop [ebp].VMI_DS pop edx ;init flags mov [ebp].VMI_Flags, dx mov [ebp].VMI_CS, si mov [ebp].VMI_IP, di mov [ebp].VMI_ESP, ebx mov [ebp].VMI_ES, ecx pop ebp VCPICallTrap ENDP DPROC VCPICallHandler pushfd and byte ptr [esp][1], not 40h ;clear NT in current eflags popfd mov esp, eax mov eax, Data0Selector mov ds, eax DB PushWCode DD seg dgroup16 mov eax, RMCR0 RRT mov cr0, eax mov eax, 0DE0Ch DB PushWCode DD Offset dgroup16:pop_eax_iret mov byte ptr GDT[TSSSelector][5], 80h+SS_FREE_TSS3 ;mark current TSS as FREE call fword ptr ds:VCPICall ENDP DPROC VCPITrapHandler ifndef Release ;cmp al, 5 ;$ifnot jne ; push edx ; shr edx, 12 ; btr APages, edx ; pop edx ; jnc @@Err ;$endif endif ;cmp al, 4 ;pushfd call fword ptr ds:VCPICall ;popfd ifndef Release ;$ifnot jne ; push edx ; shr edx, 12 ; bts APages, edx ; pop edx ; jc @@Err ;$endif endif retf ENDP DPROC LoadLDTHandler lldt bp retf ENDP DPROC InvalidateTLBHandler push eax mov eax, SwitchTableCR3 RRT mov cr3, eax pop eax retf ENDP ENDP DPROC ExitDPMIHost ;Entry for PL0, switches to PL1 LLabel TerminateHandler push Data1Selector pop ds push ds pop es push ds push KernelStack1 push Code1Selector push OffTerminateHandler1 retf LLabel TerminateHandler1 push Data3Selector ;save sp for interrup handler push OffUserStackEnd mov RMStack, 0 org $-4 RRT DW ROffExitStackEnd-TSFrameSize ;mov RealStack, dgroup16<<16+ROffExitStackEnd DW DGROUP16 ;-------------------restore all RM vectors hooked by server -------------------- ; and RM vectors hooked by client xor ecx, ecx mov edi, ecx dec cl ;mov ecx, 0FFh mov ebx, OffDefIntTrap3+4*255 mov esi, OffClientIDT $do mov dword ptr [esi+ecx*8].4, Trap3Selector mov [esi+ecx*8], ebx btr RIntFlags, ecx cmp ecx, 2Fh jbe @@AbsSet bt dword ptr PassupIntMap, ecx $ifnot jnc @@AbsSet: mov eax, SavedRealVectors[ecx*4] mov [edi+ecx*4], eax $endif sub ebx, 4 dec ecx $enddo jns ;free all pages, allocated by DPMI 800h mov ebx, LastMappedPage mov edx, 3FFh IFNDEF VMM call FreeHMPages call CleanMemVector call ReturnFreePool ENDIF ;only for PL0 mov esp, ROffExitStackEnd-NExitPages*4-TSFrameSize RRT cld mov esi, OffPage2 mov edi, esp xor ecx, ecx mov cl, NExitPages mov ebp, esp rep movsd ;move mov cl, NExitPages mov bx, offset DGROUP16:TerminateRHandler2 ;entry: esp - VM stack, ebx - VM start ip SimpleSwitchToVM: mov eax, seg Dgroup16 pushf push ax push bx sub esp, 6 push eax eax eax eax eax ;fs gs es ds ss push large (ROffExitStackEnd-NExitPages*4-TSFrameSize-10) ;esp push eax ;skip eflags mov eax, esp jmp SwitcherToVM ENDP DPROC PrintByteP cmp cs:PrintToMem, 0 $ifnot je stosb $else jmp mov ah, 2Fh stosw $endif retn ENDP PrintByte MACRO call PrintByteP ENDM ;Digit, n DPROC PrintNX push eax ecx pushfd cld @@Digit EQU DWORD PTR ss:[esp+12].8 @@N EQU DWORD PTR ss:[esp+12].4 ;mov ax, 2F00h+' ' mov al, ' ' PrintByte ;stosw mov eax, @@Digit mov cl, 8 sub cl, byte ptr @@N shl cl, 2 rol eax, cl mov ecx, @@N $do rol eax, 4 push eax and al, 1111b add al, '0' cmp al, '9' $ifnot jbe add al, 'A'-'9'-1 $endif ;mov ah, 2Fh PrintByte ;stosw pop eax $enddo loop popfd pop ecx eax retn 8 ENDP ;PM handler for VM->PM VCPI switch DPROC RMS_PMHandler mov eax, Data0Selector movzx esi, bp mov ds, eax mov es, eax mov ss, eax IFNDEF VMM mov esp, OffKernelStack ELSE mov esp, OffKernelStack-4 push eax ;push Data0Selector ENDIF mov eax, PMCR0 RRT mov cr0, eax add bp, size RMSStruct ;ajust RM sp to top of normal RM stack mov RMStack, ebp RRT shr ebp, 12 and ebp, not 1111b add ebp, esi ;ebp->LA of RMS movzx eax, [ebp].RMS_SwitchCode sub eax, offset DGROUP16:FirstSwitchCode+3 cmp eax, FirstPassupSwitchCode jae PassupIntHandler cmp eax, MaxSystemSwitchCode jae RMCallbackHandler jmp RMS_JmpTable[eax] ENDP align 4 LDWord RMS_JmpTable DD OffRMIretHandler DD OffDos1CallRet DD OffRMIERetHandler DD OffTerminateHandler DD OffRMRawSwitchHandler DPROC RMIretHandler lds esi, fword ptr PMStack RRT lea eax, [esi+size PMIStruct] push ds push eax pushfd pop eax mov ax, [ebp].RMS_Flags ;load transferred flags or ah, 30h ;force IOPL=3 and ah, not 40h ;and NT = 0 push eax push [esi].PMI_CS push [esi].PMI_EIP mov fs, [esi].PMI_FS ;restore segment registers from client stack mov gs, [esi].PMI_GS mov es, [esi].PMI_ES mov ds, [esi].PMI_DS mov eax, [ebp].RMS_EAX ;and transfer RON from RM stack mov esi, [ebp].RMS_ESI mov ebp, [ebp].RMS_EBP iretd ENDP DPROC RMRawSwitchHandler movzx edx, dx push edx push ebx pushfd movzx eax, word ptr [ebp].RMS_ESI or byte ptr[esp+1], 30h ;set iopl==3 push eax push edi mov es, ecx mov ds, word ptr [ebp].RMS_EAX mov ebp, [ebp].RMS_EBP iretd ENDP DPROC RMCallbackHandler IFDEF VMM cmp LockedMode, 0 $ifnot jne mov LockedMode, 1 mov esi, PMStack RRT mov SavedPMStack, esi mov esi, PMStack[4] RRT mov SavedPMStack[4], esi mov esi, Data3Selector mov es, esi mov esi, OffLockedStackBottom-12 mov [esi].IFrEIP, OffPMCallbackIretLTrap3 $else jmp ENDIF sub PMStack, 12 RRT 1 les esi, fword ptr PMStack RRT mov es:[esi].IFrEIP, OffPMCallbackIretTrap3 IFDEF VMM $endif ENDIF mov es:[esi].IFrCS, Trap3Selector pushfd pop es:[esi].IFrFlags;, eax push es push esi pushfd or byte ptr ss:[esp].1, 30h S = MaxSystemSwitchCode*3 lea eax, CallbacksTable[eax+eax*2-S] movzx esi, [eax].CBT_CS push esi push [eax].CBT_EIP lds esi, fword ptr [eax].CBT_SPtrOff @@DC equ ds:[esi] mov @@DC.DC_EBX, ebx mov @@DC.DC_ECX, ecx mov @@DC.DC_EDX, edx mov @@DC.DC_EDI, edi mov ecx, [ebp].RMS_EAX mov @@DC.DC_EAX, ecx mov ecx, [ebp].RMS_ESI mov @@DC.DC_ESI, ecx mov ecx, [ebp].RMS_EBP mov @@DC.DC_EBP, ecx mov ecx, dword ptr [ebp].RMS_ES mov dword ptr @@DC.DC_ES, ecx mov ecx, dword ptr [ebp].RMS_FS mov dword ptr @@DC.DC_FS, ecx mov cx, [ebp].RMS_Flags mov @@DC.DC_Flags, cx mov ecx, ss:RMStack RRT mov dword ptr @@DC.DC_SP, ecx mov eax, Data3selector push ds mov ds, eax mov edi, esi mov al, 0; Data3selector pop es mov fs, eax mov gs, eax lea esi, [ebp+size RMSStruct] iretd ENDP IFDEF VMM LLabel PMCallbackIretLTrapH mov ebp, OffSavedPMStack mov eax, ss:[ebp][0] mov edx, ss:[ebp][4] ;mov ss:LockedMode, 0 mov byte ptr ss:[ebp][OffLockedMode-OffSavedPMStack], 0 jmp PMCallbackIretTrapE ENDIF DPROC PMCallbackIretTrapH mov eax, [esp].CFrESP mov edx, [esp].CFrSS PMCallbackIretTrapE: cli push es pop ds mov ebp, OffPMStack RRT mov ss:[ebp][0], eax mov ss:[ebp][4], edx movzx eax, [edi].DC_SP movzx ebp, [edi].DC_SS push ebp shl ebp, 4 dec ax sub eax, size VMIStruct-6-1 ;jb @@RStackOverflow add ebp, eax pop [ebp].VMI_SS add eax, VMI_EAX mov [ebp].VMI_ESP, eax mov ax, [edi].DC_Flags mov [ebp].VMI_Flags, ax mov edx, dword ptr [edi].DC_IP jmp SwitchToVMWithTransfer ENDP ;VMS - struct for switch from VM to PM ;PMI - client stack frame for interrupts, executed in PM ;RMIE - client stack frame for real mode interrupt emulation (DPMI service 30X) DPROC RMIERetHandler les eax, fword ptr PMStack RRT lds esi, fword ptr es:[eax].RMIE_EDI @@DC equ ds:[esi] mov @@DC.DC_EBX, ebx mov @@DC.DC_ECX, ecx mov @@DC.DC_EDX, edx mov ecx, [ebp].RMS_EAX mov @@DC.DC_EDI, edi mov edx, [ebp].RMS_ESI mov @@DC.DC_EAX, ecx mov ebx, [ebp].RMS_EBP mov @@DC.DC_ESI, edx mov ecx, dword ptr [ebp].RMS_ES mov @@DC.DC_EBP, ebx mov edx, dword ptr [ebp].RMS_FS mov dword ptr @@DC.DC_ES, ecx mov bx, [ebp].RMS_Flags mov ecx, ss:RMStack RRT mov dword ptr @@DC.DC_FS, edx mov @@DC.DC_Flags, bx mov dword ptr @@DC.DC_SP, ecx push es ;client SS push es add eax, size RMIEStruct pop ds push eax ;new esp pushfd @@CS equ ds:[eax-size RMIEStruct] mov edx, @@CS.RMIE_RealStack mov ecx, @@CS.RMIE_EFlags ;or ch, 30h ;set iopl = 3 and cl, not 1h ;set CF = 0 mov ss:RMStack, edx RRT mov [esp], cx ;don't restore high word of eflags from CS push @@CS.RMIE_CS push @@CS.RMIE_EIP mov fs, @@CS.RMIE_FS mov gs, @@CS.RMIE_GS mov es, @@CS.RMIE_ES mov edi, esi ;@@CS.RMIE_EDI mov esi, @@CS.RMIE_ESI mov ebx, @@CS.RMIE_EBX mov ecx, @@CS.RMIE_ECX mov edx, @@CS.RMIE_EDX mov ebp, @@CS.RMIE_EBP lds eax, fword ptr @@CS.RMIE_EAX iretd ENDP DPROC PassupIntHandler sub word ptr RMStack, 10 ;save on RM stack all RM segment registers RRT 1 IFDEF VMM cmp LockedMode, 0 $ifnot jne mov LockedMode, 1 mov esi, PMStack RRT mov SavedPMStack, esi mov esi, PMStack[4] RRT mov SavedPMStack[4], esi mov esi, Data3Selector mov es, esi mov esi, OffLockedStackBottom-12 mov [esi].IFrEIP, OffPassupIretLTrap3 $else jmp ENDIF sub PMStack, 12 RRT 1 les esi, fword ptr PMStack RRT mov es:[esi].IFrEIP, OffPassupIretTrap3 IFDEF VMM $endif ENDIF push es push esi pushfd push ds:ClientIDT[eax*8-(FirstPassupSwitchCode)*8].4 push ds:ClientIDT[eax*8-(FirstPassupSwitchCode)*8].0 mov eax, [esp].8 ;load default EFlags mov es:[esi].IFrCS, Trap3Selector mov ax, [ebp].RMS_Flags and ah, not 40h ;start client with NT = 0 and IOPL = 3 or ah, 30h mov [esp].8, eax ;replace flags mov ax, word ptr [ebp+size RMSStruct].4 ;with flags from RM int stack frame mov es:[esi].IFrFlags, eax xor eax, eax mov esi, ss:[ebp].RMS_ESI ;mov ds, eax ;mov es, eax mov fs, eax mov gs, eax mov eax, ss:[ebp].RMS_EAX mov ebp, ss:[ebp].RMS_EBP iretd ENDP IFDEF VMM LLabel PassupIretLTrapH push ebp mov ebp, OffPMStack RRT pushfd cli push ss pop ds push eax mov eax, SavedPMStack mov ss:[ebp], eax mov eax, SavedPMStack[4] mov LockedMode, 0 jmp short PassupIretTrapE ENDIF DPROC PassupIretTrapH push ebp mov ebp, OffPMStack RRT pushfd cli push eax ;set client PMStack from PL1 stack bottom F = 3*4 mov eax, [esp+F].CFrESP mov ss:[ebp], eax mov eax, [esp+F].CFrSS push ss pop ds PassupIretTrapE: mov ss:[ebp].4, eax mov eax, RMStack RRT movzx ebp, ax dec bp sub ebp, size VMIStruct-12-1-10 ;jc RMStackFault shr eax, 16 push eax shl eax, 4 add eax, ebp pop [eax].VMI_SS add ebp, VMI_EAX mov [eax].VMI_ESP, ebp movzx ebp, [eax+VMI_IP-size RMSStruct].RMS_ES mov [eax].VMI_ES, ebp mov bp, [eax+VMI_IP-size RMSStruct].RMS_DS mov [eax].VMI_DS, ebp mov bp, [eax+VMI_IP-size RMSStruct].RMS_FS mov [eax].VMI_FS, ebp mov bp, [eax+VMI_IP-size RMSStruct].RMS_GS mov [eax].VMI_GS, ebp pop [eax].VMI_EAX pop ebp ;restore EFlags mov [eax].VMI_Flags, bp pop ebp ; add esp, 8 ;drop return address ; pop PMStack ;retore client stack base ; RRT ; pop PMStack[4] ; RRT VCPICallTrap ENDP ESeg Text
Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0xca_notsx.log_21829_1600.asm
ljhsiun2/medusa
9
2921
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r13 push %r14 push %r15 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0x9585, %rsi lea addresses_normal_ht+0x1cc6, %rdi nop nop nop dec %r15 mov $13, %rcx rep movsq nop nop nop dec %r13 lea addresses_normal_ht+0xb4c6, %rsi lea addresses_A_ht+0x8bc6, %rdi nop nop nop nop nop xor %rdx, %rdx mov $5, %rcx rep movsq nop nop nop nop nop mfence lea addresses_D_ht+0xc426, %rsi lea addresses_normal_ht+0x134c6, %rdi nop nop nop nop nop cmp %r13, %r13 mov $98, %rcx rep movsl nop nop nop cmp $7024, %rdi lea addresses_D_ht+0xd0c2, %r15 clflush (%r15) nop sub %rbx, %rbx mov (%r15), %di cmp %r13, %r13 lea addresses_A_ht+0x186de, %rsi lea addresses_normal_ht+0xa234, %rdi clflush (%rdi) nop nop add $65053, %r14 mov $26, %rcx rep movsw xor $53373, %r15 lea addresses_normal_ht+0x15629, %rdx cmp %rbx, %rbx mov $0x6162636465666768, %r14 movq %r14, %xmm1 movups %xmm1, (%rdx) nop nop xor $20155, %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r15 pop %r14 pop %r13 ret .global s_faulty_load s_faulty_load: push %r12 push %r8 push %r9 push %rcx push %rsi // Faulty Load lea addresses_WT+0x1cc6, %rcx nop nop nop nop cmp $17298, %r9 mov (%rcx), %rsi lea oracles, %r12 and $0xff, %rsi shlq $12, %rsi mov (%r12,%rsi,1), %rsi pop %rsi pop %rcx pop %r9 pop %r8 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_WT', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': True, 'type': 'addresses_WT', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}} {'src': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}} {'src': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}} {'src': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False}} {'39': 21829} 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 */
third_party/libvpx/source/libvpx/vp8/encoder/x86/quantize_sse2.asm
roisagiv/webrtc-ios
1
9192
<reponame>roisagiv/webrtc-ios ; ; Copyright (c) 2010 The WebM project authors. All Rights Reserved. ; ; Use of this source code is governed by a BSD-style license and patent ; grant that can be found in the LICENSE file in the root of the source ; tree. All contributing project authors may be found in the AUTHORS ; file in the root of the source tree. ; %include "vpx_ports/x86_abi_support.asm" ;int vp8_regular_quantize_b_impl_sse2( ; short *coeff_ptr, ; short *zbin_ptr, ; short *qcoeff_ptr, ; short *dequant_ptr, ; const int *default_zig_zag, ; short *round_ptr, ; short *quant_ptr, ; short *dqcoeff_ptr, ; unsigned short zbin_oq_value, ; short *zbin_boost_ptr, ; short *quant_shift); ; global sym(vp8_regular_quantize_b_impl_sse2) sym(vp8_regular_quantize_b_impl_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 11 SAVE_XMM push rsi push rdi push rbx ALIGN_STACK 16, rax %define abs_minus_zbin 0 %define temp_qcoeff 32 %define qcoeff 64 %define eob_tmp 96 %define stack_size 112 sub rsp, stack_size ; end prolog mov rdx, arg(0) ; coeff_ptr mov rcx, arg(1) ; zbin_ptr movd xmm7, arg(8) ; zbin_oq_value mov rdi, arg(5) ; round_ptr mov rsi, arg(6) ; quant_ptr ; z movdqa xmm0, OWORD PTR[rdx] movdqa xmm4, OWORD PTR[rdx + 16] pshuflw xmm7, xmm7, 0 punpcklwd xmm7, xmm7 ; duplicated zbin_oq_value movdqa xmm1, xmm0 movdqa xmm5, xmm4 ; sz psraw xmm0, 15 psraw xmm4, 15 ; (z ^ sz) pxor xmm1, xmm0 pxor xmm5, xmm4 ; x = abs(z) psubw xmm1, xmm0 psubw xmm5, xmm4 movdqa xmm2, OWORD PTR[rcx] movdqa xmm3, OWORD PTR[rcx + 16] ; *zbin_ptr + zbin_oq_value paddw xmm2, xmm7 paddw xmm3, xmm7 ; x - (*zbin_ptr + zbin_oq_value) psubw xmm1, xmm2 psubw xmm5, xmm3 movdqa OWORD PTR[rsp + abs_minus_zbin], xmm1 movdqa OWORD PTR[rsp + abs_minus_zbin + 16], xmm5 ; add (zbin_ptr + zbin_oq_value) back paddw xmm1, xmm2 paddw xmm5, xmm3 movdqa xmm2, OWORD PTR[rdi] movdqa xmm6, OWORD PTR[rdi + 16] movdqa xmm3, OWORD PTR[rsi] movdqa xmm7, OWORD PTR[rsi + 16] ; x + round paddw xmm1, xmm2 paddw xmm5, xmm6 ; y = x * quant_ptr >> 16 pmulhw xmm3, xmm1 pmulhw xmm7, xmm5 ; y += x paddw xmm1, xmm3 paddw xmm5, xmm7 movdqa OWORD PTR[rsp + temp_qcoeff], xmm1 movdqa OWORD PTR[rsp + temp_qcoeff + 16], xmm5 pxor xmm6, xmm6 ; zero qcoeff movdqa OWORD PTR[rsp + qcoeff], xmm6 movdqa OWORD PTR[rsp + qcoeff + 16], xmm6 mov [rsp + eob_tmp], DWORD -1 ; eob mov rsi, arg(9) ; zbin_boost_ptr mov rdi, arg(4) ; default_zig_zag mov rax, arg(10) ; quant_shift_ptr %macro ZIGZAG_LOOP 2 rq_zigzag_loop_%1: movsxd rdx, DWORD PTR[rdi + (%1 * 4)] ; rc movsx ebx, WORD PTR [rsi] ; *zbin_boost_ptr lea rsi, [rsi + 2] ; zbin_boost_ptr++ ; x movsx ecx, WORD PTR[rsp + abs_minus_zbin + rdx *2] ; if (x >= zbin) sub ecx, ebx ; x - zbin jl rq_zigzag_loop_%2 ; x < zbin movsx ebx, WORD PTR[rsp + temp_qcoeff + rdx *2] ; downshift by quant_shift[rdx] movsx ecx, WORD PTR[rax + rdx*2] ; quant_shift_ptr[rc] sar ebx, cl ; also sets Z bit je rq_zigzag_loop_%2 ; !y mov WORD PTR[rsp + qcoeff + rdx * 2], bx ;qcoeff_ptr[rc] = temp_qcoeff[rc] mov rsi, arg(9) ; reset to b->zrun_zbin_boost mov [rsp + eob_tmp], DWORD %1 ; eob = i %endmacro ZIGZAG_LOOP 0, 1 ZIGZAG_LOOP 1, 2 ZIGZAG_LOOP 2, 3 ZIGZAG_LOOP 3, 4 ZIGZAG_LOOP 4, 5 ZIGZAG_LOOP 5, 6 ZIGZAG_LOOP 6, 7 ZIGZAG_LOOP 7, 8 ZIGZAG_LOOP 8, 9 ZIGZAG_LOOP 9, 10 ZIGZAG_LOOP 10, 11 ZIGZAG_LOOP 11, 12 ZIGZAG_LOOP 12, 13 ZIGZAG_LOOP 13, 14 ZIGZAG_LOOP 14, 15 ZIGZAG_LOOP 15, end rq_zigzag_loop_end: mov rbx, arg(2) ; qcoeff_ptr mov rcx, arg(3) ; dequant_ptr mov rsi, arg(7) ; dqcoeff_ptr mov rax, [rsp + eob_tmp] ; eob movdqa xmm2, OWORD PTR[rsp + qcoeff] movdqa xmm3, OWORD PTR[rsp + qcoeff + 16] ; y ^ sz pxor xmm2, xmm0 pxor xmm3, xmm4 ; x = (y ^ sz) - sz psubw xmm2, xmm0 psubw xmm3, xmm4 movdqa xmm0, OWORD PTR[rcx] movdqa xmm1, OWORD PTR[rcx + 16] pmullw xmm0, xmm2 pmullw xmm1, xmm3 movdqa OWORD PTR[rbx], xmm2 movdqa OWORD PTR[rbx + 16], xmm3 movdqa OWORD PTR[rsi], xmm0 ; store dqcoeff movdqa OWORD PTR[rsi + 16], xmm1 ; store dqcoeff add rax, 1 ; begin epilog add rsp, stack_size pop rsp pop rbx pop rdi pop rsi RESTORE_XMM UNSHADOW_ARGS pop rbp ret ;int vp8_fast_quantize_b_impl_sse2(short *coeff_ptr, ; short *qcoeff_ptr,short *dequant_ptr, ; short *inv_scan_order, short *round_ptr, ; short *quant_ptr, short *dqcoeff_ptr); global sym(vp8_fast_quantize_b_impl_sse2) sym(vp8_fast_quantize_b_impl_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 push rsi push rdi ; end prolog mov rdx, arg(0) ;coeff_ptr mov rcx, arg(2) ;dequant_ptr mov rdi, arg(4) ;round_ptr mov rsi, arg(5) ;quant_ptr movdqa xmm0, XMMWORD PTR[rdx] movdqa xmm4, XMMWORD PTR[rdx + 16] movdqa xmm2, XMMWORD PTR[rdi] ;round lo movdqa xmm3, XMMWORD PTR[rdi + 16] ;round hi movdqa xmm1, xmm0 movdqa xmm5, xmm4 psraw xmm0, 15 ;sign of z (aka sz) psraw xmm4, 15 ;sign of z (aka sz) pxor xmm1, xmm0 pxor xmm5, xmm4 psubw xmm1, xmm0 ;x = abs(z) psubw xmm5, xmm4 ;x = abs(z) paddw xmm1, xmm2 paddw xmm5, xmm3 pmulhw xmm1, XMMWORD PTR[rsi] pmulhw xmm5, XMMWORD PTR[rsi + 16] mov rdi, arg(1) ;qcoeff_ptr mov rsi, arg(6) ;dqcoeff_ptr movdqa xmm2, XMMWORD PTR[rcx] movdqa xmm3, XMMWORD PTR[rcx + 16] pxor xmm1, xmm0 pxor xmm5, xmm4 psubw xmm1, xmm0 psubw xmm5, xmm4 movdqa XMMWORD PTR[rdi], xmm1 movdqa XMMWORD PTR[rdi + 16], xmm5 pmullw xmm2, xmm1 pmullw xmm3, xmm5 mov rdi, arg(3) ;inv_scan_order ; Start with 16 pxor xmm4, xmm4 ;clear all bits pcmpeqw xmm1, xmm4 pcmpeqw xmm5, xmm4 pcmpeqw xmm4, xmm4 ;set all bits pxor xmm1, xmm4 pxor xmm5, xmm4 pand xmm1, XMMWORD PTR[rdi] pand xmm5, XMMWORD PTR[rdi+16] pmaxsw xmm1, xmm5 ; now down to 8 pshufd xmm5, xmm1, 00001110b pmaxsw xmm1, xmm5 ; only 4 left pshuflw xmm5, xmm1, 00001110b pmaxsw xmm1, xmm5 ; okay, just 2! pshuflw xmm5, xmm1, 00000001b pmaxsw xmm1, xmm5 movd rax, xmm1 and rax, 0xff movdqa XMMWORD PTR[rsi], xmm2 ;store dqcoeff movdqa XMMWORD PTR[rsi + 16], xmm3 ;store dqcoeff ; begin epilog pop rdi pop rsi UNSHADOW_ARGS pop rbp ret
openapi-client/ada/src/model/-models.ads
interserver/mailbaby-api-samples
0
14446
<gh_stars>0 -- Mail Baby API -- This is an API defintion for accesssing the Mail.Baby mail service. -- -- The version of the OpenAPI document: 1.0.0 -- Contact: <EMAIL> -- -- NOTE: This package is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -- https://openapi-generator.tech -- Do not edit the class manually. with Swagger.Streams; with Ada.Containers.Vectors; package .Models is pragma Style_Checks ("-mr"); type SendMailAdvFrom_Type is record Email : Swagger.UString; Name : Swagger.Nullable_UString; end record; package SendMailAdvFrom_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => SendMailAdvFrom_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in SendMailAdvFrom_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in SendMailAdvFrom_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out SendMailAdvFrom_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out SendMailAdvFrom_Type_Vectors.Vector); type MailLog_Type is record Id : Swagger.Nullable_Long; end record; package MailLog_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => MailLog_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in MailLog_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in MailLog_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out MailLog_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out MailLog_Type_Vectors.Vector); type GenericResponse_Type is record Status : Swagger.Nullable_UString; Text : Swagger.Nullable_UString; end record; package GenericResponse_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => GenericResponse_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in GenericResponse_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in GenericResponse_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out GenericResponse_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out GenericResponse_Type_Vectors.Vector); type ErrorResponse_Type is record Code : Swagger.UString; Message : Swagger.UString; end record; package ErrorResponse_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => ErrorResponse_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in ErrorResponse_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in ErrorResponse_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out ErrorResponse_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out ErrorResponse_Type_Vectors.Vector); type MailOrder_Type is record Id : Integer; Status : Swagger.UString; Username : Swagger.UString; Password : Swagger.Nullable_UString; Comment : Swagger.Nullable_UString; end record; package MailOrder_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => MailOrder_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in MailOrder_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in MailOrder_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out MailOrder_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out MailOrder_Type_Vectors.Vector); type MailContact_Type is record Email : Swagger.UString; Name : Swagger.Nullable_UString; end record; package MailContact_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => MailContact_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in MailContact_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in MailContact_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out MailContact_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out MailContact_Type_Vectors.Vector); type SendMail_Type is record To : Swagger.UString; From : Swagger.UString; Subject : Swagger.UString; P_Body : Swagger.UString; end record; package SendMail_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => SendMail_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in SendMail_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in SendMail_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out SendMail_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out SendMail_Type_Vectors.Vector); type InlineResponse401_Type is record Code : Swagger.UString; Message : Swagger.UString; end record; package InlineResponse401_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => InlineResponse401_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in InlineResponse401_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in InlineResponse401_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out InlineResponse401_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out InlineResponse401_Type_Vectors.Vector); type MailAttachment_Type is record Data : Swagger.Http_Content_Type; Filename : Swagger.Nullable_UString; end record; package MailAttachment_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => MailAttachment_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in MailAttachment_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in MailAttachment_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out MailAttachment_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out MailAttachment_Type_Vectors.Vector); -- ------------------------------ -- Email details -- Details for an Email -- ------------------------------ type SendMailAdv_Type is record Subject : Swagger.UString; P_Body : Swagger.UString; From : .Models.SendMailAdvFrom_Type_Vectors.Vector; To : .Models.MailContact_Type_Vectors.Vector; Id : Swagger.Long; Replyto : .Models.MailContact_Type_Vectors.Vector; Cc : .Models.MailContact_Type_Vectors.Vector; Bcc : .Models.MailContact_Type_Vectors.Vector; Attachments : .Models.MailAttachment_Type_Vectors.Vector; end record; package SendMailAdv_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => SendMailAdv_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in SendMailAdv_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in SendMailAdv_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out SendMailAdv_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out SendMailAdv_Type_Vectors.Vector); end .Models;
oeis/305/A305163.asm
neoneye/loda-programs
11
98105
; A305163: a(n) = 24*2^n - 18. ; 6,30,78,174,366,750,1518,3054,6126,12270,24558,49134,98286,196590,393198,786414,1572846,3145710,6291438,12582894,25165806,50331630,100663278,201326574,402653166,805306350,1610612718,3221225454,6442450926,12884901870,25769803758,51539607534,103079215086,206158430190,412316860398,824633720814,1649267441646,3298534883310,6597069766638,13194139533294,26388279066606,52776558133230,105553116266478,211106232532974,422212465065966,844424930131950,1688849860263918,3377699720527854,6755399441055726 mov $1,2 pow $1,$0 sub $1,1 mul $1,24 add $1,6 mov $0,$1
FormalAnalyzer/models/apps/StatusThing.als
Mohannadcse/IoTCOM_BehavioralRuleExtractor
0
751
module app_StatusThing open IoTBottomUp as base open cap_runIn open cap_now open cap_switch open cap_temperatureMeasurement open cap_thermostat one sig app_StatusThing extends IoTApp { switches : set cap_switch, temperatures : some cap_temperatureMeasurement, thermostats : some cap_thermostat, } { rules = r //capabilities = switches + temperatures + thermostats } abstract sig r extends Rule {}
Transynther/x86/_processed/NONE/_zr_xt_/i3-7100_9_0x84_notsx.log_21829_281.asm
ljhsiun2/medusa
9
105167
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r14 push %r15 push %rax push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_WC_ht+0x26a9, %rax cmp %rdx, %rdx and $0xffffffffffffffc0, %rax movntdqa (%rax), %xmm1 vpextrq $1, %xmm1, %r12 nop nop nop nop cmp %r15, %r15 lea addresses_WT_ht+0x1ecf9, %rax nop nop nop nop nop dec %rbp mov $0x6162636465666768, %r15 movq %r15, %xmm1 vmovups %ymm1, (%rax) sub %rax, %rax lea addresses_A_ht+0x106c1, %r12 nop nop nop nop nop and $47156, %rax movb (%r12), %dl nop mfence lea addresses_normal_ht+0x12469, %rdi nop inc %r14 mov (%rdi), %ax nop add %r15, %r15 lea addresses_normal_ht+0x13aa9, %rdx clflush (%rdx) nop nop nop sub %rdi, %rdi mov $0x6162636465666768, %rbp movq %rbp, %xmm6 vmovups %ymm6, (%rdx) nop nop nop nop sub $37884, %rdi lea addresses_WT_ht+0xe6a9, %r15 nop nop nop nop xor %rdi, %rdi movb (%r15), %r14b nop nop nop cmp %rdx, %rdx lea addresses_D_ht+0x178a9, %r15 nop nop nop nop nop cmp %rbp, %rbp mov $0x6162636465666768, %rax movq %rax, (%r15) nop nop nop cmp $54869, %rax lea addresses_normal_ht+0x66a9, %rsi lea addresses_WC_ht+0x1d075, %rdi nop nop nop nop xor %r12, %r12 mov $94, %rcx rep movsw inc %rdx lea addresses_D_ht+0x14e29, %rsi lea addresses_normal_ht+0xa6a9, %rdi nop nop nop nop dec %rdx mov $30, %rcx rep movsb nop nop nop nop nop and $6881, %rdi lea addresses_A_ht+0x9fd4, %r15 nop nop nop nop nop cmp $57614, %r14 movw $0x6162, (%r15) nop nop sub $48751, %rcx lea addresses_A_ht+0x122a9, %r15 xor $10566, %rbp mov (%r15), %rsi nop nop nop dec %r14 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %rax pop %r15 pop %r14 pop %r12 ret .global s_faulty_load s_faulty_load: push %r15 push %r8 push %r9 push %rax push %rbx push %rdi push %rsi // Load lea addresses_A+0x70a9, %rdi sub %rsi, %rsi mov (%rdi), %rax nop sub %r8, %r8 // Store lea addresses_WT+0x1f108, %rax clflush (%rax) nop nop nop nop inc %rsi mov $0x5152535455565758, %r15 movq %r15, (%rax) nop nop sub %r8, %r8 // Store lea addresses_A+0xfaed, %rdi nop xor %rbx, %rbx mov $0x5152535455565758, %r15 movq %r15, %xmm5 movups %xmm5, (%rdi) nop nop nop nop and %rsi, %rsi // Store lea addresses_WC+0x1a531, %r15 clflush (%r15) nop nop xor $2659, %rbx mov $0x5152535455565758, %r9 movq %r9, %xmm2 movups %xmm2, (%r15) nop nop nop nop add %rbx, %rbx // Store lea addresses_D+0x11ad, %rsi nop nop nop nop nop sub %rbx, %rbx movw $0x5152, (%rsi) nop nop nop nop nop add $10282, %r8 // Store lea addresses_A+0x142e5, %rax nop nop nop nop cmp %r15, %r15 movl $0x51525354, (%rax) cmp $25938, %r15 // Store lea addresses_WC+0x1ea9, %r8 nop nop dec %rbx mov $0x5152535455565758, %rax movq %rax, (%r8) nop sub $57907, %r8 // Store lea addresses_WC+0x12129, %r8 nop nop nop and %rsi, %rsi mov $0x5152535455565758, %rax movq %rax, (%r8) nop nop nop nop nop sub %rdi, %rdi // Faulty Load lea addresses_A+0x13aa9, %r9 nop nop nop nop add $4709, %rax movups (%r9), %xmm6 vpextrq $1, %xmm6, %rsi lea oracles, %r8 and $0xff, %rsi shlq $12, %rsi mov (%r8,%rsi,1), %rsi pop %rsi pop %rdi pop %rbx pop %rax pop %r9 pop %r8 pop %r15 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_A', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A', 'same': False, 'size': 8, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_A', 'same': False, 'size': 16, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WC', 'same': False, 'size': 16, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_D', 'same': False, 'size': 2, 'congruent': 2, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'dst': {'type': 'addresses_A', 'same': False, 'size': 4, 'congruent': 2, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WC', 'same': False, 'size': 8, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WC', 'same': False, 'size': 8, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_A', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 16, 'congruent': 9, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 1, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 2, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 32, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 1, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 8, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 8, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'00': 1, '35': 21828} 00 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 */
profiles/index-uses-slice-not-map-add-near-count-func/2020-01-14_12-31-03/cpu.asm
erichgess/wordladder
0
21708
<filename>profiles/index-uses-slice-not-map-add-near-count-func/2020-01-14_12-31-03/cpu.asm Total: 7.07s ROUTINE ======================== main.(*Graph).buildAdjList 640ms 2.60s (flat, cum) 36.78% of Total . . 10ca200: MOVQ GS:0x30, CX ;graph.go:101 . . 10ca209: LEAQ -0x60(SP), AX . . 10ca20e: CMPQ 0x10(CX), AX . . 10ca212: JBE 0x10ca6be . . 10ca218: SUBQ $0xe0, SP . . 10ca21f: MOVQ BP, 0xd8(SP) . . 10ca227: LEAQ 0xd8(SP), BP . . 10ca22f: XORL AX, AX . . 10ca231: XORL CX, CX . . 10ca233: JMP 0x10ca4df ;graph.go:103 10ms 10ms 10ca238: MOVQ 0x88(SP), R10 ;main.(*Graph).buildAdjList graph.go:109 . . 10ca240: LEAQ 0x1(R10), R9 ;graph.go:109 . . 10ca244: MOVQ 0x78(SP), R10 . . 10ca249: MOVQ 0x70(SP), R11 . . 10ca24e: MOVQ 0x98(SP), R12 . . 10ca256: MOVQ 0x68(SP), R13 . . 10ca25b: MOVQ 0xc0(SP), R14 . . 10ca263: MOVQ R10, AX . . 10ca266: MOVQ 0x50(SP), CX ;graph.go:106 . . 10ca26b: MOVQ R11, DX ;graph.go:110 . . 10ca26e: MOVQ 0xe8(SP), BX . . 10ca276: MOVQ R12, SI . . 10ca279: MOVQ R13, DI . . 10ca27c: MOVQ R14, R8 ;graph.go:109 . . 10ca27f: CMPQ AX, R9 . . 10ca282: JGE 0x10ca4d6 540ms 540ms 10ca288: MOVQ 0(R8)(R9*8), R10 ;main.(*Graph).buildAdjList graph.go:109 . . 10ca28c: MOVQ 0x8(BX), R11 ;graph.go:110 . . 10ca290: MOVQ 0(BX), R12 . . 10ca293: CMPQ R11, R10 . . 10ca296: JAE 0x10ca6b2 . . 10ca29c: MOVQ R9, 0x88(SP) ;graph.go:109 . . 10ca2a4: MOVQ R10, 0x58(SP) . . 10ca2a9: LEAQ 0(R10)(R10*2), AX ;graph.go:110 . . 10ca2ad: MOVQ AX, 0x80(SP) . . 10ca2b5: MOVQ 0(R12)(AX*8), CX 30ms 30ms 10ca2b9: MOVQ 0x10(R12)(AX*8), BX ;main.(*Graph).buildAdjList graph.go:110 . . 10ca2be: MOVQ 0x8(R12)(AX*8), R8 ;graph.go:110 . . 10ca2c3: MOVQ SI, 0(SP) . . 10ca2c7: MOVQ DI, 0x8(SP) . . 10ca2cc: MOVQ DX, 0x10(SP) . . 10ca2d1: MOVQ CX, 0x18(SP) . . 10ca2d6: MOVQ R8, 0x20(SP) . . 10ca2db: MOVQ BX, 0x28(SP) . 120ms 10ca2e0: CALL main.distance(SB) ;main.(*Graph).buildAdjList graph.go:110 . . 10ca2e5: CMPQ $0x1, 0x30(SP) ;graph.go:110 20ms 20ms 10ca2eb: JNE 0x10ca4bc ;main.(*Graph).buildAdjList graph.go:110 . . 10ca2f1: MOVQ 0xe8(SP), DX ;graph.go:111 10ms 10ms 10ca2f9: MOVQ 0x18(DX), BX ;main.(*Graph).buildAdjList graph.go:111 . . 10ca2fd: MOVQ 0x20(DX), CX ;graph.go:111 . . 10ca301: MOVQ 0x60(SP), AX . . 10ca306: CMPQ CX, AX . . 10ca309: JAE 0x10ca6ad . . 10ca30f: MOVQ 0x90(SP), SI . . 10ca317: MOVQ 0x10(BX)(SI*8), DI . . 10ca31c: MOVQ 0x8(BX)(SI*8), R8 . . 10ca321: MOVQ 0(BX)(SI*8), R9 . . 10ca325: LEAQ 0x1(R8), R10 . . 10ca329: LEAQ 0(BX)(SI*8), R11 . . 10ca32d: CMPQ DI, R10 . . 10ca330: JA 0x10ca425 . . 10ca336: LEAQ 0x1(R8), DI . . 10ca33a: MOVQ DI, 0x8(BX)(SI*8) . . 10ca33f: MOVQ 0x58(SP), BX . . 10ca344: MOVQ BX, 0(R9)(R8*8) . . 10ca348: MOVQ 0x20(DX), CX ;graph.go:112 . . 10ca34c: MOVQ 0x18(DX), DI . . 10ca350: CMPQ CX, BX . . 10ca353: JAE 0x10ca6a5 . . 10ca359: MOVQ 0x80(SP), BX . . 10ca361: MOVQ 0(DI)(BX*8), R8 . . 10ca365: MOVQ 0x10(DI)(BX*8), R9 10ms 10ms 10ca36a: MOVQ 0x8(DI)(BX*8), R10 ;main.(*Graph).buildAdjList graph.go:112 . . 10ca36f: LEAQ 0x1(R10), R11 ;graph.go:112 . . 10ca373: LEAQ 0(DI)(BX*8), R12 . . 10ca377: CMPQ R9, R11 . . 10ca37a: JA 0x10ca38e . . 10ca37c: LEAQ 0x1(R10), R9 . . 10ca380: MOVQ R9, 0x8(DI)(BX*8) . . 10ca385: MOVQ AX, 0(R8)(R10*8) 10ms 10ms 10ca389: JMP 0x10ca238 ;main.(*Graph).buildAdjList graph.go:112 . . 10ca38e: MOVQ R12, 0xb8(SP) ;graph.go:112 . . 10ca396: MOVQ DI, 0xb0(SP) . . 10ca39e: LEAQ runtime.types+85760(SB), AX . . 10ca3a5: MOVQ AX, 0(SP) . . 10ca3a9: MOVQ R8, 0x8(SP) . . 10ca3ae: MOVQ R10, 0x10(SP) . . 10ca3b3: MOVQ R9, 0x18(SP) . . 10ca3b8: MOVQ R11, 0x20(SP) . 210ms 10ca3bd: CALL runtime.growslice(SB) ;main.(*Graph).buildAdjList graph.go:112 . . 10ca3c2: MOVQ 0x28(SP), AX ;graph.go:112 . . 10ca3c7: MOVQ 0x30(SP), CX . . 10ca3cc: MOVQ 0x38(SP), DX . . 10ca3d1: MOVQ 0x80(SP), BX . . 10ca3d9: MOVQ 0xb0(SP), SI . . 10ca3e1: MOVQ DX, 0x10(SI)(BX*8) . . 10ca3e6: CMPL $0x0, runtime.writeBarrier(SB) . . 10ca3ed: JNE 0x10ca416 . . 10ca3ef: MOVQ AX, 0(SI)(BX*8) . . 10ca3f3: MOVQ 0xe8(SP), DX ;graph.go:110 . . 10ca3fb: MOVQ SI, DI ;graph.go:112 . . 10ca3fe: MOVQ CX, R10 . . 10ca401: MOVQ AX, R8 . . 10ca404: MOVQ 0x60(SP), AX . . 10ca409: MOVQ 0x90(SP), SI ;graph.go:111 . . 10ca411: JMP 0x10ca37c ;graph.go:112 . . 10ca416: MOVQ 0xb8(SP), DI . . 10ca41e: CALL runtime.gcWriteBarrier(SB) . . 10ca423: JMP 0x10ca3f3 . . 10ca425: MOVQ BX, 0xa8(SP) ;graph.go:111 . . 10ca42d: MOVQ R11, 0xa0(SP) . . 10ca435: LEAQ runtime.types+85760(SB), AX . . 10ca43c: MOVQ AX, 0(SP) . . 10ca440: MOVQ R9, 0x8(SP) . . 10ca445: MOVQ R8, 0x10(SP) . . 10ca44a: MOVQ DI, 0x18(SP) . . 10ca44f: MOVQ R10, 0x20(SP) . 260ms 10ca454: CALL runtime.growslice(SB) ;main.(*Graph).buildAdjList graph.go:111 . . 10ca459: MOVQ 0x28(SP), AX ;graph.go:111 . . 10ca45e: MOVQ 0x30(SP), CX . . 10ca463: MOVQ 0x38(SP), DX . . 10ca468: MOVQ 0x90(SP), BX . . 10ca470: MOVQ 0xa8(SP), SI . . 10ca478: MOVQ DX, 0x10(SI)(BX*8) . . 10ca47d: CMPL $0x0, runtime.writeBarrier(SB) . . 10ca484: JNE 0x10ca4ad . . 10ca486: MOVQ AX, 0(SI)(BX*8) . . 10ca48a: MOVQ 0xe8(SP), DX ;graph.go:112 . . 10ca492: MOVQ SI, BX ;graph.go:111 . . 10ca495: MOVQ 0x90(SP), SI . . 10ca49d: MOVQ CX, R8 . . 10ca4a0: MOVQ AX, R9 . . 10ca4a3: MOVQ 0x60(SP), AX ;graph.go:112 . . 10ca4a8: JMP 0x10ca336 ;graph.go:111 . . 10ca4ad: MOVQ 0xa0(SP), DI . . 10ca4b5: CALL runtime.gcWriteBarrier(SB) . . 10ca4ba: JMP 0x10ca48a . . 10ca4bc: MOVQ 0x60(SP), AX ;graph.go:103 . . 10ca4c1: MOVQ 0xe8(SP), DX ;graph.go:110 . . 10ca4c9: MOVQ 0x90(SP), SI ;graph.go:111 . . 10ca4d1: JMP 0x10ca238 ;graph.go:109 . . 10ca4d6: MOVQ 0x60(SP), DX ;graph.go:103 . . 10ca4db: LEAQ 0x1(DX), AX . . 10ca4df: MOVQ 0xe8(SP), DX . . 10ca4e7: MOVQ 0x8(DX), BX . . 10ca4eb: MOVQ 0(DX), SI . . 10ca4ee: CMPQ BX, AX . . 10ca4f1: JGE 0x10ca600 . . 10ca4f7: MOVQ AX, 0x60(SP) . . 10ca4fc: MOVQ CX, 0x50(SP) ;graph.go:106 . . 10ca501: LEAQ 0(AX)(AX*2), CX ;graph.go:104 . . 10ca505: MOVQ CX, 0x90(SP) . . 10ca50d: MOVQ 0x10(SI)(CX*8), DX . . 10ca512: MOVQ DX, 0x70(SP) . . 10ca517: MOVQ 0x8(SI)(CX*8), BX . . 10ca51c: MOVQ BX, 0x68(SP) . . 10ca521: MOVQ 0(SI)(CX*8), SI . . 10ca525: MOVQ SI, 0x98(SP) . . 10ca52d: MOVQ 0xf0(SP), DI ;graph.go:105 . . 10ca535: MOVQ DI, 0(SP) . . 10ca539: MOVQ SI, 0x8(SP) . . 10ca53e: MOVQ BX, 0x10(SP) . . 10ca543: MOVQ DX, 0x18(SP) . 380ms 10ca548: CALL main.(*index).nearCount(SB) ;main.(*Graph).buildAdjList graph.go:105 . . 10ca54d: MOVQ 0x20(SP), AX ;graph.go:105 . . 10ca552: MOVQ AX, 0x78(SP) 10ms 10ms 10ca557: LEAQ runtime.types+85760(SB), CX ;main.(*Graph).buildAdjList graph.go:107 . . 10ca55e: MOVQ CX, 0(SP) ;graph.go:107 . . 10ca562: MOVQ AX, 0x8(SP) . . 10ca567: MOVQ AX, 0x10(SP) . 140ms 10ca56c: CALL runtime.makeslice(SB) ;main.(*Graph).buildAdjList graph.go:107 . . 10ca571: MOVQ 0x18(SP), AX ;graph.go:107 . . 10ca576: MOVQ AX, 0xc0(SP) . . 10ca57e: MOVQ 0xf0(SP), CX ;graph.go:108 . . 10ca586: MOVQ CX, 0(SP) . . 10ca58a: MOVQ 0x98(SP), DX . . 10ca592: MOVQ DX, 0x8(SP) . . 10ca597: MOVQ 0x68(SP), BX . . 10ca59c: MOVQ BX, 0x10(SP) . . 10ca5a1: MOVQ 0x70(SP), SI . . 10ca5a6: MOVQ SI, 0x18(SP) . . 10ca5ab: MOVQ AX, 0x20(SP) . . 10ca5b0: MOVQ 0x78(SP), DI . . 10ca5b5: MOVQ DI, 0x28(SP) . . 10ca5ba: MOVQ DI, 0x30(SP) . 850ms 10ca5bf: CALL main.(*index).near(SB) ;main.(*Graph).buildAdjList graph.go:108 . . 10ca5c4: MOVQ 0x78(SP), AX ;graph.go:106 . . 10ca5c9: MOVQ 0x50(SP), CX . . 10ca5ce: ADDQ AX, CX . . 10ca5d1: MOVQ CX, 0x50(SP) . . 10ca5d6: MOVQ 0x70(SP), DX ;graph.go:109 . . 10ca5db: MOVQ 0xe8(SP), BX . . 10ca5e3: MOVQ 0x98(SP), SI . . 10ca5eb: MOVQ 0x68(SP), DI . . 10ca5f0: MOVQ 0xc0(SP), R8 . . 10ca5f8: XORL R9, R9 . . 10ca5fb: JMP 0x10ca27f . . 10ca600: XORPS X0, X0 ;graph.go:116 . . 10ca603: CVTSI2SDQ CX, X0 . . 10ca608: XORPS X1, X1 . . 10ca60b: CVTSI2SDQ BX, X1 . . 10ca610: DIVSD X1, X0 . . 10ca614: MOVSD_XMM X0, 0(SP) . . 10ca619: CALL runtime.convT64(SB) . . 10ca61e: MOVQ 0x8(SP), AX . . 10ca623: XORPS X0, X0 . . 10ca626: MOVUPS X0, 0xc8(SP) . . 10ca62e: LEAQ runtime.types+84032(SB), CX . . 10ca635: MOVQ CX, 0xc8(SP) . . 10ca63d: MOVQ AX, 0xd0(SP) . . 10ca645: MOVQ os.Stdout(SB), AX ;print.go:213 . . 10ca64c: LEAQ go.itab.*os.File,io.Writer(SB), CX . . 10ca653: MOVQ CX, 0(SP) . . 10ca657: MOVQ AX, 0x8(SP) . . 10ca65c: LEAQ go.string.*+3228(SB), AX . . 10ca663: MOVQ AX, 0x10(SP) . . 10ca668: MOVQ $0xa, 0x18(SP) . . 10ca671: LEAQ 0xc8(SP), AX . . 10ca679: MOVQ AX, 0x20(SP) . . 10ca67e: MOVQ $0x1, 0x28(SP) . . 10ca687: MOVQ $0x1, 0x30(SP) . . 10ca690: CALL fmt.Fprintf(SB) . . 10ca695: MOVQ 0xd8(SP), BP . . 10ca69d: ADDQ $0xe0, SP . . 10ca6a4: RET . . 10ca6a5: MOVQ BX, AX ;graph.go:112 . . 10ca6a8: CALL runtime.panicIndex(SB) . . 10ca6ad: CALL runtime.panicIndex(SB) ;graph.go:111 . . 10ca6b2: MOVQ R10, AX ;graph.go:110 . . 10ca6b5: MOVQ R11, CX . . 10ca6b8: CALL runtime.panicIndex(SB) . . 10ca6bd: NOPL . . 10ca6be: CALL runtime.morestack_noctxt(SB) ;graph.go:101 . . 10ca6c3: JMP main.(*Graph).buildAdjList(SB) . . 10ca6c8: INT $0x3 . . 10ca6c9: INT $0x3 . . 10ca6ca: INT $0x3 . . 10ca6cb: INT $0x3 . . 10ca6cc: INT $0x3 . . 10ca6cd: INT $0x3 . . 10ca6ce: INT $0x3 ROUTINE ======================== main.(*index).add 290ms 1.01s (flat, cum) 14.29% of Total . . 10cbdc0: MOVQ GS:0x30, CX ;index.go:29 . . 10cbdc9: LEAQ -0x18(SP), AX . . 10cbdce: CMPQ 0x10(CX), AX . . 10cbdd2: JBE 0x10cc0c6 . . 10cbdd8: SUBQ $0x98, SP . . 10cbddf: MOVQ BP, 0x90(SP) . . 10cbde7: LEAQ 0x90(SP), BP . . 10cbdef: MOVQ 0xa0(SP), BX ;index.go:32 . . 10cbdf7: MOVQ 0x38(BX), DX . . 10cbdfb: MOVQ 0x28(BX), SI . . 10cbdff: MOVQ 0xb8(SP), DI . . 10cbe07: LEAQ -0x1(DI), CX . . 10cbe0b: CMPQ DX, CX . . 10cbe0e: JA 0x10cc0c0 . . 10cbe14: MOVQ CX, 0x58(SP) . . 10cbe19: MOVQ DX, 0x50(SP) . . 10cbe1e: MOVQ SI, 0x78(SP) . . 10cbe23: MOVQ 0xb0(SP), R8 ;index.go:33 . . 10cbe2b: XORL AX, AX . . 10cbe2d: JMP 0x10cbe82 . . 10cbe2f: LEAQ 0x1(R8), R10 ;index.go:39 . . 10cbe33: MOVQ R10, 0x8(BX)(SI*8) 10ms 10ms 10cbe38: MOVQ 0xa8(SP), R10 ;main.(*index).add index.go:39 . . 10cbe40: MOVQ R10, 0(R9)(R8*8) ;index.go:39 10ms 10ms 10cbe44: MOVQ 0x78(SP), R9 ;main.(*index).add index.go:33 . . 10cbe49: MOVQ 0x50(SP), R11 ;index.go:33 . . 10cbe4e: MOVQ 0x58(SP), R12 . . 10cbe53: MOVQ 0xb8(SP), R13 . . 10cbe5b: MOVQ 0xb0(SP), R14 . . 10cbe63: MOVQ 0x68(SP), R15 . . 10cbe68: MOVQ R12, CX ;index.go:87 . . 10cbe6b: MOVQ R11, DX ;index.go:86 10ms 10ms 10cbe6e: MOVQ 0xa0(SP), BX ;main.(*index).add index.go:36 . . 10cbe76: MOVQ R9, SI ;index.go:87 . . 10cbe79: MOVQ R13, DI ;index.go:33 . . 10cbe7c: MOVQ R14, R8 ;index.go:88 10ms 10ms 10cbe7f: MOVQ R15, AX ;main.(*index).add index.go:33 . . 10cbe82: CMPQ DI, AX ;index.go:33 . . 10cbe85: JGE 0x10cc093 . 40ms 10cbe8b: NOPL ;main.(*index).add index.go:34 . . 10cbe8c: CMPQ DX, AX ;index.go:86 . . 10cbe8f: JA 0x10cc0b8 . . 10cbe95: CMPQ CX, AX ;index.go:87 . . 10cbe98: JA 0x10cc0b3 . . 10cbe9e: MOVQ AX, 0x48(SP) ;index.go:33 . . 10cbea3: SUBQ AX, CX ;index.go:87 . . 10cbea6: MOVQ CX, 0x40(SP) . . 10cbeab: SUBQ AX, DX . . 10cbeae: NEGQ DX . . 10cbeb1: SARQ $0x3f, DX . . 10cbeb5: ANDQ AX, DX . . 10cbeb8: ADDQ SI, DX . . 10cbebb: MOVQ DX, 0x70(SP) . . 10cbec0: CMPQ R8, SI ;index.go:88 . . 10cbec3: JE 0x10cbed8 . . 10cbec5: MOVQ SI, 0(SP) . . 10cbec9: MOVQ R8, 0x8(SP) . . 10cbece: MOVQ AX, 0x10(SP) . . 10cbed3: CALL runtime.memmove(SB) . . 10cbed8: MOVQ 0x48(SP), AX ;index.go:89 10ms 10ms 10cbedd: INCQ AX ;main.skipOneCopy index.go:89 . . 10cbee0: MOVQ AX, 0x68(SP) ;index.go:89 . . 10cbee5: MOVQ 0xb8(SP), CX . . 10cbeed: SUBQ AX, CX . . 10cbef0: MOVQ 0x40(SP), BX . . 10cbef5: CMPQ CX, BX . . 10cbef8: CMOVG CX, BX . . 10cbefc: MOVQ 0xc0(SP), CX . . 10cbf04: SUBQ AX, CX . . 10cbf07: NEGQ CX . . 10cbf0a: SARQ $0x3f, CX . . 10cbf0e: ANDQ AX, CX . . 10cbf11: MOVQ 0xb0(SP), DI . . 10cbf19: ADDQ DI, CX . . 10cbf1c: MOVQ 0x70(SP), R8 . . 10cbf21: CMPQ R8, CX . . 10cbf24: JNE 0x10cc07b . . 10cbf2a: MOVQ 0xa0(SP), AX ;index.go:36 . . 10cbf32: MOVQ 0(AX), CX . . 10cbf35: MOVQ 0x8(AX), DX . . 10cbf39: MOVQ 0x20(CX), CX . . 10cbf3d: MOVQ DX, 0(SP) . . 10cbf41: CALL CX . . 10cbf43: MOVQ 0xa0(SP), AX ;index.go:37 . . 10cbf4b: MOVQ 0(AX), CX . . 10cbf4e: MOVQ 0x8(AX), DX . . 10cbf52: MOVQ 0x40(CX), CX . . 10cbf56: MOVQ DX, 0(SP) 10ms 10ms 10cbf5a: MOVQ 0x78(SP), DX ;main.(*index).add index.go:37 . . 10cbf5f: MOVQ DX, 0x8(SP) ;index.go:37 . . 10cbf64: MOVQ 0x58(SP), BX . . 10cbf69: MOVQ BX, 0x10(SP) . . 10cbf6e: MOVQ 0x50(SP), SI . . 10cbf73: MOVQ SI, 0x18(SP) . 50ms 10cbf78: CALL CX ;main.(*index).add index.go:37 . . 10cbf7a: MOVQ 0xa0(SP), AX ;index.go:38 . . 10cbf82: MOVQ 0(AX), CX . . 10cbf85: MOVQ 0x8(AX), DX . . 10cbf89: MOVQ 0x38(CX), CX . . 10cbf8d: MOVQ DX, 0(SP) . 50ms 10cbf91: CALL CX ;main.(*index).add index.go:38 . . 10cbf93: MOVQ 0x8(SP), AX ;index.go:38 . . 10cbf98: MOVQ 0xa0(SP), CX . . 10cbfa0: MOVQ 0x40(CX), DX . . 10cbfa4: TESTQ DX, DX . . 10cbfa7: JE 0x10cc0ae . . 10cbfad: MOVQ DX, BX . . 10cbfb0: XORL DX, DX . . 10cbfb2: DIVQ BX 30ms 30ms 10cbfb5: MOVQ 0x10(CX), BX ;main.(*index).add index.go:39 . . 10cbfb9: MOVQ 0x18(CX), SI ;index.go:39 . . 10cbfbd: CMPQ SI, DX . . 10cbfc0: JAE 0x10cc0a3 . . 10cbfc6: LEAQ 0(DX)(DX*2), SI . . 10cbfca: MOVQ 0x10(BX)(SI*8), DI 170ms 170ms 10cbfcf: MOVQ 0x8(BX)(SI*8), R8 ;main.(*index).add index.go:39 . . 10cbfd4: MOVQ 0(BX)(SI*8), R9 ;index.go:39 . . 10cbfd8: LEAQ 0x1(R8), R10 . . 10cbfdc: LEAQ 0(BX)(SI*8), R11 . . 10cbfe0: CMPQ DI, R10 . . 10cbfe3: JBE 0x10cbe2f . . 10cbfe9: MOVQ BX, 0x88(SP) . . 10cbff1: MOVQ SI, 0x60(SP) . . 10cbff6: MOVQ R11, 0x80(SP) . . 10cbffe: LEAQ runtime.types+85760(SB), AX . . 10cc005: MOVQ AX, 0(SP) . . 10cc009: MOVQ R9, 0x8(SP) . . 10cc00e: MOVQ R8, 0x10(SP) . . 10cc013: MOVQ DI, 0x18(SP) 10ms 10ms 10cc018: MOVQ R10, 0x20(SP) ;main.(*index).add index.go:39 . 570ms 10cc01d: CALL runtime.growslice(SB) . . 10cc022: MOVQ 0x28(SP), AX ;index.go:39 . . 10cc027: MOVQ 0x30(SP), CX . . 10cc02c: MOVQ 0x38(SP), DX . . 10cc031: MOVQ 0x60(SP), BX . . 10cc036: MOVQ 0x88(SP), SI . . 10cc03e: MOVQ DX, 0x10(SI)(BX*8) . . 10cc043: CMPL $0x0, runtime.writeBarrier(SB) . . 10cc04a: JNE 0x10cc06c . . 10cc04c: MOVQ AX, 0(SI)(BX*8) . . 10cc050: MOVQ CX, R8 . . 10cc053: MOVQ AX, R9 . . 10cc056: MOVQ 0xa0(SP), CX ;index.go:36 . . 10cc05e: MOVQ BX, DX ;index.go:39 . . 10cc061: MOVQ SI, BX . . 10cc064: MOVQ DX, SI . . 10cc067: JMP 0x10cbe2f . . 10cc06c: MOVQ 0x80(SP), DI . . 10cc074: CALL runtime.gcWriteBarrier(SB) . . 10cc079: JMP 0x10cc050 . . 10cc07b: MOVQ R8, 0(SP) ;index.go:89 . . 10cc07f: MOVQ CX, 0x8(SP) . . 10cc084: MOVQ BX, 0x10(SP) . 10ms 10cc089: CALL runtime.memmove(SB) ;main.skipOneCopy index.go:89 20ms 20ms 10cc08e: JMP 0x10cbf2a . . 10cc093: MOVQ 0x90(SP), BP ;index.go:89 . . 10cc09b: ADDQ $0x98, SP . . 10cc0a2: RET . . 10cc0a3: MOVQ DX, AX ;index.go:39 . . 10cc0a6: MOVQ SI, CX . . 10cc0a9: CALL runtime.panicIndexU(SB) . . 10cc0ae: CALL runtime.panicdivide(SB) ;index.go:38 . . 10cc0b3: CALL runtime.panicSliceB(SB) ;index.go:87 . . 10cc0b8: MOVQ AX, CX ;index.go:86 . . 10cc0bb: CALL runtime.panicSliceAcap(SB) . . 10cc0c0: CALL runtime.panicSliceAcap(SB) ;index.go:32 . . 10cc0c5: NOPL . . 10cc0c6: CALL runtime.morestack_noctxt(SB) ;index.go:29 . . 10cc0cb: ? . . 10cc0cc: LOCK CLD . . 10cc0ce: ? ROUTINE ======================== main.(*index).near 140ms 850ms (flat, cum) 12.02% of Total . . 10cc3e0: MOVQ GS:0x30, CX ;index.go:64 10ms 10ms 10cc3e9: LEAQ -0x8(SP), AX ;main.(*index).near index.go:64 . . 10cc3ee: CMPQ 0x10(CX), AX ;index.go:64 . . 10cc3f2: JBE 0x10cc7f9 . . 10cc3f8: SUBQ $0x88, SP . . 10cc3ff: MOVQ BP, 0x80(SP) . . 10cc407: LEAQ 0x80(SP), BP . . 10cc40f: MOVQ 0x90(SP), AX ;index.go:65 . . 10cc417: MOVQ 0(AX), CX . . 10cc41a: MOVQ 0x8(AX), DX . . 10cc41e: MOVQ 0x20(CX), CX . . 10cc422: MOVQ DX, 0(SP) . . 10cc426: CALL CX . . 10cc428: MOVQ 0x90(SP), AX ;index.go:66 . . 10cc430: MOVQ 0(AX), CX . . 10cc433: MOVQ 0x8(AX), DX . . 10cc437: MOVQ 0x40(CX), CX . . 10cc43b: MOVQ DX, 0(SP) . . 10cc43f: MOVQ 0x98(SP), DX . . 10cc447: MOVQ DX, 0x8(SP) . . 10cc44c: MOVQ 0xa0(SP), BX . . 10cc454: MOVQ BX, 0x10(SP) . . 10cc459: MOVQ 0xa8(SP), SI . . 10cc461: MOVQ SI, 0x18(SP) . 20ms 10cc466: CALL CX ;main.(*index).near index.go:66 . . 10cc468: MOVQ 0x90(SP), AX ;index.go:67 . . 10cc470: MOVQ 0(AX), CX . . 10cc473: MOVQ 0x8(AX), DX . . 10cc477: MOVQ 0x38(CX), CX . . 10cc47b: MOVQ DX, 0(SP) . 10ms 10cc47f: CALL CX ;main.(*index).near index.go:67 . . 10cc481: MOVQ 0x8(SP), AX ;index.go:67 . . 10cc486: MOVQ 0x90(SP), CX . . 10cc48e: MOVQ 0x40(CX), DX . . 10cc492: TESTQ DX, DX . . 10cc495: JE 0x10cc7f3 . . 10cc49b: MOVQ DX, BX . . 10cc49e: XORL DX, DX . . 10cc4a0: DIVQ BX 20ms 20ms 10cc4a3: MOVQ 0x10(CX), BX ;main.(*index).near index.go:68 . . 10cc4a7: MOVQ 0x18(CX), SI ;index.go:68 . . 10cc4ab: CMPQ SI, DX . . 10cc4ae: JAE 0x10cc7e8 . . 10cc4b4: LEAQ 0(DX)(DX*2), SI . . 10cc4b8: MOVQ 0x8(BX)(SI*8), DI . . 10cc4bd: MOVQ 0xb8(SP), R8 . . 10cc4c5: CMPQ DI, R8 . . 10cc4c8: MOVQ R8, R9 . . 10cc4cb: CMOVG DI, R8 . . 10cc4cf: MOVQ 0(BX)(SI*8), BX . . 10cc4d3: MOVQ 0xb0(SP), SI . . 10cc4db: CMPQ SI, BX . . 10cc4de: JNE 0x10cc77a . . 10cc4e4: MOVQ 0x38(CX), DX ;index.go:70 . . 10cc4e8: MOVQ 0x28(CX), BX . . 10cc4ec: MOVQ 0xa0(SP), DI . . 10cc4f4: LEAQ -0x1(DI), R10 . . 10cc4f8: CMPQ DX, R10 . . 10cc4fb: JA 0x10cc7e0 . . 10cc501: MOVQ R10, 0x58(SP) . . 10cc506: MOVQ DX, 0x48(SP) . . 10cc50b: MOVQ BX, 0x78(SP) . . 10cc510: MOVQ 0x98(SP), R11 ;index.go:71 . . 10cc518: XORL AX, AX . . 10cc51a: JMP 0x10cc562 . . 10cc51c: MOVQ 0xa0(SP), R12 . . 10cc524: MOVQ 0x78(SP), R13 . . 10cc529: MOVQ 0x48(SP), R14 . . 10cc52e: MOVQ 0x58(SP), R15 . . 10cc533: MOVQ 0x98(SP), AX . . 10cc53b: MOVQ 0x68(SP), DX . . 10cc540: MOVQ R14, DX ;index.go:86 . . 10cc543: MOVQ R13, BX ;index.go:87 . . 10cc546: MOVQ R12, DI ;index.go:71 . . 10cc549: MOVQ R8, R9 ;index.go:78 . . 10cc54c: MOVQ R15, R10 ;index.go:87 . . 10cc54f: MOVQ AX, R11 ;index.go:88 . . 10cc552: MOVQ 0x68(SP), AX ;index.go:71 . . 10cc557: MOVQ SI, R8 ;index.go:78 . . 10cc55a: MOVQ 0xb0(SP), SI . . 10cc562: CMPQ DI, AX ;index.go:71 . . 10cc565: JGE 0x10cc76a . . 10cc56b: NOPL ;index.go:72 . . 10cc56c: CMPQ DX, AX ;index.go:86 . . 10cc56f: JA 0x10cc7d8 . . 10cc575: CMPQ R10, AX ;index.go:87 . . 10cc578: JA 0x10cc7d0 . . 10cc57e: MOVQ AX, 0x40(SP) ;index.go:71 . . 10cc583: MOVQ R8, 0x50(SP) ;index.go:78 . . 10cc588: SUBQ AX, R10 ;index.go:87 . . 10cc58b: MOVQ R10, 0x38(SP) . . 10cc590: SUBQ AX, DX . . 10cc593: NEGQ DX . . 10cc596: SARQ $0x3f, DX . . 10cc59a: ANDQ AX, DX . . 10cc59d: ADDQ BX, DX . . 10cc5a0: MOVQ DX, 0x70(SP) . . 10cc5a5: CMPQ R11, BX ;index.go:88 . . 10cc5a8: JE 0x10cc5bd . . 10cc5aa: MOVQ BX, 0(SP) . . 10cc5ae: MOVQ R11, 0x8(SP) . . 10cc5b3: MOVQ AX, 0x10(SP) . . 10cc5b8: CALL runtime.memmove(SB) . . 10cc5bd: MOVQ 0x40(SP), AX ;index.go:89 . . 10cc5c2: INCQ AX . . 10cc5c5: MOVQ AX, 0x68(SP) . . 10cc5ca: MOVQ 0xa0(SP), CX . . 10cc5d2: SUBQ AX, CX . . 10cc5d5: MOVQ 0x38(SP), BX . . 10cc5da: CMPQ CX, BX . . 10cc5dd: CMOVG CX, BX . . 10cc5e1: MOVQ 0xa8(SP), CX . . 10cc5e9: SUBQ AX, CX . . 10cc5ec: NEGQ CX . . 10cc5ef: SARQ $0x3f, CX . . 10cc5f3: ANDQ AX, CX . . 10cc5f6: MOVQ 0x98(SP), DI . . 10cc5fe: ADDQ DI, CX . . 10cc601: MOVQ 0x70(SP), R8 . . 10cc606: CMPQ R8, CX . . 10cc609: JNE 0x10cc752 . . 10cc60f: MOVQ 0x90(SP), AX ;index.go:74 . . 10cc617: MOVQ 0(AX), CX . . 10cc61a: MOVQ 0x8(AX), DX . . 10cc61e: MOVQ 0x20(CX), CX . . 10cc622: MOVQ DX, 0(SP) . 30ms 10cc626: CALL CX ;main.(*index).near index.go:74 10ms 10ms 10cc628: MOVQ 0x90(SP), AX ;main.(*index).near index.go:75 . . 10cc630: MOVQ 0(AX), CX ;index.go:75 . . 10cc633: MOVQ 0x8(AX), DX . . 10cc637: MOVQ 0x40(CX), CX . . 10cc63b: MOVQ DX, 0(SP) 10ms 10ms 10cc63f: MOVQ 0x78(SP), DX ;main.(*index).near index.go:75 . . 10cc644: MOVQ DX, 0x8(SP) ;index.go:75 . . 10cc649: MOVQ 0x58(SP), BX . . 10cc64e: MOVQ BX, 0x10(SP) . . 10cc653: MOVQ 0x48(SP), SI . . 10cc658: MOVQ SI, 0x18(SP) . 30ms 10cc65d: CALL CX ;main.(*index).near index.go:75 10ms 10ms 10cc65f: MOVQ 0x90(SP), AX ;main.(*index).near index.go:76 . . 10cc667: MOVQ 0(AX), CX ;index.go:76 . . 10cc66a: MOVQ 0x8(AX), DX . . 10cc66e: MOVQ 0x38(CX), CX . . 10cc672: MOVQ DX, 0(SP) . 30ms 10cc676: CALL CX ;main.(*index).near index.go:76 . . 10cc678: MOVQ 0x8(SP), AX ;index.go:76 . . 10cc67d: MOVQ 0x90(SP), CX . . 10cc685: MOVQ 0x40(CX), DX . . 10cc689: TESTQ DX, DX . . 10cc68c: JE 0x10cc7cb . . 10cc692: MOVQ DX, BX 10ms 10ms 10cc695: XORL DX, DX ;main.(*index).near index.go:76 . . 10cc697: DIVQ BX ;index.go:76 10ms 10ms 10cc69a: MOVQ 0x10(CX), BX ;main.(*index).near index.go:77 . . 10cc69e: MOVQ 0x18(CX), SI ;index.go:77 . . 10cc6a2: CMPQ SI, DX . . 10cc6a5: JAE 0x10cc7c0 . . 10cc6ab: LEAQ 0(DX)(DX*2), SI . . 10cc6af: MOVQ 0(BX)(SI*8), DI 50ms 50ms 10cc6b3: MOVQ 0x8(BX)(SI*8), BX ;main.(*index).near index.go:77 . . 10cc6b8: MOVQ 0x50(SP), AX ;index.go:78 . . 10cc6bd: MOVQ 0xb8(SP), SI . . 10cc6c5: CMPQ SI, AX . . 10cc6c8: JA 0x10cc7b8 . . 10cc6ce: MOVQ SI, R8 . . 10cc6d1: SUBQ AX, SI . . 10cc6d4: CMPQ BX, SI . . 10cc6d7: CMOVG BX, SI 10ms 10ms 10cc6db: MOVQ 0xc0(SP), BX ;main.(*index).near index.go:78 . . 10cc6e3: MOVQ BX, R9 ;index.go:78 . . 10cc6e6: SUBQ AX, BX . . 10cc6e9: NEGQ BX . . 10cc6ec: SHLQ $0x3, AX . . 10cc6f0: SARQ $0x3f, BX . . 10cc6f4: ANDQ BX, AX . . 10cc6f7: MOVQ 0xb0(SP), BX . . 10cc6ff: LEAQ 0(BX)(AX*1), R10 . . 10cc703: CMPQ DI, R10 . . 10cc706: JE 0x10cc51c . . 10cc70c: MOVQ SI, 0x60(SP) . . 10cc711: MOVQ R10, 0(SP) . . 10cc715: MOVQ DI, 0x8(SP) . . 10cc71a: SHLQ $0x3, SI . . 10cc71e: MOVQ SI, 0x10(SP) . 410ms 10cc723: CALL runtime.memmove(SB) ;main.(*index).near index.go:78 . . 10cc728: MOVQ 0x90(SP), CX ;index.go:74 . . 10cc730: MOVQ 0xb0(SP), BX ;index.go:78 . . 10cc738: MOVQ 0x60(SP), SI . . 10cc73d: MOVQ 0xb8(SP), R8 . . 10cc745: MOVQ 0xc0(SP), R9 . . 10cc74d: JMP 0x10cc51c . . 10cc752: MOVQ R8, 0(SP) ;index.go:89 . . 10cc756: MOVQ CX, 0x8(SP) . . 10cc75b: MOVQ BX, 0x10(SP) . . 10cc760: CALL runtime.memmove(SB) . . 10cc765: JMP 0x10cc60f . . 10cc76a: MOVQ 0x80(SP), BP . . 10cc772: ADDQ $0x88, SP . . 10cc779: RET . . 10cc77a: MOVQ R8, 0x50(SP) ;index.go:68 . . 10cc77f: MOVQ SI, 0(SP) . . 10cc783: MOVQ BX, 0x8(SP) . . 10cc788: SHLQ $0x3, R8 . . 10cc78c: MOVQ R8, 0x10(SP) . 180ms 10cc791: CALL runtime.memmove(SB) ;main.(*index).near index.go:68 . . 10cc796: MOVQ 0x90(SP), CX ;index.go:70 . . 10cc79e: MOVQ 0xb0(SP), SI ;index.go:78 . . 10cc7a6: MOVQ 0x50(SP), R8 . . 10cc7ab: MOVQ 0xb8(SP), R9 . . 10cc7b3: JMP 0x10cc4e4 ;index.go:68 . . 10cc7b8: MOVQ SI, CX ;index.go:78 . . 10cc7bb: CALL runtime.panicSliceB(SB) . . 10cc7c0: MOVQ DX, AX ;index.go:77 . . 10cc7c3: MOVQ SI, CX . . 10cc7c6: CALL runtime.panicIndexU(SB) . . 10cc7cb: CALL runtime.panicdivide(SB) ;index.go:76 . . 10cc7d0: MOVQ R10, CX ;index.go:87 . . 10cc7d3: CALL runtime.panicSliceB(SB) . . 10cc7d8: MOVQ AX, CX ;index.go:86 . . 10cc7db: CALL runtime.panicSliceAcap(SB) . . 10cc7e0: MOVQ R10, CX ;index.go:70 . . 10cc7e3: CALL runtime.panicSliceAcap(SB) . . 10cc7e8: MOVQ DX, AX ;index.go:68 . . 10cc7eb: MOVQ SI, CX . . 10cc7ee: CALL runtime.panicIndexU(SB) . . 10cc7f3: CALL runtime.panicdivide(SB) ;index.go:67 . . 10cc7f8: NOPL . . 10cc7f9: CALL runtime.morestack_noctxt(SB) ;index.go:64 . . 10cc7fe: JMP main.(*index).near(SB) . . 10cc803: INT $0x3 . . 10cc804: INT $0x3 . . 10cc805: INT $0x3 . . 10cc806: INT $0x3 . . 10cc807: INT $0x3 . . 10cc808: INT $0x3 . . 10cc809: INT $0x3 . . 10cc80a: INT $0x3 . . 10cc80b: INT $0x3 . . 10cc80c: INT $0x3 . . 10cc80d: INT $0x3 . . 10cc80e: INT $0x3 ROUTINE ======================== main.(*index).nearCount 260ms 390ms (flat, cum) 5.52% of Total . . 10cc0d0: MOVQ GS:0x30, CX ;index.go:43 . . 10cc0d9: CMPQ 0x10(CX), SP . . 10cc0dd: JBE 0x10cc3c9 . . 10cc0e3: ADDQ $-0x80, SP . . 10cc0e7: MOVQ BP, 0x78(SP) . . 10cc0ec: LEAQ 0x78(SP), BP . . 10cc0f1: MOVQ 0x88(SP), AX ;index.go:45 . . 10cc0f9: MOVQ 0(AX), CX . . 10cc0fc: MOVQ 0x8(AX), DX . . 10cc100: MOVQ 0x20(CX), CX . . 10cc104: MOVQ DX, 0(SP) . . 10cc108: CALL CX . . 10cc10a: MOVQ 0x88(SP), AX ;index.go:46 . . 10cc112: MOVQ 0(AX), CX . . 10cc115: MOVQ 0x8(AX), DX . . 10cc119: MOVQ 0x40(CX), CX . . 10cc11d: MOVQ DX, 0(SP) . . 10cc121: MOVQ 0x90(SP), DX . . 10cc129: MOVQ DX, 0x8(SP) . . 10cc12e: MOVQ 0x98(SP), BX . . 10cc136: MOVQ BX, 0x10(SP) . . 10cc13b: MOVQ 0xa0(SP), SI . . 10cc143: MOVQ SI, 0x18(SP) . 10ms 10cc148: CALL CX ;main.(*index).nearCount index.go:46 . . 10cc14a: MOVQ 0x88(SP), AX ;index.go:47 . . 10cc152: MOVQ 0(AX), CX . . 10cc155: MOVQ 0x8(AX), DX . . 10cc159: MOVQ 0x38(CX), CX . . 10cc15d: MOVQ DX, 0(SP) . 10ms 10cc161: CALL CX ;main.(*index).nearCount index.go:47 . . 10cc163: MOVQ 0x8(SP), AX ;index.go:47 . . 10cc168: MOVQ 0x88(SP), CX . . 10cc170: MOVQ 0x40(CX), DX . . 10cc174: TESTQ DX, DX . . 10cc177: JE 0x10cc3c3 . . 10cc17d: MOVQ DX, BX . . 10cc180: XORL DX, DX . . 10cc182: DIVQ BX . . 10cc185: MOVQ 0x10(CX), BX ;index.go:48 . . 10cc189: MOVQ 0x18(CX), SI . . 10cc18d: CMPQ SI, DX . . 10cc190: JAE 0x10cc3b8 . . 10cc196: LEAQ 0(DX)(DX*2), SI . . 10cc19a: MOVQ 0x8(BX)(SI*8), BX . . 10cc19f: MOVQ 0x38(CX), DX ;index.go:50 . . 10cc1a3: MOVQ 0x28(CX), SI . . 10cc1a7: MOVQ 0x98(SP), DI . . 10cc1af: LEAQ -0x1(DI), R8 . . 10cc1b3: CMPQ DX, R8 . . 10cc1b6: JA 0x10cc3b0 . . 10cc1bc: MOVQ R8, 0x50(SP) . . 10cc1c1: MOVQ DX, 0x48(SP) . . 10cc1c6: MOVQ SI, 0x70(SP) . . 10cc1cb: MOVQ 0x90(SP), R9 ;index.go:51 . . 10cc1d3: XORL AX, AX . . 10cc1d5: JMP 0x10cc21f . . 10cc1d7: LEAQ 0(DX)(DX*2), R10 ;index.go:57 . . 10cc1db: MOVQ 0x8(SI)(R10*8), R10 230ms 230ms 10cc1e0: MOVQ 0x58(SP), R11 ;main.(*index).nearCount index.go:58 . . 10cc1e5: LEAQ 0(R11)(R10*1), BX ;index.go:58 10ms 10ms 10cc1e9: MOVQ 0x98(SP), R10 ;main.(*index).nearCount index.go:51 . . 10cc1f1: MOVQ 0x70(SP), R11 ;index.go:51 . . 10cc1f6: MOVQ 0x48(SP), R12 . . 10cc1fb: MOVQ 0x50(SP), R13 . . 10cc200: MOVQ 0x90(SP), R14 . . 10cc208: MOVQ 0x60(SP), R15 . . 10cc20d: MOVQ R12, DX ;index.go:86 . . 10cc210: MOVQ R11, SI ;index.go:87 . . 10cc213: MOVQ R10, DI ;index.go:51 . . 10cc216: MOVQ R13, R8 ;index.go:87 . . 10cc219: MOVQ R14, R9 ;index.go:88 . . 10cc21c: MOVQ R15, AX ;index.go:51 . . 10cc21f: CMPQ DI, AX . . 10cc222: JGE 0x10cc37e . 10ms 10cc228: NOPL ;main.(*index).nearCount index.go:52 . . 10cc229: CMPQ DX, AX ;index.go:86 . . 10cc22c: JA 0x10cc3a8 . . 10cc232: CMPQ R8, AX ;index.go:87 . . 10cc235: JA 0x10cc3a0 . . 10cc23b: MOVQ AX, 0x40(SP) ;index.go:51 . . 10cc240: MOVQ BX, 0x58(SP) ;index.go:58 . . 10cc245: SUBQ AX, R8 ;index.go:87 . . 10cc248: MOVQ R8, 0x38(SP) . . 10cc24d: SUBQ AX, DX . . 10cc250: NEGQ DX . . 10cc253: SARQ $0x3f, DX . . 10cc257: ANDQ AX, DX . . 10cc25a: ADDQ SI, DX . . 10cc25d: MOVQ DX, 0x68(SP) . . 10cc262: CMPQ R9, SI ;index.go:88 . . 10cc265: JE 0x10cc27a . . 10cc267: MOVQ SI, 0(SP) . . 10cc26b: MOVQ R9, 0x8(SP) . . 10cc270: MOVQ AX, 0x10(SP) . 10ms 10cc275: CALL runtime.memmove(SB) ;main.skipOneCopy index.go:88 . . 10cc27a: MOVQ 0x40(SP), AX ;index.go:89 . . 10cc27f: INCQ AX . . 10cc282: MOVQ AX, 0x60(SP) . . 10cc287: MOVQ 0x98(SP), CX . . 10cc28f: SUBQ AX, CX . . 10cc292: MOVQ 0x38(SP), BX . . 10cc297: CMPQ CX, BX . . 10cc29a: CMOVG CX, BX . . 10cc29e: MOVQ 0xa0(SP), CX . . 10cc2a6: SUBQ AX, CX . . 10cc2a9: NEGQ CX . . 10cc2ac: SARQ $0x3f, CX . . 10cc2b0: ANDQ AX, CX . . 10cc2b3: MOVQ 0x90(SP), DI . . 10cc2bb: ADDQ DI, CX . . 10cc2be: MOVQ 0x68(SP), R8 . . 10cc2c3: CMPQ R8, CX . . 10cc2c6: JNE 0x10cc366 . . 10cc2cc: MOVQ 0x88(SP), AX ;index.go:54 . . 10cc2d4: MOVQ 0(AX), CX . . 10cc2d7: MOVQ 0x8(AX), DX . . 10cc2db: MOVQ 0x20(CX), CX . . 10cc2df: MOVQ DX, 0(SP) . . 10cc2e3: CALL CX . . 10cc2e5: MOVQ 0x88(SP), AX ;index.go:55 . . 10cc2ed: MOVQ 0(AX), CX . . 10cc2f0: MOVQ 0x8(AX), DX . . 10cc2f4: MOVQ 0x40(CX), CX . . 10cc2f8: MOVQ DX, 0(SP) . . 10cc2fc: MOVQ 0x70(SP), DX . . 10cc301: MOVQ DX, 0x8(SP) . . 10cc306: MOVQ 0x50(SP), BX . . 10cc30b: MOVQ BX, 0x10(SP) . . 10cc310: MOVQ 0x48(SP), SI . . 10cc315: MOVQ SI, 0x18(SP) . 40ms 10cc31a: CALL CX ;main.(*index).nearCount index.go:55 . . 10cc31c: MOVQ 0x88(SP), AX ;index.go:56 . . 10cc324: MOVQ 0(AX), CX . . 10cc327: MOVQ 0x8(AX), DX . . 10cc32b: MOVQ 0x38(CX), CX . . 10cc32f: MOVQ DX, 0(SP) . 50ms 10cc333: CALL CX ;main.(*index).nearCount index.go:56 . . 10cc335: MOVQ 0x8(SP), AX ;index.go:56 . . 10cc33a: MOVQ 0x88(SP), CX . . 10cc342: MOVQ 0x40(CX), DX . . 10cc346: TESTQ DX, DX . . 10cc349: JE 0x10cc39b . . 10cc34b: MOVQ DX, BX . . 10cc34e: XORL DX, DX . . 10cc350: DIVQ BX 20ms 20ms 10cc353: MOVQ 0x18(CX), BX ;main.(*index).nearCount index.go:57 . . 10cc357: MOVQ 0x10(CX), SI ;index.go:57 . . 10cc35b: CMPQ BX, DX . . 10cc35e: JB 0x10cc1d7 . . 10cc364: JMP 0x10cc390 . . 10cc366: MOVQ R8, 0(SP) ;index.go:89 . . 10cc36a: MOVQ CX, 0x8(SP) . . 10cc36f: MOVQ BX, 0x10(SP) . . 10cc374: CALL runtime.memmove(SB) . . 10cc379: JMP 0x10cc2cc . . 10cc37e: MOVQ BX, 0xa8(SP) ;index.go:61 . . 10cc386: MOVQ 0x78(SP), BP . . 10cc38b: SUBQ $-0x80, SP . . 10cc38f: RET . . 10cc390: MOVQ DX, AX ;index.go:57 . . 10cc393: MOVQ BX, CX . . 10cc396: CALL runtime.panicIndexU(SB) . . 10cc39b: CALL runtime.panicdivide(SB) ;index.go:56 . . 10cc3a0: MOVQ R8, CX ;index.go:87 . . 10cc3a3: CALL runtime.panicSliceB(SB) . . 10cc3a8: MOVQ AX, CX ;index.go:86 . . 10cc3ab: CALL runtime.panicSliceAcap(SB) . . 10cc3b0: MOVQ R8, CX ;index.go:50 . . 10cc3b3: CALL runtime.panicSliceAcap(SB) . . 10cc3b8: MOVQ DX, AX ;index.go:48 . . 10cc3bb: MOVQ SI, CX . . 10cc3be: CALL runtime.panicIndexU(SB) . . 10cc3c3: CALL runtime.panicdivide(SB) ;index.go:47 . . 10cc3c8: NOPL . . 10cc3c9: CALL runtime.morestack_noctxt(SB) ;index.go:43 . . 10cc3ce: JMP main.(*index).nearCount(SB) . . 10cc3d3: INT $0x3 . . 10cc3d4: INT $0x3 . . 10cc3d5: INT $0x3 . . 10cc3d6: INT $0x3 . . 10cc3d7: INT $0x3 . . 10cc3d8: INT $0x3 . . 10cc3d9: INT $0x3 . . 10cc3da: INT $0x3 . . 10cc3db: INT $0x3 . . 10cc3dc: INT $0x3 . . 10cc3dd: INT $0x3 . . 10cc3de: INT $0x3 ROUTINE ======================== main.LoadDictionary 10ms 3.84s (flat, cum) 54.31% of Total . . 10c9ab0: MOVQ GS:0x30, CX ;graph.go:39 . . 10c9ab9: LEAQ 0xfffffec0(SP), AX . . 10c9ac1: CMPQ 0x10(CX), AX . . 10c9ac5: JBE 0x10ca1ef . . 10c9acb: SUBQ $0x1c0, SP . . 10c9ad2: MOVQ BP, 0x1b8(SP) . . 10c9ada: LEAQ 0x1b8(SP), BP . . 10c9ae2: MOVQ $0x0, 0x1f0(SP) . . 10c9aee: LEAQ go.string.*+5959(SB), AX ;graph.go:40 . . 10c9af5: MOVQ AX, 0(SP) . . 10c9af9: MOVQ $0xe, 0x8(SP) . . 10c9b02: CALL main.newTimer(SB) . . 10c9b07: MOVQ 0x10(SP), AX . . 10c9b0c: MOVL $0x0, 0x68(SP) . . 10c9b14: MOVQ AX, 0x80(SP) . . 10c9b1c: LEAQ 0x68(SP), AX . . 10c9b21: MOVQ AX, 0(SP) . . 10c9b25: CALL runtime.deferprocStack(SB) . . 10c9b2a: TESTL AX, AX . . 10c9b2c: JNE 0x10ca1d0 . . 10c9b32: NOPL ;graph.go:41 . . 10c9b33: MOVQ 0x1c8(SP), AX ;file.go:280 . . 10c9b3b: MOVQ AX, 0(SP) . . 10c9b3f: MOVQ 0x1d0(SP), AX . . 10c9b47: MOVQ AX, 0x8(SP) . . 10c9b4c: MOVQ $0x0, 0x10(SP) . . 10c9b55: MOVL $0x0, 0x18(SP) . . 10c9b5d: CALL os.OpenFile(SB) . . 10c9b62: MOVQ 0x20(SP), AX . . 10c9b67: MOVQ AX, 0x118(SP) . . 10c9b6f: MOVQ 0x30(SP), CX . . 10c9b74: MOVQ 0x28(SP), DX . . 10c9b79: TESTQ DX, DX ;graph.go:42 . . 10c9b7c: JE 0x10c9bc2 . . 10c9b7e: JE 0x10c9b84 ;graph.go:43 . . 10c9b80: MOVQ 0x8(DX), DX . . 10c9b84: XORPS X0, X0 . . 10c9b87: MOVUPS X0, 0x128(SP) . . 10c9b8f: MOVQ DX, 0x128(SP) . . 10c9b97: MOVQ CX, 0x130(SP) . . 10c9b9f: LEAQ 0x128(SP), AX . . 10c9ba7: MOVQ AX, 0(SP) . . 10c9bab: MOVQ $0x1, 0x8(SP) . . 10c9bb4: MOVQ $0x1, 0x10(SP) . . 10c9bbd: CALL log.Fatal(SB) . . 10c9bc2: MOVL $0x18, 0xa0(SP) ;graph.go:45 . . 10c9bcd: LEAQ go.func.*+293(SB), AX . . 10c9bd4: MOVQ AX, 0xb8(SP) . . 10c9bdc: MOVQ 0x118(SP), AX . . 10c9be4: MOVQ AX, 0xd0(SP) . . 10c9bec: LEAQ 0xa0(SP), CX . . 10c9bf4: MOVQ CX, 0(SP) . . 10c9bf8: CALL runtime.deferprocStack(SB) . . 10c9bfd: TESTL AX, AX . . 10c9bff: JNE 0x10ca1ba . . 10c9c05: LEAQ runtime.types+157184(SB), AX ;graph.go:47 . . 10c9c0c: MOVQ AX, 0(SP) . . 10c9c10: CALL runtime.newobject(SB) . . 10c9c15: MOVQ 0x8(SP), AX . . 10c9c1a: MOVQ AX, 0x120(SP) . . 10c9c22: LEAQ runtime.types+141472(SB), CX ;graph.go:48 . . 10c9c29: MOVQ CX, 0(SP) . . 10c9c2d: XORPS X0, X0 . . 10c9c30: MOVUPS X0, 0x8(SP) . . 10c9c35: CALL runtime.makeslice(SB) . . 10c9c3a: MOVQ 0x18(SP), AX . . 10c9c3f: CMPL $0x0, runtime.writeBarrier(SB) ;graph.go:47 . . 10c9c46: JNE 0x10ca175 . . 10c9c4c: XORPS X0, X0 . . 10c9c4f: MOVQ 0x120(SP), CX . . 10c9c57: MOVUPS X0, 0(CX) . . 10c9c5a: MOVUPS X0, 0x10(CX) . . 10c9c5e: MOVUPS X0, 0x20(CX) . . 10c9c62: MOVQ AX, 0(CX) . . 10c9c65: NOPL ;graph.go:53 . . 10c9c66: LEAQ 0x138(SP), DI ;scan.go:87 . . 10c9c6e: MOVQ BP, -0x10(SP) . . 10c9c73: LEAQ -0x10(SP), BP . . 10c9c78: CALL 0x10586ba . . 10c9c7d: MOVQ 0(BP), BP . . 10c9c81: LEAQ 0x138(SP), DI . . 10c9c89: MOVQ BP, -0x10(SP) . . 10c9c8e: LEAQ -0x10(SP), BP . . 10c9c93: CALL 0x10586ba . . 10c9c98: MOVQ 0(BP), BP . . 10c9c9c: LEAQ go.itab.*os.File,io.Reader(SB), AX . . 10c9ca3: MOVQ AX, 0x138(SP) . . 10c9cab: MOVQ 0x118(SP), AX . . 10c9cb3: MOVQ AX, 0x140(SP) . . 10c9cbb: LEAQ go.func.*+5(SB), AX . . 10c9cc2: MOVQ AX, 0x148(SP) . . 10c9cca: MOVQ $0x10000, 0x150(SP) . . 10c9cd6: XORL AX, AX . . 10c9cd8: JMP 0x10c9cdd ;graph.go:54 . . 10c9cda: MOVQ SI, AX ;graph.go:74 . . 10c9cdd: MOVQ AX, 0x48(SP) . . 10c9ce2: LEAQ 0x138(SP), CX ;graph.go:54 . . 10c9cea: MOVQ CX, 0(SP) . 50ms 10c9cee: CALL bufio.(*Scanner).Scan(SB) ;main.LoadDictionary graph.go:54 . . 10c9cf3: CMPB $0x0, 0x8(SP) ;graph.go:54 . . 10c9cf8: JE 0x10c9e3b . . 10c9cfe: NOPL ;graph.go:55 . . 10c9cff: MOVQ 0x160(SP), AX ;scan.go:106 . . 10c9d07: MOVQ AX, 0x40(SP) . . 10c9d0c: MOVQ 0x158(SP), CX . . 10c9d14: MOVQ CX, 0x100(SP) . . 10c9d1c: LEAQ runtime.types+88768(SB), DX ;graph.go:56 . . 10c9d23: MOVQ DX, 0(SP) . . 10c9d27: MOVQ AX, 0x8(SP) . . 10c9d2c: MOVQ AX, 0x10(SP) . . 10c9d31: CALL runtime.makeslice(SB) . . 10c9d36: MOVQ 0x18(SP), AX . . 10c9d3b: MOVQ AX, 0x110(SP) . . 10c9d43: MOVQ 0x100(SP), CX ;graph.go:57 . . 10c9d4b: CMPQ CX, AX . . 10c9d4e: JE 0x10c9d68 . . 10c9d50: MOVQ AX, 0(SP) . . 10c9d54: MOVQ CX, 0x8(SP) . . 10c9d59: MOVQ 0x40(SP), CX . . 10c9d5e: MOVQ CX, 0x10(SP) . . 10c9d63: CALL runtime.memmove(SB) . . 10c9d68: MOVQ 0x120(SP), CX ;graph.go:58 . . 10c9d70: MOVQ 0x8(CX), DX . . 10c9d74: MOVQ 0x10(CX), BX . . 10c9d78: LEAQ 0x1(DX), SI . . 10c9d7c: MOVQ 0(CX), R8 . . 10c9d7f: CMPQ BX, SI . . 10c9d82: JA 0x10c9ddb . . 10c9d84: LEAQ 0x1(DX), BX . . 10c9d88: MOVQ BX, 0x8(CX) . . 10c9d8c: LEAQ 0(DX)(DX*2), DX . . 10c9d90: MOVQ 0x40(SP), BX 10ms 10ms 10c9d95: MOVQ BX, 0x8(R8)(DX*8) ;main.LoadDictionary graph.go:58 . . 10c9d9a: MOVQ BX, 0x10(R8)(DX*8) ;graph.go:58 . . 10c9d9f: MOVQ 0x48(SP), SI ;graph.go:59 . . 10c9da4: CMPQ SI, BX . . 10c9da7: CMOVG BX, SI ;graph.go:74 . . 10c9dab: LEAQ 0(R8)(DX*8), DI ;graph.go:58 . . 10c9daf: CMPL $0x0, runtime.writeBarrier(SB) . . 10c9db6: JNE 0x10c9dc9 . . 10c9db8: MOVQ 0x110(SP), AX . . 10c9dc0: MOVQ AX, 0(R8)(DX*8) . . 10c9dc4: JMP 0x10c9cda . . 10c9dc9: MOVQ 0x110(SP), AX . . 10c9dd1: CALL runtime.gcWriteBarrier(SB) . . 10c9dd6: JMP 0x10c9cda . . 10c9ddb: LEAQ runtime.types+141472(SB), AX . . 10c9de2: MOVQ AX, 0(SP) . . 10c9de6: MOVQ R8, 0x8(SP) . . 10c9deb: MOVQ DX, 0x10(SP) . . 10c9df0: MOVQ BX, 0x18(SP) . . 10c9df5: MOVQ SI, 0x20(SP) . 60ms 10c9dfa: CALL runtime.growslice(SB) ;main.LoadDictionary graph.go:58 . . 10c9dff: MOVQ 0x28(SP), AX ;graph.go:58 . . 10c9e04: MOVQ 0x30(SP), CX . . 10c9e09: MOVQ 0x38(SP), DX . . 10c9e0e: MOVQ 0x120(SP), DI . . 10c9e16: MOVQ DX, 0x10(DI) . . 10c9e1a: CMPL $0x0, runtime.writeBarrier(SB) . . 10c9e21: JNE 0x10c9e34 . . 10c9e23: MOVQ AX, 0(DI) . . 10c9e26: MOVQ CX, DX . . 10c9e29: MOVQ AX, R8 . . 10c9e2c: MOVQ DI, CX . . 10c9e2f: JMP 0x10c9d84 . . 10c9e34: CALL runtime.gcWriteBarrier(SB) . . 10c9e39: JMP 0x10c9e26 . . 10c9e3b: MOVQ 0x1e8(SP), AX ;graph.go:64 . . 10c9e43: TESTQ AX, AX . . 10c9e46: JNE 0x10ca117 . . 10c9e4c: MOVQ 0x120(SP), AX ;graph.go:68 . . 10c9e54: MOVQ 0x8(AX), CX . . 10c9e58: MOVQ CX, 0x60(SP) . . 10c9e5d: LEAQ runtime.types+77120(SB), DX . . 10c9e64: MOVQ DX, 0(SP) . . 10c9e68: MOVQ CX, 0x8(SP) . . 10c9e6d: MOVQ CX, 0x10(SP) . 10ms 10c9e72: CALL runtime.makeslice(SB) ;main.LoadDictionary graph.go:68 . . 10c9e77: MOVQ 0x18(SP), AX ;graph.go:68 . . 10c9e7c: MOVQ 0x60(SP), CX . . 10c9e81: MOVQ 0x120(SP), DX . . 10c9e89: MOVQ CX, 0x20(DX) . . 10c9e8d: MOVQ CX, 0x28(DX) . . 10c9e91: CMPL $0x0, runtime.writeBarrier(SB) . . 10c9e98: JNE 0x10ca109 . . 10c9e9e: MOVQ AX, 0x18(DX) . . 10c9ea2: XORL AX, AX . . 10c9ea4: JMP 0x10c9eb5 ;graph.go:69 . . 10c9ea6: LEAQ 0x1(SI), BX . . 10c9eaa: MOVQ 0x60(SP), CX . . 10c9eaf: MOVQ AX, DX ;graph.go:70 . . 10c9eb2: MOVQ BX, AX ;graph.go:69 . . 10c9eb5: CMPQ CX, AX . . 10c9eb8: JGE 0x10c9f36 . . 10c9eba: MOVQ AX, 0x50(SP) . . 10c9ebf: LEAQ runtime.types+85760(SB), AX ;graph.go:70 . . 10c9ec6: MOVQ AX, 0(SP) . . 10c9eca: XORPS X0, X0 . . 10c9ecd: MOVUPS X0, 0x8(SP) . . 10c9ed2: CALL runtime.makeslice(SB) . . 10c9ed7: MOVQ 0x120(SP), AX . . 10c9edf: MOVQ 0x20(AX), CX . . 10c9ee3: MOVQ 0x18(AX), DX . . 10c9ee7: MOVQ 0x18(SP), BX . . 10c9eec: MOVQ 0x50(SP), SI . . 10c9ef1: CMPQ CX, SI . . 10c9ef4: JAE 0x10ca1e6 . . 10c9efa: LEAQ 0(SI)(SI*2), CX . . 10c9efe: MOVQ $0x0, 0x8(DX)(CX*8) . . 10c9f07: MOVQ $0x0, 0x10(DX)(CX*8) . . 10c9f10: LEAQ 0(DX)(CX*8), DI . . 10c9f14: CMPL $0x0, runtime.writeBarrier(SB) . . 10c9f1b: JNE 0x10c9f23 . . 10c9f1d: MOVQ BX, 0(DX)(CX*8) . . 10c9f21: JMP 0x10c9ea6 . . 10c9f23: MOVQ AX, CX ;graph.go:47 . . 10c9f26: MOVQ BX, AX ;graph.go:70 . 10ms 10c9f29: CALL runtime.gcWriteBarrier(SB) ;main.LoadDictionary graph.go:70 . . 10c9f2e: MOVQ CX, AX ;graph.go:70 . . 10c9f31: JMP 0x10c9ea6 . . 10c9f36: LEAQ go.string.*+3388(SB), AX ;graph.go:73 . . 10c9f3d: MOVQ AX, 0(SP) . . 10c9f41: MOVQ $0xa, 0x8(SP) . . 10c9f4a: CALL main.newTimer(SB) . . 10c9f4f: MOVQ 0x10(SP), AX . . 10c9f54: MOVQ AX, 0xe8(SP) . . 10c9f5c: MOVQ $0x800000, 0(SP) ;graph.go:74 . . 10c9f64: MOVQ 0x48(SP), CX . . 10c9f69: MOVQ CX, 0x8(SP) . 130ms 10c9f6e: CALL main.newIndex(SB) ;main.LoadDictionary graph.go:74 . . 10c9f73: MOVQ 0x10(SP), AX ;graph.go:74 . . 10c9f78: MOVQ AX, 0xf8(SP) . . 10c9f80: MOVQ 0x120(SP), CX ;graph.go:75 . . 10c9f88: MOVQ 0x8(CX), DX . . 10c9f8c: MOVQ 0(CX), BX . . 10c9f8f: TESTQ DX, DX . . 10c9f92: JLE 0x10c9ffb . . 10c9f94: MOVQ DX, 0x60(SP) . . 10c9f99: XORL SI, SI . . 10c9f9b: JMP 0x10c9fb4 . . 10c9f9d: MOVQ 0x108(SP), DX . . 10c9fa5: LEAQ 0x18(DX), BX . . 10c9fa9: MOVQ AX, SI . . 10c9fac: MOVQ 0xf8(SP), AX ;graph.go:76 . . 10c9fb4: MOVQ BX, 0x108(SP) ;graph.go:75 . . 10c9fbc: MOVQ SI, 0x58(SP) . . 10c9fc1: MOVQ 0x10(BX), CX . . 10c9fc5: MOVQ 0x8(BX), DX . . 10c9fc9: MOVQ 0(BX), DI . . 10c9fcc: MOVQ AX, 0(SP) ;graph.go:76 . . 10c9fd0: MOVQ SI, 0x8(SP) . . 10c9fd5: MOVQ DI, 0x10(SP) . . 10c9fda: MOVQ DX, 0x18(SP) . . 10c9fdf: MOVQ CX, 0x20(SP) . 970ms 10c9fe4: CALL main.(*index).add(SB) ;main.LoadDictionary graph.go:76 . . 10c9fe9: MOVQ 0x58(SP), AX ;graph.go:75 . . 10c9fee: INCQ AX . . 10c9ff1: MOVQ 0x60(SP), CX . . 10c9ff6: CMPQ CX, AX . . 10c9ff9: JL 0x10c9f9d . . 10c9ffb: MOVQ 0xe8(SP), DX ;graph.go:78 . . 10ca003: MOVQ 0(DX), AX . . 10ca006: CALL AX . . 10ca008: LEAQ go.string.*+4694(SB), AX ;graph.go:86 . . 10ca00f: MOVQ AX, 0(SP) . . 10ca013: MOVQ $0xc, 0x8(SP) . . 10ca01c: CALL main.newTimer(SB) . . 10ca021: MOVQ 0x10(SP), AX . . 10ca026: MOVQ AX, 0xf0(SP) . . 10ca02e: MOVQ 0x120(SP), CX ;graph.go:87 . . 10ca036: MOVQ CX, 0(SP) . . 10ca03a: MOVQ 0xf8(SP), BX . . 10ca042: MOVQ BX, 0x8(SP) . 2.60s 10ca047: CALL main.(*Graph).buildAdjList(SB) ;main.LoadDictionary graph.go:87 . . 10ca04c: MOVQ 0xf0(SP), DX ;graph.go:88 . . 10ca054: MOVQ 0(DX), AX . . 10ca057: CALL AX . . 10ca059: MOVQ 0x1e8(SP), AX ;graph.go:64 . . 10ca061: TESTQ AX, AX . . 10ca064: JNE 0x10ca0ab ;graph.go:90 . . 10ca066: MOVZX 0x1d8(SP), AX ;graph.go:39 . . 10ca06e: TESTL AL, AL . . 10ca070: JNE 0x10ca098 ;graph.go:94 . . 10ca072: MOVQ 0x120(SP), AX ;graph.go:98 . . 10ca07a: MOVQ AX, 0x1f0(SP) . . 10ca082: NOPL . . 10ca083: CALL runtime.deferreturn(SB) . . 10ca088: MOVQ 0x1b8(SP), BP . . 10ca090: ADDQ $0x1c0, SP . . 10ca097: RET . . 10ca098: MOVQ 0x120(SP), AX ;graph.go:95 . . 10ca0a0: MOVQ AX, 0(SP) . . 10ca0a4: CALL main.adjListStats(SB) . . 10ca0a9: JMP 0x10ca072 . . 10ca0ab: MOVQ $0x0, 0(SP) ;graph.go:91 . . 10ca0b3: MOVQ 0x1e0(SP), CX . . 10ca0bb: MOVQ CX, 0x8(SP) . . 10ca0c0: MOVQ AX, 0x10(SP) . . 10ca0c5: LEAQ go.string.*+2067(SB), AX . . 10ca0cc: MOVQ AX, 0x18(SP) . . 10ca0d1: MOVQ $0x8, 0x20(SP) . . 10ca0da: CALL runtime.concatstring2(SB) . . 10ca0df: MOVQ 0x30(SP), AX . . 10ca0e4: MOVQ 0x28(SP), CX . . 10ca0e9: MOVQ 0x120(SP), DX . . 10ca0f1: MOVQ DX, 0(SP) . . 10ca0f5: MOVQ CX, 0x8(SP) . . 10ca0fa: MOVQ AX, 0x10(SP) . . 10ca0ff: CALL main.(*Graph).dumpAdjList(SB) . . 10ca104: JMP 0x10ca066 . . 10ca109: LEAQ 0x18(DX), DI ;graph.go:68 . . 10ca10d: CALL runtime.gcWriteBarrier(SB) . . 10ca112: JMP 0x10c9ea2 . . 10ca117: MOVQ $0x0, 0(SP) ;graph.go:65 . . 10ca11f: MOVQ 0x1e0(SP), CX . . 10ca127: MOVQ CX, 0x8(SP) . . 10ca12c: MOVQ AX, 0x10(SP) . . 10ca131: LEAQ go.string.*+5334(SB), DX . . 10ca138: MOVQ DX, 0x18(SP) . . 10ca13d: MOVQ $0xd, 0x20(SP) . . 10ca146: CALL runtime.concatstring2(SB) . . 10ca14b: MOVQ 0x30(SP), AX . . 10ca150: MOVQ 0x28(SP), CX . . 10ca155: MOVQ 0x120(SP), DX . . 10ca15d: MOVQ DX, 0(SP) . . 10ca161: MOVQ CX, 0x8(SP) . . 10ca166: MOVQ AX, 0x10(SP) . . 10ca16b: CALL main.(*Graph).dumpVertices(SB) . . 10ca170: JMP 0x10c9e4c . . 10ca175: MOVQ AX, 0x110(SP) ;graph.go:48 . . 10ca17d: LEAQ runtime.types+157184(SB), AX ;graph.go:47 . . 10ca184: MOVQ AX, 0(SP) . . 10ca188: MOVQ 0x120(SP), AX . . 10ca190: MOVQ AX, 0x8(SP) . . 10ca195: CALL runtime.typedmemclr(SB) . . 10ca19a: MOVQ 0x120(SP), DI . . 10ca1a2: MOVQ 0x110(SP), AX . . 10ca1aa: CALL runtime.gcWriteBarrier(SB) . . 10ca1af: MOVQ DI, CX ;graph.go:68 . . 10ca1b2: XORPS X0, X0 ;graph.go:48 . . 10ca1b5: JMP 0x10c9c65 ;graph.go:47 . . 10ca1ba: NOPL ;graph.go:45 . . 10ca1bb: CALL runtime.deferreturn(SB) . . 10ca1c0: MOVQ 0x1b8(SP), BP . . 10ca1c8: ADDQ $0x1c0, SP . . 10ca1cf: RET . . 10ca1d0: NOPL ;graph.go:40 . . 10ca1d1: CALL runtime.deferreturn(SB) . . 10ca1d6: MOVQ 0x1b8(SP), BP . . 10ca1de: ADDQ $0x1c0, SP . . 10ca1e5: RET . . 10ca1e6: MOVQ SI, AX ;graph.go:70 . . 10ca1e9: CALL runtime.panicIndex(SB) . . 10ca1ee: NOPL . . 10ca1ef: CALL runtime.morestack_noctxt(SB) ;graph.go:39 . . 10ca1f4: JMP main.LoadDictionary(SB) . . 10ca1f9: INT $0x3 . . 10ca1fa: INT $0x3 . . 10ca1fb: INT $0x3 . . 10ca1fc: INT $0x3 . . 10ca1fd: INT $0x3 . . 10ca1fe: INT $0x3 ROUTINE ======================== main.distance 120ms 120ms (flat, cum) 1.70% of Total . . 10cae60: SUBQ $0x18, SP ;graph.go:283 10ms 10ms 10cae64: MOVQ BP, 0x10(SP) ;main.distance graph.go:283 . . 10cae69: LEAQ 0x10(SP), BP ;graph.go:283 . . 10cae6e: MOVQ 0x28(SP), CX ;graph.go:289 . . 10cae73: MOVQ 0x40(SP), DX . . 10cae78: CMPQ DX, CX . . 10cae7b: MOVQ CX, BX ;graph.go:292 . . 10cae7e: CMOVG DX, CX . . 10cae82: MOVQ BX, SI ;graph.go:284 . . 10cae85: SUBQ DX, BX . . 10cae88: MOVQ DX, DI ;graph.go:286 . . 10cae8b: SUBQ SI, DX . . 10cae8e: TESTQ BX, BX ;graph.go:285 . . 10cae91: CMOVL DX, BX ;graph.go:294 . . 10cae95: MOVQ 0x38(SP), DX ;graph.go:285 . . 10cae9a: MOVQ 0x20(SP), R8 . . 10cae9f: XORL AX, AX . . 10caea1: JMP 0x10caeb6 . . 10caea3: MOVZX 0(DX)(AX*1), R10 ;graph.go:293 50ms 50ms 10caea8: LEAQ 0x1(BX), R11 ;main.distance graph.go:294 . . 10caeac: CMPL R10, R9 ;graph.go:293 10ms 10ms 10caeaf: CMOVNE R11, BX ;main.distance graph.go:294 30ms 30ms 10caeb3: INCQ AX ;main.distance graph.go:292 . . 10caeb6: CMPQ CX, AX ;graph.go:292 . . 10caeb9: JGE 0x10caecc . . 10caebb: CMPQ SI, AX ;graph.go:293 . . 10caebe: JAE 0x10caee3 . . 10caec0: MOVZX 0(R8)(AX*1), R9 . . 10caec5: CMPQ DI, AX . . 10caec8: JB 0x10caea3 . . 10caeca: JMP 0x10caedb . . 10caecc: MOVQ BX, 0x50(SP) ;graph.go:298 20ms 20ms 10caed1: MOVQ 0x10(SP), BP ;main.distance graph.go:298 . . 10caed6: ADDQ $0x18, SP ;graph.go:298 . . 10caeda: RET . . 10caedb: MOVQ DI, CX ;graph.go:293 . . 10caede: CALL runtime.panicIndex(SB) . . 10caee3: MOVQ SI, CX . . 10caee6: CALL runtime.panicIndex(SB) . . 10caeeb: NOPL . . 10caeec: INT $0x3 . . 10caeed: INT $0x3 . . 10caeee: INT $0x3 ROUTINE ======================== main.main 0 3.84s (flat, cum) 54.31% of Total . . 10cc810: MOVQ GS:0x30, CX ;main.go:24 . . 10cc819: LEAQ 0xfffffd98(SP), AX . . 10cc821: CMPQ 0x10(CX), AX . . 10cc825: JBE 0x10cd50f . . 10cc82b: SUBQ $0x2e8, SP . . 10cc832: MOVQ BP, 0x2e0(SP) . . 10cc83a: LEAQ 0x2e0(SP), BP . . 10cc842: MOVQ os.Args+8(SB), CX ;main.go:25 . . 10cc849: MOVQ os.Args(SB), DX ;flag.go:996 . . 10cc850: MOVQ os.Args+16(SB), BX . . 10cc857: CMPQ $0x1, CX . . 10cc85b: JB 0x10cd504 . . 10cc861: MOVQ flag.CommandLine(SB), AX . . 10cc868: MOVQ AX, 0(SP) . . 10cc86c: LEAQ -0x1(BX), AX . . 10cc870: MOVQ AX, BX . . 10cc873: NEGQ AX . . 10cc876: SARQ $0x3f, AX . . 10cc87a: ANDQ $0x10, AX . . 10cc87e: ADDQ DX, AX . . 10cc881: MOVQ AX, 0x8(SP) . . 10cc886: LEAQ -0x1(CX), AX . . 10cc88a: MOVQ AX, 0x10(SP) . . 10cc88f: MOVQ BX, 0x18(SP) . . 10cc894: CALL flag.(*FlagSet).Parse(SB) . . 10cc899: MOVQ main.cpuprofile(SB), AX ;main.go:27 . . 10cc8a0: MOVQ 0(AX), CX . . 10cc8a3: MOVQ 0x8(AX), AX . . 10cc8a7: TESTQ AX, AX . . 10cc8aa: JNE 0x10cd3a7 . . 10cc8b0: MOVQ main.traceprofile(SB), AX ;main.go:37 . . 10cc8b7: MOVQ 0(AX), CX . . 10cc8ba: MOVQ 0x8(AX), AX . . 10cc8be: TESTQ AX, AX . . 10cc8c1: JNE 0x10cd245 . . 10cc8c7: MOVQ main.dump(SB), AX ;main.go:47 . . 10cc8ce: MOVQ 0x8(AX), CX . . 10cc8d2: MOVQ 0(AX), AX . . 10cc8d5: TESTQ CX, CX . . 10cc8d8: JNE 0x10cd232 . . 10cc8de: XORPS X0, X0 ;main.go:51 . . 10cc8e1: MOVUPS X0, 0x250(SP) . . 10cc8e9: LEAQ runtime.types+88448(SB), AX . . 10cc8f0: MOVQ AX, 0x250(SP) . . 10cc8f8: LEAQ internal/bytealg.IndexString.args_stackmap+640(SB), CX . . 10cc8ff: MOVQ CX, 0x258(SP) . . 10cc907: MOVQ os.Stdout(SB), CX ;print.go:274 . . 10cc90e: LEAQ go.itab.*os.File,io.Writer(SB), DX . . 10cc915: MOVQ DX, 0(SP) . . 10cc919: MOVQ CX, 0x8(SP) . . 10cc91e: LEAQ 0x250(SP), CX . . 10cc926: MOVQ CX, 0x10(SP) . . 10cc92b: MOVQ $0x1, 0x18(SP) . . 10cc934: MOVQ $0x1, 0x20(SP) . . 10cc93d: CALL fmt.Fprintln(SB) . . 10cc942: MOVQ main.dict(SB), AX ;main.go:52 . . 10cc949: MOVQ main.perfStats(SB), CX . . 10cc950: MOVQ main.dump(SB), DX . . 10cc957: MOVQ 0x8(AX), BX . . 10cc95b: MOVQ 0(AX), AX . . 10cc95e: MOVZX 0(CX), CX . . 10cc961: MOVQ 0(DX), SI . . 10cc964: MOVQ 0x8(DX), DX . . 10cc968: MOVQ AX, 0(SP) . . 10cc96c: MOVQ BX, 0x8(SP) . . 10cc971: MOVB CL, 0x10(SP) . . 10cc975: MOVQ SI, 0x18(SP) . . 10cc97a: MOVQ DX, 0x20(SP) . 3.84s 10cc97f: CALL main.LoadDictionary(SB) ;main.main main.go:52 . . 10cc984: MOVQ 0x28(SP), AX ;main.go:52 . . 10cc989: MOVQ AX, 0x1d0(SP) . . 10cc991: MOVQ 0x8(AX), CX ;graph.go:303 . . 10cc995: MOVQ CX, 0x78(SP) . . 10cc99a: MOVQ AX, 0(SP) ;main.go:53 . . 10cc99e: CALL main.(*Graph).EdgeCount(SB) . . 10cc9a3: MOVQ 0x8(SP), AX . . 10cc9a8: MOVQ AX, 0x70(SP) . . 10cc9ad: MOVQ 0x78(SP), CX . . 10cc9b2: MOVQ CX, 0(SP) . . 10cc9b6: CALL runtime.convT64(SB) . . 10cc9bb: MOVQ 0x8(SP), AX . . 10cc9c0: MOVQ AX, 0x1f8(SP) . . 10cc9c8: MOVQ 0x70(SP), CX . . 10cc9cd: MOVQ CX, 0(SP) . . 10cc9d1: CALL runtime.convT64(SB) . . 10cc9d6: MOVQ 0x8(SP), AX . . 10cc9db: XORPS X0, X0 . . 10cc9de: MOVUPS X0, 0x2c0(SP) . . 10cc9e6: MOVUPS X0, 0x2d0(SP) . . 10cc9ee: LEAQ runtime.types+85760(SB), CX . . 10cc9f5: MOVQ CX, 0x2c0(SP) . . 10cc9fd: MOVQ 0x1f8(SP), DX . . 10cca05: MOVQ DX, 0x2c8(SP) . . 10cca0d: MOVQ CX, 0x2d0(SP) . . 10cca15: MOVQ AX, 0x2d8(SP) . . 10cca1d: MOVQ os.Stdout(SB), AX ;print.go:213 . . 10cca24: LEAQ go.itab.*os.File,io.Writer(SB), CX . . 10cca2b: MOVQ CX, 0(SP) . . 10cca2f: MOVQ AX, 0x8(SP) . . 10cca34: LEAQ go.string.*+10897(SB), AX . . 10cca3b: MOVQ AX, 0x10(SP) . . 10cca40: MOVQ $0x14, 0x18(SP) . . 10cca49: LEAQ 0x2c0(SP), AX . . 10cca51: MOVQ AX, 0x20(SP) . . 10cca56: MOVQ $0x2, 0x28(SP) . . 10cca5f: MOVQ $0x2, 0x30(SP) . . 10cca68: CALL fmt.Fprintf(SB) . . 10cca6d: MOVQ main.dictStats(SB), AX ;main.go:55 . . 10cca74: CMPB $0x0, 0(AX) . . 10cca77: JNE 0x10cd211 . . 10cca7d: MOVQ main.src(SB), AX ;main.go:59 . . 10cca84: MOVQ 0(AX), CX . . 10cca87: MOVQ 0x8(AX), AX . . 10cca8b: TESTQ AX, AX . . 10cca8e: JE 0x10ccaa2 . . 10cca90: MOVQ main.dest(SB), DX . . 10cca97: CMPQ $0x0, 0x8(DX) . . 10cca9c: JNE 0x10cccae . . 10ccaa2: MOVQ main.printGraph(SB), AX ;main.go:83 . . 10ccaa9: CMPB $0x0, 0(AX) . . 10ccaac: JNE 0x10ccc98 . . 10ccab2: MOVQ main.memprofile(SB), AX ;main.go:87 . . 10ccab9: CMPQ $0x0, 0x8(AX) . . 10ccabe: JNE 0x10ccad6 . . 10ccac0: NOPL ;main.go:98 . . 10ccac1: CALL runtime.deferreturn(SB) . . 10ccac6: MOVQ 0x2e0(SP), BP . . 10ccace: ADDQ $0x2e8, SP . . 10ccad5: RET . . 10ccad6: CALL runtime.GC(SB) ;main.go:88 . . 10ccadb: MOVQ main.memprofile(SB), AX ;main.go:89 . . 10ccae2: MOVQ 0(AX), CX . . 10ccae5: MOVQ 0x8(AX), AX . . 10ccae9: MOVQ CX, 0(SP) ;file.go:289 . . 10ccaed: MOVQ AX, 0x8(SP) . . 10ccaf2: MOVQ $0x602, 0x10(SP) . . 10ccafb: MOVL $0x1b6, 0x18(SP) . . 10ccb03: CALL os.OpenFile(SB) . . 10ccb08: MOVQ 0x20(SP), AX . . 10ccb0d: MOVQ AX, 0x1f0(SP) . . 10ccb15: MOVQ 0x28(SP), CX . . 10ccb1a: MOVQ 0x30(SP), DX . . 10ccb1f: TESTQ CX, CX ;main.go:90 . . 10ccb22: JE 0x10ccb8e . . 10ccb24: JE 0x10ccb2a ;main.go:91 . . 10ccb26: MOVQ 0x8(CX), CX . . 10ccb2a: XORPS X0, X0 . . 10ccb2d: MOVUPS X0, 0x260(SP) . . 10ccb35: MOVUPS X0, 0x270(SP) . . 10ccb3d: LEAQ runtime.types+88448(SB), AX . . 10ccb44: MOVQ AX, 0x260(SP) . . 10ccb4c: LEAQ internal/bytealg.IndexString.args_stackmap+672(SB), BX . . 10ccb53: MOVQ BX, 0x268(SP) . . 10ccb5b: MOVQ CX, 0x270(SP) . . 10ccb63: MOVQ DX, 0x278(SP) . . 10ccb6b: LEAQ 0x260(SP), CX . . 10ccb73: MOVQ CX, 0(SP) . . 10ccb77: MOVQ $0x2, 0x8(SP) . . 10ccb80: MOVQ $0x2, 0x10(SP) . . 10ccb89: CALL log.Fatal(SB) . . 10ccb8e: MOVL $0x18, 0xf0(SP) ;main.go:93 . . 10ccb99: LEAQ go.func.*+293(SB), AX . . 10ccba0: MOVQ AX, 0x108(SP) . . 10ccba8: MOVQ 0x1f0(SP), AX . . 10ccbb0: MOVQ AX, 0x120(SP) . . 10ccbb8: LEAQ 0xf0(SP), CX . . 10ccbc0: MOVQ CX, 0(SP) . . 10ccbc4: CALL runtime.deferprocStack(SB) . . 10ccbc9: TESTL AX, AX . . 10ccbcb: JNE 0x10ccc82 . . 10ccbd1: NOPL ;pprof.go:522 . . 10ccbd2: LEAQ go.itab.*os.File,io.Writer(SB), AX ;pprof.go:533 . . 10ccbd9: MOVQ AX, 0(SP) . . 10ccbdd: MOVQ 0x1f0(SP), AX . . 10ccbe5: MOVQ AX, 0x8(SP) . . 10ccbea: MOVQ $0x0, 0x10(SP) . . 10ccbf3: XORPS X0, X0 . . 10ccbf6: MOVUPS X0, 0x18(SP) . . 10ccbfb: CALL runtime/pprof.writeHeapInternal(SB) . . 10ccc00: MOVQ 0x28(SP), AX . . 10ccc05: MOVQ 0x30(SP), CX . . 10ccc0a: TESTQ AX, AX ;main.go:94 . . 10ccc0d: JE 0x10ccac0 . . 10ccc13: JE 0x10ccc19 ;main.go:95 . . 10ccc15: MOVQ 0x8(AX), AX . . 10ccc19: XORPS X0, X0 . . 10ccc1c: MOVUPS X0, 0x260(SP) . . 10ccc24: MOVUPS X0, 0x270(SP) . . 10ccc2c: LEAQ runtime.types+88448(SB), DX . . 10ccc33: MOVQ DX, 0x260(SP) . . 10ccc3b: LEAQ internal/bytealg.IndexString.args_stackmap+688(SB), DX . . 10ccc42: MOVQ DX, 0x268(SP) . . 10ccc4a: MOVQ AX, 0x270(SP) . . 10ccc52: MOVQ CX, 0x278(SP) . . 10ccc5a: LEAQ 0x260(SP), AX . . 10ccc62: MOVQ AX, 0(SP) . . 10ccc66: MOVQ $0x2, 0x8(SP) . . 10ccc6f: MOVQ $0x2, 0x10(SP) . . 10ccc78: CALL log.Fatal(SB) . . 10ccc7d: JMP 0x10ccac0 . . 10ccc82: NOPL ;main.go:93 . . 10ccc83: CALL runtime.deferreturn(SB) . . 10ccc88: MOVQ 0x2e0(SP), BP . . 10ccc90: ADDQ $0x2e8, SP . . 10ccc97: RET . . 10ccc98: MOVQ 0x1d0(SP), AX ;main.go:84 . . 10ccca0: MOVQ AX, 0(SP) . . 10ccca4: CALL main.(*Graph).PrintAdjList(SB) . . 10ccca9: JMP 0x10ccab2 . . 10cccae: MOVQ CX, 0(SP) ;main.go:60 . . 10cccb2: MOVQ AX, 0x8(SP) . . 10cccb7: CALL runtime.convTstring(SB) . . 10cccbc: MOVQ main.dest(SB), AX . . 10cccc3: MOVQ 0x10(SP), CX . . 10cccc8: MOVQ CX, 0x1f8(SP) . . 10cccd0: MOVQ 0(AX), DX . . 10cccd3: MOVQ 0x8(AX), AX . . 10cccd7: MOVQ DX, 0(SP) . . 10cccdb: MOVQ AX, 0x8(SP) . . 10ccce0: CALL runtime.convTstring(SB) . . 10ccce5: MOVQ 0x10(SP), AX . . 10cccea: XORPS X0, X0 . . 10ccced: MOVUPS X0, 0x2a0(SP) . . 10cccf5: MOVUPS X0, 0x2b0(SP) . . 10cccfd: LEAQ runtime.types+88448(SB), CX . . 10ccd04: MOVQ CX, 0x2a0(SP) . . 10ccd0c: MOVQ 0x1f8(SP), DX . . 10ccd14: MOVQ DX, 0x2a8(SP) . . 10ccd1c: MOVQ CX, 0x2b0(SP) . . 10ccd24: MOVQ AX, 0x2b8(SP) . . 10ccd2c: MOVQ os.Stdout(SB), AX ;print.go:213 . . 10ccd33: LEAQ go.itab.*os.File,io.Writer(SB), DX . . 10ccd3a: MOVQ DX, 0(SP) . . 10ccd3e: MOVQ AX, 0x8(SP) . . 10ccd43: LEAQ go.string.*+16166(SB), AX . . 10ccd4a: MOVQ AX, 0x10(SP) . . 10ccd4f: MOVQ $0x1b, 0x18(SP) . . 10ccd58: LEAQ 0x2a0(SP), AX . . 10ccd60: MOVQ AX, 0x20(SP) . . 10ccd65: MOVQ $0x2, 0x28(SP) . . 10ccd6e: MOVQ $0x2, 0x30(SP) . . 10ccd77: CALL fmt.Fprintf(SB) . . 10ccd7c: MOVQ main.src(SB), AX ;main.go:61 . . 10ccd83: MOVQ 0x8(AX), CX . . 10ccd87: MOVQ 0(AX), AX . . 10ccd8a: MOVQ 0x1d0(SP), DX . . 10ccd92: MOVQ DX, 0(SP) . . 10ccd96: MOVQ AX, 0x8(SP) . . 10ccd9b: MOVQ CX, 0x10(SP) . . 10ccda0: CALL main.(*Graph).Find(SB) . . 10ccda5: MOVQ main.dest(SB), AX ;main.go:62 . . 10ccdac: MOVQ 0x18(SP), CX ;main.go:61 . . 10ccdb1: MOVQ CX, 0x58(SP) . . 10ccdb6: MOVQ 0x8(AX), DX ;main.go:62 . . 10ccdba: MOVQ 0(AX), AX . . 10ccdbd: MOVQ 0x1d0(SP), BX . . 10ccdc5: MOVQ BX, 0(SP) . . 10ccdc9: MOVQ AX, 0x8(SP) . . 10ccdce: MOVQ DX, 0x10(SP) . . 10ccdd3: CALL main.(*Graph).Find(SB) . . 10ccdd8: MOVQ 0x18(SP), AX . . 10ccddd: MOVQ 0x58(SP), CX ;main.go:64 . . 10ccde2: TESTQ CX, CX . . 10ccde5: JL 0x10cd0b6 . . 10ccdeb: TESTQ AX, AX . . 10ccdee: JL 0x10cd0b3 . . 10ccdf4: XORPS X0, X0 ;main.go:74 . . 10ccdf7: MOVUPS X0, 0x220(SP) . . 10ccdff: LEAQ runtime.types+88448(SB), AX . . 10cce06: MOVQ AX, 0x220(SP) . . 10cce0e: LEAQ internal/bytealg.IndexString.args_stackmap+656(SB), CX . . 10cce15: MOVQ CX, 0x228(SP) . . 10cce1d: MOVQ os.Stdout(SB), CX ;print.go:274 . . 10cce24: LEAQ go.itab.*os.File,io.Writer(SB), DX . . 10cce2b: MOVQ DX, 0(SP) . . 10cce2f: MOVQ CX, 0x8(SP) . . 10cce34: LEAQ 0x220(SP), CX . . 10cce3c: MOVQ CX, 0x10(SP) . . 10cce41: MOVQ $0x1, 0x18(SP) . . 10cce4a: MOVQ $0x1, 0x20(SP) . . 10cce53: CALL fmt.Fprintln(SB) . . 10cce58: MOVQ 0x1d0(SP), AX ;main.go:75 . . 10cce60: MOVQ AX, 0(SP) . . 10cce64: MOVQ 0x58(SP), CX . . 10cce69: MOVQ CX, 0x8(SP) . . 10cce6e: CALL main.(*Graph).AllPaths(SB) . . 10cce73: MOVQ main.dest(SB), AX ;main.go:76 . . 10cce7a: MOVQ 0x10(SP), CX ;main.go:75 . . 10cce7f: MOVQ 0x8(AX), DX ;main.go:76 . . 10cce83: MOVQ 0(AX), AX . . 10cce86: MOVQ CX, 0(SP) . . 10cce8a: MOVQ AX, 0x8(SP) . . 10cce8f: MOVQ DX, 0x10(SP) . . 10cce94: CALL main.(*Paths).To(SB) . . 10cce99: MOVQ 0x18(SP), AX . . 10cce9e: MOVQ AX, 0x1c8(SP) . . 10ccea6: MOVQ 0x20(SP), CX . . 10cceab: MOVQ CX, 0x60(SP) . . 10cceb0: TESTQ CX, CX ;main.go:77 . . 10cceb3: JE 0x10ccfc5 . . 10cceb9: MOVQ 0x1d0(SP), DX ;main.go:80 . . 10ccec1: XORL BX, BX . . 10ccec3: JMP 0x10ccfa3 . . 10ccec8: MOVQ BX, 0x78(SP) . . 10ccecd: LEAQ 0(SI)(SI*2), AX ;main.go:81 . . 10cced1: MOVQ 0x10(R8)(AX*8), CX . . 10cced6: MOVQ 0(R8)(AX*8), DX . . 10cceda: MOVQ 0x8(R8)(AX*8), AX . . 10ccedf: MOVQ $0x0, 0(SP) . . 10ccee7: MOVQ DX, 0x8(SP) . . 10cceec: MOVQ AX, 0x10(SP) . . 10ccef1: MOVQ CX, 0x18(SP) . . 10ccef6: CALL runtime.slicebytetostring(SB) . . 10ccefb: MOVQ 0x28(SP), AX . . 10ccf00: MOVQ 0x20(SP), CX . . 10ccf05: MOVQ CX, 0(SP) . . 10ccf09: MOVQ AX, 0x8(SP) . . 10ccf0e: CALL runtime.convTstring(SB) . . 10ccf13: MOVQ 0x10(SP), AX . . 10ccf18: XORPS X0, X0 . . 10ccf1b: MOVUPS X0, 0x210(SP) . . 10ccf23: LEAQ runtime.types+88448(SB), CX . . 10ccf2a: MOVQ CX, 0x210(SP) . . 10ccf32: MOVQ AX, 0x218(SP) . . 10ccf3a: MOVQ os.Stdout(SB), AX ;print.go:274 . . 10ccf41: LEAQ go.itab.*os.File,io.Writer(SB), DX . . 10ccf48: MOVQ DX, 0(SP) . . 10ccf4c: MOVQ AX, 0x8(SP) . . 10ccf51: LEAQ 0x210(SP), AX . . 10ccf59: MOVQ AX, 0x10(SP) . . 10ccf5e: MOVQ $0x1, 0x18(SP) . . 10ccf67: MOVQ $0x1, 0x20(SP) . . 10ccf70: CALL fmt.Fprintln(SB) . . 10ccf75: MOVQ 0x78(SP), AX ;main.go:80 . . 10ccf7a: LEAQ 0x1(AX), BX . . 10ccf7e: MOVQ 0x60(SP), AX . . 10ccf83: MOVQ 0x1d0(SP), CX . . 10ccf8b: MOVQ 0x1c8(SP), DX . . 10ccf93: MOVQ DX, AX . . 10ccf96: MOVQ 0x60(SP), CX . . 10ccf9b: MOVQ 0x1d0(SP), DX ;main.go:81 . . 10ccfa3: CMPQ CX, BX ;main.go:80 . . 10ccfa6: JGE 0x10ccab2 . . 10ccfac: MOVQ 0(AX)(BX*8), SI . . 10ccfb0: MOVQ 0x8(DX), DI ;main.go:81 . . 10ccfb4: MOVQ 0(DX), R8 . . 10ccfb7: CMPQ DI, SI . . 10ccfba: JB 0x10ccec8 . . 10ccfc0: JMP 0x10cd4f9 . . 10ccfc5: MOVQ main.src(SB), AX ;main.go:78 . . 10ccfcc: MOVQ 0x8(AX), CX . . 10ccfd0: MOVQ 0(AX), AX . . 10ccfd3: MOVQ AX, 0(SP) . . 10ccfd7: MOVQ CX, 0x8(SP) . . 10ccfdc: CALL runtime.convTstring(SB) . . 10ccfe1: MOVQ main.dest(SB), AX . . 10ccfe8: MOVQ 0x10(SP), CX . . 10ccfed: MOVQ CX, 0x1f8(SP) . . 10ccff5: MOVQ 0x8(AX), DX . . 10ccff9: MOVQ 0(AX), AX . . 10ccffc: MOVQ AX, 0(SP) . . 10cd000: MOVQ DX, 0x8(SP) . . 10cd005: CALL runtime.convTstring(SB) . . 10cd00a: MOVQ 0x10(SP), AX . . 10cd00f: XORPS X0, X0 . . 10cd012: MOVUPS X0, 0x280(SP) . . 10cd01a: MOVUPS X0, 0x290(SP) . . 10cd022: LEAQ runtime.types+88448(SB), CX . . 10cd029: MOVQ CX, 0x280(SP) . . 10cd031: MOVQ 0x1f8(SP), DX . . 10cd039: MOVQ DX, 0x288(SP) . . 10cd041: MOVQ CX, 0x290(SP) . . 10cd049: MOVQ AX, 0x298(SP) . . 10cd051: MOVQ os.Stdout(SB), AX ;print.go:213 . . 10cd058: LEAQ go.itab.*os.File,io.Writer(SB), DX . . 10cd05f: MOVQ DX, 0(SP) . . 10cd063: MOVQ AX, 0x8(SP) . . 10cd068: LEAQ go.string.*+19932(SB), AX . . 10cd06f: MOVQ AX, 0x10(SP) . . 10cd074: MOVQ $0x1f, 0x18(SP) . . 10cd07d: LEAQ 0x280(SP), AX . . 10cd085: MOVQ AX, 0x20(SP) . . 10cd08a: MOVQ $0x2, 0x28(SP) . . 10cd093: MOVQ $0x2, 0x30(SP) . . 10cd09c: CALL fmt.Fprintf(SB) . . 10cd0a1: MOVQ 0x1c8(SP), AX ;main.go:80 . . 10cd0a9: MOVQ 0x60(SP), CX . . 10cd0ae: JMP 0x10cceb9 . . 10cd0b3: TESTQ CX, CX ;main.go:64 . . 10cd0b6: JL 0x10cd16f ;main.go:65 . . 10cd0bc: TESTQ AX, AX ;main.go:68 . . 10cd0bf: JL 0x10cd0d7 . . 10cd0c1: NOPL ;main.go:71 . . 10cd0c2: CALL runtime.deferreturn(SB) . . 10cd0c7: MOVQ 0x2e0(SP), BP . . 10cd0cf: ADDQ $0x2e8, SP . . 10cd0d6: RET . . 10cd0d7: MOVQ main.dest(SB), AX ;main.go:69 . . 10cd0de: MOVQ 0(AX), CX . . 10cd0e1: MOVQ 0x8(AX), AX . . 10cd0e5: MOVQ CX, 0(SP) . . 10cd0e9: MOVQ AX, 0x8(SP) . . 10cd0ee: CALL runtime.convTstring(SB) . . 10cd0f3: MOVQ 0x10(SP), AX . . 10cd0f8: XORPS X0, X0 . . 10cd0fb: MOVUPS X0, 0x230(SP) . . 10cd103: LEAQ runtime.types+88448(SB), CX . . 10cd10a: MOVQ CX, 0x230(SP) . . 10cd112: MOVQ AX, 0x238(SP) . . 10cd11a: MOVQ os.Stdout(SB), AX ;print.go:213 . . 10cd121: LEAQ go.itab.*os.File,io.Writer(SB), CX . . 10cd128: MOVQ CX, 0(SP) . . 10cd12c: MOVQ AX, 0x8(SP) . . 10cd131: LEAQ go.string.*+7812(SB), AX . . 10cd138: MOVQ AX, 0x10(SP) . . 10cd13d: MOVQ $0x11, 0x18(SP) . . 10cd146: LEAQ 0x230(SP), AX . . 10cd14e: MOVQ AX, 0x20(SP) . . 10cd153: MOVQ $0x1, 0x28(SP) . . 10cd15c: MOVQ $0x1, 0x30(SP) . . 10cd165: CALL fmt.Fprintf(SB) . . 10cd16a: JMP 0x10cd0c1 ;main.go:71 . . 10cd16f: MOVQ AX, 0x50(SP) ;main.go:62 . . 10cd174: MOVQ main.src(SB), AX ;main.go:66 . . 10cd17b: MOVQ 0x8(AX), CX . . 10cd17f: MOVQ 0(AX), AX . . 10cd182: MOVQ AX, 0(SP) . . 10cd186: MOVQ CX, 0x8(SP) . . 10cd18b: CALL runtime.convTstring(SB) . . 10cd190: MOVQ 0x10(SP), AX . . 10cd195: XORPS X0, X0 . . 10cd198: MOVUPS X0, 0x240(SP) . . 10cd1a0: LEAQ runtime.types+88448(SB), CX . . 10cd1a7: MOVQ CX, 0x240(SP) . . 10cd1af: MOVQ AX, 0x248(SP) . . 10cd1b7: MOVQ os.Stdout(SB), AX ;print.go:213 . . 10cd1be: LEAQ go.itab.*os.File,io.Writer(SB), DX . . 10cd1c5: MOVQ DX, 0(SP) . . 10cd1c9: MOVQ AX, 0x8(SP) . . 10cd1ce: LEAQ go.string.*+7812(SB), AX . . 10cd1d5: MOVQ AX, 0x10(SP) . . 10cd1da: MOVQ $0x11, 0x18(SP) . . 10cd1e3: LEAQ 0x240(SP), BX . . 10cd1eb: MOVQ BX, 0x20(SP) . . 10cd1f0: MOVQ $0x1, 0x28(SP) . . 10cd1f9: MOVQ $0x1, 0x30(SP) . . 10cd202: CALL fmt.Fprintf(SB) . . 10cd207: MOVQ 0x50(SP), AX ;main.go:68 . . 10cd20c: JMP 0x10cd0bc . . 10cd211: MOVQ main.dict(SB), AX ;main.go:56 . . 10cd218: MOVQ 0x8(AX), CX . . 10cd21c: MOVQ 0(AX), AX . . 10cd21f: MOVQ AX, 0(SP) . . 10cd223: MOVQ CX, 0x8(SP) . . 10cd228: CALL main.dictionaryStats(SB) . . 10cd22d: JMP 0x10cca7d . . 10cd232: MOVQ AX, 0(SP) ;main.go:48 . . 10cd236: MOVQ CX, 0x8(SP) . . 10cd23b: CALL main.createPathIfNotExists(SB) . . 10cd240: JMP 0x10cc8de . . 10cd245: NOPL ;main.go:38 . . 10cd246: MOVQ CX, 0(SP) ;file.go:289 . . 10cd24a: MOVQ AX, 0x8(SP) . . 10cd24f: MOVQ $0x602, 0x10(SP) . . 10cd258: MOVL $0x1b6, 0x18(SP) . . 10cd260: CALL os.OpenFile(SB) . . 10cd265: MOVQ 0x20(SP), AX . . 10cd26a: MOVQ AX, 0x1d8(SP) . . 10cd272: MOVQ 0x30(SP), CX . . 10cd277: MOVQ 0x28(SP), DX . . 10cd27c: TESTQ DX, DX ;main.go:39 . . 10cd27f: JE 0x10cd2eb . . 10cd281: JE 0x10cd287 ;main.go:40 . . 10cd283: MOVQ 0x8(DX), DX . . 10cd287: XORPS X0, X0 . . 10cd28a: MOVUPS X0, 0x260(SP) . . 10cd292: MOVUPS X0, 0x270(SP) . . 10cd29a: LEAQ runtime.types+88448(SB), AX . . 10cd2a1: MOVQ AX, 0x260(SP) . . 10cd2a9: LEAQ internal/bytealg.IndexString.args_stackmap+624(SB), BX . . 10cd2b0: MOVQ BX, 0x268(SP) . . 10cd2b8: MOVQ DX, 0x270(SP) . . 10cd2c0: MOVQ CX, 0x278(SP) . . 10cd2c8: LEAQ 0x260(SP), CX . . 10cd2d0: MOVQ CX, 0(SP) . . 10cd2d4: MOVQ $0x2, 0x8(SP) . . 10cd2dd: MOVQ $0x2, 0x10(SP) . . 10cd2e6: CALL log.Fatal(SB) . . 10cd2eb: MOVL $0x18, 0x138(SP) ;main.go:42 . . 10cd2f6: LEAQ go.func.*+293(SB), AX . . 10cd2fd: MOVQ AX, 0x150(SP) . . 10cd305: MOVQ 0x1d8(SP), CX . . 10cd30d: MOVQ CX, 0x168(SP) . . 10cd315: LEAQ 0x138(SP), DX . . 10cd31d: MOVQ DX, 0(SP) . . 10cd321: CALL runtime.deferprocStack(SB) . . 10cd326: TESTL AX, AX . . 10cd328: JNE 0x10cd391 . . 10cd32a: LEAQ go.itab.*os.File,io.Writer(SB), AX ;main.go:43 . . 10cd331: MOVQ AX, 0(SP) . . 10cd335: MOVQ 0x1d8(SP), CX . . 10cd33d: MOVQ CX, 0x8(SP) . . 10cd342: CALL runtime/trace.Start(SB) . . 10cd347: MOVL $0x0, 0x80(SP) ;main.go:44 . . 10cd352: LEAQ go.func.*+1597(SB), AX . . 10cd359: MOVQ AX, 0x98(SP) . . 10cd361: LEAQ 0x80(SP), AX . . 10cd369: MOVQ AX, 0(SP) . . 10cd36d: CALL runtime.deferprocStack(SB) . . 10cd372: TESTL AX, AX . . 10cd374: JNE 0x10cd37b . . 10cd376: JMP 0x10cc8c7 . . 10cd37b: NOPL . . 10cd37c: CALL runtime.deferreturn(SB) . . 10cd381: MOVQ 0x2e0(SP), BP . . 10cd389: ADDQ $0x2e8, SP . . 10cd390: RET . . 10cd391: NOPL ;main.go:42 . . 10cd392: CALL runtime.deferreturn(SB) . . 10cd397: MOVQ 0x2e0(SP), BP . . 10cd39f: ADDQ $0x2e8, SP . . 10cd3a6: RET . . 10cd3a7: NOPL ;main.go:28 . . 10cd3a8: MOVQ CX, 0(SP) ;file.go:289 . . 10cd3ac: MOVQ AX, 0x8(SP) . . 10cd3b1: MOVQ $0x602, 0x10(SP) . . 10cd3ba: MOVL $0x1b6, 0x18(SP) . . 10cd3c2: CALL os.OpenFile(SB) . . 10cd3c7: MOVQ 0x20(SP), AX . . 10cd3cc: MOVQ AX, 0x1e0(SP) . . 10cd3d4: MOVQ 0x28(SP), CX . . 10cd3d9: MOVQ CX, 0x68(SP) . . 10cd3de: MOVQ 0x30(SP), DX . . 10cd3e3: MOVQ DX, 0x1e8(SP) . . 10cd3eb: MOVL $0x18, 0x180(SP) ;main.go:29 . . 10cd3f6: LEAQ go.func.*+293(SB), BX . . 10cd3fd: MOVQ BX, 0x198(SP) . . 10cd405: MOVQ AX, 0x1b0(SP) . . 10cd40d: LEAQ 0x180(SP), SI . . 10cd415: MOVQ SI, 0(SP) . . 10cd419: CALL runtime.deferprocStack(SB) . . 10cd41e: TESTL AX, AX . . 10cd420: JNE 0x10cd4e3 . . 10cd426: MOVQ 0x68(SP), AX ;main.go:30 . . 10cd42b: TESTQ AX, AX . . 10cd42e: JE 0x10cd47c . . 10cd430: JE 0x10cd436 ;main.go:31 . . 10cd432: MOVQ 0x8(AX), AX . . 10cd436: XORPS X0, X0 . . 10cd439: MOVUPS X0, 0x200(SP) . . 10cd441: MOVQ AX, 0x200(SP) . . 10cd449: MOVQ 0x1e8(SP), AX . . 10cd451: MOVQ AX, 0x208(SP) . . 10cd459: LEAQ 0x200(SP), AX . . 10cd461: MOVQ AX, 0(SP) . . 10cd465: MOVQ $0x1, 0x8(SP) . . 10cd46e: MOVQ $0x1, 0x10(SP) . . 10cd477: CALL log.Fatal(SB) . . 10cd47c: LEAQ go.itab.*os.File,io.Writer(SB), AX ;main.go:33 . . 10cd483: MOVQ AX, 0(SP) . . 10cd487: MOVQ 0x1e0(SP), CX . . 10cd48f: MOVQ CX, 0x8(SP) . . 10cd494: CALL runtime/pprof.StartCPUProfile(SB) . . 10cd499: MOVL $0x0, 0xb8(SP) ;main.go:34 . . 10cd4a4: LEAQ go.func.*+1565(SB), AX . . 10cd4ab: MOVQ AX, 0xd0(SP) . . 10cd4b3: LEAQ 0xb8(SP), AX . . 10cd4bb: MOVQ AX, 0(SP) . . 10cd4bf: CALL runtime.deferprocStack(SB) . . 10cd4c4: TESTL AX, AX . . 10cd4c6: JNE 0x10cd4cd . . 10cd4c8: JMP 0x10cc8b0 . . 10cd4cd: NOPL . . 10cd4ce: CALL runtime.deferreturn(SB) . . 10cd4d3: MOVQ 0x2e0(SP), BP . . 10cd4db: ADDQ $0x2e8, SP . . 10cd4e2: RET . . 10cd4e3: NOPL ;main.go:29 . . 10cd4e4: CALL runtime.deferreturn(SB) . . 10cd4e9: MOVQ 0x2e0(SP), BP . . 10cd4f1: ADDQ $0x2e8, SP . . 10cd4f8: RET . . 10cd4f9: MOVQ SI, AX ;main.go:81 . . 10cd4fc: MOVQ DI, CX . . 10cd4ff: CALL runtime.panicIndex(SB) . . 10cd504: MOVL $0x1, AX ;flag.go:996 . . 10cd509: CALL runtime.panicSliceB(SB) . . 10cd50e: NOPL . . 10cd50f: CALL runtime.morestack_noctxt(SB) ;main.go:24 . . 10cd514: JMP main.main(SB) . . 10cd519: INT $0x3 . . 10cd51a: INT $0x3 . . 10cd51b: INT $0x3 . . 10cd51c: INT $0x3 . . 10cd51d: INT $0x3 . . 10cd51e: INT $0x3 ROUTINE ======================== main.newIndex 110ms 130ms (flat, cum) 1.84% of Total 10ms 10ms 10cbba0: MOVQ GS:0x30, CX ;main.newIndex index.go:16 . . 10cbba9: CMPQ 0x10(CX), SP ;index.go:16 . . 10cbbad: JBE 0x10cbdae . . 10cbbb3: SUBQ $0x48, SP . . 10cbbb7: MOVQ BP, 0x40(SP) . . 10cbbbc: LEAQ 0x40(SP), BP . . 10cbbc1: LEAQ runtime.types+77120(SB), AX ;index.go:17 . . 10cbbc8: MOVQ AX, 0(SP) . . 10cbbcc: MOVQ 0x50(SP), AX . . 10cbbd1: MOVQ AX, 0x8(SP) . . 10cbbd6: MOVQ AX, 0x10(SP) . 20ms 10cbbdb: CALL runtime.makeslice(SB) ;main.newIndex index.go:17 . . 10cbbe0: MOVQ 0x18(SP), AX ;index.go:17 . . 10cbbe5: MOVQ AX, 0x38(SP) . . 10cbbea: XORL CX, CX . . 10cbbec: JMP 0x10cbbf5 ;index.go:18 . . 10cbbee: LEAQ 0x1(AX), CX . . 10cbbf2: MOVQ BX, AX ;index.go:19 . . 10cbbf5: MOVQ 0x50(SP), DX ;index.go:18 . . 10cbbfa: CMPQ DX, CX . . 10cbbfd: JGE 0x10cbc64 . . 10cbbff: MOVQ CX, 0x20(SP) . . 10cbc04: LEAQ runtime.types+85760(SB), AX ;index.go:19 . . 10cbc0b: MOVQ AX, 0(SP) . . 10cbc0f: XORPS X0, X0 . . 10cbc12: MOVUPS X0, 0x8(SP) . . 10cbc17: CALL runtime.makeslice(SB) . . 10cbc1c: MOVQ 0x20(SP), AX . . 10cbc21: LEAQ 0(AX)(AX*2), CX . . 10cbc25: MOVQ 0x18(SP), DX . . 10cbc2a: MOVQ 0x38(SP), BX 70ms 70ms 10cbc2f: MOVQ $0x0, 0x8(BX)(CX*8) ;main.newIndex index.go:19 30ms 30ms 10cbc38: MOVQ $0x0, 0x10(BX)(CX*8) . . 10cbc41: LEAQ 0(BX)(CX*8), DI ;index.go:19 . . 10cbc45: CMPL $0x0, runtime.writeBarrier(SB) . . 10cbc4c: JNE 0x10cbc54 . . 10cbc4e: MOVQ DX, 0(BX)(CX*8) . . 10cbc52: JMP 0x10cbbee . . 10cbc54: MOVQ AX, CX ;index.go:18 . . 10cbc57: MOVQ DX, AX ;index.go:19 . . 10cbc5a: CALL runtime.gcWriteBarrier(SB) . . 10cbc5f: MOVQ CX, AX ;index.go:18 . . 10cbc62: JMP 0x10cbbee ;index.go:19 . . 10cbc64: NOPL ;murmur64.go:18 . . 10cbc65: MOVL $0x0, 0(SP) ;murmur64.go:22 . . 10cbc6c: CALL erichgess/wordladder/vendor/github.com/spaolacci/murmur3.New128WithSeed(SB) . . 10cbc71: MOVQ 0x10(SP), AX . . 10cbc76: MOVQ 0x8(SP), CX . . 10cbc7b: LEAQ go.itab.*erichgess/wordladder/vendor/github.com/spaolacci/murmur3.digest128,erichgess/wordladder/vendor/github.com/spaolacci/murmur3.Hash128(SB), DX . . 10cbc82: CMPQ DX, CX . . 10cbc85: JNE 0x10cbd8c . . 10cbc8b: MOVQ AX, 0x28(SP) . . 10cbc90: LEAQ runtime.types+88768(SB), AX ;index.go:23 . . 10cbc97: MOVQ AX, 0(SP) . . 10cbc9b: MOVQ $0x0, 0x8(SP) . . 10cbca4: MOVQ 0x58(SP), AX . . 10cbca9: MOVQ AX, 0x10(SP) . . 10cbcae: CALL runtime.makeslice(SB) . . 10cbcb3: MOVQ 0x18(SP), AX . . 10cbcb8: MOVQ AX, 0x30(SP) . . 10cbcbd: LEAQ runtime.types+195072(SB), CX ;index.go:25 . . 10cbcc4: MOVQ CX, 0(SP) . . 10cbcc8: CALL runtime.newobject(SB) . . 10cbccd: MOVQ 0x8(SP), AX ;index.go:22 . . 10cbcd2: LEAQ go.itab.*erichgess/wordladder/vendor/github.com/spaolacci/murmur3.digest64,hash.Hash64(SB), CX . . 10cbcd9: MOVQ CX, 0(AX) . . 10cbcdc: CMPL $0x0, runtime.writeBarrier(SB) . . 10cbce3: JNE 0x10cbd73 . . 10cbce9: MOVQ 0x28(SP), CX . . 10cbcee: MOVQ CX, 0x8(AX) . . 10cbcf2: MOVQ $0x0, 0x30(AX) ;index.go:23 . . 10cbcfa: MOVQ 0x58(SP), CX . . 10cbcff: MOVQ CX, 0x38(AX) . . 10cbd03: CMPL $0x0, runtime.writeBarrier(SB) . . 10cbd0a: JNE 0x10cbd5d . . 10cbd0c: MOVQ 0x30(SP), CX . . 10cbd11: MOVQ CX, 0x28(AX) . . 10cbd15: MOVQ 0x50(SP), CX ;index.go:24 . . 10cbd1a: MOVQ CX, 0x18(AX) . . 10cbd1e: MOVQ CX, 0x20(AX) . . 10cbd22: CMPL $0x0, runtime.writeBarrier(SB) . . 10cbd29: JNE 0x10cbd47 . . 10cbd2b: MOVQ 0x38(SP), DX . . 10cbd30: MOVQ DX, 0x10(AX) . . 10cbd34: MOVQ CX, 0x40(AX) ;index.go:25 . . 10cbd38: MOVQ AX, 0x60(SP) ;index.go:21 . . 10cbd3d: MOVQ 0x40(SP), BP . . 10cbd42: ADDQ $0x48, SP . . 10cbd46: RET . . 10cbd47: LEAQ 0x10(AX), DI ;index.go:24 . . 10cbd4b: MOVQ AX, DX ;index.go:25 . . 10cbd4e: MOVQ 0x38(SP), AX ;index.go:24 . . 10cbd53: CALL runtime.gcWriteBarrier(SB) . . 10cbd58: MOVQ DX, AX ;index.go:25 . . 10cbd5b: JMP 0x10cbd34 ;index.go:24 . . 10cbd5d: LEAQ 0x28(AX), DI ;index.go:23 . . 10cbd61: MOVQ AX, CX ;index.go:25 . . 10cbd64: MOVQ 0x30(SP), AX ;index.go:23 . . 10cbd69: CALL runtime.gcWriteBarrier(SB) . . 10cbd6e: MOVQ CX, AX ;index.go:24 . . 10cbd71: JMP 0x10cbd15 ;index.go:23 . . 10cbd73: LEAQ 0x8(AX), DI ;index.go:22 . . 10cbd77: MOVQ AX, CX ;index.go:25 . . 10cbd7a: MOVQ 0x28(SP), AX ;index.go:22 . . 10cbd7f: CALL runtime.gcWriteBarrier(SB) . . 10cbd84: MOVQ CX, AX ;index.go:23 . . 10cbd87: JMP 0x10cbcf2 ;index.go:22 . . 10cbd8c: MOVQ CX, 0(SP) ;murmur64.go:22 . . 10cbd90: LEAQ runtime.types+199968(SB), AX . . 10cbd97: MOVQ AX, 0x8(SP) . . 10cbd9c: LEAQ runtime.types+156064(SB), AX . . 10cbda3: MOVQ AX, 0x10(SP) . . 10cbda8: CALL runtime.panicdottypeI(SB) . . 10cbdad: NOPL . . 10cbdae: CALL runtime.morestack_noctxt(SB) ;index.go:16 . . 10cbdb3: JMP main.newIndex(SB) . . 10cbdb8: INT $0x3 . . 10cbdb9: INT $0x3 . . 10cbdba: INT $0x3 . . 10cbdbb: INT $0x3 . . 10cbdbc: INT $0x3 . . 10cbdbd: INT $0x3 . . 10cbdbe: INT $0x3 ROUTINE ======================== runtime.main 0 3.84s (flat, cum) 54.31% of Total . . 102caf0: MOVQ GS:0x30, CX ;proc.go:113 . . 102caf9: CMPQ 0x10(CX), SP . . 102cafd: JBE 0x102ce70 . . 102cb03: SUBQ $0x78, SP . . 102cb07: MOVQ BP, 0x70(SP) . . 102cb0c: LEAQ 0x70(SP), BP . . 102cb11: MOVQ GS:0x30, AX ;proc.go:114 . . 102cb1a: MOVQ AX, 0x68(SP) . . 102cb1f: MOVQ 0x30(AX), CX ;proc.go:118 . . 102cb23: MOVQ 0(CX), CX . . 102cb26: MOVQ $0x0, 0x130(CX) ;proc.go:124 . . 102cb31: MOVQ $0x3b9aca00, runtime.maxstacksize(SB) . . 102cb3c: MOVB $0x1, runtime.mainStarted(SB) ;proc.go:130 . . 102cb43: LEAQ go.func.*+949(SB), CX ;proc.go:133 . . 102cb4a: MOVQ CX, 0(SP) . . 102cb4e: CALL runtime.systemstack(SB) . . 102cb53: MOVQ GS:0x30, AX ;proc.go:3550 . . 102cb5c: MOVQ 0x30(AX), AX . . 102cb60: NOPL ;proc.go:144 . . 102cb61: INCL 0x274(AX) ;proc.go:3550 . . 102cb67: MOVQ GS:0x30, AX ;proc.go:3511 . . 102cb70: MOVQ 0x30(AX), CX ;proc.go:3512 . . 102cb74: NOPL ;proc.go:3551 . . 102cb75: MOVQ AX, DX ;runtime2.go:254 . . 102cb78: MOVQ AX, 0x168(CX) . . 102cb7f: MOVQ 0x30(DX), AX ;proc.go:3513 . . 102cb83: MOVQ AX, 0xd8(DX) ;runtime2.go:292 . . 102cb8a: MOVQ 0x68(SP), AX ;proc.go:146 . . 102cb8f: MOVQ 0x30(AX), AX . . 102cb93: LEAQ runtime.m0(SB), CX . . 102cb9a: CMPQ CX, AX . . 102cb9d: JNE 0x102ce56 . . 102cba3: LEAQ runtime..inittask(SB), AX ;proc.go:150 . . 102cbaa: MOVQ AX, 0(SP) . . 102cbae: CALL runtime.doInit(SB) . . 102cbb3: CALL runtime.nanotime(SB) ;proc.go:151 . . 102cbb8: CMPQ $0x0, 0(SP) . . 102cbbd: JE 0x102ce3d . . 102cbc3: MOVB $0x1, 0x27(SP) ;proc.go:156 . . 102cbc8: MOVL $0x8, 0x30(SP) ;proc.go:157 . . 102cbd0: LEAQ go.func.*+957(SB), AX . . 102cbd7: MOVQ AX, 0x48(SP) . . 102cbdc: LEAQ 0x27(SP), AX . . 102cbe1: MOVQ AX, 0x60(SP) . . 102cbe6: LEAQ 0x30(SP), AX . . 102cbeb: MOVQ AX, 0(SP) . . 102cbef: CALL runtime.deferprocStack(SB) . . 102cbf4: TESTL AX, AX . . 102cbf6: JNE 0x102cdc9 . . 102cbfc: CALL runtime.nanotime(SB) ;proc.go:164 . . 102cc01: MOVQ 0(SP), AX . . 102cc05: MOVQ AX, runtime.runtimeInitTime(SB) . . 102cc0c: CALL runtime.gcenable(SB) ;proc.go:166 . . 102cc11: LEAQ runtime.types+83008(SB), AX ;proc.go:168 . . 102cc18: MOVQ AX, 0(SP) . . 102cc1c: MOVQ $0x0, 0x8(SP) . . 102cc25: CALL runtime.makechan(SB) . . 102cc2a: MOVQ 0x10(SP), AX . . 102cc2f: CMPL $0x0, runtime.writeBarrier(SB) . . 102cc36: JNE 0x102cdb8 . . 102cc3c: MOVQ AX, runtime.main_init_done(SB) . . 102cc43: CMPB $0x0, runtime.iscgo(SB) ;proc.go:169 . . 102cc4a: JE 0x102ccba . . 102cc4c: CMPQ $0x0, __cgo_thread_start(SB) ;proc.go:170 . . 102cc54: JE 0x102ce24 . . 102cc5a: CMPQ $0x0, runtime._cgo_setenv(SB) ;proc.go:174 . . 102cc62: JE 0x102ce0b . . 102cc68: CMPQ $0x0, runtime._cgo_unsetenv(SB) ;proc.go:177 . . 102cc70: JE 0x102cdf2 ;proc.go:181 . . 102cc76: CMPQ $0x0, __cgo_notify_runtime_init_done(SB) . . 102cc7e: JE 0x102cdd9 . . 102cc84: XORL AX, AX ;proc.go:1865 . . 102cc86: LEAQ runtime.newmHandoff+32(SB), CX . . 102cc8d: MOVL $0x1, DX . . 102cc92: LOCK CMPXCHGL DX, 0(CX) . . 102cc96: SETE CL . . 102cc99: TESTL CL, CL . . 102cc9b: JNE 0x102cd9a ;proc.go:187 . . 102cca1: MOVQ __cgo_notify_runtime_init_done(SB), AX . . 102cca8: MOVQ AX, 0(SP) . . 102ccac: MOVQ $0x0, 0x8(SP) . . 102ccb5: CALL runtime.cgocall(SB) . . 102ccba: LEAQ main..inittask(SB), AX ;proc.go:190 . . 102ccc1: MOVQ AX, 0(SP) . . 102ccc5: CALL runtime.doInit(SB) . . 102ccca: MOVQ runtime.main_init_done(SB), AX ;proc.go:192 . . 102ccd1: MOVQ AX, 0(SP) . . 102ccd5: CALL runtime.closechan(SB) . . 102ccda: MOVB $0x0, 0x27(SP) ;proc.go:194 . . 102ccdf: CALL runtime.unlockOSThread(SB) ;proc.go:195 . . 102cce4: CMPB $0x0, runtime.isarchive(SB) ;proc.go:197 . . 102cceb: JNE 0x102cd8a . . 102ccf1: CMPB $0x0, runtime.islibrary(SB) . . 102ccf8: JNE 0x102cd8a . . 102ccfe: MOVQ go.func.*+965(SB), AX ;proc.go:203 . . 102cd05: LEAQ go.func.*+965(SB), DX . 3.84s 102cd0c: CALL AX ;runtime.main proc.go:203 . . 102cd0e: MOVL runtime.runningPanicDefers(SB), AX ;proc.go:212 . . 102cd14: TESTL AX, AX . . 102cd16: JE 0x102cd4c . . 102cd18: XORL AX, AX . . 102cd1a: JMP 0x102cd3a ;proc.go:214 . . 102cd1c: MOVQ AX, 0x28(SP) . . 102cd21: NOPL ;proc.go:218 . . 102cd22: LEAQ go.func.*+893(SB), AX ;proc.go:269 . . 102cd29: MOVQ AX, 0(SP) . . 102cd2d: CALL runtime.mcall(SB) . . 102cd32: MOVQ 0x28(SP), AX ;proc.go:214 . . 102cd37: INCQ AX . . 102cd3a: CMPQ $0x3e8, AX . . 102cd40: JGE 0x102cd4c . . 102cd42: MOVL runtime.runningPanicDefers(SB), CX ;proc.go:215 . . 102cd48: TESTL CX, CX . . 102cd4a: JNE 0x102cd1c . . 102cd4c: MOVL runtime.panicking(SB), AX ;proc.go:221 . . 102cd52: TESTL AX, AX . . 102cd54: JNE 0x102cd6c . . 102cd56: MOVL $0x0, 0(SP) ;proc.go:225 . . 102cd5d: CALL runtime.exit(SB) . . 102cd62: XORL AX, AX ;proc.go:228 . . 102cd64: MOVL $0x0, 0(AX) . . 102cd6a: JMP 0x102cd62 . . 102cd6c: XORPS X0, X0 ;proc.go:222 . . 102cd6f: MOVUPS X0, 0(SP) . . 102cd73: MOVW $0x1008, 0x10(SP) . . 102cd7a: MOVQ $0x1, 0x18(SP) . . 102cd83: CALL runtime.gopark(SB) . . 102cd88: JMP 0x102cd56 . . 102cd8a: NOPL ;proc.go:200 . . 102cd8b: CALL runtime.deferreturn(SB) . . 102cd90: MOVQ 0x70(SP), BP . . 102cd95: ADDQ $0x78, SP . . 102cd99: RET . . 102cd9a: LEAQ go.func.*+1509(SB), AX ;proc.go:1868 . . 102cda1: MOVQ AX, 0(SP) . . 102cda5: MOVQ $0x0, 0x8(SP) . . 102cdae: CALL runtime.newm(SB) . . 102cdb3: JMP 0x102cca1 ;proc.go:186 . . 102cdb8: LEAQ runtime.main_init_done(SB), DI ;proc.go:168 . . 102cdbf: CALL runtime.gcWriteBarrier(SB) . . 102cdc4: JMP 0x102cc43 . . 102cdc9: NOPL ;proc.go:157 . . 102cdca: CALL runtime.deferreturn(SB) . . 102cdcf: MOVQ 0x70(SP), BP . . 102cdd4: ADDQ $0x78, SP . . 102cdd8: RET . . 102cdd9: LEAQ go.string.*+25131(SB), AX ;proc.go:182 . . 102cde0: MOVQ AX, 0(SP) . . 102cde4: MOVQ $0x25, 0x8(SP) . . 102cded: CALL runtime.throw(SB) . . 102cdf2: LEAQ go.string.*+11787(SB), AX ;proc.go:178 . . 102cdf9: MOVQ AX, 0(SP) . . 102cdfd: MOVQ $0x15, 0x8(SP) . . 102ce06: CALL runtime.throw(SB) . . 102ce0b: LEAQ go.string.*+9742(SB), AX ;proc.go:175 . . 102ce12: MOVQ AX, 0(SP) . . 102ce16: MOVQ $0x13, 0x8(SP) . . 102ce1f: CALL runtime.throw(SB) . . 102ce24: LEAQ go.string.*+14919(SB), AX ;proc.go:171 . . 102ce2b: MOVQ AX, 0(SP) . . 102ce2f: MOVQ $0x19, 0x8(SP) . . 102ce38: CALL runtime.throw(SB) . . 102ce3d: LEAQ go.string.*+13763(SB), AX ;proc.go:152 . . 102ce44: MOVQ AX, 0(SP) . . 102ce48: MOVQ $0x17, 0x8(SP) . . 102ce51: CALL runtime.throw(SB) . . 102ce56: LEAQ go.string.*+12882(SB), AX ;proc.go:147 . . 102ce5d: MOVQ AX, 0(SP) . . 102ce61: MOVQ $0x16, 0x8(SP) . . 102ce6a: CALL runtime.throw(SB) . . 102ce6f: NOPL . . 102ce70: CALL runtime.morestack_noctxt(SB) ;proc.go:113 . . 102ce75: JMP runtime.main(SB) . . 102ce7a: INT $0x3 . . 102ce7b: INT $0x3 . . 102ce7c: INT $0x3 . . 102ce7d: INT $0x3 . . 102ce7e: INT $0x3
Compiler/src/main/java/com/allogica/allogen/idl/grammar/IDL.g4
Allogica/Allogen
3
2351
<reponame>Allogica/Allogen /* * Copyright (c) 2017, Allogica * * 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 Allogen 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 OWNER 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. */ grammar IDL; sourcefile: declarations? EOF; declarations: declaration+ ; declaration: namespacedefinition | classdefinition ; regulartypename: Identifier ('::' Identifier)* ; lambdatype: regulartypename '(' methodarguments? ')' ; typename: (regulartypename typenametemplateargs? | lambdatype) ; typenametemplateargs: ('<' typename (',' typename)* '>') ; /* Namespaces */ namespacename: Identifier ; namespacedefinition: Namespace namespacename '{' namespacebody '}' ; namespacebody: declarations? ; /* Classes */ classname: Identifier ; classdefinition: DocumentationBlock? annotation* (Static|Abstract)? Class classname classextends? '{' classbody '}' ';'? ; classextends: Extends typename ; classbody: includedefinition* constructordefinition* destructordefinition? methoddefinition* ; /* Includes */ includedefinition: LineDirective ; /* Constructors & Destructors */ constructordefinition: annotation* 'constructor' '(' methodarguments? ')' methodbody? ';'? ; destructordefinition: annotation* 'destructor' '(' ')' methodbody? ';'? ; /* Methods */ methodname: Identifier ; methoddefinition: annotation* Static? methodreturn methodname '(' methodarguments? ')' methodbody? ';'? ; methodreturn: typename; methodarguments: methodargument (',' methodargument)* ; argumentname: Identifier; argumenttype: typename; methodargument: DocumentationBlock? annotation* argumentname ':' argumenttype ; methodbody: methodbodycontent?; block: OPEN_CURLY (~CLOSE_CURLY | block)* CLOSE_CURLY; OPEN_CURLY: '{'; CLOSE_CURLY: '}'; methodbodycontent: block; /* Annotations */ annotationname: Identifier ; annotation: Annotation annotationname ('(' annotationbody ')')? ; annotationparamname: Identifier ; annotationparamvalue: literal ; annotationbody: (annotationparamname ( '=' annotationparamvalue ','? )?)+ ; /* Literals */ literal: Integerliteral | Stringliteral | booleanliteral | Floatingliteral ; Integerliteral: Decimalliteral | Hexadecimalliteral ; Decimalliteral: NONZERODIGIT ( '\''? DIGIT )* ; Hexadecimalliteral: ( '0x' | '0X' ) HEXADECIMALDIGIT ( '\''? HEXADECIMALDIGIT )* ; fragment HEXADECIMALDIGIT: [0-9a-fA-F] ; booleanliteral: False | True ; /* Identifiers */ Namespace: 'namespace'; Class: 'class'; Extends: 'extends'; Abstract: 'abstract'; Constructor: 'constructor'; Destructor: 'destructor'; Static: 'static'; Annotation: '@'; Identifier: Identifiernondigit ( Identifiernondigit | DIGIT )* ; False: 'false'; True: 'true'; Stringliteral: '"' Schar* '"' ; fragment Schar: ~["\\\r\n] | Escapesequence; fragment Escapesequence: Simpleescapesequence ; fragment Simpleescapesequence: '\\\'' | '\\"' | '\\?' | '\\\\' | '\\a' | '\\b' | '\\f' | '\\n' | '\\r' | '\\t' | '\\v' ; Floatingliteral: Fractionalconstant Exponentpart? Floatingsuffix? | Digitsequence Exponentpart Floatingsuffix? ; fragment Fractionalconstant: Digitsequence? '.' Digitsequence | Digitsequence '.' ; fragment Exponentpart: 'e' SIGN? Digitsequence | 'E' SIGN? Digitsequence ; fragment SIGN: [+-] ; fragment Digitsequence: DIGIT ( '\''? DIGIT )* ; fragment Floatingsuffix: [flFL] ; fragment Identifiernondigit: NONDIGIT ; fragment NONDIGIT: [a-zA-Z_] ; fragment DIGIT: [0-9] ; fragment NONZERODIGIT : [1-9] ; WS: (' '|'\r'|'\n'|'\t') -> channel(HIDDEN); BlockComment: '/*' .*? '*/' -> skip ; LineComment: '//' ~[\r\n]* -> skip ; DocumentationBlock: '///' ~[\r\n]* ; LineDirective: '#' ~[\r\n]*;
Emulator/test.asm
paulscottrobson/elf-replica
0
243240
<reponame>paulscottrobson/elf-replica cpu 1802 r0 = 0 r1 = 1 r2 = 2 r3 = 3 r4 = 4 r5 = 5 ghi r0 phi r1 phi r2 plo r3 plo r4 ldi Main & 255 plo r3 ldi Stack & 255 plo r2 ldi Interrupt & 255 plo r1 sep r3 Return: ldxa ret Interrupt: dec r2 sav dec r2 str r2 nop nop nop ldi 0 phi r0 ldi 0 plo r0 Refresh: glo r0 sex r2 sex r2 dec r0 plo r0 sex r2 dec r0 plo r0 sex r2 dec r0 plo r0 bn1 Refresh br Return Main: sex r2 inp 1 Wait: ldi 0FCh plo r5 sex r5 ldi 081h bn4 NoKey ldi 0FFh NoKey: str r5 inc r5 inc r5 inp 4 out 4 br Wait Stack = 04Eh org 50h ; db 000h,000h,000h,000h,000h,000h,000h,000h ; db 000h,000h,000h,000h,000h,000h,000h,000h db 07Bh,0DEh,0DBh,0DEh,000h,000h,000h,000h db 04Ah,050h,0DAh,052h,000h,000h,000h,000h db 042h,05Eh,0ABh,0D0h,000h,000h,000h,000h db 04Ah,042h,08Ah,052h,000h,000h,000h,000h db 07Bh,0DEh,08Ah,05Eh,000h,000h,000h,000h db 000h,000h,000h,000h,000h,000h,000h,000h db 000h,000h,000h,000h,000h,000h,007h,0E0h db 000h,000h,000h,000h,0FFh,0FFh,0FFh,0FFh db 000h,006h,000h,001h,000h,000h,000h,001h db 000h,07Fh,0E0h,001h,000h,000h,000h,002h db 07Fh,0C0h,03Fh,0E0h,0FCh,0FFh,0FFh,0FEh db 040h,00Fh,000h,010h,004h,080h,000h,000h db 07Fh,0C0h,03Fh,0E0h,004h,080h,000h,000h db 000h,03Fh,0D0h,040h,004h,080h,000h,000h db 000h,00Fh,008h,020h,004h,080h,07Ah,01Eh db 000h,000h,007h,090h,004h,080h,042h,010h db 000h,000h,018h,07Fh,0FCh,0F0h,072h,01Ch db 000h,000h,030h,000h,000h,010h,042h,010h db 000h,000h,073h,0FCh,000h,010h,07Bh,0D0h db 000h,000h,030h,000h,03Fh,0F0h,000h,000h db 000h,000h,018h,00Fh,0C0h,000h,000h,000h db 000h,000h,007h,0F0h,000h,000h,000h,000h
tests/applescript/test.applescript
shawnrice/alfred-bundler
9
2428
on _home() return POSIX path of (path to home folder as text) end _home on _bundler() --One line version of loading the Alfred Bundler into a workflow script set bundler to (load script (my _pwd()) & "alfred.bundler.scpt")'s load_bundler() --Two line version (for clarity's sake) --set bundlet to load script (my _pwd()) & "alfred.bundler.scpt" --set bundler to bundlet's load_bundler() end _bundler my library_tests() my utility_tests() my icon_tests() (* TESTS *) on library_tests() my library_valid_name() = true my library_valid_version() = true my library_invalid_name() = true return true end library_tests on utility_tests() my utility_valid_latest_version() = true my utility_valid_no_version() = true my utility_valid_old_version() = true my utility_invalid_name() = true return true end utility_tests on icon_tests() my icon_invalid_font() = true my icon_invalid_character() = true my icon_invalid_color() = true my icon_valid_color() = true my icon_altered_color() = true my icon_unaltered_color() = true my icon_invalid_system_icon() = true my icon_valid_system_icon() = true return true end icon_tests (* ICON TESTS *) on icon_invalid_system_icon() set icon_path to my _bundler()'s icon("system", "WindowLicker", "", "") if icon_path is equal to (my _home() & "Library/Application Support/Alfred 2/Workflow Data/alfred.bundler-devel/bundler/meta/icons/default.icns") then log "Passed: icon(\"system\", \"WindowLicker\", \"\", \"\")" return true else error "Wrong path to invalid system icon: " & icon_path end if end icon_invalid_system_icon on icon_valid_system_icon() set icon_path to my _bundler()'s icon("system", "Accounts", "", "") if icon_path is equal to "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Accounts.icns" then log "Passed: icon(\"system\", \"Accounts\", \"\", \"\")" return true else error "Wrong path to valid system icon: " & icon_path end if end icon_valid_system_icon on icon_unaltered_color() set icon_path to my _bundler()'s icon("octicons", "markdown", "000", false) if icon_path is equal to (my _home() & "Library/Application Support/Alfred 2/Workflow Data/alfred.bundler-devel/data/assets/icons/octicons/000000/markdown.png") then log "Passed: icon(\"octicons\", \"markdown\", \"000\", false)" return true else error "Wrong path to unaltered icon: " & icon_path end if end icon_unaltered_color on icon_altered_color() set icon_path to my _bundler()'s icon("octicons", "markdown", "000", true) if icon_path is equal to (my _home() & "Library/Application Support/Alfred 2/Workflow Data/alfred.bundler-devel/data/assets/icons/octicons/ffffff/markdown.png") then log "Passed: icon(\"octicons\", \"markdown\", \"000\", true)" return true else error "Wrong path to altered icon: " & icon_path end if end icon_altered_color on icon_valid_color() set icon_path to my _bundler()'s icon("fontawesome", "adjust", "fff", "") if icon_path is equal to (my _home() & "Library/Application Support/Alfred 2/Workflow Data/alfred.bundler-devel/data/assets/icons/fontawesome/ffffff/adjust.png") then log "Passed: icon(\"fontawesome\", \"adjust\", \"fff\", \"\")" return true else error "Wrong path to valid icon: " & icon_path end if end icon_valid_color on icon_invalid_color() try my _bundler()'s icon("fontawesome", "adjust", "hubbahubba", "") on error msg number num --proper error if num = 1 then if msg contains "Hex color" then log "Passed: icon(\"fontawesome\", \"adjust\", \"hubbahubba\", \"\")" return true else error "Wrong error message: " & msg end if else error "Wrong error number: " & num & msg end if end try end icon_invalid_color on icon_invalid_character() try my _bundler()'s icon("fontawesome", "banditry!", "", "") on error msg number num --proper error if num = 1 then if msg contains "404" then log "Passed: icon(\"fontawesome\", \"banditry!\", \"\", \"\")" return true else error "Wrong error message: " & msg end if else error "Wrong error number: " & num end if end try end icon_invalid_character on icon_invalid_font() try my _bundler()'s icon("spaff", "adjust", "", "") on error msg number num --proper error if num = 1 then if msg contains "404" then log "Passed: icon(\"spaff\", \"adjust\", \"\", \"\")" return true else error "Wrong error message: " & msg end if else error "Wrong error number: " & num end if end try end icon_invalid_font (* UTILITY TESTS *) on utility_invalid_name() try my _bundler()'s utility("terminalnotifier", "", "") on error msg number num if num = 11 then if msg contains "command not found" then log "Passed: utility(\"terminalnotifier\", \"\", \"\")" return true else error "Wrong error message: " & msg end if else error "Wrong error number: " & num end if end try end utility_invalid_name on utility_valid_old_version() set util_path to my _bundler()'s utility("pashua", "1.0", "") if util_path is equal to (my _home() & "Library/Application Support/Alfred 2/Workflow Data/alfred.bundler-devel/data/assets/utility/pashua/1.0/Pashua.app/Contents/MacOS/Pashua") then log "Passed: utility(\"pashua\", \"1.0\", \"\")" return true else error "Wrong path to valid utility: " & util_path end if end utility_valid_old_version on utility_valid_latest_version() set util_path to my _bundler()'s utility("pashua", "latest", "") if util_path is equal to (my _home() & "Library/Application Support/Alfred 2/Workflow Data/alfred.bundler-devel/data/assets/utility/pashua/latest/Pashua.app/Contents/MacOS/Pashua") then log "Passed: utility(\"pashua\", \"latest\", \"\")" return true else error "Wrong path to valid utility: " & util_path end if end utility_valid_latest_version on utility_valid_no_version() set util_path to my _bundler()'s utility("pashua", "", "") if util_path is equal to (my _home() & "Library/Application Support/Alfred 2/Workflow Data/alfred.bundler-devel/data/assets/utility/pashua/latest/Pashua.app/Contents/MacOS/Pashua") then log "Passed: utility(\"pashua\", \"\", \"\")" return true else error "Wrong path to valid utility: " & util_path end if end utility_valid_no_version (* LIBRARY TESTS *) on library_invalid_name() try my _bundler()'s library("hello", "", "") on error msg number num if num = 11 then if msg contains "command not found" then log "Passed: library(\"hello\", \"\", \"\")" return true else error "Wrong error message: " & msg end if else error "Wrong error number: " & num end if end try end library_invalid_name on library_valid_version() set list_er to my _bundler()'s library("_list", "latest", "") if list_er's isAllOfClass({1, 2, 3}, integer) = true then log "Passed: library(\"_list\", \"latest\", \"\")" return true else error "Library function did not act properly." end if end library_valid_version on library_valid_name() set url_er to my _bundler()'s library("_url", "", "") if url_er's urlEncode("hello world") = "hello%20world" then log "Passed: library(\"_url\", \"\", \"\")" return true else error "Library function did not act properly." end if end library_valid_name -- on _pwd() set {ASTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "/"} set _path to (text items 1 thru -2 of (POSIX path of (path to me)) as string) & "/" set AppleScript's text item delimiters to ASTID return _path end _pwd
src/x86/refmvs.asm
feiwei9696/dav1d
220
87258
<reponame>feiwei9696/dav1d<gh_stars>100-1000 ; Copyright © 2021, VideoLAN and dav1d authors ; Copyright © 2021, Two Orioles, LLC ; All rights reserved. ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions are met: ; ; 1. Redistributions of source code must retain the above copyright notice, this ; list of conditions and the following disclaimer. ; ; 2. 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. ; ; 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 OWNER 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. %include "config.asm" %include "ext/x86/x86inc.asm" SECTION_RODATA 64 %macro JMP_TABLE 2-* %xdefine %%prefix mangle(private_prefix %+ _%1) %1_table: %xdefine %%base %1_table %rep %0 - 1 dd %%prefix %+ .w%2 - %%base %rotate 1 %endrep %endmacro %if ARCH_X86_64 splat_mv_shuf: db 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 1, 2, 3 db 4, 5, 6, 7, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5, 6, 7 db 8, 9, 10, 11, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 db 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 1, 2, 3 JMP_TABLE splat_mv_avx512icl, 1, 2, 4, 8, 16, 32 JMP_TABLE splat_mv_avx2, 1, 2, 4, 8, 16, 32 %endif JMP_TABLE splat_mv_sse2, 1, 2, 4, 8, 16, 32 SECTION .text INIT_XMM sse2 ; refmvs_block **rr, refmvs_block *a, int bx4, int bw4, int bh4 cglobal splat_mv, 4, 5, 3, rr, a, bx4, bw4, bh4 add bx4d, bw4d tzcnt bw4d, bw4d mova m2, [aq] LEA aq, splat_mv_sse2_table lea bx4q, [bx4q*3-32] movsxd bw4q, [aq+bw4q*4] movifnidn bh4d, bh4m pshufd m0, m2, q0210 pshufd m1, m2, q1021 pshufd m2, m2, q2102 add bw4q, aq .loop: mov aq, [rrq] add rrq, gprsize lea aq, [aq+bx4q*4] jmp bw4q .w32: mova [aq-16*16], m0 mova [aq-16*15], m1 mova [aq-16*14], m2 mova [aq-16*13], m0 mova [aq-16*12], m1 mova [aq-16*11], m2 mova [aq-16*10], m0 mova [aq-16* 9], m1 mova [aq-16* 8], m2 mova [aq-16* 7], m0 mova [aq-16* 6], m1 mova [aq-16* 5], m2 .w16: mova [aq-16* 4], m0 mova [aq-16* 3], m1 mova [aq-16* 2], m2 mova [aq-16* 1], m0 mova [aq+16* 0], m1 mova [aq+16* 1], m2 .w8: mova [aq+16* 2], m0 mova [aq+16* 3], m1 mova [aq+16* 4], m2 .w4: mova [aq+16* 5], m0 mova [aq+16* 6], m1 mova [aq+16* 7], m2 dec bh4d jg .loop RET .w2: movu [aq+104], m0 movq [aq+120], m1 dec bh4d jg .loop RET .w1: movq [aq+116], m0 movd [aq+124], m2 dec bh4d jg .loop RET %if ARCH_X86_64 INIT_YMM avx2 cglobal splat_mv, 4, 5, 3, rr, a, bx4, bw4, bh4 add bx4d, bw4d tzcnt bw4d, bw4d vbroadcasti128 m0, [aq] lea aq, [splat_mv_avx2_table] lea bx4q, [bx4q*3-32] movsxd bw4q, [aq+bw4q*4] pshufb m0, [splat_mv_shuf] movifnidn bh4d, bh4m pshufd m1, m0, q2102 pshufd m2, m0, q1021 add bw4q, aq .loop: mov aq, [rrq] add rrq, gprsize lea aq, [aq+bx4q*4] jmp bw4q .w32: mova [aq-32*8], m0 mova [aq-32*7], m1 mova [aq-32*6], m2 mova [aq-32*5], m0 mova [aq-32*4], m1 mova [aq-32*3], m2 .w16: mova [aq-32*2], m0 mova [aq-32*1], m1 mova [aq+32*0], m2 .w8: mova [aq+32*1], m0 mova [aq+32*2], m1 mova [aq+32*3], m2 dec bh4d jg .loop RET .w4: movu [aq+ 80], m0 mova [aq+112], xm1 dec bh4d jg .loop RET .w2: movu [aq+104], xm0 movq [aq+120], xm2 dec bh4d jg .loop RET .w1: movq [aq+116], xm0 movd [aq+124], xm1 dec bh4d jg .loop RET INIT_ZMM avx512icl cglobal splat_mv, 4, 7, 3, rr, a, bx4, bw4, bh4 vbroadcasti32x4 m0, [aq] lea r1, [splat_mv_avx512icl_table] tzcnt bw4d, bw4d lea bx4d, [bx4q*3] pshufb m0, [splat_mv_shuf] movsxd bw4q, [r1+bw4q*4] mov r6d, bh4m add bw4q, r1 lea rrq, [rrq+r6*8] mov r1d, 0x3f neg r6 kmovb k1, r1d jmp bw4q .w1: mov r1, [rrq+r6*8] vmovdqu16 [r1+bx4q*4]{k1}, xm0 inc r6 jl .w1 RET .w2: mov r1, [rrq+r6*8] vmovdqu32 [r1+bx4q*4]{k1}, ym0 inc r6 jl .w2 RET .w4: mov r1, [rrq+r6*8] vmovdqu64 [r1+bx4q*4]{k1}, m0 inc r6 jl .w4 RET .w8: pshufd ym1, ym0, q1021 .w8_loop: mov r1, [rrq+r6*8+0] mov r3, [rrq+r6*8+8] movu [r1+bx4q*4+ 0], m0 mova [r1+bx4q*4+64], ym1 movu [r3+bx4q*4+ 0], m0 mova [r3+bx4q*4+64], ym1 add r6, 2 jl .w8_loop RET .w16: pshufd m1, m0, q1021 pshufd m2, m0, q2102 .w16_loop: mov r1, [rrq+r6*8+0] mov r3, [rrq+r6*8+8] mova [r1+bx4q*4+64*0], m0 mova [r1+bx4q*4+64*1], m1 mova [r1+bx4q*4+64*2], m2 mova [r3+bx4q*4+64*0], m0 mova [r3+bx4q*4+64*1], m1 mova [r3+bx4q*4+64*2], m2 add r6, 2 jl .w16_loop RET .w32: pshufd m1, m0, q1021 pshufd m2, m0, q2102 .w32_loop: mov r1, [rrq+r6*8] lea r1, [r1+bx4q*4] mova [r1+64*0], m0 mova [r1+64*1], m1 mova [r1+64*2], m2 mova [r1+64*3], m0 mova [r1+64*4], m1 mova [r1+64*5], m2 inc r6 jl .w32_loop RET %endif ; ARCH_X86_64
smsq/q40/preloader.asm
olifink/smsqe
0
25822
; SMSQ Q40 Preloader section preloader include 'dev8_keys_q40' include 'dev8_keys_q40_multiIO' load_base equ $30000 dc.l pl_end-pl_base pl_base bra.s pl_start dc.w 0 dc.l pl_start-pl_base pl_start lea load_base,a0 ; set load base and sp move.l a0,sp clr.b q40_ebr ; enable extension bus move.b #com.dlab,com1+como_lcr move.b #com.dlab,com1+como_lcr move.b #com.dlab,com1+como_lcr move.b #115200/9600,com1+como_dll ; 9600 clr.b com1+como_dlh move.b #com.8bit+com.2stop,com1+como_lcr moveq #$a,d1 bsr.s pl_sbyte pl_wait btst #com..temt,com1+como_lsr ; wait for shift reg to be empty beq.s pl_wait ; ... wait move.b #com.dlab,com1+como_lcr move.b #115200/38400,com1+como_dll ; 38400 clr.b com1+como_dlh move.b #com.8bit+com.2stop,com1+como_lcr move.b #3,com1+como_mcr ; enable RTS DTR bsr.s pl_rbyte ; get the file length lsl.l #8,d1 bsr.s pl_rbyte ; get the file length lsl.l #8,d1 bsr.s pl_rbyte ; get the file length lsl.l #8,d1 bsr.s pl_rbyte ; get the file length move.l d1,d2 move.l a0,a1 ; copy to load base pl_rloop bsr.s pl_rbyte ; read byte move.b d1,(a1)+ subq.l #1,d2 bgt.s pl_rloop move.b #0,com1+como_mcr ; disable RTS DTR jmp (a0) pl_sbyte btst #com..thre,com1+como_lsr ; holding reg free? beq.s pl_sbyte ; ... wait btst #com..cts,com1+como_msr ; clear to send beq.s pl_sbyte ; ... no move.b d1,com1+como_txdr ; send newline rts pl_rbyte btst #com..dr,com1+como_lsr ; anything there? beq.s pl_rbyte ; ... no move.b com1+como_rxdr,d1 ; ... yes, get it rts pl_end end
test/Fail/Issue3590-2.agda
cruhland/agda
1,989
2009
<reponame>cruhland/agda -- The debug output should include the text "Termination checking -- mutual block MutId 0" once, not three times. {-# OPTIONS -vterm.mutual.id:40 #-} open import Agda.Builtin.Nat record R : Set₁ where field A : Set f0 : Nat → Nat f0 zero = zero f0 (suc n) = f0 n f1 : Nat → Nat f1 zero = zero f1 (suc n) = f1 n f2 : Nat → Nat f2 zero = zero f2 (suc n) = f2 n -- Included in order to make the code fail to type-check. Bad : Set Bad = Set
lib/avx512/mb_mgr_snow3g_uia2_submit_flush_vaes_avx512.asm
jkivilin/intel-ipsec-mb
1
98550
<reponame>jkivilin/intel-ipsec-mb<filename>lib/avx512/mb_mgr_snow3g_uia2_submit_flush_vaes_avx512.asm ;; ;; Copyright (c) 2021-2022, Intel Corporation ;; ;; 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 Intel Corporation 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 OWNER 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. ;; %include "include/os.asm" %include "include/imb_job.asm" %include "include/mb_mgr_datastruct.asm" %include "include/constants.asm" %include "include/cet.inc" %include "include/reg_sizes.asm" %include "include/const.inc" %include "include/clear_regs.asm" %include "avx512/snow3g_uea2_by16_vaes_avx512.asm" %ifndef SUBMIT_JOB_SNOW3G_UIA2 %define SUBMIT_JOB_SNOW3G_UIA2_GEN2 submit_job_snow3g_uia2_vaes_avx512 %define FLUSH_JOB_SNOW3G_UIA2_GEN2 flush_job_snow3g_uia2_vaes_avx512 %define SNOW3G_F9_1_BUFFER_INT_GEN2 snow3g_f9_1_buffer_internal_vaes_avx512 %define SUBMIT_JOB_SNOW3G_UIA2 submit_job_snow3g_uia2_avx512 %define FLUSH_JOB_SNOW3G_UIA2 flush_job_snow3g_uia2_avx512 %define SNOW3G_F9_1_BUFFER_INT snow3g_f9_1_buffer_internal_avx %endif mksection .rodata default rel extern snow3g_f9_1_buffer_internal_vaes_avx512 extern snow3g_f9_1_buffer_internal_avx %ifdef LINUX %define arg1 rdi %define arg2 rsi %define arg3 rdx %define arg4 rcx %else %define arg1 rcx %define arg2 rdx %define arg3 r8 %define arg4 r9 %endif %define state arg1 %define job arg2 %define job_rax rax mksection .text %define APPEND(a,b) a %+ b %macro SUBMIT_FLUSH_JOB_SNOW3G_UIA2 2 %define %%SUBMIT_FLUSH %1 %define %%GEN %2 ;; [in] avx512_gen1/avx512_gen2 ; idx needs to be in rbp %define len rbp %define idx rbp %define lane r8 %define unused_lanes rbx %define tmp r12 %define tmp2 r13 %define tmp3 r14 %define init_lanes r15 %xdefine tmp_state tmp2 SNOW3G_FUNC_START %ifidn %%SUBMIT_FLUSH, submit mov unused_lanes, [state + _snow3g_unused_lanes] mov lane, unused_lanes and lane, 0xF ;; just a nibble shr unused_lanes, 4 mov [state + _snow3g_unused_lanes], unused_lanes add qword [state + _snow3g_lanes_in_use], 1 mov [state + _snow3g_job_in_lane + lane*8], job ;; set lane mask xor DWORD(tmp), DWORD(tmp) bts DWORD(tmp), DWORD(lane) kmovw k1, DWORD(tmp) ;; copy input, key and iv pointers to OOO mgr mov tmp, [job + _src] add tmp, [job + _hash_start_src_offset_in_bytes] mov [state + _snow3g_args_in + lane*8], tmp mov tmp, [job + _snow3g_uia2_key] mov [state + _snow3g_args_keys + lane*8], tmp mov tmp, [job + _snow3g_uia2_iv] mov [state + _snow3g_args_IV + lane*8], tmp ;; insert len into proper lane mov len, [job + _msg_len_to_hash_in_bits] ;; Update lane len vpbroadcastd zmm1, DWORD(len) vmovdqa32 [state + _snow3g_lens]{k1}, zmm1 cmp qword [state + _snow3g_lanes_in_use], 16 jne %%return_null_uia2 ;; all lanes full and no jobs initialized - do init ;; otherwise process next job cmp word [state + _snow3g_init_done], 0 jz %%init_all_lanes_uia2 ;; find next initialized job index xor DWORD(idx), DWORD(idx) bsf WORD(idx), word [state + _snow3g_init_done] %else ;; FLUSH ; check ooo mgr empty cmp qword [state + _snow3g_lanes_in_use], 0 jz %%return_null_uia2 ; check for initialized jobs movzx DWORD(tmp), word [state + _snow3g_init_done] bsf DWORD(idx), DWORD(tmp) jnz %%process_job_uia2 ; no initialized jobs found ; - find valid job ; - copy valid job fields to empty lanes ; - initialize all lanes ; find null lanes vpxorq zmm0, zmm0 vmovdqa64 zmm1, [state + _snow3g_job_in_lane] vmovdqa64 zmm2, [state + _snow3g_job_in_lane + (8*8)] vpcmpq k1, zmm1, zmm0, 0 ; EQ ; mask of null jobs (L8) vpcmpq k2, zmm2, zmm0, 0 ; EQ ; mask of null jobs (H8) kshiftlw k3, k2, 8 korw k3, k3, k1 ; mask of NULL jobs for all lanes ;; find first valid job kmovw DWORD(init_lanes), k3 not WORD(init_lanes) bsf DWORD(idx), DWORD(init_lanes) ;; copy input pointers mov tmp3, [state + _snow3g_args_in + idx*8] vpbroadcastq zmm1, tmp3 vmovdqa64 [state + _snow3g_args_in + (0*8)]{k1}, zmm1 vmovdqa64 [state + _snow3g_args_in + (8*8)]{k2}, zmm1 ;; - copy key pointers mov tmp3, [state + _snow3g_args_keys + idx*8] vpbroadcastq zmm1, tmp3 vmovdqa64 [state + _snow3g_args_keys + (0*8)]{k1}, zmm1 vmovdqa64 [state + _snow3g_args_keys + (8*8)]{k2}, zmm1 ;; - copy IV pointers mov tmp3, [state + _snow3g_args_IV + idx*8] vpbroadcastq zmm1, tmp3 vmovdqa64 [state + _snow3g_args_IV + (0*8)]{k1}, zmm1 vmovdqa64 [state + _snow3g_args_IV + (8*8)]{k2}, zmm1 jmp %%init_lanes_uia2 %endif %%process_job_uia2: ;; preserve state for function call mov tmp_state, state mov arg1, [tmp_state + _snow3g_args_in + idx*8] lea arg2, [idx*8] lea arg2, [tmp_state + _snow3g_ks + arg2*4] ;; arg2*4 = idx*32 mov DWORD(arg3), dword [tmp_state + _snow3g_lens + idx*4] %ifidn %%GEN, avx512_gen2 call SNOW3G_F9_1_BUFFER_INT_GEN2 %else call SNOW3G_F9_1_BUFFER_INT %endif ;; restore state mov state, tmp_state ;; copy digest temporarily mov DWORD(tmp), eax %%process_completed_job_submit_uia2: ; process completed job "idx" ;; - decrement number of jobs in use sub qword [state + _snow3g_lanes_in_use], 1 mov job_rax, [state + _snow3g_job_in_lane + idx*8] mov unused_lanes, [state + _snow3g_unused_lanes] mov qword [state + _snow3g_job_in_lane + idx*8], 0 or dword [job_rax + _status], IMB_STATUS_COMPLETED_AUTH ; Copy digest to auth tag output mov tmp2, [job_rax + _auth_tag_output] mov [tmp2], DWORD(tmp) shl unused_lanes, 4 or unused_lanes, idx mov [state + _snow3g_unused_lanes], unused_lanes btr [state + _snow3g_init_done], WORD(idx) %ifdef SAFE_DATA ;; clear keystream for processed job vpxorq ymm0, ymm0 shl WORD(idx), 5 ;; ks stored at 32 byte offsets vmovdqa32 [state + _snow3g_ks + idx], ymm0 %endif jmp %%return_uia2 %%init_all_lanes_uia2: ;; set initialized lanes mask for all 16 lanes ;; this is used to update OOO MGR after initialization mov DWORD(init_lanes), 0xffff %%init_lanes_uia2: SNOW3G_AUTH_INIT_5 {state + _snow3g_args_keys}, \ {state + _snow3g_args_IV}, \ {state + _snow3g_ks}, \ tmp, tmp2, k1, k2, k3, k4, k5, k6, \ %%GEN ;; update init_done for valid initialized lanes mov [state + _snow3g_init_done], WORD(init_lanes) bsf DWORD(idx), DWORD(init_lanes) ;; process first job jmp %%process_job_uia2 %%return_uia2: %ifdef SAFE_DATA clear_scratch_zmms_asm %endif ;; vzeroupper done as part of SNOW3G_FUNC_END if SAFE_DATA=n SNOW3G_FUNC_END ret %%return_null_uia2: xor job_rax, job_rax jmp %%return_uia2 %endmacro ; JOB* SUBMIT_JOB_SNOW3G_UIA2(MB_MGR_SNOW3G_OOO *state, IMB_JOB *job) ; arg 1 : state ; arg 2 : job MKGLOBAL(SUBMIT_JOB_SNOW3G_UIA2_GEN2,function,internal) SUBMIT_JOB_SNOW3G_UIA2_GEN2: endbranch64 SUBMIT_FLUSH_JOB_SNOW3G_UIA2 submit, avx512_gen2 MKGLOBAL(SUBMIT_JOB_SNOW3G_UIA2,function,internal) SUBMIT_JOB_SNOW3G_UIA2: endbranch64 SUBMIT_FLUSH_JOB_SNOW3G_UIA2 submit, avx512_gen1 ; JOB* FLUSH_JOB_SNOW3G_UIA2(MB_MGR_SNOW3G_OOO *state) ; arg 1 : state MKGLOBAL(FLUSH_JOB_SNOW3G_UIA2_GEN2,function,internal) FLUSH_JOB_SNOW3G_UIA2_GEN2: endbranch64 SUBMIT_FLUSH_JOB_SNOW3G_UIA2 flush, avx512_gen2 MKGLOBAL(FLUSH_JOB_SNOW3G_UIA2,function,internal) FLUSH_JOB_SNOW3G_UIA2: endbranch64 SUBMIT_FLUSH_JOB_SNOW3G_UIA2 flush, avx512_gen1 mksection stack-noexec
programs/oeis/016/A016799.asm
neoneye/loda
22
172151
; A016799: (3n+2)^11. ; 2048,48828125,8589934592,285311670611,4049565169664,34271896307633,204800000000000,952809757913927,3670344486987776,12200509765705829,36028797018963968,96549157373046875,238572050223552512,550329031716248441,1196683881290399744,2472159215084012303,4882812500000000000,9269035929372191597,16985107389382393856,30155888444737842659,52036560683837093888,87507831740087890625,143746751770690322432,231122292121701565271,364375289404334925824,564154396389137449973,858993459200000000000,1287831418538085836267,1903193578437064103936,2775173073766990340489,3996373778857415671808,5688000922764599609375,8007313507497959524352,11156683466653165551101,15394540563150776827904,21048519522998348950643,28531167061100000000000,38358611506121121577937,51172646912339021398016,67766737102405685929319,89116503268220597577728,116415321826934814453125,151115727451828646838272,194977389846841709335931,250122512189374498985984,319099584516184696444313,404956516966400000000000,511324276025564512546607,642512252044000682756096,803616698647447868139149,1000643704540847195291648,1240648285957267138671875,1531891323960362862344192,1884016215314563749249761,2308247259043587701080064,2817611963463158891460983,3427189630763300000000000,4154388758501693990272277,5019255990031848807858176,6044819549314706693299979,7257470310143544998893568,8687383875950215478515625,10368987284463733138522112,12341474201974794188822591,14649372735243886851590144,17343170265605241347130653,20480000000000000000000000,24124394237962799952684947,28349109672436645439584256,33236030376158771102541809,38877154474709500704063488,45375670872618296240234375,52847132780654751438252032,61420735191082762650784421,71240703863716132079796224,82467803819583117066183323,95280975791392700000000000,109879109551310452512114617,126482963527317712416014336,145337240630172360933794639,166712830744247830760081408,190909230887841213330078125,218257154622460658242813952,249121342886682932269065251,283903589048977364007778304,323045991615992848448948993,367034448698777600000000000,416402409029831470623291287,471734895039369510442428416,533672814240301731473788469,602917575938813502137827328,680236031081676483154296875,766465753873151417719887872,862520684644188385040795081,969397154335221362022416384,1088180311861833230021357663,1220050976570582900000000000,1366292938960993269291344957,1528300733849759596723306496,1707587911185321991450053299 mul $0,3 add $0,2 pow $0,11
Utils.agda
bens/hwlc
0
12263
module Utils where open import Data.Fin using (Fin) import Data.Fin as F open import Data.Nat data Fromℕ (n : ℕ) : ℕ → Set where yes : (m : Fin n) → Fromℕ n (F.toℕ m) no : (m : ℕ) → Fromℕ n (n + m) fromℕ : ∀ n m → Fromℕ n m fromℕ zero m = no m fromℕ (suc n) zero = yes F.zero fromℕ (suc n) (suc m) with fromℕ n m fromℕ (suc n) (suc .(F.toℕ m)) | yes m = yes (F.suc m) fromℕ (suc n) (suc .(n + m)) | no m = no m
arch/z80/src/ez80/ez80f92_handlers.asm
19cb0475536a9e7d/nuttx
0
24334
<gh_stars>0 ;************************************************************************** ; arch/z80/src/ez80/ez80f91_handlers.asm ; ; Licensed to the Apache Software Foundation (ASF) under one or more ; contributor license agreements. See the NOTICE file distributed with ; this work for additional information regarding copyright ownership. The ; ASF licenses this file to you 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. ; ;************************************************************************** ;************************************************************************** ; Constants ;************************************************************************** ; The IRQ number to use for unused vectors EZ80_UNUSED EQU 40h ;************************************************************************** ; Global Symbols Imported ;************************************************************************** xref _ez80_rstcommon ;************************************************************************** ; Global Symbols Exported ;************************************************************************** xdef _ez80_handlers xdef _handlersize ;************************************************************************** ; Macros ;************************************************************************** ; Define one interrupt handler irqhandler: macro vectno ; Save AF on the stack, set the interrupt number and jump to the ; common reset handling logic. ; Offset 8: Return PC is already on the stack push af ; Offset 7: AF (retaining flags) ld a, #vectno ; A = vector number jp _ez80_rstcommon ; Remaining RST handling is common endmac irqhandler ;************************************************************************** ; Interrupt Vector Handlers ;************************************************************************** define .STARTUP, space = ROM segment .STARTUP .assume ADL=1 ; Symbol Val VecNo Addr ;----------------- --- ----- ----- _ez80_handlers: irqhandler EZ80_UNUSED ; 0 0x040 _handlersize equ $-_ez80_handlers irqhandler EZ80_UNUSED+1 ; 1 0x044 irqhandler EZ80_UNUSED+2 ; 2 0x045 irqhandler EZ80_UNUSED+3 ; 3 0x04c irqhandler 0 ; EZ80_FLASH_IRQ 0 4 0x050 irqhandler 1 ; EZ80_TIMER0_IRQ 1 5 0x054 irqhandler 2 ; EZ80_TIMER1_IRQ 2 6 0x058 irqhandler 3 ; EZ80_TIMER2_IRQ 3 7 0x05c irqhandler 4 ; EZ80_TIMER3_IRQ 4 8 0x060 irqhandler 5 ; EZ80_TIMER4_IRQ 5 9 0x064 irqhandler 6 ; EZ80_TIMER5_IRQ 6 10 0x068 irqhandler 7 ; EZ80_RTC_IRQ 7 11 0x06C irqhandler 8 ; EZ80_UART0_IRQ 8 12 0x070 irqhandler 9 ; EZ80_UART1_IRQ 9 13 0x074 irqhandler 10 ; EZ80_I2C_IRQ 10 14 0x078 irqhandler 11 ; EZ80_SPI_IRQ 11 15 0x07c irqhandler EZ80_UNUSED+4 ; 16 0x080 irqhandler EZ80_UNUSED+5 ; 17 0x084 irqhandler EZ80_UNUSED+6 ; 18 0x088 irqhandler EZ80_UNUSED+7 ; 19 0x08c irqhandler EZ80_UNUSED+8 ; 16 0x080 irqhandler EZ80_UNUSED+9 ; 17 0x094 irqhandler EZ80_UNUSED+10 ; 18 0x098 irqhandler EZ80_UNUSED+11 ; 19 0x09c irqhandler 12 ; EZ80_PORTB0_IRQ 12 24 0x0a0 irqhandler 13 ; EZ80_PORTB1_IRQ 13 25 0x0a4 irqhandler 14 ; EZ80_PORTB2_IRQ 14 26 0x0a8 irqhandler 15 ; EZ80_PORTB3_IRQ 15 27 0x0ac irqhandler 16 ; EZ80_PORTB4_IRQ 16 28 0x0b0 irqhandler 17 ; EZ80_PORTB5_IRQ 17 29 0x0b4 irqhandler 18 ; EZ80_PORTB6_IRQ 18 20 0x0b8 irqhandler 19 ; EZ80_PORTB7_IRQ 19 21 0x0bc irqhandler 20 ; EZ80_PORTC0_IRQ 20 22 0x0c0 irqhandler 21 ; EZ80_PORTC1_IRQ 21 23 0x0c4 irqhandler 22 ; EZ80_PORTC2_IRQ 22 24 0x0c8 irqhandler 23 ; EZ80_PORTC3_IRQ 23 25 0x0cc irqhandler 24 ; EZ80_PORTC4_IRQ 24 26 0x0d0 irqhandler 25 ; EZ80_PORTC5_IRQ 25 27 0x0d4 irqhandler 26 ; EZ80_PORTC6_IRQ 26 28 0x0d8 irqhandler 27 ; EZ80_PORTC7_IRQ 27 29 0x0dc irqhandler 28 ; EZ80_PORTD0_IRQ 28 40 0x0e0 irqhandler 29 ; EZ80_PORTD1_IRQ 29 41 0x0e4 irqhandler 30 ; EZ80_PORTD2_IRQ 30 42 0x0e8 irqhandler 31 ; EZ80_PORTD3_IRQ 31 43 0x0ec irqhandler 32 ; EZ80_PORTD4_IRQ 32 44 0x0f0 irqhandler 33 ; EZ80_PORTD5_IRQ 33 45 0x0f4 irqhandler 34 ; EZ80_PORTD6_IRQ 34 46 0x0f8 irqhandler 35 ; EZ80_PORTD7_IRQ 35 47 0x0fc irqhandler EZ80_UNUSED+13 ; 48 0x100 irqhandler EZ80_UNUSED+14 ; 49 0x104 irqhandler EZ80_UNUSED+15 ; 50 0x108 irqhandler EZ80_UNUSED+16 ; 51 0x10c irqhandler EZ80_UNUSED+17 ; 52 0x110 irqhandler EZ80_UNUSED+18 ; 53 0x114 irqhandler EZ80_UNUSED+19 ; 54 0x118 irqhandler EZ80_UNUSED+20 ; 55 0x11c irqhandler EZ80_UNUSED+21 ; 56 0x120 irqhandler EZ80_UNUSED+22 ; 57 0x124 irqhandler EZ80_UNUSED+23 ; 58 0x128 irqhandler EZ80_UNUSED+24 ; 59 0x12c irqhandler EZ80_UNUSED+25 ; 60 0x130 irqhandler EZ80_UNUSED+26 ; 61 0x134 irqhandler EZ80_UNUSED+27 ; 62 0x138 irqhandler EZ80_UNUSED+28 ; 63 0x13c end
test/cases/clang-hellow.asm
joewalnes/gcc-explorer
4
95156
<gh_stars>1-10 .file "-" .file 1 "/home/mgodbold/dev/gcc-explorer/-" .file 2 "/home/mgodbold/dev/gcc-explorer/<stdin>" .section .debug_info,"",@progbits .Lsection_info: .section .debug_abbrev,"",@progbits .Lsection_abbrev: .section .debug_aranges,"",@progbits .section .debug_macinfo,"",@progbits .section .debug_line,"",@progbits .Lsection_line: .section .debug_loc,"",@progbits .section .debug_pubnames,"",@progbits .section .debug_pubtypes,"",@progbits .section .debug_str,"",@progbits .Lsection_str: .section .debug_ranges,"",@progbits .Ldebug_range: .section .debug_loc,"",@progbits .Lsection_debug_loc: .text .Ltext_begin: .data .text .globl main .align 16, 0x90 .type main,@function main: # @main .Ltmp2: .cfi_startproc .Lfunc_begin0: .loc 2 2 0 # <stdin>:2:0 # BB#0: pushq %rbp .Ltmp3: .cfi_def_cfa_offset 16 .Ltmp4: .cfi_offset %rbp, -16 movq %rsp, %rbp .Ltmp5: .cfi_def_cfa_register %rbp .loc 2 3 1 prologue_end # <stdin>:3:1 .Ltmp6: movl $.L.str, %edi xorb %al, %al callq printf .loc 2 4 3 # <stdin>:4:3 movl $str, %edi callq puts xorl %eax, %eax .loc 2 5 1 # <stdin>:5:1 popq %rbp ret .Ltmp7: .Ltmp8: .size main, .Ltmp8-main .Lfunc_end0: .Ltmp9: .cfi_endproc .Leh_func_end0: .type .L.str,@object # @.str .section .rodata.str1.1,"aMS",@progbits,1 .L.str: .asciz "Hello world" .size .L.str, 12 .type str,@object # @str .section .rodata,"a",@progbits str: .asciz "moo" .size str, 4 .text .Ltext_end: .data .Ldata_end: .text .Lsection_end1: .section .debug_info,"",@progbits .Linfo_begin1: .long 175 # Length of Compilation Unit Info .short 2 # DWARF version number .long .Labbrev_begin # Offset Into Abbrev. Section .byte 8 # Address Size (in bytes) .byte 1 # Abbrev [1] 0xb:0xa8 DW_TAG_compile_unit .ascii "Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM 3.0)" # DW_AT_producer .byte 0 .short 4 # DW_AT_language .byte 45 # DW_AT_name .byte 0 .quad 0 # DW_AT_entry_pc .long .Lsection_line # DW_AT_stmt_list .ascii "/home/mgodbold/dev/gcc-explorer" # DW_AT_comp_dir .byte 0 .byte 1 # DW_AT_APPLE_optimized .byte 2 # Abbrev [2] 0x8b:0x20 DW_TAG_subprogram .ascii "main" # DW_AT_name .byte 0 .byte 2 # DW_AT_decl_file .byte 2 # DW_AT_decl_line .byte 1 # DW_AT_prototyped .long 171 # DW_AT_type .byte 1 # DW_AT_external .quad .Lfunc_begin0 # DW_AT_low_pc .quad .Lfunc_end0 # DW_AT_high_pc .byte 1 # DW_AT_frame_base .byte 86 .byte 3 # Abbrev [3] 0xab:0x7 DW_TAG_base_type .ascii "int" # DW_AT_name .byte 0 .byte 5 # DW_AT_encoding .byte 4 # DW_AT_byte_size .byte 0 # End Of Children Mark .Linfo_end1: .section .debug_abbrev,"",@progbits .Labbrev_begin: .byte 1 # Abbreviation Code .byte 17 # DW_TAG_compile_unit .byte 1 # DW_CHILDREN_yes .byte 37 # DW_AT_producer .byte 8 # DW_FORM_string .byte 19 # DW_AT_language .byte 5 # DW_FORM_data2 .byte 3 # DW_AT_name .byte 8 # DW_FORM_string .byte 82 # DW_AT_entry_pc .byte 1 # DW_FORM_addr .byte 16 # DW_AT_stmt_list .byte 6 # DW_FORM_data4 .byte 27 # DW_AT_comp_dir .byte 8 # DW_FORM_string .ascii "\341\177" # DW_AT_APPLE_optimized .byte 12 # DW_FORM_flag .byte 0 # EOM(1) .byte 0 # EOM(2) .byte 2 # Abbreviation Code .byte 46 # DW_TAG_subprogram .byte 0 # DW_CHILDREN_no .byte 3 # DW_AT_name .byte 8 # DW_FORM_string .byte 58 # DW_AT_decl_file .byte 11 # DW_FORM_data1 .byte 59 # DW_AT_decl_line .byte 11 # DW_FORM_data1 .byte 39 # DW_AT_prototyped .byte 12 # DW_FORM_flag .byte 73 # DW_AT_type .byte 19 # DW_FORM_ref4 .byte 63 # DW_AT_external .byte 12 # DW_FORM_flag .byte 17 # DW_AT_low_pc .byte 1 # DW_FORM_addr .byte 18 # DW_AT_high_pc .byte 1 # DW_FORM_addr .byte 64 # DW_AT_frame_base .byte 10 # DW_FORM_block1 .byte 0 # EOM(1) .byte 0 # EOM(2) .byte 3 # Abbreviation Code .byte 36 # DW_TAG_base_type .byte 0 # DW_CHILDREN_no .byte 3 # DW_AT_name .byte 8 # DW_FORM_string .byte 62 # DW_AT_encoding .byte 11 # DW_FORM_data1 .byte 11 # DW_AT_byte_size .byte 11 # DW_FORM_data1 .byte 0 # EOM(1) .byte 0 # EOM(2) .byte 0 # EOM(3) .Labbrev_end: .section .debug_pubnames,"",@progbits .Lset0 = .Lpubnames_end1-.Lpubnames_begin1 # Length of Public Names Info .long .Lset0 .Lpubnames_begin1: .short 2 # DWARF Version .long .Linfo_begin1 # Offset of Compilation Unit Info .Lset1 = .Linfo_end1-.Linfo_begin1 # Compilation Unit Length .long .Lset1 .long 139 # DIE offset .asciz "main" # External Name .long 0 # End Mark .Lpubnames_end1: .section .debug_pubtypes,"",@progbits .Lset2 = .Lpubtypes_end1-.Lpubtypes_begin1 # Length of Public Types Info .long .Lset2 .Lpubtypes_begin1: .short 2 # DWARF Version .long .Linfo_begin1 # Offset of Compilation Unit Info .Lset3 = .Linfo_end1-.Linfo_begin1 # Compilation Unit Length .long .Lset3 .long 0 # End Mark .Lpubtypes_end1: .section .debug_aranges,"",@progbits .section .debug_ranges,"",@progbits .section .debug_macinfo,"",@progbits .section ".note.GNU-stack","",@progbits
oeis/349/A349969.asm
neoneye/loda-programs
11
18278
<filename>oeis/349/A349969.asm ; A349969: a(n) = Sum_{k=0..n} (k*n)^(n-k). ; Submitted by <NAME> ; 1,1,3,16,141,1871,34951,873174,27951929,1107415549,52891809491,2987861887924,196828568831365,14950745148070499,1296606974501951743,127238563043551898986,14012626653816435643633,1719136634276882827095009,233448782800118609096218891,34893145891546400940329802904,5712757430819663970842189193981,1020083779765117501437430081998295,197884192473916002385084401598148727,41553204591846765022034292934106818910,9413715308172453451848982631384457822505,2293669634259001341767097109240873499128101 mov $2,$0 lpb $0 sub $0,1 mov $3,$2 mul $3,$0 add $4,1 pow $3,$4 add $1,$3 lpe mov $0,$1 add $0,1
tools/documentation_generator/documentation_generator.ads
svn2github/matreshka
24
29836
package Documentation_Generator is pragma Pure; end Documentation_Generator;
2.0/cpm20_code/os3bdos.asm
officialrafsan/CP-M
0
247226
<gh_stars>0 title 'Bdos Interface, Bdos, Version 2.0 Aug, 1979' ;***************************************************************** ;***************************************************************** ;** ** ;** B a s i c D i s k O p e r a t i n g S y s t e m ** ;** I n t e r f a c e M o d u l e ** ;** ** ;***************************************************************** ;***************************************************************** ; ; Copyright (c) 1978, 1979 ; Digital Research ; Box 579, Pacific Grove ; California ; on equ 0ffffh off equ 00000h test equ off ; if test org 3c00h else org 0800h endif ; bios value defined at end of module ; ssize equ 24 ;24 level stack ; ; low memory locations reboot equ 0000h ;reboot system ioloc equ 0003h ;i/o byte location bdosa equ 0006h ;address field of jmp BDOS ; ; bios access constants bootf set bios+3*0 ;cold boot function wbootf set bios+3*1 ;warm boot function constf set bios+3*2 ;console status function coninf set bios+3*3 ;console input function conoutf set bios+3*4 ;console output function listf set bios+3*5 ;list output function punchf set bios+3*6 ;punch output function readerf set bios+3*7 ;reader input function homef set bios+3*8 ;disk home function seldskf set bios+3*9 ;select disk function settrkf set bios+3*10 ;set track function setsecf set bios+3*11 ;set sector function setdmaf set bios+3*12 ;set dma function readf set bios+3*13 ;read disk function writef set bios+3*14 ;write disk function liststf set bios+3*15 ;list status function sectran set bios+3*16 ;sector translate ; ; equates for non graphic characters ctlc equ 03h ;control c ctle equ 05h ;physical eol ctlh equ 08h ;backspace ctlp equ 10h ;prnt toggle ctlr equ 12h ;repeat line ctls equ 13h ;stop/start screen ctlu equ 15h ;line delete ctlx equ 18h ;=ctl-u ctlz equ 1ah ;end of file rubout equ 7fh ;char delete tab equ 09h ;tab char cr equ 0dh ;carriage return lf equ 0ah ;line feed ctl equ 5eh ;up arrow ; db 0,0,0,0,0,0 ; ; enter here from the user's program with function number in c, ; and information address in d,e jmp bdose ;past parameter block ; ; ************************************************ ; *** relative locations 0009 - 000e *** ; ************************************************ pererr: dw persub ;permanent error subroutine selerr: dw selsub ;select error subroutine roderr: dw rodsub ;ro disk error subroutine roferr: dw rofsub ;ro file error subroutine ; ; bdose: ;arrive here from user programs xchg! shld info! xchg ;info=DE, DE=info mov a,e! sta linfo ;linfo = low(info) - don't equ lxi h,0! shld aret ;return value defaults to 0000 ;save user's stack pointer, set to local stack dad sp! shld entsp ;entsp = stackptr lxi sp,lstack ;local stack setup xra a! sta fcbdsk! sta resel ;fcbdsk,resel=false lxi h,goback ;return here after all functions push h ;jmp goback equivalent to ret mov a,c! cpi nfuncs! rnc ;skip if invalid # mov c,e ;possible output character to C lxi h,functab! mov e,a! mvi d,0 ;DE=func, HL=.ciotab dad d! dad d! mov e,m! inx h! mov d,m ;DE=functab(func) xchg! pchl ;dispatched ; ; dispatch table for functions functab: dw bootf, func1, func2, func3 dw func4, func5, func6, func7 dw func8, func9, func10,func11 diskf equ ($-functab)/2 ;disk funcs dw func12,func13,func14,func15 dw func16,func17,func18,func19 dw func20,func21,func22,func23 dw func24,func25,func26,func27 dw func28,func29,func30,func31 dw func32,func33,func34,func35 dw func36 nfuncs equ ($-functab)/2 ; func1: ;return console character with echo call conech jmp sta$ret ; func2: ;write console character with tab expansion call tabout ret ;jmp goback ; func3: ;return reader character call readerf jmp sta$ret ; func4: ;write punch character call punchf ret ;jmp goback ; func5: ;write list character ;write to list device call listf ret ;jmp goback ; func6: ;direct console i/o - read if 0ffh mov a,c! inr a! jz dirinp ;0ffh => 00h, means input mode ;direct output function call conoutf ret ;jmp goback dirinp: call constf ;status check ora a! jz retmon ;skip, return 00 if not ready ;character is ready, get it call coninf ;to A jmp sta$ret ; func7: ;return io byte lda ioloc jmp sta$ret ; func8: ;set i/o byte lxi h,ioloc mov m,c ret ;jmp goback ; func9: ;write line until $ encountered lhld info! mov c,l! mov b,h ;BC=string address call print ;out to console ret ;jmp goback ; func10: ;read a buffered console line call read ret ;jmp goback ; func11: ;check console status call conbrk ;(drop through to sta$ret) sta$ret: ;store the A register to aret sta aret! ret ;jmp goback ; ; error subroutines persub: ;report permanent error lxi h,permsg! call errflg ;to report the error cpi ctlc! jz reboot ;reboot if response is ctlc ret ;and ignore the error ; selsub: ;report select error lxi h,selmsg! jmp wait$err ;wait console before boot ; rodsub: ;report write to read/only disk lxi h,rodmsg! jmp wait$err ;wait console ; rofsub: ;report read/only file lxi h,rofmsg ;drop through to wait for console ; wait$err: ;wait for response before boot call errflg! jmp reboot ; errflg: ;report error to console, message address in HL push h! call crlf ;stack mssg address, new line lda curdsk! adi 'A'! sta dskerr ;current disk name lxi b,dskmsg! call print ;the error message pop b! call print ;error mssage tail jmp conin ;to get the input character ;ret ; ; error messages dskmsg: db 'Bdos Err On ' dskerr: db ' : $' ;filled in by errflg permsg: db 'Bad Sector$' selmsg: db 'Select$' rofmsg: db 'File ' rodmsg: db 'R/O$' ; ; ; console handlers conin: ;read console character to A lxi h,kbchar! mov a,m! mvi m,0! ora a! rnz ;no previous keyboard character ready jmp coninf ;get character externally ;ret ; conech: ;read character with echo call conin! call echoc! rc ;echo character? ;character must be echoed before return push psw! mov c,a! call tabout! pop psw ret ;with character in A ; echoc: ;echo character if graphic ;cr, lf, tab, or backspace cpi cr! rz ;carriage return? cpi lf! rz ;line feed? cpi tab! rz ;tab? cpi ctlh! rz ;backspace? cpi ' '! ret ;carry set if not graphic ; conbrk: ;check for character ready lda kbchar! ora a! jnz conb1 ;skip if active kbchar ;no active kbchar, check external break call constf! ani 1! rz ;return if no char ready ;character ready, read it call coninf ;to A cpi ctls! jnz conb0 ;check stop screen function ;found ctls, read next character call coninf ;to A cpi ctlc! jz reboot ;ctlc implies re-boot ;not a reboot, act as if nothing has happened xra a! ret ;with zero in accumulator conb0: ;character in accum, save it sta kbchar conb1: ;return with true set in accumulator mvi a,1! ret ; conout: ;compute character position/write console char from C ;compcol = true if computing column position lda compcol! ora a! jnz compout ;write the character, then compute the column ;write console character from C push b! call conbrk ;check for screen stop function pop b! push b ;recall/save character call conoutf ;externally, to console pop b! push b ;recall/save character ;may be copying to the list device lda listcp! ora a! cnz listf ;to printer, if so pop b ;recall the character compout: mov a,c ;recall the character ;and compute column position lxi h,column ;A = char, HL = .column cpi rubout! rz ;no column change if nulls inr m ;column = column + 1 cpi ' '! rnc ;return if graphic ;not graphic, reset column position dcr m ;column = column - 1 mov a,m! ora a! rz ;return if at zero ;not at zero, may be backspace or end line mov a,c ;character back to A cpi ctlh! jnz notbacksp ;backspace character dcr m ;column = column - 1 ret notbacksp: ;not a backspace character, eol? cpi lf! rnz ;return if not ;end of line, column = 0 mvi m,0 ;column = 0 ret ; ctlout: ;send C character with possible preceding up-arrow mov a,c! call echoc ;cy if not graphic (or special case) jnc tabout ;skip if graphic, tab, cr, lf, or ctlh ;send preceding up arrow push psw! mvi c,ctl! call conout ;up arrow pop psw! ori 40h ;becomes graphic letter mov c,a ;ready to print ;(drop through to tabout) ; tabout: ;expand tabs to console mov a,c! cpi tab! jnz conout ;direct to conout if not ;tab encountered, move to next tab position tab0: mvi c,' '! call conout ;another blank lda column! ani 111b ;column mod 8 = 0 ? jnz tab0 ;back for another if not ret ; pctlh: ;send ctlh to console without affecting column count mvi c,ctlh! jmp conoutf ;ret ; backup: ;back-up one screen position call pctlh! mvi c,' '! call conoutf! jmp pctlh ; crlfp: ;print #, cr, lf for ctlx, ctlu, ctlr functions ;then move to strtcol (starting column) mvi c,'#'! call conout call crlf ;column = 0, move to position strtcol crlfp0: lda column! lxi h,strtcol cmp m! rnc ;stop when column reaches strtcol mvi c,' '! call conout ;print blank jmp crlfp0 ;; ; crlf: ;carriage return line feed sequence mvi c,cr! call conout! mvi c,lf! jmp conout ;ret ; print: ;print message until M(BC) = '$' ldax b! cpi '$'! rz ;stop on $ ;more to print inx b! push b! mov c,a ;char to C call tabout ;another character printed pop b! jmp print ; read: ;read to info address (max length, current length, buffer) lda column! sta strtcol ;save start for ctl-x, ctl-h lhld info! mov c,m! inx h! push h! mvi b,0 ;B = current buffer length, ;C = maximum buffer length, ;HL= next to fill - 1 readnx: ;read next character, BC, HL active push b! push h ;blen, cmax, HL saved readn0: call conin ;next char in A ani 7fh ;mask parity bit pop h! pop b ;reactivate counters cpi cr! jz readen ;end of line? cpi lf! jz readen ;also end of line cpi ctlh! jnz noth ;backspace? ;do we have any characters to back over? mov a,b! ora a! jz readnx ;characters remain in buffer, backup one dcr b ;remove one character lda column! sta compcol ;col > 0 ;compcol > 0 marks repeat as length compute jmp linelen ;uses same code as repeat noth: ;not a backspace cpi rubout! jnz notrub ;rubout char? ;rubout encountered, rubout if possible mov a,b! ora a! jz readnx ;skip if len=0 ;buffer has characters, resend last char mov a,m! dcr b! dcx h ;A = last char ;blen=blen-1, next to fill - 1 decremented jmp rdech1 ;act like this is an echo ; notrub: ;not a rubout character, check end line cpi ctle! jnz note ;physical end line? ;yes, save active counters and force eol push b! push h! call crlf xra a! sta strtcol ;start position = 00 jmp readn0 ;for another character note: ;not end of line, list toggle? cpi ctlp! jnz notp ;skip if not ctlp ;list toggle - change parity push h ;save next to fill - 1 lxi h,listcp ;HL=.listcp flag mvi a,1! sub m ;True-listcp mov m,a ;listcp = not listcp pop h! jmp readnx ;for another char notp: ;not a ctlp, line delete? cpi ctlx! jnz notx pop h ;discard start position ;loop while column > strtcol backx: lda strtcol! lxi h,column cmp m! jnc read ;start again dcr m ;column = column - 1 call backup ;one position jmp backx notx: ;not a control x, control u? ;not control-X, control-U? cpi ctlu! jnz notu ;skip if not ;delete line (ctlu) call crlfp ;physical eol pop h ;discard starting position jmp read ;to start all over notu: ;not line delete, repeat line? cpi ctlr! jnz notr linelen: ;repeat line, or compute line len (ctlh) ;if compcol > 0 push b! call crlfp ;save line length pop b! pop h! push h! push b ;bcur, cmax active, beginning buff at HL rep0: mov a,b! ora a! jz rep1 ;count len to 00 inx h! mov c,m ;next to print dcr b! push b! push h ;count length down call ctlout ;character echoed pop h! pop b ;recall remaining count jmp rep0 ;for the next character rep1: ;end of repeat, recall lengths ;original BC still remains pushed push h ;save next to fill lda compcol! ora a ;>0 if computing length jz readn0 ;for another char if so ;column position computed for ctlh lxi h,column! sub m ;diff > 0 sta compcol ;count down below ;move back compcol-column spaces backsp: ;move back one more space call backup ;one space lxi h,compcol! dcr m jnz backsp jmp readn0 ;for next character notr: ;not a ctlr, place into buffer rdecho: inx h! mov m,a ;character filled to mem inr b ;blen = blen + 1 rdech1: ;look for a random control character push b! push h ;active values saved mov c,a ;ready to print call ctlout ;may be up-arrow C pop h! pop b! mov a,m ;recall char cpi ctlc ;set flags for reboot test mov a,b ;move length to A jnz notc ;skip if not a control c cpi 1 ;control C, must be length 1 jz reboot ;reboot if blen = 1 ;length not one, so skip reboot notc: ;not reboot, are we at end of buffer? cmp c! jc readnx ;go for another if not readen: ;end of read operation, store blen pop h! mov m,b ;M(current len) = B mvi c,cr! jmp conout ;return carriage ;ret ; ; ; data areas ; compcol:db 0 ;true if computing column position strtcol:db 0 ;starting column position after read column: db 0 ;column position listcp: db 0 ;listing toggle kbchar: db 0 ;initial key char = 00 entsp: ds 2 ;entry stack pointer ds ssize*2 ;stack size lstack: ; end of Basic I/O System ; ;***************************************************************** ;***************************************************************** ; ; common values shared between bdosi and bdos usrcode:db 0 ;current user number curdsk: db 0 ;current disk number info: ds 2 ;information address aret: ds 2 ;address value to return lret equ aret ;low(aret) ; ;***************************************************************** ;***************************************************************** ;** ** ;** B a s i c D i s k O p e r a t i n g S y s t e m ** ;** ** ;***************************************************************** ;***************************************************************** ; dvers equ 20h ;version 2.0 ; module addresses ; ; literal constants true equ 0ffh ;constant true false equ 000h ;constant false enddir equ 0ffffh ;end of directory byte equ 1 ;number of bytes for "byte" type word equ 2 ;number of bytes for "word" type ; ; fixed addresses in low memory tfcb equ 005ch ;default fcb location tbuff equ 0080h ;default buffer location ; ; fixed addresses referenced in bios module are ; pererr (0009), selerr (000c), roderr (000f) ; ; error message handlers goerr: ;HL = .errorhandler, call subroutine mov e,m! inx h! mov d,m ;address of routine in DE xchg! pchl ;to subroutine ; per$error: ;report permanent error to user lxi h,pererr! jmp goerr ; sel$error: ;report select error lxi h,selerr! jmp goerr ; rod$error: ;report read/only disk error lxi h,roderr! jmp goerr ; rof$error: ;report read/only file error lxi h,roferr! jmp goerr ; ; ; local subroutines for bios interface ; move: ;move data length of length C from source DE to ;destination given by HL inr c ;in case it is zero move0: dcr c! rz ;more to move ldax d! mov m,a ;one byte moved inx d! inx h ;to next byte jmp move0 ; selectdisk: ;select the disk drive given by curdsk, and fill ;the base addresses curtrka - alloca, then fill ;the values of the disk parameter block lda curdsk! mov c,a ;current disk# to c ;lsb of e = 0 if not yet logged - in call seldskf ;HL filled by call ;HL = 0000 if error, otherwise disk headers mov a,h! ora l! rz ;return with 0000 in HL and z flag ;disk header block address in hl mov e,m! inx h! mov d,m! inx h ;DE=.tran shld cdrmaxa! inx h! inx h ;.cdrmax shld curtrka! inx h! inx h ;HL=.currec shld curreca! inx h! inx h ;HL=.buffa ;DE still contains .tran xchg! shld tranv ;.tran vector lxi h,buffa ;DE= source for move, HL=dest mvi c,addlist! call move ;addlist filled ;now fill the disk parameter block lhld dpbaddr! xchg ;DE is source lxi h,sectpt ;HL is destination mvi c,dpblist! call move ;data filled ;now set single/double map mode lhld maxall ;largest allocation number mov a,h ;00 indicates < 255 lxi h,single! mvi m,true ;assume a=00 ora a! jz retselect ;high order of maxall not zero, use double dm mvi m,false retselect: mvi a,true! ora a! ret ;select disk function ok ; home: ;move to home position, then offset to start of dir call homef ;move to track 00, sector 00 reference lxi h,offset! mov c,m! inx h! mov b,m! call settrkf ;first directory position selected xra a ;constant zero to accumulator lhld curtrka! mov m,a! inx h! mov m,a ;curtrk=0000 lhld curreca! mov m,a! inx h! mov m,a ;currec=0000 ;curtrk, currec both set to 0000 ret ; rdbuff: ;read buffer and check condition call readf ;current drive, track, sector, dma ora a! jnz per$error ret ; wrbuff: ;write buffer and check condition ;write type (wrtype) is in register C ;wrtype = 0 => normal write operation ;wrtype = 1 => directory write operation ;wrtype = 2 => start of new block call writef ;current drive, track, sector, dma ora a! jnz per$error ret ; seek: ;seek the track given by arecord (actual record) ;local equates for registers arech equ b! arecl equ c ;arecord = BC crech equ d! crecl equ e ;currec = DE ctrkh equ h! ctrkl equ l ;curtrk = HL tcrech equ h! tcrecl equ l ;tcurrec = HL ;load the registers from memory lxi h,arecord! mov arecl,m! inx h! mov arech,m lhld curreca ! mov crecl,m! inx h! mov crech,m lhld curtrka ! mov a,m! inx h! mov ctrkh,m! mov ctrkl,a ;loop while arecord < currec seek0: mov a,arecl! sub crecl! mov a,arech! sbb crech jnc seek1 ;skip if arecord >= currec ;currec = currec - sectpt push ctrkh! lhld sectpt mov a,crecl! sub l! mov crecl,a mov a,crech! sbb h! mov crech,a pop ctrkh ;curtrk = curtrk - 1 dcx ctrkh jmp seek0 ;for another try seek1: ;look while arecord >= (t:=currec + sectpt) push ctrkh lhld sectpt! dad crech ;HL = currec+sectpt mov a,arecl! sub tcrecl! mov a,arech! sbb tcrech jc seek2 ;skip if t > arecord ;currec = t xchg ;curtrk = curtrk + 1 pop ctrkh! inx ctrkh jmp seek1 ;for another try seek2: pop ctrkh ;arrive here with updated values in each register push arech! push crech! push ctrkh ;to stack for later ;stack contains (lowest) BC=arecord, DE=currec, HL=curtrk xchg! lhld offset! dad d ;HL = curtrk+offset mov b,h! mov c,l! call settrkf ;track set up ;note that BC - curtrk is difference to move in bios pop d ;recall curtrk lhld curtrka! mov m,e! inx h! mov m,d ;curtrk updated ;now compute sector as arecord-currec pop crech ;recall currec lhld curreca! mov m,crecl! inx h! mov m,crech pop arech ;BC=arecord, DE=currec mov a,arecl! sub crecl! mov arecl,a mov a,arech! sbb crech! mov arech,a lhld tranv! xchg ;BC=sector#, DE=.tran call sectran ;HL = tran(sector) mov c,l! mov b,h ;BC = tran(sector) jmp setsecf ;sector selected ;ret ; ; file control block (fcb) constants empty equ 0e5h ;empty directory entry lstrec equ 127 ;last record# in extent recsiz equ 128 ;record size fcblen equ 32 ;file control block size dirrec equ recsiz/fcblen ;directory elts / record dskshf equ 2 ;log2(dirrec) dskmsk equ dirrec-1 fcbshf equ 5 ;log2(fcblen) ; extnum equ 12 ;extent number field maxext equ 31 ;largest extent number ubytes equ 13 ;unfilled bytes field modnum equ 14 ;data module number maxmod equ 15 ;largest module number fwfmsk equ 80h ;file write flag is high order modnum namlen equ 15 ;name length reccnt equ 15 ;record count field dskmap equ 16 ;disk map field lstfcb equ fcblen-1 nxtrec equ fcblen ranrec equ nxtrec+1;random record field (2 bytes) ; ; reserved file indicators rofile equ 9 ;high order of first type char invis equ 10 ;invisible file in dir command ; equ 11 ;reserved ; ; utility functions for file access ; dm$position: ;compute disk map position for vrecord to HL lxi h,blkshf! mov c,m ;shift count to C lda vrecord ;current virtual record to A dmpos0: ora a! rar! dcr c! jnz dmpos0 ;A = shr(vrecord,blkshf) = vrecord/2**(sect/block) mov b,a ;save it for later addition mvi a,8! sub m ;8-blkshf to accumulator mov c,a ;extent shift count in register c lda extval ;extent value ani extmsk dmpos1: ;blkshf = 3,4,5,6,7, C=5,4,3,2,1 ;shift is 4,3,2,1,0 dcr c! jz dmpos2 ora a! ral! jmp dmpos1 dmpos2: ;arrive here with A = shl(ext and extmsk,7-blkshf) add b ;add the previous shr(vrecord,blkshf) value ;A is one of the following values, depending upon alloc ;bks blkshf ;1k 3 v/8 + extval * 16 ;2k 4 v/16+ extval * 8 ;4k 5 v/32+ extval * 4 ;8k 6 v/64+ extval * 2 ;16k 7 v/128+extval * 1 ret ;with dm$position in A ; getdm: ;return disk map value from position given by BC lhld info ;base address of file control block lxi d,dskmap! dad d ;HL =.diskmap dad b ;index by a single byte value lda single ;single byte/map entry? ora a! jz getdmd ;get disk map single byte mov l,m! mvi h,0! ret ;with HL=00bb getdmd: dad b ;HL=.fcb(dm+i*2) ;double precision value returned mov e,m! inx h! mov d,m! xchg! ret ; index: ;compute disk block number from current fcb call dm$position ;0...15 in register A mov c,a! mvi b,0! call getdm ;value to HL shld arecord! ret ; allocated: ;called following index to see if block allocated lhld arecord! mov a,l! ora h! ret ; atran: ;compute actual record address, assuming index called lda blkshf ;shift count to reg A lhld arecord atran0: dad h! dcr a! jnz atran0 ;shl(arecord,blkshf) lda blkmsk! mov c,a ;mask value to C lda vrecord! ana c ;masked value in A ora l! mov l,a ;to HL shld arecord ;arecord=HL or (vrecord and blkmsk) ret ; getexta: ;get current extent field address to A lhld info! lxi d,extnum! dad d ;HL=.fcb(extnum) ret ; getfcba: ;compute reccnt and nxtrec addresses for get/setfcb lhld info! lxi d,reccnt! dad d! xchg ;DE=.fcb(reccnt) lxi h,(nxtrec-reccnt)! dad d ;HL=.fcb(nxtrec) ret ; getfcb: ;set variables from currently addressed fcb call getfcba ;addresses in DE, HL mov a,m! sta vrecord ;vrecord=fcb(nxtrec) xchg! mov a,m! sta rcount ;rcount=fcb(reccnt) call getexta ;HL=.fcb(extnum) lda extmsk ;extent mask to a ana m ;fcb(extnum) and extmsk sta extval ret ; setfcb: ;place values back into current fcb call getfcba ;addresses to DE, HL lda seqio! mov c,a ;=1 if sequential i/o lda vrecord! add c! mov m,a ;fcb(nxtrec)=vrecord+seqio xchg! lda rcount! mov m,a ;fcb(reccnt)=rcount ret ; hlrotr: ;hl rotate right by amount C inr c ;in case zero hlrotr0: dcr c! rz ;return when zero mov a,h! ora a! rar! mov h,a ;high byte mov a,l! rar! mov l,a ;low byte jmp hlrotr0 ; seekdir: ;seek the record containing the current dir entry lhld dcnt ;directory counter to HL mvi c,dskshf! call hlrotr ;value to HL shld arecord! shld drec ;ready for seek jmp seek ;ret ; compute$cs: ;compute checksum for current directory buffer mvi c,recsiz ;size of directory buffer lhld buffa ;current directory buffer xra a ;clear checksum value computecs0: add m! inx h! dcr c ;cs=cs+buff(recsiz-C) jnz computecs0 ret ;with checksum in A ; hlrotl: ;rotate the mask in HL by amount in C inr c ;may be zero hlrotl0: dcr c! rz ;return if zero dad h! jmp hlrotl0 ; set$cdisk: ;set a "1" value in curdsk position of BC push b ;save input parameter lda curdsk! mov c,a ;ready parameter for shift lxi h,1 ;number to shift call hlrotl ;HL = mask to integrate pop b ;original mask mov a,c! ora l! mov l,a mov a,b! ora h! mov h,a ;HL = mask or rol(1,curdsk) ret ; nowrite: ;return true if dir checksum difference occurred lhld rodsk! lda curdsk! mov c,a! call hlrotr mov a,l! ani 1b! ret ;non zero if nowrite ; set$ro: ;set current disk to read only lxi h,rodsk! mov c,m! inx h! mov b,m call set$cdisk ;sets bit to 1 shld rodsk ;high water mark in directory goes to max lhld dirmax! xchg ;DE = directory max lhld cdrmaxa ;HL = .cdrmax mov m,e! inx h! mov m,d ;cdrmax = dirmax ret ; check$rofile: ;check current buff(dptr) or fcb(0) for r/o status lxi d,rofile! dad d ;offset to ro bit mov a,m! ral! rnc ;return if not set jmp rof$error ;exit to read only disk message ; check$rodir: ;check current directory element for read/only status call getdptra ;address of element jmp check$rofile ;share code ; check$write: ;check for write protected disk call nowrite! rz ;ok to write if not rodsk jmp rod$error ;read only disk error ; addh: ;HL = HL + A add l! mov l,a! rnc ;overflow to H inr h! ret ; getdptra: ;compute the address of a directory element at ;positon dptr in the buffer lhld buffa! lda dptr! jmp addh ; getmodnum: ;compute the address of the module number ;bring module number to accumulator ;(high order bit is fwf (file write flag) lhld info! lxi d,modnum! dad d ;HL=.fcb(modnum) mov a,m! ret ;A=fcb(modnum) ; clrmodnum: ;clear the module number field for user open/make call getmodnum! mvi m,0 ;fcb(modnum)=0 ret ; setfwf: call getmodnum ;HL=.fcb(modnum), A=fcb(modnum) ;set fwf (file write flag) to "1" ori fwfmsk! mov m,a ;fcb(modnum)=fcb(modnum) or 80h ;also returns non zero in accumulator ret ; setlret1: ;set lret = 1 mvi a,1! sta lret! ret ; compcdr: ;return cy if cdrmax > dcnt lhld dcnt! xchg ;DE = directory counter lhld cdrmaxa ;HL=.cdrmax mov a,e! sub m ;low(dcnt) - low(cdrmax) inx h ;HL = .cdrmax+1 mov a,d! sbb m ;hig(dcnt) - hig(cdrmax) ;condition dcnt - cdrmax produces cy if cdrmax>dcnt ret ; setcdr: ;if not (cdrmax > dcnt) then cdrmax = dcnt+1 call compcdr rc ;return if cdrmax > dcnt ;otherwise, HL = .cdrmax+1, DE = dcnt inx d! mov m,d! dcx h! mov m,e ret ; subdh: ;compute HL = DE - HL mov a,e! sub l! mov l,a! mov a,d! sbb h! mov h,a ret ; newchecksum: mvi c,true ;drop through to compute new checksum checksum: ;compute current checksum record and update the ;directory element if C=true, or check for = if not ;drec < chksiz? lhld drec! xchg! lhld chksiz! call subdh ;DE-HL rnc ;skip checksum if past checksum vector size ;drec < chksiz, so continue push b ;save init flag call compute$cs ;check sum value to A lhld checka ;address of check sum vector xchg lhld drec ;value of drec dad d ;HL = .check(drec) pop b ;recall true=0ffh or false=00 to C inr c ;0ffh produces zero flag jz initial$cs ;not initializing, compare cmp m ;compute$cs=check(drec)? rz ;no message if ok ;checksum error, are we beyond ;the end of the disk? call compcdr rnc ;no message if so call set$ro ;read/only disk set ret initial$cs: ;initializing the checksum mov m,a! ret ; setdma: ;HL=.dma address to set (i.e., buffa or dmaad) mov c,m! inx h! mov b,m ;parameter ready jmp setdmaf ; setdata: ;set data dma address lxi h,dmaad! jmp setdma ;to complete the call ; setdir: ;set directory dma address lxi h,buffa! jmp setdma ;to complete the call ; wrdir: ;write the current directory entry, set checksum call newchecksum ;initialize entry call setdir ;directory dma mvi c,1 ;indicates a write directory operation call wrbuff ;write the buffer jmp setdata ;to data dma address ;ret ; rd$dir: ;read a directory entry into the directory buffer call setdir ;directory dma call rdbuff ;directory record loaded jmp setdata ;to data dma address ;ret ; dir$to$user: ;copy the directory entry to the user buffer ;after call to search or searchn by user code lhld buffa! xchg ;source is directory buffer lhld dmaad ;destination is user dma address mvi c,recsiz ;copy entire record jmp move ;ret ; end$of$dir: ;return zero flag if at end of directory, non zero ;if not at end (end of dir if dcnt = 0ffffh) lxi h,dcnt! mov a,m ;may be 0ffh inx h! cmp m ;low(dcnt) = high(dcnt)? rnz ;non zero returned if different ;high and low the same, = 0ffh? inr a ;0ffh becomes 00 if so ret ; set$end$dir: ;set dcnt to the end of the directory lxi h,enddir! shld dcnt! ret ; read$dir: ;read next directory entry, with C=true if initializing lhld dirmax! xchg ;in preparation for subtract lhld dcnt! inx h! shld dcnt ;dcnt=dcnt+1 ;continue while dirmax >= dcnt (dirmax-dcnt no cy) call subdh ;DE-HL jnc read$dir0 ;yes, set dcnt to end of directory call set$end$dir ret read$dir0: ;not at end of directory, seek next element ;initialization flag is in C lda dcnt! ani dskmsk ;low(dcnt) and dskmsk mvi b,fcbshf ;to multiply by fcb size read$dir1: add a! dcr b! jnz read$dir1 ;A = (low(dcnt) and dskmsk) shl fcbshf sta dptr ;ready for next dir operation ora a! rnz ;return if not a new record push b ;save initialization flag C call seek$dir ;seek proper record call rd$dir ;read the directory record pop b ;recall initialization flag jmp checksum ;checksum the directory elt ;ret ; rotr: ;byte value from ALLOC is in register A, with shift count ;in register C (to place bit back into position), and ;target ALLOC position in registers HL, rotate and replace rrc! dcr d! jnz rotr ;back into position mov m,a ;back to ALLOC ret ; getallocbit: ;given allocation vector position BC, return with byte ;containing BC shifted so that the least significant ;bit is in the low order accumulator position. HL is ;the address of the byte for possible replacement in ;memory upon return, and D contains the number of shifts ;required to place the returned value back into position mov a,c! ani 111b! inr a! mov e,a! mov d,a ;d and e both contain the number of bit positions to shift mov a,c! rrc! rrc! rrc! ani 11111b! mov c,a ;C shr 3 to C mov a,b! add a! add a! add a! add a! add a ;B shl 5 ora c! mov c,a ;bbbccccc to C mov a,b! rrc! rrc! rrc! ani 11111b! mov b,a ;BC shr 3 to BC lhld alloca ;base address of allocation vector dad b! mov a,m ;byte to A, hl = .alloc(BC shr 3) ;now move the bit to the low order position of A rotl: rlc! dcr e! jnz rotl! ret ; ; setallocbit: ;BC is the bit position of ALLOC to set or reset. The ;value of the bit is in register E. push d! call getallocbit ;shifted val A, count in D ani 1111$1110b ;mask low bit to zero (may be set) pop b! ora c ;low bit of C is masked into A jmp rotr ;to rotate back into proper position ;ret ; scandm: ;scan the disk map addressed by dptr for non-zero ;entries, the allocation vector entry corresponding ;to a non-zero entry is set to the value of C (0,1) call getdptra ;HL = buffa + dptr ;HL addresses the beginning of the directory entry lxi d,dskmap! dad d ;hl now addresses the disk map push b ;save the 0/1 bit to set mvi c,fcblen-dskmap+1 ;size of single byte disk map + 1 scandm0: ;loop once for each disk map entry pop d ;recall bit parity dcr c! rz ;all done scanning? ;no, get next entry for scan push d ;replace bit parity lda single! ora a! jz scandm1 ;single byte scan operation push b ;save counter push h ;save map address mov c,m! mvi b,0 ;BC=block# jmp scandm2 scandm1: ;double byte scan operation dcr c ;count for double byte push b ;save counter mov c,m! inx h! mov b,m ;BC=block# push h ;save map address scandm2: ;arrive here with BC=block#, E=0/1 mov a,c! ora b ;skip if = 0000 cnz set$alloc$bit ;bit set to 0/1 pop h! inx h ;to next bit position pop b ;recall counter jmp scandm0 ;for another item ; initialize: ;initialize the current disk ;lret = false ;set to true if $ file exists ;compute the length of the allocation vector - 2 lhld maxall! mvi c,3 ;perform maxall/8 ;number of bytes in alloc vector is (maxall/8)+1 call hlrotr! inx h ;HL = maxall/8+1 mov b,h! mov c,l ;count down BC til zero lhld alloca ;base of allocation vector ;fill the allocation vector with zeros initial0: mvi m,0! inx h ;alloc(i)=0 dcx b ;count length down mov a,b! ora c! jnz initial0 ;set the reserved space for the directory lhld dirblk! xchg lhld alloca ;HL=.alloc() mov m,e! inx h! mov m,d ;sets reserved directory blks ;allocation vector initialized, home disk call home ;cdrmax = 3 (scans at least one directory record) lhld cdrmaxa! mvi m,3! inx h! mvi m,0 ;cdrmax = 0000 call set$end$dir ;dcnt = enddir ;read directory entries and check for allocated storage initial2: mvi c,true! call read$dir call end$of$dir! rz ;return if end of directory ;not end of directory, valid entry? call getdptra ;HL = buffa + dptr mvi a,empty! cmp m jz initial2 ;go get another item ;not empty, user code the same? lda usrcode cmp m! jnz pdollar ;same user code, check for '$' submit inx h! mov a,m ;first character sui '$' ;dollar file? jnz pdollar ;dollar file found, mark in lret dcr a! sta lret ;lret = 255 pdollar: ;now scan the disk map for allocated blocks mvi c,1 ;set to allocated call scandm call setcdr ;set cdrmax to dcnt jmp initial2 ;for another entry ; copy$dirloc: ;copy directory location to lret following ;delete, rename, ... ops lda dirloc! sta lret ret ; compext: ;compare extent# in A with that in C, return nonzero ;if they do not match push b ;save C's original value push psw! lda extmsk! cma! mov b,a ;B has negated form of extent mask mov a,c! ana b! mov c,a ;low bits removed from C pop psw! ana b ;low bits removed from A sub c! ani maxext ;set flags pop b ;restore original values ret ; searchn: ;search for the next directory element, assuming ;a previous call on search which sets searcha and ;searchl mvi c,false! call read$dir ;read next dir element call end$of$dir! jz search$fin ;skip to end if so ;not end of directory, scan for match lhld searcha! xchg ;DE=beginning of user fcb ldax d ;first character cpi empty ;keep scanning if empty jz searchnext ;not empty, may be end of logical directory push d ;save search address call compcdr ;past logical end? pop d ;recall address jnc search$fin ;artificial stop searchnext: call getdptra ;HL = buffa+dptr lda searchl! mov c,a ;length of search to c mvi b,0 ;b counts up, c counts down searchloop: mov a,c! ora a! jz endsearch ldax d! cpi '?'! jz searchok ;? matches all ;scan next character if not ubytes mov a,b! cpi ubytes! jz searchok ;not the ubytes field, extent field? cpi extnum ;may be extent field ldax d ;fcb character jz searchext ;skip to search extent sub m! ani 7fh ;mask-out flags/extent modulus jnz searchn ;skip if not matched jmp searchok ;matched character searchext: ;A has fcb character ;attempt an extent # match push b ;save counters mov c,m ;directory character to c call compext ;compare user/dir char pop b ;recall counters jnz searchn ;skip if no match searchok: ;current character matches inx d! inx h! inr b! dcr c jmp searchloop endsearch: ;entire name matches, return dir position lda dcnt! ani dskmsk! sta lret ;lret = low(dcnt) and 11b lxi h,dirloc! mov a,m! ral! rnc ;dirloc=0ffh? ;yes, change it to 0 to mark as found xra a! mov m,a ;dirloc=0 ret search$fin: ;end of directory, or empty name call set$end$dir ;may be artifical end mvi a,255! sta lret! ret ; search: ;search for directory element of length C at info mvi a,0ffh! sta dirloc ;changed if actually found lxi h,searchl! mov m,c ;searchl = C lhld info! shld searcha ;searcha = info call set$end$dir ;dcnt = enddir call home ;to start at the beginning jmp searchn ;start the search operation ; delete: ;delete the currently addressed file call check$write ;write protected? mvi c,extnum! call search ;search through file type delete0: ;loop while directory matches call end$of$dir! rz ;stop if end ;set each non zero disk map entry to 0 ;in the allocation vector ;may be r/o file call check$rodir ;ro disk error if found call getdptra ;HL=.buff(dptr) mvi m,empty mvi c,0! call scandm ;alloc elts set to 0 call wrdir ;write the directory call searchn ;to next element jmp delete0 ;for another record ; get$block: ;given allocation vector position BC, find the zero bit ;closest to this position by searching left and right. ;if found, set the bit to one and return the bit position ;in hl. if not found (i.e., we pass 0 on the left, or ;maxall on the right), return 0000 in hl mov d,b! mov e,c ;copy of starting position to de lefttst: mov a,c! ora b! jz righttst ;skip if left=0000 ;left not at position zero, bit zero? dcx b! push d! push b ;left,right pushed call getallocbit rar! jnc retblock ;return block number if zero ;bit is one, so try the right pop b! pop d ;left, right restored righttst: lhld maxall ;value of maximum allocation# mov a,e! sub l! mov a,d! sbb h ;right=maxall? jnc retblock0 ;return block 0000 if so inx d! push b! push d ;left, right pushed mov b,d! mov c,e ;ready right for call call getallocbit rar! jnc retblock ;return block number if zero pop d! pop b ;restore left and right pointers jmp lefttst ;for another attempt retblock: ral! inr a ;bit back into position and set to 1 ;d contains the number of shifts required to reposition call rotr ;move bit back to position and store pop h! pop d ;HL returned value, DE discarded ret retblock0: ;cannot find an available bit, return 0000 lxi h,0000h! ret ; copy$dir: ;copy fcb information starting at C for E bytes ;into the currently addressed directory entry push d ;save length for later mvi b,0 ;double index to BC lhld info ;HL = source for data dad b! xchg ;DE=.fcb(C), source for copy call getdptra ;HL=.buff(dptr), destination pop b ;DE=source, HL=dest, C=length call move ;data moved seek$copy: ;enter from close to seek and copy current element call seek$dir ;to the directory element jmp wrdir ;write the directory element ;ret ; copy$fcb: ;copy the entire file control block mvi c,0! mvi e,fcblen ;start at 0, to fcblen-1 jmp copy$dir ; rename: ;rename the file described by the first half of ;the currently addressed file control block. the ;new name is contained in the last half of the ;currently addressed file conrol block. the file ;name and type are changed, but the reel number ;is ignored. the user number is identical call check$write ;may be write protected ;search up to the extent field mvi c,extnum! call search ;copy position 0 lhld info! mov a,m ;HL=.fcb(0), A=fcb(0) lxi d,dskmap! dad d;HL=.fcb(dskmap) mov m,a ;fcb(dskmap)=fcb(0) ;assume the same disk drive for new named file rename0: call end$of$dir! rz ;stop at end of dir ;not end of directory, rename next element call check$rodir ;may be read-only file mvi c,dskmap! mvi e,extnum! call copy$dir ;element renamed, move to next call searchn jmp rename0 ; indicators: ;set file indicators for current fcb mvi c,extnum! call search ;through file type indic0: call end$of$dir! rz ;stop at end of dir ;not end of directory, continue to change mvi c,0! mvi e,extnum ;copy name call copy$dir call searchn jmp indic0 ; open: ;search for the directory entry, copy to fcb mvi c,namlen! call search call end$of$dir! rz ;return with lret=255 if end ;not end of directory, copy fcb information open$copy: ;(referenced below to copy fcb info) call getexta! mov a,m! push psw! push h ;save extent# call getdptra! xchg ;DE = .buff(dptr) lhld info ;HL=.fcb(0) mvi c,nxtrec ;length of move operation push d ;save .buff(dptr) call move ;from .buff(dptr) to .fcb(0) ;note that entire fcb is copied, including indicators call setfwf ;sets file write flag pop d! lxi h,extnum! dad d ;HL=.buff(dptr+extnum) mov c,m ;C = directory extent number lxi h,reccnt! dad d ;HL=.buff(dptr+reccnt) mov b,m ;B holds directory record count pop h! pop psw! mov m,a ;restore extent number ;HL = .user extent#, B = dir rec cnt, C = dir extent# ;if user ext < dir ext then user := 128 records ;if user ext = dir ext then user := dir records ;if user ext > dir ext then user := 0 records mov a,c! cmp m! mov a,b ;ready dir reccnt jz open$rcnt ;if same, user gets dir reccnt mvi a,0! jc open$rcnt ;user is larger mvi a,128 ;directory is larger open$rcnt: ;A has record count to fill lhld info! lxi d,reccnt! dad d! mov m,a ret ; mergezero: ;HL = .fcb1(i), DE = .fcb2(i), ;if fcb1(i) = 0 then fcb1(i) := fcb2(i) mov a,m! inx h! ora m! dcx h! rnz ;return if = 0000 ldax d! mov m,a! inx d! inx h ;low byte copied ldax d! mov m,a! dcx d! dcx h ;back to input form ret ; close: ;locate the directory element and re-write it xra a! sta lret call nowrite! rnz ;skip close if r/o disk ;check file write flag - 0 indicates written call getmodnum ;fcb(modnum) in A ani fwfmsk! rnz ;return if bit remains set mvi c,namlen! call search ;locate file call end$of$dir! rz ;return if not found ;merge the disk map at info with that at buff(dptr) lxi b,dskmap! call getdptra dad b! xchg ;DE is .buff(dptr+16) lhld info! dad b ;DE=.buff(dptr+16), HL=.fcb(16) mvi c,(fcblen-dskmap) ;length of single byte dm merge0: lda single! ora a! jz merged ;skip to double ;this is a single byte map ;if fcb(i) = 0 then fcb(i) = buff(i) ;if buff(i) = 0 then buff(i) = fcb(i) ;if fcb(i) <> buff(i) then error mov a,m! ora a! ldax d! jnz fcbnzero ;fcb(i) = 0 mov m,a ;fcb(i) = buff(i) fcbnzero: ora a! jnz buffnzero ;buff(i) = 0 mov a,m! stax d ;buff(i)=fcb(i) buffnzero: cmp m! jnz mergerr ;fcb(i) = buff(i)? jmp dmset ;if merge ok merged: ;this is a double byte merge operation call mergezero ;buff = fcb if buff 0000 xchg! call mergezero! xchg ;fcb = buff if fcb 0000 ;they should be identical at this point ldax d! cmp m! jnz mergerr ;low same? inx d! inx h ;to high byte ldax d! cmp m! jnz mergerr ;high same? ;merge operation ok for this pair dcr c ;extra count for double byte dmset: inx d! inx h ;to next byte position dcr c! jnz merge0 ;for more ;end of disk map merge, check record count ;DE = .buff(dptr)+32, HL = .fcb(32) lxi b,-(fcblen-extnum)! dad b! xchg! dad b ;DE = .fcb(extnum), HL = .buff(dptr+extnum) ldax d ;current user extent number ;if fcb(ext) >= buff(fcb) then ;buff(ext) := fcb(ext), buff(rec) := fcb(rec) cmp m! jc endmerge ;fcb extent number >= dir extent number mov m,a ;buff(ext) = fcb(ext) ;update directory record count field lxi b,(reccnt-extnum)! dad b! xchg! dad b ;DE=.buff(reccnt), HL=.fcb(reccnt) mov a,m! stax d ;buff(reccnt)=fcb(reccnt) endmerge: mvi a,true! sta fcb$copied ;mark as copied call seek$copy ;ok to "wrdir" here - 1.4 compat ret mergerr: ;elements did not merge correctly lxi h,lret! dcr m ;=255 non zero flag set ret ; make: ;create a new file by creating a directory entry ;then opening the file call check$write ;may be write protected lhld info! push h ;save fcb address, look for e5 lxi h,efcb! shld info ;info = .empty mvi c,1! call search ;length 1 match on empty entry call end$of$dir ;zero flag set if no space pop h ;recall info address shld info ;in case we return here rz ;return with error condition 255 if not found xchg ;DE = info address ;clear the remainder of the fcb lxi h,namlen! dad d ;HL=.fcb(namlen) mvi c,fcblen-namlen ;number of bytes to fill xra a ;clear accumulator to 00 for fill make0: mov m,a! inx h! dcr c! jnz make0 lxi h,ubytes! dad d ;HL = .fcb(ubytes) mov m,a ;fcb(ubytes) = 0 call setcdr ;may have extended the directory ;now copy entry to the directory call copy$fcb ;and set the file write flag to "1" jmp setfwf ;ret ; open$reel: ;close the current extent, and open the next one ;if possible. RMF is true if in read mode xra a! sta fcb$copied ;set true if actually copied call close ;close current extent ;lret remains at enddir if we cannot open the next ext call end$of$dir! rz ;return if end ;increment extent number lhld info! lxi b,extnum! dad b ;HL=.fcb(extnum) mov a,m! inr a! ani maxext! mov m,a ;fcb(extnum)=++1 jz open$mod ;move to next module if zero ;may be in the same extent group mov b,a! lda extmsk! ana b ;if result is zero, then not in the same group lxi h,fcb$copied ;true if the fcb was copied to directory ana m ;produces a 00 in accumulator if not written jz open$reel0 ;go to next physical extent ;result is non zero, so we must be in same logical ext jmp open$reel1 ;to copy fcb information open$mod: ;extent number overflow, go to next module lxi b,(modnum-extnum)! dad b ;HL=.fcb(modnum) inr m ;fcb(modnum)=++1 ;module number incremented, check for overflow mov a,m! ani maxmod ;mask high order bits jz open$r$err ;cannot overflow to zero ;otherwise, ok to continue with new module open$reel0: mvi c,namlen! call search ;next extent found? call end$of$dir! jnz open$reel1 ;end of file encountered lda rmf! inr a ;0ffh becomes 00 if read jz open$r$err ;sets lret = 1 ;try to extend the current file call make ;cannot be end of directory call end$of$dir jz open$r$err ;with lret = 1 jmp open$reel2 open$reel1: ;not end of file, open call open$copy open$reel2: call getfcb ;set parameters xra a! sta lret ;lret = 0 ret ;with lret = 0 open$r$err: ;cannot move to next extent of this file call setlret1 ;lret = 1 jmp setfwf ;ensure that it will not be closed ;ret ; seqdiskread: ;sequential disk read operation mvi a,1! sta seqio ;drop through to diskread ; diskread: ;(may enter from seqdiskread) mvi a,true! sta rmf ;read mode flag = true (open$reel) ;read the next record from the current fcb call getfcb ;sets parameters for the read lda vrecord! lxi h,rcount! cmp m ;vrecord-rcount ;skip if rcount > vrecord jc recordok ;not enough records in the extent ;record count must be 128 to continue cpi 128 ;vrecord = 128? jnz diskeof ;skip if vrecord<>128 call open$reel ;go to next extent if so xra a! sta vrecord ;vrecord=00 ;now check for open ok lda lret! ora a! jnz diskeof ;stop at eof recordok: ;arrive with fcb addressing a record to read call index ;error 2 if reading unwritten data ;(returns 1 to be compatible with 1.4) call allocated ;arecord=0000? jz diskeof ;record has been allocated, read it call atran ;arecord now a disk address call seek ;to proper track,sector call rdbuff ;to dma address call setfcb ;replace parameters ret diskeof: jmp setlret1 ;lret = 1 ;ret ; seqdiskwrite: ;sequential disk write mvi a,1! sta seqio ;drop through to diskwrite ; diskwrite: ;(may enter here from seqdiskwrite above) mvi a,false! sta rmf ;read mode flag ;write record to currently selected file call check$write ;in case write protected lhld info ;HL = .fcb(0) call check$rofile ;may be a read-only file call getfcb ;to set local parameters lda vrecord! cpi lstrec+1 ;vrecord-128 ;skip if vrecord > lstrec jc diskwr0 ;vrecord = 128, cannot open next extent call setlret1! ret ;lret=1 diskwr0: ;can write the next record, so continue call index call allocated mvi c,0 ;marked as normal write operation for wrbuff jnz diskwr1 ;not allocated ;the argument to getblock is the starting ;position for the disk search, and should be ;the last allocated block for this file, or ;the value 0 if no space has been allocated call dm$position sta dminx ;save for later lxi b,0000h ;may use block zero ora a! jz nopblock ;skip if no previous block ;previous block exists at A mov c,a! dcx b ;previous block # in BC call getdm ;previous block # to HL mov b,h! mov c,l ;BC=prev block# nopblock: ;BC = 0000, or previous block # call get$block ;block # to HL ;arrive here with block# or zero mov a,l! ora h! jnz blockok ;cannot find a block to allocate mvi a,2! sta lret! ret ;lret=2 blockok: ;allocated block number is in HL shld arecord xchg ;block number to DE lhld info! lxi b,dskmap! dad b ;HL=.fcb(dskmap) lda single! ora a ;set flags for single byte dm lda dminx ;recall dm index jz allocwd ;skip if allocating word ;allocating a byte value call addh! mov m,e ;single byte alloc jmp diskwru ;to continue allocwd: ;allocate a word value mov c,a! mvi b,0 ;double(dminx) dad b! dad b ;HL=.fcb(dminx*2) mov m,e! inx h! mov m,d ;double wd diskwru: ;disk write to previously unallocated block mvi c,2 ;marked as unallocated write diskwr1: ;continue the write operation of no allocation error ;C = 0 if normal write, 2 if to prev unalloc block lda lret! ora a! rnz ;stop if non zero returned value push b ;save write flag call atran ;arecord set call seek ;to proper file position pop b! push b ;restore/save write flag (C=2 if new block) call wrbuff ;written to disk pop b ;C = 2 if a new block was allocated, 0 if not ;increment record count if rcount<=vrecord lda vrecord! lxi h,rcount! cmp m ;vrecord-rcount jc diskwr2 ;rcount <= vrecord mov m,a! inr m ;rcount = vrecord+1 mvi c,2 ;mark as record count incremented diskwr2: ;A has vrecord, C=2 if new block or new record# dcr c! dcr c! jnz noupdate push psw ;save vrecord value call getmodnum ;HL=.fcb(modnum), A=fcb(modnum) ;reset the file write flag to mark as written fcb ani (not fwfmsk) and 0ffh ;bit reset mov m,a ;fcb(modnum) = fcb(modnum) and 7fh pop psw ;restore vrecord noupdate: ;check for end of extent, if found attempt to open ;next extent in preparation for next write cpi lstrec ;vrecord=lstrec? jnz diskwr3 ;skip if not ;may be random access write, if so we are done lda seqio! ora a! jz diskwr3 ;skip next extent open op ;update current fcb before going to next extent call setfcb call open$reel ;rmf=false ;vrecord remains at lstrec causing eof if ;no more directory space is available lxi h,lret! mov a,m! ora a! jnz nospace ;space available, set vrecord=255 dcr a! sta vrecord ;goes to 00 next time nospace: mvi m,0 ;lret = 00 for returned value diskwr3: jmp setfcb ;replace parameters ;ret ; rseek: ;random access seek operation, C=0ffh if read mode ;fcb is assumed to address an active file control block ;(modnum has been set to 1100$0000b if previous bad seek) xra a! sta seqio ;marked as random access operation push b ;save r/w flag lhld info! xchg ;DE will hold base of fcb lxi h,ranrec! dad d ;HL=.fcb(ranrec) mov a,m! ani 7fh! push psw ;record number mov a,m! ral ;cy=lsb of extent# inx h! mov a,m! ral! ani 11111b ;A=ext# mov c,a ;C holds extent number, record stacked mov a,m! rar! rar! rar! rar! ani 1111b ;mod# mov b,a ;B holds module#, C holds ext# pop psw ;recall sought record # ;check to insure that high byte of ran rec = 00 inx h! mov l,m ;l=high byte (must be 00) inr l! dcr l! mvi l,6 ;zero flag, l=6 ;produce error 6, seek past physical eod jnz seekerr ;otherwise, high byte = 0, A = sought record lxi h,nxtrec! dad d ;HL = .fcb(nxtrec) mov m,a ;sought rec# stored away ;arrive here with B=mod#, C=ext#, DE=.fcb, rec stored ;the r/w flag is still stacked. compare fcb values lxi h,extnum! dad d! mov a,c ;A=seek ext# sub m! jnz ranclose ;tests for = extents ;extents match, check mod# lxi h,modnum! dad d! mov a,b ;B=seek mod# ;could be overflow at eof, producing module# ;of 90H or 10H, so compare all but fwf sub m! ani 7fh! jz seekok ;same? ranclose: push b! push d ;save seek mod#,ext#, .fcb call close ;current extent closed pop d! pop b ;recall parameters and fill mvi l,3 ;cannot close error #3 lda lret! inr a! jz badseek lxi h,extnum! dad d! mov m,c ;fcb(extnum)=ext# lxi h,modnum! dad d! mov m,b ;fcb(modnum)=mod# call open ;is the file present? lda lret! inr a! jnz seekok ;open successful? ;cannot open the file, read mode? pop b ;r/w flag to c (=0ffh if read) push b ;everyone expects this item stacked mvi l,4 ;seek to unwritten extent #4 inr c ;becomes 00 if read operation jz badseek ;skip to error if read operation ;write operation, make new extent call make mvi l,5 ;cannot create new extent #5 lda lret! inr a! jz badseek ;no dir space ;file make operation successful seekok: pop b ;discard r/w flag xra a! sta lret! ret ;with zero set badseek: ;fcb no longer contains a valid fcb, mark ;with 1100$000b in modnum field so that it ;appears as overflow with file write flag set push h ;save error flag call getmodnum ;HL = .modnum mvi m,1100$0000b pop h ;and drop through seekerr: pop b ;discard r/w flag mov a,l! sta lret ;lret=#, nonzero ;setfwf returns non-zero accumulator for err jmp setfwf ;flag set, so subsequent close ok ;ret ; randiskread: ;random disk read operation mvi c,true ;marked as read operation call rseek cz diskread ;if seek successful ret ; randiskwrite: ;random disk write operation mvi c,false ;marked as write operation call rseek cz diskwrite ;if seek successful ret ; compute$rr: ;compute random record position for getfilesize/setrandom xchg! dad d ;DE=.buf(dptr) or .fcb(0), HL = .f(nxtrec/reccnt) mov c,m! mvi b,0 ;BC = 0000 0000 ?rrr rrrr lxi h,extnum! dad d! mov a,m! rrc! ani 80h ;A=e000 0000 add c! mov c,a! mvi a,0! adc b! mov b,a ;BC = 0000 000? errrr rrrr mov a,m! rrc! ani 0fh! add b! mov b,a ;BC = 000? eeee errrr rrrr lxi h,modnum! dad d! mov a,m ;A=XXX? mmmm add a! add a! add a! add a ;cy=? A=mmmm 0000 push psw! add b! mov b,a ;cy=?, BC = mmmm eeee errr rrrr push psw ;possible second carry pop h ;cy = lsb of L mov a,l ;cy = lsb of A pop h ;cy = lsb of L ora l ;cy/cy = lsb of A ani 1 ;A = 0000 000? possible carry-out ret ; getfilesize: ;compute logical file size for current fcb mvi c,extnum call search ;zero the receiving ranrec field lhld info! lxi d,ranrec! dad d! push h ;save position mov m,d! inx h! mov m,d! inx h! mov m,d;=00 00 00 getsize: call end$of$dir jz setsize ;current fcb addressed by dptr call getdptra! lxi d,reccnt ;ready for compute size call compute$rr ;A=0000 000? BC = mmmm eeee errr rrrr ;compare with memory, larger? pop h! push h ;recall, replace .fcb(ranrec) mov e,a ;save cy mov a,c! sub m! inx h ;ls byte mov a,b! sbb m! inx h ;middle byte mov a,e! sbb m ;carry if .fcb(ranrec) > directory jc getnextsize ;for another try ;fcb is less or equal, fill from directory mov m,e! dcx h! mov m,b! dcx h! mov m,c getnextsize: call searchn jmp getsize setsize: pop h ;discard .fcb(ranrec) ret ; setrandom: ;set random record from the current file control block lhld info! lxi d,nxtrec ;ready params for computesize call compute$rr ;DE=info, A=cy, BC=mmmm eeee errr rrrr lxi h,ranrec! dad d ;HL = .fcb(ranrec) mov m,c! inx h! mov m,b! inx h! mov m,a ;to ranrec ret ; select: ;select disk info for subsequent input or output ops lhld dlog! lda curdsk! mov c,a! call hlrotr push h! xchg ;save it for test below, send to seldsk call selectdisk! pop h ;recall dlog vector cz sel$error ;returns true if select ok ;is the disk logged in? mov a,l! rar! rc ;return if bit is set ;disk not logged in, set bit and initialize lhld dlog! mov c,l! mov b,h ;call ready call set$cdisk! shld dlog ;dlog=set$cdisk(dlog) jmp initialize ;ret ; curselect: lda linfo! lxi h,curdsk! cmp m! rz ;skip if linfo=curdsk mov m,a ;curdsk=info jmp select ;ret ; reselect: ;check current fcb to see if reselection necessary mvi a,true! sta resel ;mark possible reselect lhld info! mov a,m ;drive select code ani 1$1111b ;non zero is auto drive select dcr a ;drive code normalized to 0..30, or 255 sta linfo ;save drive code cpi 30! jnc noselect ;auto select function, save curdsk lda curdsk! sta olddsk ;olddsk=curdsk mov a,m! sta fcbdsk ;save drive code ani 1110$0000b! mov m,a ;preserve hi bits call curselect noselect: ;set user code lda usrcode ;0...31 lhld info! ora m! mov m,a ret ; ; individual function handlers func12: ;return version number mvi a,dvers! sta lret ;lret = dvers (high = 00) ret ;jmp goback ; func13: ;reset disk system - initialize to disk 0 lxi h,0! shld rodsk! shld dlog xra a! sta curdsk ;note that usrcode remains unchanged lxi h,tbuff! shld dmaad ;dmaad = tbuff call setdata ;to data dma address jmp select ;ret ;jmp goback ; func14: ;select disk info jmp curselect ;ret ;jmp goback ; func15: ;open file call clrmodnum ;clear the module number call reselect jmp open ;ret ;jmp goback ; func16: ;close file call reselect jmp close ;ret ;jmp goback ; func17: ;search for first occurrence of a file mvi c,0 ;length assuming '?' true lhld info! mov a,m! cpi '?' ;no reselect if ? jz qselect ;skip reselect if so ;normal search call clrmodnum ;module number zeroed call reselect mvi c,namlen qselect: call search jmp dir$to$user ;copy directory entry to user ;ret ;jmp goback ; func18: ;search for next occurrence of a file name lhld searcha! shld info call reselect! call searchn jmp dir$to$user ;copy directory entry to user ;ret ;jmp goback ; func19: ;delete a file call reselect call delete jmp copy$dirloc ;ret ;jmp goback ; func20: ;read a file call reselect call seqdiskread ret ;jmp goback ; func21: ;write a file call reselect call seqdiskwrite ret ;jmp goback ; func22: ;make a file call clrmodnum call reselect jmp make ;ret ;jmp goback ; func23: ;rename a file call reselect call rename jmp copy$dirloc ;ret ;jmp goback ; func24: ;return the login vector lhld dlog! shld aret ret ;jmp goback ; func25: ;return selected disk number lda curdsk! sta lret ret ;jmp goback ; func26: ;set the subsequent dma address to info lhld info! shld dmaad ;dmaad = info jmp setdata ;to data dma address ;ret ;jmp goback ; func27: ;return the login vector address lhld alloca! shld aret ret ;jmp goback ; func28: ;write protect current disk jmp set$ro ;ret ;jmp goback ; func29: ;return r/o bit vector lhld rodsk! shld aret ret ;jmp goback ; func30: ;set file indicators call reselect call indicators jmp copy$dirloc ;lret=dirloc ;ret ;jmp goback ; func31: ;return address of disk parameter block lhld dpbaddr! shld aret ret ;jmp goback ; func32: ;set user code lda linfo! cpi 0ffh! jnz setusrcode ;interrogate user code instead lda usrcode! sta lret ;lret=usrcode ret ;jmp goback setusrcode: ani 1fh! sta usrcode ret ;jmp goback ; func33: ;random disk read operation call reselect jmp randiskread ;to perform the disk read ;ret ;jmp goback ; func34: ;random disk write operation call reselect jmp randiskwrite ;to perform the disk write ;ret ;jmp goback ; func35: ;return file size (0-65536) call reselect jmp getfilesize ;ret ;jmp goback ; func36: ;set random record jmp setrandom ;ret ;jmp goback ; goback: ;arrive here at end of processing to return to user lda resel! ora a! jz retmon ;reselection may have taken place lhld info! mvi m,0 ;fcb(0)=0 lda fcbdsk! ora a! jz retmon ;restore disk number mov m,a ;fcb(0)=fcbdsk lda olddsk! sta linfo! call curselect ; ; return from the disk monitor retmon: lhld entsp! sphl ;user stack restored lhld aret! mov a,l! mov b,h ;BA = HL = aret ret ; ; data areas ; ; initialized data efcb: db empty ;0e5=available dir entry rodsk: dw 0 ;read only disk vector dlog: dw 0 ;logged-in disks dmaad: dw tbuff ;initial dma address ; ; curtrka - alloca are set upon disk select ; (data must be adjacent, do not insert variables) ; (address of translate vector, not used) cdrmaxa:ds word ;pointer to cur dir max value curtrka:ds word ;current track address curreca:ds word ;current record address buffa: ds word ;pointer to directory dma address dpbaddr:ds word ;current disk parameter block address checka: ds word ;current checksum vector address alloca: ds word ;current allocation vector address addlist equ $-buffa ;address list size ; ; sectpt - offset obtained from disk parm block at dpbaddr ; (data must be adjacent, do not insert variables) sectpt: ds word ;sectors per track blkshf: ds byte ;block shift factor blkmsk: ds byte ;block mask extmsk: ds byte ;extent mask maxall: ds word ;maximum allocation number dirmax: ds word ;largest directory number dirblk: ds word ;reserved allocation bits for directory chksiz: ds word ;size of checksum vector offset: ds word ;offset tracks at beginning dpblist equ $-sectpt ;size of area ; ; local variables tranv: ds word ;address of translate vector fcb$copied: ds byte ;set true if copy$fcb called rmf: ds byte ;read mode flag for open$reel dirloc: ds byte ;directory flag in rename, etc. seqio: ds byte ;1 if sequential i/o linfo: ds byte ;low(info) dminx: ds byte ;local for diskwrite searchl:ds byte ;search length searcha:ds word ;search address tinfo: ds word ;temp for info in "make" single: ds byte ;set true if single byte allocation map resel: ds byte ;reselection flag olddsk: ds byte ;disk on entry to bdos fcbdsk: ds byte ;disk named in fcb rcount: ds byte ;record count in current fcb extval: ds byte ;extent number and extmsk vrecord:ds word ;current virtual record arecord:ds word ;current actual record ; ; local variables for directory access dptr: ds byte ;directory pointer 0,1,2,3 dcnt: ds word ;directory counter 0,1,...,dirmax drec: ds word ;directory record 0,1,...,dirmax/4 ; bios equ ($ and 0ff00h)+100h ;next module end 
src/generated/tileset_h.ads
csb6/libtcod-ada
0
14365
pragma Ada_2012; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; with System; limited with color_h; with error_h; with Interfaces.C.Strings; package tileset_h is -- BSD 3-Clause License -- * -- * Copyright © 2008-2021, Jice and the libtcod contributors. -- * All rights reserved. -- * -- * Redistribution and use in source and binary forms, with or without -- * modification, are permitted provided that the following conditions are met: -- * -- * 1. Redistributions of source code must retain the above copyright notice, -- * this list of conditions and the following disclaimer. -- * -- * 2. 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. -- * -- * 3. Neither the name of the copyright holder 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. -- type TCOD_Tileset; type TCOD_TilesetObserver; type TCOD_TilesetObserver is record tileset : access TCOD_Tileset; -- tileset.h:43 next : access TCOD_TilesetObserver; -- tileset.h:44 userdata : System.Address; -- tileset.h:45 on_observer_delete : access procedure (arg1 : access TCOD_TilesetObserver); -- tileset.h:46 on_tile_changed : access function (arg1 : access TCOD_TilesetObserver; arg2 : int) return int; -- tileset.h:47 end record with Convention => C_Pass_By_Copy; -- tileset.h:42 type TCOD_Tileset is record tile_width : aliased int; -- tileset.h:50 tile_height : aliased int; -- tileset.h:51 tile_length : aliased int; -- tileset.h:52 tiles_capacity : aliased int; -- tileset.h:53 tiles_count : aliased int; -- tileset.h:54 pixels : access color_h.TCOD_ColorRGBA; -- tileset.h:55 character_map_length : aliased int; -- tileset.h:56 character_map : access int; -- tileset.h:57 observer_list : access TCOD_TilesetObserver; -- tileset.h:58 virtual_columns : aliased int; -- tileset.h:59 ref_count : aliased int; -- tileset.h:60 end record with Convention => C_Pass_By_Copy; -- tileset.h:49 -- clang-format off --* -- A character mapping of a Code Page 437 tileset to Unicode. -- TCOD_CHARMAP_CP437 : aliased array (0 .. 255) of aliased int -- tileset.h:67 with Import => True, Convention => C, External_Name => "TCOD_CHARMAP_CP437"; --* -- A character mapping of a deprecated TCOD tileset to Unicode. -- TCOD_CHARMAP_TCOD : aliased array (0 .. 255) of aliased int -- tileset.h:104 with Import => True, Convention => C, External_Name => "TCOD_CHARMAP_TCOD"; -- clang-format on --* -- * Create a new tile-set with the given tile size. -- function TCOD_tileset_new (arg1 : int; arg2 : int) return access TCOD_Tileset -- tileset.h:146 with Import => True, Convention => C, External_Name => "TCOD_tileset_new"; --* -- * Delete a tile-set. -- procedure TCOD_tileset_delete (tileset : access TCOD_Tileset) -- tileset.h:150 with Import => True, Convention => C, External_Name => "TCOD_tileset_delete"; --* -- * Return the pixel width of tiles in this tileset. -- * -- * The tileset functions are provisional, the API may change in the future. -- function TCOD_tileset_get_tile_width_u (tileset : access constant TCOD_Tileset) return int -- tileset.h:157 with Import => True, Convention => C, External_Name => "TCOD_tileset_get_tile_width_"; --* -- * Return the pixel height of tiles in this tileset. -- * -- * The tileset functions are provisional, the API may change in the future. -- function TCOD_tileset_get_tile_height_u (tileset : access constant TCOD_Tileset) return int -- tileset.h:164 with Import => True, Convention => C, External_Name => "TCOD_tileset_get_tile_height_"; --* -- * Fetch a tile, outputting its data to a pixel buffer. -- * -- * `codepoint` is the index for the tile. Unicode is recommend. -- * -- * `buffer` is a pointer to a contiguous row-major array of pixels. The tile -- * data will be outputted here. This pointer can be NULL if you only want to -- * know if the tileset has a specific tile. -- * -- * Returns 0 if the tile exists. Returns a negative value on an error or if -- * the tileset does not have a tile for this codepoint. -- * -- * The tileset functions are provisional, the API may change in the future. -- function TCOD_tileset_get_tile_u (tileset : access constant TCOD_Tileset; codepoint : int; buffer : access color_h.TCOD_ColorRGBA) return error_h.TCOD_Error -- tileset.h:181 with Import => True, Convention => C, External_Name => "TCOD_tileset_get_tile_"; --* -- * Upload a tile from a pixel buffer into this tileset. -- * -- * `codepoint` is the index for the tile. Unicode is recommend. -- * -- * `buffer` is a pointer to a contiguous row-major array of pixels. -- * This can not be NULL. -- * -- * The tileset functions are provisional, the API may change in the future. -- function TCOD_tileset_set_tile_u (tileset : access TCOD_Tileset; codepoint : int; buffer : access constant color_h.TCOD_ColorRGBA) return error_h.TCOD_Error -- tileset.h:194 with Import => True, Convention => C, External_Name => "TCOD_tileset_set_tile_"; --* -- Load a PNG font as a tilesheet and return a TCOD_Tileset. -- `filename` is the path to a PNG file. -- `columns` and `rows` are the shape of the tileset in the image. The tile -- size will be derived from these parameters and the size of the image. -- `charmap[n]` is an array of which codepoints to assign to which tiles. -- Tiles are assigned in row-major order. -- `TCOD_CHARMAP_CP437` or `TCOD_CHARMAP_TCOD` could be used here. -- function TCOD_tileset_load (arg1 : Interfaces.C.Strings.chars_ptr; arg2 : int; arg3 : int; arg4 : int; arg5 : access int) return access TCOD_Tileset -- tileset.h:209 with Import => True, Convention => C, External_Name => "TCOD_tileset_load"; --* -- Load a PNG font from memory and return a TCOD_Tileset. -- `buffer[buffer_length]` is the PNG data to load. -- The remaining parameters are the same as `TCOD_tileset_load`. -- function TCOD_tileset_load_mem (arg1 : size_t; arg2 : access unsigned_char; arg3 : int; arg4 : int; arg5 : int; arg6 : access int) return access TCOD_Tileset -- tileset.h:220 with Import => True, Convention => C, External_Name => "TCOD_tileset_load_mem"; --* -- Load raw RGBA data and return a TCOD_Tileset. -- `pixels[width*height]` is a row-major RGBA-ordered byte array. -- The remaining parameters are the same as `TCOD_tileset_load`. -- function TCOD_tileset_load_raw (arg1 : int; arg2 : int; arg3 : access constant color_h.TCOD_ColorRGBA; arg4 : int; arg5 : int; arg6 : int; arg7 : access int) return access TCOD_Tileset -- tileset.h:231 with Import => True, Convention => C, External_Name => "TCOD_tileset_load_raw"; --* -- * Assign a codepoint to an existing tile based on its tile ID. -- * -- * Returns the tile ID on success. -- * -- * Returns a negative value on error. -- function TCOD_tileset_assign_tile (tileset : access TCOD_Tileset; tile_id : int; codepoint : int) return int -- tileset.h:248 with Import => True, Convention => C, External_Name => "TCOD_tileset_assign_tile"; --* -- * Return a pointer to the tile for `codepoint`. -- * -- * Returns NULL if no tile exists for codepoint. -- function TCOD_tileset_get_tile (arg1 : access constant TCOD_Tileset; arg2 : int) return access constant color_h.TCOD_ColorRGBA -- tileset.h:255 with Import => True, Convention => C, External_Name => "TCOD_tileset_get_tile"; --* -- * Return a new observer to this tileset. -- * -- * For internal use. -- function TCOD_tileset_observer_new (arg1 : access TCOD_Tileset) return access TCOD_TilesetObserver -- tileset.h:262 with Import => True, Convention => C, External_Name => "TCOD_tileset_observer_new"; --* -- * Delete an existing observer. -- * -- * Will call this observers on_observer_delete callback. -- * -- * For internal use. -- procedure TCOD_tileset_observer_delete (observer : access TCOD_TilesetObserver) -- tileset.h:270 with Import => True, Convention => C, External_Name => "TCOD_tileset_observer_delete"; --* -- * Called to notify any observers that a tile has been changed. This may -- * cause running atlases to update or mark cache consoles as dirty. -- * -- * For internal use. -- procedure TCOD_tileset_notify_tile_changed (tileset : access TCOD_Tileset; tile_id : int) -- tileset.h:277 with Import => True, Convention => C, External_Name => "TCOD_tileset_notify_tile_changed"; --* -- * Reserve memory for a specific amount of tiles. -- * -- * For internal use. -- function TCOD_tileset_reserve (tileset : access TCOD_Tileset; desired : int) return error_h.TCOD_Error -- tileset.h:284 with Import => True, Convention => C, External_Name => "TCOD_tileset_reserve"; -- extern "C" -- namespace tcod end tileset_h;
examples/DTP08/conor/SomeBasicStuff.agda
shlevy/agda
1,989
15925
<reponame>shlevy/agda -- Some basic stuff for Conor's talk. module SomeBasicStuff where infixr 40 _::_ _↦_∣_ infix 30 _∈_ _==_ infixr 10 _,_ data _==_ {A : Set}(x : A) : A -> Set where refl : x == x data Σ (A : Set)(B : A -> Set) : Set where _,_ : (x : A) -> B x -> Σ A B _×_ : Set -> Set -> Set A × B = Σ A \_ -> B fst : {A : Set}{B : A -> Set} -> Σ A B -> A fst (x , y) = x snd : {A : Set}{B : A -> Set}(p : Σ A B) -> B (fst p) snd (x , y) = y data False : Set where record True : Set where data Nat : Set where zero : Nat suc : Nat -> Nat data [_] (A : Set) : Set where [] : [ A ] _::_ : A -> [ A ] -> [ A ] data _∈_ {A : Set} : A -> [ A ] -> Set where zero : forall {x xs} -> x ∈ x :: xs suc : forall {x y xs} -> x ∈ xs -> x ∈ y :: xs postulate Tag : Set {-# BUILTIN STRING Tag #-} Enumeration = [ Tag ] data Enum (ts : Enumeration) : Set where enum : (t : Tag) -> t ∈ ts -> Enum ts data Table (A : Set1) : Enumeration -> Set1 where [] : Table A [] _↦_∣_ : forall {ts} -> (t : Tag) -> A -> Table A ts -> Table A (t :: ts) lookup : forall {A ts} -> Table A ts -> Enum ts -> A lookup [] (enum _ ()) lookup (.t ↦ v ∣ tbl) (enum t zero) = v lookup (_ ↦ v ∣ tbl) (enum t (suc p)) = lookup tbl (enum t p)
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_55_868.asm
ljhsiun2/medusa
9
89534
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r11 push %r8 push %rax push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_D_ht+0x152c6, %rsi nop nop nop nop and %rbx, %rbx mov $0x6162636465666768, %rax movq %rax, %xmm5 vmovups %ymm5, (%rsi) nop cmp $61023, %rbp lea addresses_A_ht+0x936b, %r11 nop nop nop nop nop cmp %r8, %r8 mov $0x6162636465666768, %rcx movq %rcx, %xmm2 movups %xmm2, (%r11) nop nop nop nop lfence lea addresses_WT_ht+0x2247, %rsi lea addresses_UC_ht+0x1e73b, %rdi nop add $34379, %r8 mov $59, %rcx rep movsb nop inc %rsi lea addresses_D_ht+0x1c40b, %rsi lea addresses_normal_ht+0x17c1b, %rdi clflush (%rsi) xor $30413, %rax mov $26, %rcx rep movsq nop add %rsi, %rsi pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r8 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r14 push %rbp push %rbx push %rcx push %rdx // Store mov $0x1f60f0000000c5f, %rcx inc %r13 movw $0x5152, (%rcx) nop nop sub %rdx, %rdx // Faulty Load lea addresses_WT+0xd36b, %r12 nop xor %r14, %r14 movups (%r12), %xmm4 vpextrq $0, %xmm4, %rbp lea oracles, %r14 and $0xff, %rbp shlq $12, %rbp mov (%r14,%rbp,1), %rbp pop %rdx pop %rcx pop %rbx pop %rbp pop %r14 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 2, 'AVXalign': True, 'NT': False, 'congruent': 2, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 3, 'same': True}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': True}} {'39': 55} 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 */
src/test/resources/data/generationtests/sjasmplus-test2-expected.asm
cpcitor/mdlz80optimizer
36
243162
<filename>src/test/resources/data/generationtests/sjasmplus-test2-expected.asm ; Test case: evaluation of "$" inside macros and eager variables org #2000 db 8192 db 8193 db $ db 1 db 2 dw #ffff org #4000 loop: jr loop
programs/oeis/004/A004327.asm
neoneye/loda
22
163165
; A004327: Binomial coefficient C(3n,n-9). ; 1,30,528,7140,82251,850668,8145060,73629072,636763050,5317936260,43183019880,342700125300,2668424446233,20448884000160,154603005527328,1155454041309504,8550047575185300,62724534168736440 mov $1,$0 add $0,9 mul $0,3 bin $0,$1
tests/gl/gl_test-opengl3.adb
Roldak/OpenGLAda
0
14470
-- part of OpenGLAda, (c) 2017 <NAME> -- released under the terms of the MIT license, see the file "COPYING" with Ada.Text_IO; with GL.Attributes; with GL.Buffers; with GL.Files; with GL.Objects.Buffers; with GL.Objects.Shaders; with GL.Objects.Programs; with GL.Objects.Vertex_Arrays; with GL.Types.Colors; with GL_Test.Display_Backend; procedure GL_Test.OpenGL3 is use GL.Buffers; use GL.Types; use GL.Objects.Vertex_Arrays; procedure Load_Vectors is new GL.Objects.Buffers.Load_To_Buffer (Singles.Vector3_Pointers); procedure Load_Colors is new GL.Objects.Buffers.Load_To_Buffer (Colors.Basic_Color_Pointers); procedure Load_Data (Array1, Array2 : Vertex_Array_Object; Buffer1, Buffer2, Buffer3 : GL.Objects.Buffers.Buffer) is use GL.Objects.Buffers; Triangle1 : constant Singles.Vector3_Array := ((-0.3, 0.5, -1.0), (-0.8, -0.5, -1.0), (0.2, -0.5, -1.0)); Triangle2 : constant Singles.Vector3_Array := ((-0.2, 0.5, -1.0), (0.3, -0.5, -1.0), (0.8, 0.5, -1.0)); Color_Array : constant Colors.Basic_Color_Array := ((1.0, 0.0, 0.0), (0.0, 1.0, 0.0), (0.0, 0.0, 1.0)); begin -- First vertex array object: Colored vertices Array1.Bind; Array_Buffer.Bind (Buffer1); Load_Vectors (Array_Buffer, Triangle1, Static_Draw); GL.Attributes.Set_Vertex_Attrib_Pointer (0, 3, Single_Type, False, 0, 0); GL.Attributes.Enable_Vertex_Attrib_Array (0); Array_Buffer.Bind (Buffer2); Load_Colors (Array_Buffer, Color_Array, Static_Draw); GL.Attributes.Set_Vertex_Attrib_Pointer (1, 3, Single_Type, False, 0, 0); GL.Attributes.Enable_Vertex_Attrib_Array (1); -- Second vertex array object: Only vertices Array2.Bind; Array_Buffer.Bind (Buffer3); Load_Vectors (Array_Buffer, Triangle2, Static_Draw); GL.Attributes.Set_Vertex_Attrib_Pointer (0, 3, Single_Type, False, 0, 0); GL.Attributes.Enable_Vertex_Attrib_Array (0); end Load_Data; procedure Load_Shaders (Program : out GL.Objects.Programs.Program) is Vertex_Shader : GL.Objects.Shaders.Shader (Kind => GL.Objects.Shaders.Vertex_Shader); Fragment_Shader : GL.Objects.Shaders.Shader (Kind => GL.Objects.Shaders.Fragment_Shader); begin Vertex_Shader.Initialize_Id; Fragment_Shader.Initialize_Id; Program.Initialize_Id; -- load shader sources and compile shaders GL.Files.Load_Shader_Source_From_File (Vertex_Shader, "../tests/gl/gl_test-opengl3-vertex.glsl"); GL.Files.Load_Shader_Source_From_File (Fragment_Shader, "../tests/gl/gl_test-opengl3-fragment.glsl"); Vertex_Shader.Compile; Fragment_Shader.Compile; if not Vertex_Shader.Compile_Status then Ada.Text_IO.Put_Line ("Compilation of vertex shader failed. log:"); Ada.Text_IO.Put_Line (Vertex_Shader.Info_Log); end if; if not Fragment_Shader.Compile_Status then Ada.Text_IO.Put_Line ("Compilation of fragment shader failed. log:"); Ada.Text_IO.Put_Line (Fragment_Shader.Info_Log); end if; -- set up program Program.Attach (Vertex_Shader); Program.Attach (Fragment_Shader); Program.Bind_Attrib_Location (0, "in_Position"); Program.Bind_Attrib_Location (1, "in_Color"); Program.Link; if not Program.Link_Status then Ada.Text_IO.Put_Line ("Program linking failed. Log:"); Ada.Text_IO.Put_Line (Program.Info_Log); return; end if; Program.Use_Program; end Load_Shaders; Program : GL.Objects.Programs.Program; Vector_Buffer1, Vector_Buffer2, Color_Buffer : GL.Objects.Buffers.Buffer; Array1, Array2 : GL.Objects.Vertex_Arrays.Vertex_Array_Object; begin Display_Backend.Init; Display_Backend.Configure_Minimum_OpenGL_Version (Major => 3, Minor => 2); Display_Backend.Open_Window (Width => 500, Height => 500); Ada.Text_IO.Put_Line ("Initialized GLFW window"); Vector_Buffer1.Initialize_Id; Vector_Buffer2.Initialize_Id; Color_Buffer.Initialize_Id; Array1.Initialize_Id; Array2.Initialize_Id; Ada.Text_IO.Put_Line ("Initialized objects"); Load_Shaders (Program); Ada.Text_IO.Put_Line ("Loaded shaders"); Load_Data (Array1, Array2, Vector_Buffer1, Color_Buffer, Vector_Buffer2); Ada.Text_IO.Put_Line ("Loaded data"); while Display_Backend.Window_Opened loop Clear (Buffer_Bits'(Color => True, Depth => True, others => False)); Array1.Bind; GL.Objects.Vertex_Arrays.Draw_Arrays (Triangles, 0, 3); Array2.Bind; GL.Attributes.Set_Single (1, 1.0, 0.0, 0.0); GL.Objects.Vertex_Arrays.Draw_Arrays (Triangles, 0, 3); GL.Objects.Vertex_Arrays.Null_Array_Object.Bind; GL.Flush; Display_Backend.Swap_Buffers; Display_Backend.Poll_Events; end loop; Display_Backend.Shutdown; end GL_Test.OpenGL3;
Transynther/x86/_processed/NC/_st_zr_sm_/i3-7100_9_0xca_notsx.log_2158_1073.asm
ljhsiun2/medusa
9
101731
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r12 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0xb5b, %rdi cmp $28522, %r11 mov $0x6162636465666768, %rdx movq %rdx, (%rdi) nop nop xor $58291, %r12 lea addresses_A_ht+0x1d59b, %r12 nop inc %rbx vmovups (%r12), %ymm3 vextracti128 $0, %ymm3, %xmm3 vpextrq $0, %xmm3, %r10 cmp %rbx, %rbx lea addresses_normal_ht+0x3389, %rbx nop nop xor %rdi, %rdi movw $0x6162, (%rbx) nop nop nop nop nop and %r11, %r11 lea addresses_A_ht+0x1ddb, %rsi lea addresses_A_ht+0x123db, %rdi nop nop nop nop nop cmp $1671, %rdx mov $55, %rcx rep movsl nop nop add %r12, %r12 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r12 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r9 push %rbx push %rcx push %rsi // Load mov $0xeb3, %rsi nop and $19260, %rbx mov (%rsi), %r10w cmp $29217, %rsi // Store lea addresses_WC+0x115a3, %r10 nop add $35656, %rcx movb $0x51, (%r10) nop add %r10, %r10 // Store lea addresses_RW+0x4fbb, %r10 nop nop and %r9, %r9 mov $0x5152535455565758, %rbx movq %rbx, %xmm7 vmovaps %ymm7, (%r10) add %r9, %r9 // Store lea addresses_D+0x1b5db, %rcx nop nop inc %r12 movl $0x51525354, (%rcx) nop nop nop xor %rbx, %rbx // Store lea addresses_PSE+0x1339b, %rsi nop nop nop xor %r9, %r9 movl $0x51525354, (%rsi) inc %r11 // Store mov $0x1df63700000001db, %r12 sub $65260, %rsi movw $0x5152, (%r12) add %r9, %r9 // Store lea addresses_WT+0xc12b, %r10 xor $46709, %rcx mov $0x5152535455565758, %r9 movq %r9, %xmm3 movups %xmm3, (%r10) nop nop inc %r10 // Store lea addresses_D+0x1995b, %r12 nop nop nop nop nop add $37117, %r11 movw $0x5152, (%r12) nop nop nop nop and $22403, %rcx // Store lea addresses_PSE+0x405b, %r10 nop xor $20781, %r9 movl $0x51525354, (%r10) nop nop nop nop cmp $512, %r11 // Store lea addresses_UC+0x1219b, %rcx clflush (%rcx) nop nop sub $64636, %r11 mov $0x5152535455565758, %rsi movq %rsi, %xmm4 movups %xmm4, (%rcx) nop nop xor %r11, %r11 // Store lea addresses_normal+0xcddb, %r10 clflush (%r10) nop nop nop nop nop xor %rsi, %rsi movb $0x51, (%r10) nop nop xor $31789, %r12 // Store lea addresses_US+0x1a6db, %r9 xor $31791, %r12 movb $0x51, (%r9) nop nop nop nop sub $2797, %rbx // Faulty Load mov $0x1df63700000001db, %r10 nop sub $2128, %r11 mov (%r10), %ecx lea oracles, %r9 and $0xff, %rcx shlq $12, %rcx mov (%r9,%rcx,1), %rcx pop %rsi pop %rcx pop %rbx pop %r9 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_NC', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_P', 'size': 2, 'AVXalign': True}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_WC', 'size': 1, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_RW', 'size': 32, 'AVXalign': True}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': True, 'type': 'addresses_D', 'size': 4, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_PSE', 'size': 4, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_NC', 'size': 2, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_WT', 'size': 16, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_D', 'size': 2, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_PSE', 'size': 4, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_UC', 'size': 16, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 9, 'NT': True, 'type': 'addresses_normal', 'size': 1, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_US', 'size': 1, 'AVXalign': False}} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_NC', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False}} {'src': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_A_ht', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 1, 'NT': True, 'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': True}} {'src': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}} {'00': 174, '52': 1984} 52 52 52 52 00 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 00 52 00 52 00 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 00 52 00 52 52 00 52 52 52 52 00 00 00 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 00 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 00 52 00 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 00 52 52 52 52 52 52 00 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 00 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 00 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 00 00 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 00 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 00 52 00 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 00 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 */
NovaLang.g4
rafapauwels/novalang
0
5492
<reponame>rafapauwels/novalang<filename>NovaLang.g4 grammar NovaLang; @header{ import java.util.ArrayList; import java.util.Stack; import com.google.googlejavaformat.java.FormatterException; import com.pauwels.nova.program.NovaProgram; import com.pauwels.nova.exception.*; import com.pauwels.nova.commands.*; import com.pauwels.nova.data.*; } @members{ private NovaProgram program = new NovaProgram(); private NovaSymbolMap symbolmap = new NovaSymbolMap(); private NovaTypeEnum tipo; private NovaTypeEnum tipoVar; private String atualID; private String expr; private String decisionExpr; private Stack<ArrayList<Command>> stack = new Stack<ArrayList<Command>>(); private ArrayList<Command> seVerdadeiro = new ArrayList<>(); private ArrayList<Command> seFalso = new ArrayList<>(); private ArrayList<Command> commands = new ArrayList<>(); private void checaTipo(NovaTypeEnum esperado, NovaTypeEnum recebido) { if (esperado != recebido) throw new NovaSemanticException("Tipos incompatíveis.\n Esperado: " + esperado + "\n Recebido: " + recebido); } private void validaID(String id) { if (!symbolmap.idExiste(id)) throw new NovaSemanticException("Variável " + id + " não declarada"); } public String generate() throws FormatterException { String fonte = program.generate(); symbolmap.verificaIdsInutilizados(); return fonte; } } prog : 'programa' declara bloco 'fimprog;' { program.setSymbolMap(symbolmap); program.setCommands(stack.pop()); }; declara : (declaraVar)+; declaraVar : tipo ID { symbolmap.insereId(_input.LT(-1).getText(), new NovaVariable(tipo, null)); } (VIR ID { symbolmap.insereId(_input.LT(-1).getText(), new NovaVariable(tipo, null)); } )* SC; tipo : 'numero' { tipo = NovaTypeEnum.NUMBER; } | 'texto' { tipo = NovaTypeEnum.TEXT; }; bloco : { stack.push(new ArrayList<Command>()); } (cmd)+; cmd : cmdLeitura | cmdEscrita | cmdAttrib | cmdSelecao | cmdRepeticao; cmdLeitura : 'leia' AP ID { atualID = _input.LT(-1).getText(); validaID(atualID); symbolmap.idUtilizado(atualID); } FP SC { NovaVariable var = symbolmap.recuperaSymbol(atualID); stack.peek().add(new CommandLeituraImpl(atualID, var)); }; cmdEscrita : 'escreva' AP ID { atualID = _input.LT(-1).getText(); validaID(atualID); symbolmap.idUtilizado(atualID); } FP SC { stack.peek().add(new CommandEscritaImpl(atualID)); }; cmdAttrib : ID { atualID = _input.LT(-1).getText(); validaID(atualID); symbolmap.idUtilizado(atualID); tipoVar = symbolmap.recuperaSymbol(atualID).getTipo(); } ATTR { expr = ""; } expr SC { stack.peek().add(new CommandAtribuicaoImpl(atualID, expr)); }; cmdSelecao : 'se' AP comparacao FP ACH { stack.push(new ArrayList<Command>()); } (cmd)+ FCH { seVerdadeiro = stack.pop(); seFalso = null; } ('senao' ACH { stack.push(new ArrayList<Command>()); } (cmd)+ FCH { seFalso = stack.pop(); } )? { stack.peek().add(new CommandDecisaoImpl(decisionExpr, seVerdadeiro, seFalso)); }; cmdRepeticao : 'enquanto' AP comparacao FP ACH { stack.push(new ArrayList<Command>()); } (cmd)+ FCH { commands = stack.pop(); stack.peek().add(new CommandRepeticaoImpl(decisionExpr, commands)); }; comparacao : ID { atualID = _input.LT(-1).getText(); validaID(atualID); symbolmap.idUtilizado(atualID); decisionExpr = atualID; } OPREL { decisionExpr += _input.LT(-1).getText(); } (ID | NUMBER) { decisionExpr += _input.LT(-1).getText(); }; expr : termo (OP { expr += _input.LT(-1).getText(); } termo)*; termo : ID { validaID(_input.LT(-1).getText()); expr += _input.LT(-1).getText(); } | NUMBER { checaTipo(tipoVar, NovaTypeEnum.NUMBER); expr += _input.LT(-1).getText(); } | TEXT { checaTipo(tipoVar, NovaTypeEnum.TEXT); expr += _input.LT(-1).getText(); } ; AP : '('; FP : ')'; SC : ';'; OP : '+' | '-' | '*' | '/'; ATTR : '='; VIR : ','; ACH : '{'; FCH : '}'; OPREL : '>' | '<' | '>=' | '<=' | '==' | '!='; ID : [a-z] ([a-z] | [A-Z] | [0-9])*; NUMBER : [0-9]+ ('.' [0-9]+)?; TEXT : '"' (.)*? '"'; WS : (' ' | '\t' | '\n' | '\r') -> skip;
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/unchecked_union1.adb
best08618/asylo
7
10381
-- { dg-do run } procedure Unchecked_Union1 is type Bit is (Zero, One); type U (X : Bit := Zero) is record case X is when Zero => I: Integer; when One => F : Float; end case; end record; for U use record I at 0 range 0 .. 31; F at 0 range 0 .. 31; end record; pragma Unchecked_Union(U); begin if U'Object_Size /= 32 then raise Program_Error; end if; end;
models/hol/sygus/let_benchmarks/array_sum_4_5.als
johnwickerson/alloystar
2
1838
<reponame>johnwickerson/alloystar module array_sum_4_5 open array_sum[spec] /** * https://github.com/rishabhs/sygus-comp14/blob/master/benchmarks/let-benchmarks/array_sum_4_5.sl */ one sig X1, X2, X3, X4 extends IntVar {} one sig I0, I5 extends IntLit {} fact { IntLit<:val = I0->0 + I5->5 //+ I1->1 + I2->2 + I3->3 + I4->4 } -------------------------------------------------------------------------------- -- Spec -------------------------------------------------------------------------------- pred spec[root: Node, eval: Node->Int] { let x1=eval[X1], x2=eval[X2], x3=eval[X3], x4=eval[X4], findSum=eval[root] | x1.plus[x2] > 5 implies findSum = x1.plus[x2] else x2.plus[x3] > 5 implies findSum = x2.plus[x3] else x3.plus[x4] > 5 implies findSum = x3.plus[x4] else findSum = 0 } -------------------------------------------------------------------------------- -- Solution -------------------------------------------------------------------------------- /* one sig Let0, Let1, Let2 extends Let {} one sig Z0, Z1, Z2 extends Z {} one sig GT0, GT1, GT2 extends GT {} one sig ITE0, ITE1, ITE2 extends ITE {} one sig P0, P1, P2 extends Plus {} fact { Let<:zVar = Let0->Z0 + Let1->Z1 + Let2->Z2 Let<:zExpr = Let0->P0 + Let1->P1 + Let2->P2 Let<:body = Let0->ITE0 + Let1->ITE1 + Let2->ITE2 IntOp<:left = P0->X1 + P1->X2 + P2->X3 IntOp<:right = P0->X2 + P1->X3 + P2->X4 IntComp<:left = GT0->Z0 + GT1->Z1 + GT2->Z2 IntComp<:right = GT0->I5 + GT1->I5 + GT2->I5 ITE<:cond = ITE0->GT0 + ITE1->GT1 + ITE2->GT2 ITE<:then = ITE0->Z0 + ITE1->Z1 + ITE2->Z2 ITE<:elsen = ITE0->Let1 + ITE1->Let2 + ITE2->I0 }*/ one sig Let0, Let1, Let2 extends Let {} one sig Z0, Z1, Z2 extends Z {} one sig GT0, GT1, GT2 extends GT {} one sig ITE0, ITE1, ITE2 extends ITE {} one sig P0, P1, P2 extends Plus {} fact { Let<:zVar = Let0->Z0 + Let1->Z1 + Let2->Z2 ITE<:cond = ITE0->GT0 + ITE1->GT1 + ITE2->GT2 (Let1+Let2) !in Let0.^children Let2 !in Let1.^children (ITE1+ITE2) !in ITE0.^children ITE2 !in ITE1.^children } -------------------------------------------------------------------------------- -- Commands -------------------------------------------------------------------------------- // SAT (~4500s) run synth for 0 but -3..6 Int, {atoms: -3..3} IntVarVal, exactly 3 Let, exactly 3 Z, exactly 3 ITE, exactly 3 Plus, exactly 3 GT
programs/oeis/337/A337934.asm
neoneye/loda
22
83163
<reponame>neoneye/loda ; A337934: Sums of two distinct abundant numbers. ; 30,32,36,38,42,44,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160 sub $2,$0 add $0,3 lpb $0 div $0,3 sub $0,$2 lpe mul $0,2 add $0,30
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_8_1497.asm
ljhsiun2/medusa
9
19697
<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r14 push %r8 push %rbp push %rcx push %rdi push %rdx lea addresses_D_ht+0xa548, %rcx nop nop nop nop nop add %r14, %r14 movb $0x61, (%rcx) nop add %rdi, %rdi lea addresses_WT_ht+0x19230, %rcx nop nop nop nop nop and %rdx, %rdx mov $0x6162636465666768, %r14 movq %r14, (%rcx) nop nop nop nop xor $19873, %r14 lea addresses_UC_ht+0x106f0, %rbp sub %r8, %r8 and $0xffffffffffffffc0, %rbp movntdqa (%rbp), %xmm2 vpextrq $0, %xmm2, %rdi nop add %rcx, %rcx pop %rdx pop %rdi pop %rcx pop %rbp pop %r8 pop %r14 ret .global s_faulty_load s_faulty_load: push %r13 push %r14 push %r15 push %r8 push %rax push %rbp push %rbx // Load lea addresses_RW+0x1b630, %rbp clflush (%rbp) nop add $31745, %r15 movaps (%rbp), %xmm2 vpextrq $1, %xmm2, %r8 nop xor $2578, %rbx // Store lea addresses_normal+0x9769, %rax nop and $65058, %r14 movb $0x51, (%rax) nop nop nop and %r14, %r14 // Store lea addresses_RW+0x373e, %r15 nop dec %r13 movb $0x51, (%r15) nop nop add $31777, %rax // Store lea addresses_UC+0x1dbd0, %rbx nop sub $58335, %rbp mov $0x5152535455565758, %r14 movq %r14, %xmm5 movups %xmm5, (%rbx) nop nop nop nop nop cmp $54944, %rbp // Store lea addresses_normal+0x18630, %r14 nop cmp %r15, %r15 movl $0x51525354, (%r14) nop nop nop nop and %r8, %r8 // Faulty Load lea addresses_RW+0x1b630, %r14 xor %r15, %r15 movb (%r14), %r8b lea oracles, %r14 and $0xff, %r8 shlq $12, %r8 mov (%r14,%r8,1), %r8 pop %rbx pop %rbp pop %rax pop %r8 pop %r15 pop %r14 pop %r13 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_RW', 'congruent': 0}} {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': True, 'size': 16, 'type': 'addresses_RW', 'congruent': 0}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_normal', 'congruent': 0}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_RW', 'congruent': 1}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC', 'congruent': 2}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_normal', 'congruent': 9}, 'OP': 'STOR'} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_RW', 'congruent': 0}} <gen_prepare_buffer> {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_D_ht', 'congruent': 3}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WT_ht', 'congruent': 8}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC_ht', 'congruent': 5}} {'32': 8} 32 32 32 32 32 32 32 32 */
oeis/059/A059599.asm
neoneye/loda-programs
11
165252
; A059599: Expansion of (3+x)/(1-x)^6. ; Submitted by <NAME>(s2) ; 3,19,69,189,434,882,1638,2838,4653,7293,11011,16107,22932,31892,43452,58140,76551,99351,127281,161161,201894,250470,307970,375570,454545,546273,652239,774039,913384,1072104,1252152,1455608,1684683,1941723 add $0,4 mov $1,$0 mul $0,4 sub $0,1 bin $1,4 mul $0,$1 div $0,5
automator/open-vscode.applescript
maxrothman/config
0
1731
on run {input, parameters} set appPath to path to application "Visual Studio Code" tell application "Finder" set dir_path to the target of the front window open dir_path using appPath end tell end run
oeis/086/A086024.asm
neoneye/loda-programs
11
173492
; A086024: a(n) = Sum_{i=1..n} C(i+3,4)^3. ; Submitted by <NAME> ; 1,126,3501,46376,389376,2389752,11650752,47587752,168875127,534401002,1537404003,4080706128,10109274128,23590546128,52243162128,110473767504,224205418629,438589465254,830009446129,1524339072504,2724140666880,4748425291880,8089787666880,13495231541880,22078876213755,35477052847506,56059140302631,87210944772256,133711597508256,202229944196256,301972355241632,445520939497632,649909451065257,937993912106382,1340186323724757,1896633009784008,2659934362403008,3698520280786008,5100815686843008 mov $3,$0 mov $0,3 lpb $0 lpb $3 mov $2,$0 add $2,$3 add $2,1 bin $2,$3 pow $2,$0 add $1,$2 sub $3,1 lpe div $0,39 lpe mov $0,$1 add $0,1
data/mapObjects/SilphCo9F.asm
AmateurPanda92/pokemon-rby-dx
9
98236
SilphCo9F_Object: db $2e ; border block db 5 ; warps warp 14, 0, 0, SILPH_CO_10F warp 16, 0, 0, SILPH_CO_8F warp 18, 0, 0, SILPH_CO_ELEVATOR warp 9, 3, 7, SILPH_CO_3F warp 17, 15, 4, SILPH_CO_5F db 0 ; signs db 4 ; objects object SPRITE_NURSE, 3, 14, STAY, DOWN, 1 ; person object SPRITE_ROCKET, 2, 4, STAY, UP, 2, OPP_ROCKET, 37 object SPRITE_OAK_AIDE, 21, 13, STAY, DOWN, 3, OPP_SCIENTIST, 10 object SPRITE_ROCKET, 13, 16, STAY, UP, 4, OPP_ROCKET, 38 ; warp-to warp_to 14, 0, SILPH_CO_9F_WIDTH ; SILPH_CO_10F warp_to 16, 0, SILPH_CO_9F_WIDTH ; SILPH_CO_8F warp_to 18, 0, SILPH_CO_9F_WIDTH ; SILPH_CO_ELEVATOR warp_to 9, 3, SILPH_CO_9F_WIDTH ; SILPH_CO_3F warp_to 17, 15, SILPH_CO_9F_WIDTH ; SILPH_CO_5F
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_2674.asm
ljhsiun2/medusa
9
178881
<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r9 push %rbp push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0x8ae, %r10 add $33397, %r9 mov $0x6162636465666768, %rbp movq %rbp, (%r10) nop nop inc %rdx lea addresses_normal_ht+0x14b2e, %rbx nop nop nop nop inc %rdx movups (%rbx), %xmm3 vpextrq $1, %xmm3, %r11 nop nop nop nop nop sub %rbp, %rbp lea addresses_A_ht+0xe36c, %rsi lea addresses_WC_ht+0x9cfe, %rdi nop sub %rbx, %rbx mov $40, %rcx rep movsb nop nop nop nop nop inc %r10 lea addresses_D_ht+0xff2e, %rdi nop nop sub %r11, %r11 movups (%rdi), %xmm6 vpextrq $1, %xmm6, %rbp nop lfence lea addresses_D_ht+0x1d4ae, %r11 nop nop nop nop nop sub %rdi, %rdi mov $0x6162636465666768, %rbx movq %rbx, (%r11) nop nop nop dec %rdi lea addresses_normal_ht+0x111ae, %rbp nop nop nop nop inc %r10 movups (%rbp), %xmm1 vpextrq $1, %xmm1, %r11 lfence lea addresses_normal_ht+0x1c3d6, %rcx nop nop nop nop dec %r10 movb (%rcx), %r11b nop nop nop add $15678, %r11 lea addresses_UC_ht+0x1e38e, %rsi lea addresses_WC_ht+0x13fae, %rdi add $25989, %r11 mov $96, %rcx rep movsl sub $55721, %rbx lea addresses_A_ht+0x1699a, %rdx lfence movb $0x61, (%rdx) nop nop and $53008, %r11 lea addresses_D_ht+0x109c0, %rsi lea addresses_WC_ht+0x1eb2e, %rdi nop nop nop nop dec %r11 mov $5, %rcx rep movsq nop nop xor $37361, %rdx lea addresses_WC_ht+0xce2e, %rsi lea addresses_A_ht+0x124ae, %rdi nop nop nop nop add %r11, %r11 mov $100, %rcx rep movsl nop nop nop add $20485, %rbp lea addresses_UC_ht+0x11b83, %rsi nop nop nop sub $3126, %r10 movb $0x61, (%rsi) nop nop nop nop nop sub %rdx, %rdx lea addresses_UC_ht+0x7f2e, %rsi lea addresses_A_ht+0x1e82e, %rdi nop nop nop nop xor $34219, %r9 mov $119, %rcx rep movsq nop nop nop nop nop add %r9, %r9 lea addresses_A_ht+0x14e2e, %rdx add %rcx, %rcx mov (%rdx), %r10 nop nop sub $140, %rbp pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rbp pop %r9 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r9 push %rax push %rcx push %rdi push %rsi // Faulty Load lea addresses_RW+0xcb2e, %r9 xor %rsi, %rsi movb (%r9), %al lea oracles, %r10 and $0xff, %rax shlq $12, %rax mov (%r10,%rax,1), %rax pop %rsi pop %rdi pop %rcx pop %rax pop %r9 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 0, 'size': 4, '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': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 5, 'size': 8, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 11, 'size': 16, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 8, 'size': 16, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 5, 'size': 8, 'same': False, 'NT': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 7, 'size': 16, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 3, 'size': 1, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 2, 'size': 1, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 7, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 6, 'size': 8, 'same': True, 'NT': 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 */
stm32f4/stm32f411xx/svd/stm32_svd-dma.ads
ekoeppen/STM32_Generic_Ada_Drivers
1
6803
-- This spec has been automatically generated from STM32F411xx.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with System; package STM32_SVD.DMA is pragma Preelaborate; --------------- -- Registers -- --------------- subtype LISR_FEIF0_Field is STM32_SVD.Bit; subtype LISR_DMEIF0_Field is STM32_SVD.Bit; subtype LISR_TEIF0_Field is STM32_SVD.Bit; subtype LISR_HTIF0_Field is STM32_SVD.Bit; subtype LISR_TCIF0_Field is STM32_SVD.Bit; subtype LISR_FEIF1_Field is STM32_SVD.Bit; subtype LISR_DMEIF1_Field is STM32_SVD.Bit; subtype LISR_TEIF1_Field is STM32_SVD.Bit; subtype LISR_HTIF1_Field is STM32_SVD.Bit; subtype LISR_TCIF1_Field is STM32_SVD.Bit; subtype LISR_FEIF2_Field is STM32_SVD.Bit; subtype LISR_DMEIF2_Field is STM32_SVD.Bit; subtype LISR_TEIF2_Field is STM32_SVD.Bit; subtype LISR_HTIF2_Field is STM32_SVD.Bit; subtype LISR_TCIF2_Field is STM32_SVD.Bit; subtype LISR_FEIF3_Field is STM32_SVD.Bit; subtype LISR_DMEIF3_Field is STM32_SVD.Bit; subtype LISR_TEIF3_Field is STM32_SVD.Bit; subtype LISR_HTIF3_Field is STM32_SVD.Bit; subtype LISR_TCIF3_Field is STM32_SVD.Bit; -- low interrupt status register type LISR_Register is record -- Read-only. Stream x FIFO error interrupt flag (x=3..0) FEIF0 : LISR_FEIF0_Field; -- unspecified Reserved_1_1 : STM32_SVD.Bit; -- Read-only. Stream x direct mode error interrupt flag (x=3..0) DMEIF0 : LISR_DMEIF0_Field; -- Read-only. Stream x transfer error interrupt flag (x=3..0) TEIF0 : LISR_TEIF0_Field; -- Read-only. Stream x half transfer interrupt flag (x=3..0) HTIF0 : LISR_HTIF0_Field; -- Read-only. Stream x transfer complete interrupt flag (x = 3..0) TCIF0 : LISR_TCIF0_Field; -- Read-only. Stream x FIFO error interrupt flag (x=3..0) FEIF1 : LISR_FEIF1_Field; -- unspecified Reserved_7_7 : STM32_SVD.Bit; -- Read-only. Stream x direct mode error interrupt flag (x=3..0) DMEIF1 : LISR_DMEIF1_Field; -- Read-only. Stream x transfer error interrupt flag (x=3..0) TEIF1 : LISR_TEIF1_Field; -- Read-only. Stream x half transfer interrupt flag (x=3..0) HTIF1 : LISR_HTIF1_Field; -- Read-only. Stream x transfer complete interrupt flag (x = 3..0) TCIF1 : LISR_TCIF1_Field; -- unspecified Reserved_12_15 : STM32_SVD.UInt4; -- Read-only. Stream x FIFO error interrupt flag (x=3..0) FEIF2 : LISR_FEIF2_Field; -- unspecified Reserved_17_17 : STM32_SVD.Bit; -- Read-only. Stream x direct mode error interrupt flag (x=3..0) DMEIF2 : LISR_DMEIF2_Field; -- Read-only. Stream x transfer error interrupt flag (x=3..0) TEIF2 : LISR_TEIF2_Field; -- Read-only. Stream x half transfer interrupt flag (x=3..0) HTIF2 : LISR_HTIF2_Field; -- Read-only. Stream x transfer complete interrupt flag (x = 3..0) TCIF2 : LISR_TCIF2_Field; -- Read-only. Stream x FIFO error interrupt flag (x=3..0) FEIF3 : LISR_FEIF3_Field; -- unspecified Reserved_23_23 : STM32_SVD.Bit; -- Read-only. Stream x direct mode error interrupt flag (x=3..0) DMEIF3 : LISR_DMEIF3_Field; -- Read-only. Stream x transfer error interrupt flag (x=3..0) TEIF3 : LISR_TEIF3_Field; -- Read-only. Stream x half transfer interrupt flag (x=3..0) HTIF3 : LISR_HTIF3_Field; -- Read-only. Stream x transfer complete interrupt flag (x = 3..0) TCIF3 : LISR_TCIF3_Field; -- unspecified Reserved_28_31 : STM32_SVD.UInt4; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for LISR_Register use record FEIF0 at 0 range 0 .. 0; Reserved_1_1 at 0 range 1 .. 1; DMEIF0 at 0 range 2 .. 2; TEIF0 at 0 range 3 .. 3; HTIF0 at 0 range 4 .. 4; TCIF0 at 0 range 5 .. 5; FEIF1 at 0 range 6 .. 6; Reserved_7_7 at 0 range 7 .. 7; DMEIF1 at 0 range 8 .. 8; TEIF1 at 0 range 9 .. 9; HTIF1 at 0 range 10 .. 10; TCIF1 at 0 range 11 .. 11; Reserved_12_15 at 0 range 12 .. 15; FEIF2 at 0 range 16 .. 16; Reserved_17_17 at 0 range 17 .. 17; DMEIF2 at 0 range 18 .. 18; TEIF2 at 0 range 19 .. 19; HTIF2 at 0 range 20 .. 20; TCIF2 at 0 range 21 .. 21; FEIF3 at 0 range 22 .. 22; Reserved_23_23 at 0 range 23 .. 23; DMEIF3 at 0 range 24 .. 24; TEIF3 at 0 range 25 .. 25; HTIF3 at 0 range 26 .. 26; TCIF3 at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype HISR_FEIF4_Field is STM32_SVD.Bit; subtype HISR_DMEIF4_Field is STM32_SVD.Bit; subtype HISR_TEIF4_Field is STM32_SVD.Bit; subtype HISR_HTIF4_Field is STM32_SVD.Bit; subtype HISR_TCIF4_Field is STM32_SVD.Bit; subtype HISR_FEIF5_Field is STM32_SVD.Bit; subtype HISR_DMEIF5_Field is STM32_SVD.Bit; subtype HISR_TEIF5_Field is STM32_SVD.Bit; subtype HISR_HTIF5_Field is STM32_SVD.Bit; subtype HISR_TCIF5_Field is STM32_SVD.Bit; subtype HISR_FEIF6_Field is STM32_SVD.Bit; subtype HISR_DMEIF6_Field is STM32_SVD.Bit; subtype HISR_TEIF6_Field is STM32_SVD.Bit; subtype HISR_HTIF6_Field is STM32_SVD.Bit; subtype HISR_TCIF6_Field is STM32_SVD.Bit; subtype HISR_FEIF7_Field is STM32_SVD.Bit; subtype HISR_DMEIF7_Field is STM32_SVD.Bit; subtype HISR_TEIF7_Field is STM32_SVD.Bit; subtype HISR_HTIF7_Field is STM32_SVD.Bit; subtype HISR_TCIF7_Field is STM32_SVD.Bit; -- high interrupt status register type HISR_Register is record -- Read-only. Stream x FIFO error interrupt flag (x=7..4) FEIF4 : HISR_FEIF4_Field; -- unspecified Reserved_1_1 : STM32_SVD.Bit; -- Read-only. Stream x direct mode error interrupt flag (x=7..4) DMEIF4 : HISR_DMEIF4_Field; -- Read-only. Stream x transfer error interrupt flag (x=7..4) TEIF4 : HISR_TEIF4_Field; -- Read-only. Stream x half transfer interrupt flag (x=7..4) HTIF4 : HISR_HTIF4_Field; -- Read-only. Stream x transfer complete interrupt flag (x=7..4) TCIF4 : HISR_TCIF4_Field; -- Read-only. Stream x FIFO error interrupt flag (x=7..4) FEIF5 : HISR_FEIF5_Field; -- unspecified Reserved_7_7 : STM32_SVD.Bit; -- Read-only. Stream x direct mode error interrupt flag (x=7..4) DMEIF5 : HISR_DMEIF5_Field; -- Read-only. Stream x transfer error interrupt flag (x=7..4) TEIF5 : HISR_TEIF5_Field; -- Read-only. Stream x half transfer interrupt flag (x=7..4) HTIF5 : HISR_HTIF5_Field; -- Read-only. Stream x transfer complete interrupt flag (x=7..4) TCIF5 : HISR_TCIF5_Field; -- unspecified Reserved_12_15 : STM32_SVD.UInt4; -- Read-only. Stream x FIFO error interrupt flag (x=7..4) FEIF6 : HISR_FEIF6_Field; -- unspecified Reserved_17_17 : STM32_SVD.Bit; -- Read-only. Stream x direct mode error interrupt flag (x=7..4) DMEIF6 : HISR_DMEIF6_Field; -- Read-only. Stream x transfer error interrupt flag (x=7..4) TEIF6 : HISR_TEIF6_Field; -- Read-only. Stream x half transfer interrupt flag (x=7..4) HTIF6 : HISR_HTIF6_Field; -- Read-only. Stream x transfer complete interrupt flag (x=7..4) TCIF6 : HISR_TCIF6_Field; -- Read-only. Stream x FIFO error interrupt flag (x=7..4) FEIF7 : HISR_FEIF7_Field; -- unspecified Reserved_23_23 : STM32_SVD.Bit; -- Read-only. Stream x direct mode error interrupt flag (x=7..4) DMEIF7 : HISR_DMEIF7_Field; -- Read-only. Stream x transfer error interrupt flag (x=7..4) TEIF7 : HISR_TEIF7_Field; -- Read-only. Stream x half transfer interrupt flag (x=7..4) HTIF7 : HISR_HTIF7_Field; -- Read-only. Stream x transfer complete interrupt flag (x=7..4) TCIF7 : HISR_TCIF7_Field; -- unspecified Reserved_28_31 : STM32_SVD.UInt4; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for HISR_Register use record FEIF4 at 0 range 0 .. 0; Reserved_1_1 at 0 range 1 .. 1; DMEIF4 at 0 range 2 .. 2; TEIF4 at 0 range 3 .. 3; HTIF4 at 0 range 4 .. 4; TCIF4 at 0 range 5 .. 5; FEIF5 at 0 range 6 .. 6; Reserved_7_7 at 0 range 7 .. 7; DMEIF5 at 0 range 8 .. 8; TEIF5 at 0 range 9 .. 9; HTIF5 at 0 range 10 .. 10; TCIF5 at 0 range 11 .. 11; Reserved_12_15 at 0 range 12 .. 15; FEIF6 at 0 range 16 .. 16; Reserved_17_17 at 0 range 17 .. 17; DMEIF6 at 0 range 18 .. 18; TEIF6 at 0 range 19 .. 19; HTIF6 at 0 range 20 .. 20; TCIF6 at 0 range 21 .. 21; FEIF7 at 0 range 22 .. 22; Reserved_23_23 at 0 range 23 .. 23; DMEIF7 at 0 range 24 .. 24; TEIF7 at 0 range 25 .. 25; HTIF7 at 0 range 26 .. 26; TCIF7 at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype LIFCR_CFEIF0_Field is STM32_SVD.Bit; subtype LIFCR_CDMEIF0_Field is STM32_SVD.Bit; subtype LIFCR_CTEIF0_Field is STM32_SVD.Bit; subtype LIFCR_CHTIF0_Field is STM32_SVD.Bit; subtype LIFCR_CTCIF0_Field is STM32_SVD.Bit; subtype LIFCR_CFEIF1_Field is STM32_SVD.Bit; subtype LIFCR_CDMEIF1_Field is STM32_SVD.Bit; subtype LIFCR_CTEIF1_Field is STM32_SVD.Bit; subtype LIFCR_CHTIF1_Field is STM32_SVD.Bit; subtype LIFCR_CTCIF1_Field is STM32_SVD.Bit; subtype LIFCR_CFEIF2_Field is STM32_SVD.Bit; subtype LIFCR_CDMEIF2_Field is STM32_SVD.Bit; subtype LIFCR_CTEIF2_Field is STM32_SVD.Bit; subtype LIFCR_CHTIF2_Field is STM32_SVD.Bit; subtype LIFCR_CTCIF2_Field is STM32_SVD.Bit; subtype LIFCR_CFEIF3_Field is STM32_SVD.Bit; subtype LIFCR_CDMEIF3_Field is STM32_SVD.Bit; subtype LIFCR_CTEIF3_Field is STM32_SVD.Bit; subtype LIFCR_CHTIF3_Field is STM32_SVD.Bit; subtype LIFCR_CTCIF3_Field is STM32_SVD.Bit; -- low interrupt flag clear register type LIFCR_Register is record -- Write-only. Stream x clear FIFO error interrupt flag (x = 3..0) CFEIF0 : LIFCR_CFEIF0_Field := 16#0#; -- unspecified Reserved_1_1 : STM32_SVD.Bit := 16#0#; -- Write-only. Stream x clear direct mode error interrupt flag (x = -- 3..0) CDMEIF0 : LIFCR_CDMEIF0_Field := 16#0#; -- Write-only. Stream x clear transfer error interrupt flag (x = 3..0) CTEIF0 : LIFCR_CTEIF0_Field := 16#0#; -- Write-only. Stream x clear half transfer interrupt flag (x = 3..0) CHTIF0 : LIFCR_CHTIF0_Field := 16#0#; -- Write-only. Stream x clear transfer complete interrupt flag (x = -- 3..0) CTCIF0 : LIFCR_CTCIF0_Field := 16#0#; -- Write-only. Stream x clear FIFO error interrupt flag (x = 3..0) CFEIF1 : LIFCR_CFEIF1_Field := 16#0#; -- unspecified Reserved_7_7 : STM32_SVD.Bit := 16#0#; -- Write-only. Stream x clear direct mode error interrupt flag (x = -- 3..0) CDMEIF1 : LIFCR_CDMEIF1_Field := 16#0#; -- Write-only. Stream x clear transfer error interrupt flag (x = 3..0) CTEIF1 : LIFCR_CTEIF1_Field := 16#0#; -- Write-only. Stream x clear half transfer interrupt flag (x = 3..0) CHTIF1 : LIFCR_CHTIF1_Field := 16#0#; -- Write-only. Stream x clear transfer complete interrupt flag (x = -- 3..0) CTCIF1 : LIFCR_CTCIF1_Field := 16#0#; -- unspecified Reserved_12_15 : STM32_SVD.UInt4 := 16#0#; -- Write-only. Stream x clear FIFO error interrupt flag (x = 3..0) CFEIF2 : LIFCR_CFEIF2_Field := 16#0#; -- unspecified Reserved_17_17 : STM32_SVD.Bit := 16#0#; -- Write-only. Stream x clear direct mode error interrupt flag (x = -- 3..0) CDMEIF2 : LIFCR_CDMEIF2_Field := 16#0#; -- Write-only. Stream x clear transfer error interrupt flag (x = 3..0) CTEIF2 : LIFCR_CTEIF2_Field := 16#0#; -- Write-only. Stream x clear half transfer interrupt flag (x = 3..0) CHTIF2 : LIFCR_CHTIF2_Field := 16#0#; -- Write-only. Stream x clear transfer complete interrupt flag (x = -- 3..0) CTCIF2 : LIFCR_CTCIF2_Field := 16#0#; -- Write-only. Stream x clear FIFO error interrupt flag (x = 3..0) CFEIF3 : LIFCR_CFEIF3_Field := 16#0#; -- unspecified Reserved_23_23 : STM32_SVD.Bit := 16#0#; -- Write-only. Stream x clear direct mode error interrupt flag (x = -- 3..0) CDMEIF3 : LIFCR_CDMEIF3_Field := 16#0#; -- Write-only. Stream x clear transfer error interrupt flag (x = 3..0) CTEIF3 : LIFCR_CTEIF3_Field := 16#0#; -- Write-only. Stream x clear half transfer interrupt flag (x = 3..0) CHTIF3 : LIFCR_CHTIF3_Field := 16#0#; -- Write-only. Stream x clear transfer complete interrupt flag (x = -- 3..0) CTCIF3 : LIFCR_CTCIF3_Field := 16#0#; -- unspecified Reserved_28_31 : STM32_SVD.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for LIFCR_Register use record CFEIF0 at 0 range 0 .. 0; Reserved_1_1 at 0 range 1 .. 1; CDMEIF0 at 0 range 2 .. 2; CTEIF0 at 0 range 3 .. 3; CHTIF0 at 0 range 4 .. 4; CTCIF0 at 0 range 5 .. 5; CFEIF1 at 0 range 6 .. 6; Reserved_7_7 at 0 range 7 .. 7; CDMEIF1 at 0 range 8 .. 8; CTEIF1 at 0 range 9 .. 9; CHTIF1 at 0 range 10 .. 10; CTCIF1 at 0 range 11 .. 11; Reserved_12_15 at 0 range 12 .. 15; CFEIF2 at 0 range 16 .. 16; Reserved_17_17 at 0 range 17 .. 17; CDMEIF2 at 0 range 18 .. 18; CTEIF2 at 0 range 19 .. 19; CHTIF2 at 0 range 20 .. 20; CTCIF2 at 0 range 21 .. 21; CFEIF3 at 0 range 22 .. 22; Reserved_23_23 at 0 range 23 .. 23; CDMEIF3 at 0 range 24 .. 24; CTEIF3 at 0 range 25 .. 25; CHTIF3 at 0 range 26 .. 26; CTCIF3 at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype HIFCR_CFEIF4_Field is STM32_SVD.Bit; subtype HIFCR_CDMEIF4_Field is STM32_SVD.Bit; subtype HIFCR_CTEIF4_Field is STM32_SVD.Bit; subtype HIFCR_CHTIF4_Field is STM32_SVD.Bit; subtype HIFCR_CTCIF4_Field is STM32_SVD.Bit; subtype HIFCR_CFEIF5_Field is STM32_SVD.Bit; subtype HIFCR_CDMEIF5_Field is STM32_SVD.Bit; subtype HIFCR_CTEIF5_Field is STM32_SVD.Bit; subtype HIFCR_CHTIF5_Field is STM32_SVD.Bit; subtype HIFCR_CTCIF5_Field is STM32_SVD.Bit; subtype HIFCR_CFEIF6_Field is STM32_SVD.Bit; subtype HIFCR_CDMEIF6_Field is STM32_SVD.Bit; subtype HIFCR_CTEIF6_Field is STM32_SVD.Bit; subtype HIFCR_CHTIF6_Field is STM32_SVD.Bit; subtype HIFCR_CTCIF6_Field is STM32_SVD.Bit; subtype HIFCR_CFEIF7_Field is STM32_SVD.Bit; subtype HIFCR_CDMEIF7_Field is STM32_SVD.Bit; subtype HIFCR_CTEIF7_Field is STM32_SVD.Bit; subtype HIFCR_CHTIF7_Field is STM32_SVD.Bit; subtype HIFCR_CTCIF7_Field is STM32_SVD.Bit; -- high interrupt flag clear register type HIFCR_Register is record -- Write-only. Stream x clear FIFO error interrupt flag (x = 7..4) CFEIF4 : HIFCR_CFEIF4_Field := 16#0#; -- unspecified Reserved_1_1 : STM32_SVD.Bit := 16#0#; -- Write-only. Stream x clear direct mode error interrupt flag (x = -- 7..4) CDMEIF4 : HIFCR_CDMEIF4_Field := 16#0#; -- Write-only. Stream x clear transfer error interrupt flag (x = 7..4) CTEIF4 : HIFCR_CTEIF4_Field := 16#0#; -- Write-only. Stream x clear half transfer interrupt flag (x = 7..4) CHTIF4 : HIFCR_CHTIF4_Field := 16#0#; -- Write-only. Stream x clear transfer complete interrupt flag (x = -- 7..4) CTCIF4 : HIFCR_CTCIF4_Field := 16#0#; -- Write-only. Stream x clear FIFO error interrupt flag (x = 7..4) CFEIF5 : HIFCR_CFEIF5_Field := 16#0#; -- unspecified Reserved_7_7 : STM32_SVD.Bit := 16#0#; -- Write-only. Stream x clear direct mode error interrupt flag (x = -- 7..4) CDMEIF5 : HIFCR_CDMEIF5_Field := 16#0#; -- Write-only. Stream x clear transfer error interrupt flag (x = 7..4) CTEIF5 : HIFCR_CTEIF5_Field := 16#0#; -- Write-only. Stream x clear half transfer interrupt flag (x = 7..4) CHTIF5 : HIFCR_CHTIF5_Field := 16#0#; -- Write-only. Stream x clear transfer complete interrupt flag (x = -- 7..4) CTCIF5 : HIFCR_CTCIF5_Field := 16#0#; -- unspecified Reserved_12_15 : STM32_SVD.UInt4 := 16#0#; -- Write-only. Stream x clear FIFO error interrupt flag (x = 7..4) CFEIF6 : HIFCR_CFEIF6_Field := 16#0#; -- unspecified Reserved_17_17 : STM32_SVD.Bit := 16#0#; -- Write-only. Stream x clear direct mode error interrupt flag (x = -- 7..4) CDMEIF6 : HIFCR_CDMEIF6_Field := 16#0#; -- Write-only. Stream x clear transfer error interrupt flag (x = 7..4) CTEIF6 : HIFCR_CTEIF6_Field := 16#0#; -- Write-only. Stream x clear half transfer interrupt flag (x = 7..4) CHTIF6 : HIFCR_CHTIF6_Field := 16#0#; -- Write-only. Stream x clear transfer complete interrupt flag (x = -- 7..4) CTCIF6 : HIFCR_CTCIF6_Field := 16#0#; -- Write-only. Stream x clear FIFO error interrupt flag (x = 7..4) CFEIF7 : HIFCR_CFEIF7_Field := 16#0#; -- unspecified Reserved_23_23 : STM32_SVD.Bit := 16#0#; -- Write-only. Stream x clear direct mode error interrupt flag (x = -- 7..4) CDMEIF7 : HIFCR_CDMEIF7_Field := 16#0#; -- Write-only. Stream x clear transfer error interrupt flag (x = 7..4) CTEIF7 : HIFCR_CTEIF7_Field := 16#0#; -- Write-only. Stream x clear half transfer interrupt flag (x = 7..4) CHTIF7 : HIFCR_CHTIF7_Field := 16#0#; -- Write-only. Stream x clear transfer complete interrupt flag (x = -- 7..4) CTCIF7 : HIFCR_CTCIF7_Field := 16#0#; -- unspecified Reserved_28_31 : STM32_SVD.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for HIFCR_Register use record CFEIF4 at 0 range 0 .. 0; Reserved_1_1 at 0 range 1 .. 1; CDMEIF4 at 0 range 2 .. 2; CTEIF4 at 0 range 3 .. 3; CHTIF4 at 0 range 4 .. 4; CTCIF4 at 0 range 5 .. 5; CFEIF5 at 0 range 6 .. 6; Reserved_7_7 at 0 range 7 .. 7; CDMEIF5 at 0 range 8 .. 8; CTEIF5 at 0 range 9 .. 9; CHTIF5 at 0 range 10 .. 10; CTCIF5 at 0 range 11 .. 11; Reserved_12_15 at 0 range 12 .. 15; CFEIF6 at 0 range 16 .. 16; Reserved_17_17 at 0 range 17 .. 17; CDMEIF6 at 0 range 18 .. 18; CTEIF6 at 0 range 19 .. 19; CHTIF6 at 0 range 20 .. 20; CTCIF6 at 0 range 21 .. 21; CFEIF7 at 0 range 22 .. 22; Reserved_23_23 at 0 range 23 .. 23; CDMEIF7 at 0 range 24 .. 24; CTEIF7 at 0 range 25 .. 25; CHTIF7 at 0 range 26 .. 26; CTCIF7 at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype S0CR_EN_Field is STM32_SVD.Bit; subtype S0CR_DMEIE_Field is STM32_SVD.Bit; subtype S0CR_TEIE_Field is STM32_SVD.Bit; subtype S0CR_HTIE_Field is STM32_SVD.Bit; subtype S0CR_TCIE_Field is STM32_SVD.Bit; subtype S0CR_PFCTRL_Field is STM32_SVD.Bit; subtype S0CR_DIR_Field is STM32_SVD.UInt2; subtype S0CR_CIRC_Field is STM32_SVD.Bit; subtype S0CR_PINC_Field is STM32_SVD.Bit; subtype S0CR_MINC_Field is STM32_SVD.Bit; subtype S0CR_PSIZE_Field is STM32_SVD.UInt2; subtype S0CR_MSIZE_Field is STM32_SVD.UInt2; subtype S0CR_PINCOS_Field is STM32_SVD.Bit; subtype S0CR_PL_Field is STM32_SVD.UInt2; subtype S0CR_DBM_Field is STM32_SVD.Bit; subtype S0CR_CT_Field is STM32_SVD.Bit; subtype S0CR_PBURST_Field is STM32_SVD.UInt2; subtype S0CR_MBURST_Field is STM32_SVD.UInt2; subtype S0CR_CHSEL_Field is STM32_SVD.UInt3; -- stream x configuration register type S0CR_Register is record -- Stream enable / flag stream ready when read low EN : S0CR_EN_Field := 16#0#; -- Direct mode error interrupt enable DMEIE : S0CR_DMEIE_Field := 16#0#; -- Transfer error interrupt enable TEIE : S0CR_TEIE_Field := 16#0#; -- Half transfer interrupt enable HTIE : S0CR_HTIE_Field := 16#0#; -- Transfer complete interrupt enable TCIE : S0CR_TCIE_Field := 16#0#; -- Peripheral flow controller PFCTRL : S0CR_PFCTRL_Field := 16#0#; -- Data transfer direction DIR : S0CR_DIR_Field := 16#0#; -- Circular mode CIRC : S0CR_CIRC_Field := 16#0#; -- Peripheral increment mode PINC : S0CR_PINC_Field := 16#0#; -- Memory increment mode MINC : S0CR_MINC_Field := 16#0#; -- Peripheral data size PSIZE : S0CR_PSIZE_Field := 16#0#; -- Memory data size MSIZE : S0CR_MSIZE_Field := 16#0#; -- Peripheral increment offset size PINCOS : S0CR_PINCOS_Field := 16#0#; -- Priority level PL : S0CR_PL_Field := 16#0#; -- Double buffer mode DBM : S0CR_DBM_Field := 16#0#; -- Current target (only in double buffer mode) CT : S0CR_CT_Field := 16#0#; -- unspecified Reserved_20_20 : STM32_SVD.Bit := 16#0#; -- Peripheral burst transfer configuration PBURST : S0CR_PBURST_Field := 16#0#; -- Memory burst transfer configuration MBURST : S0CR_MBURST_Field := 16#0#; -- Channel selection CHSEL : S0CR_CHSEL_Field := 16#0#; -- unspecified Reserved_28_31 : STM32_SVD.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S0CR_Register use record EN at 0 range 0 .. 0; DMEIE at 0 range 1 .. 1; TEIE at 0 range 2 .. 2; HTIE at 0 range 3 .. 3; TCIE at 0 range 4 .. 4; PFCTRL at 0 range 5 .. 5; DIR at 0 range 6 .. 7; CIRC at 0 range 8 .. 8; PINC at 0 range 9 .. 9; MINC at 0 range 10 .. 10; PSIZE at 0 range 11 .. 12; MSIZE at 0 range 13 .. 14; PINCOS at 0 range 15 .. 15; PL at 0 range 16 .. 17; DBM at 0 range 18 .. 18; CT at 0 range 19 .. 19; Reserved_20_20 at 0 range 20 .. 20; PBURST at 0 range 21 .. 22; MBURST at 0 range 23 .. 24; CHSEL at 0 range 25 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype S0NDTR_NDT_Field is STM32_SVD.UInt16; -- stream x number of data register type S0NDTR_Register is record -- Number of data items to transfer NDT : S0NDTR_NDT_Field := 16#0#; -- unspecified Reserved_16_31 : STM32_SVD.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S0NDTR_Register use record NDT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype S0FCR_FTH_Field is STM32_SVD.UInt2; subtype S0FCR_DMDIS_Field is STM32_SVD.Bit; subtype S0FCR_FS_Field is STM32_SVD.UInt3; subtype S0FCR_FEIE_Field is STM32_SVD.Bit; -- stream x FIFO control register type S0FCR_Register is record -- FIFO threshold selection FTH : S0FCR_FTH_Field := 16#1#; -- Direct mode disable DMDIS : S0FCR_DMDIS_Field := 16#0#; -- Read-only. FIFO status FS : S0FCR_FS_Field := 16#4#; -- unspecified Reserved_6_6 : STM32_SVD.Bit := 16#0#; -- FIFO error interrupt enable FEIE : S0FCR_FEIE_Field := 16#0#; -- unspecified Reserved_8_31 : STM32_SVD.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S0FCR_Register use record FTH at 0 range 0 .. 1; DMDIS at 0 range 2 .. 2; FS at 0 range 3 .. 5; Reserved_6_6 at 0 range 6 .. 6; FEIE at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype S1CR_EN_Field is STM32_SVD.Bit; subtype S1CR_DMEIE_Field is STM32_SVD.Bit; subtype S1CR_TEIE_Field is STM32_SVD.Bit; subtype S1CR_HTIE_Field is STM32_SVD.Bit; subtype S1CR_TCIE_Field is STM32_SVD.Bit; subtype S1CR_PFCTRL_Field is STM32_SVD.Bit; subtype S1CR_DIR_Field is STM32_SVD.UInt2; subtype S1CR_CIRC_Field is STM32_SVD.Bit; subtype S1CR_PINC_Field is STM32_SVD.Bit; subtype S1CR_MINC_Field is STM32_SVD.Bit; subtype S1CR_PSIZE_Field is STM32_SVD.UInt2; subtype S1CR_MSIZE_Field is STM32_SVD.UInt2; subtype S1CR_PINCOS_Field is STM32_SVD.Bit; subtype S1CR_PL_Field is STM32_SVD.UInt2; subtype S1CR_DBM_Field is STM32_SVD.Bit; subtype S1CR_CT_Field is STM32_SVD.Bit; subtype S1CR_ACK_Field is STM32_SVD.Bit; subtype S1CR_PBURST_Field is STM32_SVD.UInt2; subtype S1CR_MBURST_Field is STM32_SVD.UInt2; subtype S1CR_CHSEL_Field is STM32_SVD.UInt3; -- stream x configuration register type S1CR_Register is record -- Stream enable / flag stream ready when read low EN : S1CR_EN_Field := 16#0#; -- Direct mode error interrupt enable DMEIE : S1CR_DMEIE_Field := 16#0#; -- Transfer error interrupt enable TEIE : S1CR_TEIE_Field := 16#0#; -- Half transfer interrupt enable HTIE : S1CR_HTIE_Field := 16#0#; -- Transfer complete interrupt enable TCIE : S1CR_TCIE_Field := 16#0#; -- Peripheral flow controller PFCTRL : S1CR_PFCTRL_Field := 16#0#; -- Data transfer direction DIR : S1CR_DIR_Field := 16#0#; -- Circular mode CIRC : S1CR_CIRC_Field := 16#0#; -- Peripheral increment mode PINC : S1CR_PINC_Field := 16#0#; -- Memory increment mode MINC : S1CR_MINC_Field := 16#0#; -- Peripheral data size PSIZE : S1CR_PSIZE_Field := 16#0#; -- Memory data size MSIZE : S1CR_MSIZE_Field := 16#0#; -- Peripheral increment offset size PINCOS : S1CR_PINCOS_Field := 16#0#; -- Priority level PL : S1CR_PL_Field := 16#0#; -- Double buffer mode DBM : S1CR_DBM_Field := 16#0#; -- Current target (only in double buffer mode) CT : S1CR_CT_Field := 16#0#; -- ACK ACK : S1CR_ACK_Field := 16#0#; -- Peripheral burst transfer configuration PBURST : S1CR_PBURST_Field := 16#0#; -- Memory burst transfer configuration MBURST : S1CR_MBURST_Field := 16#0#; -- Channel selection CHSEL : S1CR_CHSEL_Field := 16#0#; -- unspecified Reserved_28_31 : STM32_SVD.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S1CR_Register use record EN at 0 range 0 .. 0; DMEIE at 0 range 1 .. 1; TEIE at 0 range 2 .. 2; HTIE at 0 range 3 .. 3; TCIE at 0 range 4 .. 4; PFCTRL at 0 range 5 .. 5; DIR at 0 range 6 .. 7; CIRC at 0 range 8 .. 8; PINC at 0 range 9 .. 9; MINC at 0 range 10 .. 10; PSIZE at 0 range 11 .. 12; MSIZE at 0 range 13 .. 14; PINCOS at 0 range 15 .. 15; PL at 0 range 16 .. 17; DBM at 0 range 18 .. 18; CT at 0 range 19 .. 19; ACK at 0 range 20 .. 20; PBURST at 0 range 21 .. 22; MBURST at 0 range 23 .. 24; CHSEL at 0 range 25 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype S1NDTR_NDT_Field is STM32_SVD.UInt16; -- stream x number of data register type S1NDTR_Register is record -- Number of data items to transfer NDT : S1NDTR_NDT_Field := 16#0#; -- unspecified Reserved_16_31 : STM32_SVD.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S1NDTR_Register use record NDT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype S1FCR_FTH_Field is STM32_SVD.UInt2; subtype S1FCR_DMDIS_Field is STM32_SVD.Bit; subtype S1FCR_FS_Field is STM32_SVD.UInt3; subtype S1FCR_FEIE_Field is STM32_SVD.Bit; -- stream x FIFO control register type S1FCR_Register is record -- FIFO threshold selection FTH : S1FCR_FTH_Field := 16#1#; -- Direct mode disable DMDIS : S1FCR_DMDIS_Field := 16#0#; -- Read-only. FIFO status FS : S1FCR_FS_Field := 16#4#; -- unspecified Reserved_6_6 : STM32_SVD.Bit := 16#0#; -- FIFO error interrupt enable FEIE : S1FCR_FEIE_Field := 16#0#; -- unspecified Reserved_8_31 : STM32_SVD.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S1FCR_Register use record FTH at 0 range 0 .. 1; DMDIS at 0 range 2 .. 2; FS at 0 range 3 .. 5; Reserved_6_6 at 0 range 6 .. 6; FEIE at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype S2CR_EN_Field is STM32_SVD.Bit; subtype S2CR_DMEIE_Field is STM32_SVD.Bit; subtype S2CR_TEIE_Field is STM32_SVD.Bit; subtype S2CR_HTIE_Field is STM32_SVD.Bit; subtype S2CR_TCIE_Field is STM32_SVD.Bit; subtype S2CR_PFCTRL_Field is STM32_SVD.Bit; subtype S2CR_DIR_Field is STM32_SVD.UInt2; subtype S2CR_CIRC_Field is STM32_SVD.Bit; subtype S2CR_PINC_Field is STM32_SVD.Bit; subtype S2CR_MINC_Field is STM32_SVD.Bit; subtype S2CR_PSIZE_Field is STM32_SVD.UInt2; subtype S2CR_MSIZE_Field is STM32_SVD.UInt2; subtype S2CR_PINCOS_Field is STM32_SVD.Bit; subtype S2CR_PL_Field is STM32_SVD.UInt2; subtype S2CR_DBM_Field is STM32_SVD.Bit; subtype S2CR_CT_Field is STM32_SVD.Bit; subtype S2CR_ACK_Field is STM32_SVD.Bit; subtype S2CR_PBURST_Field is STM32_SVD.UInt2; subtype S2CR_MBURST_Field is STM32_SVD.UInt2; subtype S2CR_CHSEL_Field is STM32_SVD.UInt3; -- stream x configuration register type S2CR_Register is record -- Stream enable / flag stream ready when read low EN : S2CR_EN_Field := 16#0#; -- Direct mode error interrupt enable DMEIE : S2CR_DMEIE_Field := 16#0#; -- Transfer error interrupt enable TEIE : S2CR_TEIE_Field := 16#0#; -- Half transfer interrupt enable HTIE : S2CR_HTIE_Field := 16#0#; -- Transfer complete interrupt enable TCIE : S2CR_TCIE_Field := 16#0#; -- Peripheral flow controller PFCTRL : S2CR_PFCTRL_Field := 16#0#; -- Data transfer direction DIR : S2CR_DIR_Field := 16#0#; -- Circular mode CIRC : S2CR_CIRC_Field := 16#0#; -- Peripheral increment mode PINC : S2CR_PINC_Field := 16#0#; -- Memory increment mode MINC : S2CR_MINC_Field := 16#0#; -- Peripheral data size PSIZE : S2CR_PSIZE_Field := 16#0#; -- Memory data size MSIZE : S2CR_MSIZE_Field := 16#0#; -- Peripheral increment offset size PINCOS : S2CR_PINCOS_Field := 16#0#; -- Priority level PL : S2CR_PL_Field := 16#0#; -- Double buffer mode DBM : S2CR_DBM_Field := 16#0#; -- Current target (only in double buffer mode) CT : S2CR_CT_Field := 16#0#; -- ACK ACK : S2CR_ACK_Field := 16#0#; -- Peripheral burst transfer configuration PBURST : S2CR_PBURST_Field := 16#0#; -- Memory burst transfer configuration MBURST : S2CR_MBURST_Field := 16#0#; -- Channel selection CHSEL : S2CR_CHSEL_Field := 16#0#; -- unspecified Reserved_28_31 : STM32_SVD.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S2CR_Register use record EN at 0 range 0 .. 0; DMEIE at 0 range 1 .. 1; TEIE at 0 range 2 .. 2; HTIE at 0 range 3 .. 3; TCIE at 0 range 4 .. 4; PFCTRL at 0 range 5 .. 5; DIR at 0 range 6 .. 7; CIRC at 0 range 8 .. 8; PINC at 0 range 9 .. 9; MINC at 0 range 10 .. 10; PSIZE at 0 range 11 .. 12; MSIZE at 0 range 13 .. 14; PINCOS at 0 range 15 .. 15; PL at 0 range 16 .. 17; DBM at 0 range 18 .. 18; CT at 0 range 19 .. 19; ACK at 0 range 20 .. 20; PBURST at 0 range 21 .. 22; MBURST at 0 range 23 .. 24; CHSEL at 0 range 25 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype S2NDTR_NDT_Field is STM32_SVD.UInt16; -- stream x number of data register type S2NDTR_Register is record -- Number of data items to transfer NDT : S2NDTR_NDT_Field := 16#0#; -- unspecified Reserved_16_31 : STM32_SVD.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S2NDTR_Register use record NDT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype S2FCR_FTH_Field is STM32_SVD.UInt2; subtype S2FCR_DMDIS_Field is STM32_SVD.Bit; subtype S2FCR_FS_Field is STM32_SVD.UInt3; subtype S2FCR_FEIE_Field is STM32_SVD.Bit; -- stream x FIFO control register type S2FCR_Register is record -- FIFO threshold selection FTH : S2FCR_FTH_Field := 16#1#; -- Direct mode disable DMDIS : S2FCR_DMDIS_Field := 16#0#; -- Read-only. FIFO status FS : S2FCR_FS_Field := 16#4#; -- unspecified Reserved_6_6 : STM32_SVD.Bit := 16#0#; -- FIFO error interrupt enable FEIE : S2FCR_FEIE_Field := 16#0#; -- unspecified Reserved_8_31 : STM32_SVD.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S2FCR_Register use record FTH at 0 range 0 .. 1; DMDIS at 0 range 2 .. 2; FS at 0 range 3 .. 5; Reserved_6_6 at 0 range 6 .. 6; FEIE at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype S3CR_EN_Field is STM32_SVD.Bit; subtype S3CR_DMEIE_Field is STM32_SVD.Bit; subtype S3CR_TEIE_Field is STM32_SVD.Bit; subtype S3CR_HTIE_Field is STM32_SVD.Bit; subtype S3CR_TCIE_Field is STM32_SVD.Bit; subtype S3CR_PFCTRL_Field is STM32_SVD.Bit; subtype S3CR_DIR_Field is STM32_SVD.UInt2; subtype S3CR_CIRC_Field is STM32_SVD.Bit; subtype S3CR_PINC_Field is STM32_SVD.Bit; subtype S3CR_MINC_Field is STM32_SVD.Bit; subtype S3CR_PSIZE_Field is STM32_SVD.UInt2; subtype S3CR_MSIZE_Field is STM32_SVD.UInt2; subtype S3CR_PINCOS_Field is STM32_SVD.Bit; subtype S3CR_PL_Field is STM32_SVD.UInt2; subtype S3CR_DBM_Field is STM32_SVD.Bit; subtype S3CR_CT_Field is STM32_SVD.Bit; subtype S3CR_ACK_Field is STM32_SVD.Bit; subtype S3CR_PBURST_Field is STM32_SVD.UInt2; subtype S3CR_MBURST_Field is STM32_SVD.UInt2; subtype S3CR_CHSEL_Field is STM32_SVD.UInt3; -- stream x configuration register type S3CR_Register is record -- Stream enable / flag stream ready when read low EN : S3CR_EN_Field := 16#0#; -- Direct mode error interrupt enable DMEIE : S3CR_DMEIE_Field := 16#0#; -- Transfer error interrupt enable TEIE : S3CR_TEIE_Field := 16#0#; -- Half transfer interrupt enable HTIE : S3CR_HTIE_Field := 16#0#; -- Transfer complete interrupt enable TCIE : S3CR_TCIE_Field := 16#0#; -- Peripheral flow controller PFCTRL : S3CR_PFCTRL_Field := 16#0#; -- Data transfer direction DIR : S3CR_DIR_Field := 16#0#; -- Circular mode CIRC : S3CR_CIRC_Field := 16#0#; -- Peripheral increment mode PINC : S3CR_PINC_Field := 16#0#; -- Memory increment mode MINC : S3CR_MINC_Field := 16#0#; -- Peripheral data size PSIZE : S3CR_PSIZE_Field := 16#0#; -- Memory data size MSIZE : S3CR_MSIZE_Field := 16#0#; -- Peripheral increment offset size PINCOS : S3CR_PINCOS_Field := 16#0#; -- Priority level PL : S3CR_PL_Field := 16#0#; -- Double buffer mode DBM : S3CR_DBM_Field := 16#0#; -- Current target (only in double buffer mode) CT : S3CR_CT_Field := 16#0#; -- ACK ACK : S3CR_ACK_Field := 16#0#; -- Peripheral burst transfer configuration PBURST : S3CR_PBURST_Field := 16#0#; -- Memory burst transfer configuration MBURST : S3CR_MBURST_Field := 16#0#; -- Channel selection CHSEL : S3CR_CHSEL_Field := 16#0#; -- unspecified Reserved_28_31 : STM32_SVD.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S3CR_Register use record EN at 0 range 0 .. 0; DMEIE at 0 range 1 .. 1; TEIE at 0 range 2 .. 2; HTIE at 0 range 3 .. 3; TCIE at 0 range 4 .. 4; PFCTRL at 0 range 5 .. 5; DIR at 0 range 6 .. 7; CIRC at 0 range 8 .. 8; PINC at 0 range 9 .. 9; MINC at 0 range 10 .. 10; PSIZE at 0 range 11 .. 12; MSIZE at 0 range 13 .. 14; PINCOS at 0 range 15 .. 15; PL at 0 range 16 .. 17; DBM at 0 range 18 .. 18; CT at 0 range 19 .. 19; ACK at 0 range 20 .. 20; PBURST at 0 range 21 .. 22; MBURST at 0 range 23 .. 24; CHSEL at 0 range 25 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype S3NDTR_NDT_Field is STM32_SVD.UInt16; -- stream x number of data register type S3NDTR_Register is record -- Number of data items to transfer NDT : S3NDTR_NDT_Field := 16#0#; -- unspecified Reserved_16_31 : STM32_SVD.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S3NDTR_Register use record NDT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype S3FCR_FTH_Field is STM32_SVD.UInt2; subtype S3FCR_DMDIS_Field is STM32_SVD.Bit; subtype S3FCR_FS_Field is STM32_SVD.UInt3; subtype S3FCR_FEIE_Field is STM32_SVD.Bit; -- stream x FIFO control register type S3FCR_Register is record -- FIFO threshold selection FTH : S3FCR_FTH_Field := 16#1#; -- Direct mode disable DMDIS : S3FCR_DMDIS_Field := 16#0#; -- Read-only. FIFO status FS : S3FCR_FS_Field := 16#4#; -- unspecified Reserved_6_6 : STM32_SVD.Bit := 16#0#; -- FIFO error interrupt enable FEIE : S3FCR_FEIE_Field := 16#0#; -- unspecified Reserved_8_31 : STM32_SVD.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S3FCR_Register use record FTH at 0 range 0 .. 1; DMDIS at 0 range 2 .. 2; FS at 0 range 3 .. 5; Reserved_6_6 at 0 range 6 .. 6; FEIE at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype S4CR_EN_Field is STM32_SVD.Bit; subtype S4CR_DMEIE_Field is STM32_SVD.Bit; subtype S4CR_TEIE_Field is STM32_SVD.Bit; subtype S4CR_HTIE_Field is STM32_SVD.Bit; subtype S4CR_TCIE_Field is STM32_SVD.Bit; subtype S4CR_PFCTRL_Field is STM32_SVD.Bit; subtype S4CR_DIR_Field is STM32_SVD.UInt2; subtype S4CR_CIRC_Field is STM32_SVD.Bit; subtype S4CR_PINC_Field is STM32_SVD.Bit; subtype S4CR_MINC_Field is STM32_SVD.Bit; subtype S4CR_PSIZE_Field is STM32_SVD.UInt2; subtype S4CR_MSIZE_Field is STM32_SVD.UInt2; subtype S4CR_PINCOS_Field is STM32_SVD.Bit; subtype S4CR_PL_Field is STM32_SVD.UInt2; subtype S4CR_DBM_Field is STM32_SVD.Bit; subtype S4CR_CT_Field is STM32_SVD.Bit; subtype S4CR_ACK_Field is STM32_SVD.Bit; subtype S4CR_PBURST_Field is STM32_SVD.UInt2; subtype S4CR_MBURST_Field is STM32_SVD.UInt2; subtype S4CR_CHSEL_Field is STM32_SVD.UInt3; -- stream x configuration register type S4CR_Register is record -- Stream enable / flag stream ready when read low EN : S4CR_EN_Field := 16#0#; -- Direct mode error interrupt enable DMEIE : S4CR_DMEIE_Field := 16#0#; -- Transfer error interrupt enable TEIE : S4CR_TEIE_Field := 16#0#; -- Half transfer interrupt enable HTIE : S4CR_HTIE_Field := 16#0#; -- Transfer complete interrupt enable TCIE : S4CR_TCIE_Field := 16#0#; -- Peripheral flow controller PFCTRL : S4CR_PFCTRL_Field := 16#0#; -- Data transfer direction DIR : S4CR_DIR_Field := 16#0#; -- Circular mode CIRC : S4CR_CIRC_Field := 16#0#; -- Peripheral increment mode PINC : S4CR_PINC_Field := 16#0#; -- Memory increment mode MINC : S4CR_MINC_Field := 16#0#; -- Peripheral data size PSIZE : S4CR_PSIZE_Field := 16#0#; -- Memory data size MSIZE : S4CR_MSIZE_Field := 16#0#; -- Peripheral increment offset size PINCOS : S4CR_PINCOS_Field := 16#0#; -- Priority level PL : S4CR_PL_Field := 16#0#; -- Double buffer mode DBM : S4CR_DBM_Field := 16#0#; -- Current target (only in double buffer mode) CT : S4CR_CT_Field := 16#0#; -- ACK ACK : S4CR_ACK_Field := 16#0#; -- Peripheral burst transfer configuration PBURST : S4CR_PBURST_Field := 16#0#; -- Memory burst transfer configuration MBURST : S4CR_MBURST_Field := 16#0#; -- Channel selection CHSEL : S4CR_CHSEL_Field := 16#0#; -- unspecified Reserved_28_31 : STM32_SVD.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S4CR_Register use record EN at 0 range 0 .. 0; DMEIE at 0 range 1 .. 1; TEIE at 0 range 2 .. 2; HTIE at 0 range 3 .. 3; TCIE at 0 range 4 .. 4; PFCTRL at 0 range 5 .. 5; DIR at 0 range 6 .. 7; CIRC at 0 range 8 .. 8; PINC at 0 range 9 .. 9; MINC at 0 range 10 .. 10; PSIZE at 0 range 11 .. 12; MSIZE at 0 range 13 .. 14; PINCOS at 0 range 15 .. 15; PL at 0 range 16 .. 17; DBM at 0 range 18 .. 18; CT at 0 range 19 .. 19; ACK at 0 range 20 .. 20; PBURST at 0 range 21 .. 22; MBURST at 0 range 23 .. 24; CHSEL at 0 range 25 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype S4NDTR_NDT_Field is STM32_SVD.UInt16; -- stream x number of data register type S4NDTR_Register is record -- Number of data items to transfer NDT : S4NDTR_NDT_Field := 16#0#; -- unspecified Reserved_16_31 : STM32_SVD.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S4NDTR_Register use record NDT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype S4FCR_FTH_Field is STM32_SVD.UInt2; subtype S4FCR_DMDIS_Field is STM32_SVD.Bit; subtype S4FCR_FS_Field is STM32_SVD.UInt3; subtype S4FCR_FEIE_Field is STM32_SVD.Bit; -- stream x FIFO control register type S4FCR_Register is record -- FIFO threshold selection FTH : S4FCR_FTH_Field := 16#1#; -- Direct mode disable DMDIS : S4FCR_DMDIS_Field := 16#0#; -- Read-only. FIFO status FS : S4FCR_FS_Field := 16#4#; -- unspecified Reserved_6_6 : STM32_SVD.Bit := 16#0#; -- FIFO error interrupt enable FEIE : S4FCR_FEIE_Field := 16#0#; -- unspecified Reserved_8_31 : STM32_SVD.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S4FCR_Register use record FTH at 0 range 0 .. 1; DMDIS at 0 range 2 .. 2; FS at 0 range 3 .. 5; Reserved_6_6 at 0 range 6 .. 6; FEIE at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype S5CR_EN_Field is STM32_SVD.Bit; subtype S5CR_DMEIE_Field is STM32_SVD.Bit; subtype S5CR_TEIE_Field is STM32_SVD.Bit; subtype S5CR_HTIE_Field is STM32_SVD.Bit; subtype S5CR_TCIE_Field is STM32_SVD.Bit; subtype S5CR_PFCTRL_Field is STM32_SVD.Bit; subtype S5CR_DIR_Field is STM32_SVD.UInt2; subtype S5CR_CIRC_Field is STM32_SVD.Bit; subtype S5CR_PINC_Field is STM32_SVD.Bit; subtype S5CR_MINC_Field is STM32_SVD.Bit; subtype S5CR_PSIZE_Field is STM32_SVD.UInt2; subtype S5CR_MSIZE_Field is STM32_SVD.UInt2; subtype S5CR_PINCOS_Field is STM32_SVD.Bit; subtype S5CR_PL_Field is STM32_SVD.UInt2; subtype S5CR_DBM_Field is STM32_SVD.Bit; subtype S5CR_CT_Field is STM32_SVD.Bit; subtype S5CR_ACK_Field is STM32_SVD.Bit; subtype S5CR_PBURST_Field is STM32_SVD.UInt2; subtype S5CR_MBURST_Field is STM32_SVD.UInt2; subtype S5CR_CHSEL_Field is STM32_SVD.UInt3; -- stream x configuration register type S5CR_Register is record -- Stream enable / flag stream ready when read low EN : S5CR_EN_Field := 16#0#; -- Direct mode error interrupt enable DMEIE : S5CR_DMEIE_Field := 16#0#; -- Transfer error interrupt enable TEIE : S5CR_TEIE_Field := 16#0#; -- Half transfer interrupt enable HTIE : S5CR_HTIE_Field := 16#0#; -- Transfer complete interrupt enable TCIE : S5CR_TCIE_Field := 16#0#; -- Peripheral flow controller PFCTRL : S5CR_PFCTRL_Field := 16#0#; -- Data transfer direction DIR : S5CR_DIR_Field := 16#0#; -- Circular mode CIRC : S5CR_CIRC_Field := 16#0#; -- Peripheral increment mode PINC : S5CR_PINC_Field := 16#0#; -- Memory increment mode MINC : S5CR_MINC_Field := 16#0#; -- Peripheral data size PSIZE : S5CR_PSIZE_Field := 16#0#; -- Memory data size MSIZE : S5CR_MSIZE_Field := 16#0#; -- Peripheral increment offset size PINCOS : S5CR_PINCOS_Field := 16#0#; -- Priority level PL : S5CR_PL_Field := 16#0#; -- Double buffer mode DBM : S5CR_DBM_Field := 16#0#; -- Current target (only in double buffer mode) CT : S5CR_CT_Field := 16#0#; -- ACK ACK : S5CR_ACK_Field := 16#0#; -- Peripheral burst transfer configuration PBURST : S5CR_PBURST_Field := 16#0#; -- Memory burst transfer configuration MBURST : S5CR_MBURST_Field := 16#0#; -- Channel selection CHSEL : S5CR_CHSEL_Field := 16#0#; -- unspecified Reserved_28_31 : STM32_SVD.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S5CR_Register use record EN at 0 range 0 .. 0; DMEIE at 0 range 1 .. 1; TEIE at 0 range 2 .. 2; HTIE at 0 range 3 .. 3; TCIE at 0 range 4 .. 4; PFCTRL at 0 range 5 .. 5; DIR at 0 range 6 .. 7; CIRC at 0 range 8 .. 8; PINC at 0 range 9 .. 9; MINC at 0 range 10 .. 10; PSIZE at 0 range 11 .. 12; MSIZE at 0 range 13 .. 14; PINCOS at 0 range 15 .. 15; PL at 0 range 16 .. 17; DBM at 0 range 18 .. 18; CT at 0 range 19 .. 19; ACK at 0 range 20 .. 20; PBURST at 0 range 21 .. 22; MBURST at 0 range 23 .. 24; CHSEL at 0 range 25 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype S5NDTR_NDT_Field is STM32_SVD.UInt16; -- stream x number of data register type S5NDTR_Register is record -- Number of data items to transfer NDT : S5NDTR_NDT_Field := 16#0#; -- unspecified Reserved_16_31 : STM32_SVD.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S5NDTR_Register use record NDT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype S5FCR_FTH_Field is STM32_SVD.UInt2; subtype S5FCR_DMDIS_Field is STM32_SVD.Bit; subtype S5FCR_FS_Field is STM32_SVD.UInt3; subtype S5FCR_FEIE_Field is STM32_SVD.Bit; -- stream x FIFO control register type S5FCR_Register is record -- FIFO threshold selection FTH : S5FCR_FTH_Field := 16#1#; -- Direct mode disable DMDIS : S5FCR_DMDIS_Field := 16#0#; -- Read-only. FIFO status FS : S5FCR_FS_Field := 16#4#; -- unspecified Reserved_6_6 : STM32_SVD.Bit := 16#0#; -- FIFO error interrupt enable FEIE : S5FCR_FEIE_Field := 16#0#; -- unspecified Reserved_8_31 : STM32_SVD.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S5FCR_Register use record FTH at 0 range 0 .. 1; DMDIS at 0 range 2 .. 2; FS at 0 range 3 .. 5; Reserved_6_6 at 0 range 6 .. 6; FEIE at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype S6CR_EN_Field is STM32_SVD.Bit; subtype S6CR_DMEIE_Field is STM32_SVD.Bit; subtype S6CR_TEIE_Field is STM32_SVD.Bit; subtype S6CR_HTIE_Field is STM32_SVD.Bit; subtype S6CR_TCIE_Field is STM32_SVD.Bit; subtype S6CR_PFCTRL_Field is STM32_SVD.Bit; subtype S6CR_DIR_Field is STM32_SVD.UInt2; subtype S6CR_CIRC_Field is STM32_SVD.Bit; subtype S6CR_PINC_Field is STM32_SVD.Bit; subtype S6CR_MINC_Field is STM32_SVD.Bit; subtype S6CR_PSIZE_Field is STM32_SVD.UInt2; subtype S6CR_MSIZE_Field is STM32_SVD.UInt2; subtype S6CR_PINCOS_Field is STM32_SVD.Bit; subtype S6CR_PL_Field is STM32_SVD.UInt2; subtype S6CR_DBM_Field is STM32_SVD.Bit; subtype S6CR_CT_Field is STM32_SVD.Bit; subtype S6CR_ACK_Field is STM32_SVD.Bit; subtype S6CR_PBURST_Field is STM32_SVD.UInt2; subtype S6CR_MBURST_Field is STM32_SVD.UInt2; subtype S6CR_CHSEL_Field is STM32_SVD.UInt3; -- stream x configuration register type S6CR_Register is record -- Stream enable / flag stream ready when read low EN : S6CR_EN_Field := 16#0#; -- Direct mode error interrupt enable DMEIE : S6CR_DMEIE_Field := 16#0#; -- Transfer error interrupt enable TEIE : S6CR_TEIE_Field := 16#0#; -- Half transfer interrupt enable HTIE : S6CR_HTIE_Field := 16#0#; -- Transfer complete interrupt enable TCIE : S6CR_TCIE_Field := 16#0#; -- Peripheral flow controller PFCTRL : S6CR_PFCTRL_Field := 16#0#; -- Data transfer direction DIR : S6CR_DIR_Field := 16#0#; -- Circular mode CIRC : S6CR_CIRC_Field := 16#0#; -- Peripheral increment mode PINC : S6CR_PINC_Field := 16#0#; -- Memory increment mode MINC : S6CR_MINC_Field := 16#0#; -- Peripheral data size PSIZE : S6CR_PSIZE_Field := 16#0#; -- Memory data size MSIZE : S6CR_MSIZE_Field := 16#0#; -- Peripheral increment offset size PINCOS : S6CR_PINCOS_Field := 16#0#; -- Priority level PL : S6CR_PL_Field := 16#0#; -- Double buffer mode DBM : S6CR_DBM_Field := 16#0#; -- Current target (only in double buffer mode) CT : S6CR_CT_Field := 16#0#; -- ACK ACK : S6CR_ACK_Field := 16#0#; -- Peripheral burst transfer configuration PBURST : S6CR_PBURST_Field := 16#0#; -- Memory burst transfer configuration MBURST : S6CR_MBURST_Field := 16#0#; -- Channel selection CHSEL : S6CR_CHSEL_Field := 16#0#; -- unspecified Reserved_28_31 : STM32_SVD.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S6CR_Register use record EN at 0 range 0 .. 0; DMEIE at 0 range 1 .. 1; TEIE at 0 range 2 .. 2; HTIE at 0 range 3 .. 3; TCIE at 0 range 4 .. 4; PFCTRL at 0 range 5 .. 5; DIR at 0 range 6 .. 7; CIRC at 0 range 8 .. 8; PINC at 0 range 9 .. 9; MINC at 0 range 10 .. 10; PSIZE at 0 range 11 .. 12; MSIZE at 0 range 13 .. 14; PINCOS at 0 range 15 .. 15; PL at 0 range 16 .. 17; DBM at 0 range 18 .. 18; CT at 0 range 19 .. 19; ACK at 0 range 20 .. 20; PBURST at 0 range 21 .. 22; MBURST at 0 range 23 .. 24; CHSEL at 0 range 25 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype S6NDTR_NDT_Field is STM32_SVD.UInt16; -- stream x number of data register type S6NDTR_Register is record -- Number of data items to transfer NDT : S6NDTR_NDT_Field := 16#0#; -- unspecified Reserved_16_31 : STM32_SVD.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S6NDTR_Register use record NDT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype S6FCR_FTH_Field is STM32_SVD.UInt2; subtype S6FCR_DMDIS_Field is STM32_SVD.Bit; subtype S6FCR_FS_Field is STM32_SVD.UInt3; subtype S6FCR_FEIE_Field is STM32_SVD.Bit; -- stream x FIFO control register type S6FCR_Register is record -- FIFO threshold selection FTH : S6FCR_FTH_Field := 16#1#; -- Direct mode disable DMDIS : S6FCR_DMDIS_Field := 16#0#; -- Read-only. FIFO status FS : S6FCR_FS_Field := 16#4#; -- unspecified Reserved_6_6 : STM32_SVD.Bit := 16#0#; -- FIFO error interrupt enable FEIE : S6FCR_FEIE_Field := 16#0#; -- unspecified Reserved_8_31 : STM32_SVD.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S6FCR_Register use record FTH at 0 range 0 .. 1; DMDIS at 0 range 2 .. 2; FS at 0 range 3 .. 5; Reserved_6_6 at 0 range 6 .. 6; FEIE at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype S7CR_EN_Field is STM32_SVD.Bit; subtype S7CR_DMEIE_Field is STM32_SVD.Bit; subtype S7CR_TEIE_Field is STM32_SVD.Bit; subtype S7CR_HTIE_Field is STM32_SVD.Bit; subtype S7CR_TCIE_Field is STM32_SVD.Bit; subtype S7CR_PFCTRL_Field is STM32_SVD.Bit; subtype S7CR_DIR_Field is STM32_SVD.UInt2; subtype S7CR_CIRC_Field is STM32_SVD.Bit; subtype S7CR_PINC_Field is STM32_SVD.Bit; subtype S7CR_MINC_Field is STM32_SVD.Bit; subtype S7CR_PSIZE_Field is STM32_SVD.UInt2; subtype S7CR_MSIZE_Field is STM32_SVD.UInt2; subtype S7CR_PINCOS_Field is STM32_SVD.Bit; subtype S7CR_PL_Field is STM32_SVD.UInt2; subtype S7CR_DBM_Field is STM32_SVD.Bit; subtype S7CR_CT_Field is STM32_SVD.Bit; subtype S7CR_ACK_Field is STM32_SVD.Bit; subtype S7CR_PBURST_Field is STM32_SVD.UInt2; subtype S7CR_MBURST_Field is STM32_SVD.UInt2; subtype S7CR_CHSEL_Field is STM32_SVD.UInt3; -- stream x configuration register type S7CR_Register is record -- Stream enable / flag stream ready when read low EN : S7CR_EN_Field := 16#0#; -- Direct mode error interrupt enable DMEIE : S7CR_DMEIE_Field := 16#0#; -- Transfer error interrupt enable TEIE : S7CR_TEIE_Field := 16#0#; -- Half transfer interrupt enable HTIE : S7CR_HTIE_Field := 16#0#; -- Transfer complete interrupt enable TCIE : S7CR_TCIE_Field := 16#0#; -- Peripheral flow controller PFCTRL : S7CR_PFCTRL_Field := 16#0#; -- Data transfer direction DIR : S7CR_DIR_Field := 16#0#; -- Circular mode CIRC : S7CR_CIRC_Field := 16#0#; -- Peripheral increment mode PINC : S7CR_PINC_Field := 16#0#; -- Memory increment mode MINC : S7CR_MINC_Field := 16#0#; -- Peripheral data size PSIZE : S7CR_PSIZE_Field := 16#0#; -- Memory data size MSIZE : S7CR_MSIZE_Field := 16#0#; -- Peripheral increment offset size PINCOS : S7CR_PINCOS_Field := 16#0#; -- Priority level PL : S7CR_PL_Field := 16#0#; -- Double buffer mode DBM : S7CR_DBM_Field := 16#0#; -- Current target (only in double buffer mode) CT : S7CR_CT_Field := 16#0#; -- ACK ACK : S7CR_ACK_Field := 16#0#; -- Peripheral burst transfer configuration PBURST : S7CR_PBURST_Field := 16#0#; -- Memory burst transfer configuration MBURST : S7CR_MBURST_Field := 16#0#; -- Channel selection CHSEL : S7CR_CHSEL_Field := 16#0#; -- unspecified Reserved_28_31 : STM32_SVD.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S7CR_Register use record EN at 0 range 0 .. 0; DMEIE at 0 range 1 .. 1; TEIE at 0 range 2 .. 2; HTIE at 0 range 3 .. 3; TCIE at 0 range 4 .. 4; PFCTRL at 0 range 5 .. 5; DIR at 0 range 6 .. 7; CIRC at 0 range 8 .. 8; PINC at 0 range 9 .. 9; MINC at 0 range 10 .. 10; PSIZE at 0 range 11 .. 12; MSIZE at 0 range 13 .. 14; PINCOS at 0 range 15 .. 15; PL at 0 range 16 .. 17; DBM at 0 range 18 .. 18; CT at 0 range 19 .. 19; ACK at 0 range 20 .. 20; PBURST at 0 range 21 .. 22; MBURST at 0 range 23 .. 24; CHSEL at 0 range 25 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype S7NDTR_NDT_Field is STM32_SVD.UInt16; -- stream x number of data register type S7NDTR_Register is record -- Number of data items to transfer NDT : S7NDTR_NDT_Field := 16#0#; -- unspecified Reserved_16_31 : STM32_SVD.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S7NDTR_Register use record NDT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype S7FCR_FTH_Field is STM32_SVD.UInt2; subtype S7FCR_DMDIS_Field is STM32_SVD.Bit; subtype S7FCR_FS_Field is STM32_SVD.UInt3; subtype S7FCR_FEIE_Field is STM32_SVD.Bit; -- stream x FIFO control register type S7FCR_Register is record -- FIFO threshold selection FTH : S7FCR_FTH_Field := 16#1#; -- Direct mode disable DMDIS : S7FCR_DMDIS_Field := 16#0#; -- Read-only. FIFO status FS : S7FCR_FS_Field := 16#4#; -- unspecified Reserved_6_6 : STM32_SVD.Bit := 16#0#; -- FIFO error interrupt enable FEIE : S7FCR_FEIE_Field := 16#0#; -- unspecified Reserved_8_31 : STM32_SVD.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S7FCR_Register use record FTH at 0 range 0 .. 1; DMDIS at 0 range 2 .. 2; FS at 0 range 3 .. 5; Reserved_6_6 at 0 range 6 .. 6; FEIE at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- DMA controller type DMA_Peripheral is record -- low interrupt status register LISR : aliased LISR_Register; -- high interrupt status register HISR : aliased HISR_Register; -- low interrupt flag clear register LIFCR : aliased LIFCR_Register; -- high interrupt flag clear register HIFCR : aliased HIFCR_Register; -- stream x configuration register S0CR : aliased S0CR_Register; -- stream x number of data register S0NDTR : aliased S0NDTR_Register; -- stream x peripheral address register S0PAR : aliased STM32_SVD.UInt32; -- stream x memory 0 address register S0M0AR : aliased STM32_SVD.UInt32; -- stream x memory 1 address register S0M1AR : aliased STM32_SVD.UInt32; -- stream x FIFO control register S0FCR : aliased S0FCR_Register; -- stream x configuration register S1CR : aliased S1CR_Register; -- stream x number of data register S1NDTR : aliased S1NDTR_Register; -- stream x peripheral address register S1PAR : aliased STM32_SVD.UInt32; -- stream x memory 0 address register S1M0AR : aliased STM32_SVD.UInt32; -- stream x memory 1 address register S1M1AR : aliased STM32_SVD.UInt32; -- stream x FIFO control register S1FCR : aliased S1FCR_Register; -- stream x configuration register S2CR : aliased S2CR_Register; -- stream x number of data register S2NDTR : aliased S2NDTR_Register; -- stream x peripheral address register S2PAR : aliased STM32_SVD.UInt32; -- stream x memory 0 address register S2M0AR : aliased STM32_SVD.UInt32; -- stream x memory 1 address register S2M1AR : aliased STM32_SVD.UInt32; -- stream x FIFO control register S2FCR : aliased S2FCR_Register; -- stream x configuration register S3CR : aliased S3CR_Register; -- stream x number of data register S3NDTR : aliased S3NDTR_Register; -- stream x peripheral address register S3PAR : aliased STM32_SVD.UInt32; -- stream x memory 0 address register S3M0AR : aliased STM32_SVD.UInt32; -- stream x memory 1 address register S3M1AR : aliased STM32_SVD.UInt32; -- stream x FIFO control register S3FCR : aliased S3FCR_Register; -- stream x configuration register S4CR : aliased S4CR_Register; -- stream x number of data register S4NDTR : aliased S4NDTR_Register; -- stream x peripheral address register S4PAR : aliased STM32_SVD.UInt32; -- stream x memory 0 address register S4M0AR : aliased STM32_SVD.UInt32; -- stream x memory 1 address register S4M1AR : aliased STM32_SVD.UInt32; -- stream x FIFO control register S4FCR : aliased S4FCR_Register; -- stream x configuration register S5CR : aliased S5CR_Register; -- stream x number of data register S5NDTR : aliased S5NDTR_Register; -- stream x peripheral address register S5PAR : aliased STM32_SVD.UInt32; -- stream x memory 0 address register S5M0AR : aliased STM32_SVD.UInt32; -- stream x memory 1 address register S5M1AR : aliased STM32_SVD.UInt32; -- stream x FIFO control register S5FCR : aliased S5FCR_Register; -- stream x configuration register S6CR : aliased S6CR_Register; -- stream x number of data register S6NDTR : aliased S6NDTR_Register; -- stream x peripheral address register S6PAR : aliased STM32_SVD.UInt32; -- stream x memory 0 address register S6M0AR : aliased STM32_SVD.UInt32; -- stream x memory 1 address register S6M1AR : aliased STM32_SVD.UInt32; -- stream x FIFO control register S6FCR : aliased S6FCR_Register; -- stream x configuration register S7CR : aliased S7CR_Register; -- stream x number of data register S7NDTR : aliased S7NDTR_Register; -- stream x peripheral address register S7PAR : aliased STM32_SVD.UInt32; -- stream x memory 0 address register S7M0AR : aliased STM32_SVD.UInt32; -- stream x memory 1 address register S7M1AR : aliased STM32_SVD.UInt32; -- stream x FIFO control register S7FCR : aliased S7FCR_Register; end record with Volatile; for DMA_Peripheral use record LISR at 16#0# range 0 .. 31; HISR at 16#4# range 0 .. 31; LIFCR at 16#8# range 0 .. 31; HIFCR at 16#C# range 0 .. 31; S0CR at 16#10# range 0 .. 31; S0NDTR at 16#14# range 0 .. 31; S0PAR at 16#18# range 0 .. 31; S0M0AR at 16#1C# range 0 .. 31; S0M1AR at 16#20# range 0 .. 31; S0FCR at 16#24# range 0 .. 31; S1CR at 16#28# range 0 .. 31; S1NDTR at 16#2C# range 0 .. 31; S1PAR at 16#30# range 0 .. 31; S1M0AR at 16#34# range 0 .. 31; S1M1AR at 16#38# range 0 .. 31; S1FCR at 16#3C# range 0 .. 31; S2CR at 16#40# range 0 .. 31; S2NDTR at 16#44# range 0 .. 31; S2PAR at 16#48# range 0 .. 31; S2M0AR at 16#4C# range 0 .. 31; S2M1AR at 16#50# range 0 .. 31; S2FCR at 16#54# range 0 .. 31; S3CR at 16#58# range 0 .. 31; S3NDTR at 16#5C# range 0 .. 31; S3PAR at 16#60# range 0 .. 31; S3M0AR at 16#64# range 0 .. 31; S3M1AR at 16#68# range 0 .. 31; S3FCR at 16#6C# range 0 .. 31; S4CR at 16#70# range 0 .. 31; S4NDTR at 16#74# range 0 .. 31; S4PAR at 16#78# range 0 .. 31; S4M0AR at 16#7C# range 0 .. 31; S4M1AR at 16#80# range 0 .. 31; S4FCR at 16#84# range 0 .. 31; S5CR at 16#88# range 0 .. 31; S5NDTR at 16#8C# range 0 .. 31; S5PAR at 16#90# range 0 .. 31; S5M0AR at 16#94# range 0 .. 31; S5M1AR at 16#98# range 0 .. 31; S5FCR at 16#9C# range 0 .. 31; S6CR at 16#A0# range 0 .. 31; S6NDTR at 16#A4# range 0 .. 31; S6PAR at 16#A8# range 0 .. 31; S6M0AR at 16#AC# range 0 .. 31; S6M1AR at 16#B0# range 0 .. 31; S6FCR at 16#B4# range 0 .. 31; S7CR at 16#B8# range 0 .. 31; S7NDTR at 16#BC# range 0 .. 31; S7PAR at 16#C0# range 0 .. 31; S7M0AR at 16#C4# range 0 .. 31; S7M1AR at 16#C8# range 0 .. 31; S7FCR at 16#CC# range 0 .. 31; end record; -- DMA controller DMA1_Periph : aliased DMA_Peripheral with Import, Address => System'To_Address (16#40026000#); -- DMA controller DMA2_Periph : aliased DMA_Peripheral with Import, Address => System'To_Address (16#40026400#); end STM32_SVD.DMA;
TraSH/Shell.g4
vi-v/TraSH
2
240
/* MIT License - Copyright (c) <NAME> * This file is subject to the terms and conditions defined in * LICENSE, which is part of this source code package */ grammar Shell; shellCommand : pipeList | pipeList redirectionList ; redirectionList : redirection | redirectionList redirection ; redirection : GREAT arg | LESS arg ; pipeList : simpleCommand | pipeList PIPE simpleCommand ; simpleCommand : cmd | cmd args ; cmd : arg ; args : arg | args arg ; arg : WORD | STRING ; LESS : '<' ; LESSLESS : '<<' ; GREAT : '>' ; GREATGREAT : '>>' ; PIPE : '|' ; STRING : ('"' .*? '"' | '\'' .*? '\'') ; WORD : ID+ ; fragment ID : ~(' '|'\t') ; WHITESPACE : (' '|'\t')+ -> skip ; NEWLINE : ('\r'?'\n')+ -> skip ;
alloy4fun_models/trashltl/models/16/HfDiHwqbDvtMw6vHZ.als
Kaixi26/org.alloytools.alloy
0
2489
<filename>alloy4fun_models/trashltl/models/16/HfDiHwqbDvtMw6vHZ.als open main pred idHfDiHwqbDvtMw6vHZ_prop17 { all f: File | always (File' = File - f since f in Trash) } pred __repair { idHfDiHwqbDvtMw6vHZ_prop17 } check __repair { idHfDiHwqbDvtMw6vHZ_prop17 <=> prop17o }
test/asset/agda-stdlib-1.0/Data/List/Relation/Binary/Equality/Setoid.agda
omega12345/agda-mode
0
15730
<reponame>omega12345/agda-mode ------------------------------------------------------------------------ -- The Agda standard library -- -- Equality over lists parameterised by some setoid ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary using (Setoid) module Data.List.Relation.Binary.Equality.Setoid {a ℓ} (S : Setoid a ℓ) where open import Data.List.Base using (List) open import Level open import Relation.Binary renaming (Rel to Rel₂) open import Relation.Binary.PropositionalEquality as P using (_≡_) open import Data.List.Relation.Binary.Pointwise as PW using (Pointwise) open Setoid S renaming (Carrier to A) ------------------------------------------------------------------------ -- Definition of equality infix 4 _≋_ _≋_ : Rel₂ (List A) (a ⊔ ℓ) _≋_ = Pointwise _≈_ open Pointwise public using ([]; _∷_) ------------------------------------------------------------------------ -- Relational properties ≋-refl : Reflexive _≋_ ≋-refl = PW.refl refl ≋-reflexive : _≡_ ⇒ _≋_ ≋-reflexive P.refl = ≋-refl ≋-sym : Symmetric _≋_ ≋-sym = PW.symmetric sym ≋-trans : Transitive _≋_ ≋-trans = PW.transitive trans ≋-isEquivalence : IsEquivalence _≋_ ≋-isEquivalence = PW.isEquivalence isEquivalence ≋-setoid : Setoid _ _ ≋-setoid = PW.setoid S ------------------------------------------------------------------------ -- Operations open PW public using ( tabulate⁺ ; tabulate⁻ ; ++⁺ ; concat⁺ )
libsrc/strings/strnicmp_callee.asm
dex4er/deb-z88dk
1
245748
; int __CALLEE__ strnicmp_callee(char *s1, char *s2, uint n) ; caseless compare ; 12.2006 aralbrec XLIB strnicmp_callee XDEF ASMDISP_STRNICMP_CALLEE .strnicmp_callee pop hl pop bc pop de ex (sp),hl ; enter : bc = uint n ; de = char *s2 ; hl = char *s1 ; exit : if s1==s2 : hl = 0, Z flag set ; if s1<<s2 : hl < 0, NC+NZ flag set ; if s1>>s2 : hl > 0, C+NZ flag set ; uses : af, bc, de, hl .asmentry .strnicmp1 ld a,b or c jr z, equal push bc ld a,(hl) inc hl cp 'A' jr c, ASMPC+8 cp 'Z'+1 jr nc, ASMPC+4 or $20 ld c,a ld a,(de) inc de cp 'A' jr c, ASMPC+8 cp 'Z'+1 jr nc, ASMPC+4 or $20 cp c pop bc jr nz, different dec bc or a jp nz, strnicmp1 .equal ld hl,0 ret .different ; effectively performed *s2 - *s1 ld h,$80 ret nc dec h ret DEFC ASMDISP_STRNICMP_CALLEE = asmentry - strnicmp_callee
org.alloytools.alloy.diff/misc/inheritance/sub2v2.als
jringert/alloy-diff
1
1053
sig A { a : some A } sig B in A { b : some A, c : some A } sig D in A { d : some B } run {}
ffmpeg-2.3.6/ffmpeg-2.3.6/libavcodec/x86/bswapdsp.asm
d2262272d/ffmpeg
16
167351
<filename>ffmpeg-2.3.6/ffmpeg-2.3.6/libavcodec/x86/bswapdsp.asm ;****************************************************************************** ;* optimized bswap buffer functions ;* Copyright (c) 2008 <NAME> ;* Copyright (c) 2003-2013 <NAME> ;* Copyright (c) 2013 <NAME> ;* ;* 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 "libavutil/x86/x86util.asm" SECTION_RODATA pb_bswap32: db 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 cextern pb_80 SECTION_TEXT ; %1 = aligned/unaligned %macro BSWAP_LOOPS 1 mov r3, r2 sar r2, 3 jz .left4_%1 .loop8_%1: mov%1 m0, [r1 + 0] mov%1 m1, [r1 + 16] %if cpuflag(ssse3) pshufb m0, m2 pshufb m1, m2 mov%1 [r0 + 0], m0 mov%1 [r0 + 16], m1 %else pshuflw m0, m0, 10110001b pshuflw m1, m1, 10110001b pshufhw m0, m0, 10110001b pshufhw m1, m1, 10110001b mova m2, m0 mova m3, m1 psllw m0, 8 psllw m1, 8 psrlw m2, 8 psrlw m3, 8 por m2, m0 por m3, m1 mov%1 [r0 + 0], m2 mov%1 [r0 + 16], m3 %endif add r0, 32 add r1, 32 dec r2 jnz .loop8_%1 .left4_%1: mov r2, r3 and r3, 4 jz .left mov%1 m0, [r1] %if cpuflag(ssse3) pshufb m0, m2 mov%1 [r0], m0 %else pshuflw m0, m0, 10110001b pshufhw m0, m0, 10110001b mova m2, m0 psllw m0, 8 psrlw m2, 8 por m2, m0 mov%1 [r0], m2 %endif add r1, 16 add r0, 16 %endmacro ; void ff_bswap_buf(uint32_t *dst, const uint32_t *src, int w); %macro BSWAP32_BUF 0 %if cpuflag(ssse3) cglobal bswap32_buf, 3,4,3 mov r3, r1 mova m2, [pb_bswap32] %else cglobal bswap32_buf, 3,4,5 mov r3, r1 %endif or r3, r0 and r3, 15 jz .start_align BSWAP_LOOPS u jmp .left .start_align: BSWAP_LOOPS a .left: %if cpuflag(ssse3) mov r3, r2 and r2, 2 jz .left1 movq m0, [r1] pshufb m0, m2 movq [r0], m0 add r1, 8 add r0, 8 .left1: and r3, 1 jz .end mov r2d, [r1] bswap r2d mov [r0], r2d %else and r2, 3 jz .end .loop2: mov r3d, [r1] bswap r3d mov [r0], r3d add r1, 4 add r0, 4 dec r2 jnz .loop2 %endif .end: RET %endmacro INIT_XMM sse2 BSWAP32_BUF INIT_XMM ssse3 BSWAP32_BUF
Transynther/x86/_processed/US/_zr_/i3-7100_9_0x84_notsx.log_67_734.asm
ljhsiun2/medusa
9
9539
<filename>Transynther/x86/_processed/US/_zr_/i3-7100_9_0x84_notsx.log_67_734.asm .global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r15 push %r9 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x1215, %rcx nop nop nop sub $12786, %r11 movb $0x61, (%rcx) nop nop nop nop nop sub $61167, %r13 lea addresses_WT_ht+0x13095, %rbx nop nop nop nop nop add $1690, %r15 mov $0x6162636465666768, %rcx movq %rcx, (%rbx) nop add %rax, %rax lea addresses_WT_ht+0x18c35, %r11 nop nop xor %r9, %r9 mov $0x6162636465666768, %rcx movq %rcx, %xmm3 movups %xmm3, (%r11) nop sub $48753, %r15 lea addresses_UC_ht+0x1c495, %r15 cmp %r13, %r13 mov (%r15), %r9 cmp %rbx, %rbx lea addresses_UC_ht+0x14911, %r9 nop nop nop sub $43619, %r15 movb $0x61, (%r9) nop nop nop nop nop xor $31884, %rcx lea addresses_D_ht+0x123d5, %rax nop nop nop nop dec %r13 and $0xffffffffffffffc0, %rax vmovntdqa (%rax), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $1, %xmm5, %rbx nop nop sub $33697, %r11 lea addresses_WC_ht+0xf695, %r9 nop nop nop nop and $7530, %r13 mov (%r9), %cx nop nop nop inc %rbx lea addresses_WC_ht+0xae95, %r15 nop nop nop nop nop add $11605, %rbx movups (%r15), %xmm7 vpextrq $1, %xmm7, %r13 cmp $64078, %rcx lea addresses_UC_ht+0xa05d, %rsi lea addresses_WT_ht+0x1e345, %rdi nop cmp %rax, %rax mov $90, %rcx rep movsl nop nop nop nop cmp %r13, %r13 lea addresses_D_ht+0xbb15, %r15 nop nop nop nop nop xor %r9, %r9 movl $0x61626364, (%r15) xor $32626, %r9 lea addresses_D_ht+0x2695, %r15 nop nop nop and %rcx, %rcx movb $0x61, (%r15) nop nop sub $6551, %r11 pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r9 pop %r15 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r14 push %rcx push %rdx push %rsi // Faulty Load lea addresses_US+0x19e95, %r14 nop and $2369, %rdx movb (%r14), %cl lea oracles, %r12 and $0xff, %rcx shlq $12, %rcx mov (%r12,%rcx,1), %rcx pop %rsi pop %rdx pop %rcx pop %r14 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_US', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'type': 'addresses_US', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 1, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 8, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_UC_ht', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 32, 'congruent': 3, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 2, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 16, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 4, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_D_ht', 'same': True, 'size': 1, 'congruent': 9, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'00': 67} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c9/c91006a.ada
best08618/asylo
7
26566
-- C91006A.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- CHECK THAT IN A TASK SPECIFICATION ENTRY DECLARATIONS ARE ELABORATED -- WHEN THE SPECIFICATION IS ELABORATED, AND IN TEXTUAL ORDER. -- WEI 3/04/82 -- BHS 7/13/84 -- TBN 12/17/85 RENAMED FROM C910AHA-B.ADA; -- ADDED DECLARATIONS OF FIRST AND LAST. -- PWB 5/15/86 MOVED DECLARATIONS OF FIRST, TASK T1, AND LAST -- INTO A DECLARE/BEGIN/END BLOCK. WITH REPORT; USE REPORT; PROCEDURE C91006A IS SUBTYPE ARG IS NATURAL RANGE 0..9; INDEX : INTEGER RANGE 0..5 := 0; SPYNUMB : STRING(1..5) := (1..5 => ' '); FUNCTION FINIT_POS (DIGT: IN ARG) RETURN NATURAL IS TEMP : STRING(1..2); BEGIN TEMP := ARG'IMAGE(DIGT); INDEX := INDEX + 1; SPYNUMB(INDEX) := TEMP(2); RETURN DIGT; END FINIT_POS; BEGIN TEST ("C91006A", "CHECK THAT IN A TASK SPEC, ELABORATION IS IN " & "TEXTUAL ORDER"); DECLARE FIRST : INTEGER := FINIT_POS (1); TASK T1 IS ENTRY E2 (NATURAL RANGE 1 .. FINIT_POS (2)); ENTRY E3 (NATURAL RANGE 1 .. FINIT_POS (3)); ENTRY E4 (NATURAL RANGE 1 .. FINIT_POS (4)); END T1; LAST : INTEGER := FINIT_POS (5); TASK BODY T1 IS BEGIN NULL; END T1; BEGIN NULL; END; IF SPYNUMB /= "12345" THEN FAILED ("TASK SPEC T1 NOT ELABORATED IN TEXTUAL ORDER"); COMMENT ("ACTUAL ORDER WAS: " & SPYNUMB); END IF; RESULT; END C91006A;
Definition/Typed/Consequences/Substitution.agda
Vtec234/logrel-mltt
0
13169
{-# OPTIONS --without-K --safe #-} module Definition.Typed.Consequences.Substitution where open import Definition.Untyped open import Definition.Untyped.Properties open import Definition.Typed open import Definition.Typed.Properties open import Definition.Typed.EqRelInstance open import Definition.Typed.Weakening open import Definition.Typed.Consequences.Syntactic open import Definition.LogicalRelation open import Definition.LogicalRelation.Properties open import Definition.LogicalRelation.Substitution open import Definition.LogicalRelation.Substitution.Irrelevance open import Definition.LogicalRelation.Fundamental open import Tools.Product import Tools.PropositionalEquality as PE -- Well-formed substitution of types. substitution : ∀ {A Γ Δ σ} → Γ ⊢ A → Δ ⊢ˢ σ ∷ Γ → ⊢ Δ → Δ ⊢ subst σ A substitution A σ ⊢Δ with fundamental A | fundamentalSubst (wf A) ⊢Δ σ substitution A σ ⊢Δ | [Γ] , [A] | [Γ]′ , [σ] = escape (proj₁ ([A] ⊢Δ (irrelevanceSubst [Γ]′ [Γ] ⊢Δ ⊢Δ [σ]))) -- Well-formed substitution of type equality. substitutionEq : ∀ {A B Γ Δ σ σ′} → Γ ⊢ A ≡ B → Δ ⊢ˢ σ ≡ σ′ ∷ Γ → ⊢ Δ → Δ ⊢ subst σ A ≡ subst σ′ B substitutionEq A≡B σ ⊢Δ with fundamentalEq A≡B | fundamentalSubstEq (wfEq A≡B) ⊢Δ σ substitutionEq A≡B σ ⊢Δ | [Γ] , [A] , [B] , [A≡B] | [Γ]′ , [σ] , [σ′] , [σ≡σ′] = let [σ]′ = irrelevanceSubst [Γ]′ [Γ] ⊢Δ ⊢Δ [σ] [σ′]′ = irrelevanceSubst [Γ]′ [Γ] ⊢Δ ⊢Δ [σ′] [σ≡σ′]′ = irrelevanceSubstEq [Γ]′ [Γ] ⊢Δ ⊢Δ [σ] [σ]′ [σ≡σ′] in escapeEq (proj₁ ([A] ⊢Δ [σ]′)) (transEq (proj₁ ([A] ⊢Δ [σ]′)) (proj₁ ([B] ⊢Δ [σ]′)) (proj₁ ([B] ⊢Δ [σ′]′)) ([A≡B] ⊢Δ [σ]′) (proj₂ ([B] ⊢Δ [σ]′) [σ′]′ [σ≡σ′]′)) -- Well-formed substitution of terms. substitutionTerm : ∀ {t A Γ Δ σ} → Γ ⊢ t ∷ A → Δ ⊢ˢ σ ∷ Γ → ⊢ Δ → Δ ⊢ subst σ t ∷ subst σ A substitutionTerm t σ ⊢Δ with fundamentalTerm t | fundamentalSubst (wfTerm t) ⊢Δ σ substitutionTerm t σ ⊢Δ | [Γ] , [A] , [t] | [Γ]′ , [σ] = let [σ]′ = irrelevanceSubst [Γ]′ [Γ] ⊢Δ ⊢Δ [σ] in escapeTerm (proj₁ ([A] ⊢Δ [σ]′)) (proj₁ ([t] ⊢Δ [σ]′)) -- Well-formed substitution of term equality. substitutionEqTerm : ∀ {t u A Γ Δ σ σ′} → Γ ⊢ t ≡ u ∷ A → Δ ⊢ˢ σ ≡ σ′ ∷ Γ → ⊢ Δ → Δ ⊢ subst σ t ≡ subst σ′ u ∷ subst σ A substitutionEqTerm t≡u σ≡σ′ ⊢Δ with fundamentalTermEq t≡u | fundamentalSubstEq (wfEqTerm t≡u) ⊢Δ σ≡σ′ ... | [Γ] , modelsTermEq [A] [t] [u] [t≡u] | [Γ]′ , [σ] , [σ′] , [σ≡σ′] = let [σ]′ = irrelevanceSubst [Γ]′ [Γ] ⊢Δ ⊢Δ [σ] [σ′]′ = irrelevanceSubst [Γ]′ [Γ] ⊢Δ ⊢Δ [σ′] [σ≡σ′]′ = irrelevanceSubstEq [Γ]′ [Γ] ⊢Δ ⊢Δ [σ] [σ]′ [σ≡σ′] in escapeTermEq (proj₁ ([A] ⊢Δ [σ]′)) (transEqTerm (proj₁ ([A] ⊢Δ [σ]′)) ([t≡u] ⊢Δ [σ]′) (proj₂ ([u] ⊢Δ [σ]′) [σ′]′ [σ≡σ′]′)) -- Reflexivity of well-formed substitution. substRefl : ∀ {σ Γ Δ} → Δ ⊢ˢ σ ∷ Γ → Δ ⊢ˢ σ ≡ σ ∷ Γ substRefl id = id substRefl (σ , x) = substRefl σ , refl x -- Weakening of well-formed substitution. wkSubst′ : ∀ {ρ σ Γ Δ Δ′} (⊢Γ : ⊢ Γ) (⊢Δ : ⊢ Δ) (⊢Δ′ : ⊢ Δ′) ([ρ] : ρ ∷ Δ′ ⊆ Δ) ([σ] : Δ ⊢ˢ σ ∷ Γ) → Δ′ ⊢ˢ ρ •ₛ σ ∷ Γ wkSubst′ ε ⊢Δ ⊢Δ′ ρ id = id wkSubst′ (_∙_ {Γ} {A} ⊢Γ ⊢A) ⊢Δ ⊢Δ′ ρ (tailσ , headσ) = wkSubst′ ⊢Γ ⊢Δ ⊢Δ′ ρ tailσ , PE.subst (λ x → _ ⊢ _ ∷ x) (wk-subst A) (wkTerm ρ ⊢Δ′ headσ) -- Weakening of well-formed substitution by one. wk1Subst′ : ∀ {F σ Γ Δ} (⊢Γ : ⊢ Γ) (⊢Δ : ⊢ Δ) (⊢F : Δ ⊢ F) ([σ] : Δ ⊢ˢ σ ∷ Γ) → (Δ ∙ F) ⊢ˢ wk1Subst σ ∷ Γ wk1Subst′ {F} {σ} {Γ} {Δ} ⊢Γ ⊢Δ ⊢F [σ] = wkSubst′ ⊢Γ ⊢Δ (⊢Δ ∙ ⊢F) (step id) [σ] -- Lifting of well-formed substitution. liftSubst′ : ∀ {F σ Γ Δ} (⊢Γ : ⊢ Γ) (⊢Δ : ⊢ Δ) (⊢F : Γ ⊢ F) ([σ] : Δ ⊢ˢ σ ∷ Γ) → (Δ ∙ subst σ F) ⊢ˢ liftSubst σ ∷ Γ ∙ F liftSubst′ {F} {σ} {Γ} {Δ} ⊢Γ ⊢Δ ⊢F [σ] = let ⊢Δ∙F = ⊢Δ ∙ substitution ⊢F [σ] ⊢Δ in wkSubst′ ⊢Γ ⊢Δ ⊢Δ∙F (step id) [σ] , var ⊢Δ∙F (PE.subst (λ x → 0 ∷ x ∈ (Δ ∙ subst σ F)) (wk-subst F) here) -- Well-formed identity substitution. idSubst′ : ∀ {Γ} (⊢Γ : ⊢ Γ) → Γ ⊢ˢ idSubst ∷ Γ idSubst′ ε = id idSubst′ (_∙_ {Γ} {A} ⊢Γ ⊢A) = wk1Subst′ ⊢Γ ⊢Γ ⊢A (idSubst′ ⊢Γ) , PE.subst (λ x → Γ ∙ A ⊢ _ ∷ x) (wk1-tailId A) (var (⊢Γ ∙ ⊢A) here) -- Well-formed substitution composition. substComp′ : ∀ {σ σ′ Γ Δ Δ′} (⊢Γ : ⊢ Γ) (⊢Δ : ⊢ Δ) (⊢Δ′ : ⊢ Δ′) ([σ] : Δ′ ⊢ˢ σ ∷ Δ) ([σ′] : Δ ⊢ˢ σ′ ∷ Γ) → Δ′ ⊢ˢ σ ₛ•ₛ σ′ ∷ Γ substComp′ ε ⊢Δ ⊢Δ′ [σ] id = id substComp′ (_∙_ {Γ} {A} ⊢Γ ⊢A) ⊢Δ ⊢Δ′ [σ] ([tailσ′] , [headσ′]) = substComp′ ⊢Γ ⊢Δ ⊢Δ′ [σ] [tailσ′] , PE.subst (λ x → _ ⊢ _ ∷ x) (substCompEq A) (substitutionTerm [headσ′] [σ] ⊢Δ′) -- Well-formed singleton substitution of terms. singleSubst : ∀ {A t Γ} → Γ ⊢ t ∷ A → Γ ⊢ˢ sgSubst t ∷ Γ ∙ A singleSubst {A} t = let ⊢Γ = wfTerm t in idSubst′ ⊢Γ , PE.subst (λ x → _ ⊢ _ ∷ x) (PE.sym (subst-id A)) t -- Well-formed singleton substitution of term equality. singleSubstEq : ∀ {A t u Γ} → Γ ⊢ t ≡ u ∷ A → Γ ⊢ˢ sgSubst t ≡ sgSubst u ∷ Γ ∙ A singleSubstEq {A} t = let ⊢Γ = wfEqTerm t in substRefl (idSubst′ ⊢Γ) , PE.subst (λ x → _ ⊢ _ ≡ _ ∷ x) (PE.sym (subst-id A)) t -- Well-formed singleton substitution of terms with lifting. singleSubst↑ : ∀ {A t Γ} → Γ ∙ A ⊢ t ∷ wk1 A → Γ ∙ A ⊢ˢ consSubst (wk1Subst idSubst) t ∷ Γ ∙ A singleSubst↑ {A} t with wfTerm t ... | ⊢Γ ∙ ⊢A = wk1Subst′ ⊢Γ ⊢Γ ⊢A (idSubst′ ⊢Γ) , PE.subst (λ x → _ ∙ A ⊢ _ ∷ x) (wk1-tailId A) t -- Well-formed singleton substitution of term equality with lifting. singleSubst↑Eq : ∀ {A t u Γ} → Γ ∙ A ⊢ t ≡ u ∷ wk1 A → Γ ∙ A ⊢ˢ consSubst (wk1Subst idSubst) t ≡ consSubst (wk1Subst idSubst) u ∷ Γ ∙ A singleSubst↑Eq {A} t with wfEqTerm t ... | ⊢Γ ∙ ⊢A = substRefl (wk1Subst′ ⊢Γ ⊢Γ ⊢A (idSubst′ ⊢Γ)) , PE.subst (λ x → _ ∙ A ⊢ _ ≡ _ ∷ x) (wk1-tailId A) t -- Helper lemmas for single substitution substType : ∀ {t F G Γ} → Γ ∙ F ⊢ G → Γ ⊢ t ∷ F → Γ ⊢ G [ t ] substType {t} {F} {G} ⊢G ⊢t = let ⊢Γ = wfTerm ⊢t in substitution ⊢G (singleSubst ⊢t) ⊢Γ substTypeEq : ∀ {t u F G E Γ} → Γ ∙ F ⊢ G ≡ E → Γ ⊢ t ≡ u ∷ F → Γ ⊢ G [ t ] ≡ E [ u ] substTypeEq {F = F} ⊢G ⊢t = let ⊢Γ = wfEqTerm ⊢t in substitutionEq ⊢G (singleSubstEq ⊢t) ⊢Γ substTerm : ∀ {F G t f Γ} → Γ ∙ F ⊢ f ∷ G → Γ ⊢ t ∷ F → Γ ⊢ f [ t ] ∷ G [ t ] substTerm {F} {G} {t} {f} ⊢f ⊢t = let ⊢Γ = wfTerm ⊢t in substitutionTerm ⊢f (singleSubst ⊢t) ⊢Γ substTypeΠ : ∀ {t F G Γ} → Γ ⊢ Π F ▹ G → Γ ⊢ t ∷ F → Γ ⊢ G [ t ] substTypeΠ ΠFG t with syntacticΠ ΠFG substTypeΠ ΠFG t | F , G = substType G t subst↑Type : ∀ {t F G Γ} → Γ ∙ F ⊢ G → Γ ∙ F ⊢ t ∷ wk1 F → Γ ∙ F ⊢ G [ t ]↑ subst↑Type ⊢G ⊢t = substitution ⊢G (singleSubst↑ ⊢t) (wfTerm ⊢t) subst↑TypeEq : ∀ {t u F G E Γ} → Γ ∙ F ⊢ G ≡ E → Γ ∙ F ⊢ t ≡ u ∷ wk1 F → Γ ∙ F ⊢ G [ t ]↑ ≡ E [ u ]↑ subst↑TypeEq ⊢G ⊢t = substitutionEq ⊢G (singleSubst↑Eq ⊢t) (wfEqTerm ⊢t)
sprite.asm
bsutherland/c64lib
1
7033
#importonce #import "zeropage.asm" .const SPRITE_POINTER_BASE = $07f8 .const SPRITE_COORD_X_BASE = $d000 .const SPRITE_COORD_Y_BASE = $d001 .const SPRITE_COORD_X_BIT8 = $d010 .const SPRITE_ENABLE = $d015 .const SPRITE_CONTROL_2 = $d016 .const SPRITE_DOUBLE_HEIGHT = $d017 .const SPRITE_DOUBLE_WIDTH = $d01d .const SPRITE_MODE_MULTICOLOR = $d01c .const SPRITE_INTER_COLLISION = $d01e .const SPRITE_BACKGROUND_COLLISION = $d01f .const SPRITE_COLOR_SHARED_1 = $d025 .const SPRITE_COLOR_SHARED_2 = $d026 .const SPRITE_COLORS_BASE = $d027 .const SPRITE_MASK_0 = $1 .const SPRITE_MASK_1 = $2 .const SPRITE_MASK_2 = $4 .const SPRITE_MASK_3 = $8 .const SPRITE_SIZE_BYTES = 64 .const SPRITE_WIDTH = 24 .const SPRITE_HEIGHT = 21 .const SPRITE_CANVAS_WIDTH = 512 .const SPRITE_CANVAS_HEIGHT = 256 .macro sprite_enable(i) { lda #(1 << i) ora SPRITE_ENABLE sta SPRITE_ENABLE } .macro sprite_multicolor_enable(i) { lda #(1 << i) ora SPRITE_MODE_MULTICOLOR sta SPRITE_MODE_MULTICOLOR } .macro sprite_multicolor_shared_1(color) { lda #color sta SPRITE_COLOR_SHARED_1 } .macro sprite_multicolor_shared_2(color) { lda #color sta SPRITE_COLOR_SHARED_2 } .macro sprite_color_foreground(i, color) { lda #color sta SPRITE_COLORS_BASE + i } .macro sprite_addr(i, addr) { sprite_addr_div64(i, addr/64) } .macro sprite_addr_div64(i, idx) { lda #idx sta SPRITE_POINTER_BASE + i } .macro sprite_x_const(i, x) { lda #<x sta SPRITE_COORD_X_BASE + 2*i lda SPRITE_COORD_X_BIT8 ora #(>x << i) sta SPRITE_COORD_X_BIT8 } .macro sprite_x(i, x) { lda x sta SPRITE_COORD_X_BASE + 2*i lda x+1 beq msb_zero lda #(1 << i) ora SPRITE_COORD_X_BIT8 jmp return msb_zero: lda #~(1 << i) and SPRITE_COORD_X_BIT8 // fall-through return: sta SPRITE_COORD_X_BIT8 } .macro sprite_y_const(i, y) { lda #y sta SPRITE_COORD_Y_BASE + 2*i } .macro sprite_y(i, y) { lda y sta SPRITE_COORD_Y_BASE + 2*i } .macro sprite_position(i, x, y) { sprite_x(i, x) sprite_y(i, y) }
programs/oeis/060/A060470.asm
karttu/loda
0
95280
<reponame>karttu/loda ; A060470: Smallest positive a(n) such that number of solutions to a(n)=a(j)+a(k) j<k<n is two or less. ; 1,2,3,4,5,6,8,10,12,15,17,19,24,26,28,33,35,37,42,44,46,51,53,55,60,62,64,69,71,73,78,80,82,87,89,91,96,98,100,105,107,109,114,116,118,123,125,127,132,134,136,141,143,145,150,152,154,159,161,163,168,170,172,177,179,181,186,188,190,195,197,199,204,206,208,213,215,217,222,224,226,231,233,235,240,242,244,249,251,253,258,260,262,267,269,271,276,278,280,285,287,289,294,296,298,303,305,307,312,314,316,321,323,325,330,332,334,339,341,343,348,350,352,357,359,361,366,368,370,375,377,379,384,386,388,393,395,397,402,404,406,411,413,415,420,422,424,429,431,433,438,440,442,447,449,451,456,458,460,465,467,469,474,476,478,483,485,487,492,494,496,501,503,505,510,512,514,519,521,523,528,530,532,537,539,541,546,548,550,555,557,559,564,566,568,573,575,577,582,584,586,591,593,595,600,602,604,609,611,613,618,620,622,627,629,631,636,638,640,645,647,649,654,656,658,663,665,667,672,674,676,681,683,685,690,692,694,699,701,703,708,710,712,717,719,721,726,728,730,735 mov $4,$0 trn $0,5 mov $1,$0 mov $3,5 lpb $0,1 trn $0,3 add $1,3 add $2,1 sub $3,1 lpe trn $1,1 sub $3,$2 add $3,1 trn $3,2 add $1,$3 lpb $4,1 add $1,1 sub $4,1 lpe sub $1,3
examples/hash_password/demo_ada.adb
jrmarino/libsodium-ada
10
30138
with Sodium.Functions; use Sodium.Functions; with Ada.Text_IO; use Ada.Text_IO; procedure Demo_Ada is password : constant String := "<PASSWORD>"; salt : constant String := "<PASSWORD>"; begin if not initialize_sodium_library then Put_Line ("Initialization failed"); return; end if; Put_Line ("password: " & password); declare passkey : constant String := Derive_Password_Key (password => password, salt => salt); hash : constant Any_Hash := Generate_Password_Hash (criticality => highly_sensitive, password => password); begin Put_Line ("pass key: " & As_Hexidecimal (passkey)); Put_Line ("hash: " & hash); if Password_Hash_Matches (hash => hash, password => password) then Put_Line ("Hash verification passed"); else Put_Line ("Hash verification failed"); end if; end; end Demo_Ada;
projects/Links_Awakening_gb.windfish/disassembly/bank_1B.asm
jverkoey/awaken
68
88231
<filename>projects/Links_Awakening_gb.windfish/disassembly/bank_1B.asm<gh_stars>10-100 SECTION "ROM Bank 1B", ROMX[$4000], BANK[$1B] db $C3, $09, $40, $C3, $9E, $4D toc_1B_4006: jp toc_1B_401E db $21, $00, $D3, $36, $00, $2C, $20, $FB db $3E, $80, $E0, $26, $3E, $77, $E0, $24 db $3E, $FF, $E0, $25, $C9 toc_1B_401E: ld hl, $D368 ldi a, [hl] and a jr nz, toc_1B_4031 call toc_1B_4037 .toc_1B_4028: call toc_1B_4481 ret toc_1B_402C: clear [$D3CE] ret toc_1B_4031: ld [hl], a call toc_1B_411B jr toc_1B_401E.toc_1B_4028 toc_1B_4037: ld de, $D393 ld hl, wActiveNoiseSfx ldi a, [hl] cp 1 jr z, .else_1B_4048 ld a, [hl] cp $01 jr z, .else_1B_4053 ret .else_1B_4048: assign [$D379], $01 ld hl, $4060 jp toc_1B_406A .else_1B_4053: ld a, [de] dec a ld [de], a ret nz clear [$D379] ld hl, $4065 jr toc_1B_406A db $3B, $80, $07, $C0, $02, $00, $42, $02 db $C0, $04 toc_1B_406A: ld b, $04 ld c, $20 .loop_1B_406E: ldi a, [hl] ld [$ff00+c], a inc c dec b jr nz, .loop_1B_406E ld a, [hl] ld [de], a ret db $34, $50, $E2, $51, $93, $52, $2C, $53 db $05, $54, $58, $57, $F0, $59, $8D, $5A db $7D, $5B, $71, $5C, $09, $5D, $B8, $5D db $08, $5E, $27, $5E, $A7, $5E, $A8, $4A db $0A, $5F, $C1, $5F, $17, $60, $96, $60 db $5F, $61, $41, $62, $1E, $4D, $00, $50 db $15, $63, $3E, $64, $DF, $64, $EC, $4B db $13, $65, $9C, $6B, $EA, $6B, $01, $4B toc_1B_40B7: inc e dec a sla a ld c, a ld b, $00 add hl, bc ld c, [hl] inc hl ld b, [hl] ld l, c ld h, b ld a, h ret toc_1B_40C6: push bc ld c, $30 .loop_1B_40C9: ldi a, [hl] ld [$ff00+c], a inc c ld a, c cp $40 jr nz, .loop_1B_40C9 pop bc ret toc_1B_40D3: clear [$D379] ld [$D34F], a ld [$D398], a ld [$D393], a ld [$D3C9], a ld [$D3A3], a assign [gbAUD4ENV], $08 assign [gbAUD4CONSEC], $80 ret toc_1B_40EF: ld a, [$D379] cp $0C jp z, toc_1B_4DBC cp $05 jp z, toc_1B_4DBC cp $1A jp z, toc_1B_4DBC cp $24 jp z, toc_1B_4DBC cp $2A jp z, toc_1B_4DBC cp $2E jp z, toc_1B_4DBC cp $3F jp z, toc_1B_4DBC call toc_1B_40D3 jp toc_1B_4DBC toc_1B_411B: cp $FF jr z, toc_1B_40EF copyFromTo [$D3CA], [$D3CB] ld a, [hl] ld [$D3CA], a cp $11 jr nc, .else_1B_412F jr .toc_1B_4144 .else_1B_412F: cp $21 jr nc, .else_1B_4136 jp toc_1B_402C .else_1B_4136: cp $31 jr nc, .else_1B_413D jp toc_1B_402C .else_1B_413D: cp $41 jp nc, toc_1B_402C add a, $E0 .toc_1B_4144: dec hl ldi [hl], a ld b, a assign [$D3CE], $01 ld a, b ld [hl], a ld b, a ld hl, $4077 and %01111111 call toc_1B_40B7 call toc_1B_42AE jp toc_1B_4247 db $01, $00, $FF, $FF, $00, $00, $01, $00 db $FF, $FF, $00, $00, $01, $00, $FF, $FF db $00, $00, $01, $00, $FF, $FF, $00, $00 db $01, $00, $FF, $FF, $00, $00, $01, $00 db $FF, $FF, $00, $00, $01, $00, $FF, $FF db $00, $00, $01, $00, $FF, $FF, $00, $00 db $01, $00, $FF, $FF, $00, $00, $01, $00 db $FF, $FF, $00, $00, $01, $00, $FF, $FF db $00, $00, $01, $00, $FF, $FF, $00, $00 db $01, $00, $FF, $FF, $00, $00, $01, $00 db $FF, $FF, $00, $00, $01, $00, $FF, $FF db $00, $00, $01, $00, $FF, $FF, $00, $00 db $01, $00, $FF, $FF, $00, $00, $01, $00 db $FF, $FF, $00, $00, $01, $00, $FF, $FF db $00, $00, $01, $00, $FF, $FF, $00, $00 db $01, $00, $FF, $FF, $00, $00, $01, $00 db $FF, $FF, $00, $00, $01, $00, $FF, $FF db $00, $00, $01, $00, $FF, $FF, $00, $00 db $01, $00, $FF, $FF, $00, $00, $01, $00 db $FF, $FF, $00, $00, $01, $00, $FF, $FF db $00, $00, $01, $00, $FF, $FF, $00, $00 db $01, $00, $FF, $FF, $00, $00, $01, $00 db $FF, $FF, $00, $00, $01, $00, $FF, $FF db $00, $00, $01, $00, $FF, $FF, $00, $00 toc_1B_421D: _ifNotZero [$D3E7], toc_1B_4481.toc_1B_463D clear [gbAUD3ENA] ld [$D3E7], a push hl ld a, [$D336] ld l, a ld a, [$D337] ld h, a push bc ld c, $30 .loop_1B_4236: ldi a, [hl] ld [$ff00+c], a inc c ld a, c cp $40 jr nz, .loop_1B_4236 assign [gbAUD3ENA], $80 pop bc pop hl jp toc_1B_4481.toc_1B_463D toc_1B_4247: ld a, [$D369] ld hl, $415D .toc_1B_424D: dec a jr z, .else_1B_4258 inc hl inc hl inc hl inc hl inc hl inc hl jr .toc_1B_424D .else_1B_4258: ld bc, $D355 ldi a, [hl] ld [bc], a inc c xor a ld [bc], a inc c ldi a, [hl] ld [bc], a inc c xor a ld [bc], a inc c ldi a, [hl] ld [bc], a ld [gbAUDTERM], a inc c ldi a, [hl] ld [bc], a inc c ldi a, [hl] ld [bc], a inc c ldi a, [hl] ld [bc], a ret toc_1B_4275: ld hl, $D355 ldi a, [hl] cp $01 ret z inc [hl] ldi a, [hl] cp [hl] ret nz dec l ld [hl], $00 inc l inc l inc [hl] ldi a, [hl] and %00000011 ld c, l ld b, h and a jr z, .else_1B_4299 inc c cp $01 jr z, .else_1B_4299 inc c cp $02 jr z, .else_1B_4299 inc c .else_1B_4299: ld a, [bc] ld [gbAUDTERM], a ret toc_1B_429D: ldi a, [hl] ld c, a ld a, [hl] ld b, a ld a, [bc] ld [de], a inc e inc bc ld a, [bc] ld [de], a ret toc_1B_42A8: ldi a, [hl] ld [de], a inc e ldi a, [hl] ld [de], a ret toc_1B_42AE: ifNe [$D379], $05, .else_1B_42D0 cp $0C jr z, .else_1B_42D0 cp $1A jr z, .else_1B_42D0 cp $24 jr z, .else_1B_42D0 cp $2A jr z, .else_1B_42D0 cp $2E jr z, .else_1B_42D0 cp $3F jr z, .else_1B_42D0 call toc_1B_40D3 .else_1B_42D0: call toc_1B_4DBC.toc_1B_4DC9 ld de, $D300 ld b, $00 ldi a, [hl] ld [de], a inc e call toc_1B_42A8 ld de, $D310 call toc_1B_42A8 ld de, $D320 call toc_1B_42A8 ld de, $D330 call toc_1B_42A8 ld de, $D340 call toc_1B_42A8 ld hl, $D310 ld de, $D314 call toc_1B_429D ld hl, $D320 ld de, $D324 call toc_1B_429D ld hl, $D330 ld de, $D334 call toc_1B_429D ld hl, $D340 ld de, $D344 call toc_1B_429D ld bc, $0410 ld hl, $D312 .loop_1B_4320: ld [hl], $01 ld a, c add a, l ld l, a dec b jr nz, .loop_1B_4320 clear [$D31E] ld [$D32E], a ld [$D33E], a ret toc_1B_4333: push hl ld a, e ld [$D336], a ld a, d ld [$D337], a _ifZero [$D371], .else_1B_434A clear [gbAUD3ENA] ld l, e ld h, d call toc_1B_40C6 .else_1B_434A: pop hl jr toc_1B_434D.toc_1B_4377 toc_1B_434D: call toc_1B_437D call toc_1B_4392 ld e, a call toc_1B_437D call toc_1B_4392 ld d, a call toc_1B_437D call toc_1B_4392 ld c, a inc l inc l ld [hl], e inc l ld [hl], d inc l ld [hl], c dec l dec l dec l dec l push hl ld hl, $D350 ld a, [hl] pop hl cp $03 jr z, toc_1B_4333 .toc_1B_4377: call toc_1B_437D jp toc_1B_4481.toc_1B_44A3 toc_1B_437D: push de ldi a, [hl] ld e, a ldd a, [hl] ld d, a inc de .toc_1B_4383: ld a, e ldi [hl], a ld a, d ldd [hl], a pop de ret toc_1B_4389: push de ldi a, [hl] ld e, a ldd a, [hl] ld d, a inc de inc de jr toc_1B_437D.toc_1B_4383 toc_1B_4392: ldi a, [hl] ld c, a ldd a, [hl] ld b, a ld a, [bc] ld b, a ret toc_1B_4399: pop hl jr toc_1B_439C.toc_1B_43CD toc_1B_439C: ifEq [$D350], $03, .else_1B_43B3 ld a, [$D338] bit 7, a jr z, .else_1B_43B3 ld a, [hl] cp $06 jr nz, .else_1B_43B3 assign [gbAUD3LEVEL], $40 .else_1B_43B3: push hl ld a, l add a, $09 ld l, a ld a, [hl] and a jr nz, toc_1B_4399 ld a, l add a, $04 ld l, a bit 7, [hl] jr nz, toc_1B_4399 pop hl call toc_1B_4670 push hl call toc_1B_46F9 pop hl .toc_1B_43CD: dec l dec l jp toc_1B_4481.toc_1B_4650 toc_1B_43D2: dec l dec l dec l dec l call toc_1B_4389 .toc_1B_43D9: ld a, l add a, $04 ld e, a ld d, h call toc_1B_429D cp $00 jr z, .else_1B_4404 cp $FF jr z, .else_1B_43ED inc l jp toc_1B_4481.toc_1B_44A1 .else_1B_43ED: dec l push hl call toc_1B_4389 call toc_1B_4392 ld e, a call toc_1B_437D call toc_1B_4392 ld d, a pop hl ld a, e ldi [hl], a ld a, d ldd [hl], a jr .toc_1B_43D9 .else_1B_4404: ld a, [$D3CA] cp $0F jp z, toc_1B_4757 cp $10 jp z, toc_1B_4757 cp $25 jp z, toc_1B_4757 ld hl, $D369 ld [hl], $00 call toc_1B_40EF ret toc_1B_441F: call toc_1B_437D call toc_1B_4392 ld [$D301], a call toc_1B_437D call toc_1B_4392 ld [$D302], a jr toc_1B_4433.toc_1B_443C toc_1B_4433: call toc_1B_437D call toc_1B_4392 ld [$D300], a .toc_1B_443C: call toc_1B_437D jr toc_1B_4481.toc_1B_44A3 toc_1B_4441: call toc_1B_437D call toc_1B_4392 push hl ld a, l add a, $0B ld l, a ld c, [hl] ld a, b or c ld [hl], a ld b, h ld c, l dec c dec c pop hl ldi a, [hl] ld e, a ldd a, [hl] ld d, a inc de ld a, e ldi [hl], a ld a, d ldd [hl], a ld a, d ld [bc], a dec c ld a, e ld [bc], a jr toc_1B_4481.toc_1B_44A3 toc_1B_4465: push hl ld a, l add a, $0B ld l, a ld a, [hl] dec [hl] ld a, [hl] and %01111111 jr z, .else_1B_447E ld b, h ld c, l dec c dec c dec c pop hl ld a, [bc] ldi [hl], a inc c ld a, [bc] ldd [hl], a jr toc_1B_4481.toc_1B_44A3 .else_1B_447E: pop hl jr toc_1B_4433.toc_1B_443C toc_1B_4481: ld hl, $D369 ld a, [hl] and a ret z ld a, [$D3CE] and a ret z call toc_1B_4275 assign [$D350], $01 ld hl, $D310 .toc_1B_4497: inc l ldi a, [hl] and a jp z, toc_1B_439C.toc_1B_43CD dec [hl] jp nz, toc_1B_439C .toc_1B_44A1: inc l inc l .toc_1B_44A3: call toc_1B_4392 cp $00 jp z, toc_1B_43D2 cp $9D jp z, toc_1B_434D cp $9E jp z, toc_1B_441F cp $9F jp z, toc_1B_4433 cp $9B jp z, toc_1B_4441 cp $9C jp z, toc_1B_4465 cp $99 jp z, toc_1B_4771 cp $9A jp z, toc_1B_477C cp $94 jp z, toc_1B_48FF cp $97 jp z, toc_1B_47B8 cp $98 jp z, toc_1B_47C7 cp $96 jp z, toc_1B_4763 cp $95 jp z, toc_1B_476E and %11110000 cp $A0 jr nz, .else_1B_453A ld a, b and %00001111 ld c, a ld b, $00 push hl ld de, $D301 ld a, [de] ld l, a inc e ld a, [de] ld h, a add hl, bc ld a, [hl] pop hl push hl ld d, a inc l inc l inc l ld a, [hl] and %11110000 jr nz, .else_1B_450C ld a, d jr .toc_1B_4531 .else_1B_450C: ld e, a ld a, d push af srl a sla e jr c, .else_1B_451D ld d, a srl a sla e jr c, .else_1B_451D add a, d .else_1B_451D: ld c, a and a jr nz, .else_1B_4523 ld c, $02 .else_1B_4523: ld de, $D350 ld a, [de] dec a ld e, a ld d, $00 ld hl, $D307 add hl, de ld [hl], c pop af .toc_1B_4531: pop hl dec l ldi [hl], a call toc_1B_437D call toc_1B_4392 .else_1B_453A: ifNe [$D350], $04, .else_1B_4579 push de ld de, $D3B0 call toc_1B_4807 xor a ld [de], a inc e ld [de], a ld de, $D3B6 call toc_1B_4807 inc e xor a ld [de], a ifEq [$D350], $03, .else_1B_4578 ld de, $D39E ld a, [de] and a jr z, .else_1B_456A ld a, $01 ld [de], a clear [$D39F] .else_1B_456A: ld de, $D3D9 ld a, [de] and a jr z, .else_1B_4578 ld a, $01 ld [de], a clear [$D3DA] .else_1B_4578: pop de .else_1B_4579: ld c, b ld b, $00 call toc_1B_437D ld a, [$D350] cp $04 jp z, .else_1B_45BB push hl ld a, l add a, $05 ld l, a ld e, l ld d, h inc l inc l ld a, c cp $01 jr z, .else_1B_45B6 ld [hl], $00 ifNotZero [$D300], .else_1B_45A9 ld l, a ld h, $00 bit 7, l jr z, .else_1B_45A6 ld h, $FF .else_1B_45A6: add hl, bc ld b, h ld c, l .else_1B_45A9: ld hl, $4934 add hl, bc ldi a, [hl] ld [de], a inc e ld a, [hl] ld [de], a pop hl jp .toc_1B_45EC .else_1B_45B6: ld [hl], $01 pop hl jr .toc_1B_45EC .else_1B_45BB: push hl ld a, c cp $FF jr z, .else_1B_45D9 ld de, $D346 ld hl, $49C6 add hl, bc .loop_1B_45C8: ldi a, [hl] ld [de], a inc e ld a, e cp $4B jr nz, .loop_1B_45C8 ld c, $20 ld hl, $D344 ld b, $00 jr .toc_1B_461A .else_1B_45D9: ld a, [$D34F] bit 7, a jp nz, .else_1B_464B assign [wActiveNoiseSfx], 1 call toc_1B_4037 jp .else_1B_464B .toc_1B_45EC: push hl ld b, $00 ifNe [$D350], $01, .else_1B_4617 cp $02 jr z, .else_1B_4613 ld c, $1A ld a, [$D33F] bit 7, a jr nz, .else_1B_4608 xor a ld [$ff00+c], a ld a, $80 ld [$ff00+c], a .else_1B_4608: inc c inc l inc l inc l inc l ldi a, [hl] ld e, a ld d, $00 jr .toc_1B_4621 .else_1B_4613: ld c, $16 jr .toc_1B_461A .else_1B_4617: ld c, $10 inc c .toc_1B_461A: inc l inc l ldi a, [hl] ld e, a inc l ldi a, [hl] ld d, a .toc_1B_4621: push hl inc l inc l ldi a, [hl] and a jr z, .else_1B_462A ld e, $08 .else_1B_462A: inc l inc l ld [hl], $00 inc l ld a, [hl] pop hl bit 7, a jr nz, .else_1B_464B ld a, [$D350] cp $03 jp z, toc_1B_421D .toc_1B_463D: ld a, d or b ld [$ff00+c], a inc c ld a, e ld [$ff00+c], a inc c ldi a, [hl] ld [$ff00+c], a inc c ld a, [hl] or %10000000 ld [$ff00+c], a .else_1B_464B: pop hl dec l ldd a, [hl] ldd [hl], a dec l .toc_1B_4650: ld de, $D350 ld a, [de] cp $04 jr z, .else_1B_4661 inc a ld [de], a ld a, $10 add a, l ld l, a jp .toc_1B_4497 .else_1B_4661: incAddr $D31E incAddr $D32E incAddr $D33E ret toc_1B_466E: pop hl ret toc_1B_4670: push hl ld a, l add a, $06 ld l, a ld a, [hl] and %00001111 jr z, .else_1B_4692 ld [$D351], a ld a, [$D350] ld c, $13 cp $01 jr z, .else_1B_46D4 ld c, $18 cp $02 jr z, .else_1B_46D4 ld c, $1D cp $03 jr z, .else_1B_46D4 .else_1B_4692: ld a, [$D350] cp $04 jp z, toc_1B_466E ld de, $D3B6 call toc_1B_4807 ld a, [de] and a jp z, .else_1B_46BB ld a, [$D350] ld c, $13 cp $01 jp z, toc_1B_47D0 ld c, $18 cp $02 jp z, toc_1B_47D0 ld c, $1D jp toc_1B_47D0 .else_1B_46BB: ld a, [$D350] cp $03 jp nz, toc_1B_466E ifZero [$D39E], toc_1B_4782 ifZero [$D3D9], toc_1B_490A jp toc_1B_466E .else_1B_46D4: inc l ldi a, [hl] ld e, a ld a, [hl] and %00001111 ld d, a push de ld a, l add a, $04 ld l, a ld b, [hl] ld a, [$D351] cp $01 jp z, toc_1B_481D cp $05 jp z, toc_1B_488A ld hl, gbIE pop de add hl, de call toc_1B_47F6 jp .else_1B_4692 toc_1B_46F9: _ifZero [$D31B], .else_1B_4720 ifNotZero [$D317], .else_1B_4720 and %00001111 ld b, a ld hl, $D307 ld a, [$D31E] cp [hl] jr nz, .else_1B_4720 ld c, $12 ld de, $D31A ld a, [$D31F] bit 7, a jr nz, .else_1B_4720 call toc_1B_4744 .else_1B_4720: ld a, [$D32B] and a ret nz ld a, [$D327] and a ret z and %00001111 ld b, a ld hl, $D308 ld a, [$D32E] cp [hl] ret nz ld a, [$D32F] bit 7, a ret nz ld c, $17 ld de, $D32A call toc_1B_4744 ret toc_1B_4744: push bc dec b ld c, b ld b, $00 ld hl, $4A85 add hl, bc ld a, [hl] pop bc ld [$ff00+c], a inc c inc c ld a, [de] or %10000000 ld [$ff00+c], a ret toc_1B_4757: clear [$D3CE] copyFromTo [hNextDefaultMusicTrack], [$D368] jp toc_1B_401E toc_1B_4763: ld a, $01 .toc_1B_4765: ld [$D3CD], a call toc_1B_437D jp toc_1B_4481.toc_1B_44A3 toc_1B_476E: xor a jr toc_1B_4763.toc_1B_4765 toc_1B_4771: ld a, $01 .toc_1B_4773: ld [$D39E], a call toc_1B_437D jp toc_1B_4481.toc_1B_44A3 toc_1B_477C: clear [$D39E] jr toc_1B_4771.toc_1B_4773 toc_1B_4782: cp $02 jp z, toc_1B_466E ld bc, $D39F call toc_1B_47B4 ld c, $1C ld b, $40 cp $03 jr z, .else_1B_47AF ld b, $60 cp $05 jr z, .else_1B_47AF cp $0A jr z, .else_1B_47AF ld b, $00 cp $07 jr z, .else_1B_47AF cp $0D jp nz, toc_1B_466E assign [$D39E], $02 .else_1B_47AF: ld a, b ld [$ff00+c], a jp toc_1B_466E toc_1B_47B4: ld a, [bc] inc a ld [bc], a ret toc_1B_47B8: ld de, $D3B6 call toc_1B_4807 ld a, $01 .toc_1B_47C0: ld [de], a call toc_1B_437D jp toc_1B_4481.toc_1B_44A3 toc_1B_47C7: ld de, $D3B6 call toc_1B_4807 xor a jr toc_1B_47B8.toc_1B_47C0 toc_1B_47D0: inc e ld a, [de] and a jr nz, .else_1B_47E6 inc a ld [de], a pop hl push hl call toc_1B_47EB .toc_1B_47DC: ld hl, $FF9C add hl, de call toc_1B_47F6 jp toc_1B_466E .else_1B_47E6: call toc_1B_4810 jr .toc_1B_47DC toc_1B_47EB: ld a, $07 add a, l ld l, a ldi a, [hl] ld e, a ld a, [hl] and %00001111 ld d, a ret toc_1B_47F6: ld de, $D3A4 call toc_1B_4807 ld a, l ld [$ff00+c], a ld [de], a inc c inc e ld a, h and %00001111 ld [$ff00+c], a ld [de], a ret toc_1B_4807: ld a, [$D350] dec a sla a add a, e ld e, a ret toc_1B_4810: ld de, $D3A4 call toc_1B_4807 ld a, [de] ld l, a inc e ld a, [de] ld d, a ld e, l ret toc_1B_481D: pop de ld de, $D3B0 call toc_1B_4807 ld a, [de] inc a ld [de], a inc e cp $19 jr z, .else_1B_485D cp $2D jr z, .else_1B_4856 ld a, [de] and a jp z, toc_1B_4670.else_1B_4692 .toc_1B_4835: dec e ld a, [de] sub a, $19 sla a ld l, a ld h, $00 ld de, $4862 add hl, de ldi a, [hl] ld d, a ld a, [hl] ld e, a pop hl push hl push de call toc_1B_47EB ld h, d ld l, e pop de add hl, de call toc_1B_47F6 jp toc_1B_4670.else_1B_4692 .else_1B_4856: dec e ld a, $19 ld [de], a inc e jr .toc_1B_4835 .else_1B_485D: ld a, $01 ld [de], a jr .toc_1B_4835 db $00, $00, $00, $00, $00, $01, $00, $01 db $00, $02, $00, $02, $00, $00, $00, $00 db $FF, $FF, $FF, $FF, $FF, $FE, $FF, $FE db $00, $00, $00, $01, $00, $02, $00, $01 db $00, $00, $FF, $FF, $FF, $FE, $FF, $FF toc_1B_488A: pop de ld de, $D3D0 call toc_1B_4807 ld a, [de] inc a ld [de], a inc e cp $21 jr z, .else_1B_48B8 .toc_1B_4899: dec e ld a, [de] sla a ld l, a ld h, $00 ld de, $48BF add hl, de ldi a, [hl] ld d, a ld a, [hl] ld e, a pop hl push hl push de call toc_1B_47EB ld h, d ld l, e pop de add hl, de call toc_1B_47F6 jp toc_1B_4670.else_1B_4692 .else_1B_48B8: dec e ld a, $01 ld [de], a inc e jr .toc_1B_4899 db $00, $08, $00, $00, $FF, $F8, $00, $00 db $00, $0A, $00, $02, $FF, $FA, $00, $02 db $00, $0C, $00, $04, $FF, $FC, $00, $04 db $00, $0A, $00, $02, $FF, $FA, $00, $02 db $00, $08, $00, $00, $FF, $F8, $00, $00 db $00, $06, $FF, $FE, $FF, $F6, $FF, $FE db $00, $04, $FF, $FC, $FF, $F4, $FF, $FC db $00, $06, $FF, $FE, $FF, $F6, $FF, $FE toc_1B_48FF: assign [$D3D9], $01 call toc_1B_437D jp toc_1B_4481.toc_1B_44A3 toc_1B_490A: cp $02 jp z, toc_1B_466E ld bc, $D3DA call toc_1B_47B4 ld c, $1C ld b, $60 cp $03 jp z, toc_1B_4782.else_1B_47AF ld b, $40 cp $05 jp z, toc_1B_4782.else_1B_47AF ld b, $20 cp $06 jp nz, toc_1B_466E assign [$D3D9], $02 jp toc_1B_4782.else_1B_47AF db $00, $0F, $2C, $00, $9C, $00, $06, $01 db $6B, $01, $C9, $01, $23, $02, $77, $02 db $C6, $02, $12, $03, $56, $03, $9B, $03 db $DA, $03, $16, $04, $4E, $04, $83, $04 db $B5, $04, $E5, $04, $11, $05, $3B, $05 db $63, $05, $89, $05, $AC, $05, $CE, $05 db $ED, $05, $0A, $06, $27, $06, $42, $06 db $5B, $06, $72, $06, $89, $06, $9E, $06 db $B2, $06, $C4, $06, $D6, $06, $E7, $06 db $F7, $06, $06, $07, $14, $07, $21, $07 db $2D, $07, $39, $07, $44, $07, $4F, $07 db $59, $07, $62, $07, $6B, $07, $74, $07 db $7B, $07, $83, $07, $8A, $07, $90, $07 db $97, $07, $9D, $07, $A2, $07, $A7, $07 db $AC, $07, $B1, $07, $B6, $07, $BA, $07 db $BE, $07, $C1, $07, $C5, $07, $C8, $07 db $CB, $07, $CE, $07, $D1, $07, $D4, $07 db $D6, $07, $D9, $07, $DB, $07, $DD, $07 db $DF, $07, $00, $00, $00, $00, $00, $C0 db $09, $00, $38, $34, $C0, $19, $00, $38 db $33, $C0, $46, $00, $13, $10, $C0, $23 db $00, $20, $40, $80, $51, $00, $20, $07 db $80, $A1, $00, $00, $18, $80, $F2, $00 db $00, $18, $80, $81, $00, $3A, $10, $C0 db $80, $00, $00, $10, $C0, $57, $00, $00 db $60, $80, $01, $02, $04, $08, $10, $20 db $06, $0C, $18, $01, $01, $01, $01, $01 db $30, $01, $03, $06, $0C, $18, $30, $09 db $12, $24, $02, $04, $08, $01, $01, $48 db $02, $04, $08, $10, $20, $40, $0C, $18 db $30, $02, $05, $03, $01, $01, $60, $03 db $05, $0A, $14, $28, $50, $0F, $1E, $3C db $02, $08, $10, $02, $01, $78, $03, $06 db $0C, $18, $30, $60, $12, $24, $48, $03 db $08, $10, $02, $04, $90, $03, $07, $0E db $1C, $38, $70, $15, $2A, $54, $04, $09 db $12, $02, $01, $A8, $04, $08, $10, $20 db $40, $80, $18, $30, $60, $04, $02, $01 db $01, $00, $C0, $04, $09, $12, $24, $48 db $90, $1B, $36, $6C, $05, $0C, $18, $18 db $06, $D8, $05, $0A, $14, $28, $50, $A0 db $1E, $3C, $78, $05, $01, $01, $01, $01 db $F0, $10, $32, $22, $47, $81, $20, $00 db $92, $4A, $FF, $FF, $8C, $4A, $9B, $20 db $AE, $01, $9C, $00, $00, $22, $44, $55 db $66, $66, $88, $88, $AA, $AA, $CC, $CC db $04, $84, $04, $84, $00, $2B, $4A, $B3 db $4A, $B7, $4A, $BB, $4A, $BF, $4A, $C3 db $4A, $00, $00, $D3, $4A, $00, $00, $E1 db $4A, $00, $00, $F3, $4A, $00, $00, $9D db $60, $21, $00, $96, $A2, $5C, $5E, $AA db $60, $62, $64, $AE, $66, $95, $00, $9D db $80, $21, $41, $A2, $4A, $4C, $AA, $4E db $50, $52, $AE, $54, $00, $9D, $42, $6E db $20, $99, $A2, $3C, $3E, $AA, $40, $42 db $44, $9A, $A5, $46, $A4, $01, $00, $A3 db $01, $AA, $15, $1A, $1A, $9B, $1E, $A0 db $15, $9C, $A7, $01, $00, $04, $67, $4A db $0C, $4B, $24, $4B, $2C, $4B, $00, $00 db $42, $4B, $7C, $4B, $7C, $4B, $7C, $4B db $7C, $4B, $7C, $4B, $7C, $4B, $7C, $4B db $7C, $4B, $E6, $4B, $FF, $FF, $0C, $4B db $47, $4B, $B1, $4B, $FF, $FF, $24, $4B db $77, $4B, $77, $4B, $77, $4B, $77, $4B db $77, $4B, $77, $4B, $77, $4B, $77, $4B db $E6, $4B, $FF, $FF, $2C, $4B, $9D, $31 db $00, $40, $00, $9D, $30, $81, $80, $9B db $08, $A3, $01, $A2, $44, $46, $A3, $4A db $A2, $54, $5C, $A7, $5C, $A1, $58, $56 db $A4, $58, $A2, $01, $58, $5C, $5E, $A3 db $5C, $58, $A5, $4A, $A4, $7A, $A7, $6C db $A1, $6A, $6C, $A4, $70, $62, $66, $AE db $74, $9C, $00, $9D, $52, $6E, $40, $99 db $9B, $02, $A2, $24, $2C, $32, $2C, $9C db $9B, $02, $24, $30, $36, $30, $9C, $24 db $2E, $36, $2E, $22, $2E, $34, $2E, $2C db $32, $40, $3A, $3C, $36, $32, $2C, $9B db $02, $28, $2E, $36, $2E, $9C, $9B, $02 db $28, $2E, $34, $2E, $9C, $9B, $04, $24 db $2C, $32, $2C, $9C, $00, $9D, $61, $00 db $80, $A4, $01, $97, $AC, $01, $AD, $2C db $2C, $AC, $2C, $AA, $2C, $98, $AC, $32 db $AD, $32, $36, $AC, $3A, $AA, $36, $A3 db $32, $40, $3A, $4A, $A4, $40, $AC, $40 db $AD, $40, $42, $AC, $40, $AA, $3E, $A4 db $38, $A3, $36, $A7, $40, $A4, $40, $A7 db $01, $00, $9B, $0B, $A4, $01, $9C, $00 db $00, $58, $4A, $F7, $4B, $FF, $4B, $07 db $4C, $0F, $4C, $17, $4C, $50, $4C, $FF db $FF, $F9, $4B, $24, $4C, $61, $4C, $FF db $FF, $01, $4C, $31, $4C, $B1, $4C, $FF db $FF, $09, $4C, $3E, $4C, $FA, $4C, $FF db $FF, $11, $4C, $9D, $60, $00, $41, $A7 db $01, $A1, $4E, $AA, $01, $AE, $50, $00 db $9D, $40, $00, $01, $A7, $01, $A1, $64 db $AA, $01, $AE, $66, $00, $9D, $A1, $4C db $20, $A7, $01, $A1, $5A, $AA, $01, $AE db $5C, $00, $A7, $01, $A1, $01, $AA, $01 db $A5, $01, $A1, $FF, $A2, $FF, $FF, $A1 db $FF, $A2, $FF, $00, $9D, $22, $00, $80 db $97, $9B, $20, $A1, $54, $6A, $62, $5C db $78, $70, $6A, $9C, $00, $9D, $81, $00 db $40, $A6, $46, $A0, $46, $4A, $A6, $4E db $A1, $4A, $A3, $46, $54, $4E, $5E, $A4 db $54, $A6, $54, $A0, $54, $56, $A6, $54 db $A1, $52, $A4, $4C, $A3, $4A, $54, $A4 db $46, $A5, $01, $01, $01, $9D, $61, $00 db $80, $97, $A1, $36, $A6, $36, $A1, $36 db $A6, $36, $A1, $36, $A2, $36, $36, $A1 db $36, $A2, $36, $98, $00, $8A, $DF, $DA db $86, $31, $01, $36, $86, $8A, $DF, $DA db $86, $31, $01, $36, $86, $9D, $A1, $4C db $20, $97, $9B, $02, $AA, $30, $01, $A0 db $01, $A1, $01, $9C, $A6, $01, $AA, $30 db $01, $A0, $01, $A1, $01, $9B, $02, $AA db $30, $01, $A0, $01, $9C, $A1, $01, $A3 db $01, $9B, $02, $AA, $30, $01, $A0, $01 db $A1, $01, $9C, $A6, $01, $AA, $30, $01 db $A0, $01, $A1, $01, $9B, $02, $AA, $30 db $01, $A0, $01, $9C, $A1, $01, $A6, $01 db $AA, $30, $01, $A0, $01, $00, $9B, $07 db $A1, $15, $15, $15, $15, $FF, $15, $15 db $15, $15, $15, $15, $15, $FF, $15, $15 db $1A, $9C, $9B, $02, $FF, $FF, $15, $15 db $9C, $FF, $FF, $15, $FF, $15, $FF, $FF db $15, $00, $00, $2B, $4A, $29, $4D, $2F db $4D, $35, $4D, $00, $00, $3B, $4D, $FF db $FF, $29, $4D, $51, $4D, $FF, $FF, $2F db $4D, $87, $4D, $FF, $FF, $35, $4D, $9D db $43, $00, $80, $A7, $4C, $4C, $4C, $4C db $4A, $4A, $4A, $4A, $46, $46, $46, $46 db $42, $46, $4A, $50, $00, $9D, $40, $21 db $80, $A8, $5A, $A3, $01, $A2, $58, $A3 db $5E, $A8, $50, $A2, $01, $A3, $5A, $A2 db $42, $A3, $46, $A2, $4A, $A3, $4C, $A2 db $4A, $A3, $4C, $A7, $40, $54, $AE, $50 db $A2, $01, $00, $44, $44, $44, $42, $00 db $00, $00, $00, $44, $44, $44, $42, $00 db $00, $00, $00, $9D, $77, $4D, $20, $99 db $A7, $4A, $4A, $46, $46, $46, $46, $42 db $42, $42, $42, $40, $40, $3E, $3E, $44 db $4A, $00, $AF, $EA, $79, $D3, $EA, $4F db $D3, $EA, $98, $D3, $EA, $93, $D3, $EA db $C9, $D3, $EA, $A3, $D3, $EA, $E5, $D3 db $3E, $08, $E0, $21, $3E, $80, $E0, $23 toc_1B_4DBC: assign [gbAUDTERM], %11111111 assign [$D355], $03 clear [$D369] .toc_1B_4DC9: clear [$D361] ld [$D371], a ld [$D31F], a ld [$D32F], a ld [$D33F], a ld [$D39E], a ld [$D39F], a ld [$D3D9], a ld [$D3DA], a ld [$D3B6], a ld [$D3B7], a ld [$D3B8], a ld [$D3B9], a ld [$D3BA], a ld [$D3BB], a ld [$D394], a ld [$D395], a ld [$D396], a ld [$D390], a ld [$D391], a ld [$D392], a ld [$D3C6], a ld [$D3C7], a ld [$D3C8], a ld [$D3A0], a ld [$D3A1], a ld [$D3A2], a ld [$D3CD], a ld [$D3D6], a ld [$D3D7], a ld [$D3D8], a ld [$D3DC], a ld [$D3E7], a ld [$D3E2], a ld [$D3E3], a ld [$D3E4], a assign [gbAUD1ENV], $08 ld [gbAUD2ENV], a assign [gbAUD1HIGH], $80 ld [gbAUD2HIGH], a clear [gbAUD1SWEEP] ld [gbAUD3ENA], a ret db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $00, $58, $4A, $8C, $4A, $8C, $4A, $0B db $50, $00, $00, $0F, $50, $00, $00, $9D db $82, $6E, $01, $94, $A3, $4A, $A2, $4E db $A3, $52, $A2, $4E, $A7, $4A, $58, $52 db $62, $A8, $58, $A3, $58, $A2, $5A, $A3 db $58, $A2, $56, $A8, $50, $A7, $4E, $58 db $A8, $4A, $9A, $00, $00, $3A, $4A, $3F db $50, $47, $50, $4F, $50, $00, $00, $EC db $6F, $5B, $50, $FF, $FF, $41, $50, $AB db $50, $D9, $50, $FF, $FF, $49, $50, $E1 db $6E, $3C, $51, $C2, $6E, $7E, $51, $FF db $FF, $53, $50, $9D, $66, $81, $80, $A5 db $01, $A2, $01, $5E, $A1, $5E, $62, $66 db $68, $A3, $6C, $01, $01, $A1, $64, $6E db $72, $76, $A3, $7C, $01, $A7, $01, $A1 db $64, $68, $A2, $6C, $64, $A3, $5A, $A7 db $01, $9B, $02, $A1, $68, $6C, $A2, $6E db $9C, $01, $A7, $01, $9B, $02, $A1, $64 db $68, $A2, $6C, $9C, $01, $A7, $01, $A1 db $62, $66, $A2, $6A, $A1, $6A, $6C, $70 db $74, $76, $7A, $A2, $74, $01, $A8, $01 db $A5, $01, $00, $9D, $A0, $84, $80, $A4 db $46, $A2, $01, $46, $46, $A1, $46, $46 db $9B, $02, $A6, $46, $A1, $42, $A3, $46 db $A2, $01, $46, $46, $A1, $46, $46, $9C db $A2, $46, $A1, $3C, $3C, $9B, $02, $A2 db $3C, $A1, $3C, $3C, $9C, $A2, $3C, $3C db $00, $9D, $80, $21, $40, $A2, $46, $01 db $A7, $3C, $A1, $01, $46, $46, $4A, $4E db $50, $A4, $54, $A2, $01, $54, $54, $A1 db $56, $5A, $A4, $5E, $A2, $01, $5E, $5E db $A1, $5A, $56, $A6, $5A, $A1, $56, $A4 db $54, $A3, $54, $A6, $50, $A1, $54, $A4 db $56, $A2, $54, $50, $A6, $4C, $A1, $50 db $A4, $54, $A2, $50, $4C, $A6, $4A, $A1 db $4E, $A4, $52, $A3, $58, $9D, $60, $81 db $80, $A2, $54, $A1, $46, $46, $A2, $46 db $A1, $46, $46, $A3, $46, $01, $A2, $01 db $A1, $44, $44, $A2, $44, $A1, $44, $44 db $A3, $44, $01, $00, $99, $A3, $4E, $A2 db $01, $A1, $2E, $2E, $A2, $2E, $4E, $4E db $A1, $4E, $4E, $A6, $4A, $A1, $4A, $A2 db $4A, $A1, $2A, $2A, $A2, $2A, $4A, $4A db $A1, $4A, $4A, $A6, $4C, $A1, $4C, $A2 db $4C, $A1, $26, $26, $A2, $26, $4C, $4C db $A1, $4C, $4C, $A2, $4C, $A1, $44, $44 db $9B, $02, $A2, $44, $A1, $44, $44, $9C db $A2, $24, $A1, $28, $2C, $00, $99, $9B db $02, $A2, $2E, $A3, $46, $A2, $46, $9C db $9B, $02, $A2, $2A, $A3, $42, $A2, $42 db $9C, $9B, $02, $A2, $26, $A3, $3E, $A2 db $3E, $9C, $9B, $02, $A2, $34, $A3, $4C db $A2, $4C, $9C, $9B, $02, $A2, $30, $A3 db $48, $A2, $48, $9C, $9B, $02, $A2, $2E db $A3, $46, $A2, $46, $9C, $A2, $32, $A3 db $4A, $A2, $4A, $32, $4A, $5E, $32, $3C db $9B, $02, $A1, $50, $50, $A2, $50, $9C db $A1, $32, $32, $A2, $32, $A1, $32, $32 db $A2, $3C, $9B, $02, $A1, $50, $50, $A2 db $50, $9C, $A1, $24, $24, $24, $26, $28 db $2C, $00, $00, $1C, $4A, $ED, $51, $0D db $52, $21, $52, $00, $00, $FB, $6E, $A5 db $6F, $41, $52, $41, $52, $41, $52, $41 db $52, $41, $52, $41, $52, $00, $6F, $AB db $6F, $41, $52, $41, $52, $41, $52, $4B db $52, $FF, $FF, $ED, $51, $05, $6F, $A5 db $6F, $55, $52, $5D, $52, $0A, $6F, $AB db $6F, $5D, $52, $7A, $52, $FF, $FF, $0D db $52, $DC, $6E, $A5, $6F, $7D, $52, $7D db $52, $7D, $52, $7D, $52, $7D, $52, $7D db $52, $C2, $6E, $AB, $6F, $7D, $52, $7D db $52, $7D, $52, $88, $52, $FF, $FF, $21 db $52, $A7, $22, $A2, $22, $A3, $24, $22 db $1E, $18, $00, $A7, $22, $A2, $22, $A3 db $24, $22, $1E, $01, $00, $9B, $03, $A8 db $01, $9C, $A4, $01, $00, $9B, $02, $A1 db $01, $40, $42, $44, $A7, $46, $A2, $3A db $A4, $46, $A1, $01, $44, $46, $44, $A2 db $40, $3C, $A7, $40, $A2, $32, $A8, $40 db $9C, $00, $A3, $01, $00, $99, $A7, $32 db $A2, $32, $A3, $34, $32, $2E, $28, $00 db $99, $A7, $32, $A2, $32, $A3, $34, $32 db $2E, $01, $00, $00, $58, $4A, $9E, $52 db $A4, $52, $AC, $52, $00, $00, $EB, $52 db $FF, $FF, $9E, $52, $B6, $52, $BB, $52 db $FF, $FF, $A4, $52, $FB, $6F, $27, $53 db $BB, $52, $FF, $FF, $AE, $52, $9D, $57 db $00, $80, $00, $A2, $78, $7C, $A3, $7E db $01, $01, $A2, $78, $7C, $A3, $7E, $01 db $01, $A2, $7C, $78, $6E, $A7, $74, $A3 db $78, $01, $A8, $01, $A2, $78, $7C, $A3 db $7E, $01, $01, $A2, $78, $7E, $A3, $88 db $01, $01, $A2, $86, $82, $A4, $86, $01 db $A8, $01, $00, $9D, $37, $00, $80, $A7 db $01, $9B, $02, $A2, $40, $4E, $58, $5C db $A3, $60, $01, $9C, $A2, $48, $56, $5C db $6A, $A3, $6E, $01, $A2, $48, $56, $5C db $56, $44, $56, $5C, $56, $9B, $02, $A2 db $40, $4E, $58, $5C, $A3, $60, $01, $9C db $A2, $36, $44, $4C, $52, $56, $5C, $64 db $6A, $6E, $6A, $6E, $74, $8C, $00, $9D db $A2, $6E, $20, $00, $00, $67, $4A, $37 db $53, $3D, $53, $8C, $4A, $00, $00, $43 db $53, $FF, $FF, $37, $53, $A5, $53, $FF db $FF, $3D, $53, $9D, $52, $00, $80, $99 db $9B, $02, $A2, $40, $4E, $9C, $9B, $02 db $40, $52, $9C, $9B, $02, $40, $56, $9C db $9B, $02, $40, $52, $9C, $9B, $02, $40 db $4E, $9C, $9B, $02, $40, $50, $9C, $9B db $02, $44, $52, $9C, $4E, $36, $3A, $36 db $9B, $02, $32, $40, $9C, $9B, $02, $32 db $44, $9C, $9B, $02, $30, $44, $9C, $9B db $02, $3A, $48, $9C, $9B, $02, $2C, $3A db $9C, $2C, $38, $36, $32, $9D, $40, $00 db $80, $A4, $36, $32, $9E, $76, $4A, $A4 db $30, $A7, $2C, $9D, $52, $00, $80, $A2 db $36, $9E, $67, $4A, $00, $9D, $56, $00 db $80, $A3, $66, $58, $A7, $5C, $A1, $60 db $62, $A2, $66, $66, $58, $58, $A7, $5C db $A1, $60, $62, $A2, $60, $66, $A7, $74 db $A2, $70, $74, $70, $66, $A1, $62, $60 db $A3, $5C, $9D, $42, $00, $80, $56, $9D db $56, $00, $80, $A1, $01, $60, $62, $66 db $A3, $6A, $58, $A7, $56, $A1, $5C, $6A db $A2, $66, $66, $56, $56, $A7, $58, $A1 db $58, $56, $A2, $52, $58, $A7, $60, $A2 db $5C, $58, $50, $9B, $04, $4E, $66, $9C db $9E, $76, $4A, $9B, $04, $A2, $66, $7E db $9C, $9E, $67, $4A, $00, $00, $3A, $4A db $10, $54, $1E, $54, $2C, $54, $00, $00 db $46, $54, $71, $54, $BC, $54, $71, $54 db $E9, $54, $FF, $FF, $12, $54, $62, $55 db $8F, $55, $C4, $55, $8F, $55, $E8, $55 db $FF, $FF, $20, $54, $C2, $6E, $64, $56 db $C2, $6E, $8D, $56, $AF, $56, $8D, $56 db $DD, $56, $C7, $6E, $EA, $56, $C2, $6E db $F7, $56, $FF, $FF, $30, $54, $9D, $45 db $00, $80, $A3, $30, $AA, $30, $30, $30 db $A3, $2C, $AA, $2C, $30, $32, $A3, $38 db $AA, $38, $38, $38, $A3, $3C, $AA, $3C db $3C, $3C, $9D, $40, $21, $81, $A8, $40 db $AA, $3C, $3C, $3C, $A8, $40, $A3, $01 db $00, $9D, $45, $00, $80, $A3, $30, $AA db $32, $30, $2C, $A6, $30, $A1, $30, $30 db $32, $36, $3A, $A6, $3C, $A1, $40, $40 db $44, $48, $4A, $A3, $4E, $AA, $3C, $40 db $44, $A6, $46, $A1, $38, $38, $3C, $40 db $44, $AA, $46, $01, $46, $46, $44, $40 db $46, $01, $3C, $3C, $3C, $38, $3C, $01 db $3C, $3C, $38, $3C, $A2, $38, $A1, $38 db $36, $A2, $38, $A1, $38, $3C, $A3, $40 db $A2, $3C, $38, $00, $A2, $36, $A1, $36 db $32, $A2, $36, $A1, $36, $38, $A3, $3C db $A2, $38, $36, $A3, $34, $A2, $34, $A1 db $34, $36, $A2, $3A, $A1, $3A, $3C, $40 db $44, $46, $4A, $A3, $44, $9D, $40, $21 db $41, $AA, $32, $32, $32, $A3, $36, $01 db $00, $9D, $45, $00, $80, $AA, $36, $34 db $36, $3E, $40, $44, $46, $01, $46, $46 db $44, $40, $9D, $70, $21, $80, $A6, $4E db $46, $A2, $40, $A3, $3E, $AA, $3E, $3A db $3E, $AA, $40, $44, $46, $4A, $46, $44 db $A3, $46, $01, $9D, $50, $21, $81, $A3 db $46, $A7, $40, $A1, $01, $46, $46, $4A db $4E, $50, $AA, $4A, $01, $46, $A4, $44 db $A3, $3C, $AA, $40, $01, $36, $A3, $36 db $32, $3A, $A2, $40, $A1, $40, $3E, $40 db $44, $46, $4A, $A4, $4E, $AA, $4E, $01 db $4A, $A4, $46, $A3, $01, $AA, $4A, $01 db $50, $A4, $5A, $A3, $01, $01, $AA, $40 db $40, $40, $A3, $40, $01, $9D, $40, $21 db $40, $01, $AA, $4A, $4A, $4A, $A3, $4E db $01, $00, $9D, $55, $00, $80, $A3, $40 db $AA, $40, $36, $40, $A3, $3C, $AA, $3C db $40, $44, $A3, $46, $AA, $46, $40, $46 db $A3, $44, $AA, $44, $46, $4A, $9D, $50 db $21, $81, $A8, $4E, $AA, $4A, $4A, $4A db $A8, $4E, $AA, $4A, $48, $44, $00, $9D db $65, $00, $80, $A3, $40, $A7, $36, $A1 db $01, $40, $40, $44, $48, $4A, $A4, $4E db $AA, $01, $01, $4E, $4E, $50, $54, $A4 db $58, $AA, $01, $01, $58, $58, $54, $50 db $54, $01, $50, $A4, $4E, $AA, $4E, $50 db $4E, $A2, $4A, $A1, $4A, $4E, $A4, $50 db $A2, $4E, $4A, $00, $A2, $46, $A1, $46 db $4A, $A4, $4E, $A2, $4A, $46, $44, $A1 db $44, $48, $A4, $4C, $A3, $52, $A2, $4E db $9D, $60, $21, $01, $AD, $36, $36, $36 db $AA, $3A, $3A, $3A, $A3, $3E, $01, $00 db $9D, $45, $00, $80, $AA, $46, $44, $46 db $4A, $46, $4A, $4E, $01, $4E, $4E, $4A db $46, $9D, $40, $00, $81, $A4, $4E, $66 db $A8, $58, $9D, $70, $21, $41, $AA, $4E db $50, $54, $A3, $58, $A7, $4E, $A1, $01 db $58, $58, $5C, $5E, $62, $AA, $5C, $01 db $54, $A7, $4A, $A1, $4A, $4E, $54, $50 db $4E, $4A, $AA, $4E, $01, $40, $A7, $40 db $A1, $40, $3E, $40, $44, $46, $4A, $A4 db $4E, $A3, $01, $AA, $4E, $4A, $4E, $AA db $5E, $01, $5C, $A3, $58, $AA, $01, $4E db $4E, $4E, $46, $58, $5A, $01, $5E, $A3 db $62, $AA, $01, $62, $66, $68, $6C, $68 db $A5, $66, $9D, $40, $21, $40, $A2, $01 db $AD, $4E, $4E, $4E, $AA, $52, $52, $52 db $A3, $56, $01, $00, $99, $A3, $40, $AA db $40, $40, $40, $A3, $3C, $AA, $3C, $3C db $3C, $A3, $38, $AA, $38, $38, $38, $3C db $3C, $3C, $3C, $38, $3C, $9B, $02, $A3 db $40, $AA, $40, $40, $40, $A3, $40, $AA db $36, $36, $36, $9C, $00, $A3, $28, $AA db $28, $28, $24, $A3, $28, $28, $24, $AA db $24, $24, $20, $A3, $24, $24, $20, $AA db $20, $20, $1E, $A3, $20, $20, $2E, $AA db $2E, $2E, $2A, $A3, $2E, $2E, $00, $2A db $AA, $2A, $2A, $28, $A3, $2A, $AA, $2A db $2A, $2A, $A3, $28, $AA, $28, $28, $24 db $A3, $28, $AA, $28, $28, $28, $9B, $02 db $A3, $2C, $AA, $2C, $2C, $2C, $9C, $A3 db $36, $AA, $40, $40, $40, $9A, $A3, $44 db $99, $A2, $22, $26, $00, $A3, $2A, $AA db $42, $42, $40, $A3, $42, $AA, $42, $42 db $42, $00, $9A, $A3, $40, $3E, $A4, $3C db $A3, $3A, $32, $99, $A3, $36, $00, $AA db $36, $4E, $4A, $46, $44, $40, $A3, $44 db $40, $01, $20, $AA, $38, $40, $46, $A3 db $50, $AA, $20, $20, $20, $A3, $1E, $AA db $36, $3C, $44, $A3, $4E, $AA, $36, $36 db $36, $9B, $03, $A3, $28, $AA, $28, $28 db $28, $9C, $A6, $28, $28, $A2, $24, $A3 db $20, $AA, $20, $28, $2E, $A3, $38, $AA db $20, $20, $20, $A3, $2A, $AA, $2A, $32 db $38, $A3, $42, $AA, $2A, $2A, $2A, $A3 db $1E, $AA, $4A, $4A, $4A, $A3, $4A, $AA db $1E, $1E, $1E, $A3, $1E, $AA, $58, $58 db $58, $5C, $38, $36, $32, $2E, $2C, $00 db $00, $3A, $4A, $63, $57, $8D, $57, $A7 db $57, $C3, $57, $19, $6F, $D3, $57, $D3 db $57, $19, $6F, $F8, $57, $16, $58, $19 db $6F, $F8, $57, $A8, $6F, $FB, $6E, $F8 db $57, $1E, $6F, $F8, $57, $16, $58, $A5 db $6F, $E2, $6F, $19, $6F, $F8, $57, $F8 db $57, $FF, $FF, $69, $57, $EC, $6F, $6F db $58, $23, $6F, $8E, $58, $EC, $6F, $EC db $6F, $28, $6F, $8E, $58, $E2, $6F, $EC db $6F, $1B, $59, $FF, $FF, $91, $57, $D6 db $6E, $26, $59, $EC, $6E, $33, $59, $7F db $59, $EC, $6F, $F2, $6F, $E2, $6F, $7F db $59, $E2, $6F, $EC, $6F, $EC, $6F, $FF db $FF, $AB, $57, $94, $59, $A1, $59, $B8 db $59, $C2, $59, $B8, $59, $D9, $59, $FF db $FF, $C5, $57, $9D, $33, $00, $80, $9B db $04, $A2, $4E, $A1, $4E, $4E, $9C, $9B db $04, $A2, $52, $A1, $52, $52, $9C, $9B db $04, $A2, $54, $A1, $54, $54, $9C, $9B db $04, $A2, $52, $A1, $52, $52, $9C, $00 db $9B, $04, $A1, $28, $36, $2E, $36, $9C db $9B, $04, $28, $3A, $32, $3A, $9C, $9B db $04, $28, $3C, $36, $3C, $9C, $9B, $04 db $28, $3A, $32, $3A, $9C, $00, $9B, $04 db $20, $36, $2E, $36, $9C, $9B, $04, $24 db $32, $2C, $32, $9C, $9B, $02, $24, $36 db $2E, $36, $9C, $9B, $02, $28, $3A, $32 db $3A, $9C, $9B, $04, $2C, $3E, $36, $3E db $9C, $9B, $04, $28, $36, $2E, $36, $9C db $9B, $04, $2A, $38, $32, $38, $9C, $9B db $04, $28, $36, $2E, $36, $9C, $9B, $04 db $22, $36, $2E, $36, $9C, $9B, $04, $2A db $38, $32, $38, $9C, $A1, $36, $40, $44 db $4A, $A3, $4E, $A4, $01, $9D, $50, $26 db $01, $A4, $4E, $4A, $46, $4A, $00, $9D db $40, $26, $41, $A3, $40, $A7, $36, $A2 db $40, $A1, $40, $44, $46, $4A, $A5, $4E db $A3, $58, $A7, $4E, $A2, $58, $A1, $58 db $5C, $5E, $62, $A5, $66, $00, $A6, $40 db $A1, $36, $A7, $36, $A2, $40, $A1, $40 db $44, $46, $4A, $A7, $4E, $A1, $52, $54 db $A6, $52, $4E, $A2, $4A, $A6, $4E, $A1 db $40, $A5, $58, $A2, $01, $4E, $5E, $5C db $5E, $62, $66, $A1, $58, $66, $A3, $70 db $A2, $01, $66, $62, $5E, $62, $A1, $54 db $62, $A3, $6C, $A2, $01, $62, $5E, $5C db $A6, $5E, $A1, $4E, $A3, $4E, $A2, $01 db $AD, $4A, $4E, $4A, $A2, $46, $4A, $A5 db $4E, $A6, $40, $A1, $36, $A7, $36, $A2 db $40, $A1, $40, $44, $46, $4A, $A7, $4E db $A1, $50, $54, $A6, $50, $4E, $A2, $4A db $A6, $46, $A1, $40, $A7, $4E, $A2, $46 db $58, $4E, $A7, $5E, $A2, $5C, $58, $5C db $5E, $62, $A2, $66, $A1, $62, $66, $A3 db $68, $A2, $01, $A6, $6C, $68, $66, $5C db $A2, $5E, $A6, $62, $5E, $A2, $5C, $A5 db $58, $70, $00, $9D, $56, $00, $80, $9B db $04, $A4, $01, $8C, $9C, $00, $9B, $1F db $A2, $40, $A1, $40, $40, $9C, $01, $1A db $16, $14, $00, $99, $9B, $02, $A3, $28 db $A4, $28, $A3, $28, $9C, $28, $A4, $28 db $A3, $36, $32, $A4, $32, $A2, $32, $36 db $A3, $38, $A4, $38, $A3, $38, $3C, $A4 db $3C, $A3, $3C, $2E, $2E, $32, $32, $36 db $A4, $36, $A1, $36, $32, $2E, $2C, $A3 db $28, $A4, $28, $A3, $28, $2A, $A4, $2A db $A3, $2A, $28, $A4, $28, $A3, $24, $22 db $A4, $22, $A3, $22, $2A, $A4, $2A, $A3 db $2A, $36, $01, $01, $9A, $1E, $00, $A6 db $28, $36, $A2, $28, $A6, $24, $32, $A2 db $24, $A6, $20, $2E, $A2, $20, $A6, $24 db $32, $A2, $24, $00, $9B, $1F, $A2, $0B db $A1, $0B, $0B, $9C, $15, $15, $15, $15 db $00, $9B, $0D, $A2, $15, $A1, $15, $15 db $A2, $15, $A1, $15, $15, $A2, $15, $A1 db $15, $15, $15, $15, $15, $15, $9C, $00 db $A1, $15, $15, $15, $15, $A3, $15, $A4 db $01, $00, $9B, $17, $A2, $15, $A1, $15 db $15, $A2, $15, $A1, $15, $15, $A2, $15 db $A1, $15, $15, $15, $15, $15, $15, $9C db $00, $9B, $0C, $A2, $15, $A1, $15, $15 db $A2, $15, $A1, $15, $15, $A2, $15, $A1 db $15, $15, $15, $15, $15, $15, $9C, $00 db $00, $76, $4A, $FB, $59, $01, $5A, $07 db $5A, $00, $00, $0F, $5A, $FF, $FF, $FB db $59, $3F, $5A, $FF, $FF, $01, $5A, $C7 db $6E, $7A, $5A, $FF, $FF, $07, $5A, $9D db $44, $00, $80, $98, $9B, $02, $A3, $01 db $A2, $46, $A1, $88, $88, $A3, $01, $A2 db $44, $A1, $88, $88, $9C, $9D, $24, $00 db $80, $A3, $01, $A2, $64, $62, $60, $64 db $5E, $60, $5C, $60, $5A, $5C, $58, $56 db $A4, $01, $97, $A1, $88, $88, $00, $9D db $50, $84, $00, $A6, $70, $A1, $66, $A2 db $60, $58, $A3, $5A, $A1, $68, $62, $5A db $50, $A2, $4E, $A1, $66, $60, $A2, $58 db $4E, $54, $A1, $50, $54, $A3, $4E, $9D db $24, $00, $00, $A2, $4C, $4E, $68, $66 db $64, $66, $62, $64, $60, $62, $5E, $60 db $A1, $5C, $5E, $5A, $5C, $A3, $01, $A7 db $01, $00, $9B, $02, $99, $A2, $40, $4C db $56, $4C, $36, $4A, $54, $4A, $9C, $A5 db $01, $01, $A7, $01, $00, $00, $49, $4A db $98, $5A, $B2, $5A, $C4, $5A, $D6, $5A db $AB, $6F, $DF, $6F, $32, $6F, $F9, $5A db $2D, $6F, $F9, $5A, $A5, $6F, $E0, $5A db $AB, $6F, $E0, $5A, $E2, $6F, $FF, $FF db $98, $5A, $32, $6F, $21, $5B, $2D, $6F db $28, $5B, $00, $5B, $00, $5B, $E2, $6F db $FF, $FF, $B2, $5A, $C2, $6E, $E2, $6F db $2F, $5B, $45, $5B, $2F, $5B, $45, $5B db $E2, $6F, $FF, $FF, $C4, $5A, $68, $5B db $5A, $5B, $68, $5B, $FF, $FF, $D6, $5A db $9D, $33, $00, $80, $9B, $04, $A1, $58 db $56, $54, $52, $50, $4E, $4C, $4A, $48 db $4A, $4C, $4E, $50, $52, $54, $56, $9C db $00, $9B, $04, $A1, $46, $44, $9C, $00 db $9D, $40, $81, $80, $A7, $58, $A2, $4E db $58, $5C, $60, $66, $A7, $64, $A2, $66 db $A4, $68, $A7, $58, $A2, $4E, $58, $5C db $60, $66, $A7, $64, $A2, $66, $A4, $80 db $00, $9B, $0C, $A1, $58, $56, $9C, $00 db $9B, $04, $A1, $58, $56, $9C, $00, $99 db $A3, $28, $A2, $36, $A3, $28, $A2, $28 db $2A, $38, $A3, $28, $A2, $36, $A3, $28 db $A2, $28, $24, $26, $00, $A3, $28, $A2 db $36, $A3, $28, $A2, $28, $2A, $38, $A3 db $28, $A2, $36, $A3, $28, $A2, $28, $36 db $40, $00, $9B, $08, $A2, $29, $29, $29 db $29, $A3, $FF, $A2, $29, $29, $9C, $00 db $A3, $29, $A2, $29, $29, $A3, $FF, $A2 db $29, $29, $A2, $29, $29, $29, $29, $A3 db $FF, $A2, $29, $29, $00, $00, $76, $4A db $88, $5B, $94, $5B, $9C, $5B, $A8, $5B db $E2, $6F, $AE, $5B, $AE, $5B, $BE, $5B db $FF, $FF, $8A, $5B, $D3, $5B, $F4, $5B db $FF, $FF, $96, $5B, $E2, $6F, $EC, $6E db $26, $5C, $44, $5C, $FF, $FF, $9E, $5B db $61, $5C, $FF, $FF, $A8, $5B, $9D, $23 db $00, $80, $9B, $20, $A0, $5E, $62, $9C db $9B, $20, $62, $64, $9C, $00, $9B, $20 db $5E, $54, $9C, $9B, $20, $5C, $52, $9C db $9B, $20, $5E, $50, $9C, $9B, $20, $5C db $52, $9C, $00, $9D, $81, $82, $00, $A2 db $10, $1E, $A1, $24, $A2, $26, $A1, $28 db $A7, $01, $A1, $0C, $0E, $A2, $10, $A1 db $1E, $A2, $24, $26, $A1, $28, $A7, $01 db $A1, $0C, $0E, $00, $9D, $40, $00, $81 db $9B, $02, $A4, $58, $4E, $A8, $4E, $A0 db $58, $56, $58, $5C, $5E, $5C, $5E, $62 db $A6, $66, $68, $A2, $6C, $A8, $70, $A2 db $70, $6C, $A6, $68, $62, $A2, $5A, $9C db $9D, $30, $00, $01, $A5, $58, $4E, $50 db $52, $54, $54, $56, $56, $00, $99, $A2 db $28, $36, $A1, $3C, $A2, $3E, $A1, $40 db $A7, $01, $A1, $24, $26, $A2, $28, $A1 db $36, $A2, $3C, $3E, $A1, $40, $A7, $01 db $A1, $26, $28, $00, $A2, $2A, $38, $A1 db $3E, $A2, $40, $A1, $42, $A7, $01, $A1 db $26, $28, $A2, $2A, $A1, $38, $A2, $3E db $40, $A1, $42, $A7, $01, $A1, $24, $26 db $00, $9B, $04, $A1, $29, $9C, $FF, $9B db $05, $29, $9C, $FF, $9B, $05, $29, $9C db $00, $04, $58, $4A, $7C, $5C, $86, $5C db $8C, $4A, $00, $00, $AE, $6F, $FB, $6F db $8E, $5C, $FF, $FF, $80, $5C, $B3, $6F db $8E, $5C, $FF, $FF, $86, $5C, $A2, $5C db $3C, $4A, $52, $58, $5C, $5E, $40, $4E db $54, $5C, $5E, $62, $44, $52, $58, $70 db $6C, $62, $36, $44, $4A, $5E, $5C, $5C db $40, $4E, $54, $58, $5C, $5E, $40, $4C db $54, $5C, $5E, $58, $32, $40, $46, $4C db $54, $52, $4A, $4E, $52, $54, $58, $5C db $3C, $4A, $52, $58, $5C, $5E, $40, $4E db $54, $5C, $5E, $62, $44, $52, $58, $74 db $70, $70, $36, $44, $6E, $68, $66, $62 db $40, $4E, $54, $5E, $5C, $5C, $32, $40 db $46, $58, $5C, $54, $46, $54, $5C, $5E db $74, $70, $44, $52, $58, $5C, $6A, $66 db $40, $4E, $54, $58, $66, $64, $32, $40 db $46, $4C, $54, $62, $32, $3A, $40, $4A db $52, $A3, $62, $A2, $62, $A7, $7A, $32 db $00, $00, $76, $4A, $14, $5D, $22, $5D db $2C, $5D, $38, $5D, $DF, $6F, $A5, $6F db $3E, $5D, $AB, $6F, $3E, $5D, $FF, $FF db $16, $5D, $DF, $6F, $60, $5D, $60, $5D db $FF, $FF, $24, $5D, $DF, $6F, $C2, $6E db $7B, $5D, $7B, $5D, $FF, $FF, $2E, $5D db $A5, $5D, $FF, $FF, $38, $5D, $9D, $44 db $00, $80, $A2, $01, $A1, $36, $36, $A2 db $34, $A3, $01, $A1, $36, $36, $A2, $38 db $A3, $01, $A1, $36, $36, $A2, $34, $A3 db $01, $A1, $36, $34, $A2, $36, $01, $00 db $9D, $64, $00, $00, $9B, $02, $A2, $40 db $36, $A1, $40, $44, $48, $4A, $A2, $4E db $A0, $56, $A1, $58, $A0, $01, $A2, $4E db $01, $9C, $00, $99, $A2, $28, $A1, $40 db $40, $A2, $3E, $A1, $36, $36, $A2, $28 db $A1, $40, $40, $A2, $42, $A1, $2A, $2A db $A2, $28, $A1, $40, $40, $A2, $3E, $A1 db $36, $36, $A2, $28, $A1, $40, $3E, $A2 db $40, $A1, $28, $28, $00, $A2, $29, $A1 db $29, $29, $A2, $FF, $A1, $29, $29, $A1 db $29, $29, $29, $29, $A2, $FF, $1A, $00 db $00, $3A, $4A, $C3, $5D, $D3, $5D, $E1 db $5D, $00, $00, $F1, $5D, $01, $70, $A5 db $6F, $F6, $5D, $A2, $6F, $F6, $5D, $FF db $FF, $C7, $5D, $B8, $6F, $A5, $6F, $F6 db $5D, $A2, $6F, $F6, $5D, $FF, $FF, $D3 db $5D, $FB, $6F, $E6, $6E, $A5, $6F, $F6 db $5D, $A2, $6F, $F6, $5D, $FF, $FF, $E3 db $5D, $9D, $44, $00, $80, $00, $A2, $30 db $34, $3A, $40, $48, $4C, $52, $58, $60 db $64, $6A, $70, $78, $7C, $82, $88, $00 db $00, $3A, $4A, $13, $5E, $19, $5E, $1F db $5E, $00, $00, $5B, $50, $FF, $FF, $13 db $5E, $D9, $50, $FF, $FF, $19, $5E, $C2 db $6E, $7E, $51, $FF, $FF, $1F, $5E, $00 db $2B, $4A, $32, $5E, $52, $5E, $5E, $5E db $00, $00, $A5, $6F, $0F, $6F, $6E, $5E db $6E, $5E, $14, $6F, $6E, $5E, $6E, $5E db $A2, $6F, $0F, $6F, $6E, $5E, $6E, $5E db $14, $6F, $6E, $5E, $6E, $5E, $FF, $FF db $32, $5E, $78, $5E, $91, $5E, $78, $5E db $91, $5E, $FF, $FF, $52, $5E, $EC, $6E db $A0, $5E, $A0, $5E, $F6, $6E, $A0, $5E db $A0, $5E, $FF, $FF, $5E, $5E, $9B, $02 db $A2, $1C, $20, $20, $9C, $1C, $20, $00 db $9D, $70, $21, $40, $A7, $48, $A1, $44 db $48, $A7, $4A, $A1, $48, $4A, $A7, $4C db $A1, $5C, $58, $A2, $4C, $64, $A3, $64 db $00, $9D, $20, $21, $81, $A2, $4C, $64 db $A8, $64, $A2, $64, $7C, $A8, $7C, $00 db $99, $A7, $28, $28, $A3, $28, $00, $00 db $2B, $4A, $B2, $5E, $BA, $5E, $C2, $5E db $00, $00, $CC, $5E, $D1, $5E, $DB, $5E db $00, $00, $D6, $5E, $DB, $5E, $D1, $5E db $00, $00, $D6, $6E, $04, $70, $DB, $5E db $FB, $6F, $00, $00, $9D, $26, $00, $80 db $00, $A3, $01, $A1, $01, $00, $9D, $67 db $00, $81, $00, $96, $A1, $70, $6E, $66 db $60, $58, $56, $4E, $48, $74, $70, $6A db $62, $5C, $58, $52, $4A, $78, $74, $6E db $66, $60, $5C, $56, $4E, $7A, $78, $70 db $6A, $62, $60, $58, $52, $A2, $36, $44 db $4A, $4E, $56, $5C, $62, $66, $A8, $7E db $95, $00, $00, $3A, $4A, $15, $5F, $1B db $5F, $21, $5F, $00, $00, $29, $5F, $FF db $FF, $12, $54, $5C, $5F, $FF, $FF, $20 db $54, $C2, $6E, $85, $5F, $FF, $FF, $30 db $54, $9D, $70, $21, $81, $AA, $01, $36 db $40, $A3, $48, $AA, $48, $48, $44, $A3 db $48, $AA, $01, $3C, $46, $A3, $4E, $AA db $4E, $4E, $4A, $A3, $4E, $A3, $01, $9B db $02, $A3, $4C, $A2, $01, $A1, $4C, $4C db $9C, $A8, $4A, $9D, $40, $21, $80, $AA db $32, $30, $2C, $00, $9D, $90, $21, $81 db $AA, $36, $40, $48, $A8, $4E, $AA, $3C db $46, $4E, $A8, $54, $AA, $4E, $54, $5E db $9B, $02, $A3, $5A, $A2, $01, $A1, $5A db $5A, $9C, $A8, $5C, $9D, $60, $21, $80 db $AA, $44, $40, $3E, $00, $99, $AA, $01 db $01, $4E, $9A, $A3, $58, $99, $AA, $40 db $40, $3C, $9A, $A3, $40, $99, $AA, $01 db $01, $54, $9A, $A3, $5E, $99, $AA, $46 db $46, $42, $9A, $A3, $46, $01, $99, $AA db $2A, $28, $2A, $34, $32, $34, $3C, $3A db $3C, $42, $4C, $54, $56, $52, $56, $58 db $56, $52, $A3, $4E, $AA, $1E, $1E, $1E db $00, $00, $58, $4A, $CC, $5F, $D4, $5F db $8C, $4A, $00, $00, $37, $6F, $DC, $5F db $FF, $FF, $CC, $5F, $3C, $6F, $FE, $5F db $FF, $FF, $D4, $5F, $A2, $32, $3A, $40 db $3A, $32, $36, $3E, $44, $30, $36, $3E db $44, $22, $28, $30, $28, $2C, $32, $3A db $32, $1E, $26, $2C, $26, $28, $2C, $32 db $36, $28, $30, $36, $3C, $00, $A4, $70 db $A2, $01, $6E, $74, $A4, $66, $A2, $01 db $70, $58, $5C, $60, $62, $60, $62, $A3 db $56, $6A, $A5, $66, $A2, $01, $00, $00 db $2B, $4A, $22, $60, $38, $60, $8C, $4A db $00, $00, $59, $60, $65, $60, $4E, $60 db $4E, $60, $59, $60, $6A, $60, $4E, $60 db $4E, $60, $4E, $60, $FF, $FF, $22, $60 db $7E, $60, $8A, $60, $6F, $60, $6F, $60 db $7E, $60, $90, $60, $6F, $60, $6F, $60 db $6F, $60, $FF, $FF, $38, $60, $9B, $0C db $AD, $01, $01, $01, $01, $9C, $A5, $01 db $00, $9D, $40, $41, $80, $9B, $02, $A3 db $28, $32, $32, $9C, $00, $A3, $30, $26 db $01, $00, $A3, $34, $2A, $01, $00, $9D db $42, $00, $80, $9B, $0C, $AD, $46, $44 db $46, $01, $9C, $A5, $01, $00, $9D, $40 db $41, $80, $9B, $02, $A3, $30, $3A, $3A db $9C, $00, $A3, $38, $2E, $A3, $01, $00 db $A3, $3C, $32, $A3, $01, $00, $00, $49 db $4A, $8C, $4A, $A1, $60, $B1, $60, $00 db $00, $C1, $60, $D9, $60, $D9, $60, $FA db $60, $B3, $6F, $0F, $61, $01, $70, $00 db $00, $CC, $6E, $1D, $61, $29, $61, $D6 db $6E, $4C, $61, $59, $61, $0F, $61, $00 db $00, $9D, $43, $00, $80, $A4, $01, $A2 db $01, $A1, $78, $74, $A2, $78, $A3, $01 db $A1, $7A, $78, $A2, $7A, $A3, $01, $01 db $00, $9D, $55, $00, $00, $9E, $2B, $4A db $9B, $02, $A1, $66, $68, $66, $64, $62 db $64, $62, $64, $9C, $A2, $66, $7E, $66 db $A1, $66, $68, $6A, $6C, $6A, $68, $A3 db $66, $00, $9D, $35, $00, $40, $9B, $02 db $A1, $66, $68, $66, $64, $62, $64, $62 db $64, $9C, $A5, $01, $A3, $01, $00, $9E db $3A, $4A, $A0, $7E, $7A, $76, $72, $6E db $6A, $A3, $66, $01, $00, $A4, $01, $A2 db $01, $99, $A3, $6C, $01, $6E, $01, $01 db $00, $9E, $2B, $4A, $99, $9B, $02, $A2 db $40, $4E, $36, $4E, $9C, $9B, $02, $42 db $50, $38, $50, $9C, $9B, $02, $46, $54 db $3C, $54, $9C, $4A, $58, $40, $58, $4A db $58, $48, $44, $00, $9B, $02, $A2, $40 db $4E, $36, $4E, $9C, $A5, $01, $A3, $01 db $00, $9E, $3A, $4A, $A1, $01, $00, $00 db $49, $4A, $6A, $61, $76, $61, $82, $61 db $00, $00, $41, $6F, $8C, $61, $46, $6F db $9A, $61, $9A, $61, $00, $00, $41, $6F db $C8, $61, $46, $6F, $D6, $61, $D6, $61 db $00, $00, $F1, $6E, $04, $62, $11, $62 db $11, $62, $00, $00, $A4, $01, $A1, $26 db $2A, $2E, $30, $34, $01, $34, $01, $A5 db $36, $00, $A4, $01, $A2, $34, $38, $3C db $3E, $A7, $42, $A2, $46, $42, $3E, $3C db $38, $A4, $34, $A2, $3C, $3E, $42, $4C db $A7, $54, $A2, $56, $54, $50, $4C, $4A db $A7, $4C, $A1, $42, $42, $9B, $02, $A2 db $4C, $A1, $42, $42, $9C, $A5, $4C, $00 db $A5, $01, $A1, $40, $44, $48, $4A, $4E db $01, $4E, $01, $A4, $50, $00, $A5, $01 db $A2, $4E, $52, $56, $58, $A7, $5C, $A2 db $60, $5C, $58, $56, $52, $A4, $4E, $A2 db $56, $58, $5C, $66, $A7, $6E, $A2, $70 db $6E, $6A, $66, $64, $A7, $66, $A1, $5C db $5C, $9B, $02, $A2, $66, $A1, $5C, $5C db $9C, $A4, $66, $00, $9A, $A1, $24, $28 db $2C, $2E, $32, $01, $32, $01, $AE, $34 db $00, $A2, $32, $36, $3A, $3C, $A7, $40 db $A2, $44, $40, $3C, $3A, $36, $A4, $32 db $A2, $3A, $3C, $40, $4A, $A7, $52, $A2 db $54, $52, $4E, $4A, $48, $A3, $4A, $A2 db $01, $99, $A1, $40, $40, $9B, $02, $A2 db $4A, $A1, $40, $40, $9C, $9A, $AE, $4A db $00, $00, $49, $4A, $8C, $4A, $4C, $62 db $5C, $62, $00, $00, $6C, $62, $71, $62 db $23, $6F, $71, $62, $82, $62, $37, $6F db $BA, $62, $00, $00, $D6, $6E, $C7, $62 db $CC, $6E, $C7, $62, $D9, $62, $D6, $6E db $00, $63, $00, $00, $9D, $40, $26, $01 db $00, $A1, $90, $A6, $90, $A1, $88, $A6 db $88, $A1, $7E, $A6, $7E, $A1, $88, $A6 db $88, $00, $A6, $4E, $A1, $4E, $A3, $48 db $A6, $4A, $A1, $4A, $A3, $42, $A1, $4E db $A2, $4E, $A1, $52, $4E, $48, $40, $48 db $A2, $4A, $90, $A3, $90, $A6, $4E, $A1 db $4E, $A3, $48, $A6, $58, $A1, $58, $A3 db $50, $A1, $4E, $A2, $4E, $A1, $52, $A2 db $4E, $A1, $58, $60, $A2, $62, $90, $A3 db $90, $00, $A6, $4E, $A1, $4E, $A3, $48 db $A6, $4A, $A1, $4A, $A3, $42, $00, $99 db $A1, $8E, $A6, $8E, $A1, $86, $A6, $86 db $A1, $7C, $A6, $7C, $A1, $86, $A6, $86 db $00, $9B, $02, $A2, $28, $A1, $30, $36 db $A2, $1E, $A1, $30, $36, $A2, $2A, $A1 db $32, $38, $A2, $20, $A1, $32, $38, $A2 db $28, $A1, $30, $36, $A2, $1E, $A1, $30 db $36, $A2, $2A, $8E, $8E, $1E, $9C, $00 db $A2, $28, $A1, $30, $36, $A2, $1E, $A1 db $30, $36, $A2, $2A, $A1, $32, $38, $A2 db $20, $A1, $32, $38, $00, $00, $2B, $4A db $20, $63, $3A, $63, $50, $63, $64, $63 db $EC, $6F, $2D, $6F, $6E, $63, $4B, $6F db $7F, $63, $0F, $6F, $A5, $6F, $94, $63 db $5A, $6F, $A8, $6F, $94, $63, $FF, $FF db $2A, $63, $2D, $6F, $A3, $63, $B2, $63 db $4B, $6F, $C1, $63, $50, $6F, $D6, $63 db $55, $6F, $D6, $63, $FF, $FF, $44, $63 db $C7, $6E, $E5, $63, $E2, $6F, $C2, $6E db $F4, $63, $C2, $6E, $04, $64, $04, $64 db $FF, $FF, $5A, $63, $20, $64, $28, $64 db $2E, $64, $FF, $FF, $68, $63, $A8, $01 db $A1, $46, $48, $5E, $60, $A8, $01, $A1 db $48, $4A, $60, $62, $A8, $01, $00, $9B db $05, $A1, $70, $72, $70, $6E, $9C, $70 db $6E, $6C, $6A, $68, $66, $64, $62, $60 db $5E, $5C, $5A, $00, $9B, $04, $A2, $50 db $4A, $4A, $50, $4A, $4A, $50, $4A, $50 db $4A, $9C, $00, $A5, $01, $9B, $08, $A1 db $1E, $20, $9C, $A3, $1E, $AE, $01, $A5 db $01, $00, $A1, $52, $54, $6A, $6C, $A8 db $01, $A1, $54, $56, $6C, $6E, $A8, $01 db $00, $9B, $05, $A1, $58, $5A, $58, $56 db $9C, $58, $56, $54, $52, $50, $4E, $4C db $4A, $48, $46, $44, $42, $00, $9B, $04 db $A2, $58, $01, $01, $56, $01, $01, $58 db $01, $5A, $01, $9C, $00, $9A, $9B, $10 db $A1, $28, $2A, $9C, $99, $A3, $2C, $AE db $01, $A5, $01, $00, $A5, $01, $99, $9B db $04, $A2, $40, $9C, $28, $28, $A1, $28 db $28, $2A, $28, $00, $99, $9B, $04, $A1 db $4A, $4A, $32, $32, $A2, $32, $A1, $4A db $4A, $32, $32, $A2, $32, $A1, $4A, $4A db $32, $32, $4A, $4A, $32, $32, $9C, $00 db $9B, $04, $A5, $01, $9C, $A8, $01, $00 db $9B, $04, $A5, $01, $9C, $00, $9B, $02 db $A1, $15, $15, $15, $15, $A2, $01, $9C db $9B, $08, $A1, $15, $9C, $00, $00, $67 db $4A, $8C, $4A, $49, $64, $53, $64, $5B db $64, $37, $6F, $61, $64, $80, $64, $FF db $FF, $49, $64, $EC, $6E, $B5, $64, $FF db $FF, $53, $64, $D0, $64, $FF, $FF, $5B db $64, $A4, $01, $A7, $01, $AD, $5A, $5E db $5A, $A3, $58, $01, $A7, $01, $A1, $4A db $54, $A3, $4E, $01, $A7, $01, $AD, $42 db $46, $42, $A3, $40, $01, $A7, $01, $00 db $9D, $40, $21, $01, $AD, $4E, $50, $52 db $A6, $54, $A1, $48, $A7, $54, $AD, $52 db $54, $52, $A2, $4E, $4A, $A6, $4E, $A1 db $40, $A4, $4E, $A2, $01, $AD, $4E, $50 db $52, $A6, $54, $A1, $48, $A7, $54, $AD db $52, $54, $52, $A2, $4E, $4A, $A6, $4E db $A1, $40, $A8, $4E, $00, $99, $9B, $04 db $A6, $28, $A1, $30, $A2, $36, $28, $2A db $32, $A3, $38, $A6, $28, $A1, $30, $A2 db $36, $28, $1E, $2A, $A3, $32, $9C, $00 db $9B, $03, $A2, $15, $AD, $15, $15, $15 db $9C, $9B, $04, $A1, $15, $9C, $00, $00 db $2B, $4A, $EA, $64, $F0, $64, $F6, $64 db $00, $00, $50, $6F, $FC, $64, $00, $00 db $50, $6F, $03, $65, $00, $00, $EC, $6E db $0A, $65, $00, $00, $A2, $52, $54, $56 db $A8, $58, $00, $A2, $5C, $5E, $60, $A8 db $62, $00, $99, $A2, $30, $32, $34, $9A db $A8, $36, $00, $00, $58, $4A, $1E, $65 db $5A, $65, $A2, $65, $EC, $65, $CB, $6F db $BD, $6F, $44, $66, $49, $66, $5B, $66 db $78, $66, $A8, $66, $20, $70, $C6, $66 db $04, $67, $09, $67, $07, $70, $1C, $70 db $E2, $6F, $1D, $67, $58, $67, $58, $67 db $BF, $67, $58, $67, $58, $67, $BF, $67 db $58, $67, $58, $67, $FF, $67, $1F, $68 db $20, $70, $30, $68, $24, $70, $4D, $68 db $00, $00, $CB, $6F, $69, $6F, $5C, $68 db $64, $6F, $72, $68, $73, $6F, $5C, $68 db $5F, $6F, $86, $68, $99, $68, $6E, $6F db $9E, $68, $20, $70, $B5, $68, $CC, $5E db $01, $70, $09, $67, $FB, $6F, $1C, $70 db $E2, $6F, $D1, $68, $0A, $69, $0A, $69 db $5C, $69, $0A, $69, $0A, $69, $5C, $69 db $0A, $69, $0A, $69, $9C, $69, $B5, $69 db $20, $70, $C6, $69, $24, $70, $DB, $69 db $00, $00, $CB, $6F, $FB, $6F, $EA, $69 db $5C, $68, $EF, $69, $72, $68, $F4, $69 db $D6, $6E, $49, $66, $5B, $66, $DF, $6F db $FE, $69, $03, $6A, $20, $70, $2A, $6A db $D6, $6E, $04, $70, $09, $67, $FE, $6F db $1C, $70, $E2, $6F, $51, $6A, $65, $6A db $65, $6A, $C3, $6A, $65, $6A, $65, $6A db $C3, $6A, $65, $6A, $65, $6A, $0D, $6B db $2A, $6B, $20, $70, $36, $6B, $24, $70 db $4C, $6B, $00, $00, $D3, $6F, $57, $6B db $20, $70, $5F, $6B, $1C, $70, $67, $6B db $67, $6B, $67, $6B, $67, $6B, $67, $6B db $67, $6B, $67, $6B, $67, $6B, $67, $6B db $67, $6B, $67, $6B, $78, $6B, $78, $6B db $67, $6B, $67, $6B, $67, $6B, $67, $6B db $67, $6B, $67, $6B, $67, $6B, $67, $6B db $78, $6B, $78, $6B, $67, $6B, $67, $6B db $67, $6B, $67, $6B, $67, $6B, $67, $6B db $67, $6B, $67, $6B, $67, $6B, $83, $6B db $20, $70, $83, $6B, $83, $6B, $24, $70 db $91, $6B, $00, $00, $9D, $56, $00, $80 db $00, $A1, $30, $3E, $44, $4C, $4E, $56 db $5C, $64, $66, $64, $5C, $56, $4E, $4C db $44, $3E, $00, $A1, $40, $44, $48, $4E db $58, $5C, $60, $66, $70, $66, $60, $5C db $58, $4E, $48, $44, $40, $44, $48, $4E db $58, $5C, $60, $66, $A3, $70, $01, $00 db $9D, $42, $00, $80, $A1, $36, $34, $36 db $2C, $30, $34, $36, $3A, $3E, $3A, $3E db $36, $3A, $3E, $40, $44, $9D, $52, $00 db $80, $4E, $4C, $4E, $44, $56, $52, $56 db $4E, $9D, $62, $00, $80, $5C, $56, $4E db $66, $64, $5E, $56, $52, $A3, $4E, $00 db $9D, $60, $21, $80, $A3, $52, $4E, $5C db $A7, $5C, $A3, $60, $A2, $5C, $58, $52 db $A3, $56, $A2, $01, $58, $56, $52, $4E db $5C, $A3, $58, $A4, $01, $00, $9D, $52 db $00, $80, $A3, $01, $9B, $02, $A1, $44 db $4A, $52, $58, $60, $58, $52, $4A, $9C db $9B, $02, $36, $3E, $44, $4A, $52, $4A db $44, $3E, $9C, $40, $44, $48, $4E, $58 db $4E, $48, $44, $40, $44, $48, $4E, $58 db $4E, $48, $40, $3E, $42, $46, $4C, $56 db $5A, $5E, $64, $6E, $64, $5E, $5A, $56 db $4C, $46, $3E, $00, $9D, $47, $00, $80 db $00, $A1, $1E, $22, $26, $2C, $32, $3A db $3E, $44, $4A, $52, $56, $5C, $62, $6A db $6E, $74, $A4, $7E, $00, $9D, $52, $00 db $80, $A4, $01, $A3, $1E, $AA, $1E, $1E db $1E, $9D, $72, $00, $80, $A3, $22, $9B db $06, $AA, $22, $9C, $28, $28, $28, $9D db $92, $00, $80, $A3, $2C, $AA, $2C, $2C db $2C, $A3, $32, $AA, $32, $32, $3A, $A3 db $3E, $AA, $36, $36, $36, $A3, $36, $9D db $92, $00, $40, $AA, $36, $3A, $3E, $00 db $9D, $90, $21, $41, $A3, $30, $AA, $32 db $30, $2C, $30, $01, $30, $32, $36, $3A db $A3, $3C, $AA, $44, $48, $44, $A3, $42 db $AA, $3A, $3E, $42, $A3, $44, $AA, $5C db $62, $6A, $70, $38, $3C, $40, $3C, $38 db $A3, $36, $AA, $36, $3A, $36, $A3, $32 db $01, $9D, $77, $00, $80, $9B, $02, $AA db $52, $56, $58, $9C, $56, $4E, $48, $A3 db $4E, $AA, $52, $56, $58, $58, $5C, $58 db $56, $4E, $48, $A3, $4E, $9D, $70, $21 db $41, $AA, $4A, $4E, $52, $52, $52, $52 db $A3, $50, $AA, $50, $54, $50, $A3, $4E db $AA, $4E, $52, $4E, $A4, $4A, $00, $9D db $70, $00, $81, $A5, $01, $01, $A8, $4A db $AA, $4A, $4E, $4A, $A4, $48, $A3, $4A db $4E, $9D, $90, $26, $80, $AA, $50, $01 db $54, $A4, $58, $AA, $50, $54, $58, $A8 db $58, $AA, $58, $58, $58, $9B, $02, $01 db $50, $50, $50, $4E, $50, $9C, $A3, $4E db $9D, $70, $21, $40, $AA, $3A, $01, $3A db $36, $01, $36, $32, $01, $32, $00, $9D db $80, $21, $41, $AA, $46, $44, $46, $4A db $46, $44, $9B, $04, $46, $9C, $44, $46 db $4A, $46, $4A, $50, $5A, $62, $68, $5A db $5A, $62, $62, $62, $A3, $60, $00, $9D db $70, $21, $41, $A2, $48, $A1, $48, $48 db $A3, $44, $A2, $44, $A1, $46, $4A, $00 db $9D, $70, $21, $41, $A3, $50, $A2, $50 db $A1, $50, $50, $A2, $5C, $58, $A3, $54 db $A3, $60, $A2, $60, $A1, $5C, $60, $A2 db $62, $66, $68, $62, $00, $A3, $66, $9D db $A0, $21, $40, $A2, $28, $A1, $28, $28 db $A3, $28, $01, $00, $A2, $01, $60, $64 db $A8, $66, $A2, $60, $64, $A8, $66, $A2 db $64, $60, $56, $A7, $5C, $A5, $60, $A3 db $01, $00, $A2, $60, $64, $A8, $66, $A2 db $5C, $66, $A8, $70, $A2, $6E, $6A, $A5 db $6E, $A4, $01, $A2, $01, $00, $A2, $60 db $64, $A8, $66, $A2, $5C, $66, $A8, $70 db $A2, $6E, $6A, $9D, $50, $00, $80, $6E db $00, $A5, $6E, $A4, $01, $00, $A8, $01 db $A3, $7C, $78, $6E, $A7, $6E, $A5, $70 db $A2, $82, $7E, $7C, $78, $6E, $6A, $6E db $78, $70, $A3, $01, $00, $A2, $70, $A4 db $74, $A2, $01, $62, $6A, $74, $A8, $6E db $A2, $01, $66, $A5, $78, $A2, $01, $A7 db $76, $88, $9D, $60, $00, $80, $A4, $86 db $00, $9D, $62, $21, $80, $A3, $01, $01 db $26, $AA, $26, $26, $26, $9D, $82, $21 db $80, $A3, $28, $AA, $28, $28, $28, $32 db $32, $32, $3A, $3A, $3A, $9D, $A2, $21 db $80, $A3, $3E, $AA, $3E, $3E, $3E, $A3 db $40, $AA, $40, $40, $40, $A3, $44, $AA db $4E, $4E, $4E, $A3, $4E, $AA, $4E, $4E db $4E, $00, $9D, $A0, $21, $41, $A3, $40 db $36, $AA, $36, $01, $40, $44, $48, $4A db $A4, $4E, $AA, $01, $4E, $52, $54, $52 db $4E, $A4, $4A, $AA, $01, $4A, $4E, $50 db $4E, $4A, $A3, $48, $AA, $48, $4A, $48 db $A3, $44, $9D, $57, $00, $80, $AA, $01 db $70, $74, $9B, $02, $A3, $78, $70, $A4 db $7E, $9C, $9D, $A0, $21, $41, $AA, $52 db $56, $58, $58, $5C, $60, $A3, $62, $AA db $62, $66, $62, $A3, $60, $AA, $60, $62 db $60, $A4, $5C, $00, $9D, $A0, $26, $81 db $AA, $58, $01, $5C, $A4, $5E, $AA, $58 db $01, $5C, $A3, $5E, $AA, $01, $01, $5E db $A6, $5C, $58, $A2, $4E, $A4, $54, $AE db $58, $AA, $58, $01, $5C, $A4, $5E, $AA db $58, $5C, $5E, $A8, $68, $AA, $68, $66 db $5E, $A5, $62, $A3, $62, $9D, $A0, $21 db $40, $AA, $4A, $4E, $4A, $48, $4A, $48 db $44, $48, $44, $00, $9D, $A0, $21, $41 db $A4, $58, $AA, $01, $58, $58, $58, $54 db $58, $A4, $5A, $AA, $01, $5E, $62, $66 db $68, $6C, $A3, $70, $00, $9D, $A0, $21 db $00, $A2, $58, $A1, $4E, $58, $A3, $54 db $A2, $54, $A1, $58, $5C, $00, $A3, $5E db $A2, $5E, $A1, $58, $5E, $A3, $62, $A1 db $62, $66, $68, $6C, $9D, $A0, $00, $01 db $A5, $70, $00, $9D, $A0, $21, $00, $A3 db $78, $A2, $40, $A1, $40, $40, $A3, $40 db $01, $00, $9D, $A2, $6E, $20, $00, $9D db $92, $6E, $40, $00, $9B, $03, $A5, $01 db $9C, $A3, $01, $A6, $01, $00, $A8, $01 db $A2, $01, $00, $9D, $42, $6E, $20, $99 db $A2, $48, $56, $5C, $66, $A4, $01, $A2 db $3A, $48, $4E, $58, $01, $56, $A1, $52 db $4E, $4C, $3E, $A2, $48, $56, $5C, $66 db $A4, $01, $A2, $3A, $48, $4E, $58, $A3 db $01, $00, $A3, $01, $9B, $02, $A2, $2C db $A3, $2C, $A2, $2C, $9C, $9B, $02, $A2 db $1E, $A3, $1E, $A2, $1E, $9C, $9B, $02 db $A2, $28, $A3, $28, $A2, $28, $9C, $9B db $02, $A2, $26, $A3, $26, $A2, $26, $9C db $00, $9D, $42, $6E, $20, $99, $9B, $06 db $A3, $1E, $AA, $1E, $1E, $1E, $9C, $A3 db $1E, $1E, $22, $26, $00, $99, $A3, $28 db $AA, $28, $28, $24, $A3, $28, $AA, $28 db $28, $28, $A3, $24, $AA, $3C, $3C, $3C db $9A, $A3, $3A, $22, $99, $9B, $02, $A3 db $2C, $AA, $2C, $2C, $2C, $9C, $A3, $1E db $AA, $1E, $1E, $1E, $9A, $A3, $1E, $20 db $99, $AA, $22, $40, $48, $52, $48, $40 db $30, $3E, $44, $4E, $44, $3E, $3A, $40 db $48, $52, $48, $40, $30, $3E, $44, $4E db $44, $30, $A3, $32, $AA, $32, $32, $32 db $A3, $2A, $AA, $2A, $2A, $2A, $1E, $28 db $2C, $36, $40, $44, $4E, $36, $3A, $3E db $3A, $36, $00, $38, $58, $5E, $68, $5E db $58, $50, $58, $5E, $68, $5E, $58, $9B db $02, $50, $54, $5C, $62, $5C, $54, $9C db $9B, $02, $4E, $54, $5C, $62, $5C, $54 db $9C, $40, $48, $4E, $54, $4E, $48, $40 db $48, $4E, $54, $4E, $40, $9B, $02, $99 db $AA, $32, $40, $46, $50, $58, $5E, $9A db $A3, $68, $01, $9C, $99, $9B, $02, $AA db $2A, $42, $42, $42, $46, $4A, $9C, $A3 db $4E, $1E, $22, $26, $00, $38, $40, $46 db $50, $58, $5E, $9A, $A3, $68, $99, $AA db $38, $38, $38, $2A, $32, $38, $42, $4A db $50, $9A, $A3, $72, $99, $AA, $2A, $2A db $2A, $00, $9B, $02, $A2, $28, $1E, $9C db $9B, $02, $24, $1A, $9C, $00, $9B, $02 db $A2, $20, $2E, $9C, $9B, $02, $24, $32 db $9C, $9B, $02, $28, $1E, $9C, $9B, $02 db $2A, $20, $9C, $00, $A3, $28, $A2, $28 db $A1, $28, $28, $A3, $28, $01, $00, $9B db $14, $A5, $01, $9C, $A3, $01, $00, $9B db $06, $A5, $01, $9C, $A3, $01, $00, $9B db $03, $A3, $15, $AA, $1A, $1A, $1A, $9C db $AA, $15, $15, $15, $1A, $15, $15, $00 db $9B, $08, $AA, $29, $29, $29, $1A, $29 db $29, $9C, $00, $9B, $02, $A1, $1A, $1A db $A3, $1A, $9C, $9B, $04, $A1, $1A, $9C db $00, $A3, $1A, $A2, $1A, $A1, $1A, $1A db $A3, $1A, $01, $00, $00, $2B, $4A, $A7 db $6B, $B9, $6B, $CB, $6B, $00, $00, $D1 db $6B, $D6, $6B, $D6, $6B, $41, $6F, $D6 db $6B, $78, $6F, $D6, $6B, $FF, $FF, $32 db $5E, $D1, $6B, $E0, $6B, $E0, $6B, $41 db $6F, $E0, $6B, $78, $6F, $E0, $6B, $FF db $FF, $52, $5E, $E2, $6F, $FF, $FF, $5E db $5E, $9D, $40, $00, $40, $00, $A1, $34 db $36, $34, $32, $30, $2E, $30, $32, $00 db $A1, $48, $4A, $48, $46, $44, $42, $44 db $46, $00, $00, $49, $4A, $F5, $6B, $15 db $6C, $39, $6C, $59, $6C, $E2, $6F, $77 db $6C, $81, $6D, $0A, $70, $87, $6F, $7E db $6C, $8C, $6F, $84, $6C, $82, $6F, $8A db $6C, $FB, $6C, $61, $6D, $74, $6D, $79 db $6D, $FF, $FF, $10, $70, $E2, $6F, $02 db $6D, $81, $6D, $0A, $70, $7D, $6F, $09 db $6D, $91, $6F, $28, $6D, $04, $70, $7C db $6D, $48, $6D, $55, $6D, $61, $6D, $04 db $70, $74, $6D, $79, $6D, $FF, $FF, $10 db $70, $E2, $6F, $96, $6F, $81, $6D, $04 db $70, $0A, $70, $9C, $6F, $93, $6D, $B5 db $6D, $D6, $6E, $48, $6D, $55, $6D, $61 db $6D, $0A, $70, $79, $6D, $FF, $FF, $10 db $70, $CB, $6D, $D7, $6D, $D7, $6D, $D7 db $6D, $D7, $6D, $EC, $6D, $EC, $6D, $EC db $6D, $EC, $6D, $EC, $6D, $EC, $6D, $16 db $6E, $1A, $6E, $FF, $FF, $16, $70, $9D db $10, $00, $81, $A2, $01, $00, $A4, $90 db $82, $86, $78, $00, $A4, $90, $82, $86 db $01, $00, $9D, $B1, $82, $00, $A2, $10 db $10, $9D, $71, $82, $80, $A1, $6E, $60 db $6E, $78, $A3, $01, $9D, $B1, $82, $00 db $A2, $01, $06, $10, $10, $9D, $71, $82 db $80, $A1, $6E, $60, $6E, $78, $A3, $01 db $9D, $B1, $82, $00, $A2, $01, $10, $18 db $18, $9D, $71, $82, $80, $A1, $6A, $5C db $6A, $6E, $A3, $01, $9D, $B1, $82, $00 db $A2, $01, $0E, $18, $18, $9D, $71, $82 db $80, $A1, $6A, $5C, $6A, $6E, $9D, $80 db $00, $00, $A3, $18, $14, $9D, $A1, $82 db $00, $A2, $10, $10, $A4, $01, $A2, $01 db $06, $10, $10, $A4, $01, $A3, $10, $9B db $03, $A2, $06, $06, $A4, $01, $A2, $01 db $14, $9C, $00, $9D, $26, $00, $00, $A3 db $01, $00, $9D, $40, $00, $41, $A2, $01 db $00, $9B, $03, $A5, $01, $9C, $A4, $01 db $A2, $01, $48, $4C, $A8, $4E, $A2, $48 db $4C, $A8, $4E, $A2, $4C, $48, $3E, $A7 db $44, $A8, $48, $A2, $01, $A8, $01, $00 db $9B, $03, $A1, $60, $5C, $58, $4E, $48 db $4E, $58, $5C, $9C, $60, $5C, $58, $4E db $48, $4E, $58, $60, $9B, $02, $5C, $56 db $52, $4E, $44, $4E, $52, $56, $9C, $00 db $9B, $02, $A1, $64, $5C, $56, $4E, $4C db $4E, $56, $5C, $9C, $00, $9B, $02, $6A db $64, $5C, $56, $52, $56, $5C, $64, $9C db $00, $A1, $06, $14, $1C, $1E, $26, $2C db $34, $36, $3E, $44, $4C, $4E, $56, $5C db $A2, $64, $66, $00, $9D, $77, $00, $80 db $00, $A5, $8C, $00, $9D, $40, $00, $80 db $00, $A2, $48, $4C, $A8, $4E, $A2, $48 db $4C, $A8, $4E, $A2, $4C, $48, $A6, $3E db $A5, $56, $00, $9B, $03, $A5, $01, $9C db $A4, $01, $A2, $01, $A2, $36, $3A, $A4 db $3E, $A3, $01, $A2, $36, $3A, $A4, $3E db $A3, $01, $A2, $3A, $A3, $36, $A7, $34 db $A4, $36, $A8, $01, $00, $A2, $48, $4C db $A4, $4E, $A3, $01, $A2, $48, $4E, $A4 db $58, $A3, $01, $A2, $56, $52, $A5, $56 db $A2, $01, $00, $9B, $05, $A5, $01, $9C db $A4, $01, $A2, $01, $A6, $01, $00, $9B db $03, $A2, $15, $A9, $15, $AD, $01, $A9 db $15, $AD, $01, $A9, $15, $9C, $9B, $04 db $A1, $15, $9C, $00, $A2, $24, $A9, $1A db $AD, $01, $A9, $1A, $AD, $01, $A9, $1A db $A2, $1A, $A9, $1A, $AD, $01, $A9, $1A db $AD, $01, $A9, $1A, $A2, $24, $A9, $15 db $AD, $01, $A9, $1A, $AD, $01, $A9, $1A db $9B, $04, $A1, $1A, $9C, $00, $A4, $24 db $01, $00, $9B, $04, $A5, $01, $9C, $A7 db $01, $00, $66, $66, $66, $66, $66, $66 db $66, $66, $00, $00, $00, $00, $00, $00 db $00, $00, $88, $88, $00, $00, $00, $00 db $00, $00, $00, $00, $00, $00, $00, $00 db $00, $00, $88, $88, $88, $88, $88, $88 db $88, $88, $00, $00, $00, $00, $00, $00 db $00, $00, $88, $88, $88, $88, $00, $00 db $00, $00, $88, $88, $88, $88, $00, $00 db $00, $00, $AA, $AA, $AA, $AA, $AA, $AA db $AA, $AA, $00, $00, $00, $00, $00, $00 db $00, $00, $06, $9B, $CD, $DE, $EE, $FF db $FF, $FE, $06, $9B, $CD, $DE, $EE, $FF db $FF, $FE, $7F, $FF, $57, $73, $55, $34 db $42, $21, $7F, $FF, $57, $73, $55, $34 db $42, $21, $33, $33, $33, $33, $00, $00 db $00, $00, $33, $33, $33, $33, $00, $00 db $00, $00, $11, $11, $11, $11, $00, $00 db $00, $00, $11, $11, $11, $11, $00, $00 db $00, $00, $44, $44, $44, $44, $00, $00 db $00, $00, $44, $44, $44, $44, $00, $00 db $00, $00, $9D, $42, $6E, $20, $00, $9D db $42, $6E, $40, $00, $9D, $52, $6E, $21 db $00, $9D, $52, $6E, $40, $00, $9D, $52 db $6E, $40, $99, $00, $9D, $22, $6E, $20 db $00, $9D, $62, $6E, $20, $00, $9D, $B2 db $6E, $40, $99, $00, $9D, $32, $6E, $21 db $00, $9D, $32, $6E, $25, $00, $9D, $32 db $6E, $40, $00, $9D, $42, $00, $80, $00 db $9D, $53, $00, $80, $00, $9D, $50, $83 db $40, $00, $9D, $60, $81, $80, $00, $9D db $71, $00, $40, $00, $9D, $42, $00, $40 db $00, $9D, $33, $00, $40, $00, $9D, $62 db $00, $80, $00, $9D, $60, $26, $01, $00 db $9D, $60, $26, $81, $00, $9D, $40, $00 db $80, $00, $9D, $20, $00, $80, $00, $9D db $43, $00, $80, $00, $9D, $40, $21, $80 db $00, $9D, $50, $00, $41, $00, $9D, $60 db $21, $41, $00, $9D, $60, $00, $81, $00 db $9D, $90, $21, $41, $00, $9D, $B0, $21 db $41, $00, $9D, $91, $00, $40, $00, $9D db $50, $26, $80, $00, $9D, $30, $21, $80 db $00, $9D, $20, $21, $80, $00, $9D, $60 db $26, $80, $00, $9D, $40, $26, $80, $00 db $9D, $60, $00, $40, $00, $9D, $A0, $21 db $41, $00, $9D, $82, $82, $80, $00, $9D db $77, $00, $80, $00, $9D, $97, $00, $80 db $00, $9D, $51, $82, $80, $00, $9D, $82 db $6E, $01, $94, $00, $9D, $72, $6E, $01 db $94, $00, $9F, $FE, $00, $9F, $00, $00 db $9F, $02, $00, $9F, $0A, $00, $9D, $10 db $00, $80, $00, $9D, $37, $00, $80, $00 db $9D, $43, $83, $80, $00, $9B, $0B, $A5 db $01, $9C, $A4, $01, $00, $9B, $11, $A5 db $01, $9C, $00, $9B, $09, $A5, $01, $9C db $A4, $01, $00, $9B, $09, $A5, $01, $9C db $A4, $01, $00, $A5, $01, $01, $00, $A5 db $01, $00, $A5, $01, $01, $00, $9B, $03 db $A5, $01, $9C, $00, $9B, $04, $A5, $01 db $9C, $00, $9B, $10, $A5, $01, $9C, $00 db $A8, $01, $00, $A6, $01, $00, $A7, $01 db $00, $A1, $01, $00, $A2, $01, $00, $A4 db $01, $00, $A3, $01, $00, $A5, $01, $00 db $DF, $6F, $FF, $FF, $10, $70, $0D, $70 db $FF, $FF, $16, $70, $9E, $3A, $4A, $00 db $9E, $49, $4A, $00, $9E, $67, $4A, $00 db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
alloy4fun_models/trashltl/models/3/4Fp2nghQ9WNijCCQR.als
Kaixi26/org.alloytools.alloy
0
1204
<reponame>Kaixi26/org.alloytools.alloy open main pred id4Fp2nghQ9WNijCCQR_prop4 { always some f: File | eventually f in Trash } pred __repair { id4Fp2nghQ9WNijCCQR_prop4 } check __repair { id4Fp2nghQ9WNijCCQR_prop4 <=> prop4o }
Transynther/x86/_processed/US/_ht_zr_/i9-9900K_12_0xca_notsx.log_6_1823.asm
ljhsiun2/medusa
9
94845
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r13 push %r14 push %r15 push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x1c028, %r11 nop nop nop nop sub %rdi, %rdi mov (%r11), %r15w nop nop and $52199, %r13 lea addresses_UC_ht+0x1b290, %r14 nop nop xor %r10, %r10 vmovups (%r14), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $1, %xmm6, %r15 nop nop nop nop xor %rdi, %rdi lea addresses_UC_ht+0x1a6e8, %r10 clflush (%r10) nop xor $8696, %rdx movl $0x61626364, (%r10) inc %r13 lea addresses_normal_ht+0xcac8, %r13 nop nop nop xor $13464, %r11 mov $0x6162636465666768, %r10 movq %r10, (%r13) nop nop nop nop add $65339, %rdi lea addresses_WT_ht+0x19714, %r13 dec %rdx movups (%r13), %xmm0 vpextrq $0, %xmm0, %r11 nop nop nop nop inc %r13 lea addresses_WT_ht+0x10e08, %rsi lea addresses_D_ht+0x1eec8, %rdi nop nop nop sub %rdx, %rdx mov $1, %rcx rep movsl nop nop xor $18570, %rdx lea addresses_WT_ht+0x5ac8, %rdx nop nop and $50747, %r10 mov $0x6162636465666768, %r14 movq %r14, %xmm4 vmovups %ymm4, (%rdx) nop nop nop nop and %rcx, %rcx lea addresses_UC_ht+0x18ac8, %rsi lea addresses_WT_ht+0x108c8, %rdi nop nop nop dec %r15 mov $43, %rcx rep movsq nop nop nop cmp $5064, %rdi lea addresses_WC_ht+0x11468, %rsi lea addresses_WT_ht+0x1aec8, %rdi xor %r10, %r10 mov $96, %rcx rep movsw xor $30244, %r14 lea addresses_UC_ht+0x1b46a, %rsi lea addresses_WC_ht+0x3148, %rdi nop nop and %rdx, %rdx mov $27, %rcx rep movsl nop nop nop nop nop inc %rdx lea addresses_D_ht+0x1c970, %rdi nop nop nop nop nop and %r15, %r15 movb $0x61, (%rdi) nop nop nop and $61382, %r10 lea addresses_D_ht+0x4fc8, %r11 nop nop nop xor $8145, %r15 and $0xffffffffffffffc0, %r11 vmovntdqa (%r11), %ymm0 vextracti128 $1, %ymm0, %xmm0 vpextrq $1, %xmm0, %r14 nop nop nop inc %r11 lea addresses_normal_ht+0x18c12, %r11 clflush (%r11) nop nop sub %rdx, %rdx mov (%r11), %ecx nop nop nop nop nop add $4670, %r15 lea addresses_D_ht+0x16c8, %r13 nop nop nop nop add %rdx, %rdx mov (%r13), %r10d nop nop nop nop add $46437, %rsi lea addresses_UC_ht+0x5688, %r13 xor $4603, %r15 mov $0x6162636465666768, %r10 movq %r10, (%r13) nop inc %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %r15 pop %r14 pop %r13 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r13 push %r15 push %r9 push %rax push %rsi // Faulty Load lea addresses_US+0x52c8, %r15 nop nop nop nop add %rsi, %rsi vmovups (%r15), %ymm6 vextracti128 $1, %ymm6, %xmm6 vpextrq $0, %xmm6, %r13 lea oracles, %rax and $0xff, %r13 shlq $12, %r13 mov (%rax,%r13,1), %r13 pop %rsi pop %rax pop %r9 pop %r15 pop %r13 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_US', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_US', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 3}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 5}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 10}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 6, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_D_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 9}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_WT_ht'}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 4, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_WT_ht'}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': True, 'AVXalign': False, 'size': 1, 'congruent': 3}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 7}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 1}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 10}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 6}} {'00': 4, '47': 2} 00 00 47 47 00 00 */
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca.log_21829_1471.asm
ljhsiun2/medusa
9
173507
<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r11 push %r15 push %r9 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_normal_ht+0x1d76, %rdi clflush (%rdi) nop dec %rcx mov (%rdi), %ebx nop nop add %rsi, %rsi lea addresses_WT_ht+0xb31a, %rsi nop nop nop nop nop sub $36184, %r15 and $0xffffffffffffffc0, %rsi movntdqa (%rsi), %xmm2 vpextrq $0, %xmm2, %r9 nop nop nop nop and %rdi, %rdi lea addresses_A_ht+0x757a, %r9 and %rbx, %rbx mov $0x6162636465666768, %r15 movq %r15, %xmm1 movups %xmm1, (%r9) nop nop nop nop xor %rbx, %rbx lea addresses_WT_ht+0x75f6, %rbx clflush (%rbx) nop nop nop nop nop dec %r9 movups (%rbx), %xmm1 vpextrq $0, %xmm1, %rsi nop sub %r9, %r9 lea addresses_UC_ht+0x152b6, %r15 nop nop sub $2142, %rcx mov (%r15), %rsi nop nop nop xor %r15, %r15 lea addresses_WC_ht+0x1ed9c, %rsi nop nop nop nop nop add $16517, %r11 movl $0x61626364, (%rsi) nop xor %r15, %r15 lea addresses_normal_ht+0x1a776, %rsi nop dec %r15 mov $0x6162636465666768, %rbx movq %rbx, %xmm5 vmovups %ymm5, (%rsi) nop nop add $34185, %rdi lea addresses_UC_ht+0xab76, %rsi lea addresses_D_ht+0x776, %rdi nop nop nop nop nop xor %rax, %rax mov $102, %rcx rep movsw nop cmp %r9, %r9 pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r9 pop %r15 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r8 push %rcx push %rsi // Faulty Load mov $0x6495750000000f76, %r11 nop dec %r14 mov (%r11), %r8d lea oracles, %rcx and $0xff, %r8 shlq $12, %r8 mov (%rcx,%r8,1), %r8 pop %rsi pop %rcx pop %r8 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_NC', 'same': False, 'AVXalign': False, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_NC', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 8}} {'OP': 'LOAD', 'src': {'size': 16, 'NT': True, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 1}} {'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 2}} {'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 3}} {'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 6}} {'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 1}} {'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 8}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 9}, 'dst': {'same': False, 'type': 'addresses_D_ht', 'congruent': 10}} {'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 */
src/MultiSorted/ModelCategory.agda
cilinder/formaltt
21
9479
open import Agda.Primitive using (_⊔_ ; lsuc ; Level) import Categories.Category as Category import Categories.Category.Cartesian as Cartesian open import Categories.Object.Terminal using (Terminal) open import Categories.Object.Product using (Product) open import MultiSorted.AlgebraicTheory open import MultiSorted.Substitution import MultiSorted.Product as Product import MultiSorted.Interpretation as Interpretation import MultiSorted.Model as Is-Model import MultiSorted.InterpretationCategory as InterpretationCategory module MultiSorted.ModelCategory {ℓt o ℓ e} {𝓈 ℴ} {Σ : Signature {𝓈} {ℴ}} (T : Theory ℓt Σ) {𝒞 : Category.Category o ℓ e} (cartesian-𝒞 : Cartesian.Cartesian 𝒞) where open Signature Σ open Theory T open Category.Category 𝒞 open Interpretation Σ cartesian-𝒞 open Is-Model {o = o} {ℓ = ℓ} {e = e} {Σ = Σ} T -- Useful shortcuts for levels ℓℴ : Level ℓℴ = lsuc (o ⊔ ℓ ⊔ e ⊔ 𝓈 ⊔ ℴ ⊔ ℓt) ℓ𝒽 : Level ℓ𝒽 = ℓ ⊔ o ⊔ e ⊔ 𝓈 ⊔ ℴ ℓ𝓇 : Level ℓ𝓇 = e ⊔ 𝓈 -- New definition of models (as a set, not only a property of interpretations) record Model : Set ℓℴ where field interpretation : Interpretation is-model : Is-Model.Is-Model T interpretation open Model -- Homomorphisms of models _⇒M_ : ∀ (M N : Model) → Set ℓ𝒽 _⇒M_ M N = (interpretation M) ⇒I (interpretation N) -- Equality of homomorphisms of models (the same as for the interpretations) _≈M_ : ∀ {M N : Model} → M ⇒M N → M ⇒M N → Set ℓ𝓇 _≈M_ {M} {N} ϕ ψ = let open _⇒I_ in ∀ A → (hom-morphism ϕ {A}) ≈ (hom-morphism ψ) -- The identity morphism on models id-M : (M : Model) → M ⇒M M id-M = λ M → id-I {interpretation M} -- Composition of morphisms of Models _∘M_ : ∀ {M N O : Model} → N ⇒M O → M ⇒M N → M ⇒M O _∘M_ ϕ ψ = ϕ ∘I ψ -- The category of Models of Σ in 𝒞 ℳ : Category.Category ℓℴ ℓ𝒽 ℓ𝓇 ℳ = record { Obj = Model ; _⇒_ = _⇒M_ ; _≈_ = λ {M} {N} ϕ ψ → _≈M_ {M} {N} ϕ ψ ; id = λ {M} → id-M M ; _∘_ = λ {M} {N} {O} ϕ ψ → _∘M_ {M} {N} {O} ϕ ψ ; assoc = λ A → assoc -- λ A → assoc ; sym-assoc = λ A → sym-assoc ; identityˡ = λ A → identityˡ ; identityʳ = λ A → identityʳ ; identity² = λ A → identity² ; equiv = record { refl = λ A → Equiv.refl ; sym = λ p A → Equiv.sym (p A) ; trans = λ p₁ p₂ A → Equiv.trans (p₁ A) (p₂ A) } ; ∘-resp-≈ = λ p₁ p₂ A → ∘-resp-≈ (p₁ A) (p₂ A) } -- The product of "Model proofs" module _ (M N : Model) where open Product.Producted open HomReasoning open InterpretationCategory open Cartesian.Cartesian cartesian-𝒞 open Interpretation.Interpretation open import Categories.Object.Product.Morphisms {o} {ℓ} {e} 𝒞 open Equation -- A proof that an axiom holds in a product interpretation amounts to a apir of proofs that the axiom holds in each model is-model-pairs : ∀ ε → (interp-term (interpretation M) (Equation.eq-lhs (ax-eq ε)) ⁂ interp-term (interpretation N) (Equation.eq-lhs (ax-eq ε))) ≈ (interp-term (interpretation M) (Equation.eq-rhs (ax-eq ε)) ⁂ interp-term (interpretation N) (Equation.eq-rhs (ax-eq ε))) → Interpretation.interp-term (A×B-ℐ𝓃𝓉 Σ cartesian-𝒞 (interpretation M) (interpretation N)) (Equation.eq-lhs (ax-eq ε)) ≈ Interpretation.interp-term (A×B-ℐ𝓃𝓉 Σ cartesian-𝒞 (interpretation M) (interpretation N)) (Equation.eq-rhs (ax-eq ε)) is-model-pairs ε p = begin Interpretation.interp-term (A×B-ℐ𝓃𝓉 Σ cartesian-𝒞 (interpretation M) (interpretation N)) (Equation.eq-lhs (ax-eq ε)) ≈⟨ ⟺ (Cartesian.Cartesian.unique cartesian-𝒞 (natural-π₁ Σ cartesian-𝒞 {I = interpretation M} {interpretation N} (ax-lhs ε)) (natural-π₂ Σ cartesian-𝒞 {I = interpretation M} {interpretation N} (ax-lhs ε))) ⟩ product.⟨ Interpretation.interp-term (interpretation M) (eq-lhs (ax-eq ε)) ∘ π₁ , Interpretation.interp-term (interpretation N) (eq-lhs (ax-eq ε)) ∘ π₂ ⟩ ≈⟨ ⟨⟩-cong₂ (∘-resp-≈ˡ (Is-Model.model-eq (is-model M) ε)) (∘-resp-≈ˡ (Is-Model.model-eq (is-model N) ε)) ⟩ product.⟨ Interpretation.interp-term (interpretation M) (eq-rhs (ax-eq ε)) ∘ π₁ , Interpretation.interp-term (interpretation N) (eq-rhs (ax-eq ε)) ∘ π₂ ⟩ ≈⟨ Cartesian.Cartesian.unique cartesian-𝒞 (natural-π₁ Σ cartesian-𝒞 {I = interpretation M} {interpretation N} (ax-rhs ε)) (natural-π₂ Σ cartesian-𝒞 {I = interpretation M} {interpretation N} (ax-rhs ε)) ⟩ Interpretation.interp-term (A×B-ℐ𝓃𝓉 Σ cartesian-𝒞 (interpretation M) (interpretation N)) (eq-rhs (ax-eq ε)) ∎ -- The proof that the product interpetation of two models is a model is-model-product : Is-Model (A×B-ℐ𝓃𝓉 Σ cartesian-𝒞 (interpretation M) (interpretation N)) Is-Model.model-eq is-model-product ε = begin Interpretation.interp-term (A×B-ℐ𝓃𝓉 Σ cartesian-𝒞 (interpretation M) (interpretation N)) (Equation.eq-lhs (ax-eq ε)) ≈⟨ is-model-pairs ε (⁂-cong₂ (Is-Model.model-eq (is-model M) ε) (Is-Model.model-eq (is-model N) ε)) ⟩ Interpretation.interp-term (A×B-ℐ𝓃𝓉 Σ cartesian-𝒞 (interpretation M) (interpretation N)) (Equation.eq-rhs (ax-eq ε)) ∎ -- The product of ℐ𝓃𝓉 carries over the models : the product of two models is a model module _ (M N : Model) where open Product.Producted open HomReasoning open InterpretationCategory A×B-ℳ : Model A×B-ℳ = record { interpretation = A×B-ℐ𝓃𝓉 Σ cartesian-𝒞 (interpretation M) (interpretation N) ; is-model = is-model-product M N } -- The cartesian structure of the category of models module _ {M N : Model} where import Categories.Object.Product.Core open Categories.Object.Product.Core.Product open InterpretationCategory Σ cartesian-𝒞 private UM UN : Interpretation UM = interpretation M UN = interpretation N UM×UN : Product ℐ𝓃𝓉 UM UN UM×UN = product-ℐ𝓃𝓉 product-ℳ : Product ℳ M N -- Structure A×B product-ℳ = A×B-ℳ M N π₁ product-ℳ = π₁ UM×UN π₂ product-ℳ = π₂ UM×UN ⟨_,_⟩ product-ℳ = ⟨_,_⟩ UM×UN -- Properties project₁ product-ℳ {O} {h} {i} = project₁ UM×UN {interpretation O} {h} {i} project₂ product-ℳ {O} {h} {i} = project₂ UM×UN {interpretation O} {h} {i} unique product-ℳ {O} {h} {i} {j} = unique UM×UN {interpretation O} {h} {i} {j}
src/sparknacl-core.adb
yannickmoy/SPARKNaCl
76
1150
<reponame>yannickmoy/SPARKNaCl<gh_stars>10-100 package body SPARKNaCl.Core with SPARK_Mode => On is pragma Warnings (GNATProve, Off, "pragma * ignored (not yet supported)"); --=============================== -- Local subprogram declarations -- and renamings --=============================== function RL32 (X : in U32; C : in Natural) return U32 renames Rotate_Left; procedure ST32 (X : out Bytes_4; U : in U32) with Global => null; function LD32 (X : in Bytes_4) return U32 with Global => null; -- Derives intermediate values X and Y from Input, K and C. -- Common to both Salsa20 and HSalsa20 procedure Core_Common (Input : in Bytes_16; K : in Salsa20_Key; C : in Bytes_16; X : out U32_Seq_16; Y : out U32_Seq_16) with Global => null; --=============================== -- Local subprogram bodies --=============================== procedure ST32 (X : out Bytes_4; U : in U32) is T : U32 := U; begin for I in X'Range loop pragma Loop_Optimize (No_Unroll); X (I) := Byte (T mod 256); T := Shift_Right (T, 8); end loop; end ST32; function LD32 (X : in Bytes_4) return U32 is U : U32; begin U := U32 (X (3)); U := Shift_Left (U, 8) or U32 (X (2)); U := Shift_Left (U, 8) or U32 (X (1)); return Shift_Left (U, 8) or U32 (X (0)); end LD32; procedure Core_Common (Input : in Bytes_16; K : in Salsa20_Key; C : in Bytes_16; X : out U32_Seq_16; Y : out U32_Seq_16) is W : U32_Seq_16; T : U32_Seq_4; -- Common to all iterations of the inner loop, -- so factored out here. procedure Adjust_T with Global => (In_Out => T); procedure Adjust_T is begin T (1) := T (1) xor RL32 (T (0) + T (3), 7); T (2) := T (2) xor RL32 (T (1) + T (0), 9); T (3) := T (3) xor RL32 (T (2) + T (1), 13); T (0) := T (0) xor RL32 (T (3) + T (2), 18); end Adjust_T; begin W := (others => 0); -- In C this is a loop, but we unroll and make single -- aggregate assignment to initialize the whole of X. X := (0 => LD32 (C (0 .. 3)), 1 => LD32 (Bytes_4 (K.F (0 .. 3))), 6 => LD32 (Input (0 .. 3)), 11 => LD32 (Bytes_4 (K.F (16 .. 19))), 5 => LD32 (C (4 .. 7)), 2 => LD32 (Bytes_4 (K.F (4 .. 7))), 7 => LD32 (Input (4 .. 7)), 12 => LD32 (Bytes_4 (K.F (20 .. 23))), 10 => LD32 (C (8 .. 11)), 3 => LD32 (Bytes_4 (K.F (8 .. 11))), 8 => LD32 (Input (8 .. 11)), 13 => LD32 (Bytes_4 (K.F (24 .. 27))), 15 => LD32 (C (12 .. 15)), 4 => LD32 (Bytes_4 (K.F (12 .. 15))), 9 => LD32 (Input (12 .. 15)), 14 => LD32 (Bytes_4 (K.F (28 .. 31)))); Y := X; for I in Index_20 loop pragma Loop_Optimize (No_Unroll); -- This inner loop has been unrolled manually and -- simplified in SPARKNaCl. -- -- ORIGINAL CODE: -- for J in Index_4 loop -- T := (0 => X ((5 * J) mod 16), -- 1 => X ((5 * J + 4) mod 16), -- 2 => X ((5 * J + 8) mod 16), -- 3 => X ((5 * J + 12) mod 16)); -- T (1) := T (1) xor RL32 (T (0) + T (3), 7); -- T (2) := T (2) xor RL32 (T (1) + T (0), 9); -- T (3) := T (3) xor RL32 (T (2) + T (1), 13); -- T (0) := T (0) xor RL32 (T (3) + T (2), 18); -- W (4 * J + ((J + 0) mod 4)) := T (0); -- W (4 * J + ((J + 1) mod 4)) := T (1); -- W (4 * J + ((J + 2) mod 4)) := T (2); -- W (4 * J + ((J + 3) mod 4)) := T (3); -- end loop; -- Begin loop unrolling -- -- Iteration with J = 0 -- T := (0 => X (0), 1 => X (4), 2 => X (8), 3 => X (12)); Adjust_T; W (0) := T (0); W (1) := T (1); W (2) := T (2); W (3) := T (3); -- Iteration with J = 1 -- T := (0 => X (5), 1 => X (9), 2 => X (13), 3 => X (1)); Adjust_T; W (5) := T (0); W (6) := T (1); W (7) := T (2); W (4) := T (3); -- Iteration with J = 2 -- T := (0 => X (10), 1 => X (14), 2 => X (2), 3 => X (6)); Adjust_T; W (10) := T (0); W (11) := T (1); W (8) := T (2); W (9) := T (3); -- Iteration with J = 3 -- T := (0 => X (15), 1 => X (3), 2 => X (7), 3 => X (11)); Adjust_T; W (15) := T (0); W (12) := T (1); W (13) := T (2); W (14) := T (3); -- End loop unrolling -- X := W; end loop; end Core_Common; -------------------------------------------------------- -- Exported suprogram bodies -------------------------------------------------------- function Construct (K : in Bytes_32) return Salsa20_Key is begin return Salsa20_Key'(F => K); end Construct; procedure Construct (K : out Salsa20_Key; X : in Bytes_32) is begin K.F := X; end Construct; function Serialize (K : in Salsa20_Key) return Bytes_32 is begin return K.F; end Serialize; procedure Sanitize (K : out Salsa20_Key) is begin Sanitize (K.F); end Sanitize; -------------------------------------------------------- -- Salsa20 Core subprograms -------------------------------------------------------- procedure Salsa20 (Output : out Bytes_64; Input : in Bytes_16; K : in Salsa20_Key; C : in Bytes_16) is X, Y : U32_Seq_16; begin Core_Common (Input, K, C, X, Y); -- Salsa20 Output stage -- derives Output from X, Y Output := (others => 0); for I in Index_16 loop pragma Loop_Optimize (No_Unroll); ST32 (Output (4 * I .. 4 * I + 3), X (I) + Y (I)); end loop; end Salsa20; procedure HSalsa20 (Output : out Bytes_32; Input : in Bytes_16; K : in Salsa20_Key; C : in Bytes_16) is X, Y : U32_Seq_16; begin Core_Common (Input, K, C, X, Y); -- HSalsa20 output stage -- derives Output from X, Y, C, Input for I in Index_16 loop pragma Loop_Optimize (No_Unroll); X (I) := X (I) + Y (I); end loop; for I in Index_4 loop pragma Loop_Optimize (No_Unroll); X (5 * I) := X (5 * I) - LD32 (C (4 * I .. 4 * I + 3)); X (6 + I) := X (6 + I) - LD32 (Input (4 * I .. 4 * I + 3)); end loop; Output := (others => 0); for I in Index_4 loop pragma Loop_Optimize (No_Unroll); ST32 (Output (4 * I .. 4 * I + 3), X (5 * I)); ST32 (Output (4 * I + 16 .. 4 * I + 19), X (6 + I)); end loop; end HSalsa20; end SPARKNaCl.Core;
oeis/089/A089802.asm
neoneye/loda-programs
11
174522
; A089802: Expansion of q^(-1/3) * (theta_4(q^3) - theta_4(q^(1/3))) / 2 in powers of q. ; Submitted by <NAME> ; 1,-1,0,0,0,-1,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,1,0,0,0 mov $2,-1 pow $2,$0 seq $0,89801 ; a(n) = 0 unless n = 3j^2+2j or 3j^2+4j+1 for some j>=0, in which case a(n) = 1. mul $0,$2
libsrc/_DEVELOPMENT/env/esxdos/c/sdcc_iy/tmpnam_ex.asm
jpoikela/z88dk
640
177470
; char *tmpnam_ex(char *template) SECTION code_env PUBLIC _tmpnam_ex EXTERN _tmpnam_ex_fastcall _tmpnam_ex: pop af pop hl push hl push af jp _tmpnam_ex_fastcall
sharding-core/src/main/antlr4/imports/MySQLCreateTable.g4
shaojie925/incubator-shardingsphere
0
315
grammar MySQLCreateTable; import MySQLKeyword, Keyword, MySQLSelectStatement, MySQLTableBase, MySQLBase, BaseRule, DataType, Symbol; createTable : CREATE TEMPORARY? TABLE (IF NOT EXISTS)? tableName createTableOptions ; createTableOptions : createTableBasic | createTableSelect | createTableLike ; createTableBasic : createDefinitionsWithParen tableOptions? partitionOptions? ; createDefinitionsWithParen : LP_ createDefinitions RP_ ; createDefinitions : createDefinition (COMMA createDefinition)* ; createDefinition : columnDefinition | constraintDefinition | indexDefinition | checkExpr ; checkExpr : CHECK expr ; createTableSelect : createDefinitionsWithParen? tableOptions? partitionOptions? (IGNORE | REPLACE)? AS? unionSelect ; createTableLike : likeTable | LP_ likeTable RP_ ; likeTable : LIKE tableName ;
sources/md/markdown-link_reference_definitions.adb
reznikmm/markdown
0
29040
<reponame>reznikmm/markdown -- SPDX-FileCopyrightText: 2020 <NAME> <<EMAIL>> -- -- SPDX-License-Identifier: MIT ---------------------------------------------------------------- with League.Regexps; with Markdown.Common_Patterns; with Markdown.Visitors; package body Markdown.Link_Reference_Definitions is function "+" (Text : Wide_Wide_String) return League.Regexps.Regexp_Pattern is (League.Regexps.Compile (League.Strings.To_Universal_String (Text))); Blank_Pattern : League.Regexps.Regexp_Pattern renames Markdown.Common_Patterns.Blank_Pattern; Link_Label : Wide_Wide_String renames Markdown.Common_Patterns.Link_Label; -- Groups: 2 Link_Title : Wide_Wide_String renames Markdown.Common_Patterns.Link_Title; -- Groups: 4 Label_Pattern : constant League.Regexps.Regexp_Pattern := +("^\ {0,3}(" & Link_Label & ")\:" & -- Grps:1 2,3 "[\ \t\n\v\f\r\>]*" ); Space_Pattern : constant League.Regexps.Regexp_Pattern := +("^[\ \t\n\v\f\r\>]*"); Title_Pattern : constant League.Regexps.Regexp_Pattern := +("^[\ \t\n\v\f\r\>]*(" & Link_Title & ")?[\ \t\n\v\f\r\>]*$"); -- Groups: 1 2,3,4,5 Title_Close_Group : constant array (Positive range 1 .. 3) of Positive := (2, 3, 5); -- Close title group numbers ----------------- -- Append_Line -- ----------------- overriding procedure Append_Line (Self : in out Link_Reference_Definition; Line : Markdown.Blocks.Text_Line; CIP : Can_Interrupt_Paragraph; Ok : in out Boolean) is pragma Unreferenced (CIP); Last : Natural; Text : League.Strings.Universal_String := Line.Line; Match : League.Regexps.Regexp_Match; begin if Self.Has_Title then Ok := False; elsif not Self.Has_URL then Match := Space_Pattern.Find_Match (Text); pragma Assert (Match.Is_Matched); Text := Text.Tail_From (Match.Last_Index + 1); -- drop spaces Markdown.Common_Patterns.Parse_Link_Destination (Line => Text, Last => Last, URL => Self.URL); Self.Has_URL := Last > 0; if Last = 0 then Ok := False; elsif Last = Text.Length then Ok := True; else Text := Text.Tail_From (Last + 1); -- drop link dest Match := Title_Pattern.Find_Match (Text); Ok := Match.Is_Matched; if Ok then Self.Has_Title := (for some J of Title_Close_Group => Match.Last_Index (J) >= Match.First_Index (J)); Text := Match.Capture (1); if Self.Has_Title then Self.Title.Append (Text.Slice (2, Text.Length - 1)); elsif not Text.Is_Empty then Self.Start := Text (1).To_Wide_Wide_Character; Self.Title.Append (Text.Tail_From (2)); end if; else null; -- FIXME: Turn the block into a paragraph? end if; end if; elsif Self.Title.Is_Empty then Match := Title_Pattern.Find_Match (Text); Ok := Match.Is_Matched; if Ok then Self.Has_Title := (for some J of Title_Close_Group => Match.Last_Index (J) >= Match.First_Index (J)); Text := Match.Capture (1); if Self.Has_Title then Self.Title.Append (Text.Slice (2, Text.Length - 1)); elsif not Text.Is_Empty then Self.Start := Text (1).To_Wide_Wide_Character; Self.Title.Append (Text.Tail_From (2)); end if; else null; -- FIXME: Turn the block into a paragraph? end if; elsif Blank_Pattern.Find_Match (Text).Is_Matched then Ok := False; null; -- FIXME: Turn the block into a paragraph? else declare Escape : Boolean := False; To : Natural := 0; Stop : constant Wide_Wide_Character := (if Self.Start = '(' then ')' else Self.Start); begin for J in 1 .. Text.Length loop if Escape then Escape := False; elsif Text (J).To_Wide_Wide_Character = '\' then Escape := True; elsif Text (J).To_Wide_Wide_Character = Stop then Self.Has_Title := True; To := J; exit; end if; end loop; Ok := not Escape and then To in 0 | Text.Length; if Self.Has_Title and To > 1 then Self.Title.Append (Text.Tail_From (To - 1)); elsif Ok then Self.Title.Append (Text); else null; -- FIXME: Turn the block into a paragraph? end if; end; end if; end Append_Line; ------------ -- Create -- ------------ overriding function Create (Line : not null access Markdown.Blocks.Text_Line) return Link_Reference_Definition is Last : Natural; Text : League.Strings.Universal_String := Line.Line; Match : League.Regexps.Regexp_Match := Label_Pattern.Find_Match (Text); begin pragma Assert (Match.Is_Matched); return Self : Link_Reference_Definition do Self.Label := Match.Capture (1); if Match.Last_Index < Text.Length then Text := Text.Tail_From (Match.Last_Index + 1); -- drop label Markdown.Common_Patterns.Parse_Link_Destination (Line => Text, Last => Last, URL => Self.URL); Self.Has_URL := Last > 0; pragma Assert (Last > 0); if Last < Text.Length then Text := Text.Tail_From (Last + 1); -- drop link dest Match := Title_Pattern.Find_Match (Text); Self.Has_Title := (for some J of Title_Close_Group => Match.Last_Index (J) >= Match.First_Index (J)); Text := Match.Capture (1); if Self.Has_Title then Self.Title.Append (Text.Slice (2, Text.Length - 1)); elsif not Text.Is_Empty then Self.Start := Text (1).To_Wide_Wide_Character; Self.Title.Append (Text.Tail_From (2)); end if; end if; end if; Line.Line.Clear; end return; end Create; ----------------- -- Destination -- ----------------- function Destination (Self : Link_Reference_Definition'Class) return League.Strings.Universal_String is begin return Self.URL; end Destination; ------------ -- Filter -- ------------ procedure Filter (Line : Markdown.Blocks.Text_Line; Tag : in out Ada.Tags.Tag; CIP : out Can_Interrupt_Paragraph) is Ignore : League.Strings.Universal_String; Last : Natural; Text : League.Strings.Universal_String := Line.Line; Match : constant League.Regexps.Regexp_Match := Label_Pattern.Find_Match (Line.Line); begin CIP := False; if Match.Is_Matched then if Match.Last_Index < Text.Length then Text := Text.Tail_From (Match.Last_Index + 1); -- drop label Markdown.Common_Patterns.Parse_Link_Destination (Line => Text, Last => Last, URL => Ignore); if Last = 0 then return; -- Wrong link destination elsif Last < Text.Length then Text := Text.Tail_From (Last + 1); -- drop link dest if not Title_Pattern.Find_Match (Text).Is_Matched then return; -- Wrong link title end if; end if; end if; Tag := Link_Reference_Definition'Tag; end if; end Filter; ----------- -- Label -- ----------- function Label (Self : Link_Reference_Definition'Class) return League.Strings.Universal_String is begin return Self.Label; end Label; ----------- -- Title -- ----------- function Title (Self : Link_Reference_Definition'Class) return League.String_Vectors.Universal_String_Vector is begin return Self.Title; end Title; ----------- -- Visit -- ----------- overriding procedure Visit (Self : in out Link_Reference_Definition; Visitor : in out Markdown.Visitors.Visitor'Class) is begin Visitor.Link_Reference_Definition (Self); end Visit; end Markdown.Link_Reference_Definitions;
test/Fail/Issue1609-negative-literal.agda
shlevy/agda
1,989
13609
<filename>test/Fail/Issue1609-negative-literal.agda -- Andreas, 2015-07-13 Better parse errors for illegal type signatures -1 : Set1 -1 = Set
regtests/server/src/testapi-servers.ads
jquorning/swagger-ada
17
24124
-- REST API Validation -- API to validate -- ------------ EDIT NOTE ------------ -- This file was generated with swagger-codegen. You can modify it to implement -- the server. After you modify this file, you should add the following line -- to the .swagger-codegen-ignore file: -- -- src/testapi-servers.ads -- -- Then, you can drop this edit note comment. -- ------------ EDIT NOTE ------------ with Swagger.Servers; with TestAPI.Models; with TestAPI.Skeletons; package TestAPI.Servers is use TestAPI.Models; type Server_Type is limited new TestAPI.Skeletons.Server_Type with record Todos : TestAPI.Models.Ticket_Type_Vectors.Vector; Last_Id : Swagger.Long := 0; end record; -- Create a ticket overriding procedure Do_Create_Ticket (Server : in out Server_Type; Title : in Swagger.UString; Owner : in Swagger.Nullable_UString; Status : in Swagger.Nullable_UString; Description : in Swagger.Nullable_UString; Context : in out Swagger.Servers.Context_Type); -- Delete a ticket overriding procedure Do_Delete_Ticket (Server : in out Server_Type; Tid : in Swagger.Long; Context : in out Swagger.Servers.Context_Type); -- Patch a ticket overriding procedure Do_Patch_Ticket (Server : in out Server_Type; Tid : in Swagger.Long; Owner : in Swagger.Nullable_UString; Status : in Swagger.Nullable_UString; Title : in Swagger.Nullable_UString; Description : in Swagger.Nullable_UString; Result : out TestAPI.Models.Ticket_Type; Context : in out Swagger.Servers.Context_Type); -- Update a ticket overriding procedure Do_Update_Ticket (Server : in out Server_Type; Tid : in Swagger.Long; Owner : in Swagger.Nullable_UString; Status : in Swagger.Nullable_UString; Title : in Swagger.Nullable_UString; Description : in Swagger.Nullable_UString; Result : out TestAPI.Models.Ticket_Type; Context : in out Swagger.Servers.Context_Type); -- Get a ticket -- Get a ticket overriding procedure Do_Get_Ticket (Server : in out Server_Type; Tid : in Swagger.Long; Result : out TestAPI.Models.Ticket_Type; Context : in out Swagger.Servers.Context_Type); -- Options the tickets -- List the tickets created for the project. overriding procedure Do_Options_Ticket (Server : in out Server_Type; Tid : in Swagger.Long; Result : out TestAPI.Models.Ticket_Type; Context : in out Swagger.Servers.Context_Type); -- List the tickets overriding procedure Do_Head_Ticket (Server : in out Server_Type; Context : in out Swagger.Servers.Context_Type); -- List the tickets -- List the tickets created for the project. overriding procedure Do_List_Tickets (Server : in out Server_Type; Status : in Swagger.Nullable_UString; Owner : in Swagger.Nullable_UString; Result : out TestAPI.Models.Ticket_Type_Vectors.Vector; Context : in out Swagger.Servers.Context_Type); -- -- Query an orchestrated service instance overriding procedure Orch_Store (Server : in out Server_Type; Body2_Type : in InlineObject3_Type; Context : in out Swagger.Servers.Context_Type); package Server_Impl is new TestAPI.Skeletons.Shared_Instance (Server_Type); end TestAPI.Servers;
csgocheat/CV/Via ASM module/VirtualizerSDKCustomVmMacros.asm
garryhvh420/e_xyz
0
11186
<reponame>garryhvh420/e_xyz ; **************************************************************************** ; Module: VirtualizerSDKCustomVmMacros.asm ; Description: Another way to link with the SecureEngine SDK via an ASM module ; ; Author/s: <NAME> ; (c) 2015 <NAME> ; ; --- File generated automatically from Oreans VM Generator (16/6/2015) --- ; **************************************************************************** IFDEF RAX ELSE .586 .model flat,stdcall option casemap:none ENDIF ; **************************************************************************** ; Constants ; **************************************************************************** .CONST ; **************************************************************************** ; Data Segment ; **************************************************************************** .DATA ; **************************************************************************** ; Code Segment ; **************************************************************************** .CODE IFDEF RAX ; **************************************************************************** ; VIRTUALIZER_TIGER_WHITE definition ; **************************************************************************** VIRTUALIZER_TIGER_WHITE_START_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 103 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_TIGER_WHITE_START_ASM64 ENDP VIRTUALIZER_TIGER_WHITE_END_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 503 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_TIGER_WHITE_END_ASM64 ENDP ; **************************************************************************** ; VIRTUALIZER_TIGER_RED definition ; **************************************************************************** VIRTUALIZER_TIGER_RED_START_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 104 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_TIGER_RED_START_ASM64 ENDP VIRTUALIZER_TIGER_RED_END_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 504 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_TIGER_RED_END_ASM64 ENDP ; **************************************************************************** ; VIRTUALIZER_TIGER_BLACK definition ; **************************************************************************** VIRTUALIZER_TIGER_BLACK_START_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 105 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_TIGER_BLACK_START_ASM64 ENDP VIRTUALIZER_TIGER_BLACK_END_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 505 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_TIGER_BLACK_END_ASM64 ENDP ; **************************************************************************** ; VIRTUALIZER_FISH_WHITE definition ; **************************************************************************** VIRTUALIZER_FISH_WHITE_START_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 107 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_FISH_WHITE_START_ASM64 ENDP VIRTUALIZER_FISH_WHITE_END_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 507 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_FISH_WHITE_END_ASM64 ENDP ; **************************************************************************** ; VIRTUALIZER_FISH_RED definition ; **************************************************************************** VIRTUALIZER_FISH_RED_START_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 109 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_FISH_RED_START_ASM64 ENDP VIRTUALIZER_FISH_RED_END_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 509 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_FISH_RED_END_ASM64 ENDP ; **************************************************************************** ; VIRTUALIZER_FISH_BLACK definition ; **************************************************************************** VIRTUALIZER_FISH_BLACK_START_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 111 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_FISH_BLACK_START_ASM64 ENDP VIRTUALIZER_FISH_BLACK_END_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 511 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_FISH_BLACK_END_ASM64 ENDP ; **************************************************************************** ; VIRTUALIZER_PUMA_WHITE definition ; **************************************************************************** VIRTUALIZER_PUMA_WHITE_START_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 113 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_PUMA_WHITE_START_ASM64 ENDP VIRTUALIZER_PUMA_WHITE_END_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 513 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_PUMA_WHITE_END_ASM64 ENDP ; **************************************************************************** ; VIRTUALIZER_PUMA_RED definition ; **************************************************************************** VIRTUALIZER_PUMA_RED_START_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 115 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_PUMA_RED_START_ASM64 ENDP VIRTUALIZER_PUMA_RED_END_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 515 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_PUMA_RED_END_ASM64 ENDP ; **************************************************************************** ; VIRTUALIZER_PUMA_BLACK definition ; **************************************************************************** VIRTUALIZER_PUMA_BLACK_START_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 117 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_PUMA_BLACK_START_ASM64 ENDP VIRTUALIZER_PUMA_BLACK_END_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 517 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_PUMA_BLACK_END_ASM64 ENDP ; **************************************************************************** ; VIRTUALIZER_SHARK_WHITE definition ; **************************************************************************** VIRTUALIZER_SHARK_WHITE_START_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 119 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_SHARK_WHITE_START_ASM64 ENDP VIRTUALIZER_SHARK_WHITE_END_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 519 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_SHARK_WHITE_END_ASM64 ENDP ; **************************************************************************** ; VIRTUALIZER_SHARK_RED definition ; **************************************************************************** VIRTUALIZER_SHARK_RED_START_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 121 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_SHARK_RED_START_ASM64 ENDP VIRTUALIZER_SHARK_RED_END_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 521 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_SHARK_RED_END_ASM64 ENDP ; **************************************************************************** ; VIRTUALIZER_SHARK_BLACK definition ; **************************************************************************** VIRTUALIZER_SHARK_BLACK_START_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 123 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_SHARK_BLACK_START_ASM64 ENDP VIRTUALIZER_SHARK_BLACK_END_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 523 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_SHARK_BLACK_END_ASM64 ENDP ; **************************************************************************** ; VIRTUALIZER_DOLPHIN_WHITE definition ; **************************************************************************** VIRTUALIZER_DOLPHIN_WHITE_START_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 135 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_DOLPHIN_WHITE_START_ASM64 ENDP VIRTUALIZER_DOLPHIN_WHITE_END_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 535 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_DOLPHIN_WHITE_END_ASM64 ENDP ; **************************************************************************** ; VIRTUALIZER_DOLPHIN_RED definition ; **************************************************************************** VIRTUALIZER_DOLPHIN_RED_START_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 137 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_DOLPHIN_RED_START_ASM64 ENDP VIRTUALIZER_DOLPHIN_RED_END_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 537 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_DOLPHIN_RED_END_ASM64 ENDP ; **************************************************************************** ; VIRTUALIZER_DOLPHIN_BLACK definition ; **************************************************************************** VIRTUALIZER_DOLPHIN_BLACK_START_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 139 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_DOLPHIN_BLACK_START_ASM64 ENDP VIRTUALIZER_DOLPHIN_BLACK_END_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 539 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_DOLPHIN_BLACK_END_ASM64 ENDP ; **************************************************************************** ; VIRTUALIZER_EAGLE_WHITE definition ; **************************************************************************** VIRTUALIZER_EAGLE_WHITE_START_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 147 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_EAGLE_WHITE_START_ASM64 ENDP VIRTUALIZER_EAGLE_WHITE_END_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 547 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_EAGLE_WHITE_END_ASM64 ENDP ; **************************************************************************** ; VIRTUALIZER_EAGLE_RED definition ; **************************************************************************** VIRTUALIZER_EAGLE_RED_START_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 149 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_EAGLE_RED_START_ASM64 ENDP VIRTUALIZER_EAGLE_RED_END_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 549 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_EAGLE_RED_END_ASM64 ENDP ; **************************************************************************** ; VIRTUALIZER_EAGLE_BLACK definition ; **************************************************************************** VIRTUALIZER_EAGLE_BLACK_START_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 151 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_EAGLE_BLACK_START_ASM64 ENDP VIRTUALIZER_EAGLE_BLACK_END_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 551 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_EAGLE_BLACK_END_ASM64 ENDP ; **************************************************************************** ; VIRTUALIZER_MUTATE_ONLY definition ; **************************************************************************** VIRTUALIZER_MUTATE_ONLY_START_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 16 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_MUTATE_ONLY_START_ASM64 ENDP VIRTUALIZER_MUTATE_ONLY_END_ASM64 PROC push rax push rbx push rcx mov eax, 'CV' mov ebx, 17 mov ecx, 'CV' add ebx, eax add ecx, eax pop rcx pop rbx pop rax ret VIRTUALIZER_MUTATE_ONLY_END_ASM64 ENDP ELSE ; **************************************************************************** ; VIRTUALIZER_TIGER_WHITE definition ; **************************************************************************** VIRTUALIZER_TIGER_WHITE_START_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 100 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_TIGER_WHITE_START_ASM32 ENDP VIRTUALIZER_TIGER_WHITE_END_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 500 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_TIGER_WHITE_END_ASM32 ENDP ; **************************************************************************** ; VIRTUALIZER_TIGER_RED definition ; **************************************************************************** VIRTUALIZER_TIGER_RED_START_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 101 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_TIGER_RED_START_ASM32 ENDP VIRTUALIZER_TIGER_RED_END_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 501 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_TIGER_RED_END_ASM32 ENDP ; **************************************************************************** ; VIRTUALIZER_TIGER_BLACK definition ; **************************************************************************** VIRTUALIZER_TIGER_BLACK_START_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 102 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_TIGER_BLACK_START_ASM32 ENDP VIRTUALIZER_TIGER_BLACK_END_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 502 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_TIGER_BLACK_END_ASM32 ENDP ; **************************************************************************** ; VIRTUALIZER_FISH_WHITE definition ; **************************************************************************** VIRTUALIZER_FISH_WHITE_START_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 106 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_FISH_WHITE_START_ASM32 ENDP VIRTUALIZER_FISH_WHITE_END_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 506 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_FISH_WHITE_END_ASM32 ENDP ; **************************************************************************** ; VIRTUALIZER_FISH_RED definition ; **************************************************************************** VIRTUALIZER_FISH_RED_START_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 108 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_FISH_RED_START_ASM32 ENDP VIRTUALIZER_FISH_RED_END_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 508 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_FISH_RED_END_ASM32 ENDP ; **************************************************************************** ; VIRTUALIZER_FISH_BLACK definition ; **************************************************************************** VIRTUALIZER_FISH_BLACK_START_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 110 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_FISH_BLACK_START_ASM32 ENDP VIRTUALIZER_FISH_BLACK_END_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 510 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_FISH_BLACK_END_ASM32 ENDP ; **************************************************************************** ; VIRTUALIZER_PUMA_WHITE definition ; **************************************************************************** VIRTUALIZER_PUMA_WHITE_START_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 112 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_PUMA_WHITE_START_ASM32 ENDP VIRTUALIZER_PUMA_WHITE_END_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 512 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_PUMA_WHITE_END_ASM32 ENDP ; **************************************************************************** ; VIRTUALIZER_PUMA_RED definition ; **************************************************************************** VIRTUALIZER_PUMA_RED_START_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 114 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_PUMA_RED_START_ASM32 ENDP VIRTUALIZER_PUMA_RED_END_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 514 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_PUMA_RED_END_ASM32 ENDP ; **************************************************************************** ; VIRTUALIZER_PUMA_BLACK definition ; **************************************************************************** VIRTUALIZER_PUMA_BLACK_START_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 116 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_PUMA_BLACK_START_ASM32 ENDP VIRTUALIZER_PUMA_BLACK_END_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 516 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_PUMA_BLACK_END_ASM32 ENDP ; **************************************************************************** ; VIRTUALIZER_SHARK_WHITE definition ; **************************************************************************** VIRTUALIZER_SHARK_WHITE_START_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 118 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_SHARK_WHITE_START_ASM32 ENDP VIRTUALIZER_SHARK_WHITE_END_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 518 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_SHARK_WHITE_END_ASM32 ENDP ; **************************************************************************** ; VIRTUALIZER_SHARK_RED definition ; **************************************************************************** VIRTUALIZER_SHARK_RED_START_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 120 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_SHARK_RED_START_ASM32 ENDP VIRTUALIZER_SHARK_RED_END_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 520 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_SHARK_RED_END_ASM32 ENDP ; **************************************************************************** ; VIRTUALIZER_SHARK_BLACK definition ; **************************************************************************** VIRTUALIZER_SHARK_BLACK_START_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 122 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_SHARK_BLACK_START_ASM32 ENDP VIRTUALIZER_SHARK_BLACK_END_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 522 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_SHARK_BLACK_END_ASM32 ENDP ; **************************************************************************** ; VIRTUALIZER_DOLPHIN_WHITE definition ; **************************************************************************** VIRTUALIZER_DOLPHIN_WHITE_START_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 134 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_DOLPHIN_WHITE_START_ASM32 ENDP VIRTUALIZER_DOLPHIN_WHITE_END_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 534 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_DOLPHIN_WHITE_END_ASM32 ENDP ; **************************************************************************** ; VIRTUALIZER_DOLPHIN_RED definition ; **************************************************************************** VIRTUALIZER_DOLPHIN_RED_START_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 136 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_DOLPHIN_RED_START_ASM32 ENDP VIRTUALIZER_DOLPHIN_RED_END_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 536 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_DOLPHIN_RED_END_ASM32 ENDP ; **************************************************************************** ; VIRTUALIZER_DOLPHIN_BLACK definition ; **************************************************************************** VIRTUALIZER_DOLPHIN_BLACK_START_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 138 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_DOLPHIN_BLACK_START_ASM32 ENDP VIRTUALIZER_DOLPHIN_BLACK_END_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 538 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_DOLPHIN_BLACK_END_ASM32 ENDP ; **************************************************************************** ; VIRTUALIZER_EAGLE_WHITE definition ; **************************************************************************** VIRTUALIZER_EAGLE_WHITE_START_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 146 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_EAGLE_WHITE_START_ASM32 ENDP VIRTUALIZER_EAGLE_WHITE_END_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 546 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_EAGLE_WHITE_END_ASM32 ENDP ; **************************************************************************** ; VIRTUALIZER_EAGLE_RED definition ; **************************************************************************** VIRTUALIZER_EAGLE_RED_START_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 148 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_EAGLE_RED_START_ASM32 ENDP VIRTUALIZER_EAGLE_RED_END_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 548 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_EAGLE_RED_END_ASM32 ENDP ; **************************************************************************** ; VIRTUALIZER_EAGLE_BLACK definition ; **************************************************************************** VIRTUALIZER_EAGLE_BLACK_START_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 150 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_EAGLE_BLACK_START_ASM32 ENDP VIRTUALIZER_EAGLE_BLACK_END_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 550 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_EAGLE_BLACK_END_ASM32 ENDP ; **************************************************************************** ; VIRTUALIZER_MUTATE_ONLY definition ; **************************************************************************** VIRTUALIZER_MUTATE_ONLY_START_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 16 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_MUTATE_ONLY_START_ASM32 ENDP VIRTUALIZER_MUTATE_ONLY_END_ASM32 PROC push eax push ebx push ecx mov eax, 'CV' mov ebx, 17 mov ecx, 'CV' add ebx, eax add ecx, eax pop ecx pop ebx pop eax ret VIRTUALIZER_MUTATE_ONLY_END_ASM32 ENDP ENDIF END
select.asm
encukou/ti83-dex
1
171013
<gh_stars>1-10 DEFINE P2SELECT, SPACE=ROM SEGMENT P2SELECT extern _Green extern _DrawPkName extern _Red extern _Select public Select extern _Move extern _LoadPic extern _LPicBank1 extern _DrawMoveName extern _DrawMoveName_AlignRight extern _MoveList extern _LoadLevelMoves extern _StatCalculator include "header.inc" include "linemacros.inc" entered equ OP5 ; # of bytes entered so far string equ OP5+1 ; bytes entered so far (extends to OP6) now equ OP6+9 ; address of current entry slaslaslasla macro label sla &label sla &label sla &label sla &label .endm srlsrlsrlsrl macro label srl &label srl &label srl &label srl &label .endm Select: ei ; enable rude interrupting xor a ld hl,entered ; len(entered)=0 ld (hl),a ld DE,alpha_list ld hl,now ; Load default get current address ld (hl),D inc hl ld (hl),E call drawwelcomescreen AppOnErr select_keywait B_CALL RclX ; get X... B_CALL ConvOP1 ; get X to DE AppOffErr LD HL,alpha_list bit showpkmn,(IY+dexstate) jp nz,getmask_x ; jump right to procedure for searching for TI# in DE inc DE ; value adjustment for moves jp getmask_m ; jump right to procedure for searching for move# in DE select_keywait: B_CALL RunIndicOff ld A,(entered) cp 2 jp m,select_load_normalkeys ld A,(string)+1 cp "[" jr nz,select_load_normalkeys ld de,altkeys jr select_skip_loadkeys select_load_normalkeys: ld de,keys select_skip_loadkeys: halt ; save batteries B_CALL GetCSC ; Get keyboard scan code or a ; is a 0? jr z,select_keywait ; go again if no key ex hl,de ld d,0 ld e,a ; put scan code to DE (d=0 from above) add hl,de ; get "my" code address ld a,(hl) ; get "my" code to a ; switch(my_code) cp 0 ; case 0 jr z,select_keywait ; go to wait again cp "~" ; case BREAK jp z,exit_dex ; return cp "<" ; case BKSP jr z,select_bksp cp "`" ; case CLEAR jr z,select_clear cp "-" ; case "?" jr z,select_try_help ; go to help if it's the first char, otherwise go with the "-" that it also represents cp "d" ; case DOWN jr z,select_downkey cp "u" ; case UP jr z,select_upkey cp ">" ; case ENTER jr z,select_enter cp "[" ; case THETA jr z,select_theta cp "#" ; case NUMBER_ENTRY jr z,select_numenter cp "*" ; case PUT_TO jr z,put_to cp 1 ; case 1 (Green) jr z,select_green cp 2 ; case 2 (Move) jr z,select_move cp 3 ; case 3 (Select) jr z,select_keywait ; no need to do anything cp 4 ; case 4 (Movelist) jr z,select_movelist cp 5 ; case 5 (Help/Extra) jr z,waitkey_statcalc cp "^" ; case alpha,2nd jr z,select_keywait ; go to wait again select_default: ; default push af cp "0" jr nz,select_skip_zero_test ; "0" can't be the first digit of a number ld A,(entered) cp 2 jr nz,select_skip_zero_test ld A,(string)+1 cp "[" jr nz,select_skip_zero_test pop AF jr select_keywait select_skip_zero_test: select_test_numlen: ; Also, numbers are smaller (x0nnn) ld A,(string)+1 cp "[" jr nz,select_skip_num_tests ld A,(entered) cp 5 jp nz,select_skip_num_tests pop AF jr select_keywait select_skip_num_tests: ld a,(entered) cp 12 jp nz,select_default_continuemerrily ; if at limit, don't accept more pop AF jp select_keywait select_default_continuemerrily: B_CALL RunIndicOn inc a sla a ;*2 sla a ;*4 continuebuffer ld (penCol), a xor a ld (penRow), a pop af push af B_CALL VPutMap ld a,(entered) cp 11 jp z,skipdrawcursor ld a,"_" B_CALL VPutMap endbuffer skipdrawcursor: ld hl,entered ld d,0 ld e,(hl) ld hl,string add hl,de pop af ld (hl),a cp "[" jr z,drawwelcomescreenif_theta_wasinput call updatelistposition jr dontdrawwelcomescreenotherwise drawwelcomescreenif_theta_wasinput: call resetwelcomescreen continuebuffer ld A,4 ld (penCol),A ld A,14 ld (penRow),A ld DE,OP1 ld HL,number_input_text ld BC,12 ldir ld HL,OP1 ld B,12 B_CALL VPutSN endbuffer dontdrawwelcomescreenotherwise: ld hl,entered ; get ready for next char by incrementing len(entered) inc (hl) jr select_keywait select_bksp: ld hl,entered ld a,(hl) or a jr z,select_keywait ; if((OP5)==0)break dec (hl) ld a,(hl) cp a,0 jr z,select_clear ; clear everything if nothing's there inc a sla a ;*2 sla a ;*4 continuebuffer ld (penCol), a xor a ld (penRow), a ld a,"_" B_CALL VPutMap ld a,(entered) cp 11 jp z,skipwrite4spaces ld a,SFourSpaces B_CALL VPutMap endbuffer skipwrite4spaces: call updatelistposition jr select_keywait select_clear: xor a ld (entered),a call resetwelcomescreen jr select_keywait select_try_help: ld a,(entered) cp 0 jr z,select_help ; proceed if not the first character ld a,"-" jr select_default select_help: ld a,"?" jp select_default select_downkey: ld HL,now ld D,(HL) inc HL ld E,(HL) ex DE,HL ; get current address from (now) ld DE,alpha_list_last-15 ld A,H cp D jp z,select_down_skipcp jp p,select_keywait jp m,select_forcedown select_down_skipcp: ld A,L cp E jp p,select_keywait select_forcedown: ld BC,16 add HL,BC ; increment current address ex DE,HL ; save current address to (now) ld HL,now ld (HL),D inc HL ld (HL),E call drawcurrentlist jr select_keywait select_upkey: ld HL,now ld D,(HL) inc HL ld E,(HL) ex DE,HL ; get current address from (now) ld DE,alpha_list+15 ld A,H cp D jp z,select_up_skipcp jp m,select_keywait jp p,select_forceup select_up_skipcp: ld A,L cp E jp m,select_keywait select_forceup: ld BC,-16 add HL,BC ; increment current address ex DE,HL ; save current address to (now) ld HL,now ld (HL),D inc HL ld (HL),E call drawcurrentlist jr select_keywait select_enter: ld HL,now ld D,(HL) inc HL ld E,(HL) ex DE,HL ; get current address from (now) ld BC,14 add HL,BC ld E,(HL) inc HL ld D,(HL) ex DE,HL ; get index to put to X B_CALL SetXXXXOP2 B_CALL OP2ToOP1 B_CALL StoX B_CALL StoTheta ; store to theta too ; see if it's a pk or move ld HL,now ld D,(HL) inc HL ld E,(HL) ex DE,HL ; get current address from (now) ld BC,13 add HL,BC ld A,(HL) and 10h jp z,select_enter_go_to_move B_JUMP Green select_enter_go_to_move: B_JUMP Move select_theta: ld A,(entered) cp 1 jr nz,select_keywait ld A,"[" jr select_default select_numenter: B_CALL RunIndicOn ld A,(entered) cp 3 ; x0n jp m,select_keywait B_CALL ZeroOP1 ld A,(entered) sub 3 or A,080h ld (OP1+1),A ld A,(entered) sub 2 ld B,0 ld C,A ld HL,string+2 ld DE,OP1M ldir ld C,A ld HL,OP1M select_numenter_subtract30h_loop: ld A,(HL) sub '0' ld (HL),A inc HL dec C jr nz,select_numenter_subtract30h_loop ld A,(OP1M) slaslaslasla A ld H,A ld A,(OP1M+1) or A,H ld (OP1M),A ld A,(OP1M+2) slaslaslasla A ld (OP1M+1),A xor A ld (OP1M+2),A B_CALL ConvOP1 ; Get # to DE ld HL,alpha_list;+14 ; Now get the mask (to B), bit val (to C), flag byte offset (ultimately to E; to H for now) ; and LSB offset (or that with L) ; DE must be preserved; or adjusted ld A,(string) cp "J" jp z,getmask_j cp "H" jp z,getmask_h cp "G" jp z,getmask_g cp "X" jp z,getmask_x cp "M" jp z,getmask_m ;cp "N" ;jp z,getmask_n ;[ --MASK-- Value LSB byte offset flag byte offset Value adjustment getmask_n: ;N 00010010 10h + msb<<1 12 +1 none ld B,00010010b ; mask ld A,D sla A ; l bit val or 10h ld C,A ld A,12 ; LSB offset or L ld L,A push HL ld H,1 ; flag offset jr getmask_done getmask_j: ;J 00010100 10h + msb<<2 11 +2 none ld B,00010100b ; mask ld A,D sla A ; l bit val sla A or 10h ld C,A ld A,11 ; LSB offset or L ld L,A push HL ld H,2 ; flag offset jr getmask_done getmask_h: ;H 00011000 10h + msb<<3 10 +3 none ld B,00011000b ; mask ld A,D sla A ; l bit val sla A sla A or 10h ld C,A ld A,10 ; LSB offset or L ld L,A push HL ld H,3 ; flag offset jr getmask_done getmask_g: ;G 00010001 10h + msb<<0 15 -1 subtract 1; then subtract (276-252) more if val>255 ld B,00010001b ; mask ld A,D ; l bit val or 10h ld C,A ld A,14 ; LSB offset or L ld L,A push HL ld H,-1 ; flag offset ; value adjustment: dec DE ld A,D or A jr z,getmask_done ; quit if val<=255 ld A,E sub A,25 ld E,A jr getmask_done getmask_x: ;X 00010001 10h + msb<<0 15 -1 none ld B,00010001b ; mask ld A,D ; l bit val or 10h ld C,A ld A,14 ; LSB offset or L ld L,A push HL ld H,-1 ; flag offset jr getmask_done getmask_m: ;M 00010001 msb<<0 15 -1 subtract 1 dec DE ; value adjustment: ld B,00010001b ; mask ld C,D ; l bit val ld A,14 ; LSB offset or L ld L,A push HL ld H,-1 ; flag offset ;jr getmask_done getmask_done: ; The Find algorithm: ld A,E ld DE,alpha_list_last ld E,H pop HL loop: cp (HL) jp Z,first_check_ok advance_pointer: push AF advance_pointer__AF_already_saved: ld A,L add 16 jp C,carry_pointer ld L,A pop AF jp loop carry_pointer: ld L,A ld A,H inc A cp D jp Z,nofail jp P,fail nofail: ld H,A pop AF jp loop fail: ; Failed to find pop AF jr select_keywait first_check_ok: push AF ld A,L add E ld L,A ld A,C xor (HL) and B jp Z,success ld A,L sub E ld L,A jp advance_pointer__AF_already_saved success: ; Success; cleanup pop AF ld A,L and 0F0h ld L,A ; Address to found entry is in HL ; ld A,1 ; put first letter to string so the list'll show up ; ld (entered),A ; ld A,(HL) ; ld (string),A xor A ld (entered),A ex DE,HL ; save current address to (now) ld HL,now ld (HL),D inc HL ld (HL),E ex HL,DE continuebuffer ld a, 4 ld (penCol), a xor a ld (penRow), a ; ld A,(HL) ; B_CALL VPutMap ld hl, appBackUpScreen+137 ld b, 12 B_CALL VPutSN ; Cursor & erase call _drawpkname endbuffer jr select_keywait ; THESE ARE UNREACHABLE: B_CALL GetKey ;Wait for a keypress ret exit_dex: B_JUMP JForceCmdNoChar updatelistposition: ld A,(entered) cp 2 jp m,updatelistposition_force ld A,(string)+1 cp "[" jr nz,updatelistposition_force ; call resetwelcomescreen ret updatelistposition_force: ld d,0 ; for testing purposes, set DE to 0 ld e,0 xor a ld b,a ld c,a select_getchartocompareagainst: ld HL,string add HL,BC ld A,(HL) select_getdatapointer: push AF ld A,D slaslaslasla A ld L,E srlsrlsrlsrl L add L ld H,A ld L,E slaslaslasla L push BC ld BC,alpha_list add HL,BC ; add address pop BC add HL,BC ; add char@ pop AF select_compare: cp (HL) jp z,select_HL_same jp m,select_HL_bigger ; else goto select_HL_smaller select_HL_smaller: inc DE push DE ld DE,16 add HL,DE pop DE jp select_compare select_HL_same: push HL ld HL,entered ld A,(HL) pop HL cp C jp Z,select_end inc BC jp select_getchartocompareagainst select_HL_bigger: dec DE ; we went too far select_end: ; Now, data index is in DE. ; Make a data pointer from it: ld A,D slaslaslasla A ld L,E srlsrlsrlsrl L add L ld H,A ld L,E slaslaslasla L ld BC,alpha_list add HL,BC ; add address ex DE,HL ; save current address to (now) ld HL,now ld (HL),D inc HL ld (HL),E call drawcurrentlist ret drawcurrentlist: continuebuffer ; Print 12 spaces ld HL,spaces ld de, OP2 ; Put address of OP1 to DE ld bc, 12 ; put 10 (length) to BC ldir ; load string to OP1 ld a,14 ; penRow spaces_loop: ld hl, OP2 ; Put address of OP1 to HL ld b, 12 ; put 12 (length) to B ld (penRow), a push af ld a, 4 ld (penCol), a B_CALL VPutSN ; Draw string of fat spaces pop af add a,6 ; advance penRow cp a,58 ; check penRow jp m,spaces_loop ld HL,now ld D,(HL) inc HL ld E,(HL) ex DE,HL ; get current address from (now) ld a,14 list_loop: push HL ; Print the string ld de, OP1 ; Put address of OP1 to DE ld bc, 12 ; put 10 (length) to BC ldir ; load string to OP1 ld (penRow), a push AF ld a, 4 ld (penCol), a inc HL ld b, 10 ; put 10 (pkmn name length) to B ld A,(HL) and 10h jr nz,list_skip_move_incrementing inc B inc B ; put 12 (move name length) to B list_skip_move_incrementing: ld hl, OP1 ; Put address of OP1 to HL B_CALL VPutSN ; Draw string pop AF pop HL ld BC,16 add HL,BC add A,6 cp A,58 jp M,list_loop endbuffer ret drawwelcomescreen: startbuffer ld h,1 ; dark line ld bc, 2*256+62 ld de, 2*256+57 ; line left of inputbox B_CALL ILine ld bc, 3*256+56 ld de,51*256+56 ; line under inputbox B_CALL ILine ld bc,52*256+62 ld de,52*256+57 ; line left of inputbox B_CALL ILine ld bc, 0*256+62 ld de, 2*256+62 ; short top line B_CALL ILine ld bc,52*256+62 ld de,93*256+62 ; long top line B_CALL ILine ld bc,94*256+ 0 ld de,94*256+61 ; right line B_CALL ILine ld bc,70*256 ld de,70*256+22 ; left kana line B_CALL ILine ld bc,71*256+23 ld de,93*256+23 ; top kana line B_CALL ILine ; kana bitmap ld hl,p_kana ; source pointer ld de, appBackUpScreen ; a temp RAM area ld bc,p_kana_end-p_kana ; put length to BC ldir ; load image to RAM ld hl,appBackUpScreen ; HL points to copied image ld de,42*256+71 ; DE <- coords B_CALL DisplayImage resetwelcomescreen: ; gets called as a function; skips the cls & line drawing continuebuffer ld hl,texts ; source pointer ld de, appBackUpScreen ; a temp RAM area ld bc,texts_total_len ; put length to BC ldir ; load image to RAM ld hl,appBackUpScreen ; HL points to copied texts xor a ld (penCol), a ld a, 8 ld (penRow), a ld hl, appBackUpScreen ld b, 13 B_CALL VPutSN ; INPUT NAME... ld a, 4 ld (penCol), a ld a, 20 ld (penRow), a ld hl, appBackUpScreen+27 ld b, 14 B_CALL VPutSN ; N#->NAT'L # ld a, 4 ld (penCol), a ld a, 26 ld (penRow), a ld hl, appBackUpScreen+41 ld b, 13 B_CALL VPutSN ; J#->JOHTO # ld a, 4 ld (penCol), a ld a, 32 ld (penRow), a ld hl, appBackUpScreen+55 ld b, 12 B_CALL VPutSN ; H#->HOENN # ld a, 4 ld (penCol), a ld a, 38 ld (penRow), a ld hl, appBackUpScreen+67 ld b, 12 B_CALL VPutSN ; #->GBA # ld a, 4 ld (penCol), a ld a, 44 ld (penRow), a ld hl, appBackUpScreen+79 ld b, 13 B_CALL VPutSN ; X#->TI # ld a, 4 ld (penCol), a ld a, 50 ld (penRow), a ld hl, appBackUpScreen+94 ld b, 14 B_CALL VPutSN ; M#->MOVE # ld a, 4 ld (penCol), a ld a, 56 ld (penRow), a ld hl, appBackUpScreen+108 ld b, 15 B_CALL VPutSN ; XT#n->SWAP... ld a, 67 ld (penCol), a ld a, 14 ld (penRow), a ld hl, appBackUpScreen+123 ld b, 6 B_CALL VPutSN ; ->ENTER ld a, 68 ld (penCol), a ld a, 26 ld (penRow), a ld hl, appBackUpScreen+129 ld b, 4 B_CALL VPutSN ; DEL-> ld a, 76 ld (penCol), a ld a, 32 ld (penRow), a ld hl, appBackUpScreen+133 ld b, 4 B_CALL VPutSN ; BKSP xor a ld (penCol), a ld a, 14 ld (penRow), a ld hl, appBackUpScreen+13 ld b, 14 B_CALL VPutSN ; arrow and spaces _drawpkname: ; gets called as a function; skips everything but input box clearing & pk name drawing continuebuffer ; draw pk name ld HL,now ld D,(HL) inc HL ld E,(HL) ex DE,HL ; get current address from (now) ld a,14 ld (penRow), a ld a, 4 ld (penCol), a ld de, appBackUpScreen ; Put address of OP1 to DE ld bc, 12 ; put 10 (length) to BC ldir ; load string to OP1 inc HL ld b, 10 ; put 10 (pkmn name length) to B ld A,(HL) and 10h jr nz,welcome_skip_move_incrementing inc B inc B ; put 12 (move name length) to B welcome_skip_move_incrementing: ld hl, appBackUpScreen ; Put address of OP1 to HL B_CALL VPutSN ; Draw string clearinputbox: ; gets called as a function; skips everything but input box clearing endbuffer ld A,(entered) or a ret nz ; return if something is actually entered continuebuffer ld a, 4 ld (penCol), a xor a ld (penRow), a ld hl, appBackUpScreen+137 ld b, 12 B_CALL VPutSN ; Cursor & erase endbuffer ret put_to: ; not really a function ld hl,put_to_text ; source pointer ld de, appBackUpScreen ; a temp RAM area ld bc,28 ; put length to BC ldir ; load image to RAM ld hl,appBackUpScreen ; HL points to copied texts ld a, 4 ld (penCol), a ld a, 20 ld (penRow), a ld hl, appBackUpScreen ld b, 16 B_CALL VPutSN ; "PUT TO...?" ld a, 4 ld (penCol), a ld a, 26 ld (penRow), a ld hl, appBackUpScreen+10 ld b, 12 B_CALL VPutSN ; Spaces where J# was ld a, 4 ld (penCol), a ld a, 32 ld (penRow), a ld hl, appBackUpScreen+10 ld b, 12 B_CALL VPutSN ; Spaces where H# was ld a, 4 ld (penCol), a ld a, 38 ld (penRow), a ld hl, appBackUpScreen+10 ld b, 12 B_CALL VPutSN ; Spaces where G# was ld a, 4 ld (penCol), a ld a, 44 ld (penRow), a ld hl, appBackUpScreen+10 ld b, 12 B_CALL VPutSN ; Spaces where X# was ld a, 4 ld (penCol), a ld a, 50 ld (penRow), a ld hl, appBackUpScreen+10 ld b, 12 B_CALL VPutSN ; Spaces where M# was ld a, 4 ld (penCol), a ld a, 56 ld (penRow), a ld hl, appBackUpScreen+10 ld b, 12 B_CALL VPutSN ; Spaces where XT#n was put_to_wait: ld de,keys halt ; save batteries B_CALL GetCSC ; Get keyboard scan code or a ; is a 0? jr z,put_to_wait ; go again if no key ex hl,de ld d,0 ld e,a ; put scan code to DE add hl,de ; get "my" code address ld a,(hl) ; get "my" code to a cp "^" ; did user press Alpha or 2nd? jr z,put_to_wait ; then go to wait again ; switch(my_code) cp "A" jp m,select_clear cp "Z"+1 jp p,select_clear push AF ld HL,now ld D,(HL) inc HL ld E,(HL) ex DE,HL ; get current address from (now) ld DE,14 add HL,DE ld E,(HL) inc HL ld D,(HL) ex HL,DE B_CALL SetXXXXOP2 B_CALL OP2ToOP1 B_CALL PushRealO1 ; FPST = value ; B_CALL ZeroOP1 pop AF push AF LD (OP1+1),A ; change OP1 to L3 name ; AppOnErr put_to_fail B_CALL StoOther ; store val -> var AppOffErr ld hl,stored ; source pointer ld de, appBackUpScreen ; a temp RAM area ld bc,12 ; put length to BC ldir ; load image to RAM ld hl,appBackUpScreen ; HL points to copied texts ld a, 4 ld (penCol), a ld a, 20 ld (penRow), a ld hl, appBackUpScreen ld b, 9 B_CALL VPutSN ; "STORED!" xor A ld (entered),A ld a, 15 ld (penCol), a ld a, 35 ld (penRow), a ld hl, appBackUpScreen+9 ld b, 3 B_CALL VPutSN ; "IN " pop AF B_CALL VPutMap ; var name call clearinputbox jr select_keywait put_to_fail: pop AF ; cleanup ld hl,failed ; source pointer ld de, appBackUpScreen ; a temp RAM area ld bc,16 ; put length to BC ldir ; load image to RAM ld hl,appBackUpScreen ; HL points to copied texts ld a, 4 ld (penCol), a ld a, 20 ld (penRow), a ld hl, appBackUpScreen+7 ld b, 9 B_CALL VPutSN ; "ERROR!" ld a, 9 ld (penCol), a ld a, 35 ld (penRow), a ld hl, appBackUpScreen ld b, 7 B_CALL VPutSN ; "FAILED!" jr select_keywait select_green: B_JUMP Green select_move: B_JUMP Move select_movelist: B_JUMP MoveList waitkey_statcalc: B_JUMP StatCalculator stored: db "STORED!",[2]SFourSpaces db "IN",SFourSpaces failed: db "FAILED!" db "ERROR!",[2]SFourSpaces ; also uses the SFourSpaces below; total length = 9 keys: db SFourSpaces ; (not used; part of above message) db "d",0,0,"u",0,0,0,0 ; v<>^???? db ">\"WRMH`",0 ; enter+-*/^clear-? db "-[VQLG",0,0 ; -369)tan-vars-? db 0,"ZUPKFC",0 ; .258(cos-prgm-stat db SFourSpaces,"YTOJEB*" ; 0147,sin-apps-xt0n db "~XSNIDA^" ; ?-store-ln-log-square-recip-math-alpha db "\5\4\3\2\1^~" ; graph-trace-zoom-window-y=-2nd-mode altkeys: db "<" ; del for Keys; also 0th (unused) byte for AltKeys db 0 ,0,0, 0 ,0,0,0,0 ; v<>^???? db "#",[5]0,"`",0 ; enter+-*/^clear-? db 0,"369",0,0,0,0 ; -369)tan-vars-? db 0,"258",0,0,0,0 ; .258(cos-prgm-stat db "0147",0,0,0,0 ; 0147,sin-apps-xt0n db "~",0,0,0,0,0,0,0 ; ?-store-ln-log-square-recip-math-alpha db "\5\4\3\2\1",0,"~" ; graph-trace-zoom-window-y=-2nd-mode db "<" ; del for AltKeys texts: db "INPUT",SFourSpaces,"NAME..." ; Start 0 Len 13 db Sconvert, [13]SFourSpaces ; Start 13 Len 14 db "N[",Sstore ,"NAT'L #",[4]SFourSpaces ; Start 27 Len 14 db "J[",Sstore ,"JOHTO #",[4]SFourSpaces ; Start 41 Len 13 db "H[",Sstore ,"HOENN #",[2]SFourSpaces ; Start 55 Len 12 db "G[",Sstore ,"GBA #",[4]SFourSpaces ; Start 67 Len 12 db "X[",Sstore ,"TI #",[8]SFourSpaces ; Start 79 Len 13 db "M[",Sstore ,"MOVE #",[5]SFourSpaces ; Start 94 Len 14 db "XT[n",Sstore ,"PUT TO...",[1]SFourSpaces ; Start 108 Len 15 db Sstore ,"ENTER" ; Start 123 Len 6 db "DEL",Sstore ; Start 129 Len 4 db "BKSP" ; Start 133 Len 4 db "_",[12]SFourSpaces ; Start 137 Len 12 (+1 that's not used in welcome screen) ; no new entries acceptable texts_total_len equ 149 put_to_text: db "PUT TO...?",[12]SFourSpaces number_input_text: db "NUMBER?",[5]SFourSpaces align 16 spaces: db [12]SFourSpaces ; 12 Fourspaces (move name len) db 0,0,0,0 ; 16 (pad) alpha_list: db "ABRA\6\6\6\6\6\6" ,027h,059h,03Fh,00010000b,03Eh,000h db "ABSOL\6\6\6\6\6" ,098h,067h,067h,00010111b,05Eh,001h db "ABSORB\6\6\6\6\6\6" , 0,00000000b,046h,000h db "ACID\6\6\6\6\6\6\6\6" , 0,00000000b,032h,000h db "ACID\6ARMOR\6\6" , 0,00000000b,096h,000h db "AERIAL\6ACE\6\6" , 0,00000001b,04Bh,001h db "AEROBLAST\6\6\6" , 0,00000000b,0B0h,000h db "AERODACTYL" ,029h,0E0h,08Eh,00011000b,08Dh,000h db "AGGRON\6\6\6\6" ,048h,032h,032h,00010111b,066h,001h db "AGILITY\6\6\6\6\6" , 0,00000000b,060h,000h db "AIPOM\6\6\6\6\6" ,04Fh,07Ah,0BEh,00011000b,0BDh,000h db "AIR\6CUTTER\6\6" , 0,00000001b,039h,001h db "ALAKAZAM\6\6" ,029h,05Bh,041h,00010000b,040h,000h db "ALTARIA\6\6\6" ,07Ah,04Eh,04Eh,00010111b,04Dh,001h db "AMNESIA\6\6\6\6\6" , 0,00000000b,084h,000h db "AMPHAROS\6\6" ,049h,037h,0B5h,00011000b,0B4h,000h db "ANCIENTPOWER" , 0,00000000b,0F5h,000h db "ANORITH\6\6\6" ,087h,05Bh,05Bh,00010111b,06Ch,001h db "ARBOK\6\6\6\6\6" ,0E2h,033h,018h,00010000b,017h,000h db "ARCANINE\6\6" ,0F6h,080h,03Bh,00010000b,03Ah,000h db "ARIADOS\6\6\6" ,043h,021h,0A8h,00011000b,0A7h,000h db "ARM\6THRUST\6\6" , 0,00000001b,023h,001h db "ARMALDO\6\6\6" ,088h,05Ch,05Ch,00010111b,06Dh,001h db "AROMATHERAPY" , 0,00000001b,037h,001h db "ARON\6\6\6\6\6\6" ,046h,030h,030h,00010111b,064h,001h db "ARTICUNO\6\6" ,02Bh,0EBh,090h,00011000b,08Fh,000h db "ASSIST\6\6\6\6\6\6" , 0,00000001b,011h,001h db "ASTONISH\6\6\6\6" , 0,00000001b,035h,001h db "ATTRACT\6\6\6\6\6" , 0,00000000b,0D4h,000h db "AURORA\6BEAM\6" , 0,00000000b,03Dh,000h db "AZUMARILL\6" ,038h,083h,0B8h,00010000b,0B7h,000h db "AZURILL\6\6\6" ,036h,02Ah,02Ah,00010111b,044h,001h db "BAGON\6\6\6\6\6" ,0BBh,073h,073h,00010111b,071h,001h db "BALTOY\6\6\6\6" ,083h,057h,057h,00010111b,024h,001h db "BANETTE\6\6\6" ,093h,062h,062h,00010111b,060h,001h db "BARBOACH\6\6" ,07Fh,053h,053h,00010111b,029h,001h db "BARRAGE\6\6\6\6\6" , 0,00000000b,08Bh,000h db "BARRIER\6\6\6\6\6" , 0,00000000b,06Fh,000h db "BATON\6PASS\6\6" , 0,00000000b,0E1h,000h db "BAYLEEF\6\6\6" ,034h,002h,099h,00011000b,098h,000h db "BEAT\6UP\6\6\6\6\6" , 0,00000000b,0FAh,000h db "BEAUTIFLY\6" ,010h,00Bh,00Bh,00010111b,00Ah,001h db "BEEDRILL\6\6" ,0D9h,01Dh,00Fh,00010000b,00Eh,000h db "BELDUM\6\6\6\6" ,0BEh,076h,076h,00010111b,074h,001h db "BELLOSSOM\6" ,05Bh,056h,0B6h,00010000b,0B5h,000h db "BELLSPROUT" ,0FAh,040h,045h,00010000b,044h,000h db "BELLY\6DRUM\6\6" , 0,00000000b,0BAh,000h db "BIDE\6\6\6\6\6\6\6\6" , 0,00000000b,074h,000h db "BIND\6\6\6\6\6\6\6\6" , 0,00000000b,013h,000h db "BITE\6\6\6\6\6\6\6\6" , 0,00000000b,02Bh,000h db "BLAST\6BURN\6\6" , 0,00000001b,032h,001h db "BLASTOISE\6" ,0D3h,0EAh,009h,00010000b,008h,000h db "BLAZE\6KICK\6\6" , 0,00000001b,02Ah,001h db "BLAZIKEN\6\6" ,006h,001h,001h,00010111b,000h,001h db "BLISSEY\6\6\6" ,079h,0DAh,0F2h,00011000b,0F1h,000h db "BLIZZARD\6\6\6\6" , 0,00000000b,03Ah,000h db "BLOCK\6\6\6\6\6\6\6" , 0,00000001b,04Eh,001h db "BODY\6SLAM\6\6\6" , 0,00000000b,021h,000h db "BONE\6CLUB\6\6\6" , 0,00000000b,07Ch,000h db "BONE\6RUSH\6\6\6" , 0,00000000b,0C5h,000h db "BONEMERANG\6\6" , 0,00000000b,09Ah,000h db "BOUNCE\6\6\6\6\6\6" , 0,00000001b,053h,001h db "BRELOOM\6\6\6" ,023h,01Eh,01Eh,00010111b,019h,001h db "BRICK\6BREAK\6" , 0,00000001b,017h,001h db "BUBBLE\6\6\6\6\6\6" , 0,00000000b,090h,000h db "BUBBLEBEAM\6\6" , 0,00000000b,03Ch,000h db "BULBASAUR\6" ,0CBh,0E2h,001h,00010000b,000h,000h db "BULK\6UP\6\6\6\6\6" , 0,00000001b,052h,001h db "BULLET\6SEED\6" , 0,00000001b,04Ah,001h db "BUTTERFREE" ,0D6h,01Ah,00Ch,00010000b,00Bh,000h db "CACNEA\6\6\6\6" ,077h,04Bh,04Bh,00010111b,03Eh,001h db "CACTURNE\6\6" ,078h,04Ch,04Ch,00010111b,03Fh,001h db "CALM\6MIND\6\6\6" , 0,00000001b,05Ah,001h db "CAMERUPT\6\6" ,066h,043h,043h,00010111b,03Ah,001h db "CAMOUFLAGE\6\6" , 0,00000001b,024h,001h db "CARVANHA\6\6" ,061h,03Eh,03Eh,00010111b,030h,001h db "CASCOON\6\6\6" ,011h,00Ch,00Ch,00010111b,00Bh,001h db "CASTFORM\6\6" ,08Eh,05Fh,05Fh,00010111b,067h,001h db "CATERPIE\6\6" ,0D4h,018h,00Ah,00010000b,009h,000h db "CELEBI\6\6\6\6" ,082h,0FBh,0FBh,00011000b,0FAh,000h db "CHANSEY\6\6\6" ,015h,0D9h,071h,00011000b,070h,000h db "CHARGE\6\6\6\6\6\6" , 0,00000001b,00Bh,001h db "CHARIZARD\6" ,0D0h,0E7h,006h,00010000b,005h,000h db "CHARM\6\6\6\6\6\6\6" , 0,00000000b,0CBh,000h db "CHARMANDER" ,0CEh,0E5h,004h,00010000b,003h,000h db "CHARMELEON" ,0CFh,0E6h,005h,00010000b,004h,000h db "CHIKORITA\6" ,033h,001h,098h,00011000b,097h,000h db "CHIMECHO\6\6" ,097h,066h,066h,00010111b,081h,001h db "CHINCHOU\6\6" ,0B5h,0AEh,0AAh,00010000b,0A9h,000h db "CLAMP\6\6\6\6\6\6\6" , 0,00000000b,07Fh,000h db "CLAMPERL\6\6" ,0B0h,06Eh,06Eh,00010111b,05Bh,001h db "CLAYDOL\6\6\6" ,084h,058h,058h,00010111b,025h,001h db "CLEFABLE\6\6" ,0EAh,02Ah,024h,00010000b,023h,000h db "CLEFAIRY\6\6" ,0E9h,029h,023h,00010000b,022h,000h db "CLEFFA\6\6\6\6" ,044h,028h,0ADh,00011000b,0ACh,000h db "CLOYSTER\6\6" ,005h,0AAh,05Bh,00011000b,05Ah,000h db "COMBUSKEN\6" ,005h,000h,000h,00010110b,0FFh,000h db "COMET\6PUNCH\6" , 0,00000000b,003h,000h db "CONFUSE\6RAY\6" , 0,00000000b,06Ch,000h db "CONFUSION\6\6\6" , 0,00000000b,05Ch,000h db "CONSTRICT\6\6\6" , 0,00000000b,083h,000h db "CONVERSION\6\6" , 0,00000000b,09Fh,000h db "CONVERSION\6Z" , 0,00000000b,0AFh,000h db "CORPHISH\6\6" ,081h,055h,055h,00010111b,02Ch,001h db "CORSOLA\6\6\6" ,0B4h,0ABh,0DEh,00010000b,0DDh,000h db "COSMIC\6POWER" , 0,00000001b,041h,001h db "COTTON\6SPORE" , 0,00000000b,0B1h,000h db "COUNTER\6\6\6\6\6" , 0,00000000b,043h,000h db "COVET\6\6\6\6\6\6\6" , 0,00000001b,056h,001h db "CRABHAMMER\6\6" , 0,00000000b,097h,000h db "CRADILY\6\6\6" ,086h,05Ah,05Ah,00010111b,06Bh,001h db "CRAWDAUNT\6" ,082h,056h,056h,00010111b,02Dh,001h db "CROBAT\6\6\6\6" ,041h,027h,0A9h,00010000b,0A8h,000h db "CROCONAW\6\6" ,03Ah,008h,09Fh,00011000b,09Eh,000h db "CROSS\6CHOP\6\6" , 0,00000000b,0EDh,000h db "CRUNCH\6\6\6\6\6\6" , 0,00000000b,0F1h,000h db "CRUSH\6CLAW\6\6" , 0,00000001b,031h,001h db "CUBONE\6\6\6\6" ,010h,0CBh,068h,00011000b,067h,000h db "CURSE\6\6\6\6\6\6\6" , 0,00000000b,0ADh,000h db "CUT\6\6\6\6\6\6\6\6\6", 0,00000000b,00Eh,000h db "CYNDAQUIL\6" ,036h,004h,09Bh,00011000b,09Ah,000h db "DEFENSE\6CURL" , 0,00000000b,06Eh,000h db "DELCATTY\6\6" ,03Eh,02Dh,02Dh,00010111b,022h,001h db "DELIBIRD\6\6" ,06Ch,0BEh,0E1h,00011000b,0E0h,000h db "DEOXYS\6\6\6\6" ,0CAh,082h,082h,00010111b,080h,001h db "DESTINY\6BOND" , 0,00000000b,0C1h,000h db "DETECT\6\6\6\6\6\6" , 0,00000000b,0C4h,000h db "DEWGONG\6\6\6" ,003h,0B1h,057h,00011000b,056h,000h db "DIG\6\6\6\6\6\6\6\6\6", 0,00000000b,05Ah,000h db "DIGLETT\6\6\6" ,0EFh,084h,032h,00010000b,031h,000h db "DISABLE\6\6\6\6\6" , 0,00000000b,031h,000h db "DITTO\6\6\6\6\6" ,01Fh,05Ch,084h,00011000b,083h,000h db "DIVE\6\6\6\6\6\6\6\6" , 0,00000001b,022h,001h db "DIZZY\6PUNCH\6" , 0,00000000b,091h,000h db "DODRIO\6\6\6\6" ,05Dh,0C8h,055h,00010000b,054h,000h db "DODUO\6\6\6\6\6" ,05Ch,0C7h,054h,00010000b,053h,000h db "DONPHAN\6\6\6" ,0A6h,0C4h,0E8h,00010000b,0E7h,000h db "DOOM\6DESIRE\6" , 0,00000001b,060h,001h db "DOUBLE-EDGE\6" , 0,00000000b,025h,000h db "DOUBLE\6KICK\6" , 0,00000000b,017h,000h db "DOUBLE\6TEAM\6" , 0,00000000b,067h,000h db "DOUBLESLAP\6\6" , 0,00000000b,002h,000h db "DRAGON\6CLAW\6" , 0,00000001b,050h,001h db "DRAGON\6DANCE" , 0,00000001b,05Ch,001h db "DRAGON\6RAGE\6" , 0,00000000b,051h,000h db "DRAGONAIR\6" ,02Fh,0F2h,094h,00011000b,093h,000h db "DRAGONBREATH" , 0,00000000b,0E0h,000h db "DRAGONITE\6" ,030h,0F3h,095h,00011000b,094h,000h db "DRATINI\6\6\6" ,02Eh,0F1h,093h,00011000b,092h,000h db "DREAM\6EATER\6" , 0,00000000b,089h,000h db "DRILL\6PECK\6\6" , 0,00000000b,040h,000h db "DROWZEE\6\6\6" ,00Ah,057h,060h,00011000b,05Fh,000h db "DUGTRIO\6\6\6" ,0F0h,085h,033h,00010000b,032h,000h db "DUNSPARCE\6" ,05Dh,034h,0CEh,00011000b,0CDh,000h db "DUSCLOPS\6\6" ,095h,064h,064h,00010111b,050h,001h db "DUSKULL\6\6\6" ,094h,063h,063h,00010111b,04Fh,001h db "DUSTOX\6\6\6\6" ,012h,00Dh,00Dh,00010111b,00Ch,001h db "DYNAMICPUNCH" , 0,00000000b,0DEh,000h db "EARTHQUAKE\6\6" , 0,00000000b,058h,000h db "EEVEE\6\6\6\6\6" ,020h,0B4h,085h,00011000b,084h,000h db "EGG\6BOMB\6\6\6\6" , 0,00000000b,078h,000h db "EKANS\6\6\6\6\6" ,0E1h,032h,017h,00010000b,016h,000h db "ELECTABUZZ" ,01Bh,09Bh,07Dh,00011000b,07Ch,000h db "ELECTRIKE\6" ,04Eh,035h,035h,00010111b,037h,001h db "ELECTRODE\6" ,055h,079h,065h,00010000b,064h,000h db "ELEKID\6\6\6\6" ,076h,09Ah,0EFh,00011000b,0EEh,000h db "EMBER\6\6\6\6\6\6\6" , 0,00000000b,033h,000h db "ENCORE\6\6\6\6\6\6" , 0,00000000b,0E2h,000h db "ENDEAVOR\6\6\6\6" , 0,00000001b,01Ah,001h db "ENDURE\6\6\6\6\6\6" , 0,00000000b,0CAh,000h db "ENTEI\6\6\6\6\6" ,07Bh,0EFh,0F4h,00011000b,0F3h,000h db "ERUPTION\6\6\6\6" , 0,00000001b,01Bh,001h db "ESPEON\6\6\6\6" ,055h,0B8h,0C4h,00011000b,0C3h,000h db "EXEGGCUTE\6" ,00Eh,068h,066h,00011000b,065h,000h db "EXEGGUTOR\6" ,00Fh,069h,067h,00011000b,066h,000h db "EXPLOSION\6\6\6" , 0,00000000b,098h,000h db "EXPLOUD\6\6\6" ,02Fh,027h,027h,00010111b,05Ah,001h db "EXTRASENSORY" , 0,00000001b,045h,001h db "EXTREMESPEED" , 0,00000000b,0F4h,000h db "FACADE\6\6\6\6\6\6" , 0,00000001b,006h,001h db "FAINT\6ATTACK" , 0,00000000b,0B8h,000h db "FAKE\6OUT\6\6\6\6" , 0,00000000b,0FBh,000h db "FAKE\6TEARS\6\6" , 0,00000001b,038h,001h db "FALSE\6SWIPE\6" , 0,00000000b,0CDh,000h db "FARFETCH\6D" ,001h,09Eh,053h,00011000b,052h,000h db "FEAROW\6\6\6\6" ,0E0h,00Eh,016h,00010000b,015h,000h db "FEATHERDANCE" , 0,00000001b,028h,001h db "FEEBAS\6\6\6\6" ,08Ch,05Dh,05Dh,00010111b,02Eh,001h db "FERALIGATR" ,03Bh,009h,0A0h,00011000b,09Fh,000h db "FIRE\6BLAST\6\6" , 0,00000000b,07Dh,000h db "FIRE\6PUNCH\6\6" , 0,00000000b,006h,000h db "FIRE\6SPIN\6\6\6" , 0,00000000b,052h,000h db "FISSURE\6\6\6\6\6" , 0,00000000b,059h,000h db "FLAAFFY\6\6\6" ,048h,036h,0B4h,00011000b,0B3h,000h db "FLAIL\6\6\6\6\6\6\6" , 0,00000000b,0AEh,000h db "FLAME\6WHEEL\6" , 0,00000000b,0ABh,000h db "FLAMETHROWER" , 0,00000000b,034h,000h db "FLAREON\6\6\6" ,023h,0B7h,088h,00011000b,087h,000h db "FLASH\6\6\6\6\6\6\6" , 0,00000000b,093h,000h db "FLATTER\6\6\6\6\6" , 0,00000001b,003h,001h db "FLY\6\6\6\6\6\6\6\6\6", 0,00000000b,012h,000h db "FLYGON\6\6\6\6" ,076h,04Ah,04Ah,00010111b,034h,001h db "FOCUS\6ENERGY" , 0,00000000b,073h,000h db "FOCUS\6PUNCH\6" , 0,00000001b,007h,001h db "FOLLOW\6ME\6\6\6" , 0,00000001b,009h,001h db "FORESIGHT\6\6\6" , 0,00000000b,0C0h,000h db "FORRETRESS" ,05Ch,05Eh,0CDh,00011000b,0CCh,000h db "FRENZY\6PLANT" , 0,00000001b,051h,001h db "FRUSTRATION\6" , 0,00000000b,0D9h,000h db "FURRET\6\6\6\6" ,03Dh,014h,0A2h,00011000b,0A1h,000h db "FURY\6ATTACK\6" , 0,00000000b,01Eh,000h db "FURY\6CUTTER\6" , 0,00000000b,0D1h,000h db "FURY\6SWIPES\6" , 0,00000000b,099h,000h db "FUTURE\6SIGHT" , 0,00000000b,0F7h,000h db "GARDEVOIR\6" ,01Fh,01Ah,01Ah,00010111b,070h,001h db "GASTLY\6\6\6\6" ,006h,03Ah,05Ch,00011000b,05Bh,000h db "GENGAR\6\6\6\6" ,008h,03Ch,05Eh,00011000b,05Dh,000h db "GEODUDE\6\6\6" ,039h,022h,04Ah,00010000b,049h,000h db "GIGA\6DRAIN\6\6" , 0,00000000b,0C9h,000h db "GIRAFARIG\6" ,0A4h,093h,0CBh,00010000b,0CAh,000h db "GLALIE\6\6\6\6" ,0ACh,06Ah,06Ah,00010111b,041h,001h db "GLARE\6\6\6\6\6\6\6" , 0,00000000b,088h,000h db "GLIGAR\6\6\6\6" ,05Eh,0BDh,0CFh,00011000b,0CEh,000h db "GLOOM\6\6\6\6\6" ,059h,054h,02Ch,00010000b,02Bh,000h db "GOLBAT\6\6\6\6" ,040h,026h,02Ah,00010000b,029h,000h db "GOLDEEN\6\6\6" ,032h,04Eh,076h,00010000b,075h,000h db "GOLDUCK\6\6\6" ,09Fh,08Bh,037h,00010000b,036h,000h db "GOLEM\6\6\6\6\6" ,03Bh,024h,04Ch,00010000b,04Bh,000h db "GOREBYSS\6\6" ,0B2h,070h,070h,00010111b,05Dh,001h db "GRANBULL\6\6" ,061h,07Ch,0D2h,00011000b,0D1h,000h db "GRASSWHISTLE" , 0,00000001b,03Fh,001h db "GRAVELER\6\6" ,03Ah,023h,04Bh,00010000b,04Ah,000h db "GRIMER\6\6\6\6" ,06Ah,074h,058h,00010000b,057h,000h db "GROUDON\6\6\6" ,0C7h,07Fh,07Fh,00010111b,07Bh,001h db "GROVYLE\6\6\6" ,002h,0FDh,0FDh,00010000b,0FCh,000h db "GROWL\6\6\6\6\6\6\6" , 0,00000000b,02Ch,000h db "GROWLITHE\6" ,0F5h,07Fh,03Ah,00010000b,039h,000h db "GROWTH\6\6\6\6\6\6" , 0,00000000b,049h,000h db "GRUDGE\6\6\6\6\6\6" , 0,00000001b,01Fh,001h db "GRUMPIG\6\6\6" ,06Fh,046h,046h,00010111b,046h,001h db "GUILLOTINE\6\6" , 0,00000000b,00Bh,000h db "GULPIN\6\6\6\6" ,05Fh,03Ch,03Ch,00010111b,055h,001h db "GUST\6\6\6\6\6\6\6\6" , 0,00000000b,00Fh,000h db "GYARADOS\6\6" ,035h,04Dh,082h,00010000b,081h,000h db "HAIL\6\6\6\6\6\6\6\6" , 0,00000001b,001h,001h db "HARDEN\6\6\6\6\6\6" , 0,00000000b,069h,000h db "HARIYAMA\6\6" ,031h,029h,029h,00010111b,036h,001h db "HAUNTER\6\6\6" ,007h,03Bh,05Dh,00011000b,05Ch,000h db "HAZE\6\6\6\6\6\6\6\6" , 0,00000000b,071h,000h db "HEADBUTT\6\6\6\6" , 0,00000000b,01Ch,000h db "HEAL\6BELL\6\6\6" , 0,00000000b,0D6h,000h db "HEAT\6WAVE\6\6\6" , 0,00000001b,000h,001h db "HELPING\6HAND" , 0,00000001b,00Dh,001h db "HERACROSS\6" ,0A8h,071h,0D6h,00010000b,0D5h,000h db "HI\6JUMP\6KICK" , 0,00000000b,087h,000h db "HIDDEN\6POWER" , 0,00000000b,0ECh,000h db "HITMONCHAN" ,013h,091h,06Bh,00011000b,06Ah,000h db "HITMONLEE\6" ,012h,090h,06Ah,00011000b,069h,000h db "HITMONTOP\6" ,074h,092h,0EDh,00011000b,0ECh,000h db "HO-OH\6\6\6\6\6" ,081h,0F8h,0FAh,00011000b,0F9h,000h db "HOOTHOOT\6\6" ,03Eh,00Fh,0A3h,00011000b,0A2h,000h db "HOPPIP\6\6\6\6" ,04Ch,043h,0BBh,00011000b,0BAh,000h db "HORN\6ATTACK\6" , 0,00000000b,01Dh,000h db "HORN\6DRILL\6\6" , 0,00000000b,01Fh,000h db "HORSEA\6\6\6\6" ,0B8h,0BAh,074h,00010000b,073h,000h db "HOUNDOOM\6\6" ,06Fh,0D2h,0E5h,00011000b,0E4h,000h db "HOUNDOUR\6\6" ,06Eh,0D1h,0E4h,00011000b,0E3h,000h db "HOWL\6\6\6\6\6\6\6\6" , 0,00000001b,04Fh,001h db "HUNTAIL\6\6\6" ,0B1h,06Fh,06Fh,00010111b,05Ch,001h db "HYDRO\6CANNON" , 0,00000001b,033h,001h db "HYDRO\6PUMP\6\6" , 0,00000000b,037h,000h db "HYPER\6BEAM\6\6" , 0,00000000b,03Eh,000h db "HYPER\6FANG\6\6" , 0,00000000b,09Dh,000h db "HYPER\6VOICE\6" , 0,00000001b,02Fh,001h db "HYPNO\6\6\6\6\6" ,00Bh,058h,061h,00011000b,060h,000h db "HYPNOSIS\6\6\6\6" , 0,00000000b,05Eh,000h db "ICE\6BALL\6\6\6\6" , 0,00000001b,02Ch,001h db "ICE\6BEAM\6\6\6\6" , 0,00000000b,039h,000h db "ICE\6PUNCH\6\6\6" , 0,00000000b,007h,000h db "ICICLE\6SPEAR" , 0,00000001b,04Ch,001h db "ICY\6WIND\6\6\6\6" , 0,00000000b,0C3h,000h db "IGGLYBUFF\6" ,089h,02Bh,0AEh,00010000b,0ADh,000h db "ILLUMISE\6\6" ,057h,03Ah,03Ah,00010111b,069h,001h db "IMPRISON\6\6\6\6" , 0,00000001b,01Dh,001h db "INGRAIN\6\6\6\6\6" , 0,00000001b,012h,001h db "IRON\6DEFENSE" , 0,00000001b,04Dh,001h db "IRON\6TAIL\6\6\6" , 0,00000000b,0E6h,000h db "IVYSAUR\6\6\6" ,0CCh,0E3h,002h,00010000b,001h,000h db "JIGGLYPUFF" ,08Ah,02Ch,027h,00010000b,026h,000h db "JIRACHI\6\6\6" ,0C9h,081h,081h,00010111b,07Fh,001h db "JOLTEON\6\6\6" ,022h,0B6h,087h,00011000b,086h,000h db "JUMP\6KICK\6\6\6" , 0,00000000b,019h,000h db "JUMPLUFF\6\6" ,04Eh,045h,0BDh,00011000b,0BCh,000h db "JYNX\6\6\6\6\6\6" ,01Ah,099h,07Ch,00011000b,07Bh,000h db "KABUTO\6\6\6\6" ,027h,0DEh,08Ch,00011000b,08Bh,000h db "KABUTOPS\6\6" ,028h,0DFh,08Dh,00011000b,08Ch,000h db "KADABRA\6\6\6" ,028h,05Ah,040h,00010000b,03Fh,000h db "KAKUNA\6\6\6\6" ,0D8h,01Ch,00Eh,00010000b,00Dh,000h db "KANGASKHAN" ,017h,0CDh,073h,00011000b,072h,000h db "KARATE\6CHOP\6" , 0,00000000b,001h,000h db "KECLEON\6\6\6" ,091h,060h,060h,00010111b,023h,001h db "KINESIS\6\6\6\6\6" , 0,00000000b,085h,000h db "KINGDRA\6\6\6" ,0BAh,0BCh,0E6h,00010000b,0E5h,000h db "KINGLER\6\6\6" ,00Dh,0A5h,063h,00011000b,062h,000h db "KIRLIA\6\6\6\6" ,01Eh,019h,019h,00010111b,06Fh,001h db "KNOCK\6OFF\6\6\6" , 0,00000001b,019h,001h db "KOFFING\6\6\6" ,06Ch,072h,06Dh,00010000b,06Ch,000h db "KRABBY\6\6\6\6" ,00Ch,0A4h,062h,00011000b,061h,000h db "KYOGRE\6\6\6\6" ,0C6h,07Eh,07Eh,00010111b,07Ah,001h db "LAIRON\6\6\6\6" ,047h,031h,031h,00010111b,065h,001h db "LANTURN\6\6\6" ,0B6h,0AFh,0ABh,00010000b,0AAh,000h db "LAPRAS\6\6\6\6" ,01Eh,0DBh,083h,00011000b,082h,000h db "LARVITAR\6\6" ,07Dh,0F4h,0F6h,00011000b,0F5h,000h db "LATIAS\6\6\6\6" ,0C4h,07Ch,07Ch,00010111b,07Dh,001h db "LATIOS\6\6\6\6" ,0C5h,07Dh,07Dh,00010111b,07Eh,001h db "LEAF\6BLADE\6\6" , 0,00000001b,05Bh,001h db "LEDIAN\6\6\6\6" ,041h,01Fh,0A6h,00011000b,0A5h,000h db "LEDYBA\6\6\6\6" ,040h,01Eh,0A5h,00011000b,0A4h,000h db "LEECH\6LIFE\6\6" , 0,00000000b,08Ch,000h db "LEECH\6SEED\6\6" , 0,00000000b,048h,000h db "LEER\6\6\6\6\6\6\6\6" , 0,00000000b,02Ah,000h db "LICK\6\6\6\6\6\6\6\6" , 0,00000000b,079h,000h db "LICKITUNG\6" ,014h,0B2h,06Ch,00011000b,06Bh,000h db "LIGHT\6SCREEN" , 0,00000000b,070h,000h db "LILEEP\6\6\6\6" ,085h,059h,059h,00010111b,06Ah,001h db "LINOONE\6\6\6" ,00Dh,008h,008h,00010111b,007h,001h db "LOCK-ON\6\6\6\6\6" , 0,00000000b,0C6h,000h db "LOMBRE\6\6\6\6" ,014h,00Fh,00Fh,00010111b,00Eh,001h db "LOTAD\6\6\6\6\6" ,013h,00Eh,00Eh,00010111b,00Dh,001h db "LOUDRED\6\6\6" ,02Eh,026h,026h,00010111b,059h,001h db "LOVELY\6KISS\6" , 0,00000000b,08Dh,000h db "LOW\6KICK\6\6\6\6" , 0,00000000b,042h,000h db "LUDICOLO\6\6" ,015h,010h,010h,00010111b,00Fh,001h db "LUGIA\6\6\6\6\6" ,080h,0F7h,0F9h,00011000b,0F8h,000h db "LUNATONE\6\6" ,07Dh,051h,051h,00010111b,042h,001h db "LUSTER\6PURGE" , 0,00000001b,026h,001h db "LUVDISC\6\6\6" ,0B7h,072h,072h,00010111b,02Bh,001h db "MACH\6PUNCH\6\6" , 0,00000000b,0B6h,000h db "MACHAMP\6\6\6" ,04Bh,08Eh,044h,00010000b,043h,000h db "MACHOKE\6\6\6" ,04Ah,08Dh,043h,00010000b,042h,000h db "MACHOP\6\6\6\6" ,049h,08Ch,042h,00010000b,041h,000h db "MAGBY\6\6\6\6\6" ,077h,096h,0F0h,00011000b,0EFh,000h db "MAGCARGO\6\6" ,068h,0D4h,0DBh,00010000b,0DAh,000h db "MAGIC\6COAT\6\6" , 0,00000001b,014h,001h db "MAGICAL\6LEAF" , 0,00000001b,058h,001h db "MAGIKARP\6\6" ,034h,04Ch,081h,00010000b,080h,000h db "MAGMAR\6\6\6\6" ,01Ch,097h,07Eh,00011000b,07Dh,000h db "MAGNEMITE\6" ,052h,076h,051h,00010000b,050h,000h db "MAGNETON\6\6" ,053h,077h,052h,00010000b,051h,000h db "MAGNITUDE\6\6\6" , 0,00000000b,0DDh,000h db "MAKUHITA\6\6" ,030h,028h,028h,00010111b,035h,001h db "MANECTRIC\6" ,04Fh,036h,036h,00010111b,038h,001h db "MANKEY\6\6\6\6" ,0F3h,086h,038h,00010000b,037h,000h db "MANTINE\6\6\6" ,06Dh,0C5h,0E2h,00011000b,0E1h,000h db "MAREEP\6\6\6\6" ,047h,035h,0B3h,00011000b,0B2h,000h db "MARILL\6\6\6\6" ,037h,082h,0B7h,00010000b,0B6h,000h db "MAROWAK\6\6\6" ,011h,0CCh,069h,00011000b,068h,000h db "MARSHTOMP\6" ,008h,003h,003h,00010111b,002h,001h db "MASQUERAIN" ,021h,01Ch,01Ch,00010111b,01Eh,001h db "MAWILE\6\6\6\6" ,045h,02Fh,02Fh,00010111b,049h,001h db "MEAN\6LOOK\6\6\6" , 0,00000000b,0D3h,000h db "MEDICHAM\6\6" ,04Dh,034h,034h,00010111b,04Bh,001h db "MEDITATE\6\6\6\6" , 0,00000000b,05Fh,000h db "MEDITITE\6\6" ,04Ch,033h,033h,00010111b,04Ah,001h db "MEGA\6DRAIN\6\6" , 0,00000000b,047h,000h db "MEGA\6KICK\6\6\6" , 0,00000000b,018h,000h db "MEGA\6PUNCH\6\6" , 0,00000000b,004h,000h db "MEGAHORN\6\6\6\6" , 0,00000000b,0DFh,000h db "MEGANIUM\6\6" ,035h,003h,09Ah,00011000b,099h,000h db "MEMENTO\6\6\6\6\6" , 0,00000001b,005h,001h db "MEOWTH\6\6\6\6" ,0F1h,088h,034h,00010000b,033h,000h db "METAGROSS\6" ,0C0h,078h,078h,00010111b,076h,001h db "METAL\6CLAW\6\6" , 0,00000000b,0E7h,000h db "METAL\6SOUND\6" , 0,00000001b,03Eh,001h db "METANG\6\6\6\6" ,0BFh,077h,077h,00010111b,075h,001h db "METAPOD\6\6\6" ,0D5h,019h,00Bh,00010000b,00Ah,000h db "METEOR\6MASH\6" , 0,00000001b,034h,001h db "METRONOME\6\6\6" , 0,00000000b,075h,000h db "MEW\6\6\6\6\6\6\6" ,032h,0FAh,097h,00011000b,096h,000h db "MEWTWO\6\6\6\6" ,031h,0F9h,096h,00011000b,095h,000h db "MIGHTYENA\6" ,00Bh,006h,006h,00010111b,005h,001h db "MILK\6DRINK\6\6" , 0,00000000b,0CFh,000h db "MILOTIC\6\6\6" ,08Dh,05Eh,05Eh,00010111b,02Fh,001h db "MILTANK\6\6\6" ,078h,095h,0F1h,00011000b,0F0h,000h db "MIMIC\6\6\6\6\6\6\6" , 0,00000000b,065h,000h db "MIND\6READER\6" , 0,00000000b,0A9h,000h db "MINIMIZE\6\6\6\6" , 0,00000000b,06Ah,000h db "MINUN\6\6\6\6\6" ,051h,038h,038h,00010111b,048h,001h db "MIRROR\6COAT\6" , 0,00000000b,0F2h,000h db "MIRROR\6MOVE\6" , 0,00000000b,076h,000h db "MISDREAVUS" ,059h,0D6h,0C8h,00011000b,0C7h,000h db "MIST\6\6\6\6\6\6\6\6" , 0,00000000b,035h,000h db "MIST\6BALL\6\6\6" , 0,00000001b,027h,001h db "MOLTRES\6\6\6" ,02Dh,0EDh,092h,00011000b,091h,000h db "MOONLIGHT\6\6\6" , 0,00000000b,0EBh,000h db "MORNING\6SUN\6" , 0,00000000b,0E9h,000h db "MR\6MIME\6\6\6" ,018h,09Ch,07Ah,00011000b,079h,000h db "MUD-SLAP\6\6\6\6" , 0,00000000b,0BCh,000h db "MUD\6SHOT\6\6\6\6" , 0,00000001b,054h,001h db "MUD\6SPORT\6\6\6" , 0,00000001b,02Bh,001h db "MUDDY\6WATER\6" , 0,00000001b,049h,001h db "MUDKIP\6\6\6\6" ,007h,002h,002h,00010111b,001h,001h db "MUK\6\6\6\6\6\6\6" ,06Bh,075h,059h,00010000b,058h,000h db "MURKROW\6\6\6" ,057h,0D0h,0C6h,00011000b,0C5h,000h db "NATU\6\6\6\6\6\6" ,0A2h,09Fh,0B1h,00010000b,0B0h,000h db "NATURE\6POWER" , 0,00000001b,00Ah,001h db "NEEDLE\6ARM\6\6" , 0,00000001b,02Dh,001h db "NIDOKING\6\6" ,0E8h,064h,022h,00010000b,021h,000h db "NIDOQUEEN\6" ,0E5h,061h,01Fh,00010000b,01Eh,000h db "NIDORAN\6F\6" ,0E6h,062h,020h,00010000b,01Fh,000h db "NIDORAN\6M\6" ,0E3h,05Fh,01Dh,00010000b,01Ch,000h db "NIDORINA\6\6" ,0E4h,060h,01Eh,00010000b,01Dh,000h db "NIDORINO\6\6" ,0E7h,063h,021h,00010000b,020h,000h db "NIGHT\6SHADE\6" , 0,00000000b,064h,000h db "NIGHTMARE\6\6\6" , 0,00000000b,0AAh,000h db "NINCADA\6\6\6" ,02Ah,022h,022h,00010111b,013h,001h db "NINETALES\6" ,09Ah,07Eh,026h,00010000b,025h,000h db "NINJASK\6\6\6" ,02Bh,023h,023h,00010111b,014h,001h db "NOCTOWL\6\6\6" ,03Fh,010h,0A4h,00011000b,0A3h,000h db "NOSEPASS\6\6" ,03Ch,02Bh,02Bh,00010111b,026h,001h db "NUMEL\6\6\6\6\6" ,065h,042h,042h,00010111b,039h,001h db "NUZLEAF\6\6\6" ,017h,012h,012h,00010111b,011h,001h db "OCTAZOOKA\6\6\6" , 0,00000000b,0BDh,000h db "OCTILLERY\6" ,06Bh,0ADh,0E0h,00011000b,0DFh,000h db "ODDISH\6\6\6\6" ,058h,053h,02Bh,00010000b,02Ah,000h db "ODOR\6SLEUTH\6" , 0,00000001b,03Bh,001h db "OMANYTE\6\6\6" ,025h,0DCh,08Ah,00011000b,089h,000h db "OMASTAR\6\6\6" ,026h,0DDh,08Bh,00011000b,08Ah,000h db "ONIX\6\6\6\6\6\6" ,009h,03Eh,05Fh,00011000b,05Eh,000h db "OUTRAGE\6\6\6\6\6" , 0,00000000b,0C7h,000h db "OVERHEAT\6\6\6\6" , 0,00000001b,03Ah,001h db "PAIN\6SPLIT\6\6" , 0,00000000b,0DBh,000h db "PARAS\6\6\6\6\6" ,0EBh,046h,02Eh,00010000b,02Dh,000h db "PARASECT\6\6" ,0ECh,047h,02Fh,00010000b,02Eh,000h db "PAY\6DAY\6\6\6\6\6" , 0,00000000b,005h,000h db "PECK\6\6\6\6\6\6\6\6" , 0,00000000b,03Fh,000h db "PELIPPER\6\6" ,01Ch,017h,017h,00010111b,01Ch,001h db "PERISH\6SONG\6" , 0,00000000b,0C2h,000h db "PERSIAN\6\6\6" ,0F2h,089h,035h,00010000b,034h,000h db "PETAL\6DANCE\6" , 0,00000000b,04Fh,000h db "PHANPY\6\6\6\6" ,0A5h,0C3h,0E7h,00010000b,0E6h,000h db "PICHU\6\6\6\6\6" ,09Bh,015h,0ACh,00010000b,0ABh,000h db "PIDGEOT\6\6\6" ,0DCh,00Ch,012h,00010000b,011h,000h db "PIDGEOTTO\6" ,0DBh,00Bh,011h,00010000b,010h,000h db "PIDGEY\6\6\6\6" ,0DAh,00Ah,010h,00010000b,00Fh,000h db "PIKACHU\6\6\6" ,09Ch,016h,019h,00010000b,018h,000h db "PILOSWINE\6" ,069h,0C0h,0DDh,00011000b,0DCh,000h db "PIN\6MISSILE\6" , 0,00000000b,029h,000h db "PINECO\6\6\6\6" ,05Bh,05Dh,0CCh,00011000b,0CBh,000h db "PINSIR\6\6\6\6" ,0A7h,070h,07Fh,00010000b,07Eh,000h db "PLUSLE\6\6\6\6" ,050h,037h,037h,00010111b,047h,001h db "POISON\6FANG\6" , 0,00000001b,030h,001h db "POISON\6GAS\6\6" , 0,00000000b,08Ah,000h db "POISON\6STING" , 0,00000000b,027h,000h db "POISON\6TAIL\6" , 0,00000001b,055h,001h db "POISONPOWDER" , 0,00000000b,04Ch,000h db "POLITOED\6\6" ,04Bh,04Bh,0BAh,00011000b,0B9h,000h db "POLIWAG\6\6\6" ,0F7h,048h,03Ch,00010000b,03Bh,000h db "POLIWHIRL\6" ,0F8h,049h,03Dh,00010000b,03Ch,000h db "POLIWRATH\6" ,0F9h,04Ah,03Eh,00010000b,03Dh,000h db "PONYTA\6\6\6\6" ,0FDh,0C9h,04Dh,00010000b,04Ch,000h db "POOCHYENA\6" ,00Ah,005h,005h,00010111b,004h,001h db "PORYGON\6\6\6" ,024h,0D7h,089h,00011000b,088h,000h db "PORYGONZ\6\6" ,070h,0D8h,0E9h,00011000b,0E8h,000h db "POUND\6\6\6\6\6\6\6" , 0,00000000b,000h,000h db "POWDER\6SNOW\6" , 0,00000000b,0B4h,000h db "PRESENT\6\6\6\6\6" , 0,00000000b,0D8h,000h db "PRIMEAPE\6\6" ,0F4h,087h,039h,00010000b,038h,000h db "PROTECT\6\6\6\6\6" , 0,00000000b,0B5h,000h db "PSYBEAM\6\6\6\6\6" , 0,00000000b,03Bh,000h db "PSYCH\6UP\6\6\6\6" , 0,00000000b,0F3h,000h db "PSYCHIC\6\6\6\6\6" , 0,00000000b,05Dh,000h db "PSYCHO\6BOOST" , 0,00000001b,061h,001h db "PSYDUCK\6\6\6" ,09Eh,08Ah,036h,00010000b,035h,000h db "PSYWAVE\6\6\6\6\6" , 0,00000000b,094h,000h db "PUPITAR\6\6\6" ,07Eh,0F5h,0F7h,00011000b,0F6h,000h db "PURSUIT\6\6\6\6\6" , 0,00000000b,0E3h,000h db "QUAGSIRE\6\6" ,054h,039h,0C3h,00011000b,0C2h,000h db "QUICK\6ATTACK" , 0,00000000b,061h,000h db "QUILAVA\6\6\6" ,037h,005h,09Ch,00011000b,09Bh,000h db "QWILFISH\6\6" ,062h,0A1h,0D3h,00011000b,0D2h,000h db "RAGE\6\6\6\6\6\6\6\6" , 0,00000000b,062h,000h db "RAICHU\6\6\6\6" ,09Dh,017h,01Ah,00010000b,019h,000h db "RAIKOU\6\6\6\6" ,07Ah,0EEh,0F3h,00011000b,0F2h,000h db "RAIN\6DANCE\6\6" , 0,00000000b,0EFh,000h db "RALTS\6\6\6\6\6" ,01Dh,018h,018h,00010111b,06Eh,001h db "RAPID\6SPIN\6\6" , 0,00000000b,0E4h,000h db "RAPIDASH\6\6" ,0FEh,0CAh,04Eh,00010000b,04Dh,000h db "RATICATE\6\6" ,0DEh,012h,014h,00010000b,013h,000h db "RATTATA\6\6\6" ,0DDh,011h,013h,00010000b,012h,000h db "RAYQUAZA\6\6" ,0C8h,080h,080h,00010111b,07Ch,001h db "RAZOR\6LEAF\6\6" , 0,00000000b,04Ah,000h db "RAZOR\6WIND\6\6" , 0,00000000b,00Ch,000h db "RECOVER\6\6\6\6\6" , 0,00000000b,068h,000h db "RECYCLE\6\6\6\6\6" , 0,00000001b,015h,001h db "REFLECT\6\6\6\6\6" , 0,00000000b,072h,000h db "REFRESH\6\6\6\6\6" , 0,00000001b,01Eh,001h db "REGICE\6\6\6\6" ,0C2h,07Ah,07Ah,00010111b,078h,001h db "REGIROCK\6\6" ,0C1h,079h,079h,00010111b,077h,001h db "REGISTEEL\6" ,0C3h,07Bh,07Bh,00010111b,079h,001h db "RELICANTH\6" ,0B3h,071h,071h,00010111b,063h,001h db "REMORAID\6\6" ,06Ah,0ACh,0DFh,00011000b,0DEh,000h db "REST\6\6\6\6\6\6\6\6" , 0,00000000b,09Bh,000h db "RETURN\6\6\6\6\6\6" , 0,00000000b,0D7h,000h db "REVENGE\6\6\6\6\6" , 0,00000001b,016h,001h db "REVERSAL\6\6\6\6" , 0,00000000b,0B2h,000h db "RHYDON\6\6\6\6" ,0AAh,0CFh,070h,00010000b,06Fh,000h db "RHYHORN\6\6\6" ,0A9h,0CEh,06Fh,00010000b,06Eh,000h db "ROAR\6\6\6\6\6\6\6\6" , 0,00000000b,02Dh,000h db "ROCK\6BLAST\6\6" , 0,00000001b,05Dh,001h db "ROCK\6SLIDE\6\6" , 0,00000000b,09Ch,000h db "ROCK\6SMASH\6\6" , 0,00000000b,0F8h,000h db "ROCK\6THROW\6\6" , 0,00000000b,057h,000h db "ROCK\6TOMB\6\6\6" , 0,00000001b,03Ch,001h db "ROLE\6PLAY\6\6\6" , 0,00000001b,00Fh,001h db "ROLLING\6KICK" , 0,00000000b,01Ah,000h db "ROLLOUT\6\6\6\6\6" , 0,00000000b,0CCh,000h db "ROSELIA\6\6\6" ,05Eh,03Bh,03Bh,00010111b,051h,001h db "SABLEYE\6\6\6" ,044h,02Eh,02Eh,00010111b,028h,001h db "SACRED\6FIRE\6" , 0,00000000b,0DCh,000h db "SAFEGUARD\6\6\6" , 0,00000000b,0DAh,000h db "SALAMENCE\6" ,0BDh,075h,075h,00010111b,073h,001h db "SAND-ATTACK\6" , 0,00000000b,01Bh,000h db "SAND\6TOMB\6\6\6" , 0,00000001b,047h,001h db "SANDSHREW\6" ,070h,030h,01Bh,00010000b,01Ah,000h db "SANDSLASH\6" ,071h,031h,01Ch,00010000b,01Bh,000h db "SANDSTORM\6\6\6" , 0,00000000b,0C8h,000h db "SCARY\6FACE\6\6" , 0,00000000b,0B7h,000h db "SCEPTILE\6\6" ,003h,0FEh,0FEh,00010000b,0FDh,000h db "SCIZOR\6\6\6\6" ,063h,06Fh,0D4h,00011000b,0D3h,000h db "SCRATCH\6\6\6\6\6" , 0,00000000b,009h,000h db "SCREECH\6\6\6\6\6" , 0,00000000b,066h,000h db "SCYTHER\6\6\6" ,019h,06Eh,07Bh,00011000b,07Ah,000h db "SEADRA\6\6\6\6" ,0B9h,0BBh,075h,00010000b,074h,000h db "SEAKING\6\6\6" ,033h,04Fh,077h,00010000b,076h,000h db "SEALEO\6\6\6\6" ,0AEh,06Ch,06Ch,00010111b,03Ch,001h db "SECRET\6POWER" , 0,00000001b,021h,001h db "SEEDOT\6\6\6\6" ,016h,011h,011h,00010111b,010h,001h db "SEEL\6\6\6\6\6\6" ,002h,0B0h,056h,00011000b,055h,000h db "SEISMIC\6TOSS" , 0,00000000b,044h,000h db "SELFDESTRUCT" , 0,00000000b,077h,000h db "SENTRET\6\6\6" ,03Ch,013h,0A1h,00011000b,0A0h,000h db "SEVIPER\6\6\6" ,07Ch,050h,050h,00010111b,061h,001h db "SHADOW\6BALL\6" , 0,00000000b,0F6h,000h db "SHADOW\6PUNCH" , 0,00000001b,044h,001h db "SHARPEDO\6\6" ,062h,03Fh,03Fh,00010111b,031h,001h db "SHARPEN\6\6\6\6\6" , 0,00000000b,09Eh,000h db "SHEDINJA\6\6" ,02Ch,024h,024h,00010111b,015h,001h db "SHEER\6COLD\6\6" , 0,00000001b,048h,001h db "SHELGON\6\6\6" ,0BCh,074h,074h,00010111b,072h,001h db "SHELLDER\6\6" ,004h,0A9h,05Ah,00011000b,059h,000h db "SHIFTRY\6\6\6" ,018h,013h,013h,00010111b,012h,001h db "SHOCK\6WAVE\6\6" , 0,00000001b,05Eh,001h db "SHROOMISH\6" ,022h,01Dh,01Dh,00010111b,018h,001h db "SHUCKLE\6\6\6" ,064h,0A6h,0D5h,00011000b,0D4h,000h db "SHUPPET\6\6\6" ,092h,061h,061h,00010111b,05Fh,001h db "SIGNAL\6BEAM\6" , 0,00000001b,043h,001h db "SILCOON\6\6\6" ,00Fh,00Ah,00Ah,00010111b,009h,001h db "SILVER\6WIND\6" , 0,00000001b,03Dh,001h db "SING\6\6\6\6\6\6\6\6" , 0,00000000b,02Eh,000h db "SKARMORY\6\6" ,073h,0C6h,0E3h,00010000b,0E2h,000h db "SKETCH\6\6\6\6\6\6" , 0,00000000b,0A5h,000h db "SKILL\6SWAP\6\6" , 0,00000001b,01Ch,001h db "SKIPLOOM\6\6" ,04Dh,044h,0BCh,00011000b,0BBh,000h db "SKITTY\6\6\6\6" ,03Dh,02Ch,02Ch,00010111b,021h,001h db "SKULL\6BASH\6\6" , 0,00000000b,081h,000h db "SKY\6ATTACK\6\6" , 0,00000000b,08Eh,000h db "SKY\6UPPERCUT" , 0,00000001b,046h,001h db "SLACK\6OFF\6\6\6" , 0,00000001b,02Eh,001h db "SLAKING\6\6\6" ,026h,021h,021h,00010111b,054h,001h db "SLAKOTH\6\6\6" ,024h,01Fh,01Fh,00010111b,052h,001h db "SLAM\6\6\6\6\6\6\6\6" , 0,00000000b,014h,000h db "SLASH\6\6\6\6\6\6\6" , 0,00000000b,0A2h,000h db "SLEEP\6POWDER" , 0,00000000b,04Eh,000h db "SLEEP\6TALK\6\6" , 0,00000000b,0D5h,000h db "SLOWBRO\6\6\6" ,000h,051h,050h,00011000b,04Fh,000h db "SLOWKING\6\6" ,058h,052h,0C7h,00011000b,0C6h,000h db "SLOWPOKE\6\6" ,0FFh,050h,04Fh,00010000b,04Eh,000h db "SLUDGE\6\6\6\6\6\6" , 0,00000000b,07Bh,000h db "SLUDGE\6BOMB\6" , 0,00000000b,0BBh,000h db "SLUGMA\6\6\6\6" ,067h,0D3h,0DAh,00010000b,0D9h,000h db "SMEARGLE\6\6" ,072h,09Dh,0EBh,00011000b,0EAh,000h db "SMELLINGSALT" , 0,00000001b,008h,001h db "SMOG\6\6\6\6\6\6\6\6" , 0,00000000b,07Ah,000h db "SMOKESCREEN\6" , 0,00000000b,06Bh,000h db "SMOOCHUM\6\6" ,075h,098h,0EEh,00011000b,0EDh,000h db "SNATCH\6\6\6\6\6\6" , 0,00000001b,020h,001h db "SNEASEL\6\6\6" ,065h,0D5h,0D7h,00011000b,0D6h,000h db "SNORE\6\6\6\6\6\6\6" , 0,00000000b,0ACh,000h db "SNORLAX\6\6\6" ,02Ah,0E1h,08Fh,00011000b,08Eh,000h db "SNORUNT\6\6\6" ,0ABh,069h,069h,00010111b,040h,001h db "SNUBBULL\6\6" ,060h,07Bh,0D1h,00011000b,0D0h,000h db "SOFTBOILED\6\6" , 0,00000000b,086h,000h db "SOLARBEAM\6\6\6" , 0,00000000b,04Bh,000h db "SOLROCK\6\6\6" ,07Eh,052h,052h,00010111b,043h,001h db "SONICBOOM\6\6\6" , 0,00000000b,030h,000h db "SPARK\6\6\6\6\6\6\6" , 0,00000000b,0D0h,000h db "SPEAROW\6\6\6" ,0DFh,00Dh,015h,00010000b,014h,000h db "SPHEAL\6\6\6\6" ,0ADh,06Bh,06Bh,00010111b,03Bh,001h db "SPIDER\6WEB\6\6" , 0,00000000b,0A8h,000h db "SPIKE\6CANNON" , 0,00000000b,082h,000h db "SPIKES\6\6\6\6\6\6" , 0,00000000b,0BEh,000h db "SPINARAK\6\6" ,042h,020h,0A7h,00011000b,0A6h,000h db "SPINDA\6\6\6\6" ,072h,047h,047h,00010111b,01Ah,001h db "SPIT\6UP\6\6\6\6\6" , 0,00000000b,0FEh,000h db "SPITE\6\6\6\6\6\6\6" , 0,00000000b,0B3h,000h db "SPLASH\6\6\6\6\6\6" , 0,00000000b,095h,000h db "SPOINK\6\6\6\6" ,06Eh,045h,045h,00010111b,045h,001h db "SPORE\6\6\6\6\6\6\6" , 0,00000000b,092h,000h db "SQUIRTLE\6\6" ,0D1h,0E8h,007h,00010000b,006h,000h db "STANTLER\6\6" ,071h,081h,0EAh,00011000b,0E9h,000h db "STARMIE\6\6\6" ,090h,0A8h,079h,00010000b,078h,000h db "STARYU\6\6\6\6" ,08Fh,0A7h,078h,00010000b,077h,000h db "STEEL\6WING\6\6" , 0,00000000b,0D2h,000h db "STEELIX\6\6\6" ,05Fh,03Fh,0D0h,00011000b,0CFh,000h db "STOCKPILE\6\6\6" , 0,00000000b,0FDh,000h db "STOMP\6\6\6\6\6\6\6" , 0,00000000b,016h,000h db "STRENGTH\6\6\6\6" , 0,00000000b,045h,000h db "STRING\6SHOT\6" , 0,00000000b,050h,000h db "STRUGGLE\6\6\6\6" , 0,00000000b,0A4h,000h db "STUN\6SPORE\6\6" , 0,00000000b,04Dh,000h db "SUBMISSION\6\6" , 0,00000000b,041h,000h db "SUBSTITUTE\6\6" , 0,00000000b,0A3h,000h db "SUDOWOODO\6" ,04Ah,06Ah,0B9h,00011000b,0B8h,000h db "SUICUNE\6\6\6" ,07Ch,0F0h,0F5h,00011000b,0F4h,000h db "SUNFLORA\6\6" ,051h,067h,0C0h,00011000b,0BFh,000h db "SUNKERN\6\6\6" ,050h,066h,0BFh,00011000b,0BEh,000h db "SUNNY\6DAY\6\6\6" , 0,00000000b,0F0h,000h db "SUPER\6FANG\6\6" , 0,00000000b,0A1h,000h db "SUPERPOWER\6\6" , 0,00000001b,013h,001h db "SUPERSONIC\6\6" , 0,00000000b,02Fh,000h db "SURF\6\6\6\6\6\6\6\6" , 0,00000000b,038h,000h db "SURSKIT\6\6\6" ,020h,01Bh,01Bh,00010111b,01Dh,001h db "SWABLU\6\6\6\6" ,079h,04Dh,04Dh,00010111b,04Ch,001h db "SWAGGER\6\6\6\6\6" , 0,00000000b,0CEh,000h db "SWALLOW\6\6\6\6\6" , 0,00000000b,0FFh,000h db "SWALOT\6\6\6\6" ,060h,03Dh,03Dh,00010111b,056h,001h db "SWAMPERT\6\6" ,009h,004h,004h,00010111b,003h,001h db "SWEET\6KISS\6\6" , 0,00000000b,0B9h,000h db "SWEET\6SCENT\6" , 0,00000000b,0E5h,000h db "SWELLOW\6\6\6" ,01Ah,015h,015h,00010111b,017h,001h db "SWIFT\6\6\6\6\6\6\6" , 0,00000000b,080h,000h db "SWINUB\6\6\6\6" ,068h,0BFh,0DCh,00011000b,0DBh,000h db "SWORDS\6DANCE" , 0,00000000b,00Dh,000h db "SYNTHESIS\6\6\6" , 0,00000000b,0EAh,000h db "TACKLE\6\6\6\6\6\6" , 0,00000000b,020h,000h db "TAIL\6GLOW\6\6\6" , 0,00000001b,025h,001h db "TAIL\6WHIP\6\6\6" , 0,00000000b,026h,000h db "TAILLOW\6\6\6" ,019h,014h,014h,00010111b,016h,001h db "TAKE\6DOWN\6\6\6" , 0,00000000b,023h,000h db "TANGELA\6\6\6" ,016h,0B3h,072h,00011000b,071h,000h db "TAUNT\6\6\6\6\6\6\6" , 0,00000001b,00Ch,001h db "TAUROS\6\6\6\6" ,01Dh,094h,080h,00011000b,07Fh,000h db "TEDDIURSA\6" ,066h,0C1h,0D8h,00011000b,0D7h,000h db "TEETER\6DANCE" , 0,00000001b,029h,001h db "TELEPORT\6\6\6\6" , 0,00000000b,063h,000h db "TENTACOOL\6" ,042h,0A2h,048h,00010000b,047h,000h db "TENTACRUEL" ,043h,0A3h,049h,00010000b,048h,000h db "THIEF\6\6\6\6\6\6\6" , 0,00000000b,0A7h,000h db "THRASH\6\6\6\6\6\6" , 0,00000000b,024h,000h db "THUNDER\6\6\6\6\6" , 0,00000000b,056h,000h db "THUNDER\6WAVE" , 0,00000000b,055h,000h db "THUNDERBOLT\6" , 0,00000000b,054h,000h db "THUNDERPUNCH" , 0,00000000b,008h,000h db "THUNDERSHOCK" , 0,00000000b,053h,000h db "TICKLE\6\6\6\6\6\6" , 0,00000001b,040h,001h db "TOGEPI\6\6\6\6" ,045h,02Eh,0AFh,00011000b,0AEh,000h db "TOGETIC\6\6\6" ,046h,02Fh,0B0h,00011000b,0AFh,000h db "TORCHIC\6\6\6" ,004h,0FFh,0FFh,00010000b,0FEh,000h db "TORKOAL\6\6\6" ,069h,044h,044h,00010111b,027h,001h db "TORMENT\6\6\6\6\6" , 0,00000001b,002h,001h db "TOTODILE\6\6" ,039h,007h,09Eh,00011000b,09Dh,000h db "TOXIC\6\6\6\6\6\6\6" , 0,00000000b,05Bh,000h db "TRANSFORM\6\6\6" , 0,00000000b,08Fh,000h db "TRAPINCH\6\6" ,074h,048h,048h,00010111b,032h,001h db "TREECKO\6\6\6" ,001h,0FCh,0FCh,00010000b,0FBh,000h db "TRI\6ATTACK\6\6" , 0,00000000b,0A0h,000h db "TRICK\6\6\6\6\6\6\6" , 0,00000001b,00Eh,001h db "TRIPLE\6KICK\6" , 0,00000000b,0A6h,000h db "TROPIUS\6\6\6" ,096h,065h,065h,00010111b,057h,001h db "TWINEEDLE\6\6\6" , 0,00000000b,028h,000h db "TWISTER\6\6\6\6\6" , 0,00000000b,0EEh,000h db "TYPHLOSION" ,038h,006h,09Dh,00011000b,09Ch,000h db "TYRANITAR\6" ,07Fh,0F6h,0F8h,00011000b,0F7h,000h db "TYROGUE\6\6\6" ,073h,08Fh,0ECh,00011000b,0EBh,000h db "UMBREON\6\6\6" ,056h,0B9h,0C5h,00011000b,0C4h,000h db "UNOWN\6\6\6\6\6" ,05Ah,03Dh,0C9h,00011000b,0C8h,000h db "UPROAR\6\6\6\6\6\6" , 0,00000000b,0FCh,000h db "URSARING\6\6" ,067h,0C2h,0D9h,00011000b,0D8h,000h db "VAPOREON\6\6" ,021h,0B5h,086h,00011000b,085h,000h db "VENOMOTH\6\6" ,0EEh,06Dh,031h,00010000b,030h,000h db "VENONAT\6\6\6" ,0EDh,06Ch,030h,00010000b,02Fh,000h db "VENUSAUR\6\6" ,0CDh,0E4h,003h,00010000b,002h,000h db "VIBRAVA\6\6\6" ,075h,049h,049h,00010111b,033h,001h db "VICEGRIP\6\6\6\6" , 0,00000000b,00Ah,000h db "VICTREEBEL" ,0FCh,042h,047h,00010000b,046h,000h db "VIGOROTH\6\6" ,025h,020h,020h,00010111b,053h,001h db "VILEPLUME\6" ,05Ah,055h,02Dh,00010000b,02Ch,000h db "VINE\6WHIP\6\6\6" , 0,00000000b,015h,000h db "VITAL\6THROW\6" , 0,00000000b,0E8h,000h db "VOLBEAT\6\6\6" ,056h,039h,039h,00010111b,068h,001h db "VOLT\6TACKLE\6" , 0,00000001b,057h,001h db "VOLTORB\6\6\6" ,054h,078h,064h,00010000b,063h,000h db "VULPIX\6\6\6\6" ,099h,07Dh,025h,00010000b,024h,000h db "WAILMER\6\6\6" ,063h,040h,040h,00010111b,01Fh,001h db "WAILORD\6\6\6" ,064h,041h,041h,00010111b,020h,001h db "WALREIN\6\6\6" ,0AFh,06Dh,06Dh,00010111b,03Dh,001h db "WARTORTLE\6" ,0D2h,0E9h,008h,00010000b,007h,000h db "WATER\6GUN\6\6\6" , 0,00000000b,036h,000h db "WATER\6PULSE\6" , 0,00000001b,05Fh,001h db "WATER\6SPORT\6" , 0,00000001b,059h,001h db "WATER\6SPOUT\6" , 0,00000001b,042h,001h db "WATERFALL\6\6\6" , 0,00000000b,07Eh,000h db "WEATHER\6BALL" , 0,00000001b,036h,001h db "WEEDLE\6\6\6\6" ,0D7h,01Bh,00Dh,00010000b,00Ch,000h db "WEEPINBELL" ,0FBh,041h,046h,00010000b,045h,000h db "WEEZING\6\6\6" ,06Dh,073h,06Eh,00010000b,06Dh,000h db "WHIRLPOOL\6\6\6" , 0,00000000b,0F9h,000h db "WHIRLWIND\6\6\6" , 0,00000000b,011h,000h db "WHISCASH\6\6" ,080h,054h,054h,00010111b,02Ah,001h db "WHISMUR\6\6\6" ,02Dh,025h,025h,00010111b,058h,001h db "WIGGLYTUFF" ,08Bh,02Dh,028h,00010000b,027h,000h db "WILL-O-WISP\6" , 0,00000001b,004h,001h db "WING\6ATTACK\6" , 0,00000000b,010h,000h db "WINGULL\6\6\6" ,01Bh,016h,016h,00010111b,01Bh,001h db "WISH\6\6\6\6\6\6\6\6" , 0,00000001b,010h,001h db "WITHDRAW\6\6\6\6" , 0,00000000b,06Dh,000h db "WOBBUFFET\6" ,0A1h,06Bh,0CAh,00010000b,0C9h,000h db "WOOPER\6\6\6\6" ,053h,038h,0C2h,00011000b,0C1h,000h db "WRAP\6\6\6\6\6\6\6\6" , 0,00000000b,022h,000h db "WURMPLE\6\6\6" ,00Eh,009h,009h,00010111b,008h,001h db "WYNAUT\6\6\6\6" ,0A0h,068h,068h,00010111b,04Eh,001h db "XATU\6\6\6\6\6\6" ,0A3h,0A0h,0B2h,00010000b,0B1h,000h db "YANMA\6\6\6\6\6" ,052h,065h,0C1h,00011000b,0C0h,000h db "YAWN\6\6\6\6\6\6\6\6" , 0,00000001b,018h,001h db "ZANGOOSE\6\6" ,07Bh,04Fh,04Fh,00010111b,062h,001h db "ZAP\6CANNON\6\6" , 0,00000000b,0BFh,000h db "ZAPDOS\6\6\6\6" ,02Ch,0ECh,091h,00011000b,090h,000h db "ZIGZAGOON\6" ,00Ch,007h,007h,00010111b,006h,001h alpha_list_last: db "ZUBAT\6\6\6\6\6" ,03Fh,025h,029h,00010000b,028h,000h alpha_list_end: ; to break the search algorithm & prevent displaying gibberish - 6 entries of Stemp characters db [7*16]0CBh p_kana: db 22 ; Height db 22 ; Width db 000h,080h ,070h ; ; db 07Ah,040h ,020h ; ; E db 001h,000h ,070h ; ; db 07Ch,000h ,000h ; DE db 010h,070h/2,050h ; ; ; db 010h,0A8h/2,010h ; ; ; N db 020h,0A8h/2,060h ; ; no ; db 000h,048h/2,000h ; db 02Ah,001h ,050h ; ; db 002h,028h/2,010h ;(K) ; ; CU db 00Ch,0F4h/2,060h ; ; ; db 000h,028h/2,000h ; PO db 010h,0A8h/2,070h ; ; ; db 01Ch,020h/2,010h ; ; ; KO db 024h,000h ,070h ; KU ; db 008h,040h/2,000h ; ; db 010h,07Ch/2,020h ; ; ; db 000h,090h/2,0F8h ; KE ; db 01Ch,010h/2,088h ; ; ; db 004h,020h/2,008h ; SU ; ; U db 008h,000h ,010h ; ; db 014h,000h ,060h ; ; p_kana_end:
agda/book/Programming_Language_Foundations_in_Agda/x09-747Decidable-hc.agda
haroldcarr/learn-haskell-coq-ml-etc
36
2589
<gh_stars>10-100 module x09-747Decidable-hc where -- Library import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; cong; refl; sym) -- added sym open Eq.≡-Reasoning open import Data.Nat using (ℕ; zero; suc; _≤_; z≤n; s≤s) open import Data.Product using (_×_; proj₁; proj₂) renaming (_,_ to ⟨_,_⟩) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Relation.Nullary using (¬_) open import Relation.Nullary.Negation using () renaming (contradiction to ¬¬-intro) open import Data.Unit using (⊤; tt) open import Data.Empty using (⊥; ⊥-elim) -- Copied from 747Isomorphism. record _⇔_ (A B : Set) : Set where field to : A → B from : B → A open _⇔_ -- Copied from 747Relations. infix 4 _<_ data _<_ : ℕ → ℕ → Set where z<s : ∀ {n : ℕ} ------------ → zero < suc n s<s : ∀ {m n : ℕ} → m < n ------------- → suc m < suc n -- examples proving inequalities and their negations 2≤4 : 2 ≤ 4 2≤4 = s≤s (s≤s z≤n) ¬4≤2 : ¬ (4 ≤ 2) ¬4≤2 = λ { (s≤s (s≤s ())) } -- Bool values (computation) data Bool : Set where true : Bool false : Bool -- Boolean comparison function infix 4 _≤ᵇ_ _≤ᵇ_ : ℕ → ℕ → Bool zero ≤ᵇ zero = true zero ≤ᵇ suc n = true suc m ≤ᵇ zero = false suc m ≤ᵇ suc n = m ≤ᵇ n -- PLFA steps through these computations using equational reasoning. _ : (2 ≤ᵇ 4) ≡ true _ = refl _ : (4 ≤ᵇ 2) ≡ false _ = refl -- Relating evidence and computation. -- Boolean types (evidence) T : Bool → Set T true = ⊤ T false = ⊥ T→≡ : ∀ (b : Bool) → T b → b ≡ true T→≡ true tt = refl ≡→T : ∀ {b : Bool} → b ≡ true → T b ≡→T refl = tt ≤ᵇ→≤ : ∀ (m n : ℕ) → T (m ≤ᵇ n) → m ≤ n ≤ᵇ→≤ zero zero t = z≤n ≤ᵇ→≤ zero (suc n) t = z≤n ≤ᵇ→≤ (suc m) (suc n) t = s≤s (≤ᵇ→≤ m n t) ≤→≤ᵇ : ∀ {m n : ℕ} → m ≤ n → T (m ≤ᵇ n) ≤→≤ᵇ {zero} {zero} z≤n = tt ≤→≤ᵇ {zero} {suc n} z≤n = tt ≤→≤ᵇ (s≤s m≤n) = ≤→≤ᵇ m≤n -- computation and evidence data Dec (A : Set) : Set where yes : A → Dec A no : ¬ A → Dec A inv-s≤s : ∀ {m n : ℕ} → suc m ≤ suc n ------------- → m ≤ n inv-s≤s (s≤s m≤n) = m≤n -- helpers for defining _≤?_ (use these so examples will normalize) ¬s≤z : ∀ {m : ℕ} → ¬ (suc m ≤ zero) ¬s≤z = λ () ¬s≤s : ∀ {m n : ℕ} → ¬ (m ≤ n) → ¬ (suc m ≤ suc n) ¬s≤s {zero} {zero} ¬m≤n = λ sucm≤sucn → ¬m≤n z≤n ¬s≤s {zero} {suc n} ¬m≤n = λ sucm≤sucn → ¬m≤n z≤n ¬s≤s {suc m} {zero} ¬m≤n = λ { (s≤s sucm≤sucn) → ¬m≤n sucm≤sucn } ¬s≤s {suc m} {suc n} ¬m≤n = λ { (s≤s sucm≤sucn) → ¬m≤n (s≤s (inv-s≤s sucm≤sucn)) } -- Decidable ≤. _≤?_ : ∀ (m n : ℕ) → Dec (m ≤ n) zero ≤? zero = yes z≤n zero ≤? suc n = yes z≤n suc m ≤? zero = no (λ ()) suc m ≤? suc n with m ≤? n ... | yes m≤n = yes (s≤s m≤n) ... | no ¬m≤n = no (¬s≤s ¬m≤n) -- can also evaluate the LHS of these tests via C-c C-n _ : 2 ≤? 4 ≡ yes (s≤s (s≤s z≤n)) _ = refl _ : 4 ≤? 2 ≡ no (¬s≤s (¬s≤s ¬s≤z)) _ = refl -- 747/PLFA exercise: DecLT (3 point) -- Decidable strict equality. -- You will need these helper functions as we did above. ¬z<z : ¬ (zero < zero) ¬z<z = λ () ¬s<s : ∀ {m n : ℕ} → ¬ (m < n) → ¬ (suc m < suc n) ¬s<s ¬m<n = λ { (s<s sucm<sucn) → ¬m<n sucm<sucn } ¬s<z : ∀ {n : ℕ} → ¬ (suc n < zero) ¬s<z = λ () _<?_ : ∀ (m n : ℕ) → Dec (m < n) zero <? zero = no (λ ()) zero <? suc n = yes z<s suc m <? zero = no (λ ()) suc m <? suc n with m <? n ... | yes m<n = yes (s<s m<n) ... | no ¬m<n = no (¬s<s ¬m<n) _ : 2 <? 4 ≡ yes (s<s (s<s (z<s))) _ = refl _ : 4 <? 2 ≡ no (¬s<s (¬s<s ¬s<z)) _ = refl _ : 3 <? 3 ≡ no (¬s<s (¬s<s (¬s<s ¬z<z))) _ = refl -- 747/PLFA exercise: DecNatEq (3 points) -- Decidable equality for natural numbers. _≡ℕ?_ : ∀ (m n : ℕ) → Dec (m ≡ n) zero ≡ℕ? zero = yes refl zero ≡ℕ? suc n = no (λ ()) suc m ≡ℕ? zero = no (λ ()) suc m ≡ℕ? suc n with m ≡ℕ? n ... | yes m≡n = yes (cong suc m≡n) ... | no ¬m≡n = no λ { refl → ¬m≡n refl } -- reusing ≤ᵇ and proofs of equivalence with ≤ to decide ≤ _≤?′_ : ∀ (m n : ℕ) → Dec (m ≤ n) m ≤?′ n with m ≤ᵇ n | ≤ᵇ→≤ m n | ≤→≤ᵇ {m} {n} ... | true | ⊤→m≤n | _ = yes (⊤→m≤n tt) ... | false | _ | m≤n→⊥ = no (λ m≤n → m≤n→⊥ m≤n) -- extract Bool value from Dec (aka "isYes") ⌊_⌋ : ∀ {A : Set} → Dec A → Bool ⌊ yes x ⌋ = true ⌊ no x ⌋ = false _≤ᵇ′_ : ℕ → ℕ → Bool m ≤ᵇ′ n = ⌊ m ≤? n ⌋ -- If D is Dec A, then T ⌊ D ⌋ is inhabited exactly when A is inhabited. toWitness : ∀ {A : Set} {D : Dec A} → T ⌊ D ⌋ → A toWitness {_} {yes a} t = a fromWitness : ∀ {A : Set} {D : Dec A} → A → T ⌊ D ⌋ fromWitness {_} {yes _} _ = tt fromWitness {_} {no ¬A} a = ¬A a -- handle "no" witnesses isNo : ∀ {A : Set} → Dec A → Bool isNo (yes _) = false isNo (no _) = true toWitnessFalse : ∀ {A : Set} {D : Dec A} → T (isNo D) → ¬ A toWitnessFalse {_} {no ¬A} _ = ¬A fromWitnessFalse : ∀ {A : Set} {D : Dec A} → ¬ A → T (isNo D) fromWitnessFalse {_} {yes A } ¬A = ¬A A fromWitnessFalse {A} {no ¬A'} ¬A = tt -- Agda standard library definitions for use of these. True : ∀ {A : Set} → (D : Dec A) → Set True Q = T ⌊ Q ⌋ False : ∀ {A : Set} → (D : Dec A) → Set False Q = T (isNo Q) -- concrete examples ≤ᵇ′→≤ : ∀ {m n : ℕ} → T (m ≤ᵇ′ n) → m ≤ n ≤ᵇ′→≤ = toWitness ≤→≤ᵇ′ : ∀ {m n : ℕ} → m ≤ n → T (m ≤ᵇ′ n) ≤→≤ᵇ′ = fromWitness -- BEST PRACTICE : use Decidables instead of Booleans. -- Logical connectives for Decidables. infixr 6 _∧_ _∧_ : Bool → Bool → Bool true ∧ true = true true ∧ false = false false ∧ _ = false infixr 6 _×-dec_ _×-dec_ : ∀ {A B : Set} → Dec A → Dec B → Dec (A × B) yes A ×-dec yes B = yes ⟨ A , B ⟩ yes _ ×-dec no ¬B = no (λ A×B → ¬B (proj₂ A×B)) no ¬A ×-dec yes B = no (λ A×B → ¬A (proj₁ A×B)) no _ ×-dec no ¬B = no (λ A×B → ¬B (proj₂ A×B)) infixr 5 _∨_ _∨_ : Bool → Bool → Bool true ∨ _ = true false ∨ r = r infixr 5 _⊎-dec_ _⊎-dec_ : ∀ {A B : Set} → Dec A → Dec B → Dec (A ⊎ B) yes A ⊎-dec yes _ = yes (inj₁ A) yes A ⊎-dec no _ = yes (inj₁ A) no _ ⊎-dec yes B = yes (inj₂ B) no ¬A ⊎-dec no ¬B = no (λ { (inj₁ A) → ¬A A ; (inj₂ B) → ¬B B } ) not : Bool → Bool not true = false not false = true ¬? : ∀ {A : Set} → Dec A → Dec (¬ A) ¬? (yes A) = no (λ ¬A → ¬A A) ¬? (no ¬A) = yes ¬A -- Boolean version of implication _⊃_ : Bool → Bool → Bool true ⊃ true = true true ⊃ false = false false ⊃ _ = true _→-dec_ : ∀ {A B : Set} → Dec A → Dec B → Dec (A → B) _ →-dec yes B = yes (λ _ → B) no ¬A →-dec _ = yes (λ A → ⊥-elim (¬A A)) yes A →-dec no ¬B = no (λ A→B → ¬B (A→B A)) -- 747/PLFA exercise: ErasBoolDec (3 points) -- Erasure relates boolean and decidable operations. ∧-× : ∀ {A B : Set} (x : Dec A) (y : Dec B) → ⌊ x ⌋ ∧ ⌊ y ⌋ ≡ ⌊ x ×-dec y ⌋ ∧-× (no _) (no _) = refl ∧-× (no _) (yes _) = refl ∧-× (yes _) (no _) = refl ∧-× (yes _) (yes _) = refl -- true ≡ true ∨-× : ∀ {A B : Set} (x : Dec A) (y : Dec B) → ⌊ x ⌋ ∨ ⌊ y ⌋ ≡ ⌊ x ⊎-dec y ⌋ ∨-× (no _) (no _) = refl ∨-× (no _) (yes _) = refl ∨-× (yes _) (no _) = refl ∨-× (yes _) (yes _) = refl not-¬ : ∀ {A : Set} (x : Dec A) → not ⌊ x ⌋ ≡ ⌊ ¬? x ⌋ not-¬ (yes _) = refl not-¬ (no _) = refl -- 747/PLFA exercise: iff-erasure. _iff_ : Bool → Bool → Bool true iff true = true false iff false = true true iff false = false false iff true = false _⇔-dec_ : ∀ {A B : Set} → Dec A → Dec B → Dec (A ⇔ B) yes A ⇔-dec yes B = yes (record { to = λ _ → B ; from = λ _ → A }) yes A ⇔-dec no ¬B = no (λ A⇔B → ¬B (to A⇔B A)) no ¬A ⇔-dec yes B = no (λ A⇔B → ¬A (from A⇔B B)) no ¬A ⇔-dec no ¬B = yes (record { to = λ A → ⊥-elim (¬A A) ; from = λ B → ⊥-elim (¬B B) }) iff-⇔ : ∀ {A B : Set} (x : Dec A) (y : Dec B) → ⌊ x ⌋ iff ⌊ y ⌋ ≡ ⌊ x ⇔-dec y ⌋ iff-⇔ (yes _) (yes _) = refl iff-⇔ (yes _) (no _) = refl iff-⇔ (no _) (yes _) = refl iff-⇔ (no ¬A) (no ¬B) = refl -- proof by reflection (i.g., get Agda to construct proofs at compile time) -- guarded version of monus minus : (m n : ℕ) (n≤m : n ≤ m) → ℕ minus m zero _ = m minus (suc m) (suc n) (s≤s m≤n) = minus m n m≤n -- but must provide proofs _ : minus 5 3 (s≤s (s≤s (s≤s z≤n))) ≡ 2 _ = refl -- Agda will fill in an implicit record type if it can fill in all fields. -- Since ⊤ is defined as a record type with no fields... -- then Agda will compute a value of type True (n ≤? m). _-_ : (m n : ℕ) {n≤m : True (n ≤? m)} → ℕ _-_ m n {n≤m} = minus m n (toWitness n≤m) -- then proofs no longer needed _ : 5 - 3 ≡ 2 _ = refl -- Use above to get Agda to compute parts of proofs that would be annoying for us to provide.
test/interaction/Imports/Issue5357-B.agda
cruhland/agda
1,989
12965
module Imports.Issue5357-B where import Imports.Issue5357-D
spaceship/src/missile.adb
kndtime/ada-spaceship
0
14425
<reponame>kndtime/ada-spaceship package body Missile is procedure appear_mis(s : in out Missile; X : Integer; Y : Integer; Max_Y : Integer) is begin if s.State /= DEAD then return; end if; s.X := X + 10; s.Y := Y + 40; s.Max_Y := Max_Y; s.State := ALIVE; end appear_mis; procedure move_mis(s : in out Missile) is begin if s.State = DEAD then return; end if; s.Y := (s.Y + 5); if S.Max_Y <= s.Y then s.State := DEAD; end if; end move_mis; end Missile;
arch/ARM/Nordic/drivers/nrf_common/nrf-clock.adb
rocher/Ada_Drivers_Library
192
22982
<filename>arch/ARM/Nordic/drivers/nrf_common/nrf-clock.adb ------------------------------------------------------------------------------ -- -- -- Copyright (C) 2016-2020, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. 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. -- -- 3. Neither the name of the copyright holder 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. -- -- -- ------------------------------------------------------------------------------ with NRF_SVD.CLOCK; use NRF_SVD.CLOCK; with nRF.Tasks; use nRF.Tasks; package body nRF.Clock is -------------------------------------- -- Set_High_Freq_External_Frequency -- -------------------------------------- procedure Set_High_Freq_External_Frequency (Freq : High_Freq_Ext_Freq) is separate; -------------------------- -- Set_High_Freq_Source -- -------------------------- procedure Set_High_Freq_Source (Src : High_Freq_Source_Kind) is begin CLOCK_Periph.HFCLKSTAT.SRC := (case Src is when HFCLK_RC => Rc, when HFCLK_XTAL => Xtal); end Set_High_Freq_Source; ---------------------- -- High_Freq_Source -- ---------------------- function High_Freq_Source return High_Freq_Source_Kind is begin case CLOCK_Periph.HFCLKSTAT.SRC is when Rc => return HFCLK_RC; when Xtal => return HFCLK_XTAL; end case; end High_Freq_Source; ----------------------- -- High_Freq_Running -- ----------------------- function High_Freq_Running return Boolean is begin return CLOCK_Periph.HFCLKSTAT.STATE = Running; end High_Freq_Running; --------------------- -- Start_High_Freq -- --------------------- procedure Start_High_Freq is begin Tasks.Trigger (Tasks.Clock_HFCLKSTART); end Start_High_Freq; -------------------- -- Stop_High_Freq -- -------------------- procedure Stop_High_Freq is begin Tasks.Trigger (Tasks.Clock_HFCLKSTOP); end Stop_High_Freq; ------------------------- -- Set_Low_Freq_Source -- ------------------------- procedure Set_Low_Freq_Source (Src : Low_Freq_Source_Kind) is begin CLOCK_Periph.LFCLKSRC.SRC := (case Src is when LFCLK_RC => Rc, when LFCLK_XTAL => Xtal, when LFCLK_SYNTH => Synth); end Set_Low_Freq_Source; --------------------- -- Low_Freq_Source -- --------------------- function Low_Freq_Source return Low_Freq_Source_Kind is begin case CLOCK_Periph.LFCLKSTAT.SRC is when Rc => return LFCLK_RC; when Xtal => return LFCLK_XTAL; when Synth => return LFCLK_SYNTH; end case; end Low_Freq_Source; ---------------------- -- Low_Freq_Running -- ---------------------- function Low_Freq_Running return Boolean is begin return CLOCK_Periph.LFCLKSTAT.STATE = Running; end Low_Freq_Running; -------------------- -- Start_Low_Freq -- -------------------- procedure Start_Low_Freq is begin Tasks.Trigger (Tasks.Clock_LFCLKSTART); end Start_Low_Freq; ------------------- -- Stop_Low_Freq -- ------------------- procedure Stop_Low_Freq is begin Tasks.Trigger (Tasks.Clock_LFCLKSTOP); end Stop_Low_Freq; end nRF.Clock;
src/main/antlr/Slang.g4
RehMaar/swatt
0
6066
<filename>src/main/antlr/Slang.g4 grammar Slang; program : block EOF ; block : statements+=statement (statements+=statement)* ; statement : whileStmt | ifStmt | assignStmt | reassignStmt ; whileStmt : WHILEKW LPAR cond=expr RPAR LBRA body=block RBRA ; ifStmt : IFKW LPAR cond=expr RPAR LBRA thenC=block RBRA (ELSEKW LBRA elseC=block RBRA)? ; assignStmt : ASSIGNKW IDENT ASSNG expr ; reassignStmt : IDENT ASSNG expr ; // Better when EQ and NEQ has no assoc at all but I didn't get how to do it with ANTLR. expr : left=expr op=(MULT | DIV) right=expr # BinaryOp | left=expr op=(EQ | GT | GE | LT | LE | NEQ) right=expr # BinaryOp | left=expr op=(PLUS | MINUS) right=expr # BinaryOp | LPAR exprInPar=expr RPAR # ParExpr | LITERAL # Literal | IDENT # Identifier ; // Lexer part. LPAR : '(' ; RPAR : ')' ; LBRA : '{' ; RBRA : '}' ; ASSNG : '=' ; NEQ : '!=' ; LE : '<=' ; LT : '<' ; GE : '>=' ; GT : '>' ; EQ : '==' ; DIV : '/' ; MULT : '*' ; MINUS : '-' ; PLUS : '+' ; WHILEKW : 'while' ; IFKW : 'if' ; ELSEKW : 'else' ; ASSIGNKW : 'let' ; IDENT : '_'* ([a-zA-Z]) ('_' | [0-9] | [a-zA-Z])* ; LITERAL : '-'? ([1-9]) ([0-9])* | '-'? '0' ; WS : [ \t\n\r]+ -> skip ; NEWLINE : [\n]+ ;
theorems/groups/KernelSndImageInl.agda
mikeshulman/HoTT-Agda
0
10673
{-# OPTIONS --without-K --rewriting #-} open import HoTT module groups.KernelSndImageInl {i j k} (G : Group i) {H : Group j} {K : Group k} -- the argument [φ-snd], which is intended to be [φ ∘ᴳ ×-snd], -- gives the possibility of making the second part -- (the proof of being a group homomorphism) abstract. (φ : H →ᴳ K) (φ-snd : G ×ᴳ H →ᴳ K) (φ-snd-β : ∀ x → GroupHom.f φ-snd x == GroupHom.f φ (snd x)) (G×H-is-abelian : is-abelian (G ×ᴳ H)) where open import groups.KernelImage φ-snd (×ᴳ-inl {G = G} {H = H}) G×H-is-abelian private module G = Group G module H = Group H Ker-φ-snd-quot-Im-inl : Ker φ ≃ᴳ Ker/Im Ker-φ-snd-quot-Im-inl = to-hom , is-eq to from to-from from-to where to : Ker.El φ → Ker/Im.El to (h , h-in-ker) = q[ (G.ident , h) , lemma ] where abstract lemma = φ-snd-β (G.ident , h) ∙ h-in-ker abstract to-pres-comp : ∀ k₁ k₂ → to (Ker.comp φ k₁ k₂) == Ker/Im.comp (to k₁) (to k₂) to-pres-comp _ _ = ap q[_] $ Ker.El=-out φ-snd $ pair×= (! (G.unit-l G.ident)) idp to-hom : Ker φ →ᴳ Ker/Im to-hom = group-hom to to-pres-comp abstract from' : Ker.El φ-snd → Ker.El φ from' ((g , h) , h-in-ker) = h , ! (φ-snd-β (g , h)) ∙ h-in-ker from-rel : ∀ {gh₁ gh₂} → ker/im-rel gh₁ gh₂ → from' gh₁ == from' gh₂ from-rel {gh₁} {gh₂} = Trunc-rec (Ker.El-is-set φ _ _) (λ{(g , inl-g=h₁h₂⁻¹) → Ker.El=-out φ (H.zero-diff-same (snd (fst gh₁)) (snd (fst gh₂)) (! (snd×= inl-g=h₁h₂⁻¹)))}) from : Ker/Im.El → Ker.El φ from = SetQuot-rec (Ker.El-is-set φ) from' from-rel abstract to-from : ∀ g → to (from g) == g to-from = SetQuot-elim {P = λ g → to (from g) == g} (λ _ → =-preserves-set Ker/Im.El-is-set) (λ{((g , h) , h-in-ker) → quot-rel [ G.inv g , ap2 _,_ (! (G.unit-l (G.inv g))) (! (H.inv-r h)) ]}) (λ _ → prop-has-all-paths-↓ (Ker/Im.El-is-set _ _)) from-to : ∀ g → from (to g) == g from-to _ = Ker.El=-out φ idp
oeis/097/A097067.asm
neoneye/loda-programs
11
1958
<reponame>neoneye/loda-programs ; A097067: Expansion of (1-4*x+5*x^2)/(1-2*x)^2. ; 1,0,1,4,12,32,80,192,448,1024,2304,5120,11264,24576,53248,114688,245760,524288,1114112,2359296,4980736,10485760,22020096,46137344,96468992,201326592,419430400,872415232,1811939328,3758096384,7784628224,16106127360,33285996544,68719476736,141733920768,292057776128,601295421440,1236950581248,2542620639232,5222680231936,10720238370816,21990232555520,45079976738816,92358976733184,189115999977472,387028092977152,791648371998720,1618481116086272,3307330976350208,6755399441055744,13792273858822144 mov $1,2 lpb $0 trn $0,1 pow $1,$0 mul $1,$0 sub $2,$0 add $0,$2 lpe div $1,2 mov $0,$1
src/Selective/Examples/ChatAO.agda
Zalastax/thesis
1
2045
<gh_stars>1-10 module Selective.Examples.ChatAO where open import Selective.ActorMonad open import Selective.Libraries.Channel open import Selective.Libraries.Call2 open import Selective.Libraries.ActiveObjects open import Prelude hiding (Maybe) open import Data.Maybe as Maybe hiding (map) open import Data.List.Properties open import Category.Monad open import Debug open import Data.Nat.Show using (show) RoomName = ℕ ClientName = ℕ Room-to-Client : InboxShape record Client : Set where field name : ClientName channel : UniqueTag ClientList : Set ClientList = List Client record RoomState : Set₁ where field clients : ClientList cl-to-context : ClientList → TypingContext cl-to-context = map λ _ → Room-to-Client rs-to-context : RoomState → TypingContext rs-to-context rs = let open RoomState in cl-to-context (rs .clients) record ChatMessageContent : Set where constructor chat-from_message:_ field sender : ClientName message : String SendChatMessage : MessageType SendChatMessage = [ ValueType ChatMessageContent ]ˡ ReceiveChatMessage : MessageType ReceiveChatMessage = ValueType UniqueTag ∷ [ ValueType ChatMessageContent ]ˡ chat-message-header : ActiveMethod chat-message-header = VoidMethod [ SendChatMessage ]ˡ Room-to-Client = [ ReceiveChatMessage ]ˡ AddToRoom : MessageType AddToRoom = ValueType UniqueTag ∷ ValueType ClientName ∷ [ ReferenceType Room-to-Client ]ˡ add-to-room-header : ActiveMethod add-to-room-header = VoidMethod [ AddToRoom ]ˡ LeaveRoom : MessageType LeaveRoom = [ ValueType ClientName ]ˡ leave-room-header : ActiveMethod leave-room-header = VoidMethod [ LeaveRoom ]ˡ room-methods : List ActiveMethod room-methods = chat-message-header ∷ leave-room-header ∷ [ add-to-room-header ]ˡ room-inbox = methods-shape room-methods add-to-room : (active-method room-inbox RoomState rs-to-context add-to-room-header) add-to-room _ (Msg Z (tag ∷ client-name ∷ _ ∷ [])) state = do let open RoomState state' = record { clients = record { name = client-name ; channel = tag } ∷ state .clients } strengthen (Z ∷ ⊆-refl) return₁ state' add-to-room _ (Msg (S ()) _) record RoomLeave (rs : ClientList) (name : ClientName) : Set₁ where field filtered : ClientList subs : (cl-to-context filtered) ⊆ (cl-to-context rs) leave-room : (active-method room-inbox RoomState rs-to-context leave-room-header) leave-room _ (Msg Z (client-name ∷ [])) state = do let open RoomState open RoomLeave rl = remove-first-client (state .clients) client-name state' = record { clients = rl .filtered } debug ("client#" || show client-name || " left the room") (strengthen (rl .subs)) return₁ state' where remove-first-client : (cl : ClientList) → (name : ClientName) → RoomLeave cl name remove-first-client [] name = record { filtered = [] ; subs = [] } remove-first-client (x ∷ cl) name with ((Client.name x) ≟ name) ... | (yes _) = record { filtered = cl ; subs = ⊆-suc ⊆-refl } ... | (no _) = let rec = remove-first-client cl name open RoomLeave in record { filtered = x ∷ rec .filtered ; subs = Z ∷ ⊆-suc (rec .subs) } leave-room _ (Msg (S ()) _) _ chat-message : (active-method room-inbox RoomState rs-to-context chat-message-header) chat-message _ (Msg Z ((chat-from sender message: message) ∷ [])) state = do let open RoomState debug-msg = ("room sending " || show (pred (length (state .clients))) || " messages from " || show sender || ": " || message) debug debug-msg (send-to-others (state .clients) sender message) return₁ state where ++-temp-fix : (l r : ClientList) → (x : Client) → (l ++ (x ∷ r)) ≡ ((l ∷ʳ x) ++ r) ++-temp-fix [] r x = refl ++-temp-fix (x₁ ∷ l) r x = cong (_∷_ x₁) (++-temp-fix l r x) send-to-others : ∀ {i} → (cl : ClientList) → ClientName → String → ∞ActorM i room-inbox ⊤₁ (cl-to-context cl) (λ _ → cl-to-context cl) send-to-others [] _ _ = return _ send-to-others cl@(_ ∷ _) name message = send-loop [] cl where build-pointer : (l r : ClientList) → cl-to-context r ⊢ Room-to-Client → (cl-to-context (l ++ r)) ⊢ Room-to-Client build-pointer [] r p = p build-pointer (x ∷ l) r p = S (build-pointer l r p) recurse : ∀ {i} → (l r : ClientList) → (x : Client) → ∞ActorM i room-inbox ⊤₁ (cl-to-context (l ++ (x ∷ r))) (λ _ → (cl-to-context (l ++ (x ∷ r)))) send-loop : ∀ {i} → (l r : ClientList) → ∞ActorM i room-inbox ⊤₁ (cl-to-context (l ++ r)) (λ _ → cl-to-context (l ++ r)) send-loop l [] = return _ send-loop l (x ∷ r) with ((Client.name x) ≟ name) ... | (yes _) = recurse l r x ... | (no _) = let p = build-pointer l (x ∷ r) Z in debug ("Sending to " || show (Client.name x) || ": " || message) (p ![t: Z ] (lift (Client.channel x) ∷ [ lift (chat-from name message: message) ]ᵃ) ) >> recurse l r x recurse l r x rewrite ++-temp-fix l r x = send-loop (l ∷ʳ x) r chat-message _ (Msg (S ()) _) _ room : ActiveObject room = record { state-type = RoomState ; vars = rs-to-context ; methods = room-methods ; extra-messages = [] ; handlers = chat-message ∷ leave-room ∷ [ add-to-room ]ᵃ } Client-to-Room : InboxShape Client-to-Room = SendChatMessage ∷ [ LeaveRoom ]ˡ -- ============= -- JOIN ROOM -- ============= data JoinRoomSuccess : Set where JR-SUCCESS : RoomName → JoinRoomSuccess data JoinRoomFail : Set where JR-FAIL : RoomName → JoinRoomFail data JoinRoomStatus : Set where JRS-SUCCESS JRS-FAIL : RoomName → JoinRoomStatus JoinRoomSuccessReply : MessageType JoinRoomSuccessReply = ValueType UniqueTag ∷ ValueType JoinRoomSuccess ∷ [ ReferenceType Client-to-Room ]ˡ JoinRoomFailReply : MessageType JoinRoomFailReply = ValueType UniqueTag ∷ [ ValueType JoinRoomFail ]ˡ JoinRoomReplyInterface : InboxShape JoinRoomReplyInterface = JoinRoomSuccessReply ∷ JoinRoomFailReply ∷ Room-to-Client JoinRoom : MessageType JoinRoom = ValueType UniqueTag ∷ ReferenceType JoinRoomReplyInterface ∷ ValueType RoomName ∷ [ ValueType ClientName ]ˡ -- ============= -- CREATE ROOM -- ============= data CreateRoomResult : Set where CR-SUCCESS CR-EXISTS : RoomName → CreateRoomResult CreateRoomReply : MessageType CreateRoomReply = ValueType UniqueTag ∷ [ ValueType CreateRoomResult ]ˡ CreateRoom : MessageType CreateRoom = ValueType UniqueTag ∷ ReferenceType [ CreateRoomReply ]ˡ ∷ [ ValueType RoomName ]ˡ -- ============ -- LIST ROOMS -- ============ RoomList : Set RoomList = List RoomName ListRoomsReply : MessageType ListRoomsReply = ValueType UniqueTag ∷ [ ValueType RoomList ]ˡ ListRooms : MessageType ListRooms = ValueType UniqueTag ∷ [ ReferenceType [ ListRoomsReply ]ˡ ]ˡ -- === -- -- === Client-to-RoomManager : InboxShape Client-to-RoomManager = JoinRoom ∷ CreateRoom ∷ [ ListRooms ]ˡ RoomManagerInterface : InboxShape RoomManagerInterface = Client-to-RoomManager GetRoomManagerReply : MessageType GetRoomManagerReply = ValueType UniqueTag ∷ [ ReferenceType RoomManagerInterface ]ˡ GetRoomManager : MessageType GetRoomManager = ValueType UniqueTag ∷ [ ReferenceType [ GetRoomManagerReply ]ˡ ]ˡ get-room-manager-ci : ChannelInitiation get-room-manager-ci = record { request = [ GetRoomManager ]ˡ ; response = record { channel-shape = [ GetRoomManagerReply ]ˡ ; all-tagged = (HasTag _) ∷ [] } ; request-tagged = (HasTag+Ref _) ∷ [] } get-room-manager-header : ActiveMethod get-room-manager-header = ResponseMethod get-room-manager-ci RoomSupervisorInterface : InboxShape RoomSupervisorInterface = [ GetRoomManager ]ˡ ClientSupervisorInterface : InboxShape ClientSupervisorInterface = [ ReferenceType RoomSupervisorInterface ]ˡ ∷ [ GetRoomManagerReply ]ˡ -- -- -- -- ====================== -- ROOM MANAGER METHODS -- ====================== join-room-header : ActiveMethod join-room-header = VoidMethod [ JoinRoom ]ˡ create-room-ci : ChannelInitiation create-room-ci = record { request = [ CreateRoom ]ˡ ; response = record { channel-shape = [ CreateRoomReply ]ˡ ; all-tagged = (HasTag _) ∷ [] } ; request-tagged = (HasTag+Ref _) ∷ [] } create-room-header : ActiveMethod create-room-header = ResponseMethod create-room-ci list-rooms-header : ActiveMethod list-rooms-header = ResponseMethod (record { request = [ ListRooms ]ˡ ; response = record { channel-shape = [ ListRoomsReply ]ˡ ; all-tagged = (HasTag _) ∷ [] } ; request-tagged = (HasTag+Ref _) ∷ [] }) record RoomManagerState : Set₁ where field rooms : RoomList rms-to-context : RoomManagerState → TypingContext rms-to-context rms = let open RoomManagerState rl-to-context : RoomList → TypingContext rl-to-context = map λ _ → room-inbox in rl-to-context (rms .rooms) room-manager-methods : List ActiveMethod room-manager-methods = join-room-header ∷ create-room-header ∷ [ list-rooms-header ]ˡ room-manager-inbox = methods-shape room-manager-methods list-rooms : active-method room-manager-inbox RoomManagerState rms-to-context list-rooms-header list-rooms _ msg state = let open RoomManagerState in return₁ (record { new-state = state ; reply = SendM Z ((lift (state .rooms)) ∷ []) }) lookup-room : ∀ {i} → {Γ : TypingContext} → (rms : RoomManagerState) → RoomName → ∞ActorM i room-manager-inbox (Maybe ((Γ ++ (rms-to-context rms)) ⊢ room-inbox)) (Γ ++ (rms-to-context rms)) (λ _ → Γ ++ (rms-to-context rms)) lookup-room rms name = let open RoomManagerState in return₁ (loop _ (rms .rooms)) where rl-to-context : RoomList → TypingContext rl-to-context = map λ _ → room-inbox loop : (Γ : TypingContext) → (rl : RoomList) → Maybe ((Γ ++ rl-to-context rl) ⊢ room-inbox) loop [] [] = nothing loop [] (x ∷ xs) with (x ≟ name) ... | (yes p) = just Z ... | (no _) = RawMonad._>>=_ Maybe.monad (loop [] xs) λ p → just (S p) loop (x ∷ Γ) rl = RawMonad._>>=_ Maybe.monad (loop Γ rl) (λ p → just (S p)) create-room : active-method room-manager-inbox RoomManagerState rms-to-context create-room-header create-room _ input@(_ sent Msg Z (room-name ∷ [])) state = do p ← lookup-room state room-name handle-create-room p where open ResponseInput return-type = ActiveReply create-room-ci RoomManagerState rms-to-context input precondition = reply-state-vars rms-to-context input state postcondition = reply-vars rms-to-context input handle-create-room : ∀ {i} → Maybe (precondition ⊢ room-inbox) → ∞ActorM i room-manager-inbox return-type precondition postcondition handle-create-room (just x) = return₁ (record { new-state = state ; reply = SendM Z ((lift (CR-EXISTS room-name)) ∷ []) }) handle-create-room nothing = do spawn∞ (run-active-object room (record { clients = [] })) let open RoomManagerState state' : RoomManagerState state' = record { rooms = room-name ∷ state .rooms} strengthen ((S Z) ∷ (Z ∷ (⊆-suc (⊆-suc ⊆-refl)))) return₁ (record { new-state = state' ; reply = SendM Z ((lift (CR-SUCCESS room-name)) ∷ []) }) create-room _ (_ sent Msg (S ()) _) _ join-room : active-method room-manager-inbox RoomManagerState rms-to-context join-room-header join-room _ (Msg Z (tag ∷ _ ∷ room-name ∷ client-name ∷ [])) state = do p ← lookup-room state room-name handle-join-room p Z return₁ state where handle-join-room : ∀ {i Γ} → Maybe (Γ ⊢ room-inbox) → Γ ⊢ JoinRoomReplyInterface → ∞ActorM i room-manager-inbox ⊤₁ Γ (λ _ → Γ) handle-join-room (just rp) cp = do (rp ![t: S (S Z) ] ((lift tag) ∷ ((lift client-name) ∷ (([ cp ]>: [ S (S Z) ]ᵐ) ∷ [])))) (cp ![t: Z ] ((lift tag) ∷ ((lift (JR-SUCCESS room-name)) ∷ (([ rp ]>: (Z ∷ [ S Z ]ᵐ)) ∷ [])))) handle-join-room nothing cp = cp ![t: S Z ] ((lift tag) ∷ ((lift (JR-FAIL room-name)) ∷ [])) join-room _ (Msg (S ()) _) _ room-manager : ActiveObject room-manager = record { state-type = RoomManagerState ; vars = rms-to-context ; methods = room-manager-methods ; extra-messages = [] ; handlers = join-room ∷ (create-room ∷ (list-rooms ∷ [])) } -- ================= -- ROOM SUPERVISOR -- ================= rs-context : TypingContext rs-context = [ room-manager-inbox ]ˡ rs-vars : ⊤₁ → TypingContext rs-vars _ = rs-context room-supervisor-methods : List ActiveMethod room-supervisor-methods = [ get-room-manager-header ]ˡ rs-inbox = methods-shape room-supervisor-methods get-room-manager-handler : active-method rs-inbox ⊤₁ rs-vars get-room-manager-header get-room-manager-handler _ (_ sent Msg Z received-fields) _ = return₁ (record { new-state = _ ; reply = SendM Z [ [ (S Z) ]>: ⊆-refl ]ᵃ }) get-room-manager-handler _ (_ sent Msg (S ()) _) _ room-supervisor-ao : ActiveObject room-supervisor-ao = record { state-type = ⊤₁ ; vars = λ _ → rs-context ; methods = room-supervisor-methods ; extra-messages = [] ; handlers = [ get-room-manager-handler ]ᵃ } -- room-supervisor spawns the room-manager -- and provides an interface for getting a reference to the current room-manager -- we don't ever change that instance, but we could if we want room-supervisor : ∀ {i} → ActorM i RoomSupervisorInterface ⊤₁ [] (λ _ → rs-context) room-supervisor = begin do spawn∞ (run-active-object room-manager (record { rooms = [] })) run-active-object room-supervisor-ao _ -- ================ -- CLIENT GENERAL -- ================ ClientInterface : InboxShape ClientInterface = [ ReferenceType RoomManagerInterface ]ˡ ∷ CreateRoomReply ∷ ListRoomsReply ∷ JoinRoomReplyInterface busy-wait : ∀ {i IS Γ} → ℕ → ∞ActorM i IS ⊤₁ Γ (λ _ → Γ) busy-wait zero = return _ busy-wait (suc n) = return tt >> busy-wait n client-get-room-manager : ∀ {i} → ∞ActorM i ClientInterface ⊤₁ [] (λ _ → [ RoomManagerInterface ]ˡ) client-get-room-manager = do record { msg = Msg Z _} ← (selective-receive (λ { (Msg Z x₁) → true ; (Msg (S _) _) → false })) where record { msg = (Msg (S _) _) ; msg-ok = ()} return _ client-create-room : ∀ {i } → {Γ : TypingContext} → Γ ⊢ RoomManagerInterface → UniqueTag → RoomName → ∞ActorM i ClientInterface (Lift (lsuc lzero) CreateRoomResult) Γ (λ _ → Γ) client-create-room p tag name = do Msg Z (_ ∷ cr ∷ []) ← (call create-room-ci (record { var = p ; chosen-field = Z ; fields = (lift name) ∷ [] ; session = record { can-request = (S Z) ∷ [] ; response-session = record { can-receive = (S Z) ∷ [] ; tag = tag } } })) where Msg (S ()) _ return cr add-if-join-success : TypingContext → Lift (lsuc lzero) JoinRoomStatus → TypingContext add-if-join-success Γ (lift (JRS-SUCCESS x)) = Client-to-Room ∷ Γ add-if-join-success Γ (lift (JRS-FAIL x)) = Γ client-join-room : ∀ {i Γ} → Γ ⊢ RoomManagerInterface → UniqueTag → RoomName → ClientName → ∞ActorM i ClientInterface (Lift (lsuc lzero) JoinRoomStatus) Γ (add-if-join-success Γ) client-join-room p tag room-name client-name = do self S p ![t: Z ] (lift tag ∷ (([ Z ]>: ⊆-suc (⊆-suc (⊆-suc ⊆-refl))) ∷ (lift room-name) ∷ [ lift client-name ]ᵃ)) (strengthen (⊆-suc ⊆-refl)) m ← (selective-receive (select-join-reply tag)) handle-message m where select-join-reply : UniqueTag → MessageFilter ClientInterface select-join-reply tag (Msg Z _) = false select-join-reply tag (Msg (S Z) _) = false select-join-reply tag (Msg (S (S Z)) _) = false select-join-reply tag (Msg (S (S (S Z))) (tag' ∷ _)) = ⌊ tag ≟ tag' ⌋ select-join-reply tag (Msg (S (S (S (S Z)))) (tag' ∷ _)) = ⌊ tag ≟ tag' ⌋ select-join-reply tag (Msg (S (S (S (S (S Z))))) x₁) = false select-join-reply tag (Msg (S (S (S (S (S (S ())))))) _) handle-message : ∀ {tag i Γ} → (m : SelectedMessage (select-join-reply tag)) → ∞ActorM i ClientInterface (Lift (lsuc lzero) JoinRoomStatus) (add-selected-references Γ m) (add-if-join-success Γ) handle-message record { msg = (Msg Z _) ; msg-ok = () } handle-message record { msg = (Msg (S Z) _) ; msg-ok = () } handle-message record { msg = (Msg (S (S Z)) _) ; msg-ok = () } handle-message record { msg = (Msg (S (S (S Z))) (_ ∷ JR-SUCCESS room-name ∷ _ ∷ [])) } = return (JRS-SUCCESS room-name) handle-message record { msg = (Msg (S (S (S (S Z)))) (_ ∷ JR-FAIL room-name ∷ [])) } = return (JRS-FAIL room-name) handle-message record { msg = (Msg (S (S (S (S (S Z))))) _) ; msg-ok = () } handle-message record { msg = (Msg (S (S (S (S (S (S ())))))) _) } client-send-message : ∀ {i Γ} → Γ ⊢ Client-to-Room → ClientName → String → ∞ActorM i ClientInterface ⊤₁ Γ (λ _ → Γ) client-send-message p client-name message = p ![t: Z ] ([ lift (chat-from client-name message: message) ]ᵃ) client-receive-message : ∀ {i Γ} → ∞ActorM i ClientInterface (Lift (lsuc lzero) ChatMessageContent) Γ (λ _ → Γ) client-receive-message = do m ← (selective-receive select-message) handle-message m where select-message : MessageFilter ClientInterface select-message (Msg (S (S (S (S (S Z))))) _) = true select-message (Msg _ _) = false handle-message : ∀ {i Γ} → (m : SelectedMessage select-message) → ∞ActorM i ClientInterface (Lift (lsuc lzero) ChatMessageContent) (add-selected-references Γ m) (λ _ → Γ) handle-message record { msg = (Msg Z _) ; msg-ok = () } handle-message record { msg = (Msg (S Z) _) ; msg-ok = () } handle-message record { msg = (Msg (S (S Z)) _) ; msg-ok = () } handle-message record { msg = (Msg (S (S (S Z))) x₁) ; msg-ok = () } handle-message record { msg = (Msg (S (S (S (S Z)))) _) ; msg-ok = () } handle-message record { msg = (Msg (S (S (S (S (S Z))))) (_ ∷ m ∷ f)) ; msg-ok = _ } = return m handle-message record { msg = (Msg (S (S (S (S (S (S ())))))) _) } client-leave-room : ∀ {i Γ} → Γ ⊢ Client-to-Room → ClientName → ∞ActorM i ClientInterface ⊤₁ Γ (λ _ → Γ) client-leave-room p name = p ![t: S Z ] [ lift name ]ᵃ debug-chat : {a : Level} {A : Set a} → ClientName → ChatMessageContent → A → A debug-chat client-name content = let open ChatMessageContent in debug ("client#" || show client-name || " received \"" || content .message || "\" from client#" || show (content .sender)) -- ========== -- CLIENT 1 -- ========== room1-2 = 1 room2-3 = 2 room3-1 = 3 room1-2-3 = 4 name1 = 1 client1 : ∀ {i} → ActorM i ClientInterface ⊤₁ [] (λ _ → []) client1 = begin do client-get-room-manager _ ← (client-create-room Z 0 room1-2) _ ← (client-create-room Z 1 room3-1) _ ← (client-create-room Z 2 room1-2-3) lift (JRS-SUCCESS joined-room) ← (client-join-room Z 3 room3-1 name1) where (lift (JRS-FAIL failed-room)) → strengthen [] lift (JRS-SUCCESS joined-room) ← (client-join-room (S Z) 4 room1-2 name1) where (lift (JRS-FAIL failed-room)) → strengthen [] lift (JRS-SUCCESS joined-room) ← (client-join-room (S (S Z)) 5 room1-2-3 name1) where (lift (JRS-FAIL failed-room)) → strengthen [] busy-wait 100 (client-send-message (S Z) name1 "hi from 1 to 2") (client-send-message Z name1 "hi from 1 to 2-3") let open ChatMessageContent lift m1 ← client-receive-message lift m2 ← debug-chat name1 m1 client-receive-message lift m3 ← debug-chat name1 m2 client-receive-message debug-chat name1 m3 (client-send-message Z name1 "hi1 from 1 to 2-3") (client-send-message Z name1 "hi2 from 1 to 2-3") (client-send-message Z name1 "hi3 from 1 to 2-3") client-leave-room (S Z) name1 client-leave-room (Z) name1 (strengthen []) -- ========== -- CLIENT 2 -- ========== name2 = 2 client2 : ∀ {i} → ActorM i ClientInterface ⊤₁ [] (λ _ → []) client2 = begin do client-get-room-manager _ ← (client-create-room Z 0 room1-2) _ ← (client-create-room Z 1 room2-3) _ ← (client-create-room Z 2 room1-2-3) lift (JRS-SUCCESS joined-room) ← (client-join-room Z 3 room1-2 name2) where (lift (JRS-FAIL failed-room)) → strengthen [] lift (JRS-SUCCESS joined-room) ← (client-join-room (S Z) 4 room2-3 name2) where (lift (JRS-FAIL failed-room)) → strengthen [] lift (JRS-SUCCESS joined-room) ← (client-join-room (S (S Z)) 5 room1-2-3 name2) where (lift (JRS-FAIL failed-room)) → strengthen [] busy-wait 100 debug "client2 send message" (client-send-message (S Z) name2 "hi from 2 to 3") debug "client2 send message" (client-send-message Z name2 "hi from 2 to 1-3") let open ChatMessageContent lift m1 ← client-receive-message lift m2 ← debug-chat name2 m1 client-receive-message lift m3 ← debug-chat name2 m2 client-receive-message client-leave-room (S Z) name2 client-leave-room (Z) name2 debug-chat name2 m3 (strengthen []) -- ========== -- CLIENT 3 -- ========== name3 = 3 client3 : ∀ {i} → ActorM i ClientInterface ⊤₁ [] (λ _ → []) client3 = begin do client-get-room-manager _ ← (client-create-room Z 0 room2-3) _ ← (client-create-room Z 1 room3-1) _ ← (client-create-room Z 2 room1-2-3) lift (JRS-SUCCESS joined-room) ← (client-join-room Z 3 room2-3 name3) where (lift (JRS-FAIL failed-room)) → strengthen [] lift (JRS-SUCCESS joined-room) ← (client-join-room (S Z) 4 room3-1 name3) where (lift (JRS-FAIL failed-room)) → strengthen [] lift (JRS-SUCCESS joined-room) ← (client-join-room (S (S Z)) 5 room1-2-3 name3) where (lift (JRS-FAIL failed-room)) → strengthen [] busy-wait 100 debug "client3 send message" (client-send-message (S Z) name3 "hi from 3 to 1") debug "client3 send message" (client-send-message Z name3 "hi from 3 to 1-2") let open ChatMessageContent lift m1 ← client-receive-message lift m2 ← debug-chat name3 m1 client-receive-message lift m3 ← debug-chat name3 m2 client-receive-message debug-chat name3 m3 (client-leave-room Z name3) client-leave-room (S Z) name3 client-leave-room Z name3 (strengthen []) -- =================== -- CLIENT SUPERVISOR -- =================== cs-context : TypingContext cs-context = RoomManagerInterface ∷ RoomSupervisorInterface ∷ [] client-supervisor : ∀ {i} → ActorM i ClientSupervisorInterface ⊤₁ [] (λ _ → cs-context) client-supervisor = begin do wait-for-room-supervisor (get-room-manager Z 0) spawn-clients where wait-for-room-supervisor : ∀ {i Γ} → ∞ActorM i ClientSupervisorInterface ⊤₁ Γ (λ _ → RoomSupervisorInterface ∷ Γ) wait-for-room-supervisor = do record { msg = Msg Z f } ← (selective-receive (λ { (Msg Z _) → true ; (Msg (S _) _) → false })) where record { msg = (Msg (S _) _) ; msg-ok = () } return _ get-room-manager : ∀ {i Γ} → Γ ⊢ RoomSupervisorInterface → UniqueTag → ∞ActorM i ClientSupervisorInterface ⊤₁ Γ (λ _ → RoomManagerInterface ∷ Γ) get-room-manager p tag = do Msg Z f ← (call get-room-manager-ci (record { var = p ; chosen-field = Z ; fields = [] ; session = record { can-request = ⊆-refl ; response-session = record { can-receive = (S Z) ∷ [] ; tag = tag } } })) where Msg (S ()) _ return _ spawn-clients : ∀ {i} → ∞ActorM i ClientSupervisorInterface ⊤₁ cs-context (λ _ → cs-context) spawn-clients = do spawn client1 Z ![t: Z ] [ [ S Z ]>: ⊆-refl ]ᵃ (strengthen (⊆-suc ⊆-refl)) (spawn client2) Z ![t: Z ] [ [ S Z ]>: ⊆-refl ]ᵃ (strengthen (⊆-suc ⊆-refl)) (spawn client3) Z ![t: Z ] [ [ S Z ]>: ⊆-refl ]ᵃ (strengthen (⊆-suc ⊆-refl)) -- chat-supervisor is the top-most actor -- it spawns and connects the ClientRegistry to the RoomRegistry chat-supervisor : ∀ {i} → ∞ActorM i [] ⊤₁ [] (λ _ → []) chat-supervisor = do spawn room-supervisor spawn client-supervisor Z ![t: Z ] [ [ S Z ]>: ⊆-refl ]ᵃ strengthen []
smk-runs-strace_analyzer.adb
LionelDraghi/smk
10
20617
<gh_stars>1-10 -- ----------------------------------------------------------------------------- -- smk, the smart make (http://lionel.draghi.free.fr/smk/) -- © 2018, 2019 <NAME> <<EMAIL>> -- SPDX-License-Identifier: APSL-2.0 -- ----------------------------------------------------------------------------- -- 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 File_Utilities; with Smk.IO; with Smk.Settings; with Ada.Strings.Fixed; use Ada.Strings.Fixed; with Ada.Strings.Maps.Constants; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Strings.Maps; with Ada.Strings; use Ada.Strings; -- with Ada.Strings.Maps.Constants; use Ada.Strings.Maps.Constants; -- with Ada.Strings.Maps; package body Smk.Runs.Strace_Analyzer is Function_First_Char : constant := 7; -- Cmd_Set : constant Ada.Strings.Maps.Character_Set := Alphanumeric_Set; -- defines char that are expected in the command name ("access", "read", -- "write", etc.) Current_Dir : Unbounded_String := To_Unbounded_String (Smk.Settings.Initial_Directory); -- -------------------------------------------------------------------------- type Function_List is array (Positive range <>) of access String; Special_Lines : constant Function_List := (new String'("---"), new String'("<...")); -- Filter line like : -- "15214 --- SIGCHLD ..." -- or -- "15225 <... access resumed> ..." Ignore_List : constant Function_List := (new String'("stat"), new String'("access"), new String'("fstat"), new String'("lstat"), new String'("faccessat"), new String'("execve"), new String'("SIGCHLD"), new String'("fcntl"), new String'("lseek"), new String'("mknod"), new String'("umask"), new String'("close"), new String'("statfs"), new String'("fstatfs"), new String'("fstatat"), new String'("newfstatat"), new String'("freopen"), new String'("utimensat"), new String'("futimens"), new String'("chmod"), new String'("fchmod"), new String'("fchmodat"), new String'("chown"), new String'("lchown"), new String'("fchown"), new String'("fchownat"), new String'("unlink"), new String'("unlinkat"), new String'("remove"), new String'("mkdir"), new String'("rmdir"), new String'("chdir")); Read_Only_List : constant Function_List := (new String'("readlink"), new String'("readlinkat")); Write_Only_List : constant Function_List := (new String'("write"), new String'("creat"), new String'("rename"), new String'("renameat"), new String'("renameat2"), new String'("link")); Read_Or_Write_List : constant Function_List := (new String'("open"), new String'("fopen"), new String'("openat")); GetCWD : constant Function_List := (new String'("getcwd"), new String'("getwd"), new String'("get_current_dir_name")); -- Fixme: to increase performances, those List should be ordered with -- most probable command first. -- -------------------------------------------------------------------------- function Not_A_Function_Call (Line : String) return Boolean is (for some S of Special_Lines => Line (Line'First + Function_First_Char - 1 .. Line'First + Function_First_Char - 2 + S.all'Length) = S.all); -- -------------------------------------------------------------------------- function Is_Ignored (Call : String) return Boolean is (for some C of Ignore_List => Call = C.all); -- -------------------------------------------------------------------------- function Is_Read_Cmd (Call : String) return Boolean is (for some C of Read_Only_List => Call = C.all); -- -------------------------------------------------------------------------- function Is_Write_Cmd (Call : String) return Boolean is (for some C of Write_Only_List => Call = C.all); -- -------------------------------------------------------------------------- function Is_Read_Or_Write_Cmd (Call : String) return Boolean is (for some C of Read_Or_Write_List => Call = C.all); -- -------------------------------------------------------------------------- function Is_GetCWD (Call : String) return Boolean is (for some C of GetCWD => Call = C.all); -- -------------------------------------------------------------------------- procedure Analyze_Line (Line : in String; Call_Type : out Line_Type; Read_File : out File; Write_File : out File) is -- The previous, fairly good and very simple algo: -- if Index (Line, "O_WRONLY") /= 0 -- or else Index (Line, "O_RDWR") /= 0 -- or else Index (Line, "write", From => 7) /= 0 -- or else Index (Line, "creat", From => 7) /= 0 -- then -- Role := Target; -- else -- Role := Source; -- end if; -- It's now far more complex... -- ----------------------------------------------------------------------- function Get_Function_Name (Idx : in out Natural) return String is -- A line always start with the command from char 7 to char before '(': -- 15167 stat("/bin/sed", <unfinished ...> -- ^^^^ Last : constant Natural := Index (Source => Line, Pattern => "(", From => Idx + 1); R : constant String := Line (Line'First + Idx - 1 .. Last - 1); begin Idx := Last; return R; end Get_Function_Name; -- ----------------------------------------------------------------------- function Add_Dir (To_Name : String; Dir : String := To_String (Current_Dir)) return String is Prefix : constant String := (if Dir (Dir'Last) = '/' then Dir else Dir & '/'); begin -- IO.Put_Line ("Current Dir = " & To_String (Current_Dir)); -- if Name is not a Full_Name, add the known CWD if To_Name (To_Name'First) = '/' then -- IO.Put_Line ("Add_Dir returns " & To_Name); return To_Name; else -- IO.Put_Line ("Add_Dir returns " & Prefix & To_Name); return Prefix & To_Name; end if; end Add_Dir; -- ----------------------------------------------------------------------- function Remove_Dot_Slash (Name : String) return String is -- if Name starts with "./", remove it (if Name (Name'First .. Name'First + 1) = "./" then Name (Name'First + 2 .. Name'Last) else Name); -- ----------------------------------------------------------------------- function Write_Access (From : in Positive) return Boolean is WRONLY : constant String := "O_WRONLY"; RDWR : constant String := "O_RDWR"; I : Natural; -- This function don't move the Idx, because the file -- name may be before or after the searched Strings. begin I := Index (Line, WRONLY, From); if I /= 0 then return True; else return Index (Line, RDWR, From) /= 0; end if; end Write_Access; -- ----------------------------------------------------------------------- function Get_Parameter (Idx : in out Natural) return String is Separator_Set : constant Ada.Strings.Maps.Character_Set := Ada.Strings.Maps.To_Set (",()"); use Ada.Strings.Maps; use Ada.Strings.Maps.Constants; Postfix_Ignore_Set : constant Ada.Strings.Maps.Character_Set := Ada.Strings.Maps.To_Set (" <>") or To_Set ('"'); Prefix_Ignore_Set : constant Ada.Strings.Maps.Character_Set := Postfix_Ignore_Set or Decimal_Digit_Set; -- File descriptor number should be also removed in: -- 5</home/lionel/.slocdata/x.mp3> -- but only on the left side. -- First : Positive; Last : Natural; begin Find_Token (Source => Line, Set => Separator_Set, From => Idx, Test => Ada.Strings.Outside, First => First, Last => Last); Idx := Last + 1; declare Token : constant String := Trim (Line (First .. Last), Left => Prefix_Ignore_Set, Right => Postfix_Ignore_Set); begin IO.Put_Line ("Token : >" & Token & "<", Level => IO.Debug); return Token; end; end Get_Parameter; -- ----------------------------------------------------------------------- function File_Name_In_Box (Idx : in out Natural) return String is First : Natural; Local_Idx : Natural; begin First := Index (Line, "<", From => Idx); -- looking for "</" is a way to avoid being confused by line -- containing "<unfinished" like in: -- 15168 access("/etc/ld.so.nohwcap", F_OK <unfinished ...> if First = 0 then IO.Put_Line ("File_Name_In_Box =""""", Level => IO.Debug); return ""; -- file name not found else Local_Idx := Index (Line, ">", From => First + 1); if Local_Idx = 0 then IO.Put_Line ("File_Name_In_Box : no closing >", Level => IO.Debug); return ""; else Idx := Local_Idx + 1; IO.Put_Line ("File_Name_In_Box = " & Line (First + 1 .. Local_Idx - 1), Level => IO.Debug); declare Full_Name : constant String := Add_Dir (Remove_Dot_Slash (Line (First + 1 .. Local_Idx - 1))); -- we do not use Ada.Directories.Full_Name because it -- cause link to be modified into there target begin IO.Put_Line ("File_Name_In_Box returns " & Full_Name, Level => IO.Debug); return Full_Name; end; end if; end if; end File_Name_In_Box; -- ----------------------------------------------------------------------- function File_Name_In_Doublequote (Idx : in out Natural) return String is First : Natural; Local_Idx : Natural; begin First := Index (Line, """", From => Idx); -- Note that looking for "/ ignore non -- Full_Name, like in -- 4670 unlink("hello") = 0 -- and this is a problem! -- Fixme: need cwd management if First = 0 then IO.Put_Line ("File_Name_In_Doublequote =""""", Level => IO.Debug); return ""; -- file name not found else Local_Idx := Index (Line, """", From => First + 1); if Local_Idx = 0 then IO.Put_Line ("File_Name_In_Doublequote : no closing doublequote", Level => IO.Debug); return ""; else Idx := Local_Idx + 1; IO.Put_Line ("File_Name_In_Doublequote = " & Line (First + 1 .. Local_Idx - 1), Level => IO.Debug); declare Full_Name : constant String := Add_Dir (Remove_Dot_Slash (Line (First + 1 .. Local_Idx - 1))); -- we do not use Ada.Directories.Full_Name because it -- cause link to be modified into there target begin IO.Put_Line ("File_Name_In_Doublequote returns " & Full_Name, Level => IO.Debug); return Full_Name; end; end if; end if; end File_Name_In_Doublequote; -- ----------------------------------------------------------------------- function File_Name (Idx : in out Natural) return String is -- File name are either between double quotes, or when using the -- -y option between <>. -- The -y option print paths associated with file descriptor arguments, -- and path are always Full_Name. -- Unfortunatly, there is not always a file descriptor argument, -- so that we have look for both format. -- A slight difference between format is that when between -- double quotes, files name are as passed "as is" during the -- system call, hence the Full_Name transformation. F : constant String := File_Name_In_Box (Idx); begin if F = "" then return File_Name_In_Doublequote (Idx); else return F; end if; end File_Name; Idx : Natural; -- Idx is the pointer to where we are in the line analysis -- Following functions that analyze the line may move idx to the -- last analyzed character. begin Idx := Function_First_Char; Read_File := null; Write_File := null; Call_Type := Ignored; -- eliminate null lines, -- or lines that do not start with function name, -- or call that don't find a file (ENOENT) if Line'Length = 0 or else Not_A_Function_Call (Line) -- file not found: or else Index (Line, "ENOENT", Going => Ada.Strings.Backward) /= 0 -- error accessing file: or else Index (Line, "EACCES", Going => Ada.Strings.Backward) /= 0 -- Ignore REMOVEDIR operation on Dir (used by open or unlink): or else Index (Line, "AT_REMOVEDIR", Going => Ada.Strings.Backward) /= 0 then -- IO.Put_Line ("Ignoring line : " & Line, Level => IO.Debug); return; end if; IO.Put_Line ("", Level => IO.Debug); IO.Put_Line ("Analyzing line : " & Line, Level => IO.Debug); declare Function_Name : constant String := Get_Function_Name (Idx); begin IO.Put_Line ("Function_Name : " & Function_Name, Level => IO.Debug); -- The command is followed by "(", let's jump over Idx := Idx + 1; if Is_Ignored (Function_Name) then -- Ignored --------------------------------------------------------- IO.Put_Line ("Ignoring " & Function_Name, Level => IO.Debug); elsif Is_GetCWD (Function_Name) then -- CWD processing -------------------------------------------------- Current_Dir := To_Unbounded_String (File_Name (Idx)); IO.Put_Line ("Current Dir = " & To_String (Current_Dir), Level => IO.Debug); elsif Is_Read_Cmd (Function_Name) then -- Read ------------------------------------------------------------ Call_Type := Read_Call; IO.Put_Line (Function_Name, Level => IO.Debug); if Function_Name = "readlinkat" then -- two parameters declare P1 : constant String := Get_Parameter (Idx); P2 : constant String := Get_Parameter (Idx); begin if P2 (P2'First) = File_Utilities.Separator then -- absolute path, no need to read P1 Read_File := new String'(P2); elsif P1 = "AT_FDCWD" then Read_File := new String' (Add_Dir (Dir => To_String (Current_Dir), To_Name => P2)); else Read_File := new String'(Add_Dir (Dir => P1, To_Name => P2)); end if; end; else -- one parameter Read_File := new String'(File_Name (Idx)); IO.Put_Line (Function_Name & " Read " & Read_File.all, Level => IO.Debug); end if; elsif Is_Write_Cmd (Function_Name) then -- Write ----------------------------------------------------------- if Function_Name = "rename" -- two parameters renames: -- 30461 rename("x.mp3", "unknown-unknown.mp3") = 0 then declare P1 : constant String := Get_Parameter (Idx); P2 : constant String := Get_Parameter (Idx); begin IO.Put_Line (Function_Name, Level => IO.Debug); Call_Type := Read_Write_Call; Read_File := new String' (Add_Dir (Dir => To_String (Current_Dir), To_Name => P1)); Write_File := new String' (Add_Dir (Dir => To_String (Current_Dir), To_Name => P2)); IO.Put_Line (Function_Name & " from " & Read_File.all & " to " & Write_File.all, Level => IO.Debug); end; elsif Function_Name = "renameat" or else Function_Name = "renameat2" -- four parameters renames then -- Fixme: processing of "at" call and AT_FDCDW, cf. unlinkat IO.Put_Line (Function_Name, Level => IO.Debug); -- 15232 renameat2(AT_FDCWD, "all.filecount.new", \ -- AT_FDCWD, "all.filecount", RENAME_NOREPLACE) = 0 declare P1 : constant String := Get_Parameter (Idx); P2 : constant String := Get_Parameter (Idx); P3 : constant String := Get_Parameter (Idx); P4 : constant String := Get_Parameter (Idx); begin Call_Type := Read_Write_Call; if P2 (P2'First) = File_Utilities.Separator then -- absolute path, no need to read P1 Read_File := new String'(P2); elsif P1 = "AT_FDCWD" then Read_File := new String' (Add_Dir (Dir => To_String (Current_Dir), To_Name => P2)); else Read_File := new String'(Add_Dir (Dir => P1, To_Name => P2)); end if; if P4 (P4'First) = File_Utilities.Separator then -- absolute path, no need to read P3 Write_File := new String'(P4); elsif P3 = "AT_FDCWD" then Write_File := new String' (Add_Dir (Dir => To_String (Current_Dir), To_Name => P4)); else Write_File := new String'(Add_Dir (Dir => P3, To_Name => P4)); end if; IO.Put_Line (Function_Name & " from " & Read_File.all & " to " & Write_File.all, Level => IO.Debug); end; -- elsif Function_Name = "unlinkat" -- and then Index (Line, "AT_REMOVEDIR", From => Idx) /= 0 -- -- process a special form of unlink, that gives first the dir as -- -- file descriptor, and then the file name: -- -- 15165 unlinkat(5</home/lionel/.slocdata/dir>, "filelist" ... -- -- (File name is actually /home/lionel/.slocdata/dir/filelist) -- -- or -- -- 1277 unlinkat(AT_FDCWD, "./site/404.html", 0) = 0 -- -- and then Index (Line, "AT_FDCWD", From => Idx) = 0 -- -- Note that this code processes only the first case : if the -- -- first parameter is not AT_FDCWD, then the dir is -- -- explicitly given as a file descriptor, and is -- -- excluded here because we are in the normal processing. -- -- then -- IO.Put_Line (Function_Name, Level => IO.Debug); -- -- declare -- Dir : constant String := File_Name_In_Box (Idx); -- File : constant String := File_Name_In_Doublequote (Idx); -- begin -- Call_Type := Write_Call; -- Write_File := new String'(Dir & "/" & File); -- IO.Put_Line (Function_Name & " " & Dir & "/" & File, -- Level => IO.Debug); -- end; else Call_Type := Write_Call; Write_File := new String'(File_Name (Idx)); IO.Put_Line (Function_Name & " Write " & Write_File.all, Level => IO.Debug); end if; elsif Is_Read_Or_Write_Cmd (Function_Name) then -- Read or Write---------------------------------------------------- if Write_Access (From => Idx) then Call_Type := Write_Call; if Function_Name = "openat" then Idx := Index (Line, "=", Going => Backward); Write_File := new String'(File_Name_In_Box (Idx)); else Write_File := new String'(File_Name (Idx)); end if; IO.Put_Line (Function_Name & " Write " & Write_File.all, Level => IO.Debug); else Call_Type := Read_Call; if Function_Name = "openat" then Idx := Index (Line, "=", Going => Backward); Read_File := new String'(File_Name_In_Box (Idx)); else Read_File := new String'(File_Name (Idx)); end if; IO.Put_Line (Function_Name & " Read " & Read_File.all, Level => IO.Debug); end if; else -- Unknown --------------------------------------------------------- Call_Type := Ignored; IO.Put_Line ("Non identified file related call in strace line : >" & Line & "<"); IO.Put_Line ("Please submit this message to " & "https://github.com/LionelDraghi/smk/issues/new " & "with title ""Non identified call in strace " & "output"""); end if; end; -- if not Is_Null (Read_File) and then -- Ada.Directories.Full_Name (Read_File.all) /= Read_File.all -- then -- IO.Put_Line ("Read_File (" & Read_File.all -- & ") /= Full_Name (" & Full_Name (Read_File.all) & ")"); -- end if; -- -- if not Is_Null (Write_File) and then -- Ada.Directories.Full_Name (Write_File.all) /= Write_File.all -- then -- IO.Put_Line ("Write_File (" & Write_File.all -- & ") /= Full_Name (" & Full_Name (Write_File.all) & ")"); -- end if; exception when others => Call_Type := Ignored; IO.Put_Line ("Error while analyzing : >" & Line & "<"); IO.Put_Line ("Please submit this message to " & "https://github.com/LionelDraghi/smk/issues/new " & "with title ""Error analyzing strace output"""); end Analyze_Line; end Smk.Runs.Strace_Analyzer;
oeis/068/A068238.asm
neoneye/loda-programs
11
99569
; A068238: Denominators of arithmetic derivative of 1/n: -A003415(n)/n^2. ; Submitted by <NAME>(s3) ; 1,4,9,4,25,36,49,16,27,100,121,9,169,196,225,8,289,108,361,50,441,484,529,144,125,676,27,49,841,900,961,64,1089,1156,1225,108,1369,1444,1521,400,1681,1764,1849,121,675,2116,2209,144,343,500,2601,338,2809,36,3025,784,3249,3364,3481,900,3721,3844,1323,64,4225,4356,4489,578,4761,4900,5041,432,5329,5476,1125,361,5929,6084,6241,400,243,6724,6889,1764,7225,7396,7569,1936,7921,2700,8281,529,8649,8836,9025,576,9409,1372,3267,500 add $0,1 mov $1,$0 seq $0,3415 ; a(n) = n' = arithmetic derivative of n: a(0) = a(1) = 0, a(prime) = 1, a(mn) = m*a(n) + n*a(m). pow $1,2 mov $2,$0 gcd $2,$1 div $1,$2 mov $0,$1