// File: /workspace/github_cpp_makefile_star2_O3/skyleaworlder[P]AES/src/MixColumns.cpp
// Function: MixColumns(std::vector<std::bitset<8ul>, std::allocator<std::bitset<8ul>>>)
vector<byte> MixColumns(
    vector<byte> input
) {
    vector<byte> ret;
    vector<vector<byte>> total { vector_to_2_vector(input) };
    for (vector<byte> s : total) {
        byte x0 { s[0] }, x1 { s[1] }, x2 { s[2] }, x3 { s[3] };
        s[0] = x1 ^ x2 ^ x3;    s[1] = x0 ^ x2 ^ x3;
        s[2] = x0 ^ x1 ^ x3;    s[3] = x0 ^ x1 ^ x2;

        x0 = FieldMult(x0); x1 = FieldMult(x1);
        x2 = FieldMult(x2); x3 = FieldMult(x3);

        s[0] = s[0] ^ x0 ^ x1;  s[1] = s[1] ^ x1 ^ x2;
        s[2] = s[2] ^ x2 ^ x3;  s[3] = s[3] ^ x3 ^ x0;

        for (byte s_i : s)
            ret.push_back(s_i);
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq -0x68(%rbp), %rdi
callq 0x2a76
leaq -0x80(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x31bc
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x341b
movq -0x58(%rbp), %rsi
subq %rdi, %rsi
callq 0x2130
movq -0x80(%rbp), %r14
movq -0x78(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq %rax, %r14
je 0x356c
leaq -0x50(%rbp), %r12
leaq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x2a76
movq -0x40(%rbp), %rax
movq (%rax), %r8
movq 0x8(%rax), %r10
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rcx
movq %rcx, %r9
xorq %rsi, %r9
movq %r9, %rdx
xorq %r10, %rdx
movq %rdx, (%rax)
xorq %r8, %r9
movq %r10, %rdx
xorq %r8, %rdx
movq %rcx, %rdi
xorq %rdx, %rdi
xorq %rsi, %rdx
leal (%r8,%r8), %r11d
movl $0xff, %r15d
andl %r15d, %r11d
movq %r11, %rax
xorq $0x1b, %rax
testb %r8b, %r8b
cmovnsq %r11, %rax
leal (%r10,%r10), %r11d
andl %r15d, %r11d
movq %r11, %r8
xorq $0x1b, %r8
testb %r10b, %r10b
movq -0x40(%rbp), %r10
cmovnsq %r11, %r8
movq %r9, 0x8(%r10)
leal (%rsi,%rsi), %r11d
andl %r15d, %r11d
movq %r11, %r9
xorq $0x1b, %r9
testb %sil, %sil
cmovnsq %r11, %r9
movq %rdi, 0x10(%r10)
leal (%rcx,%rcx), %esi
andl %r15d, %esi
movq %rsi, %rdi
xorq $0x1b, %rdi
testb %cl, %cl
cmovnsq %rsi, %rdi
movq %rdx, 0x18(%r10)
movq (%r10), %rcx
xorq %rax, %rcx
xorq %r8, %rcx
movq %rcx, (%r10)
movq -0x40(%rbp), %r13
xorq 0x8(%r13), %r8
xorq %r9, %r8
movq %r8, 0x8(%r13)
xorq 0x10(%r13), %r9
xorq %rdi, %r9
movq %r9, 0x10(%r13)
xorq 0x18(%r13), %rax
xorq %rdi, %rax
movq %rax, 0x18(%r13)
movq -0x38(%rbp), %r15
cmpq %r15, %r13
je 0x354f
movq (%r13), %rax
movq %rax, -0x50(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3532
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x353d
movq %rbx, %rdi
movq %r12, %rdx
callq 0x2fe2
addq $0x8, %r13
cmpq %r15, %r13
jne 0x3516
movq -0x40(%rbp), %r13
testq %r13, %r13
je 0x355e
movq -0x30(%rbp), %rsi
subq %r13, %rsi
movq %r13, %rdi
callq 0x2130
addq $0x18, %r14
cmpq -0x48(%rbp), %r14
jne 0x3434
leaq -0x80(%rbp), %rdi
callq 0x2b40
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x35d8
movq -0x58(%rbp), %rsi
jmp 0x35d0
movq %rax, %r14
jmp 0x35d8
movq %rax, %r14
jmp 0x35bb
movq %rax, %r14
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x35bb
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x2130
leaq -0x80(%rbp), %rdi
callq 0x2b40
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x35d8
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2130
movq %r14, %rdi
callq 0x21b0