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

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

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

	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];
			el->kint = 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, j) == NULL)
				abort();
			if (CRITBIT_GET(elinttree, &tree, j) == NULL)
				abort();
			if (CRITBIT_GET(elinttree, &tree, j) == NULL)
				abort();
			if (CRITBIT_GET(elinttree, &tree, j) == NULL)
				abort();
		}
	}

        gettimeofday(&tend, NULL);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
callq 0xd1c0
movl %eax, -0x4c(%rbp)
imull $0x7d0, -0x4c(%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)
leaq -0x60(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xd070
movl $0x1, -0x44(%rbp)
cmpl $0x7d0, -0x44(%rbp)     # imm = 0x7D0
jge 0xe02e
leaq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
callq 0xeb70
movq -0x78(%rbp), %rdi
movq %rax, %rcx
leaq 0xc3c(%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 0xdfa2
movq -0x30(%rbp), %rax
movslq -0x48(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movslq -0x48(%rbp), %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 -0x4c(%rbp), %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xdf95
callq 0xd040
jmp 0xdf97
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0xdf3c
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0xe01e
movslq -0x48(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0xebe0
cmpq $0x0, %rax
jne 0xdfc9
callq 0xd040
movslq -0x48(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0xebe0
cmpq $0x0, %rax
jne 0xdfe1
callq 0xd040
movslq -0x48(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0xebe0
cmpq $0x0, %rax
jne 0xdff9
callq 0xd040
movslq -0x48(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0xebe0
cmpq $0x0, %rax
jne 0xe011
callq 0xd040
jmp 0xe013
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0xdfa9
jmp 0xe020
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xdefc
leaq -0x70(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xd070
leaq 0x9916(%rip), %rdi      # 0x17958
movl $0x7d0, %esi            # imm = 0x7D0
leaq -0x60(%rbp), %rdx
leaq -0x70(%rbp), %rcx
callq 0xec30
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)