#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 DBL_EPSILON;
int /*<<< orphan*/ assert(int);
int main(void) {
  int i;
  double eps, one;
  eps = 1.0;
  for (i = 0; i < 100; i++) {
    eps /= 2;
    one = 1.0 + eps;
  }
  assert(DBL_EPSILON == eps);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1173 <main+0x63>
movsd  -0x10(%rbp),%xmm0
movsd  0xebe(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xea5(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <main+0x23>
mov    0x2e6e(%rip),%rax
movsd  (%rax),%xmm0
ucomisd -0x10(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xee7(%rip),%xmm0
mov    $0x64,%eax
movsd  0xee2(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
add    $0xfffffff6,%eax
jne    1130 <main+0x20>
mov    0x2e84(%rip),%rax
cmpeqsd (%rax),%xmm0
movq   %xmm0,%rdi
and    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@DBL_EPSILON = global double 0.000000e+00
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
store double 1.000000e+00, double* %3
store i32 0, i32* %2
br label %5
5: ; preds = %13, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 100
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = load double, double* %3
%10 = fdiv double %9, 2.000000e+00
store double %10, double* %3
%11 = load double, double* %3
%12 = fadd double 1.000000e+00, %11
store double %12, double* %4
br label %13
13: ; preds = %8
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %5
16: ; preds = %5
%17 = load double, double* @DBL_EPSILON
%18 = load double, double* %3
%19 = fcmp oeq double %17, %18
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
%22 = load i32, i32* %1
ret i32 %22
}

LLVM IR (-O2):
@DBL_EPSILON = global double 0.000000e+00
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %14, %1 ]
%3 = phi double [ 1.000000e+00, %0 ], [ %13, %1 ]
%4 = fmul double %3, 5.000000e-01
%5 = fmul double %4, 5.000000e-01
%6 = fmul double %5, 5.000000e-01
%7 = fmul double %6, 5.000000e-01
%8 = fmul double %7, 5.000000e-01
%9 = fmul double %8, 5.000000e-01
%10 = fmul double %9, 5.000000e-01
%11 = fmul double %10, 5.000000e-01
%12 = fmul double %11, 5.000000e-01
%13 = fmul double %12, 5.000000e-01
%14 = add nuw nsw i32 %2, 10
%15 = icmp eq i32 %14, 100
br i1 %15, label %16, label %1
16: ; preds = %1
%17 = load double, double* @DBL_EPSILON
%18 = fcmp oeq double %17, %13
%19 = zext i1 %18 to i32
%20 = tail call i32 @assert(i32 %19)
ret i32 0
}