#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;
double HUGE_VAL;
double NAN;
int /*<<< orphan*/ check(char *, int);
int isinf(double volatile);
int isnan(double volatile);
double nan(char *);
void double_test(void) {
  volatile double Inf_var, NaN_var, zero_var, one_var;
  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("double"
        " isinf (inf) == 1",
        isinf(Inf_var) == 1);
  check("double"
        " isinf (-inf) == -1",
        isinf(-Inf_var) == -1);
  check("double"
        " !isinf (1)",
        !(isinf(one_var)));
  check("double"
        " !isinf (NaN)",
        !(isinf(NaN_var)));
  check("double"
        " isnan (NaN)",
        isnan(NaN_var));
  check("double"
        " isnan (-NaN)",
        isnan(-NaN_var));
  check("double"
        " !isnan (1)",
        !(isnan(one_var)));
  check("double"
        " !isnan (inf)",
        !(isnan(Inf_var)));
  check("double"
        " inf == inf",
        Inf_var == Inf_var);
  check("double"
        " -inf == -inf",
        -Inf_var == -Inf_var);
  check("double"
        " inf != -inf",
        Inf_var != -Inf_var);
  check("double"
        " NaN != NaN",
        NaN_var != NaN_var);
  check("double"
        " isnan (NAN)",
        isnan(NAN));
  check("double"
        " isnan (-NAN)",
        isnan(-NAN));
  check("double"
        " !isinf (NAN)",
        !(isinf(NAN)));
  check("double"
        " !isinf (-NAN)",
        !(isinf(-NAN)));
  check("double"
        " NAN != NAN",
        NAN != NAN);
  check("double"
        " isnan (NAN)",
        isnan(nan("")));
  check("double"
        " isnan (-NAN)",
        isnan(-nan("")));
  check("double"
        " !isinf (NAN)",
        !(isinf(nan(""))));
  check("double"
        " !isinf (-NAN)",
        !(isinf(-nan(""))));
  check("double"
        " NAN != NAN",
        nan("") != nan(""));
  x1 = 1.0;
  x2 = x1 + DBL_EPSILON;
  check("double"
        " 1 != 1+EPSILON",
        x1 != x2);
  x1 = 1.0;
  x2 = x1 - DBL_EPSILON;
  check("double"
        " 1 != 1-EPSILON",
        x1 != x2);
  x1 = HUGE_VAL;
  check("double"
        " isinf (HUGE_VALx) == +1",
        isinf(x1) == +1);
  x1 = -HUGE_VAL;
  check("double"
        " isinf (-HUGE_VALx) == -1",
        isinf(x1) == -1);
}


