// File: DimitriDaSilva[P]42_ft_containers/tester/containers/vector/test_vector_modifiers.cpp
// Function: test_vector_modifiers_insert_range_begin_w_realloc()
void
test_vector_modifiers_insert_range_begin_w_realloc()
{
	ft::vector<int> vec_random;

	srand(g_seed);

	for (int i = 0; i < 50; i++)
		vec_random.push_back(rand() % 100 - 100 / 2);

	ft::vector<int> vec(50, 42);

	print_vec_info(vec);
	vec.insert(vec.begin(), vec_random.begin(), vec_random.end());
	print_vec_info(vec);

	ft::vector<int> empty;

	print_vec_info(empty);
	empty.insert(empty.begin(), vec_random.begin(), vec_random.end());
	print_vec_info(empty);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
leaq -0x18(%rbp), %rdi
callq 0x14d00
leaq 0x341ad(%rip), %rax     # 0x7b208
movl (%rax), %edi
callq 0x31d0
movl $0x0, -0x1c(%rbp)
cmpl $0x32, -0x1c(%rbp)
jge 0x470ca
callq 0x30a0
movl %eax, %ecx
movslq %ecx, %rax
imulq $0x51eb851f, %rax, %rax # imm = 0x51EB851F
movq %rax, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rax
addl %edx, %eax
imull $0x64, %eax, %edx
movl %ecx, %eax
negl %edx
movl %edx, %ecx
leal -0x32(%rax,%rcx), %eax
movl %eax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x3ae40
jmp 0x470ac
jmp 0x470ae
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x47069
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x47310
movl $0x2a, -0x4c(%rbp)
leaq -0x4d(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x15410
movq -0xf0(%rbp), %rcx
leaq -0x48(%rbp), %rdi
movl $0x32, %esi
leaq -0x4c(%rbp), %rdx
callq 0x35420
jmp 0x470fc
leaq -0x4d(%rbp), %rdi
callq 0x48e0
leaq -0x48(%rbp), %rdi
callq 0x3c0a0
jmp 0x47110
leaq -0x48(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x380c0
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3b350
leaq -0x18(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x380c0
movq -0x108(%rbp), %rdi
movq %rax, -0x68(%rbp)
callq 0x37f50
movq -0x100(%rbp), %rdi
movq %rax, -0x70(%rbp)
movq -0x58(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x70(%rbp), %rcx
callq 0x4b9d0
movq %rax, -0xf8(%rbp)
jmp 0x47176
movq -0xf8(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x3c0a0
jmp 0x4718c
leaq -0x90(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x14d00
movq -0x110(%rbp), %rdi
callq 0x3c0a0
jmp 0x471ad
leaq -0x90(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x380c0
movq %rax, -0xa0(%rbp)
leaq -0x98(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x3b350
leaq -0x18(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x380c0
movq -0x128(%rbp), %rdi
movq %rax, -0xa8(%rbp)
callq 0x37f50
movq -0x120(%rbp), %rdi
movq %rax, -0xb0(%rbp)
movq -0x98(%rbp), %rsi
movq -0xa8(%rbp), %rdx
movq -0xb0(%rbp), %rcx
callq 0x4b9d0
movq %rax, -0x118(%rbp)
jmp 0x4722e
movq -0x118(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x3c0a0
jmp 0x4724a
leaq -0xd0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x375b0
jmp 0x4725c
leaq -0xe8(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x375b0
jmp 0x47271
leaq -0xe8(%rbp), %rdi
callq 0x15250
leaq -0xd0(%rbp), %rdi
callq 0x15250
leaq -0x90(%rbp), %rdi
callq 0x15250
leaq -0x48(%rbp), %rdi
callq 0x15250
leaq -0x18(%rbp), %rdi
callq 0x15250
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x4d(%rbp), %rdi
callq 0x48e0
jmp 0x47310
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x47307
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x472fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x15250
leaq -0x90(%rbp), %rdi
callq 0x15250
leaq -0x48(%rbp), %rdi
callq 0x15250
leaq -0x18(%rbp), %rdi
callq 0x15250
movq -0x28(%rbp), %rdi
callq 0x3360
nopw %cs:(%rax,%rax)