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
source/amf/ocl/amf-internals-holders-ocl_holders.ads
svn2github/matreshka
24
17056
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, <NAME> <<EMAIL>> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This package contains conversion subprograms from different subclasses of -- elements into holders. They are required to simplify generated code, -- otherwise creation of intermediate object should be done in reflections -- module. Most probably this package can be removed for Ada2020. ------------------------------------------------------------------------------ with AMF.OCL.Any_Types; with AMF.OCL.Association_Class_Call_Exps; with AMF.OCL.Bag_Types; with AMF.OCL.Boolean_Literal_Exps; with AMF.OCL.Collection_Items; with AMF.OCL.Collection_Literal_Exps; with AMF.OCL.Collection_Ranges; with AMF.OCL.Collection_Types; with AMF.OCL.Enum_Literal_Exps; with AMF.OCL.Expression_In_Ocls; with AMF.OCL.If_Exps; with AMF.OCL.Integer_Literal_Exps; with AMF.OCL.Invalid_Literal_Exps; with AMF.OCL.Invalid_Types; with AMF.OCL.Iterate_Exps; with AMF.OCL.Iterator_Exps; with AMF.OCL.Let_Exps; with AMF.OCL.Message_Exps; with AMF.OCL.Message_Types; with AMF.OCL.Null_Literal_Exps; with AMF.OCL.Ocl_Expressions; with AMF.OCL.Operation_Call_Exps; with AMF.OCL.Ordered_Set_Types; with AMF.OCL.Property_Call_Exps; with AMF.OCL.Real_Literal_Exps; with AMF.OCL.Sequence_Types; with AMF.OCL.Set_Types; with AMF.OCL.State_Exps; with AMF.OCL.String_Literal_Exps; with AMF.OCL.Template_Parameter_Types; with AMF.OCL.Tuple_Literal_Exps; with AMF.OCL.Tuple_Literal_Parts; with AMF.OCL.Tuple_Types; with AMF.OCL.Type_Exps; with AMF.OCL.Unlimited_Natural_Literal_Exps; with AMF.OCL.Unspecified_Value_Exps; with AMF.OCL.Variables; with AMF.OCL.Variable_Exps; with AMF.OCL.Void_Types; package AMF.Internals.Holders.OCL_Holders is function To_Holder (Item : AMF.OCL.Any_Types.OCL_Any_Type_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Bag_Types.OCL_Bag_Type_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Collection_Items.OCL_Collection_Item_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Collection_Types.OCL_Collection_Type_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.If_Exps.OCL_If_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Let_Exps.OCL_Let_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Message_Exps.OCL_Message_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Message_Types.OCL_Message_Type_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Set_Types.OCL_Set_Type_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.State_Exps.OCL_State_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Type_Exps.OCL_Type_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Variables.OCL_Variable_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access) return League.Holders.Holder; function To_Holder (Item : AMF.OCL.Void_Types.OCL_Void_Type_Access) return League.Holders.Holder; end AMF.Internals.Holders.OCL_Holders;
pdf2keynote/applescripts/insert_movie.scpt
majorpb/pdf2keynote
0
3428
<reponame>majorpb/pdf2keynote on run argv set lastIndex to item 1 of argv as number set soundFile to item 2 of argv as POSIX file set x to item 3 of argv as number set y to item 4 of argv as number set theFilePath to soundFile as alias tell application "Keynote" tell the front document -- get document dimensions set docWidth to the width set docHeight to the height tell slide lastIndex -- Keynote does not support using the audio clip class with the make verb -- Import the audio file by using the image class as the direct parameter -- The returned object reference will be to the created audio file set thisMovie to make new image with properties {file:theFilePath} tell thisMovie -- adjust the size and position of the movie item... -- using properties inherited from iWork Item class set movWidth to 720 set width to movWidth set movHeight to height set position to ¬ {(docWidth - movWidth) div 2, (docHeight - movHeight) div 2} set repetition method to none end tell end tell end tell end tell end run
src/parser/AntlrBinary.g4
TheModMaker/binary-reader
0
1959
<reponame>TheModMaker/binary-reader // Copyright 2021 Google LLC // // 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. grammar AntlrBinary; /////////////////////////////////////////////////////////////////////////////// // Lexer // Skip whitespace and comments. WHITESPACE : [\p{White_Space}]+ -> skip ; LINE_COMMENT : '//' ~[\r\n]* '\r'? '\n' -> skip ; LONG_COMMENT : '/*' .*? '*/' -> skip ; TYPE : 'type' ; fragment DIGIT : [\p{Numeric_Type=Decimal}] ; NUMBER : DIGIT* '.' DIGIT+ ('e' [-+]? DIGIT+)? | DIGIT+ ('.' DIGIT*)? ('e' [-+]? DIGIT+)? ; IDENTIFIER : '$'? [\p{ID_Start}] [\p{ID_Continue}]* ; /////////////////////////////////////////////////////////////////////////////// // Parser main : globalDefinition* EOF ; globalDefinition : typeDefinition ; empty : ; //// Common definitions //// Type definitions typeDefinition : TYPE IDENTIFIER '{' typeMember* '}' ; typeMember : dataField ; dataField : completeType IDENTIFIER ';' ; //// Types completeType : IDENTIFIER ;
Cubical/HITs/Rationals/QuoQ.agda
dan-iel-lee/cubical
0
3537
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.Rationals.QuoQ where open import Cubical.HITs.Rationals.QuoQ.Base public open import Cubical.HITs.Rationals.QuoQ.Properties public
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_234_388.asm
ljhsiun2/medusa
9
89937
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %rax push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x1622, %rsi lea addresses_A_ht+0x11622, %rdi nop nop nop nop nop inc %rax mov $56, %rcx rep movsw nop nop xor %rbp, %rbp lea addresses_normal_ht+0x5816, %rdx clflush (%rdx) and $29190, %r11 movb $0x61, (%rdx) nop nop cmp %rsi, %rsi lea addresses_WC_ht+0x12e22, %rsi lea addresses_D_ht+0x10a2, %rdi clflush (%rsi) nop cmp $22113, %r13 mov $25, %rcx rep movsl and %rsi, %rsi lea addresses_WT_ht+0x6622, %rsi nop add $49364, %rax mov $0x6162636465666768, %rbp movq %rbp, %xmm1 movups %xmm1, (%rsi) nop nop nop nop nop sub %rsi, %rsi lea addresses_WT_ht+0xd622, %rdi nop nop nop xor %rbp, %rbp mov (%rdi), %esi nop and $7071, %r11 lea addresses_WC_ht+0x167eb, %rcx nop nop sub $41966, %rbp movl $0x61626364, (%rcx) nop nop nop sub $7097, %rsi lea addresses_D_ht+0x6408, %rbp sub $50972, %rdx mov (%rbp), %ax nop nop nop nop and %rcx, %rcx lea addresses_UC_ht+0xf422, %rsi lea addresses_WC_ht+0x4e22, %rdi clflush (%rdi) nop sub $61115, %rdx mov $20, %rcx rep movsw nop nop nop nop sub $31877, %r11 lea addresses_normal_ht+0xbe22, %rsi lea addresses_UC_ht+0x10522, %rdi nop nop nop dec %rdx mov $77, %rcx rep movsq nop nop and %r13, %r13 lea addresses_A_ht+0x10122, %rsi lea addresses_A_ht+0xc9d2, %rdi nop nop and $16163, %rbp mov $27, %rcx rep movsb nop nop nop nop sub $42254, %r13 lea addresses_A_ht+0xb622, %rsi lea addresses_D_ht+0x32e, %rdi nop nop nop nop nop sub %r11, %r11 mov $111, %rcx rep movsb cmp %r13, %r13 lea addresses_UC_ht+0x1ee22, %rsi lea addresses_D_ht+0x647e, %rdi clflush (%rsi) nop xor $44491, %rax mov $42, %rcx rep movsw nop nop nop sub %r11, %r11 lea addresses_normal_ht+0x127a2, %rsi lea addresses_normal_ht+0xb222, %rdi nop nop nop add %r11, %r11 mov $120, %rcx rep movsw nop nop inc %r11 lea addresses_WC_ht+0xf8b2, %rcx nop nop xor %r13, %r13 mov $0x6162636465666768, %rbp movq %rbp, %xmm7 and $0xffffffffffffffc0, %rcx movntdq %xmm7, (%rcx) nop nop nop nop dec %r11 lea addresses_WT_ht+0x1df12, %rsi nop nop nop nop nop sub $58072, %rbp mov $0x6162636465666768, %rdi movq %rdi, (%rsi) nop nop nop xor %rdx, %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %rax pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r9 push %rax push %rbp push %rbx push %rcx push %rdi push %rsi // REPMOV lea addresses_D+0x1f622, %rsi lea addresses_D+0x126a2, %rdi nop nop nop nop nop cmp %rax, %rax mov $36, %rcx rep movsw nop nop nop nop add $17547, %rax // Store lea addresses_WT+0x8622, %rdi nop xor %rbp, %rbp mov $0x5152535455565758, %rsi movq %rsi, %xmm1 vmovaps %ymm1, (%rdi) nop cmp %rcx, %rcx // Store lea addresses_D+0xf5ea, %rsi nop sub $8609, %rdi movw $0x5152, (%rsi) nop nop nop cmp $62294, %rax // Faulty Load lea addresses_D+0x10e22, %rbx nop nop add %rcx, %rcx movb (%rbx), %al lea oracles, %rdi and $0xff, %rax shlq $12, %rax mov (%rdi,%rax,1), %rax pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r9 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_D', 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 32, 'AVXalign': True, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': False, 'NT': True, 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False, 'NT': True, 'congruent': 2, 'same': False}} {'36': 234} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
zero.asm
wastevensv/w832
1
102217
<reponame>wastevensv/w832 0x00 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3A 0x3B 0x3C 0x3D 0x3E 0x3F 0x60 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1A 0x1B 0x1C 0x1D 0x1E 0x1F
ArmAssembler/src/main/ant14/Parser.g4
h20man13/ArmAssembler
0
1113
grammar Parser; instruction : bInstr | blInstr | bxInstr | ldmInstr | ldrByteInstr | ldrDefInstr | mlaInstr | mrsInstr | msrDefInstr | msrPrivInstr | mulInstr | stmInstr | strByteInstr | strDefInstr | swiInstr | swpInstr | addInstr | andInstr | eorInstr | subInstr | rsbInstr | adcInstr | sbcInstr | rscInstr | tstInstr | teqInstr | cmpInstr | orrInstr | movInstr | bicInstr | mvnInstr ; bInstr : B COND? expression; blInstr : BL COND? expression; bxInstr : BX COND? REG; ldmInstr : LDM COND? ADDRESSINGMODE REG T? COMMA rList BXOR?; ldrByteInstr : LDR COND? B? T? REG COMMA address; ldrDefInstr : LDR COND? TRANSFERTYPE REG COMMA address; mlaInstr : MLA COND? S? REG COMMA REG COMMA REG COMMA REG; mrsInstr : MRS COND? REG COMMA PSR; msrDefInstr : MSR COND? PSR COMMA REG; msrPrivInstr : MSR COND? (PSRF COMMA (REG | poundExpression)); mulInstr : MUL COND? S? REG COMMA REG COMMA REG; stmInstr : STM COND? ADDRESSINGMODE REG EXP? COMMA rList BXOR?; strByteInstr : STR COND? B? T? REG COMMA address; strDefInstr : STR COND? H REG COMMA address; swiInstr : SWI COND? expression; swpInstr : SWP COND? B? REG COMMA REG COMMA '[' REG ']'; addInstr : ADD COND? S? REG COMMA REG COMMA op2; andInstr : AND COND? S? REG COMMA REG COMMA op2; eorInstr : EOR COND? S? REG COMMA REG COMMA op2; subInstr : SUB COND? S? REG COMMA REG COMMA op2; rsbInstr : RSB COND? S? REG COMMA REG COMMA op2; adcInstr : ADC COND? S? REG COMMA REG COMMA op2; sbcInstr : SBC COND? S? REG COMMA REG COMMA op2; rscInstr : RSC COND? S? REG COMMA REG COMMA op2; tstInstr : TST COND? REG COMMA op2; teqInstr : TEQ COND? REG COMMA op2; cmpInstr : CMP COND? REG COMMA op2; orrInstr : ORR COND? S? REG COMMA REG COMMA op2; movInstr : MOV COND? S? REG COMMA REG COMMA op2; bicInstr : BIC COND? S? REG COMMA REG COMMA op2; mvnInstr : MVN COND? S? REG COMMA REG COMMA op2; /* * The following are used for Data Processing Instructions */ op2 : REG (COMMA shift)? | poundExpression ; shift : SHIFTNAME REG | SHIFTNAME poundExpression | RPX ; rList : LCURL rValue+ RCURL; rValue : REG ('-' REG)?; /* * Below is code for dealing with expressions */ poundExpression: HASH expression; expression : andExpr (LOR andExpr)*; andExpr : relational (LAND relational)*; relational : primary ((EQ|NE|RLT|RGT|RLE|RGE) primary)?; primary : bitwise ((PLUS|MINUS) bitwise)*; bitwise : term ((BOR|BAND|BXOR) term)*; term: unary ((TIMES|DIV|MOD|LSHIFT|RSHIFT) unary)*; unary: (PLUS|MINUS)? number; number: NUMBER; label: IDENT; /* * Below is the code for dealing with addresses */ address : expression | '[' REG ']' | '[' REG COMMA poundExpression ']' EXP? | '[' REG COMMA ('+'|'-')? REG (COMMA shift)? ']' EXP? | '[' REG ']' COMMA poundExpression | '[' REG ']' COMMA ('+'|'-')? REG (COMMA shift)? ; /* * Below is definitions of all of the tokens to be used * B is also declared bit it is declared later at the bottom */ ADC : A D C; ADD : A D D; AND : A N D; BIC : B I C; BL : B L; BX : B X; CMP : C M P; EOR : E O R; LDC : L D C; LDM : L D M; LDR : L D R; MCR : M C R; MLA : M L A; MOV : M O V; MRC : M R C; MRS : M R S; MSR : M S R; MUL : M U L; MVN : M V N; ORR : O R R; RSB : R S B; RSC : R S C; SBC : S B C; STC : S T C; STM : S T M; STR : S T R; SUB : S U B; SWI : S W I; SWP : S W P; TEQ : T E Q; TST : T S T; /* * The following are used for ldm and store memory instructions */ TRANSFERTYPE : H | SB | SH ; SB : S B; SH : S H; ADDRESSINGMODE : FD | ED | FA | EA | IA | IB | DA | DB ; FD : F D; ED : E D; FA : F A; EA : E A; IA : I A; IB : I B; DA : D A; DB : D B; /* * Below are the shift name variables */ ASL : A S L; LSL : L S L; LSR : L S R; ASR : A S R; ROR : R O R; SHIFTNAME : ASL | LSL | LSR | ASR | ROR ; RPX : R P X; /* * Below is code for condition codes */ EQ : E Q; NE : N E; CS : C S; CC : C C; MI : M I; PL : P L; VS : V S; VC : V C; HI : H I; LS : L S; GE : G E; LT : L T; GT : G T; LE : L E; AL : A L; COND : EQ | NE | CS | CC | MI | PL | VS | VC | HI | LS | GE | LT | GT | LE | AL ; /* * Below is the code for dealing with REGs */ REG : R DIGIT DIGIT?; NUMBER : DIGIT+; fragment DIGIT : [0-9]; PSR: CPSR | CPSR_ALL | SPSR | SPSR_ALL ; PSRF: CPSR_FLG | SPSR_FLG ; CPSR: C P S R; CPSR_ALL: C P S R '_' A L L; CPSR_FLG: C P S R '_' F L G; SPSR: S P S R; SPSR_ALL: S P S R '_' A L L; SPSR_FLG: S P S R '_' F L G; EXP : '!'; WS : [ \t\r\n]+ -> skip ; //And here are some operators COMMA : ','; LCURL : '{'; RCURL : '}'; REQ : '=='; RNE : '!='; RLE : '<='; RLT : '<'; RGE : '>='; RGT : '>'; TIMES : '*'; MINUS : '-'; PLUS : '+'; MOD : '%'; DIV : '/'; LSHIFT : '<<'; RSHIFT : '>>'; BAND : '&'; BOR : '|'; BXOR : '^'; LAND : '&&'; LOR : '||'; HASH : '#'; fragment LETTER: STARTLETTER | '_' | DIGIT; fragment STARTLETTER: [a-zA-Z]; IDENT : STARTLETTER LETTER*; A : ('A'|'a'); B : ('B'|'b'); C : ('C'|'c'); D : ('D'|'d'); E : ('E'|'e'); F : ('F'|'f'); G : ('G'|'g'); H : ('H'|'h'); I : ('I'|'i'); J : ('J'|'j'); K : ('K'|'k'); L : ('L'|'l'); M : ('M'|'m'); N : ('N'|'n'); O : ('O'|'o'); P : ('P'|'p'); Q : ('Q'|'q'); R : ('R'|'r'); S : ('S'|'s'); T : ('T'|'t'); U : ('U'|'u'); V : ('V'|'v'); W : ('W'|'w'); X : ('X'|'x'); Y : ('Y'|'y'); Z : ('Z'|'z');
oeis/081/A081115.asm
neoneye/loda-programs
11
2023
<reponame>neoneye/loda-programs ; A081115: (p^2 - 1)/12 where p > 3 runs through the primes. ; Submitted by <NAME> ; 2,4,10,14,24,30,44,70,80,114,140,154,184,234,290,310,374,420,444,520,574,660,784,850,884,954,990,1064,1344,1430,1564,1610,1850,1900,2054,2214,2324,2494,2670,2730,3040,3104,3234,3300,3710,4144,4294,4370,4524,4760,4840,5250,5504,5764,6030,6120,6394,6580,6674,7154,7854,8060,8164,8374,9130,9464,10034,10150,10384,10740,11224,11594,11970,12224,12610,13134,13400,13940,14630,14770,15480,15624,16060,16354,16800,17404,17710,17864,18174,19120,19764,20090,20750,21084,21590,22620,22794,24390,24934,25854 seq $0,173064 ; a(n) = prime(n) - 5. add $0,7 mul $0,4 sub $0,8 pow $0,2 div $0,192
c2000/C2000Ware_1_00_06_00/libraries/boot_rom/f2806x/v1_1/rom_sources/source/Vectors_Boot.asm
ramok/Themis_ForHPSDR
0
6185
<reponame>ramok/Themis_ForHPSDR ;; TI File $Revision: /main/4 $ ;; Checkin $Date: March 8, 2011 15:18:39 $ ;;########################################################################### ;; ;; FILE: Vectors_Boot.h ;; ;; TITLE: Boot Rom vector table. ;; ;; Functions: ;; ;; This section of code populates the vector table in the boot ROM. The reset ;; vector at 0x3FFFC0 points to the entry into the boot loader functions (InitBoot()) ;; The rest of the vectors are populated for test purposes only. ;; ;;########################################################################### ;; $TI Release: TMS320x2806x Boot ROM V1.0 $ ;; $Release Date: October 21, 2010 $ ;;########################################################################### ;----------------------------------------------------------- ; The vector table located in boot ROM at 0x3F FFC0 - 0x3F FFFF ; will be filled with the following data. ; ; Only the reset vector, which points to the InitBoot ; routine will be used during normal operation. The remaining ; vectors are set for internal testing purposes and will not be ; fetched from this location during normal operation. ; ; On reset vector is always fetched from this table. ; ;---------------------------------------------------------- .ref _InitBoot .ref _ITRAPIsr .sect ".BootVecs" .long _InitBoot ;Reset .long 0x000042 .long 0x000044 .long 0x000046 .long 0x000048 .long 0x00004a .long 0x00004c .long 0x00004e .long 0x000050 .long 0x000052 .long 0x000054 .long 0x000056 .long 0x000058 .long 0x00005a .long 0x00005c .long 0x00005e .long 0x000060 .long 0x000062 .long 0x000064 .long _ITRAPIsr ;ITRAP .long 0x000068 .long 0x00006a .long 0x00006c .long 0x00006e .long 0x000070 .long 0x000072 .long 0x000074 .long 0x000076 .long 0x000078 .long 0x00007a .long 0x00007c .long 0x00007e
parse/hndllibs.asm
DigitalMars/optlink
28
177284
TITLE HNDLLIBS - Copyright (c) SLR Systems 1994 INCLUDE MACROS INCLUDE IO_STRUC PUBLIC DO_OBJS,DO_SRCNAM .DATA EXTERNDEF FILNAM:NFN_STRUCT,SRCNAM:NFN_STRUCT EXTERNDEF CURN_PLTYPE:BYTE,DEBUG_TYPES_SELECTED:BYTE EXTERNDEF LISTTYPE:DWORD,FILE_HASH_MOD:DWORD,CURN_SECTION_GINDEX:DWORD EXTERNDEF LIB_LIST:FILE_LISTS,OBJ_LIST:FILE_LISTS,LIBPATH_LIST:FILE_LISTS EXTERNDEF STUBPATH_LIST:FILE_LISTS,OBJPATH_LIST:FILE_LISTS,STUB_LIST:FILE_LISTS EXTERNDEF RC_LIST:FILE_LISTS,OLD_LIST:FILE_LISTS,LOD_LIST:FILE_LISTS EXTERNDEF _FILE_LIST_GARRAY:STD_PTR_S .CODE PHASE1_TEXT externdef _do_srcnam:proc EXTERNDEF _move_nfn:proc,_do_findfirst:proc,_do_findnext:proc,_filename_install:proc,ERR_INBUF_ABORT:PROC EXTERNDEF LINK_TO_THREAD:PROC,_close_findnext:proc,WARN_ASCIZ_RET:PROC EXTERNDEF DUP_SECTION_ERR:ABS,IMPROBABLE_RES_ERR:ABS ; public _handle_libs ;_handle_libs proc ; mov EAX,4[ESP] ;_handle_libs endp PUBLIC HANDLE_LIBS HANDLE_LIBS PROC ; ;EAX IS NFN_STRUCT ; ASSUME EAX:PTR NFN_STRUCT TEST BPTR [EAX].NFN_FLAGS,MASK NFN_PRIM_SPECIFIED+MASK NFN_EXT_SPECIFIED JNZ DO_SEARCH_LIBRARY MOV ECX,[EAX].NFN_PRIMLEN ADD ECX,[EAX].NFN_EXTLEN SUB [EAX].NFN_TOTAL_LENGTH,ECX MOV ECX,[EAX].NFN_TOTAL_LENGTH XOR EDX,EDX MOV [EAX].NFN_PRIMLEN,EDX MOV [EAX].NFN_EXTLEN,EDX MOV DPTR [EAX+ECX].NFN_TEXT,EDX JMP STORE_LIBPATH HANDLE_LIBS ENDP DO_SRCNAM PROC ; ;EAX IS NFN_STRUCT ; MOV ECX,EAX MOV EAX,OFF SRCNAM push ECX push EAX call _move_nfn add ESP,8 RET DO_SRCNAM ENDP ; public _do_search_library ;_do_search_library proc ; mov EAX,4[ESP] ;_do_search_library endp PUBLIC DO_LIBRARY,DO_SEARCH_LIBRARY DO_LIBRARY LABEL PROC DO_SEARCH_LIBRARY LABEL PROC MOV [EAX].NFN_TYPE,NFN_LIB_TTYPE MOV ECX,OFF LIB_LIST JMP DO_OBJS_1 DO_OBJS PROC ; ;IF NOT NUL, ADD NEW TO LIST... ; MOV ECX,OFF OBJ_LIST JMP DO_OBJS_1 ; public _do_objs_1 ;_do_objs_1 LABEL PROC ; mov EAX,4[ESP] ; mov ECX,8[ESP] DO_OBJS_1 LABEL PROC ; ;EAX IS NFN_STRUCT ;ECX IS FILE_LIST TO PUT IT IN ; MOV DH,[EAX].NFN_FLAGS XOR DL,DL AND DH,MASK NFN_AMBIGUOUS JNZ L5$ RESS THIS_AMBIGUOUS,DL ;CURRENTLY UNAMBIGUOUS CALL NOT_AMBIGUOUS RET L5$: ; ;OK, NAME IN SI IS AMBIGUOUS... ; PUSHM EDI,ESI DEC EDX MOV EDI,ECX ;LISTTYPE MOV ESI,EAX ;NOPE, GOT WHOLE FILENAME SETT THIS_AMBIGUOUS,DL ;OOPS... push EAX CALL _do_findfirst ;EAX IS NFN_STRUCT add ESP,4 test EAX,EAX jz L11$ ;JC L11$ ;ALL DONE, NOT FOUND... L1$: MOV EAX,ESI MOV ECX,EDI CALL NOT_AMBIGUOUS MOV EAX,ESI push EAX CALL _do_findnext add ESP,4 test EAX,EAX jnz L1$ ;JNC L1$ call _close_findnext L11$: POPM ESI,EDI RET DO_OBJS ENDP COPY_FIRST_OBJ: CMP EDI,OFF OBJ_LIST JNZ COPY_FIRST_OBJ_RET push ECX push EAX call _do_srcnam add ESP,8 MOV EAX,ESI JMP COPY_FIRST_OBJ_RET public _not_ambiguous _not_ambiguous proc mov EAX,4[ESP] mov ECX,8[ESP] _not_ambiguous endp NOT_AMBIGUOUS PROC ; ;EAX IS NFN_STRUCT ;ECX IS FILE_LIST ; PUSHM EDI,ESI MOV EDX,SRCNAM.NFN_PRIMLEN MOV EDI,ECX MOV ESI,EAX TEST EDX,EDX JZ COPY_FIRST_OBJ COPY_FIRST_OBJ_RET:: push ECX mov ECX,ESP push ECX push EAX call _filename_install add ESP,8 pop ECX ;CALL FILENAME_INSTALL;RETURNS ECX AS SYMBOL ADDRESS ;EAX IS GINDEX ASSUME ECX:PTR FILE_LIST_STRUCT MOV EDX,EAX ; ;ADD TO LIST IF NOT ALREADY THERE... ;DS:BX IS SYMBOL, DX IS LOGICAL ADDR ; GETT AH,DOING_NODEF PUSH EBX MOV AL,[ECX].FILE_LIST_FLAGS TEST AH,AH JNZ L15$ TEST EAX,MASK MOD_IGNORE ;MODEFAULT, IGNORE JNZ L9$ TEST EAX,MASK MOD_ADD JNZ L2$ ;ALREADY IN ADD LIST... ; GETT AH,THIS_AMBIGUOUS OR AL,MASK MOD_ADD TEST AH,AH JNZ L21$ if any_overlays TEST EAX,MASK MOD_UNAMBIG JZ L20$ CMP [ECX].FILE_LIST_SECTION_GINDEX,0 JZ L20$ MOV CL,DUP_SECTION_ERR CALL ERR_INBUF_ABORT L20$: endif OR AL,MASK MOD_UNAMBIG L21$: MOV [ECX].FILE_LIST_FLAGS,AL PUT_IN_ADD_LIST: ; ;ESI IS NFN_STRUCT ;EDI IS LISTTYPE ;EDX IS CURN FILE_LIST_GINDEX ;ECX IS CURN FILE_LIST_ADDRESS ; ASSUME EDI:PTR FILE_LISTS if any_overlays MOV EAX,CURN_SECTION MOV BL,CURN_PLTYPE MOV [ECX].FILE_LIST_SECTION,EAX MOV [ECX].FILE_LIST_PLTYPE,BL endif MOV BL,DEBUG_TYPES_SELECTED MOV EAX,[EDI].FILE_LAST_GINDEX OR [ECX].FILE_LIST_PLINK_FLAGS,BL MOV [EDI].FILE_LAST_GINDEX,EDX CONVERT EAX,EAX,_FILE_LIST_GARRAY ASSUME EAX:PTR FILE_LIST_STRUCT MOV [EAX].FILE_LIST_NEXT_GINDEX,EDX ;CAUSE THIS IS NOT THREAD ;ORDER, THIS IS LOGICAL ORDER if fgh_inthreads GETT AL,_HOST_THREADED GETT BL,OBJS_DONE AND AL,BL JZ L9$ MOV EAX,EDX MOV OBJ_LIST.FILE_LAST_GINDEX,EAX CALL LINK_TO_THREAD endif L9$: POPM EBX,ESI,EDI RET L15$: POP EBX OR AL,MASK MOD_IGNORE POP ESI MOV [ECX].FILE_LIST_FLAGS,AL POP EDI RET L2$: ASSUME EDI:PTR FILE_LISTS ; ;ALREADY THERE, WAS IT UNAMBIGUOUS? ; TEST EAX,MASK MOD_UNAMBIG MOV BL,THIS_AMBIGUOUS JNZ L9$ ;YES, IGNORE. ; ;WAS AMBIGUOUS, WHAT ABOUT NOW? ; TEST BL,BL JNZ L9$ ;STILL AMBIGUOUS ; ;NOW UNAMBIGUOUS, MOVE IT TO END OF LINKED LIST... ; OR AL,MASK MOD_UNAMBIG ; ;FIRST, IF .FILE_LAST_ITEM MATCHES, SKIP SEARCH, JUST FLAG IT.. ; CMP [EDI].FILE_LAST_GINDEX,EDX MOV [ECX].FILE_LIST_FLAGS,AL JZ L9$ L3$: ; ;SEARCH LIST FOR IT (DX:BX) ; PUSH EDI MOV EAX,[EDI].FILE_FIRST_GINDEX L4$: CONVERT EDI,EAX,_FILE_LIST_GARRAY ASSUME EDI:PTR FILE_LIST_STRUCT MOV EAX,[EDI].FILE_LIST_NEXT_GINDEX CMP EAX,EDX JNZ L4$ ; ;MAKE [DI:CX] POINT TO [DS:SI] ; XOR EAX,EAX MOV EBX,[ECX].FILE_LIST_NEXT_GINDEX MOV [ECX].FILE_LIST_NEXT_GINDEX,EAX MOV [EDI].FILE_LIST_NEXT_GINDEX,EBX POP EDI ; ;NOW, MAKE .LAST PT TO THIS... ; ;DS:BX MUST BE SYMBOL, DX=LOGICAL ; JMP PUT_IN_ADD_LIST NOT_AMBIGUOUS ENDP public _store_libpath _store_libpath proc mov EAX,4[ESP] _store_libpath endp STORE_LIBPATH PROC ; ;EAX IS NFN_STRUCT ; MOV DL,2 MOV ECX,OFF LIBPATH_LIST LNI_PATHS:: ASSUME EAX:PTR NFN_STRUCT CMP [EAX].NFN_PATHLEN,0 ;DONT ADD NUL PATH MOV DH,0 JZ L9$ LNI_FILES:: MOV [EAX].NFN_TYPE,DH MOV BPTR FILE_HASH_MOD,DL CALL DO_OBJS_1 XOR EAX,EAX MOV FILE_HASH_MOD,EAX L9$: RET STORE_LIBPATH ENDP PUBLIC HANDLE_OBJPATHS HANDLE_OBJPATHS PROC ; ;EAX IS NFN_STRUCT ; MOV DL,3 MOV ECX,OFF OBJPATH_LIST JMP LNI_PATHS HANDLE_OBJPATHS ENDP if fg_segm OR fg_pe PUBLIC HANDLE_STUBPATHS,HANDLE_STUB,HANDLE_OLD,HANDLE_RCS,HANDLE_LOD HANDLE_STUBPATHS PROC ; ;EAX IS NFN_STRUCT ; ;PARSING PATH= VARIABLE ; MOV DL,4 MOV ECX,OFF STUBPATH_LIST JMP LNI_PATHS HANDLE_STUBPATHS ENDP HANDLE_STUB PROC ; ;EAX IS NFN_STRUCT ; MOV EDX,5+256*NFN_STUB_TTYPE MOV ECX,OFF STUB_LIST JMP LNI_FILES HANDLE_STUB ENDP HANDLE_OLD PROC ; ;EAX IS NFN_STRUCT ; MOV EDX,6+256*NFN_OLD_TTYPE MOV ECX,OFF OLD_LIST JMP LNI_FILES HANDLE_OLD ENDP HANDLE_RCS PROC ; ;EAX IS NFN_STRUCT ; MOV ECX,[EAX].NFN_PATHLEN MOV EDX,[EAX].NFN_PRIMLEN ADD ECX,EDX MOV ECX,DPTR [EAX+ECX].NFN_TEXT CMP ECX,'SER.' JZ L1$ CMP ECX,'ser.' JNZ L5$ L1$: MOV EDX,7+NFN_RES_TTYPE*256 MOV ECX,OFF RC_LIST JMP LNI_FILES L5$: PUSH EAX LEA ECX,[EAX].NFN_TEXT MOV AL,IMPROBABLE_RES_ERR CALL WARN_ASCIZ_RET POP EAX JMP L1$ HANDLE_RCS ENDP public _handle_lod _handle_lod proc mov EAX,4[ESP] _handle_lod endp HANDLE_LOD PROC ; ;EAX IS NFN_STRUCT ; MOV EDX,8+NFN_LOD_TTYPE*256 MOV ECX,OFF LOD_LIST JMP LNI_FILES HANDLE_LOD ENDP endif END
legend-pure-m3-core/src/main/antlr4/org/finos/legend/pure/m3/serialization/grammar/top/antlr/TopAntlrParser.g4
hausea/legend-pure
37
7699
parser grammar TopAntlrParser; options { tokenVocab = TopAntlrLexer; } definition: (top)* EOF ; top: CODE_BLOCK_START (CODE)* ;
libsrc/osca/get_file_size.asm
RC2014Z80/z88dk
8
95418
<gh_stars>1-10 ; ; Old School Computer Architecture - interfacing FLOS ; <NAME>, 2011 ; ; Get the size for the given file ; ; $Id: get_file_size.asm,v 1.5 2016-06-22 22:13:09 dom Exp $ ; INCLUDE "flos.def" SECTION code_clib PUBLIC get_file_size PUBLIC _get_file_size get_file_size: _get_file_size: ; __FASTCALL__, HL points to filename push ix ;save callers push iy call kjt_find_file push ix pop de push iy pop hl pop iy pop ix ;restore callers ret z ld hl,0 ld d,h ld e,l ret
programs/oeis/008/A008677.asm
neoneye/loda
22
175831
; A008677: Expansion of 1/((1-x^3)*(1-x^5)*(1-x^7)). ; 1,0,0,1,0,1,1,1,1,1,2,1,2,2,2,3,2,3,3,3,4,4,4,4,5,5,5,6,6,6,7,7,7,8,8,9,9,9,10,10,11,11,12,12,12,14,13,14,15,15,16,16,17,17,18,19,19,20,20,21,22,22,23,24,24,25,26,26,27,28,29,29,30,31,31,33,33,34,35,35,37,37,38,39,40,41,41,43,43,44,46,46,47,48,49,50,51,52,53,54 mov $2,$0 mov $5,2 lpb $5 sub $5,1 add $0,$5 sub $0,1 mov $3,$5 mov $4,$0 max $4,0 seq $4,8673 ; Expansion of 1/((1-x)*(1-x^3)*(1-x^5)*(1-x^7)). mul $3,$4 add $1,$3 mov $6,$4 lpe min $2,1 mul $2,$6 sub $1,$2 mov $0,$1
programs/oeis/186/A186293.asm
neoneye/loda
22
84148
; A186293: (A007519(n)-1)/2. ; 8,20,36,44,48,56,68,96,116,120,128,140,156,168,176,200,204,216,224,228,260,284,288,296,300,308,320,336,380,384,404,428,440,464,468,476,488,504,516,524,548,564,576,596,600,608 seq $0,5123 ; Numbers n such that 8n + 1 is prime. mul $0,4
programs/oeis/081/A081026.asm
neoneye/loda
22
12415
; A081026: Variation on Ulam numbers: a(1) = 1; a(2) = 2; for n>2, a(n) = smallest (n odd) or largest (n even) number > a(n-1) that is a unique sum of two distinct earlier terms. ; 1,2,3,5,6,11,12,23,24,47,48,95,96,191,192,383,384,767,768,1535,1536,3071,3072,6143,6144,12287,12288,24575,24576,49151,49152,98303,98304,196607,196608,393215,393216,786431,786432,1572863,1572864,3145727 lpb $0 mov $1,$2 add $1,$0 trn $0,2 mul $2,2 add $2,3 lpe add $1,1 mov $0,$1
alloy4fun_models/trashltl/models/11/qYkzwyTXRoJ3msF6J.als
Kaixi26/org.alloytools.alloy
0
2985
<reponame>Kaixi26/org.alloytools.alloy open main pred idqYkzwyTXRoJ3msF6J_prop12 { always (all f: File | eventually always f in Trash) } pred __repair { idqYkzwyTXRoJ3msF6J_prop12 } check __repair { idqYkzwyTXRoJ3msF6J_prop12 <=> prop12o }
test/Fail/Issue1109-1.agda
shlevy/agda
1,989
8791
postulate A : Set x : A f : A → A → A _●_ : A → A → A infix 20 _●_ syntax f x y = x ○ y doesn't-parse : A doesn't-parse = x ○ x ● x -- Default fixity for syntax is no longer -666, but 20 as for normal operators.
Transynther/x86/_processed/US/_zr_/i7-8650U_0xd2_notsx.log_11095_632.asm
ljhsiun2/medusa
9
102361
<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r13 push %r14 push %r8 push %r9 push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x1884d, %r14 nop nop nop nop nop dec %rcx mov $0x6162636465666768, %r9 movq %r9, %xmm4 movups %xmm4, (%r14) nop nop nop add %r8, %r8 lea addresses_A_ht+0x310d, %rdx nop nop nop cmp %rdi, %rdi mov $0x6162636465666768, %r13 movq %r13, %xmm2 movups %xmm2, (%rdx) nop nop nop sub $23536, %r8 lea addresses_A_ht+0x1b256, %rcx nop cmp $56112, %rdi mov $0x6162636465666768, %r8 movq %r8, %xmm0 vmovups %ymm0, (%rcx) nop cmp %rdx, %rdx lea addresses_WC_ht+0x702d, %rsi lea addresses_UC_ht+0x960d, %rdi nop and %r13, %r13 mov $79, %rcx rep movsq nop nop nop lfence pop %rsi pop %rdx pop %rdi pop %rcx pop %r9 pop %r8 pop %r14 pop %r13 ret .global s_faulty_load s_faulty_load: push %r8 push %r9 push %rbx push %rcx push %rdi push %rdx // Store lea addresses_PSE+0x108b3, %rbx nop nop nop nop nop cmp %rdx, %rdx movb $0x51, (%rbx) nop nop nop nop nop dec %rbx // Store lea addresses_UC+0x470d, %rdi nop nop sub %r8, %r8 mov $0x5152535455565758, %rbx movq %rbx, %xmm0 vmovups %ymm0, (%rdi) nop nop nop nop nop add %r8, %r8 // Store mov $0x50d, %rbx nop nop and $47976, %rdx movb $0x51, (%rbx) nop cmp $54768, %r9 // Faulty Load lea addresses_US+0x18d0d, %r9 nop nop nop cmp %rdi, %rdi mov (%r9), %r8d lea oracles, %r9 and $0xff, %r8 shlq $12, %r8 mov (%r9,%r8,1), %r8 pop %rdx pop %rdi pop %rcx pop %rbx pop %r9 pop %r8 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}} {'00': 11095} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
programs/oeis/103/A103168.asm
neoneye/loda
22
100144
<reponame>neoneye/loda<filename>programs/oeis/103/A103168.asm ; A103168: a(n) = remainder when (n written backwards) is divided by n. ; 0,0,0,0,0,0,0,0,0,1,0,9,5,13,6,13,3,9,15,2,12,0,9,18,2,10,18,26,5,3,13,23,0,9,18,27,36,7,15,4,14,24,34,0,9,18,27,36,45,5,15,25,35,45,0,9,18,27,36,6,16,26,36,46,56,0,9,18,27,7,17,27,37,47,57,67,0,9,18,8,18,28,38,48,58,68,78,0,9,9,19,29,39,49,59,69,79,89,0,1 add $0,1 mov $2,$0 seq $0,4086 ; Read n backwards (referred to as R(n) in many sequences). mod $0,$2
New/NewNew.agda
inc-lc/ilc-agda
10
15025
<reponame>inc-lc/ilc-agda module New.NewNew where open import New.Changes open import New.LangChanges open import New.Lang open import New.Derive open import Data.Empty [_]τ_from_to_ : ∀ (τ : Type) → (dv : Chτ τ) → (v1 v2 : ⟦ τ ⟧Type) → Set -- This can't be a datatype, since it wouldn't be strictly positive as it -- appears on the left of an arrow in the function case, which then can be -- contained in nested "fromto-validity" proofs. sumfromto : ∀ (σ τ : Type) → (dv : SumChange2 {A = ⟦ σ ⟧Type} {B = ⟦ τ ⟧Type}) → (v1 v2 : ⟦ sum σ τ ⟧Type) → Set sumfromto σ τ (ch₁ da) (inj₁ a1) (inj₁ a2) = [ σ ]τ da from a1 to a2 -- These fallback equations unfortunately don't hold definitionally, they're -- split on multiple cases, so the pattern match is a mess. -- -- To "case split" on validity, I typically copy-paste the pattern match from -- fromto→⊕ and change the function name :-(. sumfromto σ τ (ch₁ da) _ _ = ⊥ sumfromto σ τ (ch₂ db) (inj₂ b1) (inj₂ b2) = [ τ ]τ db from b1 to b2 sumfromto σ τ (ch₂ db) _ _ = ⊥ sumfromto σ τ (rp (inj₂ b2)) (inj₁ a1) (inj₂ b2') = b2 ≡ b2' sumfromto σ τ (rp (inj₁ a2)) (inj₂ b1) (inj₁ a2') = a2 ≡ a2' sumfromto σ τ (rp s) _ _ = ⊥ [ σ ⇒ τ ]τ df from f1 to f2 = ∀ (da : Chτ σ) (a1 a2 : ⟦ σ ⟧Type) → [ σ ]τ da from a1 to a2 → [ τ ]τ df a1 da from f1 a1 to f2 a2 [ int ]τ dv from v1 to v2 = v2 ≡ v1 + dv [ pair σ τ ]τ (da , db) from (a1 , b1) to (a2 , b2) = [ σ ]τ da from a1 to a2 × [ τ ]τ db from b1 to b2 [ sum σ τ ]τ dv from v1 to v2 = sumfromto σ τ (convert dv) v1 v2 data [_]Γ_from_to_ : ∀ Γ → ChΓ Γ → (ρ1 ρ2 : ⟦ Γ ⟧Context) → Set where v∅ : [ ∅ ]Γ ∅ from ∅ to ∅ _v•_ : ∀ {τ Γ dv v1 v2 dρ ρ1 ρ2} → (dvv : [ τ ]τ dv from v1 to v2) → (dρρ : [ Γ ]Γ dρ from ρ1 to ρ2) → [ τ • Γ ]Γ (dv • v1 • dρ) from (v1 • ρ1) to (v2 • ρ2) ⟦Γ≼ΔΓ⟧ : ∀ {Γ ρ1 ρ2 dρ} → (dρρ : [ Γ ]Γ dρ from ρ1 to ρ2) → ρ1 ≡ ⟦ Γ≼ΔΓ ⟧≼ dρ ⟦Γ≼ΔΓ⟧ v∅ = refl ⟦Γ≼ΔΓ⟧ (dvv v• dρρ) = cong₂ _•_ refl (⟦Γ≼ΔΓ⟧ dρρ) fit-sound : ∀ {Γ τ} → (t : Term Γ τ) → ∀ {dρ ρ1 ρ2} → [ Γ ]Γ dρ from ρ1 to ρ2 → ⟦ t ⟧Term ρ1 ≡ ⟦ fit t ⟧Term dρ fit-sound t dρρ = trans (cong ⟦ t ⟧Term (⟦Γ≼ΔΓ⟧ dρρ)) (sym (weaken-sound t _)) -- Now relate this validity with ⊕. To know that nil and so on are valid, also -- relate it to the other definition. fromto→⊕ : ∀ {τ} dv v1 v2 → [ τ ]τ dv from v1 to v2 → v1 ⊕ dv ≡ v2 ⊝-fromto : ∀ {τ} (v1 v2 : ⟦ τ ⟧Type) → [ τ ]τ v2 ⊝ v1 from v1 to v2 ⊝-fromto {σ ⇒ τ} f1 f2 da a1 a2 daa rewrite sym (fromto→⊕ da a1 a2 daa) = ⊝-fromto (f1 a1) (f2 (a1 ⊕ da)) ⊝-fromto {int} v1 v2 = sym (update-diff v2 v1) ⊝-fromto {pair σ τ} (a1 , b1) (a2 , b2) = ⊝-fromto a1 a2 , ⊝-fromto b1 b2 ⊝-fromto {sum σ τ} (inj₁ a1) (inj₁ a2) = ⊝-fromto a1 a2 ⊝-fromto {sum σ τ} (inj₁ a1) (inj₂ b2) = refl ⊝-fromto {sum σ τ} (inj₂ b1) (inj₁ a2) = refl ⊝-fromto {sum σ τ} (inj₂ b1) (inj₂ b2) = ⊝-fromto b1 b2 nil-fromto : ∀ {τ} (v : ⟦ τ ⟧Type) → [ τ ]τ nil v from v to v nil-fromto v = ⊝-fromto v v fromto→⊕ {σ ⇒ τ} df f1 f2 dff = ext (λ v → fromto→⊕ {τ} (df v (nil v)) (f1 v) (f2 v) (dff (nil v) v v (nil-fromto v))) fromto→⊕ {int} dn n1 n2 refl = refl fromto→⊕ {pair σ τ} (da , db) (a1 , b1) (a2 , b2) (daa , dbb) = cong₂ _,_ (fromto→⊕ _ _ _ daa) (fromto→⊕ _ _ _ dbb) fromto→⊕ {sum σ τ} (inj₁ (inj₁ da)) (inj₁ a1) (inj₁ a2) daa rewrite fromto→⊕ da a1 a2 daa = refl fromto→⊕ {sum σ τ} (inj₁ (inj₁ da)) (inj₁ _) (inj₂ _) () fromto→⊕ {sum σ τ} (inj₁ (inj₁ da)) (inj₂ _) (inj₁ _) () fromto→⊕ {sum σ τ} (inj₁ (inj₁ da)) (inj₂ _) (inj₂ _) () fromto→⊕ {sum σ τ} (inj₁ (inj₂ db)) (inj₂ b1) (inj₂ b2) dbb rewrite fromto→⊕ db b1 b2 dbb = refl fromto→⊕ {sum σ τ} (inj₁ (inj₂ db)) (inj₁ _) (inj₁ _) () fromto→⊕ {sum σ τ} (inj₁ (inj₂ db)) (inj₁ _) (inj₂ _) () fromto→⊕ {sum σ τ} (inj₁ (inj₂ db)) (inj₂ _) (inj₁ _) () fromto→⊕ {sum σ τ} (inj₂ (inj₁ a2)) (inj₂ b1) (inj₁ .a2) refl = refl fromto→⊕ {sum σ τ} (inj₂ (inj₁ a2)) (inj₁ _) (inj₁ _) () fromto→⊕ {sum σ τ} (inj₂ (inj₁ a2)) (inj₁ _) (inj₂ _) () fromto→⊕ {sum σ τ} (inj₂ (inj₁ a2)) (inj₂ _) (inj₂ _) () fromto→⊕ {sum σ τ} (inj₂ (inj₂ b2)) (inj₁ a1) (inj₂ .b2) refl = refl fromto→⊕ {sum σ τ} (inj₂ (inj₂ b2)) (inj₁ _) (inj₁ _) () fromto→⊕ {sum σ τ} (inj₂ (inj₂ b2)) (inj₂ _) (inj₁ _) () fromto→⊕ {sum σ τ} (inj₂ (inj₂ b2)) (inj₂ _) (inj₂ _) () fromtoDeriveConst : ∀ {τ} c → [ τ ]τ ⟦ deriveConst c ⟧Term ∅ from ⟦ c ⟧Const to ⟦ c ⟧Const fromtoDeriveConst (lit n) = sym (right-id-int n) fromtoDeriveConst plus da a1 a2 daa db b1 b2 dbb rewrite daa | dbb = mn·pq=mp·nq {a1} {da} {b1} {db} fromtoDeriveConst minus da a1 a2 daa db b1 b2 dbb rewrite daa | dbb | sym (-m·-n=-mn {b1} {db}) = mn·pq=mp·nq {a1} {da} { - b1} { - db} fromtoDeriveConst cons da a1 a2 daa db b1 b2 dbb = daa , dbb fromtoDeriveConst fst (da , db) (a1 , b1) (a2 , b2) (daa , dbb) = daa fromtoDeriveConst snd (da , db) (a1 , b1) (a2 , b2) (daa , dbb) = dbb fromtoDeriveConst linj da a1 a2 daa = daa fromtoDeriveConst rinj db b1 b2 dbb = dbb fromtoDeriveConst match (inj₁ (inj₁ da)) (inj₁ a1) (inj₁ a2) daa df f1 f2 dff dg g1 g2 dgg = dff da a1 a2 daa fromtoDeriveConst match (inj₁ (inj₁ da)) (inj₁ _) (inj₂ _) () fromtoDeriveConst match (inj₁ (inj₁ da)) (inj₂ _) (inj₁ _) () fromtoDeriveConst match (inj₁ (inj₁ da)) (inj₂ _) (inj₂ _) () fromtoDeriveConst match (inj₁ (inj₂ db)) (inj₂ b1) (inj₂ b2) dbb df f1 f2 dff dg g1 g2 dgg = dgg db b1 b2 dbb fromtoDeriveConst match (inj₁ (inj₂ db)) (inj₁ _) (inj₁ _) () fromtoDeriveConst match (inj₁ (inj₂ db)) (inj₁ _) (inj₂ _) () fromtoDeriveConst match (inj₁ (inj₂ db)) (inj₂ _) (inj₁ _) () fromtoDeriveConst match (inj₂ (inj₁ a2)) (inj₂ b1) (inj₁ .a2) refl df f1 f2 dff dg g1 g2 dgg rewrite changeMatchSem-lem2 f1 df g1 dg b1 a2 | sym (fromto→⊕ df _ _ dff) | sym (fromto→⊕ dg _ _ dgg) = ⊝-fromto (g1 b1) ((f1 ⊕ df) a2) fromtoDeriveConst match (inj₂ (inj₁ a2)) (inj₁ _) (inj₁ _) () fromtoDeriveConst match (inj₂ (inj₁ a2)) (inj₁ _) (inj₂ _) () fromtoDeriveConst match (inj₂ (inj₁ a2)) (inj₂ _) (inj₂ _) () fromtoDeriveConst match (inj₂ (inj₂ b2)) (inj₁ a1) (inj₂ .b2) refl df f1 f2 dff dg g1 g2 dgg rewrite changeMatchSem-lem1 f1 df g1 dg a1 b2 | sym (fromto→⊕ df _ _ dff) | sym (fromto→⊕ dg _ _ dgg) = ⊝-fromto (f1 a1) ((g1 ⊕ dg) b2) fromtoDeriveConst match (inj₂ (inj₂ b2)) (inj₁ _) (inj₁ _) () fromtoDeriveConst match (inj₂ (inj₂ b2)) (inj₂ _) (inj₁ _) () fromtoDeriveConst match (inj₂ (inj₂ b2)) (inj₂ _) (inj₂ _) () fromtoDeriveVar : ∀ {Γ τ} → (x : Var Γ τ) → ∀ {dρ ρ1 ρ2} → [ Γ ]Γ dρ from ρ1 to ρ2 → [ τ ]τ (⟦ x ⟧ΔVar ρ1 dρ) from (⟦ x ⟧Var ρ1) to (⟦ x ⟧Var ρ2) fromtoDeriveVar this (dvv v• dρρ) = dvv fromtoDeriveVar (that x) (dvv v• dρρ) = fromtoDeriveVar x dρρ fromtoDerive : ∀ {Γ} τ → (t : Term Γ τ) → {dρ : ChΓ Γ} {ρ1 ρ2 : ⟦ Γ ⟧Context} → [ Γ ]Γ dρ from ρ1 to ρ2 → [ τ ]τ (⟦ t ⟧ΔTerm ρ1 dρ) from (⟦ t ⟧Term ρ1) to (⟦ t ⟧Term ρ2) fromtoDerive τ (const c) {dρ} {ρ1} dρρ rewrite ⟦ c ⟧ΔConst-rewrite ρ1 dρ = fromtoDeriveConst c fromtoDerive τ (var x) dρρ = fromtoDeriveVar x dρρ fromtoDerive τ (app {σ} s t) dρρ rewrite sym (fit-sound t dρρ) = let fromToF = fromtoDerive (σ ⇒ τ) s dρρ in let fromToB = fromtoDerive σ t dρρ in fromToF _ _ _ fromToB fromtoDerive (σ ⇒ τ) (abs t) dρρ = λ dv v1 v2 dvv → fromtoDerive τ t (dvv v• dρρ) open import Postulate.Extensionality open ≡-Reasoning -- If df is valid, prove (f1 ⊕ df) (a ⊕ da) ≡ f1 a ⊕ df a da. -- This statement uses a ⊕ da instead of a2, which is not the style of this formalization but fits better with the other one. -- Instead, WellDefinedFunChangeFromTo (without prime) fits this formalization. WellDefinedFunChangeFromTo′ : ∀ {σ τ} (f1 : ⟦ σ ⇒ τ ⟧Type) → (df : Chτ (σ ⇒ τ)) → Set WellDefinedFunChangeFromTo′ f1 df = ∀ da a → [ _ ]τ da from a to (a ⊕ da) → WellDefinedFunChangePoint f1 df a da fromto→WellDefined′ : ∀ {σ τ f1 f2 df} → [ σ ⇒ τ ]τ df from f1 to f2 → WellDefinedFunChangeFromTo′ f1 df fromto→WellDefined′ {f1 = f1} {f2} {df} dff da a daa = begin (f1 ⊕ df) (a ⊕ da) ≡⟨ cong (λ □ → □ (a ⊕ da)) (fromto→⊕ df f1 f2 dff)⟩ f2 (a ⊕ da) ≡⟨ sym (fromto→⊕ _ _ _ (dff da _ _ daa)) ⟩ f1 a ⊕ df a da ∎ WellDefinedFunChangeFromTo : ∀ {σ τ} (f1 : ⟦ σ ⇒ τ ⟧Type) → (df : Chτ (σ ⇒ τ)) → Set WellDefinedFunChangeFromTo f1 df = ∀ da a1 a2 → [ _ ]τ da from a1 to a2 → WellDefinedFunChangePoint f1 df a1 da fromto→WellDefined : ∀ {σ τ f1 f2 df} → [ σ ⇒ τ ]τ df from f1 to f2 → WellDefinedFunChangeFromTo f1 df fromto→WellDefined {f1 = f1} {f2} {df} dff da a1 a2 daa = fromto→WellDefined′ dff da a1 daa′ where daa′ : [ _ ]τ da from a1 to (a1 ⊕ da) daa′ rewrite fromto→⊕ da _ _ daa = daa -- Recursive isomorphism between the two validities. -- -- Among other things, valid→fromto proves that a validity-preserving function, -- with validity defined via (f1 ⊕ df) (a ⊕ da) ≡ f1 a ⊕ df a da, is also valid -- in the "fromto" sense. -- -- We can't hope for a better statement, since we need the equation to be -- satisfied also by returned or argument functions. fromto→valid : ∀ {τ} → ∀ dv v1 v2 → [ τ ]τ dv from v1 to v2 → valid v1 dv valid→fromto : ∀ {τ} v (dv : Chτ τ) → valid v dv → [ τ ]τ dv from v to (v ⊕ dv) fromto→valid {int} = λ dv v1 v2 x → tt fromto→valid {pair σ τ} (da , db) (a1 , b1) (a2 , b2) (daa , dbb) = (fromto→valid da _ _ daa) , (fromto→valid db _ _ dbb) fromto→valid {σ ⇒ τ} df f1 f2 dff = λ a da ada → fromto→valid (df a da) (f1 a) (f2 (a ⊕ da)) (dff da a (a ⊕ da) (valid→fromto a da ada)) , fromto→WellDefined′ dff da a (valid→fromto a da ada) fromto→valid {sum σ τ} (inj₁ (inj₁ da)) (inj₁ a1) (inj₁ a2) daa = sv₁ a1 da (fromto→valid da a1 a2 daa) fromto→valid {sum σ τ} (inj₁ (inj₁ da)) (inj₁ _) (inj₂ _) () fromto→valid {sum σ τ} (inj₁ (inj₁ da)) (inj₂ _) (inj₁ _) () fromto→valid {sum σ τ} (inj₁ (inj₁ da)) (inj₂ _) (inj₂ _) () fromto→valid {sum σ τ} (inj₁ (inj₂ db)) (inj₂ b1) (inj₂ b2) dbb = sv₂ b1 db (fromto→valid db b1 b2 dbb) fromto→valid {sum σ τ} (inj₁ (inj₂ db)) (inj₁ _) (inj₁ _) () fromto→valid {sum σ τ} (inj₁ (inj₂ db)) (inj₁ _) (inj₂ _) () fromto→valid {sum σ τ} (inj₁ (inj₂ db)) (inj₂ _) (inj₁ _) () fromto→valid {sum σ τ} (inj₂ (inj₁ a2)) (inj₂ b1) (inj₁ .a2) refl = svrp₂ b1 a2 fromto→valid {sum σ τ} (inj₂ (inj₁ a2)) (inj₁ _) (inj₁ _) () fromto→valid {sum σ τ} (inj₂ (inj₁ a2)) (inj₁ _) (inj₂ _) () fromto→valid {sum σ τ} (inj₂ (inj₁ a2)) (inj₂ _) (inj₂ _) () fromto→valid {sum σ τ} (inj₂ (inj₂ b2)) (inj₁ a1) (inj₂ .b2) refl = svrp₁ a1 b2 fromto→valid {sum σ τ} (inj₂ (inj₂ b2)) (inj₁ _) (inj₁ _) () fromto→valid {sum σ τ} (inj₂ (inj₂ b2)) (inj₂ _) (inj₁ _) () fromto→valid {sum σ τ} (inj₂ (inj₂ b2)) (inj₂ _) (inj₂ _) () valid→fromto {int} v dv tt = refl valid→fromto {pair σ τ} (a , b) (da , db) (ada , bdb) = valid→fromto a da ada , valid→fromto b db bdb valid→fromto {σ ⇒ τ} f df fdf da a1 a2 daa = body where fa1da-valid : valid (f a1) (df a1 da) × WellDefinedFunChangePoint f df a1 da fa1da-valid = fdf a1 da (fromto→valid da _ _ daa) body : [ τ ]τ df a1 da from f a1 to (f ⊕ df) a2 body rewrite sym (fromto→⊕ da _ _ daa) | proj₂ fa1da-valid = valid→fromto (f a1) (df a1 da) (proj₁ fa1da-valid) valid→fromto {sum σ τ} .(inj₁ a) .(inj₁ (inj₁ da)) (sv₁ a da ada) = valid→fromto a da ada valid→fromto {sum σ τ} .(inj₂ b) .(inj₁ (inj₂ db)) (sv₂ b db bdb) = valid→fromto b db bdb valid→fromto {sum σ τ} .(inj₁ a1) .(inj₂ (inj₂ b2)) (svrp₁ a1 b2) = refl valid→fromto {sum σ τ} .(inj₂ b1) .(inj₂ (inj₁ a2)) (svrp₂ b1 a2) = refl correctDeriveOplus : ∀ {Γ} τ → (t : Term Γ τ) → {dρ : ChΓ Γ} {ρ1 ρ2 : ⟦ Γ ⟧Context} → [ Γ ]Γ dρ from ρ1 to ρ2 → (⟦ t ⟧Term ρ1) ⊕ (⟦ t ⟧ΔTerm ρ1 dρ) ≡ (⟦ t ⟧Term ρ2) correctDeriveOplus τ t dρρ = fromto→⊕ _ _ _ (fromtoDerive τ t dρρ) -- Getting to the original equation 1 from PLDI'14. open import New.LangOps correctDeriveOplusτ : ∀ {Γ} τ → (t : Term Γ τ) {dρ : ChΓ Γ} {ρ1 ρ2 : ⟦ Γ ⟧Context} → [ Γ ]Γ dρ from ρ1 to ρ2 → (⟦ app₂ (oplusτo τ) (fit t) (derive t) ⟧Term dρ) ≡ (⟦ t ⟧Term ρ2) correctDeriveOplusτ τ t {dρ = dρ} {ρ1 = ρ1} dρρ rewrite oplusτ-equiv _ dρ _ (⟦ fit t ⟧Term dρ) (⟦ derive t ⟧Term dρ) | sym (fit-sound t dρρ) = correctDeriveOplus τ t dρρ deriveGivesDerivative : ∀ {Γ} σ τ → (f : Term Γ (σ ⇒ τ)) (a : Term Γ σ)→ {dρ : ChΓ Γ} {ρ1 ρ2 : ⟦ Γ ⟧Context} → [ Γ ]Γ dρ from ρ1 to ρ2 → (⟦ app f a ⟧Term ρ1) ⊕ (⟦ app f a ⟧ΔTerm ρ1 dρ) ≡ (⟦ app f a ⟧Term ρ2) deriveGivesDerivative σ τ f a dρρ = correctDeriveOplus τ (app f a) dρρ deriveGivesDerivative₂ : ∀ {Γ} σ τ → (f : Term Γ (σ ⇒ τ)) (a : Term Γ σ) → {dρ : ChΓ Γ} {ρ1 ρ2 : ⟦ Γ ⟧Context} → [ Γ ]Γ dρ from ρ1 to ρ2 → (⟦ app₂ (oplusτo τ) (fit (app f a)) (app₂ (derive f) (fit a) (derive a)) ⟧Term dρ) ≡ (⟦ app f a ⟧Term ρ2) deriveGivesDerivative₂ σ τ f a dρρ = correctDeriveOplusτ τ (app f a) dρρ -- Proof of the original equation 1 from PLDI'14. eq1 : ∀ {Γ} σ τ → {nilρ : ChΓ Γ} {ρ : ⟦ Γ ⟧Context} → [ Γ ]Γ nilρ from ρ to ρ → ∀ (f : Term Γ (σ ⇒ τ)) (a : Term Γ σ) (da : Term (ΔΓ Γ) (Δt σ)) → (daa : [ σ ]τ (⟦ da ⟧Term nilρ) from (⟦ a ⟧Term ρ) to (⟦ a ⟧Term ρ ⊕ ⟦ da ⟧Term nilρ)) → ⟦ app₂ (oplusτo τ) (fit (app f a)) (app₂ (derive f) (fit a) da) ⟧Term nilρ ≡ ⟦ app (fit f) (app₂ (oplusτo σ) (fit a) da) ⟧Term nilρ eq1 σ τ {nilρ} {ρ} dρρ f a da daa rewrite oplusτ-equiv _ nilρ _ (⟦ fit (app f a) ⟧Term nilρ) (⟦ (app₂ (derive f) (fit a) da) ⟧Term nilρ) | sym (fit-sound f dρρ) | oplusτ-equiv _ nilρ _ (⟦ fit a ⟧Term nilρ) (⟦ da ⟧Term nilρ) | sym (fit-sound a dρρ) = fromto→⊕ (⟦ f ⟧ΔTerm ρ nilρ (⟦ a ⟧Term ρ) (⟦ da ⟧Term nilρ)) _ _ (fromtoDerive _ f dρρ (⟦ da ⟧Term nilρ) (⟦ a ⟧Term ρ) (⟦ a ⟧Term ρ ⊕ ⟦ da ⟧Term nilρ) daa)
programs/oeis/134/A134421.asm
jmorken/loda
1
92161
<gh_stars>1-10 ; A134421: Partial sums of A134021. ; 1,2,4,6,8,11,14,17,20,23,26,29,32,35,39,43,47,51,55,59,63,67,71,75,79,83,87,91,95,99,103,107,111,115,119,123,127,131,135,139,143,148,153,158,163,168,173,178,183,188,193,198,203,208,213,218,223,228,233,238,243 mov $1,5 mov $3,$0 lpb $0 add $0,1 add $1,$0 sub $1,1 trn $2,$0 sub $3,1 mov $0,$3 add $4,$2 trn $0,$4 add $2,$3 add $2,$4 add $2,3 mov $3,$0 trn $4,$0 lpe sub $1,4
gps.ads
e3l6/SSMDev
0
30110
<gh_stars>0 ------------------------------------------------------------------------------- -- GPS -- -- Copyright © 2016 <NAME> -- -- This code is available under the "MIT License". -- Please see the file COPYING in this distribution for license terms. -- -- Purpose: -- This package interfaces to the Adafruit Ultimate GPS Breakout v3 -- (https://www.adafruit.com/product/746) based on the MediaTek MT3339 -- chipset. ------------------------------------------------------------------------------- with Ada.Calendar; use Ada.Calendar; with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Ada.Float_Text_IO; use Ada.Float_Text_IO; package GPS is type Position_Type is record -- For latitude and longitude: positive values denote Northern and -- Eastern hemispheres, respectively; negative values denote -- Southern and Western hemispheres, respectively. Latitude : Float range -90.0 .. 90.0; Longitude : Float range -180.0 .. 180.0; Current_Time : Time; -- Universal Coordinated Time (UTC) end record; function Get_Position return Position_Type; end GPS;
ruotaVettoreSenzaAppoggioRICORSIVO.asm
edoardottt/Asm_mars_examples
21
92238
<reponame>edoardottt/Asm_mars_examples # STAMPARE UN VETTORE IN INPUT AL CONTRARIO RICORSIVAMENTE SENZA VETTORE DI APPOGGIO # DA TROVARE ERRORE: LE CHIAMATE RICORSIVE SONO GIUSTE, MA ESCE PRIMA DI CHIUDERE L'ULTIMA # ESEMPIO: VETTORE= 1,2,3,4,5===STAMPA====> 1,4,3,2,5 .data vettore: .word 50:1 richiesta: .asciiz "inserire interi positivi da salvare sul vettore (max 100), -1 per terminare\n" vettVuoto: .asciiz "vettore vuoto\n" space: .byte 32 .text li $t8,-1 li $v0,4 la $a0,richiesta syscall la $a0,vettore addi $s7,$a0,200 riempi: li $v0,5 syscall # riempimento vettore beq $v0,-1,menoUno sw $v0,0($a0) addi $a0,$a0,4 j riempi menoUno: sw $t8,0($a0) # tutti gli altri valori settati a -1 beq $a0,$s7,len addi $a0,$a0,4 j menoUno len: la $a0,vettore li $a1,0 cLen: lw $v0,0($a0) beq $v0,-1,comincia # calcolo lunghezza vettore addi $a1,$a1,1 addi $a0,$a0,4 j cLen comincia: beq $a1,0,vettVuot # se len==0: vettore vuoto div $t0,$a1,2 li $t1,0 subi $t2,$a1,1 move $t8,$t2 li $t9,0 la $s6,vettore jal reverse stampa: beq $t9,$a1,fine lw $s7,0($s6) li $v0,1 move $a0,$s7 syscall addi $t9,$t9,1 addi $s6,$s6,4 j stampa vettVuot: li $v0,4 la $a0,vettVuoto syscall j fine reverse: subi $sp,$sp,12 sw $ra,0($sp) sw $t1,4($sp) sw $t2,8($sp) addi $t1,$t1,1 subi $t2,$t2,1 bgt $t1,$t0,caso_base jal reverse sll $t3,$t1,2 sll $t4,$t2,2 lw $t5,vettore($t3) lw $t6,vettore($t4) sw $t6,vettore($t3) sw $t5,vettore($t4) lw $ra,0($sp) lw $t1,4($sp) lw $t2,8($sp) addi $sp,$sp,12 jr $ra caso_base: lw $ra,0($sp) lw $t1,4($sp) lw $t2,8($sp) addi $sp,$sp,12 jr $ra fine: li $v0,10 syscall
backend/src/tools/Agtype.g4
hwha/AGViewer
29
7441
<reponame>hwha/AGViewer grammar Agtype; agType : agValue EOF ; agValue : value typeAnnotation? ; value : STRING #StringValue | INTEGER #IntegerValue | floatLiteral #FloatValue | 'true' #TrueBoolean | 'false' #FalseBoolean | 'null' #NullValue | obj #ObjectValue | array #ArrayValue ; obj : '{' pair (',' pair)* '}' | '{' '}' ; pair : STRING ':' agValue ; array : '[' agValue (',' agValue)* ']' | '[' ']' ; typeAnnotation : '::' IDENT ; IDENT : [A-Z_a-z][$0-9A-Z_a-z]* ; STRING : '"' (ESC | SAFECODEPOINT)* '"' ; fragment ESC : '\\' (["\\/bfnrt] | UNICODE) ; fragment UNICODE : 'u' HEX HEX HEX HEX ; fragment HEX : [0-9a-fA-F] ; fragment SAFECODEPOINT : ~ ["\\\u0000-\u001F] ; INTEGER : '-'? INT ; fragment INT : '0' | [1-9] [0-9]* ; floatLiteral : RegularFloat | ExponentFloat | '-'? 'Infinity' | 'NaN' ; RegularFloat : '-'? INT DECIMAL ; ExponentFloat : '-'? INT DECIMAL? SCIENTIFIC ; fragment DECIMAL : '.' [0-9]+ ; fragment SCIENTIFIC : [Ee][+-]? [0-9]+ ; WS : [ \t\n\r] + -> skip ;
Task/MD5-Implementation/Ada/md5-implementation-3.ada
LaudateCorpus1/RosettaCodeData
1
7153
with Ada.Strings.Unbounded; with Ada.Text_IO; with MD5; procedure Tester is use Ada.Strings.Unbounded; type String_Array is array (Positive range <>) of Unbounded_String; Sources : constant String_Array := (To_Unbounded_String (""), To_Unbounded_String ("a"), To_Unbounded_String ("abc"), To_Unbounded_String ("message digest"), To_Unbounded_String ("abcdefghijklmnopqrstuvwxyz"), To_Unbounded_String ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"), To_Unbounded_String ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") ); Digests : constant String_Array := (To_Unbounded_String ("0xd41d8cd98f00b204e9800998ecf8427e"), To_Unbounded_String ("0x0cc175b9c0f1b6a831c399e269772661"), To_Unbounded_String ("0x900150983cd24fb0d6963f7d28e17f72"), To_Unbounded_String ("0xf96b697d7cb7938d525a2f31aaf161d0"), To_Unbounded_String ("0xc3fcd3d76192e4007dfb496cca67e13b"), To_Unbounded_String ("0xd174ab98d277d9f5a5611c2c9f419d9f"), To_Unbounded_String ("0x57edf4a22be3c955ac49da2e2107b67a")); begin for I in Sources'Range loop Ada.Text_IO.Put_Line ("MD5 (""" & To_String (Sources (I)) & """):"); Ada.Text_IO.Put_Line (MD5.To_String (MD5.MD5 (To_String (Sources (I))))); Ada.Text_IO.Put_Line (To_String (Digests (I)) & " (correct value)"); end loop; end Tester;
arch/ARM/STM32/driversWB55x/stm32-hsem.adb
morbos/Ada_Drivers_Library
2
7022
with STM32_SVD.HSEM; use STM32_SVD.HSEM; with System; package body STM32.HSEM is function OneStepLock (Semaphore : UInt5) return Boolean is Idx : Sema_Range := Sema_Range (Semaphore); begin return not (STM32_SVD.HSEM.HSEM_Periph.RLR (Idx).LOCK and (STM32_SVD.HSEM.HSEM_Periph.RLR (Idx).COREID = 4)); end OneStepLock; function Locked (Semaphore : UInt5; Process : UInt8) return Boolean is Idx : Sema_Range := Sema_Range (Semaphore); begin return STM32_SVD.HSEM.HSEM_Periph.R (Idx).LOCK and STM32_SVD.HSEM.HSEM_Periph.R (Idx).COREID = 4 and STM32_SVD.HSEM.HSEM_Periph.R (Idx).PROCID = Process; end Locked; function AnyLock (Semaphore : UInt5) return Boolean is Idx : Sema_Range := Sema_Range (Semaphore); begin return STM32_SVD.HSEM.HSEM_Periph.R (Idx).LOCK; end AnyLock; procedure ReleaseLock (Semaphore : UInt5; Process : UInt8) is Idx : Sema_Range := Sema_Range (Semaphore); As_Array : UInt32_Array (0 .. 31) with Address => System'To_Address (16#5800_1400#); X : UInt32; R : R_Register; for R'Address use X'Address; begin -- STM32_SVD.HSEM.HSEM_Periph.R (Idx).LOCK := False; -- STM32_SVD.HSEM.HSEM_Periph.R (Idx).COREID := 4; -- STM32_SVD.HSEM.HSEM_Periph.R (Idx).PROCID := Process; R.LOCK := False; R.COREID := 4; R.PROCID := Process; As_Array (Integer (Idx)) := X; end ReleaseLock; end STM32.HSEM;
tooling/specs/visualizer.als
ruimaranhao/alloydocs
58
1082
<gh_stars>10-100 abstract sig Object {} sig File extends Object {} sig Dir extends Object {contents: set Object} one sig Root extends Dir { } fact { Object in Root.*contents } assert RootTop { no o: Object | Root in o.contents } check RootTop // This assertion should produce a counterexample
AwaitingComputations.agda
danelahman/aeff-agda
4
9627
<reponame>danelahman/aeff-agda open import Data.Empty open import Data.Maybe open import Data.Product open import Data.Sum open import AEff open import EffectAnnotations open import Types open import Relation.Binary.PropositionalEquality hiding ([_]) open import Relation.Nullary open import Relation.Nullary.Negation module AwaitingComputations where -- COMPUTATIONS THAT ARE TEMPORARILY STUCK DUE TO AWAITING FOR A PARTICULAR PROMISE data _⧗_ {Γ : Ctx} {X : VType} (x : ⟨ X ⟩ ∈ Γ) : {C : CType} → Γ ⊢M⦂ C → Set where await : {C : CType} {M : Γ ∷ X ⊢M⦂ C} → ------------------------- x ⧗ (await (` x) until M) let-in : {X Y : VType} {o : O} {i : I} {M : Γ ⊢M⦂ X ! (o , i)} {N : Γ ∷ X ⊢M⦂ Y ! (o , i)} → x ⧗ M → ----------------------------- x ⧗ (let= M `in N) interrupt : {X : VType} {o : O} {i : I} {op : Σₛ} {V : Γ ⊢V⦂ ``(payload op)} {M : Γ ⊢M⦂ X ! (o , i)} → x ⧗ M → ------------------------- x ⧗ (↓ op V M) coerce : {X : VType} {o o' : O} {i i' : I} {p : o ⊑ₒ o'} {q : i ⊑ᵢ i'} {M : Γ ⊢M⦂ X ! (o , i)} → x ⧗ M → ------------------------- x ⧗ (coerce p q M)
case-studies/performance/synthesis/alloy/model/model.als
uwplse/memsynth
19
903
module alglave open program open framework open test /* SC */ fun ppo_SC[t: Test] : MemoryEvent->MemoryEvent { t.po } fun grf_SC[rf: MemoryEvent->MemoryEvent, t: Test] : MemoryEvent->MemoryEvent { rf } fun ab_SC[rf: MemoryEvent->MemoryEvent, t: Test] : MemoryEvent->MemoryEvent { none->none } /* TSO */ fun ppo_TSO[t: Test] : MemoryEvent->MemoryEvent { t.po & (t.Reads->t.Events + t.Writes->t.Writes) } fun grf_TSO[rf: MemoryEvent->MemoryEvent, t: Test] : MemoryEvent->MemoryEvent { rfe[rf,t] } fun ab_TSO[rf: MemoryEvent->MemoryEvent, t: Test] : MemoryEvent->MemoryEvent { none->none } /* PSO */ fun ppo_PSO[t: Test] : MemoryEvent->MemoryEvent { t.po & (t.Reads->t.Events) } fun grf_PSO[rf: MemoryEvent->MemoryEvent, t: Test] : MemoryEvent->MemoryEvent { rfe[rf,t] } fun ab_PSO[rf: MemoryEvent->MemoryEvent, t: Test] : MemoryEvent->MemoryEvent { none->none } /* Alpha */ fun ppo_Alpha[t: Test] : MemoryEvent->MemoryEvent { t.po & ((t.loc).~(t.loc) & (t.Reads->t.Reads)) } fun grf_Alpha[rf: MemoryEvent->MemoryEvent, t: Test] : MemoryEvent->MemoryEvent { rfe[rf,t] } fun ab_Alpha[rf: MemoryEvent->MemoryEvent, t: Test] : MemoryEvent->MemoryEvent { none->none } /* RMO */ fun ppo_RMO[t: Test] : MemoryEvent->MemoryEvent { t.po & t.dp } fun grf_RMO[rf: MemoryEvent->MemoryEvent, t: Test] : MemoryEvent->MemoryEvent { rfe[rf,t] } fun ab_RMO[rf: MemoryEvent->MemoryEvent, t: Test] : MemoryEvent->MemoryEvent { none->none } /* PPC */ fun ppo_PPC[t: Test] : MemoryEvent->MemoryEvent { t.po & t.dp } fun grf_PPC[rf: MemoryEvent->MemoryEvent, t: Test] : MemoryEvent->MemoryEvent { none->none } fun ab_sync[rf: MemoryEvent->MemoryEvent, t: Test] : MemoryEvent->MemoryEvent { let sync = ((t.po) :> (t.Syncs)).(t.po) | ^(sync + sync.rf + rf.sync) } fun ab_lwsync[rf: MemoryEvent->MemoryEvent, t: Test] : MemoryEvent->MemoryEvent { let lwsync = ((t.po) :> (t.Lwsyncs)).(t.po) & (t.Writes->t.Writes + t.Reads->t.Events) | ^(lwsync + (rf.lwsync :> t.Writes) + (t.Reads <: lwsync.rf)) } fun ab_PPC[rf: MemoryEvent->MemoryEvent, t: Test] : MemoryEvent->MemoryEvent { ab_sync[rf,t] + ab_lwsync[rf,t] } /* Vacuous */ fun ppo_vacuous[t: Test] : MemoryEvent->MemoryEvent { none->none } fun grf_vacuous[rf: MemoryEvent->MemoryEvent, t: Test] : MemoryEvent->MemoryEvent { none->none } fun ab_vacuous[rf: MemoryEvent->MemoryEvent, t: Test] : MemoryEvent->MemoryEvent { none->none }
libsrc/target/multi8/gencon/generic_console_ioctl.asm
jpoikela/z88dk
0
1022
MODULE generic_console_ioctl PUBLIC generic_console_ioctl SECTION code_clib INCLUDE "ioctl.def" EXTERN generic_console_cls EXTERN generic_console_font32 EXTERN generic_console_udg32 EXTERN __multi8_mode EXTERN __console_h EXTERN __console_w EXTERN __port29_copy EXTERN __vram_in ; a = ioctl ; de = arg generic_console_ioctl: ex de,hl ld c,(hl) ;bc = where we point to inc hl ld b,(hl) cp IOCTL_GENCON_SET_FONT32 jr nz,check_set_udg ld (generic_console_font32),bc success: and a ret check_set_udg: cp IOCTL_GENCON_SET_UDGS jr nz,check_mode ld (generic_console_udg32),bc jr success check_mode: cp IOCTL_GENCON_SET_MODE jr nz,failure ld a,c cp 1 jr z,set_mode_1 and a jr z,set_mode_0 cp 2 jr nz,failure set_mode_2: ;Graphics in a,($2a) and @00100000 ;Keep lower RAM page or @00011000 ;Page in all graphics pages ld l,a ld a,(__port29_copy) ld h,80 and @10111111 ;Bit 6 = 0 = 40 column set_mode: ld (__port29_copy),a out ($29),a ld a,c ld (__multi8_mode),a ld a,h ld (__console_w),a ld a,l ld (__vram_in),a call generic_console_cls jr success set_mode_1: ; 80 col text in a,($2a) and @00100111 ;Keep lower RAM page or @00010111 ;Page in text page ld l,a ld a,(__port29_copy) and @00111111 ;Bit 6 = 1 = 80 column or @01000000 ld h,80 jr set_mode set_mode_0: ; 40 col text in a,($2a) and @00100111 ;Keep lower RAM page or @00010111 ;Page in all text page ld l,a ld a,(__port29_copy) and @00111111 ;Bit 6 = 0 = 40 column ld h,40 jr set_mode failure: scf ret
bios.asm
mastmees/z-two
4
81147
<gh_stars>1-10 ; The MIT License (MIT) ; ; Copyright (c) 2018 <NAME> <<EMAIL>> ; ; Permission is hereby granted, free of charge, to any person obtaining a copy ; of this software and associated documentation files (the "Software"), to deal ; in the Software without restriction, including without limitation the rights ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ; copies of the Software, and to permit persons to whom the Software is ; furnished to do so, subject to the following conditions: ; ; The above copyright notice and this permission notice shall be included in all ; copies or substantial portions of the Software. ; ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ; SOFTWARE. ; ds bios-$ BIOSSTART: nsects: equ ($-ccp)/128 ;warm start sector count include "avr.inc" ; our disks have 128 logical sectors per track, in 32 physical sectors ; 512 tracks+4 system tracks ; 16384 byte logical blocks, 512 blocks per drive ; each track is one logical block blksiz: equ 16384 ;CP/M allocation size hstsiz: equ 512 ;host disk sector size hstspt: equ 32 ;host disk sectors/trk hstblk: equ 4 ;CP/M sects/host buff cpmspt: equ 128 ;CP/M sectors/track secmsk: equ hstblk-1 ;sector mask diskblocks: equ 512 ;disk size in logical blocks ; ; jump vectors for individual subroutines ; CBOOT: jp _boot ;cold start WBOOT: jp _wboot ;warm start CONST: jp _const ;console status CONIN: jp _conin ;console character in CONOUT: jp _conout ;console character out LIST: jp _list ;list character out PUNCH: jp _punch ;punch character out READER: jp _reader ;reader character out HOME: jp _home ;move head to home position SELDSK: jp _seldsk ;select disk SETTRK: jp _settrk ;set track number SETSEC: jp _setsec ;set sector number SETDMA: jp _setdma ;set dma address READ: jp _read ;read disk WRITE: jp _write ;write disk LISTST: jp _listst ;return list status SECTRN: jp _sectran ;sector translate ; fixed data tables for all 16 drives ; ; disk Parameter header for disk 00 dpbase: dw 0x0000 ; no translation table dw 0x0000,0x0000,0x0000 ; CP/M workspace dw dirbf ; address of 128 byte sector buffer (shared) dw dpblk ; DPB address dw 0x0000 ; not 'removable', so no directory checksums dw all00 ; disk allocation vector ; disk parameter header for disk 01 dw 0x0000 ; no translation table dw 0x0000,0x0000,0x0000 ; CP/M workspace dw dirbf ; address of 128 byte sector buffer (shared) dw dpblk ; DPB address dw 0x0000 ; not 'removable', so no directory checksums dw all01 ; disk allocation vector ; disk parameter header for disk 02 dw 0x0000 ; no translation table dw 0x0000,0x0000,0x0000 ; CP/M workspace dw dirbf ; address of 128 byte sector buffer (shared) dw dpblk ; DPB address dw 0x0000 ; not 'removable', so no directory checksums dw all02 ; disk allocation vector ; disk parameter header for disk 03 dw 0x0000 ; no translation table dw 0x0000,0x0000,0x0000 ; CP/M workspace dw dirbf ; address of 128 byte sector buffer (shared) dw dpblk ; DPB address dw 0x0000 ; not 'removable', so no directory checksums dw all03 ; disk allocation vector ; disk parameter header for disk 04 dw 0x0000 ; no translation table dw 0x0000,0x0000,0x0000 ; CP/M workspace dw dirbf ; address of 128 byte sector buffer (shared) dw dpblk ; DPB address dw 0x0000 ; not 'removable', so no directory checksums dw all04 ; disk allocation vector ; disk parameter header for disk 05 dw 0x0000 ; no translation table dw 0x0000,0x0000,0x0000 ; CP/M workspace dw dirbf ; address of 128 byte sector buffer (shared) dw dpblk ; DPB address dw 0x0000 ; not 'removable', so no directory checksums dw all05 ; disk allocation vector ; disk parameter header for disk 06 dw 0x0000 ; no translation table dw 0x0000,0x0000,0x0000 ; CP/M workspace dw dirbf ; address of 128 byte sector buffer (shared) dw dpblk ; DPB address dw 0x0000 ; not 'removable', so no directory checksums dw all06 ; disk allocation vector ; disk parameter header for disk 07 dw 0x0000 ; no translation table dw 0x0000,0x0000,0x0000 ; CP/M workspace dw dirbf ; address of 128 byte sector buffer (shared) dw dpblk ; DPB address dw 0x0000 ; not 'removable', so no directory checksums dw all07 ; disk allocation vector ; disk parameter header for disk 08 dw 0x0000 ; no translation table dw 0x0000,0x0000,0x0000 ; CP/M workspace dw dirbf ; address of 128 byte sector buffer (shared) dw dpblk ; DPB address dw 0x0000 ; not 'removable', so no directory checksums dw all08 ; disk allocation vector ; disk parameter header for disk 09 dw 0x0000 ; no translation table dw 0x0000,0x0000,0x0000 ; CP/M workspace dw dirbf ; address of 128 byte sector buffer (shared) dw dpblk ; DPB address dw 0x0000 ; not 'removable', so no directory checksums dw all09 ; disk allocation vector ; disk parameter header for disk 10 dw 0x0000 ; no translation table dw 0x0000,0x0000,0x0000 ; CP/M workspace dw dirbf ; address of 128 byte sector buffer (shared) dw dpblk ; DPB address dw 0x0000 ; not 'removable', so no directory checksums dw all10 ; disk allocation vector ; disk parameter header for disk 11 dw 0x0000 ; no translation table dw 0x0000,0x0000,0x0000 ; CP/M workspace dw dirbf ; address of 128 byte sector buffer (shared) dw dpblk ; DPB address dw 0x0000 ; not 'removable', so no directory checksums dw all11 ; disk allocation vector ; disk parameter header for disk 12 dw 0x0000 ; no translation table dw 0x0000,0x0000,0x0000 ; CP/M workspace dw dirbf ; address of 128 byte sector buffer (shared) dw dpblk ; DPB address dw 0x0000 ; not 'removable', so no directory checksums dw all12 ; disk allocation vector ; disk parameter header for disk 13 dw 0x0000 ; no translation table dw 0x0000,0x0000,0x0000 ; CP/M workspace dw dirbf ; address of 128 byte sector buffer (shared) dw dpblk ; DPB address dw 0x0000 ; not 'removable', so no directory checksums dw all13 ; disk allocation vector ; disk parameter header for disk 14 dw 0x0000 ; no translation table dw 0x0000,0x0000,0x0000 ; CP/M workspace dw dirbf ; address of 128 byte sector buffer (shared) dw dpblk ; DPB address dw 0x0000 ; not 'removable', so no directory checksums dw all14 ; disk allocation vector ; disk parameter header for disk 15 dw 0x0000 ; no translation table dw 0x0000,0x0000,0x0000 ; CP/M workspace dw dirbf ; address of 128 byte sector buffer (shared) dw dpblk ; DPB address dw 0x0000 ; not 'removable', so no directory checksums dw all15 ; disk allocation vector ndisks: equ ($-dpbase)/16 ;disk parameter block, common to all disks dpblk: dw 128 ;SPT number of 128 byte sectors per track db 7 ;BSH block shift factor (128<<bsf=block size) db 127 ;BLM block mask (blm+1)*128=block size db 7 ;EXM extent mask EXM+1 physical extents per ;dir entry dw diskblocks-1 ;disk size-1, in blocks dw 511 ;directory max, 1 block for directory=512 ;directory entries db 0x80 ;alloc 0 db 0 ;alloc 1 dw 0 ;check size, 0 for fixed disks dw 4 ;track offset for boot tracks ; cold boot loader, this is only invoked once, ; when the CP/M is initially loaded _boot: ld sp,0x80 _bootx: call welcome ;do one-off things, later patched out jr initcpm ;initialize and go to cp/m ; warm boot loader, this is called to ; reload ccp&bdos in case it was overwritten by application _wboot: ld sp, 0x80 ;use space below buffer for stack call writeback ;ensure host sector is written ld hl,0 ld (buflba_l),hl ;and force read on next access ld (buflba_h),hl ld a,2 out (A_MSCC),a ; command 2 - load cpm ld hl,ccp ld e,0x16 ; ccp+bdos is 0x1600 bytes ld b,0 ; full pages ld c,A_MSCD ; data port loop: inir ; transfer page from data port dec e ; all pages done? jr nz,loop ; no, next page initcpm: ld a, 0xc3 ;c3 is a jmp instruction ld (0),a ;for jmp to wboot ld hl, WBOOT ;wboot entry point ld (1),hl ;set address field for jmp at 0 ld (5),a ;for jmp to bdos ld hl, bdos ;bdos entry point ld (6),hl ;address field of Jump at 5 to bdos ld bc, 0x0080 ;default dma address is 80h call _setdma ld a,(sekdsk) ;get current disk number ld c, a ;send to the ccp jp ccp ;start command processor ; Console status ; Returns its status in A; 0 if no character is ready, 0FFh if one is. _const: in a,(A_CONS) and 1 ret z ld a,0xff ret ; Console input ; Wait until the keyboard is ready to provide a character, and return it in A. _conin: in a,(A_CONS) and 1 jr z,_conin in a,(A_COND) and 0x7f ;strip parity bit ret ; Console output ; Write the character in C to the screen _conout: in a,(A_CONS) ;make sure there is room and 2 ;so that we wont freeze AVR interrupt jr nz,_conout ;handler ld a, c ;get to accumulator out (A_COND),a ret ; List output ; Write the character in C to the printer. If the printer isn't ready, wait until it is. _list: ret ;we dont have printer yet ; List status ; Return status of current printer device. ; Returns A=0 (not ready) or A=0FFh (ready). _listst: xor a ;never ready ret ; Punch out ; Write the character in C to the "paper tape punch" ; or whatever the current auxiliary device is. ; If the device isn't ready, wait until it is. ; for the Z-ONE, punch is aux serial port ; but it is not initialized by default ; _punch: in a,(A_AUXS) and 0x10 ;check for tx queue full jr nz,_punch ld a, c ;character to register a out (A_AUXD),a ret ; Reader in ; Read a character from the "paper tape reader" ; or whatever the current auxiliary device is. ; If the device isn't ready, wait until it is. ; The character will be returned in A. If this device isn't implemented, return character 26 (^Z). ; _reader: in a,(A_AUXS) and 0x40 ;check for receive data available jr z,_reader in a,(A_AUXD) and 0x7f ;remember to strip parity bit ret ; home the selected disk, in old times that just did the seek ; to track 0. this is called relatively often, so we are ; using it to also flush unwritten host sector to SD card ; _home: call writeback ld bc,0 jp _settrk ; select disk ; C is disk number ; return pointer to DPB in HL _seldsk: ld a,c ld hl,0 cp ndisks ;see if disk is in valid range ret nc ld (sekdsk),a ;store it for later ; now calculate first LBA sector number for drive ; by adding constant drive size to start of partition ; (yes, it means higher number disks are slower to select) ld hl,(firstlba_l) ld de,(firstlba_h) inc c _seld1: dec c jr z,_seld2 push bc ld bc,16384+128 add hl,bc jr nc,_seld3 inc de _seld3: pop bc jr _seld1 _seld2: ld (dsklba_l),hl ;store the start sector address ld (dsklba_h),de ;for selected disk ld h,0 ld a,(sekdsk) ld l,a ;disk number to HL add hl,hl add hl,hl add hl,hl add hl,hl ld de,dpbase ;base of parm block add hl,de ;hl=DPB of selected disk ret ; set track given by BC _settrk: ld h,b ld l,c ld (sektrk),hl ret ; set sector given by register bc ; as we have only 128 sectors per track, b can be ignored _setsec: ld a,c ld (seksec),a ret ;set dma address given by BC _setdma: ld h,b ld l,c ld (dmaadr),hl ret ; translate sector number BC ; return translated sector number in HL, in our case unchanged _sectran: ld h,b ld l,c ret ; read sector at sekdsk,sektrk,seksec into buffer set by setdma _read: call checkbuf ;ensure correct host sector is in buffer or a ;failures are actually rather fatal ret nz ;but we'll let BDOS handle the errors ld bc,128 ;logical sector size ldir ;checkbuf already set up registers xor a ;successful read ret ; on entry ; c=0 for normal sector read/write, if different from buffered then ; new host sector must be read to buffer ; c=1 for directory sectore read/write. the host buffer will be written ; back immediately ; c=2 for write to unallocated block, no preread needed. this is only set ; for very first sector and DR deblocking code then tried to keep track ; when the disk block was filled up. The implementation however only ; worked for first host sector and then started pre-reading all sectors ; anyway, so in my code i'm just prereading in all cases as the SD card ; is super fast compared to floppies _write: call checkbuf ;ensure correct host sector is in buffer or a ret nz push bc ld bc,128 ex de,hl ;change director for write ldir ;and transfer data to buffer pop bc ld a,1 ;mark buffer dirty ld (bufmod),a cp c ;was this a directory write? ld a,0 ret nz ;no, all done jp writeback ;otherwise write to card immediately ; ensure that host buffer has wanted host sector in it ; if a new sector is needed then checks the buffer status and ; writes the contents to media if the buffer has changed checkbuf: call isvalidsec jr z,cbuf2 ;already have correct sector ;host sector is changing cbuf1: push bc call writeback ;if current buffer is dirty, write it pop bc or a ret nz call calchstsec ;calculate new wanted host sector ld (buflba_l),hl ld (buflba_h),de ;store for later writeback push bc ld bc,hstbuf call readsector ;and read in new host sector pop bc or a ret nz cbuf2: call setdmareg ;set up registers for data transfers xor a ret ; calculate pointer into host sector buffer for seksec ; into HL, load current dmaadr to DE setdmareg: ld a,(seksec) ;0..127 and 3 ;4 logical sectors per host sector ld l,a ld h,0 add hl,hl add hl,hl add hl,hl add hl,hl add hl,hl add hl,hl add hl,hl ;HL now offset into host sector ld de,hstbuf add hl,de ;hl now points to sector data in host buf ld de,(dmaadr) ;de points to user buffer ret ; check if the host sector in buffer is the sector ; sekdsk, sektrk, seksec refer to. return NZ if wrong ; sector in buffer, Z if correct sector isvalidsec: push bc call calchstsec ld b,h ld c,l ld hl,buflba_h ld a,e cp (hl) jr nz,isvs1 inc hl ld a,d cp (hl) jr nz,isvs1 ld hl,buflba_l ld a,c cp (hl) jr nz,isvs1 inc hl ld a,b cp (hl) isvs1: ld h,b ld l,c pop bc ret ; calculate host sector address for sekdsk,sektrk,seksec ; returns with LBA sector number in DEHL calchstsec: push bc ld hl,(sektrk) ; we have 32 LBA sectors per track add hl,hl add hl,hl add hl,hl add hl,hl add hl,hl ld b,h ld c,l ;bc is now LBA sector at beginning of track ld a,(seksec) or a rra or a rra ;cp/m sector number now divided by 4 add a,c ld c,a ld a,0 adc a,b ld b,a ;BC is now LBA sector within drive ld hl,(dsklba_l) ld de,(dsklba_h) add hl,bc ;add to drive start to make it absolute jr nc,cbuf3 inc de cbuf3: pop bc ret ; flush host sector buffer if dirty, and mark it clean writeback: ld a,(bufmod) or a ret z ld hl,(buflba_l) ld de,(buflba_h) ld bc,hstbuf call writesector ld (bufmod),a ;if good write then also marks clean ret ; reading and writing is done by first setting sector number, then writing ; command (0 for read, 1 for write) to A_SDC. for write the next step is to ; write 512 bytes to the data register. After that A_SDC needs to be ; read until its high bit becomes set to indicate operation has completed. ; zero value read from A_SDS means that operation was successful, and for ; read operation 512 data bytes may now be read from A_SDD. ; ; write data from BC to physical sector given by DEHL ; returns result code in A. 0 means success ; writesector: call setsadr ld a,1 out (A_SDC),a ld h,b ld l,c ld b,0 ld c,A_SDD otir ; write 256 data bytes otir ; and second half ws1: in a,(A_SDC) and 0x80 jr z,ws1 ; not done yet in a,(A_SDS) and a ret ; read physical sector given by DEHL to address given by BC ; returns result code in A, if result is 0 then data is read ; readsector: call setsadr xor a out (A_SDC),a rs1: in a,(A_SDC) ; poll for command completed and 0x80 jr z,rs1 in a,(A_SDS) ; get status or a ret nz ld h,b ld l,c ld b,0 ld c,A_SDD inir ;read 256 bytes inir ;and again xor a ret setsadr: ld a,d out (A_SD3),a ld a,e out (A_SD2),a ld a,h out (A_SD1),a ld a,l out (A_SD0),a ret ; print zero terminated string at HL pstr: ld a,(hl) and a ret z push bc ld c,a call _conout pop bc inc hl jr pstr dsklba_l: dw 0 ; first LBA sector of currently selected disk dsklba_h: dw 0 firstlba_l: dw 0 ; first LBA sector of CP/M partition on the card firstlba_h: dw 0 buflba_l: dw 0 ; LBA sector that is currently in hstbuf buflba_h: dw 0 bufmod: db 0 ; nonzero means the sector as been modified ; ;***************************************************** ;* * ;* Unitialized RAM data areas * ;* * ;***************************************************** begdat: equ $ ;beginning of data area dirbf: ds 128 ;scratch directory area ; disk allocation vectors, 1 bit per block. we have ; 128 logical sectors per block, so total 512 blocks ; on drive, alv needs 64 bytes per drive, one for each drive all00: ds (diskblocks/8) ;A all01: ds (diskblocks/8) ;B all02: ds (diskblocks/8) ;C all03: ds (diskblocks/8) ;D all04: ds (diskblocks/8) ;E all05: ds (diskblocks/8) ;F all06: ds (diskblocks/8) ;G all07: ds (diskblocks/8) ;H all08: ds (diskblocks/8) ;I all09: ds (diskblocks/8) ;J all10: ds (diskblocks/8) ;K all11: ds (diskblocks/8) ;L all12: ds (diskblocks/8) ;M all13: ds (diskblocks/8) ;N all14: ds (diskblocks/8) ;O all15: ds (diskblocks/8) ;P sekdsk: ds 1 ;seek disk number sektrk: ds 2 ;seek track number seksec: ds 1 ;seek sector number dmaadr: ds 2 ;last dma address ; host sector buffer has 512 bytes of space that will be overwritten ; after boot, using this for one-off stuff happening at cold boot only. ; if needed, directory buffer and allocation vector area could be used similarily. hstbuf: ;reset and clear console db 27,"c",15,27,"[","H",27,"[","2","J" db 0 ostitle: db "6","3","k"," ","C","P","/","M"," ","v","e","r","s","i","o","n"," ","2",".","2",13,10 db "Z","-","T","w","o"," ","B","I","O","S"," ","v","e","r","s","i","o","n"," ","1",".","0",13,10 db "h","t","t","p",":","/","/","w","w","w",".","n","o","m","a","d",".","e","e","/" db "m","i","c","r","o","s","/","z","-","t","w","o" db 13,10,0 welcome: ld hl,hstbuf call pstr ;first initialize console and ld hl,ostitle ;display welcome messages call pstr xor a ;zero in the accum ld (bufmod),a ;make sector buffer clear ld (iobyte),a ;clear the iobyte ld (sekdsk),a ;select disk zero ld hl,(0x84) ;bootstrap loader stored ld (firstlba_l),hl ;partition data at 0x80 ld hl,(0x86) ;and first LBA sector number ld (firstlba_h),hl ;is at 0x84 ld hl,0 ld (buflba_l),hl ;cp/m should never try accessing partition ld (buflba_h),hl ;table as the first thing, so this should be ;safe starting point ld hl,0 ld (_bootx),hl ;ensure this code is no longer called ld (_bootx+1),hl ;by modifying cold boot function ret ds hstsiz-($-hstbuf) ;host buffer CPMTOP: ds 0xffff-$ nop
programs/oeis/172/A172051.asm
neoneye/loda
22
11856
; A172051: Decimal expansion of 1/999999. ; 0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0 mod $0,6 trn $0,4
programs/oeis/308/A308124.asm
karttu/loda
1
95893
; A308124: a(n) = (2 + 7*4^n)/3. ; 3,10,38,150,598,2390,9558,38230,152918,611670,2446678,9786710,39146838,156587350,626349398,2505397590,10021590358,40086361430,160345445718,641381782870,2565527131478,10262108525910,41048434103638,164193736414550,656774945658198,2627099782632790 mov $1,4 pow $1,$0 div $1,3 mul $1,7 add $1,3
oeis/002/A002447.asm
neoneye/loda-programs
11
178823
<reponame>neoneye/loda-programs ; A002447: Expansion of 1/(1-2*x^2-3*x^3). ; Submitted by <NAME> ; 1,0,2,3,4,12,17,36,70,123,248,456,865,1656,3098,5907,11164,21108,40049,75708,143422,271563,513968,973392,1842625,3488688,6605426,12505251,23676916,44826780,84869585,160684308,304219510,575977371,1090491944,2064613272,3908916001,7400702376,14011671818,26528152755,50225450764,95091320964,180035359793,340858994220,645344682478,1221824067819,2313266347616,4379682183072,8292004898689,15699163408992,29723056346594,56274341514051,106543602920164,201717852067884,381910230382481,723066512896260 add $0,1 lpb $0 sub $0,1 mov $1,$2 add $4,1 mov $2,$4 mul $2,2 sub $4,$2 add $2,$3 add $4,$3 add $3,$1 lpe add $0,$2 div $0,2
src/asf-helpers-beans.adb
jquorning/ada-asf
12
194
----------------------------------------------------------------------- -- asf-helpers-beans -- Helper packages to write ASF applications -- Copyright (C) 2012, 2017 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Beans.Objects; with ASF.Contexts.Faces; package body ASF.Helpers.Beans is -- ------------------------------ -- Get a bean instance associated under the given name from the current faces context. -- A null value is returned if the bean does not exist or is not of the good type. -- ------------------------------ function Get_Bean (Name : in String) return Element_Access is use type ASF.Contexts.Faces.Faces_Context_Access; use type Util.Beans.Basic.Readonly_Bean_Access; Context : constant ASF.Contexts.Faces.Faces_Context_Access := ASF.Contexts.Faces.Current; begin if Context = null then return null; end if; declare Bean : constant Util.Beans.Basic.Readonly_Bean_Access := Context.Get_Bean (Name); begin if Bean = null or else not (Bean.all in Element_Type'Class) then return null; else return Element_Type'Class (Bean.all)'Access; end if; end; end Get_Bean; -- ------------------------------ -- Get a bean instance associated under the given name from the request. -- A null value is returned if the bean does not exist or is not of the good type. -- ------------------------------ function Get_Request_Bean (Request : in ASF.Requests.Request'Class; Name : in String) return Element_Access is Value : constant Util.Beans.Objects.Object := Request.Get_Attribute (Name); Bean : constant access Util.Beans.Basic.Readonly_Bean'Class := Util.Beans.Objects.To_Bean (Value); begin if Bean = null or else not (Bean.all in Element_Type'Class) then return null; else return Element_Type'Class (Bean.all)'Access; end if; end Get_Request_Bean; end ASF.Helpers.Beans;
data/tileset_headers.asm
adhi-thirumala/EvoYellow
16
7985
Tilesets: tileset Overworld_Block, Overworld_GFX, Overworld_Coll, $FF,$FF,$FF, $52, OUTDOOR tileset RedsHouse1_Block, RedsHouse1_GFX, RedsHouse1_Coll, $FF,$FF,$FF, $FF, INDOOR tileset Mart_Block, Mart_GFX, Mart_Coll, $18,$19,$1E, $FF, INDOOR tileset Forest_Block, Forest_GFX, Forest_Coll, $FF,$FF,$FF, $20, CAVE tileset RedsHouse2_Block, RedsHouse2_GFX, RedsHouse2_Coll, $FF,$FF,$FF, $FF, INDOOR tileset Dojo_Block, Dojo_GFX, Dojo_Coll, $3A,$FF,$FF, $FF, OUTDOOR tileset Pokecenter_Block, Pokecenter_GFX, Pokecenter_Coll, $18,$19,$1E, $FF, INDOOR tileset Gym_Block, Gym_GFX, Gym_Coll, $3A,$FF,$FF, $FF, OUTDOOR tileset House_Block, House_GFX, House_Coll, $FF,$FF,$FF, $FF, INDOOR tileset ForestGate_Block, ForestGate_GFX, ForestGate_Coll, $17,$32,$FF, $FF, INDOOR tileset Museum_Block, Museum_GFX, Museum_Coll, $17,$32,$FF, $FF, INDOOR tileset Underground_Block, Underground_GFX, Underground_Coll, $FF,$FF,$FF, $FF, INDOOR tileset Gate_Block, Gate_GFX, Gate_Coll, $17,$32,$FF, $FF, INDOOR tileset Ship_Block, Ship_GFX, Ship_Coll, $FF,$FF,$FF, $FF, CAVE tileset ShipPort_Block, ShipPort_GFX, ShipPort_Coll, $FF,$FF,$FF, $FF, CAVE tileset Cemetery_Block, Cemetery_GFX, Cemetery_Coll, $12,$FF,$FF, $FF, INDOOR tileset Interior_Block, Interior_GFX, Interior_Coll, $FF,$FF,$FF, $FF, INDOOR tileset Cavern_Block, Cavern_GFX, Cavern_Coll, $FF,$FF,$FF, $FF, CAVE tileset Lobby_Block, Lobby_GFX, Lobby_Coll, $15,$36,$FF, $FF, INDOOR tileset Mansion_Block, Mansion_GFX, Mansion_Coll, $FF,$FF,$FF, $FF, INDOOR tileset Lab_Block, Lab_GFX, Lab_Coll, $FF,$FF,$FF, $FF, INDOOR tileset Club_Block, Club_GFX, Club_Coll, $07,$17,$FF, $FF, INDOOR tileset Facility_Block, Facility_GFX, Facility_Coll, $12,$FF,$FF, $FF, CAVE tileset Plateau_Block, Plateau_GFX, Plateau_Coll, $FF,$FF,$FF, $45, CAVE tileset BeachHouse_Block, BeachHouse_GFX, BeachHouse_Coll, $FF,$FF,$FF, $FF, INDOOR
Userland/SampleCodeModule/asm/sys_caller.asm
ignacioVidaurreta/bootLoader
1
10409
<filename>Userland/SampleCodeModule/asm/sys_caller.asm GLOBAL int80 section .text int80: push rbp mov rbp, rsp mov rax, r9 int 80h mov rsp, rbp pop rbp ret
oeis/115/A115164.asm
neoneye/loda-programs
11
92202
; A115164: a(n) = 3*a(n-1) + 4*a(n-2), with a(0) = 3, a(1) = 7, a(3) = 9, for n > 2. ; Submitted by <NAME>(s2) ; 3,7,9,55,201,823,3273,13111,52425,209719,838857,3355447,13421769,53687095,214748361,858993463,3435973833,13743895351,54975581385,219902325559,879609302217,3518437208887,14073748835529,56294995342135,225179981368521,900719925474103,3602879701896393,14411518807585591,57646075230342345,230584300921369399,922337203685477577,3689348814741910327,14757395258967641289,59029581035870565175,236118324143482260681,944473296573929042743,3777893186295716170953,15111572745182864683831,60446290980731458735305 mov $1,-4 pow $1,$0 sub $1,1 div $1,5 mul $1,4 sub $1,3 gcd $2,$1 mov $0,$2
node_modules/@sap/cds-compiler/lib/language/language.g4
lbritz/RiskApplication
0
888
// ANTLR4 grammar to generate Parser and Lexer for CDS-Language // To be built the parser by hand, install Java, download the ANTLR4 tool, then // antlr4 -no-listener -o ../gen language.g4 // Alternatively, install Java, and use // npm run download && npm run gen // // To test the parser in the REPL, see file './lib/language/antlrParser.js'. // This grammar is built according to the following guidelines: // // * Do not express every syntactical restriction by grammar rules, and do // not define a grammar which allows every nonsense. We might specify // syntactical restrictions in a certain form inside actions or semantic // predicates to have them directly available for IDE code completion. // // * Keep the number of token types small. Thus, do not define different // token types for things which are not distinguished in the parser. // Examples: one token type for numbers (have a check if you just want to // allow integers at certain places), one token type for non-quoted and // quoted identifiers. // // * Keep the number of keywords as small as possibile. Thus, built-ins is a // topic for the semantic analysis, not the grammar. Examples: no keywords // for built-in types or built-in SQL functions. This also avoids noise in // the grammar and a huge/slow generated parser. // ┌─────────────────────────────────────────────────────────────────────────┐ // For our adapted ANTLR error strategy concerning (non-reserved) keywords, // make sure to define non-reserved keywords between the lexer rule `Number` // and `Identifier`. The latter must be the second last rule, the last is // `IllegalToken`. Do not rename these three rules. Add each new // non-reserved keyword to rule `ident`, but check for ambiguities! // └─────────────────────────────────────────────────────────────────────────┘ // // * Left-factor the parser grammar if the same initial part covers more than // one or two tokens. ANTLRs adaptive predication allows to write "natural" // rules, but slows down parsing, especially if a long lookahead is needed // to solve an LLk ambiguity. Therefore, try to avoid it in rules which are // called often. Unfortunately, we cannot use ANTLR3's grammar and subrule // option 'k' (lookahead depth) anymore... Therefore... // ┌─────────────────────────────────────────────────────────────────────────┐ // Before each alternative with LL1 ambiguities (looking at the next token // is not enough for a decision), write a comment starting with `#ATN:` // which describes the ambiguity. Additionally, put a comment `/* #ATN n // */` INSIDE an (`@after`) action of a rule if the corresponding function // in '../gen/langageParser.js' contains `n` occurrences of // `adaptivePredict` calls. This is checked in 'test/testCompiler.js', // which also counts the total number of `adaptivePredict` occurrences. // └─────────────────────────────────────────────────────────────────────────┘ // // * For fast parsing and lower memory consumption, we use ANTLR4 with SLL // prediction-mode only. That means that ANTLR does not use the actual call // stack when deciding which alternative to choose in a rule. You might // need to copy a rule manually to get less ambiguities - this might be a // good idea anyway to avoid calls to `adaptivePredict`, see the rules // starting with `annotationAssignment_`. // // * Do not use actions in the lexer. Examples: de-quote string literals not // in the lexer, but in the parser; do not throw errors, but produce error // tokens if necessary. // // * Use actions in the parser to produce a Augmented CSN model. To have it // also in the case of syntax errors, produce it by adding sub-nodes to a // parent node, not by returning the nodes (the latter is fine for secondary // attachments). // // * Action code should be a one-liner (<100 chars); usually, just one action // is called per alternative (plus the @after action which sets the AST // location). For more complicated code, define a method in file // './genericAntlrParser.js'. // // * Do not write lexer rules for tokens like ';', use ';' directly in the // parser rule. Advantage: better error messages; taste: more or less // readable grammar; disadvantage: debugging in generated code. // // * Use all-upper token names for keywords (e.g. CONTEXT), capitalized ones // (e.g. Number) for others - EOF is the exception (is ANTLR-builtin). // Remember: parser rule names in ANTLR start with a lower-case letter. // // * No useless parentheses in the grammar. There are just two binary grammar // operators: alternative (`|`) and sequence. It should not be too hard to // remember that sequence binds stronger than alternative. // // * Use the following indentation rules: // - rule header: indentation 0 + 2* parentheses/braces depth // - rule colon (':' separating header & body): 2 // - rule body: 4 + 2* parentheses/braces depth, -2 for certain chars at // beginning of line: '|', ')', ']' or '}' // - inside action: as for the action language, e.g. function argument // alignment // - rule semicolon (';' ending body, before exceptions): 2 // - rule exceptions (not used): 2 + 2* parentheses/braces depth // Some practical info: // // * The end location for the match of a rule is just available in the @after // action. Use method `attachLocation` there on the produced AST. // // * Be careful with the rule names: the methods in antlr4.Parser, the methods // in `./antlrParser' and the parser rule names share the same namespace. // Any shadowing lead to an exception when running 'test/testCompiler.js'. // // * Be careful with names for rule arguments, returns, locals and rule // reference labels: the names `parser`, `parent` and `invokingState` cannot // be used (these are added by the generator). // // * The ANTLR error "missing attribute access on rule reference c in $c" can // be solved with using $ctx.c instead of $c grammar language; options { language = JavaScript; superClass = genericAntlrParser; } tokens { VIRTUAL, // used with setLocalToken() HelperToken1, // used with setLocalToken(), does not appear in messages HelperToken2, // used with setLocalToken(), does not appear in messages HideAlternatives, // hide alternative tokens (no token seq!) GenericArgFull, // via token rewriting according to specialFunctions DOTbeforeBRACE, // via token rewrite COMPOSITIONofBRACE // via token rewrite in rule typeAssociationBase } // Top-Level ----------------------------------------------------------------- start returns [ source = { kind: 'source' } ] locals [ _sync = 'recover' ] : usingDeclaration[$source]* ( namespaceDeclaration[$source] ( usingDeclaration[$source] | artifactDef[$source] )* | artifactDef[$source] ( usingDeclaration[$source] | artifactDef[$source] )* )? EOF ; queryEOF returns [ query ] : q=queryExpression { $query = $q.query; } EOF ; conditionEOF returns [ cond ] : c=condition { $cond = $c.cond; } EOF ; namespaceDeclaration[ source ] locals[ decl = {} ] @after { $source.namespace = this.attachLocation($decl); } : NAMESPACE simplePath[ $decl, 'Namespace' ] ';' ; usingDeclaration[ source ] locals[ decl ] @after { if ($decl) this.attachLocation($decl); } : USING ( FROM str=String { if (!$source.dependencies) $source.dependencies = []; $source.dependencies.push( this.quotedLiteral( $str, 'string' ) ); } | path=externalPath { $decl = this.addItem( $source, 'usings', 'using', [], { extern: $path.extern } ); } ( AS name=ident['Using'] { $decl.name = $name.id; } | { this.classifyImplicitName( 'Using' ); } ) ( FROM str=String { if (!$source.dependencies) $source.dependencies = []; $source.dependencies.push( $decl.fileDep = this.quotedLiteral( $str, 'string' ) ); } )? | { $decl = this.addItem( $source, 'usings', 'using', [] ); } // We could just create "independent" USING declaration, but if we want // to have some check in the future whether the external artifacts are // really in the FROM source... '{' innerUsing[ $decl ] ( ',' { if (this.isStraightBefore("}")) break; } // allow ',' before '}' innerUsing[ $decl ] )* '}' ( FROM str=String { if (!$source.dependencies) $source.dependencies = []; $source.dependencies.push( $decl.fileDep = this.quotedLiteral( $str, 'string' ) ); } )? ) ';' ; innerUsing[ using ] locals[ decl ] @after { if ($decl) this.attachLocation($decl); } : path=externalPath { $decl = this.addItem( $using, 'usings', 'using', null, { extern: $path.extern } ); } ( AS name=ident['Using'] { $decl.name = $name.id; } | { this.classifyImplicitName( 'Using' ); } ) ; externalPath returns [ extern = {} ] : simplePath[ $extern, 'global' ] ; // We have two versions of the annotation assignment rule, because we do not // want to let the ambiguity in select items (solution: "either" possibility) // creep into all annotation assignments: // view V(p) as select from E { // either: anno value "ref p", select item -x // @anno :p - x as x; // or: anno value true, select item :p-x // } annotationAssignment_1[ annos ] locals[ assignment = { name: {} } ] @after { $annos.push( this.attachLocation($assignment) ); } : annotationPath[ $assignment.name, 'anno' ] annotationPathVariant[ $assignment.name ]? ( ':' { this.meltKeywordToIdentifier(true); } // allow path as anno value start with reserved val=annoValue { $assignment.value = $val.val; } )? ; annotationAssignment_paren[ annos ] : '(' // allow completely useless `@()` with a warning, do not offer it for completion { this.meltKeywordToIdentifier(); if (this.isStraightBefore(')')) { this.warning( 'syntax-anno-useless', this.tokenLocation( this._input.LT(-2), this.getCurrentToken() ), { code: '@()' }, 'Ignored useless $(CODE)' ); this.matchWildcard(); // we know it is the ')' - we do not reach the final match return $ctx; } } annotationAssignment_1[ $annos ] ( ',' { this.meltKeywordToIdentifier(); if (this.isStraightBefore(')')) break; // allow ',' before ')' } annotationAssignment_1[ $annos ] )* ')' ; annotationAssignment_fix[ annos ] locals[ assignment ] // value outside @(...) @after { if ($assignment) { $annos.push( this.attachLocation($assignment) ); this.docComment( $annos ); } } : '@' ( annotationAssignment_paren[ annos ] | { $assignment = { name: {} }; } annotationPath[ $assignment.name, 'anno' ] annotationPathVariant[ $assignment.name ]? { var t = this.getCurrentToken(); if (t.text === ':') this.warning( 'syntax-anno-short', $assignment.name.location, { code: '@(...)' }, 'Better use $(CODE) for annotation assignments here' ); } ) ; annotationAssignment_ll1[ annos ] locals[ assignment ] @after { if ($assignment) { $annos.push( this.attachLocation($assignment) ); this.docComment( $annos ); } } : '@' ( annotationAssignment_paren[ annos ] | { $assignment = { name: {} }; } annotationPath[ $assignment.name, 'anno' ] annotationPathVariant[ $assignment.name ]? ( ':' { this.meltKeywordToIdentifier(true); } // allow path as anno value start with reserved val=annoValue { $assignment.value = $val.val; } )? ) ; // Has previously used ATN, now via local token rewrite annotationAssignment_atn[ annos ] locals[ assignment ] @after { if ($assignment) { $annos.push( this.attachLocation($assignment) ); this.docComment( $annos ); } } : '@' ( annotationAssignment_paren[ annos ] | { $assignment = { name: {} }; } annotationPath[ $assignment.name, 'anno' ] // '#' is in the follow set of this rule, as it is used in rule "selectItemDef" // before an "expression" which can start with a '#' for an enum value // -> used to introduce variant name if and only if in same line as previous token { this.setLocalToken( '#', 'HelperToken1', null, true ); } ( HelperToken1 { this.meltKeywordToIdentifier(); } variant=ident['variant'] { $assignment.name.variant = $variant.id; } )? // ':' is in the follow set of this rule, as it is used in rule "selectItemDef" // before an "expression" which can start with a ':' for a parameter reference // -> used to introduce assignment value if and only if in same line as previous token { this.setLocalToken( ':', 'HelperToken2', null, true ); } ( HelperToken2 // ':' { this.meltKeywordToIdentifier(true); } // allow path as anno value start with reserved ( val=annoValueBase { $assignment.value = $val.val; } | { $assignment.value = {}; } // TODO: think about expression value representation at='@'? annotationPath[ $assignment.value, 'ref', $at ] { this.setLocalToken( '#', 'HelperToken1', null, true ); } // see above ( HelperToken1 { this.meltKeywordToIdentifier(); } variant=ident['variant'] { $assignment.value.variant = $variant.id; } )? ) )? ) ; // Main artifact definitions ------------------------------------------------- requiredSemi : ';' | { return $ctx; } // do not actually parse the closing brace '}' ; optionalSemi : { this.noAssignmentInSameLine(); } // issue warning for } @Anno \n? NextDef ';'? ; artifactDef[ outer, defOnly = false ] locals[ annos = [] ] // cannot use `parent` as parameter name! @after{ /* #ATN 1 */ } : { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ( DEFINE? ( contextDef[ $outer, this.startLocation(), $annos, defOnly ] | entityDef[ $outer, this.startLocation(), $annos ] | typeDef[ $outer, this.startLocation(), $annos ] | aspectDef[ $outer, this.startLocation(), $annos ] | annotationDef[ $outer, this.startLocation(), $annos ] | viewDef[ $outer, this.startLocation(), $annos ] | eventDef[ $outer, this.startLocation(), $annos ] | actionFunctionMainDef[ $outer, this.startLocation(), $annos ] ) | extend=EXTEND { if (defOnly) // this is a syntax restriction which is ensured in CSN in // another way this.error( 'syntax-extend-context', $extend, { code: 'EXTEND artifact', kind: defOnly }, 'No $(CODE) within $(KIND) extensions' ); } // #ATN: EXTEND elem, while CONTEXT, ENTITY etc are not reserved ( extendContext[ $outer, this.startLocation(), $annos ] | extendEntity[ $outer, this.startLocation(), $annos ] | extendProjection[ $outer, this.startLocation(), $annos ] | extendType[ $outer, this.startLocation(), $annos ] | extendAspect[ $outer, this.startLocation(), $annos ] // TODO: what about extendAction | extendArtifact[ $outer, this.startLocation(), $annos ] ) | annotate=ANNOTATE { if (defOnly) // this is a syntax restriction which is ensured in CSN in // another way this.error( 'syntax-extend-context', $annotate, { code: 'ANNOTATE artifact', kind: defOnly }, 'No $(CODE) within $(KIND) extensions' ); this.meltKeywordToIdentifier(); } annotateArtifact[ $outer, this.startLocation(), $annos ] // not kind-specific ) ; contextDef[ outer, loc, annos, defOnly = false ] locals[ art, name = {} ] @after { this.attachLocation($art); } : ( CONTEXT | service=SERVICE ) simplePath[ $name, $service ? 'Service' : 'Context' ] { $art = this.addDef( $outer, 'artifacts', $service ? 'service' : 'context', $name, $annos, {}, $loc ); this.docComment( $annos ); } annotationAssignment_fix[ $annos ]* ( '{' artifactDef[ $art, defOnly, true ]* '}' optionalSemi | requiredSemi ) ; extendContext[ outer, loc, annos ] locals[ art, name = {} ] @after { this.attachLocation($art); } : ( CONTEXT | service=SERVICE ) simplePath[ $name, $service ? 'Service' : 'Context' ] // not 'Extend' here { $art = this.addItem( $outer, 'extensions', 'extend', $annos, { name: $name, expectedKind: $service ? 'service' : 'context' }, $loc ); } ( WITH { this.noSemicolonHere(); } )? { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ( '{' artifactDef[ $art, $service ? 'SERVICE' : 'CONTEXT', true ]* '}' optionalSemi | requiredSemi ) ; entityDef[ outer, loc, annos ] locals[ art, name = {} ] @after { this.attachLocation($art); } : ENTITY simplePath[ $name, 'Entity' ] { $art = this.addDef( $outer, 'artifacts', 'entity', $name, $annos, {}, $loc ); this.docComment( $annos ); } annotationAssignment_fix[ $annos ]* entityParameters[ $art ]? ( ( ':' includeRef[ $art ] ( ',' { if (this.isStraightBefore('{')) break; } // allow ',' before '{' // }} includeRef[ $art ] )* )? '{' { $art.elements = Object.create(null); } // better for include and annotate elementDef[ $art ]* '}' // TODO: action definitions in a specific section? ( ACTIONS '{' actionFunctionDef[ $art ]* '}' )? optionalSemi | AS ( qe=queryExpression { $art.query = $qe.query; $art['$'+'syntax'] = 'entity' } ( ACTIONS '{' actionFunctionDef[ $art ]* '}' optionalSemi | requiredSemi ) | qp=projectionSpec { $art.query = $qp.query; $art['$'+'syntax'] = 'projection'; } projectionClauses[ $qp.query ] ( ACTIONS '{' actionFunctionDef[ $art ]* '}' )? optionalSemi // TODO: not fully correct without columns or excluding ) ) ; projectionSpec returns[ query ] locals[ src ] @after { this.attachLocation($query); } : proj=PROJECTION ON // FIXME: First draft only, details unclear/unspecified // now a simplified `tableTerm`: { $src = { path: [], scope: 0 }; $query = { op: this.tokenLocation( $proj, undefined, 'SELECT' ), from: $src, location: this.startLocation() }; } fromPath[ $src, 'artref'] ( ':' { $src.scope = $src.path.length; } fromPath[ $src, 'ref'] )? ( AS aliasName=ident['FromAlias'] { $src.name = $aliasName.id } )? bracedSelectItemListDef[ $query ]? excludingClause[ $query ]? ; projectionClauses[ query ] @after { this.attachLocation($query); } : ( WHERE cond=condition { $query.where = $cond.cond; } )? ( GROUP BY e1=expression { $query.groupBy = [ $e1.expr ]; } ( ',' en=expression { $query.groupBy.push( $en.expr ); } )* )? ( HAVING having=condition { $query.having = $having.cond; } )? ( ob=orderByClause[ $query ] { $query = $ob.query; } ) ? ( lc=limitClause[ $query ] { $query = $lc.query; } ) ? ; excludingClause[ query ] : // syntax is less than ideal - EXCLUDING is only useful for `*` - with // this syntax, people wonder what happens with explicit select items EXCLUDING '{' projectionExclusion[ $query ] ( ',' { if (this.isStraightBefore("}")) break; } // allow ',' before '}' projectionExclusion[ $query ] )* '}' ; projectionExclusion[ outer ] locals[ art ] @after { this.attachLocation($art); } : name=ident['ref'] { $art = this.addDef( $outer, 'excludingDict', '', $name.id ); } ; extendEntity[ outer, loc, annos ] locals[ art, name = {} ] @after { /* #ATN 1 */ this.attachLocation($art); } : ENTITY simplePath[ $name, 'Extend' ] { $art = this.addItem( $outer, 'extensions', 'extend', $annos, { name: $name, expectedKind: 'entity' }, $loc ); } ( WITH { this.noSemicolonHere(); this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* // ATN: the ref can start with ACTIONS ( includeRef[ $art ] requiredSemi | extendForEntity[ $art ] ) | { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* extendForEntity[ $art ] ) ; extendForEntity[ art ] : '{' elementDefOrExtend[ $art ]* '}' ( ACTIONS '{' actionFunctionDef[ $art ]* '}' )? optionalSemi | ACTIONS '{' actionFunctionDef[ $art ]* '}' optionalSemi | requiredSemi ; extendProjection[ outer, loc, annos ] locals[ art, name = {} ] @after { this.attachLocation($art); } : expected=PROJECTION simplePath[ $name, 'Extend' ] { $art = this.addItem( $outer, 'extensions', 'extend', $annos, { name: $name, expectedKind: 'entity' }, // or 'projection'? $loc ); } ( WITH { this.noSemicolonHere(); } )? { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ( '{' { $art.columns = []; } ( selectItemDef[ $art.columns ] ( ',' { if (this.isStraightBefore("}")) break; } // allow ',' before '}' selectItemDef[ $art.columns ] )* )? '}' ( ACTIONS '{' actionFunctionDef[ $art ]* '}' )? optionalSemi | ACTIONS '{' actionFunctionDef[ $art ]* '}' optionalSemi | requiredSemi ) ; // TODO: no action extension? actionFunctionDef[ outer ] locals[ art, annos = [] ] @after { this.attachLocation($art); } : { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ( ACTION name=ident['BoundAction'] { $art = this.addDef( $outer, 'actions', 'action', $name.id, $annos ); this.docComment( $annos ); } annotationAssignment_fix[ $annos ]* parameterListDef[ $art ] ( returnTypeSpec[ $art, $annos ] | requiredSemi ) | FUNCTION name=ident['BoundAction'] { $art = this.addDef( $outer, 'actions', 'function', $name.id, $annos ); this.docComment( $annos ); } annotationAssignment_fix[ $annos ]* parameterListDef[ $art ] returnTypeSpec[ $art, $annos ] ) ; actionFunctionMainDef[ outer, loc, annos ] locals[ art, name = {} ] @after { this.attachLocation($art); } : ACTION simplePath[ $name, 'Action' ] { $art = this.addDef( $outer, 'artifacts', 'action', $name, $annos, {}, $loc ); this.docComment( $annos ); } annotationAssignment_fix[ $annos ]* parameterListDef[ $art ] ( returnTypeSpec[ $art, $annos ] | requiredSemi ) | FUNCTION simplePath[ $name, 'Action' ] { $art = this.addDef( $outer, 'artifacts', 'function', $name, $annos, {}, $loc ); this.docComment( $annos ); } annotationAssignment_fix[ $annos ]* parameterListDef[ $art ] returnTypeSpec[ $art, $annos ] ; eventDef[ outer, loc, annos ] locals[ art, name = {} ] @after { /* #ATN 1 */ this.attachLocation($art); } : EVENT simplePath[ $name, 'Event' ] { $art = this.addDef( $outer, 'artifacts', 'event', $name, $annos, {}, $loc ); this.docComment( $annos ); } annotationAssignment_fix[ $annos ]* ( typeStruct[ $art ] optionalSemi | ':' // #ATN: includeRef can be / start with PROJECTION ( { $art.type = {}; } simplePath[ $art.type, 'artref' ] ( { $art.includes = [ $art.type ]; delete $art.type; } ( ',' { if (this.isStraightBefore('{')) break; } // allow ',' before '{' // }} includeRef[ $art ] )* typeStruct[ $art ] optionalSemi | { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* requiredSemi ) | typeStruct[ $art ] optionalSemi | qp=projectionSpec { $art.query = $qp.query; $art['$'+'syntax'] = 'projection'; } optionalSemi // TODO: not fully correct without columns or excluding ) ) ; aspectDef[ outer, loc, annos ] locals[ art, name = {} ] @after { this.attachLocation($art); } : ( ASPECT | ( abs=ABSTRACT | HideAlternatives ) ent=ENTITY ) simplePath[ $name, 'Type' ] { $art = this.addDef( $outer, 'artifacts', 'aspect', $name, $annos, {}, $loc ); // backends do not like ['$'+'syntax']: ($ent ? 'entity' : 'aspect') if ($ent) this.warning( 'syntax-deprecated-abstract', this.tokenLocation( $abs, $ent ), {}, 'Abstract entity definitions are deprecated; use aspect definitions instead' ); this.docComment( $annos ); } annotationAssignment_fix[ $annos ]* ( ':' ( includeRef[ $art ] ( ',' { if (this.isStraightBefore('{')) break; } // allow ',' before '{' // }} includeRef[ $art ] )* )? )? '{' { $art.elements = Object.create(null); } // better for include and annotate ( elementDef[ $art ]* ) '}' // TODO: action definitions in a specific section? ( ACTIONS '{' actionFunctionDef[ $art ]* '}' )? optionalSemi ; typeDef[ outer, loc, annos ] locals[ art, name = {} ] @after { this.attachLocation($art); } : TYPE simplePath[ $name, 'Type' ] { $art = this.addDef( $outer, 'artifacts', 'type', $name, $annos, {}, $loc ); this.docComment( $annos ); } annotationAssignment_fix[ $annos ]* typeSpecSemi[ $art, $annos ] ; extendType[ outer, loc, annos ] locals[ art, name = {} ] @after { this.attachLocation($art); } : // aspects are types, i.e. kind is 'type' for aspects TYPE simplePath[ $name, 'Extend' ] { $art = this.addItem( $outer, 'extensions', 'extend', $annos, { name: $name, expectedKind: 'type' }, $loc ); } extendWithOptElements[ $art, $annos ] ; extendAspect[ outer, loc, annos ] locals[ art, name = {} ] @after { this.attachLocation($art); } : // aspects are types, i.e. kind is 'type' for aspects ASPECT simplePath[ $name, 'Extend' ] { $art = this.addItem( $outer, 'extensions', 'extend', $annos, { name: $name, expectedKind: 'aspect' }, $loc ); } extendWithOptElements[ $art, $annos ] ; annotationDef[ outer, loc, annos ] locals[ art, name = {} ] @after { this.attachLocation($art); } : annotation=ANNOTATION simplePath[ $name, 'AnnoDef' ] { if ($outer.kind !== 'source') { // this is a syntax restriction to avoid confusion this.error( 'syntax-no-inner-vocabulary', $annotation, {}, 'Annotation definitions can\'t be defined inside contexts or services' ); $art = {}; } else $art = this.addDef( $outer, 'vocabularies', 'annotation', $name, $annos, {}, $loc ); this.docComment( $annos ); } annotationAssignment_fix[ $annos ]* typeSpecSemi[ $art, $annos ] // also 'includes'... ; extendArtifact[ outer, loc, annos ] locals[ art, name = {} ] @after { this.attachLocation($art); } : simplePath[ $name, 'Extend' ] { $art = this.addItem( $outer, 'extensions', 'extend', $annos, { name: $name }, $loc ); } extendWithOptElements[ $art, $annos ] ; extendWithOptElements[ art, annos ] : WITH { this.noSemicolonHere(); this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ( includeRef[ $art ] requiredSemi | '{' elementDefOrExtend[ $art ]* '}' optionalSemi | requiredSemi ) | { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ( '{' elementDefOrExtend[ $art ]* '}' optionalSemi | requiredSemi ) ; annotateArtifact[ outer, loc, annos ] locals[ art, name = {} ] @after { this.attachLocation($art); } : simplePath[ $name, 'Annotate' ] { $art = this.addItem( $outer, 'extensions', 'annotate', $annos, { name: $name }, $loc ); } ( WITH { this.noSemicolonHere(); } )? { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ( '{' annotateElement[ $art ]* '}' ( ACTIONS '{' annotateAction[ $art ]* '}' )? optionalSemi | ACTIONS '{' annotateAction[ $art ]* '}' optionalSemi | '(' annotateParam[ $art ] ( ',' { if (this.isStraightBefore(')')) break; } // allow ',' before ')' annotateParam[ $art ] )* ')' ( RETURNS '{' annotateElement[ $art ]* '}' optionalSemi | requiredSemi ) | RETURNS '{' annotateElement[ $art ]* '}' optionalSemi | requiredSemi ) ; annotateElement[ outer ] locals[ art, annos = [] ] @after{ this.attachLocation($art); } : { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* name=ident['Element'] { $art = this.addDef( $outer, 'elements', 'annotate', $name.id, $annos ); this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ( '{' annotateElement[ $art ]* '}' optionalSemi | requiredSemi ) ; annotateAction [ outer ] locals [ art, annos = [] ] @after{ this.attachLocation($art); } : { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* name=ident['BoundAction'] { $art = this.addDef( $outer, 'actions', 'annotate', $name.id, $annos ); this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ( '(' annotateParam[ $art ] ( ',' { if (this.isStraightBefore(')')) break; } // allow ',' before ')' annotateParam[ $art ] )* ')' )? ( RETURNS '{' annotateElement[ $art ]* '}' optionalSemi | requiredSemi ) ; annotateParam [ outer ] locals [ art, annos = [] ] @after{ this.attachLocation($art); } : { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* param=ident['Param'] { $art = this.addDef( $outer, 'params', 'annotate', $param.id, $annos ); this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ; // Element definition and its helpers ---------------------------------------- enumSymbolDef[ outer ] locals[ art, annos = [] ] @after { this.attachLocation($art); } : { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* name=ident['Enum'] { $art = this.addDef( $outer, 'enum', 'enum', $name.id, $annos ); this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ( '=' { this.excludeExpected( ['Boolean', 'QuotedLiteral', "'#'", 'NULL'] ); } ( val=literalValue { $art.value = $val.val; } | ( plus='+' | min='-' ) num=Number { $art.value = this.numberLiteral( $num, $plus||$min ); } ) { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* )? requiredSemi ; elementDefOrExtend[ outer ] locals[ annos = [] ] @after { /* #ATN 1 */ if ($ctx.art) this.attachLocation($art.art); } // tool complains if I test for ($art) : { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* // #ATN: element name for definition can be EXTEND ( EXTEND extendElement[ $outer, this.startLocation(), $annos ] | art = elementDefInner[ $outer, this.startLocation(), $annos, true ] ) ; elementDef[ outer ] locals[ annos = [] ] @after { this.attachLocation($art.art); } : { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* art = elementDefInner[ $outer, this.startLocation(), $annos, false ] ; // Actually, this is a subset if elementDefInner... // TODO: the corresponding restrictions must also be checked in the core // compiler, as the mixin element could come via CSN mixinElementDef[ outer ] locals[ art ] @after { /* #ATN 2 */ this.attachLocation($art); } : name=ident['Mixin'] { $art = this.addDef( $outer, 'mixin', 'mixin', $name.id ); } ( ':' // #ATN: referenced type name can be ASSOCIATION or COMPOSITION ( typeAssociationBase[ $art, false ] // #ATN: path could start with MANY or ONE - make sure a token follows in same rule! ( typeToMany[ $art ] | typeToOne[ $art ] | simplePath[ $art.target, 'artref' ] ) typeAssociationCont[ $art ]? | typeRefOptArgs[ $art ] ( as='=' expression { this.notSupportedYet( 'Calculated fields are not supported yet', $as ); } )? ) | as='=' expression { this.notSupportedYet( 'Calculated fields are not supported yet', $as ); } ) requiredSemi ; misplacedAnnotations[ annos, messageId ] : annotationAssignment_ll1[ $annos ]+ { if ($messageId) // issue specified in central registry this.message( messageId, this.tokenLocation( $ctx.start, this.getCurrentToken() ) ); } ; elementDefInner[ outer, loc, annos, allowEq ] returns[ art ] @after{ /* #ATN 5 */ } : // TODO: it would be excellent to remove ELEMENT... // or have a special ident rule without the ELEMENT // Reason: it would be good for error recover to start a major block without LL1 ambiguity // VIRTUAL is keyword, except if before the following tokens texts: { this.setLocalToken( 'VIRTUAL', 'VIRTUAL', /^[:{@=}]$/ ); } virtual=VIRTUAL? key=KEY? // #ATN: element name can be MASKED or ELEMENT (2x) masked=MASKED? // TODO: order? ELEMENT? name=ident['Element'] { $art = this.addDef( $outer, 'elements', 'element', $name.id, $annos, { virtual: $virtual, key: $key, masked: $masked }, $loc ); this.docComment( $annos ); } annotationAssignment_fix[ $annos ]* // TODO: we can think of making the typeSpec optional and do checks instead: // type optional with '=', type required otherwise ( typeStruct[ $art ] ( nullability[ $art ] requiredSemi | optionalSemi // NOT and NULL are reserved... ) | ':' // #ATN: referenced type name can be ASSOCIATION or ARRAY or TYPE or LOCALIZED ( typeStruct[ $art ] nullability[ $art ]? misplacedAnnotations[ $annos, 'syntax-anno-after-struct' ]? requiredSemi | typeAssociationBase[ $art, true ] // #ATN: path could start with MANY or ONE - make sure a token follows in same rule! ( typeStruct[ $art.target, true ] optionalSemi | one=ONE { this.setMaxCardinality( $art, $one, this.numberLiteral( $one, null, '1' ) ); } typeCompoStruct[ $art.target ] optionalSemi | many=MANY { this.setMaxCardinality( $art, $many, { literal: 'string', val: '*' } ); } typeCompoStruct[ $art.target ] optionalSemi | // we do not support `Composition of many { e }` - ambiguity ad-hoc target versus foreign keys! typeToMany[ $art ] typeAssociationElementCont[ $art, $annos ] | typeToOne[ $art ] typeAssociationElementCont[ $art, $annos ] | simplePath[ $art.target, 'artref' ] typeAssociationElementCont[ $art, $annos ] ) | ( array=ARRAY of=OF { $art.items = { location: this.tokenLocation( $array, $of ) }; } | many=MANY { $art.items = { location: this.tokenLocation( $many ) };} ) // #ATN: typeRefOptArgs can start with TYPE ( typeStruct[ $art.items ] nullability[ $art.items ]? misplacedAnnotations[ $annos, 'syntax-anno-after-struct' ]? | typeTypeOf[ $art.items ] nullability[ $art.items ]? { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* | typeRefOptArgs[ $art.items ] nullability[ $art.items ]? { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ( ENUM '{' { $art.items.enum = Object.create(null); } enumSymbolDef[ $art.items ]* '}' misplacedAnnotations[ $annos, 'syntax-anno-after-enum' ]? )? ) requiredSemi // also req after struct/enum | typeTypeOf[ $art ] elementProperties[ $art ]? { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* requiredSemi // also req after foreign key spec | l=LOCALIZED { $art.localized = this.tokenLocation( $l, undefined, true ); } typeRefOptArgs[ $art ] { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ( elementProperties[ $art ] { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* )? requiredSemi | typeRefOptArgs[ $art ] { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ( ENUM '{' { $art.enum = Object.create(null); } enumSymbolDef[ $art ]* '}' elementProperties[ $art ]? misplacedAnnotations[ $annos, 'syntax-anno-after-enum' ]? | elementProperties[ $art ] { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* )? requiredSemi // also req after enum spec ) | // this is also called for enum symbols (in EXTEND) eq='=' e=expression // never introduce AS as syntax variant of '=' { if (!$allowEq || $e.expr && !$e.expr.literal ) this.notSupportedYet( 'Calculated fields are not supported yet', $eq ); else if ($e.expr) $art.value = $e.expr; } { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* // for enum symbol def via EXTEND requiredSemi ) ; extendElement[ outer, loc, annos ] locals[ art ] @after{ /* #ATN 1 */ this.attachLocation($art); } : // #ATN: element name can be ELEMENT expected=ELEMENT? name=ident['Element'] { $art = this.addDef( $outer, 'elements', 'extend', $name.id, $annos, { expectedKind: $expected && 'element' }, $loc ); } extendWithOptElements[ $art, $annos ] ; bracedSelectItemListDef[ query ] : '{' { if (!$query.columns) $query.columns = []; } // set it early to avoid "wildcard" errors ( ( star='*' // TODO: allow everywhere { $query.columns = [ this.tokenLocation( $star, undefined, '*' ) ]; } | selectItemDef[ $query.columns ] ) ( ',' { if (this.isStraightBefore("}")) break; } // allow ',' before '}' selectItemDef[ $query.columns ] )* )? '}' ; selectItemDef[ outer ] locals[ annos = [] ] @after{ this.attachLocation($art.art); } : { this.docComment( $annos ); } annotationAssignment_atn[ $annos ]* // VIRTUAL is keyword, except if before the following tokens texts: { this.setLocalToken( 'VIRTUAL', 'VIRTUAL', /^([,.:\[@]|as)$/i ) ; } // not '{' virtual=VIRTUAL? key=KEY? art=selectItemDefBody[ $outer, $annos ] { if ($virtual) $art.art.virtual = this.tokenLocation( $virtual, undefined, true ); if ($key) $art.art.key = this.tokenLocation( $key, undefined, true ); } ; selectItemDefBody[ outer, annos ] returns[ art = {} ] @after{ /* #ATN 1 */ this.attachLocation($art); } : ( e=expression { $art = this.addItem( $outer, null, null, $annos, { value: $e.expr } ); } ( AS n1=ident['Item'] { $art.name = $n1.id } | n2=ident['Item'] { $art.name = this.fragileAlias( $n2.id, true ); } | { if (this.getCurrentToken().text !== '.') this.classifyImplicitName( 'Item', $e.expr ); } ) { if ($art.value && !$art.value.path) this.excludeExpected( ["'.'", "'{'"] ); } ( { if ($art.value && !$art.value.path) this.reportExpandInline( 'expand' ); } selectItemInlineList[ $art, 'expand' ] excludingClause[ $art ]? // TODO: we might alternatively allow AS here | // TODO: complain if AS has been used - or in definer? { if ($art.value && !$art.value.path) this.reportExpandInline( 'inline' ); } DOTbeforeBRACE // ...orASTERISK ( selectItemInlineList[ $art, 'inline' ] excludingClause[ $art ]? | star='*' { $art.inline = [ this.tokenLocation( $star, undefined, '*' ) ]; } ) )? | { $art = this.addItem( $outer, null, null, $annos ); } selectItemInlineList[ $art, 'expand' ] excludingClause[ $art ]? AS n1=ident['Item'] { $art.name = $n1.id } ) { this.docComment( $annos ); } annotationAssignment_fix[ $annos ]* ( ':' // #ATN: typeRefOptArgs can start with TYPE, REDIRECTED ( re=REDIRECTED to=TO { $art.target = {}; } simplePath[ $art.target, 'artref' ] ( typeAssociationCont[ $art ] | { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ) | typeTypeOf[ $art ] { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* | typeRefOptArgs[ $art ] // TODO: annos here? { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ) )? ; selectItemInlineList[ art, clause ] : '{' { $art[$clause] = []; } ( ( star='*' // TODO: allow everywhere { $art[$clause].push( this.tokenLocation( $star, undefined, '*' ) ); } | selectItemInlineDef[ $art[$clause] ] ) ( ',' { if (this.isStraightBefore("}")) break; } // allow ',' before '}' selectItemInlineDef[ $art[$clause] ] )* )? '}' ; selectItemInlineDef[ outer ] locals[ annos = [] ] @after{ this.attachLocation($art.art); } : { this.docComment( $annos ); } annotationAssignment_atn[ $annos ]* art=selectItemDefBody[ $outer, $annos ] ; parameterListDef[ art ] : '(' // also empty param list (we might do some hacking later to allow reserved words) // see annotationAssignment_paren ( parameterDef[ $art ] ( ',' { if (this.isStraightBefore(')')) break; } // allow ',' before ')' parameterDef[ $art ] )* )? ')' ; parameterDef[ outer ] locals[ art, annos = [] ] @after { this.attachLocation($art); } : { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* name=ident['Param'] { $art = this.addDef( $outer, 'params', 'param', $name.id, $annos ); this.docComment( $annos ); } annotationAssignment_fix[ $annos ]* typeSpec[ $art ] ( DEFAULT expr=expression { $art.default = $expr.expr; } )? { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ; entityParameters[ art ] : '(' // also empty param list (we might do some hacking later to allow reserved words) // see annotationAssignment_paren ( entityParameterDef[ $art ] ( ',' { if (this.isStraightBefore(')')) break; } // allow ',' before ')' entityParameterDef[ $art ] )* )? ')' ; entityParameterDef[ outer ] locals[ art, annos = [] ] @after { this.attachLocation($art); } : { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* name=ident['Param'] { $art = this.addDef( $outer, 'params', 'param', $name.id, $annos ); this.docComment( $annos ); } annotationAssignment_fix[ $annos ]* typeSpec[ $art ] ( DEFAULT expr=expression { $art.default = $expr.expr; } )? ; nullability[ art ] : not=NOT n1=NULL { $art.notNull = this.tokenLocation($not,$n1,true); } | n2=NULL { $art.notNull = this.tokenLocation($n2,undefined,false); } ; elementProperties[ elem ] : nullability[$elem] ( DEFAULT expr=expression { $elem.default = $expr.expr; } )? | ( DEFAULT expr=expression { $elem.default = $expr.expr; } ) nullability[$elem]? | eq='=' { this.notSupportedYet( 'Calculated fields are not supported yet', $eq ); } expression ; // View definitions ---------------------------------------------------------- viewDef[ outer, loc, annos ] locals[ art, name = {} ] @after { this.attachLocation($art); } : v=VIEW simplePath[ $name, 'Entity' ] { $art = this.addDef( $outer, 'artifacts', 'entity', $name, $annos, { ['$'+'syntax']: 'view' }, $loc ); this.docComment( $annos ); } annotationAssignment_fix[ $annos ]* ( entityParameters[ $art ] | ( HideAlternatives | WITH ) PARAMETERS entityParameterDef[ $art ] ( ',' entityParameterDef[ $art ] )* // no optional final ',' here )? AS qe=queryExpression { $art.query = $qe.query; } // beta-mode test now in definer // TODO check ANTLR: bad msg with 'view V as'<eof> but 'view V as FOO' is fine requiredSemi ; // Type references ----------------------------------------------------------- includeRef[ art ] locals[ incl = {} ] : simplePath[ $incl, 'artref' ] { if ($art.includes) $art.includes.push($incl); else $art.includes = [$incl]; } ; typeSpec[ art ] // for params @after{ /* #ATN 1 */ } : typeStruct[ $art ] | ':' // #ATN: typeSimple can start with ARRAY or TYPE ( typeStruct[ $art ] nullability[ $art ]? | typeArray[ $art ] // nullability is set in typeArray | typeTypeOf[ $art ] nullability[ $art ]? // TODO: no LOCALIZED ? | typeRefOptArgs[ $art ] nullability[ $art ]? ( ENUM '{' { $art.enum = Object.create(null); } enumSymbolDef[ $art ]* '}' )? ) ; returnTypeSpec[ art, annos ] @after{ /* #ATN 1 */ } : ret=RETURNS { $art.returns = { location: this.tokenLocation( $ret ), kind: 'param' }; } // #ATN: typeSimple can start with ARRAY or TYPE ( typeStruct[ $art.returns ] nullability[ $art.returns ]? | typeArray[ $art.returns ] // nullability is set in typeArray | typeTypeOf[ $art.returns ] nullability[ $art.returns ]? // TODO: no LOCALIZED ? | typeRefOptArgs[ $art.returns ] nullability[ $art.returns ]? ( ENUM '{' { $art.returns.enum = Object.create(null); } enumSymbolDef[ $art.returns ]* '}' | misplacedAnnotations[ $annos, 'syntax-anno-after-params' ] )? ) requiredSemi // currently for all - might change if we get rid of the misplaced annos ; typeSpecSemi[ art, annos ] // with 'includes', for type and annotation defs @after{ /* #ATN 3 */ } : typeStruct[ $art ] optionalSemi | ':' // #ATN: typeRefOptArgs can start with ARRAY or MANY or ASSOCIATION or TYPE or LOCALIZED // Nevertheless, MANY '{' is handled by local token rewrite: { this.setLocalToken( 'MANY', 'HelperToken1', /^[^\{]/ ); } ( typeStruct[ $art ] optionalSemi | typeAssociationBase[ $art, false ] // #ATN: path could start with MANY or ONE - make sure a token follows in same rule! ( typeToMany[ $art ] | typeToOne[ $art ] | simplePath[ $art.target, 'artref' ] ) typeAssociationCont[ $art ]? requiredSemi // and if its the ';'... | many=HelperToken1 // rewritten MANY before '{' { $art.items = { location: this.tokenLocation( $many ) };} typeStruct[ $art.items ] nullability[ $art.items ]? optionalSemi | ( array=ARRAY of=OF { $art.items = { location: this.tokenLocation( $array, $of ) }; } | many=MANY { $art.items = { location: this.tokenLocation( $many ) };} ) // #ATN: typeRefOptArgs can start with TYPE ( typeStruct[ $art.items ] nullability[ $art.items ]? optionalSemi | typeTypeOf[ $art.items ] nullability[ $art.items ]? { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* requiredSemi | typeRefOptArgs[ $art.items ] nullability[ $art.items ]? { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ( ENUM '{' { $art.items.enum = Object.create(null); } enumSymbolDef[ $art.items ]* '}' optionalSemi | requiredSemi ) ) | typeTypeOf[ $art ] { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* requiredSemi | l=LOCALIZED { $art.localized = this.tokenLocation( $l, undefined, true ); } typeRefOptArgs[ $art ] { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* requiredSemi | // alt lookahead includes MANY '{' { $art.type = {}; } simplePath[ $art.type, 'artref' ] ( '(' // with type args, e.g. `type T : String(100) enum { ... }` head=Number { $art['$'+'typeArgs'] = [ this.numberLiteral( $head ) ]; } ( ',' { if (this.isStraightBefore(')')) break; } // allow ',' before ')' tail=Number { $art['$'+'typeArgs'].push( this.numberLiteral( $tail ) ); } )* ')' { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ( ENUM '{' { $art.enum = Object.create(null); } enumSymbolDef[ $art ]* '}' optionalSemi | requiredSemi ) | ':' // with element, e.g. `type T : E:elem enum { ... }` { $art.type.scope = $art.type.path.length; } simplePath[ $art.type, 'ref'] { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ( ENUM '{' { $art.enum = Object.create(null); } enumSymbolDef[ $art ]* '}' optionalSemi | requiredSemi ) | { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* ( ENUM '{' { $art.enum = Object.create(null); } enumSymbolDef[ $art ]* '}' optionalSemi | requiredSemi ) | // TODO: complain if used in anno def? { $art.includes = [ $art.type ]; delete $art.type; } ( ',' { if (this.isStraightBefore('{')) break; } // allow ',' before '{' // }} includeRef[ $art ] )* typeStruct[ $art ] optionalSemi ) ) ; typeStruct[ art, attachLoc = false ] @after { if ($attachLoc) this.attachLocation($art); } : { $art.elements = Object.create(null); } // we allow empty structures '{' elementDef[ $art ]* '}' ; typeCompoStruct[ art ] @after { this.attachLocation($art); } : { $art.elements = Object.create(null); } // we allow empty structures COMPOSITIONofBRACE elementDef[ $art ]* '}' ; typeArray[ art ] @after { /* #ATN 1 */ } : ( array=ARRAY of=OF { $art.items = { location: this.tokenLocation( $array, $of ) }; } | many=MANY { $art.items = { location: this.tokenLocation( $many ) };} ) // #ATN: typeRefOptArgs can start with TYPE ( typeStruct[ $art.items ] nullability[ $art.items ]? | typeTypeOf[ $art.items ] nullability[ $art.items ]? | typeRefOptArgs[ $art.items ] nullability[ $art.items ]? ( ENUM '{' { $art.items.enum = Object.create(null); } enumSymbolDef[ $art.items ]* '}' )? ) ; typeAssociationBase[ art, handleTypeCompo ] // including Composition : ( assoc=ASSOCIATION cardinality[$art]? TO {{ let location = this.tokenLocation($assoc); $art.type = { path: [{ id: 'cds.Association', location }], scope: 'global', location }; this.handleComposition( $art.cardinality, false ); }} | compo=COMPOSITION cardinality[$art]? OF {{ let location = this.tokenLocation($compo); $art.type = { path: [{ id: 'cds.Composition', location }], scope: 'global', location }; this.handleComposition( $art.cardinality, handleTypeCompo ); }} ) { $art.target = {}; } ; typeAssociationCont[ art ] : ( '{' { this.addDef( $art, 'foreignKeys' ); } ( foreignKey[ $art ] ( ',' { if (this.isStraightBefore("}")) break; } // allow ',' before '}' foreignKey[ $art ] )* )? '}' | ON cond=condition { $art.on=$cond.cond; } ) ; typeAssociationElementCont[ art, annos ] // including Composition // optional NULL / NOT NULL for managed association only : ( '{' { this.addDef( $art, 'foreignKeys' ); } ( foreignKey[ $art ] ( ',' { if (this.isStraightBefore("}")) break; } // allow ',' before '}' foreignKey[ $art ] )* )? '}' nullability[ $art ]? | ON cond=condition { $art.on=$cond.cond; } | nullability[ $art ] )? { this.docComment( $annos ); } annotationAssignment_ll1[ $annos ]* requiredSemi // also req after foreign key spec ; typeToOne[ art ] : one=ONE { this.setMaxCardinality( $art, $one, this.numberLiteral( $one, null, '1' ) ); } simplePath[ $art.target, 'artref' ] ; typeToMany[ art ] : many=MANY { this.setMaxCardinality( $art, $many, { literal: 'string', val: '*' } ); } simplePath[ $art.target, 'artref' ] ; cardinality[ art ] locals[ card = {} ] @after { /* #ATN 2 */ $art.cardinality = this.attachLocation($card); } : lbrack='[' { $card.targetMax = { literal: 'string', val: '*', location: this.tokenLocation($lbrack) }; } ( // #ATN: simple lookahead behind Number ( srcMax=Number ',' { $card.sourceMax = this.numberLiteral( $srcMax ); } | srcMaxStar='*' ',' { $card.sourceMax = { literal: 'string', val: '*', location: this.tokenLocation($srcMaxStar) }; } )? // #ATN: simple lookahead behind Number ( trgMin=Number '..' { $card.targetMin = this.numberLiteral( $trgMin ); } )? ( trgMax=Number { $card.targetMax = this.numberLiteral( $trgMax ); } | trgMaxStar='*' { $card.targetMax = { literal: 'string', val: '*', location: this.tokenLocation($trgMaxStar) }; } ) )? ']' ; foreignKey[ outer ] locals[ art = {}, elem = {} ] @after { this.attachLocation($art); } : simplePath[ $elem, 'ref' ] ( AS name=ident['Key'] )? { $art = this.addDef( $outer, 'foreignKeys', 'key', ($ctx.name) ? $name.id : $elem.path, undefined, { targetElement: $elem } ); } ; typeTypeOf[ art ] locals[ _sync = 'nop' ] @after { this.attachLocation($art.type); } : TYPE OF { $art.type = { scope: 'typeOf' }; } simplePath[ $art.type, 'ref' ] ( ':' // If we have too much time, we could set the category of the simple path // before to 'artref' { $art.type.scope = $art.type.path.length; } simplePath[ $art.type, 'ref'] )? ; typeRefOptArgs[ art ] @init { $art.type = {}; } : simplePath[ $art.type, 'artref' ] ( '(' head=Number { $art['$'+'typeArgs'] = [ this.numberLiteral( $head ) ]; } ( ',' { if (this.isStraightBefore(')')) break; } // allow ',' before ')' tail=Number { $art['$'+'typeArgs'].push( this.numberLiteral( $tail ) ); } )* ')' | ':' { $art.type.scope = $art.type.path.length; } simplePath[ $art.type, 'ref'] )? ; // Queries ------------------------------------------------------------------- queryExpression returns[ query ] // QLSubqueryComplex, SubqueryComplex @after{ this.attachLocation($query); } : qt1=queryTerm { $query = $qt1.query; } ( ( op=UNION q=( DISTINCT | ALL )? | op=EXCEPT q=DISTINCT? | op=MINUS q=DISTINCT? ) qt=queryTerm { $query = this.leftAssocBinaryOp( $query, $op, $q, $qt.query );; $ctx.q = null; } )* ( ob=orderByClause[ $query ] { $query = $ob.query; } ) ? ( lc=limitClause[ $query ] { $query = $lc.query; } ) ? ; orderByClause[ inQuery ] returns [ query ] : ORDER BY { $query = this.unaryOpForParens( $inQuery, '$'+'query' ); } ob1=orderBySpec { $query.orderBy = [ $ob1.ob ]; } ( ',' obn=orderBySpec { $query.orderBy.push( $obn.ob ); } )* ; limitClause[ inQuery ] returns [ query ] : limkw=LIMIT { $query = this.unaryOpForParens( $inQuery, '$'+'query' ); } ( lim=Number { $query.limit = { rows: this.numberLiteral( $lim, '' ) }; } | limnull=NULL { $query.limit = { rows: { literal: 'null', val: null, location: this.tokenLocation($limnull) } }; } ) ( OFFSET off=Number { $query.limit.offset = this.numberLiteral( $off ); } )? // unsigned integer ; orderBySpec returns[ ob ] : e=expression { $ob = $e.expr; } ( asc=ASC { $ob.sort = this.tokenLocation( $asc, undefined, 'asc' ); } | desc=DESC { $ob.sort = this.tokenLocation( $desc, undefined, 'desc' ); } )? ( nb=NULLS ne=( FIRST | LAST ) { $ob.nulls = this.tokenLocation( $nb, $ne, $ne.text.toLowerCase() ); } )? ; queryTerm returns[ query ] @after{ this.attachLocation($query); } : qt1=queryPrimary { $query = $qt1.query; } ( intersect=INTERSECT quantifier=DISTINCT? qt=queryPrimary { $query = this.leftAssocBinaryOp( $query, $intersect, $quantifier, $qt.query ); $ctx.quantifier = null; } // reset for loop )* ; queryPrimary returns[ query = {} ] @after { this.attachLocation($query); } : open='(' qe=queryExpression close=')' { $query = this.surroundByParens( $qe.query, $open, $close ); } | select=SELECT { $query = { op: this.tokenLocation( $select, undefined, 'SELECT' ), location: this.startLocation() }; } ( FROM querySource[ $query ] ( mixin=MIXIN '{' mixinElementDef[ $query ]* '}' INTO )? ( ad=( ALL | DISTINCT ) // TODO: or directly after SELECT ? { $query.quantifier = this.tokenLocation( $ad, undefined, $ad.text.toLowerCase() ); } )? bracedSelectItemListDef[ $query ]? excludingClause[ $query ]? | ( ad=( ALL | DISTINCT ) // TODO: or directly after SELECT ? { $query.quantifier = this.tokenLocation( $ad, undefined, $ad.text.toLowerCase() ); } )? { $query.columns = []; } // set it early to avoid "wildcard" errors ( star='*' { $query.columns = [ this.tokenLocation( $star, undefined, '*' ) ]; } | selectItemDef[ $query.columns ] ) ( ',' { if (this.isStraightBefore("}")) break; } // allow ',' before '}' selectItemDef[ $query.columns ] )* FROM querySource[ $query ] ) ( WHERE cond=condition { $query.where = $cond.cond; } )? ( GROUP BY e1=expression { $query.groupBy = [ $e1.expr ]; } ( ',' en=expression { $query.groupBy.push( $en.expr ); } )* )? ( HAVING having=condition { $query.having = $having.cond; } )? ; querySource[ query ] @after { this.attachLocation($query.from); } : t1=tableExpression { $query.from = $t1.table; } ( { const location = this.tokenLocation( this.getCurrentToken() ); $query.from = { op: { val: 'join', location }, join: { val: 'cross', location }, args: [$t1.table] }; } ( ',' tn=tableExpression { if ($tn.table) $query.from.args.push( $tn.table ); } )+ )? ; tableExpression returns[ table ] // TableOrJoin @after { this.attachLocation($table); } : qt=tableTerm { $table = $qt.table; } ( join=joinOp[ $table ] { $table = $join.table; } te=tableExpression { if (!$table) { $table = {}; } else if ($te.table) $table.args.push( $te.table ); } ON cond=condition { $table.on = $cond.cond; } | crj=CROSS jn=JOIN tt=tableTerm { $table = this.leftAssocBinaryOp( $table, $jn, $crj, $tt.table, 'join' ); } )* ; joinOp[ left ] returns[ table ] locals [ join ] : ( op=JOIN { $join = 'inner'; } | t1=INNER c=joinCardinality? op=JOIN { $join = 'inner' } | t1=LEFT t2=OUTER? c=joinCardinality? op=JOIN { $join = 'left' } | t1=RIGHT t2=OUTER? c=joinCardinality? op=JOIN { $join = 'right' } | t1=FULL t2=OUTER? c=joinCardinality? op=JOIN { $join = 'full' } ) { $table = { op: this.tokenLocation( $op, undefined, 'join' ), join: this.tokenLocation( $t1 || $op, $t2, $join ), args: ($left ? [$left] : []), location: $left && $left.location }; if ($ctx.c) $table.cardinality = $c.joinCard; } ; joinCardinality returns [ joinCard ] @init { $joinCard = {}; } @after { this.attachLocation($joinCard); } : ( srcExact=EXACT? srcMaxOne=ONE { if($srcExact) $joinCard.sourceMin = { literal: 'number', val: 1, location: this.tokenLocation($srcExact) }; $joinCard.sourceMax = { literal: 'number', val: 1, location: this.tokenLocation($srcMaxOne) }; } | srcMaxMany=MANY { $joinCard.sourceMax = { literal: 'string', val: '*', location: this.tokenLocation($srcMaxMany) }; } ) TO ( tgtExact=EXACT? tgtMaxOne=ONE { if($tgtExact) $joinCard.targetMin = { literal: 'number', val: 1, location: this.tokenLocation($tgtExact) }; $joinCard.targetMax = { literal: 'number', val: 1, location: this.tokenLocation($tgtMaxOne) }; } | tgtMaxMany=MANY { $joinCard.targetMax = { literal: 'string', val: '*', location: this.tokenLocation($tgtMaxMany) }; } ) ; tableTerm returns [ table ] @after{ /* #ATN 1 */ this.attachLocation($table); } : { $table = { path: [], scope: 0 }; } fromPath[ $table, 'artref'] ( ':' { $table.scope = $table.path.length; } fromPath[ $table, 'ref'] )? ( AS n1=ident['FromAlias'] { $table.name = $n1.id } | n2=identNoKeyword['FromAlias'] { $table.name = this.fragileAlias( $n2.id ); } // if we would use rule `ident`, we would either had to make all JOIN // kinds reserved or introduce ATN )? | open='(' // #ATN: The following alternative is not LL1, because both can start with // left-paren, but queryExpression has SELECT after initial left-parens ( qe=queryExpression close=')' { $table = this.surroundByParens( $qe.query, $open, $close, true ); } ( AS a1=ident['FromAlias'] { $table.name = $a1.id } // for defining table aliass | a2=identNoKeyword['FromAlias'] { $table.name = this.fragileAlias( $a2.id, true ); } // not using ident` to have a similar behavior to above ) | te=tableExpression close=')' { $table = this.surroundByParens( $te.table, $open, $close ); } ) ; fromPath[ qp, idkind ] @after{ this.attachLocation($qp); } : id=ident[$idkind] { this.pushIdent( $qp.path, $id.id ); } ( fromArguments[ $id.id ] cardinalityAndFilter[ $id.id ]? | cardinalityAndFilter[ $id.id ] )? ( '.' id=ident[$idkind] { this.pushIdent( $qp.path, $id.id ); } ( fromArguments[ $id.id ] cardinalityAndFilter[ $id.id ]? | cardinalityAndFilter[ $id.id ] )? )* ; // Conditions and expressions ------------------------------------------------ // With "separate" `condition` and `expression` rules, we have long LL // ambiguities (not so with LALR used in Bison) with initial left parentheses: // ( ( ( a.b.c + d.e.f // ) // now we know: 3rd left-paren for expression // = // now we know: 1st and 2nd left-paren for condition // 3 ) ) ) // // To avoid expensive parsing, we "combine" both rules, i.e. inside '('…')' of // rule `expressionTerm`, we recursively refer to `condition`, not // `expression`. With that, the existence of relations/predicates in rule // `conditionTerm` must be optional. Correct conditions and expressions must // be then ensured by code (either in actions of the grammar or in a check // phase - to be discussed). // // ANTLR4s left-recursion feature cannot be used as we will have rule // arguments. condition returns [ cond ] locals [ args = [], orl = [] ] @after{ $cond = ($args.length == 1) ? $args[0] : this.attachLocation({ op: $orl[0], args: $args }); } : c1=conditionAnd { $args.push($c1.cond); } ( or=OR c2=conditionAnd { $args.push($c2.cond); $orl.push(this.tokenLocation( $or, undefined, 'or' ))} )* ; conditionAnd returns [ cond ] locals [ args = [], andl = [] ] @after{ $cond = ($args.length == 1) ? $args[0] : this.attachLocation({ op: $andl[0], args: $args }); } : c1=conditionTerm { $args.push($c1.cond); } ( and=AND c2=conditionTerm { $args.push($c2.cond); $andl.push(this.tokenLocation( $and, undefined, 'and' )) } )* ; conditionTerm returns [ cond ] @after{ if ($cond) { this.attachLocation($cond); } else { $cond = $expr.expr; } } : nt=NOT ct=conditionTerm { $cond = { op: this.tokenLocation( $nt, undefined, 'not' ), args: [ $ct.cond ] }; } | ex=EXISTS ( open='(' qe=queryExpression close=')' { $cond = { op: this.tokenLocation( $ex, undefined, 'exists' ), args: [ this.surroundByParens( $qe.query, $open, $close, true ) ] }; } | qm=( HideAlternatives | '?' ) { $cond = { op: this.tokenLocation( $ex, undefined, 'exists' ), args: [ { param: this.tokenLocation( $qm, undefined, '?' ), scope: 'param' } ] }; this.csnParseOnly( 'Dynamic parameter "?" is not supported', $qm ); } | ep=valuePath[ 'ref' ] { $ep.qp['$'+'expected'] = 'exists'; $cond = { op: this.tokenLocation( $ex, undefined, 'exists' ), args: [ $ep.qp ] }; } ) | expr=expression // see @after ( rel=( '=' | '<>' | '>' | '>=' | '<' | '<=' | '!=' ) { $cond = { op: this.tokenLocation( $rel, undefined, $rel.text), args: [ $expr.expr ] }; } ( asa=( ANY | SOME | ALL ) { $cond.quantifier = this.tokenLocation($asa, undefined, $asa.text.toLowerCase()); } )? e2=expression { $cond.args.push($e2.expr); } | IS ( inn=NOT NULL | innu=NULL ) { $cond = { op: $inn ? this.tokenLocation( $inn, undefined, 'isNotNull' ) : this.tokenLocation( $innu, undefined, 'isNull' ), args: [ $expr.expr ] }; } | { $cond = { args: [ $expr.expr ] }; } NOT predicate[ $cond, true ] | { $cond = { args: [ $expr.expr ] }; } predicate[ $cond, false ] )? // optional: for conditions in parentheses ; predicate[ cond, negated ] // As an alternative, we could have a `negated` properties for the operations // `isNull`(!), `in`, `between` and `like` (or produce the same AST as for // NOT (a BETWEEN b AND c) : ino=IN e1=expression // including ExpressionList { $cond.op = this.tokenLocation( $ino, undefined, (negated) ? 'notIn' : 'in'); $cond.args.push( $e1.expr ); } | bw=BETWEEN e2=expression { $cond.op = this.tokenLocation( $bw, undefined, (negated) ? 'notBetween' : 'between' ); $cond.args.push( $e2.expr ); } AND e3=expression { $cond.args.push( $e3.expr ); } | lk=LIKE e4=expression { $cond.op = this.tokenLocation( $lk, undefined, (negated) ? 'notLike' : 'like' ); $cond.args.push( $e4.expr ); } ( ESCAPE e5=expression { $cond.args.push( $e5.expr ); } )? ; expression returns [ expr ] @after{ if ($expr) { this.attachLocation($expr); } else { $expr = this.attachLocation({});} } : e1=expressionSum { $expr = $e1.expr; } ( or='||' e2=expressionSum { $expr = { op: this.tokenLocation( $or, undefined, '||' ), args: [$expr, $e2.expr], location: this.combinedLocation( $expr, $e2.expr ) }; } )* ; expressionSum returns [ expr ] @after{ if ($expr) this.attachLocation($expr); } : e1=expressionFactor { $expr = $e1.expr; } ( op=( '+' | '-' ) e2=expressionFactor { $expr = { op: this.tokenLocation($op, undefined, $op.text), args: [$expr, $e2.expr], location: this.combinedLocation( $expr, $e2.expr ) }; } )* ; expressionFactor returns [ expr ] @after{ if ($expr) this.attachLocation($expr); } : e1=expressionTerm { $expr = $e1.expr; } ( op=( '*' | '/' ) e2=expressionTerm { $expr = { op: this.tokenLocation($op, undefined, $op.text), args: [$expr, $e2.expr], location: this.combinedLocation( $expr, $e2.expr ) }; } )* ; expressionTerm returns [ expr ] locals [ op, args = [] ] @after{ /* #ATN 1 */ this.attachLocation($expr); } : unary=( '+' | '-' ) e1=expressionTerm // prefix op or part of the number { $expr = this.signedExpression( $unary, $e1.expr ); } | ( val=literalValue { $expr = $val.val; } | sf=specialFunction { $expr = $sf.ret; } | ca=CASE { $expr = { op : this.tokenLocation( $ca, undefined, 'case' ), args: [] }; } ( e2=expression { $expr.args.push($e2.expr); } ( ow=WHEN ew=expression THEN e3=expression { $expr.args.push( this.createPrefixOp( $ow, [ $ew.expr, $e3.expr ] ) ); } )+ | ( ow=WHEN c=condition THEN e3=expression { $expr.args.push( this.createPrefixOp( $ow, [ $c.cond, $e3.expr ] ) ); } )+ ) ( el=ELSE e4=expression { $expr.args.push( this.createPrefixOp( $el, [ $e4.expr ] ) ); } )? END | ne=NEW nqp=valuePath[ 'ref', null] // token rewrite for NEW // please note: there will be no compiler-supported code completion after NEW { $expr = { op: this.tokenLocation( $ne, undefined, 'new' ), args: [] }; this.notSupportedYet( $ne ); } | vp=valuePath[ 'ref', null ] { $expr = this.valuePathAst( $vp.qp ); } | ':' ( vp=valuePath[ 'paramref', this.startLocation() ] { $expr = $vp.qp;; $expr.scope = 'param'; } | pp=Number { $expr = { param: this.numberLiteral( $pp ), scope: 'param' }; this.csnParseOnly( 'Positional parameter ":' + $pp.text + '" is not supported', $pp ); } ) | qm=( HideAlternatives | '?' ) { $expr = { param: this.tokenLocation( $qm, undefined, '?' ), scope: 'param' }; this.csnParseOnly( 'Dynamic parameter "?" is not supported', $qm ); } | open='(' // #ATN: The following alternative is not LL1, because both can start with // left-paren, but queryExpression has SELECT after initial left-parens ( qe=queryExpression close=')' { $expr = this.surroundByParens( $qe.query, $open, $close, true ); } | c1=condition { $expr = [ $c1.cond ]; } ( ',' { if ($expr.length > 1 && this.isStraightBefore(')')) break; } // allow ',' before ')' cn=expression { if ($cn.expr) $expr.push($cn.expr); } )* close=')' { if ($expr.length > 1) $expr = { op: this.tokenLocation( $open, undefined, ',' ), args: $expr }; else if ($expr[0]) // can be `null` if condition failed to parse $expr = this.surroundByParens( $expr[0], $open, $close ); } ) ) ; specialFunction returns [ ret = { } ] locals[ art = {} ] @after{ /* #ATN 1 */ } : fun=TRIM open='(' { $ret = this.functionAst( $fun, $open ); } // #ATN: we do not want to reserve these three optional keywords ( t=( LEADING | TRAILING | BOTH ) { $ret.args[0].args.push( $t.text ); } ( e=expression { $ret.args[0].args.push( $e.expr ); } )? t=FROM e=expression { $ret.args[0].args.push( $t.text, $e.expr ); } | e=expression ( { $ret.args[0].args.push( $e.expr ); } t=FROM e=expression { $ret.args[0].args.push( $t.text, $e.expr ); } | { $ret.args[0] = $e.expr; } ) ) ')' | fun=EXTRACT open='(' { $ret = this.functionAst( $fun, $open ); } t=( YEAR | MONTH | DAY | HOUR | MINUTE | SECOND ) f=FROM e=expression { $ret.args[0].args.push( $t.text, $f.text, $e.expr ); } ')' | ca=CAST open='(' { $ret = { op: this.tokenLocation( $ca, undefined, 'cast' ), args: [ ], location: this.tokenLocation( $ca ) }; } e=expression AS typeRefOptArgs[ $ret ] { $ret.args.push( $e.expr ); } ')' // TODO: ROUND - see also resolver.js ; // query path includes aggregation: // ( COUNT | MIN | MAX | SUM | AVG | STDDEV | VAR ) // '(' ( '*' | expression | ALL expression | DISTINCT expression_list ) ')' valuePath[ category, location = null ] returns[ qp = { path: [] } ] locals[ _sync = 'nop' ] @init { $qp.location = location || this.startLocation(); } @after{ this.attachLocation($qp); } : id=ident[ $category ] { this.pushIdent( $qp.path, $id.id ); } ( pathArguments[ $id.id, $id.id ] cardinalityAndFilter[ $id.id ]? | cardinalityAndFilter[ $id.id ] )? ( '.' id=ident['ref'] // yes 'ref', not $category { this.pushIdent( $qp.path, $id.id ); } ( pathArguments[ $id.id ] cardinalityAndFilter[ $id.id ]? | cardinalityAndFilter[ $id.id ] )? )* ; fromArguments[ pathStep ] : paren='(' namedExpression[ $pathStep ] ( ',' { if (this.isStraightBefore(')')) break; } // allow ',' before ')' namedExpression[ $pathStep ] )* ')' ; pathArguments[ pathStep, considerSpecial ] @after{ /* #ATN 1 */ } : paren='(' { this.prepareGenericKeywords( $considerSpecial ); } // ATN, LL2: Identifier can start both named arguments and the positional. // Make sure that we do not introduce A:B paths in expressions! ( namedExpression[ $pathStep ] ( ',' { if (this.isStraightBefore(')')) break; } // allow ',' before ')' namedExpression[ $pathStep ] )* | { $pathStep.args = Object.create(null); } // TODO: XSN func path cleanup arrowedExpression[ $pathStep ] ( ',' { if (this.isStraightBefore(')')) break; } // allow ',' before ')' arrowedExpression[ $pathStep ] )* | { $pathStep.args = []; } funcExpression[ $pathStep, $considerSpecial ] ( ',' { if (this.isStraightBefore(')')) break; } // allow ',' before ')' funcExpression[ $pathStep, $considerSpecial ] )* | a=ALL { $pathStep.quantifier = this.tokenLocation( $a, undefined, 'all' ); } e1=expression { $pathStep.args = [ $e1.expr ]; } | d=DISTINCT { $pathStep.quantifier = this.tokenLocation( $d, undefined, 'distinct' ); } e1=expression { $pathStep.args = [ $e1.expr ]; } ( ',' e2=expression { $pathStep.args.push( $e2.expr ); } )* | star='*' { $pathStep.args = [ { location: this.tokenLocation($star), val: '*', literal: 'token' } ]; } | { $pathStep.args = []; } ) ')' ; namedExpression[ pathStep ] : name=ident['paramname'] ':' elem=expression { if ($pathStep && $name.id) { this.addDef( $pathStep, 'args', 0, $name.id, true, ($ctx.elem) ? $elem.expr : { location: $name.id.location } ); $pathStep['$'+'syntax'] = ':'; } } ; arrowedExpression[ pathStep ] : name=ident['paramname'] a='=>' elem=expression { if ($name.id) this.addDef( $pathStep, 'args', 0, $name.id, true, ($ctx.elem) ? $elem.expr : { location: $name.id.location } ); } ; funcExpression[ pathStep, considerSpecial ] @init { this.prepareGenericKeywords( $considerSpecial ); } : only=GenericArgFull { $pathStep.args.push( { location: this.tokenLocation($only), val: $only.text, literal: 'token' } ); } | expr=expression { $pathStep.args.push( $expr.expr ); } ; cardinalityAndFilter[ pathStep ] locals [ _sync = 'nop' ] : '[' optionalCardinality[ pathStep ]? //{ $LeaveLoop = false; } optionalWhereForFilter co=condition { if ($pathStep) $pathStep.where = $co.cond; } ']' ; optionalCardinality[ pathStep ] @after { if ($pathStep && $pathStep.cardinality) this.attachLocation($pathStep.cardinality); } : // Make sure to test second token to allow expressions starting with Number // without introducing WHERE - that would be @options{k=2}. The code // completion just produces `:`after having inserted a Number - TODO. { if (this._input.LT(2).text !== ':') return $ctx; } ( trgMax=Number ':' { if ($pathStep) $pathStep.cardinality = { targetMax: this.numberLiteral( $trgMax ) } } ) ; optionalWhereForFilter : // For ANTLR, WHERE is required, but we allow the generated parser skipping // the call of match(WHERE) except for the future (optional) clauses GROUP, // ORDER, LIMIT. This hack requires that sync() at each state in the // calling rule does not throw an error if the current token does not match // one of the expected ones. { var text = this.getCurrentToken().text.toUpperCase(); if (!['WHERE','GROUP','ORDER','LIMIT'].includes( text )) return; // TODO: should we somehow add those keywords to $(EXPECTED)? } WHERE ; // Simple paths and values --------------------------------------------------- annoValueBase returns[ val ] locals [ hasEllipsis=0 ] @after { this.attachLocation($val); } : { $val = { literal: 'struct', location: this.startLocation() }; } '{' { this.meltKeywordToIdentifier(); } namedValue[ $val ] ( ',' { this.meltKeywordToIdentifier(); if (this.isStraightBefore("}")) break; // allow ',' before ')' } namedValue[ $val ] )* '}' | { $val = { literal: 'array', location: this.startLocation(), val: [] }; } '[' ( ( head=arrayValue { $val.val.push( $head.val ); } | e='...' { $val.val.push( { literal: 'token', val: '...', location: this.tokenLocation($e) } ); $hasEllipsis++; } ) ( ',' { if (this.isStraightBefore(']')) break; } // allow ',' before ']' ( tail=arrayValue { $val.val.push( $tail.val ); } | e='...' { $val.val.push( { literal: 'token', val: '...', location: this.tokenLocation($e) } ); if(++$hasEllipsis > 1) this.error( 'syntax-unexpected-ellipsis', $e, { code: '...' }, 'Expected no more than one $(CODE)' ); } ) )* )? ']' | v1=literalValue { $val = $v1.val; } | ( plus='+' | min='-' ) num=Number { $val = this.numberLiteral( $num, $plus||$min ); } ; annoValue returns[ val ] : base=annoValueBase { $val = $base.val } | { $val = {}; } // TODO: think about expression value representation at='@'? annotationPath[ $val, 'ref', $at ] annotationPathVariant[ $val ]? ; namedValue[ struct ] locals[ namedVal = { name: {} } ] : at='@'? annotationPath[ $namedVal.name, 'name', $at ] ( '#' { this.meltKeywordToIdentifier(); } variant=ident['variant'] { $namedVal.name.variant = $variant.id; } )? ( ':' { this.meltKeywordToIdentifier(true); } // allow path as anno value start with reserved elem=annoValue )? { this.addItem( $struct, '_struct', null, true, // TODO: re-check _struct ($ctx.elem) ? Object.assign($namedVal, $elem.val) : $namedVal ); } ; arrayValue returns[ val ] @after { this.attachLocation($val); } : { $val = { literal: 'struct', location: this.startLocation() }; } '{' { this.meltKeywordToIdentifier(); } namedValueInArray[ $val ] ( ',' { this.meltKeywordToIdentifier(); if (this.isStraightBefore("}")) break; // allow ',' before '}' } namedValueInArray[ $val ] )* '}' | { $val = { literal: 'array', location: this.startLocation(), val: [] }; } '[' ( head=arrayValue { $val.val.push( $head.val ); } ( ',' { if (this.isStraightBefore(']')) break; } // allow ',' before ']' tail=arrayValue { $val.val.push( $tail.val ); } )* )? ']' | v1=literalValue { $val = $v1.val; } | ( plus='+' | min='-' ) num=Number { $val = this.numberLiteral( $num, $plus||$min ); } | { $val = {}; } // TODO: think about expression value representation at='@'? annotationPath[ $val, 'ref', $at ] ( '#' { this.meltKeywordToIdentifier(); } variant=ident['variant'] { $val.variant = $variant.id; } )? ; namedValueInArray[ struct ] locals[ name = {} ] : at='@'? annotationPath[ $name, 'name', $at ] ( ':' elem=arrayValue )? { this.addDef( $struct, 'struct', null, $name, true, ($ctx.elem) ? $elem.val : { location: $name.location } ); } ; literalValue returns[ val ] locals[ tok ] @init{ $tok = this.getCurrentToken(); } @after { this.attachLocation($val); } : '#' name=ident['enumref'] { $val = { literal: 'enum', sym: $name.id } } | NULL { $val = { literal: 'null', val: null }; } | Boolean { $val = { literal: 'boolean', val: $tok.text.toLowerCase() != 'false' }; } | Number { $val = this.numberLiteral( $tok, '' ); } // allow float and large number | String { $val = this.quotedLiteral( $tok, 'string' ); } | QuotedLiteral // x'12', date'...', time'...', timestamp'...' { $val = this.quotedLiteral( $tok ); } ; simplePath[ art, category ] locals[ _sync = 'nop' ] @after { this.attachLocation($art); } // Due to error recovery, rule `ident` can return with value `null`. Set the // path as broken in this case. : head=ident[ $category ] { if (!$art.path) $art.path = []; this.pushIdent( $art.path, $head.id ); if ($category === 'artref') $art.scope = 0; } ( '.' tail=ident[ $category ] { this.pushIdent( $art.path, $tail.id ); } )* ; annotationPath[ art, category, headat = null ] locals[ _sync = 'nop' ] @after { this.attachLocation($art); } // Due to error recovery, rule `ident` can return with value `null`. Set the // path as broken in this case. : head=ident[ $category ] { $art.path = []; this.pushIdent( $art.path, $head.id, $headat ); if ($category === 'artref') $art.scope = 0; } ( '.' at='@'? tail=ident[ $category ] { this.pushIdent( $art.path, $tail.id, $at ); // Otherwise, $at may continue to be set after one `.@anno` segment. $ctx.at = null; } )* ; annotationPathVariant[ art ] @after { this.attachLocation($art); } : // TODO: warning for space before and after '#' '#' { this.meltKeywordToIdentifier(); } variant=ident['variant'] { $art.variant = $variant.id; } ; // Identifier and non-reserved keywords -------------------------------------- identNoKeyword[ category ] returns[ id ] // for aliases without AS @after{ $id = this.identAst( $stop, $category ); } : Identifier ; // The `ident` rule matches `Identifier` and all non-reserved keywords. List // all non-reserved keywords directly, do not use an indirection via a rule // like `nonReservedKeywords`. ident[ category ] returns[ id ] @after{ $id = this.identAst( $stop, $category ); } : Identifier | ABSTRACT | ACTION | ACTIONS | AND | ANNOTATE | ANNOTATION | ARRAY | ASC | ASPECT | ASSOCIATION | BETWEEN | BOTH | COMPOSITION | CONTEXT | CROSS | DAY | DEFAULT | DEFINE | DESC | ELEMENT | ELSE | END | ENTITY | ENUM | ESCAPE | EVENT | EXACT | EXCEPT | EXCLUDING | EXTEND | FIRST | FULL | FUNCTION | GROUP | HAVING | HOUR | INNER | INTERSECT | INTO | IS | JOIN | LAST | LEADING | LEFT | LIKE | LIMIT | LOCALIZED | MANY | MASKED | MINUS | MINUTE | MIXIN | MONTH | NAMESPACE | NULLS | OFFSET | ONE | OR | ORDER | OUTER | PARAMETERS | PROJECTION | REDIRECTED | RETURNS | RIGHT | SECOND | SERVICE | THEN | TRAILING | UNION | TO | TYPE | USING | VIEW | YEAR ; //---------------------------------------------------------------------------- WhiteSpace // like \s in JavaScript RegExp : // LineTerminator | [\t\f\v\u00A0\uFEFF] | Zs [\r\n\u2028\u2029 \t\f\u000B\u00A0\u1680\u180e\u2000-\u200A\u202F\u205F\u3000\uFEFF]+ -> skip ; DocComment : '/**' .*? '*/' -> channel(HIDDEN); Comment : '/*' .*? '*/' -> channel(HIDDEN); LineComment : '//' ~[\r\n\u2028\u2029]* -> channel(HIDDEN); // Values -------------------------------------------------------------------- String : ( '\'' ~[\u0027\n\r\u2028\u2029]* '\'' )+ // \u0027 = '\'' ; QuotedLiteral : ( [xX] | [dD][aA][tT][eE] | [tT][iI][mM][eE] ( [sS][tT][aA][mM][pP] )? ) ( '\'' ~[\u0027\n\r\u2028\u2029]* '\'' )+ // \u0027 = '\'' ; UnterminatedLiteral : ( [xX] | [dD][aA][tT][eE] | [tT][iI][mM][eE] ( [sS][tT][aA][mM][pP] )? )? '\'' ~[\u0027\n\r\u2028\u2029]* // \u0027 = '\'' ; UnterminatedDelimitedIdentifier : '"' ~[\u0022\n\r\u2028\u2029]* ( '""' ~[\u0022\n\r\u2028\u2029]* )* // \u0022 = '"' | '![' ~[\u005d\n\r\u2028\u2029]* ( ']]' ~[\u005d\n\r\u2028\u2029]* )* // \u005d = ']' // \u005d = ']' ; Boolean // TMP? : [tT][rR][uU][eE] | [fF][aA][lL][sS][eE] ; // Reserved keywords (are case-insensitive): --------------------------------- ALL : [aA][lL][lL] ; ANY : [aA][nN][yY] ; AS : [aA][sS] ; BY : [bB][yY] ; CASE : [cC][aA][sS][eE] ; CAST : [cC][aA][sS][tT] ; DISTINCT : [dD][iI][sS][tT][iI][nN][cC][tT] ; EXISTS : [eE][xX][iI][sS][tT][sS] ; EXTRACT : [eE][xX][tT][rR][aA][cC][tT] ; // FALSE: see Boolean FROM : [fF][rR][oO][mM] ; IN : [iI][nN] ; KEY : [kK][eE][yY] ; NEW : [nN][eE][wW] ; // token rewrite for NEW -> not reserved (also not in SQL) NOT : [nN][oO][tT] ; NULL : [nN][uU][lL][lL] ; OF : [oO][fF] ; ON : [oO][nN] ; SELECT : [sS][eE][lL][eE][cC][tT] ; SOME : [sS][oO][mM][eE] ; WHEN : [wW][hH][eE][nN] ; TRIM : [tT][rR][iI][mM] ; // TRUE: see Boolean WHERE : [wW][hH][eE][rR][eE] ; WITH : [wW][iI][tT][hH] ; // Fixed Token which is defined DIRECTLY BEFORE the unreserved keywords ------ Number // DO NOT RENAME OR MOVE THIS RULE !!! : [0-9]+ // no initial sign ( '.' [0-9]+ )? ( [eE] ('+'|'-')? [0-9]+ )? ; // Unreserved keywords (are case-insensitive): ------------------------------- ABSTRACT : [aA][bB][sS][tT][rR][aA][cC][tT] ; ACTION : [aA][cC][tT][iI][oO][nN] ; ACTIONS : [aA][cC][tT][iI][oO][nN][sS] ; AND : [aA][nN][dD] ; ANNOTATE : [aA][nN][nN][oO][tT][aA][tT][eE] ; ANNOTATION : [aA][nN][nN][oO][tT][aA][tT][iI][oO][nN] ; ARRAY : [aA][rR][rR][aA][yY] ; ASC : [aA][sS][cC] ; ASPECT : [aA][sS][pP][eE][cC][tT] ; ASSOCIATION : [aA][sS][sS][oO][cC][iI][aA][tT][iI][oO][nN] ; BETWEEN : [bB][eE][tT][wW][eE][eE][nN] ; BOTH : [bB][oO][tT][hH] ; COMPOSITION : [cC][oO][mM][pP][oO][sS][iI][tT][iI][oO][nN] ; CONTEXT : [cC][oO][nN][tT][eE][xX][tT] ; CROSS : [cC][rR][oO][sS][sS] ; DAY : [dD][aA][yY] ; DEFAULT : [dD][eE][fF][aA][uU][lL][tT] ; DEFINE : [dD][eE][fF][iI][nN][eE] ; DESC : [dD][eE][sS][cC] ; ELEMENT : [eE][lL][eE][mM][eE][nN][tT] ; ELSE : [eE][lL][sS][eE] ; END : [eE][nN][dD] ; ENTITY : [eE][nN][tT][iI][tT][yY] ; ENUM : [eE][nN][uU][mM] ; EVENT : [eE][vV][eE][nN][tT] ; ESCAPE : [eE][sS][cC][aA][pP][eE] ; EXACT : [eE][xX][aA][cC][tT] ; EXCEPT : [eE][xX][cC][eE][pP][tT] ; EXCLUDING : [eE][xX][cC][lL][uU][dD][iI][nN][gG] ; EXTEND : [eE][xX][tT][eE][nN][dD] ; FIRST : [fF][iI][rR][sS][tT] ; FULL : [fF][uU][lL][lL] ; FUNCTION : [fF][uU][nN][cC][tT][iI][oO][nN] ; GROUP : [gG][rR][oO][uU][pP] ; HAVING : [hH][aA][vV][iI][nN][gG] ; HOUR : [hH][oO][uU][rR] ; INNER : [iI][nN][nN][eE][rR] ; INTERSECT : [iI][nN][tT][eE][rR][sS][eE][cC][tT] ; INTO : [iI][nN][tT][oO] ; IS : [iI][sS] ; JOIN : [jJ][oO][iI][nN] ; LAST : [lL][aA][sS][tT] ; LEADING : [lL][eE][aA][dD][iI][nN][gG] ; LEFT : [lL][eE][fF][tT] ; LIKE : [lL][iI][kK][eE] ; LIMIT : [lL][iI][mM][iI][tT] ; LOCALIZED: [lL][oO][cC][aA][lL][iI][zZ][eE][dD]; MANY : [mM][aA][nN][yY] ; MASKED : [mM][aA][sS][kK][eE][dD] ; MINUS : [mM][iI][nN][uU][sS] ; MINUTE : [mM][iI][nN][uU][tT][eE] ; MIXIN : [mM][iI][xX][iI][nN] ; MONTH : [mM][oO][nN][tT][hH] ; NAMESPACE : [nN][aA][mM][eE][sS][pP][aA][cC][eE] ; NULLS : [nN][uU][lL][lL][sS] ; OFFSET : [oO][fF][fF][sS][eE][tT] ; ONE : [oO][nN][eE] ; OR : [oO][rR] ; ORDER : [oO][rR][dD][eE][rR] ; OUTER : [oO][uU][tT][eE][rR] ; PARAMETERS : [pP][aA][rR][aA][mM][eE][tT][eE][rR][sS] ; PROJECTION : [pP][rR][oO][jJ][eE][cC][tT][iI][oO][nN] ; REDIRECTED : [rR][eE][dD][iI][rR][eE][cC][tT][eE][dD] ; RETURNS : [rR][eE][tT][uU][rR][nN][sS] ; RIGHT : [rR][iI][gG][hH][tT] ; SECOND : [sS][eE][cC][oO][nN][dD] ; SERVICE : [sS][eE][rR][vV][iI][cC][eE] ; THEN : [tT][hH][eE][nN] ; TRAILING : [tT][rR][aA][iI][lL][iI][nN][gG] ; TO : [tT][oO] ; // or make reserved? (is in SQL-92) TYPE : [tT][yY][pP][eE] ; UNION : [uU][nN][iI][oO][nN] ; USING : [uU][sS][iI][nN][gG] ; VIEW : [vV][iI][eE][wW] ; // VIRTUAL: [vV][iI][rR][tT][uU][aA][lL] ; see tokens {} YEAR : [yY][eE][aA][rR] ; // Identifiers, must BE LAST, DIRECTLY AFTER the unreserved keywords --------- Identifier // DO NOT RENAME OR MOVE THIS RULE !!! : [$_a-zA-Z][$_a-zA-Z0-9]* // i.e. including $param | ( '"' ~[\u0022\n\r\u2028\u2029]* '"' )+ // \u0022 = '"' | '![' ~[\u005d\n\r\u2028\u2029]* ']' ( ']' ~[\u005d\n\r\u2028\u2029]* ']' )* // \u005d = ']' ; IllegalToken : . ; // Local Variables: // c-basic-offset: 2 // End:
alloy4fun_models/trashltl/models/0/WPb879cyAChXdgQqc.als
Kaixi26/org.alloytools.alloy
0
33
<reponame>Kaixi26/org.alloytools.alloy open main pred idWPb879cyAChXdgQqc_prop1 { } pred __repair { idWPb879cyAChXdgQqc_prop1 } check __repair { idWPb879cyAChXdgQqc_prop1 <=> prop1o }
src/vulkan-math/numerics/vulkan-math-numerics.adb
zrmyers/VulkanAda
1
29150
-------------------------------------------------------------------------------- -- MIT License -- -- Copyright (c) 2020 <NAME> -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- copies of the Software, and to permit persons to whom the Software is -- furnished to do so, subject to the following conditions: -- -- The above copyright notice and this permission notice shall be included in all -- copies or substantial portions of the Software. -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -- SOFTWARE. -------------------------------------------------------------------------------- -- -- This package instantiates Ada generic numerical operations for use by the -- Vulkan Math Library. -------------------------------------------------------------------------------- package body Vulkan.Math.Numerics is ---------------------------------------------------------------------------- function Compute_Modf (x : in Floating_Point; i : out Floating_Point) return Floating_Point is begin i := Floating_Point'Truncation(x); return x - i; end Compute_Modf; function Smooth_Step (edge0, edge1, x : in Floating_Point) return Floating_Point is t : constant Floating_Point := Clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0); begin return (t * t * (3.0 - 2.0 * t)); end Smooth_Step; function Is_Inf (x : in Floating_Point) return Vkm_Bool is pragma Unreferenced(x); begin return False; end Is_Inf; function Is_Nan (x : in Floating_Point) return Vkm_Bool is pragma Unreferenced(x); begin return False; end Is_Nan; function Frexp (x : in Floating_Point; exponent : out Vkm_Int) return Floating_Point is begin exponent := Floating_Point'Exponent(x); return Floating_Point'Fraction(x); end Frexp; function Ldexp (significand : in Floating_Point; exponent : in Vkm_Int) return Floating_Point is begin return Floating_Point'Compose(significand, exponent); end Ldexp; end Vulkan.Math.Numerics;
libsrc/adt/stack/adt_StackPush.asm
andydansby/z88dk-mk2
1
247026
<filename>libsrc/adt/stack/adt_StackPush.asm ; int adt_StackPush(struct adt_Stack *s, void *item) ; CALLER linkage for function pointers XLIB adt_StackPush LIB adt_StackPush_callee XREF ASMDISP_ADT_STACKPUSH_CALLEE .adt_StackPush pop bc pop de pop hl push hl push de push bc jp adt_StackPush_callee + ASMDISP_ADT_STACKPUSH_CALLEE
src/ado-caches-discrete.ads
My-Colaborations/ada-ado
0
23161
----------------------------------------------------------------------- -- ado-cache-discrete -- Simple cache management for discrete types -- Copyright (C) 2017 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Containers; with Ada.Containers.Indefinite_Hashed_Maps; with Ada.Strings.Hash; with ADO.Sessions; generic type Element_Type is (<>); package ADO.Caches.Discrete is pragma Elaborate_Body; -- The cache type that maintains a cache of name/value pairs. type Cache_Type is new ADO.Caches.Cache_Type with private; type Cache_Type_Access is access all Cache_Type'Class; -- Expand the name into a target parameter value to be used in the SQL query. -- The Expander can return a T_NULL when a value is not found or -- it may also raise some exception. overriding function Expand (Instance : in out Cache_Type; Name : in String) return ADO.Parameters.Parameter; -- Find the value associated with the given name. -- Raises the No_Value exception if no such mapping exist. function Find (Cache : in out Cache_Type; Name : in String) return Element_Type; -- Insert the value associated with the given name in the cache. -- When <tt>Override</tt> is set, override existing values otherwise raise an exception. procedure Insert (Cache : in out Cache_Type; Name : in String; Value : in Element_Type; Override : in Boolean := False); -- Delete the value associated with the given name in the cache. -- Raise the No_Value exception if the value is not found and <tt>Ignore</tt> is not set. procedure Delete (Cache : in out Cache_Type; Name : in String; Ignore : in Boolean := False); -- Initialize the entity cache by reading the database entity table. procedure Initialize (Cache : in out Cache_Type; Session : in out ADO.Sessions.Session'Class); private package Cache_Map is new Ada.Containers.Indefinite_Hashed_Maps (Key_Type => String, Element_Type => Element_Type, Hash => Ada.Strings.Hash, Equivalent_Keys => "="); protected type Cache_Controller is -- Find the value associated with the given name. -- Raises the No_Value exception if no such mapping exist. function Find (Name : in String) return Element_Type; -- Insert the value associated with the given name in the cache. -- When <tt>Override</tt> is set, override existing values otherwise raise an exception. procedure Insert (Name : in String; Value : in Element_Type; Override : in Boolean := False); -- Delete the value associated with the given name in the cache. -- Raise the No_Value exception if the value is not found and <tt>Ignore</tt> is not set. procedure Delete (Name : in String; Ignore : in Boolean := False); private Values : Cache_Map.Map; end Cache_Controller; type Cache_Type is new ADO.Caches.Cache_Type with record Controller : Cache_Controller; end record; end ADO.Caches.Discrete;
programs/oeis/293/A293688.asm
karttu/loda
1
7479
<gh_stars>1-10 ; A293688: Partial sums of A002251. ; 0,2,3,8,15,18,28,32,45,60,66,84,104,112,135,144,170,198,209,240,252,286,322,336,375,416,432,476,493,540,589,608,660,714,735,792,814,874,936,960,1025,1050,1118,1188,1215,1288,1363,1392,1470,1500,1581,1664,1696,1782,1815,1904,1995,2030,2124,2220,2257,2356,2394,2496,2600,2640,2747,2856,2898,3010,3053,3168,3285,3330,3450,3496,3619,3744,3792,3920,4050,4100,4233,4284,4420,4558,4611,4752,4895,4950,5096,5152,5301,5452,5510,5664,5723,5880,6039,6100,6262,6426,6489,6656,6720,6890,7062,7128,7303,7370,7548,7728,7797,7980,8165,8236,8424,8496,8687,8880,8954,9150,9348,9424,9625,9702,9906,10112,10191,10400,10480,10692,10906,10988,11205,11424,11508,11730,11815,12040,12267,12354,12584,12672,12905,13140,13230,13468,13708,13800,14043,14136,14382,14630,14725,14976,15229,15326,15582,15680,15939,16200,16300,16564,16665,16932,17201,17304,17576,17850,17955,18232,18338,18618,18900,19008,19293,19580,19690,19980,20091,20384,20679,20792,21090,21204,21505,21808,21924,22230,22538,22656,22967,23086,23400,23716,23837,24156,24278,24600,24924,25048,25375,25704,25830,26162,26289,26624,26961,27090,27430,27772,27903,28248,28380,28728,29078,29212,29565,29700,30056,30414,30551,30912,31275,31414,31780,31920,32289,32660,32802,33176,33552,33696,34075,34220,34602,34986,35133,35520,35668,36058,36450,36600,36995,37392,37544,37944,38097,38500 mov $2,$0 cal $0,73869 ; a(n) = Sum_{i=0..n} A002251(i)/(n+1). mov $1,$0 sub $0,1 mul $1,$2 add $1,$0 add $1,1
Student/examples/Correct/CPRL0/Correct_122.asm
SoftMoore/CPRL-Kt
6
81466
PROGRAM 8 LDCB 0 LDCB 0 LDCB 0 LDCB 0 LDCB 0 LDCB 0 LDCB 0 LDCB 1 CMP BGE L2 LDCSTR "false < true" PUTSTR PUTEOL BR L3 L2: LDCSTR "false >= true" PUTSTR PUTEOL L3: LDCB 0 LDCB 0 LDCCH 'a' LDCB 0 LDCB 0 LDCCH 'b' CMP BGE L6 LDCSTR "'a' < 'b'" PUTSTR PUTEOL BR L7 L6: LDCSTR "'a' >= 'b'" PUTSTR PUTEOL L7: HALT
scripts/switch_tab.scpt
p-becker/dotfiles
1
478
on run argv set dotfilesPath to item 1 of argv set desiredProfile to item 2 of argv set sessionFile to dotfilesPath & "/vim/Session.vim" set vimrc to dotfilesPath & "/vim/vimrc" set foundProfile to false tell application "iTerm" tell current window repeat with aTab in tabs set profName to profile name of current session of aTab if profName is desiredProfile then select aTab set foundProfile to true exit repeat end if end repeat if not foundProfile then create tab with profile desiredProfile select end if tell current session write text "VIMUSER=" & desiredProfile & " nvim -S " & sessionFile & " -u " & vimrc end tell end tell end tell end run
boot/init/a64/syscall.asm
Tiihala/Dancy
11
160332
<reponame>Tiihala/Dancy<gh_stars>10-100 ;; ;; Copyright (c) 2019, 2020 <NAME> ;; ;; Permission to use, copy, modify, and/or distribute this software for any ;; purpose with or without fee is hereby granted, provided that the above ;; copyright notice and this permission notice appear in all copies. ;; ;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ;; ;; init/a64/syscall.asm ;; Boot loader system calls (64-bit) ;; bits 64 section .text global b_output_string global b_output_string_hl global b_output_control global b_get_keycode global b_get_byte_com1 global b_put_byte_com1 global b_get_byte_com2 global b_put_byte_com2 global b_get_parameter global b_get_structure global b_set_read_buffer global b_read_blocks global b_set_write_buffer global b_write_blocks global b_pause global b_exit syscall_text_start: align 16 ; unsigned long b_output_string(const char *, unsigned int) b_output_string: mov eax, uefi_syscalls ; get the uefi syscall address mov eax, [rax] ; get the uefi syscall offset test eax, eax ; test zero jz short .bios_boot_loader add eax, (0 * 8) ; syscall offset jmp [rax] ; jump into the boot loader .bios_boot_loader: push rbx ; save register rbx mov ebx, ecx ; ebx = argument 1 mov ecx, edx ; ecx = argument 2 mov ah, 0xA0 ; ah = syscall number int 0x20 ; boot loader syscall pop rbx ; restore register rbx ret align 16 ; unsigned long b_output_string_hl(const char *, unsigned int) b_output_string_hl: mov eax, uefi_syscalls ; get the uefi syscall address mov eax, [rax] ; get the uefi syscall offset test eax, eax ; test zero jz short .bios_boot_loader add eax, (1 * 8) ; syscall offset jmp [rax] ; jump into the boot loader .bios_boot_loader: push rbx ; save register rbx mov ebx, ecx ; ebx = argument 1 mov ecx, edx ; ecx = argument 2 mov ah, 0xA1 ; ah = syscall number int 0x20 ; boot loader syscall pop rbx ; restore register rbx ret align 16 ; unsigned long b_output_control(unsigned int, unsigned int) b_output_control: mov eax, uefi_syscalls ; get the uefi syscall address mov eax, [rax] ; get the uefi syscall offset test eax, eax ; test zero jz short .bios_boot_loader add eax, (2 * 8) ; syscall offset jmp [rax] ; jump into the boot loader .bios_boot_loader: push rbx ; save register rbx mov ebx, ecx ; ebx = argument 1 mov ecx, edx ; ecx = argument 2 mov ah, 0xA2 ; ah = syscall number int 0x20 ; boot loader syscall pop rbx ; restore register rbx ret align 16 ; unsigned long b_get_keycode(void) b_get_keycode: mov eax, uefi_syscalls ; get the uefi syscall address mov eax, [rax] ; get the uefi syscall offset test eax, eax ; test zero jz short .bios_boot_loader add eax, (3 * 8) ; syscall offset jmp [rax] ; jump into the boot loader .bios_boot_loader: mov ah, 0xA3 ; ah = syscall number int 0x20 ; boot loader syscall ret align 16 ; unsigned long b_get_byte_com1(void) b_get_byte_com1: mov eax, uefi_syscalls ; get the uefi syscall address mov eax, [rax] ; get the uefi syscall offset test eax, eax ; test zero jz short .bios_boot_loader add eax, (4 * 8) ; syscall offset jmp [rax] ; jump into the boot loader .bios_boot_loader: mov ah, 0xA4 ; ah = syscall number int 0x20 ; boot loader syscall jc short .end or eax, 0xFFFFFF00 ; al = byte .end: ret align 16 ; unsigned long b_put_byte_com1(unsigned char) b_put_byte_com1: mov eax, uefi_syscalls ; get the uefi syscall address mov eax, [rax] ; get the uefi syscall offset test eax, eax ; test zero jz short .bios_boot_loader add eax, (5 * 8) ; syscall offset jmp [rax] ; jump into the boot loader .bios_boot_loader: push rbx ; save register rbx xor ebx, ebx ; ebx = argument 1 (zero) ; ecx = argument 2 mov ah, 0xA5 ; ah = syscall number int 0x20 ; boot loader syscall jc short .end mov eax, 0x00000001 ; eax = 0x00000001 .end: pop rbx ; restore register rbx ret align 16 ; unsigned long b_get_byte_com2(void) b_get_byte_com2: mov eax, uefi_syscalls ; get the uefi syscall address mov eax, [rax] ; get the uefi syscall offset test eax, eax ; test zero jz short .bios_boot_loader add eax, (6 * 8) ; syscall offset jmp [rax] ; jump into the boot loader .bios_boot_loader: mov ah, 0xA6 ; ah = syscall number int 0x20 ; boot loader syscall jc short .end or eax, 0xFFFFFF00 ; al = byte .end: ret align 16 ; unsigned long b_put_byte_com2(unsigned char) b_put_byte_com2: mov eax, uefi_syscalls ; get the uefi syscall address mov eax, [rax] ; get the uefi syscall offset test eax, eax ; test zero jz short .bios_boot_loader add eax, (7 * 8) ; syscall offset jmp [rax] ; jump into the boot loader .bios_boot_loader: push rbx ; save register rbx xor ebx, ebx ; ebx = argument 1 (zero) ; ecx = argument 2 mov ah, 0xA7 ; ah = syscall number int 0x20 ; boot loader syscall jc short .end mov eax, 0x00000001 ; eax = 0x00000001 .end: pop rbx ; restore register rbx ret align 16 ; unsigned long b_get_parameter(unsigned int) b_get_parameter: mov eax, uefi_syscalls ; get the uefi syscall address mov eax, [rax] ; get the uefi syscall offset test eax, eax ; test zero jz short .bios_boot_loader add eax, (8 * 8) ; syscall offset jmp [rax] ; jump into the boot loader .bios_boot_loader: push rbx ; save register rbx xor ebx, ebx ; ebx = argument 1 (zero) ; ecx = argument 2 mov ah, 0xA8 ; ah = syscall number int 0x20 ; boot loader syscall pop rbx ; restore register rbx ret align 16 ; unsigned long b_get_structure(void *, unsigned int) b_get_structure: mov eax, uefi_syscalls ; get the uefi syscall address mov eax, [rax] ; get the uefi syscall offset test eax, eax ; test zero jz short .bios_boot_loader add eax, (9 * 8) ; syscall offset jmp [rax] ; jump into the boot loader .bios_boot_loader: push rbx ; save register rbx mov ebx, ecx ; ebx = argument 1 mov ecx, edx ; ecx = argument 2 mov ah, 0xA9 ; ah = syscall number int 0x20 ; boot loader syscall pop rbx ; restore register rbx ret align 16 ; unsigned long b_set_read_buffer(void *, unsigned int) b_set_read_buffer: mov eax, uefi_syscalls ; get the uefi syscall address mov eax, [rax] ; get the uefi syscall offset test eax, eax ; test zero jz short .bios_boot_loader add eax, (10 * 8) ; syscall offset jmp [rax] ; jump into the boot loader .bios_boot_loader: push rbx ; save register rbx mov ebx, ecx ; ebx = argument 1 mov ecx, edx ; ecx = argument 2 mov ah, 0xAA ; ah = syscall number int 0x20 ; boot loader syscall pop rbx ; restore register rbx ret align 16 ; unsigned long b_read_blocks(unsigned int, unsigned int) b_read_blocks: mov eax, uefi_syscalls ; get the uefi syscall address mov eax, [rax] ; get the uefi syscall offset test eax, eax ; test zero jz short .bios_boot_loader add eax, (11 * 8) ; syscall offset jmp [rax] ; jump into the boot loader .bios_boot_loader: push rbx ; save register rbx mov ebx, ecx ; ebx = argument 1 mov ecx, edx ; ecx = argument 2 mov ah, 0xAB ; ah = syscall number int 0x20 ; boot loader syscall pop rbx ; restore register rbx ret align 16 ; unsigned long b_set_write_buffer(void *, unsigned int) b_set_write_buffer: mov eax, uefi_syscalls ; get the uefi syscall address mov eax, [rax] ; get the uefi syscall offset test eax, eax ; test zero jz short .bios_boot_loader add eax, (12 * 8) ; syscall offset jmp [rax] ; jump into the boot loader .bios_boot_loader: push rbx ; save register rbx mov ebx, ecx ; ebx = argument 1 mov ecx, edx ; ecx = argument 2 mov ah, 0xAC ; ah = syscall number int 0x20 ; boot loader syscall pop rbx ; restore register rbx ret align 16 ; unsigned long b_write_blocks(unsigned int, unsigned int) b_write_blocks: mov eax, uefi_syscalls ; get the uefi syscall address mov eax, [rax] ; get the uefi syscall offset test eax, eax ; test zero jz short .bios_boot_loader add eax, (13 * 8) ; syscall offset jmp [rax] ; jump into the boot loader .bios_boot_loader: push rbx ; save register rbx mov ebx, ecx ; ebx = argument 1 mov ecx, edx ; ecx = argument 2 mov ah, 0xAD ; ah = syscall number int 0x20 ; boot loader syscall pop rbx ; restore register rbx ret align 16 ; unsigned long b_pause(void) b_pause: mov eax, uefi_syscalls ; get the uefi syscall address mov eax, [rax] ; get the uefi syscall offset test eax, eax ; test zero jz short .bios_boot_loader add eax, (14 * 8) ; syscall offset jmp [rax] ; jump into the boot loader .bios_boot_loader: mov ah, 0xAE ; ah = syscall number int 0x20 ; boot loader syscall ret align 16 ; unsigned long b_exit(void) b_exit: mov eax, uefi_syscalls ; get the uefi syscall address mov eax, [rax] ; get the uefi syscall offset test eax, eax ; test zero jz short .bios_boot_loader add eax, (15 * 8) ; syscall offset sub rsp, 0x28 ; shadow space + alignment call [rax] ; call the boot loader add rsp, 0x28 ; restore stack jmp short syscall_text_end .bios_boot_loader: mov ah, 0xAF ; ah = syscall number int 0x20 ; boot loader syscall pushfq ; push FLAGS and dword [rsp], 0xFFC0822A ; use defined value popfq ; pop FLAGS ; Replace above .text section with "int3" instructions. ; Boot loader services must not be called after b_exit. syscall_text_end: push rdi ; save register rdi mov al, 0xCC ; al = int3 instruction ; ecx = instructions to write ; edi = destination address (edi == rdi) mov ecx, (syscall_text_end - syscall_text_start) mov edi, syscall_text_start cld ; clear direction flag rep stosb ; write int3 instructions xor eax, eax ; rax = 0x00000000 pop rdi ; restore register rdi ret section .data global boot_loader_type global uefi_syscalls align 4 boot_loader_type: dd 0x00000000 uefi_syscalls: dd 0x00000000
Projects/PJZ2/Framework/Depack/RNC_Depack_2C.asm
jonathanbennett73/amiga-pjz-planet-disco-balls
21
24306
<reponame>jonathanbennett73/amiga-pjz-planet-disco-balls<gh_stars>10-100 *------------------------------------------------------------------------------ * PRO-PACK Unpack Source Code (Compact Version) - MC68000, Method 2 * * Copyright (c) 1991,92 <NAME>, U.K. All Rights Reserved. * * File: RNC_2C.S * * Date: 24.03.92 *------------------------------------------------------------------------------ *------------------------------------------------------------------------------ * Equates *------------------------------------------------------------------------------ input EQUR a0 output EQUR a1 temp EQUR a2 len EQUR d0 pos EQUR d1 bitbuf EQUR d2 *------------------------------------------------------------------------------ * Macros *------------------------------------------------------------------------------ getbit MACRO add.b bitbuf,bitbuf ENDM reload MACRO move.b (input)+,bitbuf addx.b bitbuf,bitbuf ENDM getraw MACRO move.b (input)+,(output)+ ENDM getrawREP MACRO getrawREP2\@ move.b (input)+,(output)+ move.b (input)+,(output)+ move.b (input)+,(output)+ move.b (input)+,(output)+ dbra pos,getrawREP2\@ ENDM *------------------------------------------------------------------------------ * Unpack Routine (Compact Version) - MC68000, Method 2 * * on entry, * a0.l = start address of packed file * a1.l = start address to write unpacked file * (note: a1 cannot be equal to a0) * stack space required: $1C bytes * * all other registers are preserved *------------------------------------------------------------------------------ RNC_Unpack movem.l d0-d2/a0-a2,-(sp) lea 18(input),input moveq #-$80,bitbuf add.b bitbuf,bitbuf reload getbit bra GetBits2 *------------------------------------------------------------------------------ Fetch0 reload bra.s Back0 Fetch1 reload bra.s Back1 Fetch2 reload bra.s Back2 Fetch3 reload bra.s Back3 Fetch4 reload bra.s Back4 Fetch5 reload bra.s Back5 Fetch6 reload bra.s Back6 Fetch7 reload bra.s Back7 Raw moveq #3,len x4Bits add.b bitbuf,bitbuf beq.s Fetch0 Back0 addx.w pos,pos dbra len,x4Bits addq.w #2,pos getrawREP bra.s GetBits2 *------------------------------------------------------------------------------ GetLen getbit beq.s Fetch1 Back1 addx.w len,len getbit beq.s Fetch2 Back2 bcc.s Copy subq.w #1,len getbit beq.s Fetch3 Back3 addx.w len,len cmp.b #9,len beq.s Raw *------------------------------------------------------------------------------ Copy getbit beq.s Fetch4 Back4 bcc.s ByteDisp2 getbit beq.s Fetch5 Back5 addx.w pos,pos getbit beq.s Fetch6 Back6 bcs.s BigDisp tst.w pos bne.s ByteDisp addq.w #1,pos Another getbit beq.s Fetch7 Back7 addx.w pos,pos ByteDisp rol.w #8,pos ByteDisp2 move.b (input)+,pos move.l output,temp sub.w pos,temp subq.w #1,temp lsr.w #1,len bcc.s ByteDisp3 move.b (temp)+,(output)+ ByteDisp3 subq.w #1,len tst.w pos bne.s ByteDisp5 move.b (temp),pos ByteDisp4 move.b pos,(output)+ move.b pos,(output)+ dbra len,ByteDisp4 bra.s GetBits2 ByteDisp5 move.b (temp)+,(output)+ move.b (temp)+,(output)+ dbra len,ByteDisp5 bra.s GetBits2 *------------------------------------------------------------------------------ GetBits reload bcs.s String xByte getraw GetBits2 getbit bcs.s Chkz getraw getbit bcc.s xByte Chkz beq.s GetBits *------------------------------------------------------------------------------ String moveq #2,len moveq #0,pos getbit beq.s Fetch8 Back8 bcc GetLen Smalls getbit beq.s Fetch9 Back9 bcc.s ByteDisp2 addq.w #1,len getbit beq.s Fetch10 Back10 bcc.s Copy move.b (input)+,len beq.s OverNout addq.w #8,len bra.s Copy BigDisp getbit beq.s Fetch11 Back11 addx.w pos,pos or.w #4,pos getbit beq.s Fetch12 Back12 bcs.s ByteDisp bra.s Another Fetch8 reload bra.s Back8 Fetch9 reload bra.s Back9 Fetch10 reload bra.s Back10 Fetch11 reload bra.s Back11 Fetch12 reload bra.s Back12 OverNout getbit bne.s Check4end reload Check4end bcs.s GetBits2 movem.l (sp)+,d0-d2/a0-a2 rts 
third_party/universal-ctags/ctags/Units/parser-ada.r/ada-separate.d/input.adb
f110/wing
1
8346
-- Taken from #2943 submitted by @koenmeersman with Ada.Text_IO; separate (Buffer); package body Test is procedure Inner is separate; begin null; end Test;
testutil/ahven/util-xunit.adb
Letractively/ada-util
0
27093
<reponame>Letractively/ada-util<gh_stars>0 ----------------------------------------------------------------------- -- util-xunit - Unit tests on top of AHven -- Copyright (C) 2011 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Directories; with Ada.IO_Exceptions; with Ada.Text_IO; with Ada.Calendar; with Ahven.Listeners.Basic; with Ahven.XML_Runner; with Ahven.Text_Runner; with Util.Tests; package body Util.XUnit is -- ------------------------------ -- Build a message from a string (Adaptation for AUnit API). -- ------------------------------ function Format (S : in String) return Message_String is begin return S; end Format; -- ------------------------------ -- Build a message with the source and line number. -- ------------------------------ function Build_Message (Message : in String; Source : in String; Line : in Natural) return String is L : constant String := Natural'Image (Line); begin return Source & ":" & L (2 .. L'Last) & ": " & Message; end Build_Message; procedure Run_Test_Case (T : in out Ahven.Framework.Test_Case'Class); procedure Run_Test_Case (T : in out Ahven.Framework.Test_Case'Class) is begin Test_Case'Class (T).Run_Test; end Run_Test_Case; overriding procedure Initialize (T : in out Test_Case) is begin Ahven.Framework.Add_Test_Routine (T, Run_Test_Case'Access, "Test case"); end Initialize; -- ------------------------------ -- Return the name of the test case. -- ------------------------------ overriding function Get_Name (T : Test_Case) return String is begin return Test_Case'Class (T).Name; end Get_Name; -- maybe_overriding procedure Assert (T : in Test_Case; Condition : in Boolean; Message : in String := "Test failed"; Source : in String := GNAT.Source_Info.File; Line : in Natural := GNAT.Source_Info.Line) is pragma Unreferenced (T); begin Ahven.Assert (Condition => Condition, Message => Build_Message (Message => Message, Source => Source, Line => Line)); end Assert; -- ------------------------------ -- Check that the value matches what we expect. -- ------------------------------ procedure Assert (T : in Test; Condition : in Boolean; Message : in String := "Test failed"; Source : String := GNAT.Source_Info.File; Line : Natural := GNAT.Source_Info.Line) is pragma Unreferenced (T); begin Ahven.Assert (Condition => Condition, Message => Build_Message (Message => Message, Source => Source, Line => Line)); end Assert; First_Test : Test_Object_Access := null; -- ------------------------------ -- Register a test object in the test suite. -- ------------------------------ procedure Register (T : in Test_Object_Access) is begin T.Next := First_Test; First_Test := T; end Register; -- ------------------------------ -- Report passes, skips, failures, and errors from the result collection. -- ------------------------------ procedure Report_Results (Result : in Ahven.Results.Result_Collection; Time : in Duration) is T_Count : constant Integer := Ahven.Results.Test_Count (Result); F_Count : constant Integer := Ahven.Results.Failure_Count (Result); S_Count : constant Integer := Ahven.Results.Skipped_Count (Result); E_Count : constant Integer := Ahven.Results.Error_Count (Result); begin if F_Count > 0 then Ahven.Text_Runner.Print_Failures (Result, 0); end if; if E_Count > 0 then Ahven.Text_Runner.Print_Errors (Result, 0); end if; Ada.Text_IO.Put_Line ("Tests run:" & Integer'Image (T_Count - S_Count) & ", Failures:" & Integer'Image (F_Count) & ", Errors:" & Integer'Image (E_Count) & ", Skipped:" & Integer'Image (S_Count) & ", Time elapsed:" & Duration'Image (Time)); end Report_Results; -- ------------------------------ -- The main testsuite program. This launches the tests, collects the -- results, create performance logs and set the program exit status -- according to the testsuite execution status. -- ------------------------------ procedure Harness (Output : in Ada.Strings.Unbounded.Unbounded_String; XML : in Boolean; Result : out Status) is pragma Unreferenced (XML, Output); use Ahven.Listeners.Basic; use Ahven.Framework; use Ahven.Results; use type Ada.Calendar.Time; Tests : constant Access_Test_Suite := Suite; T : Test_Object_Access := First_Test; Listener : Ahven.Listeners.Basic.Basic_Listener; Timeout : constant Test_Duration := Test_Duration (Util.Tests.Get_Test_Timeout ("all")); Out_Dir : constant String := Util.Tests.Get_Test_Path ("regtests/result"); Start : Ada.Calendar.Time; begin while T /= null loop Ahven.Framework.Add_Static_Test (Tests.all, T.Test.all); T := T.Next; end loop; Set_Output_Capture (Listener, True); if not Ada.Directories.Exists (Out_Dir) then Ada.Directories.Create_Path (Out_Dir); end if; Start := Ada.Calendar.Clock; Ahven.Framework.Execute (Tests.all, Listener, Timeout); Report_Results (Listener.Main_Result, Ada.Calendar.Clock - Start); Ahven.XML_Runner.Report_Results (Listener.Main_Result, Out_Dir); if (Error_Count (Listener.Main_Result) > 0) or (Failure_Count (Listener.Main_Result) > 0) then Result := Failure; else Result := Success; end if; exception when Ada.IO_Exceptions.Name_Error => Ada.Text_IO.Put_Line ("Cannot create file"); Result := Failure; end Harness; end Util.XUnit;
llvm-gcc-4.2-2.9/gcc/ada/a-ciorse.adb
vidkidz/crossbridge
1
28765
<gh_stars>1-10 ------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- A D A . C O N T A I N E R S . -- -- I N D E F I N I T E _ O R D E R E D _ S E T S -- -- -- -- B o d y -- -- -- -- Copyright (C) 2004-2005, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- -- apply solely to the contents of the part following the private keyword. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- This unit was originally developed by <NAME>aney. -- ------------------------------------------------------------------------------ with Ada.Containers.Red_Black_Trees.Generic_Operations; pragma Elaborate_All (Ada.Containers.Red_Black_Trees.Generic_Operations); with Ada.Containers.Red_Black_Trees.Generic_Keys; pragma Elaborate_All (Ada.Containers.Red_Black_Trees.Generic_Keys); with Ada.Containers.Red_Black_Trees.Generic_Set_Operations; pragma Elaborate_All (Ada.Containers.Red_Black_Trees.Generic_Set_Operations); with Ada.Unchecked_Deallocation; package body Ada.Containers.Indefinite_Ordered_Sets is ----------------------- -- Local Subprograms -- ----------------------- function Color (Node : Node_Access) return Color_Type; pragma Inline (Color); function Copy_Node (Source : Node_Access) return Node_Access; pragma Inline (Copy_Node); procedure Free (X : in out Node_Access); procedure Insert_Sans_Hint (Tree : in out Tree_Type; New_Item : Element_Type; Node : out Node_Access; Inserted : out Boolean); procedure Insert_With_Hint (Dst_Tree : in out Tree_Type; Dst_Hint : Node_Access; Src_Node : Node_Access; Dst_Node : out Node_Access); function Is_Greater_Element_Node (Left : Element_Type; Right : Node_Access) return Boolean; pragma Inline (Is_Greater_Element_Node); function Is_Less_Element_Node (Left : Element_Type; Right : Node_Access) return Boolean; pragma Inline (Is_Less_Element_Node); function Is_Less_Node_Node (L, R : Node_Access) return Boolean; pragma Inline (Is_Less_Node_Node); function Left (Node : Node_Access) return Node_Access; pragma Inline (Left); function Parent (Node : Node_Access) return Node_Access; pragma Inline (Parent); procedure Replace_Element (Tree : in out Tree_Type; Node : Node_Access; Item : Element_Type); function Right (Node : Node_Access) return Node_Access; pragma Inline (Right); procedure Set_Color (Node : Node_Access; Color : Color_Type); pragma Inline (Set_Color); procedure Set_Left (Node : Node_Access; Left : Node_Access); pragma Inline (Set_Left); procedure Set_Parent (Node : Node_Access; Parent : Node_Access); pragma Inline (Set_Parent); procedure Set_Right (Node : Node_Access; Right : Node_Access); pragma Inline (Set_Right); -------------------------- -- Local Instantiations -- -------------------------- procedure Free_Element is new Ada.Unchecked_Deallocation (Element_Type, Element_Access); package Tree_Operations is new Red_Black_Trees.Generic_Operations (Tree_Types); procedure Delete_Tree is new Tree_Operations.Generic_Delete_Tree (Free); function Copy_Tree is new Tree_Operations.Generic_Copy_Tree (Copy_Node, Delete_Tree); use Tree_Operations; package Element_Keys is new Red_Black_Trees.Generic_Keys (Tree_Operations => Tree_Operations, Key_Type => Element_Type, Is_Less_Key_Node => Is_Less_Element_Node, Is_Greater_Key_Node => Is_Greater_Element_Node); package Set_Ops is new Generic_Set_Operations (Tree_Operations => Tree_Operations, Insert_With_Hint => Insert_With_Hint, Copy_Tree => Copy_Tree, Delete_Tree => Delete_Tree, Is_Less => Is_Less_Node_Node, Free => Free); --------- -- "<" -- --------- function "<" (Left, Right : Cursor) return Boolean is begin if Left.Node = null then raise Constraint_Error with "Left cursor equals No_Element"; end if; if Right.Node = null then raise Constraint_Error with "Right cursor equals No_Element"; end if; if Left.Node.Element = null then raise Program_Error with "Left cursor is bad"; end if; if Right.Node.Element = null then raise Program_Error with "Right cursor is bad"; end if; pragma Assert (Vet (Left.Container.Tree, Left.Node), "bad Left cursor in ""<"""); pragma Assert (Vet (Right.Container.Tree, Right.Node), "bad Right cursor in ""<"""); return Left.Node.Element.all < Right.Node.Element.all; end "<"; function "<" (Left : Cursor; Right : Element_Type) return Boolean is begin if Left.Node = null then raise Constraint_Error with "Left cursor equals No_Element"; end if; if Left.Node.Element = null then raise Program_Error with "Left cursor is bad"; end if; pragma Assert (Vet (Left.Container.Tree, Left.Node), "bad Left cursor in ""<"""); return Left.Node.Element.all < Right; end "<"; function "<" (Left : Element_Type; Right : Cursor) return Boolean is begin if Right.Node = null then raise Constraint_Error with "Right cursor equals No_Element"; end if; if Right.Node.Element = null then raise Program_Error with "Right cursor is bad"; end if; pragma Assert (Vet (Right.Container.Tree, Right.Node), "bad Right cursor in ""<"""); return Left < Right.Node.Element.all; end "<"; --------- -- "=" -- --------- function "=" (Left, Right : Set) return Boolean is function Is_Equal_Node_Node (L, R : Node_Access) return Boolean; pragma Inline (Is_Equal_Node_Node); function Is_Equal is new Tree_Operations.Generic_Equal (Is_Equal_Node_Node); ------------------------ -- Is_Equal_Node_Node -- ------------------------ function Is_Equal_Node_Node (L, R : Node_Access) return Boolean is begin return L.Element.all = R.Element.all; end Is_Equal_Node_Node; -- Start of processing for "=" begin return Is_Equal (Left.Tree, Right.Tree); end "="; --------- -- ">" -- --------- function ">" (Left, Right : Cursor) return Boolean is begin if Left.Node = null then raise Constraint_Error with "Left cursor equals No_Element"; end if; if Right.Node = null then raise Constraint_Error with "Right cursor equals No_Element"; end if; if Left.Node.Element = null then raise Program_Error with "Left cursor is bad"; end if; if Right.Node.Element = null then raise Program_Error with "Right cursor is bad"; end if; pragma Assert (Vet (Left.Container.Tree, Left.Node), "bad Left cursor in "">"""); pragma Assert (Vet (Right.Container.Tree, Right.Node), "bad Right cursor in "">"""); -- L > R same as R < L return Right.Node.Element.all < Left.Node.Element.all; end ">"; function ">" (Left : Cursor; Right : Element_Type) return Boolean is begin if Left.Node = null then raise Constraint_Error with "Left cursor equals No_Element"; end if; if Left.Node.Element = null then raise Program_Error with "Left cursor is bad"; end if; pragma Assert (Vet (Left.Container.Tree, Left.Node), "bad Left cursor in "">"""); return Right < Left.Node.Element.all; end ">"; function ">" (Left : Element_Type; Right : Cursor) return Boolean is begin if Right.Node = null then raise Constraint_Error with "Right cursor equals No_Element"; end if; if Right.Node.Element = null then raise Program_Error with "Right cursor is bad"; end if; pragma Assert (Vet (Right.Container.Tree, Right.Node), "bad Right cursor in "">"""); return Right.Node.Element.all < Left; end ">"; ------------ -- Adjust -- ------------ procedure Adjust is new Tree_Operations.Generic_Adjust (Copy_Tree); procedure Adjust (Container : in out Set) is begin Adjust (Container.Tree); end Adjust; ------------- -- Ceiling -- ------------- function Ceiling (Container : Set; Item : Element_Type) return Cursor is Node : constant Node_Access := Element_Keys.Ceiling (Container.Tree, Item); begin if Node = null then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, Node); end Ceiling; ----------- -- Clear -- ----------- procedure Clear is new Tree_Operations.Generic_Clear (Delete_Tree); procedure Clear (Container : in out Set) is begin Clear (Container.Tree); end Clear; ----------- -- Color -- ----------- function Color (Node : Node_Access) return Color_Type is begin return Node.Color; end Color; -------------- -- Contains -- -------------- function Contains (Container : Set; Item : Element_Type) return Boolean is begin return Find (Container, Item) /= No_Element; end Contains; --------------- -- Copy_Node -- --------------- function Copy_Node (Source : Node_Access) return Node_Access is Element : Element_Access := new Element_Type'(Source.Element.all); begin return new Node_Type'(Parent => null, Left => null, Right => null, Color => Source.Color, Element => Element); exception when others => Free_Element (Element); raise; end Copy_Node; ------------ -- Delete -- ------------ procedure Delete (Container : in out Set; Position : in out Cursor) is begin if Position.Node = null then raise Constraint_Error with "Position cursor equals No_Element"; end if; if Position.Node.Element = null then raise Program_Error with "Position cursor is bad"; end if; if Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor designates wrong set"; end if; pragma Assert (Vet (Container.Tree, Position.Node), "bad cursor in Delete"); Tree_Operations.Delete_Node_Sans_Free (Container.Tree, Position.Node); Free (Position.Node); Position.Container := null; end Delete; procedure Delete (Container : in out Set; Item : Element_Type) is X : Node_Access := Element_Keys.Find (Container.Tree, Item); begin if X = null then raise Constraint_Error with "attempt to delete element not in set"; end if; Tree_Operations.Delete_Node_Sans_Free (Container.Tree, X); Free (X); end Delete; ------------------ -- Delete_First -- ------------------ procedure Delete_First (Container : in out Set) is Tree : Tree_Type renames Container.Tree; X : Node_Access := Tree.First; begin if X /= null then Tree_Operations.Delete_Node_Sans_Free (Tree, X); Free (X); end if; end Delete_First; ----------------- -- Delete_Last -- ----------------- procedure Delete_Last (Container : in out Set) is Tree : Tree_Type renames Container.Tree; X : Node_Access := Tree.Last; begin if X /= null then Tree_Operations.Delete_Node_Sans_Free (Tree, X); Free (X); end if; end Delete_Last; ---------------- -- Difference -- ---------------- procedure Difference (Target : in out Set; Source : Set) is begin Set_Ops.Difference (Target.Tree, Source.Tree); end Difference; function Difference (Left, Right : Set) return Set is Tree : constant Tree_Type := Set_Ops.Difference (Left.Tree, Right.Tree); begin return Set'(Controlled with Tree); end Difference; ------------- -- Element -- ------------- function Element (Position : Cursor) return Element_Type is begin if Position.Node = null then raise Constraint_Error with "Position cursor equals No_Element"; end if; if Position.Node.Element = null then raise Program_Error with "Position cursor is bad"; end if; pragma Assert (Vet (Position.Container.Tree, Position.Node), "bad cursor in Element"); return Position.Node.Element.all; end Element; ------------------------- -- Equivalent_Elements -- ------------------------- function Equivalent_Elements (Left, Right : Element_Type) return Boolean is begin if Left < Right or else Right < Left then return False; else return True; end if; end Equivalent_Elements; --------------------- -- Equivalent_Sets -- --------------------- function Equivalent_Sets (Left, Right : Set) return Boolean is function Is_Equivalent_Node_Node (L, R : Node_Access) return Boolean; pragma Inline (Is_Equivalent_Node_Node); function Is_Equivalent is new Tree_Operations.Generic_Equal (Is_Equivalent_Node_Node); ----------------------------- -- Is_Equivalent_Node_Node -- ----------------------------- function Is_Equivalent_Node_Node (L, R : Node_Access) return Boolean is begin if L.Element.all < R.Element.all then return False; elsif R.Element.all < L.Element.all then return False; else return True; end if; end Is_Equivalent_Node_Node; -- Start of processing for Equivalent_Sets begin return Is_Equivalent (Left.Tree, Right.Tree); end Equivalent_Sets; ------------- -- Exclude -- ------------- procedure Exclude (Container : in out Set; Item : Element_Type) is X : Node_Access := Element_Keys.Find (Container.Tree, Item); begin if X /= null then Tree_Operations.Delete_Node_Sans_Free (Container.Tree, X); Free (X); end if; end Exclude; ---------- -- Find -- ---------- function Find (Container : Set; Item : Element_Type) return Cursor is Node : constant Node_Access := Element_Keys.Find (Container.Tree, Item); begin if Node = null then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, Node); end Find; ----------- -- First -- ----------- function First (Container : Set) return Cursor is begin if Container.Tree.First = null then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, Container.Tree.First); end First; ------------------- -- First_Element -- ------------------- function First_Element (Container : Set) return Element_Type is begin if Container.Tree.First = null then raise Constraint_Error with "set is empty"; end if; return Container.Tree.First.Element.all; end First_Element; ----------- -- Floor -- ----------- function Floor (Container : Set; Item : Element_Type) return Cursor is Node : constant Node_Access := Element_Keys.Floor (Container.Tree, Item); begin if Node = null then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, Node); end Floor; ---------- -- Free -- ---------- procedure Free (X : in out Node_Access) is procedure Deallocate is new Ada.Unchecked_Deallocation (Node_Type, Node_Access); begin if X = null then return; end if; X.Parent := X; X.Left := X; X.Right := X; begin Free_Element (X.Element); exception when others => X.Element := null; Deallocate (X); raise; end; Deallocate (X); end Free; ------------------ -- Generic_Keys -- ------------------ package body Generic_Keys is ----------------------- -- Local Subprograms -- ----------------------- function Is_Greater_Key_Node (Left : Key_Type; Right : Node_Access) return Boolean; pragma Inline (Is_Greater_Key_Node); function Is_Less_Key_Node (Left : Key_Type; Right : Node_Access) return Boolean; pragma Inline (Is_Less_Key_Node); -------------------------- -- Local Instantiations -- -------------------------- package Key_Keys is new Red_Black_Trees.Generic_Keys (Tree_Operations => Tree_Operations, Key_Type => Key_Type, Is_Less_Key_Node => Is_Less_Key_Node, Is_Greater_Key_Node => Is_Greater_Key_Node); ------------- -- Ceiling -- ------------- function Ceiling (Container : Set; Key : Key_Type) return Cursor is Node : constant Node_Access := Key_Keys.Ceiling (Container.Tree, Key); begin if Node = null then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, Node); end Ceiling; -------------- -- Contains -- -------------- function Contains (Container : Set; Key : Key_Type) return Boolean is begin return Find (Container, Key) /= No_Element; end Contains; ------------ -- Delete -- ------------ procedure Delete (Container : in out Set; Key : Key_Type) is X : Node_Access := Key_Keys.Find (Container.Tree, Key); begin if X = null then raise Constraint_Error with "attempt to delete key not in set"; end if; Tree_Operations.Delete_Node_Sans_Free (Container.Tree, X); Free (X); end Delete; ------------- -- Element -- ------------- function Element (Container : Set; Key : Key_Type) return Element_Type is Node : constant Node_Access := Key_Keys.Find (Container.Tree, Key); begin if Node = null then raise Constraint_Error with "key not in set"; end if; return Node.Element.all; end Element; --------------------- -- Equivalent_Keys -- --------------------- function Equivalent_Keys (Left, Right : Key_Type) return Boolean is begin if Left < Right or else Right < Left then return False; else return True; end if; end Equivalent_Keys; ------------- -- Exclude -- ------------- procedure Exclude (Container : in out Set; Key : Key_Type) is X : Node_Access := Key_Keys.Find (Container.Tree, Key); begin if X /= null then Tree_Operations.Delete_Node_Sans_Free (Container.Tree, X); Free (X); end if; end Exclude; ---------- -- Find -- ---------- function Find (Container : Set; Key : Key_Type) return Cursor is Node : constant Node_Access := Key_Keys.Find (Container.Tree, Key); begin if Node = null then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, Node); end Find; ----------- -- Floor -- ----------- function Floor (Container : Set; Key : Key_Type) return Cursor is Node : constant Node_Access := Key_Keys.Floor (Container.Tree, Key); begin if Node = null then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, Node); end Floor; ------------------------- -- Is_Greater_Key_Node -- ------------------------- function Is_Greater_Key_Node (Left : Key_Type; Right : Node_Access) return Boolean is begin return Key (Right.Element.all) < Left; end Is_Greater_Key_Node; ---------------------- -- Is_Less_Key_Node -- ---------------------- function Is_Less_Key_Node (Left : Key_Type; Right : Node_Access) return Boolean is begin return Left < Key (Right.Element.all); end Is_Less_Key_Node; --------- -- Key -- --------- function Key (Position : Cursor) return Key_Type is begin if Position.Node = null then raise Constraint_Error with "Position cursor equals No_Element"; end if; if Position.Node.Element = null then raise Program_Error with "Position cursor is bad"; end if; pragma Assert (Vet (Position.Container.Tree, Position.Node), "bad cursor in Key"); return Key (Position.Node.Element.all); end Key; ------------- -- Replace -- ------------- procedure Replace (Container : in out Set; Key : Key_Type; New_Item : Element_Type) is Node : constant Node_Access := Key_Keys.Find (Container.Tree, Key); begin if Node = null then raise Constraint_Error with "attempt to replace key not in set"; end if; Replace_Element (Container.Tree, Node, New_Item); end Replace; ----------------------------------- -- Update_Element_Preserving_Key -- ----------------------------------- procedure Update_Element_Preserving_Key (Container : in out Set; Position : Cursor; Process : not null access procedure (Element : in out Element_Type)) is Tree : Tree_Type renames Container.Tree; begin if Position.Node = null then raise Constraint_Error with "Position cursor equals No_Element"; end if; if Position.Node.Element = null then raise Program_Error with "Position cursor is bad"; end if; if Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor designates wrong set"; end if; pragma Assert (Vet (Container.Tree, Position.Node), "bad cursor in Update_Element_Preserving_Key"); declare E : Element_Type renames Position.Node.Element.all; K : constant Key_Type := Key (E); B : Natural renames Tree.Busy; L : Natural renames Tree.Lock; begin B := B + 1; L := L + 1; begin Process (E); exception when others => L := L - 1; B := B - 1; raise; end; L := L - 1; B := B - 1; if Equivalent_Keys (K, Key (E)) then return; end if; end; declare X : Node_Access := Position.Node; begin Tree_Operations.Delete_Node_Sans_Free (Tree, X); Free (X); end; raise Program_Error with "key was modified"; end Update_Element_Preserving_Key; end Generic_Keys; ----------------- -- Has_Element -- ----------------- function Has_Element (Position : Cursor) return Boolean is begin return Position /= No_Element; end Has_Element; ------------- -- Include -- ------------- procedure Include (Container : in out Set; New_Item : Element_Type) is Position : Cursor; Inserted : Boolean; X : Element_Access; begin Insert (Container, New_Item, Position, Inserted); if not Inserted then if Container.Tree.Lock > 0 then raise Program_Error with "attempt to tamper with cursors (set is locked)"; end if; X := Position.Node.Element; Position.Node.Element := new Element_Type'(New_Item); Free_Element (X); end if; end Include; ------------ -- Insert -- ------------ procedure Insert (Container : in out Set; New_Item : Element_Type; Position : out Cursor; Inserted : out Boolean) is begin Insert_Sans_Hint (Container.Tree, New_Item, Position.Node, Inserted); Position.Container := Container'Unrestricted_Access; end Insert; procedure Insert (Container : in out Set; New_Item : Element_Type) is Position : Cursor; Inserted : Boolean; begin Insert (Container, New_Item, Position, Inserted); if not Inserted then raise Constraint_Error with "attempt to insert element already in set"; end if; end Insert; ---------------------- -- Insert_Sans_Hint -- ---------------------- procedure Insert_Sans_Hint (Tree : in out Tree_Type; New_Item : Element_Type; Node : out Node_Access; Inserted : out Boolean) is function New_Node return Node_Access; pragma Inline (New_Node); procedure Insert_Post is new Element_Keys.Generic_Insert_Post (New_Node); procedure Conditional_Insert_Sans_Hint is new Element_Keys.Generic_Conditional_Insert (Insert_Post); -------------- -- New_Node -- -------------- function New_Node return Node_Access is Element : Element_Access := new Element_Type'(New_Item); begin return new Node_Type'(Parent => null, Left => null, Right => null, Color => Red_Black_Trees.Red, Element => Element); exception when others => Free_Element (Element); raise; end New_Node; -- Start of processing for Insert_Sans_Hint begin Conditional_Insert_Sans_Hint (Tree, New_Item, Node, Inserted); end Insert_Sans_Hint; ---------------------- -- Insert_With_Hint -- ---------------------- procedure Insert_With_Hint (Dst_Tree : in out Tree_Type; Dst_Hint : Node_Access; Src_Node : Node_Access; Dst_Node : out Node_Access) is Success : Boolean; function New_Node return Node_Access; procedure Insert_Post is new Element_Keys.Generic_Insert_Post (New_Node); procedure Insert_Sans_Hint is new Element_Keys.Generic_Conditional_Insert (Insert_Post); procedure Insert_With_Hint is new Element_Keys.Generic_Conditional_Insert_With_Hint (Insert_Post, Insert_Sans_Hint); -------------- -- New_Node -- -------------- function New_Node return Node_Access is Element : Element_Access := new Element_Type'(Src_Node.Element.all); Node : Node_Access; begin begin Node := new Node_Type; exception when others => Free_Element (Element); raise; end; Node.Element := Element; return Node; end New_Node; -- Start of processing for Insert_With_Hint begin Insert_With_Hint (Dst_Tree, Dst_Hint, Src_Node.Element.all, Dst_Node, Success); end Insert_With_Hint; ------------------ -- Intersection -- ------------------ procedure Intersection (Target : in out Set; Source : Set) is begin Set_Ops.Intersection (Target.Tree, Source.Tree); end Intersection; function Intersection (Left, Right : Set) return Set is Tree : constant Tree_Type := Set_Ops.Intersection (Left.Tree, Right.Tree); begin return Set'(Controlled with Tree); end Intersection; -------------- -- Is_Empty -- -------------- function Is_Empty (Container : Set) return Boolean is begin return Container.Tree.Length = 0; end Is_Empty; ----------------------------- -- Is_Greater_Element_Node -- ----------------------------- function Is_Greater_Element_Node (Left : Element_Type; Right : Node_Access) return Boolean is begin -- e > node same as node < e return Right.Element.all < Left; end Is_Greater_Element_Node; -------------------------- -- Is_Less_Element_Node -- -------------------------- function Is_Less_Element_Node (Left : Element_Type; Right : Node_Access) return Boolean is begin return Left < Right.Element.all; end Is_Less_Element_Node; ----------------------- -- Is_Less_Node_Node -- ----------------------- function Is_Less_Node_Node (L, R : Node_Access) return Boolean is begin return L.Element.all < R.Element.all; end Is_Less_Node_Node; --------------- -- Is_Subset -- --------------- function Is_Subset (Subset : Set; Of_Set : Set) return Boolean is begin return Set_Ops.Is_Subset (Subset => Subset.Tree, Of_Set => Of_Set.Tree); end Is_Subset; ------------- -- Iterate -- ------------- procedure Iterate (Container : Set; Process : not null access procedure (Position : Cursor)) is procedure Process_Node (Node : Node_Access); pragma Inline (Process_Node); procedure Local_Iterate is new Tree_Operations.Generic_Iteration (Process_Node); ------------------ -- Process_Node -- ------------------ procedure Process_Node (Node : Node_Access) is begin Process (Cursor'(Container'Unrestricted_Access, Node)); end Process_Node; T : Tree_Type renames Container.Tree'Unrestricted_Access.all; B : Natural renames T.Busy; -- Start of prccessing for Iterate begin B := B + 1; begin Local_Iterate (T); exception when others => B := B - 1; raise; end; B := B - 1; end Iterate; ---------- -- Last -- ---------- function Last (Container : Set) return Cursor is begin if Container.Tree.Last = null then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, Container.Tree.Last); end Last; ------------------ -- Last_Element -- ------------------ function Last_Element (Container : Set) return Element_Type is begin if Container.Tree.Last = null then raise Constraint_Error with "set is empty"; end if; return Container.Tree.Last.Element.all; end Last_Element; ---------- -- Left -- ---------- function Left (Node : Node_Access) return Node_Access is begin return Node.Left; end Left; ------------ -- Length -- ------------ function Length (Container : Set) return Count_Type is begin return Container.Tree.Length; end Length; ---------- -- Move -- ---------- procedure Move is new Tree_Operations.Generic_Move (Clear); procedure Move (Target : in out Set; Source : in out Set) is begin Move (Target => Target.Tree, Source => Source.Tree); end Move; ---------- -- Next -- ---------- procedure Next (Position : in out Cursor) is begin Position := Next (Position); end Next; function Next (Position : Cursor) return Cursor is begin if Position = No_Element then return No_Element; end if; if Position.Node.Element = null then raise Program_Error with "Position cursor is bad"; end if; pragma Assert (Vet (Position.Container.Tree, Position.Node), "bad cursor in Next"); declare Node : constant Node_Access := Tree_Operations.Next (Position.Node); begin if Node = null then return No_Element; end if; return Cursor'(Position.Container, Node); end; end Next; ------------- -- Overlap -- ------------- function Overlap (Left, Right : Set) return Boolean is begin return Set_Ops.Overlap (Left.Tree, Right.Tree); end Overlap; ------------ -- Parent -- ------------ function Parent (Node : Node_Access) return Node_Access is begin return Node.Parent; end Parent; -------------- -- Previous -- -------------- procedure Previous (Position : in out Cursor) is begin Position := Previous (Position); end Previous; function Previous (Position : Cursor) return Cursor is begin if Position = No_Element then return No_Element; end if; if Position.Node.Element = null then raise Program_Error with "Position cursor is bad"; end if; pragma Assert (Vet (Position.Container.Tree, Position.Node), "bad cursor in Previous"); declare Node : constant Node_Access := Tree_Operations.Previous (Position.Node); begin if Node = null then return No_Element; end if; return Cursor'(Position.Container, Node); end; end Previous; ------------------- -- Query_Element -- ------------------- procedure Query_Element (Position : Cursor; Process : not null access procedure (Element : Element_Type)) is begin if Position.Node = null then raise Constraint_Error with "Position cursor equals No_Element"; end if; if Position.Node.Element = null then raise Program_Error with "Position cursor is bad"; end if; pragma Assert (Vet (Position.Container.Tree, Position.Node), "bad cursor in Query_Element"); declare T : Tree_Type renames Position.Container.Tree; B : Natural renames T.Busy; L : Natural renames T.Lock; begin B := B + 1; L := L + 1; begin Process (Position.Node.Element.all); exception when others => L := L - 1; B := B - 1; raise; end; L := L - 1; B := B - 1; end; end Query_Element; ---------- -- Read -- ---------- procedure Read (Stream : access Root_Stream_Type'Class; Container : out Set) is function Read_Node (Stream : access Root_Stream_Type'Class) return Node_Access; pragma Inline (Read_Node); procedure Read is new Tree_Operations.Generic_Read (Clear, Read_Node); --------------- -- Read_Node -- --------------- function Read_Node (Stream : access Root_Stream_Type'Class) return Node_Access is Node : Node_Access := new Node_Type; begin Node.Element := new Element_Type'(Element_Type'Input (Stream)); return Node; exception when others => Free (Node); -- Note that Free deallocates elem too raise; end Read_Node; -- Start of processing for Read begin Read (Stream, Container.Tree); end Read; procedure Read (Stream : access Root_Stream_Type'Class; Item : out Cursor) is begin raise Program_Error with "attempt to stream set cursor"; end Read; ------------- -- Replace -- ------------- procedure Replace (Container : in out Set; New_Item : Element_Type) is Node : constant Node_Access := Element_Keys.Find (Container.Tree, New_Item); X : Element_Access; begin if Node = null then raise Constraint_Error with "attempt to replace element not in set"; end if; if Container.Tree.Lock > 0 then raise Program_Error with "attempt to tamper with cursors (set is locked)"; end if; X := Node.Element; Node.Element := new Element_Type'(New_Item); Free_Element (X); end Replace; --------------------- -- Replace_Element -- --------------------- procedure Replace_Element (Tree : in out Tree_Type; Node : Node_Access; Item : Element_Type) is begin if Item < Node.Element.all or else Node.Element.all < Item then null; else if Tree.Lock > 0 then raise Program_Error with "attempt to tamper with cursors (set is locked)"; end if; declare X : Element_Access := Node.Element; begin Node.Element := new Element_Type'(Item); Free_Element (X); end; return; end if; Tree_Operations.Delete_Node_Sans_Free (Tree, Node); -- Checks busy-bit Insert_New_Item : declare function New_Node return Node_Access; pragma Inline (New_Node); procedure Insert_Post is new Element_Keys.Generic_Insert_Post (New_Node); procedure Insert is new Element_Keys.Generic_Conditional_Insert (Insert_Post); -------------- -- New_Node -- -------------- function New_Node return Node_Access is begin Node.Element := new Element_Type'(Item); -- OK if fails Node.Color := Red; Node.Parent := null; Node.Right := null; Node.Left := null; return Node; end New_Node; Result : Node_Access; Inserted : Boolean; X : Element_Access := Node.Element; -- Start of processing for Insert_New_Item begin Attempt_Insert : begin Insert (Tree => Tree, Key => Item, Node => Result, Success => Inserted); -- TODO: change name of formal param exception when others => Inserted := False; end Attempt_Insert; if Inserted then pragma Assert (Result = Node); Free_Element (X); -- OK if fails return; end if; end Insert_New_Item; Reinsert_Old_Element : declare function New_Node return Node_Access; pragma Inline (New_Node); procedure Insert_Post is new Element_Keys.Generic_Insert_Post (New_Node); procedure Insert is new Element_Keys.Generic_Conditional_Insert (Insert_Post); -------------- -- New_Node -- -------------- function New_Node return Node_Access is begin Node.Color := Red; Node.Parent := null; Node.Right := null; Node.Left := null; return Node; end New_Node; Result : Node_Access; Inserted : Boolean; -- Start of processing for Reinsert_Old_Element begin Insert (Tree => Tree, Key => Node.Element.all, Node => Result, Success => Inserted); -- TODO: change name of formal param exception when others => null; end Reinsert_Old_Element; raise Program_Error with "attempt to replace existing element"; end Replace_Element; procedure Replace_Element (Container : in out Set; Position : Cursor; New_Item : Element_Type) is begin if Position.Node = null then raise Constraint_Error with "Position cursor equals No_Element"; end if; if Position.Node.Element = null then raise Program_Error with "Position cursor is bad"; end if; if Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor designates wrong set"; end if; pragma Assert (Vet (Container.Tree, Position.Node), "bad cursor in Replace_Element"); Replace_Element (Container.Tree, Position.Node, New_Item); end Replace_Element; --------------------- -- Reverse_Iterate -- --------------------- procedure Reverse_Iterate (Container : Set; Process : not null access procedure (Position : Cursor)) is procedure Process_Node (Node : Node_Access); pragma Inline (Process_Node); procedure Local_Reverse_Iterate is new Tree_Operations.Generic_Reverse_Iteration (Process_Node); ------------------ -- Process_Node -- ------------------ procedure Process_Node (Node : Node_Access) is begin Process (Cursor'(Container'Unrestricted_Access, Node)); end Process_Node; T : Tree_Type renames Container.Tree'Unrestricted_Access.all; B : Natural renames T.Busy; -- Start of processing for Reverse_Iterate begin B := B + 1; begin Local_Reverse_Iterate (T); exception when others => B := B - 1; raise; end; B := B - 1; end Reverse_Iterate; ----------- -- Right -- ----------- function Right (Node : Node_Access) return Node_Access is begin return Node.Right; end Right; --------------- -- Set_Color -- --------------- procedure Set_Color (Node : Node_Access; Color : Color_Type) is begin Node.Color := Color; end Set_Color; -------------- -- Set_Left -- -------------- procedure Set_Left (Node : Node_Access; Left : Node_Access) is begin Node.Left := Left; end Set_Left; ---------------- -- Set_Parent -- ---------------- procedure Set_Parent (Node : Node_Access; Parent : Node_Access) is begin Node.Parent := Parent; end Set_Parent; --------------- -- Set_Right -- --------------- procedure Set_Right (Node : Node_Access; Right : Node_Access) is begin Node.Right := Right; end Set_Right; -------------------------- -- Symmetric_Difference -- -------------------------- procedure Symmetric_Difference (Target : in out Set; Source : Set) is begin Set_Ops.Symmetric_Difference (Target.Tree, Source.Tree); end Symmetric_Difference; function Symmetric_Difference (Left, Right : Set) return Set is Tree : constant Tree_Type := Set_Ops.Symmetric_Difference (Left.Tree, Right.Tree); begin return Set'(Controlled with Tree); end Symmetric_Difference; ------------ -- To_Set -- ------------ function To_Set (New_Item : Element_Type) return Set is Tree : Tree_Type; Node : Node_Access; Inserted : Boolean; begin Insert_Sans_Hint (Tree, New_Item, Node, Inserted); return Set'(Controlled with Tree); end To_Set; ----------- -- Union -- ----------- procedure Union (Target : in out Set; Source : Set) is begin Set_Ops.Union (Target.Tree, Source.Tree); end Union; function Union (Left, Right : Set) return Set is Tree : constant Tree_Type := Set_Ops.Union (Left.Tree, Right.Tree); begin return Set'(Controlled with Tree); end Union; ----------- -- Write -- ----------- procedure Write (Stream : access Root_Stream_Type'Class; Container : Set) is procedure Write_Node (Stream : access Root_Stream_Type'Class; Node : Node_Access); pragma Inline (Write_Node); procedure Write is new Tree_Operations.Generic_Write (Write_Node); ---------------- -- Write_Node -- ---------------- procedure Write_Node (Stream : access Root_Stream_Type'Class; Node : Node_Access) is begin Element_Type'Output (Stream, Node.Element.all); end Write_Node; -- Start of processing for Write begin Write (Stream, Container.Tree); end Write; procedure Write (Stream : access Root_Stream_Type'Class; Item : Cursor) is begin raise Program_Error with "attempt to stream set cursor"; end Write; end Ada.Containers.Indefinite_Ordered_Sets;
libsrc/_DEVELOPMENT/target/sms/driver/terminal/sms_01_output_terminal/sms_01_output_terminal_oterm_msg_pause.asm
jpoikela/z88dk
640
172753
SECTION code_driver SECTION code_driver_terminal_output PUBLIC sms_01_output_terminal_oterm_msg_pause EXTERN asm_in_wait_key, asm_in_wait_nokey sms_01_output_terminal_oterm_msg_pause: ; can use: af, bc, de, hl ; ; The scroll count has reached zero so the driver should ; pause the output somehow. ; ; If multiple threads are running this may have to be ; done differently. call asm_in_wait_nokey jp asm_in_wait_key
source/league/matreshka-internals-calendars-formatting.ads
svn2github/matreshka
24
1743
<reponame>svn2github/matreshka ------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011, <NAME> <<EMAIL>> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This package provides parser of CLDR Date Format Patterns. ------------------------------------------------------------------------------ with League.Strings; package Matreshka.Internals.Calendars.Formatting is pragma Preelaborate; subtype Era_Padding is Integer range 1 .. 3; type Abstract_Printer is abstract tagged limited null record; not overriding procedure Append_Abbreviated_Era (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number; Padding : Era_Padding) is abstract; not overriding procedure Append_Long_Era (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number) is abstract; not overriding procedure Append_Narrow_Era (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number) is abstract; not overriding procedure Append_Year (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number; Padding : Positive) is abstract; not overriding procedure Append_Year_Week (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number; Padding : Positive) is abstract; not overriding procedure Append_Extended_Year (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number; Padding : Positive) is abstract; not overriding procedure Append_Numerical_Quarter (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number; Padding : Positive; Is_Stand_Alone : Boolean) is abstract; not overriding procedure Append_Abbreviated_Quarter (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number; Is_Stand_Alone : Boolean) is abstract; not overriding procedure Append_Full_Quarter (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number; Is_Stand_Alone : Boolean) is abstract; not overriding procedure Append_Numerical_Month (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number; Padding : Positive; Is_Stand_Alone : Boolean) is abstract; not overriding procedure Append_Abbreviated_Month (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number; Is_Stand_Alone : Boolean) is abstract; not overriding procedure Append_Full_Month (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number; Is_Stand_Alone : Boolean) is abstract; not overriding procedure Append_Narrow_Month (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number; Is_Stand_Alone : Boolean) is abstract; not overriding procedure Append_Chinese_Leap_Month (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number) is abstract; not overriding procedure Append_Week_Of_Year (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number; Padding : Positive) is abstract; not overriding procedure Append_Week_Of_Month (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number) is abstract; not overriding procedure Append_Day_Of_Month (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number; Padding : Positive) is abstract; not overriding procedure Append_Day_Of_Year (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number; Padding : Positive) is abstract; not overriding procedure Append_Day_Of_Week_In_Month (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number) is abstract; not overriding procedure Append_Julian_Day (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number; Padding : Positive) is abstract; not overriding procedure Append_Numerical_Day_Of_Week (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number; Padding : Positive; Is_Stand_Alone : Boolean) is abstract; not overriding procedure Append_Short_Day_Of_Week (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number; Padding : Positive; Is_Stand_Alone : Boolean) is abstract; not overriding procedure Append_Full_Day_Of_Week (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number; Is_Stand_Alone : Boolean) is abstract; not overriding procedure Append_Narrow_Day_Of_Week (Self : Abstract_Printer; Output : in out League.Strings.Universal_String; Date : Julian_Day_Number; Is_Stand_Alone : Boolean) is abstract; type Abstract_Time_Printer is abstract tagged limited null record; not overriding procedure Append_Period (Self : Abstract_Time_Printer; Output : in out League.Strings.Universal_String; Stamp : Relative_Time) is abstract; not overriding procedure Append_Half_Day_Hour (Self : Abstract_Time_Printer; Output : in out League.Strings.Universal_String; Stamp : Relative_Time; Padding : Positive; Zero_Based : Boolean) is abstract; not overriding procedure Append_Full_Day_Hour (Self : Abstract_Time_Printer; Output : in out League.Strings.Universal_String; Stamp : Relative_Time; Padding : Positive; Zero_Based : Boolean) is abstract; not overriding procedure Append_Minute (Self : Abstract_Time_Printer; Output : in out League.Strings.Universal_String; Stamp : Relative_Time; Padding : Positive) is abstract; not overriding procedure Append_Second (Self : Abstract_Time_Printer; Output : in out League.Strings.Universal_String; Time : Relative_Time; Leap : Relative_Time; Padding : Positive) is abstract; not overriding procedure Append_Fractional_Second (Self : Abstract_Time_Printer; Output : in out League.Strings.Universal_String; Time : Relative_Time; Leap : Relative_Time; Padding : Positive) is abstract; not overriding procedure Append_Milliseconds_In_Day (Self : Abstract_Time_Printer; Output : in out League.Strings.Universal_String; Time : Relative_Time; Leap : Relative_Time; Padding : Positive) is abstract; function Image (Pattern : League.Strings.Universal_String; Printer : Abstract_Printer'Class; Time_Printer : Abstract_Time_Printer'Class; Stamp : Absolute_Time; Zone : not null Time_Zone_Access) return League.Strings.Universal_String; end Matreshka.Internals.Calendars.Formatting;
oeis/098/A098021.asm
neoneye/loda-programs
11
9481
; A098021: Positions of 0's in the zero-one sequence [nr+2r]-[nr]-[2r], where r=sqrt(2) and [ ]=floor; see A187967. ; 5,10,17,22,29,34,39,46,51,58,63,68,75,80,87,92,99,104,109,116,121,128,133,138,145,150,157,162,169,174,179,186,191,198,203,208,215,220,227,232,237,244,249,256,261,268,273,278,285,290,297,302,307,314,319,326,331,338,343,348,355,360,367,372,377,384,389,396,401,406,413,418,425,430,437,442,447,454,459,466,471,476,483,488,495,500,507,512,517,524,529,536,541,546,553,558,565,570,577,582 max $2,$0 mov $3,$0 seq $0,87057 ; Smallest number whose square is larger than 2*n^2. add $0,$2 mul $0,2 add $0,$3 add $0,1
list0/task2/src/linear_search.adb
luk9400/nsi
0
17290
package body Linear_Search with SPARK_Mode is function Search (A : Ar; I : Integer) return T is begin for Index in T range Ar'First .. Ar'Last loop if A (Index) = I then return Index; else null; end if; end loop; return 0; end Search; end Linear_Search;
src/fot/FOL/SchemataATP.agda
asr/fotc
11
4769
------------------------------------------------------------------------------ -- Examples of translation of logical schemata ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module FOL.SchemataATP where open import FOL.Base ------------------------------------------------------------------------------ module NonSchemas where postulate A B C : Set A¹ : D → Set A² B² : D → D → Set A³ B³ C³ : D → D → D → Set postulate id : A → A {-# ATP prove id #-} postulate id¹ : ∀ {x} → A¹ x → A¹ x {-# ATP prove id¹ #-} postulate id² : ∀ {x y} → A² x y → A² x y {-# ATP prove id² #-} postulate ∨-comm : A ∨ B → B ∨ A {-# ATP prove ∨-comm #-} postulate ∨-comm² : ∀ {x y} → A² x y ∨ B² x y → B² x y ∨ A² x y {-# ATP prove ∨-comm² #-} postulate ∧∨-dist : A ∧ (B ∨ C) ↔ A ∧ B ∨ A ∧ C {-# ATP prove ∧∨-dist #-} postulate ∧∨-dist³ : ∀ {x y z} → (A³ x y z ∧ (B³ x y z ∨ C³ x y z)) ↔ (A³ x y z ∧ B³ x y z ∨ A³ x y z ∧ C³ x y z) {-# ATP prove ∧∨-dist³ #-} module Schemas where postulate id : {A : Set} → A → A {-# ATP prove id #-} postulate id¹ : {A¹ : D → Set} → ∀ {x} → A¹ x → A¹ x {-# ATP prove id¹ #-} postulate id² : {A² : D → D → Set} → ∀ {x y} → A² x y → A² x y {-# ATP prove id² #-} postulate ∨-comm : {A B : Set} → A ∨ B → A ∨ B {-# ATP prove ∨-comm #-} postulate ∨-comm² : {A² B² : D → D → Set} → ∀ {x y} → A² x y ∨ B² x y → B² x y ∨ A² x y {-# ATP prove ∨-comm² #-} postulate ∧∨-dist : {A B C : Set} → A ∧ (B ∨ C) ↔ A ∧ B ∨ A ∧ C {-# ATP prove ∧∨-dist #-} postulate ∧∨-dist³ : {A³ B³ C³ : D → D → D → Set} → ∀ {x y z} → (A³ x y z ∧ (B³ x y z ∨ C³ x y z)) ↔ (A³ x y z ∧ B³ x y z ∨ A³ x y z ∧ C³ x y z) {-# ATP prove ∧∨-dist³ #-} module SchemaInstances where -- A schema -- Current translation: ∀ p q x. app(p,x) → app(q,x). postulate schema : (A B : D → Set) → ∀ {x} → A x → B x -- Using the current translation, the ATPs can prove an instance of -- the schema. postulate d : D A B : D → Set instanceC : A d → B d {-# ATP prove instanceC schema #-}
ga_ref_impl/src/metric.ads
rogermc2/GA_Ada
3
16897
with GA_Maths; package Metric is use GA_Maths.Float_Array_Package; type Metric_Record (Dim : Integer) is private; subtype Metric_Matrix is GA_Maths.Float_Matrix; type Metric_Data is array (Integer range <>) of float; Null_Metric : constant Metric_Matrix (1 .. 0, 1 .. 0) := (others => (others => 0.0)); Metric_Exception : Exception; function C3_Eigen_Matrix return Metric_Matrix; function C3_Inv_Eigen_Matrix return Metric_Matrix; function E3_Eigen_Matrix return Metric_Matrix; function E3_Inv_Eigen_Matrix return Metric_Matrix; function Inv_Eigen_Matrix (Met : Metric_Record) return Metric_Matrix; function Eigen_Vectors (Met : Metric_Record) return Metric_Matrix; function Eigen_Values (Met : Metric_Record) return Real_Vector; function Is_Anti_Euclidean (Met : Metric_Record) return Boolean; function Is_Diagonal (Met : Metric_Record) return Boolean; function Is_Euclidean (Met : Metric_Record) return Boolean; function Matrix (Met : Metric_Record) return Metric_Matrix; function C3_Metric return Metric_Record; function E3_Metric return Metric_Record; function New_Metric (Dimension : Integer) return Metric_Matrix; function New_Metric (Dimension : Integer; Data : Metric_Data) return Metric_Matrix; function New_Metric (Met : Metric_Matrix) return Metric_Record; private type Metric_Record (Dim : Integer) is record Matrix : Metric_Matrix (1 .. Dim, 1 .. Dim) := (others => (others => 0.0)); Diagonal : Boolean := False; Euclidean : Boolean := False; Anti_Euclidean : Boolean := False; Eigen_Values : Real_Vector (1 .. Dim); -- m_eigenMetric Eigen_Vectors : Metric_Matrix (1 .. Dim, 1 .. Dim); -- m_eig.getV() Inv_Eigen_Matrix : Metric_Matrix (1 .. Dim, 1 .. Dim); -- m_invEigMatrix end record; end Metric;
computer_architecture/clock/clock.asm
yisonPylkita/studies
0
26649
<reponame>yisonPylkita/studies HOURS EQU 07Ch MINUTES EQU 07Dh SECONDS EQU 07Eh TICKS EQU 07Fh HOURS_MEM EQU 2002h MINUTES_MEM EQU 2001h SECONDS_MEM EQU 2000h ;CRYSTAL EQU 11059200 ;The crystal speed TMRCYCLE EQU 12 ;The number of crystal cycles per timer increment ;TMR_SEC EQU 921600 ;The # of timer increments per second F20TH_OF_SECOND EQU 46080 RESET_VALUE EQU 19456 ORG 0000h LJMP MAIN ORG 001Bh ;This is where Timer 1 Interrupt Routine starts PUSH ACC ;We'll use the accumulator, so we need to protect it PUSH PSW ;We may modify PSW flags, so we need to protect it CLR TR1 ;Turn off timer 1 as we reset the value MOV TH1,#HIGH RESET_VALUE ;Set the high byte of the reset value MOV TL1,#LOW RESET_VALUE ;Set the low byte of the reset value SETB TR1 ;Restart timer 1 now that it has been initialized DJNZ TICKS,EXIT_RTC ;Decrement TICKS, if not yet zero we exit immediately MOV TICKS,#20 ;Reset the ticks variable INC SECONDS ;Increment the second varaiable MOV A,SECONDS ;Move the seconds variable into the accumulator MOV DPTR,#SECONDS_MEM MOVX @DPTR,A CJNE A,#60,EXIT_RTC ;If we haven't counted 60 seconds, we're done. MOV SECONDS,#0 ;Reset the seconds varaible MOV A,SECONDS MOVX @DPTR,A INC MINUTES ;Increment the number of minutes MOV A,MINUTES ;Move the minutes variable into the accumulator MOV DPTR,#MINUTES_MEM MOVX @DPTR,A CJNE A,#60,EXIT_RTC ;If we haven't counted 60 minutes, we're done MOV MINUTES,#0 ;Reset the minutes variable MOV A,MINUTES MOVX @DPTR,A INC HOURS ;Increment the hour variable MOV A,HOURS ;Move the hours variable into the accumulator MOV DPTR,#HOURS_MEM MOVX @DPTR,A CJNE A,#24,EXIT_RTC ;If we haven't counted 24 hours, we're done MOV HOURS,#0 ;Reset the hours variable MOV A,HOURS MOVX @DPTR,A EXIT_RTC: POP PSW ;Restore the PSW register POP ACC ;Restore the accumulator RETI ;Exit the interrupt routine MAIN: MOV TH1,#HIGH RESET_VALUE ;Initialize timer high-byte MOV TL1,#LOW RESET_VALUE ;Initialize timer low-byte MOV TMOD,#10h ;Set timer 1 to 16-bit mode SETB TR1 ;Start timer 1 running MOV HOURS,#00 ;Initialize to 0 hours MOV MINUTES,#00 ;Initialize to 0 minutes MOV SECONDS,#00 ;Initialize to 0 seconds MOV TICKS,#20 ;Initialize countdown tick counter to 20 SETB EA ;Initialize interrupts SETB ET1 ;Initialize Timer 1 interrupt LOOP: LJMP LOOP END
change date & version number.applescript
AlexanderGalen/applescripts
3
2805
--gets current date set {year:y, month:m, day:d} to (current date) set m to m * 1 set thisdate to m & "/" & d & "/" & y as string tell application "QuarkXPress" tell document 1 set word 5 of story 1 of text box "Proof Sheet Info" to thisdate set proofSheetInfoText to story 1 of text box "Proof Sheet Info" set AppleScript's text item delimiters to "." set oldVersionNumber to last text item of proofSheetInfoText set newVersionNumber to oldVersionNumber + 1 set theseTextItems to text items of proofSheetInfoText set last item of theseTextItems to newVersionNumber set proofSheetInfoText to theseTextItems as string set story 1 of text box "Proof Sheet Info" to proofSheetInfoText end tell end tell
Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2.log_15903_254.asm
ljhsiun2/medusa
9
178030
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r14 push %r15 push %rax push %rbp push %rcx push %rdi push %rsi lea addresses_WC_ht+0x1b5ae, %r14 nop nop nop nop cmp $62303, %r15 mov (%r14), %r12w nop nop nop cmp %rbp, %rbp lea addresses_UC_ht+0xf42e, %rsi lea addresses_WT_ht+0x407c, %rdi nop nop nop xor $15157, %rax mov $38, %rcx rep movsq nop nop cmp %rcx, %rcx lea addresses_D_ht+0x915e, %rdi nop nop and $5230, %r12 movb (%rdi), %r15b nop cmp %r14, %r14 lea addresses_WT_ht+0x1051e, %rsi lea addresses_normal_ht+0x1d91e, %rdi clflush (%rsi) clflush (%rdi) sub %r14, %r14 mov $61, %rcx rep movsw nop nop nop nop nop add $6009, %r12 lea addresses_WC_ht+0x1391e, %r12 nop add %rdi, %rdi and $0xffffffffffffffc0, %r12 vmovntdqa (%r12), %ymm4 vextracti128 $1, %ymm4, %xmm4 vpextrq $0, %xmm4, %rcx nop nop nop nop dec %rax pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r15 pop %r14 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r15 push %r8 push %rbp push %rsi // Store lea addresses_PSE+0xa6cd, %r10 cmp $12294, %rsi mov $0x5152535455565758, %r8 movq %r8, %xmm4 vmovaps %ymm4, (%r10) and %r15, %r15 // Faulty Load lea addresses_UC+0x351e, %rsi nop and $13417, %rbp mov (%rsi), %r11d lea oracles, %r8 and $0xff, %r11 shlq $12, %r11 mov (%r8,%r11,1), %r11 pop %rsi pop %rbp pop %r8 pop %r15 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'size': 1, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 32, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': False, 'NT': True, 'congruent': 9, 'same': False}} {'00': 15903} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
target/cos_117/disasm/iop_overlay1/TRCLN.asm
jrrk2/cray-sim
49
29333
0x0000 (0x000000) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0001 (0x000002) 0x291A- f:00024 d: 282 | OR[282] = A 0x0002 (0x000004) 0x211A- f:00020 d: 282 | A = OR[282] 0x0003 (0x000006) 0x863E- f:00103 d: 62 | P = P + 62 (0x0041), A # 0 0x0004 (0x000008) 0x1018- f:00010 d: 24 | A = 24 (0x0018) 0x0005 (0x00000A) 0x2925- f:00024 d: 293 | OR[293] = A 0x0006 (0x00000C) 0x1004- f:00010 d: 4 | A = 4 (0x0004) 0x0007 (0x00000E) 0x1410- f:00012 d: 16 | A = A + 16 (0x0010) 0x0008 (0x000010) 0x2926- f:00024 d: 294 | OR[294] = A 0x0009 (0x000012) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x000A (0x000014) 0x2927- f:00024 d: 295 | OR[295] = A 0x000B (0x000016) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x000C (0x000018) 0x2928- f:00024 d: 296 | OR[296] = A 0x000D (0x00001A) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x000E (0x00001C) 0x2929- f:00024 d: 297 | OR[297] = A 0x000F (0x00001E) 0x111A- f:00010 d: 282 | A = 282 (0x011A) 0x0010 (0x000020) 0x292A- f:00024 d: 298 | OR[298] = A 0x0011 (0x000022) 0x1125- f:00010 d: 293 | A = 293 (0x0125) 0x0012 (0x000024) 0x5800- f:00054 d: 0 | B = A 0x0013 (0x000026) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0014 (0x000028) 0x7C09- f:00076 d: 9 | R = OR[9] 0x0015 (0x00002A) 0x8602- f:00103 d: 2 | P = P + 2 (0x0017), A # 0 0x0016 (0x00002C) 0x702A- f:00070 d: 42 | P = P + 42 (0x0040) 0x0017 (0x00002E) 0x2006- f:00020 d: 6 | A = OR[6] 0x0018 (0x000030) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002) 0x0019 (0x000032) 0x2908- f:00024 d: 264 | OR[264] = A 0x001A (0x000034) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x001B (0x000036) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F) 0x001C (0x000038) 0x290D- f:00024 d: 269 | OR[269] = A 0x001D (0x00003A) 0x210D- f:00020 d: 269 | A = OR[269] 0x001E (0x00003C) 0x2924- f:00024 d: 292 | OR[292] = A 0x001F (0x00003E) 0x1008- f:00010 d: 8 | A = 8 (0x0008) 0x0020 (0x000040) 0x290D- f:00024 d: 269 | OR[269] = A 0x0021 (0x000042) 0x210D- f:00020 d: 269 | A = OR[269] 0x0022 (0x000044) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F) 0x0023 (0x000046) 0x290D- f:00024 d: 269 | OR[269] = A 0x0024 (0x000048) 0x2006- f:00020 d: 6 | A = OR[6] 0x0025 (0x00004A) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002) 0x0026 (0x00004C) 0x2908- f:00024 d: 264 | OR[264] = A 0x0027 (0x00004E) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x0028 (0x000050) 0x1A00-0xFFF0 f:00015 d: 0 | A = A & 65520 (0xFFF0) 0x002A (0x000054) 0x250D- f:00022 d: 269 | A = A + OR[269] 0x002B (0x000056) 0x3908- f:00034 d: 264 | (OR[264]) = A 0x002C (0x000058) 0x1004- f:00010 d: 4 | A = 4 (0x0004) 0x002D (0x00005A) 0x2925- f:00024 d: 293 | OR[293] = A 0x002E (0x00005C) 0x1125- f:00010 d: 293 | A = 293 (0x0125) 0x002F (0x00005E) 0x5800- f:00054 d: 0 | B = A 0x0030 (0x000060) 0x1800-0x1B18 f:00014 d: 0 | A = 6936 (0x1B18) 0x0032 (0x000064) 0x7C09- f:00076 d: 9 | R = OR[9] 0x0033 (0x000066) 0x2124- f:00020 d: 292 | A = OR[292] 0x0034 (0x000068) 0x290D- f:00024 d: 269 | OR[269] = A 0x0035 (0x00006A) 0x210D- f:00020 d: 269 | A = OR[269] 0x0036 (0x00006C) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F) 0x0037 (0x00006E) 0x290D- f:00024 d: 269 | OR[269] = A 0x0038 (0x000070) 0x2006- f:00020 d: 6 | A = OR[6] 0x0039 (0x000072) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002) 0x003A (0x000074) 0x2908- f:00024 d: 264 | OR[264] = A 0x003B (0x000076) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x003C (0x000078) 0x1A00-0xFFF0 f:00015 d: 0 | A = A & 65520 (0xFFF0) 0x003E (0x00007C) 0x250D- f:00022 d: 269 | A = A + OR[269] 0x003F (0x00007E) 0x3908- f:00034 d: 264 | (OR[264]) = A 0x0040 (0x000080) 0x723E- f:00071 d: 62 | P = P - 62 (0x0002) 0x0041 (0x000082) 0x211A- f:00020 d: 282 | A = OR[282] 0x0042 (0x000084) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004) 0x0043 (0x000086) 0x291B- f:00024 d: 283 | OR[283] = A 0x0044 (0x000088) 0x1005- f:00010 d: 5 | A = 5 (0x0005) 0x0045 (0x00008A) 0x2923- f:00024 d: 291 | OR[291] = A 0x0046 (0x00008C) 0x2119- f:00020 d: 281 | A = OR[281] 0x0047 (0x00008E) 0x160C- f:00013 d: 12 | A = A - 12 (0x000C) 0x0048 (0x000090) 0x8602- f:00103 d: 2 | P = P + 2 (0x004A), A # 0 0x0049 (0x000092) 0x2F23- f:00027 d: 291 | OR[291] = OR[291] - 1 0x004A (0x000094) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x004B (0x000096) 0x291D- f:00024 d: 285 | OR[285] = A 0x004C (0x000098) 0x211D- f:00020 d: 285 | A = OR[285] 0x004D (0x00009A) 0x2723- f:00023 d: 291 | A = A - OR[291] 0x004E (0x00009C) 0x8434- f:00102 d: 52 | P = P + 52 (0x0082), A = 0 0x004F (0x00009E) 0x1027- f:00010 d: 39 | A = 39 (0x0027) 0x0050 (0x0000A0) 0x291F- f:00024 d: 287 | OR[287] = A 0x0051 (0x0000A2) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0052 (0x0000A4) 0x2920- f:00024 d: 288 | OR[288] = A 0x0053 (0x0000A6) 0x2921- f:00024 d: 289 | OR[289] = A 0x0054 (0x0000A8) 0x7470- f:00072 d: 112 | R = P + 112 (0x00C4) 0x0055 (0x0000AA) 0x2122- f:00020 d: 290 | A = OR[290] 0x0056 (0x0000AC) 0x8602- f:00103 d: 2 | P = P + 2 (0x0058), A # 0 0x0057 (0x0000AE) 0x7029- f:00070 d: 41 | P = P + 41 (0x0080) 0x0058 (0x0000B0) 0x211B- f:00020 d: 283 | A = OR[283] 0x0059 (0x0000B2) 0x2920- f:00024 d: 288 | OR[288] = A 0x005A (0x0000B4) 0x1018- f:00010 d: 24 | A = 24 (0x0018) 0x005B (0x0000B6) 0x2921- f:00024 d: 289 | OR[289] = A 0x005C (0x0000B8) 0x1004- f:00010 d: 4 | A = 4 (0x0004) 0x005D (0x0000BA) 0x291F- f:00024 d: 287 | OR[287] = A 0x005E (0x0000BC) 0x7466- f:00072 d: 102 | R = P + 102 (0x00C4) 0x005F (0x0000BE) 0x2122- f:00020 d: 290 | A = OR[290] 0x0060 (0x0000C0) 0x8602- f:00103 d: 2 | P = P + 2 (0x0062), A # 0 0x0061 (0x0000C2) 0x7006- f:00070 d: 6 | P = P + 6 (0x0067) 0x0062 (0x0000C4) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0063 (0x0000C6) 0x291C- f:00024 d: 284 | OR[284] = A 0x0064 (0x0000C8) 0x7478- f:00072 d: 120 | R = P + 120 (0x00DC) 0x0065 (0x0000CA) 0x2122- f:00020 d: 290 | A = OR[290] 0x0066 (0x0000CC) 0x8648- f:00103 d: 72 | P = P + 72 (0x00AE), A # 0 0x0067 (0x0000CE) 0x100C- f:00010 d: 12 | A = 12 (0x000C) 0x0068 (0x0000D0) 0x2922- f:00024 d: 290 | OR[290] = A 0x0069 (0x0000D2) 0x100F- f:00010 d: 15 | A = 15 (0x000F) 0x006A (0x0000D4) 0x2722- f:00023 d: 290 | A = A - OR[290] 0x006B (0x0000D6) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F) 0x006C (0x0000D8) 0x5800- f:00054 d: 0 | B = A 0x006D (0x0000DA) 0x2122- f:00020 d: 290 | A = OR[290] 0x006E (0x0000DC) 0x0804- f:00004 d: 4 | A = A > 4 (0x0004) 0x006F (0x0000DE) 0x251B- f:00022 d: 283 | A = A + OR[283] 0x0070 (0x0000E0) 0x290D- f:00024 d: 269 | OR[269] = A 0x0071 (0x0000E2) 0x310D- f:00030 d: 269 | A = (OR[269]) 0x0072 (0x0000E4) 0x4800- f:00044 d: 0 | A = A > B 0x0073 (0x0000E6) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001) 0x0074 (0x0000E8) 0x291E- f:00024 d: 286 | OR[286] = A 0x0075 (0x0000EA) 0x211E- f:00020 d: 286 | A = OR[286] 0x0076 (0x0000EC) 0x8402- f:00102 d: 2 | P = P + 2 (0x0078), A = 0 0x0077 (0x0000EE) 0x7007- f:00070 d: 7 | P = P + 7 (0x007E) 0x0078 (0x0000F0) 0x211B- f:00020 d: 283 | A = OR[283] 0x0079 (0x0000F2) 0x291C- f:00024 d: 284 | OR[284] = A 0x007A (0x0000F4) 0x7462- f:00072 d: 98 | R = P + 98 (0x00DC) 0x007B (0x0000F6) 0x2122- f:00020 d: 290 | A = OR[290] 0x007C (0x0000F8) 0x8632- f:00103 d: 50 | P = P + 50 (0x00AE), A # 0 0x007D (0x0000FA) 0x7002- f:00070 d: 2 | P = P + 2 (0x007F) 0x007E (0x0000FC) 0x7004- f:00070 d: 4 | P = P + 4 (0x0082) 0x007F (0x0000FE) 0x7002- f:00070 d: 2 | P = P + 2 (0x0081) 0x0080 (0x000100) 0x2D1D- f:00026 d: 285 | OR[285] = OR[285] + 1 0x0081 (0x000102) 0x7235- f:00071 d: 53 | P = P - 53 (0x004C) 0x0082 (0x000104) 0x2119- f:00020 d: 281 | A = OR[281] 0x0083 (0x000106) 0x1602- f:00013 d: 2 | A = A - 2 (0x0002) 0x0084 (0x000108) 0x8402- f:00102 d: 2 | P = P + 2 (0x0086), A = 0 0x0085 (0x00010A) 0x7006- f:00070 d: 6 | P = P + 6 (0x008B) 0x0086 (0x00010C) 0x211D- f:00020 d: 285 | A = OR[285] 0x0087 (0x00010E) 0x8602- f:00103 d: 2 | P = P + 2 (0x0089), A # 0 0x0088 (0x000110) 0x7002- f:00070 d: 2 | P = P + 2 (0x008A) 0x0089 (0x000112) 0x2F1D- f:00027 d: 285 | OR[285] = OR[285] - 1 0x008A (0x000114) 0x7002- f:00070 d: 2 | P = P + 2 (0x008C) 0x008B (0x000116) 0x2D1D- f:00026 d: 285 | OR[285] = OR[285] + 1 0x008C (0x000118) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x008D (0x00011A) 0x2922- f:00024 d: 290 | OR[290] = A 0x008E (0x00011C) 0x211D- f:00020 d: 285 | A = OR[285] 0x008F (0x00011E) 0x841F- f:00102 d: 31 | P = P + 31 (0x00AE), A = 0 0x0090 (0x000120) 0x1037- f:00010 d: 55 | A = 55 (0x0037) 0x0091 (0x000122) 0x291F- f:00024 d: 287 | OR[287] = A 0x0092 (0x000124) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0093 (0x000126) 0x2920- f:00024 d: 288 | OR[288] = A 0x0094 (0x000128) 0x2921- f:00024 d: 289 | OR[289] = A 0x0095 (0x00012A) 0x742F- f:00072 d: 47 | R = P + 47 (0x00C4) 0x0096 (0x00012C) 0x2122- f:00020 d: 290 | A = OR[290] 0x0097 (0x00012E) 0x8602- f:00103 d: 2 | P = P + 2 (0x0099), A # 0 0x0098 (0x000130) 0x7014- f:00070 d: 20 | P = P + 20 (0x00AC) 0x0099 (0x000132) 0x211B- f:00020 d: 283 | A = OR[283] 0x009A (0x000134) 0x2920- f:00024 d: 288 | OR[288] = A 0x009B (0x000136) 0x1018- f:00010 d: 24 | A = 24 (0x0018) 0x009C (0x000138) 0x2921- f:00024 d: 289 | OR[289] = A 0x009D (0x00013A) 0x1004- f:00010 d: 4 | A = 4 (0x0004) 0x009E (0x00013C) 0x291F- f:00024 d: 287 | OR[287] = A 0x009F (0x00013E) 0x7425- f:00072 d: 37 | R = P + 37 (0x00C4) 0x00A0 (0x000140) 0x2122- f:00020 d: 290 | A = OR[290] 0x00A1 (0x000142) 0x8402- f:00102 d: 2 | P = P + 2 (0x00A3), A = 0 0x00A2 (0x000144) 0x7004- f:00070 d: 4 | P = P + 4 (0x00A6) 0x00A3 (0x000146) 0x211B- f:00020 d: 283 | A = OR[283] 0x00A4 (0x000148) 0x291C- f:00024 d: 284 | OR[284] = A 0x00A5 (0x00014A) 0x7003- f:00070 d: 3 | P = P + 3 (0x00A8) 0x00A6 (0x00014C) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x00A7 (0x00014E) 0x291C- f:00024 d: 284 | OR[284] = A 0x00A8 (0x000150) 0x7434- f:00072 d: 52 | R = P + 52 (0x00DC) 0x00A9 (0x000152) 0x2122- f:00020 d: 290 | A = OR[290] 0x00AA (0x000154) 0x8604- f:00103 d: 4 | P = P + 4 (0x00AE), A # 0 0x00AB (0x000156) 0x7002- f:00070 d: 2 | P = P + 2 (0x00AD) 0x00AC (0x000158) 0x2F1D- f:00027 d: 285 | OR[285] = OR[285] - 1 0x00AD (0x00015A) 0x721F- f:00071 d: 31 | P = P - 31 (0x008E) 0x00AE (0x00015C) 0x211A- f:00020 d: 282 | A = OR[282] 0x00AF (0x00015E) 0x8602- f:00103 d: 2 | P = P + 2 (0x00B1), A # 0 0x00B0 (0x000160) 0x7009- f:00070 d: 9 | P = P + 9 (0x00B9) 0x00B1 (0x000162) 0x1019- f:00010 d: 25 | A = 25 (0x0019) 0x00B2 (0x000164) 0x2925- f:00024 d: 293 | OR[293] = A 0x00B3 (0x000166) 0x211A- f:00020 d: 282 | A = OR[282] 0x00B4 (0x000168) 0x2926- f:00024 d: 294 | OR[294] = A 0x00B5 (0x00016A) 0x1125- f:00010 d: 293 | A = 293 (0x0125) 0x00B6 (0x00016C) 0x5800- f:00054 d: 0 | B = A 0x00B7 (0x00016E) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x00B8 (0x000170) 0x7C09- f:00076 d: 9 | R = OR[9] 0x00B9 (0x000172) 0x2005- f:00020 d: 5 | A = OR[5] 0x00BA (0x000174) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006) 0x00BB (0x000176) 0x2908- f:00024 d: 264 | OR[264] = A 0x00BC (0x000178) 0x2122- f:00020 d: 290 | A = OR[290] 0x00BD (0x00017A) 0x3908- f:00034 d: 264 | (OR[264]) = A 0x00BE (0x00017C) 0x102A- f:00010 d: 42 | A = 42 (0x002A) 0x00BF (0x00017E) 0x2925- f:00024 d: 293 | OR[293] = A 0x00C0 (0x000180) 0x1125- f:00010 d: 293 | A = 293 (0x0125) 0x00C1 (0x000182) 0x5800- f:00054 d: 0 | B = A 0x00C2 (0x000184) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x00C3 (0x000186) 0x7C09- f:00076 d: 9 | R = OR[9] 0x00C4 (0x000188) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x00C5 (0x00018A) 0x2925- f:00024 d: 293 | OR[293] = A 0x00C6 (0x00018C) 0x1800-0x0077 f:00014 d: 0 | A = 119 (0x0077) 0x00C8 (0x000190) 0x2926- f:00024 d: 294 | OR[294] = A 0x00C9 (0x000192) 0x211F- f:00020 d: 287 | A = OR[287] 0x00CA (0x000194) 0x2927- f:00024 d: 295 | OR[295] = A 0x00CB (0x000196) 0x2120- f:00020 d: 288 | A = OR[288] 0x00CC (0x000198) 0x2928- f:00024 d: 296 | OR[296] = A 0x00CD (0x00019A) 0x2121- f:00020 d: 289 | A = OR[289] 0x00CE (0x00019C) 0x2929- f:00024 d: 297 | OR[297] = A 0x00CF (0x00019E) 0x2118- f:00020 d: 280 | A = OR[280] 0x00D0 (0x0001A0) 0x292A- f:00024 d: 298 | OR[298] = A 0x00D1 (0x0001A2) 0x211A- f:00020 d: 282 | A = OR[282] 0x00D2 (0x0001A4) 0x292B- f:00024 d: 299 | OR[299] = A 0x00D3 (0x0001A6) 0x1125- f:00010 d: 293 | A = 293 (0x0125) 0x00D4 (0x0001A8) 0x5800- f:00054 d: 0 | B = A 0x00D5 (0x0001AA) 0x1800-0x1B18 f:00014 d: 0 | A = 6936 (0x1B18) 0x00D7 (0x0001AE) 0x7C09- f:00076 d: 9 | R = OR[9] 0x00D8 (0x0001B0) 0x2922- f:00024 d: 290 | OR[290] = A 0x00D9 (0x0001B2) 0x1608- f:00013 d: 8 | A = A - 8 (0x0008) 0x00DA (0x0001B4) 0x8C2C- f:00106 d: 44 | P = P - 44 (0x00AE), A = 0 0x00DB (0x0001B6) 0x0200- f:00001 d: 0 | EXIT 0x00DC (0x0001B8) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x00DD (0x0001BA) 0x2925- f:00024 d: 293 | OR[293] = A 0x00DE (0x0001BC) 0x1800-0x0076 f:00014 d: 0 | A = 118 (0x0076) 0x00E0 (0x0001C0) 0x2926- f:00024 d: 294 | OR[294] = A 0x00E1 (0x0001C2) 0x2118- f:00020 d: 280 | A = OR[280] 0x00E2 (0x0001C4) 0x2927- f:00024 d: 295 | OR[295] = A 0x00E3 (0x0001C6) 0x211C- f:00020 d: 284 | A = OR[284] 0x00E4 (0x0001C8) 0x2928- f:00024 d: 296 | OR[296] = A 0x00E5 (0x0001CA) 0x1125- f:00010 d: 293 | A = 293 (0x0125) 0x00E6 (0x0001CC) 0x5800- f:00054 d: 0 | B = A 0x00E7 (0x0001CE) 0x1800-0x1B18 f:00014 d: 0 | A = 6936 (0x1B18) 0x00E9 (0x0001D2) 0x7C09- f:00076 d: 9 | R = OR[9] 0x00EA (0x0001D4) 0x2922- f:00024 d: 290 | OR[290] = A 0x00EB (0x0001D6) 0x0200- f:00001 d: 0 | EXIT 0x00EC (0x0001D8) 0x0000- f:00000 d: 0 | PASS 0x00ED (0x0001DA) 0x0000- f:00000 d: 0 | PASS 0x00EE (0x0001DC) 0x0000- f:00000 d: 0 | PASS 0x00EF (0x0001DE) 0x0000- f:00000 d: 0 | PASS
Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca.log_4729_1243.asm
ljhsiun2/medusa
9
9668
<filename>Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca.log_4729_1243.asm .global s_prepare_buffers s_prepare_buffers: push %r11 push %r14 push %rcx push %rdi push %rsi lea addresses_normal_ht+0x1d1db, %rsi lea addresses_A_ht+0x1672b, %rdi nop nop nop add %r14, %r14 mov $17, %rcx rep movsq nop nop nop cmp $10081, %rsi lea addresses_A_ht+0x1aa2b, %rdi clflush (%rdi) nop nop nop nop nop and %rcx, %rcx mov $0x6162636465666768, %r11 movq %r11, (%rdi) nop nop nop nop xor $2026, %r14 pop %rsi pop %rdi pop %rcx pop %r14 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r14 push %r8 push %rcx push %rdi push %rdx push %rsi // REPMOV lea addresses_PSE+0xd4ab, %rsi lea addresses_normal+0xae2b, %rdi nop nop nop nop sub %r12, %r12 mov $56, %rcx rep movsq nop nop nop add $60992, %r14 // Store lea addresses_RW+0xea2b, %r14 nop nop sub %rdx, %rdx mov $0x5152535455565758, %rdi movq %rdi, (%r14) nop sub %rcx, %rcx // Load mov $0x418ca10000000949, %rdx nop nop sub %rcx, %rcx mov (%rdx), %si nop nop nop nop add $22858, %rcx // Load lea addresses_PSE+0x132b, %rdx cmp %rsi, %rsi vmovups (%rdx), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $0, %xmm2, %r8 nop sub $52035, %rcx // Store lea addresses_RW+0xea2b, %r12 sub $30473, %rsi movl $0x51525354, (%r12) nop nop nop nop sub %rcx, %rcx // Faulty Load lea addresses_RW+0xea2b, %r12 cmp %rdx, %rdx mov (%r12), %si lea oracles, %rcx and $0xff, %rsi shlq $12, %rsi mov (%rcx,%rsi,1), %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %r8 pop %r14 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'} {'src': {'congruent': 6, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_normal'}} {'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_RW'}} {'src': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'} {'src': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_PSE'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 4, 'NT': False, 'type': 'addresses_RW'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 2, 'NT': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 3, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 8, 'same': True, 'type': 'addresses_A_ht'}} {'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_A_ht'}} {'54': 4729} 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 */
src/servlet-security-oauth.ads
My-Colaborations/ada-servlet
6
13439
<filename>src/servlet-security-oauth.ads<gh_stars>1-10 ----------------------------------------------------------------------- -- servlet-security-oauth - OAuth2 servlets -- Copyright (C) 2018 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Servlet.Core; with Servlet.Requests; with Servlet.Responses; with Security.OAuth.Servers; use Security.OAuth; package Servlet.Security.OAuth is -- The token servlet that grants an access token and refresh token. type Token_Servlet is new Servlet.Core.Servlet with private; -- Called by the servlet container to indicate to a servlet that the servlet -- is being placed into service. overriding procedure Initialize (Server : in out Token_Servlet; Context : in Servlet.Core.Servlet_Registry'Class); -- Set the authorization manager. procedure Set_Auth_Manager (Server : in out Token_Servlet; Manager : in Servers.Auth_Manager_Access); -- Perform the OAuth token request. This is the last step in OAuth flow that allows -- to retrieve an access token and an optional refresh token. This token request is -- used by the following OAuth methods: -- RFC 6749: 4.1.3. Access Token Request -- RFC 6749: 4.3. Resource Owner Password Credentials Grant -- RFC 6749: 4.4. Client Credentials Grant -- RFC 6749: 4.5. Extension Grants overriding procedure Do_Post (Server : in Token_Servlet; Request : in out Servlet.Requests.Request'Class; Response : in out Servlet.Responses.Response'Class); private type Token_Servlet is new Servlet.Core.Servlet with record Manager : Servers.Auth_Manager_Access; end record; end Servlet.Security.OAuth;
open_all_htop/Open All htop.applescript
supermitch/iterm-scripts
0
4177
on open_all_htops(jump_user, box_user, boxes, env) tell application "iTerm" tell current window create tab with default profile end tell # Create sessions. tell current session of current window split vertically with default profile split vertically with default profile end tell tell session 1 of current tab of current window split horizontally with default profile end tell tell session 3 of current tab of current window split horizontally with default profile end tell tell session 5 of current tab of current window split horizontally with default profile end tell # Establish connections & execute actions. repeat with i from 1 to count of boxes tell session i of current tab of current window write text "ssh " & jump_user & "@jumpserver" write text "ssh " & box_user & "@0.0.0." & (item i of boxes) if env is "prod" then write text "echo -n -e \"\\033]6;1;bg;red;brightness;220\\a\"" # Red tab else if env is "staging" then write text "echo -n -e \"\\033]6;1;bg;red;brightness;210\\a\"" # Yellow tab write text "echo -n -e \"\\033]6;1;bg;green;brightness;210\\a\"" end if write text "echo -ne \"\\033]0;Box No." & (item i of boxes) & "\\007\"" # Title is 'Box No. (ip)' write text "htop" end tell end repeat end tell end open_all_htops
programs/oeis/267/A267602.asm
karttu/loda
0
28277
; A267602: Number of unlabeled, connected graphs on n vertices that are prime and have no induced subgraph isomorphic to a bull, a P5 or a P5-bar. ; 0,0,0,1,1,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0 mov $2,6 mov $4,3 mov $6,$0 lpb $0,1 trn $1,6 add $1,4 add $2,$0 mov $3,$5 add $3,$2 trn $1,$3 mov $2,0 sub $6,$4 add $4,$0 sub $4,$0 trn $0,2 add $6,$1 add $1,$4 sub $1,3 add $6,1 mov $4,$6 lpe
alloy4fun_models/trashltl/models/1/FSXZGnSsQwviob6oj.als
Kaixi26/org.alloytools.alloy
0
644
<reponame>Kaixi26/org.alloytools.alloy open main pred idFSXZGnSsQwviob6oj_prop2 { no File until some File' } pred __repair { idFSXZGnSsQwviob6oj_prop2 } check __repair { idFSXZGnSsQwviob6oj_prop2 <=> prop2o }
riddle/ass.asm
etzinis/os_lab_ntua
0
105012
<filename>riddle/ass.asm<gh_stars>0 riddle: file format elf64-x86-64 Disassembly of section .init: 0000000000401170 <.init>: 401170: 48 83 ec 08 sub $0x8,%rsp 401174: e8 5b 04 00 00 callq 4015d4 <socket@plt+0x104> 401179: 48 83 c4 08 add $0x8,%rsp 40117d: c3 retq Disassembly of section .plt: 0000000000401180 <getenv@plt-0x10>: 401180: ff 35 92 50 20 00 pushq 0x205092(%rip) # 606218 <socket@plt+0x204d48> 401186: ff 25 94 50 20 00 jmpq *0x205094(%rip) # 606220 <socket@plt+0x204d50> 40118c: 0f 1f 40 00 nopl 0x0(%rax) 0000000000401190 <getenv@plt>: 401190: ff 25 92 50 20 00 jmpq *0x205092(%rip) # 606228 <socket@plt+0x204d58> 401196: 68 00 00 00 00 pushq $0x0 40119b: e9 e0 ff ff ff jmpq 401180 <getenv@plt-0x10> 00000000004011a0 <__errno_location@plt>: 4011a0: ff 25 8a 50 20 00 jmpq *0x20508a(%rip) # 606230 <socket@plt+0x204d60> 4011a6: 68 01 00 00 00 pushq $0x1 4011ab: e9 d0 ff ff ff jmpq 401180 <getenv@plt-0x10> 00000000004011b0 <unlink@plt>: 4011b0: ff 25 82 50 20 00 jmpq *0x205082(%rip) # 606238 <socket@plt+0x204d68> 4011b6: 68 02 00 00 00 pushq $0x2 4011bb: e9 c0 ff ff ff jmpq 401180 <getenv@plt-0x10> 00000000004011c0 <puts@plt>: 4011c0: ff 25 7a 50 20 00 jmpq *0x20507a(%rip) # 606240 <socket@plt+0x204d70> 4011c6: 68 03 00 00 00 pushq $0x3 4011cb: e9 b0 ff ff ff jmpq 401180 <getenv@plt-0x10> 00000000004011d0 <fcntl@plt>: 4011d0: ff 25 72 50 20 00 jmpq *0x205072(%rip) # 606248 <socket@plt+0x204d78> 4011d6: 68 04 00 00 00 pushq $0x4 4011db: e9 a0 ff ff ff jmpq 401180 <getenv@plt-0x10> 00000000004011e0 <write@plt>: 4011e0: ff 25 6a 50 20 00 jmpq *0x20506a(%rip) # 606250 <socket@plt+0x204d80> 4011e6: 68 05 00 00 00 pushq $0x5 4011eb: e9 90 ff ff ff jmpq 401180 <getenv@plt-0x10> 00000000004011f0 <getpid@plt>: 4011f0: ff 25 62 50 20 00 jmpq *0x205062(%rip) # 606258 <socket@plt+0x204d88> 4011f6: 68 06 00 00 00 pushq $0x6 4011fb: e9 80 ff ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401200 <strlen@plt>: 401200: ff 25 5a 50 20 00 jmpq *0x20505a(%rip) # 606260 <socket@plt+0x204d90> 401206: 68 07 00 00 00 pushq $0x7 40120b: e9 70 ff ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401210 <__lxstat@plt>: 401210: ff 25 52 50 20 00 jmpq *0x205052(%rip) # 606268 <socket@plt+0x204d98> 401216: 68 08 00 00 00 pushq $0x8 40121b: e9 60 ff ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401220 <mmap@plt>: 401220: ff 25 4a 50 20 00 jmpq *0x20504a(%rip) # 606270 <socket@plt+0x204da0> 401226: 68 09 00 00 00 pushq $0x9 40122b: e9 50 ff ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401230 <printf@plt>: 401230: ff 25 42 50 20 00 jmpq *0x205042(%rip) # 606278 <socket@plt+0x204da8> 401236: 68 0a 00 00 00 pushq $0xa 40123b: e9 40 ff ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401240 <ftruncate@plt>: 401240: ff 25 3a 50 20 00 jmpq *0x20503a(%rip) # 606280 <socket@plt+0x204db0> 401246: 68 0b 00 00 00 pushq $0xb 40124b: e9 30 ff ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401250 <lseek@plt>: 401250: ff 25 32 50 20 00 jmpq *0x205032(%rip) # 606288 <socket@plt+0x204db8> 401256: 68 0c 00 00 00 pushq $0xc 40125b: e9 20 ff ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401260 <gettimeofday@plt>: 401260: ff 25 2a 50 20 00 jmpq *0x20502a(%rip) # 606290 <socket@plt+0x204dc0> 401266: 68 0d 00 00 00 pushq $0xd 40126b: e9 10 ff ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401270 <fputs@plt>: 401270: ff 25 22 50 20 00 jmpq *0x205022(%rip) # 606298 <socket@plt+0x204dc8> 401276: 68 0e 00 00 00 pushq $0xe 40127b: e9 00 ff ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401280 <memset@plt>: 401280: ff 25 1a 50 20 00 jmpq *0x20501a(%rip) # 6062a0 <socket@plt+0x204dd0> 401286: 68 0f 00 00 00 pushq $0xf 40128b: e9 f0 fe ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401290 <alarm@plt>: 401290: ff 25 12 50 20 00 jmpq *0x205012(%rip) # 6062a8 <socket@plt+0x204dd8> 401296: 68 10 00 00 00 pushq $0x10 40129b: e9 e0 fe ff ff jmpq 401180 <getenv@plt-0x10> 00000000004012a0 <close@plt>: 4012a0: ff 25 0a 50 20 00 jmpq *0x20500a(%rip) # 6062b0 <socket@plt+0x204de0> 4012a6: 68 11 00 00 00 pushq $0x11 4012ab: e9 d0 fe ff ff jmpq 401180 <getenv@plt-0x10> 00000000004012b0 <read@plt>: 4012b0: ff 25 02 50 20 00 jmpq *0x205002(%rip) # 6062b8 <socket@plt+0x204de8> 4012b6: 68 12 00 00 00 pushq $0x12 4012bb: e9 c0 fe ff ff jmpq 401180 <getenv@plt-0x10> 00000000004012c0 <__libc_start_main@plt>: 4012c0: ff 25 fa 4f 20 00 jmpq *0x204ffa(%rip) # 6062c0 <socket@plt+0x204df0> 4012c6: 68 13 00 00 00 pushq $0x13 4012cb: e9 b0 fe ff ff jmpq 401180 <getenv@plt-0x10> 00000000004012d0 <srand@plt>: 4012d0: ff 25 f2 4f 20 00 jmpq *0x204ff2(%rip) # 6062c8 <socket@plt+0x204df8> 4012d6: 68 14 00 00 00 pushq $0x14 4012db: e9 a0 fe ff ff jmpq 401180 <getenv@plt-0x10> 00000000004012e0 <memcmp@plt>: 4012e0: ff 25 ea 4f 20 00 jmpq *0x204fea(%rip) # 6062d0 <socket@plt+0x204e00> 4012e6: 68 15 00 00 00 pushq $0x15 4012eb: e9 90 fe ff ff jmpq 401180 <getenv@plt-0x10> 00000000004012f0 <fgets@plt>: 4012f0: ff 25 e2 4f 20 00 jmpq *0x204fe2(%rip) # 6062d8 <socket@plt+0x204e08> 4012f6: 68 16 00 00 00 pushq $0x16 4012fb: e9 80 fe ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401300 <memcpy@plt>: 401300: ff 25 da 4f 20 00 jmpq *0x204fda(%rip) # 6062e0 <socket@plt+0x204e10> 401306: 68 17 00 00 00 pushq $0x17 40130b: e9 70 fe ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401310 <signal@plt>: 401310: ff 25 d2 4f 20 00 jmpq *0x204fd2(%rip) # 6062e8 <socket@plt+0x204e18> 401316: 68 18 00 00 00 pushq $0x18 40131b: e9 60 fe ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401320 <fprintf@plt>: 401320: ff 25 ca 4f 20 00 jmpq *0x204fca(%rip) # 6062f0 <socket@plt+0x204e20> 401326: 68 19 00 00 00 pushq $0x19 40132b: e9 50 fe ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401330 <syscall@plt>: 401330: ff 25 c2 4f 20 00 jmpq *0x204fc2(%rip) # 6062f8 <socket@plt+0x204e28> 401336: 68 1a 00 00 00 pushq $0x1a 40133b: e9 40 fe ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401340 <strtol@plt>: 401340: ff 25 ba 4f 20 00 jmpq *0x204fba(%rip) # 606300 <socket@plt+0x204e30> 401346: 68 1b 00 00 00 pushq $0x1b 40134b: e9 30 fe ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401350 <kill@plt>: 401350: ff 25 b2 4f 20 00 jmpq *0x204fb2(%rip) # 606308 <socket@plt+0x204e38> 401356: 68 1c 00 00 00 pushq $0x1c 40135b: e9 20 fe ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401360 <time@plt>: 401360: ff 25 aa 4f 20 00 jmpq *0x204faa(%rip) # 606310 <socket@plt+0x204e40> 401366: 68 1d 00 00 00 pushq $0x1d 40136b: e9 10 fe ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401370 <inet_aton@plt>: 401370: ff 25 a2 4f 20 00 jmpq *0x204fa2(%rip) # 606318 <socket@plt+0x204e48> 401376: 68 1e 00 00 00 pushq $0x1e 40137b: e9 00 fe ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401380 <dlopen@plt>: 401380: ff 25 9a 4f 20 00 jmpq *0x204f9a(%rip) # 606320 <socket@plt+0x204e50> 401386: 68 1f 00 00 00 pushq $0x1f 40138b: e9 f0 fd ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401390 <pause@plt>: 401390: ff 25 92 4f 20 00 jmpq *0x204f92(%rip) # 606328 <socket@plt+0x204e58> 401396: 68 20 00 00 00 pushq $0x20 40139b: e9 e0 fd ff ff jmpq 401180 <getenv@plt-0x10> 00000000004013a0 <malloc@plt>: 4013a0: ff 25 8a 4f 20 00 jmpq *0x204f8a(%rip) # 606330 <socket@plt+0x204e60> 4013a6: 68 21 00 00 00 pushq $0x21 4013ab: e9 d0 fd ff ff jmpq 401180 <getenv@plt-0x10> 00000000004013b0 <fflush@plt>: 4013b0: ff 25 82 4f 20 00 jmpq *0x204f82(%rip) # 606338 <socket@plt+0x204e68> 4013b6: 68 22 00 00 00 pushq $0x22 4013bb: e9 c0 fd ff ff jmpq 401180 <getenv@plt-0x10> 00000000004013c0 <__fxstat@plt>: 4013c0: ff 25 7a 4f 20 00 jmpq *0x204f7a(%rip) # 606340 <socket@plt+0x204e70> 4013c6: 68 23 00 00 00 pushq $0x23 4013cb: e9 b0 fd ff ff jmpq 401180 <getenv@plt-0x10> 00000000004013d0 <sscanf@plt>: 4013d0: ff 25 72 4f 20 00 jmpq *0x204f72(%rip) # 606348 <socket@plt+0x204e78> 4013d6: 68 24 00 00 00 pushq $0x24 4013db: e9 a0 fd ff ff jmpq 401180 <getenv@plt-0x10> 00000000004013e0 <mkstemp@plt>: 4013e0: ff 25 6a 4f 20 00 jmpq *0x204f6a(%rip) # 606350 <socket@plt+0x204e80> 4013e6: 68 25 00 00 00 pushq $0x25 4013eb: e9 90 fd ff ff jmpq 401180 <getenv@plt-0x10> 00000000004013f0 <dlclose@plt>: 4013f0: ff 25 62 4f 20 00 jmpq *0x204f62(%rip) # 606358 <socket@plt+0x204e88> 4013f6: 68 26 00 00 00 pushq $0x26 4013fb: e9 80 fd ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401400 <munmap@plt>: 401400: ff 25 5a 4f 20 00 jmpq *0x204f5a(%rip) # 606360 <socket@plt+0x204e90> 401406: 68 27 00 00 00 pushq $0x27 40140b: e9 70 fd ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401410 <getlogin_r@plt>: 401410: ff 25 52 4f 20 00 jmpq *0x204f52(%rip) # 606368 <socket@plt+0x204e98> 401416: 68 28 00 00 00 pushq $0x28 40141b: e9 60 fd ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401420 <open@plt>: 401420: ff 25 4a 4f 20 00 jmpq *0x204f4a(%rip) # 606370 <socket@plt+0x204ea0> 401426: 68 29 00 00 00 pushq $0x29 40142b: e9 50 fd ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401430 <sysconf@plt>: 401430: ff 25 42 4f 20 00 jmpq *0x204f42(%rip) # 606378 <socket@plt+0x204ea8> 401436: 68 2a 00 00 00 pushq $0x2a 40143b: e9 40 fd ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401440 <sprintf@plt>: 401440: ff 25 3a 4f 20 00 jmpq *0x204f3a(%rip) # 606380 <socket@plt+0x204eb0> 401446: 68 2b 00 00 00 pushq $0x2b 40144b: e9 30 fd ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401450 <exit@plt>: 401450: ff 25 32 4f 20 00 jmpq *0x204f32(%rip) # 606388 <socket@plt+0x204eb8> 401456: 68 2c 00 00 00 pushq $0x2c 40145b: e9 20 fd ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401460 <connect@plt>: 401460: ff 25 2a 4f 20 00 jmpq *0x204f2a(%rip) # 606390 <socket@plt+0x204ec0> 401466: 68 2d 00 00 00 pushq $0x2d 40146b: e9 10 fd ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401470 <fwrite@plt>: 401470: ff 25 22 4f 20 00 jmpq *0x204f22(%rip) # 606398 <socket@plt+0x204ec8> 401476: 68 2e 00 00 00 pushq $0x2e 40147b: e9 00 fd ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401480 <dlsym@plt>: 401480: ff 25 1a 4f 20 00 jmpq *0x204f1a(%rip) # 6063a0 <socket@plt+0x204ed0> 401486: 68 2f 00 00 00 pushq $0x2f 40148b: e9 f0 fc ff ff jmpq 401180 <getenv@plt-0x10> 0000000000401490 <sleep@plt>: 401490: ff 25 12 4f 20 00 jmpq *0x204f12(%rip) # 6063a8 <socket@plt+0x204ed8> 401496: 68 30 00 00 00 pushq $0x30 40149b: e9 e0 fc ff ff jmpq 401180 <getenv@plt-0x10> 00000000004014a0 <wait@plt>: 4014a0: ff 25 0a 4f 20 00 jmpq *0x204f0a(%rip) # 6063b0 <socket@plt+0x204ee0> 4014a6: 68 31 00 00 00 pushq $0x31 4014ab: e9 d0 fc ff ff jmpq 401180 <getenv@plt-0x10> 00000000004014b0 <fork@plt>: 4014b0: ff 25 02 4f 20 00 jmpq *0x204f02(%rip) # 6063b8 <socket@plt+0x204ee8> 4014b6: 68 32 00 00 00 pushq $0x32 4014bb: e9 c0 fc ff ff jmpq 401180 <getenv@plt-0x10> 00000000004014c0 <rand@plt>: 4014c0: ff 25 fa 4e 20 00 jmpq *0x204efa(%rip) # 6063c0 <socket@plt+0x204ef0> 4014c6: 68 33 00 00 00 pushq $0x33 4014cb: e9 b0 fc ff ff jmpq 401180 <getenv@plt-0x10> 00000000004014d0 <socket@plt>: 4014d0: ff 25 f2 4e 20 00 jmpq *0x204ef2(%rip) # 6063c8 <socket@plt+0x204ef8> 4014d6: 68 34 00 00 00 pushq $0x34 4014db: e9 a0 fc ff ff jmpq 401180 <getenv@plt-0x10> Disassembly of section .text: 00000000004014e0 <.text>: 4014e0: 41 55 push %r13 4014e2: 41 89 fd mov %edi,%r13d 4014e5: 41 54 push %r12 4014e7: 41 89 f4 mov %esi,%r12d 4014ea: 55 push %rbp 4014eb: 53 push %rbx 4014ec: 89 d3 mov %edx,%ebx 4014ee: 48 83 ec 18 sub $0x18,%rsp 4014f2: c7 44 24 08 00 00 00 movl $0x0,0x8(%rsp) 4014f9: 00 4014fa: e9 89 00 00 00 jmpq 401588 <socket@plt+0xb8> 4014ff: 85 db test %ebx,%ebx 401501: 74 31 je 401534 <socket@plt+0x64> 401503: e8 e8 fc ff ff callq 4011f0 <getpid@plt> 401508: bf d2 41 40 00 mov $0x4041d2,%edi 40150d: 89 c6 mov %eax,%esi 40150f: 31 c0 xor %eax,%eax 401511: e8 1a fd ff ff callq 401230 <printf@plt> 401516: 48 8d 74 24 08 lea 0x8(%rsp),%rsi 40151b: ba 04 00 00 00 mov $0x4,%edx 401520: 44 89 ef mov %r13d,%edi 401523: e8 b8 fc ff ff callq 4011e0 <write@plt> 401528: 83 f8 04 cmp $0x4,%eax 40152b: 74 4f je 40157c <socket@plt+0xac> 40152d: b8 01 00 00 00 mov $0x1,%eax 401532: eb 61 jmp 401595 <socket@plt+0xc5> 401534: bf 02 00 00 00 mov $0x2,%edi 401539: e8 52 fd ff ff callq 401290 <alarm@plt> 40153e: 48 8d 74 24 0c lea 0xc(%rsp),%rsi 401543: ba 04 00 00 00 mov $0x4,%edx 401548: 44 89 e7 mov %r12d,%edi 40154b: e8 60 fd ff ff callq 4012b0 <read@plt> 401550: 31 ff xor %edi,%edi 401552: 48 89 c5 mov %rax,%rbp 401555: e8 36 fd ff ff callq 401290 <alarm@plt> 40155a: 83 fd 04 cmp $0x4,%ebp 40155d: 75 ce jne 40152d <socket@plt+0x5d> 40155f: 8b 44 24 08 mov 0x8(%rsp),%eax 401563: 39 44 24 0c cmp %eax,0xc(%rsp) 401567: 75 c4 jne 40152d <socket@plt+0x5d> 401569: e8 82 fc ff ff callq 4011f0 <getpid@plt> 40156e: bf de 41 40 00 mov $0x4041de,%edi 401573: 89 c6 mov %eax,%esi 401575: 31 c0 xor %eax,%eax 401577: e8 b4 fc ff ff callq 401230 <printf@plt> 40157c: 85 db test %ebx,%ebx 40157e: 0f 94 c3 sete %bl 401581: ff 44 24 08 incl 0x8(%rsp) 401585: 0f b6 db movzbl %bl,%ebx 401588: 83 7c 24 08 0b cmpl $0xb,0x8(%rsp) 40158d: 0f 8e 6c ff ff ff jle 4014ff <socket@plt+0x2f> 401593: 31 c0 xor %eax,%eax 401595: 48 83 c4 18 add $0x18,%rsp 401599: 5b pop %rbx 40159a: 5d pop %rbp 40159b: 41 5c pop %r12 40159d: 41 5d pop %r13 40159f: c3 retq 4015a0: e9 bb 16 00 00 jmpq 402c60 <socket@plt+0x1790> 4015a5: 90 nop 4015a6: 90 nop 4015a7: 90 nop 4015a8: 31 ed xor %ebp,%ebp 4015aa: 49 89 d1 mov %rdx,%r9 4015ad: 5e pop %rsi 4015ae: 48 89 e2 mov %rsp,%rdx 4015b1: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 4015b5: 50 push %rax 4015b6: 54 push %rsp 4015b7: 49 c7 c0 a0 3f 40 00 mov $0x403fa0,%r8 4015be: 48 c7 c1 b0 3f 40 00 mov $0x403fb0,%rcx 4015c5: 48 c7 c7 a0 15 40 00 mov $0x4015a0,%rdi 4015cc: e8 ef fc ff ff callq 4012c0 <__libc_start_main@plt> 4015d1: f4 hlt 4015d2: 90 nop 4015d3: 90 nop 4015d4: 48 83 ec 08 sub $0x8,%rsp 4015d8: 48 8b 05 29 4c 20 00 mov 0x204c29(%rip),%rax # 606208 <socket@plt+0x204d38> 4015df: 48 85 c0 test %rax,%rax 4015e2: 74 02 je 4015e6 <socket@plt+0x116> 4015e4: ff d0 callq *%rax 4015e6: 48 83 c4 08 add $0x8,%rsp 4015ea: c3 retq 4015eb: 90 nop 4015ec: 90 nop 4015ed: 90 nop 4015ee: 90 nop 4015ef: 90 nop 4015f0: b8 67 69 60 00 mov $0x606967,%eax 4015f5: 55 push %rbp 4015f6: 48 2d 60 69 60 00 sub $0x606960,%rax 4015fc: 48 83 f8 0e cmp $0xe,%rax 401600: 48 89 e5 mov %rsp,%rbp 401603: 77 02 ja 401607 <socket@plt+0x137> 401605: 5d pop %rbp 401606: c3 retq 401607: b8 00 00 00 00 mov $0x0,%eax 40160c: 48 85 c0 test %rax,%rax 40160f: 74 f4 je 401605 <socket@plt+0x135> 401611: 5d pop %rbp 401612: bf 60 69 60 00 mov $0x606960,%edi 401617: ff e0 jmpq *%rax 401619: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 401620: b8 60 69 60 00 mov $0x606960,%eax 401625: 55 push %rbp 401626: 48 2d 60 69 60 00 sub $0x606960,%rax 40162c: 48 c1 f8 03 sar $0x3,%rax 401630: 48 89 e5 mov %rsp,%rbp 401633: 48 89 c2 mov %rax,%rdx 401636: 48 c1 ea 3f shr $0x3f,%rdx 40163a: 48 01 d0 add %rdx,%rax 40163d: 48 89 c6 mov %rax,%rsi 401640: 48 d1 fe sar %rsi 401643: 75 02 jne 401647 <socket@plt+0x177> 401645: 5d pop %rbp 401646: c3 retq 401647: ba 00 00 00 00 mov $0x0,%edx 40164c: 48 85 d2 test %rdx,%rdx 40164f: 74 f4 je 401645 <socket@plt+0x175> 401651: 5d pop %rbp 401652: bf 60 69 60 00 mov $0x606960,%edi 401657: ff e2 jmpq *%rdx 401659: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 401660: 80 3d 11 53 20 00 00 cmpb $0x0,0x205311(%rip) # 606978 <stderr+0x8> 401667: 75 11 jne 40167a <socket@plt+0x1aa> 401669: 55 push %rbp 40166a: 48 89 e5 mov %rsp,%rbp 40166d: e8 7e ff ff ff callq 4015f0 <socket@plt+0x120> 401672: 5d pop %rbp 401673: c6 05 fe 52 20 00 01 movb $0x1,0x2052fe(%rip) # 606978 <stderr+0x8> 40167a: f3 c3 repz retq 40167c: 0f 1f 40 00 nopl 0x0(%rax) 401680: 48 83 3d 88 49 20 00 cmpq $0x0,0x204988(%rip) # 606010 <socket@plt+0x204b40> 401687: 00 401688: 74 1b je 4016a5 <socket@plt+0x1d5> 40168a: b8 00 00 00 00 mov $0x0,%eax 40168f: 48 85 c0 test %rax,%rax 401692: 74 11 je 4016a5 <socket@plt+0x1d5> 401694: 55 push %rbp 401695: bf 10 60 60 00 mov $0x606010,%edi 40169a: 48 89 e5 mov %rsp,%rbp 40169d: ff d0 callq *%rax 40169f: 5d pop %rbp 4016a0: e9 7b ff ff ff jmpq 401620 <socket@plt+0x150> 4016a5: e9 76 ff ff ff jmpq 401620 <socket@plt+0x150> 4016aa: 90 nop 4016ab: 90 nop 4016ac: 90 nop 4016ad: 90 nop 4016ae: 90 nop 4016af: 90 nop 4016b0: 48 89 5c 24 e8 mov %rbx,-0x18(%rsp) 4016b5: 48 89 6c 24 f0 mov %rbp,-0x10(%rsp) 4016ba: 4c 89 64 24 f8 mov %r12,-0x8(%rsp) 4016bf: 48 83 ec 58 sub $0x58,%rsp 4016c3: 48 8b 1d 46 53 20 00 mov 0x205346(%rip),%rbx # 606a10 <stderr+0xa0> 4016ca: 48 85 db test %rbx,%rbx 4016cd: 74 21 je 4016f0 <socket@plt+0x220> 4016cf: 48 89 d8 mov %rbx,%rax 4016d2: 48 8b 6c 24 48 mov 0x48(%rsp),%rbp 4016d7: 48 8b 5c 24 40 mov 0x40(%rsp),%rbx 4016dc: 4c 8b 64 24 50 mov 0x50(%rsp),%r12 4016e1: 48 83 c4 58 add $0x58,%rsp 4016e5: c3 retq 4016e6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 4016ed: 00 00 00 4016f0: e8 9b 28 00 00 callq 403f90 <socket@plt+0x2ac0> 4016f5: 8d 14 80 lea (%rax,%rax,4),%edx 4016f8: be 42 00 00 00 mov $0x42,%esi 4016fd: 48 89 e7 mov %rsp,%rdi 401700: 44 8d 24 d0 lea (%rax,%rdx,8),%r12d 401704: 48 b8 72 69 64 64 6c movabs $0x732e656c64646972,%rax 40170b: 65 2e 73 40170e: 48 ba 61 76 65 67 61 movabs $0x656d6167657661,%rdx 401715: 6d 65 00 401718: 48 89 04 24 mov %rax,(%rsp) 40171c: 48 89 54 24 08 mov %rdx,0x8(%rsp) 401721: 31 c0 xor %eax,%eax 401723: ba 80 01 00 00 mov $0x180,%edx 401728: e8 f3 fc ff ff callq 401420 <open@plt> 40172d: 83 f8 ff cmp $0xffffffff,%eax 401730: 89 c5 mov %eax,%ebp 401732: 74 9b je 4016cf <socket@plt+0x1ff> 401734: 4d 63 e4 movslq %r12d,%r12 401737: 89 c7 mov %eax,%edi 401739: 4c 89 e6 mov %r12,%rsi 40173c: e8 ff fa ff ff callq 401240 <ftruncate@plt> 401741: 83 f8 ff cmp $0xffffffff,%eax 401744: 74 2f je 401775 <socket@plt+0x2a5> 401746: 45 31 c9 xor %r9d,%r9d 401749: 31 ff xor %edi,%edi 40174b: 41 89 e8 mov %ebp,%r8d 40174e: b9 01 00 00 00 mov $0x1,%ecx 401753: ba 03 00 00 00 mov $0x3,%edx 401758: 4c 89 e6 mov %r12,%rsi 40175b: e8 c0 fa ff ff callq 401220 <mmap@plt> 401760: 48 83 f8 ff cmp $0xffffffffffffffff,%rax 401764: 48 89 05 a5 52 20 00 mov %rax,0x2052a5(%rip) # 606a10 <stderr+0xa0> 40176b: 74 08 je 401775 <socket@plt+0x2a5> 40176d: 48 89 c3 mov %rax,%rbx 401770: e9 5a ff ff ff jmpq 4016cf <socket@plt+0x1ff> 401775: 89 ef mov %ebp,%edi 401777: e8 24 fb ff ff callq 4012a0 <close@plt> 40177c: e9 4e ff ff ff jmpq 4016cf <socket@plt+0x1ff> 401781: 66 66 66 66 66 66 2e data32 data32 data32 data32 data32 nopw %cs:0x0(%rax,%rax,1) 401788: 0f 1f 84 00 00 00 00 40178f: 00 401790: 41 57 push %r15 401792: 8b 47 14 mov 0x14(%rdi),%eax 401795: 33 47 10 xor 0x10(%rdi),%eax 401798: 8b 4f 18 mov 0x18(%rdi),%ecx 40179b: 41 56 push %r14 40179d: 23 47 0c and 0xc(%rdi),%eax 4017a0: 33 47 14 xor 0x14(%rdi),%eax 4017a3: 8b 57 08 mov 0x8(%rdi),%edx 4017a6: 41 55 push %r13 4017a8: 44 8b 57 0c mov 0xc(%rdi),%r10d 4017ac: c1 c2 05 rol $0x5,%edx 4017af: 41 54 push %r12 4017b1: 44 8b 5f 10 mov 0x10(%rdi),%r11d 4017b5: 44 8d 84 01 99 79 82 lea 0x5a827999(%rcx,%rax,1),%r8d 4017bc: 5a 4017bd: 44 8b 4f 08 mov 0x8(%rdi),%r9d 4017c1: 55 push %rbp 4017c2: 41 c1 ca 02 ror $0x2,%r10d 4017c6: 53 push %rbx 4017c7: 8b 5f 14 mov 0x14(%rdi),%ebx 4017ca: 44 8b 2e mov (%rsi),%r13d 4017cd: 44 8b 66 04 mov 0x4(%rsi),%r12d 4017d1: 41 0f cd bswap %r13d 4017d4: 41 0f cc bswap %r12d 4017d7: 45 01 e8 add %r13d,%r8d 4017da: 42 8d 8c 23 99 79 82 lea 0x5a827999(%rbx,%r12,1),%ecx 4017e1: 5a 4017e2: 8b 6e 08 mov 0x8(%rsi),%ebp 4017e5: 41 01 d0 add %edx,%r8d 4017e8: 8b 5e 0c mov 0xc(%rsi),%ebx 4017eb: 44 8b 76 10 mov 0x10(%rsi),%r14d 4017ef: 44 89 c0 mov %r8d,%eax 4017f2: c1 c0 05 rol $0x5,%eax 4017f5: 01 c1 add %eax,%ecx 4017f7: 8b 47 10 mov 0x10(%rdi),%eax 4017fa: 0f cd bswap %ebp 4017fc: 41 8d 94 2b 99 79 82 lea 0x5a827999(%r11,%rbp,1),%edx 401803: 5a 401804: 44 31 d0 xor %r10d,%eax 401807: 23 47 08 and 0x8(%rdi),%eax 40180a: 33 47 10 xor 0x10(%rdi),%eax 40180d: 41 c1 c9 02 ror $0x2,%r9d 401811: 0f cb bswap %ebx 401813: 41 0f ce bswap %r14d 401816: 01 c1 add %eax,%ecx 401818: 47 8d 9c 31 99 79 82 lea 0x5a827999(%r9,%r14,1),%r11d 40181f: 5a 401820: 44 89 74 24 e4 mov %r14d,-0x1c(%rsp) 401825: 89 c8 mov %ecx,%eax 401827: c1 c0 05 rol $0x5,%eax 40182a: 01 c2 add %eax,%edx 40182c: 44 89 c8 mov %r9d,%eax 40182f: 44 31 d0 xor %r10d,%eax 401832: 44 21 c0 and %r8d,%eax 401835: 44 31 d0 xor %r10d,%eax 401838: 45 8d 94 1a 99 79 82 lea 0x5a827999(%r10,%rbx,1),%r10d 40183f: 5a 401840: 01 c2 add %eax,%edx 401842: 41 c1 c8 02 ror $0x2,%r8d 401846: 89 d0 mov %edx,%eax 401848: c1 c0 05 rol $0x5,%eax 40184b: 44 01 d0 add %r10d,%eax 40184e: 45 89 c2 mov %r8d,%r10d 401851: 45 31 ca xor %r9d,%r10d 401854: 41 21 ca and %ecx,%r10d 401857: 45 31 ca xor %r9d,%r10d 40185a: c1 c9 02 ror $0x2,%ecx 40185d: 44 01 d0 add %r10d,%eax 401860: 41 89 c9 mov %ecx,%r9d 401863: 41 89 c2 mov %eax,%r10d 401866: 41 c1 c2 05 rol $0x5,%r10d 40186a: 45 31 c1 xor %r8d,%r9d 40186d: 45 01 d3 add %r10d,%r11d 401870: 41 21 d1 and %edx,%r9d 401873: 45 31 c1 xor %r8d,%r9d 401876: 45 01 cb add %r9d,%r11d 401879: 44 8b 4e 14 mov 0x14(%rsi),%r9d 40187d: 41 0f c9 bswap %r9d 401880: 44 89 4c 24 e8 mov %r9d,-0x18(%rsp) 401885: 44 8b 74 24 e8 mov -0x18(%rsp),%r14d 40188a: 45 89 d9 mov %r11d,%r9d 40188d: c1 ca 02 ror $0x2,%edx 401890: 41 c1 c1 05 rol $0x5,%r9d 401894: 47 8d 94 30 99 79 82 lea 0x5a827999(%r8,%r14,1),%r10d 40189b: 5a 40189c: 41 89 d0 mov %edx,%r8d 40189f: 41 31 c8 xor %ecx,%r8d 4018a2: 41 21 c0 and %eax,%r8d 4018a5: 45 01 ca add %r9d,%r10d 4018a8: 41 31 c8 xor %ecx,%r8d 4018ab: 45 01 c2 add %r8d,%r10d 4018ae: 44 8b 46 18 mov 0x18(%rsi),%r8d 4018b2: 41 0f c8 bswap %r8d 4018b5: 44 89 44 24 ec mov %r8d,-0x14(%rsp) 4018ba: 44 8b 74 24 ec mov -0x14(%rsp),%r14d 4018bf: 45 89 d0 mov %r10d,%r8d 4018c2: c1 c8 02 ror $0x2,%eax 4018c5: 41 c1 c0 05 rol $0x5,%r8d 4018c9: 46 8d 8c 31 99 79 82 lea 0x5a827999(%rcx,%r14,1),%r9d 4018d0: 5a 4018d1: 89 c1 mov %eax,%ecx 4018d3: 44 8b 76 24 mov 0x24(%rsi),%r14d 4018d7: 31 d1 xor %edx,%ecx 4018d9: 44 21 d9 and %r11d,%ecx 4018dc: 45 01 c1 add %r8d,%r9d 4018df: 31 d1 xor %edx,%ecx 4018e1: 41 01 c9 add %ecx,%r9d 4018e4: 8b 4e 1c mov 0x1c(%rsi),%ecx 4018e7: 0f c9 bswap %ecx 4018e9: 89 4c 24 f8 mov %ecx,-0x8(%rsp) 4018ed: 44 8b 44 24 f8 mov -0x8(%rsp),%r8d 4018f2: 44 89 c9 mov %r9d,%ecx 4018f5: 41 c1 cb 02 ror $0x2,%r11d 4018f9: c1 c1 05 rol $0x5,%ecx 4018fc: 42 8d 94 02 99 79 82 lea 0x5a827999(%rdx,%r8,1),%edx 401903: 5a 401904: 44 8b 46 20 mov 0x20(%rsi),%r8d 401908: 41 0f c8 bswap %r8d 40190b: 01 d1 add %edx,%ecx 40190d: 44 89 da mov %r11d,%edx 401910: 31 c2 xor %eax,%edx 401912: 44 21 d2 and %r10d,%edx 401915: 31 c2 xor %eax,%edx 401917: 42 8d 84 00 99 79 82 lea 0x5a827999(%rax,%r8,1),%eax 40191e: 5a 40191f: 01 d1 add %edx,%ecx 401921: 41 c1 ca 02 ror $0x2,%r10d 401925: 89 ca mov %ecx,%edx 401927: c1 c2 05 rol $0x5,%edx 40192a: 01 c2 add %eax,%edx 40192c: 44 89 d0 mov %r10d,%eax 40192f: 44 31 d8 xor %r11d,%eax 401932: 44 21 c8 and %r9d,%eax 401935: 41 0f ce bswap %r14d 401938: 44 31 d8 xor %r11d,%eax 40193b: 47 8d 9c 33 99 79 82 lea 0x5a827999(%r11,%r14,1),%r11d 401942: 5a 401943: 44 89 74 24 d4 mov %r14d,-0x2c(%rsp) 401948: 01 c2 add %eax,%edx 40194a: 41 c1 c9 02 ror $0x2,%r9d 40194e: 89 d0 mov %edx,%eax 401950: c1 c0 05 rol $0x5,%eax 401953: 44 01 d8 add %r11d,%eax 401956: 45 89 cb mov %r9d,%r11d 401959: 45 31 d3 xor %r10d,%r11d 40195c: 41 21 cb and %ecx,%r11d 40195f: 45 31 d3 xor %r10d,%r11d 401962: 44 01 d8 add %r11d,%eax 401965: 44 8b 5e 28 mov 0x28(%rsi),%r11d 401969: 41 0f cb bswap %r11d 40196c: 44 89 5c 24 d8 mov %r11d,-0x28(%rsp) 401971: 44 8b 74 24 d8 mov -0x28(%rsp),%r14d 401976: 41 89 c3 mov %eax,%r11d 401979: c1 c9 02 ror $0x2,%ecx 40197c: 41 c1 c3 05 rol $0x5,%r11d 401980: 47 8d 94 32 99 79 82 lea 0x5a827999(%r10,%r14,1),%r10d 401987: 5a 401988: 45 01 d3 add %r10d,%r11d 40198b: 41 89 ca mov %ecx,%r10d 40198e: 45 31 ca xor %r9d,%r10d 401991: 41 21 d2 and %edx,%r10d 401994: 45 31 ca xor %r9d,%r10d 401997: 45 01 d3 add %r10d,%r11d 40199a: 44 8b 56 2c mov 0x2c(%rsi),%r10d 40199e: c1 ca 02 ror $0x2,%edx 4019a1: 41 0f ca bswap %r10d 4019a4: 44 89 54 24 dc mov %r10d,-0x24(%rsp) 4019a9: 44 8b 74 24 dc mov -0x24(%rsp),%r14d 4019ae: 45 89 da mov %r11d,%r10d 4019b1: 41 c1 c2 05 rol $0x5,%r10d 4019b5: 47 8d 8c 31 99 79 82 lea 0x5a827999(%r9,%r14,1),%r9d 4019bc: 5a 4019bd: 45 01 ca add %r9d,%r10d 4019c0: 41 89 d1 mov %edx,%r9d 4019c3: 41 31 c9 xor %ecx,%r9d 4019c6: 41 21 c1 and %eax,%r9d 4019c9: 41 31 c9 xor %ecx,%r9d 4019cc: 45 01 ca add %r9d,%r10d 4019cf: 44 8b 4e 30 mov 0x30(%rsi),%r9d 4019d3: 41 0f c9 bswap %r9d 4019d6: 44 89 4c 24 e0 mov %r9d,-0x20(%rsp) 4019db: 44 8b 74 24 e0 mov -0x20(%rsp),%r14d 4019e0: 45 89 d1 mov %r10d,%r9d 4019e3: c1 c8 02 ror $0x2,%eax 4019e6: 41 c1 c1 05 rol $0x5,%r9d 4019ea: 42 8d 8c 31 99 79 82 lea 0x5a827999(%rcx,%r14,1),%ecx 4019f1: 5a 4019f2: 41 01 c9 add %ecx,%r9d 4019f5: 89 c1 mov %eax,%ecx 4019f7: 31 d1 xor %edx,%ecx 4019f9: 41 31 ed xor %ebp,%r13d 4019fc: 44 21 d9 and %r11d,%ecx 4019ff: 45 31 c5 xor %r8d,%r13d 401a02: 31 d1 xor %edx,%ecx 401a04: 41 01 c9 add %ecx,%r9d 401a07: 8b 4e 34 mov 0x34(%rsi),%ecx 401a0a: 0f c9 bswap %ecx 401a0c: 8d 94 0a 99 79 82 5a lea 0x5a827999(%rdx,%rcx,1),%edx 401a13: 45 89 ce mov %r9d,%r14d 401a16: 41 31 cd xor %ecx,%r13d 401a19: 41 c1 cb 02 ror $0x2,%r11d 401a1d: 41 c1 c6 05 rol $0x5,%r14d 401a21: 41 01 d6 add %edx,%r14d 401a24: 44 89 da mov %r11d,%edx 401a27: 31 c2 xor %eax,%edx 401a29: 44 21 d2 and %r10d,%edx 401a2c: 31 c2 xor %eax,%edx 401a2e: 41 01 d6 add %edx,%r14d 401a31: 8b 56 38 mov 0x38(%rsi),%edx 401a34: 0f ca bswap %edx 401a36: 8d 84 10 99 79 82 5a lea 0x5a827999(%rax,%rdx,1),%eax 401a3d: 45 89 f7 mov %r14d,%r15d 401a40: 41 c1 ca 02 ror $0x2,%r10d 401a44: 41 c1 c7 05 rol $0x5,%r15d 401a48: 41 01 c7 add %eax,%r15d 401a4b: 44 89 d0 mov %r10d,%eax 401a4e: 44 31 d8 xor %r11d,%eax 401a51: 44 21 c8 and %r9d,%eax 401a54: 44 31 d8 xor %r11d,%eax 401a57: 41 01 c7 add %eax,%r15d 401a5a: 8b 46 3c mov 0x3c(%rsi),%eax 401a5d: 0f c8 bswap %eax 401a5f: 45 8d 9c 03 99 79 82 lea 0x5a827999(%r11,%rax,1),%r11d 401a66: 5a 401a67: 44 89 fe mov %r15d,%esi 401a6a: 41 c1 c9 02 ror $0x2,%r9d 401a6e: c1 c6 05 rol $0x5,%esi 401a71: 41 01 f3 add %esi,%r11d 401a74: 44 89 ce mov %r9d,%esi 401a77: 44 31 d6 xor %r10d,%esi 401a7a: 44 21 f6 and %r14d,%esi 401a7d: 44 31 d6 xor %r10d,%esi 401a80: 41 d1 c5 rol %r13d 401a83: 44 01 de add %r11d,%esi 401a86: 47 8d 94 2a 99 79 82 lea 0x5a827999(%r10,%r13,1),%r10d 401a8d: 5a 401a8e: 41 c1 ce 02 ror $0x2,%r14d 401a92: 41 89 f3 mov %esi,%r11d 401a95: 41 c1 c3 05 rol $0x5,%r11d 401a99: 41 31 dc xor %ebx,%r12d 401a9c: 44 33 64 24 d4 xor -0x2c(%rsp),%r12d 401aa1: 45 01 d3 add %r10d,%r11d 401aa4: 45 89 f2 mov %r14d,%r10d 401aa7: 33 6c 24 e4 xor -0x1c(%rsp),%ebp 401aab: 45 31 ca xor %r9d,%r10d 401aae: 45 21 fa and %r15d,%r10d 401ab1: 45 31 ca xor %r9d,%r10d 401ab4: 41 31 d4 xor %edx,%r12d 401ab7: 41 d1 c4 rol %r12d 401aba: 47 8d 8c 21 99 79 82 lea 0x5a827999(%r9,%r12,1),%r9d 401ac1: 5a 401ac2: 45 01 da add %r11d,%r10d 401ac5: 41 c1 cf 02 ror $0x2,%r15d 401ac9: 45 89 d3 mov %r10d,%r11d 401acc: 41 c1 c3 05 rol $0x5,%r11d 401ad0: 45 01 cb add %r9d,%r11d 401ad3: 45 89 f9 mov %r15d,%r9d 401ad6: 45 31 f1 xor %r14d,%r9d 401ad9: 41 21 f1 and %esi,%r9d 401adc: 45 31 f1 xor %r14d,%r9d 401adf: 45 01 d9 add %r11d,%r9d 401ae2: 44 8b 5c 24 d8 mov -0x28(%rsp),%r11d 401ae7: c1 ce 02 ror $0x2,%esi 401aea: 44 31 dd xor %r11d,%ebp 401aed: 45 89 cb mov %r9d,%r11d 401af0: 31 c5 xor %eax,%ebp 401af2: d1 c5 rol %ebp 401af4: 45 8d b4 2e 99 79 82 lea 0x5a827999(%r14,%rbp,1),%r14d 401afb: 5a 401afc: 89 6c 24 f4 mov %ebp,-0xc(%rsp) 401b00: 41 c1 c3 05 rol $0x5,%r11d 401b04: 43 8d 2c 1e lea (%r14,%r11,1),%ebp 401b08: 44 8b 74 24 e8 mov -0x18(%rsp),%r14d 401b0d: 41 89 f3 mov %esi,%r11d 401b10: 45 31 fb xor %r15d,%r11d 401b13: 45 21 d3 and %r10d,%r11d 401b16: 41 31 de xor %ebx,%r14d 401b19: 44 33 74 24 dc xor -0x24(%rsp),%r14d 401b1e: 45 31 fb xor %r15d,%r11d 401b21: 44 01 dd add %r11d,%ebp 401b24: 41 c1 ca 02 ror $0x2,%r10d 401b28: 41 89 eb mov %ebp,%r11d 401b2b: 45 31 ee xor %r13d,%r14d 401b2e: 41 d1 c6 rol %r14d 401b31: 43 8d 9c 37 99 79 82 lea 0x5a827999(%r15,%r14,1),%ebx 401b38: 5a 401b39: 44 8b 7c 24 ec mov -0x14(%rsp),%r15d 401b3e: 41 c1 c3 05 rol $0x5,%r11d 401b42: 44 01 db add %r11d,%ebx 401b45: 44 33 7c 24 e4 xor -0x1c(%rsp),%r15d 401b4a: 45 89 d3 mov %r10d,%r11d 401b4d: 44 33 7c 24 e0 xor -0x20(%rsp),%r15d 401b52: 41 31 f3 xor %esi,%r11d 401b55: 45 21 cb and %r9d,%r11d 401b58: 41 31 f3 xor %esi,%r11d 401b5b: 44 01 db add %r11d,%ebx 401b5e: 45 31 e7 xor %r12d,%r15d 401b61: 41 89 db mov %ebx,%r11d 401b64: 41 d1 c7 rol %r15d 401b67: 42 8d b4 3e a1 eb d9 lea 0x6ed9eba1(%rsi,%r15,1),%esi 401b6e: 6e 401b6f: 41 c1 c9 02 ror $0x2,%r9d 401b73: 41 c1 c3 05 rol $0x5,%r11d 401b77: 41 01 f3 add %esi,%r11d 401b7a: 44 89 ce mov %r9d,%esi 401b7d: 44 89 4c 24 fc mov %r9d,-0x4(%rsp) 401b82: 44 31 d6 xor %r10d,%esi 401b85: 44 8b 4c 24 f4 mov -0xc(%rsp),%r9d 401b8a: 31 ee xor %ebp,%esi 401b8c: c1 cd 02 ror $0x2,%ebp 401b8f: 89 6c 24 e4 mov %ebp,-0x1c(%rsp) 401b93: 8b 6c 24 f8 mov -0x8(%rsp),%ebp 401b97: 44 01 de add %r11d,%esi 401b9a: 33 6c 24 e8 xor -0x18(%rsp),%ebp 401b9e: 41 89 f3 mov %esi,%r11d 401ba1: 41 c1 c3 05 rol $0x5,%r11d 401ba5: 31 cd xor %ecx,%ebp 401ba7: 44 31 cd xor %r9d,%ebp 401baa: d1 c5 rol %ebp 401bac: 45 8d 8c 2a a1 eb d9 lea 0x6ed9eba1(%r10,%rbp,1),%r9d 401bb3: 6e 401bb4: 44 8b 54 24 e4 mov -0x1c(%rsp),%r10d 401bb9: 44 33 54 24 fc xor -0x4(%rsp),%r10d 401bbe: 89 6c 24 e8 mov %ebp,-0x18(%rsp) 401bc2: 45 01 cb add %r9d,%r11d 401bc5: 44 8b 4c 24 fc mov -0x4(%rsp),%r9d 401bca: 41 31 da xor %ebx,%r10d 401bcd: 45 01 da add %r11d,%r10d 401bd0: 44 8b 5c 24 ec mov -0x14(%rsp),%r11d 401bd5: c1 cb 02 ror $0x2,%ebx 401bd8: 45 31 c3 xor %r8d,%r11d 401bdb: 41 31 d3 xor %edx,%r11d 401bde: 45 31 f3 xor %r14d,%r11d 401be1: 41 d1 c3 rol %r11d 401be4: 44 89 5c 24 ec mov %r11d,-0x14(%rsp) 401be9: 8b 6c 24 ec mov -0x14(%rsp),%ebp 401bed: 45 89 d3 mov %r10d,%r11d 401bf0: 41 c1 c3 05 rol $0x5,%r11d 401bf4: 41 8d ac 29 a1 eb d9 lea 0x6ed9eba1(%r9,%rbp,1),%ebp 401bfb: 6e 401bfc: 44 8b 4c 24 e4 mov -0x1c(%rsp),%r9d 401c01: 41 01 eb add %ebp,%r11d 401c04: 41 31 d9 xor %ebx,%r9d 401c07: 41 31 f1 xor %esi,%r9d 401c0a: 45 01 d9 add %r11d,%r9d 401c0d: 44 89 4c 24 f0 mov %r9d,-0x10(%rsp) 401c12: 44 8b 4c 24 d4 mov -0x2c(%rsp),%r9d 401c17: 44 33 4c 24 f8 xor -0x8(%rsp),%r9d 401c1c: 8b 6c 24 e4 mov -0x1c(%rsp),%ebp 401c20: 44 33 44 24 d8 xor -0x28(%rsp),%r8d 401c25: 44 8b 5c 24 f0 mov -0x10(%rsp),%r11d 401c2a: c1 ce 02 ror $0x2,%esi 401c2d: 41 c1 c3 05 rol $0x5,%r11d 401c31: 41 31 c1 xor %eax,%r9d 401c34: 45 31 f9 xor %r15d,%r9d 401c37: 45 31 e8 xor %r13d,%r8d 401c3a: 41 d1 c1 rol %r9d 401c3d: 42 8d ac 0d a1 eb d9 lea 0x6ed9eba1(%rbp,%r9,1),%ebp 401c44: 6e 401c45: 44 89 4c 24 f8 mov %r9d,-0x8(%rsp) 401c4a: 44 8b 4c 24 e8 mov -0x18(%rsp),%r9d 401c4f: 44 01 dd add %r11d,%ebp 401c52: 41 89 f3 mov %esi,%r11d 401c55: 41 31 db xor %ebx,%r11d 401c58: 45 31 c8 xor %r9d,%r8d 401c5b: 44 8b 4c 24 f0 mov -0x10(%rsp),%r9d 401c60: 45 31 d3 xor %r10d,%r11d 401c63: 44 01 dd add %r11d,%ebp 401c66: 41 d1 c0 rol %r8d 401c69: 44 89 44 24 e4 mov %r8d,-0x1c(%rsp) 401c6e: 44 8b 5c 24 e4 mov -0x1c(%rsp),%r11d 401c73: 41 89 e8 mov %ebp,%r8d 401c76: 41 c1 ca 02 ror $0x2,%r10d 401c7a: 41 c1 c0 05 rol $0x5,%r8d 401c7e: 42 8d 9c 1b a1 eb d9 lea 0x6ed9eba1(%rbx,%r11,1),%ebx 401c85: 6e 401c86: 41 c1 c9 02 ror $0x2,%r9d 401c8a: 46 8d 1c 03 lea (%rbx,%r8,1),%r11d 401c8e: 45 89 d0 mov %r10d,%r8d 401c91: 8b 5c 24 dc mov -0x24(%rsp),%ebx 401c95: 41 31 f0 xor %esi,%r8d 401c98: 44 33 44 24 f0 xor -0x10(%rsp),%r8d 401c9d: 33 5c 24 d4 xor -0x2c(%rsp),%ebx 401ca1: 45 01 d8 add %r11d,%r8d 401ca4: 44 8b 5c 24 ec mov -0x14(%rsp),%r11d 401ca9: 44 31 e3 xor %r12d,%ebx 401cac: 44 31 db xor %r11d,%ebx 401caf: 45 89 c3 mov %r8d,%r11d 401cb2: d1 c3 rol %ebx 401cb4: 8d b4 1e a1 eb d9 6e lea 0x6ed9eba1(%rsi,%rbx,1),%esi 401cbb: 89 5c 24 d4 mov %ebx,-0x2c(%rsp) 401cbf: 8b 5c 24 e0 mov -0x20(%rsp),%ebx 401cc3: 41 c1 c3 05 rol $0x5,%r11d 401cc7: 41 01 f3 add %esi,%r11d 401cca: 44 89 ce mov %r9d,%esi 401ccd: 33 5c 24 d8 xor -0x28(%rsp),%ebx 401cd1: 44 31 d6 xor %r10d,%esi 401cd4: 31 ee xor %ebp,%esi 401cd6: 44 01 de add %r11d,%esi 401cd9: 44 8b 5c 24 f4 mov -0xc(%rsp),%r11d 401cde: c1 cd 02 ror $0x2,%ebp 401ce1: 44 31 db xor %r11d,%ebx 401ce4: 44 8b 5c 24 f8 mov -0x8(%rsp),%r11d 401ce9: 44 31 db xor %r11d,%ebx 401cec: 41 89 f3 mov %esi,%r11d 401cef: d1 c3 rol %ebx 401cf1: 45 8d 94 1a a1 eb d9 lea 0x6ed9eba1(%r10,%rbx,1),%r10d 401cf8: 6e 401cf9: 89 5c 24 d8 mov %ebx,-0x28(%rsp) 401cfd: 8b 5c 24 dc mov -0x24(%rsp),%ebx 401d01: 41 c1 c3 05 rol $0x5,%r11d 401d05: 45 01 d3 add %r10d,%r11d 401d08: 41 89 ea mov %ebp,%r10d 401d0b: 45 31 ca xor %r9d,%r10d 401d0e: 31 cb xor %ecx,%ebx 401d10: 45 31 c2 xor %r8d,%r10d 401d13: 44 31 f3 xor %r14d,%ebx 401d16: 45 01 da add %r11d,%r10d 401d19: 44 8b 5c 24 e4 mov -0x1c(%rsp),%r11d 401d1e: 41 c1 c8 02 ror $0x2,%r8d 401d22: 44 31 db xor %r11d,%ebx 401d25: 45 89 d3 mov %r10d,%r11d 401d28: d1 c3 rol %ebx 401d2a: 45 8d 8c 19 a1 eb d9 lea 0x6ed9eba1(%r9,%rbx,1),%r9d 401d31: 6e 401d32: 89 5c 24 dc mov %ebx,-0x24(%rsp) 401d36: 8b 5c 24 e0 mov -0x20(%rsp),%ebx 401d3a: 41 c1 c3 05 rol $0x5,%r11d 401d3e: 45 01 cb add %r9d,%r11d 401d41: 45 89 c1 mov %r8d,%r9d 401d44: 41 31 e9 xor %ebp,%r9d 401d47: 31 d3 xor %edx,%ebx 401d49: 41 31 f1 xor %esi,%r9d 401d4c: 44 31 fb xor %r15d,%ebx 401d4f: 45 01 d9 add %r11d,%r9d 401d52: 44 8b 5c 24 d4 mov -0x2c(%rsp),%r11d 401d57: c1 ce 02 ror $0x2,%esi 401d5a: 44 31 db xor %r11d,%ebx 401d5d: 45 89 cb mov %r9d,%r11d 401d60: d1 c3 rol %ebx 401d62: 8d ac 1d a1 eb d9 6e lea 0x6ed9eba1(%rbp,%rbx,1),%ebp 401d69: 89 5c 24 e0 mov %ebx,-0x20(%rsp) 401d6d: 41 c1 c3 05 rol $0x5,%r11d 401d71: 42 8d 5c 1d 00 lea 0x0(%rbp,%r11,1),%ebx 401d76: 41 89 f3 mov %esi,%r11d 401d79: 44 89 ed mov %r13d,%ebp 401d7c: 45 31 c3 xor %r8d,%r11d 401d7f: 45 31 d3 xor %r10d,%r11d 401d82: 44 01 db add %r11d,%ebx 401d85: 41 89 c3 mov %eax,%r11d 401d88: 41 31 cb xor %ecx,%r11d 401d8b: 44 33 5c 24 e8 xor -0x18(%rsp),%r11d 401d90: 89 d9 mov %ebx,%ecx 401d92: 44 33 5c 24 d8 xor -0x28(%rsp),%r11d 401d97: 41 d1 c3 rol %r11d 401d9a: 47 8d 84 18 a1 eb d9 lea 0x6ed9eba1(%r8,%r11,1),%r8d 401da1: 6e 401da2: 41 c1 ca 02 ror $0x2,%r10d 401da6: c1 c1 05 rol $0x5,%ecx 401da9: 41 01 c8 add %ecx,%r8d 401dac: 44 89 d1 mov %r10d,%ecx 401daf: 31 d5 xor %edx,%ebp 401db1: 31 f1 xor %esi,%ecx 401db3: 33 6c 24 ec xor -0x14(%rsp),%ebp 401db7: 44 31 e0 xor %r12d,%eax 401dba: 33 6c 24 dc xor -0x24(%rsp),%ebp 401dbe: 44 31 c9 xor %r9d,%ecx 401dc1: 44 33 6c 24 f4 xor -0xc(%rsp),%r13d 401dc6: d1 c5 rol %ebp 401dc8: 8d b4 2e a1 eb d9 6e lea 0x6ed9eba1(%rsi,%rbp,1),%esi 401dcf: 44 01 c1 add %r8d,%ecx 401dd2: 44 8b 44 24 e0 mov -0x20(%rsp),%r8d 401dd7: 41 c1 c9 02 ror $0x2,%r9d 401ddb: 89 ca mov %ecx,%edx 401ddd: 44 33 6c 24 e4 xor -0x1c(%rsp),%r13d 401de2: c1 c2 05 rol $0x5,%edx 401de5: 01 d6 add %edx,%esi 401de7: 44 89 ca mov %r9d,%edx 401dea: 44 31 d2 xor %r10d,%edx 401ded: 31 da xor %ebx,%edx 401def: 45 31 dd xor %r11d,%r13d 401df2: 01 f2 add %esi,%edx 401df4: 8b 74 24 f8 mov -0x8(%rsp),%esi 401df8: c1 cb 02 ror $0x2,%ebx 401dfb: 41 d1 c5 rol %r13d 401dfe: 31 f0 xor %esi,%eax 401e00: 44 31 c0 xor %r8d,%eax 401e03: d1 c0 rol %eax 401e05: 89 44 24 f0 mov %eax,-0x10(%rsp) 401e09: 44 8b 44 24 f0 mov -0x10(%rsp),%r8d 401e0e: 89 d0 mov %edx,%eax 401e10: c1 c0 05 rol $0x5,%eax 401e13: 43 8d b4 02 a1 eb d9 lea 0x6ed9eba1(%r10,%r8,1),%esi 401e1a: 6e 401e1b: 47 8d 84 29 a1 eb d9 lea 0x6ed9eba1(%r9,%r13,1),%r8d 401e22: 6e 401e23: 44 8b 54 24 f4 mov -0xc(%rsp),%r10d 401e28: 01 c6 add %eax,%esi 401e2a: 89 d8 mov %ebx,%eax 401e2c: 44 31 c8 xor %r9d,%eax 401e2f: 31 c8 xor %ecx,%eax 401e31: 01 f0 add %esi,%eax 401e33: c1 c9 02 ror $0x2,%ecx 401e36: 89 c6 mov %eax,%esi 401e38: c1 c6 05 rol $0x5,%esi 401e3b: 41 01 f0 add %esi,%r8d 401e3e: 89 ce mov %ecx,%esi 401e40: 31 de xor %ebx,%esi 401e42: 31 d6 xor %edx,%esi 401e44: 41 01 f0 add %esi,%r8d 401e47: 45 31 f4 xor %r14d,%r12d 401e4a: 44 33 64 24 d4 xor -0x2c(%rsp),%r12d 401e4f: c1 ca 02 ror $0x2,%edx 401e52: 44 89 c6 mov %r8d,%esi 401e55: 44 33 74 24 e8 xor -0x18(%rsp),%r14d 401e5a: 45 31 fa xor %r15d,%r10d 401e5d: 44 33 54 24 d8 xor -0x28(%rsp),%r10d 401e62: 44 33 74 24 dc xor -0x24(%rsp),%r14d 401e67: 41 31 ec xor %ebp,%r12d 401e6a: 44 33 54 24 f0 xor -0x10(%rsp),%r10d 401e6f: 44 33 7c 24 ec xor -0x14(%rsp),%r15d 401e74: 41 d1 c4 rol %r12d 401e77: 46 8d 8c 23 a1 eb d9 lea 0x6ed9eba1(%rbx,%r12,1),%r9d 401e7e: 6e 401e7f: 8b 5c 24 f8 mov -0x8(%rsp),%ebx 401e83: c1 c6 05 rol $0x5,%esi 401e86: 41 01 f1 add %esi,%r9d 401e89: 89 d6 mov %edx,%esi 401e8b: 45 31 ee xor %r13d,%r14d 401e8e: 31 ce xor %ecx,%esi 401e90: 41 d1 c2 rol %r10d 401e93: 31 c6 xor %eax,%esi 401e95: 42 8d 8c 11 a1 eb d9 lea 0x6ed9eba1(%rcx,%r10,1),%ecx 401e9c: 6e 401e9d: 41 01 f1 add %esi,%r9d 401ea0: c1 c8 02 ror $0x2,%eax 401ea3: 44 89 ce mov %r9d,%esi 401ea6: c1 c6 05 rol $0x5,%esi 401ea9: 01 ce add %ecx,%esi 401eab: 89 c1 mov %eax,%ecx 401ead: 31 d1 xor %edx,%ecx 401eaf: 41 d1 c6 rol %r14d 401eb2: 44 31 c1 xor %r8d,%ecx 401eb5: 42 8d 94 32 a1 eb d9 lea 0x6ed9eba1(%rdx,%r14,1),%edx 401ebc: 6e 401ebd: 01 f1 add %esi,%ecx 401ebf: 41 c1 c8 02 ror $0x2,%r8d 401ec3: 89 ce mov %ecx,%esi 401ec5: c1 c6 05 rol $0x5,%esi 401ec8: 01 d6 add %edx,%esi 401eca: 44 89 c2 mov %r8d,%edx 401ecd: 31 c2 xor %eax,%edx 401ecf: 44 31 ca xor %r9d,%edx 401ed2: 01 f2 add %esi,%edx 401ed4: 41 c1 c9 02 ror $0x2,%r9d 401ed8: 44 33 7c 24 e0 xor -0x20(%rsp),%r15d 401edd: 33 5c 24 e8 xor -0x18(%rsp),%ebx 401ee1: 89 d6 mov %edx,%esi 401ee3: c1 c6 05 rol $0x5,%esi 401ee6: 45 31 e7 xor %r12d,%r15d 401ee9: 44 31 db xor %r11d,%ebx 401eec: 41 d1 c7 rol %r15d 401eef: 42 8d 84 38 a1 eb d9 lea 0x6ed9eba1(%rax,%r15,1),%eax 401ef6: 6e 401ef7: 44 31 d3 xor %r10d,%ebx 401efa: d1 c3 rol %ebx 401efc: 01 c6 add %eax,%esi 401efe: 44 89 c8 mov %r9d,%eax 401f01: 89 5c 24 e8 mov %ebx,-0x18(%rsp) 401f05: 44 31 c0 xor %r8d,%eax 401f08: 45 8d 84 18 a1 eb d9 lea 0x6ed9eba1(%r8,%rbx,1),%r8d 401f0f: 6e 401f10: 31 c8 xor %ecx,%eax 401f12: 01 f0 add %esi,%eax 401f14: c1 c9 02 ror $0x2,%ecx 401f17: 89 c6 mov %eax,%esi 401f19: c1 c6 05 rol $0x5,%esi 401f1c: 41 01 f0 add %esi,%r8d 401f1f: 89 ce mov %ecx,%esi 401f21: 44 31 ce xor %r9d,%esi 401f24: 31 d6 xor %edx,%esi 401f26: 41 01 f0 add %esi,%r8d 401f29: 8b 74 24 e4 mov -0x1c(%rsp),%esi 401f2d: 33 74 24 ec xor -0x14(%rsp),%esi 401f31: c1 ca 02 ror $0x2,%edx 401f34: 31 ee xor %ebp,%esi 401f36: 44 31 f6 xor %r14d,%esi 401f39: d1 c6 rol %esi 401f3b: 89 74 24 ec mov %esi,-0x14(%rsp) 401f3f: 8b 5c 24 ec mov -0x14(%rsp),%ebx 401f43: 44 89 c6 mov %r8d,%esi 401f46: c1 c6 05 rol $0x5,%esi 401f49: 45 8d 8c 19 a1 eb d9 lea 0x6ed9eba1(%r9,%rbx,1),%r9d 401f50: 6e 401f51: 8b 5c 24 f0 mov -0x10(%rsp),%ebx 401f55: 41 01 f1 add %esi,%r9d 401f58: 89 d6 mov %edx,%esi 401f5a: 31 ce xor %ecx,%esi 401f5c: 31 c6 xor %eax,%esi 401f5e: 41 01 f1 add %esi,%r9d 401f61: 8b 74 24 d4 mov -0x2c(%rsp),%esi 401f65: 33 74 24 f8 xor -0x8(%rsp),%esi 401f69: c1 c8 02 ror $0x2,%eax 401f6c: 31 de xor %ebx,%esi 401f6e: 44 31 fe xor %r15d,%esi 401f71: d1 c6 rol %esi 401f73: 89 74 24 f8 mov %esi,-0x8(%rsp) 401f77: 8b 5c 24 f8 mov -0x8(%rsp),%ebx 401f7b: 44 89 ce mov %r9d,%esi 401f7e: c1 c6 05 rol $0x5,%esi 401f81: 8d 8c 19 a1 eb d9 6e lea 0x6ed9eba1(%rcx,%rbx,1),%ecx 401f88: 8b 5c 24 e8 mov -0x18(%rsp),%ebx 401f8c: 01 ce add %ecx,%esi 401f8e: 89 c1 mov %eax,%ecx 401f90: 31 d1 xor %edx,%ecx 401f92: 44 31 c1 xor %r8d,%ecx 401f95: 01 f1 add %esi,%ecx 401f97: 8b 74 24 d8 mov -0x28(%rsp),%esi 401f9b: 33 74 24 e4 xor -0x1c(%rsp),%esi 401f9f: 41 c1 c8 02 ror $0x2,%r8d 401fa3: 44 31 ee xor %r13d,%esi 401fa6: 31 de xor %ebx,%esi 401fa8: d1 c6 rol %esi 401faa: 89 74 24 e4 mov %esi,-0x1c(%rsp) 401fae: 8b 5c 24 e4 mov -0x1c(%rsp),%ebx 401fb2: 89 ce mov %ecx,%esi 401fb4: c1 c6 05 rol $0x5,%esi 401fb7: 8d 94 1a dc bc 1b 8f lea -0x70e44324(%rdx,%rbx,1),%edx 401fbe: 8b 5c 24 ec mov -0x14(%rsp),%ebx 401fc2: 01 d6 add %edx,%esi 401fc4: 44 89 ca mov %r9d,%edx 401fc7: 44 21 c2 and %r8d,%edx 401fca: 01 d6 add %edx,%esi 401fcc: 44 89 ca mov %r9d,%edx 401fcf: 44 31 c2 xor %r8d,%edx 401fd2: 21 c2 and %eax,%edx 401fd4: 01 f2 add %esi,%edx 401fd6: 8b 74 24 dc mov -0x24(%rsp),%esi 401fda: 33 74 24 d4 xor -0x2c(%rsp),%esi 401fde: 41 c1 c9 02 ror $0x2,%r9d 401fe2: 44 31 e6 xor %r12d,%esi 401fe5: 31 de xor %ebx,%esi 401fe7: d1 c6 rol %esi 401fe9: 89 74 24 d4 mov %esi,-0x2c(%rsp) 401fed: 8b 5c 24 d4 mov -0x2c(%rsp),%ebx 401ff1: 89 d6 mov %edx,%esi 401ff3: c1 c6 05 rol $0x5,%esi 401ff6: 8d 84 18 dc bc 1b 8f lea -0x70e44324(%rax,%rbx,1),%eax 401ffd: 8b 5c 24 f8 mov -0x8(%rsp),%ebx 402001: 01 c6 add %eax,%esi 402003: 89 c8 mov %ecx,%eax 402005: 44 21 c8 and %r9d,%eax 402008: 01 c6 add %eax,%esi 40200a: 89 c8 mov %ecx,%eax 40200c: 44 31 c8 xor %r9d,%eax 40200f: 44 21 c0 and %r8d,%eax 402012: 01 f0 add %esi,%eax 402014: 8b 74 24 e0 mov -0x20(%rsp),%esi 402018: 33 74 24 d8 xor -0x28(%rsp),%esi 40201c: c1 c9 02 ror $0x2,%ecx 40201f: 44 31 d6 xor %r10d,%esi 402022: 31 de xor %ebx,%esi 402024: d1 c6 rol %esi 402026: 89 74 24 d8 mov %esi,-0x28(%rsp) 40202a: 8b 5c 24 d8 mov -0x28(%rsp),%ebx 40202e: 89 c6 mov %eax,%esi 402030: c1 c6 05 rol $0x5,%esi 402033: 45 8d 84 18 dc bc 1b lea -0x70e44324(%r8,%rbx,1),%r8d 40203a: 8f 40203b: 89 d3 mov %edx,%ebx 40203d: 21 cb and %ecx,%ebx 40203f: 44 01 c6 add %r8d,%esi 402042: 44 8d 04 1e lea (%rsi,%rbx,1),%r8d 402046: 89 d6 mov %edx,%esi 402048: 8b 5c 24 e4 mov -0x1c(%rsp),%ebx 40204c: 31 ce xor %ecx,%esi 40204e: 44 21 ce and %r9d,%esi 402051: 41 01 f0 add %esi,%r8d 402054: 8b 74 24 dc mov -0x24(%rsp),%esi 402058: c1 ca 02 ror $0x2,%edx 40205b: 44 31 de xor %r11d,%esi 40205e: 44 33 5c 24 f0 xor -0x10(%rsp),%r11d 402063: 44 31 f6 xor %r14d,%esi 402066: 31 de xor %ebx,%esi 402068: d1 c6 rol %esi 40206a: 89 74 24 dc mov %esi,-0x24(%rsp) 40206e: 8b 5c 24 dc mov -0x24(%rsp),%ebx 402072: 44 89 c6 mov %r8d,%esi 402075: c1 c6 05 rol $0x5,%esi 402078: 45 8d 8c 19 dc bc 1b lea -0x70e44324(%r9,%rbx,1),%r9d 40207f: 8f 402080: 89 c3 mov %eax,%ebx 402082: 21 d3 and %edx,%ebx 402084: 44 01 ce add %r9d,%esi 402087: 44 8d 0c 1e lea (%rsi,%rbx,1),%r9d 40208b: 89 c6 mov %eax,%esi 40208d: 8b 5c 24 d4 mov -0x2c(%rsp),%ebx 402091: 31 d6 xor %edx,%esi 402093: 21 ce and %ecx,%esi 402095: 41 01 f1 add %esi,%r9d 402098: 8b 74 24 e0 mov -0x20(%rsp),%esi 40209c: c1 c8 02 ror $0x2,%eax 40209f: 31 ee xor %ebp,%esi 4020a1: 44 31 fe xor %r15d,%esi 4020a4: 31 de xor %ebx,%esi 4020a6: d1 c6 rol %esi 4020a8: 89 74 24 e0 mov %esi,-0x20(%rsp) 4020ac: 8b 5c 24 e0 mov -0x20(%rsp),%ebx 4020b0: 44 89 ce mov %r9d,%esi 4020b3: c1 c6 05 rol $0x5,%esi 4020b6: 8d 8c 19 dc bc 1b 8f lea -0x70e44324(%rcx,%rbx,1),%ecx 4020bd: 44 89 c3 mov %r8d,%ebx 4020c0: 21 c3 and %eax,%ebx 4020c2: 01 f1 add %esi,%ecx 4020c4: 44 89 c6 mov %r8d,%esi 4020c7: 31 c6 xor %eax,%esi 4020c9: 01 d9 add %ebx,%ecx 4020cb: 8b 5c 24 d8 mov -0x28(%rsp),%ebx 4020cf: 21 d6 and %edx,%esi 4020d1: 01 f1 add %esi,%ecx 4020d3: 8b 74 24 e8 mov -0x18(%rsp),%esi 4020d7: 41 c1 c8 02 ror $0x2,%r8d 4020db: 41 31 f3 xor %esi,%r11d 4020de: 89 ce mov %ecx,%esi 4020e0: 41 31 db xor %ebx,%r11d 4020e3: 44 31 ed xor %r13d,%ebp 4020e6: 41 d1 c3 rol %r11d 4020e9: 42 8d 94 1a dc bc 1b lea -0x70e44324(%rdx,%r11,1),%edx 4020f0: 8f 4020f1: 44 89 5c 24 f4 mov %r11d,-0xc(%rsp) 4020f6: 45 89 cb mov %r9d,%r11d 4020f9: c1 c6 05 rol $0x5,%esi 4020fc: 01 f2 add %esi,%edx 4020fe: 44 89 ce mov %r9d,%esi 402101: 45 21 c3 and %r8d,%r11d 402104: 44 31 c6 xor %r8d,%esi 402107: 44 01 da add %r11d,%edx 40210a: 44 8b 5c 24 dc mov -0x24(%rsp),%r11d 40210f: 21 c6 and %eax,%esi 402111: 8b 5c 24 f0 mov -0x10(%rsp),%ebx 402115: 01 f2 add %esi,%edx 402117: 8b 74 24 ec mov -0x14(%rsp),%esi 40211b: 41 c1 c9 02 ror $0x2,%r9d 40211f: 44 31 e3 xor %r12d,%ebx 402122: 31 f5 xor %esi,%ebp 402124: 89 d6 mov %edx,%esi 402126: 44 31 dd xor %r11d,%ebp 402129: 41 89 cb mov %ecx,%r11d 40212c: d1 c5 rol %ebp 40212e: 8d 84 28 dc bc 1b 8f lea -0x70e44324(%rax,%rbp,1),%eax 402135: 45 21 cb and %r9d,%r11d 402138: 89 6c 24 fc mov %ebp,-0x4(%rsp) 40213c: c1 c6 05 rol $0x5,%esi 40213f: 01 f0 add %esi,%eax 402141: 89 ce mov %ecx,%esi 402143: 8b 6c 24 e0 mov -0x20(%rsp),%ebp 402147: 44 31 ce xor %r9d,%esi 40214a: 44 01 d8 add %r11d,%eax 40214d: 45 89 d3 mov %r10d,%r11d 402150: 44 21 c6 and %r8d,%esi 402153: 01 f0 add %esi,%eax 402155: 8b 74 24 f8 mov -0x8(%rsp),%esi 402159: c1 c9 02 ror $0x2,%ecx 40215c: 31 f3 xor %esi,%ebx 40215e: 89 c6 mov %eax,%esi 402160: 31 eb xor %ebp,%ebx 402162: 44 89 fd mov %r15d,%ebp 402165: d1 c3 rol %ebx 402167: 45 8d 84 18 dc bc 1b lea -0x70e44324(%r8,%rbx,1),%r8d 40216e: 8f 40216f: 89 5c 24 f0 mov %ebx,-0x10(%rsp) 402173: 44 89 f3 mov %r14d,%ebx 402176: c1 c6 05 rol $0x5,%esi 402179: 44 01 c6 add %r8d,%esi 40217c: 41 89 d0 mov %edx,%r8d 40217f: 41 21 c8 and %ecx,%r8d 402182: 44 01 c6 add %r8d,%esi 402185: 41 89 d0 mov %edx,%r8d 402188: 41 31 c8 xor %ecx,%r8d 40218b: 45 21 c8 and %r9d,%r8d 40218e: 44 01 c6 add %r8d,%esi 402191: c1 ca 02 ror $0x2,%edx 402194: 45 31 eb xor %r13d,%r11d 402197: 44 33 5c 24 e4 xor -0x1c(%rsp),%r11d 40219c: 41 89 f0 mov %esi,%r8d 40219f: 44 33 5c 24 f4 xor -0xc(%rsp),%r11d 4021a4: 44 31 e3 xor %r12d,%ebx 4021a7: 33 5c 24 d4 xor -0x2c(%rsp),%ebx 4021ab: 41 d1 c3 rol %r11d 4021ae: 47 8d 8c 19 dc bc 1b lea -0x70e44324(%r9,%r11,1),%r9d 4021b5: 8f 4021b6: 33 5c 24 fc xor -0x4(%rsp),%ebx 4021ba: 44 31 d5 xor %r10d,%ebp 4021bd: 41 c1 c0 05 rol $0x5,%r8d 4021c1: 45 01 c8 add %r9d,%r8d 4021c4: 41 89 c1 mov %eax,%r9d 4021c7: 33 6c 24 d8 xor -0x28(%rsp),%ebp 4021cb: 41 21 d1 and %edx,%r9d 4021ce: 33 6c 24 f0 xor -0x10(%rsp),%ebp 4021d2: 44 8b 54 24 e8 mov -0x18(%rsp),%r10d 4021d7: 45 01 c8 add %r9d,%r8d 4021da: 41 89 c1 mov %eax,%r9d 4021dd: 44 8b 64 24 f8 mov -0x8(%rsp),%r12d 4021e2: 41 31 d1 xor %edx,%r9d 4021e5: 44 8b 6c 24 e4 mov -0x1c(%rsp),%r13d 4021ea: d1 c3 rol %ebx 4021ec: 41 21 c9 and %ecx,%r9d 4021ef: 8d 8c 19 dc bc 1b 8f lea -0x70e44324(%rcx,%rbx,1),%ecx 4021f6: 45 01 c8 add %r9d,%r8d 4021f9: 45 89 c1 mov %r8d,%r9d 4021fc: 41 c1 c1 05 rol $0x5,%r9d 402200: 41 01 c9 add %ecx,%r9d 402203: 89 f1 mov %esi,%ecx 402205: c1 c8 02 ror $0x2,%eax 402208: 21 c1 and %eax,%ecx 40220a: 41 01 c9 add %ecx,%r9d 40220d: 89 f1 mov %esi,%ecx 40220f: 31 c1 xor %eax,%ecx 402211: d1 c5 rol %ebp 402213: 21 d1 and %edx,%ecx 402215: 8d 94 2a dc bc 1b 8f lea -0x70e44324(%rdx,%rbp,1),%edx 40221c: 41 01 c9 add %ecx,%r9d 40221f: 44 89 c9 mov %r9d,%ecx 402222: c1 c1 05 rol $0x5,%ecx 402225: 01 d1 add %edx,%ecx 402227: 44 89 c2 mov %r8d,%edx 40222a: c1 ce 02 ror $0x2,%esi 40222d: 21 f2 and %esi,%edx 40222f: 01 d1 add %edx,%ecx 402231: 44 89 c2 mov %r8d,%edx 402234: 31 f2 xor %esi,%edx 402236: 45 31 f2 xor %r14d,%r10d 402239: 44 33 54 24 dc xor -0x24(%rsp),%r10d 40223e: 21 c2 and %eax,%edx 402240: 44 33 7c 24 ec xor -0x14(%rsp),%r15d 402245: 44 33 64 24 e8 xor -0x18(%rsp),%r12d 40224a: 01 d1 add %edx,%ecx 40224c: 44 33 7c 24 e0 xor -0x20(%rsp),%r15d 402251: 44 33 64 24 f4 xor -0xc(%rsp),%r12d 402256: 89 ca mov %ecx,%edx 402258: 44 8b 74 24 d4 mov -0x2c(%rsp),%r14d 40225d: 45 31 da xor %r11d,%r10d 402260: 41 d1 c2 rol %r10d 402263: 42 8d 84 10 dc bc 1b lea -0x70e44324(%rax,%r10,1),%eax 40226a: 8f 40226b: 41 31 df xor %ebx,%r15d 40226e: 41 31 ec xor %ebp,%r12d 402271: c1 c2 05 rol $0x5,%edx 402274: 01 c2 add %eax,%edx 402276: 44 89 c8 mov %r9d,%eax 402279: 41 c1 c8 02 ror $0x2,%r8d 40227d: 44 21 c0 and %r8d,%eax 402280: 01 c2 add %eax,%edx 402282: 44 89 c8 mov %r9d,%eax 402285: 44 31 c0 xor %r8d,%eax 402288: 41 d1 c7 rol %r15d 40228b: 21 f0 and %esi,%eax 40228d: 42 8d b4 3e dc bc 1b lea -0x70e44324(%rsi,%r15,1),%esi 402294: 8f 402295: 01 c2 add %eax,%edx 402297: 89 d0 mov %edx,%eax 402299: c1 c0 05 rol $0x5,%eax 40229c: 01 f0 add %esi,%eax 40229e: 89 ce mov %ecx,%esi 4022a0: 41 c1 c9 02 ror $0x2,%r9d 4022a4: 44 21 ce and %r9d,%esi 4022a7: 01 f0 add %esi,%eax 4022a9: 89 ce mov %ecx,%esi 4022ab: 44 31 ce xor %r9d,%esi 4022ae: 41 d1 c4 rol %r12d 4022b1: 44 21 c6 and %r8d,%esi 4022b4: 47 8d 84 20 dc bc 1b lea -0x70e44324(%r8,%r12,1),%r8d 4022bb: 8f 4022bc: 01 f0 add %esi,%eax 4022be: c1 c9 02 ror $0x2,%ecx 4022c1: 89 c6 mov %eax,%esi 4022c3: c1 c6 05 rol $0x5,%esi 4022c6: 44 01 c6 add %r8d,%esi 4022c9: 44 33 6c 24 ec xor -0x14(%rsp),%r13d 4022ce: 41 89 d0 mov %edx,%r8d 4022d1: 44 33 6c 24 fc xor -0x4(%rsp),%r13d 4022d6: 41 21 c8 and %ecx,%r8d 4022d9: 44 33 74 24 f8 xor -0x8(%rsp),%r14d 4022de: 44 01 c6 add %r8d,%esi 4022e1: 41 89 d0 mov %edx,%r8d 4022e4: 44 33 74 24 f0 xor -0x10(%rsp),%r14d 4022e9: 41 31 c8 xor %ecx,%r8d 4022ec: 45 21 c8 and %r9d,%r8d 4022ef: 45 31 d5 xor %r10d,%r13d 4022f2: 44 01 c6 add %r8d,%esi 4022f5: 41 d1 c5 rol %r13d 4022f8: 47 8d 8c 29 dc bc 1b lea -0x70e44324(%r9,%r13,1),%r9d 4022ff: 8f 402300: 41 89 f0 mov %esi,%r8d 402303: 45 31 fe xor %r15d,%r14d 402306: c1 ca 02 ror $0x2,%edx 402309: 41 c1 c0 05 rol $0x5,%r8d 40230d: 45 01 c8 add %r9d,%r8d 402310: 41 89 d1 mov %edx,%r9d 402313: 41 21 c1 and %eax,%r9d 402316: 45 01 c8 add %r9d,%r8d 402319: 41 89 d1 mov %edx,%r9d 40231c: 41 31 c1 xor %eax,%r9d 40231f: 41 21 c9 and %ecx,%r9d 402322: c1 c8 02 ror $0x2,%eax 402325: 41 d1 c6 rol %r14d 402328: 42 8d 8c 31 dc bc 1b lea -0x70e44324(%rcx,%r14,1),%ecx 40232f: 8f 402330: 45 01 c8 add %r9d,%r8d 402333: 89 44 24 ec mov %eax,-0x14(%rsp) 402337: 45 89 c1 mov %r8d,%r9d 40233a: 41 c1 c1 05 rol $0x5,%r9d 40233e: 41 01 c9 add %ecx,%r9d 402341: 89 c1 mov %eax,%ecx 402343: 21 f1 and %esi,%ecx 402345: 41 01 c9 add %ecx,%r9d 402348: 89 c1 mov %eax,%ecx 40234a: 8b 44 24 d8 mov -0x28(%rsp),%eax 40234e: 33 44 24 e4 xor -0x1c(%rsp),%eax 402352: 31 f1 xor %esi,%ecx 402354: 21 d1 and %edx,%ecx 402356: c1 ce 02 ror $0x2,%esi 402359: 41 01 c9 add %ecx,%r9d 40235c: 89 74 24 f8 mov %esi,-0x8(%rsp) 402360: 44 31 d8 xor %r11d,%eax 402363: 44 89 c9 mov %r9d,%ecx 402366: 44 31 e0 xor %r12d,%eax 402369: d1 c0 rol %eax 40236b: 89 44 24 e4 mov %eax,-0x1c(%rsp) 40236f: 8d 84 02 dc bc 1b 8f lea -0x70e44324(%rdx,%rax,1),%eax 402376: 89 f2 mov %esi,%edx 402378: 44 21 c2 and %r8d,%edx 40237b: c1 c1 05 rol $0x5,%ecx 40237e: 01 c1 add %eax,%ecx 402380: 01 d1 add %edx,%ecx 402382: 89 f2 mov %esi,%edx 402384: 44 31 c2 xor %r8d,%edx 402387: 23 54 24 ec and -0x14(%rsp),%edx 40238b: 41 c1 c8 02 ror $0x2,%r8d 40238f: 44 89 44 24 e8 mov %r8d,-0x18(%rsp) 402394: 01 d1 add %edx,%ecx 402396: 8b 54 24 dc mov -0x24(%rsp),%edx 40239a: 33 54 24 d4 xor -0x2c(%rsp),%edx 40239e: 31 da xor %ebx,%edx 4023a0: 44 31 ea xor %r13d,%edx 4023a3: d1 c2 rol %edx 4023a5: 89 54 24 d4 mov %edx,-0x2c(%rsp) 4023a9: 8b 44 24 ec mov -0x14(%rsp),%eax 4023ad: 89 ca mov %ecx,%edx 4023af: 44 8b 44 24 d4 mov -0x2c(%rsp),%r8d 4023b4: c1 c2 05 rol $0x5,%edx 4023b7: 42 8d b4 00 dc bc 1b lea -0x70e44324(%rax,%r8,1),%esi 4023be: 8f 4023bf: 8b 44 24 e8 mov -0x18(%rsp),%eax 4023c3: 01 f2 add %esi,%edx 4023c5: 8b 74 24 e0 mov -0x20(%rsp),%esi 4023c9: 33 74 24 d8 xor -0x28(%rsp),%esi 4023cd: 44 21 c8 and %r9d,%eax 4023d0: 01 c2 add %eax,%edx 4023d2: 8b 44 24 e8 mov -0x18(%rsp),%eax 4023d6: 31 ee xor %ebp,%esi 4023d8: 44 31 c8 xor %r9d,%eax 4023db: 23 44 24 f8 and -0x8(%rsp),%eax 4023df: 44 31 f6 xor %r14d,%esi 4023e2: 41 c1 c9 02 ror $0x2,%r9d 4023e6: 44 89 4c 24 ec mov %r9d,-0x14(%rsp) 4023eb: 44 8b 4c 24 f8 mov -0x8(%rsp),%r9d 4023f0: d1 c6 rol %esi 4023f2: 89 74 24 d8 mov %esi,-0x28(%rsp) 4023f6: 01 c2 add %eax,%edx 4023f8: 45 8d 84 31 dc bc 1b lea -0x70e44324(%r9,%rsi,1),%r8d 4023ff: 8f 402400: 8b 74 24 ec mov -0x14(%rsp),%esi 402404: 89 d0 mov %edx,%eax 402406: c1 c0 05 rol $0x5,%eax 402409: 44 01 c0 add %r8d,%eax 40240c: 44 8b 44 24 e8 mov -0x18(%rsp),%r8d 402411: 44 8b 4c 24 fc mov -0x4(%rsp),%r9d 402416: 21 ce and %ecx,%esi 402418: 01 f0 add %esi,%eax 40241a: 8b 74 24 ec mov -0x14(%rsp),%esi 40241e: 31 ce xor %ecx,%esi 402420: 23 74 24 e8 and -0x18(%rsp),%esi 402424: 01 f0 add %esi,%eax 402426: 8b 74 24 e4 mov -0x1c(%rsp),%esi 40242a: c1 c9 02 ror $0x2,%ecx 40242d: 89 4c 24 f8 mov %ecx,-0x8(%rsp) 402431: 8b 4c 24 f4 mov -0xc(%rsp),%ecx 402435: 33 4c 24 dc xor -0x24(%rsp),%ecx 402439: 44 33 4c 24 e0 xor -0x20(%rsp),%r9d 40243e: 44 31 d1 xor %r10d,%ecx 402441: 45 31 f9 xor %r15d,%r9d 402444: 31 f1 xor %esi,%ecx 402446: 89 c6 mov %eax,%esi 402448: d1 c1 rol %ecx 40244a: 89 4c 24 dc mov %ecx,-0x24(%rsp) 40244e: 41 8d 8c 08 dc bc 1b lea -0x70e44324(%r8,%rcx,1),%ecx 402455: 8f 402456: 44 8b 44 24 f8 mov -0x8(%rsp),%r8d 40245b: c1 c6 05 rol $0x5,%esi 40245e: 01 ce add %ecx,%esi 402460: 8b 4c 24 ec mov -0x14(%rsp),%ecx 402464: 41 21 d0 and %edx,%r8d 402467: 44 01 c6 add %r8d,%esi 40246a: 44 8b 44 24 f8 mov -0x8(%rsp),%r8d 40246f: 41 31 d0 xor %edx,%r8d 402472: 44 23 44 24 ec and -0x14(%rsp),%r8d 402477: c1 ca 02 ror $0x2,%edx 40247a: 89 54 24 e8 mov %edx,-0x18(%rsp) 40247e: 8b 54 24 d4 mov -0x2c(%rsp),%edx 402482: 44 01 c6 add %r8d,%esi 402485: 41 31 d1 xor %edx,%r9d 402488: 41 89 f0 mov %esi,%r8d 40248b: 41 d1 c1 rol %r9d 40248e: 42 8d 94 09 d6 c1 62 lea -0x359d3e2a(%rcx,%r9,1),%edx 402495: ca 402496: 44 89 4c 24 e0 mov %r9d,-0x20(%rsp) 40249b: 44 8b 4c 24 e8 mov -0x18(%rsp),%r9d 4024a0: 44 33 4c 24 f8 xor -0x8(%rsp),%r9d 4024a5: 41 c1 c0 05 rol $0x5,%r8d 4024a9: 41 01 d0 add %edx,%r8d 4024ac: 41 31 c1 xor %eax,%r9d 4024af: 45 01 c8 add %r9d,%r8d 4024b2: 44 8b 4c 24 f0 mov -0x10(%rsp),%r9d 4024b7: 44 33 4c 24 f4 xor -0xc(%rsp),%r9d 4024bc: c1 c8 02 ror $0x2,%eax 4024bf: 89 44 24 ec mov %eax,-0x14(%rsp) 4024c3: 8b 44 24 d8 mov -0x28(%rsp),%eax 4024c7: 45 31 e1 xor %r12d,%r9d 4024ca: 41 31 c1 xor %eax,%r9d 4024cd: 41 d1 c1 rol %r9d 4024d0: 44 89 4c 24 f4 mov %r9d,-0xc(%rsp) 4024d5: 8b 4c 24 f8 mov -0x8(%rsp),%ecx 4024d9: 45 89 c1 mov %r8d,%r9d 4024dc: 8b 54 24 f4 mov -0xc(%rsp),%edx 4024e0: 41 c1 c1 05 rol $0x5,%r9d 4024e4: 8d 84 11 d6 c1 62 ca lea -0x359d3e2a(%rcx,%rdx,1),%eax 4024eb: 8b 4c 24 ec mov -0x14(%rsp),%ecx 4024ef: 33 4c 24 e8 xor -0x18(%rsp),%ecx 4024f3: 8b 54 24 dc mov -0x24(%rsp),%edx 4024f7: 41 01 c1 add %eax,%r9d 4024fa: 8b 44 24 fc mov -0x4(%rsp),%eax 4024fe: 31 f1 xor %esi,%ecx 402500: 41 01 c9 add %ecx,%r9d 402503: c1 ce 02 ror $0x2,%esi 402506: 44 31 d8 xor %r11d,%eax 402509: 44 89 c9 mov %r9d,%ecx 40250c: 41 31 eb xor %ebp,%r11d 40250f: 44 31 e8 xor %r13d,%eax 402512: 31 d0 xor %edx,%eax 402514: 8b 54 24 e8 mov -0x18(%rsp),%edx 402518: d1 c0 rol %eax 40251a: c1 c1 05 rol $0x5,%ecx 40251d: 8d 94 02 d6 c1 62 ca lea -0x359d3e2a(%rdx,%rax,1),%edx 402524: 89 44 24 fc mov %eax,-0x4(%rsp) 402528: 8b 44 24 e0 mov -0x20(%rsp),%eax 40252c: 01 d1 add %edx,%ecx 40252e: 8b 54 24 ec mov -0x14(%rsp),%edx 402532: 31 f2 xor %esi,%edx 402534: 44 31 c2 xor %r8d,%edx 402537: 01 ca add %ecx,%edx 402539: 8b 4c 24 f0 mov -0x10(%rsp),%ecx 40253d: 89 54 24 f8 mov %edx,-0x8(%rsp) 402541: 41 c1 c8 02 ror $0x2,%r8d 402545: 31 d9 xor %ebx,%ecx 402547: 44 31 d3 xor %r10d,%ebx 40254a: 44 31 f1 xor %r14d,%ecx 40254d: 31 c1 xor %eax,%ecx 40254f: 8b 44 24 ec mov -0x14(%rsp),%eax 402553: d1 c1 rol %ecx 402555: c1 c2 05 rol $0x5,%edx 402558: 8d 84 08 d6 c1 62 ca lea -0x359d3e2a(%rax,%rcx,1),%eax 40255f: 89 4c 24 f0 mov %ecx,-0x10(%rsp) 402563: 8b 4c 24 e4 mov -0x1c(%rsp),%ecx 402567: 01 c2 add %eax,%edx 402569: 44 89 c0 mov %r8d,%eax 40256c: 31 f0 xor %esi,%eax 40256e: 41 31 cb xor %ecx,%r11d 402571: 8b 4c 24 f8 mov -0x8(%rsp),%ecx 402575: 44 31 c8 xor %r9d,%eax 402578: 01 c2 add %eax,%edx 40257a: 8b 44 24 f4 mov -0xc(%rsp),%eax 40257e: 41 c1 c9 02 ror $0x2,%r9d 402582: c1 c9 02 ror $0x2,%ecx 402585: 41 31 c3 xor %eax,%r11d 402588: 89 d0 mov %edx,%eax 40258a: 41 d1 c3 rol %r11d 40258d: 42 8d b4 1e d6 c1 62 lea -0x359d3e2a(%rsi,%r11,1),%esi 402594: ca 402595: 44 89 5c 24 e8 mov %r11d,-0x18(%rsp) 40259a: 44 8b 5c 24 fc mov -0x4(%rsp),%r11d 40259f: c1 c0 05 rol $0x5,%eax 4025a2: 01 f0 add %esi,%eax 4025a4: 44 89 ce mov %r9d,%esi 4025a7: 44 31 c6 xor %r8d,%esi 4025aa: 33 74 24 f8 xor -0x8(%rsp),%esi 4025ae: 01 f0 add %esi,%eax 4025b0: 8b 74 24 d4 mov -0x2c(%rsp),%esi 4025b4: 31 f3 xor %esi,%ebx 4025b6: 89 c6 mov %eax,%esi 4025b8: 44 31 db xor %r11d,%ebx 4025bb: d1 c3 rol %ebx 4025bd: 45 8d 84 18 d6 c1 62 lea -0x359d3e2a(%r8,%rbx,1),%r8d 4025c4: ca 4025c5: 44 31 fd xor %r15d,%ebp 4025c8: 33 6c 24 d8 xor -0x28(%rsp),%ebp 4025cc: c1 c6 05 rol $0x5,%esi 4025cf: 44 01 c6 add %r8d,%esi 4025d2: 41 89 c8 mov %ecx,%r8d 4025d5: 33 6c 24 f0 xor -0x10(%rsp),%ebp 4025d9: 45 31 c8 xor %r9d,%r8d 4025dc: 89 5c 24 ec mov %ebx,-0x14(%rsp) 4025e0: 44 89 e3 mov %r12d,%ebx 4025e3: 41 31 d0 xor %edx,%r8d 4025e6: 44 31 d3 xor %r10d,%ebx 4025e9: 33 5c 24 dc xor -0x24(%rsp),%ebx 4025ed: c1 ca 02 ror $0x2,%edx 4025f0: d1 c5 rol %ebp 4025f2: 45 8d 8c 29 d6 c1 62 lea -0x359d3e2a(%r9,%rbp,1),%r9d 4025f9: ca 4025fa: 44 01 c6 add %r8d,%esi 4025fd: 33 5c 24 e8 xor -0x18(%rsp),%ebx 402601: 41 89 f0 mov %esi,%r8d 402604: 41 c1 c0 05 rol $0x5,%r8d 402608: 45 01 c8 add %r9d,%r8d 40260b: 41 89 d1 mov %edx,%r9d 40260e: 41 31 c9 xor %ecx,%r9d 402611: d1 c3 rol %ebx 402613: 41 31 c1 xor %eax,%r9d 402616: 44 8d 9c 19 d6 c1 62 lea -0x359d3e2a(%rcx,%rbx,1),%r11d 40261d: ca 40261e: c1 c8 02 ror $0x2,%eax 402621: 89 c1 mov %eax,%ecx 402623: 45 01 c8 add %r9d,%r8d 402626: 31 d1 xor %edx,%ecx 402628: 45 89 c1 mov %r8d,%r9d 40262b: 31 f1 xor %esi,%ecx 40262d: 41 c1 c1 05 rol $0x5,%r9d 402631: 45 01 cb add %r9d,%r11d 402634: 41 01 cb add %ecx,%r11d 402637: 44 89 e9 mov %r13d,%ecx 40263a: 44 31 f9 xor %r15d,%ecx 40263d: 33 4c 24 e0 xor -0x20(%rsp),%ecx 402641: 45 89 d9 mov %r11d,%r9d 402644: 33 4c 24 ec xor -0x14(%rsp),%ecx 402648: d1 c1 rol %ecx 40264a: 44 8d 94 0a d6 c1 62 lea -0x359d3e2a(%rdx,%rcx,1),%r10d 402651: ca 402652: c1 ce 02 ror $0x2,%esi 402655: 89 f2 mov %esi,%edx 402657: 41 c1 c1 05 rol $0x5,%r9d 40265b: 45 01 ca add %r9d,%r10d 40265e: 31 c2 xor %eax,%edx 402660: 44 31 c2 xor %r8d,%edx 402663: 41 01 d2 add %edx,%r10d 402666: 44 89 f2 mov %r14d,%edx 402669: 44 31 e2 xor %r12d,%edx 40266c: 33 54 24 f4 xor -0xc(%rsp),%edx 402670: 45 89 d1 mov %r10d,%r9d 402673: 41 c1 c8 02 ror $0x2,%r8d 402677: 41 c1 c1 05 rol $0x5,%r9d 40267b: 31 ea xor %ebp,%edx 40267d: d1 c2 rol %edx 40267f: 44 8d bc 10 d6 c1 62 lea -0x359d3e2a(%rax,%rdx,1),%r15d 402686: ca 402687: 44 89 c0 mov %r8d,%eax 40268a: 31 f0 xor %esi,%eax 40268c: 44 31 d8 xor %r11d,%eax 40268f: 45 01 cf add %r9d,%r15d 402692: 41 01 c7 add %eax,%r15d 402695: 8b 44 24 e4 mov -0x1c(%rsp),%eax 402699: 41 c1 cb 02 ror $0x2,%r11d 40269d: 45 89 f9 mov %r15d,%r9d 4026a0: 44 31 e8 xor %r13d,%eax 4026a3: 33 44 24 fc xor -0x4(%rsp),%eax 4026a7: 41 c1 c1 05 rol $0x5,%r9d 4026ab: 31 d8 xor %ebx,%eax 4026ad: d1 c0 rol %eax 4026af: 44 8d ac 06 d6 c1 62 lea -0x359d3e2a(%rsi,%rax,1),%r13d 4026b6: ca 4026b7: 44 89 de mov %r11d,%esi 4026ba: 44 31 c6 xor %r8d,%esi 4026bd: 44 31 d6 xor %r10d,%esi 4026c0: 45 01 cd add %r9d,%r13d 4026c3: 41 01 f5 add %esi,%r13d 4026c6: 8b 74 24 d4 mov -0x2c(%rsp),%esi 4026ca: 41 c1 ca 02 ror $0x2,%r10d 4026ce: 45 89 e9 mov %r13d,%r9d 4026d1: 44 31 f6 xor %r14d,%esi 4026d4: 33 74 24 f0 xor -0x10(%rsp),%esi 4026d8: 41 c1 c1 05 rol $0x5,%r9d 4026dc: 31 ce xor %ecx,%esi 4026de: d1 c6 rol %esi 4026e0: 45 8d a4 30 d6 c1 62 lea -0x359d3e2a(%r8,%rsi,1),%r12d 4026e7: ca 4026e8: 45 89 d0 mov %r10d,%r8d 4026eb: 45 31 d8 xor %r11d,%r8d 4026ee: 45 01 cc add %r9d,%r12d 4026f1: 45 31 f8 xor %r15d,%r8d 4026f4: 45 01 c4 add %r8d,%r12d 4026f7: 44 8b 44 24 d8 mov -0x28(%rsp),%r8d 4026fc: 41 c1 cf 02 ror $0x2,%r15d 402700: 44 33 44 24 e4 xor -0x1c(%rsp),%r8d 402705: 45 89 e1 mov %r12d,%r9d 402708: 44 33 44 24 e8 xor -0x18(%rsp),%r8d 40270d: 41 c1 c1 05 rol $0x5,%r9d 402711: 41 31 d0 xor %edx,%r8d 402714: 41 d1 c0 rol %r8d 402717: 47 8d 9c 03 d6 c1 62 lea -0x359d3e2a(%r11,%r8,1),%r11d 40271e: ca 40271f: 45 01 d9 add %r11d,%r9d 402722: 45 89 fb mov %r15d,%r11d 402725: 45 31 d3 xor %r10d,%r11d 402728: 45 31 eb xor %r13d,%r11d 40272b: 45 01 d9 add %r11d,%r9d 40272e: 44 8b 5c 24 dc mov -0x24(%rsp),%r11d 402733: 44 33 5c 24 d4 xor -0x2c(%rsp),%r11d 402738: 44 33 5c 24 ec xor -0x14(%rsp),%r11d 40273d: 45 89 ce mov %r9d,%r14d 402740: 41 c1 cd 02 ror $0x2,%r13d 402744: 41 c1 c6 05 rol $0x5,%r14d 402748: 41 31 c3 xor %eax,%r11d 40274b: 41 d1 c3 rol %r11d 40274e: 47 8d 94 1a d6 c1 62 lea -0x359d3e2a(%r10,%r11,1),%r10d 402755: ca 402756: 45 01 d6 add %r10d,%r14d 402759: 45 89 ea mov %r13d,%r10d 40275c: 45 31 fa xor %r15d,%r10d 40275f: 45 31 e2 xor %r12d,%r10d 402762: 45 01 d6 add %r10d,%r14d 402765: 44 8b 54 24 e0 mov -0x20(%rsp),%r10d 40276a: 44 33 54 24 d8 xor -0x28(%rsp),%r10d 40276f: 41 c1 cc 02 ror $0x2,%r12d 402773: 41 31 ea xor %ebp,%r10d 402776: 44 89 f5 mov %r14d,%ebp 402779: 41 31 f2 xor %esi,%r10d 40277c: 41 d1 c2 rol %r10d 40277f: 47 8d bc 17 d6 c1 62 lea -0x359d3e2a(%r15,%r10,1),%r15d 402786: ca 402787: c1 c5 05 rol $0x5,%ebp 40278a: 41 01 ef add %ebp,%r15d 40278d: 44 89 e5 mov %r12d,%ebp 402790: 44 31 ed xor %r13d,%ebp 402793: 44 31 cd xor %r9d,%ebp 402796: 41 01 ef add %ebp,%r15d 402799: 44 89 cd mov %r9d,%ebp 40279c: 44 8b 4c 24 f4 mov -0xc(%rsp),%r9d 4027a1: 44 33 4c 24 dc xor -0x24(%rsp),%r9d 4027a6: c1 cd 02 ror $0x2,%ebp 4027a9: 41 31 d9 xor %ebx,%r9d 4027ac: 45 31 c1 xor %r8d,%r9d 4027af: 45 89 f8 mov %r15d,%r8d 4027b2: 41 d1 c1 rol %r9d 4027b5: 43 8d 9c 0d d6 c1 62 lea -0x359d3e2a(%r13,%r9,1),%ebx 4027bc: ca 4027bd: 44 8b 6c 24 e8 mov -0x18(%rsp),%r13d 4027c2: 44 33 6c 24 fc xor -0x4(%rsp),%r13d 4027c7: 41 c1 c0 05 rol $0x5,%r8d 4027cb: 44 01 c3 add %r8d,%ebx 4027ce: 41 89 e8 mov %ebp,%r8d 4027d1: 45 31 e0 xor %r12d,%r8d 4027d4: 45 31 f0 xor %r14d,%r8d 4027d7: 41 31 c5 xor %eax,%r13d 4027da: 44 01 c3 add %r8d,%ebx 4027dd: 44 8b 44 24 fc mov -0x4(%rsp),%r8d 4027e2: 44 33 44 24 e0 xor -0x20(%rsp),%r8d 4027e7: 41 c1 ce 02 ror $0x2,%r14d 4027eb: 45 31 cd xor %r9d,%r13d 4027ee: 41 31 c8 xor %ecx,%r8d 4027f1: 89 d9 mov %ebx,%ecx 4027f3: 45 31 d8 xor %r11d,%r8d 4027f6: 41 d1 c0 rol %r8d 4027f9: 47 8d 9c 04 d6 c1 62 lea -0x359d3e2a(%r12,%r8,1),%r11d 402800: ca 402801: 44 8b 64 24 ec mov -0x14(%rsp),%r12d 402806: c1 c1 05 rol $0x5,%ecx 402809: 41 01 cb add %ecx,%r11d 40280c: 44 89 f1 mov %r14d,%ecx 40280f: 31 e9 xor %ebp,%ecx 402811: 44 31 f9 xor %r15d,%ecx 402814: 41 01 cb add %ecx,%r11d 402817: 8b 4c 24 f0 mov -0x10(%rsp),%ecx 40281b: 33 4c 24 f4 xor -0xc(%rsp),%ecx 40281f: 41 c1 cf 02 ror $0x2,%r15d 402823: 31 d1 xor %edx,%ecx 402825: 44 89 da mov %r11d,%edx 402828: 44 31 d1 xor %r10d,%ecx 40282b: d1 c1 rol %ecx 40282d: 8d 8c 0d d6 c1 62 ca lea -0x359d3e2a(%rbp,%rcx,1),%ecx 402834: c1 c2 05 rol $0x5,%edx 402837: 01 ca add %ecx,%edx 402839: 44 89 f9 mov %r15d,%ecx 40283c: 44 31 f1 xor %r14d,%ecx 40283f: 31 d9 xor %ebx,%ecx 402841: 01 ca add %ecx,%edx 402843: 41 d1 c5 rol %r13d 402846: 43 8d 8c 2e d6 c1 62 lea -0x359d3e2a(%r14,%r13,1),%ecx 40284d: ca 40284e: 89 d0 mov %edx,%eax 402850: 44 8b 77 08 mov 0x8(%rdi),%r14d 402854: c1 cb 02 ror $0x2,%ebx 402857: c1 c0 05 rol $0x5,%eax 40285a: 01 c8 add %ecx,%eax 40285c: 44 33 64 24 f0 xor -0x10(%rsp),%r12d 402861: 89 d9 mov %ebx,%ecx 402863: 44 31 f9 xor %r15d,%ecx 402866: 44 31 d9 xor %r11d,%ecx 402869: 01 c8 add %ecx,%eax 40286b: 43 8d 8c 3e d6 c1 62 lea -0x359d3e2a(%r14,%r15,1),%ecx 402872: ca 402873: 41 31 f4 xor %esi,%r12d 402876: 89 d6 mov %edx,%esi 402878: 41 c1 cb 02 ror $0x2,%r11d 40287c: 45 31 c4 xor %r8d,%r12d 40287f: 41 89 c0 mov %eax,%r8d 402882: 41 d1 c4 rol %r12d 402885: 41 01 cc add %ecx,%r12d 402888: 44 89 d9 mov %r11d,%ecx 40288b: 31 d9 xor %ebx,%ecx 40288d: 41 c1 c0 05 rol $0x5,%r8d 402891: 31 d1 xor %edx,%ecx 402893: 45 01 e0 add %r12d,%r8d 402896: 44 01 c1 add %r8d,%ecx 402899: 89 4f 08 mov %ecx,0x8(%rdi) 40289c: 03 5f 18 add 0x18(%rdi),%ebx 40289f: c1 ce 02 ror $0x2,%esi 4028a2: 03 47 0c add 0xc(%rdi),%eax 4028a5: 03 77 10 add 0x10(%rdi),%esi 4028a8: 44 03 5f 14 add 0x14(%rdi),%r11d 4028ac: 89 5f 18 mov %ebx,0x18(%rdi) 4028af: 5b pop %rbx 4028b0: 5d pop %rbp 4028b1: 41 5c pop %r12 4028b3: 41 5d pop %r13 4028b5: 41 5e pop %r14 4028b7: 89 47 0c mov %eax,0xc(%rdi) 4028ba: 89 77 10 mov %esi,0x10(%rdi) 4028bd: 44 89 5f 14 mov %r11d,0x14(%rdi) 4028c1: 41 5f pop %r15 4028c3: c3 retq 4028c4: 66 66 66 2e 0f 1f 84 data32 data32 nopw %cs:0x0(%rax,%rax,1) 4028cb: 00 00 00 00 00 4028d0: 48 c7 07 00 00 00 00 movq $0x0,(%rdi) 4028d7: c7 47 08 01 23 45 67 movl $0x67452301,0x8(%rdi) 4028de: c7 47 0c 89 ab cd ef movl $0xefcdab89,0xc(%rdi) 4028e5: c7 47 10 fe dc ba 98 movl $0x98badcfe,0x10(%rdi) 4028ec: c7 47 14 76 54 32 10 movl $0x10325476,0x14(%rdi) 4028f3: c7 47 18 f0 e1 d2 c3 movl $0xc3d2e1f0,0x18(%rdi) 4028fa: c3 retq 4028fb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 402900: 48 89 5c 24 d0 mov %rbx,-0x30(%rsp) 402905: 4c 89 64 24 e0 mov %r12,-0x20(%rsp) 40290a: 49 89 fc mov %rdi,%r12 40290d: 4c 89 6c 24 e8 mov %r13,-0x18(%rsp) 402912: 4c 89 74 24 f0 mov %r14,-0x10(%rsp) 402917: 49 89 d5 mov %rdx,%r13 40291a: 48 89 6c 24 d8 mov %rbp,-0x28(%rsp) 40291f: 4c 89 7c 24 f8 mov %r15,-0x8(%rsp) 402924: 48 83 ec 48 sub $0x48,%rsp 402928: 48 8b 07 mov (%rdi),%rax 40292b: 49 89 f6 mov %rsi,%r14 40292e: 48 89 c7 mov %rax,%rdi 402931: 48 01 d0 add %rdx,%rax 402934: 83 e7 3f and $0x3f,%edi 402937: 49 89 04 24 mov %rax,(%r12) 40293b: 85 ff test %edi,%edi 40293d: 89 fb mov %edi,%ebx 40293f: 74 70 je 4029b1 <socket@plt+0x14e1> 402941: bd 40 00 00 00 mov $0x40,%ebp 402946: 29 fd sub %edi,%ebp 402948: 41 89 ef mov %ebp,%r15d 40294b: 4c 39 fa cmp %r15,%rdx 40294e: 73 05 jae 402955 <socket@plt+0x1485> 402950: 89 d5 mov %edx,%ebp 402952: 49 89 d7 mov %rdx,%r15 402955: 49 8d 4c 24 1c lea 0x1c(%r12),%rcx 40295a: 4c 89 fa mov %r15,%rdx 40295d: 4c 89 f6 mov %r14,%rsi 402960: 01 eb add %ebp,%ebx 402962: 48 01 cf add %rcx,%rdi 402965: 48 89 4c 24 08 mov %rcx,0x8(%rsp) 40296a: e8 91 e9 ff ff callq 401300 <memcpy@plt> 40296f: 83 e3 3f and $0x3f,%ebx 402972: 48 8b 4c 24 08 mov 0x8(%rsp),%rcx 402977: 74 27 je 4029a0 <socket@plt+0x14d0> 402979: 48 8b 5c 24 18 mov 0x18(%rsp),%rbx 40297e: 48 8b 6c 24 20 mov 0x20(%rsp),%rbp 402983: 4c 8b 64 24 28 mov 0x28(%rsp),%r12 402988: 4c 8b 6c 24 30 mov 0x30(%rsp),%r13 40298d: 4c 8b 74 24 38 mov 0x38(%rsp),%r14 402992: 4c 8b 7c 24 40 mov 0x40(%rsp),%r15 402997: 48 83 c4 48 add $0x48,%rsp 40299b: c3 retq 40299c: 0f 1f 40 00 nopl 0x0(%rax) 4029a0: 48 89 ce mov %rcx,%rsi 4029a3: 4c 89 e7 mov %r12,%rdi 4029a6: 4d 29 fd sub %r15,%r13 4029a9: 4d 01 fe add %r15,%r14 4029ac: e8 df ed ff ff callq 401790 <socket@plt+0x2c0> 4029b1: 49 83 fd 3f cmp $0x3f,%r13 4029b5: 76 33 jbe 4029ea <socket@plt+0x151a> 4029b7: 4c 89 ed mov %r13,%rbp 4029ba: 4c 89 f3 mov %r14,%rbx 4029bd: 0f 1f 00 nopl (%rax) 4029c0: 48 89 de mov %rbx,%rsi 4029c3: 4c 89 e7 mov %r12,%rdi 4029c6: 48 83 ed 40 sub $0x40,%rbp 4029ca: e8 c1 ed ff ff callq 401790 <socket@plt+0x2c0> 4029cf: 48 83 c3 40 add $0x40,%rbx 4029d3: 48 83 fd 3f cmp $0x3f,%rbp 4029d7: 77 e7 ja 4029c0 <socket@plt+0x14f0> 4029d9: 49 8d 45 c0 lea -0x40(%r13),%rax 4029dd: 41 83 e5 3f and $0x3f,%r13d 4029e1: 48 83 e0 c0 and $0xffffffffffffffc0,%rax 4029e5: 4d 8d 74 06 40 lea 0x40(%r14,%rax,1),%r14 4029ea: 4d 85 ed test %r13,%r13 4029ed: 74 8a je 402979 <socket@plt+0x14a9> 4029ef: 49 8d 7c 24 1c lea 0x1c(%r12),%rdi 4029f4: 4c 89 ea mov %r13,%rdx 4029f7: 4c 89 f6 mov %r14,%rsi 4029fa: 48 8b 5c 24 18 mov 0x18(%rsp),%rbx 4029ff: 48 8b 6c 24 20 mov 0x20(%rsp),%rbp 402a04: 4c 8b 64 24 28 mov 0x28(%rsp),%r12 402a09: 4c 8b 6c 24 30 mov 0x30(%rsp),%r13 402a0e: 4c 8b 74 24 38 mov 0x38(%rsp),%r14 402a13: 4c 8b 7c 24 40 mov 0x40(%rsp),%r15 402a18: 48 83 c4 48 add $0x48,%rsp 402a1c: e9 df e8 ff ff jmpq 401300 <<EMAIL>> 402a21: 66 66 66 66 66 66 2e data32 data32 data32 data32 data32 nopw %cs:0x0(%rax,%rax,1) 402a28: 0f 1f 84 00 00 00 00 402a2f: 00 402a30: 55 push %rbp 402a31: 48 89 fd mov %rdi,%rbp 402a34: 53 push %rbx 402a35: 48 89 f3 mov %rsi,%rbx 402a38: 48 89 df mov %rbx,%rdi 402a3b: 48 83 ec 18 sub $0x18,%rsp 402a3f: 48 8b 16 mov (%rsi),%rdx 402a42: be 80 41 40 00 mov $0x404180,%esi 402a47: 48 89 d0 mov %rdx,%rax 402a4a: 48 c1 e8 1d shr $0x1d,%rax 402a4e: 0f c8 bswap %eax 402a50: 89 04 24 mov %eax,(%rsp) 402a53: 8d 04 d5 00 00 00 00 lea 0x0(,%rdx,8),%eax 402a5a: 0f c8 bswap %eax 402a5c: 89 44 24 04 mov %eax,0x4(%rsp) 402a60: b8 37 00 00 00 mov $0x37,%eax 402a65: 29 d0 sub %edx,%eax 402a67: 83 e0 3f and $0x3f,%eax 402a6a: 48 8d 50 01 lea 0x1(%rax),%rdx 402a6e: e8 8d fe ff ff callq 402900 <socket@plt+0x1430> 402a73: ba 08 00 00 00 mov $0x8,%edx 402a78: 48 89 e6 mov %rsp,%rsi 402a7b: 48 89 df mov %rbx,%rdi 402a7e: e8 7d fe ff ff callq 402900 <socket@plt+0x1430> 402a83: 31 c0 xor %eax,%eax 402a85: 8b 54 03 08 mov 0x8(%rbx,%rax,1),%edx 402a89: 0f ca bswap %edx 402a8b: 89 54 05 00 mov %edx,0x0(%rbp,%rax,1) 402a8f: 48 83 c0 04 add $0x4,%rax 402a93: 48 83 f8 14 cmp $0x14,%rax 402a97: 75 ec jne 402a85 <socket@plt+0x15b5> 402a99: 48 83 c4 18 add $0x18,%rsp 402a9d: 5b pop %rbx 402a9e: 5d pop %rbp 402a9f: c3 retq 402aa0: 55 push %rbp 402aa1: 48 89 e5 mov %rsp,%rbp 402aa4: 41 55 push %r13 402aa6: 4c 63 ef movslq %edi,%r13 402aa9: 48 89 f7 mov %rsi,%rdi 402aac: 41 54 push %r12 402aae: 53 push %rbx 402aaf: 48 89 f3 mov %rsi,%rbx 402ab2: 48 83 ec 78 sub $0x78,%rsp 402ab6: e8 45 e7 ff ff callq 401200 <strlen@plt> 402abb: 48 83 c0 2f add $0x2f,%rax 402abf: 48 c7 45 80 00 00 00 movq $0x0,-0x80(%rbp) 402ac6: 00 402ac7: c7 45 88 01 23 45 67 movl $0x67452301,-0x78(%rbp) 402ace: 48 83 e0 f0 and $0xfffffffffffffff0,%rax 402ad2: c7 45 8c 89 ab cd ef movl $0xefcdab89,-0x74(%rbp) 402ad9: c7 45 90 fe dc ba 98 movl $0x98badcfe,-0x70(%rbp) 402ae0: 48 29 c4 sub %rax,%rsp 402ae3: 4a 8b 04 ed 00 64 60 mov 0x606400(,%r13,8),%rax 402aea: 00 402aeb: 48 2b 05 0e 39 20 00 sub 0x20390e(%rip),%rax # 606400 <socket@plt+0x204f30> 402af2: 49 89 e4 mov %rsp,%r12 402af5: c7 45 94 76 54 32 10 movl $0x10325476,-0x6c(%rbp) 402afc: c7 45 98 f0 e1 d2 c3 movl $0xc3d2e1f0,-0x68(%rbp) 402b03: 48 c1 f8 06 sar $0x6,%rax 402b07: 48 89 85 78 ff ff ff mov %rax,-0x88(%rbp) 402b0e: 31 c0 xor %eax,%eax 402b10: 0f b6 94 05 78 ff ff movzbl -0x88(%rbp,%rax,1),%edx 402b17: ff 402b18: 41 88 14 04 mov %dl,(%r12,%rax,1) 402b1c: 48 83 c0 01 add $0x1,%rax 402b20: 48 83 f8 08 cmp $0x8,%rax 402b24: 75 ea jne 402b10 <socket@plt+0x1640> 402b26: 48 89 df mov %rbx,%rdi 402b29: e8 d2 e6 ff ff callq 401200 <strlen@plt> 402b2e: 31 c9 xor %ecx,%ecx 402b30: 85 c0 test %eax,%eax 402b32: 49 8d 54 24 08 lea 0x8(%r12),%rdx 402b37: 7e 18 jle 402b51 <socket@plt+0x1681> 402b39: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 402b40: 44 0f b6 04 0b movzbl (%rbx,%rcx,1),%r8d 402b45: 44 88 04 0a mov %r8b,(%rdx,%rcx,1) 402b49: 48 83 c1 01 add $0x1,%rcx 402b4d: 39 c8 cmp %ecx,%eax 402b4f: 7f ef jg 402b40 <socket@plt+0x1670> 402b51: 8d 50 08 lea 0x8(%rax),%edx 402b54: 48 8d 7d 80 lea -0x80(%rbp),%rdi 402b58: 83 c0 09 add $0x9,%eax 402b5b: 4c 89 e6 mov %r12,%rsi 402b5e: 48 63 d2 movslq %edx,%rdx 402b61: 41 c6 04 14 00 movb $0x0,(%r12,%rdx,1) 402b66: 48 63 d0 movslq %eax,%rdx 402b69: e8 92 fd ff ff callq 402900 <socket@plt+0x1430> 402b6e: 48 8d 75 80 lea -0x80(%rbp),%rsi 402b72: bf c0 69 60 00 mov $0x6069c0,%edi 402b77: e8 b4 fe ff ff callq 402a30 <socket@plt+0x1560> 402b7c: ba e0 69 60 00 mov $0x6069e0,%edx 402b81: be 14 00 00 00 mov $0x14,%esi 402b86: bf c0 69 60 00 mov $0x6069c0,%edi 402b8b: e8 a0 13 00 00 callq 403f30 <socket@plt+0x2a60> 402b90: 48 98 cltq 402b92: c6 80 e0 69 60 00 00 movb $0x0,0x6069e0(%rax) 402b99: 48 8d 65 e8 lea -0x18(%rbp),%rsp 402b9d: b8 e0 69 60 00 mov $0x6069e0,%eax 402ba2: 5b pop %rbx 402ba3: 41 5c pop %r12 402ba5: 41 5d pop %r13 402ba7: 5d pop %rbp 402ba8: c3 retq 402ba9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 402bb0: 31 c0 xor %eax,%eax 402bb2: ba 6d 00 00 00 mov $0x6d,%edx 402bb7: eb 13 jmp 402bcc <socket@plt+0x16fc> 402bb9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 402bc0: 48 83 c0 01 add $0x1,%rax 402bc4: 48 3d ff 0f 00 00 cmp $0xfff,%rax 402bca: 74 2c je 402bf8 <socket@plt+0x1728> 402bcc: 0f b6 0c 07 movzbl (%rdi,%rax,1),%ecx 402bd0: be 01 00 00 00 mov $0x1,%esi 402bd5: 41 89 c0 mov %eax,%r8d 402bd8: 31 ce xor %ecx,%esi 402bda: 31 f2 xor %esi,%edx 402bdc: c0 c2 07 rol $0x7,%dl 402bdf: 84 c9 test %cl,%cl 402be1: 88 90 40 6a 60 00 mov %dl,0x606a40(%rax) 402be7: 75 d7 jne 402bc0 <socket@plt+0x16f0> 402be9: 41 83 c0 01 add $0x1,%r8d 402bed: 4d 63 c0 movslq %r8d,%r8 402bf0: 41 c6 80 40 6a 60 00 movb $0x0,0x606a40(%r8) 402bf7: 00 402bf8: c6 05 40 4e 20 00 00 movb $0x0,0x204e40(%rip) # 607a3f <stderr+0x10cf> 402bff: b8 40 6a 60 00 mov $0x606a40,%eax 402c04: c3 retq 402c05: 66 66 2e 0f 1f 84 00 data32 nopw %cs:0x0(%rax,%rax,1) 402c0c: 00 00 00 00 402c10: 31 d2 xor %edx,%edx 402c12: be 6d 00 00 00 mov $0x6d,%esi 402c17: eb 16 jmp 402c2f <socket@plt+0x175f> 402c19: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 402c20: 48 83 c2 01 add $0x1,%rdx 402c24: 89 ce mov %ecx,%esi 402c26: 48 81 fa ff 0f 00 00 cmp $0xfff,%rdx 402c2d: 74 17 je 402c46 <socket@plt+0x1776> 402c2f: 0f b6 0c 17 movzbl (%rdi,%rdx,1),%ecx 402c33: 89 c8 mov %ecx,%eax 402c35: d0 c0 rol %al 402c37: 83 f0 01 xor $0x1,%eax 402c3a: 31 f0 xor %esi,%eax 402c3c: 84 c0 test %al,%al 402c3e: 88 82 40 6a 60 00 mov %al,0x606a40(%rdx) 402c44: 75 da jne 402c20 <socket@plt+0x1750> 402c46: c6 05 f2 4d 20 00 00 movb $0x0,0x204df2(%rip) # 607a3f <stderr+0x10cf> 402c4d: b8 40 6a 60 00 mov $0x606a40,%eax 402c52: c3 retq 402c53: 66 66 66 66 2e 0f 1f data32 data32 data32 nopw %cs:0x0(%rax,%rax,1) 402c5a: 84 00 00 00 00 00 402c60: 41 57 push %r15 402c62: 31 ff xor %edi,%edi 402c64: 41 56 push %r14 402c66: 41 55 push %r13 402c68: 41 54 push %r12 402c6a: 55 push %rbp 402c6b: 48 89 f5 mov %rsi,%rbp 402c6e: 53 push %rbx 402c6f: 48 83 ec 28 sub $0x28,%rsp 402c73: e8 e8 e6 ff ff callq 401360 <time@plt> 402c78: 89 c7 mov %eax,%edi 402c7a: e8 51 e6 ff ff callq 4012d0 <srand@plt> 402c7f: e8 0c 13 00 00 callq 403f90 <socket@plt+0x2ac0> 402c84: 89 c3 mov %eax,%ebx 402c86: 48 8b 45 00 mov 0x0(%rbp),%rax 402c8a: 48 89 05 af 4d 20 00 mov %rax,0x204daf(%rip) # 607a40 <stderr+0x10d0> 402c91: e8 ea 12 00 00 callq 403f80 <socket@plt+0x2ab0> 402c96: 85 db test %ebx,%ebx 402c98: 0f 8e d8 03 00 00 jle 403076 <socket@plt+0x1ba6> 402c9e: 8d 43 ff lea -0x1(%rbx),%eax 402ca1: 41 be ff ff ff ff mov $0xffffffff,%r14d 402ca7: 45 31 e4 xor %r12d,%r12d 402caa: 45 31 ed xor %r13d,%r13d 402cad: 45 31 ff xor %r15d,%r15d 402cb0: c7 44 24 18 00 00 00 movl $0x0,0x18(%rsp) 402cb7: 00 402cb8: 48 83 c0 01 add $0x1,%rax 402cbc: 44 89 74 24 1c mov %r14d,0x1c(%rsp) 402cc1: 48 8d 14 80 lea (%rax,%rax,4),%rdx 402cc5: 48 8d 14 d0 lea (%rax,%rdx,8),%rdx 402cc9: 48 89 54 24 10 mov %rdx,0x10(%rsp) 402cce: 66 90 xchg %ax,%ax 402cd0: 41 83 fd 04 cmp $0x4,%r13d 402cd4: b8 01 00 00 00 mov $0x1,%eax 402cd9: 44 89 eb mov %r13d,%ebx 402cdc: 44 0f 4d f8 cmovge %eax,%r15d 402ce0: 0f 4c 44 24 18 cmovl 0x18(%rsp),%eax 402ce5: 45 85 ed test %r13d,%r13d 402ce8: 4a 8b 2c ed 00 64 60 mov 0x606400(,%r13,8),%rbp 402cef: 00 402cf0: 89 44 24 18 mov %eax,0x18(%rsp) 402cf4: 0f 8f 9c 03 00 00 jg 403096 <socket@plt+0x1bc6> 402cfa: 45 85 f6 test %r14d,%r14d 402cfd: 78 18 js 402d17 <socket@plt+0x1847> 402cff: 49 63 c6 movslq %r14d,%rax 402d02: 48 8b 04 c5 00 64 60 mov 0x606400(,%rax,8),%rax 402d09: 00 402d0a: 8b 00 mov (%rax),%eax 402d0c: 44 01 f0 add %r14d,%eax 402d0f: 39 d8 cmp %ebx,%eax 402d11: 0f 8c 89 03 00 00 jl 4030a0 <socket@plt+0x1bd0> 402d17: 48 8b 7d 08 mov 0x8(%rbp),%rdi 402d1b: 31 d2 xor %edx,%edx 402d1d: be 6d 00 00 00 mov $0x6d,%esi 402d22: eb 13 jmp 402d37 <socket@plt+0x1867> 402d24: 0f 1f 40 00 nopl 0x0(%rax) 402d28: 48 83 c2 01 add $0x1,%rdx 402d2c: 89 ce mov %ecx,%esi 402d2e: 48 81 fa ff 0f 00 00 cmp $0xfff,%rdx 402d35: 74 17 je 402d4e <socket@plt+0x187e> 402d37: 0f b6 0c 17 movzbl (%rdi,%rdx,1),%ecx 402d3b: 89 c8 mov %ecx,%eax 402d3d: d0 c0 rol %al 402d3f: 83 f0 01 xor $0x1,%eax 402d42: 31 f0 xor %esi,%eax 402d44: 84 c0 test %al,%al 402d46: 88 82 40 6a 60 00 mov %al,0x606a40(%rdx) 402d4c: 75 da jne 402d28 <socket@plt+0x1858> 402d4e: 48 8b 3d 1b 3c 20 00 mov 0x203c1b(%rip),%rdi # 606970 <stderr> 402d55: 31 c0 xor %eax,%eax 402d57: b9 40 6a 60 00 mov $0x606a40,%ecx 402d5c: 89 da mov %ebx,%edx 402d5e: be 71 40 40 00 mov $0x404071,%esi 402d63: c6 05 d5 4c 20 00 00 movb $0x0,0x204cd5(%rip) # 607a3f <stderr+0x10cf> 402d6a: e8 b1 e5 ff ff callq 401320 <fprintf@plt> 402d6f: 80 3d 0a 3c 20 00 00 cmpb $0x0,0x203c0a(%rip) # 606980 <stderr+0x10> 402d76: 75 0f jne 402d87 <socket@plt+0x18b7> 402d78: be 40 00 00 00 mov $0x40,%esi 402d7d: bf 80 69 60 00 mov $0x606980,%edi 402d82: e8 89 e6 ff ff callq 401410 <getlogin_r@plt> 402d87: be 80 69 60 00 mov $0x606980,%esi 402d8c: 89 df mov %ebx,%edi 402d8e: e8 0d fd ff ff callq 402aa0 <socket@plt+0x15d0> 402d93: 48 89 c6 mov %rax,%rsi 402d96: 31 c0 xor %eax,%eax 402d98: 48 89 74 24 08 mov %rsi,0x8(%rsp) 402d9d: e8 0e e9 ff ff callq 4016b0 <socket@plt+0x1e0> 402da2: 48 85 c0 test %rax,%rax 402da5: 48 8b 74 24 08 mov 0x8(%rsp),%rsi 402daa: 74 16 je 402dc2 <socket@plt+0x18f2> 402dac: 4a 8d 3c 20 lea (%rax,%r12,1),%rdi 402db0: ba 28 00 00 00 mov $0x28,%edx 402db5: e8 26 e5 ff ff callq 4012e0 <memcmp@plt> 402dba: 85 c0 test %eax,%eax 402dbc: 0f 84 de 01 00 00 je 402fa0 <socket@plt+0x1ad0> 402dc2: 8b 4c 24 18 mov 0x18(%rsp),%ecx 402dc6: 85 c9 test %ecx,%ecx 402dc8: 0f 85 fa 01 00 00 jne 402fc8 <socket@plt+0x1af8> 402dce: 48 8b 7d 10 mov 0x10(%rbp),%rdi 402dd2: 31 d2 xor %edx,%edx 402dd4: be 6d 00 00 00 mov $0x6d,%esi 402dd9: 48 85 ff test %rdi,%rdi 402ddc: 75 11 jne 402def <socket@plt+0x191f> 402dde: eb 45 jmp 402e25 <socket@plt+0x1955> 402de0: 48 83 c2 01 add $0x1,%rdx 402de4: 89 ce mov %ecx,%esi 402de6: 48 81 fa ff 0f 00 00 cmp $0xfff,%rdx 402ded: 74 17 je 402e06 <socket@plt+0x1936> 402def: 0f b6 0c 17 movzbl (%rdi,%rdx,1),%ecx 402df3: 89 c8 mov %ecx,%eax 402df5: d0 c0 rol %al 402df7: 83 f0 01 xor $0x1,%eax 402dfa: 31 f0 xor %esi,%eax 402dfc: 84 c0 test %al,%al 402dfe: 88 82 40 6a 60 00 mov %al,0x606a40(%rdx) 402e04: 75 da jne 402de0 <socket@plt+0x1910> 402e06: 48 8b 3d 63 3b 20 00 mov 0x203b63(%rip),%rdi # 606970 <stderr> 402e0d: ba 40 6a 60 00 mov $0x606a40,%edx 402e12: be 99 40 40 00 mov $0x404099,%esi 402e17: 31 c0 xor %eax,%eax 402e19: c6 05 1f 4c 20 00 00 movb $0x0,0x204c1f(%rip) # 607a3f <stderr+0x10cf> 402e20: e8 fb e4 ff ff callq 401320 <fprintf@plt> 402e25: 45 85 ff test %r15d,%r15d 402e28: 0f 85 b6 01 00 00 jne 402fe4 <socket@plt+0x1b14> 402e2e: 8b 7d 38 mov 0x38(%rbp),%edi 402e31: ff 55 30 callq *0x30(%rbp) 402e34: 85 c0 test %eax,%eax 402e36: 0f 85 fc 00 00 00 jne 402f38 <socket@plt+0x1a68> 402e3c: 48 8b 7d 20 mov 0x20(%rbp),%rdi 402e40: 48 85 ff test %rdi,%rdi 402e43: 0f 84 1b 02 00 00 je 403064 <socket@plt+0x1b94> 402e49: 31 d2 xor %edx,%edx 402e4b: be 6d 00 00 00 mov $0x6d,%esi 402e50: eb 15 jmp 402e67 <socket@plt+0x1997> 402e52: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 402e58: 48 83 c2 01 add $0x1,%rdx 402e5c: 89 ce mov %ecx,%esi 402e5e: 48 81 fa ff 0f 00 00 cmp $0xfff,%rdx 402e65: 74 17 je 402e7e <socket@plt+0x19ae> 402e67: 0f b6 0c 17 movzbl (%rdi,%rdx,1),%ecx 402e6b: 89 c8 mov %ecx,%eax 402e6d: d0 c0 rol %al 402e6f: 83 f0 01 xor $0x1,%eax 402e72: 31 f0 xor %esi,%eax 402e74: 84 c0 test %al,%al 402e76: 88 82 40 6a 60 00 mov %al,0x606a40(%rdx) 402e7c: 75 da jne 402e58 <socket@plt+0x1988> 402e7e: c6 05 ba 4b 20 00 00 movb $0x0,0x204bba(%rip) # 607a3f <stderr+0x10cf> 402e85: ba 40 6a 60 00 mov $0x606a40,%edx 402e8a: 48 8b 3d df 3a 20 00 mov 0x203adf(%rip),%rdi # 606970 <stderr> 402e91: 31 c0 xor %eax,%eax 402e93: be c1 40 40 00 mov $0x4040c1,%esi 402e98: e8 83 e4 ff ff callq 401320 <fprintf@plt> 402e9d: 80 3d dc 3a 20 00 00 cmpb $0x0,0x203adc(%rip) # 606980 <stderr+0x10> 402ea4: 75 0f jne 402eb5 <socket@plt+0x19e5> 402ea6: be 40 00 00 00 mov $0x40,%esi 402eab: bf 80 69 60 00 mov $0x606980,%edi 402eb0: e8 5b e5 ff ff callq 401410 <getlogin_r@plt> 402eb5: be 80 69 60 00 mov $0x606980,%esi 402eba: 89 df mov %ebx,%edi 402ebc: e8 df fb ff ff callq 402aa0 <socket@plt+0x15d0> 402ec1: 48 89 c5 mov %rax,%rbp 402ec4: 31 c0 xor %eax,%eax 402ec6: e8 e5 e7 ff ff callq 4016b0 <socket@plt+0x1e0> 402ecb: 48 85 c0 test %rax,%rax 402ece: 0f 84 9a 01 00 00 je 40306e <socket@plt+0x1b9e> 402ed4: 4a 8d 14 20 lea (%rax,%r12,1),%rdx 402ed8: 48 8b 45 00 mov 0x0(%rbp),%rax 402edc: 41 89 de mov %ebx,%r14d 402edf: 48 89 02 mov %rax,(%rdx) 402ee2: 48 8b 45 08 mov 0x8(%rbp),%rax 402ee6: 48 89 42 08 mov %rax,0x8(%rdx) 402eea: 48 8b 45 10 mov 0x10(%rbp),%rax 402eee: 48 89 42 10 mov %rax,0x10(%rdx) 402ef2: 48 8b 45 18 mov 0x18(%rbp),%rax 402ef6: 48 89 42 18 mov %rax,0x18(%rdx) 402efa: 48 8b 45 20 mov 0x20(%rbp),%rax 402efe: c6 42 28 0a movb $0xa,0x28(%rdx) 402f02: 48 89 42 20 mov %rax,0x20(%rdx) 402f06: 49 83 c5 01 add $0x1,%r13 402f0a: 49 83 c4 29 add $0x29,%r12 402f0e: 4c 3b 64 24 10 cmp 0x10(%rsp),%r12 402f13: 0f 85 b7 fd ff ff jne 402cd0 <socket@plt+0x1800> 402f19: 83 7c 24 1c ff cmpl $0xffffffff,0x1c(%rsp) 402f1e: 0f 84 52 01 00 00 je 403076 <socket@plt+0x1ba6> 402f24: 48 83 c4 28 add $0x28,%rsp 402f28: 31 c0 xor %eax,%eax 402f2a: 5b pop %rbx 402f2b: 5d pop %rbp 402f2c: 41 5c pop %r12 402f2e: 41 5d pop %r13 402f30: 41 5e pop %r14 402f32: 41 5f pop %r15 402f34: c3 retq 402f35: 0f 1f 00 nopl (%rax) 402f38: 48 8b 7d 28 mov 0x28(%rbp),%rdi 402f3c: 48 85 ff test %rdi,%rdi 402f3f: 0f 84 15 01 00 00 je 40305a <socket@plt+0x1b8a> 402f45: 31 d2 xor %edx,%edx 402f47: be 6d 00 00 00 mov $0x6d,%esi 402f4c: eb 11 jmp 402f5f <socket@plt+0x1a8f> 402f4e: 66 90 xchg %ax,%ax 402f50: 48 83 c2 01 add $0x1,%rdx 402f54: 89 ce mov %ecx,%esi 402f56: 48 81 fa ff 0f 00 00 cmp $0xfff,%rdx 402f5d: 74 17 je 402f76 <socket@plt+0x1aa6> 402f5f: 0f b6 0c 17 movzbl (%rdi,%rdx,1),%ecx 402f63: 89 c8 mov %ecx,%eax 402f65: d0 c0 rol %al 402f67: 83 f0 01 xor $0x1,%eax 402f6a: 31 f0 xor %esi,%eax 402f6c: 84 c0 test %al,%al 402f6e: 88 82 40 6a 60 00 mov %al,0x606a40(%rdx) 402f74: 75 da jne 402f50 <socket@plt+0x1a80> 402f76: c6 05 c2 4a 20 00 00 movb $0x0,0x204ac2(%rip) # 607a3f <stderr+0x10cf> 402f7d: ba 40 6a 60 00 mov $0x606a40,%edx 402f82: 48 8b 3d e7 39 20 00 mov 0x2039e7(%rip),%rdi # 606970 <stderr> 402f89: be ce 40 40 00 mov $0x4040ce,%esi 402f8e: 31 c0 xor %eax,%eax 402f90: e8 8b e3 ff ff callq 401320 <fprintf@plt> 402f95: 89 5c 24 1c mov %ebx,0x1c(%rsp) 402f99: e9 68 ff ff ff jmpq 402f06 <socket@plt+0x1a36> 402f9e: 66 90 xchg %ax,%ax 402fa0: 48 8b 0d c9 39 20 00 mov 0x2039c9(%rip),%rcx # 606970 <stderr> 402fa7: ba 30 00 00 00 mov $0x30,%edx 402fac: be 01 00 00 00 mov $0x1,%esi 402fb1: bf 48 41 40 00 mov $0x404148,%edi 402fb6: 41 89 de mov %ebx,%r14d 402fb9: e8 b2 e4 ff ff callq 401470 <fwrite@plt> 402fbe: e9 43 ff ff ff jmpq 402f06 <socket@plt+0x1a36> 402fc3: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 402fc8: bf 87 40 40 00 mov $0x404087,%edi 402fcd: e8 be e1 ff ff callq 401190 <getenv@plt> 402fd2: 48 85 c0 test %rax,%rax 402fd5: 0f 84 f3 fd ff ff je 402dce <socket@plt+0x18fe> 402fdb: 45 85 ff test %r15d,%r15d 402fde: 0f 84 4a fe ff ff je 402e2e <socket@plt+0x195e> 402fe4: bf af 40 40 00 mov $0x4040af,%edi 402fe9: e8 a2 e1 ff ff callq 401190 <getenv@plt> 402fee: 48 85 c0 test %rax,%rax 402ff1: 0f 84 37 fe ff ff je 402e2e <socket@plt+0x195e> 402ff7: 48 8b 7d 18 mov 0x18(%rbp),%rdi 402ffb: 48 85 ff test %rdi,%rdi 402ffe: 0f 84 2a fe ff ff je 402e2e <socket@plt+0x195e> 403004: 31 d2 xor %edx,%edx 403006: be 6d 00 00 00 mov $0x6d,%esi 40300b: eb 12 jmp 40301f <socket@plt+0x1b4f> 40300d: 0f 1f 00 nopl (%rax) 403010: 48 83 c2 01 add $0x1,%rdx 403014: 89 ce mov %ecx,%esi 403016: 48 81 fa ff 0f 00 00 cmp $0xfff,%rdx 40301d: 74 17 je 403036 <socket@plt+0x1b66> 40301f: 0f b6 0c 17 movzbl (%rdi,%rdx,1),%ecx 403023: 89 c8 mov %ecx,%eax 403025: d0 c0 rol %al 403027: 83 f0 01 xor $0x1,%eax 40302a: 31 f0 xor %esi,%eax 40302c: 84 c0 test %al,%al 40302e: 88 82 40 6a 60 00 mov %al,0x606a40(%rdx) 403034: 75 da jne 403010 <socket@plt+0x1b40> 403036: 48 8b 3d 33 39 20 00 mov 0x203933(%rip),%rdi # 606970 <stderr> 40303d: ba 40 6a 60 00 mov $0x606a40,%edx 403042: be 99 40 40 00 mov $0x404099,%esi 403047: 31 c0 xor %eax,%eax 403049: c6 05 ef 49 20 00 00 movb $0x0,0x2049ef(%rip) # 607a3f <stderr+0x10cf> 403050: e8 cb e2 ff ff callq 401320 <fprintf@plt> 403055: e9 d4 fd ff ff jmpq 402e2e <socket@plt+0x195e> 40305a: ba 6c 40 40 00 mov $0x40406c,%edx 40305f: e9 1e ff ff ff jmpq 402f82 <socket@plt+0x1ab2> 403064: ba 64 40 40 00 mov $0x404064,%edx 403069: e9 1c fe ff ff jmpq 402e8a <socket@plt+0x19ba> 40306e: 41 89 de mov %ebx,%r14d 403071: e9 90 fe ff ff jmpq 402f06 <socket@plt+0x1a36> 403076: 48 8b 0d f3 38 20 00 mov 0x2038f3(%rip),%rcx # 606970 <stderr> 40307d: ba 2f 00 00 00 mov $0x2f,%edx 403082: be 01 00 00 00 mov $0x1,%esi 403087: bf e0 40 40 00 mov $0x4040e0,%edi 40308c: e8 df e3 ff ff callq 401470 <fwrite@plt> 403091: e9 8e fe ff ff jmpq 402f24 <socket@plt+0x1a54> 403096: 41 83 fe ff cmp $0xffffffff,%r14d 40309a: 0f 85 5a fc ff ff jne 402cfa <socket@plt+0x182a> 4030a0: 48 8b 0d c9 38 20 00 mov 0x2038c9(%rip),%rcx # 606970 <stderr> 4030a7: bf 10 41 40 00 mov $0x404110,%edi 4030ac: ba 32 00 00 00 mov $0x32,%edx 4030b1: be 01 00 00 00 mov $0x1,%esi 4030b6: e8 b5 e3 ff ff callq 401470 <fwrite@plt> 4030bb: bf 01 00 00 00 mov $0x1,%edi 4030c0: e8 8b e3 ff ff callq 401450 <exit@plt> 4030c5: 90 nop 4030c6: 90 nop 4030c7: 90 nop 4030c8: 90 nop 4030c9: 90 nop 4030ca: 90 nop 4030cb: 90 nop 4030cc: 90 nop 4030cd: 90 nop 4030ce: 90 nop 4030cf: 90 nop 4030d0: 89 3d 42 39 20 00 mov %edi,0x203942(%rip) # 606a18 <stderr+0xa8> 4030d6: c3 retq 4030d7: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 4030de: 00 00 4030e0: 48 83 ec 08 sub $0x8,%rsp 4030e4: 31 f6 xor %esi,%esi 4030e6: 31 c0 xor %eax,%eax 4030e8: bf c0 41 40 00 mov $0x4041c0,%edi 4030ed: e8 2e e3 ff ff callq 401420 <open@plt> 4030f2: 85 c0 test %eax,%eax 4030f4: 78 12 js 403108 <socket@plt+0x1c38> 4030f6: 89 c7 mov %eax,%edi 4030f8: e8 a3 e1 ff ff callq 4012a0 <close@plt> 4030fd: 31 c0 xor %eax,%eax 4030ff: 48 83 c4 08 add $0x8,%rsp 403103: c3 retq 403104: 0f 1f 40 00 nopl 0x0(%rax) 403108: b8 ff ff ff ff mov $0xffffffff,%eax 40310d: eb f0 jmp 4030ff <socket@plt+0x1c2f> 40310f: 90 nop 403110: 55 push %rbp 403111: 31 c0 xor %eax,%eax 403113: ba 80 01 00 00 mov $0x180,%edx 403118: be 42 00 00 00 mov $0x42,%esi 40311d: bf c0 41 40 00 mov $0x4041c0,%edi 403122: 53 push %rbx 403123: 48 83 ec 18 sub $0x18,%rsp 403127: e8 f4 e2 ff ff callq 401420 <open@plt> 40312c: 85 c0 test %eax,%eax 40312e: 89 c3 mov %eax,%ebx 403130: 0f 88 8a 00 00 00 js 4031c0 <socket@plt+0x1cf0> 403136: be 00 80 00 00 mov $0x8000,%esi 40313b: 89 c7 mov %eax,%edi 40313d: e8 fe e0 ff ff callq 401240 <ftruncate@plt> 403142: 85 c0 test %eax,%eax 403144: 74 1a je 403160 <socket@plt+0x1c90> 403146: bd ff ff ff ff mov $0xffffffff,%ebp 40314b: 89 df mov %ebx,%edi 40314d: e8 4e e1 ff ff callq 4012a0 <close@plt> 403152: 48 83 c4 18 add $0x18,%rsp 403156: 89 e8 mov %ebp,%eax 403158: 5b pop %rbx 403159: 5d pop %rbp 40315a: c3 retq 40315b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 403160: 45 31 c9 xor %r9d,%r9d 403163: 31 ff xor %edi,%edi 403165: 41 89 d8 mov %ebx,%r8d 403168: b9 01 00 00 00 mov $0x1,%ecx 40316d: ba 03 00 00 00 mov $0x3,%edx 403172: be 00 80 00 00 mov $0x8000,%esi 403177: e8 a4 e0 ff ff callq 401220 <mmap@plt> 40317c: 48 83 f8 ff cmp $0xffffffffffffffff,%rax 403180: 48 89 c5 mov %rax,%rbp 403183: 74 c1 je 403146 <socket@plt+0x1c76> 403185: be 00 40 00 00 mov $0x4000,%esi 40318a: 89 df mov %ebx,%edi 40318c: e8 af e0 ff ff callq 401240 <ftruncate@plt> 403191: 48 8d 74 24 0f lea 0xf(%rsp),%rsi 403196: ba 01 00 00 00 mov $0x1,%edx 40319b: 31 ff xor %edi,%edi 40319d: e8 0e e1 ff ff callq 4012b0 <read@plt> 4031a2: c6 85 00 40 00 00 09 movb $0x9,0x4000(%rbp) 4031a9: 48 89 ef mov %rbp,%rdi 4031ac: be 00 80 00 00 mov $0x8000,%esi 4031b1: e8 4a e2 ff ff callq 401400 <munmap@plt> 4031b6: 31 ed xor %ebp,%ebp 4031b8: eb 91 jmp 40314b <socket@plt+0x1c7b> 4031ba: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 4031c0: bd ff ff ff ff mov $0xffffffff,%ebp 4031c5: eb 8b jmp 403152 <socket@plt+0x1c82> 4031c7: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 4031ce: 00 00 4031d0: 41 56 push %r14 4031d2: 41 be 0a 00 00 00 mov $0xa,%r14d 4031d8: 41 55 push %r13 4031da: 41 54 push %r12 4031dc: 41 bc 0a 00 00 00 mov $0xa,%r12d 4031e2: 55 push %rbp 4031e3: 53 push %rbx 4031e4: 48 83 ec 20 sub $0x20,%rsp 4031e8: 48 8d 5c 24 20 lea 0x20(%rsp),%rbx 4031ed: c6 04 24 62 movb $0x62,(%rsp) 4031f1: c6 44 24 01 66 movb $0x66,0x1(%rsp) 4031f6: c6 44 24 02 30 movb $0x30,0x2(%rsp) 4031fb: c6 44 24 03 30 movb $0x30,0x3(%rsp) 403200: c6 44 24 04 00 movb $0x0,0x4(%rsp) 403205: 0f 1f 00 nopl (%rax) 403208: 48 8d 44 24 10 lea 0x10(%rsp),%rax 40320d: 0f 1f 00 nopl (%rax) 403210: c6 00 00 movb $0x0,(%rax) 403213: 48 83 c0 01 add $0x1,%rax 403217: 48 39 d8 cmp %rbx,%rax 40321a: 75 f4 jne 403210 <socket@plt+0x1d40> 40321c: 31 f6 xor %esi,%esi 40321e: 31 c0 xor %eax,%eax 403220: 48 89 e7 mov %rsp,%rdi 403223: e8 f8 e1 ff ff callq 401420 <open@plt> 403228: 85 c0 test %eax,%eax 40322a: 89 c5 mov %eax,%ebp 40322c: 78 6c js 40329a <socket@plt+0x1dca> 40322e: 31 d2 xor %edx,%edx 403230: be 00 00 00 40 mov $0x40000000,%esi 403235: 89 c7 mov %eax,%edi 403237: e8 14 e0 ff ff callq 401250 <lseek@plt> 40323c: 48 83 f8 ff cmp $0xffffffffffffffff,%rax 403240: 41 bd cd 41 40 00 mov $0x4041cd,%r13d 403246: 74 30 je 403278 <socket@plt+0x1da8> 403248: 48 8d 74 24 10 lea 0x10(%rsp),%rsi 40324d: ba 10 00 00 00 mov $0x10,%edx 403252: 89 ef mov %ebp,%edi 403254: e8 57 e0 ff ff callq 4012b0 <read@plt> 403259: 48 85 c0 test %rax,%rax 40325c: 7e 1a jle 403278 <socket@plt+0x1da8> 40325e: 80 7c 24 10 00 cmpb $0x0,0x10(%rsp) 403263: 74 13 je 403278 <socket@plt+0x1da8> 403265: 80 44 24 03 01 addb $0x1,0x3(%rsp) 40326a: 41 83 ee 01 sub $0x1,%r14d 40326e: 41 bd 02 43 40 00 mov $0x404302,%r13d 403274: 0f 1f 40 00 nopl 0x0(%rax) 403278: 4c 89 ee mov %r13,%rsi 40327b: bf cf 41 40 00 mov $0x4041cf,%edi 403280: 31 c0 xor %eax,%eax 403282: e8 a9 df ff ff callq 401230 <printf@plt> 403287: 48 8b 3d d2 36 20 00 mov 0x2036d2(%rip),%rdi # 606960 <stdout> 40328e: e8 1d e1 ff ff callq 4013b0 <fflush@plt> 403293: 89 ef mov %ebp,%edi 403295: e8 06 e0 ff ff callq 4012a0 <close@plt> 40329a: 41 83 ec 01 sub $0x1,%r12d 40329e: 0f 85 64 ff ff ff jne 403208 <socket@plt+0x1d38> 4032a4: 31 c0 xor %eax,%eax 4032a6: 45 85 f6 test %r14d,%r14d 4032a9: 0f 95 c0 setne %al 4032ac: 48 83 c4 20 add $0x20,%rsp 4032b0: 5b pop %rbx 4032b1: 5d pop %rbp 4032b2: 41 5c pop %r12 4032b4: 41 5d pop %r13 4032b6: f7 d8 neg %eax 4032b8: 41 5e pop %r14 4032ba: c3 retq 4032bb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 4032c0: 48 83 ec 08 sub $0x8,%rsp 4032c4: e8 27 df ff ff callq 4011f0 <getpid@plt> 4032c9: 3d ff 7f 00 00 cmp $0x7fff,%eax 4032ce: 0f 94 c0 sete %al 4032d1: 48 83 c4 08 add $0x8,%rsp 4032d5: 0f b6 c0 movzbl %al,%eax 4032d8: 83 e8 01 sub $0x1,%eax 4032db: c3 retq 4032dc: 0f 1f 40 00 nopl 0x0(%rax) 4032e0: 48 83 ec 08 sub $0x8,%rsp 4032e4: 31 c0 xor %eax,%eax 4032e6: be 01 00 00 00 mov $0x1,%esi 4032eb: bf 63 00 00 00 mov $0x63,%edi 4032f0: e8 db de ff ff callq 4011d0 <fcntl@plt> 4032f5: 83 f8 ff cmp $0xffffffff,%eax 4032f8: 0f 94 c0 sete %al 4032fb: 48 83 c4 08 add $0x8,%rsp 4032ff: 0f b6 c0 movzbl %al,%eax 403302: c3 retq 403303: 66 66 66 66 2e 0f 1f data32 data32 data32 nopw %cs:0x0(%rax,%rax,1) 40330a: 84 00 00 00 00 00 403310: 55 push %rbp 403311: 31 c0 xor %eax,%eax 403313: be 02 00 00 00 mov $0x2,%esi 403318: bf ea 41 40 00 mov $0x4041ea,%edi 40331d: 53 push %rbx 40331e: 48 83 ec 18 sub $0x18,%rsp 403322: e8 f9 e0 ff ff callq 401420 <open@plt> 403327: 85 c0 test %eax,%eax 403329: 89 c5 mov %eax,%ebp 40332b: 0f 88 8f 00 00 00 js 4033c0 <socket@plt+0x1ef0> 403331: bb 0a 00 00 00 mov $0xa,%ebx 403336: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 40333d: 00 00 00 403340: e8 7b e1 ff ff callq 4014c0 <<EMAIL>> 403345: ba 4f ec c4 4e mov $0x4ec4ec4f,%edx 40334a: 89 c1 mov %eax,%ecx 40334c: 48 8d 74 24 0e lea 0xe(%rsp),%rsi 403351: f7 ea imul %edx 403353: 89 c8 mov %ecx,%eax 403355: 89 ef mov %ebp,%edi 403357: c1 f8 1f sar $0x1f,%eax 40335a: c1 fa 03 sar $0x3,%edx 40335d: 29 c2 sub %eax,%edx 40335f: b8 1a 00 00 00 mov $0x1a,%eax 403364: 0f af d0 imul %eax,%edx 403367: 29 d1 sub %edx,%ecx 403369: ba 01 00 00 00 mov $0x1,%edx 40336e: 48 63 c9 movslq %ecx,%rcx 403371: 0f b6 81 f7 41 40 00 movzbl 0x4041f7(%rcx),%eax 403378: 88 44 24 0e mov %al,0xe(%rsp) 40337c: e8 5f de ff ff callq 4011e0 <write@plt> 403381: 48 83 f8 01 cmp $0x1,%rax 403385: 75 39 jne 4033c0 <socket@plt+0x1ef0> 403387: 48 8d 74 24 0f lea 0xf(%rsp),%rsi 40338c: ba 01 00 00 00 mov $0x1,%edx 403391: 89 ef mov %ebp,%edi 403393: e8 18 df ff ff callq 4012b0 <read@plt> 403398: 48 83 f8 01 cmp $0x1,%rax 40339c: 75 22 jne 4033c0 <socket@plt+0x1ef0> 40339e: 0f b6 44 24 0f movzbl 0xf(%rsp),%eax 4033a3: 38 44 24 0e cmp %al,0xe(%rsp) 4033a7: 75 17 jne 4033c0 <socket@plt+0x1ef0> 4033a9: 83 eb 01 sub $0x1,%ebx 4033ac: 75 92 jne 403340 <socket@plt+0x1e70> 4033ae: 89 ef mov %ebp,%edi 4033b0: e8 eb de ff ff callq 4012a0 <close@plt> 4033b5: 48 83 c4 18 add $0x18,%rsp 4033b9: 31 c0 xor %eax,%eax 4033bb: 5b pop %rbx 4033bc: 5d pop %rbp 4033bd: c3 retq 4033be: 66 90 xchg %ax,%ax 4033c0: 48 83 c4 18 add $0x18,%rsp 4033c4: b8 ff ff ff ff mov $0xffffffff,%eax 4033c9: 5b pop %rbx 4033ca: 5d pop %rbp 4033cb: c3 retq 4033cc: 0f 1f 40 00 nopl 0x0(%rax) 4033d0: 48 89 6c 24 e0 mov %rbp,-0x20(%rsp) 4033d5: 4c 89 64 24 e8 mov %r12,-0x18(%rsp) 4033da: bf 1e 00 00 00 mov $0x1e,%edi 4033df: 4c 89 6c 24 f0 mov %r13,-0x10(%rsp) 4033e4: 48 89 5c 24 d8 mov %rbx,-0x28(%rsp) 4033e9: bd 01 00 00 00 mov $0x1,%ebp 4033ee: 4c 89 74 24 f8 mov %r14,-0x8(%rsp) 4033f3: 48 83 ec 48 sub $0x48,%rsp 4033f7: e8 34 e0 ff ff callq 401430 <sysconf@plt> 4033fc: 48 bf 2f 74 6d 70 2f movabs $0x6469722f706d742f,%rdi 403403: 72 69 64 403406: 49 b8 64 6c 65 2d 58 movabs $0x585858582d656c64,%r8 40340d: 58 58 58 403410: 49 89 c5 mov %rax,%r13 403413: 48 89 3c 24 mov %rdi,(%rsp) 403417: 48 89 e7 mov %rsp,%rdi 40341a: 4c 89 44 24 08 mov %r8,0x8(%rsp) 40341f: 66 c7 44 24 10 58 58 movw $0x5858,0x10(%rsp) 403426: c6 44 24 12 00 movb $0x0,0x12(%rsp) 40342b: e8 b0 df ff ff callq 4013e0 <mkstemp@plt> 403430: 83 f8 ff cmp $0xffffffff,%eax 403433: 41 89 c4 mov %eax,%r12d 403436: 0f 84 e9 00 00 00 je 403525 <socket@plt+0x2055> 40343c: 4d 63 ed movslq %r13d,%r13 40343f: 89 c7 mov %eax,%edi 403441: 4c 89 ee mov %r13,%rsi 403444: e8 f7 dd ff ff callq 401240 <ftruncate@plt> 403449: 83 f8 ff cmp $0xffffffff,%eax 40344c: 0f 84 f6 00 00 00 je 403548 <socket@plt+0x2078> 403452: 45 31 c9 xor %r9d,%r9d 403455: 31 ff xor %edi,%edi 403457: 45 89 e0 mov %r12d,%r8d 40345a: b9 01 00 00 00 mov $0x1,%ecx 40345f: ba 03 00 00 00 mov $0x3,%edx 403464: 4c 89 ee mov %r13,%rsi 403467: e8 b4 dd ff ff callq 401220 <mmap@plt> 40346c: 48 83 f8 ff cmp $0xffffffffffffffff,%rax 403470: 48 89 c3 mov %rax,%rbx 403473: 0f 84 cf 00 00 00 je 403548 <socket@plt+0x2078> 403479: 4c 89 ea mov %r13,%rdx 40347c: 31 f6 xor %esi,%esi 40347e: 48 89 c7 mov %rax,%rdi 403481: e8 fa dd ff ff callq 401280 <memset@plt> 403486: e8 35 e0 ff ff callq 4014c0 <rand@plt> 40348b: ba 4f ec c4 4e mov $0x4ec4ec4f,%edx 403490: 89 c1 mov %eax,%ecx 403492: be 1a 00 00 00 mov $0x1a,%esi 403497: f7 ea imul %edx 403499: 89 c8 mov %ecx,%eax 40349b: bf 12 42 40 00 mov $0x404212,%edi 4034a0: c1 f8 1f sar $0x1f,%eax 4034a3: 4c 8d 73 6f lea 0x6f(%rbx),%r14 4034a7: bd 08 00 00 00 mov $0x8,%ebp 4034ac: c1 fa 03 sar $0x3,%edx 4034af: 29 c2 sub %eax,%edx 4034b1: 0f af d6 imul %esi,%edx 4034b4: 29 d1 sub %edx,%ecx 4034b6: 48 63 c9 movslq %ecx,%rcx 4034b9: 44 0f b6 a9 f7 41 40 movzbl 0x4041f7(%rcx),%r13d 4034c0: 00 4034c1: e8 4a f7 ff ff callq 402c10 <socket@plt+0x1740> 4034c6: 48 8b 3d a3 34 20 00 mov 0x2034a3(%rip),%rdi # 606970 <stderr> 4034cd: 48 89 c2 mov %rax,%rdx 4034d0: 4d 89 f0 mov %r14,%r8 4034d3: be 2b 42 40 00 mov $0x40422b,%esi 4034d8: 31 c0 xor %eax,%eax 4034da: 41 0f be cd movsbl %r13b,%ecx 4034de: e8 3d de ff ff callq 401320 <fprintf@plt> 4034e3: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 4034e8: 0f b6 4b 70 movzbl 0x70(%rbx),%ecx 4034ec: 84 c9 test %cl,%cl 4034ee: 75 68 jne 403558 <socket@plt+0x2088> 4034f0: 0f b6 43 6e movzbl 0x6e(%rbx),%eax 4034f4: 84 c0 test %al,%al 4034f6: 75 60 jne 403558 <socket@plt+0x2088> 4034f8: 0f b6 43 6f movzbl 0x6f(%rbx),%eax 4034fc: 44 38 e8 cmp %r13b,%al 4034ff: 74 7f je 403580 <socket@plt+0x20b0> 403501: bf 02 00 00 00 mov $0x2,%edi 403506: e8 85 df ff ff callq 401490 <sleep@plt> 40350b: 83 ed 01 sub $0x1,%ebp 40350e: 75 d8 jne 4034e8 <socket@plt+0x2018> 403510: bd 01 00 00 00 mov $0x1,%ebp 403515: 44 89 e7 mov %r12d,%edi 403518: e8 83 dd ff ff callq 4012a0 <close@plt> 40351d: 48 89 e7 mov %rsp,%rdi 403520: e8 8b dc ff ff callq 4011b0 <unlink@plt> 403525: 89 e8 mov %ebp,%eax 403527: 48 8b 5c 24 20 mov 0x20(%rsp),%rbx 40352c: 48 8b 6c 24 28 mov 0x28(%rsp),%rbp 403531: 4c 8b 64 24 30 mov 0x30(%rsp),%r12 403536: 4c 8b 6c 24 38 mov 0x38(%rsp),%r13 40353b: 4c 8b 74 24 40 mov 0x40(%rsp),%r14 403540: 48 83 c4 48 add $0x48,%rsp 403544: c3 retq 403545: 0f 1f 00 nopl (%rax) 403548: 44 89 e7 mov %r12d,%edi 40354b: e8 50 dd ff ff callq 4012a0 <close@plt> 403550: eb d3 jmp 403525 <socket@plt+0x2055> 403552: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 403558: bf 3a 42 40 00 mov $0x40423a,%edi 40355d: bd 01 00 00 00 mov $0x1,%ebp 403562: e8 a9 f6 ff ff callq 402c10 <socket@plt+0x1740> 403567: 4c 89 f2 mov %r14,%rdx 40356a: 48 89 c6 mov %rax,%rsi 40356d: bf 53 42 40 00 mov $0x404253,%edi 403572: 31 c0 xor %eax,%eax 403574: e8 b7 dc ff ff callq 401230 <printf@plt> 403579: eb 9a jmp 403515 <socket@plt+0x2045> 40357b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 403580: 31 ed xor %ebp,%ebp 403582: eb 91 jmp 403515 <socket@plt+0x2045> 403584: 66 66 66 2e 0f 1f 84 data32 data32 nopw %cs:0x0(%rax,%rax,1) 40358b: 00 00 00 00 00 403590: 41 57 push %r15 403592: 41 56 push %r14 403594: 41 55 push %r13 403596: 41 54 push %r12 403598: 55 push %rbp 403599: 89 fd mov %edi,%ebp 40359b: bf f0 45 40 00 mov $0x4045f0,%edi 4035a0: 53 push %rbx 4035a1: 48 81 ec a8 00 00 00 sub $0xa8,%rsp 4035a8: e8 63 f6 ff ff callq 402c10 <socket@plt+0x1740> 4035ad: ba 80 01 00 00 mov $0x180,%edx 4035b2: 49 89 c5 mov %rax,%r13 4035b5: be 42 02 00 00 mov $0x242,%esi 4035ba: 31 c0 xor %eax,%eax 4035bc: bf 5b 42 40 00 mov $0x40425b,%edi 4035c1: e8 5a de ff ff callq 401420 <open@plt> 4035c6: 85 c0 test %eax,%eax 4035c8: 89 c3 mov %eax,%ebx 4035ca: 0f 88 bc 01 00 00 js 40378c <socket@plt+0x22bc> 4035d0: bf 5b 42 40 00 mov $0x40425b,%edi 4035d5: e8 d6 db ff ff callq 4011b0 <unlink@plt> 4035da: 85 c0 test %eax,%eax 4035dc: 0f 88 aa 01 00 00 js 40378c <socket@plt+0x22bc> 4035e2: 83 fd 01 cmp $0x1,%ebp 4035e5: 0f 84 ad 01 00 00 je 403798 <socket@plt+0x22c8> 4035eb: bf 1e 00 00 00 mov $0x1e,%edi 4035f0: e8 3b de ff ff callq 401430 <sysconf@plt> 4035f5: 48 63 e8 movslq %eax,%rbp 4035f8: 49 89 c7 mov %rax,%r15 4035fb: 48 89 ef mov %rbp,%rdi 4035fe: e8 9d dd ff ff callq 4013a0 <malloc@plt> 403603: 48 85 c0 test %rax,%rax 403606: 49 89 c4 mov %rax,%r12 403609: 0f 84 7d 01 00 00 je 40378c <socket@plt+0x22bc> 40360f: 45 85 ff test %r15d,%r15d 403612: 7e 18 jle 40362c <socket@plt+0x215c> 403614: 41 83 ef 01 sub $0x1,%r15d 403618: 48 89 c1 mov %rax,%rcx 40361b: 4a 8d 54 38 01 lea 0x1(%rax,%r15,1),%rdx 403620: c6 01 00 movb $0x0,(%rcx) 403623: 48 83 c1 01 add $0x1,%rcx 403627: 48 39 d1 cmp %rdx,%rcx 40362a: 75 f4 jne 403620 <socket@plt+0x2150> 40362c: 4d 89 e9 mov %r13,%r9 40362f: 4c 89 e1 mov %r12,%rcx 403632: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 403638: 45 0f b6 11 movzbl (%r9),%r10d 40363c: 49 83 c1 01 add $0x1,%r9 403640: 44 88 11 mov %r10b,(%rcx) 403643: 48 83 c1 01 add $0x1,%rcx 403647: 45 84 d2 test %r10b,%r10b 40364a: 75 ec jne 403638 <socket@plt+0x2168> 40364c: 48 89 ea mov %rbp,%rdx 40364f: 4c 89 e6 mov %r12,%rsi 403652: 89 df mov %ebx,%edi 403654: e8 87 db ff ff callq 4011e0 <write@plt> 403659: 48 39 e8 cmp %rbp,%rax 40365c: 0f 85 2a 01 00 00 jne 40378c <socket@plt+0x22bc> 403662: 45 31 c9 xor %r9d,%r9d 403665: 48 89 ee mov %rbp,%rsi 403668: 31 ff xor %edi,%edi 40366a: 41 89 d8 mov %ebx,%r8d 40366d: b9 01 00 00 00 mov $0x1,%ecx 403672: ba 03 00 00 00 mov $0x3,%edx 403677: e8 a4 db ff ff callq 401220 <mmap@plt> 40367c: 48 83 f8 ff cmp $0xffffffffffffffff,%rax 403680: 48 89 c5 mov %rax,%rbp 403683: 0f 84 03 01 00 00 je 40378c <socket@plt+0x22bc> 403689: 89 df mov %ebx,%edi 40368b: e8 10 dc ff ff callq 4012a0 <close@plt> 403690: 85 c0 test %eax,%eax 403692: 0f 88 f4 00 00 00 js 40378c <socket@plt+0x22bc> 403698: 48 89 ef mov %rbp,%rdi 40369b: e8 60 db ff ff callq 401200 <strlen@plt> 4036a0: 48 8d 5c 05 00 lea 0x0(%rbp,%rax,1),%rbx 4036a5: 0f 31 rdtsc 4036a7: 48 8d 54 24 0c lea 0xc(%rsp),%rdx 4036ac: 48 8d 7c 24 10 lea 0x10(%rsp),%rdi 4036b1: 89 44 24 0c mov %eax,0xc(%rsp) 4036b5: 48 89 d9 mov %rbx,%rcx 4036b8: 0f b6 32 movzbl (%rdx),%esi 4036bb: 48 83 c2 01 add $0x1,%rdx 4036bf: 89 f0 mov %esi,%eax 4036c1: 83 e6 0f and $0xf,%esi 4036c4: c0 e8 04 shr $0x4,%al 4036c7: 83 e0 0f and $0xf,%eax 4036ca: 0f b6 80 c0 4c 40 00 movzbl 0x404cc0(%rax),%eax 4036d1: 88 01 mov %al,(%rcx) 4036d3: 0f b6 86 c0 4c 40 00 movzbl 0x404cc0(%rsi),%eax 4036da: 88 41 01 mov %al,0x1(%rcx) 4036dd: 48 83 c1 02 add $0x2,%rcx 4036e1: 48 39 fa cmp %rdi,%rdx 4036e4: 75 d2 jne 4036b8 <socket@plt+0x21e8> 4036e6: 48 8b 2d 83 32 20 00 mov 0x203283(%rip),%rbp # 606970 <stderr> 4036ed: bf 58 46 40 00 mov $0x404658,%edi 4036f2: c6 43 08 0a movb $0xa,0x8(%rbx) 4036f6: c6 43 09 00 movb $0x0,0x9(%rbx) 4036fa: e8 11 f5 ff ff callq 402c10 <socket@plt+0x1740> 4036ff: 48 89 ee mov %rbp,%rsi 403702: 48 89 c7 mov %rax,%rdi 403705: e8 66 db ff ff callq 401270 <fputs@plt> 40370a: 48 8b 3d 5f 32 20 00 mov 0x20325f(%rip),%rdi # 606970 <stderr> 403711: e8 9a dc ff ff callq 4013b0 <fflush@plt> 403716: 48 8b 15 4b 32 20 00 mov 0x20324b(%rip),%rdx # 606968 <stdin> 40371d: be 64 00 00 00 mov $0x64,%esi 403722: 4c 89 e7 mov %r12,%rdi 403725: e8 c6 db ff ff callq 4012f0 <fgets@plt> 40372a: 48 85 c0 test %rax,%rax 40372d: 74 5d je 40378c <socket@plt+0x22bc> 40372f: 41 0f b6 04 24 movzbl (%r12),%eax 403734: 38 03 cmp %al,(%rbx) 403736: 75 38 jne 403770 <socket@plt+0x22a0> 403738: 31 d2 xor %edx,%edx 40373a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 403740: 41 0f b6 44 14 01 movzbl 0x1(%r12,%rdx,1),%eax 403746: 38 44 13 01 cmp %al,0x1(%rbx,%rdx,1) 40374a: 75 24 jne 403770 <socket@plt+0x22a0> 40374c: 48 83 c2 01 add $0x1,%rdx 403750: 48 83 fa 07 cmp $0x7,%rdx 403754: 75 ea jne 403740 <socket@plt+0x2270> 403756: 31 c0 xor %eax,%eax 403758: 48 81 c4 a8 00 00 00 add $0xa8,%rsp 40375f: 5b pop %rbx 403760: 5d pop %rbp 403761: 41 5c pop %r12 403763: 41 5d pop %r13 403765: 41 5e pop %r14 403767: 41 5f pop %r15 403769: c3 retq 40376a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 403770: 48 8b 1d f9 31 20 00 mov 0x2031f9(%rip),%rbx # 606970 <stderr> 403777: bf 88 46 40 00 mov $0x404688,%edi 40377c: e8 8f f4 ff ff callq 402c10 <socket@plt+0x1740> 403781: 48 89 de mov %rbx,%rsi 403784: 48 89 c7 mov %rax,%rdi 403787: e8 e4 da ff ff callq 401270 <fputs@plt> 40378c: b8 ff ff ff ff mov $0xffffffff,%eax 403791: eb c5 jmp 403758 <socket@plt+0x2288> 403793: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 403798: 48 8d 54 24 10 lea 0x10(%rsp),%rdx 40379d: 89 de mov %ebx,%esi 40379f: bf 01 00 00 00 mov $0x1,%edi 4037a4: e8 17 dc ff ff callq 4013c0 <__fxstat@plt> 4037a9: 85 c0 test %eax,%eax 4037ab: 78 df js 40378c <socket@plt+0x22bc> 4037ad: 48 83 7c 24 20 00 cmpq $0x0,0x20(%rsp) 4037b3: 0f 84 32 fe ff ff je 4035eb <socket@plt+0x211b> 4037b9: 48 8b 1d b0 31 20 00 mov 0x2031b0(%rip),%rbx # 606970 <stderr> 4037c0: bf 30 46 40 00 mov $0x404630,%edi 4037c5: eb b5 jmp 40377c <socket@plt+0x22ac> 4037c7: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 4037ce: 00 00 4037d0: 55 push %rbp 4037d1: 31 d2 xor %edx,%edx 4037d3: be 01 00 00 00 mov $0x1,%esi 4037d8: bf 02 00 00 00 mov $0x2,%edi 4037dd: 53 push %rbx 4037de: 48 81 ec 08 01 00 00 sub $0x108,%rsp 4037e5: e8 e6 dc ff ff callq 4014d0 <socket@plt> 4037ea: 85 c0 test %eax,%eax 4037ec: 89 c5 mov %eax,%ebp 4037ee: 0f 88 90 01 00 00 js 403984 <socket@plt+0x24b4> 4037f4: bf 69 42 40 00 mov $0x404269,%edi 4037f9: 66 c7 44 24 10 02 00 movw $0x2,0x10(%rsp) 403800: 66 c7 44 24 12 c2 b2 movw $0xb2c2,0x12(%rsp) 403807: e8 04 f4 ff ff callq 402c10 <socket@plt+0x1740> 40380c: 48 8d 74 24 14 lea 0x14(%rsp),%rsi 403811: 48 89 c7 mov %rax,%rdi 403814: e8 57 db ff ff callq 401370 <inet_aton@plt> 403819: 85 c0 test %eax,%eax 40381b: 0f 88 63 01 00 00 js 403984 <socket@plt+0x24b4> 403821: 48 8b 1d 48 31 20 00 mov 0x203148(%rip),%rbx # 606970 <stderr> 403828: bf a0 4b 40 00 mov $0x404ba0,%edi 40382d: e8 de f3 ff ff callq 402c10 <socket@plt+0x1740> 403832: 48 89 c7 mov %rax,%rdi 403835: 48 89 de mov %rbx,%rsi 403838: e8 33 da ff ff callq 401270 <fputs@plt> 40383d: 48 8d 74 24 10 lea 0x10(%rsp),%rsi 403842: ba 10 00 00 00 mov $0x10,%edx 403847: 89 ef mov %ebp,%edi 403849: e8 12 dc ff ff callq 401460 <connect@plt> 40384e: 85 c0 test %eax,%eax 403850: 0f 88 5a 01 00 00 js 4039b0 <socket@plt+0x24e0> 403856: e8 95 d9 ff ff callq 4011f0 <getpid@plt> 40385b: bf 74 42 40 00 mov $0x404274,%edi 403860: 89 c3 mov %eax,%ebx 403862: e8 a9 f3 ff ff callq 402c10 <socket@plt+0x1740> 403867: 48 63 cb movslq %ebx,%rcx 40386a: 48 8d 5c 24 20 lea 0x20(%rsp),%rbx 40386f: 48 89 c2 mov %rax,%rdx 403872: be 81 42 40 00 mov $0x404281,%esi 403877: 31 c0 xor %eax,%eax 403879: 48 89 df mov %rbx,%rdi 40387c: e8 bf db ff ff callq 401440 <sprintf@plt> 403881: 48 89 da mov %rbx,%rdx 403884: 44 8b 02 mov (%rdx),%r8d 403887: 48 83 c2 04 add $0x4,%rdx 40388b: 41 8d 88 ff fe fe fe lea -0x1010101(%r8),%ecx 403892: 41 f7 d0 not %r8d 403895: 44 21 c1 and %r8d,%ecx 403898: 81 e1 80 80 80 80 and $0x80808080,%ecx 40389e: 74 e4 je 403884 <socket@plt+0x23b4> 4038a0: 89 c8 mov %ecx,%eax 4038a2: 48 89 de mov %rbx,%rsi 4038a5: 89 ef mov %ebp,%edi 4038a7: c1 e8 10 shr $0x10,%eax 4038aa: f7 c1 80 80 00 00 test $0x8080,%ecx 4038b0: 0f 44 c8 cmove %eax,%ecx 4038b3: 48 8d 42 02 lea 0x2(%rdx),%rax 4038b7: 48 0f 44 d0 cmove %rax,%rdx 4038bb: 00 c9 add %cl,%cl 4038bd: 48 83 da 03 sbb $0x3,%rdx 4038c1: 48 29 da sub %rbx,%rdx 4038c4: e8 17 d9 ff ff callq 4011e0 <write@plt> 4038c9: 48 89 d9 mov %rbx,%rcx 4038cc: 8b 31 mov (%rcx),%esi 4038ce: 48 83 c1 04 add $0x4,%rcx 4038d2: 8d 96 ff fe fe fe lea -0x1010101(%rsi),%edx 4038d8: f7 d6 not %esi 4038da: 21 f2 and %esi,%edx 4038dc: 81 e2 80 80 80 80 and $0x80808080,%edx 4038e2: 74 e8 je 4038cc <socket@plt+0x23fc> 4038e4: 89 d6 mov %edx,%esi 4038e6: c1 ee 10 shr $0x10,%esi 4038e9: f7 c2 80 80 00 00 test $0x8080,%edx 4038ef: 0f 44 d6 cmove %esi,%edx 4038f2: 48 8d 71 02 lea 0x2(%rcx),%rsi 4038f6: 48 0f 44 ce cmove %rsi,%rcx 4038fa: 00 d2 add %dl,%dl 4038fc: 48 83 d9 03 sbb $0x3,%rcx 403900: 48 29 d9 sub %rbx,%rcx 403903: 48 39 c8 cmp %rcx,%rax 403906: 75 60 jne 403968 <socket@plt+0x2498> 403908: 48 8d b4 24 90 00 00 lea 0x90(%rsp),%rsi 40390f: 00 403910: ba 64 00 00 00 mov $0x64,%edx 403915: 89 ef mov %ebp,%edi 403917: e8 94 d9 ff ff callq 4012b0 <read@plt> 40391c: 48 85 c0 test %rax,%rax 40391f: 78 47 js 403968 <socket@plt+0x2498> 403921: 48 8d 54 24 08 lea 0x8(%rsp),%rdx 403926: 48 8d bc 24 90 00 00 lea 0x90(%rsp),%rdi 40392d: 00 40392e: be 8e 42 40 00 mov $0x40428e,%esi 403933: 31 c0 xor %eax,%eax 403935: 48 c7 44 24 08 00 00 movq $0x0,0x8(%rsp) 40393c: 00 00 40393e: e8 8d da ff ff callq 4013d0 <sscanf@plt> 403943: e8 a8 d8 ff ff callq 4011f0 <getpid@plt> 403948: 8d 50 01 lea 0x1(%rax),%edx 40394b: 31 c0 xor %eax,%eax 40394d: 48 63 d2 movslq %edx,%rdx 403950: 48 3b 54 24 08 cmp 0x8(%rsp),%rdx 403955: 75 41 jne 403998 <socket@plt+0x24c8> 403957: 48 81 c4 08 01 00 00 add $0x108,%rsp 40395e: 5b pop %rbx 40395f: 5d pop %rbp 403960: c3 retq 403961: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 403968: 48 8b 1d 01 30 20 00 mov 0x203001(%rip),%rbx # 606970 <stderr> 40396f: bf c8 4b 40 00 mov $0x404bc8,%edi 403974: e8 97 f2 ff ff callq 402c10 <socket@plt+0x1740> 403979: 48 89 de mov %rbx,%rsi 40397c: 48 89 c7 mov %rax,%rdi 40397f: e8 ec d8 ff ff callq 401270 <fputs@plt> 403984: 48 81 c4 08 01 00 00 add $0x108,%rsp 40398b: b8 ff ff ff ff mov $0xffffffff,%eax 403990: 5b pop %rbx 403991: 5d pop %rbp 403992: c3 retq 403993: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 403998: 48 8b 1d d1 2f 20 00 mov 0x202fd1(%rip),%rbx # 606970 <stderr> 40399f: bf 92 42 40 00 mov $0x404292,%edi 4039a4: eb ce jmp 403974 <socket@plt+0x24a4> 4039a6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 4039ad: 00 00 00 4039b0: 48 8b 1d b9 2f 20 00 mov 0x202fb9(%rip),%rbx # 606970 <stderr> 4039b7: bf c0 46 40 00 mov $0x4046c0,%edi 4039bc: eb b6 jmp 403974 <socket@plt+0x24a4> 4039be: 66 90 xchg %ax,%ax 4039c0: 48 81 ec 28 01 00 00 sub $0x128,%rsp 4039c7: be c0 41 40 00 mov $0x4041c0,%esi 4039cc: bf 01 00 00 00 mov $0x1,%edi 4039d1: 48 89 e2 mov %rsp,%rdx 4039d4: e8 37 d8 ff ff callq 401210 <__lxstat@plt> 4039d9: 85 c0 test %eax,%eax 4039db: 78 4c js 403a29 <socket@plt+0x2559> 4039dd: 48 8d 94 24 90 00 00 lea 0x90(%rsp),%rdx 4039e4: 00 4039e5: be b0 42 40 00 mov $0x4042b0,%esi 4039ea: bf 01 00 00 00 mov $0x1,%edi 4039ef: e8 1c d8 ff ff callq 401210 <__lxstat@plt> 4039f4: 85 c0 test %eax,%eax 4039f6: 78 31 js 403a29 <socket@plt+0x2559> 4039f8: 48 8b 54 24 08 mov 0x8(%rsp),%rdx 4039fd: 48 8b 8c 24 98 00 00 mov 0x98(%rsp),%rcx 403a04: 00 403a05: 31 c0 xor %eax,%eax 403a07: 48 39 ca cmp %rcx,%rdx 403a0a: 75 0c jne 403a18 <socket@plt+0x2548> 403a0c: 48 81 c4 28 01 00 00 add $0x128,%rsp 403a13: c3 retq 403a14: 0f 1f 40 00 nopl 0x0(%rax) 403a18: 48 8b 3d 51 2f 20 00 mov 0x202f51(%rip),%rdi # 606970 <stderr> 403a1f: be bb 42 40 00 mov $0x4042bb,%esi 403a24: e8 f7 d8 ff ff callq 401320 <fprintf@plt> 403a29: b8 ff ff ff ff mov $0xffffffff,%eax 403a2e: eb dc jmp 403a0c <socket@plt+0x253c> 403a30: 48 83 ec 08 sub $0x8,%rsp 403a34: be d0 30 40 00 mov $0x4030d0,%esi 403a39: bf 0e 00 00 00 mov $0xe,%edi 403a3e: e8 cd d8 ff ff callq 401310 <signal@plt> 403a43: be d0 30 40 00 mov $0x4030d0,%esi 403a48: bf 12 00 00 00 mov $0x12,%edi 403a4d: e8 be d8 ff ff callq 401310 <signal@plt> 403a52: bf 0a 00 00 00 mov $0xa,%edi 403a57: e8 34 d8 ff ff callq 401290 <alarm@plt> 403a5c: e8 2f d9 ff ff callq 401390 <pause@plt> 403a61: 31 c0 xor %eax,%eax 403a63: 83 3d ae 2f 20 00 12 cmpl $0x12,0x202fae(%rip) # 606a18 <stderr+0xa8> 403a6a: 0f 94 c0 sete %al 403a6d: 48 83 c4 08 add $0x8,%rsp 403a71: 83 e8 01 sub $0x1,%eax 403a74: c3 retq 403a75: 66 66 2e 0f 1f 84 00 data32 nopw %cs:0x0(%rax,%rax,1) 403a7c: 00 00 00 00 403a80: 48 83 ec 08 sub $0x8,%rsp 403a84: 31 c0 xor %eax,%eax 403a86: be 01 00 00 00 mov $0x1,%esi 403a8b: bf c0 41 40 00 mov $0x4041c0,%edi 403a90: e8 8b d9 ff ff callq 401420 <open@plt> 403a95: 85 c0 test %eax,%eax 403a97: 7f 17 jg 403ab0 <socket@plt+0x25e0> 403a99: e8 02 d7 ff ff callq 4011a0 <__errno_location@plt> 403a9e: 83 38 0d cmpl $0xd,(%rax) 403aa1: 0f 94 c0 sete %al 403aa4: 0f b6 c0 movzbl %al,%eax 403aa7: 83 e8 01 sub $0x1,%eax 403aaa: 48 83 c4 08 add $0x8,%rsp 403aae: c3 retq 403aaf: 90 nop 403ab0: 89 c7 mov %eax,%edi 403ab2: e8 e9 d7 ff ff callq 4012a0 <close@plt> 403ab7: b8 ff ff ff ff mov $0xffffffff,%eax 403abc: eb ec jmp 403aaa <socket@plt+0x25da> 403abe: 66 90 xchg %ax,%ax 403ac0: 48 83 ec 08 sub $0x8,%rsp 403ac4: bf ce 42 40 00 mov $0x4042ce,%edi 403ac9: e8 c2 d6 ff ff callq 401190 <getenv@plt> 403ace: 48 89 c7 mov %rax,%rdi 403ad1: b8 01 00 00 00 mov $0x1,%eax 403ad6: 48 85 ff test %rdi,%rdi 403ad9: 74 16 je 403af1 <socket@plt+0x2621> 403adb: 31 f6 xor %esi,%esi 403add: ba 0a 00 00 00 mov $0xa,%edx 403ae2: e8 59 d8 ff ff callq 401340 <strtol@plt> 403ae7: 48 83 f8 2a cmp $0x2a,%rax 403aeb: 0f 95 c0 setne %al 403aee: 0f b6 c0 movzbl %al,%eax 403af1: 48 83 c4 08 add $0x8,%rsp 403af5: c3 retq 403af6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 403afd: 00 00 00 403b00: 41 54 push %r12 403b02: bf d5 42 40 00 mov $0x4042d5,%edi 403b07: 55 push %rbp 403b08: 53 push %rbx 403b09: 48 83 ec 40 sub $0x40,%rsp 403b0d: e8 ae d6 ff ff callq 4011c0 <puts@plt> 403b12: 48 8b 15 4f 2e 20 00 mov 0x202e4f(%rip),%rdx # 606968 <stdin> 403b19: be 40 00 00 00 mov $0x40,%esi 403b1e: 48 89 e7 mov %rsp,%rdi 403b21: e8 ca d7 ff ff callq 4012f0 <fgets@plt> 403b26: 48 85 c0 test %rax,%rax 403b29: 74 65 je 403b90 <socket@plt+0x26c0> 403b2b: 0f b6 14 24 movzbl (%rsp),%edx 403b2f: c6 44 24 3f 0a movb $0xa,0x3f(%rsp) 403b34: 48 89 e0 mov %rsp,%rax 403b37: 84 d2 test %dl,%dl 403b39: 75 10 jne 403b4b <socket@plt+0x267b> 403b3b: eb 21 jmp 403b5e <socket@plt+0x268e> 403b3d: 0f 1f 00 nopl (%rax) 403b40: 48 83 c0 01 add $0x1,%rax 403b44: 0f b6 10 movzbl (%rax),%edx 403b47: 84 d2 test %dl,%dl 403b49: 74 13 je 403b5e <socket@plt+0x268e> 403b4b: 80 fa 0a cmp $0xa,%dl 403b4e: 75 f0 jne 403b40 <socket@plt+0x2670> 403b50: c6 00 00 movb $0x0,(%rax) 403b53: 48 83 c0 01 add $0x1,%rax 403b57: 0f b6 10 movzbl (%rax),%edx 403b5a: 84 d2 test %dl,%dl 403b5c: 75 ed jne 403b4b <socket@plt+0x267b> 403b5e: 48 89 e7 mov %rsp,%rdi 403b61: e8 4a f0 ff ff callq 402bb0 <socket@plt+0x16e0> 403b66: ba 12 00 00 00 mov $0x12,%edx 403b6b: be ea 42 40 00 mov $0x4042ea,%esi 403b70: 48 89 c7 mov %rax,%rdi 403b73: e8 68 d7 ff ff callq 4012e0 <memcmp@plt> 403b78: 85 c0 test %eax,%eax 403b7a: 0f 85 b0 00 00 00 jne 403c30 <socket@plt+0x2760> 403b80: 48 8b 3d b9 3e 20 00 mov 0x203eb9(%rip),%rdi # 607a40 <stderr+0x10d0> 403b87: e8 24 d6 ff ff callq 4011b0 <unlink@plt> 403b8c: 85 c0 test %eax,%eax 403b8e: 74 10 je 403ba0 <socket@plt+0x26d0> 403b90: 48 83 c4 40 add $0x40,%rsp 403b94: b8 ff ff ff ff mov $0xffffffff,%eax 403b99: 5b pop %rbx 403b9a: 5d pop %rbp 403b9b: 41 5c pop %r12 403b9d: c3 retq 403b9e: 66 90 xchg %ax,%ax 403ba0: 48 8b 3d 99 3e 20 00 mov 0x203e99(%rip),%rdi # 607a40 <stderr+0x10d0> 403ba7: ba c0 01 00 00 mov $0x1c0,%edx 403bac: be 41 04 00 00 mov $0x441,%esi 403bb1: e8 6a d8 ff ff callq 401420 <open@plt> 403bb6: 85 c0 test %eax,%eax 403bb8: 89 c5 mov %eax,%ebp 403bba: 78 d4 js 403b90 <socket@plt+0x26c0> 403bbc: 31 d2 xor %edx,%edx 403bbe: be 61 00 00 00 mov $0x61,%esi 403bc3: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 403bc8: 0f b6 8a e0 4c 40 00 movzbl 0x404ce0(%rdx),%ecx 403bcf: 31 ce xor %ecx,%esi 403bd1: 40 88 b2 40 6a 60 00 mov %sil,0x606a40(%rdx) 403bd8: 48 83 c2 01 add $0x1,%rdx 403bdc: 89 ce mov %ecx,%esi 403bde: 48 81 fa 60 0a 00 00 cmp $0xa60,%rdx 403be5: 75 e1 jne 403bc8 <socket@plt+0x26f8> 403be7: 31 db xor %ebx,%ebx 403be9: 41 bc 60 0a 00 00 mov $0xa60,%r12d 403bef: 90 nop 403bf0: 44 89 e2 mov %r12d,%edx 403bf3: 48 63 f3 movslq %ebx,%rsi 403bf6: 89 ef mov %ebp,%edi 403bf8: 29 da sub %ebx,%edx 403bfa: 48 81 c6 40 6a 60 00 add $0x606a40,%rsi 403c01: 48 63 d2 movslq %edx,%rdx 403c04: e8 d7 d5 ff ff callq 4011e0 <write@plt> 403c09: 85 c0 test %eax,%eax 403c0b: 7e 0a jle 403c17 <socket@plt+0x2747> 403c0d: 01 c3 add %eax,%ebx 403c0f: 81 fb 5f 0a 00 00 cmp $0xa5f,%ebx 403c15: 7e d9 jle 403bf0 <socket@plt+0x2720> 403c17: 89 ef mov %ebp,%edi 403c19: e8 82 d6 ff ff callq 4012a0 <close@plt> 403c1e: 48 83 c4 40 add $0x40,%rsp 403c22: b8 ff ff ff ff mov $0xffffffff,%eax 403c27: 5b pop %rbx 403c28: 5d pop %rbp 403c29: 41 5c pop %r12 403c2b: c3 retq 403c2c: 0f 1f 40 00 nopl 0x0(%rax) 403c30: bf fd 42 40 00 mov $0x4042fd,%edi 403c35: e8 86 d5 ff ff callq 4011c0 <puts@plt> 403c3a: 48 83 c4 40 add $0x40,%rsp 403c3e: b8 ff ff ff ff mov $0xffffffff,%eax 403c43: 5b pop %rbx 403c44: 5d pop %rbp 403c45: 41 5c pop %r12 403c47: c3 retq 403c48: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) 403c4f: 00 403c50: 48 89 5c 24 f0 mov %rbx,-0x10(%rsp) 403c55: 48 89 6c 24 f8 mov %rbp,-0x8(%rsp) 403c5a: 48 83 ec 18 sub $0x18,%rsp 403c5e: 44 8b 0d b7 2d 20 00 mov 0x202db7(%rip),%r9d # 606a1c <stderr+0xac> 403c65: 31 db xor %ebx,%ebx 403c67: 45 85 c9 test %r9d,%r9d 403c6a: 74 14 je 403c80 <socket@plt+0x27b0> 403c6c: 89 d8 mov %ebx,%eax 403c6e: 48 8b 6c 24 10 mov 0x10(%rsp),%rbp 403c73: 48 8b 5c 24 08 mov 0x8(%rsp),%rbx 403c78: 48 83 c4 18 add $0x18,%rsp 403c7c: c3 retq 403c7d: 0f 1f 00 nopl (%rax) 403c80: be 02 00 00 00 mov $0x2,%esi 403c85: bf 04 43 40 00 mov $0x404304,%edi 403c8a: bb ff ff ff ff mov $0xffffffff,%ebx 403c8f: e8 ec d6 ff ff callq 401380 <dlopen@plt> 403c94: 48 85 c0 test %rax,%rax 403c97: 48 89 c5 mov %rax,%rbp 403c9a: 74 d0 je 403c6c <socket@plt+0x279c> 403c9c: be 0f 43 40 00 mov $0x40430f,%esi 403ca1: 48 89 c7 mov %rax,%rdi 403ca4: e8 d7 d7 ff ff callq 401480 <dlsym@plt> 403ca9: 48 85 c0 test %rax,%rax 403cac: 48 89 c2 mov %rax,%rdx 403caf: 74 10 je 403cc1 <socket@plt+0x27f1> 403cb1: 31 c0 xor %eax,%eax 403cb3: 31 db xor %ebx,%ebx 403cb5: ff d2 callq *%rdx 403cb7: c7 05 5b 2d 20 00 01 movl $0x1,0x202d5b(%rip) # 606a1c <stderr+0xac> 403cbe: 00 00 00 403cc1: 48 89 ef mov %rbp,%rdi 403cc4: e8 27 d7 ff ff callq 4013f0 <dlclose@plt> 403cc9: eb a1 jmp 403c6c <socket@plt+0x279c> 403ccb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 403cd0: 55 push %rbp 403cd1: 53 push %rbx 403cd2: 48 83 ec 08 sub $0x8,%rsp 403cd6: e8 75 ff ff ff callq 403c50 <socket@plt+0x2780> 403cdb: 85 c0 test %eax,%eax 403cdd: 75 71 jne 403d50 <socket@plt+0x2880> 403cdf: be 02 00 00 00 mov $0x2,%esi 403ce4: bf 1b 43 40 00 mov $0x40431b,%edi 403ce9: e8 92 d6 ff ff callq 401380 <dlopen@plt> 403cee: 48 85 c0 test %rax,%rax 403cf1: 48 89 c3 mov %rax,%rbx 403cf4: 74 5a je 403d50 <socket@plt+0x2880> 403cf6: 48 89 c7 mov %rax,%rdi 403cf9: e8 f2 d6 ff ff callq 4013f0 <dlclose@plt> 403cfe: 48 89 df mov %rbx,%rdi 403d01: bb ff ff ff ff mov $0xffffffff,%ebx 403d06: e8 e5 d6 ff ff callq 4013f0 <dlclose@plt> 403d0b: be 02 00 00 00 mov $0x2,%esi 403d10: bf 1b 43 40 00 mov $0x40431b,%edi 403d15: e8 66 d6 ff ff callq 401380 <dlopen@plt> 403d1a: be 26 43 40 00 mov $0x404326,%esi 403d1f: 48 89 c7 mov %rax,%rdi 403d22: 48 89 c5 mov %rax,%rbp 403d25: e8 56 d7 ff ff callq 401480 <dlsym@plt> 403d2a: 48 85 c0 test %rax,%rax 403d2d: 74 0b je 403d3a <socket@plt+0x286a> 403d2f: 31 db xor %ebx,%ebx 403d31: ff d0 callq *%rax 403d33: 85 c0 test %eax,%eax 403d35: 0f 95 c3 setne %bl 403d38: f7 db neg %ebx 403d3a: 48 89 ef mov %rbp,%rdi 403d3d: e8 ae d6 ff ff callq 4013f0 <dlclose@plt> 403d42: 48 83 c4 08 add $0x8,%rsp 403d46: 89 d8 mov %ebx,%eax 403d48: 5b pop %rbx 403d49: 5d pop %rbp 403d4a: c3 retq 403d4b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 403d50: bb ff ff ff ff mov $0xffffffff,%ebx 403d55: 48 83 c4 08 add $0x8,%rsp 403d59: 89 d8 mov %ebx,%eax 403d5b: 5b pop %rbx 403d5c: 5d pop %rbp 403d5d: c3 retq 403d5e: 66 90 xchg %ax,%ax 403d60: 55 push %rbp 403d61: 53 push %rbx 403d62: 89 fb mov %edi,%ebx 403d64: 48 83 ec 08 sub $0x8,%rsp 403d68: e8 83 d4 ff ff callq 4011f0 <getpid@plt> 403d6d: 89 df mov %ebx,%edi 403d6f: 48 63 e8 movslq %eax,%rbp 403d72: e8 d9 fe ff ff callq 403c50 <socket@plt+0x2780> 403d77: 89 c1 mov %eax,%ecx 403d79: b8 ff ff ff ff mov $0xffffffff,%eax 403d7e: 85 c9 test %ecx,%ecx 403d80: 75 32 jne 403db4 <socket@plt+0x28e4> 403d82: bf e8 46 40 00 mov $0x4046e8,%edi 403d87: e8 84 ee ff ff callq 402c10 <socket@plt+0x1740> 403d8c: 48 8b 3d dd 2b 20 00 mov 0x202bdd(%rip),%rdi # 606970 <stderr> 403d93: 48 89 c2 mov %rax,%rdx 403d96: b9 00 20 04 06 mov $0x6042000,%ecx 403d9b: 31 c0 xor %eax,%eax 403d9d: be 36 43 40 00 mov $0x404336,%esi 403da2: e8 79 d5 ff ff callq 401320 <fprintf@plt> 403da7: 31 c0 xor %eax,%eax 403da9: 48 39 2c 25 00 20 04 cmp %rbp,0x6042000 403db0: 06 403db1: 0f 95 c0 setne %al 403db4: 48 83 c4 08 add $0x8,%rsp 403db8: 5b pop %rbx 403db9: 5d pop %rbp 403dba: c3 retq 403dbb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 403dc0: 53 push %rbx 403dc1: 48 83 ec 10 sub $0x10,%rsp 403dc5: e8 e6 d6 ff ff callq 4014b0 <fork@plt> 403dca: 83 f8 ff cmp $0xffffffff,%eax 403dcd: 89 c3 mov %eax,%ebx 403dcf: 74 3f je 403e10 <socket@plt+0x2940> 403dd1: 85 c0 test %eax,%eax 403dd3: 74 5e je 403e33 <socket@plt+0x2963> 403dd5: e8 d6 d6 ff ff callq 4014b0 <fork@plt> 403dda: 83 f8 ff cmp $0xffffffff,%eax 403ddd: 0f 1f 00 nopl (%rax) 403de0: 74 3e je 403e20 <socket@plt+0x2950> 403de2: 85 c0 test %eax,%eax 403de4: 74 68 je 403e4e <socket@plt+0x297e> 403de6: 48 8d 7c 24 0c lea 0xc(%rsp),%rdi 403deb: e8 b0 d6 ff ff callq 4014a0 <wait@plt> 403df0: 48 8d 7c 24 0c lea 0xc(%rsp),%rdi 403df5: 8b 5c 24 0c mov 0xc(%rsp),%ebx 403df9: e8 a2 d6 ff ff callq 4014a0 <wait@plt> 403dfe: 8b 44 24 0c mov 0xc(%rsp),%eax 403e02: 09 d8 or %ebx,%eax 403e04: 48 83 c4 10 add $0x10,%rsp 403e08: 5b pop %rbx 403e09: c3 retq 403e0a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 403e10: 48 83 c4 10 add $0x10,%rsp 403e14: b8 01 00 00 00 mov $0x1,%eax 403e19: 5b pop %rbx 403e1a: c3 retq 403e1b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 403e20: be 0f 00 00 00 mov $0xf,%esi 403e25: 89 df mov %ebx,%edi 403e27: e8 24 d5 ff ff callq 401350 <kill@plt> 403e2c: b8 01 00 00 00 mov $0x1,%eax 403e31: eb d1 jmp 403e04 <socket@plt+0x2934> 403e33: bf 22 00 00 00 mov $0x22,%edi 403e38: ba 01 00 00 00 mov $0x1,%edx 403e3d: be 35 00 00 00 mov $0x35,%esi 403e42: e8 99 d6 ff ff callq 4014e0 <socket@plt+0x10> 403e47: 89 c7 mov %eax,%edi 403e49: e8 02 d6 ff ff callq 401450 <exit@plt> 403e4e: bf 36 00 00 00 mov $0x36,%edi 403e53: 31 d2 xor %edx,%edx 403e55: be 21 00 00 00 mov $0x21,%esi 403e5a: e8 81 d6 ff ff callq 4014e0 <socket@plt+0x10> 403e5f: 89 c7 mov %eax,%edi 403e61: e8 ea d5 ff ff callq 401450 <exit@plt> 403e66: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 403e6d: 00 00 00 403e70: 48 83 ec 18 sub $0x18,%rsp 403e74: 31 f6 xor %esi,%esi 403e76: 48 89 e7 mov %rsp,%rdi 403e79: e8 e2 d3 ff ff callq 401260 <gettimeofday@plt> 403e7e: f2 48 0f 2a 04 24 cvtsi2sdq (%rsp),%xmm0 403e84: f2 48 0f 2a 4c 24 08 cvtsi2sdq 0x8(%rsp),%xmm1 403e8b: f2 0f 59 05 e5 19 00 mulsd 0x19e5(%rip),%xmm0 # 405878 <socket@plt+0x43a8> 403e92: 00 403e93: f2 0f 10 15 e5 19 00 movsd 0x19e5(%rip),%xmm2 # 405880 <socket@plt+0x43b0> 403e9a: 00 403e9b: f2 0f 58 c1 addsd %xmm1,%xmm0 403e9f: 66 0f 28 c8 movapd %xmm0,%xmm1 403ea3: f2 0f 5c 0d 75 2b 20 subsd 0x202b75(%rip),%xmm1 # 606a20 <stderr+0xb0> 403eaa: 00 403eab: 66 0f 2e d1 ucomisd %xmm1,%xmm2 403eaf: 77 71 ja 403f22 <socket@plt+0x2a52> 403eb1: 48 63 05 70 2b 20 00 movslq 0x202b70(%rip),%rax # 606a28 <stderr+0xb8> 403eb8: f2 0f 11 05 60 2b 20 movsd %xmm0,0x202b60(%rip) # 606a20 <stderr+0xb0> 403ebf: 00 403ec0: 83 f8 12 cmp $0x12,%eax 403ec3: 7e 0c jle 403ed1 <socket@plt+0x2a01> 403ec5: c7 05 59 2b 20 00 00 movl $0x0,0x202b59(%rip) # 606a28 <stderr+0xb8> 403ecc: 00 00 00 403ecf: 31 c0 xor %eax,%eax 403ed1: 48 8b 3c c5 e0 57 40 mov 0x4057e0(,%rax,8),%rdi 403ed8: 00 403ed9: e8 32 ed ff ff callq 402c10 <socket@plt+0x1740> 403ede: 80 38 00 cmpb $0x0,(%rax) 403ee1: 48 89 c1 mov %rax,%rcx 403ee4: 74 13 je 403ef9 <socket@plt+0x2a29> 403ee6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 403eed: 00 00 00 403ef0: 48 83 c1 01 add $0x1,%rcx 403ef4: 80 39 00 cmpb $0x0,(%rcx) 403ef7: 75 f7 jne 403ef0 <socket@plt+0x2a20> 403ef9: c6 01 0a movb $0xa,(%rcx) 403efc: c6 41 01 00 movb $0x0,0x1(%rcx) 403f00: 48 83 c1 02 add $0x2,%rcx 403f04: 48 29 c1 sub %rax,%rcx 403f07: 48 89 c2 mov %rax,%rdx 403f0a: be 02 00 00 00 mov $0x2,%esi 403f0f: bf 01 00 00 00 mov $0x1,%edi 403f14: 31 c0 xor %eax,%eax 403f16: e8 15 d4 ff ff callq 401330 <syscall@plt> 403f1b: 83 05 06 2b 20 00 01 addl $0x1,0x202b06(%rip) # 606a28 <stderr+0xb8> 403f22: 48 83 c4 18 add $0x18,%rsp 403f26: c3 retq 403f27: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 403f2e: 00 00 403f30: 85 f6 test %esi,%esi 403f32: 74 49 je 403f7d <socket@plt+0x2aad> 403f34: 31 c9 xor %ecx,%ecx 403f36: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 403f3d: 00 00 00 403f40: 44 0f b6 04 0f movzbl (%rdi,%rcx,1),%r8d 403f45: 48 83 c1 01 add $0x1,%rcx 403f49: 44 89 c0 mov %r8d,%eax 403f4c: 41 83 e0 0f and $0xf,%r8d 403f50: c0 e8 04 shr $0x4,%al 403f53: 45 0f b6 80 c0 4c 40 movzbl 0x404cc0(%r8),%r8d 403f5a: 00 403f5b: 41 89 c1 mov %eax,%r9d 403f5e: 41 83 e1 0f and $0xf,%r9d 403f62: 45 0f b6 89 c0 4c 40 movzbl 0x404cc0(%r9),%r9d 403f69: 00 403f6a: 44 88 42 01 mov %r8b,0x1(%rdx) 403f6e: 44 88 0a mov %r9b,(%rdx) 403f71: 48 83 c2 02 add $0x2,%rdx 403f75: 39 ce cmp %ecx,%esi 403f77: 77 c7 ja 403f40 <socket@plt+0x2a70> 403f79: 8d 04 36 lea (%rsi,%rsi,1),%eax 403f7c: c3 retq 403f7d: 31 c0 xor %eax,%eax 403f7f: c3 retq 403f80: be 70 3e 40 00 mov $0x403e70,%esi 403f85: bf 17 00 00 00 mov $0x17,%edi 403f8a: e9 81 d3 ff ff jmpq 401310 <signal@plt> 403f8f: 90 nop 403f90: b8 13 00 00 00 mov $0x13,%eax 403f95: c3 retq 403f96: 90 nop 403f97: 90 nop 403f98: 90 nop 403f99: 90 nop 403f9a: 90 nop 403f9b: 90 nop 403f9c: 90 nop 403f9d: 90 nop 403f9e: 90 nop 403f9f: 90 nop 403fa0: f3 c3 repz retq 403fa2: 66 66 66 66 66 2e 0f data32 data32 data32 data32 nopw %cs:0x0(%rax,%rax,1) 403fa9: 1f 84 00 00 00 00 00 403fb0: 48 89 6c 24 d8 mov %rbp,-0x28(%rsp) 403fb5: 4c 89 64 24 e0 mov %r12,-0x20(%rsp) 403fba: 48 8d 2d 47 20 20 00 lea 0x202047(%rip),%rbp # 606008 <socket@plt+0x204b38> 403fc1: 4c 8d 25 38 20 20 00 lea 0x202038(%rip),%r12 # 606000 <socket@plt+0x204b30> 403fc8: 4c 89 6c 24 e8 mov %r13,-0x18(%rsp) 403fcd: 4c 89 74 24 f0 mov %r14,-0x10(%rsp) 403fd2: 4c 89 7c 24 f8 mov %r15,-0x8(%rsp) 403fd7: 48 89 5c 24 d0 mov %rbx,-0x30(%rsp) 403fdc: 48 83 ec 38 sub $0x38,%rsp 403fe0: 4c 29 e5 sub %r12,%rbp 403fe3: 41 89 fd mov %edi,%r13d 403fe6: 49 89 f6 mov %rsi,%r14 403fe9: 48 c1 fd 03 sar $0x3,%rbp 403fed: 49 89 d7 mov %rdx,%r15 403ff0: e8 7b d1 ff ff callq 401170 <getenv@plt-0x20> 403ff5: 48 85 ed test %rbp,%rbp 403ff8: 74 1c je 404016 <socket@plt+0x2b46> 403ffa: 31 db xor %ebx,%ebx 403ffc: 0f 1f 40 00 nopl 0x0(%rax) 404000: 4c 89 fa mov %r15,%rdx 404003: 4c 89 f6 mov %r14,%rsi 404006: 44 89 ef mov %r13d,%edi 404009: 41 ff 14 dc callq *(%r12,%rbx,8) 40400d: 48 83 c3 01 add $0x1,%rbx 404011: 48 39 eb cmp %rbp,%rbx 404014: 72 ea jb 404000 <socket@plt+0x2b30> 404016: 48 8b 5c 24 08 mov 0x8(%rsp),%rbx 40401b: 48 8b 6c 24 10 mov 0x10(%rsp),%rbp 404020: 4c 8b 64 24 18 mov 0x18(%rsp),%r12 404025: 4c 8b 6c 24 20 mov 0x20(%rsp),%r13 40402a: 4c 8b 74 24 28 mov 0x28(%rsp),%r14 40402f: 4c 8b 7c 24 30 mov 0x30(%rsp),%r15 404034: 48 83 c4 38 add $0x38,%rsp 404038: c3 retq 404039: 90 nop 40403a: 90 nop 40403b: 90 nop Disassembly of section .fini: 000000000040403c <.fini>: 40403c: 48 83 ec 08 sub $0x8,%rsp 404040: 48 83 c4 08 add $0x8,%rsp 404044: c3 retq
oeis/168/A168673.asm
neoneye/loda-programs
11
161405
; A168673: Binomial transform of A169609. ; Submitted by <NAME>(s2) ; 1,4,10,20,38,74,148,298,598,1196,2390,4778,9556,19114,38230,76460,152918,305834,611668,1223338,2446678,4893356,9786710,19573418,39146836,78293674,156587350,313174700,626349398,1252698794,2505397588,5010795178,10021590358,20043180716,40086361430,80172722858,160345445716,320690891434,641381782870,1282763565740,2565527131478,5131054262954,10262108525908,20524217051818,41048434103638,82096868207276,164193736414550,328387472829098,656774945658196,1313549891316394,2627099782632790,5254199565265580 mov $4,1 lpb $0 sub $0,1 add $1,2 add $3,1 add $4,$1 mov $1,$3 add $2,$4 add $3,$2 sub $3,$4 lpe mov $0,$2 add $0,1
target/cos_117/disasm/iop_overlay1/XFMCRE.asm
jrrk2/cray-sim
49
21560
<gh_stars>10-100 0x0000 (0x000000) 0x2118- f:00020 d: 280 | A = OR[280] 0x0001 (0x000002) 0xB434- f:00132 d: 52 | R = OR[52], A = 0 0x0002 (0x000004) 0x0000- f:00000 d: 0 | PASS 0x0003 (0x000006) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0004 (0x000008) 0x291C- f:00024 d: 284 | OR[284] = A 0x0005 (0x00000A) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0006 (0x00000C) 0x291D- f:00024 d: 285 | OR[285] = A 0x0007 (0x00000E) 0x1018- f:00010 d: 24 | A = 24 (0x0018) 0x0008 (0x000010) 0x292C- f:00024 d: 300 | OR[300] = A 0x0009 (0x000012) 0x1044- f:00010 d: 68 | A = 68 (0x0044) 0x000A (0x000014) 0x292D- f:00024 d: 301 | OR[301] = A 0x000B (0x000016) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x000C (0x000018) 0x292E- f:00024 d: 302 | OR[302] = A 0x000D (0x00001A) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x000E (0x00001C) 0x292F- f:00024 d: 303 | OR[303] = A 0x000F (0x00001E) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0010 (0x000020) 0x2930- f:00024 d: 304 | OR[304] = A 0x0011 (0x000022) 0x111E- f:00010 d: 286 | A = 286 (0x011E) 0x0012 (0x000024) 0x2931- f:00024 d: 305 | OR[305] = A 0x0013 (0x000026) 0x112C- f:00010 d: 300 | A = 300 (0x012C) 0x0014 (0x000028) 0x5800- f:00054 d: 0 | B = A 0x0015 (0x00002A) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0016 (0x00002C) 0x7C09- f:00076 d: 9 | R = OR[9] 0x0017 (0x00002E) 0x8602- f:00103 d: 2 | P = P + 2 (0x0019), A # 0 0x0018 (0x000030) 0x700B- f:00070 d: 11 | P = P + 11 (0x0023) 0x0019 (0x000032) 0x1007- f:00010 d: 7 | A = 7 (0x0007) 0x001A (0x000034) 0x292C- f:00024 d: 300 | OR[300] = A 0x001B (0x000036) 0x1001- f:00010 d: 1 | A = 1 (0x0001) 0x001C (0x000038) 0x292D- f:00024 d: 301 | OR[301] = A 0x001D (0x00003A) 0x112C- f:00010 d: 300 | A = 300 (0x012C) 0x001E (0x00003C) 0x5800- f:00054 d: 0 | B = A 0x001F (0x00003E) 0x1800-0x2918 f:00014 d: 0 | A = 10520 (0x2918) 0x0021 (0x000042) 0x7C09- f:00076 d: 9 | R = OR[9] 0x0022 (0x000044) 0x721B- f:00071 d: 27 | P = P - 27 (0x0007) 0x0023 (0x000046) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x0024 (0x000048) 0x292C- f:00024 d: 300 | OR[300] = A 0x0025 (0x00004A) 0x1800-0x00F0 f:00014 d: 0 | A = 240 (0x00F0) 0x0027 (0x00004E) 0x292D- f:00024 d: 301 | OR[301] = A 0x0028 (0x000050) 0x2118- f:00020 d: 280 | A = OR[280] 0x0029 (0x000052) 0x292E- f:00024 d: 302 | OR[302] = A 0x002A (0x000054) 0x211E- f:00020 d: 286 | A = OR[286] 0x002B (0x000056) 0x292F- f:00024 d: 303 | OR[303] = A 0x002C (0x000058) 0x2119- f:00020 d: 281 | A = OR[281] 0x002D (0x00005A) 0x2930- f:00024 d: 304 | OR[304] = A 0x002E (0x00005C) 0x211A- f:00020 d: 282 | A = OR[282] 0x002F (0x00005E) 0x2931- f:00024 d: 305 | OR[305] = A 0x0030 (0x000060) 0x112C- f:00010 d: 300 | A = 300 (0x012C) 0x0031 (0x000062) 0x5800- f:00054 d: 0 | B = A 0x0032 (0x000064) 0x1800-0x2918 f:00014 d: 0 | A = 10520 (0x2918) 0x0034 (0x000068) 0x7C09- f:00076 d: 9 | R = OR[9] 0x0035 (0x00006A) 0x291C- f:00024 d: 284 | OR[284] = A 0x0036 (0x00006C) 0x211C- f:00020 d: 284 | A = OR[284] 0x0037 (0x00006E) 0x1E00-0x0444 f:00017 d: 0 | A = A - 1092 (0x0444) 0x0039 (0x000072) 0x8402- f:00102 d: 2 | P = P + 2 (0x003B), A = 0 0x003A (0x000074) 0x7004- f:00070 d: 4 | P = P + 4 (0x003E) 0x003B (0x000076) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x003C (0x000078) 0x291C- f:00024 d: 284 | OR[284] = A 0x003D (0x00007A) 0x700A- f:00070 d: 10 | P = P + 10 (0x0047) 0x003E (0x00007C) 0x211C- f:00020 d: 284 | A = OR[284] 0x003F (0x00007E) 0x8402- f:00102 d: 2 | P = P + 2 (0x0041), A = 0 0x0040 (0x000080) 0x7006- f:00070 d: 6 | P = P + 6 (0x0046) 0x0041 (0x000082) 0x1800-0x0445 f:00014 d: 0 | A = 1093 (0x0445) 0x0043 (0x000086) 0x291C- f:00024 d: 284 | OR[284] = A 0x0044 (0x000088) 0x7055- f:00070 d: 85 | P = P + 85 (0x0099) 0x0045 (0x00008A) 0x7002- f:00070 d: 2 | P = P + 2 (0x0047) 0x0046 (0x00008C) 0x7053- f:00070 d: 83 | P = P + 83 (0x0099) 0x0047 (0x00008E) 0x747A- f:00072 d: 122 | R = P + 122 (0x00C1) 0x0048 (0x000090) 0x101A- f:00010 d: 26 | A = 26 (0x001A) 0x0049 (0x000092) 0x292C- f:00024 d: 300 | OR[300] = A 0x004A (0x000094) 0x111D- f:00010 d: 285 | A = 285 (0x011D) 0x004B (0x000096) 0x292D- f:00024 d: 301 | OR[301] = A 0x004C (0x000098) 0x112C- f:00010 d: 300 | A = 300 (0x012C) 0x004D (0x00009A) 0x5800- f:00054 d: 0 | B = A 0x004E (0x00009C) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x004F (0x00009E) 0x7C09- f:00076 d: 9 | R = OR[9] 0x0050 (0x0000A0) 0x8602- f:00103 d: 2 | P = P + 2 (0x0052), A # 0 0x0051 (0x0000A2) 0x700B- f:00070 d: 11 | P = P + 11 (0x005C) 0x0052 (0x0000A4) 0x1007- f:00010 d: 7 | A = 7 (0x0007) 0x0053 (0x0000A6) 0x292C- f:00024 d: 300 | OR[300] = A 0x0054 (0x0000A8) 0x1001- f:00010 d: 1 | A = 1 (0x0001) 0x0055 (0x0000AA) 0x292D- f:00024 d: 301 | OR[301] = A 0x0056 (0x0000AC) 0x112C- f:00010 d: 300 | A = 300 (0x012C) 0x0057 (0x0000AE) 0x5800- f:00054 d: 0 | B = A 0x0058 (0x0000B0) 0x1800-0x2918 f:00014 d: 0 | A = 10520 (0x2918) 0x005A (0x0000B4) 0x7C09- f:00076 d: 9 | R = OR[9] 0x005B (0x0000B6) 0x7213- f:00071 d: 19 | P = P - 19 (0x0048) 0x005C (0x0000B8) 0x1005- f:00010 d: 5 | A = 5 (0x0005) 0x005D (0x0000BA) 0x2920- f:00024 d: 288 | OR[288] = A 0x005E (0x0000BC) 0x1004- f:00010 d: 4 | A = 4 (0x0004) 0x005F (0x0000BE) 0x2921- f:00024 d: 289 | OR[289] = A 0x0060 (0x0000C0) 0x7510- f:00072 d: 272 | R = P + 272 (0x0170) 0x0061 (0x0000C2) 0x1008- f:00010 d: 8 | A = 8 (0x0008) 0x0062 (0x0000C4) 0x2922- f:00024 d: 290 | OR[290] = A 0x0063 (0x0000C6) 0x2122- f:00020 d: 290 | A = OR[290] 0x0064 (0x0000C8) 0x1E00-0x0800 f:00017 d: 0 | A = A - 2048 (0x0800) 0x0066 (0x0000CC) 0x822A- f:00101 d: 42 | P = P + 42 (0x0090), C = 1 0x0067 (0x0000CE) 0x211D- f:00020 d: 285 | A = OR[285] 0x0068 (0x0000D0) 0x2522- f:00022 d: 290 | A = A + OR[290] 0x0069 (0x0000D2) 0x2923- f:00024 d: 291 | OR[291] = A 0x006A (0x0000D4) 0x3123- f:00030 d: 291 | A = (OR[291]) 0x006B (0x0000D6) 0x080F- f:00004 d: 15 | A = A > 15 (0x000F) 0x006C (0x0000D8) 0x2924- f:00024 d: 292 | OR[292] = A 0x006D (0x0000DA) 0x2124- f:00020 d: 292 | A = OR[292] 0x006E (0x0000DC) 0x8402- f:00102 d: 2 | P = P + 2 (0x0070), A = 0 0x006F (0x0000DE) 0x701E- f:00070 d: 30 | P = P + 30 (0x008D) 0x0070 (0x0000E0) 0x211F- f:00020 d: 287 | A = OR[287] 0x0071 (0x0000E2) 0x290D- f:00024 d: 269 | OR[269] = A 0x0072 (0x0000E4) 0x2123- f:00020 d: 291 | A = OR[291] 0x0073 (0x0000E6) 0x290E- f:00024 d: 270 | OR[270] = A 0x0074 (0x0000E8) 0x103C- f:00010 d: 60 | A = 60 (0x003C) 0x0075 (0x0000EA) 0x290F- f:00024 d: 271 | OR[271] = A 0x0076 (0x0000EC) 0x7006- f:00070 d: 6 | P = P + 6 (0x007C) 0x0077 (0x0000EE) 0x310D- f:00030 d: 269 | A = (OR[269]) 0x0078 (0x0000F0) 0x390E- f:00034 d: 270 | (OR[270]) = A 0x0079 (0x0000F2) 0x2D0D- f:00026 d: 269 | OR[269] = OR[269] + 1 0x007A (0x0000F4) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1 0x007B (0x0000F6) 0x2F0F- f:00027 d: 271 | OR[271] = OR[271] - 1 0x007C (0x0000F8) 0x210F- f:00020 d: 271 | A = OR[271] 0x007D (0x0000FA) 0x8E06- f:00107 d: 6 | P = P - 6 (0x0077), A # 0 0x007E (0x0000FC) 0x2120- f:00020 d: 288 | A = OR[288] 0x007F (0x0000FE) 0x391E- f:00034 d: 286 | (OR[286]) = A 0x0080 (0x000100) 0x211E- f:00020 d: 286 | A = OR[286] 0x0081 (0x000102) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001) 0x0082 (0x000104) 0x2908- f:00024 d: 264 | OR[264] = A 0x0083 (0x000106) 0x2122- f:00020 d: 290 | A = OR[290] 0x0084 (0x000108) 0x3908- f:00034 d: 264 | (OR[264]) = A 0x0085 (0x00010A) 0x211D- f:00020 d: 285 | A = OR[285] 0x0086 (0x00010C) 0x1407- f:00012 d: 7 | A = A + 7 (0x0007) 0x0087 (0x00010E) 0x2908- f:00024 d: 264 | OR[264] = A 0x0088 (0x000110) 0x3D08- f:00036 d: 264 | (OR[264]) = (OR[264]) + 1 0x0089 (0x000112) 0x1003- f:00010 d: 3 | A = 3 (0x0003) 0x008A (0x000114) 0x2921- f:00024 d: 289 | OR[289] = A 0x008B (0x000116) 0x74E5- f:00072 d: 229 | R = P + 229 (0x0170) 0x008C (0x000118) 0x700D- f:00070 d: 13 | P = P + 13 (0x0099) 0x008D (0x00011A) 0x103C- f:00010 d: 60 | A = 60 (0x003C) 0x008E (0x00011C) 0x2B22- f:00025 d: 290 | OR[290] = A + OR[290] 0x008F (0x00011E) 0x722C- f:00071 d: 44 | P = P - 44 (0x0063) 0x0090 (0x000120) 0x311D- f:00030 d: 285 | A = (OR[285]) 0x0091 (0x000122) 0x2925- f:00024 d: 293 | OR[293] = A 0x0092 (0x000124) 0x2125- f:00020 d: 293 | A = OR[293] 0x0093 (0x000126) 0x8602- f:00103 d: 2 | P = P + 2 (0x0095), A # 0 0x0094 (0x000128) 0x7004- f:00070 d: 4 | P = P + 4 (0x0098) 0x0095 (0x00012A) 0x2125- f:00020 d: 293 | A = OR[293] 0x0096 (0x00012C) 0x2920- f:00024 d: 288 | OR[288] = A 0x0097 (0x00012E) 0x7239- f:00071 d: 57 | P = P - 57 (0x005E) 0x0098 (0x000130) 0x747A- f:00072 d: 122 | R = P + 122 (0x0112) 0x0099 (0x000132) 0x211D- f:00020 d: 285 | A = OR[285] 0x009A (0x000134) 0x8602- f:00103 d: 2 | P = P + 2 (0x009C), A # 0 0x009B (0x000136) 0x7009- f:00070 d: 9 | P = P + 9 (0x00A4) 0x009C (0x000138) 0x101B- f:00010 d: 27 | A = 27 (0x001B) 0x009D (0x00013A) 0x292C- f:00024 d: 300 | OR[300] = A 0x009E (0x00013C) 0x211D- f:00020 d: 285 | A = OR[285] 0x009F (0x00013E) 0x292D- f:00024 d: 301 | OR[301] = A 0x00A0 (0x000140) 0x112C- f:00010 d: 300 | A = 300 (0x012C) 0x00A1 (0x000142) 0x5800- f:00054 d: 0 | B = A 0x00A2 (0x000144) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x00A3 (0x000146) 0x7C09- f:00076 d: 9 | R = OR[9] 0x00A4 (0x000148) 0x211C- f:00020 d: 284 | A = OR[284] 0x00A5 (0x00014A) 0x8602- f:00103 d: 2 | P = P + 2 (0x00A7), A # 0 0x00A6 (0x00014C) 0x700B- f:00070 d: 11 | P = P + 11 (0x00B1) 0x00A7 (0x00014E) 0x1019- f:00010 d: 25 | A = 25 (0x0019) 0x00A8 (0x000150) 0x292C- f:00024 d: 300 | OR[300] = A 0x00A9 (0x000152) 0x211E- f:00020 d: 286 | A = OR[286] 0x00AA (0x000154) 0x292D- f:00024 d: 301 | OR[301] = A 0x00AB (0x000156) 0x112C- f:00010 d: 300 | A = 300 (0x012C) 0x00AC (0x000158) 0x5800- f:00054 d: 0 | B = A 0x00AD (0x00015A) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x00AE (0x00015C) 0x7C09- f:00076 d: 9 | R = OR[9] 0x00AF (0x00015E) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x00B0 (0x000160) 0x291E- f:00024 d: 286 | OR[286] = A 0x00B1 (0x000162) 0x2005- f:00020 d: 5 | A = OR[5] 0x00B2 (0x000164) 0x251B- f:00022 d: 283 | A = A + OR[283] 0x00B3 (0x000166) 0x290D- f:00024 d: 269 | OR[269] = A 0x00B4 (0x000168) 0x211E- f:00020 d: 286 | A = OR[286] 0x00B5 (0x00016A) 0x390D- f:00034 d: 269 | (OR[269]) = A 0x00B6 (0x00016C) 0x2005- f:00020 d: 5 | A = OR[5] 0x00B7 (0x00016E) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006) 0x00B8 (0x000170) 0x2908- f:00024 d: 264 | OR[264] = A 0x00B9 (0x000172) 0x211C- f:00020 d: 284 | A = OR[284] 0x00BA (0x000174) 0x3908- f:00034 d: 264 | (OR[264]) = A 0x00BB (0x000176) 0x102A- f:00010 d: 42 | A = 42 (0x002A) 0x00BC (0x000178) 0x292C- f:00024 d: 300 | OR[300] = A 0x00BD (0x00017A) 0x112C- f:00010 d: 300 | A = 300 (0x012C) 0x00BE (0x00017C) 0x5800- f:00054 d: 0 | B = A 0x00BF (0x00017E) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x00C0 (0x000180) 0x7C09- f:00076 d: 9 | R = OR[9] 0x00C1 (0x000182) 0x211E- f:00020 d: 286 | A = OR[286] 0x00C2 (0x000184) 0x290E- f:00024 d: 270 | OR[270] = A 0x00C3 (0x000186) 0x1044- f:00010 d: 68 | A = 68 (0x0044) 0x00C4 (0x000188) 0x290D- f:00024 d: 269 | OR[269] = A 0x00C5 (0x00018A) 0x210D- f:00020 d: 269 | A = OR[269] 0x00C6 (0x00018C) 0x8406- f:00102 d: 6 | P = P + 6 (0x00CC), A = 0 0x00C7 (0x00018E) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x00C8 (0x000190) 0x390E- f:00034 d: 270 | (OR[270]) = A 0x00C9 (0x000192) 0x2F0D- f:00027 d: 269 | OR[269] = OR[269] - 1 0x00CA (0x000194) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1 0x00CB (0x000196) 0x7206- f:00071 d: 6 | P = P - 6 (0x00C5) 0x00CC (0x000198) 0x211E- f:00020 d: 286 | A = OR[286] 0x00CD (0x00019A) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008) 0x00CE (0x00019C) 0x291F- f:00024 d: 287 | OR[287] = A 0x00CF (0x00019E) 0x311F- f:00030 d: 287 | A = (OR[287]) 0x00D0 (0x0001A0) 0x0A02- f:00005 d: 2 | A = A < 2 (0x0002) 0x00D1 (0x0001A2) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001) 0x00D2 (0x0001A4) 0x0C02- f:00006 d: 2 | A = A >> 2 (0x0002) 0x00D3 (0x0001A6) 0x391F- f:00034 d: 287 | (OR[287]) = A 0x00D4 (0x0001A8) 0x311F- f:00030 d: 287 | A = (OR[287]) 0x00D5 (0x0001AA) 0x0E02- f:00007 d: 2 | A = A << 2 (0x0002) 0x00D6 (0x0001AC) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001) 0x00D7 (0x0001AE) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001) 0x00D8 (0x0001B0) 0x0C03- f:00006 d: 3 | A = A >> 3 (0x0003) 0x00D9 (0x0001B2) 0x391F- f:00034 d: 287 | (OR[287]) = A 0x00DA (0x0001B4) 0x2119- f:00020 d: 281 | A = OR[281] 0x00DB (0x0001B6) 0x2926- f:00024 d: 294 | OR[294] = A 0x00DC (0x0001B8) 0x211F- f:00020 d: 287 | A = OR[287] 0x00DD (0x0001BA) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001) 0x00DE (0x0001BC) 0x2927- f:00024 d: 295 | OR[295] = A 0x00DF (0x0001BE) 0x1010- f:00010 d: 16 | A = 16 (0x0010) 0x00E0 (0x0001C0) 0x2928- f:00024 d: 296 | OR[296] = A 0x00E1 (0x0001C2) 0x74A9- f:00072 d: 169 | R = P + 169 (0x018A) 0x00E2 (0x0001C4) 0x211A- f:00020 d: 282 | A = OR[282] 0x00E3 (0x0001C6) 0x2926- f:00024 d: 294 | OR[294] = A 0x00E4 (0x0001C8) 0x211F- f:00020 d: 287 | A = OR[287] 0x00E5 (0x0001CA) 0x1409- f:00012 d: 9 | A = A + 9 (0x0009) 0x00E6 (0x0001CC) 0x2927- f:00024 d: 295 | OR[295] = A 0x00E7 (0x0001CE) 0x1010- f:00010 d: 16 | A = 16 (0x0010) 0x00E8 (0x0001D0) 0x2928- f:00024 d: 296 | OR[296] = A 0x00E9 (0x0001D2) 0x74A1- f:00072 d: 161 | R = P + 161 (0x018A) 0x00EA (0x0001D4) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x00EB (0x0001D6) 0x292C- f:00024 d: 300 | OR[300] = A 0x00EC (0x0001D8) 0x1800-0x0041 f:00014 d: 0 | A = 65 (0x0041) 0x00EE (0x0001DC) 0x292D- f:00024 d: 301 | OR[301] = A 0x00EF (0x0001DE) 0x1800-0x0002 f:00014 d: 0 | A = 2 (0x0002) 0x00F1 (0x0001E2) 0x292E- f:00024 d: 302 | OR[302] = A 0x00F2 (0x0001E4) 0x211F- f:00020 d: 287 | A = OR[287] 0x00F3 (0x0001E6) 0x292F- f:00024 d: 303 | OR[303] = A 0x00F4 (0x0001E8) 0x1022- f:00010 d: 34 | A = 34 (0x0022) 0x00F5 (0x0001EA) 0x2930- f:00024 d: 304 | OR[304] = A 0x00F6 (0x0001EC) 0x112C- f:00010 d: 300 | A = 300 (0x012C) 0x00F7 (0x0001EE) 0x5800- f:00054 d: 0 | B = A 0x00F8 (0x0001F0) 0x1800-0x2918 f:00014 d: 0 | A = 10520 (0x2918) 0x00FA (0x0001F4) 0x7C09- f:00076 d: 9 | R = OR[9] 0x00FB (0x0001F6) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x00FC (0x0001F8) 0x292C- f:00024 d: 300 | OR[300] = A 0x00FD (0x0001FA) 0x1800-0x0041 f:00014 d: 0 | A = 65 (0x0041) 0x00FF (0x0001FE) 0x292D- f:00024 d: 301 | OR[301] = A 0x0100 (0x000200) 0x1800-0x0000 f:00014 d: 0 | A = 0 (0x0000) 0x0102 (0x000204) 0x292E- f:00024 d: 302 | OR[302] = A 0x0103 (0x000206) 0x211F- f:00020 d: 287 | A = OR[287] 0x0104 (0x000208) 0x292F- f:00024 d: 303 | OR[303] = A 0x0105 (0x00020A) 0x102A- f:00010 d: 42 | A = 42 (0x002A) 0x0106 (0x00020C) 0x2930- f:00024 d: 304 | OR[304] = A 0x0107 (0x00020E) 0x112C- f:00010 d: 300 | A = 300 (0x012C) 0x0108 (0x000210) 0x5800- f:00054 d: 0 | B = A 0x0109 (0x000212) 0x1800-0x2918 f:00014 d: 0 | A = 10520 (0x2918) 0x010B (0x000216) 0x7C09- f:00076 d: 9 | R = OR[9] 0x010C (0x000218) 0x211F- f:00020 d: 287 | A = OR[287] 0x010D (0x00021A) 0x141B- f:00012 d: 27 | A = A + 27 (0x001B) 0x010E (0x00021C) 0x2908- f:00024 d: 264 | OR[264] = A 0x010F (0x00021E) 0x1064- f:00010 d: 100 | A = 100 (0x0064) 0x0110 (0x000220) 0x3908- f:00034 d: 264 | (OR[264]) = A 0x0111 (0x000222) 0x0200- f:00001 d: 0 | EXIT 0x0112 (0x000224) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x0113 (0x000226) 0x292C- f:00024 d: 300 | OR[300] = A 0x0114 (0x000228) 0x1800-0x00F1 f:00014 d: 0 | A = 241 (0x00F1) 0x0116 (0x00022C) 0x292D- f:00024 d: 301 | OR[301] = A 0x0117 (0x00022E) 0x2118- f:00020 d: 280 | A = OR[280] 0x0118 (0x000230) 0x292E- f:00024 d: 302 | OR[302] = A 0x0119 (0x000232) 0x1800-0xFFFF f:00014 d: 0 | A = 65535 (0xFFFF) 0x011B (0x000236) 0x292F- f:00024 d: 303 | OR[303] = A 0x011C (0x000238) 0x1001- f:00010 d: 1 | A = 1 (0x0001) 0x011D (0x00023A) 0x2930- f:00024 d: 304 | OR[304] = A 0x011E (0x00023C) 0x1019- f:00010 d: 25 | A = 25 (0x0019) 0x011F (0x00023E) 0x2931- f:00024 d: 305 | OR[305] = A 0x0120 (0x000240) 0x112C- f:00010 d: 300 | A = 300 (0x012C) 0x0121 (0x000242) 0x5800- f:00054 d: 0 | B = A 0x0122 (0x000244) 0x1800-0x2918 f:00014 d: 0 | A = 10520 (0x2918) 0x0124 (0x000248) 0x7C09- f:00076 d: 9 | R = OR[9] 0x0125 (0x00024A) 0x291C- f:00024 d: 284 | OR[284] = A 0x0126 (0x00024C) 0x211C- f:00020 d: 284 | A = OR[284] 0x0127 (0x00024E) 0x8602- f:00103 d: 2 | P = P + 2 (0x0129), A # 0 0x0128 (0x000250) 0x7002- f:00070 d: 2 | P = P + 2 (0x012A) 0x0129 (0x000252) 0x7290- f:00071 d: 144 | P = P - 144 (0x0099) 0x012A (0x000254) 0x2125- f:00020 d: 293 | A = OR[293] 0x012B (0x000256) 0x391D- f:00034 d: 285 | (OR[285]) = A 0x012C (0x000258) 0x1003- f:00010 d: 3 | A = 3 (0x0003) 0x012D (0x00025A) 0x2921- f:00024 d: 289 | OR[289] = A 0x012E (0x00025C) 0x7442- f:00072 d: 66 | R = P + 66 (0x0170) 0x012F (0x00025E) 0x211D- f:00020 d: 285 | A = OR[285] 0x0130 (0x000260) 0x290E- f:00024 d: 270 | OR[270] = A 0x0131 (0x000262) 0x1800-0x0800 f:00014 d: 0 | A = 2048 (0x0800) 0x0133 (0x000266) 0x290D- f:00024 d: 269 | OR[269] = A 0x0134 (0x000268) 0x210D- f:00020 d: 269 | A = OR[269] 0x0135 (0x00026A) 0x8406- f:00102 d: 6 | P = P + 6 (0x013B), A = 0 0x0136 (0x00026C) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0137 (0x00026E) 0x390E- f:00034 d: 270 | (OR[270]) = A 0x0138 (0x000270) 0x2F0D- f:00027 d: 269 | OR[269] = OR[269] - 1 0x0139 (0x000272) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1 0x013A (0x000274) 0x7206- f:00071 d: 6 | P = P - 6 (0x0134) 0x013B (0x000276) 0x211D- f:00020 d: 285 | A = OR[285] 0x013C (0x000278) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001) 0x013D (0x00027A) 0x2908- f:00024 d: 264 | OR[264] = A 0x013E (0x00027C) 0x2120- f:00020 d: 288 | A = OR[288] 0x013F (0x00027E) 0x3908- f:00034 d: 264 | (OR[264]) = A 0x0140 (0x000280) 0x2125- f:00020 d: 293 | A = OR[293] 0x0141 (0x000282) 0x391E- f:00034 d: 286 | (OR[286]) = A 0x0142 (0x000284) 0x211E- f:00020 d: 286 | A = OR[286] 0x0143 (0x000286) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001) 0x0144 (0x000288) 0x2908- f:00024 d: 264 | OR[264] = A 0x0145 (0x00028A) 0x1008- f:00010 d: 8 | A = 8 (0x0008) 0x0146 (0x00028C) 0x3908- f:00034 d: 264 | (OR[264]) = A 0x0147 (0x00028E) 0x211D- f:00020 d: 285 | A = OR[285] 0x0148 (0x000290) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008) 0x0149 (0x000292) 0x2923- f:00024 d: 291 | OR[291] = A 0x014A (0x000294) 0x211F- f:00020 d: 287 | A = OR[287] 0x014B (0x000296) 0x290D- f:00024 d: 269 | OR[269] = A 0x014C (0x000298) 0x2123- f:00020 d: 291 | A = OR[291] 0x014D (0x00029A) 0x290E- f:00024 d: 270 | OR[270] = A 0x014E (0x00029C) 0x103C- f:00010 d: 60 | A = 60 (0x003C) 0x014F (0x00029E) 0x290F- f:00024 d: 271 | OR[271] = A 0x0150 (0x0002A0) 0x7006- f:00070 d: 6 | P = P + 6 (0x0156) 0x0151 (0x0002A2) 0x310D- f:00030 d: 269 | A = (OR[269]) 0x0152 (0x0002A4) 0x390E- f:00034 d: 270 | (OR[270]) = A 0x0153 (0x0002A6) 0x2D0D- f:00026 d: 269 | OR[269] = OR[269] + 1 0x0154 (0x0002A8) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1 0x0155 (0x0002AA) 0x2F0F- f:00027 d: 271 | OR[271] = OR[271] - 1 0x0156 (0x0002AC) 0x210F- f:00020 d: 271 | A = OR[271] 0x0157 (0x0002AE) 0x8E06- f:00107 d: 6 | P = P - 6 (0x0151), A # 0 0x0158 (0x0002B0) 0x211D- f:00020 d: 285 | A = OR[285] 0x0159 (0x0002B2) 0x1407- f:00012 d: 7 | A = A + 7 (0x0007) 0x015A (0x0002B4) 0x2908- f:00024 d: 264 | OR[264] = A 0x015B (0x0002B6) 0x1001- f:00010 d: 1 | A = 1 (0x0001) 0x015C (0x0002B8) 0x3908- f:00034 d: 264 | (OR[264]) = A 0x015D (0x0002BA) 0x1003- f:00010 d: 3 | A = 3 (0x0003) 0x015E (0x0002BC) 0x2921- f:00024 d: 289 | OR[289] = A 0x015F (0x0002BE) 0x2125- f:00020 d: 293 | A = OR[293] 0x0160 (0x0002C0) 0x2920- f:00024 d: 288 | OR[288] = A 0x0161 (0x0002C2) 0x740F- f:00072 d: 15 | R = P + 15 (0x0170) 0x0162 (0x0002C4) 0x1004- f:00010 d: 4 | A = 4 (0x0004) 0x0163 (0x0002C6) 0x2921- f:00024 d: 289 | OR[289] = A 0x0164 (0x0002C8) 0x1003- f:00010 d: 3 | A = 3 (0x0003) 0x0165 (0x0002CA) 0x2920- f:00024 d: 288 | OR[288] = A 0x0166 (0x0002CC) 0x740A- f:00072 d: 10 | R = P + 10 (0x0170) 0x0167 (0x0002CE) 0x211D- f:00020 d: 285 | A = OR[285] 0x0168 (0x0002D0) 0x1418- f:00012 d: 24 | A = A + 24 (0x0018) 0x0169 (0x0002D2) 0x2908- f:00024 d: 264 | OR[264] = A 0x016A (0x0002D4) 0x2125- f:00020 d: 293 | A = OR[293] 0x016B (0x0002D6) 0x3908- f:00034 d: 264 | (OR[264]) = A 0x016C (0x0002D8) 0x1003- f:00010 d: 3 | A = 3 (0x0003) 0x016D (0x0002DA) 0x2921- f:00024 d: 289 | OR[289] = A 0x016E (0x0002DC) 0x7402- f:00072 d: 2 | R = P + 2 (0x0170) 0x016F (0x0002DE) 0x0200- f:00001 d: 0 | EXIT 0x0170 (0x0002E0) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x0171 (0x0002E2) 0x292C- f:00024 d: 300 | OR[300] = A 0x0172 (0x0002E4) 0x1800-0x00A6 f:00014 d: 0 | A = 166 (0x00A6) 0x0174 (0x0002E8) 0x292D- f:00024 d: 301 | OR[301] = A 0x0175 (0x0002EA) 0x2118- f:00020 d: 280 | A = OR[280] 0x0176 (0x0002EC) 0x292E- f:00024 d: 302 | OR[302] = A 0x0177 (0x0002EE) 0x2121- f:00020 d: 289 | A = OR[289] 0x0178 (0x0002F0) 0x292F- f:00024 d: 303 | OR[303] = A 0x0179 (0x0002F2) 0x211D- f:00020 d: 285 | A = OR[285] 0x017A (0x0002F4) 0x2930- f:00024 d: 304 | OR[304] = A 0x017B (0x0002F6) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x017C (0x0002F8) 0x2931- f:00024 d: 305 | OR[305] = A 0x017D (0x0002FA) 0x2120- f:00020 d: 288 | A = OR[288] 0x017E (0x0002FC) 0x2932- f:00024 d: 306 | OR[306] = A 0x017F (0x0002FE) 0x112C- f:00010 d: 300 | A = 300 (0x012C) 0x0180 (0x000300) 0x5800- f:00054 d: 0 | B = A 0x0181 (0x000302) 0x1800-0x2918 f:00014 d: 0 | A = 10520 (0x2918) 0x0183 (0x000306) 0x7C09- f:00076 d: 9 | R = OR[9] 0x0184 (0x000308) 0x291C- f:00024 d: 284 | OR[284] = A 0x0185 (0x00030A) 0x211C- f:00020 d: 284 | A = OR[284] 0x0186 (0x00030C) 0x8602- f:00103 d: 2 | P = P + 2 (0x0188), A # 0 0x0187 (0x00030E) 0x7002- f:00070 d: 2 | P = P + 2 (0x0189) 0x0188 (0x000310) 0x72EF- f:00071 d: 239 | P = P - 239 (0x0099) 0x0189 (0x000312) 0x0200- f:00001 d: 0 | EXIT 0x018A (0x000314) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x018B (0x000316) 0x2913- f:00024 d: 275 | OR[275] = A 0x018C (0x000318) 0x2113- f:00020 d: 275 | A = OR[275] 0x018D (0x00031A) 0x2728- f:00023 d: 296 | A = A - OR[296] 0x018E (0x00031C) 0x8431- f:00102 d: 49 | P = P + 49 (0x01BF), A = 0 0x018F (0x00031E) 0x2113- f:00020 d: 275 | A = OR[275] 0x0190 (0x000320) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001) 0x0191 (0x000322) 0x2526- f:00022 d: 294 | A = A + OR[294] 0x0192 (0x000324) 0x290D- f:00024 d: 269 | OR[269] = A 0x0193 (0x000326) 0x310D- f:00030 d: 269 | A = (OR[269]) 0x0194 (0x000328) 0x290D- f:00024 d: 269 | OR[269] = A 0x0195 (0x00032A) 0x2113- f:00020 d: 275 | A = OR[275] 0x0196 (0x00032C) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001) 0x0197 (0x00032E) 0x2908- f:00024 d: 264 | OR[264] = A 0x0198 (0x000330) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0199 (0x000332) 0x2708- f:00023 d: 264 | A = A - OR[264] 0x019A (0x000334) 0x8604- f:00103 d: 4 | P = P + 4 (0x019E), A # 0 0x019B (0x000336) 0x210D- f:00020 d: 269 | A = OR[269] 0x019C (0x000338) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008) 0x019D (0x00033A) 0x290D- f:00024 d: 269 | OR[269] = A 0x019E (0x00033C) 0x210D- f:00020 d: 269 | A = OR[269] 0x019F (0x00033E) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF) 0x01A0 (0x000340) 0x292B- f:00024 d: 299 | OR[299] = A 0x01A1 (0x000342) 0x212B- f:00020 d: 299 | A = OR[299] 0x01A2 (0x000344) 0x8402- f:00102 d: 2 | P = P + 2 (0x01A4), A = 0 0x01A3 (0x000346) 0x7002- f:00070 d: 2 | P = P + 2 (0x01A5) 0x01A4 (0x000348) 0x0200- f:00001 d: 0 | EXIT 0x01A5 (0x00034A) 0x212B- f:00020 d: 299 | A = OR[299] 0x01A6 (0x00034C) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF) 0x01A7 (0x00034E) 0x290D- f:00024 d: 269 | OR[269] = A 0x01A8 (0x000350) 0x2113- f:00020 d: 275 | A = OR[275] 0x01A9 (0x000352) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001) 0x01AA (0x000354) 0x2527- f:00022 d: 295 | A = A + OR[295] 0x01AB (0x000356) 0x290E- f:00024 d: 270 | OR[270] = A 0x01AC (0x000358) 0x2113- f:00020 d: 275 | A = OR[275] 0x01AD (0x00035A) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001) 0x01AE (0x00035C) 0x2908- f:00024 d: 264 | OR[264] = A 0x01AF (0x00035E) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x01B0 (0x000360) 0x2708- f:00023 d: 264 | A = A - OR[264] 0x01B1 (0x000362) 0x8607- f:00103 d: 7 | P = P + 7 (0x01B8), A # 0 0x01B2 (0x000364) 0x310E- f:00030 d: 270 | A = (OR[270]) 0x01B3 (0x000366) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009) 0x01B4 (0x000368) 0x250D- f:00022 d: 269 | A = A + OR[269] 0x01B5 (0x00036A) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009) 0x01B6 (0x00036C) 0x390E- f:00034 d: 270 | (OR[270]) = A 0x01B7 (0x00036E) 0x7006- f:00070 d: 6 | P = P + 6 (0x01BD) 0x01B8 (0x000370) 0x310E- f:00030 d: 270 | A = (OR[270]) 0x01B9 (0x000372) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00) 0x01BB (0x000376) 0x250D- f:00022 d: 269 | A = A + OR[269] 0x01BC (0x000378) 0x390E- f:00034 d: 270 | (OR[270]) = A 0x01BD (0x00037A) 0x2D13- f:00026 d: 275 | OR[275] = OR[275] + 1 0x01BE (0x00037C) 0x7232- f:00071 d: 50 | P = P - 50 (0x018C) 0x01BF (0x00037E) 0x0200- f:00001 d: 0 | EXIT 0x01C0 (0x000380) 0x0000- f:00000 d: 0 | PASS 0x01C1 (0x000382) 0x0000- f:00000 d: 0 | PASS 0x01C2 (0x000384) 0x0000- f:00000 d: 0 | PASS 0x01C3 (0x000386) 0x0000- f:00000 d: 0 | PASS
programs/oeis/282/A282852.asm
neoneye/loda
22
164284
<filename>programs/oeis/282/A282852.asm ; A282852: 37-gonal numbers: a(n) = n*(35*n-33)/2. ; 0,1,37,108,214,355,531,742,988,1269,1585,1936,2322,2743,3199,3690,4216,4777,5373,6004,6670,7371,8107,8878,9684,10525,11401,12312,13258,14239,15255,16306,17392,18513,19669,20860,22086,23347,24643,25974 mov $2,$0 bin $2,2 mul $2,35 add $0,$2
dcf/src/dcf-zip-crc.ads
onox/dcf-ada
5
6560
<reponame>onox/dcf-ada -- SPDX-License-Identifier: MIT -- -- Copyright (c) 1999 - 2018 <NAME> -- SWITZERLAND -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- copies of the Software, and to permit persons to whom the Software is -- furnished to do so, subject to the following conditions: -- -- The above copyright notice and this permission notice shall be included in -- all copies or substantial portions of the Software. -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- THE SOFTWARE. with Ada.Streams; package DCF.Zip.CRC is pragma Preelaborate; ------------------------------------------------------------- -- CRC: Cyclic Redundancy Check to verify data integrity -- ------------------------------------------------------------- procedure Init (CRC : out Unsigned_32); procedure Update (CRC : in out Unsigned_32; Inbuf : Zip.Byte_Buffer); pragma Inline (Update); procedure Update_Stream_Array (CRC : in out Unsigned_32; Inbuf : Ada.Streams.Stream_Element_Array); pragma Inline (Update_Stream_Array); function Final (CRC : Unsigned_32) return Unsigned_32; pragma Inline (Final); function Image (Value : Unsigned_32) return String; end DCF.Zip.CRC;
ga_lib/src/gl_util.ads
rogermc2/GA_Ada
3
5402
<gh_stars>1-10 with GL.Types; use GL.Types; with GA_Maths; with Multivectors; package GL_Util is subtype Pick_Window is Singles.Vector4; type GL_Pick is private; -- function From_GL (V3 : GL.Types.Singles.Vector3) return C3GA.Vector_E3; -- procedure GL_Color_3fm (R, G, B : GL.Types.Single); procedure Load_Pick_Matrix; procedure Pick_Matrix (Centre_X, Centre_Y : GL.Types.Size; Width, Height : GL.Types.Size); procedure Print_GL_Int3_Array (Name : String; anArray : GL.Types.Ints.Vector3_Array); function Rotor_To_GL_Matrix (R : Multivectors.Rotor) return GL.Types.Singles.Matrix4; procedure Rotor_GL_Multiply (R : Multivectors.Rotor; GL_Matrix : in out GL.Types.Singles.Matrix4); function To_GL (V3 : Multivectors.Multivector) return GL.Types.Doubles.Vector3; function To_GL (V3 : Multivectors.Multivector) return GL.Types.Singles.Vector3; function To_GL (V3 : GA_Maths.Float_3D) return GL.Types.Singles.Vector3; procedure Viewport_Coordinates (Pt_World : GA_Maths.Float_3D; Model_View_Matrix, Projection_Matrix : GL.Types.Singles.Matrix4; Coords : out GL.Types.Singles.Vector2); private type GL_Pick is record Pick_Active : Boolean := False; -- set to true during picking -- set to picking window (x, y, w, h) during picking OpenGL_Pick : Pick_Window := (others => 0.0); -- Must be set correctly by caller of pick() to get correct distances returned Frustum_Near : Single := 1.0; -- Must be set correctly by caller of pick() to get correct distances returned Frustum_Far : Single := 100.0; -- not required for pick(), provided for completenes FrustumWidth : Single := 0.0; -- not required for pick(), provided for completenes Frustum_Height : Single := 0.0; Pick_Window_Size : Int := 4; end record; end GL_Util;
oeis/321/A321715.asm
neoneye/loda-programs
11
8159
<reponame>neoneye/loda-programs ; A321715: a(n) = 3*a(n-1) + 4*a(n-2) + a(n-3), a(0) = 1, a(1) = -1, a(2) = -1 . ; Submitted by <NAME> ; 1,-1,-1,-6,-23,-94,-380,-1539,-6231,-25229,-102150,-413597,-1674620,-6780398,-27453271,-111156025,-450061557,-1822262042,-7378188379,-29873674862,-120956040144,-489741008259,-1982920860215,-8028682653825,-32507472410594,-131620068707297,-532918778418092,-2157744082494058,-8736527429861839,-35373477397979841,-143224285995880937,-579903295009424014,-2347980506409775631,-9506778985262903886,-38492162276437238196,-155851583276773105763,-631030177921331173959,-2554989029147523183125 mov $1,1 mov $2,1 mov $3,-4 lpb $0 sub $0,1 add $1,$3 add $1,$2 add $1,$3 div $3,2 sub $3,$1 add $1,$2 add $1,$3 mul $2,2 sub $2,$3 add $3,$2 lpe mov $0,$1
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1595.asm
ljhsiun2/medusa
9
17215
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r15 push %rax push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0x163b6, %rbp and $29452, %rdi movb $0x61, (%rbp) nop and $34872, %rdi lea addresses_WT_ht+0xbdb6, %rsi lea addresses_normal_ht+0xf7f6, %rdi nop add %r10, %r10 mov $67, %rcx rep movsl nop nop nop inc %rax lea addresses_WC_ht+0x48b6, %rbp nop nop nop sub $18323, %r15 mov $0x6162636465666768, %r10 movq %r10, (%rbp) nop nop nop inc %rax lea addresses_A_ht+0x1bab6, %rsi lea addresses_WT_ht+0x8636, %rdi clflush (%rsi) sub $31372, %rdx mov $87, %rcx rep movsq nop add %r10, %r10 lea addresses_normal_ht+0x48b6, %rsi lea addresses_A_ht+0x109b6, %rdi nop nop sub $19242, %rbp mov $26, %rcx rep movsq nop nop add $11049, %rcx lea addresses_WC_ht+0x90b6, %rdi nop nop dec %rcx movb (%rdi), %al nop nop nop nop nop sub %r15, %r15 lea addresses_normal_ht+0x8398, %rcx nop nop nop nop add %r10, %r10 mov $0x6162636465666768, %rax movq %rax, (%rcx) nop sub $34202, %r15 lea addresses_normal_ht+0xdfb4, %rbp nop nop nop nop sub %r10, %r10 vmovups (%rbp), %ymm0 vextracti128 $0, %ymm0, %xmm0 vpextrq $1, %xmm0, %rax nop nop sub %rax, %rax lea addresses_UC_ht+0x140b6, %rbp nop dec %rsi mov (%rbp), %rdx nop nop nop nop dec %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %rax pop %r15 pop %r10 ret .global s_faulty_load s_faulty_load: push %r14 push %rax push %rbp push %rbx push %rcx push %rdi push %rsi // Store lea addresses_WC+0x17a13, %rbp nop nop nop cmp $55193, %rbx movl $0x51525354, (%rbp) nop xor %rdi, %rdi // Store lea addresses_A+0x15556, %rdi nop nop add %rax, %rax movl $0x51525354, (%rdi) nop nop xor $46632, %rcx // Store mov $0xef6, %rdi xor %rbp, %rbp mov $0x5152535455565758, %rax movq %rax, %xmm3 movups %xmm3, (%rdi) nop nop dec %rbx // Store lea addresses_WC+0x7db6, %r14 sub %rsi, %rsi movl $0x51525354, (%r14) nop nop nop and $2361, %rcx // Store lea addresses_US+0x134b6, %rdi nop cmp %r14, %r14 mov $0x5152535455565758, %rcx movq %rcx, %xmm4 vmovups %ymm4, (%rdi) inc %rbx // Store mov $0x2763480000000956, %rdi nop nop nop add $15830, %rbp mov $0x5152535455565758, %rcx movq %rcx, %xmm2 movups %xmm2, (%rdi) nop nop nop nop sub $64690, %rbx // Store lea addresses_normal+0xf7d6, %rbp nop nop add $22883, %r14 movb $0x51, (%rbp) sub %rsi, %rsi // Load lea addresses_RW+0x18b6, %r14 sub %rdi, %rdi mov (%r14), %rbp nop nop nop sub %rcx, %rcx // Store mov $0x13a, %rax nop nop nop inc %rbx movb $0x51, (%rax) dec %rdi // Faulty Load lea addresses_WT+0x1c8b6, %rax and %rbp, %rbp mov (%rax), %cx lea oracles, %rsi and $0xff, %rcx shlq $12, %rcx mov (%rsi,%rcx,1), %rcx pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r14 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 8, 'type': 'addresses_WT', 'congruent': 0}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_WC', 'congruent': 0}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A', 'congruent': 2}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_P', 'congruent': 6}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_WC', 'congruent': 5}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_US', 'congruent': 9}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_NC', 'congruent': 3}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_normal', 'congruent': 5}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_RW', 'congruent': 11}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_P', 'congruent': 0}, 'OP': 'STOR'} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WT', 'congruent': 0}} <gen_prepare_buffer> {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_D_ht', 'congruent': 8}, 'OP': 'STOR'} {'dst': {'same': True, 'congruent': 6, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_WT_ht'}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WC_ht', 'congruent': 11}, 'OP': 'STOR'} {'dst': {'same': True, 'congruent': 7, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 8, 'type': 'addresses_A_ht'}} {'dst': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_normal_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_WC_ht', 'congruent': 11}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal_ht', 'congruent': 1}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal_ht', 'congruent': 1}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_UC_ht', 'congruent': 11}} {'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 */
programs/oeis/238/A238410.asm
karttu/loda
1
246902
; A238410: a(n) = floor((3(n-1)^2 + 1)/2). ; 0,2,6,14,24,38,54,74,96,122,150,182,216,254,294,338,384,434,486,542,600,662,726,794,864,938,1014,1094,1176,1262,1350,1442,1536,1634,1734,1838,1944,2054,2166,2282,2400,2522,2646,2774,2904,3038,3174,3314,3456,3602,3750,3902,4056,4214,4374,4538,4704,4874,5046,5222,5400,5582,5766,5954,6144,6338,6534,6734,6936,7142,7350,7562,7776,7994,8214,8438,8664,8894,9126,9362,9600,9842,10086,10334,10584,10838,11094,11354,11616,11882,12150,12422,12696,12974,13254,13538,13824,14114,14406,14702,15000,15302,15606,15914,16224,16538,16854,17174,17496,17822,18150,18482,18816,19154,19494,19838,20184,20534,20886,21242,21600,21962,22326,22694,23064,23438,23814,24194,24576,24962,25350,25742,26136,26534,26934,27338,27744,28154,28566,28982,29400,29822,30246,30674,31104,31538,31974,32414,32856,33302,33750,34202,34656,35114,35574,36038,36504,36974,37446,37922,38400,38882,39366,39854,40344,40838,41334,41834,42336,42842,43350,43862,44376,44894,45414,45938,46464,46994,47526,48062,48600,49142,49686,50234,50784,51338,51894,52454,53016,53582,54150,54722,55296,55874,56454,57038,57624,58214,58806,59402,60000,60602,61206,61814,62424,63038,63654,64274,64896,65522,66150,66782,67416,68054,68694,69338,69984,70634,71286,71942,72600,73262,73926,74594,75264,75938,76614,77294,77976,78662,79350,80042,80736,81434,82134,82838,83544,84254,84966,85682,86400,87122,87846,88574,89304,90038,90774,91514,92256,93002 pow $0,2 mul $0,3 add $0,1 div $0,2 mov $1,$0
Scaliger.ads
Louis-Aime/Milesian_calendar_Ada
0
13110
-- Package Scaliger -- This package defines extended duration and time types using the "julian day" -- as defined by <NAME> in 1583. -- The duration is expressed as a number of 1/8 seconds. -- Two numeric conversion functions are definied -- exchanging a day expressed as a decimal figure from and to -- an integer number of 1/8 seconds. -- ---------------------------------------------------------------------------- -- Copyright Miletus 2015 -- Permission is hereby granted, free of charge, to any person obtaining -- a copy of this software and associated documentation files (the -- "Software"), to deal in the Software without restriction, including -- without limitation the rights to use, copy, modify, merge, publish, -- distribute, sublicense, and/or sell copies of the Software, and to -- permit persons to whom the Software is furnished to do so, subject to -- the following conditions: -- 1. The above copyright notice and this permission notice shall be included -- in all copies or substantial portions of the Software. -- 2. Changes with respect to any former version shall be documented. -- -- The software is provided "as is", without warranty of any kind, -- express of implied, including but not limited to the warranties of -- merchantability, fitness for a particular purpose and noninfringement. -- In no event shall the authors of copyright holders be liable for any -- claim, damages or other liability, whether in an action of contract, -- tort or otherwise, arising from, out of or in connection with the software -- or the use or other dealings in the software. -- Inquiries: www.calendriermilesien.org ------------------------------------------------------------------------------- -- In a draft version, two type definitions of -- the predefined Calendar package were used. -- this reference has been eliminated for language portability. package Scaliger is Time_Error : exception; -- same as in Calendar Day_unit : constant := 86_400.0; -- one day in real type seconds Horizon : Constant := 5_405_700 ; -- around 148 centuries in days, which covers years -4800 to 9999 subtype Historical_year_number is integer range -4800 .. 9999; -- Year of the "Common era", equivalent to Anno Domini when positive, -- with a zero year and using negative values for years Before Christus. -- The lower limit -4800 enables computations using the gregorian cycles -- of 400 years. subtype Month_Number is Integer range 1 .. 12; -- same as in Ada.Calendar subtype Day_Number is Integer range 1 .. 31; -- same as in Ada.Calendar subtype Julian_Day_Duration is Integer range -Horizon .. Horizon; subtype Julian_Day is Julian_Day_Duration range 0..Horizon; -- An integer Julian day represents any day on or after -- 1 January -4712 (Julian calendar). Duration_Horizon : Constant := Horizon * Day_unit; -- 148 centuries in seconds type Historical_Duration is delta 2#0.001# range -Duration_Horizon .. Duration_Horizon; -- Duration is stored and computed as an integer number of 1/8 seconds. -- This storage method is adequate because we express durations as -- a number of seconds (and minutes, hours and days). -- 1/8 second accuracy is suitable for computations involving the mean moon -- over a long period of time. -- Conversion method with durations expressed in fractional day is provided. subtype Historical_Time is Historical_Duration range 0.0 .. Duration_Horizon; -- Time counted from 1 Januray -4712 (Julian proleptic calendar) at 12:00 -- As Historical duration, this is stored in seconds. subtype H24_Historical_Duration is Historical_Duration range 0.0 .. 86_400.0; -- As in Ada.calendar, duration of one full day maximum. subtype Day_Historical_Duration is Historical_Duration range -43_200.0 .. 43_200.0; -- The Greenwich hour of the day expressed with respect to 12:00 noon. type Fractional_day_duration is delta 1.0E-6 range - Horizon * 1.0 .. Horizon * 1.0; -- This type enables conversion to and from Historical_Duration -- with the an accuracy of around 1/10 s. -- Do not use for computations, only for display. type General_date is record day : Day_Number; month : Month_Number; year : Historical_year_number; end record; -- a record for expression of most calendars. -- zodiacal calendar does not fit (certain month have more than 31 days). function Fractionnal_day_of (My_duration : Historical_Duration) return Fractional_day_duration; -- convert an historical duration (or time), in seconds, -- into a fractional day. function Convert_from_julian_day (Display : Fractional_day_duration) return Historical_Duration; -- used to convert manual entries in fractional day -- into usable time or duration expression. End Scaliger;
sendMessage.applescript
liam-murphy14/EncryptionFun
0
4329
on run {targetBuddyPhone, targetMessage} tell application "Messages" set targetService to 1st service whose service type = iMessage set targetBuddy to buddy targetBuddyPhone of targetService send targetMessage to targetBuddy end tell end run
base/win32/fusion/dll/whistler/i386/setunhandledexceptionfilterasm.asm
npocmaka/Windows-Server-2003
17
103379
<filename>base/win32/fusion/dll/whistler/i386/setunhandledexceptionfilterasm.asm ; ; This is in assembly because assembly lets you generate arbitrarily named symbols. ; .386p .model flat extern _SetUnhandledExceptionFilter@4:near public __imp__SetUnhandledExceptionFilter@4 CONST segment __imp__SetUnhandledExceptionFilter@4 dd _SetUnhandledExceptionFilter@4 CONST ends end
other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/risc.lzh/risc/join/Result-p.asm
prismotizm/gigaleak
0
1026
Name: Result-p.asm Type: file Size: 70355 Last-Modified: '1992-07-30T05:00:34Z' SHA-1: 1642A09839B5D788E4A4D9C33C433F41E5841AC1 Description: null
llvm-gcc-4.2-2.9/gcc/ada/prj.adb
vidkidz/crossbridge
1
19064
<reponame>vidkidz/crossbridge ------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- P R J -- -- -- -- B o d y -- -- -- -- Copyright (C) 2001-2006, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Ada.Characters.Handling; use Ada.Characters.Handling; with Namet; use Namet; with Output; use Output; with Osint; use Osint; with Prj.Attr; with Prj.Env; with Prj.Err; use Prj.Err; with Snames; use Snames; with Uintp; use Uintp; with GNAT.Case_Util; use GNAT.Case_Util; package body Prj is Initial_Buffer_Size : constant := 100; -- Initial size for extensible buffer used in Add_To_Buffer The_Empty_String : Name_Id; Name_C_Plus_Plus : Name_Id; Default_Ada_Spec_Suffix_Id : Name_Id; Default_Ada_Body_Suffix_Id : Name_Id; Slash_Id : Name_Id; -- Initialized in Prj.Initialized, then never modified subtype Known_Casing is Casing_Type range All_Upper_Case .. Mixed_Case; The_Casing_Images : constant array (Known_Casing) of String_Access := (All_Lower_Case => new String'("lowercase"), All_Upper_Case => new String'("UPPERCASE"), Mixed_Case => new String'("MixedCase")); Initialized : Boolean := False; Standard_Dot_Replacement : constant Name_Id := First_Name_Id + Character'Pos ('-'); Std_Naming_Data : Naming_Data := (Dot_Replacement => Standard_Dot_Replacement, Dot_Repl_Loc => No_Location, Casing => All_Lower_Case, Spec_Suffix => No_Array_Element, Ada_Spec_Suffix => No_Name, Spec_Suffix_Loc => No_Location, Impl_Suffixes => No_Impl_Suffixes, Supp_Suffixes => No_Supp_Language_Index, Body_Suffix => No_Array_Element, Ada_Body_Suffix => No_Name, Body_Suffix_Loc => No_Location, Separate_Suffix => No_Name, Sep_Suffix_Loc => No_Location, Specs => No_Array_Element, Bodies => No_Array_Element, Specification_Exceptions => No_Array_Element, Implementation_Exceptions => No_Array_Element); Project_Empty : Project_Data := (Externally_Built => False, Languages => No_Languages, Supp_Languages => No_Supp_Language_Index, First_Referred_By => No_Project, Name => No_Name, Display_Name => No_Name, Path_Name => No_Name, Display_Path_Name => No_Name, Virtual => False, Location => No_Location, Mains => Nil_String, Directory => No_Name, Display_Directory => No_Name, Dir_Path => null, Library => False, Library_Dir => No_Name, Display_Library_Dir => No_Name, Library_Src_Dir => No_Name, Display_Library_Src_Dir => No_Name, Library_ALI_Dir => No_Name, Display_Library_ALI_Dir => No_Name, Library_Name => No_Name, Library_Kind => Static, Lib_Internal_Name => No_Name, Standalone_Library => False, Lib_Interface_ALIs => Nil_String, Lib_Auto_Init => False, Symbol_Data => No_Symbols, Ada_Sources_Present => True, Other_Sources_Present => True, Sources => Nil_String, First_Other_Source => No_Other_Source, Last_Other_Source => No_Other_Source, Imported_Directories_Switches => null, Include_Path => null, Include_Data_Set => False, Source_Dirs => Nil_String, Known_Order_Of_Source_Dirs => True, Object_Directory => No_Name, Display_Object_Dir => No_Name, Library_TS => Empty_Time_Stamp, Exec_Directory => No_Name, Display_Exec_Dir => No_Name, Extends => No_Project, Extended_By => No_Project, Naming => Std_Naming_Data, First_Language_Processing => Default_First_Language_Processing_Data, Supp_Language_Processing => No_Supp_Language_Index, Default_Linker => No_Name, Default_Linker_Path => No_Name, Decl => No_Declarations, Imported_Projects => Empty_Project_List, All_Imported_Projects => Empty_Project_List, Ada_Include_Path => null, Ada_Objects_Path => null, Include_Path_File => No_Name, Objects_Path_File_With_Libs => No_Name, Objects_Path_File_Without_Libs => No_Name, Config_File_Name => No_Name, Config_File_Temp => False, Config_Checked => False, Language_Independent_Checked => False, Checked => False, Seen => False, Need_To_Build_Lib => False, Depth => 0, Unkept_Comments => False); ----------------------- -- Add_Language_Name -- ----------------------- procedure Add_Language_Name (Name : Name_Id) is begin Last_Language_Index := Last_Language_Index + 1; Language_Indexes.Set (Name, Last_Language_Index); Language_Names.Increment_Last; Language_Names.Table (Last_Language_Index) := Name; end Add_Language_Name; ------------------- -- Add_To_Buffer -- ------------------- procedure Add_To_Buffer (S : String; To : in out String_Access; Last : in out Natural) is begin if To = null then To := new String (1 .. Initial_Buffer_Size); Last := 0; end if; -- If Buffer is too small, double its size while Last + S'Length > To'Last loop declare New_Buffer : constant String_Access := new String (1 .. 2 * Last); begin New_Buffer (1 .. Last) := To (1 .. Last); Free (To); To := New_Buffer; end; end loop; To (Last + 1 .. Last + S'Length) := S; Last := Last + S'Length; end Add_To_Buffer; ----------------------------- -- Default_Ada_Body_Suffix -- ----------------------------- function Default_Ada_Body_Suffix return Name_Id is begin return Default_Ada_Body_Suffix_Id; end Default_Ada_Body_Suffix; ----------------------------- -- Default_Ada_Spec_Suffix -- ----------------------------- function Default_Ada_Spec_Suffix return Name_Id is begin return Default_Ada_Spec_Suffix_Id; end Default_Ada_Spec_Suffix; --------------------------- -- Display_Language_Name -- --------------------------- procedure Display_Language_Name (Language : Language_Index) is begin Get_Name_String (Language_Names.Table (Language)); To_Upper (Name_Buffer (1 .. 1)); Write_Str (Name_Buffer (1 .. Name_Len)); end Display_Language_Name; ------------------- -- Empty_Project -- ------------------- function Empty_Project (Tree : Project_Tree_Ref) return Project_Data is Value : Project_Data; begin Prj.Initialize (Tree => No_Project_Tree); Value := Project_Empty; Value.Naming := Tree.Private_Part.Default_Naming; return Value; end Empty_Project; ------------------ -- Empty_String -- ------------------ function Empty_String return Name_Id is begin return The_Empty_String; end Empty_String; ------------ -- Expect -- ------------ procedure Expect (The_Token : Token_Type; Token_Image : String) is begin if Token /= The_Token then Error_Msg (Token_Image & " expected", Token_Ptr); end if; end Expect; -------------------------------- -- For_Every_Project_Imported -- -------------------------------- procedure For_Every_Project_Imported (By : Project_Id; In_Tree : Project_Tree_Ref; With_State : in out State) is procedure Recursive_Check (Project : Project_Id); -- Check if a project has already been seen. If not seen, mark it as -- Seen, Call Action, and check all its imported projects. --------------------- -- Recursive_Check -- --------------------- procedure Recursive_Check (Project : Project_Id) is List : Project_List; begin if not In_Tree.Projects.Table (Project).Seen then In_Tree.Projects.Table (Project).Seen := True; Action (Project, With_State); List := In_Tree.Projects.Table (Project).Imported_Projects; while List /= Empty_Project_List loop Recursive_Check (In_Tree.Project_Lists.Table (List).Project); List := In_Tree.Project_Lists.Table (List).Next; end loop; end if; end Recursive_Check; -- Start of processing for For_Every_Project_Imported begin for Project in Project_Table.First .. Project_Table.Last (In_Tree.Projects) loop In_Tree.Projects.Table (Project).Seen := False; end loop; Recursive_Check (Project => By); end For_Every_Project_Imported; ---------- -- Hash -- ---------- function Hash (Name : Name_Id) return Header_Num is begin return Hash (Get_Name_String (Name)); end Hash; ----------- -- Image -- ----------- function Image (Casing : Casing_Type) return String is begin return The_Casing_Images (Casing).all; end Image; ---------------- -- Initialize -- ---------------- procedure Initialize (Tree : Project_Tree_Ref) is begin if not Initialized then Initialized := True; Uintp.Initialize; Name_Len := 0; The_Empty_String := Name_Find; Empty_Name := The_Empty_String; Name_Len := 4; Name_Buffer (1 .. 4) := ".ads"; Default_Ada_Spec_Suffix_Id := Name_Find; Name_Len := 4; Name_Buffer (1 .. 4) := ".adb"; Default_Ada_Body_Suffix_Id := Name_Find; Name_Len := 1; Name_Buffer (1) := '/'; Slash_Id := Name_Find; Name_Len := 3; Name_Buffer (1 .. 3) := "c++"; Name_C_Plus_Plus := Name_Find; Std_Naming_Data.Ada_Spec_Suffix := Default_Ada_Spec_Suffix; Std_Naming_Data.Ada_Body_Suffix := Default_Ada_Body_Suffix; Std_Naming_Data.Separate_Suffix := Default_Ada_Body_Suffix; Project_Empty.Naming := Std_Naming_Data; Prj.Env.Initialize; Prj.Attr.Initialize; Set_Name_Table_Byte (Name_Project, Token_Type'Pos (Tok_Project)); Set_Name_Table_Byte (Name_Extends, Token_Type'Pos (Tok_Extends)); Set_Name_Table_Byte (Name_External, Token_Type'Pos (Tok_External)); Language_Indexes.Reset; Last_Language_Index := No_Language_Index; Language_Names.Init; Add_Language_Name (Name_Ada); Add_Language_Name (Name_C); Add_Language_Name (Name_C_Plus_Plus); end if; if Tree /= No_Project_Tree then Reset (Tree); end if; end Initialize; ---------------- -- Is_Present -- ---------------- function Is_Present (Language : Language_Index; In_Project : Project_Data; In_Tree : Project_Tree_Ref) return Boolean is begin case Language is when No_Language_Index => return False; when First_Language_Indexes => return In_Project.Languages (Language); when others => declare Supp : Supp_Language; Supp_Index : Supp_Language_Index := In_Project.Supp_Languages; begin while Supp_Index /= No_Supp_Language_Index loop Supp := In_Tree.Present_Languages.Table (Supp_Index); if Supp.Index = Language then return Supp.Present; end if; Supp_Index := Supp.Next; end loop; return False; end; end case; end Is_Present; --------------------------------- -- Language_Processing_Data_Of -- --------------------------------- function Language_Processing_Data_Of (Language : Language_Index; In_Project : Project_Data; In_Tree : Project_Tree_Ref) return Language_Processing_Data is begin case Language is when No_Language_Index => return Default_Language_Processing_Data; when First_Language_Indexes => return In_Project.First_Language_Processing (Language); when others => declare Supp : Supp_Language_Data; Supp_Index : Supp_Language_Index := In_Project.Supp_Language_Processing; begin while Supp_Index /= No_Supp_Language_Index loop Supp := In_Tree.Supp_Languages.Table (Supp_Index); if Supp.Index = Language then return Supp.Data; end if; Supp_Index := Supp.Next; end loop; return Default_Language_Processing_Data; end; end case; end Language_Processing_Data_Of; ------------------------------------ -- Register_Default_Naming_Scheme -- ------------------------------------ procedure Register_Default_Naming_Scheme (Language : Name_Id; Default_Spec_Suffix : Name_Id; Default_Body_Suffix : Name_Id; In_Tree : Project_Tree_Ref) is Lang : Name_Id; Suffix : Array_Element_Id; Found : Boolean := False; Element : Array_Element; begin -- Get the language name in small letters Get_Name_String (Language); Name_Buffer (1 .. Name_Len) := To_Lower (Name_Buffer (1 .. Name_Len)); Lang := Name_Find; Suffix := In_Tree.Private_Part.Default_Naming.Spec_Suffix; Found := False; -- Look for an element of the spec sufix array indexed by the language -- name. If one is found, put the default value. while Suffix /= No_Array_Element and then not Found loop Element := In_Tree.Array_Elements.Table (Suffix); if Element.Index = Lang then Found := True; Element.Value.Value := Default_Spec_Suffix; In_Tree.Array_Elements.Table (Suffix) := Element; else Suffix := Element.Next; end if; end loop; -- If none can be found, create a new one if not Found then Element := (Index => Lang, Src_Index => 0, Index_Case_Sensitive => False, Value => (Project => No_Project, Kind => Single, Location => No_Location, Default => False, Value => Default_Spec_Suffix, Index => 0), Next => In_Tree.Private_Part.Default_Naming.Spec_Suffix); Array_Element_Table.Increment_Last (In_Tree.Array_Elements); In_Tree.Array_Elements.Table (Array_Element_Table.Last (In_Tree.Array_Elements)) := Element; In_Tree.Private_Part.Default_Naming.Spec_Suffix := Array_Element_Table.Last (In_Tree.Array_Elements); end if; Suffix := In_Tree.Private_Part.Default_Naming.Body_Suffix; Found := False; -- Look for an element of the body sufix array indexed by the language -- name. If one is found, put the default value. while Suffix /= No_Array_Element and then not Found loop Element := In_Tree.Array_Elements.Table (Suffix); if Element.Index = Lang then Found := True; Element.Value.Value := Default_Body_Suffix; In_Tree.Array_Elements.Table (Suffix) := Element; else Suffix := Element.Next; end if; end loop; -- If none can be found, create a new one if not Found then Element := (Index => Lang, Src_Index => 0, Index_Case_Sensitive => False, Value => (Project => No_Project, Kind => Single, Location => No_Location, Default => False, Value => Default_Body_Suffix, Index => 0), Next => In_Tree.Private_Part.Default_Naming.Body_Suffix); Array_Element_Table.Increment_Last (In_Tree.Array_Elements); In_Tree.Array_Elements.Table (Array_Element_Table.Last (In_Tree.Array_Elements)) := Element; In_Tree.Private_Part.Default_Naming.Body_Suffix := Array_Element_Table.Last (In_Tree.Array_Elements); end if; end Register_Default_Naming_Scheme; ----------- -- Reset -- ----------- procedure Reset (Tree : Project_Tree_Ref) is begin Prj.Env.Initialize; Present_Language_Table.Init (Tree.Present_Languages); Supp_Suffix_Table.Init (Tree.Supp_Suffixes); Name_List_Table.Init (Tree.Name_Lists); Supp_Language_Table.Init (Tree.Supp_Languages); Other_Source_Table.Init (Tree.Other_Sources); String_Element_Table.Init (Tree.String_Elements); Variable_Element_Table.Init (Tree.Variable_Elements); Array_Element_Table.Init (Tree.Array_Elements); Array_Table.Init (Tree.Arrays); Package_Table.Init (Tree.Packages); Project_List_Table.Init (Tree.Project_Lists); Project_Table.Init (Tree.Projects); Unit_Table.Init (Tree.Units); Units_Htable.Reset (Tree.Units_HT); Files_Htable.Reset (Tree.Files_HT); Naming_Table.Init (Tree.Private_Part.Namings); Naming_Table.Increment_Last (Tree.Private_Part.Namings); Tree.Private_Part.Namings.Table (Naming_Table.Last (Tree.Private_Part.Namings)) := Std_Naming_Data; Path_File_Table.Init (Tree.Private_Part.Path_Files); Source_Path_Table.Init (Tree.Private_Part.Source_Paths); Object_Path_Table.Init (Tree.Private_Part.Object_Paths); Tree.Private_Part.Default_Naming := Std_Naming_Data; Register_Default_Naming_Scheme (Language => Name_Ada, Default_Spec_Suffix => Default_Ada_Spec_Suffix, Default_Body_Suffix => Default_Ada_Body_Suffix, In_Tree => Tree); end Reset; ------------------------ -- Same_Naming_Scheme -- ------------------------ function Same_Naming_Scheme (Left, Right : Naming_Data) return Boolean is begin return Left.Dot_Replacement = Right.Dot_Replacement and then Left.Casing = Right.Casing and then Left.Ada_Spec_Suffix = Right.Ada_Spec_Suffix and then Left.Ada_Body_Suffix = Right.Ada_Body_Suffix and then Left.Separate_Suffix = Right.Separate_Suffix; end Same_Naming_Scheme; --------- -- Set -- --------- procedure Set (Language : Language_Index; Present : Boolean; In_Project : in out Project_Data; In_Tree : Project_Tree_Ref) is begin case Language is when No_Language_Index => null; when First_Language_Indexes => In_Project.Languages (Language) := Present; when others => declare Supp : Supp_Language; Supp_Index : Supp_Language_Index := In_Project.Supp_Languages; begin while Supp_Index /= No_Supp_Language_Index loop Supp := In_Tree.Present_Languages.Table (Supp_Index); if Supp.Index = Language then In_Tree.Present_Languages.Table (Supp_Index).Present := Present; return; end if; Supp_Index := Supp.Next; end loop; Supp := (Index => Language, Present => Present, Next => In_Project.Supp_Languages); Present_Language_Table.Increment_Last (In_Tree.Present_Languages); Supp_Index := Present_Language_Table.Last (In_Tree.Present_Languages); In_Tree.Present_Languages.Table (Supp_Index) := Supp; In_Project.Supp_Languages := Supp_Index; end; end case; end Set; procedure Set (Language_Processing : Language_Processing_Data; For_Language : Language_Index; In_Project : in out Project_Data; In_Tree : Project_Tree_Ref) is begin case For_Language is when No_Language_Index => null; when First_Language_Indexes => In_Project.First_Language_Processing (For_Language) := Language_Processing; when others => declare Supp : Supp_Language_Data; Supp_Index : Supp_Language_Index := In_Project.Supp_Language_Processing; begin while Supp_Index /= No_Supp_Language_Index loop Supp := In_Tree.Supp_Languages.Table (Supp_Index); if Supp.Index = For_Language then In_Tree.Supp_Languages.Table (Supp_Index).Data := Language_Processing; return; end if; Supp_Index := Supp.Next; end loop; Supp := (Index => For_Language, Data => Language_Processing, Next => In_Project.Supp_Language_Processing); Supp_Language_Table.Increment_Last (In_Tree.Supp_Languages); Supp_Index := Supp_Language_Table.Last (In_Tree.Supp_Languages); In_Tree.Supp_Languages.Table (Supp_Index) := Supp; In_Project.Supp_Language_Processing := Supp_Index; end; end case; end Set; procedure Set (Suffix : Name_Id; For_Language : Language_Index; In_Project : in out Project_Data; In_Tree : Project_Tree_Ref) is begin case For_Language is when No_Language_Index => null; when First_Language_Indexes => In_Project.Naming.Impl_Suffixes (For_Language) := Suffix; when others => declare Supp : Supp_Suffix; Supp_Index : Supp_Language_Index := In_Project.Naming.Supp_Suffixes; begin while Supp_Index /= No_Supp_Language_Index loop Supp := In_Tree.Supp_Suffixes.Table (Supp_Index); if Supp.Index = For_Language then In_Tree.Supp_Suffixes.Table (Supp_Index).Suffix := Suffix; return; end if; Supp_Index := Supp.Next; end loop; Supp := (Index => For_Language, Suffix => Suffix, Next => In_Project.Naming.Supp_Suffixes); Supp_Suffix_Table.Increment_Last (In_Tree.Supp_Suffixes); Supp_Index := Supp_Suffix_Table.Last (In_Tree.Supp_Suffixes); In_Tree.Supp_Suffixes.Table (Supp_Index) := Supp; In_Project.Naming.Supp_Suffixes := Supp_Index; end; end case; end Set; ----------- -- Slash -- ----------- function Slash return Name_Id is begin return Slash_Id; end Slash; -------------------------- -- Standard_Naming_Data -- -------------------------- function Standard_Naming_Data (Tree : Project_Tree_Ref := No_Project_Tree) return Naming_Data is begin if Tree = No_Project_Tree then Prj.Initialize (Tree => No_Project_Tree); return Std_Naming_Data; else return Tree.Private_Part.Default_Naming; end if; end Standard_Naming_Data; --------------- -- Suffix_Of -- --------------- function Suffix_Of (Language : Language_Index; In_Project : Project_Data; In_Tree : Project_Tree_Ref) return Name_Id is begin case Language is when No_Language_Index => return No_Name; when First_Language_Indexes => return In_Project.Naming.Impl_Suffixes (Language); when others => declare Supp : Supp_Suffix; Supp_Index : Supp_Language_Index := In_Project.Naming.Supp_Suffixes; begin while Supp_Index /= No_Supp_Language_Index loop Supp := In_Tree.Supp_Suffixes.Table (Supp_Index); if Supp.Index = Language then return Supp.Suffix; end if; Supp_Index := Supp.Next; end loop; return No_Name; end; end case; end Suffix_Of; ----------- -- Value -- ----------- function Value (Image : String) return Casing_Type is begin for Casing in The_Casing_Images'Range loop if To_Lower (Image) = To_Lower (The_Casing_Images (Casing).all) then return Casing; end if; end loop; raise Constraint_Error; end Value; begin -- Make sure that the standard project file extension is compatible -- with canonical case file naming. Canonical_Case_File_Name (Project_File_Extension); end Prj;
eng_mecat_bkp/vhdl_microcont/uC/inst ass/prog1.asm
Mutanne/hiworld
0
93352
org 0 mov A,#0h mov A,#0ffh mov B,#0fh mov R0,#0f0h mov A,#15 mov A,#10101010b mov A,#HIGH(0fh) mov B,#LOW(0fh) mov A,#HIGH(65535) mov B,#low(65535) ;mov A,#(255 - 250) ;mov A,#high(255-240) ;mov B,#low(255-240) mov A,#'A' mov B,#'B' end
3-mid/impact/source/3d/collision/dispatch/impact-d3-dispatcher-collision.ads
charlie5/lace
20
12705
with impact.d3.Dispatcher, impact.d3.Object, impact.d3.Manifold, impact.d3.collision.Algorithm, impact.d3.collision.Proxy, impact.d3.collision.create_Func, impact.d3.collision.manifold_Result, impact.d3.collision.overlapped_pair_Callback.cached, impact.d3.collision.Configuration; with System; with impact.d3.Collision.create_Func; package impact.d3.Dispatcher.collision -- -- 'impact.d3.Dispatcher.collision' supports algorithms that handle ConvexConvex and ConvexConcave collision pairs. -- Time of Impact, Closest Points and Penetration Depth. -- is type Item is new impact.d3.Dispatcher.item with private; USE_DISPATCH_REGISTRY_ARRAY : constant Boolean := True; --- DispatcherFlags -- CD_STATIC_STATIC_REPORTED : constant Flags := 1; CD_USE_RELATIVE_CONTACT_BREAKING_THRESHOLD : constant Flags := 2; CD_DISABLE_CONTACTPOOL_DYNAMIC_ALLOCATION : constant Flags := 4; -- User can override this nearcallback for collision filtering and more finegrained control over collision detection. -- type btNearCallback is access procedure (collisionPair : access impact.d3.collision.Proxy.btBroadphasePair; dispatcher : access impact.d3.Dispatcher.collision.Item'Class; dispatchInfo : out impact.d3.Dispatcher.DispatcherInfo); -- type impact.d3.Manifold_view is access all impact.d3.Manifold.item'Class; -- type impact.d3.collision.Algorithm_view is access all impact.d3.collision.Algorithm.item'Class; function to_Dispatcher (collisionConfiguration : access impact.d3.collision.Configuration.Item'Class) return Item; overriding procedure destruct (Self : in out Item); overriding function findAlgorithm (Self : access Item; body0, body1 : access impact.d3.Object.item'Class; sharedManifold : access impact.d3.Manifold.Item'Class := null) return Algorithm_view; overriding function getNewManifold (Self : access Item; bod0, bod1 : access Any'Class ) return access impact.d3.Manifold.Item'Class; overriding procedure releaseManifold (Self : in out Item; manifold : access impact.d3.Manifold.Item'Class); overriding procedure clearManifold (Self : in out Item; manifold : access impact.d3.Manifold.Item'Class); function getDispatcherFlags (Self : in Item) return Flags; procedure setDispatcherFlags (Self : in out Item; To : in Flags); -- 'registerCollisionCreateFunc' allows registration of custom/alternative collision create functions. -- procedure registerCollisionCreateFunc (Self : in out Item; proxyType0, proxyType1 : in impact.d3.collision.Proxy.BroadphaseNativeTypes; createFunc : access impact.d3.collision.create_Func.item); overriding function getNumManifolds (Self : in Item) return Natural; -- function getInternalManifoldPointer (Self : access Item) return access impact.d3.Manifold_view; overriding function getInternalManifoldPointer (Self : access Item) return access impact.d3.Manifold.Vector; -- function getManifoldByIndexInternal (Self : access Item; index : in Integer) return impact.d3.Manifold_view; overriding function getManifoldByIndexInternal (Self : in Item; index : in Integer) return impact.d3.Manifold.view; -- function findAlgorithm (Self : access Item; body0, body1 : access impact.d3.Object.impact.d3.Object'Class) return access impact.d3.collision.Algorithm.item; overriding function needsCollision (Self : access Item; body0, body1 : access impact.d3.Object.item'Class) return Boolean; overriding function needsResponse (Self : access Item; body0, body1 : access impact.d3.Object.item'Class) return Boolean; overriding procedure dispatchAllCollisionPairs (Self : in out Item; pairCache : access impact.d3.collision.overlapped_pair_Callback.cached.item'Class; dispatchInfo : access impact.d3.Dispatcher.DispatcherInfo; dispatcher : access impact.d3.Dispatcher.item'Class); procedure setNearCallback (Self : in out Item; nearCallback : in btNearCallback); function getNearCallback (Self : in Item) return btNearCallback; -- By default, Bullet will use this near callback. -- procedure defaultNearCallback (collisionPair : access impact.d3.collision.Proxy.btBroadphasePair; dispatcher : access impact.d3.Dispatcher.collision.Item'Class; dispatchInfo : out impact.d3.Dispatcher.DispatcherInfo); function allocateCollisionAlgorithm (Self : access Item; size : in Integer) return system.Address; overriding procedure freeCollisionAlgorithm (Self : in out Item; ptr : access impact.d3.collision.Algorithm.item'Class); function getCollisionConfiguration (Self : access Item) return access impact.d3.collision.Configuration.Item'Class; procedure setCollisionConfiguration (Self : in out Item; config : access impact.d3.collision.Configuration.item'Class); private type double_dispatch_Table is array (impact.d3.collision.Proxy.BroadphaseNativeTypes, impact.d3.collision.Proxy.BroadphaseNativeTypes) of access impact.d3.Collision.Create_Func.item'Class; -- package impact.d3.Manifold_Vectors is new ada.Containers.Vectors (Positive, impact.d3.Manifold_view); -- subtype impact.d3.Manifold_Vector is impact.d3.Manifold_Vectors.Vector; type Item is new impact.d3.Dispatcher.item with record m_dispatcherFlags : Flags; m_manifoldsPtr : aliased impact.d3.Manifold.Vector; m_defaultManifoldResult : impact.d3.collision.manifold_Result.item; m_nearCallback : btNearCallback; m_doubleDispatch : double_dispatch_Table; m_collisionConfiguration : access impact.d3.collision.Configuration.item'Class; -- m_collisionAlgorithmPoolAllocator : access btPoolAllocator; -- m_persistentManifoldPoolAllocator : access btPoolAllocator; end record; end impact.d3.Dispatcher.collision;
Engine Hacks/Changing preparation BGM/c0p.asm
sme23/Christmas2
1
85038
@thumb push {lr, r4, r5, r6} mov r4, r1 mov r5, r2 mov r6, r3 ;マップ設定から取得 ; ldr r0, =$0202BCEC ;FE8J ldr r0, =$0202BCF0 ;FE8U ldrb r0, [r0, #14] ; ldr r1, =$08034520 ;FE8J ldr r1, =$08034618 ;FE8U mov lr, r1 @dcw $F800 add r0, #0x26 ;0x72->0x26に変更 ldrh r0, [r0] ;mov r0, #52 ; ldr r1, =$08002938 ;FE8J ldr r1, =$080029E8 ;FE8U mov lr, r1 mov r1, r4 mov r2, r5 mov r3, r6 @dcw $F800 pop {pc, r4, r5, r6}
src/types.ads
joffreyhuguet/curve25519-spark2014
4
16423
with Big_Integers; use Big_Integers; package Types with SPARK_Mode is -- Index types used in implementations type Extended_Index_Type is range - 1 .. 18; subtype Product_Index_Type is Extended_Index_Type range 0 .. 18; subtype Index_Type is Extended_Index_Type range 0 .. 9; -- Array types used in implementations type Integer_Curve25519 is array (Product_Index_Type range <>) of Long_Long_Integer with Dynamic_Predicate => Integer_Curve25519'First = 0; subtype Product_Integer is Integer_Curve25519 (Product_Index_Type); -- Integer_255 are arrays of 32 bits integers subtype Integer_255 is Integer_Curve25519 (Index_Type) with Dynamic_Predicate => (for all J of Integer_255 => J in -2**31 .. 2**31 - 1); type Conversion_Array_Type is array (Product_Index_Type) of Big_Integer with Ghost; -- Constants and predicates used in implementations Min_Add : constant Long_Long_Integer := -2**30 + 1 with Ghost; Max_Add : constant Long_Long_Integer := 2**30 - 1 with Ghost; Min_Multiply : constant Long_Long_Integer := - (2**27 - 1) with Ghost; Max_Multiply : constant Long_Long_Integer := 2**27 - 1 with Ghost; function All_In_Range (X, Y : Integer_255; Min, Max : Long_Long_Integer) return Boolean is (for all J in X'Range => X (J) in Min .. Max and then Y (J) in Min .. Max) with Ghost; end Types;
UefiCpuPkg/Library/SmmCpuFeaturesLib/X64/SmiException.asm
James992927108/uEFI_Edk2_Practice
1
168771
;------------------------------------------------------------------------------ ; ; Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR> ; This program and the accompanying materials ; are licensed and made available under the terms and conditions of the BSD License ; which accompanies this distribution. The full text of the license may be found at ; http://opensource.org/licenses/bsd-license.php. ; ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. ; ; Module Name: ; ; SmiException.asm ; ; Abstract: ; ; Exception handlers used in SM mode ; ;------------------------------------------------------------------------------- EXTERNDEF gcStmPsd:BYTE EXTERNDEF SmmStmExceptionHandler:PROC EXTERNDEF SmmStmSetup:PROC EXTERNDEF SmmStmTeardown:PROC EXTERNDEF gStmXdSupported:BYTE CODE_SEL EQU 38h DATA_SEL EQU 20h TR_SEL EQU 40h MSR_IA32_MISC_ENABLE EQU 1A0h MSR_EFER EQU 0c0000080h MSR_EFER_XD EQU 0800h .data ; ; This structure serves as a template for all processors. ; gcStmPsd LABEL BYTE DB 'TXTPSSIG' DW PSD_SIZE DW 1 ; Version DD 0 ; LocalApicId DB 0Fh ; Cr4Pse;Cr4Pae;Intel64Mode;ExecutionDisableOutsideSmrr DB 0 ; BIOS to STM DB 0 ; STM to BIOS DB 0 DW CODE_SEL DW DATA_SEL DW DATA_SEL DW DATA_SEL DW TR_SEL DW 0 DQ 0 ; SmmCr3 DQ _OnStmSetup DQ _OnStmTeardown DQ 0 ; SmmSmiHandlerRip - SMM guest entrypoint DQ 0 ; SmmSmiHandlerRsp DQ 0 DD 0 DD 80010100h ; RequiredStmSmmRevId DQ _OnException DQ 0 ; ExceptionStack DW DATA_SEL DW 01Fh ; ExceptionFilter DD 0 DQ 0 DQ 0 ; BiosHwResourceRequirementsPtr DQ 0 ; AcpiRsdp DB 0 ; PhysicalAddressBits PSD_SIZE = $ - offset gcStmPsd .code ;------------------------------------------------------------------------------ ; SMM Exception handlers ;------------------------------------------------------------------------------ _OnException PROC mov rcx, rsp add rsp, -28h call SmmStmExceptionHandler add rsp, 28h mov ebx, eax mov eax, 4 DB 0fh, 01h, 0c1h ; VMCALL jmp $ _OnException ENDP _OnStmSetup PROC ; ; Check XD disable bit ; xor r8, r8 mov rax, offset ASM_PFX(gStmXdSupported) mov al, [rax] cmp al, 0 jz @StmXdDone1 mov ecx, MSR_IA32_MISC_ENABLE rdmsr mov r8, rdx ; save MSR_IA32_MISC_ENABLE[63-32] test edx, BIT2 ; MSR_IA32_MISC_ENABLE[34] jz @f and dx, 0FFFBh ; clear XD Disable bit if it is set wrmsr @@: mov ecx, MSR_EFER rdmsr or ax, MSR_EFER_XD ; enable NXE wrmsr @StmXdDone1: push r8 add rsp, -20h call SmmStmSetup add rsp, 20h mov rax, offset ASM_PFX(gStmXdSupported) mov al, [rax] cmp al, 0 jz @f pop rdx ; get saved MSR_IA32_MISC_ENABLE[63-32] test edx, BIT2 jz @f mov ecx, MSR_IA32_MISC_ENABLE rdmsr or dx, BIT2 ; set XD Disable bit if it was set before entering into SMM wrmsr @@: rsm _OnStmSetup ENDP _OnStmTeardown PROC ; ; Check XD disable bit ; xor r8, r8 mov rax, offset ASM_PFX(gStmXdSupported) mov al, [rax] cmp al, 0 jz @StmXdDone2 mov ecx, MSR_IA32_MISC_ENABLE rdmsr mov r8, rdx ; save MSR_IA32_MISC_ENABLE[63-32] test edx, BIT2 ; MSR_IA32_MISC_ENABLE[34] jz @f and dx, 0FFFBh ; clear XD Disable bit if it is set wrmsr @@: mov ecx, MSR_EFER rdmsr or ax, MSR_EFER_XD ; enable NXE wrmsr @StmXdDone2: push r8 add rsp, -20h call SmmStmTeardown add rsp, 20h mov rax, offset ASM_PFX(gStmXdSupported) mov al, [rax] cmp al, 0 jz @f pop rdx ; get saved MSR_IA32_MISC_ENABLE[63-32] test edx, BIT2 jz @f mov ecx, MSR_IA32_MISC_ENABLE rdmsr or dx, BIT2 ; set XD Disable bit if it was set before entering into SMM wrmsr @@: rsm _OnStmTeardown ENDP END
Samveen's example OS/requirements/fasmw-1.45/examples/opengl/opengl.asm
samveen/teasers
0
163988
; OpenGL programming example format PE GUI 4.0 entry start include '%include%\win32a.inc' include 'opengl.inc' section '.data' data readable writeable _title db 'OpenGL example',0 _class db 'FASMOPENGL32',0 theta GLfloat 0.6 hinstance dd ? hwnd dd ? hdc dd ? hrc dd ? msg MSG wc WNDCLASS rc RECT ps PAINTSTRUCT pfd PIXELFORMATDESCRIPTOR active dd ? section '.code' code readable executable start: invoke GetModuleHandle,0 mov [hinstance],eax invoke LoadIcon,0,IDI_APPLICATION mov [wc.hIcon],eax invoke LoadCursor,0,IDC_ARROW mov [wc.hCursor],eax mov [wc.style],0 mov [wc.lpfnWndProc],WindowProc mov [wc.cbClsExtra],0 mov [wc.cbWndExtra],0 mov eax,[hinstance] mov [wc.hInstance],eax mov [wc.hbrBackground],0 mov [wc.lpszMenuName],0 mov [wc.lpszClassName],_class invoke RegisterClass,wc invoke CreateWindowEx,0,_class,_title,WS_VISIBLE+WS_OVERLAPPEDWINDOW+WS_CLIPCHILDREN+WS_CLIPSIBLINGS,16,16,432,432,NULL,NULL,[hinstance],NULL mov [hwnd],eax msg_loop: invoke InvalidateRect,[hwnd],NULL,FALSE invoke GetMessage,msg,NULL,0,0 or eax,eax jz end_loop invoke TranslateMessage,msg invoke DispatchMessage,msg jmp msg_loop end_loop: invoke ExitProcess,[msg.wParam] proc WindowProc, hwnd,wmsg,wparam,lparam enter push ebx esi edi cmp [wmsg],WM_CREATE je wmcreate cmp [wmsg],WM_SIZE je wmsize cmp [wmsg],WM_ACTIVATEAPP je wmactivateapp cmp [wmsg],WM_PAINT je wmpaint cmp [wmsg],WM_KEYDOWN je wmkeydown cmp [wmsg],WM_DESTROY je wmdestroy defwndproc: invoke DefWindowProc,[hwnd],[wmsg],[wparam],[lparam] jmp finish wmcreate: invoke GetDC,[hwnd] mov [hdc],eax mov edi,pfd mov ecx,sizeof.PIXELFORMATDESCRIPTOR shr 2 xor eax,eax rep stosd mov [pfd.nSize],sizeof.PIXELFORMATDESCRIPTOR mov [pfd.nVersion],1 mov [pfd.dwFlags],PFD_SUPPORT_OPENGL+PFD_DOUBLEBUFFER+PFD_DRAW_TO_WINDOW mov [pfd.dwLayerMask],PFD_MAIN_PLANE mov [pfd.iPixelType],PFD_TYPE_RGBA mov [pfd.cColorBits],16 mov [pfd.cDepthBits],16 mov [pfd.cAccumBits],0 mov [pfd.cStencilBits],0 invoke ChoosePixelFormat,[hdc],pfd invoke SetPixelFormat,[hdc],eax,pfd invoke wglCreateContext,[hdc] mov [hrc],eax invoke wglMakeCurrent,[hdc],[hrc] invoke GetClientRect,[hwnd],rc invoke glViewport,0,0,[rc.right],[rc.bottom] xor eax,eax jmp finish wmsize: invoke GetClientRect,[hwnd],rc invoke glViewport,0,0,[rc.right],[rc.bottom] invoke InvalidateRect,[hwnd],NULL,FALSE xor eax,eax jmp finish wmactivateapp: push [wmsg] pop [active] xor eax,eax jmp finish wmpaint: invoke glClear,GL_COLOR_BUFFER_BIT invoke glRotatef,[theta],0.0f,0.0f,1.0f invoke glBegin,GL_QUADS invoke glColor3f,1.0f,0.1f,0.1f invoke glVertex3f,-0.6f,-0.6f,0.0f invoke glColor3f,0.1f,0.1f,0.1f invoke glVertex3f,0.6f,-0.6f,0.0f invoke glColor3f,0.1f,0.1f,1.0f invoke glVertex3f,0.6f,0.6f,0.0f invoke glColor3f,1.0f,0.1f,1.0f invoke glVertex3f,-0.6f,0.6f,0.0f invoke glEnd invoke SwapBuffers,[hdc] xor eax,eax jmp finish wmkeydown: cmp [wparam],VK_ESCAPE jne defwndproc wmdestroy: invoke wglMakeCurrent,0,0 invoke wglDeleteContext,[hrc] invoke ReleaseDC,[hwnd],[hdc] invoke PostQuitMessage,0 xor eax,eax finish: pop edi esi ebx return section '.idata' import data readable writeable library kernel,'KERNEL32.DLL',\ user,'USER32.DLL',\ gdi,'GDI32.DLL',\ opengl,'OPENGL32.DLL',\ glu,'GLU32.DLL' import kernel,\ GetModuleHandle,'GetModuleHandleA',\ ExitProcess,'ExitProcess' import user,\ RegisterClass,'RegisterClassA',\ CreateWindowEx,'CreateWindowExA',\ DefWindowProc,'DefWindowProcA',\ GetMessage,'GetMessageA',\ TranslateMessage,'TranslateMessage',\ DispatchMessage,'DispatchMessageA',\ LoadCursor,'LoadCursorA',\ LoadIcon,'LoadIconA',\ GetClientRect,'GetClientRect',\ InvalidateRect,'InvalidateRect',\ GetDC,'GetDC',\ ReleaseDC,'ReleaseDC',\ PostQuitMessage,'PostQuitMessage' import gdi,\ ChoosePixelFormat,'ChoosePixelFormat',\ SetPixelFormat,'SetPixelFormat',\ SwapBuffers,'SwapBuffers' import opengl,\ glAccum,'glAccum',\ glAlphaFunc,'glAlphaFunc',\ glAreTexturesResident,'glAreTexturesResident',\ glArrayElement,'glArrayElement',\ glBegin,'glBegin',\ glBindTexture,'glBindTexture',\ glBitmap,'glBitmap',\ glBlendFunc,'glBlendFunc',\ glCallList,'glCallList',\ glCallLists,'glCallLists',\ glClear,'glClear',\ glClearAccum,'glClearAccum',\ glClearColor,'glClearColor',\ glClearDepth,'glClearDepth',\ glClearIndex,'glClearIndex',\ glClearStencil,'glClearStencil',\ glClipPlane,'glClipPlane',\ glColor3b,'glColor3b',\ glColor3bv,'glColor3bv',\ glColor3d,'glColor3d',\ glColor3dv,'glColor3dv',\ glColor3f,'glColor3f',\ glColor3fv,'glColor3fv',\ glColor3i,'glColor3i',\ glColor3iv,'glColor3iv',\ glColor3s,'glColor3s',\ glColor3sv,'glColor3sv',\ glColor3ub,'glColor3ub',\ glColor3ubv,'glColor3ubv',\ glColor3ui,'glColor3ui',\ glColor3uiv,'glColor3uiv',\ glColor3us,'glColor3us',\ glColor3usv,'glColor3usv',\ glColor4b,'glColor4b',\ glColor4bv,'glColor4bv',\ glColor4d,'glColor4d',\ glColor4dv,'glColor4dv',\ glColor4f,'glColor4f',\ glColor4fv,'glColor4fv',\ glColor4i,'glColor4i',\ glColor4iv,'glColor4iv',\ glColor4s,'glColor4s',\ glColor4sv,'glColor4sv',\ glColor4ub,'glColor4ub',\ glColor4ubv,'glColor4ubv',\ glColor4ui,'glColor4ui',\ glColor4uiv,'glColor4uiv',\ glColor4us,'glColor4us',\ glColor4usv,'glColor4usv',\ glColorMask,'glColorMask',\ glColorMaterial,'glColorMaterial',\ glColorPointer,'glColorPointer',\ glCopyPixels,'glCopyPixels',\ glCopyTexImage1D,'glCopyTexImage1D',\ glCopyTexImage2D,'glCopyTexImage2D',\ glCopyTexSubImage1D,'glCopyTexSubImage1D',\ glCopyTexSubImage2D,'glCopyTexSubImage2D',\ glCullFace,'glCullFace',\ glDeleteLists,'glDeleteLists',\ glDeleteTextures,'glDeleteTextures',\ glDepthFunc,'glDepthFunc',\ glDepthMask,'glDepthMask',\ glDepthRange,'glDepthRange',\ glDisable,'glDisable',\ glDisableClientState,'glDisableClientState',\ glDrawArrays,'glDrawArrays',\ glDrawBuffer,'glDrawBuffer',\ glDrawElements,'glDrawElements',\ glDrawPixels,'glDrawPixels',\ glEdgeFlag,'glEdgeFlag',\ glEdgeFlagPointer,'glEdgeFlagPointer',\ glEdgeFlagv,'glEdgeFlagv',\ glEnable,'glEnable',\ glEnableClientState,'glEnableClientState',\ glEnd,'glEnd',\ glEndList,'glEndList',\ glEvalCoord1d,'glEvalCoord1d',\ glEvalCoord1dv,'glEvalCoord1dv',\ glEvalCoord1f,'glEvalCoord1f',\ glEvalCoord1fv,'glEvalCoord1fv',\ glEvalCoord2d,'glEvalCoord2d',\ glEvalCoord2dv,'glEvalCoord2dv',\ glEvalCoord2f,'glEvalCoord2f',\ glEvalCoord2fv,'glEvalCoord2fv',\ glEvalMesh1,'glEvalMesh1',\ glEvalMesh2,'glEvalMesh2',\ glEvalPoint1,'glEvalPoint1',\ glEvalPoint2,'glEvalPoint2',\ glFeedbackBuffer,'glFeedbackBuffer',\ glFinish,'glFinish',\ glFlush,'glFlush',\ glFogf,'glFogf',\ glFogfv,'glFogfv',\ glFogi,'glFogi',\ glFogiv,'glFogiv',\ glFrontFace,'glFrontFace',\ glFrustum,'glFrustum',\ glGenLists,'glGenLists',\ glGenTextures,'glGenTextures',\ glGetBooleanv,'glGetBooleanv',\ glGetClipPlane,'glGetClipPlane',\ glGetDoublev,'glGetDoublev',\ glGetError,'glGetError',\ glGetFloatv,'glGetFloatv',\ glGetIntegerv,'glGetIntegerv',\ glGetLightfv,'glGetLightfv',\ glGetLightiv,'glGetLightiv',\ glGetMapdv,'glGetMapdv',\ glGetMapfv,'glGetMapfv',\ glGetMapiv,'glGetMapiv',\ glGetMaterialfv,'glGetMaterialfv',\ glGetMaterialiv,'glGetMaterialiv',\ glGetPixelMapfv,'glGetPixelMapfv',\ glGetPixelMapuiv,'glGetPixelMapuiv',\ glGetPixelMapusv,'glGetPixelMapusv',\ glGetPointerv,'glGetPointerv',\ glGetPolygonStipple,'glGetPolygonStipple',\ glGetString,'glGetString',\ glGetTexEnvfv,'glGetTexEnvfv',\ glGetTexEnviv,'glGetTexEnviv',\ glGetTexGendv,'glGetTexGendv',\ glGetTexGenfv,'glGetTexGenfv',\ glGetTexGeniv,'glGetTexGeniv',\ glGetTexImage,'glGetTexImage',\ glGetTexLevelParameterfv,'glGetTexLevelParameterfv',\ glGetTexLevelParameteriv,'glGetTexLevelParameteriv',\ glGetTexParameterfv,'glGetTexParameterfv',\ glGetTexParameteriv,'glGetTexParameteriv',\ glHint,'glHint',\ glIndexMask,'glIndexMask',\ glIndexPointer,'glIndexPointer',\ glIndexd,'glIndexd',\ glIndexdv,'glIndexdv',\ glIndexf,'glIndexf',\ glIndexfv,'glIndexfv',\ glIndexi,'glIndexi',\ glIndexiv,'glIndexiv',\ glIndexs,'glIndexs',\ glIndexsv,'glIndexsv',\ glIndexub,'glIndexub',\ glIndexubv,'glIndexubv',\ glInitNames,'glInitNames',\ glInterleavedArrays,'glInterleavedArrays',\ glIsEnabled,'glIsEnabled',\ glIsList,'glIsList',\ glIsTexture,'glIsTexture',\ glLightModelf,'glLightModelf',\ glLightModelfv,'glLightModelfv',\ glLightModeli,'glLightModeli',\ glLightModeliv,'glLightModeliv',\ glLightf,'glLightf',\ glLightfv,'glLightfv',\ glLighti,'glLighti',\ glLightiv,'glLightiv',\ glLineStipple,'glLineStipple',\ glLineWidth,'glLineWidth',\ glListBase,'glListBase',\ glLoadIdentity,'glLoadIdentity',\ glLoadMatrixd,'glLoadMatrixd',\ glLoadMatrixf,'glLoadMatrixf',\ glLoadName,'glLoadName',\ glLogicOp,'glLogicOp',\ glMap1d,'glMap1d',\ glMap1f,'glMap1f',\ glMap2d,'glMap2d',\ glMap2f,'glMap2f',\ glMapGrid1d,'glMapGrid1d',\ glMapGrid1f,'glMapGrid1f',\ glMapGrid2d,'glMapGrid2d',\ glMapGrid2f,'glMapGrid2f',\ glMaterialf,'glMaterialf',\ glMaterialfv,'glMaterialfv',\ glMateriali,'glMateriali',\ glMaterialiv,'glMaterialiv',\ glMatrixMode,'glMatrixMode',\ glMultMatrixd,'glMultMatrixd',\ glMultMatrixf,'glMultMatrixf',\ glNewList,'glNewList',\ glNormal3b,'glNormal3b',\ glNormal3bv,'glNormal3bv',\ glNormal3d,'glNormal3d',\ glNormal3dv,'glNormal3dv',\ glNormal3f,'glNormal3f',\ glNormal3fv,'glNormal3fv',\ glNormal3i,'glNormal3i',\ glNormal3iv,'glNormal3iv',\ glNormal3s,'glNormal3s',\ glNormal3sv,'glNormal3sv',\ glNormalPointer,'glNormalPointer',\ glOrtho,'glOrtho',\ glPassThrough,'glPassThrough',\ glPixelMapfv,'glPixelMapfv',\ glPixelMapuiv,'glPixelMapuiv',\ glPixelMapusv,'glPixelMapusv',\ glPixelStoref,'glPixelStoref',\ glPixelStorei,'glPixelStorei',\ glPixelTransferf,'glPixelTransferf',\ glPixelTransferi,'glPixelTransferi',\ glPixelZoom,'glPixelZoom',\ glPointSize,'glPointSize',\ glPolygonMode,'glPolygonMode',\ glPolygonOffset,'glPolygonOffset',\ glPolygonStipple,'glPolygonStipple',\ glPopAttrib,'glPopAttrib',\ glPopClientAttrib,'glPopClientAttrib',\ glPopMatrix,'glPopMatrix',\ glPopName,'glPopName',\ glPrioritizeTextures,'glPrioritizeTextures',\ glPushAttrib,'glPushAttrib',\ glPushClientAttrib,'glPushClientAttrib',\ glPushMatrix,'glPushMatrix',\ glPushName,'glPushName',\ glRasterPos2d,'glRasterPos2d',\ glRasterPos2dv,'glRasterPos2dv',\ glRasterPos2f,'glRasterPos2f',\ glRasterPos2fv,'glRasterPos2fv',\ glRasterPos2i,'glRasterPos2i',\ glRasterPos2iv,'glRasterPos2iv',\ glRasterPos2s,'glRasterPos2s',\ glRasterPos2sv,'glRasterPos2sv',\ glRasterPos3d,'glRasterPos3d',\ glRasterPos3dv,'glRasterPos3dv',\ glRasterPos3f,'glRasterPos3f',\ glRasterPos3fv,'glRasterPos3fv',\ glRasterPos3i,'glRasterPos3i',\ glRasterPos3iv,'glRasterPos3iv',\ glRasterPos3s,'glRasterPos3s',\ glRasterPos3sv,'glRasterPos3sv',\ glRasterPos4d,'glRasterPos4d',\ glRasterPos4dv,'glRasterPos4dv',\ glRasterPos4f,'glRasterPos4f',\ glRasterPos4fv,'glRasterPos4fv',\ glRasterPos4i,'glRasterPos4i',\ glRasterPos4iv,'glRasterPos4iv',\ glRasterPos4s,'glRasterPos4s',\ glRasterPos4sv,'glRasterPos4sv',\ glReadBuffer,'glReadBuffer',\ glReadPixels,'glReadPixels',\ glRectd,'glRectd',\ glRectdv,'glRectdv',\ glRectf,'glRectf',\ glRectfv,'glRectfv',\ glRecti,'glRecti',\ glRectiv,'glRectiv',\ glRects,'glRects',\ glRectsv,'glRectsv',\ glRenderMode,'glRenderMode',\ glRotated,'glRotated',\ glRotatef,'glRotatef',\ glScaled,'glScaled',\ glScalef,'glScalef',\ glScissor,'glScissor',\ glSelectBuffer,'glSelectBuffer',\ glShadeModel,'glShadeModel',\ glStencilFunc,'glStencilFunc',\ glStencilMask,'glStencilMask',\ glStencilOp,'glStencilOp',\ glTexCoord1d,'glTexCoord1d',\ glTexCoord1dv,'glTexCoord1dv',\ glTexCoord1f,'glTexCoord1f',\ glTexCoord1fv,'glTexCoord1fv',\ glTexCoord1i,'glTexCoord1i',\ glTexCoord1iv,'glTexCoord1iv',\ glTexCoord1s,'glTexCoord1s',\ glTexCoord1sv,'glTexCoord1sv',\ glTexCoord2d,'glTexCoord2d',\ glTexCoord2dv,'glTexCoord2dv',\ glTexCoord2f,'glTexCoord2f',\ glTexCoord2fv,'glTexCoord2fv',\ glTexCoord2i,'glTexCoord2i',\ glTexCoord2iv,'glTexCoord2iv',\ glTexCoord2s,'glTexCoord2s',\ glTexCoord2sv,'glTexCoord2sv',\ glTexCoord3d,'glTexCoord3d',\ glTexCoord3dv,'glTexCoord3dv',\ glTexCoord3f,'glTexCoord3f',\ glTexCoord3fv,'glTexCoord3fv',\ glTexCoord3i,'glTexCoord3i',\ glTexCoord3iv,'glTexCoord3iv',\ glTexCoord3s,'glTexCoord3s',\ glTexCoord3sv,'glTexCoord3sv',\ glTexCoord4d,'glTexCoord4d',\ glTexCoord4dv,'glTexCoord4dv',\ glTexCoord4f,'glTexCoord4f',\ glTexCoord4fv,'glTexCoord4fv',\ glTexCoord4i,'glTexCoord4i',\ glTexCoord4iv,'glTexCoord4iv',\ glTexCoord4s,'glTexCoord4s',\ glTexCoord4sv,'glTexCoord4sv',\ glTexCoordPointer,'glTexCoordPointer',\ glTexEnvf,'glTexEnvf',\ glTexEnvfv,'glTexEnvfv',\ glTexEnvi,'glTexEnvi',\ glTexEnviv,'glTexEnviv',\ glTexGend,'glTexGend',\ glTexGendv,'glTexGendv',\ glTexGenf,'glTexGenf',\ glTexGenfv,'glTexGenfv',\ glTexGeni,'glTexGeni',\ glTexGeniv,'glTexGeniv',\ glTexImage1D,'glTexImage1D',\ glTexImage2D,'glTexImage2D',\ glTexParameterf,'glTexParameterf',\ glTexParameterfv,'glTexParameterfv',\ glTexParameteri,'glTexParameteri',\ glTexParameteriv,'glTexParameteriv',\ glTexSubImage1D,'glTexSubImage1D',\ glTexSubImage2D,'glTexSubImage2D',\ glTranslated,'glTranslated',\ glTranslatef,'glTranslatef',\ glVertex2d,'glVertex2d',\ glVertex2dv,'glVertex2dv',\ glVertex2f,'glVertex2f',\ glVertex2fv,'glVertex2fv',\ glVertex2i,'glVertex2i',\ glVertex2iv,'glVertex2iv',\ glVertex2s,'glVertex2s',\ glVertex2sv,'glVertex2sv',\ glVertex3d,'glVertex3d',\ glVertex3dv,'glVertex3dv',\ glVertex3f,'glVertex3f',\ glVertex3fv,'glVertex3fv',\ glVertex3i,'glVertex3i',\ glVertex3iv,'glVertex3iv',\ glVertex3s,'glVertex3s',\ glVertex3sv,'glVertex3sv',\ glVertex4d,'glVertex4d',\ glVertex4dv,'glVertex4dv',\ glVertex4f,'glVertex4f',\ glVertex4fv,'glVertex4fv',\ glVertex4i,'glVertex4i',\ glVertex4iv,'glVertex4iv',\ glVertex4s,'glVertex4s',\ glVertex4sv,'glVertex4sv',\ glVertexPointer,'glVertexPointer',\ glViewport,'glViewport',\ wglGetProcAddress,'wglGetProcAddress',\ wglCopyContext,'wglCopyContext',\ wglCreateContext,'wglCreateContext',\ wglCreateLayerContext,'wglCreateLayerContext',\ wglDeleteContext,'wglDeleteContext',\ wglDescribeLayerPlane,'wglDescribeLayerPlane',\ wglGetCurrentContext,'wglGetCurrentContext',\ wglGetCurrentDC,'wglGetCurrentDC',\ wglGetLayerPaletteEntries,'wglGetLayerPaletteEntries',\ wglMakeCurrent,'wglMakeCurrent',\ wglRealizeLayerPalette,'wglRealizeLayerPalette',\ wglSetLayerPaletteEntries,'wglSetLayerPaletteEntries',\ wglShareLists,'wglShareLists',\ wglSwapLayerBuffers,'wglSwapLayerBuffers',\ wglSwapMultipleBuffers,'wglSwapMultipleBuffers',\ wglUseFontBitmapsA,'wglUseFontBitmapsA',\ wglUseFontOutlinesA,'wglUseFontOutlinesA',\ wglUseFontBitmapsW,'wglUseFontBitmapsW',\ wglUseFontOutlinesW,'wglUseFontOutlinesW',\ wglUseFontBitmaps,'wglUseFontBitmaps',\ wglUseFontOutlines,'wglUseFontOutlines',\ glDrawRangeElements,'glDrawRangeElements',\ glTexImage3D,'glTexImage3D',\ glBlendColor,'glBlendColor',\ glBlendEquation,'glBlendEquation',\ glColorSubTable,'glColorSubTable',\ glCopyColorSubTable,'glCopyColorSubTable',\ glColorTable,'glColorTable',\ glCopyColorTable,'glCopyColorTable',\ glColorTableParameteriv,'glColorTableParameteriv',\ glColorTableParameterfv,'glColorTableParameterfv',\ glGetColorTable,'glGetColorTable',\ glGetColorTableParameteriv,'glGetColorTableParameteriv',\ glGetColorTableParameterfv,'glGetColorTableParameterfv',\ glConvolutionFilter1D,'glConvolutionFilter1D',\ glConvolutionFilter2D,'glConvolutionFilter2D',\ glCopyConvolutionFilter1D,'glCopyConvolutionFilter1D',\ glCopyConvolutionFilter2D,'glCopyConvolutionFilter2D',\ glGetConvolutionFilter,'glGetConvolutionFilter',\ glSeparableFilter2D,'glSeparableFilter2D',\ glGetSeparableFilter,'glGetSeparableFilter',\ glConvolutionParameteri,'glConvolutionParameteri',\ glConvolutionParameteriv,'glConvolutionParameteriv',\ glConvolutionParameterf,'glConvolutionParameterf',\ glConvolutionParameterfv,'glConvolutionParameterfv',\ glGetConvolutionParameteriv,'glGetConvolutionParameteriv',\ glGetConvolutionParameterfv,'glGetConvolutionParameterfv',\ glHistogram,'glHistogram',\ glResetHistogram,'glResetHistogram',\ glGetHistogram,'glGetHistogram',\ glGetHistogramParameteriv,'glGetHistogramParameteriv',\ glGetHistogramParameterfv,'glGetHistogramParameterfv',\ glMinmax,'glMinmax',\ glResetMinmax,'glResetMinmax',\ glGetMinmax,'glGetMinmax',\ glGetMinmaxParameteriv,'glGetMinmaxParameteriv',\ glGetMinmaxParameterfv,'glGetMinmaxParameterfv' import glu,\ gluBeginCurve,'gluBeginCurve',\ gluBeginPolygon,'gluBeginPolygon',\ gluBeginSurface,'gluBeginSurface',\ gluBeginTrim,'gluBeginTrim',\ gluBuild1DMipmaps,'gluBuild1DMipmaps',\ gluBuild2DMipmaps,'gluBuild2DMipmaps',\ gluCylinder,'gluCylinder',\ gluDeleteNurbsRenderer,'gluDeleteNurbsRenderer',\ gluDeleteQuadric,'gluDeleteQuadric',\ gluDeleteTess,'gluDeleteTess',\ gluDisk,'gluDisk',\ gluEndCurve,'gluEndCurve',\ gluEndPolygon,'gluEndPolygon',\ gluEndSurface,'gluEndSurface',\ gluEndTrim,'gluEndTrim',\ gluErrorString,'gluErrorString',\ gluGetNurbsProperty,'gluGetNurbsProperty',\ gluGetString,'gluGetString',\ gluGetTessProperty,'gluGetTessProperty',\ gluLoadSamplingMatrices,'gluLoadSamplingMatrices',\ gluLookAt,'gluLookAt',\ gluNewNurbsRenderer,'gluNewNurbsRenderer',\ gluNewQuadric,'gluNewQuadric',\ gluNewTess,'gluNewTess',\ gluNextContour,'gluNextContour',\ gluNurbsCallback,'gluNurbsCallback',\ gluNurbsCurve,'gluNurbsCurve',\ gluNurbsProperty,'gluNurbsProperty',\ gluNurbsSurface,'gluNurbsSurface',\ gluOrtho2D,'gluOrtho2D',\ gluPartialDisk,'gluPartialDisk',\ gluPerspective,'gluPerspective',\ gluPickMatrix,'gluPickMatrix',\ gluProject,'gluProject',\ gluPwlCurve,'gluPwlCurve',\ gluQuadricCallback,'gluQuadricCallback',\ gluQuadricDrawStyle,'gluQuadricDrawStyle',\ gluQuadricNormals,'gluQuadricNormals',\ gluQuadricOrientation,'gluQuadricOrientation',\ gluQuadricTexture,'gluQuadricTexture',\ gluScaleImage,'gluScaleImage',\ gluSphere,'gluSphere',\ gluTessBeginContour,'gluTessBeginContour',\ gluTessBeginPolygon,'gluTessBeginPolygon',\ gluTessCallback,'gluTessCallback',\ gluTessEndContour,'gluTessEndContour',\ gluTessEndPolygon,'gluTessEndPolygon',\ gluTessNormal,'gluTessNormal',\ gluTessProperty,'gluTessProperty',\ gluTessVertex,'gluTessVertex',\ gluUnProject,'gluUnProject'
libsrc/_DEVELOPMENT/arch/sms/SMSlib/c/sdcc/SMS_setBackdropColor.asm
jpoikela/z88dk
640
6666
<gh_stars>100-1000 ; void SMS_setBackdropColor(unsigned char entry) SECTION code_clib SECTION code_SMSlib PUBLIC _SMS_setBackdropColor EXTERN asm_SMSlib_setBackdropColor _SMS_setBackdropColor: pop af pop hl push hl push af jp asm_SMSlib_setBackdropColor
src/x86-64/init/net.asm
ohnx/ge
0
163700
<filename>src/x86-64/init/net.asm ; ============================================================================= ; BareMetal -- a 64-bit OS written in Assembly for x86-64 systems ; Copyright (C) 2008-2015 Return Infinity -- see LICENSE.TXT ; ; INIT_NET ; ============================================================================= init_net: ; Search for a supported NIC xor ebx, ebx ; Clear the Bus number xor ecx, ecx ; Clear the Device/Slot number mov edx, 2 ; Register 2 for Class code/Subclass init_net_probe_next: call os_pci_read_reg shr eax, 16 ; Move the Class/Subclass code to AX cmp ax, 0x0200 ; Network Controller (02) / Ethernet (00) je init_net_probe_find_driver ; Found a Network Controller... now search for a driver add ecx, 1 cmp ecx, 256 ; Maximum 256 devices/functions per bus je init_net_probe_next_bus jmp init_net_probe_next init_net_probe_next_bus: xor ecx, ecx add ebx, 1 cmp ebx, 256 ; Maximum 256 buses je init_net_probe_not_found jmp init_net_probe_next init_net_probe_find_driver: xor edx, edx ; Register 0 for Device/Vendor ID call os_pci_read_reg ; Read the Device/Vendor ID from the PCI device mov r8d, eax ; Save the Device/Vendor ID in R8D mov rsi, NIC_DeviceVendor_ID lodsd ; Load a driver ID - Low half must be 0xFFFF init_net_probe_find_next_driver: mov rdx, rax ; Save the driver ID init_net_probe_find_next_device: lodsd ; Load a device and vendor ID from our list of supported NICs cmp eax, 0x00000000 ; 0x00000000 means we have reached the end of the list je init_net_probe_not_found ; No supported NIC found cmp ax, 0xFFFF ; New driver ID? je init_net_probe_find_next_driver ; We found the next driver type cmp eax, r8d je init_net_probe_found ; If Carry is clear then we found a supported NIC jmp init_net_probe_find_next_device ; Check the next device init_net_probe_found: cmp edx, 0x8169FFFF je init_net_probe_found_rtl8169 cmp edx, 0x8254FFFF je init_net_probe_found_i8254x jmp init_net_probe_not_found init_net_probe_found_rtl8169: call os_net_rtl8169_init mov rdi, os_net_transmit mov rax, os_net_rtl8169_transmit stosq mov rax, os_net_rtl8169_poll stosq mov rax, os_net_rtl8169_ack_int stosq jmp init_net_probe_found_finish init_net_probe_found_i8254x: call os_net_i8254x_init mov rdi, os_net_transmit mov rax, os_net_i8254x_transmit stosq mov rax, os_net_i8254x_poll stosq mov rax, os_net_i8254x_ack_int stosq jmp init_net_probe_found_finish init_net_probe_found_finish: xor eax, eax mov al, [os_NetIRQ] add al, 0x20 mov rdi, rax mov rax, network call create_gate ; Enable the Network IRQ mov al, [os_NetIRQ] call os_pic_mask_clear mov byte [os_NetEnabled], 1 ; A supported NIC was found. Signal to the OS that networking is enabled call os_net_ack_int ; Call the driver function to acknowledge the interrupt internally init_net_probe_not_found: ret ; ============================================================================= ; EOF
oeis/034/A034660.asm
neoneye/loda-programs
11
9911
<reponame>neoneye/loda-programs ; A034660: Sum of n-th powers of divisors of 12. ; Submitted by <NAME> ; 6,28,210,2044,22386,257908,3037530,36130444,431733666,5170140388,61978939050,743375541244,8918294543346,107006334784468,1283997101947770,15407492847694444,184887084343023426,2218628050709022148,26623434909949071690,319480609006403630044,3833763649708914645906,46005141850728850805428,552061570551763831158810,6624738056749922960468044,79496851942053939878082786,953962194872104906760006308,11447546167874515876354097130,137370552990967769764297408444,1648446629750526838886958006066 mov $2,3 mov $3,2 pow $3,$0 mov $1,$3 add $1,1 mul $1,$3 pow $2,$0 add $2,1 mul $1,$2 add $1,$2 mov $0,$1
examples/stm32f0/rfm69_moter/modem/controller.adb
ekoeppen/STM32_Generic_Ada_Drivers
1
4951
<gh_stars>1-10 with STM32_SVD; use STM32_SVD; with Serial; use Serial; with STM32GD.Board; use STM32GD.Board; with STM32GD.USART; use STM32GD.USART; with Ada.Real_Time; use Ada.Real_Time; with Ada.Synchronous_Task_Control; use Ada.Synchronous_Task_Control; with Peripherals; use Peripherals; use Peripherals.Radio; with Utils; use Utils; with Modem; use Modem; with Packet; use Packet; with CBOR_Codec; with System; package body Controller is subtype Host_Message_Size_Type is Positive range 1 .. 64; subtype Host_Message_Type is USART_Data (Host_Message_Size_Type); Host_Message : Host_Message_Type; Host_Message_Index : Host_Message_Size_Type; RF_Message : Packet_Type; RF_Message_Index : Packet_Size_Type; Heartbeat_Period : constant Time_Span := Seconds (60); Ticks_To_Heartbeat : Integer := Heartbeat_Period / Period; Ping_Period : constant Time_Span := Seconds (2); Ticks_To_Ping : Integer := Ping_Period / Period; Heartbeat : Integer := 0; Ping_Count : Natural := 0; procedure Write_To_Host_Message (Data : Byte); function Read_From_Host_Message return Byte; procedure Write_To_RF_Message (Data : Byte); function Read_From_RF_Message return Byte; ----------------------------------------------------------------------------- package Host_CBOR is new CBOR_Codec ( Write => Write_To_Host_Message, Read => Read_From_Host_Message); package RF_CBOR is new CBOR_Codec ( Write => Write_To_RF_Message, Read => Read_From_RF_Message); procedure Send_Host_Message is begin Output.Write (Host_Message, Host_Message_Index - Host_Message'First); end Send_Host_Message; procedure Start_Host_Message is begin Host_Message_Index := Host_Message'First; end Start_Host_Message; procedure Write_To_Host_Message (Data : Byte) is begin Host_Message (Host_Message_Index) := Data; Host_Message_Index := Host_Message_Index + 1; end Write_To_Host_Message; function Read_From_Host_Message return Byte is B : Byte; begin B := Host_Message (Host_Message_Index); Host_Message_Index := Host_Message_Index + 1; return B; end Read_From_Host_Message; procedure Start_RF_Message is begin RF_Message_Index := RF_Message'First; end Start_RF_Message; procedure Write_To_RF_Message (Data : Byte) is begin RF_Message (RF_Message_Index) := Data; RF_Message_Index := RF_Message_Index + 1; end Write_To_RF_Message; function Read_From_RF_Message return Byte is B : Byte; begin B := RF_Message (RF_Message_Index); RF_Message_Index := RF_Message_Index + 1; return B; end Read_From_RF_Message; procedure Send_Log_Message (Message : String) is begin Start_Host_Message; Host_CBOR.Encode_Tag (Log_Message_Tag); Host_CBOR.Encode_Byte_String (Message); Send_Host_Message; end Send_Log_Message; procedure Handle_Command is Tag : Integer; procedure Set_Ping_Count is Count : Integer; begin if Host_CBOR.Decode_Integer (Count) and then Count >= 0 then Send_Log_Message ("Setting ping count"); Ping_Count := Count; end if; end Set_Ping_Count; procedure Reset is SCB_AIRCR : aliased STM32_SVD.UInt32 with Import, Address => System'To_Address (16#E000ED0C#); begin Send_Log_Message ("Resetting"); SCB_AIRCR := 16#05FA_0004#; end Reset; procedure Report_Modem_Status is Registers : Radio.Raw_Register_Array; begin Send_Log_Message ("Modem status"); Radio.Read_Registers (Registers); for I in Registers'Range loop Start_Host_Message; Host_CBOR.Encode_Tag (Register_Value_Tag); Host_CBOR.Encode_Array (2); Host_CBOR.Encode_Integer (I); Host_CBOR.Encode_Integer (Integer (Registers (I))); Send_Host_Message; end loop; end Report_Modem_Status; begin Host_Message_Index := Host_Message'First; if Host_CBOR.Decode_Tag (Tag) then case Tag is when Reset_Cmd_Tag => Reset; when Ping_Cmd_Tag => Set_Ping_Count; when Status_Cmd_Tag => Report_Modem_Status; when others => null; end case; end if; end Handle_Command; procedure Handle_Host_Data is Command_Line : Serial_Data; begin if Input.Is_Ready then Input.Read (Command_Line); Host_Message := Command_Line.Data; Handle_Command; end if; end Handle_Host_Data; procedure Handle_RF_Data is Packet : Packet_Type; Packet_Ready : Boolean; begin Modem.RX.Get_Data (Packet_Ready, Packet); if Packet_Ready then LED.Set; Start_Host_Message; for I in Packet'Range loop Write_To_Host_Message (Packet (I)); end loop; Send_Host_Message; LED.Clear; end if; end Handle_RF_Data; procedure Send_Heartbeat is begin Ticks_to_Heartbeat := Ticks_To_Heartbeat - 1; if Ticks_To_Heartbeat = 0 then Ticks_To_Heartbeat := Heartbeat_Period / Period; Heartbeat := Heartbeat + 1; Start_Host_Message; Host_CBOR.Encode_Tag (Heartbeat_Tag); Host_CBOR.Encode_Array (2); Host_CBOR.Encode_Byte_String ("Modem"); Host_CBOR.Encode_Integer (Heartbeat); Send_Host_Message; end if; end Send_Heartbeat; procedure Send_Ping is begin if Ping_Count > 0 then Ticks_to_Ping := Ticks_To_Ping - 1; if Ticks_To_Ping = 0 then Ping_Count := Ping_Count - 1; Ticks_To_Ping := Ping_Period / Period; Start_RF_Message; RF_CBOR.Encode_Tag (Ping_Tag); RF_CBOR.Encode_Byte_String ("Modem"); Modem.TX.Send (RF_Message); Send_Log_Message ("Ping"); end if; end if; end Send_Ping; procedure Periodic_Tasks is begin Send_Heartbeat; Send_Ping; end Periodic_Tasks; end Controller;
oeis/098/A098815.asm
neoneye/loda-programs
11
240534
; A098815: 2^p - 7 where p is prime. ; -3,1,25,121,2041,8185,131065,524281,8388601,536870905,2147483641,137438953465,2199023255545,8796093022201,140737488355321,9007199254740985,576460752303423481,2305843009213693945,147573952589676412921,2361183241434822606841,9444732965739290427385,604462909807314587353081,9671406556917033397649401,618970019642690137449562105,158456325028528675187087900665,2535301200456458802993406410745,10141204801825835211973625643001,162259276829213363391578010288121,649037107316853453566312041152505 seq $0,6005 ; The odd prime numbers together with 1. max $0,2 mov $2,2 pow $2,$0 mov $0,$2 sub $0,7
libsrc/_DEVELOPMENT/math/float/am9511/asm/z80/am32_read.asm
dikdom/z88dk
1
166489
<gh_stars>1-10 SECTION code_clib SECTION code_fp_am9511 PUBLIC asm_sccz80_readl PUBLIC asm_sccz80_read1 PUBLIC asm_sdcc_readr PUBLIC asm_sdcc_read1 EXTERN asm_load .asm_sccz80_readl ; sccz80 float primitive ; Read right sccz80 float from the stack ; ; enter : stack = sccz80_float left, sccz80_float right, ret1, ret0 ; ; exit : stack = sccz80_float left, sccz80_float right, ret1 ; DEHL = sccz80_float right ; ; uses : af, bc, de, hl .asm_sdcc_readr ; sdcc float primitive ; Read right sdcc float from the stack ; ; Convert from sdcc_float calling to d32_float. ; ; enter : stack = sdcc_float right, sdcc_float left, ret1, ret0 ; ; exit : stack = sdcc_float right, sdcc_float left, ret1 ; DEHL = sdcc_float right ; ; uses : f, bc, de, hl ld hl,8 ; stack sccz80_float left or sdcc_float right add hl,sp jp asm_load ; return DEHL .asm_sccz80_read1 ; sccz80 float primitive ; Read left / single sccz80 float from the stack ; ; enter : stack = sccz80_float, ret1, ret0 ; ; exit : stack = sccz80_float, ret1 ; DEHL = sccz80_float ; ; uses : f, bc, de, hl .asm_sdcc_read1 ; sdcc float primitive ; Read left / single sdcc float from the stack ; ; Convert from sdcc_float calling to d32_float. ; ; enter : stack = sdcc_float, ret1, ret0 ; ; exit : stack = sdcc_float, ret1 ; DEHL = sdcc_float ; ; uses : f, bc, de, hl ld hl,4 ; stack sccz80_float or sdcc_float add hl,sp jp asm_load ; return DEHL
Task/Regular-expressions/AppleScript/regular-expressions.applescript
LaudateCorpus1/RosettaCodeData
1
3192
<reponame>LaudateCorpus1/RosettaCodeData try find text ".*string$" in "I am a string" with regexp on error message return message end try try change "original" into "modified" in "I am the original string" with regexp on error message return message end try
programs/oeis/187/A187577.asm
neoneye/loda
22
247129
; A187577: Complement of A187576. ; 3,6,9,10,13,16,19,22,25,26,29,32,35,36,39,42,45,48,51,52,55,58,61,64,67,68,71,74,77,78,81,84,87,90,93,94,97,100,103,104,107,110,113,116,119,120,123,126,129,132,135,136,139,142,145,146,149,152,155,158,161,162,165,168,171,174,177,178,181,184,187,188,191,194,197,200,203,204,207,210,213,214,217,220 mov $3,$0 add $3,1 mov $6,$0 lpb $3 mov $0,$6 sub $3,1 sub $0,$3 add $0,1 lpb $0 mov $2,$0 mov $0,0 seq $2,284620 ; {00->2}-transform of the infinite Fibonacci word A003849. mov $4,$2 min $4,1 lpe mov $5,$4 mul $5,2 add $5,1 add $1,$5 lpe mov $0,$1
other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/mak.lzh/mak/Net.asm
prismotizm/gigaleak
0
171639
Name: Net.asm Type: file Size: 1218 Last-Modified: '1992-02-13T07:47:46Z' SHA-1: 648CD56CCFAA9D6D098A239E189C84B887FA6F71 Description: null
oeis/068/A068409.asm
neoneye/loda-programs
11
22405
<reponame>neoneye/loda-programs<filename>oeis/068/A068409.asm ; A068409: a(n) = binomial(binomial(2*n,n),n). ; Submitted by <NAME> ; 1,2,15,1140,916895,8137369800,850423134076516,1105964895591808388136,18627853605123584223921210120,4180709311038401636820646431913319660,12767818425644517198178541333546326811326975100,539283510761097744309980821248039238293399283954117362960,319178287384326883422615779616185596614148846514877583046980223885275,2675934932083826314118333807588868264596634436522645258157782098137194310776165200,320721679278704194849861916072911988461963845950312203171519075889436173157429629577444161172600 mov $2,$0 mul $0,2 bin $0,$2 bin $0,$2
examples/Sized/SelfRef.agda
agda/ooAgda
23
9704
<gh_stars>10-100 module Sized.SelfRef where open import Data.Product open import Data.String.Base open import Size open import SizedIO.Object open import SizedIO.IOObject open import SizedIO.ConsoleObject open import SizedIO.Base open import SizedIO.Console hiding (main) open import NativeIO data AMethod : Set where print : AMethod m1 : AMethod m2 : AMethod AResult : (c : AMethod) → Set AResult _ = Unit aI : Interface Method aI = AMethod Result aI = AResult aC : (i : Size) → Set aC i = ConsoleObject i aI -- -- Self Referential: method 'm1' calls method 'm2' -- {-# NON_TERMINATING #-} aP : ∀{i} (s : String) → aC i method (aP s) print = exec1 (putStrLn s) >> return (_ , aP s) method (aP s) m1 = exec1 (putStrLn s) >> method (aP s) m2 >>= λ{ (_ , c₀) → return (_ , c₀) } method (aP s) m2 = return (_ , aP (s ++ "->m2")) program : String → IOConsole ∞ Unit program arg = let c₀ = aP ("start̄") in method c₀ m1 >>= λ{ (_ , c₁) → --- ===> m1 called, then m2 prints out text method c₁ print >>= λ{ (_ , c₂) → exec1 (putStrLn "end") }} main : NativeIO Unit main = translateIOConsole (program "")
src/linted-audio/src/linted-audio.adb
mstewartgallus/linted
0
7888
<filename>src/linted-audio/src/linted-audio.adb -- Copyright 2016,2017 <NAME> -- -- 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 System; with Ada.Unchecked_Conversion; with Ada.Numerics.Elementary_Functions; private with Interfaces.C.Strings; private with Interfaces.C; private with Pulse.Context; private with Pulse.Def; private with Pulse.Error; private with Pulse.Mainloop; private with Pulse.Mainloop.API; private with Pulse.Proplist; private with Pulse.Sample; private with Pulse.Stream; private with Linted.Errors; private with Linted.KOs; private with Linted.Stdio; private with Libc.Stddef; package body Linted.Audio with Spark_Mode => Off is use Interfaces.C.Strings; use Interfaces.C; use Pulse.Context; use Pulse.Def; use Pulse.Error; use Pulse.Mainloop; use Pulse.Mainloop.API; use Pulse.Proplist; use Pulse.Sample; use Pulse.Stream; use type Errors.Error; A_TONE : constant Float := 440.0; SAMPLE_RATE : constant Float := 44100.0; GREATEST_PERIOD : constant Float := 1000.0 * (SAMPLE_RATE / A_TONE); Sampledata : array (0 .. Integer (GREATEST_PERIOD) - 1) of aliased short; Test_Sample_Spec : constant pa_sample_spec := (format => PA_SAMPLE_S16LE, rate => unsigned (SAMPLE_RATE), channels => 1); function Square_Wave (II : Integer; Freq : Float; Amplitude : Float; Sample : Float) return Float; function Triangle_Wave (II : Integer; Freq : Float; Amplitude : Float; Sample : Float) return Float; function Sin_Wave (II : Integer; Freq : Float; Amplitude : Float; Sample : Float) return Float; procedure On_Notify (c : pa_context_access; userdata : System.Address); pragma Convention (C, On_Notify); task Main_Task; task body Main_Task is Mainloop : pa_mainloop_access; Context : pa_context_access; Retval : int; begin for II in Sampledata'Range loop Sampledata (II) := short (Triangle_Wave (II, A_TONE, 8000.0, SAMPLE_RATE) * Square_Wave (II, A_TONE / 100.0, 1.0, SAMPLE_RATE) * Sin_Wave (II, A_TONE / 1000.0, 1.0, SAMPLE_RATE)); end loop; Mainloop := pa_mainloop_new; if null = Mainloop then raise Storage_Error with "Cannot create a mainloop"; end if; declare Proplist : pa_proplist_access; Role_Str : chars_ptr; Role : chars_ptr; Game_Name : chars_ptr; begin Proplist := pa_proplist_new; if null = Proplist then raise Storage_Error with "Cannot create a property list"; end if; Role_Str := New_String ("PULSE_PROP_media.role"); Role := New_String ("game"); if 0 < pa_proplist_sets (Proplist, Role, Role_Str) then raise Storage_Error with "Cannot set property list values"; end if; Free (Role); Free (Role_Str); Game_Name := New_String ("Linted"); Context := pa_context_new_with_proplist (pa_mainloop_get_api (Mainloop), Game_Name, Proplist); if null = Context then raise Storage_Error with "Cannot create a new context"; end if; Free (Game_Name); pa_proplist_free (Proplist); end; pa_context_set_state_callback (Context, On_Notify'Access, System.Null_Address); if pa_context_connect (Context, Null_Ptr, PA_CONTEXT_NOAUTOSPAWN, null) < 0 then raise Program_Error with Value (pa_strerror (pa_context_errno (Context))); end if; if pa_mainloop_run (Mainloop, Retval) < 0 then raise Program_Error with Value (pa_strerror (pa_context_errno (Context))); end if; pa_context_unref (Context); pa_mainloop_free (Mainloop); end Main_Task; function Square_Wave (II : Integer; Freq : Float; Amplitude : Float; Sample : Float) return Float is Frequency : constant Float := Freq / Sample; Period : constant Float := 1.0 / Frequency; begin return Amplitude * ((Float (II mod Integer (Period)) + (Period / 2.0)) / Period); end Square_Wave; function Triangle_Wave (II : Integer; Freq : Float; Amplitude : Float; Sample : Float) return Float is Frequency : constant Float := Freq / Sample; Period : constant Float := 1.0 / Frequency; begin return Amplitude * Float (II mod Integer (Period)) / Period; end Triangle_Wave; function Sin_Wave (II : Integer; Freq : Float; Amplitude : Float; Sample : Float) return Float is Frequency : constant Float := Freq / Sample; Tau : constant Float := 6.28318530718; begin return Amplitude * Ada.Numerics.Elementary_Functions.Sin (Tau * Frequency * Float (II)); end Sin_Wave; procedure On_Ready (c : pa_context_access); procedure On_Notify (c : pa_context_access; userdata : System.Address) is begin case pa_context_get_state (c) is when PA_CONTEXT_UNCONNECTED => Stdio.Write_Line (KOs.Standard_Error, "Unconnected"); when PA_CONTEXT_CONNECTING => Stdio.Write_Line (KOs.Standard_Error, "Connecting"); when PA_CONTEXT_AUTHORIZING => Stdio.Write_Line (KOs.Standard_Error, "Authorizing"); when PA_CONTEXT_SETTING_NAME => Stdio.Write_Line (KOs.Standard_Error, "Setting Name"); when PA_CONTEXT_READY => Stdio.Write_Line (KOs.Standard_Error, "Ready"); On_Ready (c); when PA_CONTEXT_FAILED => Stdio.Write_Line (KOs.Standard_Error, "Failed"); when PA_CONTEXT_TERMINATED => Stdio.Write_Line (KOs.Standard_Error, "Terminated"); end case; end On_Notify; procedure On_Ok_To_Write (s : pa_stream_access; nbytes : Libc.Stddef.size_t; userdata : System.Address); pragma Convention (C, On_Ok_To_Write); procedure On_Ready (c : pa_context_access) is Stream : pa_stream_access; Buffer_Attr : pa_buffer_attr; Latency : constant unsigned_long := 20000; Stream_Name : chars_ptr; begin Stream_Name := New_String ("Background Music"); Stream := pa_stream_new (c, Stream_Name, Test_Sample_Spec, null); Free (Stream_Name); pa_stream_set_write_callback (Stream, On_Ok_To_Write'Access, System.Null_Address); Buffer_Attr.maxlength := unsigned (pa_usec_to_bytes (Latency, Test_Sample_Spec)); Buffer_Attr.minreq := unsigned (pa_usec_to_bytes (0, Test_Sample_Spec)); Buffer_Attr.prebuf := -1; Buffer_Attr.tlength := unsigned (pa_usec_to_bytes (Latency, Test_Sample_Spec)); if pa_stream_connect_playback (Stream, Null_Ptr, Buffer_Attr, PA_STREAM_INTERPOLATE_TIMING or PA_STREAM_ADJUST_LATENCY or PA_STREAM_AUTO_TIMING_UPDATE, null, System.Null_Address) < 0 then raise Program_Error with "pa_stream_connect_playback: " & Value (pa_strerror (pa_context_errno (c))); end if; end On_Ready; Sampleoffs : Libc.Stddef.size_t := 0; procedure On_Ok_To_Write (s : pa_stream_access; nbytes : Libc.Stddef.size_t; userdata : System.Address) is Mybytes : Libc.Stddef.size_t := nbytes; begin if Sampleoffs * 2 + Mybytes > Libc.Stddef.size_t (GREATEST_PERIOD) * 2 then Sampleoffs := 0; end if; if Mybytes > Libc.Stddef.size_t (GREATEST_PERIOD) * 2 then Mybytes := Libc.Stddef.size_t (GREATEST_PERIOD) * 2; end if; if pa_stream_write (s, Sampledata (Integer (Sampleoffs))'Address, Mybytes, null, 0, PA_SEEK_RELATIVE) < 0 then raise Program_Error with "pa_stream_write"; end if; Sampleoffs := Sampleoffs + nbytes / 2; end On_Ok_To_Write; end Linted.Audio;
onnxruntime/core/mlas/lib/amd64/QgemmU8X8KernelAvx2.asm
lchang20/onnxruntime
6,036
82679
<filename>onnxruntime/core/mlas/lib/amd64/QgemmU8X8KernelAvx2.asm ;++ ; ; Copyright (c) Microsoft Corporation. All rights reserved. ; ; Licensed under the MIT License. ; ; Module Name: ; ; QgemmU8X8KernelAvx2.asm ; ; Abstract: ; ; This module implements the kernels for the quantized integer matrix/matrix ; multiply operation (QGEMM). ; ; This implementation uses AVX2 and AVX VNNI instructions. ; ;-- .xlist INCLUDE mlasi.inc INCLUDE AssembleAvxVnni.inc .list EXTERN MlasMaskMoveTableAvx:NEAR ; ; Stack frame layout for the U8X8 kernel. ; GemmU8X8KernelFrame STRUCT SavedXmm6 OWORD ? SavedXmm7 OWORD ? SavedXmm8 OWORD ? SavedXmm9 OWORD ? SavedXmm10 OWORD ? SavedXmm11 OWORD ? SavedXmm12 OWORD ? SavedXmm13 OWORD ? SavedXmm14 OWORD ? SavedXmm15 OWORD ? Padding QWORD ? SavedR13 QWORD ? SavedR12 QWORD ? SavedRdi QWORD ? SavedRsi QWORD ? SavedRbx QWORD ? SavedRbp QWORD ? ReturnAddress QWORD ? PreviousP1Home QWORD ? PreviousP2Home QWORD ? PreviousP3Home QWORD ? PreviousP4Home QWORD ? CountM QWORD ? CountN QWORD ? ldc QWORD ? RowSumBuffer QWORD ? ColumnSumBuffer QWORD ? ZeroPointB QWORD ? ZeroMode QWORD ? GemmU8X8KernelFrame ENDS ; ; Macro Description: ; ; This macro generates code to multiply and accumulator a single row of the ; output block. ; ; Arguments: ; ; ColumnCount - Supplies the number of columns to produce. ; ; Vec1Reg - Supplies the high block accumulator register (when ColumnCount ; is 16). ; ; Vec2Reg - Supplies the low block accumulator register. ; ; Implicit Arguments: ; ; ymm0 - Supplies the first vector loaded from matrix B. ; ; ymm1 - Supplies the second vector loaded from matrix B (when ColumnCount ; is 16). ; ; ymm2 - Supplies the broadcast value loaded from matrix A. ; ; ymm12 - Supplies a 256-bit with the broadcasted word value 0x0001. ; MultiplyAccumulateRowU8S8Avx2 MACRO ColumnCount, Vec1Reg, Vec2Reg vpmaddubsw ymm3,ymm2,ymm0 vpmaddwd ymm3,ymm3,ymm12 IF ColumnCount EQ 16 vpaddd Vec1Reg,Vec1Reg,ymm3 vpmaddubsw ymm2,ymm2,ymm1 vpmaddwd ymm2,ymm2,ymm12 vpaddd Vec2Reg,Vec2Reg,ymm2 ELSE vpaddd Vec2Reg,Vec2Reg,ymm3 ENDIF ENDM ; ; Macro Description: ; ; This macro generates code to multiply and accumulate each row of the output ; block. ; ; Arguments: ; ; ColumnCount - Supplies the number of columns to produce. ; ; RowCount - Supplies the number of rows to produce. ; ; VectorOffset - Supplies the byte offset from matrix B to fetch elements. ; ; BroadcastOffset - Supplies the byte offset from matrix A to fetch elements. ; ; Implicit Arguments: ; ; rbx - Supplies the address into the matrix A data plus 3 rows. ; ; rcx - Supplies the address into the matrix A data. ; ; rdx - Supplies the address into the matrix B data. ; ; r9 - Supplies the length in bytes of a row from matrix A. ; ; ymm4-ymm11 - Supplies the block accumulators. ; ; ymm12 - Supplies a 256-bit with the broadcasted word value 0x0001. ; ComputeBlockU8S8Avx2 MACRO ColumnCount, RowCount, VectorOffset, BroadcastOffset IF RowCount EQ 1 vpbroadcastd ymm2,DWORD PTR [rcx+BroadcastOffset] vpmaddubsw ymm3,ymm2,YMMWORD PTR [rdx+VectorOffset] vpmaddwd ymm3,ymm3,ymm12 IF ColumnCount EQ 16 vpaddd ymm4,ymm4,ymm3 vpmaddubsw ymm2,ymm2,YMMWORD PTR [rdx+VectorOffset+32] vpmaddwd ymm2,ymm2,ymm12 vpaddd ymm5,ymm5,ymm2 ELSE vpaddd ymm5,ymm5,ymm3 ENDIF ELSE vmovdqu ymm0,YMMWORD PTR [rdx+VectorOffset] EmitIfCountGE ColumnCount, 16, <vmovdqu ymm1,YMMWORD PTR [rdx+VectorOffset+32]> EmitIfCountGE RowCount, 1, <vpbroadcastd ymm2,DWORD PTR [rcx+BroadcastOffset]> EmitIfCountGE RowCount, 1, <MultiplyAccumulateRowU8S8Avx2 ColumnCount, ymm4, ymm5> EmitIfCountGE RowCount, 2, <vpbroadcastd ymm2,DWORD PTR [rcx+r9+BroadcastOffset]> EmitIfCountGE RowCount, 2, <MultiplyAccumulateRowU8S8Avx2 ColumnCount, ymm6, ymm7> EmitIfCountGE RowCount, 3, <vpbroadcastd ymm2,DWORD PTR [rcx+r9*2+BroadcastOffset]> EmitIfCountGE RowCount, 3, <MultiplyAccumulateRowU8S8Avx2 ColumnCount, ymm8, ymm9> EmitIfCountGE RowCount, 4, <vpbroadcastd ymm2,DWORD PTR [rbx+BroadcastOffset]> EmitIfCountGE RowCount, 4, <MultiplyAccumulateRowU8S8Avx2 ColumnCount, ymm10, ymm11> ENDIF ENDM ; ; Macro Description: ; ; This macro generates code to multiply and accumulator a single row of the ; output block. ; ; Arguments: ; ; ColumnCount - Supplies the number of columns to produce. ; ; Vec1Reg - Supplies the high block accumulator register (when ColumnCount ; is 16). ; ; Vec2Reg - Supplies the low block accumulator register. ; ; Implicit Arguments: ; ; ymm0 - Supplies the first vector loaded from matrix B. ; ; ymm1 - Supplies the second vector loaded from matrix B (when ColumnCount ; is 16). ; ; ymm2 - Supplies the broadcast value loaded from matrix A. ; MultiplyAccumulateRowU8S8AvxVnni MACRO ColumnCount, Vec1Reg, Vec2Reg IF ColumnCount EQ 16 VpdpbusdsYmmYmmYmm Vec1Reg,ymm2,ymm0 VpdpbusdsYmmYmmYmm Vec2Reg,ymm2,ymm1 ELSE VpdpbusdsYmmYmmYmm Vec2Reg,ymm2,ymm0 ENDIF ENDM ; ; Macro Description: ; ; This macro generates code to multiply and accumulate each row of the output ; block. ; ; Arguments: ; ; ColumnCount - Supplies the number of columns to produce. ; ; RowCount - Supplies the number of rows to produce. ; ; VectorOffset - Supplies the byte offset from matrix B to fetch elements. ; ; BroadcastOffset - Supplies the byte offset from matrix A to fetch elements. ; ; Implicit Arguments: ; ; rbx - Supplies the address into the matrix A data plus 3 rows. ; ; rcx - Supplies the address into the matrix A data. ; ; rdx - Supplies the address into the matrix B data. ; ; r9 - Supplies the length in bytes of a row from matrix A. ; ; ymm4-ymm15 - Supplies the block accumulators. ; ComputeBlockU8S8AvxVnni MACRO ColumnCount, RowCount, VectorOffset, BroadcastOffset vmovdqu ymm0,YMMWORD PTR [rdx+VectorOffset] EmitIfCountGE ColumnCount, 16, <vmovdqu ymm1,YMMWORD PTR [rdx+VectorOffset+32]> EmitIfCountGE RowCount, 1, <vpbroadcastd ymm2,DWORD PTR [rcx+BroadcastOffset]> EmitIfCountGE RowCount, 1, <MultiplyAccumulateRowU8S8AvxVnni ColumnCount, ymm4, ymm5> EmitIfCountGE RowCount, 2, <vpbroadcastd ymm2,DWORD PTR [rcx+r9+BroadcastOffset]> EmitIfCountGE RowCount, 2, <MultiplyAccumulateRowU8S8AvxVnni ColumnCount, ymm6, ymm7> EmitIfCountGE RowCount, 3, <vpbroadcastd ymm2,DWORD PTR [rcx+r9*2+BroadcastOffset]> EmitIfCountGE RowCount, 3, <MultiplyAccumulateRowU8S8AvxVnni ColumnCount, ymm8, ymm9> EmitIfCountGE RowCount, 4, <vpbroadcastd ymm2,DWORD PTR [rbx+BroadcastOffset]> EmitIfCountGE RowCount, 4, <MultiplyAccumulateRowU8S8AvxVnni ColumnCount, ymm10, ymm11> EmitIfCountGE RowCount, 5, <vpbroadcastd ymm2,DWORD PTR [rbx+r9+BroadcastOffset]> EmitIfCountGE RowCount, 5, <MultiplyAccumulateRowU8S8AvxVnni ColumnCount, ymm12, ymm13> EmitIfCountGE RowCount, 6, <vpbroadcastd ymm2,DWORD PTR [rbx+r9*2+BroadcastOffset]> EmitIfCountGE RowCount, 6, <MultiplyAccumulateRowU8S8AvxVnni ColumnCount, ymm14, ymm15> ENDM ; ; Macro Description: ; ; This macro generates code to execute the block compute macro multiple times ; and advancing the matrix A and matrix B data pointers. ; ; Arguments: ; ; Isa - Supplies the instruction set architecture string. ; ; ColumnCount - Supplies the number of columns to produce. ; ; RowCount - Supplies the number of rows to produce. ; ; Implicit Arguments: ; ; rbx - Supplies the address into the matrix A data plus 3 rows. ; ; rcx - Supplies the address into the matrix A data. ; ; rdx - Supplies the address into the matrix B data. ; ; r9 - Supplies the length in bytes of a row from matrix A. ; ; ymm4-ymm11 - Supplies the block accumulators. ; ComputeBlockLoopU8S8 MACRO Isa, ColumnCount, RowCount LOCAL ComputeBlockBy4Loop LOCAL ProcessRemainingBlocks LOCAL ComputeBlockBy1Loop LOCAL ComputeBlockLoopExit mov rsi,r9 ; reload row length remaining IF (ColumnCount EQ 16) AND (RowCount EQ 1) sub rsi,4*4 jb ProcessRemainingBlocks ComputeBlockBy4Loop: ComputeBlockU8S8&Isa& ColumnCount, RowCount, 0*64, 0 ComputeBlockU8S8&Isa& ColumnCount, RowCount, 1*64, 4 ComputeBlockU8S8&Isa& ColumnCount, RowCount, 2*64, 8 ComputeBlockU8S8&Isa& ColumnCount, RowCount, 3*64, 12 add rcx,4*4 ; advance matrix A by 4 quads add rdx,4*64 ; advance matrix B sub rsi,4*4 jae ComputeBlockBy4Loop ProcessRemainingBlocks: add rsi,4*4 ; correct for over-subtract above jz ComputeBlockLoopExit ENDIF ComputeBlockBy1Loop: ComputeBlockU8S8&Isa& ColumnCount, RowCount, 0, 0 add rcx,4 ; advance matrix A by 1 quad IF RowCount GT 3 add rbx,4 ; advance matrix A plus 3 rows by 1 quad ENDIF add rdx,64 ; advance matrix B sub rsi,4 jnz ComputeBlockBy1Loop ComputeBlockLoopExit: ENDM ; ; Macro Description: ; ; This macro generates code to multiply and accumulator a single row of the ; output block. ; ; Arguments: ; ; ColumnCount - Supplies the number of columns to produce. ; ; Vec1Reg - Supplies the high block accumulator register (when ColumnCount ; is 16). ; ; Vec2Reg - Supplies the low block accumulator register. ; ; Implicit Arguments: ; ; ymm0 - Supplies the first vector loaded from matrix B. ; ; ymm1 - Supplies the second vector loaded from matrix B (when ColumnCount ; is 16). ; ; ymm2 - Supplies the broadcast value loaded from matrix A. ; MultiplyAccumulateRowU8U8Avx2 MACRO ColumnCount, Vec1Reg, Vec2Reg vpmaddwd ymm3,ymm2,ymm0 IF ColumnCount EQ 16 vpaddd Vec1Reg,Vec1Reg,ymm3 vpmaddwd ymm2,ymm2,ymm1 vpaddd Vec2Reg,Vec2Reg,ymm2 ELSE vpaddd Vec2Reg,Vec2Reg,ymm3 ENDIF ENDM ; ; Macro Description: ; ; This macro generates code to multiply and accumulate each row of the output ; block. ; ; Arguments: ; ; ColumnCount - Supplies the number of columns to produce. ; ; RowCount - Supplies the number of rows to produce. ; ; VectorOffset - Supplies the byte offset from matrix B to fetch elements. ; ; BroadcastOffset - Supplies the byte offset from matrix A to fetch elements. ; ; Implicit Arguments: ; ; rbx - Supplies the address into the matrix A data plus 3 rows. ; ; rcx - Supplies the address into the matrix A data. ; ; rdx - Supplies the address into the matrix B data. ; ; r9 - Supplies the length in bytes of a row from matrix A. ; ; ymm4-ymm15 - Supplies the block accumulators. ; ComputeBlockU8U8Avx2 MACRO ColumnCount, RowCount, VectorOffset, BroadcastOffset vpmovzxbw ymm0,XMMWORD PTR [rdx+VectorOffset] EmitIfCountGE ColumnCount, 16, <vpmovzxbw ymm1,XMMWORD PTR [rdx+VectorOffset+16]> EmitIfCountGE RowCount, 1, <vpbroadcastd ymm2,DWORD PTR [rcx+BroadcastOffset]> EmitIfCountGE RowCount, 1, <MultiplyAccumulateRowU8U8Avx2 ColumnCount, ymm4, ymm5> EmitIfCountGE RowCount, 2, <vpbroadcastd ymm2,DWORD PTR [rcx+r9+BroadcastOffset]> EmitIfCountGE RowCount, 2, <MultiplyAccumulateRowU8U8Avx2 ColumnCount, ymm6, ymm7> EmitIfCountGE RowCount, 3, <vpbroadcastd ymm2,DWORD PTR [rcx+r9*2+BroadcastOffset]> EmitIfCountGE RowCount, 3, <MultiplyAccumulateRowU8U8Avx2 ColumnCount, ymm8, ymm9> EmitIfCountGE RowCount, 4, <vpbroadcastd ymm2,DWORD PTR [rbx+BroadcastOffset]> EmitIfCountGE RowCount, 4, <MultiplyAccumulateRowU8U8Avx2 ColumnCount, ymm10, ymm11> EmitIfCountGE RowCount, 5, <vpbroadcastd ymm2,DWORD PTR [rbx+r9+BroadcastOffset]> EmitIfCountGE RowCount, 5, <MultiplyAccumulateRowU8U8Avx2 ColumnCount, ymm12, ymm13> EmitIfCountGE RowCount, 6, <vpbroadcastd ymm2,DWORD PTR [rbx+r9*2+BroadcastOffset]> EmitIfCountGE RowCount, 6, <MultiplyAccumulateRowU8U8Avx2 ColumnCount, ymm14, ymm15> ENDM ; ; Macro Description: ; ; This macro generates code to execute the block compute macro multiple times ; and advancing the matrix A and matrix B data pointers. ; ; Arguments: ; ; Isa - Supplies the instruction set architecture string. ; ; ColumnCount - Supplies the number of columns to produce. ; ; RowCount - Supplies the number of rows to produce. ; ; Implicit Arguments: ; ; rbx - Supplies the address into the matrix A data plus 3 rows. ; ; rcx - Supplies the address into the matrix A data. ; ; rdx - Supplies the address into the matrix B data. ; ; r9 - Supplies the length in bytes of a row from matrix A. ; ; ymm4-ymm15 - Supplies the block accumulators. ; ComputeBlockLoopU8U8 MACRO Isa, ColumnCount, RowCount LOCAL ComputeBlockBy2Loop LOCAL ProcessRemainingBlocks LOCAL ComputeBlockBy1Loop LOCAL ExitComputeBlockLoop mov rsi,r9 ; reload row length remaining IF (ColumnCount EQ 16) AND ((RowCount AND 1) EQ 0) sub rsi,2*4 jb ProcessRemainingBlocks ComputeBlockBy2Loop: ComputeBlockU8U8&Isa& ColumnCount, RowCount, 0, 0 ComputeBlockU8U8&Isa& ColumnCount, RowCount, 32, 4 add rcx,2*4 ; advance matrix A by 2 pairs IF RowCount GT 3 add rbx,2*4 ; advance matrix A plus 3 rows by 2 pairs ENDIF add rdx,2*32 ; advance matrix B sub rsi,2*4 jae ComputeBlockBy2Loop ProcessRemainingBlocks: add rsi,2*4 ; correct for over-subtract above jz ExitComputeBlockLoop ComputeBlockU8U8&Isa& ColumnCount, RowCount, 0, 0 add rdx,32 ; advance matrix B ELSE ComputeBlockBy1Loop: ComputeBlockU8U8&Isa& ColumnCount, RowCount, 0, 0 add rcx,4 ; advance matrix A by 1 pair IF RowCount GT 3 add rbx,4 ; advance matrix A plus 3 rows by 1 pair ENDIF add rdx,32 ; advance matrix B sub rsi,4 jnz ComputeBlockBy1Loop ENDIF ExitComputeBlockLoop: ENDM ; ; Macro Description: ; ; This macro generates code to produce an output block for a set of columns ; and rows. ; ; Arguments: ; ; ColumnCount - Supplies the number of columns to produce. ; ; RowCount - Supplies the number of rows to produce. ; ; Implicit Arguments: ; ; rax - Supplies the length in bytes of a row from matrix C. ; ; rcx - Supplies the address into the matrix A data. ; ; rdx - Supplies the address into the matrix B data. ; ; r9 - Supplies the length in bytes of a row from matrix A. ; ; r11 - Supplies the address of the row sum buffer. ; ; r12 - Supplies the address of the column sum buffer. ; ; r13 - Optionally supplies the address of the matrix B zero point buffer. ; ; ymm4-ymm15 - Supplies the block accumulators. ; ProduceOutputBlock MACRO ColumnCount, RowCount LOCAL SkipScaleByZeroPointB LOCAL AccumulatorsInitialized LOCAL ProduceWithU8S8AvxVnni LOCAL ProduceWithU8U8Avx2 LOCAL ExitProduceOutputBlock ; ; Initialize the accumulators with the row and column sums. ; EmitIfCountGE RowCount, 1, <vpbroadcastd ymm5,DWORD PTR [r11]> EmitIfCountGE RowCount, 2, <vpbroadcastd ymm7,DWORD PTR [r11+4]> EmitIfCountGE RowCount, 3, <vpbroadcastd ymm9,DWORD PTR [r11+8]> EmitIfCountGE RowCount, 4, <vpbroadcastd ymm11,DWORD PTR [r11+12]> EmitIfCountGE RowCount, 5, <vpbroadcastd ymm13,DWORD PTR [r11+16]> EmitIfCountGE RowCount, 6, <vpbroadcastd ymm15,DWORD PTR [r11+20]> IF ColumnCount EQ 16 vmovdqu ymm0,YMMWORD PTR [r12] vmovdqu ymm1,YMMWORD PTR [r12+32] add r12,16*4 ; advance ColumnSumBuffer by 16 columns ELSE vmovdqu ymm1,YMMWORD PTR [r12] ENDIF test r13,r13 ; per column zero points? jz SkipScaleByZeroPointB IF ColumnCount EQ 16 vmovdqu ymm2,YMMWORD PTR [r13] vmovdqu ymm3,YMMWORD PTR [r13+32] add r13,16*4 ; advance ZeroPointB by 16 columns ELSE vmovdqu ymm3,YMMWORD PTR [r13] ENDIF EmitIfCount2GE RowCount, 1, ColumnCount, 16, <vpmulld ymm4,ymm5,ymm2> EmitIfCountGE RowCount, 1, <vpmulld ymm5,ymm5,ymm3> EmitIfCount2GE RowCount, 1, ColumnCount, 16, <vpaddd ymm4,ymm0,ymm4> EmitIfCountGE RowCount, 1, <vpaddd ymm5,ymm1,ymm5> EmitIfCount2GE RowCount, 2, ColumnCount, 16, <vpmulld ymm6,ymm7,ymm2> EmitIfCountGE RowCount, 2, <vpmulld ymm7,ymm7,ymm3> EmitIfCount2GE RowCount, 2, ColumnCount, 16, <vpaddd ymm6,ymm0,ymm6> EmitIfCountGE RowCount, 2, <vpaddd ymm7,ymm1,ymm7> EmitIfCount2GE RowCount, 3, ColumnCount, 16, <vpmulld ymm8,ymm9,ymm2> EmitIfCountGE RowCount, 3, <vpmulld ymm9,ymm9,ymm3> EmitIfCount2GE RowCount, 3, ColumnCount, 16, <vpaddd ymm8,ymm0,ymm8> EmitIfCountGE RowCount, 3, <vpaddd ymm9,ymm1,ymm9> EmitIfCount2GE RowCount, 4, ColumnCount, 16, <vpmulld ymm10,ymm11,ymm2> EmitIfCountGE RowCount, 4, <vpmulld ymm11,ymm11,ymm3> EmitIfCount2GE RowCount, 4, ColumnCount, 16, <vpaddd ymm10,ymm0,ymm10> EmitIfCountGE RowCount, 4, <vpaddd ymm11,ymm1,ymm11> EmitIfCount2GE RowCount, 5, ColumnCount, 16, <vpmulld ymm12,ymm13,ymm2> EmitIfCountGE RowCount, 5, <vpmulld ymm13,ymm13,ymm3> EmitIfCount2GE RowCount, 5, ColumnCount, 16, <vpaddd ymm12,ymm0,ymm12> EmitIfCountGE RowCount, 5, <vpaddd ymm13,ymm1,ymm13> EmitIfCount2GE RowCount, 6, ColumnCount, 16, <vpmulld ymm14,ymm15,ymm2> EmitIfCountGE RowCount, 6, <vpmulld ymm15,ymm15,ymm3> EmitIfCount2GE RowCount, 6, ColumnCount, 16, <vpaddd ymm14,ymm0,ymm14> EmitIfCountGE RowCount, 6, <vpaddd ymm15,ymm1,ymm15> jmp AccumulatorsInitialized SkipScaleByZeroPointB: EmitIfCount2GE RowCount, 1, ColumnCount, 16, <vpaddd ymm4,ymm0,ymm5> EmitIfCountGE RowCount, 1, <vpaddd ymm5,ymm1,ymm5> EmitIfCount2GE RowCount, 2, ColumnCount, 16, <vpaddd ymm6,ymm0,ymm7> EmitIfCountGE RowCount, 2, <vpaddd ymm7,ymm1,ymm7> EmitIfCount2GE RowCount, 3, ColumnCount, 16, <vpaddd ymm8,ymm0,ymm9> EmitIfCountGE RowCount, 3, <vpaddd ymm9,ymm1,ymm9> EmitIfCount2GE RowCount, 4, ColumnCount, 16, <vpaddd ymm10,ymm0,ymm11> EmitIfCountGE RowCount, 4, <vpaddd ymm11,ymm1,ymm11> EmitIfCount2GE RowCount, 5, ColumnCount, 16, <vpaddd ymm12,ymm0,ymm13> EmitIfCountGE RowCount, 5, <vpaddd ymm13,ymm1,ymm13> EmitIfCount2GE RowCount, 6, ColumnCount, 16, <vpaddd ymm14,ymm0,ymm15> EmitIfCountGE RowCount, 6, <vpaddd ymm15,ymm1,ymm15> AccumulatorsInitialized: ; ; Iterate over the length of a matrix A row to produce the output accumulators. ; IF RowCount GT 3 lea rbx,[r9*2+r9] add rbx,rcx ; compute matrix A plus 3 rows ENDIF cmp DWORD PTR GemmU8X8KernelFrame.PreviousP1Home[rsp],0 jg ProduceWithU8U8Avx2 IF RowCount LE 4 jl ProduceWithU8S8AvxVnni ComputeBlockLoopU8S8 Avx2, ColumnCount, RowCount jmp ExitProduceOutputBlock ENDIF ProduceWithU8S8AvxVnni: ComputeBlockLoopU8S8 AvxVnni, ColumnCount, RowCount jmp ExitProduceOutputBlock ProduceWithU8U8Avx2: ComputeBlockLoopU8U8 Avx2, ColumnCount, RowCount ExitProduceOutputBlock: IF RowCount GT 3 lea rbx,[rax*2+rax] add rbx,r8 ; compute matrix C plus 3 rows ENDIF ENDM ; ; Macro Description: ; ; This macro generates code to compute matrix multiplication for a fixed set ; of rows. ; ; Arguments: ; ; RowCount - Supplies the number of rows to process. ; ; Implicit Arguments: ; ; rax - Supplies the length in bytes of a row from matrix C. ; ; rcx - Supplies the address of matrix A. ; ; rdx - Supplies the address of matrix B. ; ; r8 - Supplies the address of matrix C. ; ; rdi - Supplies the address of matrix A. ; ; rbp - Supplies the number of columns from matrix B and matrix C to iterate ; over. ; ; r9 - Supplies the length in bytes of a row from matrix A. ; ; r10b - Supplies the zero mode flag. ; ; r11 - Supplies the address of the row sum buffer. ; ; r12 - Supplies the address of the column sum buffer. ; ; r13 - Optionally supplies the address of the matrix B zero point buffer. ; ProcessCountM MACRO RowCount, Fallthrough LOCAL ProcessNextColumnLoop16xN LOCAL SkipAccumulateOutput16xNBlock LOCAL OutputMasked16xNBlock LOCAL ExitProcessCountM LOCAL ProcessRemainingCountN LOCAL SkipAccumulateOutput8xNBlock LOCAL SkipAccumulateOutputMasked16xNBlock LOCAL OutputMasked8xNBlock LOCAL SkipAccumulateOutputMasked8xNBlock cmp rbp,8 jbe ProcessRemainingCountN ProcessNextColumnLoop16xN: ProduceOutputBlock 16, RowCount sub rbp,16 jb OutputMasked16xNBlock test r10b,r10b ; ZeroMode? jnz SkipAccumulateOutput16xNBlock EmitIfCountGE RowCount, 1, <vpaddd ymm4,ymm4,YMMWORD PTR [r8]> EmitIfCountGE RowCount, 1, <vpaddd ymm5,ymm5,YMMWORD PTR [r8+32]> EmitIfCountGE RowCount, 2, <vpaddd ymm6,ymm6,YMMWORD PTR [r8+rax]> EmitIfCountGE RowCount, 2, <vpaddd ymm7,ymm7,YMMWORD PTR [r8+rax+32]> EmitIfCountGE RowCount, 3, <vpaddd ymm8,ymm8,YMMWORD PTR [r8+rax*2]> EmitIfCountGE RowCount, 3, <vpaddd ymm9,ymm9,YMMWORD PTR [r8+rax*2+32]> EmitIfCountGE RowCount, 4, <vpaddd ymm10,ymm10,YMMWORD PTR [rbx]> EmitIfCountGE RowCount, 4, <vpaddd ymm11,ymm11,YMMWORD PTR [rbx+32]> EmitIfCountGE RowCount, 5, <vpaddd ymm12,ymm12,YMMWORD PTR [rbx+rax]> EmitIfCountGE RowCount, 5, <vpaddd ymm13,ymm13,YMMWORD PTR [rbx+rax+32]> EmitIfCountGE RowCount, 6, <vpaddd ymm14,ymm14,YMMWORD PTR [rbx+rax*2]> EmitIfCountGE RowCount, 6, <vpaddd ymm15,ymm15,YMMWORD PTR [rbx+rax*2+32]> SkipAccumulateOutput16xNBlock: EmitIfCountGE RowCount, 1, <vmovdqu YMMWORD PTR [r8],ymm4> EmitIfCountGE RowCount, 1, <vmovdqu YMMWORD PTR [r8+32],ymm5> EmitIfCountGE RowCount, 2, <vmovdqu YMMWORD PTR [r8+rax],ymm6> EmitIfCountGE RowCount, 2, <vmovdqu YMMWORD PTR [r8+rax+32],ymm7> EmitIfCountGE RowCount, 3, <vmovdqu YMMWORD PTR [r8+rax*2],ymm8> EmitIfCountGE RowCount, 3, <vmovdqu YMMWORD PTR [r8+rax*2+32],ymm9> EmitIfCountGE RowCount, 4, <vmovdqu YMMWORD PTR [rbx],ymm10> EmitIfCountGE RowCount, 4, <vmovdqu YMMWORD PTR [rbx+32],ymm11> EmitIfCountGE RowCount, 5, <vmovdqu YMMWORD PTR [rbx+rax],ymm12> EmitIfCountGE RowCount, 5, <vmovdqu YMMWORD PTR [rbx+rax+32],ymm13> EmitIfCountGE RowCount, 6, <vmovdqu YMMWORD PTR [rbx+rax*2],ymm14> EmitIfCountGE RowCount, 6, <vmovdqu YMMWORD PTR [rbx+rax*2+32],ymm15> add r8,16*4 ; advance matrix C by 16 columns mov rcx,rdi ; reload matrix A cmp rbp,8 ja ProcessNextColumnLoop16xN test rbp,rbp jnz ProcessRemainingCountN ExitProcessCountM: mov eax,RowCount jmp ExitKernel ProcessRemainingCountN: ProduceOutputBlock 8, RowCount cmp rbp,8 jb OutputMasked8xNBlock test r10b,r10b ; ZeroMode? jnz SkipAccumulateOutput8xNBlock EmitIfCountGE RowCount, 1, <vpaddd ymm5,ymm5,YMMWORD PTR [r8]> EmitIfCountGE RowCount, 2, <vpaddd ymm7,ymm7,YMMWORD PTR [r8+rax]> EmitIfCountGE RowCount, 3, <vpaddd ymm9,ymm9,YMMWORD PTR [r8+rax*2]> EmitIfCountGE RowCount, 4, <vpaddd ymm11,ymm11,YMMWORD PTR [rbx]> EmitIfCountGE RowCount, 5, <vpaddd ymm13,ymm13,YMMWORD PTR [rbx+rax]> EmitIfCountGE RowCount, 6, <vpaddd ymm15,ymm15,YMMWORD PTR [rbx+rax*2]> SkipAccumulateOutput8xNBlock: EmitIfCountGE RowCount, 1, <vmovdqu YMMWORD PTR [r8],ymm5> EmitIfCountGE RowCount, 2, <vmovdqu YMMWORD PTR [r8+rax],ymm7> EmitIfCountGE RowCount, 3, <vmovdqu YMMWORD PTR [r8+rax*2],ymm9> EmitIfCountGE RowCount, 4, <vmovdqu YMMWORD PTR [rbx],ymm11> EmitIfCountGE RowCount, 5, <vmovdqu YMMWORD PTR [rbx+rax],ymm13> EmitIfCountGE RowCount, 6, <vmovdqu YMMWORD PTR [rbx+rax*2],ymm15> jmp ExitProcessCountM OutputMasked16xNBlock: test r10b,r10b ; ZeroMode? jnz SkipAccumulateOutputMasked16xNBlock EmitIfCountGE RowCount, 1, <vpaddd ymm4,ymm4,YMMWORD PTR [r8]> EmitIfCountGE RowCount, 2, <vpaddd ymm6,ymm6,YMMWORD PTR [r8+rax]> EmitIfCountGE RowCount, 3, <vpaddd ymm8,ymm8,YMMWORD PTR [r8+rax*2]> EmitIfCountGE RowCount, 4, <vpaddd ymm10,ymm10,YMMWORD PTR [rbx]> EmitIfCountGE RowCount, 5, <vpaddd ymm12,ymm12,YMMWORD PTR [rbx+rax]> EmitIfCountGE RowCount, 6, <vpaddd ymm14,ymm14,YMMWORD PTR [rbx+rax*2]> SkipAccumulateOutputMasked16xNBlock: EmitIfCountGE RowCount, 1, <vmovdqu YMMWORD PTR [r8],ymm4> EmitIfCountGE RowCount, 2, <vmovdqu YMMWORD PTR [r8+rax],ymm6> EmitIfCountGE RowCount, 3, <vmovdqu YMMWORD PTR [r8+rax*2],ymm8> EmitIfCountGE RowCount, 4, <vmovdqu YMMWORD PTR [rbx],ymm10> EmitIfCountGE RowCount, 5, <vmovdqu YMMWORD PTR [rbx+rax],ymm12> EmitIfCountGE RowCount, 6, <vmovdqu YMMWORD PTR [rbx+rax*2],ymm14> add r8,8*4 ; advance matrix C by 8 columns IF RowCount GT 3 add rbx,8*4 ; advance matrix C plus 3 rows by 8 columns ENDIF add rbp,8 ; correct for over-subtract above OutputMasked8xNBlock: neg rbp lea rcx,MlasMaskMoveTableAvx+8*4 vmovdqu ymm0,YMMWORD PTR [rcx+rbp*4] test r10b,r10b ; ZeroMode? jnz SkipAccumulateOutputMasked8xNBlock EmitIfCountGE RowCount, 1, <vpmaskmovd ymm4,ymm0,YMMWORD PTR [r8]> EmitIfCountGE RowCount, 2, <vpmaskmovd ymm6,ymm0,YMMWORD PTR [r8+rax]> EmitIfCountGE RowCount, 3, <vpmaskmovd ymm8,ymm0,YMMWORD PTR [r8+rax*2]> EmitIfCountGE RowCount, 4, <vpmaskmovd ymm10,ymm0,YMMWORD PTR [rbx]> EmitIfCountGE RowCount, 5, <vpmaskmovd ymm12,ymm0,YMMWORD PTR [rbx+rax]> EmitIfCountGE RowCount, 6, <vpmaskmovd ymm14,ymm0,YMMWORD PTR [rbx+rax*2]> EmitIfCountGE RowCount, 1, <vpaddd ymm5,ymm5,ymm4> EmitIfCountGE RowCount, 2, <vpaddd ymm7,ymm7,ymm6> EmitIfCountGE RowCount, 3, <vpaddd ymm9,ymm9,ymm8> EmitIfCountGE RowCount, 4, <vpaddd ymm11,ymm11,ymm10> EmitIfCountGE RowCount, 5, <vpaddd ymm13,ymm13,ymm12> EmitIfCountGE RowCount, 6, <vpaddd ymm15,ymm15,ymm14> SkipAccumulateOutputMasked8xNBlock: EmitIfCountGE RowCount, 1, <vpmaskmovd YMMWORD PTR [r8],ymm0,ymm5> EmitIfCountGE RowCount, 2, <vpmaskmovd YMMWORD PTR [r8+rax],ymm0,ymm7> EmitIfCountGE RowCount, 3, <vpmaskmovd YMMWORD PTR [r8+rax*2],ymm0,ymm9> EmitIfCountGE RowCount, 4, <vpmaskmovd YMMWORD PTR [rbx],ymm0,ymm11> EmitIfCountGE RowCount, 5, <vpmaskmovd YMMWORD PTR [rbx+rax],ymm0,ymm13> EmitIfCountGE RowCount, 6, <vpmaskmovd YMMWORD PTR [rbx+rax*2],ymm0,ymm15> jmp ExitProcessCountM ENDM ; ; Reduce code size for the various types of kernels by sharing the outer logic ; and switching on the selector codes (using sign bit to discriminate). ; LEAF_ENTRY MlasGemmU8S8KernelAvxVnni, _TEXT mov eax,-1 jmp MlasGemmU8X8KernelAvx2 LEAF_END MlasGemmU8S8KernelAvxVnni, _TEXT LEAF_ENTRY MlasGemmU8U8KernelAvx2, _TEXT mov eax,1 jmp MlasGemmU8X8KernelAvx2 LEAF_END MlasGemmU8U8KernelAvx2, _TEXT LEAF_ENTRY MlasGemmU8S8KernelAvx2, _TEXT xor eax,eax jmp MlasGemmU8X8KernelAvx2 LEAF_END MlasGemmU8S8KernelAvx2, _TEXT ;++ ; ; Routine Description: ; ; This routine is an inner kernel to compute matrix multiplication for a ; set of rows. ; ; Arguments: ; ; A (rcx) - Supplies the address of matrix A. The matrix data has been packed ; using MlasGemmU8X8CopyPackAAvx2. ; ; B (rdx) - Supplies the address of matrix B. The matrix data has been packed ; using MlasGemmU8X8CopyPackBAvx2. ; ; C (r8) - Supplies the address of matrix C. ; ; PackedCountK (r9) - Supplies the number of packed columns from matrix A and ; the number of packed rows from matrix B to iterate over. ; ; CountM - Supplies the maximum number of rows that can be processed for ; matrix A and matrix C. The actual number of rows handled for this ; invocation depends on the kernel implementation. ; ; CountN - Supplies the number of columns from matrix B and matrix C to iterate ; over. ; ; ldc - Supplies the first dimension of matrix C. ; ; RowSumBuffer - Supplies the sum of each row from matrix A. These values have ; been pre-scaled by the zero point offset of matrix B if the offset is ; per-tensor (ZeroPointB is nullptr). Otherwise, these values must be ; scaled by the per-column zero point offsets of matrix B. These values are ; accumulated into every row of matrix C. ; ; ColumnSumBuffer - Supplies the sum of each column from matrix B multiplied ; by the zero point offset of matrix A. These values are accumulated into ; every column of matrix C. ; ; ZeroPointB - Optionally supplies the per-column zero point offsets of matrix ; B, else nullptr if the matrix B is using per-tensor quantization. ; ; ZeroMode - Supplies true if the output matrix must be zero initialized, ; else false if the output matrix is accumulated into. ; ; Return Value: ; ; Returns the number of rows handled. ; ;-- NESTED_ENTRY MlasGemmU8X8KernelAvx2, _TEXT rex_push_reg rbp push_reg rbx push_reg rsi push_reg rdi push_reg r12 push_reg r13 alloc_stack (GemmU8X8KernelFrame.SavedR13) save_xmm128 xmm6,GemmU8X8KernelFrame.SavedXmm6 save_xmm128 xmm7,GemmU8X8KernelFrame.SavedXmm7 save_xmm128 xmm8,GemmU8X8KernelFrame.SavedXmm8 save_xmm128 xmm9,GemmU8X8KernelFrame.SavedXmm9 save_xmm128 xmm10,GemmU8X8KernelFrame.SavedXmm10 save_xmm128 xmm11,GemmU8X8KernelFrame.SavedXmm11 save_xmm128 xmm12,GemmU8X8KernelFrame.SavedXmm12 save_xmm128 xmm13,GemmU8X8KernelFrame.SavedXmm13 save_xmm128 xmm14,GemmU8X8KernelFrame.SavedXmm14 save_xmm128 xmm15,GemmU8X8KernelFrame.SavedXmm15 END_PROLOGUE mov DWORD PTR GemmU8X8KernelFrame.PreviousP1Home[rsp],eax mov rdi,rcx mov rbx,GemmU8X8KernelFrame.CountM[rsp] mov rbp,GemmU8X8KernelFrame.CountN[rsp] mov rax,GemmU8X8KernelFrame.ldc[rsp] shl rax,2 ; convert ldc to bytes shl r9,2 ; convert to row length movzx r10,BYTE PTR GemmU8X8KernelFrame.ZeroMode[rsp] mov r11,GemmU8X8KernelFrame.RowSumBuffer[rsp] mov r12,GemmU8X8KernelFrame.ColumnSumBuffer[rsp] mov r13,GemmU8X8KernelFrame.ZeroPointB[rsp] vpcmpeqw ymm12,ymm12,ymm12 ; generate 256-bit word vector [0xFFFF] vpsrlw ymm12,ymm12,15 ; generate 256-bit word vector [0x0001] cmp DWORD PTR GemmU8X8KernelFrame.PreviousP1Home[rsp],0 je CheckCountM4OrMore ; U8S8 AVX2 kernel requires extra registers ; ; Process CountM rows of the matrices. ; CheckCountM6OrMore: cmp rbx,5 ja ProcessCountM6 je ProcessCountM5 CheckCountM4OrMore: cmp rbx,3 ja ProcessCountM4 je ProcessCountM3 cmp rbx,1 je ProcessCountM1 ProcessCountM2: ProcessCountM 2 ProcessCountM4: ProcessCountM 4 ProcessCountM6: ProcessCountM 6 ; ; Restore non-volatile registers and return. ; ExitKernel: vzeroupper movaps xmm6,GemmU8X8KernelFrame.SavedXmm6[rsp] movaps xmm7,GemmU8X8KernelFrame.SavedXmm7[rsp] movaps xmm8,GemmU8X8KernelFrame.SavedXmm8[rsp] movaps xmm9,GemmU8X8KernelFrame.SavedXmm9[rsp] movaps xmm10,GemmU8X8KernelFrame.SavedXmm10[rsp] movaps xmm11,GemmU8X8KernelFrame.SavedXmm11[rsp] movaps xmm12,GemmU8X8KernelFrame.SavedXmm12[rsp] movaps xmm13,GemmU8X8KernelFrame.SavedXmm13[rsp] movaps xmm14,GemmU8X8KernelFrame.SavedXmm14[rsp] movaps xmm15,GemmU8X8KernelFrame.SavedXmm15[rsp] add rsp,(GemmU8X8KernelFrame.SavedR13) BEGIN_EPILOGUE pop r13 pop r12 pop rdi pop rsi pop rbx pop rbp ret ProcessCountM1: ProcessCountM 1 ProcessCountM3: ProcessCountM 3 ProcessCountM5: ProcessCountM 5 NESTED_END MlasGemmU8X8KernelAvx2, _TEXT END
other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/risc.lzh/risc/join/c-select-p.asm
prismotizm/gigaleak
0
22758
Name: c-select-p.asm Type: file Size: 42177 Last-Modified: '1992-07-30T05:00:34Z' SHA-1: 13459E13FF9D7FEC0C06027D1C398CE71317A34E Description: null