#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*/ LC_ALL;
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
main() {
  setlocale(LC_ALL, "");
  int n1, n2, n3;
  printf("Por favor digite os 3 números: ");
  scanf("%d %d %d", &n1, &n2, &n3);
  if ((n1 > n2) && (n1 > n3)) {
    printf(
        "O Primeiro [ %d ] é maior que o segundo [ %d ] e terceiro [ %d ] \n",
        n1, n2, n3);
  } else if ((n2 > n1) && (n2 > n3)) {
    printf(
        "O Segundo [ %d ] é maior que o primeiro [ %d ] e terceiro [ %d ] \n",
        n2, n1, n3);
  } else if ((n3 > n1) && (n3 > n2)) {
    printf(
        "O terceiro [ %d ] é maior que o primeiro [ %d ] e segundo [ %d ] \n",
        n3, n1, n2);
  } else {
    printf(
        "O primeiro [ %d ], o segundo [ %d ] e terceiro [ %d ] são iguais \n",
        n3, n1, n2);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0xfa6(%rip),%rsi
call   1040 <setlocale@plt>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    11ae <main+0x7e>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    11ae <main+0x7e>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1237 <main+0x107>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    11e2 <main+0xb2>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    11e2 <main+0xb2>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1232 <main+0x102>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1216 <main+0xe6>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1216 <main+0xe6>
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    122d <main+0xfd>
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1232 <main+0x102>
jmp    1237 <main+0x107>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xfb1(%rip),%rsi
call   1040 <setlocale@plt>
lea    0xeb0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
mov    0x14(%rsp),%edx
mov    0x10(%rsp),%ecx
cmp    %ecx,%edx
jle    1195 <main+0x65>
mov    0xc(%rsp),%eax
cmp    %eax,%edx
jle    1195 <main+0x65>
lea    0xe9d(%rip),%rdi
mov    %edx,%esi
mov    %ecx,%edx
mov    %eax,%ecx
jmp    11c8 <main+0x98>
mov    0xc(%rsp),%eax
cmp    %edx,%ecx
jle    11ae <main+0x7e>
cmp    %eax,%ecx
jle    11ae <main+0x7e>
lea    0xec6(%rip),%rdi
mov    %ecx,%esi
mov    %eax,%ecx
jmp    11c8 <main+0x98>
cmp    %edx,%eax
jle    11bf <main+0x8f>
cmp    %ecx,%eax
jle    11bf <main+0x8f>
lea    0xef5(%rip),%rdi
jmp    11c6 <main+0x96>
lea    0xf30(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [33 x i8] c"Por favor digite os 3 n\C3\BAmeros: \00"
@.str.2 = [9 x i8] c"%d %d %d\00"
@.str.3 = [68 x i8] c"O Primeiro [ %d ] \C3\A9 maior que o segundo [ %d ] e terceiro [ %d ] \0A\00"
@.str.4 = [68 x i8] c"O Segundo [ %d ] \C3\A9 maior que o primeiro [ %d ] e terceiro [ %d ] \0A\00"
@.str.5 = [68 x i8] c"O terceiro [ %d ] \C3\A9 maior que o primeiro [ %d ] e segundo [ %d ] \0A\00"
@.str.6 = [68 x i8] c"O primeiro [ %d ], o segundo [ %d ] e terceiro [ %d ] s\C3\A3o iguais \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* @LC_ALL
%6 = call i32 @setlocale(i32 %5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = icmp sgt i32 %9, %10
br i1 %11, label %12, label %21
12: ; preds = %0
%13 = load i32, i32* %2
%14 = load i32, i32* %4
%15 = icmp sgt i32 %13, %14
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = load i32, i32* %4
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.3, i64 0, i64 0), i32 %17, i32 %18, i32 %19)
br label %54
21: ; preds = %12, %0
%22 = load i32, i32* %3
%23 = load i32, i32* %2
%24 = icmp sgt i32 %22, %23
br i1 %24, label %25, label %34
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 %34
29: ; preds = %25
%30 = load i32, i32* %3
%31 = load i32, i32* %2
%32 = load i32, i32* %4
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.4, i64 0, i64 0), i32 %30, i32 %31, i32 %32)
br label %53
34: ; preds = %25, %21
%35 = load i32, i32* %4
%36 = load i32, i32* %2
%37 = icmp sgt i32 %35, %36
br i1 %37, label %38, label %47
38: ; preds = %34
%39 = load i32, i32* %4
%40 = load i32, i32* %3
%41 = icmp sgt i32 %39, %40
br i1 %41, label %42, label %47
42: ; preds = %38
%43 = load i32, i32* %4
%44 = load i32, i32* %2
%45 = load i32, i32* %3
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.5, i64 0, i64 0), i32 %43, i32 %44, i32 %45)
br label %52
47: ; preds = %38, %34
%48 = load i32, i32* %4
%49 = load i32, i32* %2
%50 = load i32, i32* %3
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.6, i64 0, i64 0), i32 %48, i32 %49, i32 %50)
br label %52
52: ; preds = %47, %42
br label %53
53: ; preds = %52, %29
br label %54
54: ; preds = %53, %16
%55 = load i32, i32* %1
ret i32 %55
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [33 x i8] c"Por favor digite os 3 n\C3\BAmeros: \00"
@.str.2 = [9 x i8] c"%d %d %d\00"
@.str.3 = [68 x i8] c"O Primeiro [ %d ] \C3\A9 maior que o segundo [ %d ] e terceiro [ %d ] \0A\00"
@.str.4 = [68 x i8] c"O Segundo [ %d ] \C3\A9 maior que o primeiro [ %d ] e terceiro [ %d ] \0A\00"
@.str.5 = [68 x i8] c"O terceiro [ %d ] \C3\A9 maior que o primeiro [ %d ] e segundo [ %d ] \0A\00"
@.str.6 = [68 x i8] c"O primeiro [ %d ], o segundo [ %d ] e terceiro [ %d ] s\C3\A3o iguais \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = load i32, i32* @LC_ALL
%5 = tail call i32 @setlocale(i32 %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = icmp sgt i32 %11, %12
br i1 %13, label %14, label %19
14: ; preds = %0
%15 = load i32, i32* %3
%16 = icmp sgt i32 %11, %15
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @.str.3, i64 0, i64 0), i32 %11, i32 %12, i32 %15)
br label %34
19: ; preds = %14, %0
%20 = icmp sgt i32 %12, %11
%21 = load i32, i32* %3
%22 = icmp sgt i32 %12, %21
%23 = select i1 %20, i1 %22, i1 false
br i1 %23, label %24, label %26
24: ; preds = %19
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @.str.4, i64 0, i64 0), i32 %12, i32 %11, i32 %21)
br label %34
26: ; preds = %19
%27 = icmp sgt i32 %21, %11
%28 = icmp sgt i32 %21, %12
%29 = select i1 %27, i1 %28, i1 false
br i1 %29, label %30, label %32
30: ; preds = %26
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @.str.5, i64 0, i64 0), i32 %21, i32 %11, i32 %12)
br label %34
32: ; preds = %26
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @.str.6, i64 0, i64 0), i32 %21, i32 %11, i32 %12)
br label %34
34: ; preds = %24, %32, %30, %17
ret i32 0
}