#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
print_tab_inc(int n, int p, int **tab_inc, FILE *fichier) {
  int i, j;
  for (i = 0; i < n; i++) {
    for (j = 0; j < p; j++) {
      fprintf(fichier, " %d ", tab_inc[i][j]);
    }
    fprintf(fichier, "\n");
  }
  fprintf(fichier, "\n");
}


x86 assembly (clang, -O0):
<print_tab_inc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    119f <print_tab_inc+0x8f>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    117f <print_tab_inc+0x6f>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xe96(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1140 <print_tab_inc+0x30>
mov    -0x20(%rbp),%rdi
lea    0xe7b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    112d <print_tab_inc+0x1d>
mov    -0x20(%rbp),%rdi
lea    0xe5b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_tab_inc>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rcx,%r14
mov    %esi,0xc(%rsp)
test   %edi,%edi
jle    11b0 <print_tab_inc+0x90>
mov    %rdx,%rbx
mov    %edi,%eax
mov    %rax,0x10(%rsp)
mov    0xc(%rsp),%ebp
lea    0xeb2(%rip),%r13
xor    %r15d,%r15d
jmp    1178 <print_tab_inc+0x58>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0xa,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
add    $0x1,%r15
cmp    0x10(%rsp),%r15
je     11b0 <print_tab_inc+0x90>
cmpl   $0x0,0xc(%rsp)
jle    1160 <print_tab_inc+0x40>
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%rbx,%r15,8),%rax
mov    (%rax,%r12,4),%edx
mov    %r14,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
add    $0x1,%r12
cmp    %r12,%rbp
jne    1190 <print_tab_inc+0x70>
jmp    1160 <print_tab_inc+0x40>
mov    $0xa,%edi
mov    %r14,%rsi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <fputc@plt>

LLVM IR (-O0):
@.str = [5 x i8] c" %d \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @print_tab_inc(i32 %0, i32 %1, i32** %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32**
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32** %2, i32*** %8
store i32* %3, i32** %9
store i32 0, i32* %10
br label %12
12: ; preds = %39, %4
%13 = load i32, i32* %10
%14 = load i32, i32* %6
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %42
16: ; preds = %12
store i32 0, i32* %11
br label %17
17: ; preds = %33, %16
%18 = load i32, i32* %11
%19 = load i32, i32* %7
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %36
21: ; preds = %17
%22 = load i32*, i32** %9
%23 = load i32**, i32*** %8
%24 = load i32, i32* %10
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32*, i32** %23, i64 %25
%27 = load i32*, i32** %26
%28 = load i32, i32* %11
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i32, i32* %27, i64 %29
%31 = load i32, i32* %30
%32 = call i32 (i32*, i8*, ...) @fprintf(i32* %22, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %31)
br label %33
33: ; preds = %21
%34 = load i32, i32* %11
%35 = add nsw i32 %34, 1
store i32 %35, i32* %11
br label %17
36: ; preds = %17
%37 = load i32*, i32** %9
%38 = call i32 (i32*, i8*, ...) @fprintf(i32* %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %39
39: ; preds = %36
%40 = load i32, i32* %10
%41 = add nsw i32 %40, 1
store i32 %41, i32* %10
br label %12
42: ; preds = %12
%43 = load i32*, i32** %9
%44 = call i32 (i32*, i8*, ...) @fprintf(i32* %43, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%45 = load i32, i32* %5
ret i32 %45
}

LLVM IR (-O2):
@.str = [5 x i8] c" %d \00"
define i32 @print_tab_inc(i32 %0, i32 %1, i32** nocapture %2, i32* nocapture %3) {
%5 = icmp sgt i32 %0, 0
br i1 %5, label %6, label %26
6: ; preds = %4
%7 = icmp sgt i32 %1, 0
%8 = zext i32 %0 to i64
%9 = zext i32 %1 to i64
br label %10
10: ; preds = %6, %22
%11 = phi i64 [ 0, %6 ], [ %24, %22 ]
br i1 %7, label %12, label %22
12: ; preds = %10
%13 = getelementptr inbounds i32*, i32** %2, i64 %11
br label %14
14: ; preds = %12, %14
%15 = phi i64 [ 0, %12 ], [ %20, %14 ]
%16 = load i32*, i32** %13
%17 = getelementptr inbounds i32, i32* %16, i64 %15
%18 = load i32, i32* %17
%19 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = add nuw nsw i64 %15, 1
%21 = icmp eq i64 %20, %9
br i1 %21, label %22, label %14
22: ; preds = %14, %10
%23 = tail call i32 @fputc(i32 10, i32* %3)
%24 = add nuw nsw i64 %11, 1
%25 = icmp eq i64 %24, %8
br i1 %25, label %26, label %10
26: ; preds = %22, %4
%27 = tail call i32 @fputc(i32 10, i32* %3)
ret i32 undef
}