#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*/ display(int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ qSort(int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ system(char *);
int main() {
  int arr[11] = {32, 34, 56, 10, 12, 9, 11, 2, 1, 6, 8};
  system("clear");
  printf("\n\n\t\t\t  * * *  Welcome  * * * ");
  printf("\n\t\t\t* * * ORIGINAL Array * * *\n");
  display(arr, 0, 11);
  qSort(arr, 0, 11 - 1);
  printf("\n\n\t\t\t* * * FINAL Array * * *\n");
  display(arr, 0, 11);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xe96(%rip),%rsi
mov    $0x2c,%edx
call   1070 <memcpy@plt>
lea    0xeb1(%rip),%rdi
call   1050 <system@plt>
lea    0xeab(%rip),%rdi
call   1060 <printf@plt>
lea    0xebd(%rip),%rdi
call   1060 <printf@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0xb,%edx
call   1040 <display@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1030 <qSort@plt>
lea    0xeb1(%rip),%rdi
call   1060 <printf@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0xb,%edx
call   1040 <display@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
movups 0xec0(%rip),%xmm0
movups %xmm0,0x1c(%rsp)
movaps 0xea8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe8c(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xead(%rip),%rdi
call   1060 <system@plt>
lea    0xea7(%rip),%rdi
call   1070 <printf@plt>
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xb,%edx
call   1050 <display@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <qSort@plt>
lea    0xeab(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xb,%edx
call   1050 <display@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.arr = [11 x i32] [i32 32, i32 34, i32 56, i32 10, i32 12, i32 9, i32 11, i32 2, i32 1, i32 6, i32 8]
@.str = [6 x i8] c"clear\00"
@.str.1 = [30 x i8] c"\0A\0A\09\09\09 * * * Welcome * * * \00"
@.str.2 = [32 x i8] c"\0A\09\09\09* * * ORIGINAL Array * * *\0A\00"
@.str.3 = [30 x i8] c"\0A\0A\09\09\09* * * FINAL Array * * *\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [11 x i32]
store i32 0, i32* %1
%3 = bitcast [11 x i32]* %2 to i8*
%4 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%7 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 0
%8 = call i32 @display(i32* %7, i32 0, i32 11)
%9 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 0
%10 = call i32 @qSort(i32* %9, i32 0, i32 10)
%11 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%12 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 0
%13 = call i32 @display(i32* %12, i32 0, i32 11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [11 x i32] [i32 32, i32 34, i32 56, i32 10, i32 12, i32 9, i32 11, i32 2, i32 1, i32 6, i32 8]
@.str = [6 x i8] c"clear\00"
@.str.1 = [30 x i8] c"\0A\0A\09\09\09 * * * Welcome * * * \00"
@str = [31 x i8] c"\0A\09\09\09* * * ORIGINAL Array * * *\00"
@str.4 = [29 x i8] c"\0A\0A\09\09\09* * * FINAL Array * * *\00"
define i32 @main() {
%1 = alloca [11 x i32]
%2 = bitcast [11 x i32]* %1 to i8*
%3 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%6 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 0
%7 = call i32 @display(i32* %6, i32 0, i32 11)
%8 = call i32 @qSort(i32* %6, i32 0, i32 10)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.4, i64 0, i64 0))
%10 = call i32 @display(i32* %6, i32 0, i32 11)
ret i32 0
}