// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/jemalloc/src/arena.c
// Function: arena_bin_malloc_hard
static void *
arena_bin_malloc_hard(arena_t *arena, arena_bin_t *bin)
{
	szind_t binind;
	arena_bin_info_t *bin_info;
	arena_run_t *run;

	binind = arena_bin_index(arena, bin);
	bin_info = &arena_bin_info[binind];
	bin->runcur = NULL;
	run = arena_bin_nonfull_run_get(arena, bin);
	if (bin->runcur != NULL && bin->runcur->nfree > 0) {
		/*
		 * Another thread updated runcur while this one ran without the
		 * bin lock in arena_bin_nonfull_run_get().
		 */
		void *ret;
		assert(bin->runcur->nfree > 0);
		ret = arena_run_reg_alloc(bin->runcur, bin_info);
		if (run != NULL) {
			arena_chunk_t *chunk;

			/*
			 * arena_run_alloc_small() may have allocated run, or
			 * it may have pulled run from the bin's run tree.
			 * Therefore it is unsafe to make any assumptions about
			 * how run has previously been used, and
			 * arena_bin_lower_run() must be called, as if a region
			 * were just deallocated from the run.
			 */
			chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(run);
			if (run->nfree == bin_info->nregs)
				arena_dalloc_bin_run(arena, chunk, run, bin);
			else
				arena_bin_lower_run(arena, chunk, run, bin);
		}
		return (ret);
	}

	if (run == NULL)
		return (NULL);

	bin->runcur = run;

	assert(bin->runcur->nfree > 0);

	return (arena_run_reg_alloc(bin->runcur, bin_info));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rax
subq %rdi, %rax
addq $-0x450, %rax           # imm = 0xFBB0
movl $0xe0, %ecx
cqto
idivq %rcx
movq %rax, %r13
movl %r13d, %eax
imulq $0x60, %rax, %rax
leaq 0x33488(%rip), %r15     # 0x566a0
addq %rax, %r15
andq $0x0, 0x28(%rsi)
movq %rsi, %rdi
callq 0x27b67
movq %rax, %r12
testq %rax, %rax
jne 0x2329d
movq %rbx, %rdi
callq 0x10440
leaq 0x8(%r14), %rdi
movq %rdi, (%rsp)
callq 0x106d0
movq 0x18(%r15), %rbp
movq %r14, %rdi
movq %rbp, %rsi
movl %r13d, %edx
callq 0x28016
testq %rax, %rax
je 0x23312
movq %rax, %r12
movl %r13d, (%r12)
movl 0x20(%r15), %eax
movl %eax, 0x4(%r12)
leaq 0x8(%r12), %rdi
leaq 0x28(%r15), %rsi
callq 0x28b3c
movq (%rsp), %rdi
callq 0x10440
movq %rbx, %rdi
callq 0x106d0
incq 0xc8(%rbx)
incq 0xd8(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x232eb
cmpl $0x0, 0x4(%rdi)
je 0x232eb
movq %r15, %rsi
callq 0x230ba
movq %rax, %r13
testq %r12, %r12
je 0x23354
movl 0x4(%r12), %eax
cmpl 0x20(%r15), %eax
jne 0x23349
leaq 0x343de(%rip), %rax     # 0x576b0
movq (%rax), %rsi
notq %rsi
andq %r12, %rsi
movq %r14, %rdi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x27ac8
jmp 0x23354
testq %r12, %r12
je 0x2330d
movq %r12, 0x28(%rbx)
movq %r12, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x230ba
xorl %r13d, %r13d
jmp 0x23354
movq %r14, %rdi
callq 0x26729
testq %rax, %rax
je 0x23366
movq 0x3423a(%rip), %rcx     # 0x57560
leaq (%rcx,%rax), %r12
addq $0x10, %r12
movq %r14, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movl %r13d, %ecx
callq 0x2805d
testb %al, %al
je 0x23263
jmp 0x2337d
movq %r12, %rdi
movq %rbx, %rsi
callq 0x27b21
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %rbp, %rsi
movl %r13d, %edx
callq 0x28016
testq %rax, %rax
jne 0x23260
movq (%rsp), %rdi
callq 0x10440
movq %rbx, %rdi
callq 0x106d0
movq %rbx, %rdi
callq 0x27b67
movq %rax, %r12
jmp 0x2329d