#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*/ systemePoints(int, int, int);
void victoireBatailleNavale(int modeDeJeux, double secondes,
                            int niveauDifficulte) {
  int nbPoints, nbPointsVIP;
  nbPoints = 50;
  nbPointsVIP = 0;
  coloration("Bravo ! Vous avez gagne.\n", "32");
  if (secondes <= 60.0)
    nbPointsVIP = 2;
  nbPoints *= niveauDifficulte;
  systemePoints(nbPoints, nbPointsVIP, modeDeJeux);
}


x86 assembly (clang, -O0):
<victoireBatailleNavale>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x32,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    0xec0(%rip),%rdi
lea    0xed3(%rip),%rsi
call   1030 <coloration@plt>
movsd  0xea4(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     116e <victoireBatailleNavale+0x4e>
movl   $0x2,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x4(%rbp),%edx
call   1040 <systemePoints@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<victoireBatailleNavale>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%r14d
movsd  0xecf(%rip),%xmm1
xor    %ebp,%ebp
ucomisd %xmm0,%xmm1
setae  %bpl
lea    0xec6(%rip),%rdi
lea    0xed9(%rip),%rsi
call   1030 <coloration@plt>
add    %ebp,%ebp
imul   $0x32,%ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <systemePoints@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Bravo ! Vous avez gagne.\0A\00"
@.str.1 = [3 x i8] c"32\00"
define void @victoireBatailleNavale(i32 %0, double %1, i32 %2) {
%4 = alloca i32
%5 = alloca double
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store double %1, double* %5
store i32 %2, i32* %6
store i32 50, i32* %7
store i32 0, i32* %8
%9 = call i32 @coloration(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%10 = load double, double* %5
%11 = fcmp ole double %10, 6.000000e+01
br i1 %11, label %12, label %13
12: ; preds = %3
store i32 2, i32* %8
br label %13
13: ; preds = %12, %3
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = mul nsw i32 %15, %14
store i32 %16, i32* %7
%17 = load i32, i32* %7
%18 = load i32, i32* %8
%19 = load i32, i32* %4
%20 = call i32 @systemePoints(i32 %17, i32 %18, i32 %19)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Bravo ! Vous avez gagne.\0A\00"
@.str.1 = [3 x i8] c"32\00"
define void @victoireBatailleNavale(i32 %0, double %1, i32 %2) {
%4 = tail call i32 @coloration(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%5 = fcmp ugt double %1, 6.000000e+01
%6 = select i1 %5, i32 0, i32 2
%7 = mul nsw i32 %2, 50
%8 = tail call i32 @systemePoints(i32 %7, i32 %6, i32 %0)
ret void
}