// File: /workspace/github_c_makefile_star2_O0/glk[P]critbit/critbit-test.c
// Function: test_benchmark_critbit_hash_int
static void
test_benchmark_critbit_hash_int(void)
{
	CRITBIT_HEAD(elinttree) tree;
	struct element *el, *xel;
	char *xnode, *xnode_saved;
	int i, j, *k, sz = critbit_node_size();

	xnode_saved = xnode = malloc(sz * loopcnt_int_init);
	xel = malloc(sizeof(*el) * loopcnt_int_init);
	k = malloc(sizeof(int) * loopcnt_int_init);

	struct timeval tstart, tend;
        gettimeofday(&tstart, NULL);

#define KEY(a) k[(a)]

	for (i = 1; i < loopcnt_int_init; ++i) {

		CRITBIT_INIT(elinttree, &tree, no_free, NULL);
		xnode = xnode_saved;

		for (j = 0; j < i; ++j) {
			el = &xel[j];
			k[j] = hashint(j);
			el->kint = KEY(j);
			el = CRITBIT_INSERT(elinttree, &tree,
			    (struct critbit_node *)xnode, el);
			xnode += sz;
			if (el != NULL)
				abort();
		}
		for (j = 0; j < i; ++j) {
			if (CRITBIT_GET(elinttree, &tree, KEY(j)) == NULL)
				abort();
			if (CRITBIT_GET(elinttree, &tree, KEY(j)) == NULL)
				abort();
			if (CRITBIT_GET(elinttree, &tree, KEY(j)) == NULL)
				abort();
			if (CRITBIT_GET(elinttree, &tree, KEY(j)) == NULL)
				abort();
		}
	}

        gettimeofday(&tend, NULL);

	benchmark_result("critbit hash int", loopcnt_int_init, &tstart, &tend);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
callq 0xd1c0
movl %eax, -0x54(%rbp)
imull $0x7d0, -0x54(%rbp), %eax # imm = 0x7D0
movslq %eax, %rdi
callq 0xd0b0
movq %rax, -0x38(%rbp)
movq %rax, -0x40(%rbp)
movl $0x23280, %edi          # imm = 0x23280
callq 0xd0b0
movq %rax, -0x30(%rbp)
movl $0x1f40, %edi           # imm = 0x1F40
callq 0xd0b0
movq %rax, -0x50(%rbp)
leaq -0x68(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xd070
movl $0x1, -0x44(%rbp)
cmpl $0x7d0, -0x44(%rbp)     # imm = 0x7D0
jge 0xe234
leaq -0x20(%rbp), %rax
movq %rax, -0x80(%rbp)
callq 0xeb70
movq -0x80(%rbp), %rdi
movq %rax, %rcx
leaq 0xa7e(%rip), %rsi       # 0xeb60
xorl %eax, %eax
movl %eax, %edx
callq 0xd1d0
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0xe181
movq -0x30(%rbp), %rax
movslq -0x48(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movslq -0x48(%rbp), %rdi
callq 0xecc0
movl %eax, %edx
movq -0x50(%rbp), %rax
movslq -0x48(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x50(%rbp), %rax
movslq -0x48(%rbp), %rcx
movslq (%rax,%rcx,4), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x20(%rbp), %rdi
callq 0xeb80
movq %rax, -0x28(%rbp)
movl -0x54(%rbp), %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xe171
callq 0xd040
jmp 0xe173
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0xe0fa
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0xe224
movq -0x50(%rbp), %rax
movslq -0x48(%rbp), %rcx
movslq (%rax,%rcx,4), %rsi
leaq -0x20(%rbp), %rdi
callq 0xebe0
cmpq $0x0, %rax
jne 0xe1b4
callq 0xd040
movq -0x50(%rbp), %rax
movslq -0x48(%rbp), %rcx
movslq (%rax,%rcx,4), %rsi
leaq -0x20(%rbp), %rdi
callq 0xebe0
cmpq $0x0, %rax
jne 0xe1d4
callq 0xd040
movq -0x50(%rbp), %rax
movslq -0x48(%rbp), %rcx
movslq (%rax,%rcx,4), %rsi
leaq -0x20(%rbp), %rdi
callq 0xebe0
cmpq $0x0, %rax
jne 0xe1f4
callq 0xd040
movq -0x50(%rbp), %rax
movslq -0x48(%rbp), %rcx
movslq (%rax,%rcx,4), %rsi
leaq -0x20(%rbp), %rdi
callq 0xebe0
cmpq $0x0, %rax
jne 0xe214
callq 0xd040
jmp 0xe216
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0xe188
jmp 0xe226
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xe0ba
leaq -0x78(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xd070
leaq 0x9753(%rip), %rdi      # 0x1799b
movl $0x7d0, %esi            # imm = 0x7D0
leaq -0x68(%rbp), %rdx
leaq -0x78(%rbp), %rcx
callq 0xec30
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)