#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 abs(float);
float asin(float);
float pow(int, int);
float sin(float);
float Elastic__easeInOut(float t, float b, float c, float d, float a, float p) {
  if (t == 0)
    return b;
  if ((t /= d / 2) == 2)
    return b + c;
  if (-1 == p)
    p = d * (.3f * 1.5f);
  else
    p = d * p;
  float s = p / 4;
  if (-1 == a || a < abs(c)) {
    a = c;
  } else {
    s = p / (2 * 3.1415926535897932384626433832795) * asin(c / a);
  }
  if (t < 1) {
    float postFix = a * pow(2, 10 * (t -= 1));
    return -.5f * (postFix * sin((t * d - s) *
                                 (2 * 3.1415926535897932384626433832795) / p)) +
           b;
  }
  float postFix = a * pow(2, -10 * (t -= 1));
  return postFix *
             sin((t * d - s) * (2 * 3.1415926535897932384626433832795) / p) *
             .5f +
         c + b;
}


x86 assembly (clang, -O0):
<Elastic__easeInOut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  %xmm3,-0x14(%rbp)
movss  %xmm4,-0x18(%rbp)
movss  %xmm5,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    118c <Elastic__easeInOut+0x4c>
jp     118c <Elastic__easeInOut+0x4c>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1460 <Elastic__easeInOut+0x320>
movss  -0x14(%rbp),%xmm1
movss  0xe67(%rip),%xmm0
divss  %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xe4d(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    11d6 <Elastic__easeInOut+0x96>
jp     11d6 <Elastic__easeInOut+0x96>
movss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1460 <Elastic__easeInOut+0x320>
movss  0xe26(%rip),%xmm0
ucomiss -0x1c(%rbp),%xmm0
jne    1205 <Elastic__easeInOut+0xc5>
jp     1205 <Elastic__easeInOut+0xc5>
movss  0xe12(%rip),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    1214 <Elastic__easeInOut+0xd4>
movss  -0x14(%rbp),%xmm0
mulss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  0xdeb(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  0xdd2(%rip),%xmm0
ucomiss -0x18(%rbp),%xmm0
jne    1247 <Elastic__easeInOut+0x107>
jp     1247 <Elastic__easeInOut+0x107>
jmp    1269 <Elastic__easeInOut+0x129>
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x10(%rbp),%xmm0
call   1030 <abs@plt>
movss  -0x2c(%rbp),%xmm1
ucomiss %xmm1,%xmm0
jbe    1278 <Elastic__easeInOut+0x138>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    12ba <Elastic__easeInOut+0x17a>
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd9f(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movss  -0x10(%rbp),%xmm0
divss  -0x18(%rbp),%xmm0
call   1050 <asin@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  0xd4e(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1396 <Elastic__easeInOut+0x256>
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x40(%rbp)
movss  -0x8(%rbp),%xmm1
movss  0xd2d(%rip),%xmm0
subss  %xmm0,%xmm1
movss  %xmm1,-0x8(%rbp)
movss  0xd2c(%rip),%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1060 <pow@plt>
movaps %xmm0,%xmm1
movss  -0x40(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x3c(%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
cvtss2sd %xmm0,%xmm0
movsd  0xcd7(%rip),%xmm1
mulsd  %xmm1,%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movss  -0x3c(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
movss  0xc98(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1460 <Elastic__easeInOut+0x320>
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x48(%rbp)
movss  -0x8(%rbp),%xmm1
movss  0xc63(%rip),%xmm0
subss  %xmm0,%xmm1
movss  %xmm1,-0x8(%rbp)
movss  0xc5a(%rip),%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1060 <pow@plt>
movaps %xmm0,%xmm1
movss  -0x48(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x44(%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
cvtss2sd %xmm0,%xmm0
movsd  0xc0d(%rip),%xmm1
mulsd  %xmm1,%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movss  -0x44(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  -0x10(%rbp),%xmm1
movss  0xbc6(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Elastic__easeInOut>:
sub    $0x38,%rsp
movaps %xmm0,%xmm7
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm7
jne    1155 <Elastic__easeInOut+0x15>
jnp    1360 <Elastic__easeInOut+0x220>
movss  0xea3(%rip),%xmm0
mulss  %xmm3,%xmm0
divss  %xmm0,%xmm7
ucomiss 0xe98(%rip),%xmm7
jne    1179 <Elastic__easeInOut+0x39>
jp     1179 <Elastic__easeInOut+0x39>
addss  %xmm2,%xmm1
jmp    1360 <Elastic__easeInOut+0x220>
movss  %xmm1,0x1c(%rsp)
movss  0xe81(%rip),%xmm0
movaps %xmm5,%xmm6
cmpeqss %xmm0,%xmm6
movss  0xe75(%rip),%xmm1
andps  %xmm6,%xmm1
andnps %xmm5,%xmm6
orps   %xmm1,%xmm6
movss  %xmm3,0x18(%rsp)
mulss  %xmm3,%xmm6
movss  0xe5e(%rip),%xmm1
movaps %xmm6,0x20(%rsp)
mulss  %xmm6,%xmm1
movss  %xmm1,0x10(%rsp)
ucomiss %xmm0,%xmm4
jne    11cd <Elastic__easeInOut+0x8d>
jp     11cd <Elastic__easeInOut+0x8d>
movaps %xmm2,%xmm0
jmp    124a <Elastic__easeInOut+0x10a>
movaps %xmm2,%xmm0
movss  %xmm2,0xc(%rsp)
movss  %xmm7,0x8(%rsp)
movss  %xmm4,0x4(%rsp)
call   1030 <abs@plt>
movss  0x4(%rsp),%xmm1
movss  0x8(%rsp),%xmm7
movss  0xc(%rsp),%xmm2
ucomiss %xmm1,%xmm0
movaps %xmm2,%xmm0
ja     124a <Elastic__easeInOut+0x10a>
movaps 0x20(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  0xe16(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movaps %xmm2,%xmm0
divss  %xmm1,%xmm0
call   1050 <asin@plt>
movss  0x8(%rsp),%xmm7
movss  0xc(%rsp),%xmm2
cvtss2sd %xmm0,%xmm0
mulsd  0x10(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x10(%rsp)
movss  0x4(%rsp),%xmm0
movss  %xmm0,0x4(%rsp)
movss  0xdbc(%rip),%xmm0
ucomiss %xmm7,%xmm0
addss  0xda5(%rip),%xmm7
movss  %xmm7,0x8(%rsp)
jbe    12de <Elastic__easeInOut+0x19e>
movss  0xda9(%rip),%xmm0
mulss  %xmm7,%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1060 <pow@plt>
mulss  0x4(%rsp),%xmm0
movss  %xmm0,0x4(%rsp)
movss  0x18(%rsp),%xmm0
mulss  0x8(%rsp),%xmm0
subss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xd79(%rip),%xmm0
movaps 0x20(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1040 <sin@plt>
mulss  0x4(%rsp),%xmm0
mulss  0xd4d(%rip),%xmm0
addss  0x1c(%rsp),%xmm0
add    $0x38,%rsp
ret
movss  0xd32(%rip),%xmm0
mulss  %xmm7,%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
movss  %xmm2,0xc(%rsp)
call   1060 <pow@plt>
movss  0x4(%rsp),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0x4(%rsp)
movss  0x18(%rsp),%xmm0
mulss  0x8(%rsp),%xmm0
subss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xcfc(%rip),%xmm0
movaps 0x20(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1040 <sin@plt>
mulss  0x4(%rsp),%xmm0
mulss  0xcb0(%rip),%xmm0
addss  0xc(%rsp),%xmm0
movss  0x1c(%rsp),%xmm1
addss  %xmm0,%xmm1
movaps %xmm1,%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define float @Elastic__easeInOut(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
store float %0, float* %8
store float %1, float* %9
store float %2, float* %10
store float %3, float* %11
store float %4, float* %12
store float %5, float* %13
%17 = load float, float* %8
%18 = fcmp oeq float %17, 0.000000e+00
br i1 %18, label %19, label %21
19: ; preds = %6
%20 = load float, float* %9
store float %20, float* %7
br label %117
21: ; preds = %6
%22 = load float, float* %11
%23 = fdiv float %22, 2.000000e+00
%24 = load float, float* %8
%25 = fdiv float %24, %23
store float %25, float* %8
%26 = fcmp oeq float %25, 2.000000e+00
br i1 %26, label %27, label %31
27: ; preds = %21
%28 = load float, float* %9
%29 = load float, float* %10
%30 = fadd float %28, %29
store float %30, float* %7
br label %117
31: ; preds = %21
%32 = load float, float* %13
%33 = fcmp oeq float -1.000000e+00, %32
br i1 %33, label %34, label %37
34: ; preds = %31
%35 = load float, float* %11
%36 = fmul float %35, 0x3FDCCCCCE0000000
store float %36, float* %13
br label %41
37: ; preds = %31
%38 = load float, float* %11
%39 = load float, float* %13
%40 = fmul float %38, %39
store float %40, float* %13
br label %41
41: ; preds = %37, %34
%42 = load float, float* %13
%43 = fdiv float %42, 4.000000e+00
store float %43, float* %14
%44 = load float, float* %12
%45 = fcmp oeq float -1.000000e+00, %44
br i1 %45, label %51, label %46
46: ; preds = %41
%47 = load float, float* %12
%48 = load float, float* %10
%49 = call float @abs(float %48)
%50 = fcmp olt float %47, %49
br i1 %50, label %51, label %53
51: ; preds = %46, %41
%52 = load float, float* %10
store float %52, float* %12
br label %64
53: ; preds = %46
%54 = load float, float* %13
%55 = fpext float %54 to double
%56 = fdiv double %55, 0x401921FB54442D18
%57 = load float, float* %10
%58 = load float, float* %12
%59 = fdiv float %57, %58
%60 = call float @asin(float %59)
%61 = fpext float %60 to double
%62 = fmul double %56, %61
%63 = fptrunc double %62 to float
store float %63, float* %14
br label %64
64: ; preds = %53, %51
%65 = load float, float* %8
%66 = fcmp olt float %65, 1.000000e+00
br i1 %66, label %67, label %91
67: ; preds = %64
%68 = load float, float* %12
%69 = load float, float* %8
%70 = fsub float %69, 1.000000e+00
store float %70, float* %8
%71 = fmul float 1.000000e+01, %70
%72 = fptosi float %71 to i32
%73 = call float @pow(i32 2, i32 %72)
%74 = fmul float %68, %73
store float %74, float* %15
%75 = load float, float* %15
%76 = load float, float* %8
%77 = load float, float* %11
%78 = load float, float* %14
%79 = fneg float %78
%80 = call float @llvm.fmuladd.f32(float %76, float %77, float %79)
%81 = fpext float %80 to double
%82 = fmul double %81, 0x401921FB54442D18
%83 = load float, float* %13
%84 = fpext float %83 to double
%85 = fdiv double %82, %84
%86 = fptrunc double %85 to float
%87 = call float @sin(float %86)
%88 = fmul float %75, %87
%89 = load float, float* %9
%90 = call float @llvm.fmuladd.f32(float -5.000000e-01, float %88, float %89)
store float %90, float* %7
br label %117
91: ; preds = %64
%92 = load float, float* %12
%93 = load float, float* %8
%94 = fsub float %93, 1.000000e+00
store float %94, float* %8
%95 = fmul float -1.000000e+01, %94
%96 = fptosi float %95 to i32
%97 = call float @pow(i32 2, i32 %96)
%98 = fmul float %92, %97
store float %98, float* %16
%99 = load float, float* %16
%100 = load float, float* %8
%101 = load float, float* %11
%102 = load float, float* %14
%103 = fneg float %102
%104 = call float @llvm.fmuladd.f32(float %100, float %101, float %103)
%105 = fpext float %104 to double
%106 = fmul double %105, 0x401921FB54442D18
%107 = load float, float* %13
%108 = fpext float %107 to double
%109 = fdiv double %106, %108
%110 = fptrunc double %109 to float
%111 = call float @sin(float %110)
%112 = fmul float %99, %111
%113 = load float, float* %10
%114 = call float @llvm.fmuladd.f32(float %112, float 5.000000e-01, float %113)
%115 = load float, float* %9
%116 = fadd float %114, %115
store float %116, float* %7
br label %117
117: ; preds = %91, %67, %27, %19
%118 = load float, float* %7
ret float %118
}

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