// File: 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
subq $0x210, %rsp            # imm = 0x210
movq %rsi, -0x190(%rbp)
movq %rdi, -0x1a0(%rbp)
movq %rdi, %rax
movq %rax, -0x198(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x2790
movq -0x190(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x3bc0
jmp 0x6676
leaq -0x30(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x5ad0
jmp 0x6685
leaq -0x48(%rbp), %rdi
callq 0x2840
leaq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0x5130
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
callq 0x4e60
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x6dd0
testb $0x1, %al
jne 0x66c6
jmp 0x6c2d
leaq -0x68(%rbp), %rdi
callq 0x5420
movq %rax, %rsi
leaq -0x88(%rbp), %rdi
callq 0x3bc0
jmp 0x66e0
xorl %eax, %eax
movl %eax, %esi
movq %rsi, -0x1f0(%rbp)
leaq -0x88(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x2820
movq -0x1b8(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x90(%rbp)
movl $0x1, %esi
movq %rsi, -0x1e8(%rbp)
callq 0x2820
movq -0x1b8(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x98(%rbp)
movl $0x2, %esi
movq %rsi, -0x1d8(%rbp)
callq 0x2820
movq -0x1b8(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0xa0(%rbp)
movl $0x3, %esi
movq %rsi, -0x1b0(%rbp)
callq 0x2820
movq (%rax), %rax
movq %rax, -0xa8(%rbp)
leaq -0x98(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
leaq -0xa0(%rbp), %rsi
movq %rsi, -0x1c0(%rbp)
callq 0x27e0
movq %rax, -0xb8(%rbp)
leaq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
movq %rsi, -0x1e0(%rbp)
callq 0x27e0
movq -0x1f0(%rbp), %rsi
movq -0x1b8(%rbp), %rdi
movq %rax, -0xb0(%rbp)
callq 0x2820
movq -0x1c0(%rbp), %rsi
movq -0xb0(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x90(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x27e0
movq -0x1e0(%rbp), %rsi
movq %rax, -0xc8(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x27e0
movq -0x1e8(%rbp), %rsi
movq -0x1b8(%rbp), %rdi
movq %rax, -0xc0(%rbp)
callq 0x2820
movq -0x1d0(%rbp), %rdi
movq -0x1c8(%rbp), %rsi
movq -0xc0(%rbp), %rcx
movq %rcx, (%rax)
callq 0x27e0
movq -0x1e0(%rbp), %rsi
movq %rax, -0xd8(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x27e0
movq -0x1d8(%rbp), %rsi
movq -0x1b8(%rbp), %rdi
movq %rax, -0xd0(%rbp)
callq 0x2820
movq -0x1d0(%rbp), %rdi
movq -0x1c8(%rbp), %rsi
movq -0xd0(%rbp), %rcx
movq %rcx, (%rax)
callq 0x27e0
movq -0x1c0(%rbp), %rsi
movq %rax, -0xe8(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x27e0
movq -0x1b8(%rbp), %rdi
movq -0x1b0(%rbp), %rsi
movq %rax, -0xe0(%rbp)
callq 0x2820
movq -0xe0(%rbp), %rcx
movq %rcx, (%rax)
movq -0x90(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rdi
callq 0x6580
movq %rax, -0x1a8(%rbp)
jmp 0x68f1
movq -0x1a8(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rdi
callq 0x6580
movq %rax, -0x1f8(%rbp)
jmp 0x6930
movq -0x1f8(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rdi
callq 0x6580
movq %rax, -0x200(%rbp)
jmp 0x696f
movq -0x200(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rdi
callq 0x6580
movq %rax, -0x208(%rbp)
jmp 0x69ae
movq -0x208(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0x88(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2820
movq %rax, %rdi
leaq -0x90(%rbp), %rsi
callq 0x27e0
movq %rax, -0x138(%rbp)
leaq -0x138(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x27e0
movq %rax, -0x130(%rbp)
leaq -0x88(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2820
movq -0x130(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x88(%rbp), %rdi
movl $0x1, %esi
callq 0x2820
movq %rax, %rdi
leaq -0x98(%rbp), %rsi
callq 0x27e0
movq %rax, -0x148(%rbp)
leaq -0x148(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x27e0
movq %rax, -0x140(%rbp)
leaq -0x88(%rbp), %rdi
movl $0x1, %esi
callq 0x2820
movq -0x140(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x88(%rbp), %rdi
movl $0x2, %esi
callq 0x2820
movq %rax, %rdi
leaq -0xa0(%rbp), %rsi
callq 0x27e0
movq %rax, -0x158(%rbp)
leaq -0x158(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x27e0
movq %rax, -0x150(%rbp)
leaq -0x88(%rbp), %rdi
movl $0x2, %esi
callq 0x2820
movq -0x150(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x88(%rbp), %rdi
movl $0x3, %esi
callq 0x2820
movq %rax, %rdi
leaq -0xa8(%rbp), %rsi
callq 0x27e0
movq %rax, -0x168(%rbp)
leaq -0x168(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x27e0
movq %rax, -0x160(%rbp)
leaq -0x88(%rbp), %rdi
movl $0x3, %esi
callq 0x2820
movq -0x160(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x88(%rbp), %rax
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rdi
callq 0x2f40
movq %rax, -0x178(%rbp)
movq -0x170(%rbp), %rdi
callq 0x2d90
movq %rax, -0x180(%rbp)
leaq -0x178(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x3ea0
testb $0x1, %al
jne 0x6b88
jmp 0x6c13
leaq -0x178(%rbp), %rdi
callq 0x3400
movq -0x1a0(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x188(%rbp)
leaq -0x188(%rbp), %rsi
callq 0x3fb0
jmp 0x6bb3
jmp 0x6bb5
leaq -0x178(%rbp), %rdi
callq 0x4020
jmp 0x6b6c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6c69
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x2840
jmp 0x6c69
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6c42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x2840
jmp 0x6c42
leaq -0x88(%rbp), %rdi
callq 0x2840
leaq -0x68(%rbp), %rdi
callq 0x6e10
jmp 0x66b0
movb $0x1, -0x11(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3dc0
testb $0x1, -0x11(%rbp)
jne 0x6c59
jmp 0x6c4d
leaq -0x30(%rbp), %rdi
callq 0x3dc0
jmp 0x6c69
movq -0x1a0(%rbp), %rdi
callq 0x2840
movq -0x198(%rbp), %rax
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
movq -0x1a0(%rbp), %rdi
callq 0x2840
movq -0x50(%rbp), %rdi
callq 0x22b0
nop