// File: /workspace/github_cpp_makefile_star2_O1/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 0x5986c
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 0x2e45c
leaq 0x7ea22(%rip), %rsi     # 0xd7e9f
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 0x2e45c
leaq 0x7e9ff(%rip), %rsi     # 0xd7ea9
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 0x7e9bb(%rip), %rsi     # 0xd7eb9
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 0x7e891(%rip), %rsi     # 0xd7dcb
movl $0xd, %edx
movq %r13, %rdi
callq 0x84e0
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
movq %r13, %rdi
callq 0x84e0
movq %rax, %r14
leaq 0x88a6f(%rip), %rsi     # 0xe1fd0
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 0x7e92a(%rip), %rsi     # 0xd7ec6
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 0x7e7f4(%rip), %rsi     # 0xd7dcb
movl $0xd, %edx
movq %r15, %rdi
callq 0x84e0
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
movq %r15, %rdi
callq 0x84e0
movq %rax, %r14
leaq 0x889d2(%rip), %rsi     # 0xe1fd0
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
subq %rax, %rcx
shrq $0x2, %rcx
testl %ecx, %ecx
jle 0x596cb
xorl %r15d, %r15d
movq %rsp, %rbp
leaq 0xb0(%rsp), %r14
xorps %xmm0, %xmm0
cvtsi2sdl (%rax,%r15,4), %xmm0
movq (%r12), %rax
xorps %xmm1, %xmm1
cvtsi2sdl (%rax,%r15,4), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0xb0(%rsp)
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x596a7
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x596b2
movq %rbp, %rdi
movq %r14, %rdx
callq 0x33c70
incq %r15
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r15
jl 0x59669
leaq 0xd0(%rsp), %rdi
movq 0x60(%rsp), %r14
movq %r14, %rsi
callq 0x3273a
movq 0x58(%rsp), %r15
leaq 0xd0(%rsp), %rdi
movq %r13, %rsi
movl $0x9, %edx
movl $0x1, %ecx
callq 0x39979
leaq 0xd0(%rsp), %rdi
callq 0x3123c
leaq 0x98(%rsp), %rdi
movq %r12, %rsi
callq 0x35990
leaq 0x98(%rsp), %rdi
movq %r13, %rsi
movl $0x9, %edx
movl $0x1, %ecx
callq 0x415f4
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x59753
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
leaq 0xb8(%rsp), %rdi
movq %r14, %rsi
callq 0x3273a
leaq 0xb8(%rsp), %rdi
movq %r15, %rsi
movl $0x9, %edx
movl $0x1, %ecx
callq 0x39979
leaq 0xb8(%rsp), %rdi
callq 0x3123c
leaq 0x80(%rsp), %rdi
movq %rbx, %rsi
callq 0x35990
leaq 0x80(%rsp), %rdi
movq %r15, %rsi
movl $0x9, %edx
movl $0x1, %ecx
callq 0x415f4
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x597d1
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
leaq 0x68(%rsp), %rdi
movq %rsp, %rsi
callq 0x3a864
leaq 0x68(%rsp), %rdi
movq %r15, %rsi
movl $0x9, %edx
movl $0x1, %ecx
callq 0x5ae16
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x5980c
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x59822
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x5983e
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x5985a
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 0x7e566(%rip), %rdi     # 0xd7dd9
leaq 0x7e58a(%rip), %rsi     # 0xd7e04
leaq 0x7e5a2(%rip), %rcx     # 0xd7e23
movl $0x1e, %edx
callq 0x82c0
movq %rax, %rbx
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x59928
movq 0x78(%rsp), %rsi
jmp 0x598e2
movq %rax, %rbx
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x59928
movq 0x90(%rsp), %rsi
jmp 0x598e2
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
jmp 0x598f7
movq %rax, %rbx
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x59928
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
jmp 0x59928
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x3123c
jmp 0x59928
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq %r15, %rdi
jmp 0x59939
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq %r13, %rdi
jmp 0x59939
jmp 0x59940
jmp 0x59940
jmp 0x5991e
movq %rax, %rbx
jmp 0x5995f
jmp 0x59925
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x59943
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
jmp 0x59943
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x5995f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x5997b
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x8840