// File: EDDRSoftware[P]libdefsEval/main.cpp
// Function: evaluateInclude(boost::program_options::variables_map const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, boost::filesystem::path const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>*)
void evaluateInclude(const variables_map &vm, const string &var1,
                     const path &fp, const string &line, int lineNum,
                     std::vector<string> *pLibDefFiles)
{
    bool showIncludes = vm.count("includes");
    path includePath;

    if(parse(var1, fp, &includePath, line, lineNum)) {

        // check for indirect recursion (grandparents)
        if (! isRecursiveInclude(fp, pLibDefFiles)) {

            if(showIncludes) {
                cout << "INCLUDE: " << fp.string() << ":" << lineNum << " " << includePath <<
                     endl;
            }

            pLibDefFiles->push_back(fp.string());
            evaluate(vm, includePath.string(), pLibDefFiles);

        } else {
            cerr << "ERROR: Recursion in file => " << fp <<
                 " includes file => " << includePath <<
                 " which directly or indirectly references itself." << endl;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rax
movq %rax, -0xa0(%rbp)
leaq -0x59(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x6790
movq -0x98(%rbp), %rdx
leaq 0xdfb7(%rip), %rsi      # 0x16107
leaq -0x58(%rbp), %rdi
callq 0xa780
jmp 0x815b
movq -0xa0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xa720
movq %rax, -0xa8(%rbp)
jmp 0x8174
leaq -0x58(%rbp), %rdi
callq 0x6290
leaq -0x59(%rbp), %rdi
callq 0x64b0
movq -0xa8(%rbp), %rax
testq %rax, %rax
setne -0x31(%rbp)
leaq -0x90(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0xa860
movq -0xb8(%rbp), %rdx
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
callq 0x6d10
movb %al, -0xa9(%rbp)
jmp 0x81cb
movb -0xa9(%rbp), %al
testb $0x1, %al
jne 0x81da
jmp 0x8436
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x8070
movb %al, -0xb9(%rbp)
jmp 0x81ef
movb -0xb9(%rbp), %al
testb $0x1, %al
jne 0x8394
jmp 0x81ff
testb $0x1, -0x31(%rbp)
je 0x8324
movq 0x18db8(%rip), %rdi     # 0x20fc8
leaq 0xdef9(%rip), %rsi      # 0x16110
callq 0x6440
movq %rax, -0xc8(%rbp)
jmp 0x8225
movq -0x18(%rbp), %rdi
callq 0xa5b0
movq %rax, -0xd0(%rbp)
jmp 0x8237
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdi
callq 0x63f0
movq %rax, -0xd8(%rbp)
jmp 0x8253
movq -0xd8(%rbp), %rdi
leaq 0xde25(%rip), %rsi      # 0x16086
callq 0x6440
movq %rax, -0xe0(%rbp)
jmp 0x826f
movq -0xe0(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x6750
movq %rax, -0xe8(%rbp)
jmp 0x8287
movq -0xe8(%rbp), %rdi
leaq 0xde83(%rip), %rsi      # 0x16118
callq 0x6440
movq %rax, -0xf0(%rbp)
jmp 0x82a3
movq -0xf0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0xa4e0
movq %rax, -0xf8(%rbp)
jmp 0x82bf
movq -0xf8(%rbp), %rdi
movq 0x18cb3(%rip), %rsi     # 0x20f80
callq 0x6490
jmp 0x82d4
jmp 0x8324
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x82f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x6290
leaq -0x59(%rbp), %rdi
callq 0x64b0
jmp 0x844b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0xa440
jmp 0x844b
movq -0x30(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x18(%rbp), %rdi
callq 0xa5b0
movq %rax, -0x100(%rbp)
jmp 0x8341
movq -0x100(%rbp), %rsi
movq -0x108(%rbp), %rdi
callq 0xaae0
jmp 0x8356
movq -0x8(%rbp), %rax
movq %rax, -0x118(%rbp)
leaq -0x90(%rbp), %rdi
callq 0xa5b0
movq %rax, -0x110(%rbp)
jmp 0x8376
movq -0x110(%rbp), %rsi
movq -0x118(%rbp), %rdi
movq -0x30(%rbp), %rdx
callq 0x8460
jmp 0x838f
jmp 0x8434
movq 0x18c55(%rip), %rdi     # 0x20ff0
leaq 0xdd78(%rip), %rsi      # 0x1611a
callq 0x6440
movq %rax, -0x120(%rbp)
jmp 0x83b0
movq -0x120(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa4e0
movq %rax, -0x128(%rbp)
jmp 0x83c9
movq -0x128(%rbp), %rdi
leaq 0xdd60(%rip), %rsi      # 0x16137
callq 0x6440
movq %rax, -0x130(%rbp)
jmp 0x83e5
movq -0x130(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0xa4e0
movq %rax, -0x138(%rbp)
jmp 0x8401
movq -0x138(%rbp), %rdi
leaq 0xdd3b(%rip), %rsi      # 0x1614a
callq 0x6440
movq %rax, -0x140(%rbp)
jmp 0x841d
movq -0x140(%rbp), %rdi
movq 0x18b55(%rip), %rsi     # 0x20f80
callq 0x6490
jmp 0x8432
jmp 0x8434
jmp 0x8436
leaq -0x90(%rbp), %rdi
callq 0xa440
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x6780
nopw %cs:(%rax,%rax)