#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*/ benchmark_sort_str(char *, char *);
int /*<<< orphan*/ benchmark_sort_uint(char *, char *);
int main() {
  benchmark_sort_uint("Sorting of IP-addresses",
                      "data/ip-addresses-as-nums.txt");
  benchmark_sort_uint("Sorting of integers", "data/numbers.txt");
  benchmark_sort_str("Sorting of hashes base64", "data/hashes-base64.txt");
  benchmark_sort_str("Sorting of hashes hex", "data/hashes-hex.txt");
  benchmark_sort_str("Sorting of numbers as strings", "data/numbers.txt");
  benchmark_sort_str("Sorting of english words", "data/words-en.txt");
  benchmark_sort_uint("Sorting of sorted integers", "data/numbers-sorted.txt");
  benchmark_sort_uint("Sorting of r-sorted integers",
                      "data/numbers-rsorted.txt");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    0xedb(%rip),%rsi
call   1030 <benchmark_sort_uint@plt>
lea    0xeed(%rip),%rdi
lea    0xefa(%rip),%rsi
call   1030 <benchmark_sort_uint@plt>
lea    0xeff(%rip),%rdi
lea    0xf11(%rip),%rsi
call   1040 <benchmark_sort_str@plt>
lea    0xf1c(%rip),%rdi
lea    0xf2b(%rip),%rsi
call   1040 <benchmark_sort_str@plt>
lea    0xf33(%rip),%rdi
lea    0xec1(%rip),%rsi
call   1040 <benchmark_sort_str@plt>
lea    0xf3e(%rip),%rdi
lea    0xf50(%rip),%rsi
call   1040 <benchmark_sort_str@plt>
lea    0xf56(%rip),%rdi
lea    0xf6a(%rip),%rsi
call   1030 <benchmark_sort_uint@plt>
lea    0xf76(%rip),%rdi
lea    0xf8c(%rip),%rsi
call   1030 <benchmark_sort_uint@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rdi
lea    0xee9(%rip),%rsi
call   1030 <benchmark_sort_uint@plt>
lea    0xefb(%rip),%rdi
lea    0xf08(%rip),%rbx
mov    %rbx,%rsi
call   1030 <benchmark_sort_uint@plt>
lea    0xf0a(%rip),%rdi
lea    0xf1c(%rip),%rsi
call   1040 <benchmark_sort_str@plt>
lea    0xf27(%rip),%rdi
lea    0xf36(%rip),%rsi
call   1040 <benchmark_sort_str@plt>
lea    0xf3e(%rip),%rdi
mov    %rbx,%rsi
call   1040 <benchmark_sort_str@plt>
lea    0xf4d(%rip),%rdi
lea    0xf5f(%rip),%rsi
call   1040 <benchmark_sort_str@plt>
lea    0xf65(%rip),%rdi
lea    0xf79(%rip),%rsi
call   1030 <benchmark_sort_uint@plt>
lea    0xf85(%rip),%rdi
lea    0xf9b(%rip),%rsi
call   1030 <benchmark_sort_uint@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Sorting of IP-addresses\00"
@.str.1 = [30 x i8] c"data/ip-addresses-as-nums.txt\00"
@.str.2 = [20 x i8] c"Sorting of integers\00"
@.str.3 = [17 x i8] c"data/numbers.txt\00"
@.str.4 = [25 x i8] c"Sorting of hashes base64\00"
@.str.5 = [23 x i8] c"data/hashes-base64.txt\00"
@.str.6 = [22 x i8] c"Sorting of hashes hex\00"
@.str.7 = [20 x i8] c"data/hashes-hex.txt\00"
@.str.8 = [30 x i8] c"Sorting of numbers as strings\00"
@.str.9 = [25 x i8] c"Sorting of english words\00"
@.str.10 = [18 x i8] c"data/words-en.txt\00"
@.str.11 = [27 x i8] c"Sorting of sorted integers\00"
@.str.12 = [24 x i8] c"data/numbers-sorted.txt\00"
@.str.13 = [29 x i8] c"Sorting of r-sorted integers\00"
@.str.14 = [25 x i8] c"data/numbers-rsorted.txt\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @benchmark_sort_uint(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @benchmark_sort_uint(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%4 = call i32 @benchmark_sort_str(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
%5 = call i32 @benchmark_sort_str(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
%6 = call i32 @benchmark_sort_str(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @benchmark_sort_str(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0))
%8 = call i32 @benchmark_sort_uint(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0))
%9 = call i32 @benchmark_sort_uint(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Sorting of IP-addresses\00"
@.str.1 = [30 x i8] c"data/ip-addresses-as-nums.txt\00"
@.str.2 = [20 x i8] c"Sorting of integers\00"
@.str.3 = [17 x i8] c"data/numbers.txt\00"
@.str.4 = [25 x i8] c"Sorting of hashes base64\00"
@.str.5 = [23 x i8] c"data/hashes-base64.txt\00"
@.str.6 = [22 x i8] c"Sorting of hashes hex\00"
@.str.7 = [20 x i8] c"data/hashes-hex.txt\00"
@.str.8 = [30 x i8] c"Sorting of numbers as strings\00"
@.str.9 = [25 x i8] c"Sorting of english words\00"
@.str.10 = [18 x i8] c"data/words-en.txt\00"
@.str.11 = [27 x i8] c"Sorting of sorted integers\00"
@.str.12 = [24 x i8] c"data/numbers-sorted.txt\00"
@.str.13 = [29 x i8] c"Sorting of r-sorted integers\00"
@.str.14 = [25 x i8] c"data/numbers-rsorted.txt\00"
define i32 @main() {
%1 = tail call i32 @benchmark_sort_uint(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @benchmark_sort_uint(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @benchmark_sort_str(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
%4 = tail call i32 @benchmark_sort_str(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
%5 = tail call i32 @benchmark_sort_str(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @benchmark_sort_str(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0))
%7 = tail call i32 @benchmark_sort_uint(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0))
%8 = tail call i32 @benchmark_sort_uint(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0))
ret i32 0
}