#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 */
typedef int /*<<< orphan*/ data;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ test_isgreater(double, double, unsigned int);
int /*<<< orphan*/ test_isgreaterequal(double, double, unsigned int);
int /*<<< orphan*/ test_isless(double, double, unsigned int);
int /*<<< orphan*/ test_islessequal(double, double, unsigned int);
int /*<<< orphan*/ test_islessgreater(double, double, unsigned int);
int /*<<< orphan*/ test_isunordered(double, double, unsigned int);
int main() {
  struct try {
    double x, y;
    unsigned unord : 1;
    unsigned lt : 1;
    unsigned le : 1;
    unsigned gt : 1;
    unsigned ge : 1;
    unsigned lg : 1;
  };
  static struct try const data[] = {
      {(0.0 / 0.0), (0.0 / 0.0), 1, 0, 0, 0, 0, 0},
      {0.0, (0.0 / 0.0), 1, 0, 0, 0, 0, 0},
      {(0.0 / 0.0), 0.0, 1, 0, 0, 0, 0, 0},
      {0.0, 0.0, 0, 0, 1, 0, 1, 0},
      {1.0, 2.0, 0, 1, 1, 0, 0, 1},
      {2.0, 1.0, 0, 0, 0, 1, 1, 1},
  };
  const int n = sizeof(data) / sizeof(data[0]);
  int i;
  for (i = 0; i < n; ++i) {
    test_isunordered(data[i].x, data[i].y, data[i].unord);
    test_isless(data[i].x, data[i].y, data[i].lt);
    test_islessequal(data[i].x, data[i].y, data[i].le);
    test_isgreater(data[i].x, data[i].y, data[i].gt);
    test_isgreaterequal(data[i].x, data[i].y, data[i].ge);
    test_islessgreater(data[i].x, data[i].y, data[i].lg);
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x6,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x6,-0xc(%rbp)
jge    137c <main+0x20c>
movslq -0xc(%rbp),%rcx
lea    0xe5e(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
movslq -0xc(%rbp),%rcx
lea    0xe48(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm1
movslq -0xc(%rbp),%rcx
lea    0xe31(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    0x10(%rax),%al
and    $0x1,%al
movzbl %al,%edi
call   1070 <test_isunordered@plt>
movslq -0xc(%rbp),%rcx
lea    0xe12(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
movslq -0xc(%rbp),%rcx
lea    0xdfc(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm1
movslq -0xc(%rbp),%rcx
lea    0xde5(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    0x10(%rax),%al
shr    $0x1,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <test_isless@plt>
movslq -0xc(%rbp),%rcx
lea    0xdc3(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
movslq -0xc(%rbp),%rcx
lea    0xdad(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm1
movslq -0xc(%rbp),%rcx
lea    0xd96(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    0x10(%rax),%al
shr    $0x2,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <test_islessequal@plt>
movslq -0xc(%rbp),%rcx
lea    0xd74(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
movslq -0xc(%rbp),%rcx
lea    0xd5e(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm1
movslq -0xc(%rbp),%rcx
lea    0xd47(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    0x10(%rax),%al
shr    $0x3,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <test_isgreater@plt>
movslq -0xc(%rbp),%rcx
lea    0xd25(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
movslq -0xc(%rbp),%rcx
lea    0xd0f(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm1
movslq -0xc(%rbp),%rcx
lea    0xcf8(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    0x10(%rax),%al
shr    $0x4,%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <test_isgreaterequal@plt>
movslq -0xc(%rbp),%rcx
lea    0xcd6(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
movslq -0xc(%rbp),%rcx
lea    0xcc0(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm1
movslq -0xc(%rbp),%rcx
lea    0xca9(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    0x10(%rax),%al
shr    $0x5,%al
and    $0x1,%al
movzbl %al,%edi
call   1090 <test_islessgreater@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    118d <main+0x1d>
xor    %edi,%edi
call   1080 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    $0x10,%r14d
lea    0xe7a(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
movsd  -0x10(%r14,%r15,1),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  -0x8(%r14,%r15,1),%xmm1
movsd  %xmm1,(%rsp)
movzbl (%r14,%r15,1),%ebx
mov    %ebx,%edi
and    $0x1,%edi
call   1070 <test_isunordered@plt>
mov    %ebx,%edi
shr    %edi
and    $0x1,%edi
movsd  0x8(%rsp),%xmm0
movsd  (%rsp),%xmm1
call   1040 <test_isless@plt>
mov    %ebx,%edi
shr    $0x2,%edi
and    $0x1,%edi
movsd  0x8(%rsp),%xmm0
movsd  (%rsp),%xmm1
call   1030 <test_islessequal@plt>
mov    %ebx,%edi
shr    $0x3,%edi
and    $0x1,%edi
movsd  0x8(%rsp),%xmm0
movsd  (%rsp),%xmm1
call   1050 <test_isgreater@plt>
mov    %ebx,%edi
shr    $0x4,%edi
and    $0x1,%edi
movsd  0x8(%rsp),%xmm0
movsd  (%rsp),%xmm1
call   1060 <test_isgreaterequal@plt>
shr    $0x5,%ebx
and    $0x1,%ebx
movsd  0x8(%rsp),%xmm0
movsd  (%rsp),%xmm1
mov    %ebx,%edi
call   1090 <test_islessgreater@plt>
add    $0x18,%r14
cmp    $0xa0,%r14
jne    1190 <main+0x20>
xor    %edi,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
%struct.try = type { double, double, i8 }
@main.data = internal constant [6 x %struct.try] [%struct.try { double 0x7FF8000000000000, double 0x7FF8000000000000, i8 1 }, %struct.try { double 0.000000e+00, double 0x7FF8000000000000, i8 1 }, %struct.try { double 0x7FF8000000000000, double 0.000000e+00, i8 1 }, %struct.try { double 0.000000e+00, double 0.000000e+00, i8 20 }, %struct.try { double 1.000000e+00, double 2.000000e+00, i8 38 }, %struct.try { double 2.000000e+00, double 1.000000e+00, i8 56 }]
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 6, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %121, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 6
br i1 %6, label %7, label %124
7: ; preds = %4
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %9
%11 = getelementptr inbounds %struct.try, %struct.try* %10, i32 0, i32 0
%12 = load double, double* %11
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %14
%16 = getelementptr inbounds %struct.try, %struct.try* %15, i32 0, i32 1
%17 = load double, double* %16
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %19
%21 = getelementptr inbounds %struct.try, %struct.try* %20, i32 0, i32 2
%22 = load i8, i8* %21
%23 = and i8 %22, 1
%24 = zext i8 %23 to i32
%25 = call i32 @test_isunordered(double %12, double %17, i32 %24)
%26 = load i32, i32* %3
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %27
%29 = getelementptr inbounds %struct.try, %struct.try* %28, i32 0, i32 0
%30 = load double, double* %29
%31 = load i32, i32* %3
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %32
%34 = getelementptr inbounds %struct.try, %struct.try* %33, i32 0, i32 1
%35 = load double, double* %34
%36 = load i32, i32* %3
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %37
%39 = getelementptr inbounds %struct.try, %struct.try* %38, i32 0, i32 2
%40 = load i8, i8* %39
%41 = lshr i8 %40, 1
%42 = and i8 %41, 1
%43 = zext i8 %42 to i32
%44 = call i32 @test_isless(double %30, double %35, i32 %43)
%45 = load i32, i32* %3
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %46
%48 = getelementptr inbounds %struct.try, %struct.try* %47, i32 0, i32 0
%49 = load double, double* %48
%50 = load i32, i32* %3
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %51
%53 = getelementptr inbounds %struct.try, %struct.try* %52, i32 0, i32 1
%54 = load double, double* %53
%55 = load i32, i32* %3
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %56
%58 = getelementptr inbounds %struct.try, %struct.try* %57, i32 0, i32 2
%59 = load i8, i8* %58
%60 = lshr i8 %59, 2
%61 = and i8 %60, 1
%62 = zext i8 %61 to i32
%63 = call i32 @test_islessequal(double %49, double %54, i32 %62)
%64 = load i32, i32* %3
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %65
%67 = getelementptr inbounds %struct.try, %struct.try* %66, i32 0, i32 0
%68 = load double, double* %67
%69 = load i32, i32* %3
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %70
%72 = getelementptr inbounds %struct.try, %struct.try* %71, i32 0, i32 1
%73 = load double, double* %72
%74 = load i32, i32* %3
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %75
%77 = getelementptr inbounds %struct.try, %struct.try* %76, i32 0, i32 2
%78 = load i8, i8* %77
%79 = lshr i8 %78, 3
%80 = and i8 %79, 1
%81 = zext i8 %80 to i32
%82 = call i32 @test_isgreater(double %68, double %73, i32 %81)
%83 = load i32, i32* %3
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %84
%86 = getelementptr inbounds %struct.try, %struct.try* %85, i32 0, i32 0
%87 = load double, double* %86
%88 = load i32, i32* %3
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %89
%91 = getelementptr inbounds %struct.try, %struct.try* %90, i32 0, i32 1
%92 = load double, double* %91
%93 = load i32, i32* %3
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %94
%96 = getelementptr inbounds %struct.try, %struct.try* %95, i32 0, i32 2
%97 = load i8, i8* %96
%98 = lshr i8 %97, 4
%99 = and i8 %98, 1
%100 = zext i8 %99 to i32
%101 = call i32 @test_isgreaterequal(double %87, double %92, i32 %100)
%102 = load i32, i32* %3
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %103
%105 = getelementptr inbounds %struct.try, %struct.try* %104, i32 0, i32 0
%106 = load double, double* %105
%107 = load i32, i32* %3
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %108
%110 = getelementptr inbounds %struct.try, %struct.try* %109, i32 0, i32 1
%111 = load double, double* %110
%112 = load i32, i32* %3
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %113
%115 = getelementptr inbounds %struct.try, %struct.try* %114, i32 0, i32 2
%116 = load i8, i8* %115
%117 = lshr i8 %116, 5
%118 = and i8 %117, 1
%119 = zext i8 %118 to i32
%120 = call i32 @test_islessgreater(double %106, double %111, i32 %119)
br label %121
121: ; preds = %7
%122 = load i32, i32* %3
%123 = add nsw i32 %122, 1
store i32 %123, i32* %3
br label %4
124: ; preds = %4
%125 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
%struct.try = type { double, double, i8 }
@main.data = internal unnamed_addr constant [6 x %struct.try] [%struct.try { double 0x7FF8000000000000, double 0x7FF8000000000000, i8 1 }, %struct.try { double 0.000000e+00, double 0x7FF8000000000000, i8 1 }, %struct.try { double 0x7FF8000000000000, double 0.000000e+00, i8 1 }, %struct.try { double 0.000000e+00, double 0.000000e+00, i8 20 }, %struct.try { double 1.000000e+00, double 2.000000e+00, i8 38 }, %struct.try { double 2.000000e+00, double 1.000000e+00, i8 56 }]
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i64 [ 0, %0 ], [ %32, %1 ]
%3 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %2, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %2, i32 1
%6 = load double, double* %5
%7 = getelementptr inbounds [6 x %struct.try], [6 x %struct.try]* @main.data, i64 0, i64 %2, i32 2
%8 = load i8, i8* %7
%9 = and i8 %8, 1
%10 = zext i8 %9 to i32
%11 = tail call i32 @test_isunordered(double %4, double %6, i32 %10)
%12 = lshr i8 %8, 1
%13 = and i8 %12, 1
%14 = zext i8 %13 to i32
%15 = tail call i32 @test_isless(double %4, double %6, i32 %14)
%16 = lshr i8 %8, 2
%17 = and i8 %16, 1
%18 = zext i8 %17 to i32
%19 = tail call i32 @test_islessequal(double %4, double %6, i32 %18)
%20 = lshr i8 %8, 3
%21 = and i8 %20, 1
%22 = zext i8 %21 to i32
%23 = tail call i32 @test_isgreater(double %4, double %6, i32 %22)
%24 = lshr i8 %8, 4
%25 = and i8 %24, 1
%26 = zext i8 %25 to i32
%27 = tail call i32 @test_isgreaterequal(double %4, double %6, i32 %26)
%28 = lshr i8 %8, 5
%29 = and i8 %28, 1
%30 = zext i8 %29 to i32
%31 = tail call i32 @test_islessgreater(double %4, double %6, i32 %30)
%32 = add nuw nsw i64 %2, 1
%33 = icmp eq i64 %32, 6
br i1 %33, label %34, label %1
34: ; preds = %1
%35 = tail call i32 @exit(i32 0)
unreachable
}