#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 scalar_t__ time_t;

/* Variables and functions */
int /*<<< orphan*/ addMot(char *);
char *ctime(scalar_t__ *);
int /*<<< orphan*/ debut();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(int *);
scalar_t__ gagne(int *, int);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ highAdd(char *, int, int, char *, char *);
char lireLettre();
int *malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ recherche(char, char *, int *);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ stderr;
int strlen(char *);
int /*<<< orphan*/ system(char *);
scalar_t__ time(int /*<<< orphan*/ *);
char toupper(char);
void play2() {
  char lettre = 0;
  char motSecret[100] = {0};
  int *lettreTrouve = NULL;
  int vie = 10;
  int i = 0;
  int tailleMot = 0;
  int rejouer = 89;
  int round = 1;
  char pseudo[100] = {0};
  int ok = 0;
  int faute = 0;
  char lettreNope[26] = {0};
  system("clear");
  printf("Rentrez votre mot secret : ");
  scanf("%s", motSecret);
  system("clear");
  while (motSecret[i]) {
    motSecret[i] = toupper(motSecret[i]);
    i++;
  }
  tailleMot = strlen(motSecret);
  lettreTrouve = malloc(tailleMot * sizeof(int));
  if (lettreTrouve == NULL) {
    printf("dema2");
    exit(0);
  }
  for (i = 0; i < tailleMot; i++) {
    lettreTrouve[i] = 0;
  }
  printf("%s", motSecret);
  do {
    if (round == 1) {
      printf("Etes vous pret ?");
      getchar();
    } else {
      printf("Il te reste %d vie(s)\n", vie);
      for (i = 0; i < tailleMot; i++) {
        if (!lettreTrouve[i]) {
          printf("*");
        } else {
          printf("%c", motSecret[i]);
        }
      }
    }
    printf("\n");
    if (round != 1) {
      printf("une lettre : ");
      lettre = lireLettre();
      if (!recherche(lettre, motSecret, lettreTrouve) && round != 1) {
        vie--;
        faute++;
      } else {
        ok++;
      }
    }
    round++;
    system("clear");
  } while (vie > 0 && !gagne(lettreTrouve, tailleMot));
  if (gagne(lettreTrouve, tailleMot)) {
    printf("\ngg\n");
  } else {
    printf("\nperdu le mot ete : %s\n\n", motSecret);
  }
  printf("Ton nom : ");
  scanf("%s", pseudo);
  printf("Tu sera sauvgarde dans les score sous le pseudo : %s\n", pseudo);
  time_t current_time;
  char *c_time_string;
  current_time = time(NULL);
  if (current_time == ((time_t)-1)) {
    (void)fprintf(stderr, "Failure to obtain the current time.\n");
    exit(0);
  }
  c_time_string = ctime(&current_time);
  if (c_time_string == NULL) {
    (void)fprintf(stderr, "Failure to convert the current time.\n");
    exit(0);
  }
  highAdd(pseudo, faute, ok, c_time_string, motSecret);
  free(lettreTrouve);
  getchar();
  system("clear");
  addMot(motSecret);
  printf("Ton mot : %s sera sauvegarde :D\n", motSecret);
  debut();
}


