#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 Array_binary_search(int *, int, int);
int /*<<< orphan*/ Array_bubble_sort(int *, int);
int /*<<< orphan*/ Array_delete(int *, int, int);
int /*<<< orphan*/ Array_insert(int *, int, int, int);
int Array_linear_search(int *, int, int);
int /*<<< orphan*/ Array_print(int *, int);
int /*<<< orphan*/ Array_quick_sort(int *, int);
int /*<<< orphan*/ Array_selection_sort(int *, int);
int Array_sorted(int *, int, int);
int /*<<< orphan*/ printf(char *, int, ...);
void main() {
  int arr[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  printf("%d is at position:%d\n", (8), Array_linear_search((arr), (10), (8)));
  printf("%d is at position:%d\n", (18),
         Array_linear_search((arr), (10), (18)));
  Array_print(arr, 10);
  Array_insert(arr, 10, 2, 2);
  Array_print(arr, 10);
  Array_delete(arr, 10, 4);
  Array_print(arr, 10);
  int arr1[4] = {0, 1, 2, 3};
  printf("Is array sorted:%d\n", Array_sorted(arr1, 4, 100));
  int arr2[4] = {0, 0, 1, 1};
  printf("Is array sorted:%d\n", Array_sorted(arr2, 4, 100));
  int arr3[4] = {0, 1, 3, 2};
  printf("Is array sorted:%d\n", Array_sorted(arr3, 4, 100));
  int arr4[1] = {0};
  printf("Is array sorted:%d\n", Array_sorted(arr4, 1, 101));
  int arr5[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  printf("%d is at position:%d\n", (2), Array_binary_search((arr5), (10), (2)));
  printf("%d is at position:%d\n", (9), Array_binary_search((arr5), (10), (9)));
  printf("%d is at position:%d\n", (5), Array_binary_search((arr5), (10), (5)));
  printf("%d is at position:%d\n", (-2),
         Array_binary_search((arr5), (10), (-2)));
  printf("%d is at position:%d\n", (20),
         Array_binary_search((arr5), (10), (20)));
  int arr6[1] = {1};
  printf("%d is at position:%d\n", (2), Array_binary_search((arr6), (1), (2)));
  printf("%d is at position:%d\n", (1), Array_binary_search((arr6), (1), (1)));
  printf("%d is at position:%d\n", (-2),
         Array_binary_search((arr6), (1), (-2)));
  int arr7[10] = {88, 12, 43, 17, 68, 37, 97, 50, 31, 73};
  Array_print(arr7, 10);
  Array_bubble_sort(arr7, 10);
  Array_print(arr7, 10);
  printf("Is array sorted:%d\n", Array_sorted(arr7, 10, 100));
  int arr8[20] = {876, 603, 307, 197, 517, 701, 854, 636, 469, 298,
                  436, 158, 434, 807, 888, 709, 262, 39,  450, 836};
  Array_print(arr8, 20);
  Array_quick_sort(arr8, 20);
  Array_print(arr8, 20);
  printf("Is array sorted:%d\n", Array_sorted(arr8, 20, 100));
  int arr9[15] = {1781, 171, 127,  45,  780, 1120, 238, 535,
                  1482, 30,  1786, 555, 231, 1672, 485};
  Array_print(arr9, 15);
  Array_selection_sort(arr9, 15);
  Array_print(arr9, 15);
  printf("Is array sorted:%d\n", Array_sorted(arr9, 15, 100));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
lea    -0x30(%rbp),%rdi
lea    0xe2a(%rip),%rsi
mov    $0x28,%edx
call   10a0 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
mov    $0x8,%edx
call   1070 <Array_linear_search@plt>
mov    %eax,%edx
lea    0xf20(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
mov    $0x12,%edx
call   1070 <Array_linear_search@plt>
mov    %eax,%edx
lea    0xef8(%rip),%rdi
mov    $0x12,%esi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   10c0 <Array_print@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
mov    $0x2,%ecx
mov    %ecx,%edx
call   10d0 <Array_insert@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   10c0 <Array_print@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
mov    $0x4,%edx
call   10e0 <Array_delete@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   10c0 <Array_print@plt>
mov    0xec7(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    -0x40(%rbp),%rdi
mov    $0x4,%esi
mov    $0x64,%edx
call   10b0 <Array_sorted@plt>
mov    %eax,%esi
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0xe9e(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xe9b(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    -0x50(%rbp),%rdi
mov    $0x4,%esi
mov    $0x64,%edx
call   10b0 <Array_sorted@plt>
mov    %eax,%esi
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0xe75(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xe72(%rip),%rax
mov    %rax,-0x58(%rbp)
lea    -0x60(%rbp),%rdi
mov    $0x4,%esi
mov    $0x64,%edx
call   10b0 <Array_sorted@plt>
mov    %eax,%esi
lea    0xe0c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x64(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1060 <memset@plt>
lea    -0x64(%rbp),%rdi
mov    $0x1,%esi
mov    $0x65,%edx
call   10b0 <Array_sorted@plt>
mov    %eax,%esi
lea    0xdd9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x90(%rbp),%rdi
lea    0xcc2(%rip),%rsi
mov    $0x28,%edx
call   10a0 <memcpy@plt>
lea    -0x90(%rbp),%rdi
mov    $0xa,%esi
mov    $0x2,%edx
call   1030 <Array_binary_search@plt>
mov    %eax,%edx
lea    0xd85(%rip),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x90(%rbp),%rdi
mov    $0xa,%esi
mov    $0x9,%edx
call   1030 <Array_binary_search@plt>
mov    %eax,%edx
lea    0xd5a(%rip),%rdi
mov    $0x9,%esi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x90(%rbp),%rdi
mov    $0xa,%esi
mov    $0x5,%edx
call   1030 <Array_binary_search@plt>
mov    %eax,%edx
lea    0xd2f(%rip),%rdi
mov    $0x5,%esi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x90(%rbp),%rdi
mov    $0xa,%esi
mov    $0xfffffffe,%edx
call   1030 <Array_binary_search@plt>
mov    %eax,%edx
lea    0xd04(%rip),%rdi
mov    $0xfffffffe,%esi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x90(%rbp),%rdi
mov    $0xa,%esi
mov    $0x14,%edx
call   1030 <Array_binary_search@plt>
mov    %eax,%edx
lea    0xcd9(%rip),%rdi
mov    $0x14,%esi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0xd2b(%rip),%eax
mov    %eax,-0x94(%rbp)
lea    -0x94(%rbp),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <Array_binary_search@plt>
mov    %eax,%edx
lea    0xca2(%rip),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x94(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <Array_binary_search@plt>
mov    %eax,%edx
lea    0xc7a(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x94(%rbp),%rdi
mov    $0x1,%esi
mov    $0xfffffffe,%edx
call   1030 <Array_binary_search@plt>
mov    %eax,%edx
lea    0xc4f(%rip),%rdi
mov    $0xfffffffe,%esi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0xc0(%rbp),%rdi
lea    0xb79(%rip),%rsi
mov    $0x28,%edx
call   10a0 <memcpy@plt>
lea    -0xc0(%rbp),%rdi
mov    $0xa,%esi
call   10c0 <Array_print@plt>
lea    -0xc0(%rbp),%rdi
mov    $0xa,%esi
call   1090 <Array_bubble_sort@plt>
lea    -0xc0(%rbp),%rdi
mov    $0xa,%esi
call   10c0 <Array_print@plt>
lea    -0xc0(%rbp),%rdi
mov    $0xa,%esi
mov    $0x64,%edx
call   10b0 <Array_sorted@plt>
mov    %eax,%esi
lea    0xbef(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x110(%rbp),%rdi
lea    0xb38(%rip),%rsi
mov    $0x50,%edx
call   10a0 <memcpy@plt>
lea    -0x110(%rbp),%rdi
mov    $0x14,%esi
call   10c0 <Array_print@plt>
lea    -0x110(%rbp),%rdi
mov    $0x14,%esi
call   1040 <Array_quick_sort@plt>
lea    -0x110(%rbp),%rdi
mov    $0x14,%esi
call   10c0 <Array_print@plt>
lea    -0x110(%rbp),%rdi
mov    $0x14,%esi
mov    $0x64,%edx
call   10b0 <Array_sorted@plt>
mov    %eax,%esi
lea    0xb7e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x150(%rbp),%rdi
lea    0xb17(%rip),%rsi
mov    $0x3c,%edx
call   10a0 <memcpy@plt>
lea    -0x150(%rbp),%rdi
mov    $0xf,%esi
call   10c0 <Array_print@plt>
lea    -0x150(%rbp),%rdi
mov    $0xf,%esi
call   1080 <Array_selection_sort@plt>
lea    -0x150(%rbp),%rdi
mov    $0xf,%esi
call   10c0 <Array_print@plt>
lea    -0x150(%rbp),%rdi
mov    $0xf,%esi
mov    $0x64,%edx
call   10b0 <Array_sorted@plt>
mov    %eax,%esi
lea    0xb0d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x168,%rsp
mov    0xecb(%rip),%r12
mov    %r12,0xc0(%rsp)
movaps 0xeac(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xe8d(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
lea    0xa0(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x8,%edx
call   1060 <Array_linear_search@plt>
lea    0xe04(%rip),%r15
mov    %r15,%rdi
mov    $0x8,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x12,%edx
call   1060 <Array_linear_search@plt>
mov    %r15,%rdi
mov    $0x12,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   10a0 <Array_print@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x2,%edx
mov    $0x2,%ecx
call   10b0 <Array_insert@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   10a0 <Array_print@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x4,%edx
call   10c0 <Array_delete@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   10a0 <Array_print@plt>
movaps 0xda9(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
lea    0x30(%rsp),%rdi
mov    $0x4,%esi
mov    $0x64,%edx
call   1090 <Array_sorted@plt>
lea    0xd6f(%rip),%r14
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
movaps 0xd86(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
lea    0x20(%rsp),%rdi
mov    $0x4,%esi
mov    $0x64,%edx
call   1090 <Array_sorted@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
movaps 0xd6a(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x10(%rsp),%rdi
mov    $0x4,%esi
mov    $0x64,%edx
call   1090 <Array_sorted@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
movl   $0x0,0xc(%rsp)
lea    0xc(%rsp),%rdi
mov    $0x1,%esi
mov    $0x65,%edx
call   1090 <Array_sorted@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r12,0x90(%rsp)
movaps 0xd2e(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xd0f(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
lea    0x70(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x2,%edx
call   1030 <Array_binary_search@plt>
mov    %r15,%rdi
mov    $0x2,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x9,%edx
call   1030 <Array_binary_search@plt>
mov    %r15,%rdi
mov    $0x9,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x5,%edx
call   1030 <Array_binary_search@plt>
mov    %r15,%rdi
mov    $0x5,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0xfffffffe,%edx
call   1030 <Array_binary_search@plt>
mov    %r15,%rdi
mov    $0xfffffffe,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x14,%edx
call   1030 <Array_binary_search@plt>
mov    %r15,%rdi
mov    $0x14,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
movl   $0x1,0x8(%rsp)
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <Array_binary_search@plt>
mov    %r15,%rdi
mov    $0x2,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <Array_binary_search@plt>
mov    %r15,%rdi
mov    $0x1,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0xfffffffe,%edx
call   1030 <Array_binary_search@plt>
mov    %r15,%rdi
mov    $0xfffffffe,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc29(%rip),%rax
mov    %rax,0x60(%rsp)
movaps 0xc0d(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xbf1(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   10a0 <Array_print@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1080 <Array_bubble_sort@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   10a0 <Array_print@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x64,%edx
call   1090 <Array_sorted@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
movaps 0xc0b(%rip),%xmm0
movaps %xmm0,0x150(%rsp)
movaps 0xbec(%rip),%xmm0
movaps %xmm0,0x140(%rsp)
movaps 0xbcd(%rip),%xmm0
movaps %xmm0,0x130(%rsp)
movaps 0xbae(%rip),%xmm0
movaps %xmm0,0x120(%rsp)
movaps 0xb8f(%rip),%xmm0
movaps %xmm0,0x110(%rsp)
lea    0x110(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x14,%esi
call   10a0 <Array_print@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
call   1040 <Array_quick_sort@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
call   10a0 <Array_print@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
mov    $0x64,%edx
call   1090 <Array_sorted@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
movups 0xbaf(%rip),%xmm0
movups %xmm0,0xfc(%rsp)
movaps 0xb94(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xb75(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xb56(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
lea    0xd0(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xf,%esi
call   10a0 <Array_print@plt>
mov    %rbx,%rdi
mov    $0xf,%esi
call   1070 <Array_selection_sort@plt>
mov    %rbx,%rdi
mov    $0xf,%esi
call   10a0 <Array_print@plt>
mov    %rbx,%rdi
mov    $0xf,%esi
mov    $0x64,%edx
call   1090 <Array_sorted@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x168,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.arr = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
@.str = [22 x i8] c"%d is at position:%d\0A\00"
@__const.main.arr1 = [4 x i32] [i32 0, i32 1, i32 2, i32 3]
@.str.1 = [20 x i8] c"Is array sorted:%d\0A\00"
@__const.main.arr2 = [4 x i32] [i32 0, i32 0, i32 1, i32 1]
@__const.main.arr3 = [4 x i32] [i32 0, i32 1, i32 3, i32 2]
@__const.main.arr5 = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
@__const.main.arr6 = [1 x i32] [i32 1]
@__const.main.arr7 = [10 x i32] [i32 88, i32 12, i32 43, i32 17, i32 68, i32 37, i32 97, i32 50, i32 31, i32 73]
@__const.main.arr8 = [20 x i32] [i32 876, i32 603, i32 307, i32 197, i32 517, i32 701, i32 854, i32 636, i32 469, i32 298, i32 436, i32 158, i32 434, i32 807, i32 888, i32 709, i32 262, i32 39, i32 450, i32 836]
@__const.main.arr9 = [15 x i32] [i32 1781, i32 171, i32 127, i32 45, i32 780, i32 1120, i32 238, i32 535, i32 1482, i32 30, i32 1786, i32 555, i32 231, i32 1672, i32 485]
define void @main() {
%1 = alloca [10 x i32]
%2 = alloca [4 x i32]
%3 = alloca [4 x i32]
%4 = alloca [4 x i32]
%5 = alloca [1 x i32]
%6 = alloca [10 x i32]
%7 = alloca [1 x i32]
%8 = alloca [10 x i32]
%9 = alloca [20 x i32]
%10 = alloca [15 x i32]
%11 = bitcast [10 x i32]* %1 to i8*
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%13 = call i32 @Array_linear_search(i32* %12, i32 10, i32 8)
%14 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 8, i32 %13)
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%16 = call i32 @Array_linear_search(i32* %15, i32 10, i32 18)
%17 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 18, i32 %16)
%18 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%19 = call i32 @Array_print(i32* %18, i32 10)
%20 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%21 = call i32 @Array_insert(i32* %20, i32 10, i32 2, i32 2)
%22 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%23 = call i32 @Array_print(i32* %22, i32 10)
%24 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%25 = call i32 @Array_delete(i32* %24, i32 10, i32 4)
%26 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%27 = call i32 @Array_print(i32* %26, i32 10)
%28 = bitcast [4 x i32]* %2 to i8*
%29 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%30 = call i32 @Array_sorted(i32* %29, i32 4, i32 100)
%31 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %30)
%32 = bitcast [4 x i32]* %3 to i8*
%33 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%34 = call i32 @Array_sorted(i32* %33, i32 4, i32 100)
%35 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %34)
%36 = bitcast [4 x i32]* %4 to i8*
%37 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 0
%38 = call i32 @Array_sorted(i32* %37, i32 4, i32 100)
%39 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %38)
%40 = bitcast [1 x i32]* %5 to i8*
%41 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%42 = call i32 @Array_sorted(i32* %41, i32 1, i32 101)
%43 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %42)
%44 = bitcast [10 x i32]* %6 to i8*
%45 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%46 = call i32 @Array_binary_search(i32* %45, i32 10, i32 2)
%47 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 2, i32 %46)
%48 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%49 = call i32 @Array_binary_search(i32* %48, i32 10, i32 9)
%50 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 9, i32 %49)
%51 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%52 = call i32 @Array_binary_search(i32* %51, i32 10, i32 5)
%53 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 5, i32 %52)
%54 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%55 = call i32 @Array_binary_search(i32* %54, i32 10, i32 -2)
%56 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 -2, i32 %55)
%57 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%58 = call i32 @Array_binary_search(i32* %57, i32 10, i32 20)
%59 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 20, i32 %58)
%60 = bitcast [1 x i32]* %7 to i8*
%61 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 0
%62 = call i32 @Array_binary_search(i32* %61, i32 1, i32 2)
%63 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 2, i32 %62)
%64 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 0
%65 = call i32 @Array_binary_search(i32* %64, i32 1, i32 1)
%66 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 1, i32 %65)
%67 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 0
%68 = call i32 @Array_binary_search(i32* %67, i32 1, i32 -2)
%69 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 -2, i32 %68)
%70 = bitcast [10 x i32]* %8 to i8*
%71 = getelementptr inbounds [10 x i32], [10 x i32]* %8, i64 0, i64 0
%72 = call i32 @Array_print(i32* %71, i32 10)
%73 = getelementptr inbounds [10 x i32], [10 x i32]* %8, i64 0, i64 0
%74 = call i32 @Array_bubble_sort(i32* %73, i32 10)
%75 = getelementptr inbounds [10 x i32], [10 x i32]* %8, i64 0, i64 0
%76 = call i32 @Array_print(i32* %75, i32 10)
%77 = getelementptr inbounds [10 x i32], [10 x i32]* %8, i64 0, i64 0
%78 = call i32 @Array_sorted(i32* %77, i32 10, i32 100)
%79 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %78)
%80 = bitcast [20 x i32]* %9 to i8*
%81 = getelementptr inbounds [20 x i32], [20 x i32]* %9, i64 0, i64 0
%82 = call i32 @Array_print(i32* %81, i32 20)
%83 = getelementptr inbounds [20 x i32], [20 x i32]* %9, i64 0, i64 0
%84 = call i32 @Array_quick_sort(i32* %83, i32 20)
%85 = getelementptr inbounds [20 x i32], [20 x i32]* %9, i64 0, i64 0
%86 = call i32 @Array_print(i32* %85, i32 20)
%87 = getelementptr inbounds [20 x i32], [20 x i32]* %9, i64 0, i64 0
%88 = call i32 @Array_sorted(i32* %87, i32 20, i32 100)
%89 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %88)
%90 = bitcast [15 x i32]* %10 to i8*
%91 = getelementptr inbounds [15 x i32], [15 x i32]* %10, i64 0, i64 0
%92 = call i32 @Array_print(i32* %91, i32 15)
%93 = getelementptr inbounds [15 x i32], [15 x i32]* %10, i64 0, i64 0
%94 = call i32 @Array_selection_sort(i32* %93, i32 15)
%95 = getelementptr inbounds [15 x i32], [15 x i32]* %10, i64 0, i64 0
%96 = call i32 @Array_print(i32* %95, i32 15)
%97 = getelementptr inbounds [15 x i32], [15 x i32]* %10, i64 0, i64 0
%98 = call i32 @Array_sorted(i32* %97, i32 15, i32 100)
%99 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %98)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"%d is at position:%d\0A\00"
@__const.main.arr1 = [4 x i32] [i32 0, i32 1, i32 2, i32 3]
@.str.1 = [20 x i8] c"Is array sorted:%d\0A\00"
@__const.main.arr2 = [4 x i32] [i32 0, i32 0, i32 1, i32 1]
@__const.main.arr3 = [4 x i32] [i32 0, i32 1, i32 3, i32 2]
@__const.main.arr5 = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
@__const.main.arr7 = [10 x i32] [i32 88, i32 12, i32 43, i32 17, i32 68, i32 37, i32 97, i32 50, i32 31, i32 73]
@__const.main.arr8 = [20 x i32] [i32 876, i32 603, i32 307, i32 197, i32 517, i32 701, i32 854, i32 636, i32 469, i32 298, i32 436, i32 158, i32 434, i32 807, i32 888, i32 709, i32 262, i32 39, i32 450, i32 836]
@__const.main.arr9 = [15 x i32] [i32 1781, i32 171, i32 127, i32 45, i32 780, i32 1120, i32 238, i32 535, i32 1482, i32 30, i32 1786, i32 555, i32 231, i32 1672, i32 485]
define void @main() {
%1 = alloca [10 x i32]
%2 = alloca [4 x i32]
%3 = alloca [4 x i32]
%4 = alloca [4 x i32]
%5 = alloca [1 x i32]
%6 = alloca [10 x i32]
%7 = alloca [1 x i32]
%8 = alloca [10 x i32]
%9 = alloca [20 x i32]
%10 = alloca [15 x i32]
%11 = bitcast [10 x i32]* %1 to i8*
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%13 = call i32 @Array_linear_search(i32* %12, i32 10, i32 8)
%14 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 8, i32 %13)
%15 = call i32 @Array_linear_search(i32* %12, i32 10, i32 18)
%16 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 18, i32 %15)
%17 = call i32 @Array_print(i32* %12, i32 10)
%18 = call i32 @Array_insert(i32* %12, i32 10, i32 2, i32 2)
%19 = call i32 @Array_print(i32* %12, i32 10)
%20 = call i32 @Array_delete(i32* %12, i32 10, i32 4)
%21 = call i32 @Array_print(i32* %12, i32 10)
%22 = bitcast [4 x i32]* %2 to i8*
%23 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%24 = call i32 @Array_sorted(i32* %23, i32 4, i32 100)
%25 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %24)
%26 = bitcast [4 x i32]* %3 to i8*
%27 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%28 = call i32 @Array_sorted(i32* %27, i32 4, i32 100)
%29 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %28)
%30 = bitcast [4 x i32]* %4 to i8*
%31 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 0
%32 = call i32 @Array_sorted(i32* %31, i32 4, i32 100)
%33 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %32)
%34 = bitcast [1 x i32]* %5 to i8*
%35 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
store i32 0, i32* %35
%36 = call i32 @Array_sorted(i32* %35, i32 1, i32 101)
%37 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %36)
%38 = bitcast [10 x i32]* %6 to i8*
%39 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%40 = call i32 @Array_binary_search(i32* %39, i32 10, i32 2)
%41 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 2, i32 %40)
%42 = call i32 @Array_binary_search(i32* %39, i32 10, i32 9)
%43 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 9, i32 %42)
%44 = call i32 @Array_binary_search(i32* %39, i32 10, i32 5)
%45 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 5, i32 %44)
%46 = call i32 @Array_binary_search(i32* %39, i32 10, i32 -2)
%47 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 -2, i32 %46)
%48 = call i32 @Array_binary_search(i32* %39, i32 10, i32 20)
%49 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 20, i32 %48)
%50 = bitcast [1 x i32]* %7 to i8*
%51 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 0
store i32 1, i32* %51
%52 = call i32 @Array_binary_search(i32* %51, i32 1, i32 2)
%53 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 2, i32 %52)
%54 = call i32 @Array_binary_search(i32* %51, i32 1, i32 1)
%55 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 1, i32 %54)
%56 = call i32 @Array_binary_search(i32* %51, i32 1, i32 -2)
%57 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 -2, i32 %56)
%58 = bitcast [10 x i32]* %8 to i8*
%59 = getelementptr inbounds [10 x i32], [10 x i32]* %8, i64 0, i64 0
%60 = call i32 @Array_print(i32* %59, i32 10)
%61 = call i32 @Array_bubble_sort(i32* %59, i32 10)
%62 = call i32 @Array_print(i32* %59, i32 10)
%63 = call i32 @Array_sorted(i32* %59, i32 10, i32 100)
%64 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %63)
%65 = bitcast [20 x i32]* %9 to i8*
%66 = getelementptr inbounds [20 x i32], [20 x i32]* %9, i64 0, i64 0
%67 = call i32 @Array_print(i32* %66, i32 20)
%68 = call i32 @Array_quick_sort(i32* %66, i32 20)
%69 = call i32 @Array_print(i32* %66, i32 20)
%70 = call i32 @Array_sorted(i32* %66, i32 20, i32 100)
%71 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %70)
%72 = bitcast [15 x i32]* %10 to i8*
%73 = getelementptr inbounds [15 x i32], [15 x i32]* %10, i64 0, i64 0
%74 = call i32 @Array_print(i32* %73, i32 15)
%75 = call i32 @Array_selection_sort(i32* %73, i32 15)
%76 = call i32 @Array_print(i32* %73, i32 15)
%77 = call i32 @Array_sorted(i32* %73, i32 15, i32 100)
%78 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %77)
ret void
}