#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*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int x, y;
  int array[8][8];
  for (x = 0; x < 8; x++) {
    for (y = 0; y < 8; y++) {
      array[x][y] = x * y;
    }
    printf("Array Indices: \n");
    for (x = 0; x < 8; x++) {
      for (y = 0; y < 8; y++) {
        printf("[%d][%d]=%d", x, y, array[x][y]);
      }
    }
    printf("\n");
  }
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    121c <main+0xfc>
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    1182 <main+0x62>
mov    -0x8(%rbp),%edx
imul   -0xc(%rbp),%edx
movslq -0x8(%rbp),%rcx
lea    -0x110(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114a <main+0x2a>
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    1200 <main+0xe0>
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    11ed <main+0xcd>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
movslq -0x8(%rbp),%rcx
lea    -0x110(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11a8 <main+0x88>
jmp    11f2 <main+0xd2>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1197 <main+0x77>
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1139 <main+0x19>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    -0x4(%rbp),%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x100,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0xead(%rip),%rdi
call   1040 <puts@plt>
lea    0x20(%rsp),%r15
lea    0xe90(%rip),%r14
xor    %ecx,%ecx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %ebx,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    -0x1c(%r15),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    -0x18(%r15),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    -0x14(%r15),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    -0x10(%r15),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    -0xc(%r15),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    -0x8(%r15),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x6,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    -0x4(%r15),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x7,%edx
xor    %eax,%eax
call   1050 <printf@plt>
cmp    $0x7,%rbx
je     1237 <main+0xf7>
mov    (%r15),%ecx
add    $0x20,%r15
add    $0x1,%rbx
jmp    1180 <main+0x40>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str.1 = [12 x i8] c"[%d][%d]=%d\00"
@str = [16 x i8] c"Array Indices: \00"
define i32 @main() {
%1 = alloca [8 x [8 x i32]]
%2 = bitcast [8 x [8 x i32]]* %1 to i8*
%3 = bitcast [8 x [8 x i32]]* %1 to i8*
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
br label %5
5: ; preds = %33, %0
%6 = phi i32 [ 0, %0 ], [ %35, %33 ]
%7 = phi i64 [ 0, %0 ], [ %31, %33 ]
%8 = trunc i64 %7 to i32
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 0, i32 %6)
%10 = getelementptr inbounds [8 x [8 x i32]], [8 x [8 x i32]]* %1, i64 0, i64 %7, i64 1
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 1, i32 %11)
%13 = getelementptr inbounds [8 x [8 x i32]], [8 x [8 x i32]]* %1, i64 0, i64 %7, i64 2
%14 = load i32, i32* %13
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 2, i32 %14)
%16 = getelementptr inbounds [8 x [8 x i32]], [8 x [8 x i32]]* %1, i64 0, i64 %7, i64 3
%17 = load i32, i32* %16
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 3, i32 %17)
%19 = getelementptr inbounds [8 x [8 x i32]], [8 x [8 x i32]]* %1, i64 0, i64 %7, i64 4
%20 = load i32, i32* %19
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 4, i32 %20)
%22 = getelementptr inbounds [8 x [8 x i32]], [8 x [8 x i32]]* %1, i64 0, i64 %7, i64 5
%23 = load i32, i32* %22
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 5, i32 %23)
%25 = getelementptr inbounds [8 x [8 x i32]], [8 x [8 x i32]]* %1, i64 0, i64 %7, i64 6
%26 = load i32, i32* %25
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 6, i32 %26)
%28 = getelementptr inbounds [8 x [8 x i32]], [8 x [8 x i32]]* %1, i64 0, i64 %7, i64 7
%29 = load i32, i32* %28
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 7, i32 %29)
%31 = add nuw nsw i64 %7, 1
%32 = icmp eq i64 %31, 8
br i1 %32, label %36, label %33
33: ; preds = %5
%34 = getelementptr inbounds [8 x [8 x i32]], [8 x [8 x i32]]* %1, i64 0, i64 %31, i64 0
%35 = load i32, i32* %34
br label %5
36: ; preds = %5
%37 = tail call i32 @putchar(i32 10)
%38 = tail call i32 (...) @getchar()
ret i32 0
}