// File: /workspace/github_cpp_makefile_star2_O3/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 0x40e28b
movq %rbx, %rdi
movapd %xmm3, %xmm1
callq 0x40e244
movsd 0x18(%rbx), %xmm3
mulsd %xmm3, %xmm3
subsd (%rsp), %xmm3
addsd %xmm0, %xmm3
jmp 0x40e365
movsd 0x10(%rbx), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jbe 0x40e2ee
mulsd %xmm1, %xmm3
movapd %xmm3, 0x10(%rsp)
mulsd 0x1bbe44(%rip), %xmm1   # 0x5ca0f0
movapd %xmm2, %xmm0
callq 0x4ecf40
mulsd 0x10(%rsp), %xmm0
ucomisd 0x1bbe65(%rip), %xmm0   # 0x5ca128
jb 0x40e414
movsd 0x1bbe77(%rip), %xmm1   # 0x5ca148
ucomisd %xmm0, %xmm1
jbe 0x40e336
movsd 0x1bbe61(%rip), %xmm1   # 0x5ca140
divsd 0x10(%rbx), %xmm1
mulsd %xmm1, %xmm0
movapd %xmm0, %xmm3
jmp 0x40e35c
jne 0x40e36f
jp 0x40e36f
addsd %xmm3, %xmm3
ucomisd %xmm0, %xmm3
jb 0x40e433
movsd 0x1bbe40(%rip), %xmm0   # 0x5ca148
ucomisd %xmm3, %xmm0
xorpd 0x1bbd2c(%rip), %xmm3   # 0x5ca040
ja 0x40e330
movapd %xmm3, %xmm0
callq 0x4ed090
movapd (%rsp), %xmm2
movapd %xmm0, %xmm3
addsd 0x1bbe08(%rip), %xmm3   # 0x5ca138
mulsd %xmm2, %xmm3
jmp 0x40e365
addsd 0x1bacda(%rip), %xmm0   # 0x5c9018
movsd 0x1bbdfa(%rip), %xmm1   # 0x5ca140
divsd 0x10(%rbx), %xmm1
callq 0x4ecf40
movapd %xmm0, %xmm3
addsd 0x1bbddc(%rip), %xmm3   # 0x5ca138
movapd (%rsp), %xmm0
mulsd %xmm0, %xmm3
movapd %xmm3, %xmm0
addq $0x20, %rsp
popq %rbx
retq
mulsd %xmm1, %xmm3
movapd %xmm3, 0x10(%rsp)
mulsd 0x1bbd6f(%rip), %xmm1   # 0x5ca0f0
movapd %xmm2, %xmm0
callq 0x4ecf40
mulsd 0x10(%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jb 0x40e452
ucomisd 0x1bbd8a(%rip), %xmm0   # 0x5ca130
jbe 0x40e3c4
movsd 0x1bbd90(%rip), %xmm1   # 0x5ca140
divsd 0x10(%rbx), %xmm1
mulsd %xmm1, %xmm0
mulsd (%rsp), %xmm0
movapd %xmm0, %xmm3
jmp 0x40e365
movsd 0x1bbd6c(%rip), %xmm1   # 0x5ca138
ucomisd %xmm0, %xmm1
jae 0x40e402
addsd 0x1bac3e(%rip), %xmm0   # 0x5c9018
movsd 0x1bbd5e(%rip), %xmm1   # 0x5ca140
divsd 0x10(%rbx), %xmm1
callq 0x4ecf40
movapd %xmm0, %xmm3
addsd 0x1bbd40(%rip), %xmm3   # 0x5ca138
mulsd (%rsp), %xmm3
jmp 0x40e365
movapd (%rsp), %xmm3
xorpd 0x1bbc31(%rip), %xmm3   # 0x5ca040
jmp 0x40e365
leaq 0x1bbe89(%rip), %rdi    # 0x5ca2a4
leaq 0x1bbe8a(%rip), %rsi    # 0x5ca2ac
leaq 0x1bbe8d(%rip), %rcx    # 0x5ca2b6
movl $0x7c, %edx
callq 0x50b050
leaq 0x1bbe6a(%rip), %rdi    # 0x5ca2a4
leaq 0x1bbe6b(%rip), %rsi    # 0x5ca2ac
leaq 0x1bbe6e(%rip), %rcx    # 0x5ca2b6
movl $0x87, %edx
callq 0x50b050
leaq 0x1bbe98(%rip), %rdi    # 0x5ca2f1
leaq 0x1bbe4c(%rip), %rsi    # 0x5ca2ac
leaq 0x1bbe4f(%rip), %rcx    # 0x5ca2b6
movl $0x92, %edx
callq 0x50b050