double JHKeyframeAnimationFunctionEaseInOutQuad(double t, double b, double c,
                                                double d) {
  if ((t /= d / 2) < 1)
    return c / 2 * t * t + b;
  return -c / 2 * ((--t) * (t - 2) - 1) + b;
}


x86 assembly (clang, -O0):
<JHKeyframeAnimationFunctionEaseInOutQuad>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xee3(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,-0x10(%rbp)
movsd  0xec1(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    117b <JHKeyframeAnimationFunctionEaseInOutQuad+0x7b>
movsd  -0x20(%rbp),%xmm0
movsd  0xeb2(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11e8 <JHKeyframeAnimationFunctionEaseInOutQuad+0xe8>
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xe69(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe65(%rip),%xmm2
addsd  -0x10(%rbp),%xmm2
movsd  %xmm2,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xe46(%rip),%xmm3
subsd  %xmm3,%xmm1
mulsd  %xmm1,%xmm2
movsd  0xe3e(%rip),%xmm1
addsd  %xmm1,%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<JHKeyframeAnimationFunctionEaseInOutQuad>:
mulsd  0xef8(%rip),%xmm3
divsd  %xmm3,%xmm0
movsd  0xef4(%rip),%xmm3
ucomisd %xmm0,%xmm3
jbe    1133 <JHKeyframeAnimationFunctionEaseInOutQuad+0x33>
mulsd  0xede(%rip),%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
ret
mulsd  0xed5(%rip),%xmm2
movsd  0xed5(%rip),%xmm4
addsd  %xmm4,%xmm0
movsd  0xed1(%rip),%xmm3
addsd  %xmm0,%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm2,%xmm3
addsd  %xmm1,%xmm3
movapd %xmm3,%xmm0
ret

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

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