#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/, char *, int *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  int data;
  fprintf(stdout, "Entrez un nombre : ");
  fscanf(stdin, "%d", &data);
  fprintf(stdout, "Vous avez saisi le nombre : %d\n", data);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
lea    0xeb7(%rip),%rsi
lea    -0x14(%rbp),%rdx
call   1030 <fscanf@plt>
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
lea    0xe9e(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    0x2eac(%rip),%rbx
mov    (%rbx),%edi
lea    0xecb(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xec8(%rip),%rsi
lea    0xc(%rsp),%rdx
call   1030 <fscanf@plt>
mov    (%rbx),%edi
mov    0xc(%rsp),%edx
lea    0xeb4(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [20 x i8] c"Entrez un nombre : \00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [32 x i8] c"Vous avez saisi le nombre : %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* @stdout
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @stdin
%10 = call i32 @fscanf(i32 %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%11 = load i32, i32* @stdout
%12 = load i32, i32* %6
%13 = call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [20 x i8] c"Entrez un nombre : \00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [32 x i8] c"Vous avez saisi le nombre : %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = load i32, i32* @stdout
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stdin
%8 = call i32 @fscanf(i32 %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%9 = load i32, i32* @stdout
%10 = load i32, i32* %3
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret i32 0
}