// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/map.c
// Function: map_test
void map_test(void) {
	Map map;

	map_init(&map, _test_str_comparer, _test_str_comparer, free, free);

	map_set(&map, "A", "1", false);
	map_set(&map, "B", "2", false);
	map_set(&map, "C", "3", false);

	void *value = NULL;

	value = map_get(&map, "A");
	MYASSERT(
		value != NULL && strcmp(value, "1") == 0,
		"TEST map"
	);
	value = map_get(&map, "B");
	MYASSERT(
		value != NULL && strcmp(value, "2") == 0,
		"TEST map"
	);
	value = map_get(&map, "C");
	MYASSERT(
		value != NULL && strcmp(value, "3") == 0,
		"TEST map"
	);
	value = map_get(&map, "__NOT_EXISTS__");
	MYASSERT(
		value == NULL,
		"TEST map"
	);

	map_set(&map, "B", "20", false);

	value = map_get(&map, "B");
	MYASSERT(
		value != NULL && strcmp(value, "20") == 0,
		"TEST map"
	);

	MYASSERT(
		map_exists_key(&map, "B"),
		"TEST map"
	);

	map_remove(&map, "B", false, false);

	MYASSERT(
		!map_exists_key(&map, "B"),
		"TEST map"
	);

	map_free(&map, false, false);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
leaq -0x48(%rbp), %rdi
leaq 0x26d(%rip), %rdx       # 0xe210
movq 0x4a016(%rip), %r8      # 0x57fc0
movq %rdx, %rsi
movq %r8, %rcx
callq 0xd210
leaq -0x48(%rbp), %rdi
leaq 0x4081d(%rip), %rsi     # 0x4e7dd
leaq 0x3cac0(%rip), %rdx     # 0x4aa87
xorl %ecx, %ecx
callq 0xd460
leaq -0x48(%rbp), %rdi
leaq 0x3c2d4(%rip), %rsi     # 0x4a2ad
leaq 0x3cccc(%rip), %rdx     # 0x4acac
xorl %ecx, %ecx
callq 0xd460
leaq -0x48(%rbp), %rdi
leaq 0x3c5ff(%rip), %rsi     # 0x4a5f1
leaq 0x3c244(%rip), %rdx     # 0x4a23d
xorl %ecx, %ecx
callq 0xd460
movq $0x0, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
leaq 0x407ca(%rip), %rsi     # 0x4e7dd
callq 0xd750
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0xe038
movq -0x50(%rbp), %rdi
leaq 0x3ca59(%rip), %rsi     # 0x4aa87
callq 0xa0f0
cmpl $0x0, %eax
je 0xe052
leaq 0x38dd4(%rip), %rdi     # 0x46e13
movl $0x130, %esi            # imm = 0x130
leaq 0x39165(%rip), %rdx     # 0x471b0
movb $0x0, %al
callq 0xe240
leaq -0x48(%rbp), %rdi
leaq 0x3c250(%rip), %rsi     # 0x4a2ad
callq 0xd750
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0xe082
movq -0x50(%rbp), %rdi
leaq 0x3cc34(%rip), %rsi     # 0x4acac
callq 0xa0f0
cmpl $0x0, %eax
je 0xe09c
leaq 0x38d8a(%rip), %rdi     # 0x46e13
movl $0x135, %esi            # imm = 0x135
leaq 0x3911b(%rip), %rdx     # 0x471b0
movb $0x0, %al
callq 0xe240
leaq -0x48(%rbp), %rdi
leaq 0x3c54a(%rip), %rsi     # 0x4a5f1
callq 0xd750
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0xe0cc
movq -0x50(%rbp), %rdi
leaq 0x3c17b(%rip), %rsi     # 0x4a23d
callq 0xa0f0
cmpl $0x0, %eax
je 0xe0e6
leaq 0x38d40(%rip), %rdi     # 0x46e13
movl $0x13a, %esi            # imm = 0x13A
leaq 0x390d1(%rip), %rdx     # 0x471b0
movb $0x0, %al
callq 0xe240
leaq -0x48(%rbp), %rdi
leaq 0x390c8(%rip), %rsi     # 0x471b9
callq 0xd750
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0xe11b
leaq 0x38d0b(%rip), %rdi     # 0x46e13
movl $0x13f, %esi            # imm = 0x13F
leaq 0x3909c(%rip), %rdx     # 0x471b0
movb $0x0, %al
callq 0xe240
leaq -0x48(%rbp), %rdi
leaq 0x3c187(%rip), %rsi     # 0x4a2ad
leaq 0x3909b(%rip), %rdx     # 0x471c8
xorl %ecx, %ecx
callq 0xd460
leaq -0x48(%rbp), %rdi
leaq 0x3c16e(%rip), %rsi     # 0x4a2ad
callq 0xd750
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0xe164
movq -0x50(%rbp), %rdi
leaq 0x3906e(%rip), %rsi     # 0x471c8
callq 0xa0f0
cmpl $0x0, %eax
je 0xe17e
leaq 0x38ca8(%rip), %rdi     # 0x46e13
movl $0x147, %esi            # imm = 0x147
leaq 0x39039(%rip), %rdx     # 0x471b0
movb $0x0, %al
callq 0xe240
leaq -0x48(%rbp), %rdi
leaq 0x3c124(%rip), %rsi     # 0x4a2ad
callq 0xd8f0
testb $0x1, %al
jne 0xe1ac
leaq 0x38c7a(%rip), %rdi     # 0x46e13
movl $0x14c, %esi            # imm = 0x14C
leaq 0x3900b(%rip), %rdx     # 0x471b0
movb $0x0, %al
callq 0xe240
leaq -0x48(%rbp), %rdi
leaq 0x3c0f6(%rip), %rsi     # 0x4a2ad
xorl %ecx, %ecx
movl %ecx, %edx
callq 0xd7f0
leaq -0x48(%rbp), %rdi
leaq 0x3c0e2(%rip), %rsi     # 0x4a2ad
callq 0xd8f0
testb $0x1, %al
jne 0xe1d6
jmp 0xe1f0
leaq 0x38c36(%rip), %rdi     # 0x46e13
movl $0x153, %esi            # imm = 0x153
leaq 0x38fc7(%rip), %rdx     # 0x471b0
movb $0x0, %al
callq 0xe240
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0xd360
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)