// File: /workspace/github_c_makefile_star2_O2/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 $0x48, %rsp
leaq 0x635e6(%rip), %rax     # 0xdc930
cmpq %rsi, (%rax)
jae 0x79363
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x48, %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 0x793b2
cmpq $0xe00, %rax            # imm = 0xE00
ja 0x793a0
leaq -0x1(%rax), %rcx
shrq $0x3, %rcx
leaq 0x1fdb0(%rip), %rdx     # 0x99140
movb (%rcx,%rdx), %cl
leaq -0x1(%r14), %rsi
shrq $0x3, %rsi
cmpb (%rsi,%rdx), %cl
je 0x793d4
cmpq %r15, %r14
setb %cl
cmpq %r14, %rax
setb %al
orb %cl, %al
jne 0x7934f
jmp 0x793d4
cmpq $0xe01, %rax            # imm = 0xE01
jb 0x7934f
leaq (%r15,%rcx), %r12
addq $0xfff, %r12            # imm = 0xFFF
movq %r12, %r13
andq $-0x1000, %r13          # imm = 0xF000
cmpq %r14, %r13
jne 0x79403
subq %r15, %r14
jbe 0x79351
leaq 0x62777(%rip), %rax     # 0xdbb5b
cmpb $0x0, (%rax)
je 0x79351
addq %rbx, %r15
pushq $0x5a
popq %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x1f110
jmp 0x79351
leaq 0x63476(%rip), %rax     # 0xdc880
movq (%rax), %rdx
notq %rdx
andq %rbx, %rdx
movq (%rdx), %rcx
movq %r13, %rax
subq %r14, %rax
movq %rax, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
jae 0x794ea
leaq 0x62728(%rip), %rax     # 0xdbb5b
cmpb $0x1, (%rax)
jne 0x79450
leaq (%rbx,%r15), %rdi
movq %r14, %rdx
subq %r15, %rdx
pushq $0x5a
popq %rsi
movq %rcx, %r15
callq 0x1f110
movq %r15, %rcx
leaq 0x8(%rcx), %r15
movq %r15, %rdi
movq %rcx, %rbp
callq 0x1faa0
pushq $0x1
popq %r9
movq %rbp, %rdi
movq 0x18(%rsp), %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %r13, %r8
callq 0x78934
movq 0x70(%rbp), %rax
shrq $0x7, %r14
andq $-0x20, %r14
incq -0x18(%r14,%rax)
decq -0x8(%r14,%rax)
movdqu 0x50(%rbp), %xmm0
movdqu 0x60(%rbp), %xmm1
pcmpeqd %xmm2, %xmm2
psubq %xmm2, %xmm1
movsd 0x20(%rsp), %xmm3
shufpd $0x2, 0x10d30(%rip), %xmm3 # xmm3 = xmm3[0],mem[1]
movdqu %xmm1, 0x60(%rbp)
paddq %xmm0, %xmm3
movdqu %xmm3, 0x50(%rbp)
shrq $0x7, %r12
andq $-0x20, %r12
incq -0x20(%r12,%rax)
movdqu -0x10(%r12,%rax), %xmm0
psubq %xmm2, %xmm0
movdqu %xmm0, -0x10(%r12,%rax)
movq %r15, %rdi
callq 0x1fbb0
jmp 0x79351
movl %r8d, %ebp
movq %rbx, %r12
subq %rdx, %r12
shrq $0xc, %r12
movq %r14, %rax
shrq $0xc, %rax
movq %rax, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
leaq 0x8(%rcx), %rdi
movq %rdi, 0x40(%rsp)
callq 0x1faa0
movq %r12, 0x38(%rsp)
movq 0x10(%rsp), %rax
leaq (%r12,%rax), %rsi
leaq 0x6335d(%rip), %rax     # 0xdc888
movb $0x1, %r12b
cmpq (%rax), %rsi
jae 0x79692
leaq 0x633ea(%rip), %rcx     # 0xdc928
movq %rsi, %rax
subq (%rcx), %rax
imulq $0x18, %rax, %rax
movq 0x18(%rsp), %rdx
movq 0x40(%rdx,%rax), %rax
testb $0x1, %al
jne 0x79692
leaq 0xfff(%r15), %rcx
andq $-0x1000, %rcx          # imm = 0xF000
andq $-0x1000, %rax          # imm = 0xF000
subq %r14, %rcx
cmpq %rcx, %rax
jb 0x79692
leaq (%rax,%r14), %rcx
cmpq %r13, %rcx
movq 0x20(%rsp), %r13
cmovbeq %rax, %r13
leaq 0x30(%rdx), %r12
movq %r13, %xmm0
movdqa %xmm0, 0x20(%rsp)
shlq $0xc, %rsi
addq %rdx, %rsi
movzbl %bpl, %r9d
pushq $0x1
popq %rcx
movl $0xff, %r8d
movq 0x8(%rsp), %rdi
movq %r13, %rdx
callq 0x7a9a0
addq %r14, %r13
movq %r13, %rax
shrq $0xc, %rax
leaq 0x6335d(%rip), %r9      # 0xdc928
movq (%r9), %rcx
movq 0x38(%rsp), %rsi
leaq (%rsi,%rax), %rdx
decq %rdx
subq %rcx, %rsi
imulq $0x18, %rsi, %rsi
movq 0x10(%r12,%rsi), %rdi
movq %rdx, %r8
subq %rcx, %r8
imulq $0x18, %r8, %rcx
movl 0x10(%r12,%rcx), %ecx
orl %edi, %ecx
andl $0x8, %ecx
andl $0x4, %edi
orq %r13, %rdi
movl $0xff3, %r8d            # imm = 0xFF3
orq %r8, %rdi
orq %rcx, %rdi
movq %rdi, 0x10(%r12,%rsi)
subq (%r9), %rdx
imulq $0x18, %rdx, %rdx
movq 0x10(%r12,%rdx), %rsi
andl $0x4, %esi
orq %rcx, %rsi
orq %r8, %rsi
movq %rsi, 0x10(%r12,%rdx)
movq 0x8(%rsp), %rsi
movq 0x70(%rsi), %rcx
movq 0x10(%rsp), %rdx
shlq $0x5, %rdx
incq -0x18(%rdx,%rcx)
decq -0x8(%rdx,%rcx)
movdqu 0x50(%rsi), %xmm0
movdqu 0x60(%rsi), %xmm1
pcmpeqd %xmm2, %xmm2
psubq %xmm2, %xmm1
movdqu %xmm1, 0x60(%rsi)
movapd 0x20(%rsp), %xmm1
shufpd $0x2, 0x10b73(%rip), %xmm1 # xmm1 = xmm1[0],mem[1]
paddq %xmm0, %xmm1
movdqu %xmm1, 0x50(%rsi)
shlq $0x5, %rax
incq -0x20(%rax,%rcx)
movdqu -0x10(%rax,%rcx), %xmm0
psubq %xmm2, %xmm0
movdqu %xmm0, -0x10(%rax,%rcx)
xorl %r12d, %r12d
movq 0x40(%rsp), %rdi
callq 0x1fbb0
orb %r12b, %bpl
je 0x796af
testb %r12b, %r12b
jne 0x7934f
jmp 0x79351
leaq 0x624b6(%rip), %rax     # 0xdbb6c
cmpb $0x1, (%rax)
jne 0x79351
leaq (%rbx,%r14), %rdi
subq %r14, %r15
xorl %esi, %esi
movq %r15, %rdx
jmp 0x793f9