// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x8(%rsp)
shlq $0x4, %rdx
testb $0x1, 0x90(%rdi,%rdx)
je 0x40ee22
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x88(%rdi), %r13
leaq (%rdi,%rdx), %rbp
addq $0x88, %rbp
xorl %r12d, %r12d
movsd 0x1b03e5(%rip), %xmm3   # 0x5bf040
movapd 0x1b03ed(%rip), %xmm4   # 0x5bf050
movsd 0x1b057d(%rip), %xmm1   # 0x5bf1e8
cmpq $0x8, %r12
je 0x40ed59
movsd 0x68(%r14,%r12,2), %xmm5
mulsd (%rbx,%r12,2), %xmm5
movsd %xmm5, (%rbx,%r12,2)
movsd (%rbp,%r12,2), %xmm2
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
subpd %xmm4, %xmm2
movapd %xmm2, %xmm0
unpckhpd %xmm2, %xmm0            # xmm0 = xmm0[1],xmm2[1]
addsd %xmm2, %xmm0
addsd %xmm5, %xmm0
callq 0x4e1e30
movsd 0x1b0535(%rip), %xmm1   # 0x5bf1e8
movapd %xmm0, %xmm2
addsd %xmm1, %xmm2
movapd %xmm0, %xmm3
xorpd %xmm4, %xmm4
cmpltsd %xmm4, %xmm3
andpd %xmm3, %xmm2
andnpd %xmm0, %xmm3
orpd %xmm2, %xmm3
ucomisd %xmm4, %xmm3
jb 0x40ee03
ucomisd %xmm3, %xmm1
jbe 0x40ee03
cvttsd2si %xmm3, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x1b04e4(%rip), %xmm3   # 0x5bf1e0
cvttsd2si %xmm3, %rdx
andq %rcx, %rdx
orq %rax, %rdx
movq %rdx, 0x10(%rsp,%r12,2)
movb 0x3c(%r14,%r12), %cl
shlq %cl, %rdx
shrq %cl, %rdx
movq %rdx, %xmm0
movq 0x1b031c(%rip), %xmm3   # 0x5bf040
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x1b0320(%rip), %xmm4   # 0x5bf050
subpd %xmm4, %xmm0
movapd %xmm0, %xmm2
unpckhpd %xmm0, %xmm2            # xmm2 = xmm2[1],xmm0[1]
addsd %xmm0, %xmm2
movsd (%rbx,%r12,2), %xmm0
subsd %xmm2, %xmm0
movsd %xmm0, (%rbx,%r12,2)
addq $0x4, %r12
jmp 0x40ec6b
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x40e8be
movq %rax, (%r15)
movq (%r14), %rax
pushq $0x2
popq %rsi
movq %r14, %rdi
callq *0x48(%rax)
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x43564a
movapd 0x1b02c7(%rip), %xmm3   # 0x5bf050
movq 0x1b02af(%rip), %xmm2   # 0x5bf040
movl %eax, %eax
addq (%r15), %rax
movq %rax, (%r15)
shlq $0x4, %rax
leaq (%rax,%r13), %rdx
xorl %esi, %esi
cmpq $0x8, %rsi
je 0x40eded
movq (%rdx,%rsi,2), %rdi
movb 0x3c(%r14,%rsi), %cl
shlq %cl, %rdi
shrq %cl, %rdi
movq %rdi, %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
subpd %xmm3, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
addsd (%rbx,%rsi,2), %xmm1
movsd %xmm1, (%rbx,%rsi,2)
mulsd 0x78(%r14,%rsi,2), %xmm1
movsd %xmm1, (%rbx,%rsi,2)
addq $0x4, %rsi
jmp 0x40eda3
movb 0x8(%r13,%rax), %al
andb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b1235(%rip), %rdi    # 0x5c003f
leaq 0x1b04fe(%rip), %rsi    # 0x5bf30f
leaq 0x1b11ba(%rip), %rcx    # 0x5bffd2
movl $0x25c, %edx            # imm = 0x25C
callq 0x4ffe80
leaq 0x1b1194(%rip), %rdi    # 0x5bffbd
leaq 0x1b04df(%rip), %rsi    # 0x5bf30f
leaq 0x1b119b(%rip), %rcx    # 0x5bffd2
movl $0x253, %edx            # imm = 0x253
callq 0x4ffe80
nop