#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 calculo(int *, int *);
int funcao(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char const *argv[]) {
  int n = 5;
  int m = 3;
  int k;
  scanf("%d", &k);
  printf("k = %d", k);
  int retorno = funcao(n);
  printf("n = %d", n);
  int c = calculo(&n, &m);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x5,-0x14(%rbp)
movl   $0x3,-0x18(%rbp)
lea    0xe99(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x1c(%rbp),%esi
lea    0xe82(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%edi
call   1050 <funcao@plt>
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe6f(%rip),%rdi
call   1040 <printf@plt>
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <calculo@plt>
mov    %eax,-0x24(%rbp)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x5,0x14(%rsp)
movl   $0x3,0x10(%rsp)
lea    0xea9(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%esi
lea    0xe90(%rip),%rdi
call   1040 <printf@plt>
mov    $0x5,%edi
call   1050 <funcao@plt>
lea    0xe81(%rip),%rdi
mov    $0x5,%esi
call   1040 <printf@plt>
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <calculo@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"k = %d\00"
@.str.2 = [7 x i8] c"n = %d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 5, i32* %6
store i32 3, i32* %7
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %8)
%12 = load i32, i32* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = load i32, i32* %6
%15 = call i32 @funcao(i32 %14)
store i32 %15, i32* %9
%16 = load i32, i32* %6
%17 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %16)
%18 = call i32 @calculo(i32* %6, i32* %7)
store i32 %18, i32* %10
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"k = %d\00"
@.str.2 = [7 x i8] c"n = %d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %3 to i8*
store i32 5, i32* %3
%7 = bitcast i32* %4 to i8*
store i32 3, i32* %4
%8 = bitcast i32* %5 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
%10 = load i32, i32* %5
%11 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = call i32 @funcao(i32 5)
%13 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 5)
%14 = call i32 @calculo(i32* %3, i32* %4)
ret i32 0
}