x86 assembly (clang, -O0):
<double_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xea8(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1060 <isinf@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe69(%rip),%rdi
call   1050 <check@plt>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1060 <isinf@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe49(%rip),%rdi
call   1050 <check@plt>
movsd  -0x20(%rbp),%xmm0
call   1060 <isinf@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xe40(%rip),%rdi
call   1050 <check@plt>
movsd  -0x10(%rbp),%xmm0
call   1060 <isinf@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xe2f(%rip),%rdi
call   1050 <check@plt>
movsd  -0x10(%rbp),%xmm0
call   1040 <isnan@plt>
mov    %eax,%esi
lea    0xe2b(%rip),%rdi
call   1050 <check@plt>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1040 <isnan@plt>
mov    %eax,%esi
lea    0xe0f(%rip),%rdi
call   1050 <check@plt>
movsd  -0x20(%rbp),%xmm0
call   1040 <isnan@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xe00(%rip),%rdi
call   1050 <check@plt>
movsd  -0x8(%rbp),%xmm0
call   1040 <isnan@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xdef(%rip),%rdi
call   1050 <check@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xddc(%rip),%rdi
call   1050 <check@plt>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x8(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xd99(%rip),%rdi
call   1050 <check@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
ucomisd %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xd6f(%rip),%rdi
call   1050 <check@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
ucomisd %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xd5b(%rip),%rdi
call   1050 <check@plt>
mov    0x2c61(%rip),%rax
movsd  (%rax),%xmm0
call   1040 <isnan@plt>
mov    %eax,%esi
lea    0xd4f(%rip),%rdi
call   1050 <check@plt>
mov    0x2c43(%rip),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1040 <isnan@plt>
mov    %eax,%esi
lea    0xd2d(%rip),%rdi
call   1050 <check@plt>
mov    0x2c0e(%rip),%rax
movsd  (%rax),%xmm0
call   1060 <isinf@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xd18(%rip),%rdi
call   1050 <check@plt>
mov    0x2be5(%rip),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1060 <isinf@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xcec(%rip),%rdi
call   1050 <check@plt>
mov    0x2ba5(%rip),%rax
movsd  (%rax),%xmm0
mov    0x2b9a(%rip),%rax
ucomisd (%rax),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xcd2(%rip),%rdi
call   1050 <check@plt>
lea    0xbc9(%rip),%rdi
call   1030 <nan@plt>
call   1040 <isnan@plt>
mov    %eax,%esi
lea    0xc63(%rip),%rdi
call   1050 <check@plt>
lea    0xbaa(%rip),%rdi
call   1030 <nan@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1040 <isnan@plt>
mov    %eax,%esi
lea    0xc40(%rip),%rdi
call   1050 <check@plt>
lea    0xb74(%rip),%rdi
call   1030 <nan@plt>
call   1060 <isinf@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xc2a(%rip),%rdi
call   1050 <check@plt>
lea    0xb4a(%rip),%rdi
call   1030 <nan@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1060 <isinf@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xbfd(%rip),%rdi
call   1050 <check@plt>
lea    0xb09(%rip),%rdi
call   1030 <nan@plt>
movsd  %xmm0,-0x38(%rbp)
lea    0xaf8(%rip),%rdi
call   1030 <nan@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
ucomisd %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xbd0(%rip),%rdi
call   1050 <check@plt>
movsd  0xa7b(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    0x2a4a(%rip),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xb9d(%rip),%rdi
call   1050 <check@plt>
movsd  0xa36(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    0x2a05(%rip),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xb6e(%rip),%rdi
call   1050 <check@plt>
mov    0x29ca(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1060 <isinf@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xb53(%rip),%rdi
call   1050 <check@plt>
mov    0x2999(%rip),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1060 <isinf@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xb2a(%rip),%rdi
call   1050 <check@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_test>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movq   $0x0,0x18(%rsp)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
divsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
divsd  0x18(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%rsp),%xmm0
call   1060 <isinf@plt>
xor    %esi,%esi
cmp    $0x1,%eax
sete   %sil
lea    0xe75(%rip),%rdi
call   1050 <check@plt>
movsd  (%rsp),%xmm0
xorps  0xe4c(%rip),%xmm0
call   1060 <isinf@plt>
xor    %esi,%esi
cmp    $0xffffffff,%eax
sete   %sil
lea    0xe67(%rip),%rdi
call   1050 <check@plt>
movsd  0x10(%rsp),%xmm0
call   1060 <isinf@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
lea    0xe62(%rip),%rdi
call   1050 <check@plt>
movsd  0x8(%rsp),%xmm0
call   1060 <isinf@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
lea    0xe55(%rip),%rdi
call   1050 <check@plt>
movsd  0x8(%rsp),%xmm0
call   1040 <isnan@plt>
lea    0xe52(%rip),%rdi
mov    %eax,%esi
call   1050 <check@plt>
movsd  0x8(%rsp),%xmm0
xorps  0xdce(%rip),%xmm0
call   1040 <isnan@plt>
lea    0xe45(%rip),%rdi
mov    %eax,%esi
call   1050 <check@plt>
movsd  0x10(%rsp),%xmm0
call   1040 <isnan@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
lea    0xe38(%rip),%rdi
call   1050 <check@plt>
movsd  (%rsp),%xmm0
call   1040 <isnan@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
lea    0xe2c(%rip),%rdi
call   1050 <check@plt>
movsd  (%rsp),%xmm0
cmpeqsd (%rsp),%xmm0
movq   %xmm0,%rsi
and    $0x1,%esi
lea    0xe21(%rip),%rdi
call   1050 <check@plt>
movsd  (%rsp),%xmm0
cmpeqsd (%rsp),%xmm0
movq   %xmm0,%rsi
and    $0x1,%esi
lea    0xe14(%rip),%rdi
call   1050 <check@plt>
movsd  (%rsp),%xmm0
movsd  (%rsp),%xmm1
xorpd  0xd2e(%rip),%xmm1
cmpneqsd %xmm0,%xmm1
movq   %xmm1,%rsi
and    $0x1,%esi
lea    0xdfd(%rip),%rdi
call   1050 <check@plt>
movsd  0x8(%rsp),%xmm0
cmpneqsd 0x8(%rsp),%xmm0
movq   %xmm0,%rsi
and    $0x1,%esi
lea    0xdef(%rip),%rdi
call   1050 <check@plt>
mov    0x2ce5(%rip),%rbx
movsd  (%rbx),%xmm0
call   1040 <isnan@plt>
lea    0xde5(%rip),%rbp
mov    %rbp,%rdi
mov    %eax,%esi
call   1050 <check@plt>
movsd  (%rbx),%xmm0
xorps  0xcc8(%rip),%xmm0
call   1040 <isnan@plt>
lea    0xdd7(%rip),%r13
mov    %r13,%rdi
mov    %eax,%esi
call   1050 <check@plt>
movsd  (%rbx),%xmm0
call   1060 <isinf@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
lea    0xdc9(%rip),%r12
mov    %r12,%rdi
call   1050 <check@plt>
movsd  (%rbx),%xmm0
xorps  0xc87(%rip),%xmm0
call   1060 <isinf@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
lea    0xdb6(%rip),%r15
mov    %r15,%rdi
call   1050 <check@plt>
movsd  (%rbx),%xmm0
xor    %esi,%esi
ucomisd %xmm0,%xmm0
setp   %sil
lea    0xdae(%rip),%r14
mov    %r14,%rdi
call   1050 <check@plt>
lea    0xca2(%rip),%rbx
mov    %rbx,%rdi
call   1030 <nan@plt>
call   1040 <isnan@plt>
mov    %rbp,%rdi
mov    %eax,%esi
call   1050 <check@plt>
mov    %rbx,%rdi
call   1030 <nan@plt>
xorpd  0xc20(%rip),%xmm0
call   1040 <isnan@plt>
mov    %r13,%rdi
mov    %eax,%esi
call   1050 <check@plt>
mov    %rbx,%rdi
call   1030 <nan@plt>
call   1060 <isinf@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
mov    %r12,%rdi
call   1050 <check@plt>
mov    %rbx,%rdi
call   1030 <nan@plt>
xorpd  0xbe4(%rip),%xmm0
call   1060 <isinf@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
mov    %r15,%rdi
call   1050 <check@plt>
mov    %rbx,%rdi
call   1030 <nan@plt>
movsd  %xmm0,0x20(%rsp)
mov    %rbx,%rdi
call   1030 <nan@plt>
cmpneqsd 0x20(%rsp),%xmm0
movq   %xmm0,%rsi
and    $0x1,%esi
mov    %r14,%rdi
call   1050 <check@plt>
mov    0x2b7b(%rip),%rbx
movsd  0xba3(%rip),%xmm1
movsd  (%rbx),%xmm0
addsd  %xmm1,%xmm0
cmpneqsd %xmm1,%xmm0
movq   %xmm0,%rsi
and    $0x1,%esi
lea    0xce1(%rip),%rdi
call   1050 <check@plt>
movsd  0xb7a(%rip),%xmm1
movapd %xmm1,%xmm0
subsd  (%rbx),%xmm0
cmpneqsd %xmm1,%xmm0
movq   %xmm0,%rsi
and    $0x1,%esi
lea    0xcce(%rip),%rdi
call   1050 <check@plt>
mov    0x2b1a(%rip),%rbx
movsd  (%rbx),%xmm0
call   1060 <isinf@plt>
xor    %esi,%esi
cmp    $0x1,%eax
sete   %sil
lea    0xcbf(%rip),%rdi
call   1050 <check@plt>
movsd  (%rbx),%xmm0
xorps  0xb19(%rip),%xmm0
call   1060 <isinf@plt>
xor    %esi,%esi
cmp    $0xffffffff,%eax
sete   %sil
lea    0xcb9(%rip),%rdi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <check@plt>

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

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