#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*/ printf(char *, double, double, int, int, int, int, int, int);
void comparisonTestdd(double a, double b) {
  printf("%g op %g: < %d   <= %d   == %d   >= %d   > %d   != %d\n", a, b,
         a<b, a <= b, a == b, a >= b, a> b, a != b);
}


x86 assembly (clang, -O0):
<comparisonTestdd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm2
ucomisd %xmm3,%xmm2
seta   %al
and    $0x1,%al
movzbl %al,%esi
movsd  -0x8(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm2
ucomisd %xmm3,%xmm2
setae  %al
and    $0x1,%al
movzbl %al,%edx
movsd  -0x8(%rbp),%xmm2
ucomisd -0x10(%rbp),%xmm2
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%ecx
movsd  -0x8(%rbp),%xmm2
ucomisd -0x10(%rbp),%xmm2
setae  %al
and    $0x1,%al
movzbl %al,%r8d
movsd  -0x8(%rbp),%xmm2
ucomisd -0x10(%rbp),%xmm2
seta   %al
and    $0x1,%al
movzbl %al,%r9d
movsd  -0x8(%rbp),%xmm2
ucomisd -0x10(%rbp),%xmm2
setne  %al
setp   %dil
or     %dil,%al
and    $0x1,%al
movzbl %al,%eax
lea    0xe4b(%rip),%rdi
mov    %eax,(%rsp)
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<comparisonTestdd>:
push   %rax
xor    %esi,%esi
xor    %edx,%edx
ucomisd %xmm0,%xmm1
seta   %sil
setae  %dl
movapd %xmm0,%xmm2
cmpeqsd %xmm1,%xmm2
movq   %xmm2,%rcx
and    $0x1,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
ucomisd %xmm1,%xmm0
seta   %r9b
setae  %r8b
movapd %xmm0,%xmm2
cmpneqsd %xmm1,%xmm2
movq   %xmm2,%rax
and    $0x1,%eax
mov    %eax,(%rsp)
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [55 x i8] c"%g op %g: < %d <= %d == %d >= %d > %d != %d\0A\00"
define void @comparisonTestdd(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fcmp olt double %7, %8
%10 = zext i1 %9 to i32
%11 = load double, double* %3
%12 = load double, double* %4
%13 = fcmp ole double %11, %12
%14 = zext i1 %13 to i32
%15 = load double, double* %3
%16 = load double, double* %4
%17 = fcmp oeq double %15, %16
%18 = zext i1 %17 to i32
%19 = load double, double* %3
%20 = load double, double* %4
%21 = fcmp oge double %19, %20
%22 = zext i1 %21 to i32
%23 = load double, double* %3
%24 = load double, double* %4
%25 = fcmp ogt double %23, %24
%26 = zext i1 %25 to i32
%27 = load double, double* %3
%28 = load double, double* %4
%29 = fcmp une double %27, %28
%30 = zext i1 %29 to i32
%31 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), double %5, double %6, i32 %10, i32 %14, i32 %18, i32 %22, i32 %26, i32 %30)
ret void
}

LLVM IR (-O2):
@.str = [55 x i8] c"%g op %g: < %d <= %d == %d >= %d > %d != %d\0A\00"
define void @comparisonTestdd(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = zext i1 %3 to i32
%5 = fcmp ole double %0, %1
%6 = zext i1 %5 to i32
%7 = fcmp oeq double %0, %1
%8 = zext i1 %7 to i32
%9 = fcmp oge double %0, %1
%10 = zext i1 %9 to i32
%11 = fcmp ogt double %0, %1
%12 = zext i1 %11 to i32
%13 = fcmp une double %0, %1
%14 = zext i1 %13 to i32
%15 = tail call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), double %0, double %1, i32 %4, i32 %6, i32 %8, i32 %10, i32 %12, i32 %14)
ret void
}