// File: /workspace/github_c_makefile_star2_O3/nmmmnu[P]HM2/test_hm_memtable.c
// Function: main
int main(int argc, char **argv){
	if (argc < 2){
		printf("Usage:\n");
		printf("\t%s filename [key to find]\n", argv[0]);
		exit(1);
	}

	const char *filename = argv[1];


	hm_memtable_t *v = hm_memtable_createa();


	printf("Load file\n");
	_loadfile(v, filename, 0);
	printf("Done...\n");


	if (argc > 2){
		// Find the key
		const char *findkey = argv[2];
		_findkey(v, findkey);
	}


	//getchar();


	// Free list

	printf("Free file\n");
	hm_memtable_removeall(v);
	printf("Done...\n");

	printf("Destroy file\n");
	hm_memtable_destroy(v);
	free(v);
	printf("Done...\n");


	//getchar();


	printf("main() end...\n");

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rsi, %rbx
movl %edi, 0x4(%rsp)
cmpl $0x1, %edi
jle 0x1469
movq %rbx, 0x8(%rsp)
movq 0x8(%rbx), %r14
xorl %eax, %eax
callq 0x1b7a
movq %rax, %rbx
leaq 0xdc3(%rip), %rdi       # 0x206a
callq 0x1040
leaq 0xd6d(%rip), %rsi       # 0x2020
movq %r14, %rdi
callq 0x10c0
movq %rax, %r15
leaq 0x10(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %rax, %rdx
callq 0x1090
testq %rax, %rax
je 0x1387
movq %rax, %rbp
leaq 0x10(%rsp), %r13
xorl %r14d, %r14d
movq %rbp, %rdi
callq 0x1060
addq %rbp, %rax
decq %rax
movq %rax, %r12
cmpq %rbp, %rax
jbe 0x1313
callq 0x1120
movq (%rax), %rcx
movzbl (%r12), %edx
leaq -0x1(%r12), %rax
testb $0x20, 0x1(%rcx,%rdx,2)
jne 0x12f2
movb $0x0, 0x1(%r12)
movq %rbp, %rdi
callq 0x1060
movq %rbp, %rdi
movq %rbp, %rsi
movl %eax, %edx
xorl %ecx, %ecx
callq 0x1490
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1be0
incl %r14d
imull $0x3afb7e91, %r14d, %eax # imm = 0x3AFB7E91
rorl $0x4, %eax
cmpl $0x68db8, %eax          # imm = 0x68DB8
ja 0x136b
movq %rbx, %rdi
callq 0x1c0b
leaq 0xcc4(%rip), %rdi       # 0x2022
movl %r14d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1070
movq %r13, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdx
callq 0x1090
movq %rax, %rbp
testq %rax, %rax
jne 0x12e4
movq %r15, %rdi
callq 0x1050
leaq 0xcf5(%rip), %rdi       # 0x208b
callq 0x1040
cmpl $0x2, 0x4(%rsp)
je 0x1402
movq 0x8(%rsp), %rax
movq 0x10(%rax), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1be5
testq %rax, %rax
je 0x13f1
movq %rax, %r15
leaq 0xc97(%rip), %rdi       # 0x205c
movq %r14, %rsi
xorl %eax, %eax
callq 0x1070
leaq 0xcd2(%rip), %rdi       # 0x20a8
callq 0x1040
movq %r15, %rdi
callq 0x16a7
leaq 0xcca(%rip), %rdi       # 0x20b4
callq 0x1040
jmp 0x1402
leaq 0xc52(%rip), %rdi       # 0x204a
movq %r14, %rsi
xorl %eax, %eax
callq 0x1070
leaq 0xc6b(%rip), %rdi       # 0x2074
callq 0x1040
movq %rbx, %rdi
callq 0x1bdb
leaq 0xc6e(%rip), %r14       # 0x208b
movq %r14, %rdi
callq 0x1040
leaq 0xc52(%rip), %rdi       # 0x207e
callq 0x1040
movq %rbx, %rdi
callq 0x1bc8
movq %rbx, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1040
leaq 0xc43(%rip), %rdi       # 0x2093
callq 0x1040
xorl %eax, %eax
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc31(%rip), %rdi       # 0x20a1
callq 0x1040
movq (%rbx), %rsi
leaq 0xb85(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x1070
movl $0x1, %edi
callq 0x10f0