#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 */
long double LDBL_EPSILON;
int /*<<< orphan*/ abort();
int main(void) {
  volatile long double ee = 1.0;
  long double eps = ee;
  while (ee + 1.0 != 1.0) {
    eps = ee;
    ee = eps / 2;
  }
  if (eps != LDBL_EPSILON)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
fld1
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
fstpt  -0x30(%rbp)
fldt   -0x20(%rbp)
fld1
fadd   %st,%st(1)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1148 <main+0x38>
jp     1148 <main+0x38>
jmp    1161 <main+0x51>
fldt   -0x20(%rbp)
fstpt  -0x30(%rbp)
fldt   -0x30(%rbp)
flds   0xea9(%rip)
fdivrp %st,%st(1)
fstpt  -0x20(%rbp)
jmp    112a <main+0x1a>
fldt   -0x30(%rbp)
mov    0x2e6d(%rip),%rax
fldt   (%rax)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1184 <main+0x74>
jp     1184 <main+0x74>
jmp    118b <main+0x7b>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
fld1
fld    %st(0)
fstpt  (%rsp)
fldt   (%rsp)
fldt   (%rsp)
fadd   %st(2),%st
fucomip %st(2),%st
jne    1129 <main+0x19>
jnp    114b <main+0x3b>
fstp   %st(0)
fldz
nopl   (%rax)
fstp   %st(0)
fldt   (%rsp)
fld    %st(0)
fmuls  0xec3(%rip)
fstpt  (%rsp)
fldt   (%rsp)
fadd   %st(2),%st
fucomip %st(2),%st
jne    1130 <main+0x20>
jp     1130 <main+0x20>
fstp   %st(1)
mov    0x2e84(%rip),%rax
fldt   (%rax)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1167 <main+0x57>
jp     1167 <main+0x57>
xor    %eax,%eax
add    $0x18,%rsp
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@LDBL_EPSILON = global x86_fp80 0xK00000000000000000000
define i32 @main() {
%1 = alloca i32
%2 = alloca x86_fp80
%3 = alloca x86_fp80
store i32 0, i32* %1
store volatile x86_fp80 0xK3FFF8000000000000000, x86_fp80* %2
%4 = load volatile x86_fp80, x86_fp80* %2
store x86_fp80 %4, x86_fp80* %3
br label %5
5: ; preds = %9, %0
%6 = load volatile x86_fp80, x86_fp80* %2
%7 = fadd x86_fp80 %6, 0xK3FFF8000000000000000
%8 = fcmp une x86_fp80 %7, 0xK3FFF8000000000000000
br i1 %8, label %9, label %13
9: ; preds = %5
%10 = load volatile x86_fp80, x86_fp80* %2
store x86_fp80 %10, x86_fp80* %3
%11 = load x86_fp80, x86_fp80* %3
%12 = fdiv x86_fp80 %11, 0xK40008000000000000000
store volatile x86_fp80 %12, x86_fp80* %2
br label %5
13: ; preds = %5
%14 = load x86_fp80, x86_fp80* %3
%15 = load x86_fp80, x86_fp80* @LDBL_EPSILON
%16 = fcmp une x86_fp80 %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = call i32 (...) @abort()
unreachable
19: ; preds = %13
ret i32 0
}

LLVM IR (-O2):
@LDBL_EPSILON = global x86_fp80 0xK00000000000000000000
define i32 @main() {
%1 = alloca x86_fp80
%2 = bitcast x86_fp80* %1 to i8*
store volatile x86_fp80 0xK3FFF8000000000000000, x86_fp80* %1
%3 = load volatile x86_fp80, x86_fp80* %1
%4 = load volatile x86_fp80, x86_fp80* %1
%5 = fadd x86_fp80 %4, 0xK3FFF8000000000000000
%6 = fcmp une x86_fp80 %5, 0xK3FFF8000000000000000
br i1 %6, label %7, label %13
7: ; preds = %0, %7
%8 = load volatile x86_fp80, x86_fp80* %1
%9 = fmul x86_fp80 %8, 0xK3FFE8000000000000000
store volatile x86_fp80 %9, x86_fp80* %1
%10 = load volatile x86_fp80, x86_fp80* %1
%11 = fadd x86_fp80 %10, 0xK3FFF8000000000000000
%12 = fcmp une x86_fp80 %11, 0xK3FFF8000000000000000
br i1 %12, label %7, label %13
13: ; preds = %7, %0
%14 = phi x86_fp80 [ %3, %0 ], [ %8, %7 ]
%15 = load x86_fp80, x86_fp80* @LDBL_EPSILON
%16 = fcmp une x86_fp80 %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = tail call i32 (...) @abort()
unreachable
19: ; preds = %13
ret i32 0
}