void main() {
  int a, b, c;
  printf("Ingresa 3 numeros separados por espacio\n");
  scanf("%d %d %d", &a, &b, &c);
  if (a > b && b < c) {
    printf("%d es el mas grande\n", &a);
  } else if (b > c) {
    printf("%d es el mas grande\n", &b);
  } else {
    printf("%d es el mas grande\n", &c);
  }
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    117f <main+0x5f>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    117f <main+0x5f>
lea    0xec3(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b9 <main+0x99>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    11a2 <main+0x82>
lea    0xea0(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b4 <main+0x94>
lea    0xe89(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b9 <main+0x99>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb4(%rip),%rdi
lea    0xc(%rsp),%rbx
lea    0x8(%rsp),%r14
lea    0x4(%rsp),%r15
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x8(%rsp),%eax
cmp    0x4(%rsp),%eax
cmovg  %r14,%r15
cmovge %r15,%rbx
cmp    %eax,0xc(%rsp)
cmovle %r15,%rbx
lea    0xe7f(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [41 x i8] c"Ingresa 3 numeros separados por espacio\0A\00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [21 x i8] c"%d es el mas grande\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %15
9: ; preds = %0
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32* %1)
br label %24
15: ; preds = %9, %0
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = icmp sgt i32 %16, %17
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32* %2)
br label %23
21: ; preds = %15
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32* %3)
br label %23
23: ; preds = %21, %19
br label %24
24: ; preds = %23, %13
ret void
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [21 x i8] c"%d es el mas grande\0A\00"
@str = [40 x i8] c"Ingresa 3 numeros separados por espacio\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = icmp sgt i32 %9, %10
%12 = load i32, i32* %3
%13 = icmp slt i32 %10, %12
%14 = select i1 %11, i1 %13, i1 false
%15 = icmp sgt i32 %10, %12
%16 = select i1 %15, i32* %2, i32* %3
%17 = select i1 %14, i32* %1, i32* %16
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32* %17)
ret void
}