// File: /workspace/github_c_makefile_star2_O3/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
je 0xcf0d
testq %r14, %r14
jne 0xcce8
movq 0x30(%rbx), %r14
testq %r14, %r14
je 0xcf00
movl %r15d, %ebp
cmpq $0x3800, %r12           # imm = 0x3800
ja 0xcebf
movl %r13d, %r15d
imulq $0xa8, %rbp, %rax
leaq (%r14,%rax), %r13
addq $0x980, %r13            # imm = 0x980
leaq 0x2e9ac(%rip), %rax     # 0x3b6c0
movq (%rax,%rbp,8), %rax
movq %rax, (%rsp)
movq %r13, %rdi
callq 0xb5a0
movq 0x50(%r13), %rsi
testq %rsi, %rsi
je 0xcdd9
movl 0x4(%rsi), %edi
testl %edi, %edi
je 0xcdd9
movq %rbp, %rax
shlq $0x6, %rax
leaq 0x3f896(%rip), %r8      # 0x4c5e0
addq %rax, %r8
movq 0x8(%rsi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
jne 0xcd6e
pushq $0x1
popq %rdx
movl %edx, %ecx
movq 0x8(%rsi,%rcx,8), %rcx
addl $0x40, %eax
incl %edx
testq %rcx, %rcx
je 0xcd5b
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 0x40341(%rip), %rcx     # 0x4d0d0
movq (%rcx), %rcx
notq %rcx
andq %rax, %rcx
movq 0x40229(%rip), %rax     # 0x4cfc8
addq %rcx, %rax
negq %rax
addq %rsi, %rax
addq $-0x18, %rax
pushq $0x60
popq %r10
xorl %edx, %edx
divq %r10
addq 0x40204(%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 0xcdea
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x23006
movq %rax, %r12
testq %r12, %r12
je 0xce45
incq 0x60(%r13)
movdqu 0x70(%r13), %xmm0
pcmpeqd %xmm1, %xmm1
psubq %xmm1, %xmm0
movdqu %xmm0, 0x70(%r13)
movq %r13, %rdi
callq 0xb380
leaq 0x3f70b(%rip), %rax     # 0x4c521
movb (%rax), %al
testb %r15b, %r15b
je 0xce52
testb %al, %al
jne 0xcf1b
leaq 0x3f770(%rip), %rax     # 0x4c59c
cmpb $0x1, (%rax)
je 0xcf58
movq %r12, %rdi
xorl %esi, %esi
movq (%rsp), %rdx
callq 0xb230
jmp 0xce7a
movq %r13, %rdi
callq 0xb380
xorl %r12d, %r12d
jmp 0xcea3
testb %al, %al
jne 0xcf69
leaq 0x3f6d2(%rip), %rax     # 0x4c533
cmpb $0x1, (%rax)
je 0xcf99
leaq 0x3f72b(%rip), %rax     # 0x4c59c
cmpb $0x1, (%rax)
je 0xcf88
testq %rbx, %rbx
je 0xcea3
movl (%r14), %esi
movq 0x38(%rbx), %rax
testq %rax, %rax
je 0xceb5
cmpl %esi, 0x40(%rbx)
jbe 0xceb5
leaq (%rax,%rsi,8), %rax
testq %rax, %rax
je 0xcea3
movl (%rax), %ecx
testl %ecx, %ecx
jle 0xceec
decl %ecx
movl %ecx, (%rax)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x1ade7
jmp 0xce94
cmpq %r12, 0x400da(%rip)     # 0x4cfa0
jb 0xcfac
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 0xcaea
movl 0x4(%rax), %ecx
movl %ecx, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x225b4
jmp 0xcea3
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1af15
movq %rax, %r14
testq %r14, %r14
je 0xce4d
jmp 0xcce8
shlq $0x6, %rbp
leaq 0x3f6ba(%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 0xce25
movq %r12, %rdi
movq (%rsp), %rsi
callq 0x376c2
jmp 0xce35
shlq $0x6, %rbp
leaq 0x3f66c(%rip), %rax     # 0x4c5e0
movq %r12, %rdi
subq 0x8(%rbp,%rax), %rdi
movq 0x10(%rbp,%rax), %rdx
movl $0xa5, %esi
jmp 0xcfa2
movq %r12, %rdi
movq (%rsp), %rsi
callq 0x376c2
jmp 0xce7a
movq %r12, %rdi
xorl %esi, %esi
movq (%rsp), %rdx
callq 0xb230
jmp 0xce6a
leaq 0x2e70d(%rip), %rax     # 0x3b6c0
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 0x2e080