#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 */
scalar_t__ Functionstoinost(char);
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char x[14], temp;
  int a, i, y;
  scanf("%s", x);
  for (y = 1; y < 14; y++) {
    for (a = 0; a < 14 - y; a++) {
      if (Functionstoinost(x[a]) > Functionstoinost(x[a + 1]))
        ;
      {
        temp = x[a];
        x[a] = x[a + 1];
        x[a + 1] = temp;
      }
    }
  }
  for (i = 0; i < 14; i++) {
    printf("%c", x[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x12(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1050 <scanf@plt>
movl   $0x1,-0x20(%rbp)
cmpl   $0xe,-0x20(%rbp)
jge    1202 <main+0xd2>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    $0xe,%ecx
sub    -0x20(%rbp),%ecx
cmp    %ecx,%eax
jge    11ef <main+0xbf>
movslq -0x18(%rbp),%rax
movsbl -0x12(%rbp,%rax,1),%edi
call   1030 <Functionstoinost@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
cltq
movsbl -0x12(%rbp,%rax,1),%edi
call   1030 <Functionstoinost@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
cmp    %rcx,%rax
jle    11b3 <main+0x83>
jmp    11b3 <main+0x83>
movslq -0x18(%rbp),%rax
mov    -0x12(%rbp,%rax,1),%al
mov    %al,-0x13(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0x12(%rbp,%rax,1),%cl
movslq -0x18(%rbp),%rax
mov    %cl,-0x12(%rbp,%rax,1)
mov    -0x13(%rbp),%cl
mov    -0x18(%rbp),%eax
add    $0x1,%eax
cltq
mov    %cl,-0x12(%rbp,%rax,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1167 <main+0x37>
jmp    11f4 <main+0xc4>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1156 <main+0x26>
movl   $0x0,-0x1c(%rbp)
cmpl   $0xe,-0x1c(%rbp)
jge    1236 <main+0x106>
movslq -0x1c(%rbp),%rax
lea    0xde5(%rip),%rdi
movsbl -0x12(%rbp,%rax,1),%esi
call   1040 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1209 <main+0xd9>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xebf(%rip),%rdi
lea    0xa(%rsp),%rsi
call   1050 <scanf@plt>
mov    $0x1,%r14d
mov    $0xd,%r15d
nopw   0x0(%rax,%rax,1)
mov    0xa(%rsp),%al
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <Functionstoinost@plt>
lea    0x1(%rbp),%rbx
movsbl 0xb(%rsp,%rbp,1),%edi
call   1030 <Functionstoinost@plt>
movzbl 0xa(%rsp,%rbp,1),%eax
movzbl 0xb(%rsp,%rbp,1),%ecx
mov    %cl,0xa(%rsp,%rbp,1)
mov    %al,0xb(%rsp,%rbp,1)
mov    %rbx,%rbp
cmp    %rbx,%r15
jne    1170 <main+0x40>
add    $0x1,%r14d
add    $0xffffffffffffffff,%r15
cmp    $0xe,%r14d
jne    1160 <main+0x30>
movsbl 0xa(%rsp),%esi
lea    0xe49(%rip),%rbx
mov    %rbx,%rdi
call   1040 <printf@plt>
movsbl 0xb(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
movsbl 0xc(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
movsbl 0xd(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
movsbl 0xe(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
movsbl 0xf(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
movsbl 0x10(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
movsbl 0x11(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
movsbl 0x12(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
movsbl 0x13(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
movsbl 0x14(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
movsbl 0x15(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
movsbl 0x16(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
movsbl 0x17(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

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