#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: ");
  scanf("%d%d", &num1, &num2);
  if (num1 > num2)
    printf("%d is larger.", num1);
  if (num1 < num2)
    printf("%d is larger.", num2);
  if (num1 == num2)
    printf("These numbers are equal.");
  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    0xed1(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    116e <main+0x4e>
mov    -0x8(%rbp),%esi
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    118b <main+0x6b>
mov    -0xc(%rbp),%esi
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11a5 <main+0x85>
lea    0xe8a(%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    0xedf(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%eax
cmp    %eax,%esi
jg     1168 <main+0x48>
cmp    %eax,%esi
jl     1181 <main+0x61>
cmp    %eax,%esi
jne    1164 <main+0x44>
lea    0xecb(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeab(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%eax
cmp    %eax,%esi
jge    1152 <main+0x32>
lea    0xe92(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%eax
cmp    %eax,%esi
je     1156 <main+0x36>
jmp    1164 <main+0x44>

LLVM IR (-O0):
@.str = [21 x i8] c"Enter two integers: \00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [14 x i8] c"%d is larger.\00"
@.str.3 = [25 x i8] c"These numbers are equal.\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 ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = load i32, i32* %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %9, %0
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = load i32, i32* %3
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %17)
br label %19
19: ; preds = %16, %12
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = icmp eq i32 %20, %21
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
br label %25
25: ; preds = %23, %19
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Enter two integers: \00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [14 x i8] c"%d is larger.\00"
@.str.3 = [25 x i8] c"These numbers are equal.\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 ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = icmp sgt i32 %7, %8
br i1 %9, label %10, label %14
10: ; preds = %0
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%12 = load i32, i32* %1
%13 = load i32, i32* %2
br label %14
14: ; preds = %10, %0
%15 = phi i32 [ %13, %10 ], [ %8, %0 ]
%16 = phi i32 [ %12, %10 ], [ %7, %0 ]
%17 = icmp slt i32 %16, %15
br i1 %17, label %18, label %22
18: ; preds = %14
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %15)
%20 = load i32, i32* %1
%21 = load i32, i32* %2
br label %22
22: ; preds = %18, %14
%23 = phi i32 [ %21, %18 ], [ %15, %14 ]
%24 = phi i32 [ %20, %18 ], [ %16, %14 ]
%25 = icmp eq i32 %24, %23
br i1 %25, label %26, label %28
26: ; preds = %22
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
br label %28
28: ; preds = %26, %22
ret i32 0
}