// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/arena.c
// Function: arena_ralloc_no_move
void *
arena_ralloc_no_move(void *ptr, size_t oldsize, size_t size, size_t extra,
    bool zero)
{

	/*
	 * Avoid moving the allocation if the size class can be left the same.
	 */
	if (oldsize <= arena_maxclass) {
		if (oldsize <= SMALL_MAXCLASS) {
			assert(arena_bin_info[SMALL_SIZE2BIN(oldsize)].reg_size
			    == oldsize);
			if ((size + extra <= SMALL_MAXCLASS &&
			    SMALL_SIZE2BIN(size + extra) ==
			    SMALL_SIZE2BIN(oldsize)) || (size <= oldsize &&
			    size + extra >= oldsize)) {
				if (config_fill && opt_junk && size < oldsize) {
					memset((void *)((uintptr_t)ptr + size),
					    0x5a, oldsize - size);
				}
				return (ptr);
			}
		} else {
			assert(size <= arena_maxclass);
			if (size + extra > SMALL_MAXCLASS) {
				if (arena_ralloc_large(ptr, oldsize, size,
				    extra, zero) == false)
					return (ptr);
			}
		}
	}

	/* Reallocation would require a move. */
	return (NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq 0x5dfbd(%rip), %rax     # 0xdf930
cmpq %rsi, (%rax)
jae 0x8198c
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq (%rcx,%rdx), %rax
cmpq $0xe00, %rsi            # imm = 0xE00
ja 0x819db
cmpq $0xe00, %rax            # imm = 0xE00
ja 0x819c9
leaq -0x1(%rax), %rcx
shrq $0x3, %rcx
leaq 0x21707(%rip), %rdx     # 0xa30c0
movb (%rcx,%rdx), %cl
leaq -0x1(%r14), %rsi
shrq $0x3, %rsi
cmpb (%rsi,%rdx), %cl
je 0x819fd
cmpq %r15, %r14
setb %cl
cmpq %r14, %rax
setb %al
orb %cl, %al
jne 0x81978
jmp 0x819fd
cmpq $0xe01, %rax            # imm = 0xE01
jb 0x81978
leaq (%r15,%rcx), %r13
addq $0xfff, %r13            # imm = 0xFFF
movq %r13, %r12
andq $-0x1000, %r12          # imm = 0xF000
cmpq %r14, %r12
jne 0x81a2e
subq %r15, %r14
jbe 0x8197a
leaq 0x5d14e(%rip), %rax     # 0xdeb5b
cmpb $0x0, (%rax)
je 0x8197a
addq %rbx, %r15
movq %r15, %rdi
movl $0x5a, %esi
movq %r14, %rdx
callq 0x1f110
jmp 0x8197a
leaq 0x5de4b(%rip), %rax     # 0xdf880
movq (%rax), %rdx
notq %rdx
andq %rbx, %rdx
movq (%rdx), %rcx
movq %r12, %rax
subq %r14, %rax
movq %rdx, 0x8(%rsp)
jae 0x81afb
leaq 0x5d102(%rip), %rax     # 0xdeb5b
cmpb $0x1, (%rax)
jne 0x81a78
leaq (%rbx,%r15), %rdi
movq %r14, %rdx
subq %r15, %rdx
movl $0x5a, %esi
movq %rcx, %r15
callq 0x1f110
movq %r15, %rcx
leaq 0x8(%rcx), %r15
movq %r15, %rdi
movq %rcx, %rbp
callq 0x1faa0
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %r12, %r8
movl $0x1, %r9d
callq 0x80f33
incq 0x60(%rbp)
movq 0x50(%rbp), %rax
movq 0x70(%rbp), %rcx
subq %r14, %rax
movq %rax, 0x50(%rbp)
shrq $0x7, %r14
andq $-0x20, %r14
incq -0x18(%r14,%rcx)
decq -0x8(%r14,%rcx)
incq 0x58(%rbp)
incq 0x68(%rbp)
addq %r12, %rax
movq %rax, 0x50(%rbp)
shrq $0x7, %r13
andq $-0x20, %r13
incq -0x20(%r13,%rcx)
incq -0x10(%r13,%rcx)
incq -0x8(%r13,%rcx)
movq %r15, %rdi
callq 0x1fbb0
jmp 0x8197a
movl %r8d, %ebp
movq %r12, 0x10(%rsp)
movq %rax, (%rsp)
movq %rbx, %r12
subq %rdx, %r12
shrq $0xc, %r12
movq %r14, %r13
shrq $0xc, %r13
movq %rcx, 0x28(%rsp)
leaq 0x8(%rcx), %rdi
movq %rdi, 0x30(%rsp)
callq 0x1faa0
movq %r13, 0x20(%rsp)
movq %r12, 0x18(%rsp)
leaq (%r12,%r13), %rsi
leaq 0x5dd48(%rip), %rax     # 0xdf888
movb $0x1, %r12b
cmpq (%rax), %rsi
jae 0x81c9a
leaq 0x5ddd5(%rip), %rcx     # 0xdf928
movq %rsi, %rax
subq (%rcx), %rax
leaq (%rax,%rax,2), %rax
movq 0x8(%rsp), %rdx
movq 0x40(%rdx,%rax,8), %rax
testb $0x1, %al
jne 0x81c9a
leaq 0xfff(%r15), %rcx
andq $-0x1000, %rcx          # imm = 0xF000
andq $-0x1000, %rax          # imm = 0xF000
subq %r14, %rcx
cmpq %rcx, %rax
jb 0x81c9a
leaq (%rax,%r14), %rcx
cmpq 0x10(%rsp), %rcx
movq (%rsp), %r13
cmovbeq %rax, %r13
leaq 0x30(%rdx), %rax
movq %rax, (%rsp)
shlq $0xc, %rsi
addq %rdx, %rsi
movzbl %bpl, %r9d
movl $0xff, %r8d
movq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r13, %rdx
movl $0x1, %ecx
callq 0x83283
leaq (%r14,%r13), %rcx
movq %rcx, %rax
shrq $0xc, %rax
leaq 0x5dd48(%rip), %r11     # 0xdf928
movq (%r11), %rdx
movq 0x18(%rsp), %rdi
leaq (%rdi,%rax), %rsi
decq %rsi
subq %rdx, %rdi
leaq (%rdi,%rdi,2), %rdi
movq (%rsp), %r10
movq 0x10(%r10,%rdi,8), %r8
movq %rsi, %r9
subq %rdx, %r9
leaq (%r9,%r9,2), %rdx
movl 0x10(%r10,%rdx,8), %edx
orl %r8d, %edx
andl $0x8, %edx
andl $0x4, %r8d
orq %rcx, %r8
movl $0xff3, %ecx            # imm = 0xFF3
orq %rcx, %r8
orq %rdx, %r8
movq %r8, 0x10(%r10,%rdi,8)
subq (%r11), %rsi
leaq (%rsi,%rsi,2), %rsi
movq 0x10(%r10,%rsi,8), %rdi
andl $0x4, %edi
orq %rdx, %rdi
orq %rcx, %rdi
movq %rdi, 0x10(%r10,%rsi,8)
incq 0x60(%r12)
movq 0x50(%r12), %rcx
movq 0x70(%r12), %rdx
movq %rcx, %rsi
subq %r14, %rsi
movq %rsi, 0x50(%r12)
movq 0x20(%rsp), %rsi
shlq $0x5, %rsi
incq -0x18(%rsi,%rdx)
decq -0x8(%rsi,%rdx)
addq %rcx, %r13
incq 0x58(%r12)
incq 0x68(%r12)
movq %r13, 0x50(%r12)
shlq $0x5, %rax
incq -0x20(%rax,%rdx)
incq -0x10(%rax,%rdx)
incq -0x8(%rax,%rdx)
xorl %r12d, %r12d
movq 0x30(%rsp), %rdi
callq 0x1fbb0
orb %r12b, %bpl
jne 0x81cc6
leaq 0x5cebc(%rip), %rax     # 0xdeb6c
cmpb $0x1, (%rax)
jne 0x81cc6
leaq (%rbx,%r14), %rdi
subq %r14, %r15
xorl %esi, %esi
movq %r15, %rdx
callq 0x1f110
testb %r12b, %r12b
jne 0x81978
jmp 0x8197a