#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 main(void) {
  int a, b, c;
  printf("Informe o primeiro número: ");
  scanf("%d", &a);
  printf("Informe o segundo número: ");
  scanf("%d", &b);
  printf("Informe o terceiro número: ");
  scanf("%d", &c);
  if ((a > b) && (a > c)) {
    printf("%d é o maior\n", a);
  } else if ((b > a) && (b > c)) {
    printf("%d é o maior\n", b);
  } else if ((c > a) && (c > b)) {
    printf("%d é o maior\n", c);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9d(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    11b7 <main+0x97>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    11b7 <main+0x97>
mov    -0x8(%rbp),%esi
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1218 <main+0xf8>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    11e5 <main+0xc5>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    11e5 <main+0xc5>
mov    -0xc(%rbp),%esi
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1213 <main+0xf3>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    120e <main+0xee>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    120e <main+0xee>
mov    -0x10(%rbp),%esi
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1213 <main+0xf3>
jmp    1218 <main+0xf8>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee3(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xed3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%ecx
mov    0x8(%rsp),%eax
mov    0x4(%rsp),%esi
cmp    %eax,%ecx
jle    1195 <main+0x75>
cmp    %esi,%ecx
jle    1195 <main+0x75>
mov    %ecx,%esi
jmp    11a9 <main+0x89>
cmp    %ecx,%eax
jle    11a1 <main+0x81>
cmp    %esi,%eax
jle    11a1 <main+0x81>
mov    %eax,%esi
jmp    11a9 <main+0x89>
cmp    %ecx,%esi
jle    11b7 <main+0x97>
cmp    %eax,%esi
jle    11b7 <main+0x97>
lea    0xea9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Informe o primeiro n\C3\BAmero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [28 x i8] c"Informe o segundo n\C3\BAmero: \00"
@.str.3 = [29 x i8] c"Informe o terceiro n\C3\BAmero: \00"
@.str.4 = [15 x i8] c"%d \C3\A9 o maior\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = icmp sgt i32 %11, %12
br i1 %13, label %14, label %21
14: ; preds = %0
%15 = load i32, i32* %2
%16 = load i32, i32* %4
%17 = icmp sgt i32 %15, %16
br i1 %17, label %18, label %21
18: ; preds = %14
%19 = load i32, i32* %2
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %19)
br label %45
21: ; preds = %14, %0
%22 = load i32, i32* %3
%23 = load i32, i32* %2
%24 = icmp sgt i32 %22, %23
br i1 %24, label %25, label %32
25: ; preds = %21
%26 = load i32, i32* %3
%27 = load i32, i32* %4
%28 = icmp sgt i32 %26, %27
br i1 %28, label %29, label %32
29: ; preds = %25
%30 = load i32, i32* %3
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %30)
br label %44
32: ; preds = %25, %21
%33 = load i32, i32* %4
%34 = load i32, i32* %2
%35 = icmp sgt i32 %33, %34
br i1 %35, label %36, label %43
36: ; preds = %32
%37 = load i32, i32* %4
%38 = load i32, i32* %3
%39 = icmp sgt i32 %37, %38
br i1 %39, label %40, label %43
40: ; preds = %36
%41 = load i32, i32* %4
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %41)
br label %43
43: ; preds = %40, %36, %32
br label %44
44: ; preds = %43, %29
br label %45
45: ; preds = %44, %18
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"Informe o primeiro n\C3\BAmero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [28 x i8] c"Informe o segundo n\C3\BAmero: \00"
@.str.3 = [29 x i8] c"Informe o terceiro n\C3\BAmero: \00"
@.str.4 = [15 x i8] c"%d \C3\A9 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 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%13 = load i32, i32* %1
%14 = load i32, i32* %2
%15 = icmp sgt i32 %13, %14
%16 = load i32, i32* %3
%17 = icmp sgt i32 %13, %16
%18 = select i1 %15, i1 %17, i1 false
br i1 %18, label %27, label %19
19: ; preds = %0
%20 = icmp sgt i32 %14, %13
%21 = icmp sgt i32 %14, %16
%22 = select i1 %20, i1 %21, i1 false
br i1 %22, label %27, label %23
23: ; preds = %19
%24 = icmp sgt i32 %16, %13
%25 = icmp sgt i32 %16, %14
%26 = select i1 %24, i1 %25, i1 false
br i1 %26, label %27, label %30
27: ; preds = %23, %19, %0
%28 = phi i32 [ %13, %0 ], [ %14, %19 ], [ %16, %23 ]
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %28)
br label %30
30: ; preds = %27, %23
ret i32 0
}