// File: /workspace/github_cpp_makefile_star2_O3/Cell-veto[P]postlhc/jellium4.cpp
// Function: Jellium4<2u, Monodisperse2D>::setup_probe_distr(AbstractStorage const*)
void setup_probe_distr (const AbstractStorage *stor_)
    {
        // FIXME introduce CellStorage
        auto stor = dynamic_cast <const Storage <ENCODING> *> (stor_);
        if (!stor)
            std::cerr << "jellium4: incompatible Storage passed in" << ABORT;

        vector_t cwid = stor->cell_widths ();
        cell_volume = fproduct (cwid.begin (), cwid.end ());

        GridIndices <DIM> cell_grid = this->get_cell_grid (*stor);

        std::cerr << "jellium4_init cell_volume " << cwid << " = " << cell_volume << "\n";
        std::cerr << "jellium4_init cell_count(DIM) " << stor->cell_count (DIM) << "\n";

        for (unsigned direction = 0; direction != DIM; ++direction)
        {
            prober_t *pr = &prober[direction];
            pr->clear ();

            auto it = cell_grid.begin (), it_end = cell_grid.end ();
            for (; it != it_end; ++it)
            {
                vector_t cell_vector = elementwise_product (cwid, *it);
                int discret = (norm (cell_vector) < 2 * sr_lr_split) ? 50 : 6;
                GridIndices <DIM> discret_grid = GridIndices <DIM> (-discret, discret+1);

                double max_event_rate_found = 0.;

                auto iit = discret_grid.begin (), iit_end = discret_grid.end ();
                for (; iit != iit_end; ++iit)
                {
                    vector_t dr = elementwise_product (cwid, *iit) / discret;
                    double er = lr_event_rate (cell_vector + dr, direction);
                    update_max (&max_event_rate_found, er);
                }

                // report maximum to prober
                pr->add (max_event_rate_found * SAFETY_CUSHION, cell_vector);
            }

            pr->finish ();
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdi, 0x10(%rsp)
testq %rsi, %rsi
je 0x41c6a3
leaq 0x22d394(%rip), %rax    # 0x649688
leaq 0x22d3dd(%rip), %rdx    # 0x6496d8
movq %rsi, %rdi
movq %rax, %rsi
xorl %ecx, %ecx
callq 0x442d40
testq %rax, %rax
je 0x41c6a3
movq %rax, %r14
movq %rax, %rdi
callq 0x413244
leaq 0xb0(%rsp), %r12
movsd %xmm0, (%r12)
movsd %xmm1, 0x8(%r12)
mulsd %xmm1, %xmm0
movq 0x10(%rsp), %rbx
movsd %xmm0, 0x38(%rbx)
movq %r14, %rdi
callq 0x41c6c6
movq %rax, %rbp
movq %rdx, %r13
movq $0x655aa0, %r15         # imm = 0x655AA0
leaq 0x1b068e(%rip), %rsi    # 0x5cc9e9
movl $0x1a, %edx
movq %r15, %rdi
callq 0x4b0120
movq %r15, %rdi
movq %r12, %rsi
callq 0x40e5df
movq %rax, %r12
leaq 0x1ae1c1(%rip), %rsi    # 0x5ca53e
movl $0x3, %edx
movq %rax, %rdi
callq 0x4b0120
movsd 0x38(%rbx), %xmm0
movq %r12, %rdi
callq 0x4b1380
leaq 0x1be9cc(%rip), %r12    # 0x5dad6a
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x4b0120
leaq 0x1b064f(%rip), %rsi    # 0x5cca04
movl $0x1e, %edx
movq %r15, %rdi
callq 0x4b0120
movq (%r14), %rax
movq %r14, %rdi
movl $0x2, %esi
callq *0x48(%rax)
movq %r15, %rdi
movq %rax, %rsi
callq 0x4b0a20
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x4b0120
leaq 0x48(%rbx), %rax
movq %rax, 0x58(%rsp)
movq %rbp, 0x20(%rsp)
shrq $0x20, %rbp
movq %rbp, 0x8(%rsp)
movq %r13, 0x60(%rsp)
shrq $0x20, %r13
movq %r13, 0x80(%rsp)
xorl %r12d, %r12d
movabsq $0x100000001, %rcx      # imm = 0x100000001
leaq -0x33(%rcx), %rax
movq %rax, 0x78(%rsp)
leaq -0x7(%rcx), %rax
movq %rax, 0x70(%rsp)
leaq 0x90(%rsp), %rbp
imulq $0xe0, %r12, %rcx
movq 0x58(%rsp), %rdx
leaq (%rdx,%rcx), %r15
movq (%rdx,%rcx), %rax
cmpq %rax, 0x8(%rdx,%rcx)
je 0x41c459
movq %rax, 0x8(%r15)
movq 0x20(%r15), %rax
cmpq %rax, 0x28(%r15)
je 0x41c467
movq %rax, 0x28(%r15)
movq 0x20(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x60(%rsp), %rcx
movq %rcx, 0x50(%rsp)
movq %rax, 0x40(%rsp)
movl %ecx, 0xe0(%rsp)
movq 0x8(%rsp), %rcx
movl %ecx, 0xe4(%rsp)
cmpq 0xe0(%rsp), %rax
je 0x41c67c
movq 0x8(%rsp), %rax
movl %eax, %ecx
movq 0x20(%rsp), %rax
movl %eax, 0x4(%rsp)
movq %r15, 0x68(%rsp)
movl %ecx, 0x18(%rsp)
cvtdq2pd 0x40(%rsp), %xmm0
mulpd 0xb0(%rsp), %xmm0
movapd %xmm0, 0xa0(%rsp)
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movq 0x10(%rsp), %rax
movsd 0x18(%rax), %xmm1
addsd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
movl $0x6, %r13d
movl $0x32, %eax
cmoval %eax, %r13d
movl %r13d, 0x1c(%rsp)
movq 0x70(%rsp), %rbx
cmovaq 0x78(%rsp), %rbx
leal 0x1(%r13), %eax
movq %rbx, %r14
movabsq $0x100000001, %rcx      # imm = 0x100000001
imulq %rcx, %r14
movl %eax, 0xc8(%rsp)
imulq %rcx, %rax
movq %r14, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq %r14, 0x28(%rsp)
movl %ebx, 0xcc(%rsp)
cmpq 0xc8(%rsp), %r14
je 0x41c629
xorpd %xmm0, %xmm0
movl %ebx, %r15d
movsd %xmm0, 0x88(%rsp)
cvtdq2pd 0x28(%rsp), %xmm0
mulpd 0xb0(%rsp), %xmm0
movapd %xmm0, 0x90(%rsp)
movq %rbp, %rdi
leaq 0x1c(%rsp), %rsi
callq 0x41c711
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
addpd 0xa0(%rsp), %xmm0
movapd %xmm0, 0x90(%rsp)
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
movl %r12d, %edx
movl $0x1, %ecx
callq 0x41c75c
leal 0x1(%r15), %eax
movl %eax, 0x2c(%rsp)
cmpl %r13d, %r15d
jne 0x41c5da
movl %ebx, 0x2c(%rsp)
incl %r14d
movl %r14d, 0x28(%rsp)
movl %ebx, %eax
movsd 0x88(%rsp), %xmm3
movapd %xmm3, %xmm1
cmpunordsd %xmm3, %xmm1
movapd %xmm1, %xmm2
andpd %xmm0, %xmm2
maxsd %xmm3, %xmm0
andnpd %xmm0, %xmm1
orpd %xmm2, %xmm1
movapd %xmm1, %xmm0
movq 0x28(%rsp), %rcx
movl %eax, %r15d
cmpq 0xc8(%rsp), %rcx
jne 0x41c566
mulsd 0x1b0326(%rip), %xmm0   # 0x5cc948
movq 0x68(%rsp), %r15
jmp 0x41c62d
xorpd %xmm0, %xmm0
movq %r15, %rdi
leaq 0xa0(%rsp), %rsi
callq 0x41c9f0
movl 0x18(%rsp), %ecx
incl %ecx
movl %ecx, 0x44(%rsp)
cmpl 0x80(%rsp), %ecx
jne 0x41c669
movq 0x8(%rsp), %rax
movl %eax, 0x44(%rsp)
movl 0x4(%rsp), %ecx
incl %ecx
movl %ecx, 0x4(%rsp)
movl %ecx, 0x40(%rsp)
movl %eax, %ecx
movq 0x40(%rsp), %rax
cmpq 0xe0(%rsp), %rax
jne 0x41c4b6
movq %r15, %rdi
callq 0x41ca5e
incq %r12
cmpq $0x2, %r12
jne 0x41c43a
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $0x655aa0, %rdi         # imm = 0x655AA0
leaq 0x1b030f(%rip), %rsi    # 0x5cc9c0
callq 0x4b0650
leaq 0x237f9c(%rip), %rsi    # 0x654659
movq %rax, %rdi
callq 0x43f8ce
nop