// File: /workspace/github_c_makefile_star2_O2/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/arena.c
// Function: je_arena_ralloc_no_move
bool
arena_ralloc_no_move(tsdn_t *tsdn, void *ptr, size_t oldsize, size_t size,
    size_t extra, bool zero)
{
	size_t usize_min, usize_max;

	/* Calls with non-zero extra had to clamp extra. */
	assert(extra == 0 || size + extra <= HUGE_MAXCLASS);

	if (unlikely(size > HUGE_MAXCLASS))
		return (true);

	usize_min = s2u(size);
	usize_max = s2u(size + extra);
	if (likely(oldsize <= large_maxclass && usize_min <= large_maxclass)) {
		arena_chunk_t *chunk;

		/*
		 * Avoid moving the allocation if the size class can be left the
		 * same.
		 */
		if (oldsize <= SMALL_MAXCLASS) {
			assert(arena_bin_info[size2index(oldsize)].reg_size ==
			    oldsize);
			if ((usize_max > SMALL_MAXCLASS ||
			    size2index(usize_max) != size2index(oldsize)) &&
			    (size > oldsize || usize_max < oldsize))
				return (true);
		} else {
			if (usize_max <= SMALL_MAXCLASS)
				return (true);
			if (arena_ralloc_large(tsdn, ptr, oldsize, usize_min,
			    usize_max, zero))
				return (true);
		}

		chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr);
		arena_decay_tick(tsdn, extent_node_arena_get(&chunk->node));
		return (false);
	} else {
		return (huge_ralloc_no_move(tsdn, ptr, oldsize, usize_min,
		    usize_max, zero));
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movabsq $0x7000000000000000, %rdx # imm = 0x7000000000000000
movb $0x1, %r13b
cmpq %rdx, %rcx
ja 0x1d07b
movq %rcx, %r14
movq %rsi, %r10
movq %rdi, %rbx
pushq $-0x1
popq %r12
pushq $0x7
popq %rax
cmpq $0x1000, %rcx           # imm = 0x1000
ja 0x1d225
leaq -0x1(%r14), %rcx
shrq $0x3, %rcx
leaq 0x19cce(%rip), %rsi     # 0x369c0
movzbl (%rsi,%rcx), %ecx
leaq 0x19543(%rip), %rsi     # 0x36240
movq (%rsi,%rcx,8), %rbp
addq %r14, %r8
cmpq $0x1000, %r8            # imm = 0x1000
ja 0x1d255
decq %r8
shrq $0x3, %r8
leaq 0x19ca1(%rip), %rax     # 0x369c0
movzbl (%rax,%r8), %eax
leaq 0x19515(%rip), %rcx     # 0x36240
movq (%rcx,%rax,8), %r12
movq 0x2c26a(%rip), %rax     # 0x48fa0
cmpq %r15, %rax
jb 0x1d28a
cmpq %rax, %rbp
ja 0x1d28a
cmpq $0x3800, %r15           # imm = 0x3800
ja 0x1cdba
cmpq $0x3800, %r12           # imm = 0x3800
ja 0x1cda3
cmpq $0x1000, %r12           # imm = 0x1000
ja 0x1d2ca
leaq -0x1(%r12), %rax
shrq $0x3, %rax
leaq 0x19c49(%rip), %rcx     # 0x369c0
movzbl (%rcx,%rax), %ebp
cmpq $0x1000, %r15           # imm = 0x1000
ja 0x1d2df
leaq -0x1(%r15), %rax
shrq $0x3, %rax
leaq 0x19c29(%rip), %rcx     # 0x369c0
movzbl (%rcx,%rax), %eax
cmpl %eax, %ebp
je 0x1d042
cmpq %r15, %r14
ja 0x1d07b
cmpq %r15, %r12
jae 0x1d042
jmp 0x1d07b
cmpq $0x3801, %r12           # imm = 0x3801
jb 0x1d07b
cmpq %r15, %r12
je 0x1d042
leaq 0x2c2f9(%rip), %rax     # 0x490d0
movq (%rax), %r13
notq %r13
andq %r10, %r13
movq (%r13), %rsi
movq %r12, %r14
subq %r15, %r14
movq %r10, 0x8(%rsp)
jbe 0x1ced0
movq %rbx, 0x30(%rsp)
movl %r9d, 0x18(%rsp)
movq %r10, %r14
subq %r13, %r14
shrq $0xc, %r14
leaq 0x1000(%r15), %rbx
shrq $0xc, %rbx
movq %rsi, 0x20(%rsp)
leaq 0x10(%rsi), %rdi
movq %rdi, 0x28(%rsp)
callq 0xb5a0
movq %rbx, %rcx
movq %r14, 0x40(%rsp)
addq %r14, %rcx
leaq 0x2c29f(%rip), %rax     # 0x490d8
cmpq (%rax), %rcx
jae 0x1cfdb
movq 0x2c177(%rip), %rsi     # 0x48fc0
movq %rcx, %rax
subq %rsi, %rax
movq 0x78(%r13,%rax,8), %rbx
movb $0x1, %al
testb $0x1, %bl
jne 0x1cfed
movl %eax, 0x10(%rsp)
shrq %rbx
andq $-0x1000, %rbx          # imm = 0xF000
addq %r15, %rbx
cmpq %rbp, %rbx
jb 0x1cff1
leaq 0x19b40(%rip), %r14     # 0x369c0
leaq 0x193b9(%rip), %rbp     # 0x36240
movl 0x18(%rsp), %edx
cmpq %r12, %rbx
jae 0x1d08d
cmpq $0x1000, %r12           # imm = 0x1000
ja 0x1ceb2
decq %r12
shrq $0x3, %r12
movzbl (%r14,%r12), %eax
decl %eax
movq (%rbp,%rax,8), %r12
jmp 0x1ce8b
movq %r12, %rdi
movq %rcx, %r12
movq %rsi, 0x38(%rsp)
callq 0x20acc
movq 0x38(%rsp), %rsi
movq %r12, %rcx
movl 0x18(%rsp), %edx
jmp 0x1cea9
leaq 0x2b64b(%rip), %rax     # 0x48522
cmpb $0x1, (%rax)
je 0x1d2f6
subq %r13, %r10
shrq $0xc, %r10
movq 0x2c0da(%rip), %rcx     # 0x48fc8
addq %r13, %rcx
imulq $0x60, %r10, %rax
xorl %edx, %edx
subq 0x2c0c2(%rip), %rdx     # 0x48fc0
addq %rcx, %rax
imulq $0x60, %rdx, %rcx
addq %rcx, %rax
addq $0x18, %rax
movq %rax, 0x10(%rsp)
leaq 0x10(%rsi), %rdi
movq %rdi, 0x18(%rsp)
movq %rsi, %rbp
callq 0xb5a0
movl $0x1000, %r9d           # imm = 0x1000
leaq (%r15,%r9), %r8
addq %r12, %r9
movl $0x1, (%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq 0x10(%rsp), %rcx
callq 0x20b62
movq %r15, %rdi
callq 0x20acc
movl %eax, %r15d
movq %r12, %rdi
callq 0x20acc
addl $-0x27, %r15d
movq 0xd0(%rbp), %rcx
shlq $0x5, %r15
incq 0x8(%rcx,%r15)
decq 0x18(%rcx,%r15)
addl $-0x27, %eax
movdqu 0x98(%rbp), %xmm0
movdqu 0xa8(%rbp), %xmm1
pcmpeqd %xmm2, %xmm2
psubq %xmm2, %xmm1
movdqu %xmm1, 0xa8(%rbp)
movq %r14, %xmm1
shufpd $0x2, 0x19e5a(%rip), %xmm1 # xmm1 = xmm1[0],mem[1]
paddq %xmm0, %xmm1
movdqu %xmm1, 0x98(%rbp)
shlq $0x5, %rax
incq (%rcx,%rax)
movdqu 0x10(%rcx,%rax), %xmm0
psubq %xmm2, %xmm0
movdqu %xmm0, 0x10(%rcx,%rax)
movq 0x18(%rsp), %rdi
callq 0xb380
movq 0x8(%rsp), %r10
jmp 0x1d042
movb $0x1, %al
movl %eax, 0x10(%rsp)
movq 0x28(%rsp), %rbp
movq 0x30(%rsp), %rbx
jmp 0x1cffb
movl %eax, 0x10(%rsp)
movq 0x30(%rsp), %rbx
movq 0x28(%rsp), %rbp
movq %rbp, %rdi
callq 0xb380
movl 0x18(%rsp), %eax
movl 0x10(%rsp), %ecx
orb %cl, %al
je 0x1d01d
movb $0x1, %r13b
testb %cl, %cl
movq 0x8(%rsp), %r10
je 0x1d042
jmp 0x1d07b
leaq 0x2b4fd(%rip), %rax     # 0x48521
cmpb $0x1, (%rax)
movq 0x8(%rsp), %r10
je 0x1d31d
leaq 0x2b4fa(%rip), %rax     # 0x48533
cmpb $0x1, (%rax)
je 0x1d380
testq %rbx, %rbx
je 0x1d078
leaq 0x2c082(%rip), %rax     # 0x490d0
movq (%rax), %rax
notq %rax
andq %r10, %rax
movq (%rax), %r14
movl (%r14), %esi
movq %rbx, %rdi
callq 0x20a5e
testq %rax, %rax
je 0x1d078
movl (%rax), %ecx
testl %ecx, %ecx
jle 0x1d2b0
decl %ecx
movl %ecx, (%rax)
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %r14
subq %r15, %r14
je 0x1cff1
movq 0x2bf28(%rip), %rax     # 0x48fc8
addq %r13, %rax
imulq $0x60, %rcx, %rcx
addq %rax, %rcx
negq %rsi
imulq $0x60, %rsi, %rax
leaq (%rax,%rcx), %rsi
addq $0x18, %rsi
movzbl %dl, %ecx
movq 0x20(%rsp), %rdi
movq %r14, %rdx
callq 0x1f1be
testb %al, %al
movq 0x30(%rsp), %rbx
movq 0x28(%rsp), %rbp
jne 0x1cffb
movq %r14, 0x10(%rsp)
cmpb $0x0, 0x18(%rsp)
je 0x1d106
movq 0x8(%rsp), %rax
leaq (%rax,%r15), %rdi
movl %edi, %eax
andl $0xfff, %eax            # imm = 0xFFF
movl $0x1000, %edx           # imm = 0x1000
subq %rax, %rdx
xorl %esi, %esi
callq 0xb230
movl $0x1000, %r14d          # imm = 0x1000
leaq (%r12,%r14), %rax
shrq $0xc, %rax
movq 0x2bea5(%rip), %rcx     # 0x48fc0
movq 0x40(%rsp), %r9
addq %r9, %rax
decq %rax
subq %rcx, %r9
movl 0x78(%r13,%r9,8), %edx
movq %rax, %rsi
subq %rcx, %rsi
movl 0x78(%r13,%rsi,8), %ecx
orl %edx, %ecx
andl $0x10, %ecx
movl %ecx, %esi
shrl %esi
xorl $0x8, %esi
andl %esi, %edx
leaq 0x2000(,%r12,2), %rdi
orq %rcx, %rdi
movl $0x1fe3, %r8d           # imm = 0x1FE3
orq %r8, %rdi
orq %rdx, %rdi
movq %rdi, 0x78(%r13,%r9,8)
subq 0x2be56(%rip), %rax     # 0x48fc0
andl 0x78(%r13,%rax,8), %esi
orl %ecx, %esi
orq %r8, %rsi
movq %rsi, 0x78(%r13,%rax,8)
movq %r15, %rdi
callq 0x20acc
movl %eax, %r13d
addl $-0x27, %r13d
cmpq %r14, %r12
ja 0x1d3e4
decq %r12
shrq $0x3, %r12
leaq 0x19821(%rip), %rax     # 0x369c0
movzbl (%rax,%r12), %eax
movq 0x20(%rsp), %rdx
movq 0x10(%rsp), %rsi
movq 0xd0(%rdx), %rcx
shlq $0x5, %r13
incq 0x8(%rcx,%r13)
decq 0x18(%rcx,%r13)
addl $-0x27, %eax
movdqu 0x98(%rdx), %xmm0
movdqu 0xa8(%rdx), %xmm1
pcmpeqd %xmm2, %xmm2
psubq %xmm2, %xmm1
movdqu %xmm1, 0xa8(%rdx)
movq %rsi, %xmm1
shufpd $0x2, 0x19c0c(%rip), %xmm1 # xmm1 = xmm1[0],mem[1]
paddq %xmm0, %xmm1
movdqu %xmm1, 0x98(%rdx)
shlq $0x5, %rax
incq (%rcx,%rax)
movdqu 0x10(%rcx,%rax), %xmm0
psubq %xmm2, %xmm0
movdqu %xmm0, 0x10(%rcx,%rax)
movl $0x0, 0x10(%rsp)
jmp 0x1cffb
leaq -0x1(,%r14,2), %rcx
bsrq %rcx, %rsi
movl %esi, %ecx
addb $-0x3, %cl
movq %r12, %rbp
shlq %cl, %rbp
cmpl $0x6, %esi
notq %rbp
cmovbq %rax, %rbp
leaq (%r14,%rbp), %rcx
notq %rbp
andq %rcx, %rbp
jmp 0x1cd01
cmpq %rdx, %r8
ja 0x1d3f1
leaq -0x1(,%r8,2), %rcx
bsrq %rcx, %rdx
movl %edx, %ecx
addb $-0x3, %cl
shlq %cl, %r12
cmpl $0x6, %edx
notq %r12
cmovbq %rax, %r12
addq %r12, %r8
notq %r12
andq %r8, %r12
jmp 0x1cd2f
movzbl %r9b, %r9d
movq %rbx, %rdi
movq %r10, %rsi
movq %r15, %rdx
movq %rbp, %rcx
movq %r12, %r8
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2869c
movl 0x4(%rax), %ecx
movl %ecx, (%rax)
xorl %r13d, %r13d
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x1aac4
jmp 0x1d07b
movq %r12, %rdi
movq %r10, %rbp
callq 0x20acc
movq %rbp, %r10
movl %eax, %ebp
jmp 0x1cd7b
movq %r15, %rdi
movq %r10, 0x8(%rsp)
callq 0x20acc
movq 0x8(%rsp), %r10
jmp 0x1cd9b
leaq (%r12,%r10), %rdi
movq %r15, %rdx
subq %r12, %rdx
movq %rsi, 0x20(%rsp)
pushq $0x5a
popq %rsi
movq %r10, %rbp
callq 0xb230
movq 0x20(%rsp), %rsi
movq %rbp, %r10
jmp 0x1cee0
leaq (%r10,%r15), %r12
leaq 0x2bda8(%rip), %rax     # 0x490d0
movq (%rax), %rax
notq %rax
andq %r10, %rax
cmpq %r10, %rax
je 0x1d3f9
movq 0x8(%rsp), %rcx
subq %rax, %rcx
shrq $0xc, %rcx
subq 0x2bc73(%rip), %rcx     # 0x48fc0
movq 0x78(%rax,%rcx,8), %rdx
movl %edx, %eax
shrl $0x5, %eax
movl $0xff, %ecx
andl %ecx, %eax
cmpl %ecx, %eax
je 0x1d40e
movl %eax, %eax
leaq 0x18ed1(%rip), %rcx     # 0x36240
movq (%rcx,%rax,8), %rdx
subq %r15, %rdx
movq %r12, %rdi
movl $0xa5, %esi
jmp 0x1d3da
leaq (%r10,%r15), %r12
leaq 0x2bd45(%rip), %rax     # 0x490d0
movq (%rax), %rax
notq %rax
andq %r10, %rax
cmpq %r10, %rax
je 0x1d424
movq 0x8(%rsp), %rcx
subq %rax, %rcx
shrq $0xc, %rcx
subq 0x2bc10(%rip), %rcx     # 0x48fc0
movq 0x78(%rax,%rcx,8), %rdx
movl %edx, %eax
shrl $0x5, %eax
movl $0xff, %ecx
andl %ecx, %eax
cmpl %ecx, %eax
je 0x1d436
movl %eax, %eax
leaq 0x18e72(%rip), %rcx     # 0x36240
movq (%rcx,%rax,8), %rdx
subq %r15, %rdx
movq %r12, %rdi
xorl %esi, %esi
callq 0xb230
jmp 0x1cfd4
movq %r12, %rdi
callq 0x20acc
jmp 0x1d1a4
xorl %r12d, %r12d
jmp 0x1cd2f
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0x292e1
movq %rax, %rdx
jmp 0x1d373
shrq %rdx
andq $-0x1000, %rdx          # imm = 0xF000
addq $-0x1000, %rdx          # imm = 0xF000
jmp 0x1d373
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0x292e1
movq %rax, %rdx
jmp 0x1d3d2
shrq %rdx
andq $-0x1000, %rdx          # imm = 0xF000
addq $-0x1000, %rdx          # imm = 0xF000
jmp 0x1d3d2