#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*/ sort_and_bench(int *, int, char *, char *);
void process(int *array, int count) {
  sort_and_bench(array, count, "hoare", "asc");
  sort_and_bench(array, count, "hoare", "desc");
  sort_and_bench(array, count, "hoare", "random");
  sort_and_bench(array, count, "shell", "asc");
  sort_and_bench(array, count, "shell", "desc");
  sort_and_bench(array, count, "shell", "random");
  return;
}


x86 assembly (clang, -O0):
<process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdx
lea    0xed2(%rip),%rcx
call   1030 <sort_and_bench@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xeb9(%rip),%rdx
lea    0xebc(%rip),%rcx
call   1030 <sort_and_bench@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xe9f(%rip),%rdx
lea    0xea7(%rip),%rcx
call   1030 <sort_and_bench@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xe9b(%rip),%rdx
lea    0xe84(%rip),%rcx
call   1030 <sort_and_bench@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xe81(%rip),%rdx
lea    0xe6e(%rip),%rcx
call   1030 <sort_and_bench@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xe67(%rip),%rdx
lea    0xe59(%rip),%rcx
call   1030 <sort_and_bench@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xed9(%rip),%r14
lea    0xed8(%rip),%r15
mov    %r14,%rdx
mov    %r15,%rcx
call   1030 <sort_and_bench@plt>
lea    0xeca(%rip),%r12
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %r12,%rcx
call   1030 <sort_and_bench@plt>
lea    0xeb8(%rip),%r13
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %r13,%rcx
call   1030 <sort_and_bench@plt>
lea    0xea8(%rip),%r14
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %r15,%rcx
call   1030 <sort_and_bench@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %r12,%rcx
call   1030 <sort_and_bench@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %r13,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <sort_and_bench@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"hoare\00"
@.str.1 = [4 x i8] c"asc\00"
@.str.2 = [5 x i8] c"desc\00"
@.str.3 = [7 x i8] c"random\00"
@.str.4 = [6 x i8] c"shell\00"
define void @process(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = call i32 @sort_and_bench(i32* %5, i32 %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32*, i32** %3
%9 = load i32, i32* %4
%10 = call i32 @sort_and_bench(i32* %8, i32 %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%11 = load i32*, i32** %3
%12 = load i32, i32* %4
%13 = call i32 @sort_and_bench(i32* %11, i32 %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%14 = load i32*, i32** %3
%15 = load i32, i32* %4
%16 = call i32 @sort_and_bench(i32* %14, i32 %15, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%17 = load i32*, i32** %3
%18 = load i32, i32* %4
%19 = call i32 @sort_and_bench(i32* %17, i32 %18, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%20 = load i32*, i32** %3
%21 = load i32, i32* %4
%22 = call i32 @sort_and_bench(i32* %20, i32 %21, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"hoare\00"
@.str.1 = [4 x i8] c"asc\00"
@.str.2 = [5 x i8] c"desc\00"
@.str.3 = [7 x i8] c"random\00"
@.str.4 = [6 x i8] c"shell\00"
define void @process(i32* %0, i32 %1) {
%3 = tail call i32 @sort_and_bench(i32* %0, i32 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @sort_and_bench(i32* %0, i32 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @sort_and_bench(i32* %0, i32 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @sort_and_bench(i32* %0, i32 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @sort_and_bench(i32* %0, i32 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @sort_and_bench(i32* %0, i32 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
ret void
}