#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*/ afficheChaine(char *, float, float, float);
int /*<<< orphan*/ couleurCourante(int, int, int);
int hauteurFenetre();
float largeurFenetre();
int /*<<< orphan*/ sprintf(char *, char *, int);
void afficheScore(int scoreJ1, int scoreJ2) {
  couleurCourante(240, 255, 255);
  float taille = (largeurFenetre() >= hauteurFenetre()) * largeurFenetre() / 6 +
                 (hauteurFenetre() > largeurFenetre()) * hauteurFenetre() / 6;
  char score[10];
  afficheChaine("Score :", taille / 6, taille / 10, taille / 2);
  sprintf(score, "%d", scoreJ1);
  afficheChaine(score, taille / 6, taille / 10, taille / 4);
  afficheChaine("Score : ", taille / 6, largeurFenetre() - taille * 9 / 10,
                taille / 2);
  sprintf(score, "%d", scoreJ2);
  afficheChaine(score, taille / 6, largeurFenetre() - taille * 9 / 10,
                taille / 4);
}


x86 assembly (clang, -O0):
<afficheScore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0xf0,%edi
mov    $0xff,%edx
mov    %edx,%esi
call   1050 <couleurCourante@plt>
mov    $0x0,%al
call   1040 <largeurFenetre@plt>
movss  %xmm0,-0x40(%rbp)
mov    $0x0,%al
call   1030 <hauteurFenetre@plt>
movss  -0x40(%rbp),%xmm0
cvtsi2ss %eax,%xmm1
ucomiss %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x3c(%rbp)
mov    $0x0,%al
call   1040 <largeurFenetre@plt>
movaps %xmm0,%xmm1
movss  -0x3c(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  0xe52(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x34(%rbp)
mov    $0x0,%al
call   1030 <hauteurFenetre@plt>
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x38(%rbp)
mov    $0x0,%al
call   1040 <largeurFenetre@plt>
movaps %xmm0,%xmm1
movss  -0x38(%rbp),%xmm0
ucomiss %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x30(%rbp)
mov    $0x0,%al
call   1030 <hauteurFenetre@plt>
movss  -0x34(%rbp),%xmm0
mov    %eax,%ecx
mov    -0x30(%rbp),%eax
imul   %ecx,%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  0xde6(%rip),%xmm1
divss  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
movss  0xdcd(%rip),%xmm2
divss  %xmm2,%xmm1
movss  -0xc(%rbp),%xmm2
movss  0xdc8(%rip),%xmm3
divss  %xmm3,%xmm2
lea    0xdc1(%rip),%rdi
call   1070 <afficheChaine@plt>
lea    -0x16(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xdb6(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0x16(%rbp),%rdi
movss  -0xc(%rbp),%xmm0
movss  0xd90(%rip),%xmm1
divss  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
movss  0xd77(%rip),%xmm2
divss  %xmm2,%xmm1
movss  -0xc(%rbp),%xmm2
movss  0xd62(%rip),%xmm3
divss  %xmm3,%xmm2
call   1070 <afficheChaine@plt>
movss  -0xc(%rbp),%xmm0
movss  0xd58(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x2c(%rbp)
mov    $0x0,%al
call   1040 <largeurFenetre@plt>
movaps %xmm0,%xmm1
movss  -0x2c(%rbp),%xmm0
movss  0xd34(%rip),%xmm2
mulss  -0xc(%rbp),%xmm2
movss  0xd23(%rip),%xmm3
divss  %xmm3,%xmm2
subss  %xmm2,%xmm1
movss  -0xc(%rbp),%xmm2
movss  0xd1a(%rip),%xmm3
divss  %xmm3,%xmm2
lea    0xd1e(%rip),%rdi
call   1070 <afficheChaine@plt>
lea    -0x16(%rbp),%rdi
mov    -0x8(%rbp),%edx
lea    0xd08(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0x16(%rbp),%rax
mov    %rax,-0x28(%rbp)
movss  -0xc(%rbp),%xmm0
movss  0xcde(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    $0x0,%al
call   1040 <largeurFenetre@plt>
mov    -0x28(%rbp),%rdi
movaps %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
movss  0xcb6(%rip),%xmm2
mulss  -0xc(%rbp),%xmm2
movss  0xca5(%rip),%xmm3
divss  %xmm3,%xmm2
subss  %xmm2,%xmm1
movss  -0xc(%rbp),%xmm2
movss  0xc8c(%rip),%xmm3
divss  %xmm3,%xmm2
call   1070 <afficheChaine@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<afficheScore>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %esi,%r14d
mov    %edi,%r15d
mov    $0xf0,%edi
mov    $0xff,%esi
mov    $0xff,%edx
call   1050 <couleurCourante@plt>
xor    %eax,%eax
call   1040 <largeurFenetre@plt>
movss  %xmm0,0x10(%rsp)
xor    %eax,%eax
call   1030 <hauteurFenetre@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
cmpless 0x10(%rsp),%xmm0
movss  0xe62(%rip),%xmm1
andps  %xmm0,%xmm1
movaps %xmm1,0x10(%rsp)
xor    %eax,%eax
call   1040 <largeurFenetre@plt>
mulss  0x10(%rsp),%xmm0
divss  0xe49(%rip),%xmm0
movss  %xmm0,0x30(%rsp)
xor    %eax,%eax
call   1030 <hauteurFenetre@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0xc(%rsp)
xor    %eax,%eax
call   1040 <largeurFenetre@plt>
movaps %xmm0,0x10(%rsp)
xor    %eax,%eax
call   1030 <hauteurFenetre@plt>
cltq
imul   $0x2aaaaaab,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movaps 0x10(%rsp),%xmm3
cmpltss 0xc(%rsp),%xmm3
andps  %xmm0,%xmm3
addss  0x30(%rsp),%xmm3
movaps %xmm3,0x10(%rsp)
movaps %xmm3,%xmm0
divss  0xdda(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm3,%xmm1
divss  0xdce(%rip),%xmm1
movaps %xmm1,0x40(%rsp)
movss  0xdc5(%rip),%xmm2
mulss  %xmm3,%xmm2
movss  %xmm2,0x2c(%rsp)
lea    0xdc0(%rip),%rdi
call   1070 <afficheChaine@plt>
lea    0xdbc(%rip),%rbp
lea    0x5e(%rsp),%rbx
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15d,%edx
call   1060 <sprintf@plt>
movss  0xd91(%rip),%xmm2
mulss  0x10(%rsp),%xmm2
movss  %xmm2,0xc(%rsp)
mov    %rbx,%rdi
movaps 0x30(%rsp),%xmm0
movaps 0x40(%rsp),%xmm1
call   1070 <afficheChaine@plt>
xor    %eax,%eax
call   1040 <largeurFenetre@plt>
movaps %xmm0,%xmm1
movaps 0x10(%rsp),%xmm0
mulss  0xd60(%rip),%xmm0
divss  0xd4c(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
subss  %xmm0,%xmm1
lea    0xd57(%rip),%rdi
movaps 0x30(%rsp),%xmm0
movss  0x2c(%rsp),%xmm2
call   1070 <afficheChaine@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r14d,%edx
call   1060 <sprintf@plt>
xor    %eax,%eax
call   1040 <largeurFenetre@plt>
movaps %xmm0,%xmm1
subss  0x10(%rsp),%xmm1
mov    %rbx,%rdi
movaps 0x30(%rsp),%xmm0
movss  0xc(%rsp),%xmm2
call   1070 <afficheChaine@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Score :\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [9 x i8] c"Score : \00"
define void @afficheScore(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca [10 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = call i32 @couleurCourante(i32 240, i32 255, i32 255)
%8 = call float (...) @largeurFenetre()
%9 = call i32 (...) @hauteurFenetre()
%10 = sitofp i32 %9 to float
%11 = fcmp oge float %8, %10
%12 = zext i1 %11 to i32
%13 = sitofp i32 %12 to float
%14 = call float (...) @largeurFenetre()
%15 = fmul float %13, %14
%16 = fdiv float %15, 6.000000e+00
%17 = call i32 (...) @hauteurFenetre()
%18 = sitofp i32 %17 to float
%19 = call float (...) @largeurFenetre()
%20 = fcmp ogt float %18, %19
%21 = zext i1 %20 to i32
%22 = call i32 (...) @hauteurFenetre()
%23 = mul nsw i32 %21, %22
%24 = sdiv i32 %23, 6
%25 = sitofp i32 %24 to float
%26 = fadd float %16, %25
store float %26, float* %5
%27 = load float, float* %5
%28 = fdiv float %27, 6.000000e+00
%29 = load float, float* %5
%30 = fdiv float %29, 1.000000e+01
%31 = load float, float* %5
%32 = fdiv float %31, 2.000000e+00
%33 = call i32 @afficheChaine(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), float %28, float %30, float %32)
%34 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%35 = load i32, i32* %3
%36 = call i32 @sprintf(i8* %34, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %35)
%37 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%38 = load float, float* %5
%39 = fdiv float %38, 6.000000e+00
%40 = load float, float* %5
%41 = fdiv float %40, 1.000000e+01
%42 = load float, float* %5
%43 = fdiv float %42, 4.000000e+00
%44 = call i32 @afficheChaine(i8* %37, float %39, float %41, float %43)
%45 = load float, float* %5
%46 = fdiv float %45, 6.000000e+00
%47 = call float (...) @largeurFenetre()
%48 = load float, float* %5
%49 = fmul float %48, 9.000000e+00
%50 = fdiv float %49, 1.000000e+01
%51 = fsub float %47, %50
%52 = load float, float* %5
%53 = fdiv float %52, 2.000000e+00
%54 = call i32 @afficheChaine(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), float %46, float %51, float %53)
%55 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%56 = load i32, i32* %4
%57 = call i32 @sprintf(i8* %55, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %56)
%58 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%59 = load float, float* %5
%60 = fdiv float %59, 6.000000e+00
%61 = call float (...) @largeurFenetre()
%62 = load float, float* %5
%63 = fmul float %62, 9.000000e+00
%64 = fdiv float %63, 1.000000e+01
%65 = fsub float %61, %64
%66 = load float, float* %5
%67 = fdiv float %66, 4.000000e+00
%68 = call i32 @afficheChaine(i8* %58, float %60, float %65, float %67)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"Score :\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [9 x i8] c"Score : \00"
define void @afficheScore(i32 %0, i32 %1) {
%3 = alloca [10 x i8]
%4 = tail call i32 @couleurCourante(i32 240, i32 255, i32 255)
%5 = tail call float (...) @largeurFenetre()
%6 = tail call i32 (...) @hauteurFenetre()
%7 = sitofp i32 %6 to float
%8 = fcmp oge float %5, %7
%9 = uitofp i1 %8 to float
%10 = tail call float (...) @largeurFenetre()
%11 = fmul float %10, %9
%12 = fdiv float %11, 6.000000e+00
%13 = tail call i32 (...) @hauteurFenetre()
%14 = sitofp i32 %13 to float
%15 = tail call float (...) @largeurFenetre()
%16 = fcmp olt float %15, %14
%17 = tail call i32 (...) @hauteurFenetre()
%18 = sdiv i32 %17, 6
%19 = sitofp i32 %18 to float
%20 = select i1 %16, float %19, float 0.000000e+00
%21 = fadd float %12, %20
%22 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%23 = fdiv float %21, 6.000000e+00
%24 = fdiv float %21, 1.000000e+01
%25 = fmul float %21, 5.000000e-01
%26 = tail call i32 @afficheChaine(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), float %23, float %24, float %25)
%27 = call i32 @sprintf(i8* %22, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%28 = fmul float %21, 2.500000e-01
%29 = call i32 @afficheChaine(i8* %22, float %23, float %24, float %28)
%30 = call float (...) @largeurFenetre()
%31 = fmul float %21, 9.000000e+00
%32 = fdiv float %31, 1.000000e+01
%33 = fsub float %30, %32
%34 = call i32 @afficheChaine(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), float %23, float %33, float %25)
%35 = call i32 @sprintf(i8* %22, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%36 = call float (...) @largeurFenetre()
%37 = fsub float %36, %32
%38 = call i32 @afficheChaine(i8* %22, float %23, float %37, float %28)
ret void
}