// File: /workspace/github_cpp_makefile_star2_O3/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 0x2ba06
leaq 0x7716e(%rip), %rsi     # 0xd1d0c
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 0x76d3d(%rip), %rsi     # 0xd1909
movl $0xd, %edx
movq %r14, %rdi
callq 0x84e0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x84e0
movq %rax, %rbx
leaq 0x7f9be(%rip), %rsi     # 0xda5b0
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 0x76eb3(%rip), %rsi     # 0xd1ae0
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 0x770ad(%rip), %rsi     # 0xd1d22
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 0x5ad97
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 0x2ba06
movq %r12, %rdi
leaq 0x77000(%rip), %rsi     # 0xd1d08
callq 0x88c0
movq %rbp, %rdi
movq %r12, %rsi
callq 0x3e784
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x5ad2e
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 0x2ba06
movq %r12, %rdi
leaq 0x76ff5(%rip), %rsi     # 0xd1d48
callq 0x88c0
movq %rbp, %rdi
movq %r12, %rsi
callq 0x3e784
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x5ad79
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 0x5ace6
leaq 0x70(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x30(%rsp), %rbx
callq 0x2fc8e
leaq 0x70(%rsp), %rdi
movq 0x60(%rsp), %r15
movq %r15, %rsi
movl $0x9, %edx
movl $0x1, %ecx
callq 0x36ba0
movq 0x68(%rsp), %r14
leaq 0x70(%rsp), %rdi
callq 0x2e784
movq %r14, %rdi
movq %r15, %rsi
callq 0x5b035
leaq 0x40(%rsp), %rdi
callq 0x2e784
movq 0x20(%rsp), %rdi
cmpq %rbx, %rdi
je 0x5ae02
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 0x2e784
jmp 0x5ae64
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdi
callq 0x8480
jmp 0x5ae73
jmp 0x5ae39
jmp 0x5ae44
movq %rax, %rbx
jmp 0x5ae73
jmp 0x5ae44
jmp 0x5ae4b
jmp 0x5ae4b
movq %rax, %rbx
jmp 0x5ae64
jmp 0x5ae4b
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x5ae64
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x40(%rsp), %rdi
callq 0x2e784
leaq 0x30(%rsp), %r12
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x5ae8a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x8840