// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/paeq128/aesni/encrypt.cpp
// Function: AES_Round(unsigned char*)
void AES_Round(unsigned char* state)  //SubBytes-ShiftRows-MixColumns
{
	unsigned char tmp[4][4];

	for (unsigned i = 0; i<4; ++i)
	{
		for (unsigned j = 0; j<4; ++j)
			tmp[j][i] = state[4 * i + j];//AES state conversion
	}
	for (unsigned i = 0; i<4; ++i)//Columnwise loop
	{
		state[4 * i] = mul[sbox[tmp[0][i]]][2] ^ mul[sbox[tmp[3][(i + 3) % 4]]][1] ^
			mul[sbox[tmp[2][(i + 2) % 4]]][1] ^ mul[sbox[tmp[1][(i + 1) % 4]]][3];
		state[4 * i + 1] = mul[sbox[tmp[1][(i + 1) % 4]]][2] ^ mul[sbox[tmp[0][i]]][1] ^
			mul[sbox[tmp[3][(i + 3) % 4]]][1] ^ mul[sbox[tmp[2][(i + 2) % 4]]][3];
		state[4 * i + 2] = mul[sbox[tmp[2][(i + 2) % 4]]][2] ^ mul[sbox[tmp[1][(i + 1) % 4]]][1] ^
			mul[sbox[tmp[0][i]]][1] ^ mul[sbox[tmp[3][(i + 3) % 4]]][3];
		state[4 * i + 3] = mul[sbox[tmp[3][(i + 3) % 4]]][2] ^ mul[sbox[tmp[2][(i + 2) % 4]]][1] ^
			mul[sbox[tmp[1][(i + 1) % 4]]][1] ^ mul[sbox[tmp[0][i]]][3];
	}

}

