void main() {
  char a[3][4] = {"mnop", "abcd", "efgh"};
  int ai[3][2] = {1, 3, 5};
  int am[3][2] = {(0, 1), (2, 3), (4, 5)};
  int *p = am[0];
  int i, j;
  printf("sizeof a[0] = %d,a[1] = %d,a[2] = %d\n", sizeof(a[0]), sizeof(a[1]),
         sizeof(a[2]));
  printf("address a[0] = %x,a[1] = %x,a[2] = %x\n", &a[0], &a[1], &a[2]);
  printf("address a[0] = %x,a[1] = %x,a[2] = %x\n", a[0], a[1], a[2]);
  printf("address a[0] = %p,a[1] = %p,a[2] = %p\n", &a[0], &a[1], &a[2]);
  printf("address a[1][0] = %x,a[1][1] = %x,a[1][2] = %x,a[1][3] = %x\n",
         &a[1][0], &a[1][1], &a[1][2], &a[1][3]);
  printf("address ai[1][2] - ai[0][2] = %p\n", &ai[1][1] - &ai[0][1]);
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 2; j++) {
      printf("%d ", ai[i][j]);
    }
    printf("\n");
  }
  printf("%d", p[0]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xedf(%rip),%eax
mov    %eax,-0x4(%rbp)
mov    0xedd(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xedc(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xed9(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xed6(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    -0x50(%rbp),%rax
mov    %rax,-0x58(%rbp)
lea    0xecb(%rip),%rdi
mov    $0x4,%ecx
mov    %rcx,%rsi
mov    %rcx,%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0xc(%rbp),%rsi
lea    -0xc(%rbp),%rdx
add    $0x4,%rdx
lea    -0xc(%rbp),%rcx
add    $0x8,%rcx
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0xc(%rbp),%rsi
lea    -0xc(%rbp),%rdx
add    $0x4,%rdx
lea    -0xc(%rbp),%rcx
add    $0x8,%rcx
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0xc(%rbp),%rsi
lea    -0xc(%rbp),%rdx
add    $0x4,%rdx
lea    -0xc(%rbp),%rcx
add    $0x8,%rcx
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0xc(%rbp),%rsi
add    $0x4,%rsi
lea    -0xc(%rbp),%rdx
add    $0x4,%rdx
add    $0x1,%rdx
lea    -0xc(%rbp),%rcx
add    $0x4,%rcx
add    $0x2,%rcx
lea    -0xc(%rbp),%r8
add    $0x4,%r8
add    $0x3,%r8
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rsi
add    $0x8,%rsi
add    $0x4,%rsi
lea    -0x30(%rbp),%rax
add    $0x4,%rax
sub    %rax,%rsi
sar    $0x2,%rsi
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x5c(%rbp)
cmpl   $0x3,-0x5c(%rbp)
jge    12c8 <main+0x1b8>
movl   $0x0,-0x60(%rbp)
cmpl   $0x2,-0x60(%rbp)
jge    12ac <main+0x19c>
movslq -0x5c(%rbp),%rcx
lea    -0x30(%rbp),%rax
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x60(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1270 <main+0x160>
lea    0xdb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    125f <main+0x14f>
mov    -0x58(%rbp),%rax
mov    (%rax),%esi
lea    0xe4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    0xed7(%rip),%eax
mov    %eax,0x10(%rsp)
mov    0xec4(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x10(%rsp),%r14
lea    0xebf(%rip),%rdi
mov    $0x4,%esi
mov    $0x4,%edx
mov    $0x4,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc(%rsp),%r15
lea    0xec3(%rip),%r12
lea    0x8(%rsp),%rbx
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb8(%rip),%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd(%rsp),%rdx
lea    0xe(%rsp),%rcx
lea    0xf(%rsp),%r8
lea    0xeb9(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee5(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef4(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe82(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.a = [3 x [4 x i8]] [[4 x i8] c"mnop", [4 x i8] c"abcd", [4 x i8] c"efgh"]
@__const.main.ai = [3 x [2 x i32]] [[2 x i32] [i32 1, i32 3], [2 x i32] [i32 5, i32 0], [2 x i32] zeroinitializer]
@__const.main.am = [3 x [2 x i32]] [[2 x i32] [i32 1, i32 3], [2 x i32] [i32 5, i32 0], [2 x i32] zeroinitializer]
@.str = [38 x i8] c"sizeof a[0] = %d,a[1] = %d,a[2] = %d\0A\00"
@.str.1 = [39 x i8] c"address a[0] = %x,a[1] = %x,a[2] = %x\0A\00"
@.str.2 = [39 x i8] c"address a[0] = %p,a[1] = %p,a[2] = %p\0A\00"
@.str.3 = [61 x i8] c"address a[1][0] = %x,a[1][1] = %x,a[1][2] = %x,a[1][3] = %x\0A\00"
@.str.4 = [34 x i8] c"address ai[1][2] - ai[0][2] = %p\0A\00"
@.str.5 = [4 x i8] c"%d \00"
@.str.6 = [2 x i8] c"\0A\00"
@.str.7 = [3 x i8] c"%d\00"
define void @main() {
%1 = alloca [3 x [4 x i8]]
%2 = alloca [3 x [2 x i32]]
%3 = alloca [3 x [2 x i32]]
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = bitcast [3 x [4 x i8]]* %1 to i8*
%8 = bitcast [3 x [2 x i32]]* %2 to i8*
%9 = bitcast [3 x [2 x i32]]* %3 to i8*
%10 = getelementptr inbounds [3 x [2 x i32]], [3 x [2 x i32]]* %3, i64 0, i64 0
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
store i32* %11, i32** %4
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i64 4, i64 4, i64 4)
%13 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 0
%14 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 1
%15 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 2
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), [4 x i8]* %13, [4 x i8]* %14, [4 x i8]* %15)
%17 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 0
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %17, i64 0, i64 0
%19 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 1
%20 = getelementptr inbounds [4 x i8], [4 x i8]* %19, i64 0, i64 0
%21 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 2
%22 = getelementptr inbounds [4 x i8], [4 x i8]* %21, i64 0, i64 0
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i8* %18, i8* %20, i8* %22)
%24 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 0
%25 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 1
%26 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 2
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), [4 x i8]* %24, [4 x i8]* %25, [4 x i8]* %26)
%28 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 1
%29 = getelementptr inbounds [4 x i8], [4 x i8]* %28, i64 0, i64 0
%30 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 1
%31 = getelementptr inbounds [4 x i8], [4 x i8]* %30, i64 0, i64 1
%32 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 1
%33 = getelementptr inbounds [4 x i8], [4 x i8]* %32, i64 0, i64 2
%34 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 1
%35 = getelementptr inbounds [4 x i8], [4 x i8]* %34, i64 0, i64 3
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.3, i64 0, i64 0), i8* %29, i8* %31, i8* %33, i8* %35)
%37 = getelementptr inbounds [3 x [2 x i32]], [3 x [2 x i32]]* %2, i64 0, i64 1
%38 = getelementptr inbounds [2 x i32], [2 x i32]* %37, i64 0, i64 1
%39 = getelementptr inbounds [3 x [2 x i32]], [3 x [2 x i32]]* %2, i64 0, i64 0
%40 = getelementptr inbounds [2 x i32], [2 x i32]* %39, i64 0, i64 1
%41 = ptrtoint i32* %38 to i64
%42 = ptrtoint i32* %40 to i64
%43 = sub i64 %41, %42
%44 = sdiv exact i64 %43, 4
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i64 %44)
store i32 0, i32* %5
br label %46
46: ; preds = %67, %0
%47 = load i32, i32* %5
%48 = icmp slt i32 %47, 3
br i1 %48, label %49, label %70
49: ; preds = %46
store i32 0, i32* %6
br label %50
50: ; preds = %62, %49
%51 = load i32, i32* %6
%52 = icmp slt i32 %51, 2
br i1 %52, label %53, label %65
53: ; preds = %50
%54 = load i32, i32* %5
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [3 x [2 x i32]], [3 x [2 x i32]]* %2, i64 0, i64 %55
%57 = load i32, i32* %6
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [2 x i32], [2 x i32]* %56, i64 0, i64 %58
%60 = load i32, i32* %59
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %60)
br label %62
62: ; preds = %53
%63 = load i32, i32* %6
%64 = add nsw i32 %63, 1
store i32 %64, i32* %6
br label %50
65: ; preds = %50
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %67
67: ; preds = %65
%68 = load i32, i32* %5
%69 = add nsw i32 %68, 1
store i32 %69, i32* %5
br label %46
70: ; preds = %46
%71 = load i32*, i32** %4
%72 = getelementptr inbounds i32, i32* %71, i64 0
%73 = load i32, i32* %72
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %73)
ret void
}

