#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*/ my_putchar(char);
int /*<<< orphan*/ my_putstr(char *);
int printArray(char **array) {
  int i;
  int j;
  i = 0;
  while (i < 9) {
    j = 0;
    while (j < 9) {
      my_putchar(array[i][j]);
      my_putstr(" ");
      j = j + 1;
    }
    my_putstr("\n");
    i = i + 1;
  }
}


x86 assembly (clang, -O0):
<printArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x9,-0x14(%rbp)
jge    119b <printArray+0x7b>
movl   $0x0,-0x18(%rbp)
cmpl   $0x9,-0x18(%rbp)
jge    1181 <printArray+0x61>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <my_putchar@plt>
lea    0xe92(%rip),%rdi
call   1040 <my_putstr@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1144 <printArray+0x24>
lea    0xe7a(%rip),%rdi
call   1040 <my_putstr@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1133 <printArray+0x13>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r12
xor    %ebx,%ebx
lea    0xecc(%rip),%r14
lea    0xec7(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r12,%rbx,8),%rax
movsbl (%rax),%edi
call   1030 <my_putchar@plt>
mov    %r14,%rdi
call   1040 <my_putstr@plt>
mov    (%r12,%rbx,8),%rax
movsbl 0x1(%rax),%edi
call   1030 <my_putchar@plt>
mov    %r14,%rdi
call   1040 <my_putstr@plt>
mov    (%r12,%rbx,8),%rax
movsbl 0x2(%rax),%edi
call   1030 <my_putchar@plt>
mov    %r14,%rdi
call   1040 <my_putstr@plt>
mov    (%r12,%rbx,8),%rax
movsbl 0x3(%rax),%edi
call   1030 <my_putchar@plt>
mov    %r14,%rdi
call   1040 <my_putstr@plt>
mov    (%r12,%rbx,8),%rax
movsbl 0x4(%rax),%edi
call   1030 <my_putchar@plt>
mov    %r14,%rdi
call   1040 <my_putstr@plt>
mov    (%r12,%rbx,8),%rax
movsbl 0x5(%rax),%edi
call   1030 <my_putchar@plt>
mov    %r14,%rdi
call   1040 <my_putstr@plt>
mov    (%r12,%rbx,8),%rax
movsbl 0x6(%rax),%edi
call   1030 <my_putchar@plt>
mov    %r14,%rdi
call   1040 <my_putstr@plt>
mov    (%r12,%rbx,8),%rax
movsbl 0x7(%rax),%edi
call   1030 <my_putchar@plt>
mov    %r14,%rdi
call   1040 <my_putstr@plt>
mov    (%r12,%rbx,8),%rax
movsbl 0x8(%rax),%edi
call   1030 <my_putchar@plt>
mov    %r14,%rdi
call   1040 <my_putstr@plt>
mov    %r15,%rdi
call   1040 <my_putstr@plt>
add    $0x1,%rbx
cmp    $0x9,%rbx
jne    1140 <printArray+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @printArray(i8** nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %50, %2 ]
%4 = getelementptr inbounds i8*, i8** %0, i64 %3
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
%7 = tail call i32 @my_putchar(i8 signext %6)
%8 = tail call i32 @my_putstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = tail call i32 @my_putchar(i8 signext %11)
%13 = tail call i32 @my_putstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 2
%16 = load i8, i8* %15
%17 = tail call i32 @my_putchar(i8 signext %16)
%18 = tail call i32 @my_putstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%19 = load i8*, i8** %4
%20 = getelementptr inbounds i8, i8* %19, i64 3
%21 = load i8, i8* %20
%22 = tail call i32 @my_putchar(i8 signext %21)
%23 = tail call i32 @my_putstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%24 = load i8*, i8** %4
%25 = getelementptr inbounds i8, i8* %24, i64 4
%26 = load i8, i8* %25
%27 = tail call i32 @my_putchar(i8 signext %26)
%28 = tail call i32 @my_putstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%29 = load i8*, i8** %4
%30 = getelementptr inbounds i8, i8* %29, i64 5
%31 = load i8, i8* %30
%32 = tail call i32 @my_putchar(i8 signext %31)
%33 = tail call i32 @my_putstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%34 = load i8*, i8** %4
%35 = getelementptr inbounds i8, i8* %34, i64 6
%36 = load i8, i8* %35
%37 = tail call i32 @my_putchar(i8 signext %36)
%38 = tail call i32 @my_putstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%39 = load i8*, i8** %4
%40 = getelementptr inbounds i8, i8* %39, i64 7
%41 = load i8, i8* %40
%42 = tail call i32 @my_putchar(i8 signext %41)
%43 = tail call i32 @my_putstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%44 = load i8*, i8** %4
%45 = getelementptr inbounds i8, i8* %44, i64 8
%46 = load i8, i8* %45
%47 = tail call i32 @my_putchar(i8 signext %46)
%48 = tail call i32 @my_putstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%49 = tail call i32 @my_putstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%50 = add nuw nsw i64 %3, 1
%51 = icmp eq i64 %50, 9
br i1 %51, label %52, label %2
52: ; preds = %2
ret i32 undef
}