#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 */
struct OAHashTable {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ destroy(struct OAHashTable *);
struct OAHashTable *initOAHashTable(int);
int /*<<< orphan*/ insert(struct OAHashTable *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printKeys(struct OAHashTable *);
int /*<<< orphan*/ printPerformance(struct OAHashTable *);
int /*<<< orphan*/ rand();
int /*<<< orphan*/ search(struct OAHashTable *, int);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  struct OAHashTable *hashTable = initOAHashTable(11);
  srand(time(NULL));
  insert(hashTable, 6, rand());
  insert(hashTable, 2, rand());
  insert(hashTable, 13, rand());
  insert(hashTable, 5, rand());
  insert(hashTable, 17, rand());
  insert(hashTable, 39, rand());
  insert(hashTable, 1, rand());
  insert(hashTable, 12, rand());
  printKeys(hashTable);
  search(hashTable, 6);
  search(hashTable, 39);
  search(hashTable, 100);
  printPerformance(hashTable);
  destroy(hashTable);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xb,%edi
call   1090 <initOAHashTable@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    $0x0,%al
call   10b0 <rand@plt>
mov    -0x50(%rbp),%rdi
mov    %eax,%edx
mov    $0x6,%esi
call   1080 <insert@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    $0x0,%al
call   10b0 <rand@plt>
mov    -0x48(%rbp),%rdi
mov    %eax,%edx
mov    $0x2,%esi
call   1080 <insert@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    $0x0,%al
call   10b0 <rand@plt>
mov    -0x40(%rbp),%rdi
mov    %eax,%edx
mov    $0xd,%esi
call   1080 <insert@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    $0x0,%al
call   10b0 <rand@plt>
mov    -0x38(%rbp),%rdi
mov    %eax,%edx
mov    $0x5,%esi
call   1080 <insert@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    $0x0,%al
call   10b0 <rand@plt>
mov    -0x30(%rbp),%rdi
mov    %eax,%edx
mov    $0x11,%esi
call   1080 <insert@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    $0x0,%al
call   10b0 <rand@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%edx
mov    $0x27,%esi
call   1080 <insert@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   10b0 <rand@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%edx
mov    $0x1,%esi
call   1080 <insert@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   10b0 <rand@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%edx
mov    $0xc,%esi
call   1080 <insert@plt>
mov    -0x10(%rbp),%rdi
call   10a0 <printKeys@plt>
mov    -0x10(%rbp),%rdi
mov    $0x6,%esi
call   1040 <search@plt>
mov    -0x10(%rbp),%rdi
mov    $0x27,%esi
call   1040 <search@plt>
mov    -0x10(%rbp),%rdi
mov    $0x64,%esi
call   1040 <search@plt>
mov    -0x10(%rbp),%rdi
call   1030 <printPerformance@plt>
mov    -0x10(%rbp),%rdi
call   1060 <destroy@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xb,%edi
call   1090 <initOAHashTable@plt>
mov    %rax,%rbx
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
xor    %eax,%eax
call   10b0 <rand@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
mov    %eax,%edx
call   1080 <insert@plt>
xor    %eax,%eax
call   10b0 <rand@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    %eax,%edx
call   1080 <insert@plt>
xor    %eax,%eax
call   10b0 <rand@plt>
mov    %rbx,%rdi
mov    $0xd,%esi
mov    %eax,%edx
call   1080 <insert@plt>
xor    %eax,%eax
call   10b0 <rand@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
mov    %eax,%edx
call   1080 <insert@plt>
xor    %eax,%eax
call   10b0 <rand@plt>
mov    %rbx,%rdi
mov    $0x11,%esi
mov    %eax,%edx
call   1080 <insert@plt>
xor    %eax,%eax
call   10b0 <rand@plt>
mov    %rbx,%rdi
mov    $0x27,%esi
mov    %eax,%edx
call   1080 <insert@plt>
xor    %eax,%eax
call   10b0 <rand@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %eax,%edx
call   1080 <insert@plt>
xor    %eax,%eax
call   10b0 <rand@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
mov    %eax,%edx
call   1080 <insert@plt>
mov    %rbx,%rdi
call   10a0 <printKeys@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1040 <search@plt>
mov    %rbx,%rdi
mov    $0x27,%esi
call   1040 <search@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
call   1040 <search@plt>
mov    %rbx,%rdi
call   1030 <printPerformance@plt>
mov    %rbx,%rdi
call   1060 <destroy@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.OAHashTable = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.OAHashTable*
store i32 0, i32* %1
%3 = call %struct.OAHashTable* @initOAHashTable(i32 11)
store %struct.OAHashTable* %3, %struct.OAHashTable** %2
%4 = call i32 @time(i32* null)
%5 = call i32 @srand(i32 %4)
%6 = load %struct.OAHashTable*, %struct.OAHashTable** %2
%7 = call i32 (...) @rand()
%8 = call i32 @insert(%struct.OAHashTable* %6, i32 6, i32 %7)
%9 = load %struct.OAHashTable*, %struct.OAHashTable** %2
%10 = call i32 (...) @rand()
%11 = call i32 @insert(%struct.OAHashTable* %9, i32 2, i32 %10)
%12 = load %struct.OAHashTable*, %struct.OAHashTable** %2
%13 = call i32 (...) @rand()
%14 = call i32 @insert(%struct.OAHashTable* %12, i32 13, i32 %13)
%15 = load %struct.OAHashTable*, %struct.OAHashTable** %2
%16 = call i32 (...) @rand()
%17 = call i32 @insert(%struct.OAHashTable* %15, i32 5, i32 %16)
%18 = load %struct.OAHashTable*, %struct.OAHashTable** %2
%19 = call i32 (...) @rand()
%20 = call i32 @insert(%struct.OAHashTable* %18, i32 17, i32 %19)
%21 = load %struct.OAHashTable*, %struct.OAHashTable** %2
%22 = call i32 (...) @rand()
%23 = call i32 @insert(%struct.OAHashTable* %21, i32 39, i32 %22)
%24 = load %struct.OAHashTable*, %struct.OAHashTable** %2
%25 = call i32 (...) @rand()
%26 = call i32 @insert(%struct.OAHashTable* %24, i32 1, i32 %25)
%27 = load %struct.OAHashTable*, %struct.OAHashTable** %2
%28 = call i32 (...) @rand()
%29 = call i32 @insert(%struct.OAHashTable* %27, i32 12, i32 %28)
%30 = load %struct.OAHashTable*, %struct.OAHashTable** %2
%31 = call i32 @printKeys(%struct.OAHashTable* %30)
%32 = load %struct.OAHashTable*, %struct.OAHashTable** %2
%33 = call i32 @search(%struct.OAHashTable* %32, i32 6)
%34 = load %struct.OAHashTable*, %struct.OAHashTable** %2
%35 = call i32 @search(%struct.OAHashTable* %34, i32 39)
%36 = load %struct.OAHashTable*, %struct.OAHashTable** %2
%37 = call i32 @search(%struct.OAHashTable* %36, i32 100)
%38 = load %struct.OAHashTable*, %struct.OAHashTable** %2
%39 = call i32 @printPerformance(%struct.OAHashTable* %38)
%40 = load %struct.OAHashTable*, %struct.OAHashTable** %2
%41 = call i32 @destroy(%struct.OAHashTable* %40)
ret i32 0
}

LLVM IR (-O2):
%struct.OAHashTable = type { i32 }
define i32 @main() {
%1 = tail call %struct.OAHashTable* @initOAHashTable(i32 11)
%2 = tail call i32 @time(i32* null)
%3 = tail call i32 @srand(i32 %2)
%4 = tail call i32 (...) @rand()
%5 = tail call i32 @insert(%struct.OAHashTable* %1, i32 6, i32 %4)
%6 = tail call i32 (...) @rand()
%7 = tail call i32 @insert(%struct.OAHashTable* %1, i32 2, i32 %6)
%8 = tail call i32 (...) @rand()
%9 = tail call i32 @insert(%struct.OAHashTable* %1, i32 13, i32 %8)
%10 = tail call i32 (...) @rand()
%11 = tail call i32 @insert(%struct.OAHashTable* %1, i32 5, i32 %10)
%12 = tail call i32 (...) @rand()
%13 = tail call i32 @insert(%struct.OAHashTable* %1, i32 17, i32 %12)
%14 = tail call i32 (...) @rand()
%15 = tail call i32 @insert(%struct.OAHashTable* %1, i32 39, i32 %14)
%16 = tail call i32 (...) @rand()
%17 = tail call i32 @insert(%struct.OAHashTable* %1, i32 1, i32 %16)
%18 = tail call i32 (...) @rand()
%19 = tail call i32 @insert(%struct.OAHashTable* %1, i32 12, i32 %18)
%20 = tail call i32 @printKeys(%struct.OAHashTable* %1)
%21 = tail call i32 @search(%struct.OAHashTable* %1, i32 6)
%22 = tail call i32 @search(%struct.OAHashTable* %1, i32 39)
%23 = tail call i32 @search(%struct.OAHashTable* %1, i32 100)
%24 = tail call i32 @printPerformance(%struct.OAHashTable* %1)
%25 = tail call i32 @destroy(%struct.OAHashTable* %1)
ret i32 0
}