#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 */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main(void) {
  long double l1 = 1.9999999999999999991326382620115964527941L;
  long double l2 = 2.0000000000000000008673617379884035472059L;
  long double l3 = -2.0000000000000000008673617379884035472059L;
  long double l4 = -1.9999999999999999991326382620115964527941L;
  if ((int)l1 != 1)
    abort();
  if ((int)l2 != 2)
    abort();
  if ((int)l3 != -2)
    abort();
  if ((int)l4 != -1)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
fldt   0xecb(%rip)
fstpt  -0x20(%rbp)
fldt   0xed2(%rip)
fstpt  -0x30(%rbp)
fldt   0xed9(%rip)
fstpt  -0x40(%rbp)
fldt   0xee0(%rip)
fstpt  -0x50(%rbp)
fldt   -0x20(%rbp)
fnstcw -0x62(%rbp)
movzwl -0x62(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x64(%rbp)
fldcw  -0x64(%rbp)
fistpl -0x54(%rbp)
fldcw  -0x62(%rbp)
mov    -0x54(%rbp),%eax
cmp    $0x1,%eax
je     1182 <main+0x62>
mov    $0x0,%al
call   1030 <abort@plt>
fldt   -0x30(%rbp)
fnstcw -0x66(%rbp)
movzwl -0x66(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x68(%rbp)
fldcw  -0x68(%rbp)
fistpl -0x58(%rbp)
fldcw  -0x66(%rbp)
mov    -0x58(%rbp),%eax
cmp    $0x2,%eax
je     11b1 <main+0x91>
mov    $0x0,%al
call   1030 <abort@plt>
fldt   -0x40(%rbp)
fnstcw -0x6a(%rbp)
movzwl -0x6a(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x6c(%rbp)
fldcw  -0x6c(%rbp)
fistpl -0x5c(%rbp)
fldcw  -0x6a(%rbp)
mov    -0x5c(%rbp),%eax
cmp    $0xfffffffe,%eax
je     11e0 <main+0xc0>
mov    $0x0,%al
call   1030 <abort@plt>
fldt   -0x50(%rbp)
fnstcw -0x6e(%rbp)
movzwl -0x6e(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x70(%rbp)
fldcw  -0x70(%rbp)
fistpl -0x60(%rbp)
fldcw  -0x6e(%rbp)
mov    -0x60(%rbp),%eax
cmp    $0xffffffff,%eax
je     120f <main+0xef>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca x86_fp80
%3 = alloca x86_fp80
%4 = alloca x86_fp80
%5 = alloca x86_fp80
store i32 0, i32* %1
store x86_fp80 0xK3FFFFFFFFFFFFFFFFFF8, x86_fp80* %2
store x86_fp80 0xK40008000000000000004, x86_fp80* %3
store x86_fp80 0xKC0008000000000000004, x86_fp80* %4
store x86_fp80 0xKBFFFFFFFFFFFFFFFFFF8, x86_fp80* %5
%6 = load x86_fp80, x86_fp80* %2
%7 = fptosi x86_fp80 %6 to i32
%8 = icmp ne i32 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %0
%12 = load x86_fp80, x86_fp80* %3
%13 = fptosi x86_fp80 %12 to i32
%14 = icmp ne i32 %13, 2
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = call i32 (...) @abort()
unreachable
17: ; preds = %11
%18 = load x86_fp80, x86_fp80* %4
%19 = fptosi x86_fp80 %18 to i32
%20 = icmp ne i32 %19, -2
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = call i32 (...) @abort()
unreachable
23: ; preds = %17
%24 = load x86_fp80, x86_fp80* %5
%25 = fptosi x86_fp80 %24 to i32
%26 = icmp ne i32 %25, -1
br i1 %26, label %27, label %29
27: ; preds = %23
%28 = call i32 (...) @abort()
unreachable
29: ; preds = %23
%30 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @exit(i32 0)
unreachable
}