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

	// first insert function version (single parameter):
	mymap.insert(ft::pair<char, int>('a', 100) );
	mymap.insert(ft::pair<char, int>('z', 200) );

	ft::pair<ft::map<char, int>::iterator, bool> ret;

	ret = mymap.insert(ft::pair<char, int>('z', 500));
	if (ret.second == false)
	{
		std::cout << "element 'z' already existed";
		std::cout << " with a value of " << ret.first->second << std::endl;
	}

	// second insert function version (with hint position):
	ft::map<char, int>::iterator it = mymap.begin();
	mymap.insert(it, ft::pair<char, int>('b', 300));  // max efficiency inserting
	mymap.insert(it, ft::pair<char, int>('c', 400));  // no max efficiency inserting

	// third insert function version (range insertion):
	ft::map<char, int> anothermap;
	anothermap.insert(mymap.begin(), mymap.find('c'));

	print_map_info(mymap);
	print_map_info(anothermap);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
leaq -0x38(%rbp), %rbx
movl $0x0, (%rbx)
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq %rbx, 0x10(%rbx)
movq %rbx, 0x18(%rbx)
movq %rax, 0x20(%rbx)
leaq -0x70(%rbp), %rsi
movb $0x61, (%rsi)
movl $0x64, 0x4(%rsi)
leaq -0x40(%rbp), %rdi
callq 0x12fac
leaq -0x70(%rbp), %rsi
movb $0x7a, (%rsi)
movl $0xc8, 0x4(%rsi)
leaq -0x40(%rbp), %rdi
callq 0x12fac
leaq -0x70(%rbp), %rsi
movb $0x7a, (%rsi)
movl $0x1f4, 0x4(%rsi)       # imm = 0x1F4
leaq -0x40(%rbp), %rdi
callq 0x12fac
testb %dl, %dl
jne 0x11190
movq %rax, %r14
movq 0x22ea3(%rip), %rdi     # 0x33fd0
leaq 0x156c0(%rip), %rsi     # 0x267f4
movl $0x1b, %edx
callq 0x2230
movq 0x22e8b(%rip), %rdi     # 0x33fd0
leaq 0x156c4(%rip), %rsi     # 0x26810
movl $0x11, %edx
callq 0x2230
movl 0x24(%r14), %esi
movq 0x22e6f(%rip), %rdi     # 0x33fd0
callq 0x2330
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
leaq -0x40(%rbp), %rdi
movq 0x18(%rdi), %r14
leaq -0x70(%rbp), %rdx
movb $0x62, (%rdx)
movl $0x12c, 0x4(%rdx)       # imm = 0x12C
movq %r14, %rsi
callq 0x13046
leaq -0x70(%rbp), %rdx
movb $0x63, (%rdx)
movl $0x190, 0x4(%rdx)       # imm = 0x190
leaq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x13046
leaq -0x68(%rbp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq -0x30(%rbp), %rcx
movq %rbx, %rax
testq %rcx, %rcx
je 0x1120a
movq %rbx, %rax
xorl %edx, %edx
cmpb $0x63, 0x20(%rcx)
setl %dl
cmovgeq %rcx, %rax
movq 0x10(%rcx,%rdx,8), %rcx
testq %rcx, %rcx
jne 0x111f3
movq -0x28(%rbp), %rsi
cmpq %rbx, %rax
je 0x1121b
cmpb $0x64, 0x20(%rax)
cmovlq %rax, %rbx
leaq -0x70(%rbp), %rdi
movq %rbx, %rdx
callq 0x130e0
leaq -0x40(%rbp), %rdi
callq 0xcd41
leaq -0x70(%rbp), %rdi
callq 0xcd41
leaq -0x70(%rbp), %rdi
callq 0xcf00
leaq -0x40(%rbp), %rdi
callq 0xcf00
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x11260
jmp 0x1126e
jmp 0x1126e
jmp 0x1126e
jmp 0x1126e
jmp 0x1126e
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0xcf00
jmp 0x11271
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0xcf00
movq %rbx, %rdi
callq 0x2340