int main() {
  unsigned char a[4][4];
  int i;
  int j;
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 4; j++) {
      printf("[%d][%d] %08x ", i, j, &a[i][j]);
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x4,-0x24(%rbp)
jge    1195 <main+0x85>
movl   $0x0,-0x28(%rbp)
cmpl   $0x4,-0x28(%rbp)
jge    1179 <main+0x69>
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
movslq -0x24(%rbp),%rax
lea    -0x20(%rbp),%rcx
shl    $0x2,%rax
add    %rax,%rcx
movslq -0x28(%rbp),%rax
add    %rax,%rcx
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1137 <main+0x27>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
mov    %rsp,%rcx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1(%rsp),%rcx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x2(%rsp),%rcx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x3(%rsp),%rcx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x4(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x5(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x6(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x7(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x8(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x9(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xa(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xb(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xc(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"[%d][%d] %08x \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x [4 x i8]]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %5
5: ; preds = %27, %0
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 4
br i1 %7, label %8, label %30
8: ; preds = %5
store i32 0, i32* %4
br label %9
9: ; preds = %22, %8
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 4
br i1 %11, label %12, label %25
12: ; preds = %9
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [4 x [4 x i8]], [4 x [4 x i8]]* %2, i64 0, i64 %16
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [4 x i8], [4 x i8]* %17, i64 0, i64 %19
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14, i8* %20)
br label %22
22: ; preds = %12
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 1
store i32 %24, i32* %4
br label %9
25: ; preds = %9
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %27
27: ; preds = %25
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 1
store i32 %29, i32* %3
br label %5
30: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"[%d][%d] %08x \00"
define i32 @main() {
%1 = alloca [4 x [4 x i8]]
%2 = getelementptr inbounds [4 x [4 x i8]], [4 x [4 x i8]]* %1, i64 0, i64 0, i64 0
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 0, i32 0, i8* %2)
%4 = getelementptr inbounds [4 x [4 x i8]], [4 x [4 x i8]]* %1, i64 0, i64 0, i64 1
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 0, i32 1, i8* %4)
%6 = getelementptr inbounds [4 x [4 x i8]], [4 x [4 x i8]]* %1, i64 0, i64 0, i64 2
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 0, i32 2, i8* %6)
%8 = getelementptr inbounds [4 x [4 x i8]], [4 x [4 x i8]]* %1, i64 0, i64 0, i64 3
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 0, i32 3, i8* %8)
%10 = call i32 @putchar(i32 10)
%11 = getelementptr inbounds [4 x [4 x i8]], [4 x [4 x i8]]* %1, i64 0, i64 1, i64 0
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i8* %11)
%13 = getelementptr inbounds [4 x [4 x i8]], [4 x [4 x i8]]* %1, i64 0, i64 1, i64 1
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i8* %13)
%15 = getelementptr inbounds [4 x [4 x i8]], [4 x [4 x i8]]* %1, i64 0, i64 1, i64 2
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i8* %15)
%17 = getelementptr inbounds [4 x [4 x i8]], [4 x [4 x i8]]* %1, i64 0, i64 1, i64 3
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 1, i32 3, i8* %17)
%19 = call i32 @putchar(i32 10)
%20 = getelementptr inbounds [4 x [4 x i8]], [4 x [4 x i8]]* %1, i64 0, i64 2, i64 0
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 2, i32 0, i8* %20)
%22 = getelementptr inbounds [4 x [4 x i8]], [4 x [4 x i8]]* %1, i64 0, i64 2, i64 1
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 2, i32 1, i8* %22)
%24 = getelementptr inbounds [4 x [4 x i8]], [4 x [4 x i8]]* %1, i64 0, i64 2, i64 2
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 2, i32 2, i8* %24)
%26 = getelementptr inbounds [4 x [4 x i8]], [4 x [4 x i8]]* %1, i64 0, i64 2, i64 3
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 2, i32 3, i8* %26)
%28 = call i32 @putchar(i32 10)
%29 = getelementptr inbounds [4 x [4 x i8]], [4 x [4 x i8]]* %1, i64 0, i64 3, i64 0
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 3, i32 0, i8* %29)
%31 = getelementptr inbounds [4 x [4 x i8]], [4 x [4 x i8]]* %1, i64 0, i64 3, i64 1
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 3, i32 1, i8* %31)
%33 = getelementptr inbounds [4 x [4 x i8]], [4 x [4 x i8]]* %1, i64 0, i64 3, i64 2
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 3, i32 2, i8* %33)
%35 = getelementptr inbounds [4 x [4 x i8]], [4 x [4 x i8]]* %1, i64 0, i64 3, i64 3
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 3, i32 3, i8* %35)
%37 = call i32 @putchar(i32 10)
ret i32 0
}