// File: 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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movsd %xmm0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movsd -0x20(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x421f60
jmp 0x421f7f
leaq 0x1db520(%rip), %rdi    # 0x5fd487
leaq 0x1db1d4(%rip), %rsi    # 0x5fd142
movl $0x212, %edx            # imm = 0x212
leaq 0x1db51d(%rip), %rcx    # 0x5fd497
callq 0x53d020
movq -0x10(%rbp), %rdi
callq 0x418e40
movq -0x38(%rbp), %rsi
movq %rax, -0x28(%rbp)
movq %rsi, %rdi
addq $0x30, %rdi
addq $0x1870, %rsi           # imm = 0x1870
callq 0x4190d0
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x14(%rbp), %eax
je 0x422211
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdi
addq $0x1870, %rsi           # imm = 0x1870
callq 0x419340
movq -0x38(%rbp), %rdi
movq %rax, 0x2440(%rdi)
addq $0x1870, %rdi           # imm = 0x1870
movl $0x2, %esi
callq 0x46e270
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x2448(%rax)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, 0x2450(%rax)
movq -0x38(%rbp), %rax
movsd 0x2450(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x422181
movq -0x38(%rbp), %rax
movq 0x2440(%rax), %rcx
movq %rcx, 0x2458(%rax)
movsd 0x2450(%rax), %xmm0
movsd %xmm0, 0x2460(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x2468(%rax)
addq $0x30, %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rdi
callq 0x4192b0
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x4190e0
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x4193d0
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x419a80
testb $0x1, %al
jne 0x42208b
jmp 0x4220b2
movq -0x38(%rbp), %rax
movq %rax, %rdi
addq $0x24d8, %rdi           # imm = 0x24D8
movl 0x2448(%rax), %eax
movl %eax, %esi
callq 0x422220
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x4220c8
movq -0x38(%rbp), %rcx
movq 0x2440(%rcx), %rax
cmpq 0x2458(%rcx), %rax
je 0x422127
jmp 0x4220c8
movq -0x38(%rbp), %rax
movq %rax, %rdi
addq $0x24c8, %rdi           # imm = 0x24C8
movl 0x2448(%rax), %eax
movl %eax, %esi
callq 0x422220
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq (%rcx), %rdx
addq $0x1, %rdx
movq %rdx, (%rcx)
movsd 0x2468(%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
movq %rax, %rdi
addq $0x24b8, %rdi           # imm = 0x24B8
movl 0x2448(%rax), %eax
movl %eax, %esi
callq 0x418e10
movsd -0x50(%rbp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
jmp 0x422129
jmp 0x422129
movq -0x38(%rbp), %rax
movsd 0x2460(%rax), %xmm1
movsd 0x2450(%rax), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x2450(%rax)
movq -0x28(%rbp), %rdi
movq 0x2440(%rax), %rsi
movl 0x2448(%rax), %edx
movsd 0x2460(%rax), %xmm0
movq 0x2458(%rax), %rcx
callq 0x422250
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x2440(%rax)
jmp 0x421fff
movq -0x38(%rbp), %rax
movq %rax, %rdi
addq $0x24c8, %rdi           # imm = 0x24C8
movl 0x2448(%rax), %eax
movl %eax, %esi
callq 0x422220
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq (%rcx), %rdx
addq $0x1, %rdx
movq %rdx, (%rcx)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
movq %rax, %rdi
addq $0x24a8, %rdi           # imm = 0x24A8
movl 0x2448(%rax), %eax
movl %eax, %esi
callq 0x418e10
movsd -0x58(%rbp), %xmm0
movq %rax, %rcx
movq -0x38(%rbp), %rax
addsd (%rcx), %xmm0
movsd %xmm0, (%rcx)
movq %rax, %rdi
addq $0x24e8, %rdi           # imm = 0x24E8
movl 0x2448(%rax), %eax
movl %eax, %esi
callq 0x422220
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x421faa
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)