#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 */
typedef int /*<<< orphan*/ data;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ testOpenAddressingDoubleHashing(int *, int, int);
int /*<<< orphan*/ testOpenAddressingLinear(int *, int, int);
int /*<<< orphan*/ testOpenAddressingQuadratic(int *, int, int);
int /*<<< orphan*/ testRehash(int *, int, double);
int /*<<< orphan*/ testSeparateChaining(int *, int, int);
int main(void) {
  int data[] = {11, 4, 99, 33, 8, 55, 9, 77, 2, 3, 66, 5, 22, 6, 1, 88, 7, 44};
  int size = sizeof(data) / sizeof(int);
  testSeparateChaining(data, size, 1);
  testOpenAddressingLinear(data, size, 1);
  testOpenAddressingQuadratic(data, size, 1);
  testOpenAddressingDoubleHashing(data, size, 1);
  testRehash(data, size, 0.8);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xe96(%rip),%rsi
mov    $0x48,%edx
call   1060 <memcpy@plt>
movl   $0x12,-0x54(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x54(%rbp),%esi
mov    $0x1,%edx
call   1080 <testSeparateChaining@plt>
lea    -0x50(%rbp),%rdi
mov    -0x54(%rbp),%esi
mov    $0x1,%edx
call   1070 <testOpenAddressingLinear@plt>
lea    -0x50(%rbp),%rdi
mov    -0x54(%rbp),%esi
mov    $0x1,%edx
call   1050 <testOpenAddressingQuadratic@plt>
lea    -0x50(%rbp),%rdi
mov    -0x54(%rbp),%esi
mov    $0x1,%edx
call   1030 <testOpenAddressingDoubleHashing@plt>
lea    -0x50(%rbp),%rdi
mov    -0x54(%rbp),%esi
movsd  0xe22(%rip),%xmm0
call   1040 <testRehash@plt>
mov    0x2df6(%rip),%rax
mov    (%rax),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
mov    0xef4(%rip),%rax
mov    %rax,0x40(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xea0(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe84(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x12,%esi
mov    $0x1,%edx
call   1070 <testSeparateChaining@plt>
mov    %rbx,%rdi
mov    $0x12,%esi
mov    $0x1,%edx
call   1060 <testOpenAddressingLinear@plt>
mov    %rbx,%rdi
mov    $0x12,%esi
mov    $0x1,%edx
call   1050 <testOpenAddressingQuadratic@plt>
mov    %rbx,%rdi
mov    $0x12,%esi
mov    $0x1,%edx
call   1030 <testOpenAddressingDoubleHashing@plt>
movsd  0xe1d(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x12,%esi
call   1040 <testRehash@plt>
mov    0x2de9(%rip),%rax
mov    (%rax),%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.data = [18 x i32] [i32 11, i32 4, i32 99, i32 33, i32 8, i32 55, i32 9, i32 77, i32 2, i32 3, i32 66, i32 5, i32 22, i32 6, i32 1, i32 88, i32 7, i32 44]
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [18 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [18 x i32]* %2 to i8*
store i32 18, i32* %3
%5 = getelementptr inbounds [18 x i32], [18 x i32]* %2, i64 0, i64 0
%6 = load i32, i32* %3
%7 = call i32 @testSeparateChaining(i32* %5, i32 %6, i32 1)
%8 = getelementptr inbounds [18 x i32], [18 x i32]* %2, i64 0, i64 0
%9 = load i32, i32* %3
%10 = call i32 @testOpenAddressingLinear(i32* %8, i32 %9, i32 1)
%11 = getelementptr inbounds [18 x i32], [18 x i32]* %2, i64 0, i64 0
%12 = load i32, i32* %3
%13 = call i32 @testOpenAddressingQuadratic(i32* %11, i32 %12, i32 1)
%14 = getelementptr inbounds [18 x i32], [18 x i32]* %2, i64 0, i64 0
%15 = load i32, i32* %3
%16 = call i32 @testOpenAddressingDoubleHashing(i32* %14, i32 %15, i32 1)
%17 = getelementptr inbounds [18 x i32], [18 x i32]* %2, i64 0, i64 0
%18 = load i32, i32* %3
%19 = call i32 @testRehash(i32* %17, i32 %18, double 8.000000e-01)
%20 = load i32, i32* @EXIT_SUCCESS
ret i32 %20
}

LLVM IR (-O2):
@__const.main.data = [18 x i32] [i32 11, i32 4, i32 99, i32 33, i32 8, i32 55, i32 9, i32 77, i32 2, i32 3, i32 66, i32 5, i32 22, i32 6, i32 1, i32 88, i32 7, i32 44]
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca [18 x i32]
%2 = bitcast [18 x i32]* %1 to i8*
%3 = getelementptr inbounds [18 x i32], [18 x i32]* %1, i64 0, i64 0
%4 = call i32 @testSeparateChaining(i32* %3, i32 18, i32 1)
%5 = call i32 @testOpenAddressingLinear(i32* %3, i32 18, i32 1)
%6 = call i32 @testOpenAddressingQuadratic(i32* %3, i32 18, i32 1)
%7 = call i32 @testOpenAddressingDoubleHashing(i32* %3, i32 18, i32 1)
%8 = call i32 @testRehash(i32* %3, i32 18, double 8.000000e-01)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}