// File: /workspace/github_c_makefile_star2_O2/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/huge.c
// Function: huge_ralloc_no_move_expand
static bool
huge_ralloc_no_move_expand(tsdn_t *tsdn, void *ptr, size_t oldsize,
    size_t usize, bool zero) {
	extent_node_t *node;
	arena_t *arena;
	bool is_zeroed_subchunk, is_zeroed_chunk;

	node = huge_node_get(ptr);
	arena = extent_node_arena_get(node);
	malloc_mutex_lock(tsdn, &arena->huge_mtx);
	is_zeroed_subchunk = extent_node_zeroed_get(node);
	malloc_mutex_unlock(tsdn, &arena->huge_mtx);

	/*
	 * Use is_zeroed_chunk to detect whether the trailing memory is zeroed,
	 * update extent's zeroed field, and zero as necessary.
	 */
	is_zeroed_chunk = false;
	if (arena_chunk_ralloc_huge_expand(tsdn, arena, ptr, oldsize, usize,
	     &is_zeroed_chunk))
		return (true);

	malloc_mutex_lock(tsdn, &arena->huge_mtx);
	huge_node_unset(ptr, node);
	extent_node_size_set(node, usize);
	extent_node_zeroed_set(node, extent_node_zeroed_get(node) &&
	    is_zeroed_chunk);
	huge_node_reset(tsdn, ptr, node);
	malloc_mutex_unlock(tsdn, &arena->huge_mtx);

	if (zero || (config_fill && unlikely(opt_zero))) {
		if (!is_zeroed_subchunk) {
			memset((void *)((uintptr_t)ptr + oldsize), 0,
			    CHUNK_CEILING(oldsize) - oldsize);
		}
		if (!is_zeroed_chunk) {
			memset((void *)((uintptr_t)ptr +
			    CHUNK_CEILING(oldsize)), 0, usize -
			    CHUNK_CEILING(oldsize));
		}
	} else if (config_fill && unlikely(opt_junk_alloc)) {
		memset((void *)((uintptr_t)ptr + oldsize), JEMALLOC_ALLOC_JUNK,
		    usize - oldsize);
	}

	return (false);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, 0x1c(%rsp)
movq %rcx, 0x10(%rsp)
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x291b0
movq %rax, %rbx
movq (%rax), %rbp
leaq 0x830(%rbp), %r12
movq %r12, %rdi
callq 0xb5a0
movb 0x20(%rbx), %al
movb %al, 0x7(%rsp)
movq %r12, %rdi
callq 0xb380
leaq 0x6(%rsp), %r9
movb $0x0, (%r9)
movq %r15, 0x20(%rsp)
movq %r15, %rdi
movq 0x10(%rsp), %r15
movq %rbp, %rsi
movq %r14, %rdx
movq %r13, 0x8(%rsp)
movq %r13, %rcx
movq %r15, %r8
callq 0x1a435
movl %eax, %ebp
testb %al, %al
jne 0x28cbd
movq %r12, %rdi
callq 0xb5a0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x21412
movq %r15, 0x10(%rbx)
xorl %eax, %eax
cmpb $0x0, 0x20(%rbx)
movzbl 0x6(%rsp), %ecx
cmovnel %ecx, %eax
movb %al, 0x20(%rbx)
movq 0x20(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x21302
movq %r12, %rdi
callq 0xb380
cmpb $0x0, 0x1c(%rsp)
je 0x28ca0
cmpb $0x0, 0x7(%rsp)
jne 0x28c6a
movq 0x8(%rsp), %rcx
leaq (%r14,%rcx), %rdi
leaq 0x2047d(%rip), %rax     # 0x490d0
movq (%rax), %rdx
leaq (%rdx,%rcx), %rax
notq %rdx
andq %rax, %rdx
subq %rcx, %rdx
xorl %esi, %esi
callq 0xb230
cmpb $0x0, 0x6(%rsp)
movq 0x10(%rsp), %rdx
jne 0x28cbd
leaq 0x20453(%rip), %rax     # 0x490d0
movq (%rax), %rax
movq 0x8(%rsp), %rcx
addq %rax, %rcx
notq %rax
andq %rcx, %rax
addq %rax, %r14
subq %rax, %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0xb230
jmp 0x28cbd
leaq 0x1f88c(%rip), %rax     # 0x48533
cmpb $0x1, (%rax)
je 0x28c3c
leaq 0x1f86e(%rip), %rax     # 0x48521
cmpb $0x1, (%rax)
movq 0x10(%rsp), %rdx
je 0x28cce
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rax
addq %rax, %r14
subq %rax, %rdx
movq %r14, %rdi
movl $0xa5, %esi
jmp 0x28c99