// File: /workspace/github_cpp_makefile_star2_O3/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 0x2ba06
leaq 0x773dd(%rip), %rsi     # 0xd1ccf
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 0x76fea(%rip), %rsi     # 0xd1909
movl $0xd, %edx
movq %r14, %rdi
callq 0x84e0
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r14, %rdi
callq 0x84e0
movq %rax, %r12
leaq 0x7fc69(%rip), %rsi     # 0xda5b0
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 0x7715d(%rip), %rsi     # 0xd1ae0
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 0x77318(%rip), %rsi     # 0xd1ce3
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 0x5aa8b
leaq 0x40(%rsp), %rbp
xorl %ebx, %ebx
leaq 0x30(%rsp), %r12
leaq 0x772e3(%rip), %r13     # 0xd1d08
xorl %r14d, %r14d
movq %rbp, 0x30(%rsp)
movq (%rax,%rbx), %rsi
movq 0x8(%rax,%rbx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x2ba06
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 0x5aa71
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 0x5aa28
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0x2fc8e
movq 0x28(%rsp), %rbx
movq 0x20(%rsp), %r14
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
movl $0x9, %edx
movl $0x1, %ecx
callq 0x36ba0
leaq 0x50(%rsp), %rdi
callq 0x2e784
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5b035
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x5aae9
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 0x2e784
jmp 0x5ab37
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdi
jmp 0x5ab32
jmp 0x5ab18
jmp 0x5ab18
movq %rax, %rbx
jmp 0x5ab37
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5ab37
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x5ab52
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x8840