// File: planaria[P]cb_tree/tests/integer_test.cpp
// Function: void test_integer<unsigned short>()
void test_integer()
{
	std::mt19937 generator;
	std::uniform_int_distribution<T> random_int(
		std::numeric_limits<T>::min(),
		std::numeric_limits<T>::max());

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

	for (std::size_t i = 0; i < 10000; ++i)
	{
		T value = 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 $0x1a80, %rsp           # imm = 0x1A80
leaq -0x1388(%rbp), %rdi
callq 0x26690
callq 0x322a0
movw %ax, -0x1a0a(%rbp)
callq 0x322b0
movw -0x1a0a(%rbp), %cx
leaq -0x138c(%rbp), %rdi
movzwl %cx, %esi
movzwl %ax, %edx
callq 0x322c0
leaq -0x13b0(%rbp), %rdi
callq 0x32300
leaq -0x13e0(%rbp), %rdi
callq 0x32320
movq $0x0, -0x13e8(%rbp)
cmpq $0x2710, -0x13e8(%rbp) # imm = 0x2710
jae 0x301c5
leaq -0x138c(%rbp), %rdi
leaq -0x1388(%rbp), %rsi
callq 0x32340
movw %ax, -0x1a0c(%rbp)
jmp 0x30111
movw -0x1a0c(%rbp), %ax
movw %ax, -0x13ea(%rbp)
leaq -0x13b0(%rbp), %rdi
leaq -0x13ea(%rbp), %rsi
callq 0x32370
movb %dl, -0x1a19(%rbp)
movq %rax, -0x1a18(%rbp)
jmp 0x30141
movb -0x1a19(%rbp), %al
movq -0x1a18(%rbp), %rcx
movq %rcx, -0x1410(%rbp)
movb %al, -0x1408(%rbp)
leaq -0x13e0(%rbp), %rdi
leaq -0x13ea(%rbp), %rsi
callq 0x323b0
movb %dl, -0x1a29(%rbp)
movq %rax, -0x1a28(%rbp)
jmp 0x3017d
movb -0x1a29(%rbp), %al
movq -0x1a28(%rbp), %rcx
movq %rcx, -0x1420(%rbp)
movb %al, -0x1418(%rbp)
movq -0x13e8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x13e8(%rbp)
jmp 0x300e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x13f8(%rbp)
movl %eax, -0x13fc(%rbp)
jmp 0x3061c
jmp 0x301c7
leaq 0x81b73(%rip), %rsi     # 0xb1d41
leaq -0x16e8(%rbp), %rdi
movl $0x17, %edx
callq 0x60570
jmp 0x301e1
leaq 0x7c79d(%rip), %rsi     # 0xac985
leaq 0x80162(%rip), %rcx     # 0xb0351
leaq 0x8e33a(%rip), %r9      # 0xbe530
leaq -0x16c0(%rbp), %rdi
leaq -0x16e8(%rbp), %rdx
movl $0x1, %r8d
callq 0x61e00
jmp 0x30211
leaq -0x16e8(%rbp), %rdi
callq 0xe590
leaq -0x13b0(%rbp), %rdi
callq 0x32400
movq %rax, -0x1a38(%rbp)
jmp 0x30232
movq -0x1a38(%rbp), %rax
movq %rax, -0x1700(%rbp)
leaq -0x16c0(%rbp), %rdi
leaq -0x1700(%rbp), %rsi
callq 0x12950
movq %rdx, -0x1a48(%rbp)
movq %rax, -0x1a40(%rbp)
jmp 0x30263
movq -0x1a48(%rbp), %rax
movq -0x1a40(%rbp), %rcx
movq %rcx, -0x16f8(%rbp)
movq %rax, -0x16f0(%rbp)
leaq -0x13e0(%rbp), %rdi
callq 0x32420
movq %rax, -0x1708(%rbp)
leaq -0x16f8(%rbp), %rdi
leaq -0x1708(%rbp), %rsi
callq 0x26810
movq %rax, -0x1a50(%rbp)
jmp 0x302ae
movq -0x1a50(%rbp), %rdi
callq 0x621c0
jmp 0x302bc
jmp 0x3031b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x13f8(%rbp)
movl %eax, -0x13fc(%rbp)
leaq -0x16e8(%rbp), %rdi
callq 0xe590
jmp 0x3061c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x13f8(%rbp)
movl %eax, -0x13fc(%rbp)
movq -0x13f8(%rbp), %rdi
callq 0xc200
leaq -0x16c0(%rbp), %rdi
movl $0x1, %esi
callq 0x62290
jmp 0x30312
callq 0xc8f0
jmp 0x30319
jmp 0x3031b
leaq -0x16c0(%rbp), %rdi
callq 0x626f0
movb %al, -0x1a51(%rbp)
jmp 0x3032f
movb -0x1a51(%rbp), %al
testb $0x1, %al
jne 0x3033b
jmp 0x30379
callq 0xe7a0
jmp 0x30342
jmp 0x30379
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x13f8(%rbp)
movl %eax, -0x13fc(%rbp)
callq 0xc8f0
jmp 0x30374
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x13f8(%rbp)
movl %eax, -0x13fc(%rbp)
jmp 0x304f0
jmp 0x304f0
leaq -0x16c0(%rbp), %rdi
callq 0x626b0
jmp 0x30387
leaq -0x16c0(%rbp), %rdi
callq 0xe7b0
xorl %edi, %edi
callq 0xe800
movb %al, -0x1a52(%rbp)
jmp 0x303a2
movb -0x1a52(%rbp), %al
testb $0x1, %al
jne 0x301c7
jmp 0x303b2
jmp 0x303b4
leaq 0x81986(%rip), %rsi     # 0xb1d41
leaq -0x19d0(%rbp), %rdi
movl $0x18, %edx
callq 0x60570
jmp 0x303ce
leaq 0x7ac6c(%rip), %rsi     # 0xab041
leaq 0x7ff91(%rip), %rcx     # 0xb036d
leaq 0x8e14d(%rip), %r9      # 0xbe530
leaq -0x19a8(%rbp), %rdi
leaq -0x19d0(%rbp), %rdx
movl $0x2, %r8d
callq 0x61e00
jmp 0x303fe
leaq -0x19d0(%rbp), %rdi
callq 0xe590
leaq -0x13b0(%rbp), %rdi
callq 0x32490
movq %rax, -0x1a60(%rbp)
jmp 0x3041f
movq -0x1a60(%rbp), %rax
movq %rax, -0x19e8(%rbp)
leaq -0x13b0(%rbp), %rdi
callq 0x324c0
movq %rax, -0x1a68(%rbp)
jmp 0x30442
movq -0x1a68(%rbp), %rax
movq %rax, -0x19f0(%rbp)
leaq -0x13e0(%rbp), %rdi
callq 0x324f0
movq %rax, -0x19f8(%rbp)
movq -0x19e8(%rbp), %rdi
movq -0x19f0(%rbp), %rsi
movq -0x19f8(%rbp), %rdx
callq 0x32440
movb %al, -0x1a69(%rbp)
jmp 0x30485
movb -0x1a69(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x19a8(%rbp), %rdi
callq 0x12870
movb %dl, -0x1a79(%rbp)
movq %rax, -0x1a78(%rbp)
jmp 0x304ac
movb -0x1a79(%rbp), %al
movq -0x1a78(%rbp), %rcx
movq %rcx, -0x1a08(%rbp)
movb %al, -0x1a00(%rbp)
movb -0x1a00(%rbp), %al
movb %al, -0x19d8(%rbp)
movq -0x1a08(%rbp), %rax
movq %rax, -0x19e0(%rbp)
leaq -0x19e0(%rbp), %rdi
callq 0x128b0
jmp 0x304ee
jmp 0x3055e
leaq -0x16c0(%rbp), %rdi
callq 0xe7b0
jmp 0x3061c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x13f8(%rbp)
movl %eax, -0x13fc(%rbp)
leaq -0x19d0(%rbp), %rdi
callq 0xe590
jmp 0x3061c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x13f8(%rbp)
movl %eax, -0x13fc(%rbp)
movq -0x13f8(%rbp), %rdi
callq 0xc200
leaq -0x19a8(%rbp), %rdi
movl $0x1, %esi
callq 0x62290
jmp 0x30555
callq 0xc8f0
jmp 0x3055c
jmp 0x3055e
leaq -0x19a8(%rbp), %rdi
callq 0x626f0
movb %al, -0x1a7a(%rbp)
jmp 0x30572
movb -0x1a7a(%rbp), %al
testb $0x1, %al
jne 0x3057e
jmp 0x305b6
callq 0xe7a0
jmp 0x30585
jmp 0x305b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x13f8(%rbp)
movl %eax, -0x13fc(%rbp)
callq 0xc8f0
jmp 0x305b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x13f8(%rbp)
movl %eax, -0x13fc(%rbp)
jmp 0x30610
jmp 0x30610
leaq -0x19a8(%rbp), %rdi
callq 0x626b0
jmp 0x305c4
leaq -0x19a8(%rbp), %rdi
callq 0xe7b0
xorl %edi, %edi
callq 0xe800
movb %al, -0x1a7b(%rbp)
jmp 0x305df
movb -0x1a7b(%rbp), %al
testb $0x1, %al
jne 0x303b4
jmp 0x305ef
leaq -0x13e0(%rbp), %rdi
callq 0x32520
leaq -0x13b0(%rbp), %rdi
callq 0x32540
addq $0x1a80, %rsp           # imm = 0x1A80
popq %rbp
retq
leaq -0x19a8(%rbp), %rdi
callq 0xe7b0
leaq -0x13e0(%rbp), %rdi
callq 0x32520
leaq -0x13b0(%rbp), %rdi
callq 0x32540
movq -0x13f8(%rbp), %rdi
callq 0xc9b0
movq %rax, %rdi
callq 0xe790
nopl (%rax,%rax)