#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 /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int a = 0, b = 0, c = 0;
  printf("Taper 3 valeurs séparez par le caractère 'Entrer':\n");
  scanf("%d", &a);
  scanf("%d", &b);
  scanf("%d", &c);
  a = (b > a) ? b : a;
  a = (c > a) ? c : a;
  printf("Plus grande valeur: %d \n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xecd(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xebd(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1199 <main+0x79>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    119f <main+0x7f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    11bc <main+0x9c>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    11c2 <main+0xa2>
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0x4(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
lea    0xea0(%rip),%rbx
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
mov    0x4(%rsp),%esi
cmp    %esi,%eax
cmovg  %eax,%esi
mov    0x8(%rsp),%eax
cmp    %esi,%eax
cmovg  %eax,%esi
mov    %esi,0x4(%rsp)
lea    0xe5b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [54 x i8] c"Taper 3 valeurs s\C3\A9parez par le caract\C3\A8re 'Entrer':\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [25 x i8] c"Plus grande valeur: %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = icmp sgt i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = load i32, i32* %3
br label %16
14: ; preds = %0
%15 = load i32, i32* %2
br label %16
16: ; preds = %14, %12
%17 = phi i32 [ %13, %12 ], [ %15, %14 ]
store i32 %17, i32* %2
%18 = load i32, i32* %4
%19 = load i32, i32* %2
%20 = icmp sgt i32 %18, %19
br i1 %20, label %21, label %23
21: ; preds = %16
%22 = load i32, i32* %4
br label %25
23: ; preds = %16
%24 = load i32, i32* %2
br label %25
25: ; preds = %23, %21
%26 = phi i32 [ %22, %21 ], [ %24, %23 ]
store i32 %26, i32* %2
%27 = load i32, i32* %2
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %27)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [25 x i8] c"Plus grande valeur: %d \0A\00"
@str = [53 x i8] c"Taper 3 valeurs s\C3\A9parez par le caract\C3\A8re 'Entrer':\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%5 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%6 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%11 = load i32, i32* %2
%12 = load i32, i32* %1
%13 = icmp sgt i32 %11, %12
%14 = select i1 %13, i32 %11, i32 %12
%15 = load i32, i32* %3
%16 = icmp sgt i32 %15, %14
%17 = select i1 %16, i32 %15, i32 %14
store i32 %17, i32* %1
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %17)
ret i32 0
}