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
src/Lib/Sassy/tests/fp2.asm
pnkfelix/larceny
212
165300
BITS 32 section .text foo: fcmovb st0, st2 fcmove st0, st3 fcmovbe st0, st4 fcmovu st0, st5 fcmovnb st0, st6 fcmovne st0, st7 fcmovnbe st0, st1 fcmovnu st0, st2 fxch fucom st3 fld tword [eax] fstp qword [ebx] fld dword [ecx] fstp st4 fst dword [edx] fst qword [ebx] fst st3 fild word [ebx] fistp dword [ebx] fild qword [ebx] fist word [ecx] ficom dword [ecx] ficomp word [ecx] fcomp dword [edi] fcom qword [edi] fcomp st0 fcomi st0, st7 fcomip st0, st6 fucomi st0, st5 fucomip st0, st4
src/H-level.agda
nad/equality
3
2246
------------------------------------------------------------------------ -- H-levels ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} -- Partly based on Voevodsky's work on so-called univalent -- foundations. open import Equality module H-level {reflexive} (eq : ∀ {a p} → Equality-with-J a p reflexive) where open Derived-definitions-and-properties eq open import Logical-equivalence hiding (id; _∘_) open import Nat eq open import Prelude open import Surjection eq hiding (id; _∘_) private variable a ℓ : Level m n : ℕ A B : Type a ------------------------------------------------------------------------ -- H-levels -- H-levels ("homotopy levels"). H-level : ℕ → Type ℓ → Type ℓ H-level zero A = Contractible A H-level (suc zero) A = Is-proposition A H-level (suc (suc n)) A = {x y : A} → H-level (suc n) (x ≡ y) private -- Note that H-level 2 is a synonym for Is-set. H-level-2≡Is-set : H-level 2 A ≡ Is-set A H-level-2≡Is-set = refl _ -- For-iterated-equality n P A means that P holds for (equalities -- over)^n A. For-iterated-equality : ℕ → (Type ℓ → Type ℓ) → (Type ℓ → Type ℓ) For-iterated-equality zero P A = P A For-iterated-equality (suc n) P A = (x y : A) → For-iterated-equality n P (x ≡ y) -- An alternative definition of h-levels. -- -- In some cases this definition, with only two cases, is easier to -- use. In other cases the definition above, which is less complicated -- for positive h-levels, is easier to use. H-level′ : ℕ → Type ℓ → Type ℓ H-level′ = flip For-iterated-equality Contractible -- Propositions are propositional types. Proposition : (ℓ : Level) → Type (lsuc ℓ) Proposition _ = ∃ Is-proposition -- Types that are sets. Set : (ℓ : Level) → Type (lsuc ℓ) Set _ = ∃ Is-set -- The underlying type. ⌞_⌟ : Set ℓ → Type ℓ ⌞ A ⌟ = proj₁ A ------------------------------------------------------------------------ -- General properties -- H-level′ is upwards closed in its first argument. mono₁′ : ∀ n → H-level′ n A → H-level′ (1 + n) A mono₁′ (suc n) h x y = mono₁′ n (h x y) mono₁′ {A = A} zero h x y = trivial x y , irr where trivial : (x y : A) → x ≡ y trivial x y = x ≡⟨ sym $ proj₂ h x ⟩ proj₁ h ≡⟨ proj₂ h y ⟩∎ y ∎ irr : (x≡y : x ≡ y) → trivial x y ≡ x≡y irr = elim (λ {x y} x≡y → trivial x y ≡ x≡y) (λ x → trans-symˡ (proj₂ h x)) -- H-level and H-level′ are pointwise logically equivalent. H-level⇔H-level′ : H-level n A ⇔ H-level′ n A H-level⇔H-level′ = record { to = to _; from = from _ } where to : ∀ n → H-level n A → H-level′ n A to zero h = h to (suc zero) h = λ x → mono₁′ 0 (x , h x) x to (suc (suc n)) h = λ x y → to (suc n) h from : ∀ n → H-level′ n A → H-level n A from zero h = h from (suc zero) h x y = proj₁ (h x y) from (suc (suc n)) h {x = x} {y = y} = from (suc n) (h x y) -- If A has h-level 1 + n, then the types of equality proofs between -- elements of type A have h-level n. +⇒≡ : {x y : A} → H-level (suc n) A → H-level n (x ≡ y) +⇒≡ h = _⇔_.from H-level⇔H-level′ $ _⇔_.to H-level⇔H-level′ h _ _ -- H-level is upwards closed in its first argument. mono₁ : ∀ n → H-level n A → H-level (1 + n) A mono₁ n = _⇔_.from H-level⇔H-level′ ∘ mono₁′ n ∘ _⇔_.to H-level⇔H-level′ abstract mono : m ≤ n → H-level m A → H-level n A mono (≤-refl′ eq) = subst (λ n → H-level n _) eq mono (≤-step′ m≤n eq) = subst (λ n → H-level n _) eq ∘ mono₁ _ ∘ mono m≤n -- If A has h-level n, then the types of equality proofs between -- elements of type A also have h-level n. ⇒≡ : {x y : A} → ∀ n → H-level n A → H-level n (x ≡ y) ⇒≡ _ = +⇒≡ ∘ mono₁ _ -- If something is contractible given the assumption that it is -- inhabited, then it is propositional. [inhabited⇒contractible]⇒propositional : (A → Contractible A) → Is-proposition A [inhabited⇒contractible]⇒propositional h x = mono₁ 0 (h x) x -- If something has h-level (1 + n) given the assumption that it is -- inhabited, then it has h-level (1 + n). [inhabited⇒+]⇒+ : ∀ n → (A → H-level (1 + n) A) → H-level (1 + n) A [inhabited⇒+]⇒+ n h = _⇔_.from H-level⇔H-level′ λ x → _⇔_.to H-level⇔H-level′ (h x) x -- An alternative characterisation of sets and higher h-levels. -- -- This is Theorem 7.2.7 from the HoTT book. 2+⇔∀1+≡ : ∀ n → H-level (2 + n) A ⇔ ((x : A) → H-level (1 + n) (x ≡ x)) 2+⇔∀1+≡ n = record { to = λ h _ → h ; from = λ h → [inhabited⇒+]⇒+ _ (elim (λ {x y} _ → H-level (1 + n) (x ≡ y)) h) } -- If a propositional type is inhabited, then it is contractible. propositional⇒inhabited⇒contractible : Is-proposition A → A → Contractible A propositional⇒inhabited⇒contractible p x = (x , p x) -- H-level′ n respects (split) surjections. respects-surjection′ : A ↠ B → ∀ n → H-level′ n A → H-level′ n B respects-surjection′ A↠B zero (x , irr) = (to x , irr′) where open _↠_ A↠B irr′ : ∀ y → to x ≡ y irr′ = λ y → to x ≡⟨ cong to (irr (from y)) ⟩ to (from y) ≡⟨ right-inverse-of y ⟩∎ y ∎ respects-surjection′ A↠B (suc n) h = λ x y → respects-surjection′ (↠-≡ A↠B) n (h (from x) (from y)) where open _↠_ A↠B -- H-level n respects (split) surjections. respects-surjection : A ↠ B → ∀ n → H-level n A → H-level n B respects-surjection A↠B n = _⇔_.from H-level⇔H-level′ ∘ respects-surjection′ A↠B n ∘ _⇔_.to H-level⇔H-level′
Modul 6/seriter.asm
hyuwah/fu-praktikum-smd
0
178960
;------------------------------------------------------------------- ; Praktikum SMD 2015 ; M.Wahyudin (140310120031) ; ; Name : LATIH30.ASM (SERITER) ; Desc : Mennerima data serial 0 - 255, baudrate 1200 ; Input : Serial pin P3.0 & P3.1 ; Output: P1 ;------------------------------------------------------------------- mulai: mov scon, #52h ; aktifkan port serial mode 1 mov tmod, #20h ; timer 1 mode 2 (auto reload) mov th1, #-26 ; nilai reload untuk baudrate 1200 setb tr1 ; aktifkan timer 1 kirim: clr ri mov P1, sbuf ; terima data dari sbuf disimpan ke P1 jmp kirim end
list2/task2/src/main.adb
luk9400/nsi
0
16343
with Ada.Text_IO; with Max2; procedure Main is V : Max2.Vector := (4, 4, 4, 4); begin Ada.Text_IO.Put_Line(Max2.FindMax2 (V)'Image); end Main;
Day-08/display_all_ASCII_characters.asm
MasumBhai/50-Day-challenge-with-Assembly-Language
1
20188
;Day 08 Date-17 april,2021 ;problem - display the ASCII characters that display 10 characters per line .model small .stack 100h include 'emu8086.inc' .data n_line db 0ah,0dh,"$" ;for new line i db 0d j db 0d .code main proc mov ax,@data mov ds,ax mov cx,255 ;for loop counter xor dx,dx ;clear bx register @output: cmp j,10d je @new_line mov dl,i mov ah,2 int 21h inc i inc j mov dl,32d ;for space mov ah,2 int 21h @check_point: cmp i,255d jae @stop jb @output @new_line: mov j,0d lea dx,n_line ;new line mov ah,9 int 21h jmp @check_point @stop: mov ah,4ch int 21h ;terminate with return code main endp end main
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_1524.asm
ljhsiun2/medusa
9
15478
<filename>Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_1524.asm .global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r14 push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x1574e, %rsi lea addresses_normal_ht+0x9696, %rdi nop nop nop nop and $8616, %r10 mov $25, %rcx rep movsb nop nop nop xor $61551, %rbp lea addresses_D_ht+0x7bee, %r14 nop nop nop nop add %rdx, %rdx movl $0x61626364, (%r14) nop and $43233, %rdx lea addresses_normal_ht+0x902e, %rsi lea addresses_WC_ht+0x14dfe, %rdi clflush (%rdi) nop nop nop xor $17573, %r12 mov $48, %rcx rep movsb nop nop nop nop and %r10, %r10 lea addresses_A_ht+0x97ee, %r12 inc %rsi mov $0x6162636465666768, %r14 movq %r14, (%r12) nop nop and %r10, %r10 lea addresses_A_ht+0x1c02e, %rsi nop nop nop nop nop add $46914, %r12 movw $0x6162, (%rsi) nop nop nop sub %rbp, %rbp lea addresses_WT_ht+0xd42e, %rdx nop nop nop nop cmp $63246, %rcx mov $0x6162636465666768, %r12 movq %r12, (%rdx) nop nop nop nop nop cmp %r14, %r14 lea addresses_D_ht+0x1be2e, %rsi lea addresses_WT_ht+0x1842e, %rdi clflush (%rdi) nop nop nop nop nop inc %r14 mov $39, %rcx rep movsq nop sub %rdi, %rdi lea addresses_WT_ht+0xda2e, %rdi nop nop nop nop nop cmp %rcx, %rcx and $0xffffffffffffffc0, %rdi vmovaps (%rdi), %ymm6 vextracti128 $1, %ymm6, %xmm6 vpextrq $0, %xmm6, %r10 nop nop nop nop dec %rbp lea addresses_WT_ht+0x1178e, %rdx dec %r14 mov (%rdx), %esi dec %r12 lea addresses_normal_ht+0x19c2e, %r10 nop nop nop sub $29825, %rcx movl $0x61626364, (%r10) sub %r12, %r12 lea addresses_normal_ht+0x11cde, %rbp clflush (%rbp) nop and $16554, %rcx movl $0x61626364, (%rbp) nop nop dec %r10 lea addresses_A_ht+0x1bae, %rbp add $5792, %r10 movw $0x6162, (%rbp) nop nop nop and %rcx, %rcx lea addresses_D_ht+0x1c3ee, %rdx nop nop nop cmp %rcx, %rcx movl $0x61626364, (%rdx) nop nop nop xor %rsi, %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r14 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r14 push %r15 push %r8 push %r9 push %rcx // Store lea addresses_PSE+0xa86e, %r11 nop nop nop nop and %r8, %r8 movb $0x51, (%r11) nop nop nop nop cmp $45187, %r15 // Store lea addresses_PSE+0x499e, %r9 nop nop xor %rcx, %rcx mov $0x5152535455565758, %r11 movq %r11, %xmm4 vmovups %ymm4, (%r9) nop nop nop nop add $8856, %r10 // Faulty Load lea addresses_A+0x942e, %rcx nop nop nop nop inc %r9 movb (%rcx), %r8b lea oracles, %r14 and $0xff, %r8 shlq $12, %r8 mov (%r14,%r8,1), %r8 pop %rcx pop %r9 pop %r8 pop %r15 pop %r14 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 6, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 1, 'size': 32, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 6, 'size': 4, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 4, 'size': 8, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 10, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 11, 'size': 8, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': True, 'congruent': 9, 'size': 32, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': True, 'congruent': 5, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 10, 'size': 4, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 3, 'size': 4, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 6, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 3, 'size': 4, 'same': False, 'NT': False}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
include/sf-audio-sound.ads
Fabien-Chouteau/ASFML
0
29585
<gh_stars>0 --////////////////////////////////////////////////////////// -- SFML - Simple and Fast Multimedia Library -- Copyright (C) 2007-2015 <NAME> (<EMAIL>) -- This software is provided 'as-is', without any express or implied warranty. -- In no event will the authors be held liable for any damages arising from the use of this software. -- Permission is granted to anyone to use this software for any purpose, -- including commercial applications, and to alter it and redistribute it freely, -- subject to the following restrictions: -- 1. The origin of this software must not be misrepresented; -- you must not claim that you wrote the original software. -- If you use this software in a product, an acknowledgment -- in the product documentation would be appreciated but is not required. -- 2. Altered source versions must be plainly marked as such, -- and must not be misrepresented as being the original software. -- 3. This notice may not be removed or altered from any source distribution. --////////////////////////////////////////////////////////// --////////////////////////////////////////////////////////// with Sf.Audio.SoundStatus; with Sf.System.Vector3; with Sf.System.Time; package Sf.Audio.Sound is --////////////////////////////////////////////////////////// --/ @brief Create a new sound --/ --/ @return A new sfSound object --/ --////////////////////////////////////////////////////////// function create return sfSound_Ptr; --////////////////////////////////////////////////////////// --/ @brief Create a new sound by copying an existing one --/ --/ @param sound Sound to copy --/ --/ @return A new sfSound object which is a copy of @a sound --/ --////////////////////////////////////////////////////////// function copy (sound : sfSound_Ptr) return sfSound_Ptr; --////////////////////////////////////////////////////////// --/ @brief Destroy a sound --/ --/ @param sound Sound to destroy --/ --////////////////////////////////////////////////////////// procedure destroy (sound : sfSound_Ptr); --////////////////////////////////////////////////////////// --/ @brief Start or resume playing a sound --/ --/ This function starts the sound if it was stopped, resumes --/ it if it was paused, and restarts it from beginning if it --/ was it already playing. --/ This function uses its own thread so that it doesn't block --/ the rest of the program while the sound is played. --/ --/ @param sound Sound object --/ --////////////////////////////////////////////////////////// procedure play (sound : sfSound_Ptr); --////////////////////////////////////////////////////////// --/ @brief Pause a sound --/ --/ This function pauses the sound if it was playing, --/ otherwise (sound already paused or stopped) it has no effect. --/ --/ @param sound Sound object --/ --////////////////////////////////////////////////////////// procedure pause (sound : sfSound_Ptr); --////////////////////////////////////////////////////////// --/ @brief Stop playing a sound --/ --/ This function stops the sound if it was playing or paused, --/ and does nothing if it was already stopped. --/ It also resets the playing position (unlike sfSound_pause). --/ --/ @param sound Sound object --/ --////////////////////////////////////////////////////////// procedure stop (sound : sfSound_Ptr); --////////////////////////////////////////////////////////// --/ @brief Set the source buffer containing the audio data to play --/ --/ It is important to note that the sound buffer is not copied, --/ thus the sfSoundBuffer object must remain alive as long --/ as it is attached to the sound. --/ --/ @param sound Sound object --/ @param buffer Sound buffer to attach to the sound --/ --////////////////////////////////////////////////////////// procedure setBuffer (sound : sfSound_Ptr; buffer : sfSoundBuffer_Ptr); --////////////////////////////////////////////////////////// --/ @brief Get the audio buffer attached to a sound --/ --/ @param sound Sound object --/ --/ @return Sound buffer attached to the sound (can be NULL) --/ --////////////////////////////////////////////////////////// function getBuffer (sound : sfSound_Ptr) return sfSoundBuffer_Ptr; --////////////////////////////////////////////////////////// --/ @brief Set whether or not a sound should loop after reaching the end --/ --/ If set, the sound will restart from beginning after --/ reaching the end and so on, until it is stopped or --/ sfSound_setLoop(sound, sfFalse) is called. --/ The default looping state for sounds is false. --/ --/ @param sound Sound object --/ @param inLoop sfTrue to play in loop, sfFalse to play once --/ --////////////////////////////////////////////////////////// procedure setLoop (sound : sfSound_Ptr; inLoop : sfBool); --////////////////////////////////////////////////////////// --/ @brief Tell whether or not a sound is in loop mode --/ --/ @param sound Sound object --/ --/ @return sfTrue if the sound is looping, sfFalse otherwise --/ --////////////////////////////////////////////////////////// function getLoop (sound : sfSound_Ptr) return sfBool; --////////////////////////////////////////////////////////// --/ @brief Get the current status of a sound (stopped, paused, playing) --/ --/ @param sound Sound object --/ --/ @return Current status --/ --////////////////////////////////////////////////////////// function getStatus (sound : sfSound_Ptr) return Sf.Audio.SoundStatus.sfSoundStatus; --////////////////////////////////////////////////////////// --/ @brief Set the pitch of a sound --/ --/ The pitch represents the perceived fundamental frequency --/ of a sound; thus you can make a sound more acute or grave --/ by changing its pitch. A side effect of changing the pitch --/ is to modify the playing speed of the sound as well. --/ The default value for the pitch is 1. --/ --/ @param sound Sound object --/ @param pitch New pitch to apply to the sound --/ --////////////////////////////////////////////////////////// procedure setPitch (sound : sfSound_Ptr; pitch : float); --////////////////////////////////////////////////////////// --/ @brief Set the volume of a sound --/ --/ The volume is a value between 0 (mute) and 100 (full volume). --/ The default value for the volume is 100. --/ --/ @param sound Sound object --/ @param volume Volume of the sound --/ --////////////////////////////////////////////////////////// procedure setVolume (sound : sfSound_Ptr; volume : float); --////////////////////////////////////////////////////////// --/ @brief Set the 3D position of a sound in the audio scene --/ --/ Only sounds with one channel (mono sounds) can be --/ spatialized. --/ The default position of a sound is (0, 0, 0). --/ --/ @param sound Sound object --/ @param position Position of the sound in the scene --/ --////////////////////////////////////////////////////////// procedure setPosition (sound : sfSound_Ptr; position : Sf.System.Vector3.sfVector3f); --////////////////////////////////////////////////////////// --/ @brief Make the sound's position relative to the listener or absolute --/ --/ Making a sound relative to the listener will ensure that it will always --/ be played the same way regardless the position of the listener. --/ This can be useful for non-spatialized sounds, sounds that are --/ produced by the listener, or sounds attached to it. --/ The default value is false (position is absolute). --/ --/ @param sound Sound object --/ @param relative sfTrue to set the position relative, sfFalse to set it absolute --/ --////////////////////////////////////////////////////////// procedure setRelativeToListener (sound : sfSound_Ptr; relative : sfBool); --////////////////////////////////////////////////////////// --/ @brief Set the minimum distance of a sound --/ --/ The "minimum distance" of a sound is the maximum --/ distance at which it is heard at its maximum volume. Further --/ than the minimum distance, it will start to fade out according --/ to its attenuation factor. A value of 0 ("inside the head --/ of the listener") is an invalid value and is forbidden. --/ The default value of the minimum distance is 1. --/ --/ @param sound Sound object --/ @param distance New minimum distance of the sound --/ --////////////////////////////////////////////////////////// procedure setMinDistance (sound : sfSound_Ptr; distance : float); --////////////////////////////////////////////////////////// --/ @brief Set the attenuation factor of a sound --/ --/ The attenuation is a multiplicative factor which makes --/ the sound more or less loud according to its distance --/ from the listener. An attenuation of 0 will produce a --/ non-attenuated sound, i.e. its volume will always be the same --/ whether it is heard from near or from far. On the other hand, --/ an attenuation value such as 100 will make the sound fade out --/ very quickly as it gets further from the listener. --/ The default value of the attenuation is 1. --/ --/ @param sound Sound object --/ @param attenuation New attenuation factor of the sound --/ --////////////////////////////////////////////////////////// procedure setAttenuation (sound : sfSound_Ptr; attenuation : float); --////////////////////////////////////////////////////////// --/ @brief Change the current playing position of a sound --/ --/ The playing position can be changed when the sound is --/ either paused or playing. --/ --/ @param sound Sound object --/ @param timeOffset New playing position --/ --////////////////////////////////////////////////////////// procedure setPlayingOffset (sound : sfSound_Ptr; timeOffset : Sf.System.Time.sfTime); --////////////////////////////////////////////////////////// --/ @brief Get the pitch of a sound --/ --/ @param sound Sound object --/ --/ @return Pitch of the sound --/ --////////////////////////////////////////////////////////// function getPitch (sound : sfSound_Ptr) return float; --////////////////////////////////////////////////////////// --/ @brief Get the volume of a sound --/ --/ @param sound Sound object --/ --/ @return Volume of the sound, in the range [0, 100] --/ --////////////////////////////////////////////////////////// function getVolume (sound : sfSound_Ptr) return float; --////////////////////////////////////////////////////////// --/ @brief Get the 3D position of a sound in the audio scene --/ --/ @param sound Sound object --/ --/ @return Position of the sound in the world --/ --////////////////////////////////////////////////////////// function getPosition (sound : sfSound_Ptr) return Sf.System.Vector3.sfVector3f; --////////////////////////////////////////////////////////// --/ @brief Tell whether a sound's position is relative to the --/ listener or is absolute --/ --/ @param sound Sound object --/ --/ @return sfTrue if the position is relative, sfFalse if it's absolute --/ --////////////////////////////////////////////////////////// function isRelativeToListener (sound : sfSound_Ptr) return sfBool; --////////////////////////////////////////////////////////// --/ @brief Get the minimum distance of a sound --/ --/ @param sound Sound object --/ --/ @return Minimum distance of the sound --/ --////////////////////////////////////////////////////////// function getMinDistance (sound : sfSound_Ptr) return float; --////////////////////////////////////////////////////////// --/ @brief Get the attenuation factor of a sound --/ --/ @param sound Sound object --/ --/ @return Attenuation factor of the sound --/ --////////////////////////////////////////////////////////// function getAttenuation (sound : sfSound_Ptr) return float; --////////////////////////////////////////////////////////// --/ @brief Get the current playing position of a sound --/ --/ @param sound Sound object --/ --/ @return Current playing position --/ --////////////////////////////////////////////////////////// function getPlayingOffset (sound : sfSound_Ptr) return Sf.System.Time.sfTime; private pragma Import (C, create, "sfSound_create"); pragma Import (C, copy, "sfSound_copy"); pragma Import (C, destroy, "sfSound_destroy"); pragma Import (C, play, "sfSound_play"); pragma Import (C, pause, "sfSound_pause"); pragma Import (C, stop, "sfSound_stop"); pragma Import (C, setBuffer, "sfSound_setBuffer"); pragma Import (C, getBuffer, "sfSound_getBuffer"); pragma Import (C, setLoop, "sfSound_setLoop"); pragma Import (C, getLoop, "sfSound_getLoop"); pragma Import (C, getStatus, "sfSound_getStatus"); pragma Import (C, setPitch, "sfSound_setPitch"); pragma Import (C, setVolume, "sfSound_setVolume"); pragma Import (C, setPosition, "sfSound_setPosition"); pragma Import (C, setRelativeToListener, "sfSound_setRelativeToListener"); pragma Import (C, setMinDistance, "sfSound_setMinDistance"); pragma Import (C, setAttenuation, "sfSound_setAttenuation"); pragma Import (C, setPlayingOffset, "sfSound_setPlayingOffset"); pragma Import (C, getPitch, "sfSound_getPitch"); pragma Import (C, getVolume, "sfSound_getVolume"); pragma Import (C, getPosition, "sfSound_getPosition"); pragma Import (C, isRelativeToListener, "sfSound_isRelativeToListener"); pragma Import (C, getMinDistance, "sfSound_getMinDistance"); pragma Import (C, getAttenuation, "sfSound_getAttenuation"); pragma Import (C, getPlayingOffset, "sfSound_getPlayingOffset"); end Sf.Audio.Sound;
test/Fail/Issue3064.agda
cruhland/agda
1,989
14392
<filename>test/Fail/Issue3064.agda open import Agda.Builtin.Char open import Agda.Builtin.Sigma CC = Σ Char λ _ → Char Test : (c : Char) → Set Test 'a' = CC Test _ = CC test : (c : Char) → Test c test 'a' .fst = 'a'
notes/k-axiom/SL.agda
asr/fotc
11
5222
{-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module SL where open import Data.Nat open import Data.Product open import Data.Sum open import Relation.Binary.PropositionalEquality -- Example from: Hofmann and Streicher. The groupoid model refutes -- uniqueness of identity proofs. thm₁ : ∀ n → n ≡ 0 ⊎ Σ ℕ (λ n' → n ≡ suc n') thm₁ zero = inj₁ refl thm₁ (suc n) = inj₂ (n , refl) postulate indℕ : (P : ℕ → Set) → P 0 → (∀ n → P n → P (suc n)) → ∀ n → P n thm₂ : ∀ n → n ≡ 0 ⊎ Σ ℕ λ n' → n ≡ suc n' thm₂ = indℕ P P0 is where P : ℕ → Set P m = m ≡ 0 ⊎ Σ ℕ λ m' → m ≡ suc m' P0 : P 0 P0 = inj₁ refl is : ∀ m → P m → P (suc m) is m _ = inj₂ (m , refl)
programs/oeis/127/A127116.asm
neoneye/loda
22
17700
<gh_stars>10-100 ; A127116: n! in base 9. ; 1,1,2,6,26,143,880,6820,61270,612700,6740700,83088500,1211283600,17058212600,270017301300,4560302022000,82065335385000,1648341372414000,34076827548280000,725735500635080000,17178403115182870000 seq $0,142 ; Factorial numbers: n! = 1*2*3*4*...*n (order of symmetric group S_n, number of permutations of n letters). seq $0,7095 ; Numbers in base 9.
commands/communication/messenger/messenger-open-conversation.applescript
afrazkhan/script-commands
5
4028
<reponame>afrazkhan/script-commands<filename>commands/communication/messenger/messenger-open-conversation.applescript #!/usr/bin/osascript # Dependency: This script requires Messenger to be installed: https://www.messenger.com/desktop # Required parameters: # @raycast.schemaVersion 1 # @raycast.title Open Conversation # @raycast.mode silent # Optional parameters: # @raycast.icon images/messenger.png # @raycast.packageName Messenger # @raycast.argument1 { "type": "text", "placeholder": "Name" } # Documentation: # @raycast.author <NAME> # @raycast.authorURL https://github.com/jaklan on run argv ### Configuration ### # Delay time before triggering the keystroke for the Search # (used only when Messenger needs to be initialised) set keystrokeDelay to 2.5 # Delay time before triggering the "⌘1" keystroke set conversationKeystrokeDelay to 1 ### End of configuration ### if application "Messenger" is running then do shell script "open -a Messenger" else do shell script "open -a Messenger" delay keystrokeDelay end if tell application "System Events" to tell process "Messenger" keystroke "k" using command down keystroke item 1 of argv delay conversationKeystrokeDelay keystroke "1" using command down end tell end run
fe10x4_square.mac.asm
dsprenkels/curve13318-haswell
1
81946
<filename>fe10x4_square.mac.asm ; Multiplication macros for field elements (integers modulo 2^255 - 19) ; ; Author: <NAME> <<EMAIL>> %ifndef FE10X4_SQUARE_MAC_ASM_ %define FE10X4_SQUARE_MAC_ASM_ %include "fe10x4_carry.mac.asm" %macro fe10x4_square_body 2 ; The squaring operations in this routine is based on the multiplication in fe10x4_mul.asm ; Tl;dr. We precompute in parallel: ; - (19*f_5, ..., 19*f_9) ; - (2*f_1, 2*f_3, ... 2*f_7) ; Then we do a regular O(n^2) modular squaring. ; ; Inputs: ; - %1: Operand `f` ; - %2: 64 bytes of usable stack space ; ; Output: ; - ymm{0-9}: Result `h` ; %push fe10x4_square_body_ctx %xdefine f19_8 %2 + 0*32 %xdefine f19_9 %2 + 1*32 ; round 1/10 vmovdqa ymm15, yword [%1 + 0*32] ; load f[0] vpmuludq ymm0, ymm15, ymm15 vpaddq ymm15, ymm15, ymm15 ; compute 2*f[0] vpmuludq ymm1, ymm15, yword [%1 + 1*32] vpmuludq ymm2, ymm15, yword [%1 + 2*32] vpmuludq ymm3, ymm15, yword [%1 + 3*32] vpmuludq ymm4, ymm15, yword [%1 + 4*32] vpmuludq ymm5, ymm15, yword [%1 + 5*32] vpmuludq ymm6, ymm15, yword [%1 + 6*32] vpmuludq ymm7, ymm15, yword [%1 + 7*32] vpmuludq ymm8, ymm15, yword [%1 + 8*32] vpmuludq ymm9, ymm15, yword [%1 + 9*32] ; round 2/10 vmovdqa ymm14, yword [%1 + 1*32] ; load f[1] vpaddq ymm15, ymm14, ymm14 ; compute 2*f[1] vpbroadcastq ymm13, qword [rel .const_19] vpmuludq ymm12, ymm13, yword [%1 + 9*32] ; compute 19*f[9] vmovdqa yword [f19_9], ymm12 ; spill 19*f[9] vpmuludq ymm10, ymm15, ymm14 vpaddq ymm2, ymm2, ymm10 vpmuludq ymm10, ymm15, yword [%1 + 2*32] vpaddq ymm3, ymm3, ymm10 vpaddq ymm14, ymm15, ymm15 ; compute 4*f[1] vpmuludq ymm10, ymm14, yword [%1 + 3*32] vpaddq ymm4, ymm4, ymm10 vpmuludq ymm10, ymm15, yword [%1 + 4*32] vpaddq ymm5, ymm5, ymm10 vpmuludq ymm10, ymm14, yword [%1 + 5*32] vpaddq ymm6, ymm6, ymm10 vpmuludq ymm10, ymm15, yword [%1 + 6*32] vpaddq ymm7, ymm7, ymm10 vpmuludq ymm10, ymm14, yword [%1 + 7*32] vpaddq ymm8, ymm8, ymm10 vpmuludq ymm10, ymm15, yword [%1 + 8*32] vpaddq ymm9, ymm9, ymm10 vpmuludq ymm10, ymm14, ymm12 vpaddq ymm0, ymm0, ymm10 ; round 3/10 vmovdqa ymm15, yword [%1 + 2*32] ; load f[2] vpmuludq ymm11, ymm13, yword [%1 + 8*32] ; compute 19*f[8] vmovdqa yword [f19_8], ymm11 ; spill 19*f[8] vpmuludq ymm10, ymm15, ymm15 vpaddq ymm4, ymm4, ymm10 vpaddq ymm15, ymm15, ymm15 ; compute 2*f[2] vpmuludq ymm10, ymm15, yword [%1 + 3*32] vpaddq ymm5, ymm5, ymm10 vpmuludq ymm10, ymm15, yword [%1 + 4*32] vpaddq ymm6, ymm6, ymm10 vpmuludq ymm10, ymm15, yword [%1 + 5*32] vpaddq ymm7, ymm7, ymm10 vpmuludq ymm10, ymm15, yword [%1 + 6*32] vpaddq ymm8, ymm8, ymm10 vpmuludq ymm10, ymm15, yword [%1 + 7*32] vpaddq ymm9, ymm9, ymm10 vpmuludq ymm10, ymm15, ymm11 vpaddq ymm0, ymm0, ymm10 vpmuludq ymm10, ymm15, ymm12 vpaddq ymm1, ymm1, ymm10 ; round 4/10 vmovdqa ymm14, yword [%1 + 3*32] ; load f[3] vpaddq ymm15, ymm14, ymm14 ; compute 2*f[3] vpmuludq ymm11, ymm13, yword [%1 + 7*32] ; compute 19*f[7] vpmuludq ymm10, ymm15, ymm14 vpaddq ymm6, ymm6, ymm10 vpaddq ymm14, ymm15, ymm15 ; compute 4*f[3] vpmuludq ymm10, ymm15, yword [%1 + 4*32] vpaddq ymm7, ymm7, ymm10 vpmuludq ymm10, ymm14, yword [%1 + 5*32] vpaddq ymm8, ymm8, ymm10 vpmuludq ymm10, ymm15, yword [%1 + 6*32] vpaddq ymm9, ymm9, ymm10 vpmuludq ymm10, ymm14, ymm11 vpaddq ymm0, ymm0, ymm10 vpmuludq ymm10, ymm15, yword [f19_8] vpaddq ymm1, ymm1, ymm10 vpmuludq ymm10, ymm14, ymm12 vpaddq ymm2, ymm2, ymm10 ; round 5/10 vmovdqa ymm15, yword [%1 + 4*32] ; load f[4] vpmuludq ymm14, ymm13, yword [%1 + 6*32] ; compute 19*f[6] vpmuludq ymm10, ymm15, ymm15 vpaddq ymm8, ymm8, ymm10 vpaddq ymm15, ymm15, ymm15 ; compute 2*f[4] vpmuludq ymm10, ymm15, yword [%1 + 5*32] vpaddq ymm9, ymm9, ymm10 vpmuludq ymm10, ymm15, ymm14 vpaddq ymm0, ymm0, ymm10 vpmuludq ymm10, ymm15, ymm11 vpaddq ymm1, ymm1, ymm10 vpmuludq ymm10, ymm15, yword [f19_8] vpaddq ymm2, ymm2, ymm10 vpmuludq ymm10, ymm15, ymm12 vpaddq ymm3, ymm3, ymm10 ; round 6/10 vmovdqa ymm15, yword [%1 + 5*32] ; load f[5] vpmuludq ymm13, ymm13, ymm15 ; compute 19*f[5] vpaddq ymm15, ymm15, ymm15 ; compute 2*f[5] vpmuludq ymm10, ymm15, ymm13 vpaddq ymm0, ymm0, ymm10 vpmuludq ymm10, ymm15, ymm14 vpaddq ymm1, ymm1, ymm10 vpaddq ymm13, ymm15, ymm15 ; compute 4*f[5] vpmuludq ymm10, ymm13, ymm11 vpaddq ymm2, ymm2, ymm10 vpmuludq ymm10, ymm15, yword [f19_8] vpaddq ymm3, ymm3, ymm10 vpmuludq ymm10, ymm13, ymm12 vpaddq ymm4, ymm4, ymm10 ; round 7/10 vmovdqa ymm15, yword [%1 + 6*32] ; load f[6] vpmuludq ymm10, ymm15, ymm14 vpaddq ymm2, ymm2, ymm10 vpaddq ymm15, ymm15, ymm15 ; compute 2*f[6] vpmuludq ymm10, ymm15, ymm11 vpaddq ymm3, ymm3, ymm10 vpmuludq ymm10, ymm15, yword [f19_8] vpaddq ymm4, ymm4, ymm10 vpmuludq ymm10, ymm15, ymm12 vpaddq ymm5, ymm5, ymm10 ; round 8/10 vmovdqa ymm15, yword [%1 + 7*32] ; load f[7] vpaddq ymm15, ymm15, ymm15 ; compute 2*f[7] vpmuludq ymm10, ymm15, ymm11 vpaddq ymm4, ymm4, ymm10 vpmuludq ymm10, ymm15, yword [f19_8] vpaddq ymm5, ymm5, ymm10 vpaddq ymm15, ymm15, ymm15 ; compute 4*f[7] vpmuludq ymm10, ymm15, ymm12 vpaddq ymm6, ymm6, ymm10 ; round 9/10 vmovdqa ymm15, yword [%1 + 8*32] ; load f[8] vpmuludq ymm10, ymm15, yword [f19_8] vpaddq ymm6, ymm6, ymm10 vpaddq ymm15, ymm15, ymm15 ; compute 2*f[8] vpmuludq ymm10, ymm15, ymm12 vpaddq ymm7, ymm7, ymm10 ; round 10/10 vpmuludq ymm10, ymm12, yword [%1 + 9*32] ; compute f[9]*(19*f[9]) vpaddq ymm10, ymm10, ymm10 ; 38*f[9]*f[9] vpaddq ymm8, ymm8, ymm10 %pop fe10x4_square_body_ctx %endmacro %macro fe10x4_square_body_skip_first_round 2 %push fe10x4_square_body_skip_first_round_ctx %xdefine f19_8 %2 + 0*32 %xdefine f19_9 %2 + 1*32 ; round 2/10 vmovdqa ymm14, yword [%1 + 1*32] ; load f[1] vpaddq ymm15, ymm14, ymm14 ; compute 2*f[1] vpbroadcastq ymm13, qword [rel .const_19] vpmuludq ymm12, ymm13, yword [%1 + 9*32] ; compute 19*f[9] vmovdqa yword [f19_9], ymm12 ; spill 19*f[9] vpmuludq ymm10, ymm15, ymm14 vpaddq ymm2, ymm2, ymm10 vpmuludq ymm10, ymm15, yword [%1 + 2*32] vpaddq ymm3, ymm3, ymm10 vpaddq ymm14, ymm15, ymm15 ; compute 4*f[1] vpmuludq ymm10, ymm14, yword [%1 + 3*32] vpaddq ymm4, ymm4, ymm10 vpmuludq ymm10, ymm15, yword [%1 + 4*32] vpaddq ymm5, ymm5, ymm10 vpmuludq ymm10, ymm14, yword [%1 + 5*32] vpaddq ymm6, ymm6, ymm10 vpmuludq ymm10, ymm15, yword [%1 + 6*32] vpaddq ymm7, ymm7, ymm10 vpmuludq ymm10, ymm14, yword [%1 + 7*32] vpaddq ymm8, ymm8, ymm10 vpmuludq ymm10, ymm15, yword [%1 + 8*32] vpaddq ymm9, ymm9, ymm10 vpmuludq ymm10, ymm14, ymm12 vpaddq ymm0, ymm0, ymm10 ; round 3/10 vmovdqa ymm15, yword [%1 + 2*32] ; load f[2] vpmuludq ymm11, ymm13, yword [%1 + 8*32] ; compute 19*f[8] vmovdqa yword [f19_8], ymm11 ; spill 19*f[8] vpmuludq ymm10, ymm15, ymm15 vpaddq ymm4, ymm4, ymm10 vpaddq ymm15, ymm15, ymm15 ; compute 2*f[2] vpmuludq ymm10, ymm15, yword [%1 + 3*32] vpaddq ymm5, ymm5, ymm10 vpmuludq ymm10, ymm15, yword [%1 + 4*32] vpaddq ymm6, ymm6, ymm10 vpmuludq ymm10, ymm15, yword [%1 + 5*32] vpaddq ymm7, ymm7, ymm10 vpmuludq ymm10, ymm15, yword [%1 + 6*32] vpaddq ymm8, ymm8, ymm10 vpmuludq ymm10, ymm15, yword [%1 + 7*32] vpaddq ymm9, ymm9, ymm10 vpmuludq ymm10, ymm15, ymm11 vpaddq ymm0, ymm0, ymm10 vpmuludq ymm10, ymm15, ymm12 vpaddq ymm1, ymm1, ymm10 ; round 4/10 vmovdqa ymm14, yword [%1 + 3*32] ; load f[3] vpaddq ymm15, ymm14, ymm14 ; compute 2*f[3] vpmuludq ymm11, ymm13, yword [%1 + 7*32] ; compute 19*f[7] vpmuludq ymm10, ymm15, ymm14 vpaddq ymm6, ymm6, ymm10 vpaddq ymm14, ymm15, ymm15 ; compute 4*f[3] vpmuludq ymm10, ymm15, yword [%1 + 4*32] vpaddq ymm7, ymm7, ymm10 vpmuludq ymm10, ymm14, yword [%1 + 5*32] vpaddq ymm8, ymm8, ymm10 vpmuludq ymm10, ymm15, yword [%1 + 6*32] vpaddq ymm9, ymm9, ymm10 vpmuludq ymm10, ymm14, ymm11 vpaddq ymm0, ymm0, ymm10 vpmuludq ymm10, ymm15, yword [f19_8] vpaddq ymm1, ymm1, ymm10 vpmuludq ymm10, ymm14, ymm12 vpaddq ymm2, ymm2, ymm10 ; round 5/10 vmovdqa ymm15, yword [%1 + 4*32] ; load f[4] vpmuludq ymm14, ymm13, yword [%1 + 6*32] ; compute 19*f[6] vpmuludq ymm10, ymm15, ymm15 vpaddq ymm8, ymm8, ymm10 vpaddq ymm15, ymm15, ymm15 ; compute 2*f[4] vpmuludq ymm10, ymm15, yword [%1 + 5*32] vpaddq ymm9, ymm9, ymm10 vpmuludq ymm10, ymm15, ymm14 vpaddq ymm0, ymm0, ymm10 vpmuludq ymm10, ymm15, ymm11 vpaddq ymm1, ymm1, ymm10 vpmuludq ymm10, ymm15, yword [f19_8] vpaddq ymm2, ymm2, ymm10 vpmuludq ymm10, ymm15, ymm12 vpaddq ymm3, ymm3, ymm10 ; round 6/10 vmovdqa ymm15, yword [%1 + 5*32] ; load f[5] vpmuludq ymm13, ymm13, ymm15 ; compute 19*f[5] vpaddq ymm15, ymm15, ymm15 ; compute 2*f[5] vpmuludq ymm10, ymm15, ymm13 vpaddq ymm0, ymm0, ymm10 vpmuludq ymm10, ymm15, ymm14 vpaddq ymm1, ymm1, ymm10 vpaddq ymm13, ymm15, ymm15 ; compute 4*f[5] vpmuludq ymm10, ymm13, ymm11 vpaddq ymm2, ymm2, ymm10 vpmuludq ymm10, ymm15, yword [f19_8] vpaddq ymm3, ymm3, ymm10 vpmuludq ymm10, ymm13, ymm12 vpaddq ymm4, ymm4, ymm10 ; round 7/10 vmovdqa ymm15, yword [%1 + 6*32] ; load f[6] vpmuludq ymm10, ymm15, ymm14 vpaddq ymm2, ymm2, ymm10 vpaddq ymm15, ymm15, ymm15 ; compute 2*f[6] vpmuludq ymm10, ymm15, ymm11 vpaddq ymm3, ymm3, ymm10 vpmuludq ymm10, ymm15, yword [f19_8] vpaddq ymm4, ymm4, ymm10 vpmuludq ymm10, ymm15, ymm12 vpaddq ymm5, ymm5, ymm10 ; round 8/10 vmovdqa ymm15, yword [%1 + 7*32] ; load f[7] vpaddq ymm15, ymm15, ymm15 ; compute 2*f[7] vpmuludq ymm10, ymm15, ymm11 vpaddq ymm4, ymm4, ymm10 vpmuludq ymm10, ymm15, yword [f19_8] vpaddq ymm5, ymm5, ymm10 vpaddq ymm15, ymm15, ymm15 ; compute 4*f[7] vpmuludq ymm10, ymm15, ymm12 vpaddq ymm6, ymm6, ymm10 ; round 9/10 vmovdqa ymm15, yword [%1 + 8*32] ; load f[8] vpmuludq ymm10, ymm15, yword [f19_8] vpaddq ymm6, ymm6, ymm10 vpaddq ymm15, ymm15, ymm15 ; compute 2*f[8] vpmuludq ymm10, ymm15, ymm12 vpaddq ymm7, ymm7, ymm10 ; round 10/10 vpmuludq ymm10, ymm12, yword [%1 + 9*32] ; compute f[9]*(19*f[9]) vpaddq ymm10, ymm10, ymm10 ; 38*f[9]*f[9] vpaddq ymm8, ymm8, ymm10 %pop fe10x4_square_body_skip_first_round_ctx %endmacro %macro fe10x4_square 3 %push fe10x4_square_ctx fe10x4_square_body %2, %3 fe10x4_carry_body_store %1 %pop fe10x4_square_ctx %endmacro %macro fe10x4_square_consts 0 ; The other macros in this file are dependent on this constant. If ; you call the other macros in this file, define these values after ; your call in the .rodata section. align 8, db 0 .const_19: dq 19 %endmacro %endif
core/lib/types/Lift.agda
timjb/HoTT-Agda
294
1218
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics module lib.types.Lift where ⊙Lift : ∀ {i j} → Ptd i → Ptd (lmax i j) ⊙Lift {j = j} ⊙[ A , a ] = ⊙[ Lift {j = j} A , lift a ] ⊙lift : ∀ {i j} {X : Ptd i} → X ⊙→ ⊙Lift {j = j} X ⊙lift = (lift , idp) ⊙lower : ∀ {i j} {X : Ptd i} → ⊙Lift {j = j} X ⊙→ X ⊙lower = (lower , idp) lift-equiv : ∀ {i j} {A : Type i} → A ≃ Lift {j = j} A lift-equiv = equiv lift lower (λ _ → idp) (λ _ → idp) -- [lower-equiv] is in Equivalences.agda instance Lift-level : ∀ {i j} {A : Type i} {n : ℕ₋₂} → has-level n A → has-level n (Lift {j = j} A) Lift-level p = equiv-preserves-level lift-equiv {{p}} ⊙lift-equiv : ∀ {i j} {X : Ptd i} → X ⊙≃ ⊙Lift {j = j} X ⊙lift-equiv = (⊙lift , snd lift-equiv) ⊙lower-equiv : ∀ {i j} {X : Ptd i} → ⊙Lift {j = j} X ⊙≃ X ⊙lower-equiv = (⊙lower , snd lower-equiv) Lift-fmap : ∀ {i j k} {A : Type i} {B : Type j} → (A → B) → (Lift {j = k} A → Lift {j = k} B) Lift-fmap f = lift ∘ f ∘ lower Lift-fmap-equiv : ∀ {i j k} {A : Type i} {B : Type j} → (A → B) ≃ (Lift {j = k} A → Lift {j = k} B) Lift-fmap-equiv = equiv Lift-fmap (λ f → lower ∘ f ∘ lift) (λ _ → idp) (λ _ → idp) ⊙Lift-fmap : ∀ {i j k} {X : Ptd i} {Y : Ptd j} → (X ⊙→ Y) → (⊙Lift {j = k} X ⊙→ ⊙Lift {j = k} Y) ⊙Lift-fmap f = ⊙lift ⊙∘ f ⊙∘ ⊙lower ⊙Lift-fmap-equiv : ∀ {i j k} {X : Ptd i} {Y : Ptd j} → (X ⊙→ Y) ≃ (⊙Lift {j = k} X ⊙→ ⊙Lift {j = k} Y) ⊙Lift-fmap-equiv = equiv ⊙Lift-fmap (λ f → ⊙lower ⊙∘ f ⊙∘ ⊙lift) (λ {(_ , idp) → idp}) (λ {(_ , idp) → idp})
test/Fail/Issue1963DisplayWithPostfixCopattern.agda
cruhland/agda
1,989
3331
<gh_stars>1000+ {-# OPTIONS -v tc.with.display:30 #-} -- {-# OPTIONS -v tc.with.strip:30 #-} open import Common.Product open import Common.Prelude open import Common.Equality postulate p : Nat → Nat -- g : Nat → Nat × Nat -- g x .proj₁ with p x -- g x .proj₁ | 0 = 1 -- g x .proj₁ | suc y = 0 -- g x .proj₂ = suc x -- h : Nat → Nat × Nat -- h x .proj₁ with p x -- h x .proj₁ | 0 = 1 -- proj₁ (h x) | suc y = 0 -- h x .proj₂ = suc x f : Nat → Nat × Nat f x .proj₁ with p x ... | 0 = 1 ... | suc y = 0 f x .proj₂ = suc x test : f 0 ≡ (0 , 1) test = refl -- EXPECTED ERROR: -- f 0 .proj₁ | p 0 != zero of type Nat -- when checking that the expression refl has type f 0 ≡ (0 , 1)
lime-loader/src/main/antlr/LimeLexer.g4
limingchina/gluecodium
0
7465
/* * Copyright (C) 2016-2019 HERE Europe B.V. * * 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. * * SPDX-License-Identifier: Apache-2.0 * License-Filename: LICENSE */ lexer grammar LimeLexer; LocalComment : '#' ~[\r\n]* -> channel(HIDDEN) ; WhiteSpace : [ \t\p{Zs}]+ -> skip ; NewLine : '\n' | '\r' | '\r' '\n' ; // Separators and operators Arrow: '->' ; Assignment: '=' ; At: '@' ; Colon: ':' ; Comma: ',' ; Dot: '.' ; Minus: '-' ; Plus: '+' ; Quest: '?' ; LParen: '(' ; RParen: ')' ; LCurl: '{' ; RCurl: '}' ; LAngle: '<' ; RAngle: '>' ; LSquare: '[' ; RSquare: ']' ; // Keywords Class: 'class' ; Const: 'const' ; Constructor: 'constructor' ; Fun: 'fun' ; Enum: 'enum' ; Exception: 'exception' ; External: 'external' ; Get: 'get' ; Import: 'import' ; Interface: 'interface' ; Internal: 'internal' ; Lambda: 'lambda' ; Open: 'open' ; Package: 'package' ; Property: 'property' ; Public: 'public' ; Set: 'set' ; Static: 'static' ; Struct: 'struct' ; Throws: 'throws' ; TypeAlias: 'typealias' ; Types: 'types' ; // Predefined types VoidType: 'Void' ; BoolType: 'Boolean' ; FloatType: 'Float' ; DoubleType: 'Double' ; ByteType: 'Byte' ; ShortType: 'Short' ; IntType: 'Int' ; LongType: 'Long' ; UByteType: 'UByte' ; UShortType: 'UShort' ; UIntType: 'UInt' ; ULongType: 'ULong' ; StringType: 'String' ; BlobType: 'Blob' ; DateType: 'Date' ; LocaleType: 'Locale' ; ListType: 'List' ; MapType: 'Map' ; SetType: 'Set' ; // Literals BooleanLiteral: 'true' | 'false' ; NullLiteral: 'null' ; NanLiteral: 'NaN' ; InfinityLiteral: 'Infinity' ; DoubleLiteral : DecDigits? '.' DecDigits DoubleExponent? | DecDigits DoubleExponent ; IntegerLiteral : DecDigitNoZero DecDigitOrSeparator* DecDigit | DecDigit ; fragment DecDigitOrSeparator: DecDigit | '_'; fragment DecDigits : DecDigit DecDigitOrSeparator* DecDigit | DecDigit ; fragment DoubleExponent: [eE] [+-]? DecDigits; fragment DecDigit: '0'..'9' ; fragment DecDigitNoZero: '1'..'9' ; // Identifier Identifier : (Letter | '_') (Letter | '_' | DecimalDigit)* | '`' ~('\r' | '\n' | '`')+ '`' ; fragment Letter : [a-zA-Z] ; fragment DecimalDigit : [0-9] ; // Modes QuoteOpen: '"' -> pushMode(LineString) ; TripleQuoteOpen: '"""' -> pushMode(MultiLineString) ; LineCommentOpen: '//' -> pushMode(LineComment) ; DelimitedCommentOpen: '/*' -> pushMode(DelimitedComment) ; mode LineString ; LineStrText: ~('\\' | '"')+ ; LineStrEscapedChar: '\\' ('t' | 'b' | 'r' | 'n' | '"' | '\\') ; QuoteClose: '"' -> popMode ; mode MultiLineString ; MultiLineStringQuote : '"'+ ; MultiLineStrText : ~'"'+ ; TripleQuoteClose : MultiLineStringQuote? '"""' -> popMode ; mode LineComment ; LineCommentText: .*? [\r\n] -> popMode ; mode DelimitedComment ; DelimitedCommentText: .*? '*/' -> popMode ;
src/print_input.asm
iljakalistratov/Code39Encoder
1
87032
<filename>src/print_input.asm # Drucke Eingabe und ermittelte Laenge (Debugging only) print_input: addi sp, sp, -4 sw ra,0(sp) la a0,string_input_text li a7,4 ecall la a0,string_to_encode lw a0,0(a0) li a7,4 ecall la a0,string_length_text li a7,4 ecall la t1,string_length lw a0, 0(t1) li a7,1 ecall lw ra,0(sp) addi sp, sp, 4 jalr zero,0(ra)
src/firmware-tests/Platform/Motor/DisableMotorVddMock.asm
pete-restall/Cluck2Sesame-Prototype
1
944
#include "Platform.inc" #include "TestDoubles.inc" radix decimal udata global calledDisableMotorVdd calledDisableMotorVdd res 1 InitialiseDisableMotorVddMock code global initialiseDisableMotorVddMock global disableMotorVdd initialiseDisableMotorVddMock: banksel calledDisableMotorVdd clrf calledDisableMotorVdd return disableMotorVdd: mockCalled calledDisableMotorVdd return end
programs/oeis/117/A117909.asm
jmorken/loda
1
86014
; A117909: Count, inserting 0 after every even number. ; 1,2,0,3,4,0,5,6,0,7,8,0,9,10,0,11,12,0,13,14,0,15,16,0,17,18,0,19,20,0,21,22,0,23,24,0,25,26,0,27,28,0,29,30,0,31,32,0,33,34,0,35,36,0,37,38,0,39,40,0,41,42,0,43,44,0,45,46,0,47,48,0,49,50,0,51,52,0,53,54,0 mov $2,$0 add $2,$0 mod $0,3 mov $1,5 add $1,$2 lpb $0 clr $0,5 sub $0,1 lpe div $1,3
programs/oeis/195/A195904.asm
neoneye/loda
22
172605
; A195904: Base-2 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,0,0,0,0. ; 1,2,4,8,16,32,65,130,260,520,1040,2080,4161,8322,16644,33288,66576,133152,266305,532610,1065220,2130440,4260880,8521760,17043521,34087042,68174084,136348168,272696336,545392672,1090785345,2181570690,4363141380,8726282760,17452565520,34905131040,69810262081,139620524162,279241048324,558482096648,1116964193296,2233928386592,4467856773185,8935713546370,17871427092740,35742854185480,71485708370960,142971416741920,285942833483841,571885666967682,1143771333935364,2287542667870728,4575085335741456,9150170671482912,18300341342965825,36600682685931650,73201365371863300,146402730743726600,292805461487453200,585610922974906400,1171221845949812801,2342443691899625602,4684887383799251204,9369774767598502408,18739549535197004816,37479099070394009632,74958198140788019265,149916396281576038530,299832792563152077060,599665585126304154120,1199331170252608308240,2398662340505216616480,4797324681010433232961,9594649362020866465922,19189298724041732931844,38378597448083465863688,76757194896166931727376,153514389792333863454752,307028779584667726909505,614057559169335453819010,1228115118338670907638020,2456230236677341815276040,4912460473354683630552080,9824920946709367261104160,19649841893418734522208321,39299683786837469044416642,78599367573674938088833284,157198735147349876177666568,314397470294699752355333136,628794940589399504710666272,1257589881178799009421332545,2515179762357598018842665090,5030359524715196037685330180,10060719049430392075370660360,20121438098860784150741320720,40242876197721568301482641440,80485752395443136602965282881,160971504790886273205930565762,321943009581772546411861131524,643886019163545092823722263048 mov $1,2 pow $1,$0 mul $1,64 div $1,63 mov $0,$1
fbs_raw.asm
clarkejr/deep-blue
0
4390
; ; Copyright (C) 2018 <NAME> -- see LICENSE.TXT ; stage1 equ 0x7C00 stage2 equ stage1 + 0x0200 e820map equ 0x1000 USE16 ; The assembler is to create 16 bit real mode code. org stage1 ; The assembler is to assume that the binary will be loaded to this memmory address. Start: cli ; Disable interrupts. cld ; Clear direction flag. xor ax, ax ; Zero the Accumulator Register. mov ss, ax ; Zero the SS Stack Segment. mov ds, ax ; Zero the DS Data Segment. mov es, ax ; Zero the ES Extra Segment. mov sp, stage1 ; Set the Stack Pointer to the base of this boot code. sti ; Enable interrupts. mov [DriveNumber], dl ; BIOS passes drive number in DL PrintOSGreeting: mov si, msg_DeepBlue call print_string call print_CR_LF TestLowMemory: ; Detect available conventional memory clc ; Clear carry flag int 0x12 ; call BIOS (request low memory size) ; The carry flag is set if it failed jc Halt ; AX = amount of continuous memory in KB starting from 0. mov [LowMemory], ax ; store the size of conventional memory ; TODO: test to see if there is sufficient memory! mov bx, 0x200 ; 512 kb in decimal cmp ax, bx ; compare (ax - bx) jbe Halt ; jump if unsigned number is below or equal ; Only print memory if there is sufficient memory. mov si, msg_LowMemory call print_string mov bx, [LowMemory] call print_hex_dw call print_CR_LF ; Load stage 2 boot sectors from the drive. ResetFloppy: clc ; clear carry flag mov ah, 0x00 ; reset floppy disk function mov dl, [DriveNumber] ; drive 0 is floppy drive int 0x13 ; call BIOS jc ResetFloppy ; if Carry Flag (CF) is set, there was an error. Try resetting again ; Print loading stage 2 message. mov si, msg_LoadStage2 call print_string ; MBR is the first sector on a disk -- cylinder 0, head 0, sector 1 LoadStage2: ; Setup ES:BX with the address of the memory buffer xor bx, bx ; BX = zero mov es, bx ; ES = zero mov bx, stage2 ; we are going to read sector two into address 0x0:stage2 mov dl, [DriveNumber] ; Load drive number into DL mov dh, 0x00 ; Load head number into DH mov ch, 0x00 ; Load cylinder number into CH mov cl, 0x02 ; Load sector number into CL mov al, 0x02 ; Load number of sectors to be read into AL mov ah, 0x02 ; function 2 int 0x13 ; call BIOS - Read the sector jc LoadStage2 ; Error, so try again ; Print running stage 2 message. mov si, msg_RunStage2 call print_string ; jump to execute the sector! jmp ContinueStage2 ; Halt if the code reaches this point as there is a problem. Halt: mov si, msg_Error call print_string .repeat: hlt jmp short .repeat ;------------------------------------------------------------------------------ ; 16-bit function to print a character in #al to the screen print_char: pusha ; save all registers onto the stack mov bx, 0x07 ; text console page number mov ah, 0x0e ; teletype function int 0x10 ; call interupt 0x10 popa ; restore all registers onto the stack ret ; 16-bit function to print CR and LF to the screen print_CR_LF: pusha ; save all registers onto the stack mov al, 0x0d ; carriage return = sends the cursor back to the start of the line call print_char mov al, 0x0a ; line feed = sends the cursor to the next line call print_char popa ; restore all registers onto the stack ret ; 16-bit function to print a string to the screen ; IN: SI - Address of start of string print_string: ; Output string in SI to screen pusha ; save all registers onto the stack .repeat: lodsb ; Get char from string cmp al, 0 je .done ; If char is zero, end of string call print_char jmp short .repeat .done: popa ; restore all registers onto the stack ret ; 16-bit function to print a hex byte to the screen ; IN: BH = unsigned byte to print print_hex_db: pusha mov cx, 2 ; this will need to loop twice to handle the high and low nibbles .lp: mov al, bh ; copy input byte to al for processing shr al, 4 ; shift high nibble to low nibble for processing cmp al, 0xA jb .below_0xA ; handle hex numbers greater than 0-9 differently add al, 'A' - 0xA - '0' ; the nibble is greater than 9 .below_0xA: add al, '0' ; convert nibble to an ASCII character call print_char shl bh, 4 ; get next nibble to the right (by shifting left) loop .lp popa ret ; 16-bit function to print a hex word to the screen ; IN: BX = integer word to print print_hex_dw: pusha ; save all registers onto the stack mov cx, 2 ; prepare to loop for 2 bytes (8) in a word (16) .lp: mov ax, bx ; work with a copy of bx shr ax, 8 ; get the low byte call print_hex_db shl bx, 8 ; get the high byte loop .lp popa ; restore all registers onto the stack ret ; 16-bit function to print a hex double word to the screen ; IN: EBX = integer word to print print_hex_dd: pusha ; save all registers onto the stack call print_hex_dw shr ebx, 16 ; get the high word call print_hex_dw popa ; restore all registers onto the stack ret ;------------------------------------------------------------------------------ DriveNumber db 0x0 LowMemory dw 0x0000 SMAP_Count db 0x0 msg_DeepBlue db "Deep Blue OS", 0x00 msg_LowMemory db "Mem: ", 0x00 msg_LoadStage2 db "Loading stage 2...", 0x0d, 0x0a, 0x00 msg_RunStage2 db "Running stage 2...", 0x0d, 0x0a, 0x00 msg_Error db "Error!", 0x0d, 0x0a, 0x00 ; To zerofill up to the MBR signature at the end of the boot code. times 510 - ($ - $$) db 0 sign dw 0xAA55 ;------------------------------------------------------------------------------ ; Start of stage 2 ;------------------------------------------------------------------------------ ContinueStage2: GetMemoryMap: ; TODO: build E820 memory map mov di, e820map ; ES:DI should point to 0x0:0x1000 call do_e820 jmp Halt ; 16-bit function to Query System Address Map do_e820: xor ebx, ebx ; ebx must be 0 to start xor bp, bp ; keep an entry count in bp mov edx, 0x0534D4150 ; Place "SMAP" into edx mov eax, 0xe820 mov [es:di + 20], dword 1 ; force a valid ACPI 3.X entry mov ecx, 24 ; ask for 24 bytes int 0x15 jc short .failed ; carry set on first call means "unsupported function" mov edx, 0x0534D4150 ; Some BIOSes apparently trash this register? cmp eax, edx ; on success, eax must have been reset to "SMAP" jne short .failed test ebx, ebx ; ebx = 0 implies list is only 1 entry long (worthless) je short .failed jmp short .jmpin .e820lp: mov eax, 0xe820 ; eax, ecx get trashed on every int 0x15 call mov [es:di + 20], dword 1 ; force a valid ACPI 3.X entry mov ecx, 24 ; ask for 24 bytes again int 0x15 jc short .e820f ; carry set means "end of list already reached" mov edx, 0x0534D4150 ; repair potentially trashed register .jmpin: jcxz .skipent ; skip any 0 length entries cmp cl, 20 ; got a 24 byte ACPI 3.X response? jbe short .notext test byte [es:di + 20], 1 ; if so: is the "ignore this data" bit clear? je short .skipent .notext: mov ecx, [es:di + 8] ; get lower uint32_t of memory region length or ecx, [es:di + 12] ; "or" it with upper uint32_t to test for zero jz .skipent ; if length uint64_t is 0, skip entry call print_SMAP_entry inc bp ; got a good entry: ++count, move to next storage spot add di, 24 .skipent: test ebx, ebx ; if ebx resets to 0, list is complete jne short .e820lp .e820f: mov [SMAP_Count], bp ; store the entry count clc ; there is "jc" on end of list to this point, so the carry must be cleared ret .failed: stc ; "function unsupported" error exit ret ; 16-bit function to print the current SMAP entry pointed to by [es:di] print_SMAP_entry: pusha mov ebx, [es:di] call print_hex_dd mov ebx, [es:di + 4] call print_hex_dd mov al, ':' call print_char mov ebx, [es:di + 8] call print_hex_dd mov ebx, [es:di + 12] call print_hex_dd mov al, '|' call print_char mov ebx, [es:di + 16] call print_hex_dd mov al, '|' call print_char mov ebx, [es:di + 20] call print_hex_dd call print_CR_LF popa ret ; To zerofill up to the size of a 3.5" HD floppy disk ; 512 bytes per sector, 18 sectors per track, 80 tracks per side and two sides. ; 512 * 18 * 80 * 2 = 1,474,560 bytes times 1474560 - ($ - $$) db 0
coverage/IN_CTS/0488-COVERAGE-brw-fs-copy-propagation-691-brw-shader-565/work/variant/1_spirv_asm/shader.frag.asm
asuonpaa/ShaderTests
0
243044
<reponame>asuonpaa/ShaderTests ; SPIR-V ; Version: 1.0 ; Generator: Khronos Glslang Reference Front End; 10 ; Bound: 67 ; Schema: 0 OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %4 "main" %23 %55 OpExecutionMode %4 OriginUpperLeft OpSource ESSL 320 OpName %4 "main" OpName %8 "func(" OpName %20 "v" OpName %23 "gl_FragCoord" OpName %42 "buf1" OpMemberName %42 0 "one" OpName %44 "" OpName %55 "_GLF_color" OpName %59 "buf0" OpMemberName %59 0 "_GLF_uniform_int_values" OpName %61 "" OpDecorate %23 BuiltIn FragCoord OpMemberDecorate %42 0 Offset 0 OpDecorate %42 Block OpDecorate %44 DescriptorSet 0 OpDecorate %44 Binding 1 OpDecorate %55 Location 0 OpDecorate %58 ArrayStride 16 OpMemberDecorate %59 0 Offset 0 OpDecorate %59 Block OpDecorate %61 DescriptorSet 0 OpDecorate %61 Binding 0 %2 = OpTypeVoid %3 = OpTypeFunction %2 %6 = OpTypeFloat 32 %7 = OpTypeFunction %6 %10 = OpTypeInt 32 1 %11 = OpConstant %10 1 %14 = OpConstant %6 1 %18 = OpTypeVector %6 4 %19 = OpTypePointer Function %18 %21 = OpConstantComposite %18 %14 %14 %14 %14 %22 = OpTypePointer Input %18 %23 = OpVariable %22 Input %24 = OpTypeInt 32 0 %25 = OpConstant %24 1 %26 = OpTypePointer Input %6 %29 = OpConstant %6 0 %30 = OpTypeBool %42 = OpTypeStruct %24 %43 = OpTypePointer Uniform %42 %44 = OpVariable %43 Uniform %45 = OpConstant %10 0 %46 = OpTypePointer Uniform %24 %50 = OpConstant %24 2 %54 = OpTypePointer Output %18 %55 = OpVariable %54 Output %56 = OpConstantComposite %18 %14 %29 %29 %14 %58 = OpTypeArray %10 %25 %59 = OpTypeStruct %58 %60 = OpTypePointer Uniform %59 %61 = OpVariable %60 Uniform %62 = OpTypePointer Uniform %10 %4 = OpFunction %2 None %3 %5 = OpLabel %20 = OpVariable %19 Function OpStore %20 %21 %27 = OpAccessChain %26 %23 %25 %28 = OpLoad %6 %27 %31 = OpFOrdLessThan %30 %28 %29 OpSelectionMerge %33 None OpBranchConditional %31 %32 %33 %32 = OpLabel %34 = OpFunctionCall %6 %8 %35 = OpCompositeConstruct %18 %34 %34 %34 %34 OpStore %20 %35 OpBranch %33 %33 = OpLabel %36 = OpLoad %18 %20 %37 = OpExtInst %24 %1 PackUnorm4x8 %36 %38 = OpIEqual %30 %37 %25 OpSelectionMerge %40 None OpBranchConditional %38 %39 %40 %39 = OpLabel OpReturn %40 = OpLabel %47 = OpAccessChain %46 %44 %45 %48 = OpLoad %24 %47 %49 = OpShiftLeftLogical %24 %25 %48 %51 = OpIEqual %30 %49 %50 OpSelectionMerge %53 None OpBranchConditional %51 %52 %57 %52 = OpLabel OpStore %55 %56 OpBranch %53 %57 = OpLabel %63 = OpAccessChain %62 %61 %45 %45 %64 = OpLoad %10 %63 %65 = OpConvertSToF %6 %64 %66 = OpCompositeConstruct %18 %65 %65 %65 %65 OpStore %55 %66 OpBranch %53 %53 = OpLabel OpReturn OpFunctionEnd %8 = OpFunction %6 None %7 %9 = OpLabel OpSelectionMerge %13 None OpSwitch %11 %13 0 %12 %12 = OpLabel OpReturnValue %14 %13 = OpLabel %17 = OpUndef %6 OpReturnValue %17 OpFunctionEnd
source/rom22/rom22_intro_cutscene_texture_data.asm
evanbowman/Red
5
17224
SECTION "INTRO_CUTSCENE_2_TILECOUNTS", ROMX, BANK[22] ;;; Generated by cutscene.py r22_cutscene_face_texture_offsets:: DB $00, $00, $C0, $04, $80, $09, $60, $0E, $30, $13, $00, $18, $D0, $1C, $B0, $21, $60, $26, $10, $2B, $C0, $2F, $80, $34, $30, $39, $D0, $3D, SECTION "INTRO_CUTSCENE_2_TEXTURES", ROMX, ALIGN[8], BANK[22] ;;; Generated by cutscene.py r22_cutscene_face_tile_textures:: .face_0 DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $0F, $0F, $0F, $0F, $1F, $1F, $1F, $1F, $1F, $1F, $3F, $3F, $3F, $3F, $7F, $7F, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FC, $FF, $E0, $FF, DB $FE, $FF, $F8, $FF, $F0, $FF, $E0, $FF, $C0, $FF, $80, $FF, $00, $FF, $00, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $F8, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $1F, DB $1F, $FF, $03, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $3F, $FF, $1F, $FF, $03, $FF, $01, $FB, $00, $73, DB $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $E0, $E0, $E0, $E0, $E0, $E0, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF, $FE, $FF, $FC, $FF, $FC, $FF, $F8, $FF, DB $C0, $FF, $C0, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $F0, $00, $C0, $00, $60, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FF, $00, $FC, $00, $F8, $00, $C0, $00, $00, $00, $03, $00, $0F, DB $00, $E0, $00, $80, $00, $01, $00, $07, $00, $0F, $00, $7F, $00, $FF, $00, $FF, DB $00, $3F, $00, $3F, $00, $FF, $00, $FF, $00, $FF, $00, $F8, $00, $C1, $00, $03, DB $00, $FE, $00, $FC, $00, $F8, $00, $F0, $00, $E0, $00, $C0, $00, $80, $00, $00, DB $00, $73, $00, $63, $00, $C3, $02, $81, $00, $01, $00, $01, $00, $01, $00, $01, DB $FF, $FF, $FF, $FF, $7F, $FF, $7F, $FF, $3F, $FF, $1F, $FF, $1F, $FF, $0F, $FF, DB $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, DB $F0, $FE, $F0, $F8, $F0, $F8, $E0, $E8, $E0, $E8, $C0, $D8, $C0, $D0, $80, $90, DB $00, $18, $00, $0E, $00, $03, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $01, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $7F, $00, $FE, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $FC, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $00, $06, $00, $1E, $00, $FC, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $0F, $FF, $0F, $FF, $0F, $FF, $07, $FF, $07, $7F, $07, $7F, $07, $7F, $07, $7F, DB $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, DB $FF, $FF, $FF, $FF, $FE, $FE, $FE, $FE, $FC, $FC, $F8, $FD, $F8, $FD, $F8, $FE, DB $00, $10, $00, $30, $00, $20, $00, $40, $00, $C0, $00, $00, $00, $00, $00, $00, DB $00, $0F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $FC, $00, $1F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $F8, $00, $7E, $00, $1F, $00, $03, $01, $00, $08, $00, $04, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $00, $F0, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $03, $00, $07, $00, $1E, $00, $7C, $00, $00, DB $00, $00, $00, $01, $00, $FF, $00, $F0, $40, $80, $00, $00, $00, $00, $60, $00, DB $00, $00, $00, $FF, $00, $C0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $07, $7F, $07, $FF, $0F, $7F, $0F, $7F, $8F, $7F, $0F, $FF, $0F, $FF, $1F, $FF, DB $F8, $F8, $F8, $F8, $FC, $FC, $FC, $FC, $FC, $FC, $FE, $FE, $FE, $FE, $FE, $FE, DB $F0, $FE, $F0, $FC, $E0, $FC, $E0, $FC, $E0, $FC, $E0, $FE, $E0, $FE, $E0, $FF, DB $00, $00, $00, $1F, $00, $01, $00, $00, $00, $07, $00, $0F, $00, $0F, $00, $0F, DB $00, $00, $00, $C0, $00, $F8, $00, $00, $00, $80, $00, $00, $00, $C0, $00, $C0, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $00, $00, $00, $00, $00, DB $80, $00, $00, $00, $00, $1F, $00, $FC, $00, $00, $00, $3C, $00, $78, $00, $7E, DB $01, $00, $00, $01, $00, $C1, $02, $01, $02, $01, $00, $03, $00, $03, $00, $03, DB $1F, $FF, $1F, $FF, $3F, $FF, $3F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, DB $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, DB $E0, $FF, $E0, $FF, $E0, $FF, $E0, $FF, $E0, $FF, $E0, $FF, $C0, $FF, $C0, $FF, DB $00, $80, $00, $80, $00, $C0, $00, $C0, $00, $E0, $00, $E0, $00, $F0, $00, $F0, DB $00, $0F, $00, $07, $00, $08, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $C0, $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $02, $00, $02, $00, $02, $00, $02, $00, $02, $00, $03, $00, DB $00, $7E, $00, $7C, $00, $3C, $00, $02, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $00, $03, $00, $03, $00, $03, $02, $03, $00, $01, $00, $01, $00, $01, DB $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $1F, $FF, DB $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FF, $FF, DB $C0, $FF, $C0, $FF, $C0, $FF, $C0, $FF, $C0, $FF, $C0, $FF, $C0, $FF, $C0, $FF, DB $00, $F8, $00, $FC, $00, $FE, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $00, $E0, $00, $F0, $00, $F8, DB $03, $00, $03, $00, $03, $00, $03, $00, $03, $00, $03, $00, $03, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $80, $00, $80, $00, DB $0F, $FF, $07, $FF, $03, $FF, $0C, $FF, $06, $7F, $03, $7F, $01, $7F, $00, $7F, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $1F, $FF, $CF, $FF, $E7, $FF, $F1, $FF, DB $00, $00, $80, $80, $80, $80, $C0, $C0, $F0, $F0, $F8, $F8, $F8, $F8, $FC, $FC, DB $80, $FF, $80, $FF, $80, $FF, $80, $FF, $80, $FF, $80, $FF, $80, $FF, $80, $FF, DB $00, $FC, $00, $FC, $00, $FE, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $C0, $00, $E0, DB $80, $00, $C0, $00, $40, $00, $40, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $7F, $80, $7F, $80, $7F, $80, $7F, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $7E, $FF, $3E, $FF, $01, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $FE, $FE, $3F, $FF, $BF, $FF, $1F, $FF, $1F, $FF, $0F, $FF, $07, $FF, $01, $FF, DB $00, $00, $80, $80, $C0, $C0, $F0, $F0, $F8, $F8, $FC, $FC, $FE, $FE, $FE, $FE, .face_1 DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $0F, $0F, $0F, $0F, $1F, $1F, $1F, $1F, $1F, $1F, $3F, $3F, $3F, $3F, $7F, $7F, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF, $E0, $FF, DB $FF, $FF, $FC, $FF, $F8, $FF, $F0, $FF, $C0, $FF, $80, $FF, $00, $FF, $00, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $F8, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $1F, DB $1F, $FF, $03, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $3F, $FF, $1F, $FF, $03, $FF, $01, $FB, $00, $7B, DB $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $E0, $E0, $E0, $E0, $E0, $E0, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF, $FC, $FF, $FC, $FF, $F8, $FF, $F8, $FF, DB $C0, $FF, $80, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $F8, $00, $C0, $00, $60, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FF, $00, $FE, $00, $F8, $00, $E0, $00, $00, $00, $01, $00, $07, DB $00, $E0, $00, $80, $00, $01, $00, $07, $00, $0F, $00, $3F, $00, $FF, $00, $FF, DB $00, $3F, $00, $3F, $00, $FF, $00, $FF, $00, $FF, $00, $F8, $00, $C0, $00, $01, DB $00, $FE, $00, $FE, $00, $FC, $00, $F8, $00, $F0, $00, $E0, $00, $C0, $00, $80, DB $00, $73, $00, $73, $00, $63, $02, $41, $00, $01, $00, $01, $00, $01, $00, $01, DB $FF, $FF, $FF, $FF, $7F, $FF, $7F, $FF, $3F, $FF, $1F, $FF, $1F, $FF, $0F, $FF, DB $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, DB $F0, $FE, $F0, $F8, $F0, $F8, $E0, $E8, $E0, $E8, $C0, $C8, $C0, $D0, $80, $90, DB $00, $18, $00, $0F, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $01, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $7F, $00, $FF, $00, $C0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $FE, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $00, $07, $00, $0E, $00, $7C, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $0F, $FF, $0F, $FF, $0F, $FF, $07, $FF, $07, $7F, $07, $7F, $07, $7F, $07, $7F, DB $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, DB $FF, $FF, $FF, $FF, $FE, $FE, $FE, $FE, $FC, $FC, $F8, $FC, $F8, $FD, $F8, $FF, DB $00, $10, $00, $10, $00, $30, $00, $20, $00, $60, $00, $C0, $00, $80, $00, $00, DB $00, $0F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $FC, $00, $1F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $F8, $00, $7E, $00, $1F, $00, $03, $01, $00, $08, $00, $04, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $00, $F0, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $03, $00, $07, $00, $1E, $00, $7C, $00, $00, DB $00, $00, $00, $01, $00, $FF, $00, $F0, $40, $80, $00, $00, $00, $00, $60, $00, DB $00, $00, $00, $FF, $00, $C0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $07, $7F, $07, $FF, $0F, $7F, $0F, $7F, $8F, $7F, $0F, $FF, $0F, $FF, $1F, $FF, DB $F8, $F8, $F8, $F8, $FC, $FC, $FC, $FC, $FC, $FC, $FE, $FE, $FE, $FE, $FE, $FE, DB $F0, $FE, $F0, $FC, $E0, $FC, $E0, $FC, $E0, $FC, $E0, $FE, $E0, $FE, $E0, $FF, DB $00, $00, $00, $1F, $00, $01, $00, $00, $00, $07, $00, $0F, $00, $0F, $00, $0F, DB $00, $00, $00, $C0, $00, $F8, $00, $00, $00, $80, $00, $00, $00, $C0, $00, $C0, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $00, $00, $00, $00, $00, DB $80, $00, $00, $00, $00, $1F, $00, $FC, $00, $00, $00, $3C, $00, $78, $00, $7E, DB $01, $00, $00, $01, $00, $C1, $02, $01, $02, $01, $00, $03, $00, $03, $00, $03, DB $1F, $FF, $1F, $FF, $3F, $FF, $3F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, DB $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, DB $E0, $FF, $E0, $FF, $E0, $FF, $C0, $FF, $C0, $FF, $C0, $FF, $C0, $FF, $C0, $FF, DB $00, $00, $00, $00, $00, $80, $00, $80, $00, $C0, $00, $C0, $00, $E0, $00, $F0, DB $00, $0F, $00, $07, $00, $08, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $C0, $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $02, $00, $02, $00, $02, $00, $02, $00, $02, $00, $03, $00, DB $00, $7E, $00, $7C, $00, $3C, $00, $02, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $00, $03, $00, $03, $00, $03, $02, $03, $00, $01, $00, $01, $00, $01, DB $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $1F, $FF, DB $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FF, $FF, DB $C0, $FF, $C0, $FF, $C0, $FF, $C0, $FF, $C0, $FF, $80, $FF, $80, $FF, $80, $FF, DB $00, $F8, $00, $FC, $00, $FC, $00, $FE, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $C0, $00, $E0, DB $03, $00, $03, $00, $03, $00, $03, $00, $03, $00, $03, $00, $03, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $80, $00, $80, $00, DB $0F, $FF, $07, $FF, $03, $FF, $19, $FF, $0E, $7F, $07, $7F, $03, $7F, $01, $7F, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $3F, $FF, $8F, $FF, $E7, $FF, $F7, $FF, DB $00, $00, $80, $80, $80, $80, $C0, $C0, $F0, $F0, $F8, $F8, $F8, $F8, $FC, $FC, DB $80, $FF, $80, $FF, $80, $FF, $80, $FF, $80, $FF, $80, $FF, $80, $FF, $80, $FF, DB $00, $F0, $00, $FC, $00, $FE, $00, $FE, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $80, $00, $C0, DB $80, $00, $C0, $00, $40, $00, $40, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $7F, $80, $7F, $80, $7F, $80, $7F, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $F9, $FF, $7C, $FF, $1F, $FF, $07, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $FE, $FE, $FF, $FF, $7F, $FF, $3F, $FF, $1F, $FF, $1F, $FF, $0F, $FF, $03, $FF, DB $00, $00, $80, $80, $C0, $C0, $F0, $F0, $F8, $F8, $FC, $FC, $FE, $FE, $FE, $FE, .face_2 DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $1F, $1F, $1F, $1F, $3F, $3F, $3F, $3F, $3F, $3F, $7F, $7F, $7F, $7F, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FC, $FF, $C0, $FF, DB $FE, $FF, $F8, $FF, $F0, $FF, $E0, $FF, $80, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $F8, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $3F, DB $3F, $FF, $07, $FF, $01, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FE, DB $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, $3F, $FF, $07, $FF, $03, $F7, $01, $F7, DB $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $C0, $C0, $C0, $C0, $C0, $C0, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $FF, $FF, $FF, $FF, $FE, $FF, $FC, $FF, $F8, $FF, $F8, $FF, $F0, $FF, $F0, $FF, DB $80, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FE, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $F8, $00, $80, $00, $C0, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FF, $00, $FC, $00, $F0, $00, $C0, $00, $00, $00, $01, $00, $07, DB $00, $C0, $00, $00, $00, $01, $00, $07, $00, $1F, $00, $7F, $00, $FF, $00, $FF, DB $00, $7F, $00, $7F, $00, $FF, $00, $FF, $00, $FF, $00, $F1, $00, $C1, $00, $03, DB $00, $FC, $00, $FC, $00, $F8, $00, $F0, $00, $E0, $00, $C0, $00, $80, $00, $80, DB $01, $E7, $01, $E7, $00, $C7, $04, $C3, $00, $03, $00, $03, $00, $03, $00, $03, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, $3F, $FF, $3F, $FF, $1F, $FF, DB $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, DB $E0, $FE, $E0, $F0, $E0, $F0, $C0, $D0, $C0, $D0, $80, $90, $80, $90, $00, $20, DB $00, $30, $00, $1C, $00, $03, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $01, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $7F, $00, $FF, $00, $C0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $FE, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $07, $00, $06, $00, $1C, $00, $78, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $00, $01, $00, $01, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, DB $1F, $FF, $1F, $FF, $1F, $FF, $0F, $FF, $0F, $FF, $0F, $FF, $0F, $FF, $0F, $FF, DB $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, DB $FE, $FE, $FE, $FE, $FC, $FC, $FC, $FC, $F8, $F8, $F0, $F8, $F0, $F9, $F0, $FF, DB $00, $20, $00, $20, $00, $60, $00, $40, $00, $C0, $00, $80, $00, $80, $00, $00, DB $00, $1F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $F8, $00, $3F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $F0, $00, $FC, $00, $3E, $00, $07, $02, $01, $10, $00, $08, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $E0, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $01, $00, $07, $00, $0F, $00, $3C, $00, $F8, $00, $00, DB $00, $00, $00, $03, $00, $FF, $00, $E0, $80, $00, $00, $00, $00, $00, $C0, $00, DB $00, $00, $00, $FF, $00, $80, $00, $00, $01, $00, $00, $01, $00, $01, $00, $01, DB $0F, $FF, $0F, $FF, $1F, $FF, $1F, $FF, $1F, $FF, $1F, $FF, $1F, $FF, $3F, $FF, DB $F0, $F0, $F0, $F0, $F8, $F8, $F8, $F8, $F8, $F8, $FC, $FC, $FC, $FC, $FC, $FC, DB $E0, $FE, $E0, $FC, $C0, $F8, $C0, $F8, $C0, $F8, $C0, $F8, $C0, $FC, $C0, $FC, DB $00, $00, $00, $3F, $00, $03, $00, $00, $00, $0F, $00, $1E, $00, $1F, $00, $1F, DB $00, $00, $00, $80, $00, $F0, $00, $00, $00, $00, $00, $00, $00, $80, $00, $80, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $00, $00, $00, $02, $00, $00, DB $01, $00, $00, $00, $00, $00, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $3F, $00, $F8, $00, $00, $00, $78, $00, $F0, $00, $FC, DB $02, $01, $00, $03, $00, $83, $04, $03, $04, $03, $00, $07, $00, $07, $00, $07, DB $3F, $FF, $3F, $FF, $7F, $FF, $7F, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, DB $C0, $FC, $C0, $FE, $80, $FE, $80, $FF, $80, $FF, $80, $FF, $80, $FF, $80, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $80, $00, $C0, $00, $E0, DB $00, $1F, $00, $0F, $00, $10, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $04, $00, $04, $00, $04, $00, $04, $00, $04, $00, $06, $00, DB $00, $FC, $00, $F8, $00, $78, $00, $04, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $07, $00, $07, $00, $07, $00, $07, $04, $07, $00, $03, $00, $03, $00, $03, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, $3F, $FF, DB $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FE, $FE, DB $80, $FF, $80, $FF, $80, $FF, $80, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $E0, $00, $F0, $00, $F8, $00, $F8, $00, $FC, $00, $FF, $00, $FF, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $C0, DB $06, $00, $06, $00, $06, $00, $06, $00, $06, $00, $07, $00, $07, $00, $01, $00, DB $00, $01, $00, $01, $00, $01, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, DB $1F, $FF, $0F, $FF, $07, $FF, $21, $FF, $18, $FF, $1F, $FF, $0F, $FF, $07, $FF, DB $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, $3F, $FF, $DF, $FF, $EF, $FF, DB $00, $00, $00, $00, $00, $00, $80, $80, $E0, $E0, $F0, $F0, $F0, $F0, $F8, $F8, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF, $FE, $FF, DB $00, $E0, $00, $F0, $00, $F8, $00, $FC, $00, $FE, $00, $FE, $00, $FF, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, DB $01, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $80, $00, $80, $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $01, $00, $01, $00, $01, $00, $00, $01, $00, $01, $00, $01, $00, $01, DB $03, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $E7, $FF, $F3, $FF, $79, $FF, $1C, $FF, $06, $FF, $01, $FF, $00, $FF, $00, $FF, DB $FC, $FC, $FF, $FF, $FF, $FF, $7F, $FF, $7F, $FF, $3F, $FF, $3F, $FF, $1F, $FF, DB $00, $00, $00, $00, $80, $80, $E0, $E0, $F0, $F0, $F8, $F8, $FC, $FC, $FC, $FC, .face_3 DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $1F, $1F, $1F, $1F, $3F, $3F, $3F, $3F, $3F, $3F, $7F, $7F, $7F, $7F, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF, $F8, $FF, $C0, $FF, DB $FE, $FF, $F8, $FF, $F0, $FF, $E0, $FF, $80, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $F8, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $3F, DB $3F, $FF, $07, $FF, $01, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FE, DB $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, $3F, $FF, $07, $FF, $03, $F7, $01, $F7, DB $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $C0, $C0, $C0, $C0, $C0, $C0, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $FF, $FF, $FF, $FF, $FE, $FF, $FC, $FF, $F8, $FF, $F8, $FF, $F0, $FF, $F0, $FF, DB $80, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FE, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $F8, $00, $80, $00, $C0, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FF, $00, $FC, $00, $F0, $00, $80, $00, $00, $00, $01, $00, $07, DB $00, $C0, $00, $00, $00, $01, $00, $07, $00, $1F, $00, $7F, $00, $FF, $00, $FF, DB $00, $7F, $00, $7F, $00, $FF, $00, $FF, $00, $FF, $00, $F1, $00, $C1, $00, $03, DB $00, $FC, $00, $FC, $00, $F8, $00, $F0, $00, $E0, $00, $C0, $00, $C0, $00, $80, DB $01, $77, $01, $E7, $00, $E7, $04, $C3, $00, $03, $00, $03, $00, $03, $00, $03, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, $3F, $FF, $3F, $FF, $1F, $FF, DB $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, DB $E0, $FE, $E0, $F0, $E0, $F0, $C0, $D0, $C0, $D0, $80, $90, $80, $90, $00, $10, DB $00, $70, $00, $1C, $00, $07, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $01, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $7F, $00, $FF, $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $FC, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $07, $00, $06, $00, $1C, $00, $70, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $00, $01, $00, $01, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, DB $1F, $FF, $1F, $FF, $1F, $FF, $0F, $FF, $0F, $FF, $0F, $FF, $0F, $FF, $0F, $FF, DB $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, DB $FE, $FE, $FE, $FE, $FC, $FC, $FC, $FC, $F8, $F8, $F0, $F8, $F0, $F8, $F0, $FF, DB $00, $20, $00, $20, $00, $20, $00, $60, $00, $40, $00, $C0, $00, $80, $00, $80, DB $00, $1F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $F8, $00, $3F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $F0, $00, $FC, $00, $3E, $00, $07, $02, $01, $10, $00, $08, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $E0, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $01, $00, $07, $00, $0F, $00, $3C, $00, $F8, $00, $00, DB $00, $00, $00, $03, $00, $FF, $00, $E0, $80, $00, $00, $00, $00, $00, $C0, $00, DB $00, $00, $00, $FF, $00, $80, $00, $00, $01, $00, $00, $01, $00, $01, $00, $01, DB $0F, $FF, $0F, $FF, $1F, $FF, $1F, $FF, $1F, $FF, $1F, $FF, $1F, $FF, $3F, $FF, DB $F0, $F0, $F0, $F0, $F8, $F8, $F8, $F8, $F8, $F8, $FC, $FC, $FC, $FC, $FC, $FC, DB $E0, $FE, $E0, $FC, $C0, $F8, $C0, $F8, $C0, $F8, $C0, $F8, $C0, $FC, $C0, $FC, DB $00, $00, $00, $3F, $00, $03, $00, $00, $00, $0F, $00, $1E, $00, $1F, $00, $1F, DB $00, $00, $00, $80, $00, $F0, $00, $00, $00, $00, $00, $00, $00, $80, $00, $80, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $00, $00, $00, $02, $00, $00, DB $01, $00, $00, $00, $00, $00, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $3F, $00, $F8, $00, $00, $00, $78, $00, $F0, $00, $FC, DB $02, $01, $00, $03, $00, $83, $04, $03, $04, $03, $00, $07, $00, $07, $00, $07, DB $3F, $FF, $3F, $FF, $7F, $FF, $7F, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, DB $C0, $FC, $C0, $FE, $80, $FF, $80, $FF, $80, $FF, $80, $FF, $80, $FF, $80, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $C0, $00, $C0, $00, $E0, DB $00, $1F, $00, $0F, $00, $10, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $04, $00, $04, $00, $04, $00, $04, $00, $04, $00, $06, $00, DB $00, $FC, $00, $F8, $00, $78, $00, $04, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $07, $00, $07, $00, $07, $00, $07, $04, $07, $00, $03, $00, $03, $00, $03, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, $7F, $FF, $3F, $FF, DB $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FE, $FE, DB $80, $FF, $80, $FF, $80, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $F0, $00, $F8, $00, $F8, $00, $FC, $00, $FC, $00, $FE, $00, $FF, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, DB $06, $00, $06, $00, $06, $00, $06, $00, $06, $00, $07, $00, $07, $00, $01, $00, DB $00, $01, $00, $01, $00, $01, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, DB $1F, $FF, $0F, $FF, $07, $FF, $21, $FF, $18, $FF, $0E, $FF, $07, $FF, $07, $FF, DB $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, $BF, $FF, $CF, $FF, DB $00, $00, $00, $00, $00, $00, $80, $80, $E0, $E0, $F0, $F0, $F0, $F0, $F8, $F8, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, DB $00, $C0, $00, $E0, $00, $F0, $00, $F8, $00, $FC, $00, $FE, $00, $FE, $00, $FF, DB $01, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $80, $00, $80, $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $01, $00, $01, $00, $01, $00, $00, $01, $00, $01, $00, $01, $00, $01, DB $03, $FF, $01, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $E7, $FF, $F7, $FF, $FB, $FF, $79, $FF, $3C, $FF, $04, $FF, $00, $FF, $00, $FF, DB $FC, $FC, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, $3F, $FF, DB $00, $00, $00, $00, $80, $80, $E0, $E0, $F0, $F0, $F8, $F8, $FC, $FC, $FC, $FC, .face_4 DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $3F, $3F, $3F, $3F, $7F, $7F, $7F, $7F, $7F, $7F, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FC, $FF, $F0, $FF, $80, $FF, DB $FC, $FF, $F0, $FF, $E0, $FF, $C0, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $F0, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $7F, DB $7F, $FF, $0F, $FF, $03, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FD, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, $0F, $FF, $07, $EF, $03, $EF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $80, $80, $80, $80, $80, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $FF, $FF, $FE, $FF, $FC, $FF, $F8, $FF, $F0, $FF, $F0, $FF, $E0, $FF, $E0, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FD, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $F0, $00, $00, $00, $80, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FE, $00, $F8, $00, $E0, $00, $00, $00, $00, $00, $03, $00, $1F, DB $00, $80, $00, $00, $00, $03, $00, $0F, $00, $3F, $00, $FF, $00, $FF, $00, $FE, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $E3, $00, $83, $00, $07, DB $00, $F9, $00, $F9, $00, $F1, $00, $E1, $00, $C0, $00, $80, $00, $80, $00, $00, DB $03, $CF, $03, $CF, $01, $8F, $09, $87, $00, $07, $00, $07, $00, $07, $00, $07, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, $7F, $FF, $3F, $FF, DB $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FE, DB $C0, $FC, $C0, $E0, $C0, $E0, $80, $A0, $80, $A0, $00, $20, $00, $20, $00, $20, DB $00, $E0, $00, $70, $00, $0F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $07, $00, $FE, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FC, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $F8, $00, $00, $00, $00, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $0E, $00, $1C, $00, $78, $00, $C0, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $07, $00, $03, $00, $03, $00, $03, $00, $01, $00, $01, $00, $01, $00, $01, DB $3F, $FF, $3F, $FF, $3F, $FF, $1F, $FF, $1F, $FF, $1F, $FF, $1F, $FF, $1F, $FF, DB $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, DB $FC, $FC, $FC, $FC, $F8, $F8, $F8, $F8, $F0, $F0, $E0, $F1, $E0, $F3, $E0, $FE, DB $00, $20, $00, $40, $00, $40, $00, $C0, $00, $C0, $00, $80, $00, $00, $00, $00, DB $00, $3F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $F0, $00, $7F, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $E0, $00, $F8, $00, $7C, $00, $0F, $04, $03, $20, $00, $10, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $00, $00, DB $00, $00, $00, $00, $00, $03, $00, $0F, $01, $1E, $00, $78, $00, $F0, $01, $00, DB $00, $00, $00, $07, $00, $FF, $00, $C0, $00, $00, $00, $00, $00, $00, $80, $00, DB $00, $01, $00, $FF, $00, $01, $00, $01, $02, $01, $00, $03, $00, $03, $00, $03, DB $1F, $FF, $1F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $7F, $FF, DB $E0, $E0, $E0, $E0, $F0, $F0, $F0, $F0, $F0, $F0, $F8, $F8, $F8, $F8, $F8, $F8, DB $C0, $F8, $C0, $F0, $80, $F0, $80, $F0, $80, $F8, $80, $F8, $80, $F8, $80, $F8, DB $00, $00, $00, $7F, $00, $07, $00, $00, $00, $1E, $00, $3C, $00, $3F, $00, $3F, DB $00, $00, $00, $00, $00, $E0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $02, $00, $00, $00, $04, $00, $00, DB $02, $00, $00, $00, $00, $00, $00, $03, $00, $00, $00, $00, $00, $01, $00, $01, DB $00, $00, $00, $00, $00, $7F, $00, $F0, $00, $00, $00, $F0, $00, $E0, $00, $F8, DB $04, $03, $00, $07, $00, $07, $08, $07, $09, $07, $01, $0F, $01, $0F, $01, $0F, DB $7F, $FF, $7F, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, DB $80, $FC, $80, $FC, $80, $FE, $80, $FF, $80, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $80, $00, $C0, $00, $E0, DB $00, $3F, $00, $1E, $00, $20, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $08, $00, $08, $00, $08, $00, $08, $00, $08, $00, $0C, $00, DB $00, $01, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $F8, $00, $F0, $00, $F0, $00, $08, $00, $00, $00, $00, $00, $00, $00, $00, DB $01, $0F, $01, $0F, $01, $0F, $01, $0F, $09, $0F, $01, $07, $00, $07, $00, $07, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, DB $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $FC, $FC, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF, DB $00, $E0, $00, $F0, $00, $F0, $00, $F8, $00, $FC, $00, $FE, $00, $FE, $00, $FF, DB $0C, $00, $0C, $00, $0C, $00, $0C, $00, $0C, $00, $0E, $00, $0E, $00, $02, $00, DB $00, $03, $00, $03, $00, $03, $00, $03, $00, $01, $00, $01, $00, $01, $00, $01, DB $3F, $FF, $1F, $FF, $0F, $FF, $43, $FF, $31, $FF, $1C, $FF, $0F, $FF, $07, $FF, DB $FC, $FC, $FE, $FE, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, $3F, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $C0, $C0, $E0, $E0, $E0, $E0, $F0, $F0, DB $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FC, $FF, $FC, $FF, DB $00, $00, $00, $80, $00, $C0, $00, $E0, $00, $F0, $00, $F0, $00, $FC, $00, $FE, DB $02, $00, $03, $00, $01, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $01, $02, $01, $02, $01, $02, $01, $00, $03, $00, $03, $00, $03, $00, $03, DB $03, $FF, $03, $FF, $01, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $9F, $FF, $DF, $FF, $CF, $FF, $E7, $FF, $63, $FF, $01, $FF, $00, $FF, $00, $FF, DB $F8, $F8, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, DB $00, $00, $00, $00, $00, $00, $C0, $C0, $E0, $E0, $F0, $F0, $F8, $F8, $F8, $F8, .face_5 DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $3F, $3F, $3F, $3F, $7F, $7F, $7F, $7F, $7F, $7F, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FC, $FF, $F0, $FF, $80, $FF, DB $FC, $FF, $F0, $FF, $E0, $FF, $C0, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $F0, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $7F, DB $7F, $FF, $0F, $FF, $03, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FD, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, $0F, $FF, $07, $EF, $03, $EF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $80, $80, $80, $80, $80, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $FF, $FF, $FE, $FF, $FC, $FF, $F8, $FF, $F0, $FF, $F0, $FF, $E0, $FF, $E0, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FD, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $F0, $00, $00, $00, $80, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FE, $00, $F8, $00, $E0, $00, $00, $00, $00, $00, $03, $00, $1F, DB $00, $80, $00, $00, $00, $03, $00, $0F, $00, $3F, $00, $FF, $00, $FF, $00, $FE, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $E3, $00, $87, $00, $07, DB $00, $F9, $00, $F9, $00, $F1, $00, $E1, $00, $C0, $00, $80, $00, $00, $00, $00, DB $03, $CF, $03, $CF, $01, $8F, $09, $87, $00, $07, $00, $07, $00, $07, $00, $07, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, $7F, $FF, $3F, $FF, DB $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FE, DB $C0, $FC, $C0, $E0, $C0, $E0, $80, $A0, $80, $A0, $00, $20, $00, $20, $00, $20, DB $00, $E0, $00, $78, $00, $0F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $0F, $00, $FC, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FC, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $F8, $00, $00, $00, $00, $00, $03, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $0E, $00, $1C, $00, $F0, $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $07, $00, $03, $00, $03, $00, $03, $00, $01, $00, $01, $00, $01, $00, $01, DB $3F, $FF, $3F, $FF, $3F, $FF, $1F, $FF, $1F, $FF, $1F, $FF, $1F, $FF, $1F, $FF, DB $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, DB $FC, $FC, $FC, $FC, $F8, $F8, $F8, $F8, $F0, $F0, $E0, $F0, $E0, $F3, $E0, $FE, DB $00, $20, $00, $20, $00, $60, $00, $40, $00, $C0, $00, $C0, $00, $80, $00, $00, DB $00, $3F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $F0, $00, $7F, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $E0, $00, $F8, $00, $7C, $00, $0F, $04, $03, $20, $00, $10, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $00, $00, DB $00, $00, $00, $00, $00, $03, $00, $0F, $01, $1E, $00, $78, $00, $F0, $01, $00, DB $00, $00, $00, $07, $00, $FF, $00, $C0, $00, $00, $00, $00, $00, $00, $80, $00, DB $00, $01, $00, $FF, $00, $01, $00, $01, $02, $01, $00, $03, $00, $03, $00, $03, DB $1F, $FF, $1F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $7F, $FF, DB $E0, $E0, $E0, $E0, $F0, $F0, $F0, $F0, $F0, $F0, $F8, $F8, $F8, $F8, $F8, $F8, DB $C0, $F8, $C0, $F0, $C0, $F0, $C0, $F0, $C0, $F8, $80, $F8, $80, $F8, $80, $F8, DB $00, $00, $00, $7F, $00, $07, $00, $00, $00, $1E, $00, $3C, $00, $3F, $00, $3F, DB $00, $00, $00, $00, $00, $E0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $02, $00, $00, $00, $04, $00, $00, DB $02, $00, $00, $00, $00, $00, $00, $03, $00, $00, $00, $00, $00, $01, $00, $01, DB $00, $00, $00, $00, $00, $7F, $00, $F0, $00, $00, $00, $F0, $00, $E0, $00, $F8, DB $04, $03, $00, $07, $00, $07, $08, $07, $09, $07, $01, $0F, $01, $0F, $01, $0F, DB $7F, $FF, $7F, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, DB $80, $FC, $80, $FC, $80, $FE, $80, $FF, $80, $FF, $80, $FF, $80, $FF, $80, $FF, DB $00, $00, $00, $00, $00, $00, $00, $80, $00, $80, $00, $C0, $00, $E0, $00, $F0, DB $00, $3F, $00, $1E, $00, $20, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $08, $00, $08, $00, $08, $00, $08, $00, $08, $00, $0C, $00, DB $00, $01, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $F8, $00, $F0, $00, $F0, $00, $08, $00, $00, $00, $00, $00, $00, $00, $00, DB $01, $0F, $01, $0F, $01, $0F, $01, $0F, $09, $0F, $01, $07, $00, $07, $00, $07, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, DB $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $FC, $FC, DB $80, $FF, $80, $FF, $80, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $F8, $00, $F8, $00, $F4, $00, $FA, $00, $FE, $00, $FF, $00, $FF, $00, $FF, DB $0C, $00, $0C, $00, $0C, $00, $0C, $00, $0C, $00, $0E, $00, $0E, $00, $02, $00, DB $00, $03, $00, $03, $00, $03, $00, $03, $00, $01, $00, $01, $00, $01, $00, $01, DB $3F, $FF, $1F, $FF, $0F, $FF, $07, $FF, $33, $FF, $1D, $FF, $0C, $FF, $06, $FF, DB $FC, $FC, $FE, $FE, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $C0, $C0, $E0, $E0, $E0, $E0, $F0, $F0, DB $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FC, $FF, DB $00, $80, $00, $80, $00, $C0, $00, $E0, $00, $F0, $00, $F0, $00, $FC, $00, $FE, DB $02, $00, $03, $00, $01, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $01, $02, $01, $02, $01, $02, $01, $00, $03, $00, $03, $00, $03, $00, $03, DB $03, $FF, $01, $FF, $01, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $3F, $FF, $9F, $FF, $CF, $FF, $C7, $FF, $67, $FF, $03, $FF, $01, $FF, $00, $FF, DB $F8, $F8, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $00, $00, $00, $00, $00, $00, $C0, $C0, $E0, $E0, $F0, $F0, $F8, $F8, $F8, $F8, .face_6 DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $3F, $3F, $3F, $3F, $7F, $7F, $7F, $7F, $7F, $7F, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF, $F8, $FF, $80, $FF, DB $FC, $FF, $F0, $FF, $E0, $FF, $C0, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $F0, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $7F, DB $7F, $FF, $0F, $FF, $03, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FD, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, $0F, $FF, $07, $EF, $03, $EF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $80, $80, $80, $80, $80, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $FF, $FF, $FE, $FF, $FC, $FF, $F8, $FF, $F0, $FF, $F0, $FF, $E0, $FF, $E0, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FD, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $F0, $00, $00, $00, $80, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FE, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FE, $00, $F8, $00, $E0, $00, $00, $00, $00, $00, $03, $00, $1F, DB $00, $80, $00, $00, $00, $03, $00, $0F, $00, $3F, $00, $FF, $00, $FF, $00, $FE, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $E3, $00, $87, $00, $07, DB $00, $F9, $00, $F9, $00, $F1, $00, $E1, $00, $C0, $00, $80, $00, $00, $00, $00, DB $03, $CF, $03, $CF, $01, $8F, $09, $07, $00, $07, $00, $07, $00, $07, $00, $07, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, $7F, $FF, $3F, $FF, DB $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FE, DB $C0, $FC, $C0, $E0, $C0, $E0, $80, $A0, $80, $A0, $00, $20, $00, $20, $00, $20, DB $00, $E0, $00, $7C, $00, $07, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $01, $00, $1F, $00, $F8, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FC, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $F0, $00, $00, $00, $00, $00, $03, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $0E, $00, $1C, $00, $F0, $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $07, $00, $03, $00, $03, $00, $03, $00, $01, $00, $01, $00, $01, $00, $01, DB $3F, $FF, $3F, $FF, $3F, $FF, $1F, $FF, $1F, $FF, $1F, $FF, $1F, $FF, $1F, $FF, DB $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, DB $FC, $FC, $FC, $FC, $F8, $F8, $F8, $F8, $F0, $F0, $E0, $F0, $E0, $F1, $E0, $FF, DB $00, $20, $00, $20, $00, $20, $00, $60, $00, $60, $00, $C0, $00, $80, $00, $00, DB $00, $3F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $F0, $00, $7F, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $E0, $00, $F8, $00, $7C, $00, $0F, $04, $03, $20, $00, $10, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $00, $00, DB $00, $00, $00, $00, $00, $03, $00, $0F, $01, $1E, $00, $78, $00, $F0, $01, $00, DB $00, $00, $00, $07, $00, $FF, $00, $C0, $00, $00, $00, $00, $00, $00, $80, $00, DB $00, $01, $00, $FF, $00, $01, $00, $01, $02, $01, $00, $03, $00, $03, $00, $03, DB $1F, $FF, $1F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $7F, $FF, DB $E0, $E0, $E0, $E0, $F0, $F0, $F0, $F0, $F0, $F0, $F8, $F8, $F8, $F8, $F8, $F8, DB $C0, $F8, $C0, $F0, $C0, $F0, $C0, $F8, $C0, $F8, $C0, $F8, $C0, $F8, $C0, $FC, DB $00, $00, $00, $7F, $00, $07, $00, $00, $00, $1E, $00, $3C, $00, $3F, $00, $3F, DB $00, $00, $00, $00, $00, $E0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $02, $00, $00, $00, $04, $00, $00, DB $02, $00, $00, $00, $00, $00, $00, $03, $00, $00, $00, $00, $00, $01, $00, $01, DB $00, $00, $00, $00, $00, $7F, $00, $F0, $00, $00, $00, $F0, $00, $E0, $00, $F8, DB $04, $03, $00, $07, $00, $07, $08, $07, $09, $07, $01, $0F, $01, $0F, $01, $0F, DB $7F, $FF, $7F, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, DB $C0, $FC, $80, $FE, $80, $FE, $80, $FF, $80, $FF, $80, $FF, $80, $FF, $80, $FF, DB $00, $00, $00, $00, $00, $00, $00, $80, $00, $C0, $00, $E0, $00, $F0, $00, $F8, DB $00, $3F, $00, $1E, $00, $20, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $08, $00, $08, $00, $08, $00, $08, $00, $08, $00, $0C, $00, DB $00, $01, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $F8, $00, $F0, $00, $F0, $00, $08, $00, $00, $00, $00, $00, $00, $00, $00, DB $01, $0F, $01, $0F, $01, $0F, $01, $0F, $09, $0F, $01, $07, $00, $07, $00, $07, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, DB $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $F8, $FC, $FC, DB $80, $FF, $80, $FF, $80, $FF, $80, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $FC, $00, $F4, $00, $FA, $00, $F9, $00, $FF, $00, $FE, $00, $FE, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $C0, $00, $C0, $00, $40, DB $0C, $00, $0C, $00, $0C, $00, $0C, $00, $0C, $00, $0E, $00, $0E, $00, $02, $00, DB $00, $03, $00, $03, $00, $03, $00, $03, $00, $01, $00, $01, $00, $01, $00, $01, DB $3F, $FF, $1F, $FF, $0F, $FF, $07, $FF, $13, $FF, $0D, $FF, $05, $FF, $02, $FF, DB $FC, $FC, $FE, $FE, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $C0, $C0, $E0, $E0, $E0, $E0, $F0, $F0, DB $FF, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, DB $00, $E0, $00, $A0, $00, $E0, $00, $F0, $00, $F0, $00, $F8, $00, $FC, $00, $FF, DB $02, $00, $03, $00, $01, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $01, $02, $01, $02, $01, $02, $01, $00, $03, $00, $03, $00, $03, $00, $03, DB $01, $FF, $01, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $3F, $FF, $9F, $FF, $DF, $FF, $CF, $FF, $67, $FF, $07, $FF, $01, $FF, $00, $FF, DB $F8, $F8, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $00, $00, $00, $00, $00, $00, $C0, $C0, $E0, $E0, $F0, $F0, $F8, $F8, $F8, $F8, .face_7 DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $7F, $7F, $7F, $7F, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF, $FC, $FF, $F0, $FF, $80, $FF, DB $F8, $FF, $E0, $FF, $C0, $FF, $80, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $E0, DB $FF, $FF, $1F, $FF, $07, $FF, $01, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FB, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $1F, $FF, $0F, $DF, $07, $DF, DB $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $FF, $FF, $FC, $FF, $F8, $FF, $F0, $FF, $E0, $FF, $E0, $FF, $C0, $FF, $C0, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FE, $00, $FB, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $E0, $00, $00, $00, $00, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FC, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FC, $00, $F0, $00, $C0, $00, $00, $00, $01, $00, $07, $00, $3F, DB $00, $01, $00, $01, $00, $07, $00, $1F, $00, $7F, $00, $FF, $00, $FF, $00, $FC, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $C7, $00, $0E, $00, $0E, DB $00, $F3, $00, $F3, $00, $E3, $00, $C2, $00, $80, $00, $00, $00, $00, $00, $00, DB $07, $9F, $07, $9F, $03, $1F, $13, $0F, $01, $0F, $00, $0F, $00, $0F, $00, $0F, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FE, $FE, $FE, $FC, $FC, DB $80, $F8, $80, $C0, $80, $C0, $00, $40, $00, $40, $00, $40, $00, $40, $00, $40, DB $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $C0, $00, $F8, $00, $0F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $00, $7F, $00, $E0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $F8, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $E0, $00, $00, $00, $01, $00, $0E, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $1C, $00, $70, $00, $C0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $0F, $00, $07, $00, $07, $00, $07, $00, $03, $00, $03, $00, $03, $00, $03, DB $7F, $FF, $7F, $FF, $7F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, DB $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, DB $F8, $F8, $F8, $F8, $F0, $F0, $F0, $F0, $E0, $E0, $C0, $E0, $C0, $E3, $C0, $FE, DB $00, $40, $00, $40, $00, $C0, $00, $C0, $00, $80, $00, $80, $00, $00, $00, $00, DB $00, $7F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $E0, $00, $FF, $00, $03, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $C0, $00, $F0, $00, $F8, $00, $1E, $08, $07, $40, $00, $20, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $03, $00, $00, DB $00, $00, $00, $00, $00, $07, $00, $1F, $02, $3C, $00, $F0, $00, $E0, $03, $00, DB $00, $00, $00, $0F, $00, $FE, $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $00, $FF, $00, $03, $00, $03, $04, $03, $00, $07, $00, $07, $00, $07, DB $3F, $FF, $3F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $FF, $FF, DB $C0, $C0, $C0, $C0, $E0, $E0, $E0, $E0, $E0, $E0, $F0, $F0, $F0, $F0, $F0, $F0, DB $80, $F0, $80, $E0, $80, $E0, $80, $F0, $80, $F0, $80, $F0, $80, $F0, $80, $F8, DB $00, $00, $00, $FE, $00, $0F, $00, $00, $00, $3C, $00, $78, $00, $7E, $00, $7E, DB $00, $00, $00, $00, $00, $C0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $04, $00, $00, $00, $08, $00, $00, DB $04, $00, $00, $00, $00, $00, $00, $07, $00, $00, $00, $01, $00, $03, $00, $03, DB $00, $00, $00, $00, $00, $FE, $00, $E0, $00, $00, $00, $E0, $00, $C0, $00, $F0, DB $08, $07, $00, $0F, $01, $0F, $11, $0F, $13, $0F, $03, $1F, $03, $1F, $03, $1F, DB $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, DB $80, $F8, $80, $FC, $80, $FE, $80, $FE, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $C0, $00, $E0, $00, $F0, DB $00, $7E, $00, $3C, $00, $40, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $10, $00, $10, $00, $10, $00, $10, $00, $10, $00, $18, $00, DB $00, $03, $00, $03, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $F0, $00, $E0, $00, $E0, $00, $10, $00, $00, $00, $00, $00, $00, $00, $00, DB $03, $1F, $03, $1F, $03, $1F, $03, $1F, $13, $1F, $01, $0F, $01, $0F, $00, $0F, DB $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F8, $F8, DB $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, DB $00, $F8, $00, $EC, $00, $F6, $00, $FB, $00, $FF, $00, $FC, $00, $FE, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $C0, $00, $40, $00, $60, DB $18, $00, $18, $00, $18, $00, $18, $00, $18, $00, $1C, $00, $1C, $00, $04, $00, DB $00, $07, $00, $07, $00, $07, $00, $07, $00, $03, $00, $03, $00, $03, $00, $03, DB $7F, $FF, $3F, $FF, $1F, $FF, $0F, $FF, $07, $FF, $0B, $FF, $03, $FF, $05, $FF, DB $F8, $F8, $FC, $FC, $FC, $FC, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $80, $80, $C0, $C0, $C0, $C0, $E0, $E0, DB $FC, $FF, $FC, $FF, $FC, $FF, $FC, $FF, $FC, $FF, $FC, $FF, $FC, $FF, $FC, $FF, DB $00, $20, $00, $B0, $00, $B0, $00, $B0, $00, $F8, $00, $FC, $00, $FC, $00, $FE, DB $04, $00, $06, $00, $02, $00, $02, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $04, $03, $04, $03, $04, $03, $00, $07, $00, $07, $00, $07, $00, $07, DB $02, $FF, $03, $FF, $01, $FF, $01, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $FF, $FF, $7F, $FF, $7F, $FF, $3F, $FF, $9F, $FF, $0F, $FF, $03, $FF, $01, $FF, DB $F0, $F0, $FC, $FC, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $00, $00, $00, $00, $00, $00, $80, $80, $C0, $C0, $E0, $E0, $F0, $F0, $F0, $F0, .face_8 DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $7F, $7F, $7F, $7F, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF, $FC, $FF, $F0, $FF, $80, $FF, DB $F8, $FF, $E0, $FF, $C0, $FF, $80, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $E0, DB $FF, $FF, $1F, $FF, $07, $FF, $01, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FB, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $1F, $FF, $0F, $DF, $07, $DF, DB $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $FF, $FF, $FC, $FF, $F8, $FF, $F0, $FF, $E0, $FF, $E0, $FF, $C0, $FF, $C0, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FE, $00, $FB, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $E0, $00, $00, $00, $00, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FC, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FC, $00, $F0, $00, $C0, $00, $00, $00, $01, $00, $07, $00, $1F, DB $00, $01, $00, $01, $00, $07, $00, $1F, $00, $7F, $00, $FF, $00, $FF, $00, $FC, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $C7, $00, $0E, $00, $0E, DB $00, $F3, $00, $F3, $00, $E3, $00, $C3, $00, $80, $00, $00, $00, $00, $00, $00, DB $07, $9F, $07, $9F, $03, $9F, $13, $0F, $01, $0F, $00, $0F, $00, $0F, $00, $0F, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FE, $FE, $FE, $FC, $FC, DB $80, $F8, $80, $C0, $80, $C0, $00, $40, $00, $40, $00, $40, $00, $40, $00, $40, DB $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $C0, $00, $F0, $00, $1F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $00, $3F, $00, $F0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FC, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $E0, $00, $00, $00, $01, $00, $06, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $1C, $00, $78, $00, $C0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $0F, $00, $07, $00, $07, $00, $07, $00, $03, $00, $03, $00, $03, $00, $03, DB $7F, $FF, $7F, $FF, $7F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, DB $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, DB $F8, $F8, $F8, $F8, $F0, $F0, $F0, $F0, $E0, $E0, $C0, $E3, $C0, $E6, $C0, $FC, DB $00, $40, $00, $40, $00, $C0, $00, $C0, $00, $80, $00, $00, $00, $00, $00, $00, DB $00, $7F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $E0, $00, $FF, $00, $03, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $C0, $00, $F0, $00, $F8, $00, $1E, $08, $07, $40, $00, $20, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $03, $00, $00, DB $00, $00, $00, $00, $00, $07, $00, $1F, $02, $3C, $00, $F0, $00, $E0, $03, $00, DB $00, $00, $00, $0F, $00, $FE, $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $00, $FF, $00, $03, $00, $03, $04, $03, $00, $07, $00, $07, $00, $07, DB $3F, $FF, $3F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $FF, $FF, DB $C0, $C0, $C0, $C0, $E0, $E0, $E0, $E0, $E0, $E0, $F0, $F0, $F0, $F0, $F0, $F0, DB $80, $F0, $80, $E0, $80, $E0, $80, $F0, $80, $F0, $80, $F0, $80, $F8, $80, $F8, DB $00, $00, $00, $FE, $00, $0F, $00, $00, $00, $3C, $00, $78, $00, $7E, $00, $7E, DB $00, $00, $00, $00, $00, $C0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $04, $00, $00, $00, $08, $00, $00, DB $04, $00, $00, $00, $00, $00, $00, $07, $00, $00, $00, $01, $00, $03, $00, $03, DB $00, $00, $00, $00, $00, $FE, $00, $E0, $00, $00, $00, $E0, $00, $C0, $00, $F0, DB $08, $07, $00, $0F, $01, $0F, $11, $0F, $11, $0F, $01, $1F, $03, $1F, $03, $1F, DB $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, DB $80, $FC, $80, $FC, $00, $FE, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $C0, $00, $E0, $00, $F0, DB $00, $7E, $00, $3C, $00, $40, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $10, $00, $10, $00, $10, $00, $10, $00, $10, $00, $18, $00, DB $00, $03, $00, $03, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $F0, $00, $E0, $00, $E0, $00, $10, $00, $00, $00, $00, $00, $00, $00, $00, DB $03, $1F, $03, $1F, $03, $1F, $03, $1F, $13, $1F, $01, $0F, $01, $0F, $00, $0F, DB $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F8, $F8, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, DB $00, $F8, $00, $FC, $00, $F6, $00, $FB, $00, $FD, $00, $FE, $00, $FF, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $C0, $00, $60, $00, $20, DB $18, $00, $18, $00, $18, $00, $18, $00, $18, $00, $1C, $00, $1C, $00, $04, $00, DB $00, $07, $00, $07, $00, $07, $00, $07, $00, $03, $00, $03, $00, $03, $00, $03, DB $3F, $FF, $1F, $FF, $0F, $FF, $07, $FF, $07, $FF, $03, $FF, $03, $FF, $01, $FF, DB $F8, $F8, $FC, $FC, $FC, $FC, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $80, $80, $C0, $C0, $C0, $C0, $E0, $E0, DB $FE, $FF, $FE, $FF, $FC, $FF, $FC, $FF, $FC, $FF, $FC, $FF, $FC, $FF, $FC, $FF, DB $00, $B0, $00, $98, $00, $D8, $00, $CC, $00, $EC, $00, $EE, $00, $F6, $00, $F6, DB $04, $00, $06, $00, $02, $00, $02, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $04, $03, $04, $03, $04, $03, $00, $07, $00, $07, $00, $07, $00, $07, DB $02, $FF, $03, $FF, $01, $FF, $01, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $FF, $FF, $7F, $FF, $7F, $FF, $3F, $FF, $9F, $FF, $0F, $FF, $03, $FF, $01, $FF, DB $F0, $F0, $FC, $FC, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $00, $00, $00, $00, $00, $00, $80, $80, $C0, $C0, $E0, $E0, $F0, $F0, $F0, $F0, .face_9 DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $7F, $7F, $7F, $7F, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF, $FC, $FF, $F0, $FF, $80, $FF, DB $F8, $FF, $E0, $FF, $C0, $FF, $80, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $E0, DB $FF, $FF, $1F, $FF, $07, $FF, $01, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FB, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $1F, $FF, $0F, $DF, $07, $DF, DB $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $FF, $FF, $FC, $FF, $F8, $FF, $F0, $FF, $E0, $FF, $E0, $FF, $C0, $FF, $C0, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FE, $00, $FB, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $F0, $00, $00, $00, $00, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FC, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FC, $00, $F0, $00, $C0, $00, $00, $00, $01, $00, $07, $00, $0F, DB $00, $01, $00, $01, $00, $07, $00, $1F, $00, $7F, $00, $FF, $00, $FF, $00, $FC, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $C7, $00, $07, $00, $0E, DB $00, $F3, $00, $F3, $00, $E3, $00, $C1, $00, $80, $00, $00, $00, $00, $00, $00, DB $07, $DF, $07, $9F, $03, $9F, $13, $8F, $01, $0F, $00, $0F, $00, $0F, $00, $0F, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FE, $FE, $FE, $FC, $FC, DB $80, $F8, $80, $C0, $80, $C0, $00, $40, $00, $40, $00, $40, $00, $40, $00, $C0, DB $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $C0, $00, $E0, $00, $3F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $00, $1F, $00, $F8, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FE, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $E0, $00, $00, $00, $00, $00, $03, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $1C, $00, $78, $00, $E0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $0F, $00, $07, $00, $07, $00, $07, $00, $03, $00, $03, $00, $03, $00, $03, DB $7F, $FF, $7F, $FF, $7F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, DB $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, DB $F8, $F8, $F8, $F8, $F0, $F0, $F0, $F0, $E0, $E1, $C0, $E3, $C0, $EE, $C0, $F8, DB $00, $C0, $00, $80, $00, $80, $00, $80, $00, $80, $00, $00, $00, $00, $00, $00, DB $00, $7F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $E0, $00, $FF, $00, $03, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $C0, $00, $F0, $00, $F8, $00, $1E, $08, $07, $40, $00, $20, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $03, $00, $00, DB $00, $00, $00, $00, $00, $07, $00, $1F, $02, $3C, $00, $F0, $00, $E0, $03, $00, DB $00, $00, $00, $0F, $00, $FE, $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $00, $FF, $00, $03, $00, $03, $04, $03, $00, $07, $00, $07, $00, $07, DB $3F, $FF, $3F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $FF, $FF, DB $C0, $C0, $C0, $C0, $E0, $E0, $E0, $E0, $E0, $E0, $F0, $F0, $F0, $F0, $F0, $F0, DB $C0, $F0, $80, $E0, $80, $E0, $80, $E0, $80, $F0, $80, $F0, $80, $F0, $80, $F8, DB $00, $00, $00, $FE, $00, $0F, $00, $00, $00, $3C, $00, $78, $00, $7E, $00, $7E, DB $00, $00, $00, $00, $00, $C0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $04, $00, $00, $00, $08, $00, $00, DB $04, $00, $00, $00, $00, $00, $00, $07, $00, $00, $00, $01, $00, $03, $00, $03, DB $00, $00, $00, $00, $00, $FE, $00, $E0, $00, $00, $00, $E0, $00, $C0, $00, $F0, DB $08, $07, $00, $0F, $01, $0F, $11, $0F, $11, $0F, $01, $1F, $01, $1F, $03, $1F, DB $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, DB $80, $F8, $80, $FC, $80, $FC, $80, $FE, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $E0, DB $00, $7E, $00, $3C, $00, $40, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $10, $00, $10, $00, $10, $00, $10, $00, $10, $00, $18, $00, DB $00, $03, $00, $03, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $F0, $00, $E0, $00, $E0, $00, $10, $00, $00, $00, $00, $00, $00, $00, $00, DB $03, $1F, $03, $1F, $03, $1F, $01, $1F, $11, $1F, $01, $0F, $00, $0F, $00, $0F, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $3F, $FF, DB $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F8, $F8, DB $00, $F0, $00, $F8, $00, $FC, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $C0, $00, $60, $00, $B0, DB $18, $00, $18, $00, $18, $00, $18, $00, $18, $00, $1C, $00, $1C, $00, $04, $00, DB $00, $07, $00, $07, $00, $07, $00, $07, $00, $03, $00, $03, $00, $03, $00, $03, DB $1F, $FF, $0F, $FF, $07, $FF, $07, $FF, $07, $FF, $03, $FF, $03, $FF, $03, $FF, DB $F8, $F8, $FC, $FC, $FC, $FC, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $80, $80, $C0, $C0, $C0, $C0, $E0, $E0, DB $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FC, $FF, $FC, $FF, $FC, $FF, DB $00, $D8, $00, $EC, $00, $EC, $00, $F6, $00, $F6, $00, $F7, $00, $FB, $00, $FB, DB $04, $00, $06, $00, $02, $00, $02, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $04, $03, $04, $03, $04, $03, $00, $07, $00, $07, $00, $07, $00, $07, DB $01, $FF, $01, $FF, $00, $FF, $01, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $FF, $FF, $FF, $FF, $7F, $FF, $3F, $FF, $BF, $FF, $0F, $FF, $03, $FF, $00, $FF, DB $F0, $F0, $FC, $FC, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $00, $00, $00, $00, $00, $00, $80, $80, $C0, $C0, $E0, $E0, $F0, $F0, $F0, $F0, .face_10 DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $7F, $7F, $7F, $7F, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF, $FC, $FF, $F0, $FF, $80, $FF, DB $F8, $FF, $E0, $FF, $C0, $FF, $80, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $E0, DB $FF, $FF, $1F, $FF, $07, $FF, $01, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FB, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $1F, $FF, $0F, $DF, $07, $DF, DB $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $FF, $FF, $FC, $FF, $F8, $FF, $F0, $FF, $E0, $FF, $E0, $FF, $C0, $FF, $C0, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FE, $00, $FB, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $F8, $00, $00, $00, $00, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FE, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FC, $00, $F0, $00, $C0, $00, $00, $00, $01, $00, $03, $00, $0F, DB $00, $01, $00, $01, $00, $07, $00, $1F, $00, $7F, $00, $FF, $00, $FF, $00, $FC, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $C7, $00, $07, $00, $0E, DB $00, $F3, $00, $F3, $00, $E1, $00, $C1, $00, $80, $00, $80, $00, $00, $00, $00, DB $07, $DF, $07, $DF, $03, $9F, $13, $8F, $01, $0F, $00, $0F, $00, $0F, $00, $0F, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FE, $FE, $FE, $FC, $FC, DB $80, $F8, $80, $C0, $80, $C0, $00, $40, $00, $40, $00, $40, $00, $C0, $00, $C0, DB $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $80, $00, $E0, $00, $3F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $01, $00, $0F, $00, $FE, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $F0, $00, $00, $00, $00, $00, $03, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $1C, $00, $38, $00, $60, $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $0F, $00, $07, $00, $07, $00, $07, $00, $03, $00, $03, $00, $03, $00, $03, DB $7F, $FF, $7F, $FF, $7F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, DB $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, DB $F8, $F8, $F8, $F8, $F0, $F0, $F0, $F1, $E0, $E3, $C0, $E6, $C0, $EC, $C0, $F8, DB $00, $80, $00, $80, $00, $80, $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $7F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $E0, $00, $FF, $00, $03, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $C0, $00, $F0, $00, $F8, $00, $1E, $08, $07, $40, $00, $20, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $03, $00, $00, DB $00, $00, $00, $00, $00, $07, $00, $1F, $02, $3C, $00, $F0, $00, $E0, $03, $00, DB $00, $00, $00, $0F, $00, $FE, $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $00, $FF, $00, $03, $00, $03, $04, $03, $00, $07, $00, $07, $00, $07, DB $3F, $FF, $3F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $FF, $FF, DB $C0, $C0, $C0, $C0, $E0, $E0, $E0, $E0, $E0, $E0, $F0, $F0, $F0, $F0, $F0, $F0, DB $C0, $F0, $80, $E0, $80, $E0, $80, $E0, $80, $F0, $80, $F0, $80, $F0, $80, $F8, DB $00, $00, $00, $FE, $00, $0F, $00, $00, $00, $3C, $00, $78, $00, $7E, $00, $7E, DB $00, $00, $00, $00, $00, $C0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $04, $00, $00, $00, $08, $00, $00, DB $04, $00, $00, $00, $00, $00, $00, $07, $00, $00, $00, $01, $00, $03, $00, $03, DB $00, $00, $00, $00, $00, $FE, $00, $E0, $00, $00, $00, $E0, $00, $C0, $00, $F0, DB $08, $07, $00, $0F, $01, $0F, $11, $0F, $11, $0F, $01, $1F, $01, $1F, $03, $1F, DB $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, DB $80, $F8, $80, $FC, $80, $FC, $80, $FE, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $C0, DB $00, $7E, $00, $3C, $00, $40, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $10, $00, $10, $00, $10, $00, $10, $00, $10, $00, $18, $00, DB $00, $03, $00, $03, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $F0, $00, $E0, $00, $E0, $00, $10, $00, $00, $00, $00, $00, $00, $00, $00, DB $03, $1F, $03, $1F, $03, $1F, $01, $1F, $11, $1F, $01, $0F, $00, $0F, $00, $0F, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $3F, $FF, DB $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F8, $F8, DB $00, $E0, $00, $F0, $00, $F8, $00, $FC, $00, $FE, $00, $FF, $00, $FF, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $00, $E0, DB $18, $00, $18, $00, $18, $00, $18, $00, $18, $00, $1C, $00, $1C, $00, $04, $00, DB $00, $07, $00, $07, $00, $07, $00, $07, $00, $03, $00, $03, $00, $03, $00, $03, DB $0F, $FF, $07, $FF, $03, $FF, $03, $FF, $03, $FF, $01, $FF, $01, $FF, $01, $FF, DB $F8, $F8, $FC, $FC, $FC, $FC, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $80, $80, $C0, $C0, $C0, $C0, $E0, $E0, DB $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FC, $FF, $FC, $FF, $FC, $FF, DB $00, $F0, $00, $F8, $00, $FC, $00, $FE, $00, $FF, $00, $FD, $00, $FE, $00, $FE, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $80, DB $04, $00, $06, $00, $02, $00, $02, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $04, $03, $04, $03, $04, $03, $00, $07, $00, $07, $00, $07, $00, $07, DB $01, $FF, $01, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, $3F, $FF, $1F, $FF, $07, $FF, $01, $FF, DB $F0, $F0, $FC, $FC, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $00, $00, $00, $00, $00, $00, $80, $80, $C0, $C0, $E0, $E0, $F0, $F0, $F0, $F0, .face_11 DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $7F, $7F, $7F, $7F, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF, $FC, $FF, $F0, $FF, $80, $FF, DB $F8, $FF, $E0, $FF, $C0, $FF, $80, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $E0, DB $FF, $FF, $1F, $FF, $07, $FF, $01, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FB, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $1F, $FF, $0F, $DF, $07, $DF, DB $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $FF, $FF, $FC, $FF, $F8, $FF, $F0, $FF, $E0, $FF, $E0, $FF, $C0, $FF, $C0, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FE, $00, $FB, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $F8, $00, $00, $00, $00, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FE, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FC, $00, $F0, $00, $C0, $00, $00, $00, $01, $00, $03, $00, $0F, DB $00, $01, $00, $01, $00, $07, $00, $1F, $00, $7F, $00, $FF, $00, $FF, $00, $FC, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $C7, $00, $0F, $00, $0E, DB $00, $F3, $00, $F3, $00, $E1, $00, $C1, $00, $80, $00, $00, $00, $00, $00, $00, DB $07, $DF, $07, $DF, $03, $DF, $13, $8F, $01, $0F, $00, $0F, $00, $0F, $00, $0F, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FE, $FE, $FE, $FC, $FC, DB $80, $F8, $80, $C0, $80, $C0, $00, $40, $00, $40, $00, $40, $00, $C0, $00, $C0, DB $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $80, $00, $F0, $00, $1F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $0F, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FF, $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $F0, $00, $00, $00, $00, $00, $07, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $1C, $00, $30, $00, $E0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $0F, $00, $07, $00, $07, $00, $07, $00, $03, $00, $03, $00, $03, $00, $03, DB $7F, $FF, $7F, $FF, $7F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, DB $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, DB $F8, $F8, $F8, $F8, $F0, $F1, $F0, $F3, $E0, $E2, $C0, $E6, $C0, $EC, $C0, $F8, DB $00, $80, $00, $80, $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $7F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $E0, $00, $FF, $00, $03, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $C0, $00, $F0, $00, $F8, $00, $1E, $08, $07, $40, $00, $20, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $03, $00, $00, DB $00, $00, $00, $00, $00, $07, $00, $1F, $02, $3C, $00, $F0, $00, $E0, $03, $00, DB $00, $00, $00, $0F, $00, $FE, $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $00, $FF, $00, $03, $00, $03, $04, $03, $00, $07, $00, $07, $00, $07, DB $3F, $FF, $3F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $FF, $FF, DB $C0, $C0, $C0, $C0, $E0, $E0, $E0, $E0, $E0, $E0, $F0, $F0, $F0, $F0, $F0, $F0, DB $C0, $F0, $80, $E0, $80, $E0, $80, $E0, $80, $F0, $80, $F0, $80, $F8, $80, $F8, DB $00, $00, $00, $FE, $00, $0F, $00, $00, $00, $3C, $00, $78, $00, $7E, $00, $7E, DB $00, $00, $00, $00, $00, $C0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $04, $00, $00, $00, $08, $00, $00, DB $04, $00, $00, $00, $00, $00, $00, $07, $00, $00, $00, $01, $00, $03, $00, $03, DB $00, $00, $00, $00, $00, $FE, $00, $E0, $00, $00, $00, $E0, $00, $C0, $00, $F0, DB $08, $07, $00, $0F, $01, $0F, $11, $0F, $11, $0F, $01, $1F, $03, $1F, $03, $1F, DB $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, DB $80, $FC, $80, $FC, $80, $FE, $00, $FE, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $80, $00, $C0, DB $00, $7E, $00, $3C, $00, $40, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $10, $00, $10, $00, $10, $00, $10, $00, $10, $00, $18, $00, DB $00, $03, $00, $03, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $F0, $00, $E0, $00, $E0, $00, $10, $00, $00, $00, $00, $00, $00, $00, $00, DB $03, $1F, $03, $1F, $03, $1F, $03, $1F, $11, $1F, $01, $0F, $00, $0F, $00, $0F, DB $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F8, $F8, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF, DB $00, $C0, $00, $E0, $00, $F0, $00, $F8, $00, $FC, $00, $FE, $00, $FF, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $C0, DB $18, $00, $18, $00, $18, $00, $18, $00, $18, $00, $1C, $00, $1C, $00, $04, $00, DB $00, $07, $00, $07, $00, $07, $00, $07, $00, $03, $00, $03, $00, $03, $00, $03, DB $1F, $FF, $0F, $FF, $07, $FF, $03, $FF, $01, $FF, $00, $FF, $00, $FF, $00, $FF, DB $F8, $F8, $FC, $FC, $FC, $FC, $FE, $FE, $FF, $FF, $FF, $FF, $7F, $FF, $7F, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $80, $80, $C0, $C0, $C0, $C0, $E0, $E0, DB $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FC, $FF, $FC, $FF, $FC, $FF, DB $00, $E0, $00, $E0, $00, $F0, $00, $FC, $00, $FC, $00, $FE, $00, $FF, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, DB $04, $00, $06, $00, $02, $00, $02, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $04, $03, $04, $03, $04, $03, $00, $07, $00, $07, $00, $07, $00, $07, DB $3F, $FF, $3F, $FF, $3F, $FF, $1F, $FF, $1F, $FF, $0F, $FF, $07, $FF, $01, $FF, DB $F0, $F0, $FC, $FC, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $00, $00, $00, $00, $00, $00, $80, $80, $C0, $C0, $E0, $E0, $F0, $F0, $F0, $F0, .face_12 DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $7F, $7F, $7F, $7F, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF, $FC, $FF, $F0, $FF, $80, $FF, DB $F8, $FF, $E0, $FF, $C0, $FF, $80, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $E0, DB $FF, $FF, $1F, $FF, $07, $FF, $01, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FB, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $1F, $FF, $0F, $DF, $07, $DF, DB $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $FF, $FF, $FC, $FF, $F8, $FF, $F0, $FF, $E0, $FF, $E0, $FF, $C0, $FF, $C0, $FF, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FE, $00, $FB, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $F8, $00, $00, $00, $00, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FE, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FC, $00, $F0, $00, $C0, $00, $00, $00, $01, $00, $03, $00, $0F, DB $00, $01, $00, $01, $00, $07, $00, $1F, $00, $7F, $00, $FF, $00, $FF, $00, $FC, DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $C7, $00, $07, $00, $0E, DB $00, $F3, $00, $F1, $00, $E1, $00, $C0, $00, $80, $00, $00, $00, $00, $00, $00, DB $07, $DF, $07, $DF, $03, $DF, $13, $8F, $01, $0F, $00, $0F, $00, $0F, $00, $0F, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $FF, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FE, $FE, $FE, $FC, $FC, DB $80, $F8, $80, $C0, $80, $C0, $00, $40, $00, $40, $00, $40, $00, $C0, $00, $C0, DB $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $80, $00, $E0, $00, $3F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $07, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $FF, $00, $FF, $00, $C0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $F0, $00, $00, $00, $00, $00, $07, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $1C, $00, $38, $00, $60, $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $0F, $00, $07, $00, $07, $00, $07, $00, $03, $00, $03, $00, $03, $00, $03, DB $7F, $FF, $7F, $FF, $7F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, $3F, $FF, DB $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, DB $F8, $F8, $F8, $F8, $F0, $F1, $F0, $F3, $E0, $E6, $C0, $EC, $C0, $E8, $C0, $F8, DB $00, $80, $00, $80, $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $7F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $E0, $00, $FF, $00, $03, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $C0, $00, $F0, $00, $F8, $00, $1E, $08, $07, $40, $00, $20, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $03, $00, $00, DB $00, $00, $00, $00, $00, $07, $00, $1F, $02, $3C, $00, $F0, $00, $E0, $03, $00, DB $00, $00, $00, $0F, $00, $FE, $00, $80, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $00, $FF, $00, $03, $00, $03, $04, $03, $00, $07, $00, $07, $00, $07, DB $3F, $FF, $3F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $7F, $FF, $FF, $FF, DB $C0, $C0, $C0, $C0, $E0, $E0, $E0, $E0, $E0, $E0, $F0, $F0, $F0, $F0, $F0, $F0, DB $C0, $F0, $80, $E0, $80, $E0, $80, $E0, $80, $F0, $80, $F0, $80, $F8, $80, $FC, DB $00, $00, $00, $FE, $00, $0F, $00, $00, $00, $3C, $00, $78, $00, $7E, $00, $7E, DB $00, $00, $00, $00, $00, $C0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $04, $00, $00, $00, $08, $00, $00, DB $04, $00, $00, $00, $00, $00, $00, $07, $00, $00, $00, $01, $00, $03, $00, $03, DB $00, $00, $00, $00, $00, $FE, $00, $E0, $00, $00, $00, $E0, $00, $C0, $00, $F0, DB $08, $07, $00, $0F, $01, $0F, $11, $0F, $11, $0F, $03, $1F, $03, $1F, $03, $1F, DB $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, DB $80, $FE, $80, $FE, $80, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $80, $00, $C0, $00, $C0, DB $00, $7E, $00, $3C, $00, $40, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $00, $00, $00, $10, $00, $10, $00, $10, $00, $10, $00, $10, $00, $18, $00, DB $00, $03, $00, $03, $00, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $F0, $00, $E0, $00, $E0, $00, $10, $00, $00, $00, $00, $00, $00, $00, $00, DB $03, $1F, $03, $1F, $03, $1F, $03, $1F, $11, $1F, $01, $0F, $00, $0F, $00, $0F, DB $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F8, $F8, DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF, DB $00, $E0, $00, $E0, $00, $F0, $00, $F8, $00, $FC, $00, $FE, $00, $FF, $00, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, DB $18, $00, $18, $00, $18, $00, $18, $00, $18, $00, $1C, $00, $1C, $00, $04, $00, DB $00, $07, $00, $07, $00, $07, $00, $07, $00, $03, $00, $03, $00, $03, $00, $03, DB $3F, $FF, $0F, $FF, $07, $FF, $03, $FF, $01, $FF, $00, $FF, $00, $FF, $00, $FF, DB $F8, $F8, $FC, $FC, $FC, $FC, $FE, $FE, $FF, $FF, $FF, $FF, $7F, $FF, $3F, $FF, DB $00, $00, $00, $00, $00, $00, $00, $00, $80, $80, $C0, $C0, $C0, $C0, $E0, $E0, DB $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FE, $FF, $FC, $FF, $FC, $FF, $FC, $FF, DB $00, $C0, $00, $E0, $00, $E0, $00, $F0, $00, $F8, $00, $FC, $00, $FE, $00, $FF, DB $04, $00, $06, $00, $02, $00, $02, $00, $00, $00, $00, $00, $00, $00, $00, $00, DB $00, $03, $04, $03, $04, $03, $04, $03, $00, $07, $00, $07, $00, $07, $00, $07, DB $3F, $FF, $3F, $FF, $1F, $FF, $1F, $FF, $0F, $FF, $0F, $FF, $07, $FF, $01, $FF, DB $F0, $F0, $FC, $FC, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, DB $00, $00, $00, $00, $00, $00, $80, $80, $C0, $C0, $E0, $E0, $F0, $F0, $F0, $F0, .face_13 DB $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $FF,
test/Succeed/Issue2223-constraints-in-frontmatter.agda
cruhland/agda
1,989
1327
-- Andreas, 2016-10-09, re issue #2223 -- The front matter or module telescope of the top-level module -- may generate level constraints that live in no module! {-# OPTIONS -v tc.constr.add:45 #-} -- KEEP! open import Common.Level open import Issue2223.Setoids -- import necessary! module _ (S : Setoid lzero lzero) (a : Setoid.Carrier S) (_ : a ⟨ Setoid._≈_ S ⟩ a) where -- PROBLEM WAS: internal error in debug printing. -- Should work now.
toggle hide done items.ftplugin/HideDone-002.applescript
RobTrew/txtquery-tools
69
2870
-- ver 1.0.2 toggles visibility of @done without losing any existing focus property pstrJS : " function(editor) { var strActivePath = editor.nodePath().nodePathString, lstNodes, strExceptDone = ' except //@done', lngChars=strExceptDone.length, strToggledPath, lngStart; switch (strActivePath) { case '///*': strToggledPath = '//not @done'; break; case '//not @done': strToggledPath = '///*'; break; default : lngStart = strActivePath.length-lngChars; if (strActivePath.indexOf(' except //@done', lngStart) == -1) strToggledPath = strActivePath + strExceptDone; else strToggledPath = strActivePath.substring(0, lngStart); break; } editor.setNodePath(strToggledPath); } " tell application "FoldingText" set lstDocs to documents if lstDocs ≠ {} then tell item 1 of lstDocs to (evaluate script pstrJS) end if end tell
NandToTetris/projects/07/StackArithmetic/StackTest/StackTest.asm
davejlin/coursera
0
178356
<reponame>davejlin/coursera // push constant 17 @17 D=A @SP AM=M+1 A=A-1 M=D // push constant 17 @17 D=A @SP AM=M+1 A=A-1 M=D // eq @SP AM=M-1 D=M A=A-1 D=M-D M=0 @22 D;JEQ @25 0;JMP @SP A=M-1 M=-1 // push constant 17 @17 D=A @SP AM=M+1 A=A-1 M=D // push constant 16 @16 D=A @SP AM=M+1 A=A-1 M=D // eq @SP AM=M-1 D=M A=A-1 D=M-D M=0 @47 D;JEQ @50 0;JMP @SP A=M-1 M=-1 // push constant 16 @16 D=A @SP AM=M+1 A=A-1 M=D // push constant 17 @17 D=A @SP AM=M+1 A=A-1 M=D // eq @SP AM=M-1 D=M A=A-1 D=M-D M=0 @72 D;JEQ @75 0;JMP @SP A=M-1 M=-1 // push constant 892 @892 D=A @SP AM=M+1 A=A-1 M=D // push constant 891 @891 D=A @SP AM=M+1 A=A-1 M=D // lt @SP AM=M-1 D=M A=A-1 D=M-D M=0 @97 D;JLT @100 0;JMP @SP A=M-1 M=-1 // push constant 891 @891 D=A @SP AM=M+1 A=A-1 M=D // push constant 892 @892 D=A @SP AM=M+1 A=A-1 M=D // lt @SP AM=M-1 D=M A=A-1 D=M-D M=0 @122 D;JLT @125 0;JMP @SP A=M-1 M=-1 // push constant 891 @891 D=A @SP AM=M+1 A=A-1 M=D // push constant 891 @891 D=A @SP AM=M+1 A=A-1 M=D // lt @SP AM=M-1 D=M A=A-1 D=M-D M=0 @147 D;JLT @150 0;JMP @SP A=M-1 M=-1 // push constant 32767 @32767 D=A @SP AM=M+1 A=A-1 M=D // push constant 32766 @32766 D=A @SP AM=M+1 A=A-1 M=D // gt @SP AM=M-1 D=M A=A-1 D=M-D M=0 @172 D;JGT @175 0;JMP @SP A=M-1 M=-1 // push constant 32766 @32766 D=A @SP AM=M+1 A=A-1 M=D // push constant 32767 @32767 D=A @SP AM=M+1 A=A-1 M=D // gt @SP AM=M-1 D=M A=A-1 D=M-D M=0 @197 D;JGT @200 0;JMP @SP A=M-1 M=-1 // push constant 32766 @32766 D=A @SP AM=M+1 A=A-1 M=D // push constant 32766 @32766 D=A @SP AM=M+1 A=A-1 M=D // gt @SP AM=M-1 D=M A=A-1 D=M-D M=0 @222 D;JGT @225 0;JMP @SP A=M-1 M=-1 // push constant 57 @57 D=A @SP AM=M+1 A=A-1 M=D // push constant 31 @31 D=A @SP AM=M+1 A=A-1 M=D // push constant 53 @53 D=A @SP AM=M+1 A=A-1 M=D // add @SP AM=M-1 D=M A=A-1 M=D+M // push constant 112 @112 D=A @SP AM=M+1 A=A-1 M=D // sub @SP AM=M-1 D=M A=A-1 M=M-D // neg @SP A=M-1 M=-M // and @SP AM=M-1 D=M A=A-1 M=M&D // push constant 82 @82 D=A @SP AM=M+1 A=A-1 M=D // or @SP AM=M-1 D=M A=A-1 M=M|D // not @SP A=M-1 M=!M
libsrc/gfx/common/swapgfxbk_noop.asm
ahjelm/z88dk
640
25242
<reponame>ahjelm/z88dk ; ; Graphics Functions ; ; swapgfxbk () -- foo routine for fake swapping ; ; <NAME> - Jan 2007 ; ; ; $Id: swapgfxbk_foo.asm,v 1.5 2017-01-02 21:51:24 aralbrec Exp $ ; SECTION code_graphics PUBLIC swapgfxbk PUBLIC swapgfxbk1 .swapgfxbk .swapgfxbk1 ret
programs/oeis/080/A080529.asm
neoneye/loda
22
164514
; A080529: Number of nucleons in longest known radioactive decay series ending with Lead 206 ("uranium series"), reversed. ; 206,206,206,210,210,214,214,218,222,226,230,234,238,242,242,246,250,254,258,262,266 mov $1,$0 lpb $1 add $2,2 div $1,$2 add $1,$2 sub $1,1 lpe sub $0,$1 mul $0,4 add $0,206
tests/std_cases/tm.asm
ZippyMagician/arsm
5
88776
ceq in 49 cjm :loop out 0 hlt 0 .loop out 1 jmp :loop
src/sets/nat/ordering/lt/level.agda
pcapriotti/agda-base
20
5810
<gh_stars>10-100 {-# OPTIONS --without-K #-} module sets.nat.ordering.lt.level where open import sum open import equality.core open import hott.level.core open import hott.level.closure open import sets.nat.core open import sets.nat.ordering.lt.core open import sets.nat.ordering.leq.level open import sets.empty open import container.core open import container.w <-level : ∀ {m n} → h 1 (m < n) <-level = ≤-level
programs/oeis/270/A270803.asm
karttu/loda
0
173171
<filename>programs/oeis/270/A270803.asm ; A270803: Formal inverse of Thue-Morse sequence A010060. ; 0,1,1,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 mov $2,2 lpb $0,1 add $0,1 pow $2,2 add $0,$2 div $0,$2 mov $2,$0 add $2,2 mov $0,$2 sub $0,2 mov $1,2 trn $1,$0 sub $0,1 add $2,3 gcd $2,2 lpe
alloy4fun_models/trainstlt/models/1/RDSoQyrdJMSQeLBZK.als
Kaixi26/org.alloytools.alloy
0
3829
<reponame>Kaixi26/org.alloytools.alloy<filename>alloy4fun_models/trainstlt/models/1/RDSoQyrdJMSQeLBZK.als open main pred idRDSoQyrdJMSQeLBZK_prop2 { eventually all s : Signal | s in Green } pred __repair { idRDSoQyrdJMSQeLBZK_prop2 } check __repair { idRDSoQyrdJMSQeLBZK_prop2 <=> prop2o }
book_code/OpAdd.asm
lauras5/cs270_comporg
0
24887
<gh_stars>0 ; ; Routine to pop the top two elements from the stack, ; add them, and push the sum onto the stack. R6 is ; the stack pointer. ; - integers in the range - 999 to +999 ; OpAdd JSR POP ; Get first source operand ADD R5,R5,#0 ; test if pop was successful BRp Exit ; branch if not successful ADD R1,R0,#0 ; Make room for second operand JSR POP ; get second source operand ADD R5,R5,#0 ; check if pop was successful BRp Restore1 ; if not successful, put back first ADD R0,R0,R1 ; ADD JSR RangeCheck ; check result size BRp Restore2 ; out of range resore both JSR PUSH ; push sum on stack RET Restore2 ADD R6,R6,#-1 ; decrement stack pointer Restore1 ADD R6,R6,#-1 ; decrement stack pointer Exit RET
tests/maps-test_data-tests.adb
thindil/steamsky
80
21621
<filename>tests/maps-test_data-tests.adb -- This package has been generated automatically by GNATtest. -- You are allowed to add your code to the bodies of test routines. -- Such changes will be kept during further regeneration of this file. -- All code placed outside of test routine bodies will be lost. The -- code intended to set up and tear down the test environment should be -- placed into Maps.Test_Data. with AUnit.Assertions; use AUnit.Assertions; with System.Assertions; -- begin read only -- id:2.2/00/ -- -- This section can be used to add with clauses if necessary. -- -- end read only with Ships; use Ships; -- begin read only -- end read only package body Maps.Test_Data.Tests is -- begin read only -- id:2.2/01/ -- -- This section can be used to add global variables and other elements. -- -- end read only -- begin read only -- end read only -- begin read only function Wrap_Test_CountDistance_ecd188_2a2146 (DestinationX: Map_X_Range; DestinationY: Map_Y_Range) return Natural is begin declare Test_CountDistance_ecd188_2a2146_Result: constant Natural := GNATtest_Generated.GNATtest_Standard.Maps.CountDistance (DestinationX, DestinationY); begin return Test_CountDistance_ecd188_2a2146_Result; end; end Wrap_Test_CountDistance_ecd188_2a2146; -- end read only -- begin read only procedure Test_CountDistance_test_countdistance(Gnattest_T: in out Test); procedure Test_CountDistance_ecd188_2a2146(Gnattest_T: in out Test) renames Test_CountDistance_test_countdistance; -- id:2.2/ecd188bba777e9d6/CountDistance/1/0/test_countdistance/ procedure Test_CountDistance_test_countdistance(Gnattest_T: in out Test) is function CountDistance (DestinationX: Map_X_Range; DestinationY: Map_Y_Range) return Natural renames Wrap_Test_CountDistance_ecd188_2a2146; -- end read only pragma Unreferenced(Gnattest_T); X: Positive := Player_Ship.Sky_X + 1; Y: Positive := Player_Ship.Sky_Y + 1; begin if X > Map_X_Range'Last then X := Player_Ship.Sky_X - 1; end if; if Y > Map_Y_Range'Last then Y := Player_Ship.Sky_Y - 1; end if; Assert (CountDistance(X, Y) = 1, "Failed to count distance between two points on map."); -- begin read only end Test_CountDistance_test_countdistance; -- end read only -- begin read only procedure Wrap_Test_NormalizeCoord_6338a5_1a8ae8 (Coord: in out Integer; IsXAxis: Boolean := True) is begin begin pragma Assert(True); null; exception when System.Assertions.Assert_Failure => AUnit.Assertions.Assert (False, "req_sloc(maps.ads:0):Test_NormalizeCoord test requirement violated"); end; GNATtest_Generated.GNATtest_Standard.Maps.NormalizeCoord(Coord, IsXAxis); begin pragma Assert ((if IsXAxis then Coord in Map_X_Range'Range else Coord in Map_Y_Range)); null; exception when System.Assertions.Assert_Failure => AUnit.Assertions.Assert (False, "ens_sloc(maps.ads:0:):Test_NormalizeCoord test commitment violated"); end; end Wrap_Test_NormalizeCoord_6338a5_1a8ae8; -- end read only -- begin read only procedure Test_NormalizeCoord_test_normalizecoord(Gnattest_T: in out Test); procedure Test_NormalizeCoord_6338a5_1a8ae8(Gnattest_T: in out Test) renames Test_NormalizeCoord_test_normalizecoord; -- id:2.2/6338a59b69707203/NormalizeCoord/1/0/test_normalizecoord/ procedure Test_NormalizeCoord_test_normalizecoord (Gnattest_T: in out Test) is procedure NormalizeCoord (Coord: in out Integer; IsXAxis: Boolean := True) renames Wrap_Test_NormalizeCoord_6338a5_1a8ae8; -- end read only pragma Unreferenced(Gnattest_T); Coord: Integer := 0; begin NormalizeCoord(Coord); Assert(Coord = 1, "Failed to normalize map coordinate."); NormalizeCoord(Coord); Assert(Coord = 1, "Failed to not normalize map coordinate."); -- begin read only end Test_NormalizeCoord_test_normalizecoord; -- end read only -- begin read only -- id:2.2/02/ -- -- This section can be used to add elaboration code for the global state. -- begin -- end read only null; -- begin read only -- end read only end Maps.Test_Data.Tests;
data/maps/headers/SafariZoneEast.asm
opiter09/ASM-Machina
1
21660
<filename>data/maps/headers/SafariZoneEast.asm map_header SafariZoneEast, SAFARI_ZONE_EAST, FOREST, 0 end_map_header
programs/oeis/213/A213642.asm
neoneye/loda
22
169462
; A213642: Primes with subscript that equals odd part of n. ; 2,2,5,2,11,5,17,2,23,11,31,5,41,17,47,2,59,23,67,11,73,31,83,5,97,41,103,17,109,47,127,2,137,59,149,23,157,67,167,11,179,73,191,31,197,83,211,5,227,97,233,41,241,103,257,17,269,109,277,47,283,127 lpb $0 mul $0,2 sub $0,2 dif $0,4 lpe seq $0,6005 ; The odd prime numbers together with 1. max $0,2
gfx/tilesets/traditional_house_palette_map.asm
AtmaBuster/pokeplat-gen2
6
99314
tilepal 0, GRAY, BROWN, WATER, WATER, RED, GRAY, GRAY, GRAY tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN tilepal 0, BROWN, BROWN, WATER, WATER, RED, BROWN, GRAY, GRAY tilepal 0, BROWN, BROWN, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN tilepal 0, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, GRAY tilepal 0, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN tilepal 0, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, RED, GRAY tilepal 0, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN tilepal 0, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN, GREEN, BROWN tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, WATER, WATER tilepal 0, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN, GREEN, BROWN tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, WATER, BROWN rept 32 db $ff endr tilepal 1, GRAY, BROWN, WATER, WATER, RED, GRAY, GRAY, GRAY tilepal 1, BROWN, BROWN, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN tilepal 1, BROWN, BROWN, WATER, WATER, RED, BROWN, GRAY, GRAY tilepal 1, BROWN, BROWN, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN tilepal 1, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, GRAY tilepal 1, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN tilepal 1, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, RED, GRAY tilepal 1, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN tilepal 1, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN, GREEN, BROWN tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, WATER, WATER tilepal 1, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN, GREEN, BROWN tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, WATER, BROWN
assembler/tests/t_78k2/t_78k2.asm
paulscottrobson/RCA-Cosmac-VIP-III
0
164516
<filename>assembler/tests/t_78k2/t_78k2.asm cpu 78214 saddr equ 0fe34h saddr2 equ saddr+2 sfr equ 0ff34h b_saddr bit saddr.2 b_sfr bit sfr.3 b_a bit a.4 b_x bit x.5 b_psw bit psw.6 nop di ei brk ret reti retb mov a,#12h mov saddr,#12h mov sfr,#12h mov a,l mov b,c mov d,e mov h,l mov a,a mov a,x mov a,b mov a,c mov a,d mov a,e mov a,h mov a,l mov a,saddr mov saddr,a mov a,sfr mov sfr,a mov saddr2,saddr mov a,[de] mov a,[hl] mov a,[de+] mov a,[de-] mov a,[hl+] mov a,[hl-] mov a,[de+2] mov a,[sp+5] mov a,[hl+7] mov a,17[de] mov a,1234h[a] mov a,10000[hl] mov a,1[b] mov a,&[de] mov a,&[hl] mov a,&[de+] mov a,&[de-] mov a,&[hl+] mov a,&[hl-] mov a,&[de+2] mov a,&[sp+5] mov a,&[hl+7] mov a,&17[de] mov a,&1234h[a] mov a,&10000[hl] mov a,&1[b] mov [de],a mov [hl],a mov [de+],a mov [de-],a mov [hl+],a mov [hl-],a mov [de+2],a mov [sp+5],a mov [hl+7],a mov 17[de],a mov 1234h[a],a mov 10000[hl],a mov 1[b],a mov &[de],a mov &[hl],a mov &[de+],a mov &[de-],a mov &[hl+],a mov &[hl-],a mov &[de+2],a mov &[sp+5],a mov &[hl+7],a mov &17[de],a mov &1234h[a],a mov &10000[hl],a mov &1[b],a mov a,1234h mov a,!saddr mov a,&1234h mov a,&!saddr mov 1234h,a mov !saddr,a mov &1234h,a mov &!saddr,a mov psw,#12h mov psw,a mov a,psw ; xch a,a xch a,x xch a,b xch a,c xch a,d xch a,e xch a,h xch a,l xch d,e xch a,saddr xch saddr,a xch a,sfr xch sfr,a xch saddr,saddr2 xch a,[de] xch [de],a xch a,[hl] xch [hl],a xch a,[de+] xch [de+],a xch a,[de-] xch [de-],a xch a,[hl+] xch [hl+],a xch a,[hl-] xch [hl-],a xch a,[de+2] xch [de+2],a xch a,[sp+5] xch [sp+5],a xch a,[hl+7] xch [hl+7],a xch a,17[de] xch 17[de],a xch a,1234h[a] xch 1234h[a],a xch a,10000[hl] xch 10000[hl],a xch a,1[b] xch 1[b],a xch a,&[de] xch &[de],a xch a,&[hl] xch &[hl],a xch a,&[de+] xch &[de+],a xch a,&[de-] xch &[de-],a xch a,&[hl+] xch &[hl+],a xch a,&[hl-] xch &[hl-],a xch a,&[de+2] xch &[de+2],a xch a,&[sp+5] xch &[sp+5],a xch a,&[hl+7] xch &[hl+7],a xch a,&17[de] xch &17[de],a xch a,&1234h[a] xch &1234h[a],a xch a,&10000[hl] xch &10000[hl],a xch a,&1[b] xch &1[b],a ; movw ax,#1234h movw bc,#1234h movw de,#1234h movw hl,#1234h movw saddr,#1234h movw sfr,#1234h irp reg1,ax,bc,de,hl irp reg2,ax,bc,de,hl movw reg1,reg2 endm endm movw ax,saddr movw saddr,ax movw ax,sfr movw sfr,ax movw ax,[de] movw ax,[hl] movw [de],ax movw [hl],ax movw ax,&[de] movw ax,&[hl] movw &[de],ax movw &[hl],ax ; irp op,add,addc,sub,subc,and,or,xor,cmp op a,#'a' op saddr,#'0' op sfr,#0aah irp reg1,x,a,c,b,e,d,l,h irp reg2,x,a,c,b,e,d,l,h op reg1,reg2 endm endm op a,saddr op a,sfr op saddr,saddr2 op a,[de] op a,[hl] op a,[de+] op a,[de-] op a,[hl+] op a,[hl-] op a,[de+2] op a,[sp+5] op a,[hl+7] op a,1234h[a] op a,10000[hl] op a,1[b] op a,&[de] op a,&[hl] op a,&[de+] op a,&[de-] op a,&[hl+] op a,&[hl-] op a,&[de+2] op a,&[sp+5] op a,&[hl+7] op a,&17[de] op a,&1234h[a] op a,&10000[hl] op a,&1[b] endm irp op,addw,subw,cmpw op ax,#1234h irp reg,ax,bc,de,hl op ax,reg endm op ax,saddr op ax,sfr endm irp reg,x,a,c,b,e,d,l,h mulu reg divuw reg endm irp reg,x,a,c,b,e,d,l,h,saddr inc reg dec reg endm irp reg,ax,bc,de,hl incw reg decw reg endm __cnt set 0 irp reg,x,a,c,b,e,d,l,h irp op,ror,rol,rorc,rolc,shr,shl op reg,__cnt endm __cnt set __cnt+1 endm __cnt set 0 irp reg,ax,bc,de,hl irp op,shrw,shlw op reg,__cnt endm __cnt set __cnt+1 endm irp op,ror4,rol4 irp reg,de,hl op [reg] op &[reg] endm endm adjba adjbs mov1 cy,saddr.2 mov1 cy,b_saddr mov1 cy,sfr.3 mov1 cy,b_sfr mov1 cy,a.4 mov1 cy,b_a mov1 cy,x.5 mov1 cy,b_x mov1 cy,psw.6 mov1 cy,b_psw mov1 saddr.2,cy mov1 b_saddr,cy mov1 sfr.3,cy mov1 b_sfr,cy mov1 a.4,cy mov1 b_a,cy mov1 x.5,cy mov1 b_x,cy mov1 psw.6,cy mov1 b_psw,cy and1 cy,saddr.2 and1 cy,/saddr.2 and1 cy,b_saddr and1 cy,/b_saddr and1 cy,sfr.3 and1 cy,/sfr.3 and1 cy,b_sfr and1 cy,/b_sfr and1 cy,a.4 and1 cy,/a.4 and1 cy,b_a and1 cy,/b_a and1 cy,x.5 and1 cy,/x.5 and1 cy,b_x and1 cy,/b_x and1 cy,psw.6 and1 cy,/psw.6 and1 cy,b_psw and1 cy,/b_psw or1 cy,saddr.2 or1 cy,/saddr.2 or1 cy,b_saddr or1 cy,/b_saddr or1 cy,sfr.3 or1 cy,/sfr.3 or1 cy,b_sfr or1 cy,/b_sfr or1 cy,a.4 or1 cy,/a.4 or1 cy,b_a or1 cy,/b_a or1 cy,x.5 or1 cy,/x.5 or1 cy,b_x or1 cy,/b_x or1 cy,psw.6 or1 cy,/psw.6 or1 cy,b_psw or1 cy,/b_psw xor1 cy,saddr.2 xor1 cy,b_saddr xor1 cy,sfr.3 xor1 cy,b_sfr xor1 cy,a.4 xor1 cy,b_a xor1 cy,x.5 xor1 cy,b_x xor1 cy,psw.6 xor1 cy,b_psw irp op,set1,clr1,not1 op saddr.2 op b_saddr op sfr.3 op b_sfr op a.4 op b_a op x.5 op b_x op psw.6 op b_psw op cy endm irp op,bt,bf,btclr op saddr.2,$pc op b_saddr,$pc op sfr.3,$pc op b_sfr,$pc op a.4,$pc op b_a,$pc op x.5,$pc op b_x,$pc op psw.6,$pc op b_psw,$pc endm call 1234h call !1234h irp reg,ax,bc,de,hl call reg endm callf 800h callf !0abch callt [40h] callt [60h] callt [7eh] ;----- irp op,push,pop irp reg,ax,bc,de,hl op reg endm op psw op sfr endm movw sp,#1234h movw sp,ax movw ax,sp incw sp decw sp br 1234h br !1234h irp reg,ax,bc,de,hl br reg endm br pc br $pc irp op,bc,bl,bnc,bnl,bz,be,bnz,bne op pc op $pc endm ;----- dbnz b,pc dbnz c,pc dbnz saddr,pc mov stbc,#55h sel rb2 sel rb1 ;----- r8 equ 0fe30h rp4 equ 0fe32h mov a,r0 mov a,r8 movw ax,rp2 movw ax,rp4
libsrc/cpm/a_driveb.asm
RC2014Z80/z88dk
8
179836
; ; Small C+ Runtime Library ; ; CP/M functions ; ; CPM Plus "userf" custom Amstrad calls, for Amstrad CPC & PCW and ZX Spectrum +3 ; ; ; $Id: a_driveb.asm,v 1.2 2017-01-02 20:06:48 aralbrec Exp $ ; SECTION code_clib PUBLIC a_driveb PUBLIC _a_driveb EXTERN subuserf INCLUDE "amstrad_userf.def" a_driveb: _a_driveb: call subuserf defw CD_INFO ld l,a ld h,0 ret
test/Issue69.agda
dxts/agda2hs
55
11552
open import Haskell.Prelude mutual data Map (k : Set) (a : Set) : Set where Bin : (sz : Nat) → (kx : k) → (x : a) → (l : Map k a) → (r : Map k a) → {{szVal : sz ≡ (size l) + (size r) + 1}} → Map k a Tip : Map k a {-# COMPILE AGDA2HS Map #-} size : {k a : Set} → Map k a → Nat size Tip = 0 size (Bin sz _ _ _ _) = sz {-# COMPILE AGDA2HS size #-}
airbag.als
ObradovicNikola/formal_specification_airbag
0
1716
open util/ordering[Time] as T sig Time {} sig Speed { value: Int } fact speed_val { all s: Speed | s.value >= 0 } -- ziroskop, sa vrednosti koju izmeri (promena gravitacione sile) sig Gyroscope { g_meter: Int } -- ogranicenje vrednosti za g_meter fact gyro_val { all g: Gyroscope | g.g_meter >= 0 and g.g_meter <= 30 } -- TODO: definisati kocnicu i ogranicenje da uvek vazi da jacina pritiska mora da bude izmedju 0 i 1 -- (odnosno, predstaviti kao 0 -100) -- nakon toga, dodati kocnicu na sva mesta gde je potrebno sig Break { value: Int } fact break_val{ all b:Break | b.value >= 0 and b.value <= 100 } abstract sig Sensor { } sig ImpactSensor, SideSensor, SeatWeightSensor, SeatbeltSensor extends Sensor {} abstract sig Switch { on: set Time } abstract sig AirbagPosition {} sig Normal, Knee extends AirbagPosition {} sig AirbagSwitch extends Switch {} sig ACUSensors { speed: Speed one -> Time, break: Break one -> Time, gyro: Gyroscope one -> Time, frontal: ImpactSensor one -> Time, side: SideSensor one -> Time } some sig Airbag { on: set Time, activated: set Time, seatbelt: SeatbeltSensor one -> Time, weight: SeatWeightSensor one -> Time, switch: AirbagSwitch one -> Time, sensors: ACUSensors one -> Time, position: AirbagPosition } -- samo "ukljucivanje" u smislu da je airbag u stanju pripravnosti -- aktivacija se naknadno može desiti jedino ukoliko je airbag "ukljucen" pred turn_on [a: Airbag, t, t': Time ] { -- precondition: airbag is off !is_on[a, t] -- postcondition: airbag is on is_on[a, t'] } -- TODO: iskljucivanje -- dodati ga i kasnije gde je potrebno pred turn_off[a: Airbag, t, t':Time] { -- precondition: airbag is on is_on[a,t] -- postcondition: airbag is off !is_on[a,t'] } -- aktivacija jednog airbag-a pred activate[a: Airbag, t, t': Time] { -- preconditions is_on[a, t] are_conditions_ok[a, t] !is_activated[a, t] -- postcondition is_activated[a, t'] -- frame condition activated_changes[Airbag - a, t, t'] } pred still_impact [a: Airbag, t, t': Time] { -- precondition (let s = a.sensors.t | let speed = s.speed.t | speed.value < 3) and (let s = a.sensors.t | some s.frontal :> t or some s.side :> t) and (let s = a.sensors.t | let gyro = s.gyro.t | gyro.g_meter >= 2) -- postcondition activate[a, t, t'] } --DODATO: noga jako pritisnuta na kocnici u mirovanju -- moze se desiti ukoliko auto miruje pod nagibom, ili u nekom drugom slucaju pred still_impact_knee [a: Airbag, t, t': Time] { -- precondition (let s = a.sensors.t | let speed = s.speed.t | speed.value < 3) and (let s = a.sensors.t | some s.frontal :> t or some s.side :> t) and (let s = a.sensors.t | let gyro = s.gyro.t | gyro.g_meter >= 2) and (let s = a.sensors.t | let break = s.break.t | break.value < 70) -- postcondition activate[a, t, t'] } -- TODO: udarac u slucaju vece brzine pred speed_impact [a: Airbag, t, t': Time] { -- precondition -- a.position = Normal and (let s = a.sensors.t | let speed = s.speed.t | speed.value >= 3) and (let s = a.sensors.t | some s.frontal :> t or some s.side :> t) and (let s = a.sensors.t | let gyro = s.gyro.t | gyro.g_meter > 3) -- postcondition activate[a, t, t'] } -- TODO: ne zaboraviti i proveru da noga nije jako pritisnuta na kocnici pred speed_impact_knee [a: Airbag, t, t': Time] { -- precondition (let s = a.sensors.t | let speed = s.speed.t | speed.value >= 3) and (let s = a.sensors.t | some s.frontal :> t or some s.side :> t) and (let s = a.sensors.t | let gyro = s.gyro.t | gyro.g_meter > 3) and (let s = a.sensors.t | let break = s.break.t | break.value < 70) -- postcondition activate[a, t, t'] } pred is_on [a: Airbag, t: Time] { t in a.on and one a.switch :> t } pred is_activated[a: Airbag, t: Time] { t in a.activated } pred are_conditions_ok[a: Airbag, t:Time] { one a.switch :> t and one a.seatbelt :> t and one a.weight :> t } pred type_check[a: Airbag, t: Time] { (a.position = Normal) or (a.position = Knee and (let s = a.sensors.t | let break = s.break.t | break.value < 70)) } pred activated_changes[A: set Airbag, t,t': Time] { all a: A | -- TODO: ukljuciti uslove sa senzora tezine, o vezanom pojasu i korisnickom prekidacu t' in a.activated iff ((is_on[a, t]) and (are_conditions_ok[a, t]) and -- kada se airbagovi lancano pozivaju, svaki mora da proveri svoj tip za slucaj aktivacije type_check[a, t]) } -- TODO: predikat "transitions" // off, on, sudari pred transitions[t,t': Time] { some a: Airbag | turn_on[a, t, t'] or turn_off[a, t, t'] or (still_impact[a, t, t'] iff a.position = Normal) or (still_impact_knee[a, t, t'] iff a.position = Knee) or (speed_impact[a, t, t'] iff a.position = Normal) or (speed_impact_knee[a, t, t'] iff a.position = Knee) } -- airbag 1: normal one sig A1 extends Airbag {} one sig TNOR extends Normal {} one sig ABS1 extends AirbagSwitch {} one sig SWS1 extends SeatWeightSensor {} one sig SBS1 extends SeatbeltSensor {} -- TODO: dodati airbag za kolena i potrebne komponente -- airbag 2: knee one sig A2 extends Airbag {} one sig TKNEE extends Knee {} one sig ABS2 extends AirbagSwitch {} one sig SWS2 extends SeatWeightSensor {} one sig SBS2 extends SeatbeltSensor {} -- ACU one sig ACU1 extends ACUSensors{} one sig G1 extends Gyroscope {} one sig IS1 extends ImpactSensor {} one sig DS1 extends SideSensor {} one sig S1 extends Speed {} one sig B1 extends Break {} fact { G1.g_meter = 0 } pred init [t: Time] { -- TODO: dopuniti init podacima za airbag za kolena A1.position = TNOR A1.sensors.t = ACU1 A1.weight.t = SWS1 A1.seatbelt.t = SBS1 A1.switch.t = ABS1 -- airbag za kolena A2.position = TKNEE A2.sensors.t = ACU1 A2.weight.t = SWS2 A2.seatbelt.t = SBS2 A2.switch.t = ABS2 ACU1.speed.t = S1 ACU1.break.t = B1 ACU1.gyro.t = G1 ACU1.frontal.t = IS1 ACU1.side.t = DS1 // !is_on[A1, t] and !is_activated[A1, t] -- TODO: dopuniti uslovom da i za sve ostale airbag-ove u pocetku vazi da su iskljuceni // !is_on[A2, t] and !is_activated[A2, t] all a: Airbag | !is_on[a, t] and !is_activated[a, t] } pred safety_check { some Airbag init [T/first] some t: Time | safe [t] all t: Time - T/last | transitions [t, T/next[t]] } pred safe [t: Time] { ACU1.gyro.t != G1 } run safety_check for 4 but 8 Int, 1 Break, 1 Speed, 1 ACUSensors, 2 Airbag //run safety_check for 4 but 8 Int, 1 Break //run safety_check for 4 but 8 Int, 1 ACUSensors
tools-src/gnu/gcc/gcc/ada/sem_elim.adb
enfoTek/tomato.linksys.e2000.nvram-mod
80
6373
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S E M _ E L I M -- -- -- -- B o d y -- -- -- -- $Revision$ -- -- -- Copyright (C) 1997-2001 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. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Atree; use Atree; with Einfo; use Einfo; with Errout; use Errout; with Namet; use Namet; with Nlists; use Nlists; with Sinfo; use Sinfo; with Snames; use Snames; with Stand; use Stand; with Stringt; use Stringt; with GNAT.HTable; use GNAT.HTable; package body Sem_Elim is No_Elimination : Boolean; -- Set True if no Eliminate pragmas active --------------------- -- Data Structures -- --------------------- -- A single pragma Eliminate is represented by the following record type Elim_Data; type Access_Elim_Data is access Elim_Data; type Names is array (Nat range <>) of Name_Id; -- Type used to represent set of names. Used for names in Unit_Name -- and also the set of names in Argument_Types. type Access_Names is access Names; type Elim_Data is record Unit_Name : Access_Names; -- Unit name, broken down into a set of names (e.g. A.B.C is -- represented as Name_Id values for A, B, C in sequence). Entity_Name : Name_Id; -- Entity name if Entity parameter if present. If no Entity parameter -- was supplied, then Entity_Node is set to Empty, and the Entity_Name -- field contains the last identifier name in the Unit_Name. Entity_Scope : Access_Names; -- Static scope of the entity within the compilation unit represented by -- Unit_Name. Entity_Node : Node_Id; -- Save node of entity argument, for posting error messages. Set -- to Empty if there is no entity argument. Parameter_Types : Access_Names; -- Set to set of names given for parameter types. If no parameter -- types argument is present, this argument is set to null. Result_Type : Name_Id; -- Result type name if Result_Types parameter present, No_Name if not Hash_Link : Access_Elim_Data; -- Link for hash table use Homonym : Access_Elim_Data; -- Pointer to next entry with same key end record; ---------------- -- Hash_Table -- ---------------- -- Setup hash table using the Entity_Name field as the hash key subtype Element is Elim_Data; subtype Elmt_Ptr is Access_Elim_Data; subtype Key is Name_Id; type Header_Num is range 0 .. 1023; Null_Ptr : constant Elmt_Ptr := null; ---------------------- -- Hash_Subprograms -- ---------------------- package Hash_Subprograms is function Equal (F1, F2 : Key) return Boolean; pragma Inline (Equal); function Get_Key (E : Elmt_Ptr) return Key; pragma Inline (Get_Key); function Hash (F : Key) return Header_Num; pragma Inline (Hash); function Next (E : Elmt_Ptr) return Elmt_Ptr; pragma Inline (Next); procedure Set_Next (E : Elmt_Ptr; Next : Elmt_Ptr); pragma Inline (Set_Next); end Hash_Subprograms; package body Hash_Subprograms is ----------- -- Equal -- ----------- function Equal (F1, F2 : Key) return Boolean is begin return F1 = F2; end Equal; ------------- -- Get_Key -- ------------- function Get_Key (E : Elmt_Ptr) return Key is begin return E.Entity_Name; end Get_Key; ---------- -- Hash -- ---------- function Hash (F : Key) return Header_Num is begin return Header_Num (Int (F) mod 1024); end Hash; ---------- -- Next -- ---------- function Next (E : Elmt_Ptr) return Elmt_Ptr is begin return E.Hash_Link; end Next; -------------- -- Set_Next -- -------------- procedure Set_Next (E : Elmt_Ptr; Next : Elmt_Ptr) is begin E.Hash_Link := Next; end Set_Next; end Hash_Subprograms; package Elim_Hash_Table is new Static_HTable ( Header_Num => Header_Num, Element => Element, Elmt_Ptr => Elmt_Ptr, Null_Ptr => Null_Ptr, Set_Next => Hash_Subprograms.Set_Next, Next => Hash_Subprograms.Next, Key => Key, Get_Key => Hash_Subprograms.Get_Key, Hash => Hash_Subprograms.Hash, Equal => Hash_Subprograms.Equal); ---------------------- -- Check_Eliminated -- ---------------------- procedure Check_Eliminated (E : Entity_Id) is Elmt : Access_Elim_Data; Scop : Entity_Id; Form : Entity_Id; begin if No_Elimination then return; -- Elimination of objects and types is not implemented yet. elsif Ekind (E) not in Subprogram_Kind then return; end if; Elmt := Elim_Hash_Table.Get (Chars (E)); -- Loop through homonyms for this key while Elmt /= null loop -- First we check that the name of the entity matches if Elmt.Entity_Name /= Chars (E) then goto Continue; end if; -- Then we need to see if the static scope matches within the -- compilation unit. Scop := Scope (E); if Elmt.Entity_Scope /= null then for J in reverse Elmt.Entity_Scope'Range loop if Elmt.Entity_Scope (J) /= Chars (Scop) then goto Continue; end if; Scop := Scope (Scop); if not Is_Compilation_Unit (Scop) and then J = 1 then goto Continue; end if; end loop; end if; -- Now see if compilation unit matches for J in reverse Elmt.Unit_Name'Range loop if Elmt.Unit_Name (J) /= Chars (Scop) then goto Continue; end if; Scop := Scope (Scop); if Scop /= Standard_Standard and then J = 1 then goto Continue; end if; end loop; if Scop /= Standard_Standard then goto Continue; end if; -- Check for case of given entity is a library level subprogram -- and we have the single parameter Eliminate case, a match! if Is_Compilation_Unit (E) and then Is_Subprogram (E) and then No (Elmt.Entity_Node) then Set_Is_Eliminated (E); return; -- Check for case of type or object with two parameter case elsif (Is_Type (E) or else Is_Object (E)) and then Elmt.Result_Type = No_Name and then Elmt.Parameter_Types = null then Set_Is_Eliminated (E); return; -- Check for case of subprogram elsif Ekind (E) = E_Function or else Ekind (E) = E_Procedure then -- Two parameter case always matches if Elmt.Result_Type = No_Name and then Elmt.Parameter_Types = null then Set_Is_Eliminated (E); return; -- Here we have a profile, so see if it matches else if Ekind (E) = E_Function then if Chars (Etype (E)) /= Elmt.Result_Type then goto Continue; end if; end if; Form := First_Formal (E); if No (Form) and then Elmt.Parameter_Types = null then Set_Is_Eliminated (E); return; elsif Elmt.Parameter_Types = null then goto Continue; else for J in Elmt.Parameter_Types'Range loop if No (Form) or else Chars (Etype (Form)) /= Elmt.Parameter_Types (J) then goto Continue; else Next_Formal (Form); end if; end loop; if Present (Form) then goto Continue; else Set_Is_Eliminated (E); return; end if; end if; end if; end if; <<Continue>> Elmt := Elmt.Homonym; end loop; return; end Check_Eliminated; ---------------- -- Initialize -- ---------------- procedure Initialize is begin Elim_Hash_Table.Reset; No_Elimination := True; end Initialize; ------------------------------ -- Process_Eliminate_Pragma -- ------------------------------ procedure Process_Eliminate_Pragma (Arg_Unit_Name : Node_Id; Arg_Entity : Node_Id; Arg_Parameter_Types : Node_Id; Arg_Result_Type : Node_Id) is Argx_Unit_Name : Node_Id; Argx_Entity : Node_Id; Argx_Parameter_Types : Node_Id; Argx_Result_Type : Node_Id; Data : constant Access_Elim_Data := new Elim_Data; -- Build result data here Elmt : Access_Elim_Data; Num_Names : Nat := 0; -- Number of names in unit name Lit : Node_Id; function OK_Selected_Component (N : Node_Id) return Boolean; -- Test if N is a selected component with all identifiers, or a -- selected component whose selector is an operator symbol. As a -- side effect if result is True, sets Num_Names to the number -- of names present (identifiers and operator if any). --------------------------- -- OK_Selected_Component -- --------------------------- function OK_Selected_Component (N : Node_Id) return Boolean is begin if Nkind (N) = N_Identifier or else Nkind (N) = N_Operator_Symbol then Num_Names := Num_Names + 1; return True; elsif Nkind (N) = N_Selected_Component then return OK_Selected_Component (Prefix (N)) and then OK_Selected_Component (Selector_Name (N)); else return False; end if; end OK_Selected_Component; -- Start of processing for Process_Eliminate_Pragma begin Error_Msg_Name_1 := Name_Eliminate; -- Process Unit_Name argument Argx_Unit_Name := Expression (Arg_Unit_Name); if Nkind (Argx_Unit_Name) = N_Identifier then Data.Unit_Name := new Names'(1 => Chars (Argx_Unit_Name)); Num_Names := 1; elsif OK_Selected_Component (Argx_Unit_Name) then Data.Unit_Name := new Names (1 .. Num_Names); for J in reverse 2 .. Num_Names loop Data.Unit_Name (J) := Chars (Selector_Name (Argx_Unit_Name)); Argx_Unit_Name := Prefix (Argx_Unit_Name); end loop; Data.Unit_Name (1) := Chars (Argx_Unit_Name); else Error_Msg_N ("wrong form for Unit_Name parameter of pragma%", Argx_Unit_Name); return; end if; -- Process Entity argument if Present (Arg_Entity) then Argx_Entity := Expression (Arg_Entity); Num_Names := 0; if Nkind (Argx_Entity) = N_Identifier or else Nkind (Argx_Entity) = N_Operator_Symbol then Data.Entity_Name := Chars (Argx_Entity); Data.Entity_Node := Argx_Entity; Data.Entity_Scope := null; elsif OK_Selected_Component (Argx_Entity) then Data.Entity_Scope := new Names (1 .. Num_Names - 1); Data.Entity_Name := Chars (Selector_Name (Argx_Entity)); Data.Entity_Node := Argx_Entity; Argx_Entity := Prefix (Argx_Entity); for J in reverse 2 .. Num_Names - 1 loop Data.Entity_Scope (J) := Chars (Selector_Name (Argx_Entity)); Argx_Entity := Prefix (Argx_Entity); end loop; Data.Entity_Scope (1) := Chars (Argx_Entity); elsif Nkind (Argx_Entity) = N_String_Literal then String_To_Name_Buffer (Strval (Argx_Entity)); Data.Entity_Name := Name_Find; Data.Entity_Node := Argx_Entity; else Error_Msg_N ("wrong form for Entity_Argument parameter of pragma%", Argx_Unit_Name); return; end if; else Data.Entity_Node := Empty; Data.Entity_Name := Data.Unit_Name (Num_Names); end if; -- Process Parameter_Types argument if Present (Arg_Parameter_Types) then Argx_Parameter_Types := Expression (Arg_Parameter_Types); -- Case of one name, which looks like a parenthesized literal -- rather than an aggregate. if Nkind (Argx_Parameter_Types) = N_String_Literal and then Paren_Count (Argx_Parameter_Types) = 1 then String_To_Name_Buffer (Strval (Argx_Parameter_Types)); Data.Parameter_Types := new Names'(1 => Name_Find); -- Otherwise must be an aggregate elsif Nkind (Argx_Parameter_Types) /= N_Aggregate or else Present (Component_Associations (Argx_Parameter_Types)) or else No (Expressions (Argx_Parameter_Types)) then Error_Msg_N ("Parameter_Types for pragma% must be list of string literals", Argx_Parameter_Types); return; -- Here for aggregate case else Data.Parameter_Types := new Names (1 .. List_Length (Expressions (Argx_Parameter_Types))); Lit := First (Expressions (Argx_Parameter_Types)); for J in Data.Parameter_Types'Range loop if Nkind (Lit) /= N_String_Literal then Error_Msg_N ("parameter types for pragma% must be string literals", Lit); return; end if; String_To_Name_Buffer (Strval (Lit)); Data.Parameter_Types (J) := Name_Find; Next (Lit); end loop; end if; end if; -- Process Result_Types argument if Present (Arg_Result_Type) then Argx_Result_Type := Expression (Arg_Result_Type); if Nkind (Argx_Result_Type) /= N_String_Literal then Error_Msg_N ("Result_Type argument for pragma% must be string literal", Argx_Result_Type); return; end if; String_To_Name_Buffer (Strval (Argx_Result_Type)); Data.Result_Type := Name_Find; else Data.Result_Type := No_Name; end if; -- Now link this new entry into the hash table Elmt := Elim_Hash_Table.Get (Hash_Subprograms.Get_Key (Data)); -- If we already have an entry with this same key, then link -- it into the chain of entries for this key. if Elmt /= null then Data.Homonym := Elmt.Homonym; Elmt.Homonym := Data; -- Otherwise create a new entry else Elim_Hash_Table.Set (Data); end if; No_Elimination := False; end Process_Eliminate_Pragma; end Sem_Elim;
lib/asm/log.asm
zhouyan/MCKL
12
2568
<gh_stars>10-100 ;;============================================================================ ;; MCKL/lib/asm/log.asm ;;---------------------------------------------------------------------------- ;; MCKL: Monte Carlo Kernel Library ;;---------------------------------------------------------------------------- ;; Copyright (c) 2013-2018, <NAME> ;; 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. ;; ;; 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. ;;============================================================================ %include "/math.asm" global mckl_vd_log global mckl_vd_log2 global mckl_vd_log10 global mckl_vd_log1p default rel ; register used as constants: ymm6, ymm8-10, ymm12 ; register used as variables: ymm1-5, ymm7, ymm11, ymm13-15 %macro log1pf_constants 0 vmovapd ymm6, [rel sqrt2by2] vmovapd ymm8, [rel one] vmovapd ymm9, [rel two] %endmacro ; log(1 + f) * (f + 2) / f - 2 = c15 * x^14 + ... + c5 * x^4 + c3 * x^2 %macro log1pf 3 ; implicity input ymm1, output ymm15 vcmpltpd ymm11, ymm0, %1 vcmpgtpd ymm15, ymm0, %2 vxorpd ymm13, ymm13, ymm13 ; k = 0 %if %3 == 0 vaddpd ymm1, ymm0, ymm8 ; b = a + 1 vmovapd ymm14, ymm0 ; f = a; %elif %3 == 1 vmovapd ymm1, ymm0 ; b = a vsubpd ymm14, ymm0, ymm8 ; f = a - 1; %else %error %endif vorpd ymm11, ymm11, ymm15 vtestpd ymm11, ymm11 jz %%skip ; k = exponent(b) vpsrlq ymm2, ymm1, 52 vorpd ymm2, ymm2, [emask0] vsubpd ymm3, ymm2, [emask1] ; exponent(b) ; fraction(b) / 2 vandpd ymm1, ymm1, [fmask0] vorpd ymm4, ymm1, [fmask1] ; fraction(b) / 2 ; fraction(b) > sqrt(2) vcmpgtpd ymm1, ymm4, ymm6 vandpd ymm5, ymm1, ymm8 vandnpd ymm7, ymm1, ymm4 vaddpd ymm3, ymm3, ymm5 vaddpd ymm4, ymm4, ymm7 ; f = fraction(b) - 1 vsubpd ymm4, ymm4, ymm8 ; skip reduction if ymm0 in range vblendvpd ymm13, ymm13, ymm3, ymm11 vblendvpd ymm14, ymm14, ymm4, ymm11 %%skip: ; x = f / (f + 2) vaddpd ymm1, ymm14, ymm9 vdivpd ymm1, ymm14, ymm1 vmovapd ymm15, [c15] vmovapd ymm11, [c11] vmovapd ymm7, [c7] vmulpd ymm2, ymm1, ymm1 ; x^2 vmulpd ymm3, ymm2, [c3] ; u3 = c3 * x^2 vmulpd ymm4, ymm2, ymm2 ; x^4 vfmadd213pd ymm15, ymm2, [c13] ; u15 = c15 * x^2 + c13 vfmadd213pd ymm11, ymm2, [c9] ; u11 = c11 * x^2 + c9 vfmadd213pd ymm7, ymm2, [c5] ; u7 = c7 * x^2 + c5 vfmadd213pd ymm15, ymm4, ymm11 ; v15 = u15 * x^4 + u11 vfmadd213pd ymm7, ymm4, ymm3 ; v7 = u7 * x^4 + u3 vmulpd ymm4, ymm4, ymm4 vfmadd213pd ymm15, ymm4, ymm7 ; z15 = v15 * x^8 + v7 %endmacro %macro select 1 ; implicit input ymm0, ymm15, output ymm15 vcmpltpd ymm1, ymm0, [%{1}_min_a] ; a < min_a vcmpgtpd ymm2, ymm0, [%{1}_max_a] ; a > max_a vcmpltpd ymm3, ymm0, [%{1}_nan_a] ; a < nan_a vcmpneqpd ymm4, ymm0, ymm0 ; a != a vorpd ymm5, ymm1, ymm2 vorpd ymm5, ymm5, ymm3 vorpd ymm5, ymm5, ymm4 vtestpd ymm5, ymm5 jz %%skip vblendvpd ymm15, ymm15, [%{1}_min_y], ymm1 ; min_y vblendvpd ymm15, ymm15, [%{1}_max_y], ymm2 ; max_y vblendvpd ymm15, ymm15, [%{1}_nan_y], ymm3 ; nan_y vblendvpd ymm15, ymm15, ymm0, ymm4 ; a %%skip: %endmacro %macro log_constants 0 log1pf_constants vmovapd ymm10, [ln2] %endmacro %macro log 2 vmovupd ymm0, %2 log1pf ymm6, [sqrt2], 1 ; log(1 + f) = f - x * (f - R) ; log(a) = k * log(2) + log(1 + f) vsubpd ymm15, ymm14, ymm15 vfnmadd213pd ymm15, ymm1, ymm14 vfmadd231pd ymm15, ymm13, ymm10 select log vmovupd %1, ymm15 %endmacro %macro log2_constants 0 log1pf_constants vmovapd ymm10, [ln2inv] %endmacro %macro log2 2 vmovupd ymm0, %2 log1pf ymm6, [sqrt2], 1 ; log(1 + f) = f - x * (f - R) ; log2(a) = k + log(1 + f) / log(2) vsubpd ymm15, ymm14, ymm15 vfnmadd213pd ymm15, ymm1, ymm14 vfmadd213pd ymm15, ymm10, ymm13 select log2 vmovupd %1, ymm15 %endmacro %macro log10_constants 0 log1pf_constants vmovapd ymm10, [ln10_2] vmovapd ymm12, [ln10inv] %endmacro %macro log10 2 vmovupd ymm0, %2 log1pf ymm6, [sqrt2], 1 ; log(1 + f) = f - x * (f - R) ; log10(a) = k * log(10) / log(2) + log(1 + f) / log(10) vsubpd ymm15, ymm14, ymm15 vfnmadd213pd ymm15, ymm1, ymm14 vmulpd ymm13, ymm13, ymm10 vfmadd213pd ymm15, ymm12, ymm13 select log vmovupd %1, ymm15 %endmacro %macro log1p_constants 0 log1pf_constants vmovapd ymm10, [ln2] %endmacro %macro log1p 2 vmovupd ymm0, %2 log1pf [sqrt2m2], [sqrt2m1], 0 ; log(1 + f) = f - x * (f - R) ; log(1 + a) = k * log2 + log(1 + f) vsubpd ymm15, ymm14, ymm15 vfnmadd213pd ymm15, ymm1, ymm14 vfmadd231pd ymm15, ymm13, ymm10 select log1p vmovupd %1, ymm15 %endmacro section .rodata align 32 log_min_a: times 4 dq 0x0010000000000000 ; DBL_MIN log_max_a: times 4 dq 0x7FEFFFFFFFFFFFFF ; DBL_MAX log_nan_a: times 4 dq 0x0000000000000000 ; 0.0 log_min_y: times 4 dq 0xFFF0000000000000 ; -HUGE_VAL log_max_y: times 4 dq 0x7FF0000000000000 ; HUGE_VAL log_nan_y: times 4 dq 0x7FF8000000000000 ; NaN log2_min_a: times 4 dq 0x0010000000000000 ; DBL_MIN log2_max_a: times 4 dq 0x7FEFFFFFFFFFFFFF ; DBL_MAX log2_nan_a: times 4 dq 0x0000000000000000 ; 0.0 log2_min_y: times 4 dq 0xFFF0000000000000 ; -HUGE_VAL log2_max_y: times 4 dq 0x7FF0000000000000 ; HUGE_VAL log2_nan_y: times 4 dq 0x7FF8000000000000 ; NaN log10_min_a: times 4 dq 0x0010000000000000 ; DBL_MIN log10_max_a: times 4 dq 0x7FEFFFFFFFFFFFFF ; DBL_MAX log10_nan_a: times 4 dq 0x0000000000000000 ; 0.0 log10_min_y: times 4 dq 0xFFF0000000000000 ; -HUGE_VAL log10_max_y: times 4 dq 0x7FF0000000000000 ; HUGE_VAL log10_nan_y: times 4 dq 0x7FF8000000000000 ; NaN log1p_min_a: times 4 dq 0xBFEFFFFFFFFFFFFF ; nextafter(-1.0, 0.0) log1p_max_a: times 4 dq 0x7FEFFFFFFFFFFFFF ; DBL_MAX log1p_nan_a: times 4 dq 0xBFF0000000000000 ; -1.0 log1p_min_y: times 4 dq 0xFFF0000000000000 ; -HUGE_VAL log1p_max_y: times 4 dq 0x7FF0000000000000 ; HUGE_VAL log1p_nan_y: times 4 dq 0x7FF8000000000000 ; NaN c3: times 4 dq 0x3FE5555555555593 c5: times 4 dq 0x3FD999999997FA04 c7: times 4 dq 0x3FD2492494229359 c9: times 4 dq 0x3FCC71C51D8E78AF c11: times 4 dq 0x3FC7466496CB03DE c13: times 4 dq 0x3FC39A09D078C69F c15: times 4 dq 0x3FC2F112DF3E5244 emask0: times 4 dq 0x4330000000000000 ; 2^52 emask1: times 4 dq 0x43300000000003FF ; 2^52 + 1023 fmask0: times 4 dq 0x000FFFFFFFFFFFFF ; fraction mask fmask1: times 4 dq 0x3FE0000000000000 ; fraction(a) / 2 one: times 4 dq 0x3FF0000000000000 ; 1.0 two: times 4 dq 0x4000000000000000 ; 2.0 ln2: times 4 dq 0x3FE62E42FEFA39EF ; log(2.0l) ln2inv: times 4 dq 0x3FF71547652B82FE ; 1.0l / log(2.0l) ln10_2: times 4 dq 0x3FD34413509F79FF ; log10(2.0l) ln10inv: times 4 dq 0x3FDBCB7B1526E50E ; 1.0l / log(10.0l) sqrt2: times 4 dq 0x3FF6A09E667F3BCD ; sqrt(2.0l) sqrt2by2: times 4 dq 0x3FE6A09E667F3BCD ; sqrt(2.0l) / 2.0l sqrt2m1: times 4 dq 0x3FDA827999FCEF32 ; sqrt(2.0l) - 1.0l sqrt2m2: times 4 dq 0xBFD2BEC333018867 ; sqrt(2.0l) / 2.0l - 1.0l section .text mckl_vd_log: math_kernel_a1r1 8, log mckl_vd_log2: math_kernel_a1r1 8, log2 mckl_vd_log10: math_kernel_a1r1 8, log10 mckl_vd_log1p: math_kernel_a1r1 8, log1p ; vim:ft=nasm
software/test_jump.asm
Arkaeriit/asrm
1
95551
<reponame>Arkaeriit/asrm ; This small assembly program is made to ensure that the jump ; behavior is similar between the rtl core and the simulator. slp slp slp debug debug label start debug debug slp quit
lib/Explore/Explorable.agda
crypto-agda/explore
2
3628
<filename>lib/Explore/Explorable.agda {-# OPTIONS --without-K #-} -- Constructions on top of exploration functions open import Level.NP open import Type hiding (★) open import Type.Identities open import Function.NP open import Function.Extensionality open import Algebra.FunctionProperties.NP open import Data.Two.Base open import Data.Indexed open import Data.Nat.NP hiding (_⊔_) open import Data.Nat.Properties open import Data.Fin using (Fin) renaming (zero to fzero) open import Data.Maybe.NP open import Algebra open import Data.Product.NP renaming (map to ×-map) hiding (first) open import Data.Sum.NP renaming (map to ⊎-map) open import Data.Zero using (𝟘) open import Data.One using (𝟙) open import Data.Tree.Binary import Data.List as List open List using (List; _++_) open import Relation.Nullary.Decidable open import Relation.Nullary.NP open import Relation.Binary open import Relation.Binary.Sum using (_⊎-cong_) open import Relation.Binary.Product.Pointwise using (_×-cong_) import Function.Related as FR import Relation.Binary.PropositionalEquality.NP as ≡ open import HoTT open Equivalences open ≡ using (_≡_) open import Explore.Core open import Explore.Properties import Explore.Monad as EM module Explore.Explorable where module _ {m a} {A : ★ a} where open EM {a} m gfilter-explore : ∀ {B} → (A →? B) → Explore m A → Explore m B gfilter-explore f eᴬ = eᴬ >>= λ x → maybe (λ η → point-explore η) empty-explore (f x) filter-explore : (A → 𝟚) → Explore m A → Explore m A filter-explore p = gfilter-explore λ x → [0: nothing 1: just x ] (p x) -- monoidal exploration: explore A with a monoid M explore-monoid : ∀ {ℓ} → Explore m A → ExploreMon m ℓ A explore-monoid eᴬ M = eᴬ ε _·_ where open Mon M renaming (_∙_ to _·_) explore-endo : Explore m A → Explore m A explore-endo eᴬ ε op f = eᴬ id _∘′_ (op ∘ f) ε explore-endo-monoid : ∀ {ℓ} → Explore m A → ExploreMon m ℓ A explore-endo-monoid = explore-monoid ∘ explore-endo explore-backward : Explore m A → Explore m A explore-backward eᴬ ε _∙_ f = eᴬ ε (flip _∙_) f -- explore-backward ∘ explore-backward = id -- (m : a comm monoid) → explore-backward m = explore m private module FindForward {a} {A : ★ a} (explore : Explore a A) where find? : Find? A find? = explore nothing (M?._∣_ _) first : Maybe A first = find? just findKey : FindKey A findKey pred = find? (λ x → [0: nothing 1: just x ] (pred x)) module ExplorePlug {ℓ a} {A : ★ a} where record ExploreIndKit p (P : Explore ℓ A → ★ p) : ★ (a ⊔ ₛ ℓ ⊔ p) where constructor mk field Pε : P empty-explore P∙ : ∀ {e₀ e₁ : Explore ℓ A} → P e₀ → P e₁ → P (merge-explore e₀ e₁) Pf : ∀ x → P (point-explore x) _$kit_ : ∀ {p} {P : Explore ℓ A → ★ p} {e : Explore ℓ A} → ExploreInd p e → ExploreIndKit p P → P e _$kit_ {P = P} ind (mk Pε P∙ Pf) = ind P Pε P∙ Pf _,-kit_ : ∀ {p} {P : Explore ℓ A → ★ p}{Q : Explore ℓ A → ★ p} → ExploreIndKit p P → ExploreIndKit p Q → ExploreIndKit p (P ×° Q) Pk ,-kit Qk = mk (Pε Pk , Pε Qk) (λ x y → P∙ Pk (fst x) (fst y) , P∙ Qk (snd x) (snd y)) (λ x → Pf Pk x , Pf Qk x) where open ExploreIndKit ExploreInd-Extra : ∀ p → Explore ℓ A → ★ _ ExploreInd-Extra p exp = ∀ (Q : Explore ℓ A → ★ p) (Q-kit : ExploreIndKit p Q) (P : Explore ℓ A → ★ p) (Pε : P empty-explore) (P∙ : ∀ {e₀ e₁ : Explore ℓ A} → Q e₀ → Q e₁ → P e₀ → P e₁ → P (merge-explore e₀ e₁)) (Pf : ∀ x → P (point-explore x)) → P exp to-extra : ∀ {p} {e : Explore ℓ A} → ExploreInd p e → ExploreInd-Extra p e to-extra e-ind Q Q-kit P Pε P∙ Pf = snd (e-ind (Q ×° P) (Qε , Pε) (λ { (a , b) (c , d) → Q∙ a c , P∙ a c b d }) (λ x → Qf x , Pf x)) where open ExploreIndKit Q-kit renaming (Pε to Qε; P∙ to Q∙; Pf to Qf) ExplorePlug : ∀ {m} (M : Monoid ℓ m) (e : Explore _ A) → ★ _ ExplorePlug M e = ∀ f x → e∘ ε _∙_ f ∙ x ≈ e∘ x _∙_ f where open Mon M e∘ = explore-endo e plugKit : ∀ {m} (M : Monoid ℓ m) → ExploreIndKit _ (ExplorePlug M) plugKit M = mk (λ _ → fst identity) (λ Ps Ps' f x → trans (∙-cong (! Ps _ _) refl) (trans (assoc _ _ _) (trans (∙-cong refl (Ps' _ x)) (Ps _ _)))) (λ x f _ → ∙-cong (snd identity (f x)) refl) where open Mon M module FromExplore {a} {A : ★ a} (explore : ∀ {ℓ} → Explore ℓ A) where module _ {ℓ} where with-monoid : ∀ {m} → ExploreMon ℓ m A with-monoid = explore-monoid explore with∘ : Explore ℓ A with∘ = explore-endo explore with-endo-monoid : ∀ {m} → ExploreMon ℓ m A with-endo-monoid = explore-endo-monoid explore backward : Explore ℓ A backward = explore-backward explore gfilter : ∀ {B} → (A →? B) → Explore ℓ B gfilter f = gfilter-explore f explore filter : (A → 𝟚) → Explore ℓ A filter p = filter-explore p explore sum : Sum A sum = explore 0 _+_ Card : ℕ Card = sum (const 1) count : Count A count f = sum (𝟚▹ℕ ∘ f) product : (A → ℕ) → ℕ product = explore 1 _*_ big-∧ big-∨ big-xor : (A → 𝟚) → 𝟚 big-∧ = explore 1₂ _∧_ and = big-∧ all = big-∧ big-∨ = explore 0₂ _∨_ or = big-∨ any = big-∨ big-xor = explore 0₂ _xor_ big-lift∧ big-lift∨ : Level → (A → 𝟚) → 𝟚 big-lift∧ ℓ f = lower (explore {ℓ} (lift 1₂) (lift-op₂ _∧_) (lift ∘ f)) big-lift∨ ℓ f = lower (explore {ℓ} (lift 0₂) (lift-op₂ _∨_) (lift ∘ f)) bin-tree : BinTree A bin-tree = explore empty fork leaf list : List A list = explore List.[] _++_ List.[_] module FindBackward = FindForward backward findLast? : Find? A findLast? = FindBackward.find? last : Maybe A last = FindBackward.first findLastKey : FindKey A findLastKey = FindBackward.findKey open FindForward explore public module FromLookup {a} {A : ★ a} {explore : ∀ {ℓ} → Explore ℓ A} (lookup : ∀ {ℓ} → Lookup {ℓ} explore) where module CheckDec! {ℓ}{P : A → ★ ℓ}(decP : ∀ x → Dec (P x)) where CheckDec! : ★ _ CheckDec! = explore (Lift 𝟙) _×_ λ x → ✓ ⌊ decP x ⌋ checkDec! : {p✓ : CheckDec!} → ∀ x → P x checkDec! {p✓} x = toWitness (lookup p✓ x) module FromExploreInd {a} {A : ★ a} {explore : ∀ {ℓ} → Explore ℓ A} (explore-ind : ∀ {p ℓ} → ExploreInd {ℓ} p explore) where open FromExplore explore public module _ {ℓ p} where explore-mon-ext : ExploreMonExt {ℓ} p explore explore-mon-ext m {f} {g} f≈°g = explore-ind (λ s → s _ _ f ≈ s _ _ g) refl ∙-cong f≈°g where open Mon m explore-mono : ExploreMono {ℓ} p explore explore-mono _⊆_ z⊆ _∙-mono_ {f} {g} f⊆°g = explore-ind (λ e → e _ _ f ⊆ e _ _ g) z⊆ _∙-mono_ f⊆°g open ExplorePlug {ℓ} {a} {A} explore∘-plug : (M : Monoid ℓ ℓ) → ExplorePlug M explore explore∘-plug M = explore-ind $kit plugKit M module _ (M : Monoid ℓ ℓ) (open Mon M) (f : A → C) where explore-endo-monoid-spec′ : ∀ z → explore ε _∙_ f ∙ z ≈ explore-endo explore z _∙_ f explore-endo-monoid-spec′ = explore-ind (λ e → ∀ z → e ε _∙_ f ∙ z ≈ explore-endo e z _∙_ f) (fst identity) (λ P₀ P₁ z → trans (assoc _ _ _) (trans (∙-cong refl (P₁ z)) (P₀ _))) (λ _ _ → refl) explore-endo-monoid-spec : with-monoid M f ≈ with-endo-monoid M f explore-endo-monoid-spec = trans (! snd identity _) (explore-endo-monoid-spec′ ε) explore∘-ind : ∀ (M : Monoid ℓ ℓ) → BigOpMonInd ℓ M (with-endo-monoid M) explore∘-ind M P Pε P∙ Pf P≈ = snd (explore-ind (λ e → ExplorePlug M e × P (λ f → e id _∘′_ (_∙_ ∘ f) ε)) (const (fst identity) , Pε) (λ {e} {s'} Ps Ps' → ExploreIndKit.P∙ (plugKit M) {e} {s'} (fst Ps) (fst Ps') , P≈ (λ f → fst Ps f _) (P∙ (snd Ps) (snd Ps'))) (λ x → ExploreIndKit.Pf (plugKit M) x , P≈ (λ f → ! snd identity _) (Pf x))) where open Mon M explore-swap : ∀ {b} → ExploreSwap {ℓ} p explore {b} explore-swap mon {eᴮ} eᴮ-ε pf f = explore-ind (λ e → e _ _ (eᴮ ∘ f) ≈ eᴮ (e _ _ ∘ flip f)) (! eᴮ-ε) (λ p q → trans (∙-cong p q) (! pf _ _)) (λ _ → refl) where open Mon mon explore-ε : Exploreε {ℓ} p explore explore-ε M = explore-ind (λ e → e ε _ (const ε) ≈ ε) refl (λ x≈ε y≈ε → trans (∙-cong x≈ε y≈ε) (fst identity ε)) (λ _ → refl) where open Mon M explore-hom : ExploreHom {ℓ} p explore explore-hom cm f g = explore-ind (λ e → e _ _ (f ∙° g) ≈ e _ _ f ∙ e _ _ g) (! fst identity ε) (λ p₀ p₁ → trans (∙-cong p₀ p₁) (∙-interchange _ _ _ _)) (λ _ → refl) where open CMon cm explore-linˡ : ExploreLinˡ {ℓ} p explore explore-linˡ m _◎_ f k ide dist = explore-ind (λ e → e ε _∙_ (λ x → k ◎ f x) ≈ k ◎ e ε _∙_ f) (! ide) (λ x x₁ → trans (∙-cong x x₁) (! dist k _ _)) (λ x → refl) where open Mon m explore-linʳ : ExploreLinʳ {ℓ} p explore explore-linʳ m _◎_ f k ide dist = explore-ind (λ e → e ε _∙_ (λ x → f x ◎ k) ≈ e ε _∙_ f ◎ k) (! ide) (λ x x₁ → trans (∙-cong x x₁) (! dist k _ _)) (λ x → refl) where open Mon m module ProductMonoid {M : ★₀} (εₘ : M) (_⊕ₘ_ : Op₂ M) {N : ★₀} (εₙ : N) (_⊕ₙ_ : Op₂ N) where ε = (εₘ , εₙ) _⊕_ : Op₂ (M × N) (xₘ , xₙ) ⊕ (yₘ , yₙ) = (xₘ ⊕ₘ yₘ , xₙ ⊕ₙ yₙ) explore-product-monoid : ∀ fₘ fₙ → explore ε _⊕_ < fₘ , fₙ > ≡ (explore εₘ _⊕ₘ_ fₘ , explore εₙ _⊕ₙ_ fₙ) explore-product-monoid fₘ fₙ = explore-ind (λ e → e ε _⊕_ < fₘ , fₙ > ≡ (e εₘ _⊕ₘ_ fₘ , e εₙ _⊕ₙ_ fₙ)) ≡.refl (≡.ap₂ _⊕_) (λ _ → ≡.refl) {- empty-explore: ε ≡ (εₘ , εₙ) ✓ point-explore (x , y): < fₘ , fₙ > (x , y) ≡ (fₘ x , fₙ y) ✓ merge-explore e₀ e₁: e₀ ε _⊕_ < fₘ , fₙ > ⊕ e₁ ε _⊕_ < fₘ , fₙ > ≡ (e₀ εₘ _⊕ₘ_ fₘ , e₀ εₙ _⊕ₙ_ fₙ) ⊕ (e₁ εₘ _⊕ₘ_ fₘ , e₁ εₙ _⊕ₙ_ fₙ) ≡ (e₀ εₘ _⊕ₘ_ fₘ ⊕ e₁ εₘ _⊕ₘ_ fₘ , e₀ εₙ _⊕ₙ_ fₙ ⊕ e₁ εₙ _⊕ₙ_ fₙ) -} module _ {ℓ} where reify : Reify {ℓ} explore reify = explore-ind (λ eᴬ → Πᵉ eᴬ _) _ _,_ unfocus : Unfocus {ℓ} explore unfocus = explore-ind Unfocus (λ{ (lift ()) }) (λ P Q → [ P , Q ]) (λ η → _,_ η) module _ {ℓᵣ aᵣ} {Aᵣ : A → A → ★ aᵣ} (Aᵣ-refl : Reflexive Aᵣ) where ⟦explore⟧ : ⟦Explore⟧ ℓᵣ Aᵣ (explore {ℓ}) (explore {ℓ}) ⟦explore⟧ Mᵣ zᵣ ∙ᵣ fᵣ = explore-ind (λ e → Mᵣ (e _ _ _) (e _ _ _)) zᵣ (λ η → ∙ᵣ η) (λ η → fᵣ Aᵣ-refl) explore-ext : ExploreExt {ℓ} explore explore-ext ε op = explore-ind (λ e → e _ _ _ ≡ e _ _ _) ≡.refl (≡.ap₂ op) module LiftHom {m p} {S T : ★ m} (_≈_ : T → T → ★ p) (≈-refl : Reflexive _≈_) (≈-trans : Transitive _≈_) (zero : S) (_+_ : Op₂ S) (one : T) (_*_ : Op₂ T) (≈-cong-* : _*_ Preserves₂ _≈_ ⟶ _≈_ ⟶ _≈_) (f : S → T) (g : A → S) (hom-0-1 : f zero ≈ one) (hom-+-* : ∀ {x y} → (f (x + y)) ≈ (f x * f y)) where lift-hom : f (explore zero _+_ g) ≈ explore one _*_ (f ∘ g) lift-hom = explore-ind (λ e → f (e zero _+_ g) ≈ e one _*_ (f ∘ g)) hom-0-1 (λ p q → ≈-trans hom-+-* (≈-cong-* p q)) (λ _ → ≈-refl) module _ {ℓ} {P : A → ★_ ℓ} where open LiftHom {S = ★_ ℓ} {★_ ℓ} (λ A B → B → A) id _∘′_ (Lift 𝟘) _⊎_ (Lift 𝟙) _×_ (λ f g → ×-map f g) Dec P (const (no (λ{ (lift ()) }))) (uncurry Dec-⊎) public renaming (lift-hom to lift-Dec) module FromFocus {p} (focus : Focus {p} explore) where Dec-Σ : ∀ {P} → Π A (Dec ∘ P) → Dec (Σ A P) Dec-Σ = map-Dec unfocus focus ∘ lift-Dec ∘ reify lift-hom-≡ : ∀ {m} {S T : ★ m} (zero : S) (_+_ : Op₂ S) (one : T) (_*_ : Op₂ T) (f : S → T) (g : A → S) (hom-0-1 : f zero ≡ one) (hom-+-* : ∀ {x y} → f (x + y) ≡ f x * f y) → f (explore zero _+_ g) ≡ explore one _*_ (f ∘ g) lift-hom-≡ z _+_ o _*_ = LiftHom.lift-hom _≡_ ≡.refl ≡.trans z _+_ o _*_ (≡.ap₂ _*_) -- Since so far S and T should have the same level, we get this mess of resizing -- There is a later version based on ⟦explore⟧. module _ (f : A → 𝟚) {{_ : UA}} where lift-✓all-Πᵉ : ✓ (big-lift∧ ₁ f) ≡ Πᵉ explore (✓ ∘ f) lift-✓all-Πᵉ = lift-hom-≡ (lift 1₂) (lift-op₂ _∧_) (Lift 𝟙) _×_ (✓ ∘ lower) (lift ∘ f) (≡.! Lift≡id) (✓-∧-× _ _) module _ (f : A → 𝟚) where lift-✓any↔Σᵉ : ✓ (big-lift∨ ₁ f) ↔ Σᵉ explore (✓ ∘ f) lift-✓any↔Σᵉ = LiftHom.lift-hom _↔_ (id , id) (zip (flip _∘′_) _∘′_) (lift 0₂) (lift-op₂ _∨_) (Lift 𝟘) _⊎_ (zip ⊎-map ⊎-map) (✓ ∘ lower) (lift ∘ f) ((λ()) , λ{(lift())}) (✓∨-⊎ , ⊎-✓∨) sum-ind : SumInd sum sum-ind P P0 P+ Pf = explore-ind (λ e → P (e 0 _+_)) P0 P+ Pf sum-ext : SumExt sum sum-ext = explore-ext 0 _+_ sum-zero : SumZero sum sum-zero = explore-ε ℕ+.monoid sum-hom : SumHom sum sum-hom = explore-hom ℕ°.+-commutativeMonoid sum-mono : SumMono sum sum-mono = explore-mono _≤_ z≤n _+-mono_ sum-swap' : SumSwap sum sum-swap' {sumᴮ = sᴮ} sᴮ-0 hom f = sum-ind (λ s → s (sᴮ ∘ f) ≡ sᴮ (s ∘ flip f)) (! sᴮ-0) (λ p q → (ap₂ _+_ p q) ∙ (! hom _ _)) (λ _ → refl) where open ≡ sum-lin : SumLin sum sum-lin f zero = sum-zero sum-lin f (suc k) = ≡.trans (sum-hom f (λ x → k * f x)) (≡.ap₂ _+_ (≡.refl {x = sum f}) (sum-lin f k)) sum-const : SumConst sum sum-const x = sum-ext (λ _ → ! snd ℕ°.*-identity x) ∙ sum-lin (const 1) x ∙ ℕ°.*-comm x Card where open ≡ exploreStableUnder→sumStableUnder : ∀ {p} → StableUnder explore p → SumStableUnder sum p exploreStableUnder→sumStableUnder SU-p = SU-p 0 _+_ count-ext : CountExt count count-ext f≗g = sum-ext (≡.cong 𝟚▹ℕ ∘ f≗g) sumStableUnder→countStableUnder : ∀ {p} → SumStableUnder sum p → CountStableUnder count p sumStableUnder→countStableUnder sumSU-p f = sumSU-p (𝟚▹ℕ ∘ f) diff-list = with-endo-monoid (List.monoid A) List.[_] {- list≡diff-list : list ≡ diff-list list≡diff-list = {!explore-endo-monoid-spec (List.monoid A) List.[_]!} -} lift-sum : ∀ ℓ → Sum A lift-sum ℓ f = lower {₀} {ℓ} (explore (lift 0) (lift-op₂ _+_) (lift ∘ f)) Fin-lower-sum≡Σᵉ-Fin : ∀ {{_ : UA}}(f : A → ℕ) → Fin (lift-sum _ f) ≡ Σᵉ explore (Fin ∘ f) Fin-lower-sum≡Σᵉ-Fin f = lift-hom-≡ (lift 0) (lift-op₂ _+_) (Lift 𝟘) _⊎_ (Fin ∘ lower) (lift ∘ f) (Fin0≡𝟘 ∙ ! Lift≡id) (! Fin-⊎-+) where open ≡ module FromTwoExploreInd {a} {A : ★ a} {eᴬ : ∀ {ℓ} → Explore ℓ A} (eᴬ-ind : ∀ {p ℓ} → ExploreInd {ℓ} p eᴬ) {b} {B : ★ b} {eᴮ : ∀ {ℓ} → Explore ℓ B} (eᴮ-ind : ∀ {p ℓ} → ExploreInd {ℓ} p eᴮ) where module A = FromExploreInd eᴬ-ind module B = FromExploreInd eᴮ-ind module _ {c ℓ}(cm : CommutativeMonoid c ℓ) where open CMon cm opᴬ = eᴬ ε _∙_ opᴮ = eᴮ ε _∙_ -- TODO use lift-hom explore-swap' : ∀ f → opᴬ (opᴮ ∘ f) ≈ opᴮ (opᴬ ∘ flip f) explore-swap' = A.explore-swap m (B.explore-ε m) (B.explore-hom cm) sum-swap : ∀ f → A.sum (B.sum ∘ f) ≡ B.sum (A.sum ∘ flip f) sum-swap = explore-swap' ℕ°.+-commutativeMonoid module FromTwoAdequate-sum {{_ : UA}}{{_ : FunExt}} {A}{B} {sumᴬ : Sum A}{sumᴮ : Sum B} (open Adequacy _≡_) (sumᴬ-adq : Adequate-sum sumᴬ) (sumᴮ-adq : Adequate-sum sumᴮ) where open ≡ sumStableUnder : (p : A ≃ B)(f : B → ℕ) → sumᴬ (f ∘ ·→ p) ≡ sumᴮ f sumStableUnder p f = Fin-injective (sumᴬ-adq (f ∘ ·→ p) ∙ Σ-fst≃ p _ ∙ ! sumᴮ-adq f) sumStableUnder′ : (p : A ≃ B)(f : A → ℕ) → sumᴬ f ≡ sumᴮ (f ∘ <– p) sumStableUnder′ p f = Fin-injective (sumᴬ-adq f ∙ Σ-fst≃′ p _ ∙ ! sumᴮ-adq (f ∘ <– p)) module FromAdequate-sum {A} {sum : Sum A} (open Adequacy _≡_) (sum-adq : Adequate-sum sum) {{_ : UA}}{{_ : FunExt}} where open FromTwoAdequate-sum sum-adq sum-adq public open ≡ sum-ext : SumExt sum sum-ext = ap sum ∘ λ= private count : Count A count f = sum (𝟚▹ℕ ∘ f) private module M {p q : A → 𝟚}(same-count : count p ≡ count q) where private P = λ x → p x ≡ 1₂ Q = λ x → q x ≡ 1₂ ¬P = λ x → p x ≡ 0₂ ¬Q = λ x → q x ≡ 0₂ π : Σ A P ≡ Σ A Q π = ! Σ=′ _ (count-≡ p) ∙ ! (sum-adq (𝟚▹ℕ ∘ p)) ∙ ap Fin same-count ∙ sum-adq (𝟚▹ℕ ∘ q) ∙ Σ=′ _ (count-≡ q) lem1 : ∀ px qx → 𝟚▹ℕ qx ≡ (𝟚▹ℕ (px ∧ qx)) + 𝟚▹ℕ (not px) * 𝟚▹ℕ qx lem1 1₂ 1₂ = ≡.refl lem1 1₂ 0₂ = ≡.refl lem1 0₂ 1₂ = ≡.refl lem1 0₂ 0₂ = ≡.refl lem2 : ∀ px qx → 𝟚▹ℕ px ≡ (𝟚▹ℕ (px ∧ qx)) + 𝟚▹ℕ px * 𝟚▹ℕ (not qx) lem2 1₂ 1₂ = ≡.refl lem2 1₂ 0₂ = ≡.refl lem2 0₂ 1₂ = ≡.refl lem2 0₂ 0₂ = ≡.refl lemma1 : ∀ px qx → (qx ≡ 1₂) ≡ (Fin (𝟚▹ℕ (px ∧ qx)) ⊎ (px ≡ 0₂ × qx ≡ 1₂)) lemma1 px qx = ! Fin-≡-≡1₂ qx ∙ ap Fin (lem1 px qx) ∙ ! Fin-⊎-+ ∙ ⊎= refl (! Fin-×-* ∙ ×= (Fin-≡-≡0₂ px) (Fin-≡-≡1₂ qx)) lemma2 : ∀ px qx → (Fin (𝟚▹ℕ (px ∧ qx)) ⊎ (px ≡ 1₂ × qx ≡ 0₂)) ≡ (px ≡ 1₂) lemma2 px qx = ! ⊎= refl (! Fin-×-* ∙ ×= (Fin-≡-≡1₂ px) (Fin-≡-≡0₂ qx)) ∙ Fin-⊎-+ ∙ ap Fin (! lem2 px qx) ∙ Fin-≡-≡1₂ px π' : (Fin (sum (λ x → 𝟚▹ℕ (p x ∧ q x))) ⊎ Σ A (λ x → P x × ¬Q x)) ≡ (Fin (sum (λ x → 𝟚▹ℕ (p x ∧ q x))) ⊎ Σ A (λ x → ¬P x × Q x)) π' = ⊎= (sum-adq (λ x → 𝟚▹ℕ (p x ∧ q x))) refl ∙ ! Σ⊎-split ∙ Σ=′ _ (λ x → lemma2 (p x) (q x)) ∙ π ∙ Σ=′ _ (λ x → lemma1 (p x) (q x)) ∙ Σ⊎-split ∙ ! ⊎= (sum-adq (λ x → 𝟚▹ℕ (p x ∧ q x))) refl π'' : Σ A (P ×° ¬Q) ≡ Σ A (¬P ×° Q) π'' = Fin⊎-injective (sum (λ x → 𝟚▹ℕ (p x ∧ q x))) π' open EquivalentSubsets π'' public same-count→iso : ∀{p q : A → 𝟚}(same-count : count p ≡ count q) → p ≡ q ∘ M.π {p} {q} same-count same-count→iso {p} {q} sc = M.prop {p} {q} sc module From⟦Explore⟧ {-a-} {A : ★₀ {- a-}} {explore : ∀ {ℓ} → Explore ℓ A} (⟦explore⟧ : ∀ {ℓ₀ ℓ₁} ℓᵣ → ⟦Explore⟧ {ℓ₀} {ℓ₁} ℓᵣ _≡_ explore explore) {{_ : UA}} where open FromExplore explore module AlsoInFromExploreInd {ℓ}(M : Monoid ℓ ℓ) (open Mon M) (f : A → C) where explore-endo-monoid-spec′ : ∀ z → explore ε _∙_ f ∙ z ≈ explore-endo explore z _∙_ f explore-endo-monoid-spec′ = ⟦explore⟧ ₀ {C} {C → C} (λ r s → ∀ z → r ∙ z ≈ s z) (fst identity) (λ P₀ P₁ z → trans (assoc _ _ _) (trans (∙-cong refl (P₁ z)) (P₀ _))) (λ xᵣ _ → ∙-cong (reflexive (≡.ap f xᵣ)) refl) explore-endo-monoid-spec : with-monoid M f ≈ with-endo-monoid M f explore-endo-monoid-spec = trans (! snd identity _) (explore-endo-monoid-spec′ ε) open ≡ module _ (f : A → ℕ) where sum⇒Σᵉ : Fin (explore 0 _+_ f) ≡ explore (Lift 𝟘) _⊎_ (Fin ∘ f) sum⇒Σᵉ = ⟦explore⟧ {₀} {₁} ₁ (λ n X → Fin n ≡ X) (Fin0≡𝟘 ∙ ! Lift≡id) (λ p q → ! Fin-⊎-+ ∙ ⊎= p q) (ap (Fin ∘ f)) product⇒Πᵉ : Fin (explore 1 _*_ f) ≡ explore (Lift 𝟙) _×_ (Fin ∘ f) product⇒Πᵉ = ⟦explore⟧ {₀} {₁} ₁ (λ n X → Fin n ≡ X) (Fin1≡𝟙 ∙ ! Lift≡id) (λ p q → ! Fin-×-* ∙ ×= p q) (ap (Fin ∘ f)) module _ (f : A → 𝟚) where ✓all-Πᵉ : ✓ (all f) ≡ Πᵉ explore (✓ ∘ f) ✓all-Πᵉ = ⟦explore⟧ {₀} {₁} ₁ (λ b X → ✓ b ≡ X) (! Lift≡id) (λ p q → ✓-∧-× _ _ ∙ ×= p q) (ap (✓ ∘ f)) ✓any→Σᵉ : ✓ (any f) → Σᵉ explore (✓ ∘ f) ✓any→Σᵉ p = ⟦explore⟧ {₀} {ₛ ₀} ₁ (λ b (X : ★₀) → Lift (✓ b) → X) (λ x → lift (lower x)) (λ { {0₂} {x₁} xᵣ {y₀} {y₁} yᵣ zᵣ → inr (yᵣ zᵣ) ; {1₂} {x₁} xᵣ {y₀} {y₁} yᵣ zᵣ → inl (xᵣ _) }) (λ xᵣ x → tr (✓ ∘ f) xᵣ (lower x)) (lift p) module FromAdequate-Σᵉ (adequate-Σᵉ : ∀ {ℓ} → Adequate-Σ {ℓ} (Σᵉ explore)) where open Adequacy adequate-sum : Adequate-sum _≡_ sum adequate-sum f = sum⇒Σᵉ f ∙ adequate-Σᵉ (Fin ∘ f) open FromAdequate-sum adequate-sum public adequate-any : Adequate-any -→- any adequate-any f e = coe (adequate-Σᵉ (✓ ∘ f)) (✓any→Σᵉ f e) module FromAdequate-Πᵉ (adequate-Πᵉ : ∀ {ℓ} → Adequate-Π {ℓ} (Πᵉ explore)) where open Adequacy adequate-product : Adequate-product _≡_ product adequate-product f = product⇒Πᵉ f ∙ adequate-Πᵉ (Fin ∘ f) adequate-all : Adequate-all _≡_ all adequate-all f = ✓all-Πᵉ f ∙ adequate-Πᵉ _ check! : (f : A → 𝟚) {pf : ✓ (all f)} → (∀ x → ✓ (f x)) check! f {pf} = coe (adequate-all f) pf {- module ExplorableRecord where record Explorable A : ★₁ where constructor mk field explore : Explore₀ A explore-ind : ExploreInd₀ explore open FromExploreInd explore-ind field adequate-sum : Adequate-sum sum -- adequate-product : AdequateProduct product open FromExploreInd explore-ind public open Explorable public ExploreForFun : ★₀ → ★₁ ExploreForFun A = ∀ {X} → Explorable X → Explorable (A → X) record Funable A : ★₂ where constructor _,_ field explorable : Explorable A negative : ExploreForFun A module DistFun {A} (μA : Explorable A) (μA→ : ExploreForFun A) {B} (μB : Explorable B){X} (_≈_ : X → X → ★ ₀) (0′ : X) (_+_ : X → X → X) (_*_ : X → X → X) where Σᴮ = explore μB 0′ _+_ Π' = explore μA 0′ _*_ Σ' = explore (μA→ μB) 0′ _+_ DistFun = ∀ f → Π' (Σᴮ ∘ f) ≈ Σ' (Π' ∘ _ˢ_ f) DistFun : ∀ {A} → Explorable A → ExploreForFun A → ★₁ DistFun μA μA→ = ∀ {B} (μB : Explorable B) c → let open CMon {₀}{₀} c in ∀ _*_ → Zero _≈_ ε _*_ → _DistributesOver_ _≈_ _*_ _∙_ → _*_ Preserves₂ _≈_ ⟶ _≈_ ⟶ _≈_ → DistFun.DistFun μA μA→ μB _≈_ ε _∙_ _*_ DistFunable : ∀ {A} → Funable A → ★₁ DistFunable (μA , μA→) = DistFun μA μA→ module _ {{_ : UA}}{{_ : FunExt}} where μ-iso : ∀ {A B} → (A ≃ B) → Explorable A → Explorable B μ-iso {A}{B} A≃B μA = mk (EM.map _ A→B (explore μA)) (EM.map-ind _ A→B (explore-ind μA)) ade where open ≡ A→B = –> A≃B ade = λ f → adequate-sum μA (f ∘ A→B) ∙ Σ-fst≃ A≃B _ -- I guess this could be more general μ-iso-preserve : ∀ {A B} (A≃B : A ≃ B) f (μA : Explorable A) → sum μA f ≡ sum (μ-iso A≃B μA) (f ∘ <– A≃B) μ-iso-preserve A≃B f μA = sum-ext μA (λ x → ap f (! (<–-inv-l A≃B x))) where open ≡ {- μLift : ∀ {A} → Explorable A → Explorable (Lift A) μLift = μ-iso {!(! Lift↔id)!} where open ≡ -} -- -} -- -} -- -} -- -}
test/interaction/Issue2447b.agda
cruhland/agda
1,989
15309
<filename>test/interaction/Issue2447b.agda import Issue2447.Type-error
P6/data_P6_2/ALUTest0.asm
alxzzhou/BUAA_CO_2020
1
8057
xori $6,$3,33678 sll $3,$1,15 srl $3,$4,7 lb $6,2($0) addu $4,$5,$3 addiu $5,$1,-4022 sh $1,8($0) sb $5,3($0) lw $5,12($0) nor $3,$0,$3 sltiu $1,$1,-20774 nor $3,$5,$3 nor $3,$4,$3 xor $3,$4,$3 sltu $1,$1,$3 lb $1,8($0) sltiu $1,$3,441 lhu $4,14($0) lh $1,2($0) xori $4,$3,50118 nor $6,$1,$3 addiu $0,$5,-13355 subu $1,$1,$3 lb $3,14($0) lb $1,2($0) lb $0,1($0) lw $4,8($0) srl $5,$4,18 lhu $1,14($0) slt $3,$3,$3 subu $6,$4,$3 xor $3,$6,$3 srl $3,$1,4 subu $0,$0,$3 ori $4,$4,24300 addiu $3,$3,-26827 srlv $6,$4,$3 sw $1,4($0) srl $5,$3,21 sltiu $3,$2,-16042 sw $5,16($0) lhu $3,0($0) andi $0,$6,2753 srav $3,$3,$3 and $3,$1,$3 srlv $4,$4,$3 lbu $0,0($0) srav $1,$1,$3 subu $4,$5,$3 lh $4,12($0) subu $1,$1,$3 slt $3,$3,$3 addiu $0,$3,-5869 lhu $3,16($0) sb $5,8($0) xori $0,$1,51568 lhu $5,2($0) xor $6,$3,$3 srav $3,$1,$3 sltu $1,$2,$3 andi $6,$1,55606 nor $3,$3,$3 sll $3,$3,21 ori $4,$4,532 nor $3,$5,$3 sltu $4,$6,$3 ori $3,$4,60031 srav $3,$4,$3 sll $3,$2,14 lh $1,14($0) subu $4,$0,$3 addiu $5,$3,14344 srl $3,$0,27 sb $3,4($0) lbu $3,10($0) sll $4,$3,25 subu $3,$3,$3 lbu $0,16($0) sltu $1,$1,$3 lhu $1,12($0) srl $0,$3,7 sltiu $4,$5,11701 sra $3,$1,19 sll $3,$1,13 sw $1,4($0) lw $3,4($0) subu $3,$0,$3 slti $5,$1,32283 lhu $4,2($0) and $6,$4,$3 slti $4,$5,-18648 subu $5,$4,$3 sh $5,2($0) ori $4,$3,20222 lw $5,12($0) ori $4,$4,1585 addu $4,$4,$3 xori $1,$3,14048 lhu $5,14($0) lb $0,14($0) sw $3,0($0) srlv $4,$1,$3 srav $3,$2,$3 nor $3,$5,$3 lh $3,14($0) sb $4,14($0) addu $1,$4,$3 addiu $5,$3,-31266 or $0,$0,$3 lb $4,5($0) sltu $4,$5,$3 subu $3,$5,$3 sh $6,10($0) addiu $0,$4,21574 addiu $5,$4,-4793 sltiu $5,$0,27204 sb $0,9($0) subu $3,$3,$3 sh $3,16($0) slti $3,$4,30025 sll $4,$1,25 sb $1,14($0) and $6,$5,$3 slti $3,$3,-27786 sltu $3,$2,$3 addiu $3,$1,-16492 lb $5,14($0) sltiu $4,$1,5523 sra $4,$4,9 addiu $1,$1,23249 addu $1,$4,$3 sltiu $5,$4,-19015 addu $5,$2,$3 sllv $6,$5,$3 nor $4,$4,$3 sltiu $3,$3,-28060 addu $1,$3,$3 sllv $5,$3,$3 slti $0,$4,-32674 slt $3,$0,$3 ori $0,$6,4546 lhu $3,4($0) srl $3,$4,31 xori $1,$1,14340 lhu $3,6($0) slt $1,$6,$3 lhu $1,14($0) sb $6,0($0) andi $3,$3,54298 srl $4,$1,28 sllv $4,$4,$3 xori $3,$3,36557 sll $3,$1,15 sllv $4,$4,$3 srl $3,$5,25 sra $3,$5,0 sltu $3,$3,$3 sw $3,0($0) lbu $3,13($0) addiu $2,$2,-7371 and $0,$3,$3 srlv $4,$5,$3 addiu $5,$6,25798 or $6,$5,$3 srl $1,$4,7 sw $3,16($0) slt $1,$1,$3 sb $3,16($0) lb $1,13($0) slt $4,$3,$3 sltiu $1,$1,3261 nor $5,$3,$3 nor $4,$3,$3 subu $0,$0,$3 or $6,$0,$3 lh $3,16($0) nor $4,$4,$3 lh $3,6($0) sra $4,$5,13 sh $3,12($0) sw $3,8($0) sll $3,$3,23 addu $4,$5,$3 sltu $4,$4,$3 xori $5,$3,11080 srlv $3,$3,$3 addiu $0,$5,-20264 xor $3,$1,$3 lbu $4,7($0) srav $1,$1,$3 lhu $1,16($0) sltu $4,$4,$3 subu $0,$6,$3 addu $6,$3,$3 sh $3,8($0) lh $1,4($0) addiu $0,$5,-6743 sw $4,0($0) sh $4,8($0) sltu $3,$4,$3 subu $0,$3,$3 lbu $6,13($0) lbu $1,1($0) lh $4,6($0) xori $3,$1,26006 sltiu $3,$0,12640 andi $4,$0,3956 sb $1,13($0) subu $5,$2,$3 addiu $1,$2,-21935 addu $3,$4,$3 slti $3,$4,10980 slt $6,$5,$3 subu $3,$0,$3 sb $5,11($0) addiu $3,$3,-1576 srav $0,$4,$3 slti $1,$3,12497 addu $5,$2,$3 and $1,$3,$3 slt $4,$0,$3 xori $4,$4,18541 addu $6,$3,$3 slt $1,$3,$3 sll $5,$5,11 sra $3,$3,2 lb $3,11($0) sw $4,4($0) subu $4,$1,$3 addiu $3,$4,14976 srav $0,$4,$3 xori $3,$0,47497 lhu $4,2($0) srl $3,$0,16 sw $4,0($0) lbu $0,7($0) slti $6,$6,-18982 slti $4,$5,-16842 slti $4,$6,-24220 lhu $3,14($0) lhu $3,4($0) andi $3,$3,35658 addu $1,$3,$3 ori $4,$3,48098 srav $3,$4,$3 subu $4,$4,$3 slti $3,$3,-2145 lhu $4,12($0) sb $4,13($0) lhu $5,16($0) sllv $5,$6,$3 and $4,$4,$3 slt $4,$1,$3 sh $1,10($0) nor $4,$3,$3 addiu $4,$4,-18648 slti $1,$5,-28343 lw $3,12($0) slt $3,$0,$3 addiu $1,$4,-7413 subu $1,$5,$3 addiu $4,$1,-1331 and $4,$3,$3 sll $3,$1,0 lw $1,16($0) subu $3,$2,$3 nor $1,$4,$3 addu $4,$3,$3 lbu $4,11($0) lh $5,8($0) slti $5,$5,-6542 or $0,$3,$3 addiu $4,$5,13711 lbu $3,5($0) sh $4,16($0) slti $4,$1,-15883 sltiu $3,$5,24418 or $4,$4,$3 sra $5,$5,26 lbu $1,0($0) sh $0,14($0) addiu $3,$4,16903 addu $4,$5,$3 sh $3,8($0) sw $1,12($0) nor $4,$0,$3 nor $1,$4,$3 lw $5,0($0) addiu $4,$4,29858 addu $4,$3,$3 or $0,$4,$3 subu $4,$1,$3 lb $3,12($0) srl $1,$4,30 lhu $4,12($0) sra $5,$1,8 andi $1,$0,52186 ori $3,$6,55552 slt $3,$5,$3 andi $1,$5,55816 addu $1,$4,$3 xori $4,$0,57758 sltiu $6,$3,-5155 sh $4,2($0) addiu $4,$1,-18648 addu $5,$4,$3 sll $4,$4,5 subu $1,$1,$3 xor $6,$4,$3 slti $6,$3,-26959 sltu $5,$6,$3 subu $5,$3,$3 lhu $3,0($0) lb $4,5($0) sllv $4,$4,$3 or $4,$5,$3 or $1,$5,$3 addiu $3,$3,23874 addu $1,$3,$3 lhu $4,14($0) srlv $1,$3,$3 srlv $3,$1,$3 addiu $3,$4,-30526 lhu $5,6($0) andi $5,$5,27977 lw $1,12($0) and $5,$4,$3 ori $6,$3,2655 lbu $4,13($0) slti $4,$3,22716 ori $0,$5,9122 sll $4,$3,2 addu $5,$5,$3 addiu $3,$3,-25256 subu $0,$4,$3 srlv $1,$2,$3 sltu $5,$4,$3 addiu $1,$5,22115 lbu $6,15($0) sra $3,$3,21 lb $1,8($0) srlv $3,$3,$3 nor $4,$6,$3 sb $3,9($0) lb $5,3($0) ori $1,$4,43734 sh $6,14($0) slt $4,$1,$3 sw $3,8($0) sllv $4,$0,$3 xori $0,$0,49117 slti $3,$1,27436 lb $1,13($0) xor $4,$4,$3 lb $1,13($0) sb $3,1($0) xori $4,$0,64077 subu $3,$3,$3 xori $1,$5,46688 subu $3,$3,$3 lw $3,0($0) slti $5,$5,-31788 lhu $4,2($0) slt $5,$5,$3 and $1,$4,$3 lbu $3,9($0) lbu $4,6($0) slt $1,$4,$3 subu $5,$0,$3 sb $3,12($0) srl $1,$3,19 sb $1,4($0) sltu $4,$3,$3 sw $3,16($0) srav $4,$3,$3 xor $3,$4,$3 sllv $3,$4,$3 srlv $4,$4,$3 srlv $6,$3,$3 srav $4,$4,$3 sltiu $4,$3,14156 lhu $4,14($0) slt $4,$4,$3 or $5,$4,$3 addiu $1,$1,14196 slti $6,$6,13794 sllv $1,$3,$3 slti $3,$1,-24060 srl $3,$3,29 andi $4,$4,622 xor $4,$4,$3 lbu $1,7($0) subu $4,$4,$3 lbu $5,10($0) srl $3,$6,24 srl $4,$2,0 sh $4,10($0) slt $1,$5,$3 xor $6,$4,$3 addiu $4,$1,32636 ori $6,$4,21856 addu $3,$3,$3 sllv $3,$3,$3 ori $4,$5,46323 lhu $5,0($0) lw $4,8($0) nor $3,$5,$3 lb $1,4($0) sltu $4,$3,$3 subu $4,$3,$3 ori $1,$1,50015 lw $3,0($0) xori $0,$3,3755 srl $3,$4,28 slt $4,$3,$3 slt $1,$3,$3 and $0,$0,$3 sra $3,$3,0 nor $4,$4,$3 srav $5,$5,$3 sllv $3,$3,$3 addu $5,$2,$3 subu $3,$1,$3 srav $3,$5,$3 subu $0,$5,$3 addu $4,$1,$3 addu $4,$3,$3 addu $3,$3,$3 addu $3,$4,$3 andi $3,$5,56924 or $3,$3,$3 ori $4,$4,5133 xori $3,$4,38416 andi $6,$5,25755 slti $3,$3,31496 addu $3,$1,$3 sra $4,$6,31 xor $1,$3,$3 xor $4,$0,$3 srlv $3,$5,$3 lh $3,12($0) ori $1,$5,23848 srav $4,$1,$3 srl $1,$1,21 sra $3,$4,28 lb $4,16($0) sll $3,$1,27 xor $4,$4,$3 sll $4,$0,3 sllv $0,$3,$3 addiu $0,$2,-27628 subu $3,$3,$3 or $0,$1,$3 sb $0,10($0) subu $4,$3,$3 nor $4,$1,$3 slti $4,$0,22107 lhu $0,4($0) and $1,$3,$3 lhu $0,8($0) sh $5,10($0) sllv $1,$1,$3 subu $5,$3,$3 nor $4,$5,$3 lbu $1,4($0) lw $0,12($0) sltiu $1,$1,11123 sll $3,$3,19 slti $3,$3,5876 sb $4,13($0) addiu $4,$6,-27247 xor $6,$4,$3 sll $3,$3,20 subu $5,$3,$3 addiu $3,$3,-26825 subu $3,$3,$3 addu $4,$4,$3 sltiu $4,$4,-19832 sllv $4,$3,$3 xori $1,$0,45743 srlv $1,$0,$3 subu $1,$3,$3 sltiu $4,$3,17403 sltiu $3,$3,22737 sllv $4,$3,$3 andi $3,$3,48064 srl $5,$5,6 srav $3,$0,$3 sw $5,12($0) srav $5,$1,$3 srav $3,$3,$3 andi $6,$3,16659 xor $4,$4,$3 sra $4,$5,30 sra $5,$5,4 srlv $0,$3,$3 addu $4,$3,$3 andi $5,$5,33901 subu $3,$3,$3 srl $5,$3,8 slt $1,$2,$3 lbu $1,7($0) addu $3,$5,$3 srav $5,$3,$3 nor $1,$6,$3 sb $3,4($0) xor $5,$5,$3 srav $1,$0,$3 slt $5,$6,$3 sb $6,2($0) xori $5,$3,32131 slt $4,$1,$3 lw $6,12($0) nor $4,$3,$3 or $5,$2,$3 and $3,$5,$3 lb $3,15($0) sll $4,$5,2 slt $5,$4,$3 addiu $5,$5,-11758 sltiu $6,$6,24729 xor $5,$3,$3 sll $1,$3,10 subu $3,$4,$3 sltiu $1,$4,522 srlv $6,$3,$3 and $1,$1,$3 or $3,$3,$3 addiu $1,$3,-12523 addu $4,$5,$3 slt $3,$3,$3 addu $3,$5,$3 srl $3,$6,10 sb $5,3($0) nor $0,$3,$3 subu $4,$2,$3 andi $4,$4,17725 addu $3,$5,$3 sw $1,12($0) sra $4,$6,7 subu $3,$0,$3 addu $3,$3,$3 sh $0,10($0) sra $4,$4,31 sll $1,$0,15 lw $3,0($0) srav $1,$0,$3 srl $4,$3,7 sh $5,14($0) addiu $1,$1,21705 sw $6,12($0) ori $3,$0,44336 sra $1,$3,13 ori $4,$6,55094 lh $3,8($0) nor $3,$3,$3 lb $4,4($0) sllv $3,$3,$3 and $0,$6,$3 slt $3,$5,$3 subu $4,$6,$3 addu $0,$1,$3 srl $1,$1,10 nor $4,$4,$3 and $0,$4,$3 and $3,$3,$3 sltu $1,$2,$3 sb $5,14($0) slti $0,$4,21857 sra $4,$4,25 sltu $0,$3,$3 or $1,$5,$3 lh $3,10($0) addiu $1,$6,-10115 sll $5,$5,7 nor $3,$6,$3 srl $1,$5,13 sltu $3,$1,$3 lhu $0,8($0) lb $0,15($0) sllv $5,$6,$3 sltiu $3,$4,13939 andi $0,$5,54849 lb $6,4($0) lb $4,15($0) sltu $4,$1,$3 subu $5,$3,$3 sltu $3,$3,$3 lhu $1,4($0) subu $1,$3,$3 sltu $1,$3,$3 lw $1,8($0) sw $3,4($0) srlv $4,$3,$3 sllv $3,$4,$3 sll $3,$6,29 sltu $4,$3,$3 sllv $3,$3,$3 addu $4,$3,$3 and $3,$4,$3 lh $4,4($0) slti $1,$6,12267 addiu $1,$4,30656 subu $3,$4,$3 sb $5,1($0) sltiu $4,$4,-29125 lb $0,2($0) sllv $1,$3,$3 and $3,$5,$3 sh $4,0($0) or $5,$3,$3 addu $0,$1,$3 xori $1,$3,20779 addu $1,$1,$3 lb $3,8($0) sra $5,$4,24 ori $6,$3,60811 slt $1,$6,$3 addiu $3,$3,-28247 lbu $4,16($0) srav $1,$1,$3 or $4,$4,$3 lw $4,0($0) srl $4,$4,28 subu $3,$3,$3 lbu $4,15($0) sll $5,$5,11 and $4,$4,$3 or $1,$2,$3 sb $1,15($0) sh $6,16($0) sra $4,$5,19 sltu $3,$3,$3 ori $3,$5,49459 sh $3,14($0) addu $4,$4,$3 srl $4,$4,24 lhu $3,0($0) slt $4,$3,$3 ori $3,$3,15084 sltiu $5,$5,-23352 lbu $1,2($0) sh $3,16($0) srlv $3,$3,$3 lbu $4,11($0) sllv $4,$4,$3 sh $3,0($0) slt $6,$4,$3 sh $3,14($0) subu $3,$3,$3 srl $3,$4,0 sllv $3,$0,$3 lhu $3,14($0) xor $5,$5,$3 or $3,$2,$3 xor $4,$4,$3 sll $4,$3,13 subu $5,$1,$3 sh $3,2($0) and $5,$0,$3 slti $3,$1,18736 lb $1,4($0) sltu $1,$4,$3 or $4,$6,$3 addiu $1,$5,9621 lh $0,0($0) srl $3,$6,15 subu $4,$0,$3 sw $3,12($0) sll $5,$5,1 sltiu $4,$4,-29104 addiu $4,$4,-16291 sra $5,$2,18 sllv $3,$3,$3 srl $3,$3,4 and $5,$5,$3 andi $4,$2,59637 andi $4,$3,65275 slt $4,$1,$3 lbu $5,8($0) addiu $6,$2,13661 subu $0,$4,$3 srav $3,$4,$3 xori $4,$5,9432 srav $3,$4,$3 sra $3,$3,5 sll $0,$2,22 slti $3,$3,-25491 lbu $4,11($0) sltiu $6,$1,1086 lh $3,8($0) lh $3,8($0) addu $1,$3,$3 sra $3,$3,18 srav $4,$3,$3 lbu $4,15($0) sll $1,$1,20 addu $3,$3,$3 ori $5,$5,28181 sltiu $3,$3,11988 sb $1,1($0) sltiu $5,$5,-9488 lw $1,16($0) xori $5,$5,60679 sb $3,16($0) and $3,$1,$3 srl $4,$3,5 sltu $5,$5,$3 lh $4,6($0) sltiu $1,$5,11676 sb $3,15($0) and $0,$3,$3 subu $3,$6,$3 sw $4,0($0) slti $3,$4,9958 and $4,$3,$3 andi $3,$3,73 addiu $3,$5,15990 xor $1,$4,$3 sb $5,11($0) andi $4,$0,63361 srl $1,$1,27 sll $4,$5,9 xori $1,$0,5710 lhu $6,16($0) addu $3,$3,$3 addiu $4,$3,-12971 sll $3,$3,28 xor $3,$2,$3 sra $3,$3,27 lbu $3,6($0) addiu $5,$5,-13451 sw $4,0($0) srlv $6,$6,$3 xori $6,$3,5041 sw $0,4($0) lhu $4,16($0) xori $3,$3,45667 lw $5,0($0) subu $3,$3,$3 ori $5,$5,1025 srl $5,$5,5 ori $3,$5,47286 xor $4,$4,$3 sw $4,4($0) sb $4,10($0) xori $5,$4,6594 sw $4,16($0) and $4,$3,$3 xori $6,$1,30884 addu $0,$0,$3 sll $3,$5,12 sllv $3,$3,$3 addu $6,$4,$3 lh $3,6($0) sw $4,16($0) slt $1,$5,$3 sra $6,$4,30 xori $1,$4,11844 sw $1,4($0) lb $1,9($0) sll $5,$4,28 sw $4,0($0) subu $3,$1,$3 subu $4,$3,$3 srlv $3,$2,$3 addiu $0,$6,8478 addiu $5,$4,-17055 sw $3,0($0) addu $4,$4,$3 subu $4,$5,$3 xor $4,$1,$3 lhu $5,6($0) sb $1,7($0) srlv $3,$3,$3 lhu $0,8($0) ori $0,$5,24312 srl $0,$0,5 slti $4,$3,-22517 sllv $3,$3,$3 subu $1,$3,$3 subu $3,$3,$3 sh $1,4($0) subu $3,$3,$3 addiu $3,$4,3760 srlv $4,$2,$3 sllv $3,$0,$3 lb $3,13($0) lhu $3,16($0) slt $1,$3,$3 sll $1,$6,8 addiu $3,$5,-3360 subu $4,$0,$3 sltu $4,$3,$3 sltiu $3,$0,4177 addu $3,$2,$3 sra $3,$1,19 lhu $4,10($0) slti $4,$3,31292 srav $3,$4,$3 slt $4,$3,$3 nor $1,$1,$3 xor $3,$0,$3 andi $3,$2,45849 ori $0,$5,35202 addu $5,$5,$3 addu $6,$3,$3 and $0,$0,$3 lb $6,13($0) nor $6,$6,$3 slt $6,$4,$3 xori $1,$4,40570 and $3,$5,$3 addu $1,$1,$3 lhu $3,6($0) andi $1,$5,53391 sb $4,5($0) srl $3,$3,25 srav $3,$4,$3 lw $3,12($0) andi $4,$4,64033 srav $1,$4,$3 addu $5,$5,$3 slt $1,$1,$3 sll $5,$3,13 lbu $6,6($0) subu $3,$5,$3 sra $1,$3,30 addiu $4,$3,28594 xori $5,$5,50033 lh $1,6($0) lh $5,10($0) andi $3,$4,60853 subu $3,$3,$3 slt $1,$0,$3 addu $3,$3,$3 srlv $3,$3,$3 lh $5,16($0) lb $3,16($0) sllv $1,$1,$3 andi $3,$4,46896 srav $5,$0,$3 xori $5,$0,19304 srlv $5,$5,$3 addu $3,$4,$3 addiu $4,$2,12061 sltiu $3,$4,16764 sltiu $5,$3,-991 and $3,$3,$3 sltiu $4,$4,-17493 sllv $4,$1,$3 sltu $3,$3,$3 or $1,$1,$3 andi $3,$1,51826 addiu $5,$0,-18869 sb $0,15($0) lbu $5,2($0) sw $1,16($0) lh $5,8($0) srlv $3,$3,$3 lb $4,12($0) xor $3,$3,$3 srl $3,$1,6 xori $1,$5,54473 lw $2,12($0) lhu $4,10($0) xori $1,$3,17848 or $4,$3,$3 lbu $5,7($0) nor $5,$5,$3 addu $1,$2,$3 addu $4,$5,$3 addu $3,$3,$3 ori $0,$4,46893 subu $6,$4,$3 ori $3,$3,2362 sra $3,$4,6 sltu $3,$0,$3 sra $4,$3,27 slt $3,$3,$3 or $6,$5,$3 srlv $3,$1,$3 lb $1,10($0) srav $3,$1,$3 srav $3,$0,$3 addu $4,$3,$3 sltiu $5,$6,27491 srl $1,$1,2
boot.asm
dusansimic/kernel
0
175220
<filename>boot.asm<gh_stars>0 bits 32 section .text align 4 dd 0x1BADB002 dd 0x00 dd - (0x1BADB002 + 0x00) global start extern k_main start: cli call k_main hlt
Patches/Multiplayer_Hack/ASM/timed_stock.asm
abitalive/SuperSmashBros
4
96612
// Timed stock battles // Prevent sudden death origin 0x10A4EC base 0x8018D5FC lbu t6, 0x03 (t5) lui a0, 0x800A addiu a0, a0, 0x4EF8 lli t7, 0x01 beq t6, t7, 0x8018D61C origin 0x1241A0 base 0x801337F0 addiu t8, r0, 0x03 origin 0x1241B4 base 0x80133804 addiu t9, r0, 0x03 // Show stock icons origin 0x1389F8 base 0x8013A778 lli t6, 0x01 bnel t5, t6, 0x8013A790 // Show correct places origin 0x155DA8 base 0x80136C08 j TimeScoring nop // Show correct places origin 0x156564 base 0x801373C4 j TimedStock pullvar pc, origin scope TimeScoring: { lui t6, 0x800A lbu t6, 0x4D0B (t6) // Mode lli t7, 0x01 beq t6, t7, Time // If mode == stock nop Stock: sll t6, a0, 0x07 sll t7, a0, 0x03 subu t6, t7 sll t7, a0, 0x02 subu t6, t7 lui t7, 0x800A addu t7, t6 lb v0, 0x4D33 (t7) // Points = stocks addiu v0, 0x01 // Add 1 to get real stocks number b End nop Time: // Else sll v1, a0, 0x02 lui t6, 0x8014 lui t7, 0x8014 addu t7, v1 addu t6, v1 lw t6, 0x9B80 (t6) // Load KOs lw t7, 0x9B90 (t7) // Load deaths subu v0, t6, t7 // Points = KOs - deaths End: jr ra nop } scope TimedStock: { lli t0, 0x01 beq t6, t0, Time // If mode == time use time scoring nop lui t0, 0x800A lw t0, 0x4D1C (t0) // Timer beqz t0, Time // Else if timer == 0 use time scoring nop Stock: j 0x801373CC // Else use stock scoring nop Time: j 0x801373F4 nop } pushvar origin, pc
programs/oeis/245/A245425.asm
neoneye/loda
22
23541
<gh_stars>10-100 ; A245425: Number of nonnegative integers with the property that their base 9/4 expansion (see A024652) has n digits. ; 9,18,36,81,180,405,918,2061,4635,10431,23472,52812,118827,267363,601560,1353510,3045402,6852150,15417342,34689015,78050286,175613148,395129583,889041555,2000343501,4500772875,10126738971,22785162687,51266616048,115349886108 mov $3,$0 add $3,1 mov $20,$0 lpb $3 mov $0,$20 sub $3,1 sub $0,$3 mov $17,$0 mov $18,0 mov $19,$0 add $19,1 lpb $19 mov $0,$17 sub $19,1 sub $0,$19 mov $13,$0 mov $15,2 lpb $15 mov $0,$13 sub $15,1 add $0,$15 sub $0,1 mov $9,$0 mov $11,2 lpb $11 mov $0,$9 sub $11,1 add $0,$11 sub $0,1 mov $5,$0 mov $7,2 lpb $7 mov $0,$5 sub $7,1 add $0,$7 sub $0,1 mov $2,1 lpb $0 sub $0,1 mul $2,9 sub $2,1 div $2,4 add $2,1 lpe mov $4,$2 mov $8,$7 lpb $8 mov $6,$4 sub $8,1 lpe lpe lpb $5 mov $5,0 sub $6,$4 lpe mov $4,$6 mov $12,$11 lpb $12 mov $10,$4 sub $12,1 lpe lpe lpb $9 mov $9,0 sub $10,$4 lpe mov $4,$10 mov $16,$15 lpb $16 mov $14,$4 sub $16,1 lpe lpe lpb $13 mov $13,0 sub $14,$4 lpe mov $4,$14 mul $4,9 add $18,$4 lpe add $1,$18 lpe mov $0,$1
Ada/src/Problem_52.adb
Tim-Tom/project-euler
0
9131
<gh_stars>0 with Ada.Text_IO; package body Problem_52 is package IO renames Ada.Text_IO; procedure Solve is type Digit is new Natural range 0 .. 9; type Digit_Count is Array (Digit'Range) of Natural; function Verify(num : Positive) return Boolean is base : Digit_Count := (others => 0); multiplied : Positive := num; dividend : Natural := num; begin while dividend > 0 loop declare remainder : constant Digit := Digit(dividend mod 10); begin base(remainder) := base(remainder) + 1; dividend := dividend / 10; end; end loop; for multiplier in 2 .. 6 loop declare temp : Digit_Count := (others => 0); begin multiplied := multiplied + num; dividend := multiplied; while dividend > 0 loop declare remainder : constant Digit := Digit(dividend mod 10); begin temp(remainder) := temp(remainder) + 1; if temp(remainder) > base(remainder) then return false; end if; dividend := dividend / 10; end; end loop; end; end loop; return True; end Verify; begin for num in 100_000 .. 166_666 loop if Verify(num) then IO.Put_Line(Positive'Image(num)); exit; end if; end loop; end Solve; end Problem_52;
Transynther/x86/_processed/NC/_st_zr_sm_/i7-8650U_0xd2_notsx.log_176_1705.asm
ljhsiun2/medusa
9
89423
.global s_prepare_buffers s_prepare_buffers: push %r13 push %r15 push %r8 push %r9 push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0x1b715, %r8 cmp %rcx, %rcx movl $0x61626364, (%r8) nop nop nop nop and $47754, %rdx lea addresses_WT_ht+0x10115, %rsi lea addresses_A_ht+0x15175, %rdi nop nop nop nop and $21681, %r9 mov $53, %rcx rep movsl nop nop nop nop inc %rsi lea addresses_UC_ht+0x9015, %rsi lea addresses_A_ht+0x2fb5, %rdi nop nop nop inc %r8 mov $72, %rcx rep movsb nop nop nop nop nop cmp $38014, %r8 lea addresses_normal_ht+0x7915, %r8 nop nop nop nop cmp $31793, %r13 vmovups (%r8), %ymm4 vextracti128 $0, %ymm4, %xmm4 vpextrq $1, %xmm4, %rdx nop nop dec %r13 lea addresses_A_ht+0x192d5, %rsi nop nop and $11752, %rdx and $0xffffffffffffffc0, %rsi movntdqa (%rsi), %xmm4 vpextrq $1, %xmm4, %r8 nop nop dec %rcx lea addresses_D_ht+0x189d4, %rsi lea addresses_A_ht+0x1bf5d, %rdi nop nop nop nop and $48222, %r15 mov $48, %rcx rep movsl nop nop sub %rdx, %rdx lea addresses_A_ht+0xf023, %rsi lea addresses_normal_ht+0x2995, %rdi cmp $7690, %r9 mov $64, %rcx rep movsw nop nop nop sub %r9, %r9 lea addresses_D_ht+0x8675, %rcx nop nop nop nop sub %r13, %r13 mov $0x6162636465666768, %rsi movq %rsi, (%rcx) nop and $4627, %r13 lea addresses_D_ht+0x10915, %r15 nop nop nop nop nop sub %r9, %r9 movl $0x61626364, (%r15) sub $55415, %rdi lea addresses_WC_ht+0x15aa5, %r15 nop nop nop nop nop xor %r13, %r13 mov (%r15), %ecx nop nop nop add $56837, %r9 pop %rsi pop %rdx pop %rdi pop %rcx pop %r9 pop %r8 pop %r15 pop %r13 ret .global s_faulty_load s_faulty_load: push %r10 push %r14 push %r8 push %rax push %rcx push %rdi push %rsi // REPMOV lea addresses_A+0x1e915, %rsi lea addresses_A+0x17675, %rdi nop nop nop nop nop sub $30027, %r8 mov $78, %rcx rep movsw nop nop nop cmp %rcx, %rcx // Store mov $0xa61, %rsi nop and $18862, %r8 movl $0x51525354, (%rsi) // Exception!!! nop nop nop nop mov (0), %r10 inc %rcx // Store lea addresses_A+0x7635, %r10 nop nop nop nop and %rax, %rax mov $0x5152535455565758, %r8 movq %r8, %xmm0 movups %xmm0, (%r10) nop nop dec %rsi // Store lea addresses_WT+0x1d20d, %rsi clflush (%rsi) nop nop nop nop and $25870, %rdi mov $0x5152535455565758, %rax movq %rax, %xmm1 vmovups %ymm1, (%rsi) nop nop sub %rsi, %rsi // Store lea addresses_WC+0xd15, %r8 nop nop nop cmp $60307, %rdi movb $0x51, (%r8) nop nop nop add $12814, %rsi // Store lea addresses_A+0x532b, %r10 nop xor $55571, %rdi movw $0x5152, (%r10) nop nop add $52656, %r10 // Store mov $0x4e7d360000000d15, %rsi nop nop nop sub $46564, %rdi movw $0x5152, (%rsi) nop nop nop nop cmp %r10, %r10 // Faulty Load mov $0x4e7d360000000d15, %rax nop nop nop add %rsi, %rsi mov (%rax), %r14 lea oracles, %r8 and $0xff, %r14 shlq $12, %r14 mov (%r8,%r14,1), %r14 pop %rsi pop %rdi pop %rcx pop %rax pop %r8 pop %r14 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'size': 8, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_A', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_A', 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': True}, 'dst': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False, 'NT': True, 'congruent': 6, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 8, 'AVXalign': True, 'NT': False, 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': True}} {'00': 173, '52': 3} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
dmn-core/src/main/resources/dmn/1.3/FEELLexer.g4
wojcickiluk/jdmn
0
2367
lexer grammar FEELLexer; @header { package com.gs.dmn.feel.analysis.syntax.antlrv4; import java.util.*; import org.apache.commons.lang3.StringUtils; import java.util.regex.Matcher; import java.util.regex.Pattern; } @lexer::members { private static Pattern UNICODE_6_HEX = Pattern.compile("\\\\U([0-9a-fA-F]){6}"); private static String convertUnicodeEscape(String value) { if (StringUtils.isEmpty(value)) { return value; } StringBuffer builder = new StringBuffer(); Matcher matcher = UNICODE_6_HEX.matcher(value); while (matcher.find()) { int cp = Integer.decode(matcher.group(0).replaceAll("\\\\U", "0x")); StringBuilder sb = new StringBuilder(); if (Character.isBmpCodePoint(cp)) { sb.append((char) cp); } else if (Character.isValidCodePoint(cp)) { sb.append(Character.highSurrogate(cp)); sb.append(Character.lowSurrogate(cp)); } else { sb.append('?'); } matcher.appendReplacement(builder, sb.toString()); } matcher.appendTail(builder); String result = builder.toString(); return result; } } // Tokens BLOCK_COMMENT: '/*' .*? '*/' -> skip ; LINE_COMMENT: '//' ~[\u000A-\u000D]* -> skip ; // White spaces WS: WhiteSpace+ -> skip ; // Literals STRING: // 33. string literal = """, { character – (""" | vertical space) | string escape sequence}, """ ; ('"' ( StringEscSeq | ~(["] | [\u000A-\u000D]) )* '"' ) { setText(convertUnicodeEscape(getText())); } ; NUMBER: (Digits ('.' Digits)?) | ('.' Digits) ; TEMPORAL: '@' WhiteSpace* STRING ; // Operators EQ: '=' | '==' ; NE: '!=' ; LT: '<' ; GT: '>' ; LE: '<=' ; GE: '>=' ; PLUS: '+' ; MINUS: '-' ; STAR: '*' ; FORWARD_SLASH: '/' ; STAR_STAR: '**' ; // Punctuation DOT_DOT: '..' ; DOT: '.' ; COMMA: ',' ; PAREN_OPEN: '(' ; PAREN_CLOSE: ')' ; BRACKET_OPEN: '[' ; BRACKET_CLOSE: ']' ; BRACE_OPEN: '{' ; BRACE_CLOSE: '}' ; COLON: ':' ; ARROW: '->' ; // Keywords NOT: 'not' ; TRUE: 'true' ; FALSE: 'false' ; NULL: 'null' ; FUNCTION: 'function' ; EXTERNAL: 'external' ; FOR: 'for' ; IN: 'in' ; RETURN: 'return' ; IF: 'if' ; THEN: 'then' ; ELSE: 'else' ; SOME: 'some' ; EVERY: 'every' ; SATISFIES: 'satisfies' ; AND: 'and' ; OR: 'or' ; BETWEEN: 'between' ; INSTANCE_OF: 'instance of' ; NAME: // Functions 'date and time' | 'days and time duration' | 'years and months duration' | 'string length' | 'upper case' | 'lower case' | 'substring before' | 'substring after' | 'starts with' | 'ends with' | 'start position' | 'list contains' | 'insert before' | 'index of' | 'distinct values' | 'get entries' | 'get value' | 'met by' | 'overlaps before' | 'overlaps after' | 'finished by' | 'started by' | 'start included' | 'end included' | 'day of year' | 'day of week' | 'month of year' | 'week of year' | // Properties 'time offset' | NameStartChar ( NamePartChar )* | ('\'' ( ~(['] | [\u000A-\u000D]) )* '\'' ) ; fragment StringEscSeq: // 64. string escape sequence = "\'" | "\"" | "\\" | "\n" | "\r" | "\t" | code point; Esc ( [btnfr"'\\] // The standard escaped character set such as tab, newline, etc. | CodePoint // A Unicode escape sequence | . // Invalid escape character | EOF // Incomplete at EOF ) ; fragment Esc : '\\' ; fragment CodePoint: 'u' HexDigit HexDigit HexDigit HexDigit | 'U' HexDigit HexDigit HexDigit HexDigit HexDigit HexDigit ; fragment NameStartChar: '?' | [A-Z] | '_' | [a-z] | [\u00C0-\u00D6] | [\u00D8-\u00F6] | [\u00F8-\u02FF] | [\u0370-\u037D] | [\u037F-\u1FFF] | [\u200C-\u200D] | [\u2070-\u218F] | [\u2C00-\u2FEF] | [\u3001-\uD7FF] | [\uF900-\uFDCF] | [\uFDF0-\uFFFD] | [\u{10000}-\u{EFFFF}] ; fragment NamePartChar: NameStartChar | Digit | '\u00B7' | [\u0300-\u036F] | [\u203F-\u2040] ; fragment Digit: [0-9] ; fragment HexDigit: [0-9a-fA-F] ; fragment Digits: Digit (Digit)* ; fragment WhiteSpace: VerticalSpace | '\u0009' | '\u0020' | '\u0085' | '\u00A0' | '\u1680' | '\u180E' | [\u2000-\u200B] | '\u2028' | '\u2029' | '\u202F' | '\u205F' | '\u3000' | '\uFEFF' ; fragment VerticalSpace: [\u000A-\u000D] ;
mac/app-scripts/url of Finder.scpt
albertz/foreground_app_info
2
4366
<reponame>albertz/foreground_app_info<filename>mac/app-scripts/url of Finder.scpt<gh_stars>1-10 tell application "Finder" set weburl to "file://" & POSIX path of ((folder of the front window) as text) end tell return weburl
v2/Assembler/AntlrZ80EvalGenerator/AntlrZ80EvalGenerator/Z80Eval.g4
Toysoft/spectnetide
219
6148
<reponame>Toysoft/spectnetide<filename>v2/Assembler/AntlrZ80EvalGenerator/AntlrZ80EvalGenerator/Z80Eval.g4 grammar Z80Eval; /* * Parser Rules */ compileUnit : expr formatSpec? EOF ; formatSpec : BYTEF | BOOLF | SBYTEF | CHARF | HEX4F | HEX8F | WORDF | SWORDF | DWORDF | SDWORDF | BITV8F | BITV16F | BITV32F ; // --- Expressions expr : orExpr (QMARK expr COLON expr)? ; orExpr : xorExpr (VBAR xorExpr)* ; xorExpr : andExpr (UPARR andExpr)* ; andExpr : equExpr (AMP equExpr)* ; equExpr : relExpr ((EQOP | NEQOP) relExpr)* ; relExpr : shiftExpr ((LTOP | LTEOP | GTOP | GTEOP) shiftExpr)* ; shiftExpr : addExpr ((LSHOP | RSHOP) addExpr)* ; addExpr : multExpr ((PLUS | MINUS ) multExpr)* ; multExpr : unaryExpr ((MULOP | DIVOP | MODOP) unaryExpr)* ; unaryExpr : PLUS unaryExpr | MINUS unaryExpr | TILDE unaryExpr | EXCLM unaryExpr | LPAR expr RPAR | literalExpr | symbolExpr | z80Spec ; literalExpr : HEXNUM | DECNUM | CHAR | BINNUM ; symbolExpr : IDENTIFIER ; z80Spec : reg8 | reg16 | memIndirect | flags ; reg8: A | B | C | D | E | F | H | L | XL | XH | YL | YH | I | R ; reg16: AF | BC | DE | HL | AF_ | BC_ | DE_ | HL_ | IX | IY | SP | PC | WZ ; memIndirect: LSBRAC expr (BYTEF | WORDF | DWORDF)? RSBRAC ; flags: ZF | NZF | CF | NCF | POF | PEF | PF | MF | R3F | NR3F | R5F | NR5F | NF | NNF | HF | NHF ; /* * Lexer Rules */ WS : ' ' -> channel(HIDDEN) ; COLON : ':' ; SCOLON : ';' ; COMMA : ',' ; ASSIGN : '=' ; LPAR : '(' ; RPAR : ')' ; LSBRAC : '[' ; RSBRAC : ']' ; QMARK : '?' ; PLUS : '+' ; MINUS : '-' ; VBAR : '|' ; UPARR : '^' ; AMP : '&' ; EQOP : '==' ; NEQOP : '!=' ; LTOP : '<' ; LTEOP : '<=' ; GTOP : '>' ; GTEOP : '>=' ; LSHOP : '<<' ; RSHOP : '>>' ; MULOP : '*' ; DIVOP : '/' ; MODOP : '%' ; TILDE : '~'; LDBRAC : '{{' ; RDBRAC : '}}' ; EXCLM : '!' ; // --- Register and flag tokens A : 'a'|'A' ; B : 'b'|'B' ; C : 'c'|'C' ; D : 'd'|'D' ; E : 'e'|'E' ; H : 'h'|'H' ; L : 'l'|'L' ; F : 'f'|'F' ; I : 'i'|'I' ; R : 'r'|'R' ; M : 'm'|'M' ; XL : 'xl'|'XL'|'ixl'|'IXL'|'IXl' ; XH : 'xh'|'XH'|'ixh'|'IXH'|'IXh' ; YL : 'yl'|'YL'|'iyl'|'IYL'|'IYl' ; YH : 'yh'|'YH'|'iyh'|'IYH'|'IYh' ; BC : 'bc'|'BC' ; DE : 'de'|'DE' ; HL : 'hl'|'HL' ; SP : 'sp'|'SP' ; IX : 'ix'|'IX' ; IY : 'iy'|'IY' ; AF : 'af'|'AF' ; AF_ : 'af\''|'AF\'' ; BC_ : 'bc\''|'BC\'' ; DE_ : 'de\''|'DE\'' ; HL_ : 'hl\''|'HL\'' ; PC : 'pc'|'PC' ; WZ : 'wz'|'WZ' ; ZF : '`z'|'`Z' ; NZF : '`nz'|'`NZ' ; CF : '`c'|'`C' ; NCF : '`nc'|'`NC' ; POF : '`po'|'`PO' ; PEF : '`pe'|'`PE' ; PF : '`p'|'`P' ; MF : '`m'|'`M' ; HF : '`h'|'`H' ; NHF : '`nh'|'`NH' ; NF : '`n'|'`N' ; NNF : '`nn'|'`NN' ; R3F : '`3' ; NR3F: '`N3'|'`n3' ; R5F : '`5' ; NR5F: '`N5'|'`n5' ; // --- Basic literals HEXNUM : ('#'|'0x'|'$') HexDigit HexDigit? HexDigit? HexDigit? | Digit HexDigit? HexDigit? HexDigit? HexDigit? ('H' | 'h') ; BINNUM : ('%' '_'? | ('0b' '_'?)) BinDigit BinDigit? BinDigit? BinDigit? BinDigit? BinDigit? BinDigit? BinDigit? BinDigit? BinDigit? BinDigit? BinDigit? BinDigit? BinDigit? BinDigit? BinDigit? ; DECNUM : Digit Digit? Digit? Digit? Digit?; CHAR : '\'' (~["\\\r\n\u0085\u2028\u2029] | CommonCharacter) '\'' ; // --- Identifiers IDENTIFIER: IDSTART IDCONT* ; IDSTART : '_' | '@' | 'A'..'Z' | 'a'..'z' ; IDCONT : '_' | '@' | '!' | '?' | '#' | '0'..'9' | 'A'..'Z' | 'a'..'z' ; // --- Format specifiers BOOLF : ':f' | ':F' ; BYTEF : ':b' | ':B' ; SBYTEF : ':-b' | ':-B' ; CHARF : ':c' | ':C' ; HEX4F : ':h4' | ':H4' ; HEX8F : ':h8' | ':H8' ; WORDF : ':w' | ':W' ; SWORDF : ':-w' | ':-W' ; DWORDF : ':dw' | ':DW' ; SDWORDF : ':-dw' | ':-DW' ; BITV8F : ':%8' | ':%8' ; BITV16F : ':%16' | ':%16' ; BITV32F : ':%32' | ':%32' ; // --- Any invalid character should be converted into an ErrorCharacter token. ErrorCharacter : . ; fragment CommonCharacter : SimpleEscapeSequence | HexEscapeSequence ; fragment SimpleEscapeSequence : '\\i' | '\\p' | '\\f' | '\\b' | '\\I' | '\\o' | '\\a' | '\\t' | '\\P' | '\\C' | '\\\'' | '\\"' | '\\\\' | '\\0' | '\\' ; fragment HexEscapeSequence : '\\x' HexDigit | '\\x' HexDigit HexDigit ; fragment HexDigit : [0-9] | [A-F] | [a-f] ; fragment Digit : '0'..'9' ; fragment BinDigit : ('0'|'1') '_'? ;
source/libgela/gela-embeded_links-double_lists.adb
faelys/gela-asis
4
17001
<reponame>faelys/gela-asis ------------------------------------------------------------------------------ -- G E L A A S I S -- -- ASIS implementation for Gela project, a portable Ada compiler -- -- http://gela.ada-ru.org -- -- - - - - - - - - - - - - - - - -- -- Read copyright and license at the end of this file -- ------------------------------------------------------------------------------ -- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $ package body Gela.Embeded_Links.Double_Lists is package S renames Simple_Lists; subtype L is Simple_Lists.List; ------------ -- Append -- ------------ procedure Append (Container : in out List; New_Item : in Element_Access) is begin Set_Prev (New_Item, Last (Container)); S.Append (L (Container), New_Item); end Append; ----------- -- Clear -- ----------- procedure Clear (Container : in out List) is Next : aliased Element_Access; begin while Iterate (Container, Next'Access) loop Set_Prev (Next, null); end loop; S.Clear (L (Container)); end Clear; ------------ -- Delete -- ------------ procedure Delete (Container : in out List; Item : in Element_Access) is Ignore : Element_Access; begin if Item = First (Container) then Delete_First (Container, Ignore); else Delete_Next (Container, Get_Prev (Item), Ignore); end if; Set_Prev (Item, null); end Delete; ------------------ -- Delete_First -- ------------------ procedure Delete_First (Container : in out List; Removed : out Element_Access) is begin S.Delete_First (L (Container), Removed); if Removed /= null then Set_Prev (Removed, null); end if; if First (Container) /= null then Set_Prev (First (Container), null); end if; end Delete_First; ----------------- -- Delete_Last -- ----------------- procedure Delete_Last (Container : in out List; Removed : out Element_Access) is begin if Is_Empty (Container) then Removed := null; elsif Last (Container) = First (Container) then Delete_First (Container, Removed); else Delete_Next (Container, Get_Prev (Last (Container)), Removed); end if; end Delete_Last; ----------------- -- Delete_Next -- ----------------- procedure Delete_Next (Container : in out List; After : in Element_Access; Removed : out Element_Access) is begin S.Delete_Next (L (Container), After, Removed); if Removed /= null then if After /= Last (Container) then Set_Prev (Get_Next (After), Get_Prev (Removed)); end if; Set_Prev (Removed, null); end if; end Delete_Next; ------------ -- Insert -- ------------ procedure Insert (Container : in out List; Before : in Element_Access; New_Item : in Element_Access) is begin if Before = First (Container) then Prepend (Container, New_Item); else S.Insert_After (L (Container), Get_Prev (Before), New_Item); end if; end Insert; ------------------ -- Insert_After -- ------------------ procedure Insert_After (Container : in out List; After : in Element_Access; New_Item : in Element_Access) is begin S.Insert_After (L (Container), After, New_Item); Set_Prev (New_Item, After); end Insert_After; ------------- -- Prepend -- ------------- procedure Prepend (Container : in out List; New_Item : in Element_Access) is Head : constant Element_Access := First (Container); begin if Head /= null then Set_Prev (Head, New_Item); end if; S.Prepend (L (Container), New_Item); end Prepend; ------------------ -- Splice_After -- ------------------ procedure Splice_After (Target : in out List; Source : in out List; After : in Element_Access := null) is Head : constant Element_Access := First (Source); begin if Head /= null then Set_Prev (Head, Last (Target)); end if; S.Splice_After (L (Target), L (Source), After); end Splice_After; end Gela.Embeded_Links.Double_Lists; ------------------------------------------------------------------------------ -- Copyright (c) 2006, <NAME> -- 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 <NAME>, 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 OWNER OR CONTRIBUTORS BE -- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -- POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------
oeis/228/A228873.asm
neoneye/loda-programs
11
20254
<reponame>neoneye/loda-programs ; A228873: F(n) * F(n+1) * F(n+2) * F(n+3), the product of four consecutive Fibonacci numbers, A000045. ; 6,30,240,1560,10920,74256,510510,3495030,23965920,164237040,1125770256,7715953440,52886430870,362487682830,2484530961360,17029219589256,116720030923320,800010932051760,5483356663145790,37583485265670630,257601041359736256,1765623801207218400,12101765575063399200,82946735203364020800,568525380903129805350,3896730930975481995006,26708591136299786965680,183063407022142460968440,1254735258021264594396360,8600083399119988801853520,58945848535836252557853006,404020856351687713383245910 add $0,1 seq $0,166536 ; A product of consecutive doubled Fibonacci numbers. bin $0,2 mul $0,2
libsrc/_DEVELOPMENT/im2/c/sccz80/im2_install_isr_callee.asm
jpoikela/z88dk
640
164310
<reponame>jpoikela/z88dk ; void im2_install_isr_callee(uint8_t vector, void *isr) SECTION code_clib SECTION code_z80 PUBLIC im2_install_isr_callee EXTERN asm_im2_install_isr im2_install_isr_callee: pop hl pop de ex (sp),hl jp asm_im2_install_isr
test/Compiler/simple/Erased-constructors.agda
guilhermehas/agda
0
15722
<reponame>guilhermehas/agda<gh_stars>0 -- Partly based on code due to <NAME>. open import Common.Prelude data D : Set where run-time : Bool → D @0 compile-time : Bool → D f : D → @0 D → Bool f (run-time x) _ = x f (compile-time x) (run-time y) = x f (compile-time x) (compile-time y) = y main : IO Unit main = putStrLn (if f (run-time true) (compile-time false) then "ok" else "bad")
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_611.asm
ljhsiun2/medusa
9
176854
<filename>Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_611.asm .global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %rbp push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x11bd, %rbp nop nop nop nop nop add $27715, %r10 mov $0x6162636465666768, %r13 movq %r13, (%rbp) nop nop nop nop cmp $33379, %rbx lea addresses_D_ht+0x169f1, %rsi lea addresses_A_ht+0x1df7d, %rdi nop nop nop mfence mov $74, %rcx rep movsw nop nop nop and $27325, %r13 lea addresses_UC_ht+0x1d8e1, %rsi lea addresses_WC_ht+0xf399, %rdi nop cmp %rbp, %rbp mov $45, %rcx rep movsl and %r10, %r10 lea addresses_normal_ht+0x162bd, %rbp nop nop nop nop nop sub %rsi, %rsi movups (%rbp), %xmm6 vpextrq $1, %xmm6, %rcx nop nop nop nop xor $25434, %rbp lea addresses_UC_ht+0x1c83d, %rdi nop cmp %rsi, %rsi mov (%rdi), %ebx nop nop nop nop sub $31074, %r13 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rbp pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r14 push %r8 push %rax push %rcx // Store lea addresses_D+0x1010d, %rcx nop nop nop nop add $49198, %r8 movb $0x51, (%rcx) nop nop nop nop cmp $54690, %rcx // Faulty Load lea addresses_WT+0x18abd, %r12 nop nop inc %rax mov (%r12), %r10w lea oracles, %r8 and $0xff, %r10 shlq $12, %r10 mov (%r8,%r10,1), %r10 pop %rcx pop %rax pop %r8 pop %r14 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_WT', 'same': False, 'size': 16, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_D', 'same': False, 'size': 1, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_WT', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 8, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_D_ht', 'congruent': 2, 'same': True}, 'dst': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 16, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 7, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'39': 21829} 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 */
programs/oeis/017/A017716.asm
neoneye/loda
22
27057
<filename>programs/oeis/017/A017716.asm<gh_stars>10-100 ; A017716: Binomial coefficients C(n,52). ; 1,53,1431,26235,367290,4187106,40475358,341149446,2558620845,17341763505,107518933731,615790256823,3284214703056,16421073515280,77413632286320,345780890878896,1469568786235308,5964720367660956,23196134763125940,86680293062207460,312049055023946856,1084741953178481928,3648677478873075576,11897861344151333400,37676560923145889100,116043807643289338428,348131422929868015284,1018606755979984192868,2910305017085669122480,8128782978756524100720,22218673475267832541968,59488706401523551644624,156157854303999323067138,402224776237574013960810,1017392081071510741194990,2528946030092040985256118,6181868073558322408403844,14869898879640289036430868,35218181557042789823125740,82175756966433176253960060,189004241022796305384108138,428716936954147717090781874,959509335087854414441273718,2119846205426655101672581470,4625118993658156585467450480,9969700941885359750896504368,21239797658799244686692552784,44739148260023940935799206928,93206558875049876949581681100,192119641762857909630770403900,391924069196230135646771623956,791532924062974587678774064068,1583065848125949175357548128136,3136262529306125724764953838760,6156367187156469015279353831640,11976932527740766993361651999736,23098369874928622058626043142348,44170566953810873761232257938876,83771764912399932995440489194420,157604506869091399364303293230180,294195079488970612146699480696336,544984327577929166763558054404688,1002067957159418145339445454873136,1829171667830683916095813131911280,3315373647943114597923661301589195,5967672566297606276262590342860551,10669475194289659706045237279659773,18950261912245813507751988601186761,33441638668669082660738803413858990,58644033027666072492020220479375910,102208171848218012057520955692626586,177064861089166415254578557044972818,304945038542453270716218626021897631,522166161887762449856538743188180875,889093735106190117323295697860956625 add $0,52 bin $0,52
oeis/100/A100307.asm
neoneye/loda-programs
0
91705
<reponame>neoneye/loda-programs<filename>oeis/100/A100307.asm ; A100307: Modulo 2 binomial transform of 3^n. ; Submitted by <NAME> ; 1,4,10,40,82,328,820,3280,6562,26248,65620,262480,538084,2152336,5380840,21523360,43046722,172186888,430467220,1721868880,3529831204,14119324816,35298312040,141193248160,282472589764,1129890359056,2824725897640,11298903590560,23162752360648,92651009442592,231627523606480,926510094425920,1853020188851842,7412080755407368,18530201888518420,74120807554073680,151947655485851044,607790621943404176,1519476554858510440,6077906219434041760,12159518479245787204,48638073916983148816,121595184792457872040 seq $0,3527 ; Divisors of 2^16 - 1. seq $0,5836 ; Numbers n whose base 3 representation contains no 2.
Projects/PJZ2/Greetz/Script.asm
jonathanbennett73/amiga-pjz-planet-disco-balls
21
167148
***************************************************************************** * Included at the end of the code section (for (pc) data) ***************************************************************************** ; Values must match .jmptable in Controller_ReadCommands ; Using rs.l as the values will be used in a .l jmptable rsreset FX_END_FLAG rs.l 1 FX_PAUSE_FLAG rs.l 1 FX_START_MASTERFRAME_FLAG rs.l 1 FX_GET_MASTERFRAME_FLAG rs.l 1 FX_ISMASTERFRAMEOVER_FLAG rs.l 1 FX_ISFRAMEOVER_FLAG rs.l 1 FX_SCRIPTJMP_FLAG rs.l 1 FX_PALETTE_FLAG rs.l 1 FX_NEXT_PHASE_FLAG rs.l 1 FX_MUSICSYNCMASK_FLAG rs.l 1 FX_MUSICSYNCMASKWAIT_FLAG rs.l 1 FX_USERVAL_FLAG rs.l 1 FX_USERVALWAIT_FLAG rs.l 1 FX_SINE_SET_FLAG rs.l 1 FX_RIPPLE_FLAG rs.l 1 FX_END MACRO dc.w FX_END_FLAG ENDM FX_PAUSE MACRO dc.w FX_PAUSE_FLAG dc.w \1 ;frames to pause ENDM FX_START_MASTERFRAME MACRO dc.w FX_START_MASTERFRAME_FLAG dc.w \1 ;frames wait for (global timing) ENDM FX_GET_MASTERFRAME MACRO dc.w FX_GET_MASTERFRAME_FLAG ENDM FX_ISMASTERFRAMEOVER MACRO dc.w FX_ISMASTERFRAMEOVER_FLAG dc.w \1 ;frames wait for (global timing) ENDM FX_ISFRAMEOVER MACRO dc.w FX_ISFRAMEOVER_FLAG dc.w \1 ;frames wait for (local timing) ENDM FX_SCRIPTJMP MACRO dc.w FX_SCRIPTJMP_FLAG dc.l \1 ;new script address ENDM FX_PALETTE MACRO dc.w FX_PALETTE_FLAG dc.w \1 ;speed dc.l \2 ;new palette ENDM FX_NEXT_PHASE MACRO dc.w FX_NEXT_PHASE_FLAG ENDM FX_MUSICSYNCMASK MACRO dc.w FX_MUSICSYNCMASK_FLAG dc.w \1 ;mask 0-$ff ENDM FX_MUSICSYNCMASKWAIT MACRO dc.w FX_MUSICSYNCMASKWAIT_FLAG dc.w \1 ;mask 0-$ff ENDM FX_USERVAL MACRO dc.w FX_USERVAL_FLAG dc.w \1 ;Offset to a CTRL_xxx variable dc.w \2 ;value to write ENDM FX_USERVALWAIT MACRO dc.w FX_USERVALWAIT_FLAG dc.w \1 ;Offset to a CTRL_xxx variable dc.w \2 ;value to wait for ENDM FX_SINE_SET MACRO dc.w FX_SINE_SET_FLAG ;Note most routines require even values to avoid the need to add.w d0,d0 for table lookups dc.w \1 ;change speed dc.w \2,\3,\4 ;offset (-1 leaves alone), speed, step dc.w \5 ;offset of sine variables in Controller_Info ENDM FX_RIPPLE MACRO dc.w FX_RIPPLE_FLAG dc.w \1 ;0=off, 1=on ENDM ***************************************************************************** ControllerScript: ;During init will run everything up to first FX_PAUSE before starting FX_PALETTE 0,PAL_AllBlack FX_MUSICSYNCMASK $ff FX_START_MASTERFRAME $aaa ;0 ;---- ;Text sine FX_SINE_SET 0,0,-32,16,CTRL_SINE1 ;Bars sines FX_SINE_SET 0,0,8,0,CTRL_BAR1_SINE1 FX_SINE_SET 0,0,22,0,CTRL_BAR1_SINE2 FX_SINE_SET 0,0,16,0,CTRL_BAR2_SINE1 FX_SINE_SET 0,0,10,0,CTRL_BAR2_SINE2 FX_SINE_SET 0,0,2,0,CTRL_BAR3_SINE1 FX_SINE_SET 0,0,20,0,CTRL_BAR3_SINE2 FX_SINE_SET 0,0,8,0,CTRL_BAR4_SINE1 FX_SINE_SET 0,0,12,0,CTRL_BAR4_SINE2 FX_SINE_SET 0,0,14,0,CTRL_BAR5_SINE1 FX_SINE_SET 0,0,24,0,CTRL_BAR5_SINE2 FX_SINE_SET 0,0,12,0,CTRL_BAR6_SINE1 FX_SINE_SET 0,0,12,0,CTRL_BAR6_SINE2 FX_SINE_SET 0,0,-12,0,CTRL_BAR7_SINE1 FX_SINE_SET 0,0,-12,0,CTRL_BAR7_SINE2 FX_RIPPLE 1 FX_PAUSE 32767 FX_END
source/image/required/s-wwdcha.ads
ytomino/drake
33
19911
<filename>source/image/required/s-wwdcha.ads pragma License (Unrestricted); -- implementation unit required by compiler with System.Wid_Char; package System.WWd_Char is pragma Pure; -- required for Character'Wide_Width by compiler (s-wwwdcha.ads) function Wide_Width_Character (Lo, Hi : Character) return Natural renames Wid_Char.Width_Character; -- required for Character'Wide_Wide_Width by compiler (s-wwwdcha.ads) function Wide_Wide_Width_Character (Lo, Hi : Character) return Natural renames Wid_Char.Width_Character; end System.WWd_Char;
Transynther/x86/_processed/US/_zr_/i9-9900K_12_0xa0.log_21829_1618.asm
ljhsiun2/medusa
9
28115
.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_UC_ht+0x19ee2, %rsi lea addresses_UC_ht+0x3bab, %rdi nop add %r10, %r10 mov $117, %rcx rep movsq nop nop nop add $60243, %rsi lea addresses_WT_ht+0x4372, %rbx nop nop nop sub $37541, %r15 mov $0x6162636465666768, %r13 movq %r13, (%rbx) xor %r15, %r15 lea addresses_D_ht+0x1b61b, %rsi lea addresses_WT_ht+0xc0e2, %rdi nop dec %r12 mov $99, %rcx rep movsq nop dec %r10 lea addresses_normal_ht+0x1e7e2, %r15 nop nop nop nop sub $32875, %rbx mov $0x6162636465666768, %r10 movq %r10, %xmm0 and $0xffffffffffffffc0, %r15 movntdq %xmm0, (%r15) nop nop nop nop nop xor %r10, %r10 lea addresses_UC_ht+0x3042, %r10 nop nop add %r15, %r15 movb $0x61, (%r10) nop add $27358, %rcx lea addresses_A_ht+0x79e2, %r13 nop nop nop xor $5787, %rsi movups (%r13), %xmm3 vpextrq $0, %xmm3, %rcx nop nop nop nop nop and $31877, %r12 lea addresses_WC_ht+0x15ce2, %rsi lea addresses_D_ht+0x11bc2, %rdi nop nop nop nop nop inc %r13 mov $91, %rcx rep movsq nop add $62517, %rsi lea addresses_normal_ht+0x9fd2, %r15 nop nop nop nop nop xor $29640, %rbx movl $0x61626364, (%r15) nop dec %r13 lea addresses_WC_ht+0x16f01, %r10 nop nop nop nop nop xor $8736, %rbx mov $0x6162636465666768, %r12 movq %r12, (%r10) nop and $55381, %rbx lea addresses_normal_ht+0x1e6e2, %rsi lea addresses_UC_ht+0x84e2, %rdi dec %r10 mov $19, %rcx rep movsw xor %r15, %r15 lea addresses_WT_ht+0x180e2, %r13 xor $54135, %rdi mov $0x6162636465666768, %r10 movq %r10, %xmm1 movups %xmm1, (%r13) nop nop nop add %r15, %r15 lea addresses_WT_ht+0x1b802, %rsi lea addresses_D_ht+0x8ee2, %rdi nop nop cmp %r15, %r15 mov $70, %rcx rep movsw nop nop nop nop nop add $48887, %r12 lea addresses_normal_ht+0xd2e2, %rcx nop nop nop nop cmp %rbx, %rbx movl $0x61626364, (%rcx) nop nop nop nop sub $29930, %r10 lea addresses_A_ht+0x18dc6, %r10 nop cmp %r12, %r12 mov $0x6162636465666768, %rdi movq %rdi, %xmm3 vmovups %ymm3, (%r10) nop sub $19109, %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 %r8 push %r9 push %rbp push %rcx push %rdi push %rdx // Load lea addresses_UC+0xddc6, %r9 nop nop add %r8, %r8 mov (%r9), %edx nop nop nop nop nop xor %r8, %r8 // Store lea addresses_A+0x3444, %rcx nop nop cmp $31844, %rdx mov $0x5152535455565758, %r8 movq %r8, (%rcx) nop nop dec %rcx // Store lea addresses_US+0x16da2, %r9 sub $27585, %rdi movb $0x51, (%r9) nop nop dec %rdi // Store lea addresses_A+0x1d562, %rdx nop nop and %rbp, %rbp movl $0x51525354, (%rdx) nop nop nop cmp $8744, %r8 // Faulty Load lea addresses_US+0x86e2, %r10 xor $32494, %r8 mov (%r10), %rbp lea oracles, %rcx and $0xff, %rbp shlq $12, %rbp mov (%rcx,%rbp,1), %rbp pop %rdx pop %rdi pop %rcx pop %rbp pop %r9 pop %r8 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': True, 'same': False, 'congruent': 0, 'type': 'addresses_US', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_UC', 'AVXalign': True, 'size': 4}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_A', 'AVXalign': False, 'size': 8}} {'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 6, 'type': 'addresses_US', 'AVXalign': False, 'size': 1}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_A', 'AVXalign': False, 'size': 4}} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_US', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'same': False, 'congruent': 9, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_UC_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 8}} {'src': {'same': False, 'congruent': 0, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WT_ht'}} {'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 8, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 16}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 1}} {'src': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 9, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 5, 'type': 'addresses_D_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': True, 'congruent': 4, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 4}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8}} {'src': {'same': False, 'congruent': 11, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_UC_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 16}} {'src': {'same': False, 'congruent': 5, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_D_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 4}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 32}} {'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 */
x86-64/programs/intentionalpain.asm
ShineyDev/assembly
1
9199
<filename>x86-64/programs/intentionalpain.asm ; --------------------------------------------------------------------- ; /x86-64/programs/intentionalpain.asm ; ; An x86-64 assembly which randomly selects between a write to STDOUT ; or a SIGSEGV. ; ; @kaylynn234 ; ; Requires: ; random ; write ; --------------------------------------------------------------------- global _start extern random extern write section .text _start: call random mov r12, rax and r12, 0b1 ; use the first bit -> 50% jnz _start_good _start_bad: mov rdi, 2 ; write to STDERR just to be a nuisance mov rsi, bad_msg mov rdx, bad_msg_l call write hlt ; we are not a kernel -> fast SIGSEGV :) _start_good: mov rdi, 1 mov rsi, good_msg mov rdx, good_msg_l call write mov rax, 60 xor rdi, rdi syscall section .data bad_msg: db "Uh-oh!", 0x0A bad_msg_l: equ $-bad_msg good_msg: db "Have a nice day!", 0x0A good_msg_l: equ $-good_msg
oeis/174/A174592.asm
neoneye/loda-programs
11
166755
; A174592: Numbers n such that n^2 + 2*(n+2)^2 is a square. ; Submitted by <NAME> ; 2,46,658,9182,127906,1781518,24813362,345605566,4813664578,67045698542,933826115026,13006519911838,181157452650722,2523197817198286,35143611988125298,489487370016555902,6817679568243657346,94958026585394646958,1322594692627281400082,18421367670196544954206,256576552690124347958818,3573650369991544326469262,49774528627191496222610866,693269750410689402790082878,9656001977122460142838549442,134490757929303752596949609326,1873214609033130076214455981138,26090513768534517314405434126622 mov $2,1 lpb $0 sub $0,1 mov $1,$3 mul $1,12 add $2,10 add $2,$1 add $3,$2 lpe mov $0,$3 mul $0,4 add $0,2
Data/Array/Skew.agda
oisdk/agda-playground
6
6446
<reponame>oisdk/agda-playground {-# OPTIONS --cubical --safe #-} module Data.Array.Skew where open import Prelude open import Data.Binary.Skew open import Data.List open import Data.Nat using (_+_) private variable p : Level P : ℕ → Type p n : ℕ ns : 𝔹 infixl 6 _∔_ _∔_ : ℕ → ℕ → ℕ zero ∔ m = m suc n ∔ m = n ∔ suc m infixl 4 _⊕_ _⊕_ : (ℕ → Type p) → ℕ → ℕ → Type p _⊕_ P n m = P (n ∔ m) data Spine⁺ {p} (P : ℕ → Type p) : 𝔹 → Type p where nil : Spine⁺ P [] conss : ∀ n → P n → Spine⁺ (P ⊕ suc n) ns → Spine⁺ P (n ∷ ns) data Spine {p} (P : ℕ → Type p) : 𝔹 → Type p where nil : Spine P [] conss : ∀ n → P n → Spine⁺ (P ⊕ n) ns → Spine P (n ∷ ns) -- cons : (∀ {m} → P m → P m → P (suc m)) → P zero → Spine P ns → Spine P (inc ns) -- cons _*_ x nil = conss zero x nil -- cons _*_ x (conss n x₁ nil) = conss zero x (conss n x₁ nil) -- cons _*_ x (conss n x₁ (conss zero x₂ xs)) = conss (suc n) (x₁ * x₁) xs -- cons _*_ x (conss n x₁ (conss (suc m) x₂ xs)) = conss zero x (conss n x₁ (conss m x₂ {!!}))
DEVONthink/PrefixRecordWithCustomDate.scpt
dnordgren/dotfiles
1
4680
on performSmartRule(theRecords) tell application id "DNtp" repeat with theRecord in theRecords -- Record's creation date, as date object set recordDate to (creation date of theRecord) -- Format day set recordDay to (day of recordDate) as integer if recordDay < 10 then set recordDay to ("0" & recordDay) set recordDay to recordDay as string -- Format month set recordMonth to (month of recordDate) as integer if recordMonth < 10 then set recordMonth to ("0" & recordMonth) set recordMonth to recordMonth as string -- Format year set recordYear to (year of recordDate) set recordShortYear to (characters 3 thru 4 of (recordYear as string)) as string set formattedRecordDate to (recordShortYear & recordMonth & recordDay) set name of theRecord to (formattedRecordDate & " " & (name of theRecord)) end repeat end tell end performSmartRule
data/mapObjects/daycarem.asm
longlostsoul/EvoYellow
16
102104
DayCareMObject: db $a ; border block db $2 ; warps db $7, $2, $4, $ff db $7, $3, $4, $ff db $0 ; signs db $2 ; objects object SPRITE_GENTLEMAN, $2, $3, STAY, RIGHT, $1 ; person object SPRITE_LASS, $3, $2, STAY, RIGHT, $2 ; person ; warp-to EVENT_DISP DAYCAREM_WIDTH, $7, $2 EVENT_DISP DAYCAREM_WIDTH, $7, $3
src/STLC/Coquand/Completeness.agda
mietek/coquand-kovacs
0
7735
{-# OPTIONS --no-positivity-check #-} module STLC.Coquand.Completeness where open import STLC.Coquand.Normalisation public open import STLC.Coquand.Convertibility public -------------------------------------------------------------------------------- data CV : ∀ {Γ A} → Γ ⊢ A → Γ ⊩ A → Set where cv⎵ : ∀ {Γ} → {M : Γ ⊢ ⎵} {f : Γ ⊩ ⎵} → (h : ∀ {Γ′} → (η : Γ′ ∋⋆ Γ) → sub ⌊ η ⌋ M ∼ ⟦g⟧⟨ η ⟩ f) → CV M f cv⊃ : ∀ {Γ A B} → {M : Γ ⊢ A ⇒ B} {f : Γ ⊩ A ⇒ B} → (h : ∀ {Γ′ N a} → (η : Γ′ ∋⋆ Γ) → CV N a → CV (sub ⌊ η ⌋ M ∙ N) (f ⟦∙⟧⟨ η ⟩ a)) → CV M f data CV⋆ : ∀ {Γ Ξ} → Γ ⊢⋆ Ξ → Γ ⊩⋆ Ξ → Set where ∅ : ∀ {Γ} → {σ : Γ ⊢⋆ ∅} → CV⋆ σ ∅ _,_ : ∀ {Γ Ξ A} → {σ : Γ ⊢⋆ Ξ , A} {ρ : Γ ⊩⋆ Ξ} {a : Γ ⊩ A} → (κ : CV⋆ (σ ◐ wkᵣ {A} idᵣ) ρ) (k : CV (sub σ 0) a) → CV⋆ σ (ρ , a) -------------------------------------------------------------------------------- postulate congCV : ∀ {Γ A} → {M₁ M₂ : Γ ⊢ A} {a : Γ ⊩ A} → M₁ ∼ M₂ → CV M₁ a → CV M₂ a -- (cong↑⟨_⟩CV) postulate accCV : ∀ {Γ Γ′ A} → {M : Γ ⊢ A} {a : Γ ⊩ A} → (η : Γ′ ∋⋆ Γ) → CV M a → CV (sub ⌊ η ⌋ M) (acc η a) -- (conglookupCV) postulate getCV : ∀ {Γ Ξ A} → {σ : Γ ⊢⋆ Ξ} {ρ : Γ ⊩⋆ Ξ} → (i : Ξ ∋ A) → CV⋆ σ ρ → CV (sub σ (𝓋 i)) (getᵥ ρ i) -- (cong↑⟨_⟩CV⋆) postulate accCV⋆ : ∀ {Γ Γ′ Ξ} → {σ : Γ ⊢⋆ Ξ} {ρ : Γ ⊩⋆ Ξ} → (η : Γ′ ∋⋆ Γ) → CV⋆ σ ρ → CV⋆ (η ◑ σ) (η ⬗ ρ) -- (cong↓⟨_⟩CV⋆) postulate getCV⋆ : ∀ {Γ Ξ Ξ′} → {σ : Γ ⊢⋆ Ξ′} {ρ : Γ ⊩⋆ Ξ′} → (η : Ξ′ ∋⋆ Ξ) → CV⋆ σ ρ → CV⋆ (σ ◐ η) (ρ ⬖ η) -------------------------------------------------------------------------------- -- Lemma 8. postulate ⟦_⟧CV : ∀ {Γ Ξ A} → {σ : Γ ⊢⋆ Ξ} {ρ : Γ ⊩⋆ Ξ} → (M : Ξ ⊢ A) → CV⋆ σ ρ → CV (sub σ M) (⟦ M ⟧ ρ) postulate ⟦_⟧CV⋆ : ∀ {Γ Ξ Φ} → {σ₁ : Γ ⊢⋆ Ξ} {ρ : Γ ⊩⋆ Ξ} → (σ₂ : Ξ ⊢⋆ Φ) → CV⋆ σ₁ ρ → CV⋆ (σ₁ ● σ₂) (⟦ σ₂ ⟧⋆ ρ) -------------------------------------------------------------------------------- -- Lemma 9. mutual postulate lem₉ : ∀ {Γ A} → {M : Γ ⊢ A} {a : Γ ⊩ A} → CV M a → M ∼ reify a postulate aux₄₆₈ : ∀ {A Γ} → {M : Γ ⊢ A} {f : ∀ {Γ′} → Γ′ ∋⋆ Γ → Γ′ ⊢ A} → (∀ {Γ′} → (η : Γ′ ∋⋆ Γ) → sub ⌊ η ⌋ M ∼ f η) → CV M (⟪ f ⟫) postulate ⌊_⌋CV⋆ : ∀ {Γ Γ′} → (η : Γ′ ∋⋆ Γ) → CV⋆ ⌊ η ⌋ ⌊ η ⌋ᵥ idCV⋆ : ∀ {Γ} → CV⋆ ⌊ idᵣ ⌋ (idᵥ {Γ}) idCV⋆ = ⌊ idᵣ ⌋CV⋆ postulate aux₄₆₉ : ∀ {Γ A} → (M : Γ ⊢ A) → sub ⌊ idᵣ ⌋ M ∼ nf M -------------------------------------------------------------------------------- -- Theorem 2. postulate thm₂ : ∀ {Γ A} → (M : Γ ⊢ A) → M ∼ nf M -- Theorem 3. thm₃ : ∀ {Γ A} → (M₁ M₂ : Γ ⊢ A) → Eq (⟦ M₁ ⟧ idᵥ) (⟦ M₂ ⟧ idᵥ) → M₁ ∼ M₂ thm₃ M₁ M₂ e = thm₂ M₁ ⦙ ≡→∼ (cor₁ M₁ M₂ e) ⦙ thm₂ M₂ ⁻¹ --------------------------------------------------------------------------------
judgemental-inconsistency.agda
hazelgrove/agda-popl17
14
15457
open import Nat open import Prelude open import core module judgemental-inconsistency where data incon : τ̇ → τ̇ → Set where ICNumArr1 : {t1 t2 : τ̇} → incon num (t1 ==> t2) ICNumArr2 : {t1 t2 : τ̇} → incon (t1 ==> t2) num ICArr1 : {t1 t2 t3 t4 : τ̇} → incon t1 t3 → incon (t1 ==> t2) (t3 ==> t4) ICArr2 : {t1 t2 t3 t4 : τ̇} → incon t2 t4 → incon (t1 ==> t2) (t3 ==> t4) -- inconsistency is symmetric inconsym : ∀ {t1 t2} → incon t1 t2 → incon t2 t1 inconsym ICNumArr1 = ICNumArr2 inconsym ICNumArr2 = ICNumArr1 inconsym (ICArr1 x) = ICArr1 (inconsym x) inconsym (ICArr2 x) = ICArr2 (inconsym x) --inconsistency isn't reflexive incon-nrefl : ∀{t} → incon t t → ⊥ incon-nrefl (ICArr1 x) = incon-nrefl x incon-nrefl (ICArr2 x) = incon-nrefl x -- first half of iso to~̸ : (t1 t2 : τ̇) → incon t1 t2 → t1 ~̸ t2 to~̸ .num ._ ICNumArr1 () to~̸ ._ .num ICNumArr2 () to~̸ ._ ._ (ICArr1 incon) TCRefl = abort (incon-nrefl incon) to~̸ ._ ._ (ICArr1 incon) (TCArr x x₁) = to~̸ _ _ incon x to~̸ ._ ._ (ICArr2 incon) TCRefl = abort (incon-nrefl incon) to~̸ ._ ._ (ICArr2 incon) (TCArr x x₁) = (to~̸ _ _ incon x₁) -- second half of iso from~̸ : (t1 t2 : τ̇) → t1 ~̸ t2 → incon t1 t2 from~̸ num (t2 ==> t3) ncon = ICNumArr1 from~̸ (t1 ==> t2) num ncon = ICNumArr2 from~̸ (t1 ==> t2) (t3 ==> t4) ncon with ~dec t1 t3 ... | Inl qq = ICArr2 (from~̸ t2 t4 (λ x → ncon (TCArr qq x))) ... | Inr qq = ICArr1 (from~̸ _ _ qq) -- the remaining consistent types all lead to absurdities from~̸ num num ncon = abort (ncon TCRefl) from~̸ num ⦇-⦈ ncon = abort (ncon TCHole1) from~̸ ⦇-⦈ num ncon = abort (ncon TCHole2) from~̸ ⦇-⦈ ⦇-⦈ ncon = abort (ncon TCRefl) from~̸ ⦇-⦈ (t2 ==> t3) ncon = abort (ncon TCHole2) from~̸ (t1 ==> t2) ⦇-⦈ ncon = abort (ncon TCHole1) -- need to display that at least one of the round-trips above is stable -- for this to be structure preserving and really an iso. rt1 : (t1 t2 : τ̇) → (x : t1 ~̸ t2) → (to~̸ t1 t2 (from~̸ t1 t2 x)) == x rt1 num (t2 ==> t3) x = funext (λ x₁ → abort (x x₁)) rt1 (t1 ==> t2) num x = funext (λ x₁ → abort (x x₁)) rt1 (t1 ==> t2) (t3 ==> t4) x = funext (λ x₁ → abort (x x₁)) rt1 num num x = abort (x TCRefl) rt1 num ⦇-⦈ x = abort (x TCHole1) rt1 ⦇-⦈ num x = abort (x TCHole2) rt1 ⦇-⦈ ⦇-⦈ x = abort (x TCRefl) rt1 ⦇-⦈ (t2 ==> t3) x = abort (x TCHole2) rt1 (t1 ==> t2) ⦇-⦈ x = abort (x TCHole1) -- if inconsistency at arrows is proof-irrelevant, then all of -- inconsistency is proof-irrelevant incon-irrelev : (arr-incon-irrelev : {t1 t2 t3 t4 : τ̇} (x y : incon (t1 ==> t2) (t3 ==> t4)) → x == y) → (t1 t2 : τ̇) (x y : incon t1 t2) → x == y incon-irrelev arr-incon-irrelev .num _ ICNumArr1 ICNumArr1 = refl incon-irrelev arr-incon-irrelev _ .num ICNumArr2 ICNumArr2 = refl incon-irrelev arr-incon-irrelev _ _ (ICArr1 x) (ICArr1 y) = ap1 ICArr1 (incon-irrelev arr-incon-irrelev _ _ x y) incon-irrelev arr-incon-irrelev _ _ (ICArr1 x) (ICArr2 y) = arr-incon-irrelev (ICArr1 x) (ICArr2 y) incon-irrelev arr-incon-irrelev _ _ (ICArr2 x) (ICArr1 y) = arr-incon-irrelev (ICArr2 x) (ICArr1 y) incon-irrelev arr-incon-irrelev _ _ (ICArr2 x) (ICArr2 y) = ap1 ICArr2 (incon-irrelev arr-incon-irrelev _ _ x y ) -- if inconsistency at arrows is proof-irrelevant, then the round trip is -- stable up to equality rt2 : (arr-incon-irrelev : {t1 t2 t3 t4 : τ̇} (x y : incon (t1 ==> t2) (t3 ==> t4)) → x == y) → (t1 t2 : τ̇) → (x : incon t1 t2) → (from~̸ t1 t2 (to~̸ t1 t2 x)) == x rt2 arr-incon-irrelev .num _ ICNumArr1 = refl rt2 arr-incon-irrelev _ .num ICNumArr2 = refl rt2 arr-incon-irrelev (t1 ==> t2) (t3 ==> t4) (ICArr1 x) with ~dec t1 t3 rt2 arr-incon-irrelev (t1 ==> t2) (t3 ==> t4) (ICArr1 x₁) | Inl x = abort (to~̸ t1 t3 x₁ x) rt2 arr-incon-irrelev (t1 ==> t2) (t3 ==> t4) (ICArr1 x₁) | Inr x = ap1 ICArr1 (incon-irrelev arr-incon-irrelev t1 t3 (from~̸ t1 t3 x) x₁) rt2 arr-incon-irrelev (t1 ==> t2) (t3 ==> t4) (ICArr2 x) with ~dec t1 t3 rt2 arr-incon-irrelev (t1 ==> t2) (t3 ==> t4) (ICArr2 x₁) | Inl x = ap1 ICArr2 (incon-irrelev arr-incon-irrelev t2 t4 (from~̸ t2 t4 (to~̸ t2 t4 x₁)) x₁) rt2 arr-incon-irrelev (t1 ==> t2) (t3 ==> t4) (ICArr2 x₁) | Inr x = arr-incon-irrelev (ICArr1 (from~̸ t1 t3 x)) (ICArr2 x₁) -- if inconsistency at arrows is proof-irrelevant, then the two -- defintions of inconsistency are isomorphic incon-iso : (arr-incon-irrelev : {t1 t2 t3 t4 : τ̇} (x y : incon (t1 ==> t2) (t3 ==> t4)) → x == y) → (t1 t2 : τ̇) → (incon t1 t2) ≃ (t1 ~̸ t2) incon-iso arr-incon-irrelev t1 t2 = (to~̸ t1 t2) , (from~̸ t1 t2) , (rt2 arr-incon-irrelev t1 t2) , (rt1 t1 t2)
6 Polymorphic Shellcode/tiny.nasm
kecebon9/slae32
0
98680
; http://shell-storm.org/shellcode/files/shellcode-841.php ; 21 bytes global _start _start: xor ecx,ecx mul ecx mov al,0xb push ecx push dword 0x68732f2f push dword 0x6e69622f mov ebx,esp int 0x80
programs/oeis/004/A004125.asm
karttu/loda
0
93824
<reponame>karttu/loda<gh_stars>0 ; A004125: Sum of remainders of n mod k, for k = 1, 2, 3, ..., n. ; 0,0,1,1,4,3,8,8,12,13,22,17,28,31,36,36,51,47,64,61,70,77,98,85,103,112,125,124,151,138,167,167,184,197,218,198,233,248,269,258,297,284,325,328,339,358,403,374,414,420,449,454,505,492,529,520,553,578,635,586,645,672,693,693,738,725,790,799,840,835,904,852,923,956,981,992,1049,1036,1113,1086,1126,1163,1244,1187,1248,1287,1340,1335,1422,1367,1436,1451,1508,1551,1620,1559,1654,1678,1719,1701,1800,1787,1888,1885,1902,1951,2056,1991,2098,2101,2170,2145,2256,2243,2328,2349,2400,2455,2548,2427,2535,2592,2669,2692,2785,2724,2849,2849,2930,2937,3066,2993,3098,3161,3190,3191,3326,3313,3450,3393,3482,3549,3666,3550,3659,3728,3793,3822,3969,3896,4045,4048,4119,4138,4255,4174,4329,4404,4505,4446,4575,4535,4696,4729,4770,4849,5014,4869,5023,5038,5119,5154,5325,5312,5413,5392,5505,5590,5767,5580,5759,5786,5903,5910,6051,6038,6195,6234,6291,6310,6499,6374,6565,6658,6711,6703,6898,6825,7022,6956,7085,7182,7347,7250,7407,7506,7607,7588,7765,7608,7817,7862,7999,8102,8267,8098,8275,8380,8521,8456,8645,8632,8853,8796,8842,8951,9176,9071,9298,9325,9402,9415,9646,9567,9748,9799,9952,9995,10232,9967,10206,10290,10411,10464,10611,10598,10811,10826,10987,11018 lpb $0,1 add $1,1 mov $3,$0 sub $0,1 sub $1,1 add $2,1 mod $3,$2 add $1,$3 lpe
oeis/175/A175559.asm
neoneye/loda-programs
11
162890
<reponame>neoneye/loda-programs<filename>oeis/175/A175559.asm ; A175559: Digit sum of 167^n. ; Submitted by <NAME> ; 1,14,34,35,49,65,73,77,70,80,121,119,136,131,106,143,148,182,136,176,169,251,220,209,244,257,268,233,265,335,298,329,349,332,373,389,343,374,331,350,355,371,433,428,430,476,463,488,451,473,529,530,463,569,514,545,583,593,562,596,586,635,601,647,598,695,649,662,718,647,742,713,685,725,709,755,742,884,775,851,790 seq $0,175558 ; a(n) = 167^n. seq $0,7953 ; Digital sum (i.e., sum of digits) of n; also called digsum(n).
test-resources/ExamplesFromRoy/md_example4-nested.ads
hergin/ada2fuml
0
14890
<filename>test-resources/ExamplesFromRoy/md_example4-nested.ads<gh_stars>0 package Md_Example4.Nested is type T is new Md_Example4.T with record Child_Attribute : Globals_Example1.Itype; end record; procedure Do_It (The_T : T); end Md_Example4.Nested;
programs/edit.asm
informer2016/MichalOS
0
103799
<gh_stars>0 ; ------------------------------------------------------------------ ; MichalOS Text Editor ; ------------------------------------------------------------------ BITS 16 %INCLUDE "michalos.inc" ORG 100h start: call setup_screen cmp si, 0 ; Were we passed a filename? je .no_param_passed call os_string_tokenize ; If so, get it from params mov di, filename ; Save file for later usage call os_string_copy mov ax, si mov cx, 4096 call os_load_file ; Load the file 4K after the program start point jnc file_load_success .error: mov ax, file_load_fail_msg ; If fail, show message and exit mov bx, 0 mov cx, 0 mov dx, 0 call os_dialog_box call os_clear_screen ret ; Back to the OS .no_param_passed: mov si, untitled mov di, userfile call os_string_copy mov bx, 0 jmp file_load_success file_chosen: mov si, ax ; Save it for later usage mov di, filename call os_string_copy ; Now we need to make sure that the file extension is TXT or BAS... mov di, ax call os_string_length add di, ax dec di ; Make DI point to last char in filename dec di dec di mov si, txt_extension ; Check for .TXT extension mov cx, 3 rep cmpsb je valid_extension dec di mov si, bas_extension ; Check for .BAS extension mov cx, 3 rep cmpsb je valid_extension mov dx, 0 mov ax, wrong_ext_msg mov bx, 0 mov cx, 0 call os_dialog_box mov si, 0 jmp start valid_extension: mov ax, filename mov cx, 4096 ; Load the file 4K after the program start point call os_load_file file_load_success: mov word [filesize], bx ; Now BX contains the number of bytes in the file, so let's add ; the load offset to get the last byte of the file in RAM add bx, 4096 cmp bx, 4096 jne .not_empty mov byte [bx], 10 ; If the file is empty, insert a newline char to start with inc bx inc word [filesize] .not_empty: mov word [last_byte], bx ; Store position of final data byte mov cx, 0 ; Lines to skip when rendering (scroll marker) mov word [skiplines], 0 mov byte [cursor_x], 0 ; Initial cursor position will be start of text mov byte [cursor_y], 2 ; The file starts being displayed on line 2 of the screen ; Now we need to display the text on the screen; the following loop is called ; whenever the screen scrolls, but not just when the cursor is moved render_text: call update_screen mov dl, 0 mov dh, 1 call os_move_cursor mov ah, 09h mov al, ' ' mov bl, 240 mov bh, 0 mov cx, 1840 int 10h mov dh, 2 ; Move cursor to near top mov dl, 0 call os_move_cursor mov si, 4096 ; Point to start of text data mov ah, 0Eh ; BIOS char printing routine mov word cx, [skiplines] ; We're now going to skip lines depending on scroll level redraw: cmp cx, 0 ; Do we have any lines to skip? je display_loop ; If not, start the displaying dec cx ; Otherwise work through the lines .skip_loop: lodsb ; Read bytes until newline, to skip a line cmp al, 10 jne .skip_loop ; Move on to next line jmp redraw display_loop: ; Now we're ready to display the text lodsb ; Get character from file data cmp al, 10 ; Go to start of line if it's a carriage return character jne skip_return call os_get_cursor_pos mov dl, 0 ; Set DL = 0 (column = 0) call os_move_cursor skip_return: call os_get_cursor_pos ; Don't wrap lines on screen cmp dl, 79 je .no_print int 10h ; Print the character via the BIOS .no_print: mov word bx, [last_byte] cmp si, bx ; Have we printed all characters in the file? je near get_input call os_get_cursor_pos ; Are we at the bottom of the display area? cmp dh, 23 je get_input ; Wait for keypress if so jmp display_loop ; If not, keep rendering the characters ; When we get here, now we've displayed the text on the screen, and it's time ; to put the cursor at the position set by the user (not where it has been ; positioned after the text rendering), and get input get_input: ; call showbytepos ; USE FOR DEBUGGING (SHOWS CURSOR INFO AT TOP-RIGHT) mov byte dl, [cursor_x] ; Move cursor to user-set position mov byte dh, [cursor_y] call os_move_cursor call os_wait_for_key ; Get input cmp ah, KEY_UP ; Cursor key pressed? je near go_up cmp ah, KEY_DOWN je near go_down cmp ah, KEY_LEFT je near go_left cmp ah, KEY_RIGHT je near go_right cmp ah, 71 ; Home key je near go_home cmp ah, 79 je near go_end cmp al, KEY_ESC ; Quit if Esc pressed je near close jmp text_entry ; Otherwise it was probably a text entry char ; ------------------------------------------------------------------ ; Move cursor left on the screen, and backward in data bytes go_home: cmp byte [cursor_x], 0 ; Are we at the start of a line? je .cant_move_left dec byte [cursor_x] ; If not, move cursor and data position dec word [cursor_byte] jmp go_home .cant_move_left: jmp get_input ; ------------------------------------------------------------------ ; Move cursor left on the screen, and backward in data bytes go_left: cmp byte [cursor_x], 0 ; Are we at the start of a line? je .cant_move_left dec byte [cursor_x] ; If not, move cursor and data position dec word [cursor_byte] .cant_move_left: jmp get_input ; ------------------------------------------------------------------ ; Move cursor right on the screen, and forward in data bytes go_right: pusha cmp byte [cursor_x], 79 ; Far right of display? je .nothing_to_do ; Don't do anything if so mov word ax, [cursor_byte] mov si, 4096 add si, ax ; Now SI points to the char under the cursor inc si cmp word si, [last_byte] ; Can't move right if we're at the last byte of data je .nothing_to_do dec si cmp byte [si], 0Ah ; Can't move right if we are on a newline character je .nothing_to_do inc word [cursor_byte] ; Move data byte position and cursor location forwards inc byte [cursor_x] .nothing_to_do: popa jmp get_input ; ------------------------------------------------------------------ ; Move cursor right on the screen, and forward in data bytes go_end: pusha .loop: cmp byte [cursor_x], 79 ; Far right of display? je .nothing_to_do ; Don't do anything if so mov word ax, [cursor_byte] mov si, 4096 add si, ax ; Now SI points to the char under the cursor inc si cmp word si, [last_byte] ; Can't move right if we're at the last byte of data je .nothing_to_do dec si cmp byte [si], 0Ah ; Can't move right if we are on a newline character je .nothing_to_do inc word [cursor_byte] ; Move data byte position and cursor location forwards inc byte [cursor_x] jmp .loop .nothing_to_do: popa jmp get_input ; ------------------------------------------------------------------ ; Move cursor down on the screen, and forward in data bytes go_down: ; First up, let's work out which character in the RAM file data ; the cursor will point to when we try to move down pusha mov word cx, [cursor_byte] mov si, 4096 add si, cx ; Now SI points to the char under the cursor .loop: inc si cmp word si, [last_byte] ; Is it pointing to the last byte in the data? je .do_nothing ; Quit out if so dec si lodsb ; Otherwise grab a character from the data inc cx ; Move our position along cmp al, 0Ah ; Look for newline char jne .loop ; Keep trying until we find a newline char mov word [cursor_byte], cx .nowhere_to_go: popa cmp byte [cursor_y], 22 ; If down pressed and cursor at bottom, scroll view down je .scroll_file_down inc byte [cursor_y] ; If down pressed elsewhere, just move the cursor mov byte [cursor_x], 0 ; And go to first column in next line jmp render_text .scroll_file_down: inc word [skiplines] ; Increment the lines we need to skip mov byte [cursor_x], 0 ; And go to first column in next line jmp render_text ; Redraw the whole lot .do_nothing: popa jmp render_text ; ------------------------------------------------------------------ ; Move cursor up on the screen, and backward in data bytes go_up: pusha mov word cx, [cursor_byte] mov si, 4096 add si, cx ; Now SI points to the char under the cursor cmp si, 4096 ; Do nothing if we're already at the start of the file je .start_of_file mov byte al, [si] ; Is the cursor already on a newline character? cmp al, 0Ah je .starting_on_newline jmp .full_monty ; If not, go back two newline chars .starting_on_newline: cmp si, 4097 je .start_of_file cmp byte [si-1], 0Ah ; Is the char before this one a newline char? je .another_newline_before dec si dec cx jmp .full_monty .another_newline_before: ; And the one before that a newline char? cmp byte [si-2], 0Ah jne .go_to_start_of_line ; If so, it means that the user pressed up on a newline char with another newline ; char above, so we just want to move back to that one, and do nothing else dec word [cursor_byte] jmp .display_move .go_to_start_of_line: dec si dec cx cmp si, 4096 je .start_of_file dec si dec cx cmp si, 4096 ; Do nothing if we're already at the start of the file je .start_of_file jmp .loop2 .full_monty: cmp si, 4096 je .start_of_file mov byte al, [si] cmp al, 0Ah ; Look for newline char je .found_newline dec cx dec si jmp .full_monty .found_newline: dec si dec cx .loop2: cmp si, 4096 je .start_of_file mov byte al, [si] cmp al, 0Ah ; Look for newline char je .found_done dec cx dec si jmp .loop2 .found_done: inc cx mov word [cursor_byte], cx jmp .display_move .start_of_file: mov word [cursor_byte], 0 mov byte [cursor_x], 0 .display_move: popa cmp byte [cursor_y], 2 ; If up pressed and cursor at top, scroll view up je .scroll_file_up dec byte [cursor_y] ; If up pressed elsewhere, just move the cursor mov byte [cursor_x], 0 ; And go to first column in previous line jmp get_input .scroll_file_up: cmp word [skiplines], 0 ; Don't scroll view up if we're at the top jle get_input dec word [skiplines] ; Otherwise decrement the lines we need to skip jmp render_text ; ------------------------------------------------------------------ ; When an key (other than cursor keys or Esc) is pressed... text_entry: pusha cmp ah, 3Bh ; F1 pressed? je near .f1_pressed cmp ah, 3Ch ; F2 pressed? je near .f2_pressed cmp ah, 3Fh ; F5 pressed? je near .f5_pressed cmp ah, 53h ; Delete? je near .delete_pressed cmp al, 8 je near .backspace_pressed cmp al, 13 je near .enter_pressed cmp al, 14 ; Ctrl+N je near new_file cmp al, 15 ; Ctrl+O je near load_file cmp al, 19 ; Ctrl+S je near save_file cmp ax, 1F00h ; Alt+S je near save_new_file cmp al, 17 ; Ctrl+Q je near close_file call os_get_cursor_pos cmp dl, 77 jng near .end_of_line push ax call move_all_chars_forward mov word cx, [cursor_byte] mov si, 4096 add si, cx ; Now SI points to the char under the cursor pop ax mov byte [si], al inc word [cursor_byte] inc byte [cursor_x] jmp near .enter_pressed .end_of_line: push ax call move_all_chars_forward mov word cx, [cursor_byte] mov si, 4096 add si, cx ; Now SI points to the char under the cursor pop ax mov byte [si], al inc word [cursor_byte] inc byte [cursor_x] .nothing_to_do: popa jmp render_text .f1_pressed: mov ax, chooselist mov bx, 14 call os_option_menu jc .nothing_to_do cmp ax, 1 je new_file cmp ax, 2 je load_file cmp ax, 3 je save_file cmp ax, 4 je save_new_file jmp close_file .delete_pressed: mov si, 4097 add si, word [cursor_byte] cmp si, word [last_byte] je .end_of_file cmp byte [si], 00h jl .not_at_final_char_in_line cmp byte [si], 0Ah jl .at_final_char_in_line .not_at_final_char_in_line: call move_all_chars_backward popa jmp render_text .at_final_char_in_line: call move_all_chars_backward ; Char and newline character too call move_all_chars_backward ; Char and newline character too popa jmp render_text .backspace_pressed: cmp word [cursor_byte], 0 je .nothing_to_do cmp byte [cursor_x], 0 je .nothing_to_do dec word [cursor_byte] dec byte [cursor_x] mov si, 4096 add si, word [cursor_byte] cmp si, word [last_byte] je .end_of_file cmp byte [si], 00h jl .not_at_final_char_in_line2 cmp byte [si], 0Ah ; Thanks, little endian! jl .at_final_char_in_line2 .not_at_final_char_in_line2: call move_all_chars_backward popa jmp render_text .at_final_char_in_line2: call move_all_chars_backward ; Char and newline character too call move_all_chars_backward ; Char and newline character too popa jmp render_text .end_of_file: popa jmp render_text .enter_pressed: call move_all_chars_forward mov word cx, [cursor_byte] mov di, 4096 add di, cx ; Now SI points to the char under the cursor mov byte [di], 0Ah ; Add newline char popa jmp go_down .f2_pressed: ; Cut line cmp byte [cursor_x], 0 je .done_going_left dec byte [cursor_x] dec word [cursor_byte] jmp .f2_pressed .done_going_left: mov si, 4096 add si, word [cursor_byte] inc si cmp si, word [last_byte] je .do_nothing_here dec si cmp byte [si], 10 je .final_char call move_all_chars_backward jmp .done_going_left .final_char: call move_all_chars_backward .do_nothing_here: popa jmp render_text .f5_pressed: ; Run BASIC mov word ax, [filesize] cmp ax, 4 jl .not_big_enough call os_clear_screen mov ax, 4096 mov si, 0 mov word bx, [filesize] call os_run_basic call os_print_newline mov si, .basic_finished_msg call os_print_string call os_wait_for_key call os_show_cursor mov al, 0 mov [0082h], al call setup_screen popa jmp render_text .not_big_enough: mov ax, .fail1_msg mov bx, 0 mov cx, 0 mov dx, 0 call os_dialog_box popa jmp render_text .basic_finished_msg db 'BASIC program ended', 0 .fail1_msg db 'At least an END command is required to run BASIC.', 0 ; ------------------------------------------------------------------ ; Move data from current cursor one character ahead move_all_chars_forward: pusha mov si, 4096 add si, word [filesize] ; SI = final byte in file mov di, 4096 add di, word [cursor_byte] .loop: mov byte al, [si] mov byte [si+1], al dec si cmp si, di jl .finished jmp .loop .finished: inc word [filesize] inc word [last_byte] popa ret ; ------------------------------------------------------------------ ; Move data from current cursor + 1 to end of file back one char move_all_chars_backward: pusha mov si, 4096 add si, word [cursor_byte] .loop: mov byte al, [si+1] mov byte [si], al inc si cmp word si, [last_byte] jne .loop .finished: dec word [filesize] dec word [last_byte] popa ret ; ------------------------------------------------------------------ ; LOAD FILE load_file: popa call os_file_selector jc render_text mov si, ax mov di, userfile call os_string_copy jmp file_chosen ; ------------------------------------------------------------------ ; SAVE FILE save_file: mov si, userfile mov di, untitled call os_string_compare jc save_new_file mov ax, filename ; Delete the file if it already exists call os_remove_file jc .no_delete mov ax, filename mov word cx, [filesize] mov bx, 4096 call os_write_file jc .failure ; If we couldn't save file... mov ax, file_save_succeed_msg mov bx, 0 mov cx, 0 mov dx, 0 call os_dialog_box popa jmp render_text .no_delete: mov ax, .delete_failed mov bx, file_save_fail_msg2 mov cx, 0 mov dx, 0 call os_dialog_box popa jmp render_text .failure: mov ax, file_save_fail_msg1 mov bx, file_save_fail_msg2 mov cx, 0 mov dx, 0 call os_dialog_box popa jmp render_text .delete_failed db 'Error deleting the previous file.', 0 ; ------------------------------------------------------------------ ; SAVE AS A NEW FILE save_new_file: mov ax, newname mov bx, new_file_msg call os_input_dialog mov ax, newname call os_string_uppercase mov si, newname mov di, userfile call os_string_copy mov ax, newname mov word cx, [filesize] mov bx, 4096 call os_write_file jc .failure ; If we couldn't save file... mov ax, file_save_succeed_msg mov bx, 0 mov cx, 0 mov dx, 0 call os_dialog_box popa jmp render_text .failure: mov ax, file_save_fail_msg1 mov bx, file_save_fail_msg2 mov cx, 0 mov dx, 0 call os_dialog_box popa jmp render_text ; ------------------------------------------------------------------ ; NEW FILE new_file: mov ax, confirm_msg mov bx, confirm_msg1 mov cx, 0 mov dx, 1 call os_dialog_box cmp ax, 1 je .do_nothing mov di, 4096 ; Clear the entire text buffer mov al, 0 mov cx, 28672 rep stosb mov word [filesize], 1 mov bx, 4096 ; Store just a single newline char mov byte [bx], 10 inc bx mov word [last_byte], bx mov cx, 0 ; Reset other values mov word [skiplines], 0 mov byte [cursor_x], 0 mov byte [cursor_y], 2 mov word [cursor_byte], 0 .retry_filename: mov ax, filename mov bx, new_file_msg call os_input_dialog call os_string_uppercase mov si, filename mov di, userfile call os_string_copy mov ax, filename ; Delete the file if it already exists call os_remove_file mov ax, filename mov word cx, [filesize] mov bx, 4096 call os_write_file jc .failure ; If we couldn't save file... .do_nothing: popa jmp render_text .failure: mov ax, file_save_fail_msg1 mov bx, file_save_fail_msg2 mov cx, 0 mov dx, 0 call os_dialog_box jmp .retry_filename ; ------------------------------------------------------------------ ; Quit close: call os_clear_screen ret close_file: popa call os_clear_screen ret ; ------------------------------------------------------------------ ; Setup screen with colours, titles and horizontal lines setup_screen: pusha mov ax, txt_title_msg ; Set up the screen with info at top and bottom mov bx, txt_footer_msg mov cx, BLACK_ON_WHITE call os_draw_background mov dl, 24 mov dh, 0 call os_move_cursor mov si, userfile call os_print_string popa ret update_screen: pusha mov bl, BLACK_ON_WHITE mov dx, 0200h mov si, 80 mov di, 23 call os_draw_block mov dl, 24 mov dh, 0 call os_move_cursor mov si, userfile call os_print_string mov si, userfile mov di, untitled call os_string_compare jc .exit mov ax, userfile call os_string_length mov dl, 24 add dl, al mov dh, 0 call os_move_cursor mov ah, 09h mov al, 20h mov bh, 00h mov bl, 70h mov cx, 18h int 10h .exit: popa ret ; ------------------------------------------------------------------ ; DEBUGGING -- SHOW POSITION OF BYTE IN FILE AND CHAR UNDERNEATH CURSOR ; ENABLE THIS IN THE get_input SECTION ABOVE IF YOU NEED IT showbytepos: pusha mov word ax, [cursor_byte] call os_int_to_string mov si, ax mov dh, 0 mov dl, 60 call os_move_cursor call os_print_string call os_print_space mov si, 4096 add si, word [cursor_byte] lodsb call os_print_2hex call os_print_space mov ah, 0Eh int 10h call os_print_space popa ret ; ------------------------------------------------------------------ ; Data section txt_title_msg db 'MichalOS Text Editor - ', 0 txt_footer_msg db '[F1] File [F2] Delete a line [F5] Run BASIC', 0 txt_extension db 'TXT', 0 bas_extension db 'BAS', 0 wrong_ext_msg db 'Invalid file type (TXT/BAS only)!', 0 confirm_msg db 'Are you sure? All unsaved changes will', 0 confirm_msg1 db 'be lost!', 0 file_load_fail_msg db 'Error loading the file!', 0 new_file_msg db 'Choose a new filename (DOCUMENT.TXT):', 0 file_save_fail_msg1 db 'Error saving the file!', 0 file_save_fail_msg2 db '(Invalid filename/disk is read-only?)', 0 file_save_succeed_msg db 'File saved.', 0 chooselist db 'New,Open...,Save,Save as...,Exit', 0 untitled db 'Unnamed document', 0 userfile times 32 db 0 newname times 32 db 0 skiplines dw 0 cursor_x db 0 ; User-set cursor position cursor_y db 0 cursor_byte dw 0 ; Byte in file data where cursor is last_byte dw 0 ; Location in RAM of final byte in file filename times 32 db 0 ; 12 would do, but the user ; might enter something daft filesize dw 0 ; ------------------------------------------------------------------
programs/oeis/072/A072206.asm
neoneye/loda
22
88181
<gh_stars>10-100 ; A072206: Third terms of triple Peano sequence A071988. ; 2,4,15,42,176,299,697,988,1794,3683,4526,7807,10701,12384,16262,23479,32568,36051,47972,57226,62269,79158,91964,113653,147537,166751,176954,198592,210043,234249,333502,366276,419357,438128,540423,562626,632867,708724,762522,848219,940108,972151,1143326,1179809,1255087,1293898,1543676,1823694,1924052,1975583,2081389,2247078,2304201,2604376,2796417,2997674,3208363,3280726,3504327,3658901,3737864,4149759,4775692,4965426,5062149,5259347,5989776,6322457,6903912,7024323,7269329,7647418,8171622,8580119,9002008,9290814,9735503,10350187,10667001,11319893,12172788,12348351,13251526,13437289,14004978,14392184,14986273,15803517,16223051,16435574,16866172,18202958,19132282,19608576,20584748,21084754,21849843,23435101,23706544,26244451 seq $0,40 ; The prime numbers. mov $1,$0 bin $0,3 add $0,$1
data/super_rod.asm
etdv-thevoid/pokemon-rgb-enhanced
1
175247
; super rod data ; format: map, pointer to fishing group SuperRodData: dbw PALLET_TOWN, SuperGroup1 dbw VIRIDIAN_CITY, SuperGroup2 dbw CERULEAN_CITY, SuperGroup2 dbw VERMILION_CITY, SuperGroup1 dbw CELADON_CITY, SuperGroup2 dbw FUCHSIA_CITY, SuperGroup6 dbw CINNABAR_ISLAND, SuperGroup1 dbw ROUTE_4, SuperGroup2 dbw ROUTE_6, SuperGroup2 dbw ROUTE_10, SuperGroup2 dbw ROUTE_11, SuperGroup1 dbw ROUTE_12, SuperGroup3 dbw ROUTE_13, SuperGroup3 dbw ROUTE_17, SuperGroup3 dbw ROUTE_18, SuperGroup3 dbw ROUTE_19, SuperGroup1 dbw ROUTE_20, SuperGroup1 dbw ROUTE_21, SuperGroup1 dbw ROUTE_22, SuperGroup2 dbw ROUTE_23, SuperGroup7 dbw ROUTE_24, SuperGroup2 dbw ROUTE_25, SuperGroup1 dbw VERMILION_DOCK, SuperGroup3 dbw SEAFOAM_ISLANDS_4, SuperGroup5 dbw SEAFOAM_ISLANDS_5, SuperGroup5 dbw SAFARI_ZONE_EAST, SuperGroup4 dbw SAFARI_ZONE_NORTH, SuperGroup4 dbw SAFARI_ZONE_WEST, SuperGroup4 dbw SAFARI_ZONE_CENTER, SuperGroup4 dbw UNKNOWN_DUNGEON_3, SuperGroup7 dbw UNKNOWN_DUNGEON_1, SuperGroup7 db $FF ; fishing groups ; number of monsters, followed by level/monster pairs SuperGroup1: ; Beaches db 8 db 20,TENTACOOL db 20,TENTACOOL IF DEF(_BLUE) db 15,SHELLDER db 15,KRABBY db 20,SHELLDER db 20,KRABBY db 25,SHELLDER db 25,KRABBY ELSE db 15,STARYU db 15,KRABBY db 20,STARYU db 20,KRABBY db 25,STARYU db 25,KRABBY ENDC SuperGroup2: ; Ponds and Rivers db 8 db 20,GOLDEEN db 20,GOLDEEN db 15,POLIWAG db 20,POLIWAG db 25,POLIWAG IF DEF(_BLUE) db 15,SLOWPOKE db 20,SLOWPOKE db 25,SLOWPOKE ELSE db 15,PSYDUCK db 20,PSYDUCK db 25,PSYDUCK ENDC SuperGroup3: ; Fishing Piers db 8 db 20,TENTACOOL db 20,TENTACOOL IF DEF(_BLUE) db 15,SHELLDER db 15,HORSEA db 20,SHELLDER db 20,HORSEA db 25,SHELLDER db 25,HORSEA ELSE db 15,STARYU db 15,HORSEA db 20,STARYU db 20,HORSEA db 25,STARYU db 25,HORSEA ENDC SuperGroup4: ; SAFARI ZONE db 8 db 20,DRATINI db 20,DRATINI IF DEF(_BLUE) db 15,KRABBY db 15,SLOWPOKE db 20,KRABBY db 20,SLOWPOKE db 25,KRABBY db 25,SLOWPOKE ELSE db 15,KRABBY db 15,PSYDUCK db 20,KRABBY db 20,PSYDUCK db 25,KRABBY db 25,PSYDUCK ENDC SuperGroup5: ; SEAFOAM ISLANDS db 8 db 20,TENTACOOL db 25,TENTACOOL db 30,TENTACRUEL IF DEF(_BLUE) db 25,HORSEA db 25,SLOWPOKE db 25,SHELLDER db 35,SEADRA db 35,SLOWBRO ELSE db 25,HORSEA db 25,PSYDUCK db 25,STARYU db 35,SEADRA db 35,GOLDUCK ENDC SuperGroup6: ; FUCHSIA CITY db 8 db 5,MAGIKARP db 10,MAGIKARP db 10,MAGIKARP db 15,MAGIKARP db 15,MAGIKARP db 20,MAGIKARP db 20,GYARADOS db 25,GYARADOS SuperGroup7: ; FINAL db 8 db 30,SEAKING db 35,SEAKING db 30,POLIWHIRL db 35,POLIWHIRL db 35,GYARADOS db 45,DRAGONAIR db 40,KINGLER IF DEF(_BLUE) db 40,SLOWBRO ELSE db 40,GOLDUCK ENDC
lib/Haskell/Prim/Show.agda
flupe/agda2hs
0
3778
<filename>lib/Haskell/Prim/Show.agda module Haskell.Prim.Show where open import Agda.Builtin.Char open import Agda.Builtin.Nat import Agda.Builtin.String as Str open import Haskell.Prim open import Haskell.Prim.String open import Haskell.Prim.List open import Haskell.Prim.Word open import Haskell.Prim.Double open import Haskell.Prim.Maybe open import Haskell.Prim.Eq open import Haskell.Prim.Tuple open import Haskell.Prim.Ord open import Haskell.Prim.Either open import Haskell.Prim.Integer open import Haskell.Prim.Bool open import Haskell.Prim.Int open import Haskell.Prim.Foldable -------------------------------------------------- -- Show ShowS : Set ShowS = String → String showChar : Char → ShowS showChar = _∷_ showString : String → ShowS showString = _++_ showParen : Bool → ShowS → ShowS showParen false s = s showParen true s = showString "(" ∘ s ∘ showString ")" record Show (a : Set) : Set where field showsPrec : Int → a → ShowS showList : List a → ShowS shows : a → ShowS shows = showsPrec 0 show : a → String show x = shows x "" defaultShowList : (a → ShowS) → List a → ShowS defaultShowList _ [] = showString "[]" defaultShowList shows (x ∷ xs) = showString "[" ∘ foldl (λ s x → s ∘ showString "," ∘ shows x) (shows x) xs ∘ showString "]" open Show ⦃ ... ⦄ public private makeShow : (a → String) → Show a makeShow sh .showsPrec _ = showString ∘ sh makeShow sh .showList = defaultShowList (showString ∘ sh) makeShowsPrec : (Int → a → ShowS) → Show a makeShowsPrec shp .showsPrec = shp makeShowsPrec shp .showList = defaultShowList (shp 0) instance iShowNat : Show Nat iShowNat = makeShow (Str.primStringToList ∘ Str.primShowNat) iShowInteger : Show Integer iShowInteger = makeShow showInteger iShowInt : Show Int iShowInt = makeShow showInt iShowWord : Show Word iShowWord = makeShow showWord iShowDouble : Show Double iShowDouble = makeShow (Str.primStringToList ∘ primShowFloat) iShowBool : Show Bool iShowBool = makeShow λ where false → "False"; true → "True" iShowChar : Show Char iShowChar .showsPrec _ = showString ∘ Str.primStringToList ∘ Str.primShowChar iShowChar .showList = showString ∘ Str.primStringToList ∘ Str.primShowString ∘ Str.primStringFromList iShowList : ⦃ Show a ⦄ → Show (List a) iShowList .showsPrec _ = showList iShowList .showList = defaultShowList showList private showApp₁ : ⦃ Show a ⦄ → Int → String → a → ShowS showApp₁ p tag x = showParen (p > 10) $ showString tag ∘ showString " " ∘ showsPrec 11 x instance iShowMaybe : ⦃ Show a ⦄ → Show (Maybe a) iShowMaybe = makeShowsPrec λ where p Nothing → showString "Nothing" p (Just x) → showApp₁ p "Just" x iShowEither : ⦃ Show a ⦄ → ⦃ Show b ⦄ → Show (Either a b) iShowEither = makeShowsPrec λ where p (Left x) → showApp₁ p "Left" x p (Right y) → showApp₁ p "Right" y private -- Minus the parens showTuple : ∀ {as} → ⦃ All Show as ⦄ → Tuple as → ShowS showTuple [] = showString "" showTuple ⦃ allCons ⦄ (x ∷ []) = shows x showTuple ⦃ allCons ⦄ (x ∷ xs) = shows x ∘ showString "," ∘ showTuple xs instance iShowTuple : ∀ {as} → ⦃ All Show as ⦄ → Show (Tuple as) iShowTuple = makeShowsPrec λ _ → showParen true ∘ showTuple
awa/src/awa-wikis-writers-text.adb
Letractively/ada-awa
0
24140
----------------------------------------------------------------------- -- awa-wikis-writers-text -- Wiki HTML writer -- Copyright (C) 2011, 2012, 2013, 2015 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package body AWA.Wikis.Writers.Text is use AWA.Wikis.Documents; -- ------------------------------ -- Set the output writer. -- ------------------------------ procedure Set_Writer (Document : in out Text_Writer; Writer : in ASF.Contexts.Writer.Response_Writer_Access) is begin Document.Writer := Writer; end Set_Writer; -- ------------------------------ -- Add a section header in the document. -- ------------------------------ overriding procedure Add_Header (Document : in out Text_Writer; Header : in Unbounded_Wide_Wide_String; Level : in Positive) is pragma Unreferenced (Level); begin Document.Close_Paragraph; if not Document.Empty_Line then Document.Add_Line_Break; end if; Document.Writer.Write (Header); Document.Add_Line_Break; end Add_Header; -- ------------------------------ -- Add a line break (<br>). -- ------------------------------ overriding procedure Add_Line_Break (Document : in out Text_Writer) is begin Document.Writer.Write (ASCII.LF); Document.Empty_Line := True; end Add_Line_Break; -- ------------------------------ -- Add a paragraph (<p>). Close the previous paragraph if any. -- The paragraph must be closed at the next paragraph or next header. -- ------------------------------ overriding procedure Add_Paragraph (Document : in out Text_Writer) is begin Document.Close_Paragraph; Document.Need_Paragraph := True; Document.Add_Line_Break; end Add_Paragraph; -- ------------------------------ -- Add a blockquote (<blockquote>). The level indicates the blockquote nested level. -- The blockquote must be closed at the next header. -- ------------------------------ overriding procedure Add_Blockquote (Document : in out Text_Writer; Level : in Natural) is begin Document.Close_Paragraph; for I in 1 .. Level loop Document.Writer.Write (" "); end loop; end Add_Blockquote; -- ------------------------------ -- Add a list item (<li>). Close the previous paragraph and list item if any. -- The list item will be closed at the next list item, next paragraph or next header. -- ------------------------------ overriding procedure Add_List_Item (Document : in out Text_Writer; Level : in Positive; Ordered : in Boolean) is pragma Unreferenced (Level, Ordered); begin if not Document.Empty_Line then Document.Add_Line_Break; end if; Document.Need_Paragraph := False; Document.Open_Paragraph; end Add_List_Item; procedure Close_Paragraph (Document : in out Text_Writer) is begin if Document.Has_Paragraph then Document.Add_Line_Break; end if; Document.Has_Paragraph := False; end Close_Paragraph; procedure Open_Paragraph (Document : in out Text_Writer) is begin if Document.Need_Paragraph then Document.Has_Paragraph := True; Document.Need_Paragraph := False; end if; end Open_Paragraph; -- ------------------------------ -- Add an horizontal rule (<hr>). -- ------------------------------ overriding procedure Add_Horizontal_Rule (Document : in out Text_Writer) is begin Document.Close_Paragraph; end Add_Horizontal_Rule; -- ------------------------------ -- Add a link. -- ------------------------------ overriding procedure Add_Link (Document : in out Text_Writer; Name : in Unbounded_Wide_Wide_String; Link : in Unbounded_Wide_Wide_String; Language : in Unbounded_Wide_Wide_String; Title : in Unbounded_Wide_Wide_String) is pragma Unreferenced (Language); begin Document.Open_Paragraph; if Length (Title) > 0 then Document.Writer.Write (Title); end if; Document.Writer.Write (Link); Document.Writer.Write (Name); Document.Empty_Line := False; end Add_Link; -- ------------------------------ -- Add an image. -- ------------------------------ overriding procedure Add_Image (Document : in out Text_Writer; Link : in Unbounded_Wide_Wide_String; Alt : in Unbounded_Wide_Wide_String; Position : in Unbounded_Wide_Wide_String; Description : in Unbounded_Wide_Wide_String) is pragma Unreferenced (Position); begin Document.Open_Paragraph; if Length (Alt) > 0 then Document.Writer.Write (Alt); end if; if Length (Description) > 0 then Document.Writer.Write (Description); end if; Document.Writer.Write (Link); Document.Empty_Line := False; end Add_Image; -- ------------------------------ -- Add a quote. -- ------------------------------ overriding procedure Add_Quote (Document : in out Text_Writer; Quote : in Unbounded_Wide_Wide_String; Link : in Unbounded_Wide_Wide_String; Language : in Unbounded_Wide_Wide_String) is pragma Unreferenced (Link, Language); begin Document.Open_Paragraph; Document.Writer.Write (Quote); Document.Empty_Line := False; end Add_Quote; -- ------------------------------ -- Add a text block with the given format. -- ------------------------------ overriding procedure Add_Text (Document : in out Text_Writer; Text : in Unbounded_Wide_Wide_String; Format : in AWA.Wikis.Documents.Format_Map) is pragma Unreferenced (Format); begin Document.Writer.Write (Text); Document.Empty_Line := False; end Add_Text; -- ------------------------------ -- Add a text block that is pre-formatted. -- ------------------------------ procedure Add_Preformatted (Document : in out Text_Writer; Text : in Unbounded_Wide_Wide_String; Format : in Unbounded_Wide_Wide_String) is pragma Unreferenced (Format); begin Document.Close_Paragraph; Document.Writer.Write (Text); Document.Empty_Line := False; end Add_Preformatted; -- ------------------------------ -- Finish the document after complete wiki text has been parsed. -- ------------------------------ overriding procedure Finish (Document : in out Text_Writer) is begin Document.Close_Paragraph; end Finish; end AWA.Wikis.Writers.Text;
oeis/137/A137781.asm
neoneye/loda-programs
11
11469
; A137781: a(n) = (2^prime(n) + 2^prime(n+1)) / 4. ; Submitted by <NAME> ; 3,10,40,544,2560,34816,163840,2228224,136314880,671088640,34896609280,584115552256,2748779069440,37383395344384,2286984185774080,146366987889541120,720575940379279360,37469948899722526720,627189298506124754944,2951479051793528258560,153476910693263469445120,2568967366681086996250624,157160356549901792711802880,39768823762042841331134365696,673439381371246869545123577856,3169126500570573503741758013440,43100120407759799650887908982784,202824096036516704239472512860160 seq $0,124669 ; Product of successive primes minus 2. add $0,1 seq $0,328337 ; The number whose binary indices are the nontrivial divisors of n (greater than 1 and less than n). div $0,2
Task/Bitwise-operations/Ada/bitwise-operations.ada
djgoku/RosettaCodeData
0
26756
with Ada.Text_Io; use Ada.Text_Io; with Interfaces; use Interfaces; procedure Bitwise is subtype Byte is Unsigned_8; package Byte_Io is new Ada.Text_Io.Modular_Io(Byte); A : Byte := 255; B : Byte := 170; X : Byte := 128; N : Natural := 1; begin Put_Line("A and B = "); Byte_Io.Put(Item => A and B, Base => 2); Put_Line("A or B = "); Byte_IO.Put(Item => A or B, Base => 2); Put_Line("A xor B = "); Byte_Io.Put(Item => A xor B, Base => 2); Put_Line("Not A = "); Byte_IO.Put(Item => not A, Base => 2); New_Line(2); Put_Line(Unsigned_8'Image(Shift_Left(X, N))); -- Left shift Put_Line(Unsigned_8'Image(Shift_Right(X, N))); -- Right shift Put_Line(Unsigned_8'Image(Shift_Right_Arithmetic(X, N))); -- Right Shift Arithmetic Put_Line(Unsigned_8'Image(Rotate_Left(X, N))); -- Left rotate Put_Line(Unsigned_8'Image(Rotate_Right(X, N))); -- Right rotate end bitwise;
programs/oeis/055/A055640.asm
jmorken/loda
1
9665
; A055640: Number of nonzero digits in decimal expansion of n. ; 0,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3 lpb $0 add $1,1 lpb $0 dif $0,10 lpe div $0,10 lpe
Transynther/x86/_processed/AVXALIGN/_st_sm_/i7-7700_9_0xca.log_21829_288.asm
ljhsiun2/medusa
9
28347
<filename>Transynther/x86/_processed/AVXALIGN/_st_sm_/i7-7700_9_0xca.log_21829_288.asm .global s_prepare_buffers s_prepare_buffers: push %r11 push %r14 push %r15 push %r9 push %rbp push %rcx push %rdi push %rsi lea addresses_WT_ht+0x170cf, %r11 nop sub %rcx, %rcx mov $0x6162636465666768, %r9 movq %r9, %xmm5 movups %xmm5, (%r11) nop nop nop inc %r15 lea addresses_UC_ht+0x5b2f, %rsi lea addresses_UC_ht+0xe834, %rdi nop nop nop xor $36992, %r9 mov $121, %rcx rep movsb cmp %r9, %r9 lea addresses_D_ht+0xf3af, %rsi nop nop nop nop cmp $52863, %rdi mov (%rsi), %r9d nop nop nop nop nop cmp $20480, %rcx lea addresses_D_ht+0x1bf2f, %rcx clflush (%rcx) cmp $17399, %rbp movw $0x6162, (%rcx) nop nop nop nop sub $47779, %rcx lea addresses_WT_ht+0x1162f, %rsi lea addresses_normal_ht+0x1ab2f, %rdi nop nop nop nop nop cmp %r14, %r14 mov $33, %rcx rep movsb xor %rcx, %rcx lea addresses_D_ht+0x1e61f, %r9 nop nop xor %rdi, %rdi mov (%r9), %r11 nop nop xor %r14, %r14 lea addresses_D_ht+0x1792f, %r9 nop nop nop nop sub $24190, %rcx movups (%r9), %xmm0 vpextrq $1, %xmm0, %r15 nop nop xor %rbp, %rbp lea addresses_A_ht+0xdb2f, %rsi nop nop nop nop and $50153, %r11 mov $0x6162636465666768, %r9 movq %r9, %xmm3 movups %xmm3, (%rsi) nop nop nop nop and $30652, %r9 lea addresses_A_ht+0xf1ef, %rdi nop nop nop nop nop cmp $7544, %rcx movups (%rdi), %xmm2 vpextrq $0, %xmm2, %rsi nop nop nop xor %r15, %r15 pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r15 pop %r14 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r14 push %r8 push %rax push %rbp push %rcx push %rdx // Store mov $0xf95, %rdx nop nop nop dec %r8 movb $0x51, (%rdx) nop nop nop nop cmp $50784, %rax // Store lea addresses_normal+0x10f2f, %r14 nop nop xor %rcx, %rcx mov $0x5152535455565758, %rdx movq %rdx, %xmm4 movups %xmm4, (%r14) nop nop add $13445, %r10 // Faulty Load lea addresses_normal+0x10f2f, %r14 nop nop sub $37651, %rdx mov (%r14), %r10d lea oracles, %rdx and $0xff, %r10 shlq $12, %r10 mov (%rdx,%r10,1), %r10 pop %rdx pop %rcx pop %rbp pop %rax pop %r8 pop %r14 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 1, 'NT': True, 'type': 'addresses_P'}} {'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 16, 'NT': False, 'type': 'addresses_normal'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 4, 'NT': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': False, 'same': True, 'size': 16, 'NT': False, 'type': 'addresses_WT_ht'}} {'src': {'congruent': 10, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_UC_ht'}} {'src': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_D_ht'}} {'src': {'congruent': 8, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_normal_ht'}} {'src': {'congruent': 3, 'AVXalign': True, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_A_ht'}} {'src': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'58': 21829} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
agda/PLRTree.agda
bgbianchi/sorting
6
11167
module PLRTree {A : Set} where open import BTree {A} hiding (flatten) open import Data.List data Tag : Set where perfect : Tag left : Tag right : Tag data PLRTree : Set where leaf : PLRTree node : Tag → A → PLRTree → PLRTree → PLRTree forget : PLRTree → BTree forget leaf = leaf forget (node _ x l r) = node x (forget l) (forget r) flatten : PLRTree → List A flatten leaf = [] flatten (node _ x l r) = x ∷ flatten l ++ flatten r
programs/oeis/287/A287394.asm
neoneye/loda
22
1866
<reponame>neoneye/loda<filename>programs/oeis/287/A287394.asm ; A287394: Domination number for camel's graph on a 2 X n board. ; 0,2,4,6,6,6,6,6,6,6,8,10,12,12,12,12,12,12,12,14,16,18,18,18,18,18,18,18,20,22,24,24,24,24,24,24,24,26,28,30,30,30,30,30,30,30,32,34,36,36,36,36,36,36,36,38,40,42,42,42,42,42,42,42,44,46,48,48,48,48,48,48,48,50,52,54,54,54,54,54,54,54,56,58,60,60,60,60,60,60,60,62,64,66,66,66,66,66,66,66 lpb $0 mov $2,$0 trn $0,9 min $2,3 add $1,$2 lpe mul $1,2 mov $0,$1
FormalAnalyzer/models/apps/SomeAtHome.als
Mohannadcse/IoTCOM_BehavioralRuleExtractor
0
1891
<filename>FormalAnalyzer/models/apps/SomeAtHome.als<gh_stars>0 module app_SomeAtHome open IoTBottomUp as base open cap_runIn open cap_now open cap_presenceSensor open cap_presenceSensor open cap_location one sig app_SomeAtHome extends IoTApp { location : one cap_location, peopleHome : some cap_presenceSensor, peopleAway : some cap_presenceSensor, state : one cap_state, newMode : one cap_location_attr_mode_val, } { rules = r //capabilities = peopleHome + peopleAway + state } one sig cap_state extends cap_runIn {} { attributes = cap_state_attr + cap_runIn_attr } abstract sig cap_state_attr extends Attribute {} abstract sig r extends Rule {} one sig r0 extends r {}{ triggers = r0_trig conditions = r0_cond commands = r0_comm } abstract sig r0_trig extends Trigger {} one sig r0_trig0 extends r0_trig {} { capabilities = app_SomeAtHome.peopleAway attribute = cap_presenceSensor_attr_presence no value } one sig r0_trig1 extends r0_trig {} { capabilities = app_SomeAtHome.peopleHome attribute = cap_presenceSensor_attr_presence no value } abstract sig r0_cond extends Condition {} one sig r0_cond0 extends r0_cond {} { capabilities = app_SomeAtHome.location attribute = cap_location_attr_mode value = cap_location_attr_mode_val - app_SomeAtHome.newMode } abstract sig r0_comm extends Command {} one sig r0_comm0 extends r0_comm {} { capability = app_SomeAtHome.state attribute = cap_runIn_attr_runIn value = cap_runIn_attr_runIn_val_on } one sig r1 extends r {}{ no triggers conditions = r1_cond commands = r1_comm } abstract sig r1_cond extends Condition {} one sig r1_cond0 extends r1_cond {} { capabilities = app_SomeAtHome.state attribute = cap_runIn_attr_runIn value = cap_runIn_attr_runIn_val_on } abstract sig r1_comm extends Command {} one sig r1_comm0 extends r1_comm {} { capability = app_SomeAtHome.location attribute = cap_location_attr_mode value = app_SomeAtHome.newMode }
third_party/libvpx/source/config/ios/arm-neon/vpx_config.asm
zealoussnow/chromium
14,668
8828
@ This file was created from a .asm file @ using the ads2gas_apple.pl script. .syntax unified .set VPX_ARCH_ARM , 1 .set ARCH_ARM , 1 .set VPX_ARCH_MIPS , 0 .set ARCH_MIPS , 0 .set VPX_ARCH_X86 , 0 .set ARCH_X86 , 0 .set VPX_ARCH_X86_64 , 0 .set ARCH_X86_64 , 0 .set VPX_ARCH_PPC , 0 .set ARCH_PPC , 0 .set HAVE_NEON , 1 .set HAVE_NEON_ASM , 1 .set HAVE_MIPS32 , 0 .set HAVE_DSPR2 , 0 .set HAVE_MSA , 0 .set HAVE_MIPS64 , 0 .set HAVE_MMX , 0 .set HAVE_SSE , 0 .set HAVE_SSE2 , 0 .set HAVE_SSE3 , 0 .set HAVE_SSSE3 , 0 .set HAVE_SSE4_1 , 0 .set HAVE_AVX , 0 .set HAVE_AVX2 , 0 .set HAVE_AVX512 , 0 .set HAVE_VSX , 0 .set HAVE_MMI , 0 .set HAVE_VPX_PORTS , 1 .set HAVE_PTHREAD_H , 1 .set HAVE_UNISTD_H , 0 .set CONFIG_DEPENDENCY_TRACKING , 1 .set CONFIG_EXTERNAL_BUILD , 1 .set CONFIG_INSTALL_DOCS , 0 .set CONFIG_INSTALL_BINS , 1 .set CONFIG_INSTALL_LIBS , 1 .set CONFIG_INSTALL_SRCS , 0 .set CONFIG_DEBUG , 0 .set CONFIG_GPROF , 0 .set CONFIG_GCOV , 0 .set CONFIG_RVCT , 0 .set CONFIG_GCC , 1 .set CONFIG_MSVS , 0 .set CONFIG_PIC , 0 .set CONFIG_BIG_ENDIAN , 0 .set CONFIG_CODEC_SRCS , 0 .set CONFIG_DEBUG_LIBS , 0 .set CONFIG_DEQUANT_TOKENS , 0 .set CONFIG_DC_RECON , 0 .set CONFIG_RUNTIME_CPU_DETECT , 0 .set CONFIG_POSTPROC , 1 .set CONFIG_VP9_POSTPROC , 1 .set CONFIG_MULTITHREAD , 1 .set CONFIG_INTERNAL_STATS , 0 .set CONFIG_VP8_ENCODER , 1 .set CONFIG_VP8_DECODER , 1 .set CONFIG_VP9_ENCODER , 1 .set CONFIG_VP9_DECODER , 1 .set CONFIG_VP8 , 1 .set CONFIG_VP9 , 1 .set CONFIG_ENCODERS , 1 .set CONFIG_DECODERS , 1 .set CONFIG_STATIC_MSVCRT , 0 .set CONFIG_SPATIAL_RESAMPLING , 1 .set CONFIG_REALTIME_ONLY , 1 .set CONFIG_ONTHEFLY_BITPACKING , 0 .set CONFIG_ERROR_CONCEALMENT , 0 .set CONFIG_SHARED , 0 .set CONFIG_STATIC , 1 .set CONFIG_SMALL , 0 .set CONFIG_POSTPROC_VISUALIZER , 0 .set CONFIG_OS_SUPPORT , 1 .set CONFIG_UNIT_TESTS , 1 .set CONFIG_WEBM_IO , 1 .set CONFIG_LIBYUV , 0 .set CONFIG_DECODE_PERF_TESTS , 0 .set CONFIG_ENCODE_PERF_TESTS , 0 .set CONFIG_MULTI_RES_ENCODING , 1 .set CONFIG_TEMPORAL_DENOISING , 1 .set CONFIG_VP9_TEMPORAL_DENOISING , 1 .set CONFIG_CONSISTENT_RECODE , 0 .set CONFIG_COEFFICIENT_RANGE_CHECKING , 0 .set CONFIG_VP9_HIGHBITDEPTH , 0 .set CONFIG_BETTER_HW_COMPATIBILITY , 0 .set CONFIG_EXPERIMENTAL , 0 .set CONFIG_SIZE_LIMIT , 1 .set CONFIG_ALWAYS_ADJUST_BPM , 0 .set CONFIG_BITSTREAM_DEBUG , 0 .set CONFIG_MISMATCH_DEBUG , 0 .set CONFIG_FP_MB_STATS , 0 .set CONFIG_EMULATE_HARDWARE , 0 .set CONFIG_NON_GREEDY_MV , 0 .set CONFIG_RATE_CTRL , 0 .set DECODE_WIDTH_LIMIT , 16384 .set DECODE_HEIGHT_LIMIT , 16384
proglangs-learning/Agda/plfa-exercises/Practice.agda
helq/old_code
0
2450
module plfa-exercises.Practice where --------------------------------------- Naturals --------------------------------------- -- Inductive definition of Numbers (new datatype) data ℕ : Set where -- Judgements (two in total for this case) zero : ℕ -- No hypothesis and one conclusion suc : ℕ → ℕ -- One hypothesis and one conclusion seven : ℕ seven = suc (suc (suc (suc (suc (suc (suc zero)))))) --seven′ = --7 pred : ℕ → ℕ pred zero = zero pred (suc n) = n --- -- Gives us the power of writing 3 to signify suc (suc (suc zero)) :) {-# BUILTIN NATURAL ℕ #-} import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; _≢_; refl; cong; sym; trans) open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _≡⟨_⟩_; _∎) open import Function.Base using (flip) open import Relation.Nullary using (¬_) open import Data.Empty using (⊥; ⊥-elim) open import Data.Product using (_×_; ∃-syntax) renaming (_,_ to ⟨_,_⟩) open import Data.Sum using (_⊎_; inj₁; inj₂) _+_ : ℕ → ℕ → ℕ zero + n = n -- +-def₀ (suc m) + n = suc (m + n) -- +-def₁ --_ : (suc (suc zero)) + (suc (suc (suc zero))) ≡ (suc (suc (suc (suc (suc zero))))) --_ = -- begin -- (suc (suc zero)) + (suc (suc (suc zero))) -- ≡⟨⟩ -- inductive case -- suc ((suc zero) + (suc (suc (suc zero)))) -- ≡⟨⟩ -- inductive case -- suc (suc (zero + (suc (suc (suc zero))))) -- ≡⟨⟩ -- base case -- suc (suc (suc (suc (suc zero)))) -- ∎ -- --_ : 2 + 3 ≡ 5 --_ = -- begin -- 2 + 3 -- (suc 1) + 3 -- ≡⟨⟩ -- suc (1 + 3) -- ≡⟨⟩ -- suc (suc 0 + 3) -- ≡⟨⟩ -- suc (suc (0 + 3)) -- ≡⟨⟩ -- suc (suc 3) -- ≡⟨⟩ -- suc 4 -- ≡⟨⟩ -- 5 -- ∎ -- -- --_ : (suc (suc zero)) + (suc (suc (suc zero))) ≡ (suc (suc (suc (suc (suc zero))))) --_ = refl _*_ : ℕ → ℕ → ℕ zero * n = zero (suc m) * n = n + (m * n) _^_ : ℕ → ℕ → ℕ n ^ zero = suc zero n ^ (suc m) = n * (n ^ m) -- Monus _∸_ : ℕ → ℕ → ℕ m ∸ zero = m zero ∸ suc n = zero suc m ∸ suc n = m ∸ n infixl 6 _+_ _∸_ infixl 7 _*_ infixr 8 _^_ -- Superfun binary numbers :D data Bin : Set where ⟨⟩ : Bin _O : Bin → Bin _I : Bin → Bin inc : Bin → Bin inc ⟨⟩ = ⟨⟩ I inc (b O) = b I inc (b I) = (inc b) O _ : inc (⟨⟩ I O I I) ≡ ⟨⟩ I I O O _ = refl toᵇ : ℕ → Bin toᵇ zero = ⟨⟩ O toᵇ (suc n) = inc (toᵇ n) fromᵇ : Bin → ℕ fromᵇ ⟨⟩ = zero fromᵇ (b O) = let n = fromᵇ b in n + n fromᵇ (b I) = let n = fromᵇ b in suc (n + n) _ : toᵇ 11 ≡ (⟨⟩ I O I I) _ = refl _ : fromᵇ (inc (⟨⟩ I O I I)) ≡ 12 _ = refl --_ = begin -- (fromᵇ (⟨⟩ I I O O)) -- ≡⟨ 12 ≡⟨⟩ 12 ∎ ⟩ -- 12 -- ∎ --_ : Set₉₁₁₁₁₁₁₁₁₁₁₁₁₁₁₁₁₁₁₁₁ --_ : Set₀ _ : Set _ = suc 11 ≡ 12 _+ᵇ_ : Bin → Bin → Bin ⟨⟩ +ᵇ b = b b +ᵇ ⟨⟩ = b --(b O) +ᵇ ⟨⟩ = b O (b O) +ᵇ (d O) = (b +ᵇ d) O (b O) +ᵇ (d I) = (b +ᵇ d) I --(b I) +ᵇ ⟨⟩ = b I (b I) +ᵇ (d O) = (b +ᵇ d) I (b I) +ᵇ (d I) = (inc (b +ᵇ d)) O -- Proving the following is trivial mod-left : ∀ {b : Bin} → ⟨⟩ +ᵇ b ≡ b mod-left = refl -- But not its complement. This is due to "case trees" (or how Agda implements -- functions under the hood) -- https://agda.readthedocs.io/en/v2.6.0.1/language/function-definitions.html#case-trees mod-right : ∀ {b : Bin} → b +ᵇ ⟨⟩ ≡ b mod-right {⟨⟩} = refl mod-right {b O} = refl mod-right {b I} = refl -- Also, I'm confused on the implications of improper "case trees". If the -- second rule wasn't reachable, the following code would run even -- if the rule was nonesense (eg, changing `b +ᵇ ⟨⟩ = b O O`) but it doesn't -- work! The rule must make sense. So, Agda is applying the rule after all and -- not ignoring it even thought it can't be reached directly in proofs _ : (⟨⟩ I O I I I) +ᵇ (⟨⟩ O O I) ≡ ⟨⟩ I I O O O _ = refl ---proppre : ∀ (n : ℕ) → zero + suc n ≡ suc (zero + n) ---proppre zero = refl ---proppre (suc n) = --- begin --- zero + suc (suc n) --- ≡⟨⟩ --- zero + suc (zero + suc n) --- ≡⟨⟩ --- suc (zero + suc n) --- ∎ --≡⟨ cong suc (proppre n) ⟩ -- Taken it from book assoc-+ : ∀ (m n p : ℕ) → (m + n) + p ≡ m + (n + p) assoc-+ zero n p = refl assoc-+ (suc m) n p rewrite assoc-+ m n p = refl comm-+₀ : ∀ (m : ℕ) → m + zero ≡ m comm-+₀ zero = refl comm-+₀ (suc n) rewrite comm-+₀ n = refl --comm-+₀ (suc n) = -- begin -- zero + suc n -- ≡⟨⟩ -- zero + suc (zero + n) -- ≡⟨⟩ -- suc (zero + n) -- ≡⟨ cong suc (comm-+₀ n) ⟩ -- suc (n + zero) -- ≡⟨⟩ -- suc n + zero -- ∎ succ_right : ∀ (n m : ℕ) → suc (n + m) ≡ n + suc m succ_right zero m = refl succ_right (suc n) m rewrite succ_right n m = refl --succ_right (suc n) m = cong suc (succ_right n m) --succ_right (suc n) m = -- begin -- suc (suc n + m) -- ≡⟨⟩ -- suc (suc (n + m)) -- ≡⟨ cong suc (succ_right n m) ⟩ -- suc (n + suc m) -- ≡⟨⟩ -- suc n + suc m -- ∎ comm-+ : ∀ (n m : ℕ) → n + m ≡ m + n comm-+ zero n = sym (comm-+₀ n) comm-+ (suc n) m rewrite comm-+ n m | succ_right m n = refl --comm-+ (suc n) m = trans (cong suc (comm-+ n m)) (succ_right m n) --comm-+ (suc n) m = -- begin -- suc n + m -- ≡⟨⟩ -- +-def₁ -- suc (n + m) -- ≡⟨ cong suc (comm-+ n m) ⟩ -- suc (m + n) -- ≡⟨ succ_right m n ⟩ -- m + suc n -- ∎ -- Try evaluating and type-checking the following expressions: -- comm-+ zero -- (flip comm-+) zero -- λ n m → cong suc (comm-+ n m) -- λ m n → succ_right m n -- λ m n → sym (succ_right m n) -- λ n m → trans (cong suc (comm-+ n m)) (succ_right m n) monus : ∀ (n : ℕ) → zero ∸ n ≡ zero monus zero = refl monus (suc n) = refl --monus : ∀ {n : ℕ} → zero ∸ n ≡ zero --monus {zero} = refl --monus {suc n} = refl inc≡suc : ∀ (b : Bin) → fromᵇ (inc b) ≡ suc (fromᵇ b) inc≡suc ⟨⟩ = refl inc≡suc (b O) rewrite sym (comm-+₀ (fromᵇ b)) = refl inc≡suc (b I) rewrite comm-+₀ (fromᵇ (inc b)) | inc≡suc b | succ_right (fromᵇ b) (fromᵇ b) | comm-+₀ (fromᵇ b) | succ_right (fromᵇ b) (fromᵇ b) = refl -- `toᵇ (fromᵇ b) ≡ b` doesn't hold for all values, just for some. -- So the following is false --tofromb≢b : ∀ (b : Bin) → ¬ (toᵇ (fromᵇ b) ≡ b) --tofromb≢b ⟨⟩ = λ() --tofromb≢b = ? -- impossible to prove _ : ¬ (toᵇ (fromᵇ ⟨⟩) ≡ ⟨⟩) _ = λ() --from∘toᵇ₀ : ∀ (n : ℕ) → fromᵇ ((toᵇ n) O) ≡ fromᵇ (toᵇ n) + fromᵇ (toᵇ n) --from∘toᵇ₀ zero = refl --from∘toᵇ₀ (suc n) = refl -- --from∘toᵇ₁ : ∀ (n : ℕ) → fromᵇ ((toᵇ n) I) ≡ suc (fromᵇ (toᵇ n) + fromᵇ (toᵇ n)) --from∘toᵇ₁ zero = refl --from∘toᵇ₁ (suc n) = refl monobin₀ : ∀ (b : Bin) → inc (inc (b +ᵇ b)) ≡ (inc b +ᵇ inc b) monobin₀ ⟨⟩ = refl monobin₀ (b O) = refl monobin₀ (b I) rewrite monobin₀ b = refl monobin : ∀ (n : ℕ) → toᵇ (n + n) ≡ (toᵇ n) +ᵇ (toᵇ n) monobin zero = refl monobin (suc n) rewrite sym (succ_right n n) | monobin n | monobin₀ (toᵇ n) = refl --mononat₀ : ∀ (a : Bin) → a +ᵇ ⟨⟩ ≡ a --mononat₀ ⟨⟩ = refl --mononat₀ (b O) = refl --mononat₀ (b I) = refl -- --mononat₁ : ∀ (a b : Bin) → fromᵇ (inc (a +ᵇ b)) ≡ suc (fromᵇ a + fromᵇ b) --mononat₁ ⟨⟩ b rewrite inc≡suc b = refl --mononat₁ a ⟨⟩ rewrite mononat₀ a | comm-+₀ (fromᵇ a) | inc≡suc a = refl --mononat₁ = ? ---- λ a → fromᵇ (inc (a +ᵇ ⟨⟩)) ≡ suc (fromᵇ a + fromᵇ ⟨⟩) ---- fromᵇ (inc b) ≡ suc (fromᵇ b) -- --mononat : ∀ (a b : Bin) → fromᵇ (a +ᵇ b) ≡ fromᵇ a + fromᵇ b --mononat ⟨⟩ _ = refl --mononat a ⟨⟩ rewrite mononat₀ a | comm-+₀ (fromᵇ a) = refl ----mononat a ⟨⟩ = ---- begin ---- fromᵇ (a +ᵇ ⟨⟩) ---- ≡⟨ cong fromᵇ (mononat₀ a) ⟩ ---- fromᵇ (a) ---- ≡⟨ sym (comm-+₀ (fromᵇ a)) ⟩ ---- fromᵇ a + zero ---- ≡⟨⟩ ---- fromᵇ a + fromᵇ ⟨⟩ ---- ∎ --mononat (a O) (b O) rewrite -- mononat a b -- | assoc-+ (fromᵇ a) (fromᵇ b) (fromᵇ a + fromᵇ b) -- | comm-+ (fromᵇ b) (fromᵇ a + fromᵇ b) -- | assoc-+ (fromᵇ a) (fromᵇ a) (fromᵇ b + fromᵇ b) -- | assoc-+ (fromᵇ a) (fromᵇ b) (fromᵇ b) -- = refl --mononat (a I) (b O) rewrite -- mononat a b -- | assoc-+ (fromᵇ a) (fromᵇ b) (fromᵇ a + fromᵇ b) -- | comm-+ (fromᵇ b) (fromᵇ a + fromᵇ b) -- | assoc-+ (fromᵇ a) (fromᵇ a) (fromᵇ b + fromᵇ b) -- | assoc-+ (fromᵇ a) (fromᵇ b) (fromᵇ b) -- = refl --mononat (a O) (b I) rewrite -- mononat a b -- | sym (succ_right (fromᵇ a + fromᵇ a) (fromᵇ b + fromᵇ b)) -- | assoc-+ (fromᵇ a) (fromᵇ b) (fromᵇ a + fromᵇ b) -- | comm-+ (fromᵇ b) (fromᵇ a + fromᵇ b) -- | assoc-+ (fromᵇ a) (fromᵇ a) (fromᵇ b + fromᵇ b) -- | assoc-+ (fromᵇ a) (fromᵇ b) (fromᵇ b) -- = refl --mononat (a I) (b I) rewrite -- mononat₁ a b -- | sym (succ_right (fromᵇ a + fromᵇ a) (fromᵇ b + fromᵇ b)) -- | sym (succ_right (fromᵇ a + fromᵇ b) (fromᵇ a + fromᵇ b)) -- | assoc-+ (fromᵇ a) (fromᵇ b) (fromᵇ a + fromᵇ b) -- | comm-+ (fromᵇ b) (fromᵇ a + fromᵇ b) -- | assoc-+ (fromᵇ a) (fromᵇ a) (fromᵇ b + fromᵇ b) -- | assoc-+ (fromᵇ a) (fromᵇ b) (fromᵇ b) -- = refl -- Really hard!! Keep working on it! -- IT WASN'T HARD!!! I JUST COULDN'T SEE THE RIGHT REWRITE!! from∘toᵇ : ∀ (n : ℕ) → fromᵇ (toᵇ n) ≡ n from∘toᵇ zero = refl from∘toᵇ (suc n) rewrite inc≡suc (toᵇ n) | from∘toᵇ n = refl --from∘toᵇ (suc n) = -- begin -- fromᵇ (toᵇ (suc n)) -- ≡⟨⟩ -- fromᵇ (inc (toᵇ n)) -- ≡⟨ inc≡suc (toᵇ n) ⟩ -- suc (fromᵇ (toᵇ n)) -- ≡⟨ cong suc (from∘toᵇ n) ⟩ -- suc n -- ∎ swap-m-n-+ : ∀ (m n p) → m + (n + p) ≡ n + (m + p) swap-m-n-+ m n p rewrite sym (assoc-+ m n p) | sym (assoc-+ n m p) | comm-+ m n = refl right-zero-* : ∀ (n : ℕ) → n * 0 ≡ 0 right-zero-* zero = refl right-zero-* (suc n) rewrite right-zero-* n = refl suc-right-* : ∀ (m n) → m * suc n ≡ m + m * n suc-right-* zero n = refl suc-right-* (suc m) n rewrite suc-right-* m n | sym (assoc-+ n m (m * n)) | comm-+ n m | assoc-+ m n (m * n) = refl comm-* : ∀ (m n : ℕ) → m * n ≡ n * m comm-* zero n rewrite right-zero-* n = refl comm-* (suc m) n rewrite comm-* m n | suc-right-* n m = refl distr-*-+ : ∀ (m n p) → (m + n) * p ≡ m * p + n * p distr-*-+ zero _ _ = refl distr-*-+ (suc m) n p rewrite distr-*-+ m n p | assoc-+ p (m * p) (n * p) = refl distl-*-+ : ∀ (p m n) → p * (m + n) ≡ p * m + p * n distl-*-+ zero _ _ = refl distl-*-+ (suc p) m n rewrite distl-*-+ p m n | sym (assoc-+ (m + n) (p * m) (p * n)) | sym (assoc-+ (m + p * m) n (p * n)) | assoc-+ m n (p * m) | comm-+ n (p * m) | assoc-+ m (p * m) n = refl assoc-* : ∀ (m n p : ℕ) → (m * n) * p ≡ m * (n * p) assoc-* zero n p = refl assoc-* (suc m) n p rewrite assoc-* m n p | distr-*-+ n (m * n) p | assoc-* m n p = refl swap-m-n-* : ∀ (m n p) → m * (n * p) ≡ n * (m * p) swap-m-n-* m n p rewrite sym (assoc-* m n p) | sym (assoc-* n m p) | comm-* m n = refl distr-^-* : ∀ (m n p) → (m * n) ^ p ≡ (m ^ p) * (n ^ p) --distr-^-* m n zero = -- begin -- (m * n) ^ zero -- ≡⟨⟩ -- (m * n) ^ 0 -- ≡⟨⟩ -- suc 0 -- ≡⟨⟩ -- 1 -- ≡⟨⟩ -- 1 + 0 -- ≡⟨⟩ -- 1 + 0 * 1 -- ≡⟨⟩ -- (suc 0) * 1 -- ≡⟨⟩ -- (suc 0) * 1 -- ≡⟨⟩ -- 1 * 1 -- ≡⟨⟩ -- 1 * (n ^ 0) -- ≡⟨⟩ -- (m ^ zero) * (n ^ zero) -- ≡⟨⟩ -- (m ^ 0) * (n ^ 0) -- ∎ distr-^-* _ _ zero = refl distr-^-* zero zero (suc p) = refl distr-^-* zero (suc n) (suc p) = refl distr-^-* (suc m) zero (suc p) rewrite right-zero-* (suc m ^ suc p) | right-zero-* m = refl distr-^-* (suc m) (suc n) (suc p) rewrite -- (suc m * suc n) ^ suc p ≡ suc m ^ suc p * suc n ^ suc p -- -- suc (n + m * suc n) ^ p + (n + m * suc n) * suc (n + m * suc n) ^ p -- ≡ (suc m ^ p + m * suc m ^ p) * (suc n ^ p + n * suc n ^ p) distr-*-+ (suc m ^ p) (m * suc m ^ p) (suc n ^ p + n * suc n ^ p) -- suc (n + m * suc n) ^ p + (n + m * suc n) * suc (n + m * suc n) ^ p -- ≡ -- suc m ^ p * (suc n ^ p + n * suc n ^ p) -- + m * suc m ^ p * (suc n ^ p + n * suc n ^ p) | assoc-* m (suc m ^ p) (suc n ^ p + n * suc n ^ p) -- suc (n + m * suc n) ^ p + (n + m * suc n) * suc (n + m * suc n) ^ p -- ≡ -- suc m ^ p * (suc n ^ p + n * suc n ^ p) -- + m * (suc m ^ p * (suc n ^ p + n * suc n ^ p)) | distl-*-+ (suc m ^ p) (suc n ^ p) (n * suc n ^ p) -- suc (n + m * suc n) ^ p + (n + m * suc n) * suc (n + m * suc n) ^ p -- ≡ -- suc m ^ p * suc n ^ p + suc m ^ p * (n * suc n ^ p) -- + m * (suc m ^ p * suc n ^ p + suc m ^ p * (n * suc n ^ p)) | comm-* m (suc n) -- suc (n + (m + n * m)) ^ p -- + (n + (m + n * m)) * suc (n + (m + n * m)) ^ p -- ≡ -- suc m ^ p * suc n ^ p + suc m ^ p * (n * suc n ^ p) -- + m * (suc m ^ p * suc n ^ p + suc m ^ p * (n * suc n ^ p)) | comm-* n m -- suc (n + (m + m * n)) ^ p -- + (n + (m + m * n)) * suc (n + (m + m * n)) ^ p -- ≡ -- suc m ^ p * suc n ^ p + suc m ^ p * (n * suc n ^ p) -- + m * (suc m ^ p * suc n ^ p + suc m ^ p * (n * suc n ^ p)) | sym (suc-right-* m n) -- suc (n + m * suc n) ^ p -- + (n + m * suc n) * suc (n + m * suc n) ^ p -- ≡ -- suc m ^ p * suc n ^ p + suc m ^ p * (n * suc n ^ p) -- + m * (suc m ^ p * suc n ^ p + suc m ^ p * (n * suc n ^ p)) | distr-^-* (suc m) (suc n) p -- suc m ^ p * suc n ^ p + (n + m * suc n) * (suc m ^ p * suc n ^ p) -- ≡ -- suc m ^ p * suc n ^ p + suc m ^ p * (n * suc n ^ p) -- + m * (suc m ^ p * suc n ^ p + suc m ^ p * (n * suc n ^ p)) | distr-*-+ n (m * suc n) (suc m ^ p * suc n ^ p) -- suc m ^ p * suc n ^ p + (n * (suc m ^ p * suc n ^ p) -- + m * suc n * (suc m ^ p * suc n ^ p)) -- ≡ -- suc m ^ p * suc n ^ p + suc m ^ p * (n * suc n ^ p) -- + m * (suc m ^ p * suc n ^ p + suc m ^ p * (n * suc n ^ p)) | distl-*-+ m (suc m ^ p * suc n ^ p) (suc m ^ p * (n * suc n ^ p)) -- suc m ^ p * suc n ^ p + (n * (suc m ^ p * suc n ^ p) -- + m * suc n * (suc m ^ p * suc n ^ p)) -- ≡ -- suc m ^ p * suc n ^ p + suc m ^ p * (n * suc n ^ p) -- + (m * (suc m ^ p * suc n ^ p) + m * (suc m ^ p * (n * suc n ^ p))) | comm-* m (suc n) -- suc m ^ p * suc n ^ p + (n * (suc m ^ p * suc n ^ p) -- + (m + n * m) * (suc m ^ p * suc n ^ p)) -- ≡ -- suc m ^ p * suc n ^ p + suc m ^ p * (n * suc n ^ p) -- + (m * (suc m ^ p * suc n ^ p) + m * (suc m ^ p * (n * suc n ^ p))) | distr-*-+ m (n * m) (suc m ^ p * suc n ^ p) -- suc m ^ p * suc n ^ p + -- (n * (suc m ^ p * suc n ^ p) + -- (m * (suc m ^ p * suc n ^ p) + n * m * (suc m ^ p * suc n ^ p))) -- ≡ -- suc m ^ p * suc n ^ p + suc m ^ p * (n * suc n ^ p) + -- (m * (suc m ^ p * suc n ^ p) + m * (suc m ^ p * (n * suc n ^ p))) | swap-m-n-* n (suc m ^ p) (suc n ^ p) -- suc m ^ p * suc n ^ p + -- (suc m ^ p * (n * suc n ^ p) + -- (m * (suc m ^ p * suc n ^ p) + n * m * (suc m ^ p * suc n ^ p))) -- ≡ -- suc m ^ p * suc n ^ p + suc m ^ p * (n * suc n ^ p) + -- (m * (suc m ^ p * suc n ^ p) + m * (suc m ^ p * (n * suc n ^ p))) | swap-m-n-* (suc m ^ p) n (suc n ^ p) -- suc m ^ p * suc n ^ p + -- (n * (suc m ^ p * suc n ^ p) + -- (m * (suc m ^ p * suc n ^ p) + n * m * (suc m ^ p * suc n ^ p))) -- ≡ -- suc m ^ p * suc n ^ p + n * (suc m ^ p * suc n ^ p) + -- (m * (suc m ^ p * suc n ^ p) + m * (n * (suc m ^ p * suc n ^ p))) | sym (assoc-* m n (suc m ^ p * suc n ^ p)) -- suc m ^ p * suc n ^ p + -- (n * (suc m ^ p * suc n ^ p) + -- (m * (suc m ^ p * suc n ^ p) + n * m * (suc m ^ p * suc n ^ p))) -- ≡ -- suc m ^ p * suc n ^ p + n * (suc m ^ p * suc n ^ p) + -- (m * (suc m ^ p * suc n ^ p) + m * n * (suc m ^ p * suc n ^ p)) | comm-* m n -- suc m ^ p * suc n ^ p + -- (n * (suc m ^ p * suc n ^ p) + -- (m * (suc m ^ p * suc n ^ p) + n * m * (suc m ^ p * suc n ^ p))) -- ≡ -- suc m ^ p * suc n ^ p + n * (suc m ^ p * suc n ^ p) + -- (m * (suc m ^ p * suc n ^ p) + n * m * (suc m ^ p * suc n ^ p)) | assoc-+ (suc m ^ p * suc n ^ p) (n * (suc m ^ p * suc n ^ p)) (m * (suc m ^ p * suc n ^ p) + n * m * (suc m ^ p * suc n ^ p)) -- suc m ^ p * suc n ^ p + -- (n * (suc m ^ p * suc n ^ p) + -- (m * (suc m ^ p * suc n ^ p) + n * m * (suc m ^ p * suc n ^ p))) -- ≡ -- suc m ^ p * suc n ^ p + -- (n * (suc m ^ p * suc n ^ p) + -- (m * (suc m ^ p * suc n ^ p) + n * m * (suc m ^ p * suc n ^ p))) -- QED = refl --distr-^-* (suc m) (suc n) (suc p) -- rewrite -- distr-*-+ (suc m ^ p) (m * suc m ^ p) (suc n ^ p + n * suc n ^ p) -- | assoc-* m (suc m ^ p) (suc n ^ p + n * suc n ^ p) -- | distl-*-+ (suc m ^ p) (suc n ^ p) (n * suc n ^ p) -- | comm-* m (suc n) -- | comm-* n m -- | sym (suc-right-* m n) -- | distr-^-* (suc m) (suc n) p -- | distr-*-+ n (m * suc n) (suc m ^ p * suc n ^ p) -- | distl-*-+ m (suc m ^ p * suc n ^ p) (suc m ^ p * (n * suc n ^ p)) -- | comm-* m (suc n) -- | distr-*-+ m (n * m) (suc m ^ p * suc n ^ p) -- | swap-m-n-* n (suc m ^ p) (suc n ^ p) -- | swap-m-n-* (suc m ^ p) n (suc n ^ p) -- | sym (assoc-* m n (suc m ^ p * suc n ^ p)) -- | comm-* m n -- | assoc-+ (suc m ^ p * suc n ^ p) (n * (suc m ^ p * suc n ^ p)) -- (m * (suc m ^ p * suc n ^ p) + n * m * (suc m ^ p * suc n ^ p)) -- = refl --------------------------------------- Relations --------------------------------------- data _≤_ : ℕ → ℕ → Set where z≤n : ∀ {n : ℕ} → zero ≤ n s≤s : ∀ {m n : ℕ} → m ≤ n → suc m ≤ suc n _ : 2 ≤ 4 _ = s≤s (s≤s z≤n) --_ = s≤s {1} {3} (s≤s {0} {2} (z≤n {2})) inv-s≤s : ∀ {m n : ℕ} → suc m ≤ suc n → m ≤ n inv-s≤s (s≤s m≤n) = m≤n inv-z≤n : ∀ {m : ℕ} → m ≤ zero → m ≡ zero inv-z≤n z≤n = refl refl-≤ : ∀ {n : ℕ} → n ≤ n refl-≤ {zero} = z≤n refl-≤ {suc o} = s≤s refl-≤ trans-≤ : ∀ {m n p : ℕ} → m ≤ n → n ≤ p → m ≤ p trans-≤ z≤n _ = z≤n trans-≤ (s≤s m≤n) (s≤s n≤p) = s≤s (trans-≤ m≤n n≤p) antisym-≤ : ∀ {m n : ℕ} → m ≤ n → n ≤ m → m ≡ n antisym-≤ z≤n n≤m = sym (inv-z≤n n≤m) antisym-≤ (s≤s m≤n) (s≤s n≤m) = cong suc (antisym-≤ m≤n n≤m) open import Data.Sum using (_⊎_; inj₁; inj₂) renaming ([_,_] to case-⊎) --data Total (m n : ℕ) : Set where -- forward : m ≤ n → Total m n -- flipped : n ≤ m → Total m n -- --total-≤ : ∀ (m n : ℕ) → Total m n --total-≤ zero _ = forward z≤n --total-≤ (suc m) zero = flipped z≤n --total-≤ (suc m) (suc n) with total-≤ m n --... | forward m≤n = forward (s≤s m≤n) --... | flipped n≤m = flipped (s≤s n≤m) total-≤` : ∀ (m n : ℕ) → m ≤ n ⊎ n ≤ m total-≤` zero _ = inj₁ z≤n total-≤` _ zero = inj₂ z≤n total-≤` (suc m) (suc n) with total-≤` m n ... | inj₁ m≤n = inj₁ (s≤s m≤n) ... | inj₂ n≤m = inj₂ (s≤s n≤m) --+-monoʳ-≤ : ∀ (n p q : ℕ) → p ≤ q → (n + p) ≤ (n + q) --+-monoʳ-≤ zero _ _ p≤q = p≤q --+-monoʳ-≤ (suc n) p q p≤q = s≤s (+-monoʳ-≤ n p q p≤q) +-monoʳ-≤ : ∀ {n p q : ℕ} → p ≤ q → (n + p) ≤ (n + q) +-monoʳ-≤ {zero} p≤q = p≤q +-monoʳ-≤ {suc n} p≤q = s≤s (+-monoʳ-≤ {n} p≤q) +-monoˡ-≤ : ∀ {m n p : ℕ} → m ≤ n → (m + p) ≤ (n + p) +-monoˡ-≤ {m} {n} {p} m≤n rewrite comm-+ m p | comm-+ n p = +-monoʳ-≤ m≤n -- From book ≤-trans : ∀ {m n p : ℕ} → m ≤ n → n ≤ p → m ≤ p ≤-trans z≤n _ = z≤n ≤-trans (s≤s m≤n) (s≤s n≤p) = s≤s (≤-trans m≤n n≤p) +-mono-≤ : ∀ {m n p q : ℕ} → m ≤ n → p ≤ q → (m + p) ≤ (n + q) +-mono-≤ m≤n p≤q = ≤-trans (+-monoˡ-≤ m≤n) (+-monoʳ-≤ p≤q) -- Exercises *-monoʳ-≤ : ∀ {n p q : ℕ} → p ≤ q → (n * p) ≤ (n * q) *-monoʳ-≤ {zero} p≤q = z≤n *-monoʳ-≤ {suc n} p≤q = +-mono-≤ p≤q (*-monoʳ-≤ {n} p≤q) *-monoˡ-≤ : ∀ {m n p : ℕ} → m ≤ n → (m * p) ≤ (n * p) *-monoˡ-≤ {m} {n} {p} m≤n rewrite comm-* m p | comm-* n p = *-monoʳ-≤ {p} {m} {n} m≤n *-mono-≤ : ∀ {m n p q : ℕ} → m ≤ n → p ≤ q → (m * p) ≤ (n * q) *-mono-≤ {_} {n} m≤n p≤q = ≤-trans (*-monoˡ-≤ m≤n) (*-monoʳ-≤ {n} p≤q) infix 4 _<_ data _<_ : ℕ → ℕ → Set where z<s : ∀ {n : ℕ} → zero < suc n s<s : ∀ {m n : ℕ} → m < n → suc m < suc n <-trans : ∀ {m n p} → m < n → n < p → m < p --<-trans {m} {suc n} {suc p} z<s (s<s n<p) = z<s {p} --<-trans {suc m} {suc n} {suc p} (s<s m<n) (s<s n<p) = s<s (<-trans m<n n<p) <-trans z<s (s<s n<p) = z<s <-trans (s<s m<n) (s<s n<p) = s<s (<-trans m<n n<p) trichotomy : ∀ (m n) → (m ≡ n) ⊎ (m < n) ⊎ (n < m) trichotomy zero zero = inj₁ refl trichotomy zero (suc n) = inj₂ (inj₁ z<s) trichotomy (suc m) zero = inj₂ (inj₂ z<s) trichotomy (suc m) (suc n) with trichotomy m n ... | inj₁ m≡n = inj₁ (cong suc m≡n) ... | inj₂ (inj₁ m<n) = inj₂ (inj₁ (s<s m<n)) ... | inj₂ (inj₂ n<m) = inj₂ (inj₂ (s<s n<m)) +-monoʳ-< : ∀ {n p q} → p < q → (n + p) < (n + q) +-monoʳ-< {zero} p<q = p<q +-monoʳ-< {suc n} p<q = s<s (+-monoʳ-< p<q) +-monoˡ-< : ∀ {m n p} → m < n → (m + p) < (n + p) +-monoˡ-< {m} {n} {p} m<n rewrite comm-+ m p | comm-+ n p = +-monoʳ-< m<n +-mono-< : ∀ {m n p q} → m < n → p < q → (m + p) < (n + q) +-mono-< m<n p<q = <-trans (+-monoˡ-< m<n) (+-monoʳ-< p<q) -- From Software Verification Class (nice exercises but the two first are -- unnecessary in Agda because the proofs are basically the relation -- definition) ≡0 : ∀ {n : ℕ} → ¬( 0 < n ) → n ≡ 0 ≡0 {zero} _ = refl ≡0 {suc n} ¬0<n = ⊥-elim (¬0<n z<s) --0< : ∀ {n : ℕ} → n ≢ 0 → 0 < n 0< : ∀ {n : ℕ} → ¬( n ≡ 0 ) → 0 < n 0< {zero} 0≢0 = ⊥-elim (0≢0 refl) 0< {suc n} s≢0 = z<s ¬n<z : ∀ {n : ℕ} → ¬( n < 0 ) ¬n<z () m<sn→m<n⊎m≡n : {m n : ℕ} → (m < suc n) → (m < n) ⊎ (m ≡ n) m<sn→m<n⊎m≡n {zero} {zero} _ = inj₂ refl m<sn→m<n⊎m≡n {zero} {suc n} _ = inj₁ z<s m<sn→m<n⊎m≡n {suc m} {zero} (s<s ()) m<sn→m<n⊎m≡n {suc m} {suc n} (s<s m<sn) with m<sn→m<n⊎m≡n {m} {n} m<sn ... | inj₁ m<n = inj₁ (s<s m<n) ... | inj₂ m≡n = inj₂ (cong suc m≡n) suc-step : {m n : ℕ} → (m < suc n) × (m ≢ n) → m < n suc-step {zero} {zero} ⟨ 0<1 , 0≢0 ⟩ = 0< 0≢0 suc-step {zero} {suc n} ⟨ 0<ssn , 0≢sn ⟩ = z<s suc-step {suc m} {zero} ⟨ s<s m<0 , sm≢0 ⟩ = ⊥-elim (¬n<z m<0) suc-step {suc m} {suc n} ⟨ s<s m<sn , sm≢sn ⟩ with m<sn→m<n⊎m≡n m<sn ... | inj₁ m<n = s<s m<n ... | inj₂ m≡n = ⊥-elim (sm≢sn (cong suc m≡n)) -- This idea of using returning ∃ in Athena might be fundamental but it is -- clumsy or cumbersome in Agda discrete : ∀ {n : ℕ} → ¬ (∃[ m ] (n < m × m < suc n)) discrete {zero} ⟨ _ , ⟨ z<s , s<s () ⟩ ⟩ discrete {suc n} ⟨ zero , ⟨ () , _ ⟩ ⟩ discrete {suc n} ⟨ suc m , ⟨ s<s n<m , s<s m<sn ⟩ ⟩ = discrete ⟨ m , ⟨ n<m , m<sn ⟩ ⟩ -- This is unnecessary because it is the same as pred n -- proj₁ (S4 {_} {n} _) ≡ pred n --S4 : ∀ {m n : ℕ} → suc m < n → ∃[ n' ] ( n ≡ suc n' ) S4 : ∀ {m n : ℕ} → m < n → ∃[ n' ] ( n ≡ suc n' ) S4 {_} {zero} () S4 {_} {suc n} _ = ⟨ n , refl ⟩ -- more interesting is: S4' : ∀ {m n : ℕ} → suc m ≤ n → ∃[ n' ] ( n ≡ suc n' ) S4' {_} {zero} () S4' {_} {suc n} _ = ⟨ n , refl ⟩ -- It is more interesting because, this is not true: -- S4' : ∀ {m n : ℕ} → m ≤ n → ∃[ n' ] ( n ≡ suc n' ) -- as opposed to S4. -- But still, it's something that isn't necessary in Agda irreflexive : ∀ {m : ℕ} → ¬(m < m) irreflexive {zero} () irreflexive {suc m} (s<s m<m) = irreflexive m<m trichotomy₂ : ∀ (m n) → (m ≡ n × ¬(m < n) × ¬(n < m)) ⊎ (m < n × m ≢ n × ¬(n < m)) ⊎ (n < m × m ≢ n × ¬(m < n)) trichotomy₂ zero zero = inj₁ ⟨ refl , ⟨ irreflexive , irreflexive ⟩ ⟩ trichotomy₂ zero (suc n) = inj₂ (inj₁ ⟨ z<s , ⟨ (λ()) , (λ()) ⟩ ⟩) trichotomy₂ (suc m) zero = inj₂ (inj₂ ⟨ z<s , ⟨ (λ()) , (λ()) ⟩ ⟩) trichotomy₂ (suc m) (suc n) with trichotomy₂ m n ... | inj₁ ⟨ m≡n , ⟨ ¬m<n , ¬n<m ⟩ ⟩ = inj₁ ⟨ cong suc m≡n , ⟨ (λ{(s<s m<n) → ¬m<n m<n}) , (λ{(s<s n<m) → ¬n<m n<m}) ⟩ ⟩ ... | inj₂ (inj₁ ⟨ m<n , ⟨ m≢n , ¬n<m ⟩ ⟩) = inj₂ (inj₁ ⟨ s<s m<n , ⟨ (λ{sm≡sn → m≢n (cong pred sm≡sn)}) , (λ{(s<s n<m) → ¬n<m n<m}) ⟩ ⟩) ... | inj₂ (inj₂ ⟨ n<m , ⟨ m≢n , ¬m<n ⟩ ⟩) = inj₂ (inj₂ ⟨ s<s n<m , ⟨ (λ{sm≡sn → m≢n (cong pred sm≡sn)}) , (λ{(s<s m<n) → ¬m<n m<n}) ⟩ ⟩) --open import Function.Equivalence using (_⇔_) record _⇔_ (A B : Set) : Set where field to : A → B from : B → A open _⇔_ <-if-≤ : ∀ {m n} → suc m ≤ n → m < n <-if-≤ {zero} {suc n} z≤s = z<s <-if-≤ {suc m} {suc n} (s≤s sm≤n) = s<s (<-if-≤ sm≤n) ≤-if-< : ∀ {m n} → m < n → suc m ≤ n ≤-if-< {zero} {suc n} z<s = s≤s z≤n ≤-if-< {suc m} {suc n} (s<s m<n) = s≤s (≤-if-< m<n) ≤-iff-< : ∀ {m n} → (suc m ≤ n) ⇔ (m < n) ≤-iff-< = record { to = <-if-≤ ; from = ≤-if-< } pred-smaller : ∀ {m n} → suc m ≤ n → m ≤ n pred-smaller {zero} _ = z≤n pred-smaller {suc m} {suc n} (s≤s sm≤n) = s≤s (pred-smaller sm≤n) <-trans-revisited : ∀ {m n p} → m < n → n < p → m < p <-trans-revisited {m} {n} {p} m<n n<p = <-if-≤ (≤-trans (≤-if-< m<n) (pred-smaller (≤-if-< n<p))) --- data even : ℕ → Set data odd : ℕ → Set data even where zero-e : even zero suc-e : ∀ {n : ℕ} → odd n → even (suc n) data odd where suc-o : ∀ {n : ℕ} → even n → odd (suc n) --- data Can : Bin → Set data One : Bin → Set data Can where zero-C : Can (⟨⟩ O) one-C : ∀ {b : Bin} → One b → Can b data One where oneO : One (⟨⟩ I) oneO-O : ∀ {b : Bin} → One b → One (b O) oneO-I : ∀ {b : Bin} → One b → One (b I) _ : Can (⟨⟩ I) _ = one-C oneO inc-Bin : ∀ {b : Bin} → One b → One (inc b) inc-Bin oneO = oneO-O oneO inc-Bin (oneO-O ob) = oneO-I ob inc-Bin (oneO-I ob) = oneO-O (inc-Bin ob) inc-Can : ∀ {b : Bin} → Can b → Can (inc b) inc-Can zero-C = one-C oneO inc-Can (one-C ob) = one-C (inc-Bin ob) to-Can : ∀ (n : ℕ) → Can (toᵇ n) to-Can zero = zero-C to-Can (suc n) = inc-Can (to-Can n) twicebinisO : ∀ {b : Bin} → One b → b +ᵇ b ≡ b O twicebinisO {⟨⟩ I} _ = refl twicebinisO {b O} (oneO-O ob) rewrite twicebinisO ob = refl twicebinisO {b I} (oneO-I ob) rewrite twicebinisO ob = refl to∘from-Can : ∀ {b : Bin} → Can b → toᵇ (fromᵇ b) ≡ b to∘from-Can zero-C = refl to∘from-Can (one-C oneO) = refl to∘from-Can {b O} (one-C (oneO-O ob)) rewrite monobin (fromᵇ b) | to∘from-Can (one-C ob) | twicebinisO ob = refl to∘from-Can {b I} (one-C (oneO-I ob)) rewrite monobin (fromᵇ b) | to∘from-Can (one-C ob) | twicebinisO ob = refl --------------------------------------- Equality --------------------------------------- module ≤-Reasoning where infix 1 begin≤_ infixr 2 _≤⟨⟩_ _≤⟨_⟩_ infix 3 _∎≤ begin≤_ : ∀ {x y : ℕ} → x ≤ y → x ≤ y begin≤ x≤y = x≤y _≤⟨⟩_ : ∀ (x : ℕ) {y : ℕ} → x ≤ y → x ≤ y x ≤⟨⟩ x≤y = x≤y _≤⟨_⟩_ : ∀ (x : ℕ) {y z : ℕ} → x ≤ y → y ≤ z → x ≤ z x ≤⟨ x≤y ⟩ y≤z = trans-≤ x≤y y≤z _∎≤ : ∀ (x : ℕ) → x ≤ x x ∎≤ = refl-≤ open ≤-Reasoning +-monoʳ-≤` : ∀ {n p q : ℕ} → p ≤ q → (n + p) ≤ (n + q) +-monoʳ-≤` {zero} p≤q = p≤q +-monoʳ-≤` {suc n} {p} {q} p≤q = begin≤ suc n + p ≤⟨⟩ suc (n + p) ≤⟨ s≤s (+-monoʳ-≤` p≤q) ⟩ suc (n + q) ≤⟨⟩ suc n + q ∎≤ pred≡ : ∀ {m n : ℕ} → suc m ≡ suc n → m ≡ n pred≡ = cong pred ≡to≤ : ∀ {m n : ℕ} → m ≡ n → m ≤ n ≡to≤ {zero} {zero} _ = refl-≤ ≡to≤ {suc m} {suc n} sm≡sn = s≤s (≡to≤ (cong pred sm≡sn)) +-monoˡ-≤` : ∀ {m n p : ℕ} → m ≤ n → (m + p) ≤ (n + p) +-monoˡ-≤` {m} {n} {p} m≤n = begin≤ m + p ≤⟨ ≡to≤ (comm-+ m p) ⟩ p + m ≤⟨ +-monoʳ-≤` {p} {m} {n} m≤n ⟩ p + n ≤⟨ ≡to≤ (comm-+ p n) ⟩ n + p ∎≤ +-mono-≤` : ∀ {m n p q : ℕ} → m ≤ n → p ≤ q → (m + p) ≤ (n + q) +-mono-≤` {m} {n} {p} {q} m≤n p≤q = begin≤ m + p ≤⟨ +-monoˡ-≤` m≤n ⟩ n + p ≤⟨ +-monoʳ-≤` p≤q ⟩ n + q ∎≤ --even-comm′ : ∀ (m n : ℕ) -- → even (m + n) -- ------------ -- → even (n + m) --even-comm′ m n ev with m + n | comm-+ m n --... | .(n + m) | refl = ev --------------------------------------- Isomorphism --------------------------------------- postulate extensionality : ∀ {A B : Set} {f g : A → B} → (∀ (x : A) → f x ≡ g x) ----------------------- → f ≡ g _+′_ : ℕ → ℕ → ℕ m +′ zero = m m +′ suc n = suc (m +′ n) same-app : ∀ (m n : ℕ) → m +′ n ≡ m + n same-app m n rewrite comm-+ m n = helper m n where helper : ∀ (m n : ℕ) → m +′ n ≡ n + m helper _ zero = refl helper m (suc n) = cong suc (helper m n) same-+-+′ : _+′_ ≡ _+_ same-+-+′ = extensionality (λ m → extensionality (λ n → same-app m n)) --open import Level using (Level; _⊔_) renaming (zero to lzero; suc to lsuc) -- --private -- variable -- ℓ ℓ₁ : Level --infix 0 _≃_ --record _≃_ (A : Set ℓ) (B : Set ℓ₁) : Set (ℓ ⊔ ℓ₁) where record _≃_ (A B : Set) : Set where field to : A → B from : B → A from∘to : ∀ (x : A) → from (to x) ≡ x to∘from : ∀ (y : B) → to (from y) ≡ y open _≃_ ≃-refl : ∀ {A : Set} → A ≃ A ≃-refl = record { to = λ x → x ; from = λ y → y ; from∘to = λ x → refl ; to∘from = λ y → refl } ≃-sym : ∀ {A B : Set} → A ≃ B → B ≃ A ≃-sym A≃B = record { to = from A≃B ; from = to A≃B ; from∘to = to∘from A≃B ; to∘from = from∘to A≃B } open import Function.Base using (_∘_) ≃-trans : ∀ {A B C : Set} → A ≃ B → B ≃ C → A ≃ C ≃-trans A≃B B≃C = record { to = to B≃C ∘ to A≃B ; from = from A≃B ∘ from B≃C ; from∘to = λ{x → begin from A≃B (from B≃C (to B≃C (to A≃B x))) ≡⟨ cong (from A≃B) (from∘to B≃C (to A≃B x)) ⟩ from A≃B (to A≃B x) ≡⟨ from∘to A≃B x ⟩ x ∎ } ; to∘from = λ{y → begin to B≃C (to A≃B (from A≃B (from B≃C y))) ≡⟨ cong (to B≃C) (to∘from A≃B (from B≃C y)) ⟩ to B≃C (from B≃C y) ≡⟨ to∘from B≃C y ⟩ y ∎ } } infix 0 _≲_ record _≲_ (A B : Set) : Set where field to : A → B from : B → A from∘to : ∀ (x : A) → from (to x) ≡ x open _≲_ ≃-implies-≲ : ∀ {A B : Set} → A ≃ B → A ≲ B ≃-implies-≲ A≃B = record { to = to A≃B ; from = from A≃B ; from∘to = from∘to A≃B } -- Idea: Prove that (ℕ) is isomorph to (Can) -- Idea: Prove that (+, ℕ) is isomorph to (+ᵇ, Can) --record _⇔_ (A B : Set) : Set where -- field -- to : A → B -- from : B → A -- Exercise: implement reflexive, symetric and transitive properties on _⇔_ ℕ≲Bin : ℕ ≲ Bin ℕ≲Bin = record { to = toᵇ ; from = fromᵇ ; from∘to = from∘toᵇ } data Dec-Can : Set where num : ∀ (b : Bin) → Can b → Dec-Can toᵈᶜ : ℕ → Dec-Can toᵈᶜ n = num (toᵇ n) (to-Can n) --toᵈᶜ n = num (to-Can n) fromᵈᶜ : Dec-Can → ℕ fromᵈᶜ (num b _) = fromᵇ b --from∘toᵈᶜ (suc n) = ? -- λ n → fromᵈᶜ (toᵈᶜ (suc n)) ≡ suc n -- λ cb → toᵈᶜ (fromᵈᶜ (num cb)) ≡ num cb -- λ b ob → toᵈᶜ (fromᵈᶜ (num (b O) (one-C (oneO-O ob)))) --to∘fromᵈᶜ : ∀ (y : Dec-Can) → toᵈᶜ (fromᵈᶜ y) ≡ y --to∘fromᵈᶜ (num (⟨⟩ O) zero-C) = refl --to∘fromᵈᶜ (num (⟨⟩ I) (one-C oneO)) = refl --to∘fromᵈᶜ (num (b O) (one-C (oneO-O {b} ob))) rewrite monobin (fromᵇ b) = ? ---- λ b ob → toᵈᶜ (fromᵈᶜ (num (b O) (one-C (oneO-O ob)))) ---- λ b ob → λ b ob → num (toᵇ (fromᵇ b + fromᵇ b)) (to-Can (fromᵇ b + fromᵇ b)) --to∘fromᵈᶜ = ? ----to∘fromᵈᶜ (num b cb) = ---- begin ---- toᵈᶜ (fromᵈᶜ (num b cb)) ---- ≡⟨⟩ ---- toᵈᶜ (fromᵇ b) ---- ≡⟨⟩ ---- num (toᵇ (fromᵇ b)) (to-Can (fromᵇ b)) ---- ≡⟨ ? ⟩ ---- num b cb ---- ∎ --ℕ≃Can : ℕ ≃ Dec-Can --ℕ≃Can = -- record -- { to = toᵈᶜ -- ; from = fromᵈᶜ -- ; from∘to = from∘toᵇ -- ; to∘from = ? -- to∘fromᵈᶜ -- to∘from-Can -- } --num (zero-C) --------------------------------------- Decidable --------------------------------------- -- Use `Dec` to create elements for `Can`. Look if this is enough to prove `ℕ ≃ Can` -- Ans: NO. Decidables don't do what you thought they do --------------------------------------- Last --------------------------------------- -- Prove that `sqrt 2` is irrational -- Stuff to take into account and add to agda neovim: -- IOTCM "plfa/part1/Naturals.agda" None Direct (Cmd_load "plfa/part1/Naturals.agda" []) -- IOTCM "plfa/part1/Naturals.agda" None Direct (Cmd_compute_toplevel DefaultCompute "2 + suc 3") # Already done by plugin -- IOTCM "plfa/part1/Naturals.agda" None Direct (Cmd_infer_toplevel AsIs "2 + suc 3") # THIS SHOULD BE PART OF THE STUFF IN MAGDA -- -- Other stuff: -- IOTCM "plfa/part1/Naturals.agda" None Direct (Cmd_show_module_contents_toplevel AsIs "Eq") -- IOTCM "plfa/part1/Naturals.agda" None Direct (Cmd_why_in_scope_toplevel "Eq") -- IOTCM "plfa/part1/Naturals.agda" None Direct (Cmd_why_in_scope (InteractionId 1) (Range (Just "plfa/part1/Naturals.agda") (Interval (Pn () 1 76 1) (Pn () 1 76 19))) "Eq") ---- IOTCM "plfa/part1/Naturals.agda" None Direct (Cmd_autoOne (InteractionId 1) noRange "") ---- IOTCM "plfa/part1/Naturals.agda" NonInteractive Indirect (Cmd_infer Simplified 103992 (intervalsToRange (Just (mkAbsolute "plfa/part1/Naturals.agda")) [Interval (Pn () 50 75 1) (Pn () 52 79 1)]) "3 + suc 2")
test/interaction/Auto-BasicLogic.agda
shlevy/agda
1,989
14462
<gh_stars>1000+ -- exercises -- * basic logic properties (implication, and, or, bot, not, forall, exists) -- * data types -- * records -- * non-dep, non-rec, non-indexed case splits -- * including elimination constants as hints -- * hidden arguments open import Auto.Prelude h0 : (A : Set) → A → A h0 = {!!} --h0 = λ A z → z h1 : (A B : Set) → A → (A → B) → B h1 = {!!} --h1 = λ A B z z₁ → z₁ z h2 : ∀ A B → A ∧ B → B ∧ A h2 = {!!} --h2 = λ A B z → ∧-i (_∧_.snd z) (_∧_.fst z) h3 : ∀ A B C → (A ∧ B) ∧ C → A ∧ (B ∧ C) h3 = {!!} --h3 = λ A B C z → -- ∧-i (_∧_.fst (_∧_.fst z)) (∧-i (_∧_.snd (_∧_.fst z)) (_∧_.snd z)) h4 : (A B C : Set) → A ∨ B → (A → C) → (B → C) → C h4 A B C x h₁ h₂ = {!-c!} h5 : ∀ A B → A ∨ B → B ∨ A h5 A B x = {!-c!} --h5 A B (∨-i₁ x) = ∨-i₂ x --h5 A B (∨-i₂ x) = ∨-i₁ x h6 : ∀ A B C → (A ∨ B) ∨ C → A ∨ (B ∨ C) h6 A B C x = {!-c!} --h6 A B C (∨-i₁ (∨-i₁ x)) = ∨-i₁ x --h6 A B C (∨-i₁ (∨-i₂ x)) = ∨-i₂ (∨-i₁ x) --h6 A B C (∨-i₂ x) = ∨-i₂ (∨-i₂ x) h7 : (A : Set) → ⊥ → A h7 A x = {!-c!} h8 : ∀ A → A → ¬ (¬ A) h8 = {!!} --h8 = λ A z z₁ → z₁ z h9 : ∀ A → ¬ (¬ (¬ A)) → ¬ A h9 = {!!} --h9 = λ A z z₁ → z (λ z₂ → z₂ z₁) h10 : (∀ A → ¬ (¬ A) → A) → (∀ A → A ∨ ¬ A) h10 = {!!} --h10 = λ z A → -- z (A ∨ ((x : A) → ⊥)) (λ z₁ → z₁ (∨-i₂ (λ x → z₁ (∨-i₁ x)))) h11 : (∀ A → A ∨ ¬ A) → (∀ A → ¬ (¬ A) → A) h11 = {!∨-e ⊥-e!} --h11 = λ z A z₁ → -- ∨-e A ((x : A) → ⊥) A (z A) (λ z₂ → z₂) (λ z₂ → ⊥-e A (z₁ z₂)) h12 : {X : Set} {P Q : X → Set} → ((x : X) → P x ∧ Q x) → ((x : X) → P x) ∧ ((x : X) → Q x) h12 = {!!} --h12 = λ {X} {P} {Q} z → ∧-i (λ x → _∧_.fst (z x)) (λ x → _∧_.snd (z x)) h13 : {X : Set} {P Q : X → Set} → ((x : X) → P x) ∧ ((x : X) → Q x) → ((x : X) → P x ∧ Q x) h13 = {!!} --h13 = λ {X} {P} {Q} z x → ∧-i (_∧_.fst z x) (_∧_.snd z x) n0 : {X : Set} {P Q : X → Set} → Σ X (λ x → P x ∨ Q x) → Σ X P ∨ Σ X Q --n0 = {!∨-e!} -- no solution found, not even for the two subproofs n0 = λ h → ∨-e _ _ _ (Σ.prf h) (λ x → ∨-i₁ (Σ-i (Σ.wit h) x)) (λ x → ∨-i₂ (Σ-i (Σ.wit h) x)) n1 : {X : Set} {P Q : X → Set} → Σ X P ∨ Σ X Q → Σ X (λ x → P x ∨ Q x) --n1 = {!∨-e!} -- no solution found, not even for the two subproofs n1 = λ h → ∨-e _ _ _ h (λ x → Σ-i (Σ.wit x) (∨-i₁ (Σ.prf x))) (λ x → Σ-i (Σ.wit x) (∨-i₂ (Σ.prf x))) h14 : {X : Set} → (x : X) → Σ X (λ x → ⊤) h14 = {!!} --h14 = λ {X} x → Σ-i x (record {}) h15 : {X : Set} → Σ (X → X) (λ x → ⊤) h15 = {!!} --h15 = λ {X} → Σ-i (λ x → x) (record {}) h16 : {X : Set} {P : X → Set} → Σ (X → X) (λ f → (x : X) → P (f x) → P x) h16 = {!!} --h16 = λ {X} {P} → Σ-i (λ x → x) (λ x x₁ → x₁) module Drink where postulate RAA : (A : Set) → (¬ A → ⊥) → A drink : (A : Set) → (a : A) → (Drink : A → Set) → Σ A (λ x → (Drink x) → Π A Drink) drink A a Drink = {!RAA!} -- h17 {- drink A a Drink = RAA (Σ A (λ z → (x : Drink z) → Π A Drink)) (λ z → z (Σ-i a (λ x → fun (λ a₁ → RAA (Drink a₁) (λ z₁ → z (Σ-i a₁ (λ x₁ → fun (λ a₂ → RAA (Drink a₂) (λ _ → z₁ x₁))))))))) -- h17 -}
oeis/015/A015555.asm
neoneye/loda-programs
11
86303
; A015555: Expansion of x/(1 - 7*x - 2*x^2). ; Submitted by <NAME>(s4) ; 0,1,7,51,371,2699,19635,142843,1039171,7559883,54997523,400102427,2910712035,21175189099,154047747763,1120684612539,8152887783299,59311583708171,431486861523795,3139031198082907,22836192109627939,166131407163561387,1208592234364185587,8792408454876421883,63964043652863324355,465333122479796114251,3385259944664299448467,24627485857609688367771,179162920892596417471331,1303395417963394299034859,9482093767528952928186675,68981447208629459095376443,501834317995464119524008451 mov $1,1 lpb $0 sub $0,1 mov $2,$3 mul $2,2 mul $3,7 add $3,$1 mov $1,$2 lpe mov $0,$3
source/sets-io.adb
jquorning/CELLE
0
15283
<reponame>jquorning/CELLE<gh_stars>0 with Ada.Text_IO; package body Sets.IO is procedure Put (Set : in Set_Type) is use Ada.Text_IO; begin if Set = Null_Set then Put ("<null>"); else for Bit of Set.all loop if Bit then Put ("1"); else Put (" "); end if; end loop; end if; end Put; end Sets.IO;
RecursiveTakeHome/SuleimanGCDAssembly.asm
Cristo12345/ComputerOrganization
1
81726
<gh_stars>1-10 # <NAME> # GCD Recursive li $a0, 44 #load values into registers li $a1, 8 li $a2, 0 # hold the result/temp sub $sp,$sp,16 # creating space on stack for 4 4-bytes of data (return address, a, b, res) sw $ra,0($sp) #storing values in registers into newly created space on stack sw $a0,4($sp) sw $a1,8($sp) sw $a2,12($sp) jal gcd #call gcd function sw $t0,12($sp) # save return address j EXIT gcd: # a0 and a1 are the two integer parameters, assuming a0 > a1 and a0, a1 > 0 sub $sp,$sp,12 sw $ra,0($sp) sw $a0,4($sp) sw $a1,8($sp) move $t0, $a0 move $t1, $a1 #loop: beq $t1, $0, done #if second arg(a0 % a1) is 0 we are finished div $t0, $t1 #divide our operands . . . Quotient gets sent to LO and remainder gets sent to HI move $t0, $t1 # a = b in euclid's algorithm mfhi $t1 # b = remainder move $a1,$t1 move $a0,$t0 jal gcd #return to start of loop done: #essentially a loop of returning to the return address once solution is met lw $ra,0($sp) # loading top of stack pointer into $ra addi $sp,$sp,12 # deallocating space we used to store local variables jr $ra EXIT:
examples/outdated-and-incorrect/iird/Identity.agda
asr/agda-kanso
1
2226
<reponame>asr/agda-kanso<filename>examples/outdated-and-incorrect/iird/Identity.agda module Identity where data _==_ {A : Set}(x : A) : A -> Set where refl : x == x elim== : {A : Set}(x : A)(C : (y : A) -> x == y -> Set) -> C x refl -> (y : A) -> (p : x == y) -> C y p elim== x C Cx .x refl = Cx elim==₁ : {A : Set}(x : A)(C : (y : A) -> x == y -> Set1) -> C x refl -> (y : A) -> (p : x == y) -> C y p elim==₁ x C Cx .x refl = Cx sym : {A : Set}{x y : A} -> x == y -> y == x sym {A}{x}{y} eq = elim== x (\z _ -> z == x) refl y eq cong : {A B : Set}(f : A -> B){x y : A} -> x == y -> f x == f y cong {A} f {x}{y} eq = elim== x (\z _ -> f x == f z) refl y eq subst : {A : Set}{x y : A}(P : A -> Set) -> x == y -> P x -> P y subst P xy px = elim== _ (\z _ -> P z) px _ xy subst₁ : {A : Set}{x y : A}(P : A -> Set1) -> x == y -> P x -> P y subst₁ P xy px = elim==₁ _ (\z _ -> P z) px _ xy symRef : (A : Set)(x : A) -> sym (refl{A}{x}) == refl symRef A x = refl symSym : {A : Set}{x y : A}(p : x == y) -> sym (sym p) == p symSym {A}{x}{y} p = elim== x (\y q -> sym (sym q) == q) refl y p -- Proving the symmetric elimination rule is not trivial. elimS : {A : Set}(x : A)(C : (y : A) -> y == x -> Set) -> C x refl -> (y : A) -> (p : y == x) -> C y p elimS x C r y p = subst (C y) (symSym p) h where h : C y (sym (sym p)) h = elim== x (\y p -> C y (sym p)) r y (sym p) data _==¹_ {A : Set1}(x : A) : {B : Set1} -> B -> Set where refl¹ : x ==¹ x subst¹ : {A : Set1}{x y : A}(P : A -> Set) -> x ==¹ y -> P x -> P y subst¹ {A} P refl¹ px = px
oeis/099/A099524.asm
neoneye/loda-programs
11
167931
; A099524: Expansion of 1/(1-5*x-x^3). ; Submitted by <NAME> ; 1,5,25,126,635,3200,16126,81265,409525,2063751,10400020,52409625,264111876,1330959400,6707206625,33800145001,170331684405,858365628650,4325628288251,21798473125660,109850731256950,553579284573001 mov $2,3 mov $3,3 lpb $0 sub $0,1 add $2,$3 mul $2,2 add $4,$3 add $2,$4 mov $4,$1 mov $1,$3 mov $3,$2 lpe mov $0,$2 div $0,3
Library/Styles/Manip/manipCopy.asm
steakknife/pcgeos
504
11241
COMMENT @---------------------------------------------------------------------- Copyright (c) Berkeley Softworks 1991 -- All Rights Reserved PROJECT: PC GEOS MODULE: Library/Styles FILE: Manip/manipCopy.asm REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 12/91 Initial version DESCRIPTION: This file contains code for StyleSheetGetStyle $Id: manipCopy.asm,v 1.1 97/04/07 11:15:27 newdeal Exp $ ------------------------------------------------------------------------------@ OPTIMIZE_STYLE_COPY = TRUE OPT_STYLE_ARRAY_CHUNK = size LMemBlockHeader OPT_ATTR_ARRAY_CHUNK = OPT_STYLE_ARRAY_CHUNK+2 OptEntry struct OE_sourceToken word OE_destToken word OE_sourceRef word OptEntry ends STYLE_COPY_LOCALS equ <\ STYLE_MANIP_LOCALS\ .warn -unref_local\ styleFlags local word\ destStyle local word\ destCopyFromStyle local word\ fromTransfer local byte\ changeDestStyles local byte\ optBlock local word\ createdNew local word\ oldBaseStyle local word\ .warn @unref_local\ > ManipCode segment resource COMMENT @---------------------------------------------------------------------- FUNCTION: CopyStyle DESCRIPTION: Copy a style from one attribute space to another. This routine can be called recusrively. CALLED BY: INTERNAL PASS: ss:bp - inherited variables ax - style to move fromTransfer - set if copying *from* transfer space changeDestStyles - set to force the source's definition of a style to the destination optBlock - optimization block RETURN: ax - style token in destination space DESTROYED: bx, cx, dx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 1/15/92 Initial version ------------------------------------------------------------------------------@ CopyStyle proc near STYLE_COPY_LOCALS .enter inherit far push styleToChange, destStyle, createdNew, oldBaseStyle ;*** base case: null element is the same everywhere cmp ax, CA_NULL_ELEMENT jnz 1$ toDone: jmp done 1$: clr createdNew mov bx, OPT_STYLE_ARRAY_CHUNK clr dx call LookupOpt jc toDone ;*** try to locate the style in the destination space mov styleToChange, ax call Load_dssi_sourceStyle call ChunkArrayElementToPtr ;ds:di = element, cx = size mov ax, ds:[di].SEH_baseStyle mov oldBaseStyle, ax mov ax, ds:[di].SEH_flags mov styleFlags, ax movdw privateData, ds:[di].SEH_privateData, ax CheckHack <(size SEH_reserved) eq 6> mov ax, {word} ds:[di].SEH_reserved mov {word} reserved, ax mov ax, {word} ds:[di].SEH_reserved+2 mov {word} reserved+2, ax mov ax, {word} ds:[di].SEH_reserved+4 mov {word} reserved+4, ax segmov es, ds mov si, ds:[si] mov bx, ds:[si].NAH_dataSize add bx, NameArrayElement add di, bx ;es:di = name sub cx, bx ;cx = name size DBCS < shr cx, 1 ;cx <- name length > call Load_dssi_destStyle clr dx call NameArrayFind ;ax = token found cmp ax, CA_NULL_ELEMENT jz doesNotExistInDest ;*** The style exists in the destination space -- if we are not ; forcing the source's view of the world then we're done, ; otherwise we have to change the destination to our view of the ; world ; Also, if we are copying to the transfer space then we can assume ; that the spaces have the same definition of styles tst fromTransfer jz skipMerge tst changeDestStyles jnz common skipMerge: jmp addOpt ;*** The style does not exist in the destination space -- create it doesNotExistInDest: inc createdNew tst fromTransfer jz afterInc call StyleSheetIncNotifyCounter afterInc: clr bx call NameArrayAdd ;ax = token EC < ERROR_NC STYLE_SHOULD_NOT_HAVE_EXISTED > call DerefStyleLocals call ChunkArrayElementToPtr movdw ds:[di].SEH_privateData, privateData, cx CheckHack <(size SEH_reserved) eq 6> mov cx, {word} reserved mov {word} ds:[di].SEH_reserved, cx mov cx, {word} reserved+2 mov {word} ds:[di].SEH_reserved+2, cx mov cx, {word} reserved+4 mov {word} ds:[di].SEH_reserved+4, cx mov cx, styleFlags mov ds:[di].SEH_flags, cx common: mov destStyle, ax ;*** copy the base style mov ax, oldBaseStyle ;ax = base style call CopyStyle ;ax = base style (in dest) mov_tr bx, ax call Load_dssi_destStyle call ObjMarkDirty mov ax, destStyle call ChunkArrayElementToPtr mov ds:[di].SEH_baseStyle, bx mov destCopyFromStyle, bx ;*** copy attributes from source to dest attrLoop: mov ax, CA_NULL_ELEMENT call LockLoopAttrArray call Load_dssi_sourceStyle mov ax, styleToChange call ChunkArrayElementToPtr add di, attrCounter2 mov ax, ds:[di].SEH_attrTokens ;ax = source element ; pass base style of style being copied as old base style push styleToChange mov dx, oldBaseStyle mov styleToChange, dx clr dx call CopyElement ;ax = element in dest space pop styleToChange lea di, changeAttrs add di, attrCounter2 mov ss:[di], ax call UnlockLoopAttrArray jnz attrLoop ; We have now copied the attribute elements to the destination space. ; If the destination space and the attribute elements are different ; then we need to change the style call Load_dssi_destStyle mov ax, destStyle call ChunkArrayElementToPtr ;ds:di = dest style mov cx, attrTotal clr dx ;dx = differ flag lea bx, changeAttrs copyOrCompareLoop: mov ax, ss:[bx] tst createdNew jnz storeAttr tst fromTransfer jnz compare ; going to transfer, just copy the tokens storeAttr: mov ds:[di].SEH_attrTokens, ax jmp common2 ; going to object, store the tokens in changeAttrs compare: cmp ax, ds:[di].SEH_attrTokens jz common2 inc dx common2: add bx, size word add di, size word loop copyOrCompareLoop tst fromTransfer jz afterChangeStyle tst createdNew jnz afterChangeStyle tst dx jz decRefCountLoop ; we're copying from the transfer -- set the sucker mov ax, destStyle xchg ax, styleToChange push ax call ChangeStyle pop styleToChange decRefCountLoop: mov ax, CA_NULL_ELEMENT call LockLoopAttrArray ;ds:si = attr array ;ds:di = element, cx = size ;ax = change element lea di, changeAttrs add di, attrCounter2 mov ax, ss:[di] ;ax = old attribute token call Load_dssi_destAttr clr bx call ElementArrayRemoveReference call UnlockLoopAttrArray jnz decRefCountLoop afterChangeStyle: mov ax, destStyle addOpt: mov bx, OPT_STYLE_ARRAY_CHUNK mov cx, styleToChange clr dx call AddOpt done: pop styleToChange, destStyle, createdNew, oldBaseStyle .leave ret CopyStyle endp COMMENT @---------------------------------------------------------------------- FUNCTION: CopyElement DESCRIPTION: Copy an style from one attribute space to another. This *IS NOT* called recusrively. This adds a reference for the element in the destination space. CALLED BY: INTERNAL PASS: ss:bp - inherited variables ax - element # to copy (source space) dx - non-zero if styleToChange actually holds an attribute token styleToChange - style element to be based on in source space destStyle - style for element to be based on in destination space destCopyFromStyle - style to copy elements from in destination space attrCounter2 - offset of attribute array to work on fromTransfer - set if copying *from* transfer space changeDestStyles - set to force the source's definition of a style to the destination optBlock - optimization block RETURN: ax - element token in destination space DESTROYED: bx, cx, dx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 1/15/92 Initial version ------------------------------------------------------------------------------@ CopyElement proc near STYLE_COPY_LOCALS .enter inherit far ; if we are not forcing the source's views to the destination then ; we need to merge stuff tst fromTransfer jz noMerge tst changeDestStyles jnz noMerge cmp destCopyFromStyle, CA_NULL_ELEMENT jz noMerge ; copy the element to transfer mov bx, -2 ;fake base style for element call LowLevelCopyElement ;ax = style in dest (TARGET) ; get the OLD base element and temporarily add it to the destination push ax ;save TARGET mov ax, styleToChange tst dx jnz 10$ call Load_dssi_sourceStyle call ElementToPtrCheckNull jnc 20$ add di, attrCounter2 mov ax, ds:[di].SEH_attrTokens ;ax = old element in source 10$: mov bx, destCopyFromStyle ;base style for element call LowLevelCopyElement ;ax = old element in dest 20$: push ax ;push OLD call Load_dssi_destStyle mov ax, destCopyFromStyle call ChunkArrayElementToPtr add di, attrCounter2 mov ax, ds:[di].SEH_attrTokens ;ax = NEW mov_tr cx, ax ;cx = NEW pop ax ;ax = OLD pop bx ;bx = TARGET call MergeToken ; remove OLD (which we temporarily added) push bx call Load_dssi_destAttr clr bx cmp ax, CA_NULL_ELEMENT jz noRemoveOld call ElementArrayRemoveReference noRemoveOld: pop ax ; change target to have the correct base element call ChunkArrayElementToPtr mov bx, destStyle mov ds:[di].SEH_baseStyle, bx clr bx ;no callback call ElementArrayElementChanged ;ax possibly changed done: .leave ret noMerge: mov bx, destStyle call LowLevelCopyElement ;ax = style in dest jmp done CopyElement endp COMMENT @---------------------------------------------------------------------- FUNCTION: LowLevelCopyElement DESCRIPTION: Copy an element This adds a reference for the element in the destination space. CALLED BY: INTERNAL PASS: ss:bp - inherited variables ax - element # to copy (source space) bx - style for element attrCounter2 - offset of attribute array to work on RETURN: ax - element token in destination space DESTROYED: bx, cx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 1/15/92 Initial version ------------------------------------------------------------------------------@ LowLevelCopyElement proc near uses dx STYLE_COPY_LOCALS .enter inherit far ; get the source element into a buffer call Load_dssi_destAttr ;dssi = dest movdw cxdx, dssi ;cxdx = dest call Load_dssi_sourceAttr ;dssi = source mov di, STYLE_SHEET_MAX_ELEMENT_SIZE + 200 call ThreadBorrowStackSpace push di push bp sub sp, STYLE_SHEET_MAX_ELEMENT_SIZE mov bp, sp pushdw cxdx ;save dest array EC < cmp ax, CA_NULL_ELEMENT > EC < ERROR_Z STYLE_SHEET_CANNOT_COPY_NULL_ELEMENT > call ElementToPtrCheckNull ;cx = size EC < cmp cx, STYLE_SHEET_MAX_ELEMENT_SIZE > EC < ERROR_A STYLE_SHEET_ELEMENT_IS_TOO_LARGE > mov si, di ;ds:si = source segmov es, ss mov di, bp ;es:di = dest push cx rep movsb pop ax ;ax = size ; add the element in the destination (after setting the style) mov es:[bp].SSEH_style, bx popdw dssi ;dssi = dest array movdw cxdx, ssbp ;cx:dx = element clr bx call ElementArrayAddElement ;ax = token add sp, STYLE_SHEET_MAX_ELEMENT_SIZE pop bp pop di call ThreadReturnStackSpace call DerefStyleLocals .leave ret LowLevelCopyElement endp ;--- Load_dssi_sourceStyle proc near STYLE_COPY_LOCALS .enter inherit far tst fromTransfer jnz from GOTO Load_dssi_styleArray from: .leave FALL_THRU Load_dssi_xferStyleArray Load_dssi_sourceStyle endp ;--- Load_dssi_xferStyleArray proc near STYLE_LOCALS .enter inherit far movdw dssi, xferStyleArray .leave ret Load_dssi_xferStyleArray endp ;--- Load_dssi_destStyle proc near STYLE_COPY_LOCALS .enter inherit far tst fromTransfer jnz from GOTO Load_dssi_xferStyleArray from: .leave GOTO Load_dssi_styleArray Load_dssi_destStyle endp ;--- Load_dssi_sourceAttr proc near STYLE_COPY_LOCALS .enter inherit far tst fromTransfer jnz from GOTO Load_dssi_attrArray from: .leave FALL_THRU Load_dssi_xferAttrArray Load_dssi_sourceAttr endp ;--- Load_dssi_xferAttrArray proc near STYLE_LOCALS .enter inherit far movdw dssi, xferAttrArray .leave ret Load_dssi_xferAttrArray endp ;--- Load_dssi_destAttr proc near STYLE_COPY_LOCALS .enter inherit far tst fromTransfer jnz from GOTO Load_dssi_xferAttrArray from: .leave GOTO Load_dssi_attrArray Load_dssi_destAttr endp COMMENT @---------------------------------------------------------------------- FUNCTION: LookupOpt DESCRIPTION: Look for a specific entry in the optimization block CALLED BY: INTERNAL PASS: ax - source token to look for bx - chunk to look in dx - source reference ss:bp - inherited variables RETURN: carry - set if found ax - token in destination space (in found) else unchanged DESTROYED: cx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 2/14/92 Initial version ------------------------------------------------------------------------------@ LookupOpt proc near STYLE_COPY_LOCALS .enter inherit far if OPTIMIZE_STYLE_COPY mov di, bx mov bx, optBlock tst bx jz exit push ax call MemLock mov es, ax ;*es:di = chunk pop ax mov di, es:[di] cmp di, -1 jz notFound ChunkSizePtr es, di, cx searchLoop: scasw jz maybeFound next: add di, (size OptEntry) - (size word) sub cx, size OptEntry jnz searchLoop notFound: clc jmp done maybeFound: cmp dx, es:[di-2].OE_sourceRef jnz next mov ax, es:[di-2].OE_destToken stc done: call MemUnlock exit: else clc endif .leave ret LookupOpt endp COMMENT @---------------------------------------------------------------------- FUNCTION: AddOpt DESCRIPTION: Add a source-dest pair to the optimization block CALLED BY: INTERNAL PASS: ax - destination token bx - chunk to look in cx - source token dx - source reference ss:bp - inherited variables RETURN: none DESTROYED: bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 2/14/92 Initial version ------------------------------------------------------------------------------@ AddOpt proc near STYLE_COPY_LOCALS .enter inherit far if OPTIMIZE_STYLE_COPY push ax, cx mov si, bx mov bx, optBlock tst bx jnz haveOptBlock ; allocate an optimization block mov ax, LMEM_TYPE_GENERAL clr cx call MemAllocLMem mov optBlock, bx call MemLock mov ds, ax call LMemAlloc EC < cmp ax, OPT_STYLE_ARRAY_CHUNK > EC < ERROR_NZ STYLE_SHEET_WRONG_CHUNK_ALLOCATED > call LMemAlloc EC < cmp ax, OPT_ATTR_ARRAY_CHUNK > EC < ERROR_NZ STYLE_SHEET_WRONG_CHUNK_ALLOCATED > call LMemAlloc call LMemAlloc call LMemAlloc jmp common haveOptBlock: call MemLock mov ds, ax common: ; insert an entry at the front mov ax, si ;ax = chunk clr bx mov cx, size OptEntry call LMemInsertAt ; fill it in mov si, ds:[si] pop ax, cx mov ds:[si].OE_destToken, ax mov ds:[si].OE_sourceRef, dx mov ds:[si].OE_sourceToken, cx mov bx, optBlock call MemUnlock endif .leave ret AddOpt endp ManipCode ends
projects/batfish/src/org/batfish/grammar/cisco/Cisco_static.g4
Alexia23/batfish
1
7005
parser grammar Cisco_static; import Cisco_common; options { tokenVocab = CiscoLexer; } address_family_s_stanza : ADDRESS_FAMILY ( IPV4 | IPV6 ) ( UNICAST | MULTICAST ) NEWLINE common_s_stanza* ; common_s_stanza : static_route_s_stanza ; router_static_stanza : ROUTER STATIC NEWLINE s_stanza* ; s_stanza : address_family_s_stanza | common_s_stanza | vrf_s_stanza ; static_route_s_stanza : IP_PREFIX IP_ADDRESS NEWLINE ; vrf_s_stanza : VRF name = variable NEWLINE vs_stanza* ; vs_stanza : address_family_s_stanza | common_s_stanza ;
alloy4fun_models/trashltl/models/9/dDeD3cbiMLr46x4nN.als
Kaixi26/org.alloytools.alloy
0
3248
<reponame>Kaixi26/org.alloytools.alloy open main pred iddDeD3cbiMLr46x4nN_prop10 { always (all f:File | f in Protected since f in Protected) } pred __repair { iddDeD3cbiMLr46x4nN_prop10 } check __repair { iddDeD3cbiMLr46x4nN_prop10 <=> prop10o }
1-base/lace/source/lace-any.ads
charlie5/lace
20
16315
package lace.Any -- -- Provides a base class for 'any' other class. -- Allows for heteroegenous containers. -- Similar, in intent, to the 'void*' of C (for Ada tagged types). -- is pragma Pure; type Item is interface; type limited_Item is limited interface; end lace.Any;
gcc-gcc-7_3_0-release/gcc/ada/s-mudido.ads
best08618/asylo
7
4288
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- SYSTEM.MULTIPROCESSORS.DISPATCHING_DOMAINS -- -- -- -- S p e c -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. In accordance with the copyright of that document, you can freely -- -- copy and modify this specification, provided that if you redistribute a -- -- modified version, any changes that you have made are clearly indicated. -- -- -- ------------------------------------------------------------------------------ with Ada.Real_Time; with Ada.Task_Identification; private with System.Tasking; package System.Multiprocessors.Dispatching_Domains is -- pragma Preelaborate (Dispatching_Domains); -- ??? According to AI 167 this unit should be preelaborate, but it cannot -- be preelaborate because it depends on Ada.Real_Time which is not -- preelaborate. Dispatching_Domain_Error : exception; type Dispatching_Domain (<>) is limited private; System_Dispatching_Domain : constant Dispatching_Domain; function Create (First : CPU; Last : CPU_Range) return Dispatching_Domain; function Get_First_CPU (Domain : Dispatching_Domain) return CPU; function Get_Last_CPU (Domain : Dispatching_Domain) return CPU_Range; type CPU_Set is array (CPU range <>) of Boolean; function Create (Set : CPU_Set) return Dispatching_Domain; function Get_CPU_Set (Domain : Dispatching_Domain) return CPU_Set; function Get_Dispatching_Domain (T : Ada.Task_Identification.Task_Id := Ada.Task_Identification.Current_Task) return Dispatching_Domain; procedure Assign_Task (Domain : in out Dispatching_Domain; CPU : CPU_Range := Not_A_Specific_CPU; T : Ada.Task_Identification.Task_Id := Ada.Task_Identification.Current_Task); procedure Set_CPU (CPU : CPU_Range; T : Ada.Task_Identification.Task_Id := Ada.Task_Identification.Current_Task); function Get_CPU (T : Ada.Task_Identification.Task_Id := Ada.Task_Identification.Current_Task) return CPU_Range; procedure Delay_Until_And_Set_CPU (Delay_Until_Time : Ada.Real_Time.Time; CPU : CPU_Range); private type Dispatching_Domain is new System.Tasking.Dispatching_Domain_Access; System_Dispatching_Domain : constant Dispatching_Domain := Dispatching_Domain (System.Tasking.System_Domain); end System.Multiprocessors.Dispatching_Domains;