// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/deps/jemalloc/src/arena.c
// Function: je_arena_ralloc
void *
arena_ralloc(tsd_t *tsd, arena_t *arena, void *ptr, size_t oldsize, size_t size,
    size_t alignment, bool zero, tcache_t *tcache)
{
	void *ret;
	size_t usize;

	usize = s2u(size);
	if (usize == 0)
		return (NULL);

	if (likely(usize <= large_maxclass)) {
		size_t copysize;

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

		/*
		 * size and oldsize are different enough that we need to move
		 * the object.  In that case, fall back to allocating new space
		 * and copying.
		 */
		ret = arena_ralloc_move_helper(tsd, arena, usize, alignment,
		    zero, tcache);
		if (ret == NULL)
			return (NULL);

		/*
		 * Junk/zero-filling were already done by
		 * ipalloc()/arena_malloc().
		 */

		copysize = (usize < oldsize) ? usize : oldsize;
		JEMALLOC_VALGRIND_MAKE_MEM_UNDEFINED(ret, copysize);
		memcpy(ret, ptr, copysize);
		isqalloc(tsd, ptr, oldsize, tcache);
	} else {
		ret = huge_ralloc(tsd, arena, ptr, oldsize, usize, alignment,
		    zero, tcache);
	}
	return (ret);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
movq 0x18(%rbp), %rax
movb 0x10(%rbp), %al
movq %rdi, -0x1c0(%rbp)
movq %rsi, -0x1c8(%rbp)
movq %rdx, -0x1d0(%rbp)
movq %rcx, -0x1d8(%rbp)
movq %r8, -0x1e0(%rbp)
movq %r9, -0x1e8(%rbp)
andb $0x1, %al
movb %al, -0x1e9(%rbp)
movq -0x1e0(%rbp), %rax
movq %rax, -0x1b0(%rbp)
cmpq $0x1000, -0x1b0(%rbp) # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x40fc9
jmp 0x4104e
movq -0x1b0(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x178(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x168(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x4dc85(%rip), %rax     # 0x8ec80
movzbl (%rax,%rcx), %eax
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rax
movl %eax, -0x154(%rbp)
movl -0x154(%rbp), %eax
movl %eax, %ecx
leaq 0x4d4de(%rip), %rax     # 0x8e500
movq (%rax,%rcx,8), %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rax
movq %rax, -0x180(%rbp)
movq -0x180(%rbp), %rax
movq %rax, -0x1a8(%rbp)
jmp 0x4114f
movq -0x1b0(%rbp), %rax
movq %rax, -0x128(%rbp)
cmpq $0x0, -0x128(%rbp)
setl %al
testb $0x1, %al
jne 0x4106d
jmp 0x41092
movq -0x128(%rbp), %rdx
shlq %rdx
movl $0x3f, %eax
movl $0x40, %ecx
cmpq $0x0, %rdx
cmovneq %rcx, %rax
movq %rax, -0x210(%rbp)
jmp 0x410ac
movq -0x128(%rbp), %rdi
shlq %rdi
subq $0x1, %rdi
callq 0x4cb20
movq %rax, -0x210(%rbp)
movq -0x210(%rbp), %rax
movq %rax, -0x130(%rbp)
cmpq $0x6, -0x130(%rbp)
jae 0x410d2
movl $0x3, %eax
movq %rax, -0x218(%rbp)
jmp 0x410e8
movq -0x130(%rbp), %rax
subq $0x2, %rax
subq $0x1, %rax
movq %rax, -0x218(%rbp)
movq -0x218(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x148(%rbp)
movq -0x128(%rbp), %rax
addq -0x148(%rbp), %rax
movq -0x148(%rbp), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x150(%rbp)
movq -0x150(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movq -0x1a8(%rbp), %rax
movq %rax, -0x200(%rbp)
cmpq $0x0, -0x200(%rbp)
jne 0x41177
movq $0x0, -0x1b8(%rbp)
jmp 0x4183a
movq -0x200(%rbp), %rax
cmpq 0x6143b(%rip), %rax     # 0xa25c0
setbe %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x417da
movq -0x1d0(%rbp), %rdi
movq -0x1d8(%rbp), %rsi
movq -0x200(%rbp), %rdx
movb -0x1e9(%rbp), %al
xorl %ecx, %ecx
andb $0x1, %al
movzbl %al, %r8d
callq 0x402d0
testb $0x1, %al
jne 0x411dc
movq -0x1d0(%rbp), %rax
movq %rax, -0x1b8(%rbp)
jmp 0x4183a
movq -0x1c0(%rbp), %rdi
movq -0x1c8(%rbp), %rsi
movq -0x200(%rbp), %rdx
movq -0x1e8(%rbp), %rcx
movb -0x1e9(%rbp), %al
movq 0x18(%rbp), %r9
andb $0x1, %al
movzbl %al, %r8d
callq 0x41850
movq %rax, -0x1f8(%rbp)
cmpq $0x0, -0x1f8(%rbp)
jne 0x4122e
movq $0x0, -0x1b8(%rbp)
jmp 0x4183a
movq -0x200(%rbp), %rax
cmpq -0x1d8(%rbp), %rax
jae 0x4124e
movq -0x200(%rbp), %rax
movq %rax, -0x220(%rbp)
jmp 0x4125c
movq -0x1d8(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x220(%rbp), %rax
movq %rax, -0x208(%rbp)
leaq 0x60493(%rip), %rax     # 0xa1704
movb (%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x41297
movq -0x1f8(%rbp), %rdi
movq -0x208(%rbp), %rsi
callq 0x7faa0
jmp 0x41299
movq -0x1f8(%rbp), %rdi
movq -0x1d0(%rbp), %rsi
movq -0x208(%rbp), %rdx
callq 0x103b0
movq -0x1c0(%rbp), %rsi
movq -0x1d0(%rbp), %rdx
movq -0x1d8(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rsi, -0x188(%rbp)
movq %rdx, -0x190(%rbp)
movq %rcx, -0x198(%rbp)
movq %rax, -0x1a0(%rbp)
leaq 0x603b9(%rip), %rax     # 0xa16a8
cmpq $0x0, (%rax)
setne %al
testb $0x1, %al
jne 0x412fc
jmp 0x41314
movq -0x188(%rbp), %rdi
movq -0x190(%rbp), %rsi
callq 0x711c0
jmp 0x417d8
movq -0x188(%rbp), %rsi
movq -0x190(%rbp), %rdx
movq -0x198(%rbp), %rcx
movq -0x1a0(%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 0x6139e(%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 0x413bd
jmp 0x417bc
cmpq $0x3800, -0xe0(%rbp) # imm = 0x3800
setbe %al
testb $0x1, %al
jne 0x413d4
jmp 0x41608
cmpq $0x0, -0xe8(%rbp)
setne %al
testb $0x1, %al
jne 0x413e8
jmp 0x415be
movq -0xe0(%rbp), %rax
movq %rax, -0xc8(%rbp)
cmpq $0x1000, -0xc8(%rbp) # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x4140a
jmp 0x41448
movq -0xc8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x4d852(%rip), %rax     # 0x8ec80
movzbl (%rax,%rcx), %eax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movl %eax, -0xbc(%rbp)
jmp 0x4145a
movq -0xc8(%rbp), %rdi
callq 0x4ca20
movl %eax, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
movl %eax, -0xf4(%rbp)
movq -0xd0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
movq -0xd8(%rbp), %rcx
movl -0xf4(%rbp), %eax
movq %rsi, -0x80(%rbp)
movq %rdx, -0x88(%rbp)
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq 0x60202(%rip), %rax     # 0xa16a2
movb (%rax), %al
testb $0x1, %al
jne 0x414a8
jmp 0x414c8
movq -0x90(%rbp), %rdi
movl -0x94(%rbp), %eax
leaq 0x60264(%rip), %rsi     # 0xa1720
imulq $0x60, %rax, %rax
addq %rax, %rsi
callq 0x3d680
movq -0x88(%rbp), %rax
addq $0x20, %rax
movl -0x94(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0xa0(%rbp)
leaq 0x619ba(%rip), %rax     # 0xa2ea8
movq (%rax), %rax
movl -0x94(%rbp), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rax
movl 0x10(%rax), %eax
movq -0xa8(%rbp), %rcx
cmpl (%rcx), %eax
sete %al
testb $0x1, %al
jne 0x41521
jmp 0x4154b
movq -0x80(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq -0xa0(%rbp), %rdx
movl -0x94(%rbp), %ecx
movq -0xa8(%rbp), %rax
movl (%rax), %r8d
shrl %r8d
callq 0x79510
movq -0x90(%rbp), %rdx
movq -0xa0(%rbp), %rax
movq 0x18(%rax), %rax
movq -0xa0(%rbp), %rcx
movl 0x10(%rcx), %ecx
movq %rdx, (%rax,%rcx,8)
movq -0xa0(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x80(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, -0x70(%rbp)
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x78(%rbp), %rax
cmpl $0xd3, 0x18(%rax)
sete %al
testb $0x1, %al
jne 0x415af
jmp 0x415bc
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x793c0
jmp 0x41603
movq -0xd8(%rbp), %rax
movq -0xf0(%rbp), %rcx
subq %rcx, %rax
shrq $0xc, %rax
movq %rax, -0x100(%rbp)
movq -0xf0(%rbp), %rdi
callq 0x4e210
movq %rax, %rdi
movq -0xf0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
movq -0x100(%rbp), %rcx
callq 0x3ff30
jmp 0x417ba
cmpq $0x0, -0xe8(%rbp)
setne %al
testb $0x1, %al
jne 0x4161c
jmp 0x41796
movq -0xe0(%rbp), %rax
leaq 0x618ae(%rip), %rcx     # 0xa2ed8
cmpq (%rcx), %rax
ja 0x41796
movq -0xd0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
movq -0xd8(%rbp), %rcx
movq -0xe0(%rbp), %rax
movq %rsi, -0x38(%rbp)
movq %rdx, -0x40(%rbp)
movq %rcx, -0x48(%rbp)
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x1000, -0x30(%rbp)    # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x41678
jmp 0x416a4
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x4d5ed(%rip), %rax     # 0x8ec80
movzbl (%rax,%rcx), %eax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl %eax, -0x24(%rbp)
jmp 0x416b0
movq -0x30(%rbp), %rdi
callq 0x4ca20
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x54(%rbp)
leaq 0x5ffe5(%rip), %rax     # 0xa16a2
movb (%rax), %al
testb $0x1, %al
jne 0x416c5
jmp 0x416d2
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x3ffa0
movq -0x40(%rbp), %rax
addq $0x20, %rax
movl -0x54(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
leaq 0x617b9(%rip), %rax     # 0xa2ea8
movq (%rax), %rax
movl -0x54(%rbp), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x68(%rbp), %rcx
cmpl (%rcx), %eax
sete %al
testb $0x1, %al
jne 0x41716
jmp 0x41732
movq -0x38(%rbp), %rdi
movq -0x60(%rbp), %rsi
movl -0x54(%rbp), %edx
movq -0x68(%rbp), %rax
movl (%rax), %ecx
shrl %ecx
movq -0x40(%rbp), %r8
callq 0x797c0
movq -0x48(%rbp), %rdx
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x60(%rbp), %rcx
movl 0x10(%rcx), %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x60(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, -0x8(%rbp)
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpl $0xd3, 0x18(%rax)
sete %al
testb $0x1, %al
jne 0x41787
jmp 0x41794
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x793c0
jmp 0x417b8
movq -0xf0(%rbp), %rdi
callq 0x4e210
movq %rax, %rdi
movq -0xf0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
callq 0x40280
jmp 0x417ba
jmp 0x417d6
movq -0xd0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
movq -0xe8(%rbp), %rdx
callq 0x62f50
jmp 0x417d8
jmp 0x4182c
movq -0x1c0(%rbp), %rdi
movq -0x1c8(%rbp), %rsi
movq -0x1d0(%rbp), %rdx
movq -0x1d8(%rbp), %rcx
movq -0x200(%rbp), %r8
movq -0x1e8(%rbp), %r9
movb -0x1e9(%rbp), %r10b
movq 0x18(%rbp), %rax
andb $0x1, %r10b
movzbl %r10b, %r10d
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x62830
movq %rax, -0x1f8(%rbp)
movq -0x1f8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq -0x1b8(%rbp), %rax
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
nopw (%rax,%rax)