#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 inQuart(float, float, float, float);
float outQuart(float, float, float, float);
float outInQuart(float t, float b, float c, float d) {
  if (t < d / 2)
    return outQuart(t * 2, b, c / 2, d);
  return inQuart((t * 2) - d, b + c / 2, c / 2, d);
}


x86 assembly (clang, -O0):
<outInQuart>:
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),%xmm1
movss  -0x14(%rbp),%xmm0
movss  0xeb2(%rip),%xmm2
divss  %xmm2,%xmm0
ucomiss %xmm1,%xmm0
jbe    1192 <outInQuart+0x72>
movss  0xe9d(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
movss  0xe86(%rip),%xmm3
divss  %xmm3,%xmm2
movss  -0x14(%rbp),%xmm3
call   1030 <outQuart@plt>
movss  %xmm0,-0x4(%rbp)
jmp    11eb <outInQuart+0xcb>
movss  -0x8(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
addss  %xmm0,%xmm0
addss  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
movss  0xe3d(%rip),%xmm3
divss  %xmm3,%xmm2
addss  %xmm2,%xmm1
movss  -0x10(%rbp),%xmm2
movss  0xe28(%rip),%xmm3
divss  %xmm3,%xmm2
movss  -0x14(%rbp),%xmm3
call   1040 <inQuart@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outInQuart>:
movss  0xed8(%rip),%xmm4
mulss  %xmm3,%xmm4
ucomiss %xmm0,%xmm4
jbe    1142 <outInQuart+0x22>
addss  %xmm0,%xmm0
mulss  0xec3(%rip),%xmm2
jmp    1030 <outQuart@plt>
addss  %xmm0,%xmm0
subss  %xmm3,%xmm0
mulss  0xeae(%rip),%xmm2
addss  %xmm2,%xmm1
jmp    1040 <inQuart@plt>

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

LLVM IR (-O2):
define float @outInQuart(float %0, float %1, float %2, float %3) {
%5 = fmul float %3, 5.000000e-01
%6 = fcmp ogt float %5, %0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = fmul float %0, 2.000000e+00
%9 = fmul float %2, 5.000000e-01
%10 = tail call float @outQuart(float %8, float %1, float %9, float %3)
br label %17
11: ; preds = %4
%12 = fneg float %3
%13 = tail call float @llvm.fmuladd.f32(float %0, float 2.000000e+00, float %12)
%14 = fmul float %2, 5.000000e-01
%15 = fadd float %14, %1
%16 = tail call float @inQuart(float %13, float %15, float %14, float %3)
br label %17
17: ; preds = %11, %7
%18 = phi float [ %10, %7 ], [ %16, %11 ]
ret float %18
}