#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*/ printf(char *, int, char *, char *);
int /*<<< orphan*/ scanf(char *, int *);
int saisirNombre(int coupsRestants) {
  int valeur;
  char *s = coupsRestants > 1 ? "s" : "";
  printf("Entrez une valeur supérieure ou égale à 0 et inférieure à 100 (%d "
         "coup%s restant%s) : ",
         coupsRestants, s, s);
  scanf("%d", &valeur);
  return valeur;
}


x86 assembly (clang, -O0):
<saisirNombre>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xf28(%rip),%rax
lea    0xec4(%rip),%rcx
cmp    $0x1,%edx
cmovg  %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<saisirNombre>:
push   %rax
mov    %edi,%esi
cmp    $0x2,%edi
lea    0xed3(%rip),%rax
lea    0xf29(%rip),%rcx
cmovge %rax,%rcx
lea    0xec3(%rip),%rdi
mov    %rcx,%rdx
call   1030 <printf@plt>
lea    0xf10(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"s\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [92 x i8] c"Entrez une valeur sup\C3\A9rieure ou \C3\A9gale \C3\A0 0 et inf\C3\A9rieure \C3\A0 100 (%d coup%s restant%s) : \00"
@.str.3 = [3 x i8] c"%d\00"
define i32 @saisirNombre(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 1
%7 = zext i1 %6 to i64
%8 = select i1 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
store i8* %8, i8** %4
%9 = load i32, i32* %2
%10 = load i8*, i8** %4
%11 = load i8*, i8** %4
%12 = call i32 @printf(i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str.2, i64 0, i64 0), i32 %9, i8* %10, i8* %11)
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
@.str = [2 x i8] c"s\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [92 x i8] c"Entrez une valeur sup\C3\A9rieure ou \C3\A9gale \C3\A0 0 et inf\C3\A9rieure \C3\A0 100 (%d coup%s restant%s) : \00"
@.str.3 = [3 x i8] c"%d\00"
define i32 @saisirNombre(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = icmp sgt i32 %0, 1
%5 = select i1 %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str.2, i64 0, i64 0), i32 %0, i8* %5, i8* %5)
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%8 = load i32, i32* %2
ret i32 %8
}