double QuinticEaseInOut(double p) {
  if (p < 0.5) {
    return 16 * p * p * p * p * p;
  } else {
    double f = ((2 * p) - 2);
    return 0.5 * f * f * f * f * f + 1;
  }
}


x86 assembly (clang, -O0):
<QuinticEaseInOut>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  0xeef(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1147 <QuinticEaseInOut+0x47>
movsd  0xef4(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1197 <QuinticEaseInOut+0x97>
movsd  -0x10(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xeb8(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe97(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe7a(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<QuinticEaseInOut>:
movsd  0xef8(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    112f <QuinticEaseInOut+0x2f>
movsd  0xf02(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret
addsd  %xmm0,%xmm0
addsd  0xecd(%rip),%xmm0
movsd  0xebd(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  0xeb1(%rip),%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @QuinticEaseInOut(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %3
%5 = load double, double* %3
%6 = fcmp olt double %5, 5.000000e-01
br i1 %6, label %7, label %18
7: ; preds = %1
%8 = load double, double* %3
%9 = fmul double 1.600000e+01, %8
%10 = load double, double* %3
%11 = fmul double %9, %10
%12 = load double, double* %3
%13 = fmul double %11, %12
%14 = load double, double* %3
%15 = fmul double %13, %14
%16 = load double, double* %3
%17 = fmul double %15, %16
store double %17, double* %2
br label %31
18: ; preds = %1
%19 = load double, double* %3
%20 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %19, double -2.000000e+00)
store double %20, double* %4
%21 = load double, double* %4
%22 = fmul double 5.000000e-01, %21
%23 = load double, double* %4
%24 = fmul double %22, %23
%25 = load double, double* %4
%26 = fmul double %24, %25
%27 = load double, double* %4
%28 = fmul double %26, %27
%29 = load double, double* %4
%30 = call double @llvm.fmuladd.f64(double %28, double %29, double 1.000000e+00)
store double %30, double* %2
br label %31
31: ; preds = %18, %7
%32 = load double, double* %2
ret double %32
}

LLVM IR (-O2):
define double @QuinticEaseInOut(double %0) {
%2 = fcmp olt double %0, 5.000000e-01
br i1 %2, label %3, label %9
3: ; preds = %1
%4 = fmul double %0, 1.600000e+01
%5 = fmul double %4, %0
%6 = fmul double %5, %0
%7 = fmul double %6, %0
%8 = fmul double %7, %0
br label %16
9: ; preds = %1
%10 = tail call double @llvm.fmuladd.f64(double %0, double 2.000000e+00, double -2.000000e+00)
%11 = fmul double %10, 5.000000e-01
%12 = fmul double %10, %11
%13 = fmul double %10, %12
%14 = fmul double %10, %13
%15 = tail call double @llvm.fmuladd.f64(double %14, double %10, double 1.000000e+00)
br label %16
16: ; preds = %9, %3
%17 = phi double [ %8, %3 ], [ %15, %9 ]
ret double %17
}