#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 main() {
  int num, mult, div;
  printf("Digite um numero");
  scanf("%d", &num);
  if (num > 0) {
    printf("O numero %d multiplicado por 5 eh %d", num, mult = num * 5);
  } else {
    printf("O numero %d subtraido por 3 eh %d", num, div = num - 3);
  }
  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    0xf11(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jle    1174 <main+0x54>
mov    -0x8(%rbp),%esi
imul   $0x5,-0x8(%rbp),%edx
mov    %edx,-0xc(%rbp)
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    118e <main+0x6e>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
sub    $0x3,%edx
mov    %edx,-0x10(%rbp)
lea    0xeaf(%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    0xf1f(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
test   %esi,%esi
jle    1154 <main+0x34>
lea    (%rsi,%rsi,4),%edx
lea    0xebf(%rip),%rdi
jmp    115e <main+0x3e>
lea    -0x3(%rsi),%edx
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Digite um numero\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [37 x i8] c"O numero %d multiplicado por 5 eh %d\00"
@.str.3 = [34 x i8] c"O numero %d subtraido por 3 eh %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %0
%10 = load i32, i32* %2
%11 = load i32, i32* %2
%12 = mul nsw i32 %11, 5
store i32 %12, i32* %3
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 %10, i32 %12)
br label %19
14: ; preds = %0
%15 = load i32, i32* %2
%16 = load i32, i32* %2
%17 = sub nsw i32 %16, 3
store i32 %17, i32* %4
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i32 %15, i32 %17)
br label %19
19: ; preds = %14, %9
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Digite um numero\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [37 x i8] c"O numero %d multiplicado por 5 eh %d\00"
@.str.3 = [34 x i8] c"O numero %d subtraido por 3 eh %d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 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, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = mul nsw i32 %5, 5
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %8)
br label %13
10: ; preds = %0
%11 = add nsw i32 %5, -3
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i32 %5, i32 %11)
br label %13
13: ; preds = %10, %7
ret i32 0
}