LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x20, %rsp
movq (%rdi), %r15
movb $0x1, %bl
cmpq $0x0, 0x48(%r15)
je 0x59989
movq %rdi, %r14
addq $0x40, %r15
leaq 0x1fb73(%rip), %rsi     # 0x794a0
movq %r15, %rdi
callq 0x32220
testb %al, %al
jne 0x59989
leaq 0x1fb80(%rip), %rsi     # 0x794c0
movq %r15, %rdi
callq 0x32220
testb %al, %al
jne 0x59989
leaq 0x1fb8d(%rip), %rsi     # 0x794e0
movq %r15, %rdi
callq 0x32220
testb %al, %al
jne 0x59989
leaq 0x3c50(%rip), %rsi      # 0x5d5b6
movq %rsp, %rbx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x32d90
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32f20
movq %rsp, %rdi
callq 0x33a00
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x33a00
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
// File: /workspace/github_cpp_makefile_star2_O2/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 0x32fd0
movl %eax, %ebp
addq $0x40, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32ed0
andb %bpl, %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x8(%rsi)
je 0x59b98
movq %rsi, %r14
movq %rsi, %rdi
xorl %esi, %esi
callq 0x33930
movzbl (%rax), %eax
cmpl $0x2a, %eax
setne %cl
cmpl $0x3d, %eax
setne %bpl
andb %cl, %bpl
cmpl $0x3d, %eax
je 0x59b6a
cmpl $0x2a, %eax
jne 0x59bc7
leaq 0x3aab(%rip), %rsi      # 0x5d61c
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0x32d90
movq %rbx, %rdi
movq %r15, %rsi
callq 0x32f20
leaq 0x8(%rsp), %rdi
callq 0x33a00
jmp 0x59bc7
leaq 0x3a56(%rip), %rsi      # 0x5d5f5
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x31b30
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x32f20
leaq 0x8(%rsp), %rdi
callq 0x33a00
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x33a00
jmp 0x59bfd
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x33a00
jmp 0x59bfd
movq %rax, %rdi
callq 0x39b2f
movq %rax, %rbx
movq %rbx, %rdi
callq 0x34ed0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x59ca9
movq %rsi, %r14
leaq 0x50(%rsp), %r15
pushq $0x18
popq %rdx
movq %r15, %rdi
callq 0x34880
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
callq 0x34e50
movl 0xc(%rsp), %eax
decl %eax
cmpl $0x1fffffff, %eax       # imm = 0x1FFFFFFF
setb %bpl
jb 0x59c9d
leaq 0x3a07(%rip), %rsi      # 0x5d660
leaq 0x30(%rsp), %rdi
movq %r14, %rdx
callq 0x32d90
leaq 0x3a0a(%rip), %rdx      # 0x5d677
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x33c40
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x32f20
leaq 0x10(%rsp), %rdi
callq 0x33a00
leaq 0x30(%rsp), %rdi
callq 0x33a00
leaq 0x50(%rsp), %rdi
callq 0x32870
jmp 0x59cd8
leaq 0x3989(%rip), %rsi      # 0x5d639
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x31b30
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x32f20
leaq 0x50(%rsp), %rdi
callq 0x33a00
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x33a00
jmp 0x59d0b
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x33a00
jmp 0x59d29
jmp 0x59d17
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x33a00
jmp 0x59d1a
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x32870
jmp 0x59d29
movq %rax, %rbx
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x31030
movl %eax, %ebp
addq $0x160, %rbx            # imm = 0x160
movq %r14, %rdi
movq %rbx, %rsi
callq 0x318f0
andb %bpl, %al
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x5a0bb
movq %rsi, %r15
movq %rdi, %r14
leaq 0x1f4f5(%rip), %rsi     # 0x79500
movq %r15, %rdi
callq 0x5a0e2
testb %al, %al
jne 0x5a0bb
leaq 0x1f4fe(%rip), %rsi     # 0x79520
movq %r15, %rdi
callq 0x5a0e2
testb %al, %al
jne 0x5a0bb
leaq 0x1f507(%rip), %rsi     # 0x79540
movq %r15, %rdi
callq 0x5a0e2
testb %al, %al
jne 0x5a0bb
leaq 0x1f514(%rip), %rsi     # 0x79560
movq %r15, %rdi
callq 0x5a0e2
testb %al, %al
jne 0x5a0bb
leaq 0x1f521(%rip), %rsi     # 0x79580
movq %r15, %rdi
callq 0x5a0e2
testb %al, %al
jne 0x5a0bb
leaq 0x1f52e(%rip), %rsi     # 0x795a0
movq %r15, %rdi
callq 0x5a0e2
testb %al, %al
jne 0x5a0bb
leaq 0x1f53b(%rip), %rsi     # 0x795c0
movq %r15, %rdi
callq 0x5a0e2
testb %al, %al
jne 0x5a0bb
leaq 0x3640(%rip), %rsi      # 0x5d6d8
movq %rsp, %rbx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x32d90
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32f20
movq %rsp, %rdi
callq 0x33a00
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x33a00
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
// File: /workspace/github_cpp_makefile_star2_O2/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
movl $0x108, %r14d           # imm = 0x108
movq %rdi, (%rsp)
addq (%rdi), %r14
movq %r14, %rdi
callq 0x31ed0
movq %rax, %r15
movq %r14, %rdi
callq 0x35670
movq %rax, %r12
movb $0x1, %bl
leaq 0x28(%rsp), %r13
cmpq %r12, %r15
je 0x5a339
cmpq $0x0, 0x68(%r15)
je 0x5a330
leaq 0x60(%r15), %rbp
movq %r14, %rdi
movq %rbp, %rsi
callq 0x348b0
testb %al, %al
jne 0x5a330
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x3422(%rip), %rsi      # 0x5d718
movq %rbp, %rdx
callq 0x32d90
movq %r13, %rdi
movq %rbx, %rsi
leaq 0x3426(%rip), %rdx      # 0x5d731
callq 0x33c40
movq (%rsp), %rdi
movq %r13, %rsi
callq 0x32f20
movq %r13, %rdi
callq 0x33a00
leaq 0x8(%rsp), %rdi
callq 0x33a00
xorl %ebx, %ebx
addq $0xd8, %r15
jmp 0x5a2c8
andb $0x1, %bl
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x33a00
jmp 0x5a35f
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x33a00
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
nop
// File: /workspace/github_cpp_makefile_star2_O2/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, %ebp
movl %edx, %r15d
movq %rsi, %r14
testl %r9d, %r9d
jne 0x25ad
movl (%rdi), %r9d
movl %r9d, %edi
callq 0x2200
movq %r14, %rdi
callq 0x2bba
movl %r15d, %r15d
movq %r14, %rdi
movq %r15, %rsi
callq 0x2bc2
movl %ebp, %r12d
movq %r15, 0x8(%rsp)
imulq $0x18, %r15, %r15
xorl %r13d, %r13d
cmpq %r13, %r15
je 0x25f3
movq (%r14), %rdi
addq %r13, %rdi
movq %r12, %rsi
callq 0x2bf8
addq $0x18, %r13
jmp 0x25da
xorl %eax, %eax
pushq $0x1
popq %rbp
cmpq 0x8(%rsp), %rax
je 0x2641
movq %rax, 0x10(%rsp)
imulq $0x18, %rax, %r15
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x2637
callq 0x20b0
cltd
idivl %ebx
cmpl $0x2, %edx
jge 0x261f
movl %ebp, %edx
decl %edx
cvtsi2sd %edx, %xmm0
movq (%r14), %rax
movq (%rax,%r15), %rax
movsd %xmm0, (%rax,%r13,8)
incq %r13
jmp 0x260b
movq 0x10(%rsp), %rax
incq %rax
jmp 0x25f8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x258c
movl %ebp, 0x4(%r14)
movl %ebx, 0x8(%r14)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x267c
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %rax
subq %rcx, %rax
pushq $0x18
popq %rsi
cqto
idivq %rsi
movl %eax, 0x4(%rbx)
movq 0x8(%rcx), %rax
subq (%rcx), %rax
shrq $0x3, %rax
movl %eax, 0x8(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x10, %rsp
movq %rdi, %rbx
addq $0xf8, %rdi
movl (%rbx), %esi
callq 0x4e7c
movq 0xf8(%rbx), %rax
xorl %ecx, %ecx
movl (%rbx), %esi
cmpq %rsi, %rcx
jae 0x335a
movl %ecx, (%rax,%rcx,4)
incq %rcx
jmp 0x334b
leaq 0x8(%rbx), %rdi
leaq 0x8(%rsp), %rdx
andq $0x0, (%rdx)
callq 0x4eae
leaq 0x20(%rbx), %rdi
movl (%rbx), %esi
callq 0x2bf8
movl 0x4(%rbx), %eax
movq 0xb0(%rbx), %rcx
movq 0x20(%rbx), %rdx
xorl %esi, %esi
cmpq %rsi, %rax
je 0x33a2
movq (%rcx), %rdi
movsd (%rdi,%rsi,8), %xmm0
movsd %xmm0, (%rdx,%rsi,8)
incq %rsi
addq $0x18, %rcx
jmp 0x3387
movl (%rbx), %ecx
xorl %edx, %edx
cmpq %rcx, %rdx
je 0x33e1
movq 0x20(%rbx), %rsi
imulq $0x18, %rdx, %rdi
addq 0xc8(%rbx), %rdi
xorl %r8d, %r8d
cmpq %r8, %rax
je 0x33dc
movq (%rdi), %r9
movsd (%r9,%r8,8), %xmm0
subsd (%rsi,%r8,8), %xmm0
movsd %xmm0, (%r9,%r8,8)
incq %r8
jmp 0x33bd
incq %rdx
jmp 0x33a6
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/iu-vail[P]iprimal/iPrimal.cpp
// Function: Primal::InitSolution(std::vector<unsigned int, std::allocator<unsigned int>> const&)
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 %r14
pushq %rbx
pushq %rax
movq 0x8(%rsi), %rax
subq (%rsi), %rax
sarq $0x2, %rax
movl (%rdi), %ecx
cmpq %rcx, %rax
jne 0x34b4
movq %rdi, %rbx
addq $0xf8, %rdi
callq 0x4ee2
leaq 0x8(%rbx), %rdi
movl (%rbx), %esi
movq %rsp, %rdx
andq $0x0, (%rdx)
callq 0x4eae
leaq 0x20(%rbx), %rdi
movl 0x4(%rbx), %esi
callq 0x2bf8
xorl %r14d, %r14d
movl 0x4(%rbx), %eax
cmpq %rax, %r14
jae 0x346d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4fac
movl %eax, %eax
movq 0x20(%rbx), %rcx
movq 0xb0(%rbx), %rdx
imulq $0x18, %rax, %rax
movq (%rdx,%rax), %rax
movsd (%rax,%r14,8), %xmm0
movsd %xmm0, (%rcx,%r14,8)
incq %r14
jmp 0x3434
movl (%rbx), %ecx
xorl %edx, %edx
cmpq %rcx, %rdx
je 0x34ac
movq 0x20(%rbx), %rsi
imulq $0x18, %rdx, %rdi
addq 0xc8(%rbx), %rdi
xorl %r8d, %r8d
cmpq %r8, %rax
je 0x34a7
movq (%rdi), %r9
movsd (%r9,%r8,8), %xmm0
subsd (%rsi,%r8,8), %xmm0
movsd %xmm0, (%r9,%r8,8)
incq %r8
jmp 0x3488
incq %rdx
jmp 0x3471
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x5c25(%rip), %rdi      # 0x90e0
leaq 0x5c35(%rip), %rsi      # 0x90f7
leaq 0x5c3a(%rip), %rcx      # 0x9103
pushq $0x34
popq %rdx
callq 0x2150
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x78, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x34f3
movq %rax, 0x8(%r14)
movl (%rbx), %esi
movq %r14, %rdi
callq 0x4e7c
leaq 0x50(%rsp), %rbp
andl $0x0, (%rbp)
andq $0x0, 0x8(%rbp)
movq %rbp, 0x10(%rbp)
movq %rbp, 0x18(%rbp)
andq $0x0, 0x20(%rbp)
xorl %r13d, %r13d
leaq 0x48(%rsp), %r15
leaq 0xc(%rsp), %r12
movl 0x4(%rbx), %eax
cmpq %rax, %r13
jae 0x35c7
movl (%rbx), %eax
movl %eax, 0x18(%rsp)
xorl %ecx, %ecx
movsd 0x5b6f(%rip), %xmm0     # 0x90b0
movsd %xmm0, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
cmpl %eax, %ecx
jae 0x35a7
movl %ecx, %eax
movq 0xb0(%rbx), %rdx
imulq $0x18, %rax, %rax
movq (%rdx,%rax), %rax
movsd 0x10(%rsp), %xmm0
ucomisd (%rax,%r13,8), %xmm0
jbe 0x35a1
movq %r15, %rdi
movq %r12, %rsi
callq 0x591c
movl 0xc(%rsp), %ecx
cmpq %rbp, %rax
jne 0x35a1
movq 0xb0(%rbx), %rax
imulq $0x18, %rcx, %rdx
movq (%rax,%rdx), %rax
movsd (%rax,%r13,8), %xmm0
movsd %xmm0, 0x10(%rsp)
movl %ecx, 0x18(%rsp)
incl %ecx
movl (%rbx), %eax
jmp 0x3547
movl 0x18(%rsp), %eax
movq (%r14), %rcx
movl %r13d, (%rcx,%rax,4)
movq %r15, %rdi
leaq 0x18(%rsp), %rsi
callq 0x596e
incq %r13
jmp 0x3525
movq (%r14), %rsi
movq 0x8(%r14), %rdx
leaq 0x18(%rsp), %rdi
callq 0x4fee
movl (%rbx), %eax
cmpq %rax, 0x40(%rsp)
jne 0x3604
leaq 0x18(%rsp), %rdi
callq 0x523a
leaq 0x48(%rsp), %rdi
callq 0x523a
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5b28(%rip), %rdi      # 0x9133
leaq 0x5ae5(%rip), %rsi      # 0x90f7
leaq 0x5b30(%rip), %rcx      # 0x9149
pushq $0x67
popq %rdx
callq 0x2150
jmp 0x3625
jmp 0x3625
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x523a
movq %rbx, %rdi
callq 0x2390
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3957
movq %rax, 0x40(%rbx)
movl 0x4(%rbx), %esi
movq %rsp, %rdx
andq $0x0, (%rdx)
callq 0x4eae
movq %rbx, %rdi
callq 0x5066
leaq 0x110(%rbx), %rdi
callq 0x518e
movq %rbx, %rdi
callq 0x5080
movq %rbx, %rdi
callq 0x50d0
leaq 0xe0(%rbx), %r14
movq %r14, %rdi
callq 0x5120
movl (%rbx), %esi
movq %r14, %rdi
callq 0x5128
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14, %rdi
callq 0x5120
movl (%rbx), %esi
movq %r14, %rdi
callq 0x5128
xorl %r12d, %r12d
xorpd %xmm1, %xmm1
movl (%rbx), %eax
cmpq %rax, %r12
jae 0x3a4a
imulq $0x18, %r12, %r13
movq %r12, %rbp
shlq $0x5, %rbp
xorl %r15d, %r15d
movl 0x4(%rbx), %eax
cmpq %rax, %r15
jae 0x3a45
movq 0xc8(%rbx), %rax
movq (%rax,%r13), %rax
movsd (%rax,%r15,8), %xmm0
ucomisd %xmm1, %xmm0
jb 0x3a40
movq 0xf8(%rbx), %rax
movl (%rax,%r12,4), %eax
cmpq %rax, %r15
je 0x3a40
movl %r15d, 0x8(%rsp)
movsd %xmm0, 0x10(%rsp)
movq (%r14), %rdi
addq %rbp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x5158
xorpd %xmm1, %xmm1
incq %r15
jmp 0x39f2
incq %r12
jmp 0x39dd
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
movl 0x4(%rdi), %edx
movq 0xc8(%rdi), %rsi
pushq $-0x1
popq %rcx
xorpd %xmm0, %xmm0
xorl %r8d, %r8d
movl %ecx, %edi
cmpq %rax, %r8
je 0x3aad
imulq $0x18, %r8, %r9
addq %rsi, %r9
xorl %r10d, %r10d
cmpq %r10, %rdx
je 0x3aa8
movq (%r9), %r11
movsd (%r11,%r10,8), %xmm1
ucomisd %xmm1, %xmm0
cmoval %r8d, %ecx
cmoval %r10d, %edi
minsd %xmm0, %xmm1
incq %r10
movapd %xmm1, %xmm0
jmp 0x3a81
incq %r8
jmp 0x3a72
shlq $0x20, %rdi
movl %ecx, %eax
orq %rdi, %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
movq 0xc8(%rdi), %rdx
movl %esi, %edi
pushq $-0x1
popq %rcx
xorpd %xmm0, %xmm0
xorl %r9d, %r9d
movl %ecx, %r8d
cmpq %r9, %rax
je 0x3afb
movq (%rdx), %r10
movsd (%r10,%rdi,8), %xmm1
ucomisd %xmm1, %xmm0
cmoval %r9d, %ecx
cmoval %esi, %r8d
minsd %xmm0, %xmm1
incq %r9
addq $0x18, %rdx
movapd %xmm1, %xmm0
jmp 0x3ad0
shlq $0x20, %r8
movl %ecx, %eax
orq %r8, %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/iu-vail[P]iprimal/iPrimal.cpp
// Function: Primal::PrimalAlgo()
void
Primal::PrimalAlgo(void){

  //initiation is moved outside
  //RandInitAlgo();

  Utils utils;
  cell next;

  for(uint i=0; i<col_size; i++){
    
      InitStage();
      next = NextStartEntry(i);

      //_cout("Root cell_node: ("<<next.row_idx<<", "<<next.col_idx<<")"<<endl);
      if(next.row_idx != -1){

/*
#ifdef USE_HEAP
        Preprocess();
#endif
*/
        SearchSwapLoop(next);
        SwapTasks();

      }//if

  }//for

  // double check the reduced cost to see if all become feasible
  DoubleCheck();

//#ifdef DEBUG
  cout<<endl<<"***********************************************"<<endl;
  cout<<"Final solution:"<<endl;
  DisplayMatrix(orig_matrix, assignment);
  cout<<"Assigned row-col pairs: "<<endl;
  DisplayAssignment();
  cout<<"Minimization result: "<<ComputeCostSum(orig_matrix, assignment)<<endl;
  cout<<"***********************************************"<<endl<<endl;
//#else
//  cout<<"Minimization result: "<<ComputeCostSum(orig_matrix, assignment)<<endl;
//#endif

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6ff0
xorl %ebp, %ebp
movq %rsp, %r14
cmpl 0x4(%rbx), %ebp
jae 0x479d
movq %rbx, %rdi
callq 0x393e
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3ab8
movq %rax, (%rsp)
cmpl $-0x1, %eax
je 0x4799
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3b6a
movq %rbx, %rdi
callq 0x45d4
incl %ebp
jmp 0x4766
movq %rbx, %rdi
callq 0x48a0
movq 0x981c(%rip), %rdi      # 0xdfc8
callq 0x2120
leaq 0x4b5b(%rip), %rsi      # 0x9313
movq %rax, %rdi
callq 0x2210
movq %rax, %rdi
callq 0x2120
movq 0x97f9(%rip), %rdi      # 0xdfc8
leaq 0x4b6d(%rip), %rsi      # 0x9343
callq 0x2210
movq %rax, %rdi
callq 0x2120
leaq 0xb0(%rbx), %r14
leaq 0xf8(%rbx), %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x491c
movq 0x97c5(%rip), %rdi      # 0xdfc8
leaq 0x4b49(%rip), %rsi      # 0x9353
callq 0x2210
movq %rax, %rdi
callq 0x2120
movq %rbx, %rdi
callq 0x4a16
movq 0x97a2(%rip), %rdi      # 0xdfc8
leaq 0x4b3f(%rip), %rsi      # 0x936c
callq 0x2210
movq %rax, %rbx
movq %r14, %rsi
movq %r15, %rdx
callq 0x4ab8
movq %rbx, %rdi
callq 0x2330
movq %rax, %rdi
callq 0x2120
movq 0x9771(%rip), %rdi      # 0xdfc8
leaq 0x4ab5(%rip), %rsi      # 0x9313
callq 0x2210
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
callq 0x2120
leaq 0x8(%rsp), %rdi
callq 0x7034
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x488a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7034
movq %rbx, %rdi
callq 0x2390
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
movl 0x4(%rdi), %ecx
movq 0xc8(%rdi), %rdx
xorl %esi, %esi
xorpd %xmm0, %xmm0
movapd 0x4815(%rip), %xmm1     # 0x90d0
movsd 0x47f5(%rip), %xmm2     # 0x90b8
cmpq %rax, %rsi
je 0x48fa
imulq $0x18, %rsi, %rdi
addq %rdx, %rdi
xorl %r8d, %r8d
cmpq %r8, %rcx
je 0x48f5
movq (%rdi), %r9
movsd (%r9,%r8,8), %xmm3
incq %r8
ucomisd %xmm3, %xmm0
jbe 0x48d2
andpd %xmm1, %xmm3
ucomisd %xmm2, %xmm3
jbe 0x48d2
jmp 0x48fc
incq %rsi
jmp 0x48c3
popq %rax
retq
pushq $0x4
popq %rdi
callq 0x2130
movl $0xfffffffe, (%rax)     # imm = 0xFFFFFFFE
movq 0x9697(%rip), %rsi      # 0xdfa8
movq %rax, %rdi
xorl %edx, %edx
callq 0x2370
nop
// File: /workspace/github_cpp_makefile_star2_O2/iu-vail[P]iprimal/iPrimal.cpp
// Function: Primal::ComputeCostSum(std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>> const&, std::vector<unsigned int, std::allocator<unsigned int>> const&) const
double
Primal::ComputeCostSum(const mat& _m, const vector<uint>& _as) const{

  double sum = 0;
  for(uint i=0; i<_m.size(); i++){
    for(uint j=0; j<_m[0].size(); j++)
      if(_as[i] == j)
	sum += _m[i][j];
  }
 
  return sum;

}

// Assembly:
movq %rdx, %rcx
movq (%rsi), %rdi
movq 0x8(%rsi), %rax
subq %rdi, %rax
pushq $0x18
popq %rsi
cqto
idivq %rsi
movq (%rcx), %rcx
xorl %edx, %edx
xorpd %xmm0, %xmm0
movl %edx, %edx
cmpq %rdx, %rax
jbe 0x4b12
movq 0x8(%rdi), %rsi
subq (%rdi), %rsi
sarq $0x3, %rsi
imulq $0x18, %rdx, %r8
addq %rdi, %r8
xorl %r9d, %r9d
movl %r9d, %r9d
cmpq %r9, %rsi
jbe 0x4b0e
cmpl (%rcx,%rdx,4), %r9d
jne 0x4b09
movq (%r8), %r10
addsd (%r10,%r9,8), %xmm0
incl %r9d
jmp 0x4af2
incl %edx
jmp 0x4ad6
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/iu-vail[P]iprimal/iPrimal.cpp
// Function: Primal::PrimalTest()
void 
Primal::PrimalTest(void){

  // applies to the demo in Balinsk's paper
  RandSolution();
  InitStage();
  cell next = NextStartEntry(0);
  cout<<"Starting cell_node: ("<<next.row_idx<<", "<<next.col_idx<<")"<<endl;
  next = NextStartEntry(1);
  cout<<"Starting cell_node: ("<<next.row_idx<<", "<<next.col_idx<<")"<<endl;

  SearchSwapLoop(next);
  SwapTasks();

  next = NextStartEntry(2);
  cout<<"Starting cell_node: ("<<next.row_idx<<", "<<next.col_idx<<")"<<endl;
  InitStage();
  SearchSwapLoop(next);
  SwapTasks();

  next = NextStartEntry(3);
  cout<<"Starting cell_node: ("<<next.row_idx<<", "<<next.col_idx<<")"<<endl;
  InitStage();
  SearchSwapLoop(next);
  SwapTasks();

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x332c
movq %rbx, %rdi
callq 0x393e
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3ab8
movq %rax, %r13
movq 0x9485(%rip), %r15      # 0xdfc8
leaq 0x4838(%rip), %rsi      # 0x9382
movq %r15, %rdi
callq 0x2210
movq %rax, %rdi
movl %r13d, %esi
callq 0x2380
leaq 0x4834(%rip), %r12      # 0x9398
movq %rax, %rdi
movq %r12, %rsi
callq 0x2210
shrq $0x20, %r13
movq %rax, %rdi
movl %r13d, %esi
callq 0x2380
leaq 0x46ad(%rip), %r13      # 0x9232
movq %rax, %rdi
movq %r13, %rsi
callq 0x2210
movq %rax, %rdi
callq 0x2120
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x3ab8
movq %rax, %r14
movq %rsp, %rbp
movq %rax, (%rbp)
movq %r15, %rdi
leaq 0x47cb(%rip), %r15      # 0x9382
movq %r15, %rsi
callq 0x2210
movq %rax, %rdi
movl %r14d, %esi
callq 0x2380
movq %rax, %rdi
movq %r12, %rsi
callq 0x2210
shrq $0x20, %r14
movq %rax, %rdi
movl %r14d, %esi
callq 0x2380
movq %rax, %rdi
movq %r13, %rsi
callq 0x2210
movq %rax, %rdi
callq 0x2120
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x3b6a
movq %rbx, %rdi
callq 0x45d4
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x3ab8
movq %rax, (%rbp)
movq 0x93a8(%rip), %r14      # 0xdfc8
movq %r14, %rdi
movq %r15, %rsi
callq 0x2210
movl (%rbp), %esi
movq %rax, %rdi
callq 0x2380
movq %rax, %rdi
movq %r12, %rsi
callq 0x2210
movl 0x4(%rbp), %esi
movq %rax, %rdi
callq 0x2380
movq %rax, %rdi
movq %r13, %rsi
callq 0x2210
movq %rax, %rdi
callq 0x2120
movq %rbx, %rdi
callq 0x393e
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x3b6a
movq %rbx, %rdi
callq 0x45d4
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x3ab8
movq %rax, (%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x2210
movl (%rbp), %esi
movq %rax, %rdi
callq 0x2380
movq %rax, %rdi
movq %r12, %rsi
callq 0x2210
movl 0x4(%rbp), %esi
movq %rax, %rdi
callq 0x2380
movq %rax, %rdi
movq %r13, %rsi
callq 0x2210
movq %rax, %rdi
callq 0x2120
movq %rbx, %rdi
callq 0x393e
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x3b6a
movq %rbx, %rdi
callq 0x45d4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/iu-vail[P]iprimal/iPrimal.cpp
// Function: Primal::DisplayTree(_tree_node*)
void
Primal::DisplayTree(tree_node* _root){

  queue<tree_node*> bfs;
  bfs.push(_root);
  while(!bfs.empty()){
    tree_node* p_n = bfs.front();
    bfs.pop(); 
    if(p_n->asgn==-1)
      _cout("  -the root is ^: ("
		<<p_n->c.row_idx<<", "<<p_n->c.col_idx<<")"<<endl);
    else if (p_n->asgn == 0)
      _cout("  -found a new 0: ("
		<<p_n->c.row_idx<<", "<<p_n->c.col_idx<<")"<<endl);
    else
      _cout("  -found a new *: ("
		<<p_n->c.row_idx<<", "<<p_n->c.col_idx<<")"<<endl);

    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);
      }
    }
  }

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
leaq 0x8(%rsp), %rbx
movq %rsi, (%rbx)
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x5172
movq %r14, %rdi
movq %rbx, %rsi
callq 0x66b6
leaq 0x10(%rsp), %rbx
movq %rsp, %r14
movq 0x20(%rsp), %rax
cmpq %rax, 0x40(%rsp)
je 0x4d77
movq (%rax), %r15
movq %rbx, %rdi
callq 0x68ea
cmpq $0x0, 0x10(%r15)
je 0x4d25
addq $0x10, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x66b6
movq (%r15), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x4d25
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x66b6
jmp 0x4d59
leaq 0x10(%rsp), %rdi
callq 0x54f6
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x4d8f
jmp 0x4d8f
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x54f6
movq %rbx, %rdi
callq 0x2390
// File: /workspace/github_cpp_makefile_star2_O2/iu-vail[P]iprimal/iPrimal.cpp
// Function: Primal::GetAssignedRow(unsigned int)
uint
Primal::GetAssignedRow(uint _col_id){

  uint row = row_size;
  for(uint i=0; i<row_size; i++)
    if(assignment[i] == _col_id) 
      row = i;

  assert(row<row_size);
  return row; 
}

// Assembly:
pushq %rax
movl (%rdi), %ecx
movq 0xf8(%rdi), %rdx
xorl %edi, %edi
movl %ecx, %eax
cmpq %rdi, %rcx
je 0x4fca
cmpl %esi, (%rdx,%rdi,4)
cmovel %edi, %eax
incq %rdi
jmp 0x4fba
cmpl %ecx, %eax
jae 0x4fd0
popq %rcx
retq
leaq 0x43eb(%rip), %rdi      # 0x93c2
leaq 0x4119(%rip), %rsi      # 0x90f7
leaq 0x43ea(%rip), %rcx      # 0x93cf
pushq $0xe
popq %rdx
callq 0x2150
nop
// File: /workspace/github_cpp_makefile_star2_O2/iu-vail[P]iprimal/Utils.cpp
// Function: Utils::Stats(std::vector<double, std::allocator<double>> const&, double&, double&, double&)
void
Utils::Stats(const vector<double>& _data, 
                double& _sum, double& _avg, double& _var){

  _sum = 0;
  for(uint i=0; i<_data.size(); i++){
    _sum += _data[i];
  }

  _avg = _sum/_data.size();

  _var = 0;
  for(uint i=0; i<_data.size(); i++){
    _var += (_data[i]-_avg)*(_data[i]-_avg); 
  }
  _var = sqrt(_var/_data.size());
  
}

// Assembly:
pushq %rbx
movq %r8, %rbx
andq $0x0, (%rdx)
movq (%rsi), %rax
movq 0x8(%rsi), %rsi
subq %rax, %rsi
sarq $0x3, %rsi
xorl %edi, %edi
xorpd %xmm0, %xmm0
movl %edi, %edi
cmpq %rdi, %rsi
jbe 0x7066
addsd (%rax,%rdi,8), %xmm0
movsd %xmm0, (%rdx)
incl %edi
jmp 0x7052
cvtsi2sd %rsi, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, (%rcx)
andq $0x0, (%rbx)
xorl %edx, %edx
xorpd %xmm0, %xmm0
movl %edx, %edx
cmpq %rdx, %rsi
jbe 0x709d
movsd (%rax,%rdx,8), %xmm2
subsd (%rcx), %xmm2
mulsd %xmm2, %xmm2
addsd %xmm2, %xmm0
movsd %xmm0, (%rbx)
incl %edx
jmp 0x707d
divsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x70b1
sqrtsd %xmm0, %xmm0
jmp 0x70b6
callq 0x21c0
movsd %xmm0, (%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/iu-vail[P]iprimal/Utils.cpp
// Function: Utils::WriteMatrix(std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>> const&, char*)
void
Utils::WriteMatrix(const mat& _m, char* _fname){

  ofstream fout(_fname);
  if(!fout)
    cerr << "Cannot create output file"<<endl;
  
  for(uint i=0; i<_m.size(); i++){
    for(uint j=0; j<_m[0].size(); j++)
      fout<<_m[i][j]<<"\t";
    fout<<endl;
  }
  
  fout.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %rbx
leaq 0x8(%rsp), %r14
pushq $0x10
popq %rax
movq %r14, %rdi
movq %rdx, %rsi
movl %eax, %edx
callq 0x2250
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x28(%rsp,%rax)
je 0x710e
movq 0x6ef6(%rip), %rdi      # 0xdff0
leaq 0x237f(%rip), %rsi      # 0x9480
callq 0x2210
movq %rax, %rdi
callq 0x2120
xorl %r12d, %r12d
leaq 0x8(%rsp), %r14
leaq 0x229e(%rip), %r15      # 0x93bb
movl %r12d, %r12d
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
subq %rcx, %rax
cqto
pushq $0x18
popq %rsi
idivq %rsi
cmpq %r12, %rax
jbe 0x717f
xorl %ebp, %ebp
imulq $0x18, %r12, %r13
movl %ebp, %ebp
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x3, %rax
cmpq %rbp, %rax
jbe 0x7172
movq (%rcx,%r13), %rax
movsd (%rax,%rbp,8), %xmm0
movq %r14, %rdi
callq 0x2330
movq %rax, %rdi
movq %r15, %rsi
callq 0x2210
incl %ebp
movq (%rbx), %rcx
jmp 0x713d
movq %r14, %rdi
callq 0x2120
incl %r12d
jmp 0x711d
leaq 0x8(%rsp), %rdi
callq 0x22b0
leaq 0x8(%rsp), %rdi
callq 0x22e0
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x71a9
jmp 0x71a9
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x22e0
movq %rbx, %rdi
callq 0x2390
// File: /workspace/github_cpp_makefile_star2_O2/iu-vail[P]iprimal/Utils.cpp
// Function: Utils::WriteMatrix(Assignment&, char*)
void
Utils::WriteMatrix(Assignment& _as, char* _fname){

  ofstream fout(_fname);
  if(!fout)
    cerr << "Cannot create output file"<<endl;
  
  fout<<"# seed: "<<_as.GetSeed()<<endl;
  for(uint i=0; i<_as.GetRowSize(); i++){
    for(uint j=0; j<_as.GetColSize(); j++)
      fout<<_as.GetMatrix()[i][j]<<"\t";
    fout<<endl;
  }
  
  fout.close();

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %rbx
leaq 0x8(%rsp), %r14
pushq $0x10
popq %rax
movq %r14, %rdi
movq %rdx, %rsi
movl %eax, %edx
callq 0x2250
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x28(%rsp,%rax)
je 0x7210
movq 0x6df4(%rip), %rdi      # 0xdff0
leaq 0x227d(%rip), %rsi      # 0x9480
callq 0x2210
movq %rax, %rdi
callq 0x2120
leaq 0x2283(%rip), %rsi      # 0x949a
leaq 0x8(%rsp), %rdi
callq 0x2210
movl (%rbx), %esi
movq %rax, %rdi
callq 0x2160
movq %rax, %rdi
callq 0x2120
xorl %r12d, %r12d
leaq 0x8(%rsp), %r14
leaq 0x2179(%rip), %r15      # 0x93bb
movl 0x4(%rbx), %eax
cmpq %rax, %r12
jae 0x728a
imulq $0x18, %r12, %r13
xorl %ebp, %ebp
movl 0x8(%rbx), %eax
cmpq %rax, %rbp
jae 0x727d
movq 0x10(%rbx), %rax
movq (%rax,%r13), %rax
movsd (%rax,%rbp,8), %xmm0
movq %r14, %rdi
callq 0x2330
movq %rax, %rdi
movq %r15, %rsi
callq 0x2210
incq %rbp
jmp 0x7250
movq %r14, %rdi
callq 0x2120
incq %r12
jmp 0x7242
leaq 0x8(%rsp), %rdi
callq 0x22b0
leaq 0x8(%rsp), %rdi
callq 0x22e0
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x72b4
jmp 0x72b4
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x22e0
movq %rbx, %rdi
callq 0x2390
nop
// File: /workspace/github_cpp_makefile_star2_O2/iu-vail[P]iprimal/Utils.cpp
// Function: Utils::OutLog()
void 
Utils::OutLog(void){
  int a = 0; //a dummy
  stringstream ss;
  ss << a;
  string log = LOG_DIR + ss.str() + ".log";
  ofstream fout(log.c_str(),ios::app);
  if(!fout)
    cerr << "Cannot open output file. No log file generated!"<<endl;

  if(this->GetCurTime()-this->last_time > 100){
    fout<<"The "<<int(this->GetCurTime()-this->start_time)<<"th second: "<<endl;
    this->last_time = this->GetCurTime();
   }

  fout.close();

}

// Assembly:
pushq %r14
pushq %rbx
subq $0x3c8, %rsp            # imm = 0x3C8
movq %rdi, %rbx
leaq 0x240(%rsp), %rdi
callq 0x2180
leaq 0x250(%rsp), %rdi
xorl %esi, %esi
callq 0x2380
leaq 0x258(%rsp), %rsi
movq %rsp, %rdi
callq 0x2310
leaq 0x2199(%rip), %rsi      # 0x94a3
leaq 0x40(%rsp), %rdi
movq %rsp, %rdx
callq 0x747e
leaq 0x218d(%rip), %rdx      # 0x94ab
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x745f
leaq 0x40(%rsp), %rdi
callq 0x2110
movq %rsp, %rdi
callq 0x2110
movq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdi
pushq $0x1
popq %rdx
callq 0x2250
movq 0x40(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x60(%rsp,%rax)
je 0x737c
movq 0x6c88(%rip), %rdi      # 0xdff0
leaq 0x2141(%rip), %rsi      # 0x94b0
callq 0x2210
movq %rax, %rdi
callq 0x2120
callq 0x7004
subsd 0x8(%rbx), %xmm0
ucomisd 0x20ea(%rip), %xmm0     # 0x9478
jbe 0x73da
leaq 0x2149(%rip), %rsi      # 0x94e0
leaq 0x40(%rsp), %rdi
callq 0x2210
movq %rax, %r14
callq 0x7004
subsd (%rbx), %xmm0
cvttsd2si %xmm0, %esi
movq %r14, %rdi
callq 0x2380
leaq 0x2125(%rip), %rsi      # 0x94e5
movq %rax, %rdi
callq 0x2210
movq %rax, %rdi
callq 0x2120
callq 0x7004
movsd %xmm0, 0x8(%rbx)
leaq 0x40(%rsp), %rdi
callq 0x22b0
leaq 0x40(%rsp), %rdi
callq 0x22e0
leaq 0x20(%rsp), %rdi
callq 0x2110
leaq 0x240(%rsp), %rdi
callq 0x21a0
addq $0x3c8, %rsp            # imm = 0x3C8
popq %rbx
popq %r14
retq
movq %rax, %rbx
jmp 0x7440
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x2110
jmp 0x7427
movq %rax, %rbx
movq %rsp, %rdi
jmp 0x7445
jmp 0x742e
movq %rax, %rbx
jmp 0x744a
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x22e0
leaq 0x20(%rsp), %rdi
callq 0x2110
leaq 0x240(%rsp), %rdi
callq 0x21a0
movq %rbx, %rdi
callq 0x2390
// File: /workspace/github_cpp_makefile_star2_O2/iu-vail[P]iprimal/./CmdParser.h
// Function: CmdParser::ParseCmd(int, char**)
void
CmdParser::ParseCmd(int argc, char **argv){

  int c;
  while ((c = getopt (argc, argv, "i:s:n:o:v:h")) != -1)
    switch (c)
    {
           case 'i':
             this->input_file = optarg;
             break;
           case 's':
             this->seed = atoi(optarg);
             break;
           case 'n':
             this->assignment_size = atoi(optarg);
             break;
           case 'o':
             this->output_file = optarg;
             break;
           case 'v':
             this->verbose_level = atoi(optarg);
	     if(this->verbose_level < VERBOSE_LEVEL){ 
		cout<<"Please undefine the DEBUG macro in \"Define.h\" and re-compile."<<endl<<endl;
                exit(0);
	     }
	     break;
	   case 'h':
	     this->GiveUsage(argv[0]);
	     break;
           case '?':
           default:
	     this->GiveUsage(argv[0]);
             exit(0);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x30(%rdi), %rax
movq %rax, 0x10(%rsp)
leaq 0x8(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x205d(%rip), %r13      # 0x9530
leaq 0x201a(%rip), %r15      # 0x94f4
movq 0x6ad7(%rip), %r12      # 0xdfb8
movl %ebp, %edi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x2070
leal -0x68(%rax), %ecx
cmpl $0xe, %ecx
ja 0x7551
movslq (%r15,%rcx,4), %rax
addq %r15, %rax
jmpq *%rax
movq (%r12), %rsi
movq 0x8(%rsp), %rdi
callq 0x23d0
jmp 0x74e1
movq (%r12), %rdi
callq 0x2300
cltq
movq %rax, 0x28(%r14)
jmp 0x74e1
movq (%r12), %rsi
movq 0x10(%rsp), %rdi
callq 0x23d0
jmp 0x74e1
movq (%r12), %rdi
callq 0x2300
movl %eax, 0x50(%r14)
testl %eax, %eax
jne 0x74e1
jmp 0x756d
movq (%r12), %rdi
callq 0x2300
movl %eax, (%r14)
jmp 0x74e1
cmpl $-0x1, %eax
jne 0x7565
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rsi
callq 0x7598
movq 0x6a54(%rip), %rdi      # 0xdfc8
leaq 0x1fc1(%rip), %rsi      # 0x953c
callq 0x2210
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
callq 0x2120
xorl %edi, %edi
callq 0x2260
nop
// File: /workspace/github_cpp_makefile_star2_O2/iu-vail[P]iprimal/./CmdParser.h
// Function: CmdParser::GiveUsage(char*)
void
CmdParser::GiveUsage(char *cmd)
{
   fprintf(stderr,"\nUsage:    %s \n",cmd);
   fprintf(stderr,"          -i   input an assignment file (string)\n");
   fprintf(stderr,"          -s   random generator with seed (unsigned int)\n");
   fprintf(stderr,"          -n   matrix size (size_t)\n");
   fprintf(stderr,"          -o   write into output file (string)\n");
   fprintf(stderr,"          -v   verbose level (0 or 1)\n");
   fprintf(stderr,"More details can be found in README file\n\n");
   exit(0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rdx
movq 0x6a2a(%rip), %r14      # 0xdfd0
movq (%r14), %rdi
leaq 0x1fd2(%rip), %rsi      # 0x9582
xorl %eax, %eax
callq 0x22c0
movq (%r14), %rcx
leaq 0x1fd1(%rip), %rdi      # 0x9592
pushq $0x31
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x23e0
movq (%r14), %rcx
leaq 0x1feb(%rip), %rdi      # 0x95c4
pushq $0x39
popq %rsi
movq %rbx, %rdx
callq 0x23e0
movq (%r14), %rcx
leaq 0x2010(%rip), %rdi      # 0x95fe
pushq $0x24
popq %rsi
movq %rbx, %rdx
callq 0x23e0
movq (%r14), %rcx
leaq 0x2020(%rip), %rdi      # 0x9623
pushq $0x2f
popq %rsi
movq %rbx, %rdx
callq 0x23e0
movq (%r14), %rcx
leaq 0x203b(%rip), %rdi      # 0x9653
pushq $0x26
popq %rsi
movq %rbx, %rdx
callq 0x23e0
movq (%r14), %rcx
leaq 0x204d(%rip), %rdi      # 0x967a
pushq $0x2a
popq %rsi
movq %rbx, %rdx
callq 0x23e0
xorl %edi, %edi
callq 0x2260
nop
// File: /workspace/github_cpp_makefile_star2_O2/muzuka[P]Cards-Against-Humanity-Online/Card.cpp
// Function: Card::Card()
Card::Card() {
	content = "";
	type = ' ';
	numOfAnswers = 0;
	owner = "";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
xorl %eax, %eax
movb %al, 0x10(%rdi)
leaq 0x28(%rdi), %r14
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
movb %al, 0x38(%rdi)
leaq 0x3c0a(%rip), %rsi      # 0x621f
callq 0x22c0
movb $0x20, 0x20(%rbx)
andl $0x0, 0x24(%rbx)
leaq 0x3bf6(%rip), %rsi      # 0x621f
movq %r14, %rdi
callq 0x22c0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r14, %rdi
callq 0x22e8
movq %rbx, %rdi
callq 0x22e8
movq %r15, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O2/muzuka[P]Cards-Against-Humanity-Online/Card.cpp
// Function: Card::Card(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Card::Card(std::string c, char t, int n, std::string p) {
	content = c;
	type = t;
	numOfAnswers = n;
	owner = p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movl %ecx, %r12d
movl %edx, %r13d
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
xorl %eax, %eax
movb %al, 0x10(%rdi)
leaq 0x28(%rdi), %r15
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
movb %al, 0x38(%rdi)
callq 0x20e0
movb %r13b, 0x20(%rbx)
movl %r12d, 0x24(%rbx)
movq %r15, %rdi
movq %r14, %rsi
callq 0x20e0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %r15, %rdi
callq 0x22e8
movq %rbx, %rdi
callq 0x22e8
movq %r14, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O2/muzuka[P]Cards-Against-Humanity-Online/Card.cpp
// Function: Card::Card(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char, int)
Card::Card(std::string c, char t, int n) {
	content = c;
	type = t;
	numOfAnswers = n;
	owner = "";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r15d
movl %edx, %r12d
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
xorl %eax, %eax
movb %al, 0x10(%rdi)
leaq 0x28(%rdi), %r14
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
movb %al, 0x38(%rdi)
callq 0x20e0
movb %r12b, 0x20(%rbx)
movl %r15d, 0x24(%rbx)
leaq 0x3af8(%rip), %rsi      # 0x621f
movq %r14, %rdi
callq 0x22c0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r14, %rdi
callq 0x22e8
movq %rbx, %rdi
callq 0x22e8
movq %r15, %rdi
callq 0x2280
nop