#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 = 0;
  char c = 'c';
  int *pi = &i;
  char *pc = &c;
  *pi = 18;
  printf("Entero con puntero =>\n\tDirección:%p\n\tValor:%d\n", pi, *pi);
  printf("Entero con variable =>\n\tDirección:%p\n\tValor:%d\n", &i, i);
  printf("Carácter con puntero =>\n\tDirección:%p\n\tValor:%c\n", pc, *pc);
  printf("Carácter con variable =>\n\tDirección:%p\n\tValor:%c\n", &c, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movb   $0x63,-0x9(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x9(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x12,(%rax)
mov    -0x18(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%edx
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rsi
mov    -0x20(%rbp),%rax
movsbl (%rax),%edx
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x9(%rbp),%edx
lea    0xeff(%rip),%rdi
lea    -0x9(%rbp),%rsi
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
movb   $0x63,0xb(%rsp)
movl   $0x12,0xc(%rsp)
lea    0xed7(%rip),%rdi
lea    0xc(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x12,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rsp),%edx
lea    0xee8(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf08(%rip),%rdi
lea    0xb(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x63,%edx
xor    %eax,%eax
call   1030 <printf@plt>
movsbl 0xb(%rsp),%edx
lea    0xf1b(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [48 x i8] c"Entero con puntero =>\0A\09Direcci\C3\B3n:%p\0A\09Valor:%d\0A\00"
@.str.1 = [49 x i8] c"Entero con variable =>\0A\09Direcci\C3\B3n:%p\0A\09Valor:%d\0A\00"
@.str.2 = [51 x i8] c"Car\C3\A1cter con puntero =>\0A\09Direcci\C3\B3n:%p\0A\09Valor:%c\0A\00"
@.str.3 = [52 x i8] c"Car\C3\A1cter con variable =>\0A\09Direcci\C3\B3n:%p\0A\09Valor:%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i32*
%5 = alloca i8*
store i32 0, i32* %1
store i32 0, i32* %2
store i8 99, i8* %3
store i32* %2, i32** %4
store i8* %3, i8** %5
%6 = load i32*, i32** %4
store i32 18, i32* %6
%7 = load i32*, i32** %4
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32* %7, i32 %9)
%11 = load i32, i32* %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32 %11)
%13 = load i8*, i8** %5
%14 = load i8*, i8** %5
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0), i8* %13, i32 %16)
%18 = load i8, i8* %3
%19 = sext i8 %18 to i32
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0), i8* %3, i32 %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [48 x i8] c"Entero con puntero =>\0A\09Direcci\C3\B3n:%p\0A\09Valor:%d\0A\00"
@.str.1 = [49 x i8] c"Entero con variable =>\0A\09Direcci\C3\B3n:%p\0A\09Valor:%d\0A\00"
@.str.2 = [51 x i8] c"Car\C3\A1cter con puntero =>\0A\09Direcci\C3\B3n:%p\0A\09Valor:%c\0A\00"
@.str.3 = [52 x i8] c"Car\C3\A1cter con variable =>\0A\09Direcci\C3\B3n:%p\0A\09Valor:%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = bitcast i32* %1 to i8*
store i8 99, i8* %2
store i32 18, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32* %1, i32 18)
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0), i8* %2, i32 99)
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0), i8* %2, i32 %9)
ret i32 0
}