// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/arena.c
// Function: je_arena_malloc_hard
void *
arena_malloc_hard(tsdn_t *tsdn, arena_t *arena, size_t size, szind_t ind,
    bool zero)
{

	assert(!tsdn_null(tsdn) || arena != NULL);

	if (likely(!tsdn_null(tsdn)))
		arena = arena_choose(tsdn_tsd(tsdn), arena);
	if (unlikely(arena == NULL))
		return (NULL);

	if (likely(size <= SMALL_MAXCLASS))
		return (arena_malloc_small(tsdn, arena, ind, zero));
	if (likely(size <= large_maxclass))
		return (arena_malloc_large(tsdn, arena, ind, zero));
	return (huge_malloc(tsdn, arena, index2size(ind), zero));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r13d
movl %ecx, %r15d
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
setne %cl
orb %al, %cl
jne 0xd20b
movq 0x30(%rbx), %r14
testq %r14, %r14
je 0xd425
testq %r14, %r14
je 0xd36d
movl %r15d, %ebp
cmpq $0x3800, %r12           # imm = 0x3800
ja 0xd3e4
movl %r13d, %r15d
imulq $0xa8, %rbp, %rax
leaq (%r14,%rax), %r13
addq $0x980, %r13            # imm = 0x980
leaq 0x2e400(%rip), %rax     # 0x3b640
movq (%rax,%rbp,8), %rax
movq %rax, (%rsp)
movq %r13, %rdi
callq 0xb5a0
movq 0x50(%r13), %rsi
testq %rsi, %rsi
je 0xd305
movl 0x4(%rsi), %edi
testl %edi, %edi
je 0xd305
movq %rbp, %rax
shlq $0x6, %rax
leaq 0x3f36a(%rip), %r8      # 0x4c5e0
addq %rax, %r8
movq 0x8(%rsi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
jne 0xd29a
pushq $0x1
popq %rdx
movl %edx, %ecx
movq 0x8(%rsi,%rcx,8), %rcx
addl $0x40, %eax
incl %edx
testq %rcx, %rcx
je 0xd287
movl %eax, %eax
bsfq %rcx, %rcx
leaq (%rcx,%rax), %r9
shrl $0x3, %eax
pushq $0x1
popq %rdx
shlq %cl, %rdx
xorq %rdx, 0x8(%rsi,%rax)
leaq -0x18(%rsi), %rax
leaq 0x3fe15(%rip), %rcx     # 0x4d0d0
movq (%rcx), %rcx
notq %rcx
andq %rax, %rcx
movq 0x3fcfd(%rip), %rax     # 0x4cfc8
addq %rcx, %rax
negq %rax
addq %rsi, %rax
addq $-0x18, %rax
pushq $0x60
popq %r10
xorl %edx, %edx
divq %r10
addq 0x3fcd8(%rip), %rax     # 0x4cfc0
shlq $0xc, %rax
movl 0x38(%r8), %r12d
imulq 0x10(%r8), %r9
addq %rcx, %r12
addq %r9, %r12
addq %rax, %r12
decl %edi
movl %edi, 0x4(%rsi)
jmp 0xd316
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x230d7
movq %rax, %r12
testq %r12, %r12
je 0xd365
incq 0x60(%r13)
incq 0x70(%r13)
incq 0x78(%r13)
movq %r13, %rdi
callq 0xb380
leaq 0x3f1eb(%rip), %rax     # 0x4c521
movb (%rax), %al
testb %r15b, %r15b
je 0xd372
testb %al, %al
jne 0xd437
leaq 0x3f250(%rip), %rax     # 0x4c59c
cmpb $0x1, (%rax)
je 0xd474
movq %r12, %rdi
xorl %esi, %esi
movq (%rsp), %rdx
callq 0xb230
jmp 0xd39a
movq %r13, %rdi
callq 0xb380
xorl %r12d, %r12d
jmp 0xd3c8
testb %al, %al
jne 0xd485
leaq 0x3f1b2(%rip), %rax     # 0x4c533
cmpb $0x1, (%rax)
je 0xd4b5
leaq 0x3f20b(%rip), %rax     # 0x4c59c
cmpb $0x1, (%rax)
je 0xd4a4
testq %rbx, %rbx
je 0xd3c8
movl (%r14), %esi
movq 0x38(%rbx), %rax
testq %rax, %rax
je 0xd3da
cmpl %esi, 0x40(%rbx)
jbe 0xd3da
leaq (%rax,%rsi,8), %rax
testq %rax, %rax
je 0xd3c8
movl (%rax), %ecx
testl %ecx, %ecx
jle 0xd411
leal -0x1(%rcx), %edx
movl %edx, (%rax)
testl %ecx, %ecx
jle 0xd416
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x1afa2
jmp 0xd3b4
cmpq %r12, 0x3fbb5(%rip)     # 0x4cfa0
jb 0xd4c8
movzbl %r13b, %ecx
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd021
movl 0x4(%rax), %edx
jmp 0xd3c2
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x226c8
jmp 0xd3c8
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1b0d1
movq %rax, %r14
jmp 0xd20b
shlq $0x6, %rbp
leaq 0x3f19e(%rip), %r15     # 0x4c5e0
movq 0x8(%rbp,%r15), %r13
movq %r12, %rdi
subq %r13, %rdi
movl $0xa5, %esi
movq %r13, %rdx
callq 0xb230
movq (%rbp,%r15), %rdi
addq %r12, %rdi
movl $0xa5, %esi
movq %r13, %rdx
callq 0xb230
jmp 0xd345
movq %r12, %rdi
movq (%rsp), %rsi
callq 0x37116
jmp 0xd355
shlq $0x6, %rbp
leaq 0x3f150(%rip), %rax     # 0x4c5e0
movq %r12, %rdi
subq 0x8(%rbp,%rax), %rdi
movq 0x10(%rbp,%rax), %rdx
movl $0xa5, %esi
jmp 0xd4be
movq %r12, %rdi
movq (%rsp), %rsi
callq 0x37116
jmp 0xd39a
movq %r12, %rdi
xorl %esi, %esi
movq (%rsp), %rdx
callq 0xb230
jmp 0xd38a
leaq 0x2e171(%rip), %rax     # 0x3b640
movq (%rax,%rbp,8), %rdx
movzbl %r13b, %ecx
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2e21c