// File: /workspace/github_cpp_makefile_star2_O2/Cell-veto[P]postlhc/./ecmc.hpp
// Function: ChainRunner<Jellium3, Monodisperse2D>::find_lr_events(Storage<Monodisperse2D>*)
bool find_lr_events (stor_t *stor)
    {
        // find the probe rate
        auto probe_rate = inter.total_probe_rate (direction);
        if (probe_rate == 0)
            return false;

        probe_rate *= stor->cell_max_density ();
        if (probe_rate != reported_probe_rate[direction])
            std::cerr << "total_probe_rate "
                << (reported_probe_rate[direction] = probe_rate) << " "
                << direction << "\n";

        double lr_disp = 0.;

        for (;;)
        {
            lr_disp += random.exponential (probe_rate);
            if (lr_disp >= planned_disp)
                return false;

            vector_t r;
            double qselect = inter.random_probe (&r, direction, &random);
            r[direction] += lr_disp;
#ifdef DEBUG
            vector_t r_before = r;
#endif
            key_t k;
            if (stor->probe (&k, active, &r, &random) && k != active)
            {
                ++longrange_predicts;
#ifdef DEBUG
                double error = norm (r - r_before);
                assert (error < stor->cell_diagonal ());
#endif
                // somebody's home
                r[direction] -= lr_disp;
                double qevent = inter.lr_event_rate (r, direction);
                if (! (qevent <= qselect))
                {
                    std::cerr << "fatal: event rate is higher than probe rate\n"
                        << "qevent " << qevent << " qselect " << qselect << "\n"
                        << "direction " << direction << "\n"
                        << "distance " << r << " = " << norm (r) << "\n" << ABORT;
                }

                double paccept = qevent/qselect;
                if (random.real () < paccept)
                {
                    // LR event
                    planned_disp = lr_disp;
                    planned_xdisp = r[direction];
                    planned_next = k;
#ifdef XDISP_HISTO
                    planned_rsq_event = norm_sq (r);
#endif
                    return true;
                }
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl 0x2448(%rdi), %eax
shlq $0xb, %rax
movsd 0x268(%rdi,%rax), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x40c214
jp 0x40c214
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movsd %xmm1, 0x8(%rsp)
callq 0x40eb9c
movsd 0x8(%rsp), %xmm1
mulsd %xmm0, %xmm1
movl 0x2448(%rbx), %eax
ucomisd 0x2470(%rbx,%rax,8), %xmm1
movsd %xmm1, 0x8(%rsp)
jne 0x40c24b
jnp 0x40c2b3
movq $0x64eaa0, %rdi         # imm = 0x64EAA0
leaq 0x1b3ca8(%rip), %rsi    # 0x5bff01
callq 0x4a4910
movl 0x2448(%rbx), %ecx
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x2470(%rbx,%rcx,8)
movq %rax, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x4a5640
leaq 0x1b9625(%rip), %rsi    # 0x5c58ad
movq %rax, %rdi
callq 0x4a4910
movl 0x2448(%rbx), %esi
movq %rax, %rdi
callq 0x4a4ce0
leaq 0x1c4165(%rip), %rsi    # 0x5d040a
movq %rax, %rdi
callq 0x4a4910
movsd 0x8(%rsp), %xmm1
leaq 0x30(%rbx), %rax
movq %rax, 0x40(%rsp)
leaq 0x70(%rbx), %r15
leaq 0x1870(%rbx), %r12
xorpd %xmm0, %xmm0
leaq 0x20(%rsp), %r13
leaq 0x38(%rsp), %rbp
movsd %xmm0, 0x10(%rsp)
movq %r12, %rdi
movapd %xmm1, %xmm0
callq 0x40eb24
addsd 0x10(%rsp), %xmm0
ucomisd 0x2460(%rbx), %xmm0
jae 0x40c203
movl 0x2448(%rbx), %edi
shlq $0xb, %rdi
addq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movsd %xmm0, 0x10(%rsp)
callq 0x40ee42
movsd %xmm0, 0x30(%rsp)
movl 0x2448(%rbx), %eax
movsd 0x20(%rsp,%rax,8), %xmm0
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp,%rax,8)
movq 0x2440(%rbx), %rdx
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rcx
movq %r12, %r8
callq 0x40ec10
testb %al, %al
je 0x40c3b7
movq 0x38(%rsp), %rax
cmpq 0x2440(%rbx), %rax
je 0x40c3b7
incq 0x24f8(%rbx)
movl 0x2448(%rbx), %edx
movsd 0x20(%rsp,%rdx,8), %xmm0
subsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp,%rdx,8)
movq 0x40(%rsp), %rdi
movq %r13, %rsi
callq 0x40cd1c
movsd 0x30(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x40c3fd
divsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movq %r12, %rdi
callq 0x4355d2
movsd 0x18(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x40c3c8
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rsp), %xmm0
jmp 0x40c2d5
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x2460(%rbx)
movl 0x2448(%rbx), %eax
movsd 0x20(%rsp,%rax,8), %xmm0
movsd %xmm0, 0x2468(%rbx)
movq 0x38(%rsp), %rax
movq %rax, 0x2458(%rbx)
movb $0x1, %al
jmp 0x40c205
movq $0x64eaa0, %rdi         # imm = 0x64EAA0
leaq 0x1b3b08(%rip), %rsi    # 0x5bff13
movsd %xmm0, 0x18(%rsp)
callq 0x4a4910
leaq 0x1b3b23(%rip), %rsi    # 0x5bff40
movq %rax, %rdi
callq 0x4a4910
movq %rax, %rdi
movsd 0x18(%rsp), %xmm0
callq 0x4a5880
leaq 0x1b3b0e(%rip), %rsi    # 0x5bff48
movq %rax, %rdi
callq 0x4a4910
movq %rax, %rdi
movsd 0x30(%rsp), %xmm0
callq 0x4a5880
leaq 0x1c3fb3(%rip), %r14    # 0x5d040a
movq %rax, %rdi
movq %r14, %rsi
callq 0x4a4910
leaq 0x1b3ae9(%rip), %rsi    # 0x5bff52
movq %rax, %rdi
callq 0x4a4910
movl 0x2448(%rbx), %esi
movq %rax, %rdi
callq 0x4a4f40
movq %rax, %rdi
movq %r14, %rsi
callq 0x4a4910
leaq 0x1b3acc(%rip), %rsi    # 0x5bff5d
movq %rax, %rdi
callq 0x4a4910
leaq 0x20(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x40b917
leaq 0x1b30cb(%rip), %rsi    # 0x5bf57b
movq %rax, %rdi
callq 0x4a4910
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
mulsd %xmm0, %xmm0
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
sqrtsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x4a5880
movq %rax, %rdi
movq %r14, %rsi
callq 0x4a4910
leaq 0x241116(%rip), %rsi    # 0x64d601
movq %rax, %rdi
callq 0x434f95