#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*/ printBar();
int /*<<< orphan*/ printf(char *, ...);
void printTestCaseBoard(char **board) {
  int i, j;
  printBar();
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) {
      printf("%c", board[i][j]);
    }
    printf("\n");
  }
  printBar();
  printf("\n");
}


x86 assembly (clang, -O0):
<printTestCaseBoard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <printBar@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    11a1 <printTestCaseBoard+0x81>
movl   $0x0,-0x10(%rbp)
cmpl   $0x8,-0x10(%rbp)
jge    1185 <printTestCaseBoard+0x65>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    114b <printTestCaseBoard+0x2b>
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113a <printTestCaseBoard+0x1a>
mov    $0x0,%al
call   1030 <printBar@plt>
lea    0xe54(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printTestCaseBoard>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <printBar@plt>
mov    (%r14,%rbx,8),%rax
movsbl (%rax),%edi
call   1030 <putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x1(%rax),%edi
call   1030 <putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x2(%rax),%edi
call   1030 <putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x3(%rax),%edi
call   1030 <putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x4(%rax),%edi
call   1030 <putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x5(%rax),%edi
call   1030 <putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x6(%rax),%edi
call   1030 <putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x7(%rax),%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    $0x8,%rbx
jne    1130 <printTestCaseBoard+0x10>
xor    %eax,%eax
call   1040 <printBar@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

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

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