#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, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int a[3];
  int i, j, swap;
  scanf("%d%d%d\n", &a[0], &a[1], &a[2]);
  for (i = 0; i < 3; i++) {
    for (j = 1; j < 3 - i; j++) {
      if (a[j - 1] > a[j]) {
        swap = a[j - 1];
        a[j - 1] = a[j];
        a[j] = swap;
      }
    }
  }
  printf("%d %d %d\n", a[0], a[1], a[2]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x10(%rbp),%rsi
lea    -0x10(%rbp),%rdx
add    $0x4,%rdx
lea    -0x10(%rbp),%rcx
add    $0x8,%rcx
lea    0xeb6(%rip),%rdi
call   1040 <scanf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    11e8 <main+0xc8>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x3,%ecx
sub    -0x14(%rbp),%ecx
cmp    %ecx,%eax
jge    11d5 <main+0xb5>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x10(%rbp,%rax,4),%eax
movslq -0x18(%rbp),%rcx
cmp    -0x10(%rbp,%rcx,4),%eax
jle    11c2 <main+0xa2>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x10(%rbp,%rax,4),%eax
mov    %eax,-0x1c(%rbp)
movslq -0x18(%rbp),%rax
mov    -0x10(%rbp,%rax,4),%ecx
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
cltq
mov    %ecx,-0x10(%rbp,%rax,4)
mov    -0x1c(%rbp),%ecx
movslq -0x18(%rbp),%rax
mov    %ecx,-0x10(%rbp,%rax,4)
jmp    11c7 <main+0xa7>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1167 <main+0x47>
jmp    11da <main+0xba>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1156 <main+0x36>
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xe10(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0xecb(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
mov    0x10(%rsp),%ecx
cmp    %ecx,%eax
jle    1155 <main+0x35>
mov    %ecx,0xc(%rsp)
mov    %eax,0x10(%rsp)
jmp    1157 <main+0x37>
mov    %ecx,%eax
mov    0x14(%rsp),%ecx
cmp    %ecx,%eax
jle    1167 <main+0x47>
mov    %ecx,0x10(%rsp)
mov    %eax,0x14(%rsp)
mov    0xc(%rsp),%eax
mov    0x10(%rsp),%ecx
cmp    %ecx,%eax
jle    117b <main+0x5b>
mov    %ecx,0xc(%rsp)
mov    %eax,0x10(%rsp)
mov    0xc(%rsp),%esi
mov    0x10(%rsp),%edx
mov    0x14(%rsp),%ecx
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%d%d%d\0A\00"
@.str.1 = [10 x i8] c"%d %d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%9 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32* %6, i32* %7, i32* %8)
store i32 0, i32* %3
br label %10
10: ; preds = %53, %0
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 3
br i1 %12, label %13, label %56
13: ; preds = %10
store i32 1, i32* %4
br label %14
14: ; preds = %49, %13
%15 = load i32, i32* %4
%16 = load i32, i32* %3
%17 = sub nsw i32 3, %16
%18 = icmp slt i32 %15, %17
br i1 %18, label %19, label %52
19: ; preds = %14
%20 = load i32, i32* %4
%21 = sub nsw i32 %20, 1
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 %22
%24 = load i32, i32* %23
%25 = load i32, i32* %4
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 %26
%28 = load i32, i32* %27
%29 = icmp sgt i32 %24, %28
br i1 %29, label %30, label %48
30: ; preds = %19
%31 = load i32, i32* %4
%32 = sub nsw i32 %31, 1
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 %33
%35 = load i32, i32* %34
store i32 %35, i32* %5
%36 = load i32, i32* %4
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 %37
%39 = load i32, i32* %38
%40 = load i32, i32* %4
%41 = sub nsw i32 %40, 1
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 %42
store i32 %39, i32* %43
%44 = load i32, i32* %5
%45 = load i32, i32* %4
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 %46
store i32 %44, i32* %47
br label %48
48: ; preds = %30, %19
br label %49
49: ; preds = %48
%50 = load i32, i32* %4
%51 = add nsw i32 %50, 1
store i32 %51, i32* %4
br label %14
52: ; preds = %14
br label %53
53: ; preds = %52
%54 = load i32, i32* %3
%55 = add nsw i32 %54, 1
store i32 %55, i32* %3
br label %10
56: ; preds = %10
%57 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%58 = load i32, i32* %57
%59 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%60 = load i32, i32* %59
%61 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%62 = load i32, i32* %61
%63 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %58, i32 %60, i32 %62)
%64 = load i32, i32* %1
ret i32 %64
}

LLVM IR (-O2):
@.str = [8 x i8] c"%d%d%d\0A\00"
@.str.1 = [10 x i8] c"%d %d %d\0A\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = bitcast [3 x i32]* %1 to i8*
%3 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
%6 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4, i32* %5)
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = icmp sgt i32 %7, %8
br i1 %9, label %10, label %11
10: ; preds = %0
store i32 %8, i32* %3
store i32 %7, i32* %4
br label %11
11: ; preds = %0, %10
%12 = phi i32 [ %8, %0 ], [ %7, %10 ]
%13 = load i32, i32* %5
%14 = icmp sgt i32 %12, %13
br i1 %14, label %15, label %16
15: ; preds = %11
store i32 %13, i32* %4
store i32 %12, i32* %5
br label %16
16: ; preds = %15, %11
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = icmp sgt i32 %17, %18
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 %18, i32* %3
store i32 %17, i32* %4
br label %21
21: ; preds = %20, %16
%22 = load i32, i32* %3
%23 = load i32, i32* %4
%24 = load i32, i32* %5
%25 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %22, i32 %23, i32 %24)
ret i32 0
}