#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*/ ft_putchar(char);
int /*<<< orphan*/ ft_putnbr(int);
void ft_printsudoku(int **tab) {
  int i;
  int j;
  i = 0;
  while (i < 9) {
    j = 0;
    while (j < 9) {
      ft_putnbr(tab[i][j]);
      if (j != 8)
        ft_putchar(' ');
      j++;
    }
    i++;
    ft_putchar('\n');
  }
}


x86 assembly (clang, -O0):
<ft_printsudoku>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x9,-0xc(%rbp)
jge    11a0 <ft_printsudoku+0x80>
movl   $0x0,-0x10(%rbp)
cmpl   $0x9,-0x10(%rbp)
jge    1188 <ft_printsudoku+0x68>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1040 <ft_putnbr@plt>
cmpl   $0x8,-0x10(%rbp)
je     117a <ft_printsudoku+0x5a>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1144 <ft_printsudoku+0x24>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
jmp    1133 <ft_printsudoku+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_printsudoku>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rax
mov    (%rax),%edi
call   1040 <ft_putnbr@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    (%r14,%rbx,8),%rax
mov    0x4(%rax),%edi
call   1040 <ft_putnbr@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    (%r14,%rbx,8),%rax
mov    0x8(%rax),%edi
call   1040 <ft_putnbr@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    (%r14,%rbx,8),%rax
mov    0xc(%rax),%edi
call   1040 <ft_putnbr@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    (%r14,%rbx,8),%rax
mov    0x10(%rax),%edi
call   1040 <ft_putnbr@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    (%r14,%rbx,8),%rax
mov    0x14(%rax),%edi
call   1040 <ft_putnbr@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    (%r14,%rbx,8),%rax
mov    0x18(%rax),%edi
call   1040 <ft_putnbr@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    (%r14,%rbx,8),%rax
mov    0x1c(%rax),%edi
call   1040 <ft_putnbr@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    (%r14,%rbx,8),%rax
mov    0x20(%rax),%edi
call   1040 <ft_putnbr@plt>
add    $0x1,%rbx
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
cmp    $0x9,%rbx
jne    1130 <ft_printsudoku+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

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