LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/io/TcpSocketEngine_unix_p.cpp
// Function: BamTools::Internal::TcpSocketEngine::nativeSelect(int, bool) const
int TcpSocketEngine::nativeSelect(int msecs, bool isRead) const {

    // set up FD set
    fd_set fds;
    FD_ZERO(&fds);
    FD_SET(m_socketDescriptor, &fds);

    // setup our timeout
    timeval tv;
    tv.tv_sec  = msecs / 1000;
    tv.tv_usec = (msecs % 1000) * 1000;

    // do 'select'
    if ( isRead )
        return select(m_socketDescriptor + 1, &fds, 0, 0, (msecs < 0 ? 0 : &tv));
    else
        return select(m_socketDescriptor + 1, 0, &fds, 0, (msecs < 0 ? 0 : &tv));
}

// Assembly:
subq $0x98, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl (%rdi), %edi
leal 0x3f(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
movl %eax, %r8d
andl $-0x40, %r8d
movl %edi, %ecx
subl %r8d, %ecx
movl $0x1, %r8d
shlq %cl, %r8
sarl $0x6, %eax
cltq
orq %r8, (%rsp,%rax,8)
movslq %esi, %rax
imulq $0x10624dd3, %rax, %rcx # imm = 0x10624DD3
movq %rcx, %rsi
shrq $0x3f, %rsi
sarq $0x26, %rcx
addl %esi, %ecx
movslq %ecx, %rcx
leaq 0x88(%rsp), %rsi
movq %rcx, (%rsi)
imull $0x3e8, %ecx, %ecx      # imm = 0x3E8
movl %eax, %r8d
subl %ecx, %r8d
imull $0x3e8, %r8d, %ecx      # imm = 0x3E8
movslq %ecx, %rcx
movq %rcx, 0x8(%rsi)
incl %edi
xorl %r8d, %r8d
testl %eax, %eax
cmovnsq %rsi, %r8
testl %edx, %edx
je 0x50ed2
movq %rsp, %rsi
xorl %edx, %edx
jmp 0x50ed7
movq %rsp, %rdx
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x27580
addq $0x98, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamFormatParser_p.cpp
// Function: BamTools::Internal::SamFormatParser::Parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void SamFormatParser::Parse(const string& headerText) {

    // clear header's prior contents
    m_header.Clear();

    // empty header is OK, but skip processing
    if ( headerText.empty() )
        return;

    // other wise parse SAM lines
    istringstream headerStream(headerText);
    string headerLine("");
    while ( getline(headerStream, headerLine) )
         ParseSamLine(headerLine);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x29180
cmpq $0x0, 0x8(%r15)
je 0x50fad
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movl $0x8, %edx
callq 0x28950
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4f4c(%rip), %rdx      # 0x55e8f
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x26750
leaq 0x8(%rsp), %r15
movq 0x28(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x275a0
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x28eb0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x50f94
movq %rbx, %rdi
movq %r15, %rsi
callq 0x27ad0
jmp 0x50f55
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x50fa3
callq 0x27560
leaq 0x28(%rsp), %rdi
callq 0x268f0
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x50fd3
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x50fd3
callq 0x27560
leaq 0x28(%rsp), %rdi
callq 0x268f0
movq %rbx, %rdi
callq 0x28c20
movq %rax, %rdi
callq 0x2f0bd
nop
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamFormatParser_p.cpp
// Function: BamTools::Internal::SamFormatParser::ParseSamLine(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void SamFormatParser::ParseSamLine(const string& line) {

    // skip if line is not long enough to contain true values
    if ( line.length() < 5 ) return;

    // determine token at beginning of line
    const string firstToken = line.substr(0,3);
    const string restOfLine = line.substr(4);
    if      ( firstToken == Constants::SAM_HD_BEGIN_TOKEN) ParseHDLine(restOfLine);
    else if ( firstToken == Constants::SAM_SQ_BEGIN_TOKEN) ParseSQLine(restOfLine);
    else if ( firstToken == Constants::SAM_RG_BEGIN_TOKEN) ParseRGLine(restOfLine);
    else if ( firstToken == Constants::SAM_PG_BEGIN_TOKEN) ParsePGLine(restOfLine);
    else if ( firstToken == Constants::SAM_CO_BEGIN_TOKEN) ParseCOLine(restOfLine);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
cmpq $0x5, 0x8(%rsi)
jb 0x5117b
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
movl $0x3, %ecx
xorl %edx, %edx
callq 0x277f0
leaq 0x28(%rsp), %rdi
movl $0x4, %edx
movq %r14, %rsi
movq $-0x1, %rcx
callq 0x277f0
movq 0x10(%rsp), %r14
cmpq 0x1c99c(%rip), %r14     # 0x6d9d8
jne 0x51063
testq %r14, %r14
je 0x5111b
movq 0x1c982(%rip), %rsi     # 0x6d9d0
movq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x277e0
testl %eax, %eax
je 0x5111b
cmpq 0x1c9ee(%rip), %r14     # 0x6da58
jne 0x51091
testq %r14, %r14
je 0x5112a
movq 0x1c9d4(%rip), %rsi     # 0x6da50
movq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x277e0
testl %eax, %eax
je 0x5112a
cmpq 0x1caa0(%rip), %r14     # 0x6db38
jne 0x510bb
testq %r14, %r14
je 0x51139
movq 0x1ca86(%rip), %rsi     # 0x6db30
movq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x277e0
testl %eax, %eax
je 0x51139
cmpq 0x1cc16(%rip), %r14     # 0x6dcd8
jne 0x510e1
testq %r14, %r14
je 0x51148
movq 0x1cc00(%rip), %rsi     # 0x6dcd0
movq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x277e0
testl %eax, %eax
je 0x51148
cmpq 0x1ccb0(%rip), %r14     # 0x6dd98
jne 0x51155
testq %r14, %r14
je 0x51107
movq 0x1cc9a(%rip), %rsi     # 0x6dd90
movq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x277e0
testl %eax, %eax
jne 0x51155
movl $0x120, %edi            # imm = 0x120
addq (%rbx), %rdi
leaq 0x28(%rsp), %rsi
callq 0x26ab0
jmp 0x51155
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x26ce0
jmp 0x51155
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x28da0
jmp 0x51155
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x264a0
jmp 0x51155
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x26cf0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x51168
callq 0x27560
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5117b
callq 0x27560
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5119e
callq 0x27560
jmp 0x5119e
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x511b1
callq 0x27560
movq %rbx, %rdi
callq 0x28c20
nop
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamFormatParser_p.cpp
// Function: BamTools::Internal::SamFormatParser::Split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
const vector<string> SamFormatParser::Split(const string& line, const char delim) {
    vector<string> tokens;
    stringstream lineStream(line);
    string token;
    while ( getline(lineStream, token, delim) )
        tokens.push_back(token);
    return tokens;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movl %ecx, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x28(%rsp), %rdi
movq %rdx, %rsi
movl $0x18, %edx
callq 0x28750
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movsbl %bpl, %ebp
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x28eb0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5237a
movq %rbx, %rdi
movq %r15, %rsi
callq 0x26ab0
jmp 0x52352
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x52389
callq 0x27560
leaq 0x28(%rsp), %rdi
callq 0x270d0
movq %rbx, %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x523c7
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x523bd
callq 0x27560
leaq 0x28(%rsp), %rdi
callq 0x270d0
movq %rbx, %rdi
callq 0x270a0
movq %r14, %rdi
callq 0x28c20
movq %rax, %rdi
callq 0x2f0bd
nop
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamFormatPrinter_p.cpp
// Function: BamTools::Internal::SamFormatPrinter::ToString[abi:cxx11]() const
const string SamFormatPrinter::ToString(void) const {

    // clear out stream
    stringstream out("");

    // generate formatted header text
    PrintHD(out);
    PrintSQ(out);
    PrintRG(out);
    PrintPG(out);
    PrintCO(out);

    // return result
    return out.str();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x382f(%rip), %rdx      # 0x55e8f
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x26750
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x18, %edx
callq 0x28750
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x52690
callq 0x27560
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x28d20
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x291f0
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x28c70
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x29140
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x26b70
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x28740
leaq 0x28(%rsp), %rdi
callq 0x270d0
movq %rbx, %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x5271e
callq 0x27560
jmp 0x5271e
movq %rax, %rbx
jmp 0x5271e
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x270d0
movq %rbx, %rdi
callq 0x28c20
movq %rax, %rdi
callq 0x2f0bd
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamFormatPrinter_p.cpp
// Function: BamTools::Internal::SamFormatPrinter::PrintCO(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>&) const
void SamFormatPrinter::PrintCO(std::stringstream& out) const {

    // iterate over comments
    vector<string>::const_iterator commentIter = m_header.Comments.begin();
    vector<string>::const_iterator commentEnd  = m_header.Comments.end();
    for ( ; commentIter != commentEnd; ++commentIter ) {

        // @CO <Comment>
        out << Constants::SAM_CO_BEGIN_TOKEN
            << Constants::SAM_TAB
            << (*commentIter)
            << endl;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq (%rdi), %rax
movq 0x120(%rax), %r12
movq 0x128(%rax), %r13
cmpq %r13, %r12
je 0x5333e
movq %rsi, %rbx
addq $0x10, %rbx
leaq 0xf(%rsp), %r14
movq 0x1b0a2(%rip), %rsi     # 0x6e378
movq 0x1b0a3(%rip), %rdx     # 0x6e380
movq %rbx, %rdi
callq 0x27a70
movb $0x9, 0xf(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x27a70
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %rax, %rdi
callq 0x27a70
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x275a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x260a0
movq %rax, %rdi
callq 0x26fc0
addq $0x20, %r12
cmpq %r13, %r12
jne 0x532cf
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamHeaderValidator_p.cpp
// Function: BamTools::Internal::SamHeaderValidator::Validate()
bool SamHeaderValidator::Validate(void) {
    bool isValid = true;
    isValid &= ValidateMetadata();
    isValid &= ValidateSequenceDictionary();
    isValid &= ValidateReadGroupDictionary();
    isValid &= ValidateProgramChain();
    return isValid;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x27c20
movl %eax, %ebp
movq %rbx, %rdi
callq 0x26e30
movl %eax, %r14d
andb %bpl, %r14b
movq %rbx, %rdi
callq 0x26090
movl %eax, %ebp
andb %r14b, %bpl
movq %rbx, %rdi
callq 0x28b80
movl %eax, %r14d
movq %rbx, %rdi
callq 0x26720
andb %r14b, %al
andb %bpl, %al
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamHeaderValidator_p.cpp
// Function: BamTools::Internal::SamHeaderValidator::ValidateMetadata()
bool SamHeaderValidator::ValidateMetadata(void) {
    bool isValid = true;
    isValid &= ValidateVersion();
    isValid &= ValidateSortOrder();
    isValid &= ValidateGroupOrder();
    return isValid;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x289e0
movl %eax, %ebp
movq %rbx, %rdi
callq 0x28e60
movl %eax, %r14d
andb %bpl, %r14b
movq %rbx, %rdi
callq 0x27cc0
andb %r14b, %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamHeaderValidator_p.cpp
// Function: BamTools::Internal::SamHeaderValidator::ValidateSequenceDictionary()
bool SamHeaderValidator::ValidateSequenceDictionary(void) {

    bool isValid = true;

    // check for unique sequence names
    isValid &= ContainsUniqueSequenceNames();

    // iterate over sequences
    const SamSequenceDictionary& sequences = m_header.Sequences;
    SamSequenceConstIterator seqIter = sequences.ConstBegin();
    SamSequenceConstIterator seqEnd  = sequences.ConstEnd();
    for ( ; seqIter != seqEnd; ++seqIter ) {
        const SamSequence& seq = (*seqIter);
        isValid &= ValidateSequence(seq);
    }

    // return validation state
    return isValid;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
callq 0x272c0
movl %eax, %ebx
movq (%r14), %r12
addq $0x78, %r12
movq %r12, %rdi
callq 0x284a0
movq %rax, %r15
movq %r12, %rdi
callq 0x28f50
cmpq %rax, %r15
je 0x5388b
movq %rax, %r12
leaq 0x60(%r15), %rsi
movq %r14, %rdi
callq 0x27590
movl %eax, %ebp
leaq 0x40(%r15), %rsi
movq %r14, %rdi
callq 0x274b0
andb %bpl, %al
andb %al, %bl
addq $0xd8, %r15
cmpq %r12, %r15
jne 0x53860
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamHeaderValidator_p.cpp
// Function: BamTools::Internal::SamHeaderValidator::ValidateReadGroupDictionary()
bool SamHeaderValidator::ValidateReadGroupDictionary(void) {

    bool isValid = true;

    // check for unique read group IDs & platform units
    isValid &= ContainsUniqueIDsAndPlatformUnits();

    // iterate over read groups
    const SamReadGroupDictionary& readGroups = m_header.ReadGroups;
    SamReadGroupConstIterator rgIter = readGroups.ConstBegin();
    SamReadGroupConstIterator rgEnd  = readGroups.ConstEnd();
    for ( ; rgIter != rgEnd; ++rgIter ) {
        const SamReadGroup& rg = (*rgIter);
        isValid &= ValidateReadGroup(rg);
    }

    // return validation state
    return isValid;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
callq 0x26600
movl %eax, %ebx
movl $0xc0, %r12d
addq (%r14), %r12
movq %r12, %rdi
callq 0x288a0
movq %rax, %r15
movq %r12, %rdi
callq 0x28d40
cmpq %rax, %r15
je 0x538fa
movq %rax, %r12
leaq 0x40(%r15), %rsi
movq %r14, %rdi
callq 0x26030
movl %eax, %ebp
leaq 0x160(%r15), %rsi
movq %r14, %rdi
callq 0x265f0
andb %bpl, %al
andb %al, %bl
addq $0x198, %r15            # imm = 0x198
cmpq %r12, %r15
jne 0x538cc
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamHeaderValidator_p.cpp
// Function: BamTools::Internal::SamHeaderValidator::ValidateProgramChain()
bool SamHeaderValidator::ValidateProgramChain(void) {
    bool isValid = true;
    isValid &= ContainsUniqueProgramIds();
    isValid &= ValidatePreviousProgramIds();
    return isValid;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x28b80
movl %eax, %ebp
movq %rbx, %rdi
callq 0x26720
andb %bpl, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamHeaderValidator_p.cpp
// Function: BamTools::Internal::SamHeaderValidator::ValidateSortOrder()
bool SamHeaderValidator::ValidateSortOrder(void) {

    const string& sortOrder = m_header.SortOrder;

    // warn if sort order not present
    if ( sortOrder.empty() ) {
        AddWarning("Sort order (SO) missing. Not required, but strongly recommended");
        return true;
    }

    // if sort order is valid keyword
    if ( sortOrder == Constants::SAM_HD_SORTORDER_COORDINATE ||
         sortOrder == Constants::SAM_HD_SORTORDER_QUERYNAME  ||
         sortOrder == Constants::SAM_HD_SORTORDER_UNSORTED
       )
    {
        return true;
    }

    // otherwise
    AddError("Invalid sort order (SO): " + sortOrder);
    return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x28(%r14), %r15
testq %r15, %r15
je 0x53c30
addq $0x20, %r14
cmpq 0x1aded(%rip), %r15     # 0x6e988
jne 0x53bb7
movq 0x1addc(%rip), %rsi     # 0x6e980
movq (%r14), %rdi
movq %r15, %rdx
callq 0x277e0
testl %eax, %eax
je 0x53c68
cmpq 0x1adea(%rip), %r15     # 0x6e9a8
jne 0x53bda
movq 0x1add9(%rip), %rsi     # 0x6e9a0
movq (%r14), %rdi
movq %r15, %rdx
callq 0x277e0
testl %eax, %eax
je 0x53c68
cmpq 0x1ae07(%rip), %r15     # 0x6e9e8
jne 0x53bf9
movq 0x1adf6(%rip), %rsi     # 0x6e9e0
movq (%r14), %rdi
movq %r15, %rdx
callq 0x277e0
testl %eax, %eax
je 0x53c68
leaq 0x396c(%rip), %rsi      # 0x5756c
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0x273f0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x27500
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x53c2c
callq 0x27560
xorl %eax, %eax
jmp 0x53c6a
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x38ec(%rip), %rsi      # 0x5752c
leaq 0x3924(%rip), %rdx      # 0x5756b
movq %rsp, %rdi
callq 0x26750
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x26920
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x53c68
callq 0x27560
movb $0x1, %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x53c93
jmp 0x53c9d
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x53c9d
callq 0x27560
jmp 0x53c9d
movq %rax, %rbx
movq %rbx, %rdi
callq 0x28c20
nop
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamHeaderValidator_p.cpp
// Function: BamTools::Internal::SamHeaderValidator::ValidateGroupOrder()
bool SamHeaderValidator::ValidateGroupOrder(void) {

    const string& groupOrder = m_header.GroupOrder;

    // if no group order, no problem, just return OK
    if ( groupOrder.empty() )
        return true;

    // if group order is valid keyword
    if ( groupOrder == Constants::SAM_HD_GROUPORDER_NONE  ||
         groupOrder == Constants::SAM_HD_GROUPORDER_QUERY ||
         groupOrder == Constants::SAM_HD_GROUPORDER_REFERENCE
       )
    {
        return true;
    }

    // otherwise
    AddError("Invalid group order (GO): " + groupOrder);
    return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq (%rdi), %r15
movq 0x48(%r15), %r12
movb $0x1, %bl
testq %r12, %r12
je 0x53d5e
movq %rdi, %r14
addq $0x40, %r15
cmpq 0x1ad37(%rip), %r12     # 0x6ea08
jne 0x53ce9
movq 0x1ad26(%rip), %rsi     # 0x6ea00
movq (%r15), %rdi
movq %r12, %rdx
callq 0x277e0
testl %eax, %eax
je 0x53d5e
cmpq 0x1ad38(%rip), %r12     # 0x6ea28
jne 0x53d08
movq 0x1ad27(%rip), %rsi     # 0x6ea20
movq (%r15), %rdi
movq %r12, %rdx
callq 0x277e0
testl %eax, %eax
je 0x53d5e
cmpq 0x1ad39(%rip), %r12     # 0x6ea48
jne 0x53d27
movq 0x1ad28(%rip), %rsi     # 0x6ea40
movq (%r15), %rdi
movq %r12, %rdx
callq 0x277e0
testl %eax, %eax
je 0x53d5e
leaq 0x3858(%rip), %rsi      # 0x57586
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x273f0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x27500
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x53d5c
callq 0x27560
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x53d82
callq 0x27560
movq %rbx, %rdi
callq 0x28c20
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamHeaderValidator_p.cpp
// Function: BamTools::Internal::SamHeaderValidator::ValidateSequence(BamTools::SamSequence const&)
bool SamHeaderValidator::ValidateSequence(const SamSequence& seq) {
    bool isValid = true;
    isValid &= CheckNameFormat(seq.Name);
    isValid &= CheckLengthInRange(seq.Length);
    return isValid;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq $0x60, %rsi
callq 0x27590
movl %eax, %ebp
addq $0x40, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x274b0
andb %bpl, %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamHeaderValidator_p.cpp
// Function: BamTools::Internal::SamHeaderValidator::CheckNameFormat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool SamHeaderValidator::CheckNameFormat(const string& name) {

    // invalid if name is empty
    if ( name.empty() ) {
        AddError("Sequence entry (@SQ) is missing SN tag");
        return false;
    }

    // invalid if first character is a reserved char
    const char firstChar = name.at(0);
    if ( firstChar == Constants::SAM_EQUAL || firstChar == Constants::SAM_STAR ) {
        AddError("Invalid sequence name (SN): " + name);
        return false;
    }
    // otherwise OK
    return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x8(%rsi)
je 0x53fc9
movq %rsi, %rdx
movq (%rsi), %rax
movzbl (%rax), %eax
cmpl $0x2a, %eax
setne %cl
cmpl $0x3d, %eax
setne %bpl
andb %cl, %bpl
cmpl $0x3d, %eax
je 0x53f97
cmpl $0x2a, %eax
jne 0x54003
leaq 0x364e(%rip), %rsi      # 0x575ec
movq %rsp, %r14
movq %r14, %rdi
callq 0x273f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x27500
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x54003
callq 0x27560
jmp 0x54003
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x35ec(%rip), %rsi      # 0x575c5
leaq 0x360b(%rip), %rdx      # 0x575eb
movq %rsp, %rdi
callq 0x26750
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x27500
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x54001
callq 0x27560
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
jne 0x54032
jmp 0x54037
movq %rax, %rbx
jmp 0x54037
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x54037
callq 0x27560
movq %rbx, %rdi
callq 0x28c20
nop
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamHeaderValidator_p.cpp
// Function: BamTools::Internal::SamHeaderValidator::CheckLengthInRange(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool SamHeaderValidator::CheckLengthInRange(const string& length) {

    // invalid if empty
    if ( length.empty() ) {
        AddError("Sequence entry (@SQ) is missing LN tag");
        return false;
    }

    // convert string length to numeric
    stringstream lengthStream(length);
    unsigned int sequenceLength;
    lengthStream >> sequenceLength;

    // invalid if length outside accepted range
    if ( sequenceLength < Constants::SAM_SQ_LENGTH_MIN || sequenceLength > Constants::SAM_SQ_LENGTH_MAX ) {
        AddError("Sequence length (LN): " + length + " out of range");
        return false;
    }

    // otherwise OK
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdi, %rbx
cmpq $0x0, 0x8(%rsi)
je 0x5410e
movq %rsi, %r14
leaq 0x50(%rsp), %r15
movq %r15, %rdi
movl $0x18, %edx
callq 0x28750
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
callq 0x28ba0
movl 0xc(%rsp), %eax
decl %eax
cmpl $0x1fffffff, %eax       # imm = 0x1FFFFFFF
setb %bpl
jb 0x54102
leaq 0x359b(%rip), %rsi      # 0x57630
leaq 0x30(%rsp), %rdi
movq %r14, %rdx
callq 0x273f0
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x267c0
leaq 0x357e(%rip), %rsi      # 0x57647
leaq 0x10(%rsp), %rdi
callq 0x290a0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x27500
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x540ef
callq 0x27560
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x54102
callq 0x27560
leaq 0x50(%rsp), %rdi
callq 0x270d0
jmp 0x5414d
leaq 0x60(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x34eb(%rip), %rsi      # 0x57609
leaq 0x350a(%rip), %rdx      # 0x5762f
leaq 0x50(%rsp), %rdi
callq 0x26750
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x27500
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x5414b
callq 0x27560
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5415f
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x54176
callq 0x27560
jmp 0x54176
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x541a9
callq 0x27560
jmp 0x541a9
jmp 0x541a6
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x541b3
callq 0x27560
jmp 0x541b3
movq %rax, %rbx
jmp 0x541b3
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x270d0
movq %rbx, %rdi
callq 0x28c20
movq %rax, %rdi
callq 0x2f0bd
nop
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamHeaderValidator_p.cpp
// Function: BamTools::Internal::SamHeaderValidator::ValidateReadGroup(BamTools::SamReadGroup const&)
bool SamHeaderValidator::ValidateReadGroup(const SamReadGroup& rg) {
    bool isValid = true;
    isValid &= CheckReadGroupID(rg.ID);
    isValid &= CheckSequencingTechnology(rg.SequencingTechnology);
    return isValid;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq $0x40, %rsi
callq 0x26030
movl %eax, %ebp
addq $0x160, %rbx            # imm = 0x160
movq %r14, %rdi
movq %rbx, %rsi
callq 0x265f0
andb %bpl, %al
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamHeaderValidator_p.cpp
// Function: BamTools::Internal::SamHeaderValidator::CheckSequencingTechnology(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool SamHeaderValidator::CheckSequencingTechnology(const string& technology) {

    // if no technology provided, no problem, just return OK
    if ( technology.empty() )
        return true;

    // if technology is valid keyword
    if ( caseInsensitiveCompare(technology, Constants::SAM_RG_SEQTECHNOLOGY_CAPILLARY)  ||
         caseInsensitiveCompare(technology, Constants::SAM_RG_SEQTECHNOLOGY_HELICOS)    ||
         caseInsensitiveCompare(technology, Constants::SAM_RG_SEQTECHNOLOGY_ILLUMINA)   ||
         caseInsensitiveCompare(technology, Constants::SAM_RG_SEQTECHNOLOGY_IONTORRENT) ||
         caseInsensitiveCompare(technology, Constants::SAM_RG_SEQTECHNOLOGY_LS454)      ||
         caseInsensitiveCompare(technology, Constants::SAM_RG_SEQTECHNOLOGY_PACBIO)     ||
         caseInsensitiveCompare(technology, Constants::SAM_RG_SEQTECHNOLOGY_SOLID)
       )
    {
        return true;
    }

    // otherwise
    AddError("Invalid read group sequencing platform (PL): " + technology);
    return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movb $0x1, %bl
cmpq $0x0, 0x8(%rsi)
je 0x545c2
movq %rsi, %r15
movq %rdi, %r14
leaq 0x1a55d(%rip), %rsi     # 0x6ea60
movq %r15, %rdi
callq 0x545ec
testb %al, %al
jne 0x545c2
leaq 0x1a566(%rip), %rsi     # 0x6ea80
movq %r15, %rdi
callq 0x545ec
testb %al, %al
jne 0x545c2
leaq 0x1a56f(%rip), %rsi     # 0x6eaa0
movq %r15, %rdi
callq 0x545ec
testb %al, %al
jne 0x545c2
leaq 0x1a578(%rip), %rsi     # 0x6eac0
movq %r15, %rdi
callq 0x545ec
testb %al, %al
jne 0x545c2
leaq 0x1a585(%rip), %rsi     # 0x6eae0
movq %r15, %rdi
callq 0x545ec
testb %al, %al
jne 0x545c2
leaq 0x1a592(%rip), %rsi     # 0x6eb00
movq %r15, %rdi
callq 0x545ec
testb %al, %al
jne 0x545c2
leaq 0x1a59f(%rip), %rsi     # 0x6eb20
movq %r15, %rdi
callq 0x545ec
testb %al, %al
jne 0x545c2
leaq 0x3114(%rip), %rsi      # 0x576a8
movq %rsp, %rbx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x273f0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x27500
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x545c0
callq 0x27560
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x545e4
callq 0x27560
movq %rbx, %rdi
callq 0x28c20
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamHeaderValidator_p.cpp
// Function: BamTools::Internal::SamHeaderValidator::ValidatePreviousProgramIds()
bool SamHeaderValidator::ValidatePreviousProgramIds(void) {

    bool isValid = true;

    // iterate over program records
    const SamProgramChain& programs = m_header.Programs;
    SamProgramConstIterator pgIter = programs.ConstBegin();
    SamProgramConstIterator pgEnd  = programs.ConstEnd();
    for ( ; pgIter != pgEnd; ++pgIter ) {
        const SamProgram& pg = (*pgIter);

        // ignore record for validation if PreviousProgramID is empty
        const string& ppId = pg.PreviousProgramID;
        if ( ppId.empty() )
            continue;

        // see if program "chain" contains an entry for ppId
        if ( !programs.Contains(ppId) ) {
            AddError("PreviousProgramID (PP): " + ppId + " is not a known ID");
            isValid = false;
        }
    }

    // return validation state
    return isValid;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movl $0x108, %r14d           # imm = 0x108
addq (%rdi), %r14
movq %r14, %rdi
callq 0x26a10
movq %rax, %r15
movq %r14, %rdi
callq 0x291b0
cmpq %rax, %r15
je 0x54954
movq %rax, %r12
addq $0x60, %r15
movb $0x1, %bpl
leaq 0x28(%rsp), %r13
cmpq $0x0, 0x8(%r15)
je 0x5493b
movq %r14, %rdi
movq %r15, %rsi
callq 0x28780
testb %al, %al
jne 0x5493b
leaq 0x8(%rsp), %rdi
leaq 0x2e13(%rip), %rsi      # 0x576e8
movq %r15, %rdx
callq 0x273f0
leaq 0x38(%rsp), %rbp
movq %rbp, 0x28(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x267c0
movq %r13, %rdi
leaq 0x2dfb(%rip), %rsi      # 0x57701
callq 0x290a0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x27500
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x54925
callq 0x27560
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x54939
callq 0x27560
xorl %ebp, %ebp
leaq 0xd8(%r15), %rax
addq $0x78, %r15
cmpq %r12, %r15
movq %rax, %r15
jne 0x548af
jmp 0x54957
movb $0x1, %bpl
andb $0x1, %bpl
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x54985
jmp 0x54973
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x54985
callq 0x27560
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x54999
callq 0x27560
movq %rbx, %rdi
callq 0x28c20
nop
// File: /workspace/github_cpp_makefile_star2_O1/iu-vail[P]iprimal/Assignment.cpp
// Function: Assignment::RandomGenerate(std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&, unsigned int, unsigned int, int, unsigned int)
void
Assignment::RandomGenerate(mat& matrix, uint nrows, uint ncols, int Max, uint _seed){
 
  //accept new seed for random generator
  if(_seed != SEED)
    srand(_seed);
  else 
    srand(seed);
  
  matrix.clear();
  matrix.resize(nrows);
  for(uint i=0; i<nrows; i++)
    matrix[i].resize(ncols);

  //randomly generate
  for(uint i=0; i<nrows; i++)
    for(uint j=0; j<ncols; j++){
      int rdm=rand()%Max-1; 
      if(rdm<0) rdm = 0;
      matrix[i][j] = rdm;
  }      

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebx
movl %ecx, 0xc(%rsp)
movl %edx, %r12d
movq %rsi, %r14
testl %r9d, %r9d
jne 0x36df
movl (%rdi), %r9d
movl %r9d, %edi
callq 0x3220
movq (%r14), %rsi
movq %r14, %rdi
callq 0x3f5a
movl %r12d, %esi
movq %r14, %rdi
movq %rsi, 0x10(%rsp)
callq 0x3eec
testl %r12d, %r12d
je 0x378d
movl 0xc(%rsp), %r12d
movq 0x10(%rsp), %rax
leaq (,%rax,8), %rax
leaq (%rax,%rax,2), %r15
xorl %r13d, %r13d
movq (%r14), %rdi
addq %r13, %rdi
movq %r12, %rsi
callq 0x3f28
addq $0x18, %r13
cmpq %r13, %r15
jne 0x3724
xorl %r13d, %r13d
cmpl $0x0, 0xc(%rsp)
je 0x3783
leaq (,%r13,2), %rbp
addq %r13, %rbp
xorl %r15d, %r15d
callq 0x30a0
cltd
idivl %ebx
cmpl $0x2, %edx
jge 0x3765
movl $0x1, %edx
decl %edx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
movq (%r14), %rax
movq (%rax,%rbp,8), %rax
movsd %xmm0, (%rax,%r15,8)
incq %r15
cmpq %r15, %r12
jne 0x3753
incq %r13
cmpq 0x10(%rsp), %r13
jne 0x373e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/iu-vail[P]iprimal/Assignment.cpp
// Function: Assignment::RandomGenerate(unsigned int, unsigned int, int, unsigned int)
void
Assignment::RandomGenerate(uint nrows, uint ncols, int Max, uint _seed){

  RandomGenerate(matrix, nrows, ncols, Max, _seed);
  //update data members
  row_size = nrows;
  col_size = ncols;

}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %r8d, %r9d
movl %ecx, %r8d
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x10(%rdi), %rsi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x36bc
movl %ebp, 0x4(%r14)
movl %ebx, 0x8(%r14)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/iu-vail[P]iprimal/Assignment.cpp
// Function: Assignment::ImportMatrix(std::basic_ifstream<char, std::char_traits<char>>&)
void
Assignment::ImportMatrix(ifstream& input_file){

  ImportMatrix(input_file, matrix);
  //update class data members
  row_size = matrix.size();
  col_size = matrix[0].size();

}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rdx
callq 0x37c8
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ecx # imm = 0xAAAAAAAB
movl %ecx, 0x4(%rbx)
movq 0x8(%rax), %rcx
subq (%rax), %rcx
shrq $0x3, %rcx
movl %ecx, 0x8(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/iu-vail[P]iprimal/iPrimal.cpp
// Function: Primal::RandSolution()
void
Primal::RandSolution(void){

  // assign the diagnol as the initial feasible solution
  assignment.resize(row_size);
  for(uint i=0; i<row_size; i++)
    assignment[i]=i;

  // dual row vars are 0s
  dual_row_vars.resize(row_size, 0);

  // dual col vars are the values on the diagnol
  dual_col_vars.resize(row_size);
  for(uint i=0; i<col_size; i++)
    dual_col_vars[i]=orig_matrix[i][i];

  // update the oprt matrix
  for(uint i=0; i<row_size; i++){
    for(uint j=0; j<col_size; j++){
      oprt_matrix[i][j] -= dual_col_vars[j];
    }
  }

  _cout("NOTE: the index of row/col is from 0, NOT 1 !"<<endl);
  _cout("Update the matrix: "<<endl);
  DisplayMatrix(oprt_matrix);

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xf8(%rdi), %r14
movl (%rdi), %esi
movq %r14, %rdi
callq 0x6c22
movl (%rbx), %eax
testl %eax, %eax
je 0x4514
movq (%r14), %rcx
xorl %edx, %edx
movl %edx, (%rcx,%rdx,4)
incq %rdx
movl (%rbx), %eax
cmpq %rax, %rdx
jb 0x4507
leaq 0x8(%rbx), %rdi
movl %eax, %esi
movq %rsp, %rdx
movq $0x0, (%rdx)
callq 0x6c54
leaq 0x20(%rbx), %rdi
movl (%rbx), %esi
callq 0x3f28
movl 0x4(%rbx), %eax
testq %rax, %rax
je 0x4562
movq 0x20(%rbx), %rcx
movq 0xb0(%rbx), %rdx
xorl %esi, %esi
movq (%rdx), %rdi
movsd (%rdi,%rsi,8), %xmm0
movsd %xmm0, (%rcx,%rsi,8)
incq %rsi
addq $0x18, %rdx
cmpq %rsi, %rax
jne 0x4549
movl (%rbx), %ecx
testq %rcx, %rcx
je 0x45a8
movq 0x20(%rbx), %rdx
movq 0xc8(%rbx), %rsi
xorl %edi, %edi
testq %rax, %rax
je 0x45a0
leaq (%rdi,%rdi,2), %r8
movq (%rsi,%r8,8), %r8
xorl %r9d, %r9d
movsd (%r8,%r9,8), %xmm0
subsd (%rdx,%r9,8), %xmm0
movsd %xmm0, (%r8,%r9,8)
incq %r9
cmpq %r9, %rax
jne 0x4586
incq %rdi
cmpq %rcx, %rdi
jne 0x4576
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/iu-vail[P]iprimal/iPrimal.cpp
// Function: Primal::DeleteTree(_tree_node*)
uint
Primal::DeleteTree(tree_node* _root){

  uint num = 0;
  queue<tree_node*> bfs;
  bfs.push(_root);
  while(!bfs.empty()){
    tree_node* p_n = bfs.front();
    bfs.pop(); 
    num++;
    tree_node* p_sibling;
    if(p_n->child != NULL){
      bfs.push(p_n->child); 
      p_sibling = p_n->child;
      while(p_sibling->next_sibling != NULL){
        p_sibling = p_sibling->next_sibling;
        bfs.push(p_sibling);
      }
    }
    delete p_n;
  }

  return num;

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, 0x8(%rsp)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movaps %xmm0, 0x40(%rbx)
movaps %xmm0, 0x30(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x801a
movq 0x30(%rbx), %rax
movq 0x40(%rbx), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x6ad4
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
addq $0x8, 0x40(%rsp)
jmp 0x6ae3
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x8190
movq 0x20(%rsp), %rax
cmpq %rax, 0x40(%rsp)
je 0x6bed
xorl %ebx, %ebx
leaq 0x10(%rsp), %r14
movq %rsp, %r15
movq (%rax), %r12
movq 0x30(%rsp), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x6b14
addq $0x8, %rax
jmp 0x6b46
movq 0x28(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x3260
movq 0x38(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x38(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq %rax, 0x20(%rsp)
movq 0x10(%r12), %rax
testq %rax, %rax
je 0x6bc7
leaq 0x10(%r12), %r13
movq 0x40(%rsp), %rcx
movq 0x50(%rsp), %rdx
addq $-0x8, %rdx
cmpq %rdx, %rcx
je 0x6b78
movq %rax, (%rcx)
addq $0x8, 0x40(%rsp)
jmp 0x6b83
movq %r14, %rdi
movq %r13, %rsi
callq 0x8190
movq (%r13), %rax
movq %rax, (%rsp)
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x6bc7
movq %rax, (%rsp)
movq 0x40(%rsp), %rcx
movq 0x50(%rsp), %rdx
addq $-0x8, %rdx
cmpq %rdx, %rcx
je 0x6bb6
movq %rax, (%rcx)
addq $0x8, 0x40(%rsp)
jmp 0x6bc1
movq %r14, %rdi
movq %r15, %rsi
callq 0x8190
movq (%rsp), %rax
jmp 0x6b8b
testq %r12, %r12
je 0x6bd9
movl $0x28, %esi
movq %r12, %rdi
callq 0x3260
incl %ebx
movq 0x20(%rsp), %rax
cmpq %rax, 0x40(%rsp)
jne 0x6afd
jmp 0x6bef
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
callq 0x73d2
movl %ebx, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x6c0d
jmp 0x6c0d
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x73d2
movq %rbx, %rdi
callq 0x33d0
// File: /workspace/github_cpp_makefile_star2_O1/iu-vail[P]iprimal/iPrimal.cpp
// Function: Primal::GreedyApprox1(std::vector<unsigned int, std::allocator<unsigned int>>&)
void
Primal::GreedyApprox1(vector<uint>& _asgn){

  _asgn.clear();
  _asgn.resize(row_size);
  set<uint> mem_rows;
  //column-wise searching
  for(uint j=0; j<col_size; j++){
    double min_val = std::numeric_limits<double>::infinity(); 
    uint min_row = row_size;
    for(uint i=0; i<row_size; i++){
      if(orig_matrix[i][j] < min_val &&
      		mem_rows.find(i) == mem_rows.end()){
	min_val = orig_matrix[i][j];
	min_row = i;	
      }
    }
    _asgn[min_row] = j;
    mem_rows.insert(min_row);
  }

  //double check if the assignment is meaningful
  set<uint> test(_asgn.begin(), _asgn.end());
  assert(test.size()==row_size);
  _cout("Approximate assignment: "<<endl);
  DisplayVec<uint>(_asgn);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x470d
movq %rax, 0x8(%r14)
movl (%rbx), %esi
movq %r14, %rdi
callq 0x6c22
leaq 0x40(%rsp), %r13
movl $0x0, (%r13)
xorl %eax, %eax
movq %rax, 0x8(%r13)
movq %r13, 0x10(%r13)
movq %r13, 0x18(%r13)
movq %rax, 0x20(%r13)
cmpl $0x0, 0x4(%rbx)
je 0x47f9
xorl %ebp, %ebp
leaq 0x38(%rsp), %r15
leaq 0x8(%rsp), %r12
movl (%rbx), %eax
movl %eax, 0x8(%rsp)
testq %rax, %rax
je 0x47d5
movq 0xb0(%rbx), %rcx
movq 0x48(%rsp), %rdx
xorl %esi, %esi
movsd 0x6943(%rip), %xmm0     # 0xb0b0
leaq (%rsi,%rsi,2), %rdi
movq (%rcx,%rdi,8), %rdi
movsd (%rdi,%rbp,8), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x47cd
movq %r13, %rdi
testq %rdx, %rdx
je 0x47aa
movq %rdx, %r8
movq %r13, %rdi
movl 0x20(%r8), %r9d
xorl %r10d, %r10d
cmpq %r9, %rsi
cmovbeq %r8, %rdi
seta %r10b
movq 0x10(%r8,%r10,8), %r8
testq %r8, %r8
jne 0x478e
movq %r13, %r8
cmpq %r13, %rdi
je 0x47c0
movl 0x20(%rdi), %r8d
cmpq %r8, %rsi
cmovbq %r13, %rdi
movq %rdi, %r8
cmpq %r13, %r8
jne 0x47cd
movl %esi, 0x8(%rsp)
movapd %xmm1, %xmm0
incq %rsi
cmpq %rax, %rsi
jne 0x476d
movl 0x8(%rsp), %eax
movq (%r14), %rcx
movl %ebp, (%rcx,%rax,4)
movq %r15, %rdi
movq %r12, %rsi
callq 0x7760
incq %rbp
movl 0x4(%rbx), %eax
cmpq %rax, %rbp
jb 0x474c
movq (%r14), %rsi
movq 0x8(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x6d5e
movl (%rbx), %eax
cmpq %rax, 0x30(%rsp)
jne 0x4836
leaq 0x8(%rsp), %rdi
callq 0x71ba
leaq 0x38(%rsp), %rdi
callq 0x71ba
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x68f6(%rip), %rdi      # 0xb133
leaq 0x68b3(%rip), %rsi      # 0xb0f7
leaq 0x68fe(%rip), %rcx      # 0xb149
movl $0x67, %edx
callq 0x3150
jmp 0x4857
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x71ba
movq %rbx, %rdi
callq 0x33d0
// File: /workspace/github_cpp_makefile_star2_O1/iu-vail[P]iprimal/iPrimal.cpp
// Function: Primal::InitStage()
void
Primal::InitStage(void){

  deltas.clear();
  deltas.resize(col_size, 0);
  ClearExploited();
  ClearSwapLoop();
  InitAsgnPtrs();
  InitSibPtrs();
  //init min-heaps;
  min_heaps.clear();  
  min_heaps.resize(row_size);

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x38, %rdi
movq 0x38(%rbx), %rax
cmpq %rax, 0x40(%rbx)
je 0x4c27
movq %rax, 0x40(%rbx)
movl 0x4(%rbx), %esi
movq %rsp, %rdx
movq $0x0, (%rdx)
callq 0x6c54
leaq 0x50(%rbx), %rdi
callq 0x720a
leaq 0x80(%rbx), %rdi
callq 0x720a
leaq 0x110(%rbx), %rdi
callq 0x709c
movq %rbx, %rdi
callq 0x6ef8
movq %rbx, %rdi
callq 0x6f4e
leaq 0xe0(%rbx), %r14
movq 0xe0(%rbx), %rsi
movq %r14, %rdi
callq 0x7d06
movl (%rbx), %esi
movq %r14, %rdi
callq 0x6fa4
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/iu-vail[P]iprimal/iPrimal.cpp
// Function: Primal::Preprocess()
void
Primal::Preprocess(void){

  //update oprt_matrix, already done in SwapTask of previous stage
  //UpdateReducedCostMatrix(dual_row_vars, dual_col_vars);  

  min_heaps.clear();
  min_heaps.resize(row_size);

  for(uint i=0; i<row_size; i++)
    for(uint j=0; j<col_size; j++){
      if(oprt_matrix[i][j]>=0 && j!=assignment[i]){
	pair<uint, double> p(j, oprt_matrix[i][j]);
        min_heaps[i].push(p);
      }
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0xe0(%rdi), %r14
movq 0xe0(%rdi), %rsi
movq %r14, %rdi
callq 0x7d06
movl (%rbx), %esi
movq %r14, %rdi
callq 0x6fa4
cmpl $0x0, (%rbx)
je 0x4d4f
xorl %r12d, %r12d
xorpd %xmm1, %xmm1
cmpl $0x0, 0x4(%rbx)
je 0x4d45
leaq (%r12,%r12,2), %r13
movq %r12, %rbp
shlq $0x5, %rbp
xorl %r15d, %r15d
movq 0xc8(%rbx), %rax
movq (%rax,%r13,8), %rcx
movsd (%rcx,%r15,8), %xmm0
ucomisd %xmm1, %xmm0
jb 0x4d3a
movq 0xf8(%rbx), %rcx
movl (%rcx,%r12,4), %ecx
cmpq %rcx, %r15
je 0x4d3a
leaq (%rax,%r13,8), %rax
movq (%rax), %rax
movl %r15d, 0x8(%rsp)
movsd (%rax,%r15,8), %xmm0
movsd %xmm0, 0x10(%rsp)
movq (%r14), %rdi
addq %rbp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x6fd4
xorpd %xmm1, %xmm1
incq %r15
movl 0x4(%rbx), %eax
cmpq %rax, %r15
jb 0x4ce7
incq %r12
movl (%rbx), %eax
cmpq %rax, %r12
jb 0x4cd3
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/iu-vail[P]iprimal/iPrimal.cpp
// Function: Primal::NextStartEntry() const
cell
Primal::NextStartEntry(void) const{
  
  double min_v = 0;
  int min_i, min_j;
  min_i = min_j = -1;
  for(uint i=0; i<row_size; i++)
    for(uint j=0; j<col_size; j++)
      if(oprt_matrix[i][j] < min_v){
	min_v = oprt_matrix[i][j];
	min_i = i;
	min_j = j;
      }

  cell _c;
  _c.row_idx = min_i;
  _c.col_idx = min_j;

  return _c; 
}

// Assembly:
movl (%rdi), %eax
testq %rax, %rax
je 0x4dce
movl 0x4(%rdi), %edx
movq 0xc8(%rdi), %rsi
xorpd %xmm0, %xmm0
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
testq %rdx, %rdx
je 0x4db4
leaq (%r8,%r8,2), %r9
movq (%rsi,%r9,8), %r9
xorl %r10d, %r10d
movsd (%r9,%r10,8), %xmm1
ucomisd %xmm1, %xmm0
cmoval %r8d, %edi
cmoval %r10d, %ecx
minsd %xmm0, %xmm1
incq %r10
movapd %xmm1, %xmm0
cmpq %r10, %rdx
jne 0x4d90
jmp 0x4db8
movapd %xmm0, %xmm1
incq %r8
movapd %xmm1, %xmm0
cmpq %rax, %r8
jne 0x4d80
shlq $0x20, %rcx
movl %edi, %eax
orq %rcx, %rax
retq
movq $-0x1, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/iu-vail[P]iprimal/iPrimal.cpp
// Function: Primal::NextStartEntry(unsigned int) const
cell
Primal::NextStartEntry(uint _col_id) const {
  
  double min_v = 0;
  int min_i, min_j;
  min_i = min_j = -1;
  for(uint i=0; i<row_size; i++)
    if(oprt_matrix[i][_col_id] < min_v){
	min_v = oprt_matrix[i][_col_id];
	min_i = i;
	min_j = _col_id;
      }

  cell _c;
  _c.row_idx = min_i;
  _c.col_idx = min_j;
  _cout("Column ["<<_col_id<<"]: starting from ("<<_c.row_idx<<", "<<_c.col_idx<<") with reduced cost: "<<min_v<<endl);

  return _c; 
}

// Assembly:
movl (%rdi), %eax
testq %rax, %rax
je 0x4e2b
movq 0xc8(%rdi), %rdx
movl %esi, %edi
xorpd %xmm0, %xmm0
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
movq (%rdx), %r10
movsd (%r10,%rdi,8), %xmm1
ucomisd %xmm1, %xmm0
cmoval %r8d, %r9d
minsd %xmm0, %xmm1
cmoval %esi, %ecx
incq %r8
addq $0x18, %rdx
movapd %xmm1, %xmm0
cmpq %r8, %rax
jne 0x4df8
shlq $0x20, %rcx
movl %r9d, %eax
orq %rcx, %rax
retq
movq $-0x1, %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/iu-vail[P]iprimal/iPrimal.cpp
// Function: Primal::DoubleCheck()
void
Primal::DoubleCheck(void){

  for(uint i=0; i<row_size; i++)
    for(uint j=0; j<col_size; j++)
      if(oprt_matrix[i][j] < 0 && 
		fabs(oprt_matrix[i][j]) > DOUBLE_EPSILON){
        throw EXCEPTION_WRONG;
      }

}

// Assembly:
pushq %rax
movl (%rdi), %eax
testq %rax, %rax
je 0x61f6
movl 0x4(%rdi), %ecx
movq 0xc8(%rdi), %rdx
xorl %esi, %esi
xorpd %xmm0, %xmm0
movapd 0x4f18(%rip), %xmm1     # 0xb0d0
movsd 0x4ef8(%rip), %xmm2     # 0xb0b8
testq %rcx, %rcx
je 0x61ee
leaq (%rsi,%rsi,2), %rdi
movq (%rdx,%rdi,8), %rdi
xorl %r8d, %r8d
movsd (%rdi,%r8,8), %xmm3
ucomisd %xmm3, %xmm0
jbe 0x61e6
andpd %xmm1, %xmm3
ucomisd %xmm2, %xmm3
ja 0x61f8
incq %r8
cmpq %r8, %rcx
jne 0x61d0
incq %rsi
cmpq %rax, %rsi
jne 0x61c0
popq %rax
retq
movl $0x4, %edi
callq 0x3120
movl $0xfffffffe, (%rax)     # imm = 0xFFFFFFFE
movq 0x8d89(%rip), %rsi      # 0xef98
movq %rax, %rdi
xorl %edx, %edx
callq 0x33b0
nop