// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/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;

	/* Try to avoid moving the allocation. */
	if (!huge_ralloc_no_move(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, arena, usize, alignment, zero,
	    tcache);
	if (ret == NULL)
		return (NULL);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq 0x18(%rbp), %rax
movb 0x10(%rbp), %al
movq %rdi, -0x150(%rbp)
movq %rsi, -0x158(%rbp)
movq %rdx, -0x160(%rbp)
movq %rcx, -0x168(%rbp)
movq %r8, -0x170(%rbp)
movq %r9, -0x178(%rbp)
andb $0x1, %al
movb %al, -0x179(%rbp)
movq -0x160(%rbp), %rdi
movq -0x168(%rbp), %rsi
movq -0x170(%rbp), %rdx
movq -0x170(%rbp), %rcx
movb -0x179(%rbp), %al
andb $0x1, %al
movzbl %al, %r8d
callq 0x61de0
testb $0x1, %al
jne 0x628b8
movq -0x160(%rbp), %rax
movq %rax, -0x148(%rbp)
jmp 0x62ea2
movq -0x150(%rbp), %rdi
movq -0x158(%rbp), %rsi
movq -0x170(%rbp), %rdx
movq -0x178(%rbp), %rcx
movb -0x179(%rbp), %al
movq 0x18(%rbp), %r9
andb $0x1, %al
movzbl %al, %r8d
callq 0x62ec0
movq %rax, -0x188(%rbp)
cmpq $0x0, -0x188(%rbp)
jne 0x6290a
movq $0x0, -0x148(%rbp)
jmp 0x62ea2
movq -0x170(%rbp), %rax
cmpq -0x168(%rbp), %rax
jae 0x6292a
movq -0x170(%rbp), %rax
movq %rax, -0x198(%rbp)
jmp 0x62938
movq -0x168(%rbp), %rax
movq %rax, -0x198(%rbp)
movq -0x198(%rbp), %rax
movq %rax, -0x190(%rbp)
movq -0x188(%rbp), %rdi
movq -0x160(%rbp), %rsi
movq -0x190(%rbp), %rdx
callq 0x103b0
movq -0x150(%rbp), %rsi
movq -0x160(%rbp), %rdx
movq -0x168(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rsi, -0x128(%rbp)
movq %rdx, -0x130(%rbp)
movq %rcx, -0x138(%rbp)
movq %rax, -0x140(%rbp)
leaq 0x3ed0c(%rip), %rax     # 0xa16a8
cmpq $0x0, (%rax)
setne %al
testb $0x1, %al
jne 0x629a9
jmp 0x629c1
movq -0x128(%rbp), %rdi
movq -0x130(%rbp), %rsi
callq 0x711c0
jmp 0x62e94
movq -0x128(%rbp), %rsi
movq -0x130(%rbp), %rdx
movq -0x138(%rbp), %rcx
movq -0x140(%rbp), %rax
movq %rsi, -0x108(%rbp)
movq %rdx, -0x110(%rbp)
movq %rcx, -0x118(%rbp)
movq %rax, -0x120(%rbp)
movq -0x108(%rbp), %rsi
movq -0x110(%rbp), %rdx
movq -0x118(%rbp), %rcx
movq -0x120(%rbp), %rax
movq %rsi, -0xd0(%rbp)
movq %rdx, -0xd8(%rbp)
movq %rcx, -0xe0(%rbp)
movq %rax, -0xe8(%rbp)
movq -0xd8(%rbp), %rax
leaq 0x3fcf1(%rip), %rcx     # 0xa2730
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
cmpq -0xd8(%rbp), %rax
setne %al
testb $0x1, %al
jne 0x62a6a
jmp 0x62e78
cmpq $0x3800, -0xe0(%rbp) # imm = 0x3800
setbe %al
testb $0x1, %al
jne 0x62a81
jmp 0x62c9d
cmpq $0x0, -0xe8(%rbp)
setne %al
testb $0x1, %al
jne 0x62a95
jmp 0x62c53
movq -0xe0(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x1000, -0x20(%rbp)    # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x62ab1
jmp 0x62add
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x2c1b4(%rip), %rax     # 0x8ec80
movzbl (%rax,%rcx), %eax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl %eax, -0x14(%rbp)
jmp 0x62ae9
movq -0x20(%rbp), %rdi
callq 0x63e40
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0xf4(%rbp)
movq -0xd0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
movq -0xd8(%rbp), %rcx
movl -0xf4(%rbp), %eax
movq %rsi, -0xa0(%rbp)
movq %rdx, -0xa8(%rbp)
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq 0x3eb73(%rip), %rax     # 0xa16a2
movb (%rax), %al
testb $0x1, %al
jne 0x62b37
jmp 0x62b57
movq -0xb0(%rbp), %rdi
movl -0xb4(%rbp), %eax
leaq 0x3ebd5(%rip), %rsi     # 0xa1720
imulq $0x60, %rax, %rax
addq %rax, %rsi
callq 0x3d680
movq -0xa8(%rbp), %rax
addq $0x20, %rax
movl -0xb4(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0xc0(%rbp)
leaq 0x4032b(%rip), %rax     # 0xa2ea8
movq (%rax), %rax
movl -0xb4(%rbp), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rax
movl 0x10(%rax), %eax
movq -0xc8(%rbp), %rcx
cmpl (%rcx), %eax
sete %al
testb $0x1, %al
jne 0x62bb0
jmp 0x62bdd
movq -0xa0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
movl -0xb4(%rbp), %ecx
movq -0xc8(%rbp), %rax
movl (%rax), %r8d
shrl %r8d
callq 0x79510
movq -0xb0(%rbp), %rdx
movq -0xc0(%rbp), %rax
movq 0x18(%rax), %rax
movq -0xc0(%rbp), %rcx
movl 0x10(%rcx), %ecx
movq %rdx, (%rax,%rcx,8)
movq -0xc0(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0xa0(%rbp), %rcx
movq -0xa8(%rbp), %rax
movq %rcx, -0x48(%rbp)
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x50(%rbp), %rax
cmpl $0xd3, 0x18(%rax)
sete %al
testb $0x1, %al
jne 0x62c44
jmp 0x62c51
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x793c0
jmp 0x62c98
movq -0xd8(%rbp), %rax
movq -0xf0(%rbp), %rcx
subq %rcx, %rax
shrq $0xc, %rax
movq %rax, -0x100(%rbp)
movq -0xf0(%rbp), %rdi
callq 0x63a90
movq %rax, %rdi
movq -0xf0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
movq -0x100(%rbp), %rcx
callq 0x3ff30
jmp 0x62e76
cmpq $0x0, -0xe8(%rbp)
setne %al
testb $0x1, %al
jne 0x62cb1
jmp 0x62e52
movq -0xe0(%rbp), %rax
leaq 0x40219(%rip), %rcx     # 0xa2ed8
cmpq (%rcx), %rax
ja 0x62e52
movq -0xd0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
movq -0xd8(%rbp), %rcx
movq -0xe0(%rbp), %rax
movq %rsi, -0x68(%rbp)
movq %rdx, -0x70(%rbp)
movq %rcx, -0x78(%rbp)
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x1000, -0x40(%rbp)    # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x62d0d
jmp 0x62d39
movq -0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x2bf58(%rip), %rax     # 0x8ec80
movzbl (%rax,%rcx), %eax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl %eax, -0x34(%rbp)
jmp 0x62d45
movq -0x40(%rbp), %rdi
callq 0x63e40
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x84(%rbp)
leaq 0x3e94d(%rip), %rax     # 0xa16a2
movb (%rax), %al
testb $0x1, %al
jne 0x62d5d
jmp 0x62d6a
movq -0x78(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x3ffa0
movq -0x70(%rbp), %rax
addq $0x20, %rax
movl -0x84(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
leaq 0x4011b(%rip), %rax     # 0xa2ea8
movq (%rax), %rax
movl -0x84(%rbp), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x90(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x98(%rbp), %rcx
cmpl (%rcx), %eax
sete %al
testb $0x1, %al
jne 0x62dc0
jmp 0x62de5
movq -0x68(%rbp), %rdi
movq -0x90(%rbp), %rsi
movl -0x84(%rbp), %edx
movq -0x98(%rbp), %rax
movl (%rax), %ecx
shrl %ecx
movq -0x70(%rbp), %r8
callq 0x797c0
movq -0x78(%rbp), %rdx
movq -0x90(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x90(%rbp), %rcx
movl 0x10(%rcx), %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x90(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x68(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, -0x58(%rbp)
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x60(%rbp), %rax
cmpl $0xd3, 0x18(%rax)
sete %al
testb $0x1, %al
jne 0x62e43
jmp 0x62e50
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x793c0
jmp 0x62e74
movq -0xf0(%rbp), %rdi
callq 0x63a90
movq %rax, %rdi
movq -0xf0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
callq 0x40280
jmp 0x62e76
jmp 0x62e92
movq -0xd0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
movq -0xe8(%rbp), %rdx
callq 0x62f50
jmp 0x62e94
movq -0x188(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
nopw %cs:(%rax,%rax)