#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 getint(char *);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int num1, num2, num3, max;
  num1 = getint("Introduce el primer numero: ");
  num2 = getint("Introduce el segundo numero: ");
  num3 = getint("Introduce el tercer numero: ");
  printf("EL mayor es: %d\n",
         ((max = ((num1) > (num2))) ? (num1) : (num2)) > (num3) ? (max)
                                                                : (num3));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <getint@plt>
mov    %eax,-0x8(%rbp)
lea    0xed8(%rip),%rdi
call   1040 <getint@plt>
mov    %eax,-0xc(%rbp)
lea    0xee7(%rip),%rdi
call   1040 <getint@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setg   %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x14(%rbp)
test   $0x1,%al
jne    117d <main+0x5d>
jmp    1188 <main+0x68>
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    118e <main+0x6e>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    11a5 <main+0x85>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    11ab <main+0x8b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xed6(%rip),%rdi
call   1040 <getint@plt>
mov    %eax,%ebx
lea    0xee5(%rip),%rdi
call   1040 <getint@plt>
mov    %eax,%ebp
lea    0xef5(%rip),%rdi
call   1040 <getint@plt>
xor    %esi,%esi
cmp    %ebp,%ebx
cmovg  %ebx,%ebp
setg   %sil
cmp    %eax,%ebp
cmovle %eax,%esi
lea    0xef6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Introduce el primer numero: \00"
@.str.1 = [30 x i8] c"Introduce el segundo numero: \00"
@.str.2 = [29 x i8] c"Introduce el tercer numero: \00"
@.str.3 = [17 x i8] c"EL mayor es: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @getint(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
store i32 %6, i32* %2
%7 = call i32 @getint(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
store i32 %7, i32* %3
%8 = call i32 @getint(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
store i32 %8, i32* %4
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = icmp sgt i32 %9, %10
%12 = zext i1 %11 to i32
store i32 %12, i32* %5
br i1 %11, label %13, label %15
13: ; preds = %0
%14 = load i32, i32* %2
br label %17
15: ; preds = %0
%16 = load i32, i32* %3
br label %17
17: ; preds = %15, %13
%18 = phi i32 [ %14, %13 ], [ %16, %15 ]
%19 = load i32, i32* %4
%20 = icmp sgt i32 %18, %19
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = load i32, i32* %5
br label %25
23: ; preds = %17
%24 = load i32, i32* %4
br label %25
25: ; preds = %23, %21
%26 = phi i32 [ %22, %21 ], [ %24, %23 ]
%27 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %26)
%28 = load i32, i32* %1
ret i32 %28
}

LLVM IR (-O2):
@.str = [29 x i8] c"Introduce el primer numero: \00"
@.str.1 = [30 x i8] c"Introduce el segundo numero: \00"
@.str.2 = [29 x i8] c"Introduce el tercer numero: \00"
@.str.3 = [17 x i8] c"EL mayor es: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @getint(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @getint(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @getint(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%4 = icmp sgt i32 %1, %2
%5 = zext i1 %4 to i32
%6 = select i1 %4, i32 %1, i32 %2
%7 = icmp sgt i32 %6, %3
%8 = select i1 %7, i32 %5, i32 %3
%9 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %8)
ret i32 0
}