// File: /workspace/github_cpp_makefile_star2_O3/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 0x42177c
movq %rax, %r14
leaq 0x98(%rsp), %rdi
callq 0x44029c
xorpd %xmm1, %xmm1
xorl %r15d, %r15d
movsd %xmm1, 0x20(%rsp)
movq %r14, %rdi
movl %r15d, %esi
callq 0x4114cc
movsd 0x20(%rsp), %xmm1
mulsd %xmm0, %xmm0
addsd %xmm0, %xmm1
incl %r15d
cmpl $0x2, %r15d
jne 0x420e5b
leaq 0x30(%rbx), %r15
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jb 0x420e9a
xorps %xmm0, %xmm0
sqrtsd %xmm1, %xmm0
jmp 0x420ea3
movapd %xmm1, %xmm0
callq 0x4ed060
movq %r15, %rdi
movq %r14, %rsi
callq 0x42198a
movq $0x0, 0x8(%rsp)
movq $0x655bc0, %rax         # imm = 0x655BC0
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)
movsd (%r15), %xmm0
movsd 0x8(%r15), %xmm1
xorl %ecx, %ecx
ucomisd %xmm0, %xmm1
seta %cl
maxsd %xmm0, %xmm1
shll $0x3, %ecx
movsd 0x10(%r15), %xmm0
ucomisd %xmm1, %xmm0
movl $0x10, %eax
cmovbeq %rcx, %rax
movsd 0x50(%rbx), %xmm0
ucomisd 0x1a9204(%rip), %xmm0   # 0x5ca128
jbe 0x421743
movsd 0x50(%rsp,%rax), %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 0x1a919f(%rip), %xmm0   # 0x5ca0f8
mulsd %xmm1, %xmm0
movsd %xmm0, 0x48(%rsp)
divsd 0x1a809d(%rip), %xmm1   # 0x5c9008
movapd %xmm1, 0x30(%rsp)
movq $0x655aa0, %rdi         # imm = 0x655AA0
leaq 0x1aa338(%rip), %rsi    # 0x5cb2b7
movl $0xb, %edx
callq 0x4b0120
movq $0x655bc0, %rdi         # imm = 0x655BC0
leaq 0x1aa31e(%rip), %rsi    # 0x5cb2b5
movl $0xd, %edx
callq 0x4b0120
movapd 0x20(%rsp), %xmm0
movapd 0x1a9091(%rip), %xmm2   # 0x5ca040
xorpd %xmm0, %xmm2
movlpd %xmm2, (%rsp)
movapd %xmm2, 0x80(%rsp)
ucomisd %xmm2, %xmm0
jbe 0x421069
movq %rsp, %r15
movq $0x655bc0, %r12         # imm = 0x655BC0
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 0x422c80
mulsd 0x18(%rsp), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x422bd8
movsd 0x8(%rsp), %xmm0
addsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movapd 0x20(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x420fe9
movb $0xa, 0x50(%rsp)
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x4b0120
movsd (%rsp), %xmm0
movapd 0x30(%rsp), %xmm2
addsd %xmm2, %xmm0
movsd %xmm0, (%rsp)
movapd 0x20(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x420fda
movq $0x655bc0, %rdi         # imm = 0x655BC0
leaq 0x1b9cf3(%rip), %rsi    # 0x5dad6a
movl $0x1, %edx
callq 0x4b0120
movaps 0x1a8fc8(%rip), %xmm0   # 0x5ca050
movaps %xmm0, (%rsp)
movsd 0x48(%rsp), %xmm0
ucomisd 0x1a9066(%rip), %xmm0   # 0x5ca100
jbe 0x4210e6
movq %rsp, %r15
movsd 0x38(%rbx), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x422c80
mulsd 0x18(%rsp), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x422bd8
movsd (%rsp), %xmm0
mulsd 0x1a9033(%rip), %xmm0   # 0x5ca108
movsd %xmm0, (%rsp)
movsd 0x48(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x42109f
movq $0x655bc0, %r15         # imm = 0x655BC0
leaq 0x1d3604(%rip), %rsi    # 0x5f46f8
movl $0x2, %edx
movq %r15, %rdi
callq 0x4b0120
movq $0x655aa0, %rdi         # imm = 0x655AA0
leaq 0x1aa1b6(%rip), %rsi    # 0x5cb2c5
movl $0xe, %edx
callq 0x4b0120
leaq 0x1aa1a3(%rip), %rsi    # 0x5cb2c3
movl $0x10, %edx
movq %r15, %rdi
callq 0x4b0120
xorpd %xmm1, %xmm1
movapd 0x20(%rsp), %xmm0
ucomisd %xmm1, %xmm0
movapd 0x80(%rsp), %xmm0
movsd %xmm0, (%rsp)
movl %ebp, %r13d
jbe 0x42123d
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 0x4211d3
movsd (%rsp,%r13,8), %xmm1
movsd %xmm1, 0x18(%rsp)
movsd 0x40(%rbx), %xmm1
addsd 0x1a900a(%rip), %xmm1   # 0x5ca1b0
mulsd 0x1a8ff2(%rip), %xmm1   # 0x5ca1a0
callq 0x4ecf40
movapd %xmm0, %xmm1
mulsd 0x18(%rsp), %xmm1
movsd 0x38(%rbx), %xmm0
mulsd %xmm1, %xmm0
cmpnlesd 0x1a8f59(%rip), %xmm1   # 0x5ca128
andpd %xmm0, %xmm1
movq %rbx, %rdi
movq %r15, %rsi
movapd %xmm1, %xmm0
callq 0x422bd8
movsd 0x8(%rsp), %xmm0
addsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movapd 0x20(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x421169
movb $0xa, 0x50(%rsp)
movl $0x1, %edx
movq $0x655bc0, %rdi         # imm = 0x655BC0
movq %r12, %rsi
callq 0x4b0120
movsd (%rsp), %xmm0
addsd 0x30(%rsp), %xmm0
movsd %xmm0, (%rsp)
movapd 0x20(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x42115a
movq $0x655bc0, %rdi         # imm = 0x655BC0
leaq 0x1b9b1f(%rip), %rsi    # 0x5dad6a
movl $0x1, %edx
callq 0x4b0120
movsd 0x48(%rsp), %xmm0
ucomisd 0x1a8e9d(%rip), %xmm0   # 0x5ca100
movapd 0x1a8de5(%rip), %xmm0   # 0x5ca050
movapd %xmm0, (%rsp)
jbe 0x421319
movsd 0x1a8e82(%rip), %xmm0   # 0x5ca100
movq %rsp, %r15
mulsd %xmm0, %xmm0
movsd 0x8(%rsp), %xmm2
mulsd %xmm2, %xmm2
addsd %xmm0, %xmm2
movsd 0x48(%rbx), %xmm0
mulsd %xmm0, %xmm0
ucomisd %xmm2, %xmm0
xorpd %xmm0, %xmm0
ja 0x4212ec
movsd (%rsp,%r13,8), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x40(%rbx), %xmm1
addsd 0x1a8ef1(%rip), %xmm1   # 0x5ca1b0
mulsd 0x1a8ed9(%rip), %xmm1   # 0x5ca1a0
movapd %xmm2, %xmm0
callq 0x4ecf40
mulsd 0x18(%rsp), %xmm0
movsd 0x38(%rbx), %xmm1
mulsd %xmm0, %xmm1
cmpnlesd 0x1a8e40(%rip), %xmm0   # 0x5ca128
andpd %xmm1, %xmm0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x422bd8
movsd (%rsp), %xmm0
mulsd 0x1a8e04(%rip), %xmm0   # 0x5ca108
movsd %xmm0, (%rsp)
movsd 0x48(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x421281
movq $0x655bc0, %r15         # imm = 0x655BC0
leaq 0x1d33d1(%rip), %rsi    # 0x5f46f8
movl $0x2, %edx
movq %r15, %rdi
callq 0x4b0120
movq $0x655aa0, %rdi         # imm = 0x655AA0
leaq 0x1a9f92(%rip), %rsi    # 0x5cb2d4
movl $0xe, %edx
callq 0x4b0120
leaq 0x1a9f90(%rip), %rsi    # 0x5cb2e3
movl $0x1e, %edx
movq %r15, %rdi
callq 0x4b0120
movapd 0x30(%rsp), %xmm0
divsd 0x1a7c9a(%rip), %xmm0   # 0x5c9008
movapd 0x20(%rsp), %xmm2
mulsd 0x1a8d94(%rip), %xmm2   # 0x5ca110
leaq 0x50(%rsp), %rdi
xorpd %xmm1, %xmm1
callq 0x4407b0
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 0x422432
movsd %xmm0, 0x18(%rsp)
movsd 0x38(%rbx), %xmm0
movsd %xmm0, 0x20(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x422c80
movsd 0x30(%rsp), %xmm2
mulsd 0x18(%rsp), %xmm2
ucomisd 0x1a8d45(%rip), %xmm2   # 0x5ca128
jbe 0x421724
movsd 0x20(%rsp), %xmm1
mulsd %xmm0, %xmm1
movapd %xmm2, %xmm0
movsd %xmm1, 0x20(%rsp)
subsd %xmm1, %xmm0
andpd 0x1a8c57(%rip), %xmm0   # 0x5ca060
divsd %xmm2, %xmm0
movsd 0x1a8cbb(%rip), %xmm1   # 0x5ca0d0
ucomisd %xmm0, %xmm1
jbe 0x421705
cmpl $0x0, 0x230d76(%rip)    # 0x65219c
je 0x4215de
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 0x42149c
movsd (%rsp,%r13,8), %xmm1
movsd %xmm1, 0x30(%rsp)
movsd 0x40(%rbx), %xmm1
addsd 0x1a8d41(%rip), %xmm1   # 0x5ca1b0
mulsd 0x1a8d29(%rip), %xmm1   # 0x5ca1a0
callq 0x4ecf40
movapd %xmm0, %xmm1
mulsd 0x30(%rsp), %xmm1
movsd 0x38(%rbx), %xmm0
mulsd %xmm1, %xmm0
cmpnlesd 0x1a8c90(%rip), %xmm1   # 0x5ca128
andpd %xmm0, %xmm1
ucomisd 0x20(%rsp), %xmm1
jbe 0x4215de
decl 0x230cee(%rip)          # 0x65219c
movl $0x1b, %edx
movq $0x655aa0, %rdi         # imm = 0x655AA0
leaq 0x1a9f14(%rip), %rsi    # 0x5cb3d5
callq 0x4b0120
movq $0x655aa0, %rdi         # imm = 0x655AA0
movsd 0x20(%rsp), %xmm0
callq 0x4b1380
movq %rax, %r15
movl $0x4, %edx
movq %rax, %rdi
leaq 0x1a9f07(%rip), %rsi    # 0x5cb3f1
callq 0x4b0120
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 0x42155f
movsd (%rsp,%r13,8), %xmm1
movsd %xmm1, 0x20(%rsp)
movsd 0x40(%rbx), %xmm1
addsd 0x1a8c7e(%rip), %xmm1   # 0x5ca1b0
mulsd 0x1a8c66(%rip), %xmm1   # 0x5ca1a0
callq 0x4ecf40
movapd %xmm0, %xmm1
mulsd 0x20(%rsp), %xmm1
movsd 0x38(%rbx), %xmm0
mulsd %xmm1, %xmm0
cmpnlesd 0x1a8bcd(%rip), %xmm1   # 0x5ca128
andpd %xmm0, %xmm1
movq %r15, %rdi
movapd %xmm1, %xmm0
callq 0x4b1380
movq %rax, %r15
movl $0xa, %edx
movq %rax, %rdi
leaq 0x1a9e79(%rip), %rsi    # 0x5cb3f6
callq 0x4b0120
movq %r15, %rdi
movq %rsp, %rsi
callq 0x40e5df
movq %rax, %r15
movl $0xb, %edx
movq %rax, %rdi
leaq 0x1a9e62(%rip), %rsi    # 0x5cb401
callq 0x4b0120
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
mulsd %xmm0, %xmm0
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
sqrtsd %xmm1, %xmm0
movq %r15, %rdi
callq 0x4b1380
movl $0x1, %edx
movq %rax, %rdi
leaq 0x1b9791(%rip), %rsi    # 0x5dad6a
callq 0x4b0120
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
mulsd %xmm0, %xmm0
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
sqrtsd %xmm1, %xmm0
subsd 0x70(%rsp), %xmm0
divsd 0x68(%rsp), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x1a8afc(%rip), %xmm0   # 0x5ca118
cvttsd2si %xmm0, %rdx
andq %rcx, %rdx
orq %rax, %rdx
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
movq %rcx, %rsi
subq %rax, %rsi
sarq $0x3, %rsi
cmpq %rdx, %rsi
jbe 0x421644
incq (%rax,%rdx,8)
incq 0x78(%rsp)
decl %r12d
movq %rsp, %r15
jne 0x421393
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
cmpq %rax, %rcx
je 0x4216e9
movl $0x1, %r12d
xorl %esi, %esi
leaq 0x50(%rsp), %r14
movq %r14, %rdi
callq 0x4134f0
mulsd 0x90(%rsp), %xmm0
ucomisd 0x1a8a9b(%rip), %xmm0   # 0x5ca128
jne 0x421691
jnp 0x4216d0
leal -0x1(%r12), %eax
movl %eax, %eax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
addsd 0x1a8a48(%rip), %xmm1   # 0x5ca0f0
mulsd 0x68(%rsp), %xmm1
addsd 0x70(%rsp), %xmm1
movsd %xmm1, (%rsp)
mulsd 0x1a8a5f(%rip), %xmm1   # 0x5ca120
divsd %xmm1, %xmm0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x422bd8
movq 0x58(%rsp), %rax
subq 0x50(%rsp), %rax
movl %r12d, %esi
sarq $0x3, %rax
incl %r12d
cmpq %rsi, %rax
jne 0x421674
leaq 0x50(%rsp), %rdi
callq 0x440824
addq $0xc68, %rsp            # imm = 0xC68
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1a9c9d(%rip), %rdi    # 0x5cb3a9
leaq 0x1a9605(%rip), %rsi    # 0x5cad18
leaq 0x1abdfc(%rip), %rcx    # 0x5cd516
movl $0x2bb, %edx            # imm = 0x2BB
callq 0x50b050
leaq 0x1a9bd7(%rip), %rdi    # 0x5cb302
leaq 0x1a95e6(%rip), %rsi    # 0x5cad18
leaq 0x1abddd(%rip), %rcx    # 0x5cd516
movl $0x2ba, %edx            # imm = 0x2BA
callq 0x50b050
leaq 0x1abc49(%rip), %rdi    # 0x5cd393
leaq 0x1abb65(%rip), %rsi    # 0x5cd2b6
leaq 0x1abc4c(%rip), %rcx    # 0x5cd3a4
movl $0x51, %edx
callq 0x50b050
jmp 0x421766
jmp 0x421766
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x440824
movq %rbx, %rdi
callq 0x4f63f0
nop