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


x86 assembly (clang, -O0):
<inOutQuart>:
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 <inOutQuart+0x8e>
movss  -0x10(%rbp),%xmm0
movss  0xe9e(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
mov    $0x4,%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    11fa <inOutQuart+0xea>
movss  -0x10(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  0xe4c(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xe36(%rip),%xmm1
subss  %xmm1,%xmm0
mov    $0x4,%edi
call   1030 <pow@plt>
movss  -0x1c(%rbp),%xmm0
sub    $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):
<inOutQuart>:
push   %rax
movss  %xmm1,0x4(%rsp)
divss  %xmm3,%xmm0
addss  %xmm0,%xmm0
movss  0xed9(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    1145 <inOutQuart+0x35>
mulss  0xed8(%rip),%xmm2
movss  %xmm2,(%rsp)
mov    $0x4,%edi
call   1030 <pow@plt>
jmp    1167 <inOutQuart+0x57>
mulss  0xeb7(%rip),%xmm2
movss  %xmm2,(%rsp)
addss  0xeae(%rip),%xmm0
mov    $0x4,%edi
call   1030 <pow@plt>
add    $0xfffffffe,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mulss  (%rsp),%xmm0
addss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @inOutQuart(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 4)
%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 %35
24: ; preds = %4
%25 = load float, float* %8
%26 = fneg float %25
%27 = fdiv float %26, 2.000000e+00
%28 = load float, float* %6
%29 = fsub float %28, 2.000000e+00
%30 = call i32 @pow(float %29, i32 4)
%31 = sub nsw i32 %30, 2
%32 = sitofp i32 %31 to float
%33 = load float, float* %7
%34 = call float @llvm.fmuladd.f32(float %27, float %32, float %33)
store float %34, float* %5
br label %35
35: ; preds = %24, %16
%36 = load float, float* %5
ret float %36
}

LLVM IR (-O2):
define float @inOutQuart(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 %11
8: ; preds = %4
%9 = fmul float %2, 5.000000e-01
%10 = tail call i32 @pow(float %6, i32 4)
br label %16
11: ; preds = %4
%12 = fmul float %2, -5.000000e-01
%13 = fadd float %6, -2.000000e+00
%14 = tail call i32 @pow(float %13, i32 4)
%15 = add nsw i32 %14, -2
br label %16
16: ; preds = %11, %8
%17 = phi i32 [ %15, %11 ], [ %10, %8 ]
%18 = phi float [ %12, %11 ], [ %9, %8 ]
%19 = sitofp i32 %17 to float
%20 = tail call float @llvm.fmuladd.f32(float %18, float %19, float %1)
ret float %20
}