int main() {
  char a[6] = {0x00};
  char *p = &a[0];
  char *q = &p;
  mtrace();
  printf("&a = %p, &a[0] = %p, &&a[0] = %p\n", &a, &a[0], &a);
  printf("p = %p, q = %p\n");
  two_dimension_array_test();
  crash_test();
  printf("alan update\n");
  printf("alan add 20171013\n");
  printf("hgr update 20171013 1:00\n");
  printf("alan add 20171016_1:31\n");
  printf("alan add \n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x6(%rbp),%rdi
xor    %esi,%esi
mov    $0x6,%edx
call   1040 <memset@plt>
lea    -0x6(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1060 <mtrace@plt>
lea    -0x6(%rbp),%rdx
lea    0xe76(%rip),%rdi
lea    -0x6(%rbp),%rcx
mov    %rcx,%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1070 <two_dimension_array_test@plt>
mov    $0x0,%al
call   1050 <crash_test@plt>
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movw   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
xor    %eax,%eax
call   1060 <mtrace@plt>
lea    0xe93(%rip),%rdi
mov    %rsp,%rcx
mov    %rcx,%rsi
mov    %rcx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe9e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1070 <two_dimension_array_test@plt>
xor    %eax,%eax
call   1050 <crash_test@plt>
lea    0xe92(%rip),%rdi
call   1030 <puts@plt>
lea    0xe92(%rip),%rdi
call   1030 <puts@plt>
lea    0xe98(%rip),%rdi
call   1030 <puts@plt>
lea    0xea5(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"&a = %p, &a[0] = %p, &&a[0] = %p\0A\00"
@.str.1 = [16 x i8] c"p = %p, q = %p\0A\00"
@.str.2 = [13 x i8] c"alan update\0A\00"
@.str.3 = [19 x i8] c"alan add 20171013\0A\00"
@.str.4 = [26 x i8] c"hgr update 20171013 1:00\0A\00"
@.str.5 = [24 x i8] c"alan add 20171016_1:31\0A\00"
@.str.6 = [11 x i8] c"alan add \0A\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = alloca i8*
%3 = alloca i8*
%4 = bitcast [6 x i8]* %1 to i8*
%5 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
store i8* %5, i8** %2
%6 = bitcast i8** %2 to i8*
store i8* %6, i8** %3
%7 = call i32 (...) @mtrace()
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), [6 x i8]* %1, i8* %8, [6 x i8]* %1)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 (...) @two_dimension_array_test()
%12 = call i32 (...) @crash_test()
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c"&a = %p, &a[0] = %p, &&a[0] = %p\0A\00"
@.str.1 = [16 x i8] c"p = %p, q = %p\0A\00"
@str = [12 x i8] c"alan update\00"
@str.7 = [18 x i8] c"alan add 20171013\00"
@str.8 = [25 x i8] c"hgr update 20171013 1:00\00"
@str.9 = [23 x i8] c"alan add 20171016_1:31\00"
@str.10 = [10 x i8] c"alan add \00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (...) @mtrace()
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), [6 x i8]* %1, i8* %2, [6 x i8]* %1)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (...) @two_dimension_array_test()
%7 = call i32 (...) @crash_test()
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.7, i64 0, i64 0))
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.8, i64 0, i64 0))
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.9, i64 0, i64 0))
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.10, i64 0, i64 0))
ret i32 0
}