#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 */
typedef int /*<<< orphan*/ g;
typedef int /*<<< orphan*/ d;
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a, *b, **c;
  double d, *e, **f;
  char g, *h, **i;
  printf("\nEl tamaño de a: %i bytes\n", sizeof(a));
  printf("El tamaño de *b: %i bytes\n", sizeof(*b));
  printf("El tamaño de **c: %i bytes\n\n", sizeof(**c));
  printf("El tamaño de a: %i bytes\n", sizeof(d));
  printf("El tamaño de *b: %i bytes\n", sizeof(*e));
  printf("El tamaño de **c: %i bytes\n\n", sizeof(**f));
  printf("El tamaño de a: %i bytes\n", sizeof(g));
  printf("El tamaño de *b: %i bytes\n", sizeof(*h));
  printf("El tamaño de **c: %i bytes\n\n", sizeof(**i));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xea8(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xeb2(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xe75(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xe7f(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xe8a(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xee4(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xeef(%rip),%r14
mov    %r14,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xef7(%rip),%r15
mov    %r15,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xeac(%rip),%rbx
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [28 x i8] c"\0AEl tama\C3\B1o de a: %i bytes\0A\00"
@.str.1 = [28 x i8] c"El tama\C3\B1o de *b: %i bytes\0A\00"
@.str.2 = [30 x i8] c"El tama\C3\B1o de **c: %i bytes\0A\0A\00"
@.str.3 = [27 x i8] c"El tama\C3\B1o de a: %i bytes\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32**
%5 = alloca double
%6 = alloca double*
%7 = alloca double**
%8 = alloca i8
%9 = alloca i8*
%10 = alloca i8**
store i32 0, i32* %1
%11 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 4)
%12 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 4)
%13 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 4)
%14 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 8)
%15 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 8)
%16 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 8)
%17 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 1)
%18 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 1)
%19 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 1)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"\0AEl tama\C3\B1o de a: %i bytes\0A\00"
@.str.1 = [28 x i8] c"El tama\C3\B1o de *b: %i bytes\0A\00"
@.str.2 = [30 x i8] c"El tama\C3\B1o de **c: %i bytes\0A\0A\00"
@.str.3 = [27 x i8] c"El tama\C3\B1o de a: %i bytes\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 4)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 8)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 8)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 8)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 1)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 1)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 1)
ret i32 0
}