// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/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 0x3c58d(%rip), %rax     # 0x84698
movq (%rax), %rax
cmpq %rsi, %rax
seta %cl
cmpq %r15, %rax
seta %al
orb %cl, %al
movb $0x1, %r12b
jne 0x48448
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbp
leaq 0x3c56b(%rip), %r9      # 0x846a0
movq (%r9), %rax
leaq (%rax,%r15), %rcx
movq %rax, %rdx
notq %rdx
andq %rdx, %rcx
addq %rsi, %rax
andq %rdx, %rax
cmpq %rax, %rcx
jbe 0x481be
movl %r8d, (%rsp)
movzbl %r8b, %ebx
movq %rbp, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %ebx, %ecx
callq 0x48498
testb %al, %al
je 0x48445
cmpq %r15, %r13
movl (%rsp), %r8d
leaq 0x3c522(%rip), %r9      # 0x846a0
jae 0x481be
movq (%r9), %rax
leaq (%rax,%r13), %rcx
movq %rax, %rdx
notq %rdx
andq %rdx, %rcx
addq %r14, %rax
andq %rdx, %rax
cmpq %rax, %rcx
jbe 0x481be
movq %rbp, %rdi
movq %r14, %rsi
movq %r13, %rdx
movl %ebx, %ecx
callq 0x48498
leaq 0x3c4ee(%rip), %r9      # 0x846a0
movl (%rsp), %r8d
testb %al, %al
jne 0x48445
movq (%r9), %rax
leaq (%rax,%r14), %rcx
movq %rax, %rdx
notq %rdx
andq %rdx, %rcx
leaq (%rax,%r13), %rsi
andq %rdx, %rsi
cmpq %rsi, %rcx
jb 0x481ea
leaq (%rax,%r15), %rsi
andq %rdx, %rsi
cmpq %rsi, %rcx
jbe 0x482e2
addq %r15, %rax
andq %rdx, %rax
cmpq %rax, %rcx
jbe 0x48448
movq %rbp, %rdi
movq %r9, %r12
callq 0x48bfc
movq %rbp, %rbx
movq %rax, %rbp
movq (%rax), %r13
movb 0x18(%rax), %al
movl %eax, (%rsp)
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
callq 0x403f3
movq %r12, %r8
movq (%r12), %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 0x48261
movl (%r13), %r9d
movq %rbx, %rdi
movl $0x1, %r8d
callq *0x48(%rsp)
movq %r12, %r8
movb $0x1, %r12b
testb %al, %al
jne 0x48448
movq %rbx, %r12
movq %r14, %r9
subq %r15, %r9
jbe 0x482ab
leaq 0x3b4bf(%rip), %rax     # 0x83732
leaq (%r12,%r15), %rdi
cmpb $0x1, (%rax)
je 0x4845a
movq (%r8), %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 0x410fc
xorb $0x1, %al
movl %eax, (%rsp)
leaq 0x1d8(%r13), %rbx
movq %rbx, %rdi
callq 0x12960
movq %r15, 0x10(%rbp)
movl (%rsp), %eax
movb %al, 0x18(%rbp)
movq %rbx, %rdi
callq 0x125c0
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x39fae
jmp 0x48445
movq %rbp, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x50(%rsp)
leaq 0x114f7(%rip), %rbx     # 0x59800
leaq 0x10d70(%rip), %rbp     # 0x59080
leaq 0x18(%rsp), %rcx
movq %r13, %r12
cmpq %r15, %r13
jae 0x48366
cmpq $0xfff, %r12            # imm = 0xFFF
ja 0x4833d
movq %r12, %rax
shrq $0x3, %rax
movzbl (%rbx,%rax), %eax
movq (%rbp,%rax,8), %r13
cmpq %r14, %r13
jbe 0x48315
jmp 0x48366
leaq 0x1(%r12), %rdi
movq %rcx, %r13
movq %rcx, %rsi
movl %r8d, (%rsp)
callq 0x15529
movq %r13, %rcx
leaq 0x3c345(%rip), %r9      # 0x846a0
movl (%rsp), %r8d
movq 0x18(%rsp), %r13
jmp 0x48336
cmpq %r14, %r12
movq 0x10(%rsp), %r13
je 0x48445
movq %r9, %r15
movl %r8d, (%rsp)
movq %r13, %rdi
callq 0x48bfc
movq (%rax), %rbp
movq %rax, 0x8(%rsp)
movb 0x18(%rax), %al
movb %al, 0x7(%rsp)
movl %eax, %ebx
cmpq %r14, %r12
jae 0x483d4
movq %r14, %r9
subq %r12, %r9
leaq 0x3b38c(%rip), %rax     # 0x83732
cmpb $0x1, (%rax)
je 0x48473
movq (%r15), %rcx
leaq (%rcx,%r14), %rax
notq %rcx
andq %rax, %rcx
leaq 0x20(%rsp), %rsi
movq %rbp, %rdi
movq %r13, %rdx
movq %r12, %r8
callq 0x410fc
movl %eax, %ebx
xorb $0x1, %bl
leaq 0x1d8(%rbp), %r15
movq %r15, %rdi
callq 0x12960
movq 0x8(%rsp), %rax
movq %r12, 0x10(%rax)
movb %bl, 0x18(%rax)
movq %r15, %rdi
callq 0x125c0
movq %rbp, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x39f17
subq %r14, %r12
movl (%rsp), %eax
jbe 0x48445
testb %al, %al
je 0x4842d
cmpb $0x0, 0x7(%rsp)
jne 0x48445
addq %r14, %r13
movq %r13, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x12380
jmp 0x48445
leaq 0x3b30f(%rip), %rax     # 0x83743
cmpb $0x1, (%rax)
je 0x48414
leaq 0x3b2f1(%rip), %rax     # 0x83731
cmpb $0x1, (%rax)
je 0x4848b
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x5a, %esi
movq %r9, %rdx
callq 0x12380
movl $0x0, (%rsp)
jmp 0x482ab
leaq (%r12,%r13), %rdi
movl $0x5a, %esi
movq %r9, %rdx
callq 0x12380
xorl %ebx, %ebx
jmp 0x483d4
addq %r14, %r13
movq %r13, %rdi
movl $0xa5, %esi
jmp 0x48423