#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 **);
void checaNumero(int *pNum) {
  printf("\nEntre com o numero: ");
  scanf("%d", &pNum);
  if (pNum > 0) {
    printf("Maior que zero.");
  } else {
    if (pNum < 0) {
      printf("Menor que zero.");
    } else {
      printf("NULO!!!");
    }
  }
}


x86 assembly (clang, -O0):
<checaNumero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpq   $0x0,-0x8(%rbp)
jbe    1164 <checaNumero+0x44>
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
jmp    1191 <checaNumero+0x71>
cmpq   $0x0,-0x8(%rbp)
jae    1180 <checaNumero+0x60>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
jmp    118c <checaNumero+0x6c>
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
jmp    1191 <checaNumero+0x71>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checaNumero>:
push   %rax
mov    %rdi,(%rsp)
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
cmpq   $0x0,(%rsp)
lea    0xedd(%rip),%rax
lea    0xec6(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [22 x i8] c"\0AEntre com o numero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [16 x i8] c"Maior que zero.\00"
@.str.3 = [16 x i8] c"Menor que zero.\00"
@.str.4 = [8 x i8] c"NULO!!!\00"
define void @checaNumero(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 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 ugt i32* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
br label %17
9: ; preds = %1
%10 = load i32*, i32** %2
%11 = icmp ult i32* %10, null
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %16
14: ; preds = %9
%15 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %16
16: ; preds = %14, %12
br label %17
17: ; preds = %16, %7
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"\0AEntre com o numero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [16 x i8] c"Maior que zero.\00"
@.str.4 = [8 x i8] c"NULO!!!\00"
define void @checaNumero(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 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 eq i32* %5, null
%7 = select i1 %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0)
%8 = call i32 @printf(i8* dereferenceable(1) %7)
ret void
}