public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
@ 2020-11-03 21:58 Zurcher, Christopher J
  2020-11-03 21:58 ` [PATCH v5 1/2] " Zurcher, Christopher J
                   ` (3 more replies)
  0 siblings, 4 replies; 28+ messages in thread
From: Zurcher, Christopher J @ 2020-11-03 21:58 UTC (permalink / raw)
  To: devel; +Cc: Jiewen Yao, Jian J Wang, Xiaoyu Lu, Mike Kinney, Ard Biesheuvel

V5 Changes:
  Move ApiHooks.c into X64 folder
  Update process_files.pl to clean architecture-specific subfolders without
    removing them
  Rebased INF file to merge latest changes regarding RngLib vs. TimerLib

V4 Changes:
  Add copyright header to uefi-asm.conf
  Move [Sources.X64] block to cover entire X64-specific config

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@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Cc: Mike Kinney <michael.d.kinney@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>

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                       |  653 +++
 CryptoPkg/Library/Include/CrtLibSupport.h                            |    2 +
 CryptoPkg/Library/Include/openssl/opensslconf.h                      |    3 -
 CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c                 |   34 +
 CryptoPkg/Library/OpensslLib/X64/ApiHooks.c                          |   18 +
 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                        |  232 +-
 CryptoPkg/Library/OpensslLib/uefi-asm.conf                           |   21 +
 22 files changed, 26746 insertions(+), 50 deletions(-)
 create mode 100644 CryptoPkg/Library/OpensslLib/OpensslLibX64.inf
 create mode 100644 CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
 create mode 100644 CryptoPkg/Library/OpensslLib/X64/ApiHooks.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


^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH v5 1/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-03 21:58 [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64 Zurcher, Christopher J
@ 2020-11-03 21:58 ` Zurcher, Christopher J
  2020-11-03 21:58 ` [PATCH v5 2/2] CryptoPkg/OpensslLib: Commit the auto-generated assembly files " Zurcher, Christopher J
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 28+ messages in thread
From: Zurcher, Christopher J @ 2020-11-03 21:58 UTC (permalink / raw)
  To: devel; +Cc: Jiewen Yao, Jian J Wang, Xiaoyu Lu, Mike Kinney, Ard Biesheuvel

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@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Cc: Mike Kinney <michael.d.kinney@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Signed-off-by: Christopher J Zurcher <christopher.j.zurcher@intel.com>
---
 CryptoPkg/Library/OpensslLib/OpensslLib.inf          |   2 +-
 CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf    |   2 +-
 CryptoPkg/Library/OpensslLib/OpensslLibX64.inf       | 653 ++++++++++++++++++++
 CryptoPkg/Library/Include/CrtLibSupport.h            |   2 +
 CryptoPkg/Library/Include/openssl/opensslconf.h      |   3 -
 CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c |  34 +
 CryptoPkg/Library/OpensslLib/X64/ApiHooks.c          |  18 +
 CryptoPkg/Library/OpensslLib/process_files.pl        | 232 +++++--
 CryptoPkg/Library/OpensslLib/uefi-asm.conf           |  21 +
 9 files changed, 917 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..b92feaf1bf
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/OpensslLibX64.inf
@@ -0,0 +1,653 @@
+## @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.X64]
+  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
+  ossl_store.c
+  rand_pool.c
+  X64/ApiHooks.c
+
+[Packages]
+  MdePkg/MdePkg.dec
+  CryptoPkg/CryptoPkg.dec
+
+[LibraryClasses]
+  BaseLib
+  DebugLib
+  RngLib
+  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/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/X64/ApiHooks.c b/CryptoPkg/Library/OpensslLib/X64/ApiHooks.c
new file mode 100644
index 0000000000..58cff16838
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/X64/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/process_files.pl b/CryptoPkg/Library/OpensslLib/process_files.pl
index 57ce195394..4be436c510 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,50 @@ 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) {
+            opendir my $dir, $arch ||
+                die "Cannot open assembly folder \"" . $arch . "\"!";
+            while (defined (my $file = readdir $dir)) {
+                if (-d "$arch/$file") {
+                    next if $file eq ".";
+                    next if $file eq "..";
+                    remove_tree ("$arch/$file", {safe => 1}) ||
+                       die "Cannot clean assembly folder \"" . "$arch/$file" . "\"!";
+                }
+            }
+
+        } else {
+            mkdir $arch ||
+                die "Cannot create assembly folder \"" . $arch . "\"!";
+        }
+    }
 
     # Read the contents of the inf file
     open( FD, "<" . $inf_file ) ||
@@ -47,9 +141,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 +223,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 +307,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 +356,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..c2c8bb438a
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/uefi-asm.conf
@@ -0,0 +1,21 @@
+## -*- mode: perl; -*-
+# UEFI assembly openssl configuration targets.
+#
+#  Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
+#
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+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


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v5 2/2] CryptoPkg/OpensslLib: Commit the auto-generated assembly files for X64
  2020-11-03 21:58 [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64 Zurcher, Christopher J
  2020-11-03 21:58 ` [PATCH v5 1/2] " Zurcher, Christopher J
@ 2020-11-03 21:58 ` Zurcher, Christopher J
  2020-11-06  5:56 ` [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support " Yao, Jiewen
       [not found] ` <1644D590FF4B7423.25549@groups.io>
  3 siblings, 0 replies; 28+ messages in thread
From: Zurcher, Christopher J @ 2020-11-03 21:58 UTC (permalink / raw)
  To: devel; +Cc: Jiewen Yao, Jian J Wang, Xiaoyu Lu, Mike Kinney, Ard Biesheuvel

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

Adding the auto-generated assembly files for X64 architectures.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Cc: Mike Kinney <michael.d.kinney@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Signed-off-by: Christopher J Zurcher <christopher.j.zurcher@intel.com>
---
 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    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]
+        movdqu  xmm5,XMMWORD[((0-128))+rax]
+        mov     ecx,3
+        jmp     NEAR $L$oop_16_xx
+ALIGN   32
+$L$oop_16_xx:
+        movdqa  xmm6,XMMWORD[((16-128))+rax]
+        paddd   xmm5,XMMWORD[((144-128))+rax]
+
+        movdqa  xmm7,xmm6
+        movdqa  xmm1,xmm6
+        psrld   xmm7,3
+        movdqa  xmm2,xmm6
+
+        psrld   xmm1,7
+        movdqa  xmm0,XMMWORD[((224-128))+rax]
+        pslld   xmm2,14
+        pxor    xmm7,xmm1
+        psrld   xmm1,18-7
+        movdqa  xmm3,xmm0
+        pxor    xmm7,xmm2
+        pslld   xmm2,25-14
+        pxor    xmm7,xmm1
+        psrld   xmm0,10
+        movdqa  xmm1,xmm3
+
+        psrld   xmm3,17
+        pxor    xmm7,xmm2
+        pslld   xmm1,13
+        paddd   xmm5,xmm7
+        pxor    xmm0,xmm3
+        psrld   xmm3,19-17
+        pxor    xmm0,xmm1
+        pslld   xmm1,15-13
+        pxor    xmm0,xmm3
+        pxor    xmm0,xmm1
+        paddd   xmm5,xmm0
+        movdqa  xmm7,xmm12
+
+        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
+        movdqa  xmm5,XMMWORD[((32-128))+rax]
+        paddd   xmm6,XMMWORD[((160-128))+rax]
+
+        movdqa  xmm7,xmm5
+        movdqa  xmm1,xmm5
+        psrld   xmm7,3
+        movdqa  xmm2,xmm5
+
+        psrld   xmm1,7
+        movdqa  xmm0,XMMWORD[((240-128))+rax]
+        pslld   xmm2,14
+        pxor    xmm7,xmm1
+        psrld   xmm1,18-7
+        movdqa  xmm4,xmm0
+        pxor    xmm7,xmm2
+        pslld   xmm2,25-14
+        pxor    xmm7,xmm1
+        psrld   xmm0,10
+        movdqa  xmm1,xmm4
+
+        psrld   xmm4,17
+        pxor    xmm7,xmm2
+        pslld   xmm1,13
+        paddd   xmm6,xmm7
+        pxor    xmm0,xmm4
+        psrld   xmm4,19-17
+        pxor    xmm0,xmm1
+        pslld   xmm1,15-13
+        pxor    xmm0,xmm4
+        pxor    xmm0,xmm1
+        paddd   xmm6,xmm0
+        movdqa  xmm7,xmm11
+
+        movdqa  xmm2,xmm11
+
+        psrld   xmm7,6
+        movdqa  xmm1,xmm11
+        pslld   xmm2,7
+        movdqa  XMMWORD[(16-128)+rax],xmm6
+        paddd   xmm6,xmm14
+
+        psrld   xmm1,11
+        pxor    xmm7,xmm2
+        pslld   xmm2,21-7
+        paddd   xmm6,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   xmm6,xmm7
+        pxor    xmm0,xmm4
+        movdqa  xmm4,xmm8
+        movdqa  xmm7,xmm15
+        pslld   xmm2,10
+        pxor    xmm4,xmm15
+
+
+        psrld   xmm7,13
+        pxor    xmm1,xmm2
+        paddd   xmm6,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,xmm6
+        pxor    xmm7,xmm2
+
+        paddd   xmm14,xmm6
+        paddd   xmm14,xmm7
+        movdqa  xmm6,XMMWORD[((48-128))+rax]
+        paddd   xmm5,XMMWORD[((176-128))+rax]
+
+        movdqa  xmm7,xmm6
+        movdqa  xmm1,xmm6
+        psrld   xmm7,3
+        movdqa  xmm2,xmm6
+
+        psrld   xmm1,7
+        movdqa  xmm0,XMMWORD[((0-128))+rax]
+        pslld   xmm2,14
+        pxor    xmm7,xmm1
+        psrld   xmm1,18-7
+        movdqa  xmm3,xmm0
+        pxor    xmm7,xmm2
+        pslld   xmm2,25-14
+        pxor    xmm7,xmm1
+        psrld   xmm0,10
+        movdqa  xmm1,xmm3
+
+        psrld   xmm3,17
+        pxor    xmm7,xmm2
+        pslld   xmm1,13
+        paddd   xmm5,xmm7
+        pxor    xmm0,xmm3
+        psrld   xmm3,19-17
+        pxor    xmm0,xmm1
+        pslld   xmm1,15-13
+        pxor    xmm0,xmm3
+        pxor    xmm0,xmm1
+        paddd   xmm5,xmm0
+        movdqa  xmm7,xmm10
+
+        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
+        movdqa  xmm5,XMMWORD[((64-128))+rax]
+        paddd   xmm6,XMMWORD[((192-128))+rax]
+
+        movdqa  xmm7,xmm5
+        movdqa  xmm1,xmm5
+        psrld   xmm7,3
+        movdqa  xmm2,xmm5
+
+        psrld   xmm1,7
+        movdqa  xmm0,XMMWORD[((16-128))+rax]
+        pslld   xmm2,14
+        pxor    xmm7,xmm1
+        psrld   xmm1,18-7
+        movdqa  xmm4,xmm0
+        pxor    xmm7,xmm2
+        pslld   xmm2,25-14
+        pxor    xmm7,xmm1
+        psrld   xmm0,10
+        movdqa  xmm1,xmm4
+
+        psrld   xmm4,17
+        pxor    xmm7,xmm2
+        pslld   xmm1,13
+        paddd   xmm6,xmm7
+        pxor    xmm0,xmm4
+        psrld   xmm4,19-17
+        pxor    xmm0,xmm1
+        pslld   xmm1,15-13
+        pxor    xmm0,xmm4
+        pxor    xmm0,xmm1
+        paddd   xmm6,xmm0
+        movdqa  xmm7,xmm9
+
+        movdqa  xmm2,xmm9
+
+        psrld   xmm7,6
+        movdqa  xmm1,xmm9
+        pslld   xmm2,7
+        movdqa  XMMWORD[(48-128)+rax],xmm6
+        paddd   xmm6,xmm12
+
+        psrld   xmm1,11
+        pxor    xmm7,xmm2
+        pslld   xmm2,21-7
+        paddd   xmm6,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   xmm6,xmm7
+        pxor    xmm0,xmm4
+        movdqa  xmm4,xmm14
+        movdqa  xmm7,xmm13
+        pslld   xmm2,10
+        pxor    xmm4,xmm13
+
+
+        psrld   xmm7,13
+        pxor    xmm1,xmm2
+        paddd   xmm6,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,xmm6
+        pxor    xmm7,xmm2
+
+        paddd   xmm12,xmm6
+        paddd   xmm12,xmm7
+        movdqa  xmm6,XMMWORD[((80-128))+rax]
+        paddd   xmm5,XMMWORD[((208-128))+rax]
+
+        movdqa  xmm7,xmm6
+        movdqa  xmm1,xmm6
+        psrld   xmm7,3
+        movdqa  xmm2,xmm6
+
+        psrld   xmm1,7
+        movdqa  xmm0,XMMWORD[((32-128))+rax]
+        pslld   xmm2,14
+        pxor    xmm7,xmm1
+        psrld   xmm1,18-7
+        movdqa  xmm3,xmm0
+        pxor    xmm7,xmm2
+        pslld   xmm2,25-14
+        pxor    xmm7,xmm1
+        psrld   xmm0,10
+        movdqa  xmm1,xmm3
+
+        psrld   xmm3,17
+        pxor    xmm7,xmm2
+        pslld   xmm1,13
+        paddd   xmm5,xmm7
+        pxor    xmm0,xmm3
+        psrld   xmm3,19-17
+        pxor    xmm0,xmm1
+        pslld   xmm1,15-13
+        pxor    xmm0,xmm3
+        pxor    xmm0,xmm1
+        paddd   xmm5,xmm0
+        movdqa  xmm7,xmm8
+
+        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
+        movdqa  xmm5,XMMWORD[((96-128))+rax]
+        paddd   xmm6,XMMWORD[((224-128))+rax]
+
+        movdqa  xmm7,xmm5
+        movdqa  xmm1,xmm5
+        psrld   xmm7,3
+        movdqa  xmm2,xmm5
+
+        psrld   xmm1,7
+        movdqa  xmm0,XMMWORD[((48-128))+rax]
+        pslld   xmm2,14
+        pxor    xmm7,xmm1
+        psrld   xmm1,18-7
+        movdqa  xmm4,xmm0
+        pxor    xmm7,xmm2
+        pslld   xmm2,25-14
+        pxor    xmm7,xmm1
+        psrld   xmm0,10
+        movdqa  xmm1,xmm4
+
+        psrld   xmm4,17
+        pxor    xmm7,xmm2
+        pslld   xmm1,13
+        paddd   xmm6,xmm7
+        pxor    xmm0,xmm4
+        psrld   xmm4,19-17
+        pxor    xmm0,xmm1
+        pslld   xmm1,15-13
+        pxor    xmm0,xmm4
+        pxor    xmm0,xmm1
+        paddd   xmm6,xmm0
+        movdqa  xmm7,xmm15
+
+        movdqa  xmm2,xmm15
+
+        psrld   xmm7,6
+        movdqa  xmm1,xmm15
+        pslld   xmm2,7
+        movdqa  XMMWORD[(80-128)+rax],xmm6
+        paddd   xmm6,xmm10
+
+        psrld   xmm1,11
+        pxor    xmm7,xmm2
+        pslld   xmm2,21-7
+        paddd   xmm6,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   xmm6,xmm7
+        pxor    xmm0,xmm4
+        movdqa  xmm4,xmm12
+        movdqa  xmm7,xmm11
+        pslld   xmm2,10
+        pxor    xmm4,xmm11
+
+
+        psrld   xmm7,13
+        pxor    xmm1,xmm2
+        paddd   xmm6,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,xmm6
+        pxor    xmm7,xmm2
+
+        paddd   xmm10,xmm6
+        paddd   xmm10,xmm7
+        movdqa  xmm6,XMMWORD[((112-128))+rax]
+        paddd   xmm5,XMMWORD[((240-128))+rax]
+
+        movdqa  xmm7,xmm6
+        movdqa  xmm1,xmm6
+        psrld   xmm7,3
+        movdqa  xmm2,xmm6
+
+        psrld   xmm1,7
+        movdqa  xmm0,XMMWORD[((64-128))+rax]
+        pslld   xmm2,14
+        pxor    xmm7,xmm1
+        psrld   xmm1,18-7
+        movdqa  xmm3,xmm0
+        pxor    xmm7,xmm2
+        pslld   xmm2,25-14
+        pxor    xmm7,xmm1
+        psrld   xmm0,10
+        movdqa  xmm1,xmm3
+
+        psrld   xmm3,17
+        pxor    xmm7,xmm2
+        pslld   xmm1,13
+        paddd   xmm5,xmm7
+        pxor    xmm0,xmm3
+        psrld   xmm3,19-17
+        pxor    xmm0,xmm1
+        pslld   xmm1,15-13
+        pxor    xmm0,xmm3
+        pxor    xmm0,xmm1
+        paddd   xmm5,xmm0
+        movdqa  xmm7,xmm14
+
+        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
+        movdqa  xmm5,XMMWORD[((128-128))+rax]
+        paddd   xmm6,XMMWORD[((0-128))+rax]
+
+        movdqa  xmm7,xmm5
+        movdqa  xmm1,xmm5
+        psrld   xmm7,3
+        movdqa  xmm2,xmm5
+
+        psrld   xmm1,7
+        movdqa  xmm0,XMMWORD[((80-128))+rax]
+        pslld   xmm2,14
+        pxor    xmm7,xmm1
+        psrld   xmm1,18-7
+        movdqa  xmm4,xmm0
+        pxor    xmm7,xmm2
+        pslld   xmm2,25-14
+        pxor    xmm7,xmm1
+        psrld   xmm0,10
+        movdqa  xmm1,xmm4
+
+        psrld   xmm4,17
+        pxor    xmm7,xmm2
+        pslld   xmm1,13
+        paddd   xmm6,xmm7
+        pxor    xmm0,xmm4
+        psrld   xmm4,19-17
+        pxor    xmm0,xmm1
+        pslld   xmm1,15-13
+        pxor    xmm0,xmm4
+        pxor    xmm0,xmm1
+        paddd   xmm6,xmm0
+        movdqa  xmm7,xmm13
+
+        movdqa  xmm2,xmm13
+
+        psrld   xmm7,6
+        movdqa  xmm1,xmm13
+        pslld   xmm2,7
+        movdqa  XMMWORD[(112-128)+rax],xmm6
+        paddd   xmm6,xmm8
+
+        psrld   xmm1,11
+        pxor    xmm7,xmm2
+        pslld   xmm2,21-7
+        paddd   xmm6,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   xmm6,xmm7
+        pxor    xmm0,xmm4
+        movdqa  xmm4,xmm10
+        movdqa  xmm7,xmm9
+        pslld   xmm2,10
+        pxor    xmm4,xmm9
+
+
+        psrld   xmm7,13
+        pxor    xmm1,xmm2
+        paddd   xmm6,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,xmm6
+        pxor    xmm7,xmm2
+
+        paddd   xmm8,xmm6
+        paddd   xmm8,xmm7
+        lea     rbp,[256+rbp]
+        movdqa  xmm6,XMMWORD[((144-128))+rax]
+        paddd   xmm5,XMMWORD[((16-128))+rax]
+
+        movdqa  xmm7,xmm6
+        movdqa  xmm1,xmm6
+        psrld   xmm7,3
+        movdqa  xmm2,xmm6
+
+        psrld   xmm1,7
+        movdqa  xmm0,XMMWORD[((96-128))+rax]
+        pslld   xmm2,14
+        pxor    xmm7,xmm1
+        psrld   xmm1,18-7
+        movdqa  xmm3,xmm0
+        pxor    xmm7,xmm2
+        pslld   xmm2,25-14
+        pxor    xmm7,xmm1
+        psrld   xmm0,10
+        movdqa  xmm1,xmm3
+
+        psrld   xmm3,17
+        pxor    xmm7,xmm2
+        pslld   xmm1,13
+        paddd   xmm5,xmm7
+        pxor    xmm0,xmm3
+        psrld   xmm3,19-17
+        pxor    xmm0,xmm1
+        pslld   xmm1,15-13
+        pxor    xmm0,xmm3
+        pxor    xmm0,xmm1
+        paddd   xmm5,xmm0
+        movdqa  xmm7,xmm12
+
+        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
+        movdqa  xmm5,XMMWORD[((160-128))+rax]
+        paddd   xmm6,XMMWORD[((32-128))+rax]
+
+        movdqa  xmm7,xmm5
+        movdqa  xmm1,xmm5
+        psrld   xmm7,3
+        movdqa  xmm2,xmm5
+
+        psrld   xmm1,7
+        movdqa  xmm0,XMMWORD[((112-128))+rax]
+        pslld   xmm2,14
+        pxor    xmm7,xmm1
+        psrld   xmm1,18-7
+        movdqa  xmm4,xmm0
+        pxor    xmm7,xmm2
+        pslld   xmm2,25-14
+        pxor    xmm7,xmm1
+        psrld   xmm0,10
+        movdqa  xmm1,xmm4
+
+        psrld   xmm4,17
+        pxor    xmm7,xmm2
+        pslld   xmm1,13
+        paddd   xmm6,xmm7
+        pxor    xmm0,xmm4
+        psrld   xmm4,19-17
+        pxor    xmm0,xmm1
+        pslld   xmm1,15-13
+        pxor    xmm0,xmm4
+        pxor    xmm0,xmm1
+        paddd   xmm6,xmm0
+        movdqa  xmm7,xmm11
+
+        movdqa  xmm2,xmm11
+
+        psrld   xmm7,6
+        movdqa  xmm1,xmm11
+        pslld   xmm2,7
+        movdqa  XMMWORD[(144-128)+rax],xmm6
+        paddd   xmm6,xmm14
+
+        psrld   xmm1,11
+        pxor    xmm7,xmm2
+        pslld   xmm2,21-7
+        paddd   xmm6,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   xmm6,xmm7
+        pxor    xmm0,xmm4
+        movdqa  xmm4,xmm8
+        movdqa  xmm7,xmm15
+        pslld   xmm2,10
+        pxor    xmm4,xmm15
+
+
+        psrld   xmm7,13
+        pxor    xmm1,xmm2
+        paddd   xmm6,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,xmm6
+        pxor    xmm7,xmm2
+
+        paddd   xmm14,xmm6
+        paddd   xmm14,xmm7
+        movdqa  xmm6,XMMWORD[((176-128))+rax]
+        paddd   xmm5,XMMWORD[((48-128))+rax]
+
+        movdqa  xmm7,xmm6
+        movdqa  xmm1,xmm6
+        psrld   xmm7,3
+        movdqa  xmm2,xmm6
+
+        psrld   xmm1,7
+        movdqa  xmm0,XMMWORD[((128-128))+rax]
+        pslld   xmm2,14
+        pxor    xmm7,xmm1
+        psrld   xmm1,18-7
+        movdqa  xmm3,xmm0
+        pxor    xmm7,xmm2
+        pslld   xmm2,25-14
+        pxor    xmm7,xmm1
+        psrld   xmm0,10
+        movdqa  xmm1,xmm3
+
+        psrld   xmm3,17
+        pxor    xmm7,xmm2
+        pslld   xmm1,13
+        paddd   xmm5,xmm7
+        pxor    xmm0,xmm3
+        psrld   xmm3,19-17
+        pxor    xmm0,xmm1
+        pslld   xmm1,15-13
+        pxor    xmm0,xmm3
+        pxor    xmm0,xmm1
+        paddd   xmm5,xmm0
+        movdqa  xmm7,xmm10
+
+        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
+        movdqa  xmm5,XMMWORD[((192-128))+rax]
+        paddd   xmm6,XMMWORD[((64-128))+rax]
+
+        movdqa  xmm7,xmm5
+        movdqa  xmm1,xmm5
+        psrld   xmm7,3
+        movdqa  xmm2,xmm5
+
+        psrld   xmm1,7
+        movdqa  xmm0,XMMWORD[((144-128))+rax]
+        pslld   xmm2,14
+        pxor    xmm7,xmm1
+        psrld   xmm1,18-7
+        movdqa  xmm4,xmm0
+        pxor    xmm7,xmm2
+        pslld   xmm2,25-14
+        pxor    xmm7,xmm1
+        psrld   xmm0,10
+        movdqa  xmm1,xmm4
+
+        psrld   xmm4,17
+        pxor    xmm7,xmm2
+        pslld   xmm1,13
+        paddd   xmm6,xmm7
+        pxor    xmm0,xmm4
+        psrld   xmm4,19-17
+        pxor    xmm0,xmm1
+        pslld   xmm1,15-13
+        pxor    xmm0,xmm4
+        pxor    xmm0,xmm1
+        paddd   xmm6,xmm0
+        movdqa  xmm7,xmm9
+
+        movdqa  xmm2,xmm9
+
+        psrld   xmm7,6
+        movdqa  xmm1,xmm9
+        pslld   xmm2,7
+        movdqa  XMMWORD[(176-128)+rax],xmm6
+        paddd   xmm6,xmm12
+
+        psrld   xmm1,11
+        pxor    xmm7,xmm2
+        pslld   xmm2,21-7
+        paddd   xmm6,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   xmm6,xmm7
+        pxor    xmm0,xmm4
+        movdqa  xmm4,xmm14
+        movdqa  xmm7,xmm13
+        pslld   xmm2,10
+        pxor    xmm4,xmm13
+
+
+        psrld   xmm7,13
+        pxor    xmm1,xmm2
+        paddd   xmm6,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,xmm6
+        pxor    xmm7,xmm2
+
+        paddd   xmm12,xmm6
+        paddd   xmm12,xmm7
+        movdqa  xmm6,XMMWORD[((208-128))+rax]
+        paddd   xmm5,XMMWORD[((80-128))+rax]
+
+        movdqa  xmm7,xmm6
+        movdqa  xmm1,xmm6
+        psrld   xmm7,3
+        movdqa  xmm2,xmm6
+
+        psrld   xmm1,7
+        movdqa  xmm0,XMMWORD[((160-128))+rax]
+        pslld   xmm2,14
+        pxor    xmm7,xmm1
+        psrld   xmm1,18-7
+        movdqa  xmm3,xmm0
+        pxor    xmm7,xmm2
+        pslld   xmm2,25-14
+        pxor    xmm7,xmm1
+        psrld   xmm0,10
+        movdqa  xmm1,xmm3
+
+        psrld   xmm3,17
+        pxor    xmm7,xmm2
+        pslld   xmm1,13
+        paddd   xmm5,xmm7
+        pxor    xmm0,xmm3
+        psrld   xmm3,19-17
+        pxor    xmm0,xmm1
+        pslld   xmm1,15-13
+        pxor    xmm0,xmm3
+        pxor    xmm0,xmm1
+        paddd   xmm5,xmm0
+        movdqa  xmm7,xmm8
+
+        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
+        movdqa  xmm5,XMMWORD[((224-128))+rax]
+        paddd   xmm6,XMMWORD[((96-128))+rax]
+
+        movdqa  xmm7,xmm5
+        movdqa  xmm1,xmm5
+        psrld   xmm7,3
+        movdqa  xmm2,xmm5
+
+        psrld   xmm1,7
+        movdqa  xmm0,XMMWORD[((176-128))+rax]
+        pslld   xmm2,14
+        pxor    xmm7,xmm1
+        psrld   xmm1,18-7
+        movdqa  xmm4,xmm0
+        pxor    xmm7,xmm2
+        pslld   xmm2,25-14
+        pxor    xmm7,xmm1
+        psrld   xmm0,10
+        movdqa  xmm1,xmm4
+
+        psrld   xmm4,17
+        pxor    xmm7,xmm2
+        pslld   xmm1,13
+        paddd   xmm6,xmm7
+        pxor    xmm0,xmm4
+        psrld   xmm4,19-17
+        pxor    xmm0,xmm1
+        pslld   xmm1,15-13
+        pxor    xmm0,xmm4
+        pxor    xmm0,xmm1
+        paddd   xmm6,xmm0
+        movdqa  xmm7,xmm15
+
+        movdqa  xmm2,xmm15
+
+        psrld   xmm7,6
+        movdqa  xmm1,xmm15
+        pslld   xmm2,7
+        movdqa  XMMWORD[(208-128)+rax],xmm6
+        paddd   xmm6,xmm10
+
+        psrld   xmm1,11
+        pxor    xmm7,xmm2
+        pslld   xmm2,21-7
+        paddd   xmm6,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   xmm6,xmm7
+        pxor    xmm0,xmm4
+        movdqa  xmm4,xmm12
+        movdqa  xmm7,xmm11
+        pslld   xmm2,10
+        pxor    xmm4,xmm11
+
+
+        psrld   xmm7,13
+        pxor    xmm1,xmm2
+        paddd   xmm6,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,xmm6
+        pxor    xmm7,xmm2
+
+        paddd   xmm10,xmm6
+        paddd   xmm10,xmm7
+        movdqa  xmm6,XMMWORD[((240-128))+rax]
+        paddd   xmm5,XMMWORD[((112-128))+rax]
+
+        movdqa  xmm7,xmm6
+        movdqa  xmm1,xmm6
+        psrld   xmm7,3
+        movdqa  xmm2,xmm6
+
+        psrld   xmm1,7
+        movdqa  xmm0,XMMWORD[((192-128))+rax]
+        pslld   xmm2,14
+        pxor    xmm7,xmm1
+        psrld   xmm1,18-7
+        movdqa  xmm3,xmm0
+        pxor    xmm7,xmm2
+        pslld   xmm2,25-14
+        pxor    xmm7,xmm1
+        psrld   xmm0,10
+        movdqa  xmm1,xmm3
+
+        psrld   xmm3,17
+        pxor    xmm7,xmm2
+        pslld   xmm1,13
+        paddd   xmm5,xmm7
+        pxor    xmm0,xmm3
+        psrld   xmm3,19-17
+        pxor    xmm0,xmm1
+        pslld   xmm1,15-13
+        pxor    xmm0,xmm3
+        pxor    xmm0,xmm1
+        paddd   xmm5,xmm0
+        movdqa  xmm7,xmm14
+
+        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
+        movdqa  xmm5,XMMWORD[((0-128))+rax]
+        paddd   xmm6,XMMWORD[((128-128))+rax]
+
+        movdqa  xmm7,xmm5
+        movdqa  xmm1,xmm5
+        psrld   xmm7,3
+        movdqa  xmm2,xmm5
+
+        psrld   xmm1,7
+        movdqa  xmm0,XMMWORD[((208-128))+rax]
+        pslld   xmm2,14
+        pxor    xmm7,xmm1
+        psrld   xmm1,18-7
+        movdqa  xmm4,xmm0
+        pxor    xmm7,xmm2
+        pslld   xmm2,25-14
+        pxor    xmm7,xmm1
+        psrld   xmm0,10
+        movdqa  xmm1,xmm4
+
+        psrld   xmm4,17
+        pxor    xmm7,xmm2
+        pslld   xmm1,13
+        paddd   xmm6,xmm7
+        pxor    xmm0,xmm4
+        psrld   xmm4,19-17
+        pxor    xmm0,xmm1
+        pslld   xmm1,15-13
+        pxor    xmm0,xmm4
+        pxor    xmm0,xmm1
+        paddd   xmm6,xmm0
+        movdqa  xmm7,xmm13
+
+        movdqa  xmm2,xmm13
+
+        psrld   xmm7,6
+        movdqa  xmm1,xmm13
+        pslld   xmm2,7
+        movdqa  XMMWORD[(240-128)+rax],xmm6
+        paddd   xmm6,xmm8
+
+        psrld   xmm1,11
+        pxor    xmm7,xmm2
+        pslld   xmm2,21-7
+        paddd   xmm6,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   xmm6,xmm7
+        pxor    xmm0,xmm4
+        movdqa  xmm4,xmm10
+        movdqa  xmm7,xmm9
+        pslld   xmm2,10
+        pxor    xmm4,xmm9
+
+
+        psrld   xmm7,13
+        pxor    xmm1,xmm2
+        paddd   xmm6,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,xmm6
+        pxor    xmm7,xmm2
+
+        paddd   xmm8,xmm6
+        paddd   xmm8,xmm7
+        lea     rbp,[256+rbp]
+        dec     ecx
+        jnz     NEAR $L$oop_16_xx
+
+        mov     ecx,1
+        lea     rbp,[((K256+128))]
+
+        movdqa  xmm7,XMMWORD[rbx]
+        cmp     ecx,DWORD[rbx]
+        pxor    xmm0,xmm0
+        cmovge  r8,rbp
+        cmp     ecx,DWORD[4+rbx]
+        movdqa  xmm6,xmm7
+        cmovge  r9,rbp
+        cmp     ecx,DWORD[8+rbx]
+        pcmpgtd xmm6,xmm0
+        cmovge  r10,rbp
+        cmp     ecx,DWORD[12+rbx]
+        paddd   xmm7,xmm6
+        cmovge  r11,rbp
+
+        movdqu  xmm0,XMMWORD[((0-128))+rdi]
+        pand    xmm8,xmm6
+        movdqu  xmm1,XMMWORD[((32-128))+rdi]
+        pand    xmm9,xmm6
+        movdqu  xmm2,XMMWORD[((64-128))+rdi]
+        pand    xmm10,xmm6
+        movdqu  xmm5,XMMWORD[((96-128))+rdi]
+        pand    xmm11,xmm6
+        paddd   xmm8,xmm0
+        movdqu  xmm0,XMMWORD[((128-128))+rdi]
+        pand    xmm12,xmm6
+        paddd   xmm9,xmm1
+        movdqu  xmm1,XMMWORD[((160-128))+rdi]
+        pand    xmm13,xmm6
+        paddd   xmm10,xmm2
+        movdqu  xmm2,XMMWORD[((192-128))+rdi]
+        pand    xmm14,xmm6
+        paddd   xmm11,xmm5
+        movdqu  xmm5,XMMWORD[((224-128))+rdi]
+        pand    xmm15,xmm6
+        paddd   xmm12,xmm0
+        paddd   xmm13,xmm1
+        movdqu  XMMWORD[(0-128)+rdi],xmm8
+        paddd   xmm14,xmm2
+        movdqu  XMMWORD[(32-128)+rdi],xmm9
+        paddd   xmm15,xmm5
+        movdqu  XMMWORD[(64-128)+rdi],xmm10
+        movdqu  XMMWORD[(96-128)+rdi],xmm11
+        movdqu  XMMWORD[(128-128)+rdi],xmm12
+        movdqu  XMMWORD[(160-128)+rdi],xmm13
+        movdqu  XMMWORD[(192-128)+rdi],xmm14
+        movdqu  XMMWORD[(224-128)+rdi],xmm15
+
+        movdqa  XMMWORD[rbx],xmm7
+        movdqa  xmm6,XMMWORD[$L$pbswap]
+        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_sha256_multi_block:
+
+ALIGN   32
+sha256_multi_block_shaext:
+        mov     QWORD[8+rsp],rdi        ;WIN64 prologue
+        mov     QWORD[16+rsp],rsi
+        mov     rax,rsp
+$L$SEH_begin_sha256_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,[128+rdi]
+        mov     QWORD[272+rsp],rax
+$L$body_shaext:
+        lea     rbx,[256+rsp]
+        lea     rbp,[((K256_shaext+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    xmm12,QWORD[((0-128))+rdi]
+        movq    xmm4,QWORD[((32-128))+rdi]
+        movq    xmm13,QWORD[((64-128))+rdi]
+        movq    xmm5,QWORD[((96-128))+rdi]
+        movq    xmm8,QWORD[((128-128))+rdi]
+        movq    xmm9,QWORD[((160-128))+rdi]
+        movq    xmm10,QWORD[((192-128))+rdi]
+        movq    xmm11,QWORD[((224-128))+rdi]
+
+        punpckldq       xmm12,xmm4
+        punpckldq       xmm13,xmm5
+        punpckldq       xmm8,xmm9
+        punpckldq       xmm10,xmm11
+        movdqa  xmm3,XMMWORD[((K256_shaext-16))]
+
+        movdqa  xmm14,xmm12
+        movdqa  xmm15,xmm13
+        punpcklqdq      xmm12,xmm8
+        punpcklqdq      xmm13,xmm10
+        punpckhqdq      xmm14,xmm8
+        punpckhqdq      xmm15,xmm10
+
+        pshufd  xmm12,xmm12,27
+        pshufd  xmm13,xmm13,27
+        pshufd  xmm14,xmm14,27
+        pshufd  xmm15,xmm15,27
+        jmp     NEAR $L$oop_shaext
+
+ALIGN   32
+$L$oop_shaext:
+        movdqu  xmm4,XMMWORD[r8]
+        movdqu  xmm8,XMMWORD[r9]
+        movdqu  xmm5,XMMWORD[16+r8]
+        movdqu  xmm9,XMMWORD[16+r9]
+        movdqu  xmm6,XMMWORD[32+r8]
+DB      102,15,56,0,227
+        movdqu  xmm10,XMMWORD[32+r9]
+DB      102,68,15,56,0,195
+        movdqu  xmm7,XMMWORD[48+r8]
+        lea     r8,[64+r8]
+        movdqu  xmm11,XMMWORD[48+r9]
+        lea     r9,[64+r9]
+
+        movdqa  xmm0,XMMWORD[((0-128))+rbp]
+DB      102,15,56,0,235
+        paddd   xmm0,xmm4
+        pxor    xmm4,xmm12
+        movdqa  xmm1,xmm0
+        movdqa  xmm2,XMMWORD[((0-128))+rbp]
+DB      102,68,15,56,0,203
+        paddd   xmm2,xmm8
+        movdqa  XMMWORD[80+rsp],xmm13
+DB      69,15,56,203,236
+        pxor    xmm8,xmm14
+        movdqa  xmm0,xmm2
+        movdqa  XMMWORD[112+rsp],xmm15
+DB      69,15,56,203,254
+        pshufd  xmm0,xmm1,0x0e
+        pxor    xmm4,xmm12
+        movdqa  XMMWORD[64+rsp],xmm12
+DB      69,15,56,203,229
+        pshufd  xmm0,xmm2,0x0e
+        pxor    xmm8,xmm14
+        movdqa  XMMWORD[96+rsp],xmm14
+        movdqa  xmm1,XMMWORD[((16-128))+rbp]
+        paddd   xmm1,xmm5
+DB      102,15,56,0,243
+DB      69,15,56,203,247
+
+        movdqa  xmm0,xmm1
+        movdqa  xmm2,XMMWORD[((16-128))+rbp]
+        paddd   xmm2,xmm9
+DB      69,15,56,203,236
+        movdqa  xmm0,xmm2
+        prefetcht0      [127+r8]
+DB      102,15,56,0,251
+DB      102,68,15,56,0,211
+        prefetcht0      [127+r9]
+DB      69,15,56,203,254
+        pshufd  xmm0,xmm1,0x0e
+DB      102,68,15,56,0,219
+DB      15,56,204,229
+DB      69,15,56,203,229
+        pshufd  xmm0,xmm2,0x0e
+        movdqa  xmm1,XMMWORD[((32-128))+rbp]
+        paddd   xmm1,xmm6
+DB      69,15,56,203,247
+
+        movdqa  xmm0,xmm1
+        movdqa  xmm2,XMMWORD[((32-128))+rbp]
+        paddd   xmm2,xmm10
+DB      69,15,56,203,236
+DB      69,15,56,204,193
+        movdqa  xmm0,xmm2
+        movdqa  xmm3,xmm7
+DB      69,15,56,203,254
+        pshufd  xmm0,xmm1,0x0e
+DB      102,15,58,15,222,4
+        paddd   xmm4,xmm3
+        movdqa  xmm3,xmm11
+DB      102,65,15,58,15,218,4
+DB      15,56,204,238
+DB      69,15,56,203,229
+        pshufd  xmm0,xmm2,0x0e
+        movdqa  xmm1,XMMWORD[((48-128))+rbp]
+        paddd   xmm1,xmm7
+DB      69,15,56,203,247
+DB      69,15,56,204,202
+
+        movdqa  xmm0,xmm1
+        movdqa  xmm2,XMMWORD[((48-128))+rbp]
+        paddd   xmm8,xmm3
+        paddd   xmm2,xmm11
+DB      15,56,205,231
+DB      69,15,56,203,236
+        movdqa  xmm0,xmm2
+        movdqa  xmm3,xmm4
+DB      102,15,58,15,223,4
+DB      69,15,56,203,254
+DB      69,15,56,205,195
+        pshufd  xmm0,xmm1,0x0e
+        paddd   xmm5,xmm3
+        movdqa  xmm3,xmm8
+DB      102,65,15,58,15,219,4
+DB      15,56,204,247
+DB      69,15,56,203,229
+        pshufd  xmm0,xmm2,0x0e
+        movdqa  xmm1,XMMWORD[((64-128))+rbp]
+        paddd   xmm1,xmm4
+DB      69,15,56,203,247
+DB      69,15,56,204,211
+        movdqa  xmm0,xmm1
+        movdqa  xmm2,XMMWORD[((64-128))+rbp]
+        paddd   xmm9,xmm3
+        paddd   xmm2,xmm8
+DB      15,56,205,236
+DB      69,15,56,203,236
+        movdqa  xmm0,xmm2
+        movdqa  xmm3,xmm5
+DB      102,15,58,15,220,4
+DB      69,15,56,203,254
+DB      69,15,56,205,200
+        pshufd  xmm0,xmm1,0x0e
+        paddd   xmm6,xmm3
+        movdqa  xmm3,xmm9
+DB      102,65,15,58,15,216,4
+DB      15,56,204,252
+DB      69,15,56,203,229
+        pshufd  xmm0,xmm2,0x0e
+        movdqa  xmm1,XMMWORD[((80-128))+rbp]
+        paddd   xmm1,xmm5
+DB      69,15,56,203,247
+DB      69,15,56,204,216
+        movdqa  xmm0,xmm1
+        movdqa  xmm2,XMMWORD[((80-128))+rbp]
+        paddd   xmm10,xmm3
+        paddd   xmm2,xmm9
+DB      15,56,205,245
+DB      69,15,56,203,236
+        movdqa  xmm0,xmm2
+        movdqa  xmm3,xmm6
+DB      102,15,58,15,221,4
+DB      69,15,56,203,254
+DB      69,15,56,205,209
+        pshufd  xmm0,xmm1,0x0e
+        paddd   xmm7,xmm3
+        movdqa  xmm3,xmm10
+DB      102,65,15,58,15,217,4
+DB      15,56,204,229
+DB      69,15,56,203,229
+        pshufd  xmm0,xmm2,0x0e
+        movdqa  xmm1,XMMWORD[((96-128))+rbp]
+        paddd   xmm1,xmm6
+DB      69,15,56,203,247
+DB      69,15,56,204,193
+        movdqa  xmm0,xmm1
+        movdqa  xmm2,XMMWORD[((96-128))+rbp]
+        paddd   xmm11,xmm3
+        paddd   xmm2,xmm10
+DB      15,56,205,254
+DB      69,15,56,203,236
+        movdqa  xmm0,xmm2
+        movdqa  xmm3,xmm7
+DB      102,15,58,15,222,4
+DB      69,15,56,203,254
+DB      69,15,56,205,218
+        pshufd  xmm0,xmm1,0x0e
+        paddd   xmm4,xmm3
+        movdqa  xmm3,xmm11
+DB      102,65,15,58,15,218,4
+DB      15,56,204,238
+DB      69,15,56,203,229
+        pshufd  xmm0,xmm2,0x0e
+        movdqa  xmm1,XMMWORD[((112-128))+rbp]
+        paddd   xmm1,xmm7
+DB      69,15,56,203,247
+DB      69,15,56,204,202
+        movdqa  xmm0,xmm1
+        movdqa  xmm2,XMMWORD[((112-128))+rbp]
+        paddd   xmm8,xmm3
+        paddd   xmm2,xmm11
+DB      15,56,205,231
+DB      69,15,56,203,236
+        movdqa  xmm0,xmm2
+        movdqa  xmm3,xmm4
+DB      102,15,58,15,223,4
+DB      69,15,56,203,254
+DB      69,15,56,205,195
+        pshufd  xmm0,xmm1,0x0e
+        paddd   xmm5,xmm3
+        movdqa  xmm3,xmm8
+DB      102,65,15,58,15,219,4
+DB      15,56,204,247
+DB      69,15,56,203,229
+        pshufd  xmm0,xmm2,0x0e
+        movdqa  xmm1,XMMWORD[((128-128))+rbp]
+        paddd   xmm1,xmm4
+DB      69,15,56,203,247
+DB      69,15,56,204,211
+        movdqa  xmm0,xmm1
+        movdqa  xmm2,XMMWORD[((128-128))+rbp]
+        paddd   xmm9,xmm3
+        paddd   xmm2,xmm8
+DB      15,56,205,236
+DB      69,15,56,203,236
+        movdqa  xmm0,xmm2
+        movdqa  xmm3,xmm5
+DB      102,15,58,15,220,4
+DB      69,15,56,203,254
+DB      69,15,56,205,200
+        pshufd  xmm0,xmm1,0x0e
+        paddd   xmm6,xmm3
+        movdqa  xmm3,xmm9
+DB      102,65,15,58,15,216,4
+DB      15,56,204,252
+DB      69,15,56,203,229
+        pshufd  xmm0,xmm2,0x0e
+        movdqa  xmm1,XMMWORD[((144-128))+rbp]
+        paddd   xmm1,xmm5
+DB      69,15,56,203,247
+DB      69,15,56,204,216
+        movdqa  xmm0,xmm1
+        movdqa  xmm2,XMMWORD[((144-128))+rbp]
+        paddd   xmm10,xmm3
+        paddd   xmm2,xmm9
+DB      15,56,205,245
+DB      69,15,56,203,236
+        movdqa  xmm0,xmm2
+        movdqa  xmm3,xmm6
+DB      102,15,58,15,221,4
+DB      69,15,56,203,254
+DB      69,15,56,205,209
+        pshufd  xmm0,xmm1,0x0e
+        paddd   xmm7,xmm3
+        movdqa  xmm3,xmm10
+DB      102,65,15,58,15,217,4
+DB      15,56,204,229
+DB      69,15,56,203,229
+        pshufd  xmm0,xmm2,0x0e
+        movdqa  xmm1,XMMWORD[((160-128))+rbp]
+        paddd   xmm1,xmm6
+DB      69,15,56,203,247
+DB      69,15,56,204,193
+        movdqa  xmm0,xmm1
+        movdqa  xmm2,XMMWORD[((160-128))+rbp]
+        paddd   xmm11,xmm3
+        paddd   xmm2,xmm10
+DB      15,56,205,254
+DB      69,15,56,203,236
+        movdqa  xmm0,xmm2
+        movdqa  xmm3,xmm7
+DB      102,15,58,15,222,4
+DB      69,15,56,203,254
+DB      69,15,56,205,218
+        pshufd  xmm0,xmm1,0x0e
+        paddd   xmm4,xmm3
+        movdqa  xmm3,xmm11
+DB      102,65,15,58,15,218,4
+DB      15,56,204,238
+DB      69,15,56,203,229
+        pshufd  xmm0,xmm2,0x0e
+        movdqa  xmm1,XMMWORD[((176-128))+rbp]
+        paddd   xmm1,xmm7
+DB      69,15,56,203,247
+DB      69,15,56,204,202
+        movdqa  xmm0,xmm1
+        movdqa  xmm2,XMMWORD[((176-128))+rbp]
+        paddd   xmm8,xmm3
+        paddd   xmm2,xmm11
+DB      15,56,205,231
+DB      69,15,56,203,236
+        movdqa  xmm0,xmm2
+        movdqa  xmm3,xmm4
+DB      102,15,58,15,223,4
+DB      69,15,56,203,254
+DB      69,15,56,205,195
+        pshufd  xmm0,xmm1,0x0e
+        paddd   xmm5,xmm3
+        movdqa  xmm3,xmm8
+DB      102,65,15,58,15,219,4
+DB      15,56,204,247
+DB      69,15,56,203,229
+        pshufd  xmm0,xmm2,0x0e
+        movdqa  xmm1,XMMWORD[((192-128))+rbp]
+        paddd   xmm1,xmm4
+DB      69,15,56,203,247
+DB      69,15,56,204,211
+        movdqa  xmm0,xmm1
+        movdqa  xmm2,XMMWORD[((192-128))+rbp]
+        paddd   xmm9,xmm3
+        paddd   xmm2,xmm8
+DB      15,56,205,236
+DB      69,15,56,203,236
+        movdqa  xmm0,xmm2
+        movdqa  xmm3,xmm5
+DB      102,15,58,15,220,4
+DB      69,15,56,203,254
+DB      69,15,56,205,200
+        pshufd  xmm0,xmm1,0x0e
+        paddd   xmm6,xmm3
+        movdqa  xmm3,xmm9
+DB      102,65,15,58,15,216,4
+DB      15,56,204,252
+DB      69,15,56,203,229
+        pshufd  xmm0,xmm2,0x0e
+        movdqa  xmm1,XMMWORD[((208-128))+rbp]
+        paddd   xmm1,xmm5
+DB      69,15,56,203,247
+DB      69,15,56,204,216
+        movdqa  xmm0,xmm1
+        movdqa  xmm2,XMMWORD[((208-128))+rbp]
+        paddd   xmm10,xmm3
+        paddd   xmm2,xmm9
+DB      15,56,205,245
+DB      69,15,56,203,236
+        movdqa  xmm0,xmm2
+        movdqa  xmm3,xmm6
+DB      102,15,58,15,221,4
+DB      69,15,56,203,254
+DB      69,15,56,205,209
+        pshufd  xmm0,xmm1,0x0e
+        paddd   xmm7,xmm3
+        movdqa  xmm3,xmm10
+DB      102,65,15,58,15,217,4
+        nop
+DB      69,15,56,203,229
+        pshufd  xmm0,xmm2,0x0e
+        movdqa  xmm1,XMMWORD[((224-128))+rbp]
+        paddd   xmm1,xmm6
+DB      69,15,56,203,247
+
+        movdqa  xmm0,xmm1
+        movdqa  xmm2,XMMWORD[((224-128))+rbp]
+        paddd   xmm11,xmm3
+        paddd   xmm2,xmm10
+DB      15,56,205,254
+        nop
+DB      69,15,56,203,236
+        movdqa  xmm0,xmm2
+        mov     ecx,1
+        pxor    xmm6,xmm6
+DB      69,15,56,203,254
+DB      69,15,56,205,218
+        pshufd  xmm0,xmm1,0x0e
+        movdqa  xmm1,XMMWORD[((240-128))+rbp]
+        paddd   xmm1,xmm7
+        movq    xmm7,QWORD[rbx]
+        nop
+DB      69,15,56,203,229
+        pshufd  xmm0,xmm2,0x0e
+        movdqa  xmm2,XMMWORD[((240-128))+rbp]
+        paddd   xmm2,xmm11
+DB      69,15,56,203,247
+
+        movdqa  xmm0,xmm1
+        cmp     ecx,DWORD[rbx]
+        cmovge  r8,rsp
+        cmp     ecx,DWORD[4+rbx]
+        cmovge  r9,rsp
+        pshufd  xmm9,xmm7,0x00
+DB      69,15,56,203,236
+        movdqa  xmm0,xmm2
+        pshufd  xmm10,xmm7,0x55
+        movdqa  xmm11,xmm7
+DB      69,15,56,203,254
+        pshufd  xmm0,xmm1,0x0e
+        pcmpgtd xmm9,xmm6
+        pcmpgtd xmm10,xmm6
+DB      69,15,56,203,229
+        pshufd  xmm0,xmm2,0x0e
+        pcmpgtd xmm11,xmm6
+        movdqa  xmm3,XMMWORD[((K256_shaext-16))]
+DB      69,15,56,203,247
+
+        pand    xmm13,xmm9
+        pand    xmm15,xmm10
+        pand    xmm12,xmm9
+        pand    xmm14,xmm10
+        paddd   xmm11,xmm7
+
+        paddd   xmm13,XMMWORD[80+rsp]
+        paddd   xmm15,XMMWORD[112+rsp]
+        paddd   xmm12,XMMWORD[64+rsp]
+        paddd   xmm14,XMMWORD[96+rsp]
+
+        movq    QWORD[rbx],xmm11
+        dec     edx
+        jnz     NEAR $L$oop_shaext
+
+        mov     edx,DWORD[280+rsp]
+
+        pshufd  xmm12,xmm12,27
+        pshufd  xmm13,xmm13,27
+        pshufd  xmm14,xmm14,27
+        pshufd  xmm15,xmm15,27
+
+        movdqa  xmm5,xmm12
+        movdqa  xmm6,xmm13
+        punpckldq       xmm12,xmm14
+        punpckhdq       xmm5,xmm14
+        punpckldq       xmm13,xmm15
+        punpckhdq       xmm6,xmm15
+
+        movq    QWORD[(0-128)+rdi],xmm12
+        psrldq  xmm12,8
+        movq    QWORD[(128-128)+rdi],xmm5
+        psrldq  xmm5,8
+        movq    QWORD[(32-128)+rdi],xmm12
+        movq    QWORD[(160-128)+rdi],xmm5
+
+        movq    QWORD[(64-128)+rdi],xmm13
+        psrldq  xmm13,8
+        movq    QWORD[(192-128)+rdi],xmm6
+        psrldq  xmm6,8
+        movq    QWORD[(96-128)+rdi],xmm13
+        movq    QWORD[(224-128)+rdi],xmm6
+
+        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_sha256_multi_block_shaext:
+ALIGN   256
+K256:
+        DD      1116352408,1116352408,1116352408,1116352408
+        DD      1116352408,1116352408,1116352408,1116352408
+        DD      1899447441,1899447441,1899447441,1899447441
+        DD      1899447441,1899447441,1899447441,1899447441
+        DD      3049323471,3049323471,3049323471,3049323471
+        DD      3049323471,3049323471,3049323471,3049323471
+        DD      3921009573,3921009573,3921009573,3921009573
+        DD      3921009573,3921009573,3921009573,3921009573
+        DD      961987163,961987163,961987163,961987163
+        DD      961987163,961987163,961987163,961987163
+        DD      1508970993,1508970993,1508970993,1508970993
+        DD      1508970993,1508970993,1508970993,1508970993
+        DD      2453635748,2453635748,2453635748,2453635748
+        DD      2453635748,2453635748,2453635748,2453635748
+        DD      2870763221,2870763221,2870763221,2870763221
+        DD      2870763221,2870763221,2870763221,2870763221
+        DD      3624381080,3624381080,3624381080,3624381080
+        DD      3624381080,3624381080,3624381080,3624381080
+        DD      310598401,310598401,310598401,310598401
+        DD      310598401,310598401,310598401,310598401
+        DD      607225278,607225278,607225278,607225278
+        DD      607225278,607225278,607225278,607225278
+        DD      1426881987,1426881987,1426881987,1426881987
+        DD      1426881987,1426881987,1426881987,1426881987
+        DD      1925078388,1925078388,1925078388,1925078388
+        DD      1925078388,1925078388,1925078388,1925078388
+        DD      2162078206,2162078206,2162078206,2162078206
+        DD      2162078206,2162078206,2162078206,2162078206
+        DD      2614888103,2614888103,2614888103,2614888103
+        DD      2614888103,2614888103,2614888103,2614888103
+        DD      3248222580,3248222580,3248222580,3248222580
+        DD      3248222580,3248222580,3248222580,3248222580
+        DD      3835390401,3835390401,3835390401,3835390401
+        DD      3835390401,3835390401,3835390401,3835390401
+        DD      4022224774,4022224774,4022224774,4022224774
+        DD      4022224774,4022224774,4022224774,4022224774
+        DD      264347078,264347078,264347078,264347078
+        DD      264347078,264347078,264347078,264347078
+        DD      604807628,604807628,604807628,604807628
+        DD      604807628,604807628,604807628,604807628
+        DD      770255983,770255983,770255983,770255983
+        DD      770255983,770255983,770255983,770255983
+        DD      1249150122,1249150122,1249150122,1249150122
+        DD      1249150122,1249150122,1249150122,1249150122
+        DD      1555081692,1555081692,1555081692,1555081692
+        DD      1555081692,1555081692,1555081692,1555081692
+        DD      1996064986,1996064986,1996064986,1996064986
+        DD      1996064986,1996064986,1996064986,1996064986
+        DD      2554220882,2554220882,2554220882,2554220882
+        DD      2554220882,2554220882,2554220882,2554220882
+        DD      2821834349,2821834349,2821834349,2821834349
+        DD      2821834349,2821834349,2821834349,2821834349
+        DD      2952996808,2952996808,2952996808,2952996808
+        DD      2952996808,2952996808,2952996808,2952996808
+        DD      3210313671,3210313671,3210313671,3210313671
+        DD      3210313671,3210313671,3210313671,3210313671
+        DD      3336571891,3336571891,3336571891,3336571891
+        DD      3336571891,3336571891,3336571891,3336571891
+        DD      3584528711,3584528711,3584528711,3584528711
+        DD      3584528711,3584528711,3584528711,3584528711
+        DD      113926993,113926993,113926993,113926993
+        DD      113926993,113926993,113926993,113926993
+        DD      338241895,338241895,338241895,338241895
+        DD      338241895,338241895,338241895,338241895
+        DD      666307205,666307205,666307205,666307205
+        DD      666307205,666307205,666307205,666307205
+        DD      773529912,773529912,773529912,773529912
+        DD      773529912,773529912,773529912,773529912
+        DD      1294757372,1294757372,1294757372,1294757372
+        DD      1294757372,1294757372,1294757372,1294757372
+        DD      1396182291,1396182291,1396182291,1396182291
+        DD      1396182291,1396182291,1396182291,1396182291
+        DD      1695183700,1695183700,1695183700,1695183700
+        DD      1695183700,1695183700,1695183700,1695183700
+        DD      1986661051,1986661051,1986661051,1986661051
+        DD      1986661051,1986661051,1986661051,1986661051
+        DD      2177026350,2177026350,2177026350,2177026350
+        DD      2177026350,2177026350,2177026350,2177026350
+        DD      2456956037,2456956037,2456956037,2456956037
+        DD      2456956037,2456956037,2456956037,2456956037
+        DD      2730485921,2730485921,2730485921,2730485921
+        DD      2730485921,2730485921,2730485921,2730485921
+        DD      2820302411,2820302411,2820302411,2820302411
+        DD      2820302411,2820302411,2820302411,2820302411
+        DD      3259730800,3259730800,3259730800,3259730800
+        DD      3259730800,3259730800,3259730800,3259730800
+        DD      3345764771,3345764771,3345764771,3345764771
+        DD      3345764771,3345764771,3345764771,3345764771
+        DD      3516065817,3516065817,3516065817,3516065817
+        DD      3516065817,3516065817,3516065817,3516065817
+        DD      3600352804,3600352804,3600352804,3600352804
+        DD      3600352804,3600352804,3600352804,3600352804
+        DD      4094571909,4094571909,4094571909,4094571909
+        DD      4094571909,4094571909,4094571909,4094571909
+        DD      275423344,275423344,275423344,275423344
+        DD      275423344,275423344,275423344,275423344
+        DD      430227734,430227734,430227734,430227734
+        DD      430227734,430227734,430227734,430227734
+        DD      506948616,506948616,506948616,506948616
+        DD      506948616,506948616,506948616,506948616
+        DD      659060556,659060556,659060556,659060556
+        DD      659060556,659060556,659060556,659060556
+        DD      883997877,883997877,883997877,883997877
+        DD      883997877,883997877,883997877,883997877
+        DD      958139571,958139571,958139571,958139571
+        DD      958139571,958139571,958139571,958139571
+        DD      1322822218,1322822218,1322822218,1322822218
+        DD      1322822218,1322822218,1322822218,1322822218
+        DD      1537002063,1537002063,1537002063,1537002063
+        DD      1537002063,1537002063,1537002063,1537002063
+        DD      1747873779,1747873779,1747873779,1747873779
+        DD      1747873779,1747873779,1747873779,1747873779
+        DD      1955562222,1955562222,1955562222,1955562222
+        DD      1955562222,1955562222,1955562222,1955562222
+        DD      2024104815,2024104815,2024104815,2024104815
+        DD      2024104815,2024104815,2024104815,2024104815
+        DD      2227730452,2227730452,2227730452,2227730452
+        DD      2227730452,2227730452,2227730452,2227730452
+        DD      2361852424,2361852424,2361852424,2361852424
+        DD      2361852424,2361852424,2361852424,2361852424
+        DD      2428436474,2428436474,2428436474,2428436474
+        DD      2428436474,2428436474,2428436474,2428436474
+        DD      2756734187,2756734187,2756734187,2756734187
+        DD      2756734187,2756734187,2756734187,2756734187
+        DD      3204031479,3204031479,3204031479,3204031479
+        DD      3204031479,3204031479,3204031479,3204031479
+        DD      3329325298,3329325298,3329325298,3329325298
+        DD      3329325298,3329325298,3329325298,3329325298
+$L$pbswap:
+        DD      0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+        DD      0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+K256_shaext:
+        DD      0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
+        DD      0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
+        DD      0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
+        DD      0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
+        DD      0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc
+        DD      0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
+        DD      0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
+        DD      0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967
+        DD      0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
+        DD      0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
+        DD      0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
+        DD      0xd192e819,0xd6990624,0xf40e3585,0x106aa070
+        DD      0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
+        DD      0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
+        DD      0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
+        DD      0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
+DB      83,72,65,50,53,54,32,109,117,108,116,105,45,98,108,111
+DB      99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114
+DB      32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71
+DB      65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112
+DB      101,110,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_sha256_multi_block wrt ..imagebase
+        DD      $L$SEH_end_sha256_multi_block wrt ..imagebase
+        DD      $L$SEH_info_sha256_multi_block wrt ..imagebase
+        DD      $L$SEH_begin_sha256_multi_block_shaext wrt ..imagebase
+        DD      $L$SEH_end_sha256_multi_block_shaext wrt ..imagebase
+        DD      $L$SEH_info_sha256_multi_block_shaext wrt ..imagebase
+section .xdata rdata align=8
+ALIGN   8
+$L$SEH_info_sha256_multi_block:
+DB      9,0,0,0
+        DD      se_handler wrt ..imagebase
+        DD      $L$body wrt ..imagebase,$L$epilogue wrt ..imagebase
+$L$SEH_info_sha256_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/sha256-x86_64.nasm b/CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha256-x86_64.nasm
new file mode 100644
index 0000000000..70e49862a3
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha256-x86_64.nasm
@@ -0,0 +1,3313 @@
+; WARNING: do not edit!
+; Generated from openssl/crypto/sha/asm/sha512-x86_64.pl
+;
+; Copyright 2005-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_block_data_order
+
+ALIGN   16
+sha256_block_data_order:
+        mov     QWORD[8+rsp],rdi        ;WIN64 prologue
+        mov     QWORD[16+rsp],rsi
+        mov     rax,rsp
+$L$SEH_begin_sha256_block_data_order:
+        mov     rdi,rcx
+        mov     rsi,rdx
+        mov     rdx,r8
+
+
+
+        lea     r11,[OPENSSL_ia32cap_P]
+        mov     r9d,DWORD[r11]
+        mov     r10d,DWORD[4+r11]
+        mov     r11d,DWORD[8+r11]
+        test    r11d,536870912
+        jnz     NEAR _shaext_shortcut
+        test    r10d,512
+        jnz     NEAR $L$ssse3_shortcut
+        mov     rax,rsp
+
+        push    rbx
+
+        push    rbp
+
+        push    r12
+
+        push    r13
+
+        push    r14
+
+        push    r15
+
+        shl     rdx,4
+        sub     rsp,16*4+4*8
+        lea     rdx,[rdx*4+rsi]
+        and     rsp,-64
+        mov     QWORD[((64+0))+rsp],rdi
+        mov     QWORD[((64+8))+rsp],rsi
+        mov     QWORD[((64+16))+rsp],rdx
+        mov     QWORD[88+rsp],rax
+
+$L$prologue:
+
+        mov     eax,DWORD[rdi]
+        mov     ebx,DWORD[4+rdi]
+        mov     ecx,DWORD[8+rdi]
+        mov     edx,DWORD[12+rdi]
+        mov     r8d,DWORD[16+rdi]
+        mov     r9d,DWORD[20+rdi]
+        mov     r10d,DWORD[24+rdi]
+        mov     r11d,DWORD[28+rdi]
+        jmp     NEAR $L$loop
+
+ALIGN   16
+$L$loop:
+        mov     edi,ebx
+        lea     rbp,[K256]
+        xor     edi,ecx
+        mov     r12d,DWORD[rsi]
+        mov     r13d,r8d
+        mov     r14d,eax
+        bswap   r12d
+        ror     r13d,14
+        mov     r15d,r9d
+
+        xor     r13d,r8d
+        ror     r14d,9
+        xor     r15d,r10d
+
+        mov     DWORD[rsp],r12d
+        xor     r14d,eax
+        and     r15d,r8d
+
+        ror     r13d,5
+        add     r12d,r11d
+        xor     r15d,r10d
+
+        ror     r14d,11
+        xor     r13d,r8d
+        add     r12d,r15d
+
+        mov     r15d,eax
+        add     r12d,DWORD[rbp]
+        xor     r14d,eax
+
+        xor     r15d,ebx
+        ror     r13d,6
+        mov     r11d,ebx
+
+        and     edi,r15d
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     r11d,edi
+        add     edx,r12d
+        add     r11d,r12d
+
+        lea     rbp,[4+rbp]
+        add     r11d,r14d
+        mov     r12d,DWORD[4+rsi]
+        mov     r13d,edx
+        mov     r14d,r11d
+        bswap   r12d
+        ror     r13d,14
+        mov     edi,r8d
+
+        xor     r13d,edx
+        ror     r14d,9
+        xor     edi,r9d
+
+        mov     DWORD[4+rsp],r12d
+        xor     r14d,r11d
+        and     edi,edx
+
+        ror     r13d,5
+        add     r12d,r10d
+        xor     edi,r9d
+
+        ror     r14d,11
+        xor     r13d,edx
+        add     r12d,edi
+
+        mov     edi,r11d
+        add     r12d,DWORD[rbp]
+        xor     r14d,r11d
+
+        xor     edi,eax
+        ror     r13d,6
+        mov     r10d,eax
+
+        and     r15d,edi
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     r10d,r15d
+        add     ecx,r12d
+        add     r10d,r12d
+
+        lea     rbp,[4+rbp]
+        add     r10d,r14d
+        mov     r12d,DWORD[8+rsi]
+        mov     r13d,ecx
+        mov     r14d,r10d
+        bswap   r12d
+        ror     r13d,14
+        mov     r15d,edx
+
+        xor     r13d,ecx
+        ror     r14d,9
+        xor     r15d,r8d
+
+        mov     DWORD[8+rsp],r12d
+        xor     r14d,r10d
+        and     r15d,ecx
+
+        ror     r13d,5
+        add     r12d,r9d
+        xor     r15d,r8d
+
+        ror     r14d,11
+        xor     r13d,ecx
+        add     r12d,r15d
+
+        mov     r15d,r10d
+        add     r12d,DWORD[rbp]
+        xor     r14d,r10d
+
+        xor     r15d,r11d
+        ror     r13d,6
+        mov     r9d,r11d
+
+        and     edi,r15d
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     r9d,edi
+        add     ebx,r12d
+        add     r9d,r12d
+
+        lea     rbp,[4+rbp]
+        add     r9d,r14d
+        mov     r12d,DWORD[12+rsi]
+        mov     r13d,ebx
+        mov     r14d,r9d
+        bswap   r12d
+        ror     r13d,14
+        mov     edi,ecx
+
+        xor     r13d,ebx
+        ror     r14d,9
+        xor     edi,edx
+
+        mov     DWORD[12+rsp],r12d
+        xor     r14d,r9d
+        and     edi,ebx
+
+        ror     r13d,5
+        add     r12d,r8d
+        xor     edi,edx
+
+        ror     r14d,11
+        xor     r13d,ebx
+        add     r12d,edi
+
+        mov     edi,r9d
+        add     r12d,DWORD[rbp]
+        xor     r14d,r9d
+
+        xor     edi,r10d
+        ror     r13d,6
+        mov     r8d,r10d
+
+        and     r15d,edi
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     r8d,r15d
+        add     eax,r12d
+        add     r8d,r12d
+
+        lea     rbp,[20+rbp]
+        add     r8d,r14d
+        mov     r12d,DWORD[16+rsi]
+        mov     r13d,eax
+        mov     r14d,r8d
+        bswap   r12d
+        ror     r13d,14
+        mov     r15d,ebx
+
+        xor     r13d,eax
+        ror     r14d,9
+        xor     r15d,ecx
+
+        mov     DWORD[16+rsp],r12d
+        xor     r14d,r8d
+        and     r15d,eax
+
+        ror     r13d,5
+        add     r12d,edx
+        xor     r15d,ecx
+
+        ror     r14d,11
+        xor     r13d,eax
+        add     r12d,r15d
+
+        mov     r15d,r8d
+        add     r12d,DWORD[rbp]
+        xor     r14d,r8d
+
+        xor     r15d,r9d
+        ror     r13d,6
+        mov     edx,r9d
+
+        and     edi,r15d
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     edx,edi
+        add     r11d,r12d
+        add     edx,r12d
+
+        lea     rbp,[4+rbp]
+        add     edx,r14d
+        mov     r12d,DWORD[20+rsi]
+        mov     r13d,r11d
+        mov     r14d,edx
+        bswap   r12d
+        ror     r13d,14
+        mov     edi,eax
+
+        xor     r13d,r11d
+        ror     r14d,9
+        xor     edi,ebx
+
+        mov     DWORD[20+rsp],r12d
+        xor     r14d,edx
+        and     edi,r11d
+
+        ror     r13d,5
+        add     r12d,ecx
+        xor     edi,ebx
+
+        ror     r14d,11
+        xor     r13d,r11d
+        add     r12d,edi
+
+        mov     edi,edx
+        add     r12d,DWORD[rbp]
+        xor     r14d,edx
+
+        xor     edi,r8d
+        ror     r13d,6
+        mov     ecx,r8d
+
+        and     r15d,edi
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     ecx,r15d
+        add     r10d,r12d
+        add     ecx,r12d
+
+        lea     rbp,[4+rbp]
+        add     ecx,r14d
+        mov     r12d,DWORD[24+rsi]
+        mov     r13d,r10d
+        mov     r14d,ecx
+        bswap   r12d
+        ror     r13d,14
+        mov     r15d,r11d
+
+        xor     r13d,r10d
+        ror     r14d,9
+        xor     r15d,eax
+
+        mov     DWORD[24+rsp],r12d
+        xor     r14d,ecx
+        and     r15d,r10d
+
+        ror     r13d,5
+        add     r12d,ebx
+        xor     r15d,eax
+
+        ror     r14d,11
+        xor     r13d,r10d
+        add     r12d,r15d
+
+        mov     r15d,ecx
+        add     r12d,DWORD[rbp]
+        xor     r14d,ecx
+
+        xor     r15d,edx
+        ror     r13d,6
+        mov     ebx,edx
+
+        and     edi,r15d
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     ebx,edi
+        add     r9d,r12d
+        add     ebx,r12d
+
+        lea     rbp,[4+rbp]
+        add     ebx,r14d
+        mov     r12d,DWORD[28+rsi]
+        mov     r13d,r9d
+        mov     r14d,ebx
+        bswap   r12d
+        ror     r13d,14
+        mov     edi,r10d
+
+        xor     r13d,r9d
+        ror     r14d,9
+        xor     edi,r11d
+
+        mov     DWORD[28+rsp],r12d
+        xor     r14d,ebx
+        and     edi,r9d
+
+        ror     r13d,5
+        add     r12d,eax
+        xor     edi,r11d
+
+        ror     r14d,11
+        xor     r13d,r9d
+        add     r12d,edi
+
+        mov     edi,ebx
+        add     r12d,DWORD[rbp]
+        xor     r14d,ebx
+
+        xor     edi,ecx
+        ror     r13d,6
+        mov     eax,ecx
+
+        and     r15d,edi
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     eax,r15d
+        add     r8d,r12d
+        add     eax,r12d
+
+        lea     rbp,[20+rbp]
+        add     eax,r14d
+        mov     r12d,DWORD[32+rsi]
+        mov     r13d,r8d
+        mov     r14d,eax
+        bswap   r12d
+        ror     r13d,14
+        mov     r15d,r9d
+
+        xor     r13d,r8d
+        ror     r14d,9
+        xor     r15d,r10d
+
+        mov     DWORD[32+rsp],r12d
+        xor     r14d,eax
+        and     r15d,r8d
+
+        ror     r13d,5
+        add     r12d,r11d
+        xor     r15d,r10d
+
+        ror     r14d,11
+        xor     r13d,r8d
+        add     r12d,r15d
+
+        mov     r15d,eax
+        add     r12d,DWORD[rbp]
+        xor     r14d,eax
+
+        xor     r15d,ebx
+        ror     r13d,6
+        mov     r11d,ebx
+
+        and     edi,r15d
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     r11d,edi
+        add     edx,r12d
+        add     r11d,r12d
+
+        lea     rbp,[4+rbp]
+        add     r11d,r14d
+        mov     r12d,DWORD[36+rsi]
+        mov     r13d,edx
+        mov     r14d,r11d
+        bswap   r12d
+        ror     r13d,14
+        mov     edi,r8d
+
+        xor     r13d,edx
+        ror     r14d,9
+        xor     edi,r9d
+
+        mov     DWORD[36+rsp],r12d
+        xor     r14d,r11d
+        and     edi,edx
+
+        ror     r13d,5
+        add     r12d,r10d
+        xor     edi,r9d
+
+        ror     r14d,11
+        xor     r13d,edx
+        add     r12d,edi
+
+        mov     edi,r11d
+        add     r12d,DWORD[rbp]
+        xor     r14d,r11d
+
+        xor     edi,eax
+        ror     r13d,6
+        mov     r10d,eax
+
+        and     r15d,edi
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     r10d,r15d
+        add     ecx,r12d
+        add     r10d,r12d
+
+        lea     rbp,[4+rbp]
+        add     r10d,r14d
+        mov     r12d,DWORD[40+rsi]
+        mov     r13d,ecx
+        mov     r14d,r10d
+        bswap   r12d
+        ror     r13d,14
+        mov     r15d,edx
+
+        xor     r13d,ecx
+        ror     r14d,9
+        xor     r15d,r8d
+
+        mov     DWORD[40+rsp],r12d
+        xor     r14d,r10d
+        and     r15d,ecx
+
+        ror     r13d,5
+        add     r12d,r9d
+        xor     r15d,r8d
+
+        ror     r14d,11
+        xor     r13d,ecx
+        add     r12d,r15d
+
+        mov     r15d,r10d
+        add     r12d,DWORD[rbp]
+        xor     r14d,r10d
+
+        xor     r15d,r11d
+        ror     r13d,6
+        mov     r9d,r11d
+
+        and     edi,r15d
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     r9d,edi
+        add     ebx,r12d
+        add     r9d,r12d
+
+        lea     rbp,[4+rbp]
+        add     r9d,r14d
+        mov     r12d,DWORD[44+rsi]
+        mov     r13d,ebx
+        mov     r14d,r9d
+        bswap   r12d
+        ror     r13d,14
+        mov     edi,ecx
+
+        xor     r13d,ebx
+        ror     r14d,9
+        xor     edi,edx
+
+        mov     DWORD[44+rsp],r12d
+        xor     r14d,r9d
+        and     edi,ebx
+
+        ror     r13d,5
+        add     r12d,r8d
+        xor     edi,edx
+
+        ror     r14d,11
+        xor     r13d,ebx
+        add     r12d,edi
+
+        mov     edi,r9d
+        add     r12d,DWORD[rbp]
+        xor     r14d,r9d
+
+        xor     edi,r10d
+        ror     r13d,6
+        mov     r8d,r10d
+
+        and     r15d,edi
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     r8d,r15d
+        add     eax,r12d
+        add     r8d,r12d
+
+        lea     rbp,[20+rbp]
+        add     r8d,r14d
+        mov     r12d,DWORD[48+rsi]
+        mov     r13d,eax
+        mov     r14d,r8d
+        bswap   r12d
+        ror     r13d,14
+        mov     r15d,ebx
+
+        xor     r13d,eax
+        ror     r14d,9
+        xor     r15d,ecx
+
+        mov     DWORD[48+rsp],r12d
+        xor     r14d,r8d
+        and     r15d,eax
+
+        ror     r13d,5
+        add     r12d,edx
+        xor     r15d,ecx
+
+        ror     r14d,11
+        xor     r13d,eax
+        add     r12d,r15d
+
+        mov     r15d,r8d
+        add     r12d,DWORD[rbp]
+        xor     r14d,r8d
+
+        xor     r15d,r9d
+        ror     r13d,6
+        mov     edx,r9d
+
+        and     edi,r15d
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     edx,edi
+        add     r11d,r12d
+        add     edx,r12d
+
+        lea     rbp,[4+rbp]
+        add     edx,r14d
+        mov     r12d,DWORD[52+rsi]
+        mov     r13d,r11d
+        mov     r14d,edx
+        bswap   r12d
+        ror     r13d,14
+        mov     edi,eax
+
+        xor     r13d,r11d
+        ror     r14d,9
+        xor     edi,ebx
+
+        mov     DWORD[52+rsp],r12d
+        xor     r14d,edx
+        and     edi,r11d
+
+        ror     r13d,5
+        add     r12d,ecx
+        xor     edi,ebx
+
+        ror     r14d,11
+        xor     r13d,r11d
+        add     r12d,edi
+
+        mov     edi,edx
+        add     r12d,DWORD[rbp]
+        xor     r14d,edx
+
+        xor     edi,r8d
+        ror     r13d,6
+        mov     ecx,r8d
+
+        and     r15d,edi
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     ecx,r15d
+        add     r10d,r12d
+        add     ecx,r12d
+
+        lea     rbp,[4+rbp]
+        add     ecx,r14d
+        mov     r12d,DWORD[56+rsi]
+        mov     r13d,r10d
+        mov     r14d,ecx
+        bswap   r12d
+        ror     r13d,14
+        mov     r15d,r11d
+
+        xor     r13d,r10d
+        ror     r14d,9
+        xor     r15d,eax
+
+        mov     DWORD[56+rsp],r12d
+        xor     r14d,ecx
+        and     r15d,r10d
+
+        ror     r13d,5
+        add     r12d,ebx
+        xor     r15d,eax
+
+        ror     r14d,11
+        xor     r13d,r10d
+        add     r12d,r15d
+
+        mov     r15d,ecx
+        add     r12d,DWORD[rbp]
+        xor     r14d,ecx
+
+        xor     r15d,edx
+        ror     r13d,6
+        mov     ebx,edx
+
+        and     edi,r15d
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     ebx,edi
+        add     r9d,r12d
+        add     ebx,r12d
+
+        lea     rbp,[4+rbp]
+        add     ebx,r14d
+        mov     r12d,DWORD[60+rsi]
+        mov     r13d,r9d
+        mov     r14d,ebx
+        bswap   r12d
+        ror     r13d,14
+        mov     edi,r10d
+
+        xor     r13d,r9d
+        ror     r14d,9
+        xor     edi,r11d
+
+        mov     DWORD[60+rsp],r12d
+        xor     r14d,ebx
+        and     edi,r9d
+
+        ror     r13d,5
+        add     r12d,eax
+        xor     edi,r11d
+
+        ror     r14d,11
+        xor     r13d,r9d
+        add     r12d,edi
+
+        mov     edi,ebx
+        add     r12d,DWORD[rbp]
+        xor     r14d,ebx
+
+        xor     edi,ecx
+        ror     r13d,6
+        mov     eax,ecx
+
+        and     r15d,edi
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     eax,r15d
+        add     r8d,r12d
+        add     eax,r12d
+
+        lea     rbp,[20+rbp]
+        jmp     NEAR $L$rounds_16_xx
+ALIGN   16
+$L$rounds_16_xx:
+        mov     r13d,DWORD[4+rsp]
+        mov     r15d,DWORD[56+rsp]
+
+        mov     r12d,r13d
+        ror     r13d,11
+        add     eax,r14d
+        mov     r14d,r15d
+        ror     r15d,2
+
+        xor     r13d,r12d
+        shr     r12d,3
+        ror     r13d,7
+        xor     r15d,r14d
+        shr     r14d,10
+
+        ror     r15d,17
+        xor     r12d,r13d
+        xor     r15d,r14d
+        add     r12d,DWORD[36+rsp]
+
+        add     r12d,DWORD[rsp]
+        mov     r13d,r8d
+        add     r12d,r15d
+        mov     r14d,eax
+        ror     r13d,14
+        mov     r15d,r9d
+
+        xor     r13d,r8d
+        ror     r14d,9
+        xor     r15d,r10d
+
+        mov     DWORD[rsp],r12d
+        xor     r14d,eax
+        and     r15d,r8d
+
+        ror     r13d,5
+        add     r12d,r11d
+        xor     r15d,r10d
+
+        ror     r14d,11
+        xor     r13d,r8d
+        add     r12d,r15d
+
+        mov     r15d,eax
+        add     r12d,DWORD[rbp]
+        xor     r14d,eax
+
+        xor     r15d,ebx
+        ror     r13d,6
+        mov     r11d,ebx
+
+        and     edi,r15d
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     r11d,edi
+        add     edx,r12d
+        add     r11d,r12d
+
+        lea     rbp,[4+rbp]
+        mov     r13d,DWORD[8+rsp]
+        mov     edi,DWORD[60+rsp]
+
+        mov     r12d,r13d
+        ror     r13d,11
+        add     r11d,r14d
+        mov     r14d,edi
+        ror     edi,2
+
+        xor     r13d,r12d
+        shr     r12d,3
+        ror     r13d,7
+        xor     edi,r14d
+        shr     r14d,10
+
+        ror     edi,17
+        xor     r12d,r13d
+        xor     edi,r14d
+        add     r12d,DWORD[40+rsp]
+
+        add     r12d,DWORD[4+rsp]
+        mov     r13d,edx
+        add     r12d,edi
+        mov     r14d,r11d
+        ror     r13d,14
+        mov     edi,r8d
+
+        xor     r13d,edx
+        ror     r14d,9
+        xor     edi,r9d
+
+        mov     DWORD[4+rsp],r12d
+        xor     r14d,r11d
+        and     edi,edx
+
+        ror     r13d,5
+        add     r12d,r10d
+        xor     edi,r9d
+
+        ror     r14d,11
+        xor     r13d,edx
+        add     r12d,edi
+
+        mov     edi,r11d
+        add     r12d,DWORD[rbp]
+        xor     r14d,r11d
+
+        xor     edi,eax
+        ror     r13d,6
+        mov     r10d,eax
+
+        and     r15d,edi
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     r10d,r15d
+        add     ecx,r12d
+        add     r10d,r12d
+
+        lea     rbp,[4+rbp]
+        mov     r13d,DWORD[12+rsp]
+        mov     r15d,DWORD[rsp]
+
+        mov     r12d,r13d
+        ror     r13d,11
+        add     r10d,r14d
+        mov     r14d,r15d
+        ror     r15d,2
+
+        xor     r13d,r12d
+        shr     r12d,3
+        ror     r13d,7
+        xor     r15d,r14d
+        shr     r14d,10
+
+        ror     r15d,17
+        xor     r12d,r13d
+        xor     r15d,r14d
+        add     r12d,DWORD[44+rsp]
+
+        add     r12d,DWORD[8+rsp]
+        mov     r13d,ecx
+        add     r12d,r15d
+        mov     r14d,r10d
+        ror     r13d,14
+        mov     r15d,edx
+
+        xor     r13d,ecx
+        ror     r14d,9
+        xor     r15d,r8d
+
+        mov     DWORD[8+rsp],r12d
+        xor     r14d,r10d
+        and     r15d,ecx
+
+        ror     r13d,5
+        add     r12d,r9d
+        xor     r15d,r8d
+
+        ror     r14d,11
+        xor     r13d,ecx
+        add     r12d,r15d
+
+        mov     r15d,r10d
+        add     r12d,DWORD[rbp]
+        xor     r14d,r10d
+
+        xor     r15d,r11d
+        ror     r13d,6
+        mov     r9d,r11d
+
+        and     edi,r15d
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     r9d,edi
+        add     ebx,r12d
+        add     r9d,r12d
+
+        lea     rbp,[4+rbp]
+        mov     r13d,DWORD[16+rsp]
+        mov     edi,DWORD[4+rsp]
+
+        mov     r12d,r13d
+        ror     r13d,11
+        add     r9d,r14d
+        mov     r14d,edi
+        ror     edi,2
+
+        xor     r13d,r12d
+        shr     r12d,3
+        ror     r13d,7
+        xor     edi,r14d
+        shr     r14d,10
+
+        ror     edi,17
+        xor     r12d,r13d
+        xor     edi,r14d
+        add     r12d,DWORD[48+rsp]
+
+        add     r12d,DWORD[12+rsp]
+        mov     r13d,ebx
+        add     r12d,edi
+        mov     r14d,r9d
+        ror     r13d,14
+        mov     edi,ecx
+
+        xor     r13d,ebx
+        ror     r14d,9
+        xor     edi,edx
+
+        mov     DWORD[12+rsp],r12d
+        xor     r14d,r9d
+        and     edi,ebx
+
+        ror     r13d,5
+        add     r12d,r8d
+        xor     edi,edx
+
+        ror     r14d,11
+        xor     r13d,ebx
+        add     r12d,edi
+
+        mov     edi,r9d
+        add     r12d,DWORD[rbp]
+        xor     r14d,r9d
+
+        xor     edi,r10d
+        ror     r13d,6
+        mov     r8d,r10d
+
+        and     r15d,edi
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     r8d,r15d
+        add     eax,r12d
+        add     r8d,r12d
+
+        lea     rbp,[20+rbp]
+        mov     r13d,DWORD[20+rsp]
+        mov     r15d,DWORD[8+rsp]
+
+        mov     r12d,r13d
+        ror     r13d,11
+        add     r8d,r14d
+        mov     r14d,r15d
+        ror     r15d,2
+
+        xor     r13d,r12d
+        shr     r12d,3
+        ror     r13d,7
+        xor     r15d,r14d
+        shr     r14d,10
+
+        ror     r15d,17
+        xor     r12d,r13d
+        xor     r15d,r14d
+        add     r12d,DWORD[52+rsp]
+
+        add     r12d,DWORD[16+rsp]
+        mov     r13d,eax
+        add     r12d,r15d
+        mov     r14d,r8d
+        ror     r13d,14
+        mov     r15d,ebx
+
+        xor     r13d,eax
+        ror     r14d,9
+        xor     r15d,ecx
+
+        mov     DWORD[16+rsp],r12d
+        xor     r14d,r8d
+        and     r15d,eax
+
+        ror     r13d,5
+        add     r12d,edx
+        xor     r15d,ecx
+
+        ror     r14d,11
+        xor     r13d,eax
+        add     r12d,r15d
+
+        mov     r15d,r8d
+        add     r12d,DWORD[rbp]
+        xor     r14d,r8d
+
+        xor     r15d,r9d
+        ror     r13d,6
+        mov     edx,r9d
+
+        and     edi,r15d
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     edx,edi
+        add     r11d,r12d
+        add     edx,r12d
+
+        lea     rbp,[4+rbp]
+        mov     r13d,DWORD[24+rsp]
+        mov     edi,DWORD[12+rsp]
+
+        mov     r12d,r13d
+        ror     r13d,11
+        add     edx,r14d
+        mov     r14d,edi
+        ror     edi,2
+
+        xor     r13d,r12d
+        shr     r12d,3
+        ror     r13d,7
+        xor     edi,r14d
+        shr     r14d,10
+
+        ror     edi,17
+        xor     r12d,r13d
+        xor     edi,r14d
+        add     r12d,DWORD[56+rsp]
+
+        add     r12d,DWORD[20+rsp]
+        mov     r13d,r11d
+        add     r12d,edi
+        mov     r14d,edx
+        ror     r13d,14
+        mov     edi,eax
+
+        xor     r13d,r11d
+        ror     r14d,9
+        xor     edi,ebx
+
+        mov     DWORD[20+rsp],r12d
+        xor     r14d,edx
+        and     edi,r11d
+
+        ror     r13d,5
+        add     r12d,ecx
+        xor     edi,ebx
+
+        ror     r14d,11
+        xor     r13d,r11d
+        add     r12d,edi
+
+        mov     edi,edx
+        add     r12d,DWORD[rbp]
+        xor     r14d,edx
+
+        xor     edi,r8d
+        ror     r13d,6
+        mov     ecx,r8d
+
+        and     r15d,edi
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     ecx,r15d
+        add     r10d,r12d
+        add     ecx,r12d
+
+        lea     rbp,[4+rbp]
+        mov     r13d,DWORD[28+rsp]
+        mov     r15d,DWORD[16+rsp]
+
+        mov     r12d,r13d
+        ror     r13d,11
+        add     ecx,r14d
+        mov     r14d,r15d
+        ror     r15d,2
+
+        xor     r13d,r12d
+        shr     r12d,3
+        ror     r13d,7
+        xor     r15d,r14d
+        shr     r14d,10
+
+        ror     r15d,17
+        xor     r12d,r13d
+        xor     r15d,r14d
+        add     r12d,DWORD[60+rsp]
+
+        add     r12d,DWORD[24+rsp]
+        mov     r13d,r10d
+        add     r12d,r15d
+        mov     r14d,ecx
+        ror     r13d,14
+        mov     r15d,r11d
+
+        xor     r13d,r10d
+        ror     r14d,9
+        xor     r15d,eax
+
+        mov     DWORD[24+rsp],r12d
+        xor     r14d,ecx
+        and     r15d,r10d
+
+        ror     r13d,5
+        add     r12d,ebx
+        xor     r15d,eax
+
+        ror     r14d,11
+        xor     r13d,r10d
+        add     r12d,r15d
+
+        mov     r15d,ecx
+        add     r12d,DWORD[rbp]
+        xor     r14d,ecx
+
+        xor     r15d,edx
+        ror     r13d,6
+        mov     ebx,edx
+
+        and     edi,r15d
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     ebx,edi
+        add     r9d,r12d
+        add     ebx,r12d
+
+        lea     rbp,[4+rbp]
+        mov     r13d,DWORD[32+rsp]
+        mov     edi,DWORD[20+rsp]
+
+        mov     r12d,r13d
+        ror     r13d,11
+        add     ebx,r14d
+        mov     r14d,edi
+        ror     edi,2
+
+        xor     r13d,r12d
+        shr     r12d,3
+        ror     r13d,7
+        xor     edi,r14d
+        shr     r14d,10
+
+        ror     edi,17
+        xor     r12d,r13d
+        xor     edi,r14d
+        add     r12d,DWORD[rsp]
+
+        add     r12d,DWORD[28+rsp]
+        mov     r13d,r9d
+        add     r12d,edi
+        mov     r14d,ebx
+        ror     r13d,14
+        mov     edi,r10d
+
+        xor     r13d,r9d
+        ror     r14d,9
+        xor     edi,r11d
+
+        mov     DWORD[28+rsp],r12d
+        xor     r14d,ebx
+        and     edi,r9d
+
+        ror     r13d,5
+        add     r12d,eax
+        xor     edi,r11d
+
+        ror     r14d,11
+        xor     r13d,r9d
+        add     r12d,edi
+
+        mov     edi,ebx
+        add     r12d,DWORD[rbp]
+        xor     r14d,ebx
+
+        xor     edi,ecx
+        ror     r13d,6
+        mov     eax,ecx
+
+        and     r15d,edi
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     eax,r15d
+        add     r8d,r12d
+        add     eax,r12d
+
+        lea     rbp,[20+rbp]
+        mov     r13d,DWORD[36+rsp]
+        mov     r15d,DWORD[24+rsp]
+
+        mov     r12d,r13d
+        ror     r13d,11
+        add     eax,r14d
+        mov     r14d,r15d
+        ror     r15d,2
+
+        xor     r13d,r12d
+        shr     r12d,3
+        ror     r13d,7
+        xor     r15d,r14d
+        shr     r14d,10
+
+        ror     r15d,17
+        xor     r12d,r13d
+        xor     r15d,r14d
+        add     r12d,DWORD[4+rsp]
+
+        add     r12d,DWORD[32+rsp]
+        mov     r13d,r8d
+        add     r12d,r15d
+        mov     r14d,eax
+        ror     r13d,14
+        mov     r15d,r9d
+
+        xor     r13d,r8d
+        ror     r14d,9
+        xor     r15d,r10d
+
+        mov     DWORD[32+rsp],r12d
+        xor     r14d,eax
+        and     r15d,r8d
+
+        ror     r13d,5
+        add     r12d,r11d
+        xor     r15d,r10d
+
+        ror     r14d,11
+        xor     r13d,r8d
+        add     r12d,r15d
+
+        mov     r15d,eax
+        add     r12d,DWORD[rbp]
+        xor     r14d,eax
+
+        xor     r15d,ebx
+        ror     r13d,6
+        mov     r11d,ebx
+
+        and     edi,r15d
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     r11d,edi
+        add     edx,r12d
+        add     r11d,r12d
+
+        lea     rbp,[4+rbp]
+        mov     r13d,DWORD[40+rsp]
+        mov     edi,DWORD[28+rsp]
+
+        mov     r12d,r13d
+        ror     r13d,11
+        add     r11d,r14d
+        mov     r14d,edi
+        ror     edi,2
+
+        xor     r13d,r12d
+        shr     r12d,3
+        ror     r13d,7
+        xor     edi,r14d
+        shr     r14d,10
+
+        ror     edi,17
+        xor     r12d,r13d
+        xor     edi,r14d
+        add     r12d,DWORD[8+rsp]
+
+        add     r12d,DWORD[36+rsp]
+        mov     r13d,edx
+        add     r12d,edi
+        mov     r14d,r11d
+        ror     r13d,14
+        mov     edi,r8d
+
+        xor     r13d,edx
+        ror     r14d,9
+        xor     edi,r9d
+
+        mov     DWORD[36+rsp],r12d
+        xor     r14d,r11d
+        and     edi,edx
+
+        ror     r13d,5
+        add     r12d,r10d
+        xor     edi,r9d
+
+        ror     r14d,11
+        xor     r13d,edx
+        add     r12d,edi
+
+        mov     edi,r11d
+        add     r12d,DWORD[rbp]
+        xor     r14d,r11d
+
+        xor     edi,eax
+        ror     r13d,6
+        mov     r10d,eax
+
+        and     r15d,edi
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     r10d,r15d
+        add     ecx,r12d
+        add     r10d,r12d
+
+        lea     rbp,[4+rbp]
+        mov     r13d,DWORD[44+rsp]
+        mov     r15d,DWORD[32+rsp]
+
+        mov     r12d,r13d
+        ror     r13d,11
+        add     r10d,r14d
+        mov     r14d,r15d
+        ror     r15d,2
+
+        xor     r13d,r12d
+        shr     r12d,3
+        ror     r13d,7
+        xor     r15d,r14d
+        shr     r14d,10
+
+        ror     r15d,17
+        xor     r12d,r13d
+        xor     r15d,r14d
+        add     r12d,DWORD[12+rsp]
+
+        add     r12d,DWORD[40+rsp]
+        mov     r13d,ecx
+        add     r12d,r15d
+        mov     r14d,r10d
+        ror     r13d,14
+        mov     r15d,edx
+
+        xor     r13d,ecx
+        ror     r14d,9
+        xor     r15d,r8d
+
+        mov     DWORD[40+rsp],r12d
+        xor     r14d,r10d
+        and     r15d,ecx
+
+        ror     r13d,5
+        add     r12d,r9d
+        xor     r15d,r8d
+
+        ror     r14d,11
+        xor     r13d,ecx
+        add     r12d,r15d
+
+        mov     r15d,r10d
+        add     r12d,DWORD[rbp]
+        xor     r14d,r10d
+
+        xor     r15d,r11d
+        ror     r13d,6
+        mov     r9d,r11d
+
+        and     edi,r15d
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     r9d,edi
+        add     ebx,r12d
+        add     r9d,r12d
+
+        lea     rbp,[4+rbp]
+        mov     r13d,DWORD[48+rsp]
+        mov     edi,DWORD[36+rsp]
+
+        mov     r12d,r13d
+        ror     r13d,11
+        add     r9d,r14d
+        mov     r14d,edi
+        ror     edi,2
+
+        xor     r13d,r12d
+        shr     r12d,3
+        ror     r13d,7
+        xor     edi,r14d
+        shr     r14d,10
+
+        ror     edi,17
+        xor     r12d,r13d
+        xor     edi,r14d
+        add     r12d,DWORD[16+rsp]
+
+        add     r12d,DWORD[44+rsp]
+        mov     r13d,ebx
+        add     r12d,edi
+        mov     r14d,r9d
+        ror     r13d,14
+        mov     edi,ecx
+
+        xor     r13d,ebx
+        ror     r14d,9
+        xor     edi,edx
+
+        mov     DWORD[44+rsp],r12d
+        xor     r14d,r9d
+        and     edi,ebx
+
+        ror     r13d,5
+        add     r12d,r8d
+        xor     edi,edx
+
+        ror     r14d,11
+        xor     r13d,ebx
+        add     r12d,edi
+
+        mov     edi,r9d
+        add     r12d,DWORD[rbp]
+        xor     r14d,r9d
+
+        xor     edi,r10d
+        ror     r13d,6
+        mov     r8d,r10d
+
+        and     r15d,edi
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     r8d,r15d
+        add     eax,r12d
+        add     r8d,r12d
+
+        lea     rbp,[20+rbp]
+        mov     r13d,DWORD[52+rsp]
+        mov     r15d,DWORD[40+rsp]
+
+        mov     r12d,r13d
+        ror     r13d,11
+        add     r8d,r14d
+        mov     r14d,r15d
+        ror     r15d,2
+
+        xor     r13d,r12d
+        shr     r12d,3
+        ror     r13d,7
+        xor     r15d,r14d
+        shr     r14d,10
+
+        ror     r15d,17
+        xor     r12d,r13d
+        xor     r15d,r14d
+        add     r12d,DWORD[20+rsp]
+
+        add     r12d,DWORD[48+rsp]
+        mov     r13d,eax
+        add     r12d,r15d
+        mov     r14d,r8d
+        ror     r13d,14
+        mov     r15d,ebx
+
+        xor     r13d,eax
+        ror     r14d,9
+        xor     r15d,ecx
+
+        mov     DWORD[48+rsp],r12d
+        xor     r14d,r8d
+        and     r15d,eax
+
+        ror     r13d,5
+        add     r12d,edx
+        xor     r15d,ecx
+
+        ror     r14d,11
+        xor     r13d,eax
+        add     r12d,r15d
+
+        mov     r15d,r8d
+        add     r12d,DWORD[rbp]
+        xor     r14d,r8d
+
+        xor     r15d,r9d
+        ror     r13d,6
+        mov     edx,r9d
+
+        and     edi,r15d
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     edx,edi
+        add     r11d,r12d
+        add     edx,r12d
+
+        lea     rbp,[4+rbp]
+        mov     r13d,DWORD[56+rsp]
+        mov     edi,DWORD[44+rsp]
+
+        mov     r12d,r13d
+        ror     r13d,11
+        add     edx,r14d
+        mov     r14d,edi
+        ror     edi,2
+
+        xor     r13d,r12d
+        shr     r12d,3
+        ror     r13d,7
+        xor     edi,r14d
+        shr     r14d,10
+
+        ror     edi,17
+        xor     r12d,r13d
+        xor     edi,r14d
+        add     r12d,DWORD[24+rsp]
+
+        add     r12d,DWORD[52+rsp]
+        mov     r13d,r11d
+        add     r12d,edi
+        mov     r14d,edx
+        ror     r13d,14
+        mov     edi,eax
+
+        xor     r13d,r11d
+        ror     r14d,9
+        xor     edi,ebx
+
+        mov     DWORD[52+rsp],r12d
+        xor     r14d,edx
+        and     edi,r11d
+
+        ror     r13d,5
+        add     r12d,ecx
+        xor     edi,ebx
+
+        ror     r14d,11
+        xor     r13d,r11d
+        add     r12d,edi
+
+        mov     edi,edx
+        add     r12d,DWORD[rbp]
+        xor     r14d,edx
+
+        xor     edi,r8d
+        ror     r13d,6
+        mov     ecx,r8d
+
+        and     r15d,edi
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     ecx,r15d
+        add     r10d,r12d
+        add     ecx,r12d
+
+        lea     rbp,[4+rbp]
+        mov     r13d,DWORD[60+rsp]
+        mov     r15d,DWORD[48+rsp]
+
+        mov     r12d,r13d
+        ror     r13d,11
+        add     ecx,r14d
+        mov     r14d,r15d
+        ror     r15d,2
+
+        xor     r13d,r12d
+        shr     r12d,3
+        ror     r13d,7
+        xor     r15d,r14d
+        shr     r14d,10
+
+        ror     r15d,17
+        xor     r12d,r13d
+        xor     r15d,r14d
+        add     r12d,DWORD[28+rsp]
+
+        add     r12d,DWORD[56+rsp]
+        mov     r13d,r10d
+        add     r12d,r15d
+        mov     r14d,ecx
+        ror     r13d,14
+        mov     r15d,r11d
+
+        xor     r13d,r10d
+        ror     r14d,9
+        xor     r15d,eax
+
+        mov     DWORD[56+rsp],r12d
+        xor     r14d,ecx
+        and     r15d,r10d
+
+        ror     r13d,5
+        add     r12d,ebx
+        xor     r15d,eax
+
+        ror     r14d,11
+        xor     r13d,r10d
+        add     r12d,r15d
+
+        mov     r15d,ecx
+        add     r12d,DWORD[rbp]
+        xor     r14d,ecx
+
+        xor     r15d,edx
+        ror     r13d,6
+        mov     ebx,edx
+
+        and     edi,r15d
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     ebx,edi
+        add     r9d,r12d
+        add     ebx,r12d
+
+        lea     rbp,[4+rbp]
+        mov     r13d,DWORD[rsp]
+        mov     edi,DWORD[52+rsp]
+
+        mov     r12d,r13d
+        ror     r13d,11
+        add     ebx,r14d
+        mov     r14d,edi
+        ror     edi,2
+
+        xor     r13d,r12d
+        shr     r12d,3
+        ror     r13d,7
+        xor     edi,r14d
+        shr     r14d,10
+
+        ror     edi,17
+        xor     r12d,r13d
+        xor     edi,r14d
+        add     r12d,DWORD[32+rsp]
+
+        add     r12d,DWORD[60+rsp]
+        mov     r13d,r9d
+        add     r12d,edi
+        mov     r14d,ebx
+        ror     r13d,14
+        mov     edi,r10d
+
+        xor     r13d,r9d
+        ror     r14d,9
+        xor     edi,r11d
+
+        mov     DWORD[60+rsp],r12d
+        xor     r14d,ebx
+        and     edi,r9d
+
+        ror     r13d,5
+        add     r12d,eax
+        xor     edi,r11d
+
+        ror     r14d,11
+        xor     r13d,r9d
+        add     r12d,edi
+
+        mov     edi,ebx
+        add     r12d,DWORD[rbp]
+        xor     r14d,ebx
+
+        xor     edi,ecx
+        ror     r13d,6
+        mov     eax,ecx
+
+        and     r15d,edi
+        ror     r14d,2
+        add     r12d,r13d
+
+        xor     eax,r15d
+        add     r8d,r12d
+        add     eax,r12d
+
+        lea     rbp,[20+rbp]
+        cmp     BYTE[3+rbp],0
+        jnz     NEAR $L$rounds_16_xx
+
+        mov     rdi,QWORD[((64+0))+rsp]
+        add     eax,r14d
+        lea     rsi,[64+rsi]
+
+        add     eax,DWORD[rdi]
+        add     ebx,DWORD[4+rdi]
+        add     ecx,DWORD[8+rdi]
+        add     edx,DWORD[12+rdi]
+        add     r8d,DWORD[16+rdi]
+        add     r9d,DWORD[20+rdi]
+        add     r10d,DWORD[24+rdi]
+        add     r11d,DWORD[28+rdi]
+
+        cmp     rsi,QWORD[((64+16))+rsp]
+
+        mov     DWORD[rdi],eax
+        mov     DWORD[4+rdi],ebx
+        mov     DWORD[8+rdi],ecx
+        mov     DWORD[12+rdi],edx
+        mov     DWORD[16+rdi],r8d
+        mov     DWORD[20+rdi],r9d
+        mov     DWORD[24+rdi],r10d
+        mov     DWORD[28+rdi],r11d
+        jb      NEAR $L$loop
+
+        mov     rsi,QWORD[88+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$epilogue:
+        mov     rdi,QWORD[8+rsp]        ;WIN64 epilogue
+        mov     rsi,QWORD[16+rsp]
+        DB      0F3h,0C3h               ;repret
+
+$L$SEH_end_sha256_block_data_order:
+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      0x03020100,0x0b0a0908,0xffffffff,0xffffffff
+        DD      0x03020100,0x0b0a0908,0xffffffff,0xffffffff
+        DD      0xffffffff,0xffffffff,0x03020100,0x0b0a0908
+        DD      0xffffffff,0xffffffff,0x03020100,0x0b0a0908
+DB      83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97
+DB      110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54
+DB      52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121
+DB      32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46
+DB      111,114,103,62,0
+
+ALIGN   64
+sha256_block_data_order_shaext:
+        mov     QWORD[8+rsp],rdi        ;WIN64 prologue
+        mov     QWORD[16+rsp],rsi
+        mov     rax,rsp
+$L$SEH_begin_sha256_block_data_order_shaext:
+        mov     rdi,rcx
+        mov     rsi,rdx
+        mov     rdx,r8
+
+
+_shaext_shortcut:
+
+        lea     rsp,[((-88))+rsp]
+        movaps  XMMWORD[(-8-80)+rax],xmm6
+        movaps  XMMWORD[(-8-64)+rax],xmm7
+        movaps  XMMWORD[(-8-48)+rax],xmm8
+        movaps  XMMWORD[(-8-32)+rax],xmm9
+        movaps  XMMWORD[(-8-16)+rax],xmm10
+$L$prologue_shaext:
+        lea     rcx,[((K256+128))]
+        movdqu  xmm1,XMMWORD[rdi]
+        movdqu  xmm2,XMMWORD[16+rdi]
+        movdqa  xmm7,XMMWORD[((512-128))+rcx]
+
+        pshufd  xmm0,xmm1,0x1b
+        pshufd  xmm1,xmm1,0xb1
+        pshufd  xmm2,xmm2,0x1b
+        movdqa  xmm8,xmm7
+DB      102,15,58,15,202,8
+        punpcklqdq      xmm2,xmm0
+        jmp     NEAR $L$oop_shaext
+
+ALIGN   16
+$L$oop_shaext:
+        movdqu  xmm3,XMMWORD[rsi]
+        movdqu  xmm4,XMMWORD[16+rsi]
+        movdqu  xmm5,XMMWORD[32+rsi]
+DB      102,15,56,0,223
+        movdqu  xmm6,XMMWORD[48+rsi]
+
+        movdqa  xmm0,XMMWORD[((0-128))+rcx]
+        paddd   xmm0,xmm3
+DB      102,15,56,0,231
+        movdqa  xmm10,xmm2
+DB      15,56,203,209
+        pshufd  xmm0,xmm0,0x0e
+        nop
+        movdqa  xmm9,xmm1
+DB      15,56,203,202
+
+        movdqa  xmm0,XMMWORD[((32-128))+rcx]
+        paddd   xmm0,xmm4
+DB      102,15,56,0,239
+DB      15,56,203,209
+        pshufd  xmm0,xmm0,0x0e
+        lea     rsi,[64+rsi]
+DB      15,56,204,220
+DB      15,56,203,202
+
+        movdqa  xmm0,XMMWORD[((64-128))+rcx]
+        paddd   xmm0,xmm5
+DB      102,15,56,0,247
+DB      15,56,203,209
+        pshufd  xmm0,xmm0,0x0e
+        movdqa  xmm7,xmm6
+DB      102,15,58,15,253,4
+        nop
+        paddd   xmm3,xmm7
+DB      15,56,204,229
+DB      15,56,203,202
+
+        movdqa  xmm0,XMMWORD[((96-128))+rcx]
+        paddd   xmm0,xmm6
+DB      15,56,205,222
+DB      15,56,203,209
+        pshufd  xmm0,xmm0,0x0e
+        movdqa  xmm7,xmm3
+DB      102,15,58,15,254,4
+        nop
+        paddd   xmm4,xmm7
+DB      15,56,204,238
+DB      15,56,203,202
+        movdqa  xmm0,XMMWORD[((128-128))+rcx]
+        paddd   xmm0,xmm3
+DB      15,56,205,227
+DB      15,56,203,209
+        pshufd  xmm0,xmm0,0x0e
+        movdqa  xmm7,xmm4
+DB      102,15,58,15,251,4
+        nop
+        paddd   xmm5,xmm7
+DB      15,56,204,243
+DB      15,56,203,202
+        movdqa  xmm0,XMMWORD[((160-128))+rcx]
+        paddd   xmm0,xmm4
+DB      15,56,205,236
+DB      15,56,203,209
+        pshufd  xmm0,xmm0,0x0e
+        movdqa  xmm7,xmm5
+DB      102,15,58,15,252,4
+        nop
+        paddd   xmm6,xmm7
+DB      15,56,204,220
+DB      15,56,203,202
+        movdqa  xmm0,XMMWORD[((192-128))+rcx]
+        paddd   xmm0,xmm5
+DB      15,56,205,245
+DB      15,56,203,209
+        pshufd  xmm0,xmm0,0x0e
+        movdqa  xmm7,xmm6
+DB      102,15,58,15,253,4
+        nop
+        paddd   xmm3,xmm7
+DB      15,56,204,229
+DB      15,56,203,202
+        movdqa  xmm0,XMMWORD[((224-128))+rcx]
+        paddd   xmm0,xmm6
+DB      15,56,205,222
+DB      15,56,203,209
+        pshufd  xmm0,xmm0,0x0e
+        movdqa  xmm7,xmm3
+DB      102,15,58,15,254,4
+        nop
+        paddd   xmm4,xmm7
+DB      15,56,204,238
+DB      15,56,203,202
+        movdqa  xmm0,XMMWORD[((256-128))+rcx]
+        paddd   xmm0,xmm3
+DB      15,56,205,227
+DB      15,56,203,209
+        pshufd  xmm0,xmm0,0x0e
+        movdqa  xmm7,xmm4
+DB      102,15,58,15,251,4
+        nop
+        paddd   xmm5,xmm7
+DB      15,56,204,243
+DB      15,56,203,202
+        movdqa  xmm0,XMMWORD[((288-128))+rcx]
+        paddd   xmm0,xmm4
+DB      15,56,205,236
+DB      15,56,203,209
+        pshufd  xmm0,xmm0,0x0e
+        movdqa  xmm7,xmm5
+DB      102,15,58,15,252,4
+        nop
+        paddd   xmm6,xmm7
+DB      15,56,204,220
+DB      15,56,203,202
+        movdqa  xmm0,XMMWORD[((320-128))+rcx]
+        paddd   xmm0,xmm5
+DB      15,56,205,245
+DB      15,56,203,209
+        pshufd  xmm0,xmm0,0x0e
+        movdqa  xmm7,xmm6
+DB      102,15,58,15,253,4
+        nop
+        paddd   xmm3,xmm7
+DB      15,56,204,229
+DB      15,56,203,202
+        movdqa  xmm0,XMMWORD[((352-128))+rcx]
+        paddd   xmm0,xmm6
+DB      15,56,205,222
+DB      15,56,203,209
+        pshufd  xmm0,xmm0,0x0e
+        movdqa  xmm7,xmm3
+DB      102,15,58,15,254,4
+        nop
+        paddd   xmm4,xmm7
+DB      15,56,204,238
+DB      15,56,203,202
+        movdqa  xmm0,XMMWORD[((384-128))+rcx]
+        paddd   xmm0,xmm3
+DB      15,56,205,227
+DB      15,56,203,209
+        pshufd  xmm0,xmm0,0x0e
+        movdqa  xmm7,xmm4
+DB      102,15,58,15,251,4
+        nop
+        paddd   xmm5,xmm7
+DB      15,56,204,243
+DB      15,56,203,202
+        movdqa  xmm0,XMMWORD[((416-128))+rcx]
+        paddd   xmm0,xmm4
+DB      15,56,205,236
+DB      15,56,203,209
+        pshufd  xmm0,xmm0,0x0e
+        movdqa  xmm7,xmm5
+DB      102,15,58,15,252,4
+DB      15,56,203,202
+        paddd   xmm6,xmm7
+
+        movdqa  xmm0,XMMWORD[((448-128))+rcx]
+        paddd   xmm0,xmm5
+DB      15,56,203,209
+        pshufd  xmm0,xmm0,0x0e
+DB      15,56,205,245
+        movdqa  xmm7,xmm8
+DB      15,56,203,202
+
+        movdqa  xmm0,XMMWORD[((480-128))+rcx]
+        paddd   xmm0,xmm6
+        nop
+DB      15,56,203,209
+        pshufd  xmm0,xmm0,0x0e
+        dec     rdx
+        nop
+DB      15,56,203,202
+
+        paddd   xmm2,xmm10
+        paddd   xmm1,xmm9
+        jnz     NEAR $L$oop_shaext
+
+        pshufd  xmm2,xmm2,0xb1
+        pshufd  xmm7,xmm1,0x1b
+        pshufd  xmm1,xmm1,0xb1
+        punpckhqdq      xmm1,xmm2
+DB      102,15,58,15,215,8
+
+        movdqu  XMMWORD[rdi],xmm1
+        movdqu  XMMWORD[16+rdi],xmm2
+        movaps  xmm6,XMMWORD[((-8-80))+rax]
+        movaps  xmm7,XMMWORD[((-8-64))+rax]
+        movaps  xmm8,XMMWORD[((-8-48))+rax]
+        movaps  xmm9,XMMWORD[((-8-32))+rax]
+        movaps  xmm10,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_sha256_block_data_order_shaext:
+
+ALIGN   64
+sha256_block_data_order_ssse3:
+        mov     QWORD[8+rsp],rdi        ;WIN64 prologue
+        mov     QWORD[16+rsp],rsi
+        mov     rax,rsp
+$L$SEH_begin_sha256_block_data_order_ssse3:
+        mov     rdi,rcx
+        mov     rsi,rdx
+        mov     rdx,r8
+
+
+
+$L$ssse3_shortcut:
+        mov     rax,rsp
+
+        push    rbx
+
+        push    rbp
+
+        push    r12
+
+        push    r13
+
+        push    r14
+
+        push    r15
+
+        shl     rdx,4
+        sub     rsp,160
+        lea     rdx,[rdx*4+rsi]
+        and     rsp,-64
+        mov     QWORD[((64+0))+rsp],rdi
+        mov     QWORD[((64+8))+rsp],rsi
+        mov     QWORD[((64+16))+rsp],rdx
+        mov     QWORD[88+rsp],rax
+
+        movaps  XMMWORD[(64+32)+rsp],xmm6
+        movaps  XMMWORD[(64+48)+rsp],xmm7
+        movaps  XMMWORD[(64+64)+rsp],xmm8
+        movaps  XMMWORD[(64+80)+rsp],xmm9
+$L$prologue_ssse3:
+
+        mov     eax,DWORD[rdi]
+        mov     ebx,DWORD[4+rdi]
+        mov     ecx,DWORD[8+rdi]
+        mov     edx,DWORD[12+rdi]
+        mov     r8d,DWORD[16+rdi]
+        mov     r9d,DWORD[20+rdi]
+        mov     r10d,DWORD[24+rdi]
+        mov     r11d,DWORD[28+rdi]
+
+
+        jmp     NEAR $L$loop_ssse3
+ALIGN   16
+$L$loop_ssse3:
+        movdqa  xmm7,XMMWORD[((K256+512))]
+        movdqu  xmm0,XMMWORD[rsi]
+        movdqu  xmm1,XMMWORD[16+rsi]
+        movdqu  xmm2,XMMWORD[32+rsi]
+DB      102,15,56,0,199
+        movdqu  xmm3,XMMWORD[48+rsi]
+        lea     rbp,[K256]
+DB      102,15,56,0,207
+        movdqa  xmm4,XMMWORD[rbp]
+        movdqa  xmm5,XMMWORD[32+rbp]
+DB      102,15,56,0,215
+        paddd   xmm4,xmm0
+        movdqa  xmm6,XMMWORD[64+rbp]
+DB      102,15,56,0,223
+        movdqa  xmm7,XMMWORD[96+rbp]
+        paddd   xmm5,xmm1
+        paddd   xmm6,xmm2
+        paddd   xmm7,xmm3
+        movdqa  XMMWORD[rsp],xmm4
+        mov     r14d,eax
+        movdqa  XMMWORD[16+rsp],xmm5
+        mov     edi,ebx
+        movdqa  XMMWORD[32+rsp],xmm6
+        xor     edi,ecx
+        movdqa  XMMWORD[48+rsp],xmm7
+        mov     r13d,r8d
+        jmp     NEAR $L$ssse3_00_47
+
+ALIGN   16
+$L$ssse3_00_47:
+        sub     rbp,-128
+        ror     r13d,14
+        movdqa  xmm4,xmm1
+        mov     eax,r14d
+        mov     r12d,r9d
+        movdqa  xmm7,xmm3
+        ror     r14d,9
+        xor     r13d,r8d
+        xor     r12d,r10d
+        ror     r13d,5
+        xor     r14d,eax
+DB      102,15,58,15,224,4
+        and     r12d,r8d
+        xor     r13d,r8d
+DB      102,15,58,15,250,4
+        add     r11d,DWORD[rsp]
+        mov     r15d,eax
+        xor     r12d,r10d
+        ror     r14d,11
+        movdqa  xmm5,xmm4
+        xor     r15d,ebx
+        add     r11d,r12d
+        movdqa  xmm6,xmm4
+        ror     r13d,6
+        and     edi,r15d
+        psrld   xmm4,3
+        xor     r14d,eax
+        add     r11d,r13d
+        xor     edi,ebx
+        paddd   xmm0,xmm7
+        ror     r14d,2
+        add     edx,r11d
+        psrld   xmm6,7
+        add     r11d,edi
+        mov     r13d,edx
+        pshufd  xmm7,xmm3,250
+        add     r14d,r11d
+        ror     r13d,14
+        pslld   xmm5,14
+        mov     r11d,r14d
+        mov     r12d,r8d
+        pxor    xmm4,xmm6
+        ror     r14d,9
+        xor     r13d,edx
+        xor     r12d,r9d
+        ror     r13d,5
+        psrld   xmm6,11
+        xor     r14d,r11d
+        pxor    xmm4,xmm5
+        and     r12d,edx
+        xor     r13d,edx
+        pslld   xmm5,11
+        add     r10d,DWORD[4+rsp]
+        mov     edi,r11d
+        pxor    xmm4,xmm6
+        xor     r12d,r9d
+        ror     r14d,11
+        movdqa  xmm6,xmm7
+        xor     edi,eax
+        add     r10d,r12d
+        pxor    xmm4,xmm5
+        ror     r13d,6
+        and     r15d,edi
+        xor     r14d,r11d
+        psrld   xmm7,10
+        add     r10d,r13d
+        xor     r15d,eax
+        paddd   xmm0,xmm4
+        ror     r14d,2
+        add     ecx,r10d
+        psrlq   xmm6,17
+        add     r10d,r15d
+        mov     r13d,ecx
+        add     r14d,r10d
+        pxor    xmm7,xmm6
+        ror     r13d,14
+        mov     r10d,r14d
+        mov     r12d,edx
+        ror     r14d,9
+        psrlq   xmm6,2
+        xor     r13d,ecx
+        xor     r12d,r8d
+        pxor    xmm7,xmm6
+        ror     r13d,5
+        xor     r14d,r10d
+        and     r12d,ecx
+        pshufd  xmm7,xmm7,128
+        xor     r13d,ecx
+        add     r9d,DWORD[8+rsp]
+        mov     r15d,r10d
+        psrldq  xmm7,8
+        xor     r12d,r8d
+        ror     r14d,11
+        xor     r15d,r11d
+        add     r9d,r12d
+        ror     r13d,6
+        paddd   xmm0,xmm7
+        and     edi,r15d
+        xor     r14d,r10d
+        add     r9d,r13d
+        pshufd  xmm7,xmm0,80
+        xor     edi,r11d
+        ror     r14d,2
+        add     ebx,r9d
+        movdqa  xmm6,xmm7
+        add     r9d,edi
+        mov     r13d,ebx
+        psrld   xmm7,10
+        add     r14d,r9d
+        ror     r13d,14
+        psrlq   xmm6,17
+        mov     r9d,r14d
+        mov     r12d,ecx
+        pxor    xmm7,xmm6
+        ror     r14d,9
+        xor     r13d,ebx
+        xor     r12d,edx
+        ror     r13d,5
+        xor     r14d,r9d
+        psrlq   xmm6,2
+        and     r12d,ebx
+        xor     r13d,ebx
+        add     r8d,DWORD[12+rsp]
+        pxor    xmm7,xmm6
+        mov     edi,r9d
+        xor     r12d,edx
+        ror     r14d,11
+        pshufd  xmm7,xmm7,8
+        xor     edi,r10d
+        add     r8d,r12d
+        movdqa  xmm6,XMMWORD[rbp]
+        ror     r13d,6
+        and     r15d,edi
+        pslldq  xmm7,8
+        xor     r14d,r9d
+        add     r8d,r13d
+        xor     r15d,r10d
+        paddd   xmm0,xmm7
+        ror     r14d,2
+        add     eax,r8d
+        add     r8d,r15d
+        paddd   xmm6,xmm0
+        mov     r13d,eax
+        add     r14d,r8d
+        movdqa  XMMWORD[rsp],xmm6
+        ror     r13d,14
+        movdqa  xmm4,xmm2
+        mov     r8d,r14d
+        mov     r12d,ebx
+        movdqa  xmm7,xmm0
+        ror     r14d,9
+        xor     r13d,eax
+        xor     r12d,ecx
+        ror     r13d,5
+        xor     r14d,r8d
+DB      102,15,58,15,225,4
+        and     r12d,eax
+        xor     r13d,eax
+DB      102,15,58,15,251,4
+        add     edx,DWORD[16+rsp]
+        mov     r15d,r8d
+        xor     r12d,ecx
+        ror     r14d,11
+        movdqa  xmm5,xmm4
+        xor     r15d,r9d
+        add     edx,r12d
+        movdqa  xmm6,xmm4
+        ror     r13d,6
+        and     edi,r15d
+        psrld   xmm4,3
+        xor     r14d,r8d
+        add     edx,r13d
+        xor     edi,r9d
+        paddd   xmm1,xmm7
+        ror     r14d,2
+        add     r11d,edx
+        psrld   xmm6,7
+        add     edx,edi
+        mov     r13d,r11d
+        pshufd  xmm7,xmm0,250
+        add     r14d,edx
+        ror     r13d,14
+        pslld   xmm5,14
+        mov     edx,r14d
+        mov     r12d,eax
+        pxor    xmm4,xmm6
+        ror     r14d,9
+        xor     r13d,r11d
+        xor     r12d,ebx
+        ror     r13d,5
+        psrld   xmm6,11
+        xor     r14d,edx
+        pxor    xmm4,xmm5
+        and     r12d,r11d
+        xor     r13d,r11d
+        pslld   xmm5,11
+        add     ecx,DWORD[20+rsp]
+        mov     edi,edx
+        pxor    xmm4,xmm6
+        xor     r12d,ebx
+        ror     r14d,11
+        movdqa  xmm6,xmm7
+        xor     edi,r8d
+        add     ecx,r12d
+        pxor    xmm4,xmm5
+        ror     r13d,6
+        and     r15d,edi
+        xor     r14d,edx
+        psrld   xmm7,10
+        add     ecx,r13d
+        xor     r15d,r8d
+        paddd   xmm1,xmm4
+        ror     r14d,2
+        add     r10d,ecx
+        psrlq   xmm6,17
+        add     ecx,r15d
+        mov     r13d,r10d
+        add     r14d,ecx
+        pxor    xmm7,xmm6
+        ror     r13d,14
+        mov     ecx,r14d
+        mov     r12d,r11d
+        ror     r14d,9
+        psrlq   xmm6,2
+        xor     r13d,r10d
+        xor     r12d,eax
+        pxor    xmm7,xmm6
+        ror     r13d,5
+        xor     r14d,ecx
+        and     r12d,r10d
+        pshufd  xmm7,xmm7,128
+        xor     r13d,r10d
+        add     ebx,DWORD[24+rsp]
+        mov     r15d,ecx
+        psrldq  xmm7,8
+        xor     r12d,eax
+        ror     r14d,11
+        xor     r15d,edx
+        add     ebx,r12d
+        ror     r13d,6
+        paddd   xmm1,xmm7
+        and     edi,r15d
+        xor     r14d,ecx
+        add     ebx,r13d
+        pshufd  xmm7,xmm1,80
+        xor     edi,edx
+        ror     r14d,2
+        add     r9d,ebx
+        movdqa  xmm6,xmm7
+        add     ebx,edi
+        mov     r13d,r9d
+        psrld   xmm7,10
+        add     r14d,ebx
+        ror     r13d,14
+        psrlq   xmm6,17
+        mov     ebx,r14d
+        mov     r12d,r10d
+        pxor    xmm7,xmm6
+        ror     r14d,9
+        xor     r13d,r9d
+        xor     r12d,r11d
+        ror     r13d,5
+        xor     r14d,ebx
+        psrlq   xmm6,2
+        and     r12d,r9d
+        xor     r13d,r9d
+        add     eax,DWORD[28+rsp]
+        pxor    xmm7,xmm6
+        mov     edi,ebx
+        xor     r12d,r11d
+        ror     r14d,11
+        pshufd  xmm7,xmm7,8
+        xor     edi,ecx
+        add     eax,r12d
+        movdqa  xmm6,XMMWORD[32+rbp]
+        ror     r13d,6
+        and     r15d,edi
+        pslldq  xmm7,8
+        xor     r14d,ebx
+        add     eax,r13d
+        xor     r15d,ecx
+        paddd   xmm1,xmm7
+        ror     r14d,2
+        add     r8d,eax
+        add     eax,r15d
+        paddd   xmm6,xmm1
+        mov     r13d,r8d
+        add     r14d,eax
+        movdqa  XMMWORD[16+rsp],xmm6
+        ror     r13d,14
+        movdqa  xmm4,xmm3
+        mov     eax,r14d
+        mov     r12d,r9d
+        movdqa  xmm7,xmm1
+        ror     r14d,9
+        xor     r13d,r8d
+        xor     r12d,r10d
+        ror     r13d,5
+        xor     r14d,eax
+DB      102,15,58,15,226,4
+        and     r12d,r8d
+        xor     r13d,r8d
+DB      102,15,58,15,248,4
+        add     r11d,DWORD[32+rsp]
+        mov     r15d,eax
+        xor     r12d,r10d
+        ror     r14d,11
+        movdqa  xmm5,xmm4
+        xor     r15d,ebx
+        add     r11d,r12d
+        movdqa  xmm6,xmm4
+        ror     r13d,6
+        and     edi,r15d
+        psrld   xmm4,3
+        xor     r14d,eax
+        add     r11d,r13d
+        xor     edi,ebx
+        paddd   xmm2,xmm7
+        ror     r14d,2
+        add     edx,r11d
+        psrld   xmm6,7
+        add     r11d,edi
+        mov     r13d,edx
+        pshufd  xmm7,xmm1,250
+        add     r14d,r11d
+        ror     r13d,14
+        pslld   xmm5,14
+        mov     r11d,r14d
+        mov     r12d,r8d
+        pxor    xmm4,xmm6
+        ror     r14d,9
+        xor     r13d,edx
+        xor     r12d,r9d
+        ror     r13d,5
+        psrld   xmm6,11
+        xor     r14d,r11d
+        pxor    xmm4,xmm5
+        and     r12d,edx
+        xor     r13d,edx
+        pslld   xmm5,11
+        add     r10d,DWORD[36+rsp]
+        mov     edi,r11d
+        pxor    xmm4,xmm6
+        xor     r12d,r9d
+        ror     r14d,11
+        movdqa  xmm6,xmm7
+        xor     edi,eax
+        add     r10d,r12d
+        pxor    xmm4,xmm5
+        ror     r13d,6
+        and     r15d,edi
+        xor     r14d,r11d
+        psrld   xmm7,10
+        add     r10d,r13d
+        xor     r15d,eax
+        paddd   xmm2,xmm4
+        ror     r14d,2
+        add     ecx,r10d
+        psrlq   xmm6,17
+        add     r10d,r15d
+        mov     r13d,ecx
+        add     r14d,r10d
+        pxor    xmm7,xmm6
+        ror     r13d,14
+        mov     r10d,r14d
+        mov     r12d,edx
+        ror     r14d,9
+        psrlq   xmm6,2
+        xor     r13d,ecx
+        xor     r12d,r8d
+        pxor    xmm7,xmm6
+        ror     r13d,5
+        xor     r14d,r10d
+        and     r12d,ecx
+        pshufd  xmm7,xmm7,128
+        xor     r13d,ecx
+        add     r9d,DWORD[40+rsp]
+        mov     r15d,r10d
+        psrldq  xmm7,8
+        xor     r12d,r8d
+        ror     r14d,11
+        xor     r15d,r11d
+        add     r9d,r12d
+        ror     r13d,6
+        paddd   xmm2,xmm7
+        and     edi,r15d
+        xor     r14d,r10d
+        add     r9d,r13d
+        pshufd  xmm7,xmm2,80
+        xor     edi,r11d
+        ror     r14d,2
+        add     ebx,r9d
+        movdqa  xmm6,xmm7
+        add     r9d,edi
+        mov     r13d,ebx
+        psrld   xmm7,10
+        add     r14d,r9d
+        ror     r13d,14
+        psrlq   xmm6,17
+        mov     r9d,r14d
+        mov     r12d,ecx
+        pxor    xmm7,xmm6
+        ror     r14d,9
+        xor     r13d,ebx
+        xor     r12d,edx
+        ror     r13d,5
+        xor     r14d,r9d
+        psrlq   xmm6,2
+        and     r12d,ebx
+        xor     r13d,ebx
+        add     r8d,DWORD[44+rsp]
+        pxor    xmm7,xmm6
+        mov     edi,r9d
+        xor     r12d,edx
+        ror     r14d,11
+        pshufd  xmm7,xmm7,8
+        xor     edi,r10d
+        add     r8d,r12d
+        movdqa  xmm6,XMMWORD[64+rbp]
+        ror     r13d,6
+        and     r15d,edi
+        pslldq  xmm7,8
+        xor     r14d,r9d
+        add     r8d,r13d
+        xor     r15d,r10d
+        paddd   xmm2,xmm7
+        ror     r14d,2
+        add     eax,r8d
+        add     r8d,r15d
+        paddd   xmm6,xmm2
+        mov     r13d,eax
+        add     r14d,r8d
+        movdqa  XMMWORD[32+rsp],xmm6
+        ror     r13d,14
+        movdqa  xmm4,xmm0
+        mov     r8d,r14d
+        mov     r12d,ebx
+        movdqa  xmm7,xmm2
+        ror     r14d,9
+        xor     r13d,eax
+        xor     r12d,ecx
+        ror     r13d,5
+        xor     r14d,r8d
+DB      102,15,58,15,227,4
+        and     r12d,eax
+        xor     r13d,eax
+DB      102,15,58,15,249,4
+        add     edx,DWORD[48+rsp]
+        mov     r15d,r8d
+        xor     r12d,ecx
+        ror     r14d,11
+        movdqa  xmm5,xmm4
+        xor     r15d,r9d
+        add     edx,r12d
+        movdqa  xmm6,xmm4
+        ror     r13d,6
+        and     edi,r15d
+        psrld   xmm4,3
+        xor     r14d,r8d
+        add     edx,r13d
+        xor     edi,r9d
+        paddd   xmm3,xmm7
+        ror     r14d,2
+        add     r11d,edx
+        psrld   xmm6,7
+        add     edx,edi
+        mov     r13d,r11d
+        pshufd  xmm7,xmm2,250
+        add     r14d,edx
+        ror     r13d,14
+        pslld   xmm5,14
+        mov     edx,r14d
+        mov     r12d,eax
+        pxor    xmm4,xmm6
+        ror     r14d,9
+        xor     r13d,r11d
+        xor     r12d,ebx
+        ror     r13d,5
+        psrld   xmm6,11
+        xor     r14d,edx
+        pxor    xmm4,xmm5
+        and     r12d,r11d
+        xor     r13d,r11d
+        pslld   xmm5,11
+        add     ecx,DWORD[52+rsp]
+        mov     edi,edx
+        pxor    xmm4,xmm6
+        xor     r12d,ebx
+        ror     r14d,11
+        movdqa  xmm6,xmm7
+        xor     edi,r8d
+        add     ecx,r12d
+        pxor    xmm4,xmm5
+        ror     r13d,6
+        and     r15d,edi
+        xor     r14d,edx
+        psrld   xmm7,10
+        add     ecx,r13d
+        xor     r15d,r8d
+        paddd   xmm3,xmm4
+        ror     r14d,2
+        add     r10d,ecx
+        psrlq   xmm6,17
+        add     ecx,r15d
+        mov     r13d,r10d
+        add     r14d,ecx
+        pxor    xmm7,xmm6
+        ror     r13d,14
+        mov     ecx,r14d
+        mov     r12d,r11d
+        ror     r14d,9
+        psrlq   xmm6,2
+        xor     r13d,r10d
+        xor     r12d,eax
+        pxor    xmm7,xmm6
+        ror     r13d,5
+        xor     r14d,ecx
+        and     r12d,r10d
+        pshufd  xmm7,xmm7,128
+        xor     r13d,r10d
+        add     ebx,DWORD[56+rsp]
+        mov     r15d,ecx
+        psrldq  xmm7,8
+        xor     r12d,eax
+        ror     r14d,11
+        xor     r15d,edx
+        add     ebx,r12d
+        ror     r13d,6
+        paddd   xmm3,xmm7
+        and     edi,r15d
+        xor     r14d,ecx
+        add     ebx,r13d
+        pshufd  xmm7,xmm3,80
+        xor     edi,edx
+        ror     r14d,2
+        add     r9d,ebx
+        movdqa  xmm6,xmm7
+        add     ebx,edi
+        mov     r13d,r9d
+        psrld   xmm7,10
+        add     r14d,ebx
+        ror     r13d,14
+        psrlq   xmm6,17
+        mov     ebx,r14d
+        mov     r12d,r10d
+        pxor    xmm7,xmm6
+        ror     r14d,9
+        xor     r13d,r9d
+        xor     r12d,r11d
+        ror     r13d,5
+        xor     r14d,ebx
+        psrlq   xmm6,2
+        and     r12d,r9d
+        xor     r13d,r9d
+        add     eax,DWORD[60+rsp]
+        pxor    xmm7,xmm6
+        mov     edi,ebx
+        xor     r12d,r11d
+        ror     r14d,11
+        pshufd  xmm7,xmm7,8
+        xor     edi,ecx
+        add     eax,r12d
+        movdqa  xmm6,XMMWORD[96+rbp]
+        ror     r13d,6
+        and     r15d,edi
+        pslldq  xmm7,8
+        xor     r14d,ebx
+        add     eax,r13d
+        xor     r15d,ecx
+        paddd   xmm3,xmm7
+        ror     r14d,2
+        add     r8d,eax
+        add     eax,r15d
+        paddd   xmm6,xmm3
+        mov     r13d,r8d
+        add     r14d,eax
+        movdqa  XMMWORD[48+rsp],xmm6
+        cmp     BYTE[131+rbp],0
+        jne     NEAR $L$ssse3_00_47
+        ror     r13d,14
+        mov     eax,r14d
+        mov     r12d,r9d
+        ror     r14d,9
+        xor     r13d,r8d
+        xor     r12d,r10d
+        ror     r13d,5
+        xor     r14d,eax
+        and     r12d,r8d
+        xor     r13d,r8d
+        add     r11d,DWORD[rsp]
+        mov     r15d,eax
+        xor     r12d,r10d
+        ror     r14d,11
+        xor     r15d,ebx
+        add     r11d,r12d
+        ror     r13d,6
+        and     edi,r15d
+        xor     r14d,eax
+        add     r11d,r13d
+        xor     edi,ebx
+        ror     r14d,2
+        add     edx,r11d
+        add     r11d,edi
+        mov     r13d,edx
+        add     r14d,r11d
+        ror     r13d,14
+        mov     r11d,r14d
+        mov     r12d,r8d
+        ror     r14d,9
+        xor     r13d,edx
+        xor     r12d,r9d
+        ror     r13d,5
+        xor     r14d,r11d
+        and     r12d,edx
+        xor     r13d,edx
+        add     r10d,DWORD[4+rsp]
+        mov     edi,r11d
+        xor     r12d,r9d
+        ror     r14d,11
+        xor     edi,eax
+        add     r10d,r12d
+        ror     r13d,6
+        and     r15d,edi
+        xor     r14d,r11d
+        add     r10d,r13d
+        xor     r15d,eax
+        ror     r14d,2
+        add     ecx,r10d
+        add     r10d,r15d
+        mov     r13d,ecx
+        add     r14d,r10d
+        ror     r13d,14
+        mov     r10d,r14d
+        mov     r12d,edx
+        ror     r14d,9
+        xor     r13d,ecx
+        xor     r12d,r8d
+        ror     r13d,5
+        xor     r14d,r10d
+        and     r12d,ecx
+        xor     r13d,ecx
+        add     r9d,DWORD[8+rsp]
+        mov     r15d,r10d
+        xor     r12d,r8d
+        ror     r14d,11
+        xor     r15d,r11d
+        add     r9d,r12d
+        ror     r13d,6
+        and     edi,r15d
+        xor     r14d,r10d
+        add     r9d,r13d
+        xor     edi,r11d
+        ror     r14d,2
+        add     ebx,r9d
+        add     r9d,edi
+        mov     r13d,ebx
+        add     r14d,r9d
+        ror     r13d,14
+        mov     r9d,r14d
+        mov     r12d,ecx
+        ror     r14d,9
+        xor     r13d,ebx
+        xor     r12d,edx
+        ror     r13d,5
+        xor     r14d,r9d
+        and     r12d,ebx
+        xor     r13d,ebx
+        add     r8d,DWORD[12+rsp]
+        mov     edi,r9d
+        xor     r12d,edx
+        ror     r14d,11
+        xor     edi,r10d
+        add     r8d,r12d
+        ror     r13d,6
+        and     r15d,edi
+        xor     r14d,r9d
+        add     r8d,r13d
+        xor     r15d,r10d
+        ror     r14d,2
+        add     eax,r8d
+        add     r8d,r15d
+        mov     r13d,eax
+        add     r14d,r8d
+        ror     r13d,14
+        mov     r8d,r14d
+        mov     r12d,ebx
+        ror     r14d,9
+        xor     r13d,eax
+        xor     r12d,ecx
+        ror     r13d,5
+        xor     r14d,r8d
+        and     r12d,eax
+        xor     r13d,eax
+        add     edx,DWORD[16+rsp]
+        mov     r15d,r8d
+        xor     r12d,ecx
+        ror     r14d,11
+        xor     r15d,r9d
+        add     edx,r12d
+        ror     r13d,6
+        and     edi,r15d
+        xor     r14d,r8d
+        add     edx,r13d
+        xor     edi,r9d
+        ror     r14d,2
+        add     r11d,edx
+        add     edx,edi
+        mov     r13d,r11d
+        add     r14d,edx
+        ror     r13d,14
+        mov     edx,r14d
+        mov     r12d,eax
+        ror     r14d,9
+        xor     r13d,r11d
+        xor     r12d,ebx
+        ror     r13d,5
+        xor     r14d,edx
+        and     r12d,r11d
+        xor     r13d,r11d
+        add     ecx,DWORD[20+rsp]
+        mov     edi,edx
+        xor     r12d,ebx
+        ror     r14d,11
+        xor     edi,r8d
+        add     ecx,r12d
+        ror     r13d,6
+        and     r15d,edi
+        xor     r14d,edx
+        add     ecx,r13d
+        xor     r15d,r8d
+        ror     r14d,2
+        add     r10d,ecx
+        add     ecx,r15d
+        mov     r13d,r10d
+        add     r14d,ecx
+        ror     r13d,14
+        mov     ecx,r14d
+        mov     r12d,r11d
+        ror     r14d,9
+        xor     r13d,r10d
+        xor     r12d,eax
+        ror     r13d,5
+        xor     r14d,ecx
+        and     r12d,r10d
+        xor     r13d,r10d
+        add     ebx,DWORD[24+rsp]
+        mov     r15d,ecx
+        xor     r12d,eax
+        ror     r14d,11
+        xor     r15d,edx
+        add     ebx,r12d
+        ror     r13d,6
+        and     edi,r15d
+        xor     r14d,ecx
+        add     ebx,r13d
+        xor     edi,edx
+        ror     r14d,2
+        add     r9d,ebx
+        add     ebx,edi
+        mov     r13d,r9d
+        add     r14d,ebx
+        ror     r13d,14
+        mov     ebx,r14d
+        mov     r12d,r10d
+        ror     r14d,9
+        xor     r13d,r9d
+        xor     r12d,r11d
+        ror     r13d,5
+        xor     r14d,ebx
+        and     r12d,r9d
+        xor     r13d,r9d
+        add     eax,DWORD[28+rsp]
+        mov     edi,ebx
+        xor     r12d,r11d
+        ror     r14d,11
+        xor     edi,ecx
+        add     eax,r12d
+        ror     r13d,6
+        and     r15d,edi
+        xor     r14d,ebx
+        add     eax,r13d
+        xor     r15d,ecx
+        ror     r14d,2
+        add     r8d,eax
+        add     eax,r15d
+        mov     r13d,r8d
+        add     r14d,eax
+        ror     r13d,14
+        mov     eax,r14d
+        mov     r12d,r9d
+        ror     r14d,9
+        xor     r13d,r8d
+        xor     r12d,r10d
+        ror     r13d,5
+        xor     r14d,eax
+        and     r12d,r8d
+        xor     r13d,r8d
+        add     r11d,DWORD[32+rsp]
+        mov     r15d,eax
+        xor     r12d,r10d
+        ror     r14d,11
+        xor     r15d,ebx
+        add     r11d,r12d
+        ror     r13d,6
+        and     edi,r15d
+        xor     r14d,eax
+        add     r11d,r13d
+        xor     edi,ebx
+        ror     r14d,2
+        add     edx,r11d
+        add     r11d,edi
+        mov     r13d,edx
+        add     r14d,r11d
+        ror     r13d,14
+        mov     r11d,r14d
+        mov     r12d,r8d
+        ror     r14d,9
+        xor     r13d,edx
+        xor     r12d,r9d
+        ror     r13d,5
+        xor     r14d,r11d
+        and     r12d,edx
+        xor     r13d,edx
+        add     r10d,DWORD[36+rsp]
+        mov     edi,r11d
+        xor     r12d,r9d
+        ror     r14d,11
+        xor     edi,eax
+        add     r10d,r12d
+        ror     r13d,6
+        and     r15d,edi
+        xor     r14d,r11d
+        add     r10d,r13d
+        xor     r15d,eax
+        ror     r14d,2
+        add     ecx,r10d
+        add     r10d,r15d
+        mov     r13d,ecx
+        add     r14d,r10d
+        ror     r13d,14
+        mov     r10d,r14d
+        mov     r12d,edx
+        ror     r14d,9
+        xor     r13d,ecx
+        xor     r12d,r8d
+        ror     r13d,5
+        xor     r14d,r10d
+        and     r12d,ecx
+        xor     r13d,ecx
+        add     r9d,DWORD[40+rsp]
+        mov     r15d,r10d
+        xor     r12d,r8d
+        ror     r14d,11
+        xor     r15d,r11d
+        add     r9d,r12d
+        ror     r13d,6
+        and     edi,r15d
+        xor     r14d,r10d
+        add     r9d,r13d
+        xor     edi,r11d
+        ror     r14d,2
+        add     ebx,r9d
+        add     r9d,edi
+        mov     r13d,ebx
+        add     r14d,r9d
+        ror     r13d,14
+        mov     r9d,r14d
+        mov     r12d,ecx
+        ror     r14d,9
+        xor     r13d,ebx
+        xor     r12d,edx
+        ror     r13d,5
+        xor     r14d,r9d
+        and     r12d,ebx
+        xor     r13d,ebx
+        add     r8d,DWORD[44+rsp]
+        mov     edi,r9d
+        xor     r12d,edx
+        ror     r14d,11
+        xor     edi,r10d
+        add     r8d,r12d
+        ror     r13d,6
+        and     r15d,edi
+        xor     r14d,r9d
+        add     r8d,r13d
+        xor     r15d,r10d
+        ror     r14d,2
+        add     eax,r8d
+        add     r8d,r15d
+        mov     r13d,eax
+        add     r14d,r8d
+        ror     r13d,14
+        mov     r8d,r14d
+        mov     r12d,ebx
+        ror     r14d,9
+        xor     r13d,eax
+        xor     r12d,ecx
+        ror     r13d,5
+        xor     r14d,r8d
+        and     r12d,eax
+        xor     r13d,eax
+        add     edx,DWORD[48+rsp]
+        mov     r15d,r8d
+        xor     r12d,ecx
+        ror     r14d,11
+        xor     r15d,r9d
+        add     edx,r12d
+        ror     r13d,6
+        and     edi,r15d
+        xor     r14d,r8d
+        add     edx,r13d
+        xor     edi,r9d
+        ror     r14d,2
+        add     r11d,edx
+        add     edx,edi
+        mov     r13d,r11d
+        add     r14d,edx
+        ror     r13d,14
+        mov     edx,r14d
+        mov     r12d,eax
+        ror     r14d,9
+        xor     r13d,r11d
+        xor     r12d,ebx
+        ror     r13d,5
+        xor     r14d,edx
+        and     r12d,r11d
+        xor     r13d,r11d
+        add     ecx,DWORD[52+rsp]
+        mov     edi,edx
+        xor     r12d,ebx
+        ror     r14d,11
+        xor     edi,r8d
+        add     ecx,r12d
+        ror     r13d,6
+        and     r15d,edi
+        xor     r14d,edx
+        add     ecx,r13d
+        xor     r15d,r8d
+        ror     r14d,2
+        add     r10d,ecx
+        add     ecx,r15d
+        mov     r13d,r10d
+        add     r14d,ecx
+        ror     r13d,14
+        mov     ecx,r14d
+        mov     r12d,r11d
+        ror     r14d,9
+        xor     r13d,r10d
+        xor     r12d,eax
+        ror     r13d,5
+        xor     r14d,ecx
+        and     r12d,r10d
+        xor     r13d,r10d
+        add     ebx,DWORD[56+rsp]
+        mov     r15d,ecx
+        xor     r12d,eax
+        ror     r14d,11
+        xor     r15d,edx
+        add     ebx,r12d
+        ror     r13d,6
+        and     edi,r15d
+        xor     r14d,ecx
+        add     ebx,r13d
+        xor     edi,edx
+        ror     r14d,2
+        add     r9d,ebx
+        add     ebx,edi
+        mov     r13d,r9d
+        add     r14d,ebx
+        ror     r13d,14
+        mov     ebx,r14d
+        mov     r12d,r10d
+        ror     r14d,9
+        xor     r13d,r9d
+        xor     r12d,r11d
+        ror     r13d,5
+        xor     r14d,ebx
+        and     r12d,r9d
+        xor     r13d,r9d
+        add     eax,DWORD[60+rsp]
+        mov     edi,ebx
+        xor     r12d,r11d
+        ror     r14d,11
+        xor     edi,ecx
+        add     eax,r12d
+        ror     r13d,6
+        and     r15d,edi
+        xor     r14d,ebx
+        add     eax,r13d
+        xor     r15d,ecx
+        ror     r14d,2
+        add     r8d,eax
+        add     eax,r15d
+        mov     r13d,r8d
+        add     r14d,eax
+        mov     rdi,QWORD[((64+0))+rsp]
+        mov     eax,r14d
+
+        add     eax,DWORD[rdi]
+        lea     rsi,[64+rsi]
+        add     ebx,DWORD[4+rdi]
+        add     ecx,DWORD[8+rdi]
+        add     edx,DWORD[12+rdi]
+        add     r8d,DWORD[16+rdi]
+        add     r9d,DWORD[20+rdi]
+        add     r10d,DWORD[24+rdi]
+        add     r11d,DWORD[28+rdi]
+
+        cmp     rsi,QWORD[((64+16))+rsp]
+
+        mov     DWORD[rdi],eax
+        mov     DWORD[4+rdi],ebx
+        mov     DWORD[8+rdi],ecx
+        mov     DWORD[12+rdi],edx
+        mov     DWORD[16+rdi],r8d
+        mov     DWORD[20+rdi],r9d
+        mov     DWORD[24+rdi],r10d
+        mov     DWORD[28+rdi],r11d
+        jb      NEAR $L$loop_ssse3
+
+        mov     rsi,QWORD[88+rsp]
+
+        movaps  xmm6,XMMWORD[((64+32))+rsp]
+        movaps  xmm7,XMMWORD[((64+48))+rsp]
+        movaps  xmm8,XMMWORD[((64+64))+rsp]
+        movaps  xmm9,XMMWORD[((64+80))+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$epilogue_ssse3:
+        mov     rdi,QWORD[8+rsp]        ;WIN64 epilogue
+        mov     rsi,QWORD[16+rsp]
+        DB      0F3h,0C3h               ;repret
+
+$L$SEH_end_sha256_block_data_order_ssse3:
+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     rsi,rax
+        mov     rax,QWORD[((64+24))+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     r10,[$L$epilogue]
+        cmp     rbx,r10
+        jb      NEAR $L$in_prologue
+
+        lea     rsi,[((64+32))+rsi]
+        lea     rdi,[512+r8]
+        mov     ecx,8
+        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
+
+
+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$in_prologue
+
+        lea     r10,[$L$epilogue_shaext]
+        cmp     rbx,r10
+        jae     NEAR $L$in_prologue
+
+        lea     rsi,[((-8-80))+rax]
+        lea     rdi,[512+r8]
+        mov     ecx,10
+        DD      0xa548f3fc
+
+        jmp     NEAR $L$in_prologue
+
+section .pdata rdata align=4
+ALIGN   4
+        DD      $L$SEH_begin_sha256_block_data_order wrt ..imagebase
+        DD      $L$SEH_end_sha256_block_data_order wrt ..imagebase
+        DD      $L$SEH_info_sha256_block_data_order wrt ..imagebase
+        DD      $L$SEH_begin_sha256_block_data_order_shaext wrt ..imagebase
+        DD      $L$SEH_end_sha256_block_data_order_shaext wrt ..imagebase
+        DD      $L$SEH_info_sha256_block_data_order_shaext wrt ..imagebase
+        DD      $L$SEH_begin_sha256_block_data_order_ssse3 wrt ..imagebase
+        DD      $L$SEH_end_sha256_block_data_order_ssse3 wrt ..imagebase
+        DD      $L$SEH_info_sha256_block_data_order_ssse3 wrt ..imagebase
+section .xdata rdata align=8
+ALIGN   8
+$L$SEH_info_sha256_block_data_order:
+DB      9,0,0,0
+        DD      se_handler wrt ..imagebase
+        DD      $L$prologue wrt ..imagebase,$L$epilogue wrt ..imagebase
+$L$SEH_info_sha256_block_data_order_shaext:
+DB      9,0,0,0
+        DD      shaext_handler wrt ..imagebase
+$L$SEH_info_sha256_block_data_order_ssse3:
+DB      9,0,0,0
+        DD      se_handler wrt ..imagebase
+        DD      $L$prologue_ssse3 wrt ..imagebase,$L$epilogue_ssse3 wrt ..imagebase
diff --git a/CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha512-x86_64.nasm b/CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha512-x86_64.nasm
new file mode 100644
index 0000000000..c6397d4393
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha512-x86_64.nasm
@@ -0,0 +1,1938 @@
+; WARNING: do not edit!
+; Generated from openssl/crypto/sha/asm/sha512-x86_64.pl
+;
+; Copyright 2005-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  sha512_block_data_order
+
+ALIGN   16
+sha512_block_data_order:
+        mov     QWORD[8+rsp],rdi        ;WIN64 prologue
+        mov     QWORD[16+rsp],rsi
+        mov     rax,rsp
+$L$SEH_begin_sha512_block_data_order:
+        mov     rdi,rcx
+        mov     rsi,rdx
+        mov     rdx,r8
+
+
+
+        mov     rax,rsp
+
+        push    rbx
+
+        push    rbp
+
+        push    r12
+
+        push    r13
+
+        push    r14
+
+        push    r15
+
+        shl     rdx,4
+        sub     rsp,16*8+4*8
+        lea     rdx,[rdx*8+rsi]
+        and     rsp,-64
+        mov     QWORD[((128+0))+rsp],rdi
+        mov     QWORD[((128+8))+rsp],rsi
+        mov     QWORD[((128+16))+rsp],rdx
+        mov     QWORD[152+rsp],rax
+
+$L$prologue:
+
+        mov     rax,QWORD[rdi]
+        mov     rbx,QWORD[8+rdi]
+        mov     rcx,QWORD[16+rdi]
+        mov     rdx,QWORD[24+rdi]
+        mov     r8,QWORD[32+rdi]
+        mov     r9,QWORD[40+rdi]
+        mov     r10,QWORD[48+rdi]
+        mov     r11,QWORD[56+rdi]
+        jmp     NEAR $L$loop
+
+ALIGN   16
+$L$loop:
+        mov     rdi,rbx
+        lea     rbp,[K512]
+        xor     rdi,rcx
+        mov     r12,QWORD[rsi]
+        mov     r13,r8
+        mov     r14,rax
+        bswap   r12
+        ror     r13,23
+        mov     r15,r9
+
+        xor     r13,r8
+        ror     r14,5
+        xor     r15,r10
+
+        mov     QWORD[rsp],r12
+        xor     r14,rax
+        and     r15,r8
+
+        ror     r13,4
+        add     r12,r11
+        xor     r15,r10
+
+        ror     r14,6
+        xor     r13,r8
+        add     r12,r15
+
+        mov     r15,rax
+        add     r12,QWORD[rbp]
+        xor     r14,rax
+
+        xor     r15,rbx
+        ror     r13,14
+        mov     r11,rbx
+
+        and     rdi,r15
+        ror     r14,28
+        add     r12,r13
+
+        xor     r11,rdi
+        add     rdx,r12
+        add     r11,r12
+
+        lea     rbp,[8+rbp]
+        add     r11,r14
+        mov     r12,QWORD[8+rsi]
+        mov     r13,rdx
+        mov     r14,r11
+        bswap   r12
+        ror     r13,23
+        mov     rdi,r8
+
+        xor     r13,rdx
+        ror     r14,5
+        xor     rdi,r9
+
+        mov     QWORD[8+rsp],r12
+        xor     r14,r11
+        and     rdi,rdx
+
+        ror     r13,4
+        add     r12,r10
+        xor     rdi,r9
+
+        ror     r14,6
+        xor     r13,rdx
+        add     r12,rdi
+
+        mov     rdi,r11
+        add     r12,QWORD[rbp]
+        xor     r14,r11
+
+        xor     rdi,rax
+        ror     r13,14
+        mov     r10,rax
+
+        and     r15,rdi
+        ror     r14,28
+        add     r12,r13
+
+        xor     r10,r15
+        add     rcx,r12
+        add     r10,r12
+
+        lea     rbp,[24+rbp]
+        add     r10,r14
+        mov     r12,QWORD[16+rsi]
+        mov     r13,rcx
+        mov     r14,r10
+        bswap   r12
+        ror     r13,23
+        mov     r15,rdx
+
+        xor     r13,rcx
+        ror     r14,5
+        xor     r15,r8
+
+        mov     QWORD[16+rsp],r12
+        xor     r14,r10
+        and     r15,rcx
+
+        ror     r13,4
+        add     r12,r9
+        xor     r15,r8
+
+        ror     r14,6
+        xor     r13,rcx
+        add     r12,r15
+
+        mov     r15,r10
+        add     r12,QWORD[rbp]
+        xor     r14,r10
+
+        xor     r15,r11
+        ror     r13,14
+        mov     r9,r11
+
+        and     rdi,r15
+        ror     r14,28
+        add     r12,r13
+
+        xor     r9,rdi
+        add     rbx,r12
+        add     r9,r12
+
+        lea     rbp,[8+rbp]
+        add     r9,r14
+        mov     r12,QWORD[24+rsi]
+        mov     r13,rbx
+        mov     r14,r9
+        bswap   r12
+        ror     r13,23
+        mov     rdi,rcx
+
+        xor     r13,rbx
+        ror     r14,5
+        xor     rdi,rdx
+
+        mov     QWORD[24+rsp],r12
+        xor     r14,r9
+        and     rdi,rbx
+
+        ror     r13,4
+        add     r12,r8
+        xor     rdi,rdx
+
+        ror     r14,6
+        xor     r13,rbx
+        add     r12,rdi
+
+        mov     rdi,r9
+        add     r12,QWORD[rbp]
+        xor     r14,r9
+
+        xor     rdi,r10
+        ror     r13,14
+        mov     r8,r10
+
+        and     r15,rdi
+        ror     r14,28
+        add     r12,r13
+
+        xor     r8,r15
+        add     rax,r12
+        add     r8,r12
+
+        lea     rbp,[24+rbp]
+        add     r8,r14
+        mov     r12,QWORD[32+rsi]
+        mov     r13,rax
+        mov     r14,r8
+        bswap   r12
+        ror     r13,23
+        mov     r15,rbx
+
+        xor     r13,rax
+        ror     r14,5
+        xor     r15,rcx
+
+        mov     QWORD[32+rsp],r12
+        xor     r14,r8
+        and     r15,rax
+
+        ror     r13,4
+        add     r12,rdx
+        xor     r15,rcx
+
+        ror     r14,6
+        xor     r13,rax
+        add     r12,r15
+
+        mov     r15,r8
+        add     r12,QWORD[rbp]
+        xor     r14,r8
+
+        xor     r15,r9
+        ror     r13,14
+        mov     rdx,r9
+
+        and     rdi,r15
+        ror     r14,28
+        add     r12,r13
+
+        xor     rdx,rdi
+        add     r11,r12
+        add     rdx,r12
+
+        lea     rbp,[8+rbp]
+        add     rdx,r14
+        mov     r12,QWORD[40+rsi]
+        mov     r13,r11
+        mov     r14,rdx
+        bswap   r12
+        ror     r13,23
+        mov     rdi,rax
+
+        xor     r13,r11
+        ror     r14,5
+        xor     rdi,rbx
+
+        mov     QWORD[40+rsp],r12
+        xor     r14,rdx
+        and     rdi,r11
+
+        ror     r13,4
+        add     r12,rcx
+        xor     rdi,rbx
+
+        ror     r14,6
+        xor     r13,r11
+        add     r12,rdi
+
+        mov     rdi,rdx
+        add     r12,QWORD[rbp]
+        xor     r14,rdx
+
+        xor     rdi,r8
+        ror     r13,14
+        mov     rcx,r8
+
+        and     r15,rdi
+        ror     r14,28
+        add     r12,r13
+
+        xor     rcx,r15
+        add     r10,r12
+        add     rcx,r12
+
+        lea     rbp,[24+rbp]
+        add     rcx,r14
+        mov     r12,QWORD[48+rsi]
+        mov     r13,r10
+        mov     r14,rcx
+        bswap   r12
+        ror     r13,23
+        mov     r15,r11
+
+        xor     r13,r10
+        ror     r14,5
+        xor     r15,rax
+
+        mov     QWORD[48+rsp],r12
+        xor     r14,rcx
+        and     r15,r10
+
+        ror     r13,4
+        add     r12,rbx
+        xor     r15,rax
+
+        ror     r14,6
+        xor     r13,r10
+        add     r12,r15
+
+        mov     r15,rcx
+        add     r12,QWORD[rbp]
+        xor     r14,rcx
+
+        xor     r15,rdx
+        ror     r13,14
+        mov     rbx,rdx
+
+        and     rdi,r15
+        ror     r14,28
+        add     r12,r13
+
+        xor     rbx,rdi
+        add     r9,r12
+        add     rbx,r12
+
+        lea     rbp,[8+rbp]
+        add     rbx,r14
+        mov     r12,QWORD[56+rsi]
+        mov     r13,r9
+        mov     r14,rbx
+        bswap   r12
+        ror     r13,23
+        mov     rdi,r10
+
+        xor     r13,r9
+        ror     r14,5
+        xor     rdi,r11
+
+        mov     QWORD[56+rsp],r12
+        xor     r14,rbx
+        and     rdi,r9
+
+        ror     r13,4
+        add     r12,rax
+        xor     rdi,r11
+
+        ror     r14,6
+        xor     r13,r9
+        add     r12,rdi
+
+        mov     rdi,rbx
+        add     r12,QWORD[rbp]
+        xor     r14,rbx
+
+        xor     rdi,rcx
+        ror     r13,14
+        mov     rax,rcx
+
+        and     r15,rdi
+        ror     r14,28
+        add     r12,r13
+
+        xor     rax,r15
+        add     r8,r12
+        add     rax,r12
+
+        lea     rbp,[24+rbp]
+        add     rax,r14
+        mov     r12,QWORD[64+rsi]
+        mov     r13,r8
+        mov     r14,rax
+        bswap   r12
+        ror     r13,23
+        mov     r15,r9
+
+        xor     r13,r8
+        ror     r14,5
+        xor     r15,r10
+
+        mov     QWORD[64+rsp],r12
+        xor     r14,rax
+        and     r15,r8
+
+        ror     r13,4
+        add     r12,r11
+        xor     r15,r10
+
+        ror     r14,6
+        xor     r13,r8
+        add     r12,r15
+
+        mov     r15,rax
+        add     r12,QWORD[rbp]
+        xor     r14,rax
+
+        xor     r15,rbx
+        ror     r13,14
+        mov     r11,rbx
+
+        and     rdi,r15
+        ror     r14,28
+        add     r12,r13
+
+        xor     r11,rdi
+        add     rdx,r12
+        add     r11,r12
+
+        lea     rbp,[8+rbp]
+        add     r11,r14
+        mov     r12,QWORD[72+rsi]
+        mov     r13,rdx
+        mov     r14,r11
+        bswap   r12
+        ror     r13,23
+        mov     rdi,r8
+
+        xor     r13,rdx
+        ror     r14,5
+        xor     rdi,r9
+
+        mov     QWORD[72+rsp],r12
+        xor     r14,r11
+        and     rdi,rdx
+
+        ror     r13,4
+        add     r12,r10
+        xor     rdi,r9
+
+        ror     r14,6
+        xor     r13,rdx
+        add     r12,rdi
+
+        mov     rdi,r11
+        add     r12,QWORD[rbp]
+        xor     r14,r11
+
+        xor     rdi,rax
+        ror     r13,14
+        mov     r10,rax
+
+        and     r15,rdi
+        ror     r14,28
+        add     r12,r13
+
+        xor     r10,r15
+        add     rcx,r12
+        add     r10,r12
+
+        lea     rbp,[24+rbp]
+        add     r10,r14
+        mov     r12,QWORD[80+rsi]
+        mov     r13,rcx
+        mov     r14,r10
+        bswap   r12
+        ror     r13,23
+        mov     r15,rdx
+
+        xor     r13,rcx
+        ror     r14,5
+        xor     r15,r8
+
+        mov     QWORD[80+rsp],r12
+        xor     r14,r10
+        and     r15,rcx
+
+        ror     r13,4
+        add     r12,r9
+        xor     r15,r8
+
+        ror     r14,6
+        xor     r13,rcx
+        add     r12,r15
+
+        mov     r15,r10
+        add     r12,QWORD[rbp]
+        xor     r14,r10
+
+        xor     r15,r11
+        ror     r13,14
+        mov     r9,r11
+
+        and     rdi,r15
+        ror     r14,28
+        add     r12,r13
+
+        xor     r9,rdi
+        add     rbx,r12
+        add     r9,r12
+
+        lea     rbp,[8+rbp]
+        add     r9,r14
+        mov     r12,QWORD[88+rsi]
+        mov     r13,rbx
+        mov     r14,r9
+        bswap   r12
+        ror     r13,23
+        mov     rdi,rcx
+
+        xor     r13,rbx
+        ror     r14,5
+        xor     rdi,rdx
+
+        mov     QWORD[88+rsp],r12
+        xor     r14,r9
+        and     rdi,rbx
+
+        ror     r13,4
+        add     r12,r8
+        xor     rdi,rdx
+
+        ror     r14,6
+        xor     r13,rbx
+        add     r12,rdi
+
+        mov     rdi,r9
+        add     r12,QWORD[rbp]
+        xor     r14,r9
+
+        xor     rdi,r10
+        ror     r13,14
+        mov     r8,r10
+
+        and     r15,rdi
+        ror     r14,28
+        add     r12,r13
+
+        xor     r8,r15
+        add     rax,r12
+        add     r8,r12
+
+        lea     rbp,[24+rbp]
+        add     r8,r14
+        mov     r12,QWORD[96+rsi]
+        mov     r13,rax
+        mov     r14,r8
+        bswap   r12
+        ror     r13,23
+        mov     r15,rbx
+
+        xor     r13,rax
+        ror     r14,5
+        xor     r15,rcx
+
+        mov     QWORD[96+rsp],r12
+        xor     r14,r8
+        and     r15,rax
+
+        ror     r13,4
+        add     r12,rdx
+        xor     r15,rcx
+
+        ror     r14,6
+        xor     r13,rax
+        add     r12,r15
+
+        mov     r15,r8
+        add     r12,QWORD[rbp]
+        xor     r14,r8
+
+        xor     r15,r9
+        ror     r13,14
+        mov     rdx,r9
+
+        and     rdi,r15
+        ror     r14,28
+        add     r12,r13
+
+        xor     rdx,rdi
+        add     r11,r12
+        add     rdx,r12
+
+        lea     rbp,[8+rbp]
+        add     rdx,r14
+        mov     r12,QWORD[104+rsi]
+        mov     r13,r11
+        mov     r14,rdx
+        bswap   r12
+        ror     r13,23
+        mov     rdi,rax
+
+        xor     r13,r11
+        ror     r14,5
+        xor     rdi,rbx
+
+        mov     QWORD[104+rsp],r12
+        xor     r14,rdx
+        and     rdi,r11
+
+        ror     r13,4
+        add     r12,rcx
+        xor     rdi,rbx
+
+        ror     r14,6
+        xor     r13,r11
+        add     r12,rdi
+
+        mov     rdi,rdx
+        add     r12,QWORD[rbp]
+        xor     r14,rdx
+
+        xor     rdi,r8
+        ror     r13,14
+        mov     rcx,r8
+
+        and     r15,rdi
+        ror     r14,28
+        add     r12,r13
+
+        xor     rcx,r15
+        add     r10,r12
+        add     rcx,r12
+
+        lea     rbp,[24+rbp]
+        add     rcx,r14
+        mov     r12,QWORD[112+rsi]
+        mov     r13,r10
+        mov     r14,rcx
+        bswap   r12
+        ror     r13,23
+        mov     r15,r11
+
+        xor     r13,r10
+        ror     r14,5
+        xor     r15,rax
+
+        mov     QWORD[112+rsp],r12
+        xor     r14,rcx
+        and     r15,r10
+
+        ror     r13,4
+        add     r12,rbx
+        xor     r15,rax
+
+        ror     r14,6
+        xor     r13,r10
+        add     r12,r15
+
+        mov     r15,rcx
+        add     r12,QWORD[rbp]
+        xor     r14,rcx
+
+        xor     r15,rdx
+        ror     r13,14
+        mov     rbx,rdx
+
+        and     rdi,r15
+        ror     r14,28
+        add     r12,r13
+
+        xor     rbx,rdi
+        add     r9,r12
+        add     rbx,r12
+
+        lea     rbp,[8+rbp]
+        add     rbx,r14
+        mov     r12,QWORD[120+rsi]
+        mov     r13,r9
+        mov     r14,rbx
+        bswap   r12
+        ror     r13,23
+        mov     rdi,r10
+
+        xor     r13,r9
+        ror     r14,5
+        xor     rdi,r11
+
+        mov     QWORD[120+rsp],r12
+        xor     r14,rbx
+        and     rdi,r9
+
+        ror     r13,4
+        add     r12,rax
+        xor     rdi,r11
+
+        ror     r14,6
+        xor     r13,r9
+        add     r12,rdi
+
+        mov     rdi,rbx
+        add     r12,QWORD[rbp]
+        xor     r14,rbx
+
+        xor     rdi,rcx
+        ror     r13,14
+        mov     rax,rcx
+
+        and     r15,rdi
+        ror     r14,28
+        add     r12,r13
+
+        xor     rax,r15
+        add     r8,r12
+        add     rax,r12
+
+        lea     rbp,[24+rbp]
+        jmp     NEAR $L$rounds_16_xx
+ALIGN   16
+$L$rounds_16_xx:
+        mov     r13,QWORD[8+rsp]
+        mov     r15,QWORD[112+rsp]
+
+        mov     r12,r13
+        ror     r13,7
+        add     rax,r14
+        mov     r14,r15
+        ror     r15,42
+
+        xor     r13,r12
+        shr     r12,7
+        ror     r13,1
+        xor     r15,r14
+        shr     r14,6
+
+        ror     r15,19
+        xor     r12,r13
+        xor     r15,r14
+        add     r12,QWORD[72+rsp]
+
+        add     r12,QWORD[rsp]
+        mov     r13,r8
+        add     r12,r15
+        mov     r14,rax
+        ror     r13,23
+        mov     r15,r9
+
+        xor     r13,r8
+        ror     r14,5
+        xor     r15,r10
+
+        mov     QWORD[rsp],r12
+        xor     r14,rax
+        and     r15,r8
+
+        ror     r13,4
+        add     r12,r11
+        xor     r15,r10
+
+        ror     r14,6
+        xor     r13,r8
+        add     r12,r15
+
+        mov     r15,rax
+        add     r12,QWORD[rbp]
+        xor     r14,rax
+
+        xor     r15,rbx
+        ror     r13,14
+        mov     r11,rbx
+
+        and     rdi,r15
+        ror     r14,28
+        add     r12,r13
+
+        xor     r11,rdi
+        add     rdx,r12
+        add     r11,r12
+
+        lea     rbp,[8+rbp]
+        mov     r13,QWORD[16+rsp]
+        mov     rdi,QWORD[120+rsp]
+
+        mov     r12,r13
+        ror     r13,7
+        add     r11,r14
+        mov     r14,rdi
+        ror     rdi,42
+
+        xor     r13,r12
+        shr     r12,7
+        ror     r13,1
+        xor     rdi,r14
+        shr     r14,6
+
+        ror     rdi,19
+        xor     r12,r13
+        xor     rdi,r14
+        add     r12,QWORD[80+rsp]
+
+        add     r12,QWORD[8+rsp]
+        mov     r13,rdx
+        add     r12,rdi
+        mov     r14,r11
+        ror     r13,23
+        mov     rdi,r8
+
+        xor     r13,rdx
+        ror     r14,5
+        xor     rdi,r9
+
+        mov     QWORD[8+rsp],r12
+        xor     r14,r11
+        and     rdi,rdx
+
+        ror     r13,4
+        add     r12,r10
+        xor     rdi,r9
+
+        ror     r14,6
+        xor     r13,rdx
+        add     r12,rdi
+
+        mov     rdi,r11
+        add     r12,QWORD[rbp]
+        xor     r14,r11
+
+        xor     rdi,rax
+        ror     r13,14
+        mov     r10,rax
+
+        and     r15,rdi
+        ror     r14,28
+        add     r12,r13
+
+        xor     r10,r15
+        add     rcx,r12
+        add     r10,r12
+
+        lea     rbp,[24+rbp]
+        mov     r13,QWORD[24+rsp]
+        mov     r15,QWORD[rsp]
+
+        mov     r12,r13
+        ror     r13,7
+        add     r10,r14
+        mov     r14,r15
+        ror     r15,42
+
+        xor     r13,r12
+        shr     r12,7
+        ror     r13,1
+        xor     r15,r14
+        shr     r14,6
+
+        ror     r15,19
+        xor     r12,r13
+        xor     r15,r14
+        add     r12,QWORD[88+rsp]
+
+        add     r12,QWORD[16+rsp]
+        mov     r13,rcx
+        add     r12,r15
+        mov     r14,r10
+        ror     r13,23
+        mov     r15,rdx
+
+        xor     r13,rcx
+        ror     r14,5
+        xor     r15,r8
+
+        mov     QWORD[16+rsp],r12
+        xor     r14,r10
+        and     r15,rcx
+
+        ror     r13,4
+        add     r12,r9
+        xor     r15,r8
+
+        ror     r14,6
+        xor     r13,rcx
+        add     r12,r15
+
+        mov     r15,r10
+        add     r12,QWORD[rbp]
+        xor     r14,r10
+
+        xor     r15,r11
+        ror     r13,14
+        mov     r9,r11
+
+        and     rdi,r15
+        ror     r14,28
+        add     r12,r13
+
+        xor     r9,rdi
+        add     rbx,r12
+        add     r9,r12
+
+        lea     rbp,[8+rbp]
+        mov     r13,QWORD[32+rsp]
+        mov     rdi,QWORD[8+rsp]
+
+        mov     r12,r13
+        ror     r13,7
+        add     r9,r14
+        mov     r14,rdi
+        ror     rdi,42
+
+        xor     r13,r12
+        shr     r12,7
+        ror     r13,1
+        xor     rdi,r14
+        shr     r14,6
+
+        ror     rdi,19
+        xor     r12,r13
+        xor     rdi,r14
+        add     r12,QWORD[96+rsp]
+
+        add     r12,QWORD[24+rsp]
+        mov     r13,rbx
+        add     r12,rdi
+        mov     r14,r9
+        ror     r13,23
+        mov     rdi,rcx
+
+        xor     r13,rbx
+        ror     r14,5
+        xor     rdi,rdx
+
+        mov     QWORD[24+rsp],r12
+        xor     r14,r9
+        and     rdi,rbx
+
+        ror     r13,4
+        add     r12,r8
+        xor     rdi,rdx
+
+        ror     r14,6
+        xor     r13,rbx
+        add     r12,rdi
+
+        mov     rdi,r9
+        add     r12,QWORD[rbp]
+        xor     r14,r9
+
+        xor     rdi,r10
+        ror     r13,14
+        mov     r8,r10
+
+        and     r15,rdi
+        ror     r14,28
+        add     r12,r13
+
+        xor     r8,r15
+        add     rax,r12
+        add     r8,r12
+
+        lea     rbp,[24+rbp]
+        mov     r13,QWORD[40+rsp]
+        mov     r15,QWORD[16+rsp]
+
+        mov     r12,r13
+        ror     r13,7
+        add     r8,r14
+        mov     r14,r15
+        ror     r15,42
+
+        xor     r13,r12
+        shr     r12,7
+        ror     r13,1
+        xor     r15,r14
+        shr     r14,6
+
+        ror     r15,19
+        xor     r12,r13
+        xor     r15,r14
+        add     r12,QWORD[104+rsp]
+
+        add     r12,QWORD[32+rsp]
+        mov     r13,rax
+        add     r12,r15
+        mov     r14,r8
+        ror     r13,23
+        mov     r15,rbx
+
+        xor     r13,rax
+        ror     r14,5
+        xor     r15,rcx
+
+        mov     QWORD[32+rsp],r12
+        xor     r14,r8
+        and     r15,rax
+
+        ror     r13,4
+        add     r12,rdx
+        xor     r15,rcx
+
+        ror     r14,6
+        xor     r13,rax
+        add     r12,r15
+
+        mov     r15,r8
+        add     r12,QWORD[rbp]
+        xor     r14,r8
+
+        xor     r15,r9
+        ror     r13,14
+        mov     rdx,r9
+
+        and     rdi,r15
+        ror     r14,28
+        add     r12,r13
+
+        xor     rdx,rdi
+        add     r11,r12
+        add     rdx,r12
+
+        lea     rbp,[8+rbp]
+        mov     r13,QWORD[48+rsp]
+        mov     rdi,QWORD[24+rsp]
+
+        mov     r12,r13
+        ror     r13,7
+        add     rdx,r14
+        mov     r14,rdi
+        ror     rdi,42
+
+        xor     r13,r12
+        shr     r12,7
+        ror     r13,1
+        xor     rdi,r14
+        shr     r14,6
+
+        ror     rdi,19
+        xor     r12,r13
+        xor     rdi,r14
+        add     r12,QWORD[112+rsp]
+
+        add     r12,QWORD[40+rsp]
+        mov     r13,r11
+        add     r12,rdi
+        mov     r14,rdx
+        ror     r13,23
+        mov     rdi,rax
+
+        xor     r13,r11
+        ror     r14,5
+        xor     rdi,rbx
+
+        mov     QWORD[40+rsp],r12
+        xor     r14,rdx
+        and     rdi,r11
+
+        ror     r13,4
+        add     r12,rcx
+        xor     rdi,rbx
+
+        ror     r14,6
+        xor     r13,r11
+        add     r12,rdi
+
+        mov     rdi,rdx
+        add     r12,QWORD[rbp]
+        xor     r14,rdx
+
+        xor     rdi,r8
+        ror     r13,14
+        mov     rcx,r8
+
+        and     r15,rdi
+        ror     r14,28
+        add     r12,r13
+
+        xor     rcx,r15
+        add     r10,r12
+        add     rcx,r12
+
+        lea     rbp,[24+rbp]
+        mov     r13,QWORD[56+rsp]
+        mov     r15,QWORD[32+rsp]
+
+        mov     r12,r13
+        ror     r13,7
+        add     rcx,r14
+        mov     r14,r15
+        ror     r15,42
+
+        xor     r13,r12
+        shr     r12,7
+        ror     r13,1
+        xor     r15,r14
+        shr     r14,6
+
+        ror     r15,19
+        xor     r12,r13
+        xor     r15,r14
+        add     r12,QWORD[120+rsp]
+
+        add     r12,QWORD[48+rsp]
+        mov     r13,r10
+        add     r12,r15
+        mov     r14,rcx
+        ror     r13,23
+        mov     r15,r11
+
+        xor     r13,r10
+        ror     r14,5
+        xor     r15,rax
+
+        mov     QWORD[48+rsp],r12
+        xor     r14,rcx
+        and     r15,r10
+
+        ror     r13,4
+        add     r12,rbx
+        xor     r15,rax
+
+        ror     r14,6
+        xor     r13,r10
+        add     r12,r15
+
+        mov     r15,rcx
+        add     r12,QWORD[rbp]
+        xor     r14,rcx
+
+        xor     r15,rdx
+        ror     r13,14
+        mov     rbx,rdx
+
+        and     rdi,r15
+        ror     r14,28
+        add     r12,r13
+
+        xor     rbx,rdi
+        add     r9,r12
+        add     rbx,r12
+
+        lea     rbp,[8+rbp]
+        mov     r13,QWORD[64+rsp]
+        mov     rdi,QWORD[40+rsp]
+
+        mov     r12,r13
+        ror     r13,7
+        add     rbx,r14
+        mov     r14,rdi
+        ror     rdi,42
+
+        xor     r13,r12
+        shr     r12,7
+        ror     r13,1
+        xor     rdi,r14
+        shr     r14,6
+
+        ror     rdi,19
+        xor     r12,r13
+        xor     rdi,r14
+        add     r12,QWORD[rsp]
+
+        add     r12,QWORD[56+rsp]
+        mov     r13,r9
+        add     r12,rdi
+        mov     r14,rbx
+        ror     r13,23
+        mov     rdi,r10
+
+        xor     r13,r9
+        ror     r14,5
+        xor     rdi,r11
+
+        mov     QWORD[56+rsp],r12
+        xor     r14,rbx
+        and     rdi,r9
+
+        ror     r13,4
+        add     r12,rax
+        xor     rdi,r11
+
+        ror     r14,6
+        xor     r13,r9
+        add     r12,rdi
+
+        mov     rdi,rbx
+        add     r12,QWORD[rbp]
+        xor     r14,rbx
+
+        xor     rdi,rcx
+        ror     r13,14
+        mov     rax,rcx
+
+        and     r15,rdi
+        ror     r14,28
+        add     r12,r13
+
+        xor     rax,r15
+        add     r8,r12
+        add     rax,r12
+
+        lea     rbp,[24+rbp]
+        mov     r13,QWORD[72+rsp]
+        mov     r15,QWORD[48+rsp]
+
+        mov     r12,r13
+        ror     r13,7
+        add     rax,r14
+        mov     r14,r15
+        ror     r15,42
+
+        xor     r13,r12
+        shr     r12,7
+        ror     r13,1
+        xor     r15,r14
+        shr     r14,6
+
+        ror     r15,19
+        xor     r12,r13
+        xor     r15,r14
+        add     r12,QWORD[8+rsp]
+
+        add     r12,QWORD[64+rsp]
+        mov     r13,r8
+        add     r12,r15
+        mov     r14,rax
+        ror     r13,23
+        mov     r15,r9
+
+        xor     r13,r8
+        ror     r14,5
+        xor     r15,r10
+
+        mov     QWORD[64+rsp],r12
+        xor     r14,rax
+        and     r15,r8
+
+        ror     r13,4
+        add     r12,r11
+        xor     r15,r10
+
+        ror     r14,6
+        xor     r13,r8
+        add     r12,r15
+
+        mov     r15,rax
+        add     r12,QWORD[rbp]
+        xor     r14,rax
+
+        xor     r15,rbx
+        ror     r13,14
+        mov     r11,rbx
+
+        and     rdi,r15
+        ror     r14,28
+        add     r12,r13
+
+        xor     r11,rdi
+        add     rdx,r12
+        add     r11,r12
+
+        lea     rbp,[8+rbp]
+        mov     r13,QWORD[80+rsp]
+        mov     rdi,QWORD[56+rsp]
+
+        mov     r12,r13
+        ror     r13,7
+        add     r11,r14
+        mov     r14,rdi
+        ror     rdi,42
+
+        xor     r13,r12
+        shr     r12,7
+        ror     r13,1
+        xor     rdi,r14
+        shr     r14,6
+
+        ror     rdi,19
+        xor     r12,r13
+        xor     rdi,r14
+        add     r12,QWORD[16+rsp]
+
+        add     r12,QWORD[72+rsp]
+        mov     r13,rdx
+        add     r12,rdi
+        mov     r14,r11
+        ror     r13,23
+        mov     rdi,r8
+
+        xor     r13,rdx
+        ror     r14,5
+        xor     rdi,r9
+
+        mov     QWORD[72+rsp],r12
+        xor     r14,r11
+        and     rdi,rdx
+
+        ror     r13,4
+        add     r12,r10
+        xor     rdi,r9
+
+        ror     r14,6
+        xor     r13,rdx
+        add     r12,rdi
+
+        mov     rdi,r11
+        add     r12,QWORD[rbp]
+        xor     r14,r11
+
+        xor     rdi,rax
+        ror     r13,14
+        mov     r10,rax
+
+        and     r15,rdi
+        ror     r14,28
+        add     r12,r13
+
+        xor     r10,r15
+        add     rcx,r12
+        add     r10,r12
+
+        lea     rbp,[24+rbp]
+        mov     r13,QWORD[88+rsp]
+        mov     r15,QWORD[64+rsp]
+
+        mov     r12,r13
+        ror     r13,7
+        add     r10,r14
+        mov     r14,r15
+        ror     r15,42
+
+        xor     r13,r12
+        shr     r12,7
+        ror     r13,1
+        xor     r15,r14
+        shr     r14,6
+
+        ror     r15,19
+        xor     r12,r13
+        xor     r15,r14
+        add     r12,QWORD[24+rsp]
+
+        add     r12,QWORD[80+rsp]
+        mov     r13,rcx
+        add     r12,r15
+        mov     r14,r10
+        ror     r13,23
+        mov     r15,rdx
+
+        xor     r13,rcx
+        ror     r14,5
+        xor     r15,r8
+
+        mov     QWORD[80+rsp],r12
+        xor     r14,r10
+        and     r15,rcx
+
+        ror     r13,4
+        add     r12,r9
+        xor     r15,r8
+
+        ror     r14,6
+        xor     r13,rcx
+        add     r12,r15
+
+        mov     r15,r10
+        add     r12,QWORD[rbp]
+        xor     r14,r10
+
+        xor     r15,r11
+        ror     r13,14
+        mov     r9,r11
+
+        and     rdi,r15
+        ror     r14,28
+        add     r12,r13
+
+        xor     r9,rdi
+        add     rbx,r12
+        add     r9,r12
+
+        lea     rbp,[8+rbp]
+        mov     r13,QWORD[96+rsp]
+        mov     rdi,QWORD[72+rsp]
+
+        mov     r12,r13
+        ror     r13,7
+        add     r9,r14
+        mov     r14,rdi
+        ror     rdi,42
+
+        xor     r13,r12
+        shr     r12,7
+        ror     r13,1
+        xor     rdi,r14
+        shr     r14,6
+
+        ror     rdi,19
+        xor     r12,r13
+        xor     rdi,r14
+        add     r12,QWORD[32+rsp]
+
+        add     r12,QWORD[88+rsp]
+        mov     r13,rbx
+        add     r12,rdi
+        mov     r14,r9
+        ror     r13,23
+        mov     rdi,rcx
+
+        xor     r13,rbx
+        ror     r14,5
+        xor     rdi,rdx
+
+        mov     QWORD[88+rsp],r12
+        xor     r14,r9
+        and     rdi,rbx
+
+        ror     r13,4
+        add     r12,r8
+        xor     rdi,rdx
+
+        ror     r14,6
+        xor     r13,rbx
+        add     r12,rdi
+
+        mov     rdi,r9
+        add     r12,QWORD[rbp]
+        xor     r14,r9
+
+        xor     rdi,r10
+        ror     r13,14
+        mov     r8,r10
+
+        and     r15,rdi
+        ror     r14,28
+        add     r12,r13
+
+        xor     r8,r15
+        add     rax,r12
+        add     r8,r12
+
+        lea     rbp,[24+rbp]
+        mov     r13,QWORD[104+rsp]
+        mov     r15,QWORD[80+rsp]
+
+        mov     r12,r13
+        ror     r13,7
+        add     r8,r14
+        mov     r14,r15
+        ror     r15,42
+
+        xor     r13,r12
+        shr     r12,7
+        ror     r13,1
+        xor     r15,r14
+        shr     r14,6
+
+        ror     r15,19
+        xor     r12,r13
+        xor     r15,r14
+        add     r12,QWORD[40+rsp]
+
+        add     r12,QWORD[96+rsp]
+        mov     r13,rax
+        add     r12,r15
+        mov     r14,r8
+        ror     r13,23
+        mov     r15,rbx
+
+        xor     r13,rax
+        ror     r14,5
+        xor     r15,rcx
+
+        mov     QWORD[96+rsp],r12
+        xor     r14,r8
+        and     r15,rax
+
+        ror     r13,4
+        add     r12,rdx
+        xor     r15,rcx
+
+        ror     r14,6
+        xor     r13,rax
+        add     r12,r15
+
+        mov     r15,r8
+        add     r12,QWORD[rbp]
+        xor     r14,r8
+
+        xor     r15,r9
+        ror     r13,14
+        mov     rdx,r9
+
+        and     rdi,r15
+        ror     r14,28
+        add     r12,r13
+
+        xor     rdx,rdi
+        add     r11,r12
+        add     rdx,r12
+
+        lea     rbp,[8+rbp]
+        mov     r13,QWORD[112+rsp]
+        mov     rdi,QWORD[88+rsp]
+
+        mov     r12,r13
+        ror     r13,7
+        add     rdx,r14
+        mov     r14,rdi
+        ror     rdi,42
+
+        xor     r13,r12
+        shr     r12,7
+        ror     r13,1
+        xor     rdi,r14
+        shr     r14,6
+
+        ror     rdi,19
+        xor     r12,r13
+        xor     rdi,r14
+        add     r12,QWORD[48+rsp]
+
+        add     r12,QWORD[104+rsp]
+        mov     r13,r11
+        add     r12,rdi
+        mov     r14,rdx
+        ror     r13,23
+        mov     rdi,rax
+
+        xor     r13,r11
+        ror     r14,5
+        xor     rdi,rbx
+
+        mov     QWORD[104+rsp],r12
+        xor     r14,rdx
+        and     rdi,r11
+
+        ror     r13,4
+        add     r12,rcx
+        xor     rdi,rbx
+
+        ror     r14,6
+        xor     r13,r11
+        add     r12,rdi
+
+        mov     rdi,rdx
+        add     r12,QWORD[rbp]
+        xor     r14,rdx
+
+        xor     rdi,r8
+        ror     r13,14
+        mov     rcx,r8
+
+        and     r15,rdi
+        ror     r14,28
+        add     r12,r13
+
+        xor     rcx,r15
+        add     r10,r12
+        add     rcx,r12
+
+        lea     rbp,[24+rbp]
+        mov     r13,QWORD[120+rsp]
+        mov     r15,QWORD[96+rsp]
+
+        mov     r12,r13
+        ror     r13,7
+        add     rcx,r14
+        mov     r14,r15
+        ror     r15,42
+
+        xor     r13,r12
+        shr     r12,7
+        ror     r13,1
+        xor     r15,r14
+        shr     r14,6
+
+        ror     r15,19
+        xor     r12,r13
+        xor     r15,r14
+        add     r12,QWORD[56+rsp]
+
+        add     r12,QWORD[112+rsp]
+        mov     r13,r10
+        add     r12,r15
+        mov     r14,rcx
+        ror     r13,23
+        mov     r15,r11
+
+        xor     r13,r10
+        ror     r14,5
+        xor     r15,rax
+
+        mov     QWORD[112+rsp],r12
+        xor     r14,rcx
+        and     r15,r10
+
+        ror     r13,4
+        add     r12,rbx
+        xor     r15,rax
+
+        ror     r14,6
+        xor     r13,r10
+        add     r12,r15
+
+        mov     r15,rcx
+        add     r12,QWORD[rbp]
+        xor     r14,rcx
+
+        xor     r15,rdx
+        ror     r13,14
+        mov     rbx,rdx
+
+        and     rdi,r15
+        ror     r14,28
+        add     r12,r13
+
+        xor     rbx,rdi
+        add     r9,r12
+        add     rbx,r12
+
+        lea     rbp,[8+rbp]
+        mov     r13,QWORD[rsp]
+        mov     rdi,QWORD[104+rsp]
+
+        mov     r12,r13
+        ror     r13,7
+        add     rbx,r14
+        mov     r14,rdi
+        ror     rdi,42
+
+        xor     r13,r12
+        shr     r12,7
+        ror     r13,1
+        xor     rdi,r14
+        shr     r14,6
+
+        ror     rdi,19
+        xor     r12,r13
+        xor     rdi,r14
+        add     r12,QWORD[64+rsp]
+
+        add     r12,QWORD[120+rsp]
+        mov     r13,r9
+        add     r12,rdi
+        mov     r14,rbx
+        ror     r13,23
+        mov     rdi,r10
+
+        xor     r13,r9
+        ror     r14,5
+        xor     rdi,r11
+
+        mov     QWORD[120+rsp],r12
+        xor     r14,rbx
+        and     rdi,r9
+
+        ror     r13,4
+        add     r12,rax
+        xor     rdi,r11
+
+        ror     r14,6
+        xor     r13,r9
+        add     r12,rdi
+
+        mov     rdi,rbx
+        add     r12,QWORD[rbp]
+        xor     r14,rbx
+
+        xor     rdi,rcx
+        ror     r13,14
+        mov     rax,rcx
+
+        and     r15,rdi
+        ror     r14,28
+        add     r12,r13
+
+        xor     rax,r15
+        add     r8,r12
+        add     rax,r12
+
+        lea     rbp,[24+rbp]
+        cmp     BYTE[7+rbp],0
+        jnz     NEAR $L$rounds_16_xx
+
+        mov     rdi,QWORD[((128+0))+rsp]
+        add     rax,r14
+        lea     rsi,[128+rsi]
+
+        add     rax,QWORD[rdi]
+        add     rbx,QWORD[8+rdi]
+        add     rcx,QWORD[16+rdi]
+        add     rdx,QWORD[24+rdi]
+        add     r8,QWORD[32+rdi]
+        add     r9,QWORD[40+rdi]
+        add     r10,QWORD[48+rdi]
+        add     r11,QWORD[56+rdi]
+
+        cmp     rsi,QWORD[((128+16))+rsp]
+
+        mov     QWORD[rdi],rax
+        mov     QWORD[8+rdi],rbx
+        mov     QWORD[16+rdi],rcx
+        mov     QWORD[24+rdi],rdx
+        mov     QWORD[32+rdi],r8
+        mov     QWORD[40+rdi],r9
+        mov     QWORD[48+rdi],r10
+        mov     QWORD[56+rdi],r11
+        jb      NEAR $L$loop
+
+        mov     rsi,QWORD[152+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$epilogue:
+        mov     rdi,QWORD[8+rsp]        ;WIN64 epilogue
+        mov     rsi,QWORD[16+rsp]
+        DB      0F3h,0C3h               ;repret
+
+$L$SEH_end_sha512_block_data_order:
+ALIGN   64
+
+K512:
+        DQ      0x428a2f98d728ae22,0x7137449123ef65cd
+        DQ      0x428a2f98d728ae22,0x7137449123ef65cd
+        DQ      0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc
+        DQ      0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc
+        DQ      0x3956c25bf348b538,0x59f111f1b605d019
+        DQ      0x3956c25bf348b538,0x59f111f1b605d019
+        DQ      0x923f82a4af194f9b,0xab1c5ed5da6d8118
+        DQ      0x923f82a4af194f9b,0xab1c5ed5da6d8118
+        DQ      0xd807aa98a3030242,0x12835b0145706fbe
+        DQ      0xd807aa98a3030242,0x12835b0145706fbe
+        DQ      0x243185be4ee4b28c,0x550c7dc3d5ffb4e2
+        DQ      0x243185be4ee4b28c,0x550c7dc3d5ffb4e2
+        DQ      0x72be5d74f27b896f,0x80deb1fe3b1696b1
+        DQ      0x72be5d74f27b896f,0x80deb1fe3b1696b1
+        DQ      0x9bdc06a725c71235,0xc19bf174cf692694
+        DQ      0x9bdc06a725c71235,0xc19bf174cf692694
+        DQ      0xe49b69c19ef14ad2,0xefbe4786384f25e3
+        DQ      0xe49b69c19ef14ad2,0xefbe4786384f25e3
+        DQ      0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65
+        DQ      0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65
+        DQ      0x2de92c6f592b0275,0x4a7484aa6ea6e483
+        DQ      0x2de92c6f592b0275,0x4a7484aa6ea6e483
+        DQ      0x5cb0a9dcbd41fbd4,0x76f988da831153b5
+        DQ      0x5cb0a9dcbd41fbd4,0x76f988da831153b5
+        DQ      0x983e5152ee66dfab,0xa831c66d2db43210
+        DQ      0x983e5152ee66dfab,0xa831c66d2db43210
+        DQ      0xb00327c898fb213f,0xbf597fc7beef0ee4
+        DQ      0xb00327c898fb213f,0xbf597fc7beef0ee4
+        DQ      0xc6e00bf33da88fc2,0xd5a79147930aa725
+        DQ      0xc6e00bf33da88fc2,0xd5a79147930aa725
+        DQ      0x06ca6351e003826f,0x142929670a0e6e70
+        DQ      0x06ca6351e003826f,0x142929670a0e6e70
+        DQ      0x27b70a8546d22ffc,0x2e1b21385c26c926
+        DQ      0x27b70a8546d22ffc,0x2e1b21385c26c926
+        DQ      0x4d2c6dfc5ac42aed,0x53380d139d95b3df
+        DQ      0x4d2c6dfc5ac42aed,0x53380d139d95b3df
+        DQ      0x650a73548baf63de,0x766a0abb3c77b2a8
+        DQ      0x650a73548baf63de,0x766a0abb3c77b2a8
+        DQ      0x81c2c92e47edaee6,0x92722c851482353b
+        DQ      0x81c2c92e47edaee6,0x92722c851482353b
+        DQ      0xa2bfe8a14cf10364,0xa81a664bbc423001
+        DQ      0xa2bfe8a14cf10364,0xa81a664bbc423001
+        DQ      0xc24b8b70d0f89791,0xc76c51a30654be30
+        DQ      0xc24b8b70d0f89791,0xc76c51a30654be30
+        DQ      0xd192e819d6ef5218,0xd69906245565a910
+        DQ      0xd192e819d6ef5218,0xd69906245565a910
+        DQ      0xf40e35855771202a,0x106aa07032bbd1b8
+        DQ      0xf40e35855771202a,0x106aa07032bbd1b8
+        DQ      0x19a4c116b8d2d0c8,0x1e376c085141ab53
+        DQ      0x19a4c116b8d2d0c8,0x1e376c085141ab53
+        DQ      0x2748774cdf8eeb99,0x34b0bcb5e19b48a8
+        DQ      0x2748774cdf8eeb99,0x34b0bcb5e19b48a8
+        DQ      0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb
+        DQ      0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb
+        DQ      0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3
+        DQ      0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3
+        DQ      0x748f82ee5defb2fc,0x78a5636f43172f60
+        DQ      0x748f82ee5defb2fc,0x78a5636f43172f60
+        DQ      0x84c87814a1f0ab72,0x8cc702081a6439ec
+        DQ      0x84c87814a1f0ab72,0x8cc702081a6439ec
+        DQ      0x90befffa23631e28,0xa4506cebde82bde9
+        DQ      0x90befffa23631e28,0xa4506cebde82bde9
+        DQ      0xbef9a3f7b2c67915,0xc67178f2e372532b
+        DQ      0xbef9a3f7b2c67915,0xc67178f2e372532b
+        DQ      0xca273eceea26619c,0xd186b8c721c0c207
+        DQ      0xca273eceea26619c,0xd186b8c721c0c207
+        DQ      0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178
+        DQ      0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178
+        DQ      0x06f067aa72176fba,0x0a637dc5a2c898a6
+        DQ      0x06f067aa72176fba,0x0a637dc5a2c898a6
+        DQ      0x113f9804bef90dae,0x1b710b35131c471b
+        DQ      0x113f9804bef90dae,0x1b710b35131c471b
+        DQ      0x28db77f523047d84,0x32caab7b40c72493
+        DQ      0x28db77f523047d84,0x32caab7b40c72493
+        DQ      0x3c9ebe0a15c9bebc,0x431d67c49c100d4c
+        DQ      0x3c9ebe0a15c9bebc,0x431d67c49c100d4c
+        DQ      0x4cc5d4becb3e42b6,0x597f299cfc657e2a
+        DQ      0x4cc5d4becb3e42b6,0x597f299cfc657e2a
+        DQ      0x5fcb6fab3ad6faec,0x6c44198c4a475817
+        DQ      0x5fcb6fab3ad6faec,0x6c44198c4a475817
+
+        DQ      0x0001020304050607,0x08090a0b0c0d0e0f
+        DQ      0x0001020304050607,0x08090a0b0c0d0e0f
+DB      83,72,65,53,49,50,32,98,108,111,99,107,32,116,114,97
+DB      110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54
+DB      52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121
+DB      32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46
+DB      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     rsi,rax
+        mov     rax,QWORD[((128+24))+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     r10,[$L$epilogue]
+        cmp     rbx,r10
+        jb      NEAR $L$in_prologue
+
+        lea     rsi,[((128+32))+rsi]
+        lea     rdi,[512+r8]
+        mov     ecx,12
+        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_sha512_block_data_order wrt ..imagebase
+        DD      $L$SEH_end_sha512_block_data_order wrt ..imagebase
+        DD      $L$SEH_info_sha512_block_data_order wrt ..imagebase
+section .xdata rdata align=8
+ALIGN   8
+$L$SEH_info_sha512_block_data_order:
+DB      9,0,0,0
+        DD      se_handler wrt ..imagebase
+        DD      $L$prologue wrt ..imagebase,$L$epilogue wrt ..imagebase
diff --git a/CryptoPkg/Library/OpensslLib/X64/crypto/x86_64cpuid.nasm b/CryptoPkg/Library/OpensslLib/X64/crypto/x86_64cpuid.nasm
new file mode 100644
index 0000000000..2a3d5bcf72
--- /dev/null
+++ b/CryptoPkg/Library/OpensslLib/X64/crypto/x86_64cpuid.nasm
@@ -0,0 +1,491 @@
+; WARNING: do not edit!
+; Generated from openssl/crypto/x86_64cpuid.pl
+;
+; Copyright 2005-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
+EXTERN  OPENSSL_cpuid_setup
+
+section .CRT$XCU rdata align=8
+                DQ      OPENSSL_cpuid_setup
+
+
+common  OPENSSL_ia32cap_P 16
+
+section .text code align=64
+
+
+global  OPENSSL_atomic_add
+
+ALIGN   16
+OPENSSL_atomic_add:
+
+        mov     eax,DWORD[rcx]
+$L$spin:        lea     r8,[rax*1+rdx]
+DB      0xf0
+        cmpxchg DWORD[rcx],r8d
+        jne     NEAR $L$spin
+        mov     eax,r8d
+DB      0x48,0x98
+        DB      0F3h,0C3h               ;repret
+
+
+
+global  OPENSSL_rdtsc
+
+ALIGN   16
+OPENSSL_rdtsc:
+
+        rdtsc
+        shl     rdx,32
+        or      rax,rdx
+        DB      0F3h,0C3h               ;repret
+
+
+
+global  OPENSSL_ia32_cpuid
+
+ALIGN   16
+OPENSSL_ia32_cpuid:
+        mov     QWORD[8+rsp],rdi        ;WIN64 prologue
+        mov     QWORD[16+rsp],rsi
+        mov     rax,rsp
+$L$SEH_begin_OPENSSL_ia32_cpuid:
+        mov     rdi,rcx
+
+
+
+        mov     r8,rbx
+
+
+        xor     eax,eax
+        mov     QWORD[8+rdi],rax
+        cpuid
+        mov     r11d,eax
+
+        xor     eax,eax
+        cmp     ebx,0x756e6547
+        setne   al
+        mov     r9d,eax
+        cmp     edx,0x49656e69
+        setne   al
+        or      r9d,eax
+        cmp     ecx,0x6c65746e
+        setne   al
+        or      r9d,eax
+        jz      NEAR $L$intel
+
+        cmp     ebx,0x68747541
+        setne   al
+        mov     r10d,eax
+        cmp     edx,0x69746E65
+        setne   al
+        or      r10d,eax
+        cmp     ecx,0x444D4163
+        setne   al
+        or      r10d,eax
+        jnz     NEAR $L$intel
+
+
+        mov     eax,0x80000000
+        cpuid
+        cmp     eax,0x80000001
+        jb      NEAR $L$intel
+        mov     r10d,eax
+        mov     eax,0x80000001
+        cpuid
+        or      r9d,ecx
+        and     r9d,0x00000801
+
+        cmp     r10d,0x80000008
+        jb      NEAR $L$intel
+
+        mov     eax,0x80000008
+        cpuid
+        movzx   r10,cl
+        inc     r10
+
+        mov     eax,1
+        cpuid
+        bt      edx,28
+        jnc     NEAR $L$generic
+        shr     ebx,16
+        cmp     bl,r10b
+        ja      NEAR $L$generic
+        and     edx,0xefffffff
+        jmp     NEAR $L$generic
+
+$L$intel:
+        cmp     r11d,4
+        mov     r10d,-1
+        jb      NEAR $L$nocacheinfo
+
+        mov     eax,4
+        mov     ecx,0
+        cpuid
+        mov     r10d,eax
+        shr     r10d,14
+        and     r10d,0xfff
+
+$L$nocacheinfo:
+        mov     eax,1
+        cpuid
+        movd    xmm0,eax
+        and     edx,0xbfefffff
+        cmp     r9d,0
+        jne     NEAR $L$notintel
+        or      edx,0x40000000
+        and     ah,15
+        cmp     ah,15
+        jne     NEAR $L$notP4
+        or      edx,0x00100000
+$L$notP4:
+        cmp     ah,6
+        jne     NEAR $L$notintel
+        and     eax,0x0fff0ff0
+        cmp     eax,0x00050670
+        je      NEAR $L$knights
+        cmp     eax,0x00080650
+        jne     NEAR $L$notintel
+$L$knights:
+        and     ecx,0xfbffffff
+
+$L$notintel:
+        bt      edx,28
+        jnc     NEAR $L$generic
+        and     edx,0xefffffff
+        cmp     r10d,0
+        je      NEAR $L$generic
+
+        or      edx,0x10000000
+        shr     ebx,16
+        cmp     bl,1
+        ja      NEAR $L$generic
+        and     edx,0xefffffff
+$L$generic:
+        and     r9d,0x00000800
+        and     ecx,0xfffff7ff
+        or      r9d,ecx
+
+        mov     r10d,edx
+
+        cmp     r11d,7
+        jb      NEAR $L$no_extended_info
+        mov     eax,7
+        xor     ecx,ecx
+        cpuid
+        bt      r9d,26
+        jc      NEAR $L$notknights
+        and     ebx,0xfff7ffff
+$L$notknights:
+        movd    eax,xmm0
+        and     eax,0x0fff0ff0
+        cmp     eax,0x00050650
+        jne     NEAR $L$notskylakex
+        and     ebx,0xfffeffff
+
+$L$notskylakex:
+        mov     DWORD[8+rdi],ebx
+        mov     DWORD[12+rdi],ecx
+$L$no_extended_info:
+
+        bt      r9d,27
+        jnc     NEAR $L$clear_avx
+        xor     ecx,ecx
+DB      0x0f,0x01,0xd0
+        and     eax,0xe6
+        cmp     eax,0xe6
+        je      NEAR $L$done
+        and     DWORD[8+rdi],0x3fdeffff
+
+
+
+
+        and     eax,6
+        cmp     eax,6
+        je      NEAR $L$done
+$L$clear_avx:
+        mov     eax,0xefffe7ff
+        and     r9d,eax
+        mov     eax,0x3fdeffdf
+        and     DWORD[8+rdi],eax
+$L$done:
+        shl     r9,32
+        mov     eax,r10d
+        mov     rbx,r8
+
+        or      rax,r9
+        mov     rdi,QWORD[8+rsp]        ;WIN64 epilogue
+        mov     rsi,QWORD[16+rsp]
+        DB      0F3h,0C3h               ;repret
+
+$L$SEH_end_OPENSSL_ia32_cpuid:
+
+global  OPENSSL_cleanse
+
+ALIGN   16
+OPENSSL_cleanse:
+
+        xor     rax,rax
+        cmp     rdx,15
+        jae     NEAR $L$ot
+        cmp     rdx,0
+        je      NEAR $L$ret
+$L$ittle:
+        mov     BYTE[rcx],al
+        sub     rdx,1
+        lea     rcx,[1+rcx]
+        jnz     NEAR $L$ittle
+$L$ret:
+        DB      0F3h,0C3h               ;repret
+ALIGN   16
+$L$ot:
+        test    rcx,7
+        jz      NEAR $L$aligned
+        mov     BYTE[rcx],al
+        lea     rdx,[((-1))+rdx]
+        lea     rcx,[1+rcx]
+        jmp     NEAR $L$ot
+$L$aligned:
+        mov     QWORD[rcx],rax
+        lea     rdx,[((-8))+rdx]
+        test    rdx,-8
+        lea     rcx,[8+rcx]
+        jnz     NEAR $L$aligned
+        cmp     rdx,0
+        jne     NEAR $L$ittle
+        DB      0F3h,0C3h               ;repret
+
+
+
+global  CRYPTO_memcmp
+
+ALIGN   16
+CRYPTO_memcmp:
+
+        xor     rax,rax
+        xor     r10,r10
+        cmp     r8,0
+        je      NEAR $L$no_data
+        cmp     r8,16
+        jne     NEAR $L$oop_cmp
+        mov     r10,QWORD[rcx]
+        mov     r11,QWORD[8+rcx]
+        mov     r8,1
+        xor     r10,QWORD[rdx]
+        xor     r11,QWORD[8+rdx]
+        or      r10,r11
+        cmovnz  rax,r8
+        DB      0F3h,0C3h               ;repret
+
+ALIGN   16
+$L$oop_cmp:
+        mov     r10b,BYTE[rcx]
+        lea     rcx,[1+rcx]
+        xor     r10b,BYTE[rdx]
+        lea     rdx,[1+rdx]
+        or      al,r10b
+        dec     r8
+        jnz     NEAR $L$oop_cmp
+        neg     rax
+        shr     rax,63
+$L$no_data:
+        DB      0F3h,0C3h               ;repret
+
+
+global  OPENSSL_wipe_cpu
+
+ALIGN   16
+OPENSSL_wipe_cpu:
+        pxor    xmm0,xmm0
+        pxor    xmm1,xmm1
+        pxor    xmm2,xmm2
+        pxor    xmm3,xmm3
+        pxor    xmm4,xmm4
+        pxor    xmm5,xmm5
+        xor     rcx,rcx
+        xor     rdx,rdx
+        xor     r8,r8
+        xor     r9,r9
+        xor     r10,r10
+        xor     r11,r11
+        lea     rax,[8+rsp]
+        DB      0F3h,0C3h               ;repret
+
+global  OPENSSL_instrument_bus
+
+ALIGN   16
+OPENSSL_instrument_bus:
+
+        mov     r10,rcx
+        mov     rcx,rdx
+        mov     r11,rdx
+
+        rdtsc
+        mov     r8d,eax
+        mov     r9d,0
+        clflush [r10]
+DB      0xf0
+        add     DWORD[r10],r9d
+        jmp     NEAR $L$oop
+ALIGN   16
+$L$oop: rdtsc
+        mov     edx,eax
+        sub     eax,r8d
+        mov     r8d,edx
+        mov     r9d,eax
+        clflush [r10]
+DB      0xf0
+        add     DWORD[r10],eax
+        lea     r10,[4+r10]
+        sub     rcx,1
+        jnz     NEAR $L$oop
+
+        mov     rax,r11
+        DB      0F3h,0C3h               ;repret
+
+
+
+global  OPENSSL_instrument_bus2
+
+ALIGN   16
+OPENSSL_instrument_bus2:
+
+        mov     r10,rcx
+        mov     rcx,rdx
+        mov     r11,r8
+        mov     QWORD[8+rsp],rcx
+
+        rdtsc
+        mov     r8d,eax
+        mov     r9d,0
+
+        clflush [r10]
+DB      0xf0
+        add     DWORD[r10],r9d
+
+        rdtsc
+        mov     edx,eax
+        sub     eax,r8d
+        mov     r8d,edx
+        mov     r9d,eax
+$L$oop2:
+        clflush [r10]
+DB      0xf0
+        add     DWORD[r10],eax
+
+        sub     r11,1
+        jz      NEAR $L$done2
+
+        rdtsc
+        mov     edx,eax
+        sub     eax,r8d
+        mov     r8d,edx
+        cmp     eax,r9d
+        mov     r9d,eax
+        mov     edx,0
+        setne   dl
+        sub     rcx,rdx
+        lea     r10,[rdx*4+r10]
+        jnz     NEAR $L$oop2
+
+$L$done2:
+        mov     rax,QWORD[8+rsp]
+        sub     rax,rcx
+        DB      0F3h,0C3h               ;repret
+
+
+global  OPENSSL_ia32_rdrand_bytes
+
+ALIGN   16
+OPENSSL_ia32_rdrand_bytes:
+
+        xor     rax,rax
+        cmp     rdx,0
+        je      NEAR $L$done_rdrand_bytes
+
+        mov     r11,8
+$L$oop_rdrand_bytes:
+DB      73,15,199,242
+        jc      NEAR $L$break_rdrand_bytes
+        dec     r11
+        jnz     NEAR $L$oop_rdrand_bytes
+        jmp     NEAR $L$done_rdrand_bytes
+
+ALIGN   16
+$L$break_rdrand_bytes:
+        cmp     rdx,8
+        jb      NEAR $L$tail_rdrand_bytes
+        mov     QWORD[rcx],r10
+        lea     rcx,[8+rcx]
+        add     rax,8
+        sub     rdx,8
+        jz      NEAR $L$done_rdrand_bytes
+        mov     r11,8
+        jmp     NEAR $L$oop_rdrand_bytes
+
+ALIGN   16
+$L$tail_rdrand_bytes:
+        mov     BYTE[rcx],r10b
+        lea     rcx,[1+rcx]
+        inc     rax
+        shr     r10,8
+        dec     rdx
+        jnz     NEAR $L$tail_rdrand_bytes
+
+$L$done_rdrand_bytes:
+        xor     r10,r10
+        DB      0F3h,0C3h               ;repret
+
+
+global  OPENSSL_ia32_rdseed_bytes
+
+ALIGN   16
+OPENSSL_ia32_rdseed_bytes:
+
+        xor     rax,rax
+        cmp     rdx,0
+        je      NEAR $L$done_rdseed_bytes
+
+        mov     r11,8
+$L$oop_rdseed_bytes:
+DB      73,15,199,250
+        jc      NEAR $L$break_rdseed_bytes
+        dec     r11
+        jnz     NEAR $L$oop_rdseed_bytes
+        jmp     NEAR $L$done_rdseed_bytes
+
+ALIGN   16
+$L$break_rdseed_bytes:
+        cmp     rdx,8
+        jb      NEAR $L$tail_rdseed_bytes
+        mov     QWORD[rcx],r10
+        lea     rcx,[8+rcx]
+        add     rax,8
+        sub     rdx,8
+        jz      NEAR $L$done_rdseed_bytes
+        mov     r11,8
+        jmp     NEAR $L$oop_rdseed_bytes
+
+ALIGN   16
+$L$tail_rdseed_bytes:
+        mov     BYTE[rcx],r10b
+        lea     rcx,[1+rcx]
+        inc     rax
+        shr     r10,8
+        dec     rdx
+        jnz     NEAR $L$tail_rdseed_bytes
+
+$L$done_rdseed_bytes:
+        xor     r10,r10
+        DB      0F3h,0C3h               ;repret
+
+
-- 
2.28.0.windows.1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-03 21:58 [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64 Zurcher, Christopher J
  2020-11-03 21:58 ` [PATCH v5 1/2] " Zurcher, Christopher J
  2020-11-03 21:58 ` [PATCH v5 2/2] CryptoPkg/OpensslLib: Commit the auto-generated assembly files " Zurcher, Christopher J
@ 2020-11-06  5:56 ` Yao, Jiewen
       [not found] ` <1644D590FF4B7423.25549@groups.io>
  3 siblings, 0 replies; 28+ messages in thread
From: Yao, Jiewen @ 2020-11-06  5:56 UTC (permalink / raw)
  To: Zurcher, Christopher J, devel@edk2.groups.io
  Cc: Wang, Jian J, Lu, XiaoyuX, Kinney, Michael D, Ard Biesheuvel

Patch 1/2 reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>

> -----Original Message-----
> From: Christopher J Zurcher <christopher.j.zurcher@intel.com>
> Sent: Wednesday, November 4, 2020 5:59 AM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J
> <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Kinney,
> Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> <ard.biesheuvel@arm.com>
> Subject: [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction
> support for X64
> 
> V5 Changes:
>   Move ApiHooks.c into X64 folder
>   Update process_files.pl to clean architecture-specific subfolders without
>     removing them
>   Rebased INF file to merge latest changes regarding RngLib vs. TimerLib
> 
> V4 Changes:
>   Add copyright header to uefi-asm.conf
>   Move [Sources.X64] block to cover entire X64-specific config
> 
> 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@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> Cc: Mike Kinney <michael.d.kinney@intel.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> 
> 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                       |  653 +++
>  CryptoPkg/Library/Include/CrtLibSupport.h                            |    2 +
>  CryptoPkg/Library/Include/openssl/opensslconf.h                      |    3 -
>  CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c                 |   34 +
>  CryptoPkg/Library/OpensslLib/X64/ApiHooks.c                          |   18 +
>  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                        |  232 +-
>  CryptoPkg/Library/OpensslLib/uefi-asm.conf                           |   21 +
>  22 files changed, 26746 insertions(+), 50 deletions(-)
>  create mode 100644 CryptoPkg/Library/OpensslLib/OpensslLibX64.inf
>  create mode 100644 CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
>  create mode 100644 CryptoPkg/Library/OpensslLib/X64/ApiHooks.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


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
       [not found] ` <1644D590FF4B7423.25549@groups.io>
@ 2020-11-06  6:13   ` Yao, Jiewen
  2020-11-06  9:50     ` Zurcher, Christopher J
  0 siblings, 1 reply; 28+ messages in thread
From: Yao, Jiewen @ 2020-11-06  6:13 UTC (permalink / raw)
  To: devel@edk2.groups.io, Yao, Jiewen, Zurcher, Christopher J
  Cc: Wang, Jian J, Lu, XiaoyuX, Kinney, Michael D, Ard Biesheuvel

Hi Zurcher
I created https://github.com/tianocore/edk2/pull/1092

However, there are failures in CI test. So this patch is NOT merged.

Please take a look and resolve it.

Thank you
Yao Jiewen

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Yao,
> Jiewen
> Sent: Friday, November 6, 2020 1:56 PM
> To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> devel@edk2.groups.io
> Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> <xiaoyux.lu@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>;
> Ard Biesheuvel <ard.biesheuvel@arm.com>
> Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> instruction support for X64
> 
> Patch 1/2 reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
> 
> > -----Original Message-----
> > From: Christopher J Zurcher <christopher.j.zurcher@intel.com>
> > Sent: Wednesday, November 4, 2020 5:59 AM
> > To: devel@edk2.groups.io
> > Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J
> > <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Kinney,
> > Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > <ard.biesheuvel@arm.com>
> > Subject: [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction
> > support for X64
> >
> > V5 Changes:
> >   Move ApiHooks.c into X64 folder
> >   Update process_files.pl to clean architecture-specific subfolders without
> >     removing them
> >   Rebased INF file to merge latest changes regarding RngLib vs. TimerLib
> >
> > V4 Changes:
> >   Add copyright header to uefi-asm.conf
> >   Move [Sources.X64] block to cover entire X64-specific config
> >
> > 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@intel.com>
> > Cc: Jian J Wang <jian.j.wang@intel.com>
> > Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> > Cc: Mike Kinney <michael.d.kinney@intel.com>
> > Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> >
> > 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                       |  653 +++
> >  CryptoPkg/Library/Include/CrtLibSupport.h                            |    2 +
> >  CryptoPkg/Library/Include/openssl/opensslconf.h                      |    3 -
> >  CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c                 |   34 +
> >  CryptoPkg/Library/OpensslLib/X64/ApiHooks.c                          |   18 +
> >  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                        |  232 +-
> >  CryptoPkg/Library/OpensslLib/uefi-asm.conf                           |   21 +
> >  22 files changed, 26746 insertions(+), 50 deletions(-)
> >  create mode 100644 CryptoPkg/Library/OpensslLib/OpensslLibX64.inf
> >  create mode 100644
> CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
> >  create mode 100644 CryptoPkg/Library/OpensslLib/X64/ApiHooks.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
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-06  6:13   ` [edk2-devel] " Yao, Jiewen
@ 2020-11-06  9:50     ` Zurcher, Christopher J
  2020-11-06 10:22       ` Yao, Jiewen
  0 siblings, 1 reply; 28+ messages in thread
From: Zurcher, Christopher J @ 2020-11-06  9:50 UTC (permalink / raw)
  To: Yao, Jiewen, devel@edk2.groups.io
  Cc: Wang, Jian J, Lu, XiaoyuX, Kinney, Michael D, Ard Biesheuvel

I think some of these errors are not relevant based on the nature of the commit:

One of the errors reported is that the added typedefs (ptrdiff_t, wchar_t) do not follow coding guidelines, but the typedefs are required for OpenSSL compatibility and they match the already-existing style:

 typedef UINTN          size_t;
 typedef UINTN          u_int;
+typedef INTN           ptrdiff_t;
 typedef INTN           ssize_t;
 typedef INT32          time_t;
 typedef UINT8          __uint8_t;
 typedef UINT8          sa_family_t;
 typedef UINT8          u_char;
 typedef UINT32         uid_t;
 typedef UINT32         gid_t;
+typedef CHAR16         wchar_t;

Another error is that the auto-generated assembly files do not start with capital letters, but these filenames come from OpenSSL with lowercase filenames, and we already have opensslconf.h in the Include folder which has a lowercase filename.

Another error type reported is that the auto-generated assembly files do not have "SPDX-License-Identifier: BSD-2-Clause-Patent" but it was already discussed on the list that these would be checked in with the OpenSSL header similar to opensslconf.h:
https://github.com/tianocore/edk2/blob/master/CryptoPkg/Library/Include/openssl/opensslconf.h

Additionally, there is an error that OpensslLibX64.inf is not in CryptoPkg.dsc, but I am not sure if it is appropriate to include as the module is not compatible with GCC builds.

How should I proceed here?

Thanks,
Christopher Zurcher

> -----Original Message-----
> From: Yao, Jiewen <jiewen.yao@intel.com>
> Sent: Thursday, November 5, 2020 22:14
> To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel.com>; Zurcher,
> Christopher J <christopher.j.zurcher@intel.com>
> Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>;
> Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> <ard.biesheuvel@arm.com>
> Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> instruction support for X64
> 
> Hi Zurcher
> I created https://github.com/tianocore/edk2/pull/1092
> 
> However, there are failures in CI test. So this patch is NOT merged.
> 
> Please take a look and resolve it.
> 
> Thank you
> Yao Jiewen
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Yao,
> > Jiewen
> > Sent: Friday, November 6, 2020 1:56 PM
> > To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> > devel@edk2.groups.io
> > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > <xiaoyux.lu@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>;
> > Ard Biesheuvel <ard.biesheuvel@arm.com>
> > Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> > instruction support for X64
> >
> > Patch 1/2 reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
> >
> > > -----Original Message-----
> > > From: Christopher J Zurcher <christopher.j.zurcher@intel.com>
> > > Sent: Wednesday, November 4, 2020 5:59 AM
> > > To: devel@edk2.groups.io
> > > Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J
> > > <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Kinney,
> > > Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > > <ard.biesheuvel@arm.com>
> > > Subject: [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction
> > > support for X64
> > >
> > > V5 Changes:
> > >   Move ApiHooks.c into X64 folder
> > >   Update process_files.pl to clean architecture-specific subfolders
> without
> > >     removing them
> > >   Rebased INF file to merge latest changes regarding RngLib vs. TimerLib
> > >
> > > V4 Changes:
> > >   Add copyright header to uefi-asm.conf
> > >   Move [Sources.X64] block to cover entire X64-specific config
> > >
> > > 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@intel.com>
> > > Cc: Jian J Wang <jian.j.wang@intel.com>
> > > Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> > > Cc: Mike Kinney <michael.d.kinney@intel.com>
> > > Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> > >
> > > 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                       |
> 653 +++
> > >  CryptoPkg/Library/Include/CrtLibSupport.h                            |
> 2 +
> > >  CryptoPkg/Library/Include/openssl/opensslconf.h                      |
> 3 -
> > >  CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c                 |
> 34 +
> > >  CryptoPkg/Library/OpensslLib/X64/ApiHooks.c                          |
> 18 +
> > >  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                        |
> 232 +-
> > >  CryptoPkg/Library/OpensslLib/uefi-asm.conf                           |
> 21 +
> > >  22 files changed, 26746 insertions(+), 50 deletions(-)
> > >  create mode 100644 CryptoPkg/Library/OpensslLib/OpensslLibX64.inf
> > >  create mode 100644
> > CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
> > >  create mode 100644 CryptoPkg/Library/OpensslLib/X64/ApiHooks.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
> >
> >
> >
> > 
> >


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-06  9:50     ` Zurcher, Christopher J
@ 2020-11-06 10:22       ` Yao, Jiewen
  2020-11-06 19:35         ` Zurcher, Christopher J
  0 siblings, 1 reply; 28+ messages in thread
From: Yao, Jiewen @ 2020-11-06 10:22 UTC (permalink / raw)
  To: Zurcher, Christopher J, devel@edk2.groups.io
  Cc: Wang, Jian J, Lu, XiaoyuX, Kinney, Michael D, Ard Biesheuvel

Hi Zurcher
I am not CI person, so I recommend you have a discussion with Mike, Laszlo, or Liming to see what is the best way to resolve the coding style issue. Or how to change CI rule to add exception somewhere.

However, I do have concern, when you say: "the module is not compatible with GCC builds."

In previous review, I already gave the comment to pass build with GCC and CLANG besides MSVC. Do you mean this patch cannot pass GCC build?

Thank you
Yao Jiewen

> -----Original Message-----
> From: Zurcher, Christopher J <christopher.j.zurcher@intel.com>
> Sent: Friday, November 6, 2020 5:50 PM
> To: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io
> Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> <xiaoyux.lu@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>;
> Ard Biesheuvel <ard.biesheuvel@arm.com>
> Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> instruction support for X64
> 
> I think some of these errors are not relevant based on the nature of the
> commit:
> 
> One of the errors reported is that the added typedefs (ptrdiff_t, wchar_t) do
> not follow coding guidelines, but the typedefs are required for OpenSSL
> compatibility and they match the already-existing style:
> 
>  typedef UINTN          size_t;
>  typedef UINTN          u_int;
> +typedef INTN           ptrdiff_t;
>  typedef INTN           ssize_t;
>  typedef INT32          time_t;
>  typedef UINT8          __uint8_t;
>  typedef UINT8          sa_family_t;
>  typedef UINT8          u_char;
>  typedef UINT32         uid_t;
>  typedef UINT32         gid_t;
> +typedef CHAR16         wchar_t;
> 
> Another error is that the auto-generated assembly files do not start with
> capital letters, but these filenames come from OpenSSL with lowercase
> filenames, and we already have opensslconf.h in the Include folder which
> has a lowercase filename.
> 
> Another error type reported is that the auto-generated assembly files do not
> have "SPDX-License-Identifier: BSD-2-Clause-Patent" but it was already
> discussed on the list that these would be checked in with the OpenSSL header
> similar to opensslconf.h:
> https://github.com/tianocore/edk2/blob/master/CryptoPkg/Library/Include/
> openssl/opensslconf.h
> 
> Additionally, there is an error that OpensslLibX64.inf is not in CryptoPkg.dsc,
> but I am not sure if it is appropriate to include as the module is not
> compatible with GCC builds.
> 
> How should I proceed here?
> 
> Thanks,
> Christopher Zurcher
> 
> > -----Original Message-----
> > From: Yao, Jiewen <jiewen.yao@intel.com>
> > Sent: Thursday, November 5, 2020 22:14
> > To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel.com>; Zurcher,
> > Christopher J <christopher.j.zurcher@intel.com>
> > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> <xiaoyux.lu@intel.com>;
> > Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > <ard.biesheuvel@arm.com>
> > Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> > instruction support for X64
> >
> > Hi Zurcher
> > I created https://github.com/tianocore/edk2/pull/1092
> >
> > However, there are failures in CI test. So this patch is NOT merged.
> >
> > Please take a look and resolve it.
> >
> > Thank you
> > Yao Jiewen
> >
> > > -----Original Message-----
> > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Yao,
> > > Jiewen
> > > Sent: Friday, November 6, 2020 1:56 PM
> > > To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> > > devel@edk2.groups.io
> > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > > <xiaoyux.lu@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>;
> > > Ard Biesheuvel <ard.biesheuvel@arm.com>
> > > Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
> native
> > > instruction support for X64
> > >
> > > Patch 1/2 reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
> > >
> > > > -----Original Message-----
> > > > From: Christopher J Zurcher <christopher.j.zurcher@intel.com>
> > > > Sent: Wednesday, November 4, 2020 5:59 AM
> > > > To: devel@edk2.groups.io
> > > > Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J
> > > > <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Kinney,
> > > > Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > > > <ard.biesheuvel@arm.com>
> > > > Subject: [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction
> > > > support for X64
> > > >
> > > > V5 Changes:
> > > >   Move ApiHooks.c into X64 folder
> > > >   Update process_files.pl to clean architecture-specific subfolders
> > without
> > > >     removing them
> > > >   Rebased INF file to merge latest changes regarding RngLib vs. TimerLib
> > > >
> > > > V4 Changes:
> > > >   Add copyright header to uefi-asm.conf
> > > >   Move [Sources.X64] block to cover entire X64-specific config
> > > >
> > > > 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@intel.com>
> > > > Cc: Jian J Wang <jian.j.wang@intel.com>
> > > > Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> > > > Cc: Mike Kinney <michael.d.kinney@intel.com>
> > > > Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> > > >
> > > > 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                       |
> > 653 +++
> > > >  CryptoPkg/Library/Include/CrtLibSupport.h                            |
> > 2 +
> > > >  CryptoPkg/Library/Include/openssl/opensslconf.h                      |
> > 3 -
> > > >  CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c                 |
> > 34 +
> > > >  CryptoPkg/Library/OpensslLib/X64/ApiHooks.c                          |
> > 18 +
> > > >  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                        |
> > 232 +-
> > > >  CryptoPkg/Library/OpensslLib/uefi-asm.conf                           |
> > 21 +
> > > >  22 files changed, 26746 insertions(+), 50 deletions(-)
> > > >  create mode 100644 CryptoPkg/Library/OpensslLib/OpensslLibX64.inf
> > > >  create mode 100644
> > > CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
> > > >  create mode 100644 CryptoPkg/Library/OpensslLib/X64/ApiHooks.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
> > >
> > >
> > >
> > > 
> > >


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-06 10:22       ` Yao, Jiewen
@ 2020-11-06 19:35         ` Zurcher, Christopher J
  2020-11-06 23:06           ` Yao, Jiewen
  2020-11-09  6:56           ` 回复: " gaoliming
  0 siblings, 2 replies; 28+ messages in thread
From: Zurcher, Christopher J @ 2020-11-06 19:35 UTC (permalink / raw)
  To: Yao, Jiewen, devel@edk2.groups.io, Laszlo Ersek, gaoliming
  Cc: Wang, Jian J, Lu, XiaoyuX, Kinney, Michael D, Ard Biesheuvel

Yes, in response to your request, it was discussed on the mailing list that the OpenSSL assembly code is not compatible with GCC in this format. It is fully functional with VS toolchain and CLANGPDB toolchain. The GCC toolchain appears to be unable to handle some aspects of NASM code, particularly the COMMON section and the "wrt ..imagebase" style of position-independent code.
See 7.6.1 here: https://www.nasm.us/xdoc/2.13.02rc3/html/nasmdoc7.html

Mike/Laszlo/Liming,
Can you help me resolve the CI failures?

Thanks,
Christopher Zurcher

> -----Original Message-----
> From: Yao, Jiewen <jiewen.yao@intel.com>
> Sent: Friday, November 6, 2020 02:23
> To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> devel@edk2.groups.io
> Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>;
> Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> <ard.biesheuvel@arm.com>
> Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> instruction support for X64
> 
> Hi Zurcher
> I am not CI person, so I recommend you have a discussion with Mike, Laszlo,
> or Liming to see what is the best way to resolve the coding style issue. Or
> how to change CI rule to add exception somewhere.
> 
> However, I do have concern, when you say: "the module is not compatible with
> GCC builds."
> 
> In previous review, I already gave the comment to pass build with GCC and
> CLANG besides MSVC. Do you mean this patch cannot pass GCC build?
> 
> Thank you
> Yao Jiewen
> 
> > -----Original Message-----
> > From: Zurcher, Christopher J <christopher.j.zurcher@intel.com>
> > Sent: Friday, November 6, 2020 5:50 PM
> > To: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io
> > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > <xiaoyux.lu@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>;
> > Ard Biesheuvel <ard.biesheuvel@arm.com>
> > Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> > instruction support for X64
> >
> > I think some of these errors are not relevant based on the nature of the
> > commit:
> >
> > One of the errors reported is that the added typedefs (ptrdiff_t, wchar_t)
> do
> > not follow coding guidelines, but the typedefs are required for OpenSSL
> > compatibility and they match the already-existing style:
> >
> >  typedef UINTN          size_t;
> >  typedef UINTN          u_int;
> > +typedef INTN           ptrdiff_t;
> >  typedef INTN           ssize_t;
> >  typedef INT32          time_t;
> >  typedef UINT8          __uint8_t;
> >  typedef UINT8          sa_family_t;
> >  typedef UINT8          u_char;
> >  typedef UINT32         uid_t;
> >  typedef UINT32         gid_t;
> > +typedef CHAR16         wchar_t;
> >
> > Another error is that the auto-generated assembly files do not start with
> > capital letters, but these filenames come from OpenSSL with lowercase
> > filenames, and we already have opensslconf.h in the Include folder which
> > has a lowercase filename.
> >
> > Another error type reported is that the auto-generated assembly files do
> not
> > have "SPDX-License-Identifier: BSD-2-Clause-Patent" but it was already
> > discussed on the list that these would be checked in with the OpenSSL
> header
> > similar to opensslconf.h:
> > https://github.com/tianocore/edk2/blob/master/CryptoPkg/Library/Include/
> > openssl/opensslconf.h
> >
> > Additionally, there is an error that OpensslLibX64.inf is not in
> CryptoPkg.dsc,
> > but I am not sure if it is appropriate to include as the module is not
> > compatible with GCC builds.
> >
> > How should I proceed here?
> >
> > Thanks,
> > Christopher Zurcher
> >
> > > -----Original Message-----
> > > From: Yao, Jiewen <jiewen.yao@intel.com>
> > > Sent: Thursday, November 5, 2020 22:14
> > > To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel.com>; Zurcher,
> > > Christopher J <christopher.j.zurcher@intel.com>
> > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > <xiaoyux.lu@intel.com>;
> > > Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > > <ard.biesheuvel@arm.com>
> > > Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> > > instruction support for X64
> > >
> > > Hi Zurcher
> > > I created https://github.com/tianocore/edk2/pull/1092
> > >
> > > However, there are failures in CI test. So this patch is NOT merged.
> > >
> > > Please take a look and resolve it.
> > >
> > > Thank you
> > > Yao Jiewen
> > >
> > > > -----Original Message-----
> > > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Yao,
> > > > Jiewen
> > > > Sent: Friday, November 6, 2020 1:56 PM
> > > > To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> > > > devel@edk2.groups.io
> > > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > > > <xiaoyux.lu@intel.com>; Kinney, Michael D
> > <michael.d.kinney@intel.com>;
> > > > Ard Biesheuvel <ard.biesheuvel@arm.com>
> > > > Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
> > native
> > > > instruction support for X64
> > > >
> > > > Patch 1/2 reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
> > > >
> > > > > -----Original Message-----
> > > > > From: Christopher J Zurcher <christopher.j.zurcher@intel.com>
> > > > > Sent: Wednesday, November 4, 2020 5:59 AM
> > > > > To: devel@edk2.groups.io
> > > > > Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J
> > > > > <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Kinney,
> > > > > Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > > > > <ard.biesheuvel@arm.com>
> > > > > Subject: [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction
> > > > > support for X64
> > > > >
> > > > > V5 Changes:
> > > > >   Move ApiHooks.c into X64 folder
> > > > >   Update process_files.pl to clean architecture-specific subfolders
> > > without
> > > > >     removing them
> > > > >   Rebased INF file to merge latest changes regarding RngLib vs.
> TimerLib
> > > > >
> > > > > V4 Changes:
> > > > >   Add copyright header to uefi-asm.conf
> > > > >   Move [Sources.X64] block to cover entire X64-specific config
> > > > >
> > > > > 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@intel.com>
> > > > > Cc: Jian J Wang <jian.j.wang@intel.com>
> > > > > Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> > > > > Cc: Mike Kinney <michael.d.kinney@intel.com>
> > > > > Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> > > > >
> > > > > 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
> |
> > > 653 +++
> > > > >  CryptoPkg/Library/Include/CrtLibSupport.h
> |
> > > 2 +
> > > > >  CryptoPkg/Library/Include/openssl/opensslconf.h
> |
> > > 3 -
> > > > >  CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
> |
> > > 34 +
> > > > >  CryptoPkg/Library/OpensslLib/X64/ApiHooks.c
> |
> > > 18 +
> > > > >  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
> |
> > > 232 +-
> > > > >  CryptoPkg/Library/OpensslLib/uefi-asm.conf
> |
> > > 21 +
> > > > >  22 files changed, 26746 insertions(+), 50 deletions(-)
> > > > >  create mode 100644 CryptoPkg/Library/OpensslLib/OpensslLibX64.inf
> > > > >  create mode 100644
> > > > CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
> > > > >  create mode 100644 CryptoPkg/Library/OpensslLib/X64/ApiHooks.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
> > > >
> > > >
> > > >
> > > > 
> > > >


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-06 19:35         ` Zurcher, Christopher J
@ 2020-11-06 23:06           ` Yao, Jiewen
  2020-11-07  2:02             ` Zurcher, Christopher J
  2020-11-09  6:56           ` 回复: " gaoliming
  1 sibling, 1 reply; 28+ messages in thread
From: Yao, Jiewen @ 2020-11-06 23:06 UTC (permalink / raw)
  To: Zurcher, Christopher J, devel@edk2.groups.io, Laszlo Ersek,
	gaoliming
  Cc: Wang, Jian J, Lu, XiaoyuX, Kinney, Michael D, Ard Biesheuvel

So, if someone wants to use this accelerator in Linux with GCC, what he/she need to do?

> -----Original Message-----
> From: Zurcher, Christopher J <christopher.j.zurcher@intel.com>
> Sent: Saturday, November 7, 2020 3:36 AM
> To: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io; Laszlo
> Ersek <lersek@redhat.com>; gaoliming <gaoliming@byosoft.com.cn>
> Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> <xiaoyux.lu@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>;
> Ard Biesheuvel <ard.biesheuvel@arm.com>
> Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> instruction support for X64
> 
> Yes, in response to your request, it was discussed on the mailing list that the
> OpenSSL assembly code is not compatible with GCC in this format. It is fully
> functional with VS toolchain and CLANGPDB toolchain. The GCC toolchain
> appears to be unable to handle some aspects of NASM code, particularly the
> COMMON section and the "wrt ..imagebase" style of position-independent
> code.
> See 7.6.1 here: https://www.nasm.us/xdoc/2.13.02rc3/html/nasmdoc7.html
> 
> Mike/Laszlo/Liming,
> Can you help me resolve the CI failures?
> 
> Thanks,
> Christopher Zurcher
> 
> > -----Original Message-----
> > From: Yao, Jiewen <jiewen.yao@intel.com>
> > Sent: Friday, November 6, 2020 02:23
> > To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> > devel@edk2.groups.io
> > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> <xiaoyux.lu@intel.com>;
> > Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > <ard.biesheuvel@arm.com>
> > Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> > instruction support for X64
> >
> > Hi Zurcher
> > I am not CI person, so I recommend you have a discussion with Mike,
> Laszlo,
> > or Liming to see what is the best way to resolve the coding style issue. Or
> > how to change CI rule to add exception somewhere.
> >
> > However, I do have concern, when you say: "the module is not compatible
> with
> > GCC builds."
> >
> > In previous review, I already gave the comment to pass build with GCC and
> > CLANG besides MSVC. Do you mean this patch cannot pass GCC build?
> >
> > Thank you
> > Yao Jiewen
> >
> > > -----Original Message-----
> > > From: Zurcher, Christopher J <christopher.j.zurcher@intel.com>
> > > Sent: Friday, November 6, 2020 5:50 PM
> > > To: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io
> > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > > <xiaoyux.lu@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>;
> > > Ard Biesheuvel <ard.biesheuvel@arm.com>
> > > Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
> native
> > > instruction support for X64
> > >
> > > I think some of these errors are not relevant based on the nature of the
> > > commit:
> > >
> > > One of the errors reported is that the added typedefs (ptrdiff_t, wchar_t)
> > do
> > > not follow coding guidelines, but the typedefs are required for OpenSSL
> > > compatibility and they match the already-existing style:
> > >
> > >  typedef UINTN          size_t;
> > >  typedef UINTN          u_int;
> > > +typedef INTN           ptrdiff_t;
> > >  typedef INTN           ssize_t;
> > >  typedef INT32          time_t;
> > >  typedef UINT8          __uint8_t;
> > >  typedef UINT8          sa_family_t;
> > >  typedef UINT8          u_char;
> > >  typedef UINT32         uid_t;
> > >  typedef UINT32         gid_t;
> > > +typedef CHAR16         wchar_t;
> > >
> > > Another error is that the auto-generated assembly files do not start with
> > > capital letters, but these filenames come from OpenSSL with lowercase
> > > filenames, and we already have opensslconf.h in the Include folder which
> > > has a lowercase filename.
> > >
> > > Another error type reported is that the auto-generated assembly files do
> > not
> > > have "SPDX-License-Identifier: BSD-2-Clause-Patent" but it was already
> > > discussed on the list that these would be checked in with the OpenSSL
> > header
> > > similar to opensslconf.h:
> > >
> https://github.com/tianocore/edk2/blob/master/CryptoPkg/Library/Include/
> > > openssl/opensslconf.h
> > >
> > > Additionally, there is an error that OpensslLibX64.inf is not in
> > CryptoPkg.dsc,
> > > but I am not sure if it is appropriate to include as the module is not
> > > compatible with GCC builds.
> > >
> > > How should I proceed here?
> > >
> > > Thanks,
> > > Christopher Zurcher
> > >
> > > > -----Original Message-----
> > > > From: Yao, Jiewen <jiewen.yao@intel.com>
> > > > Sent: Thursday, November 5, 2020 22:14
> > > > To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel.com>;
> Zurcher,
> > > > Christopher J <christopher.j.zurcher@intel.com>
> > > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > > <xiaoyux.lu@intel.com>;
> > > > Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > > > <ard.biesheuvel@arm.com>
> > > > Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
> native
> > > > instruction support for X64
> > > >
> > > > Hi Zurcher
> > > > I created https://github.com/tianocore/edk2/pull/1092
> > > >
> > > > However, there are failures in CI test. So this patch is NOT merged.
> > > >
> > > > Please take a look and resolve it.
> > > >
> > > > Thank you
> > > > Yao Jiewen
> > > >
> > > > > -----Original Message-----
> > > > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> Yao,
> > > > > Jiewen
> > > > > Sent: Friday, November 6, 2020 1:56 PM
> > > > > To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> > > > > devel@edk2.groups.io
> > > > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > > > > <xiaoyux.lu@intel.com>; Kinney, Michael D
> > > <michael.d.kinney@intel.com>;
> > > > > Ard Biesheuvel <ard.biesheuvel@arm.com>
> > > > > Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
> > > native
> > > > > instruction support for X64
> > > > >
> > > > > Patch 1/2 reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Christopher J Zurcher <christopher.j.zurcher@intel.com>
> > > > > > Sent: Wednesday, November 4, 2020 5:59 AM
> > > > > > To: devel@edk2.groups.io
> > > > > > Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J
> > > > > > <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>;
> Kinney,
> > > > > > Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > > > > > <ard.biesheuvel@arm.com>
> > > > > > Subject: [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> instruction
> > > > > > support for X64
> > > > > >
> > > > > > V5 Changes:
> > > > > >   Move ApiHooks.c into X64 folder
> > > > > >   Update process_files.pl to clean architecture-specific subfolders
> > > > without
> > > > > >     removing them
> > > > > >   Rebased INF file to merge latest changes regarding RngLib vs.
> > TimerLib
> > > > > >
> > > > > > V4 Changes:
> > > > > >   Add copyright header to uefi-asm.conf
> > > > > >   Move [Sources.X64] block to cover entire X64-specific config
> > > > > >
> > > > > > 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@intel.com>
> > > > > > Cc: Jian J Wang <jian.j.wang@intel.com>
> > > > > > Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> > > > > > Cc: Mike Kinney <michael.d.kinney@intel.com>
> > > > > > Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> > > > > >
> > > > > > 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
> > |
> > > > 653 +++
> > > > > >  CryptoPkg/Library/Include/CrtLibSupport.h
> > |
> > > > 2 +
> > > > > >  CryptoPkg/Library/Include/openssl/opensslconf.h
> > |
> > > > 3 -
> > > > > >  CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
> > |
> > > > 34 +
> > > > > >  CryptoPkg/Library/OpensslLib/X64/ApiHooks.c
> > |
> > > > 18 +
> > > > > >  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
> > |
> > > > 232 +-
> > > > > >  CryptoPkg/Library/OpensslLib/uefi-asm.conf
> > |
> > > > 21 +
> > > > > >  22 files changed, 26746 insertions(+), 50 deletions(-)
> > > > > >  create mode 100644
> CryptoPkg/Library/OpensslLib/OpensslLibX64.inf
> > > > > >  create mode 100644
> > > > > CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
> > > > > >  create mode 100644 CryptoPkg/Library/OpensslLib/X64/ApiHooks.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
> > > > >
> > > > >
> > > > >
> > > > > 
> > > > >


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-06 23:06           ` Yao, Jiewen
@ 2020-11-07  2:02             ` Zurcher, Christopher J
  2020-11-07  2:24               ` Yao, Jiewen
                                 ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Zurcher, Christopher J @ 2020-11-07  2:02 UTC (permalink / raw)
  To: Yao, Jiewen, devel@edk2.groups.io, Laszlo Ersek, gaoliming
  Cc: Wang, Jian J, Lu, XiaoyuX, Kinney, Michael D, Ard Biesheuvel

Their options would be:
1) File a bug against OpenSSL that their NASM code is too advanced for GCC toolchain (unlikely to result in any change since OpenSSL would say GCC build should be using GAS instead of NASM and building outside of their makefile build system is bad practice in the first place).
2) File a bug against GCC that their toolchain can't handle NASM correctly.
3) Use CLANGPDB toolchain instead.

I am not familiar enough with the GCC toolchain to know if there is any way to make it interpret NASM files correctly, so there is a chance that someone who knows more about it could provide some configuration change that could resolve this. But I do not think we should say that VS and CLANGPDB toolchain users can't have OpenSSL acceleration because GCC can't handle it.

Thanks,
Christopher Zurcher

> -----Original Message-----
> From: Yao, Jiewen <jiewen.yao@intel.com>
> Sent: Friday, November 6, 2020 15:07
> To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> devel@edk2.groups.io; Laszlo Ersek <lersek@redhat.com>; gaoliming
> <gaoliming@byosoft.com.cn>
> Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>;
> Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> <ard.biesheuvel@arm.com>
> Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> instruction support for X64
> 
> So, if someone wants to use this accelerator in Linux with GCC, what he/she
> need to do?
> 
> > -----Original Message-----
> > From: Zurcher, Christopher J <christopher.j.zurcher@intel.com>
> > Sent: Saturday, November 7, 2020 3:36 AM
> > To: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io; Laszlo
> > Ersek <lersek@redhat.com>; gaoliming <gaoliming@byosoft.com.cn>
> > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > <xiaoyux.lu@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>;
> > Ard Biesheuvel <ard.biesheuvel@arm.com>
> > Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> > instruction support for X64
> >
> > Yes, in response to your request, it was discussed on the mailing list that
> the
> > OpenSSL assembly code is not compatible with GCC in this format. It is
> fully
> > functional with VS toolchain and CLANGPDB toolchain. The GCC toolchain
> > appears to be unable to handle some aspects of NASM code, particularly the
> > COMMON section and the "wrt ..imagebase" style of position-independent
> > code.
> > See 7.6.1 here: https://www.nasm.us/xdoc/2.13.02rc3/html/nasmdoc7.html
> >
> > Mike/Laszlo/Liming,
> > Can you help me resolve the CI failures?
> >
> > Thanks,
> > Christopher Zurcher
> >
> > > -----Original Message-----
> > > From: Yao, Jiewen <jiewen.yao@intel.com>
> > > Sent: Friday, November 6, 2020 02:23
> > > To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> > > devel@edk2.groups.io
> > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > <xiaoyux.lu@intel.com>;
> > > Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > > <ard.biesheuvel@arm.com>
> > > Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> > > instruction support for X64
> > >
> > > Hi Zurcher
> > > I am not CI person, so I recommend you have a discussion with Mike,
> > Laszlo,
> > > or Liming to see what is the best way to resolve the coding style issue.
> Or
> > > how to change CI rule to add exception somewhere.
> > >
> > > However, I do have concern, when you say: "the module is not compatible
> > with
> > > GCC builds."
> > >
> > > In previous review, I already gave the comment to pass build with GCC and
> > > CLANG besides MSVC. Do you mean this patch cannot pass GCC build?
> > >
> > > Thank you
> > > Yao Jiewen
> > >
> > > > -----Original Message-----
> > > > From: Zurcher, Christopher J <christopher.j.zurcher@intel.com>
> > > > Sent: Friday, November 6, 2020 5:50 PM
> > > > To: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io
> > > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > > > <xiaoyux.lu@intel.com>; Kinney, Michael D
> > <michael.d.kinney@intel.com>;
> > > > Ard Biesheuvel <ard.biesheuvel@arm.com>
> > > > Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
> > native
> > > > instruction support for X64
> > > >
> > > > I think some of these errors are not relevant based on the nature of
> the
> > > > commit:
> > > >
> > > > One of the errors reported is that the added typedefs (ptrdiff_t,
> wchar_t)
> > > do
> > > > not follow coding guidelines, but the typedefs are required for OpenSSL
> > > > compatibility and they match the already-existing style:
> > > >
> > > >  typedef UINTN          size_t;
> > > >  typedef UINTN          u_int;
> > > > +typedef INTN           ptrdiff_t;
> > > >  typedef INTN           ssize_t;
> > > >  typedef INT32          time_t;
> > > >  typedef UINT8          __uint8_t;
> > > >  typedef UINT8          sa_family_t;
> > > >  typedef UINT8          u_char;
> > > >  typedef UINT32         uid_t;
> > > >  typedef UINT32         gid_t;
> > > > +typedef CHAR16         wchar_t;
> > > >
> > > > Another error is that the auto-generated assembly files do not start
> with
> > > > capital letters, but these filenames come from OpenSSL with lowercase
> > > > filenames, and we already have opensslconf.h in the Include folder
> which
> > > > has a lowercase filename.
> > > >
> > > > Another error type reported is that the auto-generated assembly files
> do
> > > not
> > > > have "SPDX-License-Identifier: BSD-2-Clause-Patent" but it was already
> > > > discussed on the list that these would be checked in with the OpenSSL
> > > header
> > > > similar to opensslconf.h:
> > > >
> > https://github.com/tianocore/edk2/blob/master/CryptoPkg/Library/Include/
> > > > openssl/opensslconf.h
> > > >
> > > > Additionally, there is an error that OpensslLibX64.inf is not in
> > > CryptoPkg.dsc,
> > > > but I am not sure if it is appropriate to include as the module is not
> > > > compatible with GCC builds.
> > > >
> > > > How should I proceed here?
> > > >
> > > > Thanks,
> > > > Christopher Zurcher
> > > >
> > > > > -----Original Message-----
> > > > > From: Yao, Jiewen <jiewen.yao@intel.com>
> > > > > Sent: Thursday, November 5, 2020 22:14
> > > > > To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel.com>;
> > Zurcher,
> > > > > Christopher J <christopher.j.zurcher@intel.com>
> > > > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > > > <xiaoyux.lu@intel.com>;
> > > > > Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > > > > <ard.biesheuvel@arm.com>
> > > > > Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
> > native
> > > > > instruction support for X64
> > > > >
> > > > > Hi Zurcher
> > > > > I created https://github.com/tianocore/edk2/pull/1092
> > > > >
> > > > > However, there are failures in CI test. So this patch is NOT merged.
> > > > >
> > > > > Please take a look and resolve it.
> > > > >
> > > > > Thank you
> > > > > Yao Jiewen
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> > Yao,
> > > > > > Jiewen
> > > > > > Sent: Friday, November 6, 2020 1:56 PM
> > > > > > To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> > > > > > devel@edk2.groups.io
> > > > > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > > > > > <xiaoyux.lu@intel.com>; Kinney, Michael D
> > > > <michael.d.kinney@intel.com>;
> > > > > > Ard Biesheuvel <ard.biesheuvel@arm.com>
> > > > > > Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
> > > > native
> > > > > > instruction support for X64
> > > > > >
> > > > > > Patch 1/2 reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Christopher J Zurcher <christopher.j.zurcher@intel.com>
> > > > > > > Sent: Wednesday, November 4, 2020 5:59 AM
> > > > > > > To: devel@edk2.groups.io
> > > > > > > Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J
> > > > > > > <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>;
> > Kinney,
> > > > > > > Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > > > > > > <ard.biesheuvel@arm.com>
> > > > > > > Subject: [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> > instruction
> > > > > > > support for X64
> > > > > > >
> > > > > > > V5 Changes:
> > > > > > >   Move ApiHooks.c into X64 folder
> > > > > > >   Update process_files.pl to clean architecture-specific
> subfolders
> > > > > without
> > > > > > >     removing them
> > > > > > >   Rebased INF file to merge latest changes regarding RngLib vs.
> > > TimerLib
> > > > > > >
> > > > > > > V4 Changes:
> > > > > > >   Add copyright header to uefi-asm.conf
> > > > > > >   Move [Sources.X64] block to cover entire X64-specific config
> > > > > > >
> > > > > > > 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@intel.com>
> > > > > > > Cc: Jian J Wang <jian.j.wang@intel.com>
> > > > > > > Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> > > > > > > Cc: Mike Kinney <michael.d.kinney@intel.com>
> > > > > > > Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> > > > > > >
> > > > > > > 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
> > > |
> > > > > 653 +++
> > > > > > >  CryptoPkg/Library/Include/CrtLibSupport.h
> > > |
> > > > > 2 +
> > > > > > >  CryptoPkg/Library/Include/openssl/opensslconf.h
> > > |
> > > > > 3 -
> > > > > > >  CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
> > > |
> > > > > 34 +
> > > > > > >  CryptoPkg/Library/OpensslLib/X64/ApiHooks.c
> > > |
> > > > > 18 +
> > > > > > >  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
> > > |
> > > > > 232 +-
> > > > > > >  CryptoPkg/Library/OpensslLib/uefi-asm.conf
> > > |
> > > > > 21 +
> > > > > > >  22 files changed, 26746 insertions(+), 50 deletions(-)
> > > > > > >  create mode 100644
> > CryptoPkg/Library/OpensslLib/OpensslLibX64.inf
> > > > > > >  create mode 100644
> > > > > > CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
> > > > > > >  create mode 100644 CryptoPkg/Library/OpensslLib/X64/ApiHooks.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
> > > > > >
> > > > > >
> > > > > >
> > > > > > 
> > > > > >


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-07  2:02             ` Zurcher, Christopher J
@ 2020-11-07  2:24               ` Yao, Jiewen
  2020-11-07  7:26                 ` Michael D Kinney
  2020-11-10 12:31                 ` Laszlo Ersek
  2020-11-09  7:03               ` 回复: " gaoliming
  2020-11-10 12:24               ` Laszlo Ersek
  2 siblings, 2 replies; 28+ messages in thread
From: Yao, Jiewen @ 2020-11-07  2:24 UTC (permalink / raw)
  To: Zurcher, Christopher J
  Cc: devel@edk2.groups.io, Laszlo Ersek, gaoliming, Wang, Jian J,
	Lu, XiaoyuX, Kinney, Michael D, Ard Biesheuvel

The reason we choose NASM is that we can use same assembly in windows build and Linux build. However if this NASM cannot be used in Linux, then the benefit does not exist any more. You can generate GAS to support GCC build, and check in .S file. 

thank you!
Yao, Jiewen


> 在 2020年11月7日,上午10:02,Zurcher, Christopher J <christopher.j.zurcher@intel.com> 写道:
> 
> Their options would be:
> 1) File a bug against OpenSSL that their NASM code is too advanced for GCC toolchain (unlikely to result in any change since OpenSSL would say GCC build should be using GAS instead of NASM and building outside of their makefile build system is bad practice in the first place).
> 2) File a bug against GCC that their toolchain can't handle NASM correctly.
> 3) Use CLANGPDB toolchain instead.
> 
> I am not familiar enough with the GCC toolchain to know if there is any way to make it interpret NASM files correctly, so there is a chance that someone who knows more about it could provide some configuration change that could resolve this. But I do not think we should say that VS and CLANGPDB toolchain users can't have OpenSSL acceleration because GCC can't handle it.
> 
> Thanks,
> Christopher Zurcher
> 
>> -----Original Message-----
>> From: Yao, Jiewen <jiewen.yao@intel.com>
>> Sent: Friday, November 6, 2020 15:07
>> To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
>> devel@edk2.groups.io; Laszlo Ersek <lersek@redhat.com>; gaoliming
>> <gaoliming@byosoft.com.cn>
>> Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>;
>> Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
>> <ard.biesheuvel@arm.com>
>> Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
>> instruction support for X64
>> 
>> So, if someone wants to use this accelerator in Linux with GCC, what he/she
>> need to do?
>> 
>>> -----Original Message-----
>>> From: Zurcher, Christopher J <christopher.j.zurcher@intel.com>
>>> Sent: Saturday, November 7, 2020 3:36 AM
>>> To: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io; Laszlo
>>> Ersek <lersek@redhat.com>; gaoliming <gaoliming@byosoft.com.cn>
>>> Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
>>> <xiaoyux.lu@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>;
>>> Ard Biesheuvel <ard.biesheuvel@arm.com>
>>> Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
>>> instruction support for X64
>>> 
>>> Yes, in response to your request, it was discussed on the mailing list that
>> the
>>> OpenSSL assembly code is not compatible with GCC in this format. It is
>> fully
>>> functional with VS toolchain and CLANGPDB toolchain. The GCC toolchain
>>> appears to be unable to handle some aspects of NASM code, particularly the
>>> COMMON section and the "wrt ..imagebase" style of position-independent
>>> code.
>>> See 7.6.1 here: https://www.nasm.us/xdoc/2.13.02rc3/html/nasmdoc7.html
>>> 
>>> Mike/Laszlo/Liming,
>>> Can you help me resolve the CI failures?
>>> 
>>> Thanks,
>>> Christopher Zurcher
>>> 
>>>> -----Original Message-----
>>>> From: Yao, Jiewen <jiewen.yao@intel.com>
>>>> Sent: Friday, November 6, 2020 02:23
>>>> To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
>>>> devel@edk2.groups.io
>>>> Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
>>> <xiaoyux.lu@intel.com>;
>>>> Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
>>>> <ard.biesheuvel@arm.com>
>>>> Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
>>>> instruction support for X64
>>>> 
>>>> Hi Zurcher
>>>> I am not CI person, so I recommend you have a discussion with Mike,
>>> Laszlo,
>>>> or Liming to see what is the best way to resolve the coding style issue.
>> Or
>>>> how to change CI rule to add exception somewhere.
>>>> 
>>>> However, I do have concern, when you say: "the module is not compatible
>>> with
>>>> GCC builds."
>>>> 
>>>> In previous review, I already gave the comment to pass build with GCC and
>>>> CLANG besides MSVC. Do you mean this patch cannot pass GCC build?
>>>> 
>>>> Thank you
>>>> Yao Jiewen
>>>> 
>>>>> -----Original Message-----
>>>>> From: Zurcher, Christopher J <christopher.j.zurcher@intel.com>
>>>>> Sent: Friday, November 6, 2020 5:50 PM
>>>>> To: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io
>>>>> Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
>>>>> <xiaoyux.lu@intel.com>; Kinney, Michael D
>>> <michael.d.kinney@intel.com>;
>>>>> Ard Biesheuvel <ard.biesheuvel@arm.com>
>>>>> Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
>>> native
>>>>> instruction support for X64
>>>>> 
>>>>> I think some of these errors are not relevant based on the nature of
>> the
>>>>> commit:
>>>>> 
>>>>> One of the errors reported is that the added typedefs (ptrdiff_t,
>> wchar_t)
>>>> do
>>>>> not follow coding guidelines, but the typedefs are required for OpenSSL
>>>>> compatibility and they match the already-existing style:
>>>>> 
>>>>> typedef UINTN          size_t;
>>>>> typedef UINTN          u_int;
>>>>> +typedef INTN           ptrdiff_t;
>>>>> typedef INTN           ssize_t;
>>>>> typedef INT32          time_t;
>>>>> typedef UINT8          __uint8_t;
>>>>> typedef UINT8          sa_family_t;
>>>>> typedef UINT8          u_char;
>>>>> typedef UINT32         uid_t;
>>>>> typedef UINT32         gid_t;
>>>>> +typedef CHAR16         wchar_t;
>>>>> 
>>>>> Another error is that the auto-generated assembly files do not start
>> with
>>>>> capital letters, but these filenames come from OpenSSL with lowercase
>>>>> filenames, and we already have opensslconf.h in the Include folder
>> which
>>>>> has a lowercase filename.
>>>>> 
>>>>> Another error type reported is that the auto-generated assembly files
>> do
>>>> not
>>>>> have "SPDX-License-Identifier: BSD-2-Clause-Patent" but it was already
>>>>> discussed on the list that these would be checked in with the OpenSSL
>>>> header
>>>>> similar to opensslconf.h:
>>>>> 
>>> https://github.com/tianocore/edk2/blob/master/CryptoPkg/Library/Include/
>>>>> openssl/opensslconf.h
>>>>> 
>>>>> Additionally, there is an error that OpensslLibX64.inf is not in
>>>> CryptoPkg.dsc,
>>>>> but I am not sure if it is appropriate to include as the module is not
>>>>> compatible with GCC builds.
>>>>> 
>>>>> How should I proceed here?
>>>>> 
>>>>> Thanks,
>>>>> Christopher Zurcher
>>>>> 
>>>>>> -----Original Message-----
>>>>>> From: Yao, Jiewen <jiewen.yao@intel.com>
>>>>>> Sent: Thursday, November 5, 2020 22:14
>>>>>> To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel.com>;
>>> Zurcher,
>>>>>> Christopher J <christopher.j.zurcher@intel.com>
>>>>>> Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
>>>>> <xiaoyux.lu@intel.com>;
>>>>>> Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
>>>>>> <ard.biesheuvel@arm.com>
>>>>>> Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
>>> native
>>>>>> instruction support for X64
>>>>>> 
>>>>>> Hi Zurcher
>>>>>> I created https://github.com/tianocore/edk2/pull/1092
>>>>>> 
>>>>>> However, there are failures in CI test. So this patch is NOT merged.
>>>>>> 
>>>>>> Please take a look and resolve it.
>>>>>> 
>>>>>> Thank you
>>>>>> Yao Jiewen
>>>>>> 
>>>>>>> -----Original Message-----
>>>>>>> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
>>> Yao,
>>>>>>> Jiewen
>>>>>>> Sent: Friday, November 6, 2020 1:56 PM
>>>>>>> To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
>>>>>>> devel@edk2.groups.io
>>>>>>> Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
>>>>>>> <xiaoyux.lu@intel.com>; Kinney, Michael D
>>>>> <michael.d.kinney@intel.com>;
>>>>>>> Ard Biesheuvel <ard.biesheuvel@arm.com>
>>>>>>> Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
>>>>> native
>>>>>>> instruction support for X64
>>>>>>> 
>>>>>>> Patch 1/2 reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
>>>>>>> 
>>>>>>>> -----Original Message-----
>>>>>>>> From: Christopher J Zurcher <christopher.j.zurcher@intel.com>
>>>>>>>> Sent: Wednesday, November 4, 2020 5:59 AM
>>>>>>>> To: devel@edk2.groups.io
>>>>>>>> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J
>>>>>>>> <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>;
>>> Kinney,
>>>>>>>> Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
>>>>>>>> <ard.biesheuvel@arm.com>
>>>>>>>> Subject: [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
>>> instruction
>>>>>>>> support for X64
>>>>>>>> 
>>>>>>>> V5 Changes:
>>>>>>>>  Move ApiHooks.c into X64 folder
>>>>>>>>  Update process_files.pl to clean architecture-specific
>> subfolders
>>>>>> without
>>>>>>>>    removing them
>>>>>>>>  Rebased INF file to merge latest changes regarding RngLib vs.
>>>> TimerLib
>>>>>>>> 
>>>>>>>> V4 Changes:
>>>>>>>>  Add copyright header to uefi-asm.conf
>>>>>>>>  Move [Sources.X64] block to cover entire X64-specific config
>>>>>>>> 
>>>>>>>> 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@intel.com>
>>>>>>>> Cc: Jian J Wang <jian.j.wang@intel.com>
>>>>>>>> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
>>>>>>>> Cc: Mike Kinney <michael.d.kinney@intel.com>
>>>>>>>> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
>>>>>>>> 
>>>>>>>> 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
>>>> |
>>>>>> 653 +++
>>>>>>>> CryptoPkg/Library/Include/CrtLibSupport.h
>>>> |
>>>>>> 2 +
>>>>>>>> CryptoPkg/Library/Include/openssl/opensslconf.h
>>>> |
>>>>>> 3 -
>>>>>>>> CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
>>>> |
>>>>>> 34 +
>>>>>>>> CryptoPkg/Library/OpensslLib/X64/ApiHooks.c
>>>> |
>>>>>> 18 +
>>>>>>>> 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
>>>> |
>>>>>> 232 +-
>>>>>>>> CryptoPkg/Library/OpensslLib/uefi-asm.conf
>>>> |
>>>>>> 21 +
>>>>>>>> 22 files changed, 26746 insertions(+), 50 deletions(-)
>>>>>>>> create mode 100644
>>> CryptoPkg/Library/OpensslLib/OpensslLibX64.inf
>>>>>>>> create mode 100644
>>>>>>> CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
>>>>>>>> create mode 100644 CryptoPkg/Library/OpensslLib/X64/ApiHooks.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
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
> 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-07  2:24               ` Yao, Jiewen
@ 2020-11-07  7:26                 ` Michael D Kinney
  2020-11-10 12:31                 ` Laszlo Ersek
  1 sibling, 0 replies; 28+ messages in thread
From: Michael D Kinney @ 2020-11-07  7:26 UTC (permalink / raw)
  To: Yao, Jiewen, Zurcher, Christopher J, Kinney, Michael D
  Cc: devel@edk2.groups.io, Laszlo Ersek, gaoliming, Wang, Jian J,
	Lu, XiaoyuX, Ard Biesheuvel

Are you using the latest version of NASM in the Linux environment?  You may have to build it from sources.

Mike

> -----Original Message-----
> From: Yao, Jiewen <jiewen.yao@intel.com>
> Sent: Friday, November 6, 2020 6:24 PM
> To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>
> Cc: devel@edk2.groups.io; Laszlo Ersek <lersek@redhat.com>; gaoliming <gaoliming@byosoft.com.cn>; Wang, Jian J
> <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Ard
> Biesheuvel <ard.biesheuvel@arm.com>
> Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
> 
> The reason we choose NASM is that we can use same assembly in windows build and Linux build. However if this NASM cannot
> be used in Linux, then the benefit does not exist any more. You can generate GAS to support GCC build, and check in .S
> file.
> 
> thank you!
> Yao, Jiewen
> 
> 
> > 在 2020年11月7日,上午10:02,Zurcher, Christopher J <christopher.j.zurcher@intel.com> 写道:
> >
> > Their options would be:
> > 1) File a bug against OpenSSL that their NASM code is too advanced for GCC toolchain (unlikely to result in any change
> since OpenSSL would say GCC build should be using GAS instead of NASM and building outside of their makefile build system
> is bad practice in the first place).
> > 2) File a bug against GCC that their toolchain can't handle NASM correctly.
> > 3) Use CLANGPDB toolchain instead.
> >
> > I am not familiar enough with the GCC toolchain to know if there is any way to make it interpret NASM files correctly,
> so there is a chance that someone who knows more about it could provide some configuration change that could resolve this.
> But I do not think we should say that VS and CLANGPDB toolchain users can't have OpenSSL acceleration because GCC can't
> handle it.
> >
> > Thanks,
> > Christopher Zurcher
> >
> >> -----Original Message-----
> >> From: Yao, Jiewen <jiewen.yao@intel.com>
> >> Sent: Friday, November 6, 2020 15:07
> >> To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> >> devel@edk2.groups.io; Laszlo Ersek <lersek@redhat.com>; gaoliming
> >> <gaoliming@byosoft.com.cn>
> >> Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>;
> >> Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> >> <ard.biesheuvel@arm.com>
> >> Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> >> instruction support for X64
> >>
> >> So, if someone wants to use this accelerator in Linux with GCC, what he/she
> >> need to do?
> >>
> >>> -----Original Message-----
> >>> From: Zurcher, Christopher J <christopher.j.zurcher@intel.com>
> >>> Sent: Saturday, November 7, 2020 3:36 AM
> >>> To: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io; Laszlo
> >>> Ersek <lersek@redhat.com>; gaoliming <gaoliming@byosoft.com.cn>
> >>> Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> >>> <xiaoyux.lu@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>;
> >>> Ard Biesheuvel <ard.biesheuvel@arm.com>
> >>> Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> >>> instruction support for X64
> >>>
> >>> Yes, in response to your request, it was discussed on the mailing list that
> >> the
> >>> OpenSSL assembly code is not compatible with GCC in this format. It is
> >> fully
> >>> functional with VS toolchain and CLANGPDB toolchain. The GCC toolchain
> >>> appears to be unable to handle some aspects of NASM code, particularly the
> >>> COMMON section and the "wrt ..imagebase" style of position-independent
> >>> code.
> >>> See 7.6.1 here: https://www.nasm.us/xdoc/2.13.02rc3/html/nasmdoc7.html
> >>>
> >>> Mike/Laszlo/Liming,
> >>> Can you help me resolve the CI failures?
> >>>
> >>> Thanks,
> >>> Christopher Zurcher
> >>>
> >>>> -----Original Message-----
> >>>> From: Yao, Jiewen <jiewen.yao@intel.com>
> >>>> Sent: Friday, November 6, 2020 02:23
> >>>> To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> >>>> devel@edk2.groups.io
> >>>> Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> >>> <xiaoyux.lu@intel.com>;
> >>>> Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> >>>> <ard.biesheuvel@arm.com>
> >>>> Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> >>>> instruction support for X64
> >>>>
> >>>> Hi Zurcher
> >>>> I am not CI person, so I recommend you have a discussion with Mike,
> >>> Laszlo,
> >>>> or Liming to see what is the best way to resolve the coding style issue.
> >> Or
> >>>> how to change CI rule to add exception somewhere.
> >>>>
> >>>> However, I do have concern, when you say: "the module is not compatible
> >>> with
> >>>> GCC builds."
> >>>>
> >>>> In previous review, I already gave the comment to pass build with GCC and
> >>>> CLANG besides MSVC. Do you mean this patch cannot pass GCC build?
> >>>>
> >>>> Thank you
> >>>> Yao Jiewen
> >>>>
> >>>>> -----Original Message-----
> >>>>> From: Zurcher, Christopher J <christopher.j.zurcher@intel.com>
> >>>>> Sent: Friday, November 6, 2020 5:50 PM
> >>>>> To: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io
> >>>>> Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> >>>>> <xiaoyux.lu@intel.com>; Kinney, Michael D
> >>> <michael.d.kinney@intel.com>;
> >>>>> Ard Biesheuvel <ard.biesheuvel@arm.com>
> >>>>> Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
> >>> native
> >>>>> instruction support for X64
> >>>>>
> >>>>> I think some of these errors are not relevant based on the nature of
> >> the
> >>>>> commit:
> >>>>>
> >>>>> One of the errors reported is that the added typedefs (ptrdiff_t,
> >> wchar_t)
> >>>> do
> >>>>> not follow coding guidelines, but the typedefs are required for OpenSSL
> >>>>> compatibility and they match the already-existing style:
> >>>>>
> >>>>> typedef UINTN          size_t;
> >>>>> typedef UINTN          u_int;
> >>>>> +typedef INTN           ptrdiff_t;
> >>>>> typedef INTN           ssize_t;
> >>>>> typedef INT32          time_t;
> >>>>> typedef UINT8          __uint8_t;
> >>>>> typedef UINT8          sa_family_t;
> >>>>> typedef UINT8          u_char;
> >>>>> typedef UINT32         uid_t;
> >>>>> typedef UINT32         gid_t;
> >>>>> +typedef CHAR16         wchar_t;
> >>>>>
> >>>>> Another error is that the auto-generated assembly files do not start
> >> with
> >>>>> capital letters, but these filenames come from OpenSSL with lowercase
> >>>>> filenames, and we already have opensslconf.h in the Include folder
> >> which
> >>>>> has a lowercase filename.
> >>>>>
> >>>>> Another error type reported is that the auto-generated assembly files
> >> do
> >>>> not
> >>>>> have "SPDX-License-Identifier: BSD-2-Clause-Patent" but it was already
> >>>>> discussed on the list that these would be checked in with the OpenSSL
> >>>> header
> >>>>> similar to opensslconf.h:
> >>>>>
> >>> https://github.com/tianocore/edk2/blob/master/CryptoPkg/Library/Include/
> >>>>> openssl/opensslconf.h
> >>>>>
> >>>>> Additionally, there is an error that OpensslLibX64.inf is not in
> >>>> CryptoPkg.dsc,
> >>>>> but I am not sure if it is appropriate to include as the module is not
> >>>>> compatible with GCC builds.
> >>>>>
> >>>>> How should I proceed here?
> >>>>>
> >>>>> Thanks,
> >>>>> Christopher Zurcher
> >>>>>
> >>>>>> -----Original Message-----
> >>>>>> From: Yao, Jiewen <jiewen.yao@intel.com>
> >>>>>> Sent: Thursday, November 5, 2020 22:14
> >>>>>> To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel.com>;
> >>> Zurcher,
> >>>>>> Christopher J <christopher.j.zurcher@intel.com>
> >>>>>> Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> >>>>> <xiaoyux.lu@intel.com>;
> >>>>>> Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> >>>>>> <ard.biesheuvel@arm.com>
> >>>>>> Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
> >>> native
> >>>>>> instruction support for X64
> >>>>>>
> >>>>>> Hi Zurcher
> >>>>>> I created https://github.com/tianocore/edk2/pull/1092
> >>>>>>
> >>>>>> However, there are failures in CI test. So this patch is NOT merged.
> >>>>>>
> >>>>>> Please take a look and resolve it.
> >>>>>>
> >>>>>> Thank you
> >>>>>> Yao Jiewen
> >>>>>>
> >>>>>>> -----Original Message-----
> >>>>>>> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> >>> Yao,
> >>>>>>> Jiewen
> >>>>>>> Sent: Friday, November 6, 2020 1:56 PM
> >>>>>>> To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> >>>>>>> devel@edk2.groups.io
> >>>>>>> Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> >>>>>>> <xiaoyux.lu@intel.com>; Kinney, Michael D
> >>>>> <michael.d.kinney@intel.com>;
> >>>>>>> Ard Biesheuvel <ard.biesheuvel@arm.com>
> >>>>>>> Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
> >>>>> native
> >>>>>>> instruction support for X64
> >>>>>>>
> >>>>>>> Patch 1/2 reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
> >>>>>>>
> >>>>>>>> -----Original Message-----
> >>>>>>>> From: Christopher J Zurcher <christopher.j.zurcher@intel.com>
> >>>>>>>> Sent: Wednesday, November 4, 2020 5:59 AM
> >>>>>>>> To: devel@edk2.groups.io
> >>>>>>>> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J
> >>>>>>>> <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>;
> >>> Kinney,
> >>>>>>>> Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> >>>>>>>> <ard.biesheuvel@arm.com>
> >>>>>>>> Subject: [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> >>> instruction
> >>>>>>>> support for X64
> >>>>>>>>
> >>>>>>>> V5 Changes:
> >>>>>>>>  Move ApiHooks.c into X64 folder
> >>>>>>>>  Update process_files.pl to clean architecture-specific
> >> subfolders
> >>>>>> without
> >>>>>>>>    removing them
> >>>>>>>>  Rebased INF file to merge latest changes regarding RngLib vs.
> >>>> TimerLib
> >>>>>>>>
> >>>>>>>> V4 Changes:
> >>>>>>>>  Add copyright header to uefi-asm.conf
> >>>>>>>>  Move [Sources.X64] block to cover entire X64-specific config
> >>>>>>>>
> >>>>>>>> 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@intel.com>
> >>>>>>>> Cc: Jian J Wang <jian.j.wang@intel.com>
> >>>>>>>> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> >>>>>>>> Cc: Mike Kinney <michael.d.kinney@intel.com>
> >>>>>>>> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> >>>>>>>>
> >>>>>>>> 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
> >>>> |
> >>>>>> 653 +++
> >>>>>>>> CryptoPkg/Library/Include/CrtLibSupport.h
> >>>> |
> >>>>>> 2 +
> >>>>>>>> CryptoPkg/Library/Include/openssl/opensslconf.h
> >>>> |
> >>>>>> 3 -
> >>>>>>>> CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
> >>>> |
> >>>>>> 34 +
> >>>>>>>> CryptoPkg/Library/OpensslLib/X64/ApiHooks.c
> >>>> |
> >>>>>> 18 +
> >>>>>>>> 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
> >>>> |
> >>>>>> 232 +-
> >>>>>>>> CryptoPkg/Library/OpensslLib/uefi-asm.conf
> >>>> |
> >>>>>> 21 +
> >>>>>>>> 22 files changed, 26746 insertions(+), 50 deletions(-)
> >>>>>>>> create mode 100644
> >>> CryptoPkg/Library/OpensslLib/OpensslLibX64.inf
> >>>>>>>> create mode 100644
> >>>>>>> CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
> >>>>>>>> create mode 100644 CryptoPkg/Library/OpensslLib/X64/ApiHooks.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
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> 
> >>>>>>>
> >

^ permalink raw reply	[flat|nested] 28+ messages in thread

* 回复: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-06 19:35         ` Zurcher, Christopher J
  2020-11-06 23:06           ` Yao, Jiewen
@ 2020-11-09  6:56           ` gaoliming
  1 sibling, 0 replies; 28+ messages in thread
From: gaoliming @ 2020-11-09  6:56 UTC (permalink / raw)
  To: 'Zurcher, Christopher J', 'Yao, Jiewen', devel,
	'Laszlo Ersek'
  Cc: 'Wang, Jian J', 'Lu, XiaoyuX',
	'Kinney, Michael D', 'Ard Biesheuvel'

Zurcher:
  https://www.nasm.us/xdoc/2.13.02rc3/html/nasmdoc7.html mentions wrt
..imagebase usage in 7.6 win64: Microsoft Win64 Object Files. 
  So, it is only for win64 object. VS and CLANGPDB tool chain uses nasm
win64 object. But, GCC5 uses nasm elf64 object, and XCODE uses nasm macho64
object.

  That means this native support for X64 is for VS tool chain only. 

Thanks
Liming
> -----邮件原件-----
> 发件人: Zurcher, Christopher J <christopher.j.zurcher@intel.com>
> 发送时间: 2020年11月7日 3:36
> 收件人: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io; Laszlo
> Ersek <lersek@redhat.com>; gaoliming <gaoliming@byosoft.com.cn>
> 抄送: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> <xiaoyux.lu@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>;
> Ard Biesheuvel <ard.biesheuvel@arm.com>
> 主题: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> instruction support for X64
> 
> Yes, in response to your request, it was discussed on the mailing list
that the
> OpenSSL assembly code is not compatible with GCC in this format. It is
fully
> functional with VS toolchain and CLANGPDB toolchain. The GCC toolchain
> appears to be unable to handle some aspects of NASM code, particularly the
> COMMON section and the "wrt ..imagebase" style of position-independent
> code.
> See 7.6.1 here: https://www.nasm.us/xdoc/2.13.02rc3/html/nasmdoc7.html
> 
> Mike/Laszlo/Liming,
> Can you help me resolve the CI failures?
> 
> Thanks,
> Christopher Zurcher
> 
> > -----Original Message-----
> > From: Yao, Jiewen <jiewen.yao@intel.com>
> > Sent: Friday, November 6, 2020 02:23
> > To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> > devel@edk2.groups.io
> > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> <xiaoyux.lu@intel.com>;
> > Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > <ard.biesheuvel@arm.com>
> > Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
native
> > instruction support for X64
> >
> > Hi Zurcher
> > I am not CI person, so I recommend you have a discussion with Mike,
Laszlo,
> > or Liming to see what is the best way to resolve the coding style issue.
Or
> > how to change CI rule to add exception somewhere.
> >
> > However, I do have concern, when you say: "the module is not compatible
> with
> > GCC builds."
> >
> > In previous review, I already gave the comment to pass build with GCC
and
> > CLANG besides MSVC. Do you mean this patch cannot pass GCC build?
> >
> > Thank you
> > Yao Jiewen
> >
> > > -----Original Message-----
> > > From: Zurcher, Christopher J <christopher.j.zurcher@intel.com>
> > > Sent: Friday, November 6, 2020 5:50 PM
> > > To: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io
> > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > > <xiaoyux.lu@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>;
> > > Ard Biesheuvel <ard.biesheuvel@arm.com>
> > > Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
> native
> > > instruction support for X64
> > >
> > > I think some of these errors are not relevant based on the nature of
the
> > > commit:
> > >
> > > One of the errors reported is that the added typedefs (ptrdiff_t,
wchar_t)
> > do
> > > not follow coding guidelines, but the typedefs are required for
OpenSSL
> > > compatibility and they match the already-existing style:
> > >
> > >  typedef UINTN          size_t;
> > >  typedef UINTN          u_int;
> > > +typedef INTN           ptrdiff_t;
> > >  typedef INTN           ssize_t;
> > >  typedef INT32          time_t;
> > >  typedef UINT8          __uint8_t;
> > >  typedef UINT8          sa_family_t;
> > >  typedef UINT8          u_char;
> > >  typedef UINT32         uid_t;
> > >  typedef UINT32         gid_t;
> > > +typedef CHAR16         wchar_t;
> > >
> > > Another error is that the auto-generated assembly files do not start
with
> > > capital letters, but these filenames come from OpenSSL with lowercase
> > > filenames, and we already have opensslconf.h in the Include folder
which
> > > has a lowercase filename.
> > >
> > > Another error type reported is that the auto-generated assembly files
do
> > not
> > > have "SPDX-License-Identifier: BSD-2-Clause-Patent" but it was already
> > > discussed on the list that these would be checked in with the OpenSSL
> > header
> > > similar to opensslconf.h:
> > >
> https://github.com/tianocore/edk2/blob/master/CryptoPkg/Library/Include/
> > > openssl/opensslconf.h
> > >
> > > Additionally, there is an error that OpensslLibX64.inf is not in
> > CryptoPkg.dsc,
> > > but I am not sure if it is appropriate to include as the module is not
> > > compatible with GCC builds.
> > >
> > > How should I proceed here?
> > >
> > > Thanks,
> > > Christopher Zurcher
> > >
> > > > -----Original Message-----
> > > > From: Yao, Jiewen <jiewen.yao@intel.com>
> > > > Sent: Thursday, November 5, 2020 22:14
> > > > To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel.com>;
> Zurcher,
> > > > Christopher J <christopher.j.zurcher@intel.com>
> > > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > > <xiaoyux.lu@intel.com>;
> > > > Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > > > <ard.biesheuvel@arm.com>
> > > > Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
> native
> > > > instruction support for X64
> > > >
> > > > Hi Zurcher
> > > > I created https://github.com/tianocore/edk2/pull/1092
> > > >
> > > > However, there are failures in CI test. So this patch is NOT merged.
> > > >
> > > > Please take a look and resolve it.
> > > >
> > > > Thank you
> > > > Yao Jiewen
> > > >
> > > > > -----Original Message-----
> > > > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> Yao,
> > > > > Jiewen
> > > > > Sent: Friday, November 6, 2020 1:56 PM
> > > > > To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> > > > > devel@edk2.groups.io
> > > > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > > > > <xiaoyux.lu@intel.com>; Kinney, Michael D
> > > <michael.d.kinney@intel.com>;
> > > > > Ard Biesheuvel <ard.biesheuvel@arm.com>
> > > > > Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
> > > native
> > > > > instruction support for X64
> > > > >
> > > > > Patch 1/2 reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Christopher J Zurcher <christopher.j.zurcher@intel.com>
> > > > > > Sent: Wednesday, November 4, 2020 5:59 AM
> > > > > > To: devel@edk2.groups.io
> > > > > > Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J
> > > > > > <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>;
> Kinney,
> > > > > > Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > > > > > <ard.biesheuvel@arm.com>
> > > > > > Subject: [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> instruction
> > > > > > support for X64
> > > > > >
> > > > > > V5 Changes:
> > > > > >   Move ApiHooks.c into X64 folder
> > > > > >   Update process_files.pl to clean architecture-specific
subfolders
> > > > without
> > > > > >     removing them
> > > > > >   Rebased INF file to merge latest changes regarding RngLib vs.
> > TimerLib
> > > > > >
> > > > > > V4 Changes:
> > > > > >   Add copyright header to uefi-asm.conf
> > > > > >   Move [Sources.X64] block to cover entire X64-specific config
> > > > > >
> > > > > > 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@intel.com>
> > > > > > Cc: Jian J Wang <jian.j.wang@intel.com>
> > > > > > Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> > > > > > Cc: Mike Kinney <michael.d.kinney@intel.com>
> > > > > > Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> > > > > >
> > > > > > 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
> > |
> > > > 653 +++
> > > > > >  CryptoPkg/Library/Include/CrtLibSupport.h
> > |
> > > > 2 +
> > > > > >  CryptoPkg/Library/Include/openssl/opensslconf.h
> > |
> > > > 3 -
> > > > > >  CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
> > |
> > > > 34 +
> > > > > >  CryptoPkg/Library/OpensslLib/X64/ApiHooks.c
> > |
> > > > 18 +
> > > > > >
> 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
> > |
> > > > 232 +-
> > > > > >  CryptoPkg/Library/OpensslLib/uefi-asm.conf
> > |
> > > > 21 +
> > > > > >  22 files changed, 26746 insertions(+), 50 deletions(-)
> > > > > >  create mode 100644
> CryptoPkg/Library/OpensslLib/OpensslLibX64.inf
> > > > > >  create mode 100644
> > > > > CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
> > > > > >  create mode 100644
> CryptoPkg/Library/OpensslLib/X64/ApiHooks.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
> > > > >
> > > > >
> > > > >
> > > > > 
> > > > >




^ permalink raw reply	[flat|nested] 28+ messages in thread

* 回复: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-07  2:02             ` Zurcher, Christopher J
  2020-11-07  2:24               ` Yao, Jiewen
@ 2020-11-09  7:03               ` gaoliming
  2020-11-10 12:24               ` Laszlo Ersek
  2 siblings, 0 replies; 28+ messages in thread
From: gaoliming @ 2020-11-09  7:03 UTC (permalink / raw)
  To: devel, christopher.j.zurcher, 'Yao, Jiewen',
	'Laszlo Ersek'
  Cc: 'Wang, Jian J', 'Lu, XiaoyuX',
	'Kinney, Michael D', 'Ard Biesheuvel'

Zurcher:
 I reply the mail to mention this is the expected behavior in nasm compiler.
For this patch, I suggest to generate GAS assembly for GCC tool chain. 

 For ECC and License checker issues, you can ignore them in
CryptoPkg.ci.yaml if they are not real issue. 

Thanks
Liming
> -----邮件原件-----
> 发件人: bounce+27952+67117+4905953+8761045@groups.io
> <bounce+27952+67117+4905953+8761045@groups.io> 代表 Zurcher,
> Christopher J
> 发送时间: 2020年11月7日 10:03
> 收件人: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io; Laszlo
> Ersek <lersek@redhat.com>; gaoliming <gaoliming@byosoft.com.cn>
> 抄送: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> <xiaoyux.lu@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>;
> Ard Biesheuvel <ard.biesheuvel@arm.com>
> 主题: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> instruction support for X64
> 
> Their options would be:
> 1) File a bug against OpenSSL that their NASM code is too advanced for GCC
> toolchain (unlikely to result in any change since OpenSSL would say GCC
build
> should be using GAS instead of NASM and building outside of their makefile
> build system is bad practice in the first place).
> 2) File a bug against GCC that their toolchain can't handle NASM
correctly.
> 3) Use CLANGPDB toolchain instead.
> 
> I am not familiar enough with the GCC toolchain to know if there is any
way to
> make it interpret NASM files correctly, so there is a chance that someone
who
> knows more about it could provide some configuration change that could
> resolve this. But I do not think we should say that VS and CLANGPDB
toolchain
> users can't have OpenSSL acceleration because GCC can't handle it.
> 
> Thanks,
> Christopher Zurcher
> 
> > -----Original Message-----
> > From: Yao, Jiewen <jiewen.yao@intel.com>
> > Sent: Friday, November 6, 2020 15:07
> > To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> > devel@edk2.groups.io; Laszlo Ersek <lersek@redhat.com>; gaoliming
> > <gaoliming@byosoft.com.cn>
> > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> <xiaoyux.lu@intel.com>;
> > Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > <ard.biesheuvel@arm.com>
> > Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
native
> > instruction support for X64
> >
> > So, if someone wants to use this accelerator in Linux with GCC, what
he/she
> > need to do?
> >
> > > -----Original Message-----
> > > From: Zurcher, Christopher J <christopher.j.zurcher@intel.com>
> > > Sent: Saturday, November 7, 2020 3:36 AM
> > > To: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io; Laszlo
> > > Ersek <lersek@redhat.com>; gaoliming <gaoliming@byosoft.com.cn>
> > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > > <xiaoyux.lu@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>;
> > > Ard Biesheuvel <ard.biesheuvel@arm.com>
> > > Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
> native
> > > instruction support for X64
> > >
> > > Yes, in response to your request, it was discussed on the mailing list
that
> > the
> > > OpenSSL assembly code is not compatible with GCC in this format. It is
> > fully
> > > functional with VS toolchain and CLANGPDB toolchain. The GCC toolchain
> > > appears to be unable to handle some aspects of NASM code, particularly
> the
> > > COMMON section and the "wrt ..imagebase" style of
> position-independent
> > > code.
> > > See 7.6.1 here:
> https://www.nasm.us/xdoc/2.13.02rc3/html/nasmdoc7.html
> > >
> > > Mike/Laszlo/Liming,
> > > Can you help me resolve the CI failures?
> > >
> > > Thanks,
> > > Christopher Zurcher
> > >
> > > > -----Original Message-----
> > > > From: Yao, Jiewen <jiewen.yao@intel.com>
> > > > Sent: Friday, November 6, 2020 02:23
> > > > To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> > > > devel@edk2.groups.io
> > > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > > <xiaoyux.lu@intel.com>;
> > > > Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > > > <ard.biesheuvel@arm.com>
> > > > Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
> native
> > > > instruction support for X64
> > > >
> > > > Hi Zurcher
> > > > I am not CI person, so I recommend you have a discussion with Mike,
> > > Laszlo,
> > > > or Liming to see what is the best way to resolve the coding style
issue.
> > Or
> > > > how to change CI rule to add exception somewhere.
> > > >
> > > > However, I do have concern, when you say: "the module is not
> compatible
> > > with
> > > > GCC builds."
> > > >
> > > > In previous review, I already gave the comment to pass build with
GCC
> and
> > > > CLANG besides MSVC. Do you mean this patch cannot pass GCC build?
> > > >
> > > > Thank you
> > > > Yao Jiewen
> > > >
> > > > > -----Original Message-----
> > > > > From: Zurcher, Christopher J <christopher.j.zurcher@intel.com>
> > > > > Sent: Friday, November 6, 2020 5:50 PM
> > > > > To: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io
> > > > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > > > > <xiaoyux.lu@intel.com>; Kinney, Michael D
> > > <michael.d.kinney@intel.com>;
> > > > > Ard Biesheuvel <ard.biesheuvel@arm.com>
> > > > > Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
> > > native
> > > > > instruction support for X64
> > > > >
> > > > > I think some of these errors are not relevant based on the nature
of
> > the
> > > > > commit:
> > > > >
> > > > > One of the errors reported is that the added typedefs (ptrdiff_t,
> > wchar_t)
> > > > do
> > > > > not follow coding guidelines, but the typedefs are required for
OpenSSL
> > > > > compatibility and they match the already-existing style:
> > > > >
> > > > >  typedef UINTN          size_t;
> > > > >  typedef UINTN          u_int;
> > > > > +typedef INTN           ptrdiff_t;
> > > > >  typedef INTN           ssize_t;
> > > > >  typedef INT32          time_t;
> > > > >  typedef UINT8          __uint8_t;
> > > > >  typedef UINT8          sa_family_t;
> > > > >  typedef UINT8          u_char;
> > > > >  typedef UINT32         uid_t;
> > > > >  typedef UINT32         gid_t;
> > > > > +typedef CHAR16         wchar_t;
> > > > >
> > > > > Another error is that the auto-generated assembly files do not
start
> > with
> > > > > capital letters, but these filenames come from OpenSSL with
> lowercase
> > > > > filenames, and we already have opensslconf.h in the Include folder
> > which
> > > > > has a lowercase filename.
> > > > >
> > > > > Another error type reported is that the auto-generated assembly
files
> > do
> > > > not
> > > > > have "SPDX-License-Identifier: BSD-2-Clause-Patent" but it was
> already
> > > > > discussed on the list that these would be checked in with the
OpenSSL
> > > > header
> > > > > similar to opensslconf.h:
> > > > >
> > >
> https://github.com/tianocore/edk2/blob/master/CryptoPkg/Library/Include/
> > > > > openssl/opensslconf.h
> > > > >
> > > > > Additionally, there is an error that OpensslLibX64.inf is not in
> > > > CryptoPkg.dsc,
> > > > > but I am not sure if it is appropriate to include as the module is
not
> > > > > compatible with GCC builds.
> > > > >
> > > > > How should I proceed here?
> > > > >
> > > > > Thanks,
> > > > > Christopher Zurcher
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Yao, Jiewen <jiewen.yao@intel.com>
> > > > > > Sent: Thursday, November 5, 2020 22:14
> > > > > > To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel.com>;
> > > Zurcher,
> > > > > > Christopher J <christopher.j.zurcher@intel.com>
> > > > > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > > > > <xiaoyux.lu@intel.com>;
> > > > > > Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > > > > > <ard.biesheuvel@arm.com>
> > > > > > Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib:
Add
> > > native
> > > > > > instruction support for X64
> > > > > >
> > > > > > Hi Zurcher
> > > > > > I created https://github.com/tianocore/edk2/pull/1092
> > > > > >
> > > > > > However, there are failures in CI test. So this patch is NOT
merged.
> > > > > >
> > > > > > Please take a look and resolve it.
> > > > > >
> > > > > > Thank you
> > > > > > Yao Jiewen
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf
> Of
> > > Yao,
> > > > > > > Jiewen
> > > > > > > Sent: Friday, November 6, 2020 1:56 PM
> > > > > > > To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> > > > > > > devel@edk2.groups.io
> > > > > > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> > > > > > > <xiaoyux.lu@intel.com>; Kinney, Michael D
> > > > > <michael.d.kinney@intel.com>;
> > > > > > > Ard Biesheuvel <ard.biesheuvel@arm.com>
> > > > > > > Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib:
> Add
> > > > > native
> > > > > > > instruction support for X64
> > > > > > >
> > > > > > > Patch 1/2 reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Christopher J Zurcher
<christopher.j.zurcher@intel.com>
> > > > > > > > Sent: Wednesday, November 4, 2020 5:59 AM
> > > > > > > > To: devel@edk2.groups.io
> > > > > > > > Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J
> > > > > > > > <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>;
> > > Kinney,
> > > > > > > > Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > > > > > > > <ard.biesheuvel@arm.com>
> > > > > > > > Subject: [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> > > instruction
> > > > > > > > support for X64
> > > > > > > >
> > > > > > > > V5 Changes:
> > > > > > > >   Move ApiHooks.c into X64 folder
> > > > > > > >   Update process_files.pl to clean architecture-specific
> > subfolders
> > > > > > without
> > > > > > > >     removing them
> > > > > > > >   Rebased INF file to merge latest changes regarding RngLib
vs.
> > > > TimerLib
> > > > > > > >
> > > > > > > > V4 Changes:
> > > > > > > >   Add copyright header to uefi-asm.conf
> > > > > > > >   Move [Sources.X64] block to cover entire X64-specific
config
> > > > > > > >
> > > > > > > > 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@intel.com>
> > > > > > > > Cc: Jian J Wang <jian.j.wang@intel.com>
> > > > > > > > Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> > > > > > > > Cc: Mike Kinney <michael.d.kinney@intel.com>
> > > > > > > > Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> > > > > > > >
> > > > > > > > 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
> > > > |
> > > > > > 653 +++
> > > > > > > >  CryptoPkg/Library/Include/CrtLibSupport.h
> > > > |
> > > > > > 2 +
> > > > > > > >  CryptoPkg/Library/Include/openssl/opensslconf.h
> > > > |
> > > > > > 3 -
> > > > > > > >  CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
> > > > |
> > > > > > 34 +
> > > > > > > >  CryptoPkg/Library/OpensslLib/X64/ApiHooks.c
> > > > |
> > > > > > 18 +
> > > > > > > >  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
> > > > |
> > > > > > 232 +-
> > > > > > > >  CryptoPkg/Library/OpensslLib/uefi-asm.conf
> > > > |
> > > > > > 21 +
> > > > > > > >  22 files changed, 26746 insertions(+), 50 deletions(-)
> > > > > > > >  create mode 100644
> > > CryptoPkg/Library/OpensslLib/OpensslLibX64.inf
> > > > > > > >  create mode 100644
> > > > > > > CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
> > > > > > > >  create mode 100644
> CryptoPkg/Library/OpensslLib/X64/ApiHooks.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
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> 
> 
> 
> 
> 




^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-07  2:02             ` Zurcher, Christopher J
  2020-11-07  2:24               ` Yao, Jiewen
  2020-11-09  7:03               ` 回复: " gaoliming
@ 2020-11-10 12:24               ` Laszlo Ersek
  2 siblings, 0 replies; 28+ messages in thread
From: Laszlo Ersek @ 2020-11-10 12:24 UTC (permalink / raw)
  To: Zurcher, Christopher J, Yao, Jiewen, devel@edk2.groups.io,
	gaoliming
  Cc: Wang, Jian J, Lu, XiaoyuX, Kinney, Michael D, Ard Biesheuvel

On 11/07/20 03:02, Zurcher, Christopher J wrote:
> I do not think we should say that VS and CLANGPDB toolchain users can't have OpenSSL acceleration because GCC can't handle it.

Agreed.

Thanks
Laszlo


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-07  2:24               ` Yao, Jiewen
  2020-11-07  7:26                 ` Michael D Kinney
@ 2020-11-10 12:31                 ` Laszlo Ersek
  2020-11-10 14:28                   ` 回复: " gaoliming
  2020-11-10 17:07                   ` Yao, Jiewen
  1 sibling, 2 replies; 28+ messages in thread
From: Laszlo Ersek @ 2020-11-10 12:31 UTC (permalink / raw)
  To: Yao, Jiewen, Zurcher, Christopher J
  Cc: devel@edk2.groups.io, gaoliming, Wang, Jian J, Lu, XiaoyuX,
	Kinney, Michael D, Ard Biesheuvel

On 11/07/20 03:24, Yao, Jiewen wrote:
> The reason we choose NASM is that we can use same assembly in windows build and Linux build. However if this NASM cannot be used in Linux, then the benefit does not exist any more. You can generate GAS to support GCC build, and check in .S file. 

I disagree with this idea. To me (as an exclusive GCC user), uniformity
of assembly files is *much* more important than getting native
instruction support in OpenSSL with all toolchains at the exact same time.

If we enable native instruction support for (a) VS and CLANGPDB now, and
(b) for GCC later, then that's two steps, with each step being in the
forward direction. Performing just (a) for now creates no technical
debt. A feature gap is not technical debt; you cannot mistake a missing
feature for a working feature.

If we re-add .S files now, for whatever purpose, that's a step *back*,
however. It creates technical debt. A working feature on an invalid
basis *can* be mistaken for a working feature, and we shouldn't do that
(unless there are strong business needs for some participants, *AND* we
have a *very specific* plan and timeline for backing out the hack). I
really don't have any trust in technical debt being "paid" in edk2
anytime soon, though.

Thanks
Laszlo


^ permalink raw reply	[flat|nested] 28+ messages in thread

* 回复: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-10 12:31                 ` Laszlo Ersek
@ 2020-11-10 14:28                   ` gaoliming
  2020-11-11 19:05                     ` Laszlo Ersek
  2020-11-10 17:07                   ` Yao, Jiewen
  1 sibling, 1 reply; 28+ messages in thread
From: gaoliming @ 2020-11-10 14:28 UTC (permalink / raw)
  To: 'Laszlo Ersek', 'Yao, Jiewen',
	'Zurcher, Christopher J'
  Cc: devel, 'Wang, Jian J', 'Lu, XiaoyuX',
	'Kinney, Michael D', 'Ard Biesheuvel'

Laszlo:
  Those assembly files are auto generated from openssl. Now, the generated nasm files use the syntax for win64 object only. So, they can't be used for GCC and XCODE.
  Zurcher mentions GAS assembly files can also be generated. If there is the issue in them, they can be re-generated together when edk2 updates to new openssl version. So, there is no additional maintain effort for them. 

Thanks
Liming
> -----邮件原件-----
> 发件人: Laszlo Ersek <lersek@redhat.com>
> 发送时间: 2020年11月10日 20:31
> 收件人: Yao, Jiewen <jiewen.yao@intel.com>; Zurcher, Christopher J
> <christopher.j.zurcher@intel.com>
> 抄送: devel@edk2.groups.io; gaoliming <gaoliming@byosoft.com.cn>; Wang,
> Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Kinney,
> Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> <ard.biesheuvel@arm.com>
> 主题: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> instruction support for X64
> 
> On 11/07/20 03:24, Yao, Jiewen wrote:
> > The reason we choose NASM is that we can use same assembly in windows
> build and Linux build. However if this NASM cannot be used in Linux, then the
> benefit does not exist any more. You can generate GAS to support GCC build,
> and check in .S file.
> 
> I disagree with this idea. To me (as an exclusive GCC user), uniformity
> of assembly files is *much* more important than getting native
> instruction support in OpenSSL with all toolchains at the exact same time.
> 
> If we enable native instruction support for (a) VS and CLANGPDB now, and
> (b) for GCC later, then that's two steps, with each step being in the
> forward direction. Performing just (a) for now creates no technical
> debt. A feature gap is not technical debt; you cannot mistake a missing
> feature for a working feature.
> 
> If we re-add .S files now, for whatever purpose, that's a step *back*,
> however. It creates technical debt. A working feature on an invalid
> basis *can* be mistaken for a working feature, and we shouldn't do that
> (unless there are strong business needs for some participants, *AND* we
> have a *very specific* plan and timeline for backing out the hack). I
> really don't have any trust in technical debt being "paid" in edk2
> anytime soon, though.
> 
> Thanks
> Laszlo




^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-10 12:31                 ` Laszlo Ersek
  2020-11-10 14:28                   ` 回复: " gaoliming
@ 2020-11-10 17:07                   ` Yao, Jiewen
  2020-11-11  1:43                     ` Zurcher, Christopher J
  2020-11-11 19:07                     ` Laszlo Ersek
  1 sibling, 2 replies; 28+ messages in thread
From: Yao, Jiewen @ 2020-11-10 17:07 UTC (permalink / raw)
  To: Laszlo Ersek, Zurcher, Christopher J
  Cc: devel@edk2.groups.io, gaoliming, Wang, Jian J, Lu, XiaoyuX,
	Kinney, Michael D, Ard Biesheuvel

Laszlo.
If you disagree, what is your proposal?


> -----Original Message-----
> From: Laszlo Ersek <lersek@redhat.com>
> Sent: Tuesday, November 10, 2020 8:31 PM
> To: Yao, Jiewen <jiewen.yao@intel.com>; Zurcher, Christopher J
> <christopher.j.zurcher@intel.com>
> Cc: devel@edk2.groups.io; gaoliming <gaoliming@byosoft.com.cn>; Wang,
> Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Kinney,
> Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> <ard.biesheuvel@arm.com>
> Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> instruction support for X64
> 
> On 11/07/20 03:24, Yao, Jiewen wrote:
> > The reason we choose NASM is that we can use same assembly in windows
> build and Linux build. However if this NASM cannot be used in Linux, then
> the benefit does not exist any more. You can generate GAS to support GCC
> build, and check in .S file.
> 
> I disagree with this idea. To me (as an exclusive GCC user), uniformity
> of assembly files is *much* more important than getting native
> instruction support in OpenSSL with all toolchains at the exact same time.
> 
> If we enable native instruction support for (a) VS and CLANGPDB now, and
> (b) for GCC later, then that's two steps, with each step being in the
> forward direction. Performing just (a) for now creates no technical
> debt. A feature gap is not technical debt; you cannot mistake a missing
> feature for a working feature.
> 
> If we re-add .S files now, for whatever purpose, that's a step *back*,
> however. It creates technical debt. A working feature on an invalid
> basis *can* be mistaken for a working feature, and we shouldn't do that
> (unless there are strong business needs for some participants, *AND* we
> have a *very specific* plan and timeline for backing out the hack). I
> really don't have any trust in technical debt being "paid" in edk2
> anytime soon, though.
> 
> Thanks
> Laszlo


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-10 17:07                   ` Yao, Jiewen
@ 2020-11-11  1:43                     ` Zurcher, Christopher J
  2020-11-11  2:19                       ` Yao, Jiewen
  2020-11-11 19:08                       ` Laszlo Ersek
  2020-11-11 19:07                     ` Laszlo Ersek
  1 sibling, 2 replies; 28+ messages in thread
From: Zurcher, Christopher J @ 2020-11-11  1:43 UTC (permalink / raw)
  To: Yao, Jiewen, Laszlo Ersek
  Cc: devel@edk2.groups.io, gaoliming, Wang, Jian J, Lu, XiaoyuX,
	Kinney, Michael D, Ard Biesheuvel

I don't want to speak for Laszlo but I filed an issue against OpenSSL that the NASM build should not assume win64:
https://github.com/openssl/openssl/issues/12712

The issue was triaged as a bug by OpenSSL, so I think the long-term plan would be to fix OpenSSL to not set win64 flag by default on all NASM builds, at which point I think we should be able to use the same NASM files for VS and GCC. I'm not sure if the classification as a bug means the fix could be made in 1.1.1x builds or if it could only go into 3.x.

Thanks,
Christopher Zurcher

> -----Original Message-----
> From: Yao, Jiewen <jiewen.yao@intel.com>
> Sent: Tuesday, November 10, 2020 09:08
> To: Laszlo Ersek <lersek@redhat.com>; Zurcher, Christopher J
> <christopher.j.zurcher@intel.com>
> Cc: devel@edk2.groups.io; gaoliming <gaoliming@byosoft.com.cn>; Wang, Jian J
> <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Kinney, Michael
> D <michael.d.kinney@intel.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>
> Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> instruction support for X64
> 
> Laszlo.
> If you disagree, what is your proposal?
> 
> 
> > -----Original Message-----
> > From: Laszlo Ersek <lersek@redhat.com>
> > Sent: Tuesday, November 10, 2020 8:31 PM
> > To: Yao, Jiewen <jiewen.yao@intel.com>; Zurcher, Christopher J
> > <christopher.j.zurcher@intel.com>
> > Cc: devel@edk2.groups.io; gaoliming <gaoliming@byosoft.com.cn>; Wang,
> > Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Kinney,
> > Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > <ard.biesheuvel@arm.com>
> > Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> > instruction support for X64
> >
> > On 11/07/20 03:24, Yao, Jiewen wrote:
> > > The reason we choose NASM is that we can use same assembly in windows
> > build and Linux build. However if this NASM cannot be used in Linux, then
> > the benefit does not exist any more. You can generate GAS to support GCC
> > build, and check in .S file.
> >
> > I disagree with this idea. To me (as an exclusive GCC user), uniformity
> > of assembly files is *much* more important than getting native
> > instruction support in OpenSSL with all toolchains at the exact same time.
> >
> > If we enable native instruction support for (a) VS and CLANGPDB now, and
> > (b) for GCC later, then that's two steps, with each step being in the
> > forward direction. Performing just (a) for now creates no technical
> > debt. A feature gap is not technical debt; you cannot mistake a missing
> > feature for a working feature.
> >
> > If we re-add .S files now, for whatever purpose, that's a step *back*,
> > however. It creates technical debt. A working feature on an invalid
> > basis *can* be mistaken for a working feature, and we shouldn't do that
> > (unless there are strong business needs for some participants, *AND* we
> > have a *very specific* plan and timeline for backing out the hack). I
> > really don't have any trust in technical debt being "paid" in edk2
> > anytime soon, though.
> >
> > Thanks
> > Laszlo


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-11  1:43                     ` Zurcher, Christopher J
@ 2020-11-11  2:19                       ` Yao, Jiewen
  2020-11-11 19:09                         ` Laszlo Ersek
  2020-11-11 19:08                       ` Laszlo Ersek
  1 sibling, 1 reply; 28+ messages in thread
From: Yao, Jiewen @ 2020-11-11  2:19 UTC (permalink / raw)
  To: Zurcher, Christopher J, Laszlo Ersek
  Cc: devel@edk2.groups.io, gaoliming, Wang, Jian J, Lu, XiaoyuX,
	Kinney, Michael D, Ard Biesheuvel

I full agree with long term plan. E.g. we need remove ApiHook.c as well.

I more concern about the short term plan, if you want to check in this and get the capability.

I think we need this capability for GCC tool chain as well, so I am OK to check in .S.
This is auto generated. I do not think it is a step back.

We can remove them together with ApiHook later, in the long term.

Thank you
Yao Jiewen


> -----Original Message-----
> From: Zurcher, Christopher J <christopher.j.zurcher@intel.com>
> Sent: Wednesday, November 11, 2020 9:43 AM
> To: Yao, Jiewen <jiewen.yao@intel.com>; Laszlo Ersek <lersek@redhat.com>
> Cc: devel@edk2.groups.io; gaoliming <gaoliming@byosoft.com.cn>; Wang,
> Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Kinney,
> Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> <ard.biesheuvel@arm.com>
> Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> instruction support for X64
> 
> I don't want to speak for Laszlo but I filed an issue against OpenSSL that the
> NASM build should not assume win64:
> https://github.com/openssl/openssl/issues/12712
> 
> The issue was triaged as a bug by OpenSSL, so I think the long-term plan
> would be to fix OpenSSL to not set win64 flag by default on all NASM builds,
> at which point I think we should be able to use the same NASM files for VS
> and GCC. I'm not sure if the classification as a bug means the fix could be
> made in 1.1.1x builds or if it could only go into 3.x.
> 
> Thanks,
> Christopher Zurcher
> 
> > -----Original Message-----
> > From: Yao, Jiewen <jiewen.yao@intel.com>
> > Sent: Tuesday, November 10, 2020 09:08
> > To: Laszlo Ersek <lersek@redhat.com>; Zurcher, Christopher J
> > <christopher.j.zurcher@intel.com>
> > Cc: devel@edk2.groups.io; gaoliming <gaoliming@byosoft.com.cn>; Wang,
> Jian J
> > <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Kinney,
> Michael
> > D <michael.d.kinney@intel.com>; Ard Biesheuvel
> <ard.biesheuvel@arm.com>
> > Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> > instruction support for X64
> >
> > Laszlo.
> > If you disagree, what is your proposal?
> >
> >
> > > -----Original Message-----
> > > From: Laszlo Ersek <lersek@redhat.com>
> > > Sent: Tuesday, November 10, 2020 8:31 PM
> > > To: Yao, Jiewen <jiewen.yao@intel.com>; Zurcher, Christopher J
> > > <christopher.j.zurcher@intel.com>
> > > Cc: devel@edk2.groups.io; gaoliming <gaoliming@byosoft.com.cn>;
> Wang,
> > > Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>;
> Kinney,
> > > Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
> > > <ard.biesheuvel@arm.com>
> > > Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add
> native
> > > instruction support for X64
> > >
> > > On 11/07/20 03:24, Yao, Jiewen wrote:
> > > > The reason we choose NASM is that we can use same assembly in
> windows
> > > build and Linux build. However if this NASM cannot be used in Linux, then
> > > the benefit does not exist any more. You can generate GAS to support
> GCC
> > > build, and check in .S file.
> > >
> > > I disagree with this idea. To me (as an exclusive GCC user), uniformity
> > > of assembly files is *much* more important than getting native
> > > instruction support in OpenSSL with all toolchains at the exact same time.
> > >
> > > If we enable native instruction support for (a) VS and CLANGPDB now,
> and
> > > (b) for GCC later, then that's two steps, with each step being in the
> > > forward direction. Performing just (a) for now creates no technical
> > > debt. A feature gap is not technical debt; you cannot mistake a missing
> > > feature for a working feature.
> > >
> > > If we re-add .S files now, for whatever purpose, that's a step *back*,
> > > however. It creates technical debt. A working feature on an invalid
> > > basis *can* be mistaken for a working feature, and we shouldn't do that
> > > (unless there are strong business needs for some participants, *AND* we
> > > have a *very specific* plan and timeline for backing out the hack). I
> > > really don't have any trust in technical debt being "paid" in edk2
> > > anytime soon, though.
> > >
> > > Thanks
> > > Laszlo


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: 回复: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-10 14:28                   ` 回复: " gaoliming
@ 2020-11-11 19:05                     ` Laszlo Ersek
  0 siblings, 0 replies; 28+ messages in thread
From: Laszlo Ersek @ 2020-11-11 19:05 UTC (permalink / raw)
  To: gaoliming, 'Yao, Jiewen',
	'Zurcher, Christopher J'
  Cc: devel, 'Wang, Jian J', 'Lu, XiaoyuX',
	'Kinney, Michael D', 'Ard Biesheuvel'

On 11/10/20 15:28, gaoliming wrote:
> Laszlo:
>   Those assembly files are auto generated from openssl. Now, the generated nasm files use the syntax for win64 object only. So, they can't be used for GCC and XCODE.
>   Zurcher mentions GAS assembly files can also be generated. If there is the issue in them, they can be re-generated together when edk2 updates to new openssl version. So, there is no additional maintain effort for them. 

Hmmm, good point. I missed that the NASM files too were generated.

Sorry about my mistake, it's been quite difficult to follow so many
contexts.

Thanks
Laszlo


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-10 17:07                   ` Yao, Jiewen
  2020-11-11  1:43                     ` Zurcher, Christopher J
@ 2020-11-11 19:07                     ` Laszlo Ersek
  1 sibling, 0 replies; 28+ messages in thread
From: Laszlo Ersek @ 2020-11-11 19:07 UTC (permalink / raw)
  To: Yao, Jiewen, Zurcher, Christopher J
  Cc: devel@edk2.groups.io, gaoliming, Wang, Jian J, Lu, XiaoyuX,
	Kinney, Michael D, Ard Biesheuvel

On 11/10/20 18:07, Yao, Jiewen wrote:
> Laszlo.
> If you disagree, what is your proposal?

My proposal would have been to simply not enable native insn support via
GCC at this time.

But, as Liming points out, I was simply wrong; so GAS generation should
be tolerable in this particular case. Because, no manual maintenance is
needed; both NASM and GAS files can be regenerated, if necessary, with
the same effort. (The problem with the historical .S files was that
every manual assembly language development had to be done in multiple
dialects.)

Thanks,
Laszlo

> 
> 
>> -----Original Message-----
>> From: Laszlo Ersek <lersek@redhat.com>
>> Sent: Tuesday, November 10, 2020 8:31 PM
>> To: Yao, Jiewen <jiewen.yao@intel.com>; Zurcher, Christopher J
>> <christopher.j.zurcher@intel.com>
>> Cc: devel@edk2.groups.io; gaoliming <gaoliming@byosoft.com.cn>; Wang,
>> Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Kinney,
>> Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
>> <ard.biesheuvel@arm.com>
>> Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
>> instruction support for X64
>>
>> On 11/07/20 03:24, Yao, Jiewen wrote:
>>> The reason we choose NASM is that we can use same assembly in windows
>> build and Linux build. However if this NASM cannot be used in Linux, then
>> the benefit does not exist any more. You can generate GAS to support GCC
>> build, and check in .S file.
>>
>> I disagree with this idea. To me (as an exclusive GCC user), uniformity
>> of assembly files is *much* more important than getting native
>> instruction support in OpenSSL with all toolchains at the exact same time.
>>
>> If we enable native instruction support for (a) VS and CLANGPDB now, and
>> (b) for GCC later, then that's two steps, with each step being in the
>> forward direction. Performing just (a) for now creates no technical
>> debt. A feature gap is not technical debt; you cannot mistake a missing
>> feature for a working feature.
>>
>> If we re-add .S files now, for whatever purpose, that's a step *back*,
>> however. It creates technical debt. A working feature on an invalid
>> basis *can* be mistaken for a working feature, and we shouldn't do that
>> (unless there are strong business needs for some participants, *AND* we
>> have a *very specific* plan and timeline for backing out the hack). I
>> really don't have any trust in technical debt being "paid" in edk2
>> anytime soon, though.
>>
>> Thanks
>> Laszlo
> 


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-11  1:43                     ` Zurcher, Christopher J
  2020-11-11  2:19                       ` Yao, Jiewen
@ 2020-11-11 19:08                       ` Laszlo Ersek
  1 sibling, 0 replies; 28+ messages in thread
From: Laszlo Ersek @ 2020-11-11 19:08 UTC (permalink / raw)
  To: Zurcher, Christopher J, Yao, Jiewen
  Cc: devel@edk2.groups.io, gaoliming, Wang, Jian J, Lu, XiaoyuX,
	Kinney, Michael D, Ard Biesheuvel

On 11/11/20 02:43, Zurcher, Christopher J wrote:
> I don't want to speak for Laszlo but I filed an issue against OpenSSL that the NASM build should not assume win64:
> https://github.com/openssl/openssl/issues/12712

If that's viable, it's clearly the best solution.

> 
> The issue was triaged as a bug by OpenSSL, so I think the long-term plan would be to fix OpenSSL to not set win64 flag by default on all NASM builds, at which point I think we should be able to use the same NASM files for VS and GCC. I'm not sure if the classification as a bug means the fix could be made in 1.1.1x builds or if it could only go into 3.x.

Either way, it still (hopefully) gives us a path for re-simplifying.

Thanks!
Laszlo

> 
> Thanks,
> Christopher Zurcher
> 
>> -----Original Message-----
>> From: Yao, Jiewen <jiewen.yao@intel.com>
>> Sent: Tuesday, November 10, 2020 09:08
>> To: Laszlo Ersek <lersek@redhat.com>; Zurcher, Christopher J
>> <christopher.j.zurcher@intel.com>
>> Cc: devel@edk2.groups.io; gaoliming <gaoliming@byosoft.com.cn>; Wang, Jian J
>> <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Kinney, Michael
>> D <michael.d.kinney@intel.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>
>> Subject: RE: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
>> instruction support for X64
>>
>> Laszlo.
>> If you disagree, what is your proposal?
>>
>>
>>> -----Original Message-----
>>> From: Laszlo Ersek <lersek@redhat.com>
>>> Sent: Tuesday, November 10, 2020 8:31 PM
>>> To: Yao, Jiewen <jiewen.yao@intel.com>; Zurcher, Christopher J
>>> <christopher.j.zurcher@intel.com>
>>> Cc: devel@edk2.groups.io; gaoliming <gaoliming@byosoft.com.cn>; Wang,
>>> Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Kinney,
>>> Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel
>>> <ard.biesheuvel@arm.com>
>>> Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
>>> instruction support for X64
>>>
>>> On 11/07/20 03:24, Yao, Jiewen wrote:
>>>> The reason we choose NASM is that we can use same assembly in windows
>>> build and Linux build. However if this NASM cannot be used in Linux, then
>>> the benefit does not exist any more. You can generate GAS to support GCC
>>> build, and check in .S file.
>>>
>>> I disagree with this idea. To me (as an exclusive GCC user), uniformity
>>> of assembly files is *much* more important than getting native
>>> instruction support in OpenSSL with all toolchains at the exact same time.
>>>
>>> If we enable native instruction support for (a) VS and CLANGPDB now, and
>>> (b) for GCC later, then that's two steps, with each step being in the
>>> forward direction. Performing just (a) for now creates no technical
>>> debt. A feature gap is not technical debt; you cannot mistake a missing
>>> feature for a working feature.
>>>
>>> If we re-add .S files now, for whatever purpose, that's a step *back*,
>>> however. It creates technical debt. A working feature on an invalid
>>> basis *can* be mistaken for a working feature, and we shouldn't do that
>>> (unless there are strong business needs for some participants, *AND* we
>>> have a *very specific* plan and timeline for backing out the hack). I
>>> really don't have any trust in technical debt being "paid" in edk2
>>> anytime soon, though.
>>>
>>> Thanks
>>> Laszlo
> 


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-11  2:19                       ` Yao, Jiewen
@ 2020-11-11 19:09                         ` Laszlo Ersek
  2020-11-13  1:22                           ` Zurcher, Christopher J
       [not found]                           ` <1646ECAE89844BF6.31886@groups.io>
  0 siblings, 2 replies; 28+ messages in thread
From: Laszlo Ersek @ 2020-11-11 19:09 UTC (permalink / raw)
  To: Yao, Jiewen, Zurcher, Christopher J
  Cc: devel@edk2.groups.io, gaoliming, Wang, Jian J, Lu, XiaoyuX,
	Kinney, Michael D, Ard Biesheuvel

On 11/11/20 03:19, Yao, Jiewen wrote:
> I full agree with long term plan. E.g. we need remove ApiHook.c as well.
> 
> I more concern about the short term plan, if you want to check in this and get the capability.
> 
> I think we need this capability for GCC tool chain as well, so I am OK to check in .S.
> This is auto generated. I do not think it is a step back.
> 
> We can remove them together with ApiHook later, in the long term.

Agreed on all counts.

Laszlo


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-11 19:09                         ` Laszlo Ersek
@ 2020-11-13  1:22                           ` Zurcher, Christopher J
       [not found]                           ` <1646ECAE89844BF6.31886@groups.io>
  1 sibling, 0 replies; 28+ messages in thread
From: Zurcher, Christopher J @ 2020-11-13  1:22 UTC (permalink / raw)
  To: devel@edk2.groups.io, lersek@redhat.com, Yao, Jiewen
  Cc: gaoliming, Wang, Jian J, Lu, XiaoyuX, Kinney, Michael D,
	Ard Biesheuvel

Sorry for the thrash on this; in testing the GCC build with .S files, I found that there is still a build failure due to the inclusion of a "common" data section in the OpenSSL code, which is explicitly removed by Base Tools changes in commit 214a3b79417f. So I think without removing this restriction or changing OpenSSL in a future patch, we will not be able to build the accelerated functions for GCC.

Thanks,
Christopher Zurcher

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Laszlo Ersek
> Sent: Wednesday, November 11, 2020 11:09
> To: Yao, Jiewen <jiewen.yao@intel.com>; Zurcher, Christopher J
> <christopher.j.zurcher@intel.com>
> Cc: devel@edk2.groups.io; gaoliming <gaoliming@byosoft.com.cn>; Wang, Jian J
> <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Kinney, Michael
> D <michael.d.kinney@intel.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>
> Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> instruction support for X64
> 
> On 11/11/20 03:19, Yao, Jiewen wrote:
> > I full agree with long term plan. E.g. we need remove ApiHook.c as well.
> >
> > I more concern about the short term plan, if you want to check in this and
> get the capability.
> >
> > I think we need this capability for GCC tool chain as well, so I am OK to
> check in .S.
> > This is auto generated. I do not think it is a step back.
> >
> > We can remove them together with ApiHook later, in the long term.
> 
> Agreed on all counts.
> 
> Laszlo
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
       [not found]                           ` <1646ECAE89844BF6.31886@groups.io>
@ 2020-11-13  2:28                             ` Zurcher, Christopher J
  2020-11-13  7:35                               ` Ard Biesheuvel
  0 siblings, 1 reply; 28+ messages in thread
From: Zurcher, Christopher J @ 2020-11-13  2:28 UTC (permalink / raw)
  To: devel@edk2.groups.io, Zurcher, Christopher J, lersek@redhat.com,
	Yao, Jiewen
  Cc: gaoliming, Wang, Jian J, Lu, XiaoyuX, Kinney, Michael D,
	Ard Biesheuvel

Laszlo and Ard,
In the description for commit 214a3b79417f it says "disabling it by default, and re-enabling it explicitly for packages
that depend on it."
Is there a documented process to re-enable the COMMON keyword for a particular package? Is this even possible?

Thanks,
Christopher Zurcher

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Zurcher,
> Christopher J
> Sent: Thursday, November 12, 2020 17:22
> To: devel@edk2.groups.io; lersek@redhat.com; Yao, Jiewen
> <jiewen.yao@intel.com>
> Cc: gaoliming <gaoliming@byosoft.com.cn>; Wang, Jian J
> <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Kinney, Michael
> D <michael.d.kinney@intel.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>
> Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> instruction support for X64
> 
> Sorry for the thrash on this; in testing the GCC build with .S files, I found
> that there is still a build failure due to the inclusion of a "common" data
> section in the OpenSSL code, which is explicitly removed by Base Tools
> changes in commit 214a3b79417f. So I think without removing this restriction
> or changing OpenSSL in a future patch, we will not be able to build the
> accelerated functions for GCC.
> 
> Thanks,
> Christopher Zurcher
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Laszlo Ersek
> > Sent: Wednesday, November 11, 2020 11:09
> > To: Yao, Jiewen <jiewen.yao@intel.com>; Zurcher, Christopher J
> > <christopher.j.zurcher@intel.com>
> > Cc: devel@edk2.groups.io; gaoliming <gaoliming@byosoft.com.cn>; Wang, Jian
> J
> > <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Kinney,
> Michael
> > D <michael.d.kinney@intel.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>
> > Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
> > instruction support for X64
> >
> > On 11/11/20 03:19, Yao, Jiewen wrote:
> > > I full agree with long term plan. E.g. we need remove ApiHook.c as well.
> > >
> > > I more concern about the short term plan, if you want to check in this
> and
> > get the capability.
> > >
> > > I think we need this capability for GCC tool chain as well, so I am OK to
> > check in .S.
> > > This is auto generated. I do not think it is a step back.
> > >
> > > We can remove them together with ApiHook later, in the long term.
> >
> > Agreed on all counts.
> >
> > Laszlo
> >
> >
> >
> >
> >
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-13  2:28                             ` Zurcher, Christopher J
@ 2020-11-13  7:35                               ` Ard Biesheuvel
  2020-11-13 20:02                                 ` Laszlo Ersek
  0 siblings, 1 reply; 28+ messages in thread
From: Ard Biesheuvel @ 2020-11-13  7:35 UTC (permalink / raw)
  To: Zurcher, Christopher J, devel@edk2.groups.io, lersek@redhat.com,
	Yao, Jiewen
  Cc: gaoliming, Wang, Jian J, Lu, XiaoyuX, Kinney, Michael D

On 11/13/20 3:28 AM, Zurcher, Christopher J wrote:
> Laszlo and Ard,
> In the description for commit 214a3b79417f it says "disabling it by default, and re-enabling it explicitly for packages
> that depend on it."
> Is there a documented process to re-enable the COMMON keyword for a particular package? Is this even possible?
> 

Adding -fcommon on the GCC command line should re-enable it, and you 
should be able to do that in package scope. It might mean we'd have to 
move *(COMMON) out of the discards section though.

However, as the commit log explains, COMMON allocation is a *bad* idea 
for highly granular code bases such as EDK2, since it merges variables 
based on their names only.

Do you have any idea why the command line options we use to build 
OpenSSL are not preventing these COMMON sections from being emitted?


>> -----Original Message-----
>> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Zurcher,
>> Christopher J
>> Sent: Thursday, November 12, 2020 17:22
>> To: devel@edk2.groups.io; lersek@redhat.com; Yao, Jiewen
>> <jiewen.yao@intel.com>
>> Cc: gaoliming <gaoliming@byosoft.com.cn>; Wang, Jian J
>> <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Kinney, Michael
>> D <michael.d.kinney@intel.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>
>> Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
>> instruction support for X64
>>
>> Sorry for the thrash on this; in testing the GCC build with .S files, I found
>> that there is still a build failure due to the inclusion of a "common" data
>> section in the OpenSSL code, which is explicitly removed by Base Tools
>> changes in commit 214a3b79417f. So I think without removing this restriction
>> or changing OpenSSL in a future patch, we will not be able to build the
>> accelerated functions for GCC.
>>
>> Thanks,
>> Christopher Zurcher
>>
>>> -----Original Message-----
>>> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Laszlo Ersek
>>> Sent: Wednesday, November 11, 2020 11:09
>>> To: Yao, Jiewen <jiewen.yao@intel.com>; Zurcher, Christopher J
>>> <christopher.j.zurcher@intel.com>
>>> Cc: devel@edk2.groups.io; gaoliming <gaoliming@byosoft.com.cn>; Wang, Jian
>> J
>>> <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Kinney,
>> Michael
>>> D <michael.d.kinney@intel.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>
>>> Subject: Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native
>>> instruction support for X64
>>>
>>> On 11/11/20 03:19, Yao, Jiewen wrote:
>>>> I full agree with long term plan. E.g. we need remove ApiHook.c as well.
>>>>
>>>> I more concern about the short term plan, if you want to check in this
>> and
>>> get the capability.
>>>>
>>>> I think we need this capability for GCC tool chain as well, so I am OK to
>>> check in .S.
>>>> This is auto generated. I do not think it is a step back.
>>>>
>>>> We can remove them together with ApiHook later, in the long term.
>>>
>>> Agreed on all counts.
>>>
>>> Laszlo
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>> 
>>
> 


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [edk2-devel] [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
  2020-11-13  7:35                               ` Ard Biesheuvel
@ 2020-11-13 20:02                                 ` Laszlo Ersek
  0 siblings, 0 replies; 28+ messages in thread
From: Laszlo Ersek @ 2020-11-13 20:02 UTC (permalink / raw)
  To: Ard Biesheuvel, Zurcher, Christopher J, devel@edk2.groups.io,
	Yao, Jiewen
  Cc: gaoliming, Wang, Jian J, Lu, XiaoyuX, Kinney, Michael D

On 11/13/20 08:35, Ard Biesheuvel wrote:
> On 11/13/20 3:28 AM, Zurcher, Christopher J wrote:
>> Laszlo and Ard,
>> In the description for commit 214a3b79417f it says "disabling it by
>> default, and re-enabling it explicitly for packages
>> that depend on it."
>> Is there a documented process to re-enable the COMMON keyword for a
>> particular package? Is this even possible?
>>
> 
> Adding -fcommon on the GCC command line should re-enable it, and you
> should be able to do that in package scope. It might mean we'd have to
> move *(COMMON) out of the discards section though.
> 
> However, as the commit log explains, COMMON allocation is a *bad* idea
> for highly granular code bases such as EDK2, since it merges variables
> based on their names only.
> 
> Do you have any idea why the command line options we use to build
> OpenSSL are not preventing these COMMON sections from being emitted?

My guess is that the GAS source that OpenSSL generates for the crypto
primitives in question is simply broken -- the GAS source probably
includes multiple external definitions (not just declarations) for the
same objects. If that's the case, then it's a genuine bug in OpenSSL.

Thanks
Laszlo


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2020-11-13 20:02 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-03 21:58 [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64 Zurcher, Christopher J
2020-11-03 21:58 ` [PATCH v5 1/2] " Zurcher, Christopher J
2020-11-03 21:58 ` [PATCH v5 2/2] CryptoPkg/OpensslLib: Commit the auto-generated assembly files " Zurcher, Christopher J
2020-11-06  5:56 ` [PATCH v5 0/2] CryptoPkg/OpensslLib: Add native instruction support " Yao, Jiewen
     [not found] ` <1644D590FF4B7423.25549@groups.io>
2020-11-06  6:13   ` [edk2-devel] " Yao, Jiewen
2020-11-06  9:50     ` Zurcher, Christopher J
2020-11-06 10:22       ` Yao, Jiewen
2020-11-06 19:35         ` Zurcher, Christopher J
2020-11-06 23:06           ` Yao, Jiewen
2020-11-07  2:02             ` Zurcher, Christopher J
2020-11-07  2:24               ` Yao, Jiewen
2020-11-07  7:26                 ` Michael D Kinney
2020-11-10 12:31                 ` Laszlo Ersek
2020-11-10 14:28                   ` 回复: " gaoliming
2020-11-11 19:05                     ` Laszlo Ersek
2020-11-10 17:07                   ` Yao, Jiewen
2020-11-11  1:43                     ` Zurcher, Christopher J
2020-11-11  2:19                       ` Yao, Jiewen
2020-11-11 19:09                         ` Laszlo Ersek
2020-11-13  1:22                           ` Zurcher, Christopher J
     [not found]                           ` <1646ECAE89844BF6.31886@groups.io>
2020-11-13  2:28                             ` Zurcher, Christopher J
2020-11-13  7:35                               ` Ard Biesheuvel
2020-11-13 20:02                                 ` Laszlo Ersek
2020-11-11 19:08                       ` Laszlo Ersek
2020-11-11 19:07                     ` Laszlo Ersek
2020-11-09  7:03               ` 回复: " gaoliming
2020-11-10 12:24               ` Laszlo Ersek
2020-11-09  6:56           ` 回复: " gaoliming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox