#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 *);
void main() {
  int a, b, c, maior;
  printf("Digite 3 inteiros distintos: ");
  scanf("%d %d %d", &a, &b, &c);
  if (a > b)
    if (a > c)
      maior = a;
    else
      maior = c;
  else if (b > c)
    maior = b;
  else
    maior = c;
  printf("O numero %d eh o maior.\n", maior);
}


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    0xee1(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    117c <main+0x5c>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1171 <main+0x51>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1177 <main+0x57>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    119e <main+0x7e>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1193 <main+0x73>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1199 <main+0x79>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    119e <main+0x7e>
mov    -0x10(%rbp),%esi
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <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    0xebd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Digite 3 inteiros distintos: \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [25 x i8] c"O numero %d eh o maior.\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = icmp sgt i32 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %0
%11 = load i32, i32* %1
%12 = load i32, i32* %3
%13 = icmp sgt i32 %11, %12
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = load i32, i32* %1
store i32 %15, i32* %4
br label %18
16: ; preds = %10
%17 = load i32, i32* %3
store i32 %17, i32* %4
br label %18
18: ; preds = %16, %14
br label %28
19: ; preds = %0
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = icmp sgt i32 %20, %21
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = load i32, i32* %2
store i32 %24, i32* %4
br label %27
25: ; preds = %19
%26 = load i32, i32* %3
store i32 %26, i32* %4
br label %27
27: ; preds = %25, %23
br label %28
28: ; preds = %27, %18
%29 = load i32, i32* %4
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %29)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"Digite 3 inteiros distintos: \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [25 x i8] c"O numero %d eh o maior.\0A\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 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @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 = 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 ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %15)
ret void
}