// File: /workspace/github_cpp_makefile_star2_O1/Cell-veto[P]postlhc/./ecmc.hpp
// Function: ChainRunner<IPL, Monodisperse2D>::probe_test_pattern(AbstractStorage*, unsigned int)
virtual
    void probe_test_pattern (AbstractStorage *stor_, unsigned direction)
    {
        stor_t *stor = downcast (stor_);
        RandomContext random;
        inter.notify_random_context (&random);
        inter.notify_error_bound (stor, stor->cell_diagonal ());

        vector <DIM> r = zero_vector <DIM> ();

        std::cout << std::scientific;

        // initialize
        const double box_size = 2*stor->periods ().max ();
        const double tpr = inter.total_probe_rate (direction);
        const double big_box_size = 1e20 * box_size;
        const double step = box_size / 100;

        // reference curve
        std::cerr << "probe rate\n";
        std::cout << "# probe rate\n";
        for (r[0] = -box_size; r[0] < box_size; r[0] += step)
        {
            for (r[1] = -box_size; r[1] < box_size; r[1] += step)
                pt_dump (r, inter.probe_rate (r, direction));
            std::cout << '\n';
        }
        std::cout << "\n";
        for (r[0] = r[1] = .0001; r[0] < big_box_size; r[0] *= -1.01)
            pt_dump (r, inter.probe_rate (r, direction));
        std::cout << "\n\n";

        // what should be
        std::cerr << "LR event rate\n";
        std::cout << "# LR event rate\n";
        for (r[0] = -box_size; r[0] < box_size; r[0] += step)
        {
            for (r[1] = -box_size; r[1] < box_size; r[1] += step)
                pt_dump (r, inter.lr_event_rate (r, direction));
            std::cout << '\n';
        }
        std::cout << "\n";
        for (r[0] = r[1] = .0001; r[0] < big_box_size; r[0] *= -1.01)
            pt_dump (r, inter.lr_event_rate (r, direction));
        std::cout << "\n\n";

        // make a histogram
        std::cerr << "probe samples\n";
        std::cout << "# histogram of sampled probes\n";
        Histogram rprobe_histo (step/100, 0., 1e3 * box_size);
        static int num_warnings_left = 10;
        for (unsigned i = 0; i != 1000000; ++i)
        {
            double reported = inter.random_probe (&r, direction, &random);
            double reference = inter.probe_rate (r, direction);

            (void)reported;
            assert (reported > 0.);
            assert (fabs (reported-reference) / reported < 1e-6);

            if (num_warnings_left && inter.lr_event_rate (r, direction) > reference)
            {
                --num_warnings_left;
                std::cerr << "warn: probe rate too small\n"
                    << reference << " vs "
                    << inter.lr_event_rate (r, direction)
                    << " for r = (" << r << "), rnorm = " << norm (r) << "\n";
            }
            rprobe_histo.add (norm (r));
        }

        // dump it
        r = zero_vector <DIM> ();
        for (unsigned i = 0; i != rprobe_histo.size (); ++i)
        {
            double rate = rprobe_histo.bin_density (i) * tpr;
            if (rate == 0.) continue;
            r[0] = rprobe_histo.bin_center (i);
            rate /= sphere_surface (DIM, r[0]);
            pt_dump (r, rate);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc68, %rsp            # imm = 0xC68
movl %edx, %ebp
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x42217c
movq %rax, %r14
leaq 0x98(%rsp), %rdi
callq 0x441694
xorpd %xmm1, %xmm1
xorl %r15d, %r15d
movsd %xmm1, 0x20(%rsp)
movq %r14, %rdi
movl %r15d, %esi
callq 0x4115c4
movsd 0x20(%rsp), %xmm1
mulsd %xmm0, %xmm0
addsd %xmm0, %xmm1
incl %r15d
cmpl $0x2, %r15d
jne 0x421835
leaq 0x30(%rbx), %r15
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jb 0x421874
xorps %xmm0, %xmm0
sqrtsd %xmm1, %xmm0
jmp 0x42187d
movapd %xmm1, %xmm0
callq 0x4ee410
movq %r15, %rdi
movq %r14, %rsi
callq 0x42238a
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
movq $0x656bc0, %rax         # imm = 0x656BC0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl 0x18(%rax,%rcx), %edx
orl $0x100, %edx            # imm = 0x100
movl %edx, 0x18(%rax,%rcx)
movq (%r14), %rax
leaq 0x50(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq *0x28(%rax)
movl $0x8, %eax
movsd 0x50(%rsp,%rax), %xmm0
ucomisd (%r15), %xmm0
jbe 0x4218dd
leaq (%rsp,%rax), %r15
addq $0x50, %r15
addq $0x8, %rax
cmpq $0x18, %rax
jne 0x4218c8
movsd 0x50(%rbx), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x422143
movsd (%r15), %xmm1
addsd %xmm1, %xmm1
movapd %xmm1, 0x20(%rsp)
leaq 0x50(%rbx), %r14
movsd 0x38(%rbx), %xmm0
mulsd 0x68(%rbx), %xmm0
movsd %xmm0, 0x90(%rsp)
movsd 0x1a9690(%rip), %xmm0   # 0x5cafb8
mulsd %xmm1, %xmm0
movsd %xmm0, 0x48(%rsp)
divsd 0x1a86ce(%rip), %xmm1   # 0x5ca008
movapd %xmm1, 0x30(%rsp)
movq $0x656aa0, %rdi         # imm = 0x656AA0
leaq 0x1aa879(%rip), %rsi    # 0x5cc1c7
movl $0xb, %edx
callq 0x4b14d0
movq $0x656bc0, %rdi         # imm = 0x656BC0
leaq 0x1aa85f(%rip), %rsi    # 0x5cc1c5
movl $0xd, %edx
callq 0x4b14d0
movapd 0x20(%rsp), %xmm0
movapd 0x1a9752(%rip), %xmm2   # 0x5cb0d0
xorpd %xmm0, %xmm2
movlpd %xmm2, (%rsp)
movapd %xmm2, 0x80(%rsp)
ucomisd %xmm2, %xmm0
jbe 0x421a38
movq %rsp, %r15
movq $0x656bc0, %r12         # imm = 0x656BC0
leaq 0x50(%rsp), %r13
movapd 0x80(%rsp), %xmm2
movsd %xmm2, 0x8(%rsp)
movsd 0x38(%rbx), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x42372e
mulsd 0x18(%rsp), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x423672
movsd 0x8(%rsp), %xmm0
addsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movapd 0x20(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x4219b8
movb $0xa, 0x50(%rsp)
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x4b14d0
movsd (%rsp), %xmm0
movapd 0x30(%rsp), %xmm2
addsd %xmm2, %xmm0
movsd %xmm0, (%rsp)
movapd 0x20(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x4219a9
movq $0x656bc0, %rdi         # imm = 0x656BC0
leaq 0x1ba1a4(%rip), %rsi    # 0x5dbbea
movl $0x1, %edx
callq 0x4b14d0
movabsq $0x3f1a36e2eb1c432d, %rax # imm = 0x3F1A36E2EB1C432D
movq %rax, 0x8(%rsp)
movq %rax, (%rsp)
movsd 0x48(%rsp), %xmm0
ucomisd 0x1a954f(%rip), %xmm0   # 0x5cafc0
jbe 0x421abd
movq %rsp, %r15
movsd 0x38(%rbx), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x42372e
mulsd 0x18(%rsp), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x423672
movsd (%rsp), %xmm0
mulsd 0x1a951c(%rip), %xmm0   # 0x5cafc8
movsd %xmm0, (%rsp)
movsd 0x48(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x421a76
movq $0x656bc0, %r15         # imm = 0x656BC0
leaq 0x1d3aad(%rip), %rsi    # 0x5f5578
movl $0x2, %edx
movq %r15, %rdi
callq 0x4b14d0
movq $0x656aa0, %rdi         # imm = 0x656AA0
leaq 0x1aa6ef(%rip), %rsi    # 0x5cc1d5
movl $0xe, %edx
callq 0x4b14d0
leaq 0x1aa6dc(%rip), %rsi    # 0x5cc1d3
movl $0x10, %edx
movq %r15, %rdi
callq 0x4b14d0
movaps 0x80(%rsp), %xmm0
movsd %xmm0, (%rsp)
xorpd %xmm1, %xmm1
movapd 0x20(%rsp), %xmm0
ucomisd %xmm1, %xmm0
movl %ebp, %r13d
jbe 0x421c13
movq %rsp, %r15
leaq 0x50(%rsp), %r12
movapd 0x80(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd 0x48(%rbx), %xmm2
mulsd %xmm2, %xmm2
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm2
ja 0x421ba9
movsd (%rsp,%r13,8), %xmm1
movsd %xmm1, 0x18(%rsp)
movsd 0x40(%rbx), %xmm1
addsd 0x1a94f4(%rip), %xmm1   # 0x5cb070
mulsd 0x1a94dc(%rip), %xmm1   # 0x5cb060
callq 0x4ee2f0
movapd %xmm0, %xmm1
mulsd 0x18(%rsp), %xmm1
movsd 0x38(%rbx), %xmm0
mulsd %xmm1, %xmm0
cmpnlesd 0x1a9443(%rip), %xmm1   # 0x5cafe8
andpd %xmm0, %xmm1
movq %rbx, %rdi
movq %r15, %rsi
movapd %xmm1, %xmm0
callq 0x423672
movsd 0x8(%rsp), %xmm0
addsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movapd 0x20(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x421b3f
movb $0xa, 0x50(%rsp)
movl $0x1, %edx
movq $0x656bc0, %rdi         # imm = 0x656BC0
movq %r12, %rsi
callq 0x4b14d0
movsd (%rsp), %xmm0
addsd 0x30(%rsp), %xmm0
movsd %xmm0, (%rsp)
movapd 0x20(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x421b30
movq $0x656bc0, %rdi         # imm = 0x656BC0
leaq 0x1b9fc9(%rip), %rsi    # 0x5dbbea
movl $0x1, %edx
callq 0x4b14d0
movabsq $0x3f1a36e2eb1c432d, %rax # imm = 0x3F1A36E2EB1C432D
movq %rax, 0x8(%rsp)
movq %rax, (%rsp)
movsd 0x48(%rsp), %xmm0
ucomisd 0x1a9374(%rip), %xmm0   # 0x5cafc0
jbe 0x421cf9
movsd 0x1a9366(%rip), %xmm1   # 0x5cafc0
movq %rsp, %r15
movsd 0x8(%rsp), %xmm0
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd 0x48(%rbx), %xmm1
mulsd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
xorpd %xmm1, %xmm1
ja 0x421cc8
movsd (%rsp,%r13,8), %xmm1
movsd %xmm1, 0x18(%rsp)
movsd 0x40(%rbx), %xmm1
addsd 0x1a93d5(%rip), %xmm1   # 0x5cb070
mulsd 0x1a93bd(%rip), %xmm1   # 0x5cb060
callq 0x4ee2f0
movapd %xmm0, %xmm1
mulsd 0x18(%rsp), %xmm1
movsd 0x38(%rbx), %xmm0
mulsd %xmm1, %xmm0
cmpnlesd 0x1a9324(%rip), %xmm1   # 0x5cafe8
andpd %xmm0, %xmm1
movq %rbx, %rdi
movq %r15, %rsi
movapd %xmm1, %xmm0
callq 0x423672
movsd (%rsp), %xmm1
mulsd 0x1a92e4(%rip), %xmm1   # 0x5cafc8
movsd %xmm1, (%rsp)
movsd 0x48(%rsp), %xmm0
ucomisd %xmm1, %xmm0
ja 0x421c5d
movq $0x656bc0, %r15         # imm = 0x656BC0
leaq 0x1d3871(%rip), %rsi    # 0x5f5578
movl $0x2, %edx
movq %r15, %rdi
callq 0x4b14d0
movq $0x656aa0, %rdi         # imm = 0x656AA0
leaq 0x1aa4c2(%rip), %rsi    # 0x5cc1e4
movl $0xe, %edx
callq 0x4b14d0
leaq 0x1aa4c0(%rip), %rsi    # 0x5cc1f3
movl $0x1e, %edx
movq %r15, %rdi
callq 0x4b14d0
movapd 0x30(%rsp), %xmm0
divsd 0x1a82ba(%rip), %xmm0   # 0x5ca008
movapd 0x20(%rsp), %xmm2
mulsd 0x1a9274(%rip), %xmm2   # 0x5cafd0
leaq 0x50(%rsp), %rdi
xorpd %xmm1, %xmm1
callq 0x441baa
movl $0xf4240, %r12d         # imm = 0xF4240
movq %rsp, %r15
movsd 0x38(%rbx), %xmm0
movsd %xmm0, 0x30(%rsp)
movq %r14, %rdi
movq %r15, %rsi
leaq 0x98(%rsp), %rdx
callq 0x422eb0
movsd %xmm0, 0x18(%rsp)
movsd 0x38(%rbx), %xmm0
movsd %xmm0, 0x20(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x42372e
movsd 0x30(%rsp), %xmm2
mulsd 0x18(%rsp), %xmm2
ucomisd 0x1a9225(%rip), %xmm2   # 0x5cafe8
jbe 0x422124
movsd 0x20(%rsp), %xmm1
mulsd %xmm0, %xmm1
movapd %xmm2, %xmm0
movsd %xmm1, 0x20(%rsp)
subsd %xmm1, %xmm0
andpd 0x1a92f7(%rip), %xmm0   # 0x5cb0e0
divsd %xmm2, %xmm0
movsd 0x1a919b(%rip), %xmm1   # 0x5caf90
ucomisd %xmm0, %xmm1
jbe 0x422105
cmpl $0x0, 0x231396(%rip)    # 0x65319c
je 0x421fcc
movsd (%rsp), %xmm1
movsd 0x8(%rsp), %xmm0
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd 0x48(%rbx), %xmm2
mulsd %xmm2, %xmm2
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm2
ja 0x421e7c
movsd (%rsp,%r13,8), %xmm1
movsd %xmm1, 0x30(%rsp)
movsd 0x40(%rbx), %xmm1
addsd 0x1a9221(%rip), %xmm1   # 0x5cb070
mulsd 0x1a9209(%rip), %xmm1   # 0x5cb060
callq 0x4ee2f0
movapd %xmm0, %xmm1
mulsd 0x30(%rsp), %xmm1
movsd 0x38(%rbx), %xmm0
mulsd %xmm1, %xmm0
cmpnlesd 0x1a9170(%rip), %xmm1   # 0x5cafe8
andpd %xmm0, %xmm1
ucomisd 0x20(%rsp), %xmm1
jbe 0x421fcc
decl 0x23130e(%rip)          # 0x65319c
movl $0x1b, %edx
movq $0x656aa0, %rdi         # imm = 0x656AA0
leaq 0x1aa444(%rip), %rsi    # 0x5cc2e5
callq 0x4b14d0
movq $0x656aa0, %rdi         # imm = 0x656AA0
movsd 0x20(%rsp), %xmm0
callq 0x4b2730
movq %rax, %r15
movl $0x4, %edx
movq %rax, %rdi
leaq 0x1aa437(%rip), %rsi    # 0x5cc301
callq 0x4b14d0
movsd (%rsp), %xmm1
movsd 0x8(%rsp), %xmm0
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd 0x48(%rbx), %xmm2
mulsd %xmm2, %xmm2
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm2
ja 0x421f3f
movsd (%rsp,%r13,8), %xmm1
movsd %xmm1, 0x20(%rsp)
movsd 0x40(%rbx), %xmm1
addsd 0x1a915e(%rip), %xmm1   # 0x5cb070
mulsd 0x1a9146(%rip), %xmm1   # 0x5cb060
callq 0x4ee2f0
movapd %xmm0, %xmm1
mulsd 0x20(%rsp), %xmm1
movsd 0x38(%rbx), %xmm0
mulsd %xmm1, %xmm0
cmpnlesd 0x1a90ad(%rip), %xmm1   # 0x5cafe8
andpd %xmm0, %xmm1
movq %r15, %rdi
movapd %xmm1, %xmm0
callq 0x4b2730
movq %rax, %r15
movl $0xa, %edx
movq %rax, %rdi
leaq 0x1aa3a9(%rip), %rsi    # 0x5cc306
callq 0x4b14d0
movq %r15, %rdi
movq %rsp, %rsi
callq 0x40e5ab
movq %rax, %r15
movl $0xb, %edx
movq %rax, %rdi
leaq 0x1aa392(%rip), %rsi    # 0x5cc311
callq 0x4b14d0
movsd (%rsp), %xmm1
movsd 0x8(%rsp), %xmm0
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
ucomisd 0x1a9045(%rip), %xmm0   # 0x5cafe8
jb 0x421fab
sqrtsd %xmm0, %xmm0
jmp 0x421fb0
callq 0x4ee410
movq %r15, %rdi
callq 0x4b2730
movl $0x1, %edx
movq %rax, %rdi
leaq 0x1b9c23(%rip), %rsi    # 0x5dbbea
callq 0x4b14d0
movsd (%rsp), %xmm1
movsd 0x8(%rsp), %xmm0
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
ucomisd 0x1a8ffd(%rip), %xmm0   # 0x5cafe8
jb 0x421ff3
sqrtsd %xmm0, %xmm0
jmp 0x421ff8
callq 0x4ee410
movq %rsp, %r15
subsd 0x70(%rsp), %xmm0
divsd 0x68(%rsp), %xmm0
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
subsd 0x1a8fc1(%rip), %xmm0   # 0x5cafd8
cvttsd2si %xmm0, %rax
sarq $0x3f, %rdx
andq %rdx, %rax
orq %rcx, %rax
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rax, %rdx
jbe 0x422040
incq (%rcx,%rax,8)
incq 0x78(%rsp)
decl %r12d
jne 0x421d73
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
movq 0x58(%rsp), %rax
cmpq 0x50(%rsp), %rax
je 0x4220e9
movl $0x1, %r12d
xorl %esi, %esi
leaq 0x50(%rsp), %r14
movq %r14, %rdi
callq 0x413686
mulsd 0x90(%rsp), %xmm0
ucomisd 0x1a8f5b(%rip), %xmm0   # 0x5cafe8
jne 0x422091
jnp 0x4220d0
leal -0x1(%r12), %eax
movl %eax, %eax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
addsd 0x1a8f08(%rip), %xmm1   # 0x5cafb0
mulsd 0x68(%rsp), %xmm1
addsd 0x70(%rsp), %xmm1
movsd %xmm1, (%rsp)
mulsd 0x1a8f1f(%rip), %xmm1   # 0x5cafe0
divsd %xmm1, %xmm0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x423672
movq 0x58(%rsp), %rax
subq 0x50(%rsp), %rax
movl %r12d, %esi
sarq $0x3, %rax
incl %r12d
cmpq %rsi, %rax
jne 0x422074
leaq 0x50(%rsp), %rdi
callq 0x441c1e
addq $0xc68, %rsp            # imm = 0xC68
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1aa1ad(%rip), %rdi    # 0x5cc2b9
leaq 0x1a9b15(%rip), %rsi    # 0x5cbc28
leaq 0x1ac30c(%rip), %rcx    # 0x5ce426
movl $0x2bb, %edx            # imm = 0x2BB
callq 0x50c400
leaq 0x1aa0e7(%rip), %rdi    # 0x5cc212
leaq 0x1a9af6(%rip), %rsi    # 0x5cbc28
leaq 0x1ac2ed(%rip), %rcx    # 0x5ce426
movl $0x2ba, %edx            # imm = 0x2BA
callq 0x50c400
leaq 0x1ac159(%rip), %rdi    # 0x5ce2a3
leaq 0x1ac075(%rip), %rsi    # 0x5ce1c6
leaq 0x1ac15c(%rip), %rcx    # 0x5ce2b4
movl $0x51, %edx
callq 0x50c400
jmp 0x422166
jmp 0x422166
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x441c1e
movq %rbx, %rdi
callq 0x4f77a0
nop