// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/aes128poetv2aes128ni/ref/poet.c
// Function: aes_encrypt
static __m128i aes_encrypt(__m128i in, __m128i* k)
{
    __m128i x = _mm_xor_si128(in, k[0]);
    x = _mm_aesenc_si128(x, k[1]);
    x = _mm_aesenc_si128(x, k[2]);
    x = _mm_aesenc_si128(x, k[3]);
    x = _mm_aesenc_si128(x, k[4]);
    x = _mm_aesenc_si128(x, k[5]);
    x = _mm_aesenc_si128(x, k[6]);
    x = _mm_aesenc_si128(x, k[7]);
    x = _mm_aesenc_si128(x, k[8]);
    x = _mm_aesenc_si128(x, k[9]);
    return _mm_aesenclast_si128(x, k[10]);
}

// Assembly:
subq $0x118, %rsp            # imm = 0x118
vmovdqa %xmm0, -0x60(%rsp)
movq %rdi, -0x68(%rsp)
vmovdqa -0x60(%rsp), %xmm1
movq -0x68(%rsp), %rax
vmovdqa (%rax), %xmm0
vmovdqa %xmm1, -0x40(%rsp)
vmovdqa %xmm0, -0x50(%rsp)
vmovdqa -0x40(%rsp), %xmm0
vpxor -0x50(%rsp), %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x68(%rsp), %rax
vmovdqa 0x10(%rax), %xmm0
vmovdqa %xmm1, 0xe0(%rsp)
vmovdqa %xmm0, 0xd0(%rsp)
vmovdqa 0xe0(%rsp), %xmm0
vmovdqa 0xd0(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x68(%rsp), %rax
vmovdqa 0x20(%rax), %xmm0
vmovdqa %xmm1, 0xc0(%rsp)
vmovdqa %xmm0, 0xb0(%rsp)
vmovdqa 0xc0(%rsp), %xmm0
vmovdqa 0xb0(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x68(%rsp), %rax
vmovdqa 0x30(%rax), %xmm0
vmovdqa %xmm1, 0xa0(%rsp)
vmovdqa %xmm0, 0x90(%rsp)
vmovdqa 0xa0(%rsp), %xmm0
vmovdqa 0x90(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x68(%rsp), %rax
vmovdqa 0x40(%rax), %xmm0
vmovdqa %xmm1, 0x80(%rsp)
vmovdqa %xmm0, 0x70(%rsp)
vmovdqa 0x80(%rsp), %xmm0
vmovdqa 0x70(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x68(%rsp), %rax
vmovdqa 0x50(%rax), %xmm0
vmovdqa %xmm1, 0x60(%rsp)
vmovdqa %xmm0, 0x50(%rsp)
vmovdqa 0x60(%rsp), %xmm0
vmovdqa 0x50(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x68(%rsp), %rax
vmovdqa 0x60(%rax), %xmm0
vmovdqa %xmm1, 0x40(%rsp)
vmovdqa %xmm0, 0x30(%rsp)
vmovdqa 0x40(%rsp), %xmm0
vmovdqa 0x30(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x68(%rsp), %rax
vmovdqa 0x70(%rax), %xmm0
vmovdqa %xmm1, 0x20(%rsp)
vmovdqa %xmm0, 0x10(%rsp)
vmovdqa 0x20(%rsp), %xmm0
vmovdqa 0x10(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x68(%rsp), %rax
vmovdqa 0x80(%rax), %xmm0
vmovdqa %xmm1, (%rsp)
vmovdqa %xmm0, -0x10(%rsp)
vmovdqa (%rsp), %xmm0
vmovdqa -0x10(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x68(%rsp), %rax
vmovdqa 0x90(%rax), %xmm0
vmovdqa %xmm1, -0x20(%rsp)
vmovdqa %xmm0, -0x30(%rsp)
vmovdqa -0x20(%rsp), %xmm0
vmovdqa -0x30(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x68(%rsp), %rax
vmovdqa 0xa0(%rax), %xmm0
vmovdqa %xmm1, 0x100(%rsp)
vmovdqa %xmm0, 0xf0(%rsp)
vmovdqa 0x100(%rsp), %xmm0
vmovdqa 0xf0(%rsp), %xmm1
vaesenclast %xmm1, %xmm0, %xmm0
addq $0x118, %rsp            # imm = 0x118
retq
nopl (%rax)