// File: /workspace/github_cpp_makefile_star2_O3/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 0x1bab84(%rip), %rsi    # 0x5c91f8
leaq 0x1bab88(%rip), %rdx    # 0x5c9203
leaq 0x18(%rsp), %r12
movq %r12, %rdi
callq 0x4083fe
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
movsd 0x8(%rsp), %xmm0
callq *0x18(%rax)
movq 0x18(%rsp), %rdi
cmpq %r13, %rdi
je 0x40e6b1
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x442d20
leaq 0x30(%r15), %r12
xorpd %xmm1, %xmm1
xorl %ebp, %ebp
movsd %xmm1, 0x10(%rsp)
movq %r14, %rdi
movl %ebp, %esi
callq 0x4114cc
movsd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm0
addsd %xmm0, %xmm1
incl %ebp
cmpl $0x2, %ebp
jne 0x40e6bb
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jb 0x40e6f3
xorps %xmm0, %xmm0
sqrtsd %xmm1, %xmm0
jmp 0x40e6fc
movapd %xmm1, %xmm0
callq 0x4ed060
movq %r12, %rdi
movq %r14, %rsi
callq 0x40e834
callq 0x43f4a4
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 0x40e795
leaq 0x1870(%r15), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x40e9b8
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 0x40ea14
movq %r15, %rdi
movq %r14, %rsi
callq 0x40ed14
decl %ebx
jne 0x40e745
callq 0x43f4a4
movq %rax, %rbx
movq $0x655aa0, %r14         # imm = 0x655AA0
leaq 0x1bbd34(%rip), %rsi    # 0x5ca4df
movl $0x1c, %edx
movq %r14, %rdi
callq 0x4b0120
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x4b1380
movq %rax, %r14
leaq 0x1c1a49(%rip), %rsi    # 0x5d0219
movl $0x1, %edx
movq %rax, %rdi
callq 0x4b0120
subq %r12, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4b0a20
leaq 0x1bbd0a(%rip), %rsi    # 0x5ca4fc
movl $0x6, %edx
movq %rax, %rdi
callq 0x4b0120
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 0x40e82b
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x442d20
movq %rbx, %rdi
callq 0x4f63f0
nop