// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_print_routines.cpp
// Function: print_AllH_pairwise_diff_stats(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&, int, std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>> const&)
void print_AllH_pairwise_diff_stats(const string& fileRoot, const std::vector<std::string>& samples, const int totalVariantNumber, const std::vector<std::vector<double> >& diffMatrixAllH) {
    std::ios_base::openmode mode_out = std::ios_base::out;
    string diffFileNameAllH = fileRoot + ".diff_matrix_AllH.txt";
    std::ofstream* pDiffAllHOutFile = new std::ofstream(diffFileNameAllH.c_str(), mode_out);
    *pDiffAllHOutFile << "# Input file:" << fileRoot << ".vcf" << std::endl;
    *pDiffAllHOutFile << "# Total number of segragating variant sites in this sample:" << totalVariantNumber << std::endl;
    *pDiffAllHOutFile << "# Differences between all haplotypes:" << std::endl;
    
    std::vector<std::string> header;
    for (std::vector<std::string>::size_type i = 0; i < samples.size(); i++) {
        header.push_back(samples[i] + "_H1");
        header.push_back(samples[i] + "_H2");
    }
    
    // print statistics
    print_vector(header,*pDiffAllHOutFile);
    print_matrix<const std::vector<std::vector<double> >&>(diffMatrixAllH, *pDiffAllHOutFile);
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rcx, %r13
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x2e45c
leaq 0x7d794(%rip), %rsi     # 0xd81ce
movq %r14, %rdi
callq 0x88c0
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, %r14
movq 0x20(%rsp), %rsi
movq %rax, %rdi
movl $0x10, %edx
callq 0x84c0
leaq 0x7d363(%rip), %rsi     # 0xd7dcb
movl $0xd, %edx
movq %r14, %rdi
callq 0x84e0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x84e0
movq %rax, %rbx
leaq 0x87542(%rip), %rsi     # 0xe1fd0
movl $0x4, %edx
movq %rax, %rdi
callq 0x84e0
movq (%rbx), %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
leaq 0x7d4d9(%rip), %rsi     # 0xd7fa2
movl $0x3b, %edx
movq %r14, %rdi
callq 0x84e0
movq %r14, %rdi
movl %ebp, %esi
callq 0x8810
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
leaq 0x7d6d3(%rip), %rsi     # 0xd81e4
movl $0x25, %edx
movq %r14, %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 %r14, 0x60(%rsp)
movq %r13, 0x68(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movq (%r15), %rax
cmpq %rax, 0x8(%r15)
je 0x5ac33
leaq 0x10(%rsp), %r14
movl $0x8, %r13d
xorl %ebx, %ebx
movq %rsp, %r12
leaq 0x40(%rsp), %rbp
movq %r14, (%rsp)
movq -0x8(%rax,%r13), %rsi
movq (%rax,%r13), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x2e45c
movq %r12, %rdi
leaq 0x7d626(%rip), %rsi     # 0xd81ca
callq 0x88c0
movq %rbp, %rdi
movq %r12, %rsi
callq 0x416a6
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x5abca
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8480
movq (%r15), %rax
movq %r14, (%rsp)
movq -0x8(%rax,%r13), %rsi
movq (%rax,%r13), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x2e45c
movq %r12, %rdi
leaq 0x7d61b(%rip), %rsi     # 0xd820a
callq 0x88c0
movq %rbp, %rdi
movq %r12, %rsi
callq 0x416a6
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x5ac15
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8480
incq %rbx
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %r13
cmpq %rcx, %rbx
jb 0x5ab82
leaq 0x70(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x30(%rsp), %rbx
callq 0x3273a
leaq 0x70(%rsp), %rdi
movq 0x60(%rsp), %r15
movq %r15, %rsi
movl $0x9, %edx
movl $0x1, %ecx
callq 0x39979
movq 0x68(%rsp), %r14
leaq 0x70(%rsp), %rdi
callq 0x3123c
movq %r14, %rdi
movq %r15, %rsi
callq 0x5aeca
leaq 0x40(%rsp), %rdi
callq 0x3123c
movq 0x20(%rsp), %rdi
cmpq %rbx, %rdi
je 0x5ac9e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x8480
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x3123c
jmp 0x5ad00
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdi
callq 0x8480
jmp 0x5ad0f
jmp 0x5acd5
jmp 0x5ace0
movq %rax, %rbx
jmp 0x5ad0f
jmp 0x5ace0
jmp 0x5ace7
jmp 0x5ace7
movq %rax, %rbx
jmp 0x5ad00
jmp 0x5ace7
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x5ad00
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x40(%rsp), %rdi
callq 0x3123c
leaq 0x30(%rsp), %r12
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x5ad26
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x8840