#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 main() {
  int arr[11] = {94, 54, 67, 76, 32, 23, 8, 65, 90, 8, 6};
  int i, j;
  for (i = 0; i < 10; i++) {
    for (j = i + 1; j < 11; j++) {
      if (arr[i] > arr[j]) {
        int tmp = arr[i];
        arr[i] = arr[j];
        arr[j] = tmp;
      }
    }
  }
  for (i = 0; i < 11; i++) {
    printf("%d\n", arr[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x2c,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0xa,-0x34(%rbp)
jge    11ca <main+0xaa>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
cmpl   $0xb,-0x38(%rbp)
jge    11b7 <main+0x97>
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
movslq -0x38(%rbp),%rcx
cmp    -0x30(%rbp,%rcx,4),%eax
jle    11a4 <main+0x84>
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
mov    %eax,-0x3c(%rbp)
movslq -0x38(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%ecx
movslq -0x34(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x3c(%rbp),%ecx
movslq -0x38(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
jmp    11a9 <main+0x89>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    115e <main+0x3e>
jmp    11bc <main+0x9c>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    114b <main+0x2b>
movl   $0x0,-0x34(%rbp)
cmpl   $0xb,-0x34(%rbp)
jge    11fd <main+0xdd>
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
lea    0xe42(%rip),%rdi
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11d1 <main+0xb1>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
movups 0xf00(%rip),%xmm0
movups %xmm0,0x1c(%rsp)
movaps 0xee8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecc(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    $0x1,%eax
xor    %ecx,%ecx
jmp    115a <main+0x4a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rax
cmp    $0xa,%rcx
je     118c <main+0x7c>
mov    %rcx,%rdx
add    $0x1,%rcx
mov    %rax,%rsi
jmp    117a <main+0x6a>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rsi
cmp    $0xb,%rsi
je     1150 <main+0x40>
mov    (%rsp,%rdx,4),%edi
mov    (%rsp,%rsi,4),%ebx
cmp    %ebx,%edi
jle    1170 <main+0x60>
mov    %ebx,(%rsp,%rdx,4)
mov    %edi,(%rsp,%rsi,4)
jmp    1170 <main+0x60>
mov    (%rsp),%esi
lea    0xe96(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x8(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x10(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x14(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x18(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x1c(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x20(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x24(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x28(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@__const.main.arr = [11 x i32] [i32 94, i32 54, i32 67, i32 76, i32 32, i32 23, i32 8, i32 65, i32 90, i32 8, i32 6]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [11 x i32]
%2 = bitcast [11 x i32]* %1 to i8*
br label %40
3: ; preds = %52
%4 = add nuw nsw i64 %42, 1
%5 = icmp eq i64 %43, 10
br i1 %5, label %6, label %40
6: ; preds = %3
%7 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 0
%8 = load i32, i32* %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 1
%11 = load i32, i32* %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 2
%14 = load i32, i32* %13
%15 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 3
%17 = load i32, i32* %16
%18 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 4
%20 = load i32, i32* %19
%21 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 5
%23 = load i32, i32* %22
%24 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %23)
%25 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 6
%26 = load i32, i32* %25
%27 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %26)
%28 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 7
%29 = load i32, i32* %28
%30 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %29)
%31 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 8
%32 = load i32, i32* %31
%33 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %32)
%34 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 9
%35 = load i32, i32* %34
%36 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %35)
%37 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 10
%38 = load i32, i32* %37
%39 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %38)
ret i32 0
40: ; preds = %3, %0
%41 = phi i64 [ 0, %0 ], [ %43, %3 ]
%42 = phi i64 [ 1, %0 ], [ %4, %3 ]
%43 = add nuw nsw i64 %41, 1
%44 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 %41
br label %45
45: ; preds = %40, %52
%46 = phi i64 [ %42, %40 ], [ %53, %52 ]
%47 = load i32, i32* %44
%48 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 %46
%49 = load i32, i32* %48
%50 = icmp sgt i32 %47, %49
br i1 %50, label %51, label %52
51: ; preds = %45
store i32 %49, i32* %44
store i32 %47, i32* %48
br label %52
52: ; preds = %45, %51
%53 = add nuw nsw i64 %46, 1
%54 = icmp eq i64 %53, 11
br i1 %54, label %3, label %45
}