#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 Tween_BounceInEasing(double);
double Tween_BounceOutEasing(double);
double Tween_BounceInOutEasing(double k) {
  if (k < 0.5) {
    return Tween_BounceInEasing(k * 2) * 0.5;
  }
  return Tween_BounceOutEasing(k * 2 - 1) * 0.5 + 0.5;
}


x86 assembly (clang, -O0):
<Tween_BounceInOutEasing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xecb(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1168 <Tween_BounceInOutEasing+0x48>
movsd  0xec8(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1030 <Tween_BounceInEasing@plt>
movsd  0xea6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1197 <Tween_BounceInOutEasing+0x77>
movsd  -0x10(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xe8f(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1040 <Tween_BounceOutEasing@plt>
movsd  0xe76(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Tween_BounceInOutEasing>:
push   %rax
movsd  0xed7(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1142 <Tween_BounceInOutEasing+0x22>
addsd  %xmm0,%xmm0
call   1030 <Tween_BounceInEasing@plt>
mulsd  0xec0(%rip),%xmm0
pop    %rax
ret
addsd  %xmm0,%xmm0
addsd  0xeba(%rip),%xmm0
call   1040 <Tween_BounceOutEasing@plt>
movsd  0xea5(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @Tween_BounceInOutEasing(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 5.000000e-01
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load double, double* %3
%8 = fmul double %7, 2.000000e+00
%9 = call double @Tween_BounceInEasing(double %8)
%10 = fmul double %9, 5.000000e-01
store double %10, double* %2
br label %16
11: ; preds = %1
%12 = load double, double* %3
%13 = call double @llvm.fmuladd.f64(double %12, double 2.000000e+00, double -1.000000e+00)
%14 = call double @Tween_BounceOutEasing(double %13)
%15 = call double @llvm.fmuladd.f64(double %14, double 5.000000e-01, double 5.000000e-01)
store double %15, double* %2
br label %16
16: ; preds = %11, %6
%17 = load double, double* %2
ret double %17
}

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