#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 a, b, c;
  printf("\nDigite 3 valores:\n");
  scanf("%f%f%f", &a, &b, &c);
  if (a >= b && a >= c) {
    if (b >= c) {
      printf("\n%.2f, %.2f, %.2f\n", a, b, c);
    } else {
      printf("\n%.2f, %.2f, %.2f\n", a, c, b);
    }
  } else {
    if (b >= c) {
      if (a >= c) {
        printf("\n%.2f, %.2f, %.2f\n", b, a, c);
      } else {
        printf("\n%.2f, %.2f, %.2f\n", b, c, a);
      }
    } else {
      if (a >= b) {
        printf("\n%.2f, %.2f, %.2f\n", c, a, b);
      } else {
        printf("\n%.2f, %.2f, %.2f\n", c, b, a);
      }
    }
  }
  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>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jb     11de <main+0xbe>
movss  -0x8(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jb     11de <main+0xbe>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jb     11b0 <main+0x90>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x10(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xe77(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    11d9 <main+0xb9>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xe49(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    12c8 <main+0x1a8>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jb     1258 <main+0x138>
movss  -0x8(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jb     122a <main+0x10a>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x10(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xdfd(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    1253 <main+0x133>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x8(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xdcf(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    12c3 <main+0x1a3>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jb     1295 <main+0x175>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xd92(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    12be <main+0x19e>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x8(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xd64(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    12c3 <main+0x1a3>
jmp    12c8 <main+0x1a8>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
movss  0x14(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
ucomiss %xmm1,%xmm0
movss  0xc(%rsp),%xmm3
jae    1182 <main+0x52>
ucomiss %xmm3,%xmm1
jae    1197 <main+0x67>
movaps %xmm1,%xmm2
movaps %xmm0,%xmm4
movaps %xmm3,%xmm0
jmp    11da <main+0xaa>
ucomiss %xmm3,%xmm0
jae    11bb <main+0x8b>
ucomiss %xmm3,%xmm1
jae    1197 <main+0x67>
movaps %xmm0,%xmm2
movaps %xmm1,%xmm4
movaps %xmm3,%xmm0
jmp    11da <main+0xaa>
ucomiss %xmm3,%xmm0
movaps %xmm3,%xmm2
cmpnless %xmm0,%xmm2
movaps %xmm2,%xmm4
andps  %xmm3,%xmm4
andnps %xmm0,%xmm2
orps   %xmm4,%xmm2
jb     11b3 <main+0x83>
movaps %xmm3,%xmm0
movaps %xmm0,%xmm4
movaps %xmm1,%xmm0
jmp    11da <main+0xaa>
ucomiss %xmm3,%xmm1
movaps %xmm3,%xmm2
cmpnless %xmm1,%xmm2
movaps %xmm2,%xmm4
andps  %xmm3,%xmm4
andnps %xmm1,%xmm2
orps   %xmm4,%xmm2
jb     11d7 <main+0xa7>
movaps %xmm3,%xmm1
movaps %xmm1,%xmm4
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm4,%xmm2
lea    0xe14(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [20 x i8] c"\0ADigite 3 valores:\0A\00"
@.str.1 = [7 x i8] c"%f%f%f\00"
@.str.2 = [19 x i8] c"\0A%.2f, %.2f, %.2f\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 ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 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 oge 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 oge 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 oge 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 ([19 x i8], [19 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 ([19 x i8], [19 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 oge 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 oge 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 ([19 x i8], [19 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 ([19 x i8], [19 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 oge 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 ([19 x i8], [19 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 ([19 x i8], [19 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.1 = [7 x i8] c"%f%f%f\00"
@.str.2 = [19 x i8] c"\0A%.2f, %.2f, %.2f\0A\00"
@str = [19 x i8] c"\0ADigite 3 valores:\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 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 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 ult float %9, %10
%12 = load float, float* %3
br i1 %11, label %19, label %13
13: ; preds = %0
%14 = fcmp ult float %9, %12
%15 = fcmp ult float %10, %12
br i1 %14, label %21, label %16
16: ; preds = %13
%17 = select i1 %15, float %12, float %10
%18 = select i1 %15, float %10, float %12
br label %26
19: ; preds = %0
%20 = fcmp ult float %10, %12
br i1 %20, label %26, label %22
21: ; preds = %13
br i1 %15, label %26, label %22
22: ; preds = %21, %19
%23 = fcmp ult float %9, %12
%24 = select i1 %23, float %12, float %9
%25 = select i1 %23, float %9, float %12
br label %26
26: ; preds = %19, %21, %22, %16
%27 = phi float [ %17, %16 ], [ %24, %22 ], [ %9, %21 ], [ %10, %19 ]
%28 = phi float [ %18, %16 ], [ %25, %22 ], [ %10, %21 ], [ %9, %19 ]
%29 = phi float [ %9, %16 ], [ %10, %22 ], [ %12, %21 ], [ %12, %19 ]
%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 ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %30, double %31, double %32)
ret i32 0
}