// File: /workspace/github_cpp_makefile_star2_O1/Cell-veto[P]postlhc/./ipl.hpp
// Function: PowerLawInteraction::repulsive_lift(double, double)
double repulsive_lift (double rsq, double u_star)
    {
        // handle truncation of short-range potential
        if (rsq > sq (sr_lr_split))
        {
            double delta = repulsive_lift (sq (sr_lr_split), u_star);
            return (sq (sr_lr_split) - rsq) + delta;
        }

        if (exponent > 0.)
        {
            double x = u_star * exponent * pow (rsq, .5*exponent);
            assert (x >= 0.);

            if (x < 1e-8)
                // for very close particles, avoid loss of precision
                return -2./exponent * x * rsq;
            else
                return (pow (1+x, -2./exponent) - 1.) * rsq;
        }
        else if (exponent == 0.)
        {
            double x = 2 * u_star;
            assert (x >= 0.);

            if (x < 1e-8)
                // for very close particles, avoid loss of precision
                return -x * rsq;
            else
                return (exp (-x) - 1.) * rsq;
        }
        else
        {
            double x = u_star * exponent * pow (rsq, .5*exponent);
            assert (x <= 0.);

            if (x > -1e-8)
                // for very close particles, avoid loss of precision
                return -2./exponent * x * rsq;
            else if (x <= -1.)
                // active particle penetrates the target potential
                return -rsq;
            else
                return (pow (1+x, -2./exponent) - 1.) * rsq;
        }
    }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movapd %xmm1, %xmm3
movapd %xmm0, %xmm2
movq %rdi, %rbx
movsd 0x18(%rdi), %xmm0
mulsd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
movapd %xmm2, (%rsp)
jbe 0x40e257
movq %rbx, %rdi
movapd %xmm3, %xmm1
callq 0x40e210
movsd 0x18(%rbx), %xmm3
mulsd %xmm3, %xmm3
subsd (%rsp), %xmm3
addsd %xmm0, %xmm3
jmp 0x40e331
movsd 0x10(%rbx), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jbe 0x40e2ba
mulsd %xmm1, %xmm3
movapd %xmm3, 0x10(%rsp)
mulsd 0x1bcd38(%rip), %xmm1   # 0x5cafb0
movapd %xmm2, %xmm0
callq 0x4ee2f0
mulsd 0x10(%rsp), %xmm0
ucomisd 0x1bcd59(%rip), %xmm0   # 0x5cafe8
jb 0x40e3e0
movsd 0x1bcd6b(%rip), %xmm1   # 0x5cb008
ucomisd %xmm0, %xmm1
jbe 0x40e302
movsd 0x1bcd55(%rip), %xmm1   # 0x5cb000
divsd 0x10(%rbx), %xmm1
mulsd %xmm1, %xmm0
movapd %xmm0, %xmm3
jmp 0x40e328
jne 0x40e33b
jp 0x40e33b
addsd %xmm3, %xmm3
ucomisd %xmm0, %xmm3
jb 0x40e3ff
movsd 0x1bcd34(%rip), %xmm0   # 0x5cb008
ucomisd %xmm3, %xmm0
xorpd 0x1bcdf0(%rip), %xmm3   # 0x5cb0d0
ja 0x40e2fc
movapd %xmm3, %xmm0
callq 0x4ee440
movapd (%rsp), %xmm2
movapd %xmm0, %xmm3
addsd 0x1bccfc(%rip), %xmm3   # 0x5caff8
mulsd %xmm2, %xmm3
jmp 0x40e331
addsd 0x1bbd0e(%rip), %xmm0   # 0x5ca018
movsd 0x1bccee(%rip), %xmm1   # 0x5cb000
divsd 0x10(%rbx), %xmm1
callq 0x4ee2f0
movapd %xmm0, %xmm3
addsd 0x1bccd0(%rip), %xmm3   # 0x5caff8
movapd (%rsp), %xmm0
mulsd %xmm0, %xmm3
movapd %xmm3, %xmm0
addq $0x20, %rsp
popq %rbx
retq
mulsd %xmm1, %xmm3
movapd %xmm3, 0x10(%rsp)
mulsd 0x1bcc63(%rip), %xmm1   # 0x5cafb0
movapd %xmm2, %xmm0
callq 0x4ee2f0
mulsd 0x10(%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jb 0x40e41e
ucomisd 0x1bcc7e(%rip), %xmm0   # 0x5caff0
jbe 0x40e390
movsd 0x1bcc84(%rip), %xmm1   # 0x5cb000
divsd 0x10(%rbx), %xmm1
mulsd %xmm1, %xmm0
mulsd (%rsp), %xmm0
movapd %xmm0, %xmm3
jmp 0x40e331
movsd 0x1bcc60(%rip), %xmm1   # 0x5caff8
ucomisd %xmm0, %xmm1
jae 0x40e3ce
addsd 0x1bbc72(%rip), %xmm0   # 0x5ca018
movsd 0x1bcc52(%rip), %xmm1   # 0x5cb000
divsd 0x10(%rbx), %xmm1
callq 0x4ee2f0
movapd %xmm0, %xmm3
addsd 0x1bcc34(%rip), %xmm3   # 0x5caff8
mulsd (%rsp), %xmm3
jmp 0x40e331
movapd (%rsp), %xmm3
xorpd 0x1bccf5(%rip), %xmm3   # 0x5cb0d0
jmp 0x40e331
leaq 0x1bcdcd(%rip), %rdi    # 0x5cb1b4
leaq 0x1bcdce(%rip), %rsi    # 0x5cb1bc
leaq 0x1bcdd1(%rip), %rcx    # 0x5cb1c6
movl $0x7c, %edx
callq 0x50c400
leaq 0x1bcdae(%rip), %rdi    # 0x5cb1b4
leaq 0x1bcdaf(%rip), %rsi    # 0x5cb1bc
leaq 0x1bcdb2(%rip), %rcx    # 0x5cb1c6
movl $0x87, %edx
callq 0x50c400
leaq 0x1bcddc(%rip), %rdi    # 0x5cb201
leaq 0x1bcd90(%rip), %rsi    # 0x5cb1bc
leaq 0x1bcd93(%rip), %rcx    # 0x5cb1c6
movl $0x92, %edx
callq 0x50c400