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


x86 assembly (clang, -O0):
<ft_display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x9,-0xc(%rbp)
jge    1191 <ft_display+0x81>
movl   $0x0,-0x10(%rbp)
cmpl   $0x9,-0x10(%rbp)
jge    1179 <ft_display+0x69>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <ft_putchar@plt>
cmpl   $0x8,-0x10(%rbp)
je     116b <ft_display+0x5b>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <ft_display+0x24>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <ft_display+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_display>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rax
movsbl (%rax),%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x1(%rax),%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x2(%rax),%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x3(%rax),%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x4(%rax),%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x5(%rax),%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x6(%rax),%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x7(%rax),%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x8(%rax),%edi
call   1030 <ft_putchar@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
add    $0x1,%rbx
cmp    $0x9,%rbx
jne    1120 <ft_display+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @ft_display(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 = %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 i8**, i8*** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
%21 = load i8, i8* %20
%22 = call i32 @ft_putchar(i8 signext %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 = call i32 @ft_putchar(i8 signext 10)
%32 = load i32, i32* %3
%33 = add nsw i32 %32, 1
store i32 %33, i32* %3
br label %5
34: ; preds = %5
ret void
}

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