// File: SimpleButNotNaive[P]AES/main.cpp
// Function: main
int main() {
    aes_encryptor encrypter;
    aes_decryptor decryptor;

    vector<vector<uint8>> cipher;

    cipher = encrypter.encryption(plain_text, key, IV);

    printf("密文：\n");
    for (auto group : cipher) {
        for (int i = 0; i < group.size(); i++) {
            if (group[i] <= 0x0f)
                printf("0%x", group[i]);
            else
                printf("%x", group[i]);
        }
    }
    printf("\n");

    string text = decryptor.decryption(cipher, key, IV);
    printf("明文：\n");
    printf("%s\n", text.c_str());

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2f0, %rsp            # imm = 0x2F0
movl $0x0, -0x4(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x68b0
leaq -0x18c(%rbp), %rdi
callq 0x68d0
leaq -0x1a8(%rbp), %rdi
callq 0x4d30
leaq 0x5f0b(%rip), %rsi      # 0xc388
leaq -0x1e0(%rbp), %rdi
callq 0x20a0
jmp 0x648b
leaq 0x5f16(%rip), %rsi      # 0xc3a8
leaq -0x210(%rbp), %rdi
callq 0x20a0
jmp 0x64a0
leaq 0x5f21(%rip), %rsi      # 0xc3c8
leaq -0x230(%rbp), %rdi
callq 0x20a0
jmp 0x64b5
leaq -0x1c0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0x1e0(%rbp), %rdx
leaq -0x210(%rbp), %rcx
leaq -0x230(%rbp), %r8
callq 0x4570
jmp 0x64df
leaq -0x1a8(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
movq %rsi, -0x2e8(%rbp)
callq 0x68f0
movq -0x2e8(%rbp), %rdi
callq 0x4e50
leaq -0x230(%rbp), %rdi
callq 0x2238
leaq -0x210(%rbp), %rdi
callq 0x2238
leaq -0x1e0(%rbp), %rdi
callq 0x2238
leaq 0x1cbc(%rip), %rdi      # 0x81ec
xorl %eax, %eax
callq 0x2040
jmp 0x6539
leaq -0x1a8(%rbp), %rax
movq %rax, -0x238(%rbp)
movq -0x238(%rbp), %rdi
callq 0x36e0
movq %rax, -0x240(%rbp)
movq -0x238(%rbp), %rdi
callq 0x3710
movq %rax, -0x248(%rbp)
leaq -0x240(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x3740
testb $0x1, %al
jne 0x6589
jmp 0x671f
leaq -0x240(%rbp), %rdi
callq 0x3780
movq %rax, %rsi
leaq -0x260(%rbp), %rdi
callq 0x37a0
jmp 0x65a6
movl $0x0, -0x264(%rbp)
movslq -0x264(%rbp), %rax
movq %rax, -0x2f0(%rbp)
leaq -0x260(%rbp), %rdi
callq 0x3a00
movq %rax, %rcx
movq -0x2f0(%rbp), %rax
cmpq %rcx, %rax
jae 0x6702
movslq -0x264(%rbp), %rsi
leaq -0x260(%rbp), %rdi
callq 0x3890
movzbl (%rax), %eax
cmpl $0xf, %eax
jg 0x66c4
movslq -0x264(%rbp), %rsi
leaq -0x260(%rbp), %rdi
callq 0x3890
movzbl (%rax), %esi
leaq 0x1bde(%rip), %rdi      # 0x81f7
xorl %eax, %eax
callq 0x2040
jmp 0x6622
jmp 0x66ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e8(%rbp)
movl %eax, -0x1ec(%rbp)
jmp 0x6894
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e8(%rbp)
movl %eax, -0x1ec(%rbp)
jmp 0x6690
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e8(%rbp)
movl %eax, -0x1ec(%rbp)
jmp 0x6684
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e8(%rbp)
movl %eax, -0x1ec(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x2238
leaq -0x210(%rbp), %rdi
callq 0x2238
leaq -0x1e0(%rbp), %rdi
callq 0x2238
jmp 0x6894
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e8(%rbp)
movl %eax, -0x1ec(%rbp)
leaq -0x260(%rbp), %rdi
callq 0x38b0
jmp 0x6894
movslq -0x264(%rbp), %rsi
leaq -0x260(%rbp), %rdi
callq 0x3890
movzbl (%rax), %esi
leaq 0x1b17(%rip), %rdi      # 0x81f8
xorl %eax, %eax
callq 0x2040
jmp 0x66ea
jmp 0x66ec
jmp 0x66ee
movl -0x264(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x264(%rbp)
jmp 0x65b0
leaq -0x260(%rbp), %rdi
callq 0x38b0
leaq -0x240(%rbp), %rdi
callq 0x3910
jmp 0x656d
leaq 0x1908(%rip), %rdi      # 0x802e
xorl %eax, %eax
callq 0x2040
jmp 0x672f
leaq -0x2a0(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x6920
jmp 0x6744
leaq 0x5c5d(%rip), %rsi      # 0xc3a8
leaq -0x2c0(%rbp), %rdi
callq 0x20a0
jmp 0x6759
leaq 0x5c68(%rip), %rsi      # 0xc3c8
leaq -0x2e0(%rbp), %rdi
callq 0x20a0
jmp 0x676e
leaq -0x288(%rbp), %rdi
leaq -0x18c(%rbp), %rsi
leaq -0x2a0(%rbp), %rdx
leaq -0x2c0(%rbp), %rcx
leaq -0x2e0(%rbp), %r8
callq 0x2dd0
jmp 0x6798
leaq -0x2e0(%rbp), %rdi
callq 0x2238
leaq -0x2c0(%rbp), %rdi
callq 0x2238
leaq -0x2a0(%rbp), %rdi
callq 0x4e50
leaq 0x1a38(%rip), %rdi      # 0x81fb
xorl %eax, %eax
callq 0x2040
jmp 0x67cc
leaq -0x288(%rbp), %rdi
callq 0x2090
movq %rax, %rsi
leaq 0x1a24(%rip), %rdi      # 0x8206
xorl %eax, %eax
callq 0x2040
jmp 0x67eb
movl $0x0, -0x4(%rbp)
leaq -0x288(%rbp), %rdi
callq 0x2238
leaq -0x1a8(%rbp), %rdi
callq 0x4e50
movl -0x4(%rbp), %eax
addq $0x2f0, %rsp            # imm = 0x2F0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e8(%rbp)
movl %eax, -0x1ec(%rbp)
jmp 0x6868
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e8(%rbp)
movl %eax, -0x1ec(%rbp)
jmp 0x685c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e8(%rbp)
movl %eax, -0x1ec(%rbp)
leaq -0x2e0(%rbp), %rdi
callq 0x2238
leaq -0x2c0(%rbp), %rdi
callq 0x2238
leaq -0x2a0(%rbp), %rdi
callq 0x4e50
jmp 0x6894
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e8(%rbp)
movl %eax, -0x1ec(%rbp)
leaq -0x288(%rbp), %rdi
callq 0x2238
leaq -0x1a8(%rbp), %rdi
callq 0x4e50
movq -0x1e8(%rbp), %rdi
callq 0x21d0
nopl (%rax)