// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
xorl %edi, %edi
callq 0x21a0
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
xorl %edx, %edx
divl %ecx
cmpl $0x1, %edx
adcl $0x0, %edx
movq %rdx, 0x28(%rsp)
movabsq $0x1400000000, %rax     # imm = 0x1400000000
movq %rax, 0x30(%rsp)
leaq 0x8fa6(%rip), %rsi      # 0xe75c
leaq 0x98(%rsp), %rdi
movq %rsp, %rdx
callq 0x2090
leaq 0x98(%rsp), %rdi
callq 0x243c
leaq 0x98(%rsp), %rdi
callq 0x20c0
leaq 0x8f86(%rip), %rsi      # 0xe76d
leaq 0x78(%rsp), %rdi
movq %rsp, %rdx
callq 0x2090
leaq 0x78(%rsp), %rdi
callq 0x257e
leaq 0x78(%rsp), %rdi
callq 0x20c0
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
pushq $0x1e
popq %rbp
leaq 0x30(%rsp), %r14
leaq 0x28(%rsp), %r15
leaq 0x20(%rsp), %r12
subl $0x1, %ebp
jb 0x5849
movq %r14, %rdi
movq %r15, %rsi
callq 0x8144
movl %eax, 0x20(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x820a
jmp 0x5828
movq %rsp, %rdi
callq 0x82b4
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x84be
movq %rsp, %rdi
callq 0x82b4
movq %rsp, %rdi
callq 0x83e8
leaq 0x8ef0(%rip), %rsi      # 0xe766
leaq 0x58(%rsp), %rdi
movq %rsp, %rdx
callq 0x2090
leaq 0x58(%rsp), %rdi
callq 0x257e
leaq 0x58(%rsp), %rdi
callq 0x20c0
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
pushq $0x1e
popq %r13
leaq 0x30(%rsp), %r14
leaq 0x28(%rsp), %r15
leaq 0x20(%rsp), %r12
subl $0x1, %r13d
jb 0x58eb
movq %r14, %rdi
movq %r15, %rsi
callq 0x8144
movl %eax, %ebp
movq %r14, %rdi
movq %r15, %rsi
callq 0x8144
movl %ebp, 0x20(%rsp)
movl %eax, 0x24(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x83f8
jmp 0x58b8
movq (%rsp), %r12
movq 0xf6e2(%rip), %rbx      # 0x14fd8
leaq 0x87ac(%rip), %r14      # 0xe0a9
leaq 0x8bbc(%rip), %r15      # 0xe4c0
cmpq 0x8(%rsp), %r12
je 0x5940
movl (%r12), %esi
movq %rbx, %rdi
callq 0x2120
movq %rax, %rdi
movq %r14, %rsi
callq 0x21d0
movl 0x4(%r12), %esi
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
movq %r15, %rsi
callq 0x21d0
addq $0x8, %r12
jmp 0x5904
movq 0xf691(%rip), %rdi      # 0x14fd8
callq 0x20d0
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x84a3
movq (%rsp), %r12
movq 0xf673(%rip), %rbx      # 0x14fd8
leaq 0x873d(%rip), %r14      # 0xe0a9
leaq 0x8b4d(%rip), %r15      # 0xe4c0
cmpq 0x8(%rsp), %r12
je 0x59af
movl (%r12), %esi
movq %rbx, %rdi
callq 0x2120
movq %rax, %rdi
movq %r14, %rsi
callq 0x21d0
movl 0x4(%r12), %esi
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
movq %r15, %rsi
callq 0x21d0
addq $0x8, %r12
jmp 0x5973
movq 0xf622(%rip), %rdi      # 0x14fd8
callq 0x20d0
movq %rsp, %rdi
callq 0x84ae
leaq 0x8d92(%rip), %rsi      # 0xe75c
leaq 0x38(%rsp), %rdi
movq %rsp, %rdx
callq 0x2090
leaq 0x38(%rsp), %rdi
callq 0x2542
leaq 0x38(%rsp), %rdi
callq 0x20c0
callq 0x25a2
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
jmp 0x5a31
jmp 0x5a38
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
jmp 0x5a31
jmp 0x5a38
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
jmp 0x5a31
jmp 0x5a38
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x20c0
jmp 0x5a5f
movq %rax, %rbx
jmp 0x5a5f
jmp 0x5a54
jmp 0x5a45
jmp 0x5a54
jmp 0x5a54
movq %rax, %rbx
movq %rsp, %rdi
callq 0x83e8
jmp 0x5a5f
jmp 0x5a54
movq %rax, %rbx
movq %rsp, %rdi
callq 0x84ae
movq %rbx, %rdi
callq 0x22d0
nop