// File: permutationlock[P]aes_math/aes_test.cpp
// Function: main
int main(){
    GaloisPolynomial::globalSetModulus(rijndael_Mod);
    string plaintext = "0123456789abcdef";
    string key = "ohnoammyitisnogo";
    string ciphertext = encrypt(plaintext, key, 2);
    cout << ciphertext << "\n";
    string decrypted = decrypt(ciphertext, key, 2);
    cout << plaintext << "\n";
}

// Assembly:
subq $0x148, %rsp            # imm = 0x148
leaq 0x89ba(%rip), %rdi      # 0x1e1d8
callq 0x6700
leaq 0x127(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x22c0
movq 0x20(%rsp), %rdx
leaq 0xa69(%rip), %rsi       # 0x162aa
leaq 0x128(%rsp), %rdi
callq 0x2230
jmp 0x15850
leaq 0x127(%rsp), %rdi
callq 0x21f0
leaq 0xef(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x22c0
movq 0x18(%rsp), %rdx
leaq 0xa40(%rip), %rsi       # 0x162bb
leaq 0xf0(%rsp), %rdi
callq 0x2230
jmp 0x1588a
leaq 0xef(%rsp), %rdi
callq 0x21f0
leaq 0xa8(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0x2090
jmp 0x158ae
leaq 0x88(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x2090
jmp 0x158c5
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
movl $0x2, %ecx
callq 0xb500
jmp 0x158e9
leaq 0x88(%rsp), %rdi
callq 0x20e0
leaq 0xa8(%rsp), %rdi
callq 0x20e0
movq 0x86c6(%rip), %rdi      # 0x1dfd0
leaq 0xc8(%rsp), %rsi
callq 0x2190
movq %rax, 0x10(%rsp)
jmp 0x1591e
movq 0x10(%rsp), %rdi
leaq 0x9a2(%rip), %rsi       # 0x162cc
callq 0x21b0
jmp 0x15931
leaq 0x48(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x2090
jmp 0x15945
leaq 0x28(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x2090
jmp 0x15959
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movl $0x2, %ecx
callq 0xbae0
jmp 0x15974
leaq 0x28(%rsp), %rdi
callq 0x20e0
leaq 0x48(%rsp), %rdi
callq 0x20e0
movq 0x8641(%rip), %rdi      # 0x1dfd0
leaq 0x128(%rsp), %rsi
callq 0x2190
movq %rax, 0x8(%rsp)
jmp 0x159a3
movq 0x8(%rsp), %rdi
leaq 0x91d(%rip), %rsi       # 0x162cc
callq 0x21b0
jmp 0x159b6
leaq 0x68(%rsp), %rdi
callq 0x20e0
leaq 0xc8(%rsp), %rdi
callq 0x20e0
leaq 0xf0(%rsp), %rdi
callq 0x20e0
leaq 0x128(%rsp), %rdi
callq 0x20e0
xorl %eax, %eax
addq $0x148, %rsp            # imm = 0x148
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0x127(%rsp), %rdi
callq 0x21f0
jmp 0x15b3a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0xef(%rsp), %rdi
callq 0x21f0
jmp 0x15b2d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
jmp 0x15b20
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
jmp 0x15a8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x20e0
leaq 0xa8(%rsp), %rdi
callq 0x20e0
jmp 0x15b20
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
jmp 0x15b13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
jmp 0x15ae9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x20e0
leaq 0x48(%rsp), %rdi
callq 0x20e0
jmp 0x15b13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x20e0
leaq 0xc8(%rsp), %rdi
callq 0x20e0
leaq 0xf0(%rsp), %rdi
callq 0x20e0
leaq 0x128(%rsp), %rdi
callq 0x20e0
movq 0x118(%rsp), %rdi
callq 0x22b0