// File: /workspace/github_cpp_makefile_star2_O3/lmclaramunt[P]AES-Crypto/Cipher.cpp
// Function: Cipher::Cipher(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool, bool)
Cipher::Cipher(string* _textPath, string* _aesKeyPath, string* _macKeyPath, 
    bool padding, bool encrypt): 
    textPath(_textPath), aesKeyPath(*_aesKeyPath), macKeyPath(*_macKeyPath){
    try {
        if(!fileExists(textPath)) throw "File given in path '-p' wasn't found\n";
        if(!fileExists(_aesKeyPath)) throw "Key given in '-aes' wasn't found\n";
        if(!fileExists(_macKeyPath)) throw "Key given in '-mac' wasn't found\n";
        int keyLength = getKeySize(&aesKeyPath, &macKeyPath);
        cryptoDir();
        setBlockRoundCombinations(&keyLength, false);
        getKey(encrypt, &aesKeyPath, &aesKeyExp);
        getKey(encrypt, &macKeyPath, &macKeyExp);
        vector<unsigned char> inpVct;
        readText(&inpVct);
        inputBlock = new Block(&inpVct, padding);
    } catch(const char* str) {
        throw str;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl %r9d, %r12d
movl %r8d, (%rsp)
movq %rcx, %r13
movq %rdx, %rbp
movq %rdi, %rbx
movq %rsi, 0x28(%rdi)
leaq 0x40(%rdi), %rax
movq %rax, 0x18(%rsp)
movq %rax, 0x30(%rdi)
movq $0x0, 0x38(%rdi)
movb $0x0, 0x40(%rdi)
leaq 0x50(%rdi), %r14
leaq 0x60(%rdi), %rax
movq %rax, 0x10(%rsp)
movq %rax, 0x50(%rdi)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x64c2
leaq 0x70(%rbx), %r15
leaq 0x80(%rbx), %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x70(%rbx)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x64c2
movq 0x28(%rbx), %rax
movq (%rax), %rdi
leaq 0x20(%rsp), %rsi
callq 0x21f0
testl %eax, %eax
jne 0x46b8
movq (%rbp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x21f0
testl %eax, %eax
jne 0x46c1
movq (%r13), %rdi
leaq 0x20(%rsp), %rsi
callq 0x21f0
testl %eax, %eax
jne 0x46ca
movq %r14, %rsi
movq %r15, %rdx
callq 0x47ca
movl %eax, 0x4(%rsp)
movq %rbx, %rdi
callq 0x3e24
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3eb6
movzbl %r12b, %ebp
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x42b0
leaq 0x8(%rbx), %rcx
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x42b0
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq %rbx, %rdi
callq 0x448c
movl $0x18, %edi
callq 0x2240
movq %rax, %rbp
movzbl (%rsp), %edx
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x338c
movq %rbp, 0x10(%rbx)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x46a6
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2fbb(%rip), %r12      # 0x767a
jmp 0x46d1
leaq 0x2fd8(%rip), %r12      # 0x76a0
jmp 0x46d1
leaq 0x2ff1(%rip), %r12      # 0x76c2
movl $0x8, %edi
callq 0x2120
movq %r12, (%rax)
movq 0x68db(%rip), %rsi      # 0xafc0
movq %rax, %rdi
xorl %edx, %edx
callq 0x23d0
movq %rdx, %r13
movq %rax, %r12
movl $0x18, %esi
movq %rbp, %rdi
callq 0x2250
jmp 0x471a
movq %rax, %r12
jmp 0x478c
movq %rax, %r12
jmp 0x47a6
movq %rdx, %r13
movq %rax, %r12
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x473b
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
jmp 0x473b
jmp 0x4735
movq %rdx, %r13
movq %rax, %r12
cmpl $0x1, %r13d
jne 0x4772
movq %r12, %rdi
callq 0x20d0
movq %rax, %r12
movl $0x8, %edi
callq 0x2120
movq %r12, (%rax)
movq 0x6860(%rip), %rsi      # 0xafc0
movq %rax, %rdi
xorl %edx, %edx
callq 0x23d0
movq %rax, %r12
callq 0x23a0
movq (%r15), %rdi
cmpq 0x8(%rsp), %rdi
je 0x478c
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2250
movq (%r14), %rdi
cmpq 0x10(%rsp), %rdi
je 0x47a6
movq 0x10(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2250
movq 0x30(%rbx), %rdi
cmpq 0x18(%rsp), %rdi
je 0x47c1
movq 0x18(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2250
movq %r12, %rdi
callq 0x2400
nop