#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 powf(float, float);
float EaseExpoInOut(float t, float b, float c, float d) {
  if (t == 0.0f)
    return b;
  if (t == d)
    return (b + c);
  if ((t /= d / 2.0f) < 1.0f)
    return (c / 2.0f * powf(2.0f, 10.0f * (t - 1.0f)) + b);
  return (c / 2.0f * (-powf(2.0f, -10.0f * (t - 1.0f)) + 2.0f) + b);
}


x86 assembly (clang, -O0):
<EaseExpoInOut>:
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),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1152 <EaseExpoInOut+0x42>
jp     1152 <EaseExpoInOut+0x42>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    127d <EaseExpoInOut+0x16d>
movss  -0x8(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jne    117b <EaseExpoInOut+0x6b>
jp     117b <EaseExpoInOut+0x6b>
movss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    127d <EaseExpoInOut+0x16d>
movss  -0x14(%rbp),%xmm0
movss  0xe7c(%rip),%xmm1
divss  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,-0x8(%rbp)
movss  0xe5e(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    120a <EaseExpoInOut+0xfa>
movss  -0x10(%rbp),%xmm0
movss  0xe4c(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xe32(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xe32(%rip),%xmm1
mulss  %xmm0,%xmm1
movss  0xe1e(%rip),%xmm0
call   1030 <powf@plt>
movaps %xmm0,%xmm2
movss  -0x18(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    127d <EaseExpoInOut+0x16d>
movss  -0x10(%rbp),%xmm0
movss  0xded(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xdd3(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xdcf(%rip),%xmm1
mulss  %xmm0,%xmm1
movss  0xdbf(%rip),%xmm0
call   1030 <powf@plt>
movaps %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
movss  0xd9d(%rip),%xmm1
addss  %xmm1,%xmm2
movss  -0xc(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EaseExpoInOut>:
push   %rax
xorps  %xmm4,%xmm4
ucomiss %xmm4,%xmm0
jne    111b <EaseExpoInOut+0xb>
jnp    1126 <EaseExpoInOut+0x16>
ucomiss %xmm3,%xmm0
jne    112b <EaseExpoInOut+0x1b>
jp     112b <EaseExpoInOut+0x1b>
addss  %xmm2,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret
movss  %xmm1,0x4(%rsp)
movss  0xec7(%rip),%xmm1
mulss  %xmm1,%xmm3
divss  %xmm3,%xmm0
movss  0xebb(%rip),%xmm3
ucomiss %xmm0,%xmm3
mulss  %xmm1,%xmm2
movss  %xmm2,(%rsp)
addss  0xeab(%rip),%xmm0
jbe    1173 <EaseExpoInOut+0x63>
mulss  0xead(%rip),%xmm0
call   1030 <exp2f@plt>
mulss  (%rsp),%xmm0
jmp    1195 <EaseExpoInOut+0x85>
mulss  0xe91(%rip),%xmm0
call   1030 <exp2f@plt>
movss  0xe88(%rip),%xmm1
subss  %xmm0,%xmm1
movss  (%rsp),%xmm0
mulss  %xmm1,%xmm0
addss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @EaseExpoInOut(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 = fcmp oeq float %10, 0.000000e+00
br i1 %11, label %12, label %14
12: ; preds = %4
%13 = load float, float* %7
store float %13, float* %5
br label %48
14: ; preds = %4
%15 = load float, float* %6
%16 = load float, float* %9
%17 = fcmp oeq float %15, %16
br i1 %17, label %18, label %22
18: ; preds = %14
%19 = load float, float* %7
%20 = load float, float* %8
%21 = fadd float %19, %20
store float %21, float* %5
br label %48
22: ; preds = %14
%23 = load float, float* %9
%24 = fdiv float %23, 2.000000e+00
%25 = load float, float* %6
%26 = fdiv float %25, %24
store float %26, float* %6
%27 = fcmp olt float %26, 1.000000e+00
br i1 %27, label %28, label %37
28: ; preds = %22
%29 = load float, float* %8
%30 = fdiv float %29, 2.000000e+00
%31 = load float, float* %6
%32 = fsub float %31, 1.000000e+00
%33 = fmul float 1.000000e+01, %32
%34 = call float @powf(float 2.000000e+00, float %33)
%35 = load float, float* %7
%36 = call float @llvm.fmuladd.f32(float %30, float %34, float %35)
store float %36, float* %5
br label %48
37: ; preds = %22
%38 = load float, float* %8
%39 = fdiv float %38, 2.000000e+00
%40 = load float, float* %6
%41 = fsub float %40, 1.000000e+00
%42 = fmul float -1.000000e+01, %41
%43 = call float @powf(float 2.000000e+00, float %42)
%44 = fneg float %43
%45 = fadd float %44, 2.000000e+00
%46 = load float, float* %7
%47 = call float @llvm.fmuladd.f32(float %39, float %45, float %46)
store float %47, float* %5
br label %48
48: ; preds = %37, %28, %18, %12
%49 = load float, float* %5
ret float %49
}

LLVM IR (-O2):
define float @EaseExpoInOut(float %0, float %1, float %2, float %3) {
%5 = fcmp oeq float %0, 0.000000e+00
br i1 %5, label %25, label %6
6: ; preds = %4
%7 = fcmp oeq float %0, %3
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = fadd float %1, %2
br label %25
10: ; preds = %6
%11 = fmul float %3, 5.000000e-01
%12 = fdiv float %0, %11
%13 = fcmp olt float %12, 1.000000e+00
%14 = fmul float %2, 5.000000e-01
%15 = fadd float %12, -1.000000e+00
br i1 %13, label %16, label %20
16: ; preds = %10
%17 = fmul float %15, 1.000000e+01
%18 = tail call float @exp2f(float %17)
%19 = tail call float @llvm.fmuladd.f32(float %14, float %18, float %1)
br label %25
20: ; preds = %10
%21 = fmul float %15, -1.000000e+01
%22 = tail call float @exp2f(float %21)
%23 = fsub float 2.000000e+00, %22
%24 = tail call float @llvm.fmuladd.f32(float %14, float %23, float %1)
br label %25
25: ; preds = %4, %20, %16, %8
%26 = phi float [ %9, %8 ], [ %19, %16 ], [ %24, %20 ], [ %1, %4 ]
ret float %26
}