#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 /*<<< orphan*/ system(char *);
int main() {
  int num;
  printf("Digite um numero: ");
  scanf("%d", &num);
  if (num > 10) {
    printf("\n\nO numero e maior que 10.\n");
  }
  if (num == 10) {
    printf("\n\nVoce acertou!\n");
    printf("O numero e igual a 10.\n");
  }
  if (num < 10) {
    printf("\n\nO numero e menor que 10.\n");
  }
  system("pause");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
lea    0xec1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0xa,-0x8(%rbp)
jle    1171 <main+0x41>
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0xa,-0x8(%rbp)
jne    1193 <main+0x63>
lea    0xeb0(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0xa,-0x8(%rbp)
jge    11a9 <main+0x79>
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
lea    0xec7(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1050 <printf@plt>
lea    0xebf(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0xb,%eax
jge    118d <main+0x4d>
cmp    $0xa,%eax
je     11a2 <main+0x62>
cmp    $0x9,%eax
jg     117d <main+0x3d>
lea    0xea4(%rip),%rdi
call   1030 <puts@plt>
lea    0xe92(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
cmp    $0xa,%eax
jne    116c <main+0x2c>
lea    0xe8e(%rip),%rdi
call   1030 <puts@plt>
lea    0xe92(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
cmp    $0x9,%eax
jle    1171 <main+0x31>
jmp    117d <main+0x3d>

LLVM IR (-O0):
@.str = [19 x i8] c"Digite um numero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [28 x i8] c"\0A\0AO numero e maior que 10.\0A\00"
@.str.3 = [17 x i8] c"\0A\0AVoce acertou!\0A\00"
@.str.4 = [24 x i8] c"O numero e igual a 10.\0A\00"
@.str.5 = [28 x i8] c"\0A\0AO numero e menor que 10.\0A\00"
@.str.6 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 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* %2)
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 10
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
br label %9
9: ; preds = %7, %0
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 10
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
br label %15
15: ; preds = %12, %9
%16 = load i32, i32* %2
%17 = icmp slt i32 %16, 10
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
br label %20
20: ; preds = %18, %15
%21 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Digite um numero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.6 = [6 x i8] c"pause\00"
@str = [27 x i8] c"\0A\0AO numero e menor que 10.\00"
@str.7 = [16 x i8] c"\0A\0AVoce acertou!\00"
@str.8 = [23 x i8] c"O numero e igual a 10.\00"
@str.9 = [27 x i8] c"\0A\0AO numero e maior que 10.\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 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 = load i32, i32* %1
%6 = icmp sgt i32 %5, 10
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.9, i64 0, i64 0))
%9 = load i32, i32* %1
br label %10
10: ; preds = %7, %0
%11 = phi i32 [ %9, %7 ], [ %5, %0 ]
%12 = icmp eq i32 %11, 10
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.7, i64 0, i64 0))
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.8, i64 0, i64 0))
%16 = load i32, i32* %1
br label %17
17: ; preds = %13, %10
%18 = phi i32 [ %16, %13 ], [ %11, %10 ]
%19 = icmp slt i32 %18, 10
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
br label %22
22: ; preds = %20, %17
%23 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
ret i32 0
}