// File: /workspace/github_cpp_makefile_star2_O1/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 $0x130, %rsp            # imm = 0x130
callq 0x8923c
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %r14
movq 0x83c5b(%rip), %rsi     # 0x10c858
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 0x108(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb $0x0, (%r13)
leaq 0xf8(%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 0x88ca3
movq %r15, %rdi
callq 0x760de
movsd %xmm0, 0x20(%rsp)
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0x88c96
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x48(%rsp)
jmp 0x88c3d
movq %rbx, %rdi
movq %r12, %rdx
callq 0x33c70
jmp 0x88c3d
movq 0x8230e(%rip), %rdi     # 0x10afb8
leaq 0x58623(%rip), %rsi     # 0xe12d4
movl $0x15, %edx
callq 0x84e0
leaq 0xe0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x3a864
leaq 0xe0(%rsp), %rdi
callq 0x82bdc
movq 0x822d7(%rip), %rdi     # 0x10afb8
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 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0x88d2d
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
leaq 0x83b33(%rip), %rdi     # 0x10c878
leaq 0x48f33(%rip), %rsi     # 0xd1c7f
callq 0x8160
testl %eax, %eax
je 0x88f7f
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %r14
movq 0x83b0b(%rip), %rsi     # 0x10c878
movq %rax, %rdi
movl $0x8, %edx
callq 0x8860
leaq 0xf8(%rsp), %rbx
leaq 0x20(%rsp), %r15
leaq 0x68(%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 0x88df2
movq %rbx, %rdi
callq 0x760de
movsd %xmm0, 0x68(%rsp)
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0x88de5
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x28(%rsp)
jmp 0x88d8c
movq %r15, %rdi
movq %r12, %rdx
callq 0x33c70
jmp 0x88d8c
movq 0x821bf(%rip), %rdi     # 0x10afb8
leaq 0x584ea(%rip), %rsi     # 0xe12ea
movl $0x1d, %edx
callq 0x84e0
leaq 0xc8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x3a864
leaq 0xb0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x3a864
leaq 0xc8(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
xorps %xmm0, %xmm0
callq 0x8222f
movq 0x8216b(%rip), %rdi     # 0x10afb8
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 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x88e99
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0x88eb6
movq 0xd8(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x820fb(%rip), %rdi     # 0x10afb8
leaq 0x58444(%rip), %rsi     # 0xe1308
movl $0x20, %edx
callq 0x84e0
leaq 0x98(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x3a864
leaq 0x80(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x3a864
leaq 0x98(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movsd 0x564a6(%rip), %xmm0    # 0xdf3b0
callq 0x8222f
movq 0x820a2(%rip), %rdi     # 0x10afb8
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 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x88f62
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x88f7f
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x82032(%rip), %rdi     # 0x10afb8
leaq 0x5839c(%rip), %rsi     # 0xe1329
movl $0x21, %edx
callq 0x84e0
flds 0x410d3(%rip)           # 0xca070
fld %st(0)
fstpt 0x10(%rsp)
fstpt (%rsp)
leaq 0x68(%rsp), %rdx
movl $0x1, %edi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x29040
fstpt 0x5c(%rsp)
fldt 0x5c(%rsp)
fabs
xorps %xmm0, %xmm0
fldl 0x4dec4(%rip)           # 0xd6e90
fld %st(1)
fstpt 0x124(%rsp)
fld %st(0)
fstpt 0x118(%rsp)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jbe 0x89007
leaq 0x4372e(%rip), %rdi     # 0xcc71b
leaq 0x436b5(%rip), %rsi     # 0xcc6a9
callq 0x554ea
fldt 0x5c(%rsp)
fstpl 0x78(%rsp)
movsd 0x78(%rsp), %xmm0
fldt 0x124(%rsp)
fldt 0x118(%rsp)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
fldt 0x5c(%rsp)
fstpl 0x70(%rsp)
ja 0x8902b
movsd 0x70(%rsp), %xmm0
movq 0x81f86(%rip), %rdi     # 0x10afb8
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 0x81f50(%rip), %rdi     # 0x10afb8
leaq 0x582dc(%rip), %rsi     # 0xe134b
movl $0x13, %edx
callq 0x84e0
movsd 0x52f6f(%rip), %xmm0    # 0xdbff0
callq 0x8090
movq 0x81f2b(%rip), %rdi     # 0x10afb8
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 0x890d3
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0xf8(%rsp), %rdi
cmpq %r13, %rdi
je 0x890f0
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x89107
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
xorl %eax, %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x89169
movq %rax, %rbx
jmp 0x891a0
movq %rax, %rbx
movl $0x208, %esi            # imm = 0x208
movq %r14, %rdi
jmp 0x891b8
movq %rax, %rbx
movl $0x208, %esi            # imm = 0x208
movq %r14, %rdi
jmp 0x8922f
jmp 0x891fd
movq %rax, %rbx
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x89169
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x891e2
movq 0xa8(%rsp), %rsi
jmp 0x891b5
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x891a0
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0x891e2
movq 0xd8(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
jmp 0x891e2
jmp 0x891df
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0x89200
movq 0xf0(%rsp), %rsi
jmp 0x891f1
jmp 0x891df
jmp 0x891df
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x89200
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
jmp 0x89200
jmp 0x891fd
movq %rax, %rbx
movq 0xf8(%rsp), %rdi
cmpq %r13, %rdi
je 0x8921d
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x89234
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x8840