// File: /workspace/github_cpp_makefile_star2_O3/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 0x412c91
movl %edx, %ebx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x40e626
movl %ebx, 0xc(%rsp)
testl %ebx, %ebx
je 0x412c82
movq %rax, %r15
leaq 0x30(%r14), %r12
leaq 0x1870(%r14), %r13
xorl %ebx, %ebx
movq %r15, %rdi
movq %r13, %rsi
callq 0x40e9b8
movq %rax, 0x2440(%r14)
movq %r13, %rdi
movl $0x2, %esi
callq 0x4403b6
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 0x4114cc
mulsd %xmm0, %xmm0
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd (%rsp), %xmm0
incl %ebp
cmpl $0x2, %ebp
jne 0x412b2c
ucomisd 0x1b75c7(%rip), %xmm0   # 0x5ca128
jb 0x412b69
sqrtsd %xmm0, %xmm0
jmp 0x412b6e
callq 0x4ed060
movq %r12, %rdi
movq %r15, %rsi
callq 0x40e834
movq %r14, %rdi
movq %r15, %rsi
callq 0x40ea14
movq %r14, %rdi
movq %r15, %rsi
callq 0x40ed14
testb %al, %al
je 0x412bb2
movl 0x2448(%r14), %edx
incq 0x24d8(%r14,%rdx,8)
movq 0x2440(%r14), %rcx
movq 0x2458(%r14), %rax
jmp 0x412bd1
movq 0x2440(%r14), %rcx
movq 0x2458(%r14), %rax
movl 0x2448(%r14), %edx
cmpq %rax, %rcx
jne 0x412bd1
movq %rcx, %rsi
jmp 0x412bfc
movq %rcx, %rsi
incq 0x24c8(%r14,%rdx,8)
movsd 0x2468(%r14), %xmm0
addsd 0x24b8(%r14,%rdx,8), %xmm0
movsd %xmm0, 0x24b8(%r14,%rdx,8)
movq %rax, %rcx
movsd 0x2450(%r14), %xmm1
movsd 0x2460(%r14), %xmm0
subsd %xmm0, %xmm1
movsd %xmm1, 0x2450(%r14)
movq %r15, %rdi
callq 0x412cb0
movq %rax, 0x2440(%r14)
movsd 0x2450(%r14), %xmm0
ucomisd 0x1b74ed(%rip), %xmm0   # 0x5ca128
ja 0x412b0b
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 0x412acf
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b83c5(%rip), %rdi    # 0x5cb05d
leaq 0x1b8079(%rip), %rsi    # 0x5cad18
leaq 0x1b83c7(%rip), %rcx    # 0x5cb06d
movl $0x212, %edx            # imm = 0x212
callq 0x50b050