#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 dclean(double);
int /*<<< orphan*/ printf(char *, double);
main() {
  static double deps, deps1, dtmp;
  deps = 1.0;
  while (dclean(1.0 + deps) > 1.0)
    deps = 0.5 * deps;
  printf("%g\n", 2.0 * deps);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,0x2ef9(%rip)
movsd  0xeb9(%rip),%xmm0
addsd  0x2ee9(%rip),%xmm0
call   1040 <dclean@plt>
movsd  0xea4(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1183 <main+0x63>
movsd  0xea2(%rip),%xmm0
mulsd  0x2ec2(%rip),%xmm0
movsd  %xmm0,0x2eba(%rip)
jmp    113f <main+0x1f>
movsd  0xe7d(%rip),%xmm0
mulsd  0x2ea5(%rip),%xmm0
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x3ff0000000000000,%rax
mov    %rax,0x2f06(%rip)
movsd  0xec6(%rip),%xmm0
nopw   0x0(%rax,%rax,1)
call   1040 <dclean@plt>
ucomisd 0xebb(%rip),%xmm0
jbe    1175 <main+0x55>
movsd  0x2ee1(%rip),%xmm0
mulsd  0xeb1(%rip),%xmm0
movsd  %xmm0,0x2ed1(%rip)
movsd  0xe99(%rip),%xmm1
addsd  %xmm1,%xmm0
jmp    1140 <main+0x20>
movsd  0x2ebb(%rip),%xmm0
addsd  %xmm0,%xmm0
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

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