// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_print_routines.cpp
// Function: print_H1_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>>>>&, int, std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>> const&)
void print_H1_pairwise_diff_stats(const string& fileRoot, std::vector<std::string>& header, const int totalVariantNumber, const std::vector<std::vector<double> >& diffMatrixH1) {
    std::ios_base::openmode mode_out = std::ios_base::out;
    string diffFileNameH1 = fileRoot + ".diff_matrix_H1.txt";
    std::ofstream* pDiffH1OutFile = new std::ofstream(diffFileNameH1.c_str(), mode_out);
    *pDiffH1OutFile << "# Input file:" << fileRoot << ".vcf" << std::endl;
    *pDiffH1OutFile << "# Total number of segragating variant sites in this sample:" << totalVariantNumber << std::endl;
    *pDiffH1OutFile << "# Differences between H1 haplotypes:" << std::endl;

    for (std::vector<std::string>::size_type i = 0; i < header.size(); i++) {
        header[i] = header[i] + "_H1";
    }
    
    // print
    print_vector(header,*pDiffH1OutFile);
    print_matrix<const std::vector<std::vector<double> >&>(diffMatrixH1, *pDiffH1OutFile);
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
addq %rsi, %rdx
movq %rsp, %r14
movq %r14, %rdi
callq 0x2e45c
leaq 0x7da03(%rip), %rsi     # 0xd8191
movq %r14, %rdi
callq 0x88c0
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, %r14
movq (%rsp), %rsi
movq %rax, %rdi
movl $0x10, %edx
callq 0x84c0
leaq 0x7d610(%rip), %rsi     # 0xd7dcb
movl $0xd, %edx
movq %r14, %rdi
callq 0x84e0
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r14, %rdi
callq 0x84e0
movq %rax, %r12
leaq 0x877ed(%rip), %rsi     # 0xe1fd0
movl $0x4, %edx
movq %rax, %rdi
callq 0x84e0
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
leaq 0x7d783(%rip), %rsi     # 0xd7fa2
movl $0x3b, %edx
movq %r14, %rdi
callq 0x84e0
movq %r14, %rdi
movl %ebp, %esi
callq 0x8810
movq %rax, %r12
movq (%rax), %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
leaq 0x7d93e(%rip), %rsi     # 0xd81a5
movl $0x24, %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, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
movq (%r15), %rax
cmpq %rax, 0x8(%r15)
je 0x5a927
leaq 0x40(%rsp), %rbp
xorl %ebx, %ebx
leaq 0x30(%rsp), %r12
leaq 0x7d909(%rip), %r13     # 0xd81ca
xorl %r14d, %r14d
movq %rbp, 0x30(%rsp)
movq (%rax,%rbx), %rsi
movq 0x8(%rax,%rbx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x2e45c
movq %r12, %rdi
movq %r13, %rsi
callq 0x88c0
movq (%r15), %rdi
addq %rbx, %rdi
movq %r12, %rsi
callq 0x8540
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5a90d
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
incq %r14
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %rbx
cmpq %rcx, %r14
jb 0x5a8c4
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0x3273a
movq 0x28(%rsp), %rbx
movq 0x20(%rsp), %r14
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
movl $0x9, %edx
movl $0x1, %ecx
callq 0x39979
leaq 0x50(%rsp), %rdi
callq 0x3123c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5aeca
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x5a985
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8480
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x3123c
jmp 0x5a9d3
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdi
jmp 0x5a9ce
jmp 0x5a9b4
jmp 0x5a9b4
movq %rax, %rbx
jmp 0x5a9d3
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5a9d3
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x5a9ee
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x8840