// File: 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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movsd %xmm1, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd 0x18(%rax), %xmm0
callq 0x418110
movaps %xmm0, %xmm1
movsd -0x48(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x417e33
movq -0x50(%rbp), %rax
movsd 0x18(%rax), %xmm0
callq 0x418110
movq -0x50(%rbp), %rdi
movsd -0x20(%rbp), %xmm1
callq 0x417db0
movq -0x50(%rbp), %rax
movsd %xmm0, -0x28(%rbp)
movsd 0x18(%rax), %xmm0
callq 0x418110
subsd -0x18(%rbp), %xmm0
addsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x4180fe
movq -0x50(%rbp), %rax
movsd 0x10(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x417f25
movq -0x50(%rbp), %rax
movsd -0x20(%rbp), %xmm0
mulsd 0x10(%rax), %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x18(%rbp), %xmm0
movsd 0x1e4437(%rip), %xmm1   # 0x5fc2a0
mulsd 0x10(%rax), %xmm1
callq 0x51ef10
movaps %xmm0, %xmm1
movsd -0x58(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x30(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x417e94
jmp 0x417eb3
leaq 0x1e45e9(%rip), %rdi    # 0x5fc484
leaq 0x1e45ea(%rip), %rsi    # 0x5fc48c
movl $0x7c, %edx
leaq 0x1e45e8(%rip), %rcx    # 0x5fc496
callq 0x53d020
movsd 0x1e444d(%rip), %xmm0   # 0x5fc308
ucomisd -0x30(%rbp), %xmm0
jbe 0x417ee7
movq -0x50(%rbp), %rax
movsd 0x1e4432(%rip), %xmm0   # 0x5fc300
divsd 0x10(%rax), %xmm0
mulsd -0x30(%rbp), %xmm0
mulsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x4180fe
movq -0x50(%rbp), %rax
movsd 0x1e3125(%rip), %xmm0   # 0x5fb018
addsd -0x30(%rbp), %xmm0
movsd 0x1e4400(%rip), %xmm1   # 0x5fc300
divsd 0x10(%rax), %xmm1
callq 0x51ef10
movsd 0x1e3106(%rip), %xmm1   # 0x5fb018
subsd %xmm1, %xmm0
mulsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x4180fe
movq -0x50(%rbp), %rax
movsd 0x10(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x417ff8
jp 0x417ff8
movsd 0x1e4367(%rip), %xmm0   # 0x5fc2b0
mulsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x417f63
jmp 0x417f82
leaq 0x1e451a(%rip), %rdi    # 0x5fc484
leaq 0x1e451b(%rip), %rsi    # 0x5fc48c
movl $0x87, %edx
leaq 0x1e4519(%rip), %rcx    # 0x5fc496
callq 0x53d020
movsd 0x1e437e(%rip), %xmm0   # 0x5fc308
ucomisd -0x38(%rbp), %xmm0
jbe 0x417fbc
movsd -0x38(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x4180fe
movsd -0x38(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
callq 0x51f060
movsd 0x1e3033(%rip), %xmm1   # 0x5fb018
subsd %xmm1, %xmm0
mulsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x4180fe
movq -0x50(%rbp), %rax
movsd -0x20(%rbp), %xmm0
mulsd 0x10(%rax), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x18(%rbp), %xmm0
movsd 0x1e4288(%rip), %xmm1   # 0x5fc2a0
mulsd 0x10(%rax), %xmm1
callq 0x51ef10
movaps %xmm0, %xmm1
movsd -0x60(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x40(%rbp), %xmm0
jb 0x41803f
jmp 0x41805e
leaq 0x1e448b(%rip), %rdi    # 0x5fc4d1
leaq 0x1e443f(%rip), %rsi    # 0x5fc48c
movl $0x92, %edx
leaq 0x1e443d(%rip), %rcx    # 0x5fc496
callq 0x53d020
movsd -0x40(%rbp), %xmm0
movsd 0x1e4285(%rip), %xmm1   # 0x5fc2f0
ucomisd %xmm1, %xmm0
jbe 0x418093
movq -0x50(%rbp), %rax
movsd 0x1e4283(%rip), %xmm0   # 0x5fc300
divsd 0x10(%rax), %xmm0
mulsd -0x40(%rbp), %xmm0
mulsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x4180fe
movsd 0x1e425d(%rip), %xmm0   # 0x5fc2f8
ucomisd -0x40(%rbp), %xmm0
jb 0x4180c5
movsd -0x18(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x4180fe
movq -0x50(%rbp), %rax
movsd 0x1e2f47(%rip), %xmm0   # 0x5fb018
addsd -0x40(%rbp), %xmm0
movsd 0x1e4222(%rip), %xmm1   # 0x5fc300
divsd 0x10(%rax), %xmm1
callq 0x51ef10
movsd 0x1e2f28(%rip), %xmm1   # 0x5fb018
subsd %xmm1, %xmm0
mulsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)