#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*/ make_9x9(int **);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
int main() {
  int a[9][9], i, k;
  make_9x9(a);
  i = 0;
  while (i < 9) {
    k = 0;
    while (k < 9) {
      printf("%d ", a[i][k]);
      k += 1;
    }
    puts("");
    i += 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x150(%rbp),%rdi
call   1050 <make_9x9@plt>
movl   $0x0,-0x154(%rbp)
cmpl   $0x9,-0x154(%rbp)
jge    11db <main+0xab>
movl   $0x0,-0x158(%rbp)
cmpl   $0x9,-0x158(%rbp)
jge    11bb <main+0x8b>
movslq -0x154(%rbp),%rcx
lea    -0x150(%rbp),%rax
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
movslq -0x158(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe5e(%rip),%rdi
call   1040 <printf@plt>
mov    -0x158(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x158(%rbp)
jmp    116f <main+0x3f>
lea    0xe41(%rip),%rdi
call   1030 <puts@plt>
mov    -0x154(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x154(%rbp)
jmp    1158 <main+0x28>
xor    %eax,%eax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x148,%rsp
mov    %rsp,%rdi
call   1050 <make_9x9@plt>
mov    $0x20,%ebx
lea    0xeb2(%rip),%r14
xchg   %ax,%ax
mov    -0x20(%rsp,%rbx,1),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
mov    -0x1c(%rsp,%rbx,1),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
mov    -0x18(%rsp,%rbx,1),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
mov    -0x14(%rsp,%rbx,1),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
mov    -0x10(%rsp,%rbx,1),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
mov    -0xc(%rsp,%rbx,1),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
mov    -0x8(%rsp,%rbx,1),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
mov    -0x4(%rsp,%rbx,1),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
mov    (%rsp,%rbx,1),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x24,%rbx
cmp    $0x164,%rbx
jne    1150 <main+0x20>
xor    %eax,%eax
add    $0x148,%rsp
pop    %rbx
pop    %r14
ret

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

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