#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*/ changeIntValues(int, int);
int /*<<< orphan*/ changeValues(int *, int *);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int a = 23, b = 45, c = 46, d = 1923;
  int *pc, *pd;
  pc = &c;
  pd = &d;
  changeIntValues(a, b);
  printf("\nValor nativo a = %d\nValor nativo b = %d", a, b);
  changeValues(pc, pd);
  printf("\nValor nativo c = %d\nValor nativo d = %d", c, d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x17,-0x8(%rbp)
movl   $0x2d,-0xc(%rbp)
movl   $0x2e,-0x10(%rbp)
movl   $0x783,-0x14(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <changeIntValues@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe7d(%rip),%rdi
call   1050 <printf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <changeValues@plt>
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe87(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x2e,0x4(%rsp)
movl   $0x783,(%rsp)
mov    $0x17,%edi
mov    $0x2d,%esi
call   1040 <changeIntValues@plt>
lea    0xeaa(%rip),%rdi
mov    $0x17,%esi
mov    $0x2d,%edx
call   1050 <printf@plt>
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <changeValues@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xea9(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"\0AValor nativo a = %d\0AValor nativo b = %d\00"
@.str.1 = [41 x i8] c"\0AValor nativo c = %d\0AValor nativo d = %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
store i32 0, i32* %1
store i32 23, i32* %2
store i32 45, i32* %3
store i32 46, i32* %4
store i32 1923, i32* %5
store i32* %4, i32** %6
store i32* %5, i32** %7
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 @changeIntValues(i32 %8, i32 %9)
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12)
%14 = load i32*, i32** %6
%15 = load i32*, i32** %7
%16 = call i32 @changeValues(i32* %14, i32* %15)
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %17, i32 %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c"\0AValor nativo a = %d\0AValor nativo b = %d\00"
@.str.1 = [41 x i8] c"\0AValor nativo c = %d\0AValor nativo d = %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 46, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 1923, i32* %2
%5 = tail call i32 @changeIntValues(i32 23, i32 45)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 23, i32 45)
%7 = call i32 @changeValues(i32* %1, i32* %2)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9)
ret i32 0
}