#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*/ test_hashmap_clear();
int /*<<< orphan*/ test_hashmap_create();
int /*<<< orphan*/ test_hashmap_set();
int /*<<< orphan*/ test_hashmap_size();
int /*<<< orphan*/ test_hashmap_write_to_file();
unsigned int test_hashmap(void) {
  printf("\nTesting hashmap...\n");
  if (!test_hashmap_create())
    return 0;
  ;
  if (!test_hashmap_set())
    return 0;
  ;
  if (!test_hashmap_size())
    return 0;
  ;
  if (!test_hashmap_clear())
    return 0;
  ;
  if (!test_hashmap_write_to_file())
    return 0;
  ;
  printf("All hashmap tests passed!\n");
  return 1;
}


x86 assembly (clang, -O0):
<test_hashmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe91(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1070 <test_hashmap_create@plt>
cmp    $0x0,%eax
jne    1190 <test_hashmap+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1213 <test_hashmap+0xb3>
mov    $0x0,%al
call   1050 <test_hashmap_set@plt>
cmp    $0x0,%eax
jne    11ac <test_hashmap+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1213 <test_hashmap+0xb3>
mov    $0x0,%al
call   1030 <test_hashmap_size@plt>
cmp    $0x0,%eax
jne    11c8 <test_hashmap+0x68>
movl   $0x0,-0x4(%rbp)
jmp    1213 <test_hashmap+0xb3>
mov    $0x0,%al
call   1080 <test_hashmap_clear@plt>
cmp    $0x0,%eax
jne    11e4 <test_hashmap+0x84>
movl   $0x0,-0x4(%rbp)
jmp    1213 <test_hashmap+0xb3>
mov    $0x0,%al
call   1060 <test_hashmap_write_to_file@plt>
cmp    $0x0,%eax
jne    1200 <test_hashmap+0xa0>
movl   $0x0,-0x4(%rbp)
jmp    1213 <test_hashmap+0xb3>
lea    0xe0e(%rip),%rdi
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_hashmap>:
push   %rbx
lea    0xe98(%rip),%rdi
call   1040 <puts@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1070 <test_hashmap_create@plt>
test   %eax,%eax
je     11bf <test_hashmap+0x5f>
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <test_hashmap_set@plt>
test   %eax,%eax
je     11bf <test_hashmap+0x5f>
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <test_hashmap_size@plt>
test   %eax,%eax
je     11bf <test_hashmap+0x5f>
xor    %ebx,%ebx
xor    %eax,%eax
call   1080 <test_hashmap_clear@plt>
test   %eax,%eax
je     11bf <test_hashmap+0x5f>
xor    %ebx,%ebx
xor    %eax,%eax
call   1060 <test_hashmap_write_to_file@plt>
test   %eax,%eax
je     11bf <test_hashmap+0x5f>
lea    0xe5f(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"\0ATesting hashmap...\0A\00"
@.str.1 = [27 x i8] c"All hashmap tests passed!\0A\00"
define i32 @test_hashmap() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @test_hashmap_create()
%4 = icmp ne i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %0
store i32 0, i32* %1
br label %24
6: ; preds = %0
%7 = call i32 (...) @test_hashmap_set()
%8 = icmp ne i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %6
store i32 0, i32* %1
br label %24
10: ; preds = %6
%11 = call i32 (...) @test_hashmap_size()
%12 = icmp ne i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %10
store i32 0, i32* %1
br label %24
14: ; preds = %10
%15 = call i32 (...) @test_hashmap_clear()
%16 = icmp ne i32 %15, 0
br i1 %16, label %18, label %17
17: ; preds = %14
store i32 0, i32* %1
br label %24
18: ; preds = %14
%19 = call i32 (...) @test_hashmap_write_to_file()
%20 = icmp ne i32 %19, 0
br i1 %20, label %22, label %21
21: ; preds = %18
store i32 0, i32* %1
br label %24
22: ; preds = %18
%23 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %1
br label %24
24: ; preds = %22, %21, %17, %13, %9, %5
%25 = load i32, i32* %1
ret i32 %25
}

LLVM IR (-O2):
@str = [20 x i8] c"\0ATesting hashmap...\00"
@str.2 = [26 x i8] c"All hashmap tests passed!\00"
define i32 @test_hashmap() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @test_hashmap_create()
%3 = icmp eq i32 %2, 0
br i1 %3, label %18, label %4
4: ; preds = %0
%5 = tail call i32 (...) @test_hashmap_set()
%6 = icmp eq i32 %5, 0
br i1 %6, label %18, label %7
7: ; preds = %4
%8 = tail call i32 (...) @test_hashmap_size()
%9 = icmp eq i32 %8, 0
br i1 %9, label %18, label %10
10: ; preds = %7
%11 = tail call i32 (...) @test_hashmap_clear()
%12 = icmp eq i32 %11, 0
br i1 %12, label %18, label %13
13: ; preds = %10
%14 = tail call i32 (...) @test_hashmap_write_to_file()
%15 = icmp eq i32 %14, 0
br i1 %15, label %18, label %16
16: ; preds = %13
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.2, i64 0, i64 0))
br label %18
18: ; preds = %13, %10, %7, %4, %0, %16
%19 = phi i32 [ 1, %16 ], [ 0, %0 ], [ 0, %4 ], [ 0, %7 ], [ 0, %10 ], [ 0, %13 ]
ret i32 %19
}