check in v3.8.2 source

This commit is contained in:
2023-11-06 23:46:37 -08:00
parent e2db88c634
commit 2b68369a2b
1216 changed files with 563118 additions and 0 deletions

View File

@@ -0,0 +1,864 @@
#include "x86_arch.h"
.text
.globl whirlpool_block
.type whirlpool_block,@function
.align 16
whirlpool_block:
endbr64
pushq %rbx
pushq %rbp
pushq %r12
pushq %r13
pushq %r14
pushq %r15
movq %rsp,%r11
subq $128+40,%rsp
andq $-64,%rsp
leaq 128(%rsp),%r10
movq %rdi,0(%r10)
movq %rsi,8(%r10)
movq %rdx,16(%r10)
movq %r11,32(%r10)
.Lprologue:
movq %r10,%rbx
leaq .Ltable(%rip),%rbp
xorq %rcx,%rcx
xorq %rdx,%rdx
movq 0(%rdi),%r8
movq 8(%rdi),%r9
movq 16(%rdi),%r10
movq 24(%rdi),%r11
movq 32(%rdi),%r12
movq 40(%rdi),%r13
movq 48(%rdi),%r14
movq 56(%rdi),%r15
.Louterloop:
movq %r8,0(%rsp)
movq %r9,8(%rsp)
movq %r10,16(%rsp)
movq %r11,24(%rsp)
movq %r12,32(%rsp)
movq %r13,40(%rsp)
movq %r14,48(%rsp)
movq %r15,56(%rsp)
xorq 0(%rsi),%r8
xorq 8(%rsi),%r9
xorq 16(%rsi),%r10
xorq 24(%rsi),%r11
xorq 32(%rsi),%r12
xorq 40(%rsi),%r13
xorq 48(%rsi),%r14
xorq 56(%rsi),%r15
movq %r8,64+0(%rsp)
movq %r9,64+8(%rsp)
movq %r10,64+16(%rsp)
movq %r11,64+24(%rsp)
movq %r12,64+32(%rsp)
movq %r13,64+40(%rsp)
movq %r14,64+48(%rsp)
movq %r15,64+56(%rsp)
xorq %rsi,%rsi
movq %rsi,24(%rbx)
.align 16
.Lround:
movq 4096(%rbp,%rsi,8),%r8
movl 0(%rsp),%eax
movl 4(%rsp),%ebx
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r8
movq 7(%rbp,%rdi,8),%r9
movb %al,%cl
movb %ah,%dl
movl 0+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
movq 6(%rbp,%rsi,8),%r10
movq 5(%rbp,%rdi,8),%r11
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
movq 4(%rbp,%rsi,8),%r12
movq 3(%rbp,%rdi,8),%r13
movb %bl,%cl
movb %bh,%dl
movl 0+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
movq 2(%rbp,%rsi,8),%r14
movq 1(%rbp,%rdi,8),%r15
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r9
xorq 7(%rbp,%rdi,8),%r10
movb %al,%cl
movb %ah,%dl
movl 8+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r11
xorq 5(%rbp,%rdi,8),%r12
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r13
xorq 3(%rbp,%rdi,8),%r14
movb %bl,%cl
movb %bh,%dl
movl 8+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r15
xorq 1(%rbp,%rdi,8),%r8
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r10
xorq 7(%rbp,%rdi,8),%r11
movb %al,%cl
movb %ah,%dl
movl 16+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r12
xorq 5(%rbp,%rdi,8),%r13
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r14
xorq 3(%rbp,%rdi,8),%r15
movb %bl,%cl
movb %bh,%dl
movl 16+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r8
xorq 1(%rbp,%rdi,8),%r9
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r11
xorq 7(%rbp,%rdi,8),%r12
movb %al,%cl
movb %ah,%dl
movl 24+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r13
xorq 5(%rbp,%rdi,8),%r14
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r15
xorq 3(%rbp,%rdi,8),%r8
movb %bl,%cl
movb %bh,%dl
movl 24+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r9
xorq 1(%rbp,%rdi,8),%r10
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r12
xorq 7(%rbp,%rdi,8),%r13
movb %al,%cl
movb %ah,%dl
movl 32+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r14
xorq 5(%rbp,%rdi,8),%r15
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r8
xorq 3(%rbp,%rdi,8),%r9
movb %bl,%cl
movb %bh,%dl
movl 32+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r10
xorq 1(%rbp,%rdi,8),%r11
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r13
xorq 7(%rbp,%rdi,8),%r14
movb %al,%cl
movb %ah,%dl
movl 40+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r15
xorq 5(%rbp,%rdi,8),%r8
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r9
xorq 3(%rbp,%rdi,8),%r10
movb %bl,%cl
movb %bh,%dl
movl 40+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r11
xorq 1(%rbp,%rdi,8),%r12
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r14
xorq 7(%rbp,%rdi,8),%r15
movb %al,%cl
movb %ah,%dl
movl 48+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r8
xorq 5(%rbp,%rdi,8),%r9
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r10
xorq 3(%rbp,%rdi,8),%r11
movb %bl,%cl
movb %bh,%dl
movl 48+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r12
xorq 1(%rbp,%rdi,8),%r13
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r15
xorq 7(%rbp,%rdi,8),%r8
movb %al,%cl
movb %ah,%dl
movl 56+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r9
xorq 5(%rbp,%rdi,8),%r10
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r11
xorq 3(%rbp,%rdi,8),%r12
movb %bl,%cl
movb %bh,%dl
movl 56+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r13
xorq 1(%rbp,%rdi,8),%r14
movq %r8,0(%rsp)
movq %r9,8(%rsp)
movq %r10,16(%rsp)
movq %r11,24(%rsp)
movq %r12,32(%rsp)
movq %r13,40(%rsp)
movq %r14,48(%rsp)
movq %r15,56(%rsp)
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r8
xorq 7(%rbp,%rdi,8),%r9
movb %al,%cl
movb %ah,%dl
movl 64+0+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r10
xorq 5(%rbp,%rdi,8),%r11
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r12
xorq 3(%rbp,%rdi,8),%r13
movb %bl,%cl
movb %bh,%dl
movl 64+0+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r14
xorq 1(%rbp,%rdi,8),%r15
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r9
xorq 7(%rbp,%rdi,8),%r10
movb %al,%cl
movb %ah,%dl
movl 64+8+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r11
xorq 5(%rbp,%rdi,8),%r12
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r13
xorq 3(%rbp,%rdi,8),%r14
movb %bl,%cl
movb %bh,%dl
movl 64+8+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r15
xorq 1(%rbp,%rdi,8),%r8
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r10
xorq 7(%rbp,%rdi,8),%r11
movb %al,%cl
movb %ah,%dl
movl 64+16+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r12
xorq 5(%rbp,%rdi,8),%r13
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r14
xorq 3(%rbp,%rdi,8),%r15
movb %bl,%cl
movb %bh,%dl
movl 64+16+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r8
xorq 1(%rbp,%rdi,8),%r9
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r11
xorq 7(%rbp,%rdi,8),%r12
movb %al,%cl
movb %ah,%dl
movl 64+24+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r13
xorq 5(%rbp,%rdi,8),%r14
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r15
xorq 3(%rbp,%rdi,8),%r8
movb %bl,%cl
movb %bh,%dl
movl 64+24+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r9
xorq 1(%rbp,%rdi,8),%r10
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r12
xorq 7(%rbp,%rdi,8),%r13
movb %al,%cl
movb %ah,%dl
movl 64+32+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r14
xorq 5(%rbp,%rdi,8),%r15
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r8
xorq 3(%rbp,%rdi,8),%r9
movb %bl,%cl
movb %bh,%dl
movl 64+32+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r10
xorq 1(%rbp,%rdi,8),%r11
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r13
xorq 7(%rbp,%rdi,8),%r14
movb %al,%cl
movb %ah,%dl
movl 64+40+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r15
xorq 5(%rbp,%rdi,8),%r8
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r9
xorq 3(%rbp,%rdi,8),%r10
movb %bl,%cl
movb %bh,%dl
movl 64+40+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r11
xorq 1(%rbp,%rdi,8),%r12
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r14
xorq 7(%rbp,%rdi,8),%r15
movb %al,%cl
movb %ah,%dl
movl 64+48+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r8
xorq 5(%rbp,%rdi,8),%r9
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r10
xorq 3(%rbp,%rdi,8),%r11
movb %bl,%cl
movb %bh,%dl
movl 64+48+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r12
xorq 1(%rbp,%rdi,8),%r13
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r15
xorq 7(%rbp,%rdi,8),%r8
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r9
xorq 5(%rbp,%rdi,8),%r10
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r11
xorq 3(%rbp,%rdi,8),%r12
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r13
xorq 1(%rbp,%rdi,8),%r14
leaq 128(%rsp),%rbx
movq 24(%rbx),%rsi
addq $1,%rsi
cmpq $10,%rsi
je .Lroundsdone
movq %rsi,24(%rbx)
movq %r8,64+0(%rsp)
movq %r9,64+8(%rsp)
movq %r10,64+16(%rsp)
movq %r11,64+24(%rsp)
movq %r12,64+32(%rsp)
movq %r13,64+40(%rsp)
movq %r14,64+48(%rsp)
movq %r15,64+56(%rsp)
jmp .Lround
.align 16
.Lroundsdone:
movq 0(%rbx),%rdi
movq 8(%rbx),%rsi
movq 16(%rbx),%rax
xorq 0(%rsi),%r8
xorq 8(%rsi),%r9
xorq 16(%rsi),%r10
xorq 24(%rsi),%r11
xorq 32(%rsi),%r12
xorq 40(%rsi),%r13
xorq 48(%rsi),%r14
xorq 56(%rsi),%r15
xorq 0(%rdi),%r8
xorq 8(%rdi),%r9
xorq 16(%rdi),%r10
xorq 24(%rdi),%r11
xorq 32(%rdi),%r12
xorq 40(%rdi),%r13
xorq 48(%rdi),%r14
xorq 56(%rdi),%r15
movq %r8,0(%rdi)
movq %r9,8(%rdi)
movq %r10,16(%rdi)
movq %r11,24(%rdi)
movq %r12,32(%rdi)
movq %r13,40(%rdi)
movq %r14,48(%rdi)
movq %r15,56(%rdi)
leaq 64(%rsi),%rsi
subq $1,%rax
jz .Lalldone
movq %rsi,8(%rbx)
movq %rax,16(%rbx)
jmp .Louterloop
.Lalldone:
movq 32(%rbx),%rsi
movq (%rsi),%r15
movq 8(%rsi),%r14
movq 16(%rsi),%r13
movq 24(%rsi),%r12
movq 32(%rsi),%rbp
movq 40(%rsi),%rbx
leaq 48(%rsi),%rsp
.Lepilogue:
retq
.size whirlpool_block,.-whirlpool_block
.section .rodata
.align 64
.type .Ltable,@object
.Ltable:
.byte 24,24,96,24,192,120,48,216,24,24,96,24,192,120,48,216
.byte 35,35,140,35,5,175,70,38,35,35,140,35,5,175,70,38
.byte 198,198,63,198,126,249,145,184,198,198,63,198,126,249,145,184
.byte 232,232,135,232,19,111,205,251,232,232,135,232,19,111,205,251
.byte 135,135,38,135,76,161,19,203,135,135,38,135,76,161,19,203
.byte 184,184,218,184,169,98,109,17,184,184,218,184,169,98,109,17
.byte 1,1,4,1,8,5,2,9,1,1,4,1,8,5,2,9
.byte 79,79,33,79,66,110,158,13,79,79,33,79,66,110,158,13
.byte 54,54,216,54,173,238,108,155,54,54,216,54,173,238,108,155
.byte 166,166,162,166,89,4,81,255,166,166,162,166,89,4,81,255
.byte 210,210,111,210,222,189,185,12,210,210,111,210,222,189,185,12
.byte 245,245,243,245,251,6,247,14,245,245,243,245,251,6,247,14
.byte 121,121,249,121,239,128,242,150,121,121,249,121,239,128,242,150
.byte 111,111,161,111,95,206,222,48,111,111,161,111,95,206,222,48
.byte 145,145,126,145,252,239,63,109,145,145,126,145,252,239,63,109
.byte 82,82,85,82,170,7,164,248,82,82,85,82,170,7,164,248
.byte 96,96,157,96,39,253,192,71,96,96,157,96,39,253,192,71
.byte 188,188,202,188,137,118,101,53,188,188,202,188,137,118,101,53
.byte 155,155,86,155,172,205,43,55,155,155,86,155,172,205,43,55
.byte 142,142,2,142,4,140,1,138,142,142,2,142,4,140,1,138
.byte 163,163,182,163,113,21,91,210,163,163,182,163,113,21,91,210
.byte 12,12,48,12,96,60,24,108,12,12,48,12,96,60,24,108
.byte 123,123,241,123,255,138,246,132,123,123,241,123,255,138,246,132
.byte 53,53,212,53,181,225,106,128,53,53,212,53,181,225,106,128
.byte 29,29,116,29,232,105,58,245,29,29,116,29,232,105,58,245
.byte 224,224,167,224,83,71,221,179,224,224,167,224,83,71,221,179
.byte 215,215,123,215,246,172,179,33,215,215,123,215,246,172,179,33
.byte 194,194,47,194,94,237,153,156,194,194,47,194,94,237,153,156
.byte 46,46,184,46,109,150,92,67,46,46,184,46,109,150,92,67
.byte 75,75,49,75,98,122,150,41,75,75,49,75,98,122,150,41
.byte 254,254,223,254,163,33,225,93,254,254,223,254,163,33,225,93
.byte 87,87,65,87,130,22,174,213,87,87,65,87,130,22,174,213
.byte 21,21,84,21,168,65,42,189,21,21,84,21,168,65,42,189
.byte 119,119,193,119,159,182,238,232,119,119,193,119,159,182,238,232
.byte 55,55,220,55,165,235,110,146,55,55,220,55,165,235,110,146
.byte 229,229,179,229,123,86,215,158,229,229,179,229,123,86,215,158
.byte 159,159,70,159,140,217,35,19,159,159,70,159,140,217,35,19
.byte 240,240,231,240,211,23,253,35,240,240,231,240,211,23,253,35
.byte 74,74,53,74,106,127,148,32,74,74,53,74,106,127,148,32
.byte 218,218,79,218,158,149,169,68,218,218,79,218,158,149,169,68
.byte 88,88,125,88,250,37,176,162,88,88,125,88,250,37,176,162
.byte 201,201,3,201,6,202,143,207,201,201,3,201,6,202,143,207
.byte 41,41,164,41,85,141,82,124,41,41,164,41,85,141,82,124
.byte 10,10,40,10,80,34,20,90,10,10,40,10,80,34,20,90
.byte 177,177,254,177,225,79,127,80,177,177,254,177,225,79,127,80
.byte 160,160,186,160,105,26,93,201,160,160,186,160,105,26,93,201
.byte 107,107,177,107,127,218,214,20,107,107,177,107,127,218,214,20
.byte 133,133,46,133,92,171,23,217,133,133,46,133,92,171,23,217
.byte 189,189,206,189,129,115,103,60,189,189,206,189,129,115,103,60
.byte 93,93,105,93,210,52,186,143,93,93,105,93,210,52,186,143
.byte 16,16,64,16,128,80,32,144,16,16,64,16,128,80,32,144
.byte 244,244,247,244,243,3,245,7,244,244,247,244,243,3,245,7
.byte 203,203,11,203,22,192,139,221,203,203,11,203,22,192,139,221
.byte 62,62,248,62,237,198,124,211,62,62,248,62,237,198,124,211
.byte 5,5,20,5,40,17,10,45,5,5,20,5,40,17,10,45
.byte 103,103,129,103,31,230,206,120,103,103,129,103,31,230,206,120
.byte 228,228,183,228,115,83,213,151,228,228,183,228,115,83,213,151
.byte 39,39,156,39,37,187,78,2,39,39,156,39,37,187,78,2
.byte 65,65,25,65,50,88,130,115,65,65,25,65,50,88,130,115
.byte 139,139,22,139,44,157,11,167,139,139,22,139,44,157,11,167
.byte 167,167,166,167,81,1,83,246,167,167,166,167,81,1,83,246
.byte 125,125,233,125,207,148,250,178,125,125,233,125,207,148,250,178
.byte 149,149,110,149,220,251,55,73,149,149,110,149,220,251,55,73
.byte 216,216,71,216,142,159,173,86,216,216,71,216,142,159,173,86
.byte 251,251,203,251,139,48,235,112,251,251,203,251,139,48,235,112
.byte 238,238,159,238,35,113,193,205,238,238,159,238,35,113,193,205
.byte 124,124,237,124,199,145,248,187,124,124,237,124,199,145,248,187
.byte 102,102,133,102,23,227,204,113,102,102,133,102,23,227,204,113
.byte 221,221,83,221,166,142,167,123,221,221,83,221,166,142,167,123
.byte 23,23,92,23,184,75,46,175,23,23,92,23,184,75,46,175
.byte 71,71,1,71,2,70,142,69,71,71,1,71,2,70,142,69
.byte 158,158,66,158,132,220,33,26,158,158,66,158,132,220,33,26
.byte 202,202,15,202,30,197,137,212,202,202,15,202,30,197,137,212
.byte 45,45,180,45,117,153,90,88,45,45,180,45,117,153,90,88
.byte 191,191,198,191,145,121,99,46,191,191,198,191,145,121,99,46
.byte 7,7,28,7,56,27,14,63,7,7,28,7,56,27,14,63
.byte 173,173,142,173,1,35,71,172,173,173,142,173,1,35,71,172
.byte 90,90,117,90,234,47,180,176,90,90,117,90,234,47,180,176
.byte 131,131,54,131,108,181,27,239,131,131,54,131,108,181,27,239
.byte 51,51,204,51,133,255,102,182,51,51,204,51,133,255,102,182
.byte 99,99,145,99,63,242,198,92,99,99,145,99,63,242,198,92
.byte 2,2,8,2,16,10,4,18,2,2,8,2,16,10,4,18
.byte 170,170,146,170,57,56,73,147,170,170,146,170,57,56,73,147
.byte 113,113,217,113,175,168,226,222,113,113,217,113,175,168,226,222
.byte 200,200,7,200,14,207,141,198,200,200,7,200,14,207,141,198
.byte 25,25,100,25,200,125,50,209,25,25,100,25,200,125,50,209
.byte 73,73,57,73,114,112,146,59,73,73,57,73,114,112,146,59
.byte 217,217,67,217,134,154,175,95,217,217,67,217,134,154,175,95
.byte 242,242,239,242,195,29,249,49,242,242,239,242,195,29,249,49
.byte 227,227,171,227,75,72,219,168,227,227,171,227,75,72,219,168
.byte 91,91,113,91,226,42,182,185,91,91,113,91,226,42,182,185
.byte 136,136,26,136,52,146,13,188,136,136,26,136,52,146,13,188
.byte 154,154,82,154,164,200,41,62,154,154,82,154,164,200,41,62
.byte 38,38,152,38,45,190,76,11,38,38,152,38,45,190,76,11
.byte 50,50,200,50,141,250,100,191,50,50,200,50,141,250,100,191
.byte 176,176,250,176,233,74,125,89,176,176,250,176,233,74,125,89
.byte 233,233,131,233,27,106,207,242,233,233,131,233,27,106,207,242
.byte 15,15,60,15,120,51,30,119,15,15,60,15,120,51,30,119
.byte 213,213,115,213,230,166,183,51,213,213,115,213,230,166,183,51
.byte 128,128,58,128,116,186,29,244,128,128,58,128,116,186,29,244
.byte 190,190,194,190,153,124,97,39,190,190,194,190,153,124,97,39
.byte 205,205,19,205,38,222,135,235,205,205,19,205,38,222,135,235
.byte 52,52,208,52,189,228,104,137,52,52,208,52,189,228,104,137
.byte 72,72,61,72,122,117,144,50,72,72,61,72,122,117,144,50
.byte 255,255,219,255,171,36,227,84,255,255,219,255,171,36,227,84
.byte 122,122,245,122,247,143,244,141,122,122,245,122,247,143,244,141
.byte 144,144,122,144,244,234,61,100,144,144,122,144,244,234,61,100
.byte 95,95,97,95,194,62,190,157,95,95,97,95,194,62,190,157
.byte 32,32,128,32,29,160,64,61,32,32,128,32,29,160,64,61
.byte 104,104,189,104,103,213,208,15,104,104,189,104,103,213,208,15
.byte 26,26,104,26,208,114,52,202,26,26,104,26,208,114,52,202
.byte 174,174,130,174,25,44,65,183,174,174,130,174,25,44,65,183
.byte 180,180,234,180,201,94,117,125,180,180,234,180,201,94,117,125
.byte 84,84,77,84,154,25,168,206,84,84,77,84,154,25,168,206
.byte 147,147,118,147,236,229,59,127,147,147,118,147,236,229,59,127
.byte 34,34,136,34,13,170,68,47,34,34,136,34,13,170,68,47
.byte 100,100,141,100,7,233,200,99,100,100,141,100,7,233,200,99
.byte 241,241,227,241,219,18,255,42,241,241,227,241,219,18,255,42
.byte 115,115,209,115,191,162,230,204,115,115,209,115,191,162,230,204
.byte 18,18,72,18,144,90,36,130,18,18,72,18,144,90,36,130
.byte 64,64,29,64,58,93,128,122,64,64,29,64,58,93,128,122
.byte 8,8,32,8,64,40,16,72,8,8,32,8,64,40,16,72
.byte 195,195,43,195,86,232,155,149,195,195,43,195,86,232,155,149
.byte 236,236,151,236,51,123,197,223,236,236,151,236,51,123,197,223
.byte 219,219,75,219,150,144,171,77,219,219,75,219,150,144,171,77
.byte 161,161,190,161,97,31,95,192,161,161,190,161,97,31,95,192
.byte 141,141,14,141,28,131,7,145,141,141,14,141,28,131,7,145
.byte 61,61,244,61,245,201,122,200,61,61,244,61,245,201,122,200
.byte 151,151,102,151,204,241,51,91,151,151,102,151,204,241,51,91
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.byte 207,207,27,207,54,212,131,249,207,207,27,207,54,212,131,249
.byte 43,43,172,43,69,135,86,110,43,43,172,43,69,135,86,110
.byte 118,118,197,118,151,179,236,225,118,118,197,118,151,179,236,225
.byte 130,130,50,130,100,176,25,230,130,130,50,130,100,176,25,230
.byte 214,214,127,214,254,169,177,40,214,214,127,214,254,169,177,40
.byte 27,27,108,27,216,119,54,195,27,27,108,27,216,119,54,195
.byte 181,181,238,181,193,91,119,116,181,181,238,181,193,91,119,116
.byte 175,175,134,175,17,41,67,190,175,175,134,175,17,41,67,190
.byte 106,106,181,106,119,223,212,29,106,106,181,106,119,223,212,29
.byte 80,80,93,80,186,13,160,234,80,80,93,80,186,13,160,234
.byte 69,69,9,69,18,76,138,87,69,69,9,69,18,76,138,87
.byte 243,243,235,243,203,24,251,56,243,243,235,243,203,24,251,56
.byte 48,48,192,48,157,240,96,173,48,48,192,48,157,240,96,173
.byte 239,239,155,239,43,116,195,196,239,239,155,239,43,116,195,196
.byte 63,63,252,63,229,195,126,218,63,63,252,63,229,195,126,218
.byte 85,85,73,85,146,28,170,199,85,85,73,85,146,28,170,199
.byte 162,162,178,162,121,16,89,219,162,162,178,162,121,16,89,219
.byte 234,234,143,234,3,101,201,233,234,234,143,234,3,101,201,233
.byte 101,101,137,101,15,236,202,106,101,101,137,101,15,236,202,106
.byte 186,186,210,186,185,104,105,3,186,186,210,186,185,104,105,3
.byte 47,47,188,47,101,147,94,74,47,47,188,47,101,147,94,74
.byte 192,192,39,192,78,231,157,142,192,192,39,192,78,231,157,142
.byte 222,222,95,222,190,129,161,96,222,222,95,222,190,129,161,96
.byte 28,28,112,28,224,108,56,252,28,28,112,28,224,108,56,252
.byte 253,253,211,253,187,46,231,70,253,253,211,253,187,46,231,70
.byte 77,77,41,77,82,100,154,31,77,77,41,77,82,100,154,31
.byte 146,146,114,146,228,224,57,118,146,146,114,146,228,224,57,118
.byte 117,117,201,117,143,188,234,250,117,117,201,117,143,188,234,250
.byte 6,6,24,6,48,30,12,54,6,6,24,6,48,30,12,54
.byte 138,138,18,138,36,152,9,174,138,138,18,138,36,152,9,174
.byte 178,178,242,178,249,64,121,75,178,178,242,178,249,64,121,75
.byte 230,230,191,230,99,89,209,133,230,230,191,230,99,89,209,133
.byte 14,14,56,14,112,54,28,126,14,14,56,14,112,54,28,126
.byte 31,31,124,31,248,99,62,231,31,31,124,31,248,99,62,231
.byte 98,98,149,98,55,247,196,85,98,98,149,98,55,247,196,85
.byte 212,212,119,212,238,163,181,58,212,212,119,212,238,163,181,58
.byte 168,168,154,168,41,50,77,129,168,168,154,168,41,50,77,129
.byte 150,150,98,150,196,244,49,82,150,150,98,150,196,244,49,82
.byte 249,249,195,249,155,58,239,98,249,249,195,249,155,58,239,98
.byte 197,197,51,197,102,246,151,163,197,197,51,197,102,246,151,163
.byte 37,37,148,37,53,177,74,16,37,37,148,37,53,177,74,16
.byte 89,89,121,89,242,32,178,171,89,89,121,89,242,32,178,171
.byte 132,132,42,132,84,174,21,208,132,132,42,132,84,174,21,208
.byte 114,114,213,114,183,167,228,197,114,114,213,114,183,167,228,197
.byte 57,57,228,57,213,221,114,236,57,57,228,57,213,221,114,236
.byte 76,76,45,76,90,97,152,22,76,76,45,76,90,97,152,22
.byte 94,94,101,94,202,59,188,148,94,94,101,94,202,59,188,148
.byte 120,120,253,120,231,133,240,159,120,120,253,120,231,133,240,159
.byte 56,56,224,56,221,216,112,229,56,56,224,56,221,216,112,229
.byte 140,140,10,140,20,134,5,152,140,140,10,140,20,134,5,152
.byte 209,209,99,209,198,178,191,23,209,209,99,209,198,178,191,23
.byte 165,165,174,165,65,11,87,228,165,165,174,165,65,11,87,228
.byte 226,226,175,226,67,77,217,161,226,226,175,226,67,77,217,161
.byte 97,97,153,97,47,248,194,78,97,97,153,97,47,248,194,78
.byte 179,179,246,179,241,69,123,66,179,179,246,179,241,69,123,66
.byte 33,33,132,33,21,165,66,52,33,33,132,33,21,165,66,52
.byte 156,156,74,156,148,214,37,8,156,156,74,156,148,214,37,8
.byte 30,30,120,30,240,102,60,238,30,30,120,30,240,102,60,238
.byte 67,67,17,67,34,82,134,97,67,67,17,67,34,82,134,97
.byte 199,199,59,199,118,252,147,177,199,199,59,199,118,252,147,177
.byte 252,252,215,252,179,43,229,79,252,252,215,252,179,43,229,79
.byte 4,4,16,4,32,20,8,36,4,4,16,4,32,20,8,36
.byte 81,81,89,81,178,8,162,227,81,81,89,81,178,8,162,227
.byte 153,153,94,153,188,199,47,37,153,153,94,153,188,199,47,37
.byte 109,109,169,109,79,196,218,34,109,109,169,109,79,196,218,34
.byte 13,13,52,13,104,57,26,101,13,13,52,13,104,57,26,101
.byte 250,250,207,250,131,53,233,121,250,250,207,250,131,53,233,121
.byte 223,223,91,223,182,132,163,105,223,223,91,223,182,132,163,105
.byte 126,126,229,126,215,155,252,169,126,126,229,126,215,155,252,169
.byte 36,36,144,36,61,180,72,25,36,36,144,36,61,180,72,25
.byte 59,59,236,59,197,215,118,254,59,59,236,59,197,215,118,254
.byte 171,171,150,171,49,61,75,154,171,171,150,171,49,61,75,154
.byte 206,206,31,206,62,209,129,240,206,206,31,206,62,209,129,240
.byte 17,17,68,17,136,85,34,153,17,17,68,17,136,85,34,153
.byte 143,143,6,143,12,137,3,131,143,143,6,143,12,137,3,131
.byte 78,78,37,78,74,107,156,4,78,78,37,78,74,107,156,4
.byte 183,183,230,183,209,81,115,102,183,183,230,183,209,81,115,102
.byte 235,235,139,235,11,96,203,224,235,235,139,235,11,96,203,224
.byte 60,60,240,60,253,204,120,193,60,60,240,60,253,204,120,193
.byte 129,129,62,129,124,191,31,253,129,129,62,129,124,191,31,253
.byte 148,148,106,148,212,254,53,64,148,148,106,148,212,254,53,64
.byte 247,247,251,247,235,12,243,28,247,247,251,247,235,12,243,28
.byte 185,185,222,185,161,103,111,24,185,185,222,185,161,103,111,24
.byte 19,19,76,19,152,95,38,139,19,19,76,19,152,95,38,139
.byte 44,44,176,44,125,156,88,81,44,44,176,44,125,156,88,81
.byte 211,211,107,211,214,184,187,5,211,211,107,211,214,184,187,5
.byte 231,231,187,231,107,92,211,140,231,231,187,231,107,92,211,140
.byte 110,110,165,110,87,203,220,57,110,110,165,110,87,203,220,57
.byte 196,196,55,196,110,243,149,170,196,196,55,196,110,243,149,170
.byte 3,3,12,3,24,15,6,27,3,3,12,3,24,15,6,27
.byte 86,86,69,86,138,19,172,220,86,86,69,86,138,19,172,220
.byte 68,68,13,68,26,73,136,94,68,68,13,68,26,73,136,94
.byte 127,127,225,127,223,158,254,160,127,127,225,127,223,158,254,160
.byte 169,169,158,169,33,55,79,136,169,169,158,169,33,55,79,136
.byte 42,42,168,42,77,130,84,103,42,42,168,42,77,130,84,103
.byte 187,187,214,187,177,109,107,10,187,187,214,187,177,109,107,10
.byte 193,193,35,193,70,226,159,135,193,193,35,193,70,226,159,135
.byte 83,83,81,83,162,2,166,241,83,83,81,83,162,2,166,241
.byte 220,220,87,220,174,139,165,114,220,220,87,220,174,139,165,114
.byte 11,11,44,11,88,39,22,83,11,11,44,11,88,39,22,83
.byte 157,157,78,157,156,211,39,1,157,157,78,157,156,211,39,1
.byte 108,108,173,108,71,193,216,43,108,108,173,108,71,193,216,43
.byte 49,49,196,49,149,245,98,164,49,49,196,49,149,245,98,164
.byte 116,116,205,116,135,185,232,243,116,116,205,116,135,185,232,243
.byte 246,246,255,246,227,9,241,21,246,246,255,246,227,9,241,21
.byte 70,70,5,70,10,67,140,76,70,70,5,70,10,67,140,76
.byte 172,172,138,172,9,38,69,165,172,172,138,172,9,38,69,165
.byte 137,137,30,137,60,151,15,181,137,137,30,137,60,151,15,181
.byte 20,20,80,20,160,68,40,180,20,20,80,20,160,68,40,180
.byte 225,225,163,225,91,66,223,186,225,225,163,225,91,66,223,186
.byte 22,22,88,22,176,78,44,166,22,22,88,22,176,78,44,166
.byte 58,58,232,58,205,210,116,247,58,58,232,58,205,210,116,247
.byte 105,105,185,105,111,208,210,6,105,105,185,105,111,208,210,6
.byte 9,9,36,9,72,45,18,65,9,9,36,9,72,45,18,65
.byte 112,112,221,112,167,173,224,215,112,112,221,112,167,173,224,215
.byte 182,182,226,182,217,84,113,111,182,182,226,182,217,84,113,111
.byte 208,208,103,208,206,183,189,30,208,208,103,208,206,183,189,30
.byte 237,237,147,237,59,126,199,214,237,237,147,237,59,126,199,214
.byte 204,204,23,204,46,219,133,226,204,204,23,204,46,219,133,226
.byte 66,66,21,66,42,87,132,104,66,66,21,66,42,87,132,104
.byte 152,152,90,152,180,194,45,44,152,152,90,152,180,194,45,44
.byte 164,164,170,164,73,14,85,237,164,164,170,164,73,14,85,237
.byte 40,40,160,40,93,136,80,117,40,40,160,40,93,136,80,117
.byte 92,92,109,92,218,49,184,134,92,92,109,92,218,49,184,134
.byte 248,248,199,248,147,63,237,107,248,248,199,248,147,63,237,107
.byte 134,134,34,134,68,164,17,194,134,134,34,134,68,164,17,194
.byte 24,35,198,232,135,184,1,79
.byte 54,166,210,245,121,111,145,82
.byte 96,188,155,142,163,12,123,53
.byte 29,224,215,194,46,75,254,87
.byte 21,119,55,229,159,240,74,218
.byte 88,201,41,10,177,160,107,133
.byte 189,93,16,244,203,62,5,103
.byte 228,39,65,139,167,125,149,216
.byte 251,238,124,102,221,23,71,158
.byte 202,45,191,7,173,90,131,51
#if defined(HAVE_GNU_STACK)
.section .note.GNU-stack,"",%progbits
#endif

