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

	print_vec_info(vec);
	tmp = vec.insert(vec.begin(), "42");
	print_vec_info(vec);

	if (vec.begin() == tmp)
		std::cout << "valid" << std::endl;

	ft::vector<std::string> empty;

	print_vec_info(empty);
	tmp = empty.insert(empty.begin(), "42");
	print_vec_info(empty);

	if (tmp == empty.begin())
		std::cout << "valid" << std::endl;

	{
		ft::vector<std::string> cpy1 = vec;
		ft::vector<std::string> cpy2 = empty;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
leaq -0x39(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x3370
movq -0x138(%rbp), %rdx
leaq 0x12536(%rip), %rsi     # 0x5710f
leaq -0x38(%rbp), %rdi
callq 0x3290
jmp 0x44be4
leaq -0x4d(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x15360
movq -0x140(%rbp), %rcx
leaq -0x18(%rbp), %rdi
movl $0x64, %esi
leaq -0x38(%rbp), %rdx
callq 0x3c220
jmp 0x44c0f
leaq -0x4d(%rbp), %rdi
callq 0x16ae0
leaq -0x38(%rbp), %rdi
callq 0x3160
leaq -0x39(%rbp), %rdi
callq 0x3230
leaq -0x58(%rbp), %rdi
callq 0x4b670
leaq -0x18(%rbp), %rdi
callq 0x3c2a0
jmp 0x44c3e
leaq -0x18(%rbp), %rdi
callq 0x3f050
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4b6d0
leaq -0x91(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0x3370
movq -0x148(%rbp), %rdx
leaq 0x12e1e(%rip), %rsi     # 0x57a97
leaq -0x90(%rbp), %rdi
callq 0x3290
jmp 0x44c87
movq -0x68(%rbp), %rsi
leaq -0x18(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x4b690
movq %rax, -0x150(%rbp)
jmp 0x44ca4
movq -0x150(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x3160
leaq -0x91(%rbp), %rdi
callq 0x3230
leaq -0x18(%rbp), %rdi
callq 0x3c2a0
jmp 0x44cda
leaq -0x18(%rbp), %rdi
callq 0x3f050
movq %rax, -0xa0(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x4b710
testb $0x1, %al
jne 0x44d03
jmp 0x44dbb
movq 0x362ae(%rip), %rdi     # 0x7afb8
leaq 0x137cc(%rip), %rsi     # 0x584dd
callq 0x31e0
movq %rax, -0x158(%rbp)
jmp 0x44d1f
movq -0x158(%rbp), %rdi
movq 0x3626b(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x44d34
jmp 0x44dbb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x44d65
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 0x44fbe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x44fb5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x44daa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x3160
leaq -0x91(%rbp), %rdi
callq 0x3230
jmp 0x44fb5
leaq -0xb8(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x14ce0
movq -0x160(%rbp), %rdi
callq 0x3c2a0
jmp 0x44ddc
leaq -0xb8(%rbp), %rdi
callq 0x3f050
movq %rax, -0xd0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x4b6d0
leaq -0xf1(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0x3370
movq -0x168(%rbp), %rdx
leaq 0x12c74(%rip), %rsi     # 0x57a97
leaq -0xf0(%rbp), %rdi
callq 0x3290
jmp 0x44e31
movq -0xc8(%rbp), %rsi
leaq -0xb8(%rbp), %rdi
leaq -0xf0(%rbp), %rdx
callq 0x4b690
movq %rax, -0x170(%rbp)
jmp 0x44e54
movq -0x170(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x3160
leaq -0xf1(%rbp), %rdi
callq 0x3230
leaq -0xb8(%rbp), %rdi
callq 0x3c2a0
jmp 0x44e93
leaq -0xb8(%rbp), %rdi
callq 0x3f050
movq %rax, -0x100(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x4b710
testb $0x1, %al
jne 0x44ebc
jmp 0x44f34
movq 0x360f5(%rip), %rdi     # 0x7afb8
leaq 0x13613(%rip), %rsi     # 0x584dd
callq 0x31e0
movq %rax, -0x178(%rbp)
jmp 0x44ed8
movq -0x178(%rbp), %rdi
movq 0x360b2(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x44eed
jmp 0x44f34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x44fa9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x44f26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x3160
leaq -0xf1(%rbp), %rdi
callq 0x3230
jmp 0x44fa9
leaq -0x118(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x3e0c0
jmp 0x44f46
leaq -0x130(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x3e0c0
jmp 0x44f5b
leaq -0x130(%rbp), %rdi
callq 0x152b0
leaq -0x118(%rbp), %rdi
callq 0x152b0
leaq -0xb8(%rbp), %rdi
callq 0x152b0
leaq -0x18(%rbp), %rdi
callq 0x152b0
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x152b0
leaq -0xb8(%rbp), %rdi
callq 0x152b0
leaq -0x18(%rbp), %rdi
callq 0x152b0
movq -0x48(%rbp), %rdi
callq 0x3360
nopw (%rax,%rax)