#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 *Board, int sudoku_size) {
  if (Board == NULL) {
    printf("EMPTY BOARD");
  }
  int linenumber = 0, i, j;
  for (i = 0; i < sudoku_size; i++) {
    for (j = 0; j < sudoku_size; j++) {
      printf("%d ", Board[(linenumber * sudoku_size + j)]);
    }
    linenumber++;
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<PrintSudoku>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1138 <PrintSudoku+0x28>
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11ba <PrintSudoku+0xaa>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1195 <PrintSudoku+0x85>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x18(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1159 <PrintSudoku+0x49>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1146 <PrintSudoku+0x36>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintSudoku>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%r13
test   %rdi,%rdi
je     113b <PrintSudoku+0x1b>
test   %ebp,%ebp
jg     114d <PrintSudoku+0x2d>
jmp    11ae <PrintSudoku+0x8e>
lea    0xebe(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebp,%ebp
jle    11ae <PrintSudoku+0x8e>
mov    %ebp,%ebp
lea    0x0(,%rbp,4),%r15
lea    0xeae(%rip),%r14
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x0(%r13,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1180 <PrintSudoku+0x60>
add    $0x1,%r12
mov    $0xa,%edi
call   1030 <putchar@plt>
add    %r15,%r13
cmp    %rbp,%r12
jne    1170 <PrintSudoku+0x50>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"EMPTY BOARD\00"
@.str.1 = [4 x i8] c"%d \00"
define void @PrintSudoku(i32* %0, i32 %1) {
%3 = icmp eq i32* %0, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %2
%7 = icmp sgt i32 %1, 0
br i1 %7, label %8, label %26
8: ; preds = %6
%9 = zext i32 %1 to i64
%10 = zext i32 %1 to i64
br label %11
11: ; preds = %22, %8
%12 = phi i64 [ 0, %8 ], [ %23, %22 ]
%13 = mul nsw i64 %12, %9
br label %14
14: ; preds = %11, %14
%15 = phi i64 [ 0, %11 ], [ %20, %14 ]
%16 = add nuw nsw i64 %15, %13
%17 = getelementptr inbounds i32, i32* %0, i64 %16
%18 = load i32, i32* %17
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %18)
%20 = add nuw nsw i64 %15, 1
%21 = icmp eq i64 %20, %10
br i1 %21, label %22, label %14
22: ; preds = %14
%23 = add nuw nsw i64 %12, 1
%24 = tail call i32 @putchar(i32 10)
%25 = icmp eq i64 %23, %10
br i1 %25, label %26, label %11
26: ; preds = %22, %6
ret void
}