// File: Cell-veto[P]postlhc/./ecmc.hpp
// Function: ChainRunner<Jellium3, Monodisperse2D>::optimize_sr_lr_split(AbstractStorage*)
virtual
    void optimize_sr_lr_split (AbstractStorage *stor_)
    {
        stor_t *stor = downcast (stor_);

        const int num_samples = 1000;
        double try_splits[] = {  2.1,  1.6,  1.7,  2.3,  2.9,  1.8,  1.5,  3.6,
            0.8,  3.9,  3.5, 0.9,  3.4,  2. ,  1.2,  1.4,  1.9,  3.1,  3.7,  3.,
            3.3,  2.4, 2.2,  2.5,  2.8,  2.7,  1. ,  0.6,  0.7,  3.2,  1.3,  3.8,
            2.6, 1.1 };

        uint64_t smallest_time_so_far = time_for_collisions (stor, try_splits[0], num_samples);
        int best_split_so_far = 0;

        const int num_splits = sizeof(try_splits) / sizeof (try_splits[0]);

        for (int i = 1; i != num_splits; ++i)
        {
            uint64_t time_now = time_for_collisions (stor, try_splits[i], num_samples);
            if (time_now < smallest_time_so_far)
            {
                smallest_time_so_far = time_now;
                best_split_so_far = i;
            }
        }

        std::cerr << "info best sr_lr_split " << try_splits[best_split_so_far] <<"\n";
        set_parameter ("sr_lr_split", try_splits[best_split_so_far]);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x190(%rbp)
movq -0x10(%rbp), %rdi
callq 0x418e40
movq %rax, -0x18(%rbp)
movl $0x3e8, -0x1c(%rbp)     # imm = 0x3E8
leaq -0x130(%rbp), %rdi
leaq 0x1e8260(%rip), %rsi    # 0x5feaf0
movl $0x110, %edx            # imm = 0x110
callq 0x401070
movq -0x190(%rbp), %rdi
movq -0x18(%rbp), %rsi
movsd -0x130(%rbp), %xmm0
movl $0x3e8, %edx            # imm = 0x3E8
callq 0x418e80
movq %rax, -0x138(%rbp)
movl $0x0, -0x13c(%rbp)
movl $0x22, -0x140(%rbp)
movl $0x1, -0x144(%rbp)
cmpl $0x22, -0x144(%rbp)
je 0x41694e
movq -0x190(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x144(%rbp), %rax
movsd -0x130(%rbp,%rax,8), %xmm0
movl $0x3e8, %edx            # imm = 0x3E8
callq 0x418e80
movq %rax, -0x150(%rbp)
movq -0x150(%rbp), %rax
cmpq -0x138(%rbp), %rax
jae 0x41693b
movq -0x150(%rbp), %rax
movq %rax, -0x138(%rbp)
movl -0x144(%rbp), %eax
movl %eax, -0x13c(%rbp)
jmp 0x41693d
movl -0x144(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x144(%rbp)
jmp 0x4168dc
movq $0x698ac0, %rdi         # imm = 0x698AC0
leaq 0x1e5da2(%rip), %rsi    # 0x5fc6fe
callq 0x4e1b60
movq %rax, %rdi
movslq -0x13c(%rbp), %rax
movsd -0x130(%rbp,%rax,8), %xmm0
callq 0x4e2ad0
movq %rax, %rdi
leaq 0x1f7a87(%rip), %rsi    # 0x60e40a
callq 0x4e1b60
leaq -0x171(%rbp), %rdi
movq %rdi, -0x198(%rbp)
callq 0x4771f0
movq -0x198(%rbp), %rdx
leaq 0x1e4a37(%rip), %rsi    # 0x5fb3e0
leaq -0x170(%rbp), %rdi
callq 0x407bd0
jmp 0x4169b7
movq -0x190(%rbp), %rdi
movslq -0x13c(%rbp), %rax
movsd -0x130(%rbp,%rax,8), %xmm0
movq (%rdi), %rax
movq 0x18(%rax), %rax
leaq -0x170(%rbp), %rsi
callq *%rax
jmp 0x4169e0
leaq -0x170(%rbp), %rdi
callq 0x4f1e40
leaq -0x171(%rbp), %rdi
callq 0x477210
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x180(%rbp)
movl %eax, -0x184(%rbp)
jmp 0x416a33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x180(%rbp)
movl %eax, -0x184(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x4f1e40
leaq -0x171(%rbp), %rdi
callq 0x477210
movq -0x180(%rbp), %rdi
callq 0x5283c0
nopl (%rax,%rax)