// File: DimitriDaSilva[P]42_ft_containers/tester/containers/set/test_set_operations.cpp
// Function: test_set_operations_upper_bound()
void
test_set_operations_upper_bound()
{
	ft::set<int> set;
	ft::set<int>::iterator it;

	for (int i = 0; i < 10; i++)
		set.insert(i * 10);

	it = set.upper_bound(20);
	if (it != set.end())
		std::cout << *it << std::endl;
	else
		std::cout << "end()" << std::endl;

	it = set.upper_bound(42);
	if (it != set.end())
		std::cout << *it << std::endl;
	else
		std::cout << "end()" << std::endl;

	it = set.upper_bound(142);
	if (it != set.end())
		std::cout << *it << std::endl;
	else
		std::cout << "end()" << std::endl;

	it = set.upper_bound(-42);
	if (it != set.end())
		std::cout << *it << std::endl;
	else
		std::cout << "end()" << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
leaq -0x30(%rbp), %rdi
callq 0x4830
leaq -0x38(%rbp), %rdi
callq 0xdf50
movl $0x0, -0x3c(%rbp)
cmpl $0xa, -0x3c(%rbp)
jge 0x1229c
movl -0x3c(%rbp), %ecx
addl %ecx, %ecx
movl %ecx, %eax
leal (%rax,%rax,4), %eax
movl %eax, -0x40(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x7770
movb %dl, -0xc9(%rbp)
movq %rax, -0xc8(%rbp)
jmp 0x12263
movb -0xc9(%rbp), %al
movq -0xc8(%rbp), %rcx
movq %rcx, -0x60(%rbp)
movb %al, -0x58(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x12234
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x4960
jmp 0x125c6
movl $0x14, -0x6c(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x6c(%rbp), %rsi
callq 0x12ff0
movq %rax, -0xd8(%rbp)
jmp 0x122b9
movq -0xd8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x75b0
movq %rax, -0x78(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x6060
testb $0x1, %al
jne 0x122ec
jmp 0x12323
leaq -0x38(%rbp), %rdi
callq 0x60c0
movl (%rax), %esi
movq 0x68cba(%rip), %rdi     # 0x7afb8
callq 0x3350
movq %rax, -0xe0(%rbp)
jmp 0x1230c
movq -0xe0(%rbp), %rdi
movq 0x68c7e(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x12321
jmp 0x12356
movq 0x68c8e(%rip), %rdi     # 0x7afb8
leaq 0x4505b(%rip), %rsi     # 0x5738c
callq 0x31e0
movq %rax, -0xe8(%rbp)
jmp 0x1233f
movq -0xe8(%rbp), %rdi
movq 0x68c4b(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x12354
jmp 0x12356
movl $0x2a, -0x84(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x84(%rbp), %rsi
callq 0x12ff0
movq %rax, -0xf0(%rbp)
jmp 0x12379
movq -0xf0(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x75b0
movq %rax, -0x90(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x6060
testb $0x1, %al
jne 0x123b2
jmp 0x123e9
leaq -0x38(%rbp), %rdi
callq 0x60c0
movl (%rax), %esi
movq 0x68bf4(%rip), %rdi     # 0x7afb8
callq 0x3350
movq %rax, -0xf8(%rbp)
jmp 0x123d2
movq -0xf8(%rbp), %rdi
movq 0x68bb8(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x123e7
jmp 0x1241c
movq 0x68bc8(%rip), %rdi     # 0x7afb8
leaq 0x44f95(%rip), %rsi     # 0x5738c
callq 0x31e0
movq %rax, -0x100(%rbp)
jmp 0x12405
movq -0x100(%rbp), %rdi
movq 0x68b85(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x1241a
jmp 0x1241c
movl $0x8e, -0x9c(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x9c(%rbp), %rsi
callq 0x12ff0
movq %rax, -0x108(%rbp)
jmp 0x1243f
movq -0x108(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x75b0
movq %rax, -0xa8(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x6060
testb $0x1, %al
jne 0x1247e
jmp 0x124b5
leaq -0x38(%rbp), %rdi
callq 0x60c0
movl (%rax), %esi
movq 0x68b28(%rip), %rdi     # 0x7afb8
callq 0x3350
movq %rax, -0x110(%rbp)
jmp 0x1249e
movq -0x110(%rbp), %rdi
movq 0x68aec(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x124b3
jmp 0x124e8
movq 0x68afc(%rip), %rdi     # 0x7afb8
leaq 0x44ec9(%rip), %rsi     # 0x5738c
callq 0x31e0
movq %rax, -0x118(%rbp)
jmp 0x124d1
movq -0x118(%rbp), %rdi
movq 0x68ab9(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x124e6
jmp 0x124e8
movl $0xffffffd6, -0xb4(%rbp) # imm = 0xFFFFFFD6
leaq -0x30(%rbp), %rdi
leaq -0xb4(%rbp), %rsi
callq 0x12ff0
movq %rax, -0x120(%rbp)
jmp 0x1250b
movq -0x120(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x75b0
movq %rax, -0xc0(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x6060
testb $0x1, %al
jne 0x1254a
jmp 0x12581
leaq -0x38(%rbp), %rdi
callq 0x60c0
movl (%rax), %esi
movq 0x68a5c(%rip), %rdi     # 0x7afb8
callq 0x3350
movq %rax, -0x128(%rbp)
jmp 0x1256a
movq -0x128(%rbp), %rdi
movq 0x68a20(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x1257f
jmp 0x125b4
movq 0x68a30(%rip), %rdi     # 0x7afb8
leaq 0x44dfd(%rip), %rsi     # 0x5738c
callq 0x31e0
movq %rax, -0x130(%rbp)
jmp 0x1259d
movq -0x130(%rbp), %rdi
movq 0x689ed(%rip), %rsi     # 0x7af98
callq 0x3220
jmp 0x125b2
jmp 0x125b4
leaq -0x30(%rbp), %rdi
callq 0x4960
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3360
nop