#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 printSudoku(char **board) {
  int i, j;
  for (i = 0; i < 9; i++) {
    for (j = 0; j < 9; j++) {
      if (j == 3 || j == 6) {
        printf("| ");
      }
      printf("%c ", board[i][j]);
    }
    printf("\n");
    if (i == 2 || i == 5) {
      printf("- - - - - - - - - - - -\n");
    }
  }
}


x86 assembly (clang, -O0):
<printSudoku>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x9,-0xc(%rbp)
jge    11d3 <printSudoku+0xc3>
movl   $0x0,-0x10(%rbp)
cmpl   $0x9,-0x10(%rbp)
jge    1190 <printSudoku+0x80>
cmpl   $0x3,-0x10(%rbp)
je     1152 <printSudoku+0x42>
cmpl   $0x6,-0x10(%rbp)
jne    1160 <printSudoku+0x50>
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <printSudoku+0x24>
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x2,-0xc(%rbp)
je     11b2 <printSudoku+0xa2>
cmpl   $0x5,-0xc(%rbp)
jne    11c0 <printSudoku+0xb0>
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11c5 <printSudoku+0xb5>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <printSudoku+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printSudoku>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rdi,%r13
lea    0xec0(%rip),%r14
lea    0xeb6(%rip),%r15
lea    0xeb6(%rip),%r12
xor    %ebx,%ebx
jmp    1176 <printSudoku+0x46>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r12,%rdi
call   1040 <puts@plt>
add    $0x1,%rbx
cmp    $0x9,%rbx
je     1255 <printSudoku+0x125>
mov    0x0(%r13,%rbx,8),%rax
movsbl (%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x0(%r13,%rbx,8),%rax
movsbl 0x1(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x0(%r13,%rbx,8),%rax
movsbl 0x2(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x0(%r13,%rbx,8),%rax
movsbl 0x3(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x0(%r13,%rbx,8),%rax
movsbl 0x4(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x0(%r13,%rbx,8),%rax
movsbl 0x5(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x0(%r13,%rbx,8),%rax
movsbl 0x6(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x0(%r13,%rbx,8),%rax
movsbl 0x7(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x0(%r13,%rbx,8),%rax
movsbl 0x8(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmp    $0x5,%ebx
je     1160 <printSudoku+0x30>
cmp    $0x2,%ebx
je     1160 <printSudoku+0x30>
jmp    1168 <printSudoku+0x38>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"| \00"
@.str.1 = [4 x i8] c"%c \00"
@str = [24 x i8] c"- - - - - - - - - - - -\00"
define void @printSudoku(i8** nocapture %0) {
br label %2
2: ; preds = %55, %1
%3 = phi i64 [ 0, %1 ], [ %56, %55 ]
%4 = getelementptr inbounds i8*, i8** %0, i64 %3
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%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 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 2
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %17)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%20 = load i8*, i8** %4
%21 = getelementptr inbounds i8, i8* %20, i64 3
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %23)
%25 = load i8*, i8** %4
%26 = getelementptr inbounds i8, i8* %25, i64 4
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%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 = load i8*, i8** %4
%31 = getelementptr inbounds i8, i8* %30, i64 5
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %33)
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%36 = load i8*, i8** %4
%37 = getelementptr inbounds i8, i8* %36, i64 6
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %39)
%41 = load i8*, i8** %4
%42 = getelementptr inbounds i8, i8* %41, i64 7
%43 = load i8, i8* %42
%44 = sext i8 %43 to i32
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %44)
%46 = load i8*, i8** %4
%47 = getelementptr inbounds i8, i8* %46, i64 8
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %49)
%51 = tail call i32 @putchar(i32 10)
%52 = trunc i64 %3 to i32
switch i32 %52, label %55 [
i32 5, label %53
i32 2, label %53
]
53: ; preds = %2, %2
%54 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
br label %55
55: ; preds = %2, %53
%56 = add nuw nsw i64 %3, 1
%57 = icmp eq i64 %56, 9
br i1 %57, label %58, label %2
58: ; preds = %55
ret void
}