#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 */
double fclean(double);
int /*<<< orphan*/ printf(char *, double);
main() {
  static float feps, feps1, ftmp;
  feps = 1.0;
  while (fclean(1.0 + feps) > 1.0)
    feps = 0.5 * feps;
  printf("%g\n", 2.0 * feps);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,0x2ef5(%rip)
movss  0x2eed(%rip),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeb5(%rip),%xmm0
addsd  %xmm1,%xmm0
call   1040 <fclean@plt>
movsd  0xea4(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1197 <main+0x77>
movss  0x2ebe(%rip),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe96(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x2ea2(%rip)
jmp    113f <main+0x1f>
movss  0x2e95(%rip),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe65(%rip),%xmm0
mulsd  %xmm1,%xmm0
lea    0xe6a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x3f800000,0x2f09(%rip)
movsd  0xecd(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1040 <fclean@plt>
ucomisd 0xebb(%rip),%xmm0
jbe    1179 <main+0x59>
movss  0x2edd(%rip),%xmm0
mulss  0xeb1(%rip),%xmm0
movss  %xmm0,0x2ecd(%rip)
cvtss2sd %xmm0,%xmm0
movsd  0xe95(%rip),%xmm1
addsd  %xmm1,%xmm0
jmp    1140 <main+0x20>
movss  0x2eb3(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  %xmm0,%xmm0
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@main.feps = internal global float 0.000000e+00
@main.feps1 = internal global float 0.000000e+00
@main.ftmp = internal global float 0.000000e+00
@.str = [4 x i8] c"%g\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
store float 1.000000e+00, float* @main.feps
br label %2
2: ; preds = %8, %0
%3 = load float, float* @main.feps
%4 = fpext float %3 to double
%5 = fadd double 1.000000e+00, %4
%6 = call double @fclean(double %5)
%7 = fcmp ogt double %6, 1.000000e+00
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load float, float* @main.feps
%10 = fpext float %9 to double
%11 = fmul double 5.000000e-01, %10
%12 = fptrunc double %11 to float
store float %12, float* @main.feps
br label %2
13: ; preds = %2
%14 = load float, float* @main.feps
%15 = fpext float %14 to double
%16 = fmul double 2.000000e+00, %15
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %16)
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
@main.feps = internal unnamed_addr global float 0.000000e+00
@.str = [4 x i8] c"%g\0A\00"
define i32 @main() {
store float 1.000000e+00, float* @main.feps
%1 = tail call double @fclean(double 2.000000e+00)
%2 = fcmp ogt double %1, 1.000000e+00
br i1 %2, label %3, label %10
3: ; preds = %0, %3
%4 = load float, float* @main.feps
%5 = fmul float %4, 5.000000e-01
store float %5, float* @main.feps
%6 = fpext float %5 to double
%7 = fadd double %6, 1.000000e+00
%8 = tail call double @fclean(double %7)
%9 = fcmp ogt double %8, 1.000000e+00
br i1 %9, label %3, label %10
10: ; preds = %3, %0
%11 = load float, float* @main.feps
%12 = fpext float %11 to double
%13 = fmul double %12, 2.000000e+00
%14 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %13)
ret i32 0
}