// File: /workspace/github_cpp_makefile_star2_O3/EDDRSoftware[P]libdefsEval/main.cpp
// Function: evaluate(boost::program_options::variables_map const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 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 evaluate(const variables_map &vm, const string &libdefs, std::vector<string> *pLibDefFiles)
{
    bool showAssigns    = vm.count("assigns");
    bool showComments   = vm.count("comments");
    bool showEmptyLines = vm.count("emptylines");
    path fp;

    try {
        if(parse(libdefs, current_path(), &fp)) {
            ifstream libdefsFile(fp.string().c_str());

            if(libdefsFile.is_open()) {
                int lineNum = 0;

                while(libdefsFile.good()) {
                    lineNum++;
                    string line;
                    getline(libdefsFile, line);

                    if(line.length()==0) {
                        if(showEmptyLines) {
                            cout << "EMPTY LINE: " << fp.string() << ":" <<
                                 lineNum << endl;
                        }

                        continue;
                    }

                    string action;
                    stringstream stream(line);
                    stream >> action;

                    if(action[0]=='#') {
                        if(showComments) {
                            cout << "COMMENT: " << line << endl;
                        }

                        continue;
                    }

                    if(action=="DEFINE") {
                        string var1, var2;
                        stream >> var1;
                        // var2 requires reading until EOL;
                        readUntilEOL(&stream, &var2);

                        if(var1[0]=='#' || var2[0]=='#') {
                            cerr << "INVALID LINE: " << fp.string() << ":" <<
                                 lineNum << " => " << line << endl;
                            continue;
                        }

                        if(var1.length()>0 && var2.length()>0) {
                            evaluateDefine(vm, var1, var2, fp, line, lineNum);
                        }
                    } else if(action=="INCLUDE") {
                        string var1;
                        // var1 requires reading until EOL
                        readUntilEOL(&stream, &var1);

                        if(var1[0]=='#') {
                            cerr << "INVALID LINE: " << fp.string() << ":" <<
                                 lineNum << " => " << line << endl;
                            continue;
                        }

                        if(var1.length()>0) {
                            evaluateInclude(vm, var1, fp, line, lineNum, pLibDefFiles);
                        }
                    } else if(action=="ASSIGN") {
                        if(showAssigns) {
                            cout << "ASSIGN: " << fp.string() << ":" << lineNum << " \"" << line << "\"" <<
                                 endl;
                        }
                    } else {
                        cerr << "INVALID LINE: " << fp.string() << ":" <<
                             lineNum << " => " << line << endl;
                    }
                }
            } else {
                cerr << "ERROR: Library path " << libdefs <<
                     " does not exist." << endl;
            }
        }
    } catch(...) {
        cerr << "ERROR: Library path " << fp << " does not exist." << endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x468, %rsp            # imm = 0x468
movq %rdx, -0xe0(%rbp)
movq %rsi, %r14
movq %rdi, %r12
leaq -0x2f0(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x4587(%rip), %rsi      # 0xa146
leaq 0x4587(%rip), %rdx      # 0xa14d
leaq -0x300(%rbp), %rdi
callq 0x75e0
leaq 0x10(%r12), %rbx
leaq -0x300(%rbp), %rsi
movq %rbx, %rdi
callq 0x7bee
movq %rax, -0xe8(%rbp)
movq -0x300(%rbp), %rdi
cmpq %r15, %rdi
je 0x5c08
movq -0x2f0(%rbp), %rsi
incq %rsi
callq 0x42d0
leaq -0x300(%rbp), %rdi
movq %r15, (%rdi)
leaq 0x4535(%rip), %rsi      # 0xa14e
leaq 0x4536(%rip), %rdx      # 0xa156
callq 0x75e0
leaq -0x300(%rbp), %rsi
movq %rbx, %rdi
callq 0x7bee
movq %rax, -0xf0(%rbp)
movq -0x300(%rbp), %rdi
cmpq %r15, %rdi
je 0x5c56
movq -0x2f0(%rbp), %rsi
incq %rsi
callq 0x42d0
leaq -0x300(%rbp), %rdi
movq %r15, (%rdi)
leaq 0x44f0(%rip), %rsi      # 0xa157
leaq 0x44f3(%rip), %rdx      # 0xa161
callq 0x75e0
leaq -0x300(%rbp), %rsi
movq %rbx, %rdi
callq 0x7bee
movq %rax, -0xf8(%rbp)
movq -0x300(%rbp), %rdi
cmpq %r15, %rdi
je 0x5ca4
movq -0x2f0(%rbp), %rsi
incq %rsi
callq 0x42d0
movq %r12, -0xb0(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x300(%rbp), %rdi
xorl %esi, %esi
callq 0x42c0
leaq -0x478(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq -0x300(%rbp), %rsi
leaq -0x88(%rbp), %rdx
leaq -0x488(%rbp), %rcx
movq %r14, %rdi
xorl %r8d, %r8d
callq 0x497f
movl %eax, %ebx
movq -0x488(%rbp), %rdi
cmpq %r12, %rdi
je 0x5d23
movq -0x478(%rbp), %rsi
incq %rsi
callq 0x42d0
movq -0x300(%rbp), %rdi
cmpq %r15, %rdi
je 0x5d3e
movq -0x2f0(%rbp), %rsi
incq %rsi
callq 0x42d0
testb %bl, %bl
je 0x6451
movq -0x88(%rbp), %rsi
leaq -0x300(%rbp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x44c0
leaq -0x288(%rbp), %rdi
callq 0x4070
testb %al, %al
je 0x63dc
movq -0x300(%rbp), %rax
movq -0x18(%rax), %rcx
cmpl $0x0, -0x2e0(%rbp,%rcx)
jne 0x6445
movq -0xb0(%rbp), %rcx
addq $0x18, %rcx
movq %rcx, -0xb8(%rbp)
addq $-0x18, %rax
leaq -0x58(%rbp), %r12
movl $0x1, %r15d
leaq -0x488(%rbp), %r14
movq %r12, -0x68(%rbp)
movq $0x0, -0x60(%rbp)
movb $0x0, -0x58(%rbp)
movq (%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %edx
movq %rbx, %rdi
leaq -0x68(%rbp), %rsi
callq 0x44e0
cmpq $0x0, -0x60(%rbp)
je 0x5e9b
leaq -0xc8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq $0x0, -0xd0(%rbp)
movb $0x0, -0xc8(%rbp)
movq %r14, %rdi
leaq -0x68(%rbp), %rsi
movl $0x18, %edx
callq 0x4420
movq %r14, %rdi
leaq -0xd8(%rbp), %rsi
callq 0x4370
movq -0xd8(%rbp), %rax
cmpb $0x23, (%rax)
jne 0x5f2f
movq -0xb8(%rbp), %rax
cmpq %rax, -0xf0(%rbp)
je 0x6322
movl $0x9, %edx
movq 0x8169(%rip), %rdi      # 0xdfc8
leaq 0x4309(%rip), %rsi      # 0xa16f
callq 0x4300
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq 0x814e(%rip), %rdi      # 0xdfc8
callq 0x4300
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x42a0
jmp 0x62c8
movq -0xb8(%rbp), %rax
cmpq %rax, -0xf8(%rbp)
je 0x635f
movl $0xc, %edx
movq 0x810d(%rip), %rdi      # 0xdfc8
leaq 0x42a0(%rip), %rsi      # 0xa162
callq 0x4300
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq 0x80ef(%rip), %rdi      # 0xdfc8
callq 0x4300
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x4161(%rip), %rsi      # 0xa051
callq 0x4300
movq %r13, %rdi
movl %r15d, %esi
callq 0x4470
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %esi
movq %r13, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x41e0
jmp 0x635f
leaq -0xd8(%rbp), %r13
movq %r13, %rdi
leaq 0x4239(%rip), %rsi      # 0xa179
callq 0x40b0
testl %eax, %eax
je 0x600f
movq %r13, %rdi
leaq 0x4229(%rip), %rsi      # 0xa180
callq 0x40b0
testl %eax, %eax
je 0x613c
movq %r13, %rdi
leaq 0x421a(%rip), %rsi      # 0xa188
callq 0x40b0
testl %eax, %eax
je 0x6210
movl $0xe, %edx
movq 0x8069(%rip), %rdi      # 0xdff0
leaq 0x40c5(%rip), %rsi      # 0xa053
callq 0x4300
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq 0x804b(%rip), %rdi      # 0xdff0
callq 0x4300
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x4095(%rip), %rsi      # 0xa051
callq 0x4300
movq %r13, %rdi
movl %r15d, %esi
callq 0x4470
movq %rax, %r13
movl $0x4, %edx
movq %rax, %rdi
leaq 0x411f(%rip), %rsi      # 0xa0fd
callq 0x4300
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %r13, %rdi
callq 0x4300
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x42a0
jmp 0x62c8
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x40(%rbp)
movb %cl, -0x38(%rbp)
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq %rcx, -0xa0(%rbp)
movb %cl, -0x98(%rbp)
movq %r14, %rdi
leaq -0x48(%rbp), %rsi
callq 0x4370
movq %r14, %rdi
leaq -0xa8(%rbp), %rsi
callq 0x4cc8
movq -0x48(%rbp), %rax
cmpb $0x23, (%rax)
je 0x606f
movq -0xa8(%rbp), %rdi
cmpb $0x23, (%rdi)
jne 0x6399
movl $0xe, %edx
movq 0x7f75(%rip), %rdi      # 0xdff0
leaq 0x3fd1(%rip), %rsi      # 0xa053
callq 0x4300
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq 0x7f57(%rip), %rdi      # 0xdff0
callq 0x4300
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x3fa1(%rip), %rsi      # 0xa051
callq 0x4300
movq %r13, %rdi
movl %r15d, %esi
callq 0x4470
movq %rax, %r13
movl $0x4, %edx
movq %rax, %rdi
leaq 0x402b(%rip), %rsi      # 0xa0fd
callq 0x4300
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %r13, %rdi
callq 0x4300
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %esi
movq %r13, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x41e0
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x6309
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x42d0
jmp 0x6309
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movb $0x0, -0x38(%rbp)
movq %r14, %rdi
leaq -0x48(%rbp), %rsi
callq 0x4cc8
movq -0x48(%rbp), %rax
cmpb $0x23, (%rax)
jne 0x62dd
movl $0xe, %edx
movq 0x7e7b(%rip), %rdi      # 0xdff0
leaq 0x3ed7(%rip), %rsi      # 0xa053
callq 0x4300
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq 0x7e5d(%rip), %rdi      # 0xdff0
callq 0x4300
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x3ea7(%rip), %rsi      # 0xa051
callq 0x4300
movq %r13, %rdi
movl %r15d, %esi
callq 0x4470
movq %rax, %r13
movl $0x4, %edx
movq %rax, %rdi
leaq 0x3f31(%rip), %rsi      # 0xa0fd
callq 0x4300
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %r13, %rdi
callq 0x4300
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %esi
movq %r13, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x41e0
jmp 0x6309
movq -0xb8(%rbp), %rax
cmpq %rax, -0xe8(%rbp)
je 0x6322
movl $0x8, %edx
movq 0x7d98(%rip), %rdi      # 0xdfc8
leaq 0x3f58(%rip), %rsi      # 0xa18f
callq 0x4300
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq 0x7d7a(%rip), %rdi      # 0xdfc8
callq 0x4300
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x3dec(%rip), %rsi      # 0xa051
callq 0x4300
movq %r13, %rdi
movl %r15d, %esi
callq 0x4470
movq %rax, %r13
movl $0x2, %edx
movq %rax, %rdi
leaq 0x3e01(%rip), %rsi      # 0xa088
callq 0x4300
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %r13, %rdi
callq 0x4300
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x3ddb(%rip), %rsi      # 0xa089
callq 0x4300
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %esi
movq %r13, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x41e0
jmp 0x6322
cmpq $0x0, -0x40(%rbp)
je 0x6309
movq -0xb0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq -0x88(%rbp), %rdx
leaq -0x68(%rbp), %rcx
movl %r15d, %r8d
movq -0xe0(%rbp), %r9
callq 0x5840
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6322
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x42d0
movq %r14, %rdi
movq 0x7c6c(%rip), %rsi      # 0xdf98
callq 0x4210
leaq -0x408(%rbp), %rdi
callq 0x40f0
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x635f
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x42d0
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x6374
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x42d0
movq -0x300(%rbp), %rax
movq -0x18(%rax), %rcx
addq $-0x18, %rax
incl %r15d
cmpl $0x0, -0x2e0(%rbp,%rcx)
je 0x5db5
jmp 0x6445
cmpq $0x0, -0x40(%rbp)
je 0x6118
cmpq $0x0, -0xa0(%rbp)
je 0x6118
movq -0xb0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
leaq -0x88(%rbp), %rcx
leaq -0x68(%rbp), %r8
movl %r15d, %r9d
callq 0x4da9
jmp 0x6111
movq 0x7c0d(%rip), %rdi      # 0xdff0
leaq 0x3dae(%rip), %rsi      # 0xa198
movl $0x14, %edx
callq 0x4300
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x7bee(%rip), %rdi      # 0xdff0
callq 0x4300
movq %rax, %rbx
leaq 0x3d9c(%rip), %rsi      # 0xa1ad
movl $0x10, %edx
movq %rax, %rdi
callq 0x4300
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x41e0
leaq -0x300(%rbp), %rdi
callq 0x4090
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x646d
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x42d0
addq $0x468, %rsp            # imm = 0x468
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x64c3
movq %rax, %rbx
movq -0x488(%rbp), %rdi
cmpq %r12, %rdi
je 0x649f
movq -0x478(%rbp), %rsi
incq %rsi
callq 0x42d0
movq -0x300(%rbp), %rdi
cmpq %r15, %rdi
je 0x65ba
movq -0x2f0(%rbp), %rsi
incq %rsi
callq 0x42d0
jmp 0x65ba
movq %rax, %rbx
jmp 0x65ba
jmp 0x64d3
jmp 0x64f3
jmp 0x64d3
jmp 0x64f3
movq %rax, %rbx
movq -0x300(%rbp), %rdi
cmpq %r15, %rdi
je 0x64f6
movq -0x2f0(%rbp), %rsi
incq %rsi
callq 0x42d0
jmp 0x64f6
movq %rax, %rbx
movq %rbx, %rdi
callq 0x44a0
movq %rax, %rbx
jmp 0x6535
movq %rax, %rbx
jmp 0x65ae
movq %rax, %rbx
jmp 0x6572
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x6535
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x42d0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6553
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x42d0
jmp 0x6553
movq %rax, %rbx
movq 0x7a3e(%rip), %rsi      # 0xdf98
leaq -0x488(%rbp), %rdi
callq 0x4210
leaq -0x408(%rbp), %rdi
callq 0x40f0
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x6599
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x42d0
jmp 0x6599
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x65ae
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x42d0
leaq -0x300(%rbp), %rdi
callq 0x4090
movq %rbx, %rdi
callq 0x4120
movq 0x7a27(%rip), %rdi      # 0xdff0
leaq 0x3bc8(%rip), %rsi      # 0xa198
movl $0x14, %edx
callq 0x4300
movq 0x7a0f(%rip), %rdi      # 0xdff0
leaq -0x88(%rbp), %rsi
callq 0x6d1e
movq %rax, %rbx
leaq 0x3bb6(%rip), %rsi      # 0xa1ad
movl $0x10, %edx
movq %rax, %rdi
callq 0x4300
movq %rbx, %rdi
callq 0x4160
callq 0x4430
jmp 0x6451
movq %rax, %rbx
jmp 0x6623
movq %rax, %rbx
callq 0x4430
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x64f6
movq -0x78(%rbp), %rsi
jmp 0x64e9
movq %rax, %rdi
callq 0x6d10