// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]libcperciva/liball/../crypto/crypto_aes_aesni.c
// Function: crypto_aes_encrypt_block_aesni_m128i
__m128i
crypto_aes_encrypt_block_aesni_m128i(__m128i in, const void * key)
{
	const struct crypto_aes_key_aesni * _key = key;
	const __m128i * aes_key = _key->rkeys;
	__m128i aes_state = in;
	size_t nr = _key->nr;

	aes_state = _mm_xor_si128(aes_state, aes_key[0]);
	aes_state = _mm_aesenc_si128(aes_state, aes_key[1]);
	aes_state = _mm_aesenc_si128(aes_state, aes_key[2]);
	aes_state = _mm_aesenc_si128(aes_state, aes_key[3]);
	aes_state = _mm_aesenc_si128(aes_state, aes_key[4]);
	aes_state = _mm_aesenc_si128(aes_state, aes_key[5]);
	aes_state = _mm_aesenc_si128(aes_state, aes_key[6]);
	aes_state = _mm_aesenc_si128(aes_state, aes_key[7]);
	aes_state = _mm_aesenc_si128(aes_state, aes_key[8]);
	aes_state = _mm_aesenc_si128(aes_state, aes_key[9]);
	if (nr > 10) {
		aes_state = _mm_aesenc_si128(aes_state, aes_key[10]);
		aes_state = _mm_aesenc_si128(aes_state, aes_key[11]);
		aes_state = _mm_aesenc_si128(aes_state, aes_key[12]);
		aes_state = _mm_aesenc_si128(aes_state, aes_key[13]);
	}

	aes_state = _mm_aesenclast_si128(aes_state, aes_key[nr]);
	return (aes_state);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movdqa %xmm0, -0x1f0(%rbp)
movq %rdi, -0x1f8(%rbp)
movq -0x1f8(%rbp), %rax
movq %rax, -0x200(%rbp)
movq -0x200(%rbp), %rax
movq 0x100(%rax), %rax
movq %rax, -0x208(%rbp)
movdqa -0x1f0(%rbp), %xmm0
movdqa %xmm0, -0x220(%rbp)
movq -0x200(%rbp), %rax
movq 0x108(%rax), %rax
movq %rax, -0x228(%rbp)
movdqa -0x220(%rbp), %xmm1
movq -0x208(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm1, -0x1d0(%rbp)
movdqa %xmm0, -0x1e0(%rbp)
movdqa -0x1d0(%rbp), %xmm0
pxor -0x1e0(%rbp), %xmm0
movdqa %xmm0, -0x220(%rbp)
movdqa -0x220(%rbp), %xmm1
movq -0x208(%rbp), %rax
movdqa 0x10(%rax), %xmm0
movdqa %xmm1, -0x30(%rbp)
movdqa %xmm0, -0x40(%rbp)
movdqa -0x30(%rbp), %xmm0
movdqa -0x40(%rbp), %xmm1
aesenc %xmm1, %xmm0
movdqa %xmm0, -0x220(%rbp)
movdqa -0x220(%rbp), %xmm1
movq -0x208(%rbp), %rax
movdqa 0x20(%rax), %xmm0
movdqa %xmm1, -0x50(%rbp)
movdqa %xmm0, -0x60(%rbp)
movdqa -0x50(%rbp), %xmm0
movdqa -0x60(%rbp), %xmm1
aesenc %xmm1, %xmm0
movdqa %xmm0, -0x220(%rbp)
movdqa -0x220(%rbp), %xmm1
movq -0x208(%rbp), %rax
movdqa 0x30(%rax), %xmm0
movdqa %xmm1, -0x70(%rbp)
movdqa %xmm0, -0x80(%rbp)
movdqa -0x70(%rbp), %xmm0
movdqa -0x80(%rbp), %xmm1
aesenc %xmm1, %xmm0
movdqa %xmm0, -0x220(%rbp)
movdqa -0x220(%rbp), %xmm1
movq -0x208(%rbp), %rax
movdqa 0x40(%rax), %xmm0
movdqa %xmm1, -0x90(%rbp)
movdqa %xmm0, -0xa0(%rbp)
movdqa -0x90(%rbp), %xmm0
movdqa -0xa0(%rbp), %xmm1
aesenc %xmm1, %xmm0
movdqa %xmm0, -0x220(%rbp)
movdqa -0x220(%rbp), %xmm1
movq -0x208(%rbp), %rax
movdqa 0x50(%rax), %xmm0
movdqa %xmm1, -0xb0(%rbp)
movdqa %xmm0, -0xc0(%rbp)
movdqa -0xb0(%rbp), %xmm0
movdqa -0xc0(%rbp), %xmm1
aesenc %xmm1, %xmm0
movdqa %xmm0, -0x220(%rbp)
movdqa -0x220(%rbp), %xmm1
movq -0x208(%rbp), %rax
movdqa 0x60(%rax), %xmm0
movdqa %xmm1, -0xd0(%rbp)
movdqa %xmm0, -0xe0(%rbp)
movdqa -0xd0(%rbp), %xmm0
movdqa -0xe0(%rbp), %xmm1
aesenc %xmm1, %xmm0
movdqa %xmm0, -0x220(%rbp)
movdqa -0x220(%rbp), %xmm1
movq -0x208(%rbp), %rax
movdqa 0x70(%rax), %xmm0
movdqa %xmm1, -0xf0(%rbp)
movdqa %xmm0, -0x100(%rbp)
movdqa -0xf0(%rbp), %xmm0
movdqa -0x100(%rbp), %xmm1
aesenc %xmm1, %xmm0
movdqa %xmm0, -0x220(%rbp)
movdqa -0x220(%rbp), %xmm1
movq -0x208(%rbp), %rax
movdqa 0x80(%rax), %xmm0
movdqa %xmm1, -0x110(%rbp)
movdqa %xmm0, -0x120(%rbp)
movdqa -0x110(%rbp), %xmm0
movdqa -0x120(%rbp), %xmm1
aesenc %xmm1, %xmm0
movdqa %xmm0, -0x220(%rbp)
movdqa -0x220(%rbp), %xmm1
movq -0x208(%rbp), %rax
movdqa 0x90(%rax), %xmm0
movdqa %xmm1, -0x130(%rbp)
movdqa %xmm0, -0x140(%rbp)
movdqa -0x130(%rbp), %xmm0
movdqa -0x140(%rbp), %xmm1
aesenc %xmm1, %xmm0
movdqa %xmm0, -0x220(%rbp)
cmpq $0xa, -0x228(%rbp)
jbe 0x55b6
movdqa -0x220(%rbp), %xmm1
movq -0x208(%rbp), %rax
movdqa 0xa0(%rax), %xmm0
movdqa %xmm1, -0x150(%rbp)
movdqa %xmm0, -0x160(%rbp)
movdqa -0x150(%rbp), %xmm0
movdqa -0x160(%rbp), %xmm1
aesenc %xmm1, %xmm0
movdqa %xmm0, -0x220(%rbp)
movdqa -0x220(%rbp), %xmm1
movq -0x208(%rbp), %rax
movdqa 0xb0(%rax), %xmm0
movdqa %xmm1, -0x170(%rbp)
movdqa %xmm0, -0x180(%rbp)
movdqa -0x170(%rbp), %xmm0
movdqa -0x180(%rbp), %xmm1
aesenc %xmm1, %xmm0
movdqa %xmm0, -0x220(%rbp)
movdqa -0x220(%rbp), %xmm1
movq -0x208(%rbp), %rax
movdqa 0xc0(%rax), %xmm0
movdqa %xmm1, -0x190(%rbp)
movdqa %xmm0, -0x1a0(%rbp)
movdqa -0x190(%rbp), %xmm0
movdqa -0x1a0(%rbp), %xmm1
aesenc %xmm1, %xmm0
movdqa %xmm0, -0x220(%rbp)
movdqa -0x220(%rbp), %xmm1
movq -0x208(%rbp), %rax
movdqa 0xd0(%rax), %xmm0
movdqa %xmm1, -0x1b0(%rbp)
movdqa %xmm0, -0x1c0(%rbp)
movdqa -0x1b0(%rbp), %xmm0
movdqa -0x1c0(%rbp), %xmm1
aesenc %xmm1, %xmm0
movdqa %xmm0, -0x220(%rbp)
movdqa -0x220(%rbp), %xmm1
movq -0x208(%rbp), %rax
movq -0x228(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa (%rax), %xmm0
movdqa %xmm1, -0x10(%rbp)
movdqa %xmm0, -0x20(%rbp)
movdqa -0x10(%rbp), %xmm0
movdqa -0x20(%rbp), %xmm1
aesenclast %xmm1, %xmm0
movdqa %xmm0, -0x220(%rbp)
movdqa -0x220(%rbp), %xmm0
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
nopl (%rax)