// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rax
xorpd %xmm1, %xmm1
movsd %xmm0, (%rsp)
ucomisd %xmm1, %xmm0
jbe 0x40fbca
movl %edx, %ebx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x40bb20
movq %rax, %r15
leaq 0x30(%r14), %r12
leaq 0x1870(%r14), %r13
xorl %ebp, %ebp
cmpl %ebx, %ebp
je 0x40fbbb
movq %r15, %rdi
movq %r13, %rsi
callq 0x40be5c
movq %rax, 0x2440(%r14)
movq %r13, %rdi
pushq $0x2
popq %rsi
callq 0x43564a
movl %eax, 0x2448(%r14)
movsd (%rsp), %xmm0
movsd %xmm0, 0x2450(%r14)
ucomisd 0x1af693(%rip), %xmm0   # 0x5bf120
jbe 0x40fb84
movq 0x2440(%r14), %rax
movq %rax, 0x2458(%r14)
movsd %xmm0, 0x2460(%r14)
andq $0x0, 0x2468(%r14)
movq %r15, %rdi
callq 0x40be06
movq %r12, %rdi
movq %r15, %rsi
callq 0x40bcac
movq %r14, %rdi
movq %r15, %rsi
callq 0x40beb8
movq %r14, %rdi
movq %r15, %rsi
callq 0x40c1d6
testb %al, %al
je 0x40fafe
movl 0x2448(%r14), %edx
incq 0x24d8(%r14,%rdx,8)
movq 0x2440(%r14), %rcx
movq 0x2458(%r14), %rax
jmp 0x40fb1d
movq 0x2440(%r14), %rcx
movq 0x2458(%r14), %rax
movl 0x2448(%r14), %edx
cmpq %rax, %rcx
jne 0x40fb1d
movq %rcx, %rsi
jmp 0x40fb48
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 0x40fbea
movq %rax, 0x2440(%r14)
movsd 0x2450(%r14), %xmm0
jmp 0x40fa85
movl 0x2448(%r14), %eax
incq 0x24c8(%r14,%rax,8)
movsd 0x24a8(%r14,%rax,8), %xmm0
addsd (%rsp), %xmm0
movsd %xmm0, 0x24a8(%r14,%rax,8)
incq 0x24e8(%r14,%rax,8)
incl %ebp
jmp 0x40fa4b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b056b(%rip), %rdi    # 0x5c013c
leaq 0x1b021f(%rip), %rsi    # 0x5bfdf7
leaq 0x1b056d(%rip), %rcx    # 0x5c014c
movl $0x212, %edx            # imm = 0x212
callq 0x4ffe80
nop