x86 assembly (clang, -O0):
<play2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
movb   $0x0,-0x1(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   10b0 <memset@plt>
movq   $0x0,-0x78(%rbp)
movl   $0xa,-0x7c(%rbp)
movl   $0x0,-0x80(%rbp)
movl   $0x0,-0x84(%rbp)
movl   $0x59,-0x88(%rbp)
movl   $0x1,-0x8c(%rbp)
lea    -0xf0(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   10b0 <memset@plt>
movl   $0x0,-0xf4(%rbp)
movl   $0x0,-0xf8(%rbp)
lea    -0x120(%rbp),%rdi
xor    %esi,%esi
mov    $0x1a,%edx
call   10b0 <memset@plt>
lea    0xd3c(%rip),%rdi
call   1090 <system@plt>
lea    0xd36(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    -0x70(%rbp),%rsi
lea    0xd40(%rip),%rdi
call   1130 <scanf@plt>
lea    0xd12(%rip),%rdi
call   1090 <system@plt>
movslq -0x80(%rbp),%rax
cmpb   $0x0,-0x70(%rbp,%rax,1)
je     1328 <play2+0xf8>
movslq -0x80(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%edi
call   1040 <toupper@plt>
mov    %al,%cl
movslq -0x80(%rbp),%rax
mov    %cl,-0x70(%rbp,%rax,1)
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    12f3 <play2+0xc3>
lea    -0x70(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,-0x84(%rbp)
movslq -0x84(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1120 <malloc@plt>
mov    %rax,-0x78(%rbp)
cmpq   $0x0,-0x78(%rbp)
jne    136d <play2+0x13d>
lea    0xcc6(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
xor    %edi,%edi
call   1150 <exit@plt>
movl   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    -0x84(%rbp),%eax
jge    13a0 <play2+0x170>
mov    -0x78(%rbp),%rax
movslq -0x80(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    1374 <play2+0x144>
lea    -0x70(%rbp),%rsi
lea    0xc77(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
cmpl   $0x1,-0x8c(%rbp)
jne    13d9 <play2+0x1a9>
lea    0xc65(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x0,%al
call   10f0 <getchar@plt>
jmp    1454 <play2+0x224>
mov    -0x7c(%rbp),%esi
lea    0xc59(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
movl   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    -0x84(%rbp),%eax
jge    144f <play2+0x21f>
mov    -0x78(%rbp),%rax
movslq -0x80(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    1425 <play2+0x1f5>
lea    0xc3a(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
jmp    143c <play2+0x20c>
movslq -0x80(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%esi
lea    0xc20(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
jmp    1441 <play2+0x211>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    13f1 <play2+0x1c1>
jmp    1454 <play2+0x224>
lea    0xc27(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
cmpl   $0x1,-0x8c(%rbp)
je     14e1 <play2+0x2b1>
lea    0xbe2(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x0,%al
call   10c0 <lireLettre@plt>
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
lea    -0x70(%rbp),%rsi
mov    -0x78(%rbp),%rdx
movsbl %al,%edi
call   1080 <recherche@plt>
cmp    $0x0,%eax
jne    14cd <play2+0x29d>
cmpl   $0x1,-0x8c(%rbp)
je     14cd <play2+0x29d>
mov    -0x7c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x7c(%rbp)
mov    -0xf8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf8(%rbp)
jmp    14dc <play2+0x2ac>
mov    -0xf4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf4(%rbp)
jmp    14e1 <play2+0x2b1>
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
lea    0xb09(%rip),%rdi
call   1090 <system@plt>
xor    %eax,%eax
cmpl   $0x0,-0x7c(%rbp)
mov    %al,-0x131(%rbp)
jle    152c <play2+0x2fc>
mov    -0x78(%rbp),%rdi
mov    -0x84(%rbp),%esi
call   10d0 <gagne@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
mov    %al,-0x131(%rbp)
mov    -0x131(%rbp),%al
test   $0x1,%al
jne    13b2 <play2+0x182>
mov    -0x78(%rbp),%rdi
mov    -0x84(%rbp),%esi
call   10d0 <gagne@plt>
cmp    $0x0,%rax
je     1566 <play2+0x336>
lea    0xb0c(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
jmp    1578 <play2+0x348>
lea    -0x70(%rbp),%rsi
lea    0xafa(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xb05(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    -0xf0(%rbp),%rsi
lea    0xa8e(%rip),%rdi
call   1130 <scanf@plt>
lea    -0xf0(%rbp),%rsi
lea    0xae8(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1110 <time@plt>
mov    %rax,-0x128(%rbp)
cmpq   $0xffffffffffffffff,-0x128(%rbp)
ff
jne    15e8 <play2+0x3b8>
mov    0x2a0d(%rip),%rax
mov    (%rax),%edi
lea    0xae9(%rip),%rsi
call   1100 <fprintf@plt>
xor    %edi,%edi
call   1150 <exit@plt>
lea    -0x128(%rbp),%rdi
call   1060 <ctime@plt>
mov    %rax,-0x130(%rbp)
cmpq   $0x0,-0x130(%rbp)
jne    1625 <play2+0x3f5>
mov    0x29d0(%rip),%rax
mov    (%rax),%edi
lea    0xad1(%rip),%rsi
call   1100 <fprintf@plt>
xor    %edi,%edi
call   1150 <exit@plt>
lea    -0xf0(%rbp),%rdi
mov    -0xf8(%rbp),%esi
mov    -0xf4(%rbp),%edx
mov    -0x130(%rbp),%rcx
lea    -0x70(%rbp),%r8
call   1050 <highAdd@plt>
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
mov    $0x0,%al
call   10f0 <getchar@plt>
lea    0x9a1(%rip),%rdi
call   1090 <system@plt>
lea    -0x70(%rbp),%rdi
call   10e0 <addMot@plt>
lea    -0x70(%rbp),%rsi
lea    0xa98(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x0,%al
call   1140 <debut@plt>
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<play2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movl   $0x0,0x80(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movl   $0x0,0xf0(%rsp)
lea    0xd31(%rip),%rbx
mov    %rbx,%rdi
call   10b0 <system@plt>
lea    0xd28(%rip),%rdi
xor    %eax,%eax
call   10c0 <printf@plt>
lea    0xd36(%rip),%rdi
lea    0x20(%rsp),%rsi
call   1150 <scanf@plt>
mov    %rbx,%rdi
call   10b0 <system@plt>
mov    0x20(%rsp),%al
test   %al,%al
je     1326 <play2+0xd6>
lea    0x21(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1050 <toupper@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1310 <play2+0xc0>
lea    0x20(%rsp),%rdi
call   1090 <strlen@plt>
mov    %eax,%r14d
lea    0x0(,%r14,4),%edi
call   1140 <malloc@plt>
test   %rax,%rax
je     1599 <play2+0x349>
mov    %rax,%rbx
mov    %r14d,%r12d
test   %r14d,%r14d
jle    1366 <play2+0x116>
lea    0x0(,%r12,4),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   10d0 <memset@plt>
lea    0xcb5(%rip),%rdi
lea    0x20(%rsp),%rsi
xor    %eax,%eax
call   10c0 <printf@plt>
mov    $0x1,%r15d
mov    $0xa,%r13d
xor    %ebp,%ebp
movl   $0x0,0xc(%rsp)
mov    %r14,0x10(%rsp)
jmp    13e3 <play2+0x193>
cs nopw 0x0(%rax,%rax,1)
lea    0xc84(%rip),%rdi
xor    %eax,%eax
call   10c0 <printf@plt>
xor    %eax,%eax
call   1110 <getchar@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
lea    0xc3a(%rip),%rdi
call   10b0 <system@plt>
add    $0x1,%r15d
mov    %rbx,%rdi
mov    %r14d,%esi
call   10f0 <gagne@plt>
test   %rax,%rax
jne    149e <play2+0x24e>
cmp    $0x1,%r15d
je     13a0 <play2+0x150>
lea    0xc4c(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   10c0 <printf@plt>
test   %r14d,%r14d
jle    1440 <play2+0x1f0>
xor    %r14d,%r14d
jmp    1424 <play2+0x1d4>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl 0x20(%rsp,%r14,1),%edi
call   1040 <putchar@plt>
add    $0x1,%r14
cmp    %r14,%r12
je     1440 <play2+0x1f0>
cmpl   $0x0,(%rbx,%r14,4)
jne    1410 <play2+0x1c0>
mov    $0x2a,%edi
jmp    1416 <play2+0x1c6>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0xa,%edi
call   1040 <putchar@plt>
lea    0xc02(%rip),%rdi
xor    %eax,%eax
call   10c0 <printf@plt>
xor    %eax,%eax
call   10e0 <lireLettre@plt>
movsbl %al,%edi
lea    0x20(%rsp),%rsi
mov    %rbx,%rdx
call   10a0 <recherche@plt>
xor    %ecx,%ecx
xor    %edx,%edx
test   %eax,%eax
setne  %cl
sete   %dl
sub    %edx,%r13d
add    %ecx,%ebp
add    %edx,0xc(%rsp)
lea    0xb75(%rip),%rdi
call   10b0 <system@plt>
test   %r13d,%r13d
mov    0x10(%rsp),%r14
jg     13cb <play2+0x17b>
mov    %rbx,%rdi
mov    %r14d,%esi
call   10f0 <gagne@plt>
test   %rax,%rax
je     14bc <play2+0x26c>
lea    0xc72(%rip),%rdi
call   1060 <puts@plt>
jmp    14cf <play2+0x27f>
lea    0xb9e(%rip),%rdi
lea    0x20(%rsp),%rsi
xor    %eax,%eax
call   10c0 <printf@plt>
lea    0xba4(%rip),%rdi
xor    %eax,%eax
call   10c0 <printf@plt>
lea    0xb3e(%rip),%rdi
lea    0x90(%rsp),%r14
mov    %r14,%rsi
call   1150 <scanf@plt>
lea    0xb8a(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   10c0 <printf@plt>
xor    %edi,%edi
call   1130 <time@plt>
mov    %rax,0x18(%rsp)
cmp    $0xffffffffffffffff,%rax
je     15ae <play2+0x35e>
lea    0x18(%rsp),%rdi
call   1080 <ctime@plt>
test   %rax,%rax
je     15c0 <play2+0x370>
lea    0x90(%rsp),%rdi
lea    0x20(%rsp),%r14
mov    0xc(%rsp),%esi
mov    %ebp,%edx
mov    %rax,%rcx
mov    %r14,%r8
call   1070 <highAdd@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
call   1110 <getchar@plt>
lea    0xa9e(%rip),%rdi
call   10b0 <system@plt>
mov    %r14,%rdi
call   1100 <addMot@plt>
lea    0xb90(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   10c0 <printf@plt>
xor    %eax,%eax
call   1160 <debut@plt>
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xa85(%rip),%rdi
xor    %eax,%eax
call   10c0 <printf@plt>
xor    %edi,%edi
call   1170 <exit@plt>
mov    0x2a2b(%rip),%rax
mov    (%rax),%edi
lea    0xafd(%rip),%rsi
jmp    15d0 <play2+0x380>
mov    0x2a19(%rip),%rax
mov    (%rax),%edi
lea    0xb10(%rip),%rsi
call   1120 <fprintf@plt>
xor    %edi,%edi
call   1170 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [28 x i8] c"Rentrez votre mot secret : \00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [6 x i8] c"dema2\00"
@.str.4 = [17 x i8] c"Etes vous pret ?\00"
@.str.5 = [23 x i8] c"Il te reste %d vie(s)\0A\00"
@.str.6 = [2 x i8] c"*\00"
@.str.7 = [3 x i8] c"%c\00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [14 x i8] c"une lettre : \00"
@.str.10 = [5 x i8] c"\0Agg\0A\00"
@.str.11 = [25 x i8] c"\0Aperdu le mot ete : %s\0A\0A\00"
@.str.12 = [11 x i8] c"Ton nom : \00"
@.str.13 = [54 x i8] c"Tu sera sauvgarde dans les score sous le pseudo : %s\0A\00"
@stderr = global i32 0
@.str.14 = [37 x i8] c"Failure to obtain the current time.\0A\00"
@.str.15 = [38 x i8] c"Failure to convert the current time.\0A\00"
@.str.16 = [33 x i8] c"Ton mot : %s sera sauvegarde :D\0A\00"
define void @play2() {
%1 = alloca i8
%2 = alloca [100 x i8]
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [100 x i8]
%10 = alloca i32
%11 = alloca i32
%12 = alloca [26 x i8]
%13 = alloca i64
%14 = alloca i8*
store i8 0, i8* %1
%15 = bitcast [100 x i8]* %2 to i8*
store i32* null, i32** %3
store i32 10, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 89, i32* %7
store i32 1, i32* %8
%16 = bitcast [100 x i8]* %9 to i8*
store i32 0, i32* %10
store i32 0, i32* %11
%17 = bitcast [26 x i8]* %12 to i8*
%18 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%20 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %20)
%22 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %23
23: ; preds = %29, %0
%24 = load i32, i32* %5
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %25
%27 = load i8, i8* %26
%28 = icmp ne i8 %27, 0
br i1 %28, label %29, label %40
29: ; preds = %23
%30 = load i32, i32* %5
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %31
%33 = load i8, i8* %32
%34 = call signext i8 @toupper(i8 signext %33)
%35 = load i32, i32* %5
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %36
store i8 %34, i8* %37
%38 = load i32, i32* %5
%39 = add nsw i32 %38, 1
store i32 %39, i32* %5
br label %23
40: ; preds = %23
%41 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%42 = call i32 @strlen(i8* %41)
store i32 %42, i32* %6
%43 = load i32, i32* %6
%44 = sext i32 %43 to i64
%45 = mul i64 %44, 4
%46 = trunc i64 %45 to i32
%47 = call i32* @malloc(i32 %46)
store i32* %47, i32** %3
%48 = load i32*, i32** %3
%49 = icmp eq i32* %48, null
br i1 %49, label %50, label %53
50: ; preds = %40
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%52 = call i32 @exit(i32 0)
unreachable
53: ; preds = %40
store i32 0, i32* %5
br label %54
54: ; preds = %63, %53
%55 = load i32, i32* %5
%56 = load i32, i32* %6
%57 = icmp slt i32 %55, %56
br i1 %57, label %58, label %66
58: ; preds = %54
%59 = load i32*, i32** %3
%60 = load i32, i32* %5
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds i32, i32* %59, i64 %61
store i32 0, i32* %62
br label %63
63: ; preds = %58
%64 = load i32, i32* %5
%65 = add nsw i32 %64, 1
store i32 %65, i32* %5
br label %54
66: ; preds = %54
%67 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %67)
br label %69
69: ; preds = %140, %66
%70 = load i32, i32* %8
%71 = icmp eq i32 %70, 1
br i1 %71, label %72, label %75
72: ; preds = %69
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%74 = call i32 (...) @getchar()
br label %103
75: ; preds = %69
%76 = load i32, i32* %4
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %76)
store i32 0, i32* %5
br label %78
78: ; preds = %99, %75
%79 = load i32, i32* %5
%80 = load i32, i32* %6
%81 = icmp slt i32 %79, %80
br i1 %81, label %82, label %102
82: ; preds = %78
%83 = load i32*, i32** %3
%84 = load i32, i32* %5
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds i32, i32* %83, i64 %85
%87 = load i32, i32* %86
%88 = icmp ne i32 %87, 0
br i1 %88, label %91, label %89
89: ; preds = %82
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %98
91: ; preds = %82
%92 = load i32, i32* %5
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %93
%95 = load i8, i8* %94
%96 = sext i8 %95 to i32
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %96)
br label %98
98: ; preds = %91, %89
br label %99
99: ; preds = %98
%100 = load i32, i32* %5
%101 = add nsw i32 %100, 1
store i32 %101, i32* %5
br label %78
102: ; preds = %78
br label %103
103: ; preds = %102, %72
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%105 = load i32, i32* %8
%106 = icmp ne i32 %105, 1
br i1 %106, label %107, label %127
107: ; preds = %103
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
%109 = call signext i8 (...) @lireLettre()
store i8 %109, i8* %1
%110 = load i8, i8* %1
%111 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%112 = load i32*, i32** %3
%113 = call i32 @recherche(i8 signext %110, i8* %111, i32* %112)
%114 = icmp ne i32 %113, 0
br i1 %114, label %123, label %115
115: ; preds = %107
%116 = load i32, i32* %8
%117 = icmp ne i32 %116, 1
br i1 %117, label %118, label %123
118: ; preds = %115
%119 = load i32, i32* %4
%120 = add nsw i32 %119, -1
store i32 %120, i32* %4
%121 = load i32, i32* %11
%122 = add nsw i32 %121, 1
store i32 %122, i32* %11
br label %126
123: ; preds = %115, %107
%124 = load i32, i32* %10
%125 = add nsw i32 %124, 1
store i32 %125, i32* %10
br label %126
126: ; preds = %123, %118
br label %127
127: ; preds = %126, %103
%128 = load i32, i32* %8
%129 = add nsw i32 %128, 1
store i32 %129, i32* %8
%130 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %131
131: ; preds = %127
%132 = load i32, i32* %4
%133 = icmp sgt i32 %132, 0
br i1 %133, label %134, label %140
134: ; preds = %131
%135 = load i32*, i32** %3
%136 = load i32, i32* %6
%137 = call i64 @gagne(i32* %135, i32 %136)
%138 = icmp ne i64 %137, 0
%139 = xor i1 %138, true
br label %140
140: ; preds = %134, %131
%141 = phi i1 [ false, %131 ], [ %139, %134 ]
br i1 %141, label %69, label %142
142: ; preds = %140
%143 = load i32*, i32** %3
%144 = load i32, i32* %6
%145 = call i64 @gagne(i32* %143, i32 %144)
%146 = icmp ne i64 %145, 0
br i1 %146, label %147, label %149
147: ; preds = %142
%148 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
br label %152
149: ; preds = %142
%150 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%151 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0), i8* %150)
br label %152
152: ; preds = %149, %147
%153 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0))
%154 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%155 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %154)
%156 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%157 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.13, i64 0, i64 0), i8* %156)
%158 = call i64 @time(i32* null)
store i64 %158, i64* %13
%159 = load i64, i64* %13
%160 = icmp eq i64 %159, -1
br i1 %160, label %161, label %165
161: ; preds = %152
%162 = load i32, i32* @stderr
%163 = call i32 @fprintf(i32 %162, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.14, i64 0, i64 0))
%164 = call i32 @exit(i32 0)
unreachable
165: ; preds = %152
%166 = call i8* @ctime(i64* %13)
store i8* %166, i8** %14
%167 = load i8*, i8** %14
%168 = icmp eq i8* %167, null
br i1 %168, label %169, label %173
169: ; preds = %165
%170 = load i32, i32* @stderr
%171 = call i32 @fprintf(i32 %170, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.15, i64 0, i64 0))
%172 = call i32 @exit(i32 0)
unreachable
173: ; preds = %165
%174 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%175 = load i32, i32* %11
%176 = load i32, i32* %10
%177 = load i8*, i8** %14
%178 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%179 = call i32 @highAdd(i8* %174, i32 %175, i32 %176, i8* %177, i8* %178)
%180 = load i32*, i32** %3
%181 = call i32 @free(i32* %180)
%182 = call i32 (...) @getchar()
%183 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%184 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%185 = call i32 @addMot(i8* %184)
%186 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%187 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.16, i64 0, i64 0), i8* %186)
%188 = call i32 (...) @debut()
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@.str.1 = [28 x i8] c"Rentrez votre mot secret : \00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [6 x i8] c"dema2\00"
@.str.4 = [17 x i8] c"Etes vous pret ?\00"
@.str.5 = [23 x i8] c"Il te reste %d vie(s)\0A\00"
@.str.9 = [14 x i8] c"une lettre : \00"
@.str.11 = [25 x i8] c"\0Aperdu le mot ete : %s\0A\0A\00"
@.str.12 = [11 x i8] c"Ton nom : \00"
@.str.13 = [54 x i8] c"Tu sera sauvgarde dans les score sous le pseudo : %s\0A\00"
@stderr = global i32 0
@.str.14 = [37 x i8] c"Failure to obtain the current time.\0A\00"
@.str.15 = [38 x i8] c"Failure to convert the current time.\0A\00"
@.str.16 = [33 x i8] c"Ton mot : %s sera sauvegarde :D\0A\00"
@str = [4 x i8] c"\0Agg\00"
define void @play2() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i8]
%3 = alloca i64
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %4)
%9 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%10 = load i8, i8* %4
%11 = icmp eq i8 %10, 0
br i1 %11, label %21, label %12
12: ; preds = %0, %12
%13 = phi i64 [ %17, %12 ], [ 0, %0 ]
%14 = phi i8 [ %19, %12 ], [ %10, %0 ]
%15 = phi i8* [ %18, %12 ], [ %4, %0 ]
%16 = call signext i8 @toupper(i8 signext %14)
store i8 %16, i8* %15
%17 = add nuw i64 %13, 1
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = icmp eq i8 %19, 0
br i1 %20, label %21, label %12
21: ; preds = %12, %0
%22 = call i32 @strlen(i8* %4)
%23 = shl i32 %22, 2
%24 = call i32* @malloc(i32 %23)
%25 = bitcast i32* %24 to i8*
%26 = icmp eq i32* %24, null
br i1 %26, label %32, label %27
27: ; preds = %21
%28 = icmp sgt i32 %22, 0
br i1 %28, label %29, label %35
29: ; preds = %27
%30 = zext i32 %22 to i64
%31 = shl nuw nsw i64 %30, 2
br label %35
32: ; preds = %21
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%34 = call i32 @exit(i32 0)
unreachable
35: ; preds = %29, %27
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %4)
%37 = zext i32 %22 to i64
br label %38
38: ; preds = %80, %35
%39 = phi i32 [ 10, %35 ], [ %83, %80 ]
%40 = phi i32 [ 1, %35 ], [ %84, %80 ]
%41 = phi i32 [ 0, %35 ], [ %82, %80 ]
%42 = phi i32 [ 0, %35 ], [ %81, %80 ]
%43 = icmp eq i32 %40, 1
br i1 %43, label %44, label %49
44: ; preds = %38
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%46 = call i32 (...) @getchar()
%47 = call i32 @putchar(i32 10)
%48 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %80
49: ; preds = %38
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %39)
br i1 %28, label %51, label %65
51: ; preds = %49, %60
%52 = phi i64 [ %63, %60 ], [ 0, %49 ]
%53 = getelementptr inbounds i32, i32* %24, i64 %52
%54 = load i32, i32* %53
%55 = icmp eq i32 %54, 0
br i1 %55, label %60, label %56
56: ; preds = %51
%57 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %52
%58 = load i8, i8* %57
%59 = sext i8 %58 to i32
br label %60
60: ; preds = %51, %56
%61 = phi i32 [ %59, %56 ], [ 42, %51 ]
%62 = call i32 @putchar(i32 %61)
%63 = add nuw nsw i64 %52, 1
%64 = icmp eq i64 %63, %37
br i1 %64, label %65, label %51
65: ; preds = %60, %49
%66 = call i32 @putchar(i32 10)
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
%68 = call signext i8 (...) @lireLettre()
%69 = call i32 @recherche(i8 signext %68, i8* %4, i32* %24)
%70 = icmp eq i32 %69, 0
%71 = sext i1 %70 to i32
%72 = add nsw i32 %39, %71
%73 = xor i1 %70, true
%74 = zext i1 %73 to i32
%75 = add nsw i32 %41, %74
%76 = zext i1 %70 to i32
%77 = add nsw i32 %42, %76
%78 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%79 = icmp sgt i32 %72, 0
br i1 %79, label %80, label %87
80: ; preds = %44, %65
%81 = phi i32 [ %42, %44 ], [ %77, %65 ]
%82 = phi i32 [ %41, %44 ], [ %75, %65 ]
%83 = phi i32 [ %39, %44 ], [ %72, %65 ]
%84 = add nuw nsw i32 %40, 1
%85 = call i64 @gagne(i32* %24, i32 %22)
%86 = icmp eq i64 %85, 0
br i1 %86, label %38, label %87
87: ; preds = %65, %80
%88 = phi i32 [ %77, %65 ], [ %81, %80 ]
%89 = phi i32 [ %75, %65 ], [ %82, %80 ]
%90 = call i64 @gagne(i32* %24, i32 %22)
%91 = icmp eq i64 %90, 0
br i1 %91, label %94, label %92
92: ; preds = %87
%93 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
br label %96
94: ; preds = %87
%95 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0), i8* %4)
br label %96
96: ; preds = %94, %92
%97 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0))
%98 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%99 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.13, i64 0, i64 0), i8* %5)
%100 = bitcast i64* %3 to i8*
%101 = call i64 @time(i32* null)
store i64 %101, i64* %3
%102 = icmp eq i64 %101, -1
br i1 %102, label %103, label %107
103: ; preds = %96
%104 = load i32, i32* @stderr
%105 = call i32 @fprintf(i32 %104, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.14, i64 0, i64 0))
%106 = call i32 @exit(i32 0)
unreachable
107: ; preds = %96
%108 = call i8* @ctime(i64* %3)
%109 = icmp eq i8* %108, null
br i1 %109, label %110, label %114
110: ; preds = %107
%111 = load i32, i32* @stderr
%112 = call i32 @fprintf(i32 %111, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.15, i64 0, i64 0))
%113 = call i32 @exit(i32 0)
unreachable
114: ; preds = %107
%115 = call i32 @highAdd(i8* %5, i32 %88, i32 %89, i8* %108, i8* %4)
%116 = call i32 @free(i32* %24)
%117 = call i32 (...) @getchar()
%118 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%119 = call i32 @addMot(i8* %4)
%120 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.16, i64 0, i64 0), i8* %4)
%121 = call i32 (...) @debut()
ret void
}