// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq 0x3324a(%rip), %r14     # 0x3ffc0
xorl %r15d, %r15d
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xbccc
leaq 0x2e9(%rip), %rax       # 0xd07a
movq %rax, 0x28(%rbx)
movq %rax, 0x30(%rbx)
movq %r14, 0x38(%rbx)
movq %r14, 0x40(%rbx)
leaq 0x297ca(%rip), %r14     # 0x36572
leaq 0x2594c(%rip), %rdx     # 0x326fb
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0xc658
leaq 0x2515e(%rip), %rsi     # 0x31f21
leaq 0x25b56(%rip), %rdx     # 0x32920
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc658
leaq 0x2548a(%rip), %rsi     # 0x32265
leaq 0x250cf(%rip), %rdx     # 0x31eb1
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc658
leaq -0x6d9(%rip), %rsi      # 0xc71a
movq %rbx, %rdi
movq %r14, %rdx
callq 0xc00a
testq %rax, %rax
je 0xce07
movq 0x8(%rax), %r15
testq %r15, %r15
je 0xce12
movq 0x10(%r15), %rdi
jmp 0xce14
xorl %edi, %edi
testq %rdi, %rdi
je 0xce29
leaq 0x258db(%rip), %rsi     # 0x326fb
callq 0xa0e0
testl %eax, %eax
je 0xce43
leaq 0x21f3b(%rip), %rdi     # 0x2ed6b
leaq 0x222d1(%rip), %rdx     # 0x2f108
movl $0x130, %esi            # imm = 0x130
xorl %eax, %eax
callq 0xd08c
leaq -0x730(%rip), %rsi      # 0xc71a
leaq 0x250d0(%rip), %rdx     # 0x31f21
leaq -0x60(%rbp), %rdi
callq 0xc00a
testq %rax, %rax
je 0xce65
movq 0x8(%rax), %rax
jmp 0xce67
xorl %eax, %eax
testq %rax, %rax
je 0xce72
movq 0x10(%rax), %rdi
jmp 0xce74
xorl %edi, %edi
testq %rdi, %rdi
je 0xce89
leaq 0x25aa0(%rip), %rsi     # 0x32920
callq 0xa0e0
testl %eax, %eax
je 0xcea3
leaq 0x21edb(%rip), %rdi     # 0x2ed6b
leaq 0x22271(%rip), %rdx     # 0x2f108
movl $0x135, %esi            # imm = 0x135
xorl %eax, %eax
callq 0xd08c
leaq -0x790(%rip), %rsi      # 0xc71a
leaq 0x253b4(%rip), %rdx     # 0x32265
leaq -0x60(%rbp), %rdi
callq 0xc00a
testq %rax, %rax
je 0xcec5
movq 0x8(%rax), %rax
jmp 0xcec7
xorl %eax, %eax
testq %rax, %rax
je 0xced2
movq 0x10(%rax), %rdi
jmp 0xced4
xorl %edi, %edi
testq %rdi, %rdi
je 0xcee9
leaq 0x24fd1(%rip), %rsi     # 0x31eb1
callq 0xa0e0
testl %eax, %eax
je 0xcf03
leaq 0x21e7b(%rip), %rdi     # 0x2ed6b
leaq 0x22211(%rip), %rdx     # 0x2f108
movl $0x13a, %esi            # imm = 0x13A
xorl %eax, %eax
callq 0xd08c
leaq -0x7f0(%rip), %rsi      # 0xc71a
leaq 0x22200(%rip), %rdx     # 0x2f111
leaq -0x60(%rbp), %rdi
callq 0xc00a
testq %rax, %rax
je 0xcf25
movq 0x8(%rax), %rax
jmp 0xcf27
xorl %eax, %eax
testq %rax, %rax
je 0xcf4d
cmpq $0x0, 0x10(%rax)
je 0xcf4d
leaq 0x21e31(%rip), %rdi     # 0x2ed6b
leaq 0x221c7(%rip), %rdx     # 0x2f108
movl $0x13f, %esi            # imm = 0x13F
xorl %eax, %eax
callq 0xd08c
leaq 0x24fcd(%rip), %rbx     # 0x31f21
leaq 0x221c5(%rip), %rdx     # 0x2f120
leaq -0x60(%rbp), %r14
xorl %r15d, %r15d
movq %r14, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0xc658
leaq -0x85c(%rip), %rsi      # 0xc71a
movq %r14, %rdi
movq %rbx, %rdx
callq 0xc00a
testq %rax, %rax
je 0xcf8a
movq 0x8(%rax), %r15
testq %r15, %r15
je 0xcf95
movq 0x10(%r15), %rdi
jmp 0xcf97
xorl %edi, %edi
testq %rdi, %rdi
je 0xcfac
leaq 0x2217d(%rip), %rsi     # 0x2f120
callq 0xa0e0
testl %eax, %eax
je 0xcfc6
leaq 0x21db8(%rip), %rdi     # 0x2ed6b
leaq 0x2214e(%rip), %rdx     # 0x2f108
movl $0x147, %esi            # imm = 0x147
xorl %eax, %eax
callq 0xd08c
leaq -0x8b3(%rip), %rsi      # 0xc71a
leaq 0x24f4d(%rip), %rdx     # 0x31f21
leaq -0x60(%rbp), %rdi
callq 0xc00a
testq %rax, %rax
je 0xcfe9
cmpq $0x0, 0x8(%rax)
jne 0xd003
leaq 0x21d7b(%rip), %rdi     # 0x2ed6b
leaq 0x22111(%rip), %rdx     # 0x2f108
movl $0x14c, %esi            # imm = 0x14C
xorl %eax, %eax
callq 0xd08c
leaq -0x38(%rbp), %r15
leaq 0x24f13(%rip), %rbx     # 0x31f21
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xc855
leaq -0x90a(%rip), %rsi      # 0xc71a
movq %r14, %rdi
movq %rbx, %rdx
callq 0xc00a
testq %rax, %rax
je 0xd055
cmpq $0x0, 0x8(%rax)
je 0xd055
leaq 0x21d29(%rip), %rdi     # 0x2ed6b
leaq 0x220bf(%rip), %rdx     # 0x2f108
movl $0x153, %esi            # imm = 0x153
xorl %eax, %eax
callq 0xd08c
leaq -0x60(%rbp), %rdi
movl $0x1, %esi
callq 0xbd6d
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
movups %xmm0, (%r15)
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq