// File: cjc12[P]ezSTL/src/../include/test.h
// Function: ezSTL::test::test_rbtree()
void test::test_rbtree() {
		const int max_iteration = 10;
		srand((unsigned int)time(NULL));
		start_info("rbtree");
		rbtree<int> rbt;
		print_rbtree(rbt);
		test_info("rbtree   find and insert");
		for (int i = 0; i < max_iteration; ++i) {
			int number = rand() % 100;
			std::cout << "to insert " << number << " ; ";
			auto ite = rbt.find(number);
			if (ite == rbt.end()) std::cout << "not exists" << std::endl;
			else std::cout << "already exist : " << *ite << " (obtained by find iterator)" << std::endl;
			rbt.insert(number);
			print_rbtree(rbt);
		}
		test_info("rbtree   erase");
		for (int i = 0; i < max_iteration * 30; ++i) {
			int number = rand() % 100;
			auto ite = rbt.find(number);
			if (ite != rbt.end()) {
				std::cout << "to remove : " << number << std::endl;
				rbt.erase(ite);
				print_rbtree(rbt);
			}
		}
		test_info("rbtree   clear");
		rbt.clear();
		print_rbtree(rbt);
		finish_info("rbtree");
		continue_next_test();
	}

// Assembly:
subq $0x1b8, %rsp            # imm = 0x1B8
movl $0xa, 0x1b4(%rsp)
xorl %eax, %eax
movl %eax, %edi
callq 0x21f0
movl %eax, %edi
callq 0x2210
leaq 0x18f(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0x2330
movq 0x80(%rsp), %rdx
leaq 0x2145f(%rip), %rsi     # 0x26385
leaq 0x190(%rsp), %rdi
callq 0x2290
jmp 0x4f35
leaq 0x190(%rsp), %rdi
callq 0x24e0
jmp 0x4f44
leaq 0x190(%rsp), %rdi
callq 0x2130
leaq 0x18f(%rsp), %rdi
callq 0x2260
leaq 0x160(%rsp), %rdi
movq %rdi, 0x78(%rsp)
callq 0xcfe0
movq 0x78(%rsp), %rdi
callq 0xd050
jmp 0x4f7c
leaq 0x13f(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0x2330
movq 0x70(%rsp), %rdx
leaq 0x213f2(%rip), %rsi     # 0x2638c
leaq 0x140(%rsp), %rdi
callq 0x2290
jmp 0x4fa9
leaq 0x140(%rsp), %rdi
callq 0x2730
jmp 0x4fb8
leaq 0x140(%rsp), %rdi
callq 0x2130
leaq 0x13f(%rsp), %rdi
callq 0x2260
movl $0x0, 0x138(%rsp)
cmpl $0xa, 0x138(%rsp)
jge 0x5244
callq 0x2060
movslq %eax, %rcx
imulq $0x51eb851f, %rcx, %rcx # imm = 0x51EB851F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rcx
addl %edx, %ecx
imull $0x64, %ecx, %ecx
subl %ecx, %eax
movl %eax, 0x134(%rsp)
movq 0x2bfbe(%rip), %rdi     # 0x30fd8
leaq 0x21384(%rip), %rsi     # 0x263a5
callq 0x2220
movq %rax, 0x68(%rsp)
jmp 0x502d
movq 0x68(%rsp), %rdi
movl 0x134(%rsp), %esi
callq 0x2310
movq %rax, 0x60(%rsp)
jmp 0x5045
movq 0x60(%rsp), %rdi
leaq 0x2135f(%rip), %rsi     # 0x263b0
callq 0x2220
jmp 0x5058
leaq 0x128(%rsp), %rdi
leaq 0x160(%rsp), %rsi
leaq 0x134(%rsp), %rdx
callq 0xd1b0
jmp 0x5077
leaq 0x120(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0xd2a0
jmp 0x508e
leaq 0x128(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0xd280
movb %al, 0x5f(%rsp)
jmp 0x50a9
movb 0x5f(%rsp), %al
testb $0x1, %al
jne 0x50b6
jmp 0x5193
movq 0x2bf1b(%rip), %rdi     # 0x30fd8
leaq 0x212f0(%rip), %rsi     # 0x263b4
callq 0x2220
movq %rax, 0x50(%rsp)
jmp 0x50d0
movq 0x50(%rsp), %rdi
movq 0x2beec(%rip), %rsi     # 0x30fc8
callq 0x2250
jmp 0x50e3
jmp 0x5206
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
jmp 0x511f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
leaq 0x190(%rsp), %rdi
callq 0x2130
leaq 0x18f(%rsp), %rdi
callq 0x2260
jmp 0x559c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
jmp 0x558f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
jmp 0x5181
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x2130
leaq 0x13f(%rsp), %rdi
callq 0x2260
jmp 0x558f
movq 0x2be3e(%rip), %rdi     # 0x30fd8
leaq 0x2121e(%rip), %rsi     # 0x263bf
callq 0x2220
movq %rax, 0x48(%rsp)
jmp 0x51ad
leaq 0x128(%rsp), %rdi
callq 0xd2d0
movq %rax, 0x40(%rsp)
jmp 0x51c1
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rax
movl (%rax), %esi
callq 0x2310
movq %rax, 0x38(%rsp)
jmp 0x51d9
movq 0x38(%rsp), %rdi
leaq 0x211eb(%rip), %rsi     # 0x263d0
callq 0x2220
movq %rax, 0x30(%rsp)
jmp 0x51f1
movq 0x30(%rsp), %rdi
movq 0x2bdcb(%rip), %rsi     # 0x30fc8
callq 0x2250
jmp 0x5204
jmp 0x5206
leaq 0x160(%rsp), %rdi
leaq 0x134(%rsp), %rsi
callq 0xd2f0
jmp 0x521d
leaq 0x160(%rsp), %rdi
callq 0xd050
jmp 0x522c
jmp 0x522e
movl 0x138(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x138(%rsp)
jmp 0x4fdd
leaq 0xff(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x2330
movq 0x28(%rsp), %rdx
leaq 0x2118b(%rip), %rsi     # 0x263ed
leaq 0x100(%rsp), %rdi
callq 0x2290
jmp 0x5271
leaq 0x100(%rsp), %rdi
callq 0x2730
jmp 0x5280
leaq 0x100(%rsp), %rdi
callq 0x2130
leaq 0xff(%rsp), %rdi
callq 0x2260
movl $0x0, 0xf8(%rsp)
cmpl $0x12c, 0xf8(%rsp) # imm = 0x12C
jge 0x5421
callq 0x2060
movslq %eax, %rcx
imulq $0x51eb851f, %rcx, %rcx # imm = 0x51EB851F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rcx
addl %edx, %ecx
imull $0x64, %ecx, %ecx
subl %ecx, %eax
movl %eax, 0xf4(%rsp)
leaq 0xe8(%rsp), %rdi
leaq 0x160(%rsp), %rsi
leaq 0xf4(%rsp), %rdx
callq 0xd1b0
jmp 0x52fd
leaq 0xe0(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0xd2a0
jmp 0x5314
leaq 0xe8(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0xd570
movb %al, 0x27(%rsp)
jmp 0x532f
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0x533c
jmp 0x5409
movq 0x2bc95(%rip), %rdi     # 0x30fd8
leaq 0x210b2(%rip), %rsi     # 0x263fc
callq 0x2220
movq %rax, 0x18(%rsp)
jmp 0x5356
movq 0x18(%rsp), %rdi
movl 0xf4(%rsp), %esi
callq 0x2310
movq %rax, 0x10(%rsp)
jmp 0x536e
movq 0x10(%rsp), %rdi
movq 0x2bc4e(%rip), %rsi     # 0x30fc8
callq 0x2250
jmp 0x5381
leaq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0xd800
jmp 0x5398
leaq 0x160(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0xd590
jmp 0x53af
leaq 0x160(%rsp), %rdi
callq 0xd050
jmp 0x53be
jmp 0x5409
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
jmp 0x53f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
leaq 0x100(%rsp), %rdi
callq 0x2130
leaq 0xff(%rsp), %rdi
callq 0x2260
jmp 0x558f
jmp 0x540b
movl 0xf8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf8(%rsp)
jmp 0x52a5
leaq 0xb7(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x2330
movq 0x8(%rsp), %rdx
leaq 0x20fca(%rip), %rsi     # 0x26409
leaq 0xb8(%rsp), %rdi
callq 0x2290
jmp 0x544e
leaq 0xb8(%rsp), %rdi
callq 0x2730
jmp 0x545d
leaq 0xb8(%rsp), %rdi
callq 0x2130
leaq 0xb7(%rsp), %rdi
callq 0x2260
leaq 0x160(%rsp), %rdi
callq 0xd820
jmp 0x5486
leaq 0x160(%rsp), %rdi
callq 0xd050
jmp 0x5495
leaq 0x8f(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x2330
movq (%rsp), %rdx
leaq 0x20ed4(%rip), %rsi     # 0x26385
leaq 0x90(%rsp), %rdi
callq 0x2290
jmp 0x54c0
leaq 0x90(%rsp), %rdi
callq 0x26d0
jmp 0x54cf
leaq 0x90(%rsp), %rdi
callq 0x2130
leaq 0x8f(%rsp), %rdi
callq 0x2260
callq 0x2780
jmp 0x54f0
leaq 0x160(%rsp), %rdi
callq 0xd8a0
addq $0x1b8, %rsp            # imm = 0x1B8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
jmp 0x553c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x2130
leaq 0xb7(%rsp), %rdi
callq 0x2260
jmp 0x558f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
jmp 0x5582
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x2130
leaq 0x8f(%rsp), %rdi
callq 0x2260
leaq 0x160(%rsp), %rdi
callq 0xd8a0
movq 0x180(%rsp), %rdi
callq 0x2320
nopl (%rax)