#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(void) {
  int num1 = 0;
  int num2 = 0;
  printf("Digite dois numeros inteiros: ");
  scanf("%d%d", &num1, &num2);
  if (num1 > num2) {
    printf("O número um é maior\n");
  }
  if (num1 < num2) {
    printf("O número dois é maior\n");
  }
  if (num1 == num2) {
    printf("O número um é igual ao número dois\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1175 <main+0x55>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    118d <main+0x6d>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11a5 <main+0x85>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
lea    0xecc(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%ecx
cmp    %ecx,%eax
jg     1183 <main+0x53>
cmp    %ecx,%eax
jl     119a <main+0x6a>
cmp    %ecx,%eax
jne    117f <main+0x4f>
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%ecx
cmp    %ecx,%eax
jge    116f <main+0x3f>
lea    0xea9(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%ecx
cmp    %ecx,%eax
je     1173 <main+0x43>
jmp    117f <main+0x4f>

LLVM IR (-O0):
@.str = [31 x i8] c"Digite dois numeros inteiros: \00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [23 x i8] c"O n\C3\BAmero um \C3\A9 maior\0A\00"
@.str.3 = [25 x i8] c"O n\C3\BAmero dois \C3\A9 maior\0A\00"
@.str.4 = [39 x i8] c"O n\C3\BAmero um \C3\A9 igual ao n\C3\BAmero dois\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%4 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 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 %11
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
br label %11
11: ; preds = %9, %0
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
br label %17
17: ; preds = %15, %11
%18 = load i32, i32* %2
%19 = load i32, i32* %3
%20 = icmp eq i32 %18, %19
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
br label %23
23: ; preds = %21, %17
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"Digite dois numeros inteiros: \00"
@.str.1 = [5 x i8] c"%d%d\00"
@str = [38 x i8] c"O n\C3\BAmero um \C3\A9 igual ao n\C3\BAmero dois\00"
@str.5 = [24 x i8] c"O n\C3\BAmero dois \C3\A9 maior\00"
@str.6 = [22 x i8] c"O n\C3\BAmero um \C3\A9 maior\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 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 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.6, i64 0, i64 0))
%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 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.5, i64 0, i64 0))
%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 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
br label %28
28: ; preds = %26, %22
ret i32 0
}