#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*/ putchar(char);
void afficheMat(char **tab) {
  int i, j;
  for (i = 0; i < 10; i++) {
    for (j = 0; j < 10; j++) {
      putchar(tab[i][j]);
      putchar(' ');
    }
    putchar('\n');
  }
}


x86 assembly (clang, -O0):
<afficheMat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1187 <afficheMat+0x77>
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    116f <afficheMat+0x5f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <afficheMat+0x24>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <afficheMat+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<afficheMat>:
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 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x1(%rax),%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x2(%rax),%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x3(%rax),%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x4(%rax),%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x5(%rax),%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x6(%rax),%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x7(%rax),%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x8(%rax),%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    (%r14,%rbx,8),%rax
movsbl 0x9(%rax),%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    $0xa,%rbx
jne    1120 <afficheMat+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @afficheMat(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 = %29, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 10
br i1 %7, label %8, label %32
8: ; preds = %5
store i32 0, i32* %4
br label %9
9: ; preds = %24, %8
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 10
br i1 %11, label %12, label %27
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 @putchar(i8 signext %21)
%23 = call i32 @putchar(i8 signext 32)
br label %24
24: ; preds = %12
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
br label %9
27: ; preds = %9
%28 = call i32 @putchar(i8 signext 10)
br label %29
29: ; preds = %27
%30 = load i32, i32* %3
%31 = add nsw i32 %30, 1
store i32 %31, i32* %3
br label %5
32: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @afficheMat(i8** nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %55, %2 ]
%4 = getelementptr inbounds i8*, i8** %0, i64 %3
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
%7 = tail call i32 @putchar(i8 signext %6)
%8 = tail call i32 @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 @putchar(i8 signext %11)
%13 = tail call i32 @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 @putchar(i8 signext %16)
%18 = tail call i32 @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 @putchar(i8 signext %21)
%23 = tail call i32 @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 @putchar(i8 signext %26)
%28 = tail call i32 @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 @putchar(i8 signext %31)
%33 = tail call i32 @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 @putchar(i8 signext %36)
%38 = tail call i32 @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 @putchar(i8 signext %41)
%43 = tail call i32 @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 @putchar(i8 signext %46)
%48 = tail call i32 @putchar(i8 signext 32)
%49 = load i8*, i8** %4
%50 = getelementptr inbounds i8, i8* %49, i64 9
%51 = load i8, i8* %50
%52 = tail call i32 @putchar(i8 signext %51)
%53 = tail call i32 @putchar(i8 signext 32)
%54 = tail call i32 @putchar(i8 signext 10)
%55 = add nuw nsw i64 %3, 1
%56 = icmp eq i64 %55, 10
br i1 %56, label %57, label %2
57: ; preds = %2
ret void
}