// File: /workspace/github_c_makefile_star2_O0/skeeto[P]hash-prospector/hillclimb.c
// Function: estimate_bias32
static double
estimate_bias32(const struct hash *f, uint64_t rng[4])
{
    long n = 1L << QUALITY;
    long bins[32][32] = {{0}};
    for (long i = 0; i < n; i++) {
        uint32_t x = rand64(rng);
        uint32_t h0 = hash(f, x);
        for (int j = 0; j < 32; j++) {
            uint32_t bit = UINT32_C(1) << j;
            uint32_t h1 = hash(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++) {
            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)
movq $0x40000, -0x18(%rbp)   # imm = 0x40000
leaq -0x2020(%rbp), %rdi
xorl %esi, %esi
movl $0x2000, %edx           # imm = 0x2000
callq 0x10a0
movq $0x0, -0x2028(%rbp)
movq -0x2028(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x2bd1
movq -0x10(%rbp), %rdi
callq 0x2cf0
movl %eax, -0x202c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x202c(%rbp), %esi
callq 0x2990
movl %eax, -0x2030(%rbp)
movl $0x0, -0x2034(%rbp)
cmpl $0x20, -0x2034(%rbp)
jge 0x2bb8
movl -0x2034(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x2038(%rbp)
movq -0x8(%rbp), %rdi
movl -0x202c(%rbp), %esi
xorl -0x2038(%rbp), %esi
callq 0x2990
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 0x2ba2
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 0x2b4f
jmp 0x2ba4
movl -0x2034(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2034(%rbp)
jmp 0x2af8
jmp 0x2bba
movq -0x2028(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x2028(%rbp)
jmp 0x2ab9
xorps %xmm0, %xmm0
movsd %xmm0, -0x2050(%rbp)
movl $0x0, -0x2054(%rbp)
cmpl $0x20, -0x2054(%rbp)
jge 0x2cc5
movl $0x0, -0x2058(%rbp)
cmpl $0x20, -0x2058(%rbp)
jge 0x2caf
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 0x3d1(%rip), %xmm2      # 0x3030
divsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x2060(%rbp)
movsd -0x2060(%rbp), %xmm0
mulsd -0x2060(%rbp), %xmm0
movsd 0x391(%rip), %xmm1      # 0x3018
divsd %xmm1, %xmm0
addsd -0x2050(%rbp), %xmm0
movsd %xmm0, -0x2050(%rbp)
movl -0x2058(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2058(%rbp)
jmp 0x2bfd
jmp 0x2cb1
movl -0x2054(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2054(%rbp)
jmp 0x2be6
movsd -0x2050(%rbp), %xmm0
callq 0x1140
movsd 0x336(%rip), %xmm1      # 0x3010
mulsd %xmm1, %xmm0
addq $0x2070, %rsp           # imm = 0x2070
popq %rbp
retq
nopw (%rax,%rax)