// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/deps/jemalloc/src/huge.c
// Function: huge_ralloc_no_move_shrink
static bool
huge_ralloc_no_move_shrink(void *ptr, size_t oldsize, size_t usize)
{
	extent_node_t *node;
	arena_t *arena;
	chunk_hooks_t chunk_hooks;
	size_t cdiff;
	bool pre_zeroed, post_zeroed;

	node = huge_node_get(ptr);
	arena = extent_node_arena_get(node);
	pre_zeroed = extent_node_zeroed_get(node);
	chunk_hooks = chunk_hooks_get(arena);

	assert(oldsize > usize);

	/* Split excess chunks. */
	cdiff = CHUNK_CEILING(oldsize) - CHUNK_CEILING(usize);
	if (cdiff != 0 && chunk_hooks.split(ptr, CHUNK_CEILING(oldsize),
	    CHUNK_CEILING(usize), cdiff, true, arena->ind))
		return (true);

	if (oldsize > usize) {
		size_t sdiff = oldsize - usize;
		if (config_fill && unlikely(opt_junk_free)) {
			huge_dalloc_junk((void *)((uintptr_t)ptr + usize),
			    sdiff);
			post_zeroed = false;
		} else {
			post_zeroed = !chunk_purge_wrapper(arena, &chunk_hooks,
			    CHUNK_ADDR2BASE((uintptr_t)ptr + usize),
			    CHUNK_CEILING(oldsize),
			    CHUNK_ADDR2OFFSET((uintptr_t)ptr + usize), sdiff);
		}
	} else
		post_zeroed = pre_zeroed;

	malloc_mutex_lock(&arena->huge_mtx);
	/* Update the size of the huge allocation. */
	extent_node_size_set(node, usize);
	/* Update zeroed. */
	extent_node_zeroed_set(node, post_zeroed);
	malloc_mutex_unlock(&arena->huge_mtx);

	/* Zap the excess chunks. */
	arena_chunk_ralloc_huge_shrink(arena, ptr, oldsize, usize);

	return (false);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x63a60
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x63a90
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x64000
andb $0x1, %al
movb %al, -0x71(%rbp)
movq -0x30(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x50010
leaq -0x68(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
movl $0x38, %edx
callq 0x103b0
jmp 0x62656
movq -0x18(%rbp), %rax
leaq 0x400cf(%rip), %rcx     # 0xa2730
addq (%rcx), %rax
leaq 0x400c5(%rip), %rcx     # 0xa2730
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq -0x20(%rbp), %rcx
leaq 0x400b0(%rip), %rdx     # 0xa2730
addq (%rdx), %rcx
leaq 0x400a6(%rip), %rdx     # 0xa2730
movq (%rdx), %rdx
xorq $-0x1, %rdx
andq %rdx, %rcx
subq %rcx, %rax
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
je 0x6270a
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq 0x4007b(%rip), %rcx     # 0xa2730
addq (%rcx), %rsi
leaq 0x40071(%rip), %rcx     # 0xa2730
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rsi
movq -0x20(%rbp), %rdx
leaq 0x4005c(%rip), %rcx     # 0xa2730
addq (%rcx), %rdx
leaq 0x40052(%rip), %rcx     # 0xa2730
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rdx
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %r8
movl (%r8), %r9d
movl $0x1, %r8d
callq *%rax
testb $0x1, %al
jne 0x62701
jmp 0x6270a
movb $0x1, -0x1(%rbp)
jmp 0x62821
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0x627c2
movq -0x18(%rbp), %rax
subq -0x20(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq 0x3ef74(%rip), %rax     # 0xa16a2
movb (%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x6275b
movq -0x10(%rbp), %rdi
addq -0x20(%rbp), %rdi
movq -0xb8(%rbp), %rsi
callq 0x63ae0
movb $0x0, -0x72(%rbp)
jmp 0x627c0
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq -0x20(%rbp), %rdx
leaq 0x3ffc2(%rip), %rax     # 0xa2730
movq (%rax), %rax
xorq $-0x1, %rax
andq %rax, %rdx
movq -0x18(%rbp), %rcx
leaq 0x3ffad(%rip), %rax     # 0xa2730
addq (%rax), %rcx
leaq 0x3ffa3(%rip), %rax     # 0xa2730
movq (%rax), %rax
xorq $-0x1, %rax
andq %rax, %rcx
movq -0x10(%rbp), %r8
addq -0x20(%rbp), %r8
leaq 0x3ff8a(%rip), %rax     # 0xa2730
andq (%rax), %r8
movq -0xb8(%rbp), %r9
leaq -0x68(%rbp), %rsi
callq 0x516b0
xorb $-0x1, %al
andb $0x1, %al
movb %al, -0x72(%rbp)
jmp 0x627ca
movb -0x71(%rbp), %al
andb $0x1, %al
movb %al, -0x72(%rbp)
movq -0x30(%rbp), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
callq 0x61da0
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x63f80
movq -0x28(%rbp), %rdi
movb -0x72(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x63fa0
movq -0x30(%rbp), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
callq 0x61dc0
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x3ca90
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xc0, %rsp
popq %rbp
retq
nop