#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, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int regularV[3];
  int i;
  scanf("%d %d %d", &regularV[0], &regularV[1], &regularV[2]);
  int orderedV[3] = {regularV[0], regularV[1], regularV[2]};
  int swapped, aux, rightIndex, leftIndex;
  do {
    swapped = 0;
    for (i = 1; i < 3; i++) {
      leftIndex = i - 1;
      rightIndex = i;
      if (orderedV[leftIndex] > orderedV[rightIndex]) {
        aux = orderedV[leftIndex];
        orderedV[leftIndex] = orderedV[rightIndex];
        orderedV[rightIndex] = aux;
        swapped = 1;
      }
    }
  } while (swapped);
  printf("%d\n%d\n%d\n\n%d\n%d\n%d\n", orderedV[0], orderedV[1], orderedV[2],
         regularV[0], regularV[1], regularV[2]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%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>
mov    -0x10(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    11de <main+0xbe>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x30(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x2c(%rbp)
movslq -0x30(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%eax
movslq -0x2c(%rbp),%rcx
cmp    -0x20(%rbp,%rcx,4),%eax
jle    11cb <main+0xab>
movslq -0x30(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%eax
mov    %eax,-0x28(%rbp)
movslq -0x2c(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%ecx
movslq -0x30(%rbp),%rax
mov    %ecx,-0x20(%rbp,%rax,4)
mov    -0x28(%rbp),%ecx
movslq -0x2c(%rbp),%rax
mov    %ecx,-0x20(%rbp,%rax,4)
movl   $0x1,-0x24(%rbp)
jmp    11d0 <main+0xb0>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    116f <main+0x4f>
jmp    11e3 <main+0xc3>
cmpl   $0x0,-0x24(%rbp)
jne    1161 <main+0x41>
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0xc(%rbp),%r9d
mov    -0x8(%rbp),%eax
lea    0xe01(%rip),%rdi
mov    %eax,(%rsp)
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%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),%r8d
mov    0x10(%rsp),%r9d
mov    0x14(%rsp),%r10d
mov    %r10d,%ecx
mov    %r9d,%edx
mov    %r8d,%esi
nopw   0x0(%rax,%rax,1)
mov    %esi,%r11d
mov    %edx,%eax
cmp    %edx,%esi
cmovg  %esi,%edx
mov    %ecx,%edi
cmovg  %eax,%esi
cmp    %ecx,%edx
cmovg  %edx,%ecx
cmovg  %edi,%edx
jg     1160 <main+0x40>
cmp    %eax,%r11d
jg     1160 <main+0x40>
mov    %r10d,(%rsp)
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [20 x i8] c"%d\0A%d\0A%d\0A\0A%d\0A%d\0A%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 ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4, i32* %5)
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = load i32, i32* %5
br label %10
10: ; preds = %10, %0
%11 = phi i32 [ %9, %0 ], [ %18, %10 ]
%12 = phi i32 [ %8, %0 ], [ %19, %10 ]
%13 = phi i32 [ %7, %0 ], [ %16, %10 ]
%14 = icmp sgt i32 %13, %12
%15 = select i1 %14, i32 %13, i32 %12
%16 = select i1 %14, i32 %12, i32 %13
%17 = icmp sgt i32 %15, %11
%18 = select i1 %17, i32 %15, i32 %11
%19 = select i1 %17, i32 %11, i32 %15
%20 = or i1 %17, %14
br i1 %20, label %10, label %21
21: ; preds = %10
%22 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %16, i32 %19, i32 %18, i32 %7, i32 %8, i32 %9)
ret i32 0
}