#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 afficheMatrice(char tab[10][10]) {
  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):
<afficheMatrice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    118a <afficheMatrice+0x7a>
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    1172 <afficheMatrice+0x62>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0xa,%rcx,%rcx
add    %rcx,%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 <afficheMatrice+0x24>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <afficheMatrice+0x13>
add    $0x10,%rsp
pop    %rbp
ret

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

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

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