// Copyright (c) 2022, ARM Inc. // Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice appear in all copies. // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY // SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION // OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN // CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ // Author: Hanno Becker // This file was derived from the assembly generated from aesv8-gcm-armv8.pl, // written by Fangming Fang for the OpenSSL project, // and derived from https: // github.com/ARM-software/AArch64cryptolib, original // author Samuel Lee . // The code below is a 'clean' AArch64 implementation of AES-GCM emphasizing // the logic of the computation. It is meant as the input to manual audits / // formal verification, as well as automated micro-optimization such as done // by the SLOTHY superoptimizer (https: // github.com/slothy-optimizer/slothy). #if !defined(__has_feature) #define __has_feature(x) 0 #endif #if __has_feature(memory_sanitizer) && !defined(OPENSSL_NO_ASM) #define OPENSSL_NO_ASM #endif #include "aarch64-gcm-asm-compat.h" #if !defined(OPENSSL_NO_ASM) && defined(__AARCH64EL__) #if defined(__ELF__) .arch armv8-a+crypto .text .globl aes_gcm_enc_kernel_slothy_base_192 .hidden aes_gcm_enc_kernel_slothy_base_192 .type aes_gcm_enc_kernel_slothy_base_192,%function #elif defined(__APPLE__) .text .globl _aes_gcm_enc_kernel_slothy_base_192 .private_extern _aes_gcm_enc_kernel_slothy_base_192 #else #error Unknown configuration #endif #if __ARM_MAX_ARCH__ >= 8 // Arguments input .req x0 len_bits .req x1 output .req x2 tag_ptr .req x3 ivec .req x4 key .req x5 Htable .req x6 byte_len .req x15 constant_temp .req x25 count .req x1 full_blocks .req x7 remainder .req x16 unroll .req x10 ctr_tmp .req x14 ctr_tmp_w .req w14 ivec_0_63 .req x11 ivec_64_96 .req x12 ivec_64_96_w .req w12 ctr .req w13 ctr_x .req x13 aes_st .req v0 aes_st_q .req q0 aes_st_d .req d0 res .req v0 res_q .req q0 ghash_hi .req v9 ghash_lo .req v8 ghash_mid .req v10 ghash_mid_d .req d10 ghash_tmp .req v11 ghash_tmp_d .req d11 ghash_mod .req v7 ghash_mod_d .req d7 modulo_tmp0 .req v0 modulo_tmp1 .req v1 Ht1q .req q12 Ht2q .req q13 Ht12q .req q14 Ht1 .req v12 Ht2 .req v13 Ht12 .req v14 Ht3q .req q12 Ht4q .req q13 Ht34q .req q14 Ht3 .req v12 Ht4 .req v13 Ht34 .req v14 rk0q .req q18 rk1q .req q19 rk2q .req q20 rk3q .req q21 rk4q .req q22 rk5q .req q23 rk6q .req q24 rk7q .req q25 rk8q .req q26 rk9q .req q27 rk10q .req q28 rk11q .req q15 rk12_lo .req x20 rk12_hi .req x21 rk0 .req v18 rk1 .req v19 rk2 .req v20 rk3 .req v21 rk4 .req v22 rk5 .req v23 rk6 .req v24 rk7 .req v25 rk8 .req v26 rk9 .req v27 rk10 .req v28 rk11 .req v15 plain .req v29 plain_q .req q29 plain_lo .req x22 plain_hi .req x23 tag .req v30 tag_q .req q30 #define UNROLL 4 #define STACK_SIZE_GPRS (6*16) #define STACK_SIZE_VREGS (4*16) #define STACK_SIZE (STACK_SIZE_GPRS + STACK_SIZE_VREGS + UNROLL*16) #define STACK_BASE_GPRS (0) #define STACK_BASE_VREGS (STACK_SIZE_GPRS) #define STACK_BASE_AES_ST (STACK_SIZE_GPRS + STACK_SIZE_VREGS) /********************************************************************/ /* Generic preamble/postamble macros */ /********************************************************************/ .macro save_vregs stp d8, d9, [sp, #(STACK_BASE_VREGS + 16*0)] stp d10, d11, [sp, #(STACK_BASE_VREGS + 16*1)] stp d12, d13, [sp, #(STACK_BASE_VREGS + 16*2)] stp d14, d15, [sp, #(STACK_BASE_VREGS + 16*3)] .endm .macro restore_vregs ldp d8, d9, [sp, #(STACK_BASE_VREGS + 16*0)] ldp d10, d11, [sp, #(STACK_BASE_VREGS + 16*1)] ldp d12, d13, [sp, #(STACK_BASE_VREGS + 16*2)] ldp d14, d15, [sp, #(STACK_BASE_VREGS + 16*3)] .endm .macro save_gprs stp x19, x20, [sp, #(STACK_BASE_GPRS + 16*0)] stp x21, x22, [sp, #(STACK_BASE_GPRS + 16*1)] stp x23, x24, [sp, #(STACK_BASE_GPRS + 16*2)] stp x25, x26, [sp, #(STACK_BASE_GPRS + 16*3)] stp x27, x28, [sp, #(STACK_BASE_GPRS + 16*4)] stp x29, x30, [sp, #(STACK_BASE_GPRS + 16*5)] .endm .macro restore_gprs ldp x19, x20, [sp, #(STACK_BASE_GPRS + 16*0)] ldp x21, x22, [sp, #(STACK_BASE_GPRS + 16*1)] ldp x23, x24, [sp, #(STACK_BASE_GPRS + 16*2)] ldp x25, x26, [sp, #(STACK_BASE_GPRS + 16*3)] ldp x27, x28, [sp, #(STACK_BASE_GPRS + 16*4)] ldp x29, x30, [sp, #(STACK_BASE_GPRS + 16*5)] .endm // Derive number of iterations of unrolled loop and single-block loop .macro prepare_loop_counts mov unroll, #UNROLL // Number of AES Blocks (16b each) lsr full_blocks, byte_len, #4 // Number of iterations of the unrolled loop udiv count, full_blocks, unroll // Number of iterations for the tail loop handling 1 block each msub remainder, count, unroll, full_blocks .endm /********************************************************************/ /* AES related macros */ /********************************************************************/ .macro load_iv ldp ivec_0_63, ivec_64_96, [ivec] lsr ctr_x, ivec_64_96, #32 rev ctr, ctr orr ivec_64_96_w, ivec_64_96_w, ivec_64_96_w // clear top 32 bit .endm .macro next_ctr_init_aes aes_st, loc add ctr_tmp_w, ctr, #\loc rev ctr_tmp_w, ctr_tmp_w orr ctr_tmp, ivec_64_96, ctr_tmp, lsl #32 stp ivec_0_63, ctr_tmp, [sp, #(STACK_BASE_AES_ST + \loc*16)] // @slothy:writes=stack_\loc ldr \aes_st\()_q, [sp, #(STACK_BASE_AES_ST + \loc*16)] // @slothy:reads=stack_\loc .endm // A single AES round // Prevent SLOTHY from unfolding because uArchs tend to fuse AESMC+AESE .macro aesr data, key // @slothy:no-unfold aese \data, \key aesmc \data, \data .endm .macro aesr_0_8 data, key aesr \data\().16b, \key\()0.16b aesr \data\().16b, \key\()1.16b aesr \data\().16b, \key\()2.16b aesr \data\().16b, \key\()3.16b aesr \data\().16b, \key\()4.16b aesr \data\().16b, \key\()5.16b aesr \data\().16b, \key\()6.16b aesr \data\().16b, \key\()7.16b aesr \data\().16b, \key\()8.16b .endm .macro aesr_9_10 data, key aesr \data\().16b, \key\()9.16b aesr \data\().16b, \key\()10.16b .endm .macro aesr_11_12 data, key aesr \data\().16b, \key\()11.16b aesr \data\().16b, \key\()12.16b .endm // Destructs inA .macro eor3 out, inA, inB, inC eor \inA, \inA, \inB eor \out, \inA, \inC .endm .macro aesr_final aes_st, plain, out, loc aese \aes_st\().16b, rk11.16b eor \plain\()_lo, \plain\()_lo, rk12_lo eor \plain\()_hi, \plain\()_hi, rk12_hi stp \plain\()_lo, \plain\()_hi, [sp, #(STACK_BASE_AES_ST + \loc*16)] // @slothy:writes=stack_\loc ldr \plain\()_q, [sp, #(STACK_BASE_AES_ST + \loc*16)] // @slothy:reads=stack_\loc eor \out\().16b, \plain\().16b, \aes_st\().16b .endm .macro aes_full_block aes_st, input, output, loc next_ctr_init_aes \aes_st, \loc aesr_0_8 \aes_st\(), rk aesr_9_10 \aes_st\(), rk aesr_final \aes_st, \input, \output, \loc .endm .macro load_round_key i ldr rk\i\()q, [key, #((\i)*16)] .endm .macro load_round_key_scalar i ldp rk\i\()_lo, rk\i\()_hi, [key, #((\i)*16)] .endm .macro load_round_keys load_round_key 0 load_round_key 1 load_round_key 2 load_round_key 3 load_round_key 4 load_round_key 5 load_round_key 6 load_round_key 7 load_round_key 8 load_round_key 9 load_round_key 10 load_round_key 11 load_round_key_scalar 12 .endm /********************************************************************/ /* Loading of H-table (precomputed H-powers for GHASH) */ /********************************************************************/ // This has to be synchronized with the H-table generation .macro load_h1 dst, dst_q ldr \dst_q, [Htable] .endm .macro load_h2 dst, dst_q ldr \dst_q, [Htable, #32] .endm .macro load_h3 dst, dst_q ldr \dst_q, [Htable, #48] .endm .macro load_h4 dst, dst_q ldr \dst_q, [Htable, #80] .endm .macro load_h5 dst, dst_q ldr \dst_q, [Htable, #96] .endm .macro load_h6 dst, dst_q ldr \dst_q, [Htable, #128] .endm .macro load_h7 dst, dst_q ldr \dst_q, [Htable, #144] .endm .macro load_h8 dst, dst_q ldr \dst_q, [Htable, #176] .endm .macro load_h12 dst, dst_q ldr \dst_q, [Htable, #16] .endm .macro load_h34 dst, dst_q ldr \dst_q, [Htable, #64] .endm .macro load_h56 dst, dst_q ldr \dst_q, [Htable, #112] .endm .macro load_h78 dst, dst_q ldr \dst_q, [Htable, #160] .endm .macro load_full_htable load_h1 Ht1, Ht1q load_h2 Ht2, Ht2q load_h3 Ht3, Ht3q load_h4 Ht4, Ht4q load_h5 Ht5, Ht5q load_h6 Ht6, Ht6q load_h12 Ht12, Ht12q load_h34 Ht34, Ht34q load_h56 Ht56, Ht56q .endm .macro load_htable_12 load_h1 Ht1, Ht1q load_h2 Ht2, Ht2q load_h12 Ht12, Ht12q .endm .macro load_htable_34 load_h3 Ht3, Ht3q load_h4 Ht4, Ht4q load_h34 Ht34, Ht34q .endm .macro load_htable_56 load_h5 Ht5, Ht5q load_h6 Ht6, Ht6q load_h56 Ht56, Ht56q .endm .macro load_htable_78 load_h7 Ht7, Ht7q load_h8 Ht8, Ht8q load_h78 Ht78, Ht78q .endm /********************************************************************/ /* Macros for GHASH udpate */ /********************************************************************/ .macro ghash_init_0 input, Hk, Hk_mid rev64 \input\().16b, \input\().16b // Low product pmull ghash_lo.1q, \input\().1d, \Hk\().1d // High product pmull2 ghash_hi.1q, \input\().2d, \Hk\().2d // Middle product mov ghash_tmp_d, \input\().d[1] eor ghash_tmp.8b, ghash_tmp.8b, \input\().8b pmull ghash_mid.1q, ghash_tmp.1d, \Hk_mid\().1d .endm .macro ghash_init_1 input, Hk, Hk_mid rev64 \input\().16b, \input\().16b // Low product pmull ghash_lo.1q, \input\().1d, \Hk\().1d // High product pmull2 ghash_hi.1q, \input\().2d, \Hk\().2d // Middle product ext ghash_tmp.16b, \input\().16b, \input\().16b, #8 eor ghash_tmp.16b, ghash_tmp.16b, \input\().16b pmull2 ghash_mid.1q, ghash_tmp.2d, \Hk_mid\().2d .endm .macro ghash_acc_0 input, Hk, Hk_mid rev64 \input\().16b, \input\().16b // Low product pmull ghash_tmp.1q, \input\().1d, \Hk\().1d eor ghash_lo.16b, ghash_lo.16b, ghash_tmp.16b // High product pmull2 ghash_tmp.1q, \input\().2d, \Hk\().2d eor ghash_hi.16b, ghash_hi.16b, ghash_tmp.16b // Middle product mov ghash_tmp_d, \input\().d[1] eor ghash_tmp.8b, ghash_tmp.8b, \input\().8b pmull ghash_tmp.1q, ghash_tmp.1d, \Hk_mid\().1d eor ghash_mid.16b, ghash_mid.16b, ghash_tmp.16b .endm .macro ghash_acc_1 input, Hk, Hk_mid rev64 \input\().16b, \input\().16b // Low product pmull ghash_tmp.1q, \input\().1d, \Hk\().1d eor ghash_lo.16b, ghash_lo.16b, ghash_tmp.16b // High product pmull2 ghash_tmp.1q, \input\().2d, \Hk\().2d eor ghash_hi.16b, ghash_hi.16b, ghash_tmp.16b // Middle product ext ghash_tmp.16b, \input\().16b, \input\().16b, #8 eor ghash_tmp.16b, ghash_tmp.16b, \input\().16b pmull2 ghash_tmp.1q, ghash_tmp.2d, \Hk_mid\().2d eor ghash_mid.16b, ghash_mid.16b, ghash_tmp.16b .endm .macro ghash_init_with_tag_0 input, Hk, Hk_mid, tag rev64 \input\().16b, \input\().16b eor \input\().16b, \input\().16b, \tag\().16b // Low product pmull ghash_lo.1q, \input\().1d, \Hk\().1d // High product pmull2 ghash_hi.1q, \input\().2d, \Hk\().2d // Middle product mov ghash_tmp_d, \input\().d[1] eor ghash_tmp.8b, ghash_tmp.8b, \input\().8b pmull ghash_mid.1q, ghash_tmp.1d, \Hk_mid\().1d .endm .macro ghash_init_with_tag_1 input, Hk, Hk_mid, tag rev64 \input\().16b, \input\().16b eor \input\().16b, \input\().16b, \tag\().16b // Low product pmull ghash_lo.1q, \input\().1d, \Hk\().1d // High product pmull2 ghash_hi.1q, \input\().2d, \Hk\().2d // Middle product ext ghash_tmp.16b, \input\().16b, \input\().16b, #8 eor ghash_tmp.16b, ghash_tmp.16b, \input\().16b pmull2 ghash_mid.1q, ghash_tmp.2d, \Hk_mid\().2d .endm .macro ghash_acc_with_tag_0 input, Hk, Hk_mid, tag rev64 \input\().16b, \input\().16b eor \input\().16b, \input\().16b, \tag\().16b // Low product pmull ghash_tmp.1q, \input\().1d, \Hk\().1d eor ghash_lo.16b, ghash_lo.16b, ghash_tmp.16b // High product pmull2 ghash_tmp.1q, \input\().2d, \Hk\().2d eor ghash_hi.16b, ghash_hi.16b, ghash_tmp.16b // Middle product mov ghash_tmp_d, \input\().d[1] eor ghash_tmp.8b, ghash_tmp.8b, \input\().8b pmull ghash_tmp.1q, ghash_tmp.1d, \Hk_mid\().1d eor ghash_mid.16b, ghash_mid.16b, ghash_tmp.16b .endm .macro ghash_acc_with_tag_1 input, Hk, Hk_mid, tag rev64 \input\().16b, \input\().16b eor \input\().16b, \input\().16b, \tag\().16b // Low product pmull ghash_tmp.1q, \input\().1d, \Hk\().1d eor ghash_lo.16b, ghash_lo.16b, ghash_tmp.16b // High product pmull2 ghash_tmp.1q, \input\().2d, \Hk\().2d eor ghash_hi.16b, ghash_hi.16b, ghash_tmp.16b // Middle product ext ghash_tmp.16b, \input\().16b, \input\().16b, #8 eor ghash_tmp.16b, ghash_tmp.16b, \input\().16b pmull2 ghash_tmp.1q, ghash_tmp.2d, \Hk_mid\().2d eor ghash_mid.16b, ghash_mid.16b, ghash_tmp.16b .endm .macro ghash_finalize tag eor modulo_tmp0.16b, ghash_lo.16b, ghash_hi.16b pmull modulo_tmp1.1q, ghash_hi.1d, ghash_mod.1d ext ghash_hi.16b, ghash_hi.16b, ghash_hi.16b, #8 eor ghash_mid.16b, ghash_mid.16b, modulo_tmp0.16b eor modulo_tmp1.16b, ghash_hi.16b, modulo_tmp1.16b eor ghash_mid.16b, ghash_mid.16b, modulo_tmp1.16b pmull ghash_hi.1q, ghash_mid.1d, ghash_mod.1d eor ghash_lo.16b, ghash_lo.16b, ghash_hi.16b ext ghash_mid.16b, ghash_mid.16b, ghash_mid.16b, #8 eor \tag\().16b, ghash_lo.16b, ghash_mid.16b ext \tag\().16b, \tag\().16b, \tag\().16b, #8 .endm .macro load_tag ldr tag_q, [tag_ptr] rev64 tag.16b, tag.16b .endm .macro prepare_ghash // Prepare constant for modular reduction movi ghash_mod.8b, #0xc2 shl ghash_mod_d, ghash_mod_d, #56 .endm /********************************************************************/ /* Core routine */ /********************************************************************/ .align 4 _aes_gcm_enc_kernel_slothy_base_192: aes_gcm_enc_kernel_slothy_base_192: #ifdef BORINGSSL_DISPATCH_TEST adrp x9,_BORINGSSL_function_hit@PAGE add x9, x9, _BORINGSSL_function_hit@PAGEOFF mov w10, #1 strb w10, [x9,#15] // kFlag_aes_gcm_slothy #endif AARCH64_VALID_CALL_TARGET sub sp, sp, #STACK_SIZE Lenc_preamble_start: save_gprs save_vregs lsr byte_len, len_bits, #3 load_round_keys load_tag load_iv prepare_loop_counts prepare_ghash load_htable_12 load_htable_34 Lenc_preamble_end: cbz count, Lloop_unrolled_end cmp count, #1 b.eq Lloop_unrolled_start_iter_1 // Instructions: 135 // Expected cycles: 68 // Expected IPC: 1.9852941176470589 ldr q10, [x6, #64] // *................................................................... add w19, w13, #2 // *................................................................... add w22, w13, #0 // *................................................................... add w27, w13, #1 // *................................................................... ldr q17, [x6, #48] // .*.................................................................. add w29, w13, #3 // .*.................................................................. add w13, w13, #UNROLL // .*.................................................................. rev w19, w19 // .*.................................................................. ldr q5, [x6] // ..*................................................................. rev w22, w22 // ..*................................................................. rev w27, w27 // ..*................................................................. orr x19, x12, x19, lsl #32 // ..*................................................................. ldr q13, [x6, #80] // ...*................................................................ orr x22, x12, x22, lsl #32 // ...*................................................................ orr x27, x12, x27, lsl #32 // ...*................................................................ stp x11, x19, [sp, #STACK_BASE_AES_ST + 32] // ...*................................................................ // @slothy:writes=stack_2 rev w19, w29 // ....*............................................................... add w29, w13, #0 // ....*............................................................... stp x11, x22, [sp, #STACK_BASE_AES_ST] // ....*............................................................... // @slothy:writes=stack_0 orr x19, x12, x19, lsl #32 // .....*.............................................................. rev w29, w29 // .....*.............................................................. add w10, w13, #1 // .....*.............................................................. ldr q16, [sp, #STACK_BASE_AES_ST + 32] // ......*............................................................. // @slothy:reads=stack_2 stp x11, x27, [sp, #STACK_BASE_AES_ST + 16] // ......*............................................................. // @slothy:writes=stack_1 orr x27, x12, x29, lsl #32 // ......*............................................................. rev w10, w10 // ......*............................................................. ldr q2, [sp, #STACK_BASE_AES_ST] // .......*............................................................ // @slothy:reads=stack_0 add w22, w13, #2 // .......*............................................................ orr x29, x12, x10, lsl #32 // .......*............................................................ rev w22, w22 // ........*........................................................... ldp x10, x26, [x0, #48] // ........*........................................................... aesr v16.16b, v18.16b // .........*.......................................................... ldr q3, [sp, #STACK_BASE_AES_ST + 16] // .........*.......................................................... // @slothy:reads=stack_1 orr x23, x12, x22, lsl #32 // .........*.......................................................... aesr v2.16b, v18.16b // ..........*......................................................... stp x11, x19, [sp, #STACK_BASE_AES_ST + 48] // ..........*......................................................... // @slothy:writes=stack_3 ldp x19, x22, [x0, #32] // ..........*......................................................... aesr v16.16b, v19.16b // ...........*........................................................ eor x10, x10, x20 // ...........*........................................................ eor x26, x26, x21 // ...........*........................................................ aesr v3.16b, v18.16b // ............*....................................................... ldp x24, x28, [x0], #(4*16) // ............*....................................................... ldr q29, [sp, #STACK_BASE_AES_ST + 48] // .............*...................................................... // @slothy:reads=stack_3 aesr v16.16b, v20.16b // .............*...................................................... eor x19, x19, x20 // .............*...................................................... eor x22, x22, x21 // .............*...................................................... aesr v3.16b, v19.16b // ..............*..................................................... stp x11, x27, [sp, #STACK_BASE_AES_ST] // ..............*..................................................... // @slothy:writes=stack_0 ldp x27, x9, [x0, #-48] // ..............*..................................................... aesr v16.16b, v21.16b // ...............*.................................................... eor x24, x24, x20 // ...............*.................................................... eor x28, x28, x21 // ...............*.................................................... aesr v29.16b, v18.16b // ................*................................................... stp x19, x22, [sp, #STACK_BASE_AES_ST + 32] // ................*................................................... // @slothy:writes=stack_2 ldr q9, [sp, #STACK_BASE_AES_ST] // .................*.................................................. // @slothy:reads=stack_0 aesr v16.16b, v22.16b // .................*.................................................. eor x19, x27, x20 // .................*.................................................. eor x22, x9, x21 // .................*.................................................. aesr v29.16b, v19.16b // ..................*................................................. stp x11, x29, [sp, #STACK_BASE_AES_ST + 16] // ..................*................................................. // @slothy:writes=stack_1 ldr q14, [sp, #STACK_BASE_AES_ST + 32] // ...................*................................................ // @slothy:reads=stack_2 aesr v16.16b, v23.16b // ...................*................................................ aesr v29.16b, v20.16b // ....................*............................................... stp x10, x26, [sp, #STACK_BASE_AES_ST + 48] // ....................*............................................... // @slothy:writes=stack_3 stp x24, x28, [sp, #STACK_BASE_AES_ST] // ....................*............................................... // @slothy:writes=stack_0 aesr v16.16b, v24.16b // .....................*.............................................. aesr v29.16b, v21.16b // ......................*............................................. ldr q4, [sp, #STACK_BASE_AES_ST] // .......................*............................................ // @slothy:reads=stack_0 aesr v16.16b, v25.16b // .......................*............................................ ldr q8, [sp, #STACK_BASE_AES_ST + 48] // ........................*........................................... // @slothy:reads=stack_3 aesr v29.16b, v22.16b // ........................*........................................... aesr v16.16b, v26.16b // .........................*.......................................... aesr v29.16b, v23.16b // ..........................*......................................... aesr v16.16b, v27.16b // ...........................*........................................ aesr v29.16b, v24.16b // ............................*....................................... aesr v16.16b, v28.16b // .............................*...................................... aesr v29.16b, v25.16b // ..............................*..................................... aese v16.16b, v15.16b // ...............................*.................................... aesr v29.16b, v26.16b // ................................*................................... aesr v3.16b, v20.16b // .................................*.................................. eor v14.16B, v14.16B, v16.16B // .................................*.................................. aesr v29.16b, v27.16b // ..................................*................................. ldr q6, [x6, #32] // ..................................*................................. aesr v3.16b, v21.16b // ...................................*................................ rev64 v16.16B, v14.16B // ...................................*................................ aesr v29.16b, v28.16b // ....................................*............................... ext v1.16B, v16.16B, v16.16B, #8 // .....................................*.............................. pmull2 v31.1q, v16.2d, v6.2d // .....................................*.............................. pmull v6.1q, v16.1d, v6.1d // ......................................*............................. ldr q12, [x6, #16] // ......................................*............................. eor v1.16B, v1.16B, v16.16B // .......................................*............................ aese v29.16b, v15.16b // .......................................*............................ aesr v3.16b, v22.16b // ........................................*........................... eor v16.16B, v8.16B, v29.16B // .........................................*.......................... pmull2 v8.1q, v1.2d, v12.2d // .........................................*.......................... aesr v3.16b, v23.16b // ..........................................*......................... aesr v2.16b, v19.16b // ...........................................*........................ rev64 v29.16B, v16.16B // ...........................................*........................ aesr v3.16b, v24.16b // ............................................*....................... aesr v2.16b, v20.16b // .............................................*...................... mov d0, v29.d[1] // .............................................*...................... aesr v3.16b, v25.16b // ..............................................*..................... aesr v2.16b, v21.16b // ...............................................*.................... eor v1.8B, v0.8B, v29.8B // ...............................................*.................... aesr v3.16b, v26.16b // ................................................*................... pmull v1.1q, v1.1d, v12.1d // .................................................*.................. ldr q12, [sp, #STACK_BASE_AES_ST + 16] // .................................................*.................. // @slothy:reads=stack_1 stp x19, x22, [sp, #STACK_BASE_AES_ST + 16] // .................................................*.................. // @slothy:writes=stack_1 aesr v3.16b, v27.16b // ..................................................*................. aesr v2.16b, v22.16b // ...................................................*................ ldr q11, [sp, #STACK_BASE_AES_ST + 16] // ....................................................*............... // @slothy:reads=stack_1 aesr v3.16b, v28.16b // ....................................................*............... aesr v2.16b, v23.16b // .....................................................*.............. aese v3.16b, v15.16b // ......................................................*............. aesr v2.16b, v24.16b // .......................................................*............ pmull v0.1q, v29.1d, v5.1d // ........................................................*........... eor v3.16B, v11.16B, v3.16B // ........................................................*........... aesr v2.16b, v25.16b // .........................................................*.......... pmull2 v29.1q, v29.2d, v5.2d // ..........................................................*......... rev64 v11.16B, v3.16B // ..........................................................*......... aesr v2.16b, v26.16b // ...........................................................*........ str q3, [x2, #16] // ............................................................*....... pmull v5.1q, v11.1d, v17.1d // ............................................................*....... mov d3, v11.d[1] // .............................................................*...... aesr v2.16b, v27.16b // .............................................................*...... eor v29.16B, v29.16B, v31.16B // ..............................................................*..... aesr v9.16b, v18.16b // ..............................................................*..... aesr v2.16b, v28.16b // ...............................................................*.... eor v3.8B, v3.8B, v11.8B // ...............................................................*.... pmull2 v31.1q, v11.2d, v17.2d // ................................................................*... eor v11.16B, v0.16B, v6.16B // ................................................................*... aese v2.16b, v15.16b // .................................................................*.. aesr v9.16b, v19.16b // ..................................................................*. pmull v6.1q, v3.1d, v10.1d // ...................................................................* eor v17.16B, v4.16B, v2.16B // ...................................................................* // original source code // add W, w13, #0 // ..*.................................................................................................................................... // rev W, W // .........*............................................................................................................................. // orr X, x12, X, lsl #32 // .............*......................................................................................................................... // add W, w13, #1 // ...*................................................................................................................................... // stp x11, X, [sp, #STACK_BASE_AES_ST] // ..................*.................................................................................................................... // rev W, W // ..........*............................................................................................................................ // orr X, x12, X, lsl #32 // ..............*........................................................................................................................ // stp x11, X, [sp, #STACK_BASE_AES_ST + 16] // .......................*............................................................................................................... // add W, w13, #2 // .*..................................................................................................................................... // rev W, W // .......*............................................................................................................................... // ldr Q, [sp, #STACK_BASE_AES_ST] // ..........................*............................................................................................................ // orr X, x12, X, lsl #32 // ...........*........................................................................................................................... // ldr Q, [sp, #STACK_BASE_AES_ST + 16] // ................................*...................................................................................................... // aesr V.16b, v18.16b // ..................................*.................................................................................................... // aesr V.16b, v19.16b // ................................................................................................*...................................... // aesr V.16b, v18.16b // ........................................*.............................................................................................. // aesr V.16b, v20.16b // ...................................................................................................*................................... // stp x11, X, [sp, #STACK_BASE_AES_ST + 32] // ...............*....................................................................................................................... // aesr V.16b, v19.16b // ..............................................*........................................................................................ // aesr V.16b, v21.16b // ......................................................................................................*................................ // aesr V.16b, v20.16b // ...............................................................................*....................................................... // aesr V.16b, v22.16b // .............................................................................................................*......................... // ldr Q, [sp, #STACK_BASE_AES_ST + 32] // ......................*................................................................................................................ // add W, w13, #3 // .....*................................................................................................................................. // rev W, W // ................*...................................................................................................................... // aesr V.16b, v23.16b // ................................................................................................................*...................... // orr X, x12, X, lsl #32 // ...................*................................................................................................................... // aesr V.16b, v21.16b // ...................................................................................*................................................... // stp x11, X, [sp, #STACK_BASE_AES_ST + 48] // ...................................*................................................................................................... // aesr V.16b, v18.16b // ...............................*....................................................................................................... // add w13, w13, #UNROLL // ......*................................................................................................................................ // ldp X, X, [x0, #32] // ....................................*.................................................................................................. // aesr V.16b, v22.16b // ............................................................................................*.......................................... // ldp X, X, [x0], #(4*16) // .........................................*............................................................................................. // aesr V.16b, v19.16b // .....................................*................................................................................................. // aesr V.16b, v23.16b // ...............................................................................................*....................................... // aesr V.16b, v20.16b // ...........................................*........................................................................................... // ldr Q, [sp, #STACK_BASE_AES_ST + 48] // ..........................................*............................................................................................ // eor X, X, x21 // .............................................*......................................................................................... // eor X, X, x21 // ...................................................*................................................................................... // eor X, X, x20 // ............................................*.......................................................................................... // aesr V.16b, v24.16b // ..................................................................................................*.................................... // stp X, X, [sp, #STACK_BASE_AES_ST + 32] // .....................................................*................................................................................. // aesr V.16b, v18.16b // ....................................................*.................................................................................. // aesr V.16b, v21.16b // .................................................*..................................................................................... // add W, w13, #0 // .................*..................................................................................................................... // aesr V.16b, v25.16b // .....................................................................................................*................................. // rev W, W // ....................*.................................................................................................................. // aesr V.16b, v22.16b // .......................................................*............................................................................... // aesr V.16b, v19.16b // ..........................................................*............................................................................ // aesr V.16b, v23.16b // .............................................................*......................................................................... // ldr Q, [x6, #32] // ..................................................................................*.................................................... // aesr V.16b, v24.16b // ..................................................................................................................*.................... // orr X, x12, X, lsl #32 // ........................*.............................................................................................................. // ldr q10, [x6, #64] // *...................................................................................................................................... // aesr V.16b, v24.16b // .................................................................*..................................................................... // aesr V.16b, v20.16b // ..............................................................*........................................................................ // eor X, X, x20 // ..................................................*.................................................................................... // ldp X, X, [x0, #-48] // ................................................*...................................................................................... // ldr Q, [x6, #16] // .........................................................................................*............................................. // aesr V.16b, v25.16b // ....................................................................*.................................................................. // aesr V.16b, v21.16b // ..................................................................*.................................................................... // ldr Q, [sp, #STACK_BASE_AES_ST + 32] // ............................................................*.......................................................................... // eor X, X, x21 // .........................................................*............................................................................. // eor X, X, x20 // ........................................................*.............................................................................. // aesr V.16b, v22.16b // ......................................................................*................................................................ // ldp X, X, [x0, #-16] // ..............................*........................................................................................................ // stp X, X, [sp, #STACK_BASE_AES_ST + 16] // ...........................................................................................................*........................... // aesr V.16b, v26.16b // ........................................................................................................*.............................. // aesr V.16b, v23.16b // ........................................................................*.............................................................. // ldr Q, [x6, #48] // ....*.................................................................................................................................. // ldr Q, [sp, #STACK_BASE_AES_ST + 16] // ..............................................................................................................*........................ // aesr V.16b, v27.16b // ............................................................................................................*.......................... // add W, w13, #1 // .....................*................................................................................................................. // aesr V.16b, v24.16b // ..........................................................................*............................................................ // stp X, X, [sp, #STACK_BASE_AES_ST] // ................................................................*...................................................................... // aesr V.16b, v28.16b // ...............................................................................................................*....................... // eor X, X, x21 // .......................................*............................................................................................... // eor X, X, x20 // ......................................*................................................................................................ // aesr V.16b, v25.16b // ............................................................................*.......................................................... // stp X, X, [sp, #STACK_BASE_AES_ST + 48] // ...............................................................*....................................................................... // aese V.16b, v15.16b // .................................................................................................................*..................... // ldr Q, [sp, #STACK_BASE_AES_ST] // ...................................................................*................................................................... // aesr V.16b, v26.16b // ..............................................................................*........................................................ // stp x11, X, [sp, #STACK_BASE_AES_ST] // ...............................................*....................................................................................... // aesr V.16b, v26.16b // .......................................................................*............................................................... // rev W, W // .........................*............................................................................................................. // aesr V.16b, v27.16b // .................................................................................*..................................................... // eor V.16B, V.16B, V.16B // ....................................................................................................................*.................. // ldr Q, [sp, #STACK_BASE_AES_ST + 48] // .....................................................................*................................................................. // aesr V.16b, v27.16b // .........................................................................*............................................................. // aesr V.16b, v28.16b // .....................................................................................*................................................. // str Q, [x2, #16] // .........................................................................................................................*............. // rev64 V.16B, V.16B // .......................................................................................................................*............... // aesr V.16b, v28.16b // ...........................................................................*........................................................... // ldr Q, [x6] // ........*.............................................................................................................................. // aese V.16b, v15.16b // ...........................................................................................*........................................... // orr X, x12, X, lsl #32 // ............................*.......................................................................................................... // mov D, V.d[1] // ...........................................................................................................................*........... // aesr V.16b, v25.16b // .....................................................................................................................*................. // stp x11, X, [sp, #STACK_BASE_AES_ST + 16] // ...........................................................*........................................................................... // ldr q13, [x6, #80] // ............*.......................................................................................................................... // aese V.16b, v15.16b // .............................................................................*......................................................... // eor v16.16B, V.16B, V.16B // .............................................................................................*......................................... // aesr V.16b, v26.16b // ........................................................................................................................*.............. // pmull v5.1q, V.1d, V.1d // ..........................................................................................................................*............ // eor v14.16B, V.16B, V.16B // ................................................................................*...................................................... // aesr V.16b, v27.16b // ............................................................................................................................*.......... // eor V.8B, V.8B, V.8B // ................................................................................................................................*...... // rev64 V.16B, v16.16B // .................................................................................................*..................................... // pmull2 v31.1q, V.2d, V.2d // .................................................................................................................................*..... // rev64 V.16B, v14.16B // ....................................................................................*.................................................. // aesr V.16b, v28.16b // ...............................................................................................................................*....... // pmull V.1q, V.1d, V.1d // ...................................................................................................................*................... // mov D, V.d[1] // ....................................................................................................*.................................. // ext V.16B, V.16B, V.16B, #8 // ......................................................................................*................................................ // aese V.16b, v15.16b // ...................................................................................................................................*... // add W, w13, #2 // ...........................*........................................................................................................... // pmull2 V.1q, V.2d, V.2d // ......................................................................................................................*................ // eor V.8B, V.8B, V.8B // .......................................................................................................*............................... // rev W, W // .............................*......................................................................................................... // eor v17.16B, V.16B, V.16B // ......................................................................................................................................* // pmull2 V.1q, V.2d, V.2d // .......................................................................................*............................................... // ldr q9, [sp, #STACK_BASE_AES_ST] // ......................................................*................................................................................ // pmull v6.1q, V.1d, v10.1d // .....................................................................................................................................*. // orr x23, x12, X, lsl #32 // .................................*..................................................................................................... // eor V.16B, V.16B, V.16B // ..........................................................................................*............................................ // pmull V.1q, V.1d, V.1d // ........................................................................................*.............................................. // pmull v1.1q, V.1d, V.1d // .........................................................................................................*............................. // ldr q12, [sp, #STACK_BASE_AES_ST + 16] // ..........................................................................................................*............................ // aesr v9.16b, v18.16b // ..............................................................................................................................*........ // pmull2 v8.1q, V.2d, V.2d // ..............................................................................................*........................................ // eor v29.16B, V.16B, V.16B // .............................................................................................................................*......... // eor v11.16B, V.16B, V.16B // ..................................................................................................................................*.... // aesr v9.16b, v19.16b // ....................................................................................................................................*.. sub count, count, #2 cbz count, Lloop_unrolled_start_postamble Lloop_unrolled_start: // Instructions: 148 // Expected cycles: 62 // Expected IPC: 2.3870967741935485 rev64 v4.16B, v17.16B // l............................................................. aesr v12.16b, v18.16b // *............................................................. eor v1.16B, v1.16B, v8.16B // .l............................................................ aesr v9.16b, v20.16b // .*............................................................ stp x11, x23, [sp, #STACK_BASE_AES_ST + 32] // .*............................................................ // @slothy:writes=stack_2 eor v3.16B, v4.16B, v30.16B // ..l........................................................... aesr v12.16b, v19.16b // ..*........................................................... eor v4.16B, v1.16B, v6.16B // ...l.......................................................... aesr v9.16b, v21.16b // ...*.......................................................... ext v0.16B, v3.16B, v3.16B, #8 // ....l......................................................... pmull2 v30.1q, v3.2d, v13.2d // ....l......................................................... aesr v12.16b, v20.16b // .....*........................................................ eor v29.16B, v29.16B, v31.16B // .....l........................................................ aesr v9.16b, v22.16b // ......*....................................................... ldr q6, [sp, #STACK_BASE_AES_ST + 32] // ......*....................................................... // @slothy:reads=stack_2 add w7, w13, #3 // ......*....................................................... eor v8.16B, v0.16B, v3.16B // .......l...................................................... pmull v2.1q, v3.1d, v13.1d // .......l...................................................... rev w7, w7 // .......*...................................................... eor v3.16B, v29.16B, v30.16B // ........l..................................................... aesr v9.16b, v23.16b // ........*..................................................... orr x19, x12, x7, lsl #32 // ........*..................................................... eor v13.16B, v11.16B, v5.16B // .........l.................................................... aesr v12.16b, v21.16b // .........*.................................................... stp x11, x19, [sp, #STACK_BASE_AES_ST + 48] // .........*.................................................... // @slothy:writes=stack_3 aesr v6.16b, v18.16b // ..........*................................................... ext v29.16B, v3.16B, v3.16B, #8 // ..........l................................................... pmull v11.1q, v3.1d, v7.1d // ...........l.................................................. eor v5.16B, v13.16B, v2.16B // ...........l.................................................. add w13, w13, #UNROLL // ...........*.................................................. ldp x22, x10, [x0, #32] // ...........*.................................................. aesr v12.16b, v22.16b // ............*................................................. ldp x27, x24, [x0], #(4*16) // ............*................................................. aesr v6.16b, v19.16b // .............*................................................ eor v0.16B, v5.16B, v3.16B // .............l................................................ eor v29.16B, v29.16B, v11.16B // ..............l............................................... aesr v12.16b, v23.16b // ..............*............................................... aesr v6.16b, v20.16b // ...............*.............................................. ldr q30, [sp, #STACK_BASE_AES_ST + 48] // ...............*.............................................. // @slothy:reads=stack_3 eor x23, x10, x21 // ...............*.............................................. eor x29, x24, x21 // ...............*.............................................. pmull2 v1.1q, v8.2d, v10.2d // ................l............................................. eor x8, x22, x20 // ................*............................................. aesr v12.16b, v24.16b // .................*............................................ stp x8, x23, [sp, #STACK_BASE_AES_ST + 32] // .................*............................................ // @slothy:writes=stack_2 eor v8.16B, v4.16B, v1.16B // ..................l........................................... aesr v30.16b, v18.16b // ..................*........................................... aesr v6.16b, v21.16b // ...................*.......................................... add w14, w13, #0 // ...................e.......................................... aesr v12.16b, v25.16b // ....................*......................................... rev w28, w14 // ....................e......................................... aesr v6.16b, v22.16b // .....................*........................................ eor v3.16B, v8.16B, v0.16B // .....................l........................................ aesr v30.16b, v19.16b // ......................*....................................... str q14, [x2, #32] // ......................l....................................... aesr v6.16b, v23.16b // .......................*...................................... eor v31.16B, v3.16B, v29.16B // .......................l...................................... ldr q11, [x6, #32] // ........................*..................................... aesr v9.16b, v24.16b // ........................*..................................... orr x9, x12, x28, lsl #32 // ........................e..................................... ldr q10, [x6, #64] // .........................*.................................... aesr v6.16b, v24.16b // .........................*.................................... aesr v30.16b, v20.16b // ..........................*................................... eor x25, x27, x20 // ..........................*................................... ldp x17, x27, [x0, #-48] // ..........................*................................... ldr q3, [x6, #16] // ...........................*.................................. aesr v6.16b, v25.16b // ...........................*.................................. aesr v30.16b, v21.16b // ............................*................................. ldr q14, [sp, #STACK_BASE_AES_ST + 32] // ............................*................................. // @slothy:reads=stack_2 pmull v1.1q, v31.1d, v7.1d // .............................l................................ eor x30, x27, x21 // .............................*................................ eor x26, x17, x20 // .............................*................................ aesr v30.16b, v22.16b // ..............................*............................... ldp x7, x19, [x0, #-16] // ..............................*............................... stp x26, x30, [sp, #STACK_BASE_AES_ST + 16] // ..............................*............................... // @slothy:writes=stack_1 ext v29.16B, v31.16B, v31.16B, #8 // ...............................l.............................. aesr v12.16b, v26.16b // ...............................*.............................. aesr v30.16b, v23.16b // ................................*............................. ldr q2, [x6, #48] // ................................*............................. ldr q13, [sp, #STACK_BASE_AES_ST + 16] // .................................*............................ // @slothy:reads=stack_1 aesr v12.16b, v27.16b // .................................*............................ add w14, w13, #1 // .................................e............................ aesr v30.16b, v24.16b // ..................................*........................... eor v31.16B, v5.16B, v1.16B // ..................................l........................... stp x25, x29, [sp, #STACK_BASE_AES_ST] // ..................................*........................... // @slothy:writes=stack_0 aesr v12.16b, v28.16b // ...................................*.......................... eor x29, x19, x21 // ...................................*.......................... eor x19, x7, x20 // ...................................*.......................... aesr v30.16b, v25.16b // ....................................*......................... str q17, [x2], #(4*16) // ....................................l......................... stp x19, x29, [sp, #STACK_BASE_AES_ST + 48] // ....................................*......................... // @slothy:writes=stack_3 aese v12.16b, v15.16b // .....................................*........................ ldr q0, [sp, #STACK_BASE_AES_ST] // .....................................*........................ // @slothy:reads=stack_0 aesr v30.16b, v26.16b // ......................................*....................... str q16, [x2, #-16] // ......................................l....................... stp x11, x9, [sp, #STACK_BASE_AES_ST] // ......................................e....................... // @slothy:writes=stack_0 aesr v6.16b, v26.16b // .......................................*...................... eor v8.16B, v31.16B, v29.16B // .......................................l...................... rev w24, w14 // .......................................e...................... aesr v30.16b, v27.16b // ........................................*..................... eor v31.16B, v13.16B, v12.16B // ........................................*..................... ldr q16, [sp, #STACK_BASE_AES_ST + 48] // .........................................*.................... // @slothy:reads=stack_3 aesr v6.16b, v27.16b // .........................................*.................... aesr v30.16b, v28.16b // ..........................................*................... str q31, [x2, #16] // ..........................................*................... rev64 v4.16B, v31.16B // ...........................................*.................. aesr v6.16b, v28.16b // ...........................................*.................. ldr q12, [x6] // ............................................*................. aese v30.16b, v15.16b // ............................................*................. orr x28, x12, x24, lsl #32 // ............................................e................. mov d1, v4.d[1] // .............................................*................ aesr v9.16b, v25.16b // .............................................*................ stp x11, x28, [sp, #STACK_BASE_AES_ST + 16] // .............................................e................ // @slothy:writes=stack_1 ldr q13, [x6, #80] // ..............................................*............... aese v6.16b, v15.16b // ..............................................*............... eor v16.16B, v16.16B, v30.16B // ...............................................*.............. aesr v9.16b, v26.16b // ...............................................*.............. pmull v5.1q, v4.1d, v2.1d // ................................................*............. eor v14.16B, v14.16B, v6.16B // ................................................*............. aesr v9.16b, v27.16b // .................................................*............ eor v6.8B, v1.8B, v4.8B // .................................................*............ rev64 v30.16B, v16.16B // ..................................................*........... pmull2 v31.1q, v4.2d, v2.2d // ..................................................*........... rev64 v1.16B, v14.16B // ...................................................*.......... aesr v9.16b, v28.16b // ...................................................*.......... pmull v2.1q, v30.1d, v12.1d // ....................................................*......... mov d17, v30.d[1] // ....................................................*......... ext v4.16B, v1.16B, v1.16B, #8 // .....................................................*........ aese v9.16b, v15.16b // .....................................................*........ add w22, w13, #2 // .....................................................e........ pmull2 v29.1q, v30.2d, v12.2d // ......................................................*....... eor v12.8B, v17.8B, v30.8B // ......................................................*....... rev w9, w22 // ......................................................e....... eor v17.16B, v0.16B, v9.16B // .......................................................*...... pmull2 v0.1q, v1.2d, v11.2d // .......................................................*...... ldr q9, [sp, #STACK_BASE_AES_ST] // ........................................................e..... // @slothy:reads=stack_0 pmull v6.1q, v6.1d, v10.1d // ........................................................*..... orr x23, x12, x9, lsl #32 // ........................................................e..... eor v4.16B, v4.16B, v1.16B // .........................................................*.... pmull v11.1q, v1.1d, v11.1d // .........................................................*.... pmull v1.1q, v12.1d, v3.1d // ..........................................................*... ext v30.16B, v8.16B, v8.16B, #8 // ..........................................................l... ldr q12, [sp, #STACK_BASE_AES_ST + 16] // ...........................................................e.. // @slothy:reads=stack_1 aesr v9.16b, v18.16b // ...........................................................e.. pmull2 v8.1q, v4.2d, v3.2d // ............................................................*. eor v29.16B, v29.16B, v0.16B // ............................................................*. eor v11.16B, v2.16B, v11.16B // .............................................................* aesr v9.16b, v19.16b // .............................................................e // original source code // ldr q12, [x6] // ...........................................................*........................................|..........................................................................................................*........................................|..........................................................................................................*.................................. // ldr q13, [x6, #32] // .........*..........................................................................................|........................................................*..........................................................................................|........................................................*.................................................................................... // ldr q14, [x6, #16] // .................*..................................................................................|................................................................*..................................................................................|................................................................*............................................................................ // ldp x22, x23, [x0, #(3*16)] // .........................*..........................................................................|........................................................................*..........................................................................|........................................................................*.................................................................... // add w14, w13, #3 // ....................................................................................................|..............*....................................................................................................................................|..............*.............................................................................................................................. // rev w14, w14 // ....................................................................................................|.................*.................................................................................................................................|.................*........................................................................................................................... // orr x14, x12, x14, lsl #32 // ....................................................................................................|....................*..............................................................................................................................|....................*........................................................................................................................ // stp x11, x14, [sp, #(STACK_BASE_AES_ST + 3*16)] // ....................................................................................................|.......................*...........................................................................................................................|.......................*..................................................................................................................... // ldr q0, [sp, #(STACK_BASE_AES_ST + 3*16)] // ....................................................................................................|.....................................*.............................................................................................................|.....................................*....................................................................................................... // aesr v0.16b, v18.16b // ....................................................................................................|.............................................*.....................................................................................................|.............................................*............................................................................................... // aesr v0.16b, v19.16b // .....*..............................................................................................|....................................................*..............................................................................................|....................................................*........................................................................................ // aesr v0.16b, v20.16b // ..............*.....................................................................................|.............................................................*.....................................................................................|.............................................................*............................................................................... // aesr v0.16b, v21.16b // ...................*................................................................................|..................................................................*................................................................................|..................................................................*.......................................................................... // aesr v0.16b, v22.16b // ........................*...........................................................................|.......................................................................*...........................................................................|.......................................................................*..................................................................... // aesr v0.16b, v23.16b // .............................*......................................................................|............................................................................*......................................................................|............................................................................*................................................................ // aesr v0.16b, v24.16b // ..................................*.................................................................|.................................................................................*.................................................................|.................................................................................*........................................................... // aesr v0.16b, v25.16b // ........................................*...........................................................|.......................................................................................*...........................................................|.......................................................................................*..................................................... // aesr v0.16b, v26.16b // .............................................*......................................................|............................................................................................*......................................................|............................................................................................*................................................ // aesr v0.16b, v27.16b // ...................................................*................................................|..................................................................................................*................................................|..................................................................................................*.......................................... // aesr v0.16b, v28.16b // .......................................................*............................................|......................................................................................................*............................................|......................................................................................................*...................................... // aese v0.16b, v15.16b // ............................................................*.......................................|...........................................................................................................*.......................................|...........................................................................................................*................................. // eor x22, x22, x20 // .......................................*............................................................|......................................................................................*............................................................|......................................................................................*...................................................... // eor x23, x23, x21 // ......................................*.............................................................|.....................................................................................*.............................................................|.....................................................................................*....................................................... // stp x22, x23, [sp, #(STACK_BASE_AES_ST + 3*16)] // ..........................................*.........................................................|.........................................................................................*.........................................................|.........................................................................................*................................................... // ldr q29, [sp, #(STACK_BASE_AES_ST + 3*16)] // .....................................................*..............................................|....................................................................................................*..............................................|....................................................................................................*........................................ // eor v0.16b, v29.16b, v0.16b // ...................................................................*................................|..................................................................................................................*................................|..................................................................................................................*.......................... // str q0, [x2, #(3*16)] // ..............................................l.....................................................|.............................................................................................l.....................................................|.............................................................................................l............................................... // rev64 v0.16b, v0.16b // .........................................................................*..........................|........................................................................................................................*..........................|........................................................................................................................*.................... // pmull v8.1q, v0.1d, v12.1d // .............................................................................*......................|............................................................................................................................*......................|............................................................................................................................*................ // pmull2 v9.1q, v0.2d, v12.2d // ..................................................................................*.................|.................................................................................................................................*.................|.................................................................................................................................*........... // mov d11, v0.d[1] // ..............................................................................*.....................|.............................................................................................................................*.....................|.............................................................................................................................*............... // eor v11.8b, v11.8b, v0.8b // ...................................................................................*................|..................................................................................................................................*................|..................................................................................................................................*.......... // pmull v10.1q, v11.1d, v14.1d // ............................................................................................*.......|...........................................................................................................................................*.......|...........................................................................................................................................*. // ldp x22, x23, [x0, #(2*16)] // ....................................................................................................|.............................*.....................................................................................................................|.............................*............................................................................................................... // add w14, w13, #2 // .................................................................................e..................|................................................................................................................................e..................|................................................................................................................................e............ // rev w14, w14 // ....................................................................................e...............|...................................................................................................................................e...............|...................................................................................................................................e......... // orr x14, x12, x14, lsl #32 // .........................................................................................e..........|........................................................................................................................................e..........|........................................................................................................................................e.... // stp x11, x14, [sp, #(STACK_BASE_AES_ST + 2*16)] // ....................................................................................................|...*...............................................................................................................................................|...*......................................................................................................................................... // ldr q0, [sp, #(STACK_BASE_AES_ST + 2*16)] // ....................................................................................................|.............*.....................................................................................................................................|.............*............................................................................................................................... // aesr v0.16b, v18.16b // ....................................................................................................|........................*..........................................................................................................................|........................*.................................................................................................................... // aesr v0.16b, v19.16b // ....................................................................................................|................................*..................................................................................................................|................................*............................................................................................................ // aesr v0.16b, v20.16b // ....................................................................................................|....................................*..............................................................................................................|....................................*........................................................................................................ // aesr v0.16b, v21.16b // ....................................................................................................|..............................................*....................................................................................................|..............................................*.............................................................................................. // aesr v0.16b, v22.16b // ...*................................................................................................|..................................................*................................................................................................|..................................................*.......................................................................................... // aesr v0.16b, v23.16b // .......*............................................................................................|......................................................*............................................................................................|......................................................*...................................................................................... // aesr v0.16b, v24.16b // .............*......................................................................................|............................................................*......................................................................................|............................................................*................................................................................ // aesr v0.16b, v25.16b // ..................*.................................................................................|.................................................................*.................................................................................|.................................................................*........................................................................... // aesr v0.16b, v26.16b // ................................................*...................................................|...............................................................................................*...................................................|...............................................................................................*............................................. // aesr v0.16b, v27.16b // ......................................................*.............................................|.....................................................................................................*.............................................|.....................................................................................................*....................................... // aesr v0.16b, v28.16b // ..........................................................*.........................................|.........................................................................................................*.........................................|.........................................................................................................*................................... // aese v0.16b, v15.16b // ..................................................................*.................................|.................................................................................................................*.................................|.................................................................................................................*........................... // eor x22, x22, x20 // ....................................................................................................|.........................................*.........................................................................................................|.........................................*................................................................................................... // eor x23, x23, x21 // ....................................................................................................|......................................*............................................................................................................|......................................*...................................................................................................... // stp x22, x23, [sp, #(STACK_BASE_AES_ST + 2*16)] // ....................................................................................................|...........................................*.......................................................................................................|...........................................*................................................................................................. // ldr q29, [sp, #(STACK_BASE_AES_ST + 2*16)] // ....................*...............................................................................|...................................................................*...............................................................................|...................................................................*......................................................................... // eor v0.16b, v29.16b, v0.16b // ......................................................................*.............................|.....................................................................................................................*.............................|.....................................................................................................................*....................... // str q0, [x2, #(2*16)] // ......l.............................................................................................|.....................................................l.............................................................................................|.....................................................l....................................................................................... // rev64 v0.16b, v0.16b // ...........................................................................*........................|..........................................................................................................................*........................|..........................................................................................................................*.................. // pmull v11.1q, v0.1d, v13.1d // ...........................................................................................*........|..........................................................................................................................................*........|..........................................................................................................................................*.. // eor v8.16b, v8.16b, v11.16b // ..................................................................................................*.|.................................................................................................................................................*.|............................................................................................................................................. // pmull2 v11.1q, v0.2d, v13.2d // ......................................................................................*.............|.....................................................................................................................................*.............|.....................................................................................................................................*....... // eor v9.16b, v9.16b, v11.16b // .................................................................................................*..|................................................................................................................................................*..|............................................................................................................................................. // ext v11.16b, v0.16b, v0.16b, #8 // ...............................................................................*....................|..............................................................................................................................*....................|..............................................................................................................................*.............. // eor v11.16b, v11.16b, v0.16b // ..........................................................................................*.........|.........................................................................................................................................*.........|.........................................................................................................................................*... // pmull2 v11.1q, v11.2d, v14.2d // ................................................................................................*...|...............................................................................................................................................*...|............................................................................................................................................. // eor v10.16b, v10.16b, v11.16b // ....................................................................................................|.l.................................................................................................................................................|.l........................................................................................................................................... // ldr q12, [x6, #48] // ..............................*.....................................................................|.............................................................................*.....................................................................|.............................................................................*............................................................... // ldr q13, [x6, #80] // .................................................................*..................................|................................................................................................................*..................................|................................................................................................................*............................ // ldr q14, [x6, #64] // ............*.......................................................................................|...........................................................*.......................................................................................|...........................................................*................................................................................. // ldp x22, x23, [x0, #(1*16)] // ................*...................................................................................|...............................................................*...................................................................................|...............................................................*............................................................................. // add w14, w13, #1 // .................................e..................................................................|................................................................................e..................................................................|................................................................................e............................................................ // rev w14, w14 // ..................................................e.................................................|.................................................................................................e.................................................|.................................................................................................e........................................... // orr x14, x12, x14, lsl #32 // .............................................................e......................................|............................................................................................................e......................................|............................................................................................................e................................ // stp x11, x14, [sp, #(STACK_BASE_AES_ST + 1*16)] // ................................................................e...................................|...............................................................................................................e...................................|...............................................................................................................e............................. // ldr q0, [sp, #(STACK_BASE_AES_ST + 1*16)] // ..............................................................................................e.....|.............................................................................................................................................e.....|............................................................................................................................................. // aesr v0.16b, v18.16b // ....................................................................................................|*..................................................................................................................................................|*............................................................................................................................................ // aesr v0.16b, v19.16b // ....................................................................................................|.....*.............................................................................................................................................|.....*....................................................................................................................................... // aesr v0.16b, v20.16b // ....................................................................................................|..........*........................................................................................................................................|..........*.................................................................................................................................. // aesr v0.16b, v21.16b // ....................................................................................................|......................*............................................................................................................................|......................*...................................................................................................................... // aesr v0.16b, v22.16b // ....................................................................................................|..............................*....................................................................................................................|..............................*.............................................................................................................. // aesr v0.16b, v23.16b // ....................................................................................................|...................................*...............................................................................................................|...................................*......................................................................................................... // aesr v0.16b, v24.16b // ....................................................................................................|..........................................*........................................................................................................|..........................................*.................................................................................................. // aesr v0.16b, v25.16b // .*..................................................................................................|................................................*..................................................................................................|................................................*............................................................................................ // aesr v0.16b, v26.16b // ............................*.......................................................................|...........................................................................*.......................................................................|...........................................................................*................................................................. // aesr v0.16b, v27.16b // ................................*...................................................................|...............................................................................*...................................................................|...............................................................................*............................................................. // aesr v0.16b, v28.16b // .....................................*..............................................................|....................................................................................*..............................................................|....................................................................................*........................................................ // aese v0.16b, v15.16b // ...........................................*........................................................|..........................................................................................*........................................................|..........................................................................................*.................................................. // eor x22, x22, x20 // .......................*............................................................................|......................................................................*............................................................................|......................................................................*...................................................................... // eor x23, x23, x21 // ......................*.............................................................................|.....................................................................*.............................................................................|.....................................................................*....................................................................... // stp x22, x23, [sp, #(STACK_BASE_AES_ST + 1*16)] // ..........................*.........................................................................|.........................................................................*.........................................................................|.........................................................................*................................................................... // ldr q29, [sp, #(STACK_BASE_AES_ST + 1*16)] // ...............................*....................................................................|..............................................................................*....................................................................|..............................................................................*.............................................................. // eor v0.16b, v29.16b, v0.16b // ....................................................*...............................................|...................................................................................................*...............................................|...................................................................................................*......................................... // str q0, [x2, #(1*16)] // ........................................................*...........................................|.......................................................................................................*...........................................|.......................................................................................................*..................................... // rev64 v0.16b, v0.16b // .........................................................*..........................................|........................................................................................................*..........................................|........................................................................................................*.................................... // pmull v11.1q, v0.1d, v12.1d // .....................................................................*..............................|....................................................................................................................*..............................|....................................................................................................................*........................ // eor v8.16b, v8.16b, v11.16b // ....................................................................................................|.....................l.............................................................................................................................|.....................l....................................................................................................................... // pmull2 v11.1q, v0.2d, v12.2d // ..........................................................................*.........................|.........................................................................................................................*.........................|.........................................................................................................................*................... // eor v9.16b, v9.16b, v11.16b // ....................................................................................................|...........l.......................................................................................................................................|...........l................................................................................................................................. // mov d11, v0.d[1] // ..............................................................*.....................................|.............................................................................................................*.....................................|.............................................................................................................*............................... // eor v11.8b, v11.8b, v0.8b // ........................................................................*...........................|.......................................................................................................................*...........................|.......................................................................................................................*..................... // pmull v11.1q, v11.1d, v14.1d // ........................................................................................*...........|.......................................................................................................................................*...........|.......................................................................................................................................*..... // eor v10.16b, v10.16b, v11.16b // ....................................................................................................|......l............................................................................................................................................|......l...................................................................................................................................... // ldp x22, x23, [x0], #(4*16) // ....................................................................................................|...............................*...................................................................................................................|...............................*............................................................................................................. // add w14, w13, #0 // e...................................................................................................|...............................................e...................................................................................................|...............................................e............................................................................................. // rev w14, w14 // ..e.................................................................................................|.................................................e.................................................................................................|.................................................e........................................................................................... // orr x14, x12, x14, lsl #32 // ...........e........................................................................................|..........................................................e........................................................................................|..........................................................e.................................................................................. // stp x11, x14, [sp, #(STACK_BASE_AES_ST + 0*16)] // ...............................................e....................................................|..............................................................................................e....................................................|..............................................................................................e.............................................. // ldr q0, [sp, #(STACK_BASE_AES_ST + 0*16)] // .......................................................................................e............|......................................................................................................................................e............|......................................................................................................................................e...... // aesr v0.16b, v18.16b // ...............................................................................................e....|..............................................................................................................................................e....|............................................................................................................................................. // aesr v0.16b, v19.16b // ...................................................................................................e|..................................................................................................................................................e|............................................................................................................................................. // aesr v0.16b, v20.16b // ....................................................................................................|..*................................................................................................................................................|..*.......................................................................................................................................... // aesr v0.16b, v21.16b // ....................................................................................................|.......*...........................................................................................................................................|.......*..................................................................................................................................... // aesr v0.16b, v22.16b // ....................................................................................................|............*......................................................................................................................................|............*................................................................................................................................ // aesr v0.16b, v23.16b // ....................................................................................................|...................*...............................................................................................................................|...................*......................................................................................................................... // aesr v0.16b, v24.16b // ..........*.........................................................................................|.........................................................*.........................................................................................|.........................................................*................................................................................... // aesr v0.16b, v25.16b // ...............................................................*....................................|..............................................................................................................*....................................|..............................................................................................................*.............................. // aesr v0.16b, v26.16b // ....................................................................*...............................|...................................................................................................................*...............................|...................................................................................................................*......................... // aesr v0.16b, v27.16b // .......................................................................*............................|......................................................................................................................*............................|......................................................................................................................*...................... // aesr v0.16b, v28.16b // ............................................................................*.......................|...........................................................................................................................*.......................|...........................................................................................................................*................. // aese v0.16b, v15.16b // ................................................................................*...................|...............................................................................................................................*...................|...............................................................................................................................*............. // eor x22, x22, x20 // ...............*....................................................................................|..............................................................*....................................................................................|..............................................................*.............................................................................. // eor x23, x23, x21 // ....................................................................................................|.......................................*...........................................................................................................|.......................................*..................................................................................................... // stp x22, x23, [sp, #(STACK_BASE_AES_ST + 0*16)] // ....................................*...............................................................|...................................................................................*...............................................................|...................................................................................*......................................................... // ldr q29, [sp, #(STACK_BASE_AES_ST + 0*16)] // ............................................*.......................................................|...........................................................................................*.......................................................|...........................................................................................*................................................. // eor v0.16b, v29.16b, v0.16b // .....................................................................................*..............|....................................................................................................................................*..............|....................................................................................................................................*........ // str q0, [x2], #(4*16) // .........................................l..........................................................|........................................................................................l..........................................................|........................................................................................l.................................................... // rev64 v0.16b, v0.16b // ....................................................................................................l...................................................................................................................................................l............................................................................................................................................. // eor v0.16b, v0.16b, v30.16b // ....................................................................................................|....l..............................................................................................................................................|....l........................................................................................................................................ // pmull v11.1q, v0.1d, v13.1d // ....................................................................................................|................l..................................................................................................................................|................l............................................................................................................................ // eor v8.16b, v8.16b, v11.16b // ....................................................................................................|...........................l.......................................................................................................................|...........................l................................................................................................................. // pmull2 v11.1q, v0.2d, v13.2d // ....................................................................................................|.........l.........................................................................................................................................|.........l................................................................................................................................... // eor v9.16b, v9.16b, v11.16b // ....................................................................................................|..................l................................................................................................................................|..................l.......................................................................................................................... // ext v11.16b, v0.16b, v0.16b, #8 // ....................................................................................................|........l..........................................................................................................................................|........l.................................................................................................................................... // eor v11.16b, v11.16b, v0.16b // ....................................................................................................|...............l...................................................................................................................................|...............l............................................................................................................................. // pmull2 v11.1q, v11.2d, v14.2d // ....................................................................................................|........................................l..........................................................................................................|........................................l.................................................................................................... // eor v10.16b, v10.16b, v11.16b // ....................................................................................................|............................................l......................................................................................................|............................................l................................................................................................ // eor v0.16b, v8.16b, v9.16b // ....................................................................................................|.................................l.................................................................................................................|.................................l........................................................................................................... // pmull v1.1q, v9.1d, v7.1d // ....................................................................................................|..........................l........................................................................................................................|..........................l.................................................................................................................. // ext v9.16b, v9.16b, v9.16b, #8 // ....................................................................................................|.........................l.........................................................................................................................|.........................l................................................................................................................... // eor v10.16b, v10.16b, v0.16b // ....l...............................................................................................|...................................................l...............................................................................................|...................................................l......................................................................................... // eor v1.16b, v9.16b, v1.16b // ....................................................................................................|..................................l................................................................................................................|..................................l.......................................................................................................... // eor v10.16b, v10.16b, v1.16b // ........l...........................................................................................|.......................................................l...........................................................................................|.......................................................l..................................................................................... // pmull v9.1q, v10.1d, v7.1d // .....................l..............................................................................|....................................................................l..............................................................................|....................................................................l........................................................................ // eor v8.16b, v8.16b, v9.16b // ...................................l................................................................|..................................................................................l................................................................|..................................................................................l.......................................................... // ext v10.16b, v10.16b, v10.16b, #8 // ...........................l........................................................................|..........................................................................l........................................................................|..........................................................................l.................................................................. // eor v30.16b, v8.16b, v10.16b // .................................................l..................................................|................................................................................................l..................................................|................................................................................................l............................................ // ext v30.16b, v30.16b, v30.16b, #8 // .............................................................................................l......|............................................................................................................................................l......|............................................................................................................................................l // add w13, w13, #UNROLL // ....................................................................................................|............................*......................................................................................................................|............................*................................................................................................................ sub count, count, #1 cbnz count, Lloop_unrolled_start Lloop_unrolled_start_postamble:// end of loop kernel // Instructions: 161 // Expected cycles: 79 // Expected IPC: 2.037974683544304 aesr v9.16b, v20.16b // *.............................................................................. rev64 v3.16B, v17.16B // *.............................................................................. add w7, w13, #3 // *.............................................................................. stp x11, x23, [sp, #STACK_BASE_AES_ST + 32] // *.............................................................................. // @slothy:writes=stack_2 aesr v12.16b, v18.16b // .*............................................................................. ldr q4, [x6, #32] // .*............................................................................. rev w26, w7 // .*............................................................................. eor v2.16B, v3.16B, v30.16B // ..*............................................................................ aesr v9.16b, v21.16b // ..*............................................................................ orr x26, x12, x26, lsl #32 // ..*............................................................................ ldr q3, [sp, #STACK_BASE_AES_ST + 32] // ...*........................................................................... // @slothy:reads=stack_2 aesr v12.16b, v19.16b // ...*........................................................................... ldp x10, x19, [x0, #32] // ...*........................................................................... pmull v30.1q, v2.1d, v13.1d // ....*.......................................................................... ext v0.16B, v2.16B, v2.16B, #8 // ....*.......................................................................... stp x11, x26, [sp, #STACK_BASE_AES_ST + 48] // ....*.......................................................................... // @slothy:writes=stack_3 eor v29.16B, v29.16B, v31.16B // .....*......................................................................... aesr v12.16b, v20.16b // .....*......................................................................... eor v0.16B, v0.16B, v2.16B // ......*........................................................................ pmull2 v31.1q, v2.2d, v13.2d // ......*........................................................................ eor x24, x19, x21 // ......*........................................................................ ldr q13, [sp, #STACK_BASE_AES_ST + 48] // .......*....................................................................... // @slothy:reads=stack_3 aesr v3.16b, v18.16b // .......*....................................................................... eor x26, x10, x20 // .......*....................................................................... aesr v9.16b, v22.16b // ........*...................................................................... eor v31.16B, v29.16B, v31.16B // ........*...................................................................... stp x26, x24, [sp, #STACK_BASE_AES_ST + 32] // ........*...................................................................... // @slothy:writes=stack_2 eor v8.16B, v1.16B, v8.16B // .........*..................................................................... aesr v12.16b, v21.16b // .........*..................................................................... str q16, [x2, #48] // ..........*.................................................................... aesr v13.16b, v18.16b // ..........*.................................................................... eor v8.16B, v8.16B, v6.16B // ...........*................................................................... aesr v3.16b, v19.16b // ...........*................................................................... ldp x9, x17, [x0, #16] // ...........*................................................................... eor v5.16B, v11.16B, v5.16B // ............*.................................................................. aesr v13.16b, v19.16b // ............*.................................................................. pmull2 v16.1q, v0.2d, v10.2d // .............*................................................................. ldr q29, [x6, #48] // .............*................................................................. eor v11.16B, v5.16B, v30.16B // ..............*................................................................ aesr v13.16b, v20.16b // ..............*................................................................ eor x22, x9, x20 // ..............*................................................................ ldr q30, [sp, #STACK_BASE_AES_ST + 32] // ...............*............................................................... // @slothy:reads=stack_2 pmull v1.1q, v31.1d, v7.1d // ...............*............................................................... ldr q0, [x6] // ................*.............................................................. aesr v13.16b, v21.16b // ................*.............................................................. eor v5.16B, v11.16B, v31.16B // .................*............................................................. aesr v12.16b, v22.16b // .................*............................................................. ldp x30, x24, [x0, #48] // .................*............................................................. ldr q2, [x6, #16] // ..................*............................................................ aesr v13.16b, v22.16b // ..................*............................................................ eor x25, x17, x21 // ..................*............................................................ eor v6.16B, v8.16B, v16.16B // ...................*........................................................... aesr v9.16b, v23.16b // ...................*........................................................... ldp x8, x28, [x0], #(4*16) // ...................*........................................................... aesr v13.16b, v23.16b // ....................*.......................................................... eor x14, x30, x20 // ....................*.......................................................... eor v10.16B, v6.16B, v5.16B // .....................*......................................................... aesr v3.16b, v20.16b // .....................*......................................................... stp x22, x25, [sp, #STACK_BASE_AES_ST + 16] // .....................*......................................................... // @slothy:writes=stack_1 aesr v13.16b, v24.16b // ......................*........................................................ eor x27, x24, x21 // ......................*........................................................ aesr v12.16b, v23.16b // .......................*....................................................... ldr q5, [x6, #64] // .......................*....................................................... eor x30, x8, x20 // .......................*....................................................... ldr q8, [sp, #STACK_BASE_AES_ST + 16] // ........................*...................................................... // @slothy:reads=stack_1 aesr v13.16b, v25.16b // ........................*...................................................... eor x9, x28, x21 // ........................*...................................................... aesr v3.16b, v21.16b // .........................*..................................................... stp x30, x9, [sp, #STACK_BASE_AES_ST] // .........................*..................................................... // @slothy:writes=stack_0 aesr v13.16b, v26.16b // ..........................*.................................................... add w13, w13, #UNROLL // ..........................*.................................................... aesr v3.16b, v22.16b // ...........................*................................................... stp x14, x27, [sp, #STACK_BASE_AES_ST + 48] // ...........................*................................................... // @slothy:writes=stack_3 ldr q16, [sp, #STACK_BASE_AES_ST] // ............................*.................................................. // @slothy:reads=stack_0 aesr v13.16b, v27.16b // ............................*.................................................. str q14, [x2, #32] // .............................*................................................. aesr v9.16b, v24.16b // .............................*................................................. ldr q14, [sp, #STACK_BASE_AES_ST + 48] // ..............................*................................................ // @slothy:reads=stack_3 aesr v13.16b, v28.16b // ..............................*................................................ ext v31.16B, v31.16B, v31.16B, #8 // ...............................*............................................... aesr v9.16b, v25.16b // ...............................*............................................... ldr q6, [x6, #80] // ................................*.............................................. aese v13.16b, v15.16b // ................................*.............................................. eor v31.16B, v31.16B, v1.16B // .................................*............................................. aesr v9.16b, v26.16b // .................................*............................................. eor v13.16B, v14.16B, v13.16B // ..................................*............................................ aesr v3.16b, v23.16b // ..................................*............................................ eor v10.16B, v10.16B, v31.16B // ...................................*........................................... aesr v9.16b, v27.16b // ...................................*........................................... aesr v3.16b, v24.16b // ....................................*.......................................... rev64 v1.16B, v13.16B // ....................................*.......................................... ext v14.16B, v10.16B, v10.16B, #8 // .....................................*......................................... pmull v10.1q, v10.1d, v7.1d // .....................................*......................................... mov d31, v1.d[1] // ......................................*........................................ aesr v9.16b, v28.16b // ......................................*........................................ eor v11.16B, v11.16B, v10.16B // .......................................*....................................... aesr v12.16b, v24.16b // .......................................*....................................... eor v10.8B, v31.8B, v1.8B // ........................................*...................................... aese v9.16b, v15.16b // ........................................*...................................... eor v31.16B, v11.16B, v14.16B // .........................................*..................................... aesr v12.16b, v25.16b // .........................................*..................................... eor v16.16B, v16.16B, v9.16B // ..........................................*.................................... aesr v3.16b, v25.16b // ..........................................*.................................... aesr v12.16b, v26.16b // ...........................................*................................... ext v31.16B, v31.16B, v31.16B, #8 // ...........................................*................................... rev64 v11.16B, v16.16B // ............................................*.................................. aesr v3.16b, v26.16b // ............................................*.................................. str q13, [x2, #112] // .............................................*................................. aesr v12.16b, v27.16b // .............................................*................................. eor v13.16B, v11.16B, v31.16B // ..............................................*................................ aesr v3.16b, v27.16b // ..............................................*................................ aesr v12.16b, v28.16b // ...............................................*............................... str q17, [x2], #(4*16) // ...............................................*............................... aesr v3.16b, v28.16b // ................................................*.............................. ext v9.16B, v13.16B, v13.16B, #8 // ................................................*.............................. str q16, [x2], #(4*16) // .................................................*............................. aese v12.16b, v15.16b // .................................................*............................. eor v14.16B, v9.16B, v13.16B // ..................................................*............................ aese v3.16b, v15.16b // ..................................................*............................ pmull2 v11.1q, v1.2d, v0.2d // ...................................................*........................... eor v8.16B, v8.16B, v12.16B // ...................................................*........................... eor v30.16B, v30.16B, v3.16B // ....................................................*.......................... pmull v17.1q, v10.1d, v2.1d // ....................................................*.......................... rev64 v9.16B, v8.16B // .....................................................*......................... pmull v3.1q, v13.1d, v6.1d // .....................................................*......................... pmull v1.1q, v1.1d, v0.1d // ......................................................*........................ rev64 v0.16B, v30.16B // ......................................................*........................ pmull2 v10.1q, v9.2d, v29.2d // .......................................................*....................... mov d12, v9.d[1] // .......................................................*....................... pmull2 v16.1q, v0.2d, v4.2d // ........................................................*...................... ext v31.16B, v0.16B, v0.16B, #8 // ........................................................*...................... eor v12.8B, v12.8B, v9.8B // .........................................................*..................... pmull v4.1q, v0.1d, v4.1d // .........................................................*..................... eor v16.16B, v11.16B, v16.16B // ..........................................................*.................... eor v11.16B, v31.16B, v0.16B // ..........................................................*.................... pmull v29.1q, v9.1d, v29.1d // ...........................................................*................... eor v4.16B, v1.16B, v4.16B // ...........................................................*................... eor v10.16B, v16.16B, v10.16B // ............................................................*.................. pmull2 v31.1q, v11.2d, v2.2d // ............................................................*.................. eor v4.16B, v4.16B, v29.16B // .............................................................*................. pmull2 v16.1q, v13.2d, v6.2d // .............................................................*................. eor v9.16B, v17.16B, v31.16B // ..............................................................*................ pmull v1.1q, v12.1d, v5.1d // ..............................................................*................ pmull2 v17.1q, v14.2d, v5.2d // ...............................................................*............... eor v5.16B, v10.16B, v16.16B // ...............................................................*............... eor v0.16B, v4.16B, v3.16B // ................................................................*.............. eor v29.16B, v9.16B, v1.16B // ................................................................*.............. pmull v31.1q, v5.1d, v7.1d // .................................................................*............. ext v9.16B, v5.16B, v5.16B, #8 // .................................................................*............. eor v4.16B, v29.16B, v17.16B // ..................................................................*............ eor v12.16B, v0.16B, v5.16B // ..................................................................*............ str q8, [x2, #-48] // ...................................................................*........... eor v17.16B, v9.16B, v31.16B // ...................................................................*........... str q30, [x2, #-32] // ....................................................................*.......... eor v6.16B, v4.16B, v12.16B // ....................................................................*.......... eor v12.16B, v6.16B, v17.16B // ......................................................................*........ ext v5.16B, v12.16B, v12.16B, #8 // ........................................................................*...... pmull v9.1q, v12.1d, v7.1d // ........................................................................*...... eor v13.16B, v0.16B, v9.16B // ..........................................................................*.... eor v30.16B, v13.16B, v5.16B // ............................................................................*.. ext v30.16B, v30.16B, v30.16B, #8 // ..............................................................................* // original source code // rev64 V.16B, v17.16B // .*............................................................................................................................................................... // aesr v12.16b, v18.16b // ....*............................................................................................................................................................ // eor V.16B, v1.16B, v8.16B // ...........................*..................................................................................................................................... // aesr v9.16b, v20.16b // *................................................................................................................................................................ // stp x11, x23, [sp, #STACK_BASE_AES_ST + 32] // ...*............................................................................................................................................................. // eor V.16B, V.16B, v30.16B // .......*......................................................................................................................................................... // aesr v12.16b, v19.16b // ...........*..................................................................................................................................................... // eor V.16B, V.16B, v6.16B // ...............................*................................................................................................................................. // aesr v9.16b, v21.16b // ........*........................................................................................................................................................ // ext V.16B, V.16B, V.16B, #8 // ..............*.................................................................................................................................................. // pmull2 V.1q, V.2d, v13.2d // ...................*............................................................................................................................................. // aesr v12.16b, v20.16b // .................*............................................................................................................................................... // eor V.16B, v29.16B, v31.16B // ................*................................................................................................................................................ // aesr v9.16b, v22.16b // ........................*........................................................................................................................................ // ldr Q, [sp, #STACK_BASE_AES_ST + 32] // ..........*...................................................................................................................................................... // add W, w13, #3 // ..*.............................................................................................................................................................. // eor V.16B, V.16B, V.16B // ..................*.............................................................................................................................................. // pmull V.1q, V.1d, v13.1d // .............*................................................................................................................................................... // rev W, W // ......*.......................................................................................................................................................... // eor V.16B, V.16B, V.16B // .........................*....................................................................................................................................... // aesr v9.16b, v23.16b // ....................................................*............................................................................................................ // orr X, x12, X, lsl #32 // .........*....................................................................................................................................................... // eor V.16B, v11.16B, v5.16B // ..................................*.............................................................................................................................. // aesr v12.16b, v21.16b // ............................*.................................................................................................................................... // stp x11, X, [sp, #STACK_BASE_AES_ST + 48] // ...............*................................................................................................................................................. // aesr V.16b, v18.16b // ......................*.......................................................................................................................................... // ext V.16B, V.16B, V.16B, #8 // ...............................................................................*................................................................................. // pmull V.1q, V.1d, v7.1d // ..........................................*...................................................................................................................... // eor V.16B, V.16B, V.16B // ......................................*.......................................................................................................................... // add w13, w13, #UNROLL // ......................................................................*.......................................................................................... // ldp X, X, [x0, #32] // ............*.................................................................................................................................................... // aesr v12.16b, v22.16b // ..............................................*.................................................................................................................. // ldp X, X, [x0], #(4*16) // .....................................................*........................................................................................................... // aesr V.16b, v19.16b // ................................*................................................................................................................................ // eor V.16B, V.16B, V.16B // .............................................*................................................................................................................... // eor V.16B, V.16B, V.16B // ...................................................................................*............................................................................. // aesr v12.16b, v23.16b // .............................................................*................................................................................................... // aesr V.16b, v20.16b // .........................................................*....................................................................................................... // ldr Q, [sp, #STACK_BASE_AES_ST + 48] // .....................*........................................................................................................................................... // eor X, X, x21 // ....................*............................................................................................................................................ // eor X, X, x21 // ..................................................................*.............................................................................................. // pmull2 V.1q, V.2d, v10.2d // ....................................*............................................................................................................................ // eor X, X, x20 // .......................*......................................................................................................................................... // aesr v12.16b, v24.16b // ................................................................................................*................................................................ // stp X, X, [sp, #STACK_BASE_AES_ST + 32] // ..........................*...................................................................................................................................... // eor V.16B, V.16B, V.16B // ...................................................*............................................................................................................. // aesr V.16b, v18.16b // ..............................*.................................................................................................................................. // aesr V.16b, v21.16b // ...................................................................*............................................................................................. // aesr v12.16b, v25.16b // ....................................................................................................*............................................................ // aesr V.16b, v22.16b // .......................................................................*......................................................................................... // eor V.16B, V.16B, V.16B // ........................................................*........................................................................................................ // aesr V.16b, v19.16b // ...................................*............................................................................................................................. // str q14, [x2, #32] // ...........................................................................*..................................................................................... // aesr V.16b, v23.16b // ......................................................................................*.......................................................................... // eor V.16B, V.16B, V.16B // .......................................................................................*......................................................................... // ldr Q, [x6, #32] // .....*........................................................................................................................................................... // aesr v9.16b, v24.16b // ............................................................................*.................................................................................... // ldr Q, [x6, #64] // ..............................................................*.................................................................................................. // aesr V.16b, v24.16b // .........................................................................................*....................................................................... // aesr V.16b, v20.16b // .......................................*......................................................................................................................... // eor X, X, x20 // ...............................................................*................................................................................................. // ldp X, X, [x0, #-48] // .................................*............................................................................................................................... // ldr Q, [x6, #16] // ................................................*................................................................................................................ // aesr V.16b, v25.16b // ......................................................................................................*.......................................................... // aesr V.16b, v21.16b // ............................................*.................................................................................................................... // ldr Q, [sp, #STACK_BASE_AES_ST + 32] // .........................................*....................................................................................................................... // pmull V.1q, V.1d, v7.1d // ............................................................................................*.................................................................... // eor X, X, x21 // ..................................................*.............................................................................................................. // eor X, X, x20 // ........................................*........................................................................................................................ // aesr V.16b, v22.16b // .................................................*............................................................................................................... // ldp X, X, [x0, #-16] // ...............................................*................................................................................................................. // stp X, X, [sp, #STACK_BASE_AES_ST + 16] // ..........................................................*...................................................................................................... // ext V.16B, V.16B, V.16B, #8 // ...........................................................................................*..................................................................... // aesr v12.16b, v26.16b // .......................................................................................................*......................................................... // aesr V.16b, v23.16b // ......................................................*.......................................................................................................... // ldr Q, [x6, #48] // .....................................*........................................................................................................................... // ldr Q, [sp, #STACK_BASE_AES_ST + 16] // ................................................................*................................................................................................ // aesr v12.16b, v27.16b // ............................................................................................................*.................................................... // aesr V.16b, v24.16b // ...........................................................*..................................................................................................... // eor V.16B, V.16B, V.16B // ...............................................................................................*................................................................. // stp X, X, [sp, #STACK_BASE_AES_ST] // ....................................................................*............................................................................................ // aesr v12.16b, v28.16b // ...............................................................................................................*................................................. // eor X, X, x21 // ............................................................*.................................................................................................... // eor X, X, x20 // .......................................................*......................................................................................................... // aesr V.16b, v25.16b // .................................................................*............................................................................................... // str q17, [x2], #(4*16) // ................................................................................................................*................................................ // stp X, X, [sp, #STACK_BASE_AES_ST + 48] // ........................................................................*........................................................................................ // aese v12.16b, v15.16b // ....................................................................................................................*............................................ // ldr Q, [sp, #STACK_BASE_AES_ST] // .........................................................................*....................................................................................... // aesr V.16b, v26.16b // .....................................................................*........................................................................................... // str q16, [x2, #-16] // .............................*................................................................................................................................... // aesr V.16b, v26.16b // ..........................................................................................................*...................................................... // eor V.16B, V.16B, V.16B // ...................................................................................................*............................................................. // aesr V.16b, v27.16b // ..........................................................................*...................................................................................... // eor V.16B, V.16B, v12.16B // ........................................................................................................................*........................................ // ldr Q, [sp, #STACK_BASE_AES_ST + 48] // .............................................................................*................................................................................... // aesr V.16b, v27.16b // ..............................................................................................................*.................................................. // aesr V.16b, v28.16b // ..............................................................................*.................................................................................. // str Q, [x2, #16] // .......................................................................................................................................................*......... // rev64 V.16B, V.16B // ...........................................................................................................................*..................................... // aesr V.16b, v28.16b // .................................................................................................................*............................................... // ldr Q, [x6] // ...........................................*..................................................................................................................... // aese V.16b, v15.16b // ..................................................................................*.............................................................................. // mov D, V.d[1] // ................................................................................................................................*................................ // aesr v9.16b, v25.16b // ................................................................................*................................................................................ // ldr Q, [x6, #80] // .................................................................................*............................................................................... // aese V.16b, v15.16b // ......................................................................................................................*.......................................... // eor V.16B, V.16B, V.16B // .....................................................................................*........................................................................... // aesr v9.16b, v26.16b // ....................................................................................*............................................................................ // pmull V.1q, V.1d, V.1d // .......................................................................................................................................*......................... // eor V.16B, V.16B, V.16B // .........................................................................................................................*....................................... // aesr v9.16b, v27.16b // ........................................................................................*........................................................................ // eor V.8B, V.8B, V.8B // ...................................................................................................................................*............................. // rev64 V.16B, V.16B // ..........................................................................................*...................................................................... // pmull2 V.1q, V.2d, V.2d // ...............................................................................................................................*................................. // rev64 V.16B, V.16B // ..............................................................................................................................*.................................. // aesr v9.16b, v28.16b // ..............................................................................................*.................................................................. // pmull V.1q, V.1d, V.1d // .............................................................................................................................*................................... // mov D, V.d[1] // .............................................................................................*................................................................... // ext V.16B, V.16B, V.16B, #8 // ..................................................................................................................................*.............................. // aese v9.16b, v15.16b // ..................................................................................................*.............................................................. // pmull2 V.1q, V.2d, V.2d // .......................................................................................................................*......................................... // eor V.8B, V.8B, V.8B // .................................................................................................*............................................................... // eor V.16B, V.16B, v9.16B // .....................................................................................................*........................................................... // pmull2 V.1q, V.2d, V.2d // .................................................................................................................................*............................... // pmull V.1q, V.1d, V.1d // ..............................................................................................................................................*.................. // eor V.16B, V.16B, V.16B // ......................................................................................................................................*.......................... // pmull V.1q, V.1d, V.1d // ....................................................................................................................................*............................ // pmull V.1q, V.1d, V.1d // ..........................................................................................................................*...................................... // ext V.16B, V.16B, V.16B, #8 // ........................................................................................................*........................................................ // pmull2 V.1q, V.2d, V.2d // ..........................................................................................................................................*...................... // eor V.16B, V.16B, V.16B // .....................................................................................................................................*........................... // eor V.16B, V.16B, V.16B // ........................................................................................................................................*........................ // rev64 V.16B, V.16B // .........................................................................................................*....................................................... // eor V.16B, V.16B, V.16B // .............................................................................................................................................*................... // eor V.16B, V.16B, V.16B // .............................................................................................................*................................................... // eor V.16B, V.16B, V.16B // ..................................................................................................................................................*.............. // ext V.16B, V.16B, V.16B, #8 // ..................................................................................................................*.............................................. // pmull2 V.1q, V.2d, V.2d // ............................................................................................................................................*.................... // eor V.16B, V.16B, V.16B // .........................................................................................................................................*....................... // eor V.16B, V.16B, V.16B // .....................................................................................................................*........................................... // pmull V.1q, V.1d, V.1d // ............................................................................................................................*.................................... // eor V.16B, V.16B, V.16B // ................................................................................................................................................*................ // eor V.16B, V.16B, V.16B // ...........................................................................................................................................*..................... // ext V.16B, V.16B, V.16B, #8 // ....................................................................................................................................................*............ // pmull V.1q, V.1d, v7.1d // ...................................................................................................................................................*............. // eor V.16B, V.16B, V.16B // .................................................................................................................................................*............... // eor V.16B, V.16B, V.16B // ......................................................................................................................................................*.......... // eor V.16B, V.16B, V.16B // ........................................................................................................................................................*........ // pmull2 V.1q, V.2d, V.2d // ...............................................................................................................................................*................. // eor V.16B, V.16B, V.16B // .....................................................................................................................................................*........... // eor V.16B, V.16B, V.16B // ..........................................................................................................................................................*...... // str Q, [x2, #32] // .........................................................................................................................................................*....... // eor V.16B, V.16B, V.16B // ...........................................................................................................................................................*..... // pmull V.1q, V.1d, v7.1d // .............................................................................................................................................................*... // ext V.16B, V.16B, V.16B, #8 // ............................................................................................................................................................*.... // eor V.16B, V.16B, V.16B // ..............................................................................................................................................................*.. // str Q, [x2], #(4*16) // ...................................................................................................................*............................................. // str Q, [x2, #-16] // ...........................................................................................................*..................................................... // eor V.16B, V.16B, V.16B // ...............................................................................................................................................................*. // ext v30.16B, V.16B, V.16B, #8 // ................................................................................................................................................................* b Lloop_unrolled_start_end Lloop_unrolled_start_iter_1: ldr q12, [x6] ldr q13, [x6, #32] ldr q14, [x6, #16] ldp x22, x23, [x0, #(3*16)] add w14, w13, #3 rev w14, w14 orr x14, x12, x14, lsl #32 stp x11, x14, [sp, #(STACK_BASE_AES_ST + 3*16)] // @slothy:writes=stack_3 ldr q0, [sp, #(STACK_BASE_AES_ST + 3*16)] // @slothy:reads=stack_3 aesr v0.16b, v18.16b aesr v0.16b, v19.16b aesr v0.16b, v20.16b aesr v0.16b, v21.16b aesr v0.16b, v22.16b aesr v0.16b, v23.16b aesr v0.16b, v24.16b aesr v0.16b, v25.16b aesr v0.16b, v26.16b aesr v0.16b, v27.16b aesr v0.16b, v28.16b aese v0.16b, v15.16b eor x22, x22, x20 eor x23, x23, x21 stp x22, x23, [sp, #(STACK_BASE_AES_ST + 3*16)] // @slothy:writes=stack_3 ldr q29, [sp, #(STACK_BASE_AES_ST + 3*16)] // @slothy:reads=stack_3 eor v0.16b, v29.16b, v0.16b str q0, [x2, #(3*16)] rev64 v0.16b, v0.16b // Low product pmull v8.1q, v0.1d, v12.1d // High product pmull2 v9.1q, v0.2d, v12.2d // Middle product mov d11, v0.d[1] eor v11.8b, v11.8b, v0.8b pmull v10.1q, v11.1d, v14.1d ldp x22, x23, [x0, #(2*16)] add w14, w13, #2 rev w14, w14 orr x14, x12, x14, lsl #32 stp x11, x14, [sp, #(STACK_BASE_AES_ST + 2*16)] // @slothy:writes=stack_2 ldr q0, [sp, #(STACK_BASE_AES_ST + 2*16)] // @slothy:reads=stack_2 aesr v0.16b, v18.16b aesr v0.16b, v19.16b aesr v0.16b, v20.16b aesr v0.16b, v21.16b aesr v0.16b, v22.16b aesr v0.16b, v23.16b aesr v0.16b, v24.16b aesr v0.16b, v25.16b aesr v0.16b, v26.16b aesr v0.16b, v27.16b aesr v0.16b, v28.16b aese v0.16b, v15.16b eor x22, x22, x20 eor x23, x23, x21 stp x22, x23, [sp, #(STACK_BASE_AES_ST + 2*16)] // @slothy:writes=stack_2 ldr q29, [sp, #(STACK_BASE_AES_ST + 2*16)] // @slothy:reads=stack_2 eor v0.16b, v29.16b, v0.16b str q0, [x2, #(2*16)] rev64 v0.16b, v0.16b // Low product pmull v11.1q, v0.1d, v13.1d eor v8.16b, v8.16b, v11.16b // High product pmull2 v11.1q, v0.2d, v13.2d eor v9.16b, v9.16b, v11.16b // Middle product ext v11.16b, v0.16b, v0.16b, #8 eor v11.16b, v11.16b, v0.16b pmull2 v11.1q, v11.2d, v14.2d eor v10.16b, v10.16b, v11.16b ldr q12, [x6, #48] ldr q13, [x6, #80] ldr q14, [x6, #64] ldp x22, x23, [x0, #(1*16)] add w14, w13, #1 rev w14, w14 orr x14, x12, x14, lsl #32 stp x11, x14, [sp, #(STACK_BASE_AES_ST + 1*16)] // @slothy:writes=stack_1 ldr q0, [sp, #(STACK_BASE_AES_ST + 1*16)] // @slothy:reads=stack_1 aesr v0.16b, v18.16b aesr v0.16b, v19.16b aesr v0.16b, v20.16b aesr v0.16b, v21.16b aesr v0.16b, v22.16b aesr v0.16b, v23.16b aesr v0.16b, v24.16b aesr v0.16b, v25.16b aesr v0.16b, v26.16b aesr v0.16b, v27.16b aesr v0.16b, v28.16b aese v0.16b, v15.16b eor x22, x22, x20 eor x23, x23, x21 stp x22, x23, [sp, #(STACK_BASE_AES_ST + 1*16)] // @slothy:writes=stack_1 ldr q29, [sp, #(STACK_BASE_AES_ST + 1*16)] // @slothy:reads=stack_1 eor v0.16b, v29.16b, v0.16b str q0, [x2, #(1*16)] rev64 v0.16b, v0.16b // Low product pmull v11.1q, v0.1d, v12.1d eor v8.16b, v8.16b, v11.16b // High product pmull2 v11.1q, v0.2d, v12.2d eor v9.16b, v9.16b, v11.16b // Middle product mov d11, v0.d[1] eor v11.8b, v11.8b, v0.8b pmull v11.1q, v11.1d, v14.1d eor v10.16b, v10.16b, v11.16b ldp x22, x23, [x0], #(4*16) add w14, w13, #0 rev w14, w14 orr x14, x12, x14, lsl #32 stp x11, x14, [sp, #(STACK_BASE_AES_ST + 0*16)] // @slothy:writes=stack_0 ldr q0, [sp, #(STACK_BASE_AES_ST + 0*16)] // @slothy:reads=stack_0 aesr v0.16b, v18.16b aesr v0.16b, v19.16b aesr v0.16b, v20.16b aesr v0.16b, v21.16b aesr v0.16b, v22.16b aesr v0.16b, v23.16b aesr v0.16b, v24.16b aesr v0.16b, v25.16b aesr v0.16b, v26.16b aesr v0.16b, v27.16b aesr v0.16b, v28.16b aese v0.16b, v15.16b eor x22, x22, x20 eor x23, x23, x21 stp x22, x23, [sp, #(STACK_BASE_AES_ST + 0*16)] // @slothy:writes=stack_0 ldr q29, [sp, #(STACK_BASE_AES_ST + 0*16)] // @slothy:reads=stack_0 eor v0.16b, v29.16b, v0.16b str q0, [x2], #(4*16) rev64 v0.16b, v0.16b eor v0.16b, v0.16b, v30.16b // Low product pmull v11.1q, v0.1d, v13.1d eor v8.16b, v8.16b, v11.16b // High product pmull2 v11.1q, v0.2d, v13.2d eor v9.16b, v9.16b, v11.16b // Middle product ext v11.16b, v0.16b, v0.16b, #8 eor v11.16b, v11.16b, v0.16b pmull2 v11.1q, v11.2d, v14.2d eor v10.16b, v10.16b, v11.16b eor v0.16b, v8.16b, v9.16b pmull v1.1q, v9.1d, v7.1d ext v9.16b, v9.16b, v9.16b, #8 eor v10.16b, v10.16b, v0.16b eor v1.16b, v9.16b, v1.16b eor v10.16b, v10.16b, v1.16b pmull v9.1q, v10.1d, v7.1d eor v8.16b, v8.16b, v9.16b ext v10.16b, v10.16b, v10.16b, #8 eor v30.16b, v8.16b, v10.16b ext v30.16b, v30.16b, v30.16b, #8 add w13, w13, #UNROLL Lloop_unrolled_start_iter_1_end: Lloop_unrolled_start_end: Lloop_unrolled_end: load_htable_12 cbz remainder, Lloop_1x_end Lloop_1x_start: ldp plain_lo, plain_hi, [input], #16 aes_full_block aes_st, plain, res, 0 str res_q, [output], #16 ghash_init_with_tag_0 res, Ht1, Ht12, tag ghash_finalize tag add ctr, ctr, #1 sub remainder, remainder, #1 cbnz remainder, Lloop_1x_start Lloop_1x_end: // Return number of bytes processed mov x0, byte_len // Store new authentication tag rev64 tag.16b, tag.16b str tag_q, [tag_ptr] // Store updated counter // rev32 rtmp_ctr.16b, rtmp_ctr.16b // str rtmp_ctr_q, [ivec] rev ctr_tmp_w, ctr str ctr_tmp_w, [ivec, #12] restore_vregs restore_gprs Lenc_postamble_end: add sp, sp, #STACK_SIZE ret #endif #endif // !OPENSSL_NO_ASM && defined(__AARCH64EL__) && defined(__APPLE__) #if defined(__ELF__) // See https: // www.airs.com/blog/archives/518. .section .note.GNU-stack,"",%progbits #endif