#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*/ systemePoints(int, int, int);
void systemeDePointsPlusOuMoinsEtPendu(int coups, int modeDeJeux,
                                       int choixNiveauDifficulte) {
  int nbPointsGagnes, nbPointsVIP;
  nbPointsGagnes = nbPointsVIP = 0;
  switch (coups) {
  case 0:
    nbPointsGagnes = 250;
    nbPointsVIP = 2;
    break;
  case 1:
    nbPointsGagnes = 200;
    nbPointsVIP = 1;
    break;
  case 10:
    break;
  default:
    coups = 20 / coups;
    nbPointsGagnes = coups * 10;
    break;
  }
  nbPointsGagnes *= choixNiveauDifficulte;
  systemePoints(nbPointsGagnes, nbPointsVIP, modeDeJeux);
}


x86 assembly (clang, -O0):
<systemeDePointsPlusOuMoinsEtPendu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
test   %eax,%eax
je     1164 <systemeDePointsPlusOuMoinsEtPendu+0x54>
jmp    1142 <systemeDePointsPlusOuMoinsEtPendu+0x32>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
je     1177 <systemeDePointsPlusOuMoinsEtPendu+0x67>
jmp    1153 <systemeDePointsPlusOuMoinsEtPendu+0x43>
mov    -0x18(%rbp),%eax
sub    $0xa,%eax
je     118a <systemeDePointsPlusOuMoinsEtPendu+0x7a>
jmp    118f <systemeDePointsPlusOuMoinsEtPendu+0x7f>
movl   $0xfa,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
jmp    11a2 <systemeDePointsPlusOuMoinsEtPendu+0x92>
movl   $0xc8,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
jmp    11a2 <systemeDePointsPlusOuMoinsEtPendu+0x92>
jmp    11a2 <systemeDePointsPlusOuMoinsEtPendu+0x92>
mov    $0x14,%eax
cltd
idivl  -0x4(%rbp)
mov    %eax,-0x4(%rbp)
imul   $0xa,-0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1030 <systemePoints@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<systemeDePointsPlusOuMoinsEtPendu>:
mov    %edx,%ecx
mov    %esi,%r8d
cmp    $0xa,%edi
je     112f <systemeDePointsPlusOuMoinsEtPendu+0x1f>
cmp    $0x1,%edi
je     1135 <systemeDePointsPlusOuMoinsEtPendu+0x25>
test   %edi,%edi
jne    1141 <systemeDePointsPlusOuMoinsEtPendu+0x31>
mov    $0x2,%esi
mov    $0xfa,%edi
jmp    1151 <systemeDePointsPlusOuMoinsEtPendu+0x41>
xor    %edi,%edi
xor    %esi,%esi
jmp    1151 <systemeDePointsPlusOuMoinsEtPendu+0x41>
mov    $0x1,%esi
mov    $0xc8,%edi
jmp    1151 <systemeDePointsPlusOuMoinsEtPendu+0x41>
xor    %esi,%esi
mov    $0x14,%eax
xor    %edx,%edx
idiv   %edi
add    %eax,%eax
lea    (%rax,%rax,4),%edi
imul   %ecx,%edi
mov    %r8d,%edx
jmp    1030 <systemePoints@plt>

LLVM IR (-O0):
define void @systemeDePointsPlusOuMoinsEtPendu(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %8
store i32 0, i32* %7
%9 = load i32, i32* %4
switch i32 %9, label %13 [
i32 0, label %10
i32 1, label %11
i32 10, label %12
]
10: ; preds = %3
store i32 250, i32* %7
store i32 2, i32* %8
br label %18
11: ; preds = %3
store i32 200, i32* %7
store i32 1, i32* %8
br label %18
12: ; preds = %3
br label %18
13: ; preds = %3
%14 = load i32, i32* %4
%15 = sdiv i32 20, %14
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = mul nsw i32 %16, 10
store i32 %17, i32* %7
br label %18
18: ; preds = %13, %12, %11, %10
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = mul nsw i32 %20, %19
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %8
%24 = load i32, i32* %5
%25 = call i32 @systemePoints(i32 %22, i32 %23, i32 %24)
ret void
}

LLVM IR (-O2):
define void @systemeDePointsPlusOuMoinsEtPendu(i32 %0, i32 %1, i32 %2) {
switch i32 %0, label %6 [
i32 0, label %4
i32 1, label %5
i32 10, label %9
]
4: ; preds = %3
br label %9
5: ; preds = %3
br label %9
6: ; preds = %3
%7 = sdiv i32 20, %0
%8 = mul nsw i32 %7, 10
br label %9
9: ; preds = %6, %3, %5, %4
%10 = phi i32 [ %8, %6 ], [ 0, %3 ], [ 200, %5 ], [ 250, %4 ]
%11 = phi i32 [ 0, %6 ], [ 0, %3 ], [ 1, %5 ], [ 2, %4 ]
%12 = mul nsw i32 %10, %2
%13 = tail call i32 @systemePoints(i32 %12, i32 %11, i32 %1)
ret void
}