#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 HUGE_VALL;
long double LDBL_EPSILON;
long double NAN;
int /*<<< orphan*/ check(char *, int);
int isinf(long double volatile);
int isnan(long double volatile);
long double nanl(char *);
void ldouble_test(void) {
  volatile long double Inf_var, NaN_var, zero_var, one_var;
  long double x1, x2;
  zero_var = 0.0;
  one_var = 1.0;
  NaN_var = zero_var / zero_var;
  Inf_var = one_var / zero_var;
  (void)&zero_var;
  (void)&one_var;
  (void)&NaN_var;
  (void)&Inf_var;
  check("long double"
        " isinf (inf) == 1",
        isinf(Inf_var) == 1);
  check("long double"
        " isinf (-inf) == -1",
        isinf(-Inf_var) == -1);
  check("long double"
        " !isinf (1)",
        !(isinf(one_var)));
  check("long double"
        " !isinf (NaN)",
        !(isinf(NaN_var)));
  check("long double"
        " isnan (NaN)",
        isnan(NaN_var));
  check("long double"
        " isnan (-NaN)",
        isnan(-NaN_var));
  check("long double"
        " !isnan (1)",
        !(isnan(one_var)));
  check("long double"
        " !isnan (inf)",
        !(isnan(Inf_var)));
  check("long double"
        " inf == inf",
        Inf_var == Inf_var);
  check("long double"
        " -inf == -inf",
        -Inf_var == -Inf_var);
  check("long double"
        " inf != -inf",
        Inf_var != -Inf_var);
  check("long double"
        " NaN != NaN",
        NaN_var != NaN_var);
  check("long double"
        " isnan (NAN)",
        isnan(NAN));
  check("long double"
        " isnan (-NAN)",
        isnan(-NAN));
  check("long double"
        " !isinf (NAN)",
        !(isinf(NAN)));
  check("long double"
        " !isinf (-NAN)",
        !(isinf(-NAN)));
  check("long double"
        " NAN != NAN",
        NAN != NAN);
  check("long double"
        " isnan (NAN)",
        isnan(nanl("")));
  check("long double"
        " isnan (-NAN)",
        isnan(-nanl("")));
  check("long double"
        " !isinf (NAN)",
        !(isinf(nanl(""))));
  check("long double"
        " !isinf (-NAN)",
        !(isinf(-nanl(""))));
  check("long double"
        " NAN != NAN",
        nanl("") != nanl(""));
  x1 = 1.0;
  x2 = x1 + LDBL_EPSILON;
  check("long double"
        " 1 != 1+EPSILON",
        x1 != x2);
  x1 = 1.0;
  x2 = x1 - LDBL_EPSILON;
  check("long double"
        " 1 != 1-EPSILON",
        x1 != x2);
  x1 = HUGE_VALL;
  check("long double"
        " isinf (HUGE_VALx) == +1",
        isinf(x1) == +1);
  x1 = -HUGE_VALL;
  check("long double"
        " isinf (-HUGE_VALx) == -1",
        isinf(x1) == -1);
}


