// File: DimitriDaSilva[P]42_ft_containers/tester/containers/vector/test_vector_modifiers.cpp
// Function: test_vector_modifiers_assign_range_not_empty_dest1()
void
test_vector_modifiers_assign_range_not_empty_dest1()
{
	ft::vector<std::string> vec(5, "test");
	ft::vector<std::string> new_vec(2, "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 0x13b56(%rip), %rsi     # 0x5710f
leaq -0x38(%rbp), %rdi
callq 0x3290
jmp 0x435c4
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 0x435ef
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 0x1446c(%rip), %rsi     # 0x57a97
leaq -0x88(%rbp), %rdi
callq 0x3290
jmp 0x43639
leaq -0x8a(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x15360
movq -0x100(%rbp), %rcx
leaq -0x68(%rbp), %rdi
movl $0x2, %esi
leaq -0x88(%rbp), %rdx
callq 0x3c220
jmp 0x4366a
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 0x436b3
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 0x436f6
leaq -0x18(%rbp), %rdi
callq 0x3c2a0
jmp 0x43701
leaq -0x68(%rbp), %rdi
callq 0x3c2a0
jmp 0x4370c
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 0x43812
movq 0x37863(%rip), %rdi     # 0x7afb8
leaq 0x144e9(%rip), %rsi     # 0x57c45
callq 0x31e0
movq %rax, -0x120(%rbp)
jmp 0x4376a
movq -0x120(%rbp), %rdi
movq 0x37820(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x4377f
jmp 0x43812
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x437b0
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 0x438c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x437f0
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 0x438c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x438b7
leaq -0xc8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x3e0c0
jmp 0x43824
leaq -0xc8(%rbp), %rdi
callq 0x3c2a0
jmp 0x43832
leaq -0xe0(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x3e0c0
jmp 0x43844
leaq -0xe0(%rbp), %rdi
callq 0x3c2a0
jmp 0x43852
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 0x438ab
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)