#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 */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char a[4][6];
  int i, j;
  for (i = 0; i < 4; ++i) {
    for (j = 0; j < 6; ++j) {
      printf("&a[%d][%d]:%p ", 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   $0x6,-0x28(%rbp)
jge    1179 <main+0x69>
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
movslq -0x24(%rbp),%rax
lea    -0x20(%rbp),%rcx
imul   $0x6,%rax,%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    $0x20,%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>
lea    0x4(%rsp),%rcx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x5(%rsp),%rcx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x6(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x7(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x8(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x9(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xa(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xb(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xc(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x11(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x12(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x13(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x14(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x15(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x16(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x17(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"&a[%d][%d]:%p \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x [6 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, 6
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 [6 x i8]], [4 x [6 x i8]]* %2, i64 0, i64 %16
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [6 x i8], [6 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"&a[%d][%d]:%p \00"
define i32 @main() {
%1 = alloca [4 x [6 x i8]]
%2 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 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 [6 x i8]], [4 x [6 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 [6 x i8]], [4 x [6 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 [6 x i8]], [4 x [6 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 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 x i8]]* %1, i64 0, i64 0, i64 4
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 0, i32 4, i8* %10)
%12 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 x i8]]* %1, i64 0, i64 0, i64 5
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 0, i32 5, i8* %12)
%14 = call i32 @putchar(i32 10)
%15 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 x i8]]* %1, i64 0, i64 1, i64 0
%16 = 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* %15)
%17 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 x i8]]* %1, i64 0, i64 1, i64 1
%18 = 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* %17)
%19 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 x i8]]* %1, i64 0, i64 1, i64 2
%20 = 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* %19)
%21 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 x i8]]* %1, i64 0, i64 1, i64 3
%22 = 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* %21)
%23 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 x i8]]* %1, i64 0, i64 1, i64 4
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 1, i32 4, i8* %23)
%25 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 x i8]]* %1, i64 0, i64 1, i64 5
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 1, i32 5, i8* %25)
%27 = call i32 @putchar(i32 10)
%28 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 x i8]]* %1, i64 0, i64 2, i64 0
%29 = 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* %28)
%30 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 x i8]]* %1, i64 0, i64 2, i64 1
%31 = 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* %30)
%32 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 x i8]]* %1, i64 0, i64 2, i64 2
%33 = 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* %32)
%34 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 x i8]]* %1, i64 0, i64 2, i64 3
%35 = 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* %34)
%36 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 x i8]]* %1, i64 0, i64 2, i64 4
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 2, i32 4, i8* %36)
%38 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 x i8]]* %1, i64 0, i64 2, i64 5
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 2, i32 5, i8* %38)
%40 = call i32 @putchar(i32 10)
%41 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 x i8]]* %1, i64 0, i64 3, i64 0
%42 = 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* %41)
%43 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 x i8]]* %1, i64 0, i64 3, i64 1
%44 = 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* %43)
%45 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 x i8]]* %1, i64 0, i64 3, i64 2
%46 = 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* %45)
%47 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 x i8]]* %1, i64 0, i64 3, i64 3
%48 = 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* %47)
%49 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 x i8]]* %1, i64 0, i64 3, i64 4
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 3, i32 4, i8* %49)
%51 = getelementptr inbounds [4 x [6 x i8]], [4 x [6 x i8]]* %1, i64 0, i64 3, i64 5
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 3, i32 5, i8* %51)
%53 = call i32 @putchar(i32 10)
ret i32 0
}