// File: /workspace/github_cpp_makefile_star2_O3/millanek[P]evo/process_vcf_stats_testing.cpp
// Function: statsTestingMain(int, char**)
int statsTestingMain(int argc, char** argv) {
    parseStatsTestingOptions(argc, argv);
    // Open connections to read from the vcf and reference genome files
    std::ifstream* inFile = new std::ifstream(opt::inputFile.c_str());
    
    std::vector<double> vc;
    
    std::string line;
    while (getline(*inFile, line)) {
        vc.push_back(convertToDouble(line));
    }
    
    std::cout << "Standard deviation1: " << std_dev(vc) << std::endl;
    
    std::vector<double> vc2;
    if (opt::secondFile != "") {
        std::ifstream* sFile = new std::ifstream(opt::secondFile.c_str());
        while (getline(*sFile, line)) {
            vc2.push_back(convertToDouble(line));
        }
        
        //std::cout << "two sample t-statistic (d = 0): " << two_sample_t(vc, vc2) << std::endl;
        std::cout << "two sample p-value (d != 0): " << two_sample_t(vc, vc2) << std::endl;
        std::cout << "two sample p-value (d > 0.001): " << two_sample_t(vc, vc2, 0.001) << std::endl;
    }
    
    std::cout << "chi_square stat (df=3,chi_sq=3): " << chisq_cdf(3.0, 3.0) << std::endl;
    
    
    std::cout << "Factorial of 5 is: " << factorial(5) << std::endl;
    
    return 0; 
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
callq 0x88bf7
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %r14
movq 0x7b26b(%rip), %rsi     # 0x103868
movq %rax, %rdi
movl $0x8, %edx
callq 0x8860
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rbx
movaps %xmm0, (%rbx)
xorl %eax, %eax
movq %rax, 0x10(%rbx)
leaq 0x100(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb $0x0, (%r13)
leaq 0xf0(%rsp), %r15
leaq 0x20(%rsp), %r12
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x886a3
movq %r15, %rdi
callq 0x75d30
movsd %xmm0, 0x20(%rsp)
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0x88696
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x48(%rsp)
jmp 0x8863d
movq %rbx, %rdi
movq %r12, %rdx
callq 0x311fc
jmp 0x8863d
movq 0x7990e(%rip), %rdi     # 0x101fb8
leaq 0x51203(%rip), %rsi     # 0xd98b4
movl $0x15, %edx
callq 0x84e0
leaq 0xd8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x37978
leaq 0xd8(%rsp), %rdi
callq 0x827d4
movq 0x798d7(%rip), %rdi     # 0x101fb8
callq 0x8730
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
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x8872d
movq 0xe8(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
leaq 0x7b143(%rip), %rdi     # 0x103888
leaq 0x4527f(%rip), %rsi     # 0xcd9cb
callq 0x8160
testl %eax, %eax
je 0x88976
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %r14
movq 0x7b11b(%rip), %rsi     # 0x103888
movq %rax, %rdi
movl $0x8, %edx
callq 0x8860
leaq 0xf0(%rsp), %rbx
leaq 0x20(%rsp), %r15
leaq 0x58(%rsp), %r12
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x887f2
movq %rbx, %rdi
callq 0x75d30
movsd %xmm0, 0x58(%rsp)
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0x887e5
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x28(%rsp)
jmp 0x8878c
movq %r15, %rdi
movq %r12, %rdx
callq 0x311fc
jmp 0x8878c
movq 0x797bf(%rip), %rdi     # 0x101fb8
leaq 0x510ca(%rip), %rsi     # 0xd98ca
movl $0x1d, %edx
callq 0x84e0
leaq 0xc0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x37978
leaq 0xa8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x37978
leaq 0xc0(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
xorps %xmm0, %xmm0
callq 0x81e45
movq 0x7976b(%rip), %rdi     # 0x101fb8
callq 0x8730
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
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x88899
movq 0xb8(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x888b6
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x796fb(%rip), %rdi     # 0x101fb8
leaq 0x51024(%rip), %rsi     # 0xd98e8
movl $0x20, %edx
callq 0x84e0
leaq 0x90(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x37978
leaq 0x78(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x37978
leaq 0x90(%rsp), %rdi
leaq 0x78(%rsp), %rsi
movsd 0x4edac(%rip), %xmm0    # 0xd76b0
callq 0x81e45
movq 0x796a8(%rip), %rdi     # 0x101fb8
callq 0x8730
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
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x88959
movq 0x88(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x88976
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x7963b(%rip), %rdi     # 0x101fb8
leaq 0x50f85(%rip), %rsi     # 0xd9909
movl $0x21, %edx
callq 0x84e0
flds 0x40690(%rip)           # 0xc9024
fld %st(0)
fstpt 0x10(%rsp)
fstpt (%rsp)
leaq 0x58(%rsp), %rdx
movl $0x1, %edi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x52504
fstpt 0x64(%rsp)
fldt 0x64(%rsp)
fabs
fldl 0x43360(%rip)           # 0xcbd20
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jbe 0x889db
leaq 0x47dba(%rip), %rdi     # 0xd0789
leaq 0x42a93(%rip), %rsi     # 0xcb469
callq 0x530c4
fldt 0x64(%rsp)
fstpl 0x70(%rsp)
movsd 0x70(%rsp), %xmm0
movq 0x795c8(%rip), %rdi     # 0x101fb8
callq 0x8730
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
movq 0x79592(%rip), %rdi     # 0x101fb8
leaq 0x50efe(%rip), %rsi     # 0xd992b
movl $0x13, %edx
callq 0x84e0
movsd 0x4d0f1(%rip), %xmm0    # 0xd5b30
callq 0x8090
movq 0x7956d(%rip), %rdi     # 0x101fb8
callq 0x8730
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
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x88a91
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0xf0(%rsp), %rdi
cmpq %r13, %rdi
je 0x88aae
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x88ac5
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
xorl %eax, %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x88b24
movq %rax, %rbx
jmp 0x88b5b
movq %rax, %rbx
movl $0x208, %esi            # imm = 0x208
movq %r14, %rdi
jmp 0x88b73
movq %rax, %rbx
movl $0x208, %esi            # imm = 0x208
movq %r14, %rdi
jmp 0x88bea
jmp 0x88bb8
movq %rax, %rbx
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x88b24
movq 0x88(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x88b9d
movq 0xa0(%rsp), %rsi
jmp 0x88b70
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x88b5b
movq 0xb8(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x88b9d
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
jmp 0x88b9d
jmp 0x88b9a
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x88bbb
movq 0xe8(%rsp), %rsi
jmp 0x88bac
jmp 0x88b9a
jmp 0x88b9a
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x88bbb
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
jmp 0x88bbb
jmp 0x88bb8
movq %rax, %rbx
movq 0xf0(%rsp), %rdi
cmpq %r13, %rdi
je 0x88bd8
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x88bef
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x8840