#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, float, int, int, int, int, int, int);
void comparisonTestdf(double a, float 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):
<comparisonTestdf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm3
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
ucomisd %xmm3,%xmm2
seta   %al
and    $0x1,%al
movzbl %al,%esi
movsd  -0x8(%rbp),%xmm3
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
ucomisd %xmm3,%xmm2
setae  %al
and    $0x1,%al
movzbl %al,%edx
movsd  -0x8(%rbp),%xmm2
movss  -0xc(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
ucomisd %xmm3,%xmm2
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%ecx
movsd  -0x8(%rbp),%xmm2
movss  -0xc(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
ucomisd %xmm3,%xmm2
setae  %al
and    $0x1,%al
movzbl %al,%r8d
movsd  -0x8(%rbp),%xmm2
movss  -0xc(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
ucomisd %xmm3,%xmm2
seta   %al
and    $0x1,%al
movzbl %al,%r9d
movsd  -0x8(%rbp),%xmm2
movss  -0xc(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
ucomisd %xmm3,%xmm2
setne  %al
setp   %dil
or     %dil,%al
and    $0x1,%al
movzbl %al,%eax
lea    0xe23(%rip),%rdi
mov    %eax,(%rsp)
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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