// File: /workspace/github_cpp_makefile_star2_O1/EDDRSoftware[P]libdefsEval/main.cpp
// Function: parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, boost::filesystem::path const&, boost::filesystem::path*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
bool parse(const string &varIn, const path &pathIn, path *pathOut,
           const string &line = string(), int lineNum = 0)
{
    bool retVal = true;
    wordexp_t par;
    memset(&par, 0, sizeof(par));

    wordexp(varIn.c_str(), &par, WRDE_SHOWERR | WRDE_UNDEF);

    char **wp = par.we_wordv;

    if(par.we_wordc==0){
        if(lineNum==0) {
            cerr << "INVALID FILE: " << varIn << endl;
        } else {
            cerr << "ERROR LINE: " << pathIn.string() << ":" << lineNum << " => " << line << endl;
        }

        retVal = false;
    }

    for(size_t i = 0; i<par.we_wordc; ++i) {
        path current = pathIn;

        // check for comment at end of a line
        if (*(wp[i]) == '#') {
            break;
        }

        if(!is_directory(current)) {
            current = pathIn.parent_path();
        }

        if(fullPath(wp[i], current, pathOut)) {

            if(lineNum==0) {
                cerr << "INVALID FILE: " << varIn << endl;
            } else {
                cerr << "INVALID LINE: " << pathIn.string() << ":" << lineNum << " => " << line << endl;
            }

            retVal = false;
            break;
        }
    }

    wordfree(&par);
    return retVal;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %r8d, %r13d
movq %rcx, -0x40(%rbp)
movq %rdx, -0x70(%rbp)
movq %rsi, %r12
xorps %xmm0, %xmm0
leaq -0xb0(%rbp), %r14
movaps %xmm0, (%r14)
movq $0x0, 0x10(%r14)
movq %rdi, -0x38(%rbp)
movq (%rdi), %rdi
movq %r14, %rsi
movl $0x30, %edx
callq 0x4440
movq 0x8(%r14), %rax
movq %rax, -0x48(%rbp)
movb $0x1, %r15b
cmpq $0x0, (%r14)
jne 0x4ac7
movq 0x95e6(%rip), %r14      # 0xdff0
testl %r13d, %r13d
je 0x4a73
leaq 0x564a(%rip), %rsi      # 0xa060
movl $0xc, %edx
movq %r14, %rdi
callq 0x4300
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r14, %rdi
callq 0x4300
movq %rax, %r14
leaq 0x562f(%rip), %rsi      # 0xa06d
movl $0x1, %edx
movq %rax, %rdi
callq 0x4300
movq %r14, %rdi
movl %r13d, %esi
callq 0x4470
movq %rax, %r14
leaq 0x56b9(%rip), %rsi      # 0xa119
movl $0x4, %edx
movq %rax, %rdi
callq 0x4300
movq -0x40(%rbp), %rax
jmp 0x4a8b
leaq 0x55d7(%rip), %rsi      # 0xa051
movl $0xe, %edx
movq %r14, %rdi
callq 0x4300
movq -0x38(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r14, %rdi
callq 0x4300
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x41e0
xorl %r15d, %r15d
cmpq $0x0, -0xb0(%rbp)
je 0x4cb6
movl %r13d, -0x2c(%rbp)
xorl %r14d, %r14d
leaq -0x68(%rbp), %r13
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x75f2
movq -0x48(%rbp), %rax
movq (%rax,%r14,8), %rax
cmpb $0x23, (%rax)
jne 0x4b11
xorl %r13d, %r13d
jmp 0x4c84
leaq -0x90(%rbp), %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x43e0
cmpl $0x3, -0x90(%rbp)
leaq -0x68(%rbp), %r13
je 0x4b68
leaq -0x90(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4500
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4350
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x4b68
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x42d0
movq -0x48(%rbp), %rax
movq (%rax,%r14,8), %rdi
movq %r13, %rsi
movq -0x70(%rbp), %rdx
callq 0x4789
testl %eax, %eax
je 0x4c20
cmpl $0x0, -0x2c(%rbp)
je 0x4c25
movl $0xe, %edx
movq 0x9456(%rip), %rdi      # 0xdff0
leaq 0x54ce(%rip), %rsi      # 0xa06f
callq 0x4300
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq 0x943a(%rip), %rdi      # 0xdff0
callq 0x4300
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
leaq 0x54a0(%rip), %rsi      # 0xa06d
callq 0x4300
movq %r15, %rdi
movl -0x2c(%rbp), %esi
callq 0x4470
movq %rax, %r15
movl $0x4, %edx
movq %rax, %rdi
leaq 0x552a(%rip), %rsi      # 0xa119
callq 0x4300
movq -0x40(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r15, %rdi
callq 0x4300
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x42a0
jmp 0x4c6b
movb $0x1, %r13b
jmp 0x4c84
movl $0xe, %edx
movq 0x93bf(%rip), %rdi      # 0xdff0
leaq 0x5419(%rip), %rsi      # 0xa051
callq 0x4300
movq -0x38(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq 0x93a1(%rip), %rdi      # 0xdff0
callq 0x4300
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x4030
xorl %r15d, %r15d
movq %rax, %rdi
callq 0x41e0
xorl %r13d, %r13d
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x4c9d
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x42d0
testb %r13b, %r13b
je 0x4cb6
incq %r14
cmpq -0xb0(%rbp), %r14
leaq -0x68(%rbp), %r13
jb 0x4ae0
leaq -0xb0(%rbp), %rdi
callq 0x4290
andb $0x1, %r15b
movl %r15d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4cdd
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x4cf9
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x42d0
movq %rbx, %rdi
callq 0x44a0