#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);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int a, b, c, tmp;
  scanf("%d %d %d", &a, &b, &c);
  tmp = a;
  if (a < b || a < c) {
    if (b < c) {
      tmp = c;
    } else {
      tmp = b;
    }
  }
  printf("%d eh o maior\n", tmp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1165 <main+0x45>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1187 <main+0x67>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    117c <main+0x5c>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1182 <main+0x62>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1187 <main+0x67>
mov    -0x14(%rbp),%esi
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x10(%rsp),%eax
mov    0xc(%rsp),%ecx
cmp    %ecx,%eax
mov    %eax,%edx
cmovl  %ecx,%edx
mov    0x14(%rsp),%edi
cmp    %ecx,%edi
mov    %edi,%esi
cmovl  %edx,%esi
cmp    %eax,%edi
cmovl  %edx,%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [15 x i8] c"%d eh o maior\0A\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 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = icmp slt i32 %8, %9
%11 = load i32, i32* %3
%12 = icmp slt i32 %8, %11
%13 = select i1 %10, i1 true, i1 %12
%14 = icmp slt i32 %9, %11
%15 = select i1 %14, i32 %11, i32 %9
%16 = select i1 %13, i32 %15, i32 %8
%17 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %16)
ret i32 0
}