#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*/ coloration(char *, char *);
int /*<<< orphan*/ printf(char *);
void afficherLegendeMenuBatailleNavale(void) {
  printf("Legende :\n\n");
  printf("\t- ");
  coloration("~", "34");
  printf(" : ocean, case vide\n");
  printf("\t- ");
  coloration("o", "32");
  printf(" : partie de votre navire\n");
  printf("\t- ");
  coloration("o", "31");
  printf(" : partie du navire touchee\n");
  printf("\t- X : case deja visitee et ne contenant rien\n");
  printf("\t- ");
  coloration("X", "31");
  printf(" : navire ennemi\n\n");
}


x86 assembly (clang, -O0):
<afficherLegendeMenuBatailleNavale>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    0xec8(%rip),%rsi
call   1040 <coloration@plt>
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
lea    0xeb7(%rip),%rsi
call   1040 <coloration@plt>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
lea    0xe91(%rip),%rdi
lea    0xeaa(%rip),%rsi
call   1040 <coloration@plt>
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
lea    0xe48(%rip),%rdi
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
lea    0xe73(%rip),%rsi
call   1040 <coloration@plt>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<afficherLegendeMenuBatailleNavale>:
push   %r15
push   %r14
push   %rbx
lea    0xed7(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%r14
mov    %r14,%rdi
call   1040 <printf@plt>
lea    0xead(%rip),%rdi
lea    0xea8(%rip),%rsi
call   1050 <coloration@plt>
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1040 <printf@plt>
lea    0xe8b(%rip),%rbx
lea    0xe86(%rip),%rsi
mov    %rbx,%rdi
call   1050 <coloration@plt>
lea    0xe9e(%rip),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1040 <printf@plt>
lea    0xe66(%rip),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <coloration@plt>
lea    0xe92(%rip),%rdi
call   1030 <puts@plt>
lea    0xea2(%rip),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1040 <printf@plt>
lea    0xe37(%rip),%rdi
mov    %r15,%rsi
call   1050 <coloration@plt>
lea    0xead(%rip),%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Legende :\0A\0A\00"
@.str.1 = [4 x i8] c"\09- \00"
@.str.2 = [2 x i8] c"~\00"
@.str.3 = [3 x i8] c"34\00"
@.str.4 = [21 x i8] c" : ocean, case vide\0A\00"
@.str.5 = [2 x i8] c"o\00"
@.str.6 = [3 x i8] c"32\00"
@.str.7 = [27 x i8] c" : partie de votre navire\0A\00"
@.str.8 = [3 x i8] c"31\00"
@.str.9 = [29 x i8] c" : partie du navire touchee\0A\00"
@.str.10 = [47 x i8] c"\09- X : case deja visitee et ne contenant rien\0A\00"
@.str.11 = [2 x i8] c"X\00"
@.str.12 = [19 x i8] c" : navire ennemi\0A\0A\00"
define void @afficherLegendeMenuBatailleNavale() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @coloration(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @coloration(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @coloration(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 @coloration(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"\09- \00"
@.str.2 = [2 x i8] c"~\00"
@.str.3 = [3 x i8] c"34\00"
@.str.5 = [2 x i8] c"o\00"
@.str.6 = [3 x i8] c"32\00"
@.str.8 = [3 x i8] c"31\00"
@.str.11 = [2 x i8] c"X\00"
@str = [11 x i8] c"Legende :\0A\00"
@str.13 = [20 x i8] c" : ocean, case vide\00"
@str.14 = [26 x i8] c" : partie de votre navire\00"
@str.15 = [28 x i8] c" : partie du navire touchee\00"
@str.16 = [46 x i8] c"\09- X : case deja visitee et ne contenant rien\00"
@str.17 = [18 x i8] c" : navire ennemi\0A\00"
define void @afficherLegendeMenuBatailleNavale() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @coloration(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.13, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @coloration(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.14, i64 0, i64 0))
%8 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 @coloration(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.15, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.16, i64 0, i64 0))
%12 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%13 = tail call i32 @coloration(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.17, i64 0, i64 0))
ret void
}