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

	vec.reserve(101);

	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;

	vec.reserve(1);

	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 $0x170, %rsp            # imm = 0x170
leaq -0x39(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x3370
movq -0x138(%rbp), %rdx
leaq 0x12116(%rip), %rsi     # 0x5710f
leaq -0x38(%rbp), %rdi
callq 0x3290
jmp 0x45004
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 0x4502f
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
movl $0x65, %esi
callq 0x4b750
jmp 0x45063
leaq -0x18(%rbp), %rdi
callq 0x3c2a0
jmp 0x4506e
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 0x129ee(%rip), %rsi     # 0x57a97
leaq -0x90(%rbp), %rdi
callq 0x3290
jmp 0x450b7
movq -0x68(%rbp), %rsi
leaq -0x18(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x4b690
movq %rax, -0x150(%rbp)
jmp 0x450d4
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 0x4510a
leaq -0x18(%rbp), %rdi
callq 0x3f050
movq %rax, -0xa0(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x4b710
testb $0x1, %al
jne 0x45133
jmp 0x451eb
movq 0x35e7e(%rip), %rdi     # 0x7afb8
leaq 0x1339c(%rip), %rsi     # 0x584dd
callq 0x31e0
movq %rax, -0x158(%rbp)
jmp 0x4514f
movq -0x158(%rbp), %rdi
movq 0x35e3b(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x45164
jmp 0x451eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x45195
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 0x453f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x453ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x451da
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 0x453ee
leaq -0xb8(%rbp), %rdi
callq 0x14ce0
leaq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x4b750
jmp 0x45207
leaq -0xb8(%rbp), %rdi
callq 0x3c2a0
jmp 0x45215
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, -0x160(%rbp)
callq 0x3370
movq -0x160(%rbp), %rdx
leaq 0x1283b(%rip), %rsi     # 0x57a97
leaq -0xf0(%rbp), %rdi
callq 0x3290
jmp 0x4526a
movq -0xc8(%rbp), %rsi
leaq -0xb8(%rbp), %rdi
leaq -0xf0(%rbp), %rdx
callq 0x4b690
movq %rax, -0x168(%rbp)
jmp 0x4528d
movq -0x168(%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 0x452cc
leaq -0xb8(%rbp), %rdi
callq 0x3f050
movq %rax, -0x100(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x4b710
testb $0x1, %al
jne 0x452f5
jmp 0x4536d
movq 0x35cbc(%rip), %rdi     # 0x7afb8
leaq 0x131da(%rip), %rsi     # 0x584dd
callq 0x31e0
movq %rax, -0x170(%rbp)
jmp 0x45311
movq -0x170(%rbp), %rdi
movq 0x35c79(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x45326
jmp 0x4536d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x453e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4535f
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 0x453e2
leaq -0x118(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x3e0c0
jmp 0x4537f
leaq -0x130(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x3e0c0
jmp 0x45394
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 $0x170, %rsp            # imm = 0x170
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