#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 *, double *, double *, double *);
int main() {
  double a, b, c;
  printf("Please enter the three numbers, seperated by space: ");
  scanf("%lf %lf %lf", &a, &b, &c);
  if (a > b && a > c) {
    if (b > c) {
      printf("%.1lf %.1lf %.1lf\n", a, b, c);
    } else {
      printf("%.1lf %.1lf %.1lf\n", a, c, b);
    }
  } else if (a < b && b > c) {
    if (a > c) {
      printf("%lf %lf %lf\n", b, a, c);
    } else {
      printf("%.1lf %.1lf %.1lf\n", b, c, a);
    }
  } else {
    if (a > b) {
      printf("%.1lf %.1lf %.1lf\n", c, a, b);
    } else {
      printf("%.1lf %.1lf %.1lf\n", c, b, a);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    11c9 <main+0xa9>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    11c9 <main+0xa9>
movsd  -0x18(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    11a7 <main+0x87>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
lea    0xea6(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    11c4 <main+0xa4>
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
lea    0xe84(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    129a <main+0x17a>
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1241 <main+0x121>
movsd  -0x18(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1241 <main+0x121>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    121f <main+0xff>
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
lea    0xe41(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    123c <main+0x11c>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
lea    0xe0c(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    1295 <main+0x175>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1273 <main+0x153>
movsd  -0x20(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
lea    0xdda(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    1290 <main+0x170>
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
lea    0xdb8(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    1295 <main+0x175>
jmp    129a <main+0x17a>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xefc(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
ucomisd %xmm3,%xmm2
jbe    1183 <main+0x63>
movsd  (%rsp),%xmm4
ucomisd %xmm4,%xmm2
jbe    1183 <main+0x63>
lea    0xed2(%rip),%rdi
movapd %xmm2,%xmm0
ucomisd %xmm4,%xmm3
jbe    11d1 <main+0xb1>
movapd %xmm3,%xmm1
movapd %xmm4,%xmm2
jmp    11ea <main+0xca>
ucomisd %xmm2,%xmm3
jbe    11af <main+0x8f>
movsd  (%rsp),%xmm4
ucomisd %xmm4,%xmm3
jbe    11af <main+0x8f>
ucomisd %xmm4,%xmm2
jbe    11db <main+0xbb>
lea    0xeb3(%rip),%rdi
movapd %xmm3,%xmm0
movapd %xmm2,%xmm1
movapd %xmm4,%xmm2
jmp    11ea <main+0xca>
ucomisd %xmm3,%xmm2
movsd  (%rsp),%xmm0
lea    0xe82(%rip),%rdi
jbe    11cb <main+0xab>
movapd %xmm2,%xmm1
movapd %xmm3,%xmm2
jmp    11ea <main+0xca>
movapd %xmm3,%xmm1
jmp    11ea <main+0xca>
movapd %xmm4,%xmm1
movapd %xmm3,%xmm2
jmp    11ea <main+0xca>
lea    0xe5f(%rip),%rdi
movapd %xmm3,%xmm0
movapd %xmm4,%xmm1
mov    $0x3,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [53 x i8] c"Please enter the three numbers, seperated by space: \00"
@.str.1 = [12 x i8] c"%lf %lf %lf\00"
@.str.2 = [19 x i8] c"%.1lf %.1lf %.1lf\0A\00"
@.str.3 = [13 x i8] c"%lf %lf %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), double* %2, double* %3, double* %4)
%7 = load double, double* %2
%8 = load double, double* %3
%9 = fcmp ogt double %7, %8
br i1 %9, label %10, label %29
10: ; preds = %0
%11 = load double, double* %2
%12 = load double, double* %4
%13 = fcmp ogt double %11, %12
br i1 %13, label %14, label %29
14: ; preds = %10
%15 = load double, double* %3
%16 = load double, double* %4
%17 = fcmp ogt double %15, %16
br i1 %17, label %18, label %23
18: ; preds = %14
%19 = load double, double* %2
%20 = load double, double* %3
%21 = load double, double* %4
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %19, double %20, double %21)
br label %28
23: ; preds = %14
%24 = load double, double* %2
%25 = load double, double* %4
%26 = load double, double* %3
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %24, double %25, double %26)
br label %28
28: ; preds = %23, %18
br label %68
29: ; preds = %10, %0
%30 = load double, double* %2
%31 = load double, double* %3
%32 = fcmp olt double %30, %31
br i1 %32, label %33, label %52
33: ; preds = %29
%34 = load double, double* %3
%35 = load double, double* %4
%36 = fcmp ogt double %34, %35
br i1 %36, label %37, label %52
37: ; preds = %33
%38 = load double, double* %2
%39 = load double, double* %4
%40 = fcmp ogt double %38, %39
br i1 %40, label %41, label %46
41: ; preds = %37
%42 = load double, double* %3
%43 = load double, double* %2
%44 = load double, double* %4
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double %42, double %43, double %44)
br label %51
46: ; preds = %37
%47 = load double, double* %3
%48 = load double, double* %4
%49 = load double, double* %2
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %47, double %48, double %49)
br label %51
51: ; preds = %46, %41
br label %67
52: ; preds = %33, %29
%53 = load double, double* %2
%54 = load double, double* %3
%55 = fcmp ogt double %53, %54
br i1 %55, label %56, label %61
56: ; preds = %52
%57 = load double, double* %4
%58 = load double, double* %2
%59 = load double, double* %3
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %57, double %58, double %59)
br label %66
61: ; preds = %52
%62 = load double, double* %4
%63 = load double, double* %3
%64 = load double, double* %2
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %62, double %63, double %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 = [53 x i8] c"Please enter the three numbers, seperated by space: \00"
@.str.1 = [12 x i8] c"%lf %lf %lf\00"
@.str.2 = [19 x i8] c"%.1lf %.1lf %.1lf\0A\00"
@.str.3 = [13 x i8] c"%lf %lf %lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), double* %1, double* %2, double* %3)
%9 = load double, double* %1
%10 = load double, double* %2
%11 = fcmp ogt double %9, %10
br i1 %11, label %12, label %21
12: ; preds = %0
%13 = load double, double* %3
%14 = fcmp ogt double %9, %13
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = fcmp ogt double %10, %13
br i1 %16, label %17, label %19
17: ; preds = %15
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %9, double %10, double %13)
br label %38
19: ; preds = %15
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %9, double %13, double %10)
br label %38
21: ; preds = %12, %0
%22 = fcmp olt double %9, %10
br i1 %22, label %23, label %32
23: ; preds = %21
%24 = load double, double* %3
%25 = fcmp ogt double %10, %24
br i1 %25, label %26, label %32
26: ; preds = %23
%27 = fcmp ogt double %9, %24
br i1 %27, label %28, label %30
28: ; preds = %26
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double %10, double %9, double %24)
br label %38
30: ; preds = %26
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %10, double %24, double %9)
br label %38
32: ; preds = %23, %21
%33 = load double, double* %3
br i1 %11, label %34, label %36
34: ; preds = %32
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %33, double %9, double %10)
br label %38
36: ; preds = %32
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %33, double %10, double %9)
br label %38
38: ; preds = %30, %28, %36, %34, %17, %19
ret i32 0
}