// File: DimitriDaSilva[P]42_ft_containers/tester/containers/vector/test_vector_modifiers.cpp
// Function: test_vector_modifiers_assign_range_not_empty_dest3()
void
test_vector_modifiers_assign_range_not_empty_dest3()
{
	ft::vector<std::string> vec(5, "test");
	ft::vector<std::string> new_vec(100, "42");
	ft::vector<std::string>::iterator it = new_vec.begin();

	print_vec_info(new_vec);
	new_vec.assign(vec.begin(), vec.end());
	print_vec_info(vec);
	print_vec_info(new_vec);

	ft::vector<std::string>::iterator new_it = new_vec.begin();
	if (&*it != &*new_it)
		std::cout << "Reallocation occurred" << std::endl;

	{
		ft::vector<std::string> cpy1 = new_vec;
		print_vec_info(cpy1);
		ft::vector<std::string> cpy2(new_vec);
		print_vec_info(cpy2);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
leaq -0x39(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x3370
movq -0xe8(%rbp), %rdx
leaq 0x134b6(%rip), %rsi     # 0x5710f
leaq -0x38(%rbp), %rdi
callq 0x3290
jmp 0x43c64
leaq -0x4d(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x15360
movq -0xf0(%rbp), %rcx
leaq -0x18(%rbp), %rdi
movl $0x5, %esi
leaq -0x38(%rbp), %rdx
callq 0x3c220
jmp 0x43c8f
leaq -0x4d(%rbp), %rdi
callq 0x16ae0
leaq -0x38(%rbp), %rdi
callq 0x3160
leaq -0x39(%rbp), %rdi
callq 0x3230
leaq -0x89(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x3370
movq -0xf8(%rbp), %rdx
leaq 0x13dcc(%rip), %rsi     # 0x57a97
leaq -0x88(%rbp), %rdi
callq 0x3290
jmp 0x43cd9
leaq -0x8a(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x15360
movq -0x100(%rbp), %rcx
leaq -0x68(%rbp), %rdi
movl $0x64, %esi
leaq -0x88(%rbp), %rdx
callq 0x3c220
jmp 0x43d0a
leaq -0x8a(%rbp), %rdi
callq 0x16ae0
leaq -0x88(%rbp), %rdi
callq 0x3160
leaq -0x89(%rbp), %rdi
callq 0x3230
leaq -0x68(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x3f050
movq -0x108(%rbp), %rdi
movq %rax, -0x98(%rbp)
callq 0x3c2a0
jmp 0x43d53
leaq -0x18(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x3f050
movq -0x110(%rbp), %rdi
movq %rax, -0xa0(%rbp)
callq 0x3ed10
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
leaq -0x68(%rbp), %rdi
callq 0x4b510
jmp 0x43d96
leaq -0x18(%rbp), %rdi
callq 0x3c2a0
jmp 0x43da1
leaq -0x68(%rbp), %rdi
callq 0x3c2a0
jmp 0x43dac
leaq -0x68(%rbp), %rdi
callq 0x3f050
movq %rax, -0xb0(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x4b550
movq %rax, -0x118(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x4b550
movq %rax, %rcx
movq -0x118(%rbp), %rax
cmpq %rcx, %rax
je 0x43eb2
movq 0x371c3(%rip), %rdi     # 0x7afb8
leaq 0x13e49(%rip), %rsi     # 0x57c45
callq 0x31e0
movq %rax, -0x120(%rbp)
jmp 0x43e0a
movq -0x120(%rbp), %rdi
movq 0x37180(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x43e1f
jmp 0x43eb2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x43e50
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x4d(%rbp), %rdi
callq 0x16ae0
leaq -0x38(%rbp), %rdi
callq 0x3160
leaq -0x39(%rbp), %rdi
callq 0x3230
jmp 0x43f69
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x43e90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x8a(%rbp), %rdi
callq 0x16ae0
leaq -0x88(%rbp), %rdi
callq 0x3160
leaq -0x89(%rbp), %rdi
callq 0x3230
jmp 0x43f60
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x43f57
leaq -0xc8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x3e0c0
jmp 0x43ec4
leaq -0xc8(%rbp), %rdi
callq 0x3c2a0
jmp 0x43ed2
leaq -0xe0(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x3e0c0
jmp 0x43ee4
leaq -0xe0(%rbp), %rdi
callq 0x3c2a0
jmp 0x43ef2
leaq -0xe0(%rbp), %rdi
callq 0x152b0
leaq -0xc8(%rbp), %rdi
callq 0x152b0
leaq -0x68(%rbp), %rdi
callq 0x152b0
leaq -0x18(%rbp), %rdi
callq 0x152b0
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x43f4b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x152b0
leaq -0xc8(%rbp), %rdi
callq 0x152b0
leaq -0x68(%rbp), %rdi
callq 0x152b0
leaq -0x18(%rbp), %rdi
callq 0x152b0
movq -0x48(%rbp), %rdi
callq 0x3360
nopw %cs:(%rax,%rax)