#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*/ printf(char *, int /*<<< orphan*/, char *);
scalar_t__ test_hashtable_benchmark();
scalar_t__ test_hashtable_replace();
scalar_t__ test_hashtable_simple();
int main(int argc, char **argv) {
  int _testnum = 1;
  if ((test_hashtable_simple())) {
    printf("ok %d - %s\n", _testnum++, "simple");
  } else {
    printf("failed %d - %s\n", _testnum++, "simple");
  };
  if ((test_hashtable_replace())) {
    printf("ok %d - %s\n", _testnum++, "replace");
  } else {
    printf("failed %d - %s\n", _testnum++, "replace");
  };
  if ((test_hashtable_benchmark())) {
    printf("ok %d - %s\n", _testnum++, "benchmark");
  } else {
    printf("failed %d - %s\n", _testnum++, "benchmark");
  };
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    $0x0,%al
call   1040 <test_hashtable_simple@plt>
cmp    $0x0,%rax
je     1191 <main+0x51>
mov    -0x14(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xe80(%rip),%rdi
lea    0xe85(%rip),%rdx
call   1030 <printf@plt>
jmp    11af <main+0x6f>
mov    -0x14(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xe70(%rip),%rdi
lea    0xe62(%rip),%rdx
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <test_hashtable_replace@plt>
cmp    $0x0,%rax
je     11e3 <main+0xa3>
mov    -0x14(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xe2e(%rip),%rdi
lea    0xe4a(%rip),%rdx
call   1030 <printf@plt>
jmp    1201 <main+0xc1>
mov    -0x14(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xe1e(%rip),%rdi
lea    0xe27(%rip),%rdx
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <test_hashtable_benchmark@plt>
cmp    $0x0,%rax
je     1235 <main+0xf5>
mov    -0x14(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xddc(%rip),%rdi
lea    0xe00(%rip),%rdx
call   1030 <printf@plt>
jmp    1253 <main+0x113>
mov    -0x14(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xdcc(%rip),%rdi
lea    0xddd(%rip),%rdx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <test_hashtable_simple@plt>
test   %rax,%rax
lea    0xebe(%rip),%r14
lea    0xea4(%rip),%rbx
mov    %rbx,%rdi
cmove  %r14,%rdi
lea    0xea2(%rip),%rdx
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1060 <test_hashtable_replace@plt>
test   %rax,%rax
mov    %rbx,%rdi
cmove  %r14,%rdi
lea    0xe97(%rip),%rdx
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <test_hashtable_benchmark@plt>
test   %rax,%rax
cmove  %r14,%rbx
lea    0xe80(%rip),%rdx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"ok %d - %s\0A\00"
@.str.1 = [7 x i8] c"simple\00"
@.str.2 = [16 x i8] c"failed %d - %s\0A\00"
@.str.3 = [8 x i8] c"replace\00"
@.str.4 = [10 x i8] c"benchmark\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
%7 = call i64 (...) @test_hashtable_simple()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32, i32* %6
%11 = add nsw i32 %10, 1
store i32 %11, i32* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %10, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %17
13: ; preds = %2
%14 = load i32, i32* %6
%15 = add nsw i32 %14, 1
store i32 %15, i32* %6
%16 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %14, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %13, %9
%18 = call i64 (...) @test_hashtable_replace()
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %24
20: ; preds = %17
%21 = load i32, i32* %6
%22 = add nsw i32 %21, 1
store i32 %22, i32* %6
%23 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %21, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
br label %28
24: ; preds = %17
%25 = load i32, i32* %6
%26 = add nsw i32 %25, 1
store i32 %26, i32* %6
%27 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %25, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
br label %28
28: ; preds = %24, %20
%29 = call i64 (...) @test_hashtable_benchmark()
%30 = icmp ne i64 %29, 0
br i1 %30, label %31, label %35
31: ; preds = %28
%32 = load i32, i32* %6
%33 = add nsw i32 %32, 1
store i32 %33, i32* %6
%34 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %32, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
br label %39
35: ; preds = %28
%36 = load i32, i32* %6
%37 = add nsw i32 %36, 1
store i32 %37, i32* %6
%38 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %36, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
br label %39
39: ; preds = %35, %31
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"ok %d - %s\0A\00"
@.str.1 = [7 x i8] c"simple\00"
@.str.2 = [16 x i8] c"failed %d - %s\0A\00"
@.str.3 = [8 x i8] c"replace\00"
@.str.4 = [10 x i8] c"benchmark\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @test_hashtable_simple()
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
%6 = tail call i32 @printf(i8* %5, i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i64 (...) @test_hashtable_replace()
%8 = icmp eq i64 %7, 0
%9 = select i1 %8, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
%10 = tail call i32 @printf(i8* %9, i32 2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%11 = tail call i64 (...) @test_hashtable_benchmark()
%12 = icmp eq i64 %11, 0
%13 = select i1 %12, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
%14 = tail call i32 @printf(i8* %13, i32 3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}