// File: /workspace/github_cpp_makefile_star2_O2/DiplIngFrankGerlach[P]MST/./aes/aes.c
// Function: InvMixColumns
void InvMixColumns(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]][5];
	state[0][0] ^= gf_mul[col[1]][3];
	state[0][0] ^= gf_mul[col[2]][4];
	state[0][0] ^= gf_mul[col[3]][2];
	state[1][0] = gf_mul[col[0]][2];
	state[1][0] ^= gf_mul[col[1]][5];
	state[1][0] ^= gf_mul[col[2]][3];
	state[1][0] ^= gf_mul[col[3]][4];
	state[2][0] = gf_mul[col[0]][4];
	state[2][0] ^= gf_mul[col[1]][2];
	state[2][0] ^= gf_mul[col[2]][5];
	state[2][0] ^= gf_mul[col[3]][3];
	state[3][0] = gf_mul[col[0]][3];
	state[3][0] ^= gf_mul[col[1]][4];
	state[3][0] ^= gf_mul[col[2]][2];
	state[3][0] ^= gf_mul[col[3]][5];
	// 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]][5];
	state[0][1] ^= gf_mul[col[1]][3];
	state[0][1] ^= gf_mul[col[2]][4];
	state[0][1] ^= gf_mul[col[3]][2];
	state[1][1] = gf_mul[col[0]][2];
	state[1][1] ^= gf_mul[col[1]][5];
	state[1][1] ^= gf_mul[col[2]][3];
	state[1][1] ^= gf_mul[col[3]][4];
	state[2][1] = gf_mul[col[0]][4];
	state[2][1] ^= gf_mul[col[1]][2];
	state[2][1] ^= gf_mul[col[2]][5];
	state[2][1] ^= gf_mul[col[3]][3];
	state[3][1] = gf_mul[col[0]][3];
	state[3][1] ^= gf_mul[col[1]][4];
	state[3][1] ^= gf_mul[col[2]][2];
	state[3][1] ^= gf_mul[col[3]][5];
	// 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]][5];
	state[0][2] ^= gf_mul[col[1]][3];
	state[0][2] ^= gf_mul[col[2]][4];
	state[0][2] ^= gf_mul[col[3]][2];
	state[1][2] = gf_mul[col[0]][2];
	state[1][2] ^= gf_mul[col[1]][5];
	state[1][2] ^= gf_mul[col[2]][3];
	state[1][2] ^= gf_mul[col[3]][4];
	state[2][2] = gf_mul[col[0]][4];
	state[2][2] ^= gf_mul[col[1]][2];
	state[2][2] ^= gf_mul[col[2]][5];
	state[2][2] ^= gf_mul[col[3]][3];
	state[3][2] = gf_mul[col[0]][3];
	state[3][2] ^= gf_mul[col[1]][4];
	state[3][2] ^= gf_mul[col[2]][2];
	state[3][2] ^= gf_mul[col[3]][5];
	// 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]][5];
	state[0][3] ^= gf_mul[col[1]][3];
	state[0][3] ^= gf_mul[col[2]][4];
	state[0][3] ^= gf_mul[col[3]][2];
	state[1][3] = gf_mul[col[0]][2];
	state[1][3] ^= gf_mul[col[1]][5];
	state[1][3] ^= gf_mul[col[2]][3];
	state[1][3] ^= gf_mul[col[3]][4];
	state[2][3] = gf_mul[col[0]][4];
	state[2][3] ^= gf_mul[col[1]][2];
	state[2][3] ^= gf_mul[col[2]][5];
	state[2][3] ^= gf_mul[col[3]][3];
	state[3][3] = gf_mul[col[0]][3];
	state[3][3] ^= gf_mul[col[1]][4];
	state[3][3] ^= gf_mul[col[2]][2];
	state[3][3] ^= gf_mul[col[3]][5];
}

