// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/deps/jemalloc/src/rtree.c
// Function: je_rtree_new
bool
rtree_new(rtree_t *rtree, unsigned bits, rtree_node_alloc_t *alloc,
    rtree_node_dalloc_t *dalloc)
{
	unsigned bits_in_leaf, height, i;

	assert(bits > 0 && bits <= (sizeof(uintptr_t) << 3));

	bits_in_leaf = (bits % RTREE_BITS_PER_LEVEL) == 0 ? RTREE_BITS_PER_LEVEL
	    : (bits % RTREE_BITS_PER_LEVEL);
	if (bits > bits_in_leaf) {
		height = 1 + (bits - bits_in_leaf) / RTREE_BITS_PER_LEVEL;
		if ((height-1) * RTREE_BITS_PER_LEVEL + bits_in_leaf != bits)
			height++;
	} else
		height = 1;
	assert((height-1) * RTREE_BITS_PER_LEVEL + bits_in_leaf == bits);

	rtree->alloc = alloc;
	rtree->dalloc = dalloc;
	rtree->height = height;

	/* Root level. */
	rtree->levels[0].subtree = NULL;
	rtree->levels[0].bits = (height > 1) ? RTREE_BITS_PER_LEVEL :
	    bits_in_leaf;
	rtree->levels[0].cumbits = rtree->levels[0].bits;
	/* Interior levels. */
	for (i = 1; i < height-1; i++) {
		rtree->levels[i].subtree = NULL;
		rtree->levels[i].bits = RTREE_BITS_PER_LEVEL;
		rtree->levels[i].cumbits = rtree->levels[i-1].cumbits +
		    RTREE_BITS_PER_LEVEL;
	}
	/* Leaf level. */
	if (height > 1) {
		rtree->levels[height-1].subtree = NULL;
		rtree->levels[height-1].bits = bits_in_leaf;
		rtree->levels[height-1].cumbits = bits;
	}

	/* Compute lookup table to be used by rtree_start_level(). */
	for (i = 0; i < RTREE_HEIGHT_MAX; i++) {
		rtree->start_level[i] = hmin(RTREE_HEIGHT_MAX - 1 - i, height -
		    1);
	}

	return (false);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
jmp 0x74fa9
movl -0xc(%rbp), %eax
andq $0xf, %rax
cmpq $0x0, %rax
jne 0x74fc1
movl $0x10, %eax
movq %rax, -0x38(%rbp)
jmp 0x74fcc
movl -0xc(%rbp), %eax
andq $0xf, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl %eax, -0x24(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x24(%rbp), %eax
jbe 0x75013
movl -0xc(%rbp), %eax
subl -0x24(%rbp), %eax
movl %eax, %eax
shrq $0x4, %rax
addq $0x1, %rax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
shlq $0x4, %rax
movl -0x24(%rbp), %ecx
addq %rcx, %rax
movl -0xc(%rbp), %ecx
cmpq %rcx, %rax
je 0x75011
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x7501a
movl $0x1, -0x28(%rbp)
jmp 0x7501c
jmp 0x7501e
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x28(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x28(%rax)
cmpl $0x1, -0x28(%rbp)
jbe 0x7505c
movl $0x10, %eax
movq %rax, -0x40(%rbp)
jmp 0x75063
movl -0x24(%rbp), %eax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x8(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x34(%rax)
movl $0x1, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl -0x28(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x75104
movq -0x8(%rbp), %rax
addq $0x28, %rax
movl -0x2c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
addq $0x28, %rax
movl -0x2c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x10, 0x8(%rax)
movq -0x8(%rbp), %rax
addq $0x28, %rax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
addq $0x10, %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
addq $0x28, %rax
movl -0x2c(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x75085
cmpl $0x1, -0x28(%rbp)
jbe 0x75162
movq -0x8(%rbp), %rax
addq $0x28, %rax
movl -0x28(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
addq $0x28, %rax
movl -0x28(%rbp), %edx
subl $0x1, %edx
movl %edx, %edx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
addq $0x28, %rax
movl -0x28(%rbp), %edx
subl $0x1, %edx
movl %edx, %edx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpq $0x4, %rax
jae 0x751a4
movl -0x2c(%rbp), %eax
movl %eax, %ecx
movl $0x3, %eax
subq %rcx, %rax
movl %eax, %edi
movl -0x28(%rbp), %esi
subl $0x1, %esi
callq 0x751b0
movl %eax, %edx
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %edx, 0x14(%rax,%rcx,4)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x75169
xorl %eax, %eax
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nop