// File: cjc12[P]ezSTL/src/../include/test.h
// Function: ezSTL::test::test_algorithm()
void test::test_algorithm() {
		const int max_iteration = 30;
		std::default_random_engine e((unsigned)time(0));
		std::uniform_int_distribution<unsigned> u(0, 20);
		start_info("algorithm");
		test_info("sort:");
		{
			vector<unsigned> v;
			for (int i = 0; i < max_iteration; ++i)
				v.push_back(u(e));
			print_vector(v);
			sort(v.begin(), v.end());
			print_vector(v);
		}
		test_info("stable_sort:");
		{
			vector<pair<unsigned, unsigned>> v;
			for (int i = 0; i < max_iteration; ++i)
				v.push_back(make_pair(u(e), u(e)));
			for (auto ite = v.begin(); ite != v.end(); ++ite)
				std::cout << (*ite).first << ":" << (*ite).second << " ";
			std::cout << std::endl;
			stable_sort(v.begin(), v.end(), less<pair<unsigned, unsigned>>());
			for (auto ite = v.begin(); ite != v.end(); ++ite)
				std::cout << (*ite).first << ":" << (*ite).second << " ";
			std::cout << std::endl;
		}
		finish_info("algorithm");
		continue_next_test();
	}

// Assembly:
subq $0x1e8, %rsp            # imm = 0x1E8
movl $0x1e, 0x1e4(%rsp)
xorl %eax, %eax
movl %eax, 0xac(%rsp)
movl %eax, %edi
callq 0x21f0
movl %eax, %eax
movl %eax, %esi
leaq 0x1d8(%rsp), %rdi
callq 0xefe0
movl 0xac(%rsp), %esi
leaq 0x1d0(%rsp), %rdi
movl $0x14, %edx
callq 0xf010
leaq 0x1af(%rsp), %rdi
movq %rdi, 0xb0(%rsp)
callq 0x2330
movq 0xb0(%rsp), %rdx
leaq 0x1d8a4(%rip), %rsi     # 0x26744
leaq 0x1b0(%rsp), %rdi
callq 0x2290
jmp 0x8eaf
leaq 0x1b0(%rsp), %rdi
callq 0x24e0
jmp 0x8ebe
leaq 0x1b0(%rsp), %rdi
callq 0x2130
leaq 0x1af(%rsp), %rdi
callq 0x2260
leaq 0x177(%rsp), %rdi
movq %rdi, 0xa0(%rsp)
callq 0x2330
movq 0xa0(%rsp), %rdx
leaq 0x1d859(%rip), %rsi     # 0x26755
leaq 0x178(%rsp), %rdi
callq 0x2290
jmp 0x8f0b
leaq 0x178(%rsp), %rdi
callq 0x2730
jmp 0x8f1a
leaq 0x178(%rsp), %rdi
callq 0x2130
leaq 0x177(%rsp), %rdi
callq 0x2260
leaq 0x158(%rsp), %rdi
callq 0xf8f0
movl $0x0, 0x154(%rsp)
cmpl $0x1e, 0x154(%rsp)
jge 0x906a
leaq 0x1d0(%rsp), %rdi
leaq 0x1d8(%rsp), %rsi
callq 0xf090
movl %eax, 0x9c(%rsp)
jmp 0x8f78
movl 0x9c(%rsp), %eax
movl %eax, 0x150(%rsp)
leaq 0x158(%rsp), %rdi
leaq 0x150(%rsp), %rsi
callq 0xf920
jmp 0x8f9d
jmp 0x8f9f
movl 0x154(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x154(%rsp)
jmp 0x8f4c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
jmp 0x8fe9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
leaq 0x1b0(%rsp), %rdi
callq 0x2130
leaq 0x1af(%rsp), %rdi
callq 0x2260
jmp 0x951a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
jmp 0x9032
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
leaq 0x178(%rsp), %rdi
callq 0x2130
leaq 0x177(%rsp), %rdi
callq 0x2260
jmp 0x951a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
leaq 0x158(%rsp), %rdi
callq 0xfc70
jmp 0x951a
leaq 0x158(%rsp), %rdi
callq 0xfa70
jmp 0x9079
leaq 0x158(%rsp), %rdi
callq 0xfc50
movq %rax, 0x90(%rsp)
jmp 0x9090
leaq 0x158(%rsp), %rdi
callq 0xfc60
movq %rax, 0x88(%rsp)
jmp 0x90a7
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdi
callq 0xfc20
jmp 0x90be
leaq 0x158(%rsp), %rdi
callq 0xfa70
jmp 0x90cd
leaq 0x158(%rsp), %rdi
callq 0xfc70
leaq 0x12f(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0x2330
movq 0x80(%rsp), %rdx
leaq 0x1d650(%rip), %rsi     # 0x2674e
leaq 0x130(%rsp), %rdi
callq 0x2290
jmp 0x910d
leaq 0x130(%rsp), %rdi
callq 0x2730
jmp 0x911c
leaq 0x130(%rsp), %rdi
callq 0x2130
leaq 0x12f(%rsp), %rdi
callq 0x2260
leaq 0x110(%rsp), %rdi
callq 0xfcb0
movl $0x0, 0x10c(%rsp)
cmpl $0x1e, 0x10c(%rsp)
jge 0x9265
leaq 0x1d0(%rsp), %rdi
leaq 0x1d8(%rsp), %rsi
callq 0xf090
movl %eax, 0x7c(%rsp)
jmp 0x9177
movl 0x7c(%rsp), %eax
movl %eax, 0x100(%rsp)
leaq 0x1d0(%rsp), %rdi
leaq 0x1d8(%rsp), %rsi
callq 0xf090
movl %eax, 0x78(%rsp)
jmp 0x919d
movl 0x78(%rsp), %eax
movl %eax, 0xfc(%rsp)
leaq 0x104(%rsp), %rdi
leaq 0x100(%rsp), %rsi
leaq 0xfc(%rsp), %rdx
callq 0xf590
jmp 0x91c7
leaq 0x110(%rsp), %rdi
leaq 0x104(%rsp), %rsi
callq 0xfce0
jmp 0x91de
jmp 0x91e0
movl 0x10c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10c(%rsp)
jmp 0x914e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
jmp 0x922d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
leaq 0x130(%rsp), %rdi
callq 0x2130
leaq 0x12f(%rsp), %rdi
callq 0x2260
jmp 0x951a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
leaq 0x110(%rsp), %rdi
callq 0xfe80
jmp 0x951a
leaq 0x110(%rsp), %rdi
callq 0xfe30
movq %rax, 0x70(%rsp)
jmp 0x9279
movq 0x70(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq 0xf0(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0x110(%rsp), %rdi
callq 0xfe40
movq %rax, 0x68(%rsp)
jmp 0x92a7
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rcx
cmpq %rcx, %rax
je 0x9335
movq 0xf0(%rsp), %rax
movl (%rax), %esi
movq 0x27d11(%rip), %rdi     # 0x30fd8
callq 0x2280
movq %rax, 0x58(%rsp)
jmp 0x92d3
movq 0x58(%rsp), %rdi
leaq 0x1cdb2(%rip), %rsi     # 0x26091
callq 0x2220
movq %rax, 0x50(%rsp)
jmp 0x92eb
movq 0x50(%rsp), %rdi
movq 0xf0(%rsp), %rax
movl 0x4(%rax), %esi
callq 0x2280
movq %rax, 0x48(%rsp)
jmp 0x9307
movq 0x48(%rsp), %rdi
leaq 0x1d195(%rip), %rsi     # 0x264a8
callq 0x2220
jmp 0x931a
jmp 0x931c
movq 0xf0(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xf0(%rsp)
jmp 0x9286
movq 0x27c9c(%rip), %rdi     # 0x30fd8
movq 0x27c85(%rip), %rsi     # 0x30fc8
callq 0x2250
jmp 0x934a
leaq 0x110(%rsp), %rdi
callq 0xfe30
movq %rax, 0x40(%rsp)
jmp 0x935e
leaq 0x110(%rsp), %rdi
callq 0xfe40
movq %rax, 0x38(%rsp)
jmp 0x9372
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdi
callq 0xfe50
jmp 0x9383
leaq 0x110(%rsp), %rdi
callq 0xfe30
movq %rax, 0x30(%rsp)
jmp 0x9397
movq 0x30(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x110(%rsp), %rdi
callq 0xfe40
movq %rax, 0x28(%rsp)
jmp 0x93c5
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
cmpq %rcx, %rax
je 0x9453
movq 0xe0(%rsp), %rax
movl (%rax), %esi
movq 0x27bf3(%rip), %rdi     # 0x30fd8
callq 0x2280
movq %rax, 0x18(%rsp)
jmp 0x93f1
movq 0x18(%rsp), %rdi
leaq 0x1cc94(%rip), %rsi     # 0x26091
callq 0x2220
movq %rax, 0x10(%rsp)
jmp 0x9409
movq 0x10(%rsp), %rdi
movq 0xe0(%rsp), %rax
movl 0x4(%rax), %esi
callq 0x2280
movq %rax, 0x8(%rsp)
jmp 0x9425
movq 0x8(%rsp), %rdi
leaq 0x1d077(%rip), %rsi     # 0x264a8
callq 0x2220
jmp 0x9438
jmp 0x943a
movq 0xe0(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe0(%rsp)
jmp 0x93a4
movq 0x27b7e(%rip), %rdi     # 0x30fd8
movq 0x27b67(%rip), %rsi     # 0x30fc8
callq 0x2250
jmp 0x9468
leaq 0x110(%rsp), %rdi
callq 0xfe80
leaq 0xbf(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x2330
movq (%rsp), %rdx
leaq 0x1d2b3(%rip), %rsi     # 0x26744
leaq 0xc0(%rsp), %rdi
callq 0x2290
jmp 0x94a0
leaq 0xc0(%rsp), %rdi
callq 0x26d0
jmp 0x94af
leaq 0xc0(%rsp), %rdi
callq 0x2130
leaq 0xbf(%rsp), %rdi
callq 0x2260
callq 0x2780
addq $0x1e8, %rsp            # imm = 0x1E8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
jmp 0x950d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x2130
leaq 0xbf(%rsp), %rdi
callq 0x2260
movq 0x1a0(%rsp), %rdi
callq 0x2320
nopw (%rax,%rax)