// File: Cell-veto[P]postlhc/./adap_prober.hpp
// Function: AdaptiveProber::calib_add(double, double, double)
void calib_add (double r, double rate, double rtol = 0.)
    {
        if (rate == 0.) return;

        if (! (r >= 0.))
            std::cerr << "calib_add: negative distance" << ABORT;

        if (!std::isfinite (rate))
            std::cerr << "calib_add: nonfinite lifting rate" << ABORT;

        // range of bins affected (including imax)
        unsigned i =    bin_from_radius (r-rtol);
        unsigned imax = bin_from_radius (r+rtol);
        assert (imax < N_);

        // zero bin (const probe rate)
        if (i == 0)
        {
            binrate_[i] = fmax (binrate_[i], rate);
            ++i;
        }

        // outer bins (correct for appropriate exponent)
        for (; i <= imax; ++i)
        {
            double ir = fmin (binrad_[i], r+rtol); // FIXME??
            double irate = rate / pow (ir, -(1.+binexp_[i]));
            binrate_[i] = fmax (binrate_[i], irate);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movsd %xmm2, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movsd -0x18(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x41bd68
jp 0x41bd68
jmp 0x41bfb1
movsd -0x10(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jae 0x41bd98
movq $0x698ac0, %rdi         # imm = 0x698AC0
leaq 0x1e0b26(%rip), %rsi    # 0x5fc8aa
callq 0x4e1b60
movq %rax, %rdi
leaq 0x27b88e(%rip), %rsi    # 0x697621
callq 0x46d700
movsd -0x18(%rbp), %xmm0
callq 0x41bfc0
testb $0x1, %al
jne 0x41bdc8
movq $0x698ac0, %rdi         # imm = 0x698AC0
leaq 0x1e0b13(%rip), %rsi    # 0x5fc8c7
callq 0x4e1b60
movq %rax, %rdi
leaq 0x27b85e(%rip), %rsi    # 0x697621
callq 0x46d700
movq -0x40(%rbp), %rdi
movsd -0x10(%rbp), %xmm0
subsd -0x20(%rbp), %xmm0
callq 0x41b860
movq -0x40(%rbp), %rdi
movl %eax, -0x24(%rbp)
movsd -0x10(%rbp), %xmm0
addsd -0x20(%rbp), %xmm0
callq 0x41b860
movl %eax, -0x28(%rbp)
cmpl $0x40, -0x28(%rbp)
jae 0x41bdfc
jmp 0x41be1b
leaq 0x1e0ae6(%rip), %rdi    # 0x5fc8e9
leaq 0x1e09ea(%rip), %rsi    # 0x5fc7f4
movl $0x45, %edx
leaq 0x1e0add(%rip), %rcx    # 0x5fc8f3
callq 0x53d020
cmpl $0x0, -0x24(%rbp)
jne 0x41be89
movq -0x40(%rbp), %rdi
addq $0x600, %rdi            # imm = 0x600
movl -0x24(%rbp), %eax
movl %eax, %esi
callq 0x41b830
movq -0x40(%rbp), %rdi
movsd (%rax), %xmm3
movsd -0x18(%rbp), %xmm2
movaps %xmm2, %xmm4
movaps %xmm3, %xmm0
cmpunordsd %xmm0, %xmm0
movaps %xmm0, %xmm1
pand %xmm4, %xmm1
maxsd %xmm3, %xmm2
pandn %xmm2, %xmm0
por %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
addq $0x600, %rdi            # imm = 0x600
movl -0x24(%rbp), %eax
movl %eax, %esi
callq 0x41b830
movsd -0x48(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x41be8b
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
ja 0x41bfb1
movq -0x40(%rbp), %rdi
addq $0x200, %rdi            # imm = 0x200
movl -0x24(%rbp), %eax
movl %eax, %esi
callq 0x41b830
movq -0x40(%rbp), %rdi
movsd (%rax), %xmm3
movsd -0x10(%rbp), %xmm2
addsd -0x20(%rbp), %xmm2
movaps %xmm2, %xmm4
movaps %xmm3, %xmm0
cmpunordsd %xmm0, %xmm0
movaps %xmm0, %xmm1
pand %xmm4, %xmm1
minsd %xmm3, %xmm2
pandn %xmm2, %xmm0
por %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
addq $0x400, %rdi            # imm = 0x400
movl -0x24(%rbp), %eax
movl %eax, %esi
callq 0x41b830
movsd -0x60(%rbp), %xmm0
movsd 0x1df105(%rip), %xmm1   # 0x5fb018
addsd (%rax), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
callq 0x51ef10
movq -0x40(%rbp), %rdi
movaps %xmm0, %xmm1
movsd -0x58(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
addq $0x600, %rdi            # imm = 0x600
movl -0x24(%rbp), %eax
movl %eax, %esi
callq 0x41b830
movq -0x40(%rbp), %rdi
movsd (%rax), %xmm3
movsd -0x38(%rbp), %xmm2
movaps %xmm2, %xmm4
movaps %xmm3, %xmm0
cmpunordsd %xmm0, %xmm0
movaps %xmm0, %xmm1
pand %xmm4, %xmm1
maxsd %xmm3, %xmm2
pandn %xmm2, %xmm0
por %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
addq $0x600, %rdi            # imm = 0x600
movl -0x24(%rbp), %eax
movl %eax, %esi
callq 0x41b830
movsd -0x50(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x41be8b
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)