// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/arena.c
// Function: arena_bin_malloc_hard
static void *
arena_bin_malloc_hard(arena_t *arena, arena_bin_t *bin)
{
	void *ret;
	size_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().
		 */
		assert(bin->runcur->nfree > 0);
		ret = arena_run_reg_alloc(bin->runcur, bin_info);
		if (run != NULL) {
			arena_chunk_t *chunk;

			/*
			 * arena_run_alloc() 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
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rax
subq %rdi, %rax
addq $-0x120, %rax           # imm = 0xFEE0
sarq $0x3, %rax
movabsq $-0x79435e50d79435e5, %r12 # imm = 0x86BCA1AF286BCA1B
imulq %rax, %r12
movabsq $-0x435e50d79435e508, %rbp # imm = 0xBCA1AF286BCA1AF8
imulq %rax, %rbp
leaq 0x5e749(%rip), %r13     # 0xdec00
addq %r13, %rbp
movq $0x0, 0x28(%rsi)
movq %rsi, %rdi
callq 0x84645
movq %rax, %rbx
testq %rax, %rax
jne 0x805b3
movq %r14, %rdi
callq 0x1fbb0
leaq 0x8(%r15), %r13
movq %r13, %rdi
callq 0x1faa0
movq 0x18(%rbp), %rsi
movq %r15, %rdi
xorl %edx, %edx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x80cbf
testq %rax, %rax
je 0x80591
movq %rax, %rbx
movl 0x24(%rbp), %edi
addq %rax, %rdi
leaq 0x20(%rsp), %rax
movq $0x4d430001, (%rax)     # imm = 0x4D430001
movq %rbx, 0x8(%rax)
movl 0x64(%rbp), %ecx
subq 0x8(%rbp), %rcx
movq %rcx, 0x10(%rax)
xorl %ecx, %ecx
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq %rcx, 0x28(%rax)
xorl %edx, %edx
rolq $0x3, %rdi
rolq $0xd, %rdi
rolq $0x3d, %rdi
rolq $0x33, %rdi
xchgq %rbx, %rbx
movq %rdx, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %r14, (%rbx)
movl $0x0, 0x8(%rbx)
movl 0x20(%rbp), %eax
movl %eax, 0xc(%rbx)
leaq 0x28(%rbp), %rsi
callq 0x853a8
movq %r13, %rdi
callq 0x1fbb0
movq %r14, %rdi
callq 0x1faa0
incq 0x80(%r14)
incq 0x90(%r14)
jmp 0x805ac
movq %r13, %rdi
callq 0x1fbb0
movq %r14, %rdi
callq 0x1faa0
movq %r14, %rdi
callq 0x84645
movq %rax, %rbx
leaq 0x5e64d(%rip), %r13     # 0xdec00
movq 0x28(%r14), %rdx
testq %rdx, %rdx
je 0x806f8
movl 0xc(%rdx), %eax
testl %eax, %eax
je 0x806f8
movl %eax, 0xc(%rsp)
movl 0x24(%rbp), %edi
movl 0x30(%rbp), %r8d
addq %rdx, %rdi
leal -0x1(%r8), %ecx
movq 0x38(%rbp,%rcx,8), %rax
movq (%rdi,%rax,8), %rax
bsfq %rax, %rax
movq $-0x1, %r9
cmoveq %r9, %rax
testl %ecx, %ecx
movq %r15, 0x10(%rsp)
je 0x8061f
movq 0x30(%rbp,%rcx,8), %r10
leaq (%rdi,%r10,8), %r10
movq (%r10,%rax,8), %r10
shlq $0x6, %rax
bsfq %r10, %r10
cmoveq %r9, %r10
addq %r10, %rax
decq %rcx
jne 0x805fe
movq %rax, %r9
shrq $0x6, %r9
movq (%rdi,%r9,8), %r10
movl $0x1, %r11d
movl %eax, %ecx
shlq %cl, %r11
movq %r10, %rcx
btcq %rax, %rcx
movq %rcx, (%rdi,%r9,8)
cmpl $0x2, %r8d
jb 0x80696
cmpq %r11, %r10
jne 0x80696
addq $-0x2, %r8
imulq $0x68, %r12, %rcx
leaq (%rcx,%r13), %r10
addq $0x40, %r10
xorl %r11d, %r11d
movq %r9, %rcx
shrq $0x6, %r9
movq (%r10,%r11,8), %r12
leaq (%rdi,%r12,8), %r12
movq (%r12,%r9,8), %rsi
movl $0x1, %r15d
shlq %cl, %r15
movq %rsi, %r13
btcq %rcx, %r13
movq %r13, (%r12,%r9,8)
cmpq %r15, %rsi
jne 0x80696
leaq 0x1(%r11), %rcx
cmpq %r11, %r8
movq %rcx, %r11
jne 0x8065e
movl 0x64(%rbp), %ecx
movq 0x10(%rbp), %r12
movl 0xc(%rsp), %esi
decl %esi
movl %esi, 0xc(%rdx)
movl 0x8(%rdx), %esi
cmpl %eax, %esi
jne 0x806b2
incl %esi
movl %esi, 0x8(%rdx)
addq %rdx, %rcx
movl %eax, %eax
imulq %rax, %r12
addq %rcx, %r12
testq %rbx, %rbx
movq 0x10(%rsp), %rdi
je 0x807f8
movl 0xc(%rbx), %eax
cmpl 0x20(%rbp), %eax
jne 0x807ed
leaq 0x5f1a1(%rip), %rax     # 0xdf880
movq (%rax), %rsi
notq %rsi
andq %rbx, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x8123a
jmp 0x807f8
testq %rbx, %rbx
je 0x807e8
movq %rbx, 0x28(%r14)
movl 0x24(%rbp), %edx
movl 0x30(%rbp), %esi
addq %rbx, %rdx
leal -0x1(%rsi), %ecx
movq 0x38(%rbp,%rcx,8), %rax
movq (%rdx,%rax,8), %rax
bsfq %rax, %rax
movq $-0x1, %rdi
cmoveq %rdi, %rax
testl %ecx, %ecx
je 0x8074e
movq 0x30(%rbp,%rcx,8), %r8
leaq (%rdx,%r8,8), %r8
movq (%r8,%rax,8), %r8
shlq $0x6, %rax
bsfq %r8, %r8
cmoveq %rdi, %r8
addq %r8, %rax
decq %rcx
jne 0x8072d
movq %rax, %rdi
shrq $0x6, %rdi
movq (%rdx,%rdi,8), %r8
movl $0x1, %r9d
movl %eax, %ecx
shlq %cl, %r9
movq %r8, %rcx
btcq %rax, %rcx
movq %rcx, (%rdx,%rdi,8)
cmpl $0x2, %esi
jb 0x807c4
cmpq %r9, %r8
jne 0x807c4
addq $-0x2, %rsi
imulq $0x68, %r12, %rcx
leaq (%rcx,%r13), %r8
addq $0x40, %r8
xorl %r9d, %r9d
movq %rdi, %rcx
shrq $0x6, %rdi
movq (%r8,%r9,8), %r10
leaq (%rdx,%r10,8), %r10
movq (%r10,%rdi,8), %r11
movl $0x1, %r14d
shlq %cl, %r14
movq %r11, %r15
btcq %rcx, %r15
movq %r15, (%r10,%rdi,8)
cmpq %r14, %r11
jne 0x807c4
leaq 0x1(%r9), %rcx
cmpq %r9, %rsi
movq %rcx, %r9
jne 0x8078c
movl 0x64(%rbp), %ecx
movq 0x10(%rbp), %r12
decl 0xc(%rbx)
movl 0x8(%rbx), %edx
cmpl %eax, %edx
jne 0x807da
incl %edx
movl %edx, 0x8(%rbx)
addq %rbx, %rcx
movl %eax, %eax
imulq %rax, %r12
addq %rcx, %r12
jmp 0x807f8
xorl %r12d, %r12d
jmp 0x807f8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x813d5
movq %r12, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq