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

x86 assembly (clang, -O2):
<comparisonTestdi>:
push   %rax
mov    %edi,%esi
cvtsi2sd %edi,%xmm1
xor    %edx,%edx
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %dl
setae  %cl
movapd %xmm1,%xmm2
cmpeqsd %xmm0,%xmm2
movq   %xmm2,%r8
and    $0x1,%r8d
xor    %r9d,%r9d
xor    %r10d,%r10d
ucomisd %xmm1,%xmm0
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"%g op %d: < %d <= %d == %d >= %d > %d != %d\0A\00"
define void @comparisonTestdi(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%5 = load double, double* %3
%6 = load i32, i32* %4
%7 = load double, double* %3
%8 = load i32, i32* %4
%9 = sitofp i32 %8 to double
%10 = fcmp olt double %7, %9
%11 = zext i1 %10 to i32
%12 = load double, double* %3
%13 = load i32, i32* %4
%14 = sitofp i32 %13 to double
%15 = fcmp ole double %12, %14
%16 = zext i1 %15 to i32
%17 = load double, double* %3
%18 = load i32, i32* %4
%19 = sitofp i32 %18 to double
%20 = fcmp oeq double %17, %19
%21 = zext i1 %20 to i32
%22 = load double, double* %3
%23 = load i32, i32* %4
%24 = sitofp i32 %23 to double
%25 = fcmp oge double %22, %24
%26 = zext i1 %25 to i32
%27 = load double, double* %3
%28 = load i32, i32* %4
%29 = sitofp i32 %28 to double
%30 = fcmp ogt double %27, %29
%31 = zext i1 %30 to i32
%32 = load double, double* %3
%33 = load i32, i32* %4
%34 = sitofp i32 %33 to double
%35 = fcmp une double %32, %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), double %5, i32 %6, i32 %11, i32 %16, i32 %21, i32 %26, i32 %31, i32 %36)
ret void
}

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