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

	/* Increase usize to incorporate extra. */
	for (usize = usize_min; usize < usize_max && (usize_next = s2u(usize+1))
	    <= oldsize; usize = usize_next)
		; /* Do nothing. */

	if (oldsize == usize)
		return;

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

	/* Fill if necessary (shrinking). */
	if (oldsize > usize) {
		size_t sdiff = oldsize - usize;
		if (config_fill && unlikely(opt_junk_free)) {
			memset((void *)((uintptr_t)ptr + usize), 0x5a, sdiff);
			post_zeroed = false;
		} else {
			post_zeroed = !chunk_purge_wrapper(arena, &chunk_hooks,
			    ptr, CHUNK_CEILING(oldsize), usize, sdiff);
		}
	} else
		post_zeroed = pre_zeroed;

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

	arena_chunk_ralloc_huge_similar(arena, ptr, oldsize, usize);

	/* Fill if necessary (growing). */
	if (oldsize < usize) {
		if (zero || (config_fill && unlikely(opt_zero))) {
			if (!pre_zeroed) {
				memset((void *)((uintptr_t)ptr + oldsize), 0,
				    usize - oldsize);
			}
		} else if (config_fill && unlikely(opt_junk_alloc)) {
			memset((void *)((uintptr_t)ptr + oldsize), 0xa5, usize -
			    oldsize);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movb %r8b, %al
movq %rdi, -0x78(%rbp)
movq %rsi, -0x80(%rbp)
movq %rdx, -0x88(%rbp)
movq %rcx, -0x90(%rbp)
andb $0x1, %al
movb %al, -0x91(%rbp)
leaq -0xf0(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x10250
movq -0x88(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rcx
xorl %eax, %eax
cmpq -0x90(%rbp), %rcx
movb %al, -0x101(%rbp)
jae 0x623b4
movq -0xa0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
cmpq $0x1000, -0x70(%rbp)    # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x62279
jmp 0x622d4
movq -0x70(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x2c9e4(%rip), %rax     # 0x8ec80
movzbl (%rax,%rcx), %eax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x2c249(%rip), %rax     # 0x8e500
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x6239c
movq -0x70(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
setl %al
testb $0x1, %al
jne 0x622ea
jmp 0x6230c
movq -0x28(%rbp), %rdx
shlq %rdx
movl $0x3f, %eax
movl $0x40, %ecx
cmpq $0x0, %rdx
cmovneq %rcx, %rax
movq %rax, -0x110(%rbp)
jmp 0x62323
movq -0x28(%rbp), %rdi
shlq %rdi
subq $0x1, %rdi
callq 0x63d20
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x6, -0x30(%rbp)
jae 0x62343
movl $0x3, %eax
movq %rax, -0x118(%rbp)
jmp 0x62356
movq -0x30(%rbp), %rax
subq $0x2, %rax
subq $0x1, %rax
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
addq -0x48(%rbp), %rax
movq -0x48(%rbp), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0xa8(%rbp)
cmpq -0x80(%rbp), %rax
setbe %al
movb %al, -0x101(%rbp)
movb -0x101(%rbp), %al
testb $0x1, %al
jne 0x623c0
jmp 0x623d5
jmp 0x623c2
movq -0xa8(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0x6223d
movq -0x80(%rbp), %rax
cmpq -0xa0(%rbp), %rax
jne 0x623e7
jmp 0x625df
movq -0x78(%rbp), %rdi
callq 0x63a60
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x63a90
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x64000
andb $0x1, %al
movb %al, -0xf1(%rbp)
movq -0x80(%rbp), %rax
cmpq -0xa0(%rbp), %rax
jbe 0x624d0
movq -0x80(%rbp), %rax
subq -0xa0(%rbp), %rax
movq %rax, -0x100(%rbp)
leaq 0x3f25a(%rip), %rax     # 0xa16a2
movb (%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x62480
movq -0x78(%rbp), %rdi
addq -0xa0(%rbp), %rdi
movq -0x100(%rbp), %rdx
movl $0x5a, %esi
callq 0x10250
movb $0x0, -0xf2(%rbp)
jmp 0x624ce
movq -0xb8(%rbp), %rdi
movq -0x78(%rbp), %rdx
movq -0x80(%rbp), %rcx
leaq 0x4029a(%rip), %rax     # 0xa2730
addq (%rax), %rcx
leaq 0x40290(%rip), %rax     # 0xa2730
movq (%rax), %rax
xorq $-0x1, %rax
andq %rax, %rcx
movq -0xa0(%rbp), %r8
movq -0x100(%rbp), %r9
leaq -0xf0(%rbp), %rsi
callq 0x516b0
xorb $-0x1, %al
andb $0x1, %al
movb %al, -0xf2(%rbp)
jmp 0x624de
movb -0xf1(%rbp), %al
andb $0x1, %al
movb %al, -0xf2(%rbp)
movq -0xb8(%rbp), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
callq 0x61da0
jmp 0x624f3
movq -0xb0(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0x63f80
movq -0xb0(%rbp), %rdi
movb -0xf2(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x63fa0
movq -0xb8(%rbp), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
callq 0x61dc0
movq -0xb8(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq -0xa0(%rbp), %rcx
callq 0x3c990
movq -0x80(%rbp), %rax
cmpq -0xa0(%rbp), %rax
jae 0x625df
testb $0x1, -0x91(%rbp)
jne 0x6257f
leaq 0x3f147(%rip), %rax     # 0xa16b3
movb (%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x625a4
testb $0x1, -0xf1(%rbp)
jne 0x625a2
movq -0x78(%rbp), %rdi
addq -0x80(%rbp), %rdi
movq -0xa0(%rbp), %rdx
subq -0x80(%rbp), %rdx
xorl %esi, %esi
callq 0x10250
jmp 0x625dd
leaq 0x3f0f6(%rip), %rax     # 0xa16a1
movb (%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x625db
movq -0x78(%rbp), %rdi
addq -0x80(%rbp), %rdi
movq -0xa0(%rbp), %rdx
subq -0x80(%rbp), %rdx
movl $0xa5, %esi
callq 0x10250
jmp 0x625dd
jmp 0x625df
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopl (%rax,%rax)