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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xe8d(%rip),%rsi
mov    $0x28,%edx
call   1070 <memcpy@plt>
mov    $0x0,%al
call   1030 <clrscr@plt>
lea    0xe9d(%rip),%rdi
call   1060 <printf@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <display@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <qSort@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <display@plt>
mov    $0x0,%al
call   1080 <getch@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0xec4(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xea8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe8c(%rip),%xmm0
movaps %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <clrscr@plt>
lea    0xea2(%rip),%rdi
call   1060 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <display@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <qSort@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <display@plt>
xor    %eax,%eax
call   1070 <getch@plt>
add    $0x30,%rsp
pop    %rbx
ret

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

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