// File: SeTriones[P]Anubis/main.cpp
// Function: testKeyGroup()
void testKeyGroup() {
	KeyGroup* kg = new KeyGroup(10);
	kg->dump();
	int cnt;
	for (int i = 0; i < 10; i++) {
		for (int inc_cnt = 0; inc_cnt <= i; inc_cnt++) {
			cnt = kg->Inc((uint64_t)i);
			_INFO("inc %d,get %d", i, cnt);
		}
	}
	for (int i = 0; i < 100; i++) {
		kg->Inc(1);
		kg->Inc(2);
		kg->Inc(3);
		kg->Inc(4);
	}
	kg->dump();
	for (int i = 0; i < 5; i++) {
		for (int inc_cnt = 0; inc_cnt < i + 10; inc_cnt++) {
			int tmp = i + 20;
			cnt = kg->Inc((uint64_t)tmp);
			_INFO("inc %d,get %d", tmp, cnt);
		}
	}
	kg->dump();
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movl $0x58, %edi
callq 0x2200
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x100(%rbp)
movl $0xa, %esi
callq 0x4400
jmp 0x711e
movq -0x100(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4730
movl $0x0, -0x1c(%rbp)
cmpl $0xa, -0x1c(%rbp)
jge 0x722c
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jg 0x721c
movq -0x8(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x4580
movl %eax, -0x18(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x21e0
leaq -0x28(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x2120
leaq -0x80(%rbp), %rdi
movl $0x12, %esi
leaq 0x1e78(%rip), %rdx      # 0x9004
leaq -0x60(%rbp), %rcx
callq 0x2190
movq 0x5e3c(%rip), %rax      # 0xcfd8
movq (%rax), %rax
movq %rax, -0x110(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x108(%rbp)
callq 0x21c0
movq -0x110(%rbp), %rdi
movq -0x108(%rbp), %rdx
movq %rax, %rcx
movl -0x1c(%rbp), %r9d
movl -0x18(%rbp), %eax
leaq 0x2183(%rip), %rsi      # 0x9358
leaq 0x1f9f(%rip), %r8       # 0x917b
movl %eax, (%rsp)
movb $0x0, %al
callq 0x2310
movl %eax, -0x84(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x714a
movq -0x100(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl $0x58, %esi
callq 0x2210
jmp 0x73c2
jmp 0x721e
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x7139
movl $0x0, -0x88(%rbp)
cmpl $0x64, -0x88(%rbp)
jge 0x7288
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x4580
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x4580
movq -0x8(%rbp), %rdi
movl $0x3, %esi
callq 0x4580
movq -0x8(%rbp), %rdi
movl $0x4, %esi
callq 0x4580
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0x7236
movq -0x8(%rbp), %rdi
callq 0x4730
movl $0x0, -0x8c(%rbp)
cmpl $0x5, -0x8c(%rbp)
jge 0x73b0
movl $0x0, -0x90(%rbp)
movl -0x90(%rbp), %eax
movl -0x8c(%rbp), %ecx
addl $0xa, %ecx
cmpl %ecx, %eax
jge 0x739a
movl -0x8c(%rbp), %eax
addl $0x14, %eax
movl %eax, -0x94(%rbp)
movq -0x8(%rbp), %rdi
movslq -0x94(%rbp), %rsi
callq 0x4580
movl %eax, -0x18(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x21e0
leaq -0xa0(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x2120
leaq -0xf0(%rbp), %rdi
movl $0x12, %esi
leaq 0x1ce7(%rip), %rdx      # 0x9004
leaq -0xd8(%rbp), %rcx
callq 0x2190
movq 0x5ca8(%rip), %rax      # 0xcfd8
movq (%rax), %rax
movq %rax, -0x120(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x118(%rbp)
callq 0x21c0
movq -0x120(%rbp), %rdi
movq -0x118(%rbp), %rdx
movq %rax, %rcx
movl -0x94(%rbp), %r9d
movl -0x18(%rbp), %eax
leaq 0x1fe9(%rip), %rsi      # 0x9358
leaq 0x1e05(%rip), %r8       # 0x917b
movl %eax, (%rsp)
movb $0x0, %al
callq 0x2310
movl %eax, -0xf4(%rbp)
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
jmp 0x72b2
jmp 0x739c
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
jmp 0x729b
movq -0x8(%rbp), %rdi
callq 0x4730
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0x10(%rbp), %rdi
callq 0x23d0
nopl (%rax,%rax)