// File: Cell-veto[P]postlhc/./storage.hpp
// Function: Storage<Monodisperse2D>::probe(unsigned long*, unsigned long, std::array<double, 2ul>*, RandomContext*)
bool probe (key_t *k, key_t ref, vector_t *r, RandomContext *rng)
    {
        const double MAX = 1. + UINT64_MAX;
        uint64_t kv[DIM];
        assert (data_[ref].in_use ());
        // find fractional coordinates of probe location
        for (unsigned n = 0; n != DIM; ++n)
        {
            (*r)[n] *= real2frac[n];
            double abs = (*r)[n] + data_[ref].coord[n];
            double rem = std::remainder (abs, MAX);
            if (rem < 0.) // FIXME use std::remquo here
                rem += MAX;
            assert (rem >= 0. && rem < MAX);
            kv[n] = rem;
            (*r)[n] -= kv[n] << bc_[n] >> bc_[n];
        }
        *k = make_base_key (kv);
        *k += rng->uint (cell_count (DIM));
        // correct r for actual position of particle
        // (if there is no particle at *k, the result is bollocks,
        // but it won't be used.)
        for (unsigned n = 0; n != DIM; ++n)
        {
            (*r)[n] += data_[*k].coord[n] << bc_[n] >> bc_[n];
            (*r)[n] *= frac2real[n];
        }
        return data_[*k].in_use ();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x68(%rbp)
movsd 0x1dd181(%rip), %xmm0   # 0x5fc390
movsd %xmm0, -0x30(%rbp)
addq $0x88, %rdi
movq -0x18(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x41dff0
testb $0x1, %al
jne 0x41f231
jmp 0x41f233
jmp 0x41f252
leaq 0x1de0ce(%rip), %rdi    # 0x5fd308
leaq 0x1dd2a6(%rip), %rsi    # 0x5fc4e7
movl $0x253, %edx            # imm = 0x253
leaq 0x1de0d0(%rip), %rcx    # 0x5fd31d
callq 0x53d020
movl $0x0, -0x44(%rbp)
cmpl $0x2, -0x44(%rbp)
je 0x41f41f
movq -0x68(%rbp), %rax
movl -0x44(%rbp), %ecx
movl %ecx, %esi
movsd 0x68(%rax,%rsi,8), %xmm0
movsd %xmm0, -0x70(%rbp)
movq -0x20(%rbp), %rdi
callq 0x418e10
movsd -0x70(%rbp), %xmm1
movsd (%rax), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movq -0x20(%rbp), %rdi
movl -0x44(%rbp), %eax
movl %eax, %esi
callq 0x418e10
movq %rax, %rcx
movq -0x68(%rbp), %rax
movsd (%rcx), %xmm0
movq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl -0x44(%rbp), %ecx
movq 0x88(%rax,%rcx,8), %xmm1
movaps 0x1dd0d8(%rip), %xmm2   # 0x5fc3a0
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x1dd0dc(%rip), %xmm2   # 0x5fc3b0
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x50(%rbp), %xmm0
movsd 0x1dd097(%rip), %xmm1   # 0x5fc390
callq 0x51efd0
movsd %xmm0, -0x58(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x58(%rbp), %xmm0
jbe 0x41f31f
movsd 0x1dd07b(%rip), %xmm0   # 0x5fc390
addsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x58(%rbp), %xmm0
xorl %eax, %eax
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movb %al, -0x71(%rbp)
jb 0x41f345
movsd 0x1dd056(%rip), %xmm0   # 0x5fc390
ucomisd -0x58(%rbp), %xmm0
seta %al
movb %al, -0x71(%rbp)
movb -0x71(%rbp), %al
testb $0x1, %al
jne 0x41f34e
jmp 0x41f350
jmp 0x41f36f
leaq 0x1de033(%rip), %rdi    # 0x5fd38a
leaq 0x1dd189(%rip), %rsi    # 0x5fc4e7
movl $0x25c, %edx            # imm = 0x25C
leaq 0x1ddfb3(%rip), %rcx    # 0x5fd31d
callq 0x53d020
movq -0x68(%rbp), %rcx
movsd -0x58(%rbp), %xmm0
movsd 0x1dd008(%rip), %xmm2   # 0x5fc388
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rdx
movq %rdx, %rsi
sarq $0x3f, %rsi
andq %rsi, %rax
orq %rax, %rdx
movl -0x44(%rbp), %eax
movq %rdx, -0x40(%rbp,%rax,8)
movl -0x44(%rbp), %eax
movl %eax, %edx
movq -0x40(%rbp,%rdx,8), %rax
movb 0x3c(%rcx,%rdx,4), %cl
movb %cl, -0x81(%rbp)
shlq %cl, %rax
movb -0x81(%rbp), %cl
shrq %cl, %rax
movq %rax, %xmm0
movaps 0x1dcfce(%rip), %xmm1   # 0x5fc3a0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x1dcfd2(%rip), %xmm1   # 0x5fc3b0
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movq -0x20(%rbp), %rdi
movl -0x44(%rbp), %eax
movl %eax, %esi
callq 0x418e10
movsd -0x80(%rbp), %xmm1
movsd (%rax), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x41f259
movq -0x68(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x41ea90
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x90(%rbp)
movq (%rdi), %rax
movl $0x2, %esi
callq *0x48(%rax)
movq -0x90(%rbp), %rdi
movl %eax, %esi
callq 0x46e270
movl %eax, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movl $0x0, -0x5c(%rbp)
cmpl $0x2, -0x5c(%rbp)
je 0x41f544
movq -0x68(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rdx
shlq $0x4, %rdx
movq %rcx, %rax
addq %rdx, %rax
movl -0x5c(%rbp), %edx
movq 0x88(%rax,%rdx,8), %rax
movb 0x3c(%rcx,%rdx,4), %cl
movb %cl, -0xa1(%rbp)
shlq %cl, %rax
movb -0xa1(%rbp), %cl
shrq %cl, %rax
movq %rax, %xmm0
movaps 0x1dcee1(%rip), %xmm1   # 0x5fc3a0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x1dcee5(%rip), %xmm1   # 0x5fc3b0
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, -0xa0(%rbp)
movq -0x20(%rbp), %rdi
movl -0x5c(%rbp), %eax
movl %eax, %esi
callq 0x418e10
movsd -0xa0(%rbp), %xmm0
movq %rax, %rcx
movq -0x68(%rbp), %rax
addsd (%rcx), %xmm0
movsd %xmm0, (%rcx)
movl -0x5c(%rbp), %ecx
movsd 0x78(%rax,%rcx,8), %xmm0
movsd %xmm0, -0x98(%rbp)
movq -0x20(%rbp), %rdi
movl -0x5c(%rbp), %eax
movl %eax, %esi
callq 0x418e10
movsd -0x98(%rbp), %xmm0
mulsd (%rax), %xmm0
movsd %xmm0, (%rax)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x41f473
movq -0x68(%rbp), %rdi
addq $0x88, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x41dff0
andb $0x1, %al
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax)