#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 *, int, double, int, int, int, int, int, int);
void comparisonTestid(int a, double b) {
  printf("%d 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):
<comparisonTestid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
cvtsi2sdl -0x4(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
ucomisd %xmm2,%xmm1
seta   %al
and    $0x1,%al
movzbl %al,%edx
cvtsi2sdl -0x4(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
ucomisd %xmm2,%xmm1
setae  %al
and    $0x1,%al
movzbl %al,%ecx
cvtsi2sdl -0x4(%rbp),%xmm1
ucomisd -0x10(%rbp),%xmm1
sete   %al
setnp  %dil
and    %dil,%al
and    $0x1,%al
movzbl %al,%r8d
cvtsi2sdl -0x4(%rbp),%xmm1
ucomisd -0x10(%rbp),%xmm1
setae  %al
and    $0x1,%al
movzbl %al,%r9d
cvtsi2sdl -0x4(%rbp),%xmm1
ucomisd -0x10(%rbp),%xmm1
seta   %al
and    $0x1,%al
movzbl %al,%r10d
cvtsi2sdl -0x4(%rbp),%xmm1
ucomisd -0x10(%rbp),%xmm1
setne  %al
setp   %dil
or     %dil,%al
and    $0x1,%al
movzbl %al,%eax
lea    0xe4c(%rip),%rdi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<comparisonTestid>:
push   %rax
mov    %edi,%esi
cvtsi2sd %edi,%xmm1
xor    %edx,%edx
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %dl
setae  %cl
movapd %xmm1,%xmm2
cmpeqsd %xmm0,%xmm2
movq   %xmm2,%r8
and    $0x1,%r8d
xor    %r9d,%r9d
xor    %r10d,%r10d
ucomisd %xmm0,%xmm1
seta   %r10b
setae  %r9b
cmpneqsd %xmm0,%xmm1
movq   %xmm1,%rax
and    $0x1,%eax
lea    0xea3(%rip),%rdi
push   %rax
push   %r10
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rax
ret

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

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