#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*/ desplazar1(int, int, int, int);
int /*<<< orphan*/ desplazar2(int *, int *, int, int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int x = 0, y = 0, h = +30, v = -45;
  printf("Punto: (%d, %d)\n", x, y);
  desplazar1(x, y, h, v);
  printf("Impresion de la llamada con parametros por Valor. Punto: (%d, %d)\n",
         x, y);
  printf("\n");
  printf("Punto: (%d, %d)\n", x, y);
  desplazar2(&x, &y, h, v);
  printf("Impresion de la llamada con parametros por Referencia. Punto: (%d, "
         "%d)\n",
         x, y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1e,-0x10(%rbp)
movl   $0xffffffd3,-0x14(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xf12(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <desplazar1@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeee(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <desplazar2@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xf1e(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1e,%edx
mov    $0xffffffd3,%ecx
call   1040 <desplazar1@plt>
lea    0xe7c(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    $0x1e,%edx
mov    $0xffffffd3,%ecx
call   1060 <desplazar2@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
lea    0xe74(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Punto: (%d, %d)\0A\00"
@.str.1 = [67 x i8] c"Impresion de la llamada con parametros por Valor. Punto: (%d, %d)\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [72 x i8] c"Impresion de la llamada con parametros por Referencia. Punto: (%d, %d)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 30, i32* %4
store i32 -45, i32* %5
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = call i32 @desplazar1(i32 %9, i32 %10, i32 %11, i32 %12)
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.1, i64 0, i64 0), i32 %14, i32 %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%18 = load i32, i32* %2
%19 = load i32, i32* %3
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %18, i32 %19)
%21 = load i32, i32* %4
%22 = load i32, i32* %5
%23 = call i32 @desplazar2(i32* %2, i32* %3, i32 %21, i32 %22)
%24 = load i32, i32* %2
%25 = load i32, i32* %3
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.3, i64 0, i64 0), i32 %24, i32 %25)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Punto: (%d, %d)\0A\00"
@.str.1 = [67 x i8] c"Impresion de la llamada con parametros por Valor. Punto: (%d, %d)\0A\00"
@.str.3 = [72 x i8] c"Impresion de la llamada con parametros por Referencia. Punto: (%d, %d)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
%6 = tail call i32 @desplazar1(i32 0, i32 0, i32 30, i32 -45)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 0)
%8 = tail call i32 @putchar(i32 10)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
%10 = call i32 @desplazar2(i32* %1, i32* %2, i32 30, i32 -45)
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @.str.3, i64 0, i64 0), i32 %11, i32 %12)
ret i32 0
}