void init_board(char b[7][6 + 1]) {
  int i, j;
  for (i = 0; i < 7; i++)
    for (j = 0; j < 6; j++)
      b[i][j] = '.';
  for (i = 0; i < 7; i++)
    b[i][6] = 0;
}


x86 assembly (clang, -O0):
<init_board>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x7,-0xc(%rbp)
jge    1162 <init_board+0x62>
movl   $0x0,-0x10(%rbp)
cmpl   $0x6,-0x10(%rbp)
jge    114f <init_board+0x4f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x7,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movb   $0x2e,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1120 <init_board+0x20>
jmp    1154 <init_board+0x54>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <init_board+0xf>
movl   $0x0,-0xc(%rbp)
cmpl   $0x7,-0xc(%rbp)
jge    1194 <init_board+0x94>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x7,%rcx,%rcx
add    %rcx,%rax
movb   $0x0,0x6(%rax)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1169 <init_board+0x69>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_board>:
movw   $0x2e2e,0x4(%rdi)
movl   $0x2e2e2e2e,(%rdi)
movl   $0x2e2e2e2e,0x7(%rdi)
movw   $0x2e2e,0xb(%rdi)
movl   $0x2e2e2e2e,0xe(%rdi)
movw   $0x2e2e,0x12(%rdi)
movl   $0x2e2e2e2e,0x15(%rdi)
movw   $0x2e2e,0x19(%rdi)
movl   $0x2e2e2e2e,0x1c(%rdi)
movw   $0x2e2e,0x20(%rdi)
movl   $0x2e2e2e2e,0x23(%rdi)
movw   $0x2e2e,0x27(%rdi)
movl   $0x2e2e2e2e,0x2a(%rdi)
movw   $0x2e2e,0x2e(%rdi)
movb   $0x0,0x6(%rdi)
movb   $0x0,0xd(%rdi)
movb   $0x0,0x14(%rdi)
movb   $0x0,0x1b(%rdi)
movb   $0x0,0x22(%rdi)
movb   $0x0,0x29(%rdi)
movb   $0x0,0x30(%rdi)
ret

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

LLVM IR (-O2):
define void @init_board([7 x i8]* nocapture writeonly %0) {
%2 = getelementptr [7 x i8], [7 x i8]* %0, i64 0, i64 0
%3 = getelementptr [7 x i8], [7 x i8]* %0, i64 1, i64 0
%4 = getelementptr [7 x i8], [7 x i8]* %0, i64 2, i64 0
%5 = getelementptr [7 x i8], [7 x i8]* %0, i64 3, i64 0
%6 = getelementptr [7 x i8], [7 x i8]* %0, i64 4, i64 0
%7 = getelementptr [7 x i8], [7 x i8]* %0, i64 5, i64 0
%8 = getelementptr [7 x i8], [7 x i8]* %0, i64 6, i64 0
%9 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 0, i64 6
store i8 0, i8* %9
%10 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 1, i64 6
store i8 0, i8* %10
%11 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 2, i64 6
store i8 0, i8* %11
%12 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 3, i64 6
store i8 0, i8* %12
%13 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 4, i64 6
store i8 0, i8* %13
%14 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 5, i64 6
store i8 0, i8* %14
%15 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 6, i64 6
store i8 0, i8* %15
ret void
}