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


x86 assembly (clang, -O0):
<ANTweenTimingFunctionElasticOut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%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 <ANTweenTimingFunctionElasticOut+0x60>
jp     1190 <ANTweenTimingFunctionElasticOut+0x60>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1307 <ANTweenTimingFunctionElasticOut+0x1d7>
movss  -0x14(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xe58(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    11d3 <ANTweenTimingFunctionElasticOut+0xa3>
jp     11d3 <ANTweenTimingFunctionElasticOut+0xa3>
movss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1307 <ANTweenTimingFunctionElasticOut+0x1d7>
movss  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    11ef <ANTweenTimingFunctionElasticOut+0xbf>
jp     11ef <ANTweenTimingFunctionElasticOut+0xbf>
jmp    120d <ANTweenTimingFunctionElasticOut+0xdd>
movss  -0x20(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
movaps 0xe20(%rip),%xmm2
pand   %xmm2,%xmm0
ucomiss %xmm1,%xmm0
jbe    1232 <ANTweenTimingFunctionElasticOut+0x102>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x18(%rbp),%xmm0
movss  0xde8(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    1270 <ANTweenTimingFunctionElasticOut+0x140>
movss  -0x18(%rbp),%xmm0
mov    0x2daa(%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   1050 <asinf@plt>
movaps %xmm0,%xmm1
movss  -0x24(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  0xd8e(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1040 <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    0x2d17(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
divss  -0x18(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm2
movss  -0x28(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ANTweenTimingFunctionElasticOut>:
push   %rbp
push   %rbx
sub    $0x28,%rsp
movaps %xmm0,%xmm4
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm4
jne    1147 <ANTweenTimingFunctionElasticOut+0x17>
jnp    1236 <ANTweenTimingFunctionElasticOut+0x106>
divss  %xmm3,%xmm4
ucomiss 0xeb6(%rip),%xmm4
jne    115f <ANTweenTimingFunctionElasticOut+0x2f>
jp     115f <ANTweenTimingFunctionElasticOut+0x2f>
addss  %xmm2,%xmm1
jmp    1236 <ANTweenTimingFunctionElasticOut+0x106>
xorps  %xmm0,%xmm0
cvtss2sd %xmm3,%xmm0
mulsd  0xe92(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x1c(%rsp)
mov    0x2e69(%rip),%rbx
mov    (%rbx),%ebp
movss  0xe83(%rip),%xmm0
movss  %xmm1,0x24(%rsp)
movss  %xmm2,0xc(%rsp)
movss  %xmm3,0x20(%rsp)
movss  %xmm4,0x8(%rsp)
call   1050 <asinf@plt>
movss  %xmm0,0x14(%rsp)
add    %ebp,%ebp
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
movss  %xmm0,0x10(%rsp)
movss  0xe4d(%rip),%xmm0
mulss  0x8(%rsp),%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1040 <pow@plt>
mulss  0xc(%rsp),%xmm0
movss  %xmm0,0x18(%rsp)
movss  0x1c(%rsp),%xmm2
movaps %xmm2,%xmm1
divss  0x10(%rsp),%xmm1
mulss  0x14(%rsp),%xmm1
mov    (%rbx),%eax
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  0x8(%rsp),%xmm3
mulss  0x20(%rsp),%xmm3
subss  %xmm1,%xmm3
mulss  %xmm3,%xmm0
divss  %xmm2,%xmm0
call   1030 <sin@plt>
movss  0x24(%rsp),%xmm1
mulss  0x18(%rsp),%xmm0
addss  0xc(%rsp),%xmm0
addss  %xmm0,%xmm1
movaps %xmm1,%xmm0
add    $0x28,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@M_PI = global i32 0
define float @ANTweenTimingFunctionElasticOut(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, 3.000000e-01
%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 %77
21: ; preds = %4
%22 = load float, float* %9
%23 = load float, float* %6
%24 = fdiv float %23, %22
store float %24, float* %6
%25 = load float, float* %6
%26 = fcmp oeq float %25, 1.000000e+00
br i1 %26, label %27, label %31
27: ; preds = %21
%28 = load float, float* %7
%29 = load float, float* %8
%30 = fadd float %28, %29
store float %30, float* %5
br label %77
31: ; preds = %21
%32 = load float, float* %12
%33 = fcmp une float %32, 0.000000e+00
br i1 %33, label %34, label %39
34: ; preds = %31
%35 = load float, float* %12
%36 = load float, float* %8
%37 = call float @llvm.fabs.f32(float %36)
%38 = fcmp olt float %35, %37
br i1 %38, label %39, label %43
39: ; preds = %34, %31
%40 = load float, float* %8
store float %40, float* %12
%41 = load float, float* %10
%42 = fdiv float %41, 4.000000e+00
store float %42, float* %11
br label %54
43: ; preds = %34
%44 = load float, float* %10
%45 = load i32, i32* @M_PI
%46 = mul nsw i32 2, %45
%47 = sitofp i32 %46 to float
%48 = fdiv float %44, %47
%49 = load float, float* %8
%50 = load float, float* %12
%51 = fdiv float %49, %50
%52 = call float @asinf(float %51)
%53 = fmul float %48, %52
store float %53, float* %11
br label %54
54: ; preds = %43, %39
%55 = load float, float* %12
%56 = load float, float* %6
%57 = fmul float -1.000000e+01, %56
%58 = fptosi float %57 to i32
%59 = call float @pow(i32 2, i32 %58)
%60 = fmul float %55, %59
%61 = load float, float* %6
%62 = load float, float* %9
%63 = load float, float* %11
%64 = fneg float %63
%65 = call float @llvm.fmuladd.f32(float %61, float %62, float %64)
%66 = load i32, i32* @M_PI
%67 = mul nsw i32 2, %66
%68 = sitofp i32 %67 to float
%69 = fmul float %65, %68
%70 = load float, float* %10
%71 = fdiv float %69, %70
%72 = call float @sin(float %71)
%73 = load float, float* %8
%74 = call float @llvm.fmuladd.f32(float %60, float %72, float %73)
%75 = load float, float* %7
%76 = fadd float %74, %75
store float %76, float* %5
br label %77
77: ; preds = %54, %27, %19
%78 = load float, float* %5
ret float %78
}

LLVM IR (-O2):
@M_PI = global i32 0
define float @ANTweenTimingFunctionElasticOut(float %0, float %1, float %2, float %3) {
%5 = fpext float %3 to double
%6 = fmul double %5, 3.000000e-01
%7 = fptrunc double %6 to float
%8 = fcmp oeq float %0, 0.000000e+00
br i1 %8, label %35, label %9
9: ; preds = %4
%10 = fdiv float %0, %3
%11 = fcmp oeq float %10, 1.000000e+00
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = fadd float %1, %2
br label %35
14: ; preds = %9
%15 = load i32, i32* @M_PI
%16 = tail call float @asinf(float 0x7FF8000000000000)
%17 = shl nsw i32 %15, 1
%18 = sitofp i32 %17 to float
%19 = fmul float %10, -1.000000e+01
%20 = fptosi float %19 to i32
%21 = tail call float @pow(i32 2, i32 %20)
%22 = fmul float %21, %2
%23 = fneg float %7
%24 = fdiv float %23, %18
%25 = fmul float %16, %24
%26 = tail call float @llvm.fmuladd.f32(float %10, float %3, float %25)
%27 = load i32, i32* @M_PI
%28 = shl nsw i32 %27, 1
%29 = sitofp i32 %28 to float
%30 = fmul float %26, %29
%31 = fdiv float %30, %7
%32 = tail call float @sin(float %31)
%33 = tail call float @llvm.fmuladd.f32(float %22, float %32, float %2)
%34 = fadd float %33, %1
br label %35
35: ; preds = %4, %14, %12
%36 = phi float [ %13, %12 ], [ %34, %14 ], [ %1, %4 ]
ret float %36
}