// File: /workspace/github_cpp_makefile_star2_O1/Cell-veto[P]postlhc/./ecmc.hpp
// Function: ChainRunner<Jellium3, Monodisperse2D>::run(AbstractStorage*, unsigned int, double)
void run (AbstractStorage *stor_,
        unsigned num_chains, double chain_disp)
    {
        assert (chain_disp > 0.);
        stor_t *stor = downcast (stor_);
        inter.notify_random_context (&random);

        for (unsigned c = 0; c != num_chains; ++c)
        {
            active = stor->random_particle (&random);
            direction = random.uint (DIM);
            disp_left = chain_disp;
#ifdef XDISP_HISTO
            double saved_disp = 0.;
#endif

            while (disp_left > 0.)
            {
                planned_next = active;
                planned_disp = disp_left;
                planned_xdisp = 0.;

                inter.notify_error_bound (stor, stor->cell_diagonal ());

                find_sr_events (stor);

                if (find_lr_events (stor))
                {
                    // there can be no events preempting a LR event
                    ++longrange_events[direction];
                    goto handle_event;
                }

                if (active != planned_next)
                {
                handle_event:
                    ++all_events[direction];
                    cumulative_xdisp[direction] += planned_xdisp;
#ifdef XDISP_HISTO
                    xdisp_histo.add (planned_xdisp);
                    disp_histo.add (saved_disp + planned_disp);
                    saved_disp = 0.;
                    log_revent_histo.add (.5 * std::log (planned_rsq_event));
                    revent_histo.add (sqrt (planned_rsq_event));
#endif
                }
                else
                {
#ifdef XDISP_HISTO
                    saved_disp += planned_disp;
#endif
                }

                // displace actice particle
                disp_left -= planned_disp;
                active = stor->displace (active, direction, planned_disp, planned_next);
            }

            // end-of-chain event
            ++all_events[direction];
            cumulative_disp[direction] += chain_disp;
            ++chainend_events[direction];
#ifdef XDISP_HISTO
            disp_histo.add (saved_disp);
#endif
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorpd %xmm1, %xmm1
movsd %xmm0, 0x10(%rsp)
ucomisd %xmm1, %xmm0
jbe 0x412e1a
movl %edx, %ebx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x40e5f2
movl %ebx, 0xc(%rsp)
testl %ebx, %ebx
je 0x412e0b
movq %rax, %r15
leaq 0x30(%r14), %r12
leaq 0x1870(%r14), %r13
xorl %ebx, %ebx
movq %r15, %rdi
movq %r13, %rsi
callq 0x40e976
movq %rax, 0x2440(%r14)
movq %r13, %rdi
movl $0x2, %esi
callq 0x4417ae
movl %eax, 0x2448(%r14)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x2450(%r14)
movq 0x2440(%r14), %rax
movq %rax, 0x2458(%r14)
movsd %xmm0, 0x2460(%r14)
movq $0x0, 0x2468(%r14)
xorpd %xmm0, %xmm0
xorl %ebp, %ebp
movsd %xmm0, (%rsp)
movq %r15, %rdi
movl %ebp, %esi
callq 0x4115c4
mulsd %xmm0, %xmm0
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd (%rsp), %xmm0
incl %ebp
cmpl $0x2, %ebp
jne 0x412cbc
ucomisd 0x1b82f7(%rip), %xmm0   # 0x5cafe8
jb 0x412cf9
sqrtsd %xmm0, %xmm0
jmp 0x412cfe
callq 0x4ee410
movq %r12, %rdi
movq %r15, %rsi
callq 0x40e800
movq %r14, %rdi
movq %r15, %rsi
callq 0x40e9d2
movq %r14, %rdi
movq %r15, %rsi
callq 0x40ecf8
testb %al, %al
je 0x412d34
movl 0x2448(%r14), %eax
incq 0x24d8(%r14,%rax,8)
jmp 0x412d44
movq 0x2440(%r14), %rax
cmpq 0x2458(%r14), %rax
je 0x412d70
movl 0x2448(%r14), %eax
incq 0x24c8(%r14,%rax,8)
movsd 0x2468(%r14), %xmm0
addsd 0x24b8(%r14,%rax,8), %xmm0
movsd %xmm0, 0x24b8(%r14,%rax,8)
movsd 0x2460(%r14), %xmm0
movsd 0x2450(%r14), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x2450(%r14)
movq 0x2440(%r14), %rsi
movl 0x2448(%r14), %edx
movq 0x2458(%r14), %rcx
movq %r15, %rdi
callq 0x412e3a
movq %rax, 0x2440(%r14)
movsd 0x2450(%r14), %xmm0
ucomisd 0x1b8224(%rip), %xmm0   # 0x5cafe8
ja 0x412c94
movl 0x2448(%r14), %eax
incq 0x24c8(%r14,%rax,8)
movsd 0x24a8(%r14,%rax,8), %xmm0
movsd 0x10(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x24a8(%r14,%rax,8)
incq 0x24e8(%r14,%rax,8)
incl %ebx
cmpl 0xc(%rsp), %ebx
jne 0x412c5f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b914c(%rip), %rdi    # 0x5cbf6d
leaq 0x1b8e00(%rip), %rsi    # 0x5cbc28
leaq 0x1b914e(%rip), %rcx    # 0x5cbf7d
movl $0x212, %edx            # imm = 0x212
callq 0x50c400
nop