#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*/ afficherPionMastermind(char const);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void afficherReponseMastermind(const char *code) {
  int indexLig;
  system("clear");
  printf("Le code secret etait : \n");
  for (indexLig = 0; indexLig < 4; indexLig++)
    afficherPionMastermind(code[indexLig]);
  printf("\n\n");
}


x86 assembly (clang, -O0):
<afficherReponseMastermind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
call   1030 <system@plt>
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    1184 <afficherReponseMastermind+0x54>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1050 <afficherPionMastermind@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    115b <afficherReponseMastermind+0x2b>
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<afficherReponseMastermind>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
call   1040 <system@plt>
lea    0xebf(%rip),%rdi
call   1030 <puts@plt>
movsbl (%rbx),%edi
call   1050 <afficherPionMastermind@plt>
movsbl 0x1(%rbx),%edi
call   1050 <afficherPionMastermind@plt>
movsbl 0x2(%rbx),%edi
call   1050 <afficherPionMastermind@plt>
movsbl 0x3(%rbx),%edi
call   1050 <afficherPionMastermind@plt>
lea    0xea8(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [25 x i8] c"Le code secret etait : \0A\00"
@.str.2 = [3 x i8] c"\0A\0A\00"
define void @afficherReponseMastermind(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %6
6: ; preds = %16, %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 4
br i1 %8, label %9, label %19
9: ; preds = %6
%10 = load i8*, i8** %2
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
%14 = load i8, i8* %13
%15 = call i32 @afficherPionMastermind(i8 signext %14)
br label %16
16: ; preds = %9
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %6
19: ; preds = %6
%20 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@str = [24 x i8] c"Le code secret etait : \00"
@str.3 = [2 x i8] c"\0A\00"
define void @afficherReponseMastermind(i8* nocapture %0) {
%2 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%4 = load i8, i8* %0
%5 = tail call i32 @afficherPionMastermind(i8 signext %4)
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = load i8, i8* %6
%8 = tail call i32 @afficherPionMastermind(i8 signext %7)
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = tail call i32 @afficherPionMastermind(i8 signext %10)
%12 = getelementptr inbounds i8, i8* %0, i64 3
%13 = load i8, i8* %12
%14 = tail call i32 @afficherPionMastermind(i8 signext %13)
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.3, i64 0, i64 0))
ret void
}