// File: DimitriDaSilva[P]42_ft_containers/containers/vector.hpp
// Function: ft::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>::erase(ft::random_access_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, ft::random_access_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>)
iterator
		erase(iterator first, iterator last)
		{
			difference_type	distance = ft::distance(first, last);
			iterator save_first = first;

			// Destroy the range of elements
			while (first != last)
				_allocator.destroy(&*first++);

			// Offset all the elements by distance to fill the gap
			for (iterator it = save_first; it + distance != end(); it++)
			{
				_allocator.construct(&*it, *(it + distance));
				_allocator.destroy(&*(it + distance));
			}

			_size -= distance;

			return save_first;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rcx, -0x88(%rbp)
movq %rdx, -0xa8(%rbp)
movq %rsi, %rax
movq -0xa8(%rbp), %rsi
movq %rdi, -0xa0(%rbp)
movq %rdi, %rdx
movq %rdx, -0x98(%rbp)
movq %rdi, -0x8(%rbp)
movq %rax, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x56ac0
movq -0x88(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x56ac0
jmp 0x67dca
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x63ff0
movq %rax, -0xb0(%rbp)
jmp 0x67de0
leaq -0x38(%rbp), %rdi
callq 0x564d0
jmp 0x67deb
leaq -0x30(%rbp), %rdi
callq 0x564d0
movq -0xb0(%rbp), %rax
movq -0xa0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
movq %rax, -0x28(%rbp)
movb $0x0, -0x45(%rbp)
callq 0x56ac0
movq -0x88(%rbp), %rsi
movq -0xa8(%rbp), %rdi
callq 0x56590
testb $0x1, %al
jne 0x67e32
jmp 0x67ee3
movq -0xa8(%rbp), %rsi
movq -0x90(%rbp), %rax
addq $0x10, %rax
movq %rax, -0xb8(%rbp)
leaq -0x50(%rbp), %rdi
xorl %edx, %edx
callq 0x56660
jmp 0x67e58
leaq -0x50(%rbp), %rdi
callq 0x566c0
movq -0xb8(%rbp), %rdi
movq %rax, %rsi
callq 0x20ab0
jmp 0x67e72
leaq -0x50(%rbp), %rdi
callq 0x564d0
jmp 0x67e7d
jmp 0x67e16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x67ea6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x564d0
jmp 0x67ea4
jmp 0x67ea6
leaq -0x30(%rbp), %rdi
callq 0x564d0
jmp 0x67eb1
jmp 0x680fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x680eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x564d0
jmp 0x67ede
jmp 0x680eb
movq -0xa0(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x56ac0
jmp 0x67ef5
jmp 0x67ef7
movq -0x28(%rbp), %rdx
leaq -0x60(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x56ae0
jmp 0x67f0a
movq -0x90(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0x565c0
jmp 0x67f1c
leaq -0x60(%rbp), %rdi
leaq -0x68(%rbp), %rsi
movq %rsi, -0xc8(%rbp)
callq 0x56590
movq -0xc8(%rbp), %rdi
movb %al, -0xb9(%rbp)
callq 0x564d0
jmp 0x67f44
leaq -0x60(%rbp), %rdi
callq 0x564d0
jmp 0x67f4f
movb -0xb9(%rbp), %al
testb $0x1, %al
jne 0x67f96
jmp 0x67f5b
leaq -0x58(%rbp), %rdi
callq 0x564d0
jmp 0x680a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x680a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x564d0
jmp 0x67f91
jmp 0x680a2
movq -0x90(%rbp), %rax
addq $0x10, %rax
movq %rax, -0xe0(%rbp)
leaq -0x58(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x566c0
movq -0xd8(%rbp), %rsi
movq %rax, -0xd0(%rbp)
movq -0x28(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x56ae0
jmp 0x67fd5
leaq -0x70(%rbp), %rdi
callq 0x566c0
movq -0xe0(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq %rax, %rdx
callq 0x53e60
jmp 0x67ff6
leaq -0x70(%rbp), %rdi
callq 0x564d0
jmp 0x68001
movq -0x90(%rbp), %rax
addq $0x10, %rax
movq %rax, -0xe8(%rbp)
movq -0x28(%rbp), %rdx
leaq -0x78(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x56ae0
jmp 0x68026
leaq -0x78(%rbp), %rdi
callq 0x566c0
movq -0xe8(%rbp), %rdi
movq %rax, %rsi
callq 0x20ab0
jmp 0x68040
leaq -0x78(%rbp), %rdi
callq 0x564d0
jmp 0x6804b
jmp 0x6804d
leaq -0x80(%rbp), %rdi
leaq -0x58(%rbp), %rsi
xorl %edx, %edx
callq 0x56660
jmp 0x6805e
leaq -0x80(%rbp), %rdi
callq 0x564d0
jmp 0x68069
jmp 0x67ef7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x564d0
jmp 0x68085
jmp 0x680a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x564d0
jmp 0x6809e
jmp 0x680a2
jmp 0x680af
leaq -0x58(%rbp), %rdi
callq 0x564d0
jmp 0x680ad
jmp 0x680eb
movq -0x90(%rbp), %rax
movq -0x28(%rbp), %rdx
movq 0x18(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x18(%rax)
movb $0x1, -0x45(%rbp)
testb $0x1, -0x45(%rbp)
jne 0x680db
movq -0xa0(%rbp), %rdi
callq 0x564d0
movq -0x98(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
movq -0xa0(%rbp), %rdi
callq 0x564d0
jmp 0x680f9
jmp 0x680fb
movq -0x40(%rbp), %rdi
callq 0x6310
movq %rax, %rdi
callq 0x7110
nopl (%rax)