// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x8080, %rsp           # imm = 0x8080
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl 0x3127(%rip), %eax      # 0x6100
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x18(%rbp)
leaq -0x8020(%rbp), %rdi
xorl %esi, %esi
movl $0x8000, %edx           # imm = 0x8000
callq 0x10c0
movq $0x0, -0x8028(%rbp)
movq -0x8028(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x3125
movq -0x10(%rbp), %rdi
callq 0x37d0
movq %rax, -0x8030(%rbp)
movq -0x8(%rbp), %rax
movq -0x8030(%rbp), %rdi
callq *%rax
movq %rax, -0x8038(%rbp)
movl $0x0, -0x803c(%rbp)
cmpl $0x40, -0x803c(%rbp)
jge 0x310c
movl -0x803c(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x8048(%rbp)
movq -0x8(%rbp), %rax
movq -0x8030(%rbp), %rdi
xorq -0x8048(%rbp), %rdi
callq *%rax
movq %rax, -0x8050(%rbp)
movq -0x8038(%rbp), %rax
xorq -0x8050(%rbp), %rax
movq %rax, -0x8058(%rbp)
movl $0x0, -0x805c(%rbp)
cmpl $0x40, -0x805c(%rbp)
jge 0x30f6
movq -0x8058(%rbp), %rdx
movl -0x805c(%rbp), %eax
movl %eax, %ecx
shrq %cl, %rdx
andq $0x1, %rdx
movslq -0x803c(%rbp), %rcx
leaq -0x8020(%rbp), %rax
shlq $0x9, %rcx
addq %rcx, %rax
movslq -0x805c(%rbp), %rcx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x805c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x805c(%rbp)
jmp 0x30a2
jmp 0x30f8
movl -0x803c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x803c(%rbp)
jmp 0x3044
jmp 0x310e
movq -0x8028(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8028(%rbp)
jmp 0x3005
xorps %xmm0, %xmm0
movsd %xmm0, -0x8068(%rbp)
movl $0x0, -0x806c(%rbp)
cmpl $0x40, -0x806c(%rbp)
jge 0x3219
movl $0x0, -0x8070(%rbp)
cmpl $0x40, -0x8070(%rbp)
jge 0x3203
movslq -0x806c(%rbp), %rcx
leaq -0x8020(%rbp), %rax
shlq $0x9, %rcx
addq %rcx, %rax
movslq -0x8070(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x8080(%rbp)
movq -0x18(%rbp), %rax
movl $0x2, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x8080(%rbp), %rax
subq %rcx, %rax
cvtsi2sd %rax, %xmm0
cvtsi2sdq -0x18(%rbp), %xmm1
movsd 0xe6d(%rip), %xmm2      # 0x4020
divsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x8078(%rbp)
movsd -0x8078(%rbp), %xmm0
mulsd -0x8078(%rbp), %xmm0
movsd 0xe3d(%rip), %xmm1      # 0x4018
divsd %xmm1, %xmm0
addsd -0x8068(%rbp), %xmm0
movsd %xmm0, -0x8068(%rbp)
movl -0x8070(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8070(%rbp)
jmp 0x3151
jmp 0x3205
movl -0x806c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x806c(%rbp)
jmp 0x313a
movsd -0x8068(%rbp), %xmm0
callq 0x11c0
movsd 0xde2(%rip), %xmm1      # 0x4010
mulsd %xmm1, %xmm0
addq $0x8080, %rsp           # imm = 0x8080
popq %rbp
retq
nopl (%rax,%rax)