View File

@@ -0,0 +1,859 @@
#include "x86_arch.h"
.text
.globl _whirlpool_block
.p2align 4
_whirlpool_block:
pushq %rbx
pushq %rbp
pushq %r12
pushq %r13
pushq %r14
pushq %r15
movq %rsp,%r11
subq $128+40,%rsp
andq $-64,%rsp
leaq 128(%rsp),%r10
movq %rdi,0(%r10)
movq %rsi,8(%r10)
movq %rdx,16(%r10)
movq %r11,32(%r10)
L$prologue:
movq %r10,%rbx
leaq L$table(%rip),%rbp
xorq %rcx,%rcx
xorq %rdx,%rdx
movq 0(%rdi),%r8
movq 8(%rdi),%r9
movq 16(%rdi),%r10
movq 24(%rdi),%r11
movq 32(%rdi),%r12
movq 40(%rdi),%r13
movq 48(%rdi),%r14
movq 56(%rdi),%r15
L$outerloop:
movq %r8,0(%rsp)
movq %r9,8(%rsp)
movq %r10,16(%rsp)
movq %r11,24(%rsp)
movq %r12,32(%rsp)
movq %r13,40(%rsp)
movq %r14,48(%rsp)
movq %r15,56(%rsp)
xorq 0(%rsi),%r8
xorq 8(%rsi),%r9
xorq 16(%rsi),%r10
xorq 24(%rsi),%r11
xorq 32(%rsi),%r12
xorq 40(%rsi),%r13
xorq 48(%rsi),%r14
xorq 56(%rsi),%r15
movq %r8,64+0(%rsp)
movq %r9,64+8(%rsp)
movq %r10,64+16(%rsp)
movq %r11,64+24(%rsp)
movq %r12,64+32(%rsp)
movq %r13,64+40(%rsp)
movq %r14,64+48(%rsp)
movq %r15,64+56(%rsp)
xorq %rsi,%rsi
movq %rsi,24(%rbx)
.p2align 4
L$round:
movq 4096(%rbp,%rsi,8),%r8
movl 0(%rsp),%eax
movl 4(%rsp),%ebx
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r8
movq 7(%rbp,%rdi,8),%r9
movb %al,%cl
movb %ah,%dl
movl 0+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
movq 6(%rbp,%rsi,8),%r10
movq 5(%rbp,%rdi,8),%r11
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
movq 4(%rbp,%rsi,8),%r12
movq 3(%rbp,%rdi,8),%r13
movb %bl,%cl
movb %bh,%dl
movl 0+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
movq 2(%rbp,%rsi,8),%r14
movq 1(%rbp,%rdi,8),%r15
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r9
xorq 7(%rbp,%rdi,8),%r10
movb %al,%cl
movb %ah,%dl
movl 8+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r11
xorq 5(%rbp,%rdi,8),%r12
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r13
xorq 3(%rbp,%rdi,8),%r14
movb %bl,%cl
movb %bh,%dl
movl 8+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r15
xorq 1(%rbp,%rdi,8),%r8
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r10
xorq 7(%rbp,%rdi,8),%r11
movb %al,%cl
movb %ah,%dl
movl 16+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r12
xorq 5(%rbp,%rdi,8),%r13
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r14
xorq 3(%rbp,%rdi,8),%r15
movb %bl,%cl
movb %bh,%dl
movl 16+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r8
xorq 1(%rbp,%rdi,8),%r9
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r11
xorq 7(%rbp,%rdi,8),%r12
movb %al,%cl
movb %ah,%dl
movl 24+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r13
xorq 5(%rbp,%rdi,8),%r14
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r15
xorq 3(%rbp,%rdi,8),%r8
movb %bl,%cl
movb %bh,%dl
movl 24+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r9
xorq 1(%rbp,%rdi,8),%r10
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r12
xorq 7(%rbp,%rdi,8),%r13
movb %al,%cl
movb %ah,%dl
movl 32+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r14
xorq 5(%rbp,%rdi,8),%r15
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r8
xorq 3(%rbp,%rdi,8),%r9
movb %bl,%cl
movb %bh,%dl
movl 32+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r10
xorq 1(%rbp,%rdi,8),%r11
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r13
xorq 7(%rbp,%rdi,8),%r14
movb %al,%cl
movb %ah,%dl
movl 40+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r15
xorq 5(%rbp,%rdi,8),%r8
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r9
xorq 3(%rbp,%rdi,8),%r10
movb %bl,%cl
movb %bh,%dl
movl 40+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r11
xorq 1(%rbp,%rdi,8),%r12
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r14
xorq 7(%rbp,%rdi,8),%r15
movb %al,%cl
movb %ah,%dl
movl 48+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r8
xorq 5(%rbp,%rdi,8),%r9
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r10
xorq 3(%rbp,%rdi,8),%r11
movb %bl,%cl
movb %bh,%dl
movl 48+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r12
xorq 1(%rbp,%rdi,8),%r13
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r15
xorq 7(%rbp,%rdi,8),%r8
movb %al,%cl
movb %ah,%dl
movl 56+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r9
xorq 5(%rbp,%rdi,8),%r10
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r11
xorq 3(%rbp,%rdi,8),%r12
movb %bl,%cl
movb %bh,%dl
movl 56+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r13
xorq 1(%rbp,%rdi,8),%r14
movq %r8,0(%rsp)
movq %r9,8(%rsp)
movq %r10,16(%rsp)
movq %r11,24(%rsp)
movq %r12,32(%rsp)
movq %r13,40(%rsp)
movq %r14,48(%rsp)
movq %r15,56(%rsp)
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r8
xorq 7(%rbp,%rdi,8),%r9
movb %al,%cl
movb %ah,%dl
movl 64+0+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r10
xorq 5(%rbp,%rdi,8),%r11
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r12
xorq 3(%rbp,%rdi,8),%r13
movb %bl,%cl
movb %bh,%dl
movl 64+0+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r14
xorq 1(%rbp,%rdi,8),%r15
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r9
xorq 7(%rbp,%rdi,8),%r10
movb %al,%cl
movb %ah,%dl
movl 64+8+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r11
xorq 5(%rbp,%rdi,8),%r12
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r13
xorq 3(%rbp,%rdi,8),%r14
movb %bl,%cl
movb %bh,%dl
movl 64+8+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r15
xorq 1(%rbp,%rdi,8),%r8
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r10
xorq 7(%rbp,%rdi,8),%r11
movb %al,%cl
movb %ah,%dl
movl 64+16+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r12
xorq 5(%rbp,%rdi,8),%r13
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r14
xorq 3(%rbp,%rdi,8),%r15
movb %bl,%cl
movb %bh,%dl
movl 64+16+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r8
xorq 1(%rbp,%rdi,8),%r9
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r11
xorq 7(%rbp,%rdi,8),%r12
movb %al,%cl
movb %ah,%dl
movl 64+24+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r13
xorq 5(%rbp,%rdi,8),%r14
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r15
xorq 3(%rbp,%rdi,8),%r8
movb %bl,%cl
movb %bh,%dl
movl 64+24+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r9
xorq 1(%rbp,%rdi,8),%r10
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r12
xorq 7(%rbp,%rdi,8),%r13
movb %al,%cl
movb %ah,%dl
movl 64+32+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r14
xorq 5(%rbp,%rdi,8),%r15
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r8
xorq 3(%rbp,%rdi,8),%r9
movb %bl,%cl
movb %bh,%dl
movl 64+32+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r10
xorq 1(%rbp,%rdi,8),%r11
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r13
xorq 7(%rbp,%rdi,8),%r14
movb %al,%cl
movb %ah,%dl
movl 64+40+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r15
xorq 5(%rbp,%rdi,8),%r8
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r9
xorq 3(%rbp,%rdi,8),%r10
movb %bl,%cl
movb %bh,%dl
movl 64+40+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r11
xorq 1(%rbp,%rdi,8),%r12
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r14
xorq 7(%rbp,%rdi,8),%r15
movb %al,%cl
movb %ah,%dl
movl 64+48+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r8
xorq 5(%rbp,%rdi,8),%r9
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r10
xorq 3(%rbp,%rdi,8),%r11
movb %bl,%cl
movb %bh,%dl
movl 64+48+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r12
xorq 1(%rbp,%rdi,8),%r13
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r15
xorq 7(%rbp,%rdi,8),%r8
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r9
xorq 5(%rbp,%rdi,8),%r10
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r11
xorq 3(%rbp,%rdi,8),%r12
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r13
xorq 1(%rbp,%rdi,8),%r14
leaq 128(%rsp),%rbx
movq 24(%rbx),%rsi
addq $1,%rsi
cmpq $10,%rsi
je L$roundsdone
movq %rsi,24(%rbx)
movq %r8,64+0(%rsp)
movq %r9,64+8(%rsp)
movq %r10,64+16(%rsp)
movq %r11,64+24(%rsp)
movq %r12,64+32(%rsp)
movq %r13,64+40(%rsp)
movq %r14,64+48(%rsp)
movq %r15,64+56(%rsp)
jmp L$round
.p2align 4
L$roundsdone:
movq 0(%rbx),%rdi
movq 8(%rbx),%rsi
movq 16(%rbx),%rax
xorq 0(%rsi),%r8
xorq 8(%rsi),%r9
xorq 16(%rsi),%r10
xorq 24(%rsi),%r11
xorq 32(%rsi),%r12
xorq 40(%rsi),%r13
xorq 48(%rsi),%r14
xorq 56(%rsi),%r15
xorq 0(%rdi),%r8
xorq 8(%rdi),%r9
xorq 16(%rdi),%r10
xorq 24(%rdi),%r11
xorq 32(%rdi),%r12
xorq 40(%rdi),%r13
xorq 48(%rdi),%r14
xorq 56(%rdi),%r15
movq %r8,0(%rdi)
movq %r9,8(%rdi)
movq %r10,16(%rdi)
movq %r11,24(%rdi)
movq %r12,32(%rdi)
movq %r13,40(%rdi)
movq %r14,48(%rdi)
movq %r15,56(%rdi)
leaq 64(%rsi),%rsi
subq $1,%rax
jz L$alldone
movq %rsi,8(%rbx)
movq %rax,16(%rbx)
jmp L$outerloop
L$alldone:
movq 32(%rbx),%rsi
movq (%rsi),%r15
movq 8(%rsi),%r14
movq 16(%rsi),%r13
movq 24(%rsi),%r12
movq 32(%rsi),%rbp
movq 40(%rsi),%rbx
leaq 48(%rsi),%rsp
L$epilogue:
retq
.p2align 6
L$table:
.byte 24,24,96,24,192,120,48,216,24,24,96,24,192,120,48,216
.byte 35,35,140,35,5,175,70,38,35,35,140,35,5,175,70,38
.byte 198,198,63,198,126,249,145,184,198,198,63,198,126,249,145,184
.byte 232,232,135,232,19,111,205,251,232,232,135,232,19,111,205,251
.byte 135,135,38,135,76,161,19,203,135,135,38,135,76,161,19,203
.byte 184,184,218,184,169,98,109,17,184,184,218,184,169,98,109,17
.byte 1,1,4,1,8,5,2,9,1,1,4,1,8,5,2,9
.byte 79,79,33,79,66,110,158,13,79,79,33,79,66,110,158,13
.byte 54,54,216,54,173,238,108,155,54,54,216,54,173,238,108,155
.byte 166,166,162,166,89,4,81,255,166,166,162,166,89,4,81,255
.byte 210,210,111,210,222,189,185,12,210,210,111,210,222,189,185,12
.byte 245,245,243,245,251,6,247,14,245,245,243,245,251,6,247,14
.byte 121,121,249,121,239,128,242,150,121,121,249,121,239,128,242,150
.byte 111,111,161,111,95,206,222,48,111,111,161,111,95,206,222,48
.byte 145,145,126,145,252,239,63,109,145,145,126,145,252,239,63,109
.byte 82,82,85,82,170,7,164,248,82,82,85,82,170,7,164,248
.byte 96,96,157,96,39,253,192,71,96,96,157,96,39,253,192,71
.byte 188,188,202,188,137,118,101,53,188,188,202,188,137,118,101,53
.byte 155,155,86,155,172,205,43,55,155,155,86,155,172,205,43,55
.byte 142,142,2,142,4,140,1,138,142,142,2,142,4,140,1,138
.byte 163,163,182,163,113,21,91,210,163,163,182,163,113,21,91,210
.byte 12,12,48,12,96,60,24,108,12,12,48,12,96,60,24,108
.byte 123,123,241,123,255,138,246,132,123,123,241,123,255,138,246,132
.byte 53,53,212,53,181,225,106,128,53,53,212,53,181,225,106,128
.byte 29,29,116,29,232,105,58,245,29,29,116,29,232,105,58,245
.byte 224,224,167,224,83,71,221,179,224,224,167,224,83,71,221,179
.byte 215,215,123,215,246,172,179,33,215,215,123,215,246,172,179,33
.byte 194,194,47,194,94,237,153,156,194,194,47,194,94,237,153,156
.byte 46,46,184,46,109,150,92,67,46,46,184,46,109,150,92,67
.byte 75,75,49,75,98,122,150,41,75,75,49,75,98,122,150,41
.byte 254,254,223,254,163,33,225,93,254,254,223,254,163,33,225,93
.byte 87,87,65,87,130,22,174,213,87,87,65,87,130,22,174,213
.byte 21,21,84,21,168,65,42,189,21,21,84,21,168,65,42,189
.byte 119,119,193,119,159,182,238,232,119,119,193,119,159,182,238,232
.byte 55,55,220,55,165,235,110,146,55,55,220,55,165,235,110,146
.byte 229,229,179,229,123,86,215,158,229,229,179,229,123,86,215,158
.byte 159,159,70,159,140,217,35,19,159,159,70,159,140,217,35,19
.byte 240,240,231,240,211,23,253,35,240,240,231,240,211,23,253,35
.byte 74,74,53,74,106,127,148,32,74,74,53,74,106,127,148,32
.byte 218,218,79,218,158,149,169,68,218,218,79,218,158,149,169,68
.byte 88,88,125,88,250,37,176,162,88,88,125,88,250,37,176,162
.byte 201,201,3,201,6,202,143,207,201,201,3,201,6,202,143,207
.byte 41,41,164,41,85,141,82,124,41,41,164,41,85,141,82,124
.byte 10,10,40,10,80,34,20,90,10,10,40,10,80,34,20,90
.byte 177,177,254,177,225,79,127,80,177,177,254,177,225,79,127,80
.byte 160,160,186,160,105,26,93,201,160,160,186,160,105,26,93,201
.byte 107,107,177,107,127,218,214,20,107,107,177,107,127,218,214,20
.byte 133,133,46,133,92,171,23,217,133,133,46,133,92,171,23,217
.byte 189,189,206,189,129,115,103,60,189,189,206,189,129,115,103,60
.byte 93,93,105,93,210,52,186,143,93,93,105,93,210,52,186,143
.byte 16,16,64,16,128,80,32,144,16,16,64,16,128,80,32,144
.byte 244,244,247,244,243,3,245,7,244,244,247,244,243,3,245,7
.byte 203,203,11,203,22,192,139,221,203,203,11,203,22,192,139,221
.byte 62,62,248,62,237,198,124,211,62,62,248,62,237,198,124,211
.byte 5,5,20,5,40,17,10,45,5,5,20,5,40,17,10,45
.byte 103,103,129,103,31,230,206,120,103,103,129,103,31,230,206,120
.byte 228,228,183,228,115,83,213,151,228,228,183,228,115,83,213,151
.byte 39,39,156,39,37,187,78,2,39,39,156,39,37,187,78,2
.byte 65,65,25,65,50,88,130,115,65,65,25,65,50,88,130,115
.byte 139,139,22,139,44,157,11,167,139,139,22,139,44,157,11,167
.byte 167,167,166,167,81,1,83,246,167,167,166,167,81,1,83,246
.byte 125,125,233,125,207,148,250,178,125,125,233,125,207,148,250,178
.byte 149,149,110,149,220,251,55,73,149,149,110,149,220,251,55,73
.byte 216,216,71,216,142,159,173,86,216,216,71,216,142,159,173,86
.byte 251,251,203,251,139,48,235,112,251,251,203,251,139,48,235,112
.byte 238,238,159,238,35,113,193,205,238,238,159,238,35,113,193,205
.byte 124,124,237,124,199,145,248,187,124,124,237,124,199,145,248,187
.byte 102,102,133,102,23,227,204,113,102,102,133,102,23,227,204,113
.byte 221,221,83,221,166,142,167,123,221,221,83,221,166,142,167,123
.byte 23,23,92,23,184,75,46,175,23,23,92,23,184,75,46,175
.byte 71,71,1,71,2,70,142,69,71,71,1,71,2,70,142,69
.byte 158,158,66,158,132,220,33,26,158,158,66,158,132,220,33,26
.byte 202,202,15,202,30,197,137,212,202,202,15,202,30,197,137,212
.byte 45,45,180,45,117,153,90,88,45,45,180,45,117,153,90,88
.byte 191,191,198,191,145,121,99,46,191,191,198,191,145,121,99,46
.byte 7,7,28,7,56,27,14,63,7,7,28,7,56,27,14,63
.byte 173,173,142,173,1,35,71,172,173,173,142,173,1,35,71,172
.byte 90,90,117,90,234,47,180,176,90,90,117,90,234,47,180,176
.byte 131,131,54,131,108,181,27,239,131,131,54,131,108,181,27,239
.byte 51,51,204,51,133,255,102,182,51,51,204,51,133,255,102,182
.byte 99,99,145,99,63,242,198,92,99,99,145,99,63,242,198,92
.byte 2,2,8,2,16,10,4,18,2,2,8,2,16,10,4,18
.byte 170,170,146,170,57,56,73,147,170,170,146,170,57,56,73,147
.byte 113,113,217,113,175,168,226,222,113,113,217,113,175,168,226,222
.byte 200,200,7,200,14,207,141,198,200,200,7,200,14,207,141,198
.byte 25,25,100,25,200,125,50,209,25,25,100,25,200,125,50,209
.byte 73,73,57,73,114,112,146,59,73,73,57,73,114,112,146,59
.byte 217,217,67,217,134,154,175,95,217,217,67,217,134,154,175,95
.byte 242,242,239,242,195,29,249,49,242,242,239,242,195,29,249,49
.byte 227,227,171,227,75,72,219,168,227,227,171,227,75,72,219,168
.byte 91,91,113,91,226,42,182,185,91,91,113,91,226,42,182,185
.byte 136,136,26,136,52,146,13,188,136,136,26,136,52,146,13,188
.byte 154,154,82,154,164,200,41,62,154,154,82,154,164,200,41,62
.byte 38,38,152,38,45,190,76,11,38,38,152,38,45,190,76,11
.byte 50,50,200,50,141,250,100,191,50,50,200,50,141,250,100,191
.byte 176,176,250,176,233,74,125,89,176,176,250,176,233,74,125,89
.byte 233,233,131,233,27,106,207,242,233,233,131,233,27,106,207,242
.byte 15,15,60,15,120,51,30,119,15,15,60,15,120,51,30,119
.byte 213,213,115,213,230,166,183,51,213,213,115,213,230,166,183,51
.byte 128,128,58,128,116,186,29,244,128,128,58,128,116,186,29,244
.byte 190,190,194,190,153,124,97,39,190,190,194,190,153,124,97,39
.byte 205,205,19,205,38,222,135,235,205,205,19,205,38,222,135,235
.byte 52,52,208,52,189,228,104,137,52,52,208,52,189,228,104,137
.byte 72,72,61,72,122,117,144,50,72,72,61,72,122,117,144,50
.byte 255,255,219,255,171,36,227,84,255,255,219,255,171,36,227,84
.byte 122,122,245,122,247,143,244,141,122,122,245,122,247,143,244,141
.byte 144,144,122,144,244,234,61,100,144,144,122,144,244,234,61,100
.byte 95,95,97,95,194,62,190,157,95,95,97,95,194,62,190,157
.byte 32,32,128,32,29,160,64,61,32,32,128,32,29,160,64,61
.byte 104,104,189,104,103,213,208,15,104,104,189,104,103,213,208,15
.byte 26,26,104,26,208,114,52,202,26,26,104,26,208,114,52,202
.byte 174,174,130,174,25,44,65,183,174,174,130,174,25,44,65,183
.byte 180,180,234,180,201,94,117,125,180,180,234,180,201,94,117,125
.byte 84,84,77,84,154,25,168,206,84,84,77,84,154,25,168,206
.byte 147,147,118,147,236,229,59,127,147,147,118,147,236,229,59,127
.byte 34,34,136,34,13,170,68,47,34,34,136,34,13,170,68,47
.byte 100,100,141,100,7,233,200,99,100,100,141,100,7,233,200,99
.byte 241,241,227,241,219,18,255,42,241,241,227,241,219,18,255,42
.byte 115,115,209,115,191,162,230,204,115,115,209,115,191,162,230,204
.byte 18,18,72,18,144,90,36,130,18,18,72,18,144,90,36,130
.byte 64,64,29,64,58,93,128,122,64,64,29,64,58,93,128,122
.byte 8,8,32,8,64,40,16,72,8,8,32,8,64,40,16,72
.byte 195,195,43,195,86,232,155,149,195,195,43,195,86,232,155,149
.byte 236,236,151,236,51,123,197,223,236,236,151,236,51,123,197,223
.byte 219,219,75,219,150,144,171,77,219,219,75,219,150,144,171,77
.byte 161,161,190,161,97,31,95,192,161,161,190,161,97,31,95,192
.byte 141,141,14,141,28,131,7,145,141,141,14,141,28,131,7,145
.byte 61,61,244,61,245,201,122,200,61,61,244,61,245,201,122,200
.byte 151,151,102,151,204,241,51,91,151,151,102,151,204,241,51,91
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.byte 207,207,27,207,54,212,131,249,207,207,27,207,54,212,131,249
.byte 43,43,172,43,69,135,86,110,43,43,172,43,69,135,86,110
.byte 118,118,197,118,151,179,236,225,118,118,197,118,151,179,236,225
.byte 130,130,50,130,100,176,25,230,130,130,50,130,100,176,25,230
.byte 214,214,127,214,254,169,177,40,214,214,127,214,254,169,177,40
.byte 27,27,108,27,216,119,54,195,27,27,108,27,216,119,54,195
.byte 181,181,238,181,193,91,119,116,181,181,238,181,193,91,119,116
.byte 175,175,134,175,17,41,67,190,175,175,134,175,17,41,67,190
.byte 106,106,181,106,119,223,212,29,106,106,181,106,119,223,212,29
.byte 80,80,93,80,186,13,160,234,80,80,93,80,186,13,160,234
.byte 69,69,9,69,18,76,138,87,69,69,9,69,18,76,138,87
.byte 243,243,235,243,203,24,251,56,243,243,235,243,203,24,251,56
.byte 48,48,192,48,157,240,96,173,48,48,192,48,157,240,96,173
.byte 239,239,155,239,43,116,195,196,239,239,155,239,43,116,195,196
.byte 63,63,252,63,229,195,126,218,63,63,252,63,229,195,126,218
.byte 85,85,73,85,146,28,170,199,85,85,73,85,146,28,170,199
.byte 162,162,178,162,121,16,89,219,162,162,178,162,121,16,89,219
.byte 234,234,143,234,3,101,201,233,234,234,143,234,3,101,201,233
.byte 101,101,137,101,15,236,202,106,101,101,137,101,15,236,202,106
.byte 186,186,210,186,185,104,105,3,186,186,210,186,185,104,105,3
.byte 47,47,188,47,101,147,94,74,47,47,188,47,101,147,94,74
.byte 192,192,39,192,78,231,157,142,192,192,39,192,78,231,157,142
.byte 222,222,95,222,190,129,161,96,222,222,95,222,190,129,161,96
.byte 28,28,112,28,224,108,56,252,28,28,112,28,224,108,56,252
.byte 253,253,211,253,187,46,231,70,253,253,211,253,187,46,231,70
.byte 77,77,41,77,82,100,154,31,77,77,41,77,82,100,154,31
.byte 146,146,114,146,228,224,57,118,146,146,114,146,228,224,57,118
.byte 117,117,201,117,143,188,234,250,117,117,201,117,143,188,234,250
.byte 6,6,24,6,48,30,12,54,6,6,24,6,48,30,12,54
.byte 138,138,18,138,36,152,9,174,138,138,18,138,36,152,9,174
.byte 178,178,242,178,249,64,121,75,178,178,242,178,249,64,121,75
.byte 230,230,191,230,99,89,209,133,230,230,191,230,99,89,209,133
.byte 14,14,56,14,112,54,28,126,14,14,56,14,112,54,28,126
.byte 31,31,124,31,248,99,62,231,31,31,124,31,248,99,62,231
.byte 98,98,149,98,55,247,196,85,98,98,149,98,55,247,196,85
.byte 212,212,119,212,238,163,181,58,212,212,119,212,238,163,181,58
.byte 168,168,154,168,41,50,77,129,168,168,154,168,41,50,77,129
.byte 150,150,98,150,196,244,49,82,150,150,98,150,196,244,49,82
.byte 249,249,195,249,155,58,239,98,249,249,195,249,155,58,239,98
.byte 197,197,51,197,102,246,151,163,197,197,51,197,102,246,151,163
.byte 37,37,148,37,53,177,74,16,37,37,148,37,53,177,74,16
.byte 89,89,121,89,242,32,178,171,89,89,121,89,242,32,178,171
.byte 132,132,42,132,84,174,21,208,132,132,42,132,84,174,21,208
.byte 114,114,213,114,183,167,228,197,114,114,213,114,183,167,228,197
.byte 57,57,228,57,213,221,114,236,57,57,228,57,213,221,114,236
.byte 76,76,45,76,90,97,152,22,76,76,45,76,90,97,152,22
.byte 94,94,101,94,202,59,188,148,94,94,101,94,202,59,188,148
.byte 120,120,253,120,231,133,240,159,120,120,253,120,231,133,240,159
.byte 56,56,224,56,221,216,112,229,56,56,224,56,221,216,112,229
.byte 140,140,10,140,20,134,5,152,140,140,10,140,20,134,5,152
.byte 209,209,99,209,198,178,191,23,209,209,99,209,198,178,191,23
.byte 165,165,174,165,65,11,87,228,165,165,174,165,65,11,87,228
.byte 226,226,175,226,67,77,217,161,226,226,175,226,67,77,217,161
.byte 97,97,153,97,47,248,194,78,97,97,153,97,47,248,194,78
.byte 179,179,246,179,241,69,123,66,179,179,246,179,241,69,123,66
.byte 33,33,132,33,21,165,66,52,33,33,132,33,21,165,66,52
.byte 156,156,74,156,148,214,37,8,156,156,74,156,148,214,37,8
.byte 30,30,120,30,240,102,60,238,30,30,120,30,240,102,60,238
.byte 67,67,17,67,34,82,134,97,67,67,17,67,34,82,134,97
.byte 199,199,59,199,118,252,147,177,199,199,59,199,118,252,147,177
.byte 252,252,215,252,179,43,229,79,252,252,215,252,179,43,229,79
.byte 4,4,16,4,32,20,8,36,4,4,16,4,32,20,8,36
.byte 81,81,89,81,178,8,162,227,81,81,89,81,178,8,162,227
.byte 153,153,94,153,188,199,47,37,153,153,94,153,188,199,47,37
.byte 109,109,169,109,79,196,218,34,109,109,169,109,79,196,218,34
.byte 13,13,52,13,104,57,26,101,13,13,52,13,104,57,26,101
.byte 250,250,207,250,131,53,233,121,250,250,207,250,131,53,233,121
.byte 223,223,91,223,182,132,163,105,223,223,91,223,182,132,163,105
.byte 126,126,229,126,215,155,252,169,126,126,229,126,215,155,252,169
.byte 36,36,144,36,61,180,72,25,36,36,144,36,61,180,72,25
.byte 59,59,236,59,197,215,118,254,59,59,236,59,197,215,118,254
.byte 171,171,150,171,49,61,75,154,171,171,150,171,49,61,75,154
.byte 206,206,31,206,62,209,129,240,206,206,31,206,62,209,129,240
.byte 17,17,68,17,136,85,34,153,17,17,68,17,136,85,34,153
.byte 143,143,6,143,12,137,3,131,143,143,6,143,12,137,3,131
.byte 78,78,37,78,74,107,156,4,78,78,37,78,74,107,156,4
.byte 183,183,230,183,209,81,115,102,183,183,230,183,209,81,115,102
.byte 235,235,139,235,11,96,203,224,235,235,139,235,11,96,203,224
.byte 60,60,240,60,253,204,120,193,60,60,240,60,253,204,120,193
.byte 129,129,62,129,124,191,31,253,129,129,62,129,124,191,31,253
.byte 148,148,106,148,212,254,53,64,148,148,106,148,212,254,53,64
.byte 247,247,251,247,235,12,243,28,247,247,251,247,235,12,243,28
.byte 185,185,222,185,161,103,111,24,185,185,222,185,161,103,111,24
.byte 19,19,76,19,152,95,38,139,19,19,76,19,152,95,38,139
.byte 44,44,176,44,125,156,88,81,44,44,176,44,125,156,88,81
.byte 211,211,107,211,214,184,187,5,211,211,107,211,214,184,187,5
.byte 231,231,187,231,107,92,211,140,231,231,187,231,107,92,211,140
.byte 110,110,165,110,87,203,220,57,110,110,165,110,87,203,220,57
.byte 196,196,55,196,110,243,149,170,196,196,55,196,110,243,149,170
.byte 3,3,12,3,24,15,6,27,3,3,12,3,24,15,6,27
.byte 86,86,69,86,138,19,172,220,86,86,69,86,138,19,172,220
.byte 68,68,13,68,26,73,136,94,68,68,13,68,26,73,136,94
.byte 127,127,225,127,223,158,254,160,127,127,225,127,223,158,254,160
.byte 169,169,158,169,33,55,79,136,169,169,158,169,33,55,79,136
.byte 42,42,168,42,77,130,84,103,42,42,168,42,77,130,84,103
.byte 187,187,214,187,177,109,107,10,187,187,214,187,177,109,107,10
.byte 193,193,35,193,70,226,159,135,193,193,35,193,70,226,159,135
.byte 83,83,81,83,162,2,166,241,83,83,81,83,162,2,166,241
.byte 220,220,87,220,174,139,165,114,220,220,87,220,174,139,165,114
.byte 11,11,44,11,88,39,22,83,11,11,44,11,88,39,22,83
.byte 157,157,78,157,156,211,39,1,157,157,78,157,156,211,39,1
.byte 108,108,173,108,71,193,216,43,108,108,173,108,71,193,216,43
.byte 49,49,196,49,149,245,98,164,49,49,196,49,149,245,98,164
.byte 116,116,205,116,135,185,232,243,116,116,205,116,135,185,232,243
.byte 246,246,255,246,227,9,241,21,246,246,255,246,227,9,241,21
.byte 70,70,5,70,10,67,140,76,70,70,5,70,10,67,140,76
.byte 172,172,138,172,9,38,69,165,172,172,138,172,9,38,69,165
.byte 137,137,30,137,60,151,15,181,137,137,30,137,60,151,15,181
.byte 20,20,80,20,160,68,40,180,20,20,80,20,160,68,40,180
.byte 225,225,163,225,91,66,223,186,225,225,163,225,91,66,223,186
.byte 22,22,88,22,176,78,44,166,22,22,88,22,176,78,44,166
.byte 58,58,232,58,205,210,116,247,58,58,232,58,205,210,116,247
.byte 105,105,185,105,111,208,210,6,105,105,185,105,111,208,210,6
.byte 9,9,36,9,72,45,18,65,9,9,36,9,72,45,18,65
.byte 112,112,221,112,167,173,224,215,112,112,221,112,167,173,224,215
.byte 182,182,226,182,217,84,113,111,182,182,226,182,217,84,113,111
.byte 208,208,103,208,206,183,189,30,208,208,103,208,206,183,189,30
.byte 237,237,147,237,59,126,199,214,237,237,147,237,59,126,199,214
.byte 204,204,23,204,46,219,133,226,204,204,23,204,46,219,133,226
.byte 66,66,21,66,42,87,132,104,66,66,21,66,42,87,132,104
.byte 152,152,90,152,180,194,45,44,152,152,90,152,180,194,45,44
.byte 164,164,170,164,73,14,85,237,164,164,170,164,73,14,85,237
.byte 40,40,160,40,93,136,80,117,40,40,160,40,93,136,80,117
.byte 92,92,109,92,218,49,184,134,92,92,109,92,218,49,184,134
.byte 248,248,199,248,147,63,237,107,248,248,199,248,147,63,237,107
.byte 134,134,34,134,68,164,17,194,134,134,34,134,68,164,17,194
.byte 24,35,198,232,135,184,1,79
.byte 54,166,210,245,121,111,145,82
.byte 96,188,155,142,163,12,123,53
.byte 29,224,215,194,46,75,254,87
.byte 21,119,55,229,159,240,74,218
.byte 88,201,41,10,177,160,107,133
.byte 189,93,16,244,203,62,5,103
.byte 228,39,65,139,167,125,149,216
.byte 251,238,124,102,221,23,71,158
.byte 202,45,191,7,173,90,131,51

