#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*/ putchar(int);
int print_board(int board[8][8]) {
  for (int i = 0; i < 8; i = i + 1) {
    for (int j = 0; j < 8; j = j + 1) {
      if (board[i][j]) {
        putchar(81);
        putchar(32);
      } else {
        putchar(46);
        putchar(32);
      }
    }
    putchar(10);
  }
  putchar(10);
  putchar(10);
}


x86 assembly (clang, -O0):
<print_board>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    11b3 <print_board+0xa3>
movl   $0x0,-0x18(%rbp)
cmpl   $0x8,-0x18(%rbp)
jge    119b <print_board+0x8b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1174 <print_board+0x64>
mov    $0x51,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    1188 <print_board+0x78>
mov    $0x2e,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    118d <print_board+0x7d>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1134 <print_board+0x24>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <print_board+0x13>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_board>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
xor    %ebx,%ebx
mov    $0x2e,%ebp
xchg   %ax,%ax
cmpl   $0x0,(%r14,%rbx,1)
mov    $0x51,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
cmpl   $0x0,0x4(%r14,%rbx,1)
mov    $0x51,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
cmpl   $0x0,0x8(%r14,%rbx,1)
mov    $0x51,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
cmpl   $0x0,0xc(%r14,%rbx,1)
mov    $0x51,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
cmpl   $0x0,0x10(%r14,%rbx,1)
mov    $0x51,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
cmpl   $0x0,0x14(%r14,%rbx,1)
mov    $0x51,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
cmpl   $0x0,0x18(%r14,%rbx,1)
mov    $0x51,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
cmpl   $0x0,0x1c(%r14,%rbx,1)
mov    $0x51,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x20,%rbx
cmp    $0x100,%rbx
jne    1120 <print_board+0x10>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define i32 @print_board([8 x i32]* %0) {
%2 = alloca i32
%3 = alloca [8 x i32]*
%4 = alloca i32
%5 = alloca i32
store [8 x i32]* %0, [8 x i32]** %3
store i32 0, i32* %4
br label %6
6: ; preds = %35, %1
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 8
br i1 %8, label %9, label %38
9: ; preds = %6
store i32 0, i32* %5
br label %10
10: ; preds = %30, %9
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 8
br i1 %12, label %13, label %33
13: ; preds = %10
%14 = load [8 x i32]*, [8 x i32]** %3
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [8 x i32], [8 x i32]* %14, i64 %16
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [8 x i32], [8 x i32]* %17, i64 0, i64 %19
%21 = load i32, i32* %20
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %13
%24 = call i32 @putchar(i32 81)
%25 = call i32 @putchar(i32 32)
br label %29
26: ; preds = %13
%27 = call i32 @putchar(i32 46)
%28 = call i32 @putchar(i32 32)
br label %29
29: ; preds = %26, %23
br label %30
30: ; preds = %29
%31 = load i32, i32* %5
%32 = add nsw i32 %31, 1
store i32 %32, i32* %5
br label %10
33: ; preds = %10
%34 = call i32 @putchar(i32 10)
br label %35
35: ; preds = %33
%36 = load i32, i32* %4
%37 = add nsw i32 %36, 1
store i32 %37, i32* %4
br label %6
38: ; preds = %6
%39 = call i32 @putchar(i32 10)
%40 = call i32 @putchar(i32 10)
%41 = load i32, i32* %2
ret i32 %41
}

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