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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2070, %rsp           # imm = 0x2070
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl 0x2b87(%rip), %eax      # 0x6100
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x18(%rbp)
leaq -0x2020(%rbp), %rdi
xorl %esi, %esi
movl $0x2000, %edx           # imm = 0x2000
callq 0x10c0
movq $0x0, -0x2028(%rbp)
movq -0x2028(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x36b7
movq -0x10(%rbp), %rdi
callq 0x37d0
movl %eax, -0x202c(%rbp)
movq -0x8(%rbp), %rax
movl -0x202c(%rbp), %edi
callq *%rax
movl %eax, -0x2030(%rbp)
movl $0x0, -0x2034(%rbp)
cmpl $0x20, -0x2034(%rbp)
jge 0x369e
movl -0x2034(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x2038(%rbp)
movq -0x8(%rbp), %rax
movl -0x202c(%rbp), %edi
xorl -0x2038(%rbp), %edi
callq *%rax
movl %eax, -0x203c(%rbp)
movl -0x2030(%rbp), %eax
xorl -0x203c(%rbp), %eax
movl %eax, -0x2040(%rbp)
movl $0x0, -0x2044(%rbp)
cmpl $0x20, -0x2044(%rbp)
jge 0x3688
movl -0x2040(%rbp), %eax
movl -0x2044(%rbp), %ecx
shrl %cl, %eax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
movslq -0x2034(%rbp), %rcx
leaq -0x2020(%rbp), %rax
shlq $0x8, %rcx
addq %rcx, %rax
movslq -0x2044(%rbp), %rcx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x2044(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2044(%rbp)
jmp 0x3635
jmp 0x368a
movl -0x2034(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2034(%rbp)
jmp 0x35e1
jmp 0x36a0
movq -0x2028(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x2028(%rbp)
jmp 0x35a5
xorps %xmm0, %xmm0
movsd %xmm0, -0x2050(%rbp)
movl $0x0, -0x2054(%rbp)
cmpl $0x20, -0x2054(%rbp)
jge 0x37ab
movl $0x0, -0x2058(%rbp)
cmpl $0x20, -0x2058(%rbp)
jge 0x3795
movslq -0x2054(%rbp), %rcx
leaq -0x2020(%rbp), %rax
shlq $0x8, %rcx
addq %rcx, %rax
movslq -0x2058(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x2068(%rbp)
movq -0x18(%rbp), %rax
movl $0x2, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x2068(%rbp), %rax
subq %rcx, %rax
cvtsi2sd %rax, %xmm0
cvtsi2sdq -0x18(%rbp), %xmm1
movsd 0x8db(%rip), %xmm2      # 0x4020
divsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x2060(%rbp)
movsd -0x2060(%rbp), %xmm0
mulsd -0x2060(%rbp), %xmm0
movsd 0x8bb(%rip), %xmm1      # 0x4028
divsd %xmm1, %xmm0
addsd -0x2050(%rbp), %xmm0
movsd %xmm0, -0x2050(%rbp)
movl -0x2058(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2058(%rbp)
jmp 0x36e3
jmp 0x3797
movl -0x2054(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2054(%rbp)
jmp 0x36cc
movsd -0x2050(%rbp), %xmm0
callq 0x11c0
movsd 0x850(%rip), %xmm1      # 0x4010
mulsd %xmm1, %xmm0
addq $0x2070, %rsp           # imm = 0x2070
popq %rbp
retq
nopl (%rax)