#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 *);
int /*<<< orphan*/ system(char *);
int main() {
  int x, y, z;
  printf("Digite três números inteiros: ");
  scanf("%d %d %d", &x, &y, &z);
  if (x > y) {
    if (x > z) {
      printf("%d é o maior número!\n", x);
      if (y > z)
        printf("%d é o menor número!\n", z);
      else
        printf("%d é o menor número!\n", y);
    } else {
      printf("%d é o maior número!\n", z);
      printf("%d é o menor número!\n", y);
    }
  } else {
    if (x > z) {
      printf("%d é o maior número!\n", y);
      printf("%d é o menor número!\n", z);
    } else {
      printf("%d é o menor número!\n", x);
      if (y > z)
        printf("%d é o maior número!\n", y);
      else
        printf("%d é o maior número!\n", z);
    }
  }
  system("pause");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xecd(%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    11ed <main+0xbd>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    11c6 <main+0x96>
mov    -0x8(%rbp),%esi
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    11b0 <main+0x80>
mov    -0x10(%rbp),%esi
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11c1 <main+0x91>
mov    -0xc(%rbp),%esi
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11e8 <main+0xb8>
mov    -0x10(%rbp),%esi
lea    0xe5a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    126e <main+0x13e>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1220 <main+0xf0>
mov    -0xc(%rbp),%esi
lea    0xe27(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xe2e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1269 <main+0x139>
mov    -0x8(%rbp),%esi
lea    0xe18(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1253 <main+0x123>
mov    -0xc(%rbp),%esi
lea    0xde3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1264 <main+0x134>
mov    -0x10(%rbp),%esi
lea    0xdcd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1269 <main+0x139>
jmp    126e <main+0x13e>
lea    0xde5(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed8(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%eax
mov    0xc(%rsp),%ecx
cmp    %eax,%esi
jle    1194 <main+0x64>
lea    0xeb6(%rip),%rdi
cmp    %ecx,%esi
jle    11b5 <main+0x85>
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%eax
cmp    %eax,%esi
jle    11ac <main+0x7c>
lea    0xeb0(%rip),%rdi
jmp    11ec <main+0xbc>
cmp    %ecx,%esi
jle    11cb <main+0x9b>
lea    0xe8b(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%esi
lea    0xe8f(%rip),%rdi
jmp    11ee <main+0xbe>
mov    %ecx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%esi
lea    0xe79(%rip),%rdi
jmp    11ee <main+0xbe>
lea    0xe70(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%eax
lea    0xe42(%rip),%rdi
cmp    %eax,%esi
jg     11ee <main+0xbe>
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe5e(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Digite tr\C3\AAs n\C3\BAmeros inteiros: \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [24 x i8] c"%d \C3\A9 o maior n\C3\BAmero!\0A\00"
@.str.3 = [24 x i8] c"%d \C3\A9 o menor n\C3\BAmero!\0A\00"
@.str.4 = [6 x i8] c"pause\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 ([33 x i8], [33 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* %2, i32* %3, i32* %4)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = icmp sgt i32 %7, %8
br i1 %9, label %10, label %33
10: ; preds = %0
%11 = load i32, i32* %2
%12 = load i32, i32* %4
%13 = icmp sgt i32 %11, %12
br i1 %13, label %14, label %27
14: ; preds = %10
%15 = load i32, i32* %2
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = icmp sgt i32 %17, %18
br i1 %19, label %20, label %23
20: ; preds = %14
%21 = load i32, i32* %4
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %21)
br label %26
23: ; preds = %14
%24 = load i32, i32* %3
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %24)
br label %26
26: ; preds = %23, %20
br label %32
27: ; preds = %10
%28 = load i32, i32* %4
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %28)
%30 = load i32, i32* %3
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %30)
br label %32
32: ; preds = %27, %26
br label %56
33: ; preds = %0
%34 = load i32, i32* %2
%35 = load i32, i32* %4
%36 = icmp sgt i32 %34, %35
br i1 %36, label %37, label %42
37: ; preds = %33
%38 = load i32, i32* %3
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %38)
%40 = load i32, i32* %4
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %40)
br label %55
42: ; preds = %33
%43 = load i32, i32* %2
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %43)
%45 = load i32, i32* %3
%46 = load i32, i32* %4
%47 = icmp sgt i32 %45, %46
br i1 %47, label %48, label %51
48: ; preds = %42
%49 = load i32, i32* %3
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %49)
br label %54
51: ; preds = %42
%52 = load i32, i32* %4
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %52)
br label %54
54: ; preds = %51, %48
br label %55
55: ; preds = %54, %37
br label %56
56: ; preds = %55, %32
%57 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"Digite tr\C3\AAs n\C3\BAmeros inteiros: \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [24 x i8] c"%d \C3\A9 o maior n\C3\BAmero!\0A\00"
@.str.3 = [24 x i8] c"%d \C3\A9 o menor n\C3\BAmero!\0A\00"
@.str.4 = [6 x i8] c"pause\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 ([33 x i8], [33 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 = icmp sgt i32 %9, %12
br i1 %11, label %14, label %28
14: ; preds = %0
br i1 %13, label %15, label %24
15: ; preds = %14
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = icmp sgt i32 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %15
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %18)
br label %42
22: ; preds = %15
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %17)
br label %42
24: ; preds = %14
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %12)
%26 = load i32, i32* %2
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %26)
br label %42
28: ; preds = %0
br i1 %13, label %29, label %33
29: ; preds = %28
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %10)
%31 = load i32, i32* %3
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %31)
br label %42
33: ; preds = %28
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %9)
%35 = load i32, i32* %2
%36 = load i32, i32* %3
%37 = icmp sgt i32 %35, %36
br i1 %37, label %38, label %40
38: ; preds = %33
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %35)
br label %42
40: ; preds = %33
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %36)
br label %42
42: ; preds = %29, %40, %38, %24, %22, %20
%43 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}