// File: /workspace/github_cpp_makefile_star2_O2/DiplIngFrankGerlach[P]MST/./aes/aes.c
// Function: MixColumns
void MixColumns(BYTE state[][4])
{
	BYTE col[4];

	// Column 1
	col[0] = state[0][0];
	col[1] = state[1][0];
	col[2] = state[2][0];
	col[3] = state[3][0];
	state[0][0] = gf_mul[col[0]][0];
	state[0][0] ^= gf_mul[col[1]][1];
	state[0][0] ^= col[2];
	state[0][0] ^= col[3];
	state[1][0] = col[0];
	state[1][0] ^= gf_mul[col[1]][0];
	state[1][0] ^= gf_mul[col[2]][1];
	state[1][0] ^= col[3];
	state[2][0] = col[0];
	state[2][0] ^= col[1];
	state[2][0] ^= gf_mul[col[2]][0];
	state[2][0] ^= gf_mul[col[3]][1];
	state[3][0] = gf_mul[col[0]][1];
	state[3][0] ^= col[1];
	state[3][0] ^= col[2];
	state[3][0] ^= gf_mul[col[3]][0];
	// Column 2
	col[0] = state[0][1];
	col[1] = state[1][1];
	col[2] = state[2][1];
	col[3] = state[3][1];
	state[0][1] = gf_mul[col[0]][0];
	state[0][1] ^= gf_mul[col[1]][1];
	state[0][1] ^= col[2];
	state[0][1] ^= col[3];
	state[1][1] = col[0];
	state[1][1] ^= gf_mul[col[1]][0];
	state[1][1] ^= gf_mul[col[2]][1];
	state[1][1] ^= col[3];
	state[2][1] = col[0];
	state[2][1] ^= col[1];
	state[2][1] ^= gf_mul[col[2]][0];
	state[2][1] ^= gf_mul[col[3]][1];
	state[3][1] = gf_mul[col[0]][1];
	state[3][1] ^= col[1];
	state[3][1] ^= col[2];
	state[3][1] ^= gf_mul[col[3]][0];
	// Column 3
	col[0] = state[0][2];
	col[1] = state[1][2];
	col[2] = state[2][2];
	col[3] = state[3][2];
	state[0][2] = gf_mul[col[0]][0];
	state[0][2] ^= gf_mul[col[1]][1];
	state[0][2] ^= col[2];
	state[0][2] ^= col[3];
	state[1][2] = col[0];
	state[1][2] ^= gf_mul[col[1]][0];
	state[1][2] ^= gf_mul[col[2]][1];
	state[1][2] ^= col[3];
	state[2][2] = col[0];
	state[2][2] ^= col[1];
	state[2][2] ^= gf_mul[col[2]][0];
	state[2][2] ^= gf_mul[col[3]][1];
	state[3][2] = gf_mul[col[0]][1];
	state[3][2] ^= col[1];
	state[3][2] ^= col[2];
	state[3][2] ^= gf_mul[col[3]][0];
	// Column 4
	col[0] = state[0][3];
	col[1] = state[1][3];
	col[2] = state[2][3];
	col[3] = state[3][3];
	state[0][3] = gf_mul[col[0]][0];
	state[0][3] ^= gf_mul[col[1]][1];
	state[0][3] ^= col[2];
	state[0][3] ^= col[3];
	state[1][3] = col[0];
	state[1][3] ^= gf_mul[col[1]][0];
	state[1][3] ^= gf_mul[col[2]][1];
	state[1][3] ^= col[3];
	state[2][3] = col[0];
	state[2][3] ^= col[1];
	state[2][3] ^= gf_mul[col[2]][0];
	state[2][3] ^= gf_mul[col[3]][1];
	state[3][3] = gf_mul[col[0]][1];
	state[3][3] ^= col[1];
	state[3][3] ^= col[2];
	state[3][3] ^= gf_mul[col[3]][0];
}

