#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 x;
  int y;
  y = 0;
  while (y <= 8) {
    x = 0;
    while (x <= 8) {
      ft_putchar(tab[x][y]);
      (x != 8) ? ft_putchar(' ') : 0;
      x++;
    }
    ft_putchar('\n');
    y++;
  }
}


x86 assembly (clang, -O0):
<ft_display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x8,-0x10(%rbp)
jg     119b <ft_display+0x8b>
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jg     1183 <ft_display+0x73>
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,-0xc(%rbp)
je     1170 <ft_display+0x60>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
jmp    1175 <ft_display+0x65>
jmp    1175 <ft_display+0x65>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1134 <ft_display+0x24>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%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),%rax
movsbl (%rax,%rbx,1),%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    0x8(%r14),%rax
movsbl (%rax,%rbx,1),%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    0x10(%r14),%rax
movsbl (%rax,%rbx,1),%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    0x18(%r14),%rax
movsbl (%rax,%rbx,1),%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    0x20(%r14),%rax
movsbl (%rax,%rbx,1),%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    0x28(%r14),%rax
movsbl (%rax,%rbx,1),%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    0x30(%r14),%rax
movsbl (%rax,%rbx,1),%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    0x38(%r14),%rax
movsbl (%rax,%rbx,1),%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    0x40(%r14),%rax
movsbl (%rax,%rbx,1),%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* %4
br label %5
5: ; preds = %32, %1
%6 = load i32, i32* %4
%7 = icmp sle i32 %6, 8
br i1 %7, label %8, label %36
8: ; preds = %5
store i32 0, i32* %3
br label %9
9: ; preds = %28, %8
%10 = load i32, i32* %3
%11 = icmp sle i32 %10, 8
br i1 %11, label %12, label %32
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* %3
%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 %28
27: ; preds = %12
br label %28
28: ; preds = %27, %25
%29 = phi i32 [ %26, %25 ], [ 0, %27 ]
%30 = load i32, i32* %3
%31 = add nsw i32 %30, 1
store i32 %31, i32* %3
br label %9
32: ; preds = %9
%33 = call i32 @ft_putchar(i8 signext 10)
%34 = load i32, i32* %4
%35 = add nsw i32 %34, 1
store i32 %35, i32* %4
br label %5
36: ; preds = %5
ret void
}

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