// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/deps/jemalloc/src/huge.c
// Function: huge_ralloc_no_move_expand
static bool
huge_ralloc_no_move_expand(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(&arena->huge_mtx);
	is_zeroed_subchunk = extent_node_zeroed_get(node);
	malloc_mutex_unlock(&arena->huge_mtx);

	/*
	 * Copy zero into is_zeroed_chunk and pass the copy to chunk_alloc(), so
	 * that it is possible to make correct junk/zero fill decisions below.
	 */
	is_zeroed_chunk = zero;

	if (arena_chunk_ralloc_huge_expand(arena, ptr, oldsize, usize,
	     &is_zeroed_chunk))
		return (true);

	malloc_mutex_lock(&arena->huge_mtx);
	/* Update the size of the huge allocation. */
	extent_node_size_set(node, usize);
	malloc_mutex_unlock(&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), 0xa5, usize -
		    oldsize);
	}

	return (false);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x10(%rbp), %rdi
callq 0x63a60
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x63a90
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
callq 0x61da0
movq -0x30(%rbp), %rdi
callq 0x64000
andb $0x1, %al
movb %al, -0x39(%rbp)
movq -0x38(%rbp), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
callq 0x61dc0
movb -0x21(%rbp), %al
andb $0x1, %al
movb %al, -0x3a(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x3a(%rbp), %r8
callq 0x3cbd0
testb $0x1, %al
jne 0x620ba
jmp 0x620c3
movb $0x1, -0x1(%rbp)
jmp 0x621e1
movq -0x38(%rbp), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
callq 0x61da0
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x63f80
movq -0x38(%rbp), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
callq 0x61dc0
testb $0x1, -0x21(%rbp)
jne 0x62114
leaq 0x3f5b6(%rip), %rax     # 0xa16b3
movb (%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x621a7
testb $0x1, -0x39(%rbp)
jne 0x6214c
movq -0x10(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x40603(%rip), %rax     # 0xa2730
addq (%rax), %rdx
leaq 0x405f9(%rip), %rax     # 0xa2730
movq (%rax), %rax
xorq $-0x1, %rax
andq %rax, %rdx
subq -0x18(%rbp), %rdx
xorl %esi, %esi
callq 0x10250
testb $0x1, -0x3a(%rbp)
jne 0x621a5
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
leaq 0x405cf(%rip), %rcx     # 0xa2730
addq (%rcx), %rax
leaq 0x405c5(%rip), %rcx     # 0xa2730
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
addq %rax, %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
leaq 0x405a9(%rip), %rcx     # 0xa2730
addq (%rcx), %rax
leaq 0x4059f(%rip), %rcx     # 0xa2730
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
subq %rax, %rdx
xorl %esi, %esi
callq 0x10250
jmp 0x621dd
leaq 0x3f4f3(%rip), %rax     # 0xa16a1
movb (%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x621db
movq -0x10(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
subq -0x18(%rbp), %rdx
movl $0xa5, %esi
callq 0x10250
jmp 0x621dd
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)