// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/jemalloc/src/huge.c
// Function: je_huge_ralloc_no_move
bool
huge_ralloc_no_move(void *ptr, size_t oldsize, size_t usize_min,
    size_t usize_max, bool zero)
{

	assert(s2u(oldsize) == oldsize);

	/* Both allocations must be huge to avoid a move. */
	if (oldsize < chunksize || usize_max < chunksize)
		return (true);

	if (CHUNK_CEILING(usize_max) > CHUNK_CEILING(oldsize)) {
		/* Attempt to expand the allocation in-place. */
		if (!huge_ralloc_no_move_expand(ptr, oldsize, usize_max, zero))
			return (false);
		/* Try again, this time with usize_min. */
		if (usize_min < usize_max && CHUNK_CEILING(usize_min) >
		    CHUNK_CEILING(oldsize) && huge_ralloc_no_move_expand(ptr,
		    oldsize, usize_min, zero))
			return (false);
	}

	/*
	 * Avoid moving the allocation if the existing chunk size accommodates
	 * the new size.
	 */
	if (CHUNK_CEILING(oldsize) >= CHUNK_CEILING(usize_min)
	    && CHUNK_CEILING(oldsize) <= CHUNK_CEILING(usize_max)) {
		huge_ralloc_no_move_similar(ptr, oldsize, usize_min, usize_max,
		    zero);
		return (false);
	}

	/* Attempt to shrink the allocation in-place. */
	if (CHUNK_CEILING(oldsize) > CHUNK_CEILING(usize_max))
		return (huge_ralloc_no_move_shrink(ptr, oldsize, usize_max));
	return (true);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r15
leaq 0x2555d(%rip), %rax     # 0x5b6a8
movq (%rax), %rax
cmpq %rsi, %rax
seta %cl
cmpq %r15, %rax
seta %al
orb %cl, %al
movb $0x1, %r12b
jne 0x36497
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbp
leaq 0x2553b(%rip), %rax     # 0x5b6b0
movq (%rax), %rax
leaq (%rax,%r15), %rcx
movq %rax, %rdx
notq %rdx
andq %rdx, %rcx
addq %rax, %rsi
andq %rdx, %rsi
cmpq %rsi, %rcx
jbe 0x36205
movl %r8d, 0x8(%rsp)
movzbl %r8b, %ebx
movq %rbp, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %ebx, %ecx
callq 0x364e8
testb %al, %al
je 0x36494
leaq 0x254f8(%rip), %rax     # 0x5b6b0
movq (%rax), %rax
cmpq %r15, %r13
jae 0x36200
leaq (%rax,%r13), %rcx
movq %rax, %rdx
notq %rdx
andq %rdx, %rcx
leaq (%rax,%r14), %rsi
andq %rdx, %rsi
cmpq %rsi, %rcx
movl 0x8(%rsp), %r8d
jbe 0x36205
movq %rbp, %rdi
movq %r14, %rsi
movq %r13, %rdx
movl %ebx, %ecx
callq 0x364e8
testb %al, %al
jne 0x36494
leaq 0x254b3(%rip), %rax     # 0x5b6b0
movq (%rax), %rax
movl 0x8(%rsp), %r8d
leaq (%rax,%r14), %rcx
movq %rax, %rdx
notq %rdx
andq %rdx, %rcx
leaq (%rax,%r13), %rsi
andq %rdx, %rsi
cmpq %rsi, %rcx
setb %sil
addq %r15, %rax
andq %rdx, %rax
cmpq %rax, %rcx
seta %dl
orb %sil, %dl
je 0x3632e
cmpq %rax, %rcx
jbe 0x36497
movq %rbp, %rdi
callq 0x36c66
movq %rbp, %rbx
movq %rax, %rbp
movq (%rax), %r13
movb 0x18(%rax), %al
movl %eax, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
callq 0x2e354
leaq 0x25446(%rip), %rax     # 0x5b6b0
movq (%rax), %rdx
leaq (%rdx,%r14), %rsi
movq %rdx, %rax
notq %rax
andq %rax, %rsi
addq %r15, %rdx
andq %rax, %rdx
movq %rsi, %rcx
subq %rdx, %rcx
je 0x362a4
movl (%r13), %r9d
movq %rbx, %rdi
movl $0x1, %r8d
callq *0x48(%rsp)
movb $0x1, %r12b
testb %al, %al
jne 0x36497
movq %rbx, %r12
movq %r14, %r9
subq %r15, %r9
jbe 0x362f6
leaq 0x2436c(%rip), %rax     # 0x5a622
leaq (%r12,%r15), %rdi
cmpb $0x1, (%rax)
je 0x364c1
leaq 0x253e6(%rip), %rax     # 0x5b6b0
movq (%rax), %r8
movq %r8, %rax
notq %rax
movq %rdi, %rdx
andq %rax, %rdx
leaq (%r8,%r14), %rcx
andq %rax, %rcx
andq %rdi, %r8
leaq 0x20(%rsp), %rsi
movq %r13, %rdi
callq 0x2f06e
xorb $0x1, %al
movl %eax, 0x8(%rsp)
leaq 0x1d8(%r13), %rbx
movq %rbx, %rdi
callq 0x106d0
movq %r15, 0x10(%rbp)
movl 0x8(%rsp), %eax
movb %al, 0x18(%rbp)
movq %rbx, %rdi
callq 0x10440
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x2751a
jmp 0x36494
movq %rbp, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x50(%rsp)
leaq 0x11c6b(%rip), %rbx     # 0x47fc0
leaq 0x114e4(%rip), %rbp     # 0x47840
leaq 0x18(%rsp), %rcx
movq %r13, %r12
cmpq %r15, %r13
jae 0x363ad
cmpq $0xfff, %r12            # imm = 0xFFF
ja 0x36389
movq %r12, %rax
shrq $0x3, %rax
movzbl (%rbx,%rax), %eax
movq (%rbp,%rax,8), %r13
cmpq %r14, %r13
jbe 0x36361
jmp 0x363ad
leaq 0x1(%r12), %rdi
movq %rcx, %r13
movq %rcx, %rsi
movl %r8d, 0x8(%rsp)
callq 0x12b88
movq %r13, %rcx
movl 0x8(%rsp), %r8d
movq 0x18(%rsp), %r13
jmp 0x36382
cmpq %r14, %r12
movq 0x10(%rsp), %rbp
je 0x36494
movl %r8d, 0x8(%rsp)
movq %rbp, %rdi
callq 0x36c66
movq %rax, %r13
movq (%rax), %r15
movb 0x18(%rax), %al
movb %al, 0xf(%rsp)
movl %eax, %ebx
cmpq %r14, %r12
jae 0x3641e
movq %r14, %r9
subq %r12, %r9
leaq 0x24239(%rip), %rax     # 0x5a622
cmpb $0x1, (%rax)
je 0x364a9
leaq 0x252b7(%rip), %rax     # 0x5b6b0
movq (%rax), %rcx
leaq (%rcx,%r14), %rax
notq %rcx
andq %rax, %rcx
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
movq %rbp, %rdx
movq %r12, %r8
callq 0x2f06e
movl %eax, %ebx
xorb $0x1, %bl
movq %r15, %rbp
addq $0x1d8, %r15            # imm = 0x1D8
movq %r15, %rdi
callq 0x106d0
movq %r12, 0x10(%r13)
movb %bl, 0x18(%r13)
movq %r15, %rdi
callq 0x10440
movq %rbp, %rdi
movq 0x10(%rsp), %rbx
movq %rbx, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x27483
subq %r14, %r12
movl 0x8(%rsp), %eax
jbe 0x36494
testb %al, %al
je 0x3647c
cmpb $0x0, 0xf(%rsp)
jne 0x36494
addq %r14, %rbx
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x10270
jmp 0x36494
leaq 0x241b0(%rip), %rax     # 0x5a633
cmpb $0x1, (%rax)
je 0x36463
leaq 0x24192(%rip), %rax     # 0x5a621
cmpb $0x1, (%rax)
je 0x364db
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq (%r12,%rbp), %rdi
movl $0x5a, %esi
movq %r9, %rdx
callq 0x10270
xorl %ebx, %ebx
jmp 0x3641e
movl $0x5a, %esi
movq %r9, %rdx
callq 0x10270
movl $0x0, 0x8(%rsp)
jmp 0x362f6
addq %r14, %rbx
movq %rbx, %rdi
movl $0xa5, %esi
jmp 0x36472