// File: /workspace/github_c_makefile_star2_O0/skeeto[P]hash-prospector/genetic.c
// Function: estimate_bias32
static double
estimate_bias32(const struct gene *g, 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(g, x);
        for (int j = 0; j < 32; j++) {
            uint32_t bit = UINT32_C(1) << j;
            uint32_t h1 = hash(g, 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 0x1080
movq $0x0, -0x2028(%rbp)
movq -0x2028(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x1931
movq -0x10(%rbp), %rdi
callq 0x1f80
movl %eax, -0x202c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x202c(%rbp), %esi
callq 0x2050
movl %eax, -0x2030(%rbp)
movl $0x0, -0x2034(%rbp)
cmpl $0x20, -0x2034(%rbp)
jge 0x1918
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 0x2050
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 0x1902
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 0x18af
jmp 0x1904
movl -0x2034(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2034(%rbp)
jmp 0x1858
jmp 0x191a
movq -0x2028(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x2028(%rbp)
jmp 0x1819
xorps %xmm0, %xmm0
movsd %xmm0, -0x2050(%rbp)
movl $0x0, -0x2054(%rbp)
cmpl $0x20, -0x2054(%rbp)
jge 0x1a25
movl $0x0, -0x2058(%rbp)
cmpl $0x20, -0x2058(%rbp)
jge 0x1a0f
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 0x1659(%rip), %xmm2     # 0x3018
divsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x2060(%rbp)
movsd -0x2060(%rbp), %xmm0
mulsd -0x2060(%rbp), %xmm0
movsd 0x1639(%rip), %xmm1     # 0x3020
divsd %xmm1, %xmm0
addsd -0x2050(%rbp), %xmm0
movsd %xmm0, -0x2050(%rbp)
movl -0x2058(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2058(%rbp)
jmp 0x195d
jmp 0x1a11
movl -0x2054(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2054(%rbp)
jmp 0x1946
movsd -0x2050(%rbp), %xmm0
callq 0x10c0
movsd 0x15ce(%rip), %xmm1     # 0x3008
mulsd %xmm1, %xmm0
addq $0x2070, %rsp           # imm = 0x2070
popq %rbp
retq
nopw (%rax,%rax)