// File: DiplIngFrankGerlach[P]MST/./aes/aes.c
// Function: SubBytes
void SubBytes(BYTE state[][4])
{
	state[0][0] = aes_sbox[state[0][0] >> 4][state[0][0] & 0x0F];
	state[0][1] = aes_sbox[state[0][1] >> 4][state[0][1] & 0x0F];
	state[0][2] = aes_sbox[state[0][2] >> 4][state[0][2] & 0x0F];
	state[0][3] = aes_sbox[state[0][3] >> 4][state[0][3] & 0x0F];
	state[1][0] = aes_sbox[state[1][0] >> 4][state[1][0] & 0x0F];
	state[1][1] = aes_sbox[state[1][1] >> 4][state[1][1] & 0x0F];
	state[1][2] = aes_sbox[state[1][2] >> 4][state[1][2] & 0x0F];
	state[1][3] = aes_sbox[state[1][3] >> 4][state[1][3] & 0x0F];
	state[2][0] = aes_sbox[state[2][0] >> 4][state[2][0] & 0x0F];
	state[2][1] = aes_sbox[state[2][1] >> 4][state[2][1] & 0x0F];
	state[2][2] = aes_sbox[state[2][2] >> 4][state[2][2] & 0x0F];
	state[2][3] = aes_sbox[state[2][3] >> 4][state[2][3] & 0x0F];
	state[3][0] = aes_sbox[state[3][0] >> 4][state[3][0] & 0x0F];
	state[3][1] = aes_sbox[state[3][1] >> 4][state[3][1] & 0x0F];
	state[3][2] = aes_sbox[state[3][2] >> 4][state[3][2] & 0x0F];
	state[3][3] = aes_sbox[state[3][3] >> 4][state[3][3] & 0x0F];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
sarl $0x4, %eax
movslq %eax, %rcx
leaq 0x4204(%rip), %rax      # 0x8010
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
sarl $0x4, %eax
movslq %eax, %rcx
leaq 0x41d2(%rip), %rax      # 0x8010
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rax
movzbl 0x2(%rax), %eax
sarl $0x4, %eax
movslq %eax, %rcx
leaq 0x419e(%rip), %rax      # 0x8010
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
sarl $0x4, %eax
movslq %eax, %rcx
leaq 0x416a(%rip), %rax      # 0x8010
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x8(%rbp), %rax
movzbl 0x4(%rax), %eax
sarl $0x4, %eax
movslq %eax, %rcx
leaq 0x4136(%rip), %rax      # 0x8010
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x4(%rcx), %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x8(%rbp), %rax
movzbl 0x5(%rax), %eax
sarl $0x4, %eax
movslq %eax, %rcx
leaq 0x4102(%rip), %rax      # 0x8010
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x5(%rcx), %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x8(%rbp), %rax
movzbl 0x6(%rax), %eax
sarl $0x4, %eax
movslq %eax, %rcx
leaq 0x40ce(%rip), %rax      # 0x8010
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x6(%rcx), %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x6(%rax)
movq -0x8(%rbp), %rax
movzbl 0x7(%rax), %eax
sarl $0x4, %eax
movslq %eax, %rcx
leaq 0x409a(%rip), %rax      # 0x8010
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x7(%rcx), %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x7(%rax)
movq -0x8(%rbp), %rax
movzbl 0x8(%rax), %eax
sarl $0x4, %eax
movslq %eax, %rcx
leaq 0x4066(%rip), %rax      # 0x8010
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x8(%rcx), %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x8(%rbp), %rax
movzbl 0x9(%rax), %eax
sarl $0x4, %eax
movslq %eax, %rcx
leaq 0x4032(%rip), %rax      # 0x8010
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x9(%rcx), %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x9(%rax)
movq -0x8(%rbp), %rax
movzbl 0xa(%rax), %eax
sarl $0x4, %eax
movslq %eax, %rcx
leaq 0x3ffe(%rip), %rax      # 0x8010
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0xa(%rcx), %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0xa(%rax)
movq -0x8(%rbp), %rax
movzbl 0xb(%rax), %eax
sarl $0x4, %eax
movslq %eax, %rcx
leaq 0x3fca(%rip), %rax      # 0x8010
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0xb(%rcx), %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0xb(%rax)
movq -0x8(%rbp), %rax
movzbl 0xc(%rax), %eax
sarl $0x4, %eax
movslq %eax, %rcx
leaq 0x3f96(%rip), %rax      # 0x8010
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0xc(%rcx), %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0xc(%rax)
movq -0x8(%rbp), %rax
movzbl 0xd(%rax), %eax
sarl $0x4, %eax
movslq %eax, %rcx
leaq 0x3f62(%rip), %rax      # 0x8010
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0xd(%rcx), %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0xd(%rax)
movq -0x8(%rbp), %rax
movzbl 0xe(%rax), %eax
sarl $0x4, %eax
movslq %eax, %rcx
leaq 0x3f2e(%rip), %rax      # 0x8010
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0xe(%rcx), %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0xe(%rax)
movq -0x8(%rbp), %rax
movzbl 0xf(%rax), %eax
sarl $0x4, %eax
movslq %eax, %rcx
leaq 0x3efa(%rip), %rax      # 0x8010
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0xf(%rcx), %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0xf(%rax)
popq %rbp
retq
nopw (%rax,%rax)