#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*/ bubble_sort(int *, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ free(int *);
int getopt(int, char **, char *);
double gettimeofday_sec();
int /*<<< orphan*/ heap_sort(int *, int);
int /*<<< orphan*/ merge_sort(int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ print_array(int *, int);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ quick_sort(int *, int /*<<< orphan*/, int);
int *read_array(char *, int *, int *);
int /*<<< orphan*/ selection_sort(int *, int);
int /*<<< orphan*/ selection_sort2(int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  int c, length, *num;
  char *fname = "rand.txt";
  double t0;
  enum {
    SELECTION,
    SELECTION2,
    BUBBLE,
    HEAP,
    MERGE,
    QUICK
  } sort_algorithm = SELECTION;
  char *sort_algorithm_str[] = {"SELECTION", "SELECTION2", "BUBBLE",
                                "HEAP",      "MERGE",      "QUICK"};
  while ((c = getopt(argc, argv, "f:s2bhmq")) != -1) {
    switch (c) {
    case 'f':
      fname = argv[1];
      break;
    case 's':
      sort_algorithm = SELECTION;
      break;
    case '2':
      sort_algorithm = SELECTION2;
      break;
    case 'b':
      sort_algorithm = BUBBLE;
      break;
    case 'h':
      sort_algorithm = HEAP;
      break;
    case 'm':
      sort_algorithm = MERGE;
      break;
    case 'q':
      sort_algorithm = QUICK;
      break;
    }
  }
  fprintf(stderr, "reading from %s\n", fname);
  num = read_array(fname, num, &length);
  print_array(num, length);
  fprintf(stderr, "using %s algorithm\n", sort_algorithm_str[sort_algorithm]);
  t0 = gettimeofday_sec();
  switch (sort_algorithm) {
  case SELECTION:
    selection_sort(num, length);
    break;
  case SELECTION2:
    selection_sort2(num, 0, length - 1);
    break;
  case BUBBLE:
    bubble_sort(num, length);
    break;
  case HEAP:
    heap_sort(num, length);
    break;
  case MERGE:
    merge_sort(num, 0, length - 1);
    break;
  case QUICK:
    quick_sort(num, 0, length - 1);
    break;
  }
  printf("%lf[sec]\n", gettimeofday_sec() - t0);
  print_array(num, length);
  free(num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xf20(%rip),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x34(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1090 <memset@plt>
lea    0xf07(%rip),%rax
mov    %rax,-0x70(%rbp)
lea    0xf06(%rip),%rax
mov    %rax,-0x68(%rbp)
lea    0xf06(%rip),%rax
mov    %rax,-0x60(%rbp)
lea    0xf02(%rip),%rax
mov    %rax,-0x58(%rbp)
lea    0xefc(%rip),%rax
mov    %rax,-0x50(%rbp)
lea    0xef7(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xeeb(%rip),%rdx
call   10e0 <getopt@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
je     12fe <main+0x11e>
mov    -0x14(%rbp),%eax
add    $0xffffffce,%eax
mov    %eax,%ecx
mov    %rcx,-0x78(%rbp)
sub    $0x41,%eax
ja     12f9 <main+0x119>
mov    -0x78(%rbp),%rax
lea    0xd7c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x28(%rbp)
jmp    12f9 <main+0x119>
movl   $0x0,-0x34(%rbp)
jmp    12f9 <main+0x119>
movl   $0x1,-0x34(%rbp)
jmp    12f9 <main+0x119>
movl   $0x2,-0x34(%rbp)
jmp    12f9 <main+0x119>
movl   $0x3,-0x34(%rbp)
jmp    12f9 <main+0x119>
movl   $0x4,-0x34(%rbp)
jmp    12f9 <main+0x119>
movl   $0x5,-0x34(%rbp)
jmp    125d <main+0x7d>
mov    0x2cdb(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    (%rax),%edi
mov    -0x28(%rbp),%rdx
lea    0xe46(%rip),%rsi
call   10a0 <fprintf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   10f0 <read_array@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   1070 <print_array@plt>
mov    -0x88(%rbp),%rax
mov    (%rax),%edi
mov    -0x34(%rbp),%eax
mov    -0x70(%rbp,%rax,8),%rdx
lea    0xe19(%rip),%rsi
call   10a0 <fprintf@plt>
xor    %eax,%eax
call   10b0 <gettimeofday_sec@plt>
movsd  %xmm0,-0x30(%rbp)
mov    -0x34(%rbp),%eax
mov    %rax,-0x80(%rbp)
sub    $0x5,%rax
ja     13fd <main+0x21d>
mov    -0x80(%rbp),%rax
lea    0xc7c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   1030 <selection_sort@plt>
jmp    13fd <main+0x21d>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1060 <selection_sort2@plt>
jmp    13fd <main+0x21d>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   1100 <bubble_sort@plt>
jmp    13fd <main+0x21d>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   1050 <heap_sort@plt>
jmp    13fd <main+0x21d>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   10c0 <merge_sort@plt>
jmp    13fd <main+0x21d>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   10d0 <quick_sort@plt>
mov    $0x0,%al
call   10b0 <gettimeofday_sec@plt>
subsd  -0x30(%rbp),%xmm0
lea    0xd74(%rip),%rdi
call   1080 <printf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   1070 <print_array@plt>
mov    -0x20(%rbp),%rdi
call   1040 <free@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rsi,%rbx
mov    %edi,%r13d
lea    0xf3e(%rip),%rax
mov    %rax,0x10(%rsp)
lea    0xf3c(%rip),%rax
mov    %rax,0x18(%rsp)
lea    0xf3b(%rip),%rax
mov    %rax,0x20(%rsp)
lea    0xf36(%rip),%rax
mov    %rax,0x28(%rsp)
lea    0xf2f(%rip),%rax
mov    %rax,0x30(%rsp)
lea    0xf29(%rip),%rax
mov    %rax,0x38(%rsp)
xor    %r12d,%r12d
lea    0xeea(%rip),%r14
lea    0xf19(%rip),%r15
lea    0xdbc(%rip),%rbp
jmp    1250 <main+0x80>
mov    $0x5,%r12d
nopl   0x0(%rax)
mov    %r13d,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
call   10d0 <getopt@plt>
lea    -0x32(%rax),%ecx
cmp    $0x41,%ecx
ja     129b <main+0xcb>
movslq 0x0(%rbp,%rcx,4),%rax
add    %rbp,%rax
jmp    *%rax
mov    $0x1,%r12d
jmp    1250 <main+0x80>
mov    $0x2,%r12d
jmp    1250 <main+0x80>
mov    0x8(%rbx),%r14
jmp    1250 <main+0x80>
mov    $0x3,%r12d
jmp    1250 <main+0x80>
mov    $0x4,%r12d
jmp    1250 <main+0x80>
xor    %r12d,%r12d
jmp    1250 <main+0x80>
cmp    $0xffffffff,%eax
jne    1250 <main+0x80>
mov    0x2d39(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xeae(%rip),%rsi
mov    %r14,%rdx
call   1090 <fprintf@plt>
lea    0x4(%rsp),%rdx
mov    %r14,%rdi
call   10e0 <read_array@plt>
mov    %rax,%rbx
mov    0x4(%rsp),%esi
mov    %rax,%rdi
call   1070 <print_array@plt>
mov    0x0(%rbp),%edi
mov    %r12d,%ebp
mov    0x10(%rsp,%rbp,8),%rdx
lea    0xe89(%rip),%rsi
call   1090 <fprintf@plt>
xor    %eax,%eax
call   10a0 <gettimeofday_sec@plt>
movsd  %xmm0,0x8(%rsp)
cmp    $0x5,%r12d
ja     1370 <main+0x1a0>
lea    0xe02(%rip),%rax
movslq (%rax,%rbp,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    0x4(%rsp),%esi
mov    %rbx,%rdi
call   1030 <selection_sort@plt>
jmp    1370 <main+0x1a0>
mov    0x4(%rsp),%edx
add    $0xffffffff,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1060 <selection_sort2@plt>
jmp    1370 <main+0x1a0>
mov    0x4(%rsp),%esi
mov    %rbx,%rdi
call   10f0 <bubble_sort@plt>
jmp    1370 <main+0x1a0>
mov    0x4(%rsp),%esi
mov    %rbx,%rdi
call   1050 <heap_sort@plt>
jmp    1370 <main+0x1a0>
mov    0x4(%rsp),%edx
add    $0xffffffff,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   10b0 <merge_sort@plt>
jmp    1370 <main+0x1a0>
mov    0x4(%rsp),%edx
add    $0xffffffff,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   10c0 <quick_sort@plt>
xor    %eax,%eax
call   10a0 <gettimeofday_sec@plt>
subsd  0x8(%rsp),%xmm0
lea    0xe00(%rip),%rdi
call   1080 <printf@plt>
mov    0x4(%rsp),%esi
mov    %rbx,%rdi
call   1070 <print_array@plt>
mov    %rbx,%rdi
call   1040 <free@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"rand.txt\00"
@.str.1 = [10 x i8] c"SELECTION\00"
@.str.2 = [11 x i8] c"SELECTION2\00"
@.str.3 = [7 x i8] c"BUBBLE\00"
@.str.4 = [5 x i8] c"HEAP\00"
@.str.5 = [6 x i8] c"MERGE\00"
@.str.6 = [6 x i8] c"QUICK\00"
@.str.7 = [9 x i8] c"f:s2bhmq\00"
@stderr = global i32 0
@.str.8 = [17 x i8] c"reading from %s\0A\00"
@.str.9 = [20 x i8] c"using %s algorithm\0A\00"
@.str.10 = [10 x i8] c"%lf[sec]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i8*
%10 = alloca double
%11 = alloca i32
%12 = alloca [6 x i8*]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %9
store i32 0, i32* %11
%13 = bitcast [6 x i8*]* %12 to i8*
%14 = bitcast i8* %13 to [6 x i8*]*
%15 = getelementptr inbounds [6 x i8*], [6 x i8*]* %14, i32 0, i32 0
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i32 0, i32 0), i8** %15
%16 = getelementptr inbounds [6 x i8*], [6 x i8*]* %14, i32 0, i32 1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i32 0, i32 0), i8** %16
%17 = getelementptr inbounds [6 x i8*], [6 x i8*]* %14, i32 0, i32 2
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i32 0, i32 0), i8** %17
%18 = getelementptr inbounds [6 x i8*], [6 x i8*]* %14, i32 0, i32 3
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i32 0, i32 0), i8** %18
%19 = getelementptr inbounds [6 x i8*], [6 x i8*]* %14, i32 0, i32 4
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i32 0, i32 0), i8** %19
%20 = getelementptr inbounds [6 x i8*], [6 x i8*]* %14, i32 0, i32 5
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i32 0, i32 0), i8** %20
br label %21
21: ; preds = %38, %2
%22 = load i32, i32* %4
%23 = load i8**, i8*** %5
%24 = call i32 @getopt(i32 %22, i8** %23, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
store i32 %24, i32* %6
%25 = icmp ne i32 %24, -1
br i1 %25, label %26, label %39
26: ; preds = %21
%27 = load i32, i32* %6
switch i32 %27, label %38 [
i32 102, label %28
i32 115, label %32
i32 50, label %33
i32 98, label %34
i32 104, label %35
i32 109, label %36
i32 113, label %37
]
28: ; preds = %26
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
store i8* %31, i8** %9
br label %38
32: ; preds = %26
store i32 0, i32* %11
br label %38
33: ; preds = %26
store i32 1, i32* %11
br label %38
34: ; preds = %26
store i32 2, i32* %11
br label %38
35: ; preds = %26
store i32 3, i32* %11
br label %38
36: ; preds = %26
store i32 4, i32* %11
br label %38
37: ; preds = %26
store i32 5, i32* %11
br label %38
38: ; preds = %26, %37, %36, %35, %34, %33, %32, %28
br label %21
39: ; preds = %21
%40 = load i32, i32* @stderr
%41 = load i8*, i8** %9
%42 = call i32 @fprintf(i32 %40, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i8* %41)
%43 = load i8*, i8** %9
%44 = load i32*, i32** %8
%45 = call i32* @read_array(i8* %43, i32* %44, i32* %7)
store i32* %45, i32** %8
%46 = load i32*, i32** %8
%47 = load i32, i32* %7
%48 = call i32 @print_array(i32* %46, i32 %47)
%49 = load i32, i32* @stderr
%50 = load i32, i32* %11
%51 = zext i32 %50 to i64
%52 = getelementptr inbounds [6 x i8*], [6 x i8*]* %12, i64 0, i64 %51
%53 = load i8*, i8** %52
%54 = call i32 @fprintf(i32 %49, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), i8* %53)
%55 = call double (...) @gettimeofday_sec()
store double %55, double* %10
%56 = load i32, i32* %11
switch i32 %56, label %84 [
i32 0, label %57
i32 1, label %61
i32 2, label %66
i32 3, label %70
i32 4, label %74
i32 5, label %79
]
57: ; preds = %39
%58 = load i32*, i32** %8
%59 = load i32, i32* %7
%60 = call i32 @selection_sort(i32* %58, i32 %59)
br label %84
61: ; preds = %39
%62 = load i32*, i32** %8
%63 = load i32, i32* %7
%64 = sub nsw i32 %63, 1
%65 = call i32 @selection_sort2(i32* %62, i32 0, i32 %64)
br label %84
66: ; preds = %39
%67 = load i32*, i32** %8
%68 = load i32, i32* %7
%69 = call i32 @bubble_sort(i32* %67, i32 %68)
br label %84
70: ; preds = %39
%71 = load i32*, i32** %8
%72 = load i32, i32* %7
%73 = call i32 @heap_sort(i32* %71, i32 %72)
br label %84
74: ; preds = %39
%75 = load i32*, i32** %8
%76 = load i32, i32* %7
%77 = sub nsw i32 %76, 1
%78 = call i32 @merge_sort(i32* %75, i32 0, i32 %77)
br label %84
79: ; preds = %39
%80 = load i32*, i32** %8
%81 = load i32, i32* %7
%82 = sub nsw i32 %81, 1
%83 = call i32 @quick_sort(i32* %80, i32 0, i32 %82)
br label %84
84: ; preds = %39, %79, %74, %70, %66, %61, %57
%85 = call double (...) @gettimeofday_sec()
%86 = load double, double* %10
%87 = fsub double %85, %86
%88 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), double %87)
%89 = load i32*, i32** %8
%90 = load i32, i32* %7
%91 = call i32 @print_array(i32* %89, i32 %90)
%92 = load i32*, i32** %8
%93 = call i32 @free(i32* %92)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"rand.txt\00"
@.str.1 = [10 x i8] c"SELECTION\00"
@.str.2 = [11 x i8] c"SELECTION2\00"
@.str.3 = [7 x i8] c"BUBBLE\00"
@.str.4 = [5 x i8] c"HEAP\00"
@.str.5 = [6 x i8] c"MERGE\00"
@.str.6 = [6 x i8] c"QUICK\00"
@.str.7 = [9 x i8] c"f:s2bhmq\00"
@stderr = global i32 0
@.str.8 = [17 x i8] c"reading from %s\0A\00"
@.str.9 = [20 x i8] c"using %s algorithm\0A\00"
@.str.10 = [10 x i8] c"%lf[sec]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca [6 x i8*]
%5 = bitcast i32* %3 to i8*
%6 = bitcast [6 x i8*]* %4 to i8*
%7 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 0
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8** %8
%9 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 2
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8** %9
%10 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 3
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8** %10
%11 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 4
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8** %11
%12 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 5
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8** %12
%13 = getelementptr inbounds i8*, i8** %1, i64 1
br label %14
14: ; preds = %18, %2
%15 = phi i8* [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %2 ], [ %19, %18 ]
%16 = phi i32 [ 0, %2 ], [ %20, %18 ]
%17 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
switch i32 %17, label %18 [
i32 -1, label %29
i32 102, label %21
i32 115, label %23
i32 50, label %24
i32 98, label %25
i32 104, label %26
i32 109, label %27
i32 113, label %28
]
18: ; preds = %14, %28, %27, %26, %25, %24, %23, %21
%19 = phi i8* [ %15, %28 ], [ %15, %27 ], [ %15, %26 ], [ %15, %25 ], [ %15, %24 ], [ %15, %23 ], [ %22, %21 ], [ %15, %14 ]
%20 = phi i32 [ 5, %28 ], [ 4, %27 ], [ 3, %26 ], [ 2, %25 ], [ 1, %24 ], [ 0, %23 ], [ %16, %21 ], [ %16, %14 ]
br label %14
21: ; preds = %14
%22 = load i8*, i8** %13
br label %18
23: ; preds = %14
br label %18
24: ; preds = %14
br label %18
25: ; preds = %14
br label %18
26: ; preds = %14
br label %18
27: ; preds = %14
br label %18
28: ; preds = %14
br label %18
29: ; preds = %14
%30 = load i32, i32* @stderr
%31 = tail call i32 @fprintf(i32 %30, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i8* %15)
%32 = call i32* @read_array(i8* %15, i32* undef, i32* %3)
%33 = load i32, i32* %3
%34 = call i32 @print_array(i32* %32, i32 %33)
%35 = load i32, i32* @stderr
%36 = zext i32 %16 to i64
%37 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i64 0, i64 %36
%38 = load i8*, i8** %37
%39 = call i32 @fprintf(i32 %35, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), i8* %38)
%40 = call double (...) @gettimeofday_sec()
switch i32 %16, label %62 [
i32 0, label %41
i32 1, label %44
i32 2, label %48
i32 3, label %51
i32 4, label %54
i32 5, label %58
]
41: ; preds = %29
%42 = load i32, i32* %3
%43 = call i32 @selection_sort(i32* %32, i32 %42)
br label %62
44: ; preds = %29
%45 = load i32, i32* %3
%46 = add nsw i32 %45, -1
%47 = call i32 @selection_sort2(i32* %32, i32 0, i32 %46)
br label %62
48: ; preds = %29
%49 = load i32, i32* %3
%50 = call i32 @bubble_sort(i32* %32, i32 %49)
br label %62
51: ; preds = %29
%52 = load i32, i32* %3
%53 = call i32 @heap_sort(i32* %32, i32 %52)
br label %62
54: ; preds = %29
%55 = load i32, i32* %3
%56 = add nsw i32 %55, -1
%57 = call i32 @merge_sort(i32* %32, i32 0, i32 %56)
br label %62
58: ; preds = %29
%59 = load i32, i32* %3
%60 = add nsw i32 %59, -1
%61 = call i32 @quick_sort(i32* %32, i32 0, i32 %60)
br label %62
62: ; preds = %29, %58, %54, %51, %48, %44, %41
%63 = call double (...) @gettimeofday_sec()
%64 = fsub double %63, %40
%65 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), double %64)
%66 = load i32, i32* %3
%67 = call i32 @print_array(i32* %32, i32 %66)
%68 = call i32 @free(i32* %32)
ret i32 0
}