// File: /workspace/github_c_makefile_star2_O3/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 $0x58, %rsp
movq %rdx, %r15
movabsq $0x7000000000000000, %rdx # imm = 0x7000000000000000
movb $0x1, %r13b
cmpq %rdx, %rcx
ja 0xddb5
movq %rcx, %r14
movq %rsi, %r10
movq %rdi, %rbp
pushq $-0x1
popq %r12
pushq $0x7
popq %rax
cmpq $0x1000, %rcx           # imm = 0x1000
ja 0xded5
leaq -0x1(%r14), %rcx
shrq $0x3, %rcx
leaq 0x2e301(%rip), %rsi     # 0x3be40
movzbl (%rsi,%rcx), %ecx
leaq 0x2db76(%rip), %rsi     # 0x3b6c0
movq (%rsi,%rcx,8), %rbx
addq %r14, %r8
cmpq $0x1000, %r8            # imm = 0x1000
ja 0xdf05
decq %r8
shrq $0x3, %r8
leaq 0x2e2d4(%rip), %rax     # 0x3be40
movzbl (%rax,%r8), %eax
leaq 0x2db48(%rip), %rcx     # 0x3b6c0
movq (%rcx,%rax,8), %r12
movq 0x3f41d(%rip), %rax     # 0x4cfa0
movzbl %r9b, %r11d
cmpq %r15, %rax
jb 0xdf3a
cmpq %rax, %rbx
ja 0xdf3a
cmpq $0x3800, %r15           # imm = 0x3800
ja 0xdc03
cmpq $0x3800, %r12           # imm = 0x3800
ja 0xdbf0
cmpq $0x1000, %r12           # imm = 0x1000
ja 0xe16a
leaq -0x1(%r12), %rax
shrq $0x3, %rax
leaq 0x2e278(%rip), %rcx     # 0x3be40
movzbl (%rcx,%rax), %ebx
cmpq $0x1000, %r15           # imm = 0x1000
ja 0xe17f
leaq -0x1(%r15), %rax
shrq $0x3, %rax
leaq 0x2e258(%rip), %rcx     # 0x3be40
movzbl (%rcx,%rax), %eax
cmpl %eax, %ebx
je 0xdc15
cmpq %r15, %r14
ja 0xddb5
cmpq %r15, %r12
jae 0xdc15
jmp 0xddb5
cmpq $0x3801, %r12           # imm = 0x3801
jb 0xddb5
cmpq %r15, %r12
jne 0xdc64
testq %rbp, %rbp
je 0xdc5c
leaq 0x3f4af(%rip), %rax     # 0x4d0d0
movq (%rax), %rax
notq %rax
andq %r10, %rax
movq (%rax), %rbx
movl (%rbx), %esi
movq 0x38(%rbp), %rax
testq %rax, %rax
je 0xdf5f
cmpl %esi, 0x40(%rbp)
jbe 0xdf5f
leaq (%rax,%rsi,8), %rax
testq %rax, %rax
je 0xdc5c
movl (%rax), %ecx
testl %ecx, %ecx
jle 0xe150
decl %ecx
movl %ecx, (%rax)
xorl %r13d, %r13d
jmp 0xddb5
leaq 0x3f465(%rip), %rax     # 0x4d0d0
movq (%rax), %r13
notq %r13
andq %r10, %r13
movq (%r13), %rsi
movq %r12, %r14
subq %r15, %r14
movq %r10, 0x10(%rsp)
movq %rsi, 0x30(%rsp)
jbe 0xddc7
movl %r11d, 0x38(%rsp)
movl %r9d, 0x2c(%rsp)
movq %rbp, 0x18(%rsp)
movq %r10, %rbp
subq %r13, %rbp
shrq $0xc, %rbp
leaq 0x1000(%r15), %r14
shrq $0xc, %r14
leaq 0x10(%rsi), %rdi
movq %rdi, 0x20(%rsp)
callq 0xb5a0
movq %rbp, 0x50(%rsp)
addq %rbp, %r14
leaq 0x3f409(%rip), %rax     # 0x4d0d8
cmpq (%rax), %r14
jae 0xdda8
movq 0x3f2e1(%rip), %rdx     # 0x4cfc0
movq %r14, %rax
subq %rdx, %rax
movq 0x78(%r13,%rax,8), %rbp
testb $0x1, %bpl
jne 0xdda8
shrq %rbp
andq $-0x1000, %rbp          # imm = 0xF000
addq %r15, %rbp
cmpq %rbx, %rbp
jb 0xdda8
movq %r13, 0x40(%rsp)
cmpq %r12, %rbp
jae 0xdd5e
leaq 0x2e125(%rip), %rcx     # 0x3be40
leaq 0x2d99e(%rip), %rbx     # 0x3b6c0
cmpq $0x1000, %r12           # imm = 0x1000
ja 0xdd44
decq %r12
shrq $0x3, %r12
movzbl (%rcx,%r12), %eax
decl %eax
movq (%rbx,%rax,8), %r12
cmpq %r12, %rbp
jb 0xdd22
jmp 0xdd5e
movq %r12, %rdi
movq %rdx, 0x48(%rsp)
movq %rcx, %r12
callq 0xf6d1
movq %r12, %rcx
movq 0x48(%rsp), %rdx
jmp 0xdd37
movq %r12, %rbx
subq %r15, %rbx
movq 0x40(%rsp), %rcx
je 0xdda8
movq 0x3f256(%rip), %rax     # 0x4cfc8
addq %rcx, %rax
imulq $0x60, %r14, %rcx
addq %rax, %rcx
negq %rdx
imulq $0x60, %rdx, %rax
leaq (%rax,%rcx), %rsi
addq $0x18, %rsi
pushq $0x1
popq %rcx
movq 0x30(%rsp), %rdi
movq %rbx, %rdx
movl 0x38(%rsp), %r8d
callq 0x24f71
testb %al, %al
je 0xdf6c
movq 0x20(%rsp), %rdi
callq 0xb380
movb $0x1, %r13b
movl %r13d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3e754(%rip), %rax     # 0x4c522
cmpb $0x1, (%rax)
je 0xe196
subq %r13, %r10
shrq $0xc, %r10
movq 0x3f1e3(%rip), %rcx     # 0x4cfc8
addq %r13, %rcx
imulq $0x60, %r10, %rax
xorl %edx, %edx
subq 0x3f1cb(%rip), %rdx     # 0x4cfc0
addq %rcx, %rax
imulq $0x60, %rdx, %rcx
addq %rcx, %rax
addq $0x18, %rax
movq %rax, 0x38(%rsp)
leaq 0x10(%rsi), %rdi
movq %rdi, 0x20(%rsp)
movq %rsi, %rbx
callq 0xb5a0
movl $0x1000, %r9d           # imm = 0x1000
leaq (%r15,%r9), %r8
addq %r12, %r9
movl $0x1, (%rsp)
movq %rbp, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq 0x38(%rsp), %rcx
callq 0xf76a
movq %r15, %rdi
callq 0xf6d1
movl %eax, %r15d
movq %r12, %rdi
callq 0xf6d1
addl $-0x27, %r15d
movq 0xd0(%rbx), %rcx
shlq $0x5, %r15
incq 0x8(%rcx,%r15)
decq 0x18(%rcx,%r15)
addl $-0x27, %eax
movdqu 0x98(%rbx), %xmm0
movdqu 0xa8(%rbx), %xmm1
pcmpeqd %xmm2, %xmm2
psubq %xmm2, %xmm1
movdqu %xmm1, 0xa8(%rbx)
movq %r14, %xmm1
shufpd $0x2, 0x2b183(%rip), %xmm1 # xmm1 = xmm1[0],mem[1]
paddq %xmm0, %xmm1
movdqu %xmm1, 0x98(%rbx)
shlq $0x5, %rax
incq (%rcx,%rax)
movdqu 0x10(%rcx,%rax), %xmm0
psubq %xmm2, %xmm0
movdqu %xmm0, 0x10(%rcx,%rax)
movq 0x20(%rsp), %rdi
callq 0xb380
movq 0x10(%rsp), %r10
jmp 0xdc15
leaq -0x1(,%r14,2), %rcx
bsrq %rcx, %rsi
movl %esi, %ecx
addb $-0x3, %cl
movq %r12, %rbx
shlq %cl, %rbx
cmpl $0x6, %esi
notq %rbx
cmovbq %rax, %rbx
leaq (%rbx,%r14), %rcx
notq %rbx
andq %rcx, %rbx
jmp 0xdb4e
cmpq %rdx, %r8
ja 0xe1b8
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 0xdb7c
movq %rbp, %rdi
movq %r10, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movq %r12, %r8
movl %r11d, %r9d
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x101d6
movq %rbp, %rdi
callq 0x1ade7
jmp 0xdc49
cmpb $0x0, 0x2c(%rsp)
je 0xdf92
movq 0x10(%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, %r13d          # imm = 0x1000
leaq (%r12,%r13), %rax
shrq $0xc, %rax
movq 0x3f019(%rip), %rcx     # 0x4cfc0
movq 0x50(%rsp), %r10
addq %r10, %rax
decq %rax
subq %rcx, %r10
movq 0x40(%rsp), %r9
movl 0x78(%r9,%r10,8), %edx
movq %rax, %rsi
subq %rcx, %rsi
movl 0x78(%r9,%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(%r9,%r10,8)
subq 0x3efc5(%rip), %rax     # 0x4cfc0
andl 0x78(%r9,%rax,8), %esi
orl %ecx, %esi
orq %r8, %rsi
movq %rsi, 0x78(%r9,%rax,8)
movq %r15, %rdi
callq 0xf6d1
movl %eax, %r14d
addl $-0x27, %r14d
cmpq %r13, %r12
movq 0x18(%rsp), %rbp
ja 0xe1c0
decq %r12
shrq $0x3, %r12
leaq 0x2de0b(%rip), %rax     # 0x3be40
movzbl (%rax,%r12), %eax
movq 0x30(%rsp), %rdx
movq 0x20(%rsp), %rdi
movq 0xd0(%rdx), %rcx
shlq $0x5, %r14
incq 0x8(%rcx,%r14)
decq 0x18(%rcx,%r14)
addl $-0x27, %eax
movdqu 0x98(%rdx), %xmm0
movdqu 0xa8(%rdx), %xmm1
pcmpeqd %xmm2, %xmm2
psubq %xmm2, %xmm1
movdqu %xmm1, 0xa8(%rdx)
movq %rbx, %xmm1
shufpd $0x2, 0x2af96(%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)
callq 0xb380
cmpb $0x0, 0x2c(%rsp)
movq 0x10(%rsp), %r10
jne 0xdc15
movabsq $0x7ffffffffffff000, %rax # imm = 0x7FFFFFFFFFFFF000
leaq 0x3e44d(%rip), %rcx     # 0x4c521
cmpb $0x1, (%rcx)
je 0xe1cd
leaq 0x3e44f(%rip), %rcx     # 0x4c533
cmpb $0x1, (%rcx)
jne 0xdc15
leaq (%r10,%r15), %rbx
leaq 0x3efd8(%rip), %rcx     # 0x4d0d0
movq (%rcx), %rcx
notq %rcx
andq %r10, %rcx
cmpq %r10, %rcx
je 0xe249
movq 0x10(%rsp), %rdx
subq %rcx, %rdx
shrq $0xc, %rdx
subq 0x3eea3(%rip), %rdx     # 0x4cfc0
movq 0x78(%rcx,%rdx,8), %rdx
movl %edx, %ecx
shrl $0x5, %ecx
movl $0xff, %esi
andl %esi, %ecx
cmpl %esi, %ecx
je 0xe26f
movl %ecx, %eax
leaq 0x2d581(%rip), %rcx     # 0x3b6c0
movq (%rcx,%rax,8), %rdx
subq %r15, %rdx
movq %rbx, %rdi
xorl %esi, %esi
jmp 0xe226
movl 0x4(%rax), %ecx
movl %ecx, (%rax)
xorl %r13d, %r13d
movq %rbp, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x225b4
jmp 0xddb5
movq %r12, %rdi
movq %r10, %rbx
callq 0xf6d1
movq %rbx, %r10
movl %eax, %ebx
jmp 0xdbcc
movq %r15, %rdi
movq %r10, 0x10(%rsp)
callq 0xf6d1
movq 0x10(%rsp), %r10
jmp 0xdbec
leaq (%r12,%r10), %rdi
movq %r15, %rdx
subq %r12, %rdx
pushq $0x5a
popq %rsi
movq %r10, %rbx
callq 0xb230
movq 0x30(%rsp), %rsi
movq %rbx, %r10
jmp 0xddd7
xorl %r12d, %r12d
jmp 0xdb7c
movq %r12, %rdi
callq 0xf6d1
jmp 0xe03a
leaq (%r10,%r15), %rbx
leaq 0x3eef8(%rip), %rcx     # 0x4d0d0
movq (%rcx), %rcx
notq %rcx
andq %r10, %rcx
cmpq %r10, %rcx
je 0xe235
movq 0x10(%rsp), %rdx
subq %rcx, %rdx
shrq $0xc, %rdx
subq 0x3edc7(%rip), %rdx     # 0x4cfc0
movq 0x78(%rcx,%rdx,8), %rdx
movl %edx, %ecx
shrl $0x5, %ecx
movl $0xff, %esi
andl %esi, %ecx
cmpl %esi, %ecx
je 0xe260
movl %ecx, %eax
leaq 0x2d4a9(%rip), %rcx     # 0x3b6c0
movq (%rcx,%rax,8), %rdx
subq %r15, %rdx
movq %rbx, %rdi
movl $0xa5, %esi
callq 0xb230
movq 0x18(%rsp), %rbp
jmp 0xdecb
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x2e344
movq %rax, %rdx
jmp 0xe21b
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x2e344
movq %rax, %rdx
jmp 0xe143
shrq %rdx
andq %rax, %rdx
addq $-0x1000, %rdx          # imm = 0xF000
jmp 0xe21b
shrq %rdx
andq %rax, %rdx
addq $-0x1000, %rdx          # imm = 0xF000
jmp 0xe143