LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/./process_vcf_seq_utils.h
// Function: readScaffold(std::basic_ifstream<char, std::char_traits<char>>*&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
inline std::string readScaffold(std::ifstream*& genomeFile, std::string& nextScaffoldName) {
    std::string scaffoldString;
    scaffoldString.reserve(100000000);
    std::string line = "";
    while (getline(*genomeFile, line) && line[0] != '>') {
        scaffoldString.append(line);
    }
    if (line[0] == '>')
        nextScaffoldName = split(line,' ')[0];
    else
        nextScaffoldName = "";
    return scaffoldString;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %rbp
movq %rbp, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl $0x5f5e100, %esi        # imm = 0x5F5E100
callq 0x86f0
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x886cd(%rip), %rdx     # 0xd1c7f
movq %rsp, %rdi
movq %rdx, %rsi
callq 0x28952
movq %rsp, %r12
movq (%r15), %r13
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x4960c
movq (%rsp), %rsi
cmpb $0x3e, (%rsi)
je 0x4960c
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x8180
jmp 0x495c0
movq (%rsp), %rax
cmpb $0x3e, (%rax)
jne 0x49640
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
movl $0x20, %edx
callq 0x50624
movq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x8270
leaq 0x20(%rsp), %rdi
callq 0x3123c
jmp 0x49658
movq 0x8(%r14), %rdx
leaq 0x88634(%rip), %rcx     # 0xd1c7f
movq %r14, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x86c0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x49673
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8480
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x3123c
jmp 0x496a2
jmp 0x4969f
jmp 0x4969f
jmp 0x4969a
movq %rax, %r14
jmp 0x496bd
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x496bd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8480
movq (%rbx), %rdi
cmpq %rbp, %rdi
je 0x496d1
movq (%rbp), %rsi
incq %rsi
callq 0x8480
movq %r14, %rdi
callq 0x8840
nop
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/./process_vcf_utils.h
// Function: void print_matrix<std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>>(std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>, std::ostream&)
void print_matrix(T matrix, std::ostream& outFile) {
    for (int i = 0; i < matrix.size(); i++) {
        for (int j = 0; j < matrix[i].size(); j++) {
            if (j == (matrix[i].size()-1))
                outFile << matrix[i][j] << std::endl;
            else 
                outFile << matrix[i][j] << "\t";
        }    
    }    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
movq 0x8(%rdi), %rax
cmpq (%rdi), %rax
je 0x4a4c0
movq %rdi, %r14
xorl %edx, %edx
movq (%r14), %rcx
movq %rdx, 0x8(%rsp)
leaq (%rdx,%rdx,2), %rbp
movq (%rcx,%rbp,8), %rax
movq 0x8(%rcx,%rbp,8), %rbx
subq %rax, %rbx
je 0x4a496
sarq $0x5, %rbx
movl $0x8, %r15d
xorl %r13d, %r13d
decq %rbx
movq -0x8(%rax,%r15), %rsi
movq (%rax,%r15), %rdx
movq 0x10(%rsp), %rdi
callq 0x84e0
movq %rax, %r12
cmpq %rbx, %r13
jne 0x4a463
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r12, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
jmp 0x4a477
movl $0x1, %edx
movq %r12, %rdi
leaq 0x8780c(%rip), %rsi     # 0xd1c7e
callq 0x84e0
incq %r13
movq (%r14), %rcx
movq (%rcx,%rbp,8), %rax
movq 0x8(%rcx,%rbp,8), %rbx
subq %rax, %rbx
sarq $0x5, %rbx
addq $0x20, %r15
cmpq %r13, %rbx
ja 0x4a41b
movq 0x8(%r14), %rax
subq (%r14), %rax
movq 0x8(%rsp), %rdx
incq %rdx
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq %rdx, %rax
ja 0x4a3f0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/./process_vcf_utils.h
// Function: double vector_average<std::deque<int, std::allocator<int>>>(std::deque<int, std::allocator<int>>)
double vector_average(T vector) {
    double sum = 0;
    for (int i = 0; i < vector.size(); i++) {
        sum += vector[i];
    }
    double average = (double)sum / (double)vector.size();
    return average;
}

// Assembly:
pushq %r14
pushq %rbx
movq 0x48(%rdi), %rcx
movq 0x28(%rdi), %rax
movq %rcx, %rdx
subq %rax, %rdx
shrq $0x3, %rdx
cmpq $0x1, %rcx
adcq $-0x1, %rdx
movq 0x30(%rdi), %rsi
subq 0x38(%rdi), %rsi
shlq $0x7, %rdx
sarq $0x2, %rsi
addq %rdx, %rsi
movq 0x10(%rdi), %rdx
movq 0x20(%rdi), %rcx
subq %rdx, %rcx
sarq $0x2, %rcx
addq %rsi, %rcx
je 0x4a585
movq %rdx, %rsi
subq 0x18(%rdi), %rsi
sarq $0x2, %rsi
xorpd %xmm0, %xmm0
xorl %edi, %edi
movabsq $-0x200000000000000, %r8 # imm = 0xFE00000000000000
movq %rcx, %r9
movq %rsi, %r10
movq %rdx, %r11
cmpq $0x80, %r10
jb 0x4a568
leaq (%rsi,%rdi), %r11
movq %r10, %rbx
shrq $0x7, %rbx
leaq (%rbx,%r8), %r14
testq %r10, %r10
cmovgq %rbx, %r14
movq %r14, %rbx
shlq $0x7, %rbx
subq %rbx, %r11
shlq $0x2, %r11
addq (%rax,%r14,8), %r11
xorps %xmm1, %xmm1
cvtsi2sdl (%r11), %xmm1
addsd %xmm1, %xmm0
incq %rdi
addq $0x4, %rdx
incq %r10
decq %r9
jne 0x4a534
jmp 0x4a589
xorpd %xmm0, %xmm0
movq %rcx, %xmm1
punpckldq 0x7fc0a(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x7fc12(%rip), %xmm1    # 0xca1b0
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/./process_vcf_IUPAC.h
// Function: returnHetIUPAC[abi:cxx11](char)
inline std::string returnHetIUPAC(char IUPACbase) {
    char firstBase; char secondBase;
    switch (std::toupper(IUPACbase))
    {
        case 'K': firstBase = 'T'; secondBase = 'G'; break;
        case 'M': firstBase = 'C'; secondBase = 'A'; break;
        case 'R': firstBase = 'G'; secondBase = 'A'; break;
        case 'S': firstBase = 'G'; secondBase = 'C'; break;
        case 'W': firstBase = 'T'; secondBase = 'A'; break;
        case 'Y': firstBase = 'T'; secondBase = 'C'; break;
        default: assert(false);
    }
    std::string bases = ""; bases = firstBase + secondBase;
    return bases;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl %esi, %edi
callq 0x8880
addl $-0x4b, %eax
cmpl $0xf, %eax
jae 0x4f6d9
movl $0x5185, %ecx           # imm = 0x5185
btl %eax, %ecx
jae 0x4f6d9
movl %eax, %r14d
leaq 0x8769c(%rip), %r12     # 0xd6d2a
leaq 0x876a4(%rip), %rax     # 0xd6d39
movb (%r14,%rax), %bpl
leaq 0x10(%rbx), %r15
movq %r15, (%rbx)
leaq 0x825d8(%rip), %rdx     # 0xd1c7f
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x28952
addb (%r14,%r12), %bpl
movq 0x8(%rbx), %rdx
movsbl %bpl, %r8d
movl $0x1, %ecx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x88a0
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8686d(%rip), %rdi     # 0xd5f4d
leaq 0x87363(%rip), %rsi     # 0xd6a4a
leaq 0x87372(%rip), %rcx     # 0xd6a60
movl $0x32, %edx
callq 0x82c0
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x4f70e
movq (%r15), %rsi
incq %rsi
callq 0x8480
movq %r14, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_join_multiFasta.cpp
// Function: processMultiFastaMain(int, char**)
int processMultiFastaMain(int argc, char** argv) {
    parseMultiFastaOptions(argc, argv);
    
    string allSequences = readMultiFastaToOneString(opt::fastaFile, 500000000);
    
    if (opt::out.empty()) {
        print80bpPerLineStdOut(std::cout, allSequences);
    } else {
        string outFN = opt::out + ".joined.fa";
        std::ofstream* outAncestralFile = new std::ofstream(outFN.c_str());
        print80bpPerLineFile(outAncestralFile, allSequences);
    }
    
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
callq 0x4f93a
leaq 0xbca3c(%rip), %rsi     # 0x10c1b0
leaq 0x28(%rsp), %rdi
movl $0x1dcd6500, %edx       # imm = 0x1DCD6500
callq 0x53cbc
movq 0xbca4e(%rip), %rdx     # 0x10c1d8
testq %rdx, %rdx
je 0x4f83c
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0xbca2d(%rip), %rsi     # 0x10c1d0
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x2e45c
leaq 0x87591(%rip), %rsi     # 0xd6d48
leaq 0x8(%rsp), %rdi
callq 0x88c0
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, %r14
movq 0x8(%rsp), %rsi
movq %rax, %rdi
movl $0x10, %edx
callq 0x84c0
movq %r14, 0x48(%rsp)
leaq 0x60(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0x2e45c
leaq 0x48(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x53420
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x4f82b
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4f88a
movq 0x18(%rsp), %rsi
jmp 0x4f882
leaq 0x80(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0x2e45c
movq 0xbb752(%rip), %rdi     # 0x10afb8
leaq 0x70(%rsp), %rsi
callq 0x53342
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x4f88a
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4f8a5
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
xorl %eax, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x4f917
movq 0x80(%rsp), %rsi
jmp 0x4f90f
jmp 0x4f8f8
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x4f900
movq 0x60(%rsp), %rsi
incq %rsi
jmp 0x4f8ef
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdi
callq 0x8480
jmp 0x4f900
jmp 0x4f8fd
movq %rax, %rbx
jmp 0x4f917
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4f917
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4f932
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: GeneralSetCounts::getSetVariantCountsSimple(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::map<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&)
void GeneralSetCounts::getSetVariantCountsSimple(const std::vector<std::string>& genotypes, const std::map<size_t, string>& posToSpeciesMap) {
    // std::cerr << fields[0] << "\t" << fields[1] << std::endl;
    getBasicCounts(genotypes, posToSpeciesMap);
    
    // Now fill in the allele frequencies
    for(std::map<string,int>::iterator it = setAltCounts.begin(); it != setAltCounts.end(); ++it) {
        if (setAlleleCounts.at(it->first) > 0) {
            setAAFs[it->first] = (double)setAltCounts.at(it->first)/setAlleleCounts.at(it->first);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4ff16
movq 0x50(%rbx), %r14
leaq 0x40(%rbx), %rbp
cmpq %rbp, %r14
je 0x5016e
leaq 0x38(%rbx), %r15
leaq 0x68(%rbx), %r12
addq $0xe0, %rbx
leaq 0x20(%r14), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x54a86
cmpl $0x0, (%rax)
jle 0x5015e
movq %r15, %rdi
movq %r13, %rsi
callq 0x54a86
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
movsd %xmm0, (%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x54a86
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
movsd (%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x54ada
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq %r14, %rdi
callq 0x8310
movq %rax, %r14
cmpq %rbp, %rax
jne 0x500ff
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
void split(const std::string &s, char delim, std::vector<std::string> &elems) {
    std::stringstream ss(s);
    std::string item;
    while (std::getline(ss, item, delim)) {
        elems.push_back(item);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %rsi
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movl $0x18, %edx
callq 0x8710
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movsbl %bpl, %ebp
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x50342
movq %rbx, %rdi
movq %r15, %rsi
callq 0x33db0
jmp 0x5031a
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x50359
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xbac08(%rip), %rsi     # 0x10af68
leaq 0x28(%rsp), %rdi
callq 0x8370
leaq 0xa8(%rsp), %rdi
callq 0x8190
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x503a1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xbabc0(%rip), %rsi     # 0x10af68
leaq 0x28(%rsp), %rdi
callq 0x8370
leaq 0xa8(%rsp), %rdi
callq 0x8190
movq %rbx, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: splitToDouble(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, std::vector<double, std::allocator<double>>&)
void splitToDouble(const std::string &s, char delim, std::vector<double> &elems) {
    std::stringstream ss(s);
    std::string item;
    while (std::getline(ss, item, delim)) {
        elems.push_back(stringToDouble(item));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %rsi
leaq 0x50(%rsp), %r14
movq %r14, %rdi
movl $0x18, %edx
callq 0x8710
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x40(%rsp), %r13
movsbl %bpl, %ebp
leaq 0x8(%rsp), %r15
leaq 0x30(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5049d
movq %r13, 0x30(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x2e45c
movq %r12, %rdi
callq 0x5054c
movsd %xmm0, 0x28(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x50474
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x50481
movq %rbx, %rdi
leaq 0x28(%rsp), %rdx
callq 0x33c70
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x50419
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x50419
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x504b9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xbaaa8(%rip), %rsi     # 0x10af68
leaq 0x50(%rsp), %rdi
callq 0x8370
leaq 0xd0(%rsp), %rdi
callq 0x8190
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x504eb
movq %rax, %rbx
jmp 0x5050a
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x5050a
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x50526
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xbaa3b(%rip), %rsi     # 0x10af68
leaq 0x50(%rsp), %rdi
callq 0x8370
leaq 0xd0(%rsp), %rdi
callq 0x8190
movq %rbx, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: stringToDouble(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
double stringToDouble(std::string s) {
    double d;
    std::stringstream ss(s); //turn the string into a stream
    ss >> d; //convert
    return d;
}

// Assembly:
pushq %rbx
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, %rsi
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movl $0x18, %edx
callq 0x8710
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x82d0
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0xba9df(%rip), %rsi     # 0x10af68
leaq 0x18(%rsp), %rdi
callq 0x8370
leaq 0x98(%rsp), %rdi
callq 0x8190
movsd 0x8(%rsp), %xmm0
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
retq
movq %rax, %rbx
movq 0xba9af(%rip), %rsi     # 0x10af68
leaq 0x18(%rsp), %rdi
callq 0x8370
leaq 0x98(%rsp), %rdi
callq 0x8190
movq %rbx, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: initialize_matrix_double(std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&, int, int)
void initialize_matrix_double(std::vector<std::vector<double> >& m, int m_rows, int m_columns) {
    if (m_columns == 0)
        m_columns = m_rows;
    for (int i = 0; i < m_columns; i++) {
        std::vector<double> v(m_rows,0);
        m.push_back(v);
    }       
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
testl %edx, %edx
cmovel %esi, %ebx
testl %ebx, %ebx
jle 0x506d2
movq %rdi, %r14
movslq %esi, %r15
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %r13
leaq 0x7(%rsp), %rbp
movq $0x0, 0x8(%rsp)
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0x54ba6
movq %r14, %rdi
movq %r12, %rsi
callq 0x54c28
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x506ce
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
decl %ebx
jne 0x50692
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x506fb
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: initialize_matrix_int(std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&, int, int)
void initialize_matrix_int(std::vector<std::vector<int> >& m, int m_rows, int m_columns) {
    if (m_columns == 0)
        m_columns = m_rows;
    for (int i = 0; i < m_columns; i++) {
        std::vector<int> v(m_rows,0);
        m.push_back(v);
    }       
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
testl %edx, %edx
cmovel %esi, %ebx
testl %ebx, %ebx
jle 0x50770
movq %rdi, %r14
movslq %esi, %r15
leaq 0x10(%rsp), %r12
leaq 0xc(%rsp), %r13
leaq 0xb(%rsp), %rbp
movl $0x0, 0xc(%rsp)
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0x54c54
movq %r14, %rdi
movq %r12, %rsi
callq 0x4ae84
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5076c
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
decl %ebx
jne 0x50731
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x50799
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: stripPath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string stripPath(const std::string& filename)
{
    size_t slashPos = filename.find_last_of('/');
    if(slashPos == std::string::npos)
        return filename; // no path
    else
        return filename.substr(slashPos+1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x2f, %esi
movq $-0x1, %rdx
callq 0x88f0
cmpq $-0x1, %rax
je 0x507df
incq %rax
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x84a0
jmp 0x507f8
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x2e45c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: stripExtension(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string stripExtension(const std::string& filename)
{
    size_t suffixPos = filename.find_last_of('.');
    if(suffixPos == std::string::npos)
        return filename; // no suffix
    else
        return filename.substr(0, suffixPos);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x2e, %esi
movq $-0x1, %rdx
callq 0x88f0
cmpq $-0x1, %rax
je 0x50839
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x84a0
jmp 0x50852
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x2e45c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: calculateInbreedingCoefficient(std::vector<int, std::allocator<int>>&)
double calculateInbreedingCoefficient(std::vector<int>& individualsWithVariant) {
    int naa = 0; int nAa = 0; int nAA = 0;
    for (std::vector<int>::size_type i = 0; i != individualsWithVariant.size(); i++) {
        if (individualsWithVariant[i] == 0) naa++;
        if (individualsWithVariant[i] == 1) nAa++;
        if (individualsWithVariant[i] == 2) nAA++;
    }
    
    // Get the proportions of alt-hom and hets
    double pAA = (double)nAA / individualsWithVariant.size();
    double pAa = (double)nAa / individualsWithVariant.size();
    
    // Allele frequencies
    double p = pAA + (0.5 * pAa);
    double q = 1 - p;
    
    // Get the Hardy-Weinberg prediction for expected number of heterozygotes:
    double HWAa = 2*p*q;

    
    // Get the inbreeding coefficient
    double F = (HWAa - pAa) / HWAa;
    return F;
}

// Assembly:
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
movq %rdx, %rax
subq %rcx, %rax
sarq $0x2, %rax
cmpq %rcx, %rdx
je 0x5091f
xorl %edx, %edx
xorl %esi, %esi
xorl %edi, %edi
movl (%rcx,%rdi,4), %r8d
xorl %r9d, %r9d
cmpl $0x1, %r8d
sete %r9b
addl %r9d, %edx
xorl %r9d, %r9d
cmpl $0x2, %r8d
sete %r9b
addl %r9d, %esi
incq %rdi
cmpq %rdi, %rax
jne 0x508ed
cvtsi2sd %esi, %xmm0
cvtsi2sd %edx, %xmm1
jmp 0x50927
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
movq %rax, %xmm2
punpckldq 0x7986c(%rip), %xmm2 # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
subpd 0x79874(%rip), %xmm2    # 0xca1b0
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
addsd %xmm2, %xmm3
divsd %xmm3, %xmm0
divsd %xmm3, %xmm1
movsd 0x7eaf8(%rip), %xmm2    # 0xcf450
mulsd %xmm1, %xmm2
addsd %xmm0, %xmm2
movsd 0x7ead8(%rip), %xmm0    # 0xcf440
subsd %xmm2, %xmm0
addsd %xmm2, %xmm2
mulsd %xmm0, %xmm2
movapd %xmm2, %xmm0
subsd %xmm1, %xmm0
divsd %xmm2, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: randomisePhase(char&, char&)
void randomisePhase(char& v1, char& v2) {
    if (v1 != v2) {
        char temp;
        double r = ((double) rand() / (RAND_MAX));
        if (r > 0.5) {
            temp = v1;
            v1 = v2; v2 = temp;
        }
    }
}

// Assembly:
movb (%rdi), %al
cmpb (%rsi), %al
je 0x50e37
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x8140
cvtsi2sd %eax, %xmm0
divsd 0x792ec(%rip), %xmm0    # 0xca108
ucomisd 0x7e62c(%rip), %xmm0    # 0xcf450
jbe 0x50e30
movb (%r14), %al
movb (%rbx), %cl
movb %cl, (%r14)
movb %al, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: MultiallelicCounts::getHeterozygosityThisVariant()
double MultiallelicCounts::getHeterozygosityThisVariant() {
    
    std::vector<int> nonMissingHets = individualsHets;
    nonMissingHets.erase(std::remove(nonMissingHets.begin(), nonMissingHets.end(), -1), nonMissingHets.end());
    
    int numNonMisInds = (int) nonMissingHets.size();
    int numHets = vector_sum(nonMissingHets);
    
    double hetThisVar = (double)numHets/(double)numNonMisInds;
    return hetThisVar;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
leaq 0x20(%rdi), %rsi
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x35990
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
leaq 0x1c(%rsp), %rdx
movl $0xffffffff, (%rdx)     # imm = 0xFFFFFFFF
callq 0x56564
movq 0x8(%rsp), %rcx
cmpq %rcx, %rax
je 0x50f97
movq 0x8(%rsp), %rdx
movq %rdx, %rsi
subq %rcx, %rsi
addq %rsi, %rax
cmpq %rax, %rdx
je 0x50f97
movq %rax, 0x8(%rsp)
movq %rsp, %rsi
movq (%rsi), %r14
movq 0x8(%rsi), %rbx
leaq 0x30(%rsp), %rdi
callq 0x35990
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rax
subq %rdi, %rax
je 0x50fea
sarq $0x2, %rax
cmpq $0x1, %rax
adcq $0x0, %rax
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
xorps %xmm1, %xmm1
cvtsi2sdl (%rdi,%rcx,4), %xmm1
addsd %xmm1, %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0x50fcc
cvttpd2dq %xmm0, %xmm0
cvtdq2pd %xmm0, %xmm0
jmp 0x50fed
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
testq %rdi, %rdi
je 0x51004
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x5101a
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
subq %r14, %rbx
shrq $0x2, %rbx
xorps %xmm1, %xmm1
cvtsi2sd %ebx, %xmm1
movapd 0x20(%rsp), %xmm0
divsd %xmm1, %xmm0
addq $0x48, %rsp
popq %rbx
popq %r14
retq
jmp 0x5103c
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x51055
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x8840
nop
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: MultiallelicCounts::getPiThisVariant()
double MultiallelicCounts::getPiThisVariant() {
    
    std::vector<int> nonMissingHaplotypeVars = haplotypeVariants;
    nonMissingHaplotypeVars.erase(std::remove(nonMissingHaplotypeVars.begin(), nonMissingHaplotypeVars.end(), -1), nonMissingHaplotypeVars.end());
    
    int countedNumComparisons = 0;  // TEST
    int numDiffs = 0; int numHaplotypes = (int) nonMissingHaplotypeVars.size();
    for (std::vector<std::string>::size_type i = 0; i !=  numHaplotypes - 1; i++) {
        for (std::vector<std::string>::size_type j = i+1; j != numHaplotypes; j++) {
            if (nonMissingHaplotypeVars[i] != nonMissingHaplotypeVars[j]) {
                numDiffs++;
            }
            countedNumComparisons++;
        }
    }
    int numComparisons = (numHaplotypes * (numHaplotypes -1)) / 2;
    assert(numComparisons == countedNumComparisons);
    
    double piThisVar = (double)numDiffs/(double)numComparisons;
    
    return piThisVar;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
leaq 0x38(%rdi), %rsi
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x35990
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
leaq 0x24(%rsp), %rdx
movl $0xffffffff, (%rdx)     # imm = 0xFFFFFFFF
callq 0x56564
movq 0x8(%rsp), %rcx
cmpq %rcx, %rax
je 0x510b0
movq 0x8(%rsp), %rdx
movq %rdx, %rsi
subq %rcx, %rsi
addq %rsi, %rax
cmpq %rax, %rdx
je 0x510b0
movq %rax, 0x8(%rsp)
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
subq %rdi, %rax
shrq $0x2, %rax
movl %eax, %ecx
decl %ecx
je 0x51118
movslq %ecx, %rsi
movslq %eax, %r8
leaq -0x1(%r8), %r9
leaq 0x4(%rdi), %r10
xorl %r11d, %r11d
xorl %edx, %edx
xorl %ebx, %ebx
movq %r11, %r14
incq %r11
cmpq %r8, %r11
je 0x51106
movl (%rdi,%r14,4), %ebp
xorl %r14d, %r14d
xorl %r15d, %r15d
cmpl (%r10,%r14,4), %ebp
setne %r15b
addl %r15d, %ebx
incq %r14
cmpq %r14, %r9
jne 0x510ed
addl %r14d, %edx
decq %r9
addq $0x4, %r10
cmpq %rsi, %r11
jne 0x510db
cvtsi2sd %ebx, %xmm0
jmp 0x5111e
xorl %edx, %edx
xorpd %xmm0, %xmm0
imull %eax, %ecx
movl %ecx, %ebx
shrl $0x1f, %ebx
addl %ecx, %ebx
sarl %ebx
cmpl %edx, %ebx
jne 0x5115f
testq %rdi, %rdi
je 0x5114c
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
movsd %xmm0, 0x18(%rsp)
callq 0x8480
movsd 0x18(%rsp), %xmm0
cvtsi2sd %ebx, %xmm1
divsd %xmm1, %xmm0
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x85e20(%rip), %rdi     # 0xd6f86
leaq 0x85e41(%rip), %rsi     # 0xd6fae
leaq 0x85e50(%rip), %rcx     # 0xd6fc4
movl $0x15e, %edx            # imm = 0x15E
callq 0x82c0
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x51197
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: testOverallReadDepth(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool testOverallReadDepth(const int maxReadDepth,const int minReadDepth, const std::string& infoField) {
    std::vector<std::string> info = split(infoField, ';');
    if (info[0] == "INDEL") {
        split(info[1], '=', info);
    } else {
        split(info[0], '=', info);
    }
    int DP = atoi((info.back()).c_str());
    if (DP <= maxReadDepth && DP >= minReadDepth) { return true; }
    else { return false; }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %ebx
movl %edi, %ebp
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rdx, %rsi
movl $0x3b, %edx
callq 0x50624
movq (%r14), %rdi
leaq 0x7ca80(%rip), %rsi     # 0xcf522
callq 0x8160
xorl %edi, %edi
testl %eax, %eax
sete %dil
shll $0x5, %edi
addq (%r14), %rdi
movl $0x3d, %esi
movq %r14, %rdx
callq 0x502d0
leaq 0x8(%rsp), %r14
movq 0x8(%r14), %rax
movq -0x20(%rax), %rdi
callq 0x86e0
cmpl %ebp, %eax
setle %cl
cmpl %ebx, %eax
setge %bl
andb %cl, %bl
movq %r14, %rdi
callq 0x3123c
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3123c
movq %rbx, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: tabulateVector(std::vector<int, std::allocator<int>>&)
std::map<int, int> tabulateVector(std::vector<int>& vec) {
    std::vector<int> vecCopy(vec); 
    std::sort(vecCopy.begin(), vecCopy.end());
    std::vector<int>::iterator it = std::unique(vecCopy.begin(), vecCopy.end());
    vecCopy.resize(std::distance(vecCopy.begin(), it));
    
    std::map<int, int>  table;
    //int pos = 0;
    for (std::vector<int>::size_type i = 0; i != vecCopy.size(); i++) {
        int mycount = std::count(vec.begin(), vec.end(), vecCopy[i]);
        table[vecCopy[i]] = mycount;
        //pos = pos + mycount;
    }
    return table;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r12
movq %r12, %rdi
callq 0x35990
movq (%r12), %r15
movq 0x8(%r12), %r12
cmpq %r12, %r15
je 0x52cf9
movq %r12, %rax
subq %r15, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x56f2f
movq %r15, %rdi
movq %r12, %rsi
callq 0x57012
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x57282
movq %rsp, %rdi
subq (%rdi), %rax
sarq $0x2, %rax
movq %rax, %rsi
callq 0x54d18
leaq 0x8(%rbx), %rax
movl $0x0, 0x8(%rbx)
xorl %ecx, %ecx
movq %rcx, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq %rax, 0x20(%rbx)
movq %rcx, 0x28(%rbx)
movq (%rsp), %rdi
cmpq %rdi, 0x8(%rsp)
je 0x52d96
xorl %r15d, %r15d
movq (%r14), %rax
movq 0x8(%r14), %rcx
leaq (%rdi,%r15,4), %rsi
movl $0x0, %r12d
cmpq %rcx, %rax
je 0x52d73
movl (%rsi), %edx
xorl %r12d, %r12d
xorl %edi, %edi
cmpl %edx, (%rax)
sete %dil
addq %rdi, %r12
addq $0x4, %rax
cmpq %rcx, %rax
jne 0x52d5f
movq %rbx, %rdi
callq 0x54d4a
movl %r12d, (%rax)
incq %r15
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
subq %rdi, %rax
sarq $0x2, %rax
cmpq %rax, %r15
jne 0x52d44
testq %rdi, %rdi
je 0x52da8
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x52db9
movq %rax, %r14
jmp 0x52dc9
movq %rax, %r14
movq %rbx, %rdi
callq 0x55666
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x52ddf
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq %r14, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: rearrange_doubletons(std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&)
void rearrange_doubletons(std::vector<std::vector<int> >& doubletons){
    for (std::vector<std::vector<int> >::size_type i = 0; i < doubletons.size(); i++) {
        for (int j = 0; j < i; j++) {
            doubletons[i][j] = doubletons[i][j] + doubletons[j][i];
            doubletons[j][i] = 0;
        }    
    }
}

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rdx
subq %rax, %rdx
je 0x52e49
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %edx, %edx
testq %rdx, %rdx
je 0x52e41
leaq (%rdx,%rdx,2), %rsi
movq (%rax,%rsi,8), %rsi
movq %rax, %rdi
xorl %r8d, %r8d
movq (%rdi), %r9
movl (%r9,%rdx,4), %r10d
addl %r10d, (%rsi,%r8,4)
movl $0x0, (%r9,%rdx,4)
incq %r8
addq $0x18, %rdi
cmpq %r8, %rdx
jne 0x52e22
incq %rdx
cmpq %rcx, %rdx
jne 0x52e0f
retq
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: readSampleNamesFromTextFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::vector<string> readSampleNamesFromTextFile(const std::string& sampleNameFile) {
    std::vector<string> sampleNames;
    std::ifstream* sampleFile = new std::ifstream(sampleNameFile.c_str());
    string line;
    while (getline(*sampleFile, line)) {
        sampleNames.push_back(line);
    }
    return sampleNames;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %r14
movq (%r15), %rsi
movq %rax, %rdi
movl $0x8, %edx
callq 0x8860
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x8(%rsp), %r15
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5304c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x33db0
jmp 0x5300f
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x53063
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r15
movl $0x208, %esi            # imm = 0x208
movq %r14, %rdi
jmp 0x53099
movq %rax, %r15
jmp 0x5309e
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5309e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x3123c
movq %r15, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: isGzip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool isGzip(const std::string& filename)
{
    size_t suffix_length = sizeof(GZIP_EXT) - 1;
    
    // Assume files without an extension are not compressed
    if(filename.length() < suffix_length)
        return false;
    
    std::string extension = suffix(filename, suffix_length);
    return extension == GZIP_EXT;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
cmpq $0x3, 0x8(%rdi)
jae 0x53100
xorl %ebx, %ebx
jmp 0x53143
movq %rdi, %rsi
leaq 0x8(%rsp), %r14
movl $0x3, %edx
movq %r14, %rdi
callq 0x530ae
leaq 0x83811(%rip), %rsi     # 0xd692d
movq %r14, %rdi
callq 0x8160
testl %eax, %eax
sete %bl
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x53143
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: createReader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::_Ios_Openmode)
std::istream* createReader(const std::string& filename, std::ios_base::openmode mode)
{
    if(isGzip(filename))
    {
        igzstream* pGZ = new igzstream(filename.c_str(), mode);
        assertGZOpen(*pGZ, filename);
        return pGZ;
    }
    else
    {
        std::ifstream* pReader = new std::ifstream(filename.c_str(), mode);
        assertFileOpen(*pReader, filename);
        return pReader;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0x530ee
testb %al, %al
je 0x53264
movl $0x2a0, %edi            # imm = 0x2A0
callq 0x8470
movq %rax, %rbx
movq (%r14), %rsi
movq %rax, %rdi
movl %ebp, %edx
callq 0x54dae
movq %rbx, %rdi
movq %r14, %rsi
callq 0x531e1
addq $0x188, %rbx            # imm = 0x188
jmp 0x53289
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %rbx
movq (%r14), %rsi
movq %rax, %rdi
movl %ebp, %edx
callq 0x8860
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5314d
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movl $0x208, %esi            # imm = 0x208
jmp 0x532a3
movq %rax, %r14
movl $0x2a0, %esi            # imm = 0x2A0
movq %rbx, %rdi
callq 0x8480
movq %r14, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: createWriter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::_Ios_Openmode)
std::ostream* createWriter(const std::string& filename,
                           std::ios_base::openmode mode)
{
    if(isGzip(filename))
    {
        ogzstream* pGZ = new ogzstream(filename.c_str(), mode);
        assertGZOpen(*pGZ, filename);
        return pGZ;
    }
    else
    {
        std::ofstream* pWriter = new std::ofstream(filename.c_str(), mode);
        assertFileOpen(*pWriter, filename);
        return pWriter;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0x530ee
testb %al, %al
je 0x532f3
movl $0x298, %edi            # imm = 0x298
callq 0x8470
movq %rax, %rbx
movq (%r14), %rsi
movq %rax, %rdi
movl %ebp, %edx
callq 0x54ea8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x531e1
addq $0x188, %rbx            # imm = 0x188
jmp 0x53318
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, %rbx
movq (%r14), %rsi
movq %rax, %rdi
movl %ebp, %edx
callq 0x84c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x53197
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movl $0x200, %esi            # imm = 0x200
jmp 0x53332
movq %rax, %r14
movl $0x298, %esi            # imm = 0x298
movq %rbx, %rdi
callq 0x8480
movq %r14, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: locateSet(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
std::vector<size_t> locateSet(std::vector<std::string>& sample_names, const std::vector<std::string>& set) {
    std::vector<size_t> setLocs;
    for (std::vector<std::string>::size_type i = 0; i != set.size(); i++) {
        std::vector<std::string>::iterator it = std::find(sample_names.begin(), sample_names.end(), set[i]);
        if (it == sample_names.end()) {
            std::cerr << "Did not find the sample: \"" << set[i] << "\"" << std::endl;
            print_vector(sample_names, std::cerr,',');
        } else {
            size_t loc = std::distance(sample_names.begin(), it);
            setLocs.push_back(loc);
        }
    }
    return setLocs;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rdx), %rdx
cmpq %rdx, 0x8(%r14)
je 0x53647
movq %rsi, %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
movq (%r15), %rdi
movq 0x8(%r15), %rsi
addq %r12, %rdx
callq 0x575e4
cmpq 0x8(%r15), %rax
je 0x53578
subq (%r15), %rax
sarq $0x5, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x5361c
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x53629
movl $0x1a, %edx
movq 0xb7a64(%rip), %rdi     # 0x10afe8
leaq 0x83b7b(%rip), %rsi     # 0xd7106
callq 0x84e0
movq (%r14), %rax
movq (%rax,%r12), %rsi
movq 0x8(%rax,%r12), %rdx
movq 0xb7a45(%rip), %rdi     # 0x10afe8
callq 0x84e0
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
leaq 0x83b65(%rip), %rsi     # 0xd711f
callq 0x84e0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbp, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x3273a
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq 0xb79e5(%rip), %rsi     # 0x10afe8
movl $0x2c, %edx
movl $0x1, %ecx
callq 0x39979
movq %rbp, %rdi
callq 0x3123c
jmp 0x53629
movq %rbx, %rdi
leaq 0x8(%rsp), %rdx
callq 0x57718
incq %r13
movq (%r14), %rdx
movq 0x8(%r14), %rax
subq %rdx, %rax
sarq $0x5, %rax
addq $0x20, %r12
cmpq %rax, %r13
jne 0x53539
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5366a
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x3123c
jmp 0x5366d
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x53681
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x8480
movq %r14, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: complementIndices(unsigned long, std::vector<unsigned long, std::allocator<unsigned long>> const&)
std::vector<size_t> complementIndices(const size_t fullVectorSize, const std::vector<size_t>& originalIndices) {
    std::vector<size_t> indexComplement;
    std::vector<bool> isInOriginal(fullVectorSize, false);
    for (const size_t j : originalIndices) {
        isInOriginal[j] = true;
    }
    indexComplement.reserve(fullVectorSize - originalIndices.size());
    for (size_t i = 0; i < fullVectorSize; i++) {
        if (!isInOriginal[i])
        indexComplement.push_back(i);
    }
    return indexComplement;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x10(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rcx
callq 0x54f98
movabsq $-0x8000000000000000, %r12 # imm = 0x8000000000000000
movq (%r15), %rdx
movq 0x8(%r15), %rax
cmpq %rax, %rdx
je 0x53724
movq 0x18(%rsp), %rsi
leaq 0x3f(%r12), %rdi
movq %rdx, %r8
movq (%r8), %rcx
leaq 0x3f(%rcx), %r9
testq %rcx, %rcx
cmovnsq %rcx, %r9
sarq $0x6, %r9
movq %rcx, %r10
andq %rdi, %r10
xorl %r11d, %r11d
cmpq %r12, %r10
setbe %r11b
movl $0x1, %r10d
shlq %cl, %r10
leaq (%rsi,%r9,8), %rcx
orq %r10, -0x8(%rcx,%r11,8)
addq $0x8, %r8
cmpq %rax, %r8
jne 0x536e7
subq %rdx, %rax
sarq $0x3, %rax
movq %r14, %rsi
subq %rax, %rsi
movq %rbx, %rdi
callq 0x55000
movq $0x0, 0x10(%rsp)
testq %r14, %r14
je 0x537b9
xorl %eax, %eax
leaq 0x3f(%r12), %r13
leaq 0x10(%rsp), %r15
leaq 0x3f(%rax), %rcx
testq %rax, %rax
cmovnsq %rax, %rcx
sarq $0x6, %rcx
shlq $0x3, %rcx
addq 0x18(%rsp), %rcx
movq %rax, %rdx
andq %r13, %rdx
xorl %esi, %esi
cmpq %r12, %rdx
setbe %sil
movq -0x8(%rcx,%rsi,8), %rcx
btq %rax, %rcx
jb 0x537a7
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x5379c
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x537a7
movq %rbx, %rdi
movq %r15, %rdx
callq 0x57718
movq 0x10(%rsp), %rax
incq %rax
movq %rax, 0x10(%rsp)
cmpq %r14, %rax
jb 0x53753
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x537e9
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
xorl %eax, %eax
movq %rax, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movl %eax, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x53801
movq %rax, %r14
jmp 0x53834
movq %rax, %r14
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x53834
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
xorl %eax, %eax
movq %rax, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movl %eax, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x53848
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x8480
movq %r14, %rdi
callq 0x8840
// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: locateOneSample(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
size_t locateOneSample(std::vector<std::string>& sample_names, const std::string toFind) {
    size_t pos = 0;
    std::vector<std::string>::iterator it = std::find(sample_names.begin(), sample_names.end(), toFind);
    if (it == sample_names.end()) {
        std::cerr << "Did not find the sample: " << toFind << std::endl;
    } else {
        pos = std::distance(sample_names.begin(), it);
    }
    return pos;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
movq 0x8(%r14), %rsi
movq %rbx, %rdx
callq 0x575e4
cmpq 0x8(%r14), %rax
je 0x53878
subq (%r14), %rax
sarq $0x5, %rax
jmp 0x538ce
movq 0xb7769(%rip), %r14     # 0x10afe8
leaq 0x8389b(%rip), %rsi     # 0xd7121
movl $0x19, %edx
movq %r14, %rdi
callq 0x84e0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x84e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq