#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*/ insSortHome(int *, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
int main() {
  int arr[11] = {32, 99, 56, 10, 12, 9, 11, 2, 1, 6, 8};
  system("clear");
  printf("\n\n\t\t\t     * * *  Welcome  * * * \n");
  printf("\n\n\t\t\t  * * *  Insertion Sort  * * * \n");
  display(arr, 0, 11);
  insSortHome(arr, 11);
  display(arr, 0, 11);
  printf("\n");
  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   1060 <memcpy@plt>
lea    0xeb1(%rip),%rdi
call   1040 <system@plt>
lea    0xeab(%rip),%rdi
call   1050 <printf@plt>
lea    0xec1(%rip),%rdi
call   1050 <printf@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0xb,%edx
call   1030 <display@plt>
lea    -0x30(%rbp),%rdi
mov    $0xb,%esi
call   1070 <insSortHome@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0xb,%edx
call   1030 <display@plt>
lea    0xe85(%rip),%rdi
call   1050 <printf@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   1040 <puts@plt>
lea    0xebc(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xb,%edx
call   1050 <display@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
call   1070 <insSortHome@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xb,%edx
call   1050 <display@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.arr = [11 x i32] [i32 32, i32 99, 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 = [34 x i8] c"\0A\0A\09\09\09 * * * Welcome * * * \0A\00"
@.str.2 = [38 x i8] c"\0A\0A\09\09\09 * * * Insertion Sort * * * \0A\00"
@.str.3 = [2 x i8] c"\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 ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 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 @insSortHome(i32* %9, i32 11)
%11 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 0
%12 = call i32 @display(i32* %11, i32 0, i32 11)
%13 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [11 x i32] [i32 32, i32 99, 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 = [33 x i8] c"\0A\0A\09\09\09 * * * Welcome * * * \00"
@str.4 = [37 x i8] c"\0A\0A\09\09\09 * * * Insertion Sort * * * \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 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.4, 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 @insSortHome(i32* %6, i32 11)
%9 = call i32 @display(i32* %6, i32 0, i32 11)
%10 = call i32 @putchar(i32 10)
ret i32 0
}