// File: /workspace/github_cpp_makefile_star2_O1/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 $0x27f8, %rsp           # imm = 0x27F8
movq %rdi, 0x10(%rsp)
leaq 0x1470(%rsp), %rbx
movq %rbx, %rdi
callq 0xd522
movq %rbx, %rdi
callq 0x75a0
movl %eax, %eax
movq %rax, 0xe8(%rsp)
movl $0x1, %ecx
movq %rax, %rdx
shrq $0x1e, %rdx
xorl %eax, %edx
imull $0x6c078965, %edx, %eax # imm = 0x6C078965
addl %ecx, %eax
movq %rax, 0xe8(%rsp,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x127eb
leaq 0xe8(%rsp), %r14
movq $0x270, 0x1380(%r14) # imm = 0x270
movq 0x10(%rsp), %rsi
movq 0x38(%rsi), %rax
movl -0x4(%rax), %ecx
xorl %edx, %edx
leaq 0xe0(%rsp), %r12
movl %edx, (%r12)
movl %ecx, 0x4(%r12)
movq 0x80(%rsi), %rcx
movl -0x4(%rcx), %ecx
movl %edx, 0x18(%rsp)
movl %ecx, 0x1c(%rsp)
leaq 0x50(%rsp), %rbx
movq %rbx, 0x8(%rbx)
movq %rbx, (%rbx)
movq %rdx, 0x10(%rbx)
leaq 0x20(%rsp), %r13
movq %r13, 0x8(%r13)
movq %r13, (%r13)
movq %rdx, 0x10(%r13)
subq 0x30(%rsi), %rax
shrq $0x2, %rax
cmpl $0x2711, %eax           # imm = 0x2711
movl $0x2710, %r15d          # imm = 0x2710
cmovgel %eax, %r15d
movq %r12, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xf3ae
movl %eax, %ebp
movl $0x18, %edi
callq 0x7410
movslq %ebp, %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x7060
incq 0x60(%rsp)
decl %r15d
jne 0x1288c
movq 0x10(%rsp), %rcx
movq 0x80(%rcx), %rax
subq 0x78(%rcx), %rax
shrq $0x2, %rax
cmpl $0x2711, %eax           # imm = 0x2711
movl $0x2710, %r13d          # imm = 0x2710
cmovgel %eax, %r13d
leaq 0xe8(%rsp), %r14
leaq 0x18(%rsp), %r15
leaq 0x20(%rsp), %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xf3ae
movl %eax, %ebp
movl $0x18, %edi
callq 0x7410
movslq %ebp, %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
movq %r12, %rsi
callq 0x7060
incq 0x30(%rsp)
decl %r13d
jne 0x128f7
movq 0x10(%rsp), %r14
movq 0x30(%r14), %rsi
movq 0x38(%r14), %rdx
leaq 0x80(%rsp), %rdi
leaq 0x38(%rsp), %rcx
callq 0x1483a
movq 0x78(%r14), %rsi
movq 0x80(%r14), %rdx
leaq 0x38(%rsp), %rdi
leaq 0xf(%rsp), %rcx
callq 0x1483a
leaq 0xc8(%rsp), %r13
leaq 0x50(%rsp), %rsi
movq %r13, %rdi
callq 0x14884
leaq 0xb0(%rsp), %rdi
leaq 0x80(%rsp), %rbp
movq %rbp, %rsi
callq 0x14884
movq 0x4464e(%rip), %rdx     # 0x56fe8
leaq 0xc8(%rsp), %r12
leaq 0xb0(%rsp), %r14
movq %r12, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x3d6e0
movq 0x10(%rsp), %rax
movsd %xmm0, 0x308(%rax)
movq 0xb0(%rsp), %rdi
cmpq %r14, %rdi
je 0x129e6
movq (%rdi), %r15
movl $0x18, %esi
callq 0x7420
movq %r15, %rdi
cmpq %r14, %r15
jne 0x129d1
movq 0xc8(%rsp), %rdi
cmpq %r12, %rdi
je 0x12a08
movq (%rdi), %r14
movl $0x18, %esi
callq 0x7420
movq %r14, %rdi
cmpq %r12, %r14
jne 0x129f3
leaq 0x68(%rsp), %rdi
leaq 0x20(%rsp), %r14
movq %r14, %rsi
callq 0x14884
leaq 0x98(%rsp), %rdi
leaq 0x38(%rsp), %r12
movq %r12, %rsi
callq 0x14884
movq 0x445b2(%rip), %rdx     # 0x56fe8
leaq 0x68(%rsp), %r15
leaq 0x98(%rsp), %r13
movq %r15, %rdi
movq %r13, %rsi
xorl %ecx, %ecx
callq 0x3d6e0
movq 0x10(%rsp), %rax
movsd %xmm0, 0x310(%rax)
movq 0x98(%rsp), %rdi
cmpq %r13, %rdi
je 0x12a7f
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7420
movq %rbx, %rdi
cmpq %r13, %rbx
jne 0x12a6a
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x12a9e
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7420
movq %rbx, %rdi
cmpq %r15, %rbx
jne 0x12a89
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x12abd
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7420
movq %rbx, %rdi
cmpq %r12, %rbx
jne 0x12aa8
movq 0x80(%rsp), %rdi
cmpq %rbp, %rdi
je 0x12adf
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7420
movq %rbx, %rdi
cmpq %rbp, %rbx
jne 0x12aca
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x12afe
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7420
movq %rbx, %rdi
cmpq %r14, %rbx
jne 0x12ae9
movq 0x50(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x12b27
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7420
movq %rbx, %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rbx
jne 0x12b0d
leaq 0x1470(%rsp), %rdi
callq 0x73d0
addq $0x27f8, %rsp           # imm = 0x27F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x12cbd
movq %rax, %r15
movq 0x98(%rsp), %rdi
cmpq %r13, %rdi
je 0x12b75
movq (%rdi), %r14
movl $0x18, %esi
callq 0x7420
movq %r14, %rdi
cmpq %r13, %r14
jne 0x12b5b
jmp 0x12b75
movq %rax, %r15
movq 0x68(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x12c00
leaq 0x68(%rsp), %r12
movq (%rdi), %r14
movl $0x18, %esi
callq 0x7420
movq %r14, %rdi
cmpq %r12, %r14
jne 0x12b89
jmp 0x12c00
movq %rax, %r15
movq 0xb0(%rsp), %rdi
cmpq %r14, %rdi
je 0x12bca
movq (%rdi), %r12
movl $0x18, %esi
callq 0x7420
movq %r12, %rdi
cmpq %r14, %r12
jne 0x12bb0
jmp 0x12bca
movq %rax, %r15
movq 0xc8(%rsp), %rdi
cmpq %r13, %rdi
je 0x12c00
movq (%rdi), %r14
movl $0x18, %esi
callq 0x7420
movq %r14, %rdi
cmpq %r13, %r14
jne 0x12bd7
jmp 0x12c00
movq %rax, %r15
jmp 0x12c29
jmp 0x12c5d
movq %rax, %r15
jmp 0x12ca8
movq %rax, %r15
movq 0x38(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x12c29
leaq 0x38(%rsp), %r12
movq (%rdi), %r14
movl $0x18, %esi
callq 0x7420
movq %r14, %rdi
cmpq %r12, %r14
jne 0x12c14
movq 0x80(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x12c60
leaq 0x80(%rsp), %r12
movq (%rdi), %r14
movl $0x18, %esi
callq 0x7420
movq %r14, %rdi
cmpq %r12, %r14
jne 0x12c46
jmp 0x12c60
movq %rax, %r15
leaq 0x20(%rsp), %r13
jmp 0x12c6a
movq %rax, %r15
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x12c89
movq (%rdi), %r14
movl $0x18, %esi
callq 0x7420
movq %r14, %rdi
cmpq %r13, %r14
jne 0x12c74
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x12ca8
movq (%rdi), %r14
movl $0x18, %esi
callq 0x7420
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x12c93
leaq 0x1470(%rsp), %rdi
callq 0x73d0
movq %r15, %rdi
callq 0x7740
movq %rax, %rdi
callq 0xd650