LLVM IR (-O2):
@__const.main.a = [3 x [4 x i8]] [[4 x i8] c"mnop", [4 x i8] c"abcd", [4 x i8] c"efgh"]
@.str = [38 x i8] c"sizeof a[0] = %d,a[1] = %d,a[2] = %d\0A\00"
@.str.1 = [39 x i8] c"address a[0] = %x,a[1] = %x,a[2] = %x\0A\00"
@.str.2 = [39 x i8] c"address a[0] = %p,a[1] = %p,a[2] = %p\0A\00"
@.str.3 = [61 x i8] c"address a[1][0] = %x,a[1][1] = %x,a[1][2] = %x,a[1][3] = %x\0A\00"
@.str.4 = [34 x i8] c"address ai[1][2] - ai[0][2] = %p\0A\00"
@.str.5 = [4 x i8] c"%d \00"
@.str.7 = [3 x i8] c"%d\00"
define void @main() {
%1 = alloca [3 x [4 x i8]]
%2 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i64 4, i64 4, i64 4)
%4 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 0
%5 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 1
%6 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 2
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), [4 x i8]* %4, [4 x i8]* %5, [4 x i8]* %6)
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i8* %2, i8* %8, i8* %9)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), [4 x i8]* %4, [4 x i8]* %5, [4 x i8]* %6)
%12 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 1, i64 1
%13 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 1, i64 2
%14 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 1, i64 3
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @.str.3, i64 0, i64 0), i8* %8, i8* %12, i8* %13, i8* %14)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i64 2)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 1)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 3)
%19 = call i32 @putchar(i32 10)
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 5)
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 0)
%22 = call i32 @putchar(i32 10)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 0)
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 0)
%25 = call i32 @putchar(i32 10)
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 1)
ret void
}