double Tween_QuarticInOutEasing(double k) {
  k *= 2;
  if (k < 1) {
    return 0.5 * k * k * k * k;
  }
  k -= 2;
  return -0.5 * (k * k * k * k - 2);
}


x86 assembly (clang, -O0):
<Tween_QuarticInOutEasing>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xedd(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1154 <Tween_QuarticInOutEasing+0x54>
movsd  0xeea(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    119f <Tween_QuarticInOutEasing+0x9f>
movsd  -0x10(%rbp),%xmm0
movsd  0xea7(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe8e(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xe7a(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Tween_QuarticInOutEasing>:
addsd  %xmm0,%xmm0
movsd  0xef4(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    112f <Tween_QuarticInOutEasing+0x2f>
movsd  0xefe(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret
movsd  0xed1(%rip),%xmm2
addsd  %xmm2,%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm2,%xmm1
mulsd  0xeb9(%rip),%xmm1
movapd %xmm1,%xmm0
ret

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

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