#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 *, int *);
int main() {
  int num1, num2;
  printf("Enter two integers, and I will tell you the relationships ");
  printf("they satisfty: ");
  scanf("%d%d", &num1, &num2);
  if (num1 == num2)
    printf("%d is equal to %d\n", num1, num2);
  if (num1 != num2)
    printf("%d is not equal to %d\n", num1, num2);
  if (num1 < num2)
    printf("%d is less than %d\n", num1, num2);
  if (num1 > num2)
    printf("%d is greater than %d\n", num1, num2);
  if (num1 <= num2)
    printf("%d is less than or equal to %d\n", num1, num2);
  if (num1 >= num2)
    printf("%d is greater than or equal to %d\n", num1, num2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    117f <main+0x5f>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     119f <main+0x7f>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11bf <main+0x9f>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    11df <main+0xbf>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11ff <main+0xdf>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     121f <main+0xff>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xead(%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    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf05(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf07(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%eax
cmp    %eax,%esi
jne    1173 <main+0x53>
lea    0xeed(%rip),%rdi
mov    %esi,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%eax
cmp    %eax,%esi
jne    117b <main+0x5b>
mov    %eax,%edx
jmp    11ec <main+0xcc>
lea    0xee1(%rip),%rdi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%edx
cmp    %edx,%eax
jl     11b6 <main+0x96>
cmp    %edx,%eax
jg     11d1 <main+0xb1>
cmp    %edx,%eax
jle    11ec <main+0xcc>
cmp    %edx,%eax
jl     11b2 <main+0x92>
lea    0xf1c(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xebd(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%edx
cmp    %edx,%eax
jle    119a <main+0x7a>
lea    0xeb6(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%edx
cmp    %edx,%eax
jg     119e <main+0x7e>
lea    0xeb2(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%edx
cmp    %edx,%eax
jge    11a2 <main+0x82>
jmp    11b2 <main+0x92>

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

LLVM IR (-O2):
@.str = [59 x i8] c"Enter two integers, and I will tell you the relationships \00"
@.str.1 = [16 x i8] c"they satisfty: \00"
@.str.2 = [5 x i8] c"%d%d\00"
@.str.3 = [19 x i8] c"%d is equal to %d\0A\00"
@.str.4 = [23 x i8] c"%d is not equal to %d\0A\00"
@.str.5 = [20 x i8] c"%d is less than %d\0A\00"
@.str.6 = [23 x i8] c"%d is greater than %d\0A\00"
@.str.7 = [32 x i8] c"%d is less than or equal to %d\0A\00"
@.str.8 = [35 x i8] c"%d is greater than or equal to %d\0A\00"
define i32 @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 ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32* %1, i32* %2)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %15
11: ; preds = %0
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %8, i32 %8)
%13 = load i32, i32* %1
%14 = load i32, i32* %2
br label %15
15: ; preds = %11, %0
%16 = phi i32 [ %14, %11 ], [ %9, %0 ]
%17 = phi i32 [ %13, %11 ], [ %8, %0 ]
%18 = icmp eq i32 %17, %16
br i1 %18, label %40, label %19
19: ; preds = %15
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %17, i32 %16)
%21 = load i32, i32* %1
%22 = load i32, i32* %2
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %28
24: ; preds = %19
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 %21, i32 %22)
%26 = load i32, i32* %1
%27 = load i32, i32* %2
br label %28
28: ; preds = %24, %19
%29 = phi i32 [ %27, %24 ], [ %22, %19 ]
%30 = phi i32 [ %26, %24 ], [ %21, %19 ]
%31 = icmp sgt i32 %30, %29
br i1 %31, label %32, label %36
32: ; preds = %28
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %30, i32 %29)
%34 = load i32, i32* %1
%35 = load i32, i32* %2
br label %36
36: ; preds = %32, %28
%37 = phi i32 [ %35, %32 ], [ %29, %28 ]
%38 = phi i32 [ %34, %32 ], [ %30, %28 ]
%39 = icmp sgt i32 %38, %37
br i1 %39, label %46, label %40
40: ; preds = %15, %36
%41 = phi i32 [ %38, %36 ], [ %16, %15 ]
%42 = phi i32 [ %37, %36 ], [ %16, %15 ]
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0), i32 %41, i32 %42)
%44 = load i32, i32* %1
%45 = load i32, i32* %2
br label %46
46: ; preds = %40, %36
%47 = phi i32 [ %45, %40 ], [ %37, %36 ]
%48 = phi i32 [ %44, %40 ], [ %38, %36 ]
%49 = icmp slt i32 %48, %47
br i1 %49, label %52, label %50
50: ; preds = %46
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0), i32 %48, i32 %47)
br label %52
52: ; preds = %50, %46
ret i32 0
}