#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 main() {
  int x, y, z;
  printf("Insira 3 números: ");
  scanf("%d %d %d", &x, &y, &z);
  if (x <= y && x <= z) {
    if (y <= z) {
      printf("%d %d %d", x, y, z);
    } else {
      printf("%d %d %d", x, z, y);
    }
  } else if (y <= x && y <= z) {
    if (x <= z) {
      printf("%d %d %d", y, x, z);
    } else {
      printf("%d %d %d", y, z, x);
    }
  } else {
    if (x <= y) {
      printf("%d %d %d", z, x, y);
    } else {
      printf("%d %d %d", z, y, x);
    }
  }
  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    0xed0(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11b1 <main+0x91>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     11b1 <main+0x91>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1195 <main+0x75>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11ac <main+0x8c>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1256 <main+0x136>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     120d <main+0xed>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     120d <main+0xed>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     11f1 <main+0xd1>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe2f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1208 <main+0xe8>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xe13(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1251 <main+0x131>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1235 <main+0x115>
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xdeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    124c <main+0x12c>
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xdcf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1251 <main+0x131>
jmp    1256 <main+0x136>
xor    %eax,%eax
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    0xedb(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x14(%rsp),%ecx
mov    0x10(%rsp),%eax
cmp    %eax,%ecx
jg     1163 <main+0x43>
mov    0xc(%rsp),%r8d
cmp    %r8d,%ecx
jle    118a <main+0x6a>
cmp    %ecx,%eax
jg     1171 <main+0x51>
mov    0xc(%rsp),%r8d
cmp    %r8d,%eax
jle    119f <main+0x7f>
mov    0xc(%rsp),%esi
lea    0xe98(%rip),%rdi
cmp    %eax,%ecx
jle    1184 <main+0x64>
mov    %eax,%edx
jmp    11bb <main+0x9b>
mov    %ecx,%edx
mov    %eax,%ecx
jmp    11bb <main+0x9b>
lea    0xe83(%rip),%rdi
mov    %ecx,%esi
cmp    %r8d,%eax
jle    11b2 <main+0x92>
mov    %r8d,%edx
mov    %eax,%ecx
jmp    11bb <main+0x9b>
lea    0xe6e(%rip),%rdi
mov    %eax,%esi
cmp    %r8d,%ecx
jle    11b6 <main+0x96>
mov    %r8d,%edx
jmp    11bb <main+0x9b>
mov    %eax,%edx
jmp    11b8 <main+0x98>
mov    %ecx,%edx
mov    %r8d,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Insira 3 n\C3\BAmeros: \00"
@.str.1 = [9 x i8] c"%d %d %d\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 ([20 x i8], [20 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 sle i32 %7, %8
br i1 %9, label %10, label %29
10: ; preds = %0
%11 = load i32, i32* %2
%12 = load i32, i32* %4
%13 = icmp sle i32 %11, %12
br i1 %13, label %14, label %29
14: ; preds = %10
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = icmp sle i32 %15, %16
br i1 %17, label %18, label %23
18: ; preds = %14
%19 = load i32, i32* %2
%20 = load i32, i32* %3
%21 = load i32, i32* %4
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %19, i32 %20, i32 %21)
br label %28
23: ; preds = %14
%24 = load i32, i32* %2
%25 = load i32, i32* %4
%26 = load i32, i32* %3
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %24, i32 %25, i32 %26)
br label %28
28: ; preds = %23, %18
br label %68
29: ; preds = %10, %0
%30 = load i32, i32* %3
%31 = load i32, i32* %2
%32 = icmp sle i32 %30, %31
br i1 %32, label %33, label %52
33: ; preds = %29
%34 = load i32, i32* %3
%35 = load i32, i32* %4
%36 = icmp sle i32 %34, %35
br i1 %36, label %37, label %52
37: ; preds = %33
%38 = load i32, i32* %2
%39 = load i32, i32* %4
%40 = icmp sle i32 %38, %39
br i1 %40, label %41, label %46
41: ; preds = %37
%42 = load i32, i32* %3
%43 = load i32, i32* %2
%44 = load i32, i32* %4
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %42, i32 %43, i32 %44)
br label %51
46: ; preds = %37
%47 = load i32, i32* %3
%48 = load i32, i32* %4
%49 = load i32, i32* %2
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %47, i32 %48, i32 %49)
br label %51
51: ; preds = %46, %41
br label %67
52: ; preds = %33, %29
%53 = load i32, i32* %2
%54 = load i32, i32* %3
%55 = icmp sle i32 %53, %54
br i1 %55, label %56, label %61
56: ; preds = %52
%57 = load i32, i32* %4
%58 = load i32, i32* %2
%59 = load i32, i32* %3
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %57, i32 %58, i32 %59)
br label %66
61: ; preds = %52
%62 = load i32, i32* %4
%63 = load i32, i32* %3
%64 = load i32, i32* %2
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %62, i32 %63, i32 %64)
br label %66
66: ; preds = %61, %56
br label %67
67: ; preds = %66, %51
br label %68
68: ; preds = %67, %28
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Insira 3 n\C3\BAmeros: \00"
@.str.1 = [9 x i8] c"%d %d %d\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 ([20 x i8], [20 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
br i1 %11, label %21, label %12
12: ; preds = %0
%13 = load i32, i32* %3
%14 = icmp sgt i32 %9, %13
br i1 %14, label %21, label %15
15: ; preds = %12
%16 = icmp sgt i32 %10, %13
br i1 %16, label %19, label %17
17: ; preds = %15
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %10, i32 %13)
br label %38
19: ; preds = %15
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %13, i32 %10)
br label %38
21: ; preds = %12, %0
%22 = icmp sgt i32 %10, %9
br i1 %22, label %32, label %23
23: ; preds = %21
%24 = load i32, i32* %3
%25 = icmp sgt i32 %10, %24
br i1 %25, label %32, label %26
26: ; preds = %23
%27 = icmp sgt i32 %9, %24
br i1 %27, label %30, label %28
28: ; preds = %26
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %9, i32 %24)
br label %38
30: ; preds = %26
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %24, i32 %9)
br label %38
32: ; preds = %23, %21
%33 = load i32, i32* %3
br i1 %11, label %36, label %34
34: ; preds = %32
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %33, i32 %9, i32 %10)
br label %38
36: ; preds = %32
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %33, i32 %10, i32 %9)
br label %38
38: ; preds = %30, %28, %36, %34, %17, %19
ret i32 0
}