// File: DimitriDaSilva[P]42_ft_containers/tester/containers/map/test_map_modifiers.cpp
// Function: test_map_modifiers_swap_iterator_validity()
void
test_map_modifiers_swap_iterator_validity()
{
	ft::map<char, int> first, second;
	ft::map<char, int>::iterator it_first, it_second;

	first['x'] = 100;
	first['y'] = 200;

	second['a'] = 11;
	second['b'] = 22;
	second['c'] = 33;

	it_first = first.begin();
	it_second = second.begin();

	std::cout << "[" << it_first->first << "] = " << it_first->second << std::endl;
	std::cout << "[" << it_second->first << "] = " << it_second->second << std::endl;

	print_map_info(first);
	print_map_info(second);

	first.swap(second);

	std::cout << "[" << it_first->first << "] = " << it_first->second << std::endl;
	std::cout << "[" << it_second->first << "] = " << it_second->second << std::endl;

	print_map_info(first);
	print_map_info(second);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
leaq -0x30(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x1bf70
leaq -0x60(%rbp), %rdi
callq 0x1bf70
leaq -0x68(%rbp), %rdi
callq 0x1bf90
leaq -0x70(%rbp), %rdi
callq 0x1bf90
movq -0xa8(%rbp), %rdi
movb $0x78, -0x71(%rbp)
leaq -0x71(%rbp), %rsi
callq 0x1c3f0
movq %rax, -0xa0(%rbp)
jmp 0x29ce3
movq -0xa0(%rbp), %rax
movl $0x64, (%rax)
movb $0x79, -0x85(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x85(%rbp), %rsi
callq 0x1c3f0
movq %rax, -0xb0(%rbp)
jmp 0x29d10
movq -0xb0(%rbp), %rax
movl $0xc8, (%rax)
movb $0x61, -0x86(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x86(%rbp), %rsi
callq 0x1c3f0
movq %rax, -0xb8(%rbp)
jmp 0x29d3d
movq -0xb8(%rbp), %rax
movl $0xb, (%rax)
movb $0x62, -0x87(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x87(%rbp), %rsi
callq 0x1c3f0
movq %rax, -0xc0(%rbp)
jmp 0x29d6a
movq -0xc0(%rbp), %rax
movl $0x16, (%rax)
movb $0x63, -0x88(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x1c3f0
movq %rax, -0xc8(%rbp)
jmp 0x29d97
movq -0xc8(%rbp), %rax
movl $0x21, (%rax)
leaq -0x30(%rbp), %rdi
callq 0x2b200
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x2b200
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x70(%rbp)
movq 0x511d7(%rip), %rdi     # 0x7afb8
leaq 0x2d830(%rip), %rsi     # 0x57618
callq 0x31e0
movq %rax, -0xd0(%rbp)
jmp 0x29df6
leaq -0x68(%rbp), %rdi
callq 0x1c330
movq -0xd0(%rbp), %rdi
movsbl (%rax), %esi
callq 0x3250
movq %rax, -0xd8(%rbp)
jmp 0x29e17
movq -0xd8(%rbp), %rdi
leaq 0x2d7f5(%rip), %rsi     # 0x5761a
callq 0x31e0
movq %rax, -0xe0(%rbp)
jmp 0x29e33
leaq -0x68(%rbp), %rdi
callq 0x1c330
movq -0xe0(%rbp), %rdi
movl 0x4(%rax), %esi
callq 0x3350
movq %rax, -0xe8(%rbp)
jmp 0x29e54
movq -0xe8(%rbp), %rdi
movq 0x51136(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x29e69
movq 0x51148(%rip), %rdi     # 0x7afb8
leaq 0x2d7a1(%rip), %rsi     # 0x57618
callq 0x31e0
movq %rax, -0xf0(%rbp)
jmp 0x29e85
leaq -0x70(%rbp), %rdi
callq 0x1c330
movq -0xf0(%rbp), %rdi
movsbl (%rax), %esi
callq 0x3250
movq %rax, -0xf8(%rbp)
jmp 0x29ea6
movq -0xf8(%rbp), %rdi
leaq 0x2d766(%rip), %rsi     # 0x5761a
callq 0x31e0
movq %rax, -0x100(%rbp)
jmp 0x29ec2
leaq -0x70(%rbp), %rdi
callq 0x1c330
movq -0x100(%rbp), %rdi
movl 0x4(%rax), %esi
callq 0x3350
movq %rax, -0x108(%rbp)
jmp 0x29ee3
movq -0x108(%rbp), %rdi
movq 0x510a7(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x29ef8
leaq -0x30(%rbp), %rdi
callq 0x1c020
jmp 0x29f03
leaq -0x60(%rbp), %rdi
callq 0x1c020
jmp 0x29f0e
leaq -0x30(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x21500
movq 0x51096(%rip), %rdi     # 0x7afb8
leaq 0x2d6ef(%rip), %rsi     # 0x57618
callq 0x31e0
movq %rax, -0x110(%rbp)
jmp 0x29f37
leaq -0x68(%rbp), %rdi
callq 0x1c330
movq -0x110(%rbp), %rdi
movsbl (%rax), %esi
callq 0x3250
movq %rax, -0x118(%rbp)
jmp 0x29f58
movq -0x118(%rbp), %rdi
leaq 0x2d6b4(%rip), %rsi     # 0x5761a
callq 0x31e0
movq %rax, -0x120(%rbp)
jmp 0x29f74
leaq -0x68(%rbp), %rdi
callq 0x1c330
movq -0x120(%rbp), %rdi
movl 0x4(%rax), %esi
callq 0x3350
movq %rax, -0x128(%rbp)
jmp 0x29f95
movq -0x128(%rbp), %rdi
movq 0x50ff5(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x29faa
movq 0x51007(%rip), %rdi     # 0x7afb8
leaq 0x2d660(%rip), %rsi     # 0x57618
callq 0x31e0
movq %rax, -0x130(%rbp)
jmp 0x29fc6
leaq -0x70(%rbp), %rdi
callq 0x1c330
movq -0x130(%rbp), %rdi
movsbl (%rax), %esi
callq 0x3250
movq %rax, -0x138(%rbp)
jmp 0x29fe7
movq -0x138(%rbp), %rdi
leaq 0x2d625(%rip), %rsi     # 0x5761a
callq 0x31e0
movq %rax, -0x140(%rbp)
jmp 0x2a003
leaq -0x70(%rbp), %rdi
callq 0x1c330
movq -0x140(%rbp), %rdi
movl 0x4(%rax), %esi
callq 0x3350
movq %rax, -0x148(%rbp)
jmp 0x2a024
movq -0x148(%rbp), %rdi
movq 0x50f66(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x2a039
leaq -0x30(%rbp), %rdi
callq 0x1c020
jmp 0x2a044
leaq -0x60(%rbp), %rdi
callq 0x1c020
jmp 0x2a04f
leaq -0x60(%rbp), %rdi
callq 0x1c230
leaq -0x30(%rbp), %rdi
callq 0x1c230
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x1c230
leaq -0x30(%rbp), %rdi
callq 0x1c230
movq -0x80(%rbp), %rdi
callq 0x3360
nopw %cs:(%rax,%rax)