#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 *, ...);
void print_array(int board[10][10]) {
  for (int i = 0; i < 10; i += 1) {
    printf("\t");
    for (int j = 0; j < 10; j += 1) {
      printf("%c ", board[i][j]);
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    119a <print_array+0x8a>
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    117e <print_array+0x6e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1142 <print_array+0x32>
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <print_array+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
mov    $0x24,%ebx
lea    0xecc(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    -0x24(%r15,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x20(%r15,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x1c(%r15,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x18(%r15,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x14(%r15,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x10(%r15,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0xc(%r15,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x8(%r15,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x4(%r15,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r15,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x28,%rbx
cmp    $0x1b4,%rbx
jne    1140 <print_array+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

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