#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(int sudoku[9][9]) {
  int i, j;
  for (i = 0; i < 9; i++) {
    if (0 == i % 3) {
      printf("-------------\n");
    }
    for (j = 0; j < 9; j++) {
      if (0 == j % 3) {
        printf("|");
      }
      if (0 == sudoku[i][j]) {
        printf(" ");
      } else {
        printf("%1d", sudoku[i][j]);
      }
    }
    printf("|\n");
  }
  printf("-------------\n");
  return;
}


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    1208 <printSudoku+0xf8>
mov    -0xc(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
xor    %eax,%eax
cmp    %edx,%eax
jne    1150 <printSudoku+0x40>
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
cmpl   $0x9,-0x10(%rbp)
jge    11ec <printSudoku+0xdc>
mov    -0x10(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
xor    %eax,%eax
cmp    %edx,%eax
jne    1184 <printSudoku+0x74>
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rax
imul   $0x24,%rax,%rax
add    %rax,%rcx
movslq -0x10(%rbp),%rdx
xor    %eax,%eax
cmp    (%rcx,%rdx,4),%eax
jne    11b5 <printSudoku+0xa5>
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d9 <printSudoku+0xc9>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe41(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11de <printSudoku+0xce>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1157 <printSudoku+0x47>
lea    0xe24(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <printSudoku+0x13>
lea    0xdf1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printSudoku>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xebf(%rip),%r15
lea    0xeb4(%rip),%r12
xor    %r13d,%r13d
jmp    1176 <printSudoku+0x46>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
call   1040 <puts@plt>
add    $0x1,%r13
add    $0x24,%rbx
cmp    $0x9,%r13
je     11eb <printSudoku+0xbb>
imul   $0xffffffab,%r13d,%eax
cmp    $0x55,%al
ja     118a <printSudoku+0x5a>
lea    0xe81(%rip),%rdi
call   1040 <puts@plt>
xor    %ebp,%ebp
xor    %r14d,%r14d
jmp    11b8 <printSudoku+0x88>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%r14
add    $0xff,%bpl
cmp    $0x9,%r14
je     1160 <printSudoku+0x30>
movzbl %r14b,%eax
imul   $0xab,%eax,%eax
shr    $0x9,%eax
lea    (%rax,%rax,2),%eax
add    %bpl,%al
jne    11d7 <printSudoku+0xa7>
mov    $0x7c,%edi
call   1030 <putchar@plt>
mov    (%rbx,%r14,4),%esi
test   %esi,%esi
jne    11a0 <printSudoku+0x70>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    11aa <printSudoku+0x7a>
lea    0xe14(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <puts@plt>

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

LLVM IR (-O2):
@.str.3 = [4 x i8] c"%1d\00"
@str.5 = [2 x i8] c"|\00"
@str.6 = [14 x i8] c"-------------\00"
define void @printSudoku([9 x i32]* nocapture %0) {
br label %2
2: ; preds = %1, %28
%3 = phi i64 [ 0, %1 ], [ %30, %28 ]
%4 = trunc i64 %3 to i8
%5 = urem i8 %4, 3
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.6, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
br label %10
10: ; preds = %9, %25
%11 = phi i64 [ %26, %25 ], [ 0, %9 ]
%12 = trunc i64 %11 to i8
%13 = urem i8 %12, 3
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %10
%16 = tail call i32 @putchar(i32 124)
br label %17
17: ; preds = %15, %10
%18 = getelementptr inbounds [9 x i32], [9 x i32]* %0, i64 %3, i64 %11
%19 = load i32, i32* %18
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = tail call i32 @putchar(i32 32)
br label %25
23: ; preds = %17
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %19)
br label %25
25: ; preds = %21, %23
%26 = add nuw nsw i64 %11, 1
%27 = icmp eq i64 %26, 9
br i1 %27, label %28, label %10
28: ; preds = %25
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.5, i64 0, i64 0))
%30 = add nuw nsw i64 %3, 1
%31 = icmp eq i64 %30, 9
br i1 %31, label %32, label %2
32: ; preds = %28
%33 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.6, i64 0, i64 0))
ret void
}