#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*/ printf(char *);
void afficherPionMastermind(int pion) {
  switch (pion) {
  case 0:
    printf("- ");
    break;
  case 1:
  case 'r':
    coloration("o ", "31");
    break;
  case 2:
  case 'j':
    coloration("o ", "33");
    break;
  case 3:
  case 'v':
    coloration("o ", "32");
    break;
  case 4:
  case 'b':
    coloration("o ", "34");
    break;
  case 5:
  case 'B':
    printf("o ");
    break;
  case 6:
  case 'c':
    coloration("o ", "36");
    break;
  case 7:
  case 'f':
    coloration("o ", "35");
    break;
  }
}


x86 assembly (clang, -O0):
<afficherPionMastermind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x76,%rax
ja     11fd <afficherPionMastermind+0xdd>
mov    -0x10(%rbp),%rax
lea    0xeb9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1085(%rip),%rdi
call   1030 <printf@plt>
jmp    11fd <afficherPionMastermind+0xdd>
lea    0x1077(%rip),%rdi
lea    0x1073(%rip),%rsi
call   1040 <coloration@plt>
jmp    11fd <afficherPionMastermind+0xdd>
lea    0x105f(%rip),%rdi
lea    0x105e(%rip),%rsi
call   1040 <coloration@plt>
jmp    11fd <afficherPionMastermind+0xdd>
lea    0x1047(%rip),%rdi
lea    0x1049(%rip),%rsi
call   1040 <coloration@plt>
jmp    11fd <afficherPionMastermind+0xdd>
lea    0x102f(%rip),%rdi
lea    0x1034(%rip),%rsi
call   1040 <coloration@plt>
jmp    11fd <afficherPionMastermind+0xdd>
lea    0x1017(%rip),%rdi
call   1030 <printf@plt>
jmp    11fd <afficherPionMastermind+0xdd>
lea    0x1006(%rip),%rdi
lea    0x100e(%rip),%rsi
call   1040 <coloration@plt>
jmp    11fd <afficherPionMastermind+0xdd>
lea    0xfee(%rip),%rdi
lea    0xff9(%rip),%rsi
call   1040 <coloration@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<afficherPionMastermind>:
cmp    $0x76,%edi
ja     11c5 <afficherPionMastermind+0xa5>
mov    %edi,%eax
lea    0xece(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x109d(%rip),%rdi
lea    0x1099(%rip),%rsi
jmp    1040 <coloration@plt>
lea    0x108a(%rip),%rdi
lea    0x1089(%rip),%rsi
jmp    1040 <coloration@plt>
lea    0x1077(%rip),%rdi
lea    0x107c(%rip),%rsi
jmp    1040 <coloration@plt>
lea    0x1064(%rip),%rdi
jmp    1030 <printf@plt>
lea    0x1058(%rip),%rdi
lea    0x1060(%rip),%rsi
jmp    1040 <coloration@plt>
lea    0x1045(%rip),%rdi
lea    0x1047(%rip),%rsi
jmp    1040 <coloration@plt>
lea    0x1032(%rip),%rdi
lea    0x103d(%rip),%rsi
jmp    1040 <coloration@plt>
lea    0x101c(%rip),%rdi
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@.str = [3 x i8] c"- \00"
@.str.1 = [3 x i8] c"o \00"
@.str.2 = [3 x i8] c"31\00"
@.str.3 = [3 x i8] c"33\00"
@.str.4 = [3 x i8] c"32\00"
@.str.5 = [3 x i8] c"34\00"
@.str.6 = [3 x i8] c"36\00"
@.str.7 = [3 x i8] c"35\00"
define void @afficherPionMastermind(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %20 [
i32 0, label %4
i32 1, label %6
i32 114, label %6
i32 2, label %8
i32 106, label %8
i32 3, label %10
i32 118, label %10
i32 4, label %12
i32 98, label %12
i32 5, label %14
i32 66, label %14
i32 6, label %16
i32 99, label %16
i32 7, label %18
i32 102, label %18
]
4: ; preds = %1
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %20
6: ; preds = %1, %1
%7 = call i32 @coloration(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %20
8: ; preds = %1, %1
%9 = call i32 @coloration(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %20
10: ; preds = %1, %1
%11 = call i32 @coloration(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %20
12: ; preds = %1, %1
%13 = call i32 @coloration(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %20
14: ; preds = %1, %1
%15 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %20
16: ; preds = %1, %1
%17 = call i32 @coloration(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
br label %20
18: ; preds = %1, %1
%19 = call i32 @coloration(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
br label %20
20: ; preds = %1, %18, %16, %14, %12, %10, %8, %6, %4
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"- \00"
@.str.1 = [3 x i8] c"o \00"
@.str.2 = [3 x i8] c"31\00"
@.str.3 = [3 x i8] c"33\00"
@.str.4 = [3 x i8] c"32\00"
@.str.5 = [3 x i8] c"34\00"
@.str.6 = [3 x i8] c"36\00"
@.str.7 = [3 x i8] c"35\00"
define void @afficherPionMastermind(i32 %0) {
switch i32 %0, label %18 [
i32 0, label %2
i32 1, label %4
i32 114, label %4
i32 2, label %6
i32 106, label %6
i32 3, label %8
i32 118, label %8
i32 4, label %10
i32 98, label %10
i32 5, label %12
i32 66, label %12
i32 6, label %14
i32 99, label %14
i32 7, label %16
i32 102, label %16
]
2: ; preds = %1
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %18
4: ; preds = %1, %1
%5 = tail call i32 @coloration(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %18
6: ; preds = %1, %1
%7 = tail call i32 @coloration(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %18
8: ; preds = %1, %1
%9 = tail call i32 @coloration(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %18
10: ; preds = %1, %1
%11 = tail call i32 @coloration(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %18
12: ; preds = %1, %1
%13 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %18
14: ; preds = %1, %1
%15 = tail call i32 @coloration(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
br label %18
16: ; preds = %1, %1
%17 = tail call i32 @coloration(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
br label %18
18: ; preds = %1, %16, %14, %12, %10, %8, %6, %4, %2
ret void
}