// File: /workspace/github_cpp_makefile_star2_O3/millanek[P]evo/process_vcf_print_routines.cpp
// Function: print_het_counts(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&)
void print_het_counts(const string& fileRoot, const std::vector<std::string>& header, const std::vector<int>& hetCounts, const std::vector<int>& sharedHetCounts) {
    assert(hetCounts.size() == sharedHetCounts.size());
    std::ios_base::openmode mode_out = std::ios_base::out;
    string hetFileName = fileRoot + ".hets.txt";
    string sharedHetFileName = fileRoot + ".sharedHets.txt";
    std::ofstream* pHetsOutFile = new std::ofstream(hetFileName.c_str(), mode_out);
    std::ofstream* pSharedHetsOutFile = new std::ofstream(sharedHetFileName.c_str(), mode_out);
    *pHetsOutFile << "# Het counts" << std::endl;
    *pHetsOutFile << "# Input file:" << fileRoot << ".vcf" << std::endl;
    
    *pSharedHetsOutFile << "# Shared het counts (line1) and proportions (line 2)" << std::endl;
    *pSharedHetsOutFile << "# Input file:" << fileRoot << ".vcf" << std::endl;

    // Calculate shared het proportions
    std::vector<double> sharedHetProportions;
    for (int i = 0; i < (int)sharedHetCounts.size(); i++) {
        sharedHetProportions.push_back((double)sharedHetCounts[i]/hetCounts[i]);
    }
    
    // print het counts
    print_vector(header,*pHetsOutFile);
    print_vector(hetCounts, *pHetsOutFile);
    
    // print shared het counts and proportions
    print_vector(header,*pSharedHetsOutFile);
    print_vector(sharedHetCounts, *pSharedHetsOutFile);
    print_vector(sharedHetProportions, *pSharedHetsOutFile);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rcx, %rbx
movq 0x8(%rdx), %rax
subq (%rdx), %rax
movq 0x8(%rcx), %rcx
subq (%rbx), %rcx
cmpq %rcx, %rax
jne 0x599d2
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbp
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0x2ba06
leaq 0x78400(%rip), %rsi     # 0xd19dd
movq %r14, %rdi
callq 0x88c0
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
addq %rsi, %rdx
leaq 0x18(%rsp), %rdi
callq 0x2ba06
leaq 0x783dd(%rip), %rsi     # 0xd19e7
leaq 0x18(%rsp), %rdi
callq 0x88c0
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, %r13
movq %r15, 0x60(%rsp)
movq 0x38(%rsp), %rsi
movq %rax, %rdi
movl $0x10, %edx
callq 0x84c0
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, %r15
movq 0x18(%rsp), %rsi
movq %rax, %rdi
movl $0x10, %edx
callq 0x84c0
leaq 0x78399(%rip), %rsi     # 0xd19f7
movl $0xc, %edx
movq %r13, %rdi
callq 0x84e0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r13, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0x7826f(%rip), %rsi     # 0xd1909
movl $0xd, %edx
movq %r13, %rdi
callq 0x84e0
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
movq %r13, %rdi
callq 0x84e0
movq %rax, %r14
leaq 0x80eef(%rip), %rsi     # 0xda5b0
movl $0x4, %edx
movq %rax, %rdi
callq 0x84e0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r14, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0x78308(%rip), %rsi     # 0xd1a04
movl $0x34, %edx
movq %r15, %rdi
callq 0x84e0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r15, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0x781d2(%rip), %rsi     # 0xd1909
movl $0xd, %edx
movq %r15, %rdi
callq 0x84e0
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
movq %r15, %rdi
callq 0x84e0
movq %rax, %r14
leaq 0x80e52(%rip), %rsi     # 0xda5b0
movl $0x4, %edx
movq %rax, %rdi
callq 0x84e0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r14, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq %r15, 0x58(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
shrq $0x2, %rdx
testl %edx, %edx
jle 0x59831
xorl %r15d, %r15d
movq %rsp, %rbp
leaq 0xb0(%rsp), %r14
xorps %xmm0, %xmm0
cvtsi2sdl (%rax,%r15,4), %xmm0
movq (%r12), %rdx
xorps %xmm1, %xmm1
cvtsi2sdl (%rdx,%r15,4), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0xb0(%rsp)
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x5980a
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x5981c
movq %rbp, %rdi
movq %r14, %rdx
callq 0x311fc
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
incq %r15
movq %rcx, %rdx
subq %rax, %rdx
shrq $0x2, %rdx
movslq %edx, %rdx
cmpq %rdx, %r15
jl 0x597cc
leaq 0xd0(%rsp), %rdi
movq 0x60(%rsp), %r14
movq %r14, %rsi
callq 0x2fc8e
movq 0x58(%rsp), %r15
leaq 0xd0(%rsp), %rdi
movq %r13, %rsi
movl $0x9, %edx
movl $0x1, %ecx
callq 0x36ba0
leaq 0xd0(%rsp), %rdi
callq 0x2e784
leaq 0x98(%rsp), %rdi
movq %r12, %rsi
callq 0x32ee6
leaq 0x98(%rsp), %rdi
movq %r13, %rsi
movl $0x9, %edx
movl $0x1, %ecx
callq 0x3e6d2
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x598b9
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
leaq 0xb8(%rsp), %rdi
movq %r14, %rsi
callq 0x2fc8e
leaq 0xb8(%rsp), %rdi
movq %r15, %rsi
movl $0x9, %edx
movl $0x1, %ecx
callq 0x36ba0
leaq 0xb8(%rsp), %rdi
callq 0x2e784
leaq 0x80(%rsp), %rdi
movq %rbx, %rsi
callq 0x32ee6
leaq 0x80(%rsp), %rdi
movq %r15, %rsi
movl $0x9, %edx
movl $0x1, %ecx
callq 0x3e6d2
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x59937
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
leaq 0x68(%rsp), %rdi
movq %rsp, %rsi
callq 0x37978
leaq 0x68(%rsp), %rdi
movq %r15, %rsi
movl $0x9, %edx
movl $0x1, %ecx
callq 0x5af81
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x59972
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x59988
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x599a4
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x599c0
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x8480
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x77f3e(%rip), %rdi     # 0xd1917
leaq 0x77f62(%rip), %rsi     # 0xd1942
leaq 0x77f7a(%rip), %rcx     # 0xd1961
movl $0x1e, %edx
callq 0x82c0
movq %rax, %rbx
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x59a8e
movq 0x78(%rsp), %rsi
jmp 0x59a48
movq %rax, %rbx
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x59a8e
movq 0x90(%rsp), %rsi
jmp 0x59a48
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
jmp 0x59a5d
movq %rax, %rbx
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x59a8e
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
jmp 0x59a8e
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x2e784
jmp 0x59a8e
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq %r15, %rdi
jmp 0x59a9f
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq %r13, %rdi
jmp 0x59a9f
jmp 0x59aa6
jmp 0x59aa6
jmp 0x59a84
movq %rax, %rbx
jmp 0x59ac5
jmp 0x59a8b
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x59aa9
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
jmp 0x59aa9
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x59ac5
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x59ae1
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x8840