#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 *, int *);
void main() {
  int b, c;
  printf("Please enter an integer: ");
  scanf("%d", &b);
  printf("Please enter a second integer: ");
  scanf("%d", &c);
  if (b < c)
    printf("\n%d is less than %d.", b, c);
  if (b > c)
    printf("\n%d is greater than %d.", b, c);
  if (b <= c)
    printf("\n%d is less than or equal to %d.", b, c);
  if (b >= c)
    printf("\n%d is greater than or equal to %d.", b, c);
  if (b == c)
    printf("\n%d is equal to %d.", b, c);
  if (b != c)
    printf("\n%d is not equal to %d.", b, c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1184 <main+0x64>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    11a4 <main+0x84>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11c4 <main+0xa4>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     11e4 <main+0xc4>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1204 <main+0xe4>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1224 <main+0x104>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee0(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xecf(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
cmp    %edx,%esi
jl     119a <main+0x7a>
cmp    %edx,%esi
jg     11b4 <main+0x94>
cmp    %edx,%esi
jle    11ce <main+0xae>
cmp    %edx,%esi
jge    11e8 <main+0xc8>
cmp    %edx,%esi
je     1202 <main+0xe2>
cmp    %edx,%esi
je     1194 <main+0x74>
lea    0xf36(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret
lea    0xe9c(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
cmp    %edx,%esi
jle    1172 <main+0x52>
lea    0xe97(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
cmp    %edx,%esi
jg     1176 <main+0x56>
lea    0xe95(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
cmp    %edx,%esi
jl     117a <main+0x5a>
lea    0xe9c(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
cmp    %edx,%esi
jne    1182 <main+0x62>
lea    0xea6(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
cmp    %edx,%esi
jne    1186 <main+0x66>
jmp    1194 <main+0x74>

LLVM IR (-O0):
@.str = [26 x i8] c"Please enter an integer: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [32 x i8] c"Please enter a second integer: \00"
@.str.3 = [21 x i8] c"\0A%d is less than %d.\00"
@.str.4 = [24 x i8] c"\0A%d is greater than %d.\00"
@.str.5 = [33 x i8] c"\0A%d is less than or equal to %d.\00"
@.str.6 = [36 x i8] c"\0A%d is greater than or equal to %d.\00"
@.str.7 = [20 x i8] c"\0A%d is equal to %d.\00"
@.str.8 = [24 x i8] c"\0A%d is not equal to %d.\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %14
10: ; preds = %0
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %11, i32 %12)
br label %14
14: ; preds = %10, %0
%15 = load i32, i32* %1
%16 = load i32, i32* %2
%17 = icmp sgt i32 %15, %16
br i1 %17, label %18, label %22
18: ; preds = %14
%19 = load i32, i32* %1
%20 = load i32, i32* %2
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %19, i32 %20)
br label %22
22: ; preds = %18, %14
%23 = load i32, i32* %1
%24 = load i32, i32* %2
%25 = icmp sle i32 %23, %24
br i1 %25, label %26, label %30
26: ; preds = %22
%27 = load i32, i32* %1
%28 = load i32, i32* %2
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i32 %27, i32 %28)
br label %30
30: ; preds = %26, %22
%31 = load i32, i32* %1
%32 = load i32, i32* %2
%33 = icmp sge i32 %31, %32
br i1 %33, label %34, label %38
34: ; preds = %30
%35 = load i32, i32* %1
%36 = load i32, i32* %2
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i32 %35, i32 %36)
br label %38
38: ; preds = %34, %30
%39 = load i32, i32* %1
%40 = load i32, i32* %2
%41 = icmp eq i32 %39, %40
br i1 %41, label %42, label %46
42: ; preds = %38
%43 = load i32, i32* %1
%44 = load i32, i32* %2
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i32 %43, i32 %44)
br label %46
46: ; preds = %42, %38
%47 = load i32, i32* %1
%48 = load i32, i32* %2
%49 = icmp ne i32 %47, %48
br i1 %49, label %50, label %54
50: ; preds = %46
%51 = load i32, i32* %1
%52 = load i32, i32* %2
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i32 %51, i32 %52)
br label %54
54: ; preds = %50, %46
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Please enter an integer: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [32 x i8] c"Please enter a second integer: \00"
@.str.3 = [21 x i8] c"\0A%d is less than %d.\00"
@.str.4 = [24 x i8] c"\0A%d is greater than %d.\00"
@.str.5 = [33 x i8] c"\0A%d is less than or equal to %d.\00"
@.str.6 = [36 x i8] c"\0A%d is greater than or equal to %d.\00"
@.str.7 = [20 x i8] c"\0A%d is equal to %d.\00"
@.str.8 = [24 x i8] c"\0A%d is not equal to %d.\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %16
12: ; preds = %0
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %9, i32 %10)
%14 = load i32, i32* %1
%15 = load i32, i32* %2
br label %16
16: ; preds = %12, %0
%17 = phi i32 [ %15, %12 ], [ %10, %0 ]
%18 = phi i32 [ %14, %12 ], [ %9, %0 ]
%19 = icmp sgt i32 %18, %17
br i1 %19, label %20, label %24
20: ; preds = %16
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %18, i32 %17)
%22 = load i32, i32* %1
%23 = load i32, i32* %2
br label %24
24: ; preds = %20, %16
%25 = phi i32 [ %23, %20 ], [ %17, %16 ]
%26 = phi i32 [ %22, %20 ], [ %18, %16 ]
%27 = icmp sgt i32 %26, %25
br i1 %27, label %32, label %28
28: ; preds = %24
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i32 %26, i32 %25)
%30 = load i32, i32* %1
%31 = load i32, i32* %2
br label %32
32: ; preds = %28, %24
%33 = phi i32 [ %31, %28 ], [ %25, %24 ]
%34 = phi i32 [ %30, %28 ], [ %26, %24 ]
%35 = icmp slt i32 %34, %33
br i1 %35, label %40, label %36
36: ; preds = %32
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i32 %34, i32 %33)
%38 = load i32, i32* %1
%39 = load i32, i32* %2
br label %40
40: ; preds = %36, %32
%41 = phi i32 [ %39, %36 ], [ %33, %32 ]
%42 = phi i32 [ %38, %36 ], [ %34, %32 ]
%43 = icmp eq i32 %42, %41
br i1 %43, label %44, label %48
44: ; preds = %40
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i32 %41, i32 %41)
%46 = load i32, i32* %1
%47 = load i32, i32* %2
br label %48
48: ; preds = %44, %40
%49 = phi i32 [ %47, %44 ], [ %41, %40 ]
%50 = phi i32 [ %46, %44 ], [ %42, %40 ]
%51 = icmp eq i32 %50, %49
br i1 %51, label %54, label %52
52: ; preds = %48
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i32 %50, i32 %49)
br label %54
54: ; preds = %52, %48
ret void
}