// File: /workspace/github_c_makefile_star2_O0/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/chunk.c
// Function: je_chunk_dalloc_wrapper
void
chunk_dalloc_wrapper(tsdn_t *tsdn, arena_t *arena, chunk_hooks_t *chunk_hooks,
    void *chunk, size_t size, size_t sn, bool zeroed, bool committed)
{
	bool err;

	assert(chunk != NULL);
	assert(CHUNK_ADDR2BASE(chunk) == chunk);
	assert(size != 0);
	assert((size & chunksize_mask) == 0);

	chunk_hooks_assure_initialized(tsdn, arena, chunk_hooks);
	/* Try to deallocate. */
	if (chunk_hooks->dalloc == chunk_dalloc_default) {
		/* Call directly to propagate tsdn. */
		err = chunk_dalloc_default_impl(chunk, size);
	} else
		err = chunk_hooks->dalloc(chunk, size, committed, arena->ind);

	if (!err)
		return;
	/* Try to decommit; purge if that fails. */
	if (committed) {
		committed = chunk_hooks->decommit(chunk, size, 0, size,
		    arena->ind);
	}
	zeroed = !committed || !chunk_hooks->purge(chunk, size, 0, size,
	    arena->ind);
	chunk_record(tsdn, arena, chunk_hooks, &arena->chunks_szsnad_retained,
	    &arena->chunks_ad_retained, false, chunk, size, sn, zeroed,
	    committed);

	if (config_stats)
		arena->stats.retained += size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rcx, -0x60(%rbp)
movq %rdx, %rax
movq -0x60(%rbp), %rdx
movq %rax, -0x58(%rbp)
movq %rsi, %rax
movq -0x58(%rbp), %rsi
movq %rax, -0x50(%rbp)
movq %rdi, %r10
movq -0x50(%rbp), %rdi
movb 0x18(%rbp), %al
movb 0x10(%rbp), %cl
movq %r10, -0x18(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movq %r9, -0x40(%rbp)
andb $0x1, %cl
movb %cl, -0x41(%rbp)
andb $0x1, %al
movb %al, -0x42(%rbp)
jmp 0x52aaa
jmp 0x52aac
jmp 0x52aae
jmp 0x52ab0
jmp 0x52ab2
jmp 0x52ab4
jmp 0x52ab6
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x521f0
movq -0x28(%rbp), %rax
leaq -0x1ae2(%rip), %rcx     # 0x50ff0
cmpq %rcx, 0x8(%rax)
jne 0x52aec
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x52c00
andb $0x1, %al
movb %al, -0x43(%rbp)
jmp 0x52b12
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movb -0x42(%rbp), %dl
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
andb $0x1, %dl
movzbl %dl, %edx
callq *%rax
andb $0x1, %al
movb %al, -0x43(%rbp)
testb $0x1, -0x43(%rbp)
jne 0x52b1d
jmp 0x52bef
testb $0x1, -0x42(%rbp)
je 0x52b47
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rdx
movl (%rdx), %r8d
xorl %edx, %edx
callq *%rax
andb $0x1, %al
movb %al, -0x42(%rbp)
movb $0x1, %al
testb $0x1, -0x42(%rbp)
movb %al, -0x61(%rbp)
je 0x52b76
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rdx
movl (%rdx), %r8d
xorl %edx, %edx
callq *%rax
xorb $-0x1, %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
andb $0x1, %al
movb %al, -0x41(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
addq $0x890, %rcx            # imm = 0x890
movq -0x20(%rbp), %r8
addq $0x898, %r8             # imm = 0x898
movq -0x30(%rbp), %r14
movq -0x38(%rbp), %rbx
movq -0x40(%rbp), %r11
movb -0x41(%rbp), %r10b
movb -0x42(%rbp), %al
xorl %r9d, %r9d
andb $0x1, %r10b
andb $0x1, %al
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movzbl %r10b, %r10d
movl %r10d, 0x18(%rsp)
movzbl %al, %eax
movl %eax, 0x20(%rsp)
callq 0x52460
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
addq 0x68(%rax), %rcx
movq %rcx, 0x68(%rax)
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax,%rax)