// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/aes256otrpv3/ni_p8m1/encrypt.c
// Function: AES_encrypt
__inline__ static void AES_encrypt(
	__m128i in,
	__m128i *out,
	const __m128i *key)
{
	__m128i tmp = _mm_load_si128(&in);
	tmp = _mm_xor_si128(tmp, key[0]);
	tmp = _mm_aesenc_si128(tmp, key[1]);
	tmp = _mm_aesenc_si128(tmp, key[2]);
	tmp = _mm_aesenc_si128(tmp, key[3]);
	tmp = _mm_aesenc_si128(tmp, key[4]);
	tmp = _mm_aesenc_si128(tmp, key[5]);
	tmp = _mm_aesenc_si128(tmp, key[6]);
	tmp = _mm_aesenc_si128(tmp, key[7]);
	tmp = _mm_aesenc_si128(tmp, key[8]);
	tmp = _mm_aesenc_si128(tmp, key[9]);
#if (ROUND==10)
	*out = _mm_aesenclast_si128(tmp, key[10]);
#elif (ROUND==14)
	tmp = _mm_aesenc_si128(tmp, key[10]);
	tmp = _mm_aesenc_si128(tmp, key[11]);
	tmp = _mm_aesenc_si128(tmp, key[12]);
	tmp = _mm_aesenc_si128(tmp, key[13]);
	*out = _mm_aesenclast_si128(tmp, key[14]);
#endif
}

// Assembly:
subq $0x1a8, %rsp            # imm = 0x1A8
vmovdqa %xmm0, -0x60(%rsp)
movq %rdi, -0x68(%rsp)
movq %rsi, -0x70(%rsp)
leaq -0x60(%rsp), %rax
movq %rax, -0x48(%rsp)
movq -0x48(%rsp), %rax
vmovdqa (%rax), %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x70(%rsp), %rax
vmovdqa (%rax), %xmm0
vmovdqa %xmm1, -0x30(%rsp)
vmovdqa %xmm0, -0x40(%rsp)
vmovdqa -0x30(%rsp), %xmm0
vpxor -0x40(%rsp), %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x70(%rsp), %rax
vmovdqa 0x10(%rax), %xmm0
vmovdqa %xmm1, 0x170(%rsp)
vmovdqa %xmm0, 0x160(%rsp)
vmovdqa 0x170(%rsp), %xmm0
vmovdqa 0x160(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x70(%rsp), %rax
vmovdqa 0x20(%rax), %xmm0
vmovdqa %xmm1, 0x150(%rsp)
vmovdqa %xmm0, 0x140(%rsp)
vmovdqa 0x150(%rsp), %xmm0
vmovdqa 0x140(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x70(%rsp), %rax
vmovdqa 0x30(%rax), %xmm0
vmovdqa %xmm1, 0x130(%rsp)
vmovdqa %xmm0, 0x120(%rsp)
vmovdqa 0x130(%rsp), %xmm0
vmovdqa 0x120(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x70(%rsp), %rax
vmovdqa 0x40(%rax), %xmm0
vmovdqa %xmm1, 0x110(%rsp)
vmovdqa %xmm0, 0x100(%rsp)
vmovdqa 0x110(%rsp), %xmm0
vmovdqa 0x100(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x70(%rsp), %rax
vmovdqa 0x50(%rax), %xmm0
vmovdqa %xmm1, 0xf0(%rsp)
vmovdqa %xmm0, 0xe0(%rsp)
vmovdqa 0xf0(%rsp), %xmm0
vmovdqa 0xe0(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x70(%rsp), %rax
vmovdqa 0x60(%rax), %xmm0
vmovdqa %xmm1, 0xd0(%rsp)
vmovdqa %xmm0, 0xc0(%rsp)
vmovdqa 0xd0(%rsp), %xmm0
vmovdqa 0xc0(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x70(%rsp), %rax
vmovdqa 0x70(%rax), %xmm0
vmovdqa %xmm1, 0xb0(%rsp)
vmovdqa %xmm0, 0xa0(%rsp)
vmovdqa 0xb0(%rsp), %xmm0
vmovdqa 0xa0(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x70(%rsp), %rax
vmovdqa 0x80(%rax), %xmm0
vmovdqa %xmm1, 0x90(%rsp)
vmovdqa %xmm0, 0x80(%rsp)
vmovdqa 0x90(%rsp), %xmm0
vmovdqa 0x80(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x70(%rsp), %rax
vmovdqa 0x90(%rax), %xmm0
vmovdqa %xmm1, 0x70(%rsp)
vmovdqa %xmm0, 0x60(%rsp)
vmovdqa 0x70(%rsp), %xmm0
vmovdqa 0x60(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x70(%rsp), %rax
vmovdqa 0xa0(%rax), %xmm0
vmovdqa %xmm1, 0x50(%rsp)
vmovdqa %xmm0, 0x40(%rsp)
vmovdqa 0x50(%rsp), %xmm0
vmovdqa 0x40(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x70(%rsp), %rax
vmovdqa 0xb0(%rax), %xmm0
vmovdqa %xmm1, 0x30(%rsp)
vmovdqa %xmm0, 0x20(%rsp)
vmovdqa 0x30(%rsp), %xmm0
vmovdqa 0x20(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x70(%rsp), %rax
vmovdqa 0xc0(%rax), %xmm0
vmovdqa %xmm1, 0x10(%rsp)
vmovdqa %xmm0, (%rsp)
vmovdqa 0x10(%rsp), %xmm0
vmovdqa (%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x70(%rsp), %rax
vmovdqa 0xd0(%rax), %xmm0
vmovdqa %xmm1, -0x10(%rsp)
vmovdqa %xmm0, -0x20(%rsp)
vmovdqa -0x10(%rsp), %xmm0
vmovdqa -0x20(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x80(%rsp), %xmm1
movq -0x70(%rsp), %rax
vmovdqa 0xe0(%rax), %xmm0
vmovdqa %xmm1, 0x190(%rsp)
vmovdqa %xmm0, 0x180(%rsp)
vmovdqa 0x190(%rsp), %xmm0
vmovdqa 0x180(%rsp), %xmm1
vaesenclast %xmm1, %xmm0, %xmm0
movq -0x68(%rsp), %rax
vmovdqa %xmm0, (%rax)
addq $0x1a8, %rsp            # imm = 0x1A8
retq
nopw %cs:(%rax,%rax)