// Assembly:
movzbl (%rdi), %eax
movzbl 0x4(%rdi), %edx
movzbl 0x8(%rdi), %esi
imulq $0x6, %rax, %rcx
leaq 0x232d(%rip), %rax      # 0x5260
imulq $0x6, %rdx, %rdx
movb 0x3(%rdx,%rax), %r8b
xorb 0x5(%rcx,%rax), %r8b
movzbl 0xc(%rdi), %r9d
imulq $0x6, %rsi, %rsi
xorb 0x4(%rsi,%rax), %r8b
movb 0x2(%rdx,%rax), %r10b
imulq $0x6, %r9, %r9
xorb 0x2(%r9,%rax), %r8b
movb %r8b, (%rdi)
movb 0x5(%rdx,%rax), %r8b
xorb 0x2(%rcx,%rax), %r8b
xorb 0x3(%rsi,%rax), %r8b
xorb 0x4(%r9,%rax), %r8b
movb %r8b, 0x4(%rdi)
xorb 0x4(%rcx,%rax), %r10b
xorb 0x5(%rsi,%rax), %r10b
xorb 0x3(%r9,%rax), %r10b
movb %r10b, 0x8(%rdi)
movb 0x4(%rdx,%rax), %dl
xorb 0x3(%rcx,%rax), %dl
xorb 0x2(%rsi,%rax), %dl
xorb 0x5(%r9,%rax), %dl
movb %dl, 0xc(%rdi)
movzbl 0x1(%rdi), %ecx
movzbl 0x5(%rdi), %edx
movzbl 0x9(%rdi), %esi
movzbl 0xd(%rdi), %r8d
imulq $0x6, %rcx, %rcx
imulq $0x6, %rdx, %rdx
movb 0x2(%rdx,%rax), %r9b
movb 0x3(%rdx,%rax), %r10b
xorb 0x5(%rcx,%rax), %r10b
imulq $0x6, %rsi, %rsi
xorb 0x4(%rsi,%rax), %r10b
imulq $0x6, %r8, %r8
xorb 0x2(%r8,%rax), %r10b
movb %r10b, 0x1(%rdi)
movb 0x5(%rdx,%rax), %r10b
xorb 0x2(%rcx,%rax), %r10b
xorb 0x3(%rsi,%rax), %r10b
xorb 0x4(%r8,%rax), %r10b
movb %r10b, 0x5(%rdi)
xorb 0x4(%rcx,%rax), %r9b
xorb 0x5(%rsi,%rax), %r9b
xorb 0x3(%r8,%rax), %r9b
movb %r9b, 0x9(%rdi)
movb 0x4(%rdx,%rax), %dl
xorb 0x3(%rcx,%rax), %dl
xorb 0x2(%rsi,%rax), %dl
xorb 0x5(%r8,%rax), %dl
movb %dl, 0xd(%rdi)
movzbl 0x2(%rdi), %ecx
movzbl 0x6(%rdi), %edx
movzbl 0xa(%rdi), %esi
imulq $0x6, %rcx, %rcx
imulq $0x6, %rdx, %rdx
movb 0x3(%rdx,%rax), %r8b
xorb 0x5(%rcx,%rax), %r8b
movzbl 0xe(%rdi), %r9d
imulq $0x6, %rsi, %rsi
xorb 0x4(%rsi,%rax), %r8b
movb 0x2(%rdx,%rax), %r10b
imulq $0x6, %r9, %r9
xorb 0x2(%r9,%rax), %r8b
movb %r8b, 0x2(%rdi)
movb 0x5(%rdx,%rax), %r8b
xorb 0x2(%rcx,%rax), %r8b
xorb 0x3(%rsi,%rax), %r8b
xorb 0x4(%r9,%rax), %r8b
movb %r8b, 0x6(%rdi)
xorb 0x4(%rcx,%rax), %r10b
xorb 0x5(%rsi,%rax), %r10b
xorb 0x3(%r9,%rax), %r10b
movb %r10b, 0xa(%rdi)
movb 0x4(%rdx,%rax), %dl
xorb 0x3(%rcx,%rax), %dl
xorb 0x2(%rsi,%rax), %dl
xorb 0x5(%r9,%rax), %dl
movb %dl, 0xe(%rdi)
movzbl 0x3(%rdi), %ecx
movzbl 0x7(%rdi), %edx
movzbl 0xb(%rdi), %esi
movzbl 0xf(%rdi), %r8d
imulq $0x6, %rcx, %rcx
imulq $0x6, %rdx, %rdx
movb 0x2(%rdx,%rax), %r9b
movb 0x3(%rdx,%rax), %r10b
xorb 0x5(%rcx,%rax), %r10b
imulq $0x6, %rsi, %rsi
xorb 0x4(%rsi,%rax), %r10b
imulq $0x6, %r8, %r8
xorb 0x2(%r8,%rax), %r10b
movb %r10b, 0x3(%rdi)
movb 0x5(%rdx,%rax), %r10b
xorb 0x2(%rcx,%rax), %r10b
xorb 0x3(%rsi,%rax), %r10b
xorb 0x4(%r8,%rax), %r10b
movb %r10b, 0x7(%rdi)
xorb 0x4(%rcx,%rax), %r9b
xorb 0x5(%rsi,%rax), %r9b
xorb 0x3(%r8,%rax), %r9b
movb %r9b, 0xb(%rdi)
movb 0x4(%rdx,%rax), %dl
xorb 0x3(%rcx,%rax), %dl
xorb 0x2(%rsi,%rax), %dl
xorb 0x5(%r8,%rax), %dl
movb %dl, 0xf(%rdi)
retq
nop