// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/deps/jemalloc/src/arena.c
// Function: je_arena_boot
bool
arena_boot(void)
{
	unsigned i;

	arena_lg_dirty_mult_default_set(opt_lg_dirty_mult);

	/*
	 * Compute the header size such that it is large enough to contain the
	 * page map.  The page map is biased to omit entries for the header
	 * itself, so some iteration is necessary to compute the map bias.
	 *
	 * 1) Compute safe header_size and map_bias values that include enough
	 *    space for an unbiased page map.
	 * 2) Refine map_bias based on (1) to omit the header pages in the page
	 *    map.  The resulting map_bias may be one too small.
	 * 3) Refine map_bias based on (2).  The result will be >= the result
	 *    from (2), and will always be correct.
	 */
	map_bias = 0;
	for (i = 0; i < 3; i++) {
		size_t header_size = offsetof(arena_chunk_t, map_bits) +
		    ((sizeof(arena_chunk_map_bits_t) +
		    sizeof(arena_chunk_map_misc_t)) * (chunk_npages-map_bias));
		map_bias = (header_size + PAGE_MASK) >> LG_PAGE;
	}
	assert(map_bias > 0);

	map_misc_offset = offsetof(arena_chunk_t, map_bits) +
	    sizeof(arena_chunk_map_bits_t) * (chunk_npages-map_bias);

	arena_maxrun = chunksize - (map_bias << LG_PAGE);
	assert(arena_maxrun > 0);
	large_maxclass = index2size(size2index(chunksize)-1);
	if (large_maxclass > arena_maxrun) {
		/*
		 * For small chunk sizes it's possible for there to be fewer
		 * non-header pages available than are necessary to serve the
		 * size classes just below chunksize.
		 */
		large_maxclass = arena_maxrun;
	}
	assert(large_maxclass > 0);
	nlclasses = size2index(large_maxclass) - size2index(SMALL_MAXCLASS);
	nhclasses = NSIZES - nlclasses - NBINS;

	bin_info_init();
	return (small_run_size_init());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq 0x5dd36(%rip), %rdi     # 0xa1408
callq 0x42cf0
movq $0x0, 0x5eef6(%rip) # 0xa25d8
movl $0x0, -0x74(%rbp)
cmpl $0x3, -0x74(%rbp)
jae 0x4372c
leaq 0x5f042(%rip), %rax     # 0xa2738
movq (%rax), %rax
subq 0x5eed8(%rip), %rax     # 0xa25d8
imulq $0x68, %rax, %rax
addq $0x68, %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
addq $0xfff, %rax            # imm = 0xFFF
shrq $0xc, %rax
movq %rax, 0x5eeb7(%rip)     # 0xa25d8
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x436e9
jmp 0x4372e
jmp 0x43730
leaq 0x5f001(%rip), %rax     # 0xa2738
movq (%rax), %rax
subq 0x5ee97(%rip), %rax     # 0xa25d8
shlq $0x3, %rax
addq $0x68, %rax
movq %rax, 0x5ee90(%rip)     # 0xa25e0
leaq 0x5efd1(%rip), %rax     # 0xa2728
movq (%rax), %rax
movq 0x5ee77(%rip), %rcx     # 0xa25d8
shlq $0xc, %rcx
subq %rcx, %rax
movq %rax, 0x5ee79(%rip)     # 0xa25e8
jmp 0x43771
leaq 0x5efb0(%rip), %rax     # 0xa2728
movq (%rax), %rax
movq %rax, -0x50(%rbp)
cmpq $0x1000, -0x50(%rbp)    # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x43790
jmp 0x437bc
movq -0x50(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x4b4d5(%rip), %rax     # 0x8ec80
movzbl (%rax,%rcx), %eax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl %eax, -0x48(%rbp)
jmp 0x437c8
movq -0x50(%rbp), %rdi
callq 0x4ca20
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x4ad1d(%rip), %rax     # 0x8e500
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, 0x5edca(%rip)     # 0xa25c0
movq 0x5edc3(%rip), %rax     # 0xa25c0
cmpq 0x5ede4(%rip), %rax     # 0xa25e8
jbe 0x43814
movq 0x5eddb(%rip), %rax     # 0xa25e8
movq %rax, 0x5edac(%rip)     # 0xa25c0
jmp 0x43816
jmp 0x43818
movq 0x5eda1(%rip), %rax     # 0xa25c0
movq %rax, -0x60(%rbp)
cmpq $0x1000, -0x60(%rbp)    # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x43834
jmp 0x43860
movq -0x60(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x4b431(%rip), %rax     # 0x8ec80
movzbl (%rax,%rcx), %eax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl %eax, -0x54(%rbp)
jmp 0x4386c
movq -0x60(%rbp), %rdi
callq 0x4ca20
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x84(%rbp)
movq $0x3800, -0x70(%rbp)    # imm = 0x3800
cmpq $0x1000, -0x70(%rbp)    # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x4388e
jmp 0x438ba
movq -0x70(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x4b3d7(%rip), %rax     # 0x8ec80
movzbl (%rax,%rcx), %eax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl %eax, -0x64(%rbp)
jmp 0x438c6
movq -0x70(%rbp), %rdi
callq 0x4ca20
movl %eax, -0x64(%rbp)
movl -0x84(%rbp), %eax
subl -0x64(%rbp), %eax
movl %eax, 0x5ecfb(%rip)     # 0xa25d0
movl $0xef, %eax
subl 0x5ecf0(%rip), %eax     # 0xa25d0
subl $0x27, %eax
movl %eax, 0x5eceb(%rip)     # 0xa25d4
callq 0x43900
callq 0x44210
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
nop