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


x86 assembly (clang, -O0):
<LSKeyframeAnimationFunctionEaseInOutElastic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%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 <LSKeyframeAnimationFunctionEaseInOutElastic+0x62>
jp     1192 <LSKeyframeAnimationFunctionEaseInOutElastic+0x62>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1420 <LSKeyframeAnimationFunctionEaseInOutElastic+0x2f0>
movsd  -0x28(%rbp),%xmm1
movsd  0xe69(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe4f(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11dd <LSKeyframeAnimationFunctionEaseInOutElastic+0xad>
jp     11dd <LSKeyframeAnimationFunctionEaseInOutElastic+0xad>
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1420 <LSKeyframeAnimationFunctionEaseInOutElastic+0x2f0>
movsd  -0x38(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1207 <LSKeyframeAnimationFunctionEaseInOutElastic+0xd7>
jp     1207 <LSKeyframeAnimationFunctionEaseInOutElastic+0xd7>
movsd  0xe13(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x40(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
movaps 0xe38(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    124b <LSKeyframeAnimationFunctionEaseInOutElastic+0x11b>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  0xddb(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    1289 <LSKeyframeAnimationFunctionEaseInOutElastic+0x159>
movsd  -0x38(%rbp),%xmm0
mov    0x2d91(%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  0xd8f(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    135e <LSKeyframeAnimationFunctionEaseInOutElastic+0x22e>
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xd6d(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  %xmm1,-0x10(%rbp)
movsd  0xd7c(%rip),%xmm0
mulsd  %xmm1,%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    0x2ccc(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x38(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xcec(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1420 <LSKeyframeAnimationFunctionEaseInOutElastic+0x2f0>
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xcab(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  %xmm1,-0x10(%rbp)
movsd  0xcaa(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
mov    $0x2,%edi
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%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    0x2c0a(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x38(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xc1a(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LSKeyframeAnimationFunctionEaseInOutElastic>:
sub    $0x48,%rsp
movapd %xmm0,%xmm5
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm5
jne    1148 <LSKeyframeAnimationFunctionEaseInOutElastic+0x18>
jnp    12f2 <LSKeyframeAnimationFunctionEaseInOutElastic+0x1c2>
movsd  0xeb0(%rip),%xmm0
mulsd  %xmm3,%xmm0
divsd  %xmm0,%xmm5
ucomisd 0xea8(%rip),%xmm5
jne    116d <LSKeyframeAnimationFunctionEaseInOutElastic+0x3d>
jp     116d <LSKeyframeAnimationFunctionEaseInOutElastic+0x3d>
addsd  %xmm2,%xmm1
jmp    12f2 <LSKeyframeAnimationFunctionEaseInOutElastic+0x1c2>
movsd  0xe9b(%rip),%xmm4
mulsd  %xmm3,%xmm4
movapd 0xecf(%rip),%xmm0
andpd  %xmm2,%xmm0
ucomisd %xmm2,%xmm0
movsd  %xmm1,0x38(%rsp)
movapd %xmm2,0x10(%rsp)
movsd  %xmm3,0x30(%rsp)
movsd  %xmm4,0x28(%rsp)
jbe    11b1 <LSKeyframeAnimationFunctionEaseInOutElastic+0x81>
movsd  0xe6d(%rip),%xmm0
mulsd  %xmm4,%xmm0
jmp    11ea <LSKeyframeAnimationFunctionEaseInOutElastic+0xba>
mov    0x2e30(%rip),%rax
mov    (%rax),%eax
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  %xmm0,%xmm4
movsd  %xmm4,(%rsp)
movapd %xmm2,%xmm0
divsd  %xmm2,%xmm0
movsd  %xmm5,0x8(%rsp)
call   1040 <asin@plt>
movsd  0x8(%rsp),%xmm5
mulsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0xe29(%rip),%xmm0
ucomisd %xmm5,%xmm0
addsd  0xe25(%rip),%xmm5
movsd  %xmm5,0x8(%rsp)
jbe    127c <LSKeyframeAnimationFunctionEaseInOutElastic+0x14c>
movsd  0xe25(%rip),%xmm0
mulsd  %xmm5,%xmm0
cvttsd2si %xmm0,%esi
mov    $0x2,%edi
call   1050 <pow@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x30(%rsp),%xmm1
mulsd  0x8(%rsp),%xmm1
subsd  (%rsp),%xmm1
mov    0x2d9f(%rip),%rax
mov    (%rax),%eax
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  %xmm1,%xmm0
divsd  0x28(%rsp),%xmm0
call   1030 <sin@plt>
mulsd  0x10(%rsp),%xmm0
mulsd  0xdcf(%rip),%xmm0
addsd  0x38(%rsp),%xmm0
add    $0x48,%rsp
ret
movsd  0xdac(%rip),%xmm0
mulsd  %xmm5,%xmm0
cvttsd2si %xmm0,%esi
mov    $0x2,%edi
call   1050 <pow@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x40(%rsp)
movsd  0x30(%rsp),%xmm1
mulsd  0x8(%rsp),%xmm1
subsd  (%rsp),%xmm1
mov    0x2d2e(%rip),%rax
mov    (%rax),%eax
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  %xmm1,%xmm0
divsd  0x28(%rsp),%xmm0
call   1030 <sin@plt>
mulsd  0x40(%rsp),%xmm0
mulsd  0xd1e(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x48,%rsp
ret

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

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