View File

@@ -0,0 +1,943 @@
; 1 "crypto/whrlpool/wp-masm-x86_64.S.tmp"
; 1 "<built-in>" 1
; 1 "<built-in>" 3
; 399 "<built-in>" 3
; 1 "<command line>" 1
; 1 "<built-in>" 2
; 1 "crypto/whrlpool/wp-masm-x86_64.S.tmp" 2
OPTION DOTNAME
; 1 "./crypto/x86_arch.h" 1
; 16 "./crypto/x86_arch.h"
; 40 "./crypto/x86_arch.h"
; 3 "crypto/whrlpool/wp-masm-x86_64.S.tmp" 2
.text$ SEGMENT ALIGN(64) 'CODE'
PUBLIC whirlpool_block
ALIGN 16
whirlpool_block PROC PUBLIC
mov QWORD PTR[8+rsp],rdi ;WIN64 prologue
mov QWORD PTR[16+rsp],rsi
mov rax,rsp
$L$SEH_begin_whirlpool_block::
mov rdi,rcx
mov rsi,rdx
mov rdx,r8
push rbx
push rbp
push r12
push r13
push r14
push r15
mov r11,rsp
sub rsp,128+40
and rsp,-64
lea r10,QWORD PTR[128+rsp]
mov QWORD PTR[r10],rdi
mov QWORD PTR[8+r10],rsi
mov QWORD PTR[16+r10],rdx
mov QWORD PTR[32+r10],r11
$L$prologue::
mov rbx,r10
lea rbp,QWORD PTR[$L$table]
xor rcx,rcx
xor rdx,rdx
mov r8,QWORD PTR[rdi]
mov r9,QWORD PTR[8+rdi]
mov r10,QWORD PTR[16+rdi]
mov r11,QWORD PTR[24+rdi]
mov r12,QWORD PTR[32+rdi]
mov r13,QWORD PTR[40+rdi]
mov r14,QWORD PTR[48+rdi]
mov r15,QWORD PTR[56+rdi]
$L$outerloop::
mov QWORD PTR[rsp],r8
mov QWORD PTR[8+rsp],r9
mov QWORD PTR[16+rsp],r10
mov QWORD PTR[24+rsp],r11
mov QWORD PTR[32+rsp],r12
mov QWORD PTR[40+rsp],r13
mov QWORD PTR[48+rsp],r14
mov QWORD PTR[56+rsp],r15
xor r8,QWORD PTR[rsi]
xor r9,QWORD PTR[8+rsi]
xor r10,QWORD PTR[16+rsi]
xor r11,QWORD PTR[24+rsi]
xor r12,QWORD PTR[32+rsi]
xor r13,QWORD PTR[40+rsi]
xor r14,QWORD PTR[48+rsi]
xor r15,QWORD PTR[56+rsi]
mov QWORD PTR[((64+0))+rsp],r8
mov QWORD PTR[((64+8))+rsp],r9
mov QWORD PTR[((64+16))+rsp],r10
mov QWORD PTR[((64+24))+rsp],r11
mov QWORD PTR[((64+32))+rsp],r12
mov QWORD PTR[((64+40))+rsp],r13
mov QWORD PTR[((64+48))+rsp],r14
mov QWORD PTR[((64+56))+rsp],r15
xor rsi,rsi
mov QWORD PTR[24+rbx],rsi
ALIGN 16
$L$round::
mov r8,QWORD PTR[4096+rsi*8+rbp]
mov eax,DWORD PTR[rsp]
mov ebx,DWORD PTR[4+rsp]
mov cl,al
mov dl,ah
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr eax,16
xor r8,QWORD PTR[rsi*8+rbp]
mov r9,QWORD PTR[7+rdi*8+rbp]
mov cl,al
mov dl,ah
mov eax,DWORD PTR[((0+8))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
mov r10,QWORD PTR[6+rsi*8+rbp]
mov r11,QWORD PTR[5+rdi*8+rbp]
mov cl,bl
mov dl,bh
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr ebx,16
mov r12,QWORD PTR[4+rsi*8+rbp]
mov r13,QWORD PTR[3+rdi*8+rbp]
mov cl,bl
mov dl,bh
mov ebx,DWORD PTR[((0+8+4))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
mov r14,QWORD PTR[2+rsi*8+rbp]
mov r15,QWORD PTR[1+rdi*8+rbp]
mov cl,al
mov dl,ah
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr eax,16
xor r9,QWORD PTR[rsi*8+rbp]
xor r10,QWORD PTR[7+rdi*8+rbp]
mov cl,al
mov dl,ah
mov eax,DWORD PTR[((8+8))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r11,QWORD PTR[6+rsi*8+rbp]
xor r12,QWORD PTR[5+rdi*8+rbp]
mov cl,bl
mov dl,bh
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr ebx,16
xor r13,QWORD PTR[4+rsi*8+rbp]
xor r14,QWORD PTR[3+rdi*8+rbp]
mov cl,bl
mov dl,bh
mov ebx,DWORD PTR[((8+8+4))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r15,QWORD PTR[2+rsi*8+rbp]
xor r8,QWORD PTR[1+rdi*8+rbp]
mov cl,al
mov dl,ah
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr eax,16
xor r10,QWORD PTR[rsi*8+rbp]
xor r11,QWORD PTR[7+rdi*8+rbp]
mov cl,al
mov dl,ah
mov eax,DWORD PTR[((16+8))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r12,QWORD PTR[6+rsi*8+rbp]
xor r13,QWORD PTR[5+rdi*8+rbp]
mov cl,bl
mov dl,bh
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr ebx,16
xor r14,QWORD PTR[4+rsi*8+rbp]
xor r15,QWORD PTR[3+rdi*8+rbp]
mov cl,bl
mov dl,bh
mov ebx,DWORD PTR[((16+8+4))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r8,QWORD PTR[2+rsi*8+rbp]
xor r9,QWORD PTR[1+rdi*8+rbp]
mov cl,al
mov dl,ah
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr eax,16
xor r11,QWORD PTR[rsi*8+rbp]
xor r12,QWORD PTR[7+rdi*8+rbp]
mov cl,al
mov dl,ah
mov eax,DWORD PTR[((24+8))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r13,QWORD PTR[6+rsi*8+rbp]
xor r14,QWORD PTR[5+rdi*8+rbp]
mov cl,bl
mov dl,bh
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr ebx,16
xor r15,QWORD PTR[4+rsi*8+rbp]
xor r8,QWORD PTR[3+rdi*8+rbp]
mov cl,bl
mov dl,bh
mov ebx,DWORD PTR[((24+8+4))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r9,QWORD PTR[2+rsi*8+rbp]
xor r10,QWORD PTR[1+rdi*8+rbp]
mov cl,al
mov dl,ah
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr eax,16
xor r12,QWORD PTR[rsi*8+rbp]
xor r13,QWORD PTR[7+rdi*8+rbp]
mov cl,al
mov dl,ah
mov eax,DWORD PTR[((32+8))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r14,QWORD PTR[6+rsi*8+rbp]
xor r15,QWORD PTR[5+rdi*8+rbp]
mov cl,bl
mov dl,bh
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr ebx,16
xor r8,QWORD PTR[4+rsi*8+rbp]
xor r9,QWORD PTR[3+rdi*8+rbp]
mov cl,bl
mov dl,bh
mov ebx,DWORD PTR[((32+8+4))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r10,QWORD PTR[2+rsi*8+rbp]
xor r11,QWORD PTR[1+rdi*8+rbp]
mov cl,al
mov dl,ah
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr eax,16
xor r13,QWORD PTR[rsi*8+rbp]
xor r14,QWORD PTR[7+rdi*8+rbp]
mov cl,al
mov dl,ah
mov eax,DWORD PTR[((40+8))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r15,QWORD PTR[6+rsi*8+rbp]
xor r8,QWORD PTR[5+rdi*8+rbp]
mov cl,bl
mov dl,bh
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr ebx,16
xor r9,QWORD PTR[4+rsi*8+rbp]
xor r10,QWORD PTR[3+rdi*8+rbp]
mov cl,bl
mov dl,bh
mov ebx,DWORD PTR[((40+8+4))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r11,QWORD PTR[2+rsi*8+rbp]
xor r12,QWORD PTR[1+rdi*8+rbp]
mov cl,al
mov dl,ah
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr eax,16
xor r14,QWORD PTR[rsi*8+rbp]
xor r15,QWORD PTR[7+rdi*8+rbp]
mov cl,al
mov dl,ah
mov eax,DWORD PTR[((48+8))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r8,QWORD PTR[6+rsi*8+rbp]
xor r9,QWORD PTR[5+rdi*8+rbp]
mov cl,bl
mov dl,bh
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr ebx,16
xor r10,QWORD PTR[4+rsi*8+rbp]
xor r11,QWORD PTR[3+rdi*8+rbp]
mov cl,bl
mov dl,bh
mov ebx,DWORD PTR[((48+8+4))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r12,QWORD PTR[2+rsi*8+rbp]
xor r13,QWORD PTR[1+rdi*8+rbp]
mov cl,al
mov dl,ah
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr eax,16
xor r15,QWORD PTR[rsi*8+rbp]
xor r8,QWORD PTR[7+rdi*8+rbp]
mov cl,al
mov dl,ah
mov eax,DWORD PTR[((56+8))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r9,QWORD PTR[6+rsi*8+rbp]
xor r10,QWORD PTR[5+rdi*8+rbp]
mov cl,bl
mov dl,bh
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr ebx,16
xor r11,QWORD PTR[4+rsi*8+rbp]
xor r12,QWORD PTR[3+rdi*8+rbp]
mov cl,bl
mov dl,bh
mov ebx,DWORD PTR[((56+8+4))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r13,QWORD PTR[2+rsi*8+rbp]
xor r14,QWORD PTR[1+rdi*8+rbp]
mov QWORD PTR[rsp],r8
mov QWORD PTR[8+rsp],r9
mov QWORD PTR[16+rsp],r10
mov QWORD PTR[24+rsp],r11
mov QWORD PTR[32+rsp],r12
mov QWORD PTR[40+rsp],r13
mov QWORD PTR[48+rsp],r14
mov QWORD PTR[56+rsp],r15
mov cl,al
mov dl,ah
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr eax,16
xor r8,QWORD PTR[rsi*8+rbp]
xor r9,QWORD PTR[7+rdi*8+rbp]
mov cl,al
mov dl,ah
mov eax,DWORD PTR[((64+0+8))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r10,QWORD PTR[6+rsi*8+rbp]
xor r11,QWORD PTR[5+rdi*8+rbp]
mov cl,bl
mov dl,bh
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr ebx,16
xor r12,QWORD PTR[4+rsi*8+rbp]
xor r13,QWORD PTR[3+rdi*8+rbp]
mov cl,bl
mov dl,bh
mov ebx,DWORD PTR[((64+0+8+4))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r14,QWORD PTR[2+rsi*8+rbp]
xor r15,QWORD PTR[1+rdi*8+rbp]
mov cl,al
mov dl,ah
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr eax,16
xor r9,QWORD PTR[rsi*8+rbp]
xor r10,QWORD PTR[7+rdi*8+rbp]
mov cl,al
mov dl,ah
mov eax,DWORD PTR[((64+8+8))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r11,QWORD PTR[6+rsi*8+rbp]
xor r12,QWORD PTR[5+rdi*8+rbp]
mov cl,bl
mov dl,bh
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr ebx,16
xor r13,QWORD PTR[4+rsi*8+rbp]
xor r14,QWORD PTR[3+rdi*8+rbp]
mov cl,bl
mov dl,bh
mov ebx,DWORD PTR[((64+8+8+4))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r15,QWORD PTR[2+rsi*8+rbp]
xor r8,QWORD PTR[1+rdi*8+rbp]
mov cl,al
mov dl,ah
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr eax,16
xor r10,QWORD PTR[rsi*8+rbp]
xor r11,QWORD PTR[7+rdi*8+rbp]
mov cl,al
mov dl,ah
mov eax,DWORD PTR[((64+16+8))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r12,QWORD PTR[6+rsi*8+rbp]
xor r13,QWORD PTR[5+rdi*8+rbp]
mov cl,bl
mov dl,bh
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr ebx,16
xor r14,QWORD PTR[4+rsi*8+rbp]
xor r15,QWORD PTR[3+rdi*8+rbp]
mov cl,bl
mov dl,bh
mov ebx,DWORD PTR[((64+16+8+4))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r8,QWORD PTR[2+rsi*8+rbp]
xor r9,QWORD PTR[1+rdi*8+rbp]
mov cl,al
mov dl,ah
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr eax,16
xor r11,QWORD PTR[rsi*8+rbp]
xor r12,QWORD PTR[7+rdi*8+rbp]
mov cl,al
mov dl,ah
mov eax,DWORD PTR[((64+24+8))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r13,QWORD PTR[6+rsi*8+rbp]
xor r14,QWORD PTR[5+rdi*8+rbp]
mov cl,bl
mov dl,bh
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr ebx,16
xor r15,QWORD PTR[4+rsi*8+rbp]
xor r8,QWORD PTR[3+rdi*8+rbp]
mov cl,bl
mov dl,bh
mov ebx,DWORD PTR[((64+24+8+4))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r9,QWORD PTR[2+rsi*8+rbp]
xor r10,QWORD PTR[1+rdi*8+rbp]
mov cl,al
mov dl,ah
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr eax,16
xor r12,QWORD PTR[rsi*8+rbp]
xor r13,QWORD PTR[7+rdi*8+rbp]
mov cl,al
mov dl,ah
mov eax,DWORD PTR[((64+32+8))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r14,QWORD PTR[6+rsi*8+rbp]
xor r15,QWORD PTR[5+rdi*8+rbp]
mov cl,bl
mov dl,bh
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr ebx,16
xor r8,QWORD PTR[4+rsi*8+rbp]
xor r9,QWORD PTR[3+rdi*8+rbp]
mov cl,bl
mov dl,bh
mov ebx,DWORD PTR[((64+32+8+4))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r10,QWORD PTR[2+rsi*8+rbp]
xor r11,QWORD PTR[1+rdi*8+rbp]
mov cl,al
mov dl,ah
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr eax,16
xor r13,QWORD PTR[rsi*8+rbp]
xor r14,QWORD PTR[7+rdi*8+rbp]
mov cl,al
mov dl,ah
mov eax,DWORD PTR[((64+40+8))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r15,QWORD PTR[6+rsi*8+rbp]
xor r8,QWORD PTR[5+rdi*8+rbp]
mov cl,bl
mov dl,bh
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr ebx,16
xor r9,QWORD PTR[4+rsi*8+rbp]
xor r10,QWORD PTR[3+rdi*8+rbp]
mov cl,bl
mov dl,bh
mov ebx,DWORD PTR[((64+40+8+4))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r11,QWORD PTR[2+rsi*8+rbp]
xor r12,QWORD PTR[1+rdi*8+rbp]
mov cl,al
mov dl,ah
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr eax,16
xor r14,QWORD PTR[rsi*8+rbp]
xor r15,QWORD PTR[7+rdi*8+rbp]
mov cl,al
mov dl,ah
mov eax,DWORD PTR[((64+48+8))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r8,QWORD PTR[6+rsi*8+rbp]
xor r9,QWORD PTR[5+rdi*8+rbp]
mov cl,bl
mov dl,bh
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr ebx,16
xor r10,QWORD PTR[4+rsi*8+rbp]
xor r11,QWORD PTR[3+rdi*8+rbp]
mov cl,bl
mov dl,bh
mov ebx,DWORD PTR[((64+48+8+4))+rsp]
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r12,QWORD PTR[2+rsi*8+rbp]
xor r13,QWORD PTR[1+rdi*8+rbp]
mov cl,al
mov dl,ah
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr eax,16
xor r15,QWORD PTR[rsi*8+rbp]
xor r8,QWORD PTR[7+rdi*8+rbp]
mov cl,al
mov dl,ah
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r9,QWORD PTR[6+rsi*8+rbp]
xor r10,QWORD PTR[5+rdi*8+rbp]
mov cl,bl
mov dl,bh
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
shr ebx,16
xor r11,QWORD PTR[4+rsi*8+rbp]
xor r12,QWORD PTR[3+rdi*8+rbp]
mov cl,bl
mov dl,bh
lea rsi,QWORD PTR[rcx*1+rcx]
lea rdi,QWORD PTR[rdx*1+rdx]
xor r13,QWORD PTR[2+rsi*8+rbp]
xor r14,QWORD PTR[1+rdi*8+rbp]
lea rbx,QWORD PTR[128+rsp]
mov rsi,QWORD PTR[24+rbx]
add rsi,1
cmp rsi,10
je $L$roundsdone
mov QWORD PTR[24+rbx],rsi
mov QWORD PTR[((64+0))+rsp],r8
mov QWORD PTR[((64+8))+rsp],r9
mov QWORD PTR[((64+16))+rsp],r10
mov QWORD PTR[((64+24))+rsp],r11
mov QWORD PTR[((64+32))+rsp],r12
mov QWORD PTR[((64+40))+rsp],r13
mov QWORD PTR[((64+48))+rsp],r14
mov QWORD PTR[((64+56))+rsp],r15
jmp $L$round
ALIGN 16
$L$roundsdone::
mov rdi,QWORD PTR[rbx]
mov rsi,QWORD PTR[8+rbx]
mov rax,QWORD PTR[16+rbx]
xor r8,QWORD PTR[rsi]
xor r9,QWORD PTR[8+rsi]
xor r10,QWORD PTR[16+rsi]
xor r11,QWORD PTR[24+rsi]
xor r12,QWORD PTR[32+rsi]
xor r13,QWORD PTR[40+rsi]
xor r14,QWORD PTR[48+rsi]
xor r15,QWORD PTR[56+rsi]
xor r8,QWORD PTR[rdi]
xor r9,QWORD PTR[8+rdi]
xor r10,QWORD PTR[16+rdi]
xor r11,QWORD PTR[24+rdi]
xor r12,QWORD PTR[32+rdi]
xor r13,QWORD PTR[40+rdi]
xor r14,QWORD PTR[48+rdi]
xor r15,QWORD PTR[56+rdi]
mov QWORD PTR[rdi],r8
mov QWORD PTR[8+rdi],r9
mov QWORD PTR[16+rdi],r10
mov QWORD PTR[24+rdi],r11
mov QWORD PTR[32+rdi],r12
mov QWORD PTR[40+rdi],r13
mov QWORD PTR[48+rdi],r14
mov QWORD PTR[56+rdi],r15
lea rsi,QWORD PTR[64+rsi]
sub rax,1
jz $L$alldone
mov QWORD PTR[8+rbx],rsi
mov QWORD PTR[16+rbx],rax
jmp $L$outerloop
$L$alldone::
mov rsi,QWORD PTR[32+rbx]
mov r15,QWORD PTR[rsi]
mov r14,QWORD PTR[8+rsi]
mov r13,QWORD PTR[16+rsi]
mov r12,QWORD PTR[24+rsi]
mov rbp,QWORD PTR[32+rsi]
mov rbx,QWORD PTR[40+rsi]
lea rsp,QWORD PTR[48+rsi]
$L$epilogue::
mov rdi,QWORD PTR[8+rsp] ;WIN64 epilogue
mov rsi,QWORD PTR[16+rsp]
DB 0F3h,0C3h ;repret
$L$SEH_end_whirlpool_block::
whirlpool_block ENDP
ALIGN 64
$L$table::
DB 24,24,96,24,192,120,48,216,24,24,96,24,192,120,48,216
DB 35,35,140,35,5,175,70,38,35,35,140,35,5,175,70,38
DB 198,198,63,198,126,249,145,184,198,198,63,198,126,249,145,184
DB 232,232,135,232,19,111,205,251,232,232,135,232,19,111,205,251
DB 135,135,38,135,76,161,19,203,135,135,38,135,76,161,19,203
DB 184,184,218,184,169,98,109,17,184,184,218,184,169,98,109,17
DB 1,1,4,1,8,5,2,9,1,1,4,1,8,5,2,9
DB 79,79,33,79,66,110,158,13,79,79,33,79,66,110,158,13
DB 54,54,216,54,173,238,108,155,54,54,216,54,173,238,108,155
DB 166,166,162,166,89,4,81,255,166,166,162,166,89,4,81,255
DB 210,210,111,210,222,189,185,12,210,210,111,210,222,189,185,12
DB 245,245,243,245,251,6,247,14,245,245,243,245,251,6,247,14
DB 121,121,249,121,239,128,242,150,121,121,249,121,239,128,242,150
DB 111,111,161,111,95,206,222,48,111,111,161,111,95,206,222,48
DB 145,145,126,145,252,239,63,109,145,145,126,145,252,239,63,109
DB 82,82,85,82,170,7,164,248,82,82,85,82,170,7,164,248
DB 96,96,157,96,39,253,192,71,96,96,157,96,39,253,192,71
DB 188,188,202,188,137,118,101,53,188,188,202,188,137,118,101,53
DB 155,155,86,155,172,205,43,55,155,155,86,155,172,205,43,55
DB 142,142,2,142,4,140,1,138,142,142,2,142,4,140,1,138
DB 163,163,182,163,113,21,91,210,163,163,182,163,113,21,91,210
DB 12,12,48,12,96,60,24,108,12,12,48,12,96,60,24,108
DB 123,123,241,123,255,138,246,132,123,123,241,123,255,138,246,132
DB 53,53,212,53,181,225,106,128,53,53,212,53,181,225,106,128
DB 29,29,116,29,232,105,58,245,29,29,116,29,232,105,58,245
DB 224,224,167,224,83,71,221,179,224,224,167,224,83,71,221,179
DB 215,215,123,215,246,172,179,33,215,215,123,215,246,172,179,33
DB 194,194,47,194,94,237,153,156,194,194,47,194,94,237,153,156
DB 46,46,184,46,109,150,92,67,46,46,184,46,109,150,92,67
DB 75,75,49,75,98,122,150,41,75,75,49,75,98,122,150,41
DB 254,254,223,254,163,33,225,93,254,254,223,254,163,33,225,93
DB 87,87,65,87,130,22,174,213,87,87,65,87,130,22,174,213
DB 21,21,84,21,168,65,42,189,21,21,84,21,168,65,42,189
DB 119,119,193,119,159,182,238,232,119,119,193,119,159,182,238,232
DB 55,55,220,55,165,235,110,146,55,55,220,55,165,235,110,146
DB 229,229,179,229,123,86,215,158,229,229,179,229,123,86,215,158
DB 159,159,70,159,140,217,35,19,159,159,70,159,140,217,35,19
DB 240,240,231,240,211,23,253,35,240,240,231,240,211,23,253,35
DB 74,74,53,74,106,127,148,32,74,74,53,74,106,127,148,32
DB 218,218,79,218,158,149,169,68,218,218,79,218,158,149,169,68
DB 88,88,125,88,250,37,176,162,88,88,125,88,250,37,176,162
DB 201,201,3,201,6,202,143,207,201,201,3,201,6,202,143,207
DB 41,41,164,41,85,141,82,124,41,41,164,41,85,141,82,124
DB 10,10,40,10,80,34,20,90,10,10,40,10,80,34,20,90
DB 177,177,254,177,225,79,127,80,177,177,254,177,225,79,127,80
DB 160,160,186,160,105,26,93,201,160,160,186,160,105,26,93,201
DB 107,107,177,107,127,218,214,20,107,107,177,107,127,218,214,20
DB 133,133,46,133,92,171,23,217,133,133,46,133,92,171,23,217
DB 189,189,206,189,129,115,103,60,189,189,206,189,129,115,103,60
DB 93,93,105,93,210,52,186,143,93,93,105,93,210,52,186,143
DB 16,16,64,16,128,80,32,144,16,16,64,16,128,80,32,144
DB 244,244,247,244,243,3,245,7,244,244,247,244,243,3,245,7
DB 203,203,11,203,22,192,139,221,203,203,11,203,22,192,139,221
DB 62,62,248,62,237,198,124,211,62,62,248,62,237,198,124,211
DB 5,5,20,5,40,17,10,45,5,5,20,5,40,17,10,45
DB 103,103,129,103,31,230,206,120,103,103,129,103,31,230,206,120
DB 228,228,183,228,115,83,213,151,228,228,183,228,115,83,213,151
DB 39,39,156,39,37,187,78,2,39,39,156,39,37,187,78,2
DB 65,65,25,65,50,88,130,115,65,65,25,65,50,88,130,115
DB 139,139,22,139,44,157,11,167,139,139,22,139,44,157,11,167
DB 167,167,166,167,81,1,83,246,167,167,166,167,81,1,83,246
DB 125,125,233,125,207,148,250,178,125,125,233,125,207,148,250,178
DB 149,149,110,149,220,251,55,73,149,149,110,149,220,251,55,73
DB 216,216,71,216,142,159,173,86,216,216,71,216,142,159,173,86
DB 251,251,203,251,139,48,235,112,251,251,203,251,139,48,235,112
DB 238,238,159,238,35,113,193,205,238,238,159,238,35,113,193,205
DB 124,124,237,124,199,145,248,187,124,124,237,124,199,145,248,187
DB 102,102,133,102,23,227,204,113,102,102,133,102,23,227,204,113
DB 221,221,83,221,166,142,167,123,221,221,83,221,166,142,167,123
DB 23,23,92,23,184,75,46,175,23,23,92,23,184,75,46,175
DB 71,71,1,71,2,70,142,69,71,71,1,71,2,70,142,69
DB 158,158,66,158,132,220,33,26,158,158,66,158,132,220,33,26
DB 202,202,15,202,30,197,137,212,202,202,15,202,30,197,137,212
DB 45,45,180,45,117,153,90,88,45,45,180,45,117,153,90,88
DB 191,191,198,191,145,121,99,46,191,191,198,191,145,121,99,46
DB 7,7,28,7,56,27,14,63,7,7,28,7,56,27,14,63
DB 173,173,142,173,1,35,71,172,173,173,142,173,1,35,71,172
DB 90,90,117,90,234,47,180,176,90,90,117,90,234,47,180,176
DB 131,131,54,131,108,181,27,239,131,131,54,131,108,181,27,239
DB 51,51,204,51,133,255,102,182,51,51,204,51,133,255,102,182
DB 99,99,145,99,63,242,198,92,99,99,145,99,63,242,198,92
DB 2,2,8,2,16,10,4,18,2,2,8,2,16,10,4,18
DB 170,170,146,170,57,56,73,147,170,170,146,170,57,56,73,147
DB 113,113,217,113,175,168,226,222,113,113,217,113,175,168,226,222
DB 200,200,7,200,14,207,141,198,200,200,7,200,14,207,141,198
DB 25,25,100,25,200,125,50,209,25,25,100,25,200,125,50,209
DB 73,73,57,73,114,112,146,59,73,73,57,73,114,112,146,59
DB 217,217,67,217,134,154,175,95,217,217,67,217,134,154,175,95
DB 242,242,239,242,195,29,249,49,242,242,239,242,195,29,249,49
DB 227,227,171,227,75,72,219,168,227,227,171,227,75,72,219,168
DB 91,91,113,91,226,42,182,185,91,91,113,91,226,42,182,185
DB 136,136,26,136,52,146,13,188,136,136,26,136,52,146,13,188
DB 154,154,82,154,164,200,41,62,154,154,82,154,164,200,41,62
DB 38,38,152,38,45,190,76,11,38,38,152,38,45,190,76,11
DB 50,50,200,50,141,250,100,191,50,50,200,50,141,250,100,191
DB 176,176,250,176,233,74,125,89,176,176,250,176,233,74,125,89
DB 233,233,131,233,27,106,207,242,233,233,131,233,27,106,207,242
DB 15,15,60,15,120,51,30,119,15,15,60,15,120,51,30,119
DB 213,213,115,213,230,166,183,51,213,213,115,213,230,166,183,51
DB 128,128,58,128,116,186,29,244,128,128,58,128,116,186,29,244
DB 190,190,194,190,153,124,97,39,190,190,194,190,153,124,97,39
DB 205,205,19,205,38,222,135,235,205,205,19,205,38,222,135,235
DB 52,52,208,52,189,228,104,137,52,52,208,52,189,228,104,137
DB 72,72,61,72,122,117,144,50,72,72,61,72,122,117,144,50
DB 255,255,219,255,171,36,227,84,255,255,219,255,171,36,227,84
DB 122,122,245,122,247,143,244,141,122,122,245,122,247,143,244,141
DB 144,144,122,144,244,234,61,100,144,144,122,144,244,234,61,100
DB 95,95,97,95,194,62,190,157,95,95,97,95,194,62,190,157
DB 32,32,128,32,29,160,64,61,32,32,128,32,29,160,64,61
DB 104,104,189,104,103,213,208,15,104,104,189,104,103,213,208,15
DB 26,26,104,26,208,114,52,202,26,26,104,26,208,114,52,202
DB 174,174,130,174,25,44,65,183,174,174,130,174,25,44,65,183
DB 180,180,234,180,201,94,117,125,180,180,234,180,201,94,117,125
DB 84,84,77,84,154,25,168,206,84,84,77,84,154,25,168,206
DB 147,147,118,147,236,229,59,127,147,147,118,147,236,229,59,127
DB 34,34,136,34,13,170,68,47,34,34,136,34,13,170,68,47
DB 100,100,141,100,7,233,200,99,100,100,141,100,7,233,200,99
DB 241,241,227,241,219,18,255,42,241,241,227,241,219,18,255,42
DB 115,115,209,115,191,162,230,204,115,115,209,115,191,162,230,204
DB 18,18,72,18,144,90,36,130,18,18,72,18,144,90,36,130
DB 64,64,29,64,58,93,128,122,64,64,29,64,58,93,128,122
DB 8,8,32,8,64,40,16,72,8,8,32,8,64,40,16,72
DB 195,195,43,195,86,232,155,149,195,195,43,195,86,232,155,149
DB 236,236,151,236,51,123,197,223,236,236,151,236,51,123,197,223
DB 219,219,75,219,150,144,171,77,219,219,75,219,150,144,171,77
DB 161,161,190,161,97,31,95,192,161,161,190,161,97,31,95,192
DB 141,141,14,141,28,131,7,145,141,141,14,141,28,131,7,145
DB 61,61,244,61,245,201,122,200,61,61,244,61,245,201,122,200
DB 151,151,102,151,204,241,51,91,151,151,102,151,204,241,51,91
DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DB 207,207,27,207,54,212,131,249,207,207,27,207,54,212,131,249
DB 43,43,172,43,69,135,86,110,43,43,172,43,69,135,86,110
DB 118,118,197,118,151,179,236,225,118,118,197,118,151,179,236,225
DB 130,130,50,130,100,176,25,230,130,130,50,130,100,176,25,230
DB 214,214,127,214,254,169,177,40,214,214,127,214,254,169,177,40
DB 27,27,108,27,216,119,54,195,27,27,108,27,216,119,54,195
DB 181,181,238,181,193,91,119,116,181,181,238,181,193,91,119,116
DB 175,175,134,175,17,41,67,190,175,175,134,175,17,41,67,190
DB 106,106,181,106,119,223,212,29,106,106,181,106,119,223,212,29
DB 80,80,93,80,186,13,160,234,80,80,93,80,186,13,160,234
DB 69,69,9,69,18,76,138,87,69,69,9,69,18,76,138,87
DB 243,243,235,243,203,24,251,56,243,243,235,243,203,24,251,56
DB 48,48,192,48,157,240,96,173,48,48,192,48,157,240,96,173
DB 239,239,155,239,43,116,195,196,239,239,155,239,43,116,195,196
DB 63,63,252,63,229,195,126,218,63,63,252,63,229,195,126,218
DB 85,85,73,85,146,28,170,199,85,85,73,85,146,28,170,199
DB 162,162,178,162,121,16,89,219,162,162,178,162,121,16,89,219
DB 234,234,143,234,3,101,201,233,234,234,143,234,3,101,201,233
DB 101,101,137,101,15,236,202,106,101,101,137,101,15,236,202,106
DB 186,186,210,186,185,104,105,3,186,186,210,186,185,104,105,3
DB 47,47,188,47,101,147,94,74,47,47,188,47,101,147,94,74
DB 192,192,39,192,78,231,157,142,192,192,39,192,78,231,157,142
DB 222,222,95,222,190,129,161,96,222,222,95,222,190,129,161,96
DB 28,28,112,28,224,108,56,252,28,28,112,28,224,108,56,252
DB 253,253,211,253,187,46,231,70,253,253,211,253,187,46,231,70
DB 77,77,41,77,82,100,154,31,77,77,41,77,82,100,154,31
DB 146,146,114,146,228,224,57,118,146,146,114,146,228,224,57,118
DB 117,117,201,117,143,188,234,250,117,117,201,117,143,188,234,250
DB 6,6,24,6,48,30,12,54,6,6,24,6,48,30,12,54
DB 138,138,18,138,36,152,9,174,138,138,18,138,36,152,9,174
DB 178,178,242,178,249,64,121,75,178,178,242,178,249,64,121,75
DB 230,230,191,230,99,89,209,133,230,230,191,230,99,89,209,133
DB 14,14,56,14,112,54,28,126,14,14,56,14,112,54,28,126
DB 31,31,124,31,248,99,62,231,31,31,124,31,248,99,62,231
DB 98,98,149,98,55,247,196,85,98,98,149,98,55,247,196,85
DB 212,212,119,212,238,163,181,58,212,212,119,212,238,163,181,58
DB 168,168,154,168,41,50,77,129,168,168,154,168,41,50,77,129
DB 150,150,98,150,196,244,49,82,150,150,98,150,196,244,49,82
DB 249,249,195,249,155,58,239,98,249,249,195,249,155,58,239,98
DB 197,197,51,197,102,246,151,163,197,197,51,197,102,246,151,163
DB 37,37,148,37,53,177,74,16,37,37,148,37,53,177,74,16
DB 89,89,121,89,242,32,178,171,89,89,121,89,242,32,178,171
DB 132,132,42,132,84,174,21,208,132,132,42,132,84,174,21,208
DB 114,114,213,114,183,167,228,197,114,114,213,114,183,167,228,197
DB 57,57,228,57,213,221,114,236,57,57,228,57,213,221,114,236
DB 76,76,45,76,90,97,152,22,76,76,45,76,90,97,152,22
DB 94,94,101,94,202,59,188,148,94,94,101,94,202,59,188,148
DB 120,120,253,120,231,133,240,159,120,120,253,120,231,133,240,159
DB 56,56,224,56,221,216,112,229,56,56,224,56,221,216,112,229
DB 140,140,10,140,20,134,5,152,140,140,10,140,20,134,5,152
DB 209,209,99,209,198,178,191,23,209,209,99,209,198,178,191,23
DB 165,165,174,165,65,11,87,228,165,165,174,165,65,11,87,228
DB 226,226,175,226,67,77,217,161,226,226,175,226,67,77,217,161
DB 97,97,153,97,47,248,194,78,97,97,153,97,47,248,194,78
DB 179,179,246,179,241,69,123,66,179,179,246,179,241,69,123,66
DB 33,33,132,33,21,165,66,52,33,33,132,33,21,165,66,52
DB 156,156,74,156,148,214,37,8,156,156,74,156,148,214,37,8
DB 30,30,120,30,240,102,60,238,30,30,120,30,240,102,60,238
DB 67,67,17,67,34,82,134,97,67,67,17,67,34,82,134,97
DB 199,199,59,199,118,252,147,177,199,199,59,199,118,252,147,177
DB 252,252,215,252,179,43,229,79,252,252,215,252,179,43,229,79
DB 4,4,16,4,32,20,8,36,4,4,16,4,32,20,8,36
DB 81,81,89,81,178,8,162,227,81,81,89,81,178,8,162,227
DB 153,153,94,153,188,199,47,37,153,153,94,153,188,199,47,37
DB 109,109,169,109,79,196,218,34,109,109,169,109,79,196,218,34
DB 13,13,52,13,104,57,26,101,13,13,52,13,104,57,26,101
DB 250,250,207,250,131,53,233,121,250,250,207,250,131,53,233,121
DB 223,223,91,223,182,132,163,105,223,223,91,223,182,132,163,105
DB 126,126,229,126,215,155,252,169,126,126,229,126,215,155,252,169
DB 36,36,144,36,61,180,72,25,36,36,144,36,61,180,72,25
DB 59,59,236,59,197,215,118,254,59,59,236,59,197,215,118,254
DB 171,171,150,171,49,61,75,154,171,171,150,171,49,61,75,154
DB 206,206,31,206,62,209,129,240,206,206,31,206,62,209,129,240
DB 17,17,68,17,136,85,34,153,17,17,68,17,136,85,34,153
DB 143,143,6,143,12,137,3,131,143,143,6,143,12,137,3,131
DB 78,78,37,78,74,107,156,4,78,78,37,78,74,107,156,4
DB 183,183,230,183,209,81,115,102,183,183,230,183,209,81,115,102
DB 235,235,139,235,11,96,203,224,235,235,139,235,11,96,203,224
DB 60,60,240,60,253,204,120,193,60,60,240,60,253,204,120,193
DB 129,129,62,129,124,191,31,253,129,129,62,129,124,191,31,253
DB 148,148,106,148,212,254,53,64,148,148,106,148,212,254,53,64
DB 247,247,251,247,235,12,243,28,247,247,251,247,235,12,243,28
DB 185,185,222,185,161,103,111,24,185,185,222,185,161,103,111,24
DB 19,19,76,19,152,95,38,139,19,19,76,19,152,95,38,139
DB 44,44,176,44,125,156,88,81,44,44,176,44,125,156,88,81
DB 211,211,107,211,214,184,187,5,211,211,107,211,214,184,187,5
DB 231,231,187,231,107,92,211,140,231,231,187,231,107,92,211,140
DB 110,110,165,110,87,203,220,57,110,110,165,110,87,203,220,57
DB 196,196,55,196,110,243,149,170,196,196,55,196,110,243,149,170
DB 3,3,12,3,24,15,6,27,3,3,12,3,24,15,6,27
DB 86,86,69,86,138,19,172,220,86,86,69,86,138,19,172,220
DB 68,68,13,68,26,73,136,94,68,68,13,68,26,73,136,94
DB 127,127,225,127,223,158,254,160,127,127,225,127,223,158,254,160
DB 169,169,158,169,33,55,79,136,169,169,158,169,33,55,79,136
DB 42,42,168,42,77,130,84,103,42,42,168,42,77,130,84,103
DB 187,187,214,187,177,109,107,10,187,187,214,187,177,109,107,10
DB 193,193,35,193,70,226,159,135,193,193,35,193,70,226,159,135
DB 83,83,81,83,162,2,166,241,83,83,81,83,162,2,166,241
DB 220,220,87,220,174,139,165,114,220,220,87,220,174,139,165,114
DB 11,11,44,11,88,39,22,83,11,11,44,11,88,39,22,83
DB 157,157,78,157,156,211,39,1,157,157,78,157,156,211,39,1
DB 108,108,173,108,71,193,216,43,108,108,173,108,71,193,216,43
DB 49,49,196,49,149,245,98,164,49,49,196,49,149,245,98,164
DB 116,116,205,116,135,185,232,243,116,116,205,116,135,185,232,243
DB 246,246,255,246,227,9,241,21,246,246,255,246,227,9,241,21
DB 70,70,5,70,10,67,140,76,70,70,5,70,10,67,140,76
DB 172,172,138,172,9,38,69,165,172,172,138,172,9,38,69,165
DB 137,137,30,137,60,151,15,181,137,137,30,137,60,151,15,181
DB 20,20,80,20,160,68,40,180,20,20,80,20,160,68,40,180
DB 225,225,163,225,91,66,223,186,225,225,163,225,91,66,223,186
DB 22,22,88,22,176,78,44,166,22,22,88,22,176,78,44,166
DB 58,58,232,58,205,210,116,247,58,58,232,58,205,210,116,247
DB 105,105,185,105,111,208,210,6,105,105,185,105,111,208,210,6
DB 9,9,36,9,72,45,18,65,9,9,36,9,72,45,18,65
DB 112,112,221,112,167,173,224,215,112,112,221,112,167,173,224,215
DB 182,182,226,182,217,84,113,111,182,182,226,182,217,84,113,111
DB 208,208,103,208,206,183,189,30,208,208,103,208,206,183,189,30
DB 237,237,147,237,59,126,199,214,237,237,147,237,59,126,199,214
DB 204,204,23,204,46,219,133,226,204,204,23,204,46,219,133,226
DB 66,66,21,66,42,87,132,104,66,66,21,66,42,87,132,104
DB 152,152,90,152,180,194,45,44,152,152,90,152,180,194,45,44
DB 164,164,170,164,73,14,85,237,164,164,170,164,73,14,85,237
DB 40,40,160,40,93,136,80,117,40,40,160,40,93,136,80,117
DB 92,92,109,92,218,49,184,134,92,92,109,92,218,49,184,134
DB 248,248,199,248,147,63,237,107,248,248,199,248,147,63,237,107
DB 134,134,34,134,68,164,17,194,134,134,34,134,68,164,17,194
DB 24,35,198,232,135,184,1,79
DB 54,166,210,245,121,111,145,82
DB 96,188,155,142,163,12,123,53
DB 29,224,215,194,46,75,254,87
DB 21,119,55,229,159,240,74,218
DB 88,201,41,10,177,160,107,133
DB 189,93,16,244,203,62,5,103
DB 228,39,65,139,167,125,149,216
DB 251,238,124,102,221,23,71,158
DB 202,45,191,7,173,90,131,51
.text$ ENDS
END

View File

@@ -0,0 +1,869 @@
#include "x86_arch.h"
.text
.globl whirlpool_block
.def whirlpool_block; .scl 2; .type 32; .endef
.p2align 4
whirlpool_block:
movq %rdi,8(%rsp)
movq %rsi,16(%rsp)
movq %rsp,%rax
.LSEH_begin_whirlpool_block:
movq %rcx,%rdi
movq %rdx,%rsi
movq %r8,%rdx
pushq %rbx
pushq %rbp
pushq %r12
pushq %r13
pushq %r14
pushq %r15
movq %rsp,%r11
subq $128+40,%rsp
andq $-64,%rsp
leaq 128(%rsp),%r10
movq %rdi,0(%r10)
movq %rsi,8(%r10)
movq %rdx,16(%r10)
movq %r11,32(%r10)
.Lprologue:
movq %r10,%rbx
leaq .Ltable(%rip),%rbp
xorq %rcx,%rcx
xorq %rdx,%rdx
movq 0(%rdi),%r8
movq 8(%rdi),%r9
movq 16(%rdi),%r10
movq 24(%rdi),%r11
movq 32(%rdi),%r12
movq 40(%rdi),%r13
movq 48(%rdi),%r14
movq 56(%rdi),%r15
.Louterloop:
movq %r8,0(%rsp)
movq %r9,8(%rsp)
movq %r10,16(%rsp)
movq %r11,24(%rsp)
movq %r12,32(%rsp)
movq %r13,40(%rsp)
movq %r14,48(%rsp)
movq %r15,56(%rsp)
xorq 0(%rsi),%r8
xorq 8(%rsi),%r9
xorq 16(%rsi),%r10
xorq 24(%rsi),%r11
xorq 32(%rsi),%r12
xorq 40(%rsi),%r13
xorq 48(%rsi),%r14
xorq 56(%rsi),%r15
movq %r8,64+0(%rsp)
movq %r9,64+8(%rsp)
movq %r10,64+16(%rsp)
movq %r11,64+24(%rsp)
movq %r12,64+32(%rsp)
movq %r13,64+40(%rsp)
movq %r14,64+48(%rsp)
movq %r15,64+56(%rsp)
xorq %rsi,%rsi
movq %rsi,24(%rbx)
.p2align 4
.Lround:
movq 4096(%rbp,%rsi,8),%r8
movl 0(%rsp),%eax
movl 4(%rsp),%ebx
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r8
movq 7(%rbp,%rdi,8),%r9
movb %al,%cl
movb %ah,%dl
movl 0+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
movq 6(%rbp,%rsi,8),%r10
movq 5(%rbp,%rdi,8),%r11
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
movq 4(%rbp,%rsi,8),%r12
movq 3(%rbp,%rdi,8),%r13
movb %bl,%cl
movb %bh,%dl
movl 0+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
movq 2(%rbp,%rsi,8),%r14
movq 1(%rbp,%rdi,8),%r15
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r9
xorq 7(%rbp,%rdi,8),%r10
movb %al,%cl
movb %ah,%dl
movl 8+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r11
xorq 5(%rbp,%rdi,8),%r12
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r13
xorq 3(%rbp,%rdi,8),%r14
movb %bl,%cl
movb %bh,%dl
movl 8+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r15
xorq 1(%rbp,%rdi,8),%r8
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r10
xorq 7(%rbp,%rdi,8),%r11
movb %al,%cl
movb %ah,%dl
movl 16+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r12
xorq 5(%rbp,%rdi,8),%r13
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r14
xorq 3(%rbp,%rdi,8),%r15
movb %bl,%cl
movb %bh,%dl
movl 16+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r8
xorq 1(%rbp,%rdi,8),%r9
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r11
xorq 7(%rbp,%rdi,8),%r12
movb %al,%cl
movb %ah,%dl
movl 24+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r13
xorq 5(%rbp,%rdi,8),%r14
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r15
xorq 3(%rbp,%rdi,8),%r8
movb %bl,%cl
movb %bh,%dl
movl 24+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r9
xorq 1(%rbp,%rdi,8),%r10
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r12
xorq 7(%rbp,%rdi,8),%r13
movb %al,%cl
movb %ah,%dl
movl 32+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r14
xorq 5(%rbp,%rdi,8),%r15
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r8
xorq 3(%rbp,%rdi,8),%r9
movb %bl,%cl
movb %bh,%dl
movl 32+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r10
xorq 1(%rbp,%rdi,8),%r11
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r13
xorq 7(%rbp,%rdi,8),%r14
movb %al,%cl
movb %ah,%dl
movl 40+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r15
xorq 5(%rbp,%rdi,8),%r8
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r9
xorq 3(%rbp,%rdi,8),%r10
movb %bl,%cl
movb %bh,%dl
movl 40+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r11
xorq 1(%rbp,%rdi,8),%r12
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r14
xorq 7(%rbp,%rdi,8),%r15
movb %al,%cl
movb %ah,%dl
movl 48+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r8
xorq 5(%rbp,%rdi,8),%r9
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r10
xorq 3(%rbp,%rdi,8),%r11
movb %bl,%cl
movb %bh,%dl
movl 48+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r12
xorq 1(%rbp,%rdi,8),%r13
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r15
xorq 7(%rbp,%rdi,8),%r8
movb %al,%cl
movb %ah,%dl
movl 56+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r9
xorq 5(%rbp,%rdi,8),%r10
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r11
xorq 3(%rbp,%rdi,8),%r12
movb %bl,%cl
movb %bh,%dl
movl 56+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r13
xorq 1(%rbp,%rdi,8),%r14
movq %r8,0(%rsp)
movq %r9,8(%rsp)
movq %r10,16(%rsp)
movq %r11,24(%rsp)
movq %r12,32(%rsp)
movq %r13,40(%rsp)
movq %r14,48(%rsp)
movq %r15,56(%rsp)
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r8
xorq 7(%rbp,%rdi,8),%r9
movb %al,%cl
movb %ah,%dl
movl 64+0+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r10
xorq 5(%rbp,%rdi,8),%r11
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r12
xorq 3(%rbp,%rdi,8),%r13
movb %bl,%cl
movb %bh,%dl
movl 64+0+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r14
xorq 1(%rbp,%rdi,8),%r15
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r9
xorq 7(%rbp,%rdi,8),%r10
movb %al,%cl
movb %ah,%dl
movl 64+8+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r11
xorq 5(%rbp,%rdi,8),%r12
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r13
xorq 3(%rbp,%rdi,8),%r14
movb %bl,%cl
movb %bh,%dl
movl 64+8+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r15
xorq 1(%rbp,%rdi,8),%r8
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r10
xorq 7(%rbp,%rdi,8),%r11
movb %al,%cl
movb %ah,%dl
movl 64+16+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r12
xorq 5(%rbp,%rdi,8),%r13
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r14
xorq 3(%rbp,%rdi,8),%r15
movb %bl,%cl
movb %bh,%dl
movl 64+16+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r8
xorq 1(%rbp,%rdi,8),%r9
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r11
xorq 7(%rbp,%rdi,8),%r12
movb %al,%cl
movb %ah,%dl
movl 64+24+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r13
xorq 5(%rbp,%rdi,8),%r14
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r15
xorq 3(%rbp,%rdi,8),%r8
movb %bl,%cl
movb %bh,%dl
movl 64+24+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r9
xorq 1(%rbp,%rdi,8),%r10
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r12
xorq 7(%rbp,%rdi,8),%r13
movb %al,%cl
movb %ah,%dl
movl 64+32+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r14
xorq 5(%rbp,%rdi,8),%r15
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r8
xorq 3(%rbp,%rdi,8),%r9
movb %bl,%cl
movb %bh,%dl
movl 64+32+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r10
xorq 1(%rbp,%rdi,8),%r11
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r13
xorq 7(%rbp,%rdi,8),%r14
movb %al,%cl
movb %ah,%dl
movl 64+40+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r15
xorq 5(%rbp,%rdi,8),%r8
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r9
xorq 3(%rbp,%rdi,8),%r10
movb %bl,%cl
movb %bh,%dl
movl 64+40+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r11
xorq 1(%rbp,%rdi,8),%r12
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r14
xorq 7(%rbp,%rdi,8),%r15
movb %al,%cl
movb %ah,%dl
movl 64+48+8(%rsp),%eax
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r8
xorq 5(%rbp,%rdi,8),%r9
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r10
xorq 3(%rbp,%rdi,8),%r11
movb %bl,%cl
movb %bh,%dl
movl 64+48+8+4(%rsp),%ebx
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r12
xorq 1(%rbp,%rdi,8),%r13
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%eax
xorq 0(%rbp,%rsi,8),%r15
xorq 7(%rbp,%rdi,8),%r8
movb %al,%cl
movb %ah,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 6(%rbp,%rsi,8),%r9
xorq 5(%rbp,%rdi,8),%r10
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
shrl $16,%ebx
xorq 4(%rbp,%rsi,8),%r11
xorq 3(%rbp,%rdi,8),%r12
movb %bl,%cl
movb %bh,%dl
leaq (%rcx,%rcx,1),%rsi
leaq (%rdx,%rdx,1),%rdi
xorq 2(%rbp,%rsi,8),%r13
xorq 1(%rbp,%rdi,8),%r14
leaq 128(%rsp),%rbx
movq 24(%rbx),%rsi
addq $1,%rsi
cmpq $10,%rsi
je .Lroundsdone
movq %rsi,24(%rbx)
movq %r8,64+0(%rsp)
movq %r9,64+8(%rsp)
movq %r10,64+16(%rsp)
movq %r11,64+24(%rsp)
movq %r12,64+32(%rsp)
movq %r13,64+40(%rsp)
movq %r14,64+48(%rsp)
movq %r15,64+56(%rsp)
jmp .Lround
.p2align 4
.Lroundsdone:
movq 0(%rbx),%rdi
movq 8(%rbx),%rsi
movq 16(%rbx),%rax
xorq 0(%rsi),%r8
xorq 8(%rsi),%r9
xorq 16(%rsi),%r10
xorq 24(%rsi),%r11
xorq 32(%rsi),%r12
xorq 40(%rsi),%r13
xorq 48(%rsi),%r14
xorq 56(%rsi),%r15
xorq 0(%rdi),%r8
xorq 8(%rdi),%r9
xorq 16(%rdi),%r10
xorq 24(%rdi),%r11
xorq 32(%rdi),%r12
xorq 40(%rdi),%r13
xorq 48(%rdi),%r14
xorq 56(%rdi),%r15
movq %r8,0(%rdi)
movq %r9,8(%rdi)
movq %r10,16(%rdi)
movq %r11,24(%rdi)
movq %r12,32(%rdi)
movq %r13,40(%rdi)
movq %r14,48(%rdi)
movq %r15,56(%rdi)
leaq 64(%rsi),%rsi
subq $1,%rax
jz .Lalldone
movq %rsi,8(%rbx)
movq %rax,16(%rbx)
jmp .Louterloop
.Lalldone:
movq 32(%rbx),%rsi
movq (%rsi),%r15
movq 8(%rsi),%r14
movq 16(%rsi),%r13
movq 24(%rsi),%r12
movq 32(%rsi),%rbp
movq 40(%rsi),%rbx
leaq 48(%rsi),%rsp
.Lepilogue:
movq 8(%rsp),%rdi
movq 16(%rsp),%rsi
retq
.LSEH_end_whirlpool_block:
.p2align 6
.Ltable:
.byte 24,24,96,24,192,120,48,216,24,24,96,24,192,120,48,216
.byte 35,35,140,35,5,175,70,38,35,35,140,35,5,175,70,38
.byte 198,198,63,198,126,249,145,184,198,198,63,198,126,249,145,184
.byte 232,232,135,232,19,111,205,251,232,232,135,232,19,111,205,251
.byte 135,135,38,135,76,161,19,203,135,135,38,135,76,161,19,203
.byte 184,184,218,184,169,98,109,17,184,184,218,184,169,98,109,17
.byte 1,1,4,1,8,5,2,9,1,1,4,1,8,5,2,9
.byte 79,79,33,79,66,110,158,13,79,79,33,79,66,110,158,13
.byte 54,54,216,54,173,238,108,155,54,54,216,54,173,238,108,155
.byte 166,166,162,166,89,4,81,255,166,166,162,166,89,4,81,255
.byte 210,210,111,210,222,189,185,12,210,210,111,210,222,189,185,12
.byte 245,245,243,245,251,6,247,14,245,245,243,245,251,6,247,14
.byte 121,121,249,121,239,128,242,150,121,121,249,121,239,128,242,150
.byte 111,111,161,111,95,206,222,48,111,111,161,111,95,206,222,48
.byte 145,145,126,145,252,239,63,109,145,145,126,145,252,239,63,109
.byte 82,82,85,82,170,7,164,248,82,82,85,82,170,7,164,248
.byte 96,96,157,96,39,253,192,71,96,96,157,96,39,253,192,71
.byte 188,188,202,188,137,118,101,53,188,188,202,188,137,118,101,53
.byte 155,155,86,155,172,205,43,55,155,155,86,155,172,205,43,55
.byte 142,142,2,142,4,140,1,138,142,142,2,142,4,140,1,138
.byte 163,163,182,163,113,21,91,210,163,163,182,163,113,21,91,210
.byte 12,12,48,12,96,60,24,108,12,12,48,12,96,60,24,108
.byte 123,123,241,123,255,138,246,132,123,123,241,123,255,138,246,132
.byte 53,53,212,53,181,225,106,128,53,53,212,53,181,225,106,128
.byte 29,29,116,29,232,105,58,245,29,29,116,29,232,105,58,245
.byte 224,224,167,224,83,71,221,179,224,224,167,224,83,71,221,179
.byte 215,215,123,215,246,172,179,33,215,215,123,215,246,172,179,33
.byte 194,194,47,194,94,237,153,156,194,194,47,194,94,237,153,156
.byte 46,46,184,46,109,150,92,67,46,46,184,46,109,150,92,67
.byte 75,75,49,75,98,122,150,41,75,75,49,75,98,122,150,41
.byte 254,254,223,254,163,33,225,93,254,254,223,254,163,33,225,93
.byte 87,87,65,87,130,22,174,213,87,87,65,87,130,22,174,213
.byte 21,21,84,21,168,65,42,189,21,21,84,21,168,65,42,189
.byte 119,119,193,119,159,182,238,232,119,119,193,119,159,182,238,232
.byte 55,55,220,55,165,235,110,146,55,55,220,55,165,235,110,146
.byte 229,229,179,229,123,86,215,158,229,229,179,229,123,86,215,158
.byte 159,159,70,159,140,217,35,19,159,159,70,159,140,217,35,19
.byte 240,240,231,240,211,23,253,35,240,240,231,240,211,23,253,35
.byte 74,74,53,74,106,127,148,32,74,74,53,74,106,127,148,32
.byte 218,218,79,218,158,149,169,68,218,218,79,218,158,149,169,68
.byte 88,88,125,88,250,37,176,162,88,88,125,88,250,37,176,162
.byte 201,201,3,201,6,202,143,207,201,201,3,201,6,202,143,207
.byte 41,41,164,41,85,141,82,124,41,41,164,41,85,141,82,124
.byte 10,10,40,10,80,34,20,90,10,10,40,10,80,34,20,90
.byte 177,177,254,177,225,79,127,80,177,177,254,177,225,79,127,80
.byte 160,160,186,160,105,26,93,201,160,160,186,160,105,26,93,201
.byte 107,107,177,107,127,218,214,20,107,107,177,107,127,218,214,20
.byte 133,133,46,133,92,171,23,217,133,133,46,133,92,171,23,217
.byte 189,189,206,189,129,115,103,60,189,189,206,189,129,115,103,60
.byte 93,93,105,93,210,52,186,143,93,93,105,93,210,52,186,143
.byte 16,16,64,16,128,80,32,144,16,16,64,16,128,80,32,144
.byte 244,244,247,244,243,3,245,7,244,244,247,244,243,3,245,7
.byte 203,203,11,203,22,192,139,221,203,203,11,203,22,192,139,221
.byte 62,62,248,62,237,198,124,211,62,62,248,62,237,198,124,211
.byte 5,5,20,5,40,17,10,45,5,5,20,5,40,17,10,45
.byte 103,103,129,103,31,230,206,120,103,103,129,103,31,230,206,120
.byte 228,228,183,228,115,83,213,151,228,228,183,228,115,83,213,151
.byte 39,39,156,39,37,187,78,2,39,39,156,39,37,187,78,2
.byte 65,65,25,65,50,88,130,115,65,65,25,65,50,88,130,115
.byte 139,139,22,139,44,157,11,167,139,139,22,139,44,157,11,167
.byte 167,167,166,167,81,1,83,246,167,167,166,167,81,1,83,246
.byte 125,125,233,125,207,148,250,178,125,125,233,125,207,148,250,178
.byte 149,149,110,149,220,251,55,73,149,149,110,149,220,251,55,73
.byte 216,216,71,216,142,159,173,86,216,216,71,216,142,159,173,86
.byte 251,251,203,251,139,48,235,112,251,251,203,251,139,48,235,112
.byte 238,238,159,238,35,113,193,205,238,238,159,238,35,113,193,205
.byte 124,124,237,124,199,145,248,187,124,124,237,124,199,145,248,187
.byte 102,102,133,102,23,227,204,113,102,102,133,102,23,227,204,113
.byte 221,221,83,221,166,142,167,123,221,221,83,221,166,142,167,123
.byte 23,23,92,23,184,75,46,175,23,23,92,23,184,75,46,175
.byte 71,71,1,71,2,70,142,69,71,71,1,71,2,70,142,69
.byte 158,158,66,158,132,220,33,26,158,158,66,158,132,220,33,26
.byte 202,202,15,202,30,197,137,212,202,202,15,202,30,197,137,212
.byte 45,45,180,45,117,153,90,88,45,45,180,45,117,153,90,88
.byte 191,191,198,191,145,121,99,46,191,191,198,191,145,121,99,46
.byte 7,7,28,7,56,27,14,63,7,7,28,7,56,27,14,63
.byte 173,173,142,173,1,35,71,172,173,173,142,173,1,35,71,172
.byte 90,90,117,90,234,47,180,176,90,90,117,90,234,47,180,176
.byte 131,131,54,131,108,181,27,239,131,131,54,131,108,181,27,239
.byte 51,51,204,51,133,255,102,182,51,51,204,51,133,255,102,182
.byte 99,99,145,99,63,242,198,92,99,99,145,99,63,242,198,92
.byte 2,2,8,2,16,10,4,18,2,2,8,2,16,10,4,18
.byte 170,170,146,170,57,56,73,147,170,170,146,170,57,56,73,147
.byte 113,113,217,113,175,168,226,222,113,113,217,113,175,168,226,222
.byte 200,200,7,200,14,207,141,198,200,200,7,200,14,207,141,198
.byte 25,25,100,25,200,125,50,209,25,25,100,25,200,125,50,209
.byte 73,73,57,73,114,112,146,59,73,73,57,73,114,112,146,59
.byte 217,217,67,217,134,154,175,95,217,217,67,217,134,154,175,95
.byte 242,242,239,242,195,29,249,49,242,242,239,242,195,29,249,49
.byte 227,227,171,227,75,72,219,168,227,227,171,227,75,72,219,168
.byte 91,91,113,91,226,42,182,185,91,91,113,91,226,42,182,185
.byte 136,136,26,136,52,146,13,188,136,136,26,136,52,146,13,188
.byte 154,154,82,154,164,200,41,62,154,154,82,154,164,200,41,62
.byte 38,38,152,38,45,190,76,11,38,38,152,38,45,190,76,11
.byte 50,50,200,50,141,250,100,191,50,50,200,50,141,250,100,191
.byte 176,176,250,176,233,74,125,89,176,176,250,176,233,74,125,89
.byte 233,233,131,233,27,106,207,242,233,233,131,233,27,106,207,242
.byte 15,15,60,15,120,51,30,119,15,15,60,15,120,51,30,119
.byte 213,213,115,213,230,166,183,51,213,213,115,213,230,166,183,51
.byte 128,128,58,128,116,186,29,244,128,128,58,128,116,186,29,244
.byte 190,190,194,190,153,124,97,39,190,190,194,190,153,124,97,39
.byte 205,205,19,205,38,222,135,235,205,205,19,205,38,222,135,235
.byte 52,52,208,52,189,228,104,137,52,52,208,52,189,228,104,137
.byte 72,72,61,72,122,117,144,50,72,72,61,72,122,117,144,50
.byte 255,255,219,255,171,36,227,84,255,255,219,255,171,36,227,84
.byte 122,122,245,122,247,143,244,141,122,122,245,122,247,143,244,141
.byte 144,144,122,144,244,234,61,100,144,144,122,144,244,234,61,100
.byte 95,95,97,95,194,62,190,157,95,95,97,95,194,62,190,157
.byte 32,32,128,32,29,160,64,61,32,32,128,32,29,160,64,61
.byte 104,104,189,104,103,213,208,15,104,104,189,104,103,213,208,15
.byte 26,26,104,26,208,114,52,202,26,26,104,26,208,114,52,202
.byte 174,174,130,174,25,44,65,183,174,174,130,174,25,44,65,183
.byte 180,180,234,180,201,94,117,125,180,180,234,180,201,94,117,125
.byte 84,84,77,84,154,25,168,206,84,84,77,84,154,25,168,206
.byte 147,147,118,147,236,229,59,127,147,147,118,147,236,229,59,127
.byte 34,34,136,34,13,170,68,47,34,34,136,34,13,170,68,47
.byte 100,100,141,100,7,233,200,99,100,100,141,100,7,233,200,99
.byte 241,241,227,241,219,18,255,42,241,241,227,241,219,18,255,42
.byte 115,115,209,115,191,162,230,204,115,115,209,115,191,162,230,204
.byte 18,18,72,18,144,90,36,130,18,18,72,18,144,90,36,130
.byte 64,64,29,64,58,93,128,122,64,64,29,64,58,93,128,122
.byte 8,8,32,8,64,40,16,72,8,8,32,8,64,40,16,72
.byte 195,195,43,195,86,232,155,149,195,195,43,195,86,232,155,149
.byte 236,236,151,236,51,123,197,223,236,236,151,236,51,123,197,223
.byte 219,219,75,219,150,144,171,77,219,219,75,219,150,144,171,77
.byte 161,161,190,161,97,31,95,192,161,161,190,161,97,31,95,192
.byte 141,141,14,141,28,131,7,145,141,141,14,141,28,131,7,145
.byte 61,61,244,61,245,201,122,200,61,61,244,61,245,201,122,200
.byte 151,151,102,151,204,241,51,91,151,151,102,151,204,241,51,91
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.byte 207,207,27,207,54,212,131,249,207,207,27,207,54,212,131,249
.byte 43,43,172,43,69,135,86,110,43,43,172,43,69,135,86,110
.byte 118,118,197,118,151,179,236,225,118,118,197,118,151,179,236,225
.byte 130,130,50,130,100,176,25,230,130,130,50,130,100,176,25,230
.byte 214,214,127,214,254,169,177,40,214,214,127,214,254,169,177,40
.byte 27,27,108,27,216,119,54,195,27,27,108,27,216,119,54,195
.byte 181,181,238,181,193,91,119,116,181,181,238,181,193,91,119,116
.byte 175,175,134,175,17,41,67,190,175,175,134,175,17,41,67,190
.byte 106,106,181,106,119,223,212,29,106,106,181,106,119,223,212,29
.byte 80,80,93,80,186,13,160,234,80,80,93,80,186,13,160,234
.byte 69,69,9,69,18,76,138,87,69,69,9,69,18,76,138,87
.byte 243,243,235,243,203,24,251,56,243,243,235,243,203,24,251,56
.byte 48,48,192,48,157,240,96,173,48,48,192,48,157,240,96,173
.byte 239,239,155,239,43,116,195,196,239,239,155,239,43,116,195,196
.byte 63,63,252,63,229,195,126,218,63,63,252,63,229,195,126,218
.byte 85,85,73,85,146,28,170,199,85,85,73,85,146,28,170,199
.byte 162,162,178,162,121,16,89,219,162,162,178,162,121,16,89,219
.byte 234,234,143,234,3,101,201,233,234,234,143,234,3,101,201,233
.byte 101,101,137,101,15,236,202,106,101,101,137,101,15,236,202,106
.byte 186,186,210,186,185,104,105,3,186,186,210,186,185,104,105,3
.byte 47,47,188,47,101,147,94,74,47,47,188,47,101,147,94,74
.byte 192,192,39,192,78,231,157,142,192,192,39,192,78,231,157,142
.byte 222,222,95,222,190,129,161,96,222,222,95,222,190,129,161,96
.byte 28,28,112,28,224,108,56,252,28,28,112,28,224,108,56,252
.byte 253,253,211,253,187,46,231,70,253,253,211,253,187,46,231,70
.byte 77,77,41,77,82,100,154,31,77,77,41,77,82,100,154,31
.byte 146,146,114,146,228,224,57,118,146,146,114,146,228,224,57,118
.byte 117,117,201,117,143,188,234,250,117,117,201,117,143,188,234,250
.byte 6,6,24,6,48,30,12,54,6,6,24,6,48,30,12,54
.byte 138,138,18,138,36,152,9,174,138,138,18,138,36,152,9,174
.byte 178,178,242,178,249,64,121,75,178,178,242,178,249,64,121,75
.byte 230,230,191,230,99,89,209,133,230,230,191,230,99,89,209,133
.byte 14,14,56,14,112,54,28,126,14,14,56,14,112,54,28,126
.byte 31,31,124,31,248,99,62,231,31,31,124,31,248,99,62,231
.byte 98,98,149,98,55,247,196,85,98,98,149,98,55,247,196,85
.byte 212,212,119,212,238,163,181,58,212,212,119,212,238,163,181,58
.byte 168,168,154,168,41,50,77,129,168,168,154,168,41,50,77,129
.byte 150,150,98,150,196,244,49,82,150,150,98,150,196,244,49,82
.byte 249,249,195,249,155,58,239,98,249,249,195,249,155,58,239,98
.byte 197,197,51,197,102,246,151,163,197,197,51,197,102,246,151,163
.byte 37,37,148,37,53,177,74,16,37,37,148,37,53,177,74,16
.byte 89,89,121,89,242,32,178,171,89,89,121,89,242,32,178,171
.byte 132,132,42,132,84,174,21,208,132,132,42,132,84,174,21,208
.byte 114,114,213,114,183,167,228,197,114,114,213,114,183,167,228,197
.byte 57,57,228,57,213,221,114,236,57,57,228,57,213,221,114,236
.byte 76,76,45,76,90,97,152,22,76,76,45,76,90,97,152,22
.byte 94,94,101,94,202,59,188,148,94,94,101,94,202,59,188,148
.byte 120,120,253,120,231,133,240,159,120,120,253,120,231,133,240,159
.byte 56,56,224,56,221,216,112,229,56,56,224,56,221,216,112,229
.byte 140,140,10,140,20,134,5,152,140,140,10,140,20,134,5,152
.byte 209,209,99,209,198,178,191,23,209,209,99,209,198,178,191,23
.byte 165,165,174,165,65,11,87,228,165,165,174,165,65,11,87,228
.byte 226,226,175,226,67,77,217,161,226,226,175,226,67,77,217,161
.byte 97,97,153,97,47,248,194,78,97,97,153,97,47,248,194,78
.byte 179,179,246,179,241,69,123,66,179,179,246,179,241,69,123,66
.byte 33,33,132,33,21,165,66,52,33,33,132,33,21,165,66,52
.byte 156,156,74,156,148,214,37,8,156,156,74,156,148,214,37,8
.byte 30,30,120,30,240,102,60,238,30,30,120,30,240,102,60,238
.byte 67,67,17,67,34,82,134,97,67,67,17,67,34,82,134,97
.byte 199,199,59,199,118,252,147,177,199,199,59,199,118,252,147,177
.byte 252,252,215,252,179,43,229,79,252,252,215,252,179,43,229,79
.byte 4,4,16,4,32,20,8,36,4,4,16,4,32,20,8,36
.byte 81,81,89,81,178,8,162,227,81,81,89,81,178,8,162,227
.byte 153,153,94,153,188,199,47,37,153,153,94,153,188,199,47,37
.byte 109,109,169,109,79,196,218,34,109,109,169,109,79,196,218,34
.byte 13,13,52,13,104,57,26,101,13,13,52,13,104,57,26,101
.byte 250,250,207,250,131,53,233,121,250,250,207,250,131,53,233,121
.byte 223,223,91,223,182,132,163,105,223,223,91,223,182,132,163,105
.byte 126,126,229,126,215,155,252,169,126,126,229,126,215,155,252,169
.byte 36,36,144,36,61,180,72,25,36,36,144,36,61,180,72,25
.byte 59,59,236,59,197,215,118,254,59,59,236,59,197,215,118,254
.byte 171,171,150,171,49,61,75,154,171,171,150,171,49,61,75,154
.byte 206,206,31,206,62,209,129,240,206,206,31,206,62,209,129,240
.byte 17,17,68,17,136,85,34,153,17,17,68,17,136,85,34,153
.byte 143,143,6,143,12,137,3,131,143,143,6,143,12,137,3,131
.byte 78,78,37,78,74,107,156,4,78,78,37,78,74,107,156,4
.byte 183,183,230,183,209,81,115,102,183,183,230,183,209,81,115,102
.byte 235,235,139,235,11,96,203,224,235,235,139,235,11,96,203,224
.byte 60,60,240,60,253,204,120,193,60,60,240,60,253,204,120,193
.byte 129,129,62,129,124,191,31,253,129,129,62,129,124,191,31,253
.byte 148,148,106,148,212,254,53,64,148,148,106,148,212,254,53,64
.byte 247,247,251,247,235,12,243,28,247,247,251,247,235,12,243,28
.byte 185,185,222,185,161,103,111,24,185,185,222,185,161,103,111,24
.byte 19,19,76,19,152,95,38,139,19,19,76,19,152,95,38,139
.byte 44,44,176,44,125,156,88,81,44,44,176,44,125,156,88,81
.byte 211,211,107,211,214,184,187,5,211,211,107,211,214,184,187,5
.byte 231,231,187,231,107,92,211,140,231,231,187,231,107,92,211,140
.byte 110,110,165,110,87,203,220,57,110,110,165,110,87,203,220,57
.byte 196,196,55,196,110,243,149,170,196,196,55,196,110,243,149,170
.byte 3,3,12,3,24,15,6,27,3,3,12,3,24,15,6,27
.byte 86,86,69,86,138,19,172,220,86,86,69,86,138,19,172,220
.byte 68,68,13,68,26,73,136,94,68,68,13,68,26,73,136,94
.byte 127,127,225,127,223,158,254,160,127,127,225,127,223,158,254,160
.byte 169,169,158,169,33,55,79,136,169,169,158,169,33,55,79,136
.byte 42,42,168,42,77,130,84,103,42,42,168,42,77,130,84,103
.byte 187,187,214,187,177,109,107,10,187,187,214,187,177,109,107,10
.byte 193,193,35,193,70,226,159,135,193,193,35,193,70,226,159,135
.byte 83,83,81,83,162,2,166,241,83,83,81,83,162,2,166,241
.byte 220,220,87,220,174,139,165,114,220,220,87,220,174,139,165,114
.byte 11,11,44,11,88,39,22,83,11,11,44,11,88,39,22,83
.byte 157,157,78,157,156,211,39,1,157,157,78,157,156,211,39,1
.byte 108,108,173,108,71,193,216,43,108,108,173,108,71,193,216,43
.byte 49,49,196,49,149,245,98,164,49,49,196,49,149,245,98,164
.byte 116,116,205,116,135,185,232,243,116,116,205,116,135,185,232,243
.byte 246,246,255,246,227,9,241,21,246,246,255,246,227,9,241,21
.byte 70,70,5,70,10,67,140,76,70,70,5,70,10,67,140,76
.byte 172,172,138,172,9,38,69,165,172,172,138,172,9,38,69,165
.byte 137,137,30,137,60,151,15,181,137,137,30,137,60,151,15,181
.byte 20,20,80,20,160,68,40,180,20,20,80,20,160,68,40,180
.byte 225,225,163,225,91,66,223,186,225,225,163,225,91,66,223,186
.byte 22,22,88,22,176,78,44,166,22,22,88,22,176,78,44,166
.byte 58,58,232,58,205,210,116,247,58,58,232,58,205,210,116,247
.byte 105,105,185,105,111,208,210,6,105,105,185,105,111,208,210,6
.byte 9,9,36,9,72,45,18,65,9,9,36,9,72,45,18,65
.byte 112,112,221,112,167,173,224,215,112,112,221,112,167,173,224,215
.byte 182,182,226,182,217,84,113,111,182,182,226,182,217,84,113,111
.byte 208,208,103,208,206,183,189,30,208,208,103,208,206,183,189,30
.byte 237,237,147,237,59,126,199,214,237,237,147,237,59,126,199,214
.byte 204,204,23,204,46,219,133,226,204,204,23,204,46,219,133,226
.byte 66,66,21,66,42,87,132,104,66,66,21,66,42,87,132,104
.byte 152,152,90,152,180,194,45,44,152,152,90,152,180,194,45,44
.byte 164,164,170,164,73,14,85,237,164,164,170,164,73,14,85,237
.byte 40,40,160,40,93,136,80,117,40,40,160,40,93,136,80,117
.byte 92,92,109,92,218,49,184,134,92,92,109,92,218,49,184,134
.byte 248,248,199,248,147,63,237,107,248,248,199,248,147,63,237,107
.byte 134,134,34,134,68,164,17,194,134,134,34,134,68,164,17,194
.byte 24,35,198,232,135,184,1,79
.byte 54,166,210,245,121,111,145,82
.byte 96,188,155,142,163,12,123,53
.byte 29,224,215,194,46,75,254,87
.byte 21,119,55,229,159,240,74,218
.byte 88,201,41,10,177,160,107,133
.byte 189,93,16,244,203,62,5,103
.byte 228,39,65,139,167,125,149,216
.byte 251,238,124,102,221,23,71,158
.byte 202,45,191,7,173,90,131,51

629
crypto/whrlpool/wp_block.c Normal file
View File

@@ -0,0 +1,629 @@
/* $OpenBSD: wp_block.c,v 1.15 2022/11/26 16:08:54 tb Exp $ */
/**
* The Whirlpool hashing function.
*
* <P>
* <b>References</b>
*
* <P>
* The Whirlpool algorithm was developed by
* <a href="mailto:pbarreto@scopus.com.br">Paulo S. L. M. Barreto</a> and
* <a href="mailto:vincent.rijmen@cryptomathic.com">Vincent Rijmen</a>.
*
* See
* P.S.L.M. Barreto, V. Rijmen,
* ``The Whirlpool hashing function,''
* NESSIE submission, 2000 (tweaked version, 2001),
* <https://www.cosic.esat.kuleuven.ac.be/nessie/workshop/submissions/whirlpool.zip>
*
* Based on "@version 3.0 (2003.03.12)" by Paulo S.L.M. Barreto and
* Vincent Rijmen. Lookup "reference implementations" on
* <http://planeta.terra.com.br/informatica/paulobarreto/>
*
* =============================================================================
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''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 AUTHORS 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 <endian.h>
#include <string.h>
#include <openssl/crypto.h>
#include "wp_local.h"
typedef unsigned char u8;
#if defined(_LP64)
typedef unsigned long u64;
#else
typedef unsigned long long u64;
#endif
#define ROUNDS 10
#undef SMALL_REGISTER_BANK
#if defined(__i386) || defined(__i386__) || defined(_M_IX86)
# define SMALL_REGISTER_BANK
# if defined(WHIRLPOOL_ASM)
# ifndef OPENSSL_SMALL_FOOTPRINT
# define OPENSSL_SMALL_FOOTPRINT /* it appears that for elder non-MMX
CPUs this is actually faster! */
# endif
#include "x86_arch.h"
# define GO_FOR_MMX(ctx,inp,num) \
do { \
void whirlpool_block_mmx(void *,const void *,size_t); \
if ((OPENSSL_cpu_caps() & CPUCAP_MASK_MMX) == 0) \
break; \
whirlpool_block_mmx(ctx->H.c,inp,num); \
return; \
} while (0)
# endif
#elif defined(__arm__)
# define SMALL_REGISTER_BANK
#endif
#undef ROTATE
#if defined(__GNUC__) && __GNUC__>=2
# if defined(__x86_64) || defined(__x86_64__)
# define ROTATE(a,n) ({ u64 ret; asm ("rolq %1,%0" \
: "=r"(ret) : "J"(n),"0"(a) : "cc"); ret; })
# endif
#endif
#if defined(OPENSSL_SMALL_FOOTPRINT)
# if !defined(ROTATE)
# if BYTE_ORDER == LITTLE_ENDIAN /* little-endians have to rotate left */
# define ROTATE(i,n) ((i)<<(n) ^ (i)>>(64-n))
# else /* big-endians have to rotate right */
# define ROTATE(i,n) ((i)>>(n) ^ (i)<<(64-n))
# endif
# endif
# if defined(ROTATE) && !defined(__STRICT_ALIGNMENT)
# define __STRICT_ALIGNMENT /* ensure smallest table size */
# endif
#endif
/*
* Table size depends on __STRICT_ALIGNMENT and whether or not endian-
* specific ROTATE macro is defined. If __STRICT_ALIGNMENT is not
* defined, which is normally the case on x86[_64] CPUs, the table is
* 4KB large unconditionally. Otherwise if ROTATE is defined, the
* table is 2KB large, and otherwise - 16KB. 2KB table requires a
* whole bunch of additional rotations, but I'm willing to "trade,"
* because 16KB table certainly trashes L1 cache. I wish all CPUs
* could handle unaligned load as 4KB table doesn't trash the cache,
* nor does it require additional rotations.
*/
/*
* Note that every Cn macro expands as two loads: one byte load and
* one quadword load. One can argue that that many single-byte loads
* is too excessive, as one could load a quadword and "milk" it for
* eight 8-bit values instead. Well, yes, but in order to do so *and*
* avoid excessive loads you have to accommodate a handful of 64-bit
* values in the register bank and issue a bunch of shifts and mask.
* It's a tradeoff: loads vs. shift and mask in big register bank[!].
* On most CPUs eight single-byte loads are faster and I let other
* ones to depend on smart compiler to fold byte loads if beneficial.
* Hand-coded assembler would be another alternative:-)
*/
#ifdef __STRICT_ALIGNMENT
# if defined(ROTATE)
# define N 1
# define LL(c0,c1,c2,c3,c4,c5,c6,c7) c0,c1,c2,c3,c4,c5,c6,c7
# define C0(K,i) (Cx.q[K.c[(i)*8+0]])
# define C1(K,i) ROTATE(Cx.q[K.c[(i)*8+1]],8)
# define C2(K,i) ROTATE(Cx.q[K.c[(i)*8+2]],16)
# define C3(K,i) ROTATE(Cx.q[K.c[(i)*8+3]],24)
# define C4(K,i) ROTATE(Cx.q[K.c[(i)*8+4]],32)
# define C5(K,i) ROTATE(Cx.q[K.c[(i)*8+5]],40)
# define C6(K,i) ROTATE(Cx.q[K.c[(i)*8+6]],48)
# define C7(K,i) ROTATE(Cx.q[K.c[(i)*8+7]],56)
# else
# define N 8
# define LL(c0,c1,c2,c3,c4,c5,c6,c7) c0,c1,c2,c3,c4,c5,c6,c7, \
c7,c0,c1,c2,c3,c4,c5,c6, \
c6,c7,c0,c1,c2,c3,c4,c5, \
c5,c6,c7,c0,c1,c2,c3,c4, \
c4,c5,c6,c7,c0,c1,c2,c3, \
c3,c4,c5,c6,c7,c0,c1,c2, \
c2,c3,c4,c5,c6,c7,c0,c1, \
c1,c2,c3,c4,c5,c6,c7,c0
# define C0(K,i) (Cx.q[0+8*K.c[(i)*8+0]])
# define C1(K,i) (Cx.q[1+8*K.c[(i)*8+1]])
# define C2(K,i) (Cx.q[2+8*K.c[(i)*8+2]])
# define C3(K,i) (Cx.q[3+8*K.c[(i)*8+3]])
# define C4(K,i) (Cx.q[4+8*K.c[(i)*8+4]])
# define C5(K,i) (Cx.q[5+8*K.c[(i)*8+5]])
# define C6(K,i) (Cx.q[6+8*K.c[(i)*8+6]])
# define C7(K,i) (Cx.q[7+8*K.c[(i)*8+7]])
# endif
#else
# define N 2
# define LL(c0,c1,c2,c3,c4,c5,c6,c7) c0,c1,c2,c3,c4,c5,c6,c7, \
c0,c1,c2,c3,c4,c5,c6,c7
# define C0(K,i) (((u64*)(Cx.c+0))[2*K.c[(i)*8+0]])
# define C1(K,i) (((u64*)(Cx.c+7))[2*K.c[(i)*8+1]])
# define C2(K,i) (((u64*)(Cx.c+6))[2*K.c[(i)*8+2]])
# define C3(K,i) (((u64*)(Cx.c+5))[2*K.c[(i)*8+3]])
# define C4(K,i) (((u64*)(Cx.c+4))[2*K.c[(i)*8+4]])
# define C5(K,i) (((u64*)(Cx.c+3))[2*K.c[(i)*8+5]])
# define C6(K,i) (((u64*)(Cx.c+2))[2*K.c[(i)*8+6]])
# define C7(K,i) (((u64*)(Cx.c+1))[2*K.c[(i)*8+7]])
#endif
static const
union {
u8 c[(256*N+ROUNDS)*sizeof(u64)];
u64 q[(256*N+ROUNDS)];
} Cx = { {
/* Note endian-neutral representation:-) */
LL(0x18,0x18,0x60,0x18,0xc0,0x78,0x30,0xd8),
LL(0x23,0x23,0x8c,0x23,0x05,0xaf,0x46,0x26),
LL(0xc6,0xc6,0x3f,0xc6,0x7e,0xf9,0x91,0xb8),
LL(0xe8,0xe8,0x87,0xe8,0x13,0x6f,0xcd,0xfb),
LL(0x87,0x87,0x26,0x87,0x4c,0xa1,0x13,0xcb),
LL(0xb8,0xb8,0xda,0xb8,0xa9,0x62,0x6d,0x11),
LL(0x01,0x01,0x04,0x01,0x08,0x05,0x02,0x09),
LL(0x4f,0x4f,0x21,0x4f,0x42,0x6e,0x9e,0x0d),
LL(0x36,0x36,0xd8,0x36,0xad,0xee,0x6c,0x9b),
LL(0xa6,0xa6,0xa2,0xa6,0x59,0x04,0x51,0xff),
LL(0xd2,0xd2,0x6f,0xd2,0xde,0xbd,0xb9,0x0c),
LL(0xf5,0xf5,0xf3,0xf5,0xfb,0x06,0xf7,0x0e),
LL(0x79,0x79,0xf9,0x79,0xef,0x80,0xf2,0x96),
LL(0x6f,0x6f,0xa1,0x6f,0x5f,0xce,0xde,0x30),
LL(0x91,0x91,0x7e,0x91,0xfc,0xef,0x3f,0x6d),
LL(0x52,0x52,0x55,0x52,0xaa,0x07,0xa4,0xf8),
LL(0x60,0x60,0x9d,0x60,0x27,0xfd,0xc0,0x47),
LL(0xbc,0xbc,0xca,0xbc,0x89,0x76,0x65,0x35),
LL(0x9b,0x9b,0x56,0x9b,0xac,0xcd,0x2b,0x37),
LL(0x8e,0x8e,0x02,0x8e,0x04,0x8c,0x01,0x8a),
LL(0xa3,0xa3,0xb6,0xa3,0x71,0x15,0x5b,0xd2),
LL(0x0c,0x0c,0x30,0x0c,0x60,0x3c,0x18,0x6c),
LL(0x7b,0x7b,0xf1,0x7b,0xff,0x8a,0xf6,0x84),
LL(0x35,0x35,0xd4,0x35,0xb5,0xe1,0x6a,0x80),
LL(0x1d,0x1d,0x74,0x1d,0xe8,0x69,0x3a,0xf5),
LL(0xe0,0xe0,0xa7,0xe0,0x53,0x47,0xdd,0xb3),
LL(0xd7,0xd7,0x7b,0xd7,0xf6,0xac,0xb3,0x21),
LL(0xc2,0xc2,0x2f,0xc2,0x5e,0xed,0x99,0x9c),
LL(0x2e,0x2e,0xb8,0x2e,0x6d,0x96,0x5c,0x43),
LL(0x4b,0x4b,0x31,0x4b,0x62,0x7a,0x96,0x29),
LL(0xfe,0xfe,0xdf,0xfe,0xa3,0x21,0xe1,0x5d),
LL(0x57,0x57,0x41,0x57,0x82,0x16,0xae,0xd5),
LL(0x15,0x15,0x54,0x15,0xa8,0x41,0x2a,0xbd),
LL(0x77,0x77,0xc1,0x77,0x9f,0xb6,0xee,0xe8),
LL(0x37,0x37,0xdc,0x37,0xa5,0xeb,0x6e,0x92),
LL(0xe5,0xe5,0xb3,0xe5,0x7b,0x56,0xd7,0x9e),
LL(0x9f,0x9f,0x46,0x9f,0x8c,0xd9,0x23,0x13),
LL(0xf0,0xf0,0xe7,0xf0,0xd3,0x17,0xfd,0x23),
LL(0x4a,0x4a,0x35,0x4a,0x6a,0x7f,0x94,0x20),
LL(0xda,0xda,0x4f,0xda,0x9e,0x95,0xa9,0x44),
LL(0x58,0x58,0x7d,0x58,0xfa,0x25,0xb0,0xa2),
LL(0xc9,0xc9,0x03,0xc9,0x06,0xca,0x8f,0xcf),
LL(0x29,0x29,0xa4,0x29,0x55,0x8d,0x52,0x7c),
LL(0x0a,0x0a,0x28,0x0a,0x50,0x22,0x14,0x5a),
LL(0xb1,0xb1,0xfe,0xb1,0xe1,0x4f,0x7f,0x50),
LL(0xa0,0xa0,0xba,0xa0,0x69,0x1a,0x5d,0xc9),
LL(0x6b,0x6b,0xb1,0x6b,0x7f,0xda,0xd6,0x14),
LL(0x85,0x85,0x2e,0x85,0x5c,0xab,0x17,0xd9),
LL(0xbd,0xbd,0xce,0xbd,0x81,0x73,0x67,0x3c),
LL(0x5d,0x5d,0x69,0x5d,0xd2,0x34,0xba,0x8f),
LL(0x10,0x10,0x40,0x10,0x80,0x50,0x20,0x90),
LL(0xf4,0xf4,0xf7,0xf4,0xf3,0x03,0xf5,0x07),
LL(0xcb,0xcb,0x0b,0xcb,0x16,0xc0,0x8b,0xdd),
LL(0x3e,0x3e,0xf8,0x3e,0xed,0xc6,0x7c,0xd3),
LL(0x05,0x05,0x14,0x05,0x28,0x11,0x0a,0x2d),
LL(0x67,0x67,0x81,0x67,0x1f,0xe6,0xce,0x78),
LL(0xe4,0xe4,0xb7,0xe4,0x73,0x53,0xd5,0x97),
LL(0x27,0x27,0x9c,0x27,0x25,0xbb,0x4e,0x02),
LL(0x41,0x41,0x19,0x41,0x32,0x58,0x82,0x73),
LL(0x8b,0x8b,0x16,0x8b,0x2c,0x9d,0x0b,0xa7),
LL(0xa7,0xa7,0xa6,0xa7,0x51,0x01,0x53,0xf6),
LL(0x7d,0x7d,0xe9,0x7d,0xcf,0x94,0xfa,0xb2),
LL(0x95,0x95,0x6e,0x95,0xdc,0xfb,0x37,0x49),
LL(0xd8,0xd8,0x47,0xd8,0x8e,0x9f,0xad,0x56),
LL(0xfb,0xfb,0xcb,0xfb,0x8b,0x30,0xeb,0x70),
LL(0xee,0xee,0x9f,0xee,0x23,0x71,0xc1,0xcd),
LL(0x7c,0x7c,0xed,0x7c,0xc7,0x91,0xf8,0xbb),
LL(0x66,0x66,0x85,0x66,0x17,0xe3,0xcc,0x71),
LL(0xdd,0xdd,0x53,0xdd,0xa6,0x8e,0xa7,0x7b),
LL(0x17,0x17,0x5c,0x17,0xb8,0x4b,0x2e,0xaf),
LL(0x47,0x47,0x01,0x47,0x02,0x46,0x8e,0x45),
LL(0x9e,0x9e,0x42,0x9e,0x84,0xdc,0x21,0x1a),
LL(0xca,0xca,0x0f,0xca,0x1e,0xc5,0x89,0xd4),
LL(0x2d,0x2d,0xb4,0x2d,0x75,0x99,0x5a,0x58),
LL(0xbf,0xbf,0xc6,0xbf,0x91,0x79,0x63,0x2e),
LL(0x07,0x07,0x1c,0x07,0x38,0x1b,0x0e,0x3f),
LL(0xad,0xad,0x8e,0xad,0x01,0x23,0x47,0xac),
LL(0x5a,0x5a,0x75,0x5a,0xea,0x2f,0xb4,0xb0),
LL(0x83,0x83,0x36,0x83,0x6c,0xb5,0x1b,0xef),
LL(0x33,0x33,0xcc,0x33,0x85,0xff,0x66,0xb6),
LL(0x63,0x63,0x91,0x63,0x3f,0xf2,0xc6,0x5c),
LL(0x02,0x02,0x08,0x02,0x10,0x0a,0x04,0x12),
LL(0xaa,0xaa,0x92,0xaa,0x39,0x38,0x49,0x93),
LL(0x71,0x71,0xd9,0x71,0xaf,0xa8,0xe2,0xde),
LL(0xc8,0xc8,0x07,0xc8,0x0e,0xcf,0x8d,0xc6),
LL(0x19,0x19,0x64,0x19,0xc8,0x7d,0x32,0xd1),
LL(0x49,0x49,0x39,0x49,0x72,0x70,0x92,0x3b),
LL(0xd9,0xd9,0x43,0xd9,0x86,0x9a,0xaf,0x5f),
LL(0xf2,0xf2,0xef,0xf2,0xc3,0x1d,0xf9,0x31),
LL(0xe3,0xe3,0xab,0xe3,0x4b,0x48,0xdb,0xa8),
LL(0x5b,0x5b,0x71,0x5b,0xe2,0x2a,0xb6,0xb9),
LL(0x88,0x88,0x1a,0x88,0x34,0x92,0x0d,0xbc),
LL(0x9a,0x9a,0x52,0x9a,0xa4,0xc8,0x29,0x3e),
LL(0x26,0x26,0x98,0x26,0x2d,0xbe,0x4c,0x0b),
LL(0x32,0x32,0xc8,0x32,0x8d,0xfa,0x64,0xbf),
LL(0xb0,0xb0,0xfa,0xb0,0xe9,0x4a,0x7d,0x59),
LL(0xe9,0xe9,0x83,0xe9,0x1b,0x6a,0xcf,0xf2),
LL(0x0f,0x0f,0x3c,0x0f,0x78,0x33,0x1e,0x77),
LL(0xd5,0xd5,0x73,0xd5,0xe6,0xa6,0xb7,0x33),
LL(0x80,0x80,0x3a,0x80,0x74,0xba,0x1d,0xf4),
LL(0xbe,0xbe,0xc2,0xbe,0x99,0x7c,0x61,0x27),
LL(0xcd,0xcd,0x13,0xcd,0x26,0xde,0x87,0xeb),
LL(0x34,0x34,0xd0,0x34,0xbd,0xe4,0x68,0x89),
LL(0x48,0x48,0x3d,0x48,0x7a,0x75,0x90,0x32),
LL(0xff,0xff,0xdb,0xff,0xab,0x24,0xe3,0x54),
LL(0x7a,0x7a,0xf5,0x7a,0xf7,0x8f,0xf4,0x8d),
LL(0x90,0x90,0x7a,0x90,0xf4,0xea,0x3d,0x64),
LL(0x5f,0x5f,0x61,0x5f,0xc2,0x3e,0xbe,0x9d),
LL(0x20,0x20,0x80,0x20,0x1d,0xa0,0x40,0x3d),
LL(0x68,0x68,0xbd,0x68,0x67,0xd5,0xd0,0x0f),
LL(0x1a,0x1a,0x68,0x1a,0xd0,0x72,0x34,0xca),
LL(0xae,0xae,0x82,0xae,0x19,0x2c,0x41,0xb7),
LL(0xb4,0xb4,0xea,0xb4,0xc9,0x5e,0x75,0x7d),
LL(0x54,0x54,0x4d,0x54,0x9a,0x19,0xa8,0xce),
LL(0x93,0x93,0x76,0x93,0xec,0xe5,0x3b,0x7f),
LL(0x22,0x22,0x88,0x22,0x0d,0xaa,0x44,0x2f),
LL(0x64,0x64,0x8d,0x64,0x07,0xe9,0xc8,0x63),
LL(0xf1,0xf1,0xe3,0xf1,0xdb,0x12,0xff,0x2a),
LL(0x73,0x73,0xd1,0x73,0xbf,0xa2,0xe6,0xcc),
LL(0x12,0x12,0x48,0x12,0x90,0x5a,0x24,0x82),
LL(0x40,0x40,0x1d,0x40,0x3a,0x5d,0x80,0x7a),
LL(0x08,0x08,0x20,0x08,0x40,0x28,0x10,0x48),
LL(0xc3,0xc3,0x2b,0xc3,0x56,0xe8,0x9b,0x95),
LL(0xec,0xec,0x97,0xec,0x33,0x7b,0xc5,0xdf),
LL(0xdb,0xdb,0x4b,0xdb,0x96,0x90,0xab,0x4d),
LL(0xa1,0xa1,0xbe,0xa1,0x61,0x1f,0x5f,0xc0),
LL(0x8d,0x8d,0x0e,0x8d,0x1c,0x83,0x07,0x91),
LL(0x3d,0x3d,0xf4,0x3d,0xf5,0xc9,0x7a,0xc8),
LL(0x97,0x97,0x66,0x97,0xcc,0xf1,0x33,0x5b),
LL(0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00),
LL(0xcf,0xcf,0x1b,0xcf,0x36,0xd4,0x83,0xf9),
LL(0x2b,0x2b,0xac,0x2b,0x45,0x87,0x56,0x6e),
LL(0x76,0x76,0xc5,0x76,0x97,0xb3,0xec,0xe1),
LL(0x82,0x82,0x32,0x82,0x64,0xb0,0x19,0xe6),
LL(0xd6,0xd6,0x7f,0xd6,0xfe,0xa9,0xb1,0x28),
LL(0x1b,0x1b,0x6c,0x1b,0xd8,0x77,0x36,0xc3),
LL(0xb5,0xb5,0xee,0xb5,0xc1,0x5b,0x77,0x74),
LL(0xaf,0xaf,0x86,0xaf,0x11,0x29,0x43,0xbe),
LL(0x6a,0x6a,0xb5,0x6a,0x77,0xdf,0xd4,0x1d),
LL(0x50,0x50,0x5d,0x50,0xba,0x0d,0xa0,0xea),
LL(0x45,0x45,0x09,0x45,0x12,0x4c,0x8a,0x57),
LL(0xf3,0xf3,0xeb,0xf3,0xcb,0x18,0xfb,0x38),
LL(0x30,0x30,0xc0,0x30,0x9d,0xf0,0x60,0xad),
LL(0xef,0xef,0x9b,0xef,0x2b,0x74,0xc3,0xc4),
LL(0x3f,0x3f,0xfc,0x3f,0xe5,0xc3,0x7e,0xda),
LL(0x55,0x55,0x49,0x55,0x92,0x1c,0xaa,0xc7),
LL(0xa2,0xa2,0xb2,0xa2,0x79,0x10,0x59,0xdb),
LL(0xea,0xea,0x8f,0xea,0x03,0x65,0xc9,0xe9),
LL(0x65,0x65,0x89,0x65,0x0f,0xec,0xca,0x6a),
LL(0xba,0xba,0xd2,0xba,0xb9,0x68,0x69,0x03),
LL(0x2f,0x2f,0xbc,0x2f,0x65,0x93,0x5e,0x4a),
LL(0xc0,0xc0,0x27,0xc0,0x4e,0xe7,0x9d,0x8e),
LL(0xde,0xde,0x5f,0xde,0xbe,0x81,0xa1,0x60),
LL(0x1c,0x1c,0x70,0x1c,0xe0,0x6c,0x38,0xfc),
LL(0xfd,0xfd,0xd3,0xfd,0xbb,0x2e,0xe7,0x46),
LL(0x4d,0x4d,0x29,0x4d,0x52,0x64,0x9a,0x1f),
LL(0x92,0x92,0x72,0x92,0xe4,0xe0,0x39,0x76),
LL(0x75,0x75,0xc9,0x75,0x8f,0xbc,0xea,0xfa),
LL(0x06,0x06,0x18,0x06,0x30,0x1e,0x0c,0x36),
LL(0x8a,0x8a,0x12,0x8a,0x24,0x98,0x09,0xae),
LL(0xb2,0xb2,0xf2,0xb2,0xf9,0x40,0x79,0x4b),
LL(0xe6,0xe6,0xbf,0xe6,0x63,0x59,0xd1,0x85),
LL(0x0e,0x0e,0x38,0x0e,0x70,0x36,0x1c,0x7e),
LL(0x1f,0x1f,0x7c,0x1f,0xf8,0x63,0x3e,0xe7),
LL(0x62,0x62,0x95,0x62,0x37,0xf7,0xc4,0x55),
LL(0xd4,0xd4,0x77,0xd4,0xee,0xa3,0xb5,0x3a),
LL(0xa8,0xa8,0x9a,0xa8,0x29,0x32,0x4d,0x81),
LL(0x96,0x96,0x62,0x96,0xc4,0xf4,0x31,0x52),
LL(0xf9,0xf9,0xc3,0xf9,0x9b,0x3a,0xef,0x62),
LL(0xc5,0xc5,0x33,0xc5,0x66,0xf6,0x97,0xa3),
LL(0x25,0x25,0x94,0x25,0x35,0xb1,0x4a,0x10),
LL(0x59,0x59,0x79,0x59,0xf2,0x20,0xb2,0xab),
LL(0x84,0x84,0x2a,0x84,0x54,0xae,0x15,0xd0),
LL(0x72,0x72,0xd5,0x72,0xb7,0xa7,0xe4,0xc5),
LL(0x39,0x39,0xe4,0x39,0xd5,0xdd,0x72,0xec),
LL(0x4c,0x4c,0x2d,0x4c,0x5a,0x61,0x98,0x16),
LL(0x5e,0x5e,0x65,0x5e,0xca,0x3b,0xbc,0x94),
LL(0x78,0x78,0xfd,0x78,0xe7,0x85,0xf0,0x9f),
LL(0x38,0x38,0xe0,0x38,0xdd,0xd8,0x70,0xe5),
LL(0x8c,0x8c,0x0a,0x8c,0x14,0x86,0x05,0x98),
LL(0xd1,0xd1,0x63,0xd1,0xc6,0xb2,0xbf,0x17),
LL(0xa5,0xa5,0xae,0xa5,0x41,0x0b,0x57,0xe4),
LL(0xe2,0xe2,0xaf,0xe2,0x43,0x4d,0xd9,0xa1),
LL(0x61,0x61,0x99,0x61,0x2f,0xf8,0xc2,0x4e),
LL(0xb3,0xb3,0xf6,0xb3,0xf1,0x45,0x7b,0x42),
LL(0x21,0x21,0x84,0x21,0x15,0xa5,0x42,0x34),
LL(0x9c,0x9c,0x4a,0x9c,0x94,0xd6,0x25,0x08),
LL(0x1e,0x1e,0x78,0x1e,0xf0,0x66,0x3c,0xee),
LL(0x43,0x43,0x11,0x43,0x22,0x52,0x86,0x61),
LL(0xc7,0xc7,0x3b,0xc7,0x76,0xfc,0x93,0xb1),
LL(0xfc,0xfc,0xd7,0xfc,0xb3,0x2b,0xe5,0x4f),
LL(0x04,0x04,0x10,0x04,0x20,0x14,0x08,0x24),
LL(0x51,0x51,0x59,0x51,0xb2,0x08,0xa2,0xe3),
LL(0x99,0x99,0x5e,0x99,0xbc,0xc7,0x2f,0x25),
LL(0x6d,0x6d,0xa9,0x6d,0x4f,0xc4,0xda,0x22),
LL(0x0d,0x0d,0x34,0x0d,0x68,0x39,0x1a,0x65),
LL(0xfa,0xfa,0xcf,0xfa,0x83,0x35,0xe9,0x79),
LL(0xdf,0xdf,0x5b,0xdf,0xb6,0x84,0xa3,0x69),
LL(0x7e,0x7e,0xe5,0x7e,0xd7,0x9b,0xfc,0xa9),
LL(0x24,0x24,0x90,0x24,0x3d,0xb4,0x48,0x19),
LL(0x3b,0x3b,0xec,0x3b,0xc5,0xd7,0x76,0xfe),
LL(0xab,0xab,0x96,0xab,0x31,0x3d,0x4b,0x9a),
LL(0xce,0xce,0x1f,0xce,0x3e,0xd1,0x81,0xf0),
LL(0x11,0x11,0x44,0x11,0x88,0x55,0x22,0x99),
LL(0x8f,0x8f,0x06,0x8f,0x0c,0x89,0x03,0x83),
LL(0x4e,0x4e,0x25,0x4e,0x4a,0x6b,0x9c,0x04),
LL(0xb7,0xb7,0xe6,0xb7,0xd1,0x51,0x73,0x66),
LL(0xeb,0xeb,0x8b,0xeb,0x0b,0x60,0xcb,0xe0),
LL(0x3c,0x3c,0xf0,0x3c,0xfd,0xcc,0x78,0xc1),
LL(0x81,0x81,0x3e,0x81,0x7c,0xbf,0x1f,0xfd),
LL(0x94,0x94,0x6a,0x94,0xd4,0xfe,0x35,0x40),
LL(0xf7,0xf7,0xfb,0xf7,0xeb,0x0c,0xf3,0x1c),
LL(0xb9,0xb9,0xde,0xb9,0xa1,0x67,0x6f,0x18),
LL(0x13,0x13,0x4c,0x13,0x98,0x5f,0x26,0x8b),
LL(0x2c,0x2c,0xb0,0x2c,0x7d,0x9c,0x58,0x51),
LL(0xd3,0xd3,0x6b,0xd3,0xd6,0xb8,0xbb,0x05),
LL(0xe7,0xe7,0xbb,0xe7,0x6b,0x5c,0xd3,0x8c),
LL(0x6e,0x6e,0xa5,0x6e,0x57,0xcb,0xdc,0x39),
LL(0xc4,0xc4,0x37,0xc4,0x6e,0xf3,0x95,0xaa),
LL(0x03,0x03,0x0c,0x03,0x18,0x0f,0x06,0x1b),
LL(0x56,0x56,0x45,0x56,0x8a,0x13,0xac,0xdc),
LL(0x44,0x44,0x0d,0x44,0x1a,0x49,0x88,0x5e),
LL(0x7f,0x7f,0xe1,0x7f,0xdf,0x9e,0xfe,0xa0),
LL(0xa9,0xa9,0x9e,0xa9,0x21,0x37,0x4f,0x88),
LL(0x2a,0x2a,0xa8,0x2a,0x4d,0x82,0x54,0x67),
LL(0xbb,0xbb,0xd6,0xbb,0xb1,0x6d,0x6b,0x0a),
LL(0xc1,0xc1,0x23,0xc1,0x46,0xe2,0x9f,0x87),
LL(0x53,0x53,0x51,0x53,0xa2,0x02,0xa6,0xf1),
LL(0xdc,0xdc,0x57,0xdc,0xae,0x8b,0xa5,0x72),
LL(0x0b,0x0b,0x2c,0x0b,0x58,0x27,0x16,0x53),
LL(0x9d,0x9d,0x4e,0x9d,0x9c,0xd3,0x27,0x01),
LL(0x6c,0x6c,0xad,0x6c,0x47,0xc1,0xd8,0x2b),
LL(0x31,0x31,0xc4,0x31,0x95,0xf5,0x62,0xa4),
LL(0x74,0x74,0xcd,0x74,0x87,0xb9,0xe8,0xf3),
LL(0xf6,0xf6,0xff,0xf6,0xe3,0x09,0xf1,0x15),
LL(0x46,0x46,0x05,0x46,0x0a,0x43,0x8c,0x4c),
LL(0xac,0xac,0x8a,0xac,0x09,0x26,0x45,0xa5),
LL(0x89,0x89,0x1e,0x89,0x3c,0x97,0x0f,0xb5),
LL(0x14,0x14,0x50,0x14,0xa0,0x44,0x28,0xb4),
LL(0xe1,0xe1,0xa3,0xe1,0x5b,0x42,0xdf,0xba),
LL(0x16,0x16,0x58,0x16,0xb0,0x4e,0x2c,0xa6),
LL(0x3a,0x3a,0xe8,0x3a,0xcd,0xd2,0x74,0xf7),
LL(0x69,0x69,0xb9,0x69,0x6f,0xd0,0xd2,0x06),
LL(0x09,0x09,0x24,0x09,0x48,0x2d,0x12,0x41),
LL(0x70,0x70,0xdd,0x70,0xa7,0xad,0xe0,0xd7),
LL(0xb6,0xb6,0xe2,0xb6,0xd9,0x54,0x71,0x6f),
LL(0xd0,0xd0,0x67,0xd0,0xce,0xb7,0xbd,0x1e),
LL(0xed,0xed,0x93,0xed,0x3b,0x7e,0xc7,0xd6),
LL(0xcc,0xcc,0x17,0xcc,0x2e,0xdb,0x85,0xe2),
LL(0x42,0x42,0x15,0x42,0x2a,0x57,0x84,0x68),
LL(0x98,0x98,0x5a,0x98,0xb4,0xc2,0x2d,0x2c),
LL(0xa4,0xa4,0xaa,0xa4,0x49,0x0e,0x55,0xed),
LL(0x28,0x28,0xa0,0x28,0x5d,0x88,0x50,0x75),
LL(0x5c,0x5c,0x6d,0x5c,0xda,0x31,0xb8,0x86),
LL(0xf8,0xf8,0xc7,0xf8,0x93,0x3f,0xed,0x6b),
LL(0x86,0x86,0x22,0x86,0x44,0xa4,0x11,0xc2),
#define RC (&(Cx.q[256*N]))
0x18,0x23,0xc6,0xe8,0x87,0xb8,0x01,0x4f, /* rc[ROUNDS] */
0x36,0xa6,0xd2,0xf5,0x79,0x6f,0x91,0x52,
0x60,0xbc,0x9b,0x8e,0xa3,0x0c,0x7b,0x35,
0x1d,0xe0,0xd7,0xc2,0x2e,0x4b,0xfe,0x57,
0x15,0x77,0x37,0xe5,0x9f,0xf0,0x4a,0xda,
0x58,0xc9,0x29,0x0a,0xb1,0xa0,0x6b,0x85,
0xbd,0x5d,0x10,0xf4,0xcb,0x3e,0x05,0x67,
0xe4,0x27,0x41,0x8b,0xa7,0x7d,0x95,0xd8,
0xfb,0xee,0x7c,0x66,0xdd,0x17,0x47,0x9e,
0xca,0x2d,0xbf,0x07,0xad,0x5a,0x83,0x33
}
};
void whirlpool_block(WHIRLPOOL_CTX *ctx,const void *inp,size_t n)
{
int r;
const u8 *p=inp;
union { u64 q[8]; u8 c[64]; } S,K,*H=(void *)ctx->H.q;
#ifdef GO_FOR_MMX
GO_FOR_MMX(ctx,inp,n);
#endif
do {
#ifdef OPENSSL_SMALL_FOOTPRINT
u64 L[8];
int i;
for (i=0;i<64;i++) S.c[i] = (K.c[i] = H->c[i]) ^ p[i];
for (r=0;r<ROUNDS;r++)
{
for (i=0;i<8;i++)
{
L[i] = i ? 0 : RC[r];
L[i] ^= C0(K,i) ^ C1(K,(i-1)&7) ^
C2(K,(i-2)&7) ^ C3(K,(i-3)&7) ^
C4(K,(i-4)&7) ^ C5(K,(i-5)&7) ^
C6(K,(i-6)&7) ^ C7(K,(i-7)&7);
}
memcpy (K.q,L,64);
for (i=0;i<8;i++)
{
L[i] ^= C0(S,i) ^ C1(S,(i-1)&7) ^
C2(S,(i-2)&7) ^ C3(S,(i-3)&7) ^
C4(S,(i-4)&7) ^ C5(S,(i-5)&7) ^
C6(S,(i-6)&7) ^ C7(S,(i-7)&7);
}
memcpy (S.q,L,64);
}
for (i=0;i<64;i++) H->c[i] ^= S.c[i] ^ p[i];
#else
u64 L0,L1,L2,L3,L4,L5,L6,L7;
#ifdef __STRICT_ALIGNMENT
if ((size_t)p & 7)
{
memcpy (S.c,p,64);
S.q[0] ^= (K.q[0] = H->q[0]);
S.q[1] ^= (K.q[1] = H->q[1]);
S.q[2] ^= (K.q[2] = H->q[2]);
S.q[3] ^= (K.q[3] = H->q[3]);
S.q[4] ^= (K.q[4] = H->q[4]);
S.q[5] ^= (K.q[5] = H->q[5]);
S.q[6] ^= (K.q[6] = H->q[6]);
S.q[7] ^= (K.q[7] = H->q[7]);
}
else
#endif
{
const u64 *pa = (const u64*)p;
S.q[0] = (K.q[0] = H->q[0]) ^ pa[0];
S.q[1] = (K.q[1] = H->q[1]) ^ pa[1];
S.q[2] = (K.q[2] = H->q[2]) ^ pa[2];
S.q[3] = (K.q[3] = H->q[3]) ^ pa[3];
S.q[4] = (K.q[4] = H->q[4]) ^ pa[4];
S.q[5] = (K.q[5] = H->q[5]) ^ pa[5];
S.q[6] = (K.q[6] = H->q[6]) ^ pa[6];
S.q[7] = (K.q[7] = H->q[7]) ^ pa[7];
}
for(r=0;r<ROUNDS;r++)
{
#ifdef SMALL_REGISTER_BANK
L0 = C0(K,0) ^ C1(K,7) ^ C2(K,6) ^ C3(K,5) ^
C4(K,4) ^ C5(K,3) ^ C6(K,2) ^ C7(K,1) ^ RC[r];
L1 = C0(K,1) ^ C1(K,0) ^ C2(K,7) ^ C3(K,6) ^
C4(K,5) ^ C5(K,4) ^ C6(K,3) ^ C7(K,2);
L2 = C0(K,2) ^ C1(K,1) ^ C2(K,0) ^ C3(K,7) ^
C4(K,6) ^ C5(K,5) ^ C6(K,4) ^ C7(K,3);
L3 = C0(K,3) ^ C1(K,2) ^ C2(K,1) ^ C3(K,0) ^
C4(K,7) ^ C5(K,6) ^ C6(K,5) ^ C7(K,4);
L4 = C0(K,4) ^ C1(K,3) ^ C2(K,2) ^ C3(K,1) ^
C4(K,0) ^ C5(K,7) ^ C6(K,6) ^ C7(K,5);
L5 = C0(K,5) ^ C1(K,4) ^ C2(K,3) ^ C3(K,2) ^
C4(K,1) ^ C5(K,0) ^ C6(K,7) ^ C7(K,6);
L6 = C0(K,6) ^ C1(K,5) ^ C2(K,4) ^ C3(K,3) ^
C4(K,2) ^ C5(K,1) ^ C6(K,0) ^ C7(K,7);
L7 = C0(K,7) ^ C1(K,6) ^ C2(K,5) ^ C3(K,4) ^
C4(K,3) ^ C5(K,2) ^ C6(K,1) ^ C7(K,0);
K.q[0] = L0; K.q[1] = L1; K.q[2] = L2; K.q[3] = L3;
K.q[4] = L4; K.q[5] = L5; K.q[6] = L6; K.q[7] = L7;
L0 ^= C0(S,0) ^ C1(S,7) ^ C2(S,6) ^ C3(S,5) ^
C4(S,4) ^ C5(S,3) ^ C6(S,2) ^ C7(S,1);
L1 ^= C0(S,1) ^ C1(S,0) ^ C2(S,7) ^ C3(S,6) ^
C4(S,5) ^ C5(S,4) ^ C6(S,3) ^ C7(S,2);
L2 ^= C0(S,2) ^ C1(S,1) ^ C2(S,0) ^ C3(S,7) ^
C4(S,6) ^ C5(S,5) ^ C6(S,4) ^ C7(S,3);
L3 ^= C0(S,3) ^ C1(S,2) ^ C2(S,1) ^ C3(S,0) ^
C4(S,7) ^ C5(S,6) ^ C6(S,5) ^ C7(S,4);
L4 ^= C0(S,4) ^ C1(S,3) ^ C2(S,2) ^ C3(S,1) ^
C4(S,0) ^ C5(S,7) ^ C6(S,6) ^ C7(S,5);
L5 ^= C0(S,5) ^ C1(S,4) ^ C2(S,3) ^ C3(S,2) ^
C4(S,1) ^ C5(S,0) ^ C6(S,7) ^ C7(S,6);
L6 ^= C0(S,6) ^ C1(S,5) ^ C2(S,4) ^ C3(S,3) ^
C4(S,2) ^ C5(S,1) ^ C6(S,0) ^ C7(S,7);
L7 ^= C0(S,7) ^ C1(S,6) ^ C2(S,5) ^ C3(S,4) ^
C4(S,3) ^ C5(S,2) ^ C6(S,1) ^ C7(S,0);
S.q[0] = L0; S.q[1] = L1; S.q[2] = L2; S.q[3] = L3;
S.q[4] = L4; S.q[5] = L5; S.q[6] = L6; S.q[7] = L7;
#else
L0 = C0(K,0); L1 = C1(K,0); L2 = C2(K,0); L3 = C3(K,0);
L4 = C4(K,0); L5 = C5(K,0); L6 = C6(K,0); L7 = C7(K,0);
L0 ^= RC[r];
L1 ^= C0(K,1); L2 ^= C1(K,1); L3 ^= C2(K,1); L4 ^= C3(K,1);
L5 ^= C4(K,1); L6 ^= C5(K,1); L7 ^= C6(K,1); L0 ^= C7(K,1);
L2 ^= C0(K,2); L3 ^= C1(K,2); L4 ^= C2(K,2); L5 ^= C3(K,2);
L6 ^= C4(K,2); L7 ^= C5(K,2); L0 ^= C6(K,2); L1 ^= C7(K,2);
L3 ^= C0(K,3); L4 ^= C1(K,3); L5 ^= C2(K,3); L6 ^= C3(K,3);
L7 ^= C4(K,3); L0 ^= C5(K,3); L1 ^= C6(K,3); L2 ^= C7(K,3);
L4 ^= C0(K,4); L5 ^= C1(K,4); L6 ^= C2(K,4); L7 ^= C3(K,4);
L0 ^= C4(K,4); L1 ^= C5(K,4); L2 ^= C6(K,4); L3 ^= C7(K,4);
L5 ^= C0(K,5); L6 ^= C1(K,5); L7 ^= C2(K,5); L0 ^= C3(K,5);
L1 ^= C4(K,5); L2 ^= C5(K,5); L3 ^= C6(K,5); L4 ^= C7(K,5);
L6 ^= C0(K,6); L7 ^= C1(K,6); L0 ^= C2(K,6); L1 ^= C3(K,6);
L2 ^= C4(K,6); L3 ^= C5(K,6); L4 ^= C6(K,6); L5 ^= C7(K,6);
L7 ^= C0(K,7); L0 ^= C1(K,7); L1 ^= C2(K,7); L2 ^= C3(K,7);
L3 ^= C4(K,7); L4 ^= C5(K,7); L5 ^= C6(K,7); L6 ^= C7(K,7);
K.q[0] = L0; K.q[1] = L1; K.q[2] = L2; K.q[3] = L3;
K.q[4] = L4; K.q[5] = L5; K.q[6] = L6; K.q[7] = L7;
L0 ^= C0(S,0); L1 ^= C1(S,0); L2 ^= C2(S,0); L3 ^= C3(S,0);
L4 ^= C4(S,0); L5 ^= C5(S,0); L6 ^= C6(S,0); L7 ^= C7(S,0);
L1 ^= C0(S,1); L2 ^= C1(S,1); L3 ^= C2(S,1); L4 ^= C3(S,1);
L5 ^= C4(S,1); L6 ^= C5(S,1); L7 ^= C6(S,1); L0 ^= C7(S,1);
L2 ^= C0(S,2); L3 ^= C1(S,2); L4 ^= C2(S,2); L5 ^= C3(S,2);
L6 ^= C4(S,2); L7 ^= C5(S,2); L0 ^= C6(S,2); L1 ^= C7(S,2);
L3 ^= C0(S,3); L4 ^= C1(S,3); L5 ^= C2(S,3); L6 ^= C3(S,3);
L7 ^= C4(S,3); L0 ^= C5(S,3); L1 ^= C6(S,3); L2 ^= C7(S,3);
L4 ^= C0(S,4); L5 ^= C1(S,4); L6 ^= C2(S,4); L7 ^= C3(S,4);
L0 ^= C4(S,4); L1 ^= C5(S,4); L2 ^= C6(S,4); L3 ^= C7(S,4);
L5 ^= C0(S,5); L6 ^= C1(S,5); L7 ^= C2(S,5); L0 ^= C3(S,5);
L1 ^= C4(S,5); L2 ^= C5(S,5); L3 ^= C6(S,5); L4 ^= C7(S,5);
L6 ^= C0(S,6); L7 ^= C1(S,6); L0 ^= C2(S,6); L1 ^= C3(S,6);
L2 ^= C4(S,6); L3 ^= C5(S,6); L4 ^= C6(S,6); L5 ^= C7(S,6);
L7 ^= C0(S,7); L0 ^= C1(S,7); L1 ^= C2(S,7); L2 ^= C3(S,7);
L3 ^= C4(S,7); L4 ^= C5(S,7); L5 ^= C6(S,7); L6 ^= C7(S,7);
S.q[0] = L0; S.q[1] = L1; S.q[2] = L2; S.q[3] = L3;
S.q[4] = L4; S.q[5] = L5; S.q[6] = L6; S.q[7] = L7;
#endif
}
#ifdef __STRICT_ALIGNMENT
if ((size_t)p & 7)
{
int i;
for(i=0;i<64;i++) H->c[i] ^= S.c[i] ^ p[i];
}
else
#endif
{
const u64 *pa=(const u64 *)p;
H->q[0] ^= S.q[0] ^ pa[0];
H->q[1] ^= S.q[1] ^ pa[1];
H->q[2] ^= S.q[2] ^ pa[2];
H->q[3] ^= S.q[3] ^ pa[3];
H->q[4] ^= S.q[4] ^ pa[4];
H->q[5] ^= S.q[5] ^ pa[5];
H->q[6] ^= S.q[6] ^ pa[6];
H->q[7] ^= S.q[7] ^ pa[7];
}
#endif
p += 64;
} while(--n);
}

268
crypto/whrlpool/wp_dgst.c Normal file
View File

@@ -0,0 +1,268 @@
/* $OpenBSD: wp_dgst.c,v 1.7 2023/09/04 08:43:41 tb Exp $ */
/**
* The Whirlpool hashing function.
*
* <P>
* <b>References</b>
*
* <P>
* The Whirlpool algorithm was developed by
* <a href="mailto:pbarreto@scopus.com.br">Paulo S. L. M. Barreto</a> and
* <a href="mailto:vincent.rijmen@cryptomathic.com">Vincent Rijmen</a>.
*
* See
* P.S.L.M. Barreto, V. Rijmen,
* ``The Whirlpool hashing function,''
* NESSIE submission, 2000 (tweaked version, 2001),
* <https://www.cosic.esat.kuleuven.ac.be/nessie/workshop/submissions/whirlpool.zip>
*
* Based on "@version 3.0 (2003.03.12)" by Paulo S.L.M. Barreto and
* Vincent Rijmen. Lookup "reference implementations" on
* <http://planeta.terra.com.br/informatica/paulobarreto/>
*
* =============================================================================
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''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 AUTHORS 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.
*
*/
/*
* OpenSSL-specific implementation notes.
*
* WHIRLPOOL_Update as well as one-stroke WHIRLPOOL both expect
* number of *bytes* as input length argument. Bit-oriented routine
* as specified by authors is called WHIRLPOOL_BitUpdate[!] and
* does not have one-stroke counterpart.
*
* WHIRLPOOL_BitUpdate implements byte-oriented loop, essentially
* to serve WHIRLPOOL_Update. This is done for performance.
*
* Unlike authors' reference implementation, block processing
* routine whirlpool_block is designed to operate on multi-block
* input. This is done for performance.
*/
#include <string.h>
#include <openssl/crypto.h>
#include "wp_local.h"
int WHIRLPOOL_Init(WHIRLPOOL_CTX *c)
{
memset (c,0,sizeof(*c));
return(1);
}
int WHIRLPOOL_Update (WHIRLPOOL_CTX *c,const void *_inp,size_t bytes)
{
/* Well, largest suitable chunk size actually is
* (1<<(sizeof(size_t)*8-3))-64, but below number
* is large enough for not to care about excessive
* calls to WHIRLPOOL_BitUpdate... */
size_t chunk = ((size_t)1)<<(sizeof(size_t)*8-4);
const unsigned char *inp = _inp;
while (bytes>=chunk)
{
WHIRLPOOL_BitUpdate(c,inp,chunk*8);
bytes -= chunk;
inp += chunk;
}
if (bytes)
WHIRLPOOL_BitUpdate(c,inp,bytes*8);
return(1);
}
void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c,const void *_inp,size_t bits)
{
size_t n;
unsigned int bitoff = c->bitoff,
bitrem = bitoff%8,
inpgap = (8-(unsigned int)bits%8)&7;
const unsigned char *inp=_inp;
/* This 256-bit increment procedure relies on the size_t
* being natural size of CPU register, so that we don't
* have to mask the value in order to detect overflows. */
c->bitlen[0] += bits;
if (c->bitlen[0] < bits) /* overflow */
{
n = 1;
do { c->bitlen[n]++;
} while(c->bitlen[n]==0
&& ++n<(WHIRLPOOL_COUNTER/sizeof(size_t)));
}
#ifndef OPENSSL_SMALL_FOOTPRINT
reconsider:
if (inpgap==0 && bitrem==0) /* byte-oriented loop */
{
while (bits)
{
if (bitoff==0 && (n=bits/WHIRLPOOL_BBLOCK))
{
whirlpool_block(c,inp,n);
inp += n*WHIRLPOOL_BBLOCK/8;
bits %= WHIRLPOOL_BBLOCK;
}
else
{
unsigned int byteoff = bitoff/8;
bitrem = WHIRLPOOL_BBLOCK - bitoff;/* re-use bitrem */
if (bits >= bitrem)
{
bits -= bitrem;
bitrem /= 8;
memcpy(c->data+byteoff,inp,bitrem);
inp += bitrem;
whirlpool_block(c,c->data,1);
bitoff = 0;
}
else
{
memcpy(c->data+byteoff,inp,bits/8);
bitoff += (unsigned int)bits;
bits = 0;
}
c->bitoff = bitoff;
}
}
}
else /* bit-oriented loop */
#endif
{
/*
inp
|
+-------+-------+-------
|||||||||||||||||||||
+-------+-------+-------
+-------+-------+-------+-------+-------
|||||||||||||| c->data
+-------+-------+-------+-------+-------
|
c->bitoff/8
*/
while (bits)
{
unsigned int byteoff = bitoff/8;
unsigned char b;
#ifndef OPENSSL_SMALL_FOOTPRINT
if (bitrem==inpgap)
{
c->data[byteoff++] |= inp[0] & (0xff>>inpgap);
inpgap = 8-inpgap;
bitoff += inpgap; bitrem = 0; /* bitoff%8 */
bits -= inpgap; inpgap = 0; /* bits%8 */
inp++;
if (bitoff==WHIRLPOOL_BBLOCK)
{
whirlpool_block(c,c->data,1);
bitoff = 0;
}
c->bitoff = bitoff;
goto reconsider;
}
else
#endif
if (bits>=8)
{
b = ((inp[0]<<inpgap) | (inp[1]>>(8-inpgap)));
b &= 0xff;
if (bitrem) c->data[byteoff++] |= b>>bitrem;
else c->data[byteoff++] = b;
bitoff += 8;
bits -= 8;
inp++;
if (bitoff>=WHIRLPOOL_BBLOCK)
{
whirlpool_block(c,c->data,1);
byteoff = 0;
bitoff %= WHIRLPOOL_BBLOCK;
}
if (bitrem) c->data[byteoff] = b<<(8-bitrem);
}
else /* remaining less than 8 bits */
{
b = (inp[0]<<inpgap)&0xff;
if (bitrem) c->data[byteoff++] |= b>>bitrem;
else c->data[byteoff++] = b;
bitoff += (unsigned int)bits;
if (bitoff==WHIRLPOOL_BBLOCK)
{
whirlpool_block(c,c->data,1);
byteoff = 0;
bitoff %= WHIRLPOOL_BBLOCK;
}
if (bitrem) c->data[byteoff] = b<<(8-bitrem);
bits = 0;
}
c->bitoff = bitoff;
}
}
}
int WHIRLPOOL_Final (unsigned char *md,WHIRLPOOL_CTX *c)
{
unsigned int bitoff = c->bitoff,
byteoff = bitoff/8;
size_t i,j,v;
unsigned char *p;
bitoff %= 8;
if (bitoff) c->data[byteoff] |= 0x80>>bitoff;
else c->data[byteoff] = 0x80;
byteoff++;
/* pad with zeros */
if (byteoff > (WHIRLPOOL_BBLOCK/8-WHIRLPOOL_COUNTER))
{
if (byteoff<WHIRLPOOL_BBLOCK/8)
memset(&c->data[byteoff],0,WHIRLPOOL_BBLOCK/8-byteoff);
whirlpool_block(c,c->data,1);
byteoff = 0;
}
if (byteoff < (WHIRLPOOL_BBLOCK/8-WHIRLPOOL_COUNTER))
memset(&c->data[byteoff],0,
(WHIRLPOOL_BBLOCK/8-WHIRLPOOL_COUNTER)-byteoff);
/* smash 256-bit c->bitlen in big-endian order */
p = &c->data[WHIRLPOOL_BBLOCK/8-1]; /* last byte in c->data */
for(i=0;i<WHIRLPOOL_COUNTER/sizeof(size_t);i++)
for(v=c->bitlen[i],j=0;j<sizeof(size_t);j++,v>>=8)
*p-- = (unsigned char)(v&0xff);
whirlpool_block(c,c->data,1);
if (md) {
memcpy(md,c->H.c,WHIRLPOOL_DIGEST_LENGTH);
memset(c,0,sizeof(*c));
return(1);
}
return(0);
}
unsigned char *WHIRLPOOL(const void *inp, size_t bytes,unsigned char *md)
{
WHIRLPOOL_CTX ctx;
static unsigned char m[WHIRLPOOL_DIGEST_LENGTH];
if (md == NULL) md=m;
WHIRLPOOL_Init(&ctx);
WHIRLPOOL_Update(&ctx,inp,bytes);
WHIRLPOOL_Final(md,&ctx);
return(md);
}

View File

@@ -0,0 +1,11 @@
/* $OpenBSD: wp_local.h,v 1.2 2023/09/04 08:43:41 tb Exp $ */
#include <sys/types.h>
#include <openssl/whrlpool.h>
__BEGIN_HIDDEN_DECLS
void whirlpool_block(WHIRLPOOL_CTX *,const void *,size_t);
__END_HIDDEN_DECLS