int main() {
  int a[3][4] = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23};
  printf("address:a[0][0]\n");
  printf("%d,%d\n", a, *a);
  printf("%d,%d\n", a[0], *(a + 0));
  printf("%d,%d\n", &a[0], &a[0][0]);
  printf("address:a[1][0]\n");
  printf("%d,%d\n", a[1], a + 1);
  printf("%d,%d\n", &a[1][0], *(a + 1) + 0);
  printf("address:a[2][0]\n");
  printf("%d,%d\n", a[2], *(a + 2));
  printf("%d,%d\n", &a[2], a + 2);
  printf("value of a[1][0]\n");
  printf("%d,%d\n", a[1][0], *(*(a + 1) + 0));
  printf("value of a[2][0]\n");
  printf("%d,%d\n", *a[2], *(*(a + 2) + 0));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x30,%edx
call   1040 <memcpy@plt>
lea    0xeec(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rsi
lea    -0x30(%rbp),%rdx
lea    0xee7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rsi
lea    -0x30(%rbp),%rdx
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rsi
lea    -0x30(%rbp),%rdx
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rsi
add    $0x10,%rsi
lea    -0x30(%rbp),%rdx
add    $0x10,%rdx
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rsi
add    $0x10,%rsi
lea    -0x30(%rbp),%rdx
add    $0x10,%rdx
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rsi
add    $0x20,%rsi
lea    -0x30(%rbp),%rdx
add    $0x20,%rdx
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rsi
add    $0x20,%rsi
lea    -0x30(%rbp),%rdx
add    $0x20,%rdx
lea    0xe27(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe42(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%esi
mov    -0x20(%rbp),%edx
lea    0xe05(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xde3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x38,%rsp
movaps 0xeee(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed2(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb6(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x20(%rsp),%r14
lea    0x10(%rsp),%r15
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xec5(%rip),%r12
mov    %rsp,%rbx
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea2(%rip),%rdi
call   1030 <puts@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe86(%rip),%rdi
call   1030 <puts@plt>
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe6a(%rip),%rdi
call   1030 <puts@plt>
mov    0x10(%rsp),%edx
mov    %r12,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe5f(%rip),%rdi
call   1030 <puts@plt>
mov    0x20(%rsp),%edx
mov    %r12,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.a = [3 x [4 x i32]] [[4 x i32] [i32 1, i32 3, i32 5, i32 7], [4 x i32] [i32 9, i32 11, i32 13, i32 15], [4 x i32] [i32 17, i32 19, i32 21, i32 23]]
@.str = [17 x i8] c"address:a[0][0]\0A\00"
@.str.1 = [7 x i8] c"%d,%d\0A\00"
@.str.2 = [17 x i8] c"address:a[1][0]\0A\00"
@.str.3 = [17 x i8] c"address:a[2][0]\0A\00"
@.str.4 = [18 x i8] c"value of a[1][0]\0A\00"
@.str.5 = [18 x i8] c"value of a[2][0]\0A\00"
define i32 @main() {
%1 = alloca [3 x [4 x i32]]
%2 = bitcast [3 x [4 x i32]]* %1 to i8*
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 0
%5 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 0
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), [4 x i32]* %4, i32* %6)
%8 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 0
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %8, i64 0, i64 0
%10 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 0
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %10, i64 0
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %11, i64 0, i64 0
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %9, i32* %12)
%14 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 0
%15 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 0
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 0
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), [4 x i32]* %14, i32* %16)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%19 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 1
%20 = getelementptr inbounds [4 x i32], [4 x i32]* %19, i64 0, i64 0
%21 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 0
%22 = getelementptr inbounds [4 x i32], [4 x i32]* %21, i64 1
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %20, [4 x i32]* %22)
%24 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 1
%25 = getelementptr inbounds [4 x i32], [4 x i32]* %24, i64 0, i64 0
%26 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 0
%27 = getelementptr inbounds [4 x i32], [4 x i32]* %26, i64 1
%28 = getelementptr inbounds [4 x i32], [4 x i32]* %27, i64 0, i64 0
%29 = getelementptr inbounds i32, i32* %28, i64 0
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %25, i32* %29)
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%32 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 2
%33 = getelementptr inbounds [4 x i32], [4 x i32]* %32, i64 0, i64 0
%34 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 0
%35 = getelementptr inbounds [4 x i32], [4 x i32]* %34, i64 2
%36 = getelementptr inbounds [4 x i32], [4 x i32]* %35, i64 0, i64 0
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %33, i32* %36)
%38 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 2
%39 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 0
%40 = getelementptr inbounds [4 x i32], [4 x i32]* %39, i64 2
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), [4 x i32]* %38, [4 x i32]* %40)
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%43 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 1
%44 = getelementptr inbounds [4 x i32], [4 x i32]* %43, i64 0, i64 0
%45 = load i32, i32* %44
%46 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 0
%47 = getelementptr inbounds [4 x i32], [4 x i32]* %46, i64 1
%48 = getelementptr inbounds [4 x i32], [4 x i32]* %47, i64 0, i64 0
%49 = getelementptr inbounds i32, i32* %48, i64 0
%50 = load i32, i32* %49
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %45, i32 %50)
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0))
%53 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 2
%54 = getelementptr inbounds [4 x i32], [4 x i32]* %53, i64 0, i64 0
%55 = load i32, i32* %54
%56 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 0
%57 = getelementptr inbounds [4 x i32], [4 x i32]* %56, i64 2
%58 = getelementptr inbounds [4 x i32], [4 x i32]* %57, i64 0, i64 0
%59 = getelementptr inbounds i32, i32* %58, i64 0
%60 = load i32, i32* %59
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %55, i32 %60)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [3 x [4 x i32]] [[4 x i32] [i32 1, i32 3, i32 5, i32 7], [4 x i32] [i32 9, i32 11, i32 13, i32 15], [4 x i32] [i32 17, i32 19, i32 21, i32 23]]
@.str.1 = [7 x i8] c"%d,%d\0A\00"
@str = [16 x i8] c"address:a[0][0]\00"
@str.6 = [16 x i8] c"address:a[1][0]\00"
@str.7 = [16 x i8] c"address:a[2][0]\00"
@str.8 = [17 x i8] c"value of a[1][0]\00"
@str.9 = [17 x i8] c"value of a[2][0]\00"
define i32 @main() {
%1 = alloca [3 x [4 x i32]]
%2 = bitcast [3 x [4 x i32]]* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%4 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 0
%5 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 0, i64 0
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), [4 x i32]* %4, i32* %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %5, i32* %5)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), [4 x i32]* %4, i32* %5)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.6, i64 0, i64 0))
%10 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 1, i64 0
%11 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 1
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %10, [4 x i32]* %11)
%13 = getelementptr inbounds [4 x i32], [4 x i32]* %11, i64 0, i64 0
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %10, i32* %13)
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.7, i64 0, i64 0))
%16 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 2
%17 = getelementptr inbounds [4 x i32], [4 x i32]* %16, i64 0, i64 0
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %17, i32* %17)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), [4 x i32]* %16, [4 x i32]* %16)
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.8, i64 0, i64 0))
%21 = load i32, i32* %10
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %21, i32 %21)
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.9, i64 0, i64 0))
%24 = load i32, i32* %17
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %24, i32 %24)
ret i32 0
}