#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;
double asin(double);
double fabs(double);
double pow(int, int);
double sin(double);
double JHKeyframeAnimationFunctionEaseOutElastic(double t, double b, double c,
                                                 double d) {
  double s = 1.70158, p = 0, a = c;
  if (t == 0)
    return b;
  if ((t /= d) == 1)
    return b + c;
  if (!p)
    p = d * .3;
  if (a < fabs(c)) {
    a = c;
    s = p / 4;
  } else
    s = p / (2 * M_PI) * asin(c / a);
  return a * pow(2, -10 * t) * sin((t * d - s) * (2 * M_PI) / p) + c + b;
}


x86 assembly (clang, -O0):
<JHKeyframeAnimationFunctionEaseOutElastic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  0xeac(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1192 <JHKeyframeAnimationFunctionEaseOutElastic+0x62>
jp     1192 <JHKeyframeAnimationFunctionEaseOutElastic+0x62>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    131e <JHKeyframeAnimationFunctionEaseOutElastic+0x1ee>
movsd  -0x28(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe5b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11d1 <JHKeyframeAnimationFunctionEaseOutElastic+0xa1>
jp     11d1 <JHKeyframeAnimationFunctionEaseOutElastic+0xa1>
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    131e <JHKeyframeAnimationFunctionEaseOutElastic+0x1ee>
movsd  -0x38(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11fb <JHKeyframeAnimationFunctionEaseOutElastic+0xcb>
jp     11fb <JHKeyframeAnimationFunctionEaseOutElastic+0xcb>
movsd  0xe1f(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x40(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
movaps 0xe24(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    123f <JHKeyframeAnimationFunctionEaseOutElastic+0x10f>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  0xde7(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    127d <JHKeyframeAnimationFunctionEaseOutElastic+0x14d>
movsd  -0x38(%rbp),%xmm0
mov    0x2d9d(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x20(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
call   1040 <asin@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xd91(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%esi
mov    $0x2,%edi
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x2d00(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x38(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x50(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<JHKeyframeAnimationFunctionEaseOutElastic>:
sub    $0x48,%rsp
movapd %xmm0,%xmm4
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm4
jne    1148 <JHKeyframeAnimationFunctionEaseOutElastic+0x18>
jnp    1251 <JHKeyframeAnimationFunctionEaseOutElastic+0x121>
divsd  %xmm3,%xmm4
ucomisd 0xeac(%rip),%xmm4
jne    1161 <JHKeyframeAnimationFunctionEaseOutElastic+0x31>
jp     1161 <JHKeyframeAnimationFunctionEaseOutElastic+0x31>
addsd  %xmm2,%xmm1
jmp    1251 <JHKeyframeAnimationFunctionEaseOutElastic+0x121>
movsd  %xmm1,0x28(%rsp)
movsd  0xe99(%rip),%xmm1
movsd  %xmm3,0x20(%rsp)
mulsd  %xmm3,%xmm1
movapd 0xe9f(%rip),%xmm0
andpd  %xmm2,%xmm0
ucomisd %xmm2,%xmm0
movsd  %xmm4,0x8(%rsp)
movsd  %xmm1,0x18(%rsp)
movapd %xmm2,0x30(%rsp)
jbe    11ab <JHKeyframeAnimationFunctionEaseOutElastic+0x7b>
movsd  0xe6b(%rip),%xmm0
mulsd  %xmm1,%xmm0
jmp    11de <JHKeyframeAnimationFunctionEaseOutElastic+0xae>
mov    0x2e36(%rip),%rax
mov    (%rax),%eax
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movapd %xmm2,%xmm0
divsd  %xmm2,%xmm0
call   1040 <asin@plt>
movsd  0x8(%rsp),%xmm4
mulsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0xe2d(%rip),%xmm0
mulsd  %xmm4,%xmm0
cvttsd2si %xmm0,%esi
mov    $0x2,%edi
call   1050 <pow@plt>
mulsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm1
mulsd  0x8(%rsp),%xmm1
subsd  (%rsp),%xmm1
mov    0x2dc7(%rip),%rax
mov    (%rax),%eax
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  %xmm1,%xmm0
divsd  0x18(%rsp),%xmm0
call   1030 <sin@plt>
mulsd  0x10(%rsp),%xmm0
addsd  0x30(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x48,%rsp
ret

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

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