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 |
|---|---|---|---|---|
tests/test_main.adb | jonashaggstrom/ada-canopen | 6 | 9213 | with AUnit.Reporter.Text;
with AUnit.Run;
with Unit_Tests;
with Ada.Text_IO;
procedure Test_Main is
procedure Runner is new AUnit.Run.Test_Runner (Unit_Tests.Suite);
Reporter : AUnit.Reporter.Text.Text_Reporter;
begin
Ada.Text_IO.Put_Line ("Running...");
Runner (Reporter);
end Test_Main;
|
asm_x86_64/vector.asm | msimms/LibMath | 2 | 25589 | <reponame>msimms/LibMath<filename>asm_x86_64/vector.asm
; by <NAME>
; Copyright (c) 2018 <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.
global _VectorMultiply
global _VectorSubtract
global _VectorDot
global _VectorLength
global _VectorNormalize
global _VectorCross
section .text
; double vectorMultiply(const double* A, const double* B, size_t vecLen)
_VectorMultiply:
push rbp
mov rbp, rsp
mov rax, $0
ret
; void vectorSubtract(const double* A, const double* B, double* C, size_t vecLen)
_VectorSubtract:
push rbp
mov rbp, rsp
ret
; double vectorDot(const double* A, const double* B, size_t vecLen)
_VectorDot:
push rbp
mov rbp, rsp
mov rax, $0
ret
; double vectorLength(const double* A, size_t vecLen)
_VectorLength:
push rbp
mov rbp, rsp
mov rax, $0
ret
; void vectorNormalize(double* A, size_t vecLen)
_VectorNormalize:
push rbp
mov rbp, rsp
ret
; void vectorCross(const double* A, const double* B, double* C, size_t vecLen)
_VectorCross:
push rbp
mov rbp, rsp
ret
|
src/sys/encoders/util-encoders-aes.ads | RREE/ada-util | 60 | 2396 | -----------------------------------------------------------------------
-- util-encoders-aes -- AES encryption and decryption
-- Copyright (C) 2017, 2019, 2020 <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 Interfaces;
private with Ada.Finalization;
-- The <b>Util.Encodes.SHA1</b> package generates SHA-1 hash according to
-- RFC3174 or [FIPS-180-1].
package Util.Encoders.AES is
type AES_Mode is (ECB, CBC, PCBC, CFB, OFB, CTR);
type AES_Padding is (NO_PADDING, ZERO_PADDING, PKCS7_PADDING);
type Key_Type is private;
-- ------------------------------
-- ------------------------------
subtype Block_Type is Ada.Streams.Stream_Element_Array (1 .. 16);
AES_128_Length : constant := 16;
AES_192_Length : constant := 24;
AES_256_Length : constant := 32;
subtype AES_128_Key is Ada.Streams.Stream_Element_Array (1 .. 16);
subtype AES_192_Key is Ada.Streams.Stream_Element_Array (1 .. 24);
subtype AES_256_Key is Ada.Streams.Stream_Element_Array (1 .. 32);
-- Align the size on an AES block size.
function Align (Size : in Ada.Streams.Stream_Element_Offset)
return Ada.Streams.Stream_Element_Offset is
(Block_Type'Length * ((Size + Block_Type'Length - 1) / Block_Type'Length));
type Word_Block_Type is array (1 .. 4) of Interfaces.Unsigned_32;
procedure Set_Encrypt_Key (Key : out Key_Type;
Data : in Secret_Key)
with Pre => Data.Length = 16 or Data.Length = 24 or Data.Length = 32;
procedure Set_Decrypt_Key (Key : out Key_Type;
Data : in Secret_Key)
with Pre => Data.Length = 16 or Data.Length = 24 or Data.Length = 32;
procedure Encrypt (Data : in out Word_Block_Type;
Key : in Key_Type);
procedure Encrypt (Input : in Block_Type;
Output : out Block_Type;
Key : in Key_Type);
procedure Encrypt (Input : in Word_Block_Type;
Output : out Word_Block_Type;
Key : in Key_Type);
procedure Encrypt (Input : in Ada.Streams.Stream_Element_Array;
Output : out Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset;
Key : in Key_Type);
procedure Decrypt (Input : in Block_Type;
Output : out Block_Type;
Key : in Key_Type);
procedure Decrypt (Input : in Word_Block_Type;
Output : out Word_Block_Type;
Key : in Key_Type);
type Cipher is tagged limited private;
-- Set the encryption initialization vector before starting the encryption.
procedure Set_IV (E : in out Cipher;
IV : in Word_Block_Type);
procedure Set_IV (E : in out Cipher;
Key : in Secret_Key)
with Pre => Key.Length = 16;
procedure Set_IV (E : in out Cipher;
Key : in Secret_Key;
IV : in Word_Block_Type);
-- Set the padding.
procedure Set_Padding (E : in out Cipher;
Padding : in AES_Padding);
-- Get the padding used.
function Padding (E : in Cipher) return AES_Padding;
-- Return true if the cipher has a encryption/decryption key configured.
function Has_Key (E : in Cipher) return Boolean;
-- ------------------------------
-- AES encoder
-- ------------------------------
-- This <b>Encoder</b> translates the (binary) input stream into
-- an SHA1 hexadecimal stream. The encoding alphabet is: 0123456789ABCDEF.
type Encoder is new Cipher and Util.Encoders.Transformer with private;
-- Set the encryption key to use.
procedure Set_Key (E : in out Encoder;
Data : in Secret_Key;
Mode : in AES_Mode := CBC);
-- Encodes the binary input stream represented by <b>Data</b> into
-- an SHA-1 hash output stream <b>Into</b>.
--
-- If the transformer does not have enough room to write the result,
-- it must return in <b>Encoded</b> the index of the last encoded
-- position in the <b>Data</b> stream.
--
-- The transformer returns in <b>Last</b> the last valid position
-- in the output stream <b>Into</b>.
--
-- The <b>Encoding_Error</b> exception is raised if the input
-- stream cannot be transformed.
overriding
procedure Transform (E : in out Encoder;
Data : in Ada.Streams.Stream_Element_Array;
Into : out Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset;
Encoded : out Ada.Streams.Stream_Element_Offset) with
Pre => E.Has_Key;
-- Finish encoding the input array.
overriding
procedure Finish (E : in out Encoder;
Into : in out Ada.Streams.Stream_Element_Array;
Last : in out Ada.Streams.Stream_Element_Offset) with
Pre => E.Has_Key and Into'Length >= Block_Type'Length,
Post => Last = Into'First - 1 or Last = Into'First + Block_Type'Length - 1;
-- Encrypt the secret using the encoder and return the encrypted value in the buffer.
-- The target buffer must be a multiple of 16-bytes block.
procedure Encrypt_Secret (E : in out Encoder;
Secret : in Secret_Key;
Into : out Ada.Streams.Stream_Element_Array) with
Pre => Into'Length mod 16 = 0 and
(case E.Padding is
when NO_PADDING => Secret.Length = Into'Length,
when PKCS7_PADDING | ZERO_PADDING => 16 * (1 + (Secret.Length / 16)) = Into'Length);
-- ------------------------------
-- AES encoder
-- ------------------------------
-- This <b>Encoder</b> translates the (binary) input stream into
-- an SHA1 hexadecimal stream. The encoding alphabet is: 0123456789ABCDEF.
type Decoder is new Cipher and Util.Encoders.Transformer with private;
-- Set the decryption key to use.
procedure Set_Key (E : in out Decoder;
Data : in Secret_Key;
Mode : in AES_Mode := CBC);
-- Encodes the binary input stream represented by <b>Data</b> into
-- an SHA-1 hash output stream <b>Into</b>.
--
-- If the transformer does not have enough room to write the result,
-- it must return in <b>Encoded</b> the index of the last encoded
-- position in the <b>Data</b> stream.
--
-- The transformer returns in <b>Last</b> the last valid position
-- in the output stream <b>Into</b>.
--
-- The <b>Encoding_Error</b> exception is raised if the input
-- stream cannot be transformed.
overriding
procedure Transform (E : in out Decoder;
Data : in Ada.Streams.Stream_Element_Array;
Into : out Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset;
Encoded : out Ada.Streams.Stream_Element_Offset) with
Pre => E.Has_Key;
-- Finish encoding the input array.
overriding
procedure Finish (E : in out Decoder;
Into : in out Ada.Streams.Stream_Element_Array;
Last : in out Ada.Streams.Stream_Element_Offset);
-- Decrypt the content using the decoder and build the secret key.
procedure Decrypt_Secret (E : in out Decoder;
Data : in Ada.Streams.Stream_Element_Array;
Secret : in out Secret_Key) with
Pre => Data'Length mod 16 = 0 and
(case E.Padding is
when NO_PADDING => Secret.Length = Data'Length,
when PKCS7_PADDING | ZERO_PADDING => 16 * (1 + (Secret.Length / 16)) = Data'Length);
private
use Interfaces;
subtype Count_Type is Ada.Streams.Stream_Element_Offset range 0 .. 16;
type Block_Key is array (0 .. 59) of Unsigned_32;
type Key_Type is record
Key : Block_Key := (others => 0);
Rounds : Natural := 0;
end record;
type Cipher is limited new Ada.Finalization.Limited_Controlled with record
IV : Word_Block_Type := (others => 0);
Key : Key_Type;
Mode : AES_Mode := CBC;
Padding : AES_Padding := PKCS7_PADDING;
Data_Count : Count_Type := 0;
Data : Block_Type;
Data2 : Block_Type;
end record;
overriding
procedure Finalize (Object : in out Cipher);
type Encoder is new Cipher and Util.Encoders.Transformer with null record;
type Decoder is new Cipher and Util.Encoders.Transformer with null record;
end Util.Encoders.AES;
|
src/SingleSorted/AlgebraicTheory.agda | cilinder/formaltt | 21 | 4602 | <gh_stars>10-100
open import Agda.Primitive using (lzero; lsuc; _⊔_)
open import Agda.Builtin.Nat
open import Relation.Binary.PropositionalEquality using (_≡_; refl)
open import Data.Fin
open import Relation.Binary
module SingleSorted.AlgebraicTheory where
open import SingleSorted.Context public
Arity : Set
Arity = Context
arg : Arity → Set
arg = var
-- an algebraic signature
record Signature : Set₁ where
field
oper : Set -- operations
oper-arity : oper → Arity -- the arity of an operation
-- terms over a signature in a context of a given sort
data Term (Γ : Context) : Set where
tm-var : var Γ → Term Γ
tm-oper : ∀ (f : oper) → (arg (oper-arity f) → Term Γ) → Term Γ
-- Substitutions (definitions - some useful properties are in another file)
_⇒s_ : ∀ (Γ Δ : Context) → Set
Γ ⇒s Δ = var Δ → Term Γ
infix 4 _⇒s_
-- identity substitution
id-s : ∀ {Γ : Context} → Γ ⇒s Γ
id-s = tm-var
-- the action of a substitution on a term (contravariant)
_[_]s : ∀ {Γ Δ : Context} → Term Δ → Γ ⇒s Δ → Term Γ
(tm-var x) [ σ ]s = σ x
(tm-oper f x) [ σ ]s = tm-oper f (λ i → x i [ σ ]s)
infixr 6 _[_]s
-- composition of substitutions
_∘s_ : ∀ {Γ Δ Θ : Context} → Δ ⇒s Θ → Γ ⇒s Δ → Γ ⇒s Θ
(σ ∘s ρ) x = σ x [ ρ ]s
infixl 7 _∘s_
-- Axioms are equations in context
record Equation : Set where
field
eq-ctx : Context
eq-lhs : Term eq-ctx
eq-rhs : Term eq-ctx
-- Theory
-- an equational theory is a family of equations over a given sort
record Theory ℓ (Σ : Signature) : Set (lsuc ℓ) where
open Signature Σ public
field
ax : Set ℓ -- the axiom names
ax-eq : ax → Equation -- the axioms
ax-ctx : ax → Context
ax-ctx ε = Equation.eq-ctx (ax-eq ε)
ax-lhs : ∀ (ε : ax) → Term (ax-ctx ε)
ax-lhs ε = Equation.eq-lhs (ax-eq ε)
ax-rhs : ∀ (ε : ax) → Term (ax-ctx ε)
ax-rhs ε = Equation.eq-rhs (ax-eq ε)
infix 4 _⊢_≈_
-- equality of terms
data _⊢_≈_ : (Γ : Context) → Term Γ → Term Γ → Set (lsuc ℓ) where
-- general rules
eq-refl : ∀ {Γ} {t : Term Γ} → Γ ⊢ t ≈ t
eq-symm : ∀ {Γ} {s t : Term Γ} → Γ ⊢ s ≈ t → Γ ⊢ t ≈ s
eq-tran : ∀ {Γ} {s t u : Term Γ} → Γ ⊢ s ≈ t → Γ ⊢ t ≈ u → Γ ⊢ s ≈ u
-- congruence rule
eq-congr : ∀ {Γ} {f : oper} {xs ys : arg (oper-arity f) → Term Γ} →
(∀ i → Γ ⊢ xs i ≈ ys i) → Γ ⊢ tm-oper f xs ≈ tm-oper f ys
-- equational axiom
eq-axiom : ∀ (ε : ax) {Γ : Context} (σ : Γ ⇒s (ax-ctx ε)) →
Γ ⊢ ax-lhs ε [ σ ]s ≈ ax-rhs ε [ σ ]s
≡-⊢-≈ : {Γ : Context} {s t : Term Γ} → s ≡ t → Γ ⊢ s ≈ t
≡-⊢-≈ refl = eq-refl
-- the action of the identity substitution is the identity
id-action : ∀ {Γ : Context} {a : Term Γ} → (Γ ⊢ a ≈ (a [ id-s ]s))
id-action {a = tm-var a} = eq-refl
id-action {a = tm-oper f x} = eq-congr (λ i → id-action {a = x i})
eq-axiom-id : ∀ (ε : ax) → ax-ctx ε ⊢ ax-lhs ε ≈ ax-rhs ε
eq-axiom-id ε = eq-tran id-action (eq-tran (eq-axiom ε id-s) (eq-symm id-action))
eq-setoid : ∀ (Γ : Context) → Setoid lzero (lsuc ℓ)
eq-setoid Γ =
record
{ Carrier = Term Γ
; _≈_ = λ s t → (Γ ⊢ s ≈ t)
; isEquivalence =
record
{ refl = eq-refl
; sym = eq-symm
; trans = eq-tran
}
}
|
programs/oeis/063/A063523.asm | karttu/loda | 1 | 179250 | ; A063523: a(n) = n*(8*n^2 - 5)/3.
; 0,1,18,67,164,325,566,903,1352,1929,2650,3531,4588,5837,7294,8975,10896,13073,15522,18259,21300,24661,28358,32407,36824,41625,46826,52443,58492,64989,71950,79391,87328,95777,104754,114275,124356,135013,146262,158119,170600,183721,197498,211947,227084,242925,259486,276783,294832,313649,333250,353651,374868,396917,419814,443575,468216,493753,520202,547579,575900,605181,635438,666687,698944,732225,766546,801923,838372,875909,914550,954311,995208,1037257,1080474,1124875,1170476,1217293,1265342,1314639,1365200,1417041,1470178,1524627,1580404,1637525,1696006,1755863,1817112,1879769,1943850,2009371,2076348,2144797,2214734,2286175,2359136,2433633,2509682,2587299,2666500,2747301,2829718,2913767,2999464,3086825,3175866,3266603,3359052,3453229,3549150,3646831,3746288,3847537,3950594,4055475,4162196,4270773,4381222,4493559,4607800,4723961,4842058,4962107,5084124,5208125,5334126,5462143,5592192,5724289,5858450,5994691,6133028,6273477,6416054,6560775,6707656,6856713,7007962,7161419,7317100,7475021,7635198,7797647,7962384,8129425,8298786,8470483,8644532,8820949,8999750,9180951,9364568,9550617,9739114,9930075,10123516,10319453,10517902,10718879,10922400,11128481,11337138,11548387,11762244,11978725,12197846,12419623,12644072,12871209,13101050,13333611,13568908,13806957,14047774,14291375,14537776,14786993,15039042,15293939,15551700,15812341,16075878,16342327,16611704,16884025,17159306,17437563,17718812,18003069,18290350,18580671,18874048,19170497,19470034,19772675,20078436,20387333,20699382,21014599,21333000,21654601,21979418,22307467,22638764,22973325,23311166,23652303,23996752,24344529,24695650,25050131,25407988,25769237,26133894,26501975,26873496,27248473,27626922,28008859,28394300,28783261,29175758,29571807,29971424,30374625,30781426,31191843,31605892,32023589,32444950,32869991,33298728,33731177,34167354,34607275,35050956,35498413,35949662,36404719,36863600,37326321,37792898,38263347,38737684,39215925,39698086,40184183,40674232,41168249
mul $0,4
mov $1,$0
pow $1,2
sub $1,10
mul $1,$0
div $1,24
|
bb-runtimes/src/s-bbcpsp__6xx.adb | JCGobbi/Nucleo-STM32G474RE | 0 | 13648 | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . B B . C P U _ S P E C I F I C --
-- --
-- B o d y --
-- --
-- Copyright (C) 1999-2002 Universidad Politecnica de Madrid --
-- Copyright (C) 2003-2005 The European Space Agency --
-- Copyright (C) 2003-2021, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
------------------------------------------------------------------------------
-- This package implements PowerPC architecture specific support for the GNAT
-- Ravenscar run time.
package body System.BB.CPU_Specific is
-------------------------------
-- Finish_Initialize_Context --
-------------------------------
procedure Finish_Initialize_Context
(Buffer : not null access Context_Buffer)
is
begin
null;
end Finish_Initialize_Context;
--------------------
-- Initialize_CPU --
--------------------
procedure Initialize_CPU is
begin
null;
end Initialize_CPU;
----------------------------
-- Install_Error_Handlers --
----------------------------
procedure Install_Error_Handlers is
begin
-- No error handler required on this platform
null;
end Install_Error_Handlers;
---------------------
-- Install_Handler --
---------------------
procedure Install_Exception_Handler
(Service_Routine : System.Address;
Vector : Vector_Id)
is
procedure Copy_Handler
(Service_Routine : System.Address;
Vector : Vector_Id;
Id : Integer);
pragma Import (Asm, Copy_Handler, "copy_handler");
begin
Copy_Handler (Service_Routine, Vector, 0);
end Install_Exception_Handler;
end System.BB.CPU_Specific;
|
sprites/examples/ow_rounding_boo.asm | Atari2/WhiteSnake | 0 | 103470 | ; Turning code stolen from Blind Devil's Rounding Boo
macro SetOAMProp(XPos, YPos, Tile, Props, Size)
LDA <XPos> : STA $0300|!addr,y ; xpos on screen
LDA <YPos> : STA $0301|!addr,y ; ypos on screen
LDA <Tile> : STA $0302|!addr,y ; tile
LDA <Props> : STA $0303|!addr,y ; yxppccct
TYA : LSR #$2 : TAY
LDA <Size> : STA $0460|!addr,y
endmacro
!MaxXSpd = $06
!TimeToTurn = $40
!StartingY = $40
!StartingX = $58
print "INIT", pc
init:
LDA #!StartingX
STA !E4,x
LDA #!StartingY
STA !D8,x
STZ !14D4,x
STZ !14E0,X
LDA #!TimeToTurn
STA !1540,x
STZ !157C,x
STZ !B6,x
RTL
print "MAIN", pc
main:
LDA !C2,x ; set Y speed for wobbly effect
AND.b #$01
TAY
LDA !AA,X
CLC : ADC.w SpeedTable,Y
STA !AA,x
CMP.w SpeedY,Y
BNE +
INC !C2,x
+
JSR SetAnimationFrame ; calculate correct animation frame
LDA !1540,x ; if counter and speed are 0, time to turn
ORA !B6,x
BNE .noswap
LDA #!TimeToTurn ; turn speed and direction
STA !1540,x
LDA !157C,x
EOR #$01
STA !157C,x
.noswap
LDA $14
AND #$03
BNE .updatepos
LDY !157C,x
LDA !1540,x
BNE .domax
CPY #$00
BEQ .decrright
BRA .decrleft
.domax
LDA !157C,x
LSR : LDA #!MaxXSpd
BCS .goingleft
CMP !B6,x
BEQ .updatepos
.decrleft
INC !B6,x
BRA .updatepos
.goingleft
EOR #$FF : INC
CMP !B6,x
BEQ .updatepos
.decrright
DEC !B6,x
.updatepos
PHX : JSL $01801A : PLX
PHX : JSL $018022 : PLX
%OverworldGetDrawInfo()
LDY !1602,x
LDA Tiles,y
STA $02
LDY !157C,x
LDA Props,y
STA $03
LDY #$00
-
LDA $0301|!addr,Y
CMP #$F0
BEQ +
INY #4
CPY #$FC
BNE - ;if Y == 0, kill everything
+
%SetOAMProp($00, $01, $02, $03, #$00)
RTL
Props:
db $73, $03
Tiles:
db $B0, $B1
SpeedY:
db $18, $E8
SpeedTable:
db $01,$FF
; 0000 -> 1A -> custom tailored for YI
; C000 -> 1C -> custom tailored for YI
SetAnimationFrame:
INC.w !1570,X
LDA.w !1570,X
LSR #3
AND.b #$01
STA.w !1602,X
RTS |
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_21829_962.asm | ljhsiun2/medusa | 9 | 167000 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r13
push %r15
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x10bb7, %r10
nop
nop
xor %rdi, %rdi
and $0xffffffffffffffc0, %r10
vmovntdqa (%r10), %ymm7
vextracti128 $0, %ymm7, %xmm7
vpextrq $0, %xmm7, %r13
nop
nop
nop
nop
nop
add $50739, %r12
lea addresses_WC_ht+0x4ab7, %r13
nop
nop
nop
sub $22132, %r15
movb $0x61, (%r13)
nop
nop
nop
nop
nop
and %r13, %r13
lea addresses_A_ht+0x16493, %r10
clflush (%r10)
nop
nop
nop
nop
nop
dec %rcx
mov (%r10), %r13d
nop
nop
nop
nop
nop
inc %rcx
lea addresses_D_ht+0x8a97, %r15
clflush (%r15)
xor %rbx, %rbx
mov $0x6162636465666768, %rcx
movq %rcx, %xmm2
and $0xffffffffffffffc0, %r15
vmovaps %ymm2, (%r15)
and $43500, %r10
lea addresses_A_ht+0x188df, %rsi
lea addresses_UC_ht+0xb7, %rdi
nop
nop
nop
cmp $57361, %r15
mov $27, %rcx
rep movsq
nop
nop
nop
nop
lfence
lea addresses_normal_ht+0x75e5, %rsi
lea addresses_D_ht+0xd667, %rdi
nop
nop
nop
nop
nop
cmp %r10, %r10
mov $75, %rcx
rep movsl
nop
nop
nop
nop
nop
xor %r15, %r15
lea addresses_normal_ht+0x1dc1d, %rcx
and $3165, %r12
mov (%rcx), %r10w
nop
nop
nop
nop
nop
inc %r10
lea addresses_A_ht+0x4bb7, %r12
nop
nop
nop
nop
xor $56822, %rsi
mov $0x6162636465666768, %r15
movq %r15, %xmm7
and $0xffffffffffffffc0, %r12
movntdq %xmm7, (%r12)
nop
nop
nop
lfence
lea addresses_D_ht+0x6d09, %r10
nop
nop
add %rbx, %rbx
movb $0x61, (%r10)
nop
nop
nop
cmp $34840, %rsi
lea addresses_WC_ht+0x113b7, %r15
nop
inc %rbx
vmovups (%r15), %ymm5
vextracti128 $1, %ymm5, %xmm5
vpextrq $1, %xmm5, %r12
nop
nop
nop
cmp %r13, %r13
lea addresses_A_ht+0x1b837, %rbx
nop
sub %rsi, %rsi
movl $0x61626364, (%rbx)
nop
nop
nop
cmp %rbx, %rbx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r15
pop %r13
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r15
push %r9
push %rbp
push %rbx
push %rcx
push %rdi
// Store
lea addresses_RW+0x3f87, %rdi
nop
nop
nop
xor $63947, %rcx
mov $0x5152535455565758, %rbp
movq %rbp, %xmm7
movups %xmm7, (%rdi)
nop
add $1508, %rbx
// Faulty Load
lea addresses_D+0x10bb7, %r9
nop
nop
nop
nop
sub %r15, %r15
mov (%r9), %r10d
lea oracles, %rbx
and $0xff, %r10
shlq $12, %r10
mov (%rbx,%r10,1), %r10
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r9
pop %r15
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_D', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_RW', 'AVXalign': False, 'size': 16}}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_D', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': True, 'same': True, 'congruent': 10, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 1}}
{'src': {'NT': True, 'same': False, 'congruent': 1, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_D_ht', 'AVXalign': True, 'size': 32}}
{'src': {'same': False, 'congruent': 1, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_UC_ht'}}
{'src': {'same': False, 'congruent': 1, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_D_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 11, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1}}
{'src': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4}}
{'36': 21829}
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 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 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 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 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
*/
|
tools-src/gnu/gcc/gcc/ada/xr_tabls.ads | enfoTek/tomato.linksys.e2000.nvram-mod | 80 | 7613 | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- X R _ T A B L S --
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- Copyright (C) 1998-2000 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, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Strings.Unbounded;
package Xr_Tabls is
-------------------
-- Project files --
-------------------
function ALI_File_Name (Ada_File_Name : String) return String;
-- Returns the ali file name corresponding to Ada_File_Name, using the
-- information provided in gnat.adc if it exists
procedure Create_Project_File
(Name : String);
-- Open and parse a new project file
-- If the file Name could not be open or is not a valid project file
-- then a project file associated with the standard default directories
-- is returned
function Find_ALI_File (Short_Name : String) return String;
-- Returns the directory name for the file Short_Name
-- takes into account the obj_dir lines in the project file,
-- and the default paths for Gnat
function Find_Source_File (Short_Name : String) return String;
-- Returns the directory name for the file Short_Name
-- takes into account the src_dir lines in the project file,
-- and the default paths for Gnat
function Next_Src_Dir return String;
-- Returns the next directory to visit to find related source files
-- If there are no more such directory, Length = 0
function Next_Obj_Dir return String;
-- Returns the next directory to visit to find related ali files
-- If there are no more such directory, Length = 0
function Current_Obj_Dir return String;
-- Returns the obj_dir which was returned by the last Next_Obj_Dir call
procedure Parse_Gnatls
(Gnatls_Src_Cache : out Ada.Strings.Unbounded.Unbounded_String;
Gnatls_Obj_Cache : out Ada.Strings.Unbounded.Unbounded_String);
-- Parse the output of Gnatls, to find the standard
-- directories for source files
procedure Reset_Src_Dir;
-- Reset the iterator for Src_Dir
procedure Reset_Obj_Dir;
-- Reset the iterator for Obj_Dir
------------
-- Tables --
------------
type Declaration_Reference is private;
Empty_Declaration : constant Declaration_Reference;
type File_Reference is private;
Empty_File : constant File_Reference;
type Reference is private;
Empty_Reference : constant Reference;
type File_Table is limited private;
type Entity_Table is limited private;
function Add_Declaration
(File_Ref : File_Reference;
Symbol : String;
Line : Natural;
Column : Natural;
Decl_Type : Character)
return Declaration_Reference;
-- Add a new declaration in the table and return the index to it.
-- Decl_Type is the type of the entity
procedure Add_Parent
(Declaration : in out Declaration_Reference;
Symbol : String;
Line : Natural;
Column : Natural;
File_Ref : File_Reference);
-- The parent declaration (Symbol in file File_Ref at position Line and
-- Column) information is added to Declaration.
procedure Add_File
(File_Name : String;
File_Existed : out Boolean;
Ref : out File_Reference;
Visited : Boolean := True;
Emit_Warning : Boolean := False;
Gnatchop_File : String := "";
Gnatchop_Offset : Integer := 0);
-- Add a new reference to a file in the table. Ref is used to return
-- the index in the table where this file is stored On exit,
-- File_Existed is True if the file was already in the table Visited is
-- the value which will be used in the table (if True, the file will
-- not be returned by Next_Unvisited_File). If Emit_Warning is True and
-- the ali file does not exist or does not have cross-referencing
-- informations, then a warning will be emitted.
-- Gnatchop_File is the name of the file that File_Name was extracted from
-- through a call to "gnatchop -r" (with pragma Source_Reference).
-- Gnatchop_Offset should be the index of the first line of File_Name
-- withing Gnatchop_File.
procedure Add_Line
(File : File_Reference;
Line : Natural;
Column : Natural);
-- Add a new reference in a file, which the user has provided
-- on the command line. This is used for a optimized matching
-- algorithm.
procedure Add_Reference
(Declaration : Declaration_Reference;
File_Ref : File_Reference;
Line : Natural;
Column : Natural;
Ref_Type : Character);
-- Add a new reference (Ref_Type = 'r'), body (Ref_Type = 'b') or
-- modification (Ref_Type = 'm') to an entity
type Compare_Result is (LessThan, Equal, GreaterThan);
function Compare (Ref1, Ref2 : Reference) return Compare_Result;
function Compare
(Decl1 : Declaration_Reference;
File2 : File_Reference;
Line2 : Integer;
Col2 : Integer;
Symb2 : String)
return Compare_Result;
-- Compare two references
function First_Body (Decl : Declaration_Reference) return Reference;
function First_Declaration return Declaration_Reference;
function First_Modif (Decl : Declaration_Reference) return Reference;
function First_Reference (Decl : Declaration_Reference) return Reference;
-- Initialize the iterators
function Get_Column (Decl : Declaration_Reference) return String;
function Get_Column (Ref : Reference) return String;
function Get_Declaration
(File_Ref : File_Reference;
Line : Natural;
Column : Natural)
return Declaration_Reference;
-- Returns reference to the declaration found in file File_Ref at the
-- given Line and Column
function Get_Parent
(Decl : Declaration_Reference)
return Declaration_Reference;
-- Returns reference to Decl's parent declaration
function Get_Emit_Warning (File : File_Reference) return Boolean;
-- Returns the Emit_Warning field of the structure
function Get_Gnatchop_File
(File : File_Reference; With_Dir : Boolean := False) return String;
function Get_Gnatchop_File
(Ref : Reference; With_Dir : Boolean := False) return String;
function Get_Gnatchop_File
(Decl : Declaration_Reference; With_Dir : Boolean := False) return String;
-- Return the name of the file that File was extracted from through a
-- call to "gnatchop -r".
-- The file name for File is returned if File wasn't extracted from such a
-- file. The directory will be given only if With_Dir is True.
function Get_File
(Decl : Declaration_Reference;
With_Dir : Boolean := False)
return String;
-- Extract column number or file name from reference
function Get_File
(Ref : Reference;
With_Dir : Boolean := False)
return String;
pragma Inline (Get_File);
function Get_File
(File : File_Reference;
With_Dir : Boolean := False;
Strip : Natural := 0)
return String;
-- Returns the file name (and its directory if With_Dir is True or
-- the user as used the -f switch on the command line.
-- If Strip is not 0, then the last Strip-th "-..." substrings are
-- removed first. For instance, with Strip=2, a file name
-- "parent-child1-child2-child3.ali" would be returned as
-- "parent-child1.ali". This is used when looking for the ALI file to use
-- for a package, since for separates with have to use the parent's ALI.
--
-- "" is returned if there is no such parent unit
function Get_File_Ref (Ref : Reference) return File_Reference;
function Get_Line (Decl : Declaration_Reference) return String;
function Get_Line (Ref : Reference) return String;
function Get_Symbol (Decl : Declaration_Reference) return String;
function Get_Type (Decl : Declaration_Reference) return Character;
-- Functions that return the content of a declaration
function Get_Source_Line (Ref : Reference) return String;
function Get_Source_Line (Decl : Declaration_Reference) return String;
-- Return the source line associated with the reference
procedure Grep_Source_Files;
-- Parse all the source files which have at least one reference, and
-- grep the appropriate lines so that we'll be able to display them.
-- This function should be called once all the .ali files have been
-- parsed, and only if the appropriate user switch has been used.
function Longest_File_Name return Natural;
-- Returns the longest file name found
function Match (Decl : Declaration_Reference) return Boolean;
-- Return True if the declaration matches
function Match
(File : File_Reference;
Line : Natural;
Column : Natural)
return Boolean;
-- Returns True if File:Line:Column was given on the command line
-- by the user
function Next (Decl : Declaration_Reference) return Declaration_Reference;
function Next (Ref : Reference) return Reference;
-- Returns the next declaration, or Empty_Declaration
function Next_Unvisited_File return File_Reference;
-- Returns the next unvisited library file in the list
-- If there is no more unvisited file, return Empty_File
procedure Set_Default_Match (Value : Boolean);
-- Set the default value for match in declarations.
-- This is used so that if no file was provided in the
-- command line, then every file match
procedure Set_Directory
(File : File_Reference;
Dir : String);
-- Set the directory for a file
procedure Set_Unvisited (File_Ref : in File_Reference);
-- Set File_Ref as unvisited. So Next_Unvisited_File will return it.
private
type Project_File (Src_Dir_Length, Obj_Dir_Length : Natural) is record
Src_Dir : String (1 .. Src_Dir_Length);
Src_Dir_Index : Integer;
Obj_Dir : String (1 .. Obj_Dir_Length);
Obj_Dir_Index : Integer;
Last_Obj_Dir_Start : Natural;
end record;
type Project_File_Ptr is access all Project_File;
-- This is actually a list of all the directories to be searched,
-- either for source files or for library files
type String_Access is access all String;
type Ref_In_File;
type Ref_In_File_Ptr is access all Ref_In_File;
type Ref_In_File is record
Line : Natural;
Column : Natural;
Next : Ref_In_File_Ptr := null;
end record;
type File_Record;
type File_Reference is access all File_Record;
Empty_File : constant File_Reference := null;
type File_Record (File_Length : Natural) is record
File : String (1 .. File_Length);
Dir : String_Access := null;
Lines : Ref_In_File_Ptr := null;
Visited : Boolean := False;
Emit_Warning : Boolean := False;
Gnatchop_File : String_Access := null;
Gnatchop_Offset : Integer := 0;
Next : File_Reference := null;
end record;
-- Holds a reference to a source file, that was referenced in at least one
-- ALI file.
-- Gnatchop_File will contain the name of the file that File was extracted
-- From. Gnatchop_Offset contains the index of the first line of File
-- within Gnatchop_File. These two fields are used to properly support
-- gnatchop files and pragma Source_Reference.
type Reference_Record;
type Reference is access all Reference_Record;
Empty_Reference : constant Reference := null;
type Reference_Record is record
File : File_Reference;
Line : Natural;
Column : Natural;
Source_Line : Ada.Strings.Unbounded.Unbounded_String;
Next : Reference := null;
end record;
-- File is a reference to the Ada source file
-- Source_Line is the Line as it appears in the source file. This
-- field is only used when the switch is set on the command line
type Declaration_Record;
type Declaration_Reference is access all Declaration_Record;
Empty_Declaration : constant Declaration_Reference := null;
type Declaration_Record (Symbol_Length : Natural) is record
Symbol : String (1 .. Symbol_Length);
Decl : aliased Reference_Record;
Decl_Type : Character;
Body_Ref : Reference := null;
Ref_Ref : Reference := null;
Modif_Ref : Reference := null;
Match : Boolean := False;
Par_Symbol : Declaration_Reference := null;
Next : Declaration_Reference := null;
end record;
type File_Table is record
Table : File_Reference := null;
Longest_Name : Natural := 0;
end record;
type Entity_Table is record
Table : Declaration_Reference := null;
end record;
pragma Inline (First_Body);
pragma Inline (First_Declaration);
pragma Inline (First_Modif);
pragma Inline (First_Reference);
pragma Inline (Get_Column);
pragma Inline (Get_Emit_Warning);
pragma Inline (Get_File);
pragma Inline (Get_File_Ref);
pragma Inline (Get_Line);
pragma Inline (Get_Symbol);
pragma Inline (Get_Type);
pragma Inline (Longest_File_Name);
pragma Inline (Next);
end Xr_Tabls;
|
mips_architecture/lab6_ex5.asm | christosmarg/uni-assignments | 0 | 87841 | .eqv SYS_PRINT_STRING 4
.eqv SYS_READ_WORD 5
.eqv SYS_EXIT 10
.eqv SYS_PRINT_CHAR 11
.data
inputmsg: .asciiz "Number (1-255): "
bounderrstr: .asciiz "Number must be 1-255\n"
resstr: .asciiz "Hex: 0x"
hex: .ascii "0123456789abcdef"
.text
.globl main
main:
li $v0, SYS_PRINT_STRING
la $a0, inputmsg
syscall
li $v0, SYS_READ_WORD
syscall
move $t0, $v0
# Bounds check
blt $t0, 1, bounderr
bgt $t0, 255, bounderr
li $v0, SYS_PRINT_STRING
la $a0, resstr
syscall
# Get first 4 bits and shift them 4 bits right
# so that `t2` can have their value. For example
# if the number is 50 (00110010):
#
# (00110010 & 0xf0) >> 4 = 00110000 >> 4 = 00000011 = 3
andi $t1, $t0, 0xf0
srl $t2, $t1, 4
# Print first portion (4 bits)
li $v0, SYS_PRINT_CHAR
lb $a0, hex($t2)
syscall
# Get last 4 bits. Using 50 as an example again
# 00110010 & 0x0f = 00000010 = 2
andi $t1, $t0, 0x0f
# Print second portion (4 bits)
lb $a0, hex($t1)
syscall
j exit
bounderr:
li $v0, SYS_PRINT_STRING
la $a0, bounderrstr
syscall
exit:
li $v0, SYS_EXIT
syscall
|
maps/WIP/TVStation3F3.asm | AtmaBuster/pokecrystal16-493-plus | 1 | 21372 | object_const_def ; object_event constants
TVStation3F3_MapScripts:
db 0 ; scene scripts
db 0 ; callbacks
TVStation3F3_MapEvents:
db 0, 0 ; filler
db 0 ; warp events
db 0 ; coord events
db 0 ; bg events
db 0 ; object events
|
Ada/src/Problem_73.adb | Tim-Tom/project-euler | 0 | 29433 | <gh_stars>0
with Ada.Text_IO;
package body Problem_73 is
package IO renames Ada.Text_IO;
procedure Solve is
max : constant := 12_000;
-- Start with the first two numbers in the sequence (it's easy to know that because the first
-- one after 0 is 1 / max). Then generate successive elements in the sequence by using the
-- mediant formula and solving for the new c/d.
a,b,c,d,k : Integer;
-- Temporary variables.
c2, d2 : Integer;
count : Long_Integer := 0;
counting : Boolean := false;
begin
a := 0;
b := 1;
c := 1;
d := max;
while c <= max loop
if counting then
exit when a = 1 and b = 2;
count := count + 1;
end if;
if a = 1 and b = 3 then
counting := true;
end if;
k := (max + b) / d;
c2 := k * c - a;
d2 := k * d - b;
a := c;
b := d;
c := c2;
d := d2;
end loop;
IO.Put_Line(Long_Integer'Image(count));
end Solve;
end Problem_73;
|
Transynther/x86/_processed/AVXALIGN/_ht_st_zr_sm_/i9-9900K_12_0xa0_notsx.log_21829_2029.asm | ljhsiun2/medusa | 9 | 92563 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r14
push %r15
push %r8
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0x6cc9, %rcx
clflush (%rcx)
nop
and %rdi, %rdi
mov $0x6162636465666768, %r10
movq %r10, (%rcx)
nop
nop
nop
and $18804, %rcx
lea addresses_normal_ht+0x11c19, %r14
nop
xor $6425, %r15
mov $0x6162636465666768, %r8
movq %r8, (%r14)
nop
nop
nop
nop
nop
sub $31034, %rdi
lea addresses_WC_ht+0x1bdc9, %rsi
lea addresses_A_ht+0xdd69, %rdi
nop
nop
nop
and %r8, %r8
mov $47, %rcx
rep movsb
nop
nop
nop
nop
nop
and %rcx, %rcx
lea addresses_normal_ht+0x12133, %rcx
nop
nop
nop
nop
cmp %r8, %r8
mov $0x6162636465666768, %r15
movq %r15, (%rcx)
nop
nop
add %rcx, %rcx
lea addresses_WT_ht+0xeb49, %rsi
lea addresses_UC_ht+0x19a69, %rdi
nop
nop
cmp %r10, %r10
mov $33, %rcx
rep movsq
nop
nop
xor %rcx, %rcx
lea addresses_A_ht+0x5169, %r14
nop
nop
xor $26121, %r10
mov (%r14), %r15
and %r10, %r10
lea addresses_UC_ht+0xc819, %rdi
nop
nop
cmp %r8, %r8
mov $0x6162636465666768, %r14
movq %r14, (%rdi)
nop
nop
dec %rsi
lea addresses_D_ht+0xeed9, %rsi
lea addresses_normal_ht+0x129c9, %rdi
nop
nop
nop
nop
nop
xor %rdx, %rdx
mov $50, %rcx
rep movsl
nop
nop
nop
nop
inc %r8
lea addresses_WC_ht+0x4889, %rdx
nop
nop
nop
nop
nop
xor %rsi, %rsi
movb (%rdx), %r14b
nop
nop
sub %r15, %r15
lea addresses_WC_ht+0x16dc9, %rsi
lea addresses_normal_ht+0x9779, %rdi
clflush (%rsi)
nop
cmp %r8, %r8
mov $58, %rcx
rep movsl
nop
nop
nop
nop
xor $11899, %rcx
lea addresses_D_ht+0x8cc9, %r8
cmp %rdx, %rdx
mov $0x6162636465666768, %r10
movq %r10, %xmm1
movups %xmm1, (%r8)
nop
nop
nop
nop
xor $43728, %r8
lea addresses_D_ht+0x4ec9, %rdx
nop
nop
xor %r10, %r10
mov (%rdx), %rsi
nop
nop
cmp %r8, %r8
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r8
pop %r15
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r14
push %rax
push %rbp
push %rbx
// Store
lea addresses_A+0xe32, %r10
nop
nop
nop
nop
nop
sub %r14, %r14
movb $0x51, (%r10)
nop
nop
nop
nop
dec %rax
// Store
lea addresses_D+0xadc9, %r11
clflush (%r11)
nop
nop
nop
nop
sub %rbp, %rbp
mov $0x5152535455565758, %r10
movq %r10, (%r11)
nop
nop
nop
nop
nop
cmp %r14, %r14
// Store
lea addresses_D+0xadc9, %r14
dec %r10
mov $0x5152535455565758, %rbx
movq %rbx, %xmm3
vmovaps %ymm3, (%r14)
nop
and %rbx, %rbx
// Faulty Load
lea addresses_D+0xadc9, %r10
nop
sub $61816, %r12
movaps (%r10), %xmm4
vpextrq $0, %xmm4, %r11
lea oracles, %rax
and $0xff, %r11
shlq $12, %r11
mov (%rax,%r11,1), %r11
pop %rbx
pop %rbp
pop %rax
pop %r14
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_D', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 1, 'NT': True, 'same': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': True, 'size': 32, 'NT': False, 'same': True, 'congruent': 0}}
[Faulty Load]
{'src': {'type': 'addresses_D', 'AVXalign': True, 'size': 16, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 4}}
{'src': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 1}}
{'src': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}}
{'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 4}}
{'src': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': True, 'congruent': 8}}
{'src': {'type': 'addresses_D_ht', 'AVXalign': True, 'size': 8, 'NT': False, 'same': False, 'congruent': 7}, 'OP': 'LOAD'}
{'58': 21046, '40': 3, '00': 780}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 00 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
|
dino/lcs/123p/5A.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | 6 | 23631 | <reponame>zengfr/arcade_game_romhacking_sourcecode_top_secret_data<filename>dino/lcs/123p/5A.asm
copyright zengfr site:http://github.com/zengfr/romhack
00042A move.l D1, (A0)+
00042C dbra D0, $42a
004D94 move.l D1, (A1)+
004D96 dbra D0, $4d94
0107AA move.b ($5a,A2), ($5a,A3) [123p+ 78]
0107B0 move.b (A4)+, D0
010F30 move.b ($5a,A2), ($5a,A3) [123p+ 78]
010F36 move.b (A4)+, D0
0116F2 move.b ($5a,A2), ($5a,A3) [123p+ 78]
0116F8 move.b (A4)+, D0 [123p+ 5A]
011E0A move.b ($5a,A2), ($5a,A3) [123p+ 78]
011E10 move.b (A4)+, D0
01264E clr.b ($5a,A3) [123p+ 78]
012652 move.b (A4)+, D0
01C09A tst.b ($5a,A6)
01C09E bne $1c19c [123p+ 5A]
01C15C tst.b ($5a,A6)
01C160 bne $1c37c [123p+ 5A]
01C960 tst.b ($5a,A6)
01C964 bne $1c19c
01CB9C tst.b ($5a,A6)
01CBA0 bne $1cbe6 [123p+ 5A]
01CDC2 clr.b ($5a,A6) [123p+ F6]
01CDC6 move.b #$a, ($78,A6) [123p+ 5A]
01D32A tst.b ($5a,A6)
01D32E bne $1d380
0AAACA move.l (A0), D2
0AAACC move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAACE move.w D0, ($2,A0)
0AAAD2 cmp.l (A0), D0
0AAAD4 bne $aaafc
0AAAD8 move.l D2, (A0)+
0AAADA cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAAE6 move.l (A0), D2
0AAAE8 move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAAF4 move.l D2, (A0)+
0AAAF6 cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
copyright zengfr site:http://github.com/zengfr/romhack
|
source/strings/a-suegst.ads | ytomino/drake | 33 | 12078 | <gh_stars>10-100
pragma License (Unrestricted);
-- generalized unit of Ada.Strings.UTF_Encoding.Strings
generic
type Character_Type is (<>);
type String_Type is array (Positive range <>) of Character_Type;
Expanding_From_8 : Positive;
Expanding_From_16 : Positive;
Expanding_From_32 : Positive;
Expanding_To_8 : Positive;
Expanding_To_16 : Positive;
Expanding_To_32 : Positive;
with procedure Get (
Item : String_Type;
Last : out Natural;
Value : out Wide_Wide_Character;
Is_Illegal_Sequence : out Boolean);
with procedure Put (
Value : Wide_Wide_Character;
Item : out String_Type;
Last : out Natural);
package Ada.Strings.UTF_Encoding.Generic_Strings is
pragma Pure;
-- Encoding / decoding between String_Type and various encoding schemes
function Encode (
Item : String_Type;
Output_Scheme : Encoding_Scheme;
Output_BOM : Boolean := False)
return UTF_String;
function Encode (Item : String_Type; Output_BOM : Boolean := False)
return UTF_8_String;
function Encode (Item : String_Type; Output_BOM : Boolean := False)
return UTF_16_Wide_String;
-- extended
function Encode (Item : String_Type; Output_BOM : Boolean := False)
return UTF_32_Wide_Wide_String;
function Decode (Item : UTF_String; Input_Scheme : Encoding_Scheme)
return String_Type;
function Decode (Item : UTF_8_String) return String_Type;
function Decode (Item : UTF_16_Wide_String) return String_Type;
-- extended
function Decode (Item : UTF_32_Wide_Wide_String) return String_Type;
end Ada.Strings.UTF_Encoding.Generic_Strings;
|
programs/oeis/128/A128975.asm | neoneye/loda | 22 | 99729 | <reponame>neoneye/loda
; A128975: a(n) = the number of unordered triples of integers (a,b,c) with a+b+c=n, whose bitwise XOR is zero. Equivalently, the number of three-heap nim games with n stones which are in a losing position for the first player.
; 0,0,0,0,0,1,0,0,0,1,0,1,0,4,0,0,0,1,0,1,0,4,0,1,0,4,0,4,0,13,0,0,0,1,0,1,0,4,0,1,0,4,0,4,0,13,0,1,0,4,0,4,0,13,0,4,0,13,0,13,0,40,0,0,0,1,0,1,0,4,0,1,0,4,0,4,0,13,0,1,0,4,0,4,0,13,0,4,0,13,0,13,0,40,0,1,0,4,0,4
dif $0,-2
max $0,0
seq $0,147610 ; a(n) = 3^(wt(n-1)-1), where wt() = A000120().
div $0,2
|
arch/ARM/STM32/driversWB55x/stm32-rtc.adb | morbos/Ada_Drivers_Library | 2 | 24652 | <gh_stars>1-10
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2016, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with STM32_SVD.RTC; use STM32_SVD.RTC;
with STM32_SVD.RCC; use STM32_SVD.RCC;
with STM32.Power_Control;
with HAL.Real_Time_Clock; use HAL.Real_Time_Clock;
package body STM32.RTC is
-- procedure Disable_Write_Protection;
-- procedure Enable_Write_Protection;
------------------------------
-- Disable_Write_Protection --
------------------------------
procedure Disable_Write_Protection is
begin
Power_Control.Disable_Backup_Domain_Protection;
RTC_Periph.WPR.KEY := 16#CA#;
RTC_Periph.WPR.KEY := 16#53#;
end Disable_Write_Protection;
-----------------------------
-- Enable_Write_Protection --
-----------------------------
procedure Enable_Write_Protection is
begin
-- Write any wrong key to enable protection
RTC_Periph.WPR.KEY := 16#FF#;
Power_Control.Enable_Backup_Domain_Protection;
end Enable_Write_Protection;
---------
-- Set --
---------
overriding
procedure Set (This : in out RTC_Device;
Time : HAL.Real_Time_Clock.RTC_Time;
Date : HAL.Real_Time_Clock.RTC_Date)
is
pragma Unreferenced (This);
DR : DR_Register;
TR : TR_Register;
begin
Disable_Write_Protection;
if not RTC_Periph.ISR.INITF then
-- Enter initialization mode
RTC_Periph.ISR.INIT := True;
-- Wait for init mode
while not RTC_Periph.ISR.INITF loop
null;
end loop;
end if;
-- RTC prescaler for LSE source clock
RTC_Periph.PRER.PREDIV_S := 16#FF#;
RTC_Periph.PRER.PREDIV_A := 16#7F#;
-- 24H format
TR.PM := False;
TR.HT := UInt2 (Time.Hour / 10);
TR.HU := UInt4 (Time.Hour mod 10);
TR.MNT := UInt3 (Time.Min / 10);
TR.MNU := UInt4 (Time.Min mod 10);
TR.ST := UInt3 (Time.Sec / 10);
TR.SU := UInt4 (Time.Sec mod 10);
DR.YT := UInt4 (Date.Year / 10);
DR.YU := UInt4 (Date.Year mod 10);
DR.WDU := UInt3 (RTC_Day_Of_Week'Enum_Rep (Date.Day_Of_Week));
DR.MT := (RTC_Month'Enum_Rep (Date.Month) / 10) /= 0;
DR.MU := UInt4 (RTC_Month'Enum_Rep (Date.Month) mod 10);
DR.DT := UInt2 (Date.Day / 10);
DR.DU := UInt4 (Date.Day mod 10);
-- TR and DR are shadow registers, we have to write them all at once
RTC_Periph.TR := TR;
RTC_Periph.DR := DR;
-- Leave init mode
RTC_Periph.ISR.INIT := False;
Enable_Write_Protection;
while not RTC_Periph.ISR.RSF loop
null;
end loop;
end Set;
---------
-- Get --
---------
overriding
procedure Get (This : in out RTC_Device;
Time : out HAL.Real_Time_Clock.RTC_Time;
Date : out HAL.Real_Time_Clock.RTC_Date)
is
begin
loop
Time := This.Get_Time;
Date := This.Get_Date;
-- Check if the time changed when we were reading the date. If it
-- did, we have to read both values again to ensure coherence.
exit when This.Get_Time = Time;
end loop;
end Get;
--------------
-- Get_Time --
--------------
overriding
function Get_Time (This : RTC_Device) return HAL.Real_Time_Clock.RTC_Time
is
pragma Unreferenced (This);
Ret : RTC_Time;
TR : constant TR_Register := RTC_Periph.TR;
begin
Ret.Hour := RTC_Hour (TR.HT) * 10 + RTC_Hour (RTC_Periph.TR.HU);
Ret.Min := RTC_Minute (TR.MNT) * 10 + RTC_Minute (TR.MNU);
Ret.Sec := RTC_Second (TR.ST) * 10 + RTC_Second (TR.SU);
return Ret;
end Get_Time;
--------------
-- Get_Date --
--------------
overriding
function Get_Date (This : RTC_Device) return HAL.Real_Time_Clock.RTC_Date
is
pragma Unreferenced (This);
Ret : RTC_Date;
DR : constant DR_Register := RTC_Periph.DR;
begin
Ret.Day_Of_Week := RTC_Day_Of_Week'Enum_Val (DR.WDU);
Ret.Day := RTC_Day (Integer (DR.DT) * 10 + Integer (DR.DU));
Ret.Year := RTC_Year (DR.YT) * 10 + RTC_Year (DR.YU);
Ret.Month := RTC_Month'Enum_Val ((if DR.MT then 10 else 0) + DR.MU);
return Ret;
end Get_Date;
------------
-- Enable --
------------
procedure Enable (This : in out RTC_Device) is
pragma Unreferenced (This);
begin
Power_Control.Enable;
Power_Control.Disable_Backup_Domain_Protection;
-- Turn on internal low speed oscillator
RCC_Periph.CSR.LSI1ON := True;
while not RCC_Periph.CSR.LSI1RDY loop
null;
end loop;
-- Select LSI as source clock
RCC_Periph.BDCR.RTC_SEL := 2#10#;
if RCC_Periph.BDCR.RTC_SEL /= 2#10# then
raise Program_Error with "Cannot select RTC clock";
end if;
RCC_Periph.BDCR.RTCEN := True;
while not RTC_Periph.ISR.RSF loop
null;
end loop;
-- Power_Control.Enable_Backup_Domain_Protection;
end Enable;
-------------
-- Disable --
-------------
procedure Disable (This : in out RTC_Device) is
pragma Unreferenced (This);
begin
-- Power_Control.Disable_Backup_Domain_Protection;
RCC_Periph.BDCR.RTCEN := False;
-- Power_Control.Enable_Backup_Domain_Protection;
end Disable;
end STM32.RTC;
|
Common.agda | mietek/hilbert-gentzen | 29 | 16638 | module Common where
open import Agda.Builtin.Size public
using (Size ; Size<_)
renaming (ω to ∞)
open import Agda.Primitive public
using ()
renaming (_⊔_ to _⊔ᴸ_ ; lsuc to sucᴸ)
open import Data.Bool public
using (true ; false)
renaming (Bool to 𝔹 ; _∧_ to _∧ᴮ_ ; _∨_ to _∨ᴮ_ ; not to ¬ᴮ_ ; if_then_else_ to ifᴮ)
open import Data.Empty public
using ()
renaming (⊥ to 𝟘 ; ⊥-elim to elim𝟘)
open import Data.Fin public
using (Fin ; zero ; suc)
open import Data.List public
using (List ; [] ; _∷_)
open import Data.Nat public
using (ℕ ; zero ; suc)
renaming (_≟_ to _≟ᴺ_)
open import Data.Sum public
using (_⊎_)
renaming (inj₁ to ι₁ ; inj₂ to ι₂)
open import Data.Unit public
using ()
renaming (⊤ to 𝟙 ; tt to ∙)
open import Function public
using (_∘_ ; _$_)
renaming (id to I ; const to K ; _ˢ_ to S)
open import Relation.Binary.PropositionalEquality public
using (_≡_ ; _≢_ ; refl ; trans ; sym ; cong ; subst)
renaming (cong₂ to cong²)
open import Relation.Nullary public
using (Dec ; yes ; no)
renaming (¬_ to Not)
open import Relation.Nullary.Decidable public
using ()
renaming (map′ to mapDec)
open import Relation.Nullary.Negation public
using ()
renaming (contradiction to _↯_)
-- Abstract symbols, or atoms.
abstract
Atom : Set
Atom = ℕ
_≟ᵅ_ : (P P′ : Atom) → Dec (P ≡ P′)
_≟ᵅ_ = _≟ᴺ_
-- Products, with custom fixities.
infixl 5 _,_
record Σ {a b} (A : Set a) (B : A → Set b) : Set (a ⊔ᴸ b) where
constructor _,_
field
π₁ : A
π₂ : B π₁
open Σ public
∃ : ∀ {a b} {A : Set a} → (A → Set b) → Set (a ⊔ᴸ b)
∃ = Σ _
infix 2 _×_
_×_ : ∀ {a b} (A : Set a) (B : Set b) → Set (a ⊔ᴸ b)
A × B = Σ A (λ _ → B)
-- Elimination for disjoint unions.
elim⊎ : ∀ {a b c} {A : Set a} {B : Set b} {C : Set c}
→ A ⊎ B → (A → C) → (B → C) → C
elim⊎ (ι₁ x) f g = f x
elim⊎ (ι₂ y) f g = g y
-- Double-argument K combinator.
K² : ∀ {a b c} {A : Set a} {B : Set b} {C : Set c}
→ A → B → C → A
K² x _ _ = x
-- Triple-argument congruence.
cong³ : ∀ {a b c d} {A : Set a} {B : Set b} {C : Set c} {D : Set d}
(f : A → B → C → D) {x x′ y y′ z z′}
→ x ≡ x′ → y ≡ y′ → z ≡ z′ → f x y z ≡ f x′ y′ z′
cong³ f refl refl refl = refl
-- Iteration and recursion for naturals.
itᴺ : ∀ {a} {A : Set a} → ℕ → (A → A) → A → A
itᴺ zero f x = x
itᴺ (suc n) f x = f (itᴺ n f x)
recᴺ : ∀ {a} {A : Set a} → ℕ → (ℕ → A → A) → A → A
recᴺ zero f x = x
recᴺ (suc n) f x = f n (recᴺ n f x)
-- Iteration and recursion for lists.
itᴸ : ∀ {a b} {A : Set a} {B : Set b} → List A → (A → B → B) → B → B
itᴸ [] f x = x
itᴸ (k ∷ ks) f x = f k (itᴸ ks f x)
recᴸ : ∀ {a b} {A : Set a} {B : Set b} → List A → (A → List A → B → B) → B → B
recᴸ [] f x = x
recᴸ (k ∷ ks) f x = f k ks (recᴸ ks f x)
-- Composition, supremum, and infimum for relations.
module _ {W : Set} where
_⨾_ : (W → W → Set) → (W → W → Set) → (W → W → Set)
_R_ ⨾ _Q_ = λ w w′ → ∃ (λ v → w R v × v Q w′)
_⊔_ : (W → W → Set) → (W → W → Set) → (W → W → Set)
_R_ ⊔ _Q_ = λ w w′ → ∃ (λ v → w R v × w′ Q v)
_⊓_ : (W → W → Set) → (W → W → Set) → (W → W → Set)
_R_ ⊓ _Q_ = λ w w′ → ∃ (λ v → v R w × v Q w′)
|
alloy4fun_models/trashltl/models/11/t567kyqgdpx7xFHe5.als | Kaixi26/org.alloytools.alloy | 0 | 323 | <filename>alloy4fun_models/trashltl/models/11/t567kyqgdpx7xFHe5.als<gh_stars>0
open main
pred idt567kyqgdpx7xFHe5_prop12 {
some f:File | (eventually f in Trash) implies (always f in Trash)
}
pred __repair { idt567kyqgdpx7xFHe5_prop12 }
check __repair { idt567kyqgdpx7xFHe5_prop12 <=> prop12o } |
audio/sfx/noise_instrument09_2.asm | opiter09/ASM-Machina | 1 | 102697 | <filename>audio/sfx/noise_instrument09_2.asm
SFX_Noise_Instrument09_2_Ch8:
noise_note 0, 8, 2, 35
sound_ret
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c4/c4a014a.ada | best08618/asylo | 7 | 29046 | <reponame>best08618/asylo
-- C4A014A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- CHECK THAT ROUNDING IS DONE CORRECTLY FOR STATIC UNIVERSAL REAL
-- EXPRESSIONS.
-- JBG 5/3/85
-- JBG 11/3/85 DECLARE INTEGER CONSTANTS INSTEAD OF UNIVERSAL INTEGER
-- DTN 11/27/91 DELETED SUBPART (B).
WITH REPORT; USE REPORT;
PROCEDURE C4A014A IS
C15 : CONSTANT := 1.5;
C25 : CONSTANT := 2.5;
CN15 : CONSTANT := -1.5;
CN25 : CONSTANT := -2.5;
C15R : CONSTANT INTEGER := INTEGER(C15);
C25R : CONSTANT INTEGER := INTEGER(C25);
CN15R : CONSTANT INTEGER := INTEGER(CN15);
CN25R : CONSTANT INTEGER := INTEGER(CN25);
C15_1 : BOOLEAN := 1 = C15R;
C15_2 : BOOLEAN := 2 = C15R;
C25_2 : BOOLEAN := 2 = C25R;
C25_3 : BOOLEAN := 3 = C25R;
CN15_N1 : BOOLEAN := -1 = CN15R;
CN15_N2 : BOOLEAN := -2 = CN15R;
CN25_N2 : BOOLEAN := -2 = CN25R;
CN25_N3 : BOOLEAN := -3 = CN25R;
BEGIN
TEST ("C4A014A", "CHECK ROUNDING TO INTEGER FOR UNIVERSAL REAL " &
"EXPRESSIONS");
IF 1 /= INTEGER(1.4) THEN
FAILED ("INTEGER(1.4) DOES NOT EQUAL 1");
END IF;
IF 2 /= INTEGER(1.6) THEN
FAILED ("INTEGER(1.6) DOES NOT EQUAL 2");
END IF;
IF -1 /= INTEGER(-1.4) THEN
FAILED ("INTEGER(-1.4) DOES NOT EQUAL -1");
END IF;
IF -2 /= INTEGER(-1.6) THEN
FAILED ("INTEGER(-1.6) DOES NOT EQUAL -2");
END IF;
IF NOT (C15_1 OR C15_2) OR (NOT (C25_2 OR C25_3)) THEN
FAILED ("ROUNDING OF POSITIVE VALUES NOT CORRECT");
END IF;
IF NOT (CN15_N1 OR CN15_N2) OR (NOT (CN25_N2 OR CN25_N3)) THEN
FAILED ("ROUNDING OF NEGATIVE VALUES NOT CORRECT");
END IF;
RESULT;
END C4A014A;
|
examples/lib/Data/Real/Base.agda | shlevy/agda | 1,989 | 8977 | <filename>examples/lib/Data/Real/Base.agda
module Data.Real.Base where
import Prelude
import Data.Rational
import Data.Nat as Nat
import Data.Bits
import Data.Bool
import Data.Maybe
import Data.Integer
import Data.List
import Data.Real.Gauge
open Prelude
open Data.Rational hiding (_-_; !_!)
open Data.Bits
open Data.Bool
open Data.List
open Data.Integer
hiding (-_; _+_; _≥_; _≤_; _>_; _<_; _==_)
renaming ( _*_ to _*'_ )
open Nat using (Nat; zero; suc)
open Data.Real.Gauge using (Gauge)
Base = Rational
bitLength : Int -> Int
bitLength x = pos (nofBits ! x !) - pos 1
approxBase : Base -> Gauge -> Base
approxBase x e = help err
where
num = numerator e
den = denominator e
err = bitLength (den - pos 1) - bitLength num
help : Int -> Base
help (pos (suc n)) = round (x * fromNat k) % pos k
where
k = shiftL 1 (suc n)
help (pos zero) = x
help (neg n) = fromInt $ (round $ x / fromInt k) *' k
where
k = pos (shiftL 1 ! neg n !)
powers : Nat -> Base -> List Base
powers n x = iterate n (_*_ x) x
sumBase : List Base -> Base
sumBase xs = foldr _+_ (fromNat 0) xs
|
src/XenobladeChroniclesX/Mods/BattleQteDollLost/patch_qte_lostdoll.asm | lilystudent2016/cemu_graphic_packs | 1,002 | 174423 | <filename>src/XenobladeChroniclesX/Mods/BattleQteDollLost/patch_qte_lostdoll.asm<gh_stars>1000+
[XCX_QTE_DOLLLOST_ALL] #################################################################################################
moduleMatches = 0xF882D5CF, 0x30B6E091, 0xAB97DE6B ; 1.0.1E, 1.0.2U, 1.0.1U
0x027F9464 = SetInsure:
0x023EEFB0 = getPropAccessor:
.origin = codecave
_setDestructionExcellent:
; QTE result is Excellent, so we just cancel the Skell destruction,
; whatever the state of the insurance
lwz r4, 0(r3)
li r3, 0
stb r3, 0x171(r4) ; 0 = Skell not destroyed
blr
_setDestructionGood:
; QTE result is Good, we cancel the Skell destruction IF insurance has not expired
mflr r0 ; get LR pointer
stwu r1, -0x10(r1) ; create more space in the stack
stw r31, 0xC(r1) ; save r31 in the stack
stw r30, 0x8(r1) ; save r30 in the stack
stw r0, 0x14(r1) ; save LR pointer
mr r3, r30
bl getPropAccessor
cmpwi r3, 0
beq _setDestructionGoodExit
lwz r4, 0(r3)
lbz r3, 0x171(r4) ; 0 = Skell not destroyed, 1 = insurance policy valid, 2 = insurance policy expired
cmpwi r3, 2
beq _skipCancel ; insurance policy has expired, let the Skell being destroyed
li r3, 0
stb r3, 0x171(r4) ; skell has insurance policy, cancel destruction
_skipCancel:
lhz r3, 0x16E(r4)
bl SetInsure ; apply the new Skell status
_setDestructionGoodExit:
lwz r0, 0x14(r1) ; restore old value for LR pointer from stack
lwz r30, 0x8(r1) ; restore r30 from stack
lwz r31, 0xC(r1) ; restore r31 from stack
mtlr r0 ; restore LR pointer
addi r1, r1, 0x10 ; delete extra space in the stack
mr r3, r31 ; restore r3 from r31 saved in the stack
blr
; ----------------------------------------------------------------------------
; WHO : Battle::CSoulVoiceButtonChallenge::applyResult((void))
; WHAT : Cancel Skell destruction if insurance is still valid (or if QTE result is Excellent)
0x0209879C = bla _setDestructionExcellent
0x02098804 = bla _setDestructionGood
|
programs/oeis/212/A212669.asm | jmorken/loda | 1 | 161388 | <filename>programs/oeis/212/A212669.asm<gh_stars>1-10
; A212669: a(n) = 2/15 * (32*n^5 + 80*n^4 + 40*n^3 - 20*n^2 + 3*n).
; 18,340,2022,7400,20602,48060,99022,186064,325602,538404,850102,1291704,1900106,2718604,3797406,5194144,6974386,9212148,11990406,15401608,19548186,24543068,30510190,37585008,45915010,55660228,66993750,80102232,95186410,112461612,132158270,154522432,179816274,208318612,240325414,276150312,316125114,360600316,409945614,464550416,524824354,591197796,664122358,744071416,831540618,927048396,1031136478,1144370400,1267340018,1400660020,1544970438,1700937160,1869252442,2050635420,2245832622,2455618480,2680795842,2922196484,3180681622,3457142424,3752500522,4067708524,4403750526,4761642624,5142433426,5547204564,5977071206,6433182568,6916722426,7428909628,7970998606,8544279888,9150080610,9789765028,10464735030,11176430648,11926330570,12715952652,13546854430,14420633632,15338928690,16303419252,17315826694,18377914632,19491489434,20658400732,21880541934,23159850736,24498309634,25897946436,27360834774,28889094616,30484892778,32150443436,33888008638,35699898816,37588473298,39556140820,41605360038,43738640040,45958540858,48267673980,50668702862,53164343440,55757364642,58450588900,61246892662,64149206904,67160517642,70283866444,73522350942,76879125344,80357400946,83960446644,87691589446,91554214984,95551768026,99687752988,103965734446,108389337648,112962249026,117688216708,122571051030,127614625048,132822875050,138199801068,143749467390,149476003072,155383602450,161476525652,167759099110,174235716072,180910837114,187788990652,194874773454,202172851152,209687958754,217424901156,225388553654,233583862456,242015845194,250689591436,259610263198,268783095456,278213396658,287906549236,297868010118,308103311240,318618060058,329417940060,340508711278,351896210800,363586353282,375585131460,387898616662,400532959320,413494389482,426789217324,440423833662,454404710464,468738401362,483431542164,498490851366,513923130664,529735265466,545934225404,562527064846,579520923408,596923026466,614740685668,632981299446,651652353528,670761421450,690316165068,710324335070,730793771488,751732404210,773148253492,795049430470,817444137672,840340669530,863747412892,887672847534,912125546672,937114177474,962647501572,988734375574,1015383751576,1042604677674,1070406298476,1098797855614,1127788688256,1157388233618,1187606027476,1218451704678,1249934999656,1282065746938,1314853881660,1348309440078,1382442560080,1417263481698,1452782547620,1489010203702,1525956999480,1563633588682,1602050729740,1641219286302,1681150227744,1721854629682,1763343674484,1805628651782,1848720958984,1892632101786,1937373694684,1982957461486,2029395235824,2076698961666,2124880693828,2173952598486,2223926953688,2274816149866,2326632690348,2379389191870,2433098385088,2487773115090,2543426341908,2600071141030,2657720703912,2716388338490,2776087469692,2836831639950,2898634509712,2961509857954,3025471582692,3090533701494,3156710351992,3224015792394,3292464401996,3362070681694,3432849254496,3504814866034,3577982385076,3652366804038,3727983239496,3804846932698,3882973250076,3962377683758,4043075852080,4125083500098,4208416500100
mul $0,2
mov $2,$0
mov $3,$0
add $0,1
add $3,5
bin $3,$2
mov $1,$3
mul $1,16
mov $3,$0
mul $0,2
lpb $0
mov $0,1
sub $1,9
add $1,$3
lpe
sub $1,8
div $1,2
mul $1,2
add $1,18
|
oeis/073/A073353.asm | neoneye/loda-programs | 11 | 86717 | ; A073353: Sum of n and its squarefree kernel.
; Submitted by <NAME>, https://github.com/ckrause
; 2,4,6,6,10,12,14,10,12,20,22,18,26,28,30,18,34,24,38,30,42,44,46,30,30,52,30,42,58,60,62,34,66,68,70,42,74,76,78,50,82,84,86,66,60,92,94,54,56,60,102,78,106,60,110,70,114,116,118,90,122,124,84,66,130,132,134,102,138,140,142,78,146,148,90,114,154,156,158,90,84,164,166,126,170,172,174,110,178,120,182,138,186,188,190,102,194,112,132,110
mov $2,$0
seq $0,75423 ; rad(n) - 1, where rad(n) is the squarefree kernel of n (A007947).
add $0,$2
add $0,2
|
programs/oeis/085/A085462.asm | karttu/loda | 1 | 244452 | <gh_stars>1-10
; A085462: Number of 5-tuples (v1,v2,v3,v4,v5) of nonnegative integers less than n such that v1<=v4, v1<=v5, v2<=v4 and v3<=v4.
; 1,14,77,273,748,1729,3542,6630,11571,19096,30107,45695,67158,96019,134044,183260,245973,324786,422617,542717,688688,864501,1074514,1323490,1616615,1959516,2358279,2819467,3350138,3957863,4650744,5437432,6327145,7329686,8455461,9715497,11121460,12685673,14421134,16341534,18461275,20795488,23360051,26171607,29247582,32606203,36266516,40248404,44572605,49260730,54335281,59819669,65738232,72116253,78979978,86356634,94274447,102762660,111851551,121572451,131957762,143040975,154856688,167440624,180829649,195061790,210176253,226213441,243214972,261223697,280283718,300440406,321740419,344231720,367963595,392986671,419352934,447115747,476329868,507051468,539338149,573248962,608844425,646186541,685338816,726366277,769335490,814314578,861373239,910582764,962016055,1015747643,1071853706,1130412087,1191502312,1255205608,1321604921,1390784934,1462832085,1537834585,1615882436,1697067449,1781483262,1869225358,1960391083,2055079664,2153392227,2255431815,2361303406,2471113931,2584972292,2702989380,2825278093,2951953354,3083132129,3218933445,3359478408,3504890221,3655294202,3810817802,3971590623,4137744436,4309413199,4486733075,4669842450,4858881951,5053994464,5255325152,5463021473,5677233198,5898112429,6125813617,6360493580,6602311521,6851429046,7108010182,7372221395,7644231608,7924212219,8212337119,8508782710,8813727923,9127354236,9449845692,9781388917,10122173138,10472390201,10832234589,11201903440,11581596565,11971516466,12371868354,12782860167,13204702588,13637609063,14081795819,14537481882,15004889095,15484242136,15975768536,16479698697,16996265910,17525706373,18068259209,18624166484,19193673225,19777027438,20374480126,20986285307,21612700032,22253984403,22910401591,23582217854,24269702555,24973128180,25692770356,26428907869,27181822682,27951799953,28739128053,29544098584,30367006397,31208149610,32067829626,32946351151,33844022212,34761154175,35698061763,36655063074,37632479599,38630636240,39649861328,40690486641,41752847422,42837282397,43944133793,45073747356,46226472369,47402661670,48602671670,49826862371,51075597384,52349243947,53648172943,54972758918,56323380099,57700418412,59104259500,60535292741,61993911266,63480511977,64995495565,66539266528,68112233189,69714807714,71347406130,73010448343,74704358156,76429563287,78186495387,79975590058,81797286871,83652029384,85540265160,87462445785,89419026886,91410468149,93437233337,95499790308,97598611033,99734171614,101906952302,104117437515,106366115856,108653480131,110980027367,113346258830,115752680043,118199800804,120688135204,123218201645,125790522858,128405625921,131064042277,133766307752,136512962573,139304551386,142141623274,145024731775,147954434900
mov $2,$0
add $2,1
mul $2,2
add $0,$2
cal $0,5585 ; 5-dimensional pyramidal numbers: n(n+1)(n+2)(n+3)(2n+3)/5!.
mul $0,2
mov $1,$0
sub $1,54
div $1,54
add $1,1
|
Source/Api/EtAlii.Ubigia.Api.Functional.Antlr/PathParser.g4 | vrenken/EtAlii.Ubigia | 2 | 5709 | parser grammar PathParser;
@header {
#pragma warning disable CS0115 // CS0115: no suitable method found to override
#pragma warning disable CS3021 // CS3021: The CLSCompliant attribute is not needed because the assembly does not have a CLSCompliant attribute
// ReSharper disable InvalidXmlDocComment
// ReSharper disable all
}
options {
language = CSharp;
tokenVocab = UbigiaLexer;
}
import Primitives ;
non_rooted_path : path_part+ ;
rooted_path : identifier COLON path_part* ;
path_part
: path_part_matcher_traversing_wildcard
| path_part_matcher_wildcard
| path_part_matcher_tag
| path_part_matcher_conditional
| path_part_matcher_constant
| path_part_matcher_variable
| path_part_matcher_identifier
| path_part_traverser_parents_all // Hierarchical
| path_part_traverser_parent
| path_part_traverser_children_all
| path_part_traverser_children
| path_part_traverser_downdates_oldest // Temporal
| path_part_traverser_downdates_multiple
| path_part_traverser_downdates_all
| path_part_traverser_downdate
| path_part_traverser_updates_newest
| path_part_traverser_updates_multiple
| path_part_traverser_updates_all
| path_part_traverser_updates
| path_part_traverser_previous_multiple // Sequential
| path_part_traverser_previous_first
| path_part_traverser_previous_single
| path_part_traverser_next_last
| path_part_traverser_next_multiple
| path_part_traverser_next_single
| path_part_matcher_typed
| path_part_matcher_regex
;
// Hierarchical
path_part_traverser_parents_all : FSLASH FSLASH; // //
path_part_traverser_parent : FSLASH ; // /
path_part_traverser_children_all : BSLASH BSLASH ; // \\
path_part_traverser_children : BSLASH ; // \
// Sequential
path_part_traverser_previous_first : LCHEVR LCHEVR ; // <<
path_part_traverser_previous_single : LCHEVR ; // <
path_part_traverser_previous_multiple : LCHEVR integer_literal_unsigned ; // <12
path_part_traverser_next_last : RCHEVR RCHEVR ; // >>
path_part_traverser_next_single : RCHEVR ; // >
path_part_traverser_next_multiple : RCHEVR integer_literal_unsigned ; // >12
// Temporal
path_part_traverser_downdates_oldest : LBRACE LBRACE ; // {{
path_part_traverser_downdates_all : LBRACE ASTERIKS ; // {*
path_part_traverser_downdate : LBRACE ; // {
path_part_traverser_downdates_multiple : LBRACE integer_literal_unsigned ; // {12
path_part_traverser_updates_newest : RBRACE RBRACE ; // }}
path_part_traverser_updates_all : RBRACE ASTERIKS ; // }*
path_part_traverser_updates : RBRACE ; // }
path_part_traverser_updates_multiple : RBRACE integer_literal_unsigned ; // }12
// Identifier
path_part_matcher_identifier : UBIGIA_IDENTIFIER ;
path_part_matcher_typed : LBRACK identifier RBRACK ;
// Wildcards.
matcher_wildcard_quoted : string_quoted_non_empty? ASTERIKS string_quoted_non_empty? ;
matcher_wildcard_nonquoted : identifier? ASTERIKS identifier? ;
path_part_matcher_wildcard
: matcher_wildcard_quoted
| matcher_wildcard_nonquoted
;
path_part_matcher_traversing_wildcard : ASTERIKS integer_literal_unsigned ASTERIKS ;
path_part_matcher_tag_name_only : identifier HASHTAG ;
path_part_matcher_tag_tag_only : HASHTAG identifier ;
path_part_matcher_tag_and_name : identifier HASHTAG identifier ;
path_part_matcher_tag
: path_part_matcher_tag_name_only
| path_part_matcher_tag_tag_only
| path_part_matcher_tag_and_name
;
// Constant
path_part_matcher_constant_quoted : string_quoted_non_empty ;
path_part_matcher_constant_unquoted : (LETTER | DOT | DIGIT)+ ;
path_part_matcher_constant_identifier : identifier ;
path_part_matcher_constant_integer : integer_literal_unsigned ;
path_part_matcher_constant
: path_part_matcher_constant_quoted
| path_part_matcher_constant_unquoted
| path_part_matcher_constant_identifier
| path_part_matcher_constant_integer
;
// Regex.
path_part_matcher_regex : LBRACK string_quoted_non_empty RBRACK ;
// Variable
path_part_matcher_variable : DOLLAR identifier ;
// Conditional
path_part_matcher_conditional : DOT (path_part_matcher_condition AMPERSAND)* path_part_matcher_condition ;
path_part_matcher_condition : path_part_matcher_property WHITESPACE* path_part_matcher_condition_comparison WHITESPACE* path_part_matcher_value ;
path_part_matcher_property
: identifier
| string_quoted_non_empty
;
path_part_matcher_value : primitive_value ;
path_part_matcher_condition_comparison
: EXCLAMATION? EQUALS
| LCHEVR EQUALS?
| RCHEVR EQUALS?
;
|
software/atommc2/macros.asm | AtomicRoland/AtomFpga | 25 | 2654 | <filename>software/atommc2/macros.asm<gh_stars>10-100
;=================================================================
; macro definitions for AtoMMC
; Collected macros from all files into a single file
;=================================================================
;
; 2013-10-09 converted some of the macro calls to jsr calls where
; appropriate. -- PHS
;
.macro FNADDR addr
.byte >addr, <addr
.endmacro
.macro readportFAST port
.ifdef AVR
jsr WaitUntilWritten
.endif
lda port
.endmacro
.macro writeportFAST port
sta port
.ifdef AVR
jsr WaitUntilRead
.endif
.endmacro
.macro REPERROR addr
lda #<addr
sta $d5
lda #>addr
sta $d6
jmp reportFailure
.endmacro
; Note SLOWCMD used to take a port number, but since ALL calls used APORT_CMD
; it is more code size efficient to convert it to a subroutine call, that always
; uses ACMD_PORT.
.macro SLOWCMD
jsr SLOWCMD_SUB
.endmacro
.macro SLOWCMDI command
lda #command
SLOWCMD
.endmacro
; Fast command, command port write followed by interwrite delay on PIC,
; Simply an alias for SLOWCMD on AVR.
.macro FASTCMD
.ifndef AVR
writeportFAST ACMD_REG
jsr interwritedelay
lda ACMD_REG
.else
SLOWCMD
.endif
.endmacro
; Immediate version of fastcmd
.macro FASTCMDI command
lda #command
FASTCMD
.endmacro
;.macro PREPPUTTOB407
; jsr PREPPUTTOB407_SUB
;.endmacro
.macro SETRWPTR addr
lda #<addr
sta RWPTR
lda #>addr
sta RWPTR+1
.endmacro
; Subroutines for macros in util.asm
|
oeis/008/A008333.asm | neoneye/loda-programs | 11 | 246400 | ; A008333: Sum of divisors of p+1, p prime.
; 4,7,12,15,28,24,39,42,60,72,63,60,96,84,124,120,168,96,126,195,114,186,224,234,171,216,210,280,216,240,255,336,288,336,372,300,240,294,480,360,546,336,508,294,468,465,378,504,560,432,546,744,399,728,528,720,720,558,420,576,504,684,672,840,474,648,588,549,840,744,720,1170,744,648,840,1020,1008,600,816,756,1344,636,1240,768,1080,1064,1209,690,1152,930,1274,1512,930,1176,1092,1560,1296,1170,924,816
seq $0,6005 ; The odd prime numbers together with 1.
max $0,2
seq $0,203 ; a(n) = sigma(n), the sum of the divisors of n. Also called sigma_1(n).
|
sound/sfxasm/B8.asm | NatsumiFox/Sonic-3-93-Nov-03 | 7 | 12591 | B8_Header:
sHeaderInit ; Z80 offset is $D7A4
sHeaderPatch B8_Patches
sHeaderTick $01
sHeaderCh $01
sHeaderSFX $80, $05, B8_FM5, $F0, $00
B8_FM5:
sPatFM $00
ssModZ80 $01, $01, $F7, $EA
B8_Loop1:
dc.b nAb5, $02, $03, nRst, $02
saVolFM $06
sLoop $00, $0E, B8_Loop1
sStop
B8_Patches:
; Patch $00
; $45
; $3F, $4F, $FF, $4F, $18, $18, $17, $10
; $00, $00, $02, $06, $0B, $1C, $18, $1D
; $10, $1B, $1B, $02, $37, $80, $80, $80
spAlgorithm $05
spFeedback $00
spDetune $03, $0F, $04, $04
spMultiple $0F, $0F, $0F, $0F
spRateScale $00, $00, $00, $00
spAttackRt $18, $17, $18, $10
spAmpMod $00, $00, $00, $00
spSustainRt $00, $02, $00, $06
spSustainLv $01, $01, $01, $00
spDecayRt $0B, $18, $1C, $1D
spReleaseRt $00, $0B, $0B, $02
spTotalLv $37, $00, $00, $00
|
protostuff-parser/src/main/antlr4/io/protostuff/compiler/parser/ProtoParser.g4 | gagranov/protostuff-compiler | 40 | 3468 | <gh_stars>10-100
parser grammar ProtoParser;
options {
tokenVocab = ProtoLexer;
}
proto
// syntax should be first statement in the file
: syntaxStatement?
( packageStatement
| importStatement
| optionEntry
| enumBlock
| messageBlock
| extendBlock
| serviceBlock)*
EOF
;
syntaxStatement
: SYNTAX ASSIGN syntaxName SEMICOLON
;
syntaxName
: STRING_VALUE
;
packageStatement
: PACKAGE packageName SEMICOLON
;
packageName
: fullIdent
;
importStatement
: IMPORT PUBLIC? fileReference SEMICOLON
;
fileReference
: STRING_VALUE
;
optionEntry
: OPTION option SEMICOLON
;
enumBlock
: ENUM enumName LCURLY
(enumField
| optionEntry
| reservedFieldRanges
| reservedFieldNames)*
RCURLY SEMICOLON?
;
enumName
: ident
;
enumField
: enumFieldName ASSIGN enumFieldValue fieldOptions? SEMICOLON
;
enumFieldName
: ident
;
enumFieldValue
: INTEGER_VALUE
;
extendBlock
: EXTEND typeReference LCURLY extendBlockEntry* RCURLY SEMICOLON?
;
extendBlockEntry
: field
| groupBlock
;
serviceBlock
: SERVICE serviceName LCURLY (rpcMethod | optionEntry)* RCURLY SEMICOLON?
;
serviceName
: ident
;
rpcMethod
: RPC rpcName LPAREN rpcType RPAREN
RETURNS LPAREN rpcType RPAREN (LCURLY optionEntry* RCURLY)? SEMICOLON?
;
rpcName
: ident
;
rpcType
: STREAM? typeReference
;
messageBlock
: MESSAGE messageName LCURLY
(field
| optionEntry
| messageBlock
| enumBlock
| extensions
| extendBlock
| groupBlock
| oneof
| map
| reservedFieldRanges
| reservedFieldNames)*
RCURLY SEMICOLON?
;
messageName
: ident
;
oneof
: ONEOF oneofName LCURLY (field | groupBlock | optionEntry)* RCURLY SEMICOLON?
;
oneofName
: ident
;
map
: MAP LT mapKey COMMA mapValue GT fieldName ASSIGN tag fieldOptions? SEMICOLON
;
mapKey
: INT32
| INT64
| UINT32
| UINT64
| SINT32
| SINT64
| FIXED32
| FIXED64
| SFIXED32
| SFIXED64
| BOOL
| STRING
;
mapValue
: typeReference
;
tag
: INTEGER_VALUE
;
groupBlock
: fieldModifier? GROUP groupName ASSIGN tag LCURLY
(field
| optionEntry
| messageBlock
| enumBlock
| extensions
| extendBlock
| groupBlock)*
RCURLY SEMICOLON?
;
groupName
: ident
;
extensions
: EXTENSIONS range (COMMA range)* SEMICOLON
;
range
: rangeFrom ( TO ( rangeTo | MAX ) )?
;
rangeFrom
: INTEGER_VALUE
;
rangeTo
: INTEGER_VALUE
;
reservedFieldRanges
: RESERVED range (COMMA range)* SEMICOLON
;
reservedFieldNames
: RESERVED reservedFieldName (COMMA reservedFieldName)* SEMICOLON
;
reservedFieldName
: STRING_VALUE
;
field
: fieldModifier? typeReference fieldName ASSIGN tag fieldOptions? SEMICOLON
;
fieldName
: ident
;
fieldModifier
: OPTIONAL
| REQUIRED
| REPEATED
;
typeReference
: DOUBLE
| FLOAT
| INT32
| INT64
| UINT32
| UINT64
| SINT32
| SINT64
| FIXED32
| FIXED64
| SFIXED32
| SFIXED64
| BOOL
| STRING
| BYTES
| DOT? ident (DOT ident)*
;
fieldOptions
: LSQUARE (option (COMMA option)* )? RSQUARE
;
option
: fieldRerefence ASSIGN optionValue
;
fieldRerefence
: standardFieldRerefence | LPAREN customFieldReference RPAREN
(DOT (standardFieldRerefence | LPAREN customFieldReference RPAREN))*
;
standardFieldRerefence
: ident
;
customFieldReference
: DOT? ident (DOT ident)*
;
optionValue
: INTEGER_VALUE
| FLOAT_VALUE
| BOOLEAN_VALUE
| STRING_VALUE
| IDENT
| textFormat
;
textFormat
: LCURLY textFormatEntry* RCURLY
;
textFormatOptionName
: ident
| LSQUARE typeReference RSQUARE
;
textFormatEntry
: textFormatOptionName COLON textFormatOptionValue
| textFormatOptionName textFormat
;
textFormatOptionValue
: INTEGER_VALUE
| FLOAT_VALUE
| BOOLEAN_VALUE
| STRING_VALUE
| IDENT
;
fullIdent
: ident (DOT ident)*
;
ident
: IDENT
| PACKAGE
| SYNTAX
| IMPORT
| PUBLIC
| OPTION
| MESSAGE
| GROUP
| OPTIONAL
| REQUIRED
| REPEATED
| ONEOF
| EXTEND
| EXTENSIONS
| TO
| MAX
| RESERVED
| ENUM
| SERVICE
| RPC
| RETURNS
| STREAM
| MAP
| BOOLEAN_VALUE
| DOUBLE
| FLOAT
| INT32
| INT64
| UINT32
| UINT64
| SINT32
| SINT64
| FIXED32
| FIXED64
| SFIXED32
| SFIXED64
| BOOL
| STRING
| BYTES
; |
old/Algebra/GroupSets.agda | timjb/HoTT-Agda | 294 | 5733 | {-# OPTIONS --without-K #-}
open import Base
open import Algebra.Groups
{-
The definition of G-sets. Thanks to <NAME>.
-}
module Algebra.GroupSets {i} (grp : group i) where
private
module G = group grp
-- The right group action with respect to the group [grp].
-- [Y] should be some set, but that condition is not needed
-- in the definition.
record action (Y : Set i) : Set i where
constructor act[_,_,_]
field
_∙_ : Y → G.carrier → Y
right-unit : ∀ y → y ∙ G.e ≡ y
assoc : ∀ y p₁ p₂ → (y ∙ p₁) ∙ p₂ ≡ y ∙ (p₁ G.∙ p₂)
{-
action-eq : ∀ {Y} ⦃ _ : is-set Y ⦄ {act₁ act₂ : action Y}
→ action._∙_ act₁ ≡ action._∙_ act₂ → act₁ ≡ act₂
action-eq ∙≡ =
-}
-- The definition of a G-set. A set [carrier] equipped with
-- a right group action with respect to [grp].
record gset : Set (suc i) where
constructor gset[_,_,_]
field
carrier : Set i
act : action carrier
set : is-set carrier
open action act public
-- A convenient tool to compare two G-sets. Many data are
-- just props and this function do the coversion for them
-- for you. You only need to show the non-trivial parts.
gset-eq : ∀ {gs₁ gs₂ : gset} (carrier≡ : gset.carrier gs₁ ≡ gset.carrier gs₂)
→ (∙≡ : transport (λ Y → Y → G.carrier → Y) carrier≡ (action._∙_ (gset.act gs₁))
≡ action._∙_ (gset.act gs₂))
→ gs₁ ≡ gs₂
gset-eq
{gset[ Y , act[ ∙ , unit₁ , assoc₁ ] , set₁ ]}
{gset[ ._ , act[ ._ , unit₂ , assoc₂ ] , set₂ ]}
refl refl =
gset[ Y , act[ ∙ , unit₁ , assoc₁ ] , set₁ ]
≡⟨ ap (λ unit → gset[ Y , act[ ∙ , unit , assoc₁ ] , set₁ ])
$ prop-has-all-paths (Π-is-prop λ _ → set₁ _ _) _ _ ⟩
gset[ Y , act[ ∙ , unit₂ , assoc₁ ] , set₁ ]
≡⟨ ap (λ assoc → gset[ Y , act[ ∙ , unit₂ , assoc ] , set₁ ])
$ prop-has-all-paths (Π-is-prop λ _ → Π-is-prop λ _ → Π-is-prop λ _ → set₁ _ _) _ _ ⟩
gset[ Y , act[ ∙ , unit₂ , assoc₂ ] , set₁ ]
≡⟨ ap (λ set → gset[ Y , act[ ∙ , unit₂ , assoc₂ ] , set ])
$ prop-has-all-paths is-set-is-prop _ _ ⟩∎
gset[ Y , act[ ∙ , unit₂ , assoc₂ ] , set₂ ]
∎
|
ex7.asm | JLJL0308/x86_Assembly | 0 | 92146 | <gh_stars>0
global _start
_start:
call func
mov eax, 1
int 0x80
func:
mov ebx, 42
ret
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_467.asm | ljhsiun2/medusa | 9 | 174906 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r13
push %r8
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0xe6db, %rdx
nop
nop
inc %r8
movb (%rdx), %al
nop
nop
xor $9760, %r13
lea addresses_normal_ht+0x1c5bb, %r11
nop
nop
nop
nop
nop
sub $16492, %rdx
mov (%r11), %r10w
and $40053, %r11
lea addresses_UC_ht+0x1179b, %rdx
nop
nop
cmp $62227, %rsi
movups (%rdx), %xmm1
vpextrq $0, %xmm1, %r11
nop
nop
sub %r8, %r8
lea addresses_WT_ht+0xcbb, %r13
clflush (%r13)
nop
nop
nop
and $40847, %r11
mov (%r13), %si
cmp %rsi, %rsi
lea addresses_WC_ht+0x305b, %rsi
lea addresses_UC_ht+0xb13, %rdi
nop
sub %r8, %r8
mov $99, %rcx
rep movsq
and $49953, %r8
lea addresses_WC_ht+0xb383, %rdx
nop
nop
inc %rsi
movl $0x61626364, (%rdx)
nop
nop
xor $27804, %rax
lea addresses_A_ht+0x4ebb, %rsi
lea addresses_WC_ht+0x11dbb, %rdi
nop
nop
nop
nop
nop
lfence
mov $2, %rcx
rep movsw
dec %r11
lea addresses_A_ht+0x167bb, %rsi
lea addresses_D_ht+0x379d, %rdi
nop
cmp %r11, %r11
mov $10, %rcx
rep movsl
nop
nop
nop
nop
nop
add $29135, %r10
lea addresses_normal_ht+0x657b, %rax
nop
mfence
mov $0x6162636465666768, %r11
movq %r11, %xmm4
movups %xmm4, (%rax)
nop
nop
nop
nop
nop
inc %rsi
lea addresses_A_ht+0x146b3, %rsi
nop
and $9780, %r8
movl $0x61626364, (%rsi)
nop
nop
nop
nop
nop
xor %rcx, %rcx
lea addresses_WT_ht+0x12f5b, %r10
nop
nop
cmp $35303, %rdx
movb $0x61, (%r10)
nop
nop
nop
nop
add $15692, %rdi
lea addresses_WT_ht+0x1deed, %r13
nop
cmp $65147, %r10
movb $0x61, (%r13)
nop
sub $53158, %r13
lea addresses_normal_ht+0xc91b, %rsi
lea addresses_A_ht+0x86cb, %rdi
inc %r11
mov $61, %rcx
rep movsq
nop
nop
nop
nop
nop
and %r11, %r11
lea addresses_WT_ht+0x185bb, %rax
nop
nop
nop
add $40471, %rsi
mov (%rax), %ecx
nop
nop
nop
nop
nop
cmp $23540, %rdx
lea addresses_A_ht+0x59f0, %rsi
lea addresses_UC_ht+0x13dbb, %rdi
xor $29340, %r11
mov $19, %rcx
rep movsb
nop
nop
nop
nop
nop
sub $31655, %r11
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r8
pop %r13
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %rbp
push %rcx
push %rdx
// Faulty Load
lea addresses_D+0x1abbb, %rbp
clflush (%rbp)
nop
nop
nop
and $19735, %r12
movb (%rbp), %cl
lea oracles, %rbp
and $0xff, %rcx
shlq $12, %rcx
mov (%rbp,%rcx,1), %rcx
pop %rdx
pop %rcx
pop %rbp
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_D', 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_D', 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_D_ht', 'congruent': 5}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_normal_ht', 'congruent': 7}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC_ht', 'congruent': 5}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WT_ht', 'congruent': 8}}
{'dst': {'same': False, 'congruent': 3, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 4, 'type': 'addresses_WC_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_WC_ht', 'congruent': 3}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 8, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}}
{'dst': {'same': False, 'congruent': 1, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_A_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_normal_ht', 'congruent': 6}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 4, 'type': 'addresses_A_ht', 'congruent': 3}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 1, 'type': 'addresses_WT_ht', 'congruent': 5}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_WT_ht', 'congruent': 1}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 3, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 2, 'type': 'addresses_normal_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_WT_ht', 'congruent': 9}}
{'dst': {'same': True, 'congruent': 9, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_A_ht'}}
{'36': 21829}
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 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 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 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 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
*/
|
oeis/197/A197905.asm | neoneye/loda-programs | 11 | 29666 | <reponame>neoneye/loda-programs
; A197905: Ceiling((n+1/n)^6).
; 64,245,1372,5893,19771,54993,132811,287701,572043,1061521,1861243,3112581,5000731,7762993,11697771,17174293,24643051,34646961,47833243,64966021,86939643,114792721,149722891,193102293,246493771,311667793,390620091,485590021,599079643,733873521,893059243,1080048661,1298599851,1552839793,1847287771,2186879493,2576991931,3023468881,3532647243,4111384021,4767084043,5507728401,6341903611,7278831493,8328399771,9501193393,10808526571,12262475541,13875912043,15662537521,17636918043,19814519941
mov $2,$0
seq $0,197605 ; Floor( ( n + 1/n )^6 ).
add $1,$2
mov $3,$2
cmp $3,0
add $2,$3
div $1,$2
add $1,$0
sub $1,2
mov $4,1
seq $4,215862 ; Number of simple labeled graphs on n+2 nodes with exactly n connected components that are trees or cycles.
add $1,$4
sub $1,2
mov $0,$1
|
source/yaml.ads | ytomino/yaml-ada | 4 | 19965 | with Ada.IO_Exceptions;
private with C.yaml;
private with Ada.Finalization;
package YAML is
pragma Preelaborate;
pragma Linker_Options ("-lyaml");
function Version return String;
type Version_Directive is record
Major : Natural;
Minor : Natural;
end record;
type Tag_Directive is record
Handle : not null access constant String;
Prefix : not null access constant String;
end record;
type Tag_Directive_Array is array (Positive range <>) of Tag_Directive;
type Encoding is (Any, UTF_8, UTF_16LE, UTF_16BE);
type Line_Break is (Any, CR, LN, CRLN);
subtype Indent_Width is Integer range 1 .. 10;
subtype Line_Width is Integer range -1 .. Integer'Last;
type Mark is record
Index : Natural;
Line : Natural;
Column : Natural;
end record;
type Scalar_Style is
(Any, Plain, Single_Quoted, Double_Quoted, Literal, Folded);
type Sequence_Style is (Any, Block, Flow);
type Mapping_Style is (Any, Block, Flow);
package Event_Types is
type Event_Type is (
No_Event, -- An empty event.
Stream_Start, -- A STREAM-START event.
Stream_End, -- A STREAM-END event.
Document_Start, -- A DOCUMENT-START event.
Document_End, -- A DOCUMENT-END event.
Alias, -- An ALIAS event.
Scalar, -- A SCALAR event.
Sequence_Start, -- A SEQUENCE-START event.
Sequence_End, -- A SEQUENCE-END event.
Mapping_Start, -- A MAPPING-START event.
Mapping_End); -- A MAPPING-END event.
private
for Event_Type use (
No_Event =>
C.yaml.yaml_event_type_t'Enum_Rep (C.yaml.YAML_NO_EVENT),
Stream_Start =>
C.yaml.yaml_event_type_t'Enum_Rep (C.yaml.YAML_STREAM_START_EVENT),
Stream_End =>
C.yaml.yaml_event_type_t'Enum_Rep (C.yaml.YAML_STREAM_END_EVENT),
Document_Start =>
C.yaml.yaml_event_type_t'Enum_Rep (C.yaml.YAML_DOCUMENT_START_EVENT),
Document_End =>
C.yaml.yaml_event_type_t'Enum_Rep (C.yaml.YAML_DOCUMENT_END_EVENT),
Alias =>
C.yaml.yaml_event_type_t'Enum_Rep (C.yaml.YAML_ALIAS_EVENT),
Scalar =>
C.yaml.yaml_event_type_t'Enum_Rep (C.yaml.YAML_SCALAR_EVENT),
Sequence_Start =>
C.yaml.yaml_event_type_t'Enum_Rep (C.yaml.YAML_SEQUENCE_START_EVENT),
Sequence_End =>
C.yaml.yaml_event_type_t'Enum_Rep (C.yaml.YAML_SEQUENCE_END_EVENT),
Mapping_Start =>
C.yaml.yaml_event_type_t'Enum_Rep (C.yaml.YAML_MAPPING_START_EVENT),
Mapping_End =>
C.yaml.yaml_event_type_t'Enum_Rep (C.yaml.YAML_MAPPING_END_EVENT));
end Event_Types;
type Event_Type is new Event_Types.Event_Type;
type Event (Event_Type : YAML.Event_Type := No_Event) is record
case Event_Type is
when Stream_Start =>
Encoding : YAML.Encoding;
when Document_Start | Document_End =>
Implicit_Indicator : Boolean;
case Event_Type is
when Document_Start =>
Version_Directive : access constant YAML.Version_Directive;
Tag_Directives : access constant YAML.Tag_Directive_Array;
when others =>
null;
end case;
when Alias | Scalar | Sequence_Start | Mapping_Start =>
Anchor : access constant String;
case Event_Type is
when Scalar | Sequence_Start | Mapping_Start =>
Tag : access constant String;
case Event_Type is
when Scalar =>
Value : not null access constant String;
Plain_Implicit_Tag : Boolean;
Quoted_Implicit_Tag : Boolean;
Scalar_Style : YAML.Scalar_Style;
when Sequence_Start | Mapping_Start =>
Implicit_Tag : Boolean;
case Event_Type is
when Sequence_Start =>
Sequence_Style : YAML.Sequence_Style;
when Mapping_Start =>
Mapping_Style : YAML.Mapping_Style;
when others =>
null;
end case;
when others =>
null;
end case;
when others =>
null;
end case;
when No_Event | Stream_End | Sequence_End | Mapping_End =>
null;
end case;
end record;
-- scalar
Binary_Tag : constant String := "tag:yaml.org,2002:binary";
Boolean_Tag : constant String := "tag:yaml.org,2002:bool";
Float_Tag : constant String := "tag:yaml.org,2002:float"; -- Floating-Point
Integer_Tag : constant String := "tag:yaml.org,2002:int";
Merge_Key_Tag : constant String := "tag:yaml.org,2002:merge";
Null_Tag : constant String := "tag:yaml.org,2002:null";
String_Tag : constant String := "tag:yaml.org,2002:str";
Time_Tag : constant String := "tag:yaml.org,2002:timestamp"; -- Timestamp
Value_Key_Tag : constant String := "tag:yaml.org,2002:value";
YAML_Encoding_Key_Tag : constant String := "tag:yaml.org,2002:yaml";
-- sequence
Ordered_Mapping_Tag : constant String := "tag:yaml.org,2002:omap";
Pairs_Tag : constant String := "tag:yaml.org,2002:pairs";
Sequence_Tag : constant String := "tag:yaml.org,2002:seq";
-- mapping
Mapping_Tag : constant String := "tag:yaml.org,2002:map"; -- Unordered Mapping
Set_Tag : constant String := "tag:yaml.org,2002:set";
-- parser
type Parsing_Entry_Type is limited private;
pragma Preelaborable_Initialization (Parsing_Entry_Type);
function Is_Assigned (Parsing_Entry : Parsing_Entry_Type) return Boolean;
pragma Inline (Is_Assigned);
type Event_Reference_Type (
Element : not null access constant Event) is null record
with Implicit_Dereference => Element;
type Mark_Reference_Type (
Element : not null access constant Mark) is null record
with Implicit_Dereference => Element;
function Value (Parsing_Entry : aliased Parsing_Entry_Type)
return Event_Reference_Type;
function Start_Mark (Parsing_Entry : aliased Parsing_Entry_Type)
return Mark_Reference_Type;
function End_Mark (Parsing_Entry : aliased Parsing_Entry_Type)
return Mark_Reference_Type;
pragma Inline (Value);
pragma Inline (Start_Mark);
pragma Inline (End_Mark);
type Parser (<>) is limited private;
function Create (
Input : not null access procedure (Item : out String; Last : out Natural))
return Parser;
procedure Set_Encoding (Object : in out Parser; Encoding : in YAML.Encoding);
procedure Get (
Object : in out Parser;
Process : not null access procedure (
Event : in YAML.Event;
Start_Mark, End_Mark : in Mark));
procedure Get (
Object : in out Parser;
Parsing_Entry : out Parsing_Entry_Type);
procedure Get_Document_Start (Object : in out Parser);
procedure Get_Document_End (Object : in out Parser);
procedure Finish (Object : in out Parser);
function Last_Error_Mark (Object : Parser) return Mark;
function Last_Error_Message (Object : Parser) return String;
-- emitter
type Emitter (<>) is limited private;
function Create (Output : not null access procedure (Item : in String))
return Emitter;
procedure Flush (Object : in out Emitter);
procedure Set_Encoding (
Object : in out Emitter;
Encoding : in YAML.Encoding);
procedure Set_Canonical (Object : in out Emitter; Canonical : in Boolean);
procedure Set_Indent (Object : in out Emitter; Indent : in Indent_Width);
procedure Set_Width (Object : in out Emitter; Width : in Line_Width);
procedure Set_Unicode (Object : in out Emitter; Unicode : in Boolean);
procedure Set_Break (Object : in out Emitter; Break : in Line_Break);
procedure Put (Object : in out Emitter; Event : in YAML.Event);
procedure Put_Document_Start (
Object : in out Emitter;
Implicit_Indicator : in Boolean := False;
Version_Directive : access constant YAML.Version_Directive := null;
Tag_Directives : access constant YAML.Tag_Directive_Array := null);
procedure Put_Document_End (
Object : in out Emitter;
Implicit_Indicator : in Boolean := True);
procedure Finish (Object : in out Emitter);
-- exceptions
Status_Error : exception
renames Ada.IO_Exceptions.Status_Error;
Use_Error : exception
renames Ada.IO_Exceptions.Use_Error;
Data_Error : exception
renames Ada.IO_Exceptions.Data_Error;
private
for Encoding use (
Any => C.yaml.yaml_encoding_t'Enum_Rep (C.yaml.YAML_ANY_ENCODING),
UTF_8 => C.yaml.yaml_encoding_t'Enum_Rep (C.yaml.YAML_UTF8_ENCODING),
UTF_16LE => C.yaml.yaml_encoding_t'Enum_Rep (C.yaml.YAML_UTF16LE_ENCODING),
UTF_16BE => C.yaml.yaml_encoding_t'Enum_Rep (C.yaml.YAML_UTF16BE_ENCODING));
for Line_Break use (
Any => C.yaml.yaml_break_t'Enum_Rep (C.yaml.YAML_ANY_BREAK),
CR => C.yaml.yaml_break_t'Enum_Rep (C.yaml.YAML_CR_BREAK),
LN => C.yaml.yaml_break_t'Enum_Rep (C.yaml.YAML_LN_BREAK),
CRLN => C.yaml.yaml_break_t'Enum_Rep (C.yaml.YAML_CRLN_BREAK));
for Scalar_Style use (
Any =>
C.yaml.yaml_scalar_style_t'Enum_Rep (C.yaml.YAML_ANY_SCALAR_STYLE),
Plain =>
C.yaml.yaml_scalar_style_t'Enum_Rep (C.yaml.YAML_PLAIN_SCALAR_STYLE),
Single_Quoted =>
C.yaml.yaml_scalar_style_t'Enum_Rep (C.yaml.YAML_SINGLE_QUOTED_SCALAR_STYLE),
Double_Quoted =>
C.yaml.yaml_scalar_style_t'Enum_Rep (C.yaml.YAML_DOUBLE_QUOTED_SCALAR_STYLE),
Literal =>
C.yaml.yaml_scalar_style_t'Enum_Rep (C.yaml.YAML_LITERAL_SCALAR_STYLE),
Folded =>
C.yaml.yaml_scalar_style_t'Enum_Rep (C.yaml.YAML_FOLDED_SCALAR_STYLE));
for Sequence_Style use (
Any =>
C.yaml.yaml_sequence_style_t'Enum_Rep (C.yaml.YAML_ANY_SEQUENCE_STYLE),
Block =>
C.yaml.yaml_sequence_style_t'Enum_Rep (C.yaml.YAML_BLOCK_SEQUENCE_STYLE),
Flow =>
C.yaml.yaml_sequence_style_t'Enum_Rep (C.yaml.YAML_FLOW_SEQUENCE_STYLE));
for Mapping_Style use (
Any =>
C.yaml.yaml_mapping_style_t'Enum_Rep (C.yaml.YAML_ANY_MAPPING_STYLE),
Block =>
C.yaml.yaml_mapping_style_t'Enum_Rep (C.yaml.YAML_BLOCK_MAPPING_STYLE),
Flow =>
C.yaml.yaml_mapping_style_t'Enum_Rep (C.yaml.YAML_FLOW_MAPPING_STYLE));
-- parser
type String_Constraint is record
First : Positive;
Last : Natural;
end record;
pragma Suppress_Initialization (String_Constraint);
type Uninitialized_Parsing_Data is limited record
Event : aliased YAML.Event;
Start_Mark, End_Mark : aliased Mark;
Version_Directive : aliased YAML.Version_Directive;
Anchor_Constraint : aliased String_Constraint;
Tag_Constraint : aliased String_Constraint;
Value_Constraint : aliased String_Constraint;
yaml_event : aliased C.yaml.yaml_event_t;
end record;
pragma Suppress_Initialization (Uninitialized_Parsing_Data);
type Parsed_Data_Type is limited record
-- uninitialized
U : aliased Uninitialized_Parsing_Data;
-- initialized
Delete : access procedure (Parsed_Data : in out Parsed_Data_Type) := null;
end record;
package Controlled_Parsing_Entries is
type Parsing_Entry_Type is limited private;
pragma Preelaborable_Initialization (Parsing_Entry_Type);
function Constant_Reference (Object : aliased YAML.Parsing_Entry_Type)
return not null access constant Parsed_Data_Type;
pragma Inline (Constant_Reference);
generic
type Result_Type (<>) is limited private;
with function Process (Raw : Parsed_Data_Type) return Result_Type;
function Query (Object : YAML.Parsing_Entry_Type) return Result_Type;
pragma Inline (Query);
generic
with procedure Process (Raw : in out Parsed_Data_Type);
procedure Update (Object : in out YAML.Parsing_Entry_Type);
pragma Inline (Update);
private
type Parsing_Entry_Type is limited new Ada.Finalization.Limited_Controlled
with record
Data : aliased Parsed_Data_Type;
end record;
overriding procedure Finalize (Object : in out Parsing_Entry_Type);
end Controlled_Parsing_Entries;
type Parsing_Entry_Type is new Controlled_Parsing_Entries.Parsing_Entry_Type;
package Controlled_Parsers is
type Parser is limited private;
generic
type Result_Type (<>) is limited private;
with function Process (Raw : not null access constant C.yaml.yaml_parser_t)
return Result_Type;
function Query (Object : YAML.Parser) return Result_Type;
pragma Inline (Query);
generic
with procedure Process (Raw : not null access C.yaml.yaml_parser_t);
procedure Update (Object : in out YAML.Parser);
pragma Inline (Update);
private
type Uninitialized_yaml_parser_t is record
X : aliased C.yaml.yaml_parser_t;
end record;
pragma Suppress_Initialization (Uninitialized_yaml_parser_t);
type Parser is limited new Ada.Finalization.Limited_Controlled
with record
Raw : aliased Uninitialized_yaml_parser_t;
end record;
overriding procedure Finalize (Object : in out Parser);
end Controlled_Parsers;
type Parser is new Controlled_Parsers.Parser;
-- emitter
package Controlled_Emitters is
type Emitter is limited private;
generic
with procedure Process (Raw : not null access C.yaml.yaml_emitter_t);
procedure Update (Object : in out YAML.Emitter);
pragma Inline (Update);
private
type Uninitialized_yaml_emitter_t is record
X : aliased C.yaml.yaml_emitter_t;
end record;
pragma Suppress_Initialization (Uninitialized_yaml_emitter_t);
type Emitter is limited new Ada.Finalization.Limited_Controlled
with record
Raw : aliased Uninitialized_yaml_emitter_t;
end record;
overriding procedure Finalize (Object : in out Emitter);
end Controlled_Emitters;
type Emitter is new Controlled_Emitters.Emitter;
-- exceptions
procedure Raise_Error (
Error : in C.yaml.yaml_error_type_t;
Problem : access constant C.char;
Mark : access constant C.yaml.yaml_mark_t);
pragma No_Return (Raise_Error);
end YAML;
|
programs/oeis/303/A303295.asm | karttu/loda | 0 | 9006 | <gh_stars>0
; A303295: a(n) is the maximum water retention of a height-3 length-n number parallelogram with maximum water area.
; 0,20,49,99,165,247,345,459,589,735,897,1075,1269,1479,1705,1947,2205,2479,2769,3075,3397,3735,4089,4459,4845,5247,5665,6099,6549,7015,7497,7995,8509,9039,9585,10147,10725,11319,11929,12555,13197,13855,14529,15219,15925,16647,17385,18139,18909,19695,20497,21315,22149,22999,23865,24747,25645,26559,27489,28435,29397,30375,31369,32379,33405,34447,35505,36579,37669,38775,39897,41035,42189,43359,44545,45747,46965,48199,49449,50715,51997,53295,54609,55939,57285,58647,60025,61419,62829,64255,65697,67155,68629,70119,71625,73147,74685,76239,77809,79395,80997,82615,84249,85899,87565,89247,90945,92659,94389,96135,97897,99675,101469,103279,105105,106947,108805,110679,112569,114475,116397,118335,120289,122259,124245,126247,128265,130299,132349,134415,136497,138595,140709,142839,144985,147147,149325,151519,153729,155955,158197,160455,162729,165019,167325,169647,171985,174339,176709,179095,181497,183915,186349,188799,191265,193747,196245,198759,201289,203835,206397,208975,211569,214179,216805,219447,222105,224779,227469,230175,232897,235635,238389,241159,243945,246747,249565,252399,255249,258115,260997,263895,266809,269739,272685,275647,278625,281619,284629,287655,290697,293755,296829,299919,303025,306147,309285,312439,315609,318795,321997,325215,328449,331699,334965,338247,341545,344859,348189,351535,354897,358275,361669,365079,368505,371947,375405,378879,382369,385875,389397,392935,396489,400059,403645,407247,410865,414499,418149,421815,425497,429195,432909,436639,440385,444147,447925,451719,455529,459355,463197,467055,470929,474819,478725,482647,486585,490539,494509,498495
mul $0,2
mov $1,$0
trn $1,3
lpb $0,1
sub $0,1
add $2,$1
add $2,5
lpe
mul $2,2
add $1,$2
|
programs/oeis/083/A083885.asm | neoneye/loda | 0 | 581 | <reponame>neoneye/loda
; A083885: (4^n+2^n+0^n+(-2)^n)/4
; 1,1,6,16,72,256,1056,4096,16512,65536,262656,1048576,4196352,16777216,67117056,268435456,1073774592,4294967296,17180000256,68719476736,274878431232,1099511627776,4398048608256,17592186044416,70368752566272,281474976710656,1125899940397056,4503599627370496,18014398643699712,72057594037927936,288230376688582656,1152921504606846976,4611686020574871552,18446744073709551616,73786976303428141056,295147905179352825856,1180591620751771041792,4722366482869645213696,18889465931616019808256,75557863725914323419136,302231454904207049490432,1208925819614629174706176,4835703278460715722080256,19342813113834066795298816,77371252455345063274217472,309485009821345068724781056,1237940039285415459271213056,4951760157141521099596496896,19807040628566225135874342912,79228162514264337593543950336,316912650057057913324129222656,1267650600228229401496703205376,5070602400912919857786626506752,20282409603651670423947251286016,81129638414606690702988259885056,324518553658426726783156020576256,1298074214633706943161421101268992,5192296858534827628530496329220096,20769187434139310658237173392736256,83076749736557242056487941267521536,332306998946228968802412517373509632
mov $4,2
mov $7,$0
lpb $4
mov $2,0
sub $4,1
add $0,$4
sub $0,1
add $2,$0
mov $5,2
pow $5,$2
mov $2,$5
div $2,3
mov $3,$4
mov $6,1
add $6,$2
mul $5,$6
mov $6,$5
lpb $3
mov $1,$6
sub $3,1
lpe
lpe
lpb $7
sub $1,$6
mov $7,0
lpe
mov $0,$1
|
tests/exec/for1.adb | xuedong/mini-ada | 0 | 4280 | with Ada.Text_IO; use Ada.Text_IO;
procedure Test is
begin
for I in 1 .. 10 loop Put('A'); end loop; New_Line;
for I in 10 .. 1 loop Put('B'); end loop; New_Line;
for I in reverse 1 .. 10 loop Put('C'); end loop; New_Line;
for I in reverse 10 .. 1 loop Put('D'); end loop; New_Line;
end;
-- Local Variables:
-- compile-command: "gnatmake for1.adb && ./for1"
-- End:
|
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_21829_1053.asm | ljhsiun2/medusa | 9 | 14293 | <reponame>ljhsiun2/medusa<filename>Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_21829_1053.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r15
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0xd4f7, %r10
clflush (%r10)
cmp %rcx, %rcx
movups (%r10), %xmm1
vpextrq $1, %xmm1, %r15
and %rbp, %rbp
lea addresses_WC_ht+0x16c37, %rbp
nop
nop
nop
nop
nop
cmp %r8, %r8
mov $0x6162636465666768, %rcx
movq %rcx, (%rbp)
nop
nop
add %rcx, %rcx
lea addresses_UC_ht+0x1c817, %rsi
lea addresses_WT_ht+0x17257, %rdi
clflush (%rdi)
nop
nop
nop
nop
add %r9, %r9
mov $26, %rcx
rep movsq
nop
nop
nop
nop
and $41061, %r8
lea addresses_WT_ht+0xf417, %rsi
nop
nop
xor $8796, %rcx
mov (%rsi), %ebp
nop
nop
nop
nop
cmp %r8, %r8
lea addresses_normal_ht+0xb677, %rdi
nop
and $52024, %rsi
movb (%rdi), %r15b
sub $19399, %rbp
lea addresses_WC_ht+0xd273, %rcx
nop
dec %r8
movups (%rcx), %xmm7
vpextrq $1, %xmm7, %rdi
nop
nop
cmp %r9, %r9
lea addresses_WT_ht+0x108e5, %rbp
add %rsi, %rsi
movw $0x6162, (%rbp)
nop
nop
add $54785, %r9
lea addresses_WC_ht+0xf017, %r15
nop
nop
nop
nop
inc %rdi
mov $0x6162636465666768, %r9
movq %r9, (%r15)
nop
nop
nop
add %rbp, %rbp
lea addresses_WC_ht+0x4a17, %rsi
lea addresses_UC_ht+0xd7a4, %rdi
nop
nop
nop
nop
and $43453, %r10
mov $97, %rcx
rep movsq
nop
nop
nop
and $53956, %rcx
lea addresses_WT_ht+0x13717, %r15
nop
nop
nop
inc %rsi
mov $0x6162636465666768, %rbp
movq %rbp, %xmm3
vmovups %ymm3, (%r15)
nop
nop
nop
nop
xor $65402, %r10
lea addresses_normal_ht+0x67f7, %rdi
nop
nop
nop
nop
inc %r15
movups (%rdi), %xmm4
vpextrq $0, %xmm4, %r10
nop
nop
sub %rsi, %rsi
lea addresses_A_ht+0x1917, %rbp
nop
nop
add $37730, %r10
movb (%rbp), %cl
nop
nop
nop
nop
nop
add %r9, %r9
lea addresses_A_ht+0xcf17, %rsi
lea addresses_A_ht+0xc017, %rdi
clflush (%rsi)
nop
nop
nop
cmp %r10, %r10
mov $63, %rcx
rep movsw
sub %rbp, %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r15
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r9
push %rax
push %rcx
push %rsi
// Store
lea addresses_WT+0x5c6b, %rsi
nop
nop
nop
and $60618, %r12
mov $0x5152535455565758, %rcx
movq %rcx, %xmm1
movups %xmm1, (%rsi)
nop
nop
nop
nop
nop
inc %rsi
// Faulty Load
lea addresses_A+0x11417, %r12
add $41812, %rsi
mov (%r12), %rax
lea oracles, %r12
and $0xff, %rax
shlq $12, %rax
mov (%r12,%rax,1), %rax
pop %rsi
pop %rcx
pop %rax
pop %r9
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_A', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_WT', 'same': False, 'AVXalign': False, 'congruent': 1}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_A', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 5}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 9}, 'dst': {'same': True, 'type': 'addresses_WT_ht', 'congruent': 3}}
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 9}}
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 4}}
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': True, 'congruent': 10}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 8}, 'dst': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 5}}
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 2}}
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_A_ht', 'same': True, 'AVXalign': False, 'congruent': 8}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_A_ht', 'congruent': 6}, 'dst': {'same': False, 'type': 'addresses_A_ht', 'congruent': 10}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
dv/65xxTest2_NmosOps.asm | luke-mckay/fluffy-octo-umbrella | 0 | 25077 | ; SPDX-License-Identifier: LGPL-2.1-or-later
;
; 6502 Compatible Processor Test Code
; Targets Documented 6502 Commands
; Copyright 2022, <NAME>.
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public
; License as published by the Free Software Foundation; either
; version 2.1 of the License, or (at your option) any later version.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; Lesser General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public
; License along with this library; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
; USA
; **************************************************************
; 64TASS
; cpu65xxTests.asm
; *************************************************************
* = $02
.dsection zp ;declare zero page section
.cerror * > $30, "Too many zero page variables"
* = $334
.dsection bss ;declare uninitialized variable section
.cerror * > $400, "Too many variables"
* = $0801
.dsection code ;declare code section
.cerror * > $1000, "Program too long!"
* = $1000
.dsection data ;declare data section
.cerror * > $2000, "Data too long!"
* = $FFF0
.dsection vectors ;declar vectors section
; .cerror * > $10, "Vectors too long!"
;−−−−−−−−−−−−−−−−−−−−
.section code
NOP
; Immediate operations (rough)
; 11 ADC, AND, CMP, CPX, CPY, EOR, LDA, LDX, LDY, ORA, SBC
; 11 0x69,0x29,0xC9,0xE0,0xC0,0x49,0xA9,0xA2,0xA0,0x09,0xE9
LDA $FF
LDX $FF
LDY $FF
LDA $55
LDX $55
LDY $CC
CMP $A5
CPX $A5
CPY $A5
CMP $55
CPX $55
CPY $CC
ADC $11
CMP $66
SBC $05
CMP $61
ORA $0A
CMP $6A
EOR $FF
CMP $95
AND $0F
CMP $95
; Implied operations (rough)
; 17 CLC, CLD, CLI, CLV, DEX, DEY, INX, INY, SEC, SED, SEI, TAX, TAY,
; 17 0x18,0xD8,0x58,0xB8,0xCA,0x88,0xE8,0xC8,0x38,0xF8,0x78,0xAA,0xA8
; TYA, TSX, TXA, TXS
; 0x98,0xBA,0x8A,0x9A
; Tested elsewhere *BRK,*NOP,*PHA,*PHP,*PLA,*PLP,*RTI,*RTS
CLC
CLD
CLI
CLV
INX
CPX $56
INY
CPY $CD
DEX
CPX $55
DEY
CPY $CC
TYA
CMP $CC
TAX
CPX $CC
TXS
LDA $00
LDX $00
TAY
TSX
TXA
CMP $CC
SEC
SED
LDA $55
ADC $35
SEI
CLC
CLD
CLI
.section data ;some data
label .null "message"
.send data
;jmp error
.section zp ;declare some more zero page variables
p3 .addr ? ;a pointer
.send zp
.send code
.section vectors
.byte $00
.byte $01
.byte $02
.byte $03
.byte $04
.byte $05
.byte $06
.byte $07
.byte $08
.byte $09
.byte $0A
.byte $0B
.byte $0C
.byte $0D
.byte $0E
.byte $0F
.send vectors
|
courses/fundamentals_of_ada/labs/solar_system/adv_170_multiple_inheritance/src/solar_system.ads | AdaCore/training_material | 15 | 3931 | -----------------------------------------------------------------------
-- Ada Labs --
-- --
-- Copyright (C) 2008-2009, AdaCore --
-- --
-- Labs is free software; you can redistribute it and/or modify it --
-- under the terms of the GNU General Public License as published by --
-- the Free Software Foundation; either version 2 of the License, or --
-- (at your option) any later version. --
-- --
-- This program is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. You should have received --
-- a copy of the GNU General Public License along with this program; --
-- if not, write to the Free Software Foundation, Inc., 59 Temple --
-- Place - Suite 330, Boston, MA 02111-1307, USA. --
-----------------------------------------------------------------------
with Display; use Display;
with Display.Basic; use Display.Basic;
package Solar_System is
-- define type Bodies_Enum as an enumeration of Sun, Earth, Moon, Satellite
type Bodies_Enum_T is (Sun, Earth, Moon, Satellite, Comet, Black_Hole, Asteroid_1, Asteroid_2);
type Body_T is private;
type Body_Access_T is access all Body_T;
type Bodies_Array_T is private;
function Get_Body (B : Bodies_Enum_T; Bodies : access Bodies_Array_T) return Body_Access_T;
procedure Init_Body (B : Body_Access_T;
Radius : Float;
Color : RGBA_T;
Distance : Float;
Angle : Float;
Speed : Float;
Turns_Around : Body_Access_T;
Visible : Boolean := True);
procedure Move_All (Bodies : access Bodies_Array_T);
private
-- define a type Body_Type to store every information about a body
-- X, Y, Distance, Speed, Angle, Radius, Color
type Body_T is record
X : Float := 0.0;
Y : Float := 0.0;
Distance : Float;
Speed : Float;
Angle : Float;
Radius : Float;
Color : RGBA_T;
Visible : Boolean := True;
Turns_Around : Body_Access_T;
end record;
-- define type Bodies_Array as an array of Body_Type indexed by bodies enumeration
type Bodies_Array_T is array (Bodies_Enum_T) of aliased Body_T;
procedure Move (Body_To_Move : Body_Access_T);
end Solar_System;
|
ArmPkg/Library/CompilerIntrinsicsLib/Arm/llsl.asm | KaoTuz/edk2-stable202108 | 9 | 23453 | <filename>ArmPkg/Library/CompilerIntrinsicsLib/Arm/llsl.asm
//------------------------------------------------------------------------------
//
// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
//
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
//------------------------------------------------------------------------------
INCLUDE AsmMacroExport.inc
;
;VOID
;EFIAPI
;__aeabi_llsl (
; IN VOID *Destination,
; IN VOID *Source,
; IN UINT32 Size
; );
;
RVCT_ASM_EXPORT __aeabi_llsl
SUBS r3,r2,#0x20
BPL {pc} + 0x18 ; 0x1c
RSB r3,r2,#0x20
LSL r1,r1,r2
ORR r1,r1,r0,LSR r3
LSL r0,r0,r2
BX lr
LSL r1,r0,r3
MOV r0,#0
BX lr
END
|
oeis/086/A086941.asm | neoneye/loda-programs | 11 | 171268 | ; A086941: a(n) = k where R(k+6) = 3.
; 24,294,2994,29994,299994,2999994,29999994,299999994,2999999994,29999999994,299999999994,2999999999994,29999999999994,299999999999994,2999999999999994,29999999999999994,299999999999999994,2999999999999999994,29999999999999999994,299999999999999999994,2999999999999999999994,29999999999999999999994,299999999999999999999994,2999999999999999999999994,29999999999999999999999994,299999999999999999999999994,2999999999999999999999999994,29999999999999999999999999994,299999999999999999999999999994
add $0,1
mov $1,10
pow $1,$0
sub $1,2
mul $1,3
mov $0,$1
|
bb-runtimes/arm/nordic/nrf51/svd/a-intnam.ads | JCGobbi/Nucleo-STM32G474RE | 0 | 462 | <gh_stars>0
--
-- Copyright (C) 2018, AdaCore
--
-- Copyright (c) 2013, Nordic Semiconductor ASA
-- 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 Nordic Semiconductor ASA 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.
--
-- This spec has been automatically generated from nrf51.svd
-- This is a version for the nRF51 reference description for radio MCU with
-- ARM 32-bit Cortex-M0 Microcontroller at 16MHz CPU clock MCU
package Ada.Interrupts.Names is
-- All identifiers in this unit are implementation defined
pragma Implementation_Defined;
----------------
-- Interrupts --
----------------
-- System tick
Sys_Tick : constant Interrupt_ID := -1;
POWER_CLOCK : constant Interrupt_ID := 0;
RADIO : constant Interrupt_ID := 1;
UART0 : constant Interrupt_ID := 2;
SPI0_TWI0 : constant Interrupt_ID := 3;
SPI1_TWI1 : constant Interrupt_ID := 4;
GPIOTE : constant Interrupt_ID := 6;
ADC : constant Interrupt_ID := 7;
TIMER0 : constant Interrupt_ID := 8;
TIMER1 : constant Interrupt_ID := 9;
TIMER2 : constant Interrupt_ID := 10;
RTC0 : constant Interrupt_ID := 11;
TEMP : constant Interrupt_ID := 12;
RNG : constant Interrupt_ID := 13;
ECB : constant Interrupt_ID := 14;
CCM_AAR : constant Interrupt_ID := 15;
WDT : constant Interrupt_ID := 16;
RTC1 : constant Interrupt_ID := 17;
QDEC : constant Interrupt_ID := 18;
LPCOMP : constant Interrupt_ID := 19;
SWI0 : constant Interrupt_ID := 20;
SWI1 : constant Interrupt_ID := 21;
SWI2 : constant Interrupt_ID := 22;
SWI3 : constant Interrupt_ID := 23;
SWI4 : constant Interrupt_ID := 24;
SWI5 : constant Interrupt_ID := 25;
end Ada.Interrupts.Names;
|
agda-stdlib/src/Data/Fin/Properties.agda | DreamLinuxer/popl21-artifact | 5 | 5793 | ------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties related to Fin, and operations making use of these
-- properties (or other properties not available in Data.Fin)
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Fin.Properties where
open import Category.Applicative using (RawApplicative)
open import Category.Functor using (RawFunctor)
open import Data.Bool.Base using (Bool; true; false; not; _∧_; _∨_)
open import Data.Empty using (⊥-elim)
open import Data.Fin.Base
open import Data.Fin.Patterns
open import Data.Nat.Base as ℕ using (ℕ; zero; suc; s≤s; z≤n; _∸_)
import Data.Nat.Properties as ℕₚ
open import Data.Unit using (tt)
open import Data.Product using (∃; ∃₂; ∄; _×_; _,_; map; proj₁; uncurry; <_,_>)
open import Data.Sum.Base using (_⊎_; inj₁; inj₂; [_,_])
open import Data.Sum.Properties using ([,]-map-commute; [,]-∘-distr)
open import Function.Base using (_∘_; id; _$_)
open import Function.Equivalence using (_⇔_; equivalence)
open import Function.Injection using (_↣_)
open import Relation.Binary as B hiding (Decidable)
open import Relation.Binary.PropositionalEquality as P
using (_≡_; _≢_; refl; sym; trans; cong; subst; module ≡-Reasoning)
open import Relation.Nullary.Decidable as Dec using (map′)
open import Relation.Nullary.Reflects
open import Relation.Nullary.Negation using (contradiction)
open import Relation.Nullary
using (Reflects; ofʸ; ofⁿ; Dec; _because_; does; proof; yes; no; ¬_)
open import Relation.Nullary.Product using (_×-dec_)
open import Relation.Nullary.Sum using (_⊎-dec_)
open import Relation.Unary as U
using (U; Pred; Decidable; _⊆_; Satisfiable; Universal)
open import Relation.Unary.Properties using (U?)
------------------------------------------------------------------------
-- Fin
------------------------------------------------------------------------
¬Fin0 : ¬ Fin 0
¬Fin0 ()
------------------------------------------------------------------------
-- Properties of _≡_
------------------------------------------------------------------------
suc-injective : ∀ {o} {m n : Fin o} → Fin.suc m ≡ suc n → m ≡ n
suc-injective refl = refl
infix 4 _≟_
_≟_ : ∀ {n} → B.Decidable {A = Fin n} _≡_
zero ≟ zero = yes refl
zero ≟ suc y = no λ()
suc x ≟ zero = no λ()
suc x ≟ suc y = map′ (cong suc) suc-injective (x ≟ y)
------------------------------------------------------------------------
-- Structures
≡-isDecEquivalence : ∀ {n} → IsDecEquivalence (_≡_ {A = Fin n})
≡-isDecEquivalence = record
{ isEquivalence = P.isEquivalence
; _≟_ = _≟_
}
------------------------------------------------------------------------
-- Bundles
≡-preorder : ℕ → Preorder _ _ _
≡-preorder n = P.preorder (Fin n)
≡-setoid : ℕ → Setoid _ _
≡-setoid n = P.setoid (Fin n)
≡-decSetoid : ℕ → DecSetoid _ _
≡-decSetoid n = record
{ isDecEquivalence = ≡-isDecEquivalence {n}
}
------------------------------------------------------------------------
-- toℕ
------------------------------------------------------------------------
toℕ-injective : ∀ {n} {i j : Fin n} → toℕ i ≡ toℕ j → i ≡ j
toℕ-injective {zero} {} {} _
toℕ-injective {suc n} {zero} {zero} eq = refl
toℕ-injective {suc n} {suc i} {suc j} eq =
cong suc (toℕ-injective (cong ℕ.pred eq))
toℕ-strengthen : ∀ {n} (i : Fin n) → toℕ (strengthen i) ≡ toℕ i
toℕ-strengthen zero = refl
toℕ-strengthen (suc i) = cong suc (toℕ-strengthen i)
toℕ-raise : ∀ {m} n (i : Fin m) → toℕ (raise n i) ≡ n ℕ.+ toℕ i
toℕ-raise zero i = refl
toℕ-raise (suc n) i = cong suc (toℕ-raise n i)
toℕ<n : ∀ {n} (i : Fin n) → toℕ i ℕ.< n
toℕ<n zero = s≤s z≤n
toℕ<n (suc i) = s≤s (toℕ<n i)
toℕ≤pred[n] : ∀ {n} (i : Fin n) → toℕ i ℕ.≤ ℕ.pred n
toℕ≤pred[n] zero = z≤n
toℕ≤pred[n] (suc {n = suc n} i) = s≤s (toℕ≤pred[n] i)
-- A simpler implementation of toℕ≤pred[n],
-- however, with a different reduction behavior.
-- If no one needs the reduction behavior of toℕ≤pred[n],
-- it can be removed in favor of toℕ≤pred[n]′.
toℕ≤pred[n]′ : ∀ {n} (i : Fin n) → toℕ i ℕ.≤ ℕ.pred n
toℕ≤pred[n]′ i = ℕₚ.<⇒≤pred (toℕ<n i)
------------------------------------------------------------------------
-- fromℕ
------------------------------------------------------------------------
toℕ-fromℕ : ∀ n → toℕ (fromℕ n) ≡ n
toℕ-fromℕ zero = refl
toℕ-fromℕ (suc n) = cong suc (toℕ-fromℕ n)
fromℕ-toℕ : ∀ {n} (i : Fin n) → fromℕ (toℕ i) ≡ strengthen i
fromℕ-toℕ zero = refl
fromℕ-toℕ (suc i) = cong suc (fromℕ-toℕ i)
------------------------------------------------------------------------
-- fromℕ<
------------------------------------------------------------------------
fromℕ<-toℕ : ∀ {m} (i : Fin m) (i<m : toℕ i ℕ.< m) → fromℕ< i<m ≡ i
fromℕ<-toℕ zero (s≤s z≤n) = refl
fromℕ<-toℕ (suc i) (s≤s (s≤s m≤n)) = cong suc (fromℕ<-toℕ i (s≤s m≤n))
toℕ-fromℕ< : ∀ {m n} (m<n : m ℕ.< n) → toℕ (fromℕ< m<n) ≡ m
toℕ-fromℕ< (s≤s z≤n) = refl
toℕ-fromℕ< (s≤s (s≤s m<n)) = cong suc (toℕ-fromℕ< (s≤s m<n))
-- fromℕ is a special case of fromℕ<.
fromℕ-def : ∀ n → fromℕ n ≡ fromℕ< ℕₚ.≤-refl
fromℕ-def zero = refl
fromℕ-def (suc n) = cong suc (fromℕ-def n)
------------------------------------------------------------------------
-- fromℕ<″
------------------------------------------------------------------------
fromℕ<≡fromℕ<″ : ∀ {m n} (m<n : m ℕ.< n) (m<″n : m ℕ.<″ n) →
fromℕ< m<n ≡ fromℕ<″ m m<″n
fromℕ<≡fromℕ<″ (s≤s z≤n) (ℕ.less-than-or-equal refl) = refl
fromℕ<≡fromℕ<″ (s≤s (s≤s m<n)) (ℕ.less-than-or-equal refl) =
cong suc (fromℕ<≡fromℕ<″ (s≤s m<n) (ℕ.less-than-or-equal refl))
toℕ-fromℕ<″ : ∀ {m n} (m<n : m ℕ.<″ n) → toℕ (fromℕ<″ m m<n) ≡ m
toℕ-fromℕ<″ {m} {n} m<n = begin
toℕ (fromℕ<″ m m<n) ≡⟨ cong toℕ (sym (fromℕ<≡fromℕ<″ (ℕₚ.≤″⇒≤ m<n) m<n)) ⟩
toℕ (fromℕ< _) ≡⟨ toℕ-fromℕ< (ℕₚ.≤″⇒≤ m<n) ⟩
m ∎
where open ≡-Reasoning
------------------------------------------------------------------------
-- cast
------------------------------------------------------------------------
toℕ-cast : ∀ {m n} .(eq : m ≡ n) (k : Fin m) → toℕ (cast eq k) ≡ toℕ k
toℕ-cast {n = suc n} eq zero = refl
toℕ-cast {n = suc n} eq (suc k) = cong suc (toℕ-cast (cong ℕ.pred eq) k)
------------------------------------------------------------------------
-- Properties of _≤_
------------------------------------------------------------------------
-- Relational properties
≤-reflexive : ∀ {n} → _≡_ ⇒ (_≤_ {n})
≤-reflexive refl = ℕₚ.≤-refl
≤-refl : ∀ {n} → Reflexive (_≤_ {n})
≤-refl = ≤-reflexive refl
≤-trans : ∀ {n} → Transitive (_≤_ {n})
≤-trans = ℕₚ.≤-trans
≤-antisym : ∀ {n} → Antisymmetric _≡_ (_≤_ {n})
≤-antisym x≤y y≤x = toℕ-injective (ℕₚ.≤-antisym x≤y y≤x)
≤-total : ∀ {n} → Total (_≤_ {n})
≤-total x y = ℕₚ.≤-total (toℕ x) (toℕ y)
≤-irrelevant : ∀ {n} → Irrelevant (_≤_ {n})
≤-irrelevant = ℕₚ.≤-irrelevant
infix 4 _≤?_ _<?_
_≤?_ : ∀ {n} → B.Decidable (_≤_ {n})
a ≤? b = toℕ a ℕₚ.≤? toℕ b
_<?_ : ∀ {n} → B.Decidable (_<_ {n})
m <? n = suc (toℕ m) ℕₚ.≤? toℕ n
------------------------------------------------------------------------
-- Structures
≤-isPreorder : ∀ {n} → IsPreorder _≡_ (_≤_ {n})
≤-isPreorder = record
{ isEquivalence = P.isEquivalence
; reflexive = ≤-reflexive
; trans = ≤-trans
}
≤-isPartialOrder : ∀ {n} → IsPartialOrder _≡_ (_≤_ {n})
≤-isPartialOrder = record
{ isPreorder = ≤-isPreorder
; antisym = ≤-antisym
}
≤-isTotalOrder : ∀ {n} → IsTotalOrder _≡_ (_≤_ {n})
≤-isTotalOrder = record
{ isPartialOrder = ≤-isPartialOrder
; total = ≤-total
}
≤-isDecTotalOrder : ∀ {n} → IsDecTotalOrder _≡_ (_≤_ {n})
≤-isDecTotalOrder = record
{ isTotalOrder = ≤-isTotalOrder
; _≟_ = _≟_
; _≤?_ = _≤?_
}
------------------------------------------------------------------------
-- Bundles
≤-preorder : ℕ → Preorder _ _ _
≤-preorder n = record
{ isPreorder = ≤-isPreorder {n}
}
≤-poset : ℕ → Poset _ _ _
≤-poset n = record
{ isPartialOrder = ≤-isPartialOrder {n}
}
≤-totalOrder : ℕ → TotalOrder _ _ _
≤-totalOrder n = record
{ isTotalOrder = ≤-isTotalOrder {n}
}
≤-decTotalOrder : ℕ → DecTotalOrder _ _ _
≤-decTotalOrder n = record
{ isDecTotalOrder = ≤-isDecTotalOrder {n}
}
------------------------------------------------------------------------
-- Properties of _<_
------------------------------------------------------------------------
-- Relational properties
<-irrefl : ∀ {n} → Irreflexive _≡_ (_<_ {n})
<-irrefl refl = ℕₚ.<-irrefl refl
<-asym : ∀ {n} → Asymmetric (_<_ {n})
<-asym = ℕₚ.<-asym
<-trans : ∀ {n} → Transitive (_<_ {n})
<-trans = ℕₚ.<-trans
<-cmp : ∀ {n} → Trichotomous _≡_ (_<_ {n})
<-cmp zero zero = tri≈ (λ()) refl (λ())
<-cmp zero (suc j) = tri< (s≤s z≤n) (λ()) (λ())
<-cmp (suc i) zero = tri> (λ()) (λ()) (s≤s z≤n)
<-cmp (suc i) (suc j) with <-cmp i j
... | tri< i<j i≢j j≮i = tri< (s≤s i<j) (i≢j ∘ suc-injective) (j≮i ∘ ℕₚ.≤-pred)
... | tri> i≮j i≢j j<i = tri> (i≮j ∘ ℕₚ.≤-pred) (i≢j ∘ suc-injective) (s≤s j<i)
... | tri≈ i≮j i≡j j≮i = tri≈ (i≮j ∘ ℕₚ.≤-pred) (cong suc i≡j) (j≮i ∘ ℕₚ.≤-pred)
<-respˡ-≡ : ∀ {n} → (_<_ {n}) Respectsˡ _≡_
<-respˡ-≡ refl x≤y = x≤y
<-respʳ-≡ : ∀ {n} → (_<_ {n}) Respectsʳ _≡_
<-respʳ-≡ refl x≤y = x≤y
<-resp₂-≡ : ∀ {n} → (_<_ {n}) Respects₂ _≡_
<-resp₂-≡ = <-respʳ-≡ , <-respˡ-≡
<-irrelevant : ∀ {n} → Irrelevant (_<_ {n})
<-irrelevant = ℕₚ.<-irrelevant
------------------------------------------------------------------------
-- Structures
<-isStrictPartialOrder : ∀ {n} → IsStrictPartialOrder _≡_ (_<_ {n})
<-isStrictPartialOrder = record
{ isEquivalence = P.isEquivalence
; irrefl = <-irrefl
; trans = <-trans
; <-resp-≈ = <-resp₂-≡
}
<-isStrictTotalOrder : ∀ {n} → IsStrictTotalOrder _≡_ (_<_ {n})
<-isStrictTotalOrder = record
{ isEquivalence = P.isEquivalence
; trans = <-trans
; compare = <-cmp
}
------------------------------------------------------------------------
-- Bundles
<-strictPartialOrder : ℕ → StrictPartialOrder _ _ _
<-strictPartialOrder n = record
{ isStrictPartialOrder = <-isStrictPartialOrder {n}
}
<-strictTotalOrder : ℕ → StrictTotalOrder _ _ _
<-strictTotalOrder n = record
{ isStrictTotalOrder = <-isStrictTotalOrder {n}
}
------------------------------------------------------------------------
-- Other properties
<⇒≢ : ∀ {n} {i j : Fin n} → i < j → i ≢ j
<⇒≢ i<i refl = ℕₚ.n≮n _ i<i
≤∧≢⇒< : ∀ {n} {i j : Fin n} → i ≤ j → i ≢ j → i < j
≤∧≢⇒< {i = zero} {zero} _ 0≢0 = contradiction refl 0≢0
≤∧≢⇒< {i = zero} {suc j} _ _ = s≤s z≤n
≤∧≢⇒< {i = suc i} {suc j} (s≤s i≤j) 1+i≢1+j =
s≤s (≤∧≢⇒< i≤j (1+i≢1+j ∘ (cong suc)))
------------------------------------------------------------------------
-- inject
------------------------------------------------------------------------
toℕ-inject : ∀ {n} {i : Fin n} (j : Fin′ i) →
toℕ (inject j) ≡ toℕ j
toℕ-inject {i = suc i} zero = refl
toℕ-inject {i = suc i} (suc j) = cong suc (toℕ-inject j)
------------------------------------------------------------------------
-- inject+
------------------------------------------------------------------------
toℕ-inject+ : ∀ {m} n (i : Fin m) → toℕ i ≡ toℕ (inject+ n i)
toℕ-inject+ n zero = refl
toℕ-inject+ n (suc i) = cong suc (toℕ-inject+ n i)
------------------------------------------------------------------------
-- inject₁
------------------------------------------------------------------------
inject₁-injective : ∀ {n} {i j : Fin n} → inject₁ i ≡ inject₁ j → i ≡ j
inject₁-injective {i = zero} {zero} i≡j = refl
inject₁-injective {i = suc i} {suc j} i≡j =
cong suc (inject₁-injective (suc-injective i≡j))
toℕ-inject₁ : ∀ {n} (i : Fin n) → toℕ (inject₁ i) ≡ toℕ i
toℕ-inject₁ zero = refl
toℕ-inject₁ (suc i) = cong suc (toℕ-inject₁ i)
toℕ-inject₁-≢ : ∀ {n}(i : Fin n) → n ≢ toℕ (inject₁ i)
toℕ-inject₁-≢ (suc i) = toℕ-inject₁-≢ i ∘ ℕₚ.suc-injective
------------------------------------------------------------------------
-- inject₁ and lower₁
inject₁-lower₁ : ∀ {n} (i : Fin (suc n)) (n≢i : n ≢ toℕ i) →
inject₁ (lower₁ i n≢i) ≡ i
inject₁-lower₁ {zero} zero 0≢0 = contradiction refl 0≢0
inject₁-lower₁ {suc n} zero _ = refl
inject₁-lower₁ {suc n} (suc i) n+1≢i+1 =
cong suc (inject₁-lower₁ i (n+1≢i+1 ∘ cong suc))
lower₁-inject₁′ : ∀ {n} (i : Fin n) (n≢i : n ≢ toℕ (inject₁ i)) →
lower₁ (inject₁ i) n≢i ≡ i
lower₁-inject₁′ zero _ = refl
lower₁-inject₁′ (suc i) n+1≢i+1 =
cong suc (lower₁-inject₁′ i (n+1≢i+1 ∘ cong suc))
lower₁-inject₁ : ∀ {n} (i : Fin n) →
lower₁ (inject₁ i) (toℕ-inject₁-≢ i) ≡ i
lower₁-inject₁ i = lower₁-inject₁′ i (toℕ-inject₁-≢ i)
lower₁-irrelevant : ∀ {n} (i : Fin (suc n)) n≢i₁ n≢i₂ →
lower₁ {n} i n≢i₁ ≡ lower₁ {n} i n≢i₂
lower₁-irrelevant {zero} zero 0≢0 _ = contradiction refl 0≢0
lower₁-irrelevant {suc n} zero _ _ = refl
lower₁-irrelevant {suc n} (suc i) _ _ =
cong suc (lower₁-irrelevant i _ _)
------------------------------------------------------------------------
-- inject≤
------------------------------------------------------------------------
toℕ-inject≤ : ∀ {m n} (i : Fin m) (le : m ℕ.≤ n) →
toℕ (inject≤ i le) ≡ toℕ i
toℕ-inject≤ {_} {suc n} zero _ = refl
toℕ-inject≤ {_} {suc n} (suc i) le = cong suc (toℕ-inject≤ i (ℕₚ.≤-pred le))
inject≤-refl : ∀ {n} (i : Fin n) (n≤n : n ℕ.≤ n) → inject≤ i n≤n ≡ i
inject≤-refl {suc n} zero _ = refl
inject≤-refl {suc n} (suc i) n≤n = cong suc (inject≤-refl i (ℕₚ.≤-pred n≤n))
inject≤-idempotent : ∀ {m n k} (i : Fin m)
(m≤n : m ℕ.≤ n) (n≤k : n ℕ.≤ k) (m≤k : m ℕ.≤ k) →
inject≤ (inject≤ i m≤n) n≤k ≡ inject≤ i m≤k
inject≤-idempotent {_} {suc n} {suc k} zero _ _ _ = refl
inject≤-idempotent {_} {suc n} {suc k} (suc i) m≤n n≤k _ =
cong suc (inject≤-idempotent i (ℕₚ.≤-pred m≤n) (ℕₚ.≤-pred n≤k) _)
------------------------------------------------------------------------
-- splitAt
------------------------------------------------------------------------
-- Fin (m + n) ≃ Fin m ⊎ Fin n
splitAt-inject+ : ∀ m n i → splitAt m (inject+ n i) ≡ inj₁ i
splitAt-inject+ (suc m) n zero = refl
splitAt-inject+ (suc m) n (suc i) rewrite splitAt-inject+ m n i = refl
splitAt-raise : ∀ m n i → splitAt m (raise {n} m i) ≡ inj₂ i
splitAt-raise zero n i = refl
splitAt-raise (suc m) n i rewrite splitAt-raise m n i = refl
inject+-raise-splitAt : ∀ m n i → [ inject+ n , raise {n} m ] (splitAt m i) ≡ i
inject+-raise-splitAt zero n i = refl
inject+-raise-splitAt (suc m) n zero = refl
inject+-raise-splitAt (suc m) n (suc i) = begin
[ inject+ n , raise {n} (suc m) ] (splitAt (suc m) (suc i)) ≡⟨ [,]-map-commute (splitAt m i) ⟩
[ suc ∘ (inject+ n) , suc ∘ (raise {n} m) ] (splitAt m i) ≡˘⟨ [,]-∘-distr {f = suc} (splitAt m i) ⟩
suc ([ inject+ n , raise {n} m ] (splitAt m i)) ≡⟨ cong suc (inject+-raise-splitAt m n i) ⟩
suc i ∎
where open ≡-Reasoning
------------------------------------------------------------------------
-- lift
------------------------------------------------------------------------
lift-injective : ∀ {m n} (f : Fin m → Fin n) →
(∀ {x y} → f x ≡ f y → x ≡ y) →
∀ k {x y} → lift k f x ≡ lift k f y → x ≡ y
lift-injective f inj zero eq = inj eq
lift-injective f inj (suc k) {0F} {0F} eq = refl
lift-injective f inj (suc k) {suc i} {suc y} eq = cong suc (lift-injective f inj k (suc-injective eq))
------------------------------------------------------------------------
-- _≺_
------------------------------------------------------------------------
≺⇒<′ : _≺_ ⇒ ℕ._<′_
≺⇒<′ (n ≻toℕ i) = ℕₚ.≤⇒≤′ (toℕ<n i)
<′⇒≺ : ℕ._<′_ ⇒ _≺_
<′⇒≺ {n} ℕ.≤′-refl = subst (_≺ suc n) (toℕ-fromℕ n)
(suc n ≻toℕ fromℕ n)
<′⇒≺ (ℕ.≤′-step m≤′n) with <′⇒≺ m≤′n
... | n ≻toℕ i = subst (_≺ suc n) (toℕ-inject₁ i) (suc n ≻toℕ _)
------------------------------------------------------------------------
-- pred
------------------------------------------------------------------------
<⇒≤pred : ∀ {n} {i j : Fin n} → j < i → j ≤ pred i
<⇒≤pred {i = suc i} {zero} j<i = z≤n
<⇒≤pred {i = suc i} {suc j} (s≤s j<i) =
subst (_ ℕ.≤_) (sym (toℕ-inject₁ i)) j<i
------------------------------------------------------------------------
-- _ℕ-_
------------------------------------------------------------------------
toℕ‿ℕ- : ∀ n i → toℕ (n ℕ- i) ≡ n ∸ toℕ i
toℕ‿ℕ- n zero = toℕ-fromℕ n
toℕ‿ℕ- (suc n) (suc i) = toℕ‿ℕ- n i
------------------------------------------------------------------------
-- _ℕ-ℕ_
------------------------------------------------------------------------
nℕ-ℕi≤n : ∀ n i → n ℕ-ℕ i ℕ.≤ n
nℕ-ℕi≤n n zero = ℕₚ.≤-refl
nℕ-ℕi≤n (suc n) (suc i) = begin
n ℕ-ℕ i ≤⟨ nℕ-ℕi≤n n i ⟩
n ≤⟨ ℕₚ.n≤1+n n ⟩
suc n ∎
where open ℕₚ.≤-Reasoning
------------------------------------------------------------------------
-- punchIn
------------------------------------------------------------------------
punchIn-injective : ∀ {m} i (j k : Fin m) →
punchIn i j ≡ punchIn i k → j ≡ k
punchIn-injective zero _ _ refl = refl
punchIn-injective (suc i) zero zero _ = refl
punchIn-injective (suc i) (suc j) (suc k) ↑j+1≡↑k+1 =
cong suc (punchIn-injective i j k (suc-injective ↑j+1≡↑k+1))
punchInᵢ≢i : ∀ {m} i (j : Fin m) → punchIn i j ≢ i
punchInᵢ≢i (suc i) (suc j) = punchInᵢ≢i i j ∘ suc-injective
------------------------------------------------------------------------
-- punchOut
------------------------------------------------------------------------
-- A version of 'cong' for 'punchOut' in which the inequality argument can be
-- changed out arbitrarily (reflecting the proof-irrelevance of that argument).
punchOut-cong : ∀ {n} (i : Fin (suc n)) {j k} {i≢j : i ≢ j} {i≢k : i ≢ k} → j ≡ k → punchOut i≢j ≡ punchOut i≢k
punchOut-cong zero {zero} {i≢j = 0≢0} = contradiction refl 0≢0
punchOut-cong zero {suc j} {zero} {i≢k = 0≢0} = contradiction refl 0≢0
punchOut-cong zero {suc j} {suc k} = suc-injective
punchOut-cong {suc n} (suc i) {zero} {zero} _ = refl
punchOut-cong {suc n} (suc i) {suc j} {suc k} = cong suc ∘ punchOut-cong i ∘ suc-injective
-- An alternative to 'punchOut-cong' in the which the new inequality argument is
-- specific. Useful for enabling the omission of that argument during equational
-- reasoning.
punchOut-cong′ : ∀ {n} (i : Fin (suc n)) {j k} {p : i ≢ j} (q : j ≡ k) → punchOut p ≡ punchOut (p ∘ sym ∘ trans q ∘ sym)
punchOut-cong′ i q = punchOut-cong i q
punchOut-injective : ∀ {m} {i j k : Fin (suc m)}
(i≢j : i ≢ j) (i≢k : i ≢ k) →
punchOut i≢j ≡ punchOut i≢k → j ≡ k
punchOut-injective {_} {zero} {zero} {_} 0≢0 _ _ = contradiction refl 0≢0
punchOut-injective {_} {zero} {_} {zero} _ 0≢0 _ = contradiction refl 0≢0
punchOut-injective {_} {zero} {suc j} {suc k} _ _ pⱼ≡pₖ = cong suc pⱼ≡pₖ
punchOut-injective {suc n} {suc i} {zero} {zero} _ _ _ = refl
punchOut-injective {suc n} {suc i} {suc j} {suc k} i≢j i≢k pⱼ≡pₖ =
cong suc (punchOut-injective (i≢j ∘ cong suc) (i≢k ∘ cong suc) (suc-injective pⱼ≡pₖ))
punchIn-punchOut : ∀ {m} {i j : Fin (suc m)} (i≢j : i ≢ j) →
punchIn i (punchOut i≢j) ≡ j
punchIn-punchOut {_} {zero} {zero} 0≢0 = contradiction refl 0≢0
punchIn-punchOut {_} {zero} {suc j} _ = refl
punchIn-punchOut {suc m} {suc i} {zero} i≢j = refl
punchIn-punchOut {suc m} {suc i} {suc j} i≢j =
cong suc (punchIn-punchOut (i≢j ∘ cong suc))
punchOut-punchIn : ∀ {n} i {j : Fin n} → punchOut {i = i} {j = punchIn i j} (punchInᵢ≢i i j ∘ sym) ≡ j
punchOut-punchIn zero {j} = refl
punchOut-punchIn (suc i) {zero} = refl
punchOut-punchIn (suc i) {suc j} = cong suc (begin
punchOut (punchInᵢ≢i i j ∘ suc-injective ∘ sym ∘ cong suc) ≡⟨ punchOut-cong i refl ⟩
punchOut (punchInᵢ≢i i j ∘ sym) ≡⟨ punchOut-punchIn i ⟩
j ∎)
where open ≡-Reasoning
------------------------------------------------------------------------
-- Quantification
------------------------------------------------------------------------
module _ {n p} {P : Pred (Fin (suc n)) p} where
∀-cons : P zero → Π[ P ∘ suc ] → Π[ P ]
∀-cons z s zero = z
∀-cons z s (suc i) = s i
∀-cons-⇔ : (P zero × Π[ P ∘ suc ]) ⇔ Π[ P ]
∀-cons-⇔ = equivalence (uncurry ∀-cons) < _$ zero , _∘ suc >
∃-here : P zero → ∃⟨ P ⟩
∃-here = zero ,_
∃-there : ∃⟨ P ∘ suc ⟩ → ∃⟨ P ⟩
∃-there = map suc id
∃-toSum : ∃⟨ P ⟩ → P zero ⊎ ∃⟨ P ∘ suc ⟩
∃-toSum ( zero , P₀ ) = inj₁ P₀
∃-toSum (suc f , P₁₊) = inj₂ (f , P₁₊)
⊎⇔∃ : (P zero ⊎ ∃⟨ P ∘ suc ⟩) ⇔ ∃⟨ P ⟩
⊎⇔∃ = equivalence [ ∃-here , ∃-there ] ∃-toSum
decFinSubset : ∀ {n p q} {P : Pred (Fin n) p} {Q : Pred (Fin n) q} →
Decidable Q → (∀ {f} → Q f → Dec (P f)) → Dec (Q ⊆ P)
decFinSubset {zero} Q? P? = yes λ {}
decFinSubset {suc n} {P = P} {Q} Q? P?
with Q? zero | ∀-cons {P = λ x → Q x → P x}
... | false because [¬Q0] | cons =
map′ (λ f {x} → cons (⊥-elim ∘ invert [¬Q0]) (λ x → f {x}) x)
(λ f {x} → f {suc x})
(decFinSubset (Q? ∘ suc) P?)
... | true because [Q0] | cons =
map′ (uncurry λ P0 rec {x} → cons (λ _ → P0) (λ x → rec {x}) x)
< _$ invert [Q0] , (λ f {x} → f {suc x}) >
(P? (invert [Q0]) ×-dec decFinSubset (Q? ∘ suc) P?)
any? : ∀ {n p} {P : Fin n → Set p} → Decidable P → Dec (∃ P)
any? {zero} {P = _} P? = no λ { (() , _) }
any? {suc n} {P = P} P? = Dec.map ⊎⇔∃ (P? zero ⊎-dec any? (P? ∘ suc))
all? : ∀ {n p} {P : Pred (Fin n) p} →
Decidable P → Dec (∀ f → P f)
all? P? = map′ (λ ∀p f → ∀p tt) (λ ∀p {x} _ → ∀p x)
(decFinSubset U? (λ {f} _ → P? f))
private
-- A nice computational property of `all?`:
-- The boolean component of the result is exactly the
-- obvious fold of boolean tests (`foldr _∧_ true`).
note : ∀ {p} {P : Pred (Fin 3) p} (P? : Decidable P) →
∃ λ z → does (all? P?) ≡ z
note P? = does (P? 0F) ∧ does (P? 1F) ∧ does (P? 2F) ∧ true
, refl
-- If a decidable predicate P over a finite set is sometimes false,
-- then we can find the smallest value for which this is the case.
¬∀⟶∃¬-smallest : ∀ n {p} (P : Pred (Fin n) p) → Decidable P →
¬ (∀ i → P i) → ∃ λ i → ¬ P i × ((j : Fin′ i) → P (inject j))
¬∀⟶∃¬-smallest zero P P? ¬∀P = contradiction (λ()) ¬∀P
¬∀⟶∃¬-smallest (suc n) P P? ¬∀P with P? zero
... | false because [¬P₀] = (zero , invert [¬P₀] , λ ())
... | true because [P₀] = map suc (map id (∀-cons (invert [P₀])))
(¬∀⟶∃¬-smallest n (P ∘ suc) (P? ∘ suc) (¬∀P ∘ (∀-cons (invert [P₀]))))
-- When P is a decidable predicate over a finite set the following
-- lemma can be proved.
¬∀⟶∃¬ : ∀ n {p} (P : Pred (Fin n) p) → Decidable P →
¬ (∀ i → P i) → (∃ λ i → ¬ P i)
¬∀⟶∃¬ n P P? ¬P = map id proj₁ (¬∀⟶∃¬-smallest n P P? ¬P)
-- The pigeonhole principle.
pigeonhole : ∀ {m n} → m ℕ.< n → (f : Fin n → Fin m) →
∃₂ λ i j → i ≢ j × f i ≡ f j
pigeonhole (s≤s z≤n) f = contradiction (f zero) λ()
pigeonhole (s≤s (s≤s m≤n)) f with any? (λ k → f zero ≟ f (suc k))
... | yes (j , f₀≡fⱼ) = zero , suc j , (λ()) , f₀≡fⱼ
... | no f₀≢fₖ with pigeonhole (s≤s m≤n) (λ j → punchOut (f₀≢fₖ ∘ (j ,_ )))
... | (i , j , i≢j , fᵢ≡fⱼ) =
suc i , suc j , i≢j ∘ suc-injective ,
punchOut-injective (f₀≢fₖ ∘ (i ,_)) _ fᵢ≡fⱼ
------------------------------------------------------------------------
-- Categorical
------------------------------------------------------------------------
module _ {f} {F : Set f → Set f} (RA : RawApplicative F) where
open RawApplicative RA
sequence : ∀ {n} {P : Pred (Fin n) f} →
(∀ i → F (P i)) → F (∀ i → P i)
sequence {zero} ∀iPi = pure λ()
sequence {suc n} ∀iPi = ∀-cons <$> ∀iPi zero ⊛ sequence (∀iPi ∘ suc)
module _ {f} {F : Set f → Set f} (RF : RawFunctor F) where
open RawFunctor RF
sequence⁻¹ : ∀ {A : Set f} {P : Pred A f} →
F (∀ i → P i) → (∀ i → F (P i))
sequence⁻¹ F∀iPi i = (λ f → f i) <$> F∀iPi
------------------------------------------------------------------------
-- If there is an injection from a type to a finite set, then the type
-- has decidable equality.
module _ {a} {A : Set a} where
eq? : ∀ {n} → A ↣ Fin n → B.Decidable {A = A} _≡_
eq? inj = Dec.via-injection inj _≟_
------------------------------------------------------------------------
-- DEPRECATED NAMES
------------------------------------------------------------------------
-- Please use the new names as continuing support for the old names is
-- not guaranteed.
-- Version 0.15
cmp = <-cmp
{-# WARNING_ON_USAGE cmp
"Warning: cmp was deprecated in v0.15.
Please use <-cmp instead."
#-}
strictTotalOrder = <-strictTotalOrder
{-# WARNING_ON_USAGE strictTotalOrder
"Warning: strictTotalOrder was deprecated in v0.15.
Please use <-strictTotalOrder instead."
#-}
-- Version 0.16
to-from = toℕ-fromℕ
{-# WARNING_ON_USAGE to-from
"Warning: to-from was deprecated in v0.16.
Please use toℕ-fromℕ instead."
#-}
from-to = fromℕ-toℕ
{-# WARNING_ON_USAGE from-to
"Warning: from-to was deprecated in v0.16.
Please use fromℕ-toℕ instead."
#-}
bounded = toℕ<n
{-# WARNING_ON_USAGE bounded
"Warning: bounded was deprecated in v0.16.
Please use toℕ<n instead."
#-}
prop-toℕ-≤ = toℕ≤pred[n]
{-# WARNING_ON_USAGE prop-toℕ-≤
"Warning: prop-toℕ-≤ was deprecated in v0.16.
Please use toℕ≤pred[n] instead."
#-}
prop-toℕ-≤′ = toℕ≤pred[n]′
{-# WARNING_ON_USAGE prop-toℕ-≤′
"Warning: prop-toℕ-≤′ was deprecated in v0.16.
Please use toℕ≤pred[n]′ instead."
#-}
inject-lemma = toℕ-inject
{-# WARNING_ON_USAGE inject-lemma
"Warning: inject-lemma was deprecated in v0.16.
Please use toℕ-inject instead."
#-}
inject+-lemma = toℕ-inject+
{-# WARNING_ON_USAGE inject+-lemma
"Warning: inject+-lemma was deprecated in v0.16.
Please use toℕ-inject+ instead."
#-}
inject₁-lemma = toℕ-inject₁
{-# WARNING_ON_USAGE inject₁-lemma
"Warning: inject₁-lemma was deprecated in v0.16.
Please use toℕ-inject₁ instead."
#-}
inject≤-lemma = toℕ-inject≤
{-# WARNING_ON_USAGE inject≤-lemma
"Warning: inject≤-lemma was deprecated in v0.16.
Please use toℕ-inject≤ instead."
#-}
-- Version 0.17
≤+≢⇒< = ≤∧≢⇒<
{-# WARNING_ON_USAGE ≤+≢⇒<
"Warning: ≤+≢⇒< was deprecated in v0.17.
Please use ≤∧≢⇒< instead."
#-}
-- Version 1.0
≤-irrelevance = ≤-irrelevant
{-# WARNING_ON_USAGE ≤-irrelevance
"Warning: ≤-irrelevance was deprecated in v1.0.
Please use ≤-irrelevant instead."
#-}
<-irrelevance = <-irrelevant
{-# WARNING_ON_USAGE <-irrelevance
"Warning: <-irrelevance was deprecated in v1.0.
Please use <-irrelevant instead."
#-}
-- Version 1.1
infixl 6 _+′_
_+′_ : ∀ {m n} (i : Fin m) (j : Fin n) → Fin (ℕ.pred m ℕ.+ n)
i +′ j = inject≤ (i + j) (ℕₚ.+-monoˡ-≤ _ (toℕ≤pred[n] i))
{-# WARNING_ON_USAGE _+′_
"Warning: _+′_ was deprecated in v1.1.
Please use `raise` or `inject+` from `Data.Fin` instead."
#-}
-- Version 1.2
fromℕ≤-toℕ = fromℕ<-toℕ
{-# WARNING_ON_USAGE fromℕ≤-toℕ
"Warning: fromℕ≤-toℕ was deprecated in v1.2.
Please use fromℕ<-toℕ instead."
#-}
toℕ-fromℕ≤ = toℕ-fromℕ<
{-# WARNING_ON_USAGE toℕ-fromℕ≤
"Warning: toℕ-fromℕ≤ was deprecated in v1.2.
Please use toℕ-fromℕ< instead."
#-}
fromℕ≤≡fromℕ≤″ = fromℕ<≡fromℕ<″
{-# WARNING_ON_USAGE fromℕ≤≡fromℕ≤″
"Warning: fromℕ≤≡fromℕ≤″ was deprecated in v1.2.
Please use fromℕ<≡fromℕ<″ instead."
#-}
toℕ-fromℕ≤″ = toℕ-fromℕ<″
{-# WARNING_ON_USAGE toℕ-fromℕ≤″
"Warning: toℕ-fromℕ≤″ was deprecated in v1.2.
Please use toℕ-fromℕ<″ instead."
#-}
isDecEquivalence = ≡-isDecEquivalence
{-# WARNING_ON_USAGE isDecEquivalence
"Warning: isDecEquivalence was deprecated in v1.2.
Please use ≡-isDecEquivalence instead."
#-}
preorder = ≡-preorder
{-# WARNING_ON_USAGE preorder
"Warning: preorder was deprecated in v1.2.
Please use ≡-preorder instead."
#-}
setoid = ≡-setoid
{-# WARNING_ON_USAGE setoid
"Warning: setoid was deprecated in v1.2.
Please use ≡-setoid instead."
#-}
decSetoid = ≡-decSetoid
{-# WARNING_ON_USAGE decSetoid
"Warning: decSetoid was deprecated in v1.2.
Please use ≡-decSetoid instead."
#-}
|
legacy/Data/Num/Bij/Properties.agda | banacorn/numeral | 1 | 15248 | module Data.Num.Bij.Properties where
open import Data.Num.Bij renaming (_+B_ to _+_; _*B_ to _*_)
open import Data.List
open import Relation.Binary.PropositionalEquality as PropEq
using (_≡_; _≢_; refl; cong; sym; trans)
open PropEq.≡-Reasoning
--------------------------------------------------------------------------------
1∷≡incrB∘*2 : ∀ m → one ∷ m ≡ incrB (*2 m)
1∷≡incrB∘*2 [] = refl
1∷≡incrB∘*2 (one ∷ ms) = cong (λ x → one ∷ x) (1∷≡incrB∘*2 ms)
1∷≡incrB∘*2 (two ∷ ms) = cong (λ x → one ∷ incrB x) (1∷≡incrB∘*2 ms)
split-∷ : ∀ m ms → m ∷ ms ≡ (m ∷ []) + *2 ms
split-∷ m [] = refl
split-∷ one (one ∷ ns) = cong (λ x → one ∷ x) (1∷≡incrB∘*2 ns)
split-∷ one (two ∷ ns) = cong (λ x → one ∷ incrB x) (1∷≡incrB∘*2 ns)
split-∷ two (one ∷ ns) = cong (λ x → two ∷ x) (1∷≡incrB∘*2 ns)
split-∷ two (two ∷ ns) = cong (λ x → two ∷ incrB x) (1∷≡incrB∘*2 ns)
{-
+B-assoc : ∀ m n o → (m + n) + o ≡ m + (n + o)
+B-assoc [] _ _ = refl
+B-assoc (m ∷ ms) n o =
begin
(m ∷ ms) + n + o
≡⟨ cong (λ x → x + n + o) (split-∷ m ms) ⟩
(m ∷ []) + *2 ms + n + o
≡⟨ cong (λ x → x + o) (+B-assoc (m ∷ []) (*2 ms) n) ⟩
(m ∷ []) + (*2 ms + n) + o
≡⟨ +B-assoc (m ∷ []) (*2 ms + n) o ⟩
(m ∷ []) + ((*2 ms + n) + o)
≡⟨ cong (λ x → (m ∷ []) + x) (+B-assoc (*2 ms) n o) ⟩
(m ∷ []) + (*2 ms + (n + o))
≡⟨ sym (+B-assoc (m ∷ []) (*2 ms) (n + o)) ⟩
(m ∷ []) + *2 ms + (n + o)
≡⟨ cong (λ x → x + (n + o)) (sym (split-∷ m ms)) ⟩
(m ∷ ms) + (n + o)
∎
+B-right-identity : ∀ n → n + [] ≡ n
+B-right-identity [] = refl
+B-right-identity (n ∷ ns) = refl
+B-comm : ∀ m n → m + n ≡ n + m
+B-comm [] n = sym (+B-right-identity n)
+B-comm (m ∷ ms) n =
begin
(m ∷ ms) + n
≡⟨ cong (λ x → x + n) (split-∷ m ms) ⟩
(m ∷ []) + *2 ms + n
≡⟨ +B-comm ((m ∷ []) + *2 ms) n ⟩
n + ((m ∷ []) + *2 ms)
≡⟨ cong (λ x → n + x) (sym (split-∷ m ms)) ⟩
n + (m ∷ ms)
∎
{-
begin
(m ∷ ms) + n
≡⟨ cong (λ x → x + n) (split-∷ m ms) ⟩
(m ∷ []) + *2 ms + n
≡⟨ +B-assoc (m ∷ []) (*2 ms) n ⟩
(m ∷ []) + (*2 ms + n)
≡⟨ cong (λ x → (m ∷ []) + x) (+B-comm (*2 ms) n) ⟩
(m ∷ []) + (n + *2 ms)
≡⟨ sym (+B-assoc (m ∷ []) n (*2 ms)) ⟩
(m ∷ []) + n + *2 ms
≡⟨ cong (λ x → x + *2 ms) (+B-comm (m ∷ []) n) ⟩
n + (m ∷ []) + *2 ms
≡⟨ +B-assoc n (m ∷ []) (*2 ms) ⟩
n + ((m ∷ []) + *2 ms)
≡⟨ cong (λ x → n + x) (sym (split-∷ m ms)) ⟩
n + (m ∷ ms)
∎
-}
+B-*2-distrib : ∀ m n → *2 (m + n) ≡ *2 m + *2 n
+B-*2-distrib [] n = refl
+B-*2-distrib (m ∷ ms) n =
begin
*2 ((m ∷ ms) + n)
≡⟨ cong (λ x → *2 (x + n)) (split-∷ m ms) ⟩
*2 ((m ∷ []) + *2 ms + n)
≡⟨ +B-*2-distrib ((m ∷ []) + *2 ms) n ⟩
*2 ((m ∷ []) + *2 ms) + *2 n
≡⟨ cong (λ x → *2 x + *2 n) (sym (split-∷ m ms)) ⟩
*2 (m ∷ ms) + *2 n
∎
+B-*B-incrB : ∀ m n → m * incrB n ≡ m + m * n
+B-*B-incrB [] n = refl
+B-*B-incrB (m ∷ ms) n =
begin
(m ∷ ms) * incrB n
≡⟨ cong (λ x → x * incrB n) (split-∷ m ms) ⟩
((m ∷ []) + *2 ms) * incrB n
≡⟨ +B-*B-incrB ((m ∷ []) + *2 ms) n ⟩
(m ∷ []) + *2 ms + ((m ∷ []) + *2 ms) * n
≡⟨ cong (λ x → x + x * n) (sym (split-∷ m ms)) ⟩
(m ∷ ms) + (m ∷ ms) * n
∎
*B-right-[] : ∀ n → n * [] ≡ []
*B-right-[] [] = refl
*B-right-[] (one ∷ ns) = cong *2_ (*B-right-[] ns)
*B-right-[] (two ∷ ns) = cong *2_ (*B-right-[] ns)
*B-+B-distrib : ∀ m n o → (n + o) * m ≡ n * m + o * m
*B-+B-distrib m [] o = refl
*B-+B-distrib m (n ∷ ns) o =
begin
((n ∷ ns) + o) * m
≡⟨ cong (λ x → (x + o) * m) (split-∷ n ns) ⟩
((n ∷ []) + *2 ns + o) * m
≡⟨ *B-+B-distrib m ((n ∷ []) + *2 ns) o ⟩
((n ∷ []) + *2 ns) * m + o * m
≡⟨ cong (λ x → x * m + o * m) (sym (split-∷ n ns)) ⟩
(n ∷ ns) * m + o * m
∎
*B-comm : ∀ m n → m * n ≡ n * m
*B-comm [] n = sym (*B-right-[] n)
*B-comm (m ∷ ms) n =
begin
(m ∷ ms) * n
≡⟨ cong (λ x → x * n) (split-∷ m ms) ⟩
((m ∷ []) + *2 ms) * n
≡⟨ *B-comm ((m ∷ []) + *2 ms) n ⟩
n * ((m ∷ []) + *2 ms)
≡⟨ cong (λ x → n * x) (sym (split-∷ m ms)) ⟩
n * (m ∷ ms)
∎
{-
begin
{! !}
≡⟨ {! !} ⟩
{! !}
≡⟨ {! !} ⟩
{! !}
≡⟨ {! !} ⟩
{! !}
≡⟨ {! !} ⟩
{! !}
∎
-}
{-
+B-*B-incrB : ∀ m n → m * incrB n ≡ m + m * n
+B-*B-incrB [] n = refl
+B-*B-incrB (one ∷ ms) [] = {! !}
+B-*B-incrB (one ∷ ms) (n ∷ ns) = {! !}
begin
incrB n + ms * incrB n
≡⟨ cong (λ x → incrB n + x) (+B-*B-incrB ms n) ⟩
incrB n + (ms + ms * n)
≡⟨ sym (+B-assoc (incrB n) ms (ms * n)) ⟩
incrB n + ms + ms * n
≡⟨ {! !} ⟩
{! !}
≡⟨ {! !} ⟩
{! !}
≡⟨ {! !} ⟩
{! !}
≡⟨ {! !} ⟩
(one ∷ []) + *2 ms + (n + ms * n)
≡⟨ cong (λ x → x + (n + ms * n)) (sym (split-∷ one ms)) ⟩
(one ∷ ms) + (n + ms * n)
∎
+B-*B-incrB (two ∷ ms) n =
begin
{! !}
≡⟨ {! !} ⟩
{! !}
≡⟨ {! !} ⟩
{! !}
≡⟨ {! !} ⟩
{! !}
≡⟨ {! !} ⟩
{! !}
∎
-}
{-
begin
{! !}
≡⟨ {! !} ⟩
{! !}
≡⟨ {! !} ⟩
{! !}
≡⟨ {! !} ⟩
{! !}
≡⟨ {! !} ⟩
{! !}
∎
-}
-}
|
alloy4fun_models/trashltl/models/19/3hPR8j2EjEQ2MXLnr.als | Kaixi26/org.alloytools.alloy | 0 | 4866 | open main
pred id3hPR8j2EjEQ2MXLnr_prop20 {
all f : File | f in Trash since f not in Protected
}
pred __repair { id3hPR8j2EjEQ2MXLnr_prop20 }
check __repair { id3hPR8j2EjEQ2MXLnr_prop20 <=> prop20o } |
grammars/tac.g4 | amir-esmaeili/IUSTCompiler | 0 | 5776 | grammar tac;
@parser::members{
label_counter = 0
temp_counter = 0
def create_temp(self):
self.temp_counter += 1
return '_t' + str(self.temp_counter)
def remove_temp(self):
self.temp_counter -= 1
def get_temp(self):
return f'_t{self.temp_counter}'
def create_label(self):
self.label_counter += 1
return '_L{self.label_counter}'
}
program:
main=mainClass ( cls=classDecleration )* EOF
{
f = open('result.txt', 'w')
tac = $main.tac + $cls.tac
f.write(tac)
f.close()
}
;
mainClass returns [tac = str()]:
'class' identifier '{' 'public' 'static' 'void' 'main' '(' 'String' '[' ']' identifier ')' '{' st=statement '}' '}'
{
$tac = $st.tac
}
;
classDecleration returns [tac = str()]:
'class' identifier ( 'extends' identifier )? '{' ( varDeclaration )* ( method=methodDeclaration {
$tac += $method.tac
} )* '}'
;
varDeclaration:
typeId identifier ';'
;
methodDeclaration returns [tac = str()]:
'public' typeId identifier '(' ( typeId identifier ( ',' typeId identifier )* )? ')'
'{' ( varDeclaration )* ( st=statement {$tac += $st.tac} )* 'return' exp=expression {
$tac += f"\n PushParam {$exp.tac} \n ret \n"
} ';' '}'
;
typeId:
'int' '[' ']'
|'boolean'
|'int'
|identifier
;
statement returns [tac = str()]:
'{' ( st=statement {
$tac += $st.tac
})* '}'
|'if' '(' exp=expression ')' st1=statement 'else' st2=statement
{
l_true = self.create_label()
l_after = self.create_label()
tac = f"If {$exp.tac} GoTo {l_true}\n"
tac += f"{$st2.tac}\n"
tac += f"Goto {l_after}\n"
tac += f"{l_true} {$st1.tac}\n"
tac += f"{l_after}:\n"
$tac = tac
}
|'while' '(' exp=expression ')' st=statement
{
l_while = self.create_label()
l_st = self.create_label()
l_after = self.create_label()
$tac = f"{l_while}: if {$exp.tac} Goto {l_st}\n"
$tac += f"Goto {l_after}\n"
$tac += f"{l_st}: {$st.tac}\n"
$tac += f"Goto {l_while}\n"
$tac += f"{l_after}:\n"
}
|'System.out.println' '(' exp=expression ')' ';'
{
t = self.create_temp()
$tac = f"{t} = {$exp.tac} \n"
}
|id1=identifier '=' exp=expression ';'
{
t = self.create_temp()
$tac = f"{t} = {$exp.tac} \n"
$tac += $id1.text + ' = ' + t + '\n'
}
|id1=identifier '[' exp1=expression ']' '=' exp2=expression ';'
{
t1 = self.create_temp()
$tac = t1 + ' = ' + $exp1.tac + '\n'
t2 = self.create_temp()
$tac += f"{t2} = {$exp2.tac} \n"
$tac += f"{$id1.text} [{t1}] = {t2} \n"
}
;
expression returns [tac = str()]:
exp1=expression opt=( '&&' | '<' | '+' | '-' | '*' ) exp2=expression
{
$tac =$exp1.tac + $opt.text + $exp2.tac
}
|exp1=expression '[' exp2=expression ']'
{
$tac = $exp1.tac + '[' + $exp2.tac + ']' + '\n'
}
|exp1=expression '.' 'length'
{
$tac = 'len ' + '(' + $exp1.tac + ')' + '\n'
}
|exp1=expression '.' id1=identifier '(' ( exp2=expression {$tac = 'PushParam ' + $exp2.tac + '\n'}
( ',' exp3=expression {$tac += 'PushParam ' + $exp3.tac + '\n'})* )? ')'
{
$tac = f"Call {$exp1.tac} {$id1.tac}\n"
$tac += "PopParams"
}
| Integer
{
$tac = $Integer.text
}
|'true'
{
$tac = "true"
}
|'false'
{
$tac = "false"
}
|id1=identifier
{
$tac = $id1.text
}
|'this'
{
$tac = "this"
}
|'new' 'int' '[' exp1=expression ']'
{
$tac = $exp1.tac
}
|'new' id1=identifier '(' ')'
{
$tac = $id1.tac
}
|'!' exp1=expression
{
$tac = "~"+$exp1.tac
}
|'(' exp1=expression ')'
{
$tac = $exp1.tac
}
;
identifier returns [tac = str()]:
Identifier {$tac = $Identifier.text}
;
Identifier: Letter LetterOrDigit*;
fragment LetterOrDigit
: Letter
| [0-9]
;
fragment Letter
: [a-zA-Z$_]
| ~[\u0000-\u007F\uD800-\uDBFF]
| [\uD800-\uDBFF] [\uDC00-\uDFFF]
;
Integer:
[0-9]+
;
WS:
[ \t\r\n\u000C]+ -> channel(HIDDEN);
COMMENT:
'/*' .*? '*/' -> channel(HIDDEN)
;
LINE_COMMENT:
'//' ~[\r\n]* -> channel(HIDDEN)
; |
tarmi-environments.ads | DerickEddington/tarmi | 0 | 23590 | with Ada.Containers; use Ada.Containers;
with Ada.Containers.Hashed_Maps;
with Tarmi.Symbols; use Tarmi.Symbols;
-- TODO: Support multiple environment parents.
package Tarmi.Environments is
function Hash_Symbol (S : Symbol) return Hash_Type;
package Hashed_Maps is new Ada.Containers.Hashed_Maps
(Key_Type => Symbol,
Element_Type => Datum,
Hash => Hash_Symbol,
Equivalent_Keys => "=");
type Environment_R is new Datum_R with
record
Bindings : Hashed_Maps.Map ;
Parent : access all Environment_R ;
end record;
type Environment is not null access all Environment_R;
type Bindings_Spec is array (Positive range <>) of Datum;
function Make_Environment (Bindings : Bindings_Spec) return Environment;
-- TODO: Remove after development.
function Child_Environment (Env : Environment) return Environment;
function Lookup (Name : Symbol; Env : Environment) return Datum;
procedure Bind (Env : Environment; Name : Datum; Val : Datum);
procedure Match_Bind (Env : Environment; Param_Tree : Datum; Obj : Datum);
end Tarmi.Environments;
|
src/riscv32/agate_arch_parameters.ads | Fabien-Chouteau/AGATE | 3 | 23058 | <reponame>Fabien-Chouteau/AGATE
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2018, <NAME> --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with HAL;
with System; use System;
with System.Storage_Elements; use System.Storage_Elements;
package AGATE_Arch_Parameters is
subtype Word is HAL.UInt32;
type Context_Index is range 0 .. 31;
type Task_Context is array (Context_Index) of Word
with Pack, Size => 32 * 32;
Ctx_PC_Index : constant Context_Index := 0;
Ctx_SP_Index : constant Context_Index := 2;
Ctx_TP_Index : constant Context_Index := 4;
Ctx_A0_Index : constant Context_Index := 10;
Ctx_A1_Index : constant Context_Index := 11;
Ctx_A2_Index : constant Context_Index := 12;
Ctx_A3_Index : constant Context_Index := 13;
type Trap_ID is range -24 .. -1;
type Trap_Priority is range 0 .. 0;
CLINT_Addr : constant := 16#02000000#;
CLINT_Mtime_Offset : constant := 16#BFF8#;
CLINT_Mtimecmp_Offset : constant := 16#4000#;
Mtime_Lo_Addr : Address := To_Address (CLINT_Addr + CLINT_Mtime_Offset);
Mtime_Hi_Addr : Address := To_Address (CLINT_Addr + CLINT_Mtime_Offset + 4);
Mtimecmp_Lo_Addr : Address :=
To_Address (CLINT_Addr + CLINT_Mtimecmp_Offset);
Mtimecmp_Hi_Addr : Address :=
To_Address (CLINT_Addr + CLINT_Mtimecmp_Offset + 4);
Timer_Frequency : constant := 32768;
end AGATE_Arch_Parameters;
|
programs/oeis/161/A161428.asm | jmorken/loda | 1 | 82293 | ; A161428: a(n) = A161424(n)/4.
; 4,5,6,7,8,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277
mov $2,$0
sub $0,1
cal $0,86969 ; Duplicate of A014692.
trn $0,5
mov $1,$0
add $1,6
add $1,$2
sub $1,2
|
container-search/src/main/antlr4/com/yahoo/search/yql/yqlplus.g4 | feemstr/vespa | 0 | 1942 | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
grammar yqlplus;
options {
superClass = ParserBase;
language = Java;
}
@header {
import java.util.Stack;
import com.yahoo.search.yql.*;
}
@parser::members {
protected static class expression_scope {
boolean in_select;
}
protected Stack<expression_scope> expression_stack = new Stack();
}
// tokens for command syntax
CREATE : 'create';
SELECT : 'select';
INSERT : 'insert';
UPDATE : 'update';
SET : 'set';
VIEW : 'view';
TABLE : 'table';
DELETE : 'delete';
INTO : 'into';
VALUES : 'values';
IMPORT : 'import';
NEXT : 'next';
PAGED : 'paged';
FALLBACK : 'fallback';
IMPORT_FROM :;
LIMIT : 'limit';
OFFSET : 'offset';
WHERE : 'where';
ORDERBY : 'order by';
DESC : 'desc';
ASC :;
FROM : 'from';
SOURCES : 'sources';
AS : 'as';
MERGE : 'merge';
LEFT : 'left';
JOIN : 'join';
ON : 'on';
COMMA : ',';
OUTPUT : 'output';
COUNT : 'count';
RETURNING : 'returning';
APPLY : 'apply';
CAST : 'cast';
BEGIN : 'begin';
END : 'end';
// type-related
TYPE_BYTE : 'byte';
TYPE_INT16 : 'int16';
TYPE_INT32 : 'int32';
TYPE_INT64 : 'int64';
TYPE_STRING : 'string';
TYPE_DOUBLE : 'double';
TYPE_TIMESTAMP : 'timestamp';
TYPE_BOOLEAN : 'boolean';
TYPE_ARRAY : 'array';
TYPE_MAP : 'map';
// READ_FIELD;
// token literals
TRUE : 'true';
FALSE : 'false';
// brackets and other tokens in literals
LPAREN : '(';
RPAREN : ')';
LBRACKET : '[';
RBRACKET : ']';
LBRACE : '{';
RBRACE : '}';
COLON : ':';
PIPE : '|';
// operators
AND : 'and';
OR : 'or';
NOT_IN : 'not in';
IN : 'in';
QUERY_ARRAY :;
LT : '<';
GT : '>';
LTEQ : '<=';
GTEQ : '>=';
NEQ : '!=';
STAR : '*';
EQ : '=';
LIKE : 'like';
CONTAINS : 'contains';
NOTLIKE : 'not like';
MATCHES : 'matches';
NOTMATCHES : 'not matches';
// effectively unary operators
IS_NULL : 'is null';
IS_NOT_NULL : 'is not null';
// dereference
DOT : '.';
AT : '@';
// quotes
SQ : '\'';
DQ : '"';
// statement delimiter
SEMI : ';';
PROGRAM : 'program';
TIMEOUT : 'timeout';
/*------------------------------------------------------------------
* LEXER RULES
*------------------------------------------------------------------*/
ID : ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|':'|'-')*
;
LONG_INT : '-'?'0'..'9'+ ('L'|'l')
;
INT : '-'?'0'..'9'+
;
FLOAT
: ('-')?('0'..'9')+ '.' ('0'..'9')* EXPONENT?
| ('-')?'.' ('0'..'9')+ EXPONENT?
| ('-')?('0'..'9')+ EXPONENT
;
fragment
EXPONENT : ('e'|'E') ('+'|'-')? ('0'..'9')+ ;
fragment
DIGIT : '0'..'9'
;
fragment
LETTER : 'a'..'z'
| 'A'..'Z'
;
STRING : '"' ( ESC_SEQ | ~('\\'| '"') )* '"'
| '\'' ( ESC_SEQ | ~('\\' | '\'') )* '\''
;
/////////////////////////////
fragment
HEX_DIGIT : ('0'..'9'|'a'..'f'|'A'..'F') ;
fragment
ESC_SEQ
: '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\'|'/')
| UNICODE_ESC
;
fragment
UNICODE_ESC
: '\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
;
WS : ( ' '
| '\t'
| '\r'
| '\n'
// ) {$channel=HIDDEN;}
) -> channel(HIDDEN)
;
COMMENT
: ( ('//') ~('\n'|'\r')* '\r'? '\n'?
// | '/*' ( options {greedy=false;} : . )* '*/'
| '/*' .*? '*/'
)
-> channel(HIDDEN)
;
VESPA_GROUPING
: ('all' | 'each') WS* VESPA_GROUPING_ARG WS*
('as' WS* VESPA_GROUPING_ARG WS*)?
('where' WS* VESPA_GROUPING_ARG)?
;
fragment
VESPA_GROUPING_ARG
: ('(' | '[' | '<')
( ~('(' | '[' | '<' | ')' | ']' | '>') | VESPA_GROUPING_ARG )*
(')' | ']' | '>')
;
/*------------------------------------------------------------------
* PARSER RULES
*------------------------------------------------------------------*/
ident
: keyword_as_ident //{addChild(new TerminalNodeImpl(keyword_as_ident.getText()));}
//{return ID<IDNode>[$keyword_as_ident.text];}
| ID
;
keyword_as_ident
: SELECT | TABLE | DELETE | INTO | VALUES | LIMIT | OFFSET | WHERE | 'order' | 'by' | DESC | MERGE | LEFT | JOIN
| ON | OUTPUT | COUNT | BEGIN | END | APPLY | TYPE_BYTE | TYPE_INT16 | TYPE_INT32 | TYPE_INT64 | TYPE_BOOLEAN | TYPE_TIMESTAMP | TYPE_DOUBLE | TYPE_STRING | TYPE_ARRAY | TYPE_MAP
| VIEW | CREATE | IMPORT | PROGRAM | NEXT | PAGED | SOURCES | SET | MATCHES | LIKE | CAST
;
program : params? (import_statement SEMI)* (ddl SEMI)* (statement SEMI)* EOF
;
params
: PROGRAM LPAREN program_arglist? RPAREN SEMI
;
import_statement
: IMPORT moduleName AS moduleId
| IMPORT moduleId
| FROM moduleName IMPORT import_list
;
import_list
: moduleId (',' moduleId)*
;
moduleId
: ID
;
moduleName
: literalString
| namespaced_name
;
ddl
: view
;
view : CREATE VIEW ID AS source_statement
;
program_arglist
: procedure_argument (',' procedure_argument)*
;
procedure_argument
:
AT (ident TYPE_ARRAY LT typename GTEQ (expression[false])? ) {registerParameter($ident.start.getText(), $typename.start.getText());}
| AT (ident typename ('=' expression[false])? ) {registerParameter($ident.start.getText(), $typename.start.getText());}
;
statement
: output_statement
| selectvar_statement
| next_statement
;
output_statement
: source_statement paged_clause? output_spec?
;
paged_clause
: PAGED fixed_or_parameter
;
next_statement
: NEXT literalString OUTPUT AS ident
;
source_statement
: query_statement (PIPE pipeline_step)*
;
pipeline_step
: namespaced_name arguments[false]?
| vespa_grouping
;
vespa_grouping
: VESPA_GROUPING
| annotation VESPA_GROUPING
;
selectvar_statement
: CREATE ('temp' | 'temporary') TABLE ident AS LPAREN source_statement RPAREN
;
typename
: TYPE_BYTE | TYPE_INT16 | TYPE_INT32 | TYPE_INT64 | TYPE_STRING | TYPE_BOOLEAN | TYPE_TIMESTAMP
| arrayType | mapType | TYPE_DOUBLE
;
arrayType
: TYPE_ARRAY LT typename GT
;
mapType
: TYPE_MAP LT typename GT
;
output_spec
: (OUTPUT AS ident)
| (OUTPUT COUNT AS ident)
;
query_statement
: merge_statement
| select_statement
| insert_statement
| delete_statement
| update_statement
;
// This does not use the UNION / UNION ALL from SQL because the semantics are different than SQL UNION
// - no set operation is implied (no DISTINCT)
// - CQL resultsets may be heterogeneous (rows may have heterogenous types)
merge_statement
: merge_component (MERGE merge_component)+
;
merge_component
: select_statement
| LPAREN source_statement RPAREN
;
select_statement
: SELECT select_field_spec select_source? where? orderby? limit? offset? timeout? fallback?
;
select_field_spec
: project_spec
| STAR
;
project_spec
: field_def (COMMA field_def)*
;
fallback
: FALLBACK select_statement
;
timeout
: TIMEOUT fixed_or_parameter
;
select_source
: select_source_all
| select_source_multi
| select_source_join
;
select_source_all
: FROM SOURCES STAR
;
select_source_multi
: FROM SOURCES source_list
;
select_source_join
: FROM source_spec join_expr*
;
source_list
: namespaced_name (COMMA namespaced_name )*
;
join_expr
: (join_spec source_spec ON joinExpression)
;
join_spec
: LEFT JOIN
| 'inner'? JOIN
;
source_spec
: ( data_source (alias_def { ($data_source.ctx).addChild($alias_def.ctx); })? )
;
alias_def
: (AS? ID)
;
data_source
: call_source
| LPAREN source_statement RPAREN
| sequence_source
;
call_source
: namespaced_name arguments[true]?
;
sequence_source
: AT ident
;
namespaced_name
: (ident (DOT ident)* (DOT STAR)?)
;
orderby
: ORDERBY orderby_fields
;
orderby_fields
: orderby_field (COMMA orderby_field)*
;
orderby_field
: expression[true] DESC
| expression[true] ('asc')?
;
limit
: LIMIT fixed_or_parameter
;
offset
: OFFSET fixed_or_parameter
;
where
: WHERE expression[true]
;
field_def
: expression[true] alias_def?
;
mapExpression
: LBRACE propertyNameAndValue? (COMMA propertyNameAndValue)* RBRACE
;
constantMapExpression
: LBRACE constantPropertyNameAndValue? (COMMA constantPropertyNameAndValue)* RBRACE
;
arguments[boolean in_select]
: LPAREN RPAREN
| LPAREN (argument[$in_select] (COMMA argument[$in_select])*) RPAREN
;
argument[boolean in_select]
: expression[$in_select]
;
// -------- join expressions ------------
// Limit expression syntax for joins: A single equality test and one field from each source.
// This means it can always turn the join into a query to one source, collecting all of the
// keys from the results, and then a query to the other source (or querying the other source inline).
// Does not support map or index references.
joinExpression
: joinDereferencedExpression EQ joinDereferencedExpression
;
joinDereferencedExpression
: namespaced_name
;
// --------- expressions ------------
expression [boolean select]
@init {
expression_stack.push(new expression_scope());
expression_stack.peek().in_select = select;
}
@after {
expression_stack.pop();
}
: annotateExpression
| logicalORExpression
| nullOperator
;
nullOperator
: 'null'
;
annotateExpression
: annotation logicalORExpression
;
annotation
: LBRACKET constantMapExpression RBRACKET
;
logicalORExpression
: logicalANDExpression (OR logicalANDExpression)+
| logicalANDExpression
;
logicalANDExpression
: equalityExpression (AND equalityExpression)*
;
equalityExpression
: relationalExpression ( ((IN | NOT_IN) inNotInTarget)
| (IS_NULL | IS_NOT_NULL)
| (equalityOp relationalExpression) )
| relationalExpression
;
inNotInTarget
: {expression_stack.peek().in_select}? LPAREN select_statement RPAREN
| literal_list
;
equalityOp
: (EQ | NEQ | LIKE | NOTLIKE | MATCHES | NOTMATCHES | CONTAINS)
;
relationalExpression
: additiveExpression (relationalOp additiveExpression)?
;
relationalOp
: (LT | GT | LTEQ | GTEQ)
;
additiveExpression
: multiplicativeExpression (additiveOp additiveExpression)?
;
additiveOp
: '+'
| '-'
;
multiplicativeExpression
: unaryExpression (multOp multiplicativeExpression)?
;
multOp
: '*'
| '/'
| '%'
;
unaryOp
: '-'
| '!'
;
unaryExpression
: dereferencedExpression
| unaryOp dereferencedExpression
;
dereferencedExpression
@init{
boolean in_select = expression_stack.peek().in_select;
}
: primaryExpression
(
indexref[in_select]
| propertyref
)*
;
indexref[boolean in_select]
: LBRACKET idx=expression[in_select] RBRACKET
;
propertyref
: DOT nm=ID
;
operatorCall
@init{
boolean in_select = expression_stack.peek().in_select;
}
: multOp arguments[in_select]
| additiveOp arguments[in_select]
| AND arguments[in_select]
| OR arguments[in_select]
;
primaryExpression
@init {
boolean in_select = expression_stack.peek().in_select;
}
: callExpresion[in_select]
| parameter
| fieldref
| scalar_literal
| arrayLiteral
| mapExpression
| LPAREN expression[in_select] RPAREN
;
callExpresion[boolean in_select]
: namespaced_name arguments[in_select]
;
fieldref
: namespaced_name
;
arrayLiteral
@init {
boolean in_select = expression_stack.peek().in_select;
}
: LBRACKET expression[in_select]? (COMMA expression[in_select])* RBRACKET
;
// a parameter is an argument from outside the YQL statement
parameter
: AT ident
;
propertyNameAndValue
: propertyName ':' expression[{expression_stack.peek().in_select}] //{return (PROPERTY propertyName expression);}
;
constantPropertyNameAndValue
: propertyName ':' constantExpression
;
propertyName
: ID
| literalString
;
constantExpression
: scalar_literal
| constantMapExpression
| constantArray
| parameter
;
constantArray
: LBRACKET i+=constantExpression? (COMMA i+=constantExpression)* RBRACKET
;
scalar_literal
: TRUE
| FALSE
| STRING
| LONG_INT
| INT
| FLOAT
;
literalString
: STRING
;
array_parameter
: AT i=ident {isArrayParameter($i.ctx)}?
;
literal_list
: LPAREN literal_element (COMMA literal_element)* RPAREN //{return ^(ARRAY_LITERAL literal_element+);}
;
literal_element
: scalar_literal
| parameter
;
fixed_or_parameter
: INT
| parameter
;
// INSERT
insert_statement
: INSERT insert_source insert_values returning_spec?
;
insert_source
: INTO write_data_source
;
write_data_source
: namespaced_name
;
insert_values
: field_names_spec VALUES field_values_group_spec (COMMA field_values_group_spec)*
| query_statement
;
field_names_spec
: LPAREN field_def (COMMA field_def)* RPAREN
;
field_values_spec
: LPAREN expression[true] (COMMA expression[true])* RPAREN
;
field_values_group_spec
: LPAREN expression[true] (COMMA expression[true])* RPAREN
;
returning_spec
: RETURNING select_field_spec
;
// DELETE
delete_statement
: DELETE delete_source where? returning_spec?
;
delete_source
: FROM write_data_source
;
// UPDATE
update_statement
: UPDATE update_source SET update_values where? returning_spec?
;
update_source
: write_data_source
;
update_values
: field_names_spec EQ field_values_spec
| field_def (COMMA field_def)*
;
|
FormalAnalyzer/models/meta/cap_mediaPlaybackRepeat.als | Mohannadcse/IoTCOM_BehavioralRuleExtractor | 0 | 3355 |
// filename: cap_mediaPlaybackRepeat.als
module cap_mediaPlaybackRepeat
open IoTBottomUp
one sig cap_mediaPlaybackRepeat extends Capability {}
{
attributes = cap_mediaPlaybackRepeat_attr
}
abstract sig cap_mediaPlaybackRepeat_attr extends Attribute {}
one sig cap_mediaPlaybackRepeat_attr_playbackRepeatMode extends cap_mediaPlaybackRepeat_attr {}
{
values = cap_mediaPlaybackRepeat_attr_playbackRepeatMode_val
}
abstract sig cap_mediaPlaybackRepeat_attr_playbackRepeatMode_val extends AttrValue {}
one sig cap_mediaPlaybackRepeat_attr_playbackRepeatMode_val_all extends cap_mediaPlaybackRepeat_attr_playbackRepeatMode_val {}
one sig cap_mediaPlaybackRepeat_attr_playbackRepeatMode_val_off extends cap_mediaPlaybackRepeat_attr_playbackRepeatMode_val {}
one sig cap_mediaPlaybackRepeat_attr_playbackRepeatMode_val_one extends cap_mediaPlaybackRepeat_attr_playbackRepeatMode_val {}
|
models/tests/hashtable.als | transclosure/Amalgam | 4 | 2597 | <reponame>transclosure/Amalgam<filename>models/tests/hashtable.als
// SAT
// AA3: 8562 46965 21.000
// AA4: 13241 34497 1.665
// UNSAT
// AA3: 5669 28829 17.000
// AA4: 9848 25635 1.087
module tests/felix01/hashtable
// The system progresses over a number of time steps
open util/ordering[Time] as TO
sig Time {}
// Every key has a deterministic hash value
sig Key { hc: one Hashcode }
sig Value {}
one sig DefaultValue extends Value {}
// At any given time, every hashcode is associated with a sequence of buckets
sig Hashcode { buckets: (Int->Bucket) ->Time }
// Every bucket contains a Key and a Value.
sig Bucket { key:Key, value:Value }
fun read [k:Key, t:Time] : Value {
let b = k.hc.buckets.t |
(some i:indices[b] | get[b,i].key=k)
=>
{v:Value | (some i:indices[b] | get[b,i].key=k && get[b,i].value=v) }
else
DefaultValue
}
pred write [k:Key, v:Value, t,t':Time] {
let oldlist = k.hc.buckets.t |
let oldindex = { i:indices[oldlist] | get[oldlist,i].key=k } |
some newbucket:Bucket | {
newbucket.key=k
newbucket.value=v
buckets.t' = buckets.t ++ (k.hc)->oldlist.remove[oldindex].append[newbucket]
}
}
pred init [t:Time] {
no buckets.t
}
pred step [t,t':Time] {
some k:Key, v:Value | write[k,v,t,t']
}
fact {
init[TO/first]
all t:Time-TO/last | let t'=t.next | step[t,t']
}
assert readwriteWorks {
all k:Key, v:Value, t:Time-TO/last | let t'=t.next | write[k,v,t,t']=>read[k,t']=v
}
pred interesting {
some k1,k2:Key |
some v1,v2:Value-DefaultValue |
let t0=TO/first |
let t1=t0.next |
let t2=t1.next |
let t3=t2.next |
k1!=k2 && v1!=v2 && k1.hc=k2.hc && write[k1,v1,t0,t1] && write[k1,v2,t1,t2] && write[k2,v2,t2,t3]
}
run interesting for 3 but 2 Hashcode, 4 Time, 3 int, 2 Key, 3 Value, 4 Bucket expect 1
check readwriteWorks for 3 but 2 Hashcode, 3 Time, 3 int, 2 Key, 3 Value, 4 Bucket expect 0
// METHODS on SEQUENCES
fun indices [x:Int->Bucket] : Int { x.Bucket }
fun get [x:Int->Bucket, i:Int] : Bucket { i.x }
fun remove [x:Int->Bucket, i:Int] : Int->Bucket {
// Obviously this only works for lists that have 3 or fewer elements.
i=Int[0] =>
Int[0]->Int[1].x + Int[1]->Int[2].x
else i=Int[1] =>
Int[0]->Int[0].x + Int[1]->Int[2].x
else
Int[0]->Int[0].x + Int[1]->Int[1].x
// Somehow I couldn't make the following work:
// { j:Int, b:Bucket | ((int j)<(int i) && b=j.x) || ((int j)>=(int i) && b=Int[(int j)+1].x) }
}
fun append [x:Int->Bucket, b:Bucket] : Int->Bucket { x+Int[#x]->b }
|
corpus-for-codebuff/ModeLexer.g4 | studentmain/AntlrVSIX | 67 | 5296 | lexer grammar ModeLexer;
INT
: [0-9]+
;
WS
: [ \t\n]+ -> skip
;
mode AA; // E.g., [int x, List<String> a[]]
NESTED_ARG_ACTION
: '[' -> more, pushMode(AA)
;
ARG_ACTION_ESCAPE
: '\\' . -> more
;
ARG_ACTION_STRING_LITERAL
: ('"' ('\\' . | ~["\\])* '"')-> more
;
ARG_ACTION_CHAR_LITERAL
: ('"' '\\' . | ~["\\] '"') -> more
;
ARG_ACTION
: ']' -> popMode
;
UNTERMINATED_ARG_ACTION // added this to return non-EOF token type here. EOF did something weird
: EOF -> popMode
;
ARG_ACTION_CHAR // must be last
: . -> more
;
|
examples/language/ada.adb | fiugd/welcome | 2 | 18285 | <reponame>fiugd/welcome<filename>examples/language/ada.adb<gh_stars>1-10
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Long_Integer_Text_IO; use Ada.Long_Integer_Text_IO;
procedure Fib is
function Fib (N : Long_Integer) return Long_Integer is
begin
if N <= 1 then
return 1;
end if;
return Fib (N - 1) + Fib (N - 2);
end Fib;
begin
Put (Fib (46));
New_Line;
end Fib;
|
libsrc/rs232/osca/rs232_close.asm | andydansby/z88dk-mk2 | 1 | 85233 | <reponame>andydansby/z88dk-mk2
;
; z88dk RS232 Function
;
; OSCA version
;
; unsigned char rs232_close()
;
; $Id: rs232_close.asm,v 1.1 2012/06/26 06:11:23 stefano Exp $
XLIB rs232_close
rs232_close:
ld hl,0 ;RS_ERR_OK;
ret
|
oeis/067/A067353.asm | neoneye/loda-programs | 11 | 1573 | ; A067353: Divide the natural numbers in sets of consecutive numbers starting with {1,2} as the first set. The number of elements of the n-th set is equal to the sum of the n-1 final numbers in the (n-1)st set. The final number of the n-th set gives a(n).
; Submitted by <NAME>
; 2,4,11,41,199,1184,8273,66163,595439,5954354,65497849,785974133,10217663663,143047291204,2145709367969,34331349887399,583632948085663,10505393065541798,199602468245294009,3992049364905880009,83833036663023479999,1844326806586516559768,42419516551489880874433,1018068397235757140986139,25451709930893928524653199,661744458203242141640982874,17867100371487537824306537273,500278810401651059080583043293,14508085501647880713336908255119,435242565049436421400107247653164
mov $1,3
mov $2,1
mov $3,1
lpb $0
sub $0,1
add $2,1
mul $1,$2
sub $1,$3
add $3,$2
lpe
mov $0,$1
sub $0,1
|
src/asis/a4g-decl_sem.ads | My-Colaborations/dynamo | 15 | 20624 | ------------------------------------------------------------------------------
-- --
-- ASIS-for-GNAT IMPLEMENTATION COMPONENTS --
-- --
-- A 4 G . D E C L _ S E M --
-- --
-- S p e c --
-- --
-- Copyright (C) 1995-2012, Free Software Foundation, Inc. --
-- --
-- ASIS-for-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 --
-- Software Foundation; either version 2, or (at your option) any later --
-- version. ASIS-for-GNAT is distributed in the hope that it will be use- --
-- ful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- --
-- CHANTABILITY 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 ASIS-for-GNAT; see file --
-- COPYING. If not, write to the Free Software Foundation, 59 Temple Place --
-- - Suite 330, Boston, MA 02111-1307, USA. --
-- --
-- --
-- --
-- --
-- --
-- --
-- --
-- --
-- ASIS-for-GNAT was originally developed by the ASIS-for-GNAT team at the --
-- Software Engineering Laboratory of the Swiss Federal Institute of --
-- Technology (LGL-EPFL) in Lausanne, Switzerland, in cooperation with the --
-- Scientific Research Computer Center of Moscow State University (SRCC --
-- MSU), Russia, with funding partially provided by grants from the Swiss --
-- National Science Foundation and the Swiss Academy of Engineering --
-- Sciences. ASIS-for-GNAT is now maintained by Ada Core Technologies Inc --
-- (http://www.gnat.<EMAIL>). --
-- --
------------------------------------------------------------------------------
-- This package contains routines needed for semantic queries from
-- the Asis.Declarations package
with Asis; use Asis;
with Types; use Types;
package A4G.Decl_Sem is
-- All the routines defined in this package do not check their
-- arguments - a caller is responcible for the proper use of these
-- routines
-------------------------------------------------
-- Routines for Corresponding_Type_Definition --
-------------------------------------------------
function Serach_First_View (Type_Entity : Entity_Id) return Entity_Id;
-- taking the node representing the type entity, this function looks
-- for the first occurence of this name in the corresponding declarative
-- region. The idea is to find the declaration of the private or incomplete
-- type for which this type defines the full view. If there is no private
-- or incomplete view, the function returns its argument as a result.
--
-- Note, that Type_Entity should not represent an implicit type created
-- by the compiler.
--
-- The reason why we need this function is that some functions from Sinfo
-- and Einfo needed for semantic queries from Asis.Declarations do not
-- correspond to their documentation or/and have irregular behaviour. If
-- and when the corresponding problems in Einfo and Sinfo are fixed, it
-- would be very nice to get rid of this function, which in fact is no
-- more than ad hoc solution.
---------------------------------------------
-- Routines for Corresponding_Declaration --
---------------------------------------------
function Get_Expanded_Spec (Instance_Node : Node_Id) return Node_Id;
-- For Instance_Node, which should represent a generic instantiation,
-- this function returns the node representing the expanded generic
-- specification. This function never returns an Empty node.
--
-- Note, that in case of subprogram instantiation GNAT creates an
-- artificial package enclosing the resulted subprogram declaration
--
-- This is an error to call this function for argument which does not
-- represent an instantiation, or for a node representing a library
-- unit declaration
function Corresponding_Decl_Node (Body_Node : Node_Id) return Node_Id;
-- For Body_Node representing a body, renaming-as-body or a body stub, this
-- function returns the node representing the corresponding declaration.
--
-- It is an error to call this function in case when no explicit separate
-- declaration exists (that is, in case of renaming-as-declaration or
-- a subprogram body (stub) for which no explicit separate declaration is
-- presented.
--
-- It is also an error to call this function for a node representing a
-- library unit declaration or for a node representing generic
-- instantiation.
--------------------------------------
-- Routines for Corresponding_Body --
--------------------------------------
function Corresponding_Body_Node (Decl_Node : Node_Id) return Node_Id;
-- For Decl_Node representing a declaration of a program unit,
-- this function returns the node representing the corresponding
-- body or renaming-as-body. In is an error to call this function,
-- if a completion of the declaration represented by the argument is
-- located in another compilation unit, and the tree being accessed
-- does not contain this unit (this is the case for subprograms declared
-- immediately within a library package/library generic package).
function Get_Renaming_As_Body
(Node : Node_Id;
Spec_Only : Boolean := False)
return Node_Id;
-- This function tries to find for Node (which should be of
-- N_Subprogram_Declaration kind, otherwise this is an error to call
-- this function) the node representing renaming-as-body which is
-- the completion of this subprogram declaration. The Spec_Only
-- flag should be set to limit the search by a package spec only
-------------------------------------------------
-- Routines for Corresponding_Generic_Element --
-------------------------------------------------
function Get_Corresponding_Generic_Element
(Gen_Unit : Asis.Declaration;
Def_Name : Asis.Element)
return Asis.Element;
-- This function traverses the declaration of a generic package
-- Gen_Unit (by applying an instance of Traverce_Element) in order
-- to find A_Defining_Name Element which represents the corresponding
-- generic element for Def_Name; Def_Name should represent
-- A_Defining_Name element which Is_Part_Of_Instance
end A4G.Decl_Sem;
|
testData/parse/agda/imports.agda | dubinsky/intellij-dtlc | 30 | 15486 | <filename>testData/parse/agda/imports.agda
--
-- Created by Dependently-Typed Lambda Calculus on 2019-05-15
-- imports
-- Author: ice1000
--
{-# OPTIONS --without-K --safe #-}
import Relation.Binary.PropositionalEquality
open import Relation.Binary.PropositionalEquality
import Relation.Binary.PropositionalEquality using ()
import Relation.Binary.PropositionalEquality using (sym) hiding (cong)
import Relation.Binary.PropositionalEquality renaming (sym to symBla)
|
source/xml/sax/matreshka-internals-xml-element_tables.ads | svn2github/matreshka | 24 | 10003 | <reponame>svn2github/matreshka
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- XML Processor --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2010-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$
------------------------------------------------------------------------------
pragma Ada_2012;
package Matreshka.Internals.XML.Element_Tables is
pragma Preelaborate;
type Element_Table is limited private;
procedure New_Element
(Self : in out Element_Table;
Element : out Element_Identifier);
-- Allocates new element and returns its identifier.
function Is_Declared
(Self : Element_Table;
Element : Element_Identifier) return Boolean;
-- Returns True when element was declared.
procedure Set_Is_Declared
(Self : in out Element_Table;
Element : Element_Identifier;
Declared : Boolean);
-- Sets flag to specified value.
function Is_Attributes_Declared
(Self : Element_Table;
Element : Element_Identifier) return Boolean;
-- Returns True when attribute list of element type was declared.
procedure Set_Is_Attributes_Declared
(Self : in out Element_Table;
Element : Element_Identifier;
Declared : Boolean);
-- Sets flag to specified value.
function Attributes
(Self : Element_Table;
Element : Element_Identifier) return Attribute_Identifier;
-- Returns first attribute in the list of declared attributes.
procedure Set_Attributes
(Self : in out Element_Table;
Element : Element_Identifier;
Attribute : Attribute_Identifier);
-- Sets first attribute in the list of declared attributes.
function Is_Mixed_Content
(Self : Element_Table;
Element : Element_Identifier) return Boolean;
procedure Set_Is_Mixed_Content
(Self : in out Element_Table;
Element : Element_Identifier;
Value : Boolean);
function Is_Empty
(Self : Element_Table;
Element : Element_Identifier) return Boolean;
procedure Set_Is_Empty
(Self : in out Element_Table;
Element : Element_Identifier;
Value : Boolean);
function Is_Any
(Self : Element_Table;
Element : Element_Identifier) return Boolean;
procedure Set_Is_Any
(Self : in out Element_Table;
Element : Element_Identifier;
Value : Boolean);
function Has_Children
(Self : Element_Table;
Element : Element_Identifier) return Boolean;
-- XXX This subprogram is used to check syntax of the mixed content
-- declaration temporary. It probably should be removed after
-- implementation of DTD validation.
procedure Set_Has_Children
(Self : in out Element_Table;
Element : Element_Identifier;
Value : Boolean);
-- XXX This subprogram is used to check syntax of the mixed content
-- declaration temporary. It probably should be removed after
-- implementation of DTD validation.
procedure Reset (Self : in out Element_Table);
-- Resets internal structures to initial state.
procedure Finalize (Self : in out Element_Table);
-- Releases all ocupied resources.
function First_Element (Self : Element_Table) return Element_Identifier
with Inline => True;
-- Returns first element of the element table if any; returns No_Element
-- when table is empty.
procedure Next_Element
(Self : Element_Table;
Element : in out Element_Identifier)
with Inline => True;
-- Sets Element to the next element in the element table if present or to
-- No_Element if where is no more element.
private
type Element_Record is record
Attributes : Attribute_Identifier;
Is_Declared : Boolean;
Is_Attributes_Declared : Boolean;
Is_Empty : Boolean;
Is_Any : Boolean;
Is_Mixed_Content : Boolean;
Has_Children : Boolean;
end record;
type Element_Array is array (Element_Identifier range <>) of Element_Record;
type Element_Array_Access is access all Element_Array;
type Element_Table is limited record
Table : Element_Array_Access := new Element_Array (1 .. 16);
Last : Element_Identifier := No_Element;
end record;
pragma Inline (Attributes);
pragma Inline (Is_Attributes_Declared);
pragma Inline (Is_Declared);
pragma Inline (Set_Attributes);
pragma Inline (Set_Is_Attributes_Declared);
pragma Inline (Set_Is_Declared);
end Matreshka.Internals.XML.Element_Tables;
|
programs/oeis/025/A025682.asm | neoneye/loda | 22 | 169044 | ; A025682: Exponent of 9 (value of j) in n-th number of form 8^i*9^j.
; 0,0,1,0,1,2,0,1,2,3,0,1,2,3,4,0,1,2,3,4,5,0,1,2,3,4,5,6,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,8,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,10,0,1,2,3,4,5,6,7,8,9,10,11,0,1,2,3,4,5,6,7,8,9,10,11,12,0,1,2,3,4,5,6,7,8
lpb $0
add $1,1
sub $0,$1
lpe
|
alloy4fun_models/trashltl/models/17/porWs2KaACnYe7hRm.als | Kaixi26/org.alloytools.alloy | 0 | 179 | <reponame>Kaixi26/org.alloytools.alloy
open main
pred idporWs2KaACnYe7hRm_prop18 {
always all f : Protected | f in Trash implies after f not in Protected
}
pred __repair { idporWs2KaACnYe7hRm_prop18 }
check __repair { idporWs2KaACnYe7hRm_prop18 <=> prop18o } |
gcc-gcc-7_3_0-release/gcc/ada/s-crtl.ads | best08618/asylo | 7 | 14481 | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . C R T L --
-- --
-- S p e c --
-- --
-- Copyright (C) 2003-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package provides the low level interface to the C runtime library
pragma Compiler_Unit_Warning;
with System.Parameters;
package System.CRTL is
pragma Preelaborate;
subtype chars is System.Address;
-- Pointer to null-terminated array of characters
-- Should use Interfaces.C.Strings types instead, but this causes bootstrap
-- issues as i-c contains Ada 2005 specific features, not compatible with
-- older, Ada 95-only base compilers???
subtype DIRs is System.Address;
-- Corresponds to the C type DIR*
subtype FILEs is System.Address;
-- Corresponds to the C type FILE*
subtype int is Integer;
type long is range -(2 ** (System.Parameters.long_bits - 1))
.. +(2 ** (System.Parameters.long_bits - 1)) - 1;
subtype off_t is Long_Integer;
type size_t is mod 2 ** Standard'Address_Size;
type ssize_t is range -(2 ** (Standard'Address_Size - 1))
.. +(2 ** (Standard'Address_Size - 1)) - 1;
type int64 is new Long_Long_Integer;
-- Note: we use Long_Long_Integer'First instead of -2 ** 63 to allow this
-- unit to compile when using custom target configuration files where the
-- maximum integer is 32 bits. This is useful for static analysis tools
-- such as SPARK or CodePeer. In the normal case, Long_Long_Integer is
-- always 64-bits so there is no difference.
type Filename_Encoding is (UTF8, ASCII_8bits, Unspecified);
for Filename_Encoding use (UTF8 => 0, ASCII_8bits => 1, Unspecified => 2);
pragma Convention (C, Filename_Encoding);
-- Describes the filename's encoding
--------------------
-- GCC intrinsics --
--------------------
-- The following functions are imported with convention Intrinsic so that
-- we take advantage of back-end builtins if present (else we fall back
-- to C library functions by the same names).
function strlen (A : System.Address) return size_t;
pragma Import (Intrinsic, strlen, "strlen");
procedure strncpy (dest, src : System.Address; n : size_t);
pragma Import (Intrinsic, strncpy, "strncpy");
-------------------------------
-- Other C runtime functions --
-------------------------------
function atoi (A : System.Address) return Integer;
pragma Import (C, atoi, "atoi");
procedure clearerr (stream : FILEs);
pragma Import (C, clearerr, "clearerr");
function dup (handle : int) return int;
pragma Import (C, dup, "dup");
function dup2 (from, to : int) return int;
pragma Import (C, dup2, "dup2");
function fclose (stream : FILEs) return int;
pragma Import (C, fclose, "fclose");
function fdopen (handle : int; mode : chars) return FILEs;
pragma Import (C, fdopen, "fdopen");
function fflush (stream : FILEs) return int;
pragma Import (C, fflush, "fflush");
function fgetc (stream : FILEs) return int;
pragma Import (C, fgetc, "fgetc");
function fgets (strng : chars; n : int; stream : FILEs) return chars;
pragma Import (C, fgets, "fgets");
function fopen
(filename : chars;
mode : chars;
encoding : Filename_Encoding := Unspecified) return FILEs;
pragma Import (C, fopen, "__gnat_fopen");
function fputc (C : int; stream : FILEs) return int;
pragma Import (C, fputc, "fputc");
function fputwc (C : int; stream : FILEs) return int;
pragma Import (C, fputwc, "__gnat_fputwc");
function fputs (Strng : chars; Stream : FILEs) return int;
pragma Import (C, fputs, "fputs");
procedure free (Ptr : System.Address);
pragma Import (C, free, "free");
function freopen
(filename : chars;
mode : chars;
stream : FILEs;
encoding : Filename_Encoding := Unspecified) return FILEs;
pragma Import (C, freopen, "__gnat_freopen");
function fseek
(stream : FILEs;
offset : long;
origin : int) return int;
pragma Import (C, fseek, "fseek");
function fseek64
(stream : FILEs;
offset : int64;
origin : int) return int;
pragma Import (C, fseek64, "__gnat_fseek64");
function ftell (stream : FILEs) return long;
pragma Import (C, ftell, "ftell");
function ftell64 (stream : FILEs) return int64;
pragma Import (C, ftell64, "__gnat_ftell64");
function getenv (S : String) return System.Address;
pragma Import (C, getenv, "getenv");
function isatty (handle : int) return int;
pragma Import (C, isatty, "isatty");
function lseek (fd : int; offset : off_t; direction : int) return off_t;
pragma Import (C, lseek, "lseek");
function malloc (Size : size_t) return System.Address;
pragma Import (C, malloc, "malloc");
procedure memcpy (S1 : System.Address; S2 : System.Address; N : size_t);
pragma Import (C, memcpy, "memcpy");
procedure memmove (S1 : System.Address; S2 : System.Address; N : size_t);
pragma Import (C, memmove, "memmove");
procedure mktemp (template : chars);
pragma Import (C, mktemp, "mktemp");
function pclose (stream : System.Address) return int;
pragma Import (C, pclose, "pclose");
function popen (command, mode : System.Address) return System.Address;
pragma Import (C, popen, "popen");
function realloc
(Ptr : System.Address; Size : size_t) return System.Address;
pragma Import (C, realloc, "realloc");
procedure rewind (stream : FILEs);
pragma Import (C, rewind, "rewind");
function rmdir (dir_name : String) return int;
pragma Import (C, rmdir, "__gnat_rmdir");
function chdir (dir_name : String) return int;
pragma Import (C, chdir, "__gnat_chdir");
function mkdir
(dir_name : String;
encoding : Filename_Encoding := Unspecified) return int;
pragma Import (C, mkdir, "__gnat_mkdir");
function setvbuf
(stream : FILEs;
buffer : chars;
mode : int;
size : size_t) return int;
pragma Import (C, setvbuf, "setvbuf");
procedure tmpnam (str : chars);
pragma Import (C, tmpnam, "tmpnam");
function tmpfile return FILEs;
pragma Import (C, tmpfile, "tmpfile");
function ungetc (c : int; stream : FILEs) return int;
pragma Import (C, ungetc, "ungetc");
function unlink (filename : chars) return int;
pragma Import (C, unlink, "__gnat_unlink");
function open (filename : chars; oflag : int) return int;
pragma Import (C, open, "__gnat_open");
function close (fd : int) return int;
pragma Import (C, close, "close");
function read (fd : int; buffer : chars; count : size_t) return ssize_t;
pragma Import (C, read, "read");
function write (fd : int; buffer : chars; count : size_t) return ssize_t;
pragma Import (C, write, "write");
end System.CRTL;
|
src/amd64/noexceptionsa.asm | dmarov/chamd | 22 | 89186 | <gh_stars>10-100
_TEXT SEGMENT 'CODE'
PUBLIC NoException14
NoException14:
;Security cookies sucks, so getjmp/longjmp are not usable
;So, just falling back to an exceptionless Copy command instead
;or disassemble the instruction RIP points at
;rsp=errorcode
;rsp+8=rip
;rsp+10=cs ;20
;rsp+18=eflags
;rsp+20=rsp
;rsp+28=ss
add rsp,8 ;skip the errorcode
push rax ;push rax -state as above again
mov rax,ExceptionlessCopy_Exception
mov [rsp+8],rax
pop rax
iretq ;go to the designated return address
PUBLIC ExceptionlessCopy_Internal
;rcx=destination
;rdx=source
;r8=size in bytes
ExceptionlessCopy_Internal:
push rbp
mov rbp,rsp
;[rbp] = old rbp value
;[rbp+8] = return address
;[rbp+10h] - [rbp+30h] = scratchspace
mov [rbp+10h],rsi
mov [rbp+18h],rdi
mov rsi,rdx
mov rdi,rcx
mov rcx,r8
rep movsb ;todo: split this up into movsq, movsd, movsw, movsd, or some of those other string routines
;on exception just exit
ExceptionlessCopy_Exception:
mov rsi,[rbp+10h]
mov rdi,[rbp+18h]
sub r8,rcx ;decrease the number of bytes left from the total amount of bytes to get the total bytes written
mov rax,r8
pop rbp
ret
_TEXT ENDS
END |
build.applescript | doekman/Pashua-Binding-AppleScript-Library | 1 | 218 | #!/usr/bin/osascript
-- BUILD ASPashua Library
on do_shell_with_log(naam, cmd)
set cmdResult to do shell script cmd
log "SHELL " & naam & ": [" & cmd & "] > [" & cmdResult & "]"
end do_shell_with_log
on get_boolean_default(key_name, default_value)
try
return (do shell script "defaults read com.zanstra.ASPashua embed_pashua") is "1"
on error number 1
return default_value
end try
end get_boolean_default
set embed_pashua to get_boolean_default("embed_pashua", false)
set deploy_library to get_boolean_default("deploy_library", true)
set libName to "ASPashua"
set scriptFolder to POSIX path of ((path to me as text) & "::")
set buildFolder to scriptFolder & "build/"
set sourceFolder to scriptFolder & "source/"
set userLibraryFolder to POSIX path of (path to library folder from user domain)
set scriptLibrariesFolder to userLibraryFolder & "Script Libraries/"
set sourceFile to POSIX file (sourceFolder & libName & ".applescript")
set targetFile to POSIX file (buildFolder & libName & ".scptd")
-- CLEAN
set buildPath to quoted form of buildFolder
do_shell_with_log("clean", "rm -R -d -f " & buildPath & "; mkdir " & buildPath)
--| compile and save as script bundle
tell application "Script Editor"
set libSource to open sourceFile
if not (compile libSource) then
error "ERROR: Compilation had error"
end if
save libSource as "script bundle" in targetFile with run only
--Hard way to close a document
--(this didn't work: "close libSource saving no")
repeat with d in documents
if name of d is (libName & ".scptd") then
close d saving no
exit repeat
end if
end repeat
end tell
--| now add the resources (SDEF and binaries)
set sourceResourcesPath to quoted form of POSIX path of (sourceFolder & "Resources/")
set targetResourcesPath to quoted form of POSIX path of ((POSIX path of targetFile) & "/Contents/Resources")
-- use rsync instead of cp, so we can exclude hidden files (--exclude=".*")
do_shell_with_log("resources", "rsync -av --exclude='.*' " & sourceResourcesPath & space & targetResourcesPath)
if embed_pashua then
--| First lookup binary
set pashua_binary to missing value
repeat with pashua_location in [path to applications folder from user domain, path to applications folder from local domain]
set app_location to (pashua_location as text) & "Pashua.app"
tell application "Finder"
if alias app_location exists then
set pashua_binary to (my POSIX path of alias app_location)
end if
end tell
end repeat
if pashua_binary is missing value then
error "Can't locate Pashua.app. Please put it in /Applications or ~/Applications"
end if
--| finally copy Pashua.app, first trim the trailing "/" of pashua_binary
set pashua_binary to text 1 thru ((length of pashua_binary) - 1) of pashua_binary
set pashuaSource to quoted form of pashua_binary
set pashuaTargetPath to quoted form of POSIX path of ((POSIX path of targetFile) & "/Contents/Resources/bin")
do_shell_with_log("embed_pashua", "cp -R " & pashuaSource & space & pashuaTargetPath)
end if
--| update the Info.plist with the custom one
set infoPlistSource to quoted form of ((POSIX path of sourceFolder) & "Info.plist")
set infoPlistTarget to quoted form of ((POSIX path of targetFile) & "/Contents")
do_shell_with_log("info.plist", "cp -f " & infoPlistSource & space & infoPlistTarget)
if deploy_library then
--| install in Script Libraries (create folder when it doesn't exist; remove library first, to prevent merging of package)
set deploySource to quoted form of POSIX path of targetFile
set deployDestinationFile to quoted form of (scriptLibrariesFolder & libName & ".scptd")
set deployDestination to quoted form of scriptLibrariesFolder
do_shell_with_log("deploy", "mkdir " & deployDestination & "; rm -R -f " & deployDestinationFile & "; cp -R " & deploySource & space & deployDestination)
end if
--| and we're done.
if deploy_library then
set message to "The scripting library has been build and installed."
else
set message to "The scripting library has been build."
end if
if embed_pashua then set message to message & " Pashua.app has been embedded."
display notification message with title libName & " Library"
|
alloy4fun_models/trainstlt/models/6/ds8FxKRMHEYRXCp4A.als | Kaixi26/org.alloytools.alloy | 0 | 2819 | open main
pred idds8FxKRMHEYRXCp4A_prop7 {
always (all t:Train | some (t.pos & Entry ) implies eventually some (t.pos & Exit) )
}
pred __repair { idds8FxKRMHEYRXCp4A_prop7 }
check __repair { idds8FxKRMHEYRXCp4A_prop7 <=> prop7o } |
other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/polygon.lzh/polygon/sf2/bank4.asm | prismotizm/gigaleak | 0 | 24575 | <filename>other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/polygon.lzh/polygon/sf2/bank4.asm<gh_stars>0
Name: bank4.asm
Type: file
Size: 676
Last-Modified: '1993-01-07T04:42:26Z'
SHA-1: 92E75438C51EB1A0A9BED348CEEA311944930165
Description: null
|
agda/Algebra/Construct/Free/Semilattice/Relation/Unary/Any/Map.agda | oisdk/combinatorics-paper | 6 | 16992 | <reponame>oisdk/combinatorics-paper
{-# OPTIONS --cubical --safe #-}
module Algebra.Construct.Free.Semilattice.Relation.Unary.Any.Map where
open import Prelude hiding (⊥; ⊤)
open import Algebra.Construct.Free.Semilattice.Eliminators
open import Algebra.Construct.Free.Semilattice.Definition
open import Cubical.Foundations.HLevels
open import Data.Empty.UniversePolymorphic
open import HITs.PropositionalTruncation.Sugar
open import HITs.PropositionalTruncation.Properties
open import HITs.PropositionalTruncation
open import Data.Unit.UniversePolymorphic
open import Algebra.Construct.Free.Semilattice.Relation.Unary.Any.Def
open import Algebra.Construct.Free.Semilattice.Relation.Unary.Membership
private
variable p : Level
variable P : A → Type p
-- map-◇-fn : ∀ x → P x → ∀ y xs → (x ∈ xs → ◇ P xs) → (y ≡ x) ⊎ (x ∈ xs) → ◇ P (y ∷ xs)
-- map-◇-fn {P = P} x Px y xs k (inl y≡x) = ∣ inl (subst P (sym y≡x) Px) ∣
-- map-◇-fn x Px y xs k (inr x∈xs) = ∣ inr (k x∈xs) ∣
-- map-◇-prop : ∀ (x : A) {xs} → isProp (x ∈ xs → ◇ P xs)
-- map-◇-prop {P = P} x {xs} p q i x∈xs = ◇′ P xs .snd (p x∈xs) (q x∈xs) i
-- map-◇ : ∀ (x : A) → P x → (xs : 𝒦 A) → x ∈ xs → ◇ P xs
-- map-◇ {A = A} {P = P} x Px =
-- 𝒦-elim-prop {A = A} {P = λ ys → x ∈ ys → ◇ P ys}
-- (map-◇-prop {A = A} {P = P} x)
-- (λ y xs Pxs → recPropTrunc squash (map-◇-fn x Px y xs Pxs))
-- (λ ())
|
programs/oeis/271/A271995.asm | karttu/loda | 0 | 245699 | <gh_stars>0
; A271995: The Pnictogen sequence: a(n) = A018227(n)-3.
; 7,15,33,51,83,115,165,215,287,359,457,555,683,811,973,1135,1335,1535,1777,2019,2307,2595,2933,3271,3663,4055,4505,4955,5467,5979,6557,7135,7783,8431,9153,9875,10675,11475,12357,13239,14207,15175,16233,17291,18443,19595,20845,22095,23447,24799,26257,27715,29283,30851,32533,34215,36015,37815,39737,41659,43707,45755,47933,50111,52423,54735,57185,59635,62227,64819,67557,70295,73183,76071,79113,82155,85355,88555,91917,95279,98807,102335,106033,109731,113603,117475,121525,125575,129807,134039,138457,142875,147483,152091,156893,161695,166695,171695,176897,182099,187507,192915,198533,204151,209983,215815,221865,227915,234187,240459,246957,253455,260183,266911,273873,280835,288035,295235,302677,310119,317807,325495,333433,341371,349563,357755,366205,374655,383367,392079,401057,410035,419283,428531,438053,447575,457375,467175,477257,487339,497707,508075,518733,529391,540343,551295,562545,573795,585347,596899,608757,620615,632783,644951,657433,669915,682715,695515,708637,721759,735207,748655,762433,776211,790323,804435,818885,833335,848127,862919,878057,893195,908683,924171,940013,955855,972055,988255,1004817,1021379,1038307,1055235,1072533,1089831,1107503,1125175,1143225,1161275,1179707,1198139,1216957,1235775,1254983,1274191,1293793,1313395,1333395,1353395,1373797,1394199,1415007,1435815,1457033,1478251,1499883,1521515,1543565,1565615,1588087,1610559,1633457,1656355,1679683,1703011,1726773,1750535,1774735,1798935,1823577,1848219,1873307,1898395,1923933,1949471,1975463,2001455,2027905,2054355,2081267,2108179,2135557,2162935,2190783,2218631,2246953,2275275,2304075,2332875,2362157,2391439,2421207,2450975,2481233,2511491,2542243,2572995,2604245,2635495,2667247,2698999
mov $2,$0
add $2,1
mov $5,$0
lpb $2,1
mov $0,$5
sub $2,1
sub $0,$2
add $3,7
mov $4,$0
div $4,2
add $4,1
lpb $0,1
mov $0,0
add $4,1
mov $3,$4
mul $3,$4
mul $3,2
lpe
add $1,$3
lpe
|
programs/oeis/147/A147874.asm | karttu/loda | 1 | 6150 | ; A147874: a(n) = (5*n-7)*(n-1).
; 0,3,16,39,72,115,168,231,304,387,480,583,696,819,952,1095,1248,1411,1584,1767,1960,2163,2376,2599,2832,3075,3328,3591,3864,4147,4440,4743,5056,5379,5712,6055,6408,6771,7144,7527,7920,8323,8736,9159,9592,10035,10488,10951,11424,11907,12400,12903,13416,13939,14472,15015,15568,16131,16704,17287,17880,18483,19096,19719,20352,20995,21648,22311,22984,23667,24360,25063,25776,26499,27232,27975,28728,29491,30264,31047,31840,32643,33456,34279,35112,35955,36808,37671,38544,39427,40320,41223,42136,43059,43992,44935,45888,46851,47824,48807,49800,50803,51816,52839,53872,54915,55968,57031,58104,59187,60280,61383,62496,63619,64752,65895,67048,68211,69384,70567,71760,72963,74176,75399,76632,77875,79128,80391,81664,82947,84240,85543,86856,88179,89512,90855,92208,93571,94944,96327,97720,99123,100536,101959,103392,104835,106288,107751,109224,110707,112200,113703,115216,116739,118272,119815,121368,122931,124504,126087,127680,129283,130896,132519,134152,135795,137448,139111,140784,142467,144160,145863,147576,149299,151032,152775,154528,156291,158064,159847,161640,163443,165256,167079,168912,170755,172608,174471,176344,178227,180120,182023,183936,185859,187792,189735,191688,193651,195624,197607,199600,201603,203616,205639,207672,209715,211768,213831,215904,217987,220080,222183,224296,226419,228552,230695,232848,235011,237184,239367,241560,243763,245976,248199,250432,252675,254928,257191,259464,261747,264040,266343,268656,270979,273312,275655,278008,280371,282744,285127,287520,289923,292336,294759,297192,299635,302088,304551,307024,309507
mov $1,$0
mul $0,5
sub $0,2
mul $1,$0
|
data/wild/kanto_grass.asm | zavytar/pokecolorless | 0 | 4331 | ; Kanto Pokémon in grass
KantoGrassWildMons:
map_id ROUTE_1
db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite
; morn
db 2, PIDGEY
db 2, RATTATA
db 3, RATTATA
db 3, PIDGEY
db 6, RATTATA
db 4, PIDGEY
db 4, PIDGEY
; day
db 2, PIDGEY
db 2, RATTATA
db 3, RATTATA
db 3, PIDGEY
db 6, RATTATA
db 4, PIDGEY
db 4, PIDGEY
; nite
db 2, HOOTHOOT
db 2, RATTATA
db 3, RATTATA
db 3, HOOTHOOT
db 6, RATTATA
db 4, HOOTHOOT
db 4, HOOTHOOT
map_id ROUTE_2
db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite
; morn
db 3, CATERPIE
db 3, LEDYBA
db 5, PIDGEY
db 7, CATERPIE
db 7, LEDIAN
db 4, PIKACHU
db 4, PIKACHU
; day
db 3, CATERPIE
db 3, PIDGEY
db 5, PIDGEY
db 7, CATERPIE
db 7, PIDGEOTTO
db 4, PIKACHU
db 4, PIKACHU
; nite
db 3, HOOTHOOT
db 3, SPINARAK
db 5, HOOTHOOT
db 7, NOCTOWL
db 7, CATERPIE
db 4, NOCTOWL
db 4, NOCTOWL
map_id ROUTE_22
db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite
; morn
db 3, RATTATA
db 3, SPEAROW
db 5, SPEAROW
db 4, DODUO
db 6, PONYTA
db 7, FEAROW
db 7, FEAROW
; day
db 3, RATTATA
db 3, SPEAROW
db 5, SPEAROW
db 4, DODUO
db 6, PONYTA
db 7, FEAROW
db 7, FEAROW
; nite
db 3, RATTATA
db 3, POLIWAG
db 5, RATTATA
db 4, POLIWAG
db 6, RATTATA
db 7, RATTATA
db 7, RATTATA
map_id VIRIDIAN_FOREST
db 4 percent, 4 percent, 4 percent ; encounter rates: morn/day/nite
; morn
db 5, CATERPIE
db 5, WEEDLE
db 7, METAPOD
db 7, KAKUNA
db 5, PIDGEY
db 5, PIKACHU
db 9, PIDGEOTTO
; day
db 5, CATERPIE
db 5, WEEDLE
db 7, METAPOD
db 7, KAKUNA
db 5, PIDGEY
db 5, PIKACHU
db 5, BULBASAUR
; nite
db 5, CATERPIE
db 5, WEEDLE
db 7, METAPOD
db 7, KAKUNA
db 5, ODDISH
db 6, ODDISH
db 5, PIKACHU
db -1 ; end
map_id ROUTE_3
db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite
; morn
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, MANKEY
db 7, LEDIAN
db 4, JIGGLYPUFF
db 4, PIKACHU
; day
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, MANKEY
db 7, PIDGEOTTO
db 4, JIGGLYPUFF
db 4, PIKACHU
; nite
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, JIGGLYPUFF
db 7, CATERPIE
db 4, NOCTOWL
db 4, NOCTOWL
map_id MOUNT_MOON_1F
db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite
; morn
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, MANKEY
db 7, LEDIAN
db 4, JIGGLYPUFF
db 4, PIKACHU
; day
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, MANKEY
db 7, PIDGEOTTO
db 4, JIGGLYPUFF
db 4, PIKACHU
; nite
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, JIGGLYPUFF
db 7, CATERPIE
db 4, NOCTOWL
db 4, NOCTOWL
map_id MOUNT_MOON_B1F
db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite
; morn
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, MANKEY
db 7, LEDIAN
db 4, JIGGLYPUFF
db 4, PIKACHU
; day
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, MANKEY
db 7, PIDGEOTTO
db 4, JIGGLYPUFF
db 4, PIKACHU
; nite
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, JIGGLYPUFF
db 7, CATERPIE
db 4, NOCTOWL
db 4, NOCTOWL
map_id MOUNT_MOON_B2F
db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite
; morn
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, MANKEY
db 7, LEDIAN
db 4, JIGGLYPUFF
db 4, PIKACHU
; day
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, MANKEY
db 7, PIDGEOTTO
db 4, JIGGLYPUFF
db 4, PIKACHU
; nite
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, JIGGLYPUFF
db 7, CATERPIE
db 4, NOCTOWL
db 4, NOCTOWL
map_id ROUTE_4
db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite
; morn
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, MANKEY
db 7, LEDIAN
db 4, JIGGLYPUFF
db 4, PIKACHU
; day
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, MANKEY
db 7, PIDGEOTTO
db 4, JIGGLYPUFF
db 4, PIKACHU
; nite
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, JIGGLYPUFF
db 7, CATERPIE
db 4, NOCTOWL
db 4, NOCTOWL
|
externals/openssl-1.0.2d/tmp64/sha1-x86_64.asm | doomdagger/cpython | 5 | 81949 | default rel
%define XMMWORD
%define YMMWORD
%define ZMMWORD
section .text code align=64
EXTERN OPENSSL_ia32cap_P
global sha1_block_data_order
ALIGN 16
sha1_block_data_order:
mov QWORD[8+rsp],rdi ;WIN64 prologue
mov QWORD[16+rsp],rsi
mov rax,rsp
$L$SEH_begin_sha1_block_data_order:
mov rdi,rcx
mov rsi,rdx
mov rdx,r8
mov r9d,DWORD[((OPENSSL_ia32cap_P+0))]
mov r8d,DWORD[((OPENSSL_ia32cap_P+4))]
mov r10d,DWORD[((OPENSSL_ia32cap_P+8))]
test r8d,512
jz NEAR $L$ialu
test r10d,536870912
jnz NEAR _shaext_shortcut
and r10d,296
cmp r10d,296
je NEAR _avx2_shortcut
and r8d,268435456
and r9d,1073741824
or r8d,r9d
cmp r8d,1342177280
je NEAR _avx_shortcut
jmp NEAR _ssse3_shortcut
ALIGN 16
$L$ialu:
mov rax,rsp
push rbx
push rbp
push r12
push r13
push r14
mov r8,rdi
sub rsp,72
mov r9,rsi
and rsp,-64
mov r10,rdx
mov QWORD[64+rsp],rax
$L$prologue:
mov esi,DWORD[r8]
mov edi,DWORD[4+r8]
mov r11d,DWORD[8+r8]
mov r12d,DWORD[12+r8]
mov r13d,DWORD[16+r8]
jmp NEAR $L$loop
ALIGN 16
$L$loop:
mov edx,DWORD[r9]
bswap edx
mov ebp,DWORD[4+r9]
mov eax,r12d
mov DWORD[rsp],edx
mov ecx,esi
bswap ebp
xor eax,r11d
rol ecx,5
and eax,edi
lea r13d,[1518500249+r13*1+rdx]
add r13d,ecx
xor eax,r12d
rol edi,30
add r13d,eax
mov r14d,DWORD[8+r9]
mov eax,r11d
mov DWORD[4+rsp],ebp
mov ecx,r13d
bswap r14d
xor eax,edi
rol ecx,5
and eax,esi
lea r12d,[1518500249+r12*1+rbp]
add r12d,ecx
xor eax,r11d
rol esi,30
add r12d,eax
mov edx,DWORD[12+r9]
mov eax,edi
mov DWORD[8+rsp],r14d
mov ecx,r12d
bswap edx
xor eax,esi
rol ecx,5
and eax,r13d
lea r11d,[1518500249+r11*1+r14]
add r11d,ecx
xor eax,edi
rol r13d,30
add r11d,eax
mov ebp,DWORD[16+r9]
mov eax,esi
mov DWORD[12+rsp],edx
mov ecx,r11d
bswap ebp
xor eax,r13d
rol ecx,5
and eax,r12d
lea edi,[1518500249+rdi*1+rdx]
add edi,ecx
xor eax,esi
rol r12d,30
add edi,eax
mov r14d,DWORD[20+r9]
mov eax,r13d
mov DWORD[16+rsp],ebp
mov ecx,edi
bswap r14d
xor eax,r12d
rol ecx,5
and eax,r11d
lea esi,[1518500249+rsi*1+rbp]
add esi,ecx
xor eax,r13d
rol r11d,30
add esi,eax
mov edx,DWORD[24+r9]
mov eax,r12d
mov DWORD[20+rsp],r14d
mov ecx,esi
bswap edx
xor eax,r11d
rol ecx,5
and eax,edi
lea r13d,[1518500249+r13*1+r14]
add r13d,ecx
xor eax,r12d
rol edi,30
add r13d,eax
mov ebp,DWORD[28+r9]
mov eax,r11d
mov DWORD[24+rsp],edx
mov ecx,r13d
bswap ebp
xor eax,edi
rol ecx,5
and eax,esi
lea r12d,[1518500249+r12*1+rdx]
add r12d,ecx
xor eax,r11d
rol esi,30
add r12d,eax
mov r14d,DWORD[32+r9]
mov eax,edi
mov DWORD[28+rsp],ebp
mov ecx,r12d
bswap r14d
xor eax,esi
rol ecx,5
and eax,r13d
lea r11d,[1518500249+r11*1+rbp]
add r11d,ecx
xor eax,edi
rol r13d,30
add r11d,eax
mov edx,DWORD[36+r9]
mov eax,esi
mov DWORD[32+rsp],r14d
mov ecx,r11d
bswap edx
xor eax,r13d
rol ecx,5
and eax,r12d
lea edi,[1518500249+rdi*1+r14]
add edi,ecx
xor eax,esi
rol r12d,30
add edi,eax
mov ebp,DWORD[40+r9]
mov eax,r13d
mov DWORD[36+rsp],edx
mov ecx,edi
bswap ebp
xor eax,r12d
rol ecx,5
and eax,r11d
lea esi,[1518500249+rsi*1+rdx]
add esi,ecx
xor eax,r13d
rol r11d,30
add esi,eax
mov r14d,DWORD[44+r9]
mov eax,r12d
mov DWORD[40+rsp],ebp
mov ecx,esi
bswap r14d
xor eax,r11d
rol ecx,5
and eax,edi
lea r13d,[1518500249+r13*1+rbp]
add r13d,ecx
xor eax,r12d
rol edi,30
add r13d,eax
mov edx,DWORD[48+r9]
mov eax,r11d
mov DWORD[44+rsp],r14d
mov ecx,r13d
bswap edx
xor eax,edi
rol ecx,5
and eax,esi
lea r12d,[1518500249+r12*1+r14]
add r12d,ecx
xor eax,r11d
rol esi,30
add r12d,eax
mov ebp,DWORD[52+r9]
mov eax,edi
mov DWORD[48+rsp],edx
mov ecx,r12d
bswap ebp
xor eax,esi
rol ecx,5
and eax,r13d
lea r11d,[1518500249+r11*1+rdx]
add r11d,ecx
xor eax,edi
rol r13d,30
add r11d,eax
mov r14d,DWORD[56+r9]
mov eax,esi
mov DWORD[52+rsp],ebp
mov ecx,r11d
bswap r14d
xor eax,r13d
rol ecx,5
and eax,r12d
lea edi,[1518500249+rdi*1+rbp]
add edi,ecx
xor eax,esi
rol r12d,30
add edi,eax
mov edx,DWORD[60+r9]
mov eax,r13d
mov DWORD[56+rsp],r14d
mov ecx,edi
bswap edx
xor eax,r12d
rol ecx,5
and eax,r11d
lea esi,[1518500249+rsi*1+r14]
add esi,ecx
xor eax,r13d
rol r11d,30
add esi,eax
xor ebp,DWORD[rsp]
mov eax,r12d
mov DWORD[60+rsp],edx
mov ecx,esi
xor ebp,DWORD[8+rsp]
xor eax,r11d
rol ecx,5
xor ebp,DWORD[32+rsp]
and eax,edi
lea r13d,[1518500249+r13*1+rdx]
rol edi,30
xor eax,r12d
add r13d,ecx
rol ebp,1
add r13d,eax
xor r14d,DWORD[4+rsp]
mov eax,r11d
mov DWORD[rsp],ebp
mov ecx,r13d
xor r14d,DWORD[12+rsp]
xor eax,edi
rol ecx,5
xor r14d,DWORD[36+rsp]
and eax,esi
lea r12d,[1518500249+r12*1+rbp]
rol esi,30
xor eax,r11d
add r12d,ecx
rol r14d,1
add r12d,eax
xor edx,DWORD[8+rsp]
mov eax,edi
mov DWORD[4+rsp],r14d
mov ecx,r12d
xor edx,DWORD[16+rsp]
xor eax,esi
rol ecx,5
xor edx,DWORD[40+rsp]
and eax,r13d
lea r11d,[1518500249+r11*1+r14]
rol r13d,30
xor eax,edi
add r11d,ecx
rol edx,1
add r11d,eax
xor ebp,DWORD[12+rsp]
mov eax,esi
mov DWORD[8+rsp],edx
mov ecx,r11d
xor ebp,DWORD[20+rsp]
xor eax,r13d
rol ecx,5
xor ebp,DWORD[44+rsp]
and eax,r12d
lea edi,[1518500249+rdi*1+rdx]
rol r12d,30
xor eax,esi
add edi,ecx
rol ebp,1
add edi,eax
xor r14d,DWORD[16+rsp]
mov eax,r13d
mov DWORD[12+rsp],ebp
mov ecx,edi
xor r14d,DWORD[24+rsp]
xor eax,r12d
rol ecx,5
xor r14d,DWORD[48+rsp]
and eax,r11d
lea esi,[1518500249+rsi*1+rbp]
rol r11d,30
xor eax,r13d
add esi,ecx
rol r14d,1
add esi,eax
xor edx,DWORD[20+rsp]
mov eax,edi
mov DWORD[16+rsp],r14d
mov ecx,esi
xor edx,DWORD[28+rsp]
xor eax,r12d
rol ecx,5
xor edx,DWORD[52+rsp]
lea r13d,[1859775393+r13*1+r14]
xor eax,r11d
add r13d,ecx
rol edi,30
add r13d,eax
rol edx,1
xor ebp,DWORD[24+rsp]
mov eax,esi
mov DWORD[20+rsp],edx
mov ecx,r13d
xor ebp,DWORD[32+rsp]
xor eax,r11d
rol ecx,5
xor ebp,DWORD[56+rsp]
lea r12d,[1859775393+r12*1+rdx]
xor eax,edi
add r12d,ecx
rol esi,30
add r12d,eax
rol ebp,1
xor r14d,DWORD[28+rsp]
mov eax,r13d
mov DWORD[24+rsp],ebp
mov ecx,r12d
xor r14d,DWORD[36+rsp]
xor eax,edi
rol ecx,5
xor r14d,DWORD[60+rsp]
lea r11d,[1859775393+r11*1+rbp]
xor eax,esi
add r11d,ecx
rol r13d,30
add r11d,eax
rol r14d,1
xor edx,DWORD[32+rsp]
mov eax,r12d
mov DWORD[28+rsp],r14d
mov ecx,r11d
xor edx,DWORD[40+rsp]
xor eax,esi
rol ecx,5
xor edx,DWORD[rsp]
lea edi,[1859775393+rdi*1+r14]
xor eax,r13d
add edi,ecx
rol r12d,30
add edi,eax
rol edx,1
xor ebp,DWORD[36+rsp]
mov eax,r11d
mov DWORD[32+rsp],edx
mov ecx,edi
xor ebp,DWORD[44+rsp]
xor eax,r13d
rol ecx,5
xor ebp,DWORD[4+rsp]
lea esi,[1859775393+rsi*1+rdx]
xor eax,r12d
add esi,ecx
rol r11d,30
add esi,eax
rol ebp,1
xor r14d,DWORD[40+rsp]
mov eax,edi
mov DWORD[36+rsp],ebp
mov ecx,esi
xor r14d,DWORD[48+rsp]
xor eax,r12d
rol ecx,5
xor r14d,DWORD[8+rsp]
lea r13d,[1859775393+r13*1+rbp]
xor eax,r11d
add r13d,ecx
rol edi,30
add r13d,eax
rol r14d,1
xor edx,DWORD[44+rsp]
mov eax,esi
mov DWORD[40+rsp],r14d
mov ecx,r13d
xor edx,DWORD[52+rsp]
xor eax,r11d
rol ecx,5
xor edx,DWORD[12+rsp]
lea r12d,[1859775393+r12*1+r14]
xor eax,edi
add r12d,ecx
rol esi,30
add r12d,eax
rol edx,1
xor ebp,DWORD[48+rsp]
mov eax,r13d
mov DWORD[44+rsp],edx
mov ecx,r12d
xor ebp,DWORD[56+rsp]
xor eax,edi
rol ecx,5
xor ebp,DWORD[16+rsp]
lea r11d,[1859775393+r11*1+rdx]
xor eax,esi
add r11d,ecx
rol r13d,30
add r11d,eax
rol ebp,1
xor r14d,DWORD[52+rsp]
mov eax,r12d
mov DWORD[48+rsp],ebp
mov ecx,r11d
xor r14d,DWORD[60+rsp]
xor eax,esi
rol ecx,5
xor r14d,DWORD[20+rsp]
lea edi,[1859775393+rdi*1+rbp]
xor eax,r13d
add edi,ecx
rol r12d,30
add edi,eax
rol r14d,1
xor edx,DWORD[56+rsp]
mov eax,r11d
mov DWORD[52+rsp],r14d
mov ecx,edi
xor edx,DWORD[rsp]
xor eax,r13d
rol ecx,5
xor edx,DWORD[24+rsp]
lea esi,[1859775393+rsi*1+r14]
xor eax,r12d
add esi,ecx
rol r11d,30
add esi,eax
rol edx,1
xor ebp,DWORD[60+rsp]
mov eax,edi
mov DWORD[56+rsp],edx
mov ecx,esi
xor ebp,DWORD[4+rsp]
xor eax,r12d
rol ecx,5
xor ebp,DWORD[28+rsp]
lea r13d,[1859775393+r13*1+rdx]
xor eax,r11d
add r13d,ecx
rol edi,30
add r13d,eax
rol ebp,1
xor r14d,DWORD[rsp]
mov eax,esi
mov DWORD[60+rsp],ebp
mov ecx,r13d
xor r14d,DWORD[8+rsp]
xor eax,r11d
rol ecx,5
xor r14d,DWORD[32+rsp]
lea r12d,[1859775393+r12*1+rbp]
xor eax,edi
add r12d,ecx
rol esi,30
add r12d,eax
rol r14d,1
xor edx,DWORD[4+rsp]
mov eax,r13d
mov DWORD[rsp],r14d
mov ecx,r12d
xor edx,DWORD[12+rsp]
xor eax,edi
rol ecx,5
xor edx,DWORD[36+rsp]
lea r11d,[1859775393+r11*1+r14]
xor eax,esi
add r11d,ecx
rol r13d,30
add r11d,eax
rol edx,1
xor ebp,DWORD[8+rsp]
mov eax,r12d
mov DWORD[4+rsp],edx
mov ecx,r11d
xor ebp,DWORD[16+rsp]
xor eax,esi
rol ecx,5
xor ebp,DWORD[40+rsp]
lea edi,[1859775393+rdi*1+rdx]
xor eax,r13d
add edi,ecx
rol r12d,30
add edi,eax
rol ebp,1
xor r14d,DWORD[12+rsp]
mov eax,r11d
mov DWORD[8+rsp],ebp
mov ecx,edi
xor r14d,DWORD[20+rsp]
xor eax,r13d
rol ecx,5
xor r14d,DWORD[44+rsp]
lea esi,[1859775393+rsi*1+rbp]
xor eax,r12d
add esi,ecx
rol r11d,30
add esi,eax
rol r14d,1
xor edx,DWORD[16+rsp]
mov eax,edi
mov DWORD[12+rsp],r14d
mov ecx,esi
xor edx,DWORD[24+rsp]
xor eax,r12d
rol ecx,5
xor edx,DWORD[48+rsp]
lea r13d,[1859775393+r13*1+r14]
xor eax,r11d
add r13d,ecx
rol edi,30
add r13d,eax
rol edx,1
xor ebp,DWORD[20+rsp]
mov eax,esi
mov DWORD[16+rsp],edx
mov ecx,r13d
xor ebp,DWORD[28+rsp]
xor eax,r11d
rol ecx,5
xor ebp,DWORD[52+rsp]
lea r12d,[1859775393+r12*1+rdx]
xor eax,edi
add r12d,ecx
rol esi,30
add r12d,eax
rol ebp,1
xor r14d,DWORD[24+rsp]
mov eax,r13d
mov DWORD[20+rsp],ebp
mov ecx,r12d
xor r14d,DWORD[32+rsp]
xor eax,edi
rol ecx,5
xor r14d,DWORD[56+rsp]
lea r11d,[1859775393+r11*1+rbp]
xor eax,esi
add r11d,ecx
rol r13d,30
add r11d,eax
rol r14d,1
xor edx,DWORD[28+rsp]
mov eax,r12d
mov DWORD[24+rsp],r14d
mov ecx,r11d
xor edx,DWORD[36+rsp]
xor eax,esi
rol ecx,5
xor edx,DWORD[60+rsp]
lea edi,[1859775393+rdi*1+r14]
xor eax,r13d
add edi,ecx
rol r12d,30
add edi,eax
rol edx,1
xor ebp,DWORD[32+rsp]
mov eax,r11d
mov DWORD[28+rsp],edx
mov ecx,edi
xor ebp,DWORD[40+rsp]
xor eax,r13d
rol ecx,5
xor ebp,DWORD[rsp]
lea esi,[1859775393+rsi*1+rdx]
xor eax,r12d
add esi,ecx
rol r11d,30
add esi,eax
rol ebp,1
xor r14d,DWORD[36+rsp]
mov eax,r12d
mov DWORD[32+rsp],ebp
mov ebx,r12d
xor r14d,DWORD[44+rsp]
and eax,r11d
mov ecx,esi
xor r14d,DWORD[4+rsp]
lea r13d,[((-1894007588))+r13*1+rbp]
xor ebx,r11d
rol ecx,5
add r13d,eax
rol r14d,1
and ebx,edi
add r13d,ecx
rol edi,30
add r13d,ebx
xor edx,DWORD[40+rsp]
mov eax,r11d
mov DWORD[36+rsp],r14d
mov ebx,r11d
xor edx,DWORD[48+rsp]
and eax,edi
mov ecx,r13d
xor edx,DWORD[8+rsp]
lea r12d,[((-1894007588))+r12*1+r14]
xor ebx,edi
rol ecx,5
add r12d,eax
rol edx,1
and ebx,esi
add r12d,ecx
rol esi,30
add r12d,ebx
xor ebp,DWORD[44+rsp]
mov eax,edi
mov DWORD[40+rsp],edx
mov ebx,edi
xor ebp,DWORD[52+rsp]
and eax,esi
mov ecx,r12d
xor ebp,DWORD[12+rsp]
lea r11d,[((-1894007588))+r11*1+rdx]
xor ebx,esi
rol ecx,5
add r11d,eax
rol ebp,1
and ebx,r13d
add r11d,ecx
rol r13d,30
add r11d,ebx
xor r14d,DWORD[48+rsp]
mov eax,esi
mov DWORD[44+rsp],ebp
mov ebx,esi
xor r14d,DWORD[56+rsp]
and eax,r13d
mov ecx,r11d
xor r14d,DWORD[16+rsp]
lea edi,[((-1894007588))+rdi*1+rbp]
xor ebx,r13d
rol ecx,5
add edi,eax
rol r14d,1
and ebx,r12d
add edi,ecx
rol r12d,30
add edi,ebx
xor edx,DWORD[52+rsp]
mov eax,r13d
mov DWORD[48+rsp],r14d
mov ebx,r13d
xor edx,DWORD[60+rsp]
and eax,r12d
mov ecx,edi
xor edx,DWORD[20+rsp]
lea esi,[((-1894007588))+rsi*1+r14]
xor ebx,r12d
rol ecx,5
add esi,eax
rol edx,1
and ebx,r11d
add esi,ecx
rol r11d,30
add esi,ebx
xor ebp,DWORD[56+rsp]
mov eax,r12d
mov DWORD[52+rsp],edx
mov ebx,r12d
xor ebp,DWORD[rsp]
and eax,r11d
mov ecx,esi
xor ebp,DWORD[24+rsp]
lea r13d,[((-1894007588))+r13*1+rdx]
xor ebx,r11d
rol ecx,5
add r13d,eax
rol ebp,1
and ebx,edi
add r13d,ecx
rol edi,30
add r13d,ebx
xor r14d,DWORD[60+rsp]
mov eax,r11d
mov DWORD[56+rsp],ebp
mov ebx,r11d
xor r14d,DWORD[4+rsp]
and eax,edi
mov ecx,r13d
xor r14d,DWORD[28+rsp]
lea r12d,[((-1894007588))+r12*1+rbp]
xor ebx,edi
rol ecx,5
add r12d,eax
rol r14d,1
and ebx,esi
add r12d,ecx
rol esi,30
add r12d,ebx
xor edx,DWORD[rsp]
mov eax,edi
mov DWORD[60+rsp],r14d
mov ebx,edi
xor edx,DWORD[8+rsp]
and eax,esi
mov ecx,r12d
xor edx,DWORD[32+rsp]
lea r11d,[((-1894007588))+r11*1+r14]
xor ebx,esi
rol ecx,5
add r11d,eax
rol edx,1
and ebx,r13d
add r11d,ecx
rol r13d,30
add r11d,ebx
xor ebp,DWORD[4+rsp]
mov eax,esi
mov DWORD[rsp],edx
mov ebx,esi
xor ebp,DWORD[12+rsp]
and eax,r13d
mov ecx,r11d
xor ebp,DWORD[36+rsp]
lea edi,[((-1894007588))+rdi*1+rdx]
xor ebx,r13d
rol ecx,5
add edi,eax
rol ebp,1
and ebx,r12d
add edi,ecx
rol r12d,30
add edi,ebx
xor r14d,DWORD[8+rsp]
mov eax,r13d
mov DWORD[4+rsp],ebp
mov ebx,r13d
xor r14d,DWORD[16+rsp]
and eax,r12d
mov ecx,edi
xor r14d,DWORD[40+rsp]
lea esi,[((-1894007588))+rsi*1+rbp]
xor ebx,r12d
rol ecx,5
add esi,eax
rol r14d,1
and ebx,r11d
add esi,ecx
rol r11d,30
add esi,ebx
xor edx,DWORD[12+rsp]
mov eax,r12d
mov DWORD[8+rsp],r14d
mov ebx,r12d
xor edx,DWORD[20+rsp]
and eax,r11d
mov ecx,esi
xor edx,DWORD[44+rsp]
lea r13d,[((-1894007588))+r13*1+r14]
xor ebx,r11d
rol ecx,5
add r13d,eax
rol edx,1
and ebx,edi
add r13d,ecx
rol edi,30
add r13d,ebx
xor ebp,DWORD[16+rsp]
mov eax,r11d
mov DWORD[12+rsp],edx
mov ebx,r11d
xor ebp,DWORD[24+rsp]
and eax,edi
mov ecx,r13d
xor ebp,DWORD[48+rsp]
lea r12d,[((-1894007588))+r12*1+rdx]
xor ebx,edi
rol ecx,5
add r12d,eax
rol ebp,1
and ebx,esi
add r12d,ecx
rol esi,30
add r12d,ebx
xor r14d,DWORD[20+rsp]
mov eax,edi
mov DWORD[16+rsp],ebp
mov ebx,edi
xor r14d,DWORD[28+rsp]
and eax,esi
mov ecx,r12d
xor r14d,DWORD[52+rsp]
lea r11d,[((-1894007588))+r11*1+rbp]
xor ebx,esi
rol ecx,5
add r11d,eax
rol r14d,1
and ebx,r13d
add r11d,ecx
rol r13d,30
add r11d,ebx
xor edx,DWORD[24+rsp]
mov eax,esi
mov DWORD[20+rsp],r14d
mov ebx,esi
xor edx,DWORD[32+rsp]
and eax,r13d
mov ecx,r11d
xor edx,DWORD[56+rsp]
lea edi,[((-1894007588))+rdi*1+r14]
xor ebx,r13d
rol ecx,5
add edi,eax
rol edx,1
and ebx,r12d
add edi,ecx
rol r12d,30
add edi,ebx
xor ebp,DWORD[28+rsp]
mov eax,r13d
mov DWORD[24+rsp],edx
mov ebx,r13d
xor ebp,DWORD[36+rsp]
and eax,r12d
mov ecx,edi
xor ebp,DWORD[60+rsp]
lea esi,[((-1894007588))+rsi*1+rdx]
xor ebx,r12d
rol ecx,5
add esi,eax
rol ebp,1
and ebx,r11d
add esi,ecx
rol r11d,30
add esi,ebx
xor r14d,DWORD[32+rsp]
mov eax,r12d
mov DWORD[28+rsp],ebp
mov ebx,r12d
xor r14d,DWORD[40+rsp]
and eax,r11d
mov ecx,esi
xor r14d,DWORD[rsp]
lea r13d,[((-1894007588))+r13*1+rbp]
xor ebx,r11d
rol ecx,5
add r13d,eax
rol r14d,1
and ebx,edi
add r13d,ecx
rol edi,30
add r13d,ebx
xor edx,DWORD[36+rsp]
mov eax,r11d
mov DWORD[32+rsp],r14d
mov ebx,r11d
xor edx,DWORD[44+rsp]
and eax,edi
mov ecx,r13d
xor edx,DWORD[4+rsp]
lea r12d,[((-1894007588))+r12*1+r14]
xor ebx,edi
rol ecx,5
add r12d,eax
rol edx,1
and ebx,esi
add r12d,ecx
rol esi,30
add r12d,ebx
xor ebp,DWORD[40+rsp]
mov eax,edi
mov DWORD[36+rsp],edx
mov ebx,edi
xor ebp,DWORD[48+rsp]
and eax,esi
mov ecx,r12d
xor ebp,DWORD[8+rsp]
lea r11d,[((-1894007588))+r11*1+rdx]
xor ebx,esi
rol ecx,5
add r11d,eax
rol ebp,1
and ebx,r13d
add r11d,ecx
rol r13d,30
add r11d,ebx
xor r14d,DWORD[44+rsp]
mov eax,esi
mov DWORD[40+rsp],ebp
mov ebx,esi
xor r14d,DWORD[52+rsp]
and eax,r13d
mov ecx,r11d
xor r14d,DWORD[12+rsp]
lea edi,[((-1894007588))+rdi*1+rbp]
xor ebx,r13d
rol ecx,5
add edi,eax
rol r14d,1
and ebx,r12d
add edi,ecx
rol r12d,30
add edi,ebx
xor edx,DWORD[48+rsp]
mov eax,r13d
mov DWORD[44+rsp],r14d
mov ebx,r13d
xor edx,DWORD[56+rsp]
and eax,r12d
mov ecx,edi
xor edx,DWORD[16+rsp]
lea esi,[((-1894007588))+rsi*1+r14]
xor ebx,r12d
rol ecx,5
add esi,eax
rol edx,1
and ebx,r11d
add esi,ecx
rol r11d,30
add esi,ebx
xor ebp,DWORD[52+rsp]
mov eax,edi
mov DWORD[48+rsp],edx
mov ecx,esi
xor ebp,DWORD[60+rsp]
xor eax,r12d
rol ecx,5
xor ebp,DWORD[20+rsp]
lea r13d,[((-899497514))+r13*1+rdx]
xor eax,r11d
add r13d,ecx
rol edi,30
add r13d,eax
rol ebp,1
xor r14d,DWORD[56+rsp]
mov eax,esi
mov DWORD[52+rsp],ebp
mov ecx,r13d
xor r14d,DWORD[rsp]
xor eax,r11d
rol ecx,5
xor r14d,DWORD[24+rsp]
lea r12d,[((-899497514))+r12*1+rbp]
xor eax,edi
add r12d,ecx
rol esi,30
add r12d,eax
rol r14d,1
xor edx,DWORD[60+rsp]
mov eax,r13d
mov DWORD[56+rsp],r14d
mov ecx,r12d
xor edx,DWORD[4+rsp]
xor eax,edi
rol ecx,5
xor edx,DWORD[28+rsp]
lea r11d,[((-899497514))+r11*1+r14]
xor eax,esi
add r11d,ecx
rol r13d,30
add r11d,eax
rol edx,1
xor ebp,DWORD[rsp]
mov eax,r12d
mov DWORD[60+rsp],edx
mov ecx,r11d
xor ebp,DWORD[8+rsp]
xor eax,esi
rol ecx,5
xor ebp,DWORD[32+rsp]
lea edi,[((-899497514))+rdi*1+rdx]
xor eax,r13d
add edi,ecx
rol r12d,30
add edi,eax
rol ebp,1
xor r14d,DWORD[4+rsp]
mov eax,r11d
mov DWORD[rsp],ebp
mov ecx,edi
xor r14d,DWORD[12+rsp]
xor eax,r13d
rol ecx,5
xor r14d,DWORD[36+rsp]
lea esi,[((-899497514))+rsi*1+rbp]
xor eax,r12d
add esi,ecx
rol r11d,30
add esi,eax
rol r14d,1
xor edx,DWORD[8+rsp]
mov eax,edi
mov DWORD[4+rsp],r14d
mov ecx,esi
xor edx,DWORD[16+rsp]
xor eax,r12d
rol ecx,5
xor edx,DWORD[40+rsp]
lea r13d,[((-899497514))+r13*1+r14]
xor eax,r11d
add r13d,ecx
rol edi,30
add r13d,eax
rol edx,1
xor ebp,DWORD[12+rsp]
mov eax,esi
mov DWORD[8+rsp],edx
mov ecx,r13d
xor ebp,DWORD[20+rsp]
xor eax,r11d
rol ecx,5
xor ebp,DWORD[44+rsp]
lea r12d,[((-899497514))+r12*1+rdx]
xor eax,edi
add r12d,ecx
rol esi,30
add r12d,eax
rol ebp,1
xor r14d,DWORD[16+rsp]
mov eax,r13d
mov DWORD[12+rsp],ebp
mov ecx,r12d
xor r14d,DWORD[24+rsp]
xor eax,edi
rol ecx,5
xor r14d,DWORD[48+rsp]
lea r11d,[((-899497514))+r11*1+rbp]
xor eax,esi
add r11d,ecx
rol r13d,30
add r11d,eax
rol r14d,1
xor edx,DWORD[20+rsp]
mov eax,r12d
mov DWORD[16+rsp],r14d
mov ecx,r11d
xor edx,DWORD[28+rsp]
xor eax,esi
rol ecx,5
xor edx,DWORD[52+rsp]
lea edi,[((-899497514))+rdi*1+r14]
xor eax,r13d
add edi,ecx
rol r12d,30
add edi,eax
rol edx,1
xor ebp,DWORD[24+rsp]
mov eax,r11d
mov DWORD[20+rsp],edx
mov ecx,edi
xor ebp,DWORD[32+rsp]
xor eax,r13d
rol ecx,5
xor ebp,DWORD[56+rsp]
lea esi,[((-899497514))+rsi*1+rdx]
xor eax,r12d
add esi,ecx
rol r11d,30
add esi,eax
rol ebp,1
xor r14d,DWORD[28+rsp]
mov eax,edi
mov DWORD[24+rsp],ebp
mov ecx,esi
xor r14d,DWORD[36+rsp]
xor eax,r12d
rol ecx,5
xor r14d,DWORD[60+rsp]
lea r13d,[((-899497514))+r13*1+rbp]
xor eax,r11d
add r13d,ecx
rol edi,30
add r13d,eax
rol r14d,1
xor edx,DWORD[32+rsp]
mov eax,esi
mov DWORD[28+rsp],r14d
mov ecx,r13d
xor edx,DWORD[40+rsp]
xor eax,r11d
rol ecx,5
xor edx,DWORD[rsp]
lea r12d,[((-899497514))+r12*1+r14]
xor eax,edi
add r12d,ecx
rol esi,30
add r12d,eax
rol edx,1
xor ebp,DWORD[36+rsp]
mov eax,r13d
mov ecx,r12d
xor ebp,DWORD[44+rsp]
xor eax,edi
rol ecx,5
xor ebp,DWORD[4+rsp]
lea r11d,[((-899497514))+r11*1+rdx]
xor eax,esi
add r11d,ecx
rol r13d,30
add r11d,eax
rol ebp,1
xor r14d,DWORD[40+rsp]
mov eax,r12d
mov ecx,r11d
xor r14d,DWORD[48+rsp]
xor eax,esi
rol ecx,5
xor r14d,DWORD[8+rsp]
lea edi,[((-899497514))+rdi*1+rbp]
xor eax,r13d
add edi,ecx
rol r12d,30
add edi,eax
rol r14d,1
xor edx,DWORD[44+rsp]
mov eax,r11d
mov ecx,edi
xor edx,DWORD[52+rsp]
xor eax,r13d
rol ecx,5
xor edx,DWORD[12+rsp]
lea esi,[((-899497514))+rsi*1+r14]
xor eax,r12d
add esi,ecx
rol r11d,30
add esi,eax
rol edx,1
xor ebp,DWORD[48+rsp]
mov eax,edi
mov ecx,esi
xor ebp,DWORD[56+rsp]
xor eax,r12d
rol ecx,5
xor ebp,DWORD[16+rsp]
lea r13d,[((-899497514))+r13*1+rdx]
xor eax,r11d
add r13d,ecx
rol edi,30
add r13d,eax
rol ebp,1
xor r14d,DWORD[52+rsp]
mov eax,esi
mov ecx,r13d
xor r14d,DWORD[60+rsp]
xor eax,r11d
rol ecx,5
xor r14d,DWORD[20+rsp]
lea r12d,[((-899497514))+r12*1+rbp]
xor eax,edi
add r12d,ecx
rol esi,30
add r12d,eax
rol r14d,1
xor edx,DWORD[56+rsp]
mov eax,r13d
mov ecx,r12d
xor edx,DWORD[rsp]
xor eax,edi
rol ecx,5
xor edx,DWORD[24+rsp]
lea r11d,[((-899497514))+r11*1+r14]
xor eax,esi
add r11d,ecx
rol r13d,30
add r11d,eax
rol edx,1
xor ebp,DWORD[60+rsp]
mov eax,r12d
mov ecx,r11d
xor ebp,DWORD[4+rsp]
xor eax,esi
rol ecx,5
xor ebp,DWORD[28+rsp]
lea edi,[((-899497514))+rdi*1+rdx]
xor eax,r13d
add edi,ecx
rol r12d,30
add edi,eax
rol ebp,1
mov eax,r11d
mov ecx,edi
xor eax,r13d
lea esi,[((-899497514))+rsi*1+rbp]
rol ecx,5
xor eax,r12d
add esi,ecx
rol r11d,30
add esi,eax
add esi,DWORD[r8]
add edi,DWORD[4+r8]
add r11d,DWORD[8+r8]
add r12d,DWORD[12+r8]
add r13d,DWORD[16+r8]
mov DWORD[r8],esi
mov DWORD[4+r8],edi
mov DWORD[8+r8],r11d
mov DWORD[12+r8],r12d
mov DWORD[16+r8],r13d
sub r10,1
lea r9,[64+r9]
jnz NEAR $L$loop
mov rsi,QWORD[64+rsp]
mov r14,QWORD[((-40))+rsi]
mov r13,QWORD[((-32))+rsi]
mov r12,QWORD[((-24))+rsi]
mov rbp,QWORD[((-16))+rsi]
mov rbx,QWORD[((-8))+rsi]
lea rsp,[rsi]
$L$epilogue:
mov rdi,QWORD[8+rsp] ;WIN64 epilogue
mov rsi,QWORD[16+rsp]
DB 0F3h,0C3h ;repret
$L$SEH_end_sha1_block_data_order:
ALIGN 32
sha1_block_data_order_shaext:
mov QWORD[8+rsp],rdi ;WIN64 prologue
mov QWORD[16+rsp],rsi
mov rax,rsp
$L$SEH_begin_sha1_block_data_order_shaext:
mov rdi,rcx
mov rsi,rdx
mov rdx,r8
_shaext_shortcut:
lea rsp,[((-72))+rsp]
movaps XMMWORD[(-8-64)+rax],xmm6
movaps XMMWORD[(-8-48)+rax],xmm7
movaps XMMWORD[(-8-32)+rax],xmm8
movaps XMMWORD[(-8-16)+rax],xmm9
$L$prologue_shaext:
movdqu xmm0,XMMWORD[rdi]
movd xmm1,DWORD[16+rdi]
movdqa xmm3,XMMWORD[((K_XX_XX+160))]
movdqu xmm4,XMMWORD[rsi]
pshufd xmm0,xmm0,27
movdqu xmm5,XMMWORD[16+rsi]
pshufd xmm1,xmm1,27
movdqu xmm6,XMMWORD[32+rsi]
DB 102,15,56,0,227
movdqu xmm7,XMMWORD[48+rsi]
DB 102,15,56,0,235
DB 102,15,56,0,243
movdqa xmm9,xmm1
DB 102,15,56,0,251
jmp NEAR $L$oop_shaext
ALIGN 16
$L$oop_shaext:
dec rdx
lea rax,[64+rsi]
paddd xmm1,xmm4
cmovne rsi,rax
movdqa xmm8,xmm0
DB 15,56,201,229
movdqa xmm2,xmm0
DB 15,58,204,193,0
DB 15,56,200,213
pxor xmm4,xmm6
DB 15,56,201,238
DB 15,56,202,231
movdqa xmm1,xmm0
DB 15,58,204,194,0
DB 15,56,200,206
pxor xmm5,xmm7
DB 15,56,202,236
DB 15,56,201,247
movdqa xmm2,xmm0
DB 15,58,204,193,0
DB 15,56,200,215
pxor xmm6,xmm4
DB 15,56,201,252
DB 15,56,202,245
movdqa xmm1,xmm0
DB 15,58,204,194,0
DB 15,56,200,204
pxor xmm7,xmm5
DB 15,56,202,254
DB 15,56,201,229
movdqa xmm2,xmm0
DB 15,58,204,193,0
DB 15,56,200,213
pxor xmm4,xmm6
DB 15,56,201,238
DB 15,56,202,231
movdqa xmm1,xmm0
DB 15,58,204,194,1
DB 15,56,200,206
pxor xmm5,xmm7
DB 15,56,202,236
DB 15,56,201,247
movdqa xmm2,xmm0
DB 15,58,204,193,1
DB 15,56,200,215
pxor xmm6,xmm4
DB 15,56,201,252
DB 15,56,202,245
movdqa xmm1,xmm0
DB 15,58,204,194,1
DB 15,56,200,204
pxor xmm7,xmm5
DB 15,56,202,254
DB 15,56,201,229
movdqa xmm2,xmm0
DB 15,58,204,193,1
DB 15,56,200,213
pxor xmm4,xmm6
DB 15,56,201,238
DB 15,56,202,231
movdqa xmm1,xmm0
DB 15,58,204,194,1
DB 15,56,200,206
pxor xmm5,xmm7
DB 15,56,202,236
DB 15,56,201,247
movdqa xmm2,xmm0
DB 15,58,204,193,2
DB 15,56,200,215
pxor xmm6,xmm4
DB 15,56,201,252
DB 15,56,202,245
movdqa xmm1,xmm0
DB 15,58,204,194,2
DB 15,56,200,204
pxor xmm7,xmm5
DB 15,56,202,254
DB 15,56,201,229
movdqa xmm2,xmm0
DB 15,58,204,193,2
DB 15,56,200,213
pxor xmm4,xmm6
DB 15,56,201,238
DB 15,56,202,231
movdqa xmm1,xmm0
DB 15,58,204,194,2
DB 15,56,200,206
pxor xmm5,xmm7
DB 15,56,202,236
DB 15,56,201,247
movdqa xmm2,xmm0
DB 15,58,204,193,2
DB 15,56,200,215
pxor xmm6,xmm4
DB 15,56,201,252
DB 15,56,202,245
movdqa xmm1,xmm0
DB 15,58,204,194,3
DB 15,56,200,204
pxor xmm7,xmm5
DB 15,56,202,254
movdqu xmm4,XMMWORD[rsi]
movdqa xmm2,xmm0
DB 15,58,204,193,3
DB 15,56,200,213
movdqu xmm5,XMMWORD[16+rsi]
DB 102,15,56,0,227
movdqa xmm1,xmm0
DB 15,58,204,194,3
DB 15,56,200,206
movdqu xmm6,XMMWORD[32+rsi]
DB 102,15,56,0,235
movdqa xmm2,xmm0
DB 15,58,204,193,3
DB 15,56,200,215
movdqu xmm7,XMMWORD[48+rsi]
DB 102,15,56,0,243
movdqa xmm1,xmm0
DB 15,58,204,194,3
DB 65,15,56,200,201
DB 102,15,56,0,251
paddd xmm0,xmm8
movdqa xmm9,xmm1
jnz NEAR $L$oop_shaext
pshufd xmm0,xmm0,27
pshufd xmm1,xmm1,27
movdqu XMMWORD[rdi],xmm0
movd DWORD[16+rdi],xmm1
movaps xmm6,XMMWORD[((-8-64))+rax]
movaps xmm7,XMMWORD[((-8-48))+rax]
movaps xmm8,XMMWORD[((-8-32))+rax]
movaps xmm9,XMMWORD[((-8-16))+rax]
mov rsp,rax
$L$epilogue_shaext:
mov rdi,QWORD[8+rsp] ;WIN64 epilogue
mov rsi,QWORD[16+rsp]
DB 0F3h,0C3h ;repret
$L$SEH_end_sha1_block_data_order_shaext:
ALIGN 16
sha1_block_data_order_ssse3:
mov QWORD[8+rsp],rdi ;WIN64 prologue
mov QWORD[16+rsp],rsi
mov rax,rsp
$L$SEH_begin_sha1_block_data_order_ssse3:
mov rdi,rcx
mov rsi,rdx
mov rdx,r8
_ssse3_shortcut:
mov rax,rsp
push rbx
push rbp
push r12
push r13
push r14
lea rsp,[((-160))+rsp]
movaps XMMWORD[(-40-96)+rax],xmm6
movaps XMMWORD[(-40-80)+rax],xmm7
movaps XMMWORD[(-40-64)+rax],xmm8
movaps XMMWORD[(-40-48)+rax],xmm9
movaps XMMWORD[(-40-32)+rax],xmm10
movaps XMMWORD[(-40-16)+rax],xmm11
$L$prologue_ssse3:
mov r14,rax
and rsp,-64
mov r8,rdi
mov r9,rsi
mov r10,rdx
shl r10,6
add r10,r9
lea r11,[((K_XX_XX+64))]
mov eax,DWORD[r8]
mov ebx,DWORD[4+r8]
mov ecx,DWORD[8+r8]
mov edx,DWORD[12+r8]
mov esi,ebx
mov ebp,DWORD[16+r8]
mov edi,ecx
xor edi,edx
and esi,edi
movdqa xmm6,XMMWORD[64+r11]
movdqa xmm9,XMMWORD[((-64))+r11]
movdqu xmm0,XMMWORD[r9]
movdqu xmm1,XMMWORD[16+r9]
movdqu xmm2,XMMWORD[32+r9]
movdqu xmm3,XMMWORD[48+r9]
DB 102,15,56,0,198
DB 102,15,56,0,206
DB 102,15,56,0,214
add r9,64
paddd xmm0,xmm9
DB 102,15,56,0,222
paddd xmm1,xmm9
paddd xmm2,xmm9
movdqa XMMWORD[rsp],xmm0
psubd xmm0,xmm9
movdqa XMMWORD[16+rsp],xmm1
psubd xmm1,xmm9
movdqa XMMWORD[32+rsp],xmm2
psubd xmm2,xmm9
jmp NEAR $L$oop_ssse3
ALIGN 16
$L$oop_ssse3:
ror ebx,2
pshufd xmm4,xmm0,238
xor esi,edx
movdqa xmm8,xmm3
paddd xmm9,xmm3
mov edi,eax
add ebp,DWORD[rsp]
punpcklqdq xmm4,xmm1
xor ebx,ecx
rol eax,5
add ebp,esi
psrldq xmm8,4
and edi,ebx
xor ebx,ecx
pxor xmm4,xmm0
add ebp,eax
ror eax,7
pxor xmm8,xmm2
xor edi,ecx
mov esi,ebp
add edx,DWORD[4+rsp]
pxor xmm4,xmm8
xor eax,ebx
rol ebp,5
movdqa XMMWORD[48+rsp],xmm9
add edx,edi
and esi,eax
movdqa xmm10,xmm4
xor eax,ebx
add edx,ebp
ror ebp,7
movdqa xmm8,xmm4
xor esi,ebx
pslldq xmm10,12
paddd xmm4,xmm4
mov edi,edx
add ecx,DWORD[8+rsp]
psrld xmm8,31
xor ebp,eax
rol edx,5
add ecx,esi
movdqa xmm9,xmm10
and edi,ebp
xor ebp,eax
psrld xmm10,30
add ecx,edx
ror edx,7
por xmm4,xmm8
xor edi,eax
mov esi,ecx
add ebx,DWORD[12+rsp]
pslld xmm9,2
pxor xmm4,xmm10
xor edx,ebp
movdqa xmm10,XMMWORD[((-64))+r11]
rol ecx,5
add ebx,edi
and esi,edx
pxor xmm4,xmm9
xor edx,ebp
add ebx,ecx
ror ecx,7
pshufd xmm5,xmm1,238
xor esi,ebp
movdqa xmm9,xmm4
paddd xmm10,xmm4
mov edi,ebx
add eax,DWORD[16+rsp]
punpcklqdq xmm5,xmm2
xor ecx,edx
rol ebx,5
add eax,esi
psrldq xmm9,4
and edi,ecx
xor ecx,edx
pxor xmm5,xmm1
add eax,ebx
ror ebx,7
pxor xmm9,xmm3
xor edi,edx
mov esi,eax
add ebp,DWORD[20+rsp]
pxor xmm5,xmm9
xor ebx,ecx
rol eax,5
movdqa XMMWORD[rsp],xmm10
add ebp,edi
and esi,ebx
movdqa xmm8,xmm5
xor ebx,ecx
add ebp,eax
ror eax,7
movdqa xmm9,xmm5
xor esi,ecx
pslldq xmm8,12
paddd xmm5,xmm5
mov edi,ebp
add edx,DWORD[24+rsp]
psrld xmm9,31
xor eax,ebx
rol ebp,5
add edx,esi
movdqa xmm10,xmm8
and edi,eax
xor eax,ebx
psrld xmm8,30
add edx,ebp
ror ebp,7
por xmm5,xmm9
xor edi,ebx
mov esi,edx
add ecx,DWORD[28+rsp]
pslld xmm10,2
pxor xmm5,xmm8
xor ebp,eax
movdqa xmm8,XMMWORD[((-32))+r11]
rol edx,5
add ecx,edi
and esi,ebp
pxor xmm5,xmm10
xor ebp,eax
add ecx,edx
ror edx,7
pshufd xmm6,xmm2,238
xor esi,eax
movdqa xmm10,xmm5
paddd xmm8,xmm5
mov edi,ecx
add ebx,DWORD[32+rsp]
punpcklqdq xmm6,xmm3
xor edx,ebp
rol ecx,5
add ebx,esi
psrldq xmm10,4
and edi,edx
xor edx,ebp
pxor xmm6,xmm2
add ebx,ecx
ror ecx,7
pxor xmm10,xmm4
xor edi,ebp
mov esi,ebx
add eax,DWORD[36+rsp]
pxor xmm6,xmm10
xor ecx,edx
rol ebx,5
movdqa XMMWORD[16+rsp],xmm8
add eax,edi
and esi,ecx
movdqa xmm9,xmm6
xor ecx,edx
add eax,ebx
ror ebx,7
movdqa xmm10,xmm6
xor esi,edx
pslldq xmm9,12
paddd xmm6,xmm6
mov edi,eax
add ebp,DWORD[40+rsp]
psrld xmm10,31
xor ebx,ecx
rol eax,5
add ebp,esi
movdqa xmm8,xmm9
and edi,ebx
xor ebx,ecx
psrld xmm9,30
add ebp,eax
ror eax,7
por xmm6,xmm10
xor edi,ecx
mov esi,ebp
add edx,DWORD[44+rsp]
pslld xmm8,2
pxor xmm6,xmm9
xor eax,ebx
movdqa xmm9,XMMWORD[((-32))+r11]
rol ebp,5
add edx,edi
and esi,eax
pxor xmm6,xmm8
xor eax,ebx
add edx,ebp
ror ebp,7
pshufd xmm7,xmm3,238
xor esi,ebx
movdqa xmm8,xmm6
paddd xmm9,xmm6
mov edi,edx
add ecx,DWORD[48+rsp]
punpcklqdq xmm7,xmm4
xor ebp,eax
rol edx,5
add ecx,esi
psrldq xmm8,4
and edi,ebp
xor ebp,eax
pxor xmm7,xmm3
add ecx,edx
ror edx,7
pxor xmm8,xmm5
xor edi,eax
mov esi,ecx
add ebx,DWORD[52+rsp]
pxor xmm7,xmm8
xor edx,ebp
rol ecx,5
movdqa XMMWORD[32+rsp],xmm9
add ebx,edi
and esi,edx
movdqa xmm10,xmm7
xor edx,ebp
add ebx,ecx
ror ecx,7
movdqa xmm8,xmm7
xor esi,ebp
pslldq xmm10,12
paddd xmm7,xmm7
mov edi,ebx
add eax,DWORD[56+rsp]
psrld xmm8,31
xor ecx,edx
rol ebx,5
add eax,esi
movdqa xmm9,xmm10
and edi,ecx
xor ecx,edx
psrld xmm10,30
add eax,ebx
ror ebx,7
por xmm7,xmm8
xor edi,edx
mov esi,eax
add ebp,DWORD[60+rsp]
pslld xmm9,2
pxor xmm7,xmm10
xor ebx,ecx
movdqa xmm10,XMMWORD[((-32))+r11]
rol eax,5
add ebp,edi
and esi,ebx
pxor xmm7,xmm9
pshufd xmm9,xmm6,238
xor ebx,ecx
add ebp,eax
ror eax,7
pxor xmm0,xmm4
xor esi,ecx
mov edi,ebp
add edx,DWORD[rsp]
punpcklqdq xmm9,xmm7
xor eax,ebx
rol ebp,5
pxor xmm0,xmm1
add edx,esi
and edi,eax
movdqa xmm8,xmm10
xor eax,ebx
paddd xmm10,xmm7
add edx,ebp
pxor xmm0,xmm9
ror ebp,7
xor edi,ebx
mov esi,edx
add ecx,DWORD[4+rsp]
movdqa xmm9,xmm0
xor ebp,eax
rol edx,5
movdqa XMMWORD[48+rsp],xmm10
add ecx,edi
and esi,ebp
xor ebp,eax
pslld xmm0,2
add ecx,edx
ror edx,7
psrld xmm9,30
xor esi,eax
mov edi,ecx
add ebx,DWORD[8+rsp]
por xmm0,xmm9
xor edx,ebp
rol ecx,5
pshufd xmm10,xmm7,238
add ebx,esi
and edi,edx
xor edx,ebp
add ebx,ecx
add eax,DWORD[12+rsp]
xor edi,ebp
mov esi,ebx
rol ebx,5
add eax,edi
xor esi,edx
ror ecx,7
add eax,ebx
pxor xmm1,xmm5
add ebp,DWORD[16+rsp]
xor esi,ecx
punpcklqdq xmm10,xmm0
mov edi,eax
rol eax,5
pxor xmm1,xmm2
add ebp,esi
xor edi,ecx
movdqa xmm9,xmm8
ror ebx,7
paddd xmm8,xmm0
add ebp,eax
pxor xmm1,xmm10
add edx,DWORD[20+rsp]
xor edi,ebx
mov esi,ebp
rol ebp,5
movdqa xmm10,xmm1
add edx,edi
xor esi,ebx
movdqa XMMWORD[rsp],xmm8
ror eax,7
add edx,ebp
add ecx,DWORD[24+rsp]
pslld xmm1,2
xor esi,eax
mov edi,edx
psrld xmm10,30
rol edx,5
add ecx,esi
xor edi,eax
ror ebp,7
por xmm1,xmm10
add ecx,edx
add ebx,DWORD[28+rsp]
pshufd xmm8,xmm0,238
xor edi,ebp
mov esi,ecx
rol ecx,5
add ebx,edi
xor esi,ebp
ror edx,7
add ebx,ecx
pxor xmm2,xmm6
add eax,DWORD[32+rsp]
xor esi,edx
punpcklqdq xmm8,xmm1
mov edi,ebx
rol ebx,5
pxor xmm2,xmm3
add eax,esi
xor edi,edx
movdqa xmm10,XMMWORD[r11]
ror ecx,7
paddd xmm9,xmm1
add eax,ebx
pxor xmm2,xmm8
add ebp,DWORD[36+rsp]
xor edi,ecx
mov esi,eax
rol eax,5
movdqa xmm8,xmm2
add ebp,edi
xor esi,ecx
movdqa XMMWORD[16+rsp],xmm9
ror ebx,7
add ebp,eax
add edx,DWORD[40+rsp]
pslld xmm2,2
xor esi,ebx
mov edi,ebp
psrld xmm8,30
rol ebp,5
add edx,esi
xor edi,ebx
ror eax,7
por xmm2,xmm8
add edx,ebp
add ecx,DWORD[44+rsp]
pshufd xmm9,xmm1,238
xor edi,eax
mov esi,edx
rol edx,5
add ecx,edi
xor esi,eax
ror ebp,7
add ecx,edx
pxor xmm3,xmm7
add ebx,DWORD[48+rsp]
xor esi,ebp
punpcklqdq xmm9,xmm2
mov edi,ecx
rol ecx,5
pxor xmm3,xmm4
add ebx,esi
xor edi,ebp
movdqa xmm8,xmm10
ror edx,7
paddd xmm10,xmm2
add ebx,ecx
pxor xmm3,xmm9
add eax,DWORD[52+rsp]
xor edi,edx
mov esi,ebx
rol ebx,5
movdqa xmm9,xmm3
add eax,edi
xor esi,edx
movdqa XMMWORD[32+rsp],xmm10
ror ecx,7
add eax,ebx
add ebp,DWORD[56+rsp]
pslld xmm3,2
xor esi,ecx
mov edi,eax
psrld xmm9,30
rol eax,5
add ebp,esi
xor edi,ecx
ror ebx,7
por xmm3,xmm9
add ebp,eax
add edx,DWORD[60+rsp]
pshufd xmm10,xmm2,238
xor edi,ebx
mov esi,ebp
rol ebp,5
add edx,edi
xor esi,ebx
ror eax,7
add edx,ebp
pxor xmm4,xmm0
add ecx,DWORD[rsp]
xor esi,eax
punpcklqdq xmm10,xmm3
mov edi,edx
rol edx,5
pxor xmm4,xmm5
add ecx,esi
xor edi,eax
movdqa xmm9,xmm8
ror ebp,7
paddd xmm8,xmm3
add ecx,edx
pxor xmm4,xmm10
add ebx,DWORD[4+rsp]
xor edi,ebp
mov esi,ecx
rol ecx,5
movdqa xmm10,xmm4
add ebx,edi
xor esi,ebp
movdqa XMMWORD[48+rsp],xmm8
ror edx,7
add ebx,ecx
add eax,DWORD[8+rsp]
pslld xmm4,2
xor esi,edx
mov edi,ebx
psrld xmm10,30
rol ebx,5
add eax,esi
xor edi,edx
ror ecx,7
por xmm4,xmm10
add eax,ebx
add ebp,DWORD[12+rsp]
pshufd xmm8,xmm3,238
xor edi,ecx
mov esi,eax
rol eax,5
add ebp,edi
xor esi,ecx
ror ebx,7
add ebp,eax
pxor xmm5,xmm1
add edx,DWORD[16+rsp]
xor esi,ebx
punpcklqdq xmm8,xmm4
mov edi,ebp
rol ebp,5
pxor xmm5,xmm6
add edx,esi
xor edi,ebx
movdqa xmm10,xmm9
ror eax,7
paddd xmm9,xmm4
add edx,ebp
pxor xmm5,xmm8
add ecx,DWORD[20+rsp]
xor edi,eax
mov esi,edx
rol edx,5
movdqa xmm8,xmm5
add ecx,edi
xor esi,eax
movdqa XMMWORD[rsp],xmm9
ror ebp,7
add ecx,edx
add ebx,DWORD[24+rsp]
pslld xmm5,2
xor esi,ebp
mov edi,ecx
psrld xmm8,30
rol ecx,5
add ebx,esi
xor edi,ebp
ror edx,7
por xmm5,xmm8
add ebx,ecx
add eax,DWORD[28+rsp]
pshufd xmm9,xmm4,238
ror ecx,7
mov esi,ebx
xor edi,edx
rol ebx,5
add eax,edi
xor esi,ecx
xor ecx,edx
add eax,ebx
pxor xmm6,xmm2
add ebp,DWORD[32+rsp]
and esi,ecx
xor ecx,edx
ror ebx,7
punpcklqdq xmm9,xmm5
mov edi,eax
xor esi,ecx
pxor xmm6,xmm7
rol eax,5
add ebp,esi
movdqa xmm8,xmm10
xor edi,ebx
paddd xmm10,xmm5
xor ebx,ecx
pxor xmm6,xmm9
add ebp,eax
add edx,DWORD[36+rsp]
and edi,ebx
xor ebx,ecx
ror eax,7
movdqa xmm9,xmm6
mov esi,ebp
xor edi,ebx
movdqa XMMWORD[16+rsp],xmm10
rol ebp,5
add edx,edi
xor esi,eax
pslld xmm6,2
xor eax,ebx
add edx,ebp
psrld xmm9,30
add ecx,DWORD[40+rsp]
and esi,eax
xor eax,ebx
por xmm6,xmm9
ror ebp,7
mov edi,edx
xor esi,eax
rol edx,5
pshufd xmm10,xmm5,238
add ecx,esi
xor edi,ebp
xor ebp,eax
add ecx,edx
add ebx,DWORD[44+rsp]
and edi,ebp
xor ebp,eax
ror edx,7
mov esi,ecx
xor edi,ebp
rol ecx,5
add ebx,edi
xor esi,edx
xor edx,ebp
add ebx,ecx
pxor xmm7,xmm3
add eax,DWORD[48+rsp]
and esi,edx
xor edx,ebp
ror ecx,7
punpcklqdq xmm10,xmm6
mov edi,ebx
xor esi,edx
pxor xmm7,xmm0
rol ebx,5
add eax,esi
movdqa xmm9,XMMWORD[32+r11]
xor edi,ecx
paddd xmm8,xmm6
xor ecx,edx
pxor xmm7,xmm10
add eax,ebx
add ebp,DWORD[52+rsp]
and edi,ecx
xor ecx,edx
ror ebx,7
movdqa xmm10,xmm7
mov esi,eax
xor edi,ecx
movdqa XMMWORD[32+rsp],xmm8
rol eax,5
add ebp,edi
xor esi,ebx
pslld xmm7,2
xor ebx,ecx
add ebp,eax
psrld xmm10,30
add edx,DWORD[56+rsp]
and esi,ebx
xor ebx,ecx
por xmm7,xmm10
ror eax,7
mov edi,ebp
xor esi,ebx
rol ebp,5
pshufd xmm8,xmm6,238
add edx,esi
xor edi,eax
xor eax,ebx
add edx,ebp
add ecx,DWORD[60+rsp]
and edi,eax
xor eax,ebx
ror ebp,7
mov esi,edx
xor edi,eax
rol edx,5
add ecx,edi
xor esi,ebp
xor ebp,eax
add ecx,edx
pxor xmm0,xmm4
add ebx,DWORD[rsp]
and esi,ebp
xor ebp,eax
ror edx,7
punpcklqdq xmm8,xmm7
mov edi,ecx
xor esi,ebp
pxor xmm0,xmm1
rol ecx,5
add ebx,esi
movdqa xmm10,xmm9
xor edi,edx
paddd xmm9,xmm7
xor edx,ebp
pxor xmm0,xmm8
add ebx,ecx
add eax,DWORD[4+rsp]
and edi,edx
xor edx,ebp
ror ecx,7
movdqa xmm8,xmm0
mov esi,ebx
xor edi,edx
movdqa XMMWORD[48+rsp],xmm9
rol ebx,5
add eax,edi
xor esi,ecx
pslld xmm0,2
xor ecx,edx
add eax,ebx
psrld xmm8,30
add ebp,DWORD[8+rsp]
and esi,ecx
xor ecx,edx
por xmm0,xmm8
ror ebx,7
mov edi,eax
xor esi,ecx
rol eax,5
pshufd xmm9,xmm7,238
add ebp,esi
xor edi,ebx
xor ebx,ecx
add ebp,eax
add edx,DWORD[12+rsp]
and edi,ebx
xor ebx,ecx
ror eax,7
mov esi,ebp
xor edi,ebx
rol ebp,5
add edx,edi
xor esi,eax
xor eax,ebx
add edx,ebp
pxor xmm1,xmm5
add ecx,DWORD[16+rsp]
and esi,eax
xor eax,ebx
ror ebp,7
punpcklqdq xmm9,xmm0
mov edi,edx
xor esi,eax
pxor xmm1,xmm2
rol edx,5
add ecx,esi
movdqa xmm8,xmm10
xor edi,ebp
paddd xmm10,xmm0
xor ebp,eax
pxor xmm1,xmm9
add ecx,edx
add ebx,DWORD[20+rsp]
and edi,ebp
xor ebp,eax
ror edx,7
movdqa xmm9,xmm1
mov esi,ecx
xor edi,ebp
movdqa XMMWORD[rsp],xmm10
rol ecx,5
add ebx,edi
xor esi,edx
pslld xmm1,2
xor edx,ebp
add ebx,ecx
psrld xmm9,30
add eax,DWORD[24+rsp]
and esi,edx
xor edx,ebp
por xmm1,xmm9
ror ecx,7
mov edi,ebx
xor esi,edx
rol ebx,5
pshufd xmm10,xmm0,238
add eax,esi
xor edi,ecx
xor ecx,edx
add eax,ebx
add ebp,DWORD[28+rsp]
and edi,ecx
xor ecx,edx
ror ebx,7
mov esi,eax
xor edi,ecx
rol eax,5
add ebp,edi
xor esi,ebx
xor ebx,ecx
add ebp,eax
pxor xmm2,xmm6
add edx,DWORD[32+rsp]
and esi,ebx
xor ebx,ecx
ror eax,7
punpcklqdq xmm10,xmm1
mov edi,ebp
xor esi,ebx
pxor xmm2,xmm3
rol ebp,5
add edx,esi
movdqa xmm9,xmm8
xor edi,eax
paddd xmm8,xmm1
xor eax,ebx
pxor xmm2,xmm10
add edx,ebp
add ecx,DWORD[36+rsp]
and edi,eax
xor eax,ebx
ror ebp,7
movdqa xmm10,xmm2
mov esi,edx
xor edi,eax
movdqa XMMWORD[16+rsp],xmm8
rol edx,5
add ecx,edi
xor esi,ebp
pslld xmm2,2
xor ebp,eax
add ecx,edx
psrld xmm10,30
add ebx,DWORD[40+rsp]
and esi,ebp
xor ebp,eax
por xmm2,xmm10
ror edx,7
mov edi,ecx
xor esi,ebp
rol ecx,5
pshufd xmm8,xmm1,238
add ebx,esi
xor edi,edx
xor edx,ebp
add ebx,ecx
add eax,DWORD[44+rsp]
and edi,edx
xor edx,ebp
ror ecx,7
mov esi,ebx
xor edi,edx
rol ebx,5
add eax,edi
xor esi,edx
add eax,ebx
pxor xmm3,xmm7
add ebp,DWORD[48+rsp]
xor esi,ecx
punpcklqdq xmm8,xmm2
mov edi,eax
rol eax,5
pxor xmm3,xmm4
add ebp,esi
xor edi,ecx
movdqa xmm10,xmm9
ror ebx,7
paddd xmm9,xmm2
add ebp,eax
pxor xmm3,xmm8
add edx,DWORD[52+rsp]
xor edi,ebx
mov esi,ebp
rol ebp,5
movdqa xmm8,xmm3
add edx,edi
xor esi,ebx
movdqa XMMWORD[32+rsp],xmm9
ror eax,7
add edx,ebp
add ecx,DWORD[56+rsp]
pslld xmm3,2
xor esi,eax
mov edi,edx
psrld xmm8,30
rol edx,5
add ecx,esi
xor edi,eax
ror ebp,7
por xmm3,xmm8
add ecx,edx
add ebx,DWORD[60+rsp]
xor edi,ebp
mov esi,ecx
rol ecx,5
add ebx,edi
xor esi,ebp
ror edx,7
add ebx,ecx
add eax,DWORD[rsp]
xor esi,edx
mov edi,ebx
rol ebx,5
paddd xmm10,xmm3
add eax,esi
xor edi,edx
movdqa XMMWORD[48+rsp],xmm10
ror ecx,7
add eax,ebx
add ebp,DWORD[4+rsp]
xor edi,ecx
mov esi,eax
rol eax,5
add ebp,edi
xor esi,ecx
ror ebx,7
add ebp,eax
add edx,DWORD[8+rsp]
xor esi,ebx
mov edi,ebp
rol ebp,5
add edx,esi
xor edi,ebx
ror eax,7
add edx,ebp
add ecx,DWORD[12+rsp]
xor edi,eax
mov esi,edx
rol edx,5
add ecx,edi
xor esi,eax
ror ebp,7
add ecx,edx
cmp r9,r10
je NEAR $L$done_ssse3
movdqa xmm6,XMMWORD[64+r11]
movdqa xmm9,XMMWORD[((-64))+r11]
movdqu xmm0,XMMWORD[r9]
movdqu xmm1,XMMWORD[16+r9]
movdqu xmm2,XMMWORD[32+r9]
movdqu xmm3,XMMWORD[48+r9]
DB 102,15,56,0,198
add r9,64
add ebx,DWORD[16+rsp]
xor esi,ebp
mov edi,ecx
DB 102,15,56,0,206
rol ecx,5
add ebx,esi
xor edi,ebp
ror edx,7
paddd xmm0,xmm9
add ebx,ecx
add eax,DWORD[20+rsp]
xor edi,edx
mov esi,ebx
movdqa XMMWORD[rsp],xmm0
rol ebx,5
add eax,edi
xor esi,edx
ror ecx,7
psubd xmm0,xmm9
add eax,ebx
add ebp,DWORD[24+rsp]
xor esi,ecx
mov edi,eax
rol eax,5
add ebp,esi
xor edi,ecx
ror ebx,7
add ebp,eax
add edx,DWORD[28+rsp]
xor edi,ebx
mov esi,ebp
rol ebp,5
add edx,edi
xor esi,ebx
ror eax,7
add edx,ebp
add ecx,DWORD[32+rsp]
xor esi,eax
mov edi,edx
DB 102,15,56,0,214
rol edx,5
add ecx,esi
xor edi,eax
ror ebp,7
paddd xmm1,xmm9
add ecx,edx
add ebx,DWORD[36+rsp]
xor edi,ebp
mov esi,ecx
movdqa XMMWORD[16+rsp],xmm1
rol ecx,5
add ebx,edi
xor esi,ebp
ror edx,7
psubd xmm1,xmm9
add ebx,ecx
add eax,DWORD[40+rsp]
xor esi,edx
mov edi,ebx
rol ebx,5
add eax,esi
xor edi,edx
ror ecx,7
add eax,ebx
add ebp,DWORD[44+rsp]
xor edi,ecx
mov esi,eax
rol eax,5
add ebp,edi
xor esi,ecx
ror ebx,7
add ebp,eax
add edx,DWORD[48+rsp]
xor esi,ebx
mov edi,ebp
DB 102,15,56,0,222
rol ebp,5
add edx,esi
xor edi,ebx
ror eax,7
paddd xmm2,xmm9
add edx,ebp
add ecx,DWORD[52+rsp]
xor edi,eax
mov esi,edx
movdqa XMMWORD[32+rsp],xmm2
rol edx,5
add ecx,edi
xor esi,eax
ror ebp,7
psubd xmm2,xmm9
add ecx,edx
add ebx,DWORD[56+rsp]
xor esi,ebp
mov edi,ecx
rol ecx,5
add ebx,esi
xor edi,ebp
ror edx,7
add ebx,ecx
add eax,DWORD[60+rsp]
xor edi,edx
mov esi,ebx
rol ebx,5
add eax,edi
ror ecx,7
add eax,ebx
add eax,DWORD[r8]
add esi,DWORD[4+r8]
add ecx,DWORD[8+r8]
add edx,DWORD[12+r8]
mov DWORD[r8],eax
add ebp,DWORD[16+r8]
mov DWORD[4+r8],esi
mov ebx,esi
mov DWORD[8+r8],ecx
mov edi,ecx
mov DWORD[12+r8],edx
xor edi,edx
mov DWORD[16+r8],ebp
and esi,edi
jmp NEAR $L$oop_ssse3
ALIGN 16
$L$done_ssse3:
add ebx,DWORD[16+rsp]
xor esi,ebp
mov edi,ecx
rol ecx,5
add ebx,esi
xor edi,ebp
ror edx,7
add ebx,ecx
add eax,DWORD[20+rsp]
xor edi,edx
mov esi,ebx
rol ebx,5
add eax,edi
xor esi,edx
ror ecx,7
add eax,ebx
add ebp,DWORD[24+rsp]
xor esi,ecx
mov edi,eax
rol eax,5
add ebp,esi
xor edi,ecx
ror ebx,7
add ebp,eax
add edx,DWORD[28+rsp]
xor edi,ebx
mov esi,ebp
rol ebp,5
add edx,edi
xor esi,ebx
ror eax,7
add edx,ebp
add ecx,DWORD[32+rsp]
xor esi,eax
mov edi,edx
rol edx,5
add ecx,esi
xor edi,eax
ror ebp,7
add ecx,edx
add ebx,DWORD[36+rsp]
xor edi,ebp
mov esi,ecx
rol ecx,5
add ebx,edi
xor esi,ebp
ror edx,7
add ebx,ecx
add eax,DWORD[40+rsp]
xor esi,edx
mov edi,ebx
rol ebx,5
add eax,esi
xor edi,edx
ror ecx,7
add eax,ebx
add ebp,DWORD[44+rsp]
xor edi,ecx
mov esi,eax
rol eax,5
add ebp,edi
xor esi,ecx
ror ebx,7
add ebp,eax
add edx,DWORD[48+rsp]
xor esi,ebx
mov edi,ebp
rol ebp,5
add edx,esi
xor edi,ebx
ror eax,7
add edx,ebp
add ecx,DWORD[52+rsp]
xor edi,eax
mov esi,edx
rol edx,5
add ecx,edi
xor esi,eax
ror ebp,7
add ecx,edx
add ebx,DWORD[56+rsp]
xor esi,ebp
mov edi,ecx
rol ecx,5
add ebx,esi
xor edi,ebp
ror edx,7
add ebx,ecx
add eax,DWORD[60+rsp]
xor edi,edx
mov esi,ebx
rol ebx,5
add eax,edi
ror ecx,7
add eax,ebx
add eax,DWORD[r8]
add esi,DWORD[4+r8]
add ecx,DWORD[8+r8]
mov DWORD[r8],eax
add edx,DWORD[12+r8]
mov DWORD[4+r8],esi
add ebp,DWORD[16+r8]
mov DWORD[8+r8],ecx
mov DWORD[12+r8],edx
mov DWORD[16+r8],ebp
movaps xmm6,XMMWORD[((-40-96))+r14]
movaps xmm7,XMMWORD[((-40-80))+r14]
movaps xmm8,XMMWORD[((-40-64))+r14]
movaps xmm9,XMMWORD[((-40-48))+r14]
movaps xmm10,XMMWORD[((-40-32))+r14]
movaps xmm11,XMMWORD[((-40-16))+r14]
lea rsi,[r14]
mov r14,QWORD[((-40))+rsi]
mov r13,QWORD[((-32))+rsi]
mov r12,QWORD[((-24))+rsi]
mov rbp,QWORD[((-16))+rsi]
mov rbx,QWORD[((-8))+rsi]
lea rsp,[rsi]
$L$epilogue_ssse3:
mov rdi,QWORD[8+rsp] ;WIN64 epilogue
mov rsi,QWORD[16+rsp]
DB 0F3h,0C3h ;repret
$L$SEH_end_sha1_block_data_order_ssse3:
ALIGN 16
sha1_block_data_order_avx:
mov QWORD[8+rsp],rdi ;WIN64 prologue
mov QWORD[16+rsp],rsi
mov rax,rsp
$L$SEH_begin_sha1_block_data_order_avx:
mov rdi,rcx
mov rsi,rdx
mov rdx,r8
_avx_shortcut:
mov rax,rsp
push rbx
push rbp
push r12
push r13
push r14
lea rsp,[((-160))+rsp]
vzeroupper
vmovaps XMMWORD[(-40-96)+rax],xmm6
vmovaps XMMWORD[(-40-80)+rax],xmm7
vmovaps XMMWORD[(-40-64)+rax],xmm8
vmovaps XMMWORD[(-40-48)+rax],xmm9
vmovaps XMMWORD[(-40-32)+rax],xmm10
vmovaps XMMWORD[(-40-16)+rax],xmm11
$L$prologue_avx:
mov r14,rax
and rsp,-64
mov r8,rdi
mov r9,rsi
mov r10,rdx
shl r10,6
add r10,r9
lea r11,[((K_XX_XX+64))]
mov eax,DWORD[r8]
mov ebx,DWORD[4+r8]
mov ecx,DWORD[8+r8]
mov edx,DWORD[12+r8]
mov esi,ebx
mov ebp,DWORD[16+r8]
mov edi,ecx
xor edi,edx
and esi,edi
vmovdqa xmm6,XMMWORD[64+r11]
vmovdqa xmm11,XMMWORD[((-64))+r11]
vmovdqu xmm0,XMMWORD[r9]
vmovdqu xmm1,XMMWORD[16+r9]
vmovdqu xmm2,XMMWORD[32+r9]
vmovdqu xmm3,XMMWORD[48+r9]
vpshufb xmm0,xmm0,xmm6
add r9,64
vpshufb xmm1,xmm1,xmm6
vpshufb xmm2,xmm2,xmm6
vpshufb xmm3,xmm3,xmm6
vpaddd xmm4,xmm0,xmm11
vpaddd xmm5,xmm1,xmm11
vpaddd xmm6,xmm2,xmm11
vmovdqa XMMWORD[rsp],xmm4
vmovdqa XMMWORD[16+rsp],xmm5
vmovdqa XMMWORD[32+rsp],xmm6
jmp NEAR $L$oop_avx
ALIGN 16
$L$oop_avx:
shrd ebx,ebx,2
xor esi,edx
vpalignr xmm4,xmm1,xmm0,8
mov edi,eax
add ebp,DWORD[rsp]
vpaddd xmm9,xmm11,xmm3
xor ebx,ecx
shld eax,eax,5
vpsrldq xmm8,xmm3,4
add ebp,esi
and edi,ebx
vpxor xmm4,xmm4,xmm0
xor ebx,ecx
add ebp,eax
vpxor xmm8,xmm8,xmm2
shrd eax,eax,7
xor edi,ecx
mov esi,ebp
add edx,DWORD[4+rsp]
vpxor xmm4,xmm4,xmm8
xor eax,ebx
shld ebp,ebp,5
vmovdqa XMMWORD[48+rsp],xmm9
add edx,edi
and esi,eax
vpsrld xmm8,xmm4,31
xor eax,ebx
add edx,ebp
shrd ebp,ebp,7
xor esi,ebx
vpslldq xmm10,xmm4,12
vpaddd xmm4,xmm4,xmm4
mov edi,edx
add ecx,DWORD[8+rsp]
xor ebp,eax
shld edx,edx,5
vpsrld xmm9,xmm10,30
vpor xmm4,xmm4,xmm8
add ecx,esi
and edi,ebp
xor ebp,eax
add ecx,edx
vpslld xmm10,xmm10,2
vpxor xmm4,xmm4,xmm9
shrd edx,edx,7
xor edi,eax
mov esi,ecx
add ebx,DWORD[12+rsp]
vpxor xmm4,xmm4,xmm10
xor edx,ebp
shld ecx,ecx,5
add ebx,edi
and esi,edx
xor edx,ebp
add ebx,ecx
shrd ecx,ecx,7
xor esi,ebp
vpalignr xmm5,xmm2,xmm1,8
mov edi,ebx
add eax,DWORD[16+rsp]
vpaddd xmm9,xmm11,xmm4
xor ecx,edx
shld ebx,ebx,5
vpsrldq xmm8,xmm4,4
add eax,esi
and edi,ecx
vpxor xmm5,xmm5,xmm1
xor ecx,edx
add eax,ebx
vpxor xmm8,xmm8,xmm3
shrd ebx,ebx,7
xor edi,edx
mov esi,eax
add ebp,DWORD[20+rsp]
vpxor xmm5,xmm5,xmm8
xor ebx,ecx
shld eax,eax,5
vmovdqa XMMWORD[rsp],xmm9
add ebp,edi
and esi,ebx
vpsrld xmm8,xmm5,31
xor ebx,ecx
add ebp,eax
shrd eax,eax,7
xor esi,ecx
vpslldq xmm10,xmm5,12
vpaddd xmm5,xmm5,xmm5
mov edi,ebp
add edx,DWORD[24+rsp]
xor eax,ebx
shld ebp,ebp,5
vpsrld xmm9,xmm10,30
vpor xmm5,xmm5,xmm8
add edx,esi
and edi,eax
xor eax,ebx
add edx,ebp
vpslld xmm10,xmm10,2
vpxor xmm5,xmm5,xmm9
shrd ebp,ebp,7
xor edi,ebx
mov esi,edx
add ecx,DWORD[28+rsp]
vpxor xmm5,xmm5,xmm10
xor ebp,eax
shld edx,edx,5
vmovdqa xmm11,XMMWORD[((-32))+r11]
add ecx,edi
and esi,ebp
xor ebp,eax
add ecx,edx
shrd edx,edx,7
xor esi,eax
vpalignr xmm6,xmm3,xmm2,8
mov edi,ecx
add ebx,DWORD[32+rsp]
vpaddd xmm9,xmm11,xmm5
xor edx,ebp
shld ecx,ecx,5
vpsrldq xmm8,xmm5,4
add ebx,esi
and edi,edx
vpxor xmm6,xmm6,xmm2
xor edx,ebp
add ebx,ecx
vpxor xmm8,xmm8,xmm4
shrd ecx,ecx,7
xor edi,ebp
mov esi,ebx
add eax,DWORD[36+rsp]
vpxor xmm6,xmm6,xmm8
xor ecx,edx
shld ebx,ebx,5
vmovdqa XMMWORD[16+rsp],xmm9
add eax,edi
and esi,ecx
vpsrld xmm8,xmm6,31
xor ecx,edx
add eax,ebx
shrd ebx,ebx,7
xor esi,edx
vpslldq xmm10,xmm6,12
vpaddd xmm6,xmm6,xmm6
mov edi,eax
add ebp,DWORD[40+rsp]
xor ebx,ecx
shld eax,eax,5
vpsrld xmm9,xmm10,30
vpor xmm6,xmm6,xmm8
add ebp,esi
and edi,ebx
xor ebx,ecx
add ebp,eax
vpslld xmm10,xmm10,2
vpxor xmm6,xmm6,xmm9
shrd eax,eax,7
xor edi,ecx
mov esi,ebp
add edx,DWORD[44+rsp]
vpxor xmm6,xmm6,xmm10
xor eax,ebx
shld ebp,ebp,5
add edx,edi
and esi,eax
xor eax,ebx
add edx,ebp
shrd ebp,ebp,7
xor esi,ebx
vpalignr xmm7,xmm4,xmm3,8
mov edi,edx
add ecx,DWORD[48+rsp]
vpaddd xmm9,xmm11,xmm6
xor ebp,eax
shld edx,edx,5
vpsrldq xmm8,xmm6,4
add ecx,esi
and edi,ebp
vpxor xmm7,xmm7,xmm3
xor ebp,eax
add ecx,edx
vpxor xmm8,xmm8,xmm5
shrd edx,edx,7
xor edi,eax
mov esi,ecx
add ebx,DWORD[52+rsp]
vpxor xmm7,xmm7,xmm8
xor edx,ebp
shld ecx,ecx,5
vmovdqa XMMWORD[32+rsp],xmm9
add ebx,edi
and esi,edx
vpsrld xmm8,xmm7,31
xor edx,ebp
add ebx,ecx
shrd ecx,ecx,7
xor esi,ebp
vpslldq xmm10,xmm7,12
vpaddd xmm7,xmm7,xmm7
mov edi,ebx
add eax,DWORD[56+rsp]
xor ecx,edx
shld ebx,ebx,5
vpsrld xmm9,xmm10,30
vpor xmm7,xmm7,xmm8
add eax,esi
and edi,ecx
xor ecx,edx
add eax,ebx
vpslld xmm10,xmm10,2
vpxor xmm7,xmm7,xmm9
shrd ebx,ebx,7
xor edi,edx
mov esi,eax
add ebp,DWORD[60+rsp]
vpxor xmm7,xmm7,xmm10
xor ebx,ecx
shld eax,eax,5
add ebp,edi
and esi,ebx
xor ebx,ecx
add ebp,eax
vpalignr xmm8,xmm7,xmm6,8
vpxor xmm0,xmm0,xmm4
shrd eax,eax,7
xor esi,ecx
mov edi,ebp
add edx,DWORD[rsp]
vpxor xmm0,xmm0,xmm1
xor eax,ebx
shld ebp,ebp,5
vpaddd xmm9,xmm11,xmm7
add edx,esi
and edi,eax
vpxor xmm0,xmm0,xmm8
xor eax,ebx
add edx,ebp
shrd ebp,ebp,7
xor edi,ebx
vpsrld xmm8,xmm0,30
vmovdqa XMMWORD[48+rsp],xmm9
mov esi,edx
add ecx,DWORD[4+rsp]
xor ebp,eax
shld edx,edx,5
vpslld xmm0,xmm0,2
add ecx,edi
and esi,ebp
xor ebp,eax
add ecx,edx
shrd edx,edx,7
xor esi,eax
mov edi,ecx
add ebx,DWORD[8+rsp]
vpor xmm0,xmm0,xmm8
xor edx,ebp
shld ecx,ecx,5
add ebx,esi
and edi,edx
xor edx,ebp
add ebx,ecx
add eax,DWORD[12+rsp]
xor edi,ebp
mov esi,ebx
shld ebx,ebx,5
add eax,edi
xor esi,edx
shrd ecx,ecx,7
add eax,ebx
vpalignr xmm8,xmm0,xmm7,8
vpxor xmm1,xmm1,xmm5
add ebp,DWORD[16+rsp]
xor esi,ecx
mov edi,eax
shld eax,eax,5
vpxor xmm1,xmm1,xmm2
add ebp,esi
xor edi,ecx
vpaddd xmm9,xmm11,xmm0
shrd ebx,ebx,7
add ebp,eax
vpxor xmm1,xmm1,xmm8
add edx,DWORD[20+rsp]
xor edi,ebx
mov esi,ebp
shld ebp,ebp,5
vpsrld xmm8,xmm1,30
vmovdqa XMMWORD[rsp],xmm9
add edx,edi
xor esi,ebx
shrd eax,eax,7
add edx,ebp
vpslld xmm1,xmm1,2
add ecx,DWORD[24+rsp]
xor esi,eax
mov edi,edx
shld edx,edx,5
add ecx,esi
xor edi,eax
shrd ebp,ebp,7
add ecx,edx
vpor xmm1,xmm1,xmm8
add ebx,DWORD[28+rsp]
xor edi,ebp
mov esi,ecx
shld ecx,ecx,5
add ebx,edi
xor esi,ebp
shrd edx,edx,7
add ebx,ecx
vpalignr xmm8,xmm1,xmm0,8
vpxor xmm2,xmm2,xmm6
add eax,DWORD[32+rsp]
xor esi,edx
mov edi,ebx
shld ebx,ebx,5
vpxor xmm2,xmm2,xmm3
add eax,esi
xor edi,edx
vpaddd xmm9,xmm11,xmm1
vmovdqa xmm11,XMMWORD[r11]
shrd ecx,ecx,7
add eax,ebx
vpxor xmm2,xmm2,xmm8
add ebp,DWORD[36+rsp]
xor edi,ecx
mov esi,eax
shld eax,eax,5
vpsrld xmm8,xmm2,30
vmovdqa XMMWORD[16+rsp],xmm9
add ebp,edi
xor esi,ecx
shrd ebx,ebx,7
add ebp,eax
vpslld xmm2,xmm2,2
add edx,DWORD[40+rsp]
xor esi,ebx
mov edi,ebp
shld ebp,ebp,5
add edx,esi
xor edi,ebx
shrd eax,eax,7
add edx,ebp
vpor xmm2,xmm2,xmm8
add ecx,DWORD[44+rsp]
xor edi,eax
mov esi,edx
shld edx,edx,5
add ecx,edi
xor esi,eax
shrd ebp,ebp,7
add ecx,edx
vpalignr xmm8,xmm2,xmm1,8
vpxor xmm3,xmm3,xmm7
add ebx,DWORD[48+rsp]
xor esi,ebp
mov edi,ecx
shld ecx,ecx,5
vpxor xmm3,xmm3,xmm4
add ebx,esi
xor edi,ebp
vpaddd xmm9,xmm11,xmm2
shrd edx,edx,7
add ebx,ecx
vpxor xmm3,xmm3,xmm8
add eax,DWORD[52+rsp]
xor edi,edx
mov esi,ebx
shld ebx,ebx,5
vpsrld xmm8,xmm3,30
vmovdqa XMMWORD[32+rsp],xmm9
add eax,edi
xor esi,edx
shrd ecx,ecx,7
add eax,ebx
vpslld xmm3,xmm3,2
add ebp,DWORD[56+rsp]
xor esi,ecx
mov edi,eax
shld eax,eax,5
add ebp,esi
xor edi,ecx
shrd ebx,ebx,7
add ebp,eax
vpor xmm3,xmm3,xmm8
add edx,DWORD[60+rsp]
xor edi,ebx
mov esi,ebp
shld ebp,ebp,5
add edx,edi
xor esi,ebx
shrd eax,eax,7
add edx,ebp
vpalignr xmm8,xmm3,xmm2,8
vpxor xmm4,xmm4,xmm0
add ecx,DWORD[rsp]
xor esi,eax
mov edi,edx
shld edx,edx,5
vpxor xmm4,xmm4,xmm5
add ecx,esi
xor edi,eax
vpaddd xmm9,xmm11,xmm3
shrd ebp,ebp,7
add ecx,edx
vpxor xmm4,xmm4,xmm8
add ebx,DWORD[4+rsp]
xor edi,ebp
mov esi,ecx
shld ecx,ecx,5
vpsrld xmm8,xmm4,30
vmovdqa XMMWORD[48+rsp],xmm9
add ebx,edi
xor esi,ebp
shrd edx,edx,7
add ebx,ecx
vpslld xmm4,xmm4,2
add eax,DWORD[8+rsp]
xor esi,edx
mov edi,ebx
shld ebx,ebx,5
add eax,esi
xor edi,edx
shrd ecx,ecx,7
add eax,ebx
vpor xmm4,xmm4,xmm8
add ebp,DWORD[12+rsp]
xor edi,ecx
mov esi,eax
shld eax,eax,5
add ebp,edi
xor esi,ecx
shrd ebx,ebx,7
add ebp,eax
vpalignr xmm8,xmm4,xmm3,8
vpxor xmm5,xmm5,xmm1
add edx,DWORD[16+rsp]
xor esi,ebx
mov edi,ebp
shld ebp,ebp,5
vpxor xmm5,xmm5,xmm6
add edx,esi
xor edi,ebx
vpaddd xmm9,xmm11,xmm4
shrd eax,eax,7
add edx,ebp
vpxor xmm5,xmm5,xmm8
add ecx,DWORD[20+rsp]
xor edi,eax
mov esi,edx
shld edx,edx,5
vpsrld xmm8,xmm5,30
vmovdqa XMMWORD[rsp],xmm9
add ecx,edi
xor esi,eax
shrd ebp,ebp,7
add ecx,edx
vpslld xmm5,xmm5,2
add ebx,DWORD[24+rsp]
xor esi,ebp
mov edi,ecx
shld ecx,ecx,5
add ebx,esi
xor edi,ebp
shrd edx,edx,7
add ebx,ecx
vpor xmm5,xmm5,xmm8
add eax,DWORD[28+rsp]
shrd ecx,ecx,7
mov esi,ebx
xor edi,edx
shld ebx,ebx,5
add eax,edi
xor esi,ecx
xor ecx,edx
add eax,ebx
vpalignr xmm8,xmm5,xmm4,8
vpxor xmm6,xmm6,xmm2
add ebp,DWORD[32+rsp]
and esi,ecx
xor ecx,edx
shrd ebx,ebx,7
vpxor xmm6,xmm6,xmm7
mov edi,eax
xor esi,ecx
vpaddd xmm9,xmm11,xmm5
shld eax,eax,5
add ebp,esi
vpxor xmm6,xmm6,xmm8
xor edi,ebx
xor ebx,ecx
add ebp,eax
add edx,DWORD[36+rsp]
vpsrld xmm8,xmm6,30
vmovdqa XMMWORD[16+rsp],xmm9
and edi,ebx
xor ebx,ecx
shrd eax,eax,7
mov esi,ebp
vpslld xmm6,xmm6,2
xor edi,ebx
shld ebp,ebp,5
add edx,edi
xor esi,eax
xor eax,ebx
add edx,ebp
add ecx,DWORD[40+rsp]
and esi,eax
vpor xmm6,xmm6,xmm8
xor eax,ebx
shrd ebp,ebp,7
mov edi,edx
xor esi,eax
shld edx,edx,5
add ecx,esi
xor edi,ebp
xor ebp,eax
add ecx,edx
add ebx,DWORD[44+rsp]
and edi,ebp
xor ebp,eax
shrd edx,edx,7
mov esi,ecx
xor edi,ebp
shld ecx,ecx,5
add ebx,edi
xor esi,edx
xor edx,ebp
add ebx,ecx
vpalignr xmm8,xmm6,xmm5,8
vpxor xmm7,xmm7,xmm3
add eax,DWORD[48+rsp]
and esi,edx
xor edx,ebp
shrd ecx,ecx,7
vpxor xmm7,xmm7,xmm0
mov edi,ebx
xor esi,edx
vpaddd xmm9,xmm11,xmm6
vmovdqa xmm11,XMMWORD[32+r11]
shld ebx,ebx,5
add eax,esi
vpxor xmm7,xmm7,xmm8
xor edi,ecx
xor ecx,edx
add eax,ebx
add ebp,DWORD[52+rsp]
vpsrld xmm8,xmm7,30
vmovdqa XMMWORD[32+rsp],xmm9
and edi,ecx
xor ecx,edx
shrd ebx,ebx,7
mov esi,eax
vpslld xmm7,xmm7,2
xor edi,ecx
shld eax,eax,5
add ebp,edi
xor esi,ebx
xor ebx,ecx
add ebp,eax
add edx,DWORD[56+rsp]
and esi,ebx
vpor xmm7,xmm7,xmm8
xor ebx,ecx
shrd eax,eax,7
mov edi,ebp
xor esi,ebx
shld ebp,ebp,5
add edx,esi
xor edi,eax
xor eax,ebx
add edx,ebp
add ecx,DWORD[60+rsp]
and edi,eax
xor eax,ebx
shrd ebp,ebp,7
mov esi,edx
xor edi,eax
shld edx,edx,5
add ecx,edi
xor esi,ebp
xor ebp,eax
add ecx,edx
vpalignr xmm8,xmm7,xmm6,8
vpxor xmm0,xmm0,xmm4
add ebx,DWORD[rsp]
and esi,ebp
xor ebp,eax
shrd edx,edx,7
vpxor xmm0,xmm0,xmm1
mov edi,ecx
xor esi,ebp
vpaddd xmm9,xmm11,xmm7
shld ecx,ecx,5
add ebx,esi
vpxor xmm0,xmm0,xmm8
xor edi,edx
xor edx,ebp
add ebx,ecx
add eax,DWORD[4+rsp]
vpsrld xmm8,xmm0,30
vmovdqa XMMWORD[48+rsp],xmm9
and edi,edx
xor edx,ebp
shrd ecx,ecx,7
mov esi,ebx
vpslld xmm0,xmm0,2
xor edi,edx
shld ebx,ebx,5
add eax,edi
xor esi,ecx
xor ecx,edx
add eax,ebx
add ebp,DWORD[8+rsp]
and esi,ecx
vpor xmm0,xmm0,xmm8
xor ecx,edx
shrd ebx,ebx,7
mov edi,eax
xor esi,ecx
shld eax,eax,5
add ebp,esi
xor edi,ebx
xor ebx,ecx
add ebp,eax
add edx,DWORD[12+rsp]
and edi,ebx
xor ebx,ecx
shrd eax,eax,7
mov esi,ebp
xor edi,ebx
shld ebp,ebp,5
add edx,edi
xor esi,eax
xor eax,ebx
add edx,ebp
vpalignr xmm8,xmm0,xmm7,8
vpxor xmm1,xmm1,xmm5
add ecx,DWORD[16+rsp]
and esi,eax
xor eax,ebx
shrd ebp,ebp,7
vpxor xmm1,xmm1,xmm2
mov edi,edx
xor esi,eax
vpaddd xmm9,xmm11,xmm0
shld edx,edx,5
add ecx,esi
vpxor xmm1,xmm1,xmm8
xor edi,ebp
xor ebp,eax
add ecx,edx
add ebx,DWORD[20+rsp]
vpsrld xmm8,xmm1,30
vmovdqa XMMWORD[rsp],xmm9
and edi,ebp
xor ebp,eax
shrd edx,edx,7
mov esi,ecx
vpslld xmm1,xmm1,2
xor edi,ebp
shld ecx,ecx,5
add ebx,edi
xor esi,edx
xor edx,ebp
add ebx,ecx
add eax,DWORD[24+rsp]
and esi,edx
vpor xmm1,xmm1,xmm8
xor edx,ebp
shrd ecx,ecx,7
mov edi,ebx
xor esi,edx
shld ebx,ebx,5
add eax,esi
xor edi,ecx
xor ecx,edx
add eax,ebx
add ebp,DWORD[28+rsp]
and edi,ecx
xor ecx,edx
shrd ebx,ebx,7
mov esi,eax
xor edi,ecx
shld eax,eax,5
add ebp,edi
xor esi,ebx
xor ebx,ecx
add ebp,eax
vpalignr xmm8,xmm1,xmm0,8
vpxor xmm2,xmm2,xmm6
add edx,DWORD[32+rsp]
and esi,ebx
xor ebx,ecx
shrd eax,eax,7
vpxor xmm2,xmm2,xmm3
mov edi,ebp
xor esi,ebx
vpaddd xmm9,xmm11,xmm1
shld ebp,ebp,5
add edx,esi
vpxor xmm2,xmm2,xmm8
xor edi,eax
xor eax,ebx
add edx,ebp
add ecx,DWORD[36+rsp]
vpsrld xmm8,xmm2,30
vmovdqa XMMWORD[16+rsp],xmm9
and edi,eax
xor eax,ebx
shrd ebp,ebp,7
mov esi,edx
vpslld xmm2,xmm2,2
xor edi,eax
shld edx,edx,5
add ecx,edi
xor esi,ebp
xor ebp,eax
add ecx,edx
add ebx,DWORD[40+rsp]
and esi,ebp
vpor xmm2,xmm2,xmm8
xor ebp,eax
shrd edx,edx,7
mov edi,ecx
xor esi,ebp
shld ecx,ecx,5
add ebx,esi
xor edi,edx
xor edx,ebp
add ebx,ecx
add eax,DWORD[44+rsp]
and edi,edx
xor edx,ebp
shrd ecx,ecx,7
mov esi,ebx
xor edi,edx
shld ebx,ebx,5
add eax,edi
xor esi,edx
add eax,ebx
vpalignr xmm8,xmm2,xmm1,8
vpxor xmm3,xmm3,xmm7
add ebp,DWORD[48+rsp]
xor esi,ecx
mov edi,eax
shld eax,eax,5
vpxor xmm3,xmm3,xmm4
add ebp,esi
xor edi,ecx
vpaddd xmm9,xmm11,xmm2
shrd ebx,ebx,7
add ebp,eax
vpxor xmm3,xmm3,xmm8
add edx,DWORD[52+rsp]
xor edi,ebx
mov esi,ebp
shld ebp,ebp,5
vpsrld xmm8,xmm3,30
vmovdqa XMMWORD[32+rsp],xmm9
add edx,edi
xor esi,ebx
shrd eax,eax,7
add edx,ebp
vpslld xmm3,xmm3,2
add ecx,DWORD[56+rsp]
xor esi,eax
mov edi,edx
shld edx,edx,5
add ecx,esi
xor edi,eax
shrd ebp,ebp,7
add ecx,edx
vpor xmm3,xmm3,xmm8
add ebx,DWORD[60+rsp]
xor edi,ebp
mov esi,ecx
shld ecx,ecx,5
add ebx,edi
xor esi,ebp
shrd edx,edx,7
add ebx,ecx
add eax,DWORD[rsp]
vpaddd xmm9,xmm11,xmm3
xor esi,edx
mov edi,ebx
shld ebx,ebx,5
add eax,esi
vmovdqa XMMWORD[48+rsp],xmm9
xor edi,edx
shrd ecx,ecx,7
add eax,ebx
add ebp,DWORD[4+rsp]
xor edi,ecx
mov esi,eax
shld eax,eax,5
add ebp,edi
xor esi,ecx
shrd ebx,ebx,7
add ebp,eax
add edx,DWORD[8+rsp]
xor esi,ebx
mov edi,ebp
shld ebp,ebp,5
add edx,esi
xor edi,ebx
shrd eax,eax,7
add edx,ebp
add ecx,DWORD[12+rsp]
xor edi,eax
mov esi,edx
shld edx,edx,5
add ecx,edi
xor esi,eax
shrd ebp,ebp,7
add ecx,edx
cmp r9,r10
je NEAR $L$done_avx
vmovdqa xmm6,XMMWORD[64+r11]
vmovdqa xmm11,XMMWORD[((-64))+r11]
vmovdqu xmm0,XMMWORD[r9]
vmovdqu xmm1,XMMWORD[16+r9]
vmovdqu xmm2,XMMWORD[32+r9]
vmovdqu xmm3,XMMWORD[48+r9]
vpshufb xmm0,xmm0,xmm6
add r9,64
add ebx,DWORD[16+rsp]
xor esi,ebp
vpshufb xmm1,xmm1,xmm6
mov edi,ecx
shld ecx,ecx,5
vpaddd xmm4,xmm0,xmm11
add ebx,esi
xor edi,ebp
shrd edx,edx,7
add ebx,ecx
vmovdqa XMMWORD[rsp],xmm4
add eax,DWORD[20+rsp]
xor edi,edx
mov esi,ebx
shld ebx,ebx,5
add eax,edi
xor esi,edx
shrd ecx,ecx,7
add eax,ebx
add ebp,DWORD[24+rsp]
xor esi,ecx
mov edi,eax
shld eax,eax,5
add ebp,esi
xor edi,ecx
shrd ebx,ebx,7
add ebp,eax
add edx,DWORD[28+rsp]
xor edi,ebx
mov esi,ebp
shld ebp,ebp,5
add edx,edi
xor esi,ebx
shrd eax,eax,7
add edx,ebp
add ecx,DWORD[32+rsp]
xor esi,eax
vpshufb xmm2,xmm2,xmm6
mov edi,edx
shld edx,edx,5
vpaddd xmm5,xmm1,xmm11
add ecx,esi
xor edi,eax
shrd ebp,ebp,7
add ecx,edx
vmovdqa XMMWORD[16+rsp],xmm5
add ebx,DWORD[36+rsp]
xor edi,ebp
mov esi,ecx
shld ecx,ecx,5
add ebx,edi
xor esi,ebp
shrd edx,edx,7
add ebx,ecx
add eax,DWORD[40+rsp]
xor esi,edx
mov edi,ebx
shld ebx,ebx,5
add eax,esi
xor edi,edx
shrd ecx,ecx,7
add eax,ebx
add ebp,DWORD[44+rsp]
xor edi,ecx
mov esi,eax
shld eax,eax,5
add ebp,edi
xor esi,ecx
shrd ebx,ebx,7
add ebp,eax
add edx,DWORD[48+rsp]
xor esi,ebx
vpshufb xmm3,xmm3,xmm6
mov edi,ebp
shld ebp,ebp,5
vpaddd xmm6,xmm2,xmm11
add edx,esi
xor edi,ebx
shrd eax,eax,7
add edx,ebp
vmovdqa XMMWORD[32+rsp],xmm6
add ecx,DWORD[52+rsp]
xor edi,eax
mov esi,edx
shld edx,edx,5
add ecx,edi
xor esi,eax
shrd ebp,ebp,7
add ecx,edx
add ebx,DWORD[56+rsp]
xor esi,ebp
mov edi,ecx
shld ecx,ecx,5
add ebx,esi
xor edi,ebp
shrd edx,edx,7
add ebx,ecx
add eax,DWORD[60+rsp]
xor edi,edx
mov esi,ebx
shld ebx,ebx,5
add eax,edi
shrd ecx,ecx,7
add eax,ebx
add eax,DWORD[r8]
add esi,DWORD[4+r8]
add ecx,DWORD[8+r8]
add edx,DWORD[12+r8]
mov DWORD[r8],eax
add ebp,DWORD[16+r8]
mov DWORD[4+r8],esi
mov ebx,esi
mov DWORD[8+r8],ecx
mov edi,ecx
mov DWORD[12+r8],edx
xor edi,edx
mov DWORD[16+r8],ebp
and esi,edi
jmp NEAR $L$oop_avx
ALIGN 16
$L$done_avx:
add ebx,DWORD[16+rsp]
xor esi,ebp
mov edi,ecx
shld ecx,ecx,5
add ebx,esi
xor edi,ebp
shrd edx,edx,7
add ebx,ecx
add eax,DWORD[20+rsp]
xor edi,edx
mov esi,ebx
shld ebx,ebx,5
add eax,edi
xor esi,edx
shrd ecx,ecx,7
add eax,ebx
add ebp,DWORD[24+rsp]
xor esi,ecx
mov edi,eax
shld eax,eax,5
add ebp,esi
xor edi,ecx
shrd ebx,ebx,7
add ebp,eax
add edx,DWORD[28+rsp]
xor edi,ebx
mov esi,ebp
shld ebp,ebp,5
add edx,edi
xor esi,ebx
shrd eax,eax,7
add edx,ebp
add ecx,DWORD[32+rsp]
xor esi,eax
mov edi,edx
shld edx,edx,5
add ecx,esi
xor edi,eax
shrd ebp,ebp,7
add ecx,edx
add ebx,DWORD[36+rsp]
xor edi,ebp
mov esi,ecx
shld ecx,ecx,5
add ebx,edi
xor esi,ebp
shrd edx,edx,7
add ebx,ecx
add eax,DWORD[40+rsp]
xor esi,edx
mov edi,ebx
shld ebx,ebx,5
add eax,esi
xor edi,edx
shrd ecx,ecx,7
add eax,ebx
add ebp,DWORD[44+rsp]
xor edi,ecx
mov esi,eax
shld eax,eax,5
add ebp,edi
xor esi,ecx
shrd ebx,ebx,7
add ebp,eax
add edx,DWORD[48+rsp]
xor esi,ebx
mov edi,ebp
shld ebp,ebp,5
add edx,esi
xor edi,ebx
shrd eax,eax,7
add edx,ebp
add ecx,DWORD[52+rsp]
xor edi,eax
mov esi,edx
shld edx,edx,5
add ecx,edi
xor esi,eax
shrd ebp,ebp,7
add ecx,edx
add ebx,DWORD[56+rsp]
xor esi,ebp
mov edi,ecx
shld ecx,ecx,5
add ebx,esi
xor edi,ebp
shrd edx,edx,7
add ebx,ecx
add eax,DWORD[60+rsp]
xor edi,edx
mov esi,ebx
shld ebx,ebx,5
add eax,edi
shrd ecx,ecx,7
add eax,ebx
vzeroupper
add eax,DWORD[r8]
add esi,DWORD[4+r8]
add ecx,DWORD[8+r8]
mov DWORD[r8],eax
add edx,DWORD[12+r8]
mov DWORD[4+r8],esi
add ebp,DWORD[16+r8]
mov DWORD[8+r8],ecx
mov DWORD[12+r8],edx
mov DWORD[16+r8],ebp
movaps xmm6,XMMWORD[((-40-96))+r14]
movaps xmm7,XMMWORD[((-40-80))+r14]
movaps xmm8,XMMWORD[((-40-64))+r14]
movaps xmm9,XMMWORD[((-40-48))+r14]
movaps xmm10,XMMWORD[((-40-32))+r14]
movaps xmm11,XMMWORD[((-40-16))+r14]
lea rsi,[r14]
mov r14,QWORD[((-40))+rsi]
mov r13,QWORD[((-32))+rsi]
mov r12,QWORD[((-24))+rsi]
mov rbp,QWORD[((-16))+rsi]
mov rbx,QWORD[((-8))+rsi]
lea rsp,[rsi]
$L$epilogue_avx:
mov rdi,QWORD[8+rsp] ;WIN64 epilogue
mov rsi,QWORD[16+rsp]
DB 0F3h,0C3h ;repret
$L$SEH_end_sha1_block_data_order_avx:
ALIGN 16
sha1_block_data_order_avx2:
mov QWORD[8+rsp],rdi ;WIN64 prologue
mov QWORD[16+rsp],rsi
mov rax,rsp
$L$SEH_begin_sha1_block_data_order_avx2:
mov rdi,rcx
mov rsi,rdx
mov rdx,r8
_avx2_shortcut:
mov rax,rsp
push rbx
push rbp
push r12
push r13
push r14
vzeroupper
lea rsp,[((-96))+rsp]
vmovaps XMMWORD[(-40-96)+rax],xmm6
vmovaps XMMWORD[(-40-80)+rax],xmm7
vmovaps XMMWORD[(-40-64)+rax],xmm8
vmovaps XMMWORD[(-40-48)+rax],xmm9
vmovaps XMMWORD[(-40-32)+rax],xmm10
vmovaps XMMWORD[(-40-16)+rax],xmm11
$L$prologue_avx2:
mov r14,rax
mov r8,rdi
mov r9,rsi
mov r10,rdx
lea rsp,[((-640))+rsp]
shl r10,6
lea r13,[64+r9]
and rsp,-128
add r10,r9
lea r11,[((K_XX_XX+64))]
mov eax,DWORD[r8]
cmp r13,r10
cmovae r13,r9
mov ebp,DWORD[4+r8]
mov ecx,DWORD[8+r8]
mov edx,DWORD[12+r8]
mov esi,DWORD[16+r8]
vmovdqu ymm6,YMMWORD[64+r11]
vmovdqu xmm0,XMMWORD[r9]
vmovdqu xmm1,XMMWORD[16+r9]
vmovdqu xmm2,XMMWORD[32+r9]
vmovdqu xmm3,XMMWORD[48+r9]
lea r9,[64+r9]
vinserti128 ymm0,ymm0,XMMWORD[r13],1
vinserti128 ymm1,ymm1,XMMWORD[16+r13],1
vpshufb ymm0,ymm0,ymm6
vinserti128 ymm2,ymm2,XMMWORD[32+r13],1
vpshufb ymm1,ymm1,ymm6
vinserti128 ymm3,ymm3,XMMWORD[48+r13],1
vpshufb ymm2,ymm2,ymm6
vmovdqu ymm11,YMMWORD[((-64))+r11]
vpshufb ymm3,ymm3,ymm6
vpaddd ymm4,ymm0,ymm11
vpaddd ymm5,ymm1,ymm11
vmovdqu YMMWORD[rsp],ymm4
vpaddd ymm6,ymm2,ymm11
vmovdqu YMMWORD[32+rsp],ymm5
vpaddd ymm7,ymm3,ymm11
vmovdqu YMMWORD[64+rsp],ymm6
vmovdqu YMMWORD[96+rsp],ymm7
vpalignr ymm4,ymm1,ymm0,8
vpsrldq ymm8,ymm3,4
vpxor ymm4,ymm4,ymm0
vpxor ymm8,ymm8,ymm2
vpxor ymm4,ymm4,ymm8
vpsrld ymm8,ymm4,31
vpslldq ymm10,ymm4,12
vpaddd ymm4,ymm4,ymm4
vpsrld ymm9,ymm10,30
vpor ymm4,ymm4,ymm8
vpslld ymm10,ymm10,2
vpxor ymm4,ymm4,ymm9
vpxor ymm4,ymm4,ymm10
vpaddd ymm9,ymm4,ymm11
vmovdqu YMMWORD[128+rsp],ymm9
vpalignr ymm5,ymm2,ymm1,8
vpsrldq ymm8,ymm4,4
vpxor ymm5,ymm5,ymm1
vpxor ymm8,ymm8,ymm3
vpxor ymm5,ymm5,ymm8
vpsrld ymm8,ymm5,31
vmovdqu ymm11,YMMWORD[((-32))+r11]
vpslldq ymm10,ymm5,12
vpaddd ymm5,ymm5,ymm5
vpsrld ymm9,ymm10,30
vpor ymm5,ymm5,ymm8
vpslld ymm10,ymm10,2
vpxor ymm5,ymm5,ymm9
vpxor ymm5,ymm5,ymm10
vpaddd ymm9,ymm5,ymm11
vmovdqu YMMWORD[160+rsp],ymm9
vpalignr ymm6,ymm3,ymm2,8
vpsrldq ymm8,ymm5,4
vpxor ymm6,ymm6,ymm2
vpxor ymm8,ymm8,ymm4
vpxor ymm6,ymm6,ymm8
vpsrld ymm8,ymm6,31
vpslldq ymm10,ymm6,12
vpaddd ymm6,ymm6,ymm6
vpsrld ymm9,ymm10,30
vpor ymm6,ymm6,ymm8
vpslld ymm10,ymm10,2
vpxor ymm6,ymm6,ymm9
vpxor ymm6,ymm6,ymm10
vpaddd ymm9,ymm6,ymm11
vmovdqu YMMWORD[192+rsp],ymm9
vpalignr ymm7,ymm4,ymm3,8
vpsrldq ymm8,ymm6,4
vpxor ymm7,ymm7,ymm3
vpxor ymm8,ymm8,ymm5
vpxor ymm7,ymm7,ymm8
vpsrld ymm8,ymm7,31
vpslldq ymm10,ymm7,12
vpaddd ymm7,ymm7,ymm7
vpsrld ymm9,ymm10,30
vpor ymm7,ymm7,ymm8
vpslld ymm10,ymm10,2
vpxor ymm7,ymm7,ymm9
vpxor ymm7,ymm7,ymm10
vpaddd ymm9,ymm7,ymm11
vmovdqu YMMWORD[224+rsp],ymm9
lea r13,[128+rsp]
jmp NEAR $L$oop_avx2
ALIGN 32
$L$oop_avx2:
rorx ebx,ebp,2
andn edi,ebp,edx
and ebp,ecx
xor ebp,edi
jmp NEAR $L$align32_1
ALIGN 32
$L$align32_1:
vpalignr ymm8,ymm7,ymm6,8
vpxor ymm0,ymm0,ymm4
add esi,DWORD[((-128))+r13]
andn edi,eax,ecx
vpxor ymm0,ymm0,ymm1
add esi,ebp
rorx r12d,eax,27
rorx ebp,eax,2
vpxor ymm0,ymm0,ymm8
and eax,ebx
add esi,r12d
xor eax,edi
vpsrld ymm8,ymm0,30
vpslld ymm0,ymm0,2
add edx,DWORD[((-124))+r13]
andn edi,esi,ebx
add edx,eax
rorx r12d,esi,27
rorx eax,esi,2
and esi,ebp
vpor ymm0,ymm0,ymm8
add edx,r12d
xor esi,edi
add ecx,DWORD[((-120))+r13]
andn edi,edx,ebp
vpaddd ymm9,ymm0,ymm11
add ecx,esi
rorx r12d,edx,27
rorx esi,edx,2
and edx,eax
vmovdqu YMMWORD[256+rsp],ymm9
add ecx,r12d
xor edx,edi
add ebx,DWORD[((-116))+r13]
andn edi,ecx,eax
add ebx,edx
rorx r12d,ecx,27
rorx edx,ecx,2
and ecx,esi
add ebx,r12d
xor ecx,edi
add ebp,DWORD[((-96))+r13]
andn edi,ebx,esi
add ebp,ecx
rorx r12d,ebx,27
rorx ecx,ebx,2
and ebx,edx
add ebp,r12d
xor ebx,edi
vpalignr ymm8,ymm0,ymm7,8
vpxor ymm1,ymm1,ymm5
add eax,DWORD[((-92))+r13]
andn edi,ebp,edx
vpxor ymm1,ymm1,ymm2
add eax,ebx
rorx r12d,ebp,27
rorx ebx,ebp,2
vpxor ymm1,ymm1,ymm8
and ebp,ecx
add eax,r12d
xor ebp,edi
vpsrld ymm8,ymm1,30
vpslld ymm1,ymm1,2
add esi,DWORD[((-88))+r13]
andn edi,eax,ecx
add esi,ebp
rorx r12d,eax,27
rorx ebp,eax,2
and eax,ebx
vpor ymm1,ymm1,ymm8
add esi,r12d
xor eax,edi
add edx,DWORD[((-84))+r13]
andn edi,esi,ebx
vpaddd ymm9,ymm1,ymm11
add edx,eax
rorx r12d,esi,27
rorx eax,esi,2
and esi,ebp
vmovdqu YMMWORD[288+rsp],ymm9
add edx,r12d
xor esi,edi
add ecx,DWORD[((-64))+r13]
andn edi,edx,ebp
add ecx,esi
rorx r12d,edx,27
rorx esi,edx,2
and edx,eax
add ecx,r12d
xor edx,edi
add ebx,DWORD[((-60))+r13]
andn edi,ecx,eax
add ebx,edx
rorx r12d,ecx,27
rorx edx,ecx,2
and ecx,esi
add ebx,r12d
xor ecx,edi
vpalignr ymm8,ymm1,ymm0,8
vpxor ymm2,ymm2,ymm6
add ebp,DWORD[((-56))+r13]
andn edi,ebx,esi
vpxor ymm2,ymm2,ymm3
vmovdqu ymm11,YMMWORD[r11]
add ebp,ecx
rorx r12d,ebx,27
rorx ecx,ebx,2
vpxor ymm2,ymm2,ymm8
and ebx,edx
add ebp,r12d
xor ebx,edi
vpsrld ymm8,ymm2,30
vpslld ymm2,ymm2,2
add eax,DWORD[((-52))+r13]
andn edi,ebp,edx
add eax,ebx
rorx r12d,ebp,27
rorx ebx,ebp,2
and ebp,ecx
vpor ymm2,ymm2,ymm8
add eax,r12d
xor ebp,edi
add esi,DWORD[((-32))+r13]
andn edi,eax,ecx
vpaddd ymm9,ymm2,ymm11
add esi,ebp
rorx r12d,eax,27
rorx ebp,eax,2
and eax,ebx
vmovdqu YMMWORD[320+rsp],ymm9
add esi,r12d
xor eax,edi
add edx,DWORD[((-28))+r13]
andn edi,esi,ebx
add edx,eax
rorx r12d,esi,27
rorx eax,esi,2
and esi,ebp
add edx,r12d
xor esi,edi
add ecx,DWORD[((-24))+r13]
andn edi,edx,ebp
add ecx,esi
rorx r12d,edx,27
rorx esi,edx,2
and edx,eax
add ecx,r12d
xor edx,edi
vpalignr ymm8,ymm2,ymm1,8
vpxor ymm3,ymm3,ymm7
add ebx,DWORD[((-20))+r13]
andn edi,ecx,eax
vpxor ymm3,ymm3,ymm4
add ebx,edx
rorx r12d,ecx,27
rorx edx,ecx,2
vpxor ymm3,ymm3,ymm8
and ecx,esi
add ebx,r12d
xor ecx,edi
vpsrld ymm8,ymm3,30
vpslld ymm3,ymm3,2
add ebp,DWORD[r13]
andn edi,ebx,esi
add ebp,ecx
rorx r12d,ebx,27
rorx ecx,ebx,2
and ebx,edx
vpor ymm3,ymm3,ymm8
add ebp,r12d
xor ebx,edi
add eax,DWORD[4+r13]
andn edi,ebp,edx
vpaddd ymm9,ymm3,ymm11
add eax,ebx
rorx r12d,ebp,27
rorx ebx,ebp,2
and ebp,ecx
vmovdqu YMMWORD[352+rsp],ymm9
add eax,r12d
xor ebp,edi
add esi,DWORD[8+r13]
andn edi,eax,ecx
add esi,ebp
rorx r12d,eax,27
rorx ebp,eax,2
and eax,ebx
add esi,r12d
xor eax,edi
add edx,DWORD[12+r13]
lea edx,[rax*1+rdx]
rorx r12d,esi,27
rorx eax,esi,2
xor esi,ebp
add edx,r12d
xor esi,ebx
vpalignr ymm8,ymm3,ymm2,8
vpxor ymm4,ymm4,ymm0
add ecx,DWORD[32+r13]
lea ecx,[rsi*1+rcx]
vpxor ymm4,ymm4,ymm5
rorx r12d,edx,27
rorx esi,edx,2
xor edx,eax
vpxor ymm4,ymm4,ymm8
add ecx,r12d
xor edx,ebp
add ebx,DWORD[36+r13]
vpsrld ymm8,ymm4,30
vpslld ymm4,ymm4,2
lea ebx,[rdx*1+rbx]
rorx r12d,ecx,27
rorx edx,ecx,2
xor ecx,esi
add ebx,r12d
xor ecx,eax
vpor ymm4,ymm4,ymm8
add ebp,DWORD[40+r13]
lea ebp,[rbp*1+rcx]
rorx r12d,ebx,27
rorx ecx,ebx,2
vpaddd ymm9,ymm4,ymm11
xor ebx,edx
add ebp,r12d
xor ebx,esi
add eax,DWORD[44+r13]
vmovdqu YMMWORD[384+rsp],ymm9
lea eax,[rbx*1+rax]
rorx r12d,ebp,27
rorx ebx,ebp,2
xor ebp,ecx
add eax,r12d
xor ebp,edx
add esi,DWORD[64+r13]
lea esi,[rbp*1+rsi]
rorx r12d,eax,27
rorx ebp,eax,2
xor eax,ebx
add esi,r12d
xor eax,ecx
vpalignr ymm8,ymm4,ymm3,8
vpxor ymm5,ymm5,ymm1
add edx,DWORD[68+r13]
lea edx,[rax*1+rdx]
vpxor ymm5,ymm5,ymm6
rorx r12d,esi,27
rorx eax,esi,2
xor esi,ebp
vpxor ymm5,ymm5,ymm8
add edx,r12d
xor esi,ebx
add ecx,DWORD[72+r13]
vpsrld ymm8,ymm5,30
vpslld ymm5,ymm5,2
lea ecx,[rsi*1+rcx]
rorx r12d,edx,27
rorx esi,edx,2
xor edx,eax
add ecx,r12d
xor edx,ebp
vpor ymm5,ymm5,ymm8
add ebx,DWORD[76+r13]
lea ebx,[rdx*1+rbx]
rorx r12d,ecx,27
rorx edx,ecx,2
vpaddd ymm9,ymm5,ymm11
xor ecx,esi
add ebx,r12d
xor ecx,eax
add ebp,DWORD[96+r13]
vmovdqu YMMWORD[416+rsp],ymm9
lea ebp,[rbp*1+rcx]
rorx r12d,ebx,27
rorx ecx,ebx,2
xor ebx,edx
add ebp,r12d
xor ebx,esi
add eax,DWORD[100+r13]
lea eax,[rbx*1+rax]
rorx r12d,ebp,27
rorx ebx,ebp,2
xor ebp,ecx
add eax,r12d
xor ebp,edx
vpalignr ymm8,ymm5,ymm4,8
vpxor ymm6,ymm6,ymm2
add esi,DWORD[104+r13]
lea esi,[rbp*1+rsi]
vpxor ymm6,ymm6,ymm7
rorx r12d,eax,27
rorx ebp,eax,2
xor eax,ebx
vpxor ymm6,ymm6,ymm8
add esi,r12d
xor eax,ecx
add edx,DWORD[108+r13]
lea r13,[256+r13]
vpsrld ymm8,ymm6,30
vpslld ymm6,ymm6,2
lea edx,[rax*1+rdx]
rorx r12d,esi,27
rorx eax,esi,2
xor esi,ebp
add edx,r12d
xor esi,ebx
vpor ymm6,ymm6,ymm8
add ecx,DWORD[((-128))+r13]
lea ecx,[rsi*1+rcx]
rorx r12d,edx,27
rorx esi,edx,2
vpaddd ymm9,ymm6,ymm11
xor edx,eax
add ecx,r12d
xor edx,ebp
add ebx,DWORD[((-124))+r13]
vmovdqu YMMWORD[448+rsp],ymm9
lea ebx,[rdx*1+rbx]
rorx r12d,ecx,27
rorx edx,ecx,2
xor ecx,esi
add ebx,r12d
xor ecx,eax
add ebp,DWORD[((-120))+r13]
lea ebp,[rbp*1+rcx]
rorx r12d,ebx,27
rorx ecx,ebx,2
xor ebx,edx
add ebp,r12d
xor ebx,esi
vpalignr ymm8,ymm6,ymm5,8
vpxor ymm7,ymm7,ymm3
add eax,DWORD[((-116))+r13]
lea eax,[rbx*1+rax]
vpxor ymm7,ymm7,ymm0
vmovdqu ymm11,YMMWORD[32+r11]
rorx r12d,ebp,27
rorx ebx,ebp,2
xor ebp,ecx
vpxor ymm7,ymm7,ymm8
add eax,r12d
xor ebp,edx
add esi,DWORD[((-96))+r13]
vpsrld ymm8,ymm7,30
vpslld ymm7,ymm7,2
lea esi,[rbp*1+rsi]
rorx r12d,eax,27
rorx ebp,eax,2
xor eax,ebx
add esi,r12d
xor eax,ecx
vpor ymm7,ymm7,ymm8
add edx,DWORD[((-92))+r13]
lea edx,[rax*1+rdx]
rorx r12d,esi,27
rorx eax,esi,2
vpaddd ymm9,ymm7,ymm11
xor esi,ebp
add edx,r12d
xor esi,ebx
add ecx,DWORD[((-88))+r13]
vmovdqu YMMWORD[480+rsp],ymm9
lea ecx,[rsi*1+rcx]
rorx r12d,edx,27
rorx esi,edx,2
xor edx,eax
add ecx,r12d
xor edx,ebp
add ebx,DWORD[((-84))+r13]
mov edi,esi
xor edi,eax
lea ebx,[rdx*1+rbx]
rorx r12d,ecx,27
rorx edx,ecx,2
xor ecx,esi
add ebx,r12d
and ecx,edi
jmp NEAR $L$align32_2
ALIGN 32
$L$align32_2:
vpalignr ymm8,ymm7,ymm6,8
vpxor ymm0,ymm0,ymm4
add ebp,DWORD[((-64))+r13]
xor ecx,esi
vpxor ymm0,ymm0,ymm1
mov edi,edx
xor edi,esi
lea ebp,[rbp*1+rcx]
vpxor ymm0,ymm0,ymm8
rorx r12d,ebx,27
rorx ecx,ebx,2
xor ebx,edx
vpsrld ymm8,ymm0,30
vpslld ymm0,ymm0,2
add ebp,r12d
and ebx,edi
add eax,DWORD[((-60))+r13]
xor ebx,edx
mov edi,ecx
xor edi,edx
vpor ymm0,ymm0,ymm8
lea eax,[rbx*1+rax]
rorx r12d,ebp,27
rorx ebx,ebp,2
xor ebp,ecx
vpaddd ymm9,ymm0,ymm11
add eax,r12d
and ebp,edi
add esi,DWORD[((-56))+r13]
xor ebp,ecx
vmovdqu YMMWORD[512+rsp],ymm9
mov edi,ebx
xor edi,ecx
lea esi,[rbp*1+rsi]
rorx r12d,eax,27
rorx ebp,eax,2
xor eax,ebx
add esi,r12d
and eax,edi
add edx,DWORD[((-52))+r13]
xor eax,ebx
mov edi,ebp
xor edi,ebx
lea edx,[rax*1+rdx]
rorx r12d,esi,27
rorx eax,esi,2
xor esi,ebp
add edx,r12d
and esi,edi
add ecx,DWORD[((-32))+r13]
xor esi,ebp
mov edi,eax
xor edi,ebp
lea ecx,[rsi*1+rcx]
rorx r12d,edx,27
rorx esi,edx,2
xor edx,eax
add ecx,r12d
and edx,edi
vpalignr ymm8,ymm0,ymm7,8
vpxor ymm1,ymm1,ymm5
add ebx,DWORD[((-28))+r13]
xor edx,eax
vpxor ymm1,ymm1,ymm2
mov edi,esi
xor edi,eax
lea ebx,[rdx*1+rbx]
vpxor ymm1,ymm1,ymm8
rorx r12d,ecx,27
rorx edx,ecx,2
xor ecx,esi
vpsrld ymm8,ymm1,30
vpslld ymm1,ymm1,2
add ebx,r12d
and ecx,edi
add ebp,DWORD[((-24))+r13]
xor ecx,esi
mov edi,edx
xor edi,esi
vpor ymm1,ymm1,ymm8
lea ebp,[rbp*1+rcx]
rorx r12d,ebx,27
rorx ecx,ebx,2
xor ebx,edx
vpaddd ymm9,ymm1,ymm11
add ebp,r12d
and ebx,edi
add eax,DWORD[((-20))+r13]
xor ebx,edx
vmovdqu YMMWORD[544+rsp],ymm9
mov edi,ecx
xor edi,edx
lea eax,[rbx*1+rax]
rorx r12d,ebp,27
rorx ebx,ebp,2
xor ebp,ecx
add eax,r12d
and ebp,edi
add esi,DWORD[r13]
xor ebp,ecx
mov edi,ebx
xor edi,ecx
lea esi,[rbp*1+rsi]
rorx r12d,eax,27
rorx ebp,eax,2
xor eax,ebx
add esi,r12d
and eax,edi
add edx,DWORD[4+r13]
xor eax,ebx
mov edi,ebp
xor edi,ebx
lea edx,[rax*1+rdx]
rorx r12d,esi,27
rorx eax,esi,2
xor esi,ebp
add edx,r12d
and esi,edi
vpalignr ymm8,ymm1,ymm0,8
vpxor ymm2,ymm2,ymm6
add ecx,DWORD[8+r13]
xor esi,ebp
vpxor ymm2,ymm2,ymm3
mov edi,eax
xor edi,ebp
lea ecx,[rsi*1+rcx]
vpxor ymm2,ymm2,ymm8
rorx r12d,edx,27
rorx esi,edx,2
xor edx,eax
vpsrld ymm8,ymm2,30
vpslld ymm2,ymm2,2
add ecx,r12d
and edx,edi
add ebx,DWORD[12+r13]
xor edx,eax
mov edi,esi
xor edi,eax
vpor ymm2,ymm2,ymm8
lea ebx,[rdx*1+rbx]
rorx r12d,ecx,27
rorx edx,ecx,2
xor ecx,esi
vpaddd ymm9,ymm2,ymm11
add ebx,r12d
and ecx,edi
add ebp,DWORD[32+r13]
xor ecx,esi
vmovdqu YMMWORD[576+rsp],ymm9
mov edi,edx
xor edi,esi
lea ebp,[rbp*1+rcx]
rorx r12d,ebx,27
rorx ecx,ebx,2
xor ebx,edx
add ebp,r12d
and ebx,edi
add eax,DWORD[36+r13]
xor ebx,edx
mov edi,ecx
xor edi,edx
lea eax,[rbx*1+rax]
rorx r12d,ebp,27
rorx ebx,ebp,2
xor ebp,ecx
add eax,r12d
and ebp,edi
add esi,DWORD[40+r13]
xor ebp,ecx
mov edi,ebx
xor edi,ecx
lea esi,[rbp*1+rsi]
rorx r12d,eax,27
rorx ebp,eax,2
xor eax,ebx
add esi,r12d
and eax,edi
vpalignr ymm8,ymm2,ymm1,8
vpxor ymm3,ymm3,ymm7
add edx,DWORD[44+r13]
xor eax,ebx
vpxor ymm3,ymm3,ymm4
mov edi,ebp
xor edi,ebx
lea edx,[rax*1+rdx]
vpxor ymm3,ymm3,ymm8
rorx r12d,esi,27
rorx eax,esi,2
xor esi,ebp
vpsrld ymm8,ymm3,30
vpslld ymm3,ymm3,2
add edx,r12d
and esi,edi
add ecx,DWORD[64+r13]
xor esi,ebp
mov edi,eax
xor edi,ebp
vpor ymm3,ymm3,ymm8
lea ecx,[rsi*1+rcx]
rorx r12d,edx,27
rorx esi,edx,2
xor edx,eax
vpaddd ymm9,ymm3,ymm11
add ecx,r12d
and edx,edi
add ebx,DWORD[68+r13]
xor edx,eax
vmovdqu YMMWORD[608+rsp],ymm9
mov edi,esi
xor edi,eax
lea ebx,[rdx*1+rbx]
rorx r12d,ecx,27
rorx edx,ecx,2
xor ecx,esi
add ebx,r12d
and ecx,edi
add ebp,DWORD[72+r13]
xor ecx,esi
mov edi,edx
xor edi,esi
lea ebp,[rbp*1+rcx]
rorx r12d,ebx,27
rorx ecx,ebx,2
xor ebx,edx
add ebp,r12d
and ebx,edi
add eax,DWORD[76+r13]
xor ebx,edx
lea eax,[rbx*1+rax]
rorx r12d,ebp,27
rorx ebx,ebp,2
xor ebp,ecx
add eax,r12d
xor ebp,edx
add esi,DWORD[96+r13]
lea esi,[rbp*1+rsi]
rorx r12d,eax,27
rorx ebp,eax,2
xor eax,ebx
add esi,r12d
xor eax,ecx
add edx,DWORD[100+r13]
lea edx,[rax*1+rdx]
rorx r12d,esi,27
rorx eax,esi,2
xor esi,ebp
add edx,r12d
xor esi,ebx
add ecx,DWORD[104+r13]
lea ecx,[rsi*1+rcx]
rorx r12d,edx,27
rorx esi,edx,2
xor edx,eax
add ecx,r12d
xor edx,ebp
add ebx,DWORD[108+r13]
lea r13,[256+r13]
lea ebx,[rdx*1+rbx]
rorx r12d,ecx,27
rorx edx,ecx,2
xor ecx,esi
add ebx,r12d
xor ecx,eax
add ebp,DWORD[((-128))+r13]
lea ebp,[rbp*1+rcx]
rorx r12d,ebx,27
rorx ecx,ebx,2
xor ebx,edx
add ebp,r12d
xor ebx,esi
add eax,DWORD[((-124))+r13]
lea eax,[rbx*1+rax]
rorx r12d,ebp,27
rorx ebx,ebp,2
xor ebp,ecx
add eax,r12d
xor ebp,edx
add esi,DWORD[((-120))+r13]
lea esi,[rbp*1+rsi]
rorx r12d,eax,27
rorx ebp,eax,2
xor eax,ebx
add esi,r12d
xor eax,ecx
add edx,DWORD[((-116))+r13]
lea edx,[rax*1+rdx]
rorx r12d,esi,27
rorx eax,esi,2
xor esi,ebp
add edx,r12d
xor esi,ebx
add ecx,DWORD[((-96))+r13]
lea ecx,[rsi*1+rcx]
rorx r12d,edx,27
rorx esi,edx,2
xor edx,eax
add ecx,r12d
xor edx,ebp
add ebx,DWORD[((-92))+r13]
lea ebx,[rdx*1+rbx]
rorx r12d,ecx,27
rorx edx,ecx,2
xor ecx,esi
add ebx,r12d
xor ecx,eax
add ebp,DWORD[((-88))+r13]
lea ebp,[rbp*1+rcx]
rorx r12d,ebx,27
rorx ecx,ebx,2
xor ebx,edx
add ebp,r12d
xor ebx,esi
add eax,DWORD[((-84))+r13]
lea eax,[rbx*1+rax]
rorx r12d,ebp,27
rorx ebx,ebp,2
xor ebp,ecx
add eax,r12d
xor ebp,edx
add esi,DWORD[((-64))+r13]
lea esi,[rbp*1+rsi]
rorx r12d,eax,27
rorx ebp,eax,2
xor eax,ebx
add esi,r12d
xor eax,ecx
add edx,DWORD[((-60))+r13]
lea edx,[rax*1+rdx]
rorx r12d,esi,27
rorx eax,esi,2
xor esi,ebp
add edx,r12d
xor esi,ebx
add ecx,DWORD[((-56))+r13]
lea ecx,[rsi*1+rcx]
rorx r12d,edx,27
rorx esi,edx,2
xor edx,eax
add ecx,r12d
xor edx,ebp
add ebx,DWORD[((-52))+r13]
lea ebx,[rdx*1+rbx]
rorx r12d,ecx,27
rorx edx,ecx,2
xor ecx,esi
add ebx,r12d
xor ecx,eax
add ebp,DWORD[((-32))+r13]
lea ebp,[rbp*1+rcx]
rorx r12d,ebx,27
rorx ecx,ebx,2
xor ebx,edx
add ebp,r12d
xor ebx,esi
add eax,DWORD[((-28))+r13]
lea eax,[rbx*1+rax]
rorx r12d,ebp,27
rorx ebx,ebp,2
xor ebp,ecx
add eax,r12d
xor ebp,edx
add esi,DWORD[((-24))+r13]
lea esi,[rbp*1+rsi]
rorx r12d,eax,27
rorx ebp,eax,2
xor eax,ebx
add esi,r12d
xor eax,ecx
add edx,DWORD[((-20))+r13]
lea edx,[rax*1+rdx]
rorx r12d,esi,27
add edx,r12d
lea r13,[128+r9]
lea rdi,[128+r9]
cmp r13,r10
cmovae r13,r9
add edx,DWORD[r8]
add esi,DWORD[4+r8]
add ebp,DWORD[8+r8]
mov DWORD[r8],edx
add ebx,DWORD[12+r8]
mov DWORD[4+r8],esi
mov eax,edx
add ecx,DWORD[16+r8]
mov r12d,ebp
mov DWORD[8+r8],ebp
mov edx,ebx
mov DWORD[12+r8],ebx
mov ebp,esi
mov DWORD[16+r8],ecx
mov esi,ecx
mov ecx,r12d
cmp r9,r10
je NEAR $L$done_avx2
vmovdqu ymm6,YMMWORD[64+r11]
cmp rdi,r10
ja NEAR $L$ast_avx2
vmovdqu xmm0,XMMWORD[((-64))+rdi]
vmovdqu xmm1,XMMWORD[((-48))+rdi]
vmovdqu xmm2,XMMWORD[((-32))+rdi]
vmovdqu xmm3,XMMWORD[((-16))+rdi]
vinserti128 ymm0,ymm0,XMMWORD[r13],1
vinserti128 ymm1,ymm1,XMMWORD[16+r13],1
vinserti128 ymm2,ymm2,XMMWORD[32+r13],1
vinserti128 ymm3,ymm3,XMMWORD[48+r13],1
jmp NEAR $L$ast_avx2
ALIGN 32
$L$ast_avx2:
lea r13,[((128+16))+rsp]
rorx ebx,ebp,2
andn edi,ebp,edx
and ebp,ecx
xor ebp,edi
sub r9,-128
add esi,DWORD[((-128))+r13]
andn edi,eax,ecx
add esi,ebp
rorx r12d,eax,27
rorx ebp,eax,2
and eax,ebx
add esi,r12d
xor eax,edi
add edx,DWORD[((-124))+r13]
andn edi,esi,ebx
add edx,eax
rorx r12d,esi,27
rorx eax,esi,2
and esi,ebp
add edx,r12d
xor esi,edi
add ecx,DWORD[((-120))+r13]
andn edi,edx,ebp
add ecx,esi
rorx r12d,edx,27
rorx esi,edx,2
and edx,eax
add ecx,r12d
xor edx,edi
add ebx,DWORD[((-116))+r13]
andn edi,ecx,eax
add ebx,edx
rorx r12d,ecx,27
rorx edx,ecx,2
and ecx,esi
add ebx,r12d
xor ecx,edi
add ebp,DWORD[((-96))+r13]
andn edi,ebx,esi
add ebp,ecx
rorx r12d,ebx,27
rorx ecx,ebx,2
and ebx,edx
add ebp,r12d
xor ebx,edi
add eax,DWORD[((-92))+r13]
andn edi,ebp,edx
add eax,ebx
rorx r12d,ebp,27
rorx ebx,ebp,2
and ebp,ecx
add eax,r12d
xor ebp,edi
add esi,DWORD[((-88))+r13]
andn edi,eax,ecx
add esi,ebp
rorx r12d,eax,27
rorx ebp,eax,2
and eax,ebx
add esi,r12d
xor eax,edi
add edx,DWORD[((-84))+r13]
andn edi,esi,ebx
add edx,eax
rorx r12d,esi,27
rorx eax,esi,2
and esi,ebp
add edx,r12d
xor esi,edi
add ecx,DWORD[((-64))+r13]
andn edi,edx,ebp
add ecx,esi
rorx r12d,edx,27
rorx esi,edx,2
and edx,eax
add ecx,r12d
xor edx,edi
add ebx,DWORD[((-60))+r13]
andn edi,ecx,eax
add ebx,edx
rorx r12d,ecx,27
rorx edx,ecx,2
and ecx,esi
add ebx,r12d
xor ecx,edi
add ebp,DWORD[((-56))+r13]
andn edi,ebx,esi
add ebp,ecx
rorx r12d,ebx,27
rorx ecx,ebx,2
and ebx,edx
add ebp,r12d
xor ebx,edi
add eax,DWORD[((-52))+r13]
andn edi,ebp,edx
add eax,ebx
rorx r12d,ebp,27
rorx ebx,ebp,2
and ebp,ecx
add eax,r12d
xor ebp,edi
add esi,DWORD[((-32))+r13]
andn edi,eax,ecx
add esi,ebp
rorx r12d,eax,27
rorx ebp,eax,2
and eax,ebx
add esi,r12d
xor eax,edi
add edx,DWORD[((-28))+r13]
andn edi,esi,ebx
add edx,eax
rorx r12d,esi,27
rorx eax,esi,2
and esi,ebp
add edx,r12d
xor esi,edi
add ecx,DWORD[((-24))+r13]
andn edi,edx,ebp
add ecx,esi
rorx r12d,edx,27
rorx esi,edx,2
and edx,eax
add ecx,r12d
xor edx,edi
add ebx,DWORD[((-20))+r13]
andn edi,ecx,eax
add ebx,edx
rorx r12d,ecx,27
rorx edx,ecx,2
and ecx,esi
add ebx,r12d
xor ecx,edi
add ebp,DWORD[r13]
andn edi,ebx,esi
add ebp,ecx
rorx r12d,ebx,27
rorx ecx,ebx,2
and ebx,edx
add ebp,r12d
xor ebx,edi
add eax,DWORD[4+r13]
andn edi,ebp,edx
add eax,ebx
rorx r12d,ebp,27
rorx ebx,ebp,2
and ebp,ecx
add eax,r12d
xor ebp,edi
add esi,DWORD[8+r13]
andn edi,eax,ecx
add esi,ebp
rorx r12d,eax,27
rorx ebp,eax,2
and eax,ebx
add esi,r12d
xor eax,edi
add edx,DWORD[12+r13]
lea edx,[rax*1+rdx]
rorx r12d,esi,27
rorx eax,esi,2
xor esi,ebp
add edx,r12d
xor esi,ebx
add ecx,DWORD[32+r13]
lea ecx,[rsi*1+rcx]
rorx r12d,edx,27
rorx esi,edx,2
xor edx,eax
add ecx,r12d
xor edx,ebp
add ebx,DWORD[36+r13]
lea ebx,[rdx*1+rbx]
rorx r12d,ecx,27
rorx edx,ecx,2
xor ecx,esi
add ebx,r12d
xor ecx,eax
add ebp,DWORD[40+r13]
lea ebp,[rbp*1+rcx]
rorx r12d,ebx,27
rorx ecx,ebx,2
xor ebx,edx
add ebp,r12d
xor ebx,esi
add eax,DWORD[44+r13]
lea eax,[rbx*1+rax]
rorx r12d,ebp,27
rorx ebx,ebp,2
xor ebp,ecx
add eax,r12d
xor ebp,edx
add esi,DWORD[64+r13]
lea esi,[rbp*1+rsi]
rorx r12d,eax,27
rorx ebp,eax,2
xor eax,ebx
add esi,r12d
xor eax,ecx
vmovdqu ymm11,YMMWORD[((-64))+r11]
vpshufb ymm0,ymm0,ymm6
add edx,DWORD[68+r13]
lea edx,[rax*1+rdx]
rorx r12d,esi,27
rorx eax,esi,2
xor esi,ebp
add edx,r12d
xor esi,ebx
add ecx,DWORD[72+r13]
lea ecx,[rsi*1+rcx]
rorx r12d,edx,27
rorx esi,edx,2
xor edx,eax
add ecx,r12d
xor edx,ebp
add ebx,DWORD[76+r13]
lea ebx,[rdx*1+rbx]
rorx r12d,ecx,27
rorx edx,ecx,2
xor ecx,esi
add ebx,r12d
xor ecx,eax
add ebp,DWORD[96+r13]
lea ebp,[rbp*1+rcx]
rorx r12d,ebx,27
rorx ecx,ebx,2
xor ebx,edx
add ebp,r12d
xor ebx,esi
add eax,DWORD[100+r13]
lea eax,[rbx*1+rax]
rorx r12d,ebp,27
rorx ebx,ebp,2
xor ebp,ecx
add eax,r12d
xor ebp,edx
vpshufb ymm1,ymm1,ymm6
vpaddd ymm8,ymm0,ymm11
add esi,DWORD[104+r13]
lea esi,[rbp*1+rsi]
rorx r12d,eax,27
rorx ebp,eax,2
xor eax,ebx
add esi,r12d
xor eax,ecx
add edx,DWORD[108+r13]
lea r13,[256+r13]
lea edx,[rax*1+rdx]
rorx r12d,esi,27
rorx eax,esi,2
xor esi,ebp
add edx,r12d
xor esi,ebx
add ecx,DWORD[((-128))+r13]
lea ecx,[rsi*1+rcx]
rorx r12d,edx,27
rorx esi,edx,2
xor edx,eax
add ecx,r12d
xor edx,ebp
add ebx,DWORD[((-124))+r13]
lea ebx,[rdx*1+rbx]
rorx r12d,ecx,27
rorx edx,ecx,2
xor ecx,esi
add ebx,r12d
xor ecx,eax
add ebp,DWORD[((-120))+r13]
lea ebp,[rbp*1+rcx]
rorx r12d,ebx,27
rorx ecx,ebx,2
xor ebx,edx
add ebp,r12d
xor ebx,esi
vmovdqu YMMWORD[rsp],ymm8
vpshufb ymm2,ymm2,ymm6
vpaddd ymm9,ymm1,ymm11
add eax,DWORD[((-116))+r13]
lea eax,[rbx*1+rax]
rorx r12d,ebp,27
rorx ebx,ebp,2
xor ebp,ecx
add eax,r12d
xor ebp,edx
add esi,DWORD[((-96))+r13]
lea esi,[rbp*1+rsi]
rorx r12d,eax,27
rorx ebp,eax,2
xor eax,ebx
add esi,r12d
xor eax,ecx
add edx,DWORD[((-92))+r13]
lea edx,[rax*1+rdx]
rorx r12d,esi,27
rorx eax,esi,2
xor esi,ebp
add edx,r12d
xor esi,ebx
add ecx,DWORD[((-88))+r13]
lea ecx,[rsi*1+rcx]
rorx r12d,edx,27
rorx esi,edx,2
xor edx,eax
add ecx,r12d
xor edx,ebp
add ebx,DWORD[((-84))+r13]
mov edi,esi
xor edi,eax
lea ebx,[rdx*1+rbx]
rorx r12d,ecx,27
rorx edx,ecx,2
xor ecx,esi
add ebx,r12d
and ecx,edi
vmovdqu YMMWORD[32+rsp],ymm9
vpshufb ymm3,ymm3,ymm6
vpaddd ymm6,ymm2,ymm11
add ebp,DWORD[((-64))+r13]
xor ecx,esi
mov edi,edx
xor edi,esi
lea ebp,[rbp*1+rcx]
rorx r12d,ebx,27
rorx ecx,ebx,2
xor ebx,edx
add ebp,r12d
and ebx,edi
add eax,DWORD[((-60))+r13]
xor ebx,edx
mov edi,ecx
xor edi,edx
lea eax,[rbx*1+rax]
rorx r12d,ebp,27
rorx ebx,ebp,2
xor ebp,ecx
add eax,r12d
and ebp,edi
add esi,DWORD[((-56))+r13]
xor ebp,ecx
mov edi,ebx
xor edi,ecx
lea esi,[rbp*1+rsi]
rorx r12d,eax,27
rorx ebp,eax,2
xor eax,ebx
add esi,r12d
and eax,edi
add edx,DWORD[((-52))+r13]
xor eax,ebx
mov edi,ebp
xor edi,ebx
lea edx,[rax*1+rdx]
rorx r12d,esi,27
rorx eax,esi,2
xor esi,ebp
add edx,r12d
and esi,edi
add ecx,DWORD[((-32))+r13]
xor esi,ebp
mov edi,eax
xor edi,ebp
lea ecx,[rsi*1+rcx]
rorx r12d,edx,27
rorx esi,edx,2
xor edx,eax
add ecx,r12d
and edx,edi
jmp NEAR $L$align32_3
ALIGN 32
$L$align32_3:
vmovdqu YMMWORD[64+rsp],ymm6
vpaddd ymm7,ymm3,ymm11
add ebx,DWORD[((-28))+r13]
xor edx,eax
mov edi,esi
xor edi,eax
lea ebx,[rdx*1+rbx]
rorx r12d,ecx,27
rorx edx,ecx,2
xor ecx,esi
add ebx,r12d
and ecx,edi
add ebp,DWORD[((-24))+r13]
xor ecx,esi
mov edi,edx
xor edi,esi
lea ebp,[rbp*1+rcx]
rorx r12d,ebx,27
rorx ecx,ebx,2
xor ebx,edx
add ebp,r12d
and ebx,edi
add eax,DWORD[((-20))+r13]
xor ebx,edx
mov edi,ecx
xor edi,edx
lea eax,[rbx*1+rax]
rorx r12d,ebp,27
rorx ebx,ebp,2
xor ebp,ecx
add eax,r12d
and ebp,edi
add esi,DWORD[r13]
xor ebp,ecx
mov edi,ebx
xor edi,ecx
lea esi,[rbp*1+rsi]
rorx r12d,eax,27
rorx ebp,eax,2
xor eax,ebx
add esi,r12d
and eax,edi
add edx,DWORD[4+r13]
xor eax,ebx
mov edi,ebp
xor edi,ebx
lea edx,[rax*1+rdx]
rorx r12d,esi,27
rorx eax,esi,2
xor esi,ebp
add edx,r12d
and esi,edi
vmovdqu YMMWORD[96+rsp],ymm7
add ecx,DWORD[8+r13]
xor esi,ebp
mov edi,eax
xor edi,ebp
lea ecx,[rsi*1+rcx]
rorx r12d,edx,27
rorx esi,edx,2
xor edx,eax
add ecx,r12d
and edx,edi
add ebx,DWORD[12+r13]
xor edx,eax
mov edi,esi
xor edi,eax
lea ebx,[rdx*1+rbx]
rorx r12d,ecx,27
rorx edx,ecx,2
xor ecx,esi
add ebx,r12d
and ecx,edi
add ebp,DWORD[32+r13]
xor ecx,esi
mov edi,edx
xor edi,esi
lea ebp,[rbp*1+rcx]
rorx r12d,ebx,27
rorx ecx,ebx,2
xor ebx,edx
add ebp,r12d
and ebx,edi
add eax,DWORD[36+r13]
xor ebx,edx
mov edi,ecx
xor edi,edx
lea eax,[rbx*1+rax]
rorx r12d,ebp,27
rorx ebx,ebp,2
xor ebp,ecx
add eax,r12d
and ebp,edi
add esi,DWORD[40+r13]
xor ebp,ecx
mov edi,ebx
xor edi,ecx
lea esi,[rbp*1+rsi]
rorx r12d,eax,27
rorx ebp,eax,2
xor eax,ebx
add esi,r12d
and eax,edi
vpalignr ymm4,ymm1,ymm0,8
add edx,DWORD[44+r13]
xor eax,ebx
mov edi,ebp
xor edi,ebx
vpsrldq ymm8,ymm3,4
lea edx,[rax*1+rdx]
rorx r12d,esi,27
rorx eax,esi,2
vpxor ymm4,ymm4,ymm0
vpxor ymm8,ymm8,ymm2
xor esi,ebp
add edx,r12d
vpxor ymm4,ymm4,ymm8
and esi,edi
add ecx,DWORD[64+r13]
xor esi,ebp
mov edi,eax
vpsrld ymm8,ymm4,31
xor edi,ebp
lea ecx,[rsi*1+rcx]
rorx r12d,edx,27
vpslldq ymm10,ymm4,12
vpaddd ymm4,ymm4,ymm4
rorx esi,edx,2
xor edx,eax
vpsrld ymm9,ymm10,30
vpor ymm4,ymm4,ymm8
add ecx,r12d
and edx,edi
vpslld ymm10,ymm10,2
vpxor ymm4,ymm4,ymm9
add ebx,DWORD[68+r13]
xor edx,eax
vpxor ymm4,ymm4,ymm10
mov edi,esi
xor edi,eax
lea ebx,[rdx*1+rbx]
vpaddd ymm9,ymm4,ymm11
rorx r12d,ecx,27
rorx edx,ecx,2
xor ecx,esi
vmovdqu YMMWORD[128+rsp],ymm9
add ebx,r12d
and ecx,edi
add ebp,DWORD[72+r13]
xor ecx,esi
mov edi,edx
xor edi,esi
lea ebp,[rbp*1+rcx]
rorx r12d,ebx,27
rorx ecx,ebx,2
xor ebx,edx
add ebp,r12d
and ebx,edi
add eax,DWORD[76+r13]
xor ebx,edx
lea eax,[rbx*1+rax]
rorx r12d,ebp,27
rorx ebx,ebp,2
xor ebp,ecx
add eax,r12d
xor ebp,edx
vpalignr ymm5,ymm2,ymm1,8
add esi,DWORD[96+r13]
lea esi,[rbp*1+rsi]
rorx r12d,eax,27
rorx ebp,eax,2
vpsrldq ymm8,ymm4,4
xor eax,ebx
add esi,r12d
xor eax,ecx
vpxor ymm5,ymm5,ymm1
vpxor ymm8,ymm8,ymm3
add edx,DWORD[100+r13]
lea edx,[rax*1+rdx]
vpxor ymm5,ymm5,ymm8
rorx r12d,esi,27
rorx eax,esi,2
xor esi,ebp
add edx,r12d
vpsrld ymm8,ymm5,31
vmovdqu ymm11,YMMWORD[((-32))+r11]
xor esi,ebx
add ecx,DWORD[104+r13]
lea ecx,[rsi*1+rcx]
vpslldq ymm10,ymm5,12
vpaddd ymm5,ymm5,ymm5
rorx r12d,edx,27
rorx esi,edx,2
vpsrld ymm9,ymm10,30
vpor ymm5,ymm5,ymm8
xor edx,eax
add ecx,r12d
vpslld ymm10,ymm10,2
vpxor ymm5,ymm5,ymm9
xor edx,ebp
add ebx,DWORD[108+r13]
lea r13,[256+r13]
vpxor ymm5,ymm5,ymm10
lea ebx,[rdx*1+rbx]
rorx r12d,ecx,27
rorx edx,ecx,2
vpaddd ymm9,ymm5,ymm11
xor ecx,esi
add ebx,r12d
xor ecx,eax
vmovdqu YMMWORD[160+rsp],ymm9
add ebp,DWORD[((-128))+r13]
lea ebp,[rbp*1+rcx]
rorx r12d,ebx,27
rorx ecx,ebx,2
xor ebx,edx
add ebp,r12d
xor ebx,esi
vpalignr ymm6,ymm3,ymm2,8
add eax,DWORD[((-124))+r13]
lea eax,[rbx*1+rax]
rorx r12d,ebp,27
rorx ebx,ebp,2
vpsrldq ymm8,ymm5,4
xor ebp,ecx
add eax,r12d
xor ebp,edx
vpxor ymm6,ymm6,ymm2
vpxor ymm8,ymm8,ymm4
add esi,DWORD[((-120))+r13]
lea esi,[rbp*1+rsi]
vpxor ymm6,ymm6,ymm8
rorx r12d,eax,27
rorx ebp,eax,2
xor eax,ebx
add esi,r12d
vpsrld ymm8,ymm6,31
xor eax,ecx
add edx,DWORD[((-116))+r13]
lea edx,[rax*1+rdx]
vpslldq ymm10,ymm6,12
vpaddd ymm6,ymm6,ymm6
rorx r12d,esi,27
rorx eax,esi,2
vpsrld ymm9,ymm10,30
vpor ymm6,ymm6,ymm8
xor esi,ebp
add edx,r12d
vpslld ymm10,ymm10,2
vpxor ymm6,ymm6,ymm9
xor esi,ebx
add ecx,DWORD[((-96))+r13]
vpxor ymm6,ymm6,ymm10
lea ecx,[rsi*1+rcx]
rorx r12d,edx,27
rorx esi,edx,2
vpaddd ymm9,ymm6,ymm11
xor edx,eax
add ecx,r12d
xor edx,ebp
vmovdqu YMMWORD[192+rsp],ymm9
add ebx,DWORD[((-92))+r13]
lea ebx,[rdx*1+rbx]
rorx r12d,ecx,27
rorx edx,ecx,2
xor ecx,esi
add ebx,r12d
xor ecx,eax
vpalignr ymm7,ymm4,ymm3,8
add ebp,DWORD[((-88))+r13]
lea ebp,[rbp*1+rcx]
rorx r12d,ebx,27
rorx ecx,ebx,2
vpsrldq ymm8,ymm6,4
xor ebx,edx
add ebp,r12d
xor ebx,esi
vpxor ymm7,ymm7,ymm3
vpxor ymm8,ymm8,ymm5
add eax,DWORD[((-84))+r13]
lea eax,[rbx*1+rax]
vpxor ymm7,ymm7,ymm8
rorx r12d,ebp,27
rorx ebx,ebp,2
xor ebp,ecx
add eax,r12d
vpsrld ymm8,ymm7,31
xor ebp,edx
add esi,DWORD[((-64))+r13]
lea esi,[rbp*1+rsi]
vpslldq ymm10,ymm7,12
vpaddd ymm7,ymm7,ymm7
rorx r12d,eax,27
rorx ebp,eax,2
vpsrld ymm9,ymm10,30
vpor ymm7,ymm7,ymm8
xor eax,ebx
add esi,r12d
vpslld ymm10,ymm10,2
vpxor ymm7,ymm7,ymm9
xor eax,ecx
add edx,DWORD[((-60))+r13]
vpxor ymm7,ymm7,ymm10
lea edx,[rax*1+rdx]
rorx r12d,esi,27
rorx eax,esi,2
vpaddd ymm9,ymm7,ymm11
xor esi,ebp
add edx,r12d
xor esi,ebx
vmovdqu YMMWORD[224+rsp],ymm9
add ecx,DWORD[((-56))+r13]
lea ecx,[rsi*1+rcx]
rorx r12d,edx,27
rorx esi,edx,2
xor edx,eax
add ecx,r12d
xor edx,ebp
add ebx,DWORD[((-52))+r13]
lea ebx,[rdx*1+rbx]
rorx r12d,ecx,27
rorx edx,ecx,2
xor ecx,esi
add ebx,r12d
xor ecx,eax
add ebp,DWORD[((-32))+r13]
lea ebp,[rbp*1+rcx]
rorx r12d,ebx,27
rorx ecx,ebx,2
xor ebx,edx
add ebp,r12d
xor ebx,esi
add eax,DWORD[((-28))+r13]
lea eax,[rbx*1+rax]
rorx r12d,ebp,27
rorx ebx,ebp,2
xor ebp,ecx
add eax,r12d
xor ebp,edx
add esi,DWORD[((-24))+r13]
lea esi,[rbp*1+rsi]
rorx r12d,eax,27
rorx ebp,eax,2
xor eax,ebx
add esi,r12d
xor eax,ecx
add edx,DWORD[((-20))+r13]
lea edx,[rax*1+rdx]
rorx r12d,esi,27
add edx,r12d
lea r13,[128+rsp]
add edx,DWORD[r8]
add esi,DWORD[4+r8]
add ebp,DWORD[8+r8]
mov DWORD[r8],edx
add ebx,DWORD[12+r8]
mov DWORD[4+r8],esi
mov eax,edx
add ecx,DWORD[16+r8]
mov r12d,ebp
mov DWORD[8+r8],ebp
mov edx,ebx
mov DWORD[12+r8],ebx
mov ebp,esi
mov DWORD[16+r8],ecx
mov esi,ecx
mov ecx,r12d
cmp r9,r10
jbe NEAR $L$oop_avx2
$L$done_avx2:
vzeroupper
movaps xmm6,XMMWORD[((-40-96))+r14]
movaps xmm7,XMMWORD[((-40-80))+r14]
movaps xmm8,XMMWORD[((-40-64))+r14]
movaps xmm9,XMMWORD[((-40-48))+r14]
movaps xmm10,XMMWORD[((-40-32))+r14]
movaps xmm11,XMMWORD[((-40-16))+r14]
lea rsi,[r14]
mov r14,QWORD[((-40))+rsi]
mov r13,QWORD[((-32))+rsi]
mov r12,QWORD[((-24))+rsi]
mov rbp,QWORD[((-16))+rsi]
mov rbx,QWORD[((-8))+rsi]
lea rsp,[rsi]
$L$epilogue_avx2:
mov rdi,QWORD[8+rsp] ;WIN64 epilogue
mov rsi,QWORD[16+rsp]
DB 0F3h,0C3h ;repret
$L$SEH_end_sha1_block_data_order_avx2:
ALIGN 64
K_XX_XX:
DD 0x5a827999,0x5a827999,0x5a827999,0x5a827999
DD 0x5a827999,0x5a827999,0x5a827999,0x5a827999
DD 0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1
DD 0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1
DD 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc
DD 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc
DD 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6
DD 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6
DD 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
DD 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
DB 0xf,0xe,0xd,0xc,0xb,0xa,0x9,0x8,0x7,0x6,0x5,0x4,0x3,0x2,0x1,0x0
DB 83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115
DB 102,111,114,109,32,102,111,114,32,120,56,54,95,54,52,44
DB 32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60
DB 97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114
DB 103,62,0
ALIGN 64
EXTERN __imp_RtlVirtualUnwind
ALIGN 16
se_handler:
push rsi
push rdi
push rbx
push rbp
push r12
push r13
push r14
push r15
pushfq
sub rsp,64
mov rax,QWORD[120+r8]
mov rbx,QWORD[248+r8]
lea r10,[$L$prologue]
cmp rbx,r10
jb NEAR $L$common_seh_tail
mov rax,QWORD[152+r8]
lea r10,[$L$epilogue]
cmp rbx,r10
jae NEAR $L$common_seh_tail
mov rax,QWORD[64+rax]
mov rbx,QWORD[((-8))+rax]
mov rbp,QWORD[((-16))+rax]
mov r12,QWORD[((-24))+rax]
mov r13,QWORD[((-32))+rax]
mov r14,QWORD[((-40))+rax]
mov QWORD[144+r8],rbx
mov QWORD[160+r8],rbp
mov QWORD[216+r8],r12
mov QWORD[224+r8],r13
mov QWORD[232+r8],r14
jmp NEAR $L$common_seh_tail
ALIGN 16
shaext_handler:
push rsi
push rdi
push rbx
push rbp
push r12
push r13
push r14
push r15
pushfq
sub rsp,64
mov rax,QWORD[120+r8]
mov rbx,QWORD[248+r8]
lea r10,[$L$prologue_shaext]
cmp rbx,r10
jb NEAR $L$common_seh_tail
lea r10,[$L$epilogue_shaext]
cmp rbx,r10
jae NEAR $L$common_seh_tail
lea rsi,[((-8-64))+rax]
lea rdi,[512+r8]
mov ecx,8
DD 0xa548f3fc
jmp NEAR $L$common_seh_tail
ALIGN 16
ssse3_handler:
push rsi
push rdi
push rbx
push rbp
push r12
push r13
push r14
push r15
pushfq
sub rsp,64
mov rax,QWORD[120+r8]
mov rbx,QWORD[248+r8]
mov rsi,QWORD[8+r9]
mov r11,QWORD[56+r9]
mov r10d,DWORD[r11]
lea r10,[r10*1+rsi]
cmp rbx,r10
jb NEAR $L$common_seh_tail
mov rax,QWORD[152+r8]
mov r10d,DWORD[4+r11]
lea r10,[r10*1+rsi]
cmp rbx,r10
jae NEAR $L$common_seh_tail
mov rax,QWORD[232+r8]
lea rsi,[((-40-96))+rax]
lea rdi,[512+r8]
mov ecx,12
DD 0xa548f3fc
mov rbx,QWORD[((-8))+rax]
mov rbp,QWORD[((-16))+rax]
mov r12,QWORD[((-24))+rax]
mov r13,QWORD[((-32))+rax]
mov r14,QWORD[((-40))+rax]
mov QWORD[144+r8],rbx
mov QWORD[160+r8],rbp
mov QWORD[216+r8],r12
mov QWORD[224+r8],r13
mov QWORD[232+r8],r14
$L$common_seh_tail:
mov rdi,QWORD[8+rax]
mov rsi,QWORD[16+rax]
mov QWORD[152+r8],rax
mov QWORD[168+r8],rsi
mov QWORD[176+r8],rdi
mov rdi,QWORD[40+r9]
mov rsi,r8
mov ecx,154
DD 0xa548f3fc
mov rsi,r9
xor rcx,rcx
mov rdx,QWORD[8+rsi]
mov r8,QWORD[rsi]
mov r9,QWORD[16+rsi]
mov r10,QWORD[40+rsi]
lea r11,[56+rsi]
lea r12,[24+rsi]
mov QWORD[32+rsp],r10
mov QWORD[40+rsp],r11
mov QWORD[48+rsp],r12
mov QWORD[56+rsp],rcx
call QWORD[__imp_RtlVirtualUnwind]
mov eax,1
add rsp,64
popfq
pop r15
pop r14
pop r13
pop r12
pop rbp
pop rbx
pop rdi
pop rsi
DB 0F3h,0C3h ;repret
section .pdata rdata align=4
ALIGN 4
DD $L$SEH_begin_sha1_block_data_order wrt ..imagebase
DD $L$SEH_end_sha1_block_data_order wrt ..imagebase
DD $L$SEH_info_sha1_block_data_order wrt ..imagebase
DD $L$SEH_begin_sha1_block_data_order_shaext wrt ..imagebase
DD $L$SEH_end_sha1_block_data_order_shaext wrt ..imagebase
DD $L$SEH_info_sha1_block_data_order_shaext wrt ..imagebase
DD $L$SEH_begin_sha1_block_data_order_ssse3 wrt ..imagebase
DD $L$SEH_end_sha1_block_data_order_ssse3 wrt ..imagebase
DD $L$SEH_info_sha1_block_data_order_ssse3 wrt ..imagebase
DD $L$SEH_begin_sha1_block_data_order_avx wrt ..imagebase
DD $L$SEH_end_sha1_block_data_order_avx wrt ..imagebase
DD $L$SEH_info_sha1_block_data_order_avx wrt ..imagebase
DD $L$SEH_begin_sha1_block_data_order_avx2 wrt ..imagebase
DD $L$SEH_end_sha1_block_data_order_avx2 wrt ..imagebase
DD $L$SEH_info_sha1_block_data_order_avx2 wrt ..imagebase
section .xdata rdata align=8
ALIGN 8
$L$SEH_info_sha1_block_data_order:
DB 9,0,0,0
DD se_handler wrt ..imagebase
$L$SEH_info_sha1_block_data_order_shaext:
DB 9,0,0,0
DD shaext_handler wrt ..imagebase
$L$SEH_info_sha1_block_data_order_ssse3:
DB 9,0,0,0
DD ssse3_handler wrt ..imagebase
DD $L$prologue_ssse3 wrt ..imagebase,$L$epilogue_ssse3 wrt ..imagebase
$L$SEH_info_sha1_block_data_order_avx:
DB 9,0,0,0
DD ssse3_handler wrt ..imagebase
DD $L$prologue_avx wrt ..imagebase,$L$epilogue_avx wrt ..imagebase
$L$SEH_info_sha1_block_data_order_avx2:
DB 9,0,0,0
DD ssse3_handler wrt ..imagebase
DD $L$prologue_avx2 wrt ..imagebase,$L$epilogue_avx2 wrt ..imagebase
|
data/maps/scenes.asm | zavytar/pokecolorless | 0 | 166838 | scene_var: MACRO
; map, variable
map_id \1
dw \2
ENDM
MapScenes::
scene_var POKECENTER_2F, wPokecenter2FSceneID
scene_var TRADE_CENTER, wTradeCenterSceneID
scene_var COLOSSEUM, wColosseumSceneID
scene_var TIME_CAPSULE, wTimeCapsuleSceneID
scene_var OAKS_LAB, wOaksLabSceneID ; previously wPowerPlantSceneID
scene_var VIRIDIAN_CITY, wViridianCitySceneID ; previously wCeruleanGymSceneID
scene_var ROUTE_22, wRoute22SceneID
scene_var VICTORY_ROAD_GATE, wVictoryRoadGateSceneID
scene_var ROUTE_23, wRoute23SceneID
scene_var INDIGO_PLATEAU_POKECENTER_1F, wIndigoPlateauPokecenter1FSceneID
scene_var WILLS_ROOM, wWillsRoomSceneID
scene_var KOGAS_ROOM, wKogasRoomSceneID
scene_var BRUNOS_ROOM, wBrunosRoomSceneID
scene_var KARENS_ROOM, wKarensRoomSceneID
scene_var LANCES_ROOM, wLancesRoomSceneID
scene_var HALL_OF_FAME, wHallOfFameSceneID
scene_var PEWTER_CITY, wPewterCitySceneID
scene_var BLUES_HOUSE, wBluesHouseSceneID
scene_var ROUTE_4, wRoute4SceneID
; scene_var CIANWOOD_CITY, wCianwoodCitySceneID
scene_var BATTLE_TOWER_1F, wBattleTower1FSceneID
scene_var BATTLE_TOWER_BATTLE_ROOM, wBattleTowerBattleRoomSceneID
scene_var BATTLE_TOWER_ELEVATOR, wBattleTowerElevatorSceneID
scene_var BATTLE_TOWER_HALLWAY, wBattleTowerHallwaySceneID
scene_var BATTLE_TOWER_OUTSIDE, wBattleTowerOutsideSceneID ; unused
; scene_var FAST_SHIP_1F, wFastShip1FSceneID
; scene_var FAST_SHIP_B1F, wFastShipB1FSceneID
; scene_var MOUNT_MOON_SQUARE, wMountMoonSquareSceneID
scene_var MOBILE_TRADE_ROOM, wMobileTradeRoomSceneID
scene_var MOBILE_BATTLE_ROOM, wMobileBattleRoomSceneID
db -1 ; end
|
programs/oeis/046/A046820.asm | neoneye/loda | 22 | 9923 | ; A046820: Number of 1's in binary expansion of 5n.
; 0,2,2,4,2,3,4,3,2,4,3,5,4,2,3,4,2,4,4,6,3,4,5,5,4,6,2,4,3,3,4,5,2,4,4,6,4,5,6,4,3,5,4,6,5,4,5,6,4,6,6,8,2,3,4,4,3,5,3,5,4,4,5,6,2,4,4,6,4,5,6,5,4,6,5,7,6,3,4,5,3,5,5,7,4,5,6,6,5,7,4,6,5,5,6,7,4,6,6,8
mul $0,5
mov $1,$0
lpb $1
div $1,2
sub $0,$1
lpe
|
test/jzas/integration/success02.asm | scoffey/jz80sim | 1 | 92053 | init: ld a, 4
ld b, 5
add a, b
end init
|
programs/oeis/062/A062300.asm | karttu/loda | 0 | 13383 | ; A062300: a(n) = floor(cosec(Pi/(n+1))).
; 1,1,1,1,2,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7,7,8,8,8,9,9,9,10,10,10,11,11,11,12,12,12,13,13,13,14,14,14,14,15,15,15,16,16,16,17,17,17,18,18,18,19,19,19,20,20,20,21,21,21,21,22,22,22,23,23,23,24,24,24,25,25,25,26,26,26,27,27,27,28,28,28,28,29,29,29,30,30,30,31,31,31,32,32,32,33,33,33,34,34,34,35,35,35,35,36,36,36,37,37,37,38,38,38,39,39,39,40,40,40,41,41,41,42,42,42,42,43,43,43,44,44,44,45,45,45,46,46,46,47,47,47,48,48,48,49,49,49,49,50,50,50,51,51,51,52,52,52,53,53,53,54,54,54,55,55,55,56,56,56,56,57,57,57,58,58,58,59,59,59,60,60,60,61,61,61,62,62,62,63,63,63,63,64,64,64,65,65,65,66,66,66,67,67,67,68,68,68,69,69,69,70,70,70,70,71,71,71,72,72,72,73,73,73,74,74,74,75,75,75,76,76,76,77,77,77,77,78,78,78,79,79,79
mov $4,$0
sub $0,4
mul $0,2
sub $0,1
mov $1,$4
div $1,2
mov $3,$4
add $3,4
mov $5,10
lpb $0,1
add $3,1
add $3,$1
add $0,$3
mov $2,1
add $2,$5
div $0,$2
mov $1,1
add $1,$0
mov $0,1
lpe
|
oeis/091/A091044.asm | neoneye/loda-programs | 11 | 93011 | ; A091044: One half of odd-numbered entries of even-numbered rows of Pascal's triangle A007318.
; Submitted by <NAME>
; 1,2,2,3,10,3,4,28,28,4,5,60,126,60,5,6,110,396,396,110,6,7,182,1001,1716,1001,182,7,8,280,2184,5720,5720,2184,280,8,9,408,4284,15912,24310,15912,4284,408,9,10,570,7752,38760,83980,83980,38760,7752,570,10,11,770,13167,85272,248710,352716,248710,85272,13167,770,11,12,1012,21252,173052,653752,1248072,1248072,653752,173052,21252,1012,12,13,1300,32890,328900,1562275,3863080,5200300,3863080,1562275,328900,32890,1300,13,14,1638,49140,592020,3453450,10737090,18721080,18721080,10737090
mul $0,2
add $0,1
mov $1,1
lpb $0
sub $0,$1
add $0,1
add $1,1
sub $0,$1
lpe
mul $1,2
bin $1,$0
mov $0,$1
div $0,2
|
opengl-vertex.ads | io7m/coreland-opengl-ada | 1 | 9744 | with OpenGL.Thin;
with OpenGL.Types;
package OpenGL.Vertex is
type Primitive_Type_t is
(Points,
Line_Strip,
Line_Loop,
Lines,
Triangle_Strip,
Triangle_Fan,
Triangles,
Quad_Strip,
Quads,
Polygon);
--
-- Immediate mode. Begin/End.
--
-- proc_map : glBegin
procedure GL_Begin (Mode : in Primitive_Type_t);
-- proc_map : glEnd
procedure GL_End renames Thin.GL_End;
-- proc_map : glVertex4f
procedure Vertex_4f
(X : in Types.Float_t;
Y : in Types.Float_t;
Z : in Types.Float_t;
W : in Types.Float_t)
renames Thin.Vertex_4f;
-- proc_map : glVertex3f
procedure Vertex_3f
(X : in Types.Float_t;
Y : in Types.Float_t;
Z : in Types.Float_t)
renames Thin.Vertex_3f;
-- proc_map : glVertex2f
procedure Vertex_2f
(X : in Types.Float_t;
Y : in Types.Float_t)
renames Thin.Vertex_2f;
-- proc_map : glVertex4d
procedure Vertex_4d
(X : in Types.Double_t;
Y : in Types.Double_t;
Z : in Types.Double_t;
W : in Types.Double_t)
renames Thin.Vertex_4d;
-- proc_map : glVertex3d
procedure Vertex_3d
(X : in Types.Double_t;
Y : in Types.Double_t;
Z : in Types.Double_t)
renames Thin.Vertex_3d;
-- proc_map : glVertex2d
procedure Vertex_2d
(X : in Types.Double_t;
Y : in Types.Double_t)
renames Thin.Vertex_2d;
-- proc_map : glVertex4i
procedure Vertex_4i
(X : in Types.Integer_t;
Y : in Types.Integer_t;
Z : in Types.Integer_t;
W : in Types.Integer_t)
renames Thin.Vertex_4i;
-- proc_map : glVertex3i
procedure Vertex_3i
(X : in Types.Integer_t;
Y : in Types.Integer_t;
Z : in Types.Integer_t)
renames Thin.Vertex_3i;
-- proc_map : glVertex2i
procedure Vertex_2i
(X : in Types.Integer_t;
Y : in Types.Integer_t)
renames Thin.Vertex_2i;
--
-- Map primitive types to enumerations.
--
function Primitive_Type_To_Constant
(Mode : in Primitive_Type_t) return Thin.Enumeration_t;
end OpenGL.Vertex;
|
oeis/089/A089591.asm | neoneye/loda-programs | 11 | 19144 | ; A089591: "Lazy binary" representation of n. Also called redundant binary representation of n.
; Submitted by <NAME>
; 0,1,10,11,20,101,110,111,120,201,210,1011,1020,1101,1110,1111,1120,1201,1210,2011,2020,2101,2110,10111,10120,10201,10210,11011,11020,11101,11110,11111,11120,11201,11210,12011,12020,12101,12110,20111,20120,20201,20210,21011,21020,21101,21110,101111,101120,101201,101210,102011,102020,102101,102110,110111,110120,110201,110210,111011,111020,111101,111110,111111,111120,111201,111210,112011,112020,112101,112110,120111,120120,120201,120210,121011,121020,121101,121110,201111,201120,201201,201210,202011
seq $0,137951 ; Redundant binary representation (A089591) of n interpreted as ternary number.
seq $0,7089 ; Numbers in base 3.
|
sound/sfxasm/D4.asm | NatsumiFox/Sonic-3-93-Nov-03 | 7 | 83387 | D4_Header:
sHeaderInit ; Z80 offset is $DD9D
sHeaderPatch D4_Patches
sHeaderTick $01
sHeaderCh $02
sHeaderSFX $80, $06, D4_FM6, $0C, $00
sHeaderSFX $80, $05, D4_FM5, $00, $13
D4_FM6:
sPatFM $01
dc.b nRst, $01, nA2, $08
sPatFM $00
dc.b sHold, nAb3, $26
sStop
D4_FM5:
sPatFM $02
ssModZ80 $06, $01, $03, $FF
dc.b nRst, $0A
D4_Loop1:
dc.b nFs5, $06
sLoop $00, $05, D4_Loop1
dc.b nFs5, $17
sStop
D4_Patches:
; Patch $00
; $30
; $30, $5C, $34, $30, $9E, $A8, $AC, $DC
; $0E, $0A, $04, $05, $08, $08, $08, $08
; $BF, $BF, $BF, $BF, $24, $1C, $04, $80
spAlgorithm $00
spFeedback $06
spDetune $03, $03, $05, $03
spMultiple $00, $04, $0C, $00
spRateScale $02, $02, $02, $03
spAttackRt $1E, $0C, $08, $1C
spAmpMod $00, $00, $00, $00
spSustainRt $0E, $04, $0A, $05
spSustainLv $0B, $0B, $0B, $0B
spDecayRt $08, $08, $08, $08
spReleaseRt $0F, $0F, $0F, $0F
spTotalLv $24, $04, $1C, $00
; Patch $01
; $30
; $30, $5C, $34, $30, $9E, $A8, $AC, $DC
; $0E, $0A, $04, $05, $08, $08, $08, $08
; $BF, $BF, $BF, $BF, $24, $2C, $04, $80
spAlgorithm $00
spFeedback $06
spDetune $03, $03, $05, $03
spMultiple $00, $04, $0C, $00
spRateScale $02, $02, $02, $03
spAttackRt $1E, $0C, $08, $1C
spAmpMod $00, $00, $00, $00
spSustainRt $0E, $04, $0A, $05
spSustainLv $0B, $0B, $0B, $0B
spDecayRt $08, $08, $08, $08
spReleaseRt $0F, $0F, $0F, $0F
spTotalLv $24, $04, $2C, $00
; Patch $02
; $04
; $37, $72, $77, $49, $1F, $1F, $1F, $1F
; $07, $0A, $07, $0D, $00, $0B, $00, $0B
; $1F, $0F, $1F, $0F, $13, $81, $13, $88
spAlgorithm $04
spFeedback $00
spDetune $03, $07, $07, $04
spMultiple $07, $07, $02, $09
spRateScale $00, $00, $00, $00
spAttackRt $1F, $1F, $1F, $1F
spAmpMod $00, $00, $00, $00
spSustainRt $07, $07, $0A, $0D
spSustainLv $01, $01, $00, $00
spDecayRt $00, $00, $0B, $0B
spReleaseRt $0F, $0F, $0F, $0F
spTotalLv $13, $13, $01, $08
|
2IMA/SystemesConcurrents/tp6/lr-synchro-serveur.adb | LagOussama/enseeiht | 1 | 2162 | with Ada.Text_IO; use Ada.Text_IO;
with Ada.Exceptions;
-- Version simple : exclusion mutuelle pour toutes les opérations
-- fournit une ossature pour l'approche "service"
package body LR.Synchro.serveur is
function Nom_Strategie return String is
begin
return "Exclusion mutuelle simple";
end Nom_Strategie;
task LectRedTask is
entry Demander_Lecture;
entry Demander_Ecriture;
entry Terminer_Lecture;
entry Terminer_Ecriture;
end LectRedTask;
task body LectRedTask is
nbL: Integer := 0;
nbR: Integer := 0;
begin
loop
select
when nbR = 0 =>
accept Demander_Lecture; nbL := nbL +1;
or when nbL = 0 and nbR = 0 =>
accept Demander_Ecriture; nbR := nbR +1;
or when nbR > 0 =>
accept Terminer_Ecriture; nbR := nbR -1;
or when nbL > 0 =>
accept Terminer_Lecture; nbL := nbL -1;
or
terminate;
end select;
-- une fois une opération acceptée, on accepte uniquement sa terminaison
end loop;
end LectRedTask;
procedure Demander_Lecture is
begin
LectRedTask.Demander_Lecture;
end Demander_Lecture;
procedure Demander_Ecriture is
begin
LectRedTask.Demander_Ecriture;
end Demander_Ecriture;
procedure Terminer_Lecture is
begin
LectRedTask.Terminer_Lecture;
end Terminer_Lecture;
procedure Terminer_Ecriture is
begin
LectRedTask.Terminer_Ecriture;
end Terminer_Ecriture;
end LR.Synchro.serveur;
|
src/main.asm | RysteQ/SBOS | 0 | 84693 | [org 0x7e00]
[bits 16]
; clear the screen and show the welcome message
call clear_screen
mov si, welcome_message
call print_si
main_loop:
; get the user input and analyze the command
mov si, prompt
call print_si
call get_input
call command_line_si
jmp main_loop
jmp $
NULL_TERMINATOR equ 255
EMPTY_CHARACTER equ 0
NEW_LINE equ 10
CARRIAGE_RETURN equ 13
BACKSPACE equ 8
SPACE equ 32
UP_ARROW_ASCII_CODE equ 72
DOWN_ARROW_ASCII_CODE equ 80
LEFT_ARROW_ASCII_CODE equ 75
RIGHT_ARROW_ASCII_CODE equ 77
ESCAPE equ 27
TAB_KEY equ 9
welcome_message: db "Welcome to SBOS", NEW_LINE, NEW_LINE, NULL_TERMINATOR
prompt: db "> ", NULL_TERMINATOR
%include "print.asm"
%include "input.asm"
%include "new_line.asm"
%include "compare_strings.asm"
%include "commands.asm"
%include "copy_di_to_si.asm"
%include "single_char_input.asm"
%include "notepad.asm"
%include "clear_screen.asm"
%include "bf_interpreter.asm" |
libsrc/_DEVELOPMENT/adt/p_forward_list/c/sdcc_iy/p_forward_list_next_fastcall.asm | meesokim/z88dk | 0 | 6573 | <filename>libsrc/_DEVELOPMENT/adt/p_forward_list/c/sdcc_iy/p_forward_list_next_fastcall.asm
; void *p_forward_list_next_fastcall(void *item)
SECTION code_adt_p_forward_list
PUBLIC _p_forward_list_next_fastcall
defc _p_forward_list_next_fastcall = asm_p_forward_list_next
INCLUDE "adt/p_forward_list/z80/asm_p_forward_list_next.asm"
|
src/static/antlr4/grammars/Calc.g4 | jlenoble/casem | 0 | 4840 | grammar Calc;
import Files, Stats;
prog
: blocks
| blocks file+
;
file
: header blocks endFile
;
blocks
: block*
;
block
: (stat endStat)+
| blockStat endStat
| NEWLINE+
;
blockStat
: ifStat
| forStat
| doStat
| whileStat
;
ifStat
: IF boolExpr endStat THEN blocks (ELSE blocks)? IFEND
;
forStat
: FOR numExpr ARROW variable TO numExpr (STEP numExpr)? endStat blocks NEXT
;
doStat
: DO endStat blocks LOOPWHILE boolExpr
;
whileStat
: WHILE boolExpr endStat blocks WHILEEND
;
|
libsrc/_DEVELOPMENT/adt/ba_priority_queue/c/sccz80/ba_priority_queue_push_callee.asm | meesokim/z88dk | 0 | 102923 |
; int ba_priority_queue_push(ba_priority_queue_t *q, int c)
SECTION code_adt_ba_priority_queue
PUBLIC ba_priority_queue_push_callee
ba_priority_queue_push_callee:
pop hl
pop bc
ex (sp),hl
INCLUDE "adt/ba_priority_queue/z80/asm_ba_priority_queue_push.asm"
|
LecIC.agda | clarkdm/CS410 | 0 | 9158 | module LecIC where
open import CS410-Prelude
open import CS410-Nat
_-:>_ : {I : Set}(S T : I -> Set) -> I -> Set
(S -:> T) i = S i -> T i
infixr 3 _-:>_
-- notation for indexed sets
[_] : {I : Set}(X : I -> Set) -> Set
[ X ] = forall {i} -> X i
record MonadIx {W : Set}(F : (W -> Set) -> (W -> Set)) : Set1 where
field
retIx : forall {P} -> [ P -:> F P ]
extendIx : forall {P Q} -> [ P -:> F Q ] -> [ F P -:> F Q ]
_?>=_ : forall {P Q w} ->
F P w -> (forall {v} -> P v -> F Q v) -> F Q w
fp ?>= k = extendIx k fp
IC : (W : Set)
(C : W -> Set)
(R : (w : W) -> C w -> Set)
(n : (w : W)(c : C w)(r : R w c) -> W)
-> (W -> Set) -> (W -> Set)
IC W C R n G w = Sg (C w) \ c -> (r : R w c) -> G (n w c r)
data FreeIx (W : Set)
(C : W -> Set)
(R : (w : W) -> C w -> Set)
(n : (w : W)(c : C w)(r : R w c) -> W)
(G : W -> Set)
(w : W)
: Set
where
ret : G w -> FreeIx W C R n G w
do : IC W C R n (FreeIx W C R n G) w -> FreeIx W C R n G w
postulate
FileName : Set
Char : Set
foo : FileName
blah : Char
data WriteFileW : Set where
opened closed : WriteFileW
data WriteFileC : WriteFileW -> Set where
write : Char -> WriteFileC opened
openW : FileName -> WriteFileC closed
closeW : WriteFileC opened
WriteFileR : (w : WriteFileW)(c : WriteFileC w) -> Set
WriteFileR .opened (write x) = One
WriteFileR .closed (openW x) = WriteFileW
WriteFileR .opened closeW = One
WriteFileN : (w : WriteFileW)(c : WriteFileC w)(r : WriteFileR w c) -> WriteFileW
WriteFileN .opened (write x) <> = opened
WriteFileN .closed (openW x) r = r
WriteFileN .opened closeW <> = closed
WRITE : (WriteFileW -> Set) -> (WriteFileW -> Set)
WRITE = FreeIx WriteFileW WriteFileC WriteFileR WriteFileN
Goal : WriteFileW -> Set
Goal opened = Zero
Goal closed = One
play : WRITE Goal closed
play = do (openW foo , \
{ opened -> do (write blah , (\ _ -> do (closeW , (\ _ -> ret <>))))
; closed -> ret <>
})
FreeMonadIx : (W : Set)
(C : W -> Set)
(R : (w : W) -> C w -> Set)
(n : (w : W)(c : C w)(r : R w c) -> W)
-> MonadIx (FreeIx W C R n)
FreeMonadIx W C R n =
record { retIx = ret
; extendIx = help
} where
help : {P Q : W → Set} ->
[ P -:> FreeIx W C R n Q ] ->
[ FreeIx W C R n P -:> FreeIx W C R n Q ]
help k (ret p) = k p
help k (do (c , j)) = do (c , \ r -> help k (j r))
data HType : Set where hTwo hNat : HType
-- mapping names for types to real types.
THVal : HType -> Set
THVal hTwo = Two
THVal hNat = Nat
-- A syntax for types expressions, indexed by typed variables. Compare
-- with the untyped HExp and fill in the missing expression formers,
-- we have shown you the way with _+H_. think: what can be guaranteed?
data THExp (X : HType -> Set) : HType -> Set where
var : forall {T} -> X T -> THExp X T
val : forall {T} -> THVal T -> THExp X T
_+H_ : THExp X hNat -> THExp X hNat -> THExp X hNat
-- ??? fill in the other two constructs, typed appropriately
-- (remember that "if then else" can compute values at any type)
THExpMonadIx : MonadIx THExp
THExpMonadIx = record
{ retIx = var
; extendIx = help
} where
help : forall {P Q} -> [ P -:> THExp Q ] -> [ THExp P -:> THExp Q ]
help f (var x) = f x
help f (val v) = val v
help f (e1 +H e2) = help f e1 +H help f e2
WH : Set
WH = Nat * Nat
data Tiling (X : WH -> Set)(wh : WH) : Set where
! : X wh -> Tiling X wh
joinH : (wl wr : Nat)(wq : wl +N wr == fst wh) ->
Tiling X (wl , snd wh) -> Tiling X (wr , snd wh) -> Tiling X wh
joinV : (ht hb : Nat)(hq : ht +N hb == snd wh) ->
Tiling X (fst wh , ht) -> Tiling X (fst wh , hb) -> Tiling X wh
TilingMonadIx : MonadIx Tiling
TilingMonadIx = record
{ retIx = !
; extendIx = help
} where
help : {P Q : WH -> Set} -> [ P -:> Tiling Q ] -> [ Tiling P -:> Tiling Q ]
help f (! p) = f p
help f (joinH wl wr wq t-l t-r) = joinH wl wr wq (help f t-l) (help f t-r)
help f (joinV ht hb hq t-t t-b) = joinV ht hb hq (help f t-t) (help f t-b)
IsZero : Nat -> Set
IsZero zero = One
IsZero (suc n) = Zero
CanCons : Set -> Nat -> Set
CanCons X zero = Zero
CanCons X (suc n) = X
afterCons : {X : Set}(n : Nat) -> CanCons X n -> One -> Nat
afterCons zero () <>
afterCons (suc n) c <> = n
VEC : Set -> Nat -> Set
VEC X = FreeIx Nat (CanCons X) (\ _ _ -> One) afterCons IsZero
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_335_516.asm | ljhsiun2/medusa | 9 | 167185 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r13
push %r15
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x40d6, %r15
clflush (%r15)
nop
cmp $65365, %rcx
movups (%r15), %xmm0
vpextrq $1, %xmm0, %r13
cmp $56319, %r15
lea addresses_UC_ht+0x194f6, %rsi
lea addresses_A_ht+0x4fd6, %rdi
nop
nop
nop
nop
nop
add $34179, %r12
mov $29, %rcx
rep movsb
nop
nop
nop
xor %r12, %r12
lea addresses_normal_ht+0x16f36, %rsi
lea addresses_WC_ht+0x18e66, %rdi
nop
sub $18794, %r10
mov $127, %rcx
rep movsb
nop
sub %rcx, %rcx
lea addresses_WT_ht+0xe7ba, %rdi
nop
nop
nop
and $25012, %r10
movb (%rdi), %cl
cmp %rdi, %rdi
lea addresses_WC_ht+0x9ede, %r13
nop
nop
and $31089, %rcx
mov $0x6162636465666768, %rsi
movq %rsi, (%r13)
nop
nop
and %rdi, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %r15
pop %r13
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r14
push %r15
push %r8
push %rsi
// Store
mov $0x6b8e3b0000000bd6, %r8
nop
sub $50913, %r10
movb $0x51, (%r8)
// Exception!!!
nop
mov (0), %r12
nop
nop
nop
nop
add %r8, %r8
// Faulty Load
lea addresses_WT+0xc3d6, %r10
nop
nop
dec %r15
movups (%r10), %xmm0
vpextrq $1, %xmm0, %rsi
lea oracles, %r12
and $0xff, %rsi
shlq $12, %rsi
mov (%r12,%rsi,1), %rsi
pop %rsi
pop %r8
pop %r15
pop %r14
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_WT', 'congruent': 0}}
{'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 1, 'type': 'addresses_NC', 'congruent': 8}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WT', 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WC_ht', 'congruent': 7}}
{'dst': {'same': False, 'congruent': 7, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_UC_ht'}}
{'dst': {'same': False, 'congruent': 4, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 5, 'type': 'addresses_normal_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 1, 'type': 'addresses_WT_ht', 'congruent': 2}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WC_ht', 'congruent': 3}, 'OP': 'STOR'}
{'39': 335}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
|
kernel/asmfunc.asm | hamata0222/my_mikanos | 0 | 171505 | ; asmfunc.asm
;
; System V AMD64 Calling Convention
; Registers: RDI, RSI, RDX, RCX, R8, R9
bits 64
section .text
global IoOut32 ; void IoOut32(uint16_t addr, uint32_t data);
IoOut32:
mov dx, di ; dx = addr
mov eax, esi ; eax = data
out dx, eax ; special command `out` to write data into IO port address.
ret
global IoIn32 ; uint32_t IoIn32(uint16_t addr);
IoIn32:
mov dx, di ; dx = addr
in eax, dx ; special command `in` to write data into IO port address.
ret
global GetCS ; uint16_t GetCS(void);
GetCS:
xor eax, eax ; also clears upper 32bits of rax
mov ax, cs
ret
global LoadIDT ; void LoadIDT(uint16_t limit, uint64_t offset);
LoadIDT:
push rbp
mov rbp, rsp
sub rsp, 10
mov [rsp], di ; limit
mov [rsp + 2], rsi ; offset
lidt [rsp]
mov rsp, rbp
pop rbp
ret
global LoadGDT ; void LoadDGT(uint16_t limit, uint64_t offset);
LoadGDT:
push rbp
mov rbp, rsp
sub rsp, 10
mov [rsp], di ; limit
mov [rsp + 2], rsi ; offset
lgdt[rsp]
mov rsp, rbp
pop rbp
ret
global SetCSSS ; void SetCSSS(uint16_t cs, uint16_t ss);
SetCSSS:
push rbp
mov rbp, rsp
mov ss, si
mov rax, .next
push rdi ; CS
push rax ; RIP
o64 retf
.next:
mov rsp, rbp
pop rbp
ret
global SetDSAll ; void SetDSAll(uint16_t value);
SetDSAll:
mov ds, di
mov es, di
mov fs, di
mov gs, di
ret
global SetCR3 ; void SetCR3(uint64_t value);
SetCR3:
mov cr3, rdi
ret
extern kernel_main_stack
extern KernelMainNewStack
global KernelMain
KernelMain:
mov rsp, kernel_main_stack + 1024 * 1024
call KernelMainNewStack
.fin:
hlt
jmp .fin
|
cyencavx.asm | meganomic/cyenc | 2 | 246005 | <reponame>meganomic/cyenc
global encode
global decode
default rel
%ifidn __OUTPUT_FORMAT__, win64 ; Windows calling convention
%define outputarray rcx
%define inputarray rdx
%define inputsize r8
%elifidn __OUTPUT_FORMAT__, elf64 ; Linux calling convention
%define outputarray rdi
%define inputarray rsi
%define inputsize rdx
%endif
section .text
align 16
encode: ; encode(outputarray, inputarray, inputsize) returns the size of the output
sub rsp, 8 ; Align the stack to 16, I do not understand why it's not already align to 16.
push r12 ; calling convention demands saving various registers
push r13
push r14
push r15
%ifidn __OUTPUT_FORMAT__, win64 ; Windows calling convention
sub rsp, 160
vmovdqa [rsp+16*0], xmm6
vmovdqa [rsp+16*1], xmm7
vmovdqa [rsp+16*2], xmm8
vmovdqa [rsp+16*3], xmm9
vmovdqa [rsp+16*4], xmm10
vmovdqa [rsp+16*5], xmm11
vmovdqa [rsp+16*6], xmm12
vmovdqa [rsp+16*7], xmm13
vmovdqa [rsp+16*8], xmm14
vmovdqa [rsp+16*9], xmm15
%endif
mov r9, outputarray ; Memory address of outputarray, will use this to get the size of the output later
mov r11, 4 ; The maximum length of each line is 128 characters, 4 iterations will result in adequate results. 4*32=128
align 16
.encodeset:
vmovaps ymm0, [inputarray] ; Read 32 bytes from memory
vpaddb ymm0, [const1] ; +42 as per yEnc spec
vpcmpeqb ymm1, ymm0, [specialNull] ; 0x00
vpcmpeqb ymm2, ymm0, [specialEqual] ; 0x3D
vpcmpeqb ymm3, ymm0, [specialLF] ; 0x0A
vpcmpeqb ymm4, ymm0, [specialCR] ; 0x0D
vpor ymm1, ymm2 ; Merge compare results
vpor ymm1, ymm3
vpor ymm1, ymm4
vptest ymm1, ymm1
jnz .encodeillegalcharacters
vmovdqu [outputarray], ymm0 ; Write to memory, no additional processing needed
add outputarray, 32
add inputarray, 32
sub inputsize, 32
jbe .done ; Yay! It's done!
sub r11, 1
jz .newline
jmp .encodeset
align 16
.encodeillegalcharacters:
vpxor xmm10, xmm10
vpxor xmm11, xmm11
vpxor xmm12, xmm12
; Add 64 to every byte in the mask
vpand ymm9, ymm1, [specialEncode]
vpaddb ymm0, ymm9
vpxor ymm7, ymm7 ; Need some zeroes
vpbroadcastb ymm5, [specialEqual] ; Escape character
vpunpcklbw ymm5, ymm0 ; Unpack lower half of data
vpunpcklbw ymm7, ymm1 ; Unpack lower half of mask
vpsrldq ymm7, 1 ; Shift data register 1 byte to the right to align with [writebytes]
vpor ymm6, ymm7, [writebytes] ; Add masks together
;--------------------------- Lower 8 bytes of the *low* part of ymm5 --- START
vmovq r12, xmm5
vmovq r13, xmm6
pext rax, r12, r13
mov qword [outputarray], rax
vmovq xmm12, r13
vpmovmskb r14, xmm12
popcnt r10, r14
add outputarray, r10 ; add however many bytes were written
;--
vpsrldq xmm14, xmm5, 8 ; Shift mask register 8 bytes to the right
vpsrldq xmm15, xmm6, 8 ; Shift mask register 8 bytes to the right
vmovq r12, xmm14
vmovq r13, xmm15
pext rax, r12, r13
mov qword [outputarray], rax
vmovq xmm12, r13
vpmovmskb r14, xmm12
popcnt r10, r14
add outputarray, r10 ; add however many bytes were written
;--------------------------- Lower 8 bytes of the *low* part of ymm5 --- END
;--------------------------- Lower 8 bytes of the *high* part of ymm5 --- START SAVE DATA
; Seems simpler to just save the data here and process/write the data in order later
; If nothing else, it skips on having to keep track of a bunch of extra registers
vextracti128 xmm10, ymm5, 1
vextracti128 xmm11, ymm6, 1
;--------------------------- Lower 8 bytes of the *high* part of ymm5 --- END SAVE DATA
vmovaps ymm7, [specialNull]
vmovaps ymm5, [specialEqual] ; Escape character
vpunpckhbw ymm5, ymm5, ymm0 ; Unpack higher half of data
vpunpckhbw ymm7, ymm7, ymm1 ; Unpack higher half of mask
vpsrldq ymm7, 1 ; Shift data register 1 byte to the right to align with ymm6
vpor ymm6, ymm7, [writebytes] ; Add masks together
;--------------------------- Higher 8 bytes of the *low* part of ymm5 --- START
vmovq r12, xmm5
vmovq r13, xmm6
pext rax, r12, r13
mov qword [outputarray], rax
vmovq xmm12, r13
vpmovmskb r14, xmm12
popcnt r10, r14
add outputarray, r10 ; add however many bytes were written
;--
vpsrldq xmm14, xmm5, 8 ; Shift mask register 8 bytes to the right
vpsrldq xmm15, xmm6, 8 ; Shift mask register 8 bytes to the right
vmovq r12, xmm14
vmovq r13, xmm15
pext rax, r12, r13
mov qword [outputarray], rax
vmovq xmm12, r13
vpmovmskb r14, xmm12
popcnt r10, r14
add outputarray, r10 ; add however many bytes were written
;--------------------------- Higher 8 bytes of the *low* part of ymm5 --- END
;--------------------------- Lower 8 bytes of the *high* part of ymm5 --- START PROCESSING
vmovq r12, xmm10
vmovq r13, xmm11
pext rax, r12, r13
mov qword [outputarray], rax
vmovq xmm12, r13
vpmovmskb r14, xmm12
popcnt r10, r14
add outputarray, r10 ; add however many bytes were written
;--
vpsrldq xmm10, 8 ; Shift mask register 8 bytes to the right
vpsrldq xmm11, 8 ; Shift mask register 8 bytes to the right
vmovq r12, xmm10
vmovq r13, xmm11
pext rax, r12, r13
mov qword [outputarray], rax
vmovq xmm12, r13
vpmovmskb r14, xmm12
popcnt r10, r14
add outputarray, r10 ; add however many bytes were written
;--------------------------- Lower 8 bytes of the *high* part of ymm5 --- END PROCESSING
;--------------------------- Higher 8 bytes of the *high* part of ymm5 --- START
vextracti128 xmm10, ymm5, 1
vextracti128 xmm11, ymm6, 1
vmovq r12, xmm10
vmovq r13, xmm11
pext rax, r12, r13
mov qword [outputarray], rax
vmovq xmm12, r13
vpmovmskb r14, xmm12
popcnt r10, r14
add outputarray, r10 ; add however many bytes were written
;--
vpsrldq xmm10, 8 ; Shift mask register 8 bytes to the right
vpsrldq xmm11, 8 ; Shift mask register 8 bytes to the right
vmovq r12, xmm10
vmovq r13, xmm11
pext rax, r12, r13
mov qword [outputarray], rax
vmovq xmm12, r13
vpmovmskb r14, xmm12
popcnt r10, r14
add outputarray, r10 ; add however many bytes were written
;--------------------------- Higher 8 bytes of the *high* part of ymm5 --- END
add inputarray, 32
sub inputsize, 32
jbe .done ; Yay! It's done!
sub r11, 1
jz .newline
jmp .encodeset
align 16
.newline:
mov word [outputarray], 0x0A0D ; \r\n
add outputarray, 2 ; increase output array pointer
mov r11, 4 ; Reset counter
jmp .encodeset
align 16
.done:
sub outputarray, r9 ; subtract original position from current and we get the size
mov rax, outputarray ; Return output size
add rax, inputsize ; correct for input not being a multiple of 16.
%ifidn __OUTPUT_FORMAT__, win64 ; Windows calling convention
vmovdqa xmm6, [rsp+16*0]
vmovdqa xmm7, [rsp+16*1]
vmovdqa xmm8, [rsp+16*2]
vmovdqa xmm9, [rsp+16*3]
vmovdqa xmm10, [rsp+16*4]
vmovdqa xmm11, [rsp+16*5]
vmovdqa xmm12, [rsp+16*6]
vmovdqa xmm13, [rsp+16*7]
vmovdqa xmm14, [rsp+16*8]
vmovdqa xmm15, [rsp+16*9]
add rsp, 160
%endif
pop r15
pop r14
pop r13 ; restore some registers to their original state
pop r12
add rsp, 8 ; Reset
ret
section .data align=32
specialNull: times 4 dq 0x0000000000000000
specialEqual: times 4 dq 0x3D3D3D3D3D3D3D3D
specialLF: times 4 dq 0x0A0A0A0A0A0A0A0A
specialCR: times 4 dq 0x0D0D0D0D0D0D0D0D
specialSpace: times 4 dq 0x2020202020202020
writebytes: times 4 dq 0xFF00FF00FF00FF00
const1: times 4 dq 0x2A2A2A2A2A2A2A2A
specialEncode: times 4 dq 0x4040404040404040
decodeconst3: dq 0x00000000000000FF
dq 0x0000000000000000
decodeconst4: dq 0xFFFFFFFFFFFFFF00
dq 0xFFFFFFFFFFFFFFFF |
slides/OpenTheory.agda | larrytheliquid/generic-elim | 11 | 15990 | open import Data.Nat
module OpenTheory where
----------------------------------------------------------------------
data Vec (A : Set) : ℕ → Set₁ where
nil : Vec A zero
cons : (n : ℕ) (x : A) (xs : Vec A n) → Vec A (suc n)
data Vec2 : Set → ℕ → Set₁ where
nil : (A : Set) → Vec2 A zero
cons : (A : Set) (n : ℕ) (x : A) (xs : Vec2 A n) → Vec2 A (suc n)
elimVec : {A : Set} (P : (n : ℕ) → Vec A n → Set)
(pnil : P zero nil)
(pcnons : (n : ℕ) (x : A) (xs : Vec A n) → P n xs → P (suc n) (cons n x xs))
(n : ℕ) (xs : Vec A n) → P n xs
elimVec P pnil pcons .zero nil = pnil
elimVec P pnil pcons .(suc n) (cons n x xs) = pcons n x xs (elimVec P pnil pcons n xs)
----------------------------------------------------------------------
data Tree (A B : Set) : ℕ → ℕ → Set where
leaf₁ : A → Tree A B (suc zero) zero
leaf₂ : B → Tree A B zero (suc zero)
branch : (m n x y : ℕ)
→ Tree A B m n → Tree A B x y
→ Tree A B (m + x) (n + y)
----------------------------------------------------------------------
|
oeis/017/A017460.asm | neoneye/loda-programs | 11 | 1141 | ; A017460: a(n) = (11*n + 5)^12.
; 244140625,281474976710656,150094635296999121,9065737908494995456,191581231380566414401,2176782336000000000000,16409682740640811134241,92420056270299898187776,418596297479370673535601,1601032218567680790102016,5350250105473711181640625,16012035393449278995173376,43716643078717303412870881,110443607719611533356957696,261075123337098804348567681,582622237229761000000000000,1236354171303115835117980561,2509659166022727122011815936,4897252030306448390395044241,9224976748383532391296208896
mul $0,11
add $0,5
pow $0,12
|
src/dds-request_reply-requester-typed_requester_generic.adb | persan/dds-requestreply | 0 | 19692 | pragma Ada_2012;
with DDS.Request_Reply.Impl;
with DDS.DomainParticipantFactory;
with DDS.DataWriter_Impl;
with DDS.DataReader_Impl;
package body DDS.Request_Reply.Requester.Typed_Requester_Generic is
use DDS.Subscriber;
use DDS.Publisher;
-----------------------------
-- Get_Request_Data_Writer --
-----------------------------
function Get_Request_Data_Writer
(Self : not null access Ref) return DDS.DataWriter.Ref_Access
is
begin
return DDS.DataWriter.Ref_Access (Self.Writer);
end Get_Request_Data_Writer;
---------------------------
-- Get_Reply_Data_Reader --
---------------------------
function Get_Reply_Data_Reader
(Self : not null access Ref) return DDS.DataReader.Ref_Access
is
begin
return DDS.DataReader.Ref_Access (Self.Reader);
end Get_Reply_Data_Reader;
------------
-- Create --
------------
procedure Finalize (Self : in out Ref) is
begin
Self.Participant.Delete_DataWriter (DDS.DataWriter.Ref_Access (Self.Writer));
Self.Participant.Delete_DataReader (DDS.DataReader.Ref_Access (self.Reader));
Self.Participant.Delete_Topic (Self.Request_Topic);
Self.Participant.Delete_Topic (Self.Reply_Topic);
Impl.Ref (Self).Finalize;
end;
function Create
(Participant : DDS.DomainParticipant.Ref_Access;
Service_Name : DDS.String;
Library_Name : DDS.String;
Profile_Name : DDS.String;
Publisher : DDS.Publisher.Ref_Access := null;
Subscriber : DDS.Subscriber.Ref_Access := null;
A_Listner : Request_Listeners.Ref_Access := null;
Mask : DDS.StatusKind := DDS.STATUS_MASK_NONE) return Ref_Access
is
Request_Topic_Name : DDS.String := DDS.Request_Reply.Impl.Create_Request_Topic_Name_From_Service_Name (Service_Name);
Reply_Topic_Name : DDS.String := DDS.Request_Reply.Impl.Create_Reply_Topic_Name_From_Service_Name (Service_Name);
begin
return Ret : Ref_Access do
Ret := Create (Participant => Participant,
Request_Topic_Name => Request_Topic_Name,
Reply_Topic_Name => Reply_Topic_Name ,
Library_Name => Library_Name,
Profile_Name => Profile_Name,
Publisher => Publisher,
Subscriber => Subscriber,
A_Listner => A_Listner,
Mask => Mask);
Finalize (Request_Topic_Name);
Finalize (Reply_Topic_Name);
end return;
end Create;
------------
-- Create --
------------
function Create
(Participant : DDS.DomainParticipant.Ref_Access;
Request_Topic_Name : DDS.String;
Reply_Topic_Name : DDS.String;
Library_Name : DDS.String;
Profile_Name : DDS.String;
Publisher : DDS.Publisher.Ref_Access := null;
Subscriber : DDS.Subscriber.Ref_Access := null;
A_Listner : Request_Listeners.Ref_Access := null;
Mask : DDS.StatusKind := DDS.STATUS_MASK_NONE) return Ref_Access
is
Datawriter_Qos : DDS.DataWriterQos;
Datareader_Qos : DDS.DataReaderQoS;
Topic_Qos : DDS.TopicQos;
Factory : constant DDS.DomainParticipantFactory.Ref_Access := DDS.DomainParticipantFactory.Get_Instance;
begin
Factory.Get_Datareader_Qos_From_Profile_W_Topic_Name
(QoS => Datareader_Qos,
Library_Name => Library_Name,
Profile_Name => Profile_Name,
Topic_Name => Reply_Topic_Name);
Factory.Get_Datawriter_Qos_From_Profile_W_Topic_Name
(QoS => Datawriter_Qos,
Library_Name => Library_Name,
Profile_Name => Profile_Name,
Topic_Name => Request_Topic_Name);
Factory.Get_Topic_Qos_From_Profile_W_Topic_Name
(QoS => Topic_Qos,
Library_Name => Library_Name,
Profile_Name => Profile_Name,
Topic_Name => Request_Topic_Name);
return Create (Participant => Participant,
Request_Topic_Name => Request_Topic_Name,
Reply_Topic_Name => Reply_Topic_Name,
Datawriter_Qos => Datawriter_Qos,
Datareader_Qos => Datareader_Qos,
Topic_Qos => Topic_Qos,
Publisher => Publisher,
Subscriber => Subscriber,
A_Listner => A_Listner,
Mask => Mask);
end Create;
------------
-- Create --
------------
function Create
(Participant : DDS.DomainParticipant.Ref_Access;
Service_Name : DDS.String;
Datawriter_Qos : DDS.DataWriterQos;
Datareader_Qos : DDS.DataReaderQos;
Topic_Qos : DDS.TopicQos := DDS.DomainParticipant.TOPIC_QOS_DEFAULT;
Publisher : DDS.Publisher.Ref_Access := null;
Subscriber : DDS.Subscriber.Ref_Access := null;
A_Listner : Request_Listeners.Ref_Access := null;
Mask : DDS.StatusKind := DDS.STATUS_MASK_NONE) return Ref_Access
is
Request_Topic_Name : DDS.String := DDS.Request_Reply.Impl.Create_Request_Topic_Name_From_Service_Name (Service_Name);
Reply_Topic_Name : DDS.String := DDS.Request_Reply.Impl.Create_Reply_Topic_Name_From_Service_Name (Service_Name);
begin
return Ret : Ref_Access do
Ret := Create (Participant => Participant,
Request_Topic_Name => Request_Topic_Name,
Reply_Topic_Name => Reply_Topic_Name ,
Datawriter_Qos => Datawriter_Qos,
Datareader_Qos => Datareader_Qos,
Topic_Qos => Topic_Qos,
Publisher => Publisher,
Subscriber => Subscriber,
A_Listner => A_Listner,
Mask => Mask);
Finalize (Request_Topic_Name);
Finalize (Reply_Topic_Name);
end return;
end Create;
------------
-- Create --
------------
procedure Free is new Ada.Unchecked_Deallocation (Ref'Class, Ref_Access);
function Create
(Participant : DDS.DomainParticipant.Ref_Access;
Request_Topic_Name : DDS.String;
Reply_Topic_Name : DDS.String;
Datawriter_Qos : DDS.DataWriterQos;
Datareader_Qos : DDS.DataReaderQos;
Topic_Qos : DDS.TopicQos := DDS.DomainParticipant.TOPIC_QOS_DEFAULT;
Publisher : DDS.Publisher.Ref_Access := null;
Subscriber : DDS.Subscriber.Ref_Access := null;
A_Listner : Request_Listeners.Ref_Access := null;
Mask : DDS.StatusKind := DDS.STATUS_MASK_NONE) return Ref_Access
is
Ret : Ref_Access := new Ref;
begin
Ret.Participant := Participant;
RET.Listner := A_Listner;
Ret.Validate (Publisher, Subscriber);
Ret.Request_Topic := Ret.Create_Request_Topic (Request_Topic_Name, Request_DataWriter.Treats.Get_Type_Name, Topic_Qos);
Ret.Reply_Topic := Ret.Create_Reply_Topic (Reply_Topic_Name, Reply_DataReader.Treats.Get_Type_Name, Topic_Qos);
Ret.Subscriber := (if Subscriber = null then Participant.Get_Implicit_Subscriber else Subscriber);
Ret.Publisher := (if Publisher = null then Participant.Get_Implicit_Publisher else Publisher);
Ret.Writer := DataWriter_Impl.Ref_Access (Ret.Publisher.Create_DataWriter (Ret.Request_Topic, Datawriter_Qos, Ret.Writer_Listner'Access, Mask));
Ret.Reader := DDS.DataReader_Impl.Ref_Access (Ret.Subscriber.Create_DataReader (Ret.Reply_Topic.As_TopicDescription, Datareader_Qos, Ret.Reader_Listner'Access, Mask));
return Ret;
exception
when others =>
Free (Ret);
raise;
end Create;
------------
-- Delete --
------------
procedure Delete (Self : in out Ref_Access) is
begin
Free (Self);
end Delete;
------------------
-- Send_Request --
------------------
function Send_Request
(Self : not null access Ref;
Data : Request_DataWriter.Treats.Data_Type)
return DDS.ReturnCode_T
is
begin
pragma Compile_Time_Warning
(Standard.True, "Send_Request unimplemented");
return raise Program_Error with "Unimplemented function Send_Request";
end Send_Request;
------------------
-- Send_Request --
------------------
procedure Send_Request
(Self : not null access Ref;
Data : Request_DataWriter.Treats.Data_Type)
is
begin
pragma Compile_Time_Warning
(Standard.True, "Send_Request unimplemented");
raise Program_Error with "Unimplemented procedure Send_Request";
end Send_Request;
------------------
-- Send_Request --
------------------
function Send_Request
(Self : not null access Ref;
Data : Request_DataWriter.Treats.Data_Type)
return Reply_DataReader.Treats.Data_Type
is
begin
pragma Compile_Time_Warning
(Standard.True, "Send_Request unimplemented");
return raise Program_Error with "Unimplemented function Send_Request";
end Send_Request;
------------------
-- Send_Request --
------------------
function Send_Request
(Self : not null access Ref;
Request : Request_DataWriter.Treats.Data_Type)
return Reply_DataReader.Container
is
begin
pragma Compile_Time_Warning
(Standard.True, "Send_Request unimplemented");
return raise Program_Error with "Unimplemented function Send_Request";
end Send_Request;
------------------
-- Send_Request --
------------------
function Send_Request
(Self : not null access Ref;
Request : access Request_DataWriter.Treats.Data_Type;
Min_Reply_Count : DDS.Natural; Max_Reply_Count : DDS.long;
Timeout : DDS.Duration_T := DURATION_INFINITE)
return Reply_DataReader.Container
is
begin
pragma Compile_Time_Warning
(Standard.True, "Send_Request unimplemented");
return raise Program_Error with "Unimplemented function Send_Request";
end Send_Request;
------------------
-- Send_Request --
------------------
procedure Send_Request
(Self : not null access Ref;
Request : Request_DataWriter.Treats.Data_Type;
Request_Info : DDS.WriteParams_T)
is
begin
pragma Compile_Time_Warning
(Standard.True, "Send_Request unimplemented");
raise Program_Error with "Unimplemented procedure Send_Request";
end Send_Request;
-------------------
-- Receive_Reply --
-------------------
function Receive_Reply
(Self : not null access Ref;
Replies : aliased Reply_DataReader.Treats.Data_Type;
Info_Seq : not null access DDS.SampleInfo_Seq.Sequence;
Timeout : DDS.Duration_T) return DDS.ReturnCode_T
is
begin
pragma Compile_Time_Warning
(Standard.True, "Receive_Reply unimplemented");
return raise Program_Error with "Unimplemented function Receive_Reply";
end Receive_Reply;
-------------------
-- Receive_Reply --
-------------------
function Receive_Reply
(Self : not null access Ref; Timeout : DDS.Duration_T)
return Reply_DataReader.Container
is
begin
pragma Compile_Time_Warning
(Standard.True, "Receive_Reply unimplemented");
return raise Program_Error with "Unimplemented function Receive_Reply";
end Receive_Reply;
---------------------
-- Receive_Replies --
---------------------
function Receive_Replies
(Self : not null access Ref;
Replies : not null Reply_DataReader.Treats.Data_Sequences
.Sequence_Access;
Sample_Info : not null access DDS.SampleInfo_Seq.Sequence;
Min_Reply_Count : DDS.Natural; Max_Reply_Count : DDS.long;
Timeout : DDS.Duration_T) return DDS.ReturnCode_T
is
begin
pragma Compile_Time_Warning
(Standard.True, "Receive_Replies unimplemented");
return raise Program_Error with "Unimplemented function Receive_Replies";
end Receive_Replies;
---------------------
-- Receive_Replies --
---------------------
procedure Receive_Replies
(Self : not null access Ref;
Replies : not null Reply_DataReader.Treats.Data_Sequences
.Sequence_Access;
Sample_Info : not null access DDS.SampleInfo_Seq.Sequence;
Min_Reply_Count : DDS.Natural; Max_Reply_Count : DDS.long;
Timeout : DDS.Duration_T)
is
begin
pragma Compile_Time_Warning
(Standard.True, "Receive_Replies unimplemented");
raise Program_Error with "Unimplemented procedure Receive_Replies";
end Receive_Replies;
---------------------
-- Receive_Replies --
---------------------
function Receive_Replies
(Self : not null access Ref; Min_Reply_Count : DDS.Natural;
Max_Reply_Count : DDS.long; Timeout : DDS.Duration_T)
return Reply_DataReader.Container
is
begin
pragma Compile_Time_Warning
(Standard.True, "Receive_Replies unimplemented");
return raise Program_Error with "Unimplemented function Receive_Replies";
end Receive_Replies;
---------------------
-- Receive_Replies --
---------------------
function Receive_Replies
(Self : not null access Ref;
Replies : not null Reply_DataReader.Treats.Data_Sequences
.Sequence_Access;
Sample_Info : not null access DDS.SampleInfo_Seq.Sequence;
Min_Reply_Count : DDS.Natural; Max_Reply_Count : DDS.long;
Timeout : Duration) return DDS.ReturnCode_T
is
begin
pragma Compile_Time_Warning
(Standard.True, "Receive_Replies unimplemented");
return raise Program_Error with "Unimplemented function Receive_Replies";
end Receive_Replies;
---------------------
-- Receive_Replies --
---------------------
function Receive_Replies
(Self : not null access Ref; Min_Reply_Count : DDS.Natural;
Max_Reply_Count : DDS.long; Timeout : Duration)
return Reply_DataReader.Container
is
begin
pragma Compile_Time_Warning
(Standard.True, "Receive_Replies unimplemented");
return raise Program_Error with "Unimplemented function Receive_Replies";
end Receive_Replies;
----------------
-- Take_Reply --
----------------
function Take_Reply
(Self : not null access Ref;
Replies : aliased Reply_DataReader.Treats.Data_Type;
Sample_Info : not null access DDS.SampleInfo_Seq.Sequence;
Timeout : DDS.Duration_T) return DDS.ReturnCode_T
is
begin
pragma Compile_Time_Warning (Standard.True, "Take_Reply unimplemented");
return raise Program_Error with "Unimplemented function Take_Reply";
end Take_Reply;
------------------
-- Take_Replies --
------------------
function Take_Replies
(Self : not null access Ref;
Replies : not null Reply_DataReader.Treats.Data_Sequences
.Sequence_Access;
Sample_Info : not null access DDS.SampleInfo_Seq.Sequence;
Min_Reply_Count : DDS.Natural; Max_Reply_Count : DDS.long;
Timeout : DDS.Duration_T) return DDS.ReturnCode_T
is
begin
pragma Compile_Time_Warning
(Standard.True, "Take_Replies unimplemented");
return raise Program_Error with "Unimplemented function Take_Replies";
end Take_Replies;
------------------
-- Take_Replies --
------------------
function Take_Replies
(Self : not null access Ref; Min_Reply_Count : DDS.Natural;
Max_Reply_Count : DDS.long; Timeout : DDS.Duration_T)
return Reply_DataReader.Container
is
begin
pragma Compile_Time_Warning
(Standard.True, "Take_Replies unimplemented");
return raise Program_Error with "Unimplemented function Take_Replies";
end Take_Replies;
------------------------------------
-- Take_Reply_For_Related_Request --
------------------------------------
function Take_Reply_For_Related_Request
(Self : not null access Ref;
Replies : aliased Reply_DataReader.Treats.Data_Type;
Sample_Info : not null access DDS.SampleInfo_Seq.Sequence;
Related_Request_Info : not null access DDS.SampleIdentity_T)
return DDS.ReturnCode_T
is
begin
pragma Compile_Time_Warning
(Standard.True, "Take_Reply_For_Related_Request unimplemented");
return
raise Program_Error
with "Unimplemented function Take_Reply_For_Related_Request";
end Take_Reply_For_Related_Request;
--------------------------------------
-- Take_Replies_For_Related_Request --
--------------------------------------
function Take_Replies_For_Related_Request
(Self : not null access Ref;
Replies : not null Reply_DataReader.Treats.Data_Sequences
.Sequence_Access;
Sample_Info : not null access DDS.SampleInfo_Seq.Sequence;
Related_Request_Info : not null access DDS.SampleIdentity_T)
return DDS.ReturnCode_T
is
begin
pragma Compile_Time_Warning
(Standard.True, "Take_Replies_For_Related_Request unimplemented");
return
raise Program_Error
with "Unimplemented function Take_Replies_For_Related_Request";
end Take_Replies_For_Related_Request;
--------------------------------------
-- Take_Replies_For_Related_Request --
--------------------------------------
function Take_Replies_For_Related_Request
(Self : not null access Ref;
Related_Request_Info : not null access DDS.SampleIdentity_T)
return Reply_DataReader.Container
is
begin
pragma Compile_Time_Warning
(Standard.True, "Take_Replies_For_Related_Request unimplemented");
return
raise Program_Error
with "Unimplemented function Take_Replies_For_Related_Request";
end Take_Replies_For_Related_Request;
----------------
-- Read_Reply --
----------------
function Read_Reply
(Self : not null access Ref;
Replies : aliased Reply_DataReader.Treats.Data_Type;
Sample_Info : not null access DDS.SampleInfo_Seq.Sequence;
Timeout : DDS.Duration_T) return DDS.ReturnCode_T
is
begin
pragma Compile_Time_Warning (Standard.True, "Read_Reply unimplemented");
return raise Program_Error with "Unimplemented function Read_Reply";
end Read_Reply;
------------------
-- Read_Replies --
------------------
function Read_Replies
(Self : not null access Ref;
Replies : not null Reply_DataReader.Treats.Data_Sequences
.Sequence_Access;
Sample_Info : not null access DDS.SampleInfo_Seq.Sequence;
Min_Reply_Count : DDS.Natural; Max_Reply_Count : DDS.long;
Timeout : DDS.Duration_T) return DDS.ReturnCode_T
is
begin
pragma Compile_Time_Warning
(Standard.True, "Read_Replies unimplemented");
return raise Program_Error with "Unimplemented function Read_Replies";
end Read_Replies;
------------------
-- Read_Replies --
------------------
function Read_Replies
(Self : not null access Ref; Min_Reply_Count : DDS.Natural;
Max_Reply_Count : DDS.long; Timeout : DDS.Duration_T)
return Reply_DataReader.Container'Class
is
begin
pragma Compile_Time_Warning
(Standard.True, "Read_Replies unimplemented");
return raise Program_Error with "Unimplemented function Read_Replies";
end Read_Replies;
------------------------------------
-- Read_Reply_For_Related_Request --
------------------------------------
function Read_Reply_For_Related_Request
(Self : not null access Ref;
Replies : aliased Reply_DataReader.Treats.Data_Type;
Sample_Info : not null access DDS.SampleInfo_Seq.Sequence;
Related_Request_Info : DDS.SampleIdentity_T) return DDS.ReturnCode_T
is
begin
pragma Compile_Time_Warning
(Standard.True, "Read_Reply_For_Related_Request unimplemented");
return
raise Program_Error
with "Unimplemented function Read_Reply_For_Related_Request";
end Read_Reply_For_Related_Request;
--------------------------------------
-- Read_Replies_For_Related_Request --
--------------------------------------
function Read_Replies_For_Related_Request
(Self : not null access Ref;
Replies : not null Reply_DataReader.Treats.Data_Sequences
.Sequence_Access;
Sample_Info : not null access DDS.SampleInfo_Seq.Sequence;
Related_Request_Info : DDS.SampleIdentity_T) return DDS.ReturnCode_T
is
begin
pragma Compile_Time_Warning
(Standard.True, "Read_Replies_For_Related_Request unimplemented");
return
raise Program_Error
with "Unimplemented function Read_Replies_For_Related_Request";
end Read_Replies_For_Related_Request;
--------------------------------------
-- Read_Replies_For_Related_Request --
--------------------------------------
function Read_Replies_For_Related_Request
(Self : not null access Ref; Related_Request_Info : DDS.SampleIdentity_T)
return Reply_DataReader.Container'Class
is
begin
pragma Compile_Time_Warning
(Standard.True, "Read_Replies_For_Related_Request unimplemented");
return
raise Program_Error
with "Unimplemented function Read_Replies_For_Related_Request";
end Read_Replies_For_Related_Request;
-----------------
-- Return_Loan --
-----------------
procedure Return_Loan
(Self : not null access Ref;
Replies : not null Reply_DataReader.Treats.Data_Sequences
.Sequence_Access;
Sample_Info : DDS.SampleInfo_Seq.Sequence_Access)
is
begin
pragma Compile_Time_Warning (Standard.True, "Return_Loan unimplemented");
raise Program_Error with "Unimplemented procedure Return_Loan";
end Return_Loan;
-----------------
-- Return_Loan --
-----------------
procedure Return_Loan
(Self : not null access Ref;
Replies : Reply_DataReader.Treats.Data_Sequences.Sequence;
Sample_Info : DDS.SampleInfo_Seq.Sequence)
is
begin
pragma Compile_Time_Warning (Standard.True, "Return_Loan unimplemented");
raise Program_Error with "Unimplemented procedure Return_Loan";
end Return_Loan;
------------
-- Delete --
------------
procedure Delete (This : in out Ref) is
begin
pragma Compile_Time_Warning (Standard.True, "Delete unimplemented");
raise Program_Error with "Unimplemented procedure Delete";
end Delete;
----------------------
-- Wait_For_Replies --
----------------------
procedure Wait_For_Replies
(This : in out Ref; Min_Count : Dds.long; Max_Wait : DDS.Duration_T)
is
begin
pragma Compile_Time_Warning
(Standard.True, "Wait_For_Replies unimplemented");
raise Program_Error with "Unimplemented procedure Wait_For_Replies";
end Wait_For_Replies;
-----------------------------------------
-- Wait_For_Replies_For_Related_Reques --
-----------------------------------------
procedure Wait_For_Replies_For_Related_Reques
(This : in out Ref; Min_Count : Dds.long; Max_Wait : DDS.Duration_T;
Related_Request_Id : DDS.SampleIdentity_T)
is
begin
pragma Compile_Time_Warning
(Standard.True, "Wait_For_Replies_For_Related_Reques unimplemented");
raise Program_Error
with "Unimplemented procedure Wait_For_Replies_For_Related_Reques";
end Wait_For_Replies_For_Related_Reques;
----------------------------
-- Get_Request_DataWriter --
----------------------------
function Get_Request_DataWriter
(Self : not null access Ref) return Request_DataWriter.Ref_Access
is
begin
pragma Compile_Time_Warning
(Standard.True, "Get_Request_DataWriter unimplemented");
return
raise Program_Error
with "Unimplemented function Get_Request_DataWriter";
end Get_Request_DataWriter;
--------------------------
-- Get_Reply_DataReader --
--------------------------
function Get_Reply_DataReader
(Self : not null access Ref) return Reply_DataReader.Ref_Access
is
begin
pragma Compile_Time_Warning
(Standard.True, "Get_Reply_DataReader unimplemented");
return
raise Program_Error with "Unimplemented function Get_Reply_DataReader";
end Get_Reply_DataReader;
--------------------------------
-- On_Offered_Deadline_Missed --
--------------------------------
procedure On_Offered_Deadline_Missed
(Self : not null access DataReader_Listner;
Writer : access DDS.DataWriter.Ref'Class;
Status : in DDS.OfferedDeadlineMissedStatus)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Offered_Deadline_Missed unimplemented");
raise Program_Error
with "Unimplemented procedure On_Offered_Deadline_Missed";
end On_Offered_Deadline_Missed;
-----------------------
-- On_Data_Available --
-----------------------
procedure On_Data_Available
(Self : not null access DataReader_Listner;
The_Reader : in DDS.DataReaderListener.DataReader_Access)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Data_Available unimplemented");
raise Program_Error with "Unimplemented procedure On_Data_Available";
end On_Data_Available;
---------------------------------
-- On_Offered_Incompatible_Qos --
---------------------------------
procedure On_Offered_Incompatible_Qos
(Self : not null access DataReader_Listner;
Writer : access DDS.DataWriter.Ref'Class;
Status : in DDS.OfferedIncompatibleQosStatus)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Offered_Incompatible_Qos unimplemented");
raise Program_Error
with "Unimplemented procedure On_Offered_Incompatible_Qos";
end On_Offered_Incompatible_Qos;
------------------------
-- On_Liveliness_Lost --
------------------------
procedure On_Liveliness_Lost
(Self : not null access DataReader_Listner;
Writer : access DDS.DataWriter.Ref'Class;
Status : in DDS.LivelinessLostStatus)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Liveliness_Lost unimplemented");
raise Program_Error with "Unimplemented procedure On_Liveliness_Lost";
end On_Liveliness_Lost;
----------------------------
-- On_Publication_Matched --
----------------------------
procedure On_Publication_Matched
(Self : not null access DataReader_Listner;
Writer : access DDS.DataWriter.Ref'Class;
Status : in DDS.PublicationMatchedStatus)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Publication_Matched unimplemented");
raise Program_Error
with "Unimplemented procedure On_Publication_Matched";
end On_Publication_Matched;
--------------------------------------
-- On_Reliable_Writer_Cache_Changed --
--------------------------------------
procedure On_Reliable_Writer_Cache_Changed
(Self : not null access DataReader_Listner;
Writer : access DDS.DataWriter.Ref'Class;
Status : in DDS.ReliableWriterCacheChangedStatus)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Reliable_Writer_Cache_Changed unimplemented");
raise Program_Error
with "Unimplemented procedure On_Reliable_Writer_Cache_Changed";
end On_Reliable_Writer_Cache_Changed;
-----------------------------------------
-- On_Reliable_Reader_Activity_Changed --
-----------------------------------------
procedure On_Reliable_Reader_Activity_Changed
(Self : not null access DataReader_Listner;
Writer : access DDS.DataWriter.Ref'Class;
Status : in DDS.ReliableReaderActivityChangedStatus)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Reliable_Reader_Activity_Changed unimplemented");
raise Program_Error
with "Unimplemented procedure On_Reliable_Reader_Activity_Changed";
end On_Reliable_Reader_Activity_Changed;
--------------------------------
-- On_Destination_Unreachable --
--------------------------------
procedure On_Destination_Unreachable
(Self : not null access DataReader_Listner;
Writer : access DDS.DataWriter.Ref'Class;
Instance : in DDS.InstanceHandle_T; Locator : in DDS.Locator_T)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Destination_Unreachable unimplemented");
raise Program_Error
with "Unimplemented procedure On_Destination_Unreachable";
end On_Destination_Unreachable;
---------------------
-- On_Data_Request --
---------------------
procedure On_Data_Request
(Self : not null access DataReader_Listner;
Writer : access DDS.DataWriter.Ref'Class; Cookie : in DDS.Cookie_T;
Request : in out System.Address)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Data_Request unimplemented");
raise Program_Error with "Unimplemented procedure On_Data_Request";
end On_Data_Request;
--------------------
-- On_Data_Return --
--------------------
procedure On_Data_Return
(Self : not null access DataReader_Listner;
Writer : access DDS.DataWriter.Ref'Class; Arg : System.Address;
Cookie : in DDS.Cookie_T)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Data_Return unimplemented");
raise Program_Error with "Unimplemented procedure On_Data_Return";
end On_Data_Return;
-----------------------
-- On_Sample_Removed --
-----------------------
procedure On_Sample_Removed
(Self : not null access DataReader_Listner;
Writer : access DDS.DataWriter.Ref'Class; Cookie : in DDS.Cookie_T)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Sample_Removed unimplemented");
raise Program_Error with "Unimplemented procedure On_Sample_Removed";
end On_Sample_Removed;
--------------------------
-- On_Instance_Replaced --
--------------------------
procedure On_Instance_Replaced
(Self : not null access DataReader_Listner;
Writer : access DDS.DataWriter.Ref'Class;
Instance : in DDS.InstanceHandle_T)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Instance_Replaced unimplemented");
raise Program_Error with "Unimplemented procedure On_Instance_Replaced";
end On_Instance_Replaced;
-----------------------------------
-- On_Application_Acknowledgment --
-----------------------------------
procedure On_Application_Acknowledgment
(Self : not null access DataReader_Listner;
Writer : access DDS.DataWriter.Ref'Class;
Info : in DDS.AcknowledgmentInfo)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Application_Acknowledgment unimplemented");
raise Program_Error
with "Unimplemented procedure On_Application_Acknowledgment";
end On_Application_Acknowledgment;
---------------------------------
-- On_Service_Request_Accepted --
---------------------------------
procedure On_Service_Request_Accepted
(Self : not null access DataReader_Listner;
Writer : access DDS.DataWriter.Ref'Class;
Info : in DDS.ServiceRequestAcceptedStatus)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Service_Request_Accepted unimplemented");
raise Program_Error
with "Unimplemented procedure On_Service_Request_Accepted";
end On_Service_Request_Accepted;
----------------------------------
-- On_Requested_Deadline_Missed --
----------------------------------
procedure On_Requested_Deadline_Missed
(Self : not null access DataWriter_Listner;
The_Reader : in DDS.DataReaderListener.DataReader_Access;
Status : in DDS.RequestedDeadlineMissedStatus)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Requested_Deadline_Missed unimplemented");
raise Program_Error
with "Unimplemented procedure On_Requested_Deadline_Missed";
end On_Requested_Deadline_Missed;
-----------------------------------
-- On_Requested_Incompatible_Qos --
-----------------------------------
procedure On_Requested_Incompatible_Qos
(Self : not null access DataWriter_Listner;
The_Reader : in DDS.DataReaderListener.DataReader_Access;
Status : in DDS.RequestedIncompatibleQosStatus)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Requested_Incompatible_Qos unimplemented");
raise Program_Error
with "Unimplemented procedure On_Requested_Incompatible_Qos";
end On_Requested_Incompatible_Qos;
------------------------
-- On_Sample_Rejected --
------------------------
procedure On_Sample_Rejected
(Self : not null access DataWriter_Listner;
The_Reader : in DDS.DataReaderListener.DataReader_Access;
Status : in DDS.SampleRejectedStatus)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Sample_Rejected unimplemented");
raise Program_Error with "Unimplemented procedure On_Sample_Rejected";
end On_Sample_Rejected;
---------------------------
-- On_Liveliness_Changed --
---------------------------
procedure On_Liveliness_Changed
(Self : not null access DataWriter_Listner;
The_Reader : in DDS.DataReaderListener.DataReader_Access;
Status : in DDS.LivelinessChangedStatus)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Liveliness_Changed unimplemented");
raise Program_Error with "Unimplemented procedure On_Liveliness_Changed";
end On_Liveliness_Changed;
-----------------------
-- On_Data_Available --
-----------------------
procedure On_Data_Available
(Self : not null access DataWriter_Listner;
The_Reader : in DDS.DataReaderListener.DataReader_Access)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Data_Available unimplemented");
raise Program_Error with "Unimplemented procedure On_Data_Available";
end On_Data_Available;
-----------------------------
-- On_Subscription_Matched --
-----------------------------
procedure On_Subscription_Matched
(Self : not null access DataWriter_Listner;
The_Reader : in DDS.DataReaderListener.DataReader_Access;
Status : in DDS.SubscriptionMatchedStatus)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Subscription_Matched unimplemented");
raise Program_Error
with "Unimplemented procedure On_Subscription_Matched";
end On_Subscription_Matched;
--------------------
-- On_Sample_Lost --
--------------------
procedure On_Sample_Lost
(Self : not null access DataWriter_Listner;
The_Reader : in DDS.DataReaderListener.DataReader_Access;
Status : in DDS.SampleLostStatus)
is
begin
pragma Compile_Time_Warning
(Standard.True, "On_Sample_Lost unimplemented");
raise Program_Error with "Unimplemented procedure On_Sample_Lost";
end On_Sample_Lost;
end DDS.Request_Reply.Requester.Typed_Requester_Generic;
|
text/credits_text.asm | AmateurPanda92/pokemon-rby-dx | 9 | 167602 | CreditsTextPointers:
dw CredVersion
dw CredTajiri
dw CredTaOota
dw CredMorimoto
dw CredWatanabe
dw CredMasuda
dw CredNisino
dw CredSugimori
dw CredNishida
dw CredMiyamoto
dw CredKawaguchi
dw CredIshihara
dw CredYamauchi
dw CredZinnai
dw CredHishida
dw CredSakai
dw CredYamaguchi
dw CredYamamoto
dw CredTaniguchi
dw CredNonomura
dw CredFuziwara
dw CredMatsusima
dw CredTomisawa
dw CredKawamoto
dw CredKakei
dw CredTsuchiya
dw CredTaNakamura
dw CredYuda
dw CredMon
dw CredDirector
dw CredProgrammers
dw CredCharDesign
dw CredMusic
dw CredSoundEffects
dw CredGameDesign
dw CredMonsterDesign
dw CredGameScene
dw CredParam
dw CredMap
dw CredTest
dw CredSpecial
dw CredProducers
dw CredProducer
dw CredExecutive
dw CredTamada
dw CredSaOota
dw CredYoshikawa
dw CredToOota
dw CredUSStaff
dw CredUSCoord
dw CredTilden
dw CredKawakami
dw CredHiNakamura
dw CredGiese
dw CredOsborne
dw CredTrans
dw CredOgasawara
dw CredIwata
dw CredIzushi
dw CredHarada
dw CredMurakawa
dw CredFukui
dw CredClub
dw CredPAAD
CredVersion: ; this 1 byte difference makes all bank addresses offset by 1 in the blue version
IF DEF(_RED)
db -8, "RED VERSION STAFF@"
ENDC
IF DEF(_BLUE)
db -8, "BLUE VERSION STAFF@"
ENDC
CredTajiri:
db -6, "<NAME>@"
CredTaOota:
db -6, "TAKENORI OOTA@"
CredMorimoto:
db -7, "<NAME>@"
CredWatanabe:
db -7, "<NAME>@"
CredMasuda:
db -6, "<NAME>@"
CredNisino:
db -5, "<NAME>@"
CredSugimori:
db -5, "KEN SUGIMORI@"
CredNishida:
db -6, "<NAME>ISHIDA@"
CredMiyamoto:
db -7, "<NAME>@"
CredKawaguchi:
db -8, "<NAME>@"
CredIshihara:
db -8, "<NAME>@"
CredYamauchi:
db -7, "<NAME>@"
CredZinnai:
db -7, "<NAME>@"
CredHishida:
db -7, "<NAME>@"
CredSakai:
db -6, "<NAME>@"
CredYamaguchi:
db -7, "<NAME>I@"
CredYamamoto:
db -8, "KAZUYUKI YAMAMOTO@"
CredTaniguchi:
db -8, "<NAME>@"
CredNonomura:
db -8, "<NAME>OMURA@"
CredFuziwara:
db -7, "MOTOFUMI FUZIWARA@"
CredMatsusima:
db -7, "<NAME>@"
CredTomisawa:
db -7, "<NAME>MISAWA@"
CredKawamoto:
db -7, "<NAME>@"
CredKakei:
db -6, "AKIYOSHI KAKEI@"
CredTsuchiya:
db -7, "KAZUKI TSUCHIYA@"
CredTaNakamura:
db -6, "TAKEO NAKAMURA@"
CredYuda:
db -6, "<NAME>@"
CredMon:
db -3, "#MON@"
CredDirector:
db -3, "DIRECTOR@"
CredProgrammers:
db -5, "PROGRAMMERS@"
CredCharDesign:
db -7, "CHARACTER DESIGN@"
CredMusic:
db -2, "MUSIC@"
CredSoundEffects:
db -6, "SOUND EFFECTS@"
CredGameDesign:
db -5, "GAME DESIGN@"
CredMonsterDesign:
db -6, "MONSTER DESIGN@"
CredGameScene:
db -6, "GAME SCENARIO@"
CredParam:
db -8, "PARAMETRIC DESIGN@"
CredMap:
db -4, "MAP DESIGN@"
CredTest:
db -7, "PRODUCT TESTING@"
CredSpecial:
db -6, "SPECIAL THANKS@"
CredProducers:
db -4, "PRODUCERS@"
CredProducer:
db -4, "PRODUCER@"
CredExecutive:
db -8, "EXECUTIVE PRODUCER@"
CredTamada:
db -6, "SOUSUKE TAMADA@"
CredSaOota:
db -5, "SATOSHI OOTA@"
CredYoshikawa:
db -6, "<NAME>@"
CredToOota:
db -6, "TOMOMICHI OOTA@"
CredUSStaff:
db -7, "US VERSION STAFF@"
CredUSCoord:
db -7, "US COORDINATION@"
CredTilden:
db -5, "GAIL TILDEN@"
CredKawakami:
db -6, "<NAME>I@"
CredHiNakamura:
db -6, "<NAME>@"
CredGiese:
db -6, "<NAME>@"
CredOsborne:
db -5, "<NAME>@"
CredTrans:
db -7, "TEXT TRANSLATION@"
CredOgasawara:
db -6, "NOB OGASAWARA@"
CredIwata:
db -5, "<NAME>@"
CredIzushi:
db -7, "<NAME>@"
CredHarada:
db -7, "<NAME>@"
CredMurakawa:
db -7, "<NAME>@"
CredFukui:
db -5, "<NAME>@"
CredClub:
db -9, "NCL SUPER MARIO CLUB@"
CredPAAD:
db -5, "PAAD TESTING@"
|
projects/batfish/src/main/antlr4/org/batfish/grammar/cisco_nxos/CiscoNxos_vdc.g4 | yrll/batfish-repair | 1 | 6636 | <gh_stars>1-10
parser grammar CiscoNxos_vdc;
import CiscoNxos_common;
options {
tokenVocab = CiscoNxosLexer;
}
vdc_id
:
// 1-4
uint8
;
vdc_name
:
WORD
;
s_vdc
:
VDC name = vdc_name ID id = vdc_id NEWLINE
(
vdc_allow
| vdc_limit_resource
)*
;
vdc_allow
:
ALLOW FEATURE_SET FEX NEWLINE
;
vdc_limit_resource
:
LIMIT_RESOURCE null_rest_of_line
; |
src/006/steps_4.adb | xeenta/learning-ada | 0 | 2847 | <gh_stars>0
with Ada.Text_IO; use Ada.Text_IO;
procedure Steps_4 is
task Step_By_Step is
entry Step_One;
entry Step_Two;
entry Step_Three;
entry Finish;
end Step_By_Step;
task body Step_By_Step is
Keep_Looping : Boolean := TRUE;
begin
while Keep_Looping loop
select
accept Step_One do
Put_Line ("1");
end Step_One;
or
accept Step_Two do
Put_Line ("2");
end Step_Two;
or
accept Step_Three do
Put_Line ("3");
end Step_Three;
or
accept Finish do
Keep_Looping := FALSE;
end Finish;
end select;
Put_Line ("Again!");
end loop;
Put_Line ("Here we go");
end Step_By_Step;
begin
delay 1.0;
Put_Line ("Bye?");
Step_By_Step.Step_Three;
delay 1.0;
Step_By_Step.Step_Two;
delay 1.0;
Put_Line ("Bye by me, not by the task!");
delay 1.0;
Step_By_Step.Finish;
end;
|
ADL/Assemble/Delete/2/BHR_delete_middle.asm | MaxMorning/LinkedListVisualization | 3 | 176197 | aLine 0
gNew delPtr
gMoveNext delPtr, Root
aLine 1
sInit i, 0
sBge i, {0:D}, 10
aLine 2
gBne delPtr, null, 3
aLine 3
Exception NOT_FOUND
aLine 5
gMoveNext delPtr, delPtr
aLine 1
sInc i, 1
Jmp -9
aLine 7
gBne delPtr, null, 3
aLine 8
Exception NOT_FOUND
aLine 10
gNewVPtr delNext
gMoveNext delNext, delPtr
gNewVPtr delPrev
gMovePrev delPrev, delPtr
nMoveRel delPtr, delPtr, 0, -164.545
gBne delPtr, Rear, 4
aLine 11
gMove Rear, delPrev
Jmp 3
aLine 14
pSetPrev delNext, delPrev
aLine 16
pSetNext delPrev, delNext
aLine 17
pDeleteNext delPtr
pDeletePrev delPtr
nDelete delPtr
gDelete delPtr
gDelete delPrev
gDelete delNext
aLine 18
aStd
Halt |
src/main/kotlin/craicoverflow89/kjson/parser/KJSON.g4 | CraicOverflow89/KJSON | 0 | 2638 | <gh_stars>0
grammar KJSON;
@header {
import craicoverflow89.kjson.*;
import java.lang.StringBuffer;
import java.util.ArrayList;
import java.util.HashMap;
}
// Parser Rules
json returns [KJSON result]
: jsonData {$result = new KJSON($jsonData.result);}
EOF
;
jsonArray returns [KJSONArray result]
: {ArrayList<KJSONData> data = new ArrayList();}
SQBR1
(
data1 = jsonData {data.add($data1.result);}
(
COMMA SPACE?
data2 = jsonData {data.add($data2.result);}
)*
)?
SQBR2
{$result = new KJSONArray(data);}
;
jsonChars
: CHAR+
;
jsonData returns [KJSONData result]
: (
jsonArray {$result = $jsonArray.result;}
|
jsonDouble {$result = $jsonDouble.result;}
|
jsonInteger {$result = $jsonInteger.result;}
|
jsonMap {$result = $jsonMap.result;}
|
jsonString {$result = $jsonString.result;}
)
;
jsonDigits
: DIGIT+
;
jsonDouble returns [KJSONDouble result]
: {
StringBuffer buffer = new StringBuffer();
boolean minus = false;
}
(
MINUS {minus = true;}
)?
digit1 = jsonDigits {buffer.append($digit1.text);}
(
PERIOD {buffer.append(".");}
digit2 = jsonDigits {buffer.append($digit2.text);}
)
{
double value = Double.parseDouble(buffer.toString());
if(minus) value = -value;
$result = new KJSONDouble(value);
}
;
jsonInteger returns [KJSONInteger result]
: {boolean minus = false;}
(
MINUS {minus = true;}
)?
jsonDigits
{
int value = Integer.parseInt($jsonDigits.text);
if(minus) value = -value;
$result = new KJSONInteger(value);
}
;
jsonMap returns [KJSONMap result]
: {ArrayList<KJSONMapPair> data = new ArrayList();}
CUBR1
(
pair1 = jsonMapPair {data.add($pair1.result);}
(
COMMA
pair2 = jsonMapPair {data.add($pair2.result);}
)*
)?
CUBR2
{$result = new KJSONMap(data);}
;
jsonMapPair returns [KJSONMapPair result]
: QUOTE jsonChars QUOTE COLON jsonData
{$result = new KJSONMapPair($jsonChars.text, $jsonData.result);}
;
jsonString returns [KJSONString result]
: {StringBuffer buffer = new StringBuffer();}
QUOTE
(
jsonChars {buffer.append($jsonChars.text);}
|
SPACE {buffer.append(" ");}
)+
QUOTE
{$result = new KJSONString(buffer.toString());}
;
// Lexer Rules
COLON: ':';
COMMA: ',';
CUBR1: '{';
CUBR2: '}';
DIGIT: [0-9];
MINUS: '-';
PERIOD: '.';
QUOTE: '"';
SPACE: ' ';
SQBR1: '[';
SQBR2: ']';
WHITESPACE: [ \t\r\n]+ -> skip;
CHAR: .; |
programs/oeis/307/A307989.asm | neoneye/loda | 22 | 8044 | ; A307989: a(n) = n - pi(2*n) + pi(n-1), where pi is the prime counting function.
; 0,0,1,2,3,4,4,6,6,6,7,8,9,11,11,11,12,14,14,16,16,16,17,18,19,20,20,21,22,23,23,25,26,26,27,27,27,29,30,30,31,32,33,35,35,36,37,39,39,40,40,40,41,42,42,43,43,44,45,47,48,50,51,51,52,52,53,55
mov $2,$0
add $2,2
mov $4,1
mov $5,$0
lpb $2
sub $2,1
mov $3,$5
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $5,1
lpe
add $0,$4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.