// File: /workspace/github_cpp_makefile_star2_O3/DimitriDaSilva[P]42_ft_containers/tester/containers/map/test_map_modifiers.cpp
// Function: test_map_modifiers_erase_cplusplus()
void
test_map_modifiers_erase_cplusplus()
{
	ft::map<char, int> mymap;
	ft::map<char, int>::iterator it;

	// insert some values:
	mymap['a'] = 10;
	mymap['b'] = 20;
	mymap['c'] = 30;
	mymap['d'] = 40;
	mymap['e'] = 50;
	mymap['f'] = 60;

	it = mymap.find('b');
	mymap.erase (it);                   // erasing by iterator

	mymap.erase ('c');                  // erasing by key

	it = mymap.find ('e');
	mymap.erase(it, mymap.end());    // erasing by range

	// show content:
	for (it = mymap.begin(); it != mymap.end(); ++it)
		std::cout << it->first << " => " << it->second << '\n';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq -0x58(%rbp), %r15
movl $0x0, (%r15)
xorl %eax, %eax
movq %rax, 0x8(%r15)
movq %r15, 0x10(%r15)
movq %r15, 0x18(%r15)
movq %rax, 0x20(%r15)
leaq -0x29(%rbp), %rsi
movb $0x61, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0xcf7a
movl $0xa, (%rax)
leaq -0x29(%rbp), %rsi
movb $0x62, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0xcf7a
movl $0x14, (%rax)
leaq -0x29(%rbp), %rsi
movb $0x63, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0xcf7a
movl $0x1e, (%rax)
leaq -0x29(%rbp), %rsi
movb $0x64, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0xcf7a
movl $0x28, (%rax)
leaq -0x29(%rbp), %rsi
movb $0x65, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0xcf7a
movl $0x32, (%rax)
leaq -0x29(%rbp), %rsi
movb $0x66, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0xcf7a
movl $0x3c, (%rax)
movq -0x50(%rbp), %r8
movq %r15, %rsi
testq %r8, %r8
je 0x11af2
movq %r15, %rdx
movq %rdx, %rax
movq %r8, %rcx
movb 0x20(%r8), %dil
xorl %esi, %esi
cmpb $0x62, %dil
setl %sil
movq %r8, %rdx
cmovlq %rax, %rdx
movq 0x10(%r8,%rsi,8), %r8
testq %r8, %r8
jne 0x11ab2
movq %r15, %rsi
cmpq %r15, %rdx
je 0x11af2
cmpb $0x62, %dil
cmovlq %rax, %rcx
cmpb $0x63, 0x20(%rcx)
cmovgeq %r15, %rdx
movq %rdx, %rsi
leaq -0x60(%rbp), %rdi
callq 0xd180
leaq -0x29(%rbp), %rsi
movb $0x63, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0xd3d2
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xd318
movq 0x10(%rbx), %r8
movq %r15, %rsi
testq %r8, %r8
je 0x11b69
movq %r15, %rdx
movq %rdx, %rax
movq %r8, %rcx
movb 0x20(%r8), %dil
xorl %esi, %esi
cmpb $0x65, %dil
setl %sil
movq %r8, %rdx
cmovlq %rax, %rdx
movq 0x10(%r8,%rsi,8), %r8
testq %r8, %r8
jne 0x11b29
movq %r15, %rsi
cmpq %r15, %rdx
je 0x11b69
cmpb $0x65, %dil
cmovlq %rax, %rcx
cmpb $0x66, 0x20(%rcx)
cmovgeq %r15, %rdx
movq %rdx, %rsi
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
movq %r15, %rdx
callq 0xd318
movq 0x18(%rbx), %r14
cmpq %r15, %r14
je 0x11bf1
movq 0x22448(%rip), %r15     # 0x33fd0
leaq -0x29(%rbp), %r12
leaq 0x14c8f(%rip), %r13     # 0x26822
movb 0x20(%r14), %al
movb %al, -0x29(%rbp)
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2230
movq %rax, %rbx
movl $0x4, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2230
movl 0x24(%r14), %esi
movq %rbx, %rdi
callq 0x2330
movb $0xa, -0x29(%rbp)
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2230
movq %r14, %rdi
callq 0x2160
movq %rax, %r14
leaq -0x58(%rbp), %rax
cmpq %rax, %r14
jne 0x11b93
leaq -0x60(%rbp), %rdi
callq 0xcfe2
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x11c19
jmp 0x11c19
jmp 0x11c19
jmp 0x11c19
jmp 0x11c19
jmp 0x11c19
jmp 0x11c19
jmp 0x11c19
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0xcfe2
movq %rbx, %rdi
callq 0x2340