#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 pow(int, int);
double LSKeyframeAnimationFunctionEaseInOutExpo(double t, double b, double c,
                                                double d) {
  if (t == 0)
    return b;
  if (t == d)
    return b + c;
  if ((t /= d / 2) < 1)
    return c / 2 * pow(2, 10 * (t - 1)) + b;
  return c / 2 * (-pow(2, -10 * --t) + 2) + b;
}


x86 assembly (clang, -O0):
<LSKeyframeAnimationFunctionEaseInOutExpo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1153 <LSKeyframeAnimationFunctionEaseInOutExpo+0x43>
jp     1153 <LSKeyframeAnimationFunctionEaseInOutExpo+0x43>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1275 <LSKeyframeAnimationFunctionEaseInOutExpo+0x165>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jne    117d <LSKeyframeAnimationFunctionEaseInOutExpo+0x6d>
jp     117d <LSKeyframeAnimationFunctionEaseInOutExpo+0x6d>
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1275 <LSKeyframeAnimationFunctionEaseInOutExpo+0x165>
movsd  -0x28(%rbp),%xmm0
movsd  0xe7e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,-0x10(%rbp)
movsd  0xe5c(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    120f <LSKeyframeAnimationFunctionEaseInOutExpo+0xff>
movsd  -0x20(%rbp),%xmm0
movsd  0xe4d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xe2f(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe43(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
mov    $0x2,%edi
call   1030 <pow@plt>
movsd  -0x30(%rbp),%xmm0
cvtsi2sd %eax,%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1275 <LSKeyframeAnimationFunctionEaseInOutExpo+0x165>
movsd  -0x20(%rbp),%xmm0
movsd  0xdec(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xdeb(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
movsd  %xmm1,-0x10(%rbp)
movsd  0xdd1(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
mov    $0x2,%edi
call   1030 <pow@plt>
movsd  -0x38(%rbp),%xmm0
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
add    $0x2,%eax
cvtsi2sd %eax,%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LSKeyframeAnimationFunctionEaseInOutExpo>:
push   %rbx
sub    $0x10,%rsp
xorpd  %xmm4,%xmm4
ucomisd %xmm4,%xmm0
jne    1121 <LSKeyframeAnimationFunctionEaseInOutExpo+0x11>
jnp    112d <LSKeyframeAnimationFunctionEaseInOutExpo+0x1d>
ucomisd %xmm3,%xmm0
jne    1137 <LSKeyframeAnimationFunctionEaseInOutExpo+0x27>
jp     1137 <LSKeyframeAnimationFunctionEaseInOutExpo+0x27>
addsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
ret
movsd  %xmm1,0x8(%rsp)
movsd  0xebb(%rip),%xmm1
mulsd  %xmm1,%xmm3
divsd  %xmm3,%xmm0
movsd  0xeb3(%rip),%xmm3
ucomisd %xmm0,%xmm3
mulsd  %xmm1,%xmm2
movsd  %xmm2,(%rsp)
addsd  0xea6(%rip),%xmm0
jbe    118b <LSKeyframeAnimationFunctionEaseInOutExpo+0x7b>
mulsd  0xeac(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    $0x2,%edi
call   1030 <pow@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
jmp    11af <LSKeyframeAnimationFunctionEaseInOutExpo+0x9f>
mulsd  0xe85(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    $0x2,%ebx
mov    $0x2,%edi
call   1030 <pow@plt>
sub    %eax,%ebx
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
movsd  (%rsp),%xmm0
mulsd  %xmm1,%xmm0
addsd  0x8(%rsp),%xmm0
jmp    1131 <LSKeyframeAnimationFunctionEaseInOutExpo+0x21>

LLVM IR (-O0):
define double @LSKeyframeAnimationFunctionEaseInOutExpo(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
%10 = load double, double* %6
%11 = fcmp oeq double %10, 0.000000e+00
br i1 %11, label %12, label %14
12: ; preds = %4
%13 = load double, double* %7
store double %13, double* %5
br label %52
14: ; preds = %4
%15 = load double, double* %6
%16 = load double, double* %9
%17 = fcmp oeq double %15, %16
br i1 %17, label %18, label %22
18: ; preds = %14
%19 = load double, double* %7
%20 = load double, double* %8
%21 = fadd double %19, %20
store double %21, double* %5
br label %52
22: ; preds = %14
%23 = load double, double* %9
%24 = fdiv double %23, 2.000000e+00
%25 = load double, double* %6
%26 = fdiv double %25, %24
store double %26, double* %6
%27 = fcmp olt double %26, 1.000000e+00
br i1 %27, label %28, label %39
28: ; preds = %22
%29 = load double, double* %8
%30 = fdiv double %29, 2.000000e+00
%31 = load double, double* %6
%32 = fsub double %31, 1.000000e+00
%33 = fmul double 1.000000e+01, %32
%34 = fptosi double %33 to i32
%35 = call i32 @pow(i32 2, i32 %34)
%36 = sitofp i32 %35 to double
%37 = load double, double* %7
%38 = call double @llvm.fmuladd.f64(double %30, double %36, double %37)
store double %38, double* %5
br label %52
39: ; preds = %22
%40 = load double, double* %8
%41 = fdiv double %40, 2.000000e+00
%42 = load double, double* %6
%43 = fadd double %42, -1.000000e+00
store double %43, double* %6
%44 = fmul double -1.000000e+01, %43
%45 = fptosi double %44 to i32
%46 = call i32 @pow(i32 2, i32 %45)
%47 = sub nsw i32 0, %46
%48 = add nsw i32 %47, 2
%49 = sitofp i32 %48 to double
%50 = load double, double* %7
%51 = call double @llvm.fmuladd.f64(double %41, double %49, double %50)
store double %51, double* %5
br label %52
52: ; preds = %39, %28, %18, %12
%53 = load double, double* %5
ret double %53
}

LLVM IR (-O2):
define double @LSKeyframeAnimationFunctionEaseInOutExpo(double %0, double %1, double %2, double %3) {
%5 = fcmp oeq double %0, 0.000000e+00
br i1 %5, label %29, label %6
6: ; preds = %4
%7 = fcmp oeq double %0, %3
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = fadd double %1, %2
br label %29
10: ; preds = %6
%11 = fmul double %3, 5.000000e-01
%12 = fdiv double %0, %11
%13 = fcmp olt double %12, 1.000000e+00
%14 = fmul double %2, 5.000000e-01
%15 = fadd double %12, -1.000000e+00
br i1 %13, label %16, label %22
16: ; preds = %10
%17 = fmul double %15, 1.000000e+01
%18 = fptosi double %17 to i32
%19 = tail call i32 @pow(i32 2, i32 %18)
%20 = sitofp i32 %19 to double
%21 = tail call double @llvm.fmuladd.f64(double %14, double %20, double %1)
br label %29
22: ; preds = %10
%23 = fmul double %15, -1.000000e+01
%24 = fptosi double %23 to i32
%25 = tail call i32 @pow(i32 2, i32 %24)
%26 = sub i32 2, %25
%27 = sitofp i32 %26 to double
%28 = tail call double @llvm.fmuladd.f64(double %14, double %27, double %1)
br label %29
29: ; preds = %4, %22, %16, %8
%30 = phi double [ %9, %8 ], [ %21, %16 ], [ %28, %22 ], [ %1, %4 ]
ret double %30
}