x86 assembly (clang, -O0):
<ldouble_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
fldz
fstpt  -0x30(%rbp)
fld1
fld    %st(0)
fstpt  -0x7c(%rbp)
fstpt  -0x40(%rbp)
fldt   -0x30(%rbp)
fldt   -0x30(%rbp)
fdivrp %st,%st(1)
fstpt  -0x20(%rbp)
fldt   -0x40(%rbp)
fldt   -0x30(%rbp)
fdivrp %st,%st(1)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1060 <isinf@plt>
sub    $0x1,%eax
sete   %al
movzbl %al,%esi
lea    0xe73(%rip),%rdi
call   1050 <check@plt>
fldt   -0x10(%rbp)
fchs
mov    %rsp,%rax
fstpt  (%rax)
call   1060 <isinf@plt>
sub    $0xffffffff,%eax
sete   %al
movzbl %al,%esi
lea    0xe6c(%rip),%rdi
call   1050 <check@plt>
fldt   -0x40(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1060 <isinf@plt>
test   %eax,%eax
sete   %al
movzbl %al,%esi
lea    0xe6a(%rip),%rdi
call   1050 <check@plt>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1060 <isinf@plt>
test   %eax,%eax
sete   %al
movzbl %al,%esi
lea    0xe60(%rip),%rdi
call   1050 <check@plt>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <isnan@plt>
mov    %eax,%esi
lea    0xe5e(%rip),%rdi
call   1050 <check@plt>
fldt   -0x20(%rbp)
fchs
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <isnan@plt>
mov    %eax,%esi
lea    0xe59(%rip),%rdi
call   1050 <check@plt>
fldt   -0x40(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <isnan@plt>
test   %eax,%eax
sete   %al
movzbl %al,%esi
lea    0xe51(%rip),%rdi
call   1050 <check@plt>
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <isnan@plt>
test   %eax,%eax
sete   %al
movzbl %al,%esi
lea    0xe47(%rip),%rdi
call   1050 <check@plt>
fldt   -0x10(%rbp)
fldt   -0x10(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setnp  %cl
sete   %al
and    %cl,%al
movzbl %al,%esi
lea    0xe3d(%rip),%rdi
call   1050 <check@plt>
fldt   -0x10(%rbp)
fchs
fldt   -0x10(%rbp)
fchs
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setnp  %cl
sete   %al
and    %cl,%al
movzbl %al,%esi
lea    0xe2d(%rip),%rdi
call   1050 <check@plt>
fldt   -0x10(%rbp)
fldt   -0x10(%rbp)
fchs
fucomip %st(1),%st
fstp   %st(0)
setp   %cl
setne  %al
or     %cl,%al
movzbl %al,%esi
lea    0xe23(%rip),%rdi
call   1050 <check@plt>
fldt   -0x20(%rbp)
fldt   -0x20(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setp   %cl
setne  %al
or     %cl,%al
movzbl %al,%esi
lea    0xe18(%rip),%rdi
call   1050 <check@plt>
mov    0x2cef(%rip),%rax
mov    %rax,-0xc0(%rbp)
fldt   (%rax)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <isnan@plt>
mov    %eax,%esi
lea    0xe07(%rip),%rdi
mov    %rdi,-0xb8(%rbp)
call   1050 <check@plt>
mov    -0xc0(%rbp),%rax
fldt   (%rax)
fchs
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <isnan@plt>
mov    %eax,%esi
lea    0xdf5(%rip),%rdi
mov    %rdi,-0xb0(%rbp)
call   1050 <check@plt>
mov    -0xc0(%rbp),%rax
fldt   (%rax)
mov    %rsp,%rax
fstpt  (%rax)
call   1060 <isinf@plt>
test   %eax,%eax
sete   %al
movzbl %al,%esi
lea    0xde0(%rip),%rdi
mov    %rdi,-0xa8(%rbp)
call   1050 <check@plt>
mov    -0xc0(%rbp),%rax
fldt   (%rax)
fchs
mov    %rsp,%rax
fstpt  (%rax)
call   1060 <isinf@plt>
test   %eax,%eax
sete   %al
movzbl %al,%esi
lea    0xdc9(%rip),%rdi
mov    %rdi,-0xa0(%rbp)
call   1050 <check@plt>
mov    -0xc0(%rbp),%rax
fldt   (%rax)
fucomip %st(0),%st
setp   %al
movzbl %al,%esi
lea    0xdbf(%rip),%rdi
mov    %rdi,-0x90(%rbp)
call   1050 <check@plt>
lea    0xc6e(%rip),%rdi
mov    %rdi,-0x98(%rbp)
call   1030 <nanl@plt>
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <isnan@plt>
mov    -0xb8(%rbp),%rdi
mov    %eax,%esi
call   1050 <check@plt>
mov    -0x98(%rbp),%rdi
call   1030 <nanl@plt>
fchs
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <isnan@plt>
mov    -0xb0(%rbp),%rdi
mov    %eax,%esi
call   1050 <check@plt>
mov    -0x98(%rbp),%rdi
call   1030 <nanl@plt>
mov    %rsp,%rax
fstpt  (%rax)
call   1060 <isinf@plt>
mov    -0xa8(%rbp),%rdi
test   %eax,%eax
sete   %al
movzbl %al,%esi
call   1050 <check@plt>
mov    -0x98(%rbp),%rdi
call   1030 <nanl@plt>
fchs
mov    %rsp,%rax
fstpt  (%rax)
call   1060 <isinf@plt>
mov    -0xa0(%rbp),%rdi
test   %eax,%eax
sete   %al
movzbl %al,%esi
call   1050 <check@plt>
mov    -0x98(%rbp),%rdi
call   1030 <nanl@plt>
mov    -0x98(%rbp),%rdi
fstpt  -0x88(%rbp)
call   1030 <nanl@plt>
mov    -0x90(%rbp),%rdi
fldt   -0x88(%rbp)
fucomip %st(1),%st
fstp   %st(0)
setp   %cl
setne  %al
or     %cl,%al
movzbl %al,%esi
call   1050 <check@plt>
fldt   -0x7c(%rbp)
fstpt  -0x50(%rbp)
fldt   -0x50(%rbp)
mov    0x2af5(%rip),%rax
mov    %rax,-0x70(%rbp)
fldt   (%rax)
faddp  %st,%st(1)
fstpt  -0x60(%rbp)
fldt   -0x50(%rbp)
fldt   -0x60(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setp   %cl
setne  %al
or     %cl,%al
movzbl %al,%esi
lea    0xcab(%rip),%rdi
call   1050 <check@plt>
fldt   -0x7c(%rbp)
mov    -0x70(%rbp),%rax
fstpt  -0x50(%rbp)
fldt   -0x50(%rbp)
fldt   (%rax)
fsubrp %st,%st(1)
fstpt  -0x60(%rbp)
fldt   -0x50(%rbp)
fldt   -0x60(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setp   %cl
setne  %al
or     %cl,%al
movzbl %al,%esi
lea    0xc8f(%rip),%rdi
call   1050 <check@plt>
mov    0x2aa9(%rip),%rax
mov    %rax,-0x68(%rbp)
fldt   (%rax)
fstpt  -0x50(%rbp)
fldt   -0x50(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1060 <isinf@plt>
sub    $0x1,%eax
sete   %al
movzbl %al,%esi
lea    0xc78(%rip),%rdi
call   1050 <check@plt>
mov    -0x68(%rbp),%rax
fldt   (%rax)
fchs
fstpt  -0x50(%rbp)
fldt   -0x50(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1060 <isinf@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xc6d(%rip),%rdi
call   1050 <check@plt>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldouble_test>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
fldz
fstpt  0x50(%rsp)
fld1
fld    %st(0)
fstpt  0x34(%rsp)
fstpt  0x40(%rsp)
fldt   0x50(%rsp)
fldt   0x50(%rsp)
fdivrp %st,%st(1)
fstpt  0x20(%rsp)
fldt   0x40(%rsp)
fldt   0x50(%rsp)
fdivrp %st,%st(1)
fstpt  0x10(%rsp)
fldt   0x10(%rsp)
fstpt  (%rsp)
call   1060 <isinf@plt>
xor    %esi,%esi
cmp    $0x1,%eax
sete   %sil
lea    0xe68(%rip),%rdi
call   1050 <check@plt>
fldt   0x10(%rsp)
fchs
fstpt  (%rsp)
call   1060 <isinf@plt>
xor    %esi,%esi
cmp    $0xffffffff,%eax
sete   %sil
lea    0xe62(%rip),%rdi
call   1050 <check@plt>
fldt   0x40(%rsp)
fstpt  (%rsp)
call   1060 <isinf@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
lea    0xe61(%rip),%rdi
call   1050 <check@plt>
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1060 <isinf@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
lea    0xe58(%rip),%rdi
call   1050 <check@plt>
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1040 <isnan@plt>
lea    0xe59(%rip),%rdi
mov    %eax,%esi
call   1050 <check@plt>
fldt   0x20(%rsp)
fchs
fstpt  (%rsp)
call   1040 <isnan@plt>
lea    0xe55(%rip),%rdi
mov    %eax,%esi
call   1050 <check@plt>
fldt   0x40(%rsp)
fstpt  (%rsp)
call   1040 <isnan@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
lea    0xe4c(%rip),%rdi
call   1050 <check@plt>
fldt   0x10(%rsp)
fstpt  (%rsp)
call   1040 <isnan@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
lea    0xe43(%rip),%rdi
call   1050 <check@plt>
fldt   0x10(%rsp)
fldt   0x10(%rsp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setnp  %al
sete   %cl
and    %al,%cl
movzbl %cl,%esi
lea    0xe37(%rip),%rdi
call   1050 <check@plt>
fldt   0x10(%rsp)
fldt   0x10(%rsp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setnp  %al
sete   %cl
and    %al,%cl
movzbl %cl,%esi
lea    0xe29(%rip),%rdi
call   1050 <check@plt>
fldt   0x10(%rsp)
fldt   0x10(%rsp)
fchs
fucomip %st(1),%st
fstp   %st(0)
setp   %al
setne  %cl
or     %al,%cl
movzbl %cl,%esi
lea    0xe1d(%rip),%rdi
call   1050 <check@plt>
fldt   0x20(%rsp)
fldt   0x20(%rsp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setp   %al
setne  %cl
or     %al,%cl
movzbl %cl,%esi
lea    0xe10(%rip),%rdi
call   1050 <check@plt>
mov    0x2ce7(%rip),%rbx
fldt   (%rbx)
fstpt  (%rsp)
call   1040 <isnan@plt>
lea    0xe0a(%rip),%rbp
mov    %rbp,%rdi
mov    %eax,%esi
call   1050 <check@plt>
fldt   (%rbx)
fchs
fstpt  (%rsp)
call   1040 <isnan@plt>
lea    0xe05(%rip),%r13
mov    %r13,%rdi
mov    %eax,%esi
call   1050 <check@plt>
fldt   (%rbx)
fstpt  (%rsp)
call   1060 <isinf@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
lea    0xdfb(%rip),%r12
mov    %r12,%rdi
call   1050 <check@plt>
fldt   (%rbx)
fchs
fstpt  (%rsp)
call   1060 <isinf@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
lea    0xdf1(%rip),%r15
mov    %r15,%rdi
call   1050 <check@plt>
fldt   (%rbx)
xor    %esi,%esi
fucomip %st(0),%st
setp   %sil
lea    0xdf2(%rip),%r14
mov    %r14,%rdi
call   1050 <check@plt>
lea    0xca5(%rip),%rbx
mov    %rbx,%rdi
call   1030 <nanl@plt>
fstpt  (%rsp)
call   1040 <isnan@plt>
mov    %rbp,%rdi
mov    %eax,%esi
call   1050 <check@plt>
mov    %rbx,%rdi
call   1030 <nanl@plt>
fchs
fstpt  (%rsp)
call   1040 <isnan@plt>
mov    %r13,%rdi
mov    %eax,%esi
call   1050 <check@plt>
mov    %rbx,%rdi
call   1030 <nanl@plt>
fstpt  (%rsp)
call   1060 <isinf@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
mov    %r12,%rdi
call   1050 <check@plt>
mov    %rbx,%rdi
call   1030 <nanl@plt>
fchs
fstpt  (%rsp)
call   1060 <isinf@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
mov    %r15,%rdi
call   1050 <check@plt>
mov    %rbx,%rdi
call   1030 <nanl@plt>
fstpt  0x6c(%rsp)
mov    %rbx,%rdi
call   1030 <nanl@plt>
fldt   0x6c(%rsp)
fucomip %st(1),%st
fstp   %st(0)
setp   %al
setne  %cl
or     %al,%cl
movzbl %cl,%esi
mov    %r14,%rdi
call   1050 <check@plt>
mov    0x2b6d(%rip),%rbx
fldt   (%rbx)
fldt   0x34(%rsp)
fadd   %st,%st(1)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setp   %al
setne  %cl
or     %al,%cl
movzbl %cl,%esi
lea    0xd2c(%rip),%rdi
call   1050 <check@plt>
fldt   (%rbx)
fldt   0x34(%rsp)
fsub   %st,%st(1)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setp   %al
setne  %cl
or     %al,%cl
movzbl %cl,%esi
lea    0xd22(%rip),%rdi
call   1050 <check@plt>
mov    0x2b3c(%rip),%rbx
fldt   (%rbx)
fstpt  (%rsp)
call   1060 <isinf@plt>
xor    %esi,%esi
cmp    $0x1,%eax
sete   %sil
lea    0xd17(%rip),%rdi
call   1050 <check@plt>
fldt   (%rbx)
fchs
fstpt  (%rsp)
call   1060 <isinf@plt>
xor    %esi,%esi
cmp    $0xffffffff,%eax
sete   %sil
lea    0xd1a(%rip),%rdi
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <check@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"long double isinf (inf) == 1\00"
@.str.1 = [31 x i8] c"long double isinf (-inf) == -1\00"
@.str.2 = [23 x i8] c"long double !isinf (1)\00"
@.str.3 = [25 x i8] c"long double !isinf (NaN)\00"
@.str.4 = [24 x i8] c"long double isnan (NaN)\00"
@.str.5 = [25 x i8] c"long double isnan (-NaN)\00"
@.str.6 = [23 x i8] c"long double !isnan (1)\00"
@.str.7 = [25 x i8] c"long double !isnan (inf)\00"
@.str.8 = [23 x i8] c"long double inf == inf\00"
@.str.9 = [25 x i8] c"long double -inf == -inf\00"
@.str.10 = [24 x i8] c"long double inf != -inf\00"
@.str.11 = [23 x i8] c"long double NaN != NaN\00"
@.str.12 = [24 x i8] c"long double isnan (NAN)\00"
@NAN = global x86_fp80 0xK00000000000000000000
@.str.13 = [25 x i8] c"long double isnan (-NAN)\00"
@.str.14 = [25 x i8] c"long double !isinf (NAN)\00"
@.str.15 = [26 x i8] c"long double !isinf (-NAN)\00"
@.str.16 = [23 x i8] c"long double NAN != NAN\00"
@.str.17 = [1 x i8] zeroinitializer
@LDBL_EPSILON = global x86_fp80 0xK00000000000000000000
@.str.18 = [27 x i8] c"long double 1 != 1+EPSILON\00"
@.str.19 = [27 x i8] c"long double 1 != 1-EPSILON\00"
@HUGE_VALL = global x86_fp80 0xK00000000000000000000
@.str.20 = [36 x i8] c"long double isinf (HUGE_VALx) == +1\00"
@.str.21 = [37 x i8] c"long double isinf (-HUGE_VALx) == -1\00"
define void @ldouble_test() {
%1 = alloca x86_fp80
%2 = alloca x86_fp80
%3 = alloca x86_fp80
%4 = alloca x86_fp80
%5 = alloca x86_fp80
%6 = alloca x86_fp80
store volatile x86_fp80 0xK00000000000000000000, x86_fp80* %3
store volatile x86_fp80 0xK3FFF8000000000000000, x86_fp80* %4
%7 = load volatile x86_fp80, x86_fp80* %3
%8 = load volatile x86_fp80, x86_fp80* %3
%9 = fdiv x86_fp80 %7, %8
store volatile x86_fp80 %9, x86_fp80* %2
%10 = load volatile x86_fp80, x86_fp80* %4
%11 = load volatile x86_fp80, x86_fp80* %3
%12 = fdiv x86_fp80 %10, %11
store volatile x86_fp80 %12, x86_fp80* %1
%13 = load volatile x86_fp80, x86_fp80* %1
%14 = call i32 @isinf(x86_fp80 %13)
%15 = icmp eq i32 %14, 1
%16 = zext i1 %15 to i32
%17 = call i32 @check(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = load volatile x86_fp80, x86_fp80* %1
%19 = fneg x86_fp80 %18
%20 = call i32 @isinf(x86_fp80 %19)
%21 = icmp eq i32 %20, -1
%22 = zext i1 %21 to i32
%23 = call i32 @check(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %22)
%24 = load volatile x86_fp80, x86_fp80* %4
%25 = call i32 @isinf(x86_fp80 %24)
%26 = icmp ne i32 %25, 0
%27 = xor i1 %26, true
%28 = zext i1 %27 to i32
%29 = call i32 @check(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %28)
%30 = load volatile x86_fp80, x86_fp80* %2
%31 = call i32 @isinf(x86_fp80 %30)
%32 = icmp ne i32 %31, 0
%33 = xor i1 %32, true
%34 = zext i1 %33 to i32
%35 = call i32 @check(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 %34)
%36 = load volatile x86_fp80, x86_fp80* %2
%37 = call i32 @isnan(x86_fp80 %36)
%38 = call i32 @check(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %37)
%39 = load volatile x86_fp80, x86_fp80* %2
%40 = fneg x86_fp80 %39
%41 = call i32 @isnan(x86_fp80 %40)
%42 = call i32 @check(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %41)
%43 = load volatile x86_fp80, x86_fp80* %4
%44 = call i32 @isnan(x86_fp80 %43)
%45 = icmp ne i32 %44, 0
%46 = xor i1 %45, true
%47 = zext i1 %46 to i32
%48 = call i32 @check(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %47)
%49 = load volatile x86_fp80, x86_fp80* %1
%50 = call i32 @isnan(x86_fp80 %49)
%51 = icmp ne i32 %50, 0
%52 = xor i1 %51, true
%53 = zext i1 %52 to i32
%54 = call i32 @check(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i32 %53)
%55 = load volatile x86_fp80, x86_fp80* %1
%56 = load volatile x86_fp80, x86_fp80* %1
%57 = fcmp oeq x86_fp80 %55, %56
%58 = zext i1 %57 to i32
%59 = call i32 @check(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %58)
%60 = load volatile x86_fp80, x86_fp80* %1
%61 = fneg x86_fp80 %60
%62 = load volatile x86_fp80, x86_fp80* %1
%63 = fneg x86_fp80 %62
%64 = fcmp oeq x86_fp80 %61, %63
%65 = zext i1 %64 to i32
%66 = call i32 @check(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i32 %65)
%67 = load volatile x86_fp80, x86_fp80* %1
%68 = load volatile x86_fp80, x86_fp80* %1
%69 = fneg x86_fp80 %68
%70 = fcmp une x86_fp80 %67, %69
%71 = zext i1 %70 to i32
%72 = call i32 @check(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0), i32 %71)
%73 = load volatile x86_fp80, x86_fp80* %2
%74 = load volatile x86_fp80, x86_fp80* %2
%75 = fcmp une x86_fp80 %73, %74
%76 = zext i1 %75 to i32
%77 = call i32 @check(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0), i32 %76)
%78 = load x86_fp80, x86_fp80* @NAN
%79 = call i32 @isnan(x86_fp80 %78)
%80 = call i32 @check(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i32 %79)
%81 = load x86_fp80, x86_fp80* @NAN
%82 = fneg x86_fp80 %81
%83 = call i32 @isnan(x86_fp80 %82)
%84 = call i32 @check(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), i32 %83)
%85 = load x86_fp80, x86_fp80* @NAN
%86 = call i32 @isinf(x86_fp80 %85)
%87 = icmp ne i32 %86, 0
%88 = xor i1 %87, true
%89 = zext i1 %88 to i32
%90 = call i32 @check(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0), i32 %89)
%91 = load x86_fp80, x86_fp80* @NAN
%92 = fneg x86_fp80 %91
%93 = call i32 @isinf(x86_fp80 %92)
%94 = icmp ne i32 %93, 0
%95 = xor i1 %94, true
%96 = zext i1 %95 to i32
%97 = call i32 @check(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i64 0, i64 0), i32 %96)
%98 = load x86_fp80, x86_fp80* @NAN
%99 = load x86_fp80, x86_fp80* @NAN
%100 = fcmp une x86_fp80 %98, %99
%101 = zext i1 %100 to i32
%102 = call i32 @check(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0), i32 %101)
%103 = call x86_fp80 @nanl(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0))
%104 = call i32 @isnan(x86_fp80 %103)
%105 = call i32 @check(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i32 %104)
%106 = call x86_fp80 @nanl(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0))
%107 = fneg x86_fp80 %106
%108 = call i32 @isnan(x86_fp80 %107)
%109 = call i32 @check(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), i32 %108)
%110 = call x86_fp80 @nanl(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0))
%111 = call i32 @isinf(x86_fp80 %110)
%112 = icmp ne i32 %111, 0
%113 = xor i1 %112, true
%114 = zext i1 %113 to i32
%115 = call i32 @check(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0), i32 %114)
%116 = call x86_fp80 @nanl(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0))
%117 = fneg x86_fp80 %116
%118 = call i32 @isinf(x86_fp80 %117)
%119 = icmp ne i32 %118, 0
%120 = xor i1 %119, true
%121 = zext i1 %120 to i32
%122 = call i32 @check(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i64 0, i64 0), i32 %121)
%123 = call x86_fp80 @nanl(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0))
%124 = call x86_fp80 @nanl(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0))
%125 = fcmp une x86_fp80 %123, %124
%126 = zext i1 %125 to i32
%127 = call i32 @check(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0), i32 %126)
store x86_fp80 0xK3FFF8000000000000000, x86_fp80* %5
%128 = load x86_fp80, x86_fp80* %5
%129 = load x86_fp80, x86_fp80* @LDBL_EPSILON
%130 = fadd x86_fp80 %128, %129
store x86_fp80 %130, x86_fp80* %6
%131 = load x86_fp80, x86_fp80* %5
%132 = load x86_fp80, x86_fp80* %6
%133 = fcmp une x86_fp80 %131, %132
%134 = zext i1 %133 to i32
%135 = call i32 @check(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.18, i64 0, i64 0), i32 %134)
store x86_fp80 0xK3FFF8000000000000000, x86_fp80* %5
%136 = load x86_fp80, x86_fp80* %5
%137 = load x86_fp80, x86_fp80* @LDBL_EPSILON
%138 = fsub x86_fp80 %136, %137
store x86_fp80 %138, x86_fp80* %6
%139 = load x86_fp80, x86_fp80* %5
%140 = load x86_fp80, x86_fp80* %6
%141 = fcmp une x86_fp80 %139, %140
%142 = zext i1 %141 to i32
%143 = call i32 @check(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.19, i64 0, i64 0), i32 %142)
%144 = load x86_fp80, x86_fp80* @HUGE_VALL
store x86_fp80 %144, x86_fp80* %5
%145 = load x86_fp80, x86_fp80* %5
%146 = call i32 @isinf(x86_fp80 %145)
%147 = icmp eq i32 %146, 1
%148 = zext i1 %147 to i32
%149 = call i32 @check(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.20, i64 0, i64 0), i32 %148)
%150 = load x86_fp80, x86_fp80* @HUGE_VALL
%151 = fneg x86_fp80 %150
store x86_fp80 %151, x86_fp80* %5
%152 = load x86_fp80, x86_fp80* %5
%153 = call i32 @isinf(x86_fp80 %152)
%154 = icmp eq i32 %153, -1
%155 = zext i1 %154 to i32
%156 = call i32 @check(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.21, i64 0, i64 0), i32 %155)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"long double isinf (inf) == 1\00"
@.str.1 = [31 x i8] c"long double isinf (-inf) == -1\00"
@.str.2 = [23 x i8] c"long double !isinf (1)\00"
@.str.3 = [25 x i8] c"long double !isinf (NaN)\00"
@.str.4 = [24 x i8] c"long double isnan (NaN)\00"
@.str.5 = [25 x i8] c"long double isnan (-NaN)\00"
@.str.6 = [23 x i8] c"long double !isnan (1)\00"
@.str.7 = [25 x i8] c"long double !isnan (inf)\00"
@.str.8 = [23 x i8] c"long double inf == inf\00"
@.str.9 = [25 x i8] c"long double -inf == -inf\00"
@.str.10 = [24 x i8] c"long double inf != -inf\00"
@.str.11 = [23 x i8] c"long double NaN != NaN\00"
@.str.12 = [24 x i8] c"long double isnan (NAN)\00"
@NAN = global x86_fp80 0xK00000000000000000000
@.str.13 = [25 x i8] c"long double isnan (-NAN)\00"
@.str.14 = [25 x i8] c"long double !isinf (NAN)\00"
@.str.15 = [26 x i8] c"long double !isinf (-NAN)\00"
@.str.16 = [23 x i8] c"long double NAN != NAN\00"
@.str.17 = [1 x i8] zeroinitializer
@LDBL_EPSILON = global x86_fp80 0xK00000000000000000000
@.str.18 = [27 x i8] c"long double 1 != 1+EPSILON\00"
@.str.19 = [27 x i8] c"long double 1 != 1-EPSILON\00"
@HUGE_VALL = global x86_fp80 0xK00000000000000000000
@.str.20 = [36 x i8] c"long double isinf (HUGE_VALx) == +1\00"
@.str.21 = [37 x i8] c"long double isinf (-HUGE_VALx) == -1\00"
define void @ldouble_test() {
%1 = alloca x86_fp80
%2 = alloca x86_fp80
%3 = alloca x86_fp80
%4 = alloca x86_fp80
%5 = bitcast x86_fp80* %1 to i8*
%6 = bitcast x86_fp80* %2 to i8*
%7 = bitcast x86_fp80* %3 to i8*
%8 = bitcast x86_fp80* %4 to i8*
store volatile x86_fp80 0xK00000000000000000000, x86_fp80* %3
store volatile x86_fp80 0xK3FFF8000000000000000, x86_fp80* %4
%9 = load volatile x86_fp80, x86_fp80* %3
%10 = load volatile x86_fp80, x86_fp80* %3
%11 = fdiv x86_fp80 %9, %10
store volatile x86_fp80 %11, x86_fp80* %2
%12 = load volatile x86_fp80, x86_fp80* %4
%13 = load volatile x86_fp80, x86_fp80* %3
%14 = fdiv x86_fp80 %12, %13
store volatile x86_fp80 %14, x86_fp80* %1
%15 = load volatile x86_fp80, x86_fp80* %1
%16 = tail call i32 @isinf(x86_fp80 %15)
%17 = icmp eq i32 %16, 1
%18 = zext i1 %17 to i32
%19 = tail call i32 @check(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = load volatile x86_fp80, x86_fp80* %1
%21 = fneg x86_fp80 %20
%22 = tail call i32 @isinf(x86_fp80 %21)
%23 = icmp eq i32 %22, -1
%24 = zext i1 %23 to i32
%25 = tail call i32 @check(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %24)
%26 = load volatile x86_fp80, x86_fp80* %4
%27 = tail call i32 @isinf(x86_fp80 %26)
%28 = icmp eq i32 %27, 0
%29 = zext i1 %28 to i32
%30 = tail call i32 @check(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %29)
%31 = load volatile x86_fp80, x86_fp80* %2
%32 = tail call i32 @isinf(x86_fp80 %31)
%33 = icmp eq i32 %32, 0
%34 = zext i1 %33 to i32
%35 = tail call i32 @check(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 %34)
%36 = load volatile x86_fp80, x86_fp80* %2
%37 = tail call i32 @isnan(x86_fp80 %36)
%38 = tail call i32 @check(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %37)
%39 = load volatile x86_fp80, x86_fp80* %2
%40 = fneg x86_fp80 %39
%41 = tail call i32 @isnan(x86_fp80 %40)
%42 = tail call i32 @check(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %41)
%43 = load volatile x86_fp80, x86_fp80* %4
%44 = tail call i32 @isnan(x86_fp80 %43)
%45 = icmp eq i32 %44, 0
%46 = zext i1 %45 to i32
%47 = tail call i32 @check(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %46)
%48 = load volatile x86_fp80, x86_fp80* %1
%49 = tail call i32 @isnan(x86_fp80 %48)
%50 = icmp eq i32 %49, 0
%51 = zext i1 %50 to i32
%52 = tail call i32 @check(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i32 %51)
%53 = load volatile x86_fp80, x86_fp80* %1
%54 = load volatile x86_fp80, x86_fp80* %1
%55 = fcmp oeq x86_fp80 %53, %54
%56 = zext i1 %55 to i32
%57 = tail call i32 @check(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %56)
%58 = load volatile x86_fp80, x86_fp80* %1
%59 = load volatile x86_fp80, x86_fp80* %1
%60 = fcmp oeq x86_fp80 %58, %59
%61 = zext i1 %60 to i32
%62 = tail call i32 @check(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i32 %61)
%63 = load volatile x86_fp80, x86_fp80* %1
%64 = load volatile x86_fp80, x86_fp80* %1
%65 = fneg x86_fp80 %64
%66 = fcmp une x86_fp80 %63, %65
%67 = zext i1 %66 to i32
%68 = tail call i32 @check(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0), i32 %67)
%69 = load volatile x86_fp80, x86_fp80* %2
%70 = load volatile x86_fp80, x86_fp80* %2
%71 = fcmp une x86_fp80 %69, %70
%72 = zext i1 %71 to i32
%73 = tail call i32 @check(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0), i32 %72)
%74 = load x86_fp80, x86_fp80* @NAN
%75 = tail call i32 @isnan(x86_fp80 %74)
%76 = tail call i32 @check(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i32 %75)
%77 = load x86_fp80, x86_fp80* @NAN
%78 = fneg x86_fp80 %77
%79 = tail call i32 @isnan(x86_fp80 %78)
%80 = tail call i32 @check(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), i32 %79)
%81 = load x86_fp80, x86_fp80* @NAN
%82 = tail call i32 @isinf(x86_fp80 %81)
%83 = icmp eq i32 %82, 0
%84 = zext i1 %83 to i32
%85 = tail call i32 @check(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0), i32 %84)
%86 = load x86_fp80, x86_fp80* @NAN
%87 = fneg x86_fp80 %86
%88 = tail call i32 @isinf(x86_fp80 %87)
%89 = icmp eq i32 %88, 0
%90 = zext i1 %89 to i32
%91 = tail call i32 @check(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i64 0, i64 0), i32 %90)
%92 = load x86_fp80, x86_fp80* @NAN
%93 = fcmp uno x86_fp80 %92, 0xK00000000000000000000
%94 = zext i1 %93 to i32
%95 = tail call i32 @check(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0), i32 %94)
%96 = tail call x86_fp80 @nanl(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0))
%97 = tail call i32 @isnan(x86_fp80 %96)
%98 = tail call i32 @check(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i32 %97)
%99 = tail call x86_fp80 @nanl(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0))
%100 = fneg x86_fp80 %99
%101 = tail call i32 @isnan(x86_fp80 %100)
%102 = tail call i32 @check(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), i32 %101)
%103 = tail call x86_fp80 @nanl(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0))
%104 = tail call i32 @isinf(x86_fp80 %103)
%105 = icmp eq i32 %104, 0
%106 = zext i1 %105 to i32
%107 = tail call i32 @check(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0), i32 %106)
%108 = tail call x86_fp80 @nanl(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0))
%109 = fneg x86_fp80 %108
%110 = tail call i32 @isinf(x86_fp80 %109)
%111 = icmp eq i32 %110, 0
%112 = zext i1 %111 to i32
%113 = tail call i32 @check(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i64 0, i64 0), i32 %112)
%114 = tail call x86_fp80 @nanl(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0))
%115 = tail call x86_fp80 @nanl(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0))
%116 = fcmp une x86_fp80 %114, %115
%117 = zext i1 %116 to i32
%118 = tail call i32 @check(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0), i32 %117)
%119 = load x86_fp80, x86_fp80* @LDBL_EPSILON
%120 = fadd x86_fp80 %119, 0xK3FFF8000000000000000
%121 = fcmp une x86_fp80 %120, 0xK3FFF8000000000000000
%122 = zext i1 %121 to i32
%123 = tail call i32 @check(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.18, i64 0, i64 0), i32 %122)
%124 = load x86_fp80, x86_fp80* @LDBL_EPSILON
%125 = fsub x86_fp80 0xK3FFF8000000000000000, %124
%126 = fcmp une x86_fp80 %125, 0xK3FFF8000000000000000
%127 = zext i1 %126 to i32
%128 = tail call i32 @check(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.19, i64 0, i64 0), i32 %127)
%129 = load x86_fp80, x86_fp80* @HUGE_VALL
%130 = tail call i32 @isinf(x86_fp80 %129)
%131 = icmp eq i32 %130, 1
%132 = zext i1 %131 to i32
%133 = tail call i32 @check(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.20, i64 0, i64 0), i32 %132)
%134 = load x86_fp80, x86_fp80* @HUGE_VALL
%135 = fneg x86_fp80 %134
%136 = tail call i32 @isinf(x86_fp80 %135)
%137 = icmp eq i32 %136, -1
%138 = zext i1 %137 to i32
%139 = tail call i32 @check(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.21, i64 0, i64 0), i32 %138)
ret void
}