Date   

Re: [edk2-staging/EdkRepo] [PATCH v1] EdkRepo: Removing checkout in clone command

Nate DeSimone
 

Reviewed-by: Nate DeSimone <nathaniel.l.desimone@...>

-----Original Message-----
From: Erik Bjorge <erik.c.bjorge@...>
Sent: Wednesday, October 14, 2020 2:04 PM
To: devel@edk2.groups.io
Cc: Desimone, Ashley E <ashley.e.desimone@...>; Desimone,
Nathaniel L <nathaniel.l.desimone@...>; Pandya, Puja
<puja.pandya@...>; Bret Barkelew <Bret.Barkelew@...>;
Agyeman, Prince <prince.agyeman@...>
Subject: [edk2-staging/EdkRepo] [PATCH v1] EdkRepo: Removing checkout in
clone command

When cloning a repo the files do not need to be checked out. This is because
files will be checked out based on information in the manifest later. This
reduces a number of file operations on larger repos and will improve clone
performance.

Cc: Ashley E Desimone <ashley.e.desimone@...>
Cc: Nate DeSimone <nathaniel.l.desimone@...>
Cc: Puja Pandya <puja.pandya@...>
Cc: Bret Barkelew <Bret.Barkelew@...>
Cc: Prince Agyeman <prince.agyeman@...>
Cc: Erik Bjorge <erik.c.bjorge@...>
Signed-off-by: Erik Bjorge <erik.c.bjorge@...>
---
edkrepo/common/common_repo_functions.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/edkrepo/common/common_repo_functions.py
b/edkrepo/common/common_repo_functions.py
index d14f89a..0d54bbf 100644
--- a/edkrepo/common/common_repo_functions.py
+++ b/edkrepo/common/common_repo_functions.py
@@ -79,9 +79,9 @@ def clone_repos(args, workspace_dir, repos_to_clone,
project_client_side_hooks,
for repo_to_clone in repos_to_clone:
local_repo_path = os.path.join(workspace_dir, repo_to_clone.root)
local_repo_url = repo_to_clone.remote_url
- print ("Cloning from: " + str(local_repo_url))
- repo = Repo.clone_from(local_repo_url, local_repo_path,
progress=GitProgressHandler())
- #Fetch notes
+ print("Cloning from: " + str(local_repo_url))
+ repo = Repo.clone_from(local_repo_url, local_repo_path,
progress=GitProgressHandler(), no_checkout=True)
+ # Fetch notes
repo.remotes.origin.fetch("refs/notes/*:refs/notes/*")

# Add the primary remote so that a reference to the latest code is
available when
--
2.21.0.windows.1


[edk2-staging/EdkRepo] [PATCH v1] EdkRepo: Removing checkout in clone command

Bjorge, Erik C
 

When cloning a repo the files do not need to be checked out. This is
because files will be checked out based on information in the manifest
later. This reduces a number of file operations on larger repos and
will improve clone performance.

Cc: Ashley E Desimone <ashley.e.desimone@...>
Cc: Nate DeSimone <nathaniel.l.desimone@...>
Cc: Puja Pandya <puja.pandya@...>
Cc: Bret Barkelew <Bret.Barkelew@...>
Cc: Prince Agyeman <prince.agyeman@...>
Cc: Erik Bjorge <erik.c.bjorge@...>
Signed-off-by: Erik Bjorge <erik.c.bjorge@...>
---
edkrepo/common/common_repo_functions.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/edkrepo/common/common_repo_functions.py b/edkrepo/common/common_repo_functions.py
index d14f89a..0d54bbf 100644
--- a/edkrepo/common/common_repo_functions.py
+++ b/edkrepo/common/common_repo_functions.py
@@ -79,9 +79,9 @@ def clone_repos(args, workspace_dir, repos_to_clone, project_client_side_hooks,
for repo_to_clone in repos_to_clone:
local_repo_path = os.path.join(workspace_dir, repo_to_clone.root)
local_repo_url = repo_to_clone.remote_url
- print ("Cloning from: " + str(local_repo_url))
- repo = Repo.clone_from(local_repo_url, local_repo_path, progress=GitProgressHandler())
- #Fetch notes
+ print("Cloning from: " + str(local_repo_url))
+ repo = Repo.clone_from(local_repo_url, local_repo_path, progress=GitProgressHandler(), no_checkout=True)
+ # Fetch notes
repo.remotes.origin.fetch("refs/notes/*:refs/notes/*")

# Add the primary remote so that a reference to the latest code is available when
--
2.21.0.windows.1


[PATCH v3 2/2] CryptoPkg/OpensslLib: Commit the auto-generated assembly files for X64

Zurcher, Christopher J
 

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2507

Adding the auto-generated assembly files for X64 architectures.

Cc: Jiewen Yao <jiewen.yao@...>
Cc: Jian J Wang <jian.j.wang@...>
Cc: Xiaoyu Lu <xiaoyux.lu@...>
Cc: Ard Biesheuvel <ard.biesheuvel@...>
Signed-off-by: Christopher J Zurcher <christopher.j.zurcher@...>
---
CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-mb-x86_64.nasm | 732 +++
CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-sha1-x86_64.nasm | 1916 ++++++++
CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-sha256-x86_64.nasm | 78 +
CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-x86_64.nasm | 5103 ++++++++++++++++++++
CryptoPkg/Library/OpensslLib/X64/crypto/aes/vpaes-x86_64.nasm | 1173 +++++
CryptoPkg/Library/OpensslLib/X64/crypto/modes/aesni-gcm-x86_64.nasm | 34 +
CryptoPkg/Library/OpensslLib/X64/crypto/modes/ghash-x86_64.nasm | 1569 ++++++
CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha1-mb-x86_64.nasm | 3137 ++++++++++++
CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha1-x86_64.nasm | 2884 +++++++++++
CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha256-mb-x86_64.nasm | 3461 +++++++++++++
CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha256-x86_64.nasm | 3313 +++++++++++++
CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha512-x86_64.nasm | 1938 ++++++++
CryptoPkg/Library/OpensslLib/X64/crypto/x86_64cpuid.nasm | 491 ++
13 files changed, 25829 insertions(+)

diff --git a/CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-mb-x86_64.nasm b/CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-mb-x86_64.nasm
new file mode 100644
index 0000000000..1a3ed1dd35
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-mb-x86_64.nasm
@@ -0,0 +1,732 @@
+; WARNING: do not edit!
+; Generated from openssl/crypto/aes/asm/aesni-mb-x86_64.pl
+;
+; Copyright 2013-2020 The OpenSSL Project Authors. All Rights Reserved.
+;
+; Licensed under the OpenSSL license (the "License"). You may not use
+; this file except in compliance with the License. You can obtain a copy
+; in the file LICENSE in the source distribution or at
+; https://www.openssl.org/source/license.html
+
+default rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section .text code align=64
+
+
+EXTERN OPENSSL_ia32cap_P
+
+global aesni_multi_cbc_encrypt
+
+ALIGN 32
+aesni_multi_cbc_encrypt:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_aesni_multi_cbc_encrypt:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+
+ mov rax,rsp
+
+ push rbx
+
+ push rbp
+
+ push r12
+
+ push r13
+
+ push r14
+
+ push r15
+
+ lea rsp,[((-168))+rsp]
+ movaps XMMWORD[rsp],xmm6
+ movaps XMMWORD[16+rsp],xmm7
+ movaps XMMWORD[32+rsp],xmm8
+ movaps XMMWORD[48+rsp],xmm9
+ movaps XMMWORD[64+rsp],xmm10
+ movaps XMMWORD[80+rsp],xmm11
+ movaps XMMWORD[96+rsp],xmm12
+ movaps XMMWORD[(-104)+rax],xmm13
+ movaps XMMWORD[(-88)+rax],xmm14
+ movaps XMMWORD[(-72)+rax],xmm15
+
+
+
+
+
+
+ sub rsp,48
+ and rsp,-64
+ mov QWORD[16+rsp],rax
+
+
+$L$enc4x_body:
+ movdqu xmm12,XMMWORD[rsi]
+ lea rsi,[120+rsi]
+ lea rdi,[80+rdi]
+
+$L$enc4x_loop_grande:
+ mov DWORD[24+rsp],edx
+ xor edx,edx
+ mov ecx,DWORD[((-64))+rdi]
+ mov r8,QWORD[((-80))+rdi]
+ cmp ecx,edx
+ mov r12,QWORD[((-72))+rdi]
+ cmovg edx,ecx
+ test ecx,ecx
+ movdqu xmm2,XMMWORD[((-56))+rdi]
+ mov DWORD[32+rsp],ecx
+ cmovle r8,rsp
+ mov ecx,DWORD[((-24))+rdi]
+ mov r9,QWORD[((-40))+rdi]
+ cmp ecx,edx
+ mov r13,QWORD[((-32))+rdi]
+ cmovg edx,ecx
+ test ecx,ecx
+ movdqu xmm3,XMMWORD[((-16))+rdi]
+ mov DWORD[36+rsp],ecx
+ cmovle r9,rsp
+ mov ecx,DWORD[16+rdi]
+ mov r10,QWORD[rdi]
+ cmp ecx,edx
+ mov r14,QWORD[8+rdi]
+ cmovg edx,ecx
+ test ecx,ecx
+ movdqu xmm4,XMMWORD[24+rdi]
+ mov DWORD[40+rsp],ecx
+ cmovle r10,rsp
+ mov ecx,DWORD[56+rdi]
+ mov r11,QWORD[40+rdi]
+ cmp ecx,edx
+ mov r15,QWORD[48+rdi]
+ cmovg edx,ecx
+ test ecx,ecx
+ movdqu xmm5,XMMWORD[64+rdi]
+ mov DWORD[44+rsp],ecx
+ cmovle r11,rsp
+ test edx,edx
+ jz NEAR $L$enc4x_done
+
+ movups xmm1,XMMWORD[((16-120))+rsi]
+ pxor xmm2,xmm12
+ movups xmm0,XMMWORD[((32-120))+rsi]
+ pxor xmm3,xmm12
+ mov eax,DWORD[((240-120))+rsi]
+ pxor xmm4,xmm12
+ movdqu xmm6,XMMWORD[r8]
+ pxor xmm5,xmm12
+ movdqu xmm7,XMMWORD[r9]
+ pxor xmm2,xmm6
+ movdqu xmm8,XMMWORD[r10]
+ pxor xmm3,xmm7
+ movdqu xmm9,XMMWORD[r11]
+ pxor xmm4,xmm8
+ pxor xmm5,xmm9
+ movdqa xmm10,XMMWORD[32+rsp]
+ xor rbx,rbx
+ jmp NEAR $L$oop_enc4x
+
+ALIGN 32
+$L$oop_enc4x:
+ add rbx,16
+ lea rbp,[16+rsp]
+ mov ecx,1
+ sub rbp,rbx
+
+DB 102,15,56,220,209
+ prefetcht0 [31+rbx*1+r8]
+ prefetcht0 [31+rbx*1+r9]
+DB 102,15,56,220,217
+ prefetcht0 [31+rbx*1+r10]
+ prefetcht0 [31+rbx*1+r10]
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+ movups xmm1,XMMWORD[((48-120))+rsi]
+ cmp ecx,DWORD[32+rsp]
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+DB 102,15,56,220,224
+ cmovge r8,rbp
+ cmovg r12,rbp
+DB 102,15,56,220,232
+ movups xmm0,XMMWORD[((-56))+rsi]
+ cmp ecx,DWORD[36+rsp]
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+ cmovge r9,rbp
+ cmovg r13,rbp
+DB 102,15,56,220,233
+ movups xmm1,XMMWORD[((-40))+rsi]
+ cmp ecx,DWORD[40+rsp]
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+DB 102,15,56,220,224
+ cmovge r10,rbp
+ cmovg r14,rbp
+DB 102,15,56,220,232
+ movups xmm0,XMMWORD[((-24))+rsi]
+ cmp ecx,DWORD[44+rsp]
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+ cmovge r11,rbp
+ cmovg r15,rbp
+DB 102,15,56,220,233
+ movups xmm1,XMMWORD[((-8))+rsi]
+ movdqa xmm11,xmm10
+DB 102,15,56,220,208
+ prefetcht0 [15+rbx*1+r12]
+ prefetcht0 [15+rbx*1+r13]
+DB 102,15,56,220,216
+ prefetcht0 [15+rbx*1+r14]
+ prefetcht0 [15+rbx*1+r15]
+DB 102,15,56,220,224
+DB 102,15,56,220,232
+ movups xmm0,XMMWORD[((128-120))+rsi]
+ pxor xmm12,xmm12
+
+DB 102,15,56,220,209
+ pcmpgtd xmm11,xmm12
+ movdqu xmm12,XMMWORD[((-120))+rsi]
+DB 102,15,56,220,217
+ paddd xmm10,xmm11
+ movdqa XMMWORD[32+rsp],xmm10
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+ movups xmm1,XMMWORD[((144-120))+rsi]
+
+ cmp eax,11
+
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+DB 102,15,56,220,224
+DB 102,15,56,220,232
+ movups xmm0,XMMWORD[((160-120))+rsi]
+
+ jb NEAR $L$enc4x_tail
+
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+ movups xmm1,XMMWORD[((176-120))+rsi]
+
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+DB 102,15,56,220,224
+DB 102,15,56,220,232
+ movups xmm0,XMMWORD[((192-120))+rsi]
+
+ je NEAR $L$enc4x_tail
+
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+ movups xmm1,XMMWORD[((208-120))+rsi]
+
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+DB 102,15,56,220,224
+DB 102,15,56,220,232
+ movups xmm0,XMMWORD[((224-120))+rsi]
+ jmp NEAR $L$enc4x_tail
+
+ALIGN 32
+$L$enc4x_tail:
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+ movdqu xmm6,XMMWORD[rbx*1+r8]
+ movdqu xmm1,XMMWORD[((16-120))+rsi]
+
+DB 102,15,56,221,208
+ movdqu xmm7,XMMWORD[rbx*1+r9]
+ pxor xmm6,xmm12
+DB 102,15,56,221,216
+ movdqu xmm8,XMMWORD[rbx*1+r10]
+ pxor xmm7,xmm12
+DB 102,15,56,221,224
+ movdqu xmm9,XMMWORD[rbx*1+r11]
+ pxor xmm8,xmm12
+DB 102,15,56,221,232
+ movdqu xmm0,XMMWORD[((32-120))+rsi]
+ pxor xmm9,xmm12
+
+ movups XMMWORD[(-16)+rbx*1+r12],xmm2
+ pxor xmm2,xmm6
+ movups XMMWORD[(-16)+rbx*1+r13],xmm3
+ pxor xmm3,xmm7
+ movups XMMWORD[(-16)+rbx*1+r14],xmm4
+ pxor xmm4,xmm8
+ movups XMMWORD[(-16)+rbx*1+r15],xmm5
+ pxor xmm5,xmm9
+
+ dec edx
+ jnz NEAR $L$oop_enc4x
+
+ mov rax,QWORD[16+rsp]
+
+ mov edx,DWORD[24+rsp]
+
+
+
+
+
+
+
+
+
+
+ lea rdi,[160+rdi]
+ dec edx
+ jnz NEAR $L$enc4x_loop_grande
+
+$L$enc4x_done:
+ movaps xmm6,XMMWORD[((-216))+rax]
+ movaps xmm7,XMMWORD[((-200))+rax]
+ movaps xmm8,XMMWORD[((-184))+rax]
+ movaps xmm9,XMMWORD[((-168))+rax]
+ movaps xmm10,XMMWORD[((-152))+rax]
+ movaps xmm11,XMMWORD[((-136))+rax]
+ movaps xmm12,XMMWORD[((-120))+rax]
+
+
+
+ mov r15,QWORD[((-48))+rax]
+
+ mov r14,QWORD[((-40))+rax]
+
+ mov r13,QWORD[((-32))+rax]
+
+ mov r12,QWORD[((-24))+rax]
+
+ mov rbp,QWORD[((-16))+rax]
+
+ mov rbx,QWORD[((-8))+rax]
+
+ lea rsp,[rax]
+
+$L$enc4x_epilogue:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_aesni_multi_cbc_encrypt:
+
+global aesni_multi_cbc_decrypt
+
+ALIGN 32
+aesni_multi_cbc_decrypt:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_aesni_multi_cbc_decrypt:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+
+ mov rax,rsp
+
+ push rbx
+
+ push rbp
+
+ push r12
+
+ push r13
+
+ push r14
+
+ push r15
+
+ lea rsp,[((-168))+rsp]
+ movaps XMMWORD[rsp],xmm6
+ movaps XMMWORD[16+rsp],xmm7
+ movaps XMMWORD[32+rsp],xmm8
+ movaps XMMWORD[48+rsp],xmm9
+ movaps XMMWORD[64+rsp],xmm10
+ movaps XMMWORD[80+rsp],xmm11
+ movaps XMMWORD[96+rsp],xmm12
+ movaps XMMWORD[(-104)+rax],xmm13
+ movaps XMMWORD[(-88)+rax],xmm14
+ movaps XMMWORD[(-72)+rax],xmm15
+
+
+
+
+
+
+ sub rsp,48
+ and rsp,-64
+ mov QWORD[16+rsp],rax
+
+
+$L$dec4x_body:
+ movdqu xmm12,XMMWORD[rsi]
+ lea rsi,[120+rsi]
+ lea rdi,[80+rdi]
+
+$L$dec4x_loop_grande:
+ mov DWORD[24+rsp],edx
+ xor edx,edx
+ mov ecx,DWORD[((-64))+rdi]
+ mov r8,QWORD[((-80))+rdi]
+ cmp ecx,edx
+ mov r12,QWORD[((-72))+rdi]
+ cmovg edx,ecx
+ test ecx,ecx
+ movdqu xmm6,XMMWORD[((-56))+rdi]
+ mov DWORD[32+rsp],ecx
+ cmovle r8,rsp
+ mov ecx,DWORD[((-24))+rdi]
+ mov r9,QWORD[((-40))+rdi]
+ cmp ecx,edx
+ mov r13,QWORD[((-32))+rdi]
+ cmovg edx,ecx
+ test ecx,ecx
+ movdqu xmm7,XMMWORD[((-16))+rdi]
+ mov DWORD[36+rsp],ecx
+ cmovle r9,rsp
+ mov ecx,DWORD[16+rdi]
+ mov r10,QWORD[rdi]
+ cmp ecx,edx
+ mov r14,QWORD[8+rdi]
+ cmovg edx,ecx
+ test ecx,ecx
+ movdqu xmm8,XMMWORD[24+rdi]
+ mov DWORD[40+rsp],ecx
+ cmovle r10,rsp
+ mov ecx,DWORD[56+rdi]
+ mov r11,QWORD[40+rdi]
+ cmp ecx,edx
+ mov r15,QWORD[48+rdi]
+ cmovg edx,ecx
+ test ecx,ecx
+ movdqu xmm9,XMMWORD[64+rdi]
+ mov DWORD[44+rsp],ecx
+ cmovle r11,rsp
+ test edx,edx
+ jz NEAR $L$dec4x_done
+
+ movups xmm1,XMMWORD[((16-120))+rsi]
+ movups xmm0,XMMWORD[((32-120))+rsi]
+ mov eax,DWORD[((240-120))+rsi]
+ movdqu xmm2,XMMWORD[r8]
+ movdqu xmm3,XMMWORD[r9]
+ pxor xmm2,xmm12
+ movdqu xmm4,XMMWORD[r10]
+ pxor xmm3,xmm12
+ movdqu xmm5,XMMWORD[r11]
+ pxor xmm4,xmm12
+ pxor xmm5,xmm12
+ movdqa xmm10,XMMWORD[32+rsp]
+ xor rbx,rbx
+ jmp NEAR $L$oop_dec4x
+
+ALIGN 32
+$L$oop_dec4x:
+ add rbx,16
+ lea rbp,[16+rsp]
+ mov ecx,1
+ sub rbp,rbx
+
+DB 102,15,56,222,209
+ prefetcht0 [31+rbx*1+r8]
+ prefetcht0 [31+rbx*1+r9]
+DB 102,15,56,222,217
+ prefetcht0 [31+rbx*1+r10]
+ prefetcht0 [31+rbx*1+r11]
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+ movups xmm1,XMMWORD[((48-120))+rsi]
+ cmp ecx,DWORD[32+rsp]
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+DB 102,15,56,222,224
+ cmovge r8,rbp
+ cmovg r12,rbp
+DB 102,15,56,222,232
+ movups xmm0,XMMWORD[((-56))+rsi]
+ cmp ecx,DWORD[36+rsp]
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+ cmovge r9,rbp
+ cmovg r13,rbp
+DB 102,15,56,222,233
+ movups xmm1,XMMWORD[((-40))+rsi]
+ cmp ecx,DWORD[40+rsp]
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+DB 102,15,56,222,224
+ cmovge r10,rbp
+ cmovg r14,rbp
+DB 102,15,56,222,232
+ movups xmm0,XMMWORD[((-24))+rsi]
+ cmp ecx,DWORD[44+rsp]
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+ cmovge r11,rbp
+ cmovg r15,rbp
+DB 102,15,56,222,233
+ movups xmm1,XMMWORD[((-8))+rsi]
+ movdqa xmm11,xmm10
+DB 102,15,56,222,208
+ prefetcht0 [15+rbx*1+r12]
+ prefetcht0 [15+rbx*1+r13]
+DB 102,15,56,222,216
+ prefetcht0 [15+rbx*1+r14]
+ prefetcht0 [15+rbx*1+r15]
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+ movups xmm0,XMMWORD[((128-120))+rsi]
+ pxor xmm12,xmm12
+
+DB 102,15,56,222,209
+ pcmpgtd xmm11,xmm12
+ movdqu xmm12,XMMWORD[((-120))+rsi]
+DB 102,15,56,222,217
+ paddd xmm10,xmm11
+ movdqa XMMWORD[32+rsp],xmm10
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+ movups xmm1,XMMWORD[((144-120))+rsi]
+
+ cmp eax,11
+
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+ movups xmm0,XMMWORD[((160-120))+rsi]
+
+ jb NEAR $L$dec4x_tail
+
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+ movups xmm1,XMMWORD[((176-120))+rsi]
+
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+ movups xmm0,XMMWORD[((192-120))+rsi]
+
+ je NEAR $L$dec4x_tail
+
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+ movups xmm1,XMMWORD[((208-120))+rsi]
+
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+ movups xmm0,XMMWORD[((224-120))+rsi]
+ jmp NEAR $L$dec4x_tail
+
+ALIGN 32
+$L$dec4x_tail:
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+ pxor xmm6,xmm0
+ pxor xmm7,xmm0
+DB 102,15,56,222,233
+ movdqu xmm1,XMMWORD[((16-120))+rsi]
+ pxor xmm8,xmm0
+ pxor xmm9,xmm0
+ movdqu xmm0,XMMWORD[((32-120))+rsi]
+
+DB 102,15,56,223,214
+DB 102,15,56,223,223
+ movdqu xmm6,XMMWORD[((-16))+rbx*1+r8]
+ movdqu xmm7,XMMWORD[((-16))+rbx*1+r9]
+DB 102,65,15,56,223,224
+DB 102,65,15,56,223,233
+ movdqu xmm8,XMMWORD[((-16))+rbx*1+r10]
+ movdqu xmm9,XMMWORD[((-16))+rbx*1+r11]
+
+ movups XMMWORD[(-16)+rbx*1+r12],xmm2
+ movdqu xmm2,XMMWORD[rbx*1+r8]
+ movups XMMWORD[(-16)+rbx*1+r13],xmm3
+ movdqu xmm3,XMMWORD[rbx*1+r9]
+ pxor xmm2,xmm12
+ movups XMMWORD[(-16)+rbx*1+r14],xmm4
+ movdqu xmm4,XMMWORD[rbx*1+r10]
+ pxor xmm3,xmm12
+ movups XMMWORD[(-16)+rbx*1+r15],xmm5
+ movdqu xmm5,XMMWORD[rbx*1+r11]
+ pxor xmm4,xmm12
+ pxor xmm5,xmm12
+
+ dec edx
+ jnz NEAR $L$oop_dec4x
+
+ mov rax,QWORD[16+rsp]
+
+ mov edx,DWORD[24+rsp]
+
+ lea rdi,[160+rdi]
+ dec edx
+ jnz NEAR $L$dec4x_loop_grande
+
+$L$dec4x_done:
+ movaps xmm6,XMMWORD[((-216))+rax]
+ movaps xmm7,XMMWORD[((-200))+rax]
+ movaps xmm8,XMMWORD[((-184))+rax]
+ movaps xmm9,XMMWORD[((-168))+rax]
+ movaps xmm10,XMMWORD[((-152))+rax]
+ movaps xmm11,XMMWORD[((-136))+rax]
+ movaps xmm12,XMMWORD[((-120))+rax]
+
+
+
+ mov r15,QWORD[((-48))+rax]
+
+ mov r14,QWORD[((-40))+rax]
+
+ mov r13,QWORD[((-32))+rax]
+
+ mov r12,QWORD[((-24))+rax]
+
+ mov rbp,QWORD[((-16))+rax]
+
+ mov rbx,QWORD[((-8))+rax]
+
+ lea rsp,[rax]
+
+$L$dec4x_epilogue:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_aesni_multi_cbc_decrypt:
+EXTERN __imp_RtlVirtualUnwind
+
+ALIGN 16
+se_handler:
+ push rsi
+ push rdi
+ push rbx
+ push rbp
+ push r12
+ push r13
+ push r14
+ push r15
+ pushfq
+ sub rsp,64
+
+ mov rax,QWORD[120+r8]
+ mov rbx,QWORD[248+r8]
+
+ mov rsi,QWORD[8+r9]
+ mov r11,QWORD[56+r9]
+
+ mov r10d,DWORD[r11]
+ lea r10,[r10*1+rsi]
+ cmp rbx,r10
+ jb NEAR $L$in_prologue
+
+ mov rax,QWORD[152+r8]
+
+ mov r10d,DWORD[4+r11]
+ lea r10,[r10*1+rsi]
+ cmp rbx,r10
+ jae NEAR $L$in_prologue
+
+ mov rax,QWORD[16+rax]
+
+ mov rbx,QWORD[((-8))+rax]
+ mov rbp,QWORD[((-16))+rax]
+ mov r12,QWORD[((-24))+rax]
+ mov r13,QWORD[((-32))+rax]
+ mov r14,QWORD[((-40))+rax]
+ mov r15,QWORD[((-48))+rax]
+ mov QWORD[144+r8],rbx
+ mov QWORD[160+r8],rbp
+ mov QWORD[216+r8],r12
+ mov QWORD[224+r8],r13
+ mov QWORD[232+r8],r14
+ mov QWORD[240+r8],r15
+
+ lea rsi,[((-56-160))+rax]
+ lea rdi,[512+r8]
+ mov ecx,20
+ DD 0xa548f3fc
+
+$L$in_prologue:
+ mov rdi,QWORD[8+rax]
+ mov rsi,QWORD[16+rax]
+ mov QWORD[152+r8],rax
+ mov QWORD[168+r8],rsi
+ mov QWORD[176+r8],rdi
+
+ mov rdi,QWORD[40+r9]
+ mov rsi,r8
+ mov ecx,154
+ DD 0xa548f3fc
+
+ mov rsi,r9
+ xor rcx,rcx
+ mov rdx,QWORD[8+rsi]
+ mov r8,QWORD[rsi]
+ mov r9,QWORD[16+rsi]
+ mov r10,QWORD[40+rsi]
+ lea r11,[56+rsi]
+ lea r12,[24+rsi]
+ mov QWORD[32+rsp],r10
+ mov QWORD[40+rsp],r11
+ mov QWORD[48+rsp],r12
+ mov QWORD[56+rsp],rcx
+ call QWORD[__imp_RtlVirtualUnwind]
+
+ mov eax,1
+ add rsp,64
+ popfq
+ pop r15
+ pop r14
+ pop r13
+ pop r12
+ pop rbp
+ pop rbx
+ pop rdi
+ pop rsi
+ DB 0F3h,0C3h ;repret
+
+
+section .pdata rdata align=4
+ALIGN 4
+ DD $L$SEH_begin_aesni_multi_cbc_encrypt wrt ..imagebase
+ DD $L$SEH_end_aesni_multi_cbc_encrypt wrt ..imagebase
+ DD $L$SEH_info_aesni_multi_cbc_encrypt wrt ..imagebase
+ DD $L$SEH_begin_aesni_multi_cbc_decrypt wrt ..imagebase
+ DD $L$SEH_end_aesni_multi_cbc_decrypt wrt ..imagebase
+ DD $L$SEH_info_aesni_multi_cbc_decrypt wrt ..imagebase
+section .xdata rdata align=8
+ALIGN 8
+$L$SEH_info_aesni_multi_cbc_encrypt:
+DB 9,0,0,0
+ DD se_handler wrt ..imagebase
+ DD $L$enc4x_body wrt ..imagebase,$L$enc4x_epilogue wrt ..imagebase
+$L$SEH_info_aesni_multi_cbc_decrypt:
+DB 9,0,0,0
+ DD se_handler wrt ..imagebase
+ DD $L$dec4x_body wrt ..imagebase,$L$dec4x_epilogue wrt ..imagebase
diff --git a/CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-sha1-x86_64.nasm b/CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-sha1-x86_64.nasm
new file mode 100644
index 0000000000..f4fd9ca50d
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-sha1-x86_64.nasm
@@ -0,0 +1,1916 @@
+; WARNING: do not edit!
+; Generated from openssl/crypto/aes/asm/aesni-sha1-x86_64.pl
+;
+; Copyright 2011-2020 The OpenSSL Project Authors. All Rights Reserved.
+;
+; Licensed under the OpenSSL license (the "License"). You may not use
+; this file except in compliance with the License. You can obtain a copy
+; in the file LICENSE in the source distribution or at
+; https://www.openssl.org/source/license.html
+
+default rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section .text code align=64
+
+EXTERN OPENSSL_ia32cap_P
+
+global aesni_cbc_sha1_enc
+
+ALIGN 32
+aesni_cbc_sha1_enc:
+
+
+ mov r10d,DWORD[((OPENSSL_ia32cap_P+0))]
+ mov r11,QWORD[((OPENSSL_ia32cap_P+4))]
+ bt r11,61
+ jc NEAR aesni_cbc_sha1_enc_shaext
+ jmp NEAR aesni_cbc_sha1_enc_ssse3
+ DB 0F3h,0C3h ;repret
+
+
+
+ALIGN 32
+aesni_cbc_sha1_enc_ssse3:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_aesni_cbc_sha1_enc_ssse3:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+ mov rcx,r9
+ mov r8,QWORD[40+rsp]
+ mov r9,QWORD[48+rsp]
+
+
+
+ mov r10,QWORD[56+rsp]
+
+
+ push rbx
+
+ push rbp
+
+ push r12
+
+ push r13
+
+ push r14
+
+ push r15
+
+ lea rsp,[((-264))+rsp]
+
+
+
+ movaps XMMWORD[(96+0)+rsp],xmm6
+ movaps XMMWORD[(96+16)+rsp],xmm7
+ movaps XMMWORD[(96+32)+rsp],xmm8
+ movaps XMMWORD[(96+48)+rsp],xmm9
+ movaps XMMWORD[(96+64)+rsp],xmm10
+ movaps XMMWORD[(96+80)+rsp],xmm11
+ movaps XMMWORD[(96+96)+rsp],xmm12
+ movaps XMMWORD[(96+112)+rsp],xmm13
+ movaps XMMWORD[(96+128)+rsp],xmm14
+ movaps XMMWORD[(96+144)+rsp],xmm15
+$L$prologue_ssse3:
+ mov r12,rdi
+ mov r13,rsi
+ mov r14,rdx
+ lea r15,[112+rcx]
+ movdqu xmm2,XMMWORD[r8]
+ mov QWORD[88+rsp],r8
+ shl r14,6
+ sub r13,r12
+ mov r8d,DWORD[((240-112))+r15]
+ add r14,r10
+
+ lea r11,[K_XX_XX]
+ mov eax,DWORD[r9]
+ mov ebx,DWORD[4+r9]
+ mov ecx,DWORD[8+r9]
+ mov edx,DWORD[12+r9]
+ mov esi,ebx
+ mov ebp,DWORD[16+r9]
+ mov edi,ecx
+ xor edi,edx
+ and esi,edi
+
+ movdqa xmm3,XMMWORD[64+r11]
+ movdqa xmm13,XMMWORD[r11]
+ movdqu xmm4,XMMWORD[r10]
+ movdqu xmm5,XMMWORD[16+r10]
+ movdqu xmm6,XMMWORD[32+r10]
+ movdqu xmm7,XMMWORD[48+r10]
+DB 102,15,56,0,227
+DB 102,15,56,0,235
+DB 102,15,56,0,243
+ add r10,64
+ paddd xmm4,xmm13
+DB 102,15,56,0,251
+ paddd xmm5,xmm13
+ paddd xmm6,xmm13
+ movdqa XMMWORD[rsp],xmm4
+ psubd xmm4,xmm13
+ movdqa XMMWORD[16+rsp],xmm5
+ psubd xmm5,xmm13
+ movdqa XMMWORD[32+rsp],xmm6
+ psubd xmm6,xmm13
+ movups xmm15,XMMWORD[((-112))+r15]
+ movups xmm0,XMMWORD[((16-112))+r15]
+ jmp NEAR $L$oop_ssse3
+ALIGN 32
+$L$oop_ssse3:
+ ror ebx,2
+ movups xmm14,XMMWORD[r12]
+ xorps xmm14,xmm15
+ xorps xmm2,xmm14
+ movups xmm1,XMMWORD[((-80))+r15]
+DB 102,15,56,220,208
+ pshufd xmm8,xmm4,238
+ xor esi,edx
+ movdqa xmm12,xmm7
+ paddd xmm13,xmm7
+ mov edi,eax
+ add ebp,DWORD[rsp]
+ punpcklqdq xmm8,xmm5
+ xor ebx,ecx
+ rol eax,5
+ add ebp,esi
+ psrldq xmm12,4
+ and edi,ebx
+ xor ebx,ecx
+ pxor xmm8,xmm4
+ add ebp,eax
+ ror eax,7
+ pxor xmm12,xmm6
+ xor edi,ecx
+ mov esi,ebp
+ add edx,DWORD[4+rsp]
+ pxor xmm8,xmm12
+ xor eax,ebx
+ rol ebp,5
+ movdqa XMMWORD[48+rsp],xmm13
+ add edx,edi
+ movups xmm0,XMMWORD[((-64))+r15]
+DB 102,15,56,220,209
+ and esi,eax
+ movdqa xmm3,xmm8
+ xor eax,ebx
+ add edx,ebp
+ ror ebp,7
+ movdqa xmm12,xmm8
+ xor esi,ebx
+ pslldq xmm3,12
+ paddd xmm8,xmm8
+ mov edi,edx
+ add ecx,DWORD[8+rsp]
+ psrld xmm12,31
+ xor ebp,eax
+ rol edx,5
+ add ecx,esi
+ movdqa xmm13,xmm3
+ and edi,ebp
+ xor ebp,eax
+ psrld xmm3,30
+ add ecx,edx
+ ror edx,7
+ por xmm8,xmm12
+ xor edi,eax
+ mov esi,ecx
+ add ebx,DWORD[12+rsp]
+ movups xmm1,XMMWORD[((-48))+r15]
+DB 102,15,56,220,208
+ pslld xmm13,2
+ pxor xmm8,xmm3
+ xor edx,ebp
+ movdqa xmm3,XMMWORD[r11]
+ rol ecx,5
+ add ebx,edi
+ and esi,edx
+ pxor xmm8,xmm13
+ xor edx,ebp
+ add ebx,ecx
+ ror ecx,7
+ pshufd xmm9,xmm5,238
+ xor esi,ebp
+ movdqa xmm13,xmm8
+ paddd xmm3,xmm8
+ mov edi,ebx
+ add eax,DWORD[16+rsp]
+ punpcklqdq xmm9,xmm6
+ xor ecx,edx
+ rol ebx,5
+ add eax,esi
+ psrldq xmm13,4
+ and edi,ecx
+ xor ecx,edx
+ pxor xmm9,xmm5
+ add eax,ebx
+ ror ebx,7
+ movups xmm0,XMMWORD[((-32))+r15]
+DB 102,15,56,220,209
+ pxor xmm13,xmm7
+ xor edi,edx
+ mov esi,eax
+ add ebp,DWORD[20+rsp]
+ pxor xmm9,xmm13
+ xor ebx,ecx
+ rol eax,5
+ movdqa XMMWORD[rsp],xmm3
+ add ebp,edi
+ and esi,ebx
+ movdqa xmm12,xmm9
+ xor ebx,ecx
+ add ebp,eax
+ ror eax,7
+ movdqa xmm13,xmm9
+ xor esi,ecx
+ pslldq xmm12,12
+ paddd xmm9,xmm9
+ mov edi,ebp
+ add edx,DWORD[24+rsp]
+ psrld xmm13,31
+ xor eax,ebx
+ rol ebp,5
+ add edx,esi
+ movups xmm1,XMMWORD[((-16))+r15]
+DB 102,15,56,220,208
+ movdqa xmm3,xmm12
+ and edi,eax
+ xor eax,ebx
+ psrld xmm12,30
+ add edx,ebp
+ ror ebp,7
+ por xmm9,xmm13
+ xor edi,ebx
+ mov esi,edx
+ add ecx,DWORD[28+rsp]
+ pslld xmm3,2
+ pxor xmm9,xmm12
+ xor ebp,eax
+ movdqa xmm12,XMMWORD[16+r11]
+ rol edx,5
+ add ecx,edi
+ and esi,ebp
+ pxor xmm9,xmm3
+ xor ebp,eax
+ add ecx,edx
+ ror edx,7
+ pshufd xmm10,xmm6,238
+ xor esi,eax
+ movdqa xmm3,xmm9
+ paddd xmm12,xmm9
+ mov edi,ecx
+ add ebx,DWORD[32+rsp]
+ movups xmm0,XMMWORD[r15]
+DB 102,15,56,220,209
+ punpcklqdq xmm10,xmm7
+ xor edx,ebp
+ rol ecx,5
+ add ebx,esi
+ psrldq xmm3,4
+ and edi,edx
+ xor edx,ebp
+ pxor xmm10,xmm6
+ add ebx,ecx
+ ror ecx,7
+ pxor xmm3,xmm8
+ xor edi,ebp
+ mov esi,ebx
+ add eax,DWORD[36+rsp]
+ pxor xmm10,xmm3
+ xor ecx,edx
+ rol ebx,5
+ movdqa XMMWORD[16+rsp],xmm12
+ add eax,edi
+ and esi,ecx
+ movdqa xmm13,xmm10
+ xor ecx,edx
+ add eax,ebx
+ ror ebx,7
+ movups xmm1,XMMWORD[16+r15]
+DB 102,15,56,220,208
+ movdqa xmm3,xmm10
+ xor esi,edx
+ pslldq xmm13,12
+ paddd xmm10,xmm10
+ mov edi,eax
+ add ebp,DWORD[40+rsp]
+ psrld xmm3,31
+ xor ebx,ecx
+ rol eax,5
+ add ebp,esi
+ movdqa xmm12,xmm13
+ and edi,ebx
+ xor ebx,ecx
+ psrld xmm13,30
+ add ebp,eax
+ ror eax,7
+ por xmm10,xmm3
+ xor edi,ecx
+ mov esi,ebp
+ add edx,DWORD[44+rsp]
+ pslld xmm12,2
+ pxor xmm10,xmm13
+ xor eax,ebx
+ movdqa xmm13,XMMWORD[16+r11]
+ rol ebp,5
+ add edx,edi
+ movups xmm0,XMMWORD[32+r15]
+DB 102,15,56,220,209
+ and esi,eax
+ pxor xmm10,xmm12
+ xor eax,ebx
+ add edx,ebp
+ ror ebp,7
+ pshufd xmm11,xmm7,238
+ xor esi,ebx
+ movdqa xmm12,xmm10
+ paddd xmm13,xmm10
+ mov edi,edx
+ add ecx,DWORD[48+rsp]
+ punpcklqdq xmm11,xmm8
+ xor ebp,eax
+ rol edx,5
+ add ecx,esi
+ psrldq xmm12,4
+ and edi,ebp
+ xor ebp,eax
+ pxor xmm11,xmm7
+ add ecx,edx
+ ror edx,7
+ pxor xmm12,xmm9
+ xor edi,eax
+ mov esi,ecx
+ add ebx,DWORD[52+rsp]
+ movups xmm1,XMMWORD[48+r15]
+DB 102,15,56,220,208
+ pxor xmm11,xmm12
+ xor edx,ebp
+ rol ecx,5
+ movdqa XMMWORD[32+rsp],xmm13
+ add ebx,edi
+ and esi,edx
+ movdqa xmm3,xmm11
+ xor edx,ebp
+ add ebx,ecx
+ ror ecx,7
+ movdqa xmm12,xmm11
+ xor esi,ebp
+ pslldq xmm3,12
+ paddd xmm11,xmm11
+ mov edi,ebx
+ add eax,DWORD[56+rsp]
+ psrld xmm12,31
+ xor ecx,edx
+ rol ebx,5
+ add eax,esi
+ movdqa xmm13,xmm3
+ and edi,ecx
+ xor ecx,edx
+ psrld xmm3,30
+ add eax,ebx
+ ror ebx,7
+ cmp r8d,11
+ jb NEAR $L$aesenclast1
+ movups xmm0,XMMWORD[64+r15]
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[80+r15]
+DB 102,15,56,220,208
+ je NEAR $L$aesenclast1
+ movups xmm0,XMMWORD[96+r15]
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[112+r15]
+DB 102,15,56,220,208
+$L$aesenclast1:
+DB 102,15,56,221,209
+ movups xmm0,XMMWORD[((16-112))+r15]
+ por xmm11,xmm12
+ xor edi,edx
+ mov esi,eax
+ add ebp,DWORD[60+rsp]
+ pslld xmm13,2
+ pxor xmm11,xmm3
+ xor ebx,ecx
+ movdqa xmm3,XMMWORD[16+r11]
+ rol eax,5
+ add ebp,edi
+ and esi,ebx
+ pxor xmm11,xmm13
+ pshufd xmm13,xmm10,238
+ xor ebx,ecx
+ add ebp,eax
+ ror eax,7
+ pxor xmm4,xmm8
+ xor esi,ecx
+ mov edi,ebp
+ add edx,DWORD[rsp]
+ punpcklqdq xmm13,xmm11
+ xor eax,ebx
+ rol ebp,5
+ pxor xmm4,xmm5
+ add edx,esi
+ movups xmm14,XMMWORD[16+r12]
+ xorps xmm14,xmm15
+ movups XMMWORD[r13*1+r12],xmm2
+ xorps xmm2,xmm14
+ movups xmm1,XMMWORD[((-80))+r15]
+DB 102,15,56,220,208
+ and edi,eax
+ movdqa xmm12,xmm3
+ xor eax,ebx
+ paddd xmm3,xmm11
+ add edx,ebp
+ pxor xmm4,xmm13
+ ror ebp,7
+ xor edi,ebx
+ mov esi,edx
+ add ecx,DWORD[4+rsp]
+ movdqa xmm13,xmm4
+ xor ebp,eax
+ rol edx,5
+ movdqa XMMWORD[48+rsp],xmm3
+ add ecx,edi
+ and esi,ebp
+ xor ebp,eax
+ pslld xmm4,2
+ add ecx,edx
+ ror edx,7
+ psrld xmm13,30
+ xor esi,eax
+ mov edi,ecx
+ add ebx,DWORD[8+rsp]
+ movups xmm0,XMMWORD[((-64))+r15]
+DB 102,15,56,220,209
+ por xmm4,xmm13
+ xor edx,ebp
+ rol ecx,5
+ pshufd xmm3,xmm11,238
+ add ebx,esi
+ and edi,edx
+ xor edx,ebp
+ add ebx,ecx
+ add eax,DWORD[12+rsp]
+ xor edi,ebp
+ mov esi,ebx
+ rol ebx,5
+ add eax,edi
+ xor esi,edx
+ ror ecx,7
+ add eax,ebx
+ pxor xmm5,xmm9
+ add ebp,DWORD[16+rsp]
+ movups xmm1,XMMWORD[((-48))+r15]
+DB 102,15,56,220,208
+ xor esi,ecx
+ punpcklqdq xmm3,xmm4
+ mov edi,eax
+ rol eax,5
+ pxor xmm5,xmm6
+ add ebp,esi
+ xor edi,ecx
+ movdqa xmm13,xmm12
+ ror ebx,7
+ paddd xmm12,xmm4
+ add ebp,eax
+ pxor xmm5,xmm3
+ add edx,DWORD[20+rsp]
+ xor edi,ebx
+ mov esi,ebp
+ rol ebp,5
+ movdqa xmm3,xmm5
+ add edx,edi
+ xor esi,ebx
+ movdqa XMMWORD[rsp],xmm12
+ ror eax,7
+ add edx,ebp
+ add ecx,DWORD[24+rsp]
+ pslld xmm5,2
+ xor esi,eax
+ mov edi,edx
+ psrld xmm3,30
+ rol edx,5
+ add ecx,esi
+ movups xmm0,XMMWORD[((-32))+r15]
+DB 102,15,56,220,209
+ xor edi,eax
+ ror ebp,7
+ por xmm5,xmm3
+ add ecx,edx
+ add ebx,DWORD[28+rsp]
+ pshufd xmm12,xmm4,238
+ xor edi,ebp
+ mov esi,ecx
+ rol ecx,5
+ add ebx,edi
+ xor esi,ebp
+ ror edx,7
+ add ebx,ecx
+ pxor xmm6,xmm10
+ add eax,DWORD[32+rsp]
+ xor esi,edx
+ punpcklqdq xmm12,xmm5
+ mov edi,ebx
+ rol ebx,5
+ pxor xmm6,xmm7
+ add eax,esi
+ xor edi,edx
+ movdqa xmm3,XMMWORD[32+r11]
+ ror ecx,7
+ paddd xmm13,xmm5
+ add eax,ebx
+ pxor xmm6,xmm12
+ add ebp,DWORD[36+rsp]
+ movups xmm1,XMMWORD[((-16))+r15]
+DB 102,15,56,220,208
+ xor edi,ecx
+ mov esi,eax
+ rol eax,5
+ movdqa xmm12,xmm6
+ add ebp,edi
+ xor esi,ecx
+ movdqa XMMWORD[16+rsp],xmm13
+ ror ebx,7
+ add ebp,eax
+ add edx,DWORD[40+rsp]
+ pslld xmm6,2
+ xor esi,ebx
+ mov edi,ebp
+ psrld xmm12,30
+ rol ebp,5
+ add edx,esi
+ xor edi,ebx
+ ror eax,7
+ por xmm6,xmm12
+ add edx,ebp
+ add ecx,DWORD[44+rsp]
+ pshufd xmm13,xmm5,238
+ xor edi,eax
+ mov esi,edx
+ rol edx,5
+ add ecx,edi
+ movups xmm0,XMMWORD[r15]
+DB 102,15,56,220,209
+ xor esi,eax
+ ror ebp,7
+ add ecx,edx
+ pxor xmm7,xmm11
+ add ebx,DWORD[48+rsp]
+ xor esi,ebp
+ punpcklqdq xmm13,xmm6
+ mov edi,ecx
+ rol ecx,5
+ pxor xmm7,xmm8
+ add ebx,esi
+ xor edi,ebp
+ movdqa xmm12,xmm3
+ ror edx,7
+ paddd xmm3,xmm6
+ add ebx,ecx
+ pxor xmm7,xmm13
+ add eax,DWORD[52+rsp]
+ xor edi,edx
+ mov esi,ebx
+ rol ebx,5
+ movdqa xmm13,xmm7
+ add eax,edi
+ xor esi,edx
+ movdqa XMMWORD[32+rsp],xmm3
+ ror ecx,7
+ add eax,ebx
+ add ebp,DWORD[56+rsp]
+ movups xmm1,XMMWORD[16+r15]
+DB 102,15,56,220,208
+ pslld xmm7,2
+ xor esi,ecx
+ mov edi,eax
+ psrld xmm13,30
+ rol eax,5
+ add ebp,esi
+ xor edi,ecx
+ ror ebx,7
+ por xmm7,xmm13
+ add ebp,eax
+ add edx,DWORD[60+rsp]
+ pshufd xmm3,xmm6,238
+ xor edi,ebx
+ mov esi,ebp
+ rol ebp,5
+ add edx,edi
+ xor esi,ebx
+ ror eax,7
+ add edx,ebp
+ pxor xmm8,xmm4
+ add ecx,DWORD[rsp]
+ xor esi,eax
+ punpcklqdq xmm3,xmm7
+ mov edi,edx
+ rol edx,5
+ pxor xmm8,xmm9
+ add ecx,esi
+ movups xmm0,XMMWORD[32+r15]
+DB 102,15,56,220,209
+ xor edi,eax
+ movdqa xmm13,xmm12
+ ror ebp,7
+ paddd xmm12,xmm7
+ add ecx,edx
+ pxor xmm8,xmm3
+ add ebx,DWORD[4+rsp]
+ xor edi,ebp
+ mov esi,ecx
+ rol ecx,5
+ movdqa xmm3,xmm8
+ add ebx,edi
+ xor esi,ebp
+ movdqa XMMWORD[48+rsp],xmm12
+ ror edx,7
+ add ebx,ecx
+ add eax,DWORD[8+rsp]
+ pslld xmm8,2
+ xor esi,edx
+ mov edi,ebx
+ psrld xmm3,30
+ rol ebx,5
+ add eax,esi
+ xor edi,edx
+ ror ecx,7
+ por xmm8,xmm3
+ add eax,ebx
+ add ebp,DWORD[12+rsp]
+ movups xmm1,XMMWORD[48+r15]
+DB 102,15,56,220,208
+ pshufd xmm12,xmm7,238
+ xor edi,ecx
+ mov esi,eax
+ rol eax,5
+ add ebp,edi
+ xor esi,ecx
+ ror ebx,7
+ add ebp,eax
+ pxor xmm9,xmm5
+ add edx,DWORD[16+rsp]
+ xor esi,ebx
+ punpcklqdq xmm12,xmm8
+ mov edi,ebp
+ rol ebp,5
+ pxor xmm9,xmm10
+ add edx,esi
+ xor edi,ebx
+ movdqa xmm3,xmm13
+ ror eax,7
+ paddd xmm13,xmm8
+ add edx,ebp
+ pxor xmm9,xmm12
+ add ecx,DWORD[20+rsp]
+ xor edi,eax
+ mov esi,edx
+ rol edx,5
+ movdqa xmm12,xmm9
+ add ecx,edi
+ cmp r8d,11
+ jb NEAR $L$aesenclast2
+ movups xmm0,XMMWORD[64+r15]
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[80+r15]
+DB 102,15,56,220,208
+ je NEAR $L$aesenclast2
+ movups xmm0,XMMWORD[96+r15]
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[112+r15]
+DB 102,15,56,220,208
+$L$aesenclast2:
+DB 102,15,56,221,209
+ movups xmm0,XMMWORD[((16-112))+r15]
+ xor esi,eax
+ movdqa XMMWORD[rsp],xmm13
+ ror ebp,7
+ add ecx,edx
+ add ebx,DWORD[24+rsp]
+ pslld xmm9,2
+ xor esi,ebp
+ mov edi,ecx
+ psrld xmm12,30
+ rol ecx,5
+ add ebx,esi
+ xor edi,ebp
+ ror edx,7
+ por xmm9,xmm12
+ add ebx,ecx
+ add eax,DWORD[28+rsp]
+ pshufd xmm13,xmm8,238
+ ror ecx,7
+ mov esi,ebx
+ xor edi,edx
+ rol ebx,5
+ add eax,edi
+ xor esi,ecx
+ xor ecx,edx
+ add eax,ebx
+ pxor xmm10,xmm6
+ add ebp,DWORD[32+rsp]
+ movups xmm14,XMMWORD[32+r12]
+ xorps xmm14,xmm15
+ movups XMMWORD[16+r12*1+r13],xmm2
+ xorps xmm2,xmm14
+ movups xmm1,XMMWORD[((-80))+r15]
+DB 102,15,56,220,208
+ and esi,ecx
+ xor ecx,edx
+ ror ebx,7
+ punpcklqdq xmm13,xmm9
+ mov edi,eax
+ xor esi,ecx
+ pxor xmm10,xmm11
+ rol eax,5
+ add ebp,esi
+ movdqa xmm12,xmm3
+ xor edi,ebx
+ paddd xmm3,xmm9
+ xor ebx,ecx
+ pxor xmm10,xmm13
+ add ebp,eax
+ add edx,DWORD[36+rsp]
+ and edi,ebx
+ xor ebx,ecx
+ ror eax,7
+ movdqa xmm13,xmm10
+ mov esi,ebp
+ xor edi,ebx
+ movdqa XMMWORD[16+rsp],xmm3
+ rol ebp,5
+ add edx,edi
+ movups xmm0,XMMWORD[((-64))+r15]
+DB 102,15,56,220,209
+ xor esi,eax
+ pslld xmm10,2
+ xor eax,ebx
+ add edx,ebp
+ psrld xmm13,30
+ add ecx,DWORD[40+rsp]
+ and esi,eax
+ xor eax,ebx
+ por xmm10,xmm13
+ ror ebp,7
+ mov edi,edx
+ xor esi,eax
+ rol edx,5
+ pshufd xmm3,xmm9,238
+ add ecx,esi
+ xor edi,ebp
+ xor ebp,eax
+ add ecx,edx
+ add ebx,DWORD[44+rsp]
+ and edi,ebp
+ xor ebp,eax
+ ror edx,7
+ movups xmm1,XMMWORD[((-48))+r15]
+DB 102,15,56,220,208
+ mov esi,ecx
+ xor edi,ebp
+ rol ecx,5
+ add ebx,edi
+ xor esi,edx
+ xor edx,ebp
+ add ebx,ecx
+ pxor xmm11,xmm7
+ add eax,DWORD[48+rsp]
+ and esi,edx
+ xor edx,ebp
+ ror ecx,7
+ punpcklqdq xmm3,xmm10
+ mov edi,ebx
+ xor esi,edx
+ pxor xmm11,xmm4
+ rol ebx,5
+ add eax,esi
+ movdqa xmm13,XMMWORD[48+r11]
+ xor edi,ecx
+ paddd xmm12,xmm10
+ xor ecx,edx
+ pxor xmm11,xmm3
+ add eax,ebx
+ add ebp,DWORD[52+rsp]
+ movups xmm0,XMMWORD[((-32))+r15]
+DB 102,15,56,220,209
+ and edi,ecx
+ xor ecx,edx
+ ror ebx,7
+ movdqa xmm3,xmm11
+ mov esi,eax
+ xor edi,ecx
+ movdqa XMMWORD[32+rsp],xmm12
+ rol eax,5
+ add ebp,edi
+ xor esi,ebx
+ pslld xmm11,2
+ xor ebx,ecx
+ add ebp,eax
+ psrld xmm3,30
+ add edx,DWORD[56+rsp]
+ and esi,ebx
+ xor ebx,ecx
+ por xmm11,xmm3
+ ror eax,7
+ mov edi,ebp
+ xor esi,ebx
+ rol ebp,5
+ pshufd xmm12,xmm10,238
+ add edx,esi
+ movups xmm1,XMMWORD[((-16))+r15]
+DB 102,15,56,220,208
+ xor edi,eax
+ xor eax,ebx
+ add edx,ebp
+ add ecx,DWORD[60+rsp]
+ and edi,eax
+ xor eax,ebx
+ ror ebp,7
+ mov esi,edx
+ xor edi,eax
+ rol edx,5
+ add ecx,edi
+ xor esi,ebp
+ xor ebp,eax
+ add ecx,edx
+ pxor xmm4,xmm8
+ add ebx,DWORD[rsp]
+ and esi,ebp
+ xor ebp,eax
+ ror edx,7
+ movups xmm0,XMMWORD[r15]
+DB 102,15,56,220,209
+ punpcklqdq xmm12,xmm11
+ mov edi,ecx
+ xor esi,ebp
+ pxor xmm4,xmm5
+ rol ecx,5
+ add ebx,esi
+ movdqa xmm3,xmm13
+ xor edi,edx
+ paddd xmm13,xmm11
+ xor edx,ebp
+ pxor xmm4,xmm12
+ add ebx,ecx
+ add eax,DWORD[4+rsp]
+ and edi,edx
+ xor edx,ebp
+ ror ecx,7
+ movdqa xmm12,xmm4
+ mov esi,ebx
+ xor edi,edx
+ movdqa XMMWORD[48+rsp],xmm13
+ rol ebx,5
+ add eax,edi
+ xor esi,ecx
+ pslld xmm4,2
+ xor ecx,edx
+ add eax,ebx
+ psrld xmm12,30
+ add ebp,DWORD[8+rsp]
+ movups xmm1,XMMWORD[16+r15]
+DB 102,15,56,220,208
+ and esi,ecx
+ xor ecx,edx
+ por xmm4,xmm12
+ ror ebx,7
+ mov edi,eax
+ xor esi,ecx
+ rol eax,5
+ pshufd xmm13,xmm11,238
+ add ebp,esi
+ xor edi,ebx
+ xor ebx,ecx
+ add ebp,eax
+ add edx,DWORD[12+rsp]
+ and edi,ebx
+ xor ebx,ecx
+ ror eax,7
+ mov esi,ebp
+ xor edi,ebx
+ rol ebp,5
+ add edx,edi
+ movups xmm0,XMMWORD[32+r15]
+DB 102,15,56,220,209
+ xor esi,eax
+ xor eax,ebx
+ add edx,ebp
+ pxor xmm5,xmm9
+ add ecx,DWORD[16+rsp]
+ and esi,eax
+ xor eax,ebx
+ ror ebp,7
+ punpcklqdq xmm13,xmm4
+ mov edi,edx
+ xor esi,eax
+ pxor xmm5,xmm6
+ rol edx,5
+ add ecx,esi
+ movdqa xmm12,xmm3
+ xor edi,ebp
+ paddd xmm3,xmm4
+ xor ebp,eax
+ pxor xmm5,xmm13
+ add ecx,edx
+ add ebx,DWORD[20+rsp]
+ and edi,ebp
+ xor ebp,eax
+ ror edx,7
+ movups xmm1,XMMWORD[48+r15]
+DB 102,15,56,220,208
+ movdqa xmm13,xmm5
+ mov esi,ecx
+ xor edi,ebp
+ movdqa XMMWORD[rsp],xmm3
+ rol ecx,5
+ add ebx,edi
+ xor esi,edx
+ pslld xmm5,2
+ xor edx,ebp
+ add ebx,ecx
+ psrld xmm13,30
+ add eax,DWORD[24+rsp]
+ and esi,edx
+ xor edx,ebp
+ por xmm5,xmm13
+ ror ecx,7
+ mov edi,ebx
+ xor esi,edx
+ rol ebx,5
+ pshufd xmm3,xmm4,238
+ add eax,esi
+ xor edi,ecx
+ xor ecx,edx
+ add eax,ebx
+ add ebp,DWORD[28+rsp]
+ cmp r8d,11
+ jb NEAR $L$aesenclast3
+ movups xmm0,XMMWORD[64+r15]
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[80+r15]
+DB 102,15,56,220,208
+ je NEAR $L$aesenclast3
+ movups xmm0,XMMWORD[96+r15]
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[112+r15]
+DB 102,15,56,220,208
+$L$aesenclast3:
+DB 102,15,56,221,209
+ movups xmm0,XMMWORD[((16-112))+r15]
+ and edi,ecx
+ xor ecx,edx
+ ror ebx,7
+ mov esi,eax
+ xor edi,ecx
+ rol eax,5
+ add ebp,edi
+ xor esi,ebx
+ xor ebx,ecx
+ add ebp,eax
+ pxor xmm6,xmm10
+ add edx,DWORD[32+rsp]
+ and esi,ebx
+ xor ebx,ecx
+ ror eax,7
+ punpcklqdq xmm3,xmm5
+ mov edi,ebp
+ xor esi,ebx
+ pxor xmm6,xmm7
+ rol ebp,5
+ add edx,esi
+ movups xmm14,XMMWORD[48+r12]
+ xorps xmm14,xmm15
+ movups XMMWORD[32+r12*1+r13],xmm2
+ xorps xmm2,xmm14
+ movups xmm1,XMMWORD[((-80))+r15]
+DB 102,15,56,220,208
+ movdqa xmm13,xmm12
+ xor edi,eax
+ paddd xmm12,xmm5
+ xor eax,ebx
+ pxor xmm6,xmm3
+ add edx,ebp
+ add ecx,DWORD[36+rsp]
+ and edi,eax
+ xor eax,ebx
+ ror ebp,7
+ movdqa xmm3,xmm6
+ mov esi,edx
+ xor edi,eax
+ movdqa XMMWORD[16+rsp],xmm12
+ rol edx,5
+ add ecx,edi
+ xor esi,ebp
+ pslld xmm6,2
+ xor ebp,eax
+ add ecx,edx
+ psrld xmm3,30
+ add ebx,DWORD[40+rsp]
+ and esi,ebp
+ xor ebp,eax
+ por xmm6,xmm3
+ ror edx,7
+ movups xmm0,XMMWORD[((-64))+r15]
+DB 102,15,56,220,209
+ mov edi,ecx
+ xor esi,ebp
+ rol ecx,5
+ pshufd xmm12,xmm5,238
+ add ebx,esi
+ xor edi,edx
+ xor edx,ebp
+ add ebx,ecx
+ add eax,DWORD[44+rsp]
+ and edi,edx
+ xor edx,ebp
+ ror ecx,7
+ mov esi,ebx
+ xor edi,edx
+ rol ebx,5
+ add eax,edi
+ xor esi,edx
+ add eax,ebx
+ pxor xmm7,xmm11
+ add ebp,DWORD[48+rsp]
+ movups xmm1,XMMWORD[((-48))+r15]
+DB 102,15,56,220,208
+ xor esi,ecx
+ punpcklqdq xmm12,xmm6
+ mov edi,eax
+ rol eax,5
+ pxor xmm7,xmm8
+ add ebp,esi
+ xor edi,ecx
+ movdqa xmm3,xmm13
+ ror ebx,7
+ paddd xmm13,xmm6
+ add ebp,eax
+ pxor xmm7,xmm12
+ add edx,DWORD[52+rsp]
+ xor edi,ebx
+ mov esi,ebp
+ rol ebp,5
+ movdqa xmm12,xmm7
+ add edx,edi
+ xor esi,ebx
+ movdqa XMMWORD[32+rsp],xmm13
+ ror eax,7
+ add edx,ebp
+ add ecx,DWORD[56+rsp]
+ pslld xmm7,2
+ xor esi,eax
+ mov edi,edx
+ psrld xmm12,30
+ rol edx,5
+ add ecx,esi
+ movups xmm0,XMMWORD[((-32))+r15]
+DB 102,15,56,220,209
+ xor edi,eax
+ ror ebp,7
+ por xmm7,xmm12
+ add ecx,edx
+ add ebx,DWORD[60+rsp]
+ xor edi,ebp
+ mov esi,ecx
+ rol ecx,5
+ add ebx,edi
+ xor esi,ebp
+ ror edx,7
+ add ebx,ecx
+ add eax,DWORD[rsp]
+ xor esi,edx
+ mov edi,ebx
+ rol ebx,5
+ paddd xmm3,xmm7
+ add eax,esi
+ xor edi,edx
+ movdqa XMMWORD[48+rsp],xmm3
+ ror ecx,7
+ add eax,ebx
+ add ebp,DWORD[4+rsp]
+ movups xmm1,XMMWORD[((-16))+r15]
+DB 102,15,56,220,208
+ xor edi,ecx
+ mov esi,eax
+ rol eax,5
+ add ebp,edi
+ xor esi,ecx
+ ror ebx,7
+ add ebp,eax
+ add edx,DWORD[8+rsp]
+ xor esi,ebx
+ mov edi,ebp
+ rol ebp,5
+ add edx,esi
+ xor edi,ebx
+ ror eax,7
+ add edx,ebp
+ add ecx,DWORD[12+rsp]
+ xor edi,eax
+ mov esi,edx
+ rol edx,5
+ add ecx,edi
+ movups xmm0,XMMWORD[r15]
+DB 102,15,56,220,209
+ xor esi,eax
+ ror ebp,7
+ add ecx,edx
+ cmp r10,r14
+ je NEAR $L$done_ssse3
+ movdqa xmm3,XMMWORD[64+r11]
+ movdqa xmm13,XMMWORD[r11]
+ movdqu xmm4,XMMWORD[r10]
+ movdqu xmm5,XMMWORD[16+r10]
+ movdqu xmm6,XMMWORD[32+r10]
+ movdqu xmm7,XMMWORD[48+r10]
+DB 102,15,56,0,227
+ add r10,64
+ add ebx,DWORD[16+rsp]
+ xor esi,ebp
+ mov edi,ecx
+DB 102,15,56,0,235
+ rol ecx,5
+ add ebx,esi
+ xor edi,ebp
+ ror edx,7
+ paddd xmm4,xmm13
+ add ebx,ecx
+ add eax,DWORD[20+rsp]
+ xor edi,edx
+ mov esi,ebx
+ movdqa XMMWORD[rsp],xmm4
+ rol ebx,5
+ add eax,edi
+ xor esi,edx
+ ror ecx,7
+ psubd xmm4,xmm13
+ add eax,ebx
+ add ebp,DWORD[24+rsp]
+ movups xmm1,XMMWORD[16+r15]
+DB 102,15,56,220,208
+ xor esi,ecx
+ mov edi,eax
+ rol eax,5
+ add ebp,esi
+ xor edi,ecx
+ ror ebx,7
+ add ebp,eax
+ add edx,DWORD[28+rsp]
+ xor edi,ebx
+ mov esi,ebp
+ rol ebp,5
+ add edx,edi
+ xor esi,ebx
+ ror eax,7
+ add edx,ebp
+ add ecx,DWORD[32+rsp]
+ xor esi,eax
+ mov edi,edx
+DB 102,15,56,0,243
+ rol edx,5
+ add ecx,esi
+ movups xmm0,XMMWORD[32+r15]
+DB 102,15,56,220,209
+ xor edi,eax
+ ror ebp,7
+ paddd xmm5,xmm13
+ add ecx,edx
+ add ebx,DWORD[36+rsp]
+ xor edi,ebp
+ mov esi,ecx
+ movdqa XMMWORD[16+rsp],xmm5
+ rol ecx,5
+ add ebx,edi
+ xor esi,ebp
+ ror edx,7
+ psubd xmm5,xmm13
+ add ebx,ecx
+ add eax,DWORD[40+rsp]
+ xor esi,edx
+ mov edi,ebx
+ rol ebx,5
+ add eax,esi
+ xor edi,edx
+ ror ecx,7
+ add eax,ebx
+ add ebp,DWORD[44+rsp]
+ movups xmm1,XMMWORD[48+r15]
+DB 102,15,56,220,208
+ xor edi,ecx
+ mov esi,eax
+ rol eax,5
+ add ebp,edi
+ xor esi,ecx
+ ror ebx,7
+ add ebp,eax
+ add edx,DWORD[48+rsp]
+ xor esi,ebx
+ mov edi,ebp
+DB 102,15,56,0,251
+ rol ebp,5
+ add edx,esi
+ xor edi,ebx
+ ror eax,7
+ paddd xmm6,xmm13
+ add edx,ebp
+ add ecx,DWORD[52+rsp]
+ xor edi,eax
+ mov esi,edx
+ movdqa XMMWORD[32+rsp],xmm6
+ rol edx,5
+ add ecx,edi
+ cmp r8d,11
+ jb NEAR $L$aesenclast4
+ movups xmm0,XMMWORD[64+r15]
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[80+r15]
+DB 102,15,56,220,208
+ je NEAR $L$aesenclast4
+ movups xmm0,XMMWORD[96+r15]
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[112+r15]
+DB 102,15,56,220,208
+$L$aesenclast4:
+DB 102,15,56,221,209
+ movups xmm0,XMMWORD[((16-112))+r15]
+ xor esi,eax
+ ror ebp,7
+ psubd xmm6,xmm13
+ add ecx,edx
+ add ebx,DWORD[56+rsp]
+ xor esi,ebp
+ mov edi,ecx
+ rol ecx,5
+ add ebx,esi
+ xor edi,ebp
+ ror edx,7
+ add ebx,ecx
+ add eax,DWORD[60+rsp]
+ xor edi,edx
+ mov esi,ebx
+ rol ebx,5
+ add eax,edi
+ ror ecx,7
+ add eax,ebx
+ movups XMMWORD[48+r12*1+r13],xmm2
+ lea r12,[64+r12]
+
+ add eax,DWORD[r9]
+ add esi,DWORD[4+r9]
+ add ecx,DWORD[8+r9]
+ add edx,DWORD[12+r9]
+ mov DWORD[r9],eax
+ add ebp,DWORD[16+r9]
+ mov DWORD[4+r9],esi
+ mov ebx,esi
+ mov DWORD[8+r9],ecx
+ mov edi,ecx
+ mov DWORD[12+r9],edx
+ xor edi,edx
+ mov DWORD[16+r9],ebp
+ and esi,edi
+ jmp NEAR $L$oop_ssse3
+
+$L$done_ssse3:
+ add ebx,DWORD[16+rsp]
+ xor esi,ebp
+ mov edi,ecx
+ rol ecx,5
+ add ebx,esi
+ xor edi,ebp
+ ror edx,7
+ add ebx,ecx
+ add eax,DWORD[20+rsp]
+ xor edi,edx
+ mov esi,ebx
+ rol ebx,5
+ add eax,edi
+ xor esi,edx
+ ror ecx,7
+ add eax,ebx
+ add ebp,DWORD[24+rsp]
+ movups xmm1,XMMWORD[16+r15]
+DB 102,15,56,220,208
+ xor esi,ecx
+ mov edi,eax
+ rol eax,5
+ add ebp,esi
+ xor edi,ecx
+ ror ebx,7
+ add ebp,eax
+ add edx,DWORD[28+rsp]
+ xor edi,ebx
+ mov esi,ebp
+ rol ebp,5
+ add edx,edi
+ xor esi,ebx
+ ror eax,7
+ add edx,ebp
+ add ecx,DWORD[32+rsp]
+ xor esi,eax
+ mov edi,edx
+ rol edx,5
+ add ecx,esi
+ movups xmm0,XMMWORD[32+r15]
+DB 102,15,56,220,209
+ xor edi,eax
+ ror ebp,7
+ add ecx,edx
+ add ebx,DWORD[36+rsp]
+ xor edi,ebp
+ mov esi,ecx
+ rol ecx,5
+ add ebx,edi
+ xor esi,ebp
+ ror edx,7
+ add ebx,ecx
+ add eax,DWORD[40+rsp]
+ xor esi,edx
+ mov edi,ebx
+ rol ebx,5
+ add eax,esi
+ xor edi,edx
+ ror ecx,7
+ add eax,ebx
+ add ebp,DWORD[44+rsp]
+ movups xmm1,XMMWORD[48+r15]
+DB 102,15,56,220,208
+ xor edi,ecx
+ mov esi,eax
+ rol eax,5
+ add ebp,edi
+ xor esi,ecx
+ ror ebx,7
+ add ebp,eax
+ add edx,DWORD[48+rsp]
+ xor esi,ebx
+ mov edi,ebp
+ rol ebp,5
+ add edx,esi
+ xor edi,ebx
+ ror eax,7
+ add edx,ebp
+ add ecx,DWORD[52+rsp]
+ xor edi,eax
+ mov esi,edx
+ rol edx,5
+ add ecx,edi
+ cmp r8d,11
+ jb NEAR $L$aesenclast5
+ movups xmm0,XMMWORD[64+r15]
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[80+r15]
+DB 102,15,56,220,208
+ je NEAR $L$aesenclast5
+ movups xmm0,XMMWORD[96+r15]
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[112+r15]
+DB 102,15,56,220,208
+$L$aesenclast5:
+DB 102,15,56,221,209
+ movups xmm0,XMMWORD[((16-112))+r15]
+ xor esi,eax
+ ror ebp,7
+ add ecx,edx
+ add ebx,DWORD[56+rsp]
+ xor esi,ebp
+ mov edi,ecx
+ rol ecx,5
+ add ebx,esi
+ xor edi,ebp
+ ror edx,7
+ add ebx,ecx
+ add eax,DWORD[60+rsp]
+ xor edi,edx
+ mov esi,ebx
+ rol ebx,5
+ add eax,edi
+ ror ecx,7
+ add eax,ebx
+ movups XMMWORD[48+r12*1+r13],xmm2
+ mov r8,QWORD[88+rsp]
+
+ add eax,DWORD[r9]
+ add esi,DWORD[4+r9]
+ add ecx,DWORD[8+r9]
+ mov DWORD[r9],eax
+ add edx,DWORD[12+r9]
+ mov DWORD[4+r9],esi
+ add ebp,DWORD[16+r9]
+ mov DWORD[8+r9],ecx
+ mov DWORD[12+r9],edx
+ mov DWORD[16+r9],ebp
+ movups XMMWORD[r8],xmm2
+ movaps xmm6,XMMWORD[((96+0))+rsp]
+ movaps xmm7,XMMWORD[((96+16))+rsp]
+ movaps xmm8,XMMWORD[((96+32))+rsp]
+ movaps xmm9,XMMWORD[((96+48))+rsp]
+ movaps xmm10,XMMWORD[((96+64))+rsp]
+ movaps xmm11,XMMWORD[((96+80))+rsp]
+ movaps xmm12,XMMWORD[((96+96))+rsp]
+ movaps xmm13,XMMWORD[((96+112))+rsp]
+ movaps xmm14,XMMWORD[((96+128))+rsp]
+ movaps xmm15,XMMWORD[((96+144))+rsp]
+ lea rsi,[264+rsp]
+
+ mov r15,QWORD[rsi]
+
+ mov r14,QWORD[8+rsi]
+
+ mov r13,QWORD[16+rsi]
+
+ mov r12,QWORD[24+rsi]
+
+ mov rbp,QWORD[32+rsi]
+
+ mov rbx,QWORD[40+rsi]
+
+ lea rsp,[48+rsi]
+
+$L$epilogue_ssse3:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_aesni_cbc_sha1_enc_ssse3:
+ALIGN 64
+K_XX_XX:
+ DD 0x5a827999,0x5a827999,0x5a827999,0x5a827999
+ DD 0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1
+ DD 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc
+ DD 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6
+ DD 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+DB 0xf,0xe,0xd,0xc,0xb,0xa,0x9,0x8,0x7,0x6,0x5,0x4,0x3,0x2,0x1,0x0
+
+DB 65,69,83,78,73,45,67,66,67,43,83,72,65,49,32,115
+DB 116,105,116,99,104,32,102,111,114,32,120,56,54,95,54,52
+DB 44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32
+DB 60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111
+DB 114,103,62,0
+ALIGN 64
+
+ALIGN 32
+aesni_cbc_sha1_enc_shaext:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_aesni_cbc_sha1_enc_shaext:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+ mov rcx,r9
+ mov r8,QWORD[40+rsp]
+ mov r9,QWORD[48+rsp]
+
+
+
+ mov r10,QWORD[56+rsp]
+ lea rsp,[((-168))+rsp]
+ movaps XMMWORD[(-8-160)+rax],xmm6
+ movaps XMMWORD[(-8-144)+rax],xmm7
+ movaps XMMWORD[(-8-128)+rax],xmm8
+ movaps XMMWORD[(-8-112)+rax],xmm9
+ movaps XMMWORD[(-8-96)+rax],xmm10
+ movaps XMMWORD[(-8-80)+rax],xmm11
+ movaps XMMWORD[(-8-64)+rax],xmm12
+ movaps XMMWORD[(-8-48)+rax],xmm13
+ movaps XMMWORD[(-8-32)+rax],xmm14
+ movaps XMMWORD[(-8-16)+rax],xmm15
+$L$prologue_shaext:
+ movdqu xmm8,XMMWORD[r9]
+ movd xmm9,DWORD[16+r9]
+ movdqa xmm7,XMMWORD[((K_XX_XX+80))]
+
+ mov r11d,DWORD[240+rcx]
+ sub rsi,rdi
+ movups xmm15,XMMWORD[rcx]
+ movups xmm2,XMMWORD[r8]
+ movups xmm0,XMMWORD[16+rcx]
+ lea rcx,[112+rcx]
+
+ pshufd xmm8,xmm8,27
+ pshufd xmm9,xmm9,27
+ jmp NEAR $L$oop_shaext
+
+ALIGN 16
+$L$oop_shaext:
+ movups xmm14,XMMWORD[rdi]
+ xorps xmm14,xmm15
+ xorps xmm2,xmm14
+ movups xmm1,XMMWORD[((-80))+rcx]
+DB 102,15,56,220,208
+ movdqu xmm3,XMMWORD[r10]
+ movdqa xmm12,xmm9
+DB 102,15,56,0,223
+ movdqu xmm4,XMMWORD[16+r10]
+ movdqa xmm11,xmm8
+ movups xmm0,XMMWORD[((-64))+rcx]
+DB 102,15,56,220,209
+DB 102,15,56,0,231
+
+ paddd xmm9,xmm3
+ movdqu xmm5,XMMWORD[32+r10]
+ lea r10,[64+r10]
+ pxor xmm3,xmm12
+ movups xmm1,XMMWORD[((-48))+rcx]
+DB 102,15,56,220,208
+ pxor xmm3,xmm12
+ movdqa xmm10,xmm8
+DB 102,15,56,0,239
+DB 69,15,58,204,193,0
+DB 68,15,56,200,212
+ movups xmm0,XMMWORD[((-32))+rcx]
+DB 102,15,56,220,209
+DB 15,56,201,220
+ movdqu xmm6,XMMWORD[((-16))+r10]
+ movdqa xmm9,xmm8
+DB 102,15,56,0,247
+ movups xmm1,XMMWORD[((-16))+rcx]
+DB 102,15,56,220,208
+DB 69,15,58,204,194,0
+DB 68,15,56,200,205
+ pxor xmm3,xmm5
+DB 15,56,201,229
+ movups xmm0,XMMWORD[rcx]
+DB 102,15,56,220,209
+ movdqa xmm10,xmm8
+DB 69,15,58,204,193,0
+DB 68,15,56,200,214
+ movups xmm1,XMMWORD[16+rcx]
+DB 102,15,56,220,208
+DB 15,56,202,222
+ pxor xmm4,xmm6
+DB 15,56,201,238
+ movups xmm0,XMMWORD[32+rcx]
+DB 102,15,56,220,209
+ movdqa xmm9,xmm8
+DB 69,15,58,204,194,0
+DB 68,15,56,200,203
+ movups xmm1,XMMWORD[48+rcx]
+DB 102,15,56,220,208
+DB 15,56,202,227
+ pxor xmm5,xmm3
+DB 15,56,201,243
+ cmp r11d,11
+ jb NEAR $L$aesenclast6
+ movups xmm0,XMMWORD[64+rcx]
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[80+rcx]
+DB 102,15,56,220,208
+ je NEAR $L$aesenclast6
+ movups xmm0,XMMWORD[96+rcx]
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[112+rcx]
+DB 102,15,56,220,208
+$L$aesenclast6:
+DB 102,15,56,221,209
+ movups xmm0,XMMWORD[((16-112))+rcx]
+ movdqa xmm10,xmm8
+DB 69,15,58,204,193,0
+DB 68,15,56,200,212
+ movups xmm14,XMMWORD[16+rdi]
+ xorps xmm14,xmm15
+ movups XMMWORD[rdi*1+rsi],xmm2
+ xorps xmm2,xmm14
+ movups xmm1,XMMWORD[((-80))+rcx]
+DB 102,15,56,220,208
+DB 15,56,202,236
+ pxor xmm6,xmm4
+DB 15,56,201,220
+ movups xmm0,XMMWORD[((-64))+rcx]
+DB 102,15,56,220,209
+ movdqa xmm9,xmm8
+DB 69,15,58,204,194,1
+DB 68,15,56,200,205
+ movups xmm1,XMMWORD[((-48))+rcx]
+DB 102,15,56,220,208
+DB 15,56,202,245
+ pxor xmm3,xmm5
+DB 15,56,201,229
+ movups xmm0,XMMWORD[((-32))+rcx]
+DB 102,15,56,220,209
+ movdqa xmm10,xmm8
+DB 69,15,58,204,193,1
+DB 68,15,56,200,214
+ movups xmm1,XMMWORD[((-16))+rcx]
+DB 102,15,56,220,208
+DB 15,56,202,222
+ pxor xmm4,xmm6
+DB 15,56,201,238
+ movups xmm0,XMMWORD[rcx]
+DB 102,15,56,220,209
+ movdqa xmm9,xmm8
+DB 69,15,58,204,194,1
+DB 68,15,56,200,203
+ movups xmm1,XMMWORD[16+rcx]
+DB 102,15,56,220,208
+DB 15,56,202,227
+ pxor xmm5,xmm3
+DB 15,56,201,243
+ movups xmm0,XMMWORD[32+rcx]
+DB 102,15,56,220,209
+ movdqa xmm10,xmm8
+DB 69,15,58,204,193,1
+DB 68,15,56,200,212
+ movups xmm1,XMMWORD[48+rcx]
+DB 102,15,56,220,208
+DB 15,56,202,236
+ pxor xmm6,xmm4
+DB 15,56,201,220
+ cmp r11d,11
+ jb NEAR $L$aesenclast7
+ movups xmm0,XMMWORD[64+rcx]
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[80+rcx]
+DB 102,15,56,220,208
+ je NEAR $L$aesenclast7
+ movups xmm0,XMMWORD[96+rcx]
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[112+rcx]
+DB 102,15,56,220,208
+$L$aesenclast7:
+DB 102,15,56,221,209
+ movups xmm0,XMMWORD[((16-112))+rcx]
+ movdqa xmm9,xmm8
+DB 69,15,58,204,194,1
+DB 68,15,56,200,205
+ movups xmm14,XMMWORD[32+rdi]
+ xorps xmm14,xmm15
+ movups XMMWORD[16+rdi*1+rsi],xmm2
+ xorps xmm2,xmm14
+ movups xmm1,XMMWORD[((-80))+rcx]
+DB 102,15,56,220,208
+DB 15,56,202,245
+ pxor xmm3,xmm5
+DB 15,56,201,229
+ movups xmm0,XMMWORD[((-64))+rcx]
+DB 102,15,56,220,209
+ movdqa xmm10,xmm8
+DB 69,15,58,204,193,2
+DB 68,15,56,200,214
+ movups xmm1,XMMWORD[((-48))+rcx]
+DB 102,15,56,220,208
+DB 15,56,202,222
+ pxor xmm4,xmm6
+DB 15,56,201,238
+ movups xmm0,XMMWORD[((-32))+rcx]
+DB 102,15,56,220,209
+ movdqa xmm9,xmm8
+DB 69,15,58,204,194,2
+DB 68,15,56,200,203
+ movups xmm1,XMMWORD[((-16))+rcx]
+DB 102,15,56,220,208
+DB 15,56,202,227
+ pxor xmm5,xmm3
+DB 15,56,201,243
+ movups xmm0,XMMWORD[rcx]
+DB 102,15,56,220,209
+ movdqa xmm10,xmm8
+DB 69,15,58,204,193,2
+DB 68,15,56,200,212
+ movups xmm1,XMMWORD[16+rcx]
+DB 102,15,56,220,208
+DB 15,56,202,236
+ pxor xmm6,xmm4
+DB 15,56,201,220
+ movups xmm0,XMMWORD[32+rcx]
+DB 102,15,56,220,209
+ movdqa xmm9,xmm8
+DB 69,15,58,204,194,2
+DB 68,15,56,200,205
+ movups xmm1,XMMWORD[48+rcx]
+DB 102,15,56,220,208
+DB 15,56,202,245
+ pxor xmm3,xmm5
+DB 15,56,201,229
+ cmp r11d,11
+ jb NEAR $L$aesenclast8
+ movups xmm0,XMMWORD[64+rcx]
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[80+rcx]
+DB 102,15,56,220,208
+ je NEAR $L$aesenclast8
+ movups xmm0,XMMWORD[96+rcx]
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[112+rcx]
+DB 102,15,56,220,208
+$L$aesenclast8:
+DB 102,15,56,221,209
+ movups xmm0,XMMWORD[((16-112))+rcx]
+ movdqa xmm10,xmm8
+DB 69,15,58,204,193,2
+DB 68,15,56,200,214
+ movups xmm14,XMMWORD[48+rdi]
+ xorps xmm14,xmm15
+ movups XMMWORD[32+rdi*1+rsi],xmm2
+ xorps xmm2,xmm14
+ movups xmm1,XMMWORD[((-80))+rcx]
+DB 102,15,56,220,208
+DB 15,56,202,222
+ pxor xmm4,xmm6
+DB 15,56,201,238
+ movups xmm0,XMMWORD[((-64))+rcx]
+DB 102,15,56,220,209
+ movdqa xmm9,xmm8
+DB 69,15,58,204,194,3
+DB 68,15,56,200,203
+ movups xmm1,XMMWORD[((-48))+rcx]
+DB 102,15,56,220,208
+DB 15,56,202,227
+ pxor xmm5,xmm3
+DB 15,56,201,243
+ movups xmm0,XMMWORD[((-32))+rcx]
+DB 102,15,56,220,209
+ movdqa xmm10,xmm8
+DB 69,15,58,204,193,3
+DB 68,15,56,200,212
+DB 15,56,202,236
+ pxor xmm6,xmm4
+ movups xmm1,XMMWORD[((-16))+rcx]
+DB 102,15,56,220,208
+ movdqa xmm9,xmm8
+DB 69,15,58,204,194,3
+DB 68,15,56,200,205
+DB 15,56,202,245
+ movups xmm0,XMMWORD[rcx]
+DB 102,15,56,220,209
+ movdqa xmm5,xmm12
+ movdqa xmm10,xmm8
+DB 69,15,58,204,193,3
+DB 68,15,56,200,214
+ movups xmm1,XMMWORD[16+rcx]
+DB 102,15,56,220,208
+ movdqa xmm9,xmm8
+DB 69,15,58,204,194,3
+DB 68,15,56,200,205
+ movups xmm0,XMMWORD[32+rcx]
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[48+rcx]
+DB 102,15,56,220,208
+ cmp r11d,11
+ jb NEAR $L$aesenclast9
+ movups xmm0,XMMWORD[64+rcx]
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[80+rcx]
+DB 102,15,56,220,208
+ je NEAR $L$aesenclast9
+ movups xmm0,XMMWORD[96+rcx]
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[112+rcx]
+DB 102,15,56,220,208
+$L$aesenclast9:
+DB 102,15,56,221,209
+ movups xmm0,XMMWORD[((16-112))+rcx]
+ dec rdx
+
+ paddd xmm8,xmm11
+ movups XMMWORD[48+rdi*1+rsi],xmm2
+ lea rdi,[64+rdi]
+ jnz NEAR $L$oop_shaext
+
+ pshufd xmm8,xmm8,27
+ pshufd xmm9,xmm9,27
+ movups XMMWORD[r8],xmm2
+ movdqu XMMWORD[r9],xmm8
+ movd DWORD[16+r9],xmm9
+ movaps xmm6,XMMWORD[((-8-160))+rax]
+ movaps xmm7,XMMWORD[((-8-144))+rax]
+ movaps xmm8,XMMWORD[((-8-128))+rax]
+ movaps xmm9,XMMWORD[((-8-112))+rax]
+ movaps xmm10,XMMWORD[((-8-96))+rax]
+ movaps xmm11,XMMWORD[((-8-80))+rax]
+ movaps xmm12,XMMWORD[((-8-64))+rax]
+ movaps xmm13,XMMWORD[((-8-48))+rax]
+ movaps xmm14,XMMWORD[((-8-32))+rax]
+ movaps xmm15,XMMWORD[((-8-16))+rax]
+ mov rsp,rax
+$L$epilogue_shaext:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_aesni_cbc_sha1_enc_shaext:
+EXTERN __imp_RtlVirtualUnwind
+
+ALIGN 16
+ssse3_handler:
+ push rsi
+ push rdi
+ push rbx
+ push rbp
+ push r12
+ push r13
+ push r14
+ push r15
+ pushfq
+ sub rsp,64
+
+ mov rax,QWORD[120+r8]
+ mov rbx,QWORD[248+r8]
+
+ mov rsi,QWORD[8+r9]
+ mov r11,QWORD[56+r9]
+
+ mov r10d,DWORD[r11]
+ lea r10,[r10*1+rsi]
+ cmp rbx,r10
+ jb NEAR $L$common_seh_tail
+
+ mov rax,QWORD[152+r8]
+
+ mov r10d,DWORD[4+r11]
+ lea r10,[r10*1+rsi]
+ cmp rbx,r10
+ jae NEAR $L$common_seh_tail
+ lea r10,[aesni_cbc_sha1_enc_shaext]
+ cmp rbx,r10
+ jb NEAR $L$seh_no_shaext
+
+ lea rsi,[rax]
+ lea rdi,[512+r8]
+ mov ecx,20
+ DD 0xa548f3fc
+ lea rax,[168+rax]
+ jmp NEAR $L$common_seh_tail
+$L$seh_no_shaext:
+ lea rsi,[96+rax]
+ lea rdi,[512+r8]
+ mov ecx,20
+ DD 0xa548f3fc
+ lea rax,[264+rax]
+
+ mov r15,QWORD[rax]
+ mov r14,QWORD[8+rax]
+ mov r13,QWORD[16+rax]
+ mov r12,QWORD[24+rax]
+ mov rbp,QWORD[32+rax]
+ mov rbx,QWORD[40+rax]
+ lea rax,[48+rax]
+ mov QWORD[144+r8],rbx
+ mov QWORD[160+r8],rbp
+ mov QWORD[216+r8],r12
+ mov QWORD[224+r8],r13
+ mov QWORD[232+r8],r14
+ mov QWORD[240+r8],r15
+
+$L$common_seh_tail:
+ mov rdi,QWORD[8+rax]
+ mov rsi,QWORD[16+rax]
+ mov QWORD[152+r8],rax
+ mov QWORD[168+r8],rsi
+ mov QWORD[176+r8],rdi
+
+ mov rdi,QWORD[40+r9]
+ mov rsi,r8
+ mov ecx,154
+ DD 0xa548f3fc
+
+ mov rsi,r9
+ xor rcx,rcx
+ mov rdx,QWORD[8+rsi]
+ mov r8,QWORD[rsi]
+ mov r9,QWORD[16+rsi]
+ mov r10,QWORD[40+rsi]
+ lea r11,[56+rsi]
+ lea r12,[24+rsi]
+ mov QWORD[32+rsp],r10
+ mov QWORD[40+rsp],r11
+ mov QWORD[48+rsp],r12
+ mov QWORD[56+rsp],rcx
+ call QWORD[__imp_RtlVirtualUnwind]
+
+ mov eax,1
+ add rsp,64
+ popfq
+ pop r15
+ pop r14
+ pop r13
+ pop r12
+ pop rbp
+ pop rbx
+ pop rdi
+ pop rsi
+ DB 0F3h,0C3h ;repret
+
+
+section .pdata rdata align=4
+ALIGN 4
+ DD $L$SEH_begin_aesni_cbc_sha1_enc_ssse3 wrt ..imagebase
+ DD $L$SEH_end_aesni_cbc_sha1_enc_ssse3 wrt ..imagebase
+ DD $L$SEH_info_aesni_cbc_sha1_enc_ssse3 wrt ..imagebase
+ DD $L$SEH_begin_aesni_cbc_sha1_enc_shaext wrt ..imagebase
+ DD $L$SEH_end_aesni_cbc_sha1_enc_shaext wrt ..imagebase
+ DD $L$SEH_info_aesni_cbc_sha1_enc_shaext wrt ..imagebase
+section .xdata rdata align=8
+ALIGN 8
+$L$SEH_info_aesni_cbc_sha1_enc_ssse3:
+DB 9,0,0,0
+ DD ssse3_handler wrt ..imagebase
+ DD $L$prologue_ssse3 wrt ..imagebase,$L$epilogue_ssse3 wrt ..imagebase
+$L$SEH_info_aesni_cbc_sha1_enc_shaext:
+DB 9,0,0,0
+ DD ssse3_handler wrt ..imagebase
+ DD $L$prologue_shaext wrt ..imagebase,$L$epilogue_shaext wrt ..imagebase
diff --git a/CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-sha256-x86_64.nasm b/CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-sha256-x86_64.nasm
new file mode 100644
index 0000000000..f5c250b904
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-sha256-x86_64.nasm
@@ -0,0 +1,78 @@
+; WARNING: do not edit!
+; Generated from openssl/crypto/aes/asm/aesni-sha256-x86_64.pl
+;
+; Copyright 2013-2020 The OpenSSL Project Authors. All Rights Reserved.
+;
+; Licensed under the OpenSSL license (the "License"). You may not use
+; this file except in compliance with the License. You can obtain a copy
+; in the file LICENSE in the source distribution or at
+; https://www.openssl.org/source/license.html
+
+default rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section .text code align=64
+
+
+EXTERN OPENSSL_ia32cap_P
+global aesni_cbc_sha256_enc
+
+ALIGN 16
+aesni_cbc_sha256_enc:
+
+ xor eax,eax
+ cmp rcx,0
+ je NEAR $L$probe
+ ud2
+$L$probe:
+ DB 0F3h,0C3h ;repret
+
+
+
+ALIGN 64
+
+K256:
+ DD 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
+ DD 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
+ DD 0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
+ DD 0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
+ DD 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
+ DD 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
+ DD 0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
+ DD 0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
+ DD 0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc
+ DD 0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc
+ DD 0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
+ DD 0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
+ DD 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
+ DD 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
+ DD 0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967
+ DD 0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967
+ DD 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
+ DD 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
+ DD 0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
+ DD 0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
+ DD 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
+ DD 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
+ DD 0xd192e819,0xd6990624,0xf40e3585,0x106aa070
+ DD 0xd192e819,0xd6990624,0xf40e3585,0x106aa070
+ DD 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
+ DD 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
+ DD 0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
+ DD 0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
+ DD 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
+ DD 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
+ DD 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
+ DD 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
+
+ DD 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+ DD 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+ DD 0,0,0,0,0,0,0,0,-1,-1,-1,-1
+ DD 0,0,0,0,0,0,0,0
+DB 65,69,83,78,73,45,67,66,67,43,83,72,65,50,53,54
+DB 32,115,116,105,116,99,104,32,102,111,114,32,120,56,54,95
+DB 54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98
+DB 121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108
+DB 46,111,114,103,62,0
+ALIGN 64
diff --git a/CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-x86_64.nasm b/CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-x86_64.nasm
new file mode 100644
index 0000000000..57ee23ea8c
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-x86_64.nasm
@@ -0,0 +1,5103 @@
+; WARNING: do not edit!
+; Generated from openssl/crypto/aes/asm/aesni-x86_64.pl
+;
+; Copyright 2009-2020 The OpenSSL Project Authors. All Rights Reserved.
+;
+; Licensed under the OpenSSL license (the "License"). You may not use
+; this file except in compliance with the License. You can obtain a copy
+; in the file LICENSE in the source distribution or at
+; https://www.openssl.org/source/license.html
+
+default rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section .text code align=64
+
+EXTERN OPENSSL_ia32cap_P
+global aesni_encrypt
+
+ALIGN 16
+aesni_encrypt:
+
+ movups xmm2,XMMWORD[rcx]
+ mov eax,DWORD[240+r8]
+ movups xmm0,XMMWORD[r8]
+ movups xmm1,XMMWORD[16+r8]
+ lea r8,[32+r8]
+ xorps xmm2,xmm0
+$L$oop_enc1_1:
+DB 102,15,56,220,209
+ dec eax
+ movups xmm1,XMMWORD[r8]
+ lea r8,[16+r8]
+ jnz NEAR $L$oop_enc1_1
+DB 102,15,56,221,209
+ pxor xmm0,xmm0
+ pxor xmm1,xmm1
+ movups XMMWORD[rdx],xmm2
+ pxor xmm2,xmm2
+ DB 0F3h,0C3h ;repret
+
+
+
+global aesni_decrypt
+
+ALIGN 16
+aesni_decrypt:
+
+ movups xmm2,XMMWORD[rcx]
+ mov eax,DWORD[240+r8]
+ movups xmm0,XMMWORD[r8]
+ movups xmm1,XMMWORD[16+r8]
+ lea r8,[32+r8]
+ xorps xmm2,xmm0
+$L$oop_dec1_2:
+DB 102,15,56,222,209
+ dec eax
+ movups xmm1,XMMWORD[r8]
+ lea r8,[16+r8]
+ jnz NEAR $L$oop_dec1_2
+DB 102,15,56,223,209
+ pxor xmm0,xmm0
+ pxor xmm1,xmm1
+ movups XMMWORD[rdx],xmm2
+ pxor xmm2,xmm2
+ DB 0F3h,0C3h ;repret
+
+
+
+ALIGN 16
+_aesni_encrypt2:
+
+ movups xmm0,XMMWORD[rcx]
+ shl eax,4
+ movups xmm1,XMMWORD[16+rcx]
+ xorps xmm2,xmm0
+ xorps xmm3,xmm0
+ movups xmm0,XMMWORD[32+rcx]
+ lea rcx,[32+rax*1+rcx]
+ neg rax
+ add rax,16
+
+$L$enc_loop2:
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+ movups xmm1,XMMWORD[rax*1+rcx]
+ add rax,32
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+ movups xmm0,XMMWORD[((-16))+rax*1+rcx]
+ jnz NEAR $L$enc_loop2
+
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,221,208
+DB 102,15,56,221,216
+ DB 0F3h,0C3h ;repret
+
+
+
+ALIGN 16
+_aesni_decrypt2:
+
+ movups xmm0,XMMWORD[rcx]
+ shl eax,4
+ movups xmm1,XMMWORD[16+rcx]
+ xorps xmm2,xmm0
+ xorps xmm3,xmm0
+ movups xmm0,XMMWORD[32+rcx]
+ lea rcx,[32+rax*1+rcx]
+ neg rax
+ add rax,16
+
+$L$dec_loop2:
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+ movups xmm1,XMMWORD[rax*1+rcx]
+ add rax,32
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+ movups xmm0,XMMWORD[((-16))+rax*1+rcx]
+ jnz NEAR $L$dec_loop2
+
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,223,208
+DB 102,15,56,223,216
+ DB 0F3h,0C3h ;repret
+
+
+
+ALIGN 16
+_aesni_encrypt3:
+
+ movups xmm0,XMMWORD[rcx]
+ shl eax,4
+ movups xmm1,XMMWORD[16+rcx]
+ xorps xmm2,xmm0
+ xorps xmm3,xmm0
+ xorps xmm4,xmm0
+ movups xmm0,XMMWORD[32+rcx]
+ lea rcx,[32+rax*1+rcx]
+ neg rax
+ add rax,16
+
+$L$enc_loop3:
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+ movups xmm1,XMMWORD[rax*1+rcx]
+ add rax,32
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+DB 102,15,56,220,224
+ movups xmm0,XMMWORD[((-16))+rax*1+rcx]
+ jnz NEAR $L$enc_loop3
+
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+DB 102,15,56,221,208
+DB 102,15,56,221,216
+DB 102,15,56,221,224
+ DB 0F3h,0C3h ;repret
+
+
+
+ALIGN 16
+_aesni_decrypt3:
+
+ movups xmm0,XMMWORD[rcx]
+ shl eax,4
+ movups xmm1,XMMWORD[16+rcx]
+ xorps xmm2,xmm0
+ xorps xmm3,xmm0
+ xorps xmm4,xmm0
+ movups xmm0,XMMWORD[32+rcx]
+ lea rcx,[32+rax*1+rcx]
+ neg rax
+ add rax,16
+
+$L$dec_loop3:
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+ movups xmm1,XMMWORD[rax*1+rcx]
+ add rax,32
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+DB 102,15,56,222,224
+ movups xmm0,XMMWORD[((-16))+rax*1+rcx]
+ jnz NEAR $L$dec_loop3
+
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+DB 102,15,56,223,208
+DB 102,15,56,223,216
+DB 102,15,56,223,224
+ DB 0F3h,0C3h ;repret
+
+
+
+ALIGN 16
+_aesni_encrypt4:
+
+ movups xmm0,XMMWORD[rcx]
+ shl eax,4
+ movups xmm1,XMMWORD[16+rcx]
+ xorps xmm2,xmm0
+ xorps xmm3,xmm0
+ xorps xmm4,xmm0
+ xorps xmm5,xmm0
+ movups xmm0,XMMWORD[32+rcx]
+ lea rcx,[32+rax*1+rcx]
+ neg rax
+DB 0x0f,0x1f,0x00
+ add rax,16
+
+$L$enc_loop4:
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+ movups xmm1,XMMWORD[rax*1+rcx]
+ add rax,32
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+DB 102,15,56,220,224
+DB 102,15,56,220,232
+ movups xmm0,XMMWORD[((-16))+rax*1+rcx]
+ jnz NEAR $L$enc_loop4
+
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+DB 102,15,56,221,208
+DB 102,15,56,221,216
+DB 102,15,56,221,224
+DB 102,15,56,221,232
+ DB 0F3h,0C3h ;repret
+
+
+
+ALIGN 16
+_aesni_decrypt4:
+
+ movups xmm0,XMMWORD[rcx]
+ shl eax,4
+ movups xmm1,XMMWORD[16+rcx]
+ xorps xmm2,xmm0
+ xorps xmm3,xmm0
+ xorps xmm4,xmm0
+ xorps xmm5,xmm0
+ movups xmm0,XMMWORD[32+rcx]
+ lea rcx,[32+rax*1+rcx]
+ neg rax
+DB 0x0f,0x1f,0x00
+ add rax,16
+
+$L$dec_loop4:
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+ movups xmm1,XMMWORD[rax*1+rcx]
+ add rax,32
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+ movups xmm0,XMMWORD[((-16))+rax*1+rcx]
+ jnz NEAR $L$dec_loop4
+
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+DB 102,15,56,223,208
+DB 102,15,56,223,216
+DB 102,15,56,223,224
+DB 102,15,56,223,232
+ DB 0F3h,0C3h ;repret
+
+
+
+ALIGN 16
+_aesni_encrypt6:
+
+ movups xmm0,XMMWORD[rcx]
+ shl eax,4
+ movups xmm1,XMMWORD[16+rcx]
+ xorps xmm2,xmm0
+ pxor xmm3,xmm0
+ pxor xmm4,xmm0
+DB 102,15,56,220,209
+ lea rcx,[32+rax*1+rcx]
+ neg rax
+DB 102,15,56,220,217
+ pxor xmm5,xmm0
+ pxor xmm6,xmm0
+DB 102,15,56,220,225
+ pxor xmm7,xmm0
+ movups xmm0,XMMWORD[rax*1+rcx]
+ add rax,16
+ jmp NEAR $L$enc_loop6_enter
+ALIGN 16
+$L$enc_loop6:
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+$L$enc_loop6_enter:
+DB 102,15,56,220,233
+DB 102,15,56,220,241
+DB 102,15,56,220,249
+ movups xmm1,XMMWORD[rax*1+rcx]
+ add rax,32
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+DB 102,15,56,220,224
+DB 102,15,56,220,232
+DB 102,15,56,220,240
+DB 102,15,56,220,248
+ movups xmm0,XMMWORD[((-16))+rax*1+rcx]
+ jnz NEAR $L$enc_loop6
+
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+DB 102,15,56,220,241
+DB 102,15,56,220,249
+DB 102,15,56,221,208
+DB 102,15,56,221,216
+DB 102,15,56,221,224
+DB 102,15,56,221,232
+DB 102,15,56,221,240
+DB 102,15,56,221,248
+ DB 0F3h,0C3h ;repret
+
+
+
+ALIGN 16
+_aesni_decrypt6:
+
+ movups xmm0,XMMWORD[rcx]
+ shl eax,4
+ movups xmm1,XMMWORD[16+rcx]
+ xorps xmm2,xmm0
+ pxor xmm3,xmm0
+ pxor xmm4,xmm0
+DB 102,15,56,222,209
+ lea rcx,[32+rax*1+rcx]
+ neg rax
+DB 102,15,56,222,217
+ pxor xmm5,xmm0
+ pxor xmm6,xmm0
+DB 102,15,56,222,225
+ pxor xmm7,xmm0
+ movups xmm0,XMMWORD[rax*1+rcx]
+ add rax,16
+ jmp NEAR $L$dec_loop6_enter
+ALIGN 16
+$L$dec_loop6:
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+$L$dec_loop6_enter:
+DB 102,15,56,222,233
+DB 102,15,56,222,241
+DB 102,15,56,222,249
+ movups xmm1,XMMWORD[rax*1+rcx]
+ add rax,32
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+DB 102,15,56,222,240
+DB 102,15,56,222,248
+ movups xmm0,XMMWORD[((-16))+rax*1+rcx]
+ jnz NEAR $L$dec_loop6
+
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+DB 102,15,56,222,241
+DB 102,15,56,222,249
+DB 102,15,56,223,208
+DB 102,15,56,223,216
+DB 102,15,56,223,224
+DB 102,15,56,223,232
+DB 102,15,56,223,240
+DB 102,15,56,223,248
+ DB 0F3h,0C3h ;repret
+
+
+
+ALIGN 16
+_aesni_encrypt8:
+
+ movups xmm0,XMMWORD[rcx]
+ shl eax,4
+ movups xmm1,XMMWORD[16+rcx]
+ xorps xmm2,xmm0
+ xorps xmm3,xmm0
+ pxor xmm4,xmm0
+ pxor xmm5,xmm0
+ pxor xmm6,xmm0
+ lea rcx,[32+rax*1+rcx]
+ neg rax
+DB 102,15,56,220,209
+ pxor xmm7,xmm0
+ pxor xmm8,xmm0
+DB 102,15,56,220,217
+ pxor xmm9,xmm0
+ movups xmm0,XMMWORD[rax*1+rcx]
+ add rax,16
+ jmp NEAR $L$enc_loop8_inner
+ALIGN 16
+$L$enc_loop8:
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+$L$enc_loop8_inner:
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+DB 102,15,56,220,241
+DB 102,15,56,220,249
+DB 102,68,15,56,220,193
+DB 102,68,15,56,220,201
+$L$enc_loop8_enter:
+ movups xmm1,XMMWORD[rax*1+rcx]
+ add rax,32
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+DB 102,15,56,220,224
+DB 102,15,56,220,232
+DB 102,15,56,220,240
+DB 102,15,56,220,248
+DB 102,68,15,56,220,192
+DB 102,68,15,56,220,200
+ movups xmm0,XMMWORD[((-16))+rax*1+rcx]
+ jnz NEAR $L$enc_loop8
+
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+DB 102,15,56,220,241
+DB 102,15,56,220,249
+DB 102,68,15,56,220,193
+DB 102,68,15,56,220,201
+DB 102,15,56,221,208
+DB 102,15,56,221,216
+DB 102,15,56,221,224
+DB 102,15,56,221,232
+DB 102,15,56,221,240
+DB 102,15,56,221,248
+DB 102,68,15,56,221,192
+DB 102,68,15,56,221,200
+ DB 0F3h,0C3h ;repret
+
+
+
+ALIGN 16
+_aesni_decrypt8:
+
+ movups xmm0,XMMWORD[rcx]
+ shl eax,4
+ movups xmm1,XMMWORD[16+rcx]
+ xorps xmm2,xmm0
+ xorps xmm3,xmm0
+ pxor xmm4,xmm0
+ pxor xmm5,xmm0
+ pxor xmm6,xmm0
+ lea rcx,[32+rax*1+rcx]
+ neg rax
+DB 102,15,56,222,209
+ pxor xmm7,xmm0
+ pxor xmm8,xmm0
+DB 102,15,56,222,217
+ pxor xmm9,xmm0
+ movups xmm0,XMMWORD[rax*1+rcx]
+ add rax,16
+ jmp NEAR $L$dec_loop8_inner
+ALIGN 16
+$L$dec_loop8:
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+$L$dec_loop8_inner:
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+DB 102,15,56,222,241
+DB 102,15,56,222,249
+DB 102,68,15,56,222,193
+DB 102,68,15,56,222,201
+$L$dec_loop8_enter:
+ movups xmm1,XMMWORD[rax*1+rcx]
+ add rax,32
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+DB 102,15,56,222,240
+DB 102,15,56,222,248
+DB 102,68,15,56,222,192
+DB 102,68,15,56,222,200
+ movups xmm0,XMMWORD[((-16))+rax*1+rcx]
+ jnz NEAR $L$dec_loop8
+
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+DB 102,15,56,222,241
+DB 102,15,56,222,249
+DB 102,68,15,56,222,193
+DB 102,68,15,56,222,201
+DB 102,15,56,223,208
+DB 102,15,56,223,216
+DB 102,15,56,223,224
+DB 102,15,56,223,232
+DB 102,15,56,223,240
+DB 102,15,56,223,248
+DB 102,68,15,56,223,192
+DB 102,68,15,56,223,200
+ DB 0F3h,0C3h ;repret
+
+
+global aesni_ecb_encrypt
+
+ALIGN 16
+aesni_ecb_encrypt:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_aesni_ecb_encrypt:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+ mov rcx,r9
+ mov r8,QWORD[40+rsp]
+
+
+
+ lea rsp,[((-88))+rsp]
+ movaps XMMWORD[rsp],xmm6
+ movaps XMMWORD[16+rsp],xmm7
+ movaps XMMWORD[32+rsp],xmm8
+ movaps XMMWORD[48+rsp],xmm9
+$L$ecb_enc_body:
+ and rdx,-16
+ jz NEAR $L$ecb_ret
+
+ mov eax,DWORD[240+rcx]
+ movups xmm0,XMMWORD[rcx]
+ mov r11,rcx
+ mov r10d,eax
+ test r8d,r8d
+ jz NEAR $L$ecb_decrypt
+
+ cmp rdx,0x80
+ jb NEAR $L$ecb_enc_tail
+
+ movdqu xmm2,XMMWORD[rdi]
+ movdqu xmm3,XMMWORD[16+rdi]
+ movdqu xmm4,XMMWORD[32+rdi]
+ movdqu xmm5,XMMWORD[48+rdi]
+ movdqu xmm6,XMMWORD[64+rdi]
+ movdqu xmm7,XMMWORD[80+rdi]
+ movdqu xmm8,XMMWORD[96+rdi]
+ movdqu xmm9,XMMWORD[112+rdi]
+ lea rdi,[128+rdi]
+ sub rdx,0x80
+ jmp NEAR $L$ecb_enc_loop8_enter
+ALIGN 16
+$L$ecb_enc_loop8:
+ movups XMMWORD[rsi],xmm2
+ mov rcx,r11
+ movdqu xmm2,XMMWORD[rdi]
+ mov eax,r10d
+ movups XMMWORD[16+rsi],xmm3
+ movdqu xmm3,XMMWORD[16+rdi]
+ movups XMMWORD[32+rsi],xmm4
+ movdqu xmm4,XMMWORD[32+rdi]
+ movups XMMWORD[48+rsi],xmm5
+ movdqu xmm5,XMMWORD[48+rdi]
+ movups XMMWORD[64+rsi],xmm6
+ movdqu xmm6,XMMWORD[64+rdi]
+ movups XMMWORD[80+rsi],xmm7
+ movdqu xmm7,XMMWORD[80+rdi]
+ movups XMMWORD[96+rsi],xmm8
+ movdqu xmm8,XMMWORD[96+rdi]
+ movups XMMWORD[112+rsi],xmm9
+ lea rsi,[128+rsi]
+ movdqu xmm9,XMMWORD[112+rdi]
+ lea rdi,[128+rdi]
+$L$ecb_enc_loop8_enter:
+
+ call _aesni_encrypt8
+
+ sub rdx,0x80
+ jnc NEAR $L$ecb_enc_loop8
+
+ movups XMMWORD[rsi],xmm2
+ mov rcx,r11
+ movups XMMWORD[16+rsi],xmm3
+ mov eax,r10d
+ movups XMMWORD[32+rsi],xmm4
+ movups XMMWORD[48+rsi],xmm5
+ movups XMMWORD[64+rsi],xmm6
+ movups XMMWORD[80+rsi],xmm7
+ movups XMMWORD[96+rsi],xmm8
+ movups XMMWORD[112+rsi],xmm9
+ lea rsi,[128+rsi]
+ add rdx,0x80
+ jz NEAR $L$ecb_ret
+
+$L$ecb_enc_tail:
+ movups xmm2,XMMWORD[rdi]
+ cmp rdx,0x20
+ jb NEAR $L$ecb_enc_one
+ movups xmm3,XMMWORD[16+rdi]
+ je NEAR $L$ecb_enc_two
+ movups xmm4,XMMWORD[32+rdi]
+ cmp rdx,0x40
+ jb NEAR $L$ecb_enc_three
+ movups xmm5,XMMWORD[48+rdi]
+ je NEAR $L$ecb_enc_four
+ movups xmm6,XMMWORD[64+rdi]
+ cmp rdx,0x60
+ jb NEAR $L$ecb_enc_five
+ movups xmm7,XMMWORD[80+rdi]
+ je NEAR $L$ecb_enc_six
+ movdqu xmm8,XMMWORD[96+rdi]
+ xorps xmm9,xmm9
+ call _aesni_encrypt8
+ movups XMMWORD[rsi],xmm2
+ movups XMMWORD[16+rsi],xmm3
+ movups XMMWORD[32+rsi],xmm4
+ movups XMMWORD[48+rsi],xmm5
+ movups XMMWORD[64+rsi],xmm6
+ movups XMMWORD[80+rsi],xmm7
+ movups XMMWORD[96+rsi],xmm8
+ jmp NEAR $L$ecb_ret
+ALIGN 16
+$L$ecb_enc_one:
+ movups xmm0,XMMWORD[rcx]
+ movups xmm1,XMMWORD[16+rcx]
+ lea rcx,[32+rcx]
+ xorps xmm2,xmm0
+$L$oop_enc1_3:
+DB 102,15,56,220,209
+ dec eax
+ movups xmm1,XMMWORD[rcx]
+ lea rcx,[16+rcx]
+ jnz NEAR $L$oop_enc1_3
+DB 102,15,56,221,209
+ movups XMMWORD[rsi],xmm2
+ jmp NEAR $L$ecb_ret
+ALIGN 16
+$L$ecb_enc_two:
+ call _aesni_encrypt2
+ movups XMMWORD[rsi],xmm2
+ movups XMMWORD[16+rsi],xmm3
+ jmp NEAR $L$ecb_ret
+ALIGN 16
+$L$ecb_enc_three:
+ call _aesni_encrypt3
+ movups XMMWORD[rsi],xmm2
+ movups XMMWORD[16+rsi],xmm3
+ movups XMMWORD[32+rsi],xmm4
+ jmp NEAR $L$ecb_ret
+ALIGN 16
+$L$ecb_enc_four:
+ call _aesni_encrypt4
+ movups XMMWORD[rsi],xmm2
+ movups XMMWORD[16+rsi],xmm3
+ movups XMMWORD[32+rsi],xmm4
+ movups XMMWORD[48+rsi],xmm5
+ jmp NEAR $L$ecb_ret
+ALIGN 16
+$L$ecb_enc_five:
+ xorps xmm7,xmm7
+ call _aesni_encrypt6
+ movups XMMWORD[rsi],xmm2
+ movups XMMWORD[16+rsi],xmm3
+ movups XMMWORD[32+rsi],xmm4
+ movups XMMWORD[48+rsi],xmm5
+ movups XMMWORD[64+rsi],xmm6
+ jmp NEAR $L$ecb_ret
+ALIGN 16
+$L$ecb_enc_six:
+ call _aesni_encrypt6
+ movups XMMWORD[rsi],xmm2
+ movups XMMWORD[16+rsi],xmm3
+ movups XMMWORD[32+rsi],xmm4
+ movups XMMWORD[48+rsi],xmm5
+ movups XMMWORD[64+rsi],xmm6
+ movups XMMWORD[80+rsi],xmm7
+ jmp NEAR $L$ecb_ret
+
+ALIGN 16
+$L$ecb_decrypt:
+ cmp rdx,0x80
+ jb NEAR $L$ecb_dec_tail
+
+ movdqu xmm2,XMMWORD[rdi]
+ movdqu xmm3,XMMWORD[16+rdi]
+ movdqu xmm4,XMMWORD[32+rdi]
+ movdqu xmm5,XMMWORD[48+rdi]
+ movdqu xmm6,XMMWORD[64+rdi]
+ movdqu xmm7,XMMWORD[80+rdi]
+ movdqu xmm8,XMMWORD[96+rdi]
+ movdqu xmm9,XMMWORD[112+rdi]
+ lea rdi,[128+rdi]
+ sub rdx,0x80
+ jmp NEAR $L$ecb_dec_loop8_enter
+ALIGN 16
+$L$ecb_dec_loop8:
+ movups XMMWORD[rsi],xmm2
+ mov rcx,r11
+ movdqu xmm2,XMMWORD[rdi]
+ mov eax,r10d
+ movups XMMWORD[16+rsi],xmm3
+ movdqu xmm3,XMMWORD[16+rdi]
+ movups XMMWORD[32+rsi],xmm4
+ movdqu xmm4,XMMWORD[32+rdi]
+ movups XMMWORD[48+rsi],xmm5
+ movdqu xmm5,XMMWORD[48+rdi]
+ movups XMMWORD[64+rsi],xmm6
+ movdqu xmm6,XMMWORD[64+rdi]
+ movups XMMWORD[80+rsi],xmm7
+ movdqu xmm7,XMMWORD[80+rdi]
+ movups XMMWORD[96+rsi],xmm8
+ movdqu xmm8,XMMWORD[96+rdi]
+ movups XMMWORD[112+rsi],xmm9
+ lea rsi,[128+rsi]
+ movdqu xmm9,XMMWORD[112+rdi]
+ lea rdi,[128+rdi]
+$L$ecb_dec_loop8_enter:
+
+ call _aesni_decrypt8
+
+ movups xmm0,XMMWORD[r11]
+ sub rdx,0x80
+ jnc NEAR $L$ecb_dec_loop8
+
+ movups XMMWORD[rsi],xmm2
+ pxor xmm2,xmm2
+ mov rcx,r11
+ movups XMMWORD[16+rsi],xmm3
+ pxor xmm3,xmm3
+ mov eax,r10d
+ movups XMMWORD[32+rsi],xmm4
+ pxor xmm4,xmm4
+ movups XMMWORD[48+rsi],xmm5
+ pxor xmm5,xmm5
+ movups XMMWORD[64+rsi],xmm6
+ pxor xmm6,xmm6
+ movups XMMWORD[80+rsi],xmm7
+ pxor xmm7,xmm7
+ movups XMMWORD[96+rsi],xmm8
+ pxor xmm8,xmm8
+ movups XMMWORD[112+rsi],xmm9
+ pxor xmm9,xmm9
+ lea rsi,[128+rsi]
+ add rdx,0x80
+ jz NEAR $L$ecb_ret
+
+$L$ecb_dec_tail:
+ movups xmm2,XMMWORD[rdi]
+ cmp rdx,0x20
+ jb NEAR $L$ecb_dec_one
+ movups xmm3,XMMWORD[16+rdi]
+ je NEAR $L$ecb_dec_two
+ movups xmm4,XMMWORD[32+rdi]
+ cmp rdx,0x40
+ jb NEAR $L$ecb_dec_three
+ movups xmm5,XMMWORD[48+rdi]
+ je NEAR $L$ecb_dec_four
+ movups xmm6,XMMWORD[64+rdi]
+ cmp rdx,0x60
+ jb NEAR $L$ecb_dec_five
+ movups xmm7,XMMWORD[80+rdi]
+ je NEAR $L$ecb_dec_six
+ movups xmm8,XMMWORD[96+rdi]
+ movups xmm0,XMMWORD[rcx]
+ xorps xmm9,xmm9
+ call _aesni_decrypt8
+ movups XMMWORD[rsi],xmm2
+ pxor xmm2,xmm2
+ movups XMMWORD[16+rsi],xmm3
+ pxor xmm3,xmm3
+ movups XMMWORD[32+rsi],xmm4
+ pxor xmm4,xmm4
+ movups XMMWORD[48+rsi],xmm5
+ pxor xmm5,xmm5
+ movups XMMWORD[64+rsi],xmm6
+ pxor xmm6,xmm6
+ movups XMMWORD[80+rsi],xmm7
+ pxor xmm7,xmm7
+ movups XMMWORD[96+rsi],xmm8
+ pxor xmm8,xmm8
+ pxor xmm9,xmm9
+ jmp NEAR $L$ecb_ret
+ALIGN 16
+$L$ecb_dec_one:
+ movups xmm0,XMMWORD[rcx]
+ movups xmm1,XMMWORD[16+rcx]
+ lea rcx,[32+rcx]
+ xorps xmm2,xmm0
+$L$oop_dec1_4:
+DB 102,15,56,222,209
+ dec eax
+ movups xmm1,XMMWORD[rcx]
+ lea rcx,[16+rcx]
+ jnz NEAR $L$oop_dec1_4
+DB 102,15,56,223,209
+ movups XMMWORD[rsi],xmm2
+ pxor xmm2,xmm2
+ jmp NEAR $L$ecb_ret
+ALIGN 16
+$L$ecb_dec_two:
+ call _aesni_decrypt2
+ movups XMMWORD[rsi],xmm2
+ pxor xmm2,xmm2
+ movups XMMWORD[16+rsi],xmm3
+ pxor xmm3,xmm3
+ jmp NEAR $L$ecb_ret
+ALIGN 16
+$L$ecb_dec_three:
+ call _aesni_decrypt3
+ movups XMMWORD[rsi],xmm2
+ pxor xmm2,xmm2
+ movups XMMWORD[16+rsi],xmm3
+ pxor xmm3,xmm3
+ movups XMMWORD[32+rsi],xmm4
+ pxor xmm4,xmm4
+ jmp NEAR $L$ecb_ret
+ALIGN 16
+$L$ecb_dec_four:
+ call _aesni_decrypt4
+ movups XMMWORD[rsi],xmm2
+ pxor xmm2,xmm2
+ movups XMMWORD[16+rsi],xmm3
+ pxor xmm3,xmm3
+ movups XMMWORD[32+rsi],xmm4
+ pxor xmm4,xmm4
+ movups XMMWORD[48+rsi],xmm5
+ pxor xmm5,xmm5
+ jmp NEAR $L$ecb_ret
+ALIGN 16
+$L$ecb_dec_five:
+ xorps xmm7,xmm7
+ call _aesni_decrypt6
+ movups XMMWORD[rsi],xmm2
+ pxor xmm2,xmm2
+ movups XMMWORD[16+rsi],xmm3
+ pxor xmm3,xmm3
+ movups XMMWORD[32+rsi],xmm4
+ pxor xmm4,xmm4
+ movups XMMWORD[48+rsi],xmm5
+ pxor xmm5,xmm5
+ movups XMMWORD[64+rsi],xmm6
+ pxor xmm6,xmm6
+ pxor xmm7,xmm7
+ jmp NEAR $L$ecb_ret
+ALIGN 16
+$L$ecb_dec_six:
+ call _aesni_decrypt6
+ movups XMMWORD[rsi],xmm2
+ pxor xmm2,xmm2
+ movups XMMWORD[16+rsi],xmm3
+ pxor xmm3,xmm3
+ movups XMMWORD[32+rsi],xmm4
+ pxor xmm4,xmm4
+ movups XMMWORD[48+rsi],xmm5
+ pxor xmm5,xmm5
+ movups XMMWORD[64+rsi],xmm6
+ pxor xmm6,xmm6
+ movups XMMWORD[80+rsi],xmm7
+ pxor xmm7,xmm7
+
+$L$ecb_ret:
+ xorps xmm0,xmm0
+ pxor xmm1,xmm1
+ movaps xmm6,XMMWORD[rsp]
+ movaps XMMWORD[rsp],xmm0
+ movaps xmm7,XMMWORD[16+rsp]
+ movaps XMMWORD[16+rsp],xmm0
+ movaps xmm8,XMMWORD[32+rsp]
+ movaps XMMWORD[32+rsp],xmm0
+ movaps xmm9,XMMWORD[48+rsp]
+ movaps XMMWORD[48+rsp],xmm0
+ lea rsp,[88+rsp]
+$L$ecb_enc_ret:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_aesni_ecb_encrypt:
+global aesni_ccm64_encrypt_blocks
+
+ALIGN 16
+aesni_ccm64_encrypt_blocks:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_aesni_ccm64_encrypt_blocks:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+ mov rcx,r9
+ mov r8,QWORD[40+rsp]
+ mov r9,QWORD[48+rsp]
+
+
+
+ lea rsp,[((-88))+rsp]
+ movaps XMMWORD[rsp],xmm6
+ movaps XMMWORD[16+rsp],xmm7
+ movaps XMMWORD[32+rsp],xmm8
+ movaps XMMWORD[48+rsp],xmm9
+$L$ccm64_enc_body:
+ mov eax,DWORD[240+rcx]
+ movdqu xmm6,XMMWORD[r8]
+ movdqa xmm9,XMMWORD[$L$increment64]
+ movdqa xmm7,XMMWORD[$L$bswap_mask]
+
+ shl eax,4
+ mov r10d,16
+ lea r11,[rcx]
+ movdqu xmm3,XMMWORD[r9]
+ movdqa xmm2,xmm6
+ lea rcx,[32+rax*1+rcx]
+DB 102,15,56,0,247
+ sub r10,rax
+ jmp NEAR $L$ccm64_enc_outer
+ALIGN 16
+$L$ccm64_enc_outer:
+ movups xmm0,XMMWORD[r11]
+ mov rax,r10
+ movups xmm8,XMMWORD[rdi]
+
+ xorps xmm2,xmm0
+ movups xmm1,XMMWORD[16+r11]
+ xorps xmm0,xmm8
+ xorps xmm3,xmm0
+ movups xmm0,XMMWORD[32+r11]
+
+$L$ccm64_enc2_loop:
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+ movups xmm1,XMMWORD[rax*1+rcx]
+ add rax,32
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+ movups xmm0,XMMWORD[((-16))+rax*1+rcx]
+ jnz NEAR $L$ccm64_enc2_loop
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+ paddq xmm6,xmm9
+ dec rdx
+DB 102,15,56,221,208
+DB 102,15,56,221,216
+
+ lea rdi,[16+rdi]
+ xorps xmm8,xmm2
+ movdqa xmm2,xmm6
+ movups XMMWORD[rsi],xmm8
+DB 102,15,56,0,215
+ lea rsi,[16+rsi]
+ jnz NEAR $L$ccm64_enc_outer
+
+ pxor xmm0,xmm0
+ pxor xmm1,xmm1
+ pxor xmm2,xmm2
+ movups XMMWORD[r9],xmm3
+ pxor xmm3,xmm3
+ pxor xmm8,xmm8
+ pxor xmm6,xmm6
+ movaps xmm6,XMMWORD[rsp]
+ movaps XMMWORD[rsp],xmm0
+ movaps xmm7,XMMWORD[16+rsp]
+ movaps XMMWORD[16+rsp],xmm0
+ movaps xmm8,XMMWORD[32+rsp]
+ movaps XMMWORD[32+rsp],xmm0
+ movaps xmm9,XMMWORD[48+rsp]
+ movaps XMMWORD[48+rsp],xmm0
+ lea rsp,[88+rsp]
+$L$ccm64_enc_ret:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_aesni_ccm64_encrypt_blocks:
+global aesni_ccm64_decrypt_blocks
+
+ALIGN 16
+aesni_ccm64_decrypt_blocks:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_aesni_ccm64_decrypt_blocks:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+ mov rcx,r9
+ mov r8,QWORD[40+rsp]
+ mov r9,QWORD[48+rsp]
+
+
+
+ lea rsp,[((-88))+rsp]
+ movaps XMMWORD[rsp],xmm6
+ movaps XMMWORD[16+rsp],xmm7
+ movaps XMMWORD[32+rsp],xmm8
+ movaps XMMWORD[48+rsp],xmm9
+$L$ccm64_dec_body:
+ mov eax,DWORD[240+rcx]
+ movups xmm6,XMMWORD[r8]
+ movdqu xmm3,XMMWORD[r9]
+ movdqa xmm9,XMMWORD[$L$increment64]
+ movdqa xmm7,XMMWORD[$L$bswap_mask]
+
+ movaps xmm2,xmm6
+ mov r10d,eax
+ mov r11,rcx
+DB 102,15,56,0,247
+ movups xmm0,XMMWORD[rcx]
+ movups xmm1,XMMWORD[16+rcx]
+ lea rcx,[32+rcx]
+ xorps xmm2,xmm0
+$L$oop_enc1_5:
+DB 102,15,56,220,209
+ dec eax
+ movups xmm1,XMMWORD[rcx]
+ lea rcx,[16+rcx]
+ jnz NEAR $L$oop_enc1_5
+DB 102,15,56,221,209
+ shl r10d,4
+ mov eax,16
+ movups xmm8,XMMWORD[rdi]
+ paddq xmm6,xmm9
+ lea rdi,[16+rdi]
+ sub rax,r10
+ lea rcx,[32+r10*1+r11]
+ mov r10,rax
+ jmp NEAR $L$ccm64_dec_outer
+ALIGN 16
+$L$ccm64_dec_outer:
+ xorps xmm8,xmm2
+ movdqa xmm2,xmm6
+ movups XMMWORD[rsi],xmm8
+ lea rsi,[16+rsi]
+DB 102,15,56,0,215
+
+ sub rdx,1
+ jz NEAR $L$ccm64_dec_break
+
+ movups xmm0,XMMWORD[r11]
+ mov rax,r10
+ movups xmm1,XMMWORD[16+r11]
+ xorps xmm8,xmm0
+ xorps xmm2,xmm0
+ xorps xmm3,xmm8
+ movups xmm0,XMMWORD[32+r11]
+ jmp NEAR $L$ccm64_dec2_loop
+ALIGN 16
+$L$ccm64_dec2_loop:
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+ movups xmm1,XMMWORD[rax*1+rcx]
+ add rax,32
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+ movups xmm0,XMMWORD[((-16))+rax*1+rcx]
+ jnz NEAR $L$ccm64_dec2_loop
+ movups xmm8,XMMWORD[rdi]
+ paddq xmm6,xmm9
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,221,208
+DB 102,15,56,221,216
+ lea rdi,[16+rdi]
+ jmp NEAR $L$ccm64_dec_outer
+
+ALIGN 16
+$L$ccm64_dec_break:
+
+ mov eax,DWORD[240+r11]
+ movups xmm0,XMMWORD[r11]
+ movups xmm1,XMMWORD[16+r11]
+ xorps xmm8,xmm0
+ lea r11,[32+r11]
+ xorps xmm3,xmm8
+$L$oop_enc1_6:
+DB 102,15,56,220,217
+ dec eax
+ movups xmm1,XMMWORD[r11]
+ lea r11,[16+r11]
+ jnz NEAR $L$oop_enc1_6
+DB 102,15,56,221,217
+ pxor xmm0,xmm0
+ pxor xmm1,xmm1
+ pxor xmm2,xmm2
+ movups XMMWORD[r9],xmm3
+ pxor xmm3,xmm3
+ pxor xmm8,xmm8
+ pxor xmm6,xmm6
+ movaps xmm6,XMMWORD[rsp]
+ movaps XMMWORD[rsp],xmm0
+ movaps xmm7,XMMWORD[16+rsp]
+ movaps XMMWORD[16+rsp],xmm0
+ movaps xmm8,XMMWORD[32+rsp]
+ movaps XMMWORD[32+rsp],xmm0
+ movaps xmm9,XMMWORD[48+rsp]
+ movaps XMMWORD[48+rsp],xmm0
+ lea rsp,[88+rsp]
+$L$ccm64_dec_ret:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_aesni_ccm64_decrypt_blocks:
+global aesni_ctr32_encrypt_blocks
+
+ALIGN 16
+aesni_ctr32_encrypt_blocks:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_aesni_ctr32_encrypt_blocks:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+ mov rcx,r9
+ mov r8,QWORD[40+rsp]
+
+
+
+ cmp rdx,1
+ jne NEAR $L$ctr32_bulk
+
+
+
+ movups xmm2,XMMWORD[r8]
+ movups xmm3,XMMWORD[rdi]
+ mov edx,DWORD[240+rcx]
+ movups xmm0,XMMWORD[rcx]
+ movups xmm1,XMMWORD[16+rcx]
+ lea rcx,[32+rcx]
+ xorps xmm2,xmm0
+$L$oop_enc1_7:
+DB 102,15,56,220,209
+ dec edx
+ movups xmm1,XMMWORD[rcx]
+ lea rcx,[16+rcx]
+ jnz NEAR $L$oop_enc1_7
+DB 102,15,56,221,209
+ pxor xmm0,xmm0
+ pxor xmm1,xmm1
+ xorps xmm2,xmm3
+ pxor xmm3,xmm3
+ movups XMMWORD[rsi],xmm2
+ xorps xmm2,xmm2
+ jmp NEAR $L$ctr32_epilogue
+
+ALIGN 16
+$L$ctr32_bulk:
+ lea r11,[rsp]
+
+ push rbp
+
+ sub rsp,288
+ and rsp,-16
+ movaps XMMWORD[(-168)+r11],xmm6
+ movaps XMMWORD[(-152)+r11],xmm7
+ movaps XMMWORD[(-136)+r11],xmm8
+ movaps XMMWORD[(-120)+r11],xmm9
+ movaps XMMWORD[(-104)+r11],xmm10
+ movaps XMMWORD[(-88)+r11],xmm11
+ movaps XMMWORD[(-72)+r11],xmm12
+ movaps XMMWORD[(-56)+r11],xmm13
+ movaps XMMWORD[(-40)+r11],xmm14
+ movaps XMMWORD[(-24)+r11],xmm15
+$L$ctr32_body:
+
+
+
+
+ movdqu xmm2,XMMWORD[r8]
+ movdqu xmm0,XMMWORD[rcx]
+ mov r8d,DWORD[12+r8]
+ pxor xmm2,xmm0
+ mov ebp,DWORD[12+rcx]
+ movdqa XMMWORD[rsp],xmm2
+ bswap r8d
+ movdqa xmm3,xmm2
+ movdqa xmm4,xmm2
+ movdqa xmm5,xmm2
+ movdqa XMMWORD[64+rsp],xmm2
+ movdqa XMMWORD[80+rsp],xmm2
+ movdqa XMMWORD[96+rsp],xmm2
+ mov r10,rdx
+ movdqa XMMWORD[112+rsp],xmm2
+
+ lea rax,[1+r8]
+ lea rdx,[2+r8]
+ bswap eax
+ bswap edx
+ xor eax,ebp
+ xor edx,ebp
+DB 102,15,58,34,216,3
+ lea rax,[3+r8]
+ movdqa XMMWORD[16+rsp],xmm3
+DB 102,15,58,34,226,3
+ bswap eax
+ mov rdx,r10
+ lea r10,[4+r8]
+ movdqa XMMWORD[32+rsp],xmm4
+ xor eax,ebp
+ bswap r10d
+DB 102,15,58,34,232,3
+ xor r10d,ebp
+ movdqa XMMWORD[48+rsp],xmm5
+ lea r9,[5+r8]
+ mov DWORD[((64+12))+rsp],r10d
+ bswap r9d
+ lea r10,[6+r8]
+ mov eax,DWORD[240+rcx]
+ xor r9d,ebp
+ bswap r10d
+ mov DWORD[((80+12))+rsp],r9d
+ xor r10d,ebp
+ lea r9,[7+r8]
+ mov DWORD[((96+12))+rsp],r10d
+ bswap r9d
+ mov r10d,DWORD[((OPENSSL_ia32cap_P+4))]
+ xor r9d,ebp
+ and r10d,71303168
+ mov DWORD[((112+12))+rsp],r9d
+
+ movups xmm1,XMMWORD[16+rcx]
+
+ movdqa xmm6,XMMWORD[64+rsp]
+ movdqa xmm7,XMMWORD[80+rsp]
+
+ cmp rdx,8
+ jb NEAR $L$ctr32_tail
+
+ sub rdx,6
+ cmp r10d,4194304
+ je NEAR $L$ctr32_6x
+
+ lea rcx,[128+rcx]
+ sub rdx,2
+ jmp NEAR $L$ctr32_loop8
+
+ALIGN 16
+$L$ctr32_6x:
+ shl eax,4
+ mov r10d,48
+ bswap ebp
+ lea rcx,[32+rax*1+rcx]
+ sub r10,rax
+ jmp NEAR $L$ctr32_loop6
+
+ALIGN 16
+$L$ctr32_loop6:
+ add r8d,6
+ movups xmm0,XMMWORD[((-48))+r10*1+rcx]
+DB 102,15,56,220,209
+ mov eax,r8d
+ xor eax,ebp
+DB 102,15,56,220,217
+DB 0x0f,0x38,0xf1,0x44,0x24,12
+ lea eax,[1+r8]
+DB 102,15,56,220,225
+ xor eax,ebp
+DB 0x0f,0x38,0xf1,0x44,0x24,28
+DB 102,15,56,220,233
+ lea eax,[2+r8]
+ xor eax,ebp
+DB 102,15,56,220,241
+DB 0x0f,0x38,0xf1,0x44,0x24,44
+ lea eax,[3+r8]
+DB 102,15,56,220,249
+ movups xmm1,XMMWORD[((-32))+r10*1+rcx]
+ xor eax,ebp
+
+DB 102,15,56,220,208
+DB 0x0f,0x38,0xf1,0x44,0x24,60
+ lea eax,[4+r8]
+DB 102,15,56,220,216
+ xor eax,ebp
+DB 0x0f,0x38,0xf1,0x44,0x24,76
+DB 102,15,56,220,224
+ lea eax,[5+r8]
+ xor eax,ebp
+DB 102,15,56,220,232
+DB 0x0f,0x38,0xf1,0x44,0x24,92
+ mov rax,r10
+DB 102,15,56,220,240
+DB 102,15,56,220,248
+ movups xmm0,XMMWORD[((-16))+r10*1+rcx]
+
+ call $L$enc_loop6
+
+ movdqu xmm8,XMMWORD[rdi]
+ movdqu xmm9,XMMWORD[16+rdi]
+ movdqu xmm10,XMMWORD[32+rdi]
+ movdqu xmm11,XMMWORD[48+rdi]
+ movdqu xmm12,XMMWORD[64+rdi]
+ movdqu xmm13,XMMWORD[80+rdi]
+ lea rdi,[96+rdi]
+ movups xmm1,XMMWORD[((-64))+r10*1+rcx]
+ pxor xmm8,xmm2
+ movaps xmm2,XMMWORD[rsp]
+ pxor xmm9,xmm3
+ movaps xmm3,XMMWORD[16+rsp]
+ pxor xmm10,xmm4
+ movaps xmm4,XMMWORD[32+rsp]
+ pxor xmm11,xmm5
+ movaps xmm5,XMMWORD[48+rsp]
+ pxor xmm12,xmm6
+ movaps xmm6,XMMWORD[64+rsp]
+ pxor xmm13,xmm7
+ movaps xmm7,XMMWORD[80+rsp]
+ movdqu XMMWORD[rsi],xmm8
+ movdqu XMMWORD[16+rsi],xmm9
+ movdqu XMMWORD[32+rsi],xmm10
+ movdqu XMMWORD[48+rsi],xmm11
+ movdqu XMMWORD[64+rsi],xmm12
+ movdqu XMMWORD[80+rsi],xmm13
+ lea rsi,[96+rsi]
+
+ sub rdx,6
+ jnc NEAR $L$ctr32_loop6
+
+ add rdx,6
+ jz NEAR $L$ctr32_done
+
+ lea eax,[((-48))+r10]
+ lea rcx,[((-80))+r10*1+rcx]
+ neg eax
+ shr eax,4
+ jmp NEAR $L$ctr32_tail
+
+ALIGN 32
+$L$ctr32_loop8:
+ add r8d,8
+ movdqa xmm8,XMMWORD[96+rsp]
+DB 102,15,56,220,209
+ mov r9d,r8d
+ movdqa xmm9,XMMWORD[112+rsp]
+DB 102,15,56,220,217
+ bswap r9d
+ movups xmm0,XMMWORD[((32-128))+rcx]
+DB 102,15,56,220,225
+ xor r9d,ebp
+ nop
+DB 102,15,56,220,233
+ mov DWORD[((0+12))+rsp],r9d
+ lea r9,[1+r8]
+DB 102,15,56,220,241
+DB 102,15,56,220,249
+DB 102,68,15,56,220,193
+DB 102,68,15,56,220,201
+ movups xmm1,XMMWORD[((48-128))+rcx]
+ bswap r9d
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+ xor r9d,ebp
+DB 0x66,0x90
+DB 102,15,56,220,224
+DB 102,15,56,220,232
+ mov DWORD[((16+12))+rsp],r9d
+ lea r9,[2+r8]
+DB 102,15,56,220,240
+DB 102,15,56,220,248
+DB 102,68,15,56,220,192
+DB 102,68,15,56,220,200
+ movups xmm0,XMMWORD[((64-128))+rcx]
+ bswap r9d
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+ xor r9d,ebp
+DB 0x66,0x90
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+ mov DWORD[((32+12))+rsp],r9d
+ lea r9,[3+r8]
+DB 102,15,56,220,241
+DB 102,15,56,220,249
+DB 102,68,15,56,220,193
+DB 102,68,15,56,220,201
+ movups xmm1,XMMWORD[((80-128))+rcx]
+ bswap r9d
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+ xor r9d,ebp
+DB 0x66,0x90
+DB 102,15,56,220,224
+DB 102,15,56,220,232
+ mov DWORD[((48+12))+rsp],r9d
+ lea r9,[4+r8]
+DB 102,15,56,220,240
+DB 102,15,56,220,248
+DB 102,68,15,56,220,192
+DB 102,68,15,56,220,200
+ movups xmm0,XMMWORD[((96-128))+rcx]
+ bswap r9d
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+ xor r9d,ebp
+DB 0x66,0x90
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+ mov DWORD[((64+12))+rsp],r9d
+ lea r9,[5+r8]
+DB 102,15,56,220,241
+DB 102,15,56,220,249
+DB 102,68,15,56,220,193
+DB 102,68,15,56,220,201
+ movups xmm1,XMMWORD[((112-128))+rcx]
+ bswap r9d
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+ xor r9d,ebp
+DB 0x66,0x90
+DB 102,15,56,220,224
+DB 102,15,56,220,232
+ mov DWORD[((80+12))+rsp],r9d
+ lea r9,[6+r8]
+DB 102,15,56,220,240
+DB 102,15,56,220,248
+DB 102,68,15,56,220,192
+DB 102,68,15,56,220,200
+ movups xmm0,XMMWORD[((128-128))+rcx]
+ bswap r9d
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+ xor r9d,ebp
+DB 0x66,0x90
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+ mov DWORD[((96+12))+rsp],r9d
+ lea r9,[7+r8]
+DB 102,15,56,220,241
+DB 102,15,56,220,249
+DB 102,68,15,56,220,193
+DB 102,68,15,56,220,201
+ movups xmm1,XMMWORD[((144-128))+rcx]
+ bswap r9d
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+DB 102,15,56,220,224
+ xor r9d,ebp
+ movdqu xmm10,XMMWORD[rdi]
+DB 102,15,56,220,232
+ mov DWORD[((112+12))+rsp],r9d
+ cmp eax,11
+DB 102,15,56,220,240
+DB 102,15,56,220,248
+DB 102,68,15,56,220,192
+DB 102,68,15,56,220,200
+ movups xmm0,XMMWORD[((160-128))+rcx]
+
+ jb NEAR $L$ctr32_enc_done
+
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+DB 102,15,56,220,241
+DB 102,15,56,220,249
+DB 102,68,15,56,220,193
+DB 102,68,15,56,220,201
+ movups xmm1,XMMWORD[((176-128))+rcx]
+
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+DB 102,15,56,220,224
+DB 102,15,56,220,232
+DB 102,15,56,220,240
+DB 102,15,56,220,248
+DB 102,68,15,56,220,192
+DB 102,68,15,56,220,200
+ movups xmm0,XMMWORD[((192-128))+rcx]
+ je NEAR $L$ctr32_enc_done
+
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+DB 102,15,56,220,241
+DB 102,15,56,220,249
+DB 102,68,15,56,220,193
+DB 102,68,15,56,220,201
+ movups xmm1,XMMWORD[((208-128))+rcx]
+
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+DB 102,15,56,220,224
+DB 102,15,56,220,232
+DB 102,15,56,220,240
+DB 102,15,56,220,248
+DB 102,68,15,56,220,192
+DB 102,68,15,56,220,200
+ movups xmm0,XMMWORD[((224-128))+rcx]
+ jmp NEAR $L$ctr32_enc_done
+
+ALIGN 16
+$L$ctr32_enc_done:
+ movdqu xmm11,XMMWORD[16+rdi]
+ pxor xmm10,xmm0
+ movdqu xmm12,XMMWORD[32+rdi]
+ pxor xmm11,xmm0
+ movdqu xmm13,XMMWORD[48+rdi]
+ pxor xmm12,xmm0
+ movdqu xmm14,XMMWORD[64+rdi]
+ pxor xmm13,xmm0
+ movdqu xmm15,XMMWORD[80+rdi]
+ pxor xmm14,xmm0
+ pxor xmm15,xmm0
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+DB 102,15,56,220,241
+DB 102,15,56,220,249
+DB 102,68,15,56,220,193
+DB 102,68,15,56,220,201
+ movdqu xmm1,XMMWORD[96+rdi]
+ lea rdi,[128+rdi]
+
+DB 102,65,15,56,221,210
+ pxor xmm1,xmm0
+ movdqu xmm10,XMMWORD[((112-128))+rdi]
+DB 102,65,15,56,221,219
+ pxor xmm10,xmm0
+ movdqa xmm11,XMMWORD[rsp]
+DB 102,65,15,56,221,228
+DB 102,65,15,56,221,237
+ movdqa xmm12,XMMWORD[16+rsp]
+ movdqa xmm13,XMMWORD[32+rsp]
+DB 102,65,15,56,221,246
+DB 102,65,15,56,221,255
+ movdqa xmm14,XMMWORD[48+rsp]
+ movdqa xmm15,XMMWORD[64+rsp]
+DB 102,68,15,56,221,193
+ movdqa xmm0,XMMWORD[80+rsp]
+ movups xmm1,XMMWORD[((16-128))+rcx]
+DB 102,69,15,56,221,202
+
+ movups XMMWORD[rsi],xmm2
+ movdqa xmm2,xmm11
+ movups XMMWORD[16+rsi],xmm3
+ movdqa xmm3,xmm12
+ movups XMMWORD[32+rsi],xmm4
+ movdqa xmm4,xmm13
+ movups XMMWORD[48+rsi],xmm5
+ movdqa xmm5,xmm14
+ movups XMMWORD[64+rsi],xmm6
+ movdqa xmm6,xmm15
+ movups XMMWORD[80+rsi],xmm7
+ movdqa xmm7,xmm0
+ movups XMMWORD[96+rsi],xmm8
+ movups XMMWORD[112+rsi],xmm9
+ lea rsi,[128+rsi]
+
+ sub rdx,8
+ jnc NEAR $L$ctr32_loop8
+
+ add rdx,8
+ jz NEAR $L$ctr32_done
+ lea rcx,[((-128))+rcx]
+
+$L$ctr32_tail:
+
+
+ lea rcx,[16+rcx]
+ cmp rdx,4
+ jb NEAR $L$ctr32_loop3
+ je NEAR $L$ctr32_loop4
+
+
+ shl eax,4
+ movdqa xmm8,XMMWORD[96+rsp]
+ pxor xmm9,xmm9
+
+ movups xmm0,XMMWORD[16+rcx]
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+ lea rcx,[((32-16))+rax*1+rcx]
+ neg rax
+DB 102,15,56,220,225
+ add rax,16
+ movups xmm10,XMMWORD[rdi]
+DB 102,15,56,220,233
+DB 102,15,56,220,241
+ movups xmm11,XMMWORD[16+rdi]
+ movups xmm12,XMMWORD[32+rdi]
+DB 102,15,56,220,249
+DB 102,68,15,56,220,193
+
+ call $L$enc_loop8_enter
+
+ movdqu xmm13,XMMWORD[48+rdi]
+ pxor xmm2,xmm10
+ movdqu xmm10,XMMWORD[64+rdi]
+ pxor xmm3,xmm11
+ movdqu XMMWORD[rsi],xmm2
+ pxor xmm4,xmm12
+ movdqu XMMWORD[16+rsi],xmm3
+ pxor xmm5,xmm13
+ movdqu XMMWORD[32+rsi],xmm4
+ pxor xmm6,xmm10
+ movdqu XMMWORD[48+rsi],xmm5
+ movdqu XMMWORD[64+rsi],xmm6
+ cmp rdx,6
+ jb NEAR $L$ctr32_done
+
+ movups xmm11,XMMWORD[80+rdi]
+ xorps xmm7,xmm11
+ movups XMMWORD[80+rsi],xmm7
+ je NEAR $L$ctr32_done
+
+ movups xmm12,XMMWORD[96+rdi]
+ xorps xmm8,xmm12
+ movups XMMWORD[96+rsi],xmm8
+ jmp NEAR $L$ctr32_done
+
+ALIGN 32
+$L$ctr32_loop4:
+DB 102,15,56,220,209
+ lea rcx,[16+rcx]
+ dec eax
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+ movups xmm1,XMMWORD[rcx]
+ jnz NEAR $L$ctr32_loop4
+DB 102,15,56,221,209
+DB 102,15,56,221,217
+ movups xmm10,XMMWORD[rdi]
+ movups xmm11,XMMWORD[16+rdi]
+DB 102,15,56,221,225
+DB 102,15,56,221,233
+ movups xmm12,XMMWORD[32+rdi]
+ movups xmm13,XMMWORD[48+rdi]
+
+ xorps xmm2,xmm10
+ movups XMMWORD[rsi],xmm2
+ xorps xmm3,xmm11
+ movups XMMWORD[16+rsi],xmm3
+ pxor xmm4,xmm12
+ movdqu XMMWORD[32+rsi],xmm4
+ pxor xmm5,xmm13
+ movdqu XMMWORD[48+rsi],xmm5
+ jmp NEAR $L$ctr32_done
+
+ALIGN 32
+$L$ctr32_loop3:
+DB 102,15,56,220,209
+ lea rcx,[16+rcx]
+ dec eax
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+ movups xmm1,XMMWORD[rcx]
+ jnz NEAR $L$ctr32_loop3
+DB 102,15,56,221,209
+DB 102,15,56,221,217
+DB 102,15,56,221,225
+
+ movups xmm10,XMMWORD[rdi]
+ xorps xmm2,xmm10
+ movups XMMWORD[rsi],xmm2
+ cmp rdx,2
+ jb NEAR $L$ctr32_done
+
+ movups xmm11,XMMWORD[16+rdi]
+ xorps xmm3,xmm11
+ movups XMMWORD[16+rsi],xmm3
+ je NEAR $L$ctr32_done
+
+ movups xmm12,XMMWORD[32+rdi]
+ xorps xmm4,xmm12
+ movups XMMWORD[32+rsi],xmm4
+
+$L$ctr32_done:
+ xorps xmm0,xmm0
+ xor ebp,ebp
+ pxor xmm1,xmm1
+ pxor xmm2,xmm2
+ pxor xmm3,xmm3
+ pxor xmm4,xmm4
+ pxor xmm5,xmm5
+ movaps xmm6,XMMWORD[((-168))+r11]
+ movaps XMMWORD[(-168)+r11],xmm0
+ movaps xmm7,XMMWORD[((-152))+r11]
+ movaps XMMWORD[(-152)+r11],xmm0
+ movaps xmm8,XMMWORD[((-136))+r11]
+ movaps XMMWORD[(-136)+r11],xmm0
+ movaps xmm9,XMMWORD[((-120))+r11]
+ movaps XMMWORD[(-120)+r11],xmm0
+ movaps xmm10,XMMWORD[((-104))+r11]
+ movaps XMMWORD[(-104)+r11],xmm0
+ movaps xmm11,XMMWORD[((-88))+r11]
+ movaps XMMWORD[(-88)+r11],xmm0
+ movaps xmm12,XMMWORD[((-72))+r11]
+ movaps XMMWORD[(-72)+r11],xmm0
+ movaps xmm13,XMMWORD[((-56))+r11]
+ movaps XMMWORD[(-56)+r11],xmm0
+ movaps xmm14,XMMWORD[((-40))+r11]
+ movaps XMMWORD[(-40)+r11],xmm0
+ movaps xmm15,XMMWORD[((-24))+r11]
+ movaps XMMWORD[(-24)+r11],xmm0
+ movaps XMMWORD[rsp],xmm0
+ movaps XMMWORD[16+rsp],xmm0
+ movaps XMMWORD[32+rsp],xmm0
+ movaps XMMWORD[48+rsp],xmm0
+ movaps XMMWORD[64+rsp],xmm0
+ movaps XMMWORD[80+rsp],xmm0
+ movaps XMMWORD[96+rsp],xmm0
+ movaps XMMWORD[112+rsp],xmm0
+ mov rbp,QWORD[((-8))+r11]
+
+ lea rsp,[r11]
+
+$L$ctr32_epilogue:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_aesni_ctr32_encrypt_blocks:
+global aesni_xts_encrypt
+
+ALIGN 16
+aesni_xts_encrypt:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_aesni_xts_encrypt:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+ mov rcx,r9
+ mov r8,QWORD[40+rsp]
+ mov r9,QWORD[48+rsp]
+
+
+
+ lea r11,[rsp]
+
+ push rbp
+
+ sub rsp,272
+ and rsp,-16
+ movaps XMMWORD[(-168)+r11],xmm6
+ movaps XMMWORD[(-152)+r11],xmm7
+ movaps XMMWORD[(-136)+r11],xmm8
+ movaps XMMWORD[(-120)+r11],xmm9
+ movaps XMMWORD[(-104)+r11],xmm10
+ movaps XMMWORD[(-88)+r11],xmm11
+ movaps XMMWORD[(-72)+r11],xmm12
+ movaps XMMWORD[(-56)+r11],xmm13
+ movaps XMMWORD[(-40)+r11],xmm14
+ movaps XMMWORD[(-24)+r11],xmm15
+$L$xts_enc_body:
+ movups xmm2,XMMWORD[r9]
+ mov eax,DWORD[240+r8]
+ mov r10d,DWORD[240+rcx]
+ movups xmm0,XMMWORD[r8]
+ movups xmm1,XMMWORD[16+r8]
+ lea r8,[32+r8]
+ xorps xmm2,xmm0
+$L$oop_enc1_8:
+DB 102,15,56,220,209
+ dec eax
+ movups xmm1,XMMWORD[r8]
+ lea r8,[16+r8]
+ jnz NEAR $L$oop_enc1_8
+DB 102,15,56,221,209
+ movups xmm0,XMMWORD[rcx]
+ mov rbp,rcx
+ mov eax,r10d
+ shl r10d,4
+ mov r9,rdx
+ and rdx,-16
+
+ movups xmm1,XMMWORD[16+r10*1+rcx]
+
+ movdqa xmm8,XMMWORD[$L$xts_magic]
+ movdqa xmm15,xmm2
+ pshufd xmm9,xmm2,0x5f
+ pxor xmm1,xmm0
+ movdqa xmm14,xmm9
+ paddd xmm9,xmm9
+ movdqa xmm10,xmm15
+ psrad xmm14,31
+ paddq xmm15,xmm15
+ pand xmm14,xmm8
+ pxor xmm10,xmm0
+ pxor xmm15,xmm14
+ movdqa xmm14,xmm9
+ paddd xmm9,xmm9
+ movdqa xmm11,xmm15
+ psrad xmm14,31
+ paddq xmm15,xmm15
+ pand xmm14,xmm8
+ pxor xmm11,xmm0
+ pxor xmm15,xmm14
+ movdqa xmm14,xmm9
+ paddd xmm9,xmm9
+ movdqa xmm12,xmm15
+ psrad xmm14,31
+ paddq xmm15,xmm15
+ pand xmm14,xmm8
+ pxor xmm12,xmm0
+ pxor xmm15,xmm14
+ movdqa xmm14,xmm9
+ paddd xmm9,xmm9
+ movdqa xmm13,xmm15
+ psrad xmm14,31
+ paddq xmm15,xmm15
+ pand xmm14,xmm8
+ pxor xmm13,xmm0
+ pxor xmm15,xmm14
+ movdqa xmm14,xmm15
+ psrad xmm9,31
+ paddq xmm15,xmm15
+ pand xmm9,xmm8
+ pxor xmm14,xmm0
+ pxor xmm15,xmm9
+ movaps XMMWORD[96+rsp],xmm1
+
+ sub rdx,16*6
+ jc NEAR $L$xts_enc_short
+
+ mov eax,16+96
+ lea rcx,[32+r10*1+rbp]
+ sub rax,r10
+ movups xmm1,XMMWORD[16+rbp]
+ mov r10,rax
+ lea r8,[$L$xts_magic]
+ jmp NEAR $L$xts_enc_grandloop
+
+ALIGN 32
+$L$xts_enc_grandloop:
+ movdqu xmm2,XMMWORD[rdi]
+ movdqa xmm8,xmm0
+ movdqu xmm3,XMMWORD[16+rdi]
+ pxor xmm2,xmm10
+ movdqu xmm4,XMMWORD[32+rdi]
+ pxor xmm3,xmm11
+DB 102,15,56,220,209
+ movdqu xmm5,XMMWORD[48+rdi]
+ pxor xmm4,xmm12
+DB 102,15,56,220,217
+ movdqu xmm6,XMMWORD[64+rdi]
+ pxor xmm5,xmm13
+DB 102,15,56,220,225
+ movdqu xmm7,XMMWORD[80+rdi]
+ pxor xmm8,xmm15
+ movdqa xmm9,XMMWORD[96+rsp]
+ pxor xmm6,xmm14
+DB 102,15,56,220,233
+ movups xmm0,XMMWORD[32+rbp]
+ lea rdi,[96+rdi]
+ pxor xmm7,xmm8
+
+ pxor xmm10,xmm9
+DB 102,15,56,220,241
+ pxor xmm11,xmm9
+ movdqa XMMWORD[rsp],xmm10
+DB 102,15,56,220,249
+ movups xmm1,XMMWORD[48+rbp]
+ pxor xmm12,xmm9
+
+DB 102,15,56,220,208
+ pxor xmm13,xmm9
+ movdqa XMMWORD[16+rsp],xmm11
+DB 102,15,56,220,216
+ pxor xmm14,xmm9
+ movdqa XMMWORD[32+rsp],xmm12
+DB 102,15,56,220,224
+DB 102,15,56,220,232
+ pxor xmm8,xmm9
+ movdqa XMMWORD[64+rsp],xmm14
+DB 102,15,56,220,240
+DB 102,15,56,220,248
+ movups xmm0,XMMWORD[64+rbp]
+ movdqa XMMWORD[80+rsp],xmm8
+ pshufd xmm9,xmm15,0x5f
+ jmp NEAR $L$xts_enc_loop6
+ALIGN 32
+$L$xts_enc_loop6:
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+DB 102,15,56,220,241
+DB 102,15,56,220,249
+ movups xmm1,XMMWORD[((-64))+rax*1+rcx]
+ add rax,32
+
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+DB 102,15,56,220,224
+DB 102,15,56,220,232
+DB 102,15,56,220,240
+DB 102,15,56,220,248
+ movups xmm0,XMMWORD[((-80))+rax*1+rcx]
+ jnz NEAR $L$xts_enc_loop6
+
+ movdqa xmm8,XMMWORD[r8]
+ movdqa xmm14,xmm9
+ paddd xmm9,xmm9
+DB 102,15,56,220,209
+ paddq xmm15,xmm15
+ psrad xmm14,31
+DB 102,15,56,220,217
+ pand xmm14,xmm8
+ movups xmm10,XMMWORD[rbp]
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+DB 102,15,56,220,241
+ pxor xmm15,xmm14
+ movaps xmm11,xmm10
+DB 102,15,56,220,249
+ movups xmm1,XMMWORD[((-64))+rcx]
+
+ movdqa xmm14,xmm9
+DB 102,15,56,220,208
+ paddd xmm9,xmm9
+ pxor xmm10,xmm15
+DB 102,15,56,220,216
+ psrad xmm14,31
+ paddq xmm15,xmm15
+DB 102,15,56,220,224
+DB 102,15,56,220,232
+ pand xmm14,xmm8
+ movaps xmm12,xmm11
+DB 102,15,56,220,240
+ pxor xmm15,xmm14
+ movdqa xmm14,xmm9
+DB 102,15,56,220,248
+ movups xmm0,XMMWORD[((-48))+rcx]
+
+ paddd xmm9,xmm9
+DB 102,15,56,220,209
+ pxor xmm11,xmm15
+ psrad xmm14,31
+DB 102,15,56,220,217
+ paddq xmm15,xmm15
+ pand xmm14,xmm8
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+ movdqa XMMWORD[48+rsp],xmm13
+ pxor xmm15,xmm14
+DB 102,15,56,220,241
+ movaps xmm13,xmm12
+ movdqa xmm14,xmm9
+DB 102,15,56,220,249
+ movups xmm1,XMMWORD[((-32))+rcx]
+
+ paddd xmm9,xmm9
+DB 102,15,56,220,208
+ pxor xmm12,xmm15
+ psrad xmm14,31
+DB 102,15,56,220,216
+ paddq xmm15,xmm15
+ pand xmm14,xmm8
+DB 102,15,56,220,224
+DB 102,15,56,220,232
+DB 102,15,56,220,240
+ pxor xmm15,xmm14
+ movaps xmm14,xmm13
+DB 102,15,56,220,248
+
+ movdqa xmm0,xmm9
+ paddd xmm9,xmm9
+DB 102,15,56,220,209
+ pxor xmm13,xmm15
+ psrad xmm0,31
+DB 102,15,56,220,217
+ paddq xmm15,xmm15
+ pand xmm0,xmm8
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+ pxor xmm15,xmm0
+ movups xmm0,XMMWORD[rbp]
+DB 102,15,56,220,241
+DB 102,15,56,220,249
+ movups xmm1,XMMWORD[16+rbp]
+
+ pxor xmm14,xmm15
+DB 102,15,56,221,84,36,0
+ psrad xmm9,31
+ paddq xmm15,xmm15
+DB 102,15,56,221,92,36,16
+DB 102,15,56,221,100,36,32
+ pand xmm9,xmm8
+ mov rax,r10
+DB 102,15,56,221,108,36,48
+DB 102,15,56,221,116,36,64
+DB 102,15,56,221,124,36,80
+ pxor xmm15,xmm9
+
+ lea rsi,[96+rsi]
+ movups XMMWORD[(-96)+rsi],xmm2
+ movups XMMWORD[(-80)+rsi],xmm3
+ movups XMMWORD[(-64)+rsi],xmm4
+ movups XMMWORD[(-48)+rsi],xmm5
+ movups XMMWORD[(-32)+rsi],xmm6
+ movups XMMWORD[(-16)+rsi],xmm7
+ sub rdx,16*6
+ jnc NEAR $L$xts_enc_grandloop
+
+ mov eax,16+96
+ sub eax,r10d
+ mov rcx,rbp
+ shr eax,4
+
+$L$xts_enc_short:
+
+ mov r10d,eax
+ pxor xmm10,xmm0
+ add rdx,16*6
+ jz NEAR $L$xts_enc_done
+
+ pxor xmm11,xmm0
+ cmp rdx,0x20
+ jb NEAR $L$xts_enc_one
+ pxor xmm12,xmm0
+ je NEAR $L$xts_enc_two
+
+ pxor xmm13,xmm0
+ cmp rdx,0x40
+ jb NEAR $L$xts_enc_three
+ pxor xmm14,xmm0
+ je NEAR $L$xts_enc_four
+
+ movdqu xmm2,XMMWORD[rdi]
+ movdqu xmm3,XMMWORD[16+rdi]
+ movdqu xmm4,XMMWORD[32+rdi]
+ pxor xmm2,xmm10
+ movdqu xmm5,XMMWORD[48+rdi]
+ pxor xmm3,xmm11
+ movdqu xmm6,XMMWORD[64+rdi]
+ lea rdi,[80+rdi]
+ pxor xmm4,xmm12
+ pxor xmm5,xmm13
+ pxor xmm6,xmm14
+ pxor xmm7,xmm7
+
+ call _aesni_encrypt6
+
+ xorps xmm2,xmm10
+ movdqa xmm10,xmm15
+ xorps xmm3,xmm11
+ xorps xmm4,xmm12
+ movdqu XMMWORD[rsi],xmm2
+ xorps xmm5,xmm13
+ movdqu XMMWORD[16+rsi],xmm3
+ xorps xmm6,xmm14
+ movdqu XMMWORD[32+rsi],xmm4
+ movdqu XMMWORD[48+rsi],xmm5
+ movdqu XMMWORD[64+rsi],xmm6
+ lea rsi,[80+rsi]
+ jmp NEAR $L$xts_enc_done
+
+ALIGN 16
+$L$xts_enc_one:
+ movups xmm2,XMMWORD[rdi]
+ lea rdi,[16+rdi]
+ xorps xmm2,xmm10
+ movups xmm0,XMMWORD[rcx]
+ movups xmm1,XMMWORD[16+rcx]
+ lea rcx,[32+rcx]
+ xorps xmm2,xmm0
+$L$oop_enc1_9:
+DB 102,15,56,220,209
+ dec eax
+ movups xmm1,XMMWORD[rcx]
+ lea rcx,[16+rcx]
+ jnz NEAR $L$oop_enc1_9
+DB 102,15,56,221,209
+ xorps xmm2,xmm10
+ movdqa xmm10,xmm11
+ movups XMMWORD[rsi],xmm2
+ lea rsi,[16+rsi]
+ jmp NEAR $L$xts_enc_done
+
+ALIGN 16
+$L$xts_enc_two:
+ movups xmm2,XMMWORD[rdi]
+ movups xmm3,XMMWORD[16+rdi]
+ lea rdi,[32+rdi]
+ xorps xmm2,xmm10
+ xorps xmm3,xmm11
+
+ call _aesni_encrypt2
+
+ xorps xmm2,xmm10
+ movdqa xmm10,xmm12
+ xorps xmm3,xmm11
+ movups XMMWORD[rsi],xmm2
+ movups XMMWORD[16+rsi],xmm3
+ lea rsi,[32+rsi]
+ jmp NEAR $L$xts_enc_done
+
+ALIGN 16
+$L$xts_enc_three:
+ movups xmm2,XMMWORD[rdi]
+ movups xmm3,XMMWORD[16+rdi]
+ movups xmm4,XMMWORD[32+rdi]
+ lea rdi,[48+rdi]
+ xorps xmm2,xmm10
+ xorps xmm3,xmm11
+ xorps xmm4,xmm12
+
+ call _aesni_encrypt3
+
+ xorps xmm2,xmm10
+ movdqa xmm10,xmm13
+ xorps xmm3,xmm11
+ xorps xmm4,xmm12
+ movups XMMWORD[rsi],xmm2
+ movups XMMWORD[16+rsi],xmm3
+ movups XMMWORD[32+rsi],xmm4
+ lea rsi,[48+rsi]
+ jmp NEAR $L$xts_enc_done
+
+ALIGN 16
+$L$xts_enc_four:
+ movups xmm2,XMMWORD[rdi]
+ movups xmm3,XMMWORD[16+rdi]
+ movups xmm4,XMMWORD[32+rdi]
+ xorps xmm2,xmm10
+ movups xmm5,XMMWORD[48+rdi]
+ lea rdi,[64+rdi]
+ xorps xmm3,xmm11
+ xorps xmm4,xmm12
+ xorps xmm5,xmm13
+
+ call _aesni_encrypt4
+
+ pxor xmm2,xmm10
+ movdqa xmm10,xmm14
+ pxor xmm3,xmm11
+ pxor xmm4,xmm12
+ movdqu XMMWORD[rsi],xmm2
+ pxor xmm5,xmm13
+ movdqu XMMWORD[16+rsi],xmm3
+ movdqu XMMWORD[32+rsi],xmm4
+ movdqu XMMWORD[48+rsi],xmm5
+ lea rsi,[64+rsi]
+ jmp NEAR $L$xts_enc_done
+
+ALIGN 16
+$L$xts_enc_done:
+ and r9,15
+ jz NEAR $L$xts_enc_ret
+ mov rdx,r9
+
+$L$xts_enc_steal:
+ movzx eax,BYTE[rdi]
+ movzx ecx,BYTE[((-16))+rsi]
+ lea rdi,[1+rdi]
+ mov BYTE[((-16))+rsi],al
+ mov BYTE[rsi],cl
+ lea rsi,[1+rsi]
+ sub rdx,1
+ jnz NEAR $L$xts_enc_steal
+
+ sub rsi,r9
+ mov rcx,rbp
+ mov eax,r10d
+
+ movups xmm2,XMMWORD[((-16))+rsi]
+ xorps xmm2,xmm10
+ movups xmm0,XMMWORD[rcx]
+ movups xmm1,XMMWORD[16+rcx]
+ lea rcx,[32+rcx]
+ xorps xmm2,xmm0
+$L$oop_enc1_10:
+DB 102,15,56,220,209
+ dec eax
+ movups xmm1,XMMWORD[rcx]
+ lea rcx,[16+rcx]
+ jnz NEAR $L$oop_enc1_10
+DB 102,15,56,221,209
+ xorps xmm2,xmm10
+ movups XMMWORD[(-16)+rsi],xmm2
+
+$L$xts_enc_ret:
+ xorps xmm0,xmm0
+ pxor xmm1,xmm1
+ pxor xmm2,xmm2
+ pxor xmm3,xmm3
+ pxor xmm4,xmm4
+ pxor xmm5,xmm5
+ movaps xmm6,XMMWORD[((-168))+r11]
+ movaps XMMWORD[(-168)+r11],xmm0
+ movaps xmm7,XMMWORD[((-152))+r11]
+ movaps XMMWORD[(-152)+r11],xmm0
+ movaps xmm8,XMMWORD[((-136))+r11]
+ movaps XMMWORD[(-136)+r11],xmm0
+ movaps xmm9,XMMWORD[((-120))+r11]
+ movaps XMMWORD[(-120)+r11],xmm0
+ movaps xmm10,XMMWORD[((-104))+r11]
+ movaps XMMWORD[(-104)+r11],xmm0
+ movaps xmm11,XMMWORD[((-88))+r11]
+ movaps XMMWORD[(-88)+r11],xmm0
+ movaps xmm12,XMMWORD[((-72))+r11]
+ movaps XMMWORD[(-72)+r11],xmm0
+ movaps xmm13,XMMWORD[((-56))+r11]
+ movaps XMMWORD[(-56)+r11],xmm0
+ movaps xmm14,XMMWORD[((-40))+r11]
+ movaps XMMWORD[(-40)+r11],xmm0
+ movaps xmm15,XMMWORD[((-24))+r11]
+ movaps XMMWORD[(-24)+r11],xmm0
+ movaps XMMWORD[rsp],xmm0
+ movaps XMMWORD[16+rsp],xmm0
+ movaps XMMWORD[32+rsp],xmm0
+ movaps XMMWORD[48+rsp],xmm0
+ movaps XMMWORD[64+rsp],xmm0
+ movaps XMMWORD[80+rsp],xmm0
+ movaps XMMWORD[96+rsp],xmm0
+ mov rbp,QWORD[((-8))+r11]
+
+ lea rsp,[r11]
+
+$L$xts_enc_epilogue:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_aesni_xts_encrypt:
+global aesni_xts_decrypt
+
+ALIGN 16
+aesni_xts_decrypt:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_aesni_xts_decrypt:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+ mov rcx,r9
+ mov r8,QWORD[40+rsp]
+ mov r9,QWORD[48+rsp]
+
+
+
+ lea r11,[rsp]
+
+ push rbp
+
+ sub rsp,272
+ and rsp,-16
+ movaps XMMWORD[(-168)+r11],xmm6
+ movaps XMMWORD[(-152)+r11],xmm7
+ movaps XMMWORD[(-136)+r11],xmm8
+ movaps XMMWORD[(-120)+r11],xmm9
+ movaps XMMWORD[(-104)+r11],xmm10
+ movaps XMMWORD[(-88)+r11],xmm11
+ movaps XMMWORD[(-72)+r11],xmm12
+ movaps XMMWORD[(-56)+r11],xmm13
+ movaps XMMWORD[(-40)+r11],xmm14
+ movaps XMMWORD[(-24)+r11],xmm15
+$L$xts_dec_body:
+ movups xmm2,XMMWORD[r9]
+ mov eax,DWORD[240+r8]
+ mov r10d,DWORD[240+rcx]
+ movups xmm0,XMMWORD[r8]
+ movups xmm1,XMMWORD[16+r8]
+ lea r8,[32+r8]
+ xorps xmm2,xmm0
+$L$oop_enc1_11:
+DB 102,15,56,220,209
+ dec eax
+ movups xmm1,XMMWORD[r8]
+ lea r8,[16+r8]
+ jnz NEAR $L$oop_enc1_11
+DB 102,15,56,221,209
+ xor eax,eax
+ test rdx,15
+ setnz al
+ shl rax,4
+ sub rdx,rax
+
+ movups xmm0,XMMWORD[rcx]
+ mov rbp,rcx
+ mov eax,r10d
+ shl r10d,4
+ mov r9,rdx
+ and rdx,-16
+
+ movups xmm1,XMMWORD[16+r10*1+rcx]
+
+ movdqa xmm8,XMMWORD[$L$xts_magic]
+ movdqa xmm15,xmm2
+ pshufd xmm9,xmm2,0x5f
+ pxor xmm1,xmm0
+ movdqa xmm14,xmm9
+ paddd xmm9,xmm9
+ movdqa xmm10,xmm15
+ psrad xmm14,31
+ paddq xmm15,xmm15
+ pand xmm14,xmm8
+ pxor xmm10,xmm0
+ pxor xmm15,xmm14
+ movdqa xmm14,xmm9
+ paddd xmm9,xmm9
+ movdqa xmm11,xmm15
+ psrad xmm14,31
+ paddq xmm15,xmm15
+ pand xmm14,xmm8
+ pxor xmm11,xmm0
+ pxor xmm15,xmm14
+ movdqa xmm14,xmm9
+ paddd xmm9,xmm9
+ movdqa xmm12,xmm15
+ psrad xmm14,31
+ paddq xmm15,xmm15
+ pand xmm14,xmm8
+ pxor xmm12,xmm0
+ pxor xmm15,xmm14
+ movdqa xmm14,xmm9
+ paddd xmm9,xmm9
+ movdqa xmm13,xmm15
+ psrad xmm14,31
+ paddq xmm15,xmm15
+ pand xmm14,xmm8
+ pxor xmm13,xmm0
+ pxor xmm15,xmm14
+ movdqa xmm14,xmm15
+ psrad xmm9,31
+ paddq xmm15,xmm15
+ pand xmm9,xmm8
+ pxor xmm14,xmm0
+ pxor xmm15,xmm9
+ movaps XMMWORD[96+rsp],xmm1
+
+ sub rdx,16*6
+ jc NEAR $L$xts_dec_short
+
+ mov eax,16+96
+ lea rcx,[32+r10*1+rbp]
+ sub rax,r10
+ movups xmm1,XMMWORD[16+rbp]
+ mov r10,rax
+ lea r8,[$L$xts_magic]
+ jmp NEAR $L$xts_dec_grandloop
+
+ALIGN 32
+$L$xts_dec_grandloop:
+ movdqu xmm2,XMMWORD[rdi]
+ movdqa xmm8,xmm0
+ movdqu xmm3,XMMWORD[16+rdi]
+ pxor xmm2,xmm10
+ movdqu xmm4,XMMWORD[32+rdi]
+ pxor xmm3,xmm11
+DB 102,15,56,222,209
+ movdqu xmm5,XMMWORD[48+rdi]
+ pxor xmm4,xmm12
+DB 102,15,56,222,217
+ movdqu xmm6,XMMWORD[64+rdi]
+ pxor xmm5,xmm13
+DB 102,15,56,222,225
+ movdqu xmm7,XMMWORD[80+rdi]
+ pxor xmm8,xmm15
+ movdqa xmm9,XMMWORD[96+rsp]
+ pxor xmm6,xmm14
+DB 102,15,56,222,233
+ movups xmm0,XMMWORD[32+rbp]
+ lea rdi,[96+rdi]
+ pxor xmm7,xmm8
+
+ pxor xmm10,xmm9
+DB 102,15,56,222,241
+ pxor xmm11,xmm9
+ movdqa XMMWORD[rsp],xmm10
+DB 102,15,56,222,249
+ movups xmm1,XMMWORD[48+rbp]
+ pxor xmm12,xmm9
+
+DB 102,15,56,222,208
+ pxor xmm13,xmm9
+ movdqa XMMWORD[16+rsp],xmm11
+DB 102,15,56,222,216
+ pxor xmm14,xmm9
+ movdqa XMMWORD[32+rsp],xmm12
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+ pxor xmm8,xmm9
+ movdqa XMMWORD[64+rsp],xmm14
+DB 102,15,56,222,240
+DB 102,15,56,222,248
+ movups xmm0,XMMWORD[64+rbp]
+ movdqa XMMWORD[80+rsp],xmm8
+ pshufd xmm9,xmm15,0x5f
+ jmp NEAR $L$xts_dec_loop6
+ALIGN 32
+$L$xts_dec_loop6:
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+DB 102,15,56,222,241
+DB 102,15,56,222,249
+ movups xmm1,XMMWORD[((-64))+rax*1+rcx]
+ add rax,32
+
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+DB 102,15,56,222,240
+DB 102,15,56,222,248
+ movups xmm0,XMMWORD[((-80))+rax*1+rcx]
+ jnz NEAR $L$xts_dec_loop6
+
+ movdqa xmm8,XMMWORD[r8]
+ movdqa xmm14,xmm9
+ paddd xmm9,xmm9
+DB 102,15,56,222,209
+ paddq xmm15,xmm15
+ psrad xmm14,31
+DB 102,15,56,222,217
+ pand xmm14,xmm8
+ movups xmm10,XMMWORD[rbp]
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+DB 102,15,56,222,241
+ pxor xmm15,xmm14
+ movaps xmm11,xmm10
+DB 102,15,56,222,249
+ movups xmm1,XMMWORD[((-64))+rcx]
+
+ movdqa xmm14,xmm9
+DB 102,15,56,222,208
+ paddd xmm9,xmm9
+ pxor xmm10,xmm15
+DB 102,15,56,222,216
+ psrad xmm14,31
+ paddq xmm15,xmm15
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+ pand xmm14,xmm8
+ movaps xmm12,xmm11
+DB 102,15,56,222,240
+ pxor xmm15,xmm14
+ movdqa xmm14,xmm9
+DB 102,15,56,222,248
+ movups xmm0,XMMWORD[((-48))+rcx]
+
+ paddd xmm9,xmm9
+DB 102,15,56,222,209
+ pxor xmm11,xmm15
+ psrad xmm14,31
+DB 102,15,56,222,217
+ paddq xmm15,xmm15
+ pand xmm14,xmm8
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+ movdqa XMMWORD[48+rsp],xmm13
+ pxor xmm15,xmm14
+DB 102,15,56,222,241
+ movaps xmm13,xmm12
+ movdqa xmm14,xmm9
+DB 102,15,56,222,249
+ movups xmm1,XMMWORD[((-32))+rcx]
+
+ paddd xmm9,xmm9
+DB 102,15,56,222,208
+ pxor xmm12,xmm15
+ psrad xmm14,31
+DB 102,15,56,222,216
+ paddq xmm15,xmm15
+ pand xmm14,xmm8
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+DB 102,15,56,222,240
+ pxor xmm15,xmm14
+ movaps xmm14,xmm13
+DB 102,15,56,222,248
+
+ movdqa xmm0,xmm9
+ paddd xmm9,xmm9
+DB 102,15,56,222,209
+ pxor xmm13,xmm15
+ psrad xmm0,31
+DB 102,15,56,222,217
+ paddq xmm15,xmm15
+ pand xmm0,xmm8
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+ pxor xmm15,xmm0
+ movups xmm0,XMMWORD[rbp]
+DB 102,15,56,222,241
+DB 102,15,56,222,249
+ movups xmm1,XMMWORD[16+rbp]
+
+ pxor xmm14,xmm15
+DB 102,15,56,223,84,36,0
+ psrad xmm9,31
+ paddq xmm15,xmm15
+DB 102,15,56,223,92,36,16
+DB 102,15,56,223,100,36,32
+ pand xmm9,xmm8
+ mov rax,r10
+DB 102,15,56,223,108,36,48
+DB 102,15,56,223,116,36,64
+DB 102,15,56,223,124,36,80
+ pxor xmm15,xmm9
+
+ lea rsi,[96+rsi]
+ movups XMMWORD[(-96)+rsi],xmm2
+ movups XMMWORD[(-80)+rsi],xmm3
+ movups XMMWORD[(-64)+rsi],xmm4
+ movups XMMWORD[(-48)+rsi],xmm5
+ movups XMMWORD[(-32)+rsi],xmm6
+ movups XMMWORD[(-16)+rsi],xmm7
+ sub rdx,16*6
+ jnc NEAR $L$xts_dec_grandloop
+
+ mov eax,16+96
+ sub eax,r10d
+ mov rcx,rbp
+ shr eax,4
+
+$L$xts_dec_short:
+
+ mov r10d,eax
+ pxor xmm10,xmm0
+ pxor xmm11,xmm0
+ add rdx,16*6
+ jz NEAR $L$xts_dec_done
+
+ pxor xmm12,xmm0
+ cmp rdx,0x20
+ jb NEAR $L$xts_dec_one
+ pxor xmm13,xmm0
+ je NEAR $L$xts_dec_two
+
+ pxor xmm14,xmm0
+ cmp rdx,0x40
+ jb NEAR $L$xts_dec_three
+ je NEAR $L$xts_dec_four
+
+ movdqu xmm2,XMMWORD[rdi]
+ movdqu xmm3,XMMWORD[16+rdi]
+ movdqu xmm4,XMMWORD[32+rdi]
+ pxor xmm2,xmm10
+ movdqu xmm5,XMMWORD[48+rdi]
+ pxor xmm3,xmm11
+ movdqu xmm6,XMMWORD[64+rdi]
+ lea rdi,[80+rdi]
+ pxor xmm4,xmm12
+ pxor xmm5,xmm13
+ pxor xmm6,xmm14
+
+ call _aesni_decrypt6
+
+ xorps xmm2,xmm10
+ xorps xmm3,xmm11
+ xorps xmm4,xmm12
+ movdqu XMMWORD[rsi],xmm2
+ xorps xmm5,xmm13
+ movdqu XMMWORD[16+rsi],xmm3
+ xorps xmm6,xmm14
+ movdqu XMMWORD[32+rsi],xmm4
+ pxor xmm14,xmm14
+ movdqu XMMWORD[48+rsi],xmm5
+ pcmpgtd xmm14,xmm15
+ movdqu XMMWORD[64+rsi],xmm6
+ lea rsi,[80+rsi]
+ pshufd xmm11,xmm14,0x13
+ and r9,15
+ jz NEAR $L$xts_dec_ret
+
+ movdqa xmm10,xmm15
+ paddq xmm15,xmm15
+ pand xmm11,xmm8
+ pxor xmm11,xmm15
+ jmp NEAR $L$xts_dec_done2
+
+ALIGN 16
+$L$xts_dec_one:
+ movups xmm2,XMMWORD[rdi]
+ lea rdi,[16+rdi]
+ xorps xmm2,xmm10
+ movups xmm0,XMMWORD[rcx]
+ movups xmm1,XMMWORD[16+rcx]
+ lea rcx,[32+rcx]
+ xorps xmm2,xmm0
+$L$oop_dec1_12:
+DB 102,15,56,222,209
+ dec eax
+ movups xmm1,XMMWORD[rcx]
+ lea rcx,[16+rcx]
+ jnz NEAR $L$oop_dec1_12
+DB 102,15,56,223,209
+ xorps xmm2,xmm10
+ movdqa xmm10,xmm11
+ movups XMMWORD[rsi],xmm2
+ movdqa xmm11,xmm12
+ lea rsi,[16+rsi]
+ jmp NEAR $L$xts_dec_done
+
+ALIGN 16
+$L$xts_dec_two:
+ movups xmm2,XMMWORD[rdi]
+ movups xmm3,XMMWORD[16+rdi]
+ lea rdi,[32+rdi]
+ xorps xmm2,xmm10
+ xorps xmm3,xmm11
+
+ call _aesni_decrypt2
+
+ xorps xmm2,xmm10
+ movdqa xmm10,xmm12
+ xorps xmm3,xmm11
+ movdqa xmm11,xmm13
+ movups XMMWORD[rsi],xmm2
+ movups XMMWORD[16+rsi],xmm3
+ lea rsi,[32+rsi]
+ jmp NEAR $L$xts_dec_done
+
+ALIGN 16
+$L$xts_dec_three:
+ movups xmm2,XMMWORD[rdi]
+ movups xmm3,XMMWORD[16+rdi]
+ movups xmm4,XMMWORD[32+rdi]
+ lea rdi,[48+rdi]
+ xorps xmm2,xmm10
+ xorps xmm3,xmm11
+ xorps xmm4,xmm12
+
+ call _aesni_decrypt3
+
+ xorps xmm2,xmm10
+ movdqa xmm10,xmm13
+ xorps xmm3,xmm11
+ movdqa xmm11,xmm14
+ xorps xmm4,xmm12
+ movups XMMWORD[rsi],xmm2
+ movups XMMWORD[16+rsi],xmm3
+ movups XMMWORD[32+rsi],xmm4
+ lea rsi,[48+rsi]
+ jmp NEAR $L$xts_dec_done
+
+ALIGN 16
+$L$xts_dec_four:
+ movups xmm2,XMMWORD[rdi]
+ movups xmm3,XMMWORD[16+rdi]
+ movups xmm4,XMMWORD[32+rdi]
+ xorps xmm2,xmm10
+ movups xmm5,XMMWORD[48+rdi]
+ lea rdi,[64+rdi]
+ xorps xmm3,xmm11
+ xorps xmm4,xmm12
+ xorps xmm5,xmm13
+
+ call _aesni_decrypt4
+
+ pxor xmm2,xmm10
+ movdqa xmm10,xmm14
+ pxor xmm3,xmm11
+ movdqa xmm11,xmm15
+ pxor xmm4,xmm12
+ movdqu XMMWORD[rsi],xmm2
+ pxor xmm5,xmm13
+ movdqu XMMWORD[16+rsi],xmm3
+ movdqu XMMWORD[32+rsi],xmm4
+ movdqu XMMWORD[48+rsi],xmm5
+ lea rsi,[64+rsi]
+ jmp NEAR $L$xts_dec_done
+
+ALIGN 16
+$L$xts_dec_done:
+ and r9,15
+ jz NEAR $L$xts_dec_ret
+$L$xts_dec_done2:
+ mov rdx,r9
+ mov rcx,rbp
+ mov eax,r10d
+
+ movups xmm2,XMMWORD[rdi]
+ xorps xmm2,xmm11
+ movups xmm0,XMMWORD[rcx]
+ movups xmm1,XMMWORD[16+rcx]
+ lea rcx,[32+rcx]
+ xorps xmm2,xmm0
+$L$oop_dec1_13:
+DB 102,15,56,222,209
+ dec eax
+ movups xmm1,XMMWORD[rcx]
+ lea rcx,[16+rcx]
+ jnz NEAR $L$oop_dec1_13
+DB 102,15,56,223,209
+ xorps xmm2,xmm11
+ movups XMMWORD[rsi],xmm2
+
+$L$xts_dec_steal:
+ movzx eax,BYTE[16+rdi]
+ movzx ecx,BYTE[rsi]
+ lea rdi,[1+rdi]
+ mov BYTE[rsi],al
+ mov BYTE[16+rsi],cl
+ lea rsi,[1+rsi]
+ sub rdx,1
+ jnz NEAR $L$xts_dec_steal
+
+ sub rsi,r9
+ mov rcx,rbp
+ mov eax,r10d
+
+ movups xmm2,XMMWORD[rsi]
+ xorps xmm2,xmm10
+ movups xmm0,XMMWORD[rcx]
+ movups xmm1,XMMWORD[16+rcx]
+ lea rcx,[32+rcx]
+ xorps xmm2,xmm0
+$L$oop_dec1_14:
+DB 102,15,56,222,209
+ dec eax
+ movups xmm1,XMMWORD[rcx]
+ lea rcx,[16+rcx]
+ jnz NEAR $L$oop_dec1_14
+DB 102,15,56,223,209
+ xorps xmm2,xmm10
+ movups XMMWORD[rsi],xmm2
+
+$L$xts_dec_ret:
+ xorps xmm0,xmm0
+ pxor xmm1,xmm1
+ pxor xmm2,xmm2
+ pxor xmm3,xmm3
+ pxor xmm4,xmm4
+ pxor xmm5,xmm5
+ movaps xmm6,XMMWORD[((-168))+r11]
+ movaps XMMWORD[(-168)+r11],xmm0
+ movaps xmm7,XMMWORD[((-152))+r11]
+ movaps XMMWORD[(-152)+r11],xmm0
+ movaps xmm8,XMMWORD[((-136))+r11]
+ movaps XMMWORD[(-136)+r11],xmm0
+ movaps xmm9,XMMWORD[((-120))+r11]
+ movaps XMMWORD[(-120)+r11],xmm0
+ movaps xmm10,XMMWORD[((-104))+r11]
+ movaps XMMWORD[(-104)+r11],xmm0
+ movaps xmm11,XMMWORD[((-88))+r11]
+ movaps XMMWORD[(-88)+r11],xmm0
+ movaps xmm12,XMMWORD[((-72))+r11]
+ movaps XMMWORD[(-72)+r11],xmm0
+ movaps xmm13,XMMWORD[((-56))+r11]
+ movaps XMMWORD[(-56)+r11],xmm0
+ movaps xmm14,XMMWORD[((-40))+r11]
+ movaps XMMWORD[(-40)+r11],xmm0
+ movaps xmm15,XMMWORD[((-24))+r11]
+ movaps XMMWORD[(-24)+r11],xmm0
+ movaps XMMWORD[rsp],xmm0
+ movaps XMMWORD[16+rsp],xmm0
+ movaps XMMWORD[32+rsp],xmm0
+ movaps XMMWORD[48+rsp],xmm0
+ movaps XMMWORD[64+rsp],xmm0
+ movaps XMMWORD[80+rsp],xmm0
+ movaps XMMWORD[96+rsp],xmm0
+ mov rbp,QWORD[((-8))+r11]
+
+ lea rsp,[r11]
+
+$L$xts_dec_epilogue:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_aesni_xts_decrypt:
+global aesni_ocb_encrypt
+
+ALIGN 32
+aesni_ocb_encrypt:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_aesni_ocb_encrypt:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+ mov rcx,r9
+ mov r8,QWORD[40+rsp]
+ mov r9,QWORD[48+rsp]
+
+
+
+ lea rax,[rsp]
+ push rbx
+
+ push rbp
+
+ push r12
+
+ push r13
+
+ push r14
+
+ lea rsp,[((-160))+rsp]
+ movaps XMMWORD[rsp],xmm6
+ movaps XMMWORD[16+rsp],xmm7
+ movaps XMMWORD[32+rsp],xmm8
+ movaps XMMWORD[48+rsp],xmm9
+ movaps XMMWORD[64+rsp],xmm10
+ movaps XMMWORD[80+rsp],xmm11
+ movaps XMMWORD[96+rsp],xmm12
+ movaps XMMWORD[112+rsp],xmm13
+ movaps XMMWORD[128+rsp],xmm14
+ movaps XMMWORD[144+rsp],xmm15
+$L$ocb_enc_body:
+ mov rbx,QWORD[56+rax]
+ mov rbp,QWORD[((56+8))+rax]
+
+ mov r10d,DWORD[240+rcx]
+ mov r11,rcx
+ shl r10d,4
+ movups xmm9,XMMWORD[rcx]
+ movups xmm1,XMMWORD[16+r10*1+rcx]
+
+ movdqu xmm15,XMMWORD[r9]
+ pxor xmm9,xmm1
+ pxor xmm15,xmm1
+
+ mov eax,16+32
+ lea rcx,[32+r10*1+r11]
+ movups xmm1,XMMWORD[16+r11]
+ sub rax,r10
+ mov r10,rax
+
+ movdqu xmm10,XMMWORD[rbx]
+ movdqu xmm8,XMMWORD[rbp]
+
+ test r8,1
+ jnz NEAR $L$ocb_enc_odd
+
+ bsf r12,r8
+ add r8,1
+ shl r12,4
+ movdqu xmm7,XMMWORD[r12*1+rbx]
+ movdqu xmm2,XMMWORD[rdi]
+ lea rdi,[16+rdi]
+
+ call __ocb_encrypt1
+
+ movdqa xmm15,xmm7
+ movups XMMWORD[rsi],xmm2
+ lea rsi,[16+rsi]
+ sub rdx,1
+ jz NEAR $L$ocb_enc_done
+
+$L$ocb_enc_odd:
+ lea r12,[1+r8]
+ lea r13,[3+r8]
+ lea r14,[5+r8]
+ lea r8,[6+r8]
+ bsf r12,r12
+ bsf r13,r13
+ bsf r14,r14
+ shl r12,4
+ shl r13,4
+ shl r14,4
+
+ sub rdx,6
+ jc NEAR $L$ocb_enc_short
+ jmp NEAR $L$ocb_enc_grandloop
+
+ALIGN 32
+$L$ocb_enc_grandloop:
+ movdqu xmm2,XMMWORD[rdi]
+ movdqu xmm3,XMMWORD[16+rdi]
+ movdqu xmm4,XMMWORD[32+rdi]
+ movdqu xmm5,XMMWORD[48+rdi]
+ movdqu xmm6,XMMWORD[64+rdi]
+ movdqu xmm7,XMMWORD[80+rdi]
+ lea rdi,[96+rdi]
+
+ call __ocb_encrypt6
+
+ movups XMMWORD[rsi],xmm2
+ movups XMMWORD[16+rsi],xmm3
+ movups XMMWORD[32+rsi],xmm4
+ movups XMMWORD[48+rsi],xmm5
+ movups XMMWORD[64+rsi],xmm6
+ movups XMMWORD[80+rsi],xmm7
+ lea rsi,[96+rsi]
+ sub rdx,6
+ jnc NEAR $L$ocb_enc_grandloop
+
+$L$ocb_enc_short:
+ add rdx,6
+ jz NEAR $L$ocb_enc_done
+
+ movdqu xmm2,XMMWORD[rdi]
+ cmp rdx,2
+ jb NEAR $L$ocb_enc_one
+ movdqu xmm3,XMMWORD[16+rdi]
+ je NEAR $L$ocb_enc_two
+
+ movdqu xmm4,XMMWORD[32+rdi]
+ cmp rdx,4
+ jb NEAR $L$ocb_enc_three
+ movdqu xmm5,XMMWORD[48+rdi]
+ je NEAR $L$ocb_enc_four
+
+ movdqu xmm6,XMMWORD[64+rdi]
+ pxor xmm7,xmm7
+
+ call __ocb_encrypt6
+
+ movdqa xmm15,xmm14
+ movups XMMWORD[rsi],xmm2
+ movups XMMWORD[16+rsi],xmm3
+ movups XMMWORD[32+rsi],xmm4
+ movups XMMWORD[48+rsi],xmm5
+ movups XMMWORD[64+rsi],xmm6
+
+ jmp NEAR $L$ocb_enc_done
+
+ALIGN 16
+$L$ocb_enc_one:
+ movdqa xmm7,xmm10
+
+ call __ocb_encrypt1
+
+ movdqa xmm15,xmm7
+ movups XMMWORD[rsi],xmm2
+ jmp NEAR $L$ocb_enc_done
+
+ALIGN 16
+$L$ocb_enc_two:
+ pxor xmm4,xmm4
+ pxor xmm5,xmm5
+
+ call __ocb_encrypt4
+
+ movdqa xmm15,xmm11
+ movups XMMWORD[rsi],xmm2
+ movups XMMWORD[16+rsi],xmm3
+
+ jmp NEAR $L$ocb_enc_done
+
+ALIGN 16
+$L$ocb_enc_three:
+ pxor xmm5,xmm5
+
+ call __ocb_encrypt4
+
+ movdqa xmm15,xmm12
+ movups XMMWORD[rsi],xmm2
+ movups XMMWORD[16+rsi],xmm3
+ movups XMMWORD[32+rsi],xmm4
+
+ jmp NEAR $L$ocb_enc_done
+
+ALIGN 16
+$L$ocb_enc_four:
+ call __ocb_encrypt4
+
+ movdqa xmm15,xmm13
+ movups XMMWORD[rsi],xmm2
+ movups XMMWORD[16+rsi],xmm3
+ movups XMMWORD[32+rsi],xmm4
+ movups XMMWORD[48+rsi],xmm5
+
+$L$ocb_enc_done:
+ pxor xmm15,xmm0
+ movdqu XMMWORD[rbp],xmm8
+ movdqu XMMWORD[r9],xmm15
+
+ xorps xmm0,xmm0
+ pxor xmm1,xmm1
+ pxor xmm2,xmm2
+ pxor xmm3,xmm3
+ pxor xmm4,xmm4
+ pxor xmm5,xmm5
+ movaps xmm6,XMMWORD[rsp]
+ movaps XMMWORD[rsp],xmm0
+ movaps xmm7,XMMWORD[16+rsp]
+ movaps XMMWORD[16+rsp],xmm0
+ movaps xmm8,XMMWORD[32+rsp]
+ movaps XMMWORD[32+rsp],xmm0
+ movaps xmm9,XMMWORD[48+rsp]
+ movaps XMMWORD[48+rsp],xmm0
+ movaps xmm10,XMMWORD[64+rsp]
+ movaps XMMWORD[64+rsp],xmm0
+ movaps xmm11,XMMWORD[80+rsp]
+ movaps XMMWORD[80+rsp],xmm0
+ movaps xmm12,XMMWORD[96+rsp]
+ movaps XMMWORD[96+rsp],xmm0
+ movaps xmm13,XMMWORD[112+rsp]
+ movaps XMMWORD[112+rsp],xmm0
+ movaps xmm14,XMMWORD[128+rsp]
+ movaps XMMWORD[128+rsp],xmm0
+ movaps xmm15,XMMWORD[144+rsp]
+ movaps XMMWORD[144+rsp],xmm0
+ lea rax,[((160+40))+rsp]
+$L$ocb_enc_pop:
+ mov r14,QWORD[((-40))+rax]
+
+ mov r13,QWORD[((-32))+rax]
+
+ mov r12,QWORD[((-24))+rax]
+
+ mov rbp,QWORD[((-16))+rax]
+
+ mov rbx,QWORD[((-8))+rax]
+
+ lea rsp,[rax]
+
+$L$ocb_enc_epilogue:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_aesni_ocb_encrypt:
+
+
+ALIGN 32
+__ocb_encrypt6:
+
+ pxor xmm15,xmm9
+ movdqu xmm11,XMMWORD[r12*1+rbx]
+ movdqa xmm12,xmm10
+ movdqu xmm13,XMMWORD[r13*1+rbx]
+ movdqa xmm14,xmm10
+ pxor xmm10,xmm15
+ movdqu xmm15,XMMWORD[r14*1+rbx]
+ pxor xmm11,xmm10
+ pxor xmm8,xmm2
+ pxor xmm2,xmm10
+ pxor xmm12,xmm11
+ pxor xmm8,xmm3
+ pxor xmm3,xmm11
+ pxor xmm13,xmm12
+ pxor xmm8,xmm4
+ pxor xmm4,xmm12
+ pxor xmm14,xmm13
+ pxor xmm8,xmm5
+ pxor xmm5,xmm13
+ pxor xmm15,xmm14
+ pxor xmm8,xmm6
+ pxor xmm6,xmm14
+ pxor xmm8,xmm7
+ pxor xmm7,xmm15
+ movups xmm0,XMMWORD[32+r11]
+
+ lea r12,[1+r8]
+ lea r13,[3+r8]
+ lea r14,[5+r8]
+ add r8,6
+ pxor xmm10,xmm9
+ bsf r12,r12
+ bsf r13,r13
+ bsf r14,r14
+
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+ pxor xmm11,xmm9
+ pxor xmm12,xmm9
+DB 102,15,56,220,241
+ pxor xmm13,xmm9
+ pxor xmm14,xmm9
+DB 102,15,56,220,249
+ movups xmm1,XMMWORD[48+r11]
+ pxor xmm15,xmm9
+
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+DB 102,15,56,220,224
+DB 102,15,56,220,232
+DB 102,15,56,220,240
+DB 102,15,56,220,248
+ movups xmm0,XMMWORD[64+r11]
+ shl r12,4
+ shl r13,4
+ jmp NEAR $L$ocb_enc_loop6
+
+ALIGN 32
+$L$ocb_enc_loop6:
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+DB 102,15,56,220,241
+DB 102,15,56,220,249
+ movups xmm1,XMMWORD[rax*1+rcx]
+ add rax,32
+
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+DB 102,15,56,220,224
+DB 102,15,56,220,232
+DB 102,15,56,220,240
+DB 102,15,56,220,248
+ movups xmm0,XMMWORD[((-16))+rax*1+rcx]
+ jnz NEAR $L$ocb_enc_loop6
+
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+DB 102,15,56,220,241
+DB 102,15,56,220,249
+ movups xmm1,XMMWORD[16+r11]
+ shl r14,4
+
+DB 102,65,15,56,221,210
+ movdqu xmm10,XMMWORD[rbx]
+ mov rax,r10
+DB 102,65,15,56,221,219
+DB 102,65,15,56,221,228
+DB 102,65,15,56,221,237
+DB 102,65,15,56,221,246
+DB 102,65,15,56,221,255
+ DB 0F3h,0C3h ;repret
+
+
+
+
+ALIGN 32
+__ocb_encrypt4:
+
+ pxor xmm15,xmm9
+ movdqu xmm11,XMMWORD[r12*1+rbx]
+ movdqa xmm12,xmm10
+ movdqu xmm13,XMMWORD[r13*1+rbx]
+ pxor xmm10,xmm15
+ pxor xmm11,xmm10
+ pxor xmm8,xmm2
+ pxor xmm2,xmm10
+ pxor xmm12,xmm11
+ pxor xmm8,xmm3
+ pxor xmm3,xmm11
+ pxor xmm13,xmm12
+ pxor xmm8,xmm4
+ pxor xmm4,xmm12
+ pxor xmm8,xmm5
+ pxor xmm5,xmm13
+ movups xmm0,XMMWORD[32+r11]
+
+ pxor xmm10,xmm9
+ pxor xmm11,xmm9
+ pxor xmm12,xmm9
+ pxor xmm13,xmm9
+
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+ movups xmm1,XMMWORD[48+r11]
+
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+DB 102,15,56,220,224
+DB 102,15,56,220,232
+ movups xmm0,XMMWORD[64+r11]
+ jmp NEAR $L$ocb_enc_loop4
+
+ALIGN 32
+$L$ocb_enc_loop4:
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+ movups xmm1,XMMWORD[rax*1+rcx]
+ add rax,32
+
+DB 102,15,56,220,208
+DB 102,15,56,220,216
+DB 102,15,56,220,224
+DB 102,15,56,220,232
+ movups xmm0,XMMWORD[((-16))+rax*1+rcx]
+ jnz NEAR $L$ocb_enc_loop4
+
+DB 102,15,56,220,209
+DB 102,15,56,220,217
+DB 102,15,56,220,225
+DB 102,15,56,220,233
+ movups xmm1,XMMWORD[16+r11]
+ mov rax,r10
+
+DB 102,65,15,56,221,210
+DB 102,65,15,56,221,219
+DB 102,65,15,56,221,228
+DB 102,65,15,56,221,237
+ DB 0F3h,0C3h ;repret
+
+
+
+
+ALIGN 32
+__ocb_encrypt1:
+
+ pxor xmm7,xmm15
+ pxor xmm7,xmm9
+ pxor xmm8,xmm2
+ pxor xmm2,xmm7
+ movups xmm0,XMMWORD[32+r11]
+
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[48+r11]
+ pxor xmm7,xmm9
+
+DB 102,15,56,220,208
+ movups xmm0,XMMWORD[64+r11]
+ jmp NEAR $L$ocb_enc_loop1
+
+ALIGN 32
+$L$ocb_enc_loop1:
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[rax*1+rcx]
+ add rax,32
+
+DB 102,15,56,220,208
+ movups xmm0,XMMWORD[((-16))+rax*1+rcx]
+ jnz NEAR $L$ocb_enc_loop1
+
+DB 102,15,56,220,209
+ movups xmm1,XMMWORD[16+r11]
+ mov rax,r10
+
+DB 102,15,56,221,215
+ DB 0F3h,0C3h ;repret
+
+
+
+global aesni_ocb_decrypt
+
+ALIGN 32
+aesni_ocb_decrypt:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_aesni_ocb_decrypt:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+ mov rcx,r9
+ mov r8,QWORD[40+rsp]
+ mov r9,QWORD[48+rsp]
+
+
+
+ lea rax,[rsp]
+ push rbx
+
+ push rbp
+
+ push r12
+
+ push r13
+
+ push r14
+
+ lea rsp,[((-160))+rsp]
+ movaps XMMWORD[rsp],xmm6
+ movaps XMMWORD[16+rsp],xmm7
+ movaps XMMWORD[32+rsp],xmm8
+ movaps XMMWORD[48+rsp],xmm9
+ movaps XMMWORD[64+rsp],xmm10
+ movaps XMMWORD[80+rsp],xmm11
+ movaps XMMWORD[96+rsp],xmm12
+ movaps XMMWORD[112+rsp],xmm13
+ movaps XMMWORD[128+rsp],xmm14
+ movaps XMMWORD[144+rsp],xmm15
+$L$ocb_dec_body:
+ mov rbx,QWORD[56+rax]
+ mov rbp,QWORD[((56+8))+rax]
+
+ mov r10d,DWORD[240+rcx]
+ mov r11,rcx
+ shl r10d,4
+ movups xmm9,XMMWORD[rcx]
+ movups xmm1,XMMWORD[16+r10*1+rcx]
+
+ movdqu xmm15,XMMWORD[r9]
+ pxor xmm9,xmm1
+ pxor xmm15,xmm1
+
+ mov eax,16+32
+ lea rcx,[32+r10*1+r11]
+ movups xmm1,XMMWORD[16+r11]
+ sub rax,r10
+ mov r10,rax
+
+ movdqu xmm10,XMMWORD[rbx]
+ movdqu xmm8,XMMWORD[rbp]
+
+ test r8,1
+ jnz NEAR $L$ocb_dec_odd
+
+ bsf r12,r8
+ add r8,1
+ shl r12,4
+ movdqu xmm7,XMMWORD[r12*1+rbx]
+ movdqu xmm2,XMMWORD[rdi]
+ lea rdi,[16+rdi]
+
+ call __ocb_decrypt1
+
+ movdqa xmm15,xmm7
+ movups XMMWORD[rsi],xmm2
+ xorps xmm8,xmm2
+ lea rsi,[16+rsi]
+ sub rdx,1
+ jz NEAR $L$ocb_dec_done
+
+$L$ocb_dec_odd:
+ lea r12,[1+r8]
+ lea r13,[3+r8]
+ lea r14,[5+r8]
+ lea r8,[6+r8]
+ bsf r12,r12
+ bsf r13,r13
+ bsf r14,r14
+ shl r12,4
+ shl r13,4
+ shl r14,4
+
+ sub rdx,6
+ jc NEAR $L$ocb_dec_short
+ jmp NEAR $L$ocb_dec_grandloop
+
+ALIGN 32
+$L$ocb_dec_grandloop:
+ movdqu xmm2,XMMWORD[rdi]
+ movdqu xmm3,XMMWORD[16+rdi]
+ movdqu xmm4,XMMWORD[32+rdi]
+ movdqu xmm5,XMMWORD[48+rdi]
+ movdqu xmm6,XMMWORD[64+rdi]
+ movdqu xmm7,XMMWORD[80+rdi]
+ lea rdi,[96+rdi]
+
+ call __ocb_decrypt6
+
+ movups XMMWORD[rsi],xmm2
+ pxor xmm8,xmm2
+ movups XMMWORD[16+rsi],xmm3
+ pxor xmm8,xmm3
+ movups XMMWORD[32+rsi],xmm4
+ pxor xmm8,xmm4
+ movups XMMWORD[48+rsi],xmm5
+ pxor xmm8,xmm5
+ movups XMMWORD[64+rsi],xmm6
+ pxor xmm8,xmm6
+ movups XMMWORD[80+rsi],xmm7
+ pxor xmm8,xmm7
+ lea rsi,[96+rsi]
+ sub rdx,6
+ jnc NEAR $L$ocb_dec_grandloop
+
+$L$ocb_dec_short:
+ add rdx,6
+ jz NEAR $L$ocb_dec_done
+
+ movdqu xmm2,XMMWORD[rdi]
+ cmp rdx,2
+ jb NEAR $L$ocb_dec_one
+ movdqu xmm3,XMMWORD[16+rdi]
+ je NEAR $L$ocb_dec_two
+
+ movdqu xmm4,XMMWORD[32+rdi]
+ cmp rdx,4
+ jb NEAR $L$ocb_dec_three
+ movdqu xmm5,XMMWORD[48+rdi]
+ je NEAR $L$ocb_dec_four
+
+ movdqu xmm6,XMMWORD[64+rdi]
+ pxor xmm7,xmm7
+
+ call __ocb_decrypt6
+
+ movdqa xmm15,xmm14
+ movups XMMWORD[rsi],xmm2
+ pxor xmm8,xmm2
+ movups XMMWORD[16+rsi],xmm3
+ pxor xmm8,xmm3
+ movups XMMWORD[32+rsi],xmm4
+ pxor xmm8,xmm4
+ movups XMMWORD[48+rsi],xmm5
+ pxor xmm8,xmm5
+ movups XMMWORD[64+rsi],xmm6
+ pxor xmm8,xmm6
+
+ jmp NEAR $L$ocb_dec_done
+
+ALIGN 16
+$L$ocb_dec_one:
+ movdqa xmm7,xmm10
+
+ call __ocb_decrypt1
+
+ movdqa xmm15,xmm7
+ movups XMMWORD[rsi],xmm2
+ xorps xmm8,xmm2
+ jmp NEAR $L$ocb_dec_done
+
+ALIGN 16
+$L$ocb_dec_two:
+ pxor xmm4,xmm4
+ pxor xmm5,xmm5
+
+ call __ocb_decrypt4
+
+ movdqa xmm15,xmm11
+ movups XMMWORD[rsi],xmm2
+ xorps xmm8,xmm2
+ movups XMMWORD[16+rsi],xmm3
+ xorps xmm8,xmm3
+
+ jmp NEAR $L$ocb_dec_done
+
+ALIGN 16
+$L$ocb_dec_three:
+ pxor xmm5,xmm5
+
+ call __ocb_decrypt4
+
+ movdqa xmm15,xmm12
+ movups XMMWORD[rsi],xmm2
+ xorps xmm8,xmm2
+ movups XMMWORD[16+rsi],xmm3
+ xorps xmm8,xmm3
+ movups XMMWORD[32+rsi],xmm4
+ xorps xmm8,xmm4
+
+ jmp NEAR $L$ocb_dec_done
+
+ALIGN 16
+$L$ocb_dec_four:
+ call __ocb_decrypt4
+
+ movdqa xmm15,xmm13
+ movups XMMWORD[rsi],xmm2
+ pxor xmm8,xmm2
+ movups XMMWORD[16+rsi],xmm3
+ pxor xmm8,xmm3
+ movups XMMWORD[32+rsi],xmm4
+ pxor xmm8,xmm4
+ movups XMMWORD[48+rsi],xmm5
+ pxor xmm8,xmm5
+
+$L$ocb_dec_done:
+ pxor xmm15,xmm0
+ movdqu XMMWORD[rbp],xmm8
+ movdqu XMMWORD[r9],xmm15
+
+ xorps xmm0,xmm0
+ pxor xmm1,xmm1
+ pxor xmm2,xmm2
+ pxor xmm3,xmm3
+ pxor xmm4,xmm4
+ pxor xmm5,xmm5
+ movaps xmm6,XMMWORD[rsp]
+ movaps XMMWORD[rsp],xmm0
+ movaps xmm7,XMMWORD[16+rsp]
+ movaps XMMWORD[16+rsp],xmm0
+ movaps xmm8,XMMWORD[32+rsp]
+ movaps XMMWORD[32+rsp],xmm0
+ movaps xmm9,XMMWORD[48+rsp]
+ movaps XMMWORD[48+rsp],xmm0
+ movaps xmm10,XMMWORD[64+rsp]
+ movaps XMMWORD[64+rsp],xmm0
+ movaps xmm11,XMMWORD[80+rsp]
+ movaps XMMWORD[80+rsp],xmm0
+ movaps xmm12,XMMWORD[96+rsp]
+ movaps XMMWORD[96+rsp],xmm0
+ movaps xmm13,XMMWORD[112+rsp]
+ movaps XMMWORD[112+rsp],xmm0
+ movaps xmm14,XMMWORD[128+rsp]
+ movaps XMMWORD[128+rsp],xmm0
+ movaps xmm15,XMMWORD[144+rsp]
+ movaps XMMWORD[144+rsp],xmm0
+ lea rax,[((160+40))+rsp]
+$L$ocb_dec_pop:
+ mov r14,QWORD[((-40))+rax]
+
+ mov r13,QWORD[((-32))+rax]
+
+ mov r12,QWORD[((-24))+rax]
+
+ mov rbp,QWORD[((-16))+rax]
+
+ mov rbx,QWORD[((-8))+rax]
+
+ lea rsp,[rax]
+
+$L$ocb_dec_epilogue:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_aesni_ocb_decrypt:
+
+
+ALIGN 32
+__ocb_decrypt6:
+
+ pxor xmm15,xmm9
+ movdqu xmm11,XMMWORD[r12*1+rbx]
+ movdqa xmm12,xmm10
+ movdqu xmm13,XMMWORD[r13*1+rbx]
+ movdqa xmm14,xmm10
+ pxor xmm10,xmm15
+ movdqu xmm15,XMMWORD[r14*1+rbx]
+ pxor xmm11,xmm10
+ pxor xmm2,xmm10
+ pxor xmm12,xmm11
+ pxor xmm3,xmm11
+ pxor xmm13,xmm12
+ pxor xmm4,xmm12
+ pxor xmm14,xmm13
+ pxor xmm5,xmm13
+ pxor xmm15,xmm14
+ pxor xmm6,xmm14
+ pxor xmm7,xmm15
+ movups xmm0,XMMWORD[32+r11]
+
+ lea r12,[1+r8]
+ lea r13,[3+r8]
+ lea r14,[5+r8]
+ add r8,6
+ pxor xmm10,xmm9
+ bsf r12,r12
+ bsf r13,r13
+ bsf r14,r14
+
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+ pxor xmm11,xmm9
+ pxor xmm12,xmm9
+DB 102,15,56,222,241
+ pxor xmm13,xmm9
+ pxor xmm14,xmm9
+DB 102,15,56,222,249
+ movups xmm1,XMMWORD[48+r11]
+ pxor xmm15,xmm9
+
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+DB 102,15,56,222,240
+DB 102,15,56,222,248
+ movups xmm0,XMMWORD[64+r11]
+ shl r12,4
+ shl r13,4
+ jmp NEAR $L$ocb_dec_loop6
+
+ALIGN 32
+$L$ocb_dec_loop6:
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+DB 102,15,56,222,241
+DB 102,15,56,222,249
+ movups xmm1,XMMWORD[rax*1+rcx]
+ add rax,32
+
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+DB 102,15,56,222,240
+DB 102,15,56,222,248
+ movups xmm0,XMMWORD[((-16))+rax*1+rcx]
+ jnz NEAR $L$ocb_dec_loop6
+
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+DB 102,15,56,222,241
+DB 102,15,56,222,249
+ movups xmm1,XMMWORD[16+r11]
+ shl r14,4
+
+DB 102,65,15,56,223,210
+ movdqu xmm10,XMMWORD[rbx]
+ mov rax,r10
+DB 102,65,15,56,223,219
+DB 102,65,15,56,223,228
+DB 102,65,15,56,223,237
+DB 102,65,15,56,223,246
+DB 102,65,15,56,223,255
+ DB 0F3h,0C3h ;repret
+
+
+
+
+ALIGN 32
+__ocb_decrypt4:
+
+ pxor xmm15,xmm9
+ movdqu xmm11,XMMWORD[r12*1+rbx]
+ movdqa xmm12,xmm10
+ movdqu xmm13,XMMWORD[r13*1+rbx]
+ pxor xmm10,xmm15
+ pxor xmm11,xmm10
+ pxor xmm2,xmm10
+ pxor xmm12,xmm11
+ pxor xmm3,xmm11
+ pxor xmm13,xmm12
+ pxor xmm4,xmm12
+ pxor xmm5,xmm13
+ movups xmm0,XMMWORD[32+r11]
+
+ pxor xmm10,xmm9
+ pxor xmm11,xmm9
+ pxor xmm12,xmm9
+ pxor xmm13,xmm9
+
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+ movups xmm1,XMMWORD[48+r11]
+
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+ movups xmm0,XMMWORD[64+r11]
+ jmp NEAR $L$ocb_dec_loop4
+
+ALIGN 32
+$L$ocb_dec_loop4:
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+ movups xmm1,XMMWORD[rax*1+rcx]
+ add rax,32
+
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+ movups xmm0,XMMWORD[((-16))+rax*1+rcx]
+ jnz NEAR $L$ocb_dec_loop4
+
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+ movups xmm1,XMMWORD[16+r11]
+ mov rax,r10
+
+DB 102,65,15,56,223,210
+DB 102,65,15,56,223,219
+DB 102,65,15,56,223,228
+DB 102,65,15,56,223,237
+ DB 0F3h,0C3h ;repret
+
+
+
+
+ALIGN 32
+__ocb_decrypt1:
+
+ pxor xmm7,xmm15
+ pxor xmm7,xmm9
+ pxor xmm2,xmm7
+ movups xmm0,XMMWORD[32+r11]
+
+DB 102,15,56,222,209
+ movups xmm1,XMMWORD[48+r11]
+ pxor xmm7,xmm9
+
+DB 102,15,56,222,208
+ movups xmm0,XMMWORD[64+r11]
+ jmp NEAR $L$ocb_dec_loop1
+
+ALIGN 32
+$L$ocb_dec_loop1:
+DB 102,15,56,222,209
+ movups xmm1,XMMWORD[rax*1+rcx]
+ add rax,32
+
+DB 102,15,56,222,208
+ movups xmm0,XMMWORD[((-16))+rax*1+rcx]
+ jnz NEAR $L$ocb_dec_loop1
+
+DB 102,15,56,222,209
+ movups xmm1,XMMWORD[16+r11]
+ mov rax,r10
+
+DB 102,15,56,223,215
+ DB 0F3h,0C3h ;repret
+
+
+global aesni_cbc_encrypt
+
+ALIGN 16
+aesni_cbc_encrypt:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_aesni_cbc_encrypt:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+ mov rcx,r9
+ mov r8,QWORD[40+rsp]
+ mov r9,QWORD[48+rsp]
+
+
+
+ test rdx,rdx
+ jz NEAR $L$cbc_ret
+
+ mov r10d,DWORD[240+rcx]
+ mov r11,rcx
+ test r9d,r9d
+ jz NEAR $L$cbc_decrypt
+
+ movups xmm2,XMMWORD[r8]
+ mov eax,r10d
+ cmp rdx,16
+ jb NEAR $L$cbc_enc_tail
+ sub rdx,16
+ jmp NEAR $L$cbc_enc_loop
+ALIGN 16
+$L$cbc_enc_loop:
+ movups xmm3,XMMWORD[rdi]
+ lea rdi,[16+rdi]
+
+ movups xmm0,XMMWORD[rcx]
+ movups xmm1,XMMWORD[16+rcx]
+ xorps xmm3,xmm0
+ lea rcx,[32+rcx]
+ xorps xmm2,xmm3
+$L$oop_enc1_15:
+DB 102,15,56,220,209
+ dec eax
+ movups xmm1,XMMWORD[rcx]
+ lea rcx,[16+rcx]
+ jnz NEAR $L$oop_enc1_15
+DB 102,15,56,221,209
+ mov eax,r10d
+ mov rcx,r11
+ movups XMMWORD[rsi],xmm2
+ lea rsi,[16+rsi]
+ sub rdx,16
+ jnc NEAR $L$cbc_enc_loop
+ add rdx,16
+ jnz NEAR $L$cbc_enc_tail
+ pxor xmm0,xmm0
+ pxor xmm1,xmm1
+ movups XMMWORD[r8],xmm2
+ pxor xmm2,xmm2
+ pxor xmm3,xmm3
+ jmp NEAR $L$cbc_ret
+
+$L$cbc_enc_tail:
+ mov rcx,rdx
+ xchg rsi,rdi
+ DD 0x9066A4F3
+ mov ecx,16
+ sub rcx,rdx
+ xor eax,eax
+ DD 0x9066AAF3
+ lea rdi,[((-16))+rdi]
+ mov eax,r10d
+ mov rsi,rdi
+ mov rcx,r11
+ xor rdx,rdx
+ jmp NEAR $L$cbc_enc_loop
+
+ALIGN 16
+$L$cbc_decrypt:
+ cmp rdx,16
+ jne NEAR $L$cbc_decrypt_bulk
+
+
+
+ movdqu xmm2,XMMWORD[rdi]
+ movdqu xmm3,XMMWORD[r8]
+ movdqa xmm4,xmm2
+ movups xmm0,XMMWORD[rcx]
+ movups xmm1,XMMWORD[16+rcx]
+ lea rcx,[32+rcx]
+ xorps xmm2,xmm0
+$L$oop_dec1_16:
+DB 102,15,56,222,209
+ dec r10d
+ movups xmm1,XMMWORD[rcx]
+ lea rcx,[16+rcx]
+ jnz NEAR $L$oop_dec1_16
+DB 102,15,56,223,209
+ pxor xmm0,xmm0
+ pxor xmm1,xmm1
+ movdqu XMMWORD[r8],xmm4
+ xorps xmm2,xmm3
+ pxor xmm3,xmm3
+ movups XMMWORD[rsi],xmm2
+ pxor xmm2,xmm2
+ jmp NEAR $L$cbc_ret
+ALIGN 16
+$L$cbc_decrypt_bulk:
+ lea r11,[rsp]
+
+ push rbp
+
+ sub rsp,176
+ and rsp,-16
+ movaps XMMWORD[16+rsp],xmm6
+ movaps XMMWORD[32+rsp],xmm7
+ movaps XMMWORD[48+rsp],xmm8
+ movaps XMMWORD[64+rsp],xmm9
+ movaps XMMWORD[80+rsp],xmm10
+ movaps XMMWORD[96+rsp],xmm11
+ movaps XMMWORD[112+rsp],xmm12
+ movaps XMMWORD[128+rsp],xmm13
+ movaps XMMWORD[144+rsp],xmm14
+ movaps XMMWORD[160+rsp],xmm15
+$L$cbc_decrypt_body:
+ mov rbp,rcx
+ movups xmm10,XMMWORD[r8]
+ mov eax,r10d
+ cmp rdx,0x50
+ jbe NEAR $L$cbc_dec_tail
+
+ movups xmm0,XMMWORD[rcx]
+ movdqu xmm2,XMMWORD[rdi]
+ movdqu xmm3,XMMWORD[16+rdi]
+ movdqa xmm11,xmm2
+ movdqu xmm4,XMMWORD[32+rdi]
+ movdqa xmm12,xmm3
+ movdqu xmm5,XMMWORD[48+rdi]
+ movdqa xmm13,xmm4
+ movdqu xmm6,XMMWORD[64+rdi]
+ movdqa xmm14,xmm5
+ movdqu xmm7,XMMWORD[80+rdi]
+ movdqa xmm15,xmm6
+ mov r9d,DWORD[((OPENSSL_ia32cap_P+4))]
+ cmp rdx,0x70
+ jbe NEAR $L$cbc_dec_six_or_seven
+
+ and r9d,71303168
+ sub rdx,0x50
+ cmp r9d,4194304
+ je NEAR $L$cbc_dec_loop6_enter
+ sub rdx,0x20
+ lea rcx,[112+rcx]
+ jmp NEAR $L$cbc_dec_loop8_enter
+ALIGN 16
+$L$cbc_dec_loop8:
+ movups XMMWORD[rsi],xmm9
+ lea rsi,[16+rsi]
+$L$cbc_dec_loop8_enter:
+ movdqu xmm8,XMMWORD[96+rdi]
+ pxor xmm2,xmm0
+ movdqu xmm9,XMMWORD[112+rdi]
+ pxor xmm3,xmm0
+ movups xmm1,XMMWORD[((16-112))+rcx]
+ pxor xmm4,xmm0
+ mov rbp,-1
+ cmp rdx,0x70
+ pxor xmm5,xmm0
+ pxor xmm6,xmm0
+ pxor xmm7,xmm0
+ pxor xmm8,xmm0
+
+DB 102,15,56,222,209
+ pxor xmm9,xmm0
+ movups xmm0,XMMWORD[((32-112))+rcx]
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+DB 102,15,56,222,241
+DB 102,15,56,222,249
+DB 102,68,15,56,222,193
+ adc rbp,0
+ and rbp,128
+DB 102,68,15,56,222,201
+ add rbp,rdi
+ movups xmm1,XMMWORD[((48-112))+rcx]
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+DB 102,15,56,222,240
+DB 102,15,56,222,248
+DB 102,68,15,56,222,192
+DB 102,68,15,56,222,200
+ movups xmm0,XMMWORD[((64-112))+rcx]
+ nop
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+DB 102,15,56,222,241
+DB 102,15,56,222,249
+DB 102,68,15,56,222,193
+DB 102,68,15,56,222,201
+ movups xmm1,XMMWORD[((80-112))+rcx]
+ nop
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+DB 102,15,56,222,240
+DB 102,15,56,222,248
+DB 102,68,15,56,222,192
+DB 102,68,15,56,222,200
+ movups xmm0,XMMWORD[((96-112))+rcx]
+ nop
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+DB 102,15,56,222,241
+DB 102,15,56,222,249
+DB 102,68,15,56,222,193
+DB 102,68,15,56,222,201
+ movups xmm1,XMMWORD[((112-112))+rcx]
+ nop
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+DB 102,15,56,222,240
+DB 102,15,56,222,248
+DB 102,68,15,56,222,192
+DB 102,68,15,56,222,200
+ movups xmm0,XMMWORD[((128-112))+rcx]
+ nop
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+DB 102,15,56,222,241
+DB 102,15,56,222,249
+DB 102,68,15,56,222,193
+DB 102,68,15,56,222,201
+ movups xmm1,XMMWORD[((144-112))+rcx]
+ cmp eax,11
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+DB 102,15,56,222,240
+DB 102,15,56,222,248
+DB 102,68,15,56,222,192
+DB 102,68,15,56,222,200
+ movups xmm0,XMMWORD[((160-112))+rcx]
+ jb NEAR $L$cbc_dec_done
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+DB 102,15,56,222,241
+DB 102,15,56,222,249
+DB 102,68,15,56,222,193
+DB 102,68,15,56,222,201
+ movups xmm1,XMMWORD[((176-112))+rcx]
+ nop
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+DB 102,15,56,222,240
+DB 102,15,56,222,248
+DB 102,68,15,56,222,192
+DB 102,68,15,56,222,200
+ movups xmm0,XMMWORD[((192-112))+rcx]
+ je NEAR $L$cbc_dec_done
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+DB 102,15,56,222,241
+DB 102,15,56,222,249
+DB 102,68,15,56,222,193
+DB 102,68,15,56,222,201
+ movups xmm1,XMMWORD[((208-112))+rcx]
+ nop
+DB 102,15,56,222,208
+DB 102,15,56,222,216
+DB 102,15,56,222,224
+DB 102,15,56,222,232
+DB 102,15,56,222,240
+DB 102,15,56,222,248
+DB 102,68,15,56,222,192
+DB 102,68,15,56,222,200
+ movups xmm0,XMMWORD[((224-112))+rcx]
+ jmp NEAR $L$cbc_dec_done
+ALIGN 16
+$L$cbc_dec_done:
+DB 102,15,56,222,209
+DB 102,15,56,222,217
+ pxor xmm10,xmm0
+ pxor xmm11,xmm0
+DB 102,15,56,222,225
+DB 102,15,56,222,233
+ pxor xmm12,xmm0
+ pxor xmm13,xmm0
+DB 102,15,56,222,241
+DB 102,15,56,222,249
+ pxor xmm14,xmm0
+ pxor xmm15,xmm0
+DB 102,68,15,56,222,193
+DB 102,68,15,56,222,201
+ movdqu xmm1,XMMWORD[80+rdi]
+
+DB 102,65,15,56,223,210
+ movdqu xmm10,XMMWORD[96+rdi]
+ pxor xmm1,xmm0
+DB 102,65,15,56,223,219
+ pxor xmm10,xmm0
+ movdqu xmm0,XMMWORD[112+rdi]
+DB 102,65,15,56,223,228
+ lea rdi,[128+rdi]
+ movdqu xmm11,XMMWORD[rbp]
+DB 102,65,15,56,223,237
+DB 102,65,15,56,223,246
+ movdqu xmm12,XMMWORD[16+rbp]
+ movdqu xmm13,XMMWORD[32+rbp]
+DB 102,65,15,56,223,255
+DB 102,68,15,56,223,193
+ movdqu xmm14,XMMWORD[48+rbp]
+ movdqu xmm15,XMMWORD[64+rbp]
+DB 102,69,15,56,223,202
+ movdqa xmm10,xmm0
+ movdqu xmm1,XMMWORD[80+rbp]
+ movups xmm0,XMMWORD[((-112))+rcx]
+
+ movups XMMWORD[rsi],xmm2
+ movdqa xmm2,xmm11
+ movups XMMWORD[16+rsi],xmm3
+ movdqa xmm3,xmm12
+ movups XMMWORD[32+rsi],xmm4
+ movdqa xmm4,xmm13
+ movups XMMWORD[48+rsi],xmm5
+ movdqa xmm5,xmm14
+ movups XMMWORD[64+rsi],xmm6
+ movdqa xmm6,xmm15
+ movups XMMWORD[80+rsi],xmm7
+ movdqa xmm7,xmm1
+ movups XMMWORD[96+rsi],xmm8
+ lea rsi,[112+rsi]
+
+ sub rdx,0x80
+ ja NEAR $L$cbc_dec_loop8
+
+ movaps xmm2,xmm9
+ lea rcx,[((-112))+rcx]
+ add rdx,0x70
+ jle NEAR $L$cbc_dec_clear_tail_collected
+ movups XMMWORD[rsi],xmm9
+ lea rsi,[16+rsi]
+ cmp rdx,0x50
+ jbe NEAR $L$cbc_dec_tail
+
+ movaps xmm2,xmm11
+$L$cbc_dec_six_or_seven:
+ cmp rdx,0x60
+ ja NEAR $L$cbc_dec_seven
+
+ movaps xmm8,xmm7
+ call _aesni_decrypt6
+ pxor xmm2,xmm10
+ movaps xmm10,xmm8
+ pxor xmm3,xmm11
+ movdqu XMMWORD[rsi],xmm2
+ pxor xmm4,xmm12
+ movdqu XMMWORD[16+rsi],xmm3
+ pxor xmm3,xmm3
+ pxor xmm5,xmm13
+ movdqu XMMWORD[32+rsi],xmm4
+ pxor xmm4,xmm4
+ pxor xmm6,xmm14
+ movdqu XMMWORD[48+rsi],xmm5
+ pxor xmm5,xmm5
+ pxor xmm7,xmm15
+ movdqu XMMWORD[64+rsi],xmm6
+ pxor xmm6,xmm6
+ lea rsi,[80+rsi]
+ movdqa xmm2,xmm7
+ pxor xmm7,xmm7
+ jmp NEAR $L$cbc_dec_tail_collected
+
+ALIGN 16
+$L$cbc_dec_seven:
+ movups xmm8,XMMWORD[96+rdi]
+ xorps xmm9,xmm9
+ call _aesni_decrypt8
+ movups xmm9,XMMWORD[80+rdi]
+ pxor xmm2,xmm10
+ movups xmm10,XMMWORD[96+rdi]
+ pxor xmm3,xmm11
+ movdqu XMMWORD[rsi],xmm2
+ pxor xmm4,xmm12
+ movdqu XMMWORD[16+rsi],xmm3
+ pxor xmm3,xmm3
+ pxor xmm5,xmm13
+ movdqu XMMWORD[32+rsi],xmm4
+ pxor xmm4,xmm4
+ pxor xmm6,xmm14
+ movdqu XMMWORD[48+rsi],xmm5
+ pxor xmm5,xmm5
+ pxor xmm7,xmm15
+ movdqu XMMWORD[64+rsi],xmm6
+ pxor xmm6,xmm6
+ pxor xmm8,xmm9
+ movdqu XMMWORD[80+rsi],xmm7
+ pxor xmm7,xmm7
+ lea rsi,[96+rsi]
+ movdqa xmm2,xmm8
+ pxor xmm8,xmm8
+ pxor xmm9,xmm9
+ jmp NEAR $L$cbc_dec_tail_collected
+
+ALIGN 16
+$L$cbc_dec_loop6:
+ movups XMMWORD[rsi],xmm7
+ lea rsi,[16+rsi]
+ movdqu xmm2,XMMWORD[rdi]
+ movdqu xmm3,XMMWORD[16+rdi]
+ movdqa xmm11,xmm2
+ movdqu xmm4,XMMWORD[32+rdi]
+ movdqa xmm12,xmm3
+ movdqu xmm5,XMMWORD[48+rdi]
+ movdqa xmm13,xmm4
+ movdqu xmm6,XMMWORD[64+rdi]
+ movdqa xmm14,xmm5
+ movdqu xmm7,XMMWORD[80+rdi]
+ movdqa xmm15,xmm6
+$L$cbc_dec_loop6_enter:
+ lea rdi,[96+rdi]
+ movdqa xmm8,xmm7
+
+ call _aesni_decrypt6
+
+ pxor xmm2,xmm10
+ movdqa xmm10,xmm8
+ pxor xmm3,xmm11
+ movdqu XMMWORD[rsi],xmm2
+ pxor xmm4,xmm12
+ movdqu XMMWORD[16+rsi],xmm3
+ pxor xmm5,xmm13
+ movdqu XMMWORD[32+rsi],xmm4
+ pxor xmm6,xmm14
+ mov rcx,rbp
+ movdqu XMMWORD[48+rsi],xmm5
+ pxor xmm7,xmm15
+ mov eax,r10d
+ movdqu XMMWORD[64+rsi],xmm6
+ lea rsi,[80+rsi]
+ sub rdx,0x60
+ ja NEAR $L$cbc_dec_loop6
+
+ movdqa xmm2,xmm7
+ add rdx,0x50
+ jle NEAR $L$cbc_dec_clear_tail_collected
+ movups XMMWORD[rsi],xmm7
+ lea rsi,[16+rsi]
+
+$L$cbc_dec_tail:
+ movups xmm2,XMMWORD[rdi]
+ sub rdx,0x10
+ jbe NEAR $L$cbc_dec_one
+
+ movups xmm3,XMMWORD[16+rdi]
+ movaps xmm11,xmm2
+ sub rdx,0x10
+ jbe NEAR $L$cbc_dec_two
+
+ movups xmm4,XMMWORD[32+rdi]
+ movaps xmm12,xmm3
+ sub rdx,0x10
+ jbe NEAR $L$cbc_dec_three
+
+ movups xmm5,XMMWORD[48+rdi]
+ movaps xmm13,xmm4
+ sub rdx,0x10
+ jbe NEAR $L$cbc_dec_four
+
+ movups xmm6,XMMWORD[64+rdi]
+ movaps xmm14,xmm5
+ movaps xmm15,xmm6
+ xorps xmm7,xmm7
+ call _aesni_decrypt6
+ pxor xmm2,xmm10
+ movaps xmm10,xmm15
+ pxor xmm3,xmm11
+ movdqu XMMWORD[rsi],xmm2
+ pxor xmm4,xmm12
+ movdqu XMMWORD[16+rsi],xmm3
+ pxor xmm3,xmm3
+ pxor xmm5,xmm13
+ movdqu XMMWORD[32+rsi],xmm4
+ pxor xmm4,xmm4
+ pxor xmm6,xmm14
+ movdqu XMMWORD[48+rsi],xmm5
+ pxor xmm5,xmm5
+ lea rsi,[64+rsi]
+ movdqa xmm2,xmm6
+ pxor xmm6,xmm6
+ pxor xmm7,xmm7
+ sub rdx,0x10
+ jmp NEAR $L$cbc_dec_tail_collected
+
+ALIGN 16
+$L$cbc_dec_one:
+ movaps xmm11,xmm2
+ movups xmm0,XMMWORD[rcx]
+ movups xmm1,XMMWORD[16+rcx]
+ lea rcx,[32+rcx]
+ xorps xmm2,xmm0
+$L$oop_dec1_17:
+DB 102,15,56,222,209
+ dec eax
+ movups xmm1,XMMWORD[rcx]
+ lea rcx,[16+rcx]
+ jnz NEAR $L$oop_dec1_17
+DB 102,15,56,223,209
+ xorps xmm2,xmm10
+ movaps xmm10,xmm11
+ jmp NEAR $L$cbc_dec_tail_collected
+ALIGN 16
+$L$cbc_dec_two:
+ movaps xmm12,xmm3
+ call _aesni_decrypt2
+ pxor xmm2,xmm10
+ movaps xmm10,xmm12
+ pxor xmm3,xmm11
+ movdqu XMMWORD[rsi],xmm2
+ movdqa xmm2,xmm3
+ pxor xmm3,xmm3
+ lea rsi,[16+rsi]
+ jmp NEAR $L$cbc_dec_tail_collected
+ALIGN 16
+$L$cbc_dec_three:
+ movaps xmm13,xmm4
+ call _aesni_decrypt3
+ pxor xmm2,xmm10
+ movaps xmm10,xmm13
+ pxor xmm3,xmm11
+ movdqu XMMWORD[rsi],xmm2
+ pxor xmm4,xmm12
+ movdqu XMMWORD[16+rsi],xmm3
+ pxor xmm3,xmm3
+ movdqa xmm2,xmm4
+ pxor xmm4,xmm4
+ lea rsi,[32+rsi]
+ jmp NEAR $L$cbc_dec_tail_collected
+ALIGN 16
+$L$cbc_dec_four:
+ movaps xmm14,xmm5
+ call _aesni_decrypt4
+ pxor xmm2,xmm10
+ movaps xmm10,xmm14
+ pxor xmm3,xmm11
+ movdqu XMMWORD[rsi],xmm2
+ pxor xmm4,xmm12
+ movdqu XMMWORD[16+rsi],xmm3
+ pxor xmm3,xmm3
+ pxor xmm5,xmm13
+ movdqu XMMWORD[32+rsi],xmm4
+ pxor xmm4,xmm4
+ movdqa xmm2,xmm5
+ pxor xmm5,xmm5
+ lea rsi,[48+rsi]
+ jmp NEAR $L$cbc_dec_tail_collected
+
+ALIGN 16
+$L$cbc_dec_clear_tail_collected:
+ pxor xmm3,xmm3
+ pxor xmm4,xmm4
+ pxor xmm5,xmm5
+$L$cbc_dec_tail_collected:
+ movups XMMWORD[r8],xmm10
+ and rdx,15
+ jnz NEAR $L$cbc_dec_tail_partial
+ movups XMMWORD[rsi],xmm2
+ pxor xmm2,xmm2
+ jmp NEAR $L$cbc_dec_ret
+ALIGN 16
+$L$cbc_dec_tail_partial:
+ movaps XMMWORD[rsp],xmm2
+ pxor xmm2,xmm2
+ mov rcx,16
+ mov rdi,rsi
+ sub rcx,rdx
+ lea rsi,[rsp]
+ DD 0x9066A4F3
+ movdqa XMMWORD[rsp],xmm2
+
+$L$cbc_dec_ret:
+ xorps xmm0,xmm0
+ pxor xmm1,xmm1
+ movaps xmm6,XMMWORD[16+rsp]
+ movaps XMMWORD[16+rsp],xmm0
+ movaps xmm7,XMMWORD[32+rsp]
+ movaps XMMWORD[32+rsp],xmm0
+ movaps xmm8,XMMWORD[48+rsp]
+ movaps XMMWORD[48+rsp],xmm0
+ movaps xmm9,XMMWORD[64+rsp]
+ movaps XMMWORD[64+rsp],xmm0
+ movaps xmm10,XMMWORD[80+rsp]
+ movaps XMMWORD[80+rsp],xmm0
+ movaps xmm11,XMMWORD[96+rsp]
+ movaps XMMWORD[96+rsp],xmm0
+ movaps xmm12,XMMWORD[112+rsp]
+ movaps XMMWORD[112+rsp],xmm0
+ movaps xmm13,XMMWORD[128+rsp]
+ movaps XMMWORD[128+rsp],xmm0
+ movaps xmm14,XMMWORD[144+rsp]
+ movaps XMMWORD[144+rsp],xmm0
+ movaps xmm15,XMMWORD[160+rsp]
+ movaps XMMWORD[160+rsp],xmm0
+ mov rbp,QWORD[((-8))+r11]
+
+ lea rsp,[r11]
+
+$L$cbc_ret:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_aesni_cbc_encrypt:
+global aesni_set_decrypt_key
+
+ALIGN 16
+aesni_set_decrypt_key:
+
+DB 0x48,0x83,0xEC,0x08
+
+ call __aesni_set_encrypt_key
+ shl edx,4
+ test eax,eax
+ jnz NEAR $L$dec_key_ret
+ lea rcx,[16+rdx*1+r8]
+
+ movups xmm0,XMMWORD[r8]
+ movups xmm1,XMMWORD[rcx]
+ movups XMMWORD[rcx],xmm0
+ movups XMMWORD[r8],xmm1
+ lea r8,[16+r8]
+ lea rcx,[((-16))+rcx]
+
+$L$dec_key_inverse:
+ movups xmm0,XMMWORD[r8]
+ movups xmm1,XMMWORD[rcx]
+DB 102,15,56,219,192
+DB 102,15,56,219,201
+ lea r8,[16+r8]
+ lea rcx,[((-16))+rcx]
+ movups XMMWORD[16+rcx],xmm0
+ movups XMMWORD[(-16)+r8],xmm1
+ cmp rcx,r8
+ ja NEAR $L$dec_key_inverse
+
+ movups xmm0,XMMWORD[r8]
+DB 102,15,56,219,192
+ pxor xmm1,xmm1
+ movups XMMWORD[rcx],xmm0
+ pxor xmm0,xmm0
+$L$dec_key_ret:
+ add rsp,8
+
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_set_decrypt_key:
+
+global aesni_set_encrypt_key
+
+ALIGN 16
+aesni_set_encrypt_key:
+__aesni_set_encrypt_key:
+
+DB 0x48,0x83,0xEC,0x08
+
+ mov rax,-1
+ test rcx,rcx
+ jz NEAR $L$enc_key_ret
+ test r8,r8
+ jz NEAR $L$enc_key_ret
+
+ mov r10d,268437504
+ movups xmm0,XMMWORD[rcx]
+ xorps xmm4,xmm4
+ and r10d,DWORD[((OPENSSL_ia32cap_P+4))]
+ lea rax,[16+r8]
+ cmp edx,256
+ je NEAR $L$14rounds
+ cmp edx,192
+ je NEAR $L$12rounds
+ cmp edx,128
+ jne NEAR $L$bad_keybits
+
+$L$10rounds:
+ mov edx,9
+ cmp r10d,268435456
+ je NEAR $L$10rounds_alt
+
+ movups XMMWORD[r8],xmm0
+DB 102,15,58,223,200,1
+ call $L$key_expansion_128_cold
+DB 102,15,58,223,200,2
+ call $L$key_expansion_128
+DB 102,15,58,223,200,4
+ call $L$key_expansion_128
+DB 102,15,58,223,200,8
+ call $L$key_expansion_128
+DB 102,15,58,223,200,16
+ call $L$key_expansion_128
+DB 102,15,58,223,200,32
+ call $L$key_expansion_128
+DB 102,15,58,223,200,64
+ call $L$key_expansion_128
+DB 102,15,58,223,200,128
+ call $L$key_expansion_128
+DB 102,15,58,223,200,27
+ call $L$key_expansion_128
+DB 102,15,58,223,200,54
+ call $L$key_expansion_128
+ movups XMMWORD[rax],xmm0
+ mov DWORD[80+rax],edx
+ xor eax,eax
+ jmp NEAR $L$enc_key_ret
+
+ALIGN 16
+$L$10rounds_alt:
+ movdqa xmm5,XMMWORD[$L$key_rotate]
+ mov r10d,8
+ movdqa xmm4,XMMWORD[$L$key_rcon1]
+ movdqa xmm2,xmm0
+ movdqu XMMWORD[r8],xmm0
+ jmp NEAR $L$oop_key128
+
+ALIGN 16
+$L$oop_key128:
+DB 102,15,56,0,197
+DB 102,15,56,221,196
+ pslld xmm4,1
+ lea rax,[16+rax]
+
+ movdqa xmm3,xmm2
+ pslldq xmm2,4
+ pxor xmm3,xmm2
+ pslldq xmm2,4
+ pxor xmm3,xmm2
+ pslldq xmm2,4
+ pxor xmm2,xmm3
+
+ pxor xmm0,xmm2
+ movdqu XMMWORD[(-16)+rax],xmm0
+ movdqa xmm2,xmm0
+
+ dec r10d
+ jnz NEAR $L$oop_key128
+
+ movdqa xmm4,XMMWORD[$L$key_rcon1b]
+
+DB 102,15,56,0,197
+DB 102,15,56,221,196
+ pslld xmm4,1
+
+ movdqa xmm3,xmm2
+ pslldq xmm2,4
+ pxor xmm3,xmm2
+ pslldq xmm2,4
+ pxor xmm3,xmm2
+ pslldq xmm2,4
+ pxor xmm2,xmm3
+
+ pxor xmm0,xmm2
+ movdqu XMMWORD[rax],xmm0
+
+ movdqa xmm2,xmm0
+DB 102,15,56,0,197
+DB 102,15,56,221,196
+
+ movdqa xmm3,xmm2
+ pslldq xmm2,4
+ pxor xmm3,xmm2
+ pslldq xmm2,4
+ pxor xmm3,xmm2
+ pslldq xmm2,4
+ pxor xmm2,xmm3
+
+ pxor xmm0,xmm2
+ movdqu XMMWORD[16+rax],xmm0
+
+ mov DWORD[96+rax],edx
+ xor eax,eax
+ jmp NEAR $L$enc_key_ret
+
+ALIGN 16
+$L$12rounds:
+ movq xmm2,QWORD[16+rcx]
+ mov edx,11
+ cmp r10d,268435456
+ je NEAR $L$12rounds_alt
+
+ movups XMMWORD[r8],xmm0
+DB 102,15,58,223,202,1
+ call $L$key_expansion_192a_cold
+DB 102,15,58,223,202,2
+ call $L$key_expansion_192b
+DB 102,15,58,223,202,4
+ call $L$key_expansion_192a
+DB 102,15,58,223,202,8
+ call $L$key_expansion_192b
+DB 102,15,58,223,202,16
+ call $L$key_expansion_192a
+DB 102,15,58,223,202,32
+ call $L$key_expansion_192b
+DB 102,15,58,223,202,64
+ call $L$key_expansion_192a
+DB 102,15,58,223,202,128
+ call $L$key_expansion_192b
+ movups XMMWORD[rax],xmm0
+ mov DWORD[48+rax],edx
+ xor rax,rax
+ jmp NEAR $L$enc_key_ret
+
+ALIGN 16
+$L$12rounds_alt:
+ movdqa xmm5,XMMWORD[$L$key_rotate192]
+ movdqa xmm4,XMMWORD[$L$key_rcon1]
+ mov r10d,8
+ movdqu XMMWORD[r8],xmm0
+ jmp NEAR $L$oop_key192
+
+ALIGN 16
+$L$oop_key192:
+ movq QWORD[rax],xmm2
+ movdqa xmm1,xmm2
+DB 102,15,56,0,213
+DB 102,15,56,221,212
+ pslld xmm4,1
+ lea rax,[24+rax]
+
+ movdqa xmm3,xmm0
+ pslldq xmm0,4
+ pxor xmm3,xmm0
+ pslldq xmm0,4
+ pxor xmm3,xmm0
+ pslldq xmm0,4
+ pxor xmm0,xmm3
+
+ pshufd xmm3,xmm0,0xff
+ pxor xmm3,xmm1
+ pslldq xmm1,4
+ pxor xmm3,xmm1
+
+ pxor xmm0,xmm2
+ pxor xmm2,xmm3
+ movdqu XMMWORD[(-16)+rax],xmm0
+
+ dec r10d
+ jnz NEAR $L$oop_key192
+
+ mov DWORD[32+rax],edx
+ xor eax,eax
+ jmp NEAR $L$enc_key_ret
+
+ALIGN 16
+$L$14rounds:
+ movups xmm2,XMMWORD[16+rcx]
+ mov edx,13
+ lea rax,[16+rax]
+ cmp r10d,268435456
+ je NEAR $L$14rounds_alt
+
+ movups XMMWORD[r8],xmm0
+ movups XMMWORD[16+r8],xmm2
+DB 102,15,58,223,202,1
+ call $L$key_expansion_256a_cold
+DB 102,15,58,223,200,1
+ call $L$key_expansion_256b
+DB 102,15,58,223,202,2
+ call $L$key_expansion_256a
+DB 102,15,58,223,200,2
+ call $L$key_expansion_256b
+DB 102,15,58,223,202,4
+ call $L$key_expansion_256a
+DB 102,15,58,223,200,4
+ call $L$key_expansion_256b
+DB 102,15,58,223,202,8
+ call $L$key_expansion_256a
+DB 102,15,58,223,200,8
+ call $L$key_expansion_256b
+DB 102,15,58,223,202,16
+ call $L$key_expansion_256a
+DB 102,15,58,223,200,16
+ call $L$key_expansion_256b
+DB 102,15,58,223,202,32
+ call $L$key_expansion_256a
+DB 102,15,58,223,200,32
+ call $L$key_expansion_256b
+DB 102,15,58,223,202,64
+ call $L$key_expansion_256a
+ movups XMMWORD[rax],xmm0
+ mov DWORD[16+rax],edx
+ xor rax,rax
+ jmp NEAR $L$enc_key_ret
+
+ALIGN 16
+$L$14rounds_alt:
+ movdqa xmm5,XMMWORD[$L$key_rotate]
+ movdqa xmm4,XMMWORD[$L$key_rcon1]
+ mov r10d,7
+ movdqu XMMWORD[r8],xmm0
+ movdqa xmm1,xmm2
+ movdqu XMMWORD[16+r8],xmm2
+ jmp NEAR $L$oop_key256
+
+ALIGN 16
+$L$oop_key256:
+DB 102,15,56,0,213
+DB 102,15,56,221,212
+
+ movdqa xmm3,xmm0
+ pslldq xmm0,4
+ pxor xmm3,xmm0
+ pslldq xmm0,4
+ pxor xmm3,xmm0
+ pslldq xmm0,4
+ pxor xmm0,xmm3
+ pslld xmm4,1
+
+ pxor xmm0,xmm2
+ movdqu XMMWORD[rax],xmm0
+
+ dec r10d
+ jz NEAR $L$done_key256
+
+ pshufd xmm2,xmm0,0xff
+ pxor xmm3,xmm3
+DB 102,15,56,221,211
+
+ movdqa xmm3,xmm1
+ pslldq xmm1,4
+ pxor xmm3,xmm1
+ pslldq xmm1,4
+ pxor xmm3,xmm1
+ pslldq xmm1,4
+ pxor xmm1,xmm3
+
+ pxor xmm2,xmm1
+ movdqu XMMWORD[16+rax],xmm2
+ lea rax,[32+rax]
+ movdqa xmm1,xmm2
+
+ jmp NEAR $L$oop_key256
+
+$L$done_key256:
+ mov DWORD[16+rax],edx
+ xor eax,eax
+ jmp NEAR $L$enc_key_ret
+
+ALIGN 16
+$L$bad_keybits:
+ mov rax,-2
+$L$enc_key_ret:
+ pxor xmm0,xmm0
+ pxor xmm1,xmm1
+ pxor xmm2,xmm2
+ pxor xmm3,xmm3
+ pxor xmm4,xmm4
+ pxor xmm5,xmm5
+ add rsp,8
+
+ DB 0F3h,0C3h ;repret
+$L$SEH_end_set_encrypt_key:
+
+ALIGN 16
+$L$key_expansion_128:
+ movups XMMWORD[rax],xmm0
+ lea rax,[16+rax]
+$L$key_expansion_128_cold:
+ shufps xmm4,xmm0,16
+ xorps xmm0,xmm4
+ shufps xmm4,xmm0,140
+ xorps xmm0,xmm4
+ shufps xmm1,xmm1,255
+ xorps xmm0,xmm1
+ DB 0F3h,0C3h ;repret
+
+ALIGN 16
+$L$key_expansion_192a:
+ movups XMMWORD[rax],xmm0
+ lea rax,[16+rax]
+$L$key_expansion_192a_cold:
+ movaps xmm5,xmm2
+$L$key_expansion_192b_warm:
+ shufps xmm4,xmm0,16
+ movdqa xmm3,xmm2
+ xorps xmm0,xmm4
+ shufps xmm4,xmm0,140
+ pslldq xmm3,4
+ xorps xmm0,xmm4
+ pshufd xmm1,xmm1,85
+ pxor xmm2,xmm3
+ pxor xmm0,xmm1
+ pshufd xmm3,xmm0,255
+ pxor xmm2,xmm3
+ DB 0F3h,0C3h ;repret
+
+ALIGN 16
+$L$key_expansion_192b:
+ movaps xmm3,xmm0
+ shufps xmm5,xmm0,68
+ movups XMMWORD[rax],xmm5
+ shufps xmm3,xmm2,78
+ movups XMMWORD[16+rax],xmm3
+ lea rax,[32+rax]
+ jmp NEAR $L$key_expansion_192b_warm
+
+ALIGN 16
+$L$key_expansion_256a:
+ movups XMMWORD[rax],xmm2
+ lea rax,[16+rax]
+$L$key_expansion_256a_cold:
+ shufps xmm4,xmm0,16
+ xorps xmm0,xmm4
+ shufps xmm4,xmm0,140
+ xorps xmm0,xmm4
+ shufps xmm1,xmm1,255
+ xorps xmm0,xmm1
+ DB 0F3h,0C3h ;repret
+
+ALIGN 16
+$L$key_expansion_256b:
+ movups XMMWORD[rax],xmm0
+ lea rax,[16+rax]
+
+ shufps xmm4,xmm2,16
+ xorps xmm2,xmm4
+ shufps xmm4,xmm2,140
+ xorps xmm2,xmm4
+ shufps xmm1,xmm1,170
+ xorps xmm2,xmm1
+ DB 0F3h,0C3h ;repret
+
+
+
+ALIGN 64
+$L$bswap_mask:
+DB 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
+$L$increment32:
+ DD 6,6,6,0
+$L$increment64:
+ DD 1,0,0,0
+$L$xts_magic:
+ DD 0x87,0,1,0
+$L$increment1:
+DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
+$L$key_rotate:
+ DD 0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d
+$L$key_rotate192:
+ DD 0x04070605,0x04070605,0x04070605,0x04070605
+$L$key_rcon1:
+ DD 1,1,1,1
+$L$key_rcon1b:
+ DD 0x1b,0x1b,0x1b,0x1b
+
+DB 65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69
+DB 83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83
+DB 32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115
+DB 115,108,46,111,114,103,62,0
+ALIGN 64
+EXTERN __imp_RtlVirtualUnwind
+
+ALIGN 16
+ecb_ccm64_se_handler:
+ push rsi
+ push rdi
+ push rbx
+ push rbp
+ push r12
+ push r13
+ push r14
+ push r15
+ pushfq
+ sub rsp,64
+
+ mov rax,QWORD[120+r8]
+ mov rbx,QWORD[248+r8]
+
+ mov rsi,QWORD[8+r9]
+ mov r11,QWORD[56+r9]
+
+ mov r10d,DWORD[r11]
+ lea r10,[r10*1+rsi]
+ cmp rbx,r10
+ jb NEAR $L$common_seh_tail
+
+ mov rax,QWORD[152+r8]
+
+ mov r10d,DWORD[4+r11]
+ lea r10,[r10*1+rsi]
+ cmp rbx,r10
+ jae NEAR $L$common_seh_tail
+
+ lea rsi,[rax]
+ lea rdi,[512+r8]
+ mov ecx,8
+ DD 0xa548f3fc
+ lea rax,[88+rax]
+
+ jmp NEAR $L$common_seh_tail
+
+
+
+ALIGN 16
+ctr_xts_se_handler:
+ push rsi
+ push rdi
+ push rbx
+ push rbp
+ push r12
+ push r13
+ push r14
+ push r15
+ pushfq
+ sub rsp,64
+
+ mov rax,QWORD[120+r8]
+ mov rbx,QWORD[248+r8]
+
+ mov rsi,QWORD[8+r9]
+ mov r11,QWORD[56+r9]
+
+ mov r10d,DWORD[r11]
+ lea r10,[r10*1+rsi]
+ cmp rbx,r10
+ jb NEAR $L$common_seh_tail
+
+ mov rax,QWORD[152+r8]
+
+ mov r10d,DWORD[4+r11]
+ lea r10,[r10*1+rsi]
+ cmp rbx,r10
+ jae NEAR $L$common_seh_tail
+
+ mov rax,QWORD[208+r8]
+
+ lea rsi,[((-168))+rax]
+ lea rdi,[512+r8]
+ mov ecx,20
+ DD 0xa548f3fc
+
+ mov rbp,QWORD[((-8))+rax]
+ mov QWORD[160+r8],rbp
+ jmp NEAR $L$common_seh_tail
+
+
+
+ALIGN 16
+ocb_se_handler:
+ push rsi
+ push rdi
+ push rbx
+ push rbp
+ push r12
+ push r13
+ push r14
+ push r15
+ pushfq
+ sub rsp,64
+
+ mov rax,QWORD[120+r8]
+ mov rbx,QWORD[248+r8]
+
+ mov rsi,QWORD[8+r9]
+ mov r11,QWORD[56+r9]
+
+ mov r10d,DWORD[r11]
+ lea r10,[r10*1+rsi]
+ cmp rbx,r10
+ jb NEAR $L$common_seh_tail
+
+ mov r10d,DWORD[4+r11]
+ lea r10,[r10*1+rsi]
+ cmp rbx,r10
+ jae NEAR $L$common_seh_tail
+
+ mov r10d,DWORD[8+r11]
+ lea r10,[r10*1+rsi]
+ cmp rbx,r10
+ jae NEAR $L$ocb_no_xmm
+
+ mov rax,QWORD[152+r8]
+
+ lea rsi,[rax]
+ lea rdi,[512+r8]
+ mov ecx,20
+ DD 0xa548f3fc
+ lea rax,[((160+40))+rax]
+
+$L$ocb_no_xmm:
+ mov rbx,QWORD[((-8))+rax]
+ mov rbp,QWORD[((-16))+rax]
+ mov r12,QWORD[((-24))+rax]
+ mov r13,QWORD[((-32))+rax]
+ mov r14,QWORD[((-40))+rax]
+
+ mov QWORD[144+r8],rbx
+ mov QWORD[160+r8],rbp
+ mov QWORD[216+r8],r12
+ mov QWORD[224+r8],r13
+ mov QWORD[232+r8],r14
+
+ jmp NEAR $L$common_seh_tail
+
+
+ALIGN 16
+cbc_se_handler:
+ push rsi
+ push rdi
+ push rbx
+ push rbp
+ push r12
+ push r13
+ push r14
+ push r15
+ pushfq
+ sub rsp,64
+
+ mov rax,QWORD[152+r8]
+ mov rbx,QWORD[248+r8]
+
+ lea r10,[$L$cbc_decrypt_bulk]
+ cmp rbx,r10
+ jb NEAR $L$common_seh_tail
+
+ mov rax,QWORD[120+r8]
+
+ lea r10,[$L$cbc_decrypt_body]
+ cmp rbx,r10
+ jb NEAR $L$common_seh_tail
+
+ mov rax,QWORD[152+r8]
+
+ lea r10,[$L$cbc_ret]
+ cmp rbx,r10
+ jae NEAR $L$common_seh_tail
+
+ lea rsi,[16+rax]
+ lea rdi,[512+r8]
+ mov ecx,20
+ DD 0xa548f3fc
+
+ mov rax,QWORD[208+r8]
+
+ mov rbp,QWORD[((-8))+rax]
+ mov QWORD[160+r8],rbp
+
+$L$common_seh_tail:
+ mov rdi,QWORD[8+rax]
+ mov rsi,QWORD[16+rax]
+ mov QWORD[152+r8],rax
+ mov QWORD[168+r8],rsi
+ mov QWORD[176+r8],rdi
+
+ mov rdi,QWORD[40+r9]
+ mov rsi,r8
+ mov ecx,154
+ DD 0xa548f3fc
+
+ mov rsi,r9
+ xor rcx,rcx
+ mov rdx,QWORD[8+rsi]
+ mov r8,QWORD[rsi]
+ mov r9,QWORD[16+rsi]
+ mov r10,QWORD[40+rsi]
+ lea r11,[56+rsi]
+ lea r12,[24+rsi]
+ mov QWORD[32+rsp],r10
+ mov QWORD[40+rsp],r11
+ mov QWORD[48+rsp],r12
+ mov QWORD[56+rsp],rcx
+ call QWORD[__imp_RtlVirtualUnwind]
+
+ mov eax,1
+ add rsp,64
+ popfq
+ pop r15
+ pop r14
+ pop r13
+ pop r12
+ pop rbp
+ pop rbx
+ pop rdi
+ pop rsi
+ DB 0F3h,0C3h ;repret
+
+
+section .pdata rdata align=4
+ALIGN 4
+ DD $L$SEH_begin_aesni_ecb_encrypt wrt ..imagebase
+ DD $L$SEH_end_aesni_ecb_encrypt wrt ..imagebase
+ DD $L$SEH_info_ecb wrt ..imagebase
+
+ DD $L$SEH_begin_aesni_ccm64_encrypt_blocks wrt ..imagebase
+ DD $L$SEH_end_aesni_ccm64_encrypt_blocks wrt ..imagebase
+ DD $L$SEH_info_ccm64_enc wrt ..imagebase
+
+ DD $L$SEH_begin_aesni_ccm64_decrypt_blocks wrt ..imagebase
+ DD $L$SEH_end_aesni_ccm64_decrypt_blocks wrt ..imagebase
+ DD $L$SEH_info_ccm64_dec wrt ..imagebase
+
+ DD $L$SEH_begin_aesni_ctr32_encrypt_blocks wrt ..imagebase
+ DD $L$SEH_end_aesni_ctr32_encrypt_blocks wrt ..imagebase
+ DD $L$SEH_info_ctr32 wrt ..imagebase
+
+ DD $L$SEH_begin_aesni_xts_encrypt wrt ..imagebase
+ DD $L$SEH_end_aesni_xts_encrypt wrt ..imagebase
+ DD $L$SEH_info_xts_enc wrt ..imagebase
+
+ DD $L$SEH_begin_aesni_xts_decrypt wrt ..imagebase
+ DD $L$SEH_end_aesni_xts_decrypt wrt ..imagebase
+ DD $L$SEH_info_xts_dec wrt ..imagebase
+
+ DD $L$SEH_begin_aesni_ocb_encrypt wrt ..imagebase
+ DD $L$SEH_end_aesni_ocb_encrypt wrt ..imagebase
+ DD $L$SEH_info_ocb_enc wrt ..imagebase
+
+ DD $L$SEH_begin_aesni_ocb_decrypt wrt ..imagebase
+ DD $L$SEH_end_aesni_ocb_decrypt wrt ..imagebase
+ DD $L$SEH_info_ocb_dec wrt ..imagebase
+ DD $L$SEH_begin_aesni_cbc_encrypt wrt ..imagebase
+ DD $L$SEH_end_aesni_cbc_encrypt wrt ..imagebase
+ DD $L$SEH_info_cbc wrt ..imagebase
+
+ DD aesni_set_decrypt_key wrt ..imagebase
+ DD $L$SEH_end_set_decrypt_key wrt ..imagebase
+ DD $L$SEH_info_key wrt ..imagebase
+
+ DD aesni_set_encrypt_key wrt ..imagebase
+ DD $L$SEH_end_set_encrypt_key wrt ..imagebase
+ DD $L$SEH_info_key wrt ..imagebase
+section .xdata rdata align=8
+ALIGN 8
+$L$SEH_info_ecb:
+DB 9,0,0,0
+ DD ecb_ccm64_se_handler wrt ..imagebase
+ DD $L$ecb_enc_body wrt ..imagebase,$L$ecb_enc_ret wrt ..imagebase
+$L$SEH_info_ccm64_enc:
+DB 9,0,0,0
+ DD ecb_ccm64_se_handler wrt ..imagebase
+ DD $L$ccm64_enc_body wrt ..imagebase,$L$ccm64_enc_ret wrt ..imagebase
+$L$SEH_info_ccm64_dec:
+DB 9,0,0,0
+ DD ecb_ccm64_se_handler wrt ..imagebase
+ DD $L$ccm64_dec_body wrt ..imagebase,$L$ccm64_dec_ret wrt ..imagebase
+$L$SEH_info_ctr32:
+DB 9,0,0,0
+ DD ctr_xts_se_handler wrt ..imagebase
+ DD $L$ctr32_body wrt ..imagebase,$L$ctr32_epilogue wrt ..imagebase
+$L$SEH_info_xts_enc:
+DB 9,0,0,0
+ DD ctr_xts_se_handler wrt ..imagebase
+ DD $L$xts_enc_body wrt ..imagebase,$L$xts_enc_epilogue wrt ..imagebase
+$L$SEH_info_xts_dec:
+DB 9,0,0,0
+ DD ctr_xts_se_handler wrt ..imagebase
+ DD $L$xts_dec_body wrt ..imagebase,$L$xts_dec_epilogue wrt ..imagebase
+$L$SEH_info_ocb_enc:
+DB 9,0,0,0
+ DD ocb_se_handler wrt ..imagebase
+ DD $L$ocb_enc_body wrt ..imagebase,$L$ocb_enc_epilogue wrt ..imagebase
+ DD $L$ocb_enc_pop wrt ..imagebase
+ DD 0
+$L$SEH_info_ocb_dec:
+DB 9,0,0,0
+ DD ocb_se_handler wrt ..imagebase
+ DD $L$ocb_dec_body wrt ..imagebase,$L$ocb_dec_epilogue wrt ..imagebase
+ DD $L$ocb_dec_pop wrt ..imagebase
+ DD 0
+$L$SEH_info_cbc:
+DB 9,0,0,0
+ DD cbc_se_handler wrt ..imagebase
+$L$SEH_info_key:
+DB 0x01,0x04,0x01,0x00
+DB 0x04,0x02,0x00,0x00
diff --git a/CryptoPkg/Library/OpensslLib/X64/crypto/aes/vpaes-x86_64.nasm b/CryptoPkg/Library/OpensslLib/X64/crypto/aes/vpaes-x86_64.nasm
new file mode 100644
index 0000000000..1c911fa294
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/X64/crypto/aes/vpaes-x86_64.nasm
@@ -0,0 +1,1173 @@
+; WARNING: do not edit!
+; Generated from openssl/crypto/aes/asm/vpaes-x86_64.pl
+;
+; Copyright 2011-2020 The OpenSSL Project Authors. All Rights Reserved.
+;
+; Licensed under the OpenSSL license (the "License"). You may not use
+; this file except in compliance with the License. You can obtain a copy
+; in the file LICENSE in the source distribution or at
+; https://www.openssl.org/source/license.html
+
+default rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section .text code align=64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ALIGN 16
+_vpaes_encrypt_core:
+
+ mov r9,rdx
+ mov r11,16
+ mov eax,DWORD[240+rdx]
+ movdqa xmm1,xmm9
+ movdqa xmm2,XMMWORD[$L$k_ipt]
+ pandn xmm1,xmm0
+ movdqu xmm5,XMMWORD[r9]
+ psrld xmm1,4
+ pand xmm0,xmm9
+DB 102,15,56,0,208
+ movdqa xmm0,XMMWORD[(($L$k_ipt+16))]
+DB 102,15,56,0,193
+ pxor xmm2,xmm5
+ add r9,16
+ pxor xmm0,xmm2
+ lea r10,[$L$k_mc_backward]
+ jmp NEAR $L$enc_entry
+
+ALIGN 16
+$L$enc_loop:
+
+ movdqa xmm4,xmm13
+ movdqa xmm0,xmm12
+DB 102,15,56,0,226
+DB 102,15,56,0,195
+ pxor xmm4,xmm5
+ movdqa xmm5,xmm15
+ pxor xmm0,xmm4
+ movdqa xmm1,XMMWORD[((-64))+r10*1+r11]
+DB 102,15,56,0,234
+ movdqa xmm4,XMMWORD[r10*1+r11]
+ movdqa xmm2,xmm14
+DB 102,15,56,0,211
+ movdqa xmm3,xmm0
+ pxor xmm2,xmm5
+DB 102,15,56,0,193
+ add r9,16
+ pxor xmm0,xmm2
+DB 102,15,56,0,220
+ add r11,16
+ pxor xmm3,xmm0
+DB 102,15,56,0,193
+ and r11,0x30
+ sub rax,1
+ pxor xmm0,xmm3
+
+$L$enc_entry:
+
+ movdqa xmm1,xmm9
+ movdqa xmm5,xmm11
+ pandn xmm1,xmm0
+ psrld xmm1,4
+ pand xmm0,xmm9
+DB 102,15,56,0,232
+ movdqa xmm3,xmm10
+ pxor xmm0,xmm1
+DB 102,15,56,0,217
+ movdqa xmm4,xmm10
+ pxor xmm3,xmm5
+DB 102,15,56,0,224
+ movdqa xmm2,xmm10
+ pxor xmm4,xmm5
+DB 102,15,56,0,211
+ movdqa xmm3,xmm10
+ pxor xmm2,xmm0
+DB 102,15,56,0,220
+ movdqu xmm5,XMMWORD[r9]
+ pxor xmm3,xmm1
+ jnz NEAR $L$enc_loop
+
+
+ movdqa xmm4,XMMWORD[((-96))+r10]
+ movdqa xmm0,XMMWORD[((-80))+r10]
+DB 102,15,56,0,226
+ pxor xmm4,xmm5
+DB 102,15,56,0,195
+ movdqa xmm1,XMMWORD[64+r10*1+r11]
+ pxor xmm0,xmm4
+DB 102,15,56,0,193
+ DB 0F3h,0C3h ;repret
+
+
+
+
+
+
+
+
+
+ALIGN 16
+_vpaes_decrypt_core:
+
+ mov r9,rdx
+ mov eax,DWORD[240+rdx]
+ movdqa xmm1,xmm9
+ movdqa xmm2,XMMWORD[$L$k_dipt]
+ pandn xmm1,xmm0
+ mov r11,rax
+ psrld xmm1,4
+ movdqu xmm5,XMMWORD[r9]
+ shl r11,4
+ pand xmm0,xmm9
+DB 102,15,56,0,208
+ movdqa xmm0,XMMWORD[(($L$k_dipt+16))]
+ xor r11,0x30
+ lea r10,[$L$k_dsbd]
+DB 102,15,56,0,193
+ and r11,0x30
+ pxor xmm2,xmm5
+ movdqa xmm5,XMMWORD[(($L$k_mc_forward+48))]
+ pxor xmm0,xmm2
+ add r9,16
+ add r11,r10
+ jmp NEAR $L$dec_entry
+
+ALIGN 16
+$L$dec_loop:
+
+
+
+ movdqa xmm4,XMMWORD[((-32))+r10]
+ movdqa xmm1,XMMWORD[((-16))+r10]
+DB 102,15,56,0,226
+DB 102,15,56,0,203
+ pxor xmm0,xmm4
+ movdqa xmm4,XMMWORD[r10]
+ pxor xmm0,xmm1
+ movdqa xmm1,XMMWORD[16+r10]
+
+DB 102,15,56,0,226
+DB 102,15,56,0,197
+DB 102,15,56,0,203
+ pxor xmm0,xmm4
+ movdqa xmm4,XMMWORD[32+r10]
+ pxor xmm0,xmm1
+ movdqa xmm1,XMMWORD[48+r10]
+
+DB 102,15,56,0,226
+DB 102,15,56,0,197
+DB 102,15,56,0,203
+ pxor xmm0,xmm4
+ movdqa xmm4,XMMWORD[64+r10]
+ pxor xmm0,xmm1
+ movdqa xmm1,XMMWORD[80+r10]
+
+DB 102,15,56,0,226
+DB 102,15,56,0,197
+DB 102,15,56,0,203
+ pxor xmm0,xmm4
+ add r9,16
+DB 102,15,58,15,237,12
+ pxor xmm0,xmm1
+ sub rax,1
+
+$L$dec_entry:
+
+ movdqa xmm1,xmm9
+ pandn xmm1,xmm0
+ movdqa xmm2,xmm11
+ psrld xmm1,4
+ pand xmm0,xmm9
+DB 102,15,56,0,208
+ movdqa xmm3,xmm10
+ pxor xmm0,xmm1
+DB 102,15,56,0,217
+ movdqa xmm4,xmm10
+ pxor xmm3,xmm2
+DB 102,15,56,0,224
+ pxor xmm4,xmm2
+ movdqa xmm2,xmm10
+DB 102,15,56,0,211
+ movdqa xmm3,xmm10
+ pxor xmm2,xmm0
+DB 102,15,56,0,220
+ movdqu xmm0,XMMWORD[r9]
+ pxor xmm3,xmm1
+ jnz NEAR $L$dec_loop
+
+
+ movdqa xmm4,XMMWORD[96+r10]
+DB 102,15,56,0,226
+ pxor xmm4,xmm0
+ movdqa xmm0,XMMWORD[112+r10]
+ movdqa xmm2,XMMWORD[((-352))+r11]
+DB 102,15,56,0,195
+ pxor xmm0,xmm4
+DB 102,15,56,0,194
+ DB 0F3h,0C3h ;repret
+
+
+
+
+
+
+
+
+
+ALIGN 16
+_vpaes_schedule_core:
+
+
+
+
+
+
+ call _vpaes_preheat
+ movdqa xmm8,XMMWORD[$L$k_rcon]
+ movdqu xmm0,XMMWORD[rdi]
+
+
+ movdqa xmm3,xmm0
+ lea r11,[$L$k_ipt]
+ call _vpaes_schedule_transform
+ movdqa xmm7,xmm0
+
+ lea r10,[$L$k_sr]
+ test rcx,rcx
+ jnz NEAR $L$schedule_am_decrypting
+
+
+ movdqu XMMWORD[rdx],xmm0
+ jmp NEAR $L$schedule_go
+
+$L$schedule_am_decrypting:
+
+ movdqa xmm1,XMMWORD[r10*1+r8]
+DB 102,15,56,0,217
+ movdqu XMMWORD[rdx],xmm3
+ xor r8,0x30
+
+$L$schedule_go:
+ cmp esi,192
+ ja NEAR $L$schedule_256
+ je NEAR $L$schedule_192
+
+
+
+
+
+
+
+
+
+
+$L$schedule_128:
+ mov esi,10
+
+$L$oop_schedule_128:
+ call _vpaes_schedule_round
+ dec rsi
+ jz NEAR $L$schedule_mangle_last
+ call _vpaes_schedule_mangle
+ jmp NEAR $L$oop_schedule_128
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ALIGN 16
+$L$schedule_192:
+ movdqu xmm0,XMMWORD[8+rdi]
+ call _vpaes_schedule_transform
+ movdqa xmm6,xmm0
+ pxor xmm4,xmm4
+ movhlps xmm6,xmm4
+ mov esi,4
+
+$L$oop_schedule_192:
+ call _vpaes_schedule_round
+DB 102,15,58,15,198,8
+ call _vpaes_schedule_mangle
+ call _vpaes_schedule_192_smear
+ call _vpaes_schedule_mangle
+ call _vpaes_schedule_round
+ dec rsi
+ jz NEAR $L$schedule_mangle_last
+ call _vpaes_schedule_mangle
+ call _vpaes_schedule_192_smear
+ jmp NEAR $L$oop_schedule_192
+
+
+
+
+
+
+
+
+
+
+
+ALIGN 16
+$L$schedule_256:
+ movdqu xmm0,XMMWORD[16+rdi]
+ call _vpaes_schedule_transform
+ mov esi,7
+
+$L$oop_schedule_256:
+ call _vpaes_schedule_mangle
+ movdqa xmm6,xmm0
+
+
+ call _vpaes_schedule_round
+ dec rsi
+ jz NEAR $L$schedule_mangle_last
+ call _vpaes_schedule_mangle
+
+
+ pshufd xmm0,xmm0,0xFF
+ movdqa xmm5,xmm7
+ movdqa xmm7,xmm6
+ call _vpaes_schedule_low_round
+ movdqa xmm7,xmm5
+
+ jmp NEAR $L$oop_schedule_256
+
+
+
+
+
+
+
+
+
+
+
+
+ALIGN 16
+$L$schedule_mangle_last:
+
+ lea r11,[$L$k_deskew]
+ test rcx,rcx
+ jnz NEAR $L$schedule_mangle_last_dec
+
+
+ movdqa xmm1,XMMWORD[r10*1+r8]
+DB 102,15,56,0,193
+ lea r11,[$L$k_opt]
+ add rdx,32
+
+$L$schedule_mangle_last_dec:
+ add rdx,-16
+ pxor xmm0,XMMWORD[$L$k_s63]
+ call _vpaes_schedule_transform
+ movdqu XMMWORD[rdx],xmm0
+
+
+ pxor xmm0,xmm0
+ pxor xmm1,xmm1
+ pxor xmm2,xmm2
+ pxor xmm3,xmm3
+ pxor xmm4,xmm4
+ pxor xmm5,xmm5
+ pxor xmm6,xmm6
+ pxor xmm7,xmm7
+ DB 0F3h,0C3h ;repret
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ALIGN 16
+_vpaes_schedule_192_smear:
+
+ pshufd xmm1,xmm6,0x80
+ pshufd xmm0,xmm7,0xFE
+ pxor xmm6,xmm1
+ pxor xmm1,xmm1
+ pxor xmm6,xmm0
+ movdqa xmm0,xmm6
+ movhlps xmm6,xmm1
+ DB 0F3h,0C3h ;repret
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ALIGN 16
+_vpaes_schedule_round:
+
+
+ pxor xmm1,xmm1
+DB 102,65,15,58,15,200,15
+DB 102,69,15,58,15,192,15
+ pxor xmm7,xmm1
+
+
+ pshufd xmm0,xmm0,0xFF
+DB 102,15,58,15,192,1
+
+
+
+
+_vpaes_schedule_low_round:
+
+ movdqa xmm1,xmm7
+ pslldq xmm7,4
+ pxor xmm7,xmm1
+ movdqa xmm1,xmm7
+ pslldq xmm7,8
+ pxor xmm7,xmm1
+ pxor xmm7,XMMWORD[$L$k_s63]
+
+
+ movdqa xmm1,xmm9
+ pandn xmm1,xmm0
+ psrld xmm1,4
+ pand xmm0,xmm9
+ movdqa xmm2,xmm11
+DB 102,15,56,0,208
+ pxor xmm0,xmm1
+ movdqa xmm3,xmm10
+DB 102,15,56,0,217
+ pxor xmm3,xmm2
+ movdqa xmm4,xmm10
+DB 102,15,56,0,224
+ pxor xmm4,xmm2
+ movdqa xmm2,xmm10
+DB 102,15,56,0,211
+ pxor xmm2,xmm0
+ movdqa xmm3,xmm10
+DB 102,15,56,0,220
+ pxor xmm3,xmm1
+ movdqa xmm4,xmm13
+DB 102,15,56,0,226
+ movdqa xmm0,xmm12
+DB 102,15,56,0,195
+ pxor xmm0,xmm4
+
+
+ pxor xmm0,xmm7
+ movdqa xmm7,xmm0
+ DB 0F3h,0C3h ;repret
+
+
+
+
+
+
+
+
+
+
+
+
+
+ALIGN 16
+_vpaes_schedule_transform:
+
+ movdqa xmm1,xmm9
+ pandn xmm1,xmm0
+ psrld xmm1,4
+ pand xmm0,xmm9
+ movdqa xmm2,XMMWORD[r11]
+DB 102,15,56,0,208
+ movdqa xmm0,XMMWORD[16+r11]
+DB 102,15,56,0,193
+ pxor xmm0,xmm2
+ DB 0F3h,0C3h ;repret
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ALIGN 16
+_vpaes_schedule_mangle:
+
+ movdqa xmm4,xmm0
+ movdqa xmm5,XMMWORD[$L$k_mc_forward]
+ test rcx,rcx
+ jnz NEAR $L$schedule_mangle_dec
+
+
+ add rdx,16
+ pxor xmm4,XMMWORD[$L$k_s63]
+DB 102,15,56,0,229
+ movdqa xmm3,xmm4
+DB 102,15,56,0,229
+ pxor xmm3,xmm4
+DB 102,15,56,0,229
+ pxor xmm3,xmm4
+
+ jmp NEAR $L$schedule_mangle_both
+ALIGN 16
+$L$schedule_mangle_dec:
+
+ lea r11,[$L$k_dksd]
+ movdqa xmm1,xmm9
+ pandn xmm1,xmm4
+ psrld xmm1,4
+ pand xmm4,xmm9
+
+ movdqa xmm2,XMMWORD[r11]
+DB 102,15,56,0,212
+ movdqa xmm3,XMMWORD[16+r11]
+DB 102,15,56,0,217
+ pxor xmm3,xmm2
+DB 102,15,56,0,221
+
+ movdqa xmm2,XMMWORD[32+r11]
+DB 102,15,56,0,212
+ pxor xmm2,xmm3
+ movdqa xmm3,XMMWORD[48+r11]
+DB 102,15,56,0,217
+ pxor xmm3,xmm2
+DB 102,15,56,0,221
+
+ movdqa xmm2,XMMWORD[64+r11]
+DB 102,15,56,0,212
+ pxor xmm2,xmm3
+ movdqa xmm3,XMMWORD[80+r11]
+DB 102,15,56,0,217
+ pxor xmm3,xmm2
+DB 102,15,56,0,221
+
+ movdqa xmm2,XMMWORD[96+r11]
+DB 102,15,56,0,212
+ pxor xmm2,xmm3
+ movdqa xmm3,XMMWORD[112+r11]
+DB 102,15,56,0,217
+ pxor xmm3,xmm2
+
+ add rdx,-16
+
+$L$schedule_mangle_both:
+ movdqa xmm1,XMMWORD[r10*1+r8]
+DB 102,15,56,0,217
+ add r8,-16
+ and r8,0x30
+ movdqu XMMWORD[rdx],xmm3
+ DB 0F3h,0C3h ;repret
+
+
+
+
+
+
+global vpaes_set_encrypt_key
+
+ALIGN 16
+vpaes_set_encrypt_key:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_vpaes_set_encrypt_key:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+
+ lea rsp,[((-184))+rsp]
+ movaps XMMWORD[16+rsp],xmm6
+ movaps XMMWORD[32+rsp],xmm7
+ movaps XMMWORD[48+rsp],xmm8
+ movaps XMMWORD[64+rsp],xmm9
+ movaps XMMWORD[80+rsp],xmm10
+ movaps XMMWORD[96+rsp],xmm11
+ movaps XMMWORD[112+rsp],xmm12
+ movaps XMMWORD[128+rsp],xmm13
+ movaps XMMWORD[144+rsp],xmm14
+ movaps XMMWORD[160+rsp],xmm15
+$L$enc_key_body:
+ mov eax,esi
+ shr eax,5
+ add eax,5
+ mov DWORD[240+rdx],eax
+
+ mov ecx,0
+ mov r8d,0x30
+ call _vpaes_schedule_core
+ movaps xmm6,XMMWORD[16+rsp]
+ movaps xmm7,XMMWORD[32+rsp]
+ movaps xmm8,XMMWORD[48+rsp]
+ movaps xmm9,XMMWORD[64+rsp]
+ movaps xmm10,XMMWORD[80+rsp]
+ movaps xmm11,XMMWORD[96+rsp]
+ movaps xmm12,XMMWORD[112+rsp]
+ movaps xmm13,XMMWORD[128+rsp]
+ movaps xmm14,XMMWORD[144+rsp]
+ movaps xmm15,XMMWORD[160+rsp]
+ lea rsp,[184+rsp]
+$L$enc_key_epilogue:
+ xor eax,eax
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_vpaes_set_encrypt_key:
+
+global vpaes_set_decrypt_key
+
+ALIGN 16
+vpaes_set_decrypt_key:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_vpaes_set_decrypt_key:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+
+ lea rsp,[((-184))+rsp]
+ movaps XMMWORD[16+rsp],xmm6
+ movaps XMMWORD[32+rsp],xmm7
+ movaps XMMWORD[48+rsp],xmm8
+ movaps XMMWORD[64+rsp],xmm9
+ movaps XMMWORD[80+rsp],xmm10
+ movaps XMMWORD[96+rsp],xmm11
+ movaps XMMWORD[112+rsp],xmm12
+ movaps XMMWORD[128+rsp],xmm13
+ movaps XMMWORD[144+rsp],xmm14
+ movaps XMMWORD[160+rsp],xmm15
+$L$dec_key_body:
+ mov eax,esi
+ shr eax,5
+ add eax,5
+ mov DWORD[240+rdx],eax
+ shl eax,4
+ lea rdx,[16+rax*1+rdx]
+
+ mov ecx,1
+ mov r8d,esi
+ shr r8d,1
+ and r8d,32
+ xor r8d,32
+ call _vpaes_schedule_core
+ movaps xmm6,XMMWORD[16+rsp]
+ movaps xmm7,XMMWORD[32+rsp]
+ movaps xmm8,XMMWORD[48+rsp]
+ movaps xmm9,XMMWORD[64+rsp]
+ movaps xmm10,XMMWORD[80+rsp]
+ movaps xmm11,XMMWORD[96+rsp]
+ movaps xmm12,XMMWORD[112+rsp]
+ movaps xmm13,XMMWORD[128+rsp]
+ movaps xmm14,XMMWORD[144+rsp]
+ movaps xmm15,XMMWORD[160+rsp]
+ lea rsp,[184+rsp]
+$L$dec_key_epilogue:
+ xor eax,eax
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_vpaes_set_decrypt_key:
+
+global vpaes_encrypt
+
+ALIGN 16
+vpaes_encrypt:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_vpaes_encrypt:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+
+ lea rsp,[((-184))+rsp]
+ movaps XMMWORD[16+rsp],xmm6
+ movaps XMMWORD[32+rsp],xmm7
+ movaps XMMWORD[48+rsp],xmm8
+ movaps XMMWORD[64+rsp],xmm9
+ movaps XMMWORD[80+rsp],xmm10
+ movaps XMMWORD[96+rsp],xmm11
+ movaps XMMWORD[112+rsp],xmm12
+ movaps XMMWORD[128+rsp],xmm13
+ movaps XMMWORD[144+rsp],xmm14
+ movaps XMMWORD[160+rsp],xmm15
+$L$enc_body:
+ movdqu xmm0,XMMWORD[rdi]
+ call _vpaes_preheat
+ call _vpaes_encrypt_core
+ movdqu XMMWORD[rsi],xmm0
+ movaps xmm6,XMMWORD[16+rsp]
+ movaps xmm7,XMMWORD[32+rsp]
+ movaps xmm8,XMMWORD[48+rsp]
+ movaps xmm9,XMMWORD[64+rsp]
+ movaps xmm10,XMMWORD[80+rsp]
+ movaps xmm11,XMMWORD[96+rsp]
+ movaps xmm12,XMMWORD[112+rsp]
+ movaps xmm13,XMMWORD[128+rsp]
+ movaps xmm14,XMMWORD[144+rsp]
+ movaps xmm15,XMMWORD[160+rsp]
+ lea rsp,[184+rsp]
+$L$enc_epilogue:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_vpaes_encrypt:
+
+global vpaes_decrypt
+
+ALIGN 16
+vpaes_decrypt:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_vpaes_decrypt:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+
+ lea rsp,[((-184))+rsp]
+ movaps XMMWORD[16+rsp],xmm6
+ movaps XMMWORD[32+rsp],xmm7
+ movaps XMMWORD[48+rsp],xmm8
+ movaps XMMWORD[64+rsp],xmm9
+ movaps XMMWORD[80+rsp],xmm10
+ movaps XMMWORD[96+rsp],xmm11
+ movaps XMMWORD[112+rsp],xmm12
+ movaps XMMWORD[128+rsp],xmm13
+ movaps XMMWORD[144+rsp],xmm14
+ movaps XMMWORD[160+rsp],xmm15
+$L$dec_body:
+ movdqu xmm0,XMMWORD[rdi]
+ call _vpaes_preheat
+ call _vpaes_decrypt_core
+ movdqu XMMWORD[rsi],xmm0
+ movaps xmm6,XMMWORD[16+rsp]
+ movaps xmm7,XMMWORD[32+rsp]
+ movaps xmm8,XMMWORD[48+rsp]
+ movaps xmm9,XMMWORD[64+rsp]
+ movaps xmm10,XMMWORD[80+rsp]
+ movaps xmm11,XMMWORD[96+rsp]
+ movaps xmm12,XMMWORD[112+rsp]
+ movaps xmm13,XMMWORD[128+rsp]
+ movaps xmm14,XMMWORD[144+rsp]
+ movaps xmm15,XMMWORD[160+rsp]
+ lea rsp,[184+rsp]
+$L$dec_epilogue:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_vpaes_decrypt:
+global vpaes_cbc_encrypt
+
+ALIGN 16
+vpaes_cbc_encrypt:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_vpaes_cbc_encrypt:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+ mov rcx,r9
+ mov r8,QWORD[40+rsp]
+ mov r9,QWORD[48+rsp]
+
+
+
+ xchg rdx,rcx
+ sub rcx,16
+ jc NEAR $L$cbc_abort
+ lea rsp,[((-184))+rsp]
+ movaps XMMWORD[16+rsp],xmm6
+ movaps XMMWORD[32+rsp],xmm7
+ movaps XMMWORD[48+rsp],xmm8
+ movaps XMMWORD[64+rsp],xmm9
+ movaps XMMWORD[80+rsp],xmm10
+ movaps XMMWORD[96+rsp],xmm11
+ movaps XMMWORD[112+rsp],xmm12
+ movaps XMMWORD[128+rsp],xmm13
+ movaps XMMWORD[144+rsp],xmm14
+ movaps XMMWORD[160+rsp],xmm15
+$L$cbc_body:
+ movdqu xmm6,XMMWORD[r8]
+ sub rsi,rdi
+ call _vpaes_preheat
+ cmp r9d,0
+ je NEAR $L$cbc_dec_loop
+ jmp NEAR $L$cbc_enc_loop
+ALIGN 16
+$L$cbc_enc_loop:
+ movdqu xmm0,XMMWORD[rdi]
+ pxor xmm0,xmm6
+ call _vpaes_encrypt_core
+ movdqa xmm6,xmm0
+ movdqu XMMWORD[rdi*1+rsi],xmm0
+ lea rdi,[16+rdi]
+ sub rcx,16
+ jnc NEAR $L$cbc_enc_loop
+ jmp NEAR $L$cbc_done
+ALIGN 16
+$L$cbc_dec_loop:
+ movdqu xmm0,XMMWORD[rdi]
+ movdqa xmm7,xmm0
+ call _vpaes_decrypt_core
+ pxor xmm0,xmm6
+ movdqa xmm6,xmm7
+ movdqu XMMWORD[rdi*1+rsi],xmm0
+ lea rdi,[16+rdi]
+ sub rcx,16
+ jnc NEAR $L$cbc_dec_loop
+$L$cbc_done:
+ movdqu XMMWORD[r8],xmm6
+ movaps xmm6,XMMWORD[16+rsp]
+ movaps xmm7,XMMWORD[32+rsp]
+ movaps xmm8,XMMWORD[48+rsp]
+ movaps xmm9,XMMWORD[64+rsp]
+ movaps xmm10,XMMWORD[80+rsp]
+ movaps xmm11,XMMWORD[96+rsp]
+ movaps xmm12,XMMWORD[112+rsp]
+ movaps xmm13,XMMWORD[128+rsp]
+ movaps xmm14,XMMWORD[144+rsp]
+ movaps xmm15,XMMWORD[160+rsp]
+ lea rsp,[184+rsp]
+$L$cbc_epilogue:
+$L$cbc_abort:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_vpaes_cbc_encrypt:
+
+
+
+
+
+
+
+ALIGN 16
+_vpaes_preheat:
+
+ lea r10,[$L$k_s0F]
+ movdqa xmm10,XMMWORD[((-32))+r10]
+ movdqa xmm11,XMMWORD[((-16))+r10]
+ movdqa xmm9,XMMWORD[r10]
+ movdqa xmm13,XMMWORD[48+r10]
+ movdqa xmm12,XMMWORD[64+r10]
+ movdqa xmm15,XMMWORD[80+r10]
+ movdqa xmm14,XMMWORD[96+r10]
+ DB 0F3h,0C3h ;repret
+
+
+
+
+
+
+
+
+ALIGN 64
+_vpaes_consts:
+$L$k_inv:
+ DQ 0x0E05060F0D080180,0x040703090A0B0C02
+ DQ 0x01040A060F0B0780,0x030D0E0C02050809
+
+$L$k_s0F:
+ DQ 0x0F0F0F0F0F0F0F0F,0x0F0F0F0F0F0F0F0F
+
+$L$k_ipt:
+ DQ 0xC2B2E8985A2A7000,0xCABAE09052227808
+ DQ 0x4C01307D317C4D00,0xCD80B1FCB0FDCC81
+
+$L$k_sb1:
+ DQ 0xB19BE18FCB503E00,0xA5DF7A6E142AF544
+ DQ 0x3618D415FAE22300,0x3BF7CCC10D2ED9EF
+$L$k_sb2:
+ DQ 0xE27A93C60B712400,0x5EB7E955BC982FCD
+ DQ 0x69EB88400AE12900,0xC2A163C8AB82234A
+$L$k_sbo:
+ DQ 0xD0D26D176FBDC700,0x15AABF7AC502A878
+ DQ 0xCFE474A55FBB6A00,0x8E1E90D1412B35FA
+
+$L$k_mc_forward:
+ DQ 0x0407060500030201,0x0C0F0E0D080B0A09
+ DQ 0x080B0A0904070605,0x000302010C0F0E0D
+ DQ 0x0C0F0E0D080B0A09,0x0407060500030201
+ DQ 0x000302010C0F0E0D,0x080B0A0904070605
+
+$L$k_mc_backward:
+ DQ 0x0605040702010003,0x0E0D0C0F0A09080B
+ DQ 0x020100030E0D0C0F,0x0A09080B06050407
+ DQ 0x0E0D0C0F0A09080B,0x0605040702010003
+ DQ 0x0A09080B06050407,0x020100030E0D0C0F
+
+$L$k_sr:
+ DQ 0x0706050403020100,0x0F0E0D0C0B0A0908
+ DQ 0x030E09040F0A0500,0x0B06010C07020D08
+ DQ 0x0F060D040B020900,0x070E050C030A0108
+ DQ 0x0B0E0104070A0D00,0x0306090C0F020508
+
+$L$k_rcon:
+ DQ 0x1F8391B9AF9DEEB6,0x702A98084D7C7D81
+
+$L$k_s63:
+ DQ 0x5B5B5B5B5B5B5B5B,0x5B5B5B5B5B5B5B5B
+
+$L$k_opt:
+ DQ 0xFF9F4929D6B66000,0xF7974121DEBE6808
+ DQ 0x01EDBD5150BCEC00,0xE10D5DB1B05C0CE0
+
+$L$k_deskew:
+ DQ 0x07E4A34047A4E300,0x1DFEB95A5DBEF91A
+ DQ 0x5F36B5DC83EA6900,0x2841C2ABF49D1E77
+
+
+
+
+
+$L$k_dksd:
+ DQ 0xFEB91A5DA3E44700,0x0740E3A45A1DBEF9
+ DQ 0x41C277F4B5368300,0x5FDC69EAAB289D1E
+$L$k_dksb:
+ DQ 0x9A4FCA1F8550D500,0x03D653861CC94C99
+ DQ 0x115BEDA7B6FC4A00,0xD993256F7E3482C8
+$L$k_dkse:
+ DQ 0xD5031CCA1FC9D600,0x53859A4C994F5086
+ DQ 0xA23196054FDC7BE8,0xCD5EF96A20B31487
+$L$k_dks9:
+ DQ 0xB6116FC87ED9A700,0x4AED933482255BFC
+ DQ 0x4576516227143300,0x8BB89FACE9DAFDCE
+
+
+
+
+
+$L$k_dipt:
+ DQ 0x0F505B040B545F00,0x154A411E114E451A
+ DQ 0x86E383E660056500,0x12771772F491F194
+
+$L$k_dsb9:
+ DQ 0x851C03539A86D600,0xCAD51F504F994CC9
+ DQ 0xC03B1789ECD74900,0x725E2C9EB2FBA565
+$L$k_dsbd:
+ DQ 0x7D57CCDFE6B1A200,0xF56E9B13882A4439
+ DQ 0x3CE2FAF724C6CB00,0x2931180D15DEEFD3
+$L$k_dsbb:
+ DQ 0xD022649296B44200,0x602646F6B0F2D404
+ DQ 0xC19498A6CD596700,0xF3FF0C3E3255AA6B
+$L$k_dsbe:
+ DQ 0x46F2929626D4D000,0x2242600464B4F6B0
+ DQ 0x0C55A6CDFFAAC100,0x9467F36B98593E32
+$L$k_dsbo:
+ DQ 0x1387EA537EF94000,0xC7AA6DB9D4943E2D
+ DQ 0x12D7560F93441D00,0xCA4B8159D8C58E9C
+DB 86,101,99,116,111,114,32,80,101,114,109,117,116,97,116,105
+DB 111,110,32,65,69,83,32,102,111,114,32,120,56,54,95,54
+DB 52,47,83,83,83,69,51,44,32,77,105,107,101,32,72,97
+DB 109,98,117,114,103,32,40,83,116,97,110,102,111,114,100,32
+DB 85,110,105,118,101,114,115,105,116,121,41,0
+ALIGN 64
+
+EXTERN __imp_RtlVirtualUnwind
+
+ALIGN 16
+se_handler:
+ push rsi
+ push rdi
+ push rbx
+ push rbp
+ push r12
+ push r13
+ push r14
+ push r15
+ pushfq
+ sub rsp,64
+
+ mov rax,QWORD[120+r8]
+ mov rbx,QWORD[248+r8]
+
+ mov rsi,QWORD[8+r9]
+ mov r11,QWORD[56+r9]
+
+ mov r10d,DWORD[r11]
+ lea r10,[r10*1+rsi]
+ cmp rbx,r10
+ jb NEAR $L$in_prologue
+
+ mov rax,QWORD[152+r8]
+
+ mov r10d,DWORD[4+r11]
+ lea r10,[r10*1+rsi]
+ cmp rbx,r10
+ jae NEAR $L$in_prologue
+
+ lea rsi,[16+rax]
+ lea rdi,[512+r8]
+ mov ecx,20
+ DD 0xa548f3fc
+ lea rax,[184+rax]
+
+$L$in_prologue:
+ mov rdi,QWORD[8+rax]
+ mov rsi,QWORD[16+rax]
+ mov QWORD[152+r8],rax
+ mov QWORD[168+r8],rsi
+ mov QWORD[176+r8],rdi
+
+ mov rdi,QWORD[40+r9]
+ mov rsi,r8
+ mov ecx,154
+ DD 0xa548f3fc
+
+ mov rsi,r9
+ xor rcx,rcx
+ mov rdx,QWORD[8+rsi]
+ mov r8,QWORD[rsi]
+ mov r9,QWORD[16+rsi]
+ mov r10,QWORD[40+rsi]
+ lea r11,[56+rsi]
+ lea r12,[24+rsi]
+ mov QWORD[32+rsp],r10
+ mov QWORD[40+rsp],r11
+ mov QWORD[48+rsp],r12
+ mov QWORD[56+rsp],rcx
+ call QWORD[__imp_RtlVirtualUnwind]
+
+ mov eax,1
+ add rsp,64
+ popfq
+ pop r15
+ pop r14
+ pop r13
+ pop r12
+ pop rbp
+ pop rbx
+ pop rdi
+ pop rsi
+ DB 0F3h,0C3h ;repret
+
+
+section .pdata rdata align=4
+ALIGN 4
+ DD $L$SEH_begin_vpaes_set_encrypt_key wrt ..imagebase
+ DD $L$SEH_end_vpaes_set_encrypt_key wrt ..imagebase
+ DD $L$SEH_info_vpaes_set_encrypt_key wrt ..imagebase
+
+ DD $L$SEH_begin_vpaes_set_decrypt_key wrt ..imagebase
+ DD $L$SEH_end_vpaes_set_decrypt_key wrt ..imagebase
+ DD $L$SEH_info_vpaes_set_decrypt_key wrt ..imagebase
+
+ DD $L$SEH_begin_vpaes_encrypt wrt ..imagebase
+ DD $L$SEH_end_vpaes_encrypt wrt ..imagebase
+ DD $L$SEH_info_vpaes_encrypt wrt ..imagebase
+
+ DD $L$SEH_begin_vpaes_decrypt wrt ..imagebase
+ DD $L$SEH_end_vpaes_decrypt wrt ..imagebase
+ DD $L$SEH_info_vpaes_decrypt wrt ..imagebase
+
+ DD $L$SEH_begin_vpaes_cbc_encrypt wrt ..imagebase
+ DD $L$SEH_end_vpaes_cbc_encrypt wrt ..imagebase
+ DD $L$SEH_info_vpaes_cbc_encrypt wrt ..imagebase
+
+section .xdata rdata align=8
+ALIGN 8
+$L$SEH_info_vpaes_set_encrypt_key:
+DB 9,0,0,0
+ DD se_handler wrt ..imagebase
+ DD $L$enc_key_body wrt ..imagebase,$L$enc_key_epilogue wrt ..imagebase
+$L$SEH_info_vpaes_set_decrypt_key:
+DB 9,0,0,0
+ DD se_handler wrt ..imagebase
+ DD $L$dec_key_body wrt ..imagebase,$L$dec_key_epilogue wrt ..imagebase
+$L$SEH_info_vpaes_encrypt:
+DB 9,0,0,0
+ DD se_handler wrt ..imagebase
+ DD $L$enc_body wrt ..imagebase,$L$enc_epilogue wrt ..imagebase
+$L$SEH_info_vpaes_decrypt:
+DB 9,0,0,0
+ DD se_handler wrt ..imagebase
+ DD $L$dec_body wrt ..imagebase,$L$dec_epilogue wrt ..imagebase
+$L$SEH_info_vpaes_cbc_encrypt:
+DB 9,0,0,0
+ DD se_handler wrt ..imagebase
+ DD $L$cbc_body wrt ..imagebase,$L$cbc_epilogue wrt ..imagebase
diff --git a/CryptoPkg/Library/OpensslLib/X64/crypto/modes/aesni-gcm-x86_64.nasm b/CryptoPkg/Library/OpensslLib/X64/crypto/modes/aesni-gcm-x86_64.nasm
new file mode 100644
index 0000000000..9e1a2d0a40
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/X64/crypto/modes/aesni-gcm-x86_64.nasm
@@ -0,0 +1,34 @@
+; WARNING: do not edit!
+; Generated from openssl/crypto/modes/asm/aesni-gcm-x86_64.pl
+;
+; Copyright 2013-2020 The OpenSSL Project Authors. All Rights Reserved.
+;
+; Licensed under the OpenSSL license (the "License"). You may not use
+; this file except in compliance with the License. You can obtain a copy
+; in the file LICENSE in the source distribution or at
+; https://www.openssl.org/source/license.html
+
+default rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section .text code align=64
+
+
+global aesni_gcm_encrypt
+
+aesni_gcm_encrypt:
+
+ xor eax,eax
+ DB 0F3h,0C3h ;repret
+
+
+
+global aesni_gcm_decrypt
+
+aesni_gcm_decrypt:
+
+ xor eax,eax
+ DB 0F3h,0C3h ;repret
+
+
diff --git a/CryptoPkg/Library/OpensslLib/X64/crypto/modes/ghash-x86_64.nasm b/CryptoPkg/Library/OpensslLib/X64/crypto/modes/ghash-x86_64.nasm
new file mode 100644
index 0000000000..60f283d5fb
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/X64/crypto/modes/ghash-x86_64.nasm
@@ -0,0 +1,1569 @@
+; WARNING: do not edit!
+; Generated from openssl/crypto/modes/asm/ghash-x86_64.pl
+;
+; Copyright 2010-2020 The OpenSSL Project Authors. All Rights Reserved.
+;
+; Licensed under the OpenSSL license (the "License"). You may not use
+; this file except in compliance with the License. You can obtain a copy
+; in the file LICENSE in the source distribution or at
+; https://www.openssl.org/source/license.html
+
+default rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section .text code align=64
+
+EXTERN OPENSSL_ia32cap_P
+
+global gcm_gmult_4bit
+
+ALIGN 16
+gcm_gmult_4bit:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_gcm_gmult_4bit:
+ mov rdi,rcx
+ mov rsi,rdx
+
+
+
+ push rbx
+
+ push rbp
+
+ push r12
+
+ push r13
+
+ push r14
+
+ push r15
+
+ sub rsp,280
+
+$L$gmult_prologue:
+
+ movzx r8,BYTE[15+rdi]
+ lea r11,[$L$rem_4bit]
+ xor rax,rax
+ xor rbx,rbx
+ mov al,r8b
+ mov bl,r8b
+ shl al,4
+ mov rcx,14
+ mov r8,QWORD[8+rax*1+rsi]
+ mov r9,QWORD[rax*1+rsi]
+ and bl,0xf0
+ mov rdx,r8
+ jmp NEAR $L$oop1
+
+ALIGN 16
+$L$oop1:
+ shr r8,4
+ and rdx,0xf
+ mov r10,r9
+ mov al,BYTE[rcx*1+rdi]
+ shr r9,4
+ xor r8,QWORD[8+rbx*1+rsi]
+ shl r10,60
+ xor r9,QWORD[rbx*1+rsi]
+ mov bl,al
+ xor r9,QWORD[rdx*8+r11]
+ mov rdx,r8
+ shl al,4
+ xor r8,r10
+ dec rcx
+ js NEAR $L$break1
+
+ shr r8,4
+ and rdx,0xf
+ mov r10,r9
+ shr r9,4
+ xor r8,QWORD[8+rax*1+rsi]
+ shl r10,60
+ xor r9,QWORD[rax*1+rsi]
+ and bl,0xf0
+ xor r9,QWORD[rdx*8+r11]
+ mov rdx,r8
+ xor r8,r10
+ jmp NEAR $L$oop1
+
+ALIGN 16
+$L$break1:
+ shr r8,4
+ and rdx,0xf
+ mov r10,r9
+ shr r9,4
+ xor r8,QWORD[8+rax*1+rsi]
+ shl r10,60
+ xor r9,QWORD[rax*1+rsi]
+ and bl,0xf0
+ xor r9,QWORD[rdx*8+r11]
+ mov rdx,r8
+ xor r8,r10
+
+ shr r8,4
+ and rdx,0xf
+ mov r10,r9
+ shr r9,4
+ xor r8,QWORD[8+rbx*1+rsi]
+ shl r10,60
+ xor r9,QWORD[rbx*1+rsi]
+ xor r8,r10
+ xor r9,QWORD[rdx*8+r11]
+
+ bswap r8
+ bswap r9
+ mov QWORD[8+rdi],r8
+ mov QWORD[rdi],r9
+
+ lea rsi,[((280+48))+rsp]
+
+ mov rbx,QWORD[((-8))+rsi]
+
+ lea rsp,[rsi]
+
+$L$gmult_epilogue:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_gcm_gmult_4bit:
+global gcm_ghash_4bit
+
+ALIGN 16
+gcm_ghash_4bit:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_gcm_ghash_4bit:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+ mov rcx,r9
+
+
+
+ push rbx
+
+ push rbp
+
+ push r12
+
+ push r13
+
+ push r14
+
+ push r15
+
+ sub rsp,280
+
+$L$ghash_prologue:
+ mov r14,rdx
+ mov r15,rcx
+ sub rsi,-128
+ lea rbp,[((16+128))+rsp]
+ xor edx,edx
+ mov r8,QWORD[((0+0-128))+rsi]
+ mov rax,QWORD[((0+8-128))+rsi]
+ mov dl,al
+ shr rax,4
+ mov r10,r8
+ shr r8,4
+ mov r9,QWORD[((16+0-128))+rsi]
+ shl dl,4
+ mov rbx,QWORD[((16+8-128))+rsi]
+ shl r10,60
+ mov BYTE[rsp],dl
+ or rax,r10
+ mov dl,bl
+ shr rbx,4
+ mov r10,r9
+ shr r9,4
+ mov QWORD[rbp],r8
+ mov r8,QWORD[((32+0-128))+rsi]
+ shl dl,4
+ mov QWORD[((0-128))+rbp],rax
+ mov rax,QWORD[((32+8-128))+rsi]
+ shl r10,60
+ mov BYTE[1+rsp],dl
+ or rbx,r10
+ mov dl,al
+ shr rax,4
+ mov r10,r8
+ shr r8,4
+ mov QWORD[8+rbp],r9
+ mov r9,QWORD[((48+0-128))+rsi]
+ shl dl,4
+ mov QWORD[((8-128))+rbp],rbx
+ mov rbx,QWORD[((48+8-128))+rsi]
+ shl r10,60
+ mov BYTE[2+rsp],dl
+ or rax,r10
+ mov dl,bl
+ shr rbx,4
+ mov r10,r9
+ shr r9,4
+ mov QWORD[16+rbp],r8
+ mov r8,QWORD[((64+0-128))+rsi]
+ shl dl,4
+ mov QWORD[((16-128))+rbp],rax
+ mov rax,QWORD[((64+8-128))+rsi]
+ shl r10,60
+ mov BYTE[3+rsp],dl
+ or rbx,r10
+ mov dl,al
+ shr rax,4
+ mov r10,r8
+ shr r8,4
+ mov QWORD[24+rbp],r9
+ mov r9,QWORD[((80+0-128))+rsi]
+ shl dl,4
+ mov QWORD[((24-128))+rbp],rbx
+ mov rbx,QWORD[((80+8-128))+rsi]
+ shl r10,60
+ mov BYTE[4+rsp],dl
+ or rax,r10
+ mov dl,bl
+ shr rbx,4
+ mov r10,r9
+ shr r9,4
+ mov QWORD[32+rbp],r8
+ mov r8,QWORD[((96+0-128))+rsi]
+ shl dl,4
+ mov QWORD[((32-128))+rbp],rax
+ mov rax,QWORD[((96+8-128))+rsi]
+ shl r10,60
+ mov BYTE[5+rsp],dl
+ or rbx,r10
+ mov dl,al
+ shr rax,4
+ mov r10,r8
+ shr r8,4
+ mov QWORD[40+rbp],r9
+ mov r9,QWORD[((112+0-128))+rsi]
+ shl dl,4
+ mov QWORD[((40-128))+rbp],rbx
+ mov rbx,QWORD[((112+8-128))+rsi]
+ shl r10,60
+ mov BYTE[6+rsp],dl
+ or rax,r10
+ mov dl,bl
+ shr rbx,4
+ mov r10,r9
+ shr r9,4
+ mov QWORD[48+rbp],r8
+ mov r8,QWORD[((128+0-128))+rsi]
+ shl dl,4
+ mov QWORD[((48-128))+rbp],rax
+ mov rax,QWORD[((128+8-128))+rsi]
+ shl r10,60
+ mov BYTE[7+rsp],dl
+ or rbx,r10
+ mov dl,al
+ shr rax,4
+ mov r10,r8
+ shr r8,4
+ mov QWORD[56+rbp],r9
+ mov r9,QWORD[((144+0-128))+rsi]
+ shl dl,4
+ mov QWORD[((56-128))+rbp],rbx
+ mov rbx,QWORD[((144+8-128))+rsi]
+ shl r10,60
+ mov BYTE[8+rsp],dl
+ or rax,r10
+ mov dl,bl
+ shr rbx,4
+ mov r10,r9
+ shr r9,4
+ mov QWORD[64+rbp],r8
+ mov r8,QWORD[((160+0-128))+rsi]
+ shl dl,4
+ mov QWORD[((64-128))+rbp],rax
+ mov rax,QWORD[((160+8-128))+rsi]
+ shl r10,60
+ mov BYTE[9+rsp],dl
+ or rbx,r10
+ mov dl,al
+ shr rax,4
+ mov r10,r8
+ shr r8,4
+ mov QWORD[72+rbp],r9
+ mov r9,QWORD[((176+0-128))+rsi]
+ shl dl,4
+ mov QWORD[((72-128))+rbp],rbx
+ mov rbx,QWORD[((176+8-128))+rsi]
+ shl r10,60
+ mov BYTE[10+rsp],dl
+ or rax,r10
+ mov dl,bl
+ shr rbx,4
+ mov r10,r9
+ shr r9,4
+ mov QWORD[80+rbp],r8
+ mov r8,QWORD[((192+0-128))+rsi]
+ shl dl,4
+ mov QWORD[((80-128))+rbp],rax
+ mov rax,QWORD[((192+8-128))+rsi]
+ shl r10,60
+ mov BYTE[11+rsp],dl
+ or rbx,r10
+ mov dl,al
+ shr rax,4
+ mov r10,r8
+ shr r8,4
+ mov QWORD[88+rbp],r9
+ mov r9,QWORD[((208+0-128))+rsi]
+ shl dl,4
+ mov QWORD[((88-128))+rbp],rbx
+ mov rbx,QWORD[((208+8-128))+rsi]
+ shl r10,60
+ mov BYTE[12+rsp],dl
+ or rax,r10
+ mov dl,bl
+ shr rbx,4
+ mov r10,r9
+ shr r9,4
+ mov QWORD[96+rbp],r8
+ mov r8,QWORD[((224+0-128))+rsi]
+ shl dl,4
+ mov QWORD[((96-128))+rbp],rax
+ mov rax,QWORD[((224+8-128))+rsi]
+ shl r10,60
+ mov BYTE[13+rsp],dl
+ or rbx,r10
+ mov dl,al
+ shr rax,4
+ mov r10,r8
+ shr r8,4
+ mov QWORD[104+rbp],r9
+ mov r9,QWORD[((240+0-128))+rsi]
+ shl dl,4
+ mov QWORD[((104-128))+rbp],rbx
+ mov rbx,QWORD[((240+8-128))+rsi]
+ shl r10,60
+ mov BYTE[14+rsp],dl
+ or rax,r10
+ mov dl,bl
+ shr rbx,4
+ mov r10,r9
+ shr r9,4
+ mov QWORD[112+rbp],r8
+ shl dl,4
+ mov QWORD[((112-128))+rbp],rax
+ shl r10,60
+ mov BYTE[15+rsp],dl
+ or rbx,r10
+ mov QWORD[120+rbp],r9
+ mov QWORD[((120-128))+rbp],rbx
+ add rsi,-128
+ mov r8,QWORD[8+rdi]
+ mov r9,QWORD[rdi]
+ add r15,r14
+ lea r11,[$L$rem_8bit]
+ jmp NEAR $L$outer_loop
+ALIGN 16
+$L$outer_loop:
+ xor r9,QWORD[r14]
+ mov rdx,QWORD[8+r14]
+ lea r14,[16+r14]
+ xor rdx,r8
+ mov QWORD[rdi],r9
+ mov QWORD[8+rdi],rdx
+ shr rdx,32
+ xor rax,rax
+ rol edx,8
+ mov al,dl
+ movzx ebx,dl
+ shl al,4
+ shr ebx,4
+ rol edx,8
+ mov r8,QWORD[8+rax*1+rsi]
+ mov r9,QWORD[rax*1+rsi]
+ mov al,dl
+ movzx ecx,dl
+ shl al,4
+ movzx r12,BYTE[rbx*1+rsp]
+ shr ecx,4
+ xor r12,r8
+ mov r10,r9
+ shr r8,8
+ movzx r12,r12b
+ shr r9,8
+ xor r8,QWORD[((-128))+rbx*8+rbp]
+ shl r10,56
+ xor r9,QWORD[rbx*8+rbp]
+ rol edx,8
+ xor r8,QWORD[8+rax*1+rsi]
+ xor r9,QWORD[rax*1+rsi]
+ mov al,dl
+ xor r8,r10
+ movzx r12,WORD[r12*2+r11]
+ movzx ebx,dl
+ shl al,4
+ movzx r13,BYTE[rcx*1+rsp]
+ shr ebx,4
+ shl r12,48
+ xor r13,r8
+ mov r10,r9
+ xor r9,r12
+ shr r8,8
+ movzx r13,r13b
+ shr r9,8
+ xor r8,QWORD[((-128))+rcx*8+rbp]
+ shl r10,56
+ xor r9,QWORD[rcx*8+rbp]
+ rol edx,8
+ xor r8,QWORD[8+rax*1+rsi]
+ xor r9,QWORD[rax*1+rsi]
+ mov al,dl
+ xor r8,r10
+ movzx r13,WORD[r13*2+r11]
+ movzx ecx,dl
+ shl al,4
+ movzx r12,BYTE[rbx*1+rsp]
+ shr ecx,4
+ shl r13,48
+ xor r12,r8
+ mov r10,r9
+ xor r9,r13
+ shr r8,8
+ movzx r12,r12b
+ mov edx,DWORD[8+rdi]
+ shr r9,8
+ xor r8,QWORD[((-128))+rbx*8+rbp]
+ shl r10,56
+ xor r9,QWORD[rbx*8+rbp]
+ rol edx,8
+ xor r8,QWORD[8+rax*1+rsi]
+ xor r9,QWORD[rax*1+rsi]
+ mov al,dl
+ xor r8,r10
+ movzx r12,WORD[r12*2+r11]
+ movzx ebx,dl
+ shl al,4
+ movzx r13,BYTE[rcx*1+rsp]
+ shr ebx,4
+ shl r12,48
+ xor r13,r8
+ mov r10,r9
+ xor r9,r12
+ shr r8,8
+ movzx r13,r13b
+ shr r9,8
+ xor r8,QWORD[((-128))+rcx*8+rbp]
+ shl r10,56
+ xor r9,QWORD[rcx*8+rbp]
+ rol edx,8
+ xor r8,QWORD[8+rax*1+rsi]
+ xor r9,QWORD[rax*1+rsi]
+ mov al,dl
+ xor r8,r10
+ movzx r13,WORD[r13*2+r11]
+ movzx ecx,dl
+ shl al,4
+ movzx r12,BYTE[rbx*1+rsp]
+ shr ecx,4
+ shl r13,48
+ xor r12,r8
+ mov r10,r9
+ xor r9,r13
+ shr r8,8
+ movzx r12,r12b
+ shr r9,8
+ xor r8,QWORD[((-128))+rbx*8+rbp]
+ shl r10,56
+ xor r9,QWORD[rbx*8+rbp]
+ rol edx,8
+ xor r8,QWORD[8+rax*1+rsi]
+ xor r9,QWORD[rax*1+rsi]
+ mov al,dl
+ xor r8,r10
+ movzx r12,WORD[r12*2+r11]
+ movzx ebx,dl
+ shl al,4
+ movzx r13,BYTE[rcx*1+rsp]
+ shr ebx,4
+ shl r12,48
+ xor r13,r8
+ mov r10,r9
+ xor r9,r12
+ shr r8,8
+ movzx r13,r13b
+ shr r9,8
+ xor r8,QWORD[((-128))+rcx*8+rbp]
+ shl r10,56
+ xor r9,QWORD[rcx*8+rbp]
+ rol edx,8
+ xor r8,QWORD[8+rax*1+rsi]
+ xor r9,QWORD[rax*1+rsi]
+ mov al,dl
+ xor r8,r10
+ movzx r13,WORD[r13*2+r11]
+ movzx ecx,dl
+ shl al,4
+ movzx r12,BYTE[rbx*1+rsp]
+ shr ecx,4
+ shl r13,48
+ xor r12,r8
+ mov r10,r9
+ xor r9,r13
+ shr r8,8
+ movzx r12,r12b
+ mov edx,DWORD[4+rdi]
+ shr r9,8
+ xor r8,QWORD[((-128))+rbx*8+rbp]
+ shl r10,56
+ xor r9,QWORD[rbx*8+rbp]
+ rol edx,8
+ xor r8,QWORD[8+rax*1+rsi]
+ xor r9,QWORD[rax*1+rsi]
+ mov al,dl
+ xor r8,r10
+ movzx r12,WORD[r12*2+r11]
+ movzx ebx,dl
+ shl al,4
+ movzx r13,BYTE[rcx*1+rsp]
+ shr ebx,4
+ shl r12,48
+ xor r13,r8
+ mov r10,r9
+ xor r9,r12
+ shr r8,8
+ movzx r13,r13b
+ shr r9,8
+ xor r8,QWORD[((-128))+rcx*8+rbp]
+ shl r10,56
+ xor r9,QWORD[rcx*8+rbp]
+ rol edx,8
+ xor r8,QWORD[8+rax*1+rsi]
+ xor r9,QWORD[rax*1+rsi]
+ mov al,dl
+ xor r8,r10
+ movzx r13,WORD[r13*2+r11]
+ movzx ecx,dl
+ shl al,4
+ movzx r12,BYTE[rbx*1+rsp]
+ shr ecx,4
+ shl r13,48
+ xor r12,r8
+ mov r10,r9
+ xor r9,r13
+ shr r8,8
+ movzx r12,r12b
+ shr r9,8
+ xor r8,QWORD[((-128))+rbx*8+rbp]
+ shl r10,56
+ xor r9,QWORD[rbx*8+rbp]
+ rol edx,8
+ xor r8,QWORD[8+rax*1+rsi]
+ xor r9,QWORD[rax*1+rsi]
+ mov al,dl
+ xor r8,r10
+ movzx r12,WORD[r12*2+r11]
+ movzx ebx,dl
+ shl al,4
+ movzx r13,BYTE[rcx*1+rsp]
+ shr ebx,4
+ shl r12,48
+ xor r13,r8
+ mov r10,r9
+ xor r9,r12
+ shr r8,8
+ movzx r13,r13b
+ shr r9,8
+ xor r8,QWORD[((-128))+rcx*8+rbp]
+ shl r10,56
+ xor r9,QWORD[rcx*8+rbp]
+ rol edx,8
+ xor r8,QWORD[8+rax*1+rsi]
+ xor r9,QWORD[rax*1+rsi]
+ mov al,dl
+ xor r8,r10
+ movzx r13,WORD[r13*2+r11]
+ movzx ecx,dl
+ shl al,4
+ movzx r12,BYTE[rbx*1+rsp]
+ shr ecx,4
+ shl r13,48
+ xor r12,r8
+ mov r10,r9
+ xor r9,r13
+ shr r8,8
+ movzx r12,r12b
+ mov edx,DWORD[rdi]
+ shr r9,8
+ xor r8,QWORD[((-128))+rbx*8+rbp]
+ shl r10,56
+ xor r9,QWORD[rbx*8+rbp]
+ rol edx,8
+ xor r8,QWORD[8+rax*1+rsi]
+ xor r9,QWORD[rax*1+rsi]
+ mov al,dl
+ xor r8,r10
+ movzx r12,WORD[r12*2+r11]
+ movzx ebx,dl
+ shl al,4
+ movzx r13,BYTE[rcx*1+rsp]
+ shr ebx,4
+ shl r12,48
+ xor r13,r8
+ mov r10,r9
+ xor r9,r12
+ shr r8,8
+ movzx r13,r13b
+ shr r9,8
+ xor r8,QWORD[((-128))+rcx*8+rbp]
+ shl r10,56
+ xor r9,QWORD[rcx*8+rbp]
+ rol edx,8
+ xor r8,QWORD[8+rax*1+rsi]
+ xor r9,QWORD[rax*1+rsi]
+ mov al,dl
+ xor r8,r10
+ movzx r13,WORD[r13*2+r11]
+ movzx ecx,dl
+ shl al,4
+ movzx r12,BYTE[rbx*1+rsp]
+ shr ecx,4
+ shl r13,48
+ xor r12,r8
+ mov r10,r9
+ xor r9,r13
+ shr r8,8
+ movzx r12,r12b
+ shr r9,8
+ xor r8,QWORD[((-128))+rbx*8+rbp]
+ shl r10,56
+ xor r9,QWORD[rbx*8+rbp]
+ rol edx,8
+ xor r8,QWORD[8+rax*1+rsi]
+ xor r9,QWORD[rax*1+rsi]
+ mov al,dl
+ xor r8,r10
+ movzx r12,WORD[r12*2+r11]
+ movzx ebx,dl
+ shl al,4
+ movzx r13,BYTE[rcx*1+rsp]
+ shr ebx,4
+ shl r12,48
+ xor r13,r8
+ mov r10,r9
+ xor r9,r12
+ shr r8,8
+ movzx r13,r13b
+ shr r9,8
+ xor r8,QWORD[((-128))+rcx*8+rbp]
+ shl r10,56
+ xor r9,QWORD[rcx*8+rbp]
+ rol edx,8
+ xor r8,QWORD[8+rax*1+rsi]
+ xor r9,QWORD[rax*1+rsi]
+ mov al,dl
+ xor r8,r10
+ movzx r13,WORD[r13*2+r11]
+ movzx ecx,dl
+ shl al,4
+ movzx r12,BYTE[rbx*1+rsp]
+ and ecx,240
+ shl r13,48
+ xor r12,r8
+ mov r10,r9
+ xor r9,r13
+ shr r8,8
+ movzx r12,r12b
+ mov edx,DWORD[((-4))+rdi]
+ shr r9,8
+ xor r8,QWORD[((-128))+rbx*8+rbp]
+ shl r10,56
+ xor r9,QWORD[rbx*8+rbp]
+ movzx r12,WORD[r12*2+r11]
+ xor r8,QWORD[8+rax*1+rsi]
+ xor r9,QWORD[rax*1+rsi]
+ shl r12,48
+ xor r8,r10
+ xor r9,r12
+ movzx r13,r8b
+ shr r8,4
+ mov r10,r9
+ shl r13b,4
+ shr r9,4
+ xor r8,QWORD[8+rcx*1+rsi]
+ movzx r13,WORD[r13*2+r11]
+ shl r10,60
+ xor r9,QWORD[rcx*1+rsi]
+ xor r8,r10
+ shl r13,48
+ bswap r8
+ xor r9,r13
+ bswap r9
+ cmp r14,r15
+ jb NEAR $L$outer_loop
+ mov QWORD[8+rdi],r8
+ mov QWORD[rdi],r9
+
+ lea rsi,[((280+48))+rsp]
+
+ mov r15,QWORD[((-48))+rsi]
+
+ mov r14,QWORD[((-40))+rsi]
+
+ mov r13,QWORD[((-32))+rsi]
+
+ mov r12,QWORD[((-24))+rsi]
+
+ mov rbp,QWORD[((-16))+rsi]
+
+ mov rbx,QWORD[((-8))+rsi]
+
+ lea rsp,[rsi]
+
+$L$ghash_epilogue:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_gcm_ghash_4bit:
+global gcm_init_clmul
+
+ALIGN 16
+gcm_init_clmul:
+
+$L$_init_clmul:
+$L$SEH_begin_gcm_init_clmul:
+
+DB 0x48,0x83,0xec,0x18
+DB 0x0f,0x29,0x34,0x24
+ movdqu xmm2,XMMWORD[rdx]
+ pshufd xmm2,xmm2,78
+
+
+ pshufd xmm4,xmm2,255
+ movdqa xmm3,xmm2
+ psllq xmm2,1
+ pxor xmm5,xmm5
+ psrlq xmm3,63
+ pcmpgtd xmm5,xmm4
+ pslldq xmm3,8
+ por xmm2,xmm3
+
+
+ pand xmm5,XMMWORD[$L$0x1c2_polynomial]
+ pxor xmm2,xmm5
+
+
+ pshufd xmm6,xmm2,78
+ movdqa xmm0,xmm2
+ pxor xmm6,xmm2
+ movdqa xmm1,xmm0
+ pshufd xmm3,xmm0,78
+ pxor xmm3,xmm0
+DB 102,15,58,68,194,0
+DB 102,15,58,68,202,17
+DB 102,15,58,68,222,0
+ pxor xmm3,xmm0
+ pxor xmm3,xmm1
+
+ movdqa xmm4,xmm3
+ psrldq xmm3,8
+ pslldq xmm4,8
+ pxor xmm1,xmm3
+ pxor xmm0,xmm4
+
+ movdqa xmm4,xmm0
+ movdqa xmm3,xmm0
+ psllq xmm0,5
+ pxor xmm3,xmm0
+ psllq xmm0,1
+ pxor xmm0,xmm3
+ psllq xmm0,57
+ movdqa xmm3,xmm0
+ pslldq xmm0,8
+ psrldq xmm3,8
+ pxor xmm0,xmm4
+ pxor xmm1,xmm3
+
+
+ movdqa xmm4,xmm0
+ psrlq xmm0,1
+ pxor xmm1,xmm4
+ pxor xmm4,xmm0
+ psrlq xmm0,5
+ pxor xmm0,xmm4
+ psrlq xmm0,1
+ pxor xmm0,xmm1
+ pshufd xmm3,xmm2,78
+ pshufd xmm4,xmm0,78
+ pxor xmm3,xmm2
+ movdqu XMMWORD[rcx],xmm2
+ pxor xmm4,xmm0
+ movdqu XMMWORD[16+rcx],xmm0
+DB 102,15,58,15,227,8
+ movdqu XMMWORD[32+rcx],xmm4
+ movdqa xmm1,xmm0
+ pshufd xmm3,xmm0,78
+ pxor xmm3,xmm0
+DB 102,15,58,68,194,0
+DB 102,15,58,68,202,17
+DB 102,15,58,68,222,0
+ pxor xmm3,xmm0
+ pxor xmm3,xmm1
+
+ movdqa xmm4,xmm3
+ psrldq xmm3,8
+ pslldq xmm4,8
+ pxor xmm1,xmm3
+ pxor xmm0,xmm4
+
+ movdqa xmm4,xmm0
+ movdqa xmm3,xmm0
+ psllq xmm0,5
+ pxor xmm3,xmm0
+ psllq xmm0,1
+ pxor xmm0,xmm3
+ psllq xmm0,57
+ movdqa xmm3,xmm0
+ pslldq xmm0,8
+ psrldq xmm3,8
+ pxor xmm0,xmm4
+ pxor xmm1,xmm3
+
+
+ movdqa xmm4,xmm0
+ psrlq xmm0,1
+ pxor xmm1,xmm4
+ pxor xmm4,xmm0
+ psrlq xmm0,5
+ pxor xmm0,xmm4
+ psrlq xmm0,1
+ pxor xmm0,xmm1
+ movdqa xmm5,xmm0
+ movdqa xmm1,xmm0
+ pshufd xmm3,xmm0,78
+ pxor xmm3,xmm0
+DB 102,15,58,68,194,0
+DB 102,15,58,68,202,17
+DB 102,15,58,68,222,0
+ pxor xmm3,xmm0
+ pxor xmm3,xmm1
+
+ movdqa xmm4,xmm3
+ psrldq xmm3,8
+ pslldq xmm4,8
+ pxor xmm1,xmm3
+ pxor xmm0,xmm4
+
+ movdqa xmm4,xmm0
+ movdqa xmm3,xmm0
+ psllq xmm0,5
+ pxor xmm3,xmm0
+ psllq xmm0,1
+ pxor xmm0,xmm3
+ psllq xmm0,57
+ movdqa xmm3,xmm0
+ pslldq xmm0,8
+ psrldq xmm3,8
+ pxor xmm0,xmm4
+ pxor xmm1,xmm3
+
+
+ movdqa xmm4,xmm0
+ psrlq xmm0,1
+ pxor xmm1,xmm4
+ pxor xmm4,xmm0
+ psrlq xmm0,5
+ pxor xmm0,xmm4
+ psrlq xmm0,1
+ pxor xmm0,xmm1
+ pshufd xmm3,xmm5,78
+ pshufd xmm4,xmm0,78
+ pxor xmm3,xmm5
+ movdqu XMMWORD[48+rcx],xmm5
+ pxor xmm4,xmm0
+ movdqu XMMWORD[64+rcx],xmm0
+DB 102,15,58,15,227,8
+ movdqu XMMWORD[80+rcx],xmm4
+ movaps xmm6,XMMWORD[rsp]
+ lea rsp,[24+rsp]
+$L$SEH_end_gcm_init_clmul:
+ DB 0F3h,0C3h ;repret
+
+
+global gcm_gmult_clmul
+
+ALIGN 16
+gcm_gmult_clmul:
+
+$L$_gmult_clmul:
+ movdqu xmm0,XMMWORD[rcx]
+ movdqa xmm5,XMMWORD[$L$bswap_mask]
+ movdqu xmm2,XMMWORD[rdx]
+ movdqu xmm4,XMMWORD[32+rdx]
+DB 102,15,56,0,197
+ movdqa xmm1,xmm0
+ pshufd xmm3,xmm0,78
+ pxor xmm3,xmm0
+DB 102,15,58,68,194,0
+DB 102,15,58,68,202,17
+DB 102,15,58,68,220,0
+ pxor xmm3,xmm0
+ pxor xmm3,xmm1
+
+ movdqa xmm4,xmm3
+ psrldq xmm3,8
+ pslldq xmm4,8
+ pxor xmm1,xmm3
+ pxor xmm0,xmm4
+
+ movdqa xmm4,xmm0
+ movdqa xmm3,xmm0
+ psllq xmm0,5
+ pxor xmm3,xmm0
+ psllq xmm0,1
+ pxor xmm0,xmm3
+ psllq xmm0,57
+ movdqa xmm3,xmm0
+ pslldq xmm0,8
+ psrldq xmm3,8
+ pxor xmm0,xmm4
+ pxor xmm1,xmm3
+
+
+ movdqa xmm4,xmm0
+ psrlq xmm0,1
+ pxor xmm1,xmm4
+ pxor xmm4,xmm0
+ psrlq xmm0,5
+ pxor xmm0,xmm4
+ psrlq xmm0,1
+ pxor xmm0,xmm1
+DB 102,15,56,0,197
+ movdqu XMMWORD[rcx],xmm0
+ DB 0F3h,0C3h ;repret
+
+
+global gcm_ghash_clmul
+
+ALIGN 32
+gcm_ghash_clmul:
+
+$L$_ghash_clmul:
+ lea rax,[((-136))+rsp]
+$L$SEH_begin_gcm_ghash_clmul:
+
+DB 0x48,0x8d,0x60,0xe0
+DB 0x0f,0x29,0x70,0xe0
+DB 0x0f,0x29,0x78,0xf0
+DB 0x44,0x0f,0x29,0x00
+DB 0x44,0x0f,0x29,0x48,0x10
+DB 0x44,0x0f,0x29,0x50,0x20
+DB 0x44,0x0f,0x29,0x58,0x30
+DB 0x44,0x0f,0x29,0x60,0x40
+DB 0x44,0x0f,0x29,0x68,0x50
+DB 0x44,0x0f,0x29,0x70,0x60
+DB 0x44,0x0f,0x29,0x78,0x70
+ movdqa xmm10,XMMWORD[$L$bswap_mask]
+
+ movdqu xmm0,XMMWORD[rcx]
+ movdqu xmm2,XMMWORD[rdx]
+ movdqu xmm7,XMMWORD[32+rdx]
+DB 102,65,15,56,0,194
+
+ sub r9,0x10
+ jz NEAR $L$odd_tail
+
+ movdqu xmm6,XMMWORD[16+rdx]
+ mov eax,DWORD[((OPENSSL_ia32cap_P+4))]
+ cmp r9,0x30
+ jb NEAR $L$skip4x
+
+ and eax,71303168
+ cmp eax,4194304
+ je NEAR $L$skip4x
+
+ sub r9,0x30
+ mov rax,0xA040608020C0E000
+ movdqu xmm14,XMMWORD[48+rdx]
+ movdqu xmm15,XMMWORD[64+rdx]
+
+
+
+
+ movdqu xmm3,XMMWORD[48+r8]
+ movdqu xmm11,XMMWORD[32+r8]
+DB 102,65,15,56,0,218
+DB 102,69,15,56,0,218
+ movdqa xmm5,xmm3
+ pshufd xmm4,xmm3,78
+ pxor xmm4,xmm3
+DB 102,15,58,68,218,0
+DB 102,15,58,68,234,17
+DB 102,15,58,68,231,0
+
+ movdqa xmm13,xmm11
+ pshufd xmm12,xmm11,78
+ pxor xmm12,xmm11
+DB 102,68,15,58,68,222,0
+DB 102,68,15,58,68,238,17
+DB 102,68,15,58,68,231,16
+ xorps xmm3,xmm11
+ xorps xmm5,xmm13
+ movups xmm7,XMMWORD[80+rdx]
+ xorps xmm4,xmm12
+
+ movdqu xmm11,XMMWORD[16+r8]
+ movdqu xmm8,XMMWORD[r8]
+DB 102,69,15,56,0,218
+DB 102,69,15,56,0,194
+ movdqa xmm13,xmm11
+ pshufd xmm12,xmm11,78
+ pxor xmm0,xmm8
+ pxor xmm12,xmm11
+DB 102,69,15,58,68,222,0
+ movdqa xmm1,xmm0
+ pshufd xmm8,xmm0,78
+ pxor xmm8,xmm0
+DB 102,69,15,58,68,238,17
+DB 102,68,15,58,68,231,0
+ xorps xmm3,xmm11
+ xorps xmm5,xmm13
+
+ lea r8,[64+r8]
+ sub r9,0x40
+ jc NEAR $L$tail4x
+
+ jmp NEAR $L$mod4_loop
+ALIGN 32
+$L$mod4_loop:
+DB 102,65,15,58,68,199,0
+ xorps xmm4,xmm12
+ movdqu xmm11,XMMWORD[48+r8]
+DB 102,69,15,56,0,218
+DB 102,65,15,58,68,207,17
+ xorps xmm0,xmm3
+ movdqu xmm3,XMMWORD[32+r8]
+ movdqa xmm13,xmm11
+DB 102,68,15,58,68,199,16
+ pshufd xmm12,xmm11,78
+ xorps xmm1,xmm5
+ pxor xmm12,xmm11
+DB 102,65,15,56,0,218
+ movups xmm7,XMMWORD[32+rdx]
+ xorps xmm8,xmm4
+DB 102,68,15,58,68,218,0
+ pshufd xmm4,xmm3,78
+
+ pxor xmm8,xmm0
+ movdqa xmm5,xmm3
+ pxor xmm8,xmm1
+ pxor xmm4,xmm3
+ movdqa xmm9,xmm8
+DB 102,68,15,58,68,234,17
+ pslldq xmm8,8
+ psrldq xmm9,8
+ pxor xmm0,xmm8
+ movdqa xmm8,XMMWORD[$L$7_mask]
+ pxor xmm1,xmm9
+DB 102,76,15,110,200
+
+ pand xmm8,xmm0
+DB 102,69,15,56,0,200
+ pxor xmm9,xmm0
+DB 102,68,15,58,68,231,0
+ psllq xmm9,57
+ movdqa xmm8,xmm9
+ pslldq xmm9,8
+DB 102,15,58,68,222,0
+ psrldq xmm8,8
+ pxor xmm0,xmm9
+ pxor xmm1,xmm8
+ movdqu xmm8,XMMWORD[r8]
+
+ movdqa xmm9,xmm0
+ psrlq xmm0,1
+DB 102,15,58,68,238,17
+ xorps xmm3,xmm11
+ movdqu xmm11,XMMWORD[16+r8]
+DB 102,69,15,56,0,218
+DB 102,15,58,68,231,16
+ xorps xmm5,xmm13
+ movups xmm7,XMMWORD[80+rdx]
+DB 102,69,15,56,0,194
+ pxor xmm1,xmm9
+ pxor xmm9,xmm0
+ psrlq xmm0,5
+
+ movdqa xmm13,xmm11
+ pxor xmm4,xmm12
+ pshufd xmm12,xmm11,78
+ pxor xmm0,xmm9
+ pxor xmm1,xmm8
+ pxor xmm12,xmm11
+DB 102,69,15,58,68,222,0
+ psrlq xmm0,1
+ pxor xmm0,xmm1
+ movdqa xmm1,xmm0
+DB 102,69,15,58,68,238,17
+ xorps xmm3,xmm11
+ pshufd xmm8,xmm0,78
+ pxor xmm8,xmm0
+
+DB 102,68,15,58,68,231,0
+ xorps xmm5,xmm13
+
+ lea r8,[64+r8]
+ sub r9,0x40
+ jnc NEAR $L$mod4_loop
+
+$L$tail4x:
+DB 102,65,15,58,68,199,0
+DB 102,65,15,58,68,207,17
+DB 102,68,15,58,68,199,16
+ xorps xmm4,xmm12
+ xorps xmm0,xmm3
+ xorps xmm1,xmm5
+ pxor xmm1,xmm0
+ pxor xmm8,xmm4
+
+ pxor xmm8,xmm1
+ pxor xmm1,xmm0
+
+ movdqa xmm9,xmm8
+ psrldq xmm8,8
+ pslldq xmm9,8
+ pxor xmm1,xmm8
+ pxor xmm0,xmm9
+
+ movdqa xmm4,xmm0
+ movdqa xmm3,xmm0
+ psllq xmm0,5
+ pxor xmm3,xmm0
+ psllq xmm0,1
+ pxor xmm0,xmm3
+ psllq xmm0,57
+ movdqa xmm3,xmm0
+ pslldq xmm0,8
+ psrldq xmm3,8
+ pxor xmm0,xmm4
+ pxor xmm1,xmm3
+
+
+ movdqa xmm4,xmm0
+ psrlq xmm0,1
+ pxor xmm1,xmm4
+ pxor xmm4,xmm0
+ psrlq xmm0,5
+ pxor xmm0,xmm4
+ psrlq xmm0,1
+ pxor xmm0,xmm1
+ add r9,0x40
+ jz NEAR $L$done
+ movdqu xmm7,XMMWORD[32+rdx]
+ sub r9,0x10
+ jz NEAR $L$odd_tail
+$L$skip4x:
+
+
+
+
+
+ movdqu xmm8,XMMWORD[r8]
+ movdqu xmm3,XMMWORD[16+r8]
+DB 102,69,15,56,0,194
+DB 102,65,15,56,0,218
+ pxor xmm0,xmm8
+
+ movdqa xmm5,xmm3
+ pshufd xmm4,xmm3,78
+ pxor xmm4,xmm3
+DB 102,15,58,68,218,0
+DB 102,15,58,68,234,17
+DB 102,15,58,68,231,0
+
+ lea r8,[32+r8]
+ nop
+ sub r9,0x20
+ jbe NEAR $L$even_tail
+ nop
+ jmp NEAR $L$mod_loop
+
+ALIGN 32
+$L$mod_loop:
+ movdqa xmm1,xmm0
+ movdqa xmm8,xmm4
+ pshufd xmm4,xmm0,78
+ pxor xmm4,xmm0
+
+DB 102,15,58,68,198,0
+DB 102,15,58,68,206,17
+DB 102,15,58,68,231,16
+
+ pxor xmm0,xmm3
+ pxor xmm1,xmm5
+ movdqu xmm9,XMMWORD[r8]
+ pxor xmm8,xmm0
+DB 102,69,15,56,0,202
+ movdqu xmm3,XMMWORD[16+r8]
+
+ pxor xmm8,xmm1
+ pxor xmm1,xmm9
+ pxor xmm4,xmm8
+DB 102,65,15,56,0,218
+ movdqa xmm8,xmm4
+ psrldq xmm8,8
+ pslldq xmm4,8
+ pxor xmm1,xmm8
+ pxor xmm0,xmm4
+
+ movdqa xmm5,xmm3
+
+ movdqa xmm9,xmm0
+ movdqa xmm8,xmm0
+ psllq xmm0,5
+ pxor xmm8,xmm0
+DB 102,15,58,68,218,0
+ psllq xmm0,1
+ pxor xmm0,xmm8
+ psllq xmm0,57
+ movdqa xmm8,xmm0
+ pslldq xmm0,8
+ psrldq xmm8,8
+ pxor xmm0,xmm9
+ pshufd xmm4,xmm5,78
+ pxor xmm1,xmm8
+ pxor xmm4,xmm5
+
+ movdqa xmm9,xmm0
+ psrlq xmm0,1
+DB 102,15,58,68,234,17
+ pxor xmm1,xmm9
+ pxor xmm9,xmm0
+ psrlq xmm0,5
+ pxor xmm0,xmm9
+ lea r8,[32+r8]
+ psrlq xmm0,1
+DB 102,15,58,68,231,0
+ pxor xmm0,xmm1
+
+ sub r9,0x20
+ ja NEAR $L$mod_loop
+
+$L$even_tail:
+ movdqa xmm1,xmm0
+ movdqa xmm8,xmm4
+ pshufd xmm4,xmm0,78
+ pxor xmm4,xmm0
+
+DB 102,15,58,68,198,0
+DB 102,15,58,68,206,17
+DB 102,15,58,68,231,16
+
+ pxor xmm0,xmm3
+ pxor xmm1,xmm5
+ pxor xmm8,xmm0
+ pxor xmm8,xmm1
+ pxor xmm4,xmm8
+ movdqa xmm8,xmm4
+ psrldq xmm8,8
+ pslldq xmm4,8
+ pxor xmm1,xmm8
+ pxor xmm0,xmm4
+
+ movdqa xmm4,xmm0
+ movdqa xmm3,xmm0
+ psllq xmm0,5
+ pxor xmm3,xmm0
+ psllq xmm0,1
+ pxor xmm0,xmm3
+ psllq xmm0,57
+ movdqa xmm3,xmm0
+ pslldq xmm0,8
+ psrldq xmm3,8
+ pxor xmm0,xmm4
+ pxor xmm1,xmm3
+
+
+ movdqa xmm4,xmm0
+ psrlq xmm0,1
+ pxor xmm1,xmm4
+ pxor xmm4,xmm0
+ psrlq xmm0,5
+ pxor xmm0,xmm4
+ psrlq xmm0,1
+ pxor xmm0,xmm1
+ test r9,r9
+ jnz NEAR $L$done
+
+$L$odd_tail:
+ movdqu xmm8,XMMWORD[r8]
+DB 102,69,15,56,0,194
+ pxor xmm0,xmm8
+ movdqa xmm1,xmm0
+ pshufd xmm3,xmm0,78
+ pxor xmm3,xmm0
+DB 102,15,58,68,194,0
+DB 102,15,58,68,202,17
+DB 102,15,58,68,223,0
+ pxor xmm3,xmm0
+ pxor xmm3,xmm1
+
+ movdqa xmm4,xmm3
+ psrldq xmm3,8
+ pslldq xmm4,8
+ pxor xmm1,xmm3
+ pxor xmm0,xmm4
+
+ movdqa xmm4,xmm0
+ movdqa xmm3,xmm0
+ psllq xmm0,5
+ pxor xmm3,xmm0
+ psllq xmm0,1
+ pxor xmm0,xmm3
+ psllq xmm0,57
+ movdqa xmm3,xmm0
+ pslldq xmm0,8
+ psrldq xmm3,8
+ pxor xmm0,xmm4
+ pxor xmm1,xmm3
+
+
+ movdqa xmm4,xmm0
+ psrlq xmm0,1
+ pxor xmm1,xmm4
+ pxor xmm4,xmm0
+ psrlq xmm0,5
+ pxor xmm0,xmm4
+ psrlq xmm0,1
+ pxor xmm0,xmm1
+$L$done:
+DB 102,65,15,56,0,194
+ movdqu XMMWORD[rcx],xmm0
+ movaps xmm6,XMMWORD[rsp]
+ movaps xmm7,XMMWORD[16+rsp]
+ movaps xmm8,XMMWORD[32+rsp]
+ movaps xmm9,XMMWORD[48+rsp]
+ movaps xmm10,XMMWORD[64+rsp]
+ movaps xmm11,XMMWORD[80+rsp]
+ movaps xmm12,XMMWORD[96+rsp]
+ movaps xmm13,XMMWORD[112+rsp]
+ movaps xmm14,XMMWORD[128+rsp]
+ movaps xmm15,XMMWORD[144+rsp]
+ lea rsp,[168+rsp]
+$L$SEH_end_gcm_ghash_clmul:
+ DB 0F3h,0C3h ;repret
+
+
+global gcm_init_avx
+
+ALIGN 32
+gcm_init_avx:
+
+ jmp NEAR $L$_init_clmul
+
+
+global gcm_gmult_avx
+
+ALIGN 32
+gcm_gmult_avx:
+
+ jmp NEAR $L$_gmult_clmul
+
+
+global gcm_ghash_avx
+
+ALIGN 32
+gcm_ghash_avx:
+
+ jmp NEAR $L$_ghash_clmul
+
+
+ALIGN 64
+$L$bswap_mask:
+DB 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
+$L$0x1c2_polynomial:
+DB 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xc2
+$L$7_mask:
+ DD 7,0,7,0
+$L$7_mask_poly:
+ DD 7,0,450,0
+ALIGN 64
+
+$L$rem_4bit:
+ DD 0,0,0,471859200,0,943718400,0,610271232
+ DD 0,1887436800,0,1822425088,0,1220542464,0,1423966208
+ DD 0,3774873600,0,4246732800,0,3644850176,0,3311403008
+ DD 0,2441084928,0,2376073216,0,2847932416,0,3051356160
+
+$L$rem_8bit:
+ DW 0x0000,0x01C2,0x0384,0x0246,0x0708,0x06CA,0x048C,0x054E
+ DW 0x0E10,0x0FD2,0x0D94,0x0C56,0x0918,0x08DA,0x0A9C,0x0B5E
+ DW 0x1C20,0x1DE2,0x1FA4,0x1E66,0x1B28,0x1AEA,0x18AC,0x196E
+ DW 0x1230,0x13F2,0x11B4,0x1076,0x1538,0x14FA,0x16BC,0x177E
+ DW 0x3840,0x3982,0x3BC4,0x3A06,0x3F48,0x3E8A,0x3CCC,0x3D0E
+ DW 0x3650,0x3792,0x35D4,0x3416,0x3158,0x309A,0x32DC,0x331E
+ DW 0x2460,0x25A2,0x27E4,0x2626,0x2368,0x22AA,0x20EC,0x212E
+ DW 0x2A70,0x2BB2,0x29F4,0x2836,0x2D78,0x2CBA,0x2EFC,0x2F3E
+ DW 0x7080,0x7142,0x7304,0x72C6,0x7788,0x764A,0x740C,0x75CE
+ DW 0x7E90,0x7F52,0x7D14,0x7CD6,0x7998,0x785A,0x7A1C,0x7BDE
+ DW 0x6CA0,0x6D62,0x6F24,0x6EE6,0x6BA8,0x6A6A,0x682C,0x69EE
+ DW 0x62B0,0x6372,0x6134,0x60F6,0x65B8,0x647A,0x663C,0x67FE
+ DW 0x48C0,0x4902,0x4B44,0x4A86,0x4FC8,0x4E0A,0x4C4C,0x4D8E
+ DW 0x46D0,0x4712,0x4554,0x4496,0x41D8,0x401A,0x425C,0x439E
+ DW 0x54E0,0x5522,0x5764,0x56A6,0x53E8,0x522A,0x506C,0x51AE
+ DW 0x5AF0,0x5B32,0x5974,0x58B6,0x5DF8,0x5C3A,0x5E7C,0x5FBE
+ DW 0xE100,0xE0C2,0xE284,0xE346,0xE608,0xE7CA,0xE58C,0xE44E
+ DW 0xEF10,0xEED2,0xEC94,0xED56,0xE818,0xE9DA,0xEB9C,0xEA5E
+ DW 0xFD20,0xFCE2,0xFEA4,0xFF66,0xFA28,0xFBEA,0xF9AC,0xF86E
+ DW 0xF330,0xF2F2,0xF0B4,0xF176,0xF438,0xF5FA,0xF7BC,0xF67E
+ DW 0xD940,0xD882,0xDAC4,0xDB06,0xDE48,0xDF8A,0xDDCC,0xDC0E
+ DW 0xD750,0xD692,0xD4D4,0xD516,0xD058,0xD19A,0xD3DC,0xD21E
+ DW 0xC560,0xC4A2,0xC6E4,0xC726,0xC268,0xC3AA,0xC1EC,0xC02E
+ DW 0xCB70,0xCAB2,0xC8F4,0xC936,0xCC78,0xCDBA,0xCFFC,0xCE3E
+ DW 0x9180,0x9042,0x9204,0x93C6,0x9688,0x974A,0x950C,0x94CE
+ DW 0x9F90,0x9E52,0x9C14,0x9DD6,0x9898,0x995A,0x9B1C,0x9ADE
+ DW 0x8DA0,0x8C62,0x8E24,0x8FE6,0x8AA8,0x8B6A,0x892C,0x88EE
+ DW 0x83B0,0x8272,0x8034,0x81F6,0x84B8,0x857A,0x873C,0x86FE
+ DW 0xA9C0,0xA802,0xAA44,0xAB86,0xAEC8,0xAF0A,0xAD4C,0xAC8E
+ DW 0xA7D0,0xA612,0xA454,0xA596,0xA0D8,0xA11A,0xA35C,0xA29E
+ DW 0xB5E0,0xB422,0xB664,0xB7A6,0xB2E8,0xB32A,0xB16C,0xB0AE
+ DW 0xBBF0,0xBA32,0xB874,0xB9B6,0xBCF8,0xBD3A,0xBF7C,0xBEBE
+
+DB 71,72,65,83,72,32,102,111,114,32,120,56,54,95,54,52
+DB 44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32
+DB 60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111
+DB 114,103,62,0
+ALIGN 64
+EXTERN __imp_RtlVirtualUnwind
+
+ALIGN 16
+se_handler:
+ push rsi
+ push rdi
+ push rbx
+ push rbp
+ push r12
+ push r13
+ push r14
+ push r15
+ pushfq
+ sub rsp,64
+
+ mov rax,QWORD[120+r8]
+ mov rbx,QWORD[248+r8]
+
+ mov rsi,QWORD[8+r9]
+ mov r11,QWORD[56+r9]
+
+ mov r10d,DWORD[r11]
+ lea r10,[r10*1+rsi]
+ cmp rbx,r10
+ jb NEAR $L$in_prologue
+
+ mov rax,QWORD[152+r8]
+
+ mov r10d,DWORD[4+r11]
+ lea r10,[r10*1+rsi]
+ cmp rbx,r10
+ jae NEAR $L$in_prologue
+
+ lea rax,[((48+280))+rax]
+
+ mov rbx,QWORD[((-8))+rax]
+ mov rbp,QWORD[((-16))+rax]
+ mov r12,QWORD[((-24))+rax]
+ mov r13,QWORD[((-32))+rax]
+ mov r14,QWORD[((-40))+rax]
+ mov r15,QWORD[((-48))+rax]
+ mov QWORD[144+r8],rbx
+ mov QWORD[160+r8],rbp
+ mov QWORD[216+r8],r12
+ mov QWORD[224+r8],r13
+ mov QWORD[232+r8],r14
+ mov QWORD[240+r8],r15
+
+$L$in_prologue:
+ mov rdi,QWORD[8+rax]
+ mov rsi,QWORD[16+rax]
+ mov QWORD[152+r8],rax
+ mov QWORD[168+r8],rsi
+ mov QWORD[176+r8],rdi
+
+ mov rdi,QWORD[40+r9]
+ mov rsi,r8
+ mov ecx,154
+ DD 0xa548f3fc
+
+ mov rsi,r9
+ xor rcx,rcx
+ mov rdx,QWORD[8+rsi]
+ mov r8,QWORD[rsi]
+ mov r9,QWORD[16+rsi]
+ mov r10,QWORD[40+rsi]
+ lea r11,[56+rsi]
+ lea r12,[24+rsi]
+ mov QWORD[32+rsp],r10
+ mov QWORD[40+rsp],r11
+ mov QWORD[48+rsp],r12
+ mov QWORD[56+rsp],rcx
+ call QWORD[__imp_RtlVirtualUnwind]
+
+ mov eax,1
+ add rsp,64
+ popfq
+ pop r15
+ pop r14
+ pop r13
+ pop r12
+ pop rbp
+ pop rbx
+ pop rdi
+ pop rsi
+ DB 0F3h,0C3h ;repret
+
+
+section .pdata rdata align=4
+ALIGN 4
+ DD $L$SEH_begin_gcm_gmult_4bit wrt ..imagebase
+ DD $L$SEH_end_gcm_gmult_4bit wrt ..imagebase
+ DD $L$SEH_info_gcm_gmult_4bit wrt ..imagebase
+
+ DD $L$SEH_begin_gcm_ghash_4bit wrt ..imagebase
+ DD $L$SEH_end_gcm_ghash_4bit wrt ..imagebase
+ DD $L$SEH_info_gcm_ghash_4bit wrt ..imagebase
+
+ DD $L$SEH_begin_gcm_init_clmul wrt ..imagebase
+ DD $L$SEH_end_gcm_init_clmul wrt ..imagebase
+ DD $L$SEH_info_gcm_init_clmul wrt ..imagebase
+
+ DD $L$SEH_begin_gcm_ghash_clmul wrt ..imagebase
+ DD $L$SEH_end_gcm_ghash_clmul wrt ..imagebase
+ DD $L$SEH_info_gcm_ghash_clmul wrt ..imagebase
+section .xdata rdata align=8
+ALIGN 8
+$L$SEH_info_gcm_gmult_4bit:
+DB 9,0,0,0
+ DD se_handler wrt ..imagebase
+ DD $L$gmult_prologue wrt ..imagebase,$L$gmult_epilogue wrt ..imagebase
+$L$SEH_info_gcm_ghash_4bit:
+DB 9,0,0,0
+ DD se_handler wrt ..imagebase
+ DD $L$ghash_prologue wrt ..imagebase,$L$ghash_epilogue wrt ..imagebase
+$L$SEH_info_gcm_init_clmul:
+DB 0x01,0x08,0x03,0x00
+DB 0x08,0x68,0x00,0x00
+DB 0x04,0x22,0x00,0x00
+$L$SEH_info_gcm_ghash_clmul:
+DB 0x01,0x33,0x16,0x00
+DB 0x33,0xf8,0x09,0x00
+DB 0x2e,0xe8,0x08,0x00
+DB 0x29,0xd8,0x07,0x00
+DB 0x24,0xc8,0x06,0x00
+DB 0x1f,0xb8,0x05,0x00
+DB 0x1a,0xa8,0x04,0x00
+DB 0x15,0x98,0x03,0x00
+DB 0x10,0x88,0x02,0x00
+DB 0x0c,0x78,0x01,0x00
+DB 0x08,0x68,0x00,0x00
+DB 0x04,0x01,0x15,0x00
diff --git a/CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha1-mb-x86_64.nasm b/CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha1-mb-x86_64.nasm
new file mode 100644
index 0000000000..f3b7b0e35e
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha1-mb-x86_64.nasm
@@ -0,0 +1,3137 @@
+; WARNING: do not edit!
+; Generated from openssl/crypto/sha/asm/sha1-mb-x86_64.pl
+;
+; Copyright 2013-2020 The OpenSSL Project Authors. All Rights Reserved.
+;
+; Licensed under the OpenSSL license (the "License"). You may not use
+; this file except in compliance with the License. You can obtain a copy
+; in the file LICENSE in the source distribution or at
+; https://www.openssl.org/source/license.html
+
+default rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section .text code align=64
+
+
+EXTERN OPENSSL_ia32cap_P
+
+global sha1_multi_block
+
+ALIGN 32
+sha1_multi_block:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_sha1_multi_block:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+
+ mov rcx,QWORD[((OPENSSL_ia32cap_P+4))]
+ bt rcx,61
+ jc NEAR _shaext_shortcut
+ mov rax,rsp
+
+ push rbx
+
+ push rbp
+
+ lea rsp,[((-168))+rsp]
+ movaps XMMWORD[rsp],xmm6
+ movaps XMMWORD[16+rsp],xmm7
+ movaps XMMWORD[32+rsp],xmm8
+ movaps XMMWORD[48+rsp],xmm9
+ movaps XMMWORD[(-120)+rax],xmm10
+ movaps XMMWORD[(-104)+rax],xmm11
+ movaps XMMWORD[(-88)+rax],xmm12
+ movaps XMMWORD[(-72)+rax],xmm13
+ movaps XMMWORD[(-56)+rax],xmm14
+ movaps XMMWORD[(-40)+rax],xmm15
+ sub rsp,288
+ and rsp,-256
+ mov QWORD[272+rsp],rax
+
+$L$body:
+ lea rbp,[K_XX_XX]
+ lea rbx,[256+rsp]
+
+$L$oop_grande:
+ mov DWORD[280+rsp],edx
+ xor edx,edx
+ mov r8,QWORD[rsi]
+ mov ecx,DWORD[8+rsi]
+ cmp ecx,edx
+ cmovg edx,ecx
+ test ecx,ecx
+ mov DWORD[rbx],ecx
+ cmovle r8,rbp
+ mov r9,QWORD[16+rsi]
+ mov ecx,DWORD[24+rsi]
+ cmp ecx,edx
+ cmovg edx,ecx
+ test ecx,ecx
+ mov DWORD[4+rbx],ecx
+ cmovle r9,rbp
+ mov r10,QWORD[32+rsi]
+ mov ecx,DWORD[40+rsi]
+ cmp ecx,edx
+ cmovg edx,ecx
+ test ecx,ecx
+ mov DWORD[8+rbx],ecx
+ cmovle r10,rbp
+ mov r11,QWORD[48+rsi]
+ mov ecx,DWORD[56+rsi]
+ cmp ecx,edx
+ cmovg edx,ecx
+ test ecx,ecx
+ mov DWORD[12+rbx],ecx
+ cmovle r11,rbp
+ test edx,edx
+ jz NEAR $L$done
+
+ movdqu xmm10,XMMWORD[rdi]
+ lea rax,[128+rsp]
+ movdqu xmm11,XMMWORD[32+rdi]
+ movdqu xmm12,XMMWORD[64+rdi]
+ movdqu xmm13,XMMWORD[96+rdi]
+ movdqu xmm14,XMMWORD[128+rdi]
+ movdqa xmm5,XMMWORD[96+rbp]
+ movdqa xmm15,XMMWORD[((-32))+rbp]
+ jmp NEAR $L$oop
+
+ALIGN 32
+$L$oop:
+ movd xmm0,DWORD[r8]
+ lea r8,[64+r8]
+ movd xmm2,DWORD[r9]
+ lea r9,[64+r9]
+ movd xmm3,DWORD[r10]
+ lea r10,[64+r10]
+ movd xmm4,DWORD[r11]
+ lea r11,[64+r11]
+ punpckldq xmm0,xmm3
+ movd xmm1,DWORD[((-60))+r8]
+ punpckldq xmm2,xmm4
+ movd xmm9,DWORD[((-60))+r9]
+ punpckldq xmm0,xmm2
+ movd xmm8,DWORD[((-60))+r10]
+DB 102,15,56,0,197
+ movd xmm7,DWORD[((-60))+r11]
+ punpckldq xmm1,xmm8
+ movdqa xmm8,xmm10
+ paddd xmm14,xmm15
+ punpckldq xmm9,xmm7
+ movdqa xmm7,xmm11
+ movdqa xmm6,xmm11
+ pslld xmm8,5
+ pandn xmm7,xmm13
+ pand xmm6,xmm12
+ punpckldq xmm1,xmm9
+ movdqa xmm9,xmm10
+
+ movdqa XMMWORD[(0-128)+rax],xmm0
+ paddd xmm14,xmm0
+ movd xmm2,DWORD[((-56))+r8]
+ psrld xmm9,27
+ pxor xmm6,xmm7
+ movdqa xmm7,xmm11
+
+ por xmm8,xmm9
+ movd xmm9,DWORD[((-56))+r9]
+ pslld xmm7,30
+ paddd xmm14,xmm6
+
+ psrld xmm11,2
+ paddd xmm14,xmm8
+DB 102,15,56,0,205
+ movd xmm8,DWORD[((-56))+r10]
+ por xmm11,xmm7
+ movd xmm7,DWORD[((-56))+r11]
+ punpckldq xmm2,xmm8
+ movdqa xmm8,xmm14
+ paddd xmm13,xmm15
+ punpckldq xmm9,xmm7
+ movdqa xmm7,xmm10
+ movdqa xmm6,xmm10
+ pslld xmm8,5
+ pandn xmm7,xmm12
+ pand xmm6,xmm11
+ punpckldq xmm2,xmm9
+ movdqa xmm9,xmm14
+
+ movdqa XMMWORD[(16-128)+rax],xmm1
+ paddd xmm13,xmm1
+ movd xmm3,DWORD[((-52))+r8]
+ psrld xmm9,27
+ pxor xmm6,xmm7
+ movdqa xmm7,xmm10
+
+ por xmm8,xmm9
+ movd xmm9,DWORD[((-52))+r9]
+ pslld xmm7,30
+ paddd xmm13,xmm6
+
+ psrld xmm10,2
+ paddd xmm13,xmm8
+DB 102,15,56,0,213
+ movd xmm8,DWORD[((-52))+r10]
+ por xmm10,xmm7
+ movd xmm7,DWORD[((-52))+r11]
+ punpckldq xmm3,xmm8
+ movdqa xmm8,xmm13
+ paddd xmm12,xmm15
+ punpckldq xmm9,xmm7
+ movdqa xmm7,xmm14
+ movdqa xmm6,xmm14
+ pslld xmm8,5
+ pandn xmm7,xmm11
+ pand xmm6,xmm10
+ punpckldq xmm3,xmm9
+ movdqa xmm9,xmm13
+
+ movdqa XMMWORD[(32-128)+rax],xmm2
+ paddd xmm12,xmm2
+ movd xmm4,DWORD[((-48))+r8]
+ psrld xmm9,27
+ pxor xmm6,xmm7
+ movdqa xmm7,xmm14
+
+ por xmm8,xmm9
+ movd xmm9,DWORD[((-48))+r9]
+ pslld xmm7,30
+ paddd xmm12,xmm6
+
+ psrld xmm14,2
+ paddd xmm12,xmm8
+DB 102,15,56,0,221
+ movd xmm8,DWORD[((-48))+r10]
+ por xmm14,xmm7
+ movd xmm7,DWORD[((-48))+r11]
+ punpckldq xmm4,xmm8
+ movdqa xmm8,xmm12
+ paddd xmm11,xmm15
+ punpckldq xmm9,xmm7
+ movdqa xmm7,xmm13
+ movdqa xmm6,xmm13
+ pslld xmm8,5
+ pandn xmm7,xmm10
+ pand xmm6,xmm14
+ punpckldq xmm4,xmm9
+ movdqa xmm9,xmm12
+
+ movdqa XMMWORD[(48-128)+rax],xmm3
+ paddd xmm11,xmm3
+ movd xmm0,DWORD[((-44))+r8]
+ psrld xmm9,27
+ pxor xmm6,xmm7
+ movdqa xmm7,xmm13
+
+ por xmm8,xmm9
+ movd xmm9,DWORD[((-44))+r9]
+ pslld xmm7,30
+ paddd xmm11,xmm6
+
+ psrld xmm13,2
+ paddd xmm11,xmm8
+DB 102,15,56,0,229
+ movd xmm8,DWORD[((-44))+r10]
+ por xmm13,xmm7
+ movd xmm7,DWORD[((-44))+r11]
+ punpckldq xmm0,xmm8
+ movdqa xmm8,xmm11
+ paddd xmm10,xmm15
+ punpckldq xmm9,xmm7
+ movdqa xmm7,xmm12
+ movdqa xmm6,xmm12
+ pslld xmm8,5
+ pandn xmm7,xmm14
+ pand xmm6,xmm13
+ punpckldq xmm0,xmm9
+ movdqa xmm9,xmm11
+
+ movdqa XMMWORD[(64-128)+rax],xmm4
+ paddd xmm10,xmm4
+ movd xmm1,DWORD[((-40))+r8]
+ psrld xmm9,27
+ pxor xmm6,xmm7
+ movdqa xmm7,xmm12
+
+ por xmm8,xmm9
+ movd xmm9,DWORD[((-40))+r9]
+ pslld xmm7,30
+ paddd xmm10,xmm6
+
+ psrld xmm12,2
+ paddd xmm10,xmm8
+DB 102,15,56,0,197
+ movd xmm8,DWORD[((-40))+r10]
+ por xmm12,xmm7
+ movd xmm7,DWORD[((-40))+r11]
+ punpckldq xmm1,xmm8
+ movdqa xmm8,xmm10
+ paddd xmm14,xmm15
+ punpckldq xmm9,xmm7
+ movdqa xmm7,xmm11
+ movdqa xmm6,xmm11
+ pslld xmm8,5
+ pandn xmm7,xmm13
+ pand xmm6,xmm12
+ punpckldq xmm1,xmm9
+ movdqa xmm9,xmm10
+
+ movdqa XMMWORD[(80-128)+rax],xmm0
+ paddd xmm14,xmm0
+ movd xmm2,DWORD[((-36))+r8]
+ psrld xmm9,27
+ pxor xmm6,xmm7
+ movdqa xmm7,xmm11
+
+ por xmm8,xmm9
+ movd xmm9,DWORD[((-36))+r9]
+ pslld xmm7,30
+ paddd xmm14,xmm6
+
+ psrld xmm11,2
+ paddd xmm14,xmm8
+DB 102,15,56,0,205
+ movd xmm8,DWORD[((-36))+r10]
+ por xmm11,xmm7
+ movd xmm7,DWORD[((-36))+r11]
+ punpckldq xmm2,xmm8
+ movdqa xmm8,xmm14
+ paddd xmm13,xmm15
+ punpckldq xmm9,xmm7
+ movdqa xmm7,xmm10
+ movdqa xmm6,xmm10
+ pslld xmm8,5
+ pandn xmm7,xmm12
+ pand xmm6,xmm11
+ punpckldq xmm2,xmm9
+ movdqa xmm9,xmm14
+
+ movdqa XMMWORD[(96-128)+rax],xmm1
+ paddd xmm13,xmm1
+ movd xmm3,DWORD[((-32))+r8]
+ psrld xmm9,27
+ pxor xmm6,xmm7
+ movdqa xmm7,xmm10
+
+ por xmm8,xmm9
+ movd xmm9,DWORD[((-32))+r9]
+ pslld xmm7,30
+ paddd xmm13,xmm6
+
+ psrld xmm10,2
+ paddd xmm13,xmm8
+DB 102,15,56,0,213
+ movd xmm8,DWORD[((-32))+r10]
+ por xmm10,xmm7
+ movd xmm7,DWORD[((-32))+r11]
+ punpckldq xmm3,xmm8
+ movdqa xmm8,xmm13
+ paddd xmm12,xmm15
+ punpckldq xmm9,xmm7
+ movdqa xmm7,xmm14
+ movdqa xmm6,xmm14
+ pslld xmm8,5
+ pandn xmm7,xmm11
+ pand xmm6,xmm10
+ punpckldq xmm3,xmm9
+ movdqa xmm9,xmm13
+
+ movdqa XMMWORD[(112-128)+rax],xmm2
+ paddd xmm12,xmm2
+ movd xmm4,DWORD[((-28))+r8]
+ psrld xmm9,27
+ pxor xmm6,xmm7
+ movdqa xmm7,xmm14
+
+ por xmm8,xmm9
+ movd xmm9,DWORD[((-28))+r9]
+ pslld xmm7,30
+ paddd xmm12,xmm6
+
+ psrld xmm14,2
+ paddd xmm12,xmm8
+DB 102,15,56,0,221
+ movd xmm8,DWORD[((-28))+r10]
+ por xmm14,xmm7
+ movd xmm7,DWORD[((-28))+r11]
+ punpckldq xmm4,xmm8
+ movdqa xmm8,xmm12
+ paddd xmm11,xmm15
+ punpckldq xmm9,xmm7
+ movdqa xmm7,xmm13
+ movdqa xmm6,xmm13
+ pslld xmm8,5
+ pandn xmm7,xmm10
+ pand xmm6,xmm14
+ punpckldq xmm4,xmm9
+ movdqa xmm9,xmm12
+
+ movdqa XMMWORD[(128-128)+rax],xmm3
+ paddd xmm11,xmm3
+ movd xmm0,DWORD[((-24))+r8]
+ psrld xmm9,27
+ pxor xmm6,xmm7
+ movdqa xmm7,xmm13
+
+ por xmm8,xmm9
+ movd xmm9,DWORD[((-24))+r9]
+ pslld xmm7,30
+ paddd xmm11,xmm6
+
+ psrld xmm13,2
+ paddd xmm11,xmm8
+DB 102,15,56,0,229
+ movd xmm8,DWORD[((-24))+r10]
+ por xmm13,xmm7
+ movd xmm7,DWORD[((-24))+r11]
+ punpckldq xmm0,xmm8
+ movdqa xmm8,xmm11
+ paddd xmm10,xmm15
+ punpckldq xmm9,xmm7
+ movdqa xmm7,xmm12
+ movdqa xmm6,xmm12
+ pslld xmm8,5
+ pandn xmm7,xmm14
+ pand xmm6,xmm13
+ punpckldq xmm0,xmm9
+ movdqa xmm9,xmm11
+
+ movdqa XMMWORD[(144-128)+rax],xmm4
+ paddd xmm10,xmm4
+ movd xmm1,DWORD[((-20))+r8]
+ psrld xmm9,27
+ pxor xmm6,xmm7
+ movdqa xmm7,xmm12
+
+ por xmm8,xmm9
+ movd xmm9,DWORD[((-20))+r9]
+ pslld xmm7,30
+ paddd xmm10,xmm6
+
+ psrld xmm12,2
+ paddd xmm10,xmm8
+DB 102,15,56,0,197
+ movd xmm8,DWORD[((-20))+r10]
+ por xmm12,xmm7
+ movd xmm7,DWORD[((-20))+r11]
+ punpckldq xmm1,xmm8
+ movdqa xmm8,xmm10
+ paddd xmm14,xmm15
+ punpckldq xmm9,xmm7
+ movdqa xmm7,xmm11
+ movdqa xmm6,xmm11
+ pslld xmm8,5
+ pandn xmm7,xmm13
+ pand xmm6,xmm12
+ punpckldq xmm1,xmm9
+ movdqa xmm9,xmm10
+
+ movdqa XMMWORD[(160-128)+rax],xmm0
+ paddd xmm14,xmm0
+ movd xmm2,DWORD[((-16))+r8]
+ psrld xmm9,27
+ pxor xmm6,xmm7
+ movdqa xmm7,xmm11
+
+ por xmm8,xmm9
+ movd xmm9,DWORD[((-16))+r9]
+ pslld xmm7,30
+ paddd xmm14,xmm6
+
+ psrld xmm11,2
+ paddd xmm14,xmm8
+DB 102,15,56,0,205
+ movd xmm8,DWORD[((-16))+r10]
+ por xmm11,xmm7
+ movd xmm7,DWORD[((-16))+r11]
+ punpckldq xmm2,xmm8
+ movdqa xmm8,xmm14
+ paddd xmm13,xmm15
+ punpckldq xmm9,xmm7
+ movdqa xmm7,xmm10
+ movdqa xmm6,xmm10
+ pslld xmm8,5
+ pandn xmm7,xmm12
+ pand xmm6,xmm11
+ punpckldq xmm2,xmm9
+ movdqa xmm9,xmm14
+
+ movdqa XMMWORD[(176-128)+rax],xmm1
+ paddd xmm13,xmm1
+ movd xmm3,DWORD[((-12))+r8]
+ psrld xmm9,27
+ pxor xmm6,xmm7
+ movdqa xmm7,xmm10
+
+ por xmm8,xmm9
+ movd xmm9,DWORD[((-12))+r9]
+ pslld xmm7,30
+ paddd xmm13,xmm6
+
+ psrld xmm10,2
+ paddd xmm13,xmm8
+DB 102,15,56,0,213
+ movd xmm8,DWORD[((-12))+r10]
+ por xmm10,xmm7
+ movd xmm7,DWORD[((-12))+r11]
+ punpckldq xmm3,xmm8
+ movdqa xmm8,xmm13
+ paddd xmm12,xmm15
+ punpckldq xmm9,xmm7
+ movdqa xmm7,xmm14
+ movdqa xmm6,xmm14
+ pslld xmm8,5
+ pandn xmm7,xmm11
+ pand xmm6,xmm10
+ punpckldq xmm3,xmm9
+ movdqa xmm9,xmm13
+
+ movdqa XMMWORD[(192-128)+rax],xmm2
+ paddd xmm12,xmm2
+ movd xmm4,DWORD[((-8))+r8]
+ psrld xmm9,27
+ pxor xmm6,xmm7
+ movdqa xmm7,xmm14
+
+ por xmm8,xmm9
+ movd xmm9,DWORD[((-8))+r9]
+ pslld xmm7,30
+ paddd xmm12,xmm6
+
+ psrld xmm14,2
+ paddd xmm12,xmm8
+DB 102,15,56,0,221
+ movd xmm8,DWORD[((-8))+r10]
+ por xmm14,xmm7
+ movd xmm7,DWORD[((-8))+r11]
+ punpckldq xmm4,xmm8
+ movdqa xmm8,xmm12
+ paddd xmm11,xmm15
+ punpckldq xmm9,xmm7
+ movdqa xmm7,xmm13
+ movdqa xmm6,xmm13
+ pslld xmm8,5
+ pandn xmm7,xmm10
+ pand xmm6,xmm14
+ punpckldq xmm4,xmm9
+ movdqa xmm9,xmm12
+
+ movdqa XMMWORD[(208-128)+rax],xmm3
+ paddd xmm11,xmm3
+ movd xmm0,DWORD[((-4))+r8]
+ psrld xmm9,27
+ pxor xmm6,xmm7
+ movdqa xmm7,xmm13
+
+ por xmm8,xmm9
+ movd xmm9,DWORD[((-4))+r9]
+ pslld xmm7,30
+ paddd xmm11,xmm6
+
+ psrld xmm13,2
+ paddd xmm11,xmm8
+DB 102,15,56,0,229
+ movd xmm8,DWORD[((-4))+r10]
+ por xmm13,xmm7
+ movdqa xmm1,XMMWORD[((0-128))+rax]
+ movd xmm7,DWORD[((-4))+r11]
+ punpckldq xmm0,xmm8
+ movdqa xmm8,xmm11
+ paddd xmm10,xmm15
+ punpckldq xmm9,xmm7
+ movdqa xmm7,xmm12
+ movdqa xmm6,xmm12
+ pslld xmm8,5
+ prefetcht0 [63+r8]
+ pandn xmm7,xmm14
+ pand xmm6,xmm13
+ punpckldq xmm0,xmm9
+ movdqa xmm9,xmm11
+
+ movdqa XMMWORD[(224-128)+rax],xmm4
+ paddd xmm10,xmm4
+ psrld xmm9,27
+ pxor xmm6,xmm7
+ movdqa xmm7,xmm12
+ prefetcht0 [63+r9]
+
+ por xmm8,xmm9
+ pslld xmm7,30
+ paddd xmm10,xmm6
+ prefetcht0 [63+r10]
+
+ psrld xmm12,2
+ paddd xmm10,xmm8
+DB 102,15,56,0,197
+ prefetcht0 [63+r11]
+ por xmm12,xmm7
+ movdqa xmm2,XMMWORD[((16-128))+rax]
+ pxor xmm1,xmm3
+ movdqa xmm3,XMMWORD[((32-128))+rax]
+
+ movdqa xmm8,xmm10
+ pxor xmm1,XMMWORD[((128-128))+rax]
+ paddd xmm14,xmm15
+ movdqa xmm7,xmm11
+ pslld xmm8,5
+ pxor xmm1,xmm3
+ movdqa xmm6,xmm11
+ pandn xmm7,xmm13
+ movdqa xmm5,xmm1
+ pand xmm6,xmm12
+ movdqa xmm9,xmm10
+ psrld xmm5,31
+ paddd xmm1,xmm1
+
+ movdqa XMMWORD[(240-128)+rax],xmm0
+ paddd xmm14,xmm0
+ psrld xmm9,27
+ pxor xmm6,xmm7
+
+ movdqa xmm7,xmm11
+ por xmm8,xmm9
+ pslld xmm7,30
+ paddd xmm14,xmm6
+
+ psrld xmm11,2
+ paddd xmm14,xmm8
+ por xmm1,xmm5
+ por xmm11,xmm7
+ pxor xmm2,xmm4
+ movdqa xmm4,XMMWORD[((48-128))+rax]
+
+ movdqa xmm8,xmm14
+ pxor xmm2,XMMWORD[((144-128))+rax]
+ paddd xmm13,xmm15
+ movdqa xmm7,xmm10
+ pslld xmm8,5
+ pxor xmm2,xmm4
+ movdqa xmm6,xmm10
+ pandn xmm7,xmm12
+ movdqa xmm5,xmm2
+ pand xmm6,xmm11
+ movdqa xmm9,xmm14
+ psrld xmm5,31
+ paddd xmm2,xmm2
+
+ movdqa XMMWORD[(0-128)+rax],xmm1
+ paddd xmm13,xmm1
+ psrld xmm9,27
+ pxor xmm6,xmm7
+
+ movdqa xmm7,xmm10
+ por xmm8,xmm9
+ pslld xmm7,30
+ paddd xmm13,xmm6
+
+ psrld xmm10,2
+ paddd xmm13,xmm8
+ por xmm2,xmm5
+ por xmm10,xmm7
+ pxor xmm3,xmm0
+ movdqa xmm0,XMMWORD[((64-128))+rax]
+
+ movdqa xmm8,xmm13
+ pxor xmm3,XMMWORD[((160-128))+rax]
+ paddd xmm12,xmm15
+ movdqa xmm7,xmm14
+ pslld xmm8,5
+ pxor xmm3,xmm0
+ movdqa xmm6,xmm14
+ pandn xmm7,xmm11
+ movdqa xmm5,xmm3
+ pand xmm6,xmm10
+ movdqa xmm9,xmm13
+ psrld xmm5,31
+ paddd xmm3,xmm3
+
+ movdqa XMMWORD[(16-128)+rax],xmm2
+ paddd xmm12,xmm2
+ psrld xmm9,27
+ pxor xmm6,xmm7
+
+ movdqa xmm7,xmm14
+ por xmm8,xmm9
+ pslld xmm7,30
+ paddd xmm12,xmm6
+
+ psrld xmm14,2
+ paddd xmm12,xmm8
+ por xmm3,xmm5
+ por xmm14,xmm7
+ pxor xmm4,xmm1
+ movdqa xmm1,XMMWORD[((80-128))+rax]
+
+ movdqa xmm8,xmm12
+ pxor xmm4,XMMWORD[((176-128))+rax]
+ paddd xmm11,xmm15
+ movdqa xmm7,xmm13
+ pslld xmm8,5
+ pxor xmm4,xmm1
+ movdqa xmm6,xmm13
+ pandn xmm7,xmm10
+ movdqa xmm5,xmm4
+ pand xmm6,xmm14
+ movdqa xmm9,xmm12
+ psrld xmm5,31
+ paddd xmm4,xmm4
+
+ movdqa XMMWORD[(32-128)+rax],xmm3
+ paddd xmm11,xmm3
+ psrld xmm9,27
+ pxor xmm6,xmm7
+
+ movdqa xmm7,xmm13
+ por xmm8,xmm9
+ pslld xmm7,30
+ paddd xmm11,xmm6
+
+ psrld xmm13,2
+ paddd xmm11,xmm8
+ por xmm4,xmm5
+ por xmm13,xmm7
+ pxor xmm0,xmm2
+ movdqa xmm2,XMMWORD[((96-128))+rax]
+
+ movdqa xmm8,xmm11
+ pxor xmm0,XMMWORD[((192-128))+rax]
+ paddd xmm10,xmm15
+ movdqa xmm7,xmm12
+ pslld xmm8,5
+ pxor xmm0,xmm2
+ movdqa xmm6,xmm12
+ pandn xmm7,xmm14
+ movdqa xmm5,xmm0
+ pand xmm6,xmm13
+ movdqa xmm9,xmm11
+ psrld xmm5,31
+ paddd xmm0,xmm0
+
+ movdqa XMMWORD[(48-128)+rax],xmm4
+ paddd xmm10,xmm4
+ psrld xmm9,27
+ pxor xmm6,xmm7
+
+ movdqa xmm7,xmm12
+ por xmm8,xmm9
+ pslld xmm7,30
+ paddd xmm10,xmm6
+
+ psrld xmm12,2
+ paddd xmm10,xmm8
+ por xmm0,xmm5
+ por xmm12,xmm7
+ movdqa xmm15,XMMWORD[rbp]
+ pxor xmm1,xmm3
+ movdqa xmm3,XMMWORD[((112-128))+rax]
+
+ movdqa xmm8,xmm10
+ movdqa xmm6,xmm13
+ pxor xmm1,XMMWORD[((208-128))+rax]
+ paddd xmm14,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm11
+
+ movdqa xmm9,xmm10
+ movdqa XMMWORD[(64-128)+rax],xmm0
+ paddd xmm14,xmm0
+ pxor xmm1,xmm3
+ psrld xmm9,27
+ pxor xmm6,xmm12
+ movdqa xmm7,xmm11
+
+ pslld xmm7,30
+ movdqa xmm5,xmm1
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm14,xmm6
+ paddd xmm1,xmm1
+
+ psrld xmm11,2
+ paddd xmm14,xmm8
+ por xmm1,xmm5
+ por xmm11,xmm7
+ pxor xmm2,xmm4
+ movdqa xmm4,XMMWORD[((128-128))+rax]
+
+ movdqa xmm8,xmm14
+ movdqa xmm6,xmm12
+ pxor xmm2,XMMWORD[((224-128))+rax]
+ paddd xmm13,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm10
+
+ movdqa xmm9,xmm14
+ movdqa XMMWORD[(80-128)+rax],xmm1
+ paddd xmm13,xmm1
+ pxor xmm2,xmm4
+ psrld xmm9,27
+ pxor xmm6,xmm11
+ movdqa xmm7,xmm10
+
+ pslld xmm7,30
+ movdqa xmm5,xmm2
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm13,xmm6
+ paddd xmm2,xmm2
+
+ psrld xmm10,2
+ paddd xmm13,xmm8
+ por xmm2,xmm5
+ por xmm10,xmm7
+ pxor xmm3,xmm0
+ movdqa xmm0,XMMWORD[((144-128))+rax]
+
+ movdqa xmm8,xmm13
+ movdqa xmm6,xmm11
+ pxor xmm3,XMMWORD[((240-128))+rax]
+ paddd xmm12,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm14
+
+ movdqa xmm9,xmm13
+ movdqa XMMWORD[(96-128)+rax],xmm2
+ paddd xmm12,xmm2
+ pxor xmm3,xmm0
+ psrld xmm9,27
+ pxor xmm6,xmm10
+ movdqa xmm7,xmm14
+
+ pslld xmm7,30
+ movdqa xmm5,xmm3
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm12,xmm6
+ paddd xmm3,xmm3
+
+ psrld xmm14,2
+ paddd xmm12,xmm8
+ por xmm3,xmm5
+ por xmm14,xmm7
+ pxor xmm4,xmm1
+ movdqa xmm1,XMMWORD[((160-128))+rax]
+
+ movdqa xmm8,xmm12
+ movdqa xmm6,xmm10
+ pxor xmm4,XMMWORD[((0-128))+rax]
+ paddd xmm11,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm13
+
+ movdqa xmm9,xmm12
+ movdqa XMMWORD[(112-128)+rax],xmm3
+ paddd xmm11,xmm3
+ pxor xmm4,xmm1
+ psrld xmm9,27
+ pxor xmm6,xmm14
+ movdqa xmm7,xmm13
+
+ pslld xmm7,30
+ movdqa xmm5,xmm4
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm11,xmm6
+ paddd xmm4,xmm4
+
+ psrld xmm13,2
+ paddd xmm11,xmm8
+ por xmm4,xmm5
+ por xmm13,xmm7
+ pxor xmm0,xmm2
+ movdqa xmm2,XMMWORD[((176-128))+rax]
+
+ movdqa xmm8,xmm11
+ movdqa xmm6,xmm14
+ pxor xmm0,XMMWORD[((16-128))+rax]
+ paddd xmm10,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm12
+
+ movdqa xmm9,xmm11
+ movdqa XMMWORD[(128-128)+rax],xmm4
+ paddd xmm10,xmm4
+ pxor xmm0,xmm2
+ psrld xmm9,27
+ pxor xmm6,xmm13
+ movdqa xmm7,xmm12
+
+ pslld xmm7,30
+ movdqa xmm5,xmm0
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm10,xmm6
+ paddd xmm0,xmm0
+
+ psrld xmm12,2
+ paddd xmm10,xmm8
+ por xmm0,xmm5
+ por xmm12,xmm7
+ pxor xmm1,xmm3
+ movdqa xmm3,XMMWORD[((192-128))+rax]
+
+ movdqa xmm8,xmm10
+ movdqa xmm6,xmm13
+ pxor xmm1,XMMWORD[((32-128))+rax]
+ paddd xmm14,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm11
+
+ movdqa xmm9,xmm10
+ movdqa XMMWORD[(144-128)+rax],xmm0
+ paddd xmm14,xmm0
+ pxor xmm1,xmm3
+ psrld xmm9,27
+ pxor xmm6,xmm12
+ movdqa xmm7,xmm11
+
+ pslld xmm7,30
+ movdqa xmm5,xmm1
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm14,xmm6
+ paddd xmm1,xmm1
+
+ psrld xmm11,2
+ paddd xmm14,xmm8
+ por xmm1,xmm5
+ por xmm11,xmm7
+ pxor xmm2,xmm4
+ movdqa xmm4,XMMWORD[((208-128))+rax]
+
+ movdqa xmm8,xmm14
+ movdqa xmm6,xmm12
+ pxor xmm2,XMMWORD[((48-128))+rax]
+ paddd xmm13,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm10
+
+ movdqa xmm9,xmm14
+ movdqa XMMWORD[(160-128)+rax],xmm1
+ paddd xmm13,xmm1
+ pxor xmm2,xmm4
+ psrld xmm9,27
+ pxor xmm6,xmm11
+ movdqa xmm7,xmm10
+
+ pslld xmm7,30
+ movdqa xmm5,xmm2
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm13,xmm6
+ paddd xmm2,xmm2
+
+ psrld xmm10,2
+ paddd xmm13,xmm8
+ por xmm2,xmm5
+ por xmm10,xmm7
+ pxor xmm3,xmm0
+ movdqa xmm0,XMMWORD[((224-128))+rax]
+
+ movdqa xmm8,xmm13
+ movdqa xmm6,xmm11
+ pxor xmm3,XMMWORD[((64-128))+rax]
+ paddd xmm12,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm14
+
+ movdqa xmm9,xmm13
+ movdqa XMMWORD[(176-128)+rax],xmm2
+ paddd xmm12,xmm2
+ pxor xmm3,xmm0
+ psrld xmm9,27
+ pxor xmm6,xmm10
+ movdqa xmm7,xmm14
+
+ pslld xmm7,30
+ movdqa xmm5,xmm3
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm12,xmm6
+ paddd xmm3,xmm3
+
+ psrld xmm14,2
+ paddd xmm12,xmm8
+ por xmm3,xmm5
+ por xmm14,xmm7
+ pxor xmm4,xmm1
+ movdqa xmm1,XMMWORD[((240-128))+rax]
+
+ movdqa xmm8,xmm12
+ movdqa xmm6,xmm10
+ pxor xmm4,XMMWORD[((80-128))+rax]
+ paddd xmm11,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm13
+
+ movdqa xmm9,xmm12
+ movdqa XMMWORD[(192-128)+rax],xmm3
+ paddd xmm11,xmm3
+ pxor xmm4,xmm1
+ psrld xmm9,27
+ pxor xmm6,xmm14
+ movdqa xmm7,xmm13
+
+ pslld xmm7,30
+ movdqa xmm5,xmm4
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm11,xmm6
+ paddd xmm4,xmm4
+
+ psrld xmm13,2
+ paddd xmm11,xmm8
+ por xmm4,xmm5
+ por xmm13,xmm7
+ pxor xmm0,xmm2
+ movdqa xmm2,XMMWORD[((0-128))+rax]
+
+ movdqa xmm8,xmm11
+ movdqa xmm6,xmm14
+ pxor xmm0,XMMWORD[((96-128))+rax]
+ paddd xmm10,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm12
+
+ movdqa xmm9,xmm11
+ movdqa XMMWORD[(208-128)+rax],xmm4
+ paddd xmm10,xmm4
+ pxor xmm0,xmm2
+ psrld xmm9,27
+ pxor xmm6,xmm13
+ movdqa xmm7,xmm12
+
+ pslld xmm7,30
+ movdqa xmm5,xmm0
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm10,xmm6
+ paddd xmm0,xmm0
+
+ psrld xmm12,2
+ paddd xmm10,xmm8
+ por xmm0,xmm5
+ por xmm12,xmm7
+ pxor xmm1,xmm3
+ movdqa xmm3,XMMWORD[((16-128))+rax]
+
+ movdqa xmm8,xmm10
+ movdqa xmm6,xmm13
+ pxor xmm1,XMMWORD[((112-128))+rax]
+ paddd xmm14,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm11
+
+ movdqa xmm9,xmm10
+ movdqa XMMWORD[(224-128)+rax],xmm0
+ paddd xmm14,xmm0
+ pxor xmm1,xmm3
+ psrld xmm9,27
+ pxor xmm6,xmm12
+ movdqa xmm7,xmm11
+
+ pslld xmm7,30
+ movdqa xmm5,xmm1
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm14,xmm6
+ paddd xmm1,xmm1
+
+ psrld xmm11,2
+ paddd xmm14,xmm8
+ por xmm1,xmm5
+ por xmm11,xmm7
+ pxor xmm2,xmm4
+ movdqa xmm4,XMMWORD[((32-128))+rax]
+
+ movdqa xmm8,xmm14
+ movdqa xmm6,xmm12
+ pxor xmm2,XMMWORD[((128-128))+rax]
+ paddd xmm13,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm10
+
+ movdqa xmm9,xmm14
+ movdqa XMMWORD[(240-128)+rax],xmm1
+ paddd xmm13,xmm1
+ pxor xmm2,xmm4
+ psrld xmm9,27
+ pxor xmm6,xmm11
+ movdqa xmm7,xmm10
+
+ pslld xmm7,30
+ movdqa xmm5,xmm2
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm13,xmm6
+ paddd xmm2,xmm2
+
+ psrld xmm10,2
+ paddd xmm13,xmm8
+ por xmm2,xmm5
+ por xmm10,xmm7
+ pxor xmm3,xmm0
+ movdqa xmm0,XMMWORD[((48-128))+rax]
+
+ movdqa xmm8,xmm13
+ movdqa xmm6,xmm11
+ pxor xmm3,XMMWORD[((144-128))+rax]
+ paddd xmm12,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm14
+
+ movdqa xmm9,xmm13
+ movdqa XMMWORD[(0-128)+rax],xmm2
+ paddd xmm12,xmm2
+ pxor xmm3,xmm0
+ psrld xmm9,27
+ pxor xmm6,xmm10
+ movdqa xmm7,xmm14
+
+ pslld xmm7,30
+ movdqa xmm5,xmm3
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm12,xmm6
+ paddd xmm3,xmm3
+
+ psrld xmm14,2
+ paddd xmm12,xmm8
+ por xmm3,xmm5
+ por xmm14,xmm7
+ pxor xmm4,xmm1
+ movdqa xmm1,XMMWORD[((64-128))+rax]
+
+ movdqa xmm8,xmm12
+ movdqa xmm6,xmm10
+ pxor xmm4,XMMWORD[((160-128))+rax]
+ paddd xmm11,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm13
+
+ movdqa xmm9,xmm12
+ movdqa XMMWORD[(16-128)+rax],xmm3
+ paddd xmm11,xmm3
+ pxor xmm4,xmm1
+ psrld xmm9,27
+ pxor xmm6,xmm14
+ movdqa xmm7,xmm13
+
+ pslld xmm7,30
+ movdqa xmm5,xmm4
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm11,xmm6
+ paddd xmm4,xmm4
+
+ psrld xmm13,2
+ paddd xmm11,xmm8
+ por xmm4,xmm5
+ por xmm13,xmm7
+ pxor xmm0,xmm2
+ movdqa xmm2,XMMWORD[((80-128))+rax]
+
+ movdqa xmm8,xmm11
+ movdqa xmm6,xmm14
+ pxor xmm0,XMMWORD[((176-128))+rax]
+ paddd xmm10,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm12
+
+ movdqa xmm9,xmm11
+ movdqa XMMWORD[(32-128)+rax],xmm4
+ paddd xmm10,xmm4
+ pxor xmm0,xmm2
+ psrld xmm9,27
+ pxor xmm6,xmm13
+ movdqa xmm7,xmm12
+
+ pslld xmm7,30
+ movdqa xmm5,xmm0
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm10,xmm6
+ paddd xmm0,xmm0
+
+ psrld xmm12,2
+ paddd xmm10,xmm8
+ por xmm0,xmm5
+ por xmm12,xmm7
+ pxor xmm1,xmm3
+ movdqa xmm3,XMMWORD[((96-128))+rax]
+
+ movdqa xmm8,xmm10
+ movdqa xmm6,xmm13
+ pxor xmm1,XMMWORD[((192-128))+rax]
+ paddd xmm14,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm11
+
+ movdqa xmm9,xmm10
+ movdqa XMMWORD[(48-128)+rax],xmm0
+ paddd xmm14,xmm0
+ pxor xmm1,xmm3
+ psrld xmm9,27
+ pxor xmm6,xmm12
+ movdqa xmm7,xmm11
+
+ pslld xmm7,30
+ movdqa xmm5,xmm1
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm14,xmm6
+ paddd xmm1,xmm1
+
+ psrld xmm11,2
+ paddd xmm14,xmm8
+ por xmm1,xmm5
+ por xmm11,xmm7
+ pxor xmm2,xmm4
+ movdqa xmm4,XMMWORD[((112-128))+rax]
+
+ movdqa xmm8,xmm14
+ movdqa xmm6,xmm12
+ pxor xmm2,XMMWORD[((208-128))+rax]
+ paddd xmm13,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm10
+
+ movdqa xmm9,xmm14
+ movdqa XMMWORD[(64-128)+rax],xmm1
+ paddd xmm13,xmm1
+ pxor xmm2,xmm4
+ psrld xmm9,27
+ pxor xmm6,xmm11
+ movdqa xmm7,xmm10
+
+ pslld xmm7,30
+ movdqa xmm5,xmm2
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm13,xmm6
+ paddd xmm2,xmm2
+
+ psrld xmm10,2
+ paddd xmm13,xmm8
+ por xmm2,xmm5
+ por xmm10,xmm7
+ pxor xmm3,xmm0
+ movdqa xmm0,XMMWORD[((128-128))+rax]
+
+ movdqa xmm8,xmm13
+ movdqa xmm6,xmm11
+ pxor xmm3,XMMWORD[((224-128))+rax]
+ paddd xmm12,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm14
+
+ movdqa xmm9,xmm13
+ movdqa XMMWORD[(80-128)+rax],xmm2
+ paddd xmm12,xmm2
+ pxor xmm3,xmm0
+ psrld xmm9,27
+ pxor xmm6,xmm10
+ movdqa xmm7,xmm14
+
+ pslld xmm7,30
+ movdqa xmm5,xmm3
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm12,xmm6
+ paddd xmm3,xmm3
+
+ psrld xmm14,2
+ paddd xmm12,xmm8
+ por xmm3,xmm5
+ por xmm14,xmm7
+ pxor xmm4,xmm1
+ movdqa xmm1,XMMWORD[((144-128))+rax]
+
+ movdqa xmm8,xmm12
+ movdqa xmm6,xmm10
+ pxor xmm4,XMMWORD[((240-128))+rax]
+ paddd xmm11,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm13
+
+ movdqa xmm9,xmm12
+ movdqa XMMWORD[(96-128)+rax],xmm3
+ paddd xmm11,xmm3
+ pxor xmm4,xmm1
+ psrld xmm9,27
+ pxor xmm6,xmm14
+ movdqa xmm7,xmm13
+
+ pslld xmm7,30
+ movdqa xmm5,xmm4
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm11,xmm6
+ paddd xmm4,xmm4
+
+ psrld xmm13,2
+ paddd xmm11,xmm8
+ por xmm4,xmm5
+ por xmm13,xmm7
+ pxor xmm0,xmm2
+ movdqa xmm2,XMMWORD[((160-128))+rax]
+
+ movdqa xmm8,xmm11
+ movdqa xmm6,xmm14
+ pxor xmm0,XMMWORD[((0-128))+rax]
+ paddd xmm10,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm12
+
+ movdqa xmm9,xmm11
+ movdqa XMMWORD[(112-128)+rax],xmm4
+ paddd xmm10,xmm4
+ pxor xmm0,xmm2
+ psrld xmm9,27
+ pxor xmm6,xmm13
+ movdqa xmm7,xmm12
+
+ pslld xmm7,30
+ movdqa xmm5,xmm0
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm10,xmm6
+ paddd xmm0,xmm0
+
+ psrld xmm12,2
+ paddd xmm10,xmm8
+ por xmm0,xmm5
+ por xmm12,xmm7
+ movdqa xmm15,XMMWORD[32+rbp]
+ pxor xmm1,xmm3
+ movdqa xmm3,XMMWORD[((176-128))+rax]
+
+ movdqa xmm8,xmm10
+ movdqa xmm7,xmm13
+ pxor xmm1,XMMWORD[((16-128))+rax]
+ pxor xmm1,xmm3
+ paddd xmm14,xmm15
+ pslld xmm8,5
+ movdqa xmm9,xmm10
+ pand xmm7,xmm12
+
+ movdqa xmm6,xmm13
+ movdqa xmm5,xmm1
+ psrld xmm9,27
+ paddd xmm14,xmm7
+ pxor xmm6,xmm12
+
+ movdqa XMMWORD[(128-128)+rax],xmm0
+ paddd xmm14,xmm0
+ por xmm8,xmm9
+ psrld xmm5,31
+ pand xmm6,xmm11
+ movdqa xmm7,xmm11
+
+ pslld xmm7,30
+ paddd xmm1,xmm1
+ paddd xmm14,xmm6
+
+ psrld xmm11,2
+ paddd xmm14,xmm8
+ por xmm1,xmm5
+ por xmm11,xmm7
+ pxor xmm2,xmm4
+ movdqa xmm4,XMMWORD[((192-128))+rax]
+
+ movdqa xmm8,xmm14
+ movdqa xmm7,xmm12
+ pxor xmm2,XMMWORD[((32-128))+rax]
+ pxor xmm2,xmm4
+ paddd xmm13,xmm15
+ pslld xmm8,5
+ movdqa xmm9,xmm14
+ pand xmm7,xmm11
+
+ movdqa xmm6,xmm12
+ movdqa xmm5,xmm2
+ psrld xmm9,27
+ paddd xmm13,xmm7
+ pxor xmm6,xmm11
+
+ movdqa XMMWORD[(144-128)+rax],xmm1
+ paddd xmm13,xmm1
+ por xmm8,xmm9
+ psrld xmm5,31
+ pand xmm6,xmm10
+ movdqa xmm7,xmm10
+
+ pslld xmm7,30
+ paddd xmm2,xmm2
+ paddd xmm13,xmm6
+
+ psrld xmm10,2
+ paddd xmm13,xmm8
+ por xmm2,xmm5
+ por xmm10,xmm7
+ pxor xmm3,xmm0
+ movdqa xmm0,XMMWORD[((208-128))+rax]
+
+ movdqa xmm8,xmm13
+ movdqa xmm7,xmm11
+ pxor xmm3,XMMWORD[((48-128))+rax]
+ pxor xmm3,xmm0
+ paddd xmm12,xmm15
+ pslld xmm8,5
+ movdqa xmm9,xmm13
+ pand xmm7,xmm10
+
+ movdqa xmm6,xmm11
+ movdqa xmm5,xmm3
+ psrld xmm9,27
+ paddd xmm12,xmm7
+ pxor xmm6,xmm10
+
+ movdqa XMMWORD[(160-128)+rax],xmm2
+ paddd xmm12,xmm2
+ por xmm8,xmm9
+ psrld xmm5,31
+ pand xmm6,xmm14
+ movdqa xmm7,xmm14
+
+ pslld xmm7,30
+ paddd xmm3,xmm3
+ paddd xmm12,xmm6
+
+ psrld xmm14,2
+ paddd xmm12,xmm8
+ por xmm3,xmm5
+ por xmm14,xmm7
+ pxor xmm4,xmm1
+ movdqa xmm1,XMMWORD[((224-128))+rax]
+
+ movdqa xmm8,xmm12
+ movdqa xmm7,xmm10
+ pxor xmm4,XMMWORD[((64-128))+rax]
+ pxor xmm4,xmm1
+ paddd xmm11,xmm15
+ pslld xmm8,5
+ movdqa xmm9,xmm12
+ pand xmm7,xmm14
+
+ movdqa xmm6,xmm10
+ movdqa xmm5,xmm4
+ psrld xmm9,27
+ paddd xmm11,xmm7
+ pxor xmm6,xmm14
+
+ movdqa XMMWORD[(176-128)+rax],xmm3
+ paddd xmm11,xmm3
+ por xmm8,xmm9
+ psrld xmm5,31
+ pand xmm6,xmm13
+ movdqa xmm7,xmm13
+
+ pslld xmm7,30
+ paddd xmm4,xmm4
+ paddd xmm11,xmm6
+
+ psrld xmm13,2
+ paddd xmm11,xmm8
+ por xmm4,xmm5
+ por xmm13,xmm7
+ pxor xmm0,xmm2
+ movdqa xmm2,XMMWORD[((240-128))+rax]
+
+ movdqa xmm8,xmm11
+ movdqa xmm7,xmm14
+ pxor xmm0,XMMWORD[((80-128))+rax]
+ pxor xmm0,xmm2
+ paddd xmm10,xmm15
+ pslld xmm8,5
+ movdqa xmm9,xmm11
+ pand xmm7,xmm13
+
+ movdqa xmm6,xmm14
+ movdqa xmm5,xmm0
+ psrld xmm9,27
+ paddd xmm10,xmm7
+ pxor xmm6,xmm13
+
+ movdqa XMMWORD[(192-128)+rax],xmm4
+ paddd xmm10,xmm4
+ por xmm8,xmm9
+ psrld xmm5,31
+ pand xmm6,xmm12
+ movdqa xmm7,xmm12
+
+ pslld xmm7,30
+ paddd xmm0,xmm0
+ paddd xmm10,xmm6
+
+ psrld xmm12,2
+ paddd xmm10,xmm8
+ por xmm0,xmm5
+ por xmm12,xmm7
+ pxor xmm1,xmm3
+ movdqa xmm3,XMMWORD[((0-128))+rax]
+
+ movdqa xmm8,xmm10
+ movdqa xmm7,xmm13
+ pxor xmm1,XMMWORD[((96-128))+rax]
+ pxor xmm1,xmm3
+ paddd xmm14,xmm15
+ pslld xmm8,5
+ movdqa xmm9,xmm10
+ pand xmm7,xmm12
+
+ movdqa xmm6,xmm13
+ movdqa xmm5,xmm1
+ psrld xmm9,27
+ paddd xmm14,xmm7
+ pxor xmm6,xmm12
+
+ movdqa XMMWORD[(208-128)+rax],xmm0
+ paddd xmm14,xmm0
+ por xmm8,xmm9
+ psrld xmm5,31
+ pand xmm6,xmm11
+ movdqa xmm7,xmm11
+
+ pslld xmm7,30
+ paddd xmm1,xmm1
+ paddd xmm14,xmm6
+
+ psrld xmm11,2
+ paddd xmm14,xmm8
+ por xmm1,xmm5
+ por xmm11,xmm7
+ pxor xmm2,xmm4
+ movdqa xmm4,XMMWORD[((16-128))+rax]
+
+ movdqa xmm8,xmm14
+ movdqa xmm7,xmm12
+ pxor xmm2,XMMWORD[((112-128))+rax]
+ pxor xmm2,xmm4
+ paddd xmm13,xmm15
+ pslld xmm8,5
+ movdqa xmm9,xmm14
+ pand xmm7,xmm11
+
+ movdqa xmm6,xmm12
+ movdqa xmm5,xmm2
+ psrld xmm9,27
+ paddd xmm13,xmm7
+ pxor xmm6,xmm11
+
+ movdqa XMMWORD[(224-128)+rax],xmm1
+ paddd xmm13,xmm1
+ por xmm8,xmm9
+ psrld xmm5,31
+ pand xmm6,xmm10
+ movdqa xmm7,xmm10
+
+ pslld xmm7,30
+ paddd xmm2,xmm2
+ paddd xmm13,xmm6
+
+ psrld xmm10,2
+ paddd xmm13,xmm8
+ por xmm2,xmm5
+ por xmm10,xmm7
+ pxor xmm3,xmm0
+ movdqa xmm0,XMMWORD[((32-128))+rax]
+
+ movdqa xmm8,xmm13
+ movdqa xmm7,xmm11
+ pxor xmm3,XMMWORD[((128-128))+rax]
+ pxor xmm3,xmm0
+ paddd xmm12,xmm15
+ pslld xmm8,5
+ movdqa xmm9,xmm13
+ pand xmm7,xmm10
+
+ movdqa xmm6,xmm11
+ movdqa xmm5,xmm3
+ psrld xmm9,27
+ paddd xmm12,xmm7
+ pxor xmm6,xmm10
+
+ movdqa XMMWORD[(240-128)+rax],xmm2
+ paddd xmm12,xmm2
+ por xmm8,xmm9
+ psrld xmm5,31
+ pand xmm6,xmm14
+ movdqa xmm7,xmm14
+
+ pslld xmm7,30
+ paddd xmm3,xmm3
+ paddd xmm12,xmm6
+
+ psrld xmm14,2
+ paddd xmm12,xmm8
+ por xmm3,xmm5
+ por xmm14,xmm7
+ pxor xmm4,xmm1
+ movdqa xmm1,XMMWORD[((48-128))+rax]
+
+ movdqa xmm8,xmm12
+ movdqa xmm7,xmm10
+ pxor xmm4,XMMWORD[((144-128))+rax]
+ pxor xmm4,xmm1
+ paddd xmm11,xmm15
+ pslld xmm8,5
+ movdqa xmm9,xmm12
+ pand xmm7,xmm14
+
+ movdqa xmm6,xmm10
+ movdqa xmm5,xmm4
+ psrld xmm9,27
+ paddd xmm11,xmm7
+ pxor xmm6,xmm14
+
+ movdqa XMMWORD[(0-128)+rax],xmm3
+ paddd xmm11,xmm3
+ por xmm8,xmm9
+ psrld xmm5,31
+ pand xmm6,xmm13
+ movdqa xmm7,xmm13
+
+ pslld xmm7,30
+ paddd xmm4,xmm4
+ paddd xmm11,xmm6
+
+ psrld xmm13,2
+ paddd xmm11,xmm8
+ por xmm4,xmm5
+ por xmm13,xmm7
+ pxor xmm0,xmm2
+ movdqa xmm2,XMMWORD[((64-128))+rax]
+
+ movdqa xmm8,xmm11
+ movdqa xmm7,xmm14
+ pxor xmm0,XMMWORD[((160-128))+rax]
+ pxor xmm0,xmm2
+ paddd xmm10,xmm15
+ pslld xmm8,5
+ movdqa xmm9,xmm11
+ pand xmm7,xmm13
+
+ movdqa xmm6,xmm14
+ movdqa xmm5,xmm0
+ psrld xmm9,27
+ paddd xmm10,xmm7
+ pxor xmm6,xmm13
+
+ movdqa XMMWORD[(16-128)+rax],xmm4
+ paddd xmm10,xmm4
+ por xmm8,xmm9
+ psrld xmm5,31
+ pand xmm6,xmm12
+ movdqa xmm7,xmm12
+
+ pslld xmm7,30
+ paddd xmm0,xmm0
+ paddd xmm10,xmm6
+
+ psrld xmm12,2
+ paddd xmm10,xmm8
+ por xmm0,xmm5
+ por xmm12,xmm7
+ pxor xmm1,xmm3
+ movdqa xmm3,XMMWORD[((80-128))+rax]
+
+ movdqa xmm8,xmm10
+ movdqa xmm7,xmm13
+ pxor xmm1,XMMWORD[((176-128))+rax]
+ pxor xmm1,xmm3
+ paddd xmm14,xmm15
+ pslld xmm8,5
+ movdqa xmm9,xmm10
+ pand xmm7,xmm12
+
+ movdqa xmm6,xmm13
+ movdqa xmm5,xmm1
+ psrld xmm9,27
+ paddd xmm14,xmm7
+ pxor xmm6,xmm12
+
+ movdqa XMMWORD[(32-128)+rax],xmm0
+ paddd xmm14,xmm0
+ por xmm8,xmm9
+ psrld xmm5,31
+ pand xmm6,xmm11
+ movdqa xmm7,xmm11
+
+ pslld xmm7,30
+ paddd xmm1,xmm1
+ paddd xmm14,xmm6
+
+ psrld xmm11,2
+ paddd xmm14,xmm8
+ por xmm1,xmm5
+ por xmm11,xmm7
+ pxor xmm2,xmm4
+ movdqa xmm4,XMMWORD[((96-128))+rax]
+
+ movdqa xmm8,xmm14
+ movdqa xmm7,xmm12
+ pxor xmm2,XMMWORD[((192-128))+rax]
+ pxor xmm2,xmm4
+ paddd xmm13,xmm15
+ pslld xmm8,5
+ movdqa xmm9,xmm14
+ pand xmm7,xmm11
+
+ movdqa xmm6,xmm12
+ movdqa xmm5,xmm2
+ psrld xmm9,27
+ paddd xmm13,xmm7
+ pxor xmm6,xmm11
+
+ movdqa XMMWORD[(48-128)+rax],xmm1
+ paddd xmm13,xmm1
+ por xmm8,xmm9
+ psrld xmm5,31
+ pand xmm6,xmm10
+ movdqa xmm7,xmm10
+
+ pslld xmm7,30
+ paddd xmm2,xmm2
+ paddd xmm13,xmm6
+
+ psrld xmm10,2
+ paddd xmm13,xmm8
+ por xmm2,xmm5
+ por xmm10,xmm7
+ pxor xmm3,xmm0
+ movdqa xmm0,XMMWORD[((112-128))+rax]
+
+ movdqa xmm8,xmm13
+ movdqa xmm7,xmm11
+ pxor xmm3,XMMWORD[((208-128))+rax]
+ pxor xmm3,xmm0
+ paddd xmm12,xmm15
+ pslld xmm8,5
+ movdqa xmm9,xmm13
+ pand xmm7,xmm10
+
+ movdqa xmm6,xmm11
+ movdqa xmm5,xmm3
+ psrld xmm9,27
+ paddd xmm12,xmm7
+ pxor xmm6,xmm10
+
+ movdqa XMMWORD[(64-128)+rax],xmm2
+ paddd xmm12,xmm2
+ por xmm8,xmm9
+ psrld xmm5,31
+ pand xmm6,xmm14
+ movdqa xmm7,xmm14
+
+ pslld xmm7,30
+ paddd xmm3,xmm3
+ paddd xmm12,xmm6
+
+ psrld xmm14,2
+ paddd xmm12,xmm8
+ por xmm3,xmm5
+ por xmm14,xmm7
+ pxor xmm4,xmm1
+ movdqa xmm1,XMMWORD[((128-128))+rax]
+
+ movdqa xmm8,xmm12
+ movdqa xmm7,xmm10
+ pxor xmm4,XMMWORD[((224-128))+rax]
+ pxor xmm4,xmm1
+ paddd xmm11,xmm15
+ pslld xmm8,5
+ movdqa xmm9,xmm12
+ pand xmm7,xmm14
+
+ movdqa xmm6,xmm10
+ movdqa xmm5,xmm4
+ psrld xmm9,27
+ paddd xmm11,xmm7
+ pxor xmm6,xmm14
+
+ movdqa XMMWORD[(80-128)+rax],xmm3
+ paddd xmm11,xmm3
+ por xmm8,xmm9
+ psrld xmm5,31
+ pand xmm6,xmm13
+ movdqa xmm7,xmm13
+
+ pslld xmm7,30
+ paddd xmm4,xmm4
+ paddd xmm11,xmm6
+
+ psrld xmm13,2
+ paddd xmm11,xmm8
+ por xmm4,xmm5
+ por xmm13,xmm7
+ pxor xmm0,xmm2
+ movdqa xmm2,XMMWORD[((144-128))+rax]
+
+ movdqa xmm8,xmm11
+ movdqa xmm7,xmm14
+ pxor xmm0,XMMWORD[((240-128))+rax]
+ pxor xmm0,xmm2
+ paddd xmm10,xmm15
+ pslld xmm8,5
+ movdqa xmm9,xmm11
+ pand xmm7,xmm13
+
+ movdqa xmm6,xmm14
+ movdqa xmm5,xmm0
+ psrld xmm9,27
+ paddd xmm10,xmm7
+ pxor xmm6,xmm13
+
+ movdqa XMMWORD[(96-128)+rax],xmm4
+ paddd xmm10,xmm4
+ por xmm8,xmm9
+ psrld xmm5,31
+ pand xmm6,xmm12
+ movdqa xmm7,xmm12
+
+ pslld xmm7,30
+ paddd xmm0,xmm0
+ paddd xmm10,xmm6
+
+ psrld xmm12,2
+ paddd xmm10,xmm8
+ por xmm0,xmm5
+ por xmm12,xmm7
+ pxor xmm1,xmm3
+ movdqa xmm3,XMMWORD[((160-128))+rax]
+
+ movdqa xmm8,xmm10
+ movdqa xmm7,xmm13
+ pxor xmm1,XMMWORD[((0-128))+rax]
+ pxor xmm1,xmm3
+ paddd xmm14,xmm15
+ pslld xmm8,5
+ movdqa xmm9,xmm10
+ pand xmm7,xmm12
+
+ movdqa xmm6,xmm13
+ movdqa xmm5,xmm1
+ psrld xmm9,27
+ paddd xmm14,xmm7
+ pxor xmm6,xmm12
+
+ movdqa XMMWORD[(112-128)+rax],xmm0
+ paddd xmm14,xmm0
+ por xmm8,xmm9
+ psrld xmm5,31
+ pand xmm6,xmm11
+ movdqa xmm7,xmm11
+
+ pslld xmm7,30
+ paddd xmm1,xmm1
+ paddd xmm14,xmm6
+
+ psrld xmm11,2
+ paddd xmm14,xmm8
+ por xmm1,xmm5
+ por xmm11,xmm7
+ pxor xmm2,xmm4
+ movdqa xmm4,XMMWORD[((176-128))+rax]
+
+ movdqa xmm8,xmm14
+ movdqa xmm7,xmm12
+ pxor xmm2,XMMWORD[((16-128))+rax]
+ pxor xmm2,xmm4
+ paddd xmm13,xmm15
+ pslld xmm8,5
+ movdqa xmm9,xmm14
+ pand xmm7,xmm11
+
+ movdqa xmm6,xmm12
+ movdqa xmm5,xmm2
+ psrld xmm9,27
+ paddd xmm13,xmm7
+ pxor xmm6,xmm11
+
+ movdqa XMMWORD[(128-128)+rax],xmm1
+ paddd xmm13,xmm1
+ por xmm8,xmm9
+ psrld xmm5,31
+ pand xmm6,xmm10
+ movdqa xmm7,xmm10
+
+ pslld xmm7,30
+ paddd xmm2,xmm2
+ paddd xmm13,xmm6
+
+ psrld xmm10,2
+ paddd xmm13,xmm8
+ por xmm2,xmm5
+ por xmm10,xmm7
+ pxor xmm3,xmm0
+ movdqa xmm0,XMMWORD[((192-128))+rax]
+
+ movdqa xmm8,xmm13
+ movdqa xmm7,xmm11
+ pxor xmm3,XMMWORD[((32-128))+rax]
+ pxor xmm3,xmm0
+ paddd xmm12,xmm15
+ pslld xmm8,5
+ movdqa xmm9,xmm13
+ pand xmm7,xmm10
+
+ movdqa xmm6,xmm11
+ movdqa xmm5,xmm3
+ psrld xmm9,27
+ paddd xmm12,xmm7
+ pxor xmm6,xmm10
+
+ movdqa XMMWORD[(144-128)+rax],xmm2
+ paddd xmm12,xmm2
+ por xmm8,xmm9
+ psrld xmm5,31
+ pand xmm6,xmm14
+ movdqa xmm7,xmm14
+
+ pslld xmm7,30
+ paddd xmm3,xmm3
+ paddd xmm12,xmm6
+
+ psrld xmm14,2
+ paddd xmm12,xmm8
+ por xmm3,xmm5
+ por xmm14,xmm7
+ pxor xmm4,xmm1
+ movdqa xmm1,XMMWORD[((208-128))+rax]
+
+ movdqa xmm8,xmm12
+ movdqa xmm7,xmm10
+ pxor xmm4,XMMWORD[((48-128))+rax]
+ pxor xmm4,xmm1
+ paddd xmm11,xmm15
+ pslld xmm8,5
+ movdqa xmm9,xmm12
+ pand xmm7,xmm14
+
+ movdqa xmm6,xmm10
+ movdqa xmm5,xmm4
+ psrld xmm9,27
+ paddd xmm11,xmm7
+ pxor xmm6,xmm14
+
+ movdqa XMMWORD[(160-128)+rax],xmm3
+ paddd xmm11,xmm3
+ por xmm8,xmm9
+ psrld xmm5,31
+ pand xmm6,xmm13
+ movdqa xmm7,xmm13
+
+ pslld xmm7,30
+ paddd xmm4,xmm4
+ paddd xmm11,xmm6
+
+ psrld xmm13,2
+ paddd xmm11,xmm8
+ por xmm4,xmm5
+ por xmm13,xmm7
+ pxor xmm0,xmm2
+ movdqa xmm2,XMMWORD[((224-128))+rax]
+
+ movdqa xmm8,xmm11
+ movdqa xmm7,xmm14
+ pxor xmm0,XMMWORD[((64-128))+rax]
+ pxor xmm0,xmm2
+ paddd xmm10,xmm15
+ pslld xmm8,5
+ movdqa xmm9,xmm11
+ pand xmm7,xmm13
+
+ movdqa xmm6,xmm14
+ movdqa xmm5,xmm0
+ psrld xmm9,27
+ paddd xmm10,xmm7
+ pxor xmm6,xmm13
+
+ movdqa XMMWORD[(176-128)+rax],xmm4
+ paddd xmm10,xmm4
+ por xmm8,xmm9
+ psrld xmm5,31
+ pand xmm6,xmm12
+ movdqa xmm7,xmm12
+
+ pslld xmm7,30
+ paddd xmm0,xmm0
+ paddd xmm10,xmm6
+
+ psrld xmm12,2
+ paddd xmm10,xmm8
+ por xmm0,xmm5
+ por xmm12,xmm7
+ movdqa xmm15,XMMWORD[64+rbp]
+ pxor xmm1,xmm3
+ movdqa xmm3,XMMWORD[((240-128))+rax]
+
+ movdqa xmm8,xmm10
+ movdqa xmm6,xmm13
+ pxor xmm1,XMMWORD[((80-128))+rax]
+ paddd xmm14,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm11
+
+ movdqa xmm9,xmm10
+ movdqa XMMWORD[(192-128)+rax],xmm0
+ paddd xmm14,xmm0
+ pxor xmm1,xmm3
+ psrld xmm9,27
+ pxor xmm6,xmm12
+ movdqa xmm7,xmm11
+
+ pslld xmm7,30
+ movdqa xmm5,xmm1
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm14,xmm6
+ paddd xmm1,xmm1
+
+ psrld xmm11,2
+ paddd xmm14,xmm8
+ por xmm1,xmm5
+ por xmm11,xmm7
+ pxor xmm2,xmm4
+ movdqa xmm4,XMMWORD[((0-128))+rax]
+
+ movdqa xmm8,xmm14
+ movdqa xmm6,xmm12
+ pxor xmm2,XMMWORD[((96-128))+rax]
+ paddd xmm13,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm10
+
+ movdqa xmm9,xmm14
+ movdqa XMMWORD[(208-128)+rax],xmm1
+ paddd xmm13,xmm1
+ pxor xmm2,xmm4
+ psrld xmm9,27
+ pxor xmm6,xmm11
+ movdqa xmm7,xmm10
+
+ pslld xmm7,30
+ movdqa xmm5,xmm2
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm13,xmm6
+ paddd xmm2,xmm2
+
+ psrld xmm10,2
+ paddd xmm13,xmm8
+ por xmm2,xmm5
+ por xmm10,xmm7
+ pxor xmm3,xmm0
+ movdqa xmm0,XMMWORD[((16-128))+rax]
+
+ movdqa xmm8,xmm13
+ movdqa xmm6,xmm11
+ pxor xmm3,XMMWORD[((112-128))+rax]
+ paddd xmm12,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm14
+
+ movdqa xmm9,xmm13
+ movdqa XMMWORD[(224-128)+rax],xmm2
+ paddd xmm12,xmm2
+ pxor xmm3,xmm0
+ psrld xmm9,27
+ pxor xmm6,xmm10
+ movdqa xmm7,xmm14
+
+ pslld xmm7,30
+ movdqa xmm5,xmm3
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm12,xmm6
+ paddd xmm3,xmm3
+
+ psrld xmm14,2
+ paddd xmm12,xmm8
+ por xmm3,xmm5
+ por xmm14,xmm7
+ pxor xmm4,xmm1
+ movdqa xmm1,XMMWORD[((32-128))+rax]
+
+ movdqa xmm8,xmm12
+ movdqa xmm6,xmm10
+ pxor xmm4,XMMWORD[((128-128))+rax]
+ paddd xmm11,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm13
+
+ movdqa xmm9,xmm12
+ movdqa XMMWORD[(240-128)+rax],xmm3
+ paddd xmm11,xmm3
+ pxor xmm4,xmm1
+ psrld xmm9,27
+ pxor xmm6,xmm14
+ movdqa xmm7,xmm13
+
+ pslld xmm7,30
+ movdqa xmm5,xmm4
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm11,xmm6
+ paddd xmm4,xmm4
+
+ psrld xmm13,2
+ paddd xmm11,xmm8
+ por xmm4,xmm5
+ por xmm13,xmm7
+ pxor xmm0,xmm2
+ movdqa xmm2,XMMWORD[((48-128))+rax]
+
+ movdqa xmm8,xmm11
+ movdqa xmm6,xmm14
+ pxor xmm0,XMMWORD[((144-128))+rax]
+ paddd xmm10,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm12
+
+ movdqa xmm9,xmm11
+ movdqa XMMWORD[(0-128)+rax],xmm4
+ paddd xmm10,xmm4
+ pxor xmm0,xmm2
+ psrld xmm9,27
+ pxor xmm6,xmm13
+ movdqa xmm7,xmm12
+
+ pslld xmm7,30
+ movdqa xmm5,xmm0
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm10,xmm6
+ paddd xmm0,xmm0
+
+ psrld xmm12,2
+ paddd xmm10,xmm8
+ por xmm0,xmm5
+ por xmm12,xmm7
+ pxor xmm1,xmm3
+ movdqa xmm3,XMMWORD[((64-128))+rax]
+
+ movdqa xmm8,xmm10
+ movdqa xmm6,xmm13
+ pxor xmm1,XMMWORD[((160-128))+rax]
+ paddd xmm14,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm11
+
+ movdqa xmm9,xmm10
+ movdqa XMMWORD[(16-128)+rax],xmm0
+ paddd xmm14,xmm0
+ pxor xmm1,xmm3
+ psrld xmm9,27
+ pxor xmm6,xmm12
+ movdqa xmm7,xmm11
+
+ pslld xmm7,30
+ movdqa xmm5,xmm1
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm14,xmm6
+ paddd xmm1,xmm1
+
+ psrld xmm11,2
+ paddd xmm14,xmm8
+ por xmm1,xmm5
+ por xmm11,xmm7
+ pxor xmm2,xmm4
+ movdqa xmm4,XMMWORD[((80-128))+rax]
+
+ movdqa xmm8,xmm14
+ movdqa xmm6,xmm12
+ pxor xmm2,XMMWORD[((176-128))+rax]
+ paddd xmm13,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm10
+
+ movdqa xmm9,xmm14
+ movdqa XMMWORD[(32-128)+rax],xmm1
+ paddd xmm13,xmm1
+ pxor xmm2,xmm4
+ psrld xmm9,27
+ pxor xmm6,xmm11
+ movdqa xmm7,xmm10
+
+ pslld xmm7,30
+ movdqa xmm5,xmm2
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm13,xmm6
+ paddd xmm2,xmm2
+
+ psrld xmm10,2
+ paddd xmm13,xmm8
+ por xmm2,xmm5
+ por xmm10,xmm7
+ pxor xmm3,xmm0
+ movdqa xmm0,XMMWORD[((96-128))+rax]
+
+ movdqa xmm8,xmm13
+ movdqa xmm6,xmm11
+ pxor xmm3,XMMWORD[((192-128))+rax]
+ paddd xmm12,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm14
+
+ movdqa xmm9,xmm13
+ movdqa XMMWORD[(48-128)+rax],xmm2
+ paddd xmm12,xmm2
+ pxor xmm3,xmm0
+ psrld xmm9,27
+ pxor xmm6,xmm10
+ movdqa xmm7,xmm14
+
+ pslld xmm7,30
+ movdqa xmm5,xmm3
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm12,xmm6
+ paddd xmm3,xmm3
+
+ psrld xmm14,2
+ paddd xmm12,xmm8
+ por xmm3,xmm5
+ por xmm14,xmm7
+ pxor xmm4,xmm1
+ movdqa xmm1,XMMWORD[((112-128))+rax]
+
+ movdqa xmm8,xmm12
+ movdqa xmm6,xmm10
+ pxor xmm4,XMMWORD[((208-128))+rax]
+ paddd xmm11,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm13
+
+ movdqa xmm9,xmm12
+ movdqa XMMWORD[(64-128)+rax],xmm3
+ paddd xmm11,xmm3
+ pxor xmm4,xmm1
+ psrld xmm9,27
+ pxor xmm6,xmm14
+ movdqa xmm7,xmm13
+
+ pslld xmm7,30
+ movdqa xmm5,xmm4
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm11,xmm6
+ paddd xmm4,xmm4
+
+ psrld xmm13,2
+ paddd xmm11,xmm8
+ por xmm4,xmm5
+ por xmm13,xmm7
+ pxor xmm0,xmm2
+ movdqa xmm2,XMMWORD[((128-128))+rax]
+
+ movdqa xmm8,xmm11
+ movdqa xmm6,xmm14
+ pxor xmm0,XMMWORD[((224-128))+rax]
+ paddd xmm10,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm12
+
+ movdqa xmm9,xmm11
+ movdqa XMMWORD[(80-128)+rax],xmm4
+ paddd xmm10,xmm4
+ pxor xmm0,xmm2
+ psrld xmm9,27
+ pxor xmm6,xmm13
+ movdqa xmm7,xmm12
+
+ pslld xmm7,30
+ movdqa xmm5,xmm0
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm10,xmm6
+ paddd xmm0,xmm0
+
+ psrld xmm12,2
+ paddd xmm10,xmm8
+ por xmm0,xmm5
+ por xmm12,xmm7
+ pxor xmm1,xmm3
+ movdqa xmm3,XMMWORD[((144-128))+rax]
+
+ movdqa xmm8,xmm10
+ movdqa xmm6,xmm13
+ pxor xmm1,XMMWORD[((240-128))+rax]
+ paddd xmm14,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm11
+
+ movdqa xmm9,xmm10
+ movdqa XMMWORD[(96-128)+rax],xmm0
+ paddd xmm14,xmm0
+ pxor xmm1,xmm3
+ psrld xmm9,27
+ pxor xmm6,xmm12
+ movdqa xmm7,xmm11
+
+ pslld xmm7,30
+ movdqa xmm5,xmm1
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm14,xmm6
+ paddd xmm1,xmm1
+
+ psrld xmm11,2
+ paddd xmm14,xmm8
+ por xmm1,xmm5
+ por xmm11,xmm7
+ pxor xmm2,xmm4
+ movdqa xmm4,XMMWORD[((160-128))+rax]
+
+ movdqa xmm8,xmm14
+ movdqa xmm6,xmm12
+ pxor xmm2,XMMWORD[((0-128))+rax]
+ paddd xmm13,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm10
+
+ movdqa xmm9,xmm14
+ movdqa XMMWORD[(112-128)+rax],xmm1
+ paddd xmm13,xmm1
+ pxor xmm2,xmm4
+ psrld xmm9,27
+ pxor xmm6,xmm11
+ movdqa xmm7,xmm10
+
+ pslld xmm7,30
+ movdqa xmm5,xmm2
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm13,xmm6
+ paddd xmm2,xmm2
+
+ psrld xmm10,2
+ paddd xmm13,xmm8
+ por xmm2,xmm5
+ por xmm10,xmm7
+ pxor xmm3,xmm0
+ movdqa xmm0,XMMWORD[((176-128))+rax]
+
+ movdqa xmm8,xmm13
+ movdqa xmm6,xmm11
+ pxor xmm3,XMMWORD[((16-128))+rax]
+ paddd xmm12,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm14
+
+ movdqa xmm9,xmm13
+ paddd xmm12,xmm2
+ pxor xmm3,xmm0
+ psrld xmm9,27
+ pxor xmm6,xmm10
+ movdqa xmm7,xmm14
+
+ pslld xmm7,30
+ movdqa xmm5,xmm3
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm12,xmm6
+ paddd xmm3,xmm3
+
+ psrld xmm14,2
+ paddd xmm12,xmm8
+ por xmm3,xmm5
+ por xmm14,xmm7
+ pxor xmm4,xmm1
+ movdqa xmm1,XMMWORD[((192-128))+rax]
+
+ movdqa xmm8,xmm12
+ movdqa xmm6,xmm10
+ pxor xmm4,XMMWORD[((32-128))+rax]
+ paddd xmm11,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm13
+
+ movdqa xmm9,xmm12
+ paddd xmm11,xmm3
+ pxor xmm4,xmm1
+ psrld xmm9,27
+ pxor xmm6,xmm14
+ movdqa xmm7,xmm13
+
+ pslld xmm7,30
+ movdqa xmm5,xmm4
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm11,xmm6
+ paddd xmm4,xmm4
+
+ psrld xmm13,2
+ paddd xmm11,xmm8
+ por xmm4,xmm5
+ por xmm13,xmm7
+ pxor xmm0,xmm2
+ movdqa xmm2,XMMWORD[((208-128))+rax]
+
+ movdqa xmm8,xmm11
+ movdqa xmm6,xmm14
+ pxor xmm0,XMMWORD[((48-128))+rax]
+ paddd xmm10,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm12
+
+ movdqa xmm9,xmm11
+ paddd xmm10,xmm4
+ pxor xmm0,xmm2
+ psrld xmm9,27
+ pxor xmm6,xmm13
+ movdqa xmm7,xmm12
+
+ pslld xmm7,30
+ movdqa xmm5,xmm0
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm10,xmm6
+ paddd xmm0,xmm0
+
+ psrld xmm12,2
+ paddd xmm10,xmm8
+ por xmm0,xmm5
+ por xmm12,xmm7
+ pxor xmm1,xmm3
+ movdqa xmm3,XMMWORD[((224-128))+rax]
+
+ movdqa xmm8,xmm10
+ movdqa xmm6,xmm13
+ pxor xmm1,XMMWORD[((64-128))+rax]
+ paddd xmm14,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm11
+
+ movdqa xmm9,xmm10
+ paddd xmm14,xmm0
+ pxor xmm1,xmm3
+ psrld xmm9,27
+ pxor xmm6,xmm12
+ movdqa xmm7,xmm11
+
+ pslld xmm7,30
+ movdqa xmm5,xmm1
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm14,xmm6
+ paddd xmm1,xmm1
+
+ psrld xmm11,2
+ paddd xmm14,xmm8
+ por xmm1,xmm5
+ por xmm11,xmm7
+ pxor xmm2,xmm4
+ movdqa xmm4,XMMWORD[((240-128))+rax]
+
+ movdqa xmm8,xmm14
+ movdqa xmm6,xmm12
+ pxor xmm2,XMMWORD[((80-128))+rax]
+ paddd xmm13,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm10
+
+ movdqa xmm9,xmm14
+ paddd xmm13,xmm1
+ pxor xmm2,xmm4
+ psrld xmm9,27
+ pxor xmm6,xmm11
+ movdqa xmm7,xmm10
+
+ pslld xmm7,30
+ movdqa xmm5,xmm2
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm13,xmm6
+ paddd xmm2,xmm2
+
+ psrld xmm10,2
+ paddd xmm13,xmm8
+ por xmm2,xmm5
+ por xmm10,xmm7
+ pxor xmm3,xmm0
+ movdqa xmm0,XMMWORD[((0-128))+rax]
+
+ movdqa xmm8,xmm13
+ movdqa xmm6,xmm11
+ pxor xmm3,XMMWORD[((96-128))+rax]
+ paddd xmm12,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm14
+
+ movdqa xmm9,xmm13
+ paddd xmm12,xmm2
+ pxor xmm3,xmm0
+ psrld xmm9,27
+ pxor xmm6,xmm10
+ movdqa xmm7,xmm14
+
+ pslld xmm7,30
+ movdqa xmm5,xmm3
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm12,xmm6
+ paddd xmm3,xmm3
+
+ psrld xmm14,2
+ paddd xmm12,xmm8
+ por xmm3,xmm5
+ por xmm14,xmm7
+ pxor xmm4,xmm1
+ movdqa xmm1,XMMWORD[((16-128))+rax]
+
+ movdqa xmm8,xmm12
+ movdqa xmm6,xmm10
+ pxor xmm4,XMMWORD[((112-128))+rax]
+ paddd xmm11,xmm15
+ pslld xmm8,5
+ pxor xmm6,xmm13
+
+ movdqa xmm9,xmm12
+ paddd xmm11,xmm3
+ pxor xmm4,xmm1
+ psrld xmm9,27
+ pxor xmm6,xmm14
+ movdqa xmm7,xmm13
+
+ pslld xmm7,30
+ movdqa xmm5,xmm4
+ por xmm8,xmm9
+ psrld xmm5,31
+ paddd xmm11,xmm6
+ paddd xmm4,xmm4
+
+ psrld xmm13,2
+ paddd xmm11,xmm8
+ por xmm4,xmm5
+ por xmm13,xmm7
+ movdqa xmm8,xmm11
+ paddd xmm10,xmm15
+ movdqa xmm6,xmm14
+ pslld xmm8,5
+ pxor xmm6,xmm12
+
+ movdqa xmm9,xmm11
+ paddd xmm10,xmm4
+ psrld xmm9,27
+ movdqa xmm7,xmm12
+ pxor xmm6,xmm13
+
+ pslld xmm7,30
+ por xmm8,xmm9
+ paddd xmm10,xmm6
+
+ psrld xmm12,2
+ paddd xmm10,xmm8
+ por xmm12,xmm7
+ movdqa xmm0,XMMWORD[rbx]
+ mov ecx,1
+ cmp ecx,DWORD[rbx]
+ pxor xmm8,xmm8
+ cmovge r8,rbp
+ cmp ecx,DWORD[4+rbx]
+ movdqa xmm1,xmm0
+ cmovge r9,rbp
+ cmp ecx,DWORD[8+rbx]
+ pcmpgtd xmm1,xmm8
+ cmovge r10,rbp
+ cmp ecx,DWORD[12+rbx]
+ paddd xmm0,xmm1
+ cmovge r11,rbp
+
+ movdqu xmm6,XMMWORD[rdi]
+ pand xmm10,xmm1
+ movdqu xmm7,XMMWORD[32+rdi]
+ pand xmm11,xmm1
+ paddd xmm10,xmm6
+ movdqu xmm8,XMMWORD[64+rdi]
+ pand xmm12,xmm1
+ paddd xmm11,xmm7
+ movdqu xmm9,XMMWORD[96+rdi]
+ pand xmm13,xmm1
+ paddd xmm12,xmm8
+ movdqu xmm5,XMMWORD[128+rdi]
+ pand xmm14,xmm1
+ movdqu XMMWORD[rdi],xmm10
+ paddd xmm13,xmm9
+ movdqu XMMWORD[32+rdi],xmm11
+ paddd xmm14,xmm5
+ movdqu XMMWORD[64+rdi],xmm12
+ movdqu XMMWORD[96+rdi],xmm13
+ movdqu XMMWORD[128+rdi],xmm14
+
+ movdqa XMMWORD[rbx],xmm0
+ movdqa xmm5,XMMWORD[96+rbp]
+ movdqa xmm15,XMMWORD[((-32))+rbp]
+ dec edx
+ jnz NEAR $L$oop
+
+ mov edx,DWORD[280+rsp]
+ lea rdi,[16+rdi]
+ lea rsi,[64+rsi]
+ dec edx
+ jnz NEAR $L$oop_grande
+
+$L$done:
+ mov rax,QWORD[272+rsp]
+
+ movaps xmm6,XMMWORD[((-184))+rax]
+ movaps xmm7,XMMWORD[((-168))+rax]
+ movaps xmm8,XMMWORD[((-152))+rax]
+ movaps xmm9,XMMWORD[((-136))+rax]
+ movaps xmm10,XMMWORD[((-120))+rax]
+ movaps xmm11,XMMWORD[((-104))+rax]
+ movaps xmm12,XMMWORD[((-88))+rax]
+ movaps xmm13,XMMWORD[((-72))+rax]
+ movaps xmm14,XMMWORD[((-56))+rax]
+ movaps xmm15,XMMWORD[((-40))+rax]
+ mov rbp,QWORD[((-16))+rax]
+
+ mov rbx,QWORD[((-8))+rax]
+
+ lea rsp,[rax]
+
+$L$epilogue:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_sha1_multi_block:
+
+ALIGN 32
+sha1_multi_block_shaext:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_sha1_multi_block_shaext:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+
+_shaext_shortcut:
+ mov rax,rsp
+
+ push rbx
+
+ push rbp
+
+ lea rsp,[((-168))+rsp]
+ movaps XMMWORD[rsp],xmm6
+ movaps XMMWORD[16+rsp],xmm7
+ movaps XMMWORD[32+rsp],xmm8
+ movaps XMMWORD[48+rsp],xmm9
+ movaps XMMWORD[(-120)+rax],xmm10
+ movaps XMMWORD[(-104)+rax],xmm11
+ movaps XMMWORD[(-88)+rax],xmm12
+ movaps XMMWORD[(-72)+rax],xmm13
+ movaps XMMWORD[(-56)+rax],xmm14
+ movaps XMMWORD[(-40)+rax],xmm15
+ sub rsp,288
+ shl edx,1
+ and rsp,-256
+ lea rdi,[64+rdi]
+ mov QWORD[272+rsp],rax
+$L$body_shaext:
+ lea rbx,[256+rsp]
+ movdqa xmm3,XMMWORD[((K_XX_XX+128))]
+
+$L$oop_grande_shaext:
+ mov DWORD[280+rsp],edx
+ xor edx,edx
+ mov r8,QWORD[rsi]
+ mov ecx,DWORD[8+rsi]
+ cmp ecx,edx
+ cmovg edx,ecx
+ test ecx,ecx
+ mov DWORD[rbx],ecx
+ cmovle r8,rsp
+ mov r9,QWORD[16+rsi]
+ mov ecx,DWORD[24+rsi]
+ cmp ecx,edx
+ cmovg edx,ecx
+ test ecx,ecx
+ mov DWORD[4+rbx],ecx
+ cmovle r9,rsp
+ test edx,edx
+ jz NEAR $L$done_shaext
+
+ movq xmm0,QWORD[((0-64))+rdi]
+ movq xmm4,QWORD[((32-64))+rdi]
+ movq xmm5,QWORD[((64-64))+rdi]
+ movq xmm6,QWORD[((96-64))+rdi]
+ movq xmm7,QWORD[((128-64))+rdi]
+
+ punpckldq xmm0,xmm4
+ punpckldq xmm5,xmm6
+
+ movdqa xmm8,xmm0
+ punpcklqdq xmm0,xmm5
+ punpckhqdq xmm8,xmm5
+
+ pshufd xmm1,xmm7,63
+ pshufd xmm9,xmm7,127
+ pshufd xmm0,xmm0,27
+ pshufd xmm8,xmm8,27
+ jmp NEAR $L$oop_shaext
+
+ALIGN 32
+$L$oop_shaext:
+ movdqu xmm4,XMMWORD[r8]
+ movdqu xmm11,XMMWORD[r9]
+ movdqu xmm5,XMMWORD[16+r8]
+ movdqu xmm12,XMMWORD[16+r9]
+ movdqu xmm6,XMMWORD[32+r8]
+DB 102,15,56,0,227
+ movdqu xmm13,XMMWORD[32+r9]
+DB 102,68,15,56,0,219
+ movdqu xmm7,XMMWORD[48+r8]
+ lea r8,[64+r8]
+DB 102,15,56,0,235
+ movdqu xmm14,XMMWORD[48+r9]
+ lea r9,[64+r9]
+DB 102,68,15,56,0,227
+
+ movdqa XMMWORD[80+rsp],xmm1
+ paddd xmm1,xmm4
+ movdqa XMMWORD[112+rsp],xmm9
+ paddd xmm9,xmm11
+ movdqa XMMWORD[64+rsp],xmm0
+ movdqa xmm2,xmm0
+ movdqa XMMWORD[96+rsp],xmm8
+ movdqa xmm10,xmm8
+DB 15,58,204,193,0
+DB 15,56,200,213
+DB 69,15,58,204,193,0
+DB 69,15,56,200,212
+DB 102,15,56,0,243
+ prefetcht0 [127+r8]
+DB 15,56,201,229
+DB 102,68,15,56,0,235
+ prefetcht0 [127+r9]
+DB 69,15,56,201,220
+
+DB 102,15,56,0,251
+ movdqa xmm1,xmm0
+DB 102,68,15,56,0,243
+ movdqa xmm9,xmm8
+DB 15,58,204,194,0
+DB 15,56,200,206
+DB 69,15,58,204,194,0
+DB 69,15,56,200,205
+ pxor xmm4,xmm6
+DB 15,56,201,238
+ pxor xmm11,xmm13
+DB 69,15,56,201,229
+ movdqa xmm2,xmm0
+ movdqa xmm10,xmm8
+DB 15,58,204,193,0
+DB 15,56,200,215
+DB 69,15,58,204,193,0
+DB 69,15,56,200,214
+DB 15,56,202,231
+DB 69,15,56,202,222
+ pxor xmm5,xmm7
+DB 15,56,201,247
+ pxor xmm12,xmm14
+DB 69,15,56,201,238
+ movdqa xmm1,xmm0
+ movdqa xmm9,xmm8
+DB 15,58,204,194,0
+DB 15,56,200,204
+DB 69,15,58,204,194,0
+DB 69,15,56,200,203
+DB 15,56,202,236
+DB 69,15,56,202,227
+ pxor xmm6,xmm4
+DB 15,56,201,252
+ pxor xmm13,xmm11
+DB 69,15,56,201,243
+ movdqa xmm2,xmm0
+ movdqa xmm10,xmm8
+DB 15,58,204,193,0
+DB 15,56,200,213
+DB 69,15,58,204,193,0
+DB 69,15,56,200,212
+DB 15,56,202,245
+DB 69,15,56,202,236
+ pxor xmm7,xmm5
+DB 15,56,201,229
+ pxor xmm14,xmm12
+DB 69,15,56,201,220
+ movdqa xmm1,xmm0
+ movdqa xmm9,xmm8
+DB 15,58,204,194,1
+DB 15,56,200,206
+DB 69,15,58,204,194,1
+DB 69,15,56,200,205
+DB 15,56,202,254
+DB 69,15,56,202,245
+ pxor xmm4,xmm6
+DB 15,56,201,238
+ pxor xmm11,xmm13
+DB 69,15,56,201,229
+ movdqa xmm2,xmm0
+ movdqa xmm10,xmm8
+DB 15,58,204,193,1
+DB 15,56,200,215
+DB 69,15,58,204,193,1
+DB 69,15,56,200,214
+DB 15,56,202,231
+DB 69,15,56,202,222
+ pxor xmm5,xmm7
+DB 15,56,201,247
+ pxor xmm12,xmm14
+DB 69,15,56,201,238
+ movdqa xmm1,xmm0
+ movdqa xmm9,xmm8
+DB 15,58,204,194,1
+DB 15,56,200,204
+DB 69,15,58,204,194,1
+DB 69,15,56,200,203
+DB 15,56,202,236
+DB 69,15,56,202,227
+ pxor xmm6,xmm4
+DB 15,56,201,252
+ pxor xmm13,xmm11
+DB 69,15,56,201,243
+ movdqa xmm2,xmm0
+ movdqa xmm10,xmm8
+DB 15,58,204,193,1
+DB 15,56,200,213
+DB 69,15,58,204,193,1
+DB 69,15,56,200,212
+DB 15,56,202,245
+DB 69,15,56,202,236
+ pxor xmm7,xmm5
+DB 15,56,201,229
+ pxor xmm14,xmm12
+DB 69,15,56,201,220
+ movdqa xmm1,xmm0
+ movdqa xmm9,xmm8
+DB 15,58,204,194,1
+DB 15,56,200,206
+DB 69,15,58,204,194,1
+DB 69,15,56,200,205
+DB 15,56,202,254
+DB 69,15,56,202,245
+ pxor xmm4,xmm6
+DB 15,56,201,238
+ pxor xmm11,xmm13
+DB 69,15,56,201,229
+ movdqa xmm2,xmm0
+ movdqa xmm10,xmm8
+DB 15,58,204,193,2
+DB 15,56,200,215
+DB 69,15,58,204,193,2
+DB 69,15,56,200,214
+DB 15,56,202,231
+DB 69,15,56,202,222
+ pxor xmm5,xmm7
+DB 15,56,201,247
+ pxor xmm12,xmm14
+DB 69,15,56,201,238
+ movdqa xmm1,xmm0
+ movdqa xmm9,xmm8
+DB 15,58,204,194,2
+DB 15,56,200,204
+DB 69,15,58,204,194,2
+DB 69,15,56,200,203
+DB 15,56,202,236
+DB 69,15,56,202,227
+ pxor xmm6,xmm4
+DB 15,56,201,252
+ pxor xmm13,xmm11
+DB 69,15,56,201,243
+ movdqa xmm2,xmm0
+ movdqa xmm10,xmm8
+DB 15,58,204,193,2
+DB 15,56,200,213
+DB 69,15,58,204,193,2
+DB 69,15,56,200,212
+DB 15,56,202,245
+DB 69,15,56,202,236
+ pxor xmm7,xmm5
+DB 15,56,201,229
+ pxor xmm14,xmm12
+DB 69,15,56,201,220
+ movdqa xmm1,xmm0
+ movdqa xmm9,xmm8
+DB 15,58,204,194,2
+DB 15,56,200,206
+DB 69,15,58,204,194,2
+DB 69,15,56,200,205
+DB 15,56,202,254
+DB 69,15,56,202,245
+ pxor xmm4,xmm6
+DB 15,56,201,238
+ pxor xmm11,xmm13
+DB 69,15,56,201,229
+ movdqa xmm2,xmm0
+ movdqa xmm10,xmm8
+DB 15,58,204,193,2
+DB 15,56,200,215
+DB 69,15,58,204,193,2
+DB 69,15,56,200,214
+DB 15,56,202,231
+DB 69,15,56,202,222
+ pxor xmm5,xmm7
+DB 15,56,201,247
+ pxor xmm12,xmm14
+DB 69,15,56,201,238
+ movdqa xmm1,xmm0
+ movdqa xmm9,xmm8
+DB 15,58,204,194,3
+DB 15,56,200,204
+DB 69,15,58,204,194,3
+DB 69,15,56,200,203
+DB 15,56,202,236
+DB 69,15,56,202,227
+ pxor xmm6,xmm4
+DB 15,56,201,252
+ pxor xmm13,xmm11
+DB 69,15,56,201,243
+ movdqa xmm2,xmm0
+ movdqa xmm10,xmm8
+DB 15,58,204,193,3
+DB 15,56,200,213
+DB 69,15,58,204,193,3
+DB 69,15,56,200,212
+DB 15,56,202,245
+DB 69,15,56,202,236
+ pxor xmm7,xmm5
+ pxor xmm14,xmm12
+
+ mov ecx,1
+ pxor xmm4,xmm4
+ cmp ecx,DWORD[rbx]
+ cmovge r8,rsp
+
+ movdqa xmm1,xmm0
+ movdqa xmm9,xmm8
+DB 15,58,204,194,3
+DB 15,56,200,206
+DB 69,15,58,204,194,3
+DB 69,15,56,200,205
+DB 15,56,202,254
+DB 69,15,56,202,245
+
+ cmp ecx,DWORD[4+rbx]
+ cmovge r9,rsp
+ movq xmm6,QWORD[rbx]
+
+ movdqa xmm2,xmm0
+ movdqa xmm10,xmm8
+DB 15,58,204,193,3
+DB 15,56,200,215
+DB 69,15,58,204,193,3
+DB 69,15,56,200,214
+
+ pshufd xmm11,xmm6,0x00
+ pshufd xmm12,xmm6,0x55
+ movdqa xmm7,xmm6
+ pcmpgtd xmm11,xmm4
+ pcmpgtd xmm12,xmm4
+
+ movdqa xmm1,xmm0
+ movdqa xmm9,xmm8
+DB 15,58,204,194,3
+DB 15,56,200,204
+DB 69,15,58,204,194,3
+DB 68,15,56,200,204
+
+ pcmpgtd xmm7,xmm4
+ pand xmm0,xmm11
+ pand xmm1,xmm11
+ pand xmm8,xmm12
+ pand xmm9,xmm12
+ paddd xmm6,xmm7
+
+ paddd xmm0,XMMWORD[64+rsp]
+ paddd xmm1,XMMWORD[80+rsp]
+ paddd xmm8,XMMWORD[96+rsp]
+ paddd xmm9,XMMWORD[112+rsp]
+
+ movq QWORD[rbx],xmm6
+ dec edx
+ jnz NEAR $L$oop_shaext
+
+ mov edx,DWORD[280+rsp]
+
+ pshufd xmm0,xmm0,27
+ pshufd xmm8,xmm8,27
+
+ movdqa xmm6,xmm0
+ punpckldq xmm0,xmm8
+ punpckhdq xmm6,xmm8
+ punpckhdq xmm1,xmm9
+ movq QWORD[(0-64)+rdi],xmm0
+ psrldq xmm0,8
+ movq QWORD[(64-64)+rdi],xmm6
+ psrldq xmm6,8
+ movq QWORD[(32-64)+rdi],xmm0
+ psrldq xmm1,8
+ movq QWORD[(96-64)+rdi],xmm6
+ movq QWORD[(128-64)+rdi],xmm1
+
+ lea rdi,[8+rdi]
+ lea rsi,[32+rsi]
+ dec edx
+ jnz NEAR $L$oop_grande_shaext
+
+$L$done_shaext:
+
+ movaps xmm6,XMMWORD[((-184))+rax]
+ movaps xmm7,XMMWORD[((-168))+rax]
+ movaps xmm8,XMMWORD[((-152))+rax]
+ movaps xmm9,XMMWORD[((-136))+rax]
+ movaps xmm10,XMMWORD[((-120))+rax]
+ movaps xmm11,XMMWORD[((-104))+rax]
+ movaps xmm12,XMMWORD[((-88))+rax]
+ movaps xmm13,XMMWORD[((-72))+rax]
+ movaps xmm14,XMMWORD[((-56))+rax]
+ movaps xmm15,XMMWORD[((-40))+rax]
+ mov rbp,QWORD[((-16))+rax]
+
+ mov rbx,QWORD[((-8))+rax]
+
+ lea rsp,[rax]
+
+$L$epilogue_shaext:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_sha1_multi_block_shaext:
+
+ALIGN 256
+ DD 0x5a827999,0x5a827999,0x5a827999,0x5a827999
+ DD 0x5a827999,0x5a827999,0x5a827999,0x5a827999
+K_XX_XX:
+ DD 0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1
+ DD 0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1
+ DD 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc
+ DD 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc
+ DD 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6
+ DD 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6
+ DD 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+ DD 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+DB 0xf,0xe,0xd,0xc,0xb,0xa,0x9,0x8,0x7,0x6,0x5,0x4,0x3,0x2,0x1,0x0
+DB 83,72,65,49,32,109,117,108,116,105,45,98,108,111,99,107
+DB 32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,120
+DB 56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77
+DB 83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110
+DB 115,115,108,46,111,114,103,62,0
+EXTERN __imp_RtlVirtualUnwind
+
+ALIGN 16
+se_handler:
+ push rsi
+ push rdi
+ push rbx
+ push rbp
+ push r12
+ push r13
+ push r14
+ push r15
+ pushfq
+ sub rsp,64
+
+ mov rax,QWORD[120+r8]
+ mov rbx,QWORD[248+r8]
+
+ mov rsi,QWORD[8+r9]
+ mov r11,QWORD[56+r9]
+
+ mov r10d,DWORD[r11]
+ lea r10,[r10*1+rsi]
+ cmp rbx,r10
+ jb NEAR $L$in_prologue
+
+ mov rax,QWORD[152+r8]
+
+ mov r10d,DWORD[4+r11]
+ lea r10,[r10*1+rsi]
+ cmp rbx,r10
+ jae NEAR $L$in_prologue
+
+ mov rax,QWORD[272+rax]
+
+ mov rbx,QWORD[((-8))+rax]
+ mov rbp,QWORD[((-16))+rax]
+ mov QWORD[144+r8],rbx
+ mov QWORD[160+r8],rbp
+
+ lea rsi,[((-24-160))+rax]
+ lea rdi,[512+r8]
+ mov ecx,20
+ DD 0xa548f3fc
+
+$L$in_prologue:
+ mov rdi,QWORD[8+rax]
+ mov rsi,QWORD[16+rax]
+ mov QWORD[152+r8],rax
+ mov QWORD[168+r8],rsi
+ mov QWORD[176+r8],rdi
+
+ mov rdi,QWORD[40+r9]
+ mov rsi,r8
+ mov ecx,154
+ DD 0xa548f3fc
+
+ mov rsi,r9
+ xor rcx,rcx
+ mov rdx,QWORD[8+rsi]
+ mov r8,QWORD[rsi]
+ mov r9,QWORD[16+rsi]
+ mov r10,QWORD[40+rsi]
+ lea r11,[56+rsi]
+ lea r12,[24+rsi]
+ mov QWORD[32+rsp],r10
+ mov QWORD[40+rsp],r11
+ mov QWORD[48+rsp],r12
+ mov QWORD[56+rsp],rcx
+ call QWORD[__imp_RtlVirtualUnwind]
+
+ mov eax,1
+ add rsp,64
+ popfq
+ pop r15
+ pop r14
+ pop r13
+ pop r12
+ pop rbp
+ pop rbx
+ pop rdi
+ pop rsi
+ DB 0F3h,0C3h ;repret
+
+section .pdata rdata align=4
+ALIGN 4
+ DD $L$SEH_begin_sha1_multi_block wrt ..imagebase
+ DD $L$SEH_end_sha1_multi_block wrt ..imagebase
+ DD $L$SEH_info_sha1_multi_block wrt ..imagebase
+ DD $L$SEH_begin_sha1_multi_block_shaext wrt ..imagebase
+ DD $L$SEH_end_sha1_multi_block_shaext wrt ..imagebase
+ DD $L$SEH_info_sha1_multi_block_shaext wrt ..imagebase
+section .xdata rdata align=8
+ALIGN 8
+$L$SEH_info_sha1_multi_block:
+DB 9,0,0,0
+ DD se_handler wrt ..imagebase
+ DD $L$body wrt ..imagebase,$L$epilogue wrt ..imagebase
+$L$SEH_info_sha1_multi_block_shaext:
+DB 9,0,0,0
+ DD se_handler wrt ..imagebase
+ DD $L$body_shaext wrt ..imagebase,$L$epilogue_shaext wrt ..imagebase
diff --git a/CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha1-x86_64.nasm b/CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha1-x86_64.nasm
new file mode 100644
index 0000000000..c6d68d348f
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha1-x86_64.nasm
@@ -0,0 +1,2884 @@
+; WARNING: do not edit!
+; Generated from openssl/crypto/sha/asm/sha1-x86_64.pl
+;
+; Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved.
+;
+; Licensed under the OpenSSL license (the "License"). You may not use
+; this file except in compliance with the License. You can obtain a copy
+; in the file LICENSE in the source distribution or at
+; https://www.openssl.org/source/license.html
+
+default rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section .text code align=64
+
+EXTERN OPENSSL_ia32cap_P
+
+global sha1_block_data_order
+
+ALIGN 16
+sha1_block_data_order:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_sha1_block_data_order:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+
+ mov r9d,DWORD[((OPENSSL_ia32cap_P+0))]
+ mov r8d,DWORD[((OPENSSL_ia32cap_P+4))]
+ mov r10d,DWORD[((OPENSSL_ia32cap_P+8))]
+ test r8d,512
+ jz NEAR $L$ialu
+ test r10d,536870912
+ jnz NEAR _shaext_shortcut
+ jmp NEAR _ssse3_shortcut
+
+ALIGN 16
+$L$ialu:
+ mov rax,rsp
+
+ push rbx
+
+ push rbp
+
+ push r12
+
+ push r13
+
+ push r14
+
+ mov r8,rdi
+ sub rsp,72
+ mov r9,rsi
+ and rsp,-64
+ mov r10,rdx
+ mov QWORD[64+rsp],rax
+
+$L$prologue:
+
+ mov esi,DWORD[r8]
+ mov edi,DWORD[4+r8]
+ mov r11d,DWORD[8+r8]
+ mov r12d,DWORD[12+r8]
+ mov r13d,DWORD[16+r8]
+ jmp NEAR $L$loop
+
+ALIGN 16
+$L$loop:
+ mov edx,DWORD[r9]
+ bswap edx
+ mov ebp,DWORD[4+r9]
+ mov eax,r12d
+ mov DWORD[rsp],edx
+ mov ecx,esi
+ bswap ebp
+ xor eax,r11d
+ rol ecx,5
+ and eax,edi
+ lea r13d,[1518500249+r13*1+rdx]
+ add r13d,ecx
+ xor eax,r12d
+ rol edi,30
+ add r13d,eax
+ mov r14d,DWORD[8+r9]
+ mov eax,r11d
+ mov DWORD[4+rsp],ebp
+ mov ecx,r13d
+ bswap r14d
+ xor eax,edi
+ rol ecx,5
+ and eax,esi
+ lea r12d,[1518500249+r12*1+rbp]
+ add r12d,ecx
+ xor eax,r11d
+ rol esi,30
+ add r12d,eax
+ mov edx,DWORD[12+r9]
+ mov eax,edi
+ mov DWORD[8+rsp],r14d
+ mov ecx,r12d
+ bswap edx
+ xor eax,esi
+ rol ecx,5
+ and eax,r13d
+ lea r11d,[1518500249+r11*1+r14]
+ add r11d,ecx
+ xor eax,edi
+ rol r13d,30
+ add r11d,eax
+ mov ebp,DWORD[16+r9]
+ mov eax,esi
+ mov DWORD[12+rsp],edx
+ mov ecx,r11d
+ bswap ebp
+ xor eax,r13d
+ rol ecx,5
+ and eax,r12d
+ lea edi,[1518500249+rdi*1+rdx]
+ add edi,ecx
+ xor eax,esi
+ rol r12d,30
+ add edi,eax
+ mov r14d,DWORD[20+r9]
+ mov eax,r13d
+ mov DWORD[16+rsp],ebp
+ mov ecx,edi
+ bswap r14d
+ xor eax,r12d
+ rol ecx,5
+ and eax,r11d
+ lea esi,[1518500249+rsi*1+rbp]
+ add esi,ecx
+ xor eax,r13d
+ rol r11d,30
+ add esi,eax
+ mov edx,DWORD[24+r9]
+ mov eax,r12d
+ mov DWORD[20+rsp],r14d
+ mov ecx,esi
+ bswap edx
+ xor eax,r11d
+ rol ecx,5
+ and eax,edi
+ lea r13d,[1518500249+r13*1+r14]
+ add r13d,ecx
+ xor eax,r12d
+ rol edi,30
+ add r13d,eax
+ mov ebp,DWORD[28+r9]
+ mov eax,r11d
+ mov DWORD[24+rsp],edx
+ mov ecx,r13d
+ bswap ebp
+ xor eax,edi
+ rol ecx,5
+ and eax,esi
+ lea r12d,[1518500249+r12*1+rdx]
+ add r12d,ecx
+ xor eax,r11d
+ rol esi,30
+ add r12d,eax
+ mov r14d,DWORD[32+r9]
+ mov eax,edi
+ mov DWORD[28+rsp],ebp
+ mov ecx,r12d
+ bswap r14d
+ xor eax,esi
+ rol ecx,5
+ and eax,r13d
+ lea r11d,[1518500249+r11*1+rbp]
+ add r11d,ecx
+ xor eax,edi
+ rol r13d,30
+ add r11d,eax
+ mov edx,DWORD[36+r9]
+ mov eax,esi
+ mov DWORD[32+rsp],r14d
+ mov ecx,r11d
+ bswap edx
+ xor eax,r13d
+ rol ecx,5
+ and eax,r12d
+ lea edi,[1518500249+rdi*1+r14]
+ add edi,ecx
+ xor eax,esi
+ rol r12d,30
+ add edi,eax
+ mov ebp,DWORD[40+r9]
+ mov eax,r13d
+ mov DWORD[36+rsp],edx
+ mov ecx,edi
+ bswap ebp
+ xor eax,r12d
+ rol ecx,5
+ and eax,r11d
+ lea esi,[1518500249+rsi*1+rdx]
+ add esi,ecx
+ xor eax,r13d
+ rol r11d,30
+ add esi,eax
+ mov r14d,DWORD[44+r9]
+ mov eax,r12d
+ mov DWORD[40+rsp],ebp
+ mov ecx,esi
+ bswap r14d
+ xor eax,r11d
+ rol ecx,5
+ and eax,edi
+ lea r13d,[1518500249+r13*1+rbp]
+ add r13d,ecx
+ xor eax,r12d
+ rol edi,30
+ add r13d,eax
+ mov edx,DWORD[48+r9]
+ mov eax,r11d
+ mov DWORD[44+rsp],r14d
+ mov ecx,r13d
+ bswap edx
+ xor eax,edi
+ rol ecx,5
+ and eax,esi
+ lea r12d,[1518500249+r12*1+r14]
+ add r12d,ecx
+ xor eax,r11d
+ rol esi,30
+ add r12d,eax
+ mov ebp,DWORD[52+r9]
+ mov eax,edi
+ mov DWORD[48+rsp],edx
+ mov ecx,r12d
+ bswap ebp
+ xor eax,esi
+ rol ecx,5
+ and eax,r13d
+ lea r11d,[1518500249+r11*1+rdx]
+ add r11d,ecx
+ xor eax,edi
+ rol r13d,30
+ add r11d,eax
+ mov r14d,DWORD[56+r9]
+ mov eax,esi
+ mov DWORD[52+rsp],ebp
+ mov ecx,r11d
+ bswap r14d
+ xor eax,r13d
+ rol ecx,5
+ and eax,r12d
+ lea edi,[1518500249+rdi*1+rbp]
+ add edi,ecx
+ xor eax,esi
+ rol r12d,30
+ add edi,eax
+ mov edx,DWORD[60+r9]
+ mov eax,r13d
+ mov DWORD[56+rsp],r14d
+ mov ecx,edi
+ bswap edx
+ xor eax,r12d
+ rol ecx,5
+ and eax,r11d
+ lea esi,[1518500249+rsi*1+r14]
+ add esi,ecx
+ xor eax,r13d
+ rol r11d,30
+ add esi,eax
+ xor ebp,DWORD[rsp]
+ mov eax,r12d
+ mov DWORD[60+rsp],edx
+ mov ecx,esi
+ xor ebp,DWORD[8+rsp]
+ xor eax,r11d
+ rol ecx,5
+ xor ebp,DWORD[32+rsp]
+ and eax,edi
+ lea r13d,[1518500249+r13*1+rdx]
+ rol edi,30
+ xor eax,r12d
+ add r13d,ecx
+ rol ebp,1
+ add r13d,eax
+ xor r14d,DWORD[4+rsp]
+ mov eax,r11d
+ mov DWORD[rsp],ebp
+ mov ecx,r13d
+ xor r14d,DWORD[12+rsp]
+ xor eax,edi
+ rol ecx,5
+ xor r14d,DWORD[36+rsp]
+ and eax,esi
+ lea r12d,[1518500249+r12*1+rbp]
+ rol esi,30
+ xor eax,r11d
+ add r12d,ecx
+ rol r14d,1
+ add r12d,eax
+ xor edx,DWORD[8+rsp]
+ mov eax,edi
+ mov DWORD[4+rsp],r14d
+ mov ecx,r12d
+ xor edx,DWORD[16+rsp]
+ xor eax,esi
+ rol ecx,5
+ xor edx,DWORD[40+rsp]
+ and eax,r13d
+ lea r11d,[1518500249+r11*1+r14]
+ rol r13d,30
+ xor eax,edi
+ add r11d,ecx
+ rol edx,1
+ add r11d,eax
+ xor ebp,DWORD[12+rsp]
+ mov eax,esi
+ mov DWORD[8+rsp],edx
+ mov ecx,r11d
+ xor ebp,DWORD[20+rsp]
+ xor eax,r13d
+ rol ecx,5
+ xor ebp,DWORD[44+rsp]
+ and eax,r12d
+ lea edi,[1518500249+rdi*1+rdx]
+ rol r12d,30
+ xor eax,esi
+ add edi,ecx
+ rol ebp,1
+ add edi,eax
+ xor r14d,DWORD[16+rsp]
+ mov eax,r13d
+ mov DWORD[12+rsp],ebp
+ mov ecx,edi
+ xor r14d,DWORD[24+rsp]
+ xor eax,r12d
+ rol ecx,5
+ xor r14d,DWORD[48+rsp]
+ and eax,r11d
+ lea esi,[1518500249+rsi*1+rbp]
+ rol r11d,30
+ xor eax,r13d
+ add esi,ecx
+ rol r14d,1
+ add esi,eax
+ xor edx,DWORD[20+rsp]
+ mov eax,edi
+ mov DWORD[16+rsp],r14d
+ mov ecx,esi
+ xor edx,DWORD[28+rsp]
+ xor eax,r12d
+ rol ecx,5
+ xor edx,DWORD[52+rsp]
+ lea r13d,[1859775393+r13*1+r14]
+ xor eax,r11d
+ add r13d,ecx
+ rol edi,30
+ add r13d,eax
+ rol edx,1
+ xor ebp,DWORD[24+rsp]
+ mov eax,esi
+ mov DWORD[20+rsp],edx
+ mov ecx,r13d
+ xor ebp,DWORD[32+rsp]
+ xor eax,r11d
+ rol ecx,5
+ xor ebp,DWORD[56+rsp]
+ lea r12d,[1859775393+r12*1+rdx]
+ xor eax,edi
+ add r12d,ecx
+ rol esi,30
+ add r12d,eax
+ rol ebp,1
+ xor r14d,DWORD[28+rsp]
+ mov eax,r13d
+ mov DWORD[24+rsp],ebp
+ mov ecx,r12d
+ xor r14d,DWORD[36+rsp]
+ xor eax,edi
+ rol ecx,5
+ xor r14d,DWORD[60+rsp]
+ lea r11d,[1859775393+r11*1+rbp]
+ xor eax,esi
+ add r11d,ecx
+ rol r13d,30
+ add r11d,eax
+ rol r14d,1
+ xor edx,DWORD[32+rsp]
+ mov eax,r12d
+ mov DWORD[28+rsp],r14d
+ mov ecx,r11d
+ xor edx,DWORD[40+rsp]
+ xor eax,esi
+ rol ecx,5
+ xor edx,DWORD[rsp]
+ lea edi,[1859775393+rdi*1+r14]
+ xor eax,r13d
+ add edi,ecx
+ rol r12d,30
+ add edi,eax
+ rol edx,1
+ xor ebp,DWORD[36+rsp]
+ mov eax,r11d
+ mov DWORD[32+rsp],edx
+ mov ecx,edi
+ xor ebp,DWORD[44+rsp]
+ xor eax,r13d
+ rol ecx,5
+ xor ebp,DWORD[4+rsp]
+ lea esi,[1859775393+rsi*1+rdx]
+ xor eax,r12d
+ add esi,ecx
+ rol r11d,30
+ add esi,eax
+ rol ebp,1
+ xor r14d,DWORD[40+rsp]
+ mov eax,edi
+ mov DWORD[36+rsp],ebp
+ mov ecx,esi
+ xor r14d,DWORD[48+rsp]
+ xor eax,r12d
+ rol ecx,5
+ xor r14d,DWORD[8+rsp]
+ lea r13d,[1859775393+r13*1+rbp]
+ xor eax,r11d
+ add r13d,ecx
+ rol edi,30
+ add r13d,eax
+ rol r14d,1
+ xor edx,DWORD[44+rsp]
+ mov eax,esi
+ mov DWORD[40+rsp],r14d
+ mov ecx,r13d
+ xor edx,DWORD[52+rsp]
+ xor eax,r11d
+ rol ecx,5
+ xor edx,DWORD[12+rsp]
+ lea r12d,[1859775393+r12*1+r14]
+ xor eax,edi
+ add r12d,ecx
+ rol esi,30
+ add r12d,eax
+ rol edx,1
+ xor ebp,DWORD[48+rsp]
+ mov eax,r13d
+ mov DWORD[44+rsp],edx
+ mov ecx,r12d
+ xor ebp,DWORD[56+rsp]
+ xor eax,edi
+ rol ecx,5
+ xor ebp,DWORD[16+rsp]
+ lea r11d,[1859775393+r11*1+rdx]
+ xor eax,esi
+ add r11d,ecx
+ rol r13d,30
+ add r11d,eax
+ rol ebp,1
+ xor r14d,DWORD[52+rsp]
+ mov eax,r12d
+ mov DWORD[48+rsp],ebp
+ mov ecx,r11d
+ xor r14d,DWORD[60+rsp]
+ xor eax,esi
+ rol ecx,5
+ xor r14d,DWORD[20+rsp]
+ lea edi,[1859775393+rdi*1+rbp]
+ xor eax,r13d
+ add edi,ecx
+ rol r12d,30
+ add edi,eax
+ rol r14d,1
+ xor edx,DWORD[56+rsp]
+ mov eax,r11d
+ mov DWORD[52+rsp],r14d
+ mov ecx,edi
+ xor edx,DWORD[rsp]
+ xor eax,r13d
+ rol ecx,5
+ xor edx,DWORD[24+rsp]
+ lea esi,[1859775393+rsi*1+r14]
+ xor eax,r12d
+ add esi,ecx
+ rol r11d,30
+ add esi,eax
+ rol edx,1
+ xor ebp,DWORD[60+rsp]
+ mov eax,edi
+ mov DWORD[56+rsp],edx
+ mov ecx,esi
+ xor ebp,DWORD[4+rsp]
+ xor eax,r12d
+ rol ecx,5
+ xor ebp,DWORD[28+rsp]
+ lea r13d,[1859775393+r13*1+rdx]
+ xor eax,r11d
+ add r13d,ecx
+ rol edi,30
+ add r13d,eax
+ rol ebp,1
+ xor r14d,DWORD[rsp]
+ mov eax,esi
+ mov DWORD[60+rsp],ebp
+ mov ecx,r13d
+ xor r14d,DWORD[8+rsp]
+ xor eax,r11d
+ rol ecx,5
+ xor r14d,DWORD[32+rsp]
+ lea r12d,[1859775393+r12*1+rbp]
+ xor eax,edi
+ add r12d,ecx
+ rol esi,30
+ add r12d,eax
+ rol r14d,1
+ xor edx,DWORD[4+rsp]
+ mov eax,r13d
+ mov DWORD[rsp],r14d
+ mov ecx,r12d
+ xor edx,DWORD[12+rsp]
+ xor eax,edi
+ rol ecx,5
+ xor edx,DWORD[36+rsp]
+ lea r11d,[1859775393+r11*1+r14]
+ xor eax,esi
+ add r11d,ecx
+ rol r13d,30
+ add r11d,eax
+ rol edx,1
+ xor ebp,DWORD[8+rsp]
+ mov eax,r12d
+ mov DWORD[4+rsp],edx
+ mov ecx,r11d
+ xor ebp,DWORD[16+rsp]
+ xor eax,esi
+ rol ecx,5
+ xor ebp,DWORD[40+rsp]
+ lea edi,[1859775393+rdi*1+rdx]
+ xor eax,r13d
+ add edi,ecx
+ rol r12d,30
+ add edi,eax
+ rol ebp,1
+ xor r14d,DWORD[12+rsp]
+ mov eax,r11d
+ mov DWORD[8+rsp],ebp
+ mov ecx,edi
+ xor r14d,DWORD[20+rsp]
+ xor eax,r13d
+ rol ecx,5
+ xor r14d,DWORD[44+rsp]
+ lea esi,[1859775393+rsi*1+rbp]
+ xor eax,r12d
+ add esi,ecx
+ rol r11d,30
+ add esi,eax
+ rol r14d,1
+ xor edx,DWORD[16+rsp]
+ mov eax,edi
+ mov DWORD[12+rsp],r14d
+ mov ecx,esi
+ xor edx,DWORD[24+rsp]
+ xor eax,r12d
+ rol ecx,5
+ xor edx,DWORD[48+rsp]
+ lea r13d,[1859775393+r13*1+r14]
+ xor eax,r11d
+ add r13d,ecx
+ rol edi,30
+ add r13d,eax
+ rol edx,1
+ xor ebp,DWORD[20+rsp]
+ mov eax,esi
+ mov DWORD[16+rsp],edx
+ mov ecx,r13d
+ xor ebp,DWORD[28+rsp]
+ xor eax,r11d
+ rol ecx,5
+ xor ebp,DWORD[52+rsp]
+ lea r12d,[1859775393+r12*1+rdx]
+ xor eax,edi
+ add r12d,ecx
+ rol esi,30
+ add r12d,eax
+ rol ebp,1
+ xor r14d,DWORD[24+rsp]
+ mov eax,r13d
+ mov DWORD[20+rsp],ebp
+ mov ecx,r12d
+ xor r14d,DWORD[32+rsp]
+ xor eax,edi
+ rol ecx,5
+ xor r14d,DWORD[56+rsp]
+ lea r11d,[1859775393+r11*1+rbp]
+ xor eax,esi
+ add r11d,ecx
+ rol r13d,30
+ add r11d,eax
+ rol r14d,1
+ xor edx,DWORD[28+rsp]
+ mov eax,r12d
+ mov DWORD[24+rsp],r14d
+ mov ecx,r11d
+ xor edx,DWORD[36+rsp]
+ xor eax,esi
+ rol ecx,5
+ xor edx,DWORD[60+rsp]
+ lea edi,[1859775393+rdi*1+r14]
+ xor eax,r13d
+ add edi,ecx
+ rol r12d,30
+ add edi,eax
+ rol edx,1
+ xor ebp,DWORD[32+rsp]
+ mov eax,r11d
+ mov DWORD[28+rsp],edx
+ mov ecx,edi
+ xor ebp,DWORD[40+rsp]
+ xor eax,r13d
+ rol ecx,5
+ xor ebp,DWORD[rsp]
+ lea esi,[1859775393+rsi*1+rdx]
+ xor eax,r12d
+ add esi,ecx
+ rol r11d,30
+ add esi,eax
+ rol ebp,1
+ xor r14d,DWORD[36+rsp]
+ mov eax,r12d
+ mov DWORD[32+rsp],ebp
+ mov ebx,r12d
+ xor r14d,DWORD[44+rsp]
+ and eax,r11d
+ mov ecx,esi
+ xor r14d,DWORD[4+rsp]
+ lea r13d,[((-1894007588))+r13*1+rbp]
+ xor ebx,r11d
+ rol ecx,5
+ add r13d,eax
+ rol r14d,1
+ and ebx,edi
+ add r13d,ecx
+ rol edi,30
+ add r13d,ebx
+ xor edx,DWORD[40+rsp]
+ mov eax,r11d
+ mov DWORD[36+rsp],r14d
+ mov ebx,r11d
+ xor edx,DWORD[48+rsp]
+ and eax,edi
+ mov ecx,r13d
+ xor edx,DWORD[8+rsp]
+ lea r12d,[((-1894007588))+r12*1+r14]
+ xor ebx,edi
+ rol ecx,5
+ add r12d,eax
+ rol edx,1
+ and ebx,esi
+ add r12d,ecx
+ rol esi,30
+ add r12d,ebx
+ xor ebp,DWORD[44+rsp]
+ mov eax,edi
+ mov DWORD[40+rsp],edx
+ mov ebx,edi
+ xor ebp,DWORD[52+rsp]
+ and eax,esi
+ mov ecx,r12d
+ xor ebp,DWORD[12+rsp]
+ lea r11d,[((-1894007588))+r11*1+rdx]
+ xor ebx,esi
+ rol ecx,5
+ add r11d,eax
+ rol ebp,1
+ and ebx,r13d
+ add r11d,ecx
+ rol r13d,30
+ add r11d,ebx
+ xor r14d,DWORD[48+rsp]
+ mov eax,esi
+ mov DWORD[44+rsp],ebp
+ mov ebx,esi
+ xor r14d,DWORD[56+rsp]
+ and eax,r13d
+ mov ecx,r11d
+ xor r14d,DWORD[16+rsp]
+ lea edi,[((-1894007588))+rdi*1+rbp]
+ xor ebx,r13d
+ rol ecx,5
+ add edi,eax
+ rol r14d,1
+ and ebx,r12d
+ add edi,ecx
+ rol r12d,30
+ add edi,ebx
+ xor edx,DWORD[52+rsp]
+ mov eax,r13d
+ mov DWORD[48+rsp],r14d
+ mov ebx,r13d
+ xor edx,DWORD[60+rsp]
+ and eax,r12d
+ mov ecx,edi
+ xor edx,DWORD[20+rsp]
+ lea esi,[((-1894007588))+rsi*1+r14]
+ xor ebx,r12d
+ rol ecx,5
+ add esi,eax
+ rol edx,1
+ and ebx,r11d
+ add esi,ecx
+ rol r11d,30
+ add esi,ebx
+ xor ebp,DWORD[56+rsp]
+ mov eax,r12d
+ mov DWORD[52+rsp],edx
+ mov ebx,r12d
+ xor ebp,DWORD[rsp]
+ and eax,r11d
+ mov ecx,esi
+ xor ebp,DWORD[24+rsp]
+ lea r13d,[((-1894007588))+r13*1+rdx]
+ xor ebx,r11d
+ rol ecx,5
+ add r13d,eax
+ rol ebp,1
+ and ebx,edi
+ add r13d,ecx
+ rol edi,30
+ add r13d,ebx
+ xor r14d,DWORD[60+rsp]
+ mov eax,r11d
+ mov DWORD[56+rsp],ebp
+ mov ebx,r11d
+ xor r14d,DWORD[4+rsp]
+ and eax,edi
+ mov ecx,r13d
+ xor r14d,DWORD[28+rsp]
+ lea r12d,[((-1894007588))+r12*1+rbp]
+ xor ebx,edi
+ rol ecx,5
+ add r12d,eax
+ rol r14d,1
+ and ebx,esi
+ add r12d,ecx
+ rol esi,30
+ add r12d,ebx
+ xor edx,DWORD[rsp]
+ mov eax,edi
+ mov DWORD[60+rsp],r14d
+ mov ebx,edi
+ xor edx,DWORD[8+rsp]
+ and eax,esi
+ mov ecx,r12d
+ xor edx,DWORD[32+rsp]
+ lea r11d,[((-1894007588))+r11*1+r14]
+ xor ebx,esi
+ rol ecx,5
+ add r11d,eax
+ rol edx,1
+ and ebx,r13d
+ add r11d,ecx
+ rol r13d,30
+ add r11d,ebx
+ xor ebp,DWORD[4+rsp]
+ mov eax,esi
+ mov DWORD[rsp],edx
+ mov ebx,esi
+ xor ebp,DWORD[12+rsp]
+ and eax,r13d
+ mov ecx,r11d
+ xor ebp,DWORD[36+rsp]
+ lea edi,[((-1894007588))+rdi*1+rdx]
+ xor ebx,r13d
+ rol ecx,5
+ add edi,eax
+ rol ebp,1
+ and ebx,r12d
+ add edi,ecx
+ rol r12d,30
+ add edi,ebx
+ xor r14d,DWORD[8+rsp]
+ mov eax,r13d
+ mov DWORD[4+rsp],ebp
+ mov ebx,r13d
+ xor r14d,DWORD[16+rsp]
+ and eax,r12d
+ mov ecx,edi
+ xor r14d,DWORD[40+rsp]
+ lea esi,[((-1894007588))+rsi*1+rbp]
+ xor ebx,r12d
+ rol ecx,5
+ add esi,eax
+ rol r14d,1
+ and ebx,r11d
+ add esi,ecx
+ rol r11d,30
+ add esi,ebx
+ xor edx,DWORD[12+rsp]
+ mov eax,r12d
+ mov DWORD[8+rsp],r14d
+ mov ebx,r12d
+ xor edx,DWORD[20+rsp]
+ and eax,r11d
+ mov ecx,esi
+ xor edx,DWORD[44+rsp]
+ lea r13d,[((-1894007588))+r13*1+r14]
+ xor ebx,r11d
+ rol ecx,5
+ add r13d,eax
+ rol edx,1
+ and ebx,edi
+ add r13d,ecx
+ rol edi,30
+ add r13d,ebx
+ xor ebp,DWORD[16+rsp]
+ mov eax,r11d
+ mov DWORD[12+rsp],edx
+ mov ebx,r11d
+ xor ebp,DWORD[24+rsp]
+ and eax,edi
+ mov ecx,r13d
+ xor ebp,DWORD[48+rsp]
+ lea r12d,[((-1894007588))+r12*1+rdx]
+ xor ebx,edi
+ rol ecx,5
+ add r12d,eax
+ rol ebp,1
+ and ebx,esi
+ add r12d,ecx
+ rol esi,30
+ add r12d,ebx
+ xor r14d,DWORD[20+rsp]
+ mov eax,edi
+ mov DWORD[16+rsp],ebp
+ mov ebx,edi
+ xor r14d,DWORD[28+rsp]
+ and eax,esi
+ mov ecx,r12d
+ xor r14d,DWORD[52+rsp]
+ lea r11d,[((-1894007588))+r11*1+rbp]
+ xor ebx,esi
+ rol ecx,5
+ add r11d,eax
+ rol r14d,1
+ and ebx,r13d
+ add r11d,ecx
+ rol r13d,30
+ add r11d,ebx
+ xor edx,DWORD[24+rsp]
+ mov eax,esi
+ mov DWORD[20+rsp],r14d
+ mov ebx,esi
+ xor edx,DWORD[32+rsp]
+ and eax,r13d
+ mov ecx,r11d
+ xor edx,DWORD[56+rsp]
+ lea edi,[((-1894007588))+rdi*1+r14]
+ xor ebx,r13d
+ rol ecx,5
+ add edi,eax
+ rol edx,1
+ and ebx,r12d
+ add edi,ecx
+ rol r12d,30
+ add edi,ebx
+ xor ebp,DWORD[28+rsp]
+ mov eax,r13d
+ mov DWORD[24+rsp],edx
+ mov ebx,r13d
+ xor ebp,DWORD[36+rsp]
+ and eax,r12d
+ mov ecx,edi
+ xor ebp,DWORD[60+rsp]
+ lea esi,[((-1894007588))+rsi*1+rdx]
+ xor ebx,r12d
+ rol ecx,5
+ add esi,eax
+ rol ebp,1
+ and ebx,r11d
+ add esi,ecx
+ rol r11d,30
+ add esi,ebx
+ xor r14d,DWORD[32+rsp]
+ mov eax,r12d
+ mov DWORD[28+rsp],ebp
+ mov ebx,r12d
+ xor r14d,DWORD[40+rsp]
+ and eax,r11d
+ mov ecx,esi
+ xor r14d,DWORD[rsp]
+ lea r13d,[((-1894007588))+r13*1+rbp]
+ xor ebx,r11d
+ rol ecx,5
+ add r13d,eax
+ rol r14d,1
+ and ebx,edi
+ add r13d,ecx
+ rol edi,30
+ add r13d,ebx
+ xor edx,DWORD[36+rsp]
+ mov eax,r11d
+ mov DWORD[32+rsp],r14d
+ mov ebx,r11d
+ xor edx,DWORD[44+rsp]
+ and eax,edi
+ mov ecx,r13d
+ xor edx,DWORD[4+rsp]
+ lea r12d,[((-1894007588))+r12*1+r14]
+ xor ebx,edi
+ rol ecx,5
+ add r12d,eax
+ rol edx,1
+ and ebx,esi
+ add r12d,ecx
+ rol esi,30
+ add r12d,ebx
+ xor ebp,DWORD[40+rsp]
+ mov eax,edi
+ mov DWORD[36+rsp],edx
+ mov ebx,edi
+ xor ebp,DWORD[48+rsp]
+ and eax,esi
+ mov ecx,r12d
+ xor ebp,DWORD[8+rsp]
+ lea r11d,[((-1894007588))+r11*1+rdx]
+ xor ebx,esi
+ rol ecx,5
+ add r11d,eax
+ rol ebp,1
+ and ebx,r13d
+ add r11d,ecx
+ rol r13d,30
+ add r11d,ebx
+ xor r14d,DWORD[44+rsp]
+ mov eax,esi
+ mov DWORD[40+rsp],ebp
+ mov ebx,esi
+ xor r14d,DWORD[52+rsp]
+ and eax,r13d
+ mov ecx,r11d
+ xor r14d,DWORD[12+rsp]
+ lea edi,[((-1894007588))+rdi*1+rbp]
+ xor ebx,r13d
+ rol ecx,5
+ add edi,eax
+ rol r14d,1
+ and ebx,r12d
+ add edi,ecx
+ rol r12d,30
+ add edi,ebx
+ xor edx,DWORD[48+rsp]
+ mov eax,r13d
+ mov DWORD[44+rsp],r14d
+ mov ebx,r13d
+ xor edx,DWORD[56+rsp]
+ and eax,r12d
+ mov ecx,edi
+ xor edx,DWORD[16+rsp]
+ lea esi,[((-1894007588))+rsi*1+r14]
+ xor ebx,r12d
+ rol ecx,5
+ add esi,eax
+ rol edx,1
+ and ebx,r11d
+ add esi,ecx
+ rol r11d,30
+ add esi,ebx
+ xor ebp,DWORD[52+rsp]
+ mov eax,edi
+ mov DWORD[48+rsp],edx
+ mov ecx,esi
+ xor ebp,DWORD[60+rsp]
+ xor eax,r12d
+ rol ecx,5
+ xor ebp,DWORD[20+rsp]
+ lea r13d,[((-899497514))+r13*1+rdx]
+ xor eax,r11d
+ add r13d,ecx
+ rol edi,30
+ add r13d,eax
+ rol ebp,1
+ xor r14d,DWORD[56+rsp]
+ mov eax,esi
+ mov DWORD[52+rsp],ebp
+ mov ecx,r13d
+ xor r14d,DWORD[rsp]
+ xor eax,r11d
+ rol ecx,5
+ xor r14d,DWORD[24+rsp]
+ lea r12d,[((-899497514))+r12*1+rbp]
+ xor eax,edi
+ add r12d,ecx
+ rol esi,30
+ add r12d,eax
+ rol r14d,1
+ xor edx,DWORD[60+rsp]
+ mov eax,r13d
+ mov DWORD[56+rsp],r14d
+ mov ecx,r12d
+ xor edx,DWORD[4+rsp]
+ xor eax,edi
+ rol ecx,5
+ xor edx,DWORD[28+rsp]
+ lea r11d,[((-899497514))+r11*1+r14]
+ xor eax,esi
+ add r11d,ecx
+ rol r13d,30
+ add r11d,eax
+ rol edx,1
+ xor ebp,DWORD[rsp]
+ mov eax,r12d
+ mov DWORD[60+rsp],edx
+ mov ecx,r11d
+ xor ebp,DWORD[8+rsp]
+ xor eax,esi
+ rol ecx,5
+ xor ebp,DWORD[32+rsp]
+ lea edi,[((-899497514))+rdi*1+rdx]
+ xor eax,r13d
+ add edi,ecx
+ rol r12d,30
+ add edi,eax
+ rol ebp,1
+ xor r14d,DWORD[4+rsp]
+ mov eax,r11d
+ mov DWORD[rsp],ebp
+ mov ecx,edi
+ xor r14d,DWORD[12+rsp]
+ xor eax,r13d
+ rol ecx,5
+ xor r14d,DWORD[36+rsp]
+ lea esi,[((-899497514))+rsi*1+rbp]
+ xor eax,r12d
+ add esi,ecx
+ rol r11d,30
+ add esi,eax
+ rol r14d,1
+ xor edx,DWORD[8+rsp]
+ mov eax,edi
+ mov DWORD[4+rsp],r14d
+ mov ecx,esi
+ xor edx,DWORD[16+rsp]
+ xor eax,r12d
+ rol ecx,5
+ xor edx,DWORD[40+rsp]
+ lea r13d,[((-899497514))+r13*1+r14]
+ xor eax,r11d
+ add r13d,ecx
+ rol edi,30
+ add r13d,eax
+ rol edx,1
+ xor ebp,DWORD[12+rsp]
+ mov eax,esi
+ mov DWORD[8+rsp],edx
+ mov ecx,r13d
+ xor ebp,DWORD[20+rsp]
+ xor eax,r11d
+ rol ecx,5
+ xor ebp,DWORD[44+rsp]
+ lea r12d,[((-899497514))+r12*1+rdx]
+ xor eax,edi
+ add r12d,ecx
+ rol esi,30
+ add r12d,eax
+ rol ebp,1
+ xor r14d,DWORD[16+rsp]
+ mov eax,r13d
+ mov DWORD[12+rsp],ebp
+ mov ecx,r12d
+ xor r14d,DWORD[24+rsp]
+ xor eax,edi
+ rol ecx,5
+ xor r14d,DWORD[48+rsp]
+ lea r11d,[((-899497514))+r11*1+rbp]
+ xor eax,esi
+ add r11d,ecx
+ rol r13d,30
+ add r11d,eax
+ rol r14d,1
+ xor edx,DWORD[20+rsp]
+ mov eax,r12d
+ mov DWORD[16+rsp],r14d
+ mov ecx,r11d
+ xor edx,DWORD[28+rsp]
+ xor eax,esi
+ rol ecx,5
+ xor edx,DWORD[52+rsp]
+ lea edi,[((-899497514))+rdi*1+r14]
+ xor eax,r13d
+ add edi,ecx
+ rol r12d,30
+ add edi,eax
+ rol edx,1
+ xor ebp,DWORD[24+rsp]
+ mov eax,r11d
+ mov DWORD[20+rsp],edx
+ mov ecx,edi
+ xor ebp,DWORD[32+rsp]
+ xor eax,r13d
+ rol ecx,5
+ xor ebp,DWORD[56+rsp]
+ lea esi,[((-899497514))+rsi*1+rdx]
+ xor eax,r12d
+ add esi,ecx
+ rol r11d,30
+ add esi,eax
+ rol ebp,1
+ xor r14d,DWORD[28+rsp]
+ mov eax,edi
+ mov DWORD[24+rsp],ebp
+ mov ecx,esi
+ xor r14d,DWORD[36+rsp]
+ xor eax,r12d
+ rol ecx,5
+ xor r14d,DWORD[60+rsp]
+ lea r13d,[((-899497514))+r13*1+rbp]
+ xor eax,r11d
+ add r13d,ecx
+ rol edi,30
+ add r13d,eax
+ rol r14d,1
+ xor edx,DWORD[32+rsp]
+ mov eax,esi
+ mov DWORD[28+rsp],r14d
+ mov ecx,r13d
+ xor edx,DWORD[40+rsp]
+ xor eax,r11d
+ rol ecx,5
+ xor edx,DWORD[rsp]
+ lea r12d,[((-899497514))+r12*1+r14]
+ xor eax,edi
+ add r12d,ecx
+ rol esi,30
+ add r12d,eax
+ rol edx,1
+ xor ebp,DWORD[36+rsp]
+ mov eax,r13d
+
+ mov ecx,r12d
+ xor ebp,DWORD[44+rsp]
+ xor eax,edi
+ rol ecx,5
+ xor ebp,DWORD[4+rsp]
+ lea r11d,[((-899497514))+r11*1+rdx]
+ xor eax,esi
+ add r11d,ecx
+ rol r13d,30
+ add r11d,eax
+ rol ebp,1
+ xor r14d,DWORD[40+rsp]
+ mov eax,r12d
+
+ mov ecx,r11d
+ xor r14d,DWORD[48+rsp]
+ xor eax,esi
+ rol ecx,5
+ xor r14d,DWORD[8+rsp]
+ lea edi,[((-899497514))+rdi*1+rbp]
+ xor eax,r13d
+ add edi,ecx
+ rol r12d,30
+ add edi,eax
+ rol r14d,1
+ xor edx,DWORD[44+rsp]
+ mov eax,r11d
+
+ mov ecx,edi
+ xor edx,DWORD[52+rsp]
+ xor eax,r13d
+ rol ecx,5
+ xor edx,DWORD[12+rsp]
+ lea esi,[((-899497514))+rsi*1+r14]
+ xor eax,r12d
+ add esi,ecx
+ rol r11d,30
+ add esi,eax
+ rol edx,1
+ xor ebp,DWORD[48+rsp]
+ mov eax,edi
+
+ mov ecx,esi
+ xor ebp,DWORD[56+rsp]
+ xor eax,r12d
+ rol ecx,5
+ xor ebp,DWORD[16+rsp]
+ lea r13d,[((-899497514))+r13*1+rdx]
+ xor eax,r11d
+ add r13d,ecx
+ rol edi,30
+ add r13d,eax
+ rol ebp,1
+ xor r14d,DWORD[52+rsp]
+ mov eax,esi
+
+ mov ecx,r13d
+ xor r14d,DWORD[60+rsp]
+ xor eax,r11d
+ rol ecx,5
+ xor r14d,DWORD[20+rsp]
+ lea r12d,[((-899497514))+r12*1+rbp]
+ xor eax,edi
+ add r12d,ecx
+ rol esi,30
+ add r12d,eax
+ rol r14d,1
+ xor edx,DWORD[56+rsp]
+ mov eax,r13d
+
+ mov ecx,r12d
+ xor edx,DWORD[rsp]
+ xor eax,edi
+ rol ecx,5
+ xor edx,DWORD[24+rsp]
+ lea r11d,[((-899497514))+r11*1+r14]
+ xor eax,esi
+ add r11d,ecx
+ rol r13d,30
+ add r11d,eax
+ rol edx,1
+ xor ebp,DWORD[60+rsp]
+ mov eax,r12d
+
+ mov ecx,r11d
+ xor ebp,DWORD[4+rsp]
+ xor eax,esi
+ rol ecx,5
+ xor ebp,DWORD[28+rsp]
+ lea edi,[((-899497514))+rdi*1+rdx]
+ xor eax,r13d
+ add edi,ecx
+ rol r12d,30
+ add edi,eax
+ rol ebp,1
+ mov eax,r11d
+ mov ecx,edi
+ xor eax,r13d
+ lea esi,[((-899497514))+rsi*1+rbp]
+ rol ecx,5
+ xor eax,r12d
+ add esi,ecx
+ rol r11d,30
+ add esi,eax
+ add esi,DWORD[r8]
+ add edi,DWORD[4+r8]
+ add r11d,DWORD[8+r8]
+ add r12d,DWORD[12+r8]
+ add r13d,DWORD[16+r8]
+ mov DWORD[r8],esi
+ mov DWORD[4+r8],edi
+ mov DWORD[8+r8],r11d
+ mov DWORD[12+r8],r12d
+ mov DWORD[16+r8],r13d
+
+ sub r10,1
+ lea r9,[64+r9]
+ jnz NEAR $L$loop
+
+ mov rsi,QWORD[64+rsp]
+
+ mov r14,QWORD[((-40))+rsi]
+
+ mov r13,QWORD[((-32))+rsi]
+
+ mov r12,QWORD[((-24))+rsi]
+
+ mov rbp,QWORD[((-16))+rsi]
+
+ mov rbx,QWORD[((-8))+rsi]
+
+ lea rsp,[rsi]
+
+$L$epilogue:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_sha1_block_data_order:
+
+ALIGN 32
+sha1_block_data_order_shaext:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_sha1_block_data_order_shaext:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+_shaext_shortcut:
+
+ lea rsp,[((-72))+rsp]
+ movaps XMMWORD[(-8-64)+rax],xmm6
+ movaps XMMWORD[(-8-48)+rax],xmm7
+ movaps XMMWORD[(-8-32)+rax],xmm8
+ movaps XMMWORD[(-8-16)+rax],xmm9
+$L$prologue_shaext:
+ movdqu xmm0,XMMWORD[rdi]
+ movd xmm1,DWORD[16+rdi]
+ movdqa xmm3,XMMWORD[((K_XX_XX+160))]
+
+ movdqu xmm4,XMMWORD[rsi]
+ pshufd xmm0,xmm0,27
+ movdqu xmm5,XMMWORD[16+rsi]
+ pshufd xmm1,xmm1,27
+ movdqu xmm6,XMMWORD[32+rsi]
+DB 102,15,56,0,227
+ movdqu xmm7,XMMWORD[48+rsi]
+DB 102,15,56,0,235
+DB 102,15,56,0,243
+ movdqa xmm9,xmm1
+DB 102,15,56,0,251
+ jmp NEAR $L$oop_shaext
+
+ALIGN 16
+$L$oop_shaext:
+ dec rdx
+ lea r8,[64+rsi]
+ paddd xmm1,xmm4
+ cmovne rsi,r8
+ movdqa xmm8,xmm0
+DB 15,56,201,229
+ movdqa xmm2,xmm0
+DB 15,58,204,193,0
+DB 15,56,200,213
+ pxor xmm4,xmm6
+DB 15,56,201,238
+DB 15,56,202,231
+
+ movdqa xmm1,xmm0
+DB 15,58,204,194,0
+DB 15,56,200,206
+ pxor xmm5,xmm7
+DB 15,56,202,236
+DB 15,56,201,247
+ movdqa xmm2,xmm0
+DB 15,58,204,193,0
+DB 15,56,200,215
+ pxor xmm6,xmm4
+DB 15,56,201,252
+DB 15,56,202,245
+
+ movdqa xmm1,xmm0
+DB 15,58,204,194,0
+DB 15,56,200,204
+ pxor xmm7,xmm5
+DB 15,56,202,254
+DB 15,56,201,229
+ movdqa xmm2,xmm0
+DB 15,58,204,193,0
+DB 15,56,200,213
+ pxor xmm4,xmm6
+DB 15,56,201,238
+DB 15,56,202,231
+
+ movdqa xmm1,xmm0
+DB 15,58,204,194,1
+DB 15,56,200,206
+ pxor xmm5,xmm7
+DB 15,56,202,236
+DB 15,56,201,247
+ movdqa xmm2,xmm0
+DB 15,58,204,193,1
+DB 15,56,200,215
+ pxor xmm6,xmm4
+DB 15,56,201,252
+DB 15,56,202,245
+
+ movdqa xmm1,xmm0
+DB 15,58,204,194,1
+DB 15,56,200,204
+ pxor xmm7,xmm5
+DB 15,56,202,254
+DB 15,56,201,229
+ movdqa xmm2,xmm0
+DB 15,58,204,193,1
+DB 15,56,200,213
+ pxor xmm4,xmm6
+DB 15,56,201,238
+DB 15,56,202,231
+
+ movdqa xmm1,xmm0
+DB 15,58,204,194,1
+DB 15,56,200,206
+ pxor xmm5,xmm7
+DB 15,56,202,236
+DB 15,56,201,247
+ movdqa xmm2,xmm0
+DB 15,58,204,193,2
+DB 15,56,200,215
+ pxor xmm6,xmm4
+DB 15,56,201,252
+DB 15,56,202,245
+
+ movdqa xmm1,xmm0
+DB 15,58,204,194,2
+DB 15,56,200,204
+ pxor xmm7,xmm5
+DB 15,56,202,254
+DB 15,56,201,229
+ movdqa xmm2,xmm0
+DB 15,58,204,193,2
+DB 15,56,200,213
+ pxor xmm4,xmm6
+DB 15,56,201,238
+DB 15,56,202,231
+
+ movdqa xmm1,xmm0
+DB 15,58,204,194,2
+DB 15,56,200,206
+ pxor xmm5,xmm7
+DB 15,56,202,236
+DB 15,56,201,247
+ movdqa xmm2,xmm0
+DB 15,58,204,193,2
+DB 15,56,200,215
+ pxor xmm6,xmm4
+DB 15,56,201,252
+DB 15,56,202,245
+
+ movdqa xmm1,xmm0
+DB 15,58,204,194,3
+DB 15,56,200,204
+ pxor xmm7,xmm5
+DB 15,56,202,254
+ movdqu xmm4,XMMWORD[rsi]
+ movdqa xmm2,xmm0
+DB 15,58,204,193,3
+DB 15,56,200,213
+ movdqu xmm5,XMMWORD[16+rsi]
+DB 102,15,56,0,227
+
+ movdqa xmm1,xmm0
+DB 15,58,204,194,3
+DB 15,56,200,206
+ movdqu xmm6,XMMWORD[32+rsi]
+DB 102,15,56,0,235
+
+ movdqa xmm2,xmm0
+DB 15,58,204,193,3
+DB 15,56,200,215
+ movdqu xmm7,XMMWORD[48+rsi]
+DB 102,15,56,0,243
+
+ movdqa xmm1,xmm0
+DB 15,58,204,194,3
+DB 65,15,56,200,201
+DB 102,15,56,0,251
+
+ paddd xmm0,xmm8
+ movdqa xmm9,xmm1
+
+ jnz NEAR $L$oop_shaext
+
+ pshufd xmm0,xmm0,27
+ pshufd xmm1,xmm1,27
+ movdqu XMMWORD[rdi],xmm0
+ movd DWORD[16+rdi],xmm1
+ movaps xmm6,XMMWORD[((-8-64))+rax]
+ movaps xmm7,XMMWORD[((-8-48))+rax]
+ movaps xmm8,XMMWORD[((-8-32))+rax]
+ movaps xmm9,XMMWORD[((-8-16))+rax]
+ mov rsp,rax
+$L$epilogue_shaext:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_sha1_block_data_order_shaext:
+
+ALIGN 16
+sha1_block_data_order_ssse3:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_sha1_block_data_order_ssse3:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+_ssse3_shortcut:
+
+ mov r11,rsp
+
+ push rbx
+
+ push rbp
+
+ push r12
+
+ push r13
+
+ push r14
+
+ lea rsp,[((-160))+rsp]
+ movaps XMMWORD[(-40-96)+r11],xmm6
+ movaps XMMWORD[(-40-80)+r11],xmm7
+ movaps XMMWORD[(-40-64)+r11],xmm8
+ movaps XMMWORD[(-40-48)+r11],xmm9
+ movaps XMMWORD[(-40-32)+r11],xmm10
+ movaps XMMWORD[(-40-16)+r11],xmm11
+$L$prologue_ssse3:
+ and rsp,-64
+ mov r8,rdi
+ mov r9,rsi
+ mov r10,rdx
+
+ shl r10,6
+ add r10,r9
+ lea r14,[((K_XX_XX+64))]
+
+ mov eax,DWORD[r8]
+ mov ebx,DWORD[4+r8]
+ mov ecx,DWORD[8+r8]
+ mov edx,DWORD[12+r8]
+ mov esi,ebx
+ mov ebp,DWORD[16+r8]
+ mov edi,ecx
+ xor edi,edx
+ and esi,edi
+
+ movdqa xmm6,XMMWORD[64+r14]
+ movdqa xmm9,XMMWORD[((-64))+r14]
+ movdqu xmm0,XMMWORD[r9]
+ movdqu xmm1,XMMWORD[16+r9]
+ movdqu xmm2,XMMWORD[32+r9]
+ movdqu xmm3,XMMWORD[48+r9]
+DB 102,15,56,0,198
+DB 102,15,56,0,206
+DB 102,15,56,0,214
+ add r9,64
+ paddd xmm0,xmm9
+DB 102,15,56,0,222
+ paddd xmm1,xmm9
+ paddd xmm2,xmm9
+ movdqa XMMWORD[rsp],xmm0
+ psubd xmm0,xmm9
+ movdqa XMMWORD[16+rsp],xmm1
+ psubd xmm1,xmm9
+ movdqa XMMWORD[32+rsp],xmm2
+ psubd xmm2,xmm9
+ jmp NEAR $L$oop_ssse3
+ALIGN 16
+$L$oop_ssse3:
+ ror ebx,2
+ pshufd xmm4,xmm0,238
+ xor esi,edx
+ movdqa xmm8,xmm3
+ paddd xmm9,xmm3
+ mov edi,eax
+ add ebp,DWORD[rsp]
+ punpcklqdq xmm4,xmm1
+ xor ebx,ecx
+ rol eax,5
+ add ebp,esi
+ psrldq xmm8,4
+ and edi,ebx
+ xor ebx,ecx
+ pxor xmm4,xmm0
+ add ebp,eax
+ ror eax,7
+ pxor xmm8,xmm2
+ xor edi,ecx
+ mov esi,ebp
+ add edx,DWORD[4+rsp]
+ pxor xmm4,xmm8
+ xor eax,ebx
+ rol ebp,5
+ movdqa XMMWORD[48+rsp],xmm9
+ add edx,edi
+ and esi,eax
+ movdqa xmm10,xmm4
+ xor eax,ebx
+ add edx,ebp
+ ror ebp,7
+ movdqa xmm8,xmm4
+ xor esi,ebx
+ pslldq xmm10,12
+ paddd xmm4,xmm4
+ mov edi,edx
+ add ecx,DWORD[8+rsp]
+ psrld xmm8,31
+ xor ebp,eax
+ rol edx,5
+ add ecx,esi
+ movdqa xmm9,xmm10
+ and edi,ebp
+ xor ebp,eax
+ psrld xmm10,30
+ add ecx,edx
+ ror edx,7
+ por xmm4,xmm8
+ xor edi,eax
+ mov esi,ecx
+ add ebx,DWORD[12+rsp]
+ pslld xmm9,2
+ pxor xmm4,xmm10
+ xor edx,ebp
+ movdqa xmm10,XMMWORD[((-64))+r14]
+ rol ecx,5
+ add ebx,edi
+ and esi,edx
+ pxor xmm4,xmm9
+ xor edx,ebp
+ add ebx,ecx
+ ror ecx,7
+ pshufd xmm5,xmm1,238
+ xor esi,ebp
+ movdqa xmm9,xmm4
+ paddd xmm10,xmm4
+ mov edi,ebx
+ add eax,DWORD[16+rsp]
+ punpcklqdq xmm5,xmm2
+ xor ecx,edx
+ rol ebx,5
+ add eax,esi
+ psrldq xmm9,4
+ and edi,ecx
+ xor ecx,edx
+ pxor xmm5,xmm1
+ add eax,ebx
+ ror ebx,7
+ pxor xmm9,xmm3
+ xor edi,edx
+ mov esi,eax
+ add ebp,DWORD[20+rsp]
+ pxor xmm5,xmm9
+ xor ebx,ecx
+ rol eax,5
+ movdqa XMMWORD[rsp],xmm10
+ add ebp,edi
+ and esi,ebx
+ movdqa xmm8,xmm5
+ xor ebx,ecx
+ add ebp,eax
+ ror eax,7
+ movdqa xmm9,xmm5
+ xor esi,ecx
+ pslldq xmm8,12
+ paddd xmm5,xmm5
+ mov edi,ebp
+ add edx,DWORD[24+rsp]
+ psrld xmm9,31
+ xor eax,ebx
+ rol ebp,5
+ add edx,esi
+ movdqa xmm10,xmm8
+ and edi,eax
+ xor eax,ebx
+ psrld xmm8,30
+ add edx,ebp
+ ror ebp,7
+ por xmm5,xmm9
+ xor edi,ebx
+ mov esi,edx
+ add ecx,DWORD[28+rsp]
+ pslld xmm10,2
+ pxor xmm5,xmm8
+ xor ebp,eax
+ movdqa xmm8,XMMWORD[((-32))+r14]
+ rol edx,5
+ add ecx,edi
+ and esi,ebp
+ pxor xmm5,xmm10
+ xor ebp,eax
+ add ecx,edx
+ ror edx,7
+ pshufd xmm6,xmm2,238
+ xor esi,eax
+ movdqa xmm10,xmm5
+ paddd xmm8,xmm5
+ mov edi,ecx
+ add ebx,DWORD[32+rsp]
+ punpcklqdq xmm6,xmm3
+ xor edx,ebp
+ rol ecx,5
+ add ebx,esi
+ psrldq xmm10,4
+ and edi,edx
+ xor edx,ebp
+ pxor xmm6,xmm2
+ add ebx,ecx
+ ror ecx,7
+ pxor xmm10,xmm4
+ xor edi,ebp
+ mov esi,ebx
+ add eax,DWORD[36+rsp]
+ pxor xmm6,xmm10
+ xor ecx,edx
+ rol ebx,5
+ movdqa XMMWORD[16+rsp],xmm8
+ add eax,edi
+ and esi,ecx
+ movdqa xmm9,xmm6
+ xor ecx,edx
+ add eax,ebx
+ ror ebx,7
+ movdqa xmm10,xmm6
+ xor esi,edx
+ pslldq xmm9,12
+ paddd xmm6,xmm6
+ mov edi,eax
+ add ebp,DWORD[40+rsp]
+ psrld xmm10,31
+ xor ebx,ecx
+ rol eax,5
+ add ebp,esi
+ movdqa xmm8,xmm9
+ and edi,ebx
+ xor ebx,ecx
+ psrld xmm9,30
+ add ebp,eax
+ ror eax,7
+ por xmm6,xmm10
+ xor edi,ecx
+ mov esi,ebp
+ add edx,DWORD[44+rsp]
+ pslld xmm8,2
+ pxor xmm6,xmm9
+ xor eax,ebx
+ movdqa xmm9,XMMWORD[((-32))+r14]
+ rol ebp,5
+ add edx,edi
+ and esi,eax
+ pxor xmm6,xmm8
+ xor eax,ebx
+ add edx,ebp
+ ror ebp,7
+ pshufd xmm7,xmm3,238
+ xor esi,ebx
+ movdqa xmm8,xmm6
+ paddd xmm9,xmm6
+ mov edi,edx
+ add ecx,DWORD[48+rsp]
+ punpcklqdq xmm7,xmm4
+ xor ebp,eax
+ rol edx,5
+ add ecx,esi
+ psrldq xmm8,4
+ and edi,ebp
+ xor ebp,eax
+ pxor xmm7,xmm3
+ add ecx,edx
+ ror edx,7
+ pxor xmm8,xmm5
+ xor edi,eax
+ mov esi,ecx
+ add ebx,DWORD[52+rsp]
+ pxor xmm7,xmm8
+ xor edx,ebp
+ rol ecx,5
+ movdqa XMMWORD[32+rsp],xmm9
+ add ebx,edi
+ and esi,edx
+ movdqa xmm10,xmm7
+ xor edx,ebp
+ add ebx,ecx
+ ror ecx,7
+ movdqa xmm8,xmm7
+ xor esi,ebp
+ pslldq xmm10,12
+ paddd xmm7,xmm7
+ mov edi,ebx
+ add eax,DWORD[56+rsp]
+ psrld xmm8,31
+ xor ecx,edx
+ rol ebx,5
+ add eax,esi
+ movdqa xmm9,xmm10
+ and edi,ecx
+ xor ecx,edx
+ psrld xmm10,30
+ add eax,ebx
+ ror ebx,7
+ por xmm7,xmm8
+ xor edi,edx
+ mov esi,eax
+ add ebp,DWORD[60+rsp]
+ pslld xmm9,2
+ pxor xmm7,xmm10
+ xor ebx,ecx
+ movdqa xmm10,XMMWORD[((-32))+r14]
+ rol eax,5
+ add ebp,edi
+ and esi,ebx
+ pxor xmm7,xmm9
+ pshufd xmm9,xmm6,238
+ xor ebx,ecx
+ add ebp,eax
+ ror eax,7
+ pxor xmm0,xmm4
+ xor esi,ecx
+ mov edi,ebp
+ add edx,DWORD[rsp]
+ punpcklqdq xmm9,xmm7
+ xor eax,ebx
+ rol ebp,5
+ pxor xmm0,xmm1
+ add edx,esi
+ and edi,eax
+ movdqa xmm8,xmm10
+ xor eax,ebx
+ paddd xmm10,xmm7
+ add edx,ebp
+ pxor xmm0,xmm9
+ ror ebp,7
+ xor edi,ebx
+ mov esi,edx
+ add ecx,DWORD[4+rsp]
+ movdqa xmm9,xmm0
+ xor ebp,eax
+ rol edx,5
+ movdqa XMMWORD[48+rsp],xmm10
+ add ecx,edi
+ and esi,ebp
+ xor ebp,eax
+ pslld xmm0,2
+ add ecx,edx
+ ror edx,7
+ psrld xmm9,30
+ xor esi,eax
+ mov edi,ecx
+ add ebx,DWORD[8+rsp]
+ por xmm0,xmm9
+ xor edx,ebp
+ rol ecx,5
+ pshufd xmm10,xmm7,238
+ add ebx,esi
+ and edi,edx
+ xor edx,ebp
+ add ebx,ecx
+ add eax,DWORD[12+rsp]
+ xor edi,ebp
+ mov esi,ebx
+ rol ebx,5
+ add eax,edi
+ xor esi,edx
+ ror ecx,7
+ add eax,ebx
+ pxor xmm1,xmm5
+ add ebp,DWORD[16+rsp]
+ xor esi,ecx
+ punpcklqdq xmm10,xmm0
+ mov edi,eax
+ rol eax,5
+ pxor xmm1,xmm2
+ add ebp,esi
+ xor edi,ecx
+ movdqa xmm9,xmm8
+ ror ebx,7
+ paddd xmm8,xmm0
+ add ebp,eax
+ pxor xmm1,xmm10
+ add edx,DWORD[20+rsp]
+ xor edi,ebx
+ mov esi,ebp
+ rol ebp,5
+ movdqa xmm10,xmm1
+ add edx,edi
+ xor esi,ebx
+ movdqa XMMWORD[rsp],xmm8
+ ror eax,7
+ add edx,ebp
+ add ecx,DWORD[24+rsp]
+ pslld xmm1,2
+ xor esi,eax
+ mov edi,edx
+ psrld xmm10,30
+ rol edx,5
+ add ecx,esi
+ xor edi,eax
+ ror ebp,7
+ por xmm1,xmm10
+ add ecx,edx
+ add ebx,DWORD[28+rsp]
+ pshufd xmm8,xmm0,238
+ xor edi,ebp
+ mov esi,ecx
+ rol ecx,5
+ add ebx,edi
+ xor esi,ebp
+ ror edx,7
+ add ebx,ecx
+ pxor xmm2,xmm6
+ add eax,DWORD[32+rsp]
+ xor esi,edx
+ punpcklqdq xmm8,xmm1
+ mov edi,ebx
+ rol ebx,5
+ pxor xmm2,xmm3
+ add eax,esi
+ xor edi,edx
+ movdqa xmm10,XMMWORD[r14]
+ ror ecx,7
+ paddd xmm9,xmm1
+ add eax,ebx
+ pxor xmm2,xmm8
+ add ebp,DWORD[36+rsp]
+ xor edi,ecx
+ mov esi,eax
+ rol eax,5
+ movdqa xmm8,xmm2
+ add ebp,edi
+ xor esi,ecx
+ movdqa XMMWORD[16+rsp],xmm9
+ ror ebx,7
+ add ebp,eax
+ add edx,DWORD[40+rsp]
+ pslld xmm2,2
+ xor esi,ebx
+ mov edi,ebp
+ psrld xmm8,30
+ rol ebp,5
+ add edx,esi
+ xor edi,ebx
+ ror eax,7
+ por xmm2,xmm8
+ add edx,ebp
+ add ecx,DWORD[44+rsp]
+ pshufd xmm9,xmm1,238
+ xor edi,eax
+ mov esi,edx
+ rol edx,5
+ add ecx,edi
+ xor esi,eax
+ ror ebp,7
+ add ecx,edx
+ pxor xmm3,xmm7
+ add ebx,DWORD[48+rsp]
+ xor esi,ebp
+ punpcklqdq xmm9,xmm2
+ mov edi,ecx
+ rol ecx,5
+ pxor xmm3,xmm4
+ add ebx,esi
+ xor edi,ebp
+ movdqa xmm8,xmm10
+ ror edx,7
+ paddd xmm10,xmm2
+ add ebx,ecx
+ pxor xmm3,xmm9
+ add eax,DWORD[52+rsp]
+ xor edi,edx
+ mov esi,ebx
+ rol ebx,5
+ movdqa xmm9,xmm3
+ add eax,edi
+ xor esi,edx
+ movdqa XMMWORD[32+rsp],xmm10
+ ror ecx,7
+ add eax,ebx
+ add ebp,DWORD[56+rsp]
+ pslld xmm3,2
+ xor esi,ecx
+ mov edi,eax
+ psrld xmm9,30
+ rol eax,5
+ add ebp,esi
+ xor edi,ecx
+ ror ebx,7
+ por xmm3,xmm9
+ add ebp,eax
+ add edx,DWORD[60+rsp]
+ pshufd xmm10,xmm2,238
+ xor edi,ebx
+ mov esi,ebp
+ rol ebp,5
+ add edx,edi
+ xor esi,ebx
+ ror eax,7
+ add edx,ebp
+ pxor xmm4,xmm0
+ add ecx,DWORD[rsp]
+ xor esi,eax
+ punpcklqdq xmm10,xmm3
+ mov edi,edx
+ rol edx,5
+ pxor xmm4,xmm5
+ add ecx,esi
+ xor edi,eax
+ movdqa xmm9,xmm8
+ ror ebp,7
+ paddd xmm8,xmm3
+ add ecx,edx
+ pxor xmm4,xmm10
+ add ebx,DWORD[4+rsp]
+ xor edi,ebp
+ mov esi,ecx
+ rol ecx,5
+ movdqa xmm10,xmm4
+ add ebx,edi
+ xor esi,ebp
+ movdqa XMMWORD[48+rsp],xmm8
+ ror edx,7
+ add ebx,ecx
+ add eax,DWORD[8+rsp]
+ pslld xmm4,2
+ xor esi,edx
+ mov edi,ebx
+ psrld xmm10,30
+ rol ebx,5
+ add eax,esi
+ xor edi,edx
+ ror ecx,7
+ por xmm4,xmm10
+ add eax,ebx
+ add ebp,DWORD[12+rsp]
+ pshufd xmm8,xmm3,238
+ xor edi,ecx
+ mov esi,eax
+ rol eax,5
+ add ebp,edi
+ xor esi,ecx
+ ror ebx,7
+ add ebp,eax
+ pxor xmm5,xmm1
+ add edx,DWORD[16+rsp]
+ xor esi,ebx
+ punpcklqdq xmm8,xmm4
+ mov edi,ebp
+ rol ebp,5
+ pxor xmm5,xmm6
+ add edx,esi
+ xor edi,ebx
+ movdqa xmm10,xmm9
+ ror eax,7
+ paddd xmm9,xmm4
+ add edx,ebp
+ pxor xmm5,xmm8
+ add ecx,DWORD[20+rsp]
+ xor edi,eax
+ mov esi,edx
+ rol edx,5
+ movdqa xmm8,xmm5
+ add ecx,edi
+ xor esi,eax
+ movdqa XMMWORD[rsp],xmm9
+ ror ebp,7
+ add ecx,edx
+ add ebx,DWORD[24+rsp]
+ pslld xmm5,2
+ xor esi,ebp
+ mov edi,ecx
+ psrld xmm8,30
+ rol ecx,5
+ add ebx,esi
+ xor edi,ebp
+ ror edx,7
+ por xmm5,xmm8
+ add ebx,ecx
+ add eax,DWORD[28+rsp]
+ pshufd xmm9,xmm4,238
+ ror ecx,7
+ mov esi,ebx
+ xor edi,edx
+ rol ebx,5
+ add eax,edi
+ xor esi,ecx
+ xor ecx,edx
+ add eax,ebx
+ pxor xmm6,xmm2
+ add ebp,DWORD[32+rsp]
+ and esi,ecx
+ xor ecx,edx
+ ror ebx,7
+ punpcklqdq xmm9,xmm5
+ mov edi,eax
+ xor esi,ecx
+ pxor xmm6,xmm7
+ rol eax,5
+ add ebp,esi
+ movdqa xmm8,xmm10
+ xor edi,ebx
+ paddd xmm10,xmm5
+ xor ebx,ecx
+ pxor xmm6,xmm9
+ add ebp,eax
+ add edx,DWORD[36+rsp]
+ and edi,ebx
+ xor ebx,ecx
+ ror eax,7
+ movdqa xmm9,xmm6
+ mov esi,ebp
+ xor edi,ebx
+ movdqa XMMWORD[16+rsp],xmm10
+ rol ebp,5
+ add edx,edi
+ xor esi,eax
+ pslld xmm6,2
+ xor eax,ebx
+ add edx,ebp
+ psrld xmm9,30
+ add ecx,DWORD[40+rsp]
+ and esi,eax
+ xor eax,ebx
+ por xmm6,xmm9
+ ror ebp,7
+ mov edi,edx
+ xor esi,eax
+ rol edx,5
+ pshufd xmm10,xmm5,238
+ add ecx,esi
+ xor edi,ebp
+ xor ebp,eax
+ add ecx,edx
+ add ebx,DWORD[44+rsp]
+ and edi,ebp
+ xor ebp,eax
+ ror edx,7
+ mov esi,ecx
+ xor edi,ebp
+ rol ecx,5
+ add ebx,edi
+ xor esi,edx
+ xor edx,ebp
+ add ebx,ecx
+ pxor xmm7,xmm3
+ add eax,DWORD[48+rsp]
+ and esi,edx
+ xor edx,ebp
+ ror ecx,7
+ punpcklqdq xmm10,xmm6
+ mov edi,ebx
+ xor esi,edx
+ pxor xmm7,xmm0
+ rol ebx,5
+ add eax,esi
+ movdqa xmm9,XMMWORD[32+r14]
+ xor edi,ecx
+ paddd xmm8,xmm6
+ xor ecx,edx
+ pxor xmm7,xmm10
+ add eax,ebx
+ add ebp,DWORD[52+rsp]
+ and edi,ecx
+ xor ecx,edx
+ ror ebx,7
+ movdqa xmm10,xmm7
+ mov esi,eax
+ xor edi,ecx
+ movdqa XMMWORD[32+rsp],xmm8
+ rol eax,5
+ add ebp,edi
+ xor esi,ebx
+ pslld xmm7,2
+ xor ebx,ecx
+ add ebp,eax
+ psrld xmm10,30
+ add edx,DWORD[56+rsp]
+ and esi,ebx
+ xor ebx,ecx
+ por xmm7,xmm10
+ ror eax,7
+ mov edi,ebp
+ xor esi,ebx
+ rol ebp,5
+ pshufd xmm8,xmm6,238
+ add edx,esi
+ xor edi,eax
+ xor eax,ebx
+ add edx,ebp
+ add ecx,DWORD[60+rsp]
+ and edi,eax
+ xor eax,ebx
+ ror ebp,7
+ mov esi,edx
+ xor edi,eax
+ rol edx,5
+ add ecx,edi
+ xor esi,ebp
+ xor ebp,eax
+ add ecx,edx
+ pxor xmm0,xmm4
+ add ebx,DWORD[rsp]
+ and esi,ebp
+ xor ebp,eax
+ ror edx,7
+ punpcklqdq xmm8,xmm7
+ mov edi,ecx
+ xor esi,ebp
+ pxor xmm0,xmm1
+ rol ecx,5
+ add ebx,esi
+ movdqa xmm10,xmm9
+ xor edi,edx
+ paddd xmm9,xmm7
+ xor edx,ebp
+ pxor xmm0,xmm8
+ add ebx,ecx
+ add eax,DWORD[4+rsp]
+ and edi,edx
+ xor edx,ebp
+ ror ecx,7
+ movdqa xmm8,xmm0
+ mov esi,ebx
+ xor edi,edx
+ movdqa XMMWORD[48+rsp],xmm9
+ rol ebx,5
+ add eax,edi
+ xor esi,ecx
+ pslld xmm0,2
+ xor ecx,edx
+ add eax,ebx
+ psrld xmm8,30
+ add ebp,DWORD[8+rsp]
+ and esi,ecx
+ xor ecx,edx
+ por xmm0,xmm8
+ ror ebx,7
+ mov edi,eax
+ xor esi,ecx
+ rol eax,5
+ pshufd xmm9,xmm7,238
+ add ebp,esi
+ xor edi,ebx
+ xor ebx,ecx
+ add ebp,eax
+ add edx,DWORD[12+rsp]
+ and edi,ebx
+ xor ebx,ecx
+ ror eax,7
+ mov esi,ebp
+ xor edi,ebx
+ rol ebp,5
+ add edx,edi
+ xor esi,eax
+ xor eax,ebx
+ add edx,ebp
+ pxor xmm1,xmm5
+ add ecx,DWORD[16+rsp]
+ and esi,eax
+ xor eax,ebx
+ ror ebp,7
+ punpcklqdq xmm9,xmm0
+ mov edi,edx
+ xor esi,eax
+ pxor xmm1,xmm2
+ rol edx,5
+ add ecx,esi
+ movdqa xmm8,xmm10
+ xor edi,ebp
+ paddd xmm10,xmm0
+ xor ebp,eax
+ pxor xmm1,xmm9
+ add ecx,edx
+ add ebx,DWORD[20+rsp]
+ and edi,ebp
+ xor ebp,eax
+ ror edx,7
+ movdqa xmm9,xmm1
+ mov esi,ecx
+ xor edi,ebp
+ movdqa XMMWORD[rsp],xmm10
+ rol ecx,5
+ add ebx,edi
+ xor esi,edx
+ pslld xmm1,2
+ xor edx,ebp
+ add ebx,ecx
+ psrld xmm9,30
+ add eax,DWORD[24+rsp]
+ and esi,edx
+ xor edx,ebp
+ por xmm1,xmm9
+ ror ecx,7
+ mov edi,ebx
+ xor esi,edx
+ rol ebx,5
+ pshufd xmm10,xmm0,238
+ add eax,esi
+ xor edi,ecx
+ xor ecx,edx
+ add eax,ebx
+ add ebp,DWORD[28+rsp]
+ and edi,ecx
+ xor ecx,edx
+ ror ebx,7
+ mov esi,eax
+ xor edi,ecx
+ rol eax,5
+ add ebp,edi
+ xor esi,ebx
+ xor ebx,ecx
+ add ebp,eax
+ pxor xmm2,xmm6
+ add edx,DWORD[32+rsp]
+ and esi,ebx
+ xor ebx,ecx
+ ror eax,7
+ punpcklqdq xmm10,xmm1
+ mov edi,ebp
+ xor esi,ebx
+ pxor xmm2,xmm3
+ rol ebp,5
+ add edx,esi
+ movdqa xmm9,xmm8
+ xor edi,eax
+ paddd xmm8,xmm1
+ xor eax,ebx
+ pxor xmm2,xmm10
+ add edx,ebp
+ add ecx,DWORD[36+rsp]
+ and edi,eax
+ xor eax,ebx
+ ror ebp,7
+ movdqa xmm10,xmm2
+ mov esi,edx
+ xor edi,eax
+ movdqa XMMWORD[16+rsp],xmm8
+ rol edx,5
+ add ecx,edi
+ xor esi,ebp
+ pslld xmm2,2
+ xor ebp,eax
+ add ecx,edx
+ psrld xmm10,30
+ add ebx,DWORD[40+rsp]
+ and esi,ebp
+ xor ebp,eax
+ por xmm2,xmm10
+ ror edx,7
+ mov edi,ecx
+ xor esi,ebp
+ rol ecx,5
+ pshufd xmm8,xmm1,238
+ add ebx,esi
+ xor edi,edx
+ xor edx,ebp
+ add ebx,ecx
+ add eax,DWORD[44+rsp]
+ and edi,edx
+ xor edx,ebp
+ ror ecx,7
+ mov esi,ebx
+ xor edi,edx
+ rol ebx,5
+ add eax,edi
+ xor esi,edx
+ add eax,ebx
+ pxor xmm3,xmm7
+ add ebp,DWORD[48+rsp]
+ xor esi,ecx
+ punpcklqdq xmm8,xmm2
+ mov edi,eax
+ rol eax,5
+ pxor xmm3,xmm4
+ add ebp,esi
+ xor edi,ecx
+ movdqa xmm10,xmm9
+ ror ebx,7
+ paddd xmm9,xmm2
+ add ebp,eax
+ pxor xmm3,xmm8
+ add edx,DWORD[52+rsp]
+ xor edi,ebx
+ mov esi,ebp
+ rol ebp,5
+ movdqa xmm8,xmm3
+ add edx,edi
+ xor esi,ebx
+ movdqa XMMWORD[32+rsp],xmm9
+ ror eax,7
+ add edx,ebp
+ add ecx,DWORD[56+rsp]
+ pslld xmm3,2
+ xor esi,eax
+ mov edi,edx
+ psrld xmm8,30
+ rol edx,5
+ add ecx,esi
+ xor edi,eax
+ ror ebp,7
+ por xmm3,xmm8
+ add ecx,edx
+ add ebx,DWORD[60+rsp]
+ xor edi,ebp
+ mov esi,ecx
+ rol ecx,5
+ add ebx,edi
+ xor esi,ebp
+ ror edx,7
+ add ebx,ecx
+ add eax,DWORD[rsp]
+ xor esi,edx
+ mov edi,ebx
+ rol ebx,5
+ paddd xmm10,xmm3
+ add eax,esi
+ xor edi,edx
+ movdqa XMMWORD[48+rsp],xmm10
+ ror ecx,7
+ add eax,ebx
+ add ebp,DWORD[4+rsp]
+ xor edi,ecx
+ mov esi,eax
+ rol eax,5
+ add ebp,edi
+ xor esi,ecx
+ ror ebx,7
+ add ebp,eax
+ add edx,DWORD[8+rsp]
+ xor esi,ebx
+ mov edi,ebp
+ rol ebp,5
+ add edx,esi
+ xor edi,ebx
+ ror eax,7
+ add edx,ebp
+ add ecx,DWORD[12+rsp]
+ xor edi,eax
+ mov esi,edx
+ rol edx,5
+ add ecx,edi
+ xor esi,eax
+ ror ebp,7
+ add ecx,edx
+ cmp r9,r10
+ je NEAR $L$done_ssse3
+ movdqa xmm6,XMMWORD[64+r14]
+ movdqa xmm9,XMMWORD[((-64))+r14]
+ movdqu xmm0,XMMWORD[r9]
+ movdqu xmm1,XMMWORD[16+r9]
+ movdqu xmm2,XMMWORD[32+r9]
+ movdqu xmm3,XMMWORD[48+r9]
+DB 102,15,56,0,198
+ add r9,64
+ add ebx,DWORD[16+rsp]
+ xor esi,ebp
+ mov edi,ecx
+DB 102,15,56,0,206
+ rol ecx,5
+ add ebx,esi
+ xor edi,ebp
+ ror edx,7
+ paddd xmm0,xmm9
+ add ebx,ecx
+ add eax,DWORD[20+rsp]
+ xor edi,edx
+ mov esi,ebx
+ movdqa XMMWORD[rsp],xmm0
+ rol ebx,5
+ add eax,edi
+ xor esi,edx
+ ror ecx,7
+ psubd xmm0,xmm9
+ add eax,ebx
+ add ebp,DWORD[24+rsp]
+ xor esi,ecx
+ mov edi,eax
+ rol eax,5
+ add ebp,esi
+ xor edi,ecx
+ ror ebx,7
+ add ebp,eax
+ add edx,DWORD[28+rsp]
+ xor edi,ebx
+ mov esi,ebp
+ rol ebp,5
+ add edx,edi
+ xor esi,ebx
+ ror eax,7
+ add edx,ebp
+ add ecx,DWORD[32+rsp]
+ xor esi,eax
+ mov edi,edx
+DB 102,15,56,0,214
+ rol edx,5
+ add ecx,esi
+ xor edi,eax
+ ror ebp,7
+ paddd xmm1,xmm9
+ add ecx,edx
+ add ebx,DWORD[36+rsp]
+ xor edi,ebp
+ mov esi,ecx
+ movdqa XMMWORD[16+rsp],xmm1
+ rol ecx,5
+ add ebx,edi
+ xor esi,ebp
+ ror edx,7
+ psubd xmm1,xmm9
+ add ebx,ecx
+ add eax,DWORD[40+rsp]
+ xor esi,edx
+ mov edi,ebx
+ rol ebx,5
+ add eax,esi
+ xor edi,edx
+ ror ecx,7
+ add eax,ebx
+ add ebp,DWORD[44+rsp]
+ xor edi,ecx
+ mov esi,eax
+ rol eax,5
+ add ebp,edi
+ xor esi,ecx
+ ror ebx,7
+ add ebp,eax
+ add edx,DWORD[48+rsp]
+ xor esi,ebx
+ mov edi,ebp
+DB 102,15,56,0,222
+ rol ebp,5
+ add edx,esi
+ xor edi,ebx
+ ror eax,7
+ paddd xmm2,xmm9
+ add edx,ebp
+ add ecx,DWORD[52+rsp]
+ xor edi,eax
+ mov esi,edx
+ movdqa XMMWORD[32+rsp],xmm2
+ rol edx,5
+ add ecx,edi
+ xor esi,eax
+ ror ebp,7
+ psubd xmm2,xmm9
+ add ecx,edx
+ add ebx,DWORD[56+rsp]
+ xor esi,ebp
+ mov edi,ecx
+ rol ecx,5
+ add ebx,esi
+ xor edi,ebp
+ ror edx,7
+ add ebx,ecx
+ add eax,DWORD[60+rsp]
+ xor edi,edx
+ mov esi,ebx
+ rol ebx,5
+ add eax,edi
+ ror ecx,7
+ add eax,ebx
+ add eax,DWORD[r8]
+ add esi,DWORD[4+r8]
+ add ecx,DWORD[8+r8]
+ add edx,DWORD[12+r8]
+ mov DWORD[r8],eax
+ add ebp,DWORD[16+r8]
+ mov DWORD[4+r8],esi
+ mov ebx,esi
+ mov DWORD[8+r8],ecx
+ mov edi,ecx
+ mov DWORD[12+r8],edx
+ xor edi,edx
+ mov DWORD[16+r8],ebp
+ and esi,edi
+ jmp NEAR $L$oop_ssse3
+
+ALIGN 16
+$L$done_ssse3:
+ add ebx,DWORD[16+rsp]
+ xor esi,ebp
+ mov edi,ecx
+ rol ecx,5
+ add ebx,esi
+ xor edi,ebp
+ ror edx,7
+ add ebx,ecx
+ add eax,DWORD[20+rsp]
+ xor edi,edx
+ mov esi,ebx
+ rol ebx,5
+ add eax,edi
+ xor esi,edx
+ ror ecx,7
+ add eax,ebx
+ add ebp,DWORD[24+rsp]
+ xor esi,ecx
+ mov edi,eax
+ rol eax,5
+ add ebp,esi
+ xor edi,ecx
+ ror ebx,7
+ add ebp,eax
+ add edx,DWORD[28+rsp]
+ xor edi,ebx
+ mov esi,ebp
+ rol ebp,5
+ add edx,edi
+ xor esi,ebx
+ ror eax,7
+ add edx,ebp
+ add ecx,DWORD[32+rsp]
+ xor esi,eax
+ mov edi,edx
+ rol edx,5
+ add ecx,esi
+ xor edi,eax
+ ror ebp,7
+ add ecx,edx
+ add ebx,DWORD[36+rsp]
+ xor edi,ebp
+ mov esi,ecx
+ rol ecx,5
+ add ebx,edi
+ xor esi,ebp
+ ror edx,7
+ add ebx,ecx
+ add eax,DWORD[40+rsp]
+ xor esi,edx
+ mov edi,ebx
+ rol ebx,5
+ add eax,esi
+ xor edi,edx
+ ror ecx,7
+ add eax,ebx
+ add ebp,DWORD[44+rsp]
+ xor edi,ecx
+ mov esi,eax
+ rol eax,5
+ add ebp,edi
+ xor esi,ecx
+ ror ebx,7
+ add ebp,eax
+ add edx,DWORD[48+rsp]
+ xor esi,ebx
+ mov edi,ebp
+ rol ebp,5
+ add edx,esi
+ xor edi,ebx
+ ror eax,7
+ add edx,ebp
+ add ecx,DWORD[52+rsp]
+ xor edi,eax
+ mov esi,edx
+ rol edx,5
+ add ecx,edi
+ xor esi,eax
+ ror ebp,7
+ add ecx,edx
+ add ebx,DWORD[56+rsp]
+ xor esi,ebp
+ mov edi,ecx
+ rol ecx,5
+ add ebx,esi
+ xor edi,ebp
+ ror edx,7
+ add ebx,ecx
+ add eax,DWORD[60+rsp]
+ xor edi,edx
+ mov esi,ebx
+ rol ebx,5
+ add eax,edi
+ ror ecx,7
+ add eax,ebx
+ add eax,DWORD[r8]
+ add esi,DWORD[4+r8]
+ add ecx,DWORD[8+r8]
+ mov DWORD[r8],eax
+ add edx,DWORD[12+r8]
+ mov DWORD[4+r8],esi
+ add ebp,DWORD[16+r8]
+ mov DWORD[8+r8],ecx
+ mov DWORD[12+r8],edx
+ mov DWORD[16+r8],ebp
+ movaps xmm6,XMMWORD[((-40-96))+r11]
+ movaps xmm7,XMMWORD[((-40-80))+r11]
+ movaps xmm8,XMMWORD[((-40-64))+r11]
+ movaps xmm9,XMMWORD[((-40-48))+r11]
+ movaps xmm10,XMMWORD[((-40-32))+r11]
+ movaps xmm11,XMMWORD[((-40-16))+r11]
+ mov r14,QWORD[((-40))+r11]
+
+ mov r13,QWORD[((-32))+r11]
+
+ mov r12,QWORD[((-24))+r11]
+
+ mov rbp,QWORD[((-16))+r11]
+
+ mov rbx,QWORD[((-8))+r11]
+
+ lea rsp,[r11]
+
+$L$epilogue_ssse3:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_sha1_block_data_order_ssse3:
+ALIGN 64
+K_XX_XX:
+ DD 0x5a827999,0x5a827999,0x5a827999,0x5a827999
+ DD 0x5a827999,0x5a827999,0x5a827999,0x5a827999
+ DD 0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1
+ DD 0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1
+ DD 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc
+ DD 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc
+ DD 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6
+ DD 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6
+ DD 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+ DD 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+DB 0xf,0xe,0xd,0xc,0xb,0xa,0x9,0x8,0x7,0x6,0x5,0x4,0x3,0x2,0x1,0x0
+DB 83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115
+DB 102,111,114,109,32,102,111,114,32,120,56,54,95,54,52,44
+DB 32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60
+DB 97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114
+DB 103,62,0
+ALIGN 64
+EXTERN __imp_RtlVirtualUnwind
+
+ALIGN 16
+se_handler:
+ push rsi
+ push rdi
+ push rbx
+ push rbp
+ push r12
+ push r13
+ push r14
+ push r15
+ pushfq
+ sub rsp,64
+
+ mov rax,QWORD[120+r8]
+ mov rbx,QWORD[248+r8]
+
+ lea r10,[$L$prologue]
+ cmp rbx,r10
+ jb NEAR $L$common_seh_tail
+
+ mov rax,QWORD[152+r8]
+
+ lea r10,[$L$epilogue]
+ cmp rbx,r10
+ jae NEAR $L$common_seh_tail
+
+ mov rax,QWORD[64+rax]
+
+ mov rbx,QWORD[((-8))+rax]
+ mov rbp,QWORD[((-16))+rax]
+ mov r12,QWORD[((-24))+rax]
+ mov r13,QWORD[((-32))+rax]
+ mov r14,QWORD[((-40))+rax]
+ mov QWORD[144+r8],rbx
+ mov QWORD[160+r8],rbp
+ mov QWORD[216+r8],r12
+ mov QWORD[224+r8],r13
+ mov QWORD[232+r8],r14
+
+ jmp NEAR $L$common_seh_tail
+
+
+ALIGN 16
+shaext_handler:
+ push rsi
+ push rdi
+ push rbx
+ push rbp
+ push r12
+ push r13
+ push r14
+ push r15
+ pushfq
+ sub rsp,64
+
+ mov rax,QWORD[120+r8]
+ mov rbx,QWORD[248+r8]
+
+ lea r10,[$L$prologue_shaext]
+ cmp rbx,r10
+ jb NEAR $L$common_seh_tail
+
+ lea r10,[$L$epilogue_shaext]
+ cmp rbx,r10
+ jae NEAR $L$common_seh_tail
+
+ lea rsi,[((-8-64))+rax]
+ lea rdi,[512+r8]
+ mov ecx,8
+ DD 0xa548f3fc
+
+ jmp NEAR $L$common_seh_tail
+
+
+ALIGN 16
+ssse3_handler:
+ push rsi
+ push rdi
+ push rbx
+ push rbp
+ push r12
+ push r13
+ push r14
+ push r15
+ pushfq
+ sub rsp,64
+
+ mov rax,QWORD[120+r8]
+ mov rbx,QWORD[248+r8]
+
+ mov rsi,QWORD[8+r9]
+ mov r11,QWORD[56+r9]
+
+ mov r10d,DWORD[r11]
+ lea r10,[r10*1+rsi]
+ cmp rbx,r10
+ jb NEAR $L$common_seh_tail
+
+ mov rax,QWORD[208+r8]
+
+ mov r10d,DWORD[4+r11]
+ lea r10,[r10*1+rsi]
+ cmp rbx,r10
+ jae NEAR $L$common_seh_tail
+
+ lea rsi,[((-40-96))+rax]
+ lea rdi,[512+r8]
+ mov ecx,12
+ DD 0xa548f3fc
+
+ mov rbx,QWORD[((-8))+rax]
+ mov rbp,QWORD[((-16))+rax]
+ mov r12,QWORD[((-24))+rax]
+ mov r13,QWORD[((-32))+rax]
+ mov r14,QWORD[((-40))+rax]
+ mov QWORD[144+r8],rbx
+ mov QWORD[160+r8],rbp
+ mov QWORD[216+r8],r12
+ mov QWORD[224+r8],r13
+ mov QWORD[232+r8],r14
+
+$L$common_seh_tail:
+ mov rdi,QWORD[8+rax]
+ mov rsi,QWORD[16+rax]
+ mov QWORD[152+r8],rax
+ mov QWORD[168+r8],rsi
+ mov QWORD[176+r8],rdi
+
+ mov rdi,QWORD[40+r9]
+ mov rsi,r8
+ mov ecx,154
+ DD 0xa548f3fc
+
+ mov rsi,r9
+ xor rcx,rcx
+ mov rdx,QWORD[8+rsi]
+ mov r8,QWORD[rsi]
+ mov r9,QWORD[16+rsi]
+ mov r10,QWORD[40+rsi]
+ lea r11,[56+rsi]
+ lea r12,[24+rsi]
+ mov QWORD[32+rsp],r10
+ mov QWORD[40+rsp],r11
+ mov QWORD[48+rsp],r12
+ mov QWORD[56+rsp],rcx
+ call QWORD[__imp_RtlVirtualUnwind]
+
+ mov eax,1
+ add rsp,64
+ popfq
+ pop r15
+ pop r14
+ pop r13
+ pop r12
+ pop rbp
+ pop rbx
+ pop rdi
+ pop rsi
+ DB 0F3h,0C3h ;repret
+
+
+section .pdata rdata align=4
+ALIGN 4
+ DD $L$SEH_begin_sha1_block_data_order wrt ..imagebase
+ DD $L$SEH_end_sha1_block_data_order wrt ..imagebase
+ DD $L$SEH_info_sha1_block_data_order wrt ..imagebase
+ DD $L$SEH_begin_sha1_block_data_order_shaext wrt ..imagebase
+ DD $L$SEH_end_sha1_block_data_order_shaext wrt ..imagebase
+ DD $L$SEH_info_sha1_block_data_order_shaext wrt ..imagebase
+ DD $L$SEH_begin_sha1_block_data_order_ssse3 wrt ..imagebase
+ DD $L$SEH_end_sha1_block_data_order_ssse3 wrt ..imagebase
+ DD $L$SEH_info_sha1_block_data_order_ssse3 wrt ..imagebase
+section .xdata rdata align=8
+ALIGN 8
+$L$SEH_info_sha1_block_data_order:
+DB 9,0,0,0
+ DD se_handler wrt ..imagebase
+$L$SEH_info_sha1_block_data_order_shaext:
+DB 9,0,0,0
+ DD shaext_handler wrt ..imagebase
+$L$SEH_info_sha1_block_data_order_ssse3:
+DB 9,0,0,0
+ DD ssse3_handler wrt ..imagebase
+ DD $L$prologue_ssse3 wrt ..imagebase,$L$epilogue_ssse3 wrt ..imagebase
diff --git a/CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha256-mb-x86_64.nasm b/CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha256-mb-x86_64.nasm
new file mode 100644
index 0000000000..7cd5eae85c
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha256-mb-x86_64.nasm
@@ -0,0 +1,3461 @@
+; WARNING: do not edit!
+; Generated from openssl/crypto/sha/asm/sha256-mb-x86_64.pl
+;
+; Copyright 2013-2020 The OpenSSL Project Authors. All Rights Reserved.
+;
+; Licensed under the OpenSSL license (the "License"). You may not use
+; this file except in compliance with the License. You can obtain a copy
+; in the file LICENSE in the source distribution or at
+; https://www.openssl.org/source/license.html
+
+default rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section .text code align=64
+
+
+EXTERN OPENSSL_ia32cap_P
+
+global sha256_multi_block
+
+ALIGN 32
+sha256_multi_block:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_sha256_multi_block:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+
+ mov rcx,QWORD[((OPENSSL_ia32cap_P+4))]
+ bt rcx,61
+ jc NEAR _shaext_shortcut
+ mov rax,rsp
+
+ push rbx
+
+ push rbp
+
+ lea rsp,[((-168))+rsp]
+ movaps XMMWORD[rsp],xmm6
+ movaps XMMWORD[16+rsp],xmm7
+ movaps XMMWORD[32+rsp],xmm8
+ movaps XMMWORD[48+rsp],xmm9
+ movaps XMMWORD[(-120)+rax],xmm10
+ movaps XMMWORD[(-104)+rax],xmm11
+ movaps XMMWORD[(-88)+rax],xmm12
+ movaps XMMWORD[(-72)+rax],xmm13
+ movaps XMMWORD[(-56)+rax],xmm14
+ movaps XMMWORD[(-40)+rax],xmm15
+ sub rsp,288
+ and rsp,-256
+ mov QWORD[272+rsp],rax
+
+$L$body:
+ lea rbp,[((K256+128))]
+ lea rbx,[256+rsp]
+ lea rdi,[128+rdi]
+
+$L$oop_grande:
+ mov DWORD[280+rsp],edx
+ xor edx,edx
+ mov r8,QWORD[rsi]
+ mov ecx,DWORD[8+rsi]
+ cmp ecx,edx
+ cmovg edx,ecx
+ test ecx,ecx
+ mov DWORD[rbx],ecx
+ cmovle r8,rbp
+ mov r9,QWORD[16+rsi]
+ mov ecx,DWORD[24+rsi]
+ cmp ecx,edx
+ cmovg edx,ecx
+ test ecx,ecx
+ mov DWORD[4+rbx],ecx
+ cmovle r9,rbp
+ mov r10,QWORD[32+rsi]
+ mov ecx,DWORD[40+rsi]
+ cmp ecx,edx
+ cmovg edx,ecx
+ test ecx,ecx
+ mov DWORD[8+rbx],ecx
+ cmovle r10,rbp
+ mov r11,QWORD[48+rsi]
+ mov ecx,DWORD[56+rsi]
+ cmp ecx,edx
+ cmovg edx,ecx
+ test ecx,ecx
+ mov DWORD[12+rbx],ecx
+ cmovle r11,rbp
+ test edx,edx
+ jz NEAR $L$done
+
+ movdqu xmm8,XMMWORD[((0-128))+rdi]
+ lea rax,[128+rsp]
+ movdqu xmm9,XMMWORD[((32-128))+rdi]
+ movdqu xmm10,XMMWORD[((64-128))+rdi]
+ movdqu xmm11,XMMWORD[((96-128))+rdi]
+ movdqu xmm12,XMMWORD[((128-128))+rdi]
+ movdqu xmm13,XMMWORD[((160-128))+rdi]
+ movdqu xmm14,XMMWORD[((192-128))+rdi]
+ movdqu xmm15,XMMWORD[((224-128))+rdi]
+ movdqu xmm6,XMMWORD[$L$pbswap]
+ jmp NEAR $L$oop
+
+ALIGN 32
+$L$oop:
+ movdqa xmm4,xmm10
+ pxor xmm4,xmm9
+ movd xmm5,DWORD[r8]
+ movd xmm0,DWORD[r9]
+ movd xmm1,DWORD[r10]
+ movd xmm2,DWORD[r11]
+ punpckldq xmm5,xmm1
+ punpckldq xmm0,xmm2
+ punpckldq xmm5,xmm0
+ movdqa xmm7,xmm12
+DB 102,15,56,0,238
+ movdqa xmm2,xmm12
+
+ psrld xmm7,6
+ movdqa xmm1,xmm12
+ pslld xmm2,7
+ movdqa XMMWORD[(0-128)+rax],xmm5
+ paddd xmm5,xmm15
+
+ psrld xmm1,11
+ pxor xmm7,xmm2
+ pslld xmm2,21-7
+ paddd xmm5,XMMWORD[((-128))+rbp]
+ pxor xmm7,xmm1
+
+ psrld xmm1,25-11
+ movdqa xmm0,xmm12
+
+ pxor xmm7,xmm2
+ movdqa xmm3,xmm12
+ pslld xmm2,26-21
+ pandn xmm0,xmm14
+ pand xmm3,xmm13
+ pxor xmm7,xmm1
+
+
+ movdqa xmm1,xmm8
+ pxor xmm7,xmm2
+ movdqa xmm2,xmm8
+ psrld xmm1,2
+ paddd xmm5,xmm7
+ pxor xmm0,xmm3
+ movdqa xmm3,xmm9
+ movdqa xmm7,xmm8
+ pslld xmm2,10
+ pxor xmm3,xmm8
+
+
+ psrld xmm7,13
+ pxor xmm1,xmm2
+ paddd xmm5,xmm0
+ pslld xmm2,19-10
+ pand xmm4,xmm3
+ pxor xmm1,xmm7
+
+
+ psrld xmm7,22-13
+ pxor xmm1,xmm2
+ movdqa xmm15,xmm9
+ pslld xmm2,30-19
+ pxor xmm7,xmm1
+ pxor xmm15,xmm4
+ paddd xmm11,xmm5
+ pxor xmm7,xmm2
+
+ paddd xmm15,xmm5
+ paddd xmm15,xmm7
+ movd xmm5,DWORD[4+r8]
+ movd xmm0,DWORD[4+r9]
+ movd xmm1,DWORD[4+r10]
+ movd xmm2,DWORD[4+r11]
+ punpckldq xmm5,xmm1
+ punpckldq xmm0,xmm2
+ punpckldq xmm5,xmm0
+ movdqa xmm7,xmm11
+
+ movdqa xmm2,xmm11
+DB 102,15,56,0,238
+ psrld xmm7,6
+ movdqa xmm1,xmm11
+ pslld xmm2,7
+ movdqa XMMWORD[(16-128)+rax],xmm5
+ paddd xmm5,xmm14
+
+ psrld xmm1,11
+ pxor xmm7,xmm2
+ pslld xmm2,21-7
+ paddd xmm5,XMMWORD[((-96))+rbp]
+ pxor xmm7,xmm1
+
+ psrld xmm1,25-11
+ movdqa xmm0,xmm11
+
+ pxor xmm7,xmm2
+ movdqa xmm4,xmm11
+ pslld xmm2,26-21
+ pandn xmm0,xmm13
+ pand xmm4,xmm12
+ pxor xmm7,xmm1
+
+
+ movdqa xmm1,xmm15
+ pxor xmm7,xmm2
+ movdqa xmm2,xmm15
+ psrld xmm1,2
+ paddd xmm5,xmm7
+ pxor xmm0,xmm4
+ movdqa xmm4,xmm8
+ movdqa xmm7,xmm15
+ pslld xmm2,10
+ pxor xmm4,xmm15
+
+
+ psrld xmm7,13
+ pxor xmm1,xmm2
+ paddd xmm5,xmm0
+ pslld xmm2,19-10
+ pand xmm3,xmm4
+ pxor xmm1,xmm7
+
+
+ psrld xmm7,22-13
+ pxor xmm1,xmm2
+ movdqa xmm14,xmm8
+ pslld xmm2,30-19
+ pxor xmm7,xmm1
+ pxor xmm14,xmm3
+ paddd xmm10,xmm5
+ pxor xmm7,xmm2
+
+ paddd xmm14,xmm5
+ paddd xmm14,xmm7
+ movd xmm5,DWORD[8+r8]
+ movd xmm0,DWORD[8+r9]
+ movd xmm1,DWORD[8+r10]
+ movd xmm2,DWORD[8+r11]
+ punpckldq xmm5,xmm1
+ punpckldq xmm0,xmm2
+ punpckldq xmm5,xmm0
+ movdqa xmm7,xmm10
+DB 102,15,56,0,238
+ movdqa xmm2,xmm10
+
+ psrld xmm7,6
+ movdqa xmm1,xmm10
+ pslld xmm2,7
+ movdqa XMMWORD[(32-128)+rax],xmm5
+ paddd xmm5,xmm13
+
+ psrld xmm1,11
+ pxor xmm7,xmm2
+ pslld xmm2,21-7
+ paddd xmm5,XMMWORD[((-64))+rbp]
+ pxor xmm7,xmm1
+
+ psrld xmm1,25-11
+ movdqa xmm0,xmm10
+
+ pxor xmm7,xmm2
+ movdqa xmm3,xmm10
+ pslld xmm2,26-21
+ pandn xmm0,xmm12
+ pand xmm3,xmm11
+ pxor xmm7,xmm1
+
+
+ movdqa xmm1,xmm14
+ pxor xmm7,xmm2
+ movdqa xmm2,xmm14
+ psrld xmm1,2
+ paddd xmm5,xmm7
+ pxor xmm0,xmm3
+ movdqa xmm3,xmm15
+ movdqa xmm7,xmm14
+ pslld xmm2,10
+ pxor xmm3,xmm14
+
+
+ psrld xmm7,13
+ pxor xmm1,xmm2
+ paddd xmm5,xmm0
+ pslld xmm2,19-10
+ pand xmm4,xmm3
+ pxor xmm1,xmm7
+
+
+ psrld xmm7,22-13
+ pxor xmm1,xmm2
+ movdqa xmm13,xmm15
+ pslld xmm2,30-19
+ pxor xmm7,xmm1
+ pxor xmm13,xmm4
+ paddd xmm9,xmm5
+ pxor xmm7,xmm2
+
+ paddd xmm13,xmm5
+ paddd xmm13,xmm7
+ movd xmm5,DWORD[12+r8]
+ movd xmm0,DWORD[12+r9]
+ movd xmm1,DWORD[12+r10]
+ movd xmm2,DWORD[12+r11]
+ punpckldq xmm5,xmm1
+ punpckldq xmm0,xmm2
+ punpckldq xmm5,xmm0
+ movdqa xmm7,xmm9
+
+ movdqa xmm2,xmm9
+DB 102,15,56,0,238
+ psrld xmm7,6
+ movdqa xmm1,xmm9
+ pslld xmm2,7
+ movdqa XMMWORD[(48-128)+rax],xmm5
+ paddd xmm5,xmm12
+
+ psrld xmm1,11
+ pxor xmm7,xmm2
+ pslld xmm2,21-7
+ paddd xmm5,XMMWORD[((-32))+rbp]
+ pxor xmm7,xmm1
+
+ psrld xmm1,25-11
+ movdqa xmm0,xmm9
+
+ pxor xmm7,xmm2
+ movdqa xmm4,xmm9
+ pslld xmm2,26-21
+ pandn xmm0,xmm11
+ pand xmm4,xmm10
+ pxor xmm7,xmm1
+
+
+ movdqa xmm1,xmm13
+ pxor xmm7,xmm2
+ movdqa xmm2,xmm13
+ psrld xmm1,2
+ paddd xmm5,xmm7
+ pxor xmm0,xmm4
+ movdqa xmm4,xmm14
+ movdqa xmm7,xmm13
+ pslld xmm2,10
+ pxor xmm4,xmm13
+
+
+ psrld xmm7,13
+ pxor xmm1,xmm2
+ paddd xmm5,xmm0
+ pslld xmm2,19-10
+ pand xmm3,xmm4
+ pxor xmm1,xmm7
+
+
+ psrld xmm7,22-13
+ pxor xmm1,xmm2
+ movdqa xmm12,xmm14
+ pslld xmm2,30-19
+ pxor xmm7,xmm1
+ pxor xmm12,xmm3
+ paddd xmm8,xmm5
+ pxor xmm7,xmm2
+
+ paddd xmm12,xmm5
+ paddd xmm12,xmm7
+ movd xmm5,DWORD[16+r8]
+ movd xmm0,DWORD[16+r9]
+ movd xmm1,DWORD[16+r10]
+ movd xmm2,DWORD[16+r11]
+ punpckldq xmm5,xmm1
+ punpckldq xmm0,xmm2
+ punpckldq xmm5,xmm0
+ movdqa xmm7,xmm8
+DB 102,15,56,0,238
+ movdqa xmm2,xmm8
+
+ psrld xmm7,6
+ movdqa xmm1,xmm8
+ pslld xmm2,7
+ movdqa XMMWORD[(64-128)+rax],xmm5
+ paddd xmm5,xmm11
+
+ psrld xmm1,11
+ pxor xmm7,xmm2
+ pslld xmm2,21-7
+ paddd xmm5,XMMWORD[rbp]
+ pxor xmm7,xmm1
+
+ psrld xmm1,25-11
+ movdqa xmm0,xmm8
+
+ pxor xmm7,xmm2
+ movdqa xmm3,xmm8
+ pslld xmm2,26-21
+ pandn xmm0,xmm10
+ pand xmm3,xmm9
+ pxor xmm7,xmm1
+
+
+ movdqa xmm1,xmm12
+ pxor xmm7,xmm2
+ movdqa xmm2,xmm12
+ psrld xmm1,2
+ paddd xmm5,xmm7
+ pxor xmm0,xmm3
+ movdqa xmm3,xmm13
+ movdqa xmm7,xmm12
+ pslld xmm2,10
+ pxor xmm3,xmm12
+
+
+ psrld xmm7,13
+ pxor xmm1,xmm2
+ paddd xmm5,xmm0
+ pslld xmm2,19-10
+ pand xmm4,xmm3
+ pxor xmm1,xmm7
+
+
+ psrld xmm7,22-13
+ pxor xmm1,xmm2
+ movdqa xmm11,xmm13
+ pslld xmm2,30-19
+ pxor xmm7,xmm1
+ pxor xmm11,xmm4
+ paddd xmm15,xmm5
+ pxor xmm7,xmm2
+
+ paddd xmm11,xmm5
+ paddd xmm11,xmm7
+ movd xmm5,DWORD[20+r8]
+ movd xmm0,DWORD[20+r9]
+ movd xmm1,DWORD[20+r10]
+ movd xmm2,DWORD[20+r11]
+ punpckldq xmm5,xmm1
+ punpckldq xmm0,xmm2
+ punpckldq xmm5,xmm0
+ movdqa xmm7,xmm15
+
+ movdqa xmm2,xmm15
+DB 102,15,56,0,238
+ psrld xmm7,6
+ movdqa xmm1,xmm15
+ pslld xmm2,7
+ movdqa XMMWORD[(80-128)+rax],xmm5
+ paddd xmm5,xmm10
+
+ psrld xmm1,11
+ pxor xmm7,xmm2
+ pslld xmm2,21-7
+ paddd xmm5,XMMWORD[32+rbp]
+ pxor xmm7,xmm1
+
+ psrld xmm1,25-11
+ movdqa xmm0,xmm15
+
+ pxor xmm7,xmm2
+ movdqa xmm4,xmm15
+ pslld xmm2,26-21
+ pandn xmm0,xmm9
+ pand xmm4,xmm8
+ pxor xmm7,xmm1
+
+
+ movdqa xmm1,xmm11
+ pxor xmm7,xmm2
+ movdqa xmm2,xmm11
+ psrld xmm1,2
+ paddd xmm5,xmm7
+ pxor xmm0,xmm4
+ movdqa xmm4,xmm12
+ movdqa xmm7,xmm11
+ pslld xmm2,10
+ pxor xmm4,xmm11
+
+
+ psrld xmm7,13
+ pxor xmm1,xmm2
+ paddd xmm5,xmm0
+ pslld xmm2,19-10
+ pand xmm3,xmm4
+ pxor xmm1,xmm7
+
+
+ psrld xmm7,22-13
+ pxor xmm1,xmm2
+ movdqa xmm10,xmm12
+ pslld xmm2,30-19
+ pxor xmm7,xmm1
+ pxor xmm10,xmm3
+ paddd xmm14,xmm5
+ pxor xmm7,xmm2
+
+ paddd xmm10,xmm5
+ paddd xmm10,xmm7
+ movd xmm5,DWORD[24+r8]
+ movd xmm0,DWORD[24+r9]
+ movd xmm1,DWORD[24+r10]
+ movd xmm2,DWORD[24+r11]
+ punpckldq xmm5,xmm1
+ punpckldq xmm0,xmm2
+ punpckldq xmm5,xmm0
+ movdqa xmm7,xmm14
+DB 102,15,56,0,238
+ movdqa xmm2,xmm14
+
+ psrld xmm7,6
+ movdqa xmm1,xmm14
+ pslld xmm2,7
+ movdqa XMMWORD[(96-128)+rax],xmm5
+ paddd xmm5,xmm9
+
+ psrld xmm1,11
+ pxor xmm7,xmm2
+ pslld xmm2,21-7
+ paddd xmm5,XMMWORD[64+rbp]
+ pxor xmm7,xmm1
+
+ psrld xmm1,25-11
+ movdqa xmm0,xmm14
+
+ pxor xmm7,xmm2
+ movdqa xmm3,xmm14
+ pslld xmm2,26-21
+ pandn xmm0,xmm8
+ pand xmm3,xmm15
+ pxor xmm7,xmm1
+
+
+ movdqa xmm1,xmm10
+ pxor xmm7,xmm2
+ movdqa xmm2,xmm10
+ psrld xmm1,2
+ paddd xmm5,xmm7
+ pxor xmm0,xmm3
+ movdqa xmm3,xmm11
+ movdqa xmm7,xmm10
+ pslld xmm2,10
+ pxor xmm3,xmm10
+
+
+ psrld xmm7,13
+ pxor xmm1,xmm2
+ paddd xmm5,xmm0
+ pslld xmm2,19-10
+ pand xmm4,xmm3
+ pxor xmm1,xmm7
+
+
+ psrld xmm7,22-13
+ pxor xmm1,xmm2
+ movdqa xmm9,xmm11
+ pslld xmm2,30-19
+ pxor xmm7,xmm1
+ pxor xmm9,xmm4
+ paddd xmm13,xmm5
+ pxor xmm7,xmm2
+
+ paddd xmm9,xmm5
+ paddd xmm9,xmm7
+ movd xmm5,DWORD[28+r8]
+ movd xmm0,DWORD[28+r9]
+ movd xmm1,DWORD[28+r10]
+ movd xmm2,DWORD[28+r11]
+ punpckldq xmm5,xmm1
+ punpckldq xmm0,xmm2
+ punpckldq xmm5,xmm0
+ movdqa xmm7,xmm13
+
+ movdqa xmm2,xmm13
+DB 102,15,56,0,238
+ psrld xmm7,6
+ movdqa xmm1,xmm13
+ pslld xmm2,7
+ movdqa XMMWORD[(112-128)+rax],xmm5
+ paddd xmm5,xmm8
+
+ psrld xmm1,11
+ pxor xmm7,xmm2
+ pslld xmm2,21-7
+ paddd xmm5,XMMWORD[96+rbp]
+ pxor xmm7,xmm1
+
+ psrld xmm1,25-11
+ movdqa xmm0,xmm13
+
+ pxor xmm7,xmm2
+ movdqa xmm4,xmm13
+ pslld xmm2,26-21
+ pandn xmm0,xmm15
+ pand xmm4,xmm14
+ pxor xmm7,xmm1
+
+
+ movdqa xmm1,xmm9
+ pxor xmm7,xmm2
+ movdqa xmm2,xmm9
+ psrld xmm1,2
+ paddd xmm5,xmm7
+ pxor xmm0,xmm4
+ movdqa xmm4,xmm10
+ movdqa xmm7,xmm9
+ pslld xmm2,10
+ pxor xmm4,xmm9
+
+
+ psrld xmm7,13
+ pxor xmm1,xmm2
+ paddd xmm5,xmm0
+ pslld xmm2,19-10
+ pand xmm3,xmm4
+ pxor xmm1,xmm7
+
+
+ psrld xmm7,22-13
+ pxor xmm1,xmm2
+ movdqa xmm8,xmm10
+ pslld xmm2,30-19
+ pxor xmm7,xmm1
+ pxor xmm8,xmm3
+ paddd xmm12,xmm5
+ pxor xmm7,xmm2
+
+ paddd xmm8,xmm5
+ paddd xmm8,xmm7
+ lea rbp,[256+rbp]
+ movd xmm5,DWORD[32+r8]
+ movd xmm0,DWORD[32+r9]
+ movd xmm1,DWORD[32+r10]
+ movd xmm2,DWORD[32+r11]
+ punpckldq xmm5,xmm1
+ punpckldq xmm0,xmm2
+ punpckldq xmm5,xmm0
+ movdqa xmm7,xmm12
+DB 102,15,56,0,238
+ movdqa xmm2,xmm12
+
+ psrld xmm7,6
+ movdqa xmm1,xmm12
+ pslld xmm2,7
+ movdqa XMMWORD[(128-128)+rax],xmm5
+ paddd xmm5,xmm15
+
+ psrld xmm1,11
+ pxor xmm7,xmm2
+ pslld xmm2,21-7
+ paddd xmm5,XMMWORD[((-128))+rbp]
+ pxor xmm7,xmm1
+
+ psrld xmm1,25-11
+ movdqa xmm0,xmm12
+
+ pxor xmm7,xmm2
+ movdqa xmm3,xmm12
+ pslld xmm2,26-21
+ pandn xmm0,xmm14
+ pand xmm3,xmm13
+ pxor xmm7,xmm1
+
+
+ movdqa xmm1,xmm8
+ pxor xmm7,xmm2
+ movdqa xmm2,xmm8
+ psrld xmm1,2
+ paddd xmm5,xmm7
+ pxor xmm0,xmm3
+ movdqa xmm3,xmm9
+ movdqa xmm7,xmm8
+ pslld xmm2,10
+ pxor xmm3,xmm8
+
+
+ psrld xmm7,13
+ pxor xmm1,xmm2
+ paddd xmm5,xmm0
+ pslld xmm2,19-10
+ pand xmm4,xmm3
+ pxor xmm1,xmm7
+
+
+ psrld xmm7,22-13
+ pxor xmm1,xmm2
+ movdqa xmm15,xmm9
+ pslld xmm2,30-19
+ pxor xmm7,xmm1
+ pxor xmm15,xmm4
+ paddd xmm11,xmm5
+ pxor xmm7,xmm2
+
+ paddd xmm15,xmm5
+ paddd xmm15,xmm7
+ movd xmm5,DWORD[36+r8]
+ movd xmm0,DWORD[36+r9]
+ movd xmm1,DWORD[36+r10]
+ movd xmm2,DWORD[36+r11]
+ punpckldq xmm5,xmm1
+ punpckldq xmm0,xmm2
+ punpckldq xmm5,xmm0
+ movdqa xmm7,xmm11
+
+ movdqa xmm2,xmm11
+DB 102,15,56,0,238
+ psrld xmm7,6
+ movdqa xmm1,xmm11
+ pslld xmm2,7
+ movdqa XMMWORD[(144-128)+rax],xmm5
+ paddd xmm5,xmm14
+
+ psrld xmm1,11
+ pxor xmm7,xmm2
+ pslld xmm2,21-7
+ paddd xmm5,XMMWORD[((-96))+rbp]
+ pxor xmm7,xmm1
+
+ psrld xmm1,25-11
+ movdqa xmm0,xmm11
+
+ pxor xmm7,xmm2
+ movdqa xmm4,xmm11
+ pslld xmm2,26-21
+ pandn xmm0,xmm13
+ pand xmm4,xmm12
+ pxor xmm7,xmm1
+
+
+ movdqa xmm1,xmm15
+ pxor xmm7,xmm2
+ movdqa xmm2,xmm15
+ psrld xmm1,2
+ paddd xmm5,xmm7
+ pxor xmm0,xmm4
+ movdqa xmm4,xmm8
+ movdqa xmm7,xmm15
+ pslld xmm2,10
+ pxor xmm4,xmm15
+
+
+ psrld xmm7,13
+ pxor xmm1,xmm2
+ paddd xmm5,xmm0
+ pslld xmm2,19-10
+ pand xmm3,xmm4
+ pxor xmm1,xmm7
+
+
+ psrld xmm7,22-13
+ pxor xmm1,xmm2
+ movdqa xmm14,xmm8
+ pslld xmm2,30-19
+ pxor xmm7,xmm1
+ pxor xmm14,xmm3
+ paddd xmm10,xmm5
+ pxor xmm7,xmm2
+
+ paddd xmm14,xmm5
+ paddd xmm14,xmm7
+ movd xmm5,DWORD[40+r8]
+ movd xmm0,DWORD[40+r9]
+ movd xmm1,DWORD[40+r10]
+ movd xmm2,DWORD[40+r11]
+ punpckldq xmm5,xmm1
+ punpckldq xmm0,xmm2
+ punpckldq xmm5,xmm0
+ movdqa xmm7,xmm10
+DB 102,15,56,0,238
+ movdqa xmm2,xmm10
+
+ psrld xmm7,6
+ movdqa xmm1,xmm10
+ pslld xmm2,7
+ movdqa XMMWORD[(160-128)+rax],xmm5
+ paddd xmm5,xmm13
+
+ psrld xmm1,11
+ pxor xmm7,xmm2
+ pslld xmm2,21-7
+ paddd xmm5,XMMWORD[((-64))+rbp]
+ pxor xmm7,xmm1
+
+ psrld xmm1,25-11
+ movdqa xmm0,xmm10
+
+ pxor xmm7,xmm2
+ movdqa xmm3,xmm10
+ pslld xmm2,26-21
+ pandn xmm0,xmm12
+ pand xmm3,xmm11
+ pxor xmm7,xmm1
+
+
+ movdqa xmm1,xmm14
+ pxor xmm7,xmm2
+ movdqa xmm2,xmm14
+ psrld xmm1,2
+ paddd xmm5,xmm7
+ pxor xmm0,xmm3
+ movdqa xmm3,xmm15
+ movdqa xmm7,xmm14
+ pslld xmm2,10
+ pxor xmm3,xmm14
+
+
+ psrld xmm7,13
+ pxor xmm1,xmm2
+ paddd xmm5,xmm0
+ pslld xmm2,19-10
+ pand xmm4,xmm3
+ pxor xmm1,xmm7
+
+
+ psrld xmm7,22-13
+ pxor xmm1,xmm2
+ movdqa xmm13,xmm15
+ pslld xmm2,30-19
+ pxor xmm7,xmm1
+ pxor xmm13,xmm4
+ paddd xmm9,xmm5
+ pxor xmm7,xmm2
+
+ paddd xmm13,xmm5
+ paddd xmm13,xmm7
+ movd xmm5,DWORD[44+r8]
+ movd xmm0,DWORD[44+r9]
+ movd xmm1,DWORD[44+r10]
+ movd xmm2,DWORD[44+r11]
+ punpckldq xmm5,xmm1
+ punpckldq xmm0,xmm2
+ punpckldq xmm5,xmm0
+ movdqa xmm7,xmm9
+
+ movdqa xmm2,xmm9
+DB 102,15,56,0,238
+ psrld xmm7,6
+ movdqa xmm1,xmm9
+ pslld xmm2,7
+ movdqa XMMWORD[(176-128)+rax],xmm5
+ paddd xmm5,xmm12
+
+ psrld xmm1,11
+ pxor xmm7,xmm2
+ pslld xmm2,21-7
+ paddd xmm5,XMMWORD[((-32))+rbp]
+ pxor xmm7,xmm1
+
+ psrld xmm1,25-11
+ movdqa xmm0,xmm9
+
+ pxor xmm7,xmm2
+ movdqa xmm4,xmm9
+ pslld xmm2,26-21
+ pandn xmm0,xmm11
+ pand xmm4,xmm10
+ pxor xmm7,xmm1
+
+
+ movdqa xmm1,xmm13
+ pxor xmm7,xmm2
+ movdqa xmm2,xmm13
+ psrld xmm1,2
+ paddd xmm5,xmm7
+ pxor xmm0,xmm4
+ movdqa xmm4,xmm14
+ movdqa xmm7,xmm13
+ pslld xmm2,10
+ pxor xmm4,xmm13
+
+
+ psrld xmm7,13
+ pxor xmm1,xmm2
+ paddd xmm5,xmm0
+ pslld xmm2,19-10
+ pand xmm3,xmm4
+ pxor xmm1,xmm7
+
+
+ psrld xmm7,22-13
+ pxor xmm1,xmm2
+ movdqa xmm12,xmm14
+ pslld xmm2,30-19
+ pxor xmm7,xmm1
+ pxor xmm12,xmm3
+ paddd xmm8,xmm5
+ pxor xmm7,xmm2
+
+ paddd xmm12,xmm5
+ paddd xmm12,xmm7
+ movd xmm5,DWORD[48+r8]
+ movd xmm0,DWORD[48+r9]
+ movd xmm1,DWORD[48+r10]
+ movd xmm2,DWORD[48+r11]
+ punpckldq xmm5,xmm1
+ punpckldq xmm0,xmm2
+ punpckldq xmm5,xmm0
+ movdqa xmm7,xmm8
+DB 102,15,56,0,238
+ movdqa xmm2,xmm8
+
+ psrld xmm7,6
+ movdqa xmm1,xmm8
+ pslld xmm2,7
+ movdqa XMMWORD[(192-128)+rax],xmm5
+ paddd xmm5,xmm11
+
+ psrld xmm1,11
+ pxor xmm7,xmm2
+ pslld xmm2,21-7
+ paddd xmm5,XMMWORD[rbp]
+ pxor xmm7,xmm1
+
+ psrld xmm1,25-11
+ movdqa xmm0,xmm8
+
+ pxor xmm7,xmm2
+ movdqa xmm3,xmm8
+ pslld xmm2,26-21
+ pandn xmm0,xmm10
+ pand xmm3,xmm9
+ pxor xmm7,xmm1
+
+
+ movdqa xmm1,xmm12
+ pxor xmm7,xmm2
+ movdqa xmm2,xmm12
+ psrld xmm1,2
+ paddd xmm5,xmm7
+ pxor xmm0,xmm3
+ movdqa xmm3,xmm13
+ movdqa xmm7,xmm12
+ pslld xmm2,10
+ pxor xmm3,xmm12
+
+
+ psrld xmm7,13
+ pxor xmm1,xmm2
+ paddd xmm5,xmm0
+ pslld xmm2,19-10
+ pand xmm4,xmm3
+ pxor xmm1,xmm7
+
+
+ psrld xmm7,22-13
+ pxor xmm1,xmm2
+ movdqa xmm11,xmm13
+ pslld xmm2,30-19
+ pxor xmm7,xmm1
+ pxor xmm11,xmm4
+ paddd xmm15,xmm5
+ pxor xmm7,xmm2
+
+ paddd xmm11,xmm5
+ paddd xmm11,xmm7
+ movd xmm5,DWORD[52+r8]
+ movd xmm0,DWORD[52+r9]
+ movd xmm1,DWORD[52+r10]
+ movd xmm2,DWORD[52+r11]
+ punpckldq xmm5,xmm1
+ punpckldq xmm0,xmm2
+ punpckldq xmm5,xmm0
+ movdqa xmm7,xmm15
+
+ movdqa xmm2,xmm15
+DB 102,15,56,0,238
+ psrld xmm7,6
+ movdqa xmm1,xmm15
+ pslld xmm2,7
+ movdqa XMMWORD[(208-128)+rax],xmm5
+ paddd xmm5,xmm10
+
+ psrld xmm1,11
+ pxor xmm7,xmm2
+ pslld xmm2,21-7
+ paddd xmm5,XMMWORD[32+rbp]
+ pxor xmm7,xmm1
+
+ psrld xmm1,25-11
+ movdqa xmm0,xmm15
+
+ pxor xmm7,xmm2
+ movdqa xmm4,xmm15
+ pslld xmm2,26-21
+ pandn xmm0,xmm9
+ pand xmm4,xmm8
+ pxor xmm7,xmm1
+
+
+ movdqa xmm1,xmm11
+ pxor xmm7,xmm2
+ movdqa xmm2,xmm11
+ psrld xmm1,2
+ paddd xmm5,xmm7
+ pxor xmm0,xmm4
+ movdqa xmm4,xmm12
+ movdqa xmm7,xmm11
+ pslld xmm2,10
+ pxor xmm4,xmm11
+
+
+ psrld xmm7,13
+ pxor xmm1,xmm2
+ paddd xmm5,xmm0
+ pslld xmm2,19-10
+ pand xmm3,xmm4
+ pxor xmm1,xmm7
+
+
+ psrld xmm7,22-13
+ pxor xmm1,xmm2
+ movdqa xmm10,xmm12
+ pslld xmm2,30-19
+ pxor xmm7,xmm1
+ pxor xmm10,xmm3
+ paddd xmm14,xmm5
+ pxor xmm7,xmm2
+
+ paddd xmm10,xmm5
+ paddd xmm10,xmm7
+ movd xmm5,DWORD[56+r8]
+ movd xmm0,DWORD[56+r9]
+ movd xmm1,DWORD[56+r10]
+ movd xmm2,DWORD[56+r11]
+ punpckldq xmm5,xmm1
+ punpckldq xmm0,xmm2
+ punpckldq xmm5,xmm0
+ movdqa xmm7,xmm14
+DB 102,15,56,0,238
+ movdqa xmm2,xmm14
+
+ psrld xmm7,6
+ movdqa xmm1,xmm14
+ pslld xmm2,7
+ movdqa XMMWORD[(224-128)+rax],xmm5
+ paddd xmm5,xmm9
+
+ psrld xmm1,11
+ pxor xmm7,xmm2
+ pslld xmm2,21-7
+ paddd xmm5,XMMWORD[64+rbp]
+ pxor xmm7,xmm1
+
+ psrld xmm1,25-11
+ movdqa xmm0,xmm14
+
+ pxor xmm7,xmm2
+ movdqa xmm3,xmm14
+ pslld xmm2,26-21
+ pandn xmm0,xmm8
+ pand xmm3,xmm15
+ pxor xmm7,xmm1
+
+
+ movdqa xmm1,xmm10
+ pxor xmm7,xmm2
+ movdqa xmm2,xmm10
+ psrld xmm1,2
+ paddd xmm5,xmm7
+ pxor xmm0,xmm3
+ movdqa xmm3,xmm11
+ movdqa xmm7,xmm10
+ pslld xmm2,10
+ pxor xmm3,xmm10
+
+
+ psrld xmm7,13
+ pxor xmm1,xmm2
+ paddd xmm5,xmm0
+ pslld xmm2,19-10
+ pand xmm4,xmm3
+ pxor xmm1,xmm7
+
+
+ psrld xmm7,22-13
+ pxor xmm1,xmm2
+ movdqa xmm9,xmm11
+ pslld xmm2,30-19
+ pxor xmm7,xmm1
+ pxor xmm9,xmm4
+ paddd xmm13,xmm5
+ pxor xmm7,xmm2
+
+ paddd xmm9,xmm5
+ paddd xmm9,xmm7
+ movd xmm5,DWORD[60+r8]
+ lea r8,[64+r8]
+ movd xmm0,DWORD[60+r9]
+ lea r9,[64+r9]
+ movd xmm1,DWORD[60+r10]
+ lea r10,[64+r10]
+ movd xmm2,DWORD[60+r11]
+ lea r11,[64+r11]
+ punpckldq xmm5,xmm1
+ punpckldq xmm0,xmm2
+ punpckldq xmm5,xmm0
+ movdqa xmm7,xmm13
+
+ movdqa xmm2,xmm13
+DB 102,15,56,0,238
+ psrld xmm7,6
+ movdqa xmm1,xmm13
+ pslld xmm2,7
+ movdqa XMMWORD[(240-128)+rax],xmm5
+ paddd xmm5,xmm8
+
+ psrld xmm1,11
+ pxor xmm7,xmm2
+ pslld xmm2,21-7
+ paddd xmm5,XMMWORD[96+rbp]
+ pxor xmm7,xmm1
+
+ psrld xmm1,25-11
+ movdqa xmm0,xmm13
+ prefetcht0 [63+r8]
+ pxor xmm7,xmm2
+ movdqa xmm4,xmm13
+ pslld xmm2,26-21
+ pandn xmm0,xmm15
+ pand xmm4,xmm14
+ pxor xmm7,xmm1
+
+ prefetcht0 [63+r9]
+ movdqa xmm1,xmm9
+ pxor xmm7,xmm2
+ movdqa xmm2,xmm9
+ psrld xmm1,2
+ paddd xmm5,xmm7
+ pxor xmm0,xmm4
+ movdqa xmm4,xmm10
+ movdqa xmm7,xmm9
+ pslld xmm2,10
+ pxor xmm4,xmm9
+
+ prefetcht0 [63+r10]
+ psrld xmm7,13
+ pxor xmm1,xmm2
+ paddd xmm5,xmm0
+ pslld xmm2,19-10
+ pand xmm3,xmm4
+ pxor xmm1,xmm7
+
+ prefetcht0 [63+r11]
+ psrld xmm7,22-13
+ pxor
This message has been truncated.


[PATCH v3 1/2] CryptoPkg/OpensslLib: Add native instruction support for X64

Zurcher, Christopher J
 

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2507

Adding OpensslLibX64.inf and modifying process_files.pl to process this
file and generate the necessary assembly files.
ApiHooks.c contains a stub function for a Windows API call.
uefi-asm.conf contains the limited assembly configurations for OpenSSL.

Cc: Jiewen Yao <jiewen.yao@...>
Cc: Jian J Wang <jian.j.wang@...>
Cc: Xiaoyu Lu <xiaoyux.lu@...>
Cc: Ard Biesheuvel <ard.biesheuvel@...>
Signed-off-by: Christopher J Zurcher <christopher.j.zurcher@...>
---
CryptoPkg/Library/OpensslLib/OpensslLib.inf | 2 +-
CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 2 +-
CryptoPkg/Library/OpensslLib/OpensslLibX64.inf | 657 ++++++++++++++++++++
CryptoPkg/Library/Include/CrtLibSupport.h | 2 +
CryptoPkg/Library/Include/openssl/opensslconf.h | 3 -
CryptoPkg/Library/OpensslLib/ApiHooks.c | 18 +
CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c | 34 +
CryptoPkg/Library/OpensslLib/process_files.pl | 223 +++++--
CryptoPkg/Library/OpensslLib/uefi-asm.conf | 15 +
9 files changed, 906 insertions(+), 50 deletions(-)

diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
index b00bb74ce6..d84bde056a 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
@@ -16,7 +16,7 @@
VERSION_STRING = 1.0
LIBRARY_CLASS = OpensslLib
DEFINE OPENSSL_PATH = openssl
- DEFINE OPENSSL_FLAGS = -DL_ENDIAN -DOPENSSL_SMALL_FOOTPRINT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
+ DEFINE OPENSSL_FLAGS = -DL_ENDIAN -DOPENSSL_SMALL_FOOTPRINT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DOPENSSL_NO_ASM

#
# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64
diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
index 3557711bd8..cdeed0d073 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
@@ -16,7 +16,7 @@
VERSION_STRING = 1.0
LIBRARY_CLASS = OpensslLib
DEFINE OPENSSL_PATH = openssl
- DEFINE OPENSSL_FLAGS = -DL_ENDIAN -DOPENSSL_SMALL_FOOTPRINT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
+ DEFINE OPENSSL_FLAGS = -DL_ENDIAN -DOPENSSL_SMALL_FOOTPRINT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DOPENSSL_NO_ASM

#
# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64
diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibX64.inf b/CryptoPkg/Library/OpensslLib/OpensslLibX64.inf
new file mode 100644
index 0000000000..8548eb879c
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/OpensslLibX64.inf
@@ -0,0 +1,657 @@
+## @file
+# This module provides OpenSSL Library implementation.
+#
+# Copyright (c) 2010 - 2020, Intel Corporation. All rights reserved.<BR>
+# (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = OpensslLibX64
+ MODULE_UNI_FILE = OpensslLib.uni
+ FILE_GUID = 18125E50-0117-4DD0-BE54-4784AD995FEF
+ MODULE_TYPE = BASE
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = OpensslLib
+ DEFINE OPENSSL_PATH = openssl
+ DEFINE OPENSSL_FLAGS = -DL_ENDIAN -DOPENSSL_SMALL_FOOTPRINT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
+ DEFINE OPENSSL_FLAGS_CONFIG = -DOPENSSL_CPUID_OBJ -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM
+ CONSTRUCTOR = OpensslLibConstructor
+
+#
+# VALID_ARCHITECTURES = X64
+#
+
+[Sources]
+ OpensslLibConstructor.c
+ $(OPENSSL_PATH)/e_os.h
+ $(OPENSSL_PATH)/ms/uplink.h
+# Autogenerated files list starts here
+ X64/crypto/aes/aesni-mb-x86_64.nasm
+ X64/crypto/aes/aesni-sha1-x86_64.nasm
+ X64/crypto/aes/aesni-sha256-x86_64.nasm
+ X64/crypto/aes/aesni-x86_64.nasm
+ X64/crypto/aes/vpaes-x86_64.nasm
+ X64/crypto/modes/aesni-gcm-x86_64.nasm
+ X64/crypto/modes/ghash-x86_64.nasm
+ X64/crypto/sha/sha1-mb-x86_64.nasm
+ X64/crypto/sha/sha1-x86_64.nasm
+ X64/crypto/sha/sha256-mb-x86_64.nasm
+ X64/crypto/sha/sha256-x86_64.nasm
+ X64/crypto/sha/sha512-x86_64.nasm
+ X64/crypto/x86_64cpuid.nasm
+ $(OPENSSL_PATH)/crypto/aes/aes_cbc.c
+ $(OPENSSL_PATH)/crypto/aes/aes_cfb.c
+ $(OPENSSL_PATH)/crypto/aes/aes_core.c
+ $(OPENSSL_PATH)/crypto/aes/aes_ige.c
+ $(OPENSSL_PATH)/crypto/aes/aes_misc.c
+ $(OPENSSL_PATH)/crypto/aes/aes_ofb.c
+ $(OPENSSL_PATH)/crypto/aes/aes_wrap.c
+ $(OPENSSL_PATH)/crypto/aria/aria.c
+ $(OPENSSL_PATH)/crypto/asn1/a_bitstr.c
+ $(OPENSSL_PATH)/crypto/asn1/a_d2i_fp.c
+ $(OPENSSL_PATH)/crypto/asn1/a_digest.c
+ $(OPENSSL_PATH)/crypto/asn1/a_dup.c
+ $(OPENSSL_PATH)/crypto/asn1/a_gentm.c
+ $(OPENSSL_PATH)/crypto/asn1/a_i2d_fp.c
+ $(OPENSSL_PATH)/crypto/asn1/a_int.c
+ $(OPENSSL_PATH)/crypto/asn1/a_mbstr.c
+ $(OPENSSL_PATH)/crypto/asn1/a_object.c
+ $(OPENSSL_PATH)/crypto/asn1/a_octet.c
+ $(OPENSSL_PATH)/crypto/asn1/a_print.c
+ $(OPENSSL_PATH)/crypto/asn1/a_sign.c
+ $(OPENSSL_PATH)/crypto/asn1/a_strex.c
+ $(OPENSSL_PATH)/crypto/asn1/a_strnid.c
+ $(OPENSSL_PATH)/crypto/asn1/a_time.c
+ $(OPENSSL_PATH)/crypto/asn1/a_type.c
+ $(OPENSSL_PATH)/crypto/asn1/a_utctm.c
+ $(OPENSSL_PATH)/crypto/asn1/a_utf8.c
+ $(OPENSSL_PATH)/crypto/asn1/a_verify.c
+ $(OPENSSL_PATH)/crypto/asn1/ameth_lib.c
+ $(OPENSSL_PATH)/crypto/asn1/asn1_err.c
+ $(OPENSSL_PATH)/crypto/asn1/asn1_gen.c
+ $(OPENSSL_PATH)/crypto/asn1/asn1_item_list.c
+ $(OPENSSL_PATH)/crypto/asn1/asn1_lib.c
+ $(OPENSSL_PATH)/crypto/asn1/asn1_par.c
+ $(OPENSSL_PATH)/crypto/asn1/asn_mime.c
+ $(OPENSSL_PATH)/crypto/asn1/asn_moid.c
+ $(OPENSSL_PATH)/crypto/asn1/asn_mstbl.c
+ $(OPENSSL_PATH)/crypto/asn1/asn_pack.c
+ $(OPENSSL_PATH)/crypto/asn1/bio_asn1.c
+ $(OPENSSL_PATH)/crypto/asn1/bio_ndef.c
+ $(OPENSSL_PATH)/crypto/asn1/d2i_pr.c
+ $(OPENSSL_PATH)/crypto/asn1/d2i_pu.c
+ $(OPENSSL_PATH)/crypto/asn1/evp_asn1.c
+ $(OPENSSL_PATH)/crypto/asn1/f_int.c
+ $(OPENSSL_PATH)/crypto/asn1/f_string.c
+ $(OPENSSL_PATH)/crypto/asn1/i2d_pr.c
+ $(OPENSSL_PATH)/crypto/asn1/i2d_pu.c
+ $(OPENSSL_PATH)/crypto/asn1/n_pkey.c
+ $(OPENSSL_PATH)/crypto/asn1/nsseq.c
+ $(OPENSSL_PATH)/crypto/asn1/p5_pbe.c
+ $(OPENSSL_PATH)/crypto/asn1/p5_pbev2.c
+ $(OPENSSL_PATH)/crypto/asn1/p5_scrypt.c
+ $(OPENSSL_PATH)/crypto/asn1/p8_pkey.c
+ $(OPENSSL_PATH)/crypto/asn1/t_bitst.c
+ $(OPENSSL_PATH)/crypto/asn1/t_pkey.c
+ $(OPENSSL_PATH)/crypto/asn1/t_spki.c
+ $(OPENSSL_PATH)/crypto/asn1/tasn_dec.c
+ $(OPENSSL_PATH)/crypto/asn1/tasn_enc.c
+ $(OPENSSL_PATH)/crypto/asn1/tasn_fre.c
+ $(OPENSSL_PATH)/crypto/asn1/tasn_new.c
+ $(OPENSSL_PATH)/crypto/asn1/tasn_prn.c
+ $(OPENSSL_PATH)/crypto/asn1/tasn_scn.c
+ $(OPENSSL_PATH)/crypto/asn1/tasn_typ.c
+ $(OPENSSL_PATH)/crypto/asn1/tasn_utl.c
+ $(OPENSSL_PATH)/crypto/asn1/x_algor.c
+ $(OPENSSL_PATH)/crypto/asn1/x_bignum.c
+ $(OPENSSL_PATH)/crypto/asn1/x_info.c
+ $(OPENSSL_PATH)/crypto/asn1/x_int64.c
+ $(OPENSSL_PATH)/crypto/asn1/x_long.c
+ $(OPENSSL_PATH)/crypto/asn1/x_pkey.c
+ $(OPENSSL_PATH)/crypto/asn1/x_sig.c
+ $(OPENSSL_PATH)/crypto/asn1/x_spki.c
+ $(OPENSSL_PATH)/crypto/asn1/x_val.c
+ $(OPENSSL_PATH)/crypto/async/arch/async_null.c
+ $(OPENSSL_PATH)/crypto/async/arch/async_posix.c
+ $(OPENSSL_PATH)/crypto/async/arch/async_win.c
+ $(OPENSSL_PATH)/crypto/async/async.c
+ $(OPENSSL_PATH)/crypto/async/async_err.c
+ $(OPENSSL_PATH)/crypto/async/async_wait.c
+ $(OPENSSL_PATH)/crypto/bio/b_addr.c
+ $(OPENSSL_PATH)/crypto/bio/b_dump.c
+ $(OPENSSL_PATH)/crypto/bio/b_sock.c
+ $(OPENSSL_PATH)/crypto/bio/b_sock2.c
+ $(OPENSSL_PATH)/crypto/bio/bf_buff.c
+ $(OPENSSL_PATH)/crypto/bio/bf_lbuf.c
+ $(OPENSSL_PATH)/crypto/bio/bf_nbio.c
+ $(OPENSSL_PATH)/crypto/bio/bf_null.c
+ $(OPENSSL_PATH)/crypto/bio/bio_cb.c
+ $(OPENSSL_PATH)/crypto/bio/bio_err.c
+ $(OPENSSL_PATH)/crypto/bio/bio_lib.c
+ $(OPENSSL_PATH)/crypto/bio/bio_meth.c
+ $(OPENSSL_PATH)/crypto/bio/bss_acpt.c
+ $(OPENSSL_PATH)/crypto/bio/bss_bio.c
+ $(OPENSSL_PATH)/crypto/bio/bss_conn.c
+ $(OPENSSL_PATH)/crypto/bio/bss_dgram.c
+ $(OPENSSL_PATH)/crypto/bio/bss_fd.c
+ $(OPENSSL_PATH)/crypto/bio/bss_file.c
+ $(OPENSSL_PATH)/crypto/bio/bss_log.c
+ $(OPENSSL_PATH)/crypto/bio/bss_mem.c
+ $(OPENSSL_PATH)/crypto/bio/bss_null.c
+ $(OPENSSL_PATH)/crypto/bio/bss_sock.c
+ $(OPENSSL_PATH)/crypto/bn/bn_add.c
+ $(OPENSSL_PATH)/crypto/bn/bn_asm.c
+ $(OPENSSL_PATH)/crypto/bn/bn_blind.c
+ $(OPENSSL_PATH)/crypto/bn/bn_const.c
+ $(OPENSSL_PATH)/crypto/bn/bn_ctx.c
+ $(OPENSSL_PATH)/crypto/bn/bn_depr.c
+ $(OPENSSL_PATH)/crypto/bn/bn_dh.c
+ $(OPENSSL_PATH)/crypto/bn/bn_div.c
+ $(OPENSSL_PATH)/crypto/bn/bn_err.c
+ $(OPENSSL_PATH)/crypto/bn/bn_exp.c
+ $(OPENSSL_PATH)/crypto/bn/bn_exp2.c
+ $(OPENSSL_PATH)/crypto/bn/bn_gcd.c
+ $(OPENSSL_PATH)/crypto/bn/bn_gf2m.c
+ $(OPENSSL_PATH)/crypto/bn/bn_intern.c
+ $(OPENSSL_PATH)/crypto/bn/bn_kron.c
+ $(OPENSSL_PATH)/crypto/bn/bn_lib.c
+ $(OPENSSL_PATH)/crypto/bn/bn_mod.c
+ $(OPENSSL_PATH)/crypto/bn/bn_mont.c
+ $(OPENSSL_PATH)/crypto/bn/bn_mpi.c
+ $(OPENSSL_PATH)/crypto/bn/bn_mul.c
+ $(OPENSSL_PATH)/crypto/bn/bn_nist.c
+ $(OPENSSL_PATH)/crypto/bn/bn_prime.c
+ $(OPENSSL_PATH)/crypto/bn/bn_print.c
+ $(OPENSSL_PATH)/crypto/bn/bn_rand.c
+ $(OPENSSL_PATH)/crypto/bn/bn_recp.c
+ $(OPENSSL_PATH)/crypto/bn/bn_shift.c
+ $(OPENSSL_PATH)/crypto/bn/bn_sqr.c
+ $(OPENSSL_PATH)/crypto/bn/bn_sqrt.c
+ $(OPENSSL_PATH)/crypto/bn/bn_srp.c
+ $(OPENSSL_PATH)/crypto/bn/bn_word.c
+ $(OPENSSL_PATH)/crypto/bn/bn_x931p.c
+ $(OPENSSL_PATH)/crypto/buffer/buf_err.c
+ $(OPENSSL_PATH)/crypto/buffer/buffer.c
+ $(OPENSSL_PATH)/crypto/cmac/cm_ameth.c
+ $(OPENSSL_PATH)/crypto/cmac/cm_pmeth.c
+ $(OPENSSL_PATH)/crypto/cmac/cmac.c
+ $(OPENSSL_PATH)/crypto/comp/c_zlib.c
+ $(OPENSSL_PATH)/crypto/comp/comp_err.c
+ $(OPENSSL_PATH)/crypto/comp/comp_lib.c
+ $(OPENSSL_PATH)/crypto/conf/conf_api.c
+ $(OPENSSL_PATH)/crypto/conf/conf_def.c
+ $(OPENSSL_PATH)/crypto/conf/conf_err.c
+ $(OPENSSL_PATH)/crypto/conf/conf_lib.c
+ $(OPENSSL_PATH)/crypto/conf/conf_mall.c
+ $(OPENSSL_PATH)/crypto/conf/conf_mod.c
+ $(OPENSSL_PATH)/crypto/conf/conf_sap.c
+ $(OPENSSL_PATH)/crypto/conf/conf_ssl.c
+ $(OPENSSL_PATH)/crypto/cpt_err.c
+ $(OPENSSL_PATH)/crypto/cryptlib.c
+ $(OPENSSL_PATH)/crypto/ctype.c
+ $(OPENSSL_PATH)/crypto/cversion.c
+ $(OPENSSL_PATH)/crypto/dh/dh_ameth.c
+ $(OPENSSL_PATH)/crypto/dh/dh_asn1.c
+ $(OPENSSL_PATH)/crypto/dh/dh_check.c
+ $(OPENSSL_PATH)/crypto/dh/dh_depr.c
+ $(OPENSSL_PATH)/crypto/dh/dh_err.c
+ $(OPENSSL_PATH)/crypto/dh/dh_gen.c
+ $(OPENSSL_PATH)/crypto/dh/dh_kdf.c
+ $(OPENSSL_PATH)/crypto/dh/dh_key.c
+ $(OPENSSL_PATH)/crypto/dh/dh_lib.c
+ $(OPENSSL_PATH)/crypto/dh/dh_meth.c
+ $(OPENSSL_PATH)/crypto/dh/dh_pmeth.c
+ $(OPENSSL_PATH)/crypto/dh/dh_prn.c
+ $(OPENSSL_PATH)/crypto/dh/dh_rfc5114.c
+ $(OPENSSL_PATH)/crypto/dh/dh_rfc7919.c
+ $(OPENSSL_PATH)/crypto/dso/dso_dl.c
+ $(OPENSSL_PATH)/crypto/dso/dso_dlfcn.c
+ $(OPENSSL_PATH)/crypto/dso/dso_err.c
+ $(OPENSSL_PATH)/crypto/dso/dso_lib.c
+ $(OPENSSL_PATH)/crypto/dso/dso_openssl.c
+ $(OPENSSL_PATH)/crypto/dso/dso_vms.c
+ $(OPENSSL_PATH)/crypto/dso/dso_win32.c
+ $(OPENSSL_PATH)/crypto/ebcdic.c
+ $(OPENSSL_PATH)/crypto/err/err.c
+ $(OPENSSL_PATH)/crypto/err/err_prn.c
+ $(OPENSSL_PATH)/crypto/evp/bio_b64.c
+ $(OPENSSL_PATH)/crypto/evp/bio_enc.c
+ $(OPENSSL_PATH)/crypto/evp/bio_md.c
+ $(OPENSSL_PATH)/crypto/evp/bio_ok.c
+ $(OPENSSL_PATH)/crypto/evp/c_allc.c
+ $(OPENSSL_PATH)/crypto/evp/c_alld.c
+ $(OPENSSL_PATH)/crypto/evp/cmeth_lib.c
+ $(OPENSSL_PATH)/crypto/evp/digest.c
+ $(OPENSSL_PATH)/crypto/evp/e_aes.c
+ $(OPENSSL_PATH)/crypto/evp/e_aes_cbc_hmac_sha1.c
+ $(OPENSSL_PATH)/crypto/evp/e_aes_cbc_hmac_sha256.c
+ $(OPENSSL_PATH)/crypto/evp/e_aria.c
+ $(OPENSSL_PATH)/crypto/evp/e_bf.c
+ $(OPENSSL_PATH)/crypto/evp/e_camellia.c
+ $(OPENSSL_PATH)/crypto/evp/e_cast.c
+ $(OPENSSL_PATH)/crypto/evp/e_chacha20_poly1305.c
+ $(OPENSSL_PATH)/crypto/evp/e_des.c
+ $(OPENSSL_PATH)/crypto/evp/e_des3.c
+ $(OPENSSL_PATH)/crypto/evp/e_idea.c
+ $(OPENSSL_PATH)/crypto/evp/e_null.c
+ $(OPENSSL_PATH)/crypto/evp/e_old.c
+ $(OPENSSL_PATH)/crypto/evp/e_rc2.c
+ $(OPENSSL_PATH)/crypto/evp/e_rc4.c
+ $(OPENSSL_PATH)/crypto/evp/e_rc4_hmac_md5.c
+ $(OPENSSL_PATH)/crypto/evp/e_rc5.c
+ $(OPENSSL_PATH)/crypto/evp/e_seed.c
+ $(OPENSSL_PATH)/crypto/evp/e_sm4.c
+ $(OPENSSL_PATH)/crypto/evp/e_xcbc_d.c
+ $(OPENSSL_PATH)/crypto/evp/encode.c
+ $(OPENSSL_PATH)/crypto/evp/evp_cnf.c
+ $(OPENSSL_PATH)/crypto/evp/evp_enc.c
+ $(OPENSSL_PATH)/crypto/evp/evp_err.c
+ $(OPENSSL_PATH)/crypto/evp/evp_key.c
+ $(OPENSSL_PATH)/crypto/evp/evp_lib.c
+ $(OPENSSL_PATH)/crypto/evp/evp_pbe.c
+ $(OPENSSL_PATH)/crypto/evp/evp_pkey.c
+ $(OPENSSL_PATH)/crypto/evp/m_md2.c
+ $(OPENSSL_PATH)/crypto/evp/m_md4.c
+ $(OPENSSL_PATH)/crypto/evp/m_md5.c
+ $(OPENSSL_PATH)/crypto/evp/m_md5_sha1.c
+ $(OPENSSL_PATH)/crypto/evp/m_mdc2.c
+ $(OPENSSL_PATH)/crypto/evp/m_null.c
+ $(OPENSSL_PATH)/crypto/evp/m_ripemd.c
+ $(OPENSSL_PATH)/crypto/evp/m_sha1.c
+ $(OPENSSL_PATH)/crypto/evp/m_sha3.c
+ $(OPENSSL_PATH)/crypto/evp/m_sigver.c
+ $(OPENSSL_PATH)/crypto/evp/m_wp.c
+ $(OPENSSL_PATH)/crypto/evp/names.c
+ $(OPENSSL_PATH)/crypto/evp/p5_crpt.c
+ $(OPENSSL_PATH)/crypto/evp/p5_crpt2.c
+ $(OPENSSL_PATH)/crypto/evp/p_dec.c
+ $(OPENSSL_PATH)/crypto/evp/p_enc.c
+ $(OPENSSL_PATH)/crypto/evp/p_lib.c
+ $(OPENSSL_PATH)/crypto/evp/p_open.c
+ $(OPENSSL_PATH)/crypto/evp/p_seal.c
+ $(OPENSSL_PATH)/crypto/evp/p_sign.c
+ $(OPENSSL_PATH)/crypto/evp/p_verify.c
+ $(OPENSSL_PATH)/crypto/evp/pbe_scrypt.c
+ $(OPENSSL_PATH)/crypto/evp/pmeth_fn.c
+ $(OPENSSL_PATH)/crypto/evp/pmeth_gn.c
+ $(OPENSSL_PATH)/crypto/evp/pmeth_lib.c
+ $(OPENSSL_PATH)/crypto/ex_data.c
+ $(OPENSSL_PATH)/crypto/getenv.c
+ $(OPENSSL_PATH)/crypto/hmac/hm_ameth.c
+ $(OPENSSL_PATH)/crypto/hmac/hm_pmeth.c
+ $(OPENSSL_PATH)/crypto/hmac/hmac.c
+ $(OPENSSL_PATH)/crypto/init.c
+ $(OPENSSL_PATH)/crypto/kdf/hkdf.c
+ $(OPENSSL_PATH)/crypto/kdf/kdf_err.c
+ $(OPENSSL_PATH)/crypto/kdf/scrypt.c
+ $(OPENSSL_PATH)/crypto/kdf/tls1_prf.c
+ $(OPENSSL_PATH)/crypto/lhash/lh_stats.c
+ $(OPENSSL_PATH)/crypto/lhash/lhash.c
+ $(OPENSSL_PATH)/crypto/md5/md5_dgst.c
+ $(OPENSSL_PATH)/crypto/md5/md5_one.c
+ $(OPENSSL_PATH)/crypto/mem.c
+ $(OPENSSL_PATH)/crypto/mem_dbg.c
+ $(OPENSSL_PATH)/crypto/mem_sec.c
+ $(OPENSSL_PATH)/crypto/modes/cbc128.c
+ $(OPENSSL_PATH)/crypto/modes/ccm128.c
+ $(OPENSSL_PATH)/crypto/modes/cfb128.c
+ $(OPENSSL_PATH)/crypto/modes/ctr128.c
+ $(OPENSSL_PATH)/crypto/modes/cts128.c
+ $(OPENSSL_PATH)/crypto/modes/gcm128.c
+ $(OPENSSL_PATH)/crypto/modes/ocb128.c
+ $(OPENSSL_PATH)/crypto/modes/ofb128.c
+ $(OPENSSL_PATH)/crypto/modes/wrap128.c
+ $(OPENSSL_PATH)/crypto/modes/xts128.c
+ $(OPENSSL_PATH)/crypto/o_dir.c
+ $(OPENSSL_PATH)/crypto/o_fips.c
+ $(OPENSSL_PATH)/crypto/o_fopen.c
+ $(OPENSSL_PATH)/crypto/o_init.c
+ $(OPENSSL_PATH)/crypto/o_str.c
+ $(OPENSSL_PATH)/crypto/o_time.c
+ $(OPENSSL_PATH)/crypto/objects/o_names.c
+ $(OPENSSL_PATH)/crypto/objects/obj_dat.c
+ $(OPENSSL_PATH)/crypto/objects/obj_err.c
+ $(OPENSSL_PATH)/crypto/objects/obj_lib.c
+ $(OPENSSL_PATH)/crypto/objects/obj_xref.c
+ $(OPENSSL_PATH)/crypto/ocsp/ocsp_asn.c
+ $(OPENSSL_PATH)/crypto/ocsp/ocsp_cl.c
+ $(OPENSSL_PATH)/crypto/ocsp/ocsp_err.c
+ $(OPENSSL_PATH)/crypto/ocsp/ocsp_ext.c
+ $(OPENSSL_PATH)/crypto/ocsp/ocsp_ht.c
+ $(OPENSSL_PATH)/crypto/ocsp/ocsp_lib.c
+ $(OPENSSL_PATH)/crypto/ocsp/ocsp_prn.c
+ $(OPENSSL_PATH)/crypto/ocsp/ocsp_srv.c
+ $(OPENSSL_PATH)/crypto/ocsp/ocsp_vfy.c
+ $(OPENSSL_PATH)/crypto/ocsp/v3_ocsp.c
+ $(OPENSSL_PATH)/crypto/pem/pem_all.c
+ $(OPENSSL_PATH)/crypto/pem/pem_err.c
+ $(OPENSSL_PATH)/crypto/pem/pem_info.c
+ $(OPENSSL_PATH)/crypto/pem/pem_lib.c
+ $(OPENSSL_PATH)/crypto/pem/pem_oth.c
+ $(OPENSSL_PATH)/crypto/pem/pem_pk8.c
+ $(OPENSSL_PATH)/crypto/pem/pem_pkey.c
+ $(OPENSSL_PATH)/crypto/pem/pem_sign.c
+ $(OPENSSL_PATH)/crypto/pem/pem_x509.c
+ $(OPENSSL_PATH)/crypto/pem/pem_xaux.c
+ $(OPENSSL_PATH)/crypto/pem/pvkfmt.c
+ $(OPENSSL_PATH)/crypto/pkcs12/p12_add.c
+ $(OPENSSL_PATH)/crypto/pkcs12/p12_asn.c
+ $(OPENSSL_PATH)/crypto/pkcs12/p12_attr.c
+ $(OPENSSL_PATH)/crypto/pkcs12/p12_crpt.c
+ $(OPENSSL_PATH)/crypto/pkcs12/p12_crt.c
+ $(OPENSSL_PATH)/crypto/pkcs12/p12_decr.c
+ $(OPENSSL_PATH)/crypto/pkcs12/p12_init.c
+ $(OPENSSL_PATH)/crypto/pkcs12/p12_key.c
+ $(OPENSSL_PATH)/crypto/pkcs12/p12_kiss.c
+ $(OPENSSL_PATH)/crypto/pkcs12/p12_mutl.c
+ $(OPENSSL_PATH)/crypto/pkcs12/p12_npas.c
+ $(OPENSSL_PATH)/crypto/pkcs12/p12_p8d.c
+ $(OPENSSL_PATH)/crypto/pkcs12/p12_p8e.c
+ $(OPENSSL_PATH)/crypto/pkcs12/p12_sbag.c
+ $(OPENSSL_PATH)/crypto/pkcs12/p12_utl.c
+ $(OPENSSL_PATH)/crypto/pkcs12/pk12err.c
+ $(OPENSSL_PATH)/crypto/pkcs7/bio_pk7.c
+ $(OPENSSL_PATH)/crypto/pkcs7/pk7_asn1.c
+ $(OPENSSL_PATH)/crypto/pkcs7/pk7_attr.c
+ $(OPENSSL_PATH)/crypto/pkcs7/pk7_doit.c
+ $(OPENSSL_PATH)/crypto/pkcs7/pk7_lib.c
+ $(OPENSSL_PATH)/crypto/pkcs7/pk7_mime.c
+ $(OPENSSL_PATH)/crypto/pkcs7/pk7_smime.c
+ $(OPENSSL_PATH)/crypto/pkcs7/pkcs7err.c
+ $(OPENSSL_PATH)/crypto/rand/drbg_ctr.c
+ $(OPENSSL_PATH)/crypto/rand/drbg_lib.c
+ $(OPENSSL_PATH)/crypto/rand/rand_egd.c
+ $(OPENSSL_PATH)/crypto/rand/rand_err.c
+ $(OPENSSL_PATH)/crypto/rand/rand_lib.c
+ $(OPENSSL_PATH)/crypto/rand/rand_unix.c
+ $(OPENSSL_PATH)/crypto/rand/rand_vms.c
+ $(OPENSSL_PATH)/crypto/rand/rand_win.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_ameth.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_asn1.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_chk.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_crpt.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_depr.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_err.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_gen.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_lib.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_meth.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_mp.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_none.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_oaep.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_ossl.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_pk1.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_pmeth.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_prn.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_pss.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_saos.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_sign.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_ssl.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_x931.c
+ $(OPENSSL_PATH)/crypto/rsa/rsa_x931g.c
+ $(OPENSSL_PATH)/crypto/sha/keccak1600.c
+ $(OPENSSL_PATH)/crypto/sha/sha1_one.c
+ $(OPENSSL_PATH)/crypto/sha/sha1dgst.c
+ $(OPENSSL_PATH)/crypto/sha/sha256.c
+ $(OPENSSL_PATH)/crypto/sha/sha512.c
+ $(OPENSSL_PATH)/crypto/siphash/siphash.c
+ $(OPENSSL_PATH)/crypto/siphash/siphash_ameth.c
+ $(OPENSSL_PATH)/crypto/siphash/siphash_pmeth.c
+ $(OPENSSL_PATH)/crypto/sm3/m_sm3.c
+ $(OPENSSL_PATH)/crypto/sm3/sm3.c
+ $(OPENSSL_PATH)/crypto/sm4/sm4.c
+ $(OPENSSL_PATH)/crypto/stack/stack.c
+ $(OPENSSL_PATH)/crypto/threads_none.c
+ $(OPENSSL_PATH)/crypto/threads_pthread.c
+ $(OPENSSL_PATH)/crypto/threads_win.c
+ $(OPENSSL_PATH)/crypto/txt_db/txt_db.c
+ $(OPENSSL_PATH)/crypto/ui/ui_err.c
+ $(OPENSSL_PATH)/crypto/ui/ui_lib.c
+ $(OPENSSL_PATH)/crypto/ui/ui_null.c
+ $(OPENSSL_PATH)/crypto/ui/ui_openssl.c
+ $(OPENSSL_PATH)/crypto/ui/ui_util.c
+ $(OPENSSL_PATH)/crypto/uid.c
+ $(OPENSSL_PATH)/crypto/x509/by_dir.c
+ $(OPENSSL_PATH)/crypto/x509/by_file.c
+ $(OPENSSL_PATH)/crypto/x509/t_crl.c
+ $(OPENSSL_PATH)/crypto/x509/t_req.c
+ $(OPENSSL_PATH)/crypto/x509/t_x509.c
+ $(OPENSSL_PATH)/crypto/x509/x509_att.c
+ $(OPENSSL_PATH)/crypto/x509/x509_cmp.c
+ $(OPENSSL_PATH)/crypto/x509/x509_d2.c
+ $(OPENSSL_PATH)/crypto/x509/x509_def.c
+ $(OPENSSL_PATH)/crypto/x509/x509_err.c
+ $(OPENSSL_PATH)/crypto/x509/x509_ext.c
+ $(OPENSSL_PATH)/crypto/x509/x509_lu.c
+ $(OPENSSL_PATH)/crypto/x509/x509_meth.c
+ $(OPENSSL_PATH)/crypto/x509/x509_obj.c
+ $(OPENSSL_PATH)/crypto/x509/x509_r2x.c
+ $(OPENSSL_PATH)/crypto/x509/x509_req.c
+ $(OPENSSL_PATH)/crypto/x509/x509_set.c
+ $(OPENSSL_PATH)/crypto/x509/x509_trs.c
+ $(OPENSSL_PATH)/crypto/x509/x509_txt.c
+ $(OPENSSL_PATH)/crypto/x509/x509_v3.c
+ $(OPENSSL_PATH)/crypto/x509/x509_vfy.c
+ $(OPENSSL_PATH)/crypto/x509/x509_vpm.c
+ $(OPENSSL_PATH)/crypto/x509/x509cset.c
+ $(OPENSSL_PATH)/crypto/x509/x509name.c
+ $(OPENSSL_PATH)/crypto/x509/x509rset.c
+ $(OPENSSL_PATH)/crypto/x509/x509spki.c
+ $(OPENSSL_PATH)/crypto/x509/x509type.c
+ $(OPENSSL_PATH)/crypto/x509/x_all.c
+ $(OPENSSL_PATH)/crypto/x509/x_attrib.c
+ $(OPENSSL_PATH)/crypto/x509/x_crl.c
+ $(OPENSSL_PATH)/crypto/x509/x_exten.c
+ $(OPENSSL_PATH)/crypto/x509/x_name.c
+ $(OPENSSL_PATH)/crypto/x509/x_pubkey.c
+ $(OPENSSL_PATH)/crypto/x509/x_req.c
+ $(OPENSSL_PATH)/crypto/x509/x_x509.c
+ $(OPENSSL_PATH)/crypto/x509/x_x509a.c
+ $(OPENSSL_PATH)/crypto/x509v3/pcy_cache.c
+ $(OPENSSL_PATH)/crypto/x509v3/pcy_data.c
+ $(OPENSSL_PATH)/crypto/x509v3/pcy_lib.c
+ $(OPENSSL_PATH)/crypto/x509v3/pcy_map.c
+ $(OPENSSL_PATH)/crypto/x509v3/pcy_node.c
+ $(OPENSSL_PATH)/crypto/x509v3/pcy_tree.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_addr.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_admis.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_akey.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_akeya.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_alt.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_asid.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_bcons.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_bitst.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_conf.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_cpols.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_crld.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_enum.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_extku.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_genn.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_ia5.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_info.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_int.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_lib.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_ncons.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_pci.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_pcia.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_pcons.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_pku.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_pmaps.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_prn.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_purp.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_skey.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_sxnet.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_tlsf.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3_utl.c
+ $(OPENSSL_PATH)/crypto/x509v3/v3err.c
+ $(OPENSSL_PATH)/crypto/arm_arch.h
+ $(OPENSSL_PATH)/crypto/mips_arch.h
+ $(OPENSSL_PATH)/crypto/ppc_arch.h
+ $(OPENSSL_PATH)/crypto/s390x_arch.h
+ $(OPENSSL_PATH)/crypto/sparc_arch.h
+ $(OPENSSL_PATH)/crypto/vms_rms.h
+ $(OPENSSL_PATH)/crypto/aes/aes_local.h
+ $(OPENSSL_PATH)/crypto/asn1/asn1_item_list.h
+ $(OPENSSL_PATH)/crypto/asn1/asn1_local.h
+ $(OPENSSL_PATH)/crypto/asn1/charmap.h
+ $(OPENSSL_PATH)/crypto/asn1/standard_methods.h
+ $(OPENSSL_PATH)/crypto/asn1/tbl_standard.h
+ $(OPENSSL_PATH)/crypto/async/async_local.h
+ $(OPENSSL_PATH)/crypto/async/arch/async_null.h
+ $(OPENSSL_PATH)/crypto/async/arch/async_posix.h
+ $(OPENSSL_PATH)/crypto/async/arch/async_win.h
+ $(OPENSSL_PATH)/crypto/bio/bio_local.h
+ $(OPENSSL_PATH)/crypto/bn/bn_local.h
+ $(OPENSSL_PATH)/crypto/bn/bn_prime.h
+ $(OPENSSL_PATH)/crypto/bn/rsaz_exp.h
+ $(OPENSSL_PATH)/crypto/comp/comp_local.h
+ $(OPENSSL_PATH)/crypto/conf/conf_def.h
+ $(OPENSSL_PATH)/crypto/conf/conf_local.h
+ $(OPENSSL_PATH)/crypto/dh/dh_local.h
+ $(OPENSSL_PATH)/crypto/dso/dso_local.h
+ $(OPENSSL_PATH)/crypto/evp/evp_local.h
+ $(OPENSSL_PATH)/crypto/hmac/hmac_local.h
+ $(OPENSSL_PATH)/crypto/lhash/lhash_local.h
+ $(OPENSSL_PATH)/crypto/md5/md5_local.h
+ $(OPENSSL_PATH)/crypto/modes/modes_local.h
+ $(OPENSSL_PATH)/crypto/objects/obj_dat.h
+ $(OPENSSL_PATH)/crypto/objects/obj_local.h
+ $(OPENSSL_PATH)/crypto/objects/obj_xref.h
+ $(OPENSSL_PATH)/crypto/ocsp/ocsp_local.h
+ $(OPENSSL_PATH)/crypto/pkcs12/p12_local.h
+ $(OPENSSL_PATH)/crypto/rand/rand_local.h
+ $(OPENSSL_PATH)/crypto/rsa/rsa_local.h
+ $(OPENSSL_PATH)/crypto/sha/sha_local.h
+ $(OPENSSL_PATH)/crypto/siphash/siphash_local.h
+ $(OPENSSL_PATH)/crypto/sm3/sm3_local.h
+ $(OPENSSL_PATH)/crypto/store/store_local.h
+ $(OPENSSL_PATH)/crypto/ui/ui_local.h
+ $(OPENSSL_PATH)/crypto/x509/x509_local.h
+ $(OPENSSL_PATH)/crypto/x509v3/ext_dat.h
+ $(OPENSSL_PATH)/crypto/x509v3/pcy_local.h
+ $(OPENSSL_PATH)/crypto/x509v3/standard_exts.h
+ $(OPENSSL_PATH)/crypto/x509v3/v3_admis.h
+ $(OPENSSL_PATH)/ssl/bio_ssl.c
+ $(OPENSSL_PATH)/ssl/d1_lib.c
+ $(OPENSSL_PATH)/ssl/d1_msg.c
+ $(OPENSSL_PATH)/ssl/d1_srtp.c
+ $(OPENSSL_PATH)/ssl/methods.c
+ $(OPENSSL_PATH)/ssl/packet.c
+ $(OPENSSL_PATH)/ssl/pqueue.c
+ $(OPENSSL_PATH)/ssl/record/dtls1_bitmap.c
+ $(OPENSSL_PATH)/ssl/record/rec_layer_d1.c
+ $(OPENSSL_PATH)/ssl/record/rec_layer_s3.c
+ $(OPENSSL_PATH)/ssl/record/ssl3_buffer.c
+ $(OPENSSL_PATH)/ssl/record/ssl3_record.c
+ $(OPENSSL_PATH)/ssl/record/ssl3_record_tls13.c
+ $(OPENSSL_PATH)/ssl/s3_cbc.c
+ $(OPENSSL_PATH)/ssl/s3_enc.c
+ $(OPENSSL_PATH)/ssl/s3_lib.c
+ $(OPENSSL_PATH)/ssl/s3_msg.c
+ $(OPENSSL_PATH)/ssl/ssl_asn1.c
+ $(OPENSSL_PATH)/ssl/ssl_cert.c
+ $(OPENSSL_PATH)/ssl/ssl_ciph.c
+ $(OPENSSL_PATH)/ssl/ssl_conf.c
+ $(OPENSSL_PATH)/ssl/ssl_err.c
+ $(OPENSSL_PATH)/ssl/ssl_init.c
+ $(OPENSSL_PATH)/ssl/ssl_lib.c
+ $(OPENSSL_PATH)/ssl/ssl_mcnf.c
+ $(OPENSSL_PATH)/ssl/ssl_rsa.c
+ $(OPENSSL_PATH)/ssl/ssl_sess.c
+ $(OPENSSL_PATH)/ssl/ssl_stat.c
+ $(OPENSSL_PATH)/ssl/ssl_txt.c
+ $(OPENSSL_PATH)/ssl/ssl_utst.c
+ $(OPENSSL_PATH)/ssl/statem/extensions.c
+ $(OPENSSL_PATH)/ssl/statem/extensions_clnt.c
+ $(OPENSSL_PATH)/ssl/statem/extensions_cust.c
+ $(OPENSSL_PATH)/ssl/statem/extensions_srvr.c
+ $(OPENSSL_PATH)/ssl/statem/statem.c
+ $(OPENSSL_PATH)/ssl/statem/statem_clnt.c
+ $(OPENSSL_PATH)/ssl/statem/statem_dtls.c
+ $(OPENSSL_PATH)/ssl/statem/statem_lib.c
+ $(OPENSSL_PATH)/ssl/statem/statem_srvr.c
+ $(OPENSSL_PATH)/ssl/t1_enc.c
+ $(OPENSSL_PATH)/ssl/t1_lib.c
+ $(OPENSSL_PATH)/ssl/t1_trce.c
+ $(OPENSSL_PATH)/ssl/tls13_enc.c
+ $(OPENSSL_PATH)/ssl/tls_srp.c
+ $(OPENSSL_PATH)/ssl/packet_local.h
+ $(OPENSSL_PATH)/ssl/ssl_cert_table.h
+ $(OPENSSL_PATH)/ssl/ssl_local.h
+ $(OPENSSL_PATH)/ssl/record/record.h
+ $(OPENSSL_PATH)/ssl/record/record_local.h
+ $(OPENSSL_PATH)/ssl/statem/statem.h
+ $(OPENSSL_PATH)/ssl/statem/statem_local.h
+# Autogenerated files list ends here
+ buildinf.h
+ rand_pool_noise.h
+ ossl_store.c
+ rand_pool.c
+
+[Sources.X64]
+ rand_pool_noise_tsc.c
+ ApiHooks.c
+
+[Packages]
+ MdePkg/MdePkg.dec
+ CryptoPkg/CryptoPkg.dec
+
+[LibraryClasses]
+ BaseLib
+ DebugLib
+ TimerLib
+ PrintLib
+
+[BuildOptions]
+ #
+ # Disables the following Visual Studio compiler warnings brought by openssl source,
+ # so we do not break the build with /WX option:
+ # C4090: 'function' : different 'const' qualifiers
+ # C4132: 'object' : const object should be initialized (tls13_enc.c)
+ # C4210: nonstandard extension used: function given file scope
+ # C4244: conversion from type1 to type2, possible loss of data
+ # C4245: conversion from type1 to type2, signed/unsigned mismatch
+ # C4267: conversion from size_t to type, possible loss of data
+ # C4306: 'identifier' : conversion from 'type1' to 'type2' of greater size
+ # C4310: cast truncates constant value
+ # C4389: 'operator' : signed/unsigned mismatch (xxxx)
+ # C4700: uninitialized local variable 'name' used. (conf_sap.c(71))
+ # C4702: unreachable code
+ # C4706: assignment within conditional expression
+ # C4819: The file contains a character that cannot be represented in the current code page
+ #
+ MSFT:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_FLAGS_CONFIG) /wd4090 /wd4132 /wd4210 /wd4244 /wd4245 /wd4267 /wd4306 /wd4310 /wd4700 /wd4389 /wd4702 /wd4706 /wd4819
+
+ INTEL:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) $(OPENSSL_FLAGS_CONFIG) /w
+
+ #
+ # Suppress the following build warnings in openssl so we don't break the build with -Werror
+ # -Werror=maybe-uninitialized: there exist some other paths for which the variable is not initialized.
+ # -Werror=format: Check calls to printf and scanf, etc., to make sure that the arguments supplied have
+ # types appropriate to the format string specified.
+ # -Werror=unused-but-set-variable: Warn whenever a local variable is assigned to, but otherwise unused (aside from its declaration).
+ #
+ GCC:*_*_X64_CC_FLAGS = -UWIN32 -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) $(OPENSSL_FLAGS_CONFIG) -Wno-error=maybe-uninitialized -Wno-error=format -Wno-format -Wno-error=unused-but-set-variable -DNO_MSABI_VA_FUNCS
+
+ # suppress the following warnings in openssl so we don't break the build with warnings-as-errors:
+ # 1295: Deprecated declaration <entity> - give arg types
+ # 550: <entity> was set but never used
+ # 1293: assignment in condition
+ # 111: statement is unreachable (invariably "break;" after "return X;" in case statement)
+ # 68: integer conversion resulted in a change of sign ("if (Status == -1)")
+ # 177: <entity> was declared but never referenced
+ # 223: function <entity> declared implicitly
+ # 144: a value of type <type> cannot be used to initialize an entity of type <type>
+ # 513: a value of type <type> cannot be assigned to an entity of type <type>
+ # 188: enumerated type mixed with another type (i.e. passing an integer as an enum without a cast)
+ # 1296: Extended constant initialiser used
+ # 128: loop is not reachable - may be emitted inappropriately if code follows a conditional return
+ # from the function that evaluates to true at compile time
+ # 546: transfer of control bypasses initialization - may be emitted inappropriately if the uninitialized
+ # variable is never referenced after the jump
+ # 1: ignore "#1-D: last line of file ends without a newline"
+ # 3017: <entity> may be used before being set (NOTE: This was fixed in OpenSSL 1.1 HEAD with
+ # commit d9b8b89bec4480de3a10bdaf9425db371c19145b, and can be dropped then.)
+ XCODE:*_*_X64_CC_FLAGS = -mmmx -msse -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) $(OPENSSL_FLAGS_CONFIG) -w -std=c99 -Wno-error=uninitialized
diff --git a/CryptoPkg/Library/Include/CrtLibSupport.h b/CryptoPkg/Library/Include/CrtLibSupport.h
index 7a82f1d406..5dcb65c87b 100644
--- a/CryptoPkg/Library/Include/CrtLibSupport.h
+++ b/CryptoPkg/Library/Include/CrtLibSupport.h
@@ -100,6 +100,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
//
typedef UINTN size_t;
typedef UINTN u_int;
+typedef INTN ptrdiff_t;
typedef INTN ssize_t;
typedef INT32 time_t;
typedef UINT8 __uint8_t;
@@ -107,6 +108,7 @@ typedef UINT8 sa_family_t;
typedef UINT8 u_char;
typedef UINT32 uid_t;
typedef UINT32 gid_t;
+typedef CHAR16 wchar_t;

//
// File operations are not required for EFI building,
diff --git a/CryptoPkg/Library/Include/openssl/opensslconf.h b/CryptoPkg/Library/Include/openssl/opensslconf.h
index 3a2544ea5c..e8f73c4d10 100644
--- a/CryptoPkg/Library/Include/openssl/opensslconf.h
+++ b/CryptoPkg/Library/Include/openssl/opensslconf.h
@@ -112,9 +112,6 @@ extern "C" {
#ifndef OPENSSL_NO_ASAN
# define OPENSSL_NO_ASAN
#endif
-#ifndef OPENSSL_NO_ASM
-# define OPENSSL_NO_ASM
-#endif
#ifndef OPENSSL_NO_ASYNC
# define OPENSSL_NO_ASYNC
#endif
diff --git a/CryptoPkg/Library/OpensslLib/ApiHooks.c b/CryptoPkg/Library/OpensslLib/ApiHooks.c
new file mode 100644
index 0000000000..58cff16838
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/ApiHooks.c
@@ -0,0 +1,18 @@
+/** @file
+ OpenSSL Library API hooks.
+
+Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <Uefi.h>
+
+VOID *
+__imp_RtlVirtualUnwind (
+ VOID * Args
+ )
+{
+ return NULL;
+}
+
diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c b/CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
new file mode 100644
index 0000000000..ef20d2b84e
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
@@ -0,0 +1,34 @@
+/** @file
+ Constructor to initialize CPUID data for OpenSSL assembly operations.
+
+Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <Uefi.h>
+
+extern void OPENSSL_cpuid_setup (void);
+
+/**
+ Constructor routine for OpensslLib.
+
+ The constructor calls an internal OpenSSL function which fetches a local copy
+ of the hardware capability flags, used to enable native crypto instructions.
+
+ @param None
+
+ @retval EFI_SUCCESS The construction succeeded.
+
+**/
+EFI_STATUS
+EFIAPI
+OpensslLibConstructor (
+ VOID
+ )
+{
+ OPENSSL_cpuid_setup ();
+
+ return EFI_SUCCESS;
+}
+
diff --git a/CryptoPkg/Library/OpensslLib/process_files.pl b/CryptoPkg/Library/OpensslLib/process_files.pl
index 57ce195394..472f59bc8e 100755
--- a/CryptoPkg/Library/OpensslLib/process_files.pl
+++ b/CryptoPkg/Library/OpensslLib/process_files.pl
@@ -9,9 +9,63 @@
# do not need to do this, since the results are stored in the EDK2
# git repository for them.
#
+# Due to the script wrapping required to process the OpenSSL
+# configuration data, each native architecture must be processed
+# individually by the maintainer (in addition to the standard version):
+# ./process_files.pl
+# ./process_files.pl X64
+# ./process_files.pl [Arch]
+
use strict;
use Cwd;
use File::Copy;
+use File::Basename;
+use File::Path qw(make_path remove_tree);
+use Text::Tabs;
+
+#
+# OpenSSL perlasm generator script does not transfer the copyright header
+#
+sub copy_license_header
+{
+ my @args = split / /, shift; #Separate args by spaces
+ my $source = $args[1]; #Source file is second (after "perl")
+ my $target = pop @args; #Target file is always last
+ chop ($target); #Remove newline char
+
+ my $temp_file_name = "license.tmp";
+ open (my $source_file, "<" . $source) || die $source;
+ open (my $target_file, "<" . $target) || die $target;
+ open (my $temp_file, ">" . $temp_file_name) || die $temp_file_name;
+
+ #Add "generated file" warning
+ $source =~ s/^..//; #Remove leading "./"
+ print ($temp_file "; WARNING: do not edit!\r\n");
+ print ($temp_file "; Generated from $source\r\n");
+ print ($temp_file ";\r\n");
+
+ #Copy source file header to temp file
+ while (my $line = <$source_file>) {
+ next if ($line =~ /#!/); #Ignore shebang line
+ $line =~ s/#/;/; #Fix comment character for assembly
+ $line =~ s/\s+$/\r\n/; #Trim trailing whitepsace, fixup line endings
+ print ($temp_file $line);
+ last if ($line =~ /http/); #Last line of copyright header contains a web link
+ }
+ print ($temp_file "\r\n");
+ #Retrieve generated assembly contents
+ while (my $line = <$target_file>) {
+ $line =~ s/\s+$/\r\n/; #Trim trailing whitepsace, fixup line endings
+ print ($temp_file expand ($line)); #expand() replaces tabs with spaces
+ }
+
+ close ($source_file);
+ close ($target_file);
+ close ($temp_file);
+
+ move ($temp_file_name, $target) ||
+ die "Cannot replace \"" . $target . "\"!";
+}

#
# Find the openssl directory name for use lib. We have to do this
@@ -21,10 +75,41 @@ use File::Copy;
#
my $inf_file;
my $OPENSSL_PATH;
+my $uefi_config;
+my $extension;
+my $arch;
my @inf;

BEGIN {
$inf_file = "OpensslLib.inf";
+ $uefi_config = "UEFI";
+ $arch = shift;
+
+ if (defined $arch) {
+ if (uc ($arch) eq "X64") {
+ $arch = "X64";
+ $inf_file = "OpensslLibX64.inf";
+ $uefi_config = "UEFI-x86_64";
+ $extension = "nasm";
+ } else {
+ die "Unsupported architecture \"" . $arch . "\"!";
+ }
+ if ($extension eq "nasm") {
+ if (`nasm -v 2>&1`) {
+ #Presence of nasm executable will trigger inclusion of AVX instructions
+ die "\nCannot run assembly generators with NASM in path!\n\n";
+ }
+ }
+
+ # Prepare assembly folder
+ if (-d $arch) {
+ remove_tree ($arch, {safe => 1}) ||
+ die "Cannot clean assembly folder \"" . $arch . "\"!";
+ } else {
+ mkdir $arch ||
+ die "Cannot create assembly folder \"" . $arch . "\"!";
+ }
+ }

# Read the contents of the inf file
open( FD, "<" . $inf_file ) ||
@@ -47,9 +132,9 @@ BEGIN {
# Configure UEFI
system(
"./Configure",
- "UEFI",
+ "--config=../uefi-asm.conf",
+ "$uefi_config",
"no-afalgeng",
- "no-asm",
"no-async",
"no-autoerrinit",
"no-autoload-config",
@@ -129,23 +214,53 @@ BEGIN {
# Retrieve file lists from OpenSSL configdata
#
use configdata qw/%unified_info/;
+use configdata qw/%config/;
+use configdata qw/%target/;
+
+#
+# Collect build flags from configdata
+#
+my $flags = "";
+foreach my $f (@{$config{lib_defines}}) {
+ $flags .= " -D$f";
+}

my @cryptofilelist = ();
my @sslfilelist = ();
+my @asmfilelist = ();
+my @asmbuild = ();
foreach my $product ((@{$unified_info{libraries}},
@{$unified_info{engines}})) {
foreach my $o (@{$unified_info{sources}->{$product}}) {
foreach my $s (@{$unified_info{sources}->{$o}}) {
- next if ($unified_info{generate}->{$s});
- next if $s =~ "crypto/bio/b_print.c";
-
# No need to add unused files in UEFI.
# So it can reduce porting time, compile time, library size.
+ next if $s =~ "crypto/bio/b_print.c";
next if $s =~ "crypto/rand/randfile.c";
next if $s =~ "crypto/store/";
next if $s =~ "crypto/err/err_all.c";
next if $s =~ "crypto/aes/aes_ecb.c";

+ if ($unified_info{generate}->{$s}) {
+ if (defined $arch) {
+ my $buildstring = "perl";
+ foreach my $arg (@{$unified_info{generate}->{$s}}) {
+ if ($arg =~ ".pl") {
+ $buildstring .= " ./openssl/$arg";
+ } elsif ($arg =~ "PERLASM_SCHEME") {
+ $buildstring .= " $target{perlasm_scheme}";
+ } elsif ($arg =~ "LIB_CFLAGS") {
+ $buildstring .= "$flags";
+ }
+ }
+ ($s, my $path, undef) = fileparse($s, qr/\.[^.]*/);
+ $buildstring .= " ./$arch/$path$s.$extension";
+ make_path ("./$arch/$path");
+ push @asmbuild, "$buildstring\n";
+ push @asmfilelist, " $arch/$path$s.$extension\r\n";
+ }
+ next;
+ }
if ($product =~ "libssl") {
push @sslfilelist, ' $(OPENSSL_PATH)/' . $s . "\r\n";
next;
@@ -183,15 +298,31 @@ foreach (@headers){
}


+#
+# Generate assembly files
+#
+if (@asmbuild) {
+ print "\n--> Generating assembly files ... ";
+ foreach my $buildstring (@asmbuild) {
+ system ("$buildstring");
+ copy_license_header ($buildstring);
+ }
+ print "Done!";
+}
+
#
# Update OpensslLib.inf with autogenerated file list
#
my @new_inf = ();
my $subbing = 0;
-print "\n--> Updating OpensslLib.inf ... ";
+print "\n--> Updating $inf_file ... ";
foreach (@inf) {
+ if ($_ =~ "DEFINE OPENSSL_FLAGS_CONFIG") {
+ push @new_inf, " DEFINE OPENSSL_FLAGS_CONFIG =" . $flags . "\r\n";
+ next;
+ }
if ( $_ =~ "# Autogenerated files list starts here" ) {
- push @new_inf, $_, @cryptofilelist, @sslfilelist;
+ push @new_inf, $_, @asmfilelist, @cryptofilelist, @sslfilelist;
$subbing = 1;
next;
}
@@ -216,49 +347,51 @@ rename( $new_inf_file, $inf_file ) ||
die "rename $inf_file";
print "Done!";

-#
-# Update OpensslLibCrypto.inf with auto-generated file list (no libssl)
-#
-$inf_file = "OpensslLibCrypto.inf";
-
-# Read the contents of the inf file
-@inf = ();
-@new_inf = ();
-open( FD, "<" . $inf_file ) ||
- die "Cannot open \"" . $inf_file . "\"!";
-@inf = (<FD>);
-close(FD) ||
- die "Cannot close \"" . $inf_file . "\"!";
+if (!defined $arch) {
+ #
+ # Update OpensslLibCrypto.inf with auto-generated file list (no libssl)
+ #
+ $inf_file = "OpensslLibCrypto.inf";

-$subbing = 0;
-print "\n--> Updating OpensslLibCrypto.inf ... ";
-foreach (@inf) {
- if ( $_ =~ "# Autogenerated files list starts here" ) {
- push @new_inf, $_, @cryptofilelist;
- $subbing = 1;
- next;
- }
- if ( $_ =~ "# Autogenerated files list ends here" ) {
- push @new_inf, $_;
- $subbing = 0;
- next;
+ # Read the contents of the inf file
+ @inf = ();
+ @new_inf = ();
+ open( FD, "<" . $inf_file ) ||
+ die "Cannot open \"" . $inf_file . "\"!";
+ @inf = (<FD>);
+ close(FD) ||
+ die "Cannot close \"" . $inf_file . "\"!";
+
+ $subbing = 0;
+ print "\n--> Updating OpensslLibCrypto.inf ... ";
+ foreach (@inf) {
+ if ( $_ =~ "# Autogenerated files list starts here" ) {
+ push @new_inf, $_, @cryptofilelist;
+ $subbing = 1;
+ next;
+ }
+ if ( $_ =~ "# Autogenerated files list ends here" ) {
+ push @new_inf, $_;
+ $subbing = 0;
+ next;
+ }
+
+ push @new_inf, $_
+ unless ($subbing);
}

- push @new_inf, $_
- unless ($subbing);
+ $new_inf_file = $inf_file . ".new";
+ open( FD, ">" . $new_inf_file ) ||
+ die $new_inf_file;
+ print( FD @new_inf ) ||
+ die $new_inf_file;
+ close(FD) ||
+ die $new_inf_file;
+ rename( $new_inf_file, $inf_file ) ||
+ die "rename $inf_file";
+ print "Done!";
}

-$new_inf_file = $inf_file . ".new";
-open( FD, ">" . $new_inf_file ) ||
- die $new_inf_file;
-print( FD @new_inf ) ||
- die $new_inf_file;
-close(FD) ||
- die $new_inf_file;
-rename( $new_inf_file, $inf_file ) ||
- die "rename $inf_file";
-print "Done!";
-
#
# Copy opensslconf.h and dso_conf.h generated from OpenSSL Configuration
#
diff --git a/CryptoPkg/Library/OpensslLib/uefi-asm.conf b/CryptoPkg/Library/OpensslLib/uefi-asm.conf
new file mode 100644
index 0000000000..7aaf927199
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/uefi-asm.conf
@@ -0,0 +1,15 @@
+## -*- mode: perl; -*-
+## UEFI assembly openssl configuration targets.
+
+my %targets = (
+#### UEFI
+ "UEFI-x86_64" => {
+ perlasm_scheme => "nasm",
+ # inherit_from => [ "UEFI", asm("x86_64_asm") ],
+ inherit_from => [ "UEFI" ],
+ cpuid_asm_src => "x86_64cpuid.s",
+ aes_asm_src => "aes_core.c aes_cbc.c vpaes-x86_64.s aesni-x86_64.s aesni-sha1-x86_64.s aesni-sha256-x86_64.s aesni-mb-x86_64.s",
+ sha1_asm_src => "sha1-x86_64.s sha256-x86_64.s sha512-x86_64.s sha1-mb-x86_64.s sha256-mb-x86_64.s",
+ modes_asm_src => "ghash-x86_64.s aesni-gcm-x86_64.s",
+ },
+);
--
2.28.0.windows.1


[PATCH v3 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64

Zurcher, Christopher J
 

V3 Changes:
Added definitions for ptrdiff_t and wchar_t to CrtLibSupport.h for
LLVM/Clang build support.
Added -UWIN32 to GCC Flags for LLVM/Clang build support.
Added missing AES GCM assembly file.

V2 Changes:
Limit scope of assembly config to SHA and AES functions.
Removed IA32 native support (reduced config was causing build failure and
can be added in a later patch).
Removed XMM instructions from assembly generation.
Added automatic copyright header porting for generated assembly files.

This patch adds support for building the native instruction algorithms for
the X64 architecture in OpensslLib. The process_files.pl script was modified
to parse the .asm file targets from the OpenSSL build config data struct, and
generate the necessary assembly files for the EDK2 build environment.

For the X64 variant, OpenSSL includes calls to a Windows error handling API,
and that function has been stubbed out in ApiHooks.c.

For all variants, a constructor is added to call the required CPUID function
within OpenSSL to facilitate processor capability checks in the native
algorithms.

Additional native architecture variants should be simple to add by following
the changes made for this architecture.

The OpenSSL assembly files are traditionally generated at build time using a
perl script. To avoid that burden on EDK2 users, these end-result assembly
files are generated during the configuration steps performed by the package
maintainer (through process_files.pl). The perl generator scripts inside
OpenSSL do not parse file comments as they are only meant to create
intermediate build files, so process_files.pl contains additional hooks to
preserve the copyright headers as well as clean up tabs and line endings to
comply with EDK2 coding standards. The resulting file headers align with
the generated .h files which are already included in the EDK2 repository.

Cc: Jiewen Yao <jiewen.yao@...>
Cc: Jian J Wang <jian.j.wang@...>
Cc: Xiaoyu Lu <xiaoyux.lu@...>
Cc: Ard Biesheuvel <ard.biesheuvel@...>

Christopher J Zurcher (2):
CryptoPkg/OpensslLib: Add native instruction support for X64
CryptoPkg/OpensslLib: Commit the auto-generated assembly files for X64

CryptoPkg/Library/OpensslLib/OpensslLib.inf | 2 +-
CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 2 +-
CryptoPkg/Library/OpensslLib/OpensslLibX64.inf | 657 +++
CryptoPkg/Library/Include/CrtLibSupport.h | 2 +
CryptoPkg/Library/Include/openssl/opensslconf.h | 3 -
CryptoPkg/Library/OpensslLib/ApiHooks.c | 18 +
CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c | 34 +
CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-mb-x86_64.nasm | 732 +++
CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-sha1-x86_64.nasm | 1916 ++++++++
CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-sha256-x86_64.nasm | 78 +
CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-x86_64.nasm | 5103 ++++++++++++++++++++
CryptoPkg/Library/OpensslLib/X64/crypto/aes/vpaes-x86_64.nasm | 1173 +++++
CryptoPkg/Library/OpensslLib/X64/crypto/modes/aesni-gcm-x86_64.nasm | 34 +
CryptoPkg/Library/OpensslLib/X64/crypto/modes/ghash-x86_64.nasm | 1569 ++++++
CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha1-mb-x86_64.nasm | 3137 ++++++++++++
CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha1-x86_64.nasm | 2884 +++++++++++
CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha256-mb-x86_64.nasm | 3461 +++++++++++++
CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha256-x86_64.nasm | 3313 +++++++++++++
CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha512-x86_64.nasm | 1938 ++++++++
CryptoPkg/Library/OpensslLib/X64/crypto/x86_64cpuid.nasm | 491 ++
CryptoPkg/Library/OpensslLib/process_files.pl | 223 +-
CryptoPkg/Library/OpensslLib/uefi-asm.conf | 15 +
22 files changed, 26735 insertions(+), 50 deletions(-)
create mode 100644 CryptoPkg/Library/OpensslLib/OpensslLibX64.inf
create mode 100644 CryptoPkg/Library/OpensslLib/ApiHooks.c
create mode 100644 CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
create mode 100644 CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-mb-x86_64.nasm
create mode 100644 CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-sha1-x86_64.nasm
create mode 100644 CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-sha256-x86_64.nasm
create mode 100644 CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-x86_64.nasm
create mode 100644 CryptoPkg/Library/OpensslLib/X64/crypto/aes/vpaes-x86_64.nasm
create mode 100644 CryptoPkg/Library/OpensslLib/X64/crypto/modes/aesni-gcm-x86_64.nasm
create mode 100644 CryptoPkg/Library/OpensslLib/X64/crypto/modes/ghash-x86_64.nasm
create mode 100644 CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha1-mb-x86_64.nasm
create mode 100644 CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha1-x86_64.nasm
create mode 100644 CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha256-mb-x86_64.nasm
create mode 100644 CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha256-x86_64.nasm
create mode 100644 CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha512-x86_64.nasm
create mode 100644 CryptoPkg/Library/OpensslLib/X64/crypto/x86_64cpuid.nasm
create mode 100644 CryptoPkg/Library/OpensslLib/uefi-asm.conf

--
2.28.0.windows.1


Re: [RestJsonStructureDxe PATCH 1/2] MdePkg/Include: Definitions of EFI REST JSON Structure Protocol

Abner Chang
 

-----Original Message-----
From: gaoliming [mailto:gaoliming@...]
Sent: Wednesday, October 14, 2020 1:42 PM
To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist)
<abner.chang@...>
Cc: 'Michael D Kinney' <michael.d.kinney@...>; 'Zhiguang Liu'
<zhiguang.liu@...>; 'Jiaxin Wu' <jiaxin.wu@...>; 'Siyuan Fu'
<siyuan.fu@...>; 'Fan Wang' <fan.wang@...>; 'Jiewen Yao'
<jiewen.yao@...>; Wang, Nickle (HPS SW) <nickle.wang@...>
Subject: 回复: [edk2-devel] [RestJsonStructureDxe PATCH 1/2]
MdePkg/Include: Definitions of EFI REST JSON Structure Protocol

Abner:

-----邮件原件-----
发件人: bounce+27952+66030+4905953+8761045@groups.io
<bounce+27952+66030+4905953+8761045@groups.io> 代表 Abner Chang
发送时间: 2020年10月8日 23:11
收件人: devel@edk2.groups.io
抄送: Michael D Kinney <michael.d.kinney@...>; Liming Gao
<gaoliming@...>; Zhiguang Liu <zhiguang.liu@...>;
Jiaxin Wu <jiaxin.wu@...>; Siyuan Fu <siyuan.fu@...>; Fan
Wang <fan.wang@...>; Jiewen Yao <jiewen.yao@...>; Nickle
Wang <nickle.wang@...>
主题: [edk2-devel] [RestJsonStructureDxe PATCH 1/2] MdePkg/Include:
Definitions of EFI REST JSON Structure Protocol

Add definitions of EFI REST JSON Structure according to UEFI spec
2.8 Section 29.7.3 EFI REST JSON Resource to C Structure Converter.

Signed-off-by: Abner Chang <abner.chang@...>

Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Liming Gao <gaoliming@...>
Cc: Zhiguang Liu <zhiguang.liu@...>
Cc: Jiaxin Wu <jiaxin.wu@...>
Cc: Siyuan Fu <siyuan.fu@...>
Cc: Fan Wang <fan.wang@...>
Cc: Jiewen Yao <jiewen.yao@...>
Cc: Nickle Wang <nickle.wang@...>
---
MdePkg/Include/Protocol/RestJsonStructure.h | 160
++++++++++++++++++++
MdePkg/MdePkg.dec | 6 +
2 files changed, 166 insertions(+)
create mode 100644 MdePkg/Include/Protocol/RestJsonStructure.h

diff --git a/MdePkg/Include/Protocol/RestJsonStructure.h
b/MdePkg/Include/Protocol/RestJsonStructure.h
new file mode 100644
index 0000000000..5e4fef8cff
--- /dev/null
+++ b/MdePkg/Include/Protocol/RestJsonStructure.h
@@ -0,0 +1,160 @@
+/** @file
+ This file defines the EFI REST JSON Structure Protocol interface.
+
Please also specify UEFI spec version.

+ (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef EFI_REST_JSON_STRUCTURE_PROTOCOL_H_
+#define EFI_REST_JSON_STRUCTURE_PROTOCOL_H_
+
+#include <Uefi.h>
+
Uefi.h is not required. The module will include this header file.

+//
+// GUID definitions
+//
+#define EFI_REST_JSON_STRUCTURE_PROTOCOL_GUID \
+ { \
+ 0xa9a048f6, 0x48a0, 0x4714, {0xb7, 0xda, 0xa9, 0xad,0x87, 0xd4,
+0xda,
0xc9 } \
+ }
+
+typedef struct _EFI_REST_JSON_STRUCTURE_PROTOCOL
EFI_REST_JSON_STRUCTURE_PROTOCOL;
+typedef CHAR8 * EFI_REST_JSON_RESOURCE_TYPE_DATATYPE;
+typedef CHAR8 * EFI_REST_RESOURCE_RELATIVE_PATH;
EFI_REST_RESOURCE_RELATIVE_PATH is not in UEFI spec. Can you confirm it?
Good catch. We don’t use this anymore.

+
+/** Structure defintions of resource name space.
+ *
+ * The fields declared in this structure define the
+ * name and revision of payload delievered throught
+ * REST API.
+**/
Structure comments start with /// or //. /**/ style is for the function.
Please update them.

+typedef struct _EFI_REST_JSON_RESOURCE_TYPE_NAMESPACE {
+ CHAR8 *ResourceTypeName; ///< Resource type name
+ CHAR8 *MajorVersion; ///< Resource major version
+ CHAR8 *MinorVersion; ///< Resource minor version
+ CHAR8 *ErrataVersion; ///< Resource errata version
+} EFI_REST_JSON_RESOURCE_TYPE_NAMESPACE;
+
+/** REST resource type identifier
+ *
+ * REST resource type consists of name space and data type.
+**/
+typedef struct _EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER {
+ EFI_REST_JSON_RESOURCE_TYPE_NAMESPACE NameSpace; ///<
Namespace of this resource type.
+ EFI_REST_JSON_RESOURCE_TYPE_DATATYPE DataType; ///< Name of
data type declared in this
+ ///<
resource type.
+} EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER;
+
+/** List of JSON to C structure conversions which this convertor
supports.
+ *
+**/
+typedef struct _EFI_REST_JSON_STRUCTURE_SUPPORTED {
+ LIST_ENTRY NextSupportedRsrcInterp; ///<
Linklist to next supported conversion.
+ EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER RestResourceInterp; ///<
JSON resource type this convertor supports.
+} EFI_REST_JSON_STRUCTURE_SUPPORTED;
+
+/** The header file of JSON C structure
+ *
+**/
+typedef struct _EFI_REST_JSON_STRUCTURE_HEADER {
+ EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER JsonRsrcIdentifier;
///< Resource identifier which use to
+
///< choice the proper interpreter.
+ ///< Follow by a pointer points to JSON structure, the content in
+ the ///< JSON structure is implementation-specific according to
+ converter
producer.
+ ///
+ VOID *JsonStructurePointer;
+} EFI_REST_JSON_STRUCTURE_HEADER;
+
+/**
+ JSON-IN C Structure-OUT function. Convert the given REST JSON
+resource
into structure.
+
+ @param[in] This This is the
EFI_REST_JSON_STRUCTURE_PROTOCOL instance.
+ @param[in] JsonRsrcIdentifier This indicates the resource type and
version is given in
+ ResourceJsonText.
+ @param[in] ResourceJsonText REST JSON resource in text
format.
+ @param[out] JsonStructure Pointer to receive the pointer to
EFI_REST_JSON_STRUCTURE_HEADER
+
+ @retval EFI_SUCCESS
+ @retval Others
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_JSON_STRUCTURE_TO_STRUCTURE)(
+ IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This,
+ IN EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *JsonRsrcIdentifier
OPTIONAL,
+ IN CHAR8
*ResourceJsonText,
+ OUT EFI_REST_JSON_STRUCTURE_HEADER **JsonStructure
+);
+
+/**
+ Convert the given REST JSON structure into JSON text.
+
+ @param[in] This This is the
EFI_REST_JSON_STRUCTURE_PROTOCOL instance.
+ @param[in] JsonStructureHeader The point to
EFI_REST_JSON_STRUCTURE_HEADER structure.
+ @param[out] ResourceJsonText Pointer to receive REST JSON
resource in text format.
+
+ @retval EFI_SUCCESS
+ @retval Others
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_JSON_STRUCTURE_TO_JSON)(
+ IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This,
+ IN EFI_REST_JSON_STRUCTURE_HEADER *JsonStructureHeader,
+ OUT CHAR8 **ResourceJsonText
+);
+
+/**
+ This function destroys the REST JSON structure.
+
+ @param[in] This This is the
EFI_REST_JSON_STRUCTURE_PROTOCOL instance.
+ @param[in] JsonStructureHeader JSON structure to destroy.
+
+ @retval EFI_SUCCESS
+ @retval Others
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_JSON_STRUCTURE_DESTORY_STRUCTURE)(
+ IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This,
+ IN EFI_REST_JSON_STRUCTURE_HEADER *JsonStructureHeader
+);
+/**
+ This function provides REST JSON resource to structure converter
registration.
+
+ @param[in] This This is the
EFI_REST_JSON_STRUCTURE_PROTOCOL instance.
+ @param[in] JsonStructureSupported The type and version of REST
JSON resource which this converter
+ supports.
+ @param[in] ToStructure The function to convert
REST JSON resource to structure.
+ @param[in] ToJson The function to convert
REST JSON structure to JSON in text format.
+ @param[out] DestroyStructure Destroy REST JSON
structure returned in ToStructure() function.
+
+ @retval EFI_SUCCESS Register successfully.
+ @retval Others Fail to register.
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_JSON_STRUCTURE_REGISTER)(
+ IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This,
+ IN EFI_REST_JSON_STRUCTURE_SUPPORTED
*JsonStructureSupported,
+ IN EFI_REST_JSON_STRUCTURE_TO_STRUCTURE ToStructure,
+ IN EFI_REST_JSON_STRUCTURE_TO_JSON ToJson,
+ IN EFI_REST_JSON_STRUCTURE_DESTORY_STRUCTURE
DestroyStructure );
+
+/** EFI REST JSON to C structure protocol definition.
+ *
+**/
+typedef struct _EFI_REST_JSON_STRUCTURE_PROTOCOL {
+ EFI_REST_JSON_STRUCTURE_REGISTER Register;
///< Register JSON to C structure convertor
+ EFI_REST_JSON_STRUCTURE_TO_STRUCTURE ToStructure;
///< The function to convert JSON to C structure
+ EFI_REST_JSON_STRUCTURE_TO_JSON ToJson;
///< The function to convert C structure to JSON
+ EFI_REST_JSON_STRUCTURE_DESTORY_STRUCTURE DestoryStructure;
///< Destory C structure.
+} EFI_REST_JSON_STRUCTURE_PROTOCOL;
Here, typedef is not required, because
EFI_REST_JSON_STRUCTURE_PROTOCOL has been defined in the begin of
this file.
All comments were addressed, v2 was sent.
Thanks.

Thanks
Liming
+
+#endif
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index
812be75fb3..0943816825 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -1848,6 +1848,12 @@
## Include/Protocol/NvdimmLabel.h
gEfiNvdimmLabelProtocolGuid = { 0xd40b6b80, 0x97d5,
0x4282, { 0xbb, 0x1d, 0x22, 0x3a, 0x16, 0x91, 0x80, 0x58 }}

+ #
+ # Protocols defined in UEFI2.8
+ #
+ ## Include/Protocol/RestJsonStructure.h
+ gEfiRestJsonStructureProtocolGuid = { 0xa9a048f6, 0x48a0, 0x4714,
{0xb7, 0xda, 0xa9, 0xad,0x87, 0xd4, 0xda, 0xc9 }}
+
#
# Protocols defined in Shell2.0
#
--
2.17.1





[RestJsonStructureDxe PATCH v2 1/2] MdePkg/Include: Definitions of EFI REST JSON Structure Protocol

Abner Chang
 

Add definitions of EFI REST JSON Structure according to UEFI spec
2.8 Section 29.7.3 EFI REST JSON Resource to C Structure Converter.

Signed-off-by: Abner Chang <abner.chang@...>

Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Liming Gao <gaoliming@...>
Cc: Zhiguang Liu <zhiguang.liu@...>
Cc: Jiaxin Wu <jiaxin.wu@...>
Cc: Siyuan Fu <siyuan.fu@...>
Cc: Fan Wang <fan.wang@...>
Cc: Jiewen Yao <jiewen.yao@...>
Cc: Nickle Wang <nickle.wang@...>
---
MdePkg/Include/Protocol/RestJsonStructure.h | 161 ++++++++++++++++++++
MdePkg/MdePkg.dec | 6 +
2 files changed, 167 insertions(+)
create mode 100644 MdePkg/Include/Protocol/RestJsonStructure.h

diff --git a/MdePkg/Include/Protocol/RestJsonStructure.h b/MdePkg/Include/Protocol/RestJsonStructure.h
new file mode 100644
index 0000000000..adaf148f71
--- /dev/null
+++ b/MdePkg/Include/Protocol/RestJsonStructure.h
@@ -0,0 +1,161 @@
+/** @file
+ This file defines the EFI REST JSON Structure Protocol interface.
+
+ (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+ @par Revision Reference:
+ This Protocol is introduced in UEFI Specification 2.8
+
+**/
+
+#ifndef EFI_REST_JSON_STRUCTURE_PROTOCOL_H_
+#define EFI_REST_JSON_STRUCTURE_PROTOCOL_H_
+
+///
+/// GUID definitions
+///
+#define EFI_REST_JSON_STRUCTURE_PROTOCOL_GUID \
+ { \
+ 0xa9a048f6, 0x48a0, 0x4714, {0xb7, 0xda, 0xa9, 0xad,0x87, 0xd4, 0xda, 0xc9 } \
+ }
+
+typedef struct _EFI_REST_JSON_STRUCTURE_PROTOCOL EFI_REST_JSON_STRUCTURE_PROTOCOL;
+typedef CHAR8 * EFI_REST_JSON_RESOURCE_TYPE_DATATYPE;
+
+///
+/// Structure defintions of resource name space.
+///
+/// The fields declared in this structure define the
+/// name and revision of payload delievered throught
+/// REST API.
+///
+typedef struct _EFI_REST_JSON_RESOURCE_TYPE_NAMESPACE {
+ CHAR8 *ResourceTypeName; ///< Resource type name
+ CHAR8 *MajorVersion; ///< Resource major version
+ CHAR8 *MinorVersion; ///< Resource minor version
+ CHAR8 *ErrataVersion; ///< Resource errata version
+} EFI_REST_JSON_RESOURCE_TYPE_NAMESPACE;
+
+///
+/// REST resource type identifier
+///
+/// REST resource type consists of name space and data type.
+///
+typedef struct _EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER {
+ EFI_REST_JSON_RESOURCE_TYPE_NAMESPACE NameSpace; ///< Namespace of this resource type.
+ EFI_REST_JSON_RESOURCE_TYPE_DATATYPE DataType; ///< Name of data type declared in this
+ ///< resource type.
+} EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER;
+
+///
+/// List of JSON to C structure conversions which this convertor supports.
+///
+typedef struct _EFI_REST_JSON_STRUCTURE_SUPPORTED {
+ LIST_ENTRY NextSupportedRsrcInterp; ///< Linklist to next supported conversion.
+ EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER RestResourceInterp; ///< JSON resource type this convertor supports.
+} EFI_REST_JSON_STRUCTURE_SUPPORTED;
+
+///
+/// The header file of JSON C structure
+///
+typedef struct _EFI_REST_JSON_STRUCTURE_HEADER {
+ EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER JsonRsrcIdentifier; ///< Resource identifier which use to
+ ///< choice the proper interpreter.
+ ///< Follow by a pointer points to JSON structure, the content in the
+ ///< JSON structure is implementation-specific according to converter producer.
+ VOID *JsonStructurePointer;
+} EFI_REST_JSON_STRUCTURE_HEADER;
+
+/**
+ JSON-IN C Structure-OUT function. Convert the given REST JSON resource into structure.
+
+ @param[in] This This is the EFI_REST_JSON_STRUCTURE_PROTOCOL instance.
+ @param[in] JsonRsrcIdentifier This indicates the resource type and version is given in
+ ResourceJsonText.
+ @param[in] ResourceJsonText REST JSON resource in text format.
+ @param[out] JsonStructure Pointer to receive the pointer to EFI_REST_JSON_STRUCTURE_HEADER
+
+ @retval EFI_SUCCESS
+ @retval Others
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_JSON_STRUCTURE_TO_STRUCTURE)(
+ IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This,
+ IN EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *JsonRsrcIdentifier OPTIONAL,
+ IN CHAR8 *ResourceJsonText,
+ OUT EFI_REST_JSON_STRUCTURE_HEADER **JsonStructure
+);
+
+/**
+ Convert the given REST JSON structure into JSON text.
+
+ @param[in] This This is the EFI_REST_JSON_STRUCTURE_PROTOCOL instance.
+ @param[in] JsonStructureHeader The point to EFI_REST_JSON_STRUCTURE_HEADER structure.
+ @param[out] ResourceJsonText Pointer to receive REST JSON resource in text format.
+
+ @retval EFI_SUCCESS
+ @retval Others
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_JSON_STRUCTURE_TO_JSON)(
+ IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This,
+ IN EFI_REST_JSON_STRUCTURE_HEADER *JsonStructureHeader,
+ OUT CHAR8 **ResourceJsonText
+);
+
+/**
+ This function destroys the REST JSON structure.
+
+ @param[in] This This is the EFI_REST_JSON_STRUCTURE_PROTOCOL instance.
+ @param[in] JsonStructureHeader JSON structure to destroy.
+
+ @retval EFI_SUCCESS
+ @retval Others
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_JSON_STRUCTURE_DESTORY_STRUCTURE)(
+ IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This,
+ IN EFI_REST_JSON_STRUCTURE_HEADER *JsonStructureHeader
+);
+/**
+ This function provides REST JSON resource to structure converter registration.
+
+ @param[in] This This is the EFI_REST_JSON_STRUCTURE_PROTOCOL instance.
+ @param[in] JsonStructureSupported The type and version of REST JSON resource which this converter
+ supports.
+ @param[in] ToStructure The function to convert REST JSON resource to structure.
+ @param[in] ToJson The function to convert REST JSON structure to JSON in text format.
+ @param[out] DestroyStructure Destroy REST JSON structure returned in ToStructure() function.
+
+ @retval EFI_SUCCESS Register successfully.
+ @retval Others Fail to register.
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_JSON_STRUCTURE_REGISTER)(
+ IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This,
+ IN EFI_REST_JSON_STRUCTURE_SUPPORTED *JsonStructureSupported,
+ IN EFI_REST_JSON_STRUCTURE_TO_STRUCTURE ToStructure,
+ IN EFI_REST_JSON_STRUCTURE_TO_JSON ToJson,
+ IN EFI_REST_JSON_STRUCTURE_DESTORY_STRUCTURE DestroyStructure
+);
+
+///
+/// EFI REST JSON to C structure protocol definition.
+///
+struct _EFI_REST_JSON_STRUCTURE_PROTOCOL {
+ EFI_REST_JSON_STRUCTURE_REGISTER Register; ///< Register JSON to C structure convertor
+ EFI_REST_JSON_STRUCTURE_TO_STRUCTURE ToStructure; ///< The function to convert JSON to C structure
+ EFI_REST_JSON_STRUCTURE_TO_JSON ToJson; ///< The function to convert C structure to JSON
+ EFI_REST_JSON_STRUCTURE_DESTORY_STRUCTURE DestoryStructure; ///< Destory C structure.
+};
+
+#endif
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 812be75fb3..0943816825 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -1848,6 +1848,12 @@
## Include/Protocol/NvdimmLabel.h
gEfiNvdimmLabelProtocolGuid = { 0xd40b6b80, 0x97d5, 0x4282, { 0xbb, 0x1d, 0x22, 0x3a, 0x16, 0x91, 0x80, 0x58 }}

+ #
+ # Protocols defined in UEFI2.8
+ #
+ ## Include/Protocol/RestJsonStructure.h
+ gEfiRestJsonStructureProtocolGuid = { 0xa9a048f6, 0x48a0, 0x4714, {0xb7, 0xda, 0xa9, 0xad,0x87, 0xd4, 0xda, 0xc9 }}
+
#
# Protocols defined in Shell2.0
#
--
2.17.1


[RestJsonStructureDxe PATCH v2 0/2] EFI REST JSON Structure Protocol

Abner Chang
 

This is the implementation of EFI_REST_JSON_STRUCTURE_PROTOCOL,
refer to UEFI spec 2.8 Section 29.7.3 EFI REST JSON Resource to C Structure
Converter.

In v2:
- Couple feedbacks given by Liming on patch 1/2 were addressed.
- Cosmetics on the source code in patch 2/2.

Signed-off-by: Abner Chang <abner.chang@...>

Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Liming Gao <gaoliming@...>
Cc: Zhiguang Liu <zhiguang.liu@...>
Cc: Jiaxin Wu <jiaxin.wu@...>
Cc: Siyuan Fu <siyuan.fu@...>
Cc: Fan Wang <fan.wang@...>
Cc: Jiewen Yao <jiewen.yao@...>
Cc: Nickle Wang <nickle.wang@...>

Abner Chang (2):
MdePkg/Include: Definitions of EFI REST JSON Structure Protocol
RedfishPkg/RestJsonStructureDxe: EFI REST JSON Structure Protocol

MdePkg/Include/Protocol/RestJsonStructure.h | 161 +++++
MdePkg/MdePkg.dec | 6 +
RedfishPkg/RedfishPkg.dsc | 3 +
.../RestJsonStructureDxe.c | 583 ++++++++++++++++++
.../RestJsonStructureDxe.inf | 40 ++
.../RestJsonStructureInternal.h | 35 ++
6 files changed, 828 insertions(+)
create mode 100644 MdePkg/Include/Protocol/RestJsonStructure.h
create mode 100644 RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.c
create mode 100644 RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.inf
create mode 100644 RedfishPkg/RestJsonStructureDxe/RestJsonStructureInternal.h

--
2.17.1


[RestJsonStructureDxe PATCH v2 2/2] RedfishPkg/RestJsonStructureDxe: EFI REST JSON Structure Protocol

Abner Chang
 

Implementation of EFI_REST_JSON_STRUCTURE_PROTOCOL, refer to UEFI spec
2.8 Section 29.7.3 EFI REST JSON Resource to C Structure Converter.

Signed-off-by: Abner Chang <abner.chang@...>

Cc: Jiaxin Wu <jiaxin.wu@...>
Cc: Siyuan Fu <siyuan.fu@...>
Cc: Fan Wang <fan.wang@...>
Cc: Jiewen Yao <jiewen.yao@...>
Cc: Nickle Wang <nickle.wang@...>
---
RedfishPkg/RedfishPkg.dsc | 3 +
.../RestJsonStructureDxe.c | 585 ++++++++++++++++++
.../RestJsonStructureDxe.inf | 40 ++
.../RestJsonStructureInternal.h | 33 +
4 files changed, 661 insertions(+)
create mode 100644 RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.c
create mode 100644 RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.inf
create mode 100644 RedfishPkg/RestJsonStructureDxe/RestJsonStructureInternal.h

diff --git a/RedfishPkg/RedfishPkg.dsc b/RedfishPkg/RedfishPkg.dsc
index 8acadddefc..5ef375ce40 100644
--- a/RedfishPkg/RedfishPkg.dsc
+++ b/RedfishPkg/RedfishPkg.dsc
@@ -38,3 +38,6 @@
DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
+
+[Components]
+ RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.inf
diff --git a/RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.c b/RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.c
new file mode 100644
index 0000000000..6156c33efa
--- /dev/null
+++ b/RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.c
@@ -0,0 +1,585 @@
+/** @file
+
+ The implementation of EFI REST Resource JSON to C structure convertor
+ Protocol.
+
+ (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <Uefi.h>
+#include <Protocol/RestJsonStructure.h>
+#include "RestJsonStructureInternal.h"
+
+LIST_ENTRY mRestJsonStructureList;
+EFI_HANDLE mProtocolHandle;
+
+/**
+ This function registers Restful resource interpreter for the
+ specific schema.
+
+ @param[in] This This is the EFI_REST_JSON_STRUCTURE_PROTOCOL instance.
+ @param[in] JsonStructureSupported The type and version of REST JSON resource which this converter
+ supports.
+ @param[in] ToStructure The function to convert REST JSON resource to structure.
+ @param[in] ToJson The function to convert REST JSON structure to JSON in text format.
+ @param[in] DestroyStructure Destroy REST JSON structure returned in ToStructure() function.
+
+ @retval EFI_SUCCESS Register successfully.
+ @retval Others Fail to register.
+
+**/
+EFI_STATUS
+EFIAPI
+RestJsonStructureRegister (
+ IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This,
+ IN EFI_REST_JSON_STRUCTURE_SUPPORTED *JsonStructureSupported,
+ IN EFI_REST_JSON_STRUCTURE_TO_STRUCTURE ToStructure,
+ IN EFI_REST_JSON_STRUCTURE_TO_JSON ToJson,
+ IN EFI_REST_JSON_STRUCTURE_DESTORY_STRUCTURE DestroyStructure
+)
+{
+ UINTN NumberOfNS;
+ UINTN Index;
+ LIST_ENTRY *ThisList;
+ REST_JSON_STRUCTURE_INSTANCE *Instance;
+ EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *CloneSupportedInterpId;
+ EFI_REST_JSON_STRUCTURE_SUPPORTED *ThisSupportedInterp;
+
+ if (This == NULL ||
+ ToStructure == NULL ||
+ ToJson == NULL ||
+ DestroyStructure == NULL ||
+ JsonStructureSupported == NULL
+ ) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ //
+ // Check how many name space interpreter can interpret.
+ //
+ ThisList = &JsonStructureSupported->NextSupportedRsrcInterp;
+ NumberOfNS = 1;
+ while (TRUE) {
+ if (ThisList->ForwardLink == &JsonStructureSupported->NextSupportedRsrcInterp) {
+ break;
+ } else {
+ ThisList = ThisList->ForwardLink;
+ NumberOfNS ++;
+ }
+ };
+
+ Instance =
+ (REST_JSON_STRUCTURE_INSTANCE *)AllocateZeroPool (sizeof (REST_JSON_STRUCTURE_INSTANCE) + NumberOfNS * sizeof (EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER));
+ if (Instance == NULL) {
+ return EFI_OUT_OF_RESOURCES;
+ }
+ InitializeListHead (&Instance->NextRestJsonStructureInstance);
+ Instance->NumberOfNameSpaceToConvert = NumberOfNS;
+ Instance->SupportedRsrcIndentifier = (EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *)((REST_JSON_STRUCTURE_INSTANCE *)Instance + 1);
+ //
+ // Copy supported resource identifer interpreter.
+ //
+ CloneSupportedInterpId = Instance->SupportedRsrcIndentifier;
+ ThisSupportedInterp = JsonStructureSupported;
+ for (Index = 0; Index < NumberOfNS; Index ++) {
+ CopyMem ((VOID *)CloneSupportedInterpId, (VOID *)&ThisSupportedInterp->RestResourceInterp, sizeof (EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER));
+ ThisSupportedInterp = (EFI_REST_JSON_STRUCTURE_SUPPORTED *)ThisSupportedInterp->NextSupportedRsrcInterp.ForwardLink;
+ CloneSupportedInterpId ++;
+ }
+ Instance->JsonToStructure = ToStructure;
+ Instance->StructureToJson = ToJson;
+ Instance->DestroyStructure = DestroyStructure;
+ InsertTailList (&mRestJsonStructureList, &Instance->NextRestJsonStructureInstance);
+ return EFI_SUCCESS;
+}
+
+/**
+ This function check if this interpreter instance support the given namesapce.
+
+ @param[in] This EFI_REST_JSON_STRUCTURE_PROTOCOL instance.
+ @param[in] InterpreterInstance REST_JSON_STRUCTURE_INSTANCE
+ @param[in] RsrcTypeIdentifier Resource type identifier.
+ @param[in] ResourceRaw Given Restful resource.
+ @param[out] InterpProp Property interpreted from given ResourceRaw.
+
+ @retval EFI_SUCCESS
+ @retval Others.
+
+**/
+EFI_STATUS
+InterpreterInstanceToStruct (
+ IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This,
+ IN REST_JSON_STRUCTURE_INSTANCE *InterpreterInstance,
+ IN EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *RsrcTypeIdentifier OPTIONAL,
+ IN CHAR8 *ResourceRaw,
+ OUT EFI_REST_JSON_STRUCTURE_HEADER **InterpProp
+ )
+{
+ UINTN Index;
+ EFI_STATUS Status;
+ EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *ThisSupportedRsrcTypeId;
+
+ if (This == NULL ||
+ InterpreterInstance == NULL ||
+ ResourceRaw == NULL ||
+ InterpProp == NULL
+ ) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ Status = EFI_UNSUPPORTED;
+ if (RsrcTypeIdentifier == NULL) {
+ //
+ // No resource type identifier, send to intepreter anyway.
+ // Interpreter may recognize this resource.
+ //
+ Status = InterpreterInstance->JsonToStructure (
+ This,
+ NULL,
+ ResourceRaw,
+ InterpProp
+ );
+ } else {
+ //
+ // Check if the namesapce and version is supported by this interpreter.
+ //
+ ThisSupportedRsrcTypeId = InterpreterInstance->SupportedRsrcIndentifier;
+ for (Index = 0; Index < InterpreterInstance->NumberOfNameSpaceToConvert; Index ++){
+ if (AsciiStrCmp (
+ RsrcTypeIdentifier->NameSpace.ResourceTypeName,
+ ThisSupportedRsrcTypeId->NameSpace.ResourceTypeName) == 0){
+ if ((RsrcTypeIdentifier->NameSpace.MajorVersion == NULL) &&
+ (RsrcTypeIdentifier->NameSpace.MinorVersion == NULL) &&
+ (RsrcTypeIdentifier->NameSpace.ErrataVersion == NULL)
+ ) {
+ //
+ // Don't check version of this resource type identifier.
+ //
+ Status = InterpreterInstance->JsonToStructure (
+ This,
+ RsrcTypeIdentifier,
+ ResourceRaw,
+ InterpProp
+ );
+ break;
+ } else {
+ //
+ // Check version.
+ //
+ if ((AsciiStrCmp (
+ RsrcTypeIdentifier->NameSpace.MajorVersion,
+ ThisSupportedRsrcTypeId->NameSpace.MajorVersion) == 0) &&
+ (AsciiStrCmp (
+ RsrcTypeIdentifier->NameSpace.MinorVersion,
+ ThisSupportedRsrcTypeId->NameSpace.MinorVersion) == 0) &&
+ (AsciiStrCmp (
+ RsrcTypeIdentifier->NameSpace.ErrataVersion,
+ ThisSupportedRsrcTypeId->NameSpace.ErrataVersion) == 0)) {
+ Status = InterpreterInstance->JsonToStructure (
+ This,
+ RsrcTypeIdentifier,
+ ResourceRaw,
+ InterpProp
+ );
+ break;
+ }
+ }
+ }
+ ThisSupportedRsrcTypeId ++;
+ }
+ }
+ return Status;
+}
+/**
+ This function converts JSON C structure to JSON property.
+
+ @param[in] This EFI_REST_JSON_STRUCTURE_PROTOCOL instance.
+ @param[in] InterpreterInstance REST_JSON_STRUCTURE_INSTANCE
+ @param[in] RsrcTypeIdentifier Resource type identifier.
+ @param[out] ResourceRaw Output in JSON text format.
+
+ @retval EFI_SUCCESS
+ @retval Others.
+
+**/
+EFI_STATUS
+InterpreterEfiStructToInstance (
+ IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This,
+ IN REST_JSON_STRUCTURE_INSTANCE *InterpreterInstance,
+ IN EFI_REST_JSON_STRUCTURE_HEADER *InterpProp,
+ OUT CHAR8 **ResourceRaw
+)
+{
+ UINTN Index;
+ EFI_STATUS Status;
+ EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *ThisSupportedRsrcTypeId;
+ EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *RsrcTypeIdentifier;
+
+ if (This == NULL ||
+ InterpreterInstance == NULL ||
+ InterpProp == NULL ||
+ ResourceRaw == NULL
+ ) {
+ return EFI_INVALID_PARAMETER;
+ }
+ RsrcTypeIdentifier = &InterpProp->JsonRsrcIdentifier;
+ if (RsrcTypeIdentifier == NULL ||
+ RsrcTypeIdentifier->NameSpace.ResourceTypeName == NULL ||
+ RsrcTypeIdentifier->NameSpace.MajorVersion == NULL ||
+ RsrcTypeIdentifier->NameSpace.MinorVersion == NULL ||
+ RsrcTypeIdentifier->NameSpace.ErrataVersion == NULL
+ ) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ //
+ // Check if the namesapce and version is supported by this interpreter.
+ //
+ Status = EFI_UNSUPPORTED;
+ ThisSupportedRsrcTypeId = InterpreterInstance->SupportedRsrcIndentifier;
+ for (Index = 0; Index < InterpreterInstance->NumberOfNameSpaceToConvert; Index ++){
+ if (AsciiStrCmp (
+ RsrcTypeIdentifier->NameSpace.ResourceTypeName,
+ ThisSupportedRsrcTypeId->NameSpace.ResourceTypeName) == 0){
+ //
+ // Check version.
+ //
+ if ((AsciiStrCmp (
+ RsrcTypeIdentifier->NameSpace.MajorVersion,
+ ThisSupportedRsrcTypeId->NameSpace.MajorVersion) == 0) &&
+ (AsciiStrCmp (
+ RsrcTypeIdentifier->NameSpace.MinorVersion,
+ ThisSupportedRsrcTypeId->NameSpace.MinorVersion) == 0) &&
+ (AsciiStrCmp (
+ RsrcTypeIdentifier->NameSpace.ErrataVersion,
+ ThisSupportedRsrcTypeId->NameSpace.ErrataVersion) == 0)) {
+ Status = InterpreterInstance->StructureToJson (
+ This,
+ InterpProp,
+ ResourceRaw
+ );
+ break;
+ }
+ }
+ ThisSupportedRsrcTypeId ++;
+ }
+ return Status;
+}
+
+/**
+ This function destory REST property structure.
+
+ @param[in] This EFI_REST_JSON_STRUCTURE_PROTOCOL instance.
+ @param[in] InterpreterInstance REST_JSON_STRUCTURE_INSTANCE
+ @param[out] InterpProp Property interpreted from given ResourceRaw.
+
+ @retval EFI_SUCCESS
+ @retval Others.
+
+**/
+EFI_STATUS
+InterpreterInstanceDestoryJsonStruct (
+ IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This,
+ IN REST_JSON_STRUCTURE_INSTANCE *InterpreterInstance,
+ IN EFI_REST_JSON_STRUCTURE_HEADER *InterpProp
+ )
+{
+ UINTN Index;
+ EFI_STATUS Status;
+ EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *ThisSupportedRsrcTypeId;
+
+ if (This == NULL ||
+ InterpreterInstance == NULL ||
+ InterpProp == NULL
+ ) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ Status = EFI_UNSUPPORTED;
+ //
+ // Check if the namesapce and version is supported by this interpreter.
+ //
+ ThisSupportedRsrcTypeId = InterpreterInstance->SupportedRsrcIndentifier;
+ for (Index = 0; Index < InterpreterInstance->NumberOfNameSpaceToConvert; Index ++){
+ if (AsciiStrCmp (
+ InterpProp->JsonRsrcIdentifier.NameSpace.ResourceTypeName,
+ ThisSupportedRsrcTypeId->NameSpace.ResourceTypeName) == 0) {
+ if ((InterpProp->JsonRsrcIdentifier.NameSpace.MajorVersion == NULL) &&
+ (InterpProp->JsonRsrcIdentifier.NameSpace.MinorVersion == NULL) &&
+ (InterpProp->JsonRsrcIdentifier.NameSpace.ErrataVersion == NULL)
+ ) {
+ //
+ // Don't check version of this resource type identifier.
+ //
+ Status = InterpreterInstance->DestroyStructure (
+ This,
+ InterpProp
+ );
+ break;
+ } else {
+ //
+ // Check version.
+ //
+ if ((AsciiStrCmp (
+ InterpProp->JsonRsrcIdentifier.NameSpace.MajorVersion,
+ ThisSupportedRsrcTypeId->NameSpace.MajorVersion) == 0) &&
+ (AsciiStrCmp (
+ InterpProp->JsonRsrcIdentifier.NameSpace.MinorVersion,
+ ThisSupportedRsrcTypeId->NameSpace.MinorVersion) == 0) &&
+ (AsciiStrCmp (
+ InterpProp->JsonRsrcIdentifier.NameSpace.ErrataVersion,
+ ThisSupportedRsrcTypeId->NameSpace.ErrataVersion) == 0)) {
+ Status = InterpreterInstance->DestroyStructure (
+ This,
+ InterpProp
+ );
+ break;
+ }
+ }
+ }
+ ThisSupportedRsrcTypeId ++;
+ }
+ return Status;
+}
+
+/**
+ This function translates the given JSON text to JSON C Structure.
+
+ @param[in] This EFI_REST_JSON_STRUCTURE_PROTOCOL instance.
+ @param[in] RsrcTypeIdentifier Resource type identifier.
+ @param[in] ResourceJsonText Given Restful resource.
+ @param[out] JsonStructure Property interpreted from given ResourceRaw.
+
+ @retval EFI_SUCCESS
+ @retval Others.
+
+**/
+EFI_STATUS
+EFIAPI
+RestJsonStructureToStruct (
+ IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This,
+ IN EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *RsrcTypeIdentifier OPTIONAL,
+ IN CHAR8 *ResourceJsonText,
+ OUT EFI_REST_JSON_STRUCTURE_HEADER **JsonStructure
+)
+{
+ EFI_STATUS Status;
+ REST_JSON_STRUCTURE_INSTANCE *Instance;
+
+ if (This == NULL ||
+ ResourceJsonText == NULL ||
+ JsonStructure == NULL
+ ) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ if (IsListEmpty (&mRestJsonStructureList)) {
+ return EFI_UNSUPPORTED;
+ }
+ Status = EFI_SUCCESS;
+ Instance = (REST_JSON_STRUCTURE_INSTANCE *)GetFirstNode (&mRestJsonStructureList);
+ while (TRUE) {
+ Status = InterpreterInstanceToStruct (
+ This,
+ Instance,
+ RsrcTypeIdentifier,
+ ResourceJsonText,
+ JsonStructure
+ );
+ if (!EFI_ERROR (Status)) {
+ break;
+ }
+ if (IsNodeAtEnd(&mRestJsonStructureList, &Instance->NextRestJsonStructureInstance)) {
+ Status = EFI_UNSUPPORTED;
+ break;
+ }
+ Instance = (REST_JSON_STRUCTURE_INSTANCE *)GetNextNode (&mRestJsonStructureList, &Instance->NextRestJsonStructureInstance);
+ };
+ return Status;
+}
+
+/**
+ This function destory REST property EFI structure which returned in
+ JsonToStructure().
+
+ @param[in] This EFI_REST_JSON_STRUCTURE_PROTOCOL instance.
+ @param[in] InterpProp Property to destory.
+
+ @retval EFI_SUCCESS
+ @retval Others
+
+**/
+EFI_STATUS
+EFIAPI
+RestJsonStructureDestroyStruct (
+ IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This,
+ IN EFI_REST_JSON_STRUCTURE_HEADER *JsonStructureHeader
+)
+{
+ EFI_STATUS Status;
+ REST_JSON_STRUCTURE_INSTANCE *Instance;
+
+ if (This == NULL || JsonStructureHeader == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ if (IsListEmpty (&mRestJsonStructureList)) {
+ return EFI_UNSUPPORTED;
+ }
+ Status = EFI_SUCCESS;
+ Instance = (REST_JSON_STRUCTURE_INSTANCE *)GetFirstNode (&mRestJsonStructureList);
+ while (TRUE) {
+ Status = InterpreterInstanceDestoryJsonStruct (
+ This,
+ Instance,
+ JsonStructureHeader
+ );
+ if (!EFI_ERROR (Status)) {
+ break;
+ }
+ if (IsNodeAtEnd(&mRestJsonStructureList, &Instance->NextRestJsonStructureInstance)) {
+ Status = EFI_UNSUPPORTED;
+ break;
+ }
+ Instance = (REST_JSON_STRUCTURE_INSTANCE *)GetNextNode (&mRestJsonStructureList, &Instance->NextRestJsonStructureInstance);
+ };
+ return Status;
+}
+
+/**
+ This function translates the given JSON C Structure to JSON text.
+
+ @param[in] This EFI_REST_JSON_STRUCTURE_PROTOCOL instance.
+ @param[in] InterpProp Given Restful resource.
+ @param[out] ResourceRaw Resource in RESTfuls service oriented.
+
+ @retval EFI_SUCCESS
+ @retval Others Fail to remove the entry
+
+**/
+EFI_STATUS
+EFIAPI
+RestJsonStructureToJson (
+ IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This,
+ IN EFI_REST_JSON_STRUCTURE_HEADER *InterpProp,
+ OUT CHAR8 **ResourceRaw
+)
+{
+ EFI_STATUS Status;
+ REST_JSON_STRUCTURE_INSTANCE *Instance;
+
+ if (This == NULL || InterpProp == NULL || ResourceRaw == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ if (IsListEmpty (&mRestJsonStructureList)) {
+ return EFI_UNSUPPORTED;
+ }
+ Status = EFI_SUCCESS;
+ Instance = (REST_JSON_STRUCTURE_INSTANCE *)GetFirstNode (&mRestJsonStructureList);
+ while (TRUE) {
+ Status = InterpreterEfiStructToInstance (
+ This,
+ Instance,
+ InterpProp,
+ ResourceRaw
+ );
+ if (!EFI_ERROR (Status)) {
+ break;
+ }
+ if (IsNodeAtEnd(&mRestJsonStructureList, &Instance->NextRestJsonStructureInstance)) {
+ Status = EFI_UNSUPPORTED;
+ break;
+ }
+ Instance = (REST_JSON_STRUCTURE_INSTANCE *)GetNextNode (&mRestJsonStructureList, &Instance->NextRestJsonStructureInstance);
+ };
+ return Status;
+}
+
+EFI_REST_JSON_STRUCTURE_PROTOCOL mRestJsonStructureProtocol = {
+ RestJsonStructureRegister,
+ RestJsonStructureToStruct,
+ RestJsonStructureToJson,
+ RestJsonStructureDestroyStruct
+};
+
+/**
+ This is the declaration of an EFI image entry point.
+
+ @param ImageHandle The firmware allocated handle for the UEFI image.
+ @param SystemTable A pointer to the EFI System Table.
+
+ @retval EFI_SUCCESS The operation completed successfully.
+ @retval Others An unexpected error occurred.
+**/
+EFI_STATUS
+EFIAPI
+RestJsonStructureEntryPoint (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+{
+ EFI_STATUS Status;
+
+ InitializeListHead (&mRestJsonStructureList);
+ //
+ // Install the Restful Resource Interpreter Protocol.
+ //
+ mProtocolHandle = NULL;
+ Status = gBS->InstallProtocolInterface (
+ &mProtocolHandle,
+ &gEfiRestJsonStructureProtocolGuid,
+ EFI_NATIVE_INTERFACE,
+ (VOID *)&mRestJsonStructureProtocol
+ );
+ return Status;
+}
+
+/**
+ This is the unload handle for Redfish discover module.
+
+ Disconnect the driver specified by ImageHandle from all the devices in the handle database.
+ Uninstall all the protocols installed in the driver entry point.
+
+ @param[in] ImageHandle The drivers' driver image.
+
+ @retval EFI_SUCCESS The image is unloaded.
+ @retval Others Failed to unload the image.
+
+**/
+EFI_STATUS
+EFIAPI
+RestJsonStructureUnload (
+ IN EFI_HANDLE ImageHandle
+ )
+{
+ EFI_STATUS Status;
+ REST_JSON_STRUCTURE_INSTANCE *Instance;
+ REST_JSON_STRUCTURE_INSTANCE *NextInstance;
+
+ if (IsListEmpty (&mRestJsonStructureList)) {
+ return EFI_SUCCESS;
+ }
+ //
+ // Free memory of REST_JSON_STRUCTURE_INSTANCE instance.
+ //
+ Instance = (REST_JSON_STRUCTURE_INSTANCE *)GetFirstNode (&mRestJsonStructureList);
+ do {
+ NextInstance = NULL;
+ if (!IsNodeAtEnd(&mRestJsonStructureList, &Instance->NextRestJsonStructureInstance)) {
+ NextInstance = (REST_JSON_STRUCTURE_INSTANCE *)GetNextNode (&mRestJsonStructureList, &Instance->NextRestJsonStructureInstance);
+ }
+ FreePool ((VOID *)Instance);
+ Instance = NextInstance;
+ } while (Instance != NULL);
+
+ Status = gBS->UninstallProtocolInterface (
+ mProtocolHandle,
+ &gEfiRestJsonStructureProtocolGuid,
+ (VOID *)&mRestJsonStructureProtocol
+ );
+ return Status;
+}
diff --git a/RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.inf b/RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.inf
new file mode 100644
index 0000000000..df774de715
--- /dev/null
+++ b/RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.inf
@@ -0,0 +1,40 @@
+## @file
+# Implementation of EFI REST JSON Structure Protocol.
+#
+# (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = RestJsonStructureDxe
+ FILE_GUID = 83FAAFBF-FC4B-469F-892A-798E66A6F50A
+ MODULE_TYPE = DXE_DRIVER
+ VERSION_STRING = 1.0
+ ENTRY_POINT = RestJsonStructureEntryPoint
+ UNLOAD_IMAGE = RestJsonStructureUnload
+
+[Packages]
+ MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+ RedfishPkg/RedfishPkg.dec
+
+[Sources]
+ RestJsonStructureDxe.c
+
+[LibraryClasses]
+ BaseLib
+ BaseMemoryLib
+ MemoryAllocationLib
+ UefiBootServicesTableLib
+ UefiDriverEntryPoint
+ UefiLib
+
+[Protocols]
+ gEfiRestJsonStructureProtocolGuid ## Producing
+
+[Depex]
+ TRUE
+
diff --git a/RedfishPkg/RestJsonStructureDxe/RestJsonStructureInternal.h b/RedfishPkg/RestJsonStructureDxe/RestJsonStructureInternal.h
new file mode 100644
index 0000000000..e8a3408404
--- /dev/null
+++ b/RedfishPkg/RestJsonStructureDxe/RestJsonStructureInternal.h
@@ -0,0 +1,33 @@
+/** @file
+ The internal definitions of EFI REST Resource JSON to C structure convertor
+ Protocol.
+
+ (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef EFI_REST_JSON_STRUCTURE_INTERNAL_H_
+#define EFI_REST_JSON_STRUCTURE_INTERNAL_H_
+
+#include <Library/BaseLib.h>
+#include <Library/UefiLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/UefiDriverEntryPoint.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/MemoryAllocationLib.h>
+
+///
+/// Internal structure to maintain the information of JSON to
+/// C structure convertor.
+///
+typedef struct _REST_JSON_STRUCTURE_INSTANCE {
+ LIST_ENTRY NextRestJsonStructureInstance; ///< Next convertor instance
+ UINTN NumberOfNameSpaceToConvert; ///< Number of resource type this convertor supports.
+ EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *SupportedRsrcIndentifier; ///< The resource type linklist
+ EFI_REST_JSON_STRUCTURE_TO_STRUCTURE JsonToStructure; ///< JSON to C structure function
+ EFI_REST_JSON_STRUCTURE_TO_JSON StructureToJson; ///< C structure to JSON function
+ EFI_REST_JSON_STRUCTURE_DESTORY_STRUCTURE DestroyStructure; ///< Destory C struture function.
+} REST_JSON_STRUCTURE_INSTANCE;
+#endif
--
2.17.1


Re: [RedfishPkg PATCH v6 3/4] .azurepipelines/templates: Add RedfishPkg to target build

Abner Chang
 

Hi Sean and Bret,
I picked up patch 2/4 and 3/4 from v6 and created a PR. https://github.com/tianocore/edk2/pull/1013
Are you able to take a look and set Push label to merge it? However the PR was closed.

Thanks
Abner

-----Original Message-----
From: Chang, Abner (HPS SW/FW Technologist)
Sent: Thursday, October 8, 2020 11:57 AM
To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist)
<abner.chang@...>; spbrogan@...
Cc: Sean Brogan <sean.brogan@...>; Bret Barkelew
<Bret.Barkelew@...>; Michael D Kinney
<michael.d.kinney@...>; Liming Gao <gaoliming@...>;
Wang, Nickle (HPS SW) <nickle.wang@...>; Laszlo Ersek
<lersek@...>; Leif Lindholm <leif@...>
Subject: RE: [edk2-devel] [RedfishPkg PATCH v6
3/4] .azurepipelines/templates: Add RedfishPkg to target build

Add Laszlo and Leif to aware of this conversation.

-----Original Message-----
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
Abner Chang
Sent: Thursday, October 8, 2020 9:09 AM
To: devel@edk2.groups.io; spbrogan@...
Cc: Sean Brogan <sean.brogan@...>; Bret Barkelew
<Bret.Barkelew@...>; Michael D Kinney
<michael.d.kinney@...>; Liming Gao <gaoliming@...>;
Wang, Nickle (HPS SW) <nickle.wang@...>
Subject: Re: [edk2-devel] [RedfishPkg PATCH v6 3/4]
.azurepipelines/templates: Add RedfishPkg to target build

Ok thanks for clarifying this!

I think the entire series of patch for the initial version of
RedfishPkg is all good now. I will push my part (1/4) and please help
to push 2/4 and 3/4, with your feedback tag is better because v6 has
updates on pr-gate-build-job.yml.


-----Original Message-----
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf
Of Sean
Sent: Thursday, October 8, 2020 9:01 AM
To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist)
<abner.chang@...>
Cc: Sean Brogan <sean.brogan@...>; Bret Barkelew
<Bret.Barkelew@...>; Michael D Kinney
<michael.d.kinney@...>; Liming Gao
<gaoliming@...>;
Wang, Nickle (HPS SW) <nickle.wang@...>
Subject: Re: [edk2-devel] [RedfishPkg PATCH v6 3/4]
.azurepipelines/templates: Add RedfishPkg to target build

thats correct. The grouping in the "matrix" is just to load balance
the servers when CI/PR gates run.



On 10/7/2020 5:59 PM, Abner Chang wrote:
Hi Sean and Bret,
The v6 update for .azurepiplines is to put RedfishPkg together
with
Network in the TARGET_NETWORK? Is that ok RedfishPkg is involved in
TARGET_NETWORK CI test? I think it should be fine right? They don't
impact each other when developers are working on these two packages
separately.

-----Original Message-----
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On
Behalf Of Abner Chang
Sent: Wednesday, October 7, 2020 10:16 AM
To: devel@edk2.groups.io
Cc: Sean Brogan <sean.brogan@...>; Bret Barkelew
<Bret.Barkelew@...>; Michael D Kinney
<michael.d.kinney@...>; Liming Gao
<gaoliming@...>; Wang, Nickle (HPS SW)
<nickle.wang@...>
Subject: [edk2-devel] [RedfishPkg PATCH v6
3/4] .azurepipelines/templates:
Add RedfishPkg to target build

Signed-off-by: Abner Chang <abner.chang@...>
Cc: Sean Brogan <sean.brogan@...>
Cc: Bret Barkelew <Bret.Barkelew@...>
Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Liming Gao <gaoliming@...>
Cc: Nickle Wang <nickle.wang@...>
Reviewed-by: Bret Barkelew <Bret.Barkelew@...>
---
.azurepipelines/templates/pr-gate-build-job.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.azurepipelines/templates/pr-gate-build-job.yml
b/.azurepipelines/templates/pr-gate-build-job.yml
index 2683687a1c..89c632c0a7 100644
--- a/.azurepipelines/templates/pr-gate-build-job.yml
+++ b/.azurepipelines/templates/pr-gate-build-job.yml
@@ -31,7 +31,7 @@ jobs:
Build.Pkgs: 'MdeModulePkg'
Build.Targets: 'RELEASE,NO-TARGET'
TARGET_NETWORK:
- Build.Pkgs: 'NetworkPkg'
+ Build.Pkgs: 'NetworkPkg,RedfishPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET'
TARGET_OTHER:
Build.Pkgs: 'PcAtChipsetPkg,ShellPkg'
--
2.17.1














Re: OpensslLib compiling error : cannot open include file : openssl/aes.h

Bob Feng
 

cc_resp.txt is generated by build tool.

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Tiger Liu(BJ-RD)
Sent: Wednesday, October 14, 2020 3:26 PM
To: gaoliming <gaoliming@...>; devel@edk2.groups.io
Subject: 答复: [edk2-devel] OpensslLib compiling error : cannot open include file : openssl/aes.h

Hi, liming:
Got it.

Is Cc_resp.txt produced by compiler automatically? Or by UDK build tools?

The problem I met may be caused by violating the limitation length of the compiler command line.
After trim the length, could pass the failed point.

Thanks
-----邮件原件-----
发件人: gaoliming <gaoliming@...>
发送时间: 2020年10月14日 13:35
收件人: devel@edk2.groups.io; Tiger Liu(BJ-RD) <TigerLiu@...>
主题: 回复: [edk2-devel] OpensslLib compiling error : cannot open include file : openssl/aes.h

cc_resp.txt includes the compiler flag and include path. It will be used by the compiler. Then, the compile command line length can be reduced. It can avoid nmake limitation of the command line length 4096.

Thanks
Liming
-----邮件原件-----
发件人: bounce+27952+66197+4905953+8761045@groups.io
<bounce+27952+66197+4905953+8761045@groups.io> 代表 Tiger
Liu(BJ-RD)
发送时间: 2020年10月14日 9:45
收件人: gaoliming <gaoliming@...>; devel@edk2.groups.io
主题: 答复: [edk2-devel] OpensslLib compiling error : cannot open include
file : openssl/aes.h

Hi, Liming:
From Build.log, it seems include path is ok:
......
cl.exe"
/Foy:\Build\ZxxPlatformPkg\DEBUG_VS2015x86\X64\CryptoPkg\Library\Base
CryptLib\RuntimeCryptLib\OUTPUT\Hash\ /showIncludes /nologo /c /GS-
/W4 /Gs32768 /D UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF
/Z7 /Gw /wd4090 -
......
/Iy:\CryptoPkg /Iy:\CryptoPkg\Include /Iy:\CryptoPkg\Private
/Iy:\CryptoPkg\Library\Include
/Iy:\CryptoPkg\Library\OpensslLib\openssl\include
y:\CryptoPkg\Library\BaseCryptLib\Hash\CryptSm3.c
y:\CryptoPkg\Library\BaseCryptLib\Hash\CryptMd5.c
y:\CryptoPkg\Library\BaseCryptLib\Hash\CryptSha256.c
y:\CryptoPkg\Library\BaseCryptLib\Hash\CryptSha512Null.c
y:\CryptoPkg\Library\BaseCryptLib\Hash\CryptSha1.c

And BaseCryptLib / IntrinsicLib compiled successfully.

And I found a cc_resp.txt file in
Build\...\DEBUG_VS2015x86\X64\CryptoPkg\Library\OpensslLib\OpensslLib\
OUTPUT
Why produce a cc_resp.txt?

Thanks
-----邮件原件-----
发件人: gaoliming <gaoliming@...>
发送时间: 2020年10月13日 18:03
收件人: devel@edk2.groups.io; Tiger Liu(BJ-RD) <TigerLiu@...>
主题: 回复: [edk2-devel] OpensslLib compiling error : cannot open include
file : openssl/aes.h

Can you print the full build log and check the compiler include path?

Is this a clean build issue or incremental build issue?

Thanks
Liming
-----邮件原件-----
发件人: bounce+27952+66166+4905953+8761045@groups.io
<bounce+27952+66166+4905953+8761045@groups.io> 代表 Tiger
Liu(BJ-RD)
发送时间: 2020年10月13日 16:38
收件人: devel@edk2.groups.io
主题: [edk2-devel] OpensslLib compiling error : cannot open include file :
openssl/aes.h

Hi, experts:
When I compiled OpensslLib, I met a problem:
......
\CryptoPkg\Library\OpensslLib\openssl\crypto\aes\aes_core.c(42):
fatal error C1083: Cannot open include file: 'openssl/crypto.h': No
such file or directory
\CryptoPkg\Library\OpensslLib\openssl\crypto\aes\aes_misc.c(10):
fatal error C1083: Cannot open include file: 'openssl/opensslv.h':
No such file or directory ......

But these files exist in
CryptoPkg\Library\OpensslLib\openssl\include\openssl .

Does anybody meet same problems?

Note:
CryptoPkg.dec has also declared this include path:
......
[Includes.Common.Private]
Private
Library/Include
Library/OpensslLib/openssl/include
......

Thanks


保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或

内容做任何未经授权的查阅、使用、复制或转发。
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information
and is for the sole use of its intended recipient. Any unauthorized
review, use, copying or forwarding of this email or the content of
this email is
strictly prohibited.







保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其
内容做任何未经授权的查阅、使用、复制或转发。
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and
is for the sole use of its intended recipient. Any unauthorized
review, use, copying or forwarding of this email or the content of this email is strictly prohibited.







保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.


Re: [Rest Ex Definition PATCH 1/2] MdePkg/Include: Definitions of EFI REST EX Protocol

Abner Chang
 

Thanks Liming, v2 patch sent.

CI test passed on PR: https://github.com/tianocore/edk2/pull/1012

-----Original Message-----
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
gaoliming
Sent: Wednesday, October 14, 2020 1:37 PM
To: 'Wu, Jiaxin' <jiaxin.wu@...>; devel@edk2.groups.io; Chang, Abner
(HPS SW/FW Technologist) <abner.chang@...>
Cc: 'Kinney, Michael D' <michael.d.kinney@...>; 'Liu, Zhiguang'
<zhiguang.liu@...>; 'Yao, Jiewen' <jiewen.yao@...>; Wang,
Nickle (HPS SW) <nickle.wang@...>
Subject: 回复: [edk2-devel] [Rest Ex Definition PATCH 1/2] MdePkg/Include:
Definitions of EFI REST EX Protocol

Abner:
In the file header, please describe this definition is from which version UEFI
spec. With this change, Reviewed-by: Liming Gao <gaoliming@....
cn>

Thanks
Liming
-----邮件原件-----
发件人: Wu, Jiaxin <jiaxin.wu@...>
发送时间: 2020年10月12日 16:54
收件人: devel@edk2.groups.io; abner.chang@...
抄送: Kinney, Michael D <michael.d.kinney@...>; Liming Gao
<gaoliming@...>; Liu, Zhiguang <zhiguang.liu@...>;
Yao, Jiewen <jiewen.yao@...>; Nickle Wang
<nickle.wang@...>
主题: RE: [edk2-devel] [Rest Ex Definition PATCH 1/2] MdePkg/Include:
Definitions of EFI REST EX Protocol

Reviewed-by: Jiaxin Wu <jiaxin.wu@...>



-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
Abner
Chang
Sent: Monday, October 12, 2020 3:04 PM
To: devel@edk2.groups.io
Cc: Kinney, Michael D <michael.d.kinney@...>; Liming Gao
<gaoliming@...>; Liu, Zhiguang <zhiguang.liu@...>;
Yao, Jiewen <jiewen.yao@...>; Nickle Wang
<nickle.wang@...>
Subject: [edk2-devel] [Rest Ex Definition PATCH 1/2] MdePkg/Include:
Definitions of EFI REST EX Protocol

Add definitions of EFI REST EX Protocol according to UEFI spec v2.8
Section 29.7.2 EFI REST EX Protocol.

Signed-off-by: Jiaxin Wu <jiaxin.wu@...>
Signed-off-by: Siyuan Fu <siyuan.fu@...>
Signed-off-by: Fan Wang <fan.wang@...>
Signed-off-by: Abner Chang <abner.chang@...>

Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Liming Gao <gaoliming@...>
Cc: Zhiguang Liu <zhiguang.liu@...>
Cc: Jiewen Yao <jiewen.yao@...>
Cc: Nickle Wang <nickle.wang@...>
---
MdePkg/Include/Protocol/RestEx.h | 388
+++++++++++++++++++++++++++++++
MdePkg/MdePkg.dec | 7 +
2 files changed, 395 insertions(+)
create mode 100644 MdePkg/Include/Protocol/RestEx.h

diff --git a/MdePkg/Include/Protocol/RestEx.h
b/MdePkg/Include/Protocol/RestEx.h
new file mode 100644
index 0000000000..c42096d14c
--- /dev/null
+++ b/MdePkg/Include/Protocol/RestEx.h
@@ -0,0 +1,388 @@
+/** @file
+ This file defines the EFI REST EX Protocol interface. It is
+ split into the following two main sections.
+
+ - REST EX Service Binding Protocol
+ - REST EX Protocol
+
+ Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+ (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+
+**/
+
+#ifndef EFI_REST_EX_PROTOCOL_H_
+#define EFI_REST_EX_PROTOCOL_H_
+
+#include <Protocol/Http.h>
+
+//
+//GUID definitions
+//
+#define EFI_REST_EX_SERVICE_BINDING_PROTOCOL_GUID \
+ { \
+ 0x456bbe01, 0x99d0, 0x45ea, {0xbb, 0x5f, 0x16, 0xd8, 0x4b,
+0xed,
0xc5,
0x59 } \
+ }
+
+#define EFI_REST_EX_PROTOCOL_GUID \
+ { \
+ 0x55648b91, 0xe7d, 0x40a3, {0xa9, 0xb3, 0xa8, 0x15, 0xd7, 0xea,
0xdf,
0x97 } \
+ }
+
+typedef struct _EFI_REST_EX_PROTOCOL EFI_REST_EX_PROTOCOL;
+
+//*******************************************************
+//EFI_REST_EX_SERVICE_INFO_VER
+//*******************************************************
+typedef struct {
+ UINT8 Major;
+ UINT8 Minor;
+} EFI_REST_EX_SERVICE_INFO_VER;
+
+//*******************************************************
+//EFI_REST_EX_SERVICE_INFO_HEADER
+//*******************************************************
+typedef struct {
+ UINT32 Length;
+ EFI_REST_EX_SERVICE_INFO_VER RestServiceInfoVer;
+} EFI_REST_EX_SERVICE_INFO_HEADER;
+
+//*******************************************************
+// EFI_REST_EX_SERVICE_TYPE
+//*******************************************************
+typedef enum {
+ EfiRestExServiceUnspecific = 1,
+ EfiRestExServiceRedfish,
+ EfiRestExServiceOdata,
+ EfiRestExServiceVendorSpecific = 0xff,
+ EfiRestExServiceTypeMax
+} EFI_REST_EX_SERVICE_TYPE;
+
+//*******************************************************
+// EFI_REST_EX_SERVICE_ACCESS_MODE
+//*******************************************************
+typedef enum {
+ EfiRestExServiceInBandAccess = 1,
+ EfiRestExServiceOutOfBandAccess = 2,
+ EfiRestExServiceModeMax
+} EFI_REST_EX_SERVICE_ACCESS_MODE;
+
+//*******************************************************
+// EFI_REST_EX_CONFIG_TYPE
+//*******************************************************
+typedef enum {
+ EfiRestExConfigHttp,
+ EfiRestExConfigUnspecific,
+ EfiRestExConfigTypeMax
+} EFI_REST_EX_CONFIG_TYPE;
+
+//*******************************************************
+//EFI_REST_EX_SERVICE_INFO v1.0
+//*******************************************************
+typedef struct {
+ EFI_REST_EX_SERVICE_INFO_HEADER EfiRestExServiceInfoHeader;
+ EFI_REST_EX_SERVICE_TYPE RestServiceType;
+ EFI_REST_EX_SERVICE_ACCESS_MODE RestServiceAccessMode;
+ EFI_GUID VendorRestServiceName;
+ UINT32 VendorSpecificDataLength;
+ UINT8 *VendorSpecifcData;
+ EFI_REST_EX_CONFIG_TYPE RestExConfigType;
+ UINT8 RestExConfigDataLength;
+} EFI_REST_EX_SERVICE_INFO_V_1_0;
+
+//*******************************************************
+//EFI_REST_EX_SERVICE_INFO
+//*******************************************************
+typedef union {
+ EFI_REST_EX_SERVICE_INFO_HEADER EfiRestExServiceInfoHeader;
+ EFI_REST_EX_SERVICE_INFO_V_1_0 EfiRestExServiceInfoV10; }
+EFI_REST_EX_SERVICE_INFO;
+
+//*******************************************************
+// EFI_REST_EX_HTTP_CONFIG_DATA
+//*******************************************************
+typedef struct {
+ EFI_HTTP_CONFIG_DATA HttpConfigData;
+ UINT32 SendReceiveTimeout;
+} EFI_REST_EX_HTTP_CONFIG_DATA;
+
+//*******************************************************
+//EFI_REST_EX_CONFIG_DATA
+//*******************************************************
+typedef UINT8 *EFI_REST_EX_CONFIG_DATA;
+
+//*******************************************************
+//EFI_REST_EX_TOKEN
+//*******************************************************
+typedef struct {
+ EFI_EVENT Event;
+ EFI_STATUS Status;
+ EFI_HTTP_MESSAGE *ResponseMessage; } EFI_REST_EX_TOKEN;
+
+/**
+ Provides a simple HTTP-like interface to send and receive
+resources
from a
REST service.
+
+ The SendReceive() function sends an HTTP request to this REST
service,
and returns a
+ response when the data is retrieved from the service.
+ RequestMessage
contains the HTTP
+ request to the REST resource identified by
RequestMessage.Request.Url.
The
+ ResponseMessage is the returned HTTP response for that request,
including any HTTP
+ status.
+
+ @param[in] This Pointer to
EFI_REST_EX_PROTOCOL instance for a
particular
+ REST service.
+ @param[in] RequestMessage Pointer to the HTTP request data
for this
resource
+ @param[out] ResponseMessage Pointer to the HTTP response
data
obtained for this requested.
+
+ @retval EFI_SUCCESS operation succeeded.
+ @retval EFI_INVALID_PARAMETER This, RequestMessage, or
ResponseMessage are NULL.
+ @retval EFI_DEVICE_ERROR An unexpected system or
network error
occurred.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_SEND_RECEIVE)(
+ IN EFI_REST_EX_PROTOCOL *This,
+ IN EFI_HTTP_MESSAGE *RequestMessage,
+ OUT EFI_HTTP_MESSAGE *ResponseMessage
+ );
+
+/**
+ Obtain the current time from this REST service instance.
+
+ The GetServiceTime() function is an optional interface to obtain
+ the
current time from
+ this REST service instance. If this REST service does not support
+ to
retrieve
the time,
+ this function returns EFI_UNSUPPORTED. This function must returns
EFI_UNSUPPORTED if
+ EFI_REST_EX_SERVICE_TYPE returned in EFI_REST_EX_SERVICE_INFO
from
GetService() is
+ EFI_REST_EX_SERVICE_UNSPECIFIC.
+
+ @param[in] This Pointer to
EFI_REST_EX_PROTOCOL instance for a
particular
+ REST service.
+ @param[out] Time A pointer to storage to receive a
snapshot of
the current time of
+ the REST service.
+
+ @retval EFI_SUCCESS operation succeeded.
+ @retval EFI_INVALID_PARAMETER This or Time are NULL.
+ @retval EFI_UNSUPPORTED The RESTful service does not
support
returning the time.
+ @retval EFI_DEVICE_ERROR An unexpected system or
network error
occurred.
+ @retval EFI_NOT_READY The configuration of this instance
is not set
yet. Configure() must
+ be executed and returns
successfully prior to invoke this
function.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_GET_TIME)(
+ IN EFI_REST_EX_PROTOCOL *This,
+ OUT EFI_TIME *Time
+ );
+
+/**
+ This function returns the information of REST service provided by
this EFI
REST EX driver instance.
+
+ The information such as the type of REST service and the access
+ mode
of
REST EX driver instance
+ (In-band or Out-of-band) are described in
+ EFI_REST_EX_SERVICE_INFO
structure. For the vendor-specific
+ REST service, vendor-specific REST service information is
+ returned in
VendorSpecifcData.
+ REST EX driver designer is well know what REST service this REST
+ EX
driver
instance intends to
+ communicate with. The designer also well know this driver
+ instance is
used
to talk to BMC through
+ specific platform mechanism or talk to REST server through UEFI
+ HTTP
protocol. REST EX driver is
+ responsible to fill up the correct information in
EFI_REST_EX_SERVICE_INFO. EFI_REST_EX_SERVICE_INFO
+ is referred by EFI REST clients to pickup the proper EFI REST EX
driver
instance to get and set resource.
+ GetService() is a basic and mandatory function which must be able
+ to
use
even Configure() is not invoked
+ in previously.
+
+ @param[in] This Pointer to
EFI_REST_EX_PROTOCOL instance for a
particular
+ REST service.
+ @param[out] RestExServiceInfo Pointer to receive a pointer to
EFI_REST_EX_SERVICE_INFO structure. The
+ format of
EFI_REST_EX_SERVICE_INFO is version
controlled for the future
+ extension. The version of
EFI_REST_EX_SERVICE_INFO
structure is returned
+ in the header within this
structure. EFI REST client refers to
the correct
+ format of structure according to
the version number. The
pointer to
+ EFI_REST_EX_SERVICE_INFO is
a memory block allocated
by EFI REST EX driver
+ instance. That is caller's
responsibility to free this memory
when this
+ structure is no longer needed.
Refer to Related Definitions
below for the
+ definitions of
EFI_REST_EX_SERVICE_INFO structure.
+
+ @retval EFI_SUCCESS EFI_REST_EX_SERVICE_INFO is
returned in
RestExServiceInfo. This function
+ is not supported in this REST EX
Protocol driver instance.
+ @retval EFI_UNSUPPORTED This function is not supported in
this REST
EX Protocol driver instance.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_EX_GET_SERVICE)(
+ IN EFI_REST_EX_PROTOCOL *This,
+ OUT EFI_REST_EX_SERVICE_INFO **RestExServiceInfo
+ );
+
+/**
+ This function returns operational configuration of current EFI
+REST
EX
child
instance.
+
+ This function returns the current configuration of EFI REST EX
+ child
instance.
The format of
+ operational configuration depends on the implementation of EFI
+ REST
EX
driver instance. For
+ example, HTTP-aware EFI REST EX driver instance uses EFI HTTP
protocol as
the undying protocol
+ to communicate with REST service. In this case, the type of
configuration
is
+ EFI_REST_EX_CONFIG_TYPE_HTTP returned from GetService().
EFI_HTTP_CONFIG_DATA is used as EFI REST
+ EX configuration format and returned to EFI REST client. User has
+ to
type
cast RestExConfigData
+ to EFI_HTTP_CONFIG_DATA. For those non HTTP-aware REST EX driver
instances, the type of configuration
+ is EFI_REST_EX_CONFIG_TYPE_UNSPECIFIC returned from
GetService().
In
this case, the format of
+ returning data could be non industrial. Instead, the format of
configuration
data is system/platform
+ specific definition such as BMC mechanism used in EFI REST EX
+ driver
instance. EFI REST client and
+ EFI REST EX driver instance have to refer to the specific system
/platform
spec which is out of UEFI scope.
+
+ @param[in] This This is the
EFI_REST_EX_PROTOCOL instance.
+ @param[out] RestExConfigData Pointer to receive a pointer to
EFI_REST_EX_CONFIG_DATA.
+ The memory allocated for
configuration data should be
freed
+ by caller. See Related
+ Definitions
for the details.
+
+ @retval EFI_SUCCESS EFI_REST_EX_CONFIG_DATA is
returned in
successfully.
+ @retval EFI_UNSUPPORTED This function is not supported in
this REST
EX Protocol driver instance.
+ @retval EFI_NOT_READY The configuration of this instance
is not set
yet. Configure() must be
+ executed and returns
successfully prior to invoke this
function.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_EX_GET_MODE_DATA)(
+ IN EFI_REST_EX_PROTOCOL *This,
+ OUT EFI_REST_EX_CONFIG_DATA *RestExConfigData
+ );
+
+/**
+ This function is used to configure EFI REST EX child instance.
+
+ This function is used to configure the setting of underlying
+ protocol
of
REST
EX child
+ instance. The type of configuration is according to the
implementation of
EFI REST EX
+ driver instance. For example, HTTP-aware EFI REST EX driver
+ instance
uses
EFI HTTP protocol
+ as the undying protocol to communicate with REST service. The
+ type of
configuration is
+ EFI_REST_EX_CONFIG_TYPE_HTTP and RestExConfigData is the same
format with EFI_HTTP_CONFIG_DATA.
+ Akin to HTTP configuration, REST EX child instance can be
+ configure
to
use
different HTTP
+ local access point for the data transmission. Multiple REST
+ clients
may
use
different
+ configuration of HTTP to distinguish themselves, such as to use
+ the
different TCP port.
+ For those non HTTP-aware REST EX driver instance, the type of
configuration is
+ EFI_REST_EX_CONFIG_TYPE_UNSPECIFIC. RestExConfigData refers to
the
non industrial standard.
+ Instead, the format of configuration data is system/platform
+ specific
definition such as BMC.
+ In this case, EFI REST client and EFI REST EX driver instance
+ have to
refer
to
the specific
+ system/platform spec which is out of the UEFI scope. Besides
GetService()function, no other
+ EFI REST EX functions can be executed by this instance until
Configure()is
executed and returns
+ successfully. All other functions must returns EFI_NOT_READY if
+ this
instance is not configured
+ yet. Set RestExConfigData to NULL means to put EFI REST EX child
instance
into the unconfigured
+ state.
+
+ @param[in] This This is the
EFI_REST_EX_PROTOCOL instance.
+ @param[in] RestExConfigData Pointer to
EFI_REST_EX_CONFIG_DATA.
See Related Definitions in
+ GetModeData() protocol
interface.
+
+ @retval EFI_SUCCESS EFI_REST_EX_CONFIG_DATA is
set in
successfully.
+ @retval EFI_DEVICE_ERROR Configuration for this REST EX
child
instance is failed with the given
+ EFI_REST_EX_CONFIG_DATA.
+ @retval EFI_UNSUPPORTED This function is not supported in
this REST
EX Protocol driver instance.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_EX_CONFIGURE)(
+ IN EFI_REST_EX_PROTOCOL *This,
+ IN EFI_REST_EX_CONFIG_DATA RestExConfigData
+ );
+
+/**
+ This function sends REST request to REST service and signal
+caller's
event
asynchronously when
+ the final response is received by REST EX Protocol driver instance.
+
+ The essential design of this function is to handle asynchronous
send/receive implicitly according
+ to REST service asynchronous request mechanism. Caller will get
+ the
notification once the response
+ is returned from REST service.
+
+ @param[in] This This is the
EFI_REST_EX_PROTOCOL instance.
+ @param[in] RequestMessage This is the HTTP request
message sent
to REST service. Set RequestMessage
+ to NULL to cancel the
previous asynchronous request
associated with the
+ corresponding RestExToken.
See descriptions for the
details.
+ @param[in] RestExToken REST EX token which REST EX
Protocol
instance uses to notify REST client
+ the status of response of
asynchronous REST request. See
related definition
+ of EFI_REST_EX_TOKEN.
+ @param[in] TimeOutInMilliSeconds The pointer to the timeout in
milliseconds which REST EX Protocol driver
+ instance refers as the
duration to drop asynchronous REST
request. NULL
+ pointer means no timeout for
this REST request. REST EX
Protocol driver
+ signals caller's event with
EFI_STATUS set to EFI_TIMEOUT
in RestExToken
+ if REST EX Protocol can't get
the response from REST
service within
+ TimeOutInMilliSeconds.
+
+ @retval EFI_SUCCESS Asynchronous REST request is
established.
+ @retval EFI_UNSUPPORTED This REST EX Protocol driver
instance
doesn't support asynchronous request.
+ @retval EFI_TIMEOUT Asynchronous REST request is
not
established and timeout is expired.
+ @retval EFI_ABORT Previous asynchronous REST
request has been
canceled.
+ @retval EFI_DEVICE_ERROR Otherwise, returns
EFI_DEVICE_ERROR
for other errors according to HTTP Status Code.
+ @retval EFI_NOT_READY The configuration of this
instance is not set
yet. Configure() must be executed
+ and returns successfully prior
to invoke this function.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_EX_ASYNC_SEND_RECEIVE)(
+ IN EFI_REST_EX_PROTOCOL *This,
+ IN EFI_HTTP_MESSAGE *RequestMessage OPTIONAL,
+ IN EFI_REST_EX_TOKEN *RestExToken,
+ IN UINTN *TimeOutInMilliSeconds
OPTIONAL
+ );
+
+/**
+ This function sends REST request to a REST Event service and
+signals
caller's
event
+ token asynchronously when the URI resource change event is
+ received
by
REST EX
+ Protocol driver instance.
+
+ The essential design of this function is to monitor event
+ implicitly
according
to
+ REST service event service mechanism. Caller will get the
notification if
certain
+ resource is changed.
+
+ @param[in] This This is the
EFI_REST_EX_PROTOCOL instance.
+ @param[in] RequestMessage This is the HTTP request
message sent
to REST service. Set RequestMessage
+ to NULL to cancel the
previous event service associated
with the corresponding
+ RestExToken. See
descriptions for the details.
+ @param[in] RestExToken REST EX token which REST EX
Protocol
driver instance uses to notify REST client
+ the URI resource which
monitored by REST client has
been changed. See the related
+ definition of
EFI_REST_EX_TOKEN in
EFI_REST_EX_PROTOCOL.AsyncSendReceive().
+
+ @retval EFI_SUCCESS Asynchronous REST request is
established.
+ @retval EFI_UNSUPPORTED This REST EX Protocol driver
instance
doesn't support asynchronous request.
+ @retval EFI_ABORT Previous asynchronous REST
request has been
canceled or event subscription has been
+ delete from service.
+ @retval EFI_DEVICE_ERROR Otherwise, returns
EFI_DEVICE_ERROR
for other errors according to HTTP Status Code.
+ @retval EFI_NOT_READY The configuration of this
instance is not set
yet. Configure() must be executed
+ and returns successfully prior
to invoke this function.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_EX_EVENT_SERVICE)(
+ IN EFI_REST_EX_PROTOCOL *This,
+ IN EFI_HTTP_MESSAGE *RequestMessage OPTIONAL,
+ IN EFI_REST_EX_TOKEN *RestExToken
+);
+
+///
+/// EFI REST(EX) protocols are designed to support REST
+communication
between EFI REST client
+/// applications/drivers and REST services. EFI REST client tool
+uses
EFI
REST(EX) protocols
+/// to send/receive resources to/from REST service to manage
+systems,
configure systems or
+/// manipulate resources on REST service. Due to HTTP protocol is
commonly used to communicate
+/// with REST service in practice, EFI REST(EX) protocols adopt
+HTTP as
the
message format to
+/// send and receive REST service resource. EFI REST(EX) driver
instance
abstracts EFI REST
+/// client functionality and provides underlying interface to
communicate
with REST service.
+/// EFI REST(EX) driver instance knows how to communicate with REST
service through certain
+/// interface after the corresponding configuration is initialized.
+///
+struct _EFI_REST_EX_PROTOCOL {
+ EFI_REST_SEND_RECEIVE SendReceive;
+ EFI_REST_GET_TIME GetServiceTime;
+ EFI_REST_EX_GET_SERVICE GetService;
+ EFI_REST_EX_GET_MODE_DATA GetModeData;
+ EFI_REST_EX_CONFIGURE Configure;
+ EFI_REST_EX_ASYNC_SEND_RECEIVE AyncSendReceive;
+ EFI_REST_EX_EVENT_SERVICE EventService;
+};
+
+extern EFI_GUID gEfiRestExServiceBindingProtocolGuid;
+extern EFI_GUID gEfiRestExProtocolGuid;
+
+#endif
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index
812be75fb3..5205374d62 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -1848,6 +1848,13 @@
## Include/Protocol/NvdimmLabel.h
gEfiNvdimmLabelProtocolGuid = { 0xd40b6b80,
0x97d5, 0x4282,
{ 0xbb, 0x1d, 0x22, 0x3a, 0x16, 0x91, 0x80, 0x58 }}

+ #
+ # Protocols defined in UEFI2.8
+ #
+ ## Include/Protocol/RestEx.h
+ gEfiRestExProtocolGuid = { 0x55648b91, 0xe7d,
0x40a3, { 0xa9, 0xb3,
0xa8, 0x15, 0xd7, 0xea, 0xdf, 0x97 }}
+ gEfiRestExServiceBindingProtocolGuid = { 0x456bbe01, 0x99d0,
+ 0x45ea,
{ 0xbb, 0x5f, 0x16, 0xd8, 0x4b, 0xed, 0xc5, 0x59 }}
+
#
# Protocols defined in Shell2.0
#
--
2.17.1










[Rest Ex Definition PATCH v2 1/2] MdePkg/Include: Definitions of EFI REST EX Protocol

Abner Chang
 

Add definitions of EFI REST EX Protocol according
to UEFI spec v2.8 Section 29.7.2 EFI REST EX Protocol.

Signed-off-by: Jiaxin Wu <jiaxin.wu@...>
Signed-off-by: Siyuan Fu <siyuan.fu@...>
Signed-off-by: Fan Wang <fan.wang@...>
Signed-off-by: Abner Chang <abner.chang@...>

Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Liming Gao <gaoliming@...>
Cc: Zhiguang Liu <zhiguang.liu@...>
Cc: Jiewen Yao <jiewen.yao@...>
Cc: Nickle Wang <nickle.wang@...>

Reviewed-by: Jiaxin Wu <jiaxin.wu@...>
Reviewed-by: Liming Gao <gaoliming@...>
---
MdePkg/Include/Protocol/RestEx.h | 390 +++++++++++++++++++++++++++++++
MdePkg/MdePkg.dec | 7 +
2 files changed, 397 insertions(+)
create mode 100644 MdePkg/Include/Protocol/RestEx.h

diff --git a/MdePkg/Include/Protocol/RestEx.h b/MdePkg/Include/Protocol/RestEx.h
new file mode 100644
index 0000000000..dc1b4381b9
--- /dev/null
+++ b/MdePkg/Include/Protocol/RestEx.h
@@ -0,0 +1,390 @@
+/** @file
+ This file defines the EFI REST EX Protocol interface. It is
+ split into the following two main sections.
+
+ - REST EX Service Binding Protocol
+ - REST EX Protocol
+
+ Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+ (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+ @par Revision Reference:
+ This Protocol is introduced in UEFI Specification 2.8
+
+**/
+
+#ifndef EFI_REST_EX_PROTOCOL_H_
+#define EFI_REST_EX_PROTOCOL_H_
+
+#include <Protocol/Http.h>
+
+//
+//GUID definitions
+//
+#define EFI_REST_EX_SERVICE_BINDING_PROTOCOL_GUID \
+ { \
+ 0x456bbe01, 0x99d0, 0x45ea, {0xbb, 0x5f, 0x16, 0xd8, 0x4b, 0xed, 0xc5, 0x59 } \
+ }
+
+#define EFI_REST_EX_PROTOCOL_GUID \
+ { \
+ 0x55648b91, 0xe7d, 0x40a3, {0xa9, 0xb3, 0xa8, 0x15, 0xd7, 0xea, 0xdf, 0x97 } \
+ }
+
+typedef struct _EFI_REST_EX_PROTOCOL EFI_REST_EX_PROTOCOL;
+
+//*******************************************************
+//EFI_REST_EX_SERVICE_INFO_VER
+//*******************************************************
+typedef struct {
+ UINT8 Major;
+ UINT8 Minor;
+} EFI_REST_EX_SERVICE_INFO_VER;
+
+//*******************************************************
+//EFI_REST_EX_SERVICE_INFO_HEADER
+//*******************************************************
+typedef struct {
+ UINT32 Length;
+ EFI_REST_EX_SERVICE_INFO_VER RestServiceInfoVer;
+} EFI_REST_EX_SERVICE_INFO_HEADER;
+
+//*******************************************************
+// EFI_REST_EX_SERVICE_TYPE
+//*******************************************************
+typedef enum {
+ EfiRestExServiceUnspecific = 1,
+ EfiRestExServiceRedfish,
+ EfiRestExServiceOdata,
+ EfiRestExServiceVendorSpecific = 0xff,
+ EfiRestExServiceTypeMax
+} EFI_REST_EX_SERVICE_TYPE;
+
+//*******************************************************
+// EFI_REST_EX_SERVICE_ACCESS_MODE
+//*******************************************************
+typedef enum {
+ EfiRestExServiceInBandAccess = 1,
+ EfiRestExServiceOutOfBandAccess = 2,
+ EfiRestExServiceModeMax
+} EFI_REST_EX_SERVICE_ACCESS_MODE;
+
+//*******************************************************
+// EFI_REST_EX_CONFIG_TYPE
+//*******************************************************
+typedef enum {
+ EfiRestExConfigHttp,
+ EfiRestExConfigUnspecific,
+ EfiRestExConfigTypeMax
+} EFI_REST_EX_CONFIG_TYPE;
+
+//*******************************************************
+//EFI_REST_EX_SERVICE_INFO v1.0
+//*******************************************************
+typedef struct {
+ EFI_REST_EX_SERVICE_INFO_HEADER EfiRestExServiceInfoHeader;
+ EFI_REST_EX_SERVICE_TYPE RestServiceType;
+ EFI_REST_EX_SERVICE_ACCESS_MODE RestServiceAccessMode;
+ EFI_GUID VendorRestServiceName;
+ UINT32 VendorSpecificDataLength;
+ UINT8 *VendorSpecifcData;
+ EFI_REST_EX_CONFIG_TYPE RestExConfigType;
+ UINT8 RestExConfigDataLength;
+} EFI_REST_EX_SERVICE_INFO_V_1_0;
+
+//*******************************************************
+//EFI_REST_EX_SERVICE_INFO
+//*******************************************************
+typedef union {
+ EFI_REST_EX_SERVICE_INFO_HEADER EfiRestExServiceInfoHeader;
+ EFI_REST_EX_SERVICE_INFO_V_1_0 EfiRestExServiceInfoV10;
+} EFI_REST_EX_SERVICE_INFO;
+
+//*******************************************************
+// EFI_REST_EX_HTTP_CONFIG_DATA
+//*******************************************************
+typedef struct {
+ EFI_HTTP_CONFIG_DATA HttpConfigData;
+ UINT32 SendReceiveTimeout;
+} EFI_REST_EX_HTTP_CONFIG_DATA;
+
+//*******************************************************
+//EFI_REST_EX_CONFIG_DATA
+//*******************************************************
+typedef UINT8 *EFI_REST_EX_CONFIG_DATA;
+
+//*******************************************************
+//EFI_REST_EX_TOKEN
+//*******************************************************
+typedef struct {
+ EFI_EVENT Event;
+ EFI_STATUS Status;
+ EFI_HTTP_MESSAGE *ResponseMessage;
+} EFI_REST_EX_TOKEN;
+
+/**
+ Provides a simple HTTP-like interface to send and receive resources from a REST service.
+
+ The SendReceive() function sends an HTTP request to this REST service, and returns a
+ response when the data is retrieved from the service. RequestMessage contains the HTTP
+ request to the REST resource identified by RequestMessage.Request.Url. The
+ ResponseMessage is the returned HTTP response for that request, including any HTTP
+ status.
+
+ @param[in] This Pointer to EFI_REST_EX_PROTOCOL instance for a particular
+ REST service.
+ @param[in] RequestMessage Pointer to the HTTP request data for this resource
+ @param[out] ResponseMessage Pointer to the HTTP response data obtained for this requested.
+
+ @retval EFI_SUCCESS operation succeeded.
+ @retval EFI_INVALID_PARAMETER This, RequestMessage, or ResponseMessage are NULL.
+ @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_SEND_RECEIVE)(
+ IN EFI_REST_EX_PROTOCOL *This,
+ IN EFI_HTTP_MESSAGE *RequestMessage,
+ OUT EFI_HTTP_MESSAGE *ResponseMessage
+ );
+
+/**
+ Obtain the current time from this REST service instance.
+
+ The GetServiceTime() function is an optional interface to obtain the current time from
+ this REST service instance. If this REST service does not support to retrieve the time,
+ this function returns EFI_UNSUPPORTED. This function must returns EFI_UNSUPPORTED if
+ EFI_REST_EX_SERVICE_TYPE returned in EFI_REST_EX_SERVICE_INFO from GetService() is
+ EFI_REST_EX_SERVICE_UNSPECIFIC.
+
+ @param[in] This Pointer to EFI_REST_EX_PROTOCOL instance for a particular
+ REST service.
+ @param[out] Time A pointer to storage to receive a snapshot of the current time of
+ the REST service.
+
+ @retval EFI_SUCCESS operation succeeded.
+ @retval EFI_INVALID_PARAMETER This or Time are NULL.
+ @retval EFI_UNSUPPORTED The RESTful service does not support returning the time.
+ @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
+ @retval EFI_NOT_READY The configuration of this instance is not set yet. Configure() must
+ be executed and returns successfully prior to invoke this function.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_GET_TIME)(
+ IN EFI_REST_EX_PROTOCOL *This,
+ OUT EFI_TIME *Time
+ );
+
+/**
+ This function returns the information of REST service provided by this EFI REST EX driver instance.
+
+ The information such as the type of REST service and the access mode of REST EX driver instance
+ (In-band or Out-of-band) are described in EFI_REST_EX_SERVICE_INFO structure. For the vendor-specific
+ REST service, vendor-specific REST service information is returned in VendorSpecifcData.
+ REST EX driver designer is well know what REST service this REST EX driver instance intends to
+ communicate with. The designer also well know this driver instance is used to talk to BMC through
+ specific platform mechanism or talk to REST server through UEFI HTTP protocol. REST EX driver is
+ responsible to fill up the correct information in EFI_REST_EX_SERVICE_INFO. EFI_REST_EX_SERVICE_INFO
+ is referred by EFI REST clients to pickup the proper EFI REST EX driver instance to get and set resource.
+ GetService() is a basic and mandatory function which must be able to use even Configure() is not invoked
+ in previously.
+
+ @param[in] This Pointer to EFI_REST_EX_PROTOCOL instance for a particular
+ REST service.
+ @param[out] RestExServiceInfo Pointer to receive a pointer to EFI_REST_EX_SERVICE_INFO structure. The
+ format of EFI_REST_EX_SERVICE_INFO is version controlled for the future
+ extension. The version of EFI_REST_EX_SERVICE_INFO structure is returned
+ in the header within this structure. EFI REST client refers to the correct
+ format of structure according to the version number. The pointer to
+ EFI_REST_EX_SERVICE_INFO is a memory block allocated by EFI REST EX driver
+ instance. That is caller's responsibility to free this memory when this
+ structure is no longer needed. Refer to Related Definitions below for the
+ definitions of EFI_REST_EX_SERVICE_INFO structure.
+
+ @retval EFI_SUCCESS EFI_REST_EX_SERVICE_INFO is returned in RestExServiceInfo. This function
+ is not supported in this REST EX Protocol driver instance.
+ @retval EFI_UNSUPPORTED This function is not supported in this REST EX Protocol driver instance.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_EX_GET_SERVICE)(
+ IN EFI_REST_EX_PROTOCOL *This,
+ OUT EFI_REST_EX_SERVICE_INFO **RestExServiceInfo
+ );
+
+/**
+ This function returns operational configuration of current EFI REST EX child instance.
+
+ This function returns the current configuration of EFI REST EX child instance. The format of
+ operational configuration depends on the implementation of EFI REST EX driver instance. For
+ example, HTTP-aware EFI REST EX driver instance uses EFI HTTP protocol as the undying protocol
+ to communicate with REST service. In this case, the type of configuration is
+ EFI_REST_EX_CONFIG_TYPE_HTTP returned from GetService(). EFI_HTTP_CONFIG_DATA is used as EFI REST
+ EX configuration format and returned to EFI REST client. User has to type cast RestExConfigData
+ to EFI_HTTP_CONFIG_DATA. For those non HTTP-aware REST EX driver instances, the type of configuration
+ is EFI_REST_EX_CONFIG_TYPE_UNSPECIFIC returned from GetService(). In this case, the format of
+ returning data could be non industrial. Instead, the format of configuration data is system/platform
+ specific definition such as BMC mechanism used in EFI REST EX driver instance. EFI REST client and
+ EFI REST EX driver instance have to refer to the specific system /platform spec which is out of UEFI scope.
+
+ @param[in] This This is the EFI_REST_EX_PROTOCOL instance.
+ @param[out] RestExConfigData Pointer to receive a pointer to EFI_REST_EX_CONFIG_DATA.
+ The memory allocated for configuration data should be freed
+ by caller. See Related Definitions for the details.
+
+ @retval EFI_SUCCESS EFI_REST_EX_CONFIG_DATA is returned in successfully.
+ @retval EFI_UNSUPPORTED This function is not supported in this REST EX Protocol driver instance.
+ @retval EFI_NOT_READY The configuration of this instance is not set yet. Configure() must be
+ executed and returns successfully prior to invoke this function.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_EX_GET_MODE_DATA)(
+ IN EFI_REST_EX_PROTOCOL *This,
+ OUT EFI_REST_EX_CONFIG_DATA *RestExConfigData
+ );
+
+/**
+ This function is used to configure EFI REST EX child instance.
+
+ This function is used to configure the setting of underlying protocol of REST EX child
+ instance. The type of configuration is according to the implementation of EFI REST EX
+ driver instance. For example, HTTP-aware EFI REST EX driver instance uses EFI HTTP protocol
+ as the undying protocol to communicate with REST service. The type of configuration is
+ EFI_REST_EX_CONFIG_TYPE_HTTP and RestExConfigData is the same format with EFI_HTTP_CONFIG_DATA.
+ Akin to HTTP configuration, REST EX child instance can be configure to use different HTTP
+ local access point for the data transmission. Multiple REST clients may use different
+ configuration of HTTP to distinguish themselves, such as to use the different TCP port.
+ For those non HTTP-aware REST EX driver instance, the type of configuration is
+ EFI_REST_EX_CONFIG_TYPE_UNSPECIFIC. RestExConfigData refers to the non industrial standard.
+ Instead, the format of configuration data is system/platform specific definition such as BMC.
+ In this case, EFI REST client and EFI REST EX driver instance have to refer to the specific
+ system/platform spec which is out of the UEFI scope. Besides GetService()function, no other
+ EFI REST EX functions can be executed by this instance until Configure()is executed and returns
+ successfully. All other functions must returns EFI_NOT_READY if this instance is not configured
+ yet. Set RestExConfigData to NULL means to put EFI REST EX child instance into the unconfigured
+ state.
+
+ @param[in] This This is the EFI_REST_EX_PROTOCOL instance.
+ @param[in] RestExConfigData Pointer to EFI_REST_EX_CONFIG_DATA. See Related Definitions in
+ GetModeData() protocol interface.
+
+ @retval EFI_SUCCESS EFI_REST_EX_CONFIG_DATA is set in successfully.
+ @retval EFI_DEVICE_ERROR Configuration for this REST EX child instance is failed with the given
+ EFI_REST_EX_CONFIG_DATA.
+ @retval EFI_UNSUPPORTED This function is not supported in this REST EX Protocol driver instance.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_EX_CONFIGURE)(
+ IN EFI_REST_EX_PROTOCOL *This,
+ IN EFI_REST_EX_CONFIG_DATA RestExConfigData
+ );
+
+/**
+ This function sends REST request to REST service and signal caller's event asynchronously when
+ the final response is received by REST EX Protocol driver instance.
+
+ The essential design of this function is to handle asynchronous send/receive implicitly according
+ to REST service asynchronous request mechanism. Caller will get the notification once the response
+ is returned from REST service.
+
+ @param[in] This This is the EFI_REST_EX_PROTOCOL instance.
+ @param[in] RequestMessage This is the HTTP request message sent to REST service. Set RequestMessage
+ to NULL to cancel the previous asynchronous request associated with the
+ corresponding RestExToken. See descriptions for the details.
+ @param[in] RestExToken REST EX token which REST EX Protocol instance uses to notify REST client
+ the status of response of asynchronous REST request. See related definition
+ of EFI_REST_EX_TOKEN.
+ @param[in] TimeOutInMilliSeconds The pointer to the timeout in milliseconds which REST EX Protocol driver
+ instance refers as the duration to drop asynchronous REST request. NULL
+ pointer means no timeout for this REST request. REST EX Protocol driver
+ signals caller's event with EFI_STATUS set to EFI_TIMEOUT in RestExToken
+ if REST EX Protocol can't get the response from REST service within
+ TimeOutInMilliSeconds.
+
+ @retval EFI_SUCCESS Asynchronous REST request is established.
+ @retval EFI_UNSUPPORTED This REST EX Protocol driver instance doesn't support asynchronous request.
+ @retval EFI_TIMEOUT Asynchronous REST request is not established and timeout is expired.
+ @retval EFI_ABORT Previous asynchronous REST request has been canceled.
+ @retval EFI_DEVICE_ERROR Otherwise, returns EFI_DEVICE_ERROR for other errors according to HTTP Status Code.
+ @retval EFI_NOT_READY The configuration of this instance is not set yet. Configure() must be executed
+ and returns successfully prior to invoke this function.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_EX_ASYNC_SEND_RECEIVE)(
+ IN EFI_REST_EX_PROTOCOL *This,
+ IN EFI_HTTP_MESSAGE *RequestMessage OPTIONAL,
+ IN EFI_REST_EX_TOKEN *RestExToken,
+ IN UINTN *TimeOutInMilliSeconds OPTIONAL
+ );
+
+/**
+ This function sends REST request to a REST Event service and signals caller's event
+ token asynchronously when the URI resource change event is received by REST EX
+ Protocol driver instance.
+
+ The essential design of this function is to monitor event implicitly according to
+ REST service event service mechanism. Caller will get the notification if certain
+ resource is changed.
+
+ @param[in] This This is the EFI_REST_EX_PROTOCOL instance.
+ @param[in] RequestMessage This is the HTTP request message sent to REST service. Set RequestMessage
+ to NULL to cancel the previous event service associated with the corresponding
+ RestExToken. See descriptions for the details.
+ @param[in] RestExToken REST EX token which REST EX Protocol driver instance uses to notify REST client
+ the URI resource which monitored by REST client has been changed. See the related
+ definition of EFI_REST_EX_TOKEN in EFI_REST_EX_PROTOCOL.AsyncSendReceive().
+
+ @retval EFI_SUCCESS Asynchronous REST request is established.
+ @retval EFI_UNSUPPORTED This REST EX Protocol driver instance doesn't support asynchronous request.
+ @retval EFI_ABORT Previous asynchronous REST request has been canceled or event subscription has been
+ delete from service.
+ @retval EFI_DEVICE_ERROR Otherwise, returns EFI_DEVICE_ERROR for other errors according to HTTP Status Code.
+ @retval EFI_NOT_READY The configuration of this instance is not set yet. Configure() must be executed
+ and returns successfully prior to invoke this function.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REST_EX_EVENT_SERVICE)(
+ IN EFI_REST_EX_PROTOCOL *This,
+ IN EFI_HTTP_MESSAGE *RequestMessage OPTIONAL,
+ IN EFI_REST_EX_TOKEN *RestExToken
+);
+
+///
+/// EFI REST(EX) protocols are designed to support REST communication between EFI REST client
+/// applications/drivers and REST services. EFI REST client tool uses EFI REST(EX) protocols
+/// to send/receive resources to/from REST service to manage systems, configure systems or
+/// manipulate resources on REST service. Due to HTTP protocol is commonly used to communicate
+/// with REST service in practice, EFI REST(EX) protocols adopt HTTP as the message format to
+/// send and receive REST service resource. EFI REST(EX) driver instance abstracts EFI REST
+/// client functionality and provides underlying interface to communicate with REST service.
+/// EFI REST(EX) driver instance knows how to communicate with REST service through certain
+/// interface after the corresponding configuration is initialized.
+///
+struct _EFI_REST_EX_PROTOCOL {
+ EFI_REST_SEND_RECEIVE SendReceive;
+ EFI_REST_GET_TIME GetServiceTime;
+ EFI_REST_EX_GET_SERVICE GetService;
+ EFI_REST_EX_GET_MODE_DATA GetModeData;
+ EFI_REST_EX_CONFIGURE Configure;
+ EFI_REST_EX_ASYNC_SEND_RECEIVE AyncSendReceive;
+ EFI_REST_EX_EVENT_SERVICE EventService;
+};
+
+extern EFI_GUID gEfiRestExServiceBindingProtocolGuid;
+extern EFI_GUID gEfiRestExProtocolGuid;
+
+#endif
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 812be75fb3..5205374d62 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -1848,6 +1848,13 @@
## Include/Protocol/NvdimmLabel.h
gEfiNvdimmLabelProtocolGuid = { 0xd40b6b80, 0x97d5, 0x4282, { 0xbb, 0x1d, 0x22, 0x3a, 0x16, 0x91, 0x80, 0x58 }}

+ #
+ # Protocols defined in UEFI2.8
+ #
+ ## Include/Protocol/RestEx.h
+ gEfiRestExProtocolGuid = { 0x55648b91, 0xe7d, 0x40a3, { 0xa9, 0xb3, 0xa8, 0x15, 0xd7, 0xea, 0xdf, 0x97 }}
+ gEfiRestExServiceBindingProtocolGuid = { 0x456bbe01, 0x99d0, 0x45ea, { 0xbb, 0x5f, 0x16, 0xd8, 0x4b, 0xed, 0xc5, 0x59 }}
+
#
# Protocols defined in Shell2.0
#
--
2.17.1


[Rest Ex Definition PATCH v2 0/2] The definitions for EFI REST EX

Abner Chang
 

This is the commit of definitions required by EFI REST EX UEFI driver.

In v2: Address Liming's feedback to add UEFI spec revision on which
EFI REST EX protocol is introduced.

In patch (1/2), add the definitions of EFI REST EX Protocol according
to UEFI spec v2.8 Section 29.7.2 EFI REST EX Protocol.

In patch (2/2), add the definitions of structure PCD for Redfish Host
Interface EFI device path.

Signed-off-by: Abner Chang <abner.chang@...>

Cc: Jiaxin Wu <jiaxin.wu@...>
Cc: Siyuan Fu <siyuan.fu@...>
Cc: Fan Wang <fan.wang@...>
Cc: Jiewen Yao <jiewen.yao@...>
Cc: Nickle Wang <nickle.wang@...>
Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Liming Gao <gaoliming@...>

Abner Chang (2):
MdePkg/Include: Definitions of EFI REST EX Protocol
RedfishPkg/Include: PCD definitions of Host Interface EFI device path

MdePkg/Include/Protocol/RestEx.h | 390 ++++++++++++++++++
MdePkg/MdePkg.dec | 7 +
.../Include/Pcd/RestExServiceDevicePath.h | 38 ++
RedfishPkg/RedfishPkg.dec | 3 +
4 files changed, 438 insertions(+)
create mode 100644 MdePkg/Include/Protocol/RestEx.h
create mode 100644 RedfishPkg/Include/Pcd/RestExServiceDevicePath.h

--
2.17.1


[Rest Ex Definition PATCH v2 2/2] RedfishPkg/Include: PCD definitions of Host Interface EFI device path

Abner Chang
 

The definitions of Host Interface EFI device path structure PCD.

Signed-off-by: Jiaxin Wu <jiaxin.wu@...>
Signed-off-by: Siyuan Fu <siyuan.fu@...>
Signed-off-by: Fan Wang <fan.wang@...>
Signed-off-by: Abner Chang <abner.chang@...>

Cc: Jiewen Yao <jiewen.yao@...>
Cc: Nickle Wang <nickle.wang@...>

Reviewed-by: Jiaxin Wu <jiaxin.wu@...>
Reviewed-by: Nickle Wang <nickle.wang@...>
---
.../Include/Pcd/RestExServiceDevicePath.h | 38 +++++++++++++++++++
RedfishPkg/RedfishPkg.dec | 3 ++
2 files changed, 41 insertions(+)
create mode 100644 RedfishPkg/Include/Pcd/RestExServiceDevicePath.h

diff --git a/RedfishPkg/Include/Pcd/RestExServiceDevicePath.h b/RedfishPkg/Include/Pcd/RestExServiceDevicePath.h
new file mode 100644
index 0000000000..89de3b1a21
--- /dev/null
+++ b/RedfishPkg/Include/Pcd/RestExServiceDevicePath.h
@@ -0,0 +1,38 @@
+/** @file
+ This library defines the UEFI device path data of network device for REST
+ service to decide which should be used as the Redfish host interface.
+
+ Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+ (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef REST_EX_SERVICE_DEVICE_PATH_H_
+#define REST_EX_SERVICE_DEVICE_PATH_H_
+
+#include <Protocol/DevicePath.h>
+
+typedef enum {
+ DEVICE_PATH_MATCH_MAC_NODE = 1,
+ DEVICE_PATH_MATCH_PCI_NODE = 2,
+ DEVICE_PATH_MATCH_MODE_MAX
+} DEVICE_PATH_MATCH_MODE;
+
+typedef struct {
+ UINT32 DevicePathMatchMode;
+ UINT32 DevicePathNum;
+ //
+ // Example:
+ // {DEVICE_PATH("PciRoot(0)/Pci(0,0)/MAC(005056C00002,0x1)")}
+ // DevicePath will be parsed as below:
+ // {0x02,0x01,0x0c,0x00,0xd0,0x41,0x03,0x0a,0x00,0x00,0x00,0x00,
+ // 0x01,0x01,0x06,0x00,0x00,0x00,
+ // 0x03,0x0b,0x25,0x00,0x00,0x50,0x56,0xc0,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
+ // 0x7f,0xff,0x04,0x00}
+ //
+ EFI_DEVICE_PATH_PROTOCOL DevicePath[];
+} REST_EX_SERVICE_DEVICE_PATH_DATA;
+
+#endif
diff --git a/RedfishPkg/RedfishPkg.dec b/RedfishPkg/RedfishPkg.dec
index e95ec5fe10..de3611252e 100644
--- a/RedfishPkg/RedfishPkg.dec
+++ b/RedfishPkg/RedfishPkg.dec
@@ -13,6 +13,9 @@
PACKAGE_GUID = c432b76e-5232-11e7-9010-005056c00008
PACKAGE_VERSION = 1.0

+[Includes]
+ Include
+
[Guids]
gEfiRedfishPkgTokenSpaceGuid = { 0x4fdbccb7, 0xe829, 0x4b4c, { 0x88, 0x87, 0xb2, 0x3f, 0xd7, 0x25, 0x4b, 0x85 }}

--
2.17.1


Re: [PATCH v2 1/1] Silicon/Qemu/Sbsa: Add SBSA-wdt entry to GTDT

Graeme Gregory <graeme@...>
 

On Tue, Oct 13, 2020 at 12:14:35PM -0400, Shashi Mallela wrote:
SBSA generic watchdog timer structure entry has been added
to GTDT table as per BSAv0.9.
This enables acpi detection of wdt in qemu sbsa platform

Signed-off-by: Shashi Mallela <shashi.mallela@...>
New version is looking fine to me.

Reviewed-by: Graeme Gregory <graeme@...>

---
Silicon/Qemu/SbsaQemu/AcpiTables/Gtdt.aslc | 53 +++++++++++++++++---
1 file changed, 45 insertions(+), 8 deletions(-)

diff --git a/Silicon/Qemu/SbsaQemu/AcpiTables/Gtdt.aslc b/Silicon/Qemu/SbsaQemu/AcpiTables/Gtdt.aslc
index d16778e01a5c..2312fd74e26d 100644
--- a/Silicon/Qemu/SbsaQemu/AcpiTables/Gtdt.aslc
+++ b/Silicon/Qemu/SbsaQemu/AcpiTables/Gtdt.aslc
@@ -24,27 +24,55 @@
#define SYSTEM_TIMER_BASE_ADDRESS 0xFFFFFFFFFFFFFFFF
#endif

-#define GTDT_TIMER_EDGE_TRIGGERED EFI_ACPI_5_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE
+#define GTDT_TIMER_EDGE_TRIGGERED EFI_ACPI_6_3_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE
#define GTDT_TIMER_LEVEL_TRIGGERED 0
-#define GTDT_TIMER_ACTIVE_LOW EFI_ACPI_5_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY
+#define GTDT_TIMER_ACTIVE_LOW EFI_ACPI_6_3_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY
#define GTDT_TIMER_ACTIVE_HIGH 0

#define GTDT_GTIMER_FLAGS (GTDT_TIMER_ACTIVE_LOW | GTDT_TIMER_LEVEL_TRIGGERED)

+#define SBSA_PLATFORM_WATCHDOG_COUNT 1
+#define SBSA_PLATFORM_TIMER_COUNT (SBSA_PLATFORM_WATCHDOG_COUNT)
+
+#define SBSAQEMU_WDT_REFRESH_FRAME_BASE 0x50010000
+#define SBSAQEMU_WDT_CONTROL_FRAME_BASE 0x50011000
+#define SBSAQEMU_WDT_IRQ 44
+
+#define GTDT_WDTIMER_EDGE_TRIGGERED EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE
+#define GTDT_WDTIMER_LEVEL_TRIGGERED 0
+#define GTDT_WDTIMER_ACTIVE_LOW EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY
+#define GTDT_WDTIMER_ACTIVE_HIGH 0
+
+#define GTDT_WDTIMER_FLAGS (GTDT_WDTIMER_ACTIVE_HIGH | GTDT_WDTIMER_LEVEL_TRIGGERED)
+
+#define EFI_ACPI_6_3_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT( \
+ RefreshFramePhysicalAddress, ControlFramePhysicalAddress, \
+ WatchdogTimerGSIV, WatchdogTimerFlags) \
+ { \
+ EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG, \
+ sizeof(EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE), \
+ EFI_ACPI_RESERVED_WORD, \
+ RefreshFramePhysicalAddress, \
+ ControlFramePhysicalAddress, \
+ WatchdogTimerGSIV, \
+ WatchdogTimerFlags \
+ }
+
#pragma pack (1)

typedef struct {
- EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE Gtdt;
- } GENERIC_TIMER_DESCRIPTION_TABLE;
+ EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE Gtdt;
+ EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE Gwdt;
+ } GENERIC_TIMER_DESCRIPTION_TABLES;

#pragma pack ()

GENERIC_TIMER_DESCRIPTION_TABLE Gtdt = {
{
SBSAQEMU_ACPI_HEADER(
- EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE,
+ EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE,
GENERIC_TIMER_DESCRIPTION_TABLE,
- EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION
+ EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION
),
SYSTEM_TIMER_BASE_ADDRESS, // UINT64 PhysicalAddress
0, // UINT32 Reserved
@@ -57,9 +85,18 @@
FixedPcdGet32 (PcdArmArchTimerHypIntrNum), // UINT32 NonSecurePL2TimerGSIV
GTDT_GTIMER_FLAGS, // UINT32 NonSecurePL2TimerFlags
0xFFFFFFFFFFFFFFFF, // UINT64 CntReadBasePhysicalAddress
- 0, // UINT32 PlatformTimerCount
- 0
+ SBSA_PLATFORM_TIMER_COUNT, // UINT32 PlatformTimerCount
+ sizeof(EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE),
+ // UINT32 PlatformTimerOffset
+ 0, // UINT32 VirtualPL2TimerGSIV
+ 0 // UINT32 VirtualPL2TimerFlags
},
+ EFI_ACPI_6_3_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT(
+ SBSAQEMU_WDT_REFRESH_FRAME_BASE,
+ SBSAQEMU_WDT_CONTROL_FRAME_BASE,
+ SBSAQEMU_WDT_IRQ,
+ GTDT_WDTIMER_FLAGS
+ )
};

// Reference the table being generated to prevent the optimizer from removing the
--
2.18.4


Re: Query regarding build error

Andrew Goodbody
 

On 12/10/2020 07:13, Bhavsar, Samprat wrote:
Hi,
I’m a new intern and I was trying to add a library in the DCG10nm project which lead to a fatal error while building. Please can you help me out for finding and resolving the issue. PFA of build log file.
Look further back in the log file. There is a missing include file. Fix that error and try again.

Andrew


Re: [edk2-platforms] [PATCH v3-resend] SgiPkg/RdN1EdgeX2: Add missing reference to PcdChipCount

Vijayenthiran Subramaniam
 

Hi all,

On Tue, Oct 6, 2020 at 1:42 PM Vijayenthiran Subramaniam
<vijayenthiran.subramaniam@...> wrote:

Commit e8fe2026dd79 (“Platform/ARM/SgiPkg: Use chip count constant on
rdn1edgex2 platform”) used the PcdChipCount constant but did not declare
its use in the ACPI table module. Fix this by listing it in the list of
PCDs to be looked up.

Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@...>
Reviewed-by: Thomas Abraham <thomas.abraham@...>
Reviewed-by: Sami Mujawar <sami.mujawar@...>
---

Resending PATCH-v3 [1] with Reviewed-bys added.

[1]: https://edk2.groups.io/g/devel/topic/77339902

Changes since v2:
- Rebased to latest master and repost.

Changes since v1:
- Add commit id in commit message for which this patch fixes the build
failure.

Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
index 974d9db543..d44f02ab0c 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
@@ -45,6 +45,8 @@
gArmSgiTokenSpaceGuid.PcdDramBlock2Base
gArmSgiTokenSpaceGuid.PcdDramBlock2Size

+ gArmSgiTokenSpaceGuid.PcdChipCount
+
gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum
gArmTokenSpaceGuid.PcdArmArchTimerIntrNum
gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum
--
2.17.1
A kindly reminder for this patch.

Regards,
Vijayenthiran


Re: 答复: [edk2-devel] OpensslLib compiling error : cannot open include file : openssl/aes.h

Tiger Liu(BJ-RD)
 

Hi, liming:
Got it.

Is Cc_resp.txt produced by compiler automatically? Or by UDK build tools?

The problem I met may be caused by violating the limitation length of the compiler command line.
After trim the length, could pass the failed point.

Thanks
-----邮件原件-----
发件人: gaoliming <gaoliming@...>
发送时间: 2020年10月14日 13:35
收件人: devel@edk2.groups.io; Tiger Liu(BJ-RD) <TigerLiu@...>
主题: 回复: [edk2-devel] OpensslLib compiling error : cannot open include file : openssl/aes.h

cc_resp.txt includes the compiler flag and include path. It will be used by the compiler. Then, the compile command line length can be reduced. It can avoid nmake limitation of the command line length 4096.

Thanks
Liming
-----邮件原件-----
发件人: bounce+27952+66197+4905953+8761045@groups.io
<bounce+27952+66197+4905953+8761045@groups.io> 代表 Tiger
Liu(BJ-RD)
发送时间: 2020年10月14日 9:45
收件人: gaoliming <gaoliming@...>; devel@edk2.groups.io
主题: 答复: [edk2-devel] OpensslLib compiling error : cannot open include
file : openssl/aes.h

Hi, Liming:
From Build.log, it seems include path is ok:
......
cl.exe"
/Foy:\Build\ZxxPlatformPkg\DEBUG_VS2015x86\X64\CryptoPkg\Library\Base
CryptLib\RuntimeCryptLib\OUTPUT\Hash\ /showIncludes /nologo /c /GS-
/W4 /Gs32768 /D UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF
/Z7 /Gw /wd4090 -
......
/Iy:\CryptoPkg /Iy:\CryptoPkg\Include /Iy:\CryptoPkg\Private
/Iy:\CryptoPkg\Library\Include
/Iy:\CryptoPkg\Library\OpensslLib\openssl\include
y:\CryptoPkg\Library\BaseCryptLib\Hash\CryptSm3.c
y:\CryptoPkg\Library\BaseCryptLib\Hash\CryptMd5.c
y:\CryptoPkg\Library\BaseCryptLib\Hash\CryptSha256.c
y:\CryptoPkg\Library\BaseCryptLib\Hash\CryptSha512Null.c
y:\CryptoPkg\Library\BaseCryptLib\Hash\CryptSha1.c

And BaseCryptLib / IntrinsicLib compiled successfully.

And I found a cc_resp.txt file in
Build\...\DEBUG_VS2015x86\X64\CryptoPkg\Library\OpensslLib\OpensslLib\
OUTPUT
Why produce a cc_resp.txt?

Thanks
-----邮件原件-----
发件人: gaoliming <gaoliming@...>
发送时间: 2020年10月13日 18:03
收件人: devel@edk2.groups.io; Tiger Liu(BJ-RD) <TigerLiu@...>
主题: 回复: [edk2-devel] OpensslLib compiling error : cannot open include
file : openssl/aes.h

Can you print the full build log and check the compiler include path?

Is this a clean build issue or incremental build issue?

Thanks
Liming
-----邮件原件-----
发件人: bounce+27952+66166+4905953+8761045@groups.io
<bounce+27952+66166+4905953+8761045@groups.io> 代表 Tiger
Liu(BJ-RD)
发送时间: 2020年10月13日 16:38
收件人: devel@edk2.groups.io
主题: [edk2-devel] OpensslLib compiling error : cannot open include file :
openssl/aes.h

Hi, experts:
When I compiled OpensslLib, I met a problem:
......
\CryptoPkg\Library\OpensslLib\openssl\crypto\aes\aes_core.c(42):
fatal error C1083: Cannot open include file: 'openssl/crypto.h': No
such file or directory
\CryptoPkg\Library\OpensslLib\openssl\crypto\aes\aes_misc.c(10):
fatal error C1083: Cannot open include file: 'openssl/opensslv.h':
No such file or directory ......

But these files exist in
CryptoPkg\Library\OpensslLib\openssl\include\openssl .

Does anybody meet same problems?

Note:
CryptoPkg.dec has also declared this include path:
......
[Includes.Common.Private]
Private
Library/Include
Library/OpensslLib/openssl/include
......

Thanks


保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或

内容做任何未经授权的查阅、使用、复制或转发。
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information
and is for the sole use of its intended recipient. Any unauthorized
review, use, copying or forwarding of this email or the content of
this email is
strictly prohibited.







保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其
内容做任何未经授权的查阅、使用、复制或转发。
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and
is for the sole use of its intended recipient. Any unauthorized
review, use, copying or forwarding of this email or the content of this email is strictly prohibited.







保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.


Re: [PATCH] MdeModulePkg/PartitionDxe: Revert the child handler blocksize change

Zhiguang Liu
 

Hi Ray,
Could you help merge this patch?

Thanks
Zhiguang

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ni, Ray
Sent: Tuesday, October 13, 2020 10:54 AM
To: Gao, Zhichao <zhichao.gao@...>; devel@edk2.groups.io
Cc: Wu, Hao A <hao.a.wu@...>
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/PartitionDxe: Revert the
child handler blocksize change

Reviewed-by: Ray Ni <ray.ni@...>

-----Original Message-----
From: Gao, Zhichao <zhichao.gao@...>
Sent: Monday, October 12, 2020 3:23 PM
To: devel@edk2.groups.io
Cc: Ni, Ray <ray.ni@...>; Wu, Hao A <hao.a.wu@...>
Subject: [PATCH] MdeModulePkg/PartitionDxe: Revert the child handler
blocksize change

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2843

Revert the patch to change the block size in child handler. It would
block the CD (Eltorito) Hard disk media type's sub partition being
observed.
The blocksize patch used to fix the CD image's MBR table issue. The CD
MBR table would always be ignored because it would be handled by the
Eltorito partition handler first and never go into the MBR handler. So
directly revert it.

Cc: Ray Ni <ray.ni@...>
Cc: Hao A Wu <hao.a.wu@...>
Signed-off-by: Zhichao Gao <zhichao.gao@...>
---
MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c | 12
+++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c
b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c
index f10ce7c65b..473e091320 100644
--- a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c
+++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c
@@ -1149,8 +1149,8 @@ PartitionInstallChildHandle (

Private->Signature = PARTITION_PRIVATE_DATA_SIGNATURE;

- Private->Start = MultU64x32 (Start, BlockSize);
- Private->End = MultU64x32 (End + 1, BlockSize);
+ Private->Start = MultU64x32 (Start, ParentBlockIo->Media-
BlockSize);
+ Private->End = MultU64x32 (End + 1, ParentBlockIo->Media-
BlockSize);

Private->BlockSize = BlockSize;
Private->ParentBlockIo = ParentBlockIo;
@@ -1187,7 +1187,13 @@ PartitionInstallChildHandle (

Private->Media.IoAlign = 0;
Private->Media.LogicalPartition = TRUE;
- Private->Media.LastBlock = End - Start;
+ Private->Media.LastBlock = DivU64x32 (
+ MultU64x32 (
+ End - Start + 1,
+ ParentBlockIo->Media->BlockSize
+ ),
+ BlockSize
+ ) - 1;

Private->Media.BlockSize = (UINT32) BlockSize;

--
2.21.0.windows.1