// File: /workspace/github_c_makefile_star2_O3/skeeto[P]hash-prospector/prospector.c
// Function: estimate_bias64
static double
estimate_bias64(uint64_t ABI (*f)(uint64_t), uint64_t rng[2])
{
    long n = 1L << score_quality;
    long bins[64][64] = {{0}};
    for (long i = 0; i < n; i++) {
        uint64_t x = xoroshiro128plus(rng);
        uint64_t h0 = f(x);
        for (int j = 0; j < 64; j++) {
            uint64_t bit = UINT64_C(1) << j;
            uint64_t h1 = f(x ^ bit);
            uint64_t set = h0 ^ h1;
            for (int k = 0; k < 64; k++)
                bins[j][k] += (set >> k) & 1;
        }
    }
    double mean = 0;
    for (int j = 0; j < 64; j++) {
        for (int k = 0; k < 64; k++) {
            /* FIXME: normalize this somehow */
            double diff = (bins[j][k] - n / 2) / (n / 2.0);
            mean += (diff * diff) / (64 * 64);
        }
    }
    return sqrt(mean) * 1000.0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x8028, %rsp           # imm = 0x8028
movq %rsi, 0x18(%rsp)
movq %rdi, %r14
movl 0x2bb6(%rip), %ebp      # 0x5108
movl $0x1, %eax
movq %rax, 0x8(%rsp)
movl %ebp, %ecx
shlq %cl, %rax
movq %rax, 0x10(%rsp)
leaq 0x20(%rsp), %rdi
movl $0x8000, %edx           # imm = 0x8000
xorl %esi, %esi
callq 0x10c0
cmpl $0x3f, %ebp
je 0x265e
movq 0x10(%rsp), %rax
cmpq $0x2, %rax
movq 0x8(%rsp), %rcx
cmovgeq %rax, %rcx
movq %rcx, 0x8(%rsp)
xorl %ebp, %ebp
movq 0x18(%rsp), %rsi
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
leaq (%rcx,%rax), %r12
xorq %rax, %rcx
rolq $0x18, %rax
movq %rcx, %rdx
shlq $0x10, %rdx
xorq %rax, %rdx
xorq %rcx, %rdx
movq %rdx, (%rsi)
rolq $0x25, %rcx
movq %rcx, 0x8(%rsi)
movq %r12, %rdi
callq *%r14
movq %rax, %r13
leaq 0x20(%rsp), %r15
xorl %ebx, %ebx
movq %r12, %rdi
btcq %rbx, %rdi
callq *%r14
xorq %r13, %rax
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
xorl %eax, %eax
movdqa 0xa67(%rip), %xmm1      # 0x3060
movapd 0xa6f(%rip), %xmm5      # 0x3070
movdqa 0xa77(%rip), %xmm6      # 0x3080
movdqa %xmm0, %xmm2
psrlq %xmm1, %xmm2
pshufd $0xee, %xmm1, %xmm3     # xmm3 = xmm1[2,3,2,3]
movdqa %xmm0, %xmm4
psrlq %xmm3, %xmm4
movsd %xmm2, %xmm4            # xmm4 = xmm2[0],xmm4[1]
andpd %xmm5, %xmm4
paddq (%r15,%rax,8), %xmm4
movdqa %xmm4, (%r15,%rax,8)
addq $0x2, %rax
paddq %xmm6, %xmm1
cmpq $0x40, %rax
jne 0x2609
incq %rbx
addq $0x200, %r15            # imm = 0x200
cmpq $0x40, %rbx
jne 0x25d8
incq %rbp
cmpq 0x8(%rsp), %rbp
jne 0x2599
movq 0x10(%rsp), %rcx
movq %rcx, %rax
shrq $0x3f, %rax
addq %rcx, %rax
sarq %rax
negq %rax
xorps %xmm1, %xmm1
cvtsi2sd %rcx, %xmm1
mulsd 0x9a5(%rip), %xmm1      # 0x3028
pxor %xmm0, %xmm0
leaq 0x20(%rsp), %rcx
xorl %edx, %edx
movsd 0x99a(%rip), %xmm2      # 0x3030
xorl %esi, %esi
movq (%rcx,%rsi,8), %rdi
addq %rax, %rdi
xorps %xmm3, %xmm3
cvtsi2sd %rdi, %xmm3
divsd %xmm1, %xmm3
mulsd %xmm3, %xmm3
mulsd %xmm2, %xmm3
addsd %xmm3, %xmm0
incq %rsi
cmpq $0x40, %rsi
jne 0x2698
incq %rdx
addq $0x200, %rcx            # imm = 0x200
cmpq $0x40, %rdx
jne 0x2696
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x26e0
sqrtsd %xmm0, %xmm0
jmp 0x26e5
callq 0x11d0
mulsd 0x933(%rip), %xmm0      # 0x3020
addq $0x8028, %rsp           # imm = 0x8028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq