// File: DimitriDaSilva[P]42_ft_containers/tester/containers/vector/test_vector_modifiers.cpp
// Function: test_vector_modifiers_insert_cplusplus()
void
test_vector_modifiers_insert_cplusplus()
{
	ft::vector<int> myvector(3, 100);
	ft::vector<int>::iterator it;

	it = myvector.begin();
	it = myvector.insert(it, 200);

	myvector.insert(it, 2, 300);

	// "it" no longer valid, get a new one:
	it = myvector.begin();

	ft::vector<int> anothervector(2, 400);
	myvector.insert(it + 2, anothervector.begin(), anothervector.end());

	int myarray[] = {501, 502, 503};
	myvector.insert(myvector.begin(), myarray, myarray + 3);

	std::cout << "myvector contains:";
	for (it = myvector.begin(); it < myvector.end(); it++)
		std::cout << ' ' << *it;
	std::cout << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movl $0x64, -0x1c(%rbp)
leaq -0x1d(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x15410
movq -0x108(%rbp), %rcx
leaq -0x18(%rbp), %rdi
movl $0x3, %esi
leaq -0x1c(%rbp), %rdx
callq 0x35420
jmp 0x47d8d
leaq -0x1d(%rbp), %rdi
callq 0x48e0
leaq -0x38(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x3afc0
leaq -0x18(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x380c0
movq -0x120(%rbp), %rsi
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x3b350
movq -0x118(%rbp), %rdi
movl $0xc8, -0x54(%rbp)
movq -0x50(%rbp), %rsi
leaq -0x54(%rbp), %rdx
callq 0x4ba80
movq %rax, -0x110(%rbp)
jmp 0x47df6
movq -0x110(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3b350
movl $0x12c, -0x64(%rbp)     # imm = 0x12C
movq -0x60(%rbp), %rsi
leaq -0x18(%rbp), %rdi
movl $0x2, %edx
leaq -0x64(%rbp), %rcx
callq 0x4b930
movq %rax, -0x128(%rbp)
jmp 0x47e3c
movq -0x128(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x380c0
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x190, -0x94(%rbp)     # imm = 0x190
leaq -0x95(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x15410
movq -0x130(%rbp), %rcx
leaq -0x90(%rbp), %rdi
movl $0x2, %esi
leaq -0x94(%rbp), %rdx
callq 0x35420
jmp 0x47e9a
leaq -0x95(%rbp), %rdi
callq 0x48e0
leaq -0x38(%rbp), %rdi
movl $0x2, %esi
callq 0x3afe0
movq %rax, -0xa8(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x3b350
leaq -0x90(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x380c0
movq -0x140(%rbp), %rdi
movq %rax, -0xb0(%rbp)
callq 0x37f50
movq %rax, -0xb8(%rbp)
movq -0xa0(%rbp), %rsi
movq -0xb0(%rbp), %rdx
movq -0xb8(%rbp), %rcx
leaq -0x18(%rbp), %rdi
callq 0x4b9d0
movq %rax, -0x138(%rbp)
jmp 0x47f22
movq -0x138(%rbp), %rax
movq %rax, -0xc0(%rbp)
movabsq $0x1f6000001f5, %rax    # imm = 0x1F6000001F5
movq %rax, -0xd0(%rbp)
movl $0x1f7, -0xc8(%rbp)     # imm = 0x1F7
leaq -0x18(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0x380c0
movq %rax, -0xe0(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x3b350
movq -0x150(%rbp), %rdi
leaq -0xc4(%rbp), %rcx
movq -0xd8(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0x4bac0
movq %rax, -0x148(%rbp)
jmp 0x47f9f
movq -0x148(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq 0x33004(%rip), %rdi     # 0x7afb8
leaq 0xfcd1(%rip), %rsi      # 0x57c8c
callq 0x31e0
jmp 0x47fc2
leaq -0x18(%rbp), %rdi
callq 0x380c0
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x37f50
movq %rax, -0xf8(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x4bb60
testb $0x1, %al
jne 0x48006
jmp 0x480a8
movq 0x32fab(%rip), %rdi     # 0x7afb8
movl $0x20, %esi
callq 0x3250
movq %rax, -0x158(%rbp)
jmp 0x48020
leaq -0x38(%rbp), %rdi
callq 0x38310
movq -0x158(%rbp), %rdi
movl (%rax), %esi
callq 0x3350
jmp 0x48039
jmp 0x4803b
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
callq 0x4bba0
movq %rax, -0x100(%rbp)
jmp 0x47fdd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x1d(%rbp), %rdi
callq 0x48e0
jmp 0x480e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x480db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x95(%rbp), %rdi
callq 0x48e0
jmp 0x480db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x15250
jmp 0x480db
movq 0x32f09(%rip), %rdi     # 0x7afb8
movq 0x32ee2(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x480bd
leaq -0x90(%rbp), %rdi
callq 0x15250
leaq -0x18(%rbp), %rdi
callq 0x15250
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
leaq -0x18(%rbp), %rdi
callq 0x15250
movq -0x28(%rbp), %rdi
callq 0x3360
nopl (%rax)