// File: /workspace/github_cpp_makefile_star2_O2/millanek[P]Dsuite/D.cpp
// Function: TestTrioInfo::testIfSitesUniformlyDistributed()
void TestTrioInfo::testIfSitesUniformlyDistributed() {
    // Take care of the splits by random sampling with replacement:
    std::random_device rd;     // only used once to initialise (seed) engine
    std::mt19937 rng(rd());    // random-number engine used (Mersenne-Twister in this case)
    std::uniform_int_distribution<int> uniABBA(0,linearABBApos.back()); // guaranteed unbiased
    std::uniform_int_distribution<int> uniBABA(0,linearBABApos.back()); // guaranteed unbiased
    std::list<int64_t> uniABBAvals; std::list<int64_t> uniBABAvals;
    // uniABBAvals.re(linearABBApos.size()); uniBABAvals.resize(linearBABApos.size());
    
    
    int numUniformSamples = (int)linearABBApos.size(); if (numUniformSamples < 10000) { numUniformSamples = 10000; }
    for (int i = 0; i < numUniformSamples; i++) {
        uniABBAvals.push_back(uniABBA(rng));
    }
    
    numUniformSamples = (int)linearBABApos.size(); if (numUniformSamples < 10000) { numUniformSamples = 10000; }
    for (int i = 0; i < numUniformSamples; i++) {
        uniBABAvals.push_back(uniBABA(rng));
    }
    
    std::list<int64_t> linearABBAposList(linearABBApos.begin(),linearABBApos.end());
    std::list<int64_t> linearBABAposList(linearBABApos.begin(),linearBABApos.end());
    
    ABBA_KSpval = ks_test(uniABBAvals, linearABBAposList, std::cerr, false);
    BABA_KSpval = ks_test(uniBABAvals, linearBABAposList, std::cerr, false);
    
    //double BABApval = ks_test(uniBABAvals, linearBABApos, std::cerr);
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x27e8, %rsp           # imm = 0x27E8
movq %rdi, %rbx
leaq 0x1460(%rsp), %r14
movq %r14, %rdi
callq 0xba7c
movq %r14, %rdi
callq 0x75a0
movl %eax, %esi
leaq 0xd8(%rsp), %rdi
callq 0xd712
movq 0x38(%rbx), %rax
movl -0x4(%rax), %ecx
leaq 0xd0(%rsp), %r14
andl $0x0, (%r14)
movl %ecx, 0x4(%r14)
movq 0x80(%rbx), %rcx
movl -0x4(%rcx), %ecx
andl $0x0, 0x8(%rsp)
leaq 0xb8(%rsp), %r15
movq %r15, 0x8(%r15)
movq %r15, (%r15)
andq $0x0, 0x10(%r15)
leaq 0x40(%rsp), %rdx
movq %rdx, 0x8(%rdx)
movq %rdx, (%rdx)
andq $0x0, 0x10(%rdx)
movl %ecx, 0xc(%rsp)
subq 0x30(%rbx), %rax
shrq $0x2, %rax
cmpl $0x2711, %eax           # imm = 0x2711
movl $0x2710, %ebp           # imm = 0x2710
cmovgel %eax, %ebp
leaq 0xd8(%rsp), %r12
leaq 0x10(%rsp), %r13
subl $0x1, %ebp
jb 0xfd96
movq %r14, %rdi
movq %r12, %rsi
callq 0xbad2
cltq
movq %rax, 0x10(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x11506
jmp 0xfd72
movq 0x80(%rbx), %rax
subq 0x78(%rbx), %rax
shrq $0x2, %rax
cmpl $0x2711, %eax           # imm = 0x2711
movl $0x2710, %ebp           # imm = 0x2710
cmovgel %eax, %ebp
leaq 0x8(%rsp), %r14
leaq 0xd8(%rsp), %r15
leaq 0x40(%rsp), %r12
leaq 0x10(%rsp), %r13
subl $0x1, %ebp
jb 0xfded
movq %r14, %rdi
movq %r15, %rsi
callq 0xbad2
cltq
movq %rax, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x11506
jmp 0xfdc9
movq 0x30(%rbx), %rsi
movq 0x38(%rbx), %rdx
leaq 0x10(%rsp), %rdi
leaq 0x28(%rsp), %rcx
callq 0x11512
movq 0x78(%rbx), %rsi
movq 0x80(%rbx), %rdx
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rcx
callq 0x11512
leaq 0xa0(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x11546
leaq 0x88(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x11546
movq 0x4119c(%rip), %rdx     # 0x50fe8
leaq 0xa0(%rsp), %rdi
leaq 0x88(%rsp), %rsi
xorl %ecx, %ecx
callq 0x338c0
movsd %xmm0, 0x308(%rbx)
leaq 0x88(%rsp), %rdi
callq 0x1361a
leaq 0xa0(%rsp), %rdi
callq 0x1361a
leaq 0x70(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x11546
leaq 0x58(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x11546
movq 0x4113e(%rip), %rdx     # 0x50fe8
leaq 0x70(%rsp), %rdi
leaq 0x58(%rsp), %rsi
xorl %ecx, %ecx
callq 0x338c0
movsd %xmm0, 0x310(%rbx)
leaq 0x58(%rsp), %rdi
callq 0x1361a
leaq 0x70(%rsp), %rdi
callq 0x1361a
leaq 0x28(%rsp), %rdi
callq 0x1361a
leaq 0x10(%rsp), %rdi
callq 0x1361a
leaq 0x40(%rsp), %rdi
callq 0x1361a
leaq 0xb8(%rsp), %rdi
callq 0x1361a
leaq 0x1460(%rsp), %rdi
callq 0xbada
addq $0x27e8, %rsp           # imm = 0x27E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x1361a
jmp 0xff33
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
jmp 0xff57
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x1361a
jmp 0xff4f
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x1361a
jmp 0xff68
movq %rax, %rbx
jmp 0xff72
jmp 0xff85
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x1361a
leaq 0x10(%rsp), %rdi
callq 0x1361a
jmp 0xff88
movq %rax, %rbx
jmp 0xff9f
jmp 0xff85
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x1361a
leaq 0xb8(%rsp), %rdi
callq 0x1361a
leaq 0x1460(%rsp), %rdi
callq 0xbada
movq %rbx, %rdi
callq 0x7750