// File: /workspace/github_c_makefile_star2_O0/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/huge.c
// Function: je_huge_ralloc
void *
huge_ralloc(tsd_t *tsd, arena_t *arena, void *ptr, size_t oldsize,
    size_t usize, size_t alignment, bool zero, tcache_t *tcache)
{
	void *ret;
	size_t copysize;

	/* The following should have been caught by callers. */
	assert(usize > 0 && usize <= HUGE_MAXCLASS);

	/* Try to avoid moving the allocation. */
	if (!huge_ralloc_no_move(tsd_tsdn(tsd), ptr, oldsize, usize, usize,
	    zero))
		return (ptr);

	/*
	 * usize and oldsize are different enough that we need to use a
	 * different size class.  In that case, fall back to allocating new
	 * space and copying.
	 */
	ret = huge_ralloc_move_helper(tsd_tsdn(tsd), arena, usize, alignment,
	    zero);
	if (ret == NULL)
		return (NULL);

	copysize = (usize < oldsize) ? usize : oldsize;
	memcpy(ret, ptr, copysize);
	isqalloc(tsd, ptr, oldsize, tcache, true);
	return (ret);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movq 0x18(%rbp), %rax
movb 0x10(%rbp), %al
movq %rdi, -0x180(%rbp)
movq %rsi, -0x188(%rbp)
movq %rdx, -0x190(%rbp)
movq %rcx, -0x198(%rbp)
movq %r8, -0x1a0(%rbp)
movq %r9, -0x1a8(%rbp)
andb $0x1, %al
movb %al, -0x1a9(%rbp)
jmp 0x64656
movq -0x180(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x168(%rbp), %rdi
movq -0x190(%rbp), %rsi
movq -0x198(%rbp), %rdx
movq -0x1a0(%rbp), %rcx
movq -0x1a0(%rbp), %r8
movb -0x1a9(%rbp), %al
andb $0x1, %al
movzbl %al, %r9d
callq 0x63630
testb $0x1, %al
jne 0x646af
movq -0x190(%rbp), %rax
movq %rax, -0x178(%rbp)
jmp 0x64d14
movq -0x180(%rbp), %rax
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rdi
movq -0x188(%rbp), %rsi
movq -0x1a0(%rbp), %rdx
movq -0x1a8(%rbp), %rcx
movb -0x1a9(%rbp), %al
andb $0x1, %al
movzbl %al, %r8d
callq 0x64d30
movq %rax, -0x1b8(%rbp)
cmpq $0x0, -0x1b8(%rbp)
jne 0x6470b
movq $0x0, -0x178(%rbp)
jmp 0x64d14
movq -0x1a0(%rbp), %rax
cmpq -0x198(%rbp), %rax
jae 0x6472b
movq -0x1a0(%rbp), %rax
movq %rax, -0x1c8(%rbp)
jmp 0x64739
movq -0x198(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq -0x1c8(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movq -0x1b8(%rbp), %rdi
movq -0x190(%rbp), %rsi
movq -0x1c0(%rbp), %rdx
callq 0xb310
movq -0x180(%rbp), %rsi
movq -0x190(%rbp), %rdx
movq -0x198(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rsi, -0x140(%rbp)
movq %rdx, -0x148(%rbp)
movq %rcx, -0x150(%rbp)
movq %rax, -0x158(%rbp)
movb $0x1, -0x159(%rbp)
testb $0x1, -0x159(%rbp)
je 0x647d2
leaq 0x3ed5b(%rip), %rax     # 0xa3508
cmpq $0x0, (%rax)
setne %al
testb $0x1, %al
jne 0x647ba
jmp 0x647d2
movq -0x140(%rbp), %rdi
movq -0x148(%rbp), %rsi
callq 0x73f90
jmp 0x64d06
movq -0x140(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rdi
movq -0x148(%rbp), %rsi
movq -0x150(%rbp), %rdx
movq -0x158(%rbp), %rcx
movb -0x159(%rbp), %al
movq %rdi, -0x110(%rbp)
movq %rsi, -0x118(%rbp)
movq %rdx, -0x120(%rbp)
movq %rcx, -0x128(%rbp)
andb $0x1, %al
movb %al, -0x129(%rbp)
movq -0x110(%rbp), %rdi
movq -0x118(%rbp), %rsi
movq -0x120(%rbp), %rdx
movq -0x128(%rbp), %rcx
movb -0x129(%rbp), %al
movq %rdi, -0xd0(%rbp)
movq %rsi, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %rcx, -0xe8(%rbp)
andb $0x1, %al
movb %al, -0xe9(%rbp)
movq -0xd8(%rbp), %rax
leaq 0x3f836(%rip), %rcx     # 0xa40b0
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
cmpq -0xd8(%rbp), %rax
setne %al
testb $0x1, %al
jne 0x648a5
jmp 0x64cf1
cmpq $0x3800, -0xe0(%rbp) # imm = 0x3800
setbe %al
testb $0x1, %al
jne 0x648bc
jmp 0x64b09
cmpq $0x0, -0xe8(%rbp)
setne %al
testb $0x1, %al
jne 0x648d0
jmp 0x64aaa
movq -0xe0(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x1000, -0x18(%rbp)    # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x648ec
jmp 0x64916
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x2c179(%rip), %rax     # 0x90a80
movzbl (%rax,%rcx), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x64922
movq -0x18(%rbp), %rdi
callq 0x66030
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0xfc(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rdi
movq -0xe8(%rbp), %rsi
movq -0xd8(%rbp), %rdx
movl -0xfc(%rbp), %ecx
movb -0xe9(%rbp), %al
movq %rdi, -0x90(%rbp)
movq %rsi, -0x98(%rbp)
movq %rdx, -0xa0(%rbp)
movl %ecx, -0xa4(%rbp)
andb $0x1, %al
movb %al, -0xa5(%rbp)
testb $0x1, -0xa5(%rbp)
je 0x649b5
leaq 0x3eb75(%rip), %rax     # 0xa3502
movb (%rax), %al
testb $0x1, %al
jne 0x64995
jmp 0x649b5
movq -0xa0(%rbp), %rdi
movl -0xa4(%rbp), %eax
leaq 0x3ec17(%rip), %rsi     # 0xa35c0
shlq $0x6, %rax
addq %rax, %rsi
callq 0x3cbd0
movq -0x98(%rbp), %rax
addq $0x28, %rax
movl -0xa4(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0xb0(%rbp)
leaq 0x3fafd(%rip), %rax     # 0xa44d8
movq (%rax), %rax
movl -0xa4(%rbp), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rax
movl 0x10(%rax), %eax
movq -0xb8(%rbp), %rcx
cmpl (%rcx), %eax
sete %al
testb $0x1, %al
jne 0x64a0e
jmp 0x64a3b
movq -0x90(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq -0xb0(%rbp), %rdx
movl -0xa4(%rbp), %ecx
movq -0xb8(%rbp), %rax
movl (%rax), %r8d
shrl %r8d
callq 0x7ecb0
movq -0xb0(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0xa0(%rbp), %rdx
movq -0xb0(%rbp), %rax
movq 0x18(%rax), %rax
movq -0xb0(%rbp), %rcx
movl 0x10(%rcx), %ecx
movl %ecx, %esi
xorl %ecx, %ecx
subq %rsi, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x90(%rbp), %rcx
movq -0x98(%rbp), %rax
movq %rcx, -0x38(%rbp)
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
addq $0x18, %rdi
callq 0x65fa0
testb $0x1, %al
jne 0x64a9b
jmp 0x64aa8
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x7eb70
jmp 0x64b04
movq -0xd8(%rbp), %rax
movq -0xf8(%rbp), %rcx
subq %rcx, %rax
shrq $0xc, %rax
movq %rax, -0x108(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movq -0xf8(%rbp), %rdi
callq 0x65b10
movq -0x1d0(%rbp), %rdi
movq %rax, %rsi
movq -0xf8(%rbp), %rdx
movq -0xd8(%rbp), %rcx
movq -0x108(%rbp), %r8
callq 0x3f9a0
jmp 0x64cef
cmpq $0x0, -0xe8(%rbp)
setne %al
testb $0x1, %al
jne 0x64b1d
jmp 0x64cb6
movq -0xe0(%rbp), %rax
leaq 0x3f9d5(%rip), %rcx     # 0xa4500
cmpq (%rcx), %rax
ja 0x64cb6
movq -0xd0(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rdi
movq -0xe8(%rbp), %rsi
movq -0xd8(%rbp), %rdx
movq -0xe0(%rbp), %rcx
movb -0xe9(%rbp), %al
movq %rdi, -0x58(%rbp)
movq %rsi, -0x60(%rbp)
movq %rdx, -0x68(%rbp)
movq %rcx, -0x70(%rbp)
andb $0x1, %al
movb %al, -0x71(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x1000, -0x30(%rbp)    # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x64b92
jmp 0x64bbc
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x2bed3(%rip), %rax     # 0x90a80
movzbl (%rax,%rcx), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x64bc8
movq -0x30(%rbp), %rdi
callq 0x66030
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x78(%rbp)
testb $0x1, -0x71(%rbp)
je 0x64bf0
leaq 0x3e927(%rip), %rax     # 0xa3502
movb (%rax), %al
testb $0x1, %al
jne 0x64be3
jmp 0x64bf0
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0x3fab0
movq -0x60(%rbp), %rax
addq $0x28, %rax
movl -0x78(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
leaq 0x3f8cb(%rip), %rax     # 0xa44d8
movq (%rax), %rax
movl -0x78(%rbp), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x88(%rbp), %rcx
cmpl (%rcx), %eax
sete %al
testb $0x1, %al
jne 0x64c3a
jmp 0x64c59
movq -0x58(%rbp), %rdi
movq -0x80(%rbp), %rsi
movl -0x78(%rbp), %edx
movq -0x88(%rbp), %rax
movl (%rax), %ecx
shrl %ecx
movq -0x60(%rbp), %r8
callq 0x7f140
movq -0x80(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x68(%rbp), %rdx
movq -0x80(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x80(%rbp), %rcx
movl 0x10(%rcx), %ecx
movl %ecx, %esi
xorl %ecx, %ecx
subq %rsi, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x58(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, -0x48(%rbp)
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
addq $0x18, %rdi
callq 0x65fa0
testb $0x1, %al
jne 0x64ca7
jmp 0x64cb4
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x7eb70
jmp 0x64ced
movq -0xd0(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0xf8(%rbp), %rdi
callq 0x65b10
movq -0x1d8(%rbp), %rdi
movq %rax, %rsi
movq -0xf8(%rbp), %rdx
movq -0xd8(%rbp), %rcx
callq 0x3fde0
jmp 0x64cef
jmp 0x64d04
movq -0xd0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
callq 0x64db0
jmp 0x64d06
movq -0x1b8(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x178(%rbp), %rax
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
nopw %cs:(%rax,%rax)