#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 fabs(double);
float epslon(float x) {
  float a, b, c, eps;
  a = 4.0e0 / 3.0e0;
  eps = 0.0;
  while (eps == 0.0) {
    b = a - 1.0;
    c = b + b + b;
    eps = fabs((double)(c - 1.0));
  }
  return (eps * fabs((double)x));
}


x86 assembly (clang, -O0):
<epslon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedb(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11a4 <epslon+0x94>
jp     11a4 <epslon+0x94>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea9(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe77(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
movss  %xmm0,-0x14(%rbp)
jmp    1132 <epslon+0x22>
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <fabs@plt>
movaps %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
mulss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<epslon>:
push   %rax
movss  %xmm0,0x4(%rsp)
nopw   0x0(%rax,%rax,1)
movsd  0xed8(%rip),%xmm0
call   1030 <fabs@plt>
ucomiss 0xed4(%rip),%xmm0
jne    1138 <epslon+0x28>
jnp    1120 <epslon+0x10>
movss  %xmm0,(%rsp)
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <fabs@plt>
mulss  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @epslon(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %2
store float 0x3FF5555560000000, float* %3
store float 0.000000e+00, float* %6
br label %7
7: ; preds = %11, %1
%8 = load float, float* %6
%9 = fpext float %8 to double
%10 = fcmp oeq double %9, 0.000000e+00
br i1 %10, label %11, label %25
11: ; preds = %7
%12 = load float, float* %3
%13 = fpext float %12 to double
%14 = fsub double %13, 1.000000e+00
%15 = fptrunc double %14 to float
store float %15, float* %4
%16 = load float, float* %4
%17 = load float, float* %4
%18 = fadd float %16, %17
%19 = load float, float* %4
%20 = fadd float %18, %19
store float %20, float* %5
%21 = load float, float* %5
%22 = fpext float %21 to double
%23 = fsub double %22, 1.000000e+00
%24 = call float @fabs(double %23)
store float %24, float* %6
br label %7
25: ; preds = %7
%26 = load float, float* %6
%27 = load float, float* %2
%28 = fpext float %27 to double
%29 = call float @fabs(double %28)
%30 = fmul float %26, %29
ret float %30
}

LLVM IR (-O2):
define float @epslon(float %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call float @fabs(double 0x3E80000000000000)
%4 = fcmp oeq float %3, 0.000000e+00
br i1 %4, label %2, label %5
5: ; preds = %2
%6 = fpext float %0 to double
%7 = tail call float @fabs(double %6)
%8 = fmul float %3, %7
ret float %8
}