// File: DimitriDaSilva[P]42_ft_containers/tester/containers/map/test_map_reverse_iterators.cpp
// Function: test_map_reverse_iterators_operator_decrement()
void
test_map_reverse_iterators_operator_decrement()
{
	ft::map<int, char> map;

	for (int i = 48; i < 58; i++)
		map.insert(ft::make_pair(i, i));

	typedef ft::map<int, char>::iterator iter_type;

	ft::reverse_iterator<iter_type> rev_begin(map.end());
	ft::reverse_iterator<iter_type> rev_end(map.begin());

	ft::reverse_iterator<iter_type> rev_iterator = rev_begin;

	while (rev_iterator != rev_end)
		std::cout << "[" << rev_iterator->first << "] = " << (rev_iterator++)->second << std::endl;
	std::cout << std::endl;

	while (rev_iterator != rev_begin)
		std::cout << " [" << (--rev_iterator)->first << "] = " << rev_iterator->second;
	std::cout << std::endl;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
leaq -0x30(%rbp), %rdi
callq 0x1f960
movl $0x30, -0x34(%rbp)
cmpl $0x3a, -0x34(%rbp)
jge 0x1eaa6
leaq -0x34(%rbp), %rsi
movq %rsi, %rdi
callq 0x1c250
movq %rax, -0x98(%rbp)
jmp 0x1ea46
movq -0x98(%rbp), %rax
movq %rax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
callq 0x1f980
movb %dl, -0xa1(%rbp)
movq %rax, -0xa0(%rbp)
jmp 0x1ea6d
movb -0xa1(%rbp), %al
movq -0xa0(%rbp), %rcx
movq %rcx, -0x60(%rbp)
movb %al, -0x58(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1ea2b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x1fa90
jmp 0x1ed02
leaq -0x30(%rbp), %rdi
callq 0x1f9f0
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0x1fa20
jmp 0x1eac2
leaq -0x30(%rbp), %rdi
callq 0x1f9c0
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x1fa20
jmp 0x1eade
leaq -0x88(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x1fb50
jmp 0x1eaf0
jmp 0x1eaf2
leaq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x1faf0
movb %al, -0xa2(%rbp)
jmp 0x1eb0a
movb -0xa2(%rbp), %al
testb $0x1, %al
jne 0x1eb19
jmp 0x1ebea
movq 0x5c498(%rip), %rdi     # 0x7afb8
leaq 0x38af1(%rip), %rsi     # 0x57618
callq 0x31e0
movq %rax, -0xb0(%rbp)
jmp 0x1eb35
leaq -0x88(%rbp), %rdi
callq 0x1fab0
movq %rax, -0xb8(%rbp)
jmp 0x1eb4a
movq -0xb0(%rbp), %rdi
movq -0xb8(%rbp), %rax
movl (%rax), %esi
callq 0x3350
movq %rax, -0xc0(%rbp)
jmp 0x1eb68
movq -0xc0(%rbp), %rdi
leaq 0x38aa4(%rip), %rsi     # 0x5761a
callq 0x31e0
movq %rax, -0xc8(%rbp)
jmp 0x1eb84
leaq -0x90(%rbp), %rdi
leaq -0x88(%rbp), %rsi
xorl %edx, %edx
callq 0x1fb70
jmp 0x1eb9b
leaq -0x90(%rbp), %rdi
callq 0x1fab0
movq %rax, -0xd0(%rbp)
jmp 0x1ebb0
movq -0xc8(%rbp), %rdi
movq -0xd0(%rbp), %rax
movsbl 0x4(%rax), %esi
callq 0x3250
movq %rax, -0xd8(%rbp)
jmp 0x1ebd0
movq -0xd8(%rbp), %rdi
movq 0x5c3ba(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x1ebe5
jmp 0x1eaf2
movq 0x5c3c7(%rip), %rdi     # 0x7afb8
movq 0x5c3a0(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x1ebff
jmp 0x1ec01
leaq -0x88(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x1faf0
movb %al, -0xd9(%rbp)
jmp 0x1ec19
movb -0xd9(%rbp), %al
testb $0x1, %al
jne 0x1ec28
jmp 0x1ecdb
movq 0x5c389(%rip), %rdi     # 0x7afb8
leaq 0x389e1(%rip), %rsi     # 0x57617
callq 0x31e0
movq %rax, -0xe8(%rbp)
jmp 0x1ec44
leaq -0x88(%rbp), %rdi
callq 0x1fbb0
movq %rax, -0xf0(%rbp)
jmp 0x1ec59
movq -0xf0(%rbp), %rdi
callq 0x1fab0
movq %rax, -0xf8(%rbp)
jmp 0x1ec6e
movq -0xe8(%rbp), %rdi
movq -0xf8(%rbp), %rax
movl (%rax), %esi
callq 0x3350
movq %rax, -0x100(%rbp)
jmp 0x1ec8c
movq -0x100(%rbp), %rdi
leaq 0x38980(%rip), %rsi     # 0x5761a
callq 0x31e0
movq %rax, -0x108(%rbp)
jmp 0x1eca8
leaq -0x88(%rbp), %rdi
callq 0x1fab0
movq %rax, -0x110(%rbp)
jmp 0x1ecbd
movq -0x108(%rbp), %rdi
movq -0x110(%rbp), %rax
movsbl 0x4(%rax), %esi
callq 0x3250
jmp 0x1ecd6
jmp 0x1ec01
movq 0x5c2d6(%rip), %rdi     # 0x7afb8
movq 0x5c2af(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x1ecf0
leaq -0x30(%rbp), %rdi
callq 0x1fa90
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3360
nopl (%rax,%rax)