#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 x;
  printf("Digite um número inteiro: ");
  scanf("%d", &x);
  if ((x % 2) == 0) {
    printf("Este número é par!\n");
  } else {
    printf("Este número é ímpar!\n");
  }
  if (x > 0) {
    printf("Este número é positivo!\n");
  } else if (x < 0) {
    printf("Este número é negativo!\n");
  } else {
    printf("Este número é o zero!\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    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1180 <main+0x50>
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
jmp    118c <main+0x5c>
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
jle    11a7 <main+0x77>
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
jmp    11d3 <main+0xa3>
cmpl   $0x0,-0x8(%rbp)
jge    11c2 <main+0x92>
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
jmp    11ce <main+0x9e>
lea    0xebb(%rip),%rdi
call   1040 <printf@plt>
jmp    11d3 <main+0xa3>
lea    0xec3(%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    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
testb  $0x1,0x4(%rsp)
lea    0xf1f(%rip),%rax
lea    0xeb4(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
cmpl   $0x0,0x4(%rsp)
lea    0xecf(%rip),%rax
lea    0xeb0(%rip),%rcx
cmovs  %rax,%rcx
lea    0xed7(%rip),%rdi
cmovle %rcx,%rdi
call   1030 <puts@plt>
lea    0xe77(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Digite um n\C3\BAmero inteiro: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"Este n\C3\BAmero \C3\A9 par!\0A\00"
@.str.3 = [25 x i8] c"Este n\C3\BAmero \C3\A9 \C3\ADmpar!\0A\00"
@.str.4 = [27 x i8] c"Este n\C3\BAmero \C3\A9 positivo!\0A\00"
@.str.5 = [27 x i8] c"Este n\C3\BAmero \C3\A9 negativo!\0A\00"
@.str.6 = [25 x i8] c"Este n\C3\BAmero \C3\A9 o zero!\0A\00"
@.str.7 = [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 ([28 x i8], [28 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 = srem i32 %5, 2
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
br label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
%13 = load i32, i32* %2
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
br label %25
17: ; preds = %12
%18 = load i32, i32* %2
%19 = icmp slt i32 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
br label %24
22: ; preds = %17
%23 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
br label %24
24: ; preds = %22, %20
br label %25
25: ; preds = %24, %15
%26 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"Digite um n\C3\BAmero inteiro: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.7 = [6 x i8] c"pause\00"
@str = [24 x i8] c"Este n\C3\BAmero \C3\A9 \C3\ADmpar!\00"
@str.8 = [24 x i8] c"Este n\C3\BAmero \C3\A9 o zero!\00"
@str.9 = [26 x i8] c"Este n\C3\BAmero \C3\A9 negativo!\00"
@str.10 = [26 x i8] c"Este n\C3\BAmero \C3\A9 positivo!\00"
@str.11 = [21 x i8] c"Este n\C3\BAmero \C3\A9 par!\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 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 = and i32 %5, 1
%7 = icmp eq i32 %6, 0
%8 = select i1 %7, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @str.11, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0)
%9 = call i32 @puts(i8* dereferenceable(1) %8)
%10 = load i32, i32* %1
%11 = icmp sgt i32 %10, 0
%12 = icmp slt i32 %10, 0
%13 = select i1 %12, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.9, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str.8, i64 0, i64 0)
%14 = select i1 %11, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.10, i64 0, i64 0), i8* %13
%15 = call i32 @puts(i8* dereferenceable(1) %14)
%16 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}