#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 powf(int, int);
float inOutExpo(float t, float b, float c, float d) {
  if (t == 0)
    return b;
  if (t == d)
    return b + c;
  t = t / d * 2;
  if (t < 1)
    return c / 2 * powf(2, 10 * (t - 1)) + b - c * 0.0005;
  return c / 2 * 1.0005 * (-powf(2, -10 * (t - 1)) + 2) + b;
}


x86 assembly (clang, -O0):
<inOutExpo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%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    1152 <inOutExpo+0x42>
jp     1152 <inOutExpo+0x42>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    12be <inOutExpo+0x1ae>
movss  -0x8(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jne    117b <inOutExpo+0x6b>
jp     117b <inOutExpo+0x6b>
movss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    12be <inOutExpo+0x1ae>
movss  -0x8(%rbp),%xmm0
divss  -0x14(%rbp),%xmm0
movss  0xe77(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xe62(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1241 <inOutExpo+0x131>
movss  -0x10(%rbp),%xmm0
movss  0xe4f(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm1
movss  0xe35(%rip),%xmm0
subss  %xmm0,%xmm1
movss  0xe35(%rip),%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1030 <powf@plt>
movss  -0x18(%rbp),%xmm0
cvtsi2ss %eax,%xmm2
movss  -0xc(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xded(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    12be <inOutExpo+0x1ae>
movss  -0x10(%rbp),%xmm0
movss  0xdb6(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdb2(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movss  -0x8(%rbp),%xmm1
movss  0xd8c(%rip),%xmm0
subss  %xmm0,%xmm1
movss  0xd88(%rip),%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1030 <powf@plt>
movsd  -0x20(%rbp),%xmm0
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
add    $0x2,%eax
cvtsi2sd %eax,%xmm2
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inOutExpo>:
push   %rbx
sub    $0x20,%rsp
movaps %xmm1,%xmm4
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1126 <inOutExpo+0x16>
jnp    121a <inOutExpo+0x10a>
ucomiss %xmm3,%xmm0
jne    1136 <inOutExpo+0x26>
jp     1136 <inOutExpo+0x26>
addss  %xmm2,%xmm4
jmp    121a <inOutExpo+0x10a>
movss  %xmm4,0xc(%rsp)
divss  %xmm3,%xmm0
addss  %xmm0,%xmm0
movss  0xeb4(%rip),%xmm1
ucomiss %xmm0,%xmm1
movss  0xead(%rip),%xmm1
mulss  %xmm2,%xmm1
jbe    11c1 <inOutExpo+0xb1>
addss  0xea3(%rip),%xmm0
mulss  0xea3(%rip),%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
movss  %xmm2,0x10(%rsp)
movss  %xmm1,0x1c(%rsp)
call   1030 <powf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  0x1c(%rsp),%xmm1
mulss  %xmm0,%xmm1
addss  0xc(%rsp),%xmm1
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xe70(%rip),%xmm0
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm0
xorps  %xmm4,%xmm4
cvtsd2ss %xmm0,%xmm4
jmp    121a <inOutExpo+0x10a>
cvtss2sd %xmm1,%xmm1
mulsd  0xe4b(%rip),%xmm1
movsd  %xmm1,0x10(%rsp)
addss  0xe2d(%rip),%xmm0
mulss  0xe29(%rip),%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%ebx
mov    $0x2,%edi
call   1030 <powf@plt>
sub    %eax,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mulsd  0x10(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm0,%xmm1
xorps  %xmm4,%xmm4
cvtsd2ss %xmm1,%xmm4
movaps %xmm4,%xmm0
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define float @inOutExpo(float %0, float %1, float %2, float %3) {
%5 = fcmp oeq float %0, 0.000000e+00
br i1 %5, label %39, label %6
6: ; preds = %4
%7 = fcmp oeq float %0, %3
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = fadd float %1, %2
br label %39
10: ; preds = %6
%11 = fdiv float %0, %3
%12 = fmul float %11, 2.000000e+00
%13 = fcmp olt float %12, 1.000000e+00
%14 = fmul float %2, 5.000000e-01
br i1 %13, label %15, label %27
15: ; preds = %10
%16 = fadd float %12, -1.000000e+00
%17 = fmul float %16, 1.000000e+01
%18 = fptosi float %17 to i32
%19 = tail call i32 @powf(i32 2, i32 %18)
%20 = sitofp i32 %19 to float
%21 = tail call float @llvm.fmuladd.f32(float %14, float %20, float %1)
%22 = fpext float %21 to double
%23 = fpext float %2 to double
%24 = fneg double %23
%25 = tail call double @llvm.fmuladd.f64(double %24, double 5.000000e-04, double %22)
%26 = fptrunc double %25 to float
br label %39
27: ; preds = %10
%28 = fpext float %14 to double
%29 = fmul double %28, 1.000500e+00
%30 = fadd float %12, -1.000000e+00
%31 = fmul float %30, -1.000000e+01
%32 = fptosi float %31 to i32
%33 = tail call i32 @powf(i32 2, i32 %32)
%34 = sub i32 2, %33
%35 = sitofp i32 %34 to double
%36 = fpext float %1 to double
%37 = tail call double @llvm.fmuladd.f64(double %29, double %35, double %36)
%38 = fptrunc double %37 to float
br label %39
39: ; preds = %4, %27, %15, %8
%40 = phi float [ %9, %8 ], [ %26, %15 ], [ %38, %27 ], [ %1, %4 ]
ret float %40
}