// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/shellaes128v1d5n64/ref/aes.c
// Function: aesKeySetupEnc
void aesKeySetupEnc(u32 rk[], const u8 key[]) {
   	int i = 0;
	u32 temp;

	rk[0] = GETU32(key     );
	rk[1] = GETU32(key +  4);
	rk[2] = GETU32(key +  8);
	rk[3] = GETU32(key + 12);

    for (i=0; i<10; ++i) {
		temp  = rk[3];
		rk[4] = rk[0] ^
			(Te4[(temp >> 16) & 0xff] & 0xff000000) ^
			(Te4[(temp >>  8) & 0xff] & 0x00ff0000) ^
			(Te4[(temp      ) & 0xff] & 0x0000ff00) ^
			(Te4[(temp >> 24)       ] & 0x000000ff) ^
			rcon[i];
		rk[5] = rk[1] ^ rk[4];
		rk[6] = rk[2] ^ rk[5];
		rk[7] = rk[3] ^ rk[6];

		rk += 4;
	}
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movl $0x0, -0x14(%rsp)
movq -0x10(%rsp), %rax
movzbl (%rax), %ecx
shll $0x18, %ecx
movq -0x10(%rsp), %rax
movzbl 0x1(%rax), %eax
shll $0x10, %eax
xorl %eax, %ecx
movq -0x10(%rsp), %rax
movzbl 0x2(%rax), %eax
shll $0x8, %eax
xorl %eax, %ecx
movq -0x10(%rsp), %rax
movzbl 0x3(%rax), %eax
xorl %eax, %ecx
movq -0x8(%rsp), %rax
movl %ecx, (%rax)
movq -0x10(%rsp), %rax
movzbl 0x4(%rax), %ecx
shll $0x18, %ecx
movq -0x10(%rsp), %rax
movzbl 0x5(%rax), %eax
shll $0x10, %eax
xorl %eax, %ecx
movq -0x10(%rsp), %rax
movzbl 0x6(%rax), %eax
shll $0x8, %eax
xorl %eax, %ecx
movq -0x10(%rsp), %rax
movzbl 0x7(%rax), %eax
xorl %eax, %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rsp), %rax
movzbl 0x8(%rax), %ecx
shll $0x18, %ecx
movq -0x10(%rsp), %rax
movzbl 0x9(%rax), %eax
shll $0x10, %eax
xorl %eax, %ecx
movq -0x10(%rsp), %rax
movzbl 0xa(%rax), %eax
shll $0x8, %eax
xorl %eax, %ecx
movq -0x10(%rsp), %rax
movzbl 0xb(%rax), %eax
xorl %eax, %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rsp), %rax
movzbl 0xc(%rax), %ecx
shll $0x18, %ecx
movq -0x10(%rsp), %rax
movzbl 0xd(%rax), %eax
shll $0x10, %eax
xorl %eax, %ecx
movq -0x10(%rsp), %rax
movzbl 0xe(%rax), %eax
shll $0x8, %eax
xorl %eax, %ecx
movq -0x10(%rsp), %rax
movzbl 0xf(%rax), %eax
xorl %eax, %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0xc(%rax)
movl $0x0, -0x14(%rsp)
cmpl $0xa, -0x14(%rsp)
jge 0x258b
movq -0x8(%rsp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x18(%rsp)
movq -0x8(%rsp), %rax
movl (%rax), %ecx
movl -0x18(%rsp), %eax
shrl $0x10, %eax
andl $0xff, %eax
movl %eax, %eax
movl %eax, %edx
leaq 0x6b57(%rip), %rax      # 0x9000
movl (%rax,%rdx,4), %eax
andl $0xff000000, %eax       # imm = 0xFF000000
xorl %eax, %ecx
movl -0x18(%rsp), %eax
shrl $0x8, %eax
andl $0xff, %eax
movl %eax, %eax
movl %eax, %edx
leaq 0x6b36(%rip), %rax      # 0x9000
movl (%rax,%rdx,4), %eax
andl $0xff0000, %eax         # imm = 0xFF0000
xorl %eax, %ecx
movl -0x18(%rsp), %eax
andl $0xff, %eax
movl %eax, %eax
movl %eax, %edx
leaq 0x6b18(%rip), %rax      # 0x9000
movl (%rax,%rdx,4), %eax
andl $0xff00, %eax           # imm = 0xFF00
xorl %eax, %ecx
movl -0x18(%rsp), %eax
shrl $0x18, %eax
movl %eax, %eax
movl %eax, %edx
leaq 0x6afc(%rip), %rax      # 0x9000
movl (%rax,%rdx,4), %eax
andl $0xff, %eax
xorl %eax, %ecx
movslq -0x14(%rsp), %rdx
leaq 0x6ee6(%rip), %rax      # 0x9400
xorl (%rax,%rdx,4), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rsp), %rax
movl 0x4(%rax), %ecx
movq -0x8(%rsp), %rax
xorl 0x10(%rax), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x14(%rax)
movq -0x8(%rsp), %rax
movl 0x8(%rax), %ecx
movq -0x8(%rsp), %rax
xorl 0x14(%rax), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x18(%rax)
movq -0x8(%rsp), %rax
movl 0xc(%rax), %ecx
movq -0x8(%rsp), %rax
xorl 0x18(%rax), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x1c(%rax)
movq -0x8(%rsp), %rax
addq $0x10, %rax
movq %rax, -0x8(%rsp)
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x2474
retq
nopl (%rax)