// File: planaria[P]cb_tree/tests/pointer_test.cpp
// Function: void test_pointer<void>()
void test_pointer()
{
	std::mt19937 generator;
	std::uniform_int_distribution<std::size_t> random_int(
		std::numeric_limits<std::size_t>::min(),
		std::numeric_limits<std::size_t>::max());

	cb_tree::cb_set<T*> cb_set;
	std::set<T*> set;

	for (std::size_t i = 0; i < 10000; ++i)
	{
		T* value = reinterpret_cast<T*>(random_int(generator));
		cb_set.insert(value);
		set.insert(value);
	}

	REQUIRE(cb_set.size() == set.size());
	CHECK(std::equal(cb_set.begin(), cb_set.end(), set.begin()));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a90, %rsp           # imm = 0x1A90
leaq -0x1388(%rbp), %rdi
callq 0x26690
callq 0x38670
movq %rax, -0x1a18(%rbp)
callq 0x38680
movq -0x1a18(%rbp), %rsi
movq %rax, %rdx
leaq -0x1398(%rbp), %rdi
callq 0x38690
leaq -0x13b8(%rbp), %rdi
callq 0x50270
leaq -0x13e8(%rbp), %rdi
callq 0x50290
movq $0x0, -0x13f0(%rbp)
cmpq $0x2710, -0x13f0(%rbp) # imm = 0x2710
jae 0x4ecd2
leaq -0x1398(%rbp), %rdi
leaq -0x1388(%rbp), %rsi
callq 0x38700
movq %rax, -0x1a20(%rbp)
jmp 0x4ec1e
movq -0x1a20(%rbp), %rax
movq %rax, -0x13f8(%rbp)
leaq -0x13b8(%rbp), %rdi
leaq -0x13f8(%rbp), %rsi
callq 0x502b0
movb %dl, -0x1a29(%rbp)
movq %rax, -0x1a28(%rbp)
jmp 0x4ec4e
movb -0x1a29(%rbp), %al
movq -0x1a28(%rbp), %rcx
movq %rcx, -0x1418(%rbp)
movb %al, -0x1410(%rbp)
leaq -0x13e8(%rbp), %rdi
leaq -0x13f8(%rbp), %rsi
callq 0x502f0
movb %dl, -0x1a39(%rbp)
movq %rax, -0x1a38(%rbp)
jmp 0x4ec8a
movb -0x1a39(%rbp), %al
movq -0x1a38(%rbp), %rcx
movq %rcx, -0x1428(%rbp)
movb %al, -0x1420(%rbp)
movq -0x13f0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x13f0(%rbp)
jmp 0x4ebf1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1400(%rbp)
movl %eax, -0x1404(%rbp)
jmp 0x4f129
jmp 0x4ecd4
leaq 0x6a675(%rip), %rsi     # 0xb9350
leaq -0x16f0(%rbp), %rdi
movl $0x17, %edx
callq 0x60570
jmp 0x4ecee
leaq 0x5dc90(%rip), %rsi     # 0xac985
leaq 0x61655(%rip), %rcx     # 0xb0351
leaq 0x6f82d(%rip), %r9      # 0xbe530
leaq -0x16c8(%rbp), %rdi
leaq -0x16f0(%rbp), %rdx
movl $0x1, %r8d
callq 0x61e00
jmp 0x4ed1e
leaq -0x16f0(%rbp), %rdi
callq 0xe590
leaq -0x13b8(%rbp), %rdi
callq 0x50340
movq %rax, -0x1a48(%rbp)
jmp 0x4ed3f
movq -0x1a48(%rbp), %rax
movq %rax, -0x1708(%rbp)
leaq -0x16c8(%rbp), %rdi
leaq -0x1708(%rbp), %rsi
callq 0x12950
movq %rdx, -0x1a58(%rbp)
movq %rax, -0x1a50(%rbp)
jmp 0x4ed70
movq -0x1a58(%rbp), %rax
movq -0x1a50(%rbp), %rcx
movq %rcx, -0x1700(%rbp)
movq %rax, -0x16f8(%rbp)
leaq -0x13e8(%rbp), %rdi
callq 0x50360
movq %rax, -0x1710(%rbp)
leaq -0x1700(%rbp), %rdi
leaq -0x1710(%rbp), %rsi
callq 0x26810
movq %rax, -0x1a60(%rbp)
jmp 0x4edbb
movq -0x1a60(%rbp), %rdi
callq 0x621c0
jmp 0x4edc9
jmp 0x4ee28
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1400(%rbp)
movl %eax, -0x1404(%rbp)
leaq -0x16f0(%rbp), %rdi
callq 0xe590
jmp 0x4f129
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1400(%rbp)
movl %eax, -0x1404(%rbp)
movq -0x1400(%rbp), %rdi
callq 0xc200
leaq -0x16c8(%rbp), %rdi
movl $0x1, %esi
callq 0x62290
jmp 0x4ee1f
callq 0xc8f0
jmp 0x4ee26
jmp 0x4ee28
leaq -0x16c8(%rbp), %rdi
callq 0x626f0
movb %al, -0x1a61(%rbp)
jmp 0x4ee3c
movb -0x1a61(%rbp), %al
testb $0x1, %al
jne 0x4ee48
jmp 0x4ee86
callq 0xe7a0
jmp 0x4ee4f
jmp 0x4ee86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1400(%rbp)
movl %eax, -0x1404(%rbp)
callq 0xc8f0
jmp 0x4ee81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1400(%rbp)
movl %eax, -0x1404(%rbp)
jmp 0x4effd
jmp 0x4effd
leaq -0x16c8(%rbp), %rdi
callq 0x626b0
jmp 0x4ee94
leaq -0x16c8(%rbp), %rdi
callq 0xe7b0
xorl %edi, %edi
callq 0xe800
movb %al, -0x1a62(%rbp)
jmp 0x4eeaf
movb -0x1a62(%rbp), %al
testb $0x1, %al
jne 0x4ecd4
jmp 0x4eebf
jmp 0x4eec1
leaq 0x6a488(%rip), %rsi     # 0xb9350
leaq -0x19d8(%rbp), %rdi
movl $0x18, %edx
callq 0x60570
jmp 0x4eedb
leaq 0x5c15f(%rip), %rsi     # 0xab041
leaq 0x61484(%rip), %rcx     # 0xb036d
leaq 0x6f640(%rip), %r9      # 0xbe530
leaq -0x19b0(%rbp), %rdi
leaq -0x19d8(%rbp), %rdx
movl $0x2, %r8d
callq 0x61e00
jmp 0x4ef0b
leaq -0x19d8(%rbp), %rdi
callq 0xe590
leaq -0x13b8(%rbp), %rdi
callq 0x503d0
movq %rax, -0x1a70(%rbp)
jmp 0x4ef2c
movq -0x1a70(%rbp), %rax
movq %rax, -0x19f0(%rbp)
leaq -0x13b8(%rbp), %rdi
callq 0x50400
movq %rax, -0x1a78(%rbp)
jmp 0x4ef4f
movq -0x1a78(%rbp), %rax
movq %rax, -0x19f8(%rbp)
leaq -0x13e8(%rbp), %rdi
callq 0x50430
movq %rax, -0x1a00(%rbp)
movq -0x19f0(%rbp), %rdi
movq -0x19f8(%rbp), %rsi
movq -0x1a00(%rbp), %rdx
callq 0x50380
movb %al, -0x1a79(%rbp)
jmp 0x4ef92
movb -0x1a79(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x19b0(%rbp), %rdi
callq 0x12870
movb %dl, -0x1a89(%rbp)
movq %rax, -0x1a88(%rbp)
jmp 0x4efb9
movb -0x1a89(%rbp), %al
movq -0x1a88(%rbp), %rcx
movq %rcx, -0x1a10(%rbp)
movb %al, -0x1a08(%rbp)
movb -0x1a08(%rbp), %al
movb %al, -0x19e0(%rbp)
movq -0x1a10(%rbp), %rax
movq %rax, -0x19e8(%rbp)
leaq -0x19e8(%rbp), %rdi
callq 0x128b0
jmp 0x4effb
jmp 0x4f06b
leaq -0x16c8(%rbp), %rdi
callq 0xe7b0
jmp 0x4f129
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1400(%rbp)
movl %eax, -0x1404(%rbp)
leaq -0x19d8(%rbp), %rdi
callq 0xe590
jmp 0x4f129
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1400(%rbp)
movl %eax, -0x1404(%rbp)
movq -0x1400(%rbp), %rdi
callq 0xc200
leaq -0x19b0(%rbp), %rdi
movl $0x1, %esi
callq 0x62290
jmp 0x4f062
callq 0xc8f0
jmp 0x4f069
jmp 0x4f06b
leaq -0x19b0(%rbp), %rdi
callq 0x626f0
movb %al, -0x1a8a(%rbp)
jmp 0x4f07f
movb -0x1a8a(%rbp), %al
testb $0x1, %al
jne 0x4f08b
jmp 0x4f0c3
callq 0xe7a0
jmp 0x4f092
jmp 0x4f0c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1400(%rbp)
movl %eax, -0x1404(%rbp)
callq 0xc8f0
jmp 0x4f0c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1400(%rbp)
movl %eax, -0x1404(%rbp)
jmp 0x4f11d
jmp 0x4f11d
leaq -0x19b0(%rbp), %rdi
callq 0x626b0
jmp 0x4f0d1
leaq -0x19b0(%rbp), %rdi
callq 0xe7b0
xorl %edi, %edi
callq 0xe800
movb %al, -0x1a8b(%rbp)
jmp 0x4f0ec
movb -0x1a8b(%rbp), %al
testb $0x1, %al
jne 0x4eec1
jmp 0x4f0fc
leaq -0x13e8(%rbp), %rdi
callq 0x50460
leaq -0x13b8(%rbp), %rdi
callq 0x50480
addq $0x1a90, %rsp           # imm = 0x1A90
popq %rbp
retq
leaq -0x19b0(%rbp), %rdi
callq 0xe7b0
leaq -0x13e8(%rbp), %rdi
callq 0x50460
leaq -0x13b8(%rbp), %rdi
callq 0x50480
movq -0x1400(%rbp), %rdi
callq 0xc9b0
movq %rax, %rdi
callq 0xe790
nopw %cs:(%rax,%rax)
nop