// Assembly:
movq %rdi, -0x8(%rsp)
movl $0x0, -0x1c(%rsp)
cmpl $0x4, -0x1c(%rsp)
jae 0x122d
movl $0x0, -0x20(%rsp)
cmpl $0x4, -0x20(%rsp)
jae 0x121e
movq -0x8(%rsp), %rax
movl -0x1c(%rsp), %ecx
shll $0x2, %ecx
addl -0x20(%rsp), %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %dl
movl -0x20(%rsp), %eax
movl %eax, %ecx
leaq -0x18(%rsp), %rax
shlq $0x2, %rcx
addq %rcx, %rax
movl -0x1c(%rsp), %ecx
movb %dl, (%rax,%rcx)
movl -0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rsp)
jmp 0x11dc
jmp 0x1220
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x11cd
movl $0x0, -0x24(%rsp)
cmpl $0x4, -0x24(%rsp)
jae 0x15bd
movl -0x24(%rsp), %eax
movzbl -0x18(%rsp,%rax), %eax
movl %eax, %ecx
leaq 0x6dae(%rip), %rax      # 0x8000
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
movq 0x8d99(%rip), %rax      # 0x9ff8
shlq $0x8, %rcx
addq %rcx, %rax
movzbl 0x2(%rax), %eax
movl -0x24(%rsp), %ecx
addl $0x3, %ecx
andl $0x3, %ecx
movl %ecx, %ecx
movzbl -0xc(%rsp,%rcx), %ecx
movl %ecx, %edx
leaq 0x6d7c(%rip), %rcx      # 0x8000
movzbl (%rcx,%rdx), %ecx
movl %ecx, %edx
movq 0x8d67(%rip), %rcx      # 0x9ff8
shlq $0x8, %rdx
addq %rdx, %rcx
movzbl 0x1(%rcx), %ecx
xorl %ecx, %eax
movl -0x24(%rsp), %ecx
addl $0x2, %ecx
andl $0x3, %ecx
movl %ecx, %ecx
movzbl -0x10(%rsp,%rcx), %ecx
movl %ecx, %edx
leaq 0x6d48(%rip), %rcx      # 0x8000
movzbl (%rcx,%rdx), %ecx
movl %ecx, %edx
movq 0x8d33(%rip), %rcx      # 0x9ff8
shlq $0x8, %rdx
addq %rdx, %rcx
movzbl 0x1(%rcx), %ecx
xorl %ecx, %eax
movl -0x24(%rsp), %ecx
addl $0x1, %ecx
andl $0x3, %ecx
movl %ecx, %ecx
movzbl -0x14(%rsp,%rcx), %ecx
movl %ecx, %edx
leaq 0x6d14(%rip), %rcx      # 0x8000
movzbl (%rcx,%rdx), %ecx
movl %ecx, %edx
movq 0x8cff(%rip), %rcx      # 0x9ff8
shlq $0x8, %rdx
addq %rdx, %rcx
movzbl 0x3(%rcx), %ecx
xorl %ecx, %eax
movb %al, %dl
movq -0x8(%rsp), %rax
movl -0x24(%rsp), %ecx
shll $0x2, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl -0x24(%rsp), %eax
addl $0x1, %eax
andl $0x3, %eax
movl %eax, %eax
movzbl -0x14(%rsp,%rax), %eax
movl %eax, %ecx
leaq 0x6ccd(%rip), %rax      # 0x8000
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
movq 0x8cb8(%rip), %rax      # 0x9ff8
shlq $0x8, %rcx
addq %rcx, %rax
movzbl 0x2(%rax), %eax
movl -0x24(%rsp), %ecx
movzbl -0x18(%rsp,%rcx), %ecx
movl %ecx, %edx
leaq 0x6ca3(%rip), %rcx      # 0x8000
movzbl (%rcx,%rdx), %ecx
movl %ecx, %edx
movq 0x8c8e(%rip), %rcx      # 0x9ff8
shlq $0x8, %rdx
addq %rdx, %rcx
movzbl 0x1(%rcx), %ecx
xorl %ecx, %eax
movl -0x24(%rsp), %ecx
addl $0x3, %ecx
andl $0x3, %ecx
movl %ecx, %ecx
movzbl -0xc(%rsp,%rcx), %ecx
movl %ecx, %edx
leaq 0x6c6f(%rip), %rcx      # 0x8000
movzbl (%rcx,%rdx), %ecx
movl %ecx, %edx
movq 0x8c5a(%rip), %rcx      # 0x9ff8
shlq $0x8, %rdx
addq %rdx, %rcx
movzbl 0x1(%rcx), %ecx
xorl %ecx, %eax
movl -0x24(%rsp), %ecx
addl $0x2, %ecx
andl $0x3, %ecx
movl %ecx, %ecx
movzbl -0x10(%rsp,%rcx), %ecx
movl %ecx, %edx
leaq 0x6c3b(%rip), %rcx      # 0x8000
movzbl (%rcx,%rdx), %ecx
movl %ecx, %edx
movq 0x8c26(%rip), %rcx      # 0x9ff8
shlq $0x8, %rdx
addq %rdx, %rcx
movzbl 0x3(%rcx), %ecx
xorl %ecx, %eax
movb %al, %dl
movq -0x8(%rsp), %rax
movl -0x24(%rsp), %ecx
shll $0x2, %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl -0x24(%rsp), %eax
addl $0x2, %eax
andl $0x3, %eax
movl %eax, %eax
movzbl -0x10(%rsp,%rax), %eax
movl %eax, %ecx
leaq 0x6bf1(%rip), %rax      # 0x8000
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
movq 0x8bdc(%rip), %rax      # 0x9ff8
shlq $0x8, %rcx
addq %rcx, %rax
movzbl 0x2(%rax), %eax
movl -0x24(%rsp), %ecx
addl $0x1, %ecx
andl $0x3, %ecx
movl %ecx, %ecx
movzbl -0x14(%rsp,%rcx), %ecx
movl %ecx, %edx
leaq 0x6bbf(%rip), %rcx      # 0x8000
movzbl (%rcx,%rdx), %ecx
movl %ecx, %edx
movq 0x8baa(%rip), %rcx      # 0x9ff8
shlq $0x8, %rdx
addq %rdx, %rcx
movzbl 0x1(%rcx), %ecx
xorl %ecx, %eax
movl -0x24(%rsp), %ecx
movzbl -0x18(%rsp,%rcx), %ecx
movl %ecx, %edx
leaq 0x6b93(%rip), %rcx      # 0x8000
movzbl (%rcx,%rdx), %ecx
movl %ecx, %edx
movq 0x8b7e(%rip), %rcx      # 0x9ff8
shlq $0x8, %rdx
addq %rdx, %rcx
movzbl 0x1(%rcx), %ecx
xorl %ecx, %eax
movl -0x24(%rsp), %ecx
addl $0x3, %ecx
andl $0x3, %ecx
movl %ecx, %ecx
movzbl -0xc(%rsp,%rcx), %ecx
movl %ecx, %edx
leaq 0x6b5f(%rip), %rcx      # 0x8000
movzbl (%rcx,%rdx), %ecx
movl %ecx, %edx
movq 0x8b4a(%rip), %rcx      # 0x9ff8
shlq $0x8, %rdx
addq %rdx, %rcx
movzbl 0x3(%rcx), %ecx
xorl %ecx, %eax
movb %al, %dl
movq -0x8(%rsp), %rax
movl -0x24(%rsp), %ecx
shll $0x2, %ecx
addl $0x2, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl -0x24(%rsp), %eax
addl $0x3, %eax
andl $0x3, %eax
movl %eax, %eax
movzbl -0xc(%rsp,%rax), %eax
movl %eax, %ecx
leaq 0x6b15(%rip), %rax      # 0x8000
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
movq 0x8b00(%rip), %rax      # 0x9ff8
shlq $0x8, %rcx
addq %rcx, %rax
movzbl 0x2(%rax), %eax
movl -0x24(%rsp), %ecx
addl $0x2, %ecx
andl $0x3, %ecx
movl %ecx, %ecx
movzbl -0x10(%rsp,%rcx), %ecx
movl %ecx, %edx
leaq 0x6ae3(%rip), %rcx      # 0x8000
movzbl (%rcx,%rdx), %ecx
movl %ecx, %edx
movq 0x8ace(%rip), %rcx      # 0x9ff8
shlq $0x8, %rdx
addq %rdx, %rcx
movzbl 0x1(%rcx), %ecx
xorl %ecx, %eax
movl -0x24(%rsp), %ecx
addl $0x1, %ecx
andl $0x3, %ecx
movl %ecx, %ecx
movzbl -0x14(%rsp,%rcx), %ecx
movl %ecx, %edx
leaq 0x6aaf(%rip), %rcx      # 0x8000
movzbl (%rcx,%rdx), %ecx
movl %ecx, %edx
movq 0x8a9a(%rip), %rcx      # 0x9ff8
shlq $0x8, %rdx
addq %rdx, %rcx
movzbl 0x1(%rcx), %ecx
xorl %ecx, %eax
movl -0x24(%rsp), %ecx
movzbl -0x18(%rsp,%rcx), %ecx
movl %ecx, %edx
leaq 0x6a83(%rip), %rcx      # 0x8000
movzbl (%rcx,%rdx), %ecx
movl %ecx, %edx
movq 0x8a6e(%rip), %rcx      # 0x9ff8
shlq $0x8, %rdx
addq %rdx, %rcx
movzbl 0x3(%rcx), %ecx
xorl %ecx, %eax
movb %al, %dl
movq -0x8(%rsp), %rax
movl -0x24(%rsp), %ecx
shll $0x2, %ecx
addl $0x3, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl -0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rsp)
jmp 0x1235
retq
nop