#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 printBoard_(char board[3][3]) {
  printf("%c|%c|%c\n", board[0][0], board[0][1], board[0][2]);
  printf("-----\n");
  printf("%c|%c|%c\n", board[1][0], board[1][1], board[1][2]);
  printf("-----\n");
  printf("%c|%c|%c\n", board[2][0], board[2][1], board[2][2]);
}


x86 assembly (clang, -O0):
<printBoard_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%esi
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%edx
mov    -0x8(%rbp),%rax
movsbl 0x2(%rax),%ecx
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsbl 0x3(%rax),%esi
mov    -0x8(%rbp),%rax
movsbl 0x4(%rax),%edx
mov    -0x8(%rbp),%rax
movsbl 0x5(%rax),%ecx
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsbl 0x6(%rax),%esi
mov    -0x8(%rbp),%rax
movsbl 0x7(%rax),%edx
mov    -0x8(%rbp),%rax
movsbl 0x8(%rax),%ecx
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printBoard_>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%esi
movsbl 0x1(%rdi),%edx
movsbl 0x2(%rdi),%ecx
lea    0xec6(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebf(%rip),%r15
mov    %r15,%rdi
call   1030 <puts@plt>
movsbl 0x3(%rbx),%esi
movsbl 0x4(%rbx),%edx
movsbl 0x5(%rbx),%ecx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
movsbl 0x6(%rbx),%esi
movsbl 0x7(%rbx),%edx
movsbl 0x8(%rbx),%ecx
mov    %r14,%rdi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%c|%c|%c\0A\00"
@.str.1 = [7 x i8] c"-----\0A\00"
define void @printBoard_([3 x i8]* %0) {
%2 = alloca [3 x i8]*
store [3 x i8]* %0, [3 x i8]** %2
%3 = load [3 x i8]*, [3 x i8]** %2
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = load [3 x i8]*, [3 x i8]** %2
%9 = getelementptr inbounds [3 x i8], [3 x i8]* %8, i64 0
%10 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0, i64 1
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = load [3 x i8]*, [3 x i8]** %2
%14 = getelementptr inbounds [3 x i8], [3 x i8]* %13, i64 0
%15 = getelementptr inbounds [3 x i8], [3 x i8]* %14, i64 0, i64 2
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %12, i32 %17)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%20 = load [3 x i8]*, [3 x i8]** %2
%21 = getelementptr inbounds [3 x i8], [3 x i8]* %20, i64 1
%22 = getelementptr inbounds [3 x i8], [3 x i8]* %21, i64 0, i64 0
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = load [3 x i8]*, [3 x i8]** %2
%26 = getelementptr inbounds [3 x i8], [3 x i8]* %25, i64 1
%27 = getelementptr inbounds [3 x i8], [3 x i8]* %26, i64 0, i64 1
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = load [3 x i8]*, [3 x i8]** %2
%31 = getelementptr inbounds [3 x i8], [3 x i8]* %30, i64 1
%32 = getelementptr inbounds [3 x i8], [3 x i8]* %31, i64 0, i64 2
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %24, i32 %29, i32 %34)
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%37 = load [3 x i8]*, [3 x i8]** %2
%38 = getelementptr inbounds [3 x i8], [3 x i8]* %37, i64 2
%39 = getelementptr inbounds [3 x i8], [3 x i8]* %38, i64 0, i64 0
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = load [3 x i8]*, [3 x i8]** %2
%43 = getelementptr inbounds [3 x i8], [3 x i8]* %42, i64 2
%44 = getelementptr inbounds [3 x i8], [3 x i8]* %43, i64 0, i64 1
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = load [3 x i8]*, [3 x i8]** %2
%48 = getelementptr inbounds [3 x i8], [3 x i8]* %47, i64 2
%49 = getelementptr inbounds [3 x i8], [3 x i8]* %48, i64 0, i64 2
%50 = load i8, i8* %49
%51 = sext i8 %50 to i32
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %41, i32 %46, i32 %51)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%c|%c|%c\0A\00"
@str.2 = [6 x i8] c"-----\00"
define void @printBoard_([3 x i8]* nocapture %0) {
%2 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 0, i64 0
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 0, i64 1
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 0, i64 2
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %7, i32 %10)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.2, i64 0, i64 0))
%13 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 1, i64 0
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 1, i64 1
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 1, i64 2
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %18, i32 %21)
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.2, i64 0, i64 0))
%24 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 2, i64 0
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 2, i64 1
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 2, i64 2
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %26, i32 %29, i32 %32)
ret void
}