#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 ANTweenTimingFunctionElasticIn(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) * asin(change / a);
  }
  time -= 1;
  return -(a * pow(2, 10 * time) *
           sin((time * duration - s) * (2 * M_PI) / p)) +
         begin;
}


x86 assembly (clang, -O0):
<ANTweenTimingFunctionElasticIn>:
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 <ANTweenTimingFunctionElasticIn+0x60>
jp     1190 <ANTweenTimingFunctionElasticIn+0x60>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1321 <ANTweenTimingFunctionElasticIn+0x1f1>
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 <ANTweenTimingFunctionElasticIn+0xa3>
jp     11d3 <ANTweenTimingFunctionElasticIn+0xa3>
movss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1321 <ANTweenTimingFunctionElasticIn+0x1f1>
movss  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    11ef <ANTweenTimingFunctionElasticIn+0xbf>
jp     11ef <ANTweenTimingFunctionElasticIn+0xbf>
jmp    120d <ANTweenTimingFunctionElasticIn+0xdd>
movss  -0x20(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
movaps 0xe20(%rip),%xmm2
pand   %xmm2,%xmm0
ucomiss %xmm1,%xmm0
jbe    1232 <ANTweenTimingFunctionElasticIn+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 <ANTweenTimingFunctionElasticIn+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   1040 <asin@plt>
movaps %xmm0,%xmm1
movss  -0x24(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xd8b(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  0xd78(%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    0x2d01(%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
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@M_PI = global i32 0
define float @ANTweenTimingFunctionElasticIn(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 %79
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 %79
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 @asin(float %51)
%53 = fmul float %48, %52
store float %53, float* %11
br label %54
54: ; preds = %43, %39
%55 = load float, float* %6
%56 = fsub float %55, 1.000000e+00
store float %56, float* %6
%57 = load float, float* %12
%58 = load float, float* %6
%59 = fmul float 1.000000e+01, %58
%60 = fptosi float %59 to i32
%61 = call float @pow(i32 2, i32 %60)
%62 = fmul float %57, %61
%63 = load float, float* %6
%64 = load float, float* %9
%65 = load float, float* %11
%66 = fneg float %65
%67 = call float @llvm.fmuladd.f32(float %63, float %64, float %66)
%68 = load i32, i32* @M_PI
%69 = mul nsw i32 2, %68
%70 = sitofp i32 %69 to float
%71 = fmul float %67, %70
%72 = load float, float* %10
%73 = fdiv float %71, %72
%74 = call float @sin(float %73)
%75 = fmul float %62, %74
%76 = fneg float %75
%77 = load float, float* %7
%78 = fadd float %76, %77
store float %78, float* %5
br label %79
79: ; preds = %54, %27, %19
%80 = load float, float* %5
ret float %80
}

LLVM IR (-O2):
@M_PI = global i32 0
define float @ANTweenTimingFunctionElasticIn(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 %37, 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 %37
14: ; preds = %9
%15 = load i32, i32* @M_PI
%16 = tail call float @asin(float 0x7FF8000000000000)
%17 = shl nsw i32 %15, 1
%18 = sitofp i32 %17 to float
%19 = fadd float %10, -1.000000e+00
%20 = fmul float %19, 1.000000e+01
%21 = fptosi float %20 to i32
%22 = tail call float @pow(i32 2, i32 %21)
%23 = fneg float %7
%24 = fdiv float %23, %18
%25 = fmul float %16, %24
%26 = tail call float @llvm.fmuladd.f32(float %19, 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 = fneg float %22
%34 = fmul float %33, %2
%35 = fmul float %34, %32
%36 = fadd float %35, %1
br label %37
37: ; preds = %4, %14, %12
%38 = phi float [ %13, %12 ], [ %36, %14 ], [ %1, %4 ]
ret float %38
}