#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 */
char getchar();
char maj(char);
int *malloc(int);
char motAleatoire(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int strlen(char *);
int /*<<< orphan*/ verification(char, char *, int *, int *);
int main(int argc, char *argv[]) {
  int chance = 10, chan = 10, menu, *lettreTrouvee = NULL, l, i, a,
      donnees[2] = {0};
  char mot[100], caract;
  do {
    do {
      printf("\n\n              ----------PENDU----------\n\n\n");
      printf("\t\t1 : Jouer\n\t\t2 : Nombre de chance\n\t\t3 : Quitter\n");
      printf("\n\t\t? ");
      scanf("%ld", &menu);
      printf("\n\n");
    } while (menu < 1 || menu > 3);
    if (menu == 1) {
      a = 0;
      mot[100] = motAleatoire(mot);
      l = strlen(mot);
      lettreTrouvee = malloc(l * sizeof(int));
      for (i = 0; i < l; i++) {
        lettreTrouvee[i] = 0;
      }
      chance = chan;
      while (a < l && chance > 0) {
        printf("Mot secret : ");
        for (i = 0; i < l; i++) {
          if (lettreTrouvee[i] == 1)
            printf("%c", mot[i]);
          else
            printf("=");
        }
        printf("\nChance(s) : %ld", chance);
        printf("\nLettre : ");
        do {
          caract = getchar();
          caract = maj(caract);
        } while (caract == '\n');
        printf("\n");
        donnees[1] = a;
        donnees[2] = chance;
        verification(caract, mot, lettreTrouvee, donnees);
        a = donnees[1];
        chance = donnees[2];
      }
      if (a == l) {
        printf("\nVous avez GAGNE :D !!!!!\nLe mot etait bien : %s\n\n", mot);
        chance = chan;
      }
      if (chance == 0 && a != l) {
        printf("\nVous avez PERDU  :(\nLe mot etait : %s\n\n", mot);
        chance = chan;
      }
    }
    if (menu == 2) {
      do {
        printf("\nNombre de chance (defaut : 10 ) ?  ");
        scanf("%ld", &chance);
      } while (chance <= 0);
      chan = chance;
    }
  } while (menu != 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xa,-0x14(%rbp)
movl   $0xa,-0x18(%rbp)
movq   $0x0,-0x28(%rbp)
lea    -0x3c(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1050 <memset@plt>
jmp    11d4 <main+0x44>
lea    0xe25(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe44(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe80(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   10a0 <scanf@plt>
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%al
cmpl   $0x1,-0x1c(%rbp)
mov    %al,-0xa2(%rbp)
jl     123b <main+0xab>
cmpl   $0x3,-0x1c(%rbp)
setg   %al
mov    %al,-0xa2(%rbp)
mov    -0xa2(%rbp),%al
test   $0x1,%al
jne    11d4 <main+0x44>
cmpl   $0x1,-0x1c(%rbp)
jne    145b <main+0x2cb>
movl   $0x0,-0x34(%rbp)
lea    -0xa0(%rbp),%rdi
call   10b0 <motAleatoire@plt>
mov    %al,-0x3c(%rbp)
lea    -0xa0(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x2c(%rbp)
movslq -0x2c(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    12bb <main+0x12b>
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1292 <main+0x102>
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x34(%rbp),%ecx
xor    %eax,%eax
cmp    -0x2c(%rbp),%ecx
mov    %al,-0xa3(%rbp)
jge    12e2 <main+0x152>
cmpl   $0x0,-0x14(%rbp)
setg   %al
mov    %al,-0xa3(%rbp)
mov    -0xa3(%rbp),%al
test   $0x1,%al
jne    12f5 <main+0x165>
jmp    13fe <main+0x26e>
lea    0xd69(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1368 <main+0x1d8>
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    1347 <main+0x1b7>
movslq -0x30(%rbp),%rax
movsbl -0xa0(%rbp,%rax,1),%esi
ff
lea    0xd38(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1355 <main+0x1c5>
lea    0xd28(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    135a <main+0x1ca>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    130a <main+0x17a>
mov    -0x14(%rbp),%esi
lea    0xd06(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd09(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1070 <getchar@plt>
mov    %al,-0xa1(%rbp)
movsbl -0xa1(%rbp),%edi
call   1060 <maj@plt>
mov    %al,-0xa1(%rbp)
movsbl -0xa1(%rbp),%eax
cmp    $0xa,%eax
je     1387 <main+0x1f7>
lea    0xc6e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x34(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0xa1(%rbp),%al
lea    -0xa0(%rbp),%rsi
mov    -0x28(%rbp),%rdx
lea    -0x3c(%rbp),%rcx
movsbl %al,%edi
call   1090 <verification@plt>
mov    -0x38(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    12c1 <main+0x131>
mov    -0x34(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jne    1425 <main+0x295>
lea    -0xa0(%rbp),%rsi
lea    0xc7c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1456 <main+0x2c6>
mov    -0x34(%rbp),%eax
cmp    -0x2c(%rbp),%eax
je     1456 <main+0x2c6>
lea    -0xa0(%rbp),%rsi
lea    0xc7e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    145b <main+0x2cb>
cmpl   $0x2,-0x1c(%rbp)
jne    1498 <main+0x308>
jmp    146a <main+0x2da>
lea    0xc7f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xc06(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   10a0 <scanf@plt>
cmpl   $0x0,-0x14(%rbp)
jle    146a <main+0x2da>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    149d <main+0x30d>
cmpl   $0x3,-0x1c(%rbp)
jne    11cf <main+0x3f>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
movl   $0xa,0xc(%rsp)
movq   $0x0,0x18(%rsp)
movl   $0xa,0x10(%rsp)
lea    0xed0(%rip),%r12
lea    0xef5(%rip),%r15
lea    0xe11(%rip),%r13
lea    0xe2b(%rip),%rbp
lea    0x14(%rsp),%r14
lea    0xed9(%rip),%rcx
jmp    1219 <main+0x69>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    $0x3,%eax
je     1495 <main+0x2e5>
mov    %rcx,%rbx
nopl   0x0(%rax)
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
call   10c0 <scanf@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    0x14(%rsp),%eax
lea    -0x4(%rax),%ecx
cmp    $0xfffffffd,%ecx
jb     1220 <main+0x70>
cmp    $0x1,%eax
jne    1444 <main+0x294>
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
call   10d0 <motAleatoire@plt>
mov    %al,0x84(%rsp)
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %eax,%r12d
lea    0x0(,%r12,4),%edi
call   10a0 <malloc@plt>
test   %r12d,%r12d
jle    13e3 <main+0x233>
mov    %rax,%r14
mov    %r12d,%r13d
lea    0x0(,%r13,4),%rdx
xor    %ebp,%ebp
mov    %rax,%rdi
xor    %esi,%esi
call   1070 <memset@plt>
mov    0x10(%rsp),%ecx
mov    %ecx,0xc(%rsp)
mov    %ecx,%eax
test   %ecx,%ecx
jle    13a0 <main+0x1f0>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
lea    0xd2f(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %ebx,%ebx
jmp    12fe <main+0x14e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
je     1320 <main+0x170>
mov    $0x3d,%edi
cmpl   $0x1,(%r14,%rbx,4)
jne    12f0 <main+0x140>
movsbl 0x20(%rsp,%rbx,1),%edi
jmp    12f0 <main+0x140>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0xc(%rsp),%esi
lea    0xce9(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xcec(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   1090 <getchar@plt>
movsbl %al,%edi
call   1080 <maj@plt>
cmp    $0xa,%al
je     1340 <main+0x190>
mov    %eax,%r15d
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %ebp,0x1c(%rsp)
mov    0xc(%rsp),%eax
mov    %eax,0x20(%rsp)
movsbl %r15b,%edi
lea    0x20(%rsp),%rsi
mov    %r14,%rdx
lea    0x18(%rsp),%rcx
call   10b0 <verification@plt>
mov    0x1c(%rsp),%ebp
mov    0x20(%rsp),%eax
mov    %eax,0xc(%rsp)
cmp    %r12d,%ebp
jge    13a0 <main+0x1f0>
test   %eax,%eax
jg     12d0 <main+0x120>
nopl   0x0(%rax,%rax,1)
cmp    %r12d,%ebp
jne    13f2 <main+0x242>
lea    0xc84(%rip),%rdi
lea    0x20(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x10(%rsp),%eax
mov    %eax,0xc(%rsp)
lea    0xcea(%rip),%r12
lea    0xd0f(%rip),%r15
lea    0xc2b(%rip),%r13
lea    0xc45(%rip),%rbp
lea    0x14(%rsp),%r14
jmp    1440 <main+0x290>
mov    0x10(%rsp),%eax
mov    %eax,0xc(%rsp)
xor    %ebp,%ebp
cmp    %r12d,%ebp
je     13a5 <main+0x1f5>
test   %eax,%eax
lea    0xcb6(%rip),%r12
lea    0xcdb(%rip),%r15
lea    0xbf7(%rip),%r13
lea    0xc11(%rip),%rbp
lea    0x14(%rsp),%r14
jne    1440 <main+0x290>
lea    0xc45(%rip),%rdi
lea    0x20(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x10(%rsp),%eax
mov    %eax,0xc(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x14(%rsp),%eax
cmp    $0x2,%eax
lea    0xc8d(%rip),%rcx
lea    0xc(%rsp),%rbx
jne    1210 <main+0x60>
nopl   0x0(%rax)
lea    0xc25(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   10c0 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    1460 <main+0x2b0>
mov    %eax,0x10(%rsp)
mov    0x14(%rsp),%eax
lea    0xc4b(%rip),%rcx
jmp    1210 <main+0x60>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [45 x i8] c"\0A\0A ----------PENDU----------\0A\0A\0A\00"
@.str.1 = [50 x i8] c"\09\091 : Jouer\0A\09\092 : Nombre de chance\0A\09\093 : Quitter\0A\00"
@.str.2 = [6 x i8] c"\0A\09\09? \00"
@.str.3 = [4 x i8] c"%ld\00"
@.str.4 = [3 x i8] c"\0A\0A\00"
@.str.5 = [14 x i8] c"Mot secret : \00"
@.str.6 = [3 x i8] c"%c\00"
@.str.7 = [2 x i8] c"=\00"
@.str.8 = [17 x i8] c"\0AChance(s) : %ld\00"
@.str.9 = [11 x i8] c"\0ALettre : \00"
@.str.10 = [2 x i8] c"\0A\00"
@.str.11 = [51 x i8] c"\0AVous avez GAGNE :D !!!!!\0ALe mot etait bien : %s\0A\0A\00"
@.str.12 = [41 x i8] c"\0AVous avez PERDU :(\0ALe mot etait : %s\0A\0A\00"
@.str.13 = [37 x i8] c"\0ANombre de chance (defaut : 10 ) ? \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca [2 x i32]
%14 = alloca [100 x i8]
%15 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 10, i32* %6
store i32 10, i32* %7
store i32* null, i32** %9
%16 = bitcast [2 x i32]* %13 to i8*
br label %17
17: ; preds = %155, %2
br label %18
18: ; preds = %30, %17
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%22 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* %8)
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %24
24: ; preds = %18
%25 = load i32, i32* %8
%26 = icmp slt i32 %25, 1
br i1 %26, label %30, label %27
27: ; preds = %24
%28 = load i32, i32* %8
%29 = icmp sgt i32 %28, 3
br label %30
30: ; preds = %27, %24
%31 = phi i1 [ true, %24 ], [ %29, %27 ]
br i1 %31, label %18, label %32
32: ; preds = %30
%33 = load i32, i32* %8
%34 = icmp eq i32 %33, 1
br i1 %34, label %35, label %142
35: ; preds = %32
store i32 0, i32* %12
%36 = getelementptr inbounds [100 x i8], [100 x i8]* %14, i64 0, i64 0
%37 = call signext i8 @motAleatoire(i8* %36)
%38 = getelementptr inbounds [100 x i8], [100 x i8]* %14, i64 0, i64 100
store i8 %37, i8* %38
%39 = getelementptr inbounds [100 x i8], [100 x i8]* %14, i64 0, i64 0
%40 = call i32 @strlen(i8* %39)
store i32 %40, i32* %10
%41 = load i32, i32* %10
%42 = sext i32 %41 to i64
%43 = mul i64 %42, 4
%44 = trunc i64 %43 to i32
%45 = call i32* @malloc(i32 %44)
store i32* %45, i32** %9
store i32 0, i32* %11
br label %46
46: ; preds = %55, %35
%47 = load i32, i32* %11
%48 = load i32, i32* %10
%49 = icmp slt i32 %47, %48
br i1 %49, label %50, label %58
50: ; preds = %46
%51 = load i32*, i32** %9
%52 = load i32, i32* %11
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds i32, i32* %51, i64 %53
store i32 0, i32* %54
br label %55
55: ; preds = %50
%56 = load i32, i32* %11
%57 = add nsw i32 %56, 1
store i32 %57, i32* %11
br label %46
58: ; preds = %46
%59 = load i32, i32* %7
store i32 %59, i32* %6
br label %60
60: ; preds = %107, %58
%61 = load i32, i32* %12
%62 = load i32, i32* %10
%63 = icmp slt i32 %61, %62
br i1 %63, label %64, label %67
64: ; preds = %60
%65 = load i32, i32* %6
%66 = icmp sgt i32 %65, 0
br label %67
67: ; preds = %64, %60
%68 = phi i1 [ false, %60 ], [ %66, %64 ]
br i1 %68, label %69, label %122
69: ; preds = %67
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %11
br label %71
71: ; preds = %92, %69
%72 = load i32, i32* %11
%73 = load i32, i32* %10
%74 = icmp slt i32 %72, %73
br i1 %74, label %75, label %95
75: ; preds = %71
%76 = load i32*, i32** %9
%77 = load i32, i32* %11
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds i32, i32* %76, i64 %78
%80 = load i32, i32* %79
%81 = icmp eq i32 %80, 1
br i1 %81, label %82, label %89
82: ; preds = %75
%83 = load i32, i32* %11
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [100 x i8], [100 x i8]* %14, i64 0, i64 %84
%86 = load i8, i8* %85
%87 = sext i8 %86 to i32
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %87)
br label %91
89: ; preds = %75
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %91
91: ; preds = %89, %82
br label %92
92: ; preds = %91
%93 = load i32, i32* %11
%94 = add nsw i32 %93, 1
store i32 %94, i32* %11
br label %71
95: ; preds = %71
%96 = load i32, i32* %6
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i32 %96)
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
br label %99
99: ; preds = %103, %95
%100 = call signext i8 (...) @getchar()
store i8 %100, i8* %15
%101 = load i8, i8* %15
%102 = call signext i8 @maj(i8 signext %101)
store i8 %102, i8* %15
br label %103
103: ; preds = %99
%104 = load i8, i8* %15
%105 = sext i8 %104 to i32
%106 = icmp eq i32 %105, 10
br i1 %106, label %99, label %107
107: ; preds = %103
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%109 = load i32, i32* %12
%110 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 1
store i32 %109, i32* %110
%111 = load i32, i32* %6
%112 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 2
store i32 %111, i32* %112
%113 = load i8, i8* %15
%114 = getelementptr inbounds [100 x i8], [100 x i8]* %14, i64 0, i64 0
%115 = load i32*, i32** %9
%116 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 0
%117 = call i32 @verification(i8 signext %113, i8* %114, i32* %115, i32* %116)
%118 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 1
%119 = load i32, i32* %118
store i32 %119, i32* %12
%120 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 2
%121 = load i32, i32* %120
store i32 %121, i32* %6
br label %60
122: ; preds = %67
%123 = load i32, i32* %12
%124 = load i32, i32* %10
%125 = icmp eq i32 %123, %124
br i1 %125, label %126, label %130
126: ; preds = %122
%127 = getelementptr inbounds [100 x i8], [100 x i8]* %14, i64 0, i64 0
%128 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.11, i64 0, i64 0), i8* %127)
%129 = load i32, i32* %7
store i32 %129, i32* %6
br label %130
130: ; preds = %126, %122
%131 = load i32, i32* %6
%132 = icmp eq i32 %131, 0
br i1 %132, label %133, label %141
133: ; preds = %130
%134 = load i32, i32* %12
%135 = load i32, i32* %10
%136 = icmp ne i32 %134, %135
br i1 %136, label %137, label %141
137: ; preds = %133
%138 = getelementptr inbounds [100 x i8], [100 x i8]* %14, i64 0, i64 0
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.12, i64 0, i64 0), i8* %138)
%140 = load i32, i32* %7
store i32 %140, i32* %6
br label %141
141: ; preds = %137, %133, %130
br label %142
142: ; preds = %141, %32
%143 = load i32, i32* %8
%144 = icmp eq i32 %143, 2
br i1 %144, label %145, label %154
145: ; preds = %142
br label %146
146: ; preds = %149, %145
%147 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.13, i64 0, i64 0))
%148 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* %6)
br label %149
149: ; preds = %146
%150 = load i32, i32* %6
%151 = icmp sle i32 %150, 0
br i1 %151, label %146, label %152
152: ; preds = %149
%153 = load i32, i32* %6
store i32 %153, i32* %7
br label %154
154: ; preds = %152, %142
br label %155
155: ; preds = %154
%156 = load i32, i32* %8
%157 = icmp ne i32 %156, 3
br i1 %157, label %17, label %158
158: ; preds = %155
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [6 x i8] c"\0A\09\09? \00"
@.str.3 = [4 x i8] c"%ld\00"
@.str.5 = [14 x i8] c"Mot secret : \00"
@.str.8 = [17 x i8] c"\0AChance(s) : %ld\00"
@.str.9 = [11 x i8] c"\0ALettre : \00"
@.str.11 = [51 x i8] c"\0AVous avez GAGNE :D !!!!!\0ALe mot etait bien : %s\0A\0A\00"
@.str.12 = [41 x i8] c"\0AVous avez PERDU :(\0ALe mot etait : %s\0A\0A\00"
@.str.13 = [37 x i8] c"\0ANombre de chance (defaut : 10 ) ? \00"
@str = [44 x i8] c"\0A\0A ----------PENDU----------\0A\0A\00"
@str.14 = [49 x i8] c"\09\091 : Jouer\0A\09\092 : Nombre de chance\0A\09\093 : Quitter\00"
@str.15 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = bitcast i64* %5 to [2 x i32]*
%7 = alloca [100 x i8]
%8 = bitcast i32* %3 to i8*
store i32 10, i32* %3
%9 = bitcast i32* %4 to i8*
%10 = bitcast i64* %5 to i8*
store i64 0, i64* %5
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 100
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%14 = getelementptr inbounds i64, i64* %5, i64 1
%15 = bitcast i64* %14 to i32*
%16 = bitcast i64* %5 to i32*
br label %17
17: ; preds = %100, %2
%18 = phi i32 [ 10, %2 ], [ %102, %100 ]
br label %19
19: ; preds = %19, %17
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.14, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%23 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* %4)
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.15, i64 0, i64 0))
%25 = load i32, i32* %4
%26 = add i32 %25, -4
%27 = icmp ult i32 %26, -3
br i1 %27, label %19, label %28
28: ; preds = %19
%29 = icmp eq i32 %25, 1
br i1 %29, label %30, label %90
30: ; preds = %28
%31 = call signext i8 @motAleatoire(i8* %11)
store i8 %31, i8* %12
%32 = call i32 @strlen(i8* %11)
%33 = shl i32 %32, 2
%34 = call i32* @malloc(i32 %33)
%35 = icmp sgt i32 %32, 0
br i1 %35, label %37, label %36
36: ; preds = %30
store i32 %18, i32* %3
br label %78
37: ; preds = %30
%38 = bitcast i32* %34 to i8*
%39 = zext i32 %32 to i64
%40 = shl nuw nsw i64 %39, 2
store i32 %18, i32* %3
%41 = icmp sgt i32 %18, 0
br i1 %41, label %42, label %78
42: ; preds = %37
%43 = zext i32 %32 to i64
br label %44
44: ; preds = %69, %42
%45 = phi i32 [ 0, %42 ], [ %73, %69 ]
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
br label %47
47: ; preds = %44, %56
%48 = phi i64 [ 0, %44 ], [ %59, %56 ]
%49 = getelementptr inbounds i32, i32* %34, i64 %48
%50 = load i32, i32* %49
%51 = icmp eq i32 %50, 1
br i1 %51, label %52, label %56
52: ; preds = %47
%53 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 %48
%54 = load i8, i8* %53
%55 = sext i8 %54 to i32
br label %56
56: ; preds = %47, %52
%57 = phi i32 [ %55, %52 ], [ 61, %47 ]
%58 = call i32 @putchar(i32 %57)
%59 = add nuw nsw i64 %48, 1
%60 = icmp eq i64 %59, %43
br i1 %60, label %61, label %47
61: ; preds = %56
%62 = load i32, i32* %3
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i32 %62)
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
br label %65
65: ; preds = %65, %61
%66 = call signext i8 (...) @getchar()
%67 = call signext i8 @maj(i8 signext %66)
%68 = icmp eq i8 %67, 10
br i1 %68, label %65, label %69
69: ; preds = %65
%70 = call i32 @putchar(i32 10)
store i32 %45, i32* %13
%71 = load i32, i32* %3
store i32 %71, i32* %15
%72 = call i32 @verification(i8 signext %67, i8* %11, i32* %34, i32* %16)
%73 = load i32, i32* %13
%74 = load i32, i32* %15
store i32 %74, i32* %3
%75 = icmp slt i32 %73, %32
%76 = icmp sgt i32 %74, 0
%77 = select i1 %75, i1 %76, i1 false
br i1 %77, label %44, label %78
78: ; preds = %69, %36, %37
%79 = phi i32 [ %18, %37 ], [ %18, %36 ], [ %74, %69 ]
%80 = phi i32 [ 0, %37 ], [ 0, %36 ], [ %73, %69 ]
%81 = icmp eq i32 %80, %32
br i1 %81, label %82, label %84
82: ; preds = %78
%83 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.11, i64 0, i64 0), i8* %11)
store i32 %18, i32* %3
br label %88
84: ; preds = %78
%85 = icmp eq i32 %79, 0
br i1 %85, label %86, label %88
86: ; preds = %84
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.12, i64 0, i64 0), i8* %11)
store i32 %18, i32* %3
br label %88
88: ; preds = %86, %84, %82
%89 = load i32, i32* %4
br label %90
90: ; preds = %88, %28
%91 = phi i32 [ %89, %88 ], [ %25, %28 ]
%92 = icmp eq i32 %91, 2
br i1 %92, label %93, label %100
93: ; preds = %90, %93
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.13, i64 0, i64 0))
%95 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%96 = load i32, i32* %3
%97 = icmp slt i32 %96, 1
br i1 %97, label %93, label %98
98: ; preds = %93
%99 = load i32, i32* %4
br label %100
100: ; preds = %98, %90
%101 = phi i32 [ %91, %90 ], [ %99, %98 ]
%102 = phi i32 [ %18, %90 ], [ %96, %98 ]
%103 = icmp eq i32 %101, 3
br i1 %103, label %104, label %17
104: ; preds = %100
ret i32 0
}