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

	vec.reserve(101);

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
leaq -0x39(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x3370
movq -0xd8(%rbp), %rdx
leaq 0x11a66(%rip), %rsi     # 0x5710f
leaq -0x38(%rbp), %rdi
callq 0x3290
jmp 0x456b4
leaq -0x4d(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x15360
movq -0xe0(%rbp), %rcx
leaq -0x18(%rbp), %rdi
movl $0x64, %esi
leaq -0x38(%rbp), %rdx
callq 0x3c220
jmp 0x456df
leaq -0x4d(%rbp), %rdi
callq 0x16ae0
leaq -0x38(%rbp), %rdi
callq 0x3160
leaq -0x39(%rbp), %rdi
callq 0x3230
leaq -0x18(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x3f050
movq %rax, -0x58(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x4b670
movq -0xe8(%rbp), %rdi
movl $0x65, %esi
callq 0x4b750
jmp 0x4572a
leaq -0x18(%rbp), %rdi
callq 0x3c2a0
jmp 0x45735
leaq -0x18(%rbp), %rdi
callq 0x3f050
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x58(%rbp), %rdi
movl $0x32, %esi
callq 0x4b850
movq %rax, -0x80(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x4b6d0
leaq -0xa1(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x3370
movq -0xf0(%rbp), %rdx
leaq 0x1230d(%rip), %rsi     # 0x57a97
leaq -0xa0(%rbp), %rdi
callq 0x3290
jmp 0x45798
movq -0x78(%rbp), %rsi
leaq -0x18(%rbp), %rdi
leaq -0xa0(%rbp), %rdx
callq 0x4b690
movq %rax, -0xf8(%rbp)
jmp 0x457b5
movq -0xf8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x3160
leaq -0xa1(%rbp), %rdi
callq 0x3230
leaq -0x18(%rbp), %rdi
callq 0x3c2a0
jmp 0x457eb
leaq -0x18(%rbp), %rdi
callq 0x3f050
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x58(%rbp), %rdi
movl $0x32, %esi
callq 0x4b850
movq %rax, -0xb8(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x4b710
testb $0x1, %al
jne 0x45834
jmp 0x458e0
movq 0x3577d(%rip), %rdi     # 0x7afb8
leaq 0x12c9b(%rip), %rsi     # 0x584dd
callq 0x31e0
movq %rax, -0x100(%rbp)
jmp 0x45850
movq -0x100(%rbp), %rdi
movq 0x3573a(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x45865
jmp 0x458e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x45893
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 0x45919
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x45910
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x458d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x3160
leaq -0xa1(%rbp), %rdi
callq 0x3230
jmp 0x45910
leaq -0xd0(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x3e0c0
jmp 0x458f2
leaq -0xd0(%rbp), %rdi
callq 0x152b0
leaq -0x18(%rbp), %rdi
callq 0x152b0
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
leaq -0x18(%rbp), %rdi
callq 0x152b0
movq -0x48(%rbp), %rdi
callq 0x3360
nopw %cs:(%rax,%rax)