#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 main() {
  int i, j = 25;
  int *pi, *pj = &i;
  *pj = j + 5;
  i = *pj + 5;
  pi = pj;
  *pi = i + j;
  printf("Valor de &i: %p \n", &i);
  printf("Valor de &j: %p \n", &j);
  printf("Valor de pj: %p \n", pj);
  printf("Valor de *pj: %i \n", *pj);
  printf("Valor de i: %i \n", i);
  printf("Valor de pi: %p \n", pi);
  printf("Valor de *pi: %i \n", *pi);
  printf("Valor de (*pi+2): %i \n", (*pi + 2));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x19,-0xc(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%ecx
add    $0x5,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
add    $0x5,%eax
mov    %eax,-0x8(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
lea    0xe9f(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9f(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rsi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
add    $0x2,%esi
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x19,0xc(%rsp)
movl   $0x3c,0x8(%rsp)
lea    0xed4(%rip),%rdi
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x8(%rsp),%esi
lea    0xecc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x8(%rsp),%esi
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x8(%rsp),%esi
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x8(%rsp),%esi
add    $0x2,%esi
lea    0xecb(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Valor de &i: %p \0A\00"
@.str.1 = [18 x i8] c"Valor de &j: %p \0A\00"
@.str.2 = [18 x i8] c"Valor de pj: %p \0A\00"
@.str.3 = [19 x i8] c"Valor de *pj: %i \0A\00"
@.str.4 = [17 x i8] c"Valor de i: %i \0A\00"
@.str.5 = [18 x i8] c"Valor de pi: %p \0A\00"
@.str.6 = [19 x i8] c"Valor de *pi: %i \0A\00"
@.str.7 = [23 x i8] c"Valor de (*pi+2): %i \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 25, i32* %3
store i32* %2, i32** %5
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 5
%8 = load i32*, i32** %5
store i32 %7, i32* %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = add nsw i32 %10, 5
store i32 %11, i32* %2
%12 = load i32*, i32** %5
store i32* %12, i32** %4
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = add nsw i32 %13, %14
%16 = load i32*, i32** %4
store i32 %15, i32* %16
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32* %2)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%19 = load i32*, i32** %5
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32* %19)
%21 = load i32*, i32** %5
%22 = load i32, i32* %21
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %22)
%24 = load i32, i32* %2
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %24)
%26 = load i32*, i32** %4
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32* %26)
%28 = load i32*, i32** %4
%29 = load i32, i32* %28
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %29)
%31 = load i32*, i32** %4
%32 = load i32, i32* %31
%33 = add nsw i32 %32, 2
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 %33)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Valor de &i: %p \0A\00"
@.str.1 = [18 x i8] c"Valor de &j: %p \0A\00"
@.str.2 = [18 x i8] c"Valor de pj: %p \0A\00"
@.str.3 = [19 x i8] c"Valor de *pj: %i \0A\00"
@.str.4 = [17 x i8] c"Valor de i: %i \0A\00"
@.str.5 = [18 x i8] c"Valor de pi: %p \0A\00"
@.str.6 = [19 x i8] c"Valor de *pi: %i \0A\00"
@.str.7 = [23 x i8] c"Valor de (*pi+2): %i \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
store i32 25, i32* %2
store i32 60, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%8 = load i32, i32* %1
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %1
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %10)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32* %1)
%13 = load i32, i32* %1
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %1
%16 = add nsw i32 %15, 2
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 %16)
ret i32 0
}