#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 *, float *, float *, float *);
int main() {
  float x, y, z;
  printf("Digite os 3 números: ");
  scanf("%f %f %f", &x, &y, &z);
  if (x < y && x < z) {
    if (y < z) {
      printf("%f %f %f\n", x, y, z);
    } else {
      printf("%f %f %f\n", x, z, y);
    }
  } else if (y < z) {
    if (x < z) {
      printf("%f %f %f\n", y, x, z);
    } else {
      printf("%f %f %f\n", y, z, x);
    }
  } else {
    if (x < y) {
      printf("%f %f %f\n", z, x, y);
    } else {
      printf("%f %f %f\n", 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    0xed3(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11ea <main+0xca>
movss  -0x8(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11ea <main+0xca>
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11bc <main+0x9c>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x10(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xe70(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    11e5 <main+0xc5>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xe42(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    12e0 <main+0x1c0>
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    126c <main+0x14c>
movss  -0x8(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    123e <main+0x11e>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x10(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xdee(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    1267 <main+0x147>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x8(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xdc0(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    12db <main+0x1bb>
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    12ad <main+0x18d>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xd7f(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    12d6 <main+0x1b6>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x8(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xd51(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    12db <main+0x1bb>
jmp    12e0 <main+0x1c0>
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    0xede(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
movss  0x14(%rsp),%xmm2
movss  0x10(%rsp),%xmm0
ucomiss %xmm2,%xmm0
movss  0xc(%rsp),%xmm1
jbe    117c <main+0x5c>
ucomiss %xmm2,%xmm1
jbe    1189 <main+0x69>
movaps %xmm0,%xmm3
minss  %xmm1,%xmm3
maxss  %xmm0,%xmm1
movaps %xmm1,%xmm4
movaps %xmm2,%xmm0
jmp    11a7 <main+0x87>
ucomiss %xmm0,%xmm1
ja     118e <main+0x6e>
movaps %xmm0,%xmm3
movaps %xmm2,%xmm4
jmp    11a4 <main+0x84>
ucomiss %xmm0,%xmm1
jbe    119e <main+0x7e>
movaps %xmm2,%xmm3
minss  %xmm1,%xmm3
maxss  %xmm2,%xmm1
movaps %xmm1,%xmm4
jmp    11a7 <main+0x87>
movaps %xmm2,%xmm3
movaps %xmm0,%xmm4
movaps %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm3,%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm4,%xmm2
lea    0xe60(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Digite os 3 n\C3\BAmeros: \00"
@.str.1 = [9 x i8] c"%f %f %f\00"
@.str.2 = [10 x i8] c"%f %f %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 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), float* %2, float* %3, float* %4)
%7 = load float, float* %2
%8 = load float, float* %3
%9 = fcmp olt float %7, %8
br i1 %9, label %10, label %35
10: ; preds = %0
%11 = load float, float* %2
%12 = load float, float* %4
%13 = fcmp olt float %11, %12
br i1 %13, label %14, label %35
14: ; preds = %10
%15 = load float, float* %3
%16 = load float, float* %4
%17 = fcmp olt float %15, %16
br i1 %17, label %18, label %26
18: ; preds = %14
%19 = load float, float* %2
%20 = fpext float %19 to double
%21 = load float, float* %3
%22 = fpext float %21 to double
%23 = load float, float* %4
%24 = fpext float %23 to double
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %20, double %22, double %24)
br label %34
26: ; preds = %14
%27 = load float, float* %2
%28 = fpext float %27 to double
%29 = load float, float* %4
%30 = fpext float %29 to double
%31 = load float, float* %3
%32 = fpext float %31 to double
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %28, double %30, double %32)
br label %34
34: ; preds = %26, %18
br label %82
35: ; preds = %10, %0
%36 = load float, float* %3
%37 = load float, float* %4
%38 = fcmp olt float %36, %37
br i1 %38, label %39, label %60
39: ; preds = %35
%40 = load float, float* %2
%41 = load float, float* %4
%42 = fcmp olt float %40, %41
br i1 %42, label %43, label %51
43: ; preds = %39
%44 = load float, float* %3
%45 = fpext float %44 to double
%46 = load float, float* %2
%47 = fpext float %46 to double
%48 = load float, float* %4
%49 = fpext float %48 to double
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %45, double %47, double %49)
br label %59
51: ; preds = %39
%52 = load float, float* %3
%53 = fpext float %52 to double
%54 = load float, float* %4
%55 = fpext float %54 to double
%56 = load float, float* %2
%57 = fpext float %56 to double
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %53, double %55, double %57)
br label %59
59: ; preds = %51, %43
br label %81
60: ; preds = %35
%61 = load float, float* %2
%62 = load float, float* %3
%63 = fcmp olt float %61, %62
br i1 %63, label %64, label %72
64: ; preds = %60
%65 = load float, float* %4
%66 = fpext float %65 to double
%67 = load float, float* %2
%68 = fpext float %67 to double
%69 = load float, float* %3
%70 = fpext float %69 to double
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %66, double %68, double %70)
br label %80
72: ; preds = %60
%73 = load float, float* %4
%74 = fpext float %73 to double
%75 = load float, float* %3
%76 = fpext float %75 to double
%77 = load float, float* %2
%78 = fpext float %77 to double
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %74, double %76, double %78)
br label %80
80: ; preds = %72, %64
br label %81
81: ; preds = %80, %59
br label %82
82: ; preds = %81, %34
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"Digite os 3 n\C3\BAmeros: \00"
@.str.1 = [9 x i8] c"%f %f %f\00"
@.str.2 = [10 x i8] c"%f %f %f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 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), float* %1, float* %2, float* %3)
%9 = load float, float* %1
%10 = load float, float* %2
%11 = fcmp olt float %9, %10
%12 = load float, float* %3
br i1 %11, label %13, label %20
13: ; preds = %0
%14 = fcmp olt float %9, %12
%15 = fcmp olt float %10, %12
br i1 %14, label %16, label %19
16: ; preds = %13
%17 = select i1 %15, float %10, float %12
%18 = select i1 %15, float %12, float %10
br label %26
19: ; preds = %13
br i1 %15, label %22, label %26
20: ; preds = %0
%21 = fcmp olt float %10, %12
br i1 %21, label %22, label %26
22: ; preds = %20, %19
%23 = fcmp olt float %9, %12
%24 = select i1 %23, float %9, float %12
%25 = select i1 %23, float %12, float %9
br label %26
26: ; preds = %20, %19, %22, %16
%27 = phi float [ %17, %16 ], [ %24, %22 ], [ %9, %19 ], [ %10, %20 ]
%28 = phi float [ %18, %16 ], [ %25, %22 ], [ %10, %19 ], [ %9, %20 ]
%29 = phi float [ %9, %16 ], [ %10, %22 ], [ %12, %19 ], [ %12, %20 ]
%30 = fpext float %29 to double
%31 = fpext float %27 to double
%32 = fpext float %28 to double
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %30, double %31, double %32)
ret i32 0
}