// File: /workspace/github_cpp_makefile_star2_O2/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 0x40b5ff
movq %rbx, %rdi
movapd %xmm3, %xmm1
callq 0x40b5b8
movsd 0x18(%rbx), %xmm3
mulsd %xmm3, %xmm3
subsd (%rsp), %xmm3
addsd %xmm0, %xmm3
jmp 0x40b6d9
movsd 0x10(%rbx), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jbe 0x40b662
mulsd %xmm1, %xmm3
movapd %xmm3, 0x10(%rsp)
mulsd 0x1b3ad8(%rip), %xmm1   # 0x5bf0f8
movapd %xmm2, %xmm0
callq 0x4e1d70
mulsd 0x10(%rsp), %xmm0
ucomisd 0x1b3ae9(%rip), %xmm0   # 0x5bf120
jb 0x40b788
movsd 0x1b3afb(%rip), %xmm1   # 0x5bf140
ucomisd %xmm0, %xmm1
jbe 0x40b6aa
movsd 0x1b3ae5(%rip), %xmm1   # 0x5bf138
divsd 0x10(%rbx), %xmm1
mulsd %xmm1, %xmm0
movapd %xmm0, %xmm3
jmp 0x40b6d0
jne 0x40b6e3
jp 0x40b6e3
addsd %xmm3, %xmm3
ucomisd %xmm0, %xmm3
jb 0x40b7a5
movsd 0x1b3ac4(%rip), %xmm0   # 0x5bf140
ucomisd %xmm3, %xmm0
xorpd 0x1b39d8(%rip), %xmm3   # 0x5bf060
ja 0x40b6a4
movapd %xmm3, %xmm0
callq 0x4e1ec0
movapd (%rsp), %xmm2
movapd %xmm0, %xmm3
addsd 0x1b3a8c(%rip), %xmm3   # 0x5bf130
mulsd %xmm2, %xmm3
jmp 0x40b6d9
addsd 0x1b2966(%rip), %xmm0   # 0x5be018
movsd 0x1b3a7e(%rip), %xmm1   # 0x5bf138
divsd 0x10(%rbx), %xmm1
callq 0x4e1d70
movapd %xmm0, %xmm3
addsd 0x1b3a60(%rip), %xmm3   # 0x5bf130
movapd (%rsp), %xmm0
mulsd %xmm0, %xmm3
movapd %xmm3, %xmm0
addq $0x20, %rsp
popq %rbx
retq
mulsd %xmm1, %xmm3
movapd %xmm3, 0x10(%rsp)
mulsd 0x1b3a03(%rip), %xmm1   # 0x5bf0f8
movapd %xmm2, %xmm0
callq 0x4e1d70
mulsd 0x10(%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jb 0x40b7c4
ucomisd 0x1b3a0e(%rip), %xmm0   # 0x5bf128
jbe 0x40b738
movsd 0x1b3a14(%rip), %xmm1   # 0x5bf138
divsd 0x10(%rbx), %xmm1
mulsd %xmm1, %xmm0
mulsd (%rsp), %xmm0
movapd %xmm0, %xmm3
jmp 0x40b6d9
movsd 0x1b39f0(%rip), %xmm1   # 0x5bf130
ucomisd %xmm0, %xmm1
jae 0x40b776
addsd 0x1b28ca(%rip), %xmm0   # 0x5be018
movsd 0x1b39e2(%rip), %xmm1   # 0x5bf138
divsd 0x10(%rbx), %xmm1
callq 0x4e1d70
movapd %xmm0, %xmm3
addsd 0x1b39c4(%rip), %xmm3   # 0x5bf130
mulsd (%rsp), %xmm3
jmp 0x40b6d9
movapd (%rsp), %xmm3
xorpd 0x1b38dd(%rip), %xmm3   # 0x5bf060
jmp 0x40b6d9
leaq 0x1b3b1d(%rip), %rdi    # 0x5bf2ac
leaq 0x1b3b1e(%rip), %rsi    # 0x5bf2b4
leaq 0x1b3b21(%rip), %rcx    # 0x5bf2be
pushq $0x7c
popq %rdx
callq 0x4ffe80
leaq 0x1b3b00(%rip), %rdi    # 0x5bf2ac
leaq 0x1b3b01(%rip), %rsi    # 0x5bf2b4
leaq 0x1b3b04(%rip), %rcx    # 0x5bf2be
movl $0x87, %edx
callq 0x4ffe80
leaq 0x1b3b2e(%rip), %rdi    # 0x5bf2f9
leaq 0x1b3ae2(%rip), %rsi    # 0x5bf2b4
leaq 0x1b3ae5(%rip), %rcx    # 0x5bf2be
movl $0x92, %edx
callq 0x4ffe80
nop