#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 /*<<< orphan*/ scanf(char *, float *);
int main() {
  float a = 5.;
  float b;
  scanf("%f", &b);
  printf("a is %f, b is %f\n", a, b);
  if (a == b)
    printf("Equal\n");
  if (a != b)
    printf("Not Equal\n");
  if (a > b)
    printf("Greater\n");
  if (a <= b)
    printf("Less or Equal\n");
  if (a >= b)
    printf("Greater or Equal\n");
  if (a < b)
    printf("Less\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
lea    0xec1(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xea2(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jne    118f <main+0x6f>
jp     118f <main+0x6f>
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jne    11a9 <main+0x89>
jp     11a9 <main+0x89>
jmp    11b7 <main+0x97>
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    11d4 <main+0xb4>
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11f5 <main+0xd5>
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jb     1212 <main+0xf2>
lea    0xe31(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1233 <main+0x113>
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm1
lea    0xebc(%rip),%rdi
movsd  0xea5(%rip),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
movss  0x4(%rsp),%xmm0
ucomiss 0xe99(%rip),%xmm0
jne    1185 <main+0x55>
jp     1185 <main+0x55>
lea    0xeb7(%rip),%rdi
call   1030 <puts@plt>
movss  0x4(%rsp),%xmm0
ucomiss 0xe7c(%rip),%xmm0
jne    1190 <main+0x60>
jnp    11ca <main+0x9a>
lea    0xeb6(%rip),%rdi
call   1030 <puts@plt>
movss  0x4(%rsp),%xmm0
movss  0xe5e(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    11c1 <main+0x91>
lea    0xe8f(%rip),%rdi
call   1030 <puts@plt>
movss  0x4(%rsp),%xmm0
ucomiss 0xe40(%rip),%xmm0
jb     11dc <main+0xac>
lea    0xe66(%rip),%rdi
call   1030 <puts@plt>
movss  0x4(%rsp),%xmm0
movss  0xe24(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     11fb <main+0xcb>
lea    0xe36(%rip),%rdi
call   1030 <puts@plt>
movss  0x4(%rsp),%xmm0
ucomiss 0xe06(%rip),%xmm0
jbe    1210 <main+0xe0>
lea    0xe16(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [18 x i8] c"a is %f, b is %f\0A\00"
@.str.2 = [7 x i8] c"Equal\0A\00"
@.str.3 = [11 x i8] c"Not Equal\0A\00"
@.str.4 = [9 x i8] c"Greater\0A\00"
@.str.5 = [15 x i8] c"Less or Equal\0A\00"
@.str.6 = [18 x i8] c"Greater or Equal\0A\00"
@.str.7 = [6 x i8] c"Less\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
store float 5.000000e+00, float* %2
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %3)
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = load float, float* %3
%8 = fpext float %7 to double
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double %6, double %8)
%10 = load float, float* %2
%11 = load float, float* %3
%12 = fcmp oeq float %10, %11
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %15
15: ; preds = %13, %0
%16 = load float, float* %2
%17 = load float, float* %3
%18 = fcmp une float %16, %17
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
br label %21
21: ; preds = %19, %15
%22 = load float, float* %2
%23 = load float, float* %3
%24 = fcmp ogt float %22, %23
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
br label %27
27: ; preds = %25, %21
%28 = load float, float* %2
%29 = load float, float* %3
%30 = fcmp ole float %28, %29
br i1 %30, label %31, label %33
31: ; preds = %27
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
br label %33
33: ; preds = %31, %27
%34 = load float, float* %2
%35 = load float, float* %3
%36 = fcmp oge float %34, %35
br i1 %36, label %37, label %39
37: ; preds = %33
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
br label %39
39: ; preds = %37, %33
%40 = load float, float* %2
%41 = load float, float* %3
%42 = fcmp olt float %40, %41
br i1 %42, label %43, label %45
43: ; preds = %39
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %45
45: ; preds = %43, %39
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [18 x i8] c"a is %f, b is %f\0A\00"
@str = [5 x i8] c"Less\00"
@str.8 = [17 x i8] c"Greater or Equal\00"
@str.9 = [14 x i8] c"Less or Equal\00"
@str.10 = [8 x i8] c"Greater\00"
@str.11 = [10 x i8] c"Not Equal\00"
@str.12 = [6 x i8] c"Equal\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fpext float %4 to double
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double 5.000000e+00, double %5)
%7 = load float, float* %1
%8 = fcmp oeq float %7, 5.000000e+00
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.12, i64 0, i64 0))
%11 = load float, float* %1
br label %12
12: ; preds = %9, %0
%13 = phi float [ %11, %9 ], [ %7, %0 ]
%14 = fcmp une float %13, 5.000000e+00
br i1 %14, label %15, label %25
15: ; preds = %12
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.11, i64 0, i64 0))
%17 = load float, float* %1
%18 = fcmp olt float %17, 5.000000e+00
br i1 %18, label %19, label %22
19: ; preds = %15
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.10, i64 0, i64 0))
%21 = load float, float* %1
br label %22
22: ; preds = %19, %15
%23 = phi float [ %21, %19 ], [ %17, %15 ]
%24 = fcmp ult float %23, 5.000000e+00
br i1 %24, label %28, label %25
25: ; preds = %12, %22
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.9, i64 0, i64 0))
%27 = load float, float* %1
br label %28
28: ; preds = %25, %22
%29 = phi float [ %27, %25 ], [ %23, %22 ]
%30 = fcmp ugt float %29, 5.000000e+00
br i1 %30, label %34, label %31
31: ; preds = %28
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.8, i64 0, i64 0))
%33 = load float, float* %1
br label %34
34: ; preds = %31, %28
%35 = phi float [ %33, %31 ], [ %29, %28 ]
%36 = fcmp ogt float %35, 5.000000e+00
br i1 %36, label %37, label %39
37: ; preds = %34
%38 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
br label %39
39: ; preds = %37, %34
ret i32 0
}