#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 */
int pow(int, int);
float ANTweenTimingFunctionExpoInOut(float time, float begin, float change,
                                     float duration) {
  if (time == 0) {
    return begin;
  }
  if (time == duration) {
    return begin + change;
  }
  time /= duration / 2;
  if (time < 1) {
    return change / 2 * pow(2, 10 * (time - 1)) + begin;
  }
  return change / 2 * (-pow(2, -10 * --time) + 2) + begin;
}


x86 assembly (clang, -O0):
<ANTweenTimingFunctionExpoInOut>:
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 <ANTweenTimingFunctionExpoInOut+0x42>
jp     1152 <ANTweenTimingFunctionExpoInOut+0x42>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1273 <ANTweenTimingFunctionExpoInOut+0x163>
movss  -0x8(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jne    117b <ANTweenTimingFunctionExpoInOut+0x6b>
jp     117b <ANTweenTimingFunctionExpoInOut+0x6b>
movss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1273 <ANTweenTimingFunctionExpoInOut+0x163>
movss  -0x14(%rbp),%xmm1
movss  0xe7c(%rip),%xmm0
divss  %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xe5e(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    120d <ANTweenTimingFunctionExpoInOut+0xfd>
movss  -0x10(%rbp),%xmm0
movss  0xe4b(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm1
movss  0xe31(%rip),%xmm0
subss  %xmm0,%xmm1
movss  0xe35(%rip),%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1030 <pow@plt>
movss  -0x18(%rbp),%xmm0
cvtsi2ss %eax,%xmm2
movss  -0xc(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1273 <ANTweenTimingFunctionExpoInOut+0x163>
movss  -0x10(%rbp),%xmm0
movss  0xdea(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xde1(%rip),%xmm1
addss  -0x8(%rbp),%xmm1
movss  %xmm1,-0x8(%rbp)
movss  0xdcb(%rip),%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1030 <pow@plt>
movss  -0x1c(%rbp),%xmm0
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
add    $0x2,%eax
cvtsi2ss %eax,%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):
<ANTweenTimingFunctionExpoInOut>:
push   %rbx
sub    $0x10,%rsp
xorps  %xmm4,%xmm4
ucomiss %xmm4,%xmm0
jne    111f <ANTweenTimingFunctionExpoInOut+0xf>
jnp    112a <ANTweenTimingFunctionExpoInOut+0x1a>
ucomiss %xmm3,%xmm0
jne    1133 <ANTweenTimingFunctionExpoInOut+0x23>
jp     1133 <ANTweenTimingFunctionExpoInOut+0x23>
addss  %xmm2,%xmm1
movaps %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
ret
movss  %xmm1,0xc(%rsp)
movss  0xebf(%rip),%xmm1
mulss  %xmm1,%xmm3
divss  %xmm3,%xmm0
movss  0xeb3(%rip),%xmm3
ucomiss %xmm0,%xmm3
mulss  %xmm1,%xmm2
movss  %xmm2,0x8(%rsp)
addss  0xea2(%rip),%xmm0
jbe    1187 <ANTweenTimingFunctionExpoInOut+0x77>
mulss  0xea0(%rip),%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1030 <pow@plt>
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
jmp    11ab <ANTweenTimingFunctionExpoInOut+0x9b>
mulss  0xe7d(%rip),%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%ebx
mov    $0x2,%edi
call   1030 <pow@plt>
sub    %eax,%ebx
xorps  %xmm1,%xmm1
cvtsi2ss %ebx,%xmm1
movss  0x8(%rsp),%xmm0
mulss  %xmm1,%xmm0
addss  0xc(%rsp),%xmm0
jmp    112d <ANTweenTimingFunctionExpoInOut+0x1d>

LLVM IR (-O0):
define float @ANTweenTimingFunctionExpoInOut(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 %53
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 %53
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 = load float, float* %6
%28 = fcmp olt float %27, 1.000000e+00
br i1 %28, label %29, label %40
29: ; preds = %22
%30 = load float, float* %8
%31 = fdiv float %30, 2.000000e+00
%32 = load float, float* %6
%33 = fsub float %32, 1.000000e+00
%34 = fmul float 1.000000e+01, %33
%35 = fptosi float %34 to i32
%36 = call i32 @pow(i32 2, i32 %35)
%37 = sitofp i32 %36 to float
%38 = load float, float* %7
%39 = call float @llvm.fmuladd.f32(float %31, float %37, float %38)
store float %39, float* %5
br label %53
40: ; preds = %22
%41 = load float, float* %8
%42 = fdiv float %41, 2.000000e+00
%43 = load float, float* %6
%44 = fadd float %43, -1.000000e+00
store float %44, float* %6
%45 = fmul float -1.000000e+01, %44
%46 = fptosi float %45 to i32
%47 = call i32 @pow(i32 2, i32 %46)
%48 = sub nsw i32 0, %47
%49 = add nsw i32 %48, 2
%50 = sitofp i32 %49 to float
%51 = load float, float* %7
%52 = call float @llvm.fmuladd.f32(float %42, float %50, float %51)
store float %52, float* %5
br label %53
53: ; preds = %40, %29, %18, %12
%54 = load float, float* %5
ret float %54
}

LLVM IR (-O2):
define float @ANTweenTimingFunctionExpoInOut(float %0, float %1, float %2, float %3) {
%5 = fcmp oeq float %0, 0.000000e+00
br i1 %5, label %29, 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 %29
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 %22
16: ; preds = %10
%17 = fmul float %15, 1.000000e+01
%18 = fptosi float %17 to i32
%19 = tail call i32 @pow(i32 2, i32 %18)
%20 = sitofp i32 %19 to float
%21 = tail call float @llvm.fmuladd.f32(float %14, float %20, float %1)
br label %29
22: ; preds = %10
%23 = fmul float %15, -1.000000e+01
%24 = fptosi float %23 to i32
%25 = tail call i32 @pow(i32 2, i32 %24)
%26 = sub i32 2, %25
%27 = sitofp i32 %26 to float
%28 = tail call float @llvm.fmuladd.f32(float %14, float %27, float %1)
br label %29
29: ; preds = %4, %22, %16, %8
%30 = phi float [ %9, %8 ], [ %21, %16 ], [ %28, %22 ], [ %1, %4 ]
ret float %30
}