// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movb %r8b, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
andb $0x1, %al
movb %al, -0x29(%rbp)
movq -0x18(%rbp), %rdi
callq 0x65ae0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x65b10
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
addq $0x830, %rsi            # imm = 0x830
callq 0x635b0
movq -0x38(%rbp), %rdi
callq 0x66390
andb $0x1, %al
movb %al, -0x41(%rbp)
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
addq $0x830, %rsi            # imm = 0x830
callq 0x63600
movb $0x0, -0x42(%rbp)
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
leaq -0x42(%rbp), %r9
callq 0x3afd0
testb $0x1, %al
jne 0x63d27
jmp 0x63d30
movb $0x1, -0x1(%rbp)
jmp 0x63eab
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
addq $0x830, %rsi            # imm = 0x830
callq 0x635b0
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x65b30
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x66150
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rdi
callq 0x66390
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x43(%rbp)
jne 0x63d7d
jmp 0x63d83
movb -0x42(%rbp), %al
movb %al, -0x43(%rbp)
movq -0x50(%rbp), %rdi
movb -0x43(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
callq 0x66190
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x663b0
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
addq $0x830, %rsi            # imm = 0x830
callq 0x63600
testb $0x1, -0x29(%rbp)
jne 0x63dde
leaq 0x3f74c(%rip), %rax     # 0xa3513
movb (%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x63e71
testb $0x1, -0x41(%rbp)
jne 0x63e16
movq -0x18(%rbp), %rdi
addq -0x20(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x402b9(%rip), %rax     # 0xa40b0
addq (%rax), %rdx
leaq 0x402af(%rip), %rax     # 0xa40b0
movq (%rax), %rax
xorq $-0x1, %rax
andq %rax, %rdx
subq -0x20(%rbp), %rdx
xorl %esi, %esi
callq 0xb210
testb $0x1, -0x42(%rbp)
jne 0x63e6f
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
leaq 0x40285(%rip), %rcx     # 0xa40b0
addq (%rcx), %rax
leaq 0x4027b(%rip), %rcx     # 0xa40b0
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
addq %rax, %rdi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rax
leaq 0x4025f(%rip), %rcx     # 0xa40b0
addq (%rcx), %rax
leaq 0x40255(%rip), %rcx     # 0xa40b0
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
subq %rax, %rdx
xorl %esi, %esi
callq 0xb210
jmp 0x63ea7
leaq 0x3f689(%rip), %rax     # 0xa3501
movb (%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x63ea5
movq -0x18(%rbp), %rdi
addq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rdx
subq -0x20(%rbp), %rdx
movl $0xa5, %esi
callq 0xb210
jmp 0x63ea7
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)