#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 sinf(float);
float EaseElasticOut(float t, float b, float c, float d) {
  if (t == 0.0f)
    return b;
  if ((t /= d) == 1.0f)
    return (b + c);
  float p = d * 0.3f;
  float a = c;
  float s = p / 4.0f;
  return (a * powf(2.0f, -10.0f * t) *
              sinf((t * d - s) * (2.0f * 3.14159265358979323846f) / p) +
          c + b);
}


x86 assembly (clang, -O0):
<EaseElasticOut>:
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  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1162 <EaseElasticOut+0x42>
jp     1162 <EaseElasticOut+0x42>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1260 <EaseElasticOut+0x140>
movss  -0x14(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xe83(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    11a0 <EaseElasticOut+0x80>
jp     11a0 <EaseElasticOut+0x80>
movss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1260 <EaseElasticOut+0x140>
movss  0xe6c(%rip),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x18(%rbp),%xmm0
movss  0xe47(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  0xe28(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
movss  0xe17(%rip),%xmm0
call   1040 <powf@plt>
movaps %xmm0,%xmm1
movss  -0x28(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x14(%rbp),%xmm2
movss  -0x20(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xdd1(%rip),%xmm1
mulss  %xmm1,%xmm0
divss  -0x18(%rbp),%xmm0
call   1030 <sinf@plt>
movaps %xmm0,%xmm2
movss  -0x24(%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):
<EaseElasticOut>:
sub    $0x18,%rsp
movaps %xmm0,%xmm4
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm4
jne    1135 <EaseElasticOut+0x15>
jnp    11dd <EaseElasticOut+0xbd>
divss  %xmm3,%xmm4
ucomiss 0xec0(%rip),%xmm4
jne    114d <EaseElasticOut+0x2d>
jp     114d <EaseElasticOut+0x2d>
addss  %xmm2,%xmm1
jmp    11dd <EaseElasticOut+0xbd>
movss  0xeaf(%rip),%xmm0
mulss  %xmm3,%xmm0
movss  %xmm0,0xc(%rsp)
movss  0xea1(%rip),%xmm0
mulss  %xmm4,%xmm0
movss  %xmm1,0x14(%rsp)
movss  %xmm2,(%rsp)
movss  %xmm4,0x4(%rsp)
movss  %xmm3,0x8(%rsp)
call   1040 <exp2f@plt>
mulss  (%rsp),%xmm0
movss  %xmm0,0x10(%rsp)
movss  0xe72(%rip),%xmm0
movss  0xc(%rsp),%xmm1
mulss  %xmm1,%xmm0
movss  0x4(%rsp),%xmm2
mulss  0x8(%rsp),%xmm2
addss  %xmm0,%xmm2
mulss  0xe54(%rip),%xmm2
divss  %xmm1,%xmm2
movaps %xmm2,%xmm0
call   1030 <sinf@plt>
movss  0x14(%rsp),%xmm1
mulss  0x10(%rsp),%xmm0
addss  (%rsp),%xmm0
addss  %xmm0,%xmm1
movaps %xmm1,%xmm0
add    $0x18,%rsp
ret

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

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