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

	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 $0xf0, %rsp
leaq -0x39(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x3370
movq -0xc0(%rbp), %rdx
leaq 0x13dc6(%rip), %rsi     # 0x5710f
leaq -0x38(%rbp), %rdi
callq 0x3290
jmp 0x43354
leaq -0x4d(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x15360
movq -0xc8(%rbp), %rcx
leaq -0x18(%rbp), %rdi
movl $0x5, %esi
leaq -0x38(%rbp), %rdx
callq 0x3c220
jmp 0x4337f
leaq -0x4d(%rbp), %rdi
callq 0x16ae0
leaq -0x38(%rbp), %rdi
callq 0x3160
leaq -0x39(%rbp), %rdi
callq 0x3230
leaq -0x68(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x14ce0
movq -0xd0(%rbp), %rdi
callq 0x3f050
movq %rax, -0x70(%rbp)
leaq -0x18(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x3f050
movq -0xd8(%rbp), %rdi
movq %rax, -0x78(%rbp)
callq 0x3ed10
movq -0xd0(%rbp), %rdi
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rsi
movq -0x80(%rbp), %rdx
callq 0x4b510
jmp 0x433f4
leaq -0x18(%rbp), %rdi
callq 0x3c2a0
jmp 0x433ff
leaq -0x68(%rbp), %rdi
callq 0x3c2a0
jmp 0x4340a
leaq -0x68(%rbp), %rdi
callq 0x3f050
movq %rax, -0x88(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x4b550
movq %rax, -0xe0(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x4b550
movq %rax, %rcx
movq -0xe0(%rbp), %rax
cmpq %rcx, %rax
je 0x434c3
movq 0x37b6c(%rip), %rdi     # 0x7afb8
leaq 0x147f2(%rip), %rsi     # 0x57c45
callq 0x31e0
movq %rax, -0xe8(%rbp)
jmp 0x43461
movq -0xe8(%rbp), %rdi
movq 0x37b29(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x43476
jmp 0x434c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x434a4
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 0x4357a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x43568
leaq -0xa0(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x3e0c0
jmp 0x434d5
leaq -0xa0(%rbp), %rdi
callq 0x3c2a0
jmp 0x434e3
leaq -0xb8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x3e0c0
jmp 0x434f5
leaq -0xb8(%rbp), %rdi
callq 0x3c2a0
jmp 0x43503
leaq -0xb8(%rbp), %rdi
callq 0x152b0
leaq -0xa0(%rbp), %rdi
callq 0x152b0
leaq -0x68(%rbp), %rdi
callq 0x152b0
leaq -0x18(%rbp), %rdi
callq 0x152b0
addq $0xf0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4355c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x152b0
leaq -0xa0(%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)