// Assembly:
pushq %rbp
pushq %rbx
movzbl (%rdi), %edx
movzbl 0x4(%rdi), %ecx
movzbl 0x8(%rdi), %r9d
movzbl 0xc(%rdi), %r8d
imulq $0x6, %rdx, %rsi
leaq 0x24df(%rip), %rax      # 0x5260
imulq $0x6, %rcx, %r10
imulq $0x6, %r9, %r11
movl %edx, %ebx
xorb %cl, %dl
xorb %r9b, %cl
movb 0x1(%r10,%rax), %bpl
xorb (%rsi,%rax), %bpl
xorb %r8b, %r9b
xorb %bpl, %r9b
movb (%r10,%rax), %r10b
movb %r9b, (%rdi)
xorb 0x1(%r11,%rax), %r10b
xorb %r8b, %bl
xorb %r10b, %bl
movb %bl, 0x4(%rdi)
movb (%r11,%rax), %r9b
imulq $0x6, %r8, %r8
xorb 0x1(%r8,%rax), %r9b
xorb %r9b, %dl
movb %dl, 0x8(%rdi)
movb 0x1(%rsi,%rax), %dl
xorb (%r8,%rax), %dl
xorb %dl, %cl
movb %cl, 0xc(%rdi)
movzbl 0x1(%rdi), %edx
movzbl 0x5(%rdi), %ecx
movzbl 0x9(%rdi), %esi
movzbl 0xd(%rdi), %r9d
imulq $0x6, %rdx, %r8
imulq $0x6, %rcx, %r10
movb (%r10,%rax), %r11b
movb 0x1(%r10,%rax), %r10b
xorb (%r8,%rax), %r10b
imulq $0x6, %rsi, %rbx
movl %esi, %ebp
xorb %r9b, %bpl
xorb %r10b, %bpl
movb %bpl, 0x1(%rdi)
xorb 0x1(%rbx,%rax), %r11b
movl %edx, %r10d
xorb %r9b, %r10b
xorb %r11b, %r10b
movb %r10b, 0x5(%rdi)
movb (%rbx,%rax), %r10b
imulq $0x6, %r9, %r9
xorb 0x1(%r9,%rax), %r10b
xorb %cl, %dl
xorb %sil, %cl
xorb %r10b, %dl
movb %dl, 0x9(%rdi)
movb 0x1(%r8,%rax), %dl
xorb (%r9,%rax), %dl
xorb %dl, %cl
movb %cl, 0xd(%rdi)
movzbl 0x2(%rdi), %edx
movzbl 0x6(%rdi), %ecx
movzbl 0xa(%rdi), %r9d
movzbl 0xe(%rdi), %r8d
imulq $0x6, %rdx, %rsi
imulq $0x6, %rcx, %r10
imulq $0x6, %r9, %r11
movl %edx, %ebx
xorb %cl, %dl
xorb %r9b, %cl
movb 0x1(%r10,%rax), %bpl
xorb (%rsi,%rax), %bpl
xorb %r8b, %r9b
xorb %bpl, %r9b
movb (%r10,%rax), %r10b
movb %r9b, 0x2(%rdi)
xorb 0x1(%r11,%rax), %r10b
xorb %r8b, %bl
xorb %r10b, %bl
movb %bl, 0x6(%rdi)
movb (%r11,%rax), %r9b
imulq $0x6, %r8, %r8
xorb 0x1(%r8,%rax), %r9b
xorb %r9b, %dl
movb %dl, 0xa(%rdi)
movb 0x1(%rsi,%rax), %dl
xorb (%r8,%rax), %dl
xorb %dl, %cl
movb %cl, 0xe(%rdi)
movzbl 0x3(%rdi), %edx
movzbl 0x7(%rdi), %ecx
movzbl 0xb(%rdi), %esi
movzbl 0xf(%rdi), %r9d
imulq $0x6, %rdx, %r8
imulq $0x6, %rcx, %r10
movb (%r10,%rax), %r11b
movb 0x1(%r10,%rax), %r10b
xorb (%r8,%rax), %r10b
imulq $0x6, %rsi, %rbx
movl %esi, %ebp
xorb %r9b, %bpl
xorb %r10b, %bpl
movb %bpl, 0x3(%rdi)
xorb 0x1(%rbx,%rax), %r11b
movl %edx, %r10d
xorb %r9b, %r10b
xorb %r11b, %r10b
movb %r10b, 0x7(%rdi)
movb (%rbx,%rax), %r10b
imulq $0x6, %r9, %r9
xorb 0x1(%r9,%rax), %r10b
xorb %cl, %dl
xorb %sil, %cl
xorb %r10b, %dl
movb %dl, 0xb(%rdi)
movb 0x1(%r8,%rax), %dl
xorb (%r9,%rax), %dl
xorb %dl, %cl
movb %cl, 0xf(%rdi)
popq %rbx
popq %rbp
retq