#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 */
float EaseBounceIn(float, float, float, float);
float EaseBounceOut(float, float, float, float);
float EaseBounceInOut(float t, float b, float c, float d) {
  if (t < d / 2.0f)
    return (EaseBounceIn(t * 2.0f, 0.0f, c, d) * 0.5f + b);
  else
    return (EaseBounceOut(t * 2.0f - d, 0.0f, c, d) * 0.5f + c * 0.5f + b);
}


x86 assembly (clang, -O0):
<EaseBounceInOut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  %xmm3,-0x14(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
movss  0xeb2(%rip),%xmm2
divss  %xmm2,%xmm0
ucomiss %xmm1,%xmm0
jbe    1199 <EaseBounceInOut+0x79>
movss  0xe9d(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
movss  -0x14(%rbp),%xmm3
xorps  %xmm1,%xmm1
call   1030 <EaseBounceIn@plt>
movss  -0xc(%rbp),%xmm1
movss  0xe7d(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11f1 <EaseBounceInOut+0xd1>
movss  -0x8(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
addss  %xmm0,%xmm0
addss  %xmm1,%xmm0
movss  -0x10(%rbp),%xmm2
movss  -0x14(%rbp),%xmm3
xorps  %xmm1,%xmm1
call   1040 <EaseBounceOut@plt>
movss  0xe32(%rip),%xmm1
mulss  -0x10(%rbp),%xmm1
movss  0xe25(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EaseBounceInOut>:
push   %rax
movss  %xmm1,(%rsp)
movss  0xed2(%rip),%xmm1
mulss  %xmm3,%xmm1
ucomiss %xmm0,%xmm1
jbe    114d <EaseBounceInOut+0x2d>
addss  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1030 <EaseBounceIn@plt>
mulss  0xeb5(%rip),%xmm0
jmp    117d <EaseBounceInOut+0x5d>
addss  %xmm0,%xmm0
subss  %xmm3,%xmm0
xorps  %xmm1,%xmm1
movss  %xmm2,0x4(%rsp)
call   1040 <EaseBounceOut@plt>
movss  0xe95(%rip),%xmm1
movss  0x4(%rsp),%xmm2
mulss  %xmm1,%xmm2
mulss  %xmm1,%xmm0
addss  %xmm2,%xmm0
addss  (%rsp),%xmm0
pop    %rax
ret

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

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