#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 M_PI;
float asin(float);
float fabsf(float);
float pow(int, int);
float sin(float);
float ANTweenTimingFunctionElasticInOut(float time, float begin, float change,
                                        float duration) {
  float p = duration * (.3 * 1.5);
  float s, a;
  if (time == 0) {
    return begin;
  }
  time /= duration / 2;
  if (time == 2) {
    return begin + change;
  }
  if (!a || a < fabsf(change)) {
    a = change;
    s = p / 4;
  } else {
    s = p / (2 * M_PI) * asin(change / a);
  }
  if (time < 1) {
    time -= 1;
    return -.5 * (a * pow(2, 10 * time) *
                  sin((time * duration - s) * (2 * M_PI) / p)) +
           begin;
  } else {
    time -= 1;
    return a * pow(2, -10 * time) *
               sin((time * duration - s) * (2 * M_PI) / p) * .5 +
           change + begin;
  }
}


x86 assembly (clang, -O0):
<ANTweenTimingFunctionElasticInOut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  %xmm3,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea3(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1190 <ANTweenTimingFunctionElasticInOut+0x60>
jp     1190 <ANTweenTimingFunctionElasticInOut+0x60>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1420 <ANTweenTimingFunctionElasticInOut+0x2f0>
movss  -0x14(%rbp),%xmm1
movss  0xe7b(%rip),%xmm0
divss  %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xe5c(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    11df <ANTweenTimingFunctionElasticInOut+0xaf>
jp     11df <ANTweenTimingFunctionElasticInOut+0xaf>
movss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1420 <ANTweenTimingFunctionElasticInOut+0x2f0>
movss  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    11fb <ANTweenTimingFunctionElasticInOut+0xcb>
jp     11fb <ANTweenTimingFunctionElasticInOut+0xcb>
jmp    1219 <ANTweenTimingFunctionElasticInOut+0xe9>
movss  -0x20(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
movaps 0xe24(%rip),%xmm2
pand   %xmm2,%xmm0
ucomiss %xmm1,%xmm0
jbe    123e <ANTweenTimingFunctionElasticInOut+0x10e>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x18(%rbp),%xmm0
movss  0xdec(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    127c <ANTweenTimingFunctionElasticInOut+0x14c>
movss  -0x18(%rbp),%xmm0
mov    0x2d9e(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2ss %eax,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x10(%rbp),%xmm0
divss  -0x20(%rbp),%xmm0
call   1040 <asin@plt>
movaps %xmm0,%xmm1
movss  -0x24(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xd9c(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1353 <ANTweenTimingFunctionElasticInOut+0x223>
movss  -0x8(%rbp),%xmm0
movss  0xd85(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  0xd72(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movss  -0x2c(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x14(%rbp),%xmm2
movss  -0x1c(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    0x2ce3(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
divss  -0x18(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movss  -0x28(%rbp),%xmm0
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xcd3(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1420 <ANTweenTimingFunctionElasticInOut+0x2f0>
movss  -0x8(%rbp),%xmm0
movss  0xcc0(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  0xca9(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movss  -0x34(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x14(%rbp),%xmm2
movss  -0x1c(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    0x2c1e(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
divss  -0x18(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movss  -0x30(%rbp),%xmm0
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xc06(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ANTweenTimingFunctionElasticInOut>:
push   %rbx
sub    $0x20,%rsp
movaps %xmm0,%xmm4
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm4
jne    1146 <ANTweenTimingFunctionElasticInOut+0x16>
jnp    12f9 <ANTweenTimingFunctionElasticInOut+0x1c9>
movss  0xeca(%rip),%xmm0
mulss  %xmm3,%xmm0
divss  %xmm0,%xmm4
ucomiss 0xebf(%rip),%xmm4
jne    116a <ANTweenTimingFunctionElasticInOut+0x3a>
jp     116a <ANTweenTimingFunctionElasticInOut+0x3a>
addss  %xmm2,%xmm1
jmp    12f9 <ANTweenTimingFunctionElasticInOut+0x1c9>
movss  %xmm2,0xc(%rsp)
movss  %xmm1,0x1c(%rsp)
movss  %xmm3,0x18(%rsp)
xorps  %xmm0,%xmm0
cvtss2sd %xmm3,%xmm0
mulsd  0xe75(%rip),%xmm0
xorps  %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm1
mov    0x2e4f(%rip),%rbx
mov    (%rbx),%eax
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm1,0x14(%rsp)
divss  %xmm0,%xmm1
movss  %xmm1,0x10(%rsp)
movss  0xe64(%rip),%xmm0
movss  %xmm4,0x8(%rsp)
call   1040 <asin@plt>
movss  0x8(%rsp),%xmm1
mulss  0x10(%rsp),%xmm0
movss  %xmm0,0x10(%rsp)
movss  0xe43(%rip),%xmm0
ucomiss %xmm1,%xmm0
addss  0xe3c(%rip),%xmm1
movss  %xmm1,0x8(%rsp)
jbe    1272 <ANTweenTimingFunctionElasticInOut+0x142>
movss  0xe34(%rip),%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1050 <pow@plt>
mulss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    (%rbx),%eax
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  0x18(%rsp),%xmm1
mulss  0x8(%rsp),%xmm1
subss  0x10(%rsp),%xmm1
mulss  %xmm1,%xmm0
divss  0x14(%rsp),%xmm0
call   1030 <sin@plt>
mulss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xdb8(%rip),%xmm0
movss  0x1c(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm1
jmp    12f9 <ANTweenTimingFunctionElasticInOut+0x1c9>
movss  0xdb2(%rip),%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1050 <pow@plt>
movaps %xmm0,%xmm2
movss  0x18(%rsp),%xmm1
mulss  0x8(%rsp),%xmm1
mov    (%rbx),%eax
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mulss  0xc(%rsp),%xmm2
movss  %xmm2,0x8(%rsp)
subss  0x10(%rsp),%xmm1
mulss  %xmm1,%xmm0
divss  0x14(%rsp),%xmm0
call   1030 <sin@plt>
mulss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0xc(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  0xd25(%rip),%xmm0
addsd  %xmm1,%xmm0
movss  0x1c(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm0,%xmm1
cvtsd2ss %xmm1,%xmm1
movaps %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@M_PI = global i32 0
define float @ANTweenTimingFunctionElasticInOut(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
%13 = load float, float* %9
%14 = fpext float %13 to double
%15 = fmul double %14, 0x3FDCCCCCCCCCCCCC
%16 = fptrunc double %15 to float
store float %16, float* %10
%17 = load float, float* %6
%18 = fcmp oeq float %17, 0.000000e+00
br i1 %18, label %19, label %21
19: ; preds = %4
%20 = load float, float* %7
store float %20, float* %5
br label %115
21: ; preds = %4
%22 = load float, float* %9
%23 = fdiv float %22, 2.000000e+00
%24 = load float, float* %6
%25 = fdiv float %24, %23
store float %25, float* %6
%26 = load float, float* %6
%27 = fcmp oeq float %26, 2.000000e+00
br i1 %27, label %28, label %32
28: ; preds = %21
%29 = load float, float* %7
%30 = load float, float* %8
%31 = fadd float %29, %30
store float %31, float* %5
br label %115
32: ; preds = %21
%33 = load float, float* %12
%34 = fcmp une float %33, 0.000000e+00
br i1 %34, label %35, label %40
35: ; preds = %32
%36 = load float, float* %12
%37 = load float, float* %8
%38 = call float @llvm.fabs.f32(float %37)
%39 = fcmp olt float %36, %38
br i1 %39, label %40, label %44
40: ; preds = %35, %32
%41 = load float, float* %8
store float %41, float* %12
%42 = load float, float* %10
%43 = fdiv float %42, 4.000000e+00
store float %43, float* %11
br label %55
44: ; preds = %35
%45 = load float, float* %10
%46 = load i32, i32* @M_PI
%47 = mul nsw i32 2, %46
%48 = sitofp i32 %47 to float
%49 = fdiv float %45, %48
%50 = load float, float* %8
%51 = load float, float* %12
%52 = fdiv float %50, %51
%53 = call float @asin(float %52)
%54 = fmul float %49, %53
store float %54, float* %11
br label %55
55: ; preds = %44, %40
%56 = load float, float* %6
%57 = fcmp olt float %56, 1.000000e+00
br i1 %57, label %58, label %85
58: ; preds = %55
%59 = load float, float* %6
%60 = fsub float %59, 1.000000e+00
store float %60, float* %6
%61 = load float, float* %12
%62 = load float, float* %6
%63 = fmul float 1.000000e+01, %62
%64 = fptosi float %63 to i32
%65 = call float @pow(i32 2, i32 %64)
%66 = fmul float %61, %65
%67 = load float, float* %6
%68 = load float, float* %9
%69 = load float, float* %11
%70 = fneg float %69
%71 = call float @llvm.fmuladd.f32(float %67, float %68, float %70)
%72 = load i32, i32* @M_PI
%73 = mul nsw i32 2, %72
%74 = sitofp i32 %73 to float
%75 = fmul float %71, %74
%76 = load float, float* %10
%77 = fdiv float %75, %76
%78 = call float @sin(float %77)
%79 = fmul float %66, %78
%80 = fpext float %79 to double
%81 = load float, float* %7
%82 = fpext float %81 to double
%83 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %80, double %82)
%84 = fptrunc double %83 to float
store float %84, float* %5
br label %115
85: ; preds = %55
%86 = load float, float* %6
%87 = fsub float %86, 1.000000e+00
store float %87, float* %6
%88 = load float, float* %12
%89 = load float, float* %6
%90 = fmul float -1.000000e+01, %89
%91 = fptosi float %90 to i32
%92 = call float @pow(i32 2, i32 %91)
%93 = fmul float %88, %92
%94 = load float, float* %6
%95 = load float, float* %9
%96 = load float, float* %11
%97 = fneg float %96
%98 = call float @llvm.fmuladd.f32(float %94, float %95, float %97)
%99 = load i32, i32* @M_PI
%100 = mul nsw i32 2, %99
%101 = sitofp i32 %100 to float
%102 = fmul float %98, %101
%103 = load float, float* %10
%104 = fdiv float %102, %103
%105 = call float @sin(float %104)
%106 = fmul float %93, %105
%107 = fpext float %106 to double
%108 = load float, float* %8
%109 = fpext float %108 to double
%110 = call double @llvm.fmuladd.f64(double %107, double 5.000000e-01, double %109)
%111 = load float, float* %7
%112 = fpext float %111 to double
%113 = fadd double %110, %112
%114 = fptrunc double %113 to float
store float %114, float* %5
br label %115
115: ; preds = %85, %58, %28, %19
%116 = load float, float* %5
ret float %116
}

LLVM IR (-O2):
@M_PI = global i32 0
define float @ANTweenTimingFunctionElasticInOut(float %0, float %1, float %2, float %3) {
%5 = fpext float %3 to double
%6 = fmul double %5, 0x3FDCCCCCCCCCCCCC
%7 = fptrunc double %6 to float
%8 = fcmp oeq float %0, 0.000000e+00
br i1 %8, label %62, label %9
9: ; preds = %4
%10 = fmul float %3, 5.000000e-01
%11 = fdiv float %0, %10
%12 = fcmp oeq float %11, 2.000000e+00
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = fadd float %1, %2
br label %62
15: ; preds = %9
%16 = load i32, i32* @M_PI
%17 = shl nsw i32 %16, 1
%18 = sitofp i32 %17 to float
%19 = fdiv float %7, %18
%20 = tail call float @asin(float 0x7FF8000000000000)
%21 = fmul float %20, %19
%22 = fcmp olt float %11, 1.000000e+00
%23 = fadd float %11, -1.000000e+00
br i1 %22, label %24, label %42
24: ; preds = %15
%25 = fmul float %23, 1.000000e+01
%26 = fptosi float %25 to i32
%27 = tail call float @pow(i32 2, i32 %26)
%28 = fmul float %27, %2
%29 = fneg float %21
%30 = tail call float @llvm.fmuladd.f32(float %23, float %3, float %29)
%31 = load i32, i32* @M_PI
%32 = shl nsw i32 %31, 1
%33 = sitofp i32 %32 to float
%34 = fmul float %30, %33
%35 = fdiv float %34, %7
%36 = tail call float @sin(float %35)
%37 = fmul float %28, %36
%38 = fpext float %37 to double
%39 = fpext float %1 to double
%40 = tail call double @llvm.fmuladd.f64(double %38, double -5.000000e-01, double %39)
%41 = fptrunc double %40 to float
br label %62
42: ; preds = %15
%43 = fmul float %23, -1.000000e+01
%44 = fptosi float %43 to i32
%45 = tail call float @pow(i32 2, i32 %44)
%46 = fmul float %45, %2
%47 = fneg float %21
%48 = tail call float @llvm.fmuladd.f32(float %23, float %3, float %47)
%49 = load i32, i32* @M_PI
%50 = shl nsw i32 %49, 1
%51 = sitofp i32 %50 to float
%52 = fmul float %48, %51
%53 = fdiv float %52, %7
%54 = tail call float @sin(float %53)
%55 = fmul float %46, %54
%56 = fpext float %55 to double
%57 = fpext float %2 to double
%58 = tail call double @llvm.fmuladd.f64(double %56, double 5.000000e-01, double %57)
%59 = fpext float %1 to double
%60 = fadd double %58, %59
%61 = fptrunc double %60 to float
br label %62
62: ; preds = %4, %42, %24, %13
%63 = phi float [ %14, %13 ], [ %41, %24 ], [ %61, %42 ], [ %1, %4 ]
ret float %63
}