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

/* Variables and functions */
int /*<<< orphan*/ fun(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  double *p = NULL;
  char a[100] = {'\0'};
  double *(*b)[3][6];
  int d = 0;
  printf("##[sjin] sizeof(int):\t%d \n", sizeof(int));
  printf("##[sjin] sizeof(d):\t%d \n", sizeof(d));
  printf("##[sjin] sizeof d:\t%d \n\n", sizeof d);
  printf("##[sjin] sizeof(p):\t%d \n", sizeof(p));
  printf("##[sjin] sizeof(*p):\t%d \n", sizeof(*p));
  printf("##[sjin] sizeof(a):\t%d \n", sizeof(a));
  printf("##[sjin] sizeof(a[0]):\t%d \n", sizeof(a[0]));
  printf("##[sjin] sizeof(&a):\t%d \n", sizeof(&a));
  printf("##[sjin] sizeof(&a[0]):\t%d \n", sizeof(&a[0]));
  printf("##[sjin] sizeof(b):\t%d \n", sizeof(b));
  printf("##[sjin] sizeof(*b):\t%d \n", sizeof(*b));
  printf("##[sjin] sizeof(**b):\t%d \n", sizeof(**b));
  printf("##[sjin] sizeof(***b):\t%d \n", sizeof(***b));
  printf("##[sjin] sizeof(****b):\t%d \n", sizeof(****b));
  fun(a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movq   $0x0,-0x8(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1050 <memset@plt>
movl   $0x0,-0x7c(%rbp)
lea    0xe9f(%rip),%rdi
mov    $0x4,%esi
call   1040 <printf@plt>
lea    0xea9(%rip),%rdi
mov    $0x4,%esi
call   1040 <printf@plt>
lea    0xeb1(%rip),%rdi
mov    $0x4,%esi
call   1040 <printf@plt>
lea    0xeb9(%rip),%rdi
mov    $0x8,%esi
call   1040 <printf@plt>
lea    0xec1(%rip),%rdi
mov    $0x8,%esi
call   1040 <printf@plt>
lea    0xeca(%rip),%rdi
mov    $0x64,%esi
call   1040 <printf@plt>
lea    0xed2(%rip),%rdi
mov    $0x1,%esi
call   1040 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0x8,%esi
call   1040 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0x8,%esi
call   1040 <printf@plt>
lea    0xef2(%rip),%rdi
mov    $0x8,%esi
call   1040 <printf@plt>
lea    0xefa(%rip),%rdi
mov    $0x90,%esi
call   1040 <printf@plt>
lea    0xf03(%rip),%rdi
mov    $0x30,%esi
call   1040 <printf@plt>
lea    0xf0d(%rip),%rdi
mov    $0x8,%esi
call   1040 <printf@plt>
lea    0xf18(%rip),%rdi
mov    $0x8,%esi
call   1040 <printf@plt>
lea    -0x70(%rbp),%rdi
call   1030 <fun@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x68,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movl   $0x0,0x60(%rsp)
lea    0xead(%rip),%rdi
mov    $0x4,%esi
call   1040 <printf@plt>
lea    0xeb7(%rip),%rdi
mov    $0x4,%esi
call   1040 <printf@plt>
lea    0xebf(%rip),%rdi
mov    $0x4,%esi
call   1040 <printf@plt>
lea    0xec7(%rip),%rdi
mov    $0x8,%esi
call   1040 <printf@plt>
lea    0xecf(%rip),%rdi
mov    $0x8,%esi
call   1040 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x64,%esi
call   1040 <printf@plt>
lea    0xee0(%rip),%rdi
mov    $0x1,%esi
call   1040 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x8,%esi
call   1040 <printf@plt>
lea    0xef4(%rip),%rdi
mov    $0x8,%esi
call   1040 <printf@plt>
lea    0xf00(%rip),%rdi
mov    $0x8,%esi
call   1040 <printf@plt>
lea    0xf08(%rip),%rdi
mov    $0x90,%esi
call   1040 <printf@plt>
lea    0xf11(%rip),%rdi
mov    $0x30,%esi
call   1040 <printf@plt>
lea    0xf1b(%rip),%rdi
mov    $0x8,%esi
call   1040 <printf@plt>
lea    0xf26(%rip),%rdi
mov    $0x8,%esi
call   1040 <printf@plt>
mov    %rsp,%rdi
call   1030 <fun@plt>
xor    %eax,%eax
add    $0x68,%rsp
ret

LLVM IR (-O0):
@.str = [27 x i8] c"##[sjin] sizeof(int):\09%d \0A\00"
@.str.1 = [25 x i8] c"##[sjin] sizeof(d):\09%d \0A\00"
@.str.2 = [25 x i8] c"##[sjin] sizeof d:\09%d \0A\0A\00"
@.str.3 = [25 x i8] c"##[sjin] sizeof(p):\09%d \0A\00"
@.str.4 = [26 x i8] c"##[sjin] sizeof(*p):\09%d \0A\00"
@.str.5 = [25 x i8] c"##[sjin] sizeof(a):\09%d \0A\00"
@.str.6 = [28 x i8] c"##[sjin] sizeof(a[0]):\09%d \0A\00"
@.str.7 = [26 x i8] c"##[sjin] sizeof(&a):\09%d \0A\00"
@.str.8 = [29 x i8] c"##[sjin] sizeof(&a[0]):\09%d \0A\00"
@.str.9 = [25 x i8] c"##[sjin] sizeof(b):\09%d \0A\00"
@.str.10 = [26 x i8] c"##[sjin] sizeof(*b):\09%d \0A\00"
@.str.11 = [27 x i8] c"##[sjin] sizeof(**b):\09%d \0A\00"
@.str.12 = [28 x i8] c"##[sjin] sizeof(***b):\09%d \0A\00"
@.str.13 = [29 x i8] c"##[sjin] sizeof(****b):\09%d \0A\00"
define i32 @main() {
%1 = alloca double*
%2 = alloca [100 x i8]
%3 = alloca [3 x [6 x double*]]*
%4 = alloca i32
store double* null, double** %1
%5 = bitcast [100 x i8]* %2 to i8*
store i32 0, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 4)
%7 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 4)
%8 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 4)
%9 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 8)
%10 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 8)
%11 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 100)
%12 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i32 1)
%13 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i32 8)
%14 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0), i32 8)
%15 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i32 8)
%16 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0), i32 144)
%17 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.11, i64 0, i64 0), i32 48)
%18 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0), i32 8)
%19 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.13, i64 0, i64 0), i32 8)
%20 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%21 = call i32 @fun(i8* %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"##[sjin] sizeof(int):\09%d \0A\00"
@.str.1 = [25 x i8] c"##[sjin] sizeof(d):\09%d \0A\00"
@.str.2 = [25 x i8] c"##[sjin] sizeof d:\09%d \0A\0A\00"
@.str.3 = [25 x i8] c"##[sjin] sizeof(p):\09%d \0A\00"
@.str.4 = [26 x i8] c"##[sjin] sizeof(*p):\09%d \0A\00"
@.str.5 = [25 x i8] c"##[sjin] sizeof(a):\09%d \0A\00"
@.str.6 = [28 x i8] c"##[sjin] sizeof(a[0]):\09%d \0A\00"
@.str.7 = [26 x i8] c"##[sjin] sizeof(&a):\09%d \0A\00"
@.str.8 = [29 x i8] c"##[sjin] sizeof(&a[0]):\09%d \0A\00"
@.str.9 = [25 x i8] c"##[sjin] sizeof(b):\09%d \0A\00"
@.str.10 = [26 x i8] c"##[sjin] sizeof(*b):\09%d \0A\00"
@.str.11 = [27 x i8] c"##[sjin] sizeof(**b):\09%d \0A\00"
@.str.12 = [28 x i8] c"##[sjin] sizeof(***b):\09%d \0A\00"
@.str.13 = [29 x i8] c"##[sjin] sizeof(****b):\09%d \0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 4)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 8)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 8)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 100)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i32 1)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i32 8)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0), i32 8)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i32 8)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0), i32 144)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.11, i64 0, i64 0), i32 48)
%15 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0), i32 8)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.13, i64 0, i64 0), i32 8)
%17 = call i32 @fun(i8* %2)
ret i32 0
}