#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*/ printf(char *, ...);
void afficher_graphe(int **graphe, int nb_sommet) {
  int i, j;
  printf("   ");
  for (i = 0; i < nb_sommet; i++) {
    printf("%d |", i);
  }
  printf("\n");
  for (i = 0; i < nb_sommet; i++) {
    printf("%d |", i);
    for (j = 0; j < nb_sommet; j++) {
      if (graphe[i][j] != 99999) {
        printf("%d |", graphe[i][j]);
      } else {
        printf("_ |");
      }
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<afficher_graphe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115f <afficher_graphe+0x4f>
mov    -0x10(%rbp),%esi
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <afficher_graphe+0x24>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1224 <afficher_graphe+0x114>
mov    -0x10(%rbp),%esi
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1208 <afficher_graphe+0xf8>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
cmpl   $0x1869f,(%rax,%rcx,4)
je     11e7 <afficher_graphe+0xd7>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f5 <afficher_graphe+0xe5>
lea    0xe1d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11fa <afficher_graphe+0xea>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1198 <afficher_graphe+0x88>
lea    0xdfa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1174 <afficher_graphe+0x64>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<afficher_graphe>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r12
lea    0xec9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebx,%ebx
jle    11fd <afficher_graphe+0xdd>
lea    0xeb7(%rip),%r14
xor    %ebp,%ebp
nop
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1150 <afficher_graphe+0x30>
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %ebx,%ebx
jle    11ee <afficher_graphe+0xce>
mov    %ebx,%r13d
lea    0xe89(%rip),%r14
lea    0xe87(%rip),%r15
xor    %ebx,%ebx
jmp    11a3 <afficher_graphe+0x83>
cs nopw 0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %r13,%rbx
je     11ee <afficher_graphe+0xce>
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %ebp,%ebp
jmp    11d3 <afficher_graphe+0xb3>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r13
je     1190 <afficher_graphe+0x70>
mov    (%r12,%rbx,8),%rax
mov    (%rax,%rbp,4),%esi
cmp    $0x1869f,%esi
je     11c0 <afficher_graphe+0xa0>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11ca <afficher_graphe+0xaa>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c" \00"
@.str.1 = [5 x i8] c"%d |\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [4 x i8] c"_ |\00"
define void @afficher_graphe(i32** %0, i32 %1) {
%3 = alloca i32**
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32** %0, i32*** %3
store i32 %1, i32* %4
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %5
br label %8
8: ; preds = %15, %2
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %18
12: ; preds = %8
%13 = load i32, i32* %5
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %13)
br label %15
15: ; preds = %12
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %8
18: ; preds = %8
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %5
br label %20
20: ; preds = %61, %18
%21 = load i32, i32* %5
%22 = load i32, i32* %4
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %64
24: ; preds = %20
%25 = load i32, i32* %5
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %25)
store i32 0, i32* %6
br label %27
27: ; preds = %56, %24
%28 = load i32, i32* %6
%29 = load i32, i32* %4
%30 = icmp slt i32 %28, %29
br i1 %30, label %31, label %59
31: ; preds = %27
%32 = load i32**, i32*** %3
%33 = load i32, i32* %5
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i32*, i32** %32, i64 %34
%36 = load i32*, i32** %35
%37 = load i32, i32* %6
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i32, i32* %36, i64 %38
%40 = load i32, i32* %39
%41 = icmp ne i32 %40, 99999
br i1 %41, label %42, label %53
42: ; preds = %31
%43 = load i32**, i32*** %3
%44 = load i32, i32* %5
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i32*, i32** %43, i64 %45
%47 = load i32*, i32** %46
%48 = load i32, i32* %6
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i32, i32* %47, i64 %49
%51 = load i32, i32* %50
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %51)
br label %55
53: ; preds = %31
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %55
55: ; preds = %53, %42
br label %56
56: ; preds = %55
%57 = load i32, i32* %6
%58 = add nsw i32 %57, 1
store i32 %58, i32* %6
br label %27
59: ; preds = %27
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %61
61: ; preds = %59
%62 = load i32, i32* %5
%63 = add nsw i32 %62, 1
store i32 %63, i32* %5
br label %20
64: ; preds = %20
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c" \00"
@.str.1 = [5 x i8] c"%d |\00"
@.str.3 = [4 x i8] c"_ |\00"
define void @afficher_graphe(i32** nocapture %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = icmp sgt i32 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @putchar(i32 10)
br label %38
7: ; preds = %2, %7
%8 = phi i32 [ %10, %7 ], [ 0, %2 ]
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = add nuw nsw i32 %8, 1
%11 = icmp eq i32 %10, %1
br i1 %11, label %12, label %7
12: ; preds = %7
%13 = tail call i32 @putchar(i32 10)
br i1 %4, label %14, label %38
14: ; preds = %12
%15 = zext i32 %1 to i64
br label %16
16: ; preds = %34, %14
%17 = phi i64 [ 0, %14 ], [ %36, %34 ]
%18 = trunc i64 %17 to i32
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %18)
%20 = getelementptr inbounds i32*, i32** %0, i64 %17
br label %21
21: ; preds = %16, %31
%22 = phi i64 [ 0, %16 ], [ %32, %31 ]
%23 = load i32*, i32** %20
%24 = getelementptr inbounds i32, i32* %23, i64 %22
%25 = load i32, i32* %24
%26 = icmp eq i32 %25, 99999
br i1 %26, label %29, label %27
27: ; preds = %21
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %25)
br label %31
29: ; preds = %21
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %31
31: ; preds = %27, %29
%32 = add nuw nsw i64 %22, 1
%33 = icmp eq i64 %32, %15
br i1 %33, label %34, label %21
34: ; preds = %31
%35 = tail call i32 @putchar(i32 10)
%36 = add nuw nsw i64 %17, 1
%37 = icmp eq i64 %36, %15
br i1 %37, label %38, label %16
38: ; preds = %34, %5, %12
ret void
}