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


x86 assembly (clang, -O0):
<inOutQuint>:
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
divss  -0x14(%rbp),%xmm0
movss  0xec6(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeb1(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    119e <inOutQuint+0x8e>
movss  -0x10(%rbp),%xmm0
movss  0xe9e(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
mov    $0x5,%edi
call   1030 <pow@plt>
movss  -0x18(%rbp),%xmm0
cvtsi2ss %eax,%xmm2
movss  -0xc(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11ed <inOutQuint+0xdd>
movss  -0x10(%rbp),%xmm0
movss  0xe59(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xe43(%rip),%xmm1
subss  %xmm1,%xmm0
mov    $0x5,%edi
call   1030 <pow@plt>
movss  -0x1c(%rbp),%xmm0
add    $0x2,%eax
cvtsi2ss %eax,%xmm2
movss  -0xc(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inOutQuint>:
push   %rax
movss  %xmm2,(%rsp)
movss  %xmm1,0x4(%rsp)
divss  %xmm3,%xmm0
addss  %xmm0,%xmm0
movss  0xed4(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    113d <inOutQuint+0x2d>
mov    $0x5,%edi
call   1030 <pow@plt>
jmp    1152 <inOutQuint+0x42>
addss  0xebf(%rip),%xmm0
mov    $0x5,%edi
call   1030 <pow@plt>
add    $0x2,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  (%rsp),%xmm1
mulss  0xea2(%rip),%xmm1
mulss  %xmm1,%xmm0
addss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @inOutQuint(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 = load float, float* %9
%12 = fdiv float %10, %11
%13 = fmul float %12, 2.000000e+00
store float %13, float* %6
%14 = load float, float* %6
%15 = fcmp olt float %14, 1.000000e+00
br i1 %15, label %16, label %24
16: ; preds = %4
%17 = load float, float* %8
%18 = fdiv float %17, 2.000000e+00
%19 = load float, float* %6
%20 = call i32 @pow(float %19, i32 5)
%21 = sitofp i32 %20 to float
%22 = load float, float* %7
%23 = call float @llvm.fmuladd.f32(float %18, float %21, float %22)
store float %23, float* %5
br label %34
24: ; preds = %4
%25 = load float, float* %8
%26 = fdiv float %25, 2.000000e+00
%27 = load float, float* %6
%28 = fsub float %27, 2.000000e+00
%29 = call i32 @pow(float %28, i32 5)
%30 = add nsw i32 %29, 2
%31 = sitofp i32 %30 to float
%32 = load float, float* %7
%33 = call float @llvm.fmuladd.f32(float %26, float %31, float %32)
store float %33, float* %5
br label %34
34: ; preds = %24, %16
%35 = load float, float* %5
ret float %35
}

LLVM IR (-O2):
define float @inOutQuint(float %0, float %1, float %2, float %3) {
%5 = fdiv float %0, %3
%6 = fmul float %5, 2.000000e+00
%7 = fcmp olt float %6, 1.000000e+00
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i32 @pow(float %6, i32 5)
br label %14
10: ; preds = %4
%11 = fadd float %6, -2.000000e+00
%12 = tail call i32 @pow(float %11, i32 5)
%13 = add nsw i32 %12, 2
br label %14
14: ; preds = %10, %8
%15 = phi i32 [ %13, %10 ], [ %9, %8 ]
%16 = fmul float %2, 5.000000e-01
%17 = sitofp i32 %15 to float
%18 = tail call float @llvm.fmuladd.f32(float %16, float %17, float %1)
ret float %18
}