#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 *, int *);
main() {
  int n1, n2, n3, maior;
  printf("\nInforme 3 Numeros: \n");
  scanf("%d%d%d", &n1, &n2, &n3);
  if (n1 > n2) {
    if (n1 > n3) {
      maior = n1;
    } else {
      maior = n3;
    }
  } else {
    if (n2 > n3) {
      maior = n2;
    } else {
      maior = n3;
    }
  }
  printf("\nMaior %d", maior);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1183 <main+0x63>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1178 <main+0x58>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    117e <main+0x5e>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    11a5 <main+0x85>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    119a <main+0x7a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    11a0 <main+0x80>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    11a5 <main+0x85>
mov    -0x14(%rbp),%esi
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
mov    0x14(%rsp),%eax
mov    0x10(%rsp),%esi
cmp    %esi,%eax
cmovg  %eax,%esi
mov    0xc(%rsp),%eax
cmp    %eax,%esi
cmovle %eax,%esi
lea    0xe8f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"\0AInforme 3 Numeros: \0A\00"
@.str.1 = [7 x i8] c"%d%d%d\00"
@.str.2 = [10 x i8] c"\0AMaior %d\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 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = icmp sgt i32 %8, %9
br i1 %10, label %11, label %20
11: ; preds = %0
%12 = load i32, i32* %2
%13 = load i32, i32* %4
%14 = icmp sgt i32 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = load i32, i32* %2
store i32 %16, i32* %5
br label %19
17: ; preds = %11
%18 = load i32, i32* %4
store i32 %18, i32* %5
br label %19
19: ; preds = %17, %15
br label %29
20: ; preds = %0
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = icmp sgt i32 %21, %22
br i1 %23, label %24, label %26
24: ; preds = %20
%25 = load i32, i32* %3
store i32 %25, i32* %5
br label %28
26: ; preds = %20
%27 = load i32, i32* %4
store i32 %27, i32* %5
br label %28
28: ; preds = %26, %24
br label %29
29: ; preds = %28, %19
%30 = load i32, i32* %5
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %30)
%32 = load i32, i32* %1
ret i32 %32
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c"%d%d%d\00"
@.str.2 = [10 x i8] c"\0AMaior %d\00"
@str = [21 x i8] c"\0AInforme 3 Numeros: \00"
define i32 @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 ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 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 = select i1 %11, i32 %9, i32 %10
%14 = icmp sgt i32 %13, %12
%15 = select i1 %14, i32 %13, i32 %12
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %15)
ret i32 0
}