// File: /workspace/github_cpp_makefile_star2_O1/Cell-veto[P]postlhc/./ecmc.hpp
// Function: ChainRunner<Jellium3, Monodisperse2D>::time_for_collisions(Storage<Monodisperse2D>*, double, int)
uint64_t time_for_collisions (stor_t *stor, double sr_lr_split, int num_samples)
    {
        set_parameter ("sr_lr_split", sr_lr_split);
        inter.notify_random_context (&random);
        inter.notify_error_bound (stor, stor->cell_diagonal ());

        uint64_t start_time = gclock ();

        direction = 0;
        disp_left = stor->periods ()[0];

        for (int n = 0; n != num_samples; ++n)
        {
            planned_next = active = stor->random_particle (&random);
            planned_disp = disp_left;
            planned_xdisp = 0.;

            find_sr_events (stor);
            find_lr_events (stor);
        }

        uint64_t end_time = gclock ();
        std::cerr << "info optimizing sr_lr_split " << sr_lr_split << " " << (end_time-start_time) << " usec\n";
        return end_time - start_time;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebx
movsd %xmm0, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, %r15
leaq 0x28(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x1bbbb8(%rip), %rsi    # 0x5ca1f8
leaq 0x1bbbbc(%rip), %rdx    # 0x5ca203
leaq 0x18(%rsp), %r12
movq %r12, %rdi
callq 0x40843e
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
movsd 0x8(%rsp), %xmm0
callq *0x18(%rax)
movq 0x18(%rsp), %rdi
cmpq %r13, %rdi
je 0x40e67d
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x4440d0
leaq 0x30(%r15), %r12
xorpd %xmm1, %xmm1
xorl %ebp, %ebp
movsd %xmm1, 0x10(%rsp)
movq %r14, %rdi
movl %ebp, %esi
callq 0x4115c4
movsd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm0
addsd %xmm0, %xmm1
incl %ebp
cmpl $0x2, %ebp
jne 0x40e687
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jb 0x40e6bf
xorps %xmm0, %xmm0
sqrtsd %xmm1, %xmm0
jmp 0x40e6c8
movapd %xmm1, %xmm0
callq 0x4ee410
movq %r12, %rdi
movq %r14, %rsi
callq 0x40e800
callq 0x440898
movq %rax, %r12
movl $0x0, 0x2448(%r15)
movq (%r14), %rax
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq *0x28(%rax)
movsd (%r13), %xmm0
movsd %xmm0, 0x2450(%r15)
testl %ebx, %ebx
je 0x40e761
leaq 0x1870(%r15), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x40e976
movq %rax, 0x2440(%r15)
movq %rax, 0x2458(%r15)
movsd 0x2450(%r15), %xmm0
movsd %xmm0, 0x2460(%r15)
movq $0x0, 0x2468(%r15)
movq %r15, %rdi
movq %r14, %rsi
callq 0x40e9d2
movq %r15, %rdi
movq %r14, %rsi
callq 0x40ecf8
decl %ebx
jne 0x40e711
callq 0x440898
movq %rax, %rbx
movq $0x656aa0, %r14         # imm = 0x656AA0
leaq 0x1bcc78(%rip), %rsi    # 0x5cb3ef
movl $0x1c, %edx
movq %r14, %rdi
callq 0x4b14d0
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x4b2730
movq %rax, %r14
leaq 0x1c28fd(%rip), %rsi    # 0x5d1099
movl $0x1, %edx
movq %rax, %rdi
callq 0x4b14d0
subq %r12, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4b1dd0
leaq 0x1bcc4e(%rip), %rsi    # 0x5cb40c
movl $0x6, %edx
movq %rax, %rdi
callq 0x4b14d0
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r13, %rdi
je 0x40e7f7
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x4440d0
movq %rbx, %rdi
callq 0x4f77a0
nop