#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double JHKeyframeAnimationFunctionEaseInBounce(double, int /*<<< orphan*/,
                                               double, double);
double JHKeyframeAnimationFunctionEaseOutBounce(double, int /*<<< orphan*/,
                                                double, double);
double JHKeyframeAnimationFunctionEaseInOutBounce(double t, double b, double c,
                                                  double d) {
  if (t < d / 2)
    return JHKeyframeAnimationFunctionEaseInBounce(t * 2, 0, c, d) * .5 + b;
  else
    return JHKeyframeAnimationFunctionEaseOutBounce(t * 2 - d, 0, c, d) * .5 +
           c * .5 + b;
}


x86 assembly (clang, -O0):
<JHKeyframeAnimationFunctionEaseInOutBounce>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  0xeb2(%rip),%xmm2
divsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    1199 <JHKeyframeAnimationFunctionEaseInOutBounce+0x79>
movsd  0xe9c(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
xor    %edi,%edi
call   1030 <JHKeyframeAnimationFunctionEaseInBounce@plt>
movsd  -0x18(%rbp),%xmm1
movsd  0xe81(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11fa <JHKeyframeAnimationFunctionEaseInOutBounce+0xda>
movsd  -0x10(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
xor    %edi,%edi
call   1040 <JHKeyframeAnimationFunctionEaseOutBounce@plt>
movsd  0xe2d(%rip),%xmm1
mulsd  -0x20(%rbp),%xmm1
movsd  0xe20(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<JHKeyframeAnimationFunctionEaseInOutBounce>:
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  0xece(%rip),%xmm1
mulsd  %xmm3,%xmm1
ucomisd %xmm0,%xmm1
jbe    1159 <JHKeyframeAnimationFunctionEaseInOutBounce+0x39>
addsd  %xmm0,%xmm0
xor    %edi,%edi
movapd %xmm2,%xmm1
movapd %xmm3,%xmm2
call   1030 <JHKeyframeAnimationFunctionEaseInBounce@plt>
mulsd  0xea9(%rip),%xmm0
jmp    118f <JHKeyframeAnimationFunctionEaseInOutBounce+0x6f>
addsd  %xmm0,%xmm0
subsd  %xmm3,%xmm0
xor    %edi,%edi
movaps %xmm2,%xmm1
movsd  %xmm2,0x10(%rsp)
movapd %xmm3,%xmm2
call   1040 <JHKeyframeAnimationFunctionEaseOutBounce@plt>
movsd  0xe83(%rip),%xmm1
movsd  0x10(%rsp),%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @JHKeyframeAnimationFunctionEaseInOutBounce(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* %6
%11 = load double, double* %9
%12 = fdiv double %11, 2.000000e+00
%13 = fcmp olt double %10, %12
br i1 %13, label %14, label %22
14: ; preds = %4
%15 = load double, double* %6
%16 = fmul double %15, 2.000000e+00
%17 = load double, double* %8
%18 = load double, double* %9
%19 = call double @JHKeyframeAnimationFunctionEaseInBounce(double %16, i32 0, double %17, double %18)
%20 = load double, double* %7
%21 = call double @llvm.fmuladd.f64(double %19, double 5.000000e-01, double %20)
store double %21, double* %5
br label %35
22: ; preds = %4
%23 = load double, double* %6
%24 = load double, double* %9
%25 = fneg double %24
%26 = call double @llvm.fmuladd.f64(double %23, double 2.000000e+00, double %25)
%27 = load double, double* %8
%28 = load double, double* %9
%29 = call double @JHKeyframeAnimationFunctionEaseOutBounce(double %26, i32 0, double %27, double %28)
%30 = load double, double* %8
%31 = fmul double %30, 5.000000e-01
%32 = call double @llvm.fmuladd.f64(double %29, double 5.000000e-01, double %31)
%33 = load double, double* %7
%34 = fadd double %32, %33
store double %34, double* %5
br label %35
35: ; preds = %22, %14
%36 = load double, double* %5
ret double %36
}

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