// File: 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
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x10, -0x24(%rbp)
movq -0x8(%rbp), %rsi
leaq 0xaa6a2(%rip), %rdx     # 0x13c54e
leaq -0x48(%rbp), %rdi
callq 0x3da80
movl $0x200, %edi            # imm = 0x200
callq 0xa5d0
movq %rax, -0xa8(%rbp)
jmp 0x91ec8
leaq -0x48(%rbp), %rdi
callq 0xa220
movq -0xa8(%rbp), %rdi
movq %rax, %rsi
movl -0x24(%rbp), %edx
callq 0xa650
jmp 0x91ee5
movq -0xa8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
leaq 0xaa28d(%rip), %rsi     # 0x13c188
callq 0xa5c0
movq %rax, -0xb0(%rbp)
jmp 0x91f09
movq -0xb0(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xa520
movq %rax, -0xb8(%rbp)
jmp 0x91f22
movq -0xb8(%rbp), %rdi
leaq 0xb48c0(%rip), %rsi     # 0x1467f0
callq 0xa5c0
movq %rax, -0xc0(%rbp)
jmp 0x91f3e
movq -0xc0(%rbp), %rdi
movq 0x10703c(%rip), %rsi    # 0x198f88
callq 0xa610
jmp 0x91f53
movq -0x50(%rbp), %rdi
leaq 0xaa401(%rip), %rsi     # 0x13c35f
callq 0xa5c0
movq %rax, -0xc8(%rbp)
jmp 0x91f6c
movq -0xc8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0xab20
movq %rax, -0xd0(%rbp)
jmp 0x91f84
movq -0xd0(%rbp), %rdi
movq 0x106ff6(%rip), %rsi    # 0x198f88
callq 0xa610
jmp 0x91f99
movq -0x50(%rbp), %rdi
leaq 0xaa5be(%rip), %rsi     # 0x13c562
callq 0xa5c0
movq %rax, -0xd8(%rbp)
jmp 0x91fb2
movq -0xd8(%rbp), %rdi
movq 0x106fc8(%rip), %rsi    # 0x198f88
callq 0xa610
jmp 0x91fc7
movq $0x0, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3ffd0
movq %rax, %rcx
movq -0xe0(%rbp), %rax
cmpq %rcx, %rax
jae 0x92084
movq -0x10(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x3d940
movq %rax, %rsi
leaq 0xaa57a(%rip), %rdx     # 0x13c587
leaq -0x88(%rbp), %rdi
callq 0x3da80
jmp 0x9201b
movq -0x10(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x3d940
movq %rax, %rdi
leaq -0x88(%rbp), %rsi
callq 0xa710
leaq -0x88(%rbp), %rdi
callq 0xac88
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x91fcf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x920f7
movq -0xa8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
movl $0x200, %esi            # imm = 0x200
callq 0xa5e0
jmp 0x920f7
movq -0x10(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x3fee0
jmp 0x92096
movq -0x50(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
movl $0x9, %edx
movl $0x1, %ecx
callq 0x50da0
jmp 0x920b2
leaq -0xa0(%rbp), %rdi
callq 0x3dfa0
movq -0x20(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x926b0
jmp 0x920cd
leaq -0x48(%rbp), %rdi
callq 0xac88
addq $0xe0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x3dfa0
leaq -0x48(%rbp), %rdi
callq 0xac88
movq -0x58(%rbp), %rdi
callq 0xab50
nopl (%rax)