#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*/ attendre(int);
int /*<<< orphan*/ coloration(char *, char *);
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ systemePoints(int, int, int);
void victoirePacmanSolo(int modeDeJeux, int vie, double temps) {
  int nbPoints, nbPointsVIP;
  nbPoints = nbPointsVIP = 0;
  system("clear");
  coloration("Bravo ! Vous avez gagne.\n\n", "32");
  attendre(1);
  switch (vie) {
  case 3:
    nbPoints = 75;
    if (temps < 80.0)
      nbPointsVIP = 2;
    break;
  case 2:
    nbPoints = 50;
    break;
  case 1:
    nbPoints = 25;
    break;
  }
  systemePoints(nbPoints, nbPointsVIP, modeDeJeux);
}


x86 assembly (clang, -O0):
<victoirePacmanSolo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xea0(%rip),%rdi
call   1030 <system@plt>
lea    0xe9a(%rip),%rdi
lea    0xeae(%rip),%rsi
call   1040 <coloration@plt>
mov    $0x1,%edi
call   1050 <attendre@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
sub    $0x1,%eax
je     11f2 <victoirePacmanSolo+0xb2>
jmp    119e <victoirePacmanSolo+0x5e>
mov    -0x1c(%rbp),%eax
sub    $0x2,%eax
je     11e6 <victoirePacmanSolo+0xa6>
jmp    11af <victoirePacmanSolo+0x6f>
mov    -0x1c(%rbp),%eax
sub    $0x3,%eax
jne    11f9 <victoirePacmanSolo+0xb9>
jmp    11c0 <victoirePacmanSolo+0x80>
movl   $0x4b,-0x14(%rbp)
movsd  0xe31(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11e1 <victoirePacmanSolo+0xa1>
movl   $0x2,-0x18(%rbp)
jmp    11f9 <victoirePacmanSolo+0xb9>
movl   $0x32,-0x14(%rbp)
jmp    11f9 <victoirePacmanSolo+0xb9>
movl   $0x19,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x4(%rbp),%edx
call   1060 <systemePoints@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<victoirePacmanSolo>:
push   %rbp
push   %rbx
push   %rax
movsd  %xmm0,(%rsp)
mov    %esi,%ebp
mov    %edi,%ebx
lea    0xeb5(%rip),%rdi
call   1030 <system@plt>
lea    0xeaf(%rip),%rdi
lea    0xec3(%rip),%rsi
call   1040 <coloration@plt>
mov    $0x1,%edi
call   1050 <attendre@plt>
xor    %esi,%esi
cmp    $0x1,%ebp
je     11a1 <victoirePacmanSolo+0x61>
cmp    $0x2,%ebp
je     11a8 <victoirePacmanSolo+0x68>
cmp    $0x3,%ebp
jne    11af <victoirePacmanSolo+0x6f>
mov    $0x4b,%edi
movsd  0xe6d(%rip),%xmm0
ucomisd (%rsp),%xmm0
jbe    11b1 <victoirePacmanSolo+0x71>
mov    $0x2,%esi
jmp    11b1 <victoirePacmanSolo+0x71>
mov    $0x19,%edi
jmp    11b1 <victoirePacmanSolo+0x71>
mov    $0x32,%edi
jmp    11b1 <victoirePacmanSolo+0x71>
xor    %edi,%edi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <systemePoints@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [27 x i8] c"Bravo ! Vous avez gagne.\0A\0A\00"
@.str.2 = [3 x i8] c"32\00"
define void @victoirePacmanSolo(i32 %0, i32 %1, double %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store double %2, double* %6
store i32 0, i32* %8
store i32 0, i32* %7
%9 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @coloration(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @attendre(i32 1)
%12 = load i32, i32* %5
switch i32 %12, label %20 [
i32 3, label %13
i32 2, label %18
i32 1, label %19
]
13: ; preds = %3
store i32 75, i32* %7
%14 = load double, double* %6
%15 = fcmp olt double %14, 8.000000e+01
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 2, i32* %8
br label %17
17: ; preds = %16, %13
br label %20
18: ; preds = %3
store i32 50, i32* %7
br label %20
19: ; preds = %3
store i32 25, i32* %7
br label %20
20: ; preds = %3, %19, %18, %17
%21 = load i32, i32* %7
%22 = load i32, i32* %8
%23 = load i32, i32* %4
%24 = call i32 @systemePoints(i32 %21, i32 %22, i32 %23)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@.str.1 = [27 x i8] c"Bravo ! Vous avez gagne.\0A\0A\00"
@.str.2 = [3 x i8] c"32\00"
define void @victoirePacmanSolo(i32 %0, i32 %1, double %2) {
%4 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @coloration(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @attendre(i32 1)
switch i32 %1, label %12 [
i32 3, label %7
i32 2, label %10
i32 1, label %11
]
7: ; preds = %3
%8 = fcmp olt double %2, 8.000000e+01
br i1 %8, label %9, label %12
9: ; preds = %7
br label %12
10: ; preds = %3
br label %12
11: ; preds = %3
br label %12
12: ; preds = %7, %9, %3, %11, %10
%13 = phi i32 [ 0, %3 ], [ 25, %11 ], [ 50, %10 ], [ 75, %9 ], [ 75, %7 ]
%14 = phi i32 [ 0, %3 ], [ 0, %11 ], [ 0, %10 ], [ 2, %9 ], [ 0, %7 ]
%15 = tail call i32 @systemePoints(i32 %13, i32 %14, i32 %0)
ret void
}