// File: /workspace/github_cpp_makefile_star2_O3/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 0xd488
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 0x129b1
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 0xf55e
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 0x12a52
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 0xf55e
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 0x12abd
movq 0x10(%rsp), %r14
movq 0x30(%r14), %rsi
movq 0x38(%r14), %rdx
leaq 0x80(%rsp), %rdi
leaq 0x38(%rsp), %rcx
callq 0x149e2
movq 0x78(%r14), %rsi
movq 0x80(%r14), %rdx
leaq 0x38(%rsp), %rdi
leaq 0xf(%rsp), %rcx
callq 0x149e2
leaq 0xc8(%rsp), %r13
leaq 0x50(%rsp), %rsi
movq %r13, %rdi
callq 0x14a2c
leaq 0xb0(%rsp), %rdi
leaq 0x80(%rsp), %rbp
movq %rbp, %rsi
callq 0x14a2c
movq 0x45488(%rip), %rdx     # 0x57fe8
leaq 0xc8(%rsp), %r12
leaq 0xb0(%rsp), %r14
movq %r12, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x3e11b
movq 0x10(%rsp), %rax
movsd %xmm0, 0x308(%rax)
movq 0xb0(%rsp), %rdi
cmpq %r14, %rdi
je 0x12bac
movq (%rdi), %r15
movl $0x18, %esi
callq 0x7420
movq %r15, %rdi
cmpq %r14, %r15
jne 0x12b97
movq 0xc8(%rsp), %rdi
cmpq %r12, %rdi
je 0x12bce
movq (%rdi), %r14
movl $0x18, %esi
callq 0x7420
movq %r14, %rdi
cmpq %r12, %r14
jne 0x12bb9
leaq 0x68(%rsp), %rdi
leaq 0x20(%rsp), %r14
movq %r14, %rsi
callq 0x14a2c
leaq 0x98(%rsp), %rdi
leaq 0x38(%rsp), %r12
movq %r12, %rsi
callq 0x14a2c
movq 0x453ec(%rip), %rdx     # 0x57fe8
leaq 0x68(%rsp), %r15
leaq 0x98(%rsp), %r13
movq %r15, %rdi
movq %r13, %rsi
xorl %ecx, %ecx
callq 0x3e11b
movq 0x10(%rsp), %rax
movsd %xmm0, 0x310(%rax)
movq 0x98(%rsp), %rdi
cmpq %r13, %rdi
je 0x12c45
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7420
movq %rbx, %rdi
cmpq %r13, %rbx
jne 0x12c30
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x12c64
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7420
movq %rbx, %rdi
cmpq %r15, %rbx
jne 0x12c4f
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x12c83
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7420
movq %rbx, %rdi
cmpq %r12, %rbx
jne 0x12c6e
movq 0x80(%rsp), %rdi
cmpq %rbp, %rdi
je 0x12ca5
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7420
movq %rbx, %rdi
cmpq %rbp, %rbx
jne 0x12c90
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x12cc4
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7420
movq %rbx, %rdi
cmpq %r14, %rbx
jne 0x12caf
movq 0x50(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x12ced
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7420
movq %rbx, %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rbx
jne 0x12cd3
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 0x12e83
movq %rax, %r15
movq 0x98(%rsp), %rdi
cmpq %r13, %rdi
je 0x12d3b
movq (%rdi), %r14
movl $0x18, %esi
callq 0x7420
movq %r14, %rdi
cmpq %r13, %r14
jne 0x12d21
jmp 0x12d3b
movq %rax, %r15
movq 0x68(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x12dc6
leaq 0x68(%rsp), %r12
movq (%rdi), %r14
movl $0x18, %esi
callq 0x7420
movq %r14, %rdi
cmpq %r12, %r14
jne 0x12d4f
jmp 0x12dc6
movq %rax, %r15
movq 0xb0(%rsp), %rdi
cmpq %r14, %rdi
je 0x12d90
movq (%rdi), %r12
movl $0x18, %esi
callq 0x7420
movq %r12, %rdi
cmpq %r14, %r12
jne 0x12d76
jmp 0x12d90
movq %rax, %r15
movq 0xc8(%rsp), %rdi
cmpq %r13, %rdi
je 0x12dc6
movq (%rdi), %r14
movl $0x18, %esi
callq 0x7420
movq %r14, %rdi
cmpq %r13, %r14
jne 0x12d9d
jmp 0x12dc6
movq %rax, %r15
jmp 0x12def
jmp 0x12e23
movq %rax, %r15
jmp 0x12e6e
movq %rax, %r15
movq 0x38(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x12def
leaq 0x38(%rsp), %r12
movq (%rdi), %r14
movl $0x18, %esi
callq 0x7420
movq %r14, %rdi
cmpq %r12, %r14
jne 0x12dda
movq 0x80(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x12e26
leaq 0x80(%rsp), %r12
movq (%rdi), %r14
movl $0x18, %esi
callq 0x7420
movq %r14, %rdi
cmpq %r12, %r14
jne 0x12e0c
jmp 0x12e26
movq %rax, %r15
leaq 0x20(%rsp), %r13
jmp 0x12e30
movq %rax, %r15
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x12e4f
movq (%rdi), %r14
movl $0x18, %esi
callq 0x7420
movq %r14, %rdi
cmpq %r13, %r14
jne 0x12e3a
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x12e6e
movq (%rdi), %r14
movl $0x18, %esi
callq 0x7420
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x12e59
leaq 0x1470(%rsp), %rdi
callq 0x73d0
movq %r15, %rdi
callq 0x7740
movq %rax, %rdi
callq 0xd5b6