// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/deps/jemalloc/src/arena.c
// Function: arena_ralloc_large_grow
static bool
arena_ralloc_large_grow(arena_t *arena, arena_chunk_t *chunk, void *ptr,
    size_t oldsize, size_t usize_min, size_t usize_max, bool zero)
{
	size_t pageind = ((uintptr_t)ptr - (uintptr_t)chunk) >> LG_PAGE;
	size_t npages = (oldsize + large_pad) >> LG_PAGE;
	size_t followsize;

	assert(oldsize == arena_mapbits_large_size_get(chunk, pageind) -
	    large_pad);

	/* Try to extend the run. */
	malloc_mutex_lock(&arena->lock);
	if (pageind+npages >= chunk_npages || arena_mapbits_allocated_get(chunk,
	    pageind+npages) != 0)
		goto label_fail;
	followsize = arena_mapbits_unallocated_size_get(chunk, pageind+npages);
	if (oldsize + followsize >= usize_min) {
		/*
		 * The next run is available and sufficiently large.  Split the
		 * following run, then merge the first part with the existing
		 * allocation.
		 */
		arena_run_t *run;
		size_t usize, splitsize, size, flag_dirty, flag_unzeroed_mask;

		usize = usize_max;
		while (oldsize + followsize < usize)
			usize = index2size(size2index(usize)-1);
		assert(usize >= usize_min);
		assert(usize >= oldsize);
		splitsize = usize - oldsize;
		if (splitsize == 0)
			goto label_fail;

		run = &arena_miscelm_get(chunk, pageind+npages)->run;
		if (arena_run_split_large(arena, run, splitsize, zero))
			goto label_fail;

		if (config_cache_oblivious && zero) {
			/*
			 * Zero the trailing bytes of the original allocation's
			 * last page, since they are in an indeterminate state.
			 */
			assert(PAGE_CEILING(oldsize) == oldsize);
			memset((void *)((uintptr_t)ptr + oldsize), 0,
			    PAGE_CEILING((uintptr_t)ptr) - (uintptr_t)ptr);
		}

		size = oldsize + splitsize;
		npages = (size + large_pad) >> LG_PAGE;

		/*
		 * Mark the extended run as dirty if either portion of the run
		 * was dirty before allocation.  This is rather pedantic,
		 * because there's not actually any sequence of events that
		 * could cause the resulting run to be passed to
		 * arena_run_dalloc() with the dirty argument set to false
		 * (which is when dirty flag consistency would really matter).
		 */
		flag_dirty = arena_mapbits_dirty_get(chunk, pageind) |
		    arena_mapbits_dirty_get(chunk, pageind+npages-1);
		flag_unzeroed_mask = flag_dirty == 0 ? CHUNK_MAP_UNZEROED : 0;
		arena_mapbits_large_set(chunk, pageind, size + large_pad,
		    flag_dirty | (flag_unzeroed_mask &
		    arena_mapbits_unzeroed_get(chunk, pageind)));
		arena_mapbits_large_set(chunk, pageind+npages-1, 0, flag_dirty |
		    (flag_unzeroed_mask & arena_mapbits_unzeroed_get(chunk,
		    pageind+npages-1)));

		if (config_stats) {
			szind_t oldindex = size2index(oldsize) - NBINS;
			szind_t index = size2index(size) - NBINS;

			arena->stats.ndalloc_large++;
			arena->stats.allocated_large -= oldsize;
			arena->stats.lstats[oldindex].ndalloc++;
			arena->stats.lstats[oldindex].curruns--;

			arena->stats.nmalloc_large++;
			arena->stats.nrequests_large++;
			arena->stats.allocated_large += size;
			arena->stats.lstats[index].nmalloc++;
			arena->stats.lstats[index].nrequests++;
			arena->stats.lstats[index].curruns++;
		}
		malloc_mutex_unlock(&arena->lock);
		return (false);
	}
label_fail:
	malloc_mutex_unlock(&arena->lock);
	return (true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3d0, %rsp            # imm = 0x3D0
movb 0x10(%rbp), %al
movq %rdi, -0x350(%rbp)
movq %rsi, -0x358(%rbp)
movq %rdx, -0x360(%rbp)
movq %rcx, -0x368(%rbp)
movq %r8, -0x370(%rbp)
movq %r9, -0x378(%rbp)
andb $0x1, %al
movb %al, -0x379(%rbp)
movq -0x360(%rbp), %rax
movq -0x358(%rbp), %rcx
subq %rcx, %rax
shrq $0xc, %rax
movq %rax, -0x388(%rbp)
movq -0x368(%rbp), %rax
addq $0x1000, %rax           # imm = 0x1000
shrq $0xc, %rax
movq %rax, -0x390(%rbp)
jmp 0x4e2a6
movq -0x350(%rbp), %rdi
addq $0x8, %rdi
callq 0x3c3a0
movq -0x388(%rbp), %rax
addq -0x390(%rbp), %rax
leaq 0x5446d(%rip), %rcx     # 0xa2738
cmpq (%rcx), %rax
jae 0x4e364
movq -0x358(%rbp), %rcx
movq -0x388(%rbp), %rax
addq -0x390(%rbp), %rax
movq %rcx, -0x80(%rbp)
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, -0x70(%rbp)
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rcx
movq -0x78(%rbp), %rax
movq %rcx, -0x58(%rbp)
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, -0x48(%rbp)
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
addq $0x68, %rax
movq -0x50(%rbp), %rcx
subq 0x5429e(%rip), %rcx     # 0xa25d8
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x4e369
jmp 0x4eda2
movq -0x358(%rbp), %rcx
movq -0x388(%rbp), %rax
addq -0x390(%rbp), %rax
movq %rcx, -0x2f0(%rbp)
movq %rax, -0x2f8(%rbp)
movq -0x2f0(%rbp), %rcx
movq -0x2f8(%rbp), %rax
movq %rcx, -0x2e0(%rbp)
movq %rax, -0x2e8(%rbp)
movq -0x2e0(%rbp), %rcx
movq -0x2e8(%rbp), %rax
movq %rcx, -0x2b8(%rbp)
movq %rax, -0x2c0(%rbp)
movq -0x2b8(%rbp), %rcx
movq -0x2c0(%rbp), %rax
movq %rcx, -0x2a8(%rbp)
movq %rax, -0x2b0(%rbp)
movq -0x2a8(%rbp), %rax
addq $0x68, %rax
movq -0x2b0(%rbp), %rcx
subq 0x541df(%rip), %rcx     # 0xa25d8
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x2c8(%rbp)
movq -0x2c8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x300(%rbp)
movq -0x300(%rbp), %rax
movq %rax, -0x2d0(%rbp)
movq -0x2d0(%rbp), %rax
andq $-0x2000, %rax          # imm = 0xE000
shrq %rax
movq %rax, -0x2d8(%rbp)
movq -0x2d8(%rbp), %rax
movq %rax, -0x398(%rbp)
movq -0x368(%rbp), %rax
addq -0x398(%rbp), %rax
cmpq -0x370(%rbp), %rax
jb 0x4eda0
movq -0x378(%rbp), %rax
movq %rax, -0x3a8(%rbp)
movq -0x368(%rbp), %rax
addq -0x398(%rbp), %rax
cmpq -0x3a8(%rbp), %rax
jae 0x4e531
movq -0x3a8(%rbp), %rax
movq %rax, -0x320(%rbp)
cmpq $0x1000, -0x320(%rbp) # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x4e4b1
jmp 0x4e4e3
movq -0x320(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x407b1(%rip), %rax     # 0x8ec80
movzbl (%rax,%rcx), %eax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl %eax, -0x318(%rbp)
jmp 0x4e4f5
movq -0x320(%rbp), %rdi
callq 0x4ca20
movl %eax, -0x318(%rbp)
movl -0x318(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x314(%rbp)
movl -0x314(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x3ffe7(%rip), %rax     # 0x8e500
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x3a8(%rbp)
jmp 0x4e474
jmp 0x4e533
jmp 0x4e535
jmp 0x4e537
jmp 0x4e539
movq -0x3a8(%rbp), %rax
subq -0x368(%rbp), %rax
movq %rax, -0x3b0(%rbp)
cmpq $0x0, -0x3b0(%rbp)
jne 0x4e55d
jmp 0x4eda2
movq -0x358(%rbp), %rcx
movq -0x388(%rbp), %rax
addq -0x390(%rbp), %rax
movq %rcx, -0x308(%rbp)
movq %rax, -0x310(%rbp)
movq -0x308(%rbp), %rax
addq 0x54052(%rip), %rax     # 0xa25e0
imulq $0x60, -0x310(%rbp), %rcx
addq %rcx, %rax
xorl %ecx, %ecx
subq 0x54036(%rip), %rcx     # 0xa25d8
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
addq $0x10, %rax
movq %rax, -0x3a0(%rbp)
movq -0x350(%rbp), %rdi
movq -0x3a0(%rbp), %rsi
movq -0x3b0(%rbp), %rdx
movb -0x379(%rbp), %al
andb $0x1, %al
movzbl %al, %ecx
callq 0x45c10
testb $0x1, %al
jne 0x4e5df
jmp 0x4e5e4
jmp 0x4eda2
testb $0x1, -0x379(%rbp)
je 0x4e625
jmp 0x4e5ef
jmp 0x4e5f1
movq -0x360(%rbp), %rdi
addq -0x368(%rbp), %rdi
movq -0x360(%rbp), %rdx
addq $0xfff, %rdx            # imm = 0xFFF
andq $-0x1000, %rdx          # imm = 0xF000
movq -0x360(%rbp), %rax
subq %rax, %rdx
xorl %esi, %esi
callq 0x10250
movq -0x368(%rbp), %rax
addq -0x3b0(%rbp), %rax
movq %rax, -0x3b8(%rbp)
movq -0x3b8(%rbp), %rax
addq $0x1000, %rax           # imm = 0x1000
shrq $0xc, %rax
movq %rax, -0x390(%rbp)
movq -0x358(%rbp), %rcx
movq -0x388(%rbp), %rax
movq %rcx, -0x240(%rbp)
movq %rax, -0x248(%rbp)
movq -0x240(%rbp), %rcx
movq -0x248(%rbp), %rax
movq %rcx, -0x230(%rbp)
movq %rax, -0x238(%rbp)
movq -0x230(%rbp), %rcx
movq -0x238(%rbp), %rax
movq %rcx, -0x218(%rbp)
movq %rax, -0x220(%rbp)
movq -0x218(%rbp), %rcx
movq -0x220(%rbp), %rax
movq %rcx, -0x208(%rbp)
movq %rax, -0x210(%rbp)
movq -0x208(%rbp), %rax
addq $0x68, %rax
movq -0x210(%rbp), %rcx
subq 0x53efd(%rip), %rcx     # 0xa25d8
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x228(%rbp)
movq -0x228(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x250(%rbp)
movq -0x250(%rbp), %rax
andq $0x10, %rax
movq -0x358(%rbp), %rdx
movq -0x388(%rbp), %rcx
addq -0x390(%rbp), %rcx
subq $0x1, %rcx
movq %rdx, -0x290(%rbp)
movq %rcx, -0x298(%rbp)
movq -0x290(%rbp), %rdx
movq -0x298(%rbp), %rcx
movq %rdx, -0x280(%rbp)
movq %rcx, -0x288(%rbp)
movq -0x280(%rbp), %rdx
movq -0x288(%rbp), %rcx
movq %rdx, -0x268(%rbp)
movq %rcx, -0x270(%rbp)
movq -0x268(%rbp), %rdx
movq -0x270(%rbp), %rcx
movq %rdx, -0x258(%rbp)
movq %rcx, -0x260(%rbp)
movq -0x258(%rbp), %rcx
addq $0x68, %rcx
movq -0x260(%rbp), %rdx
subq 0x53e3f(%rip), %rdx     # 0xa25d8
shlq $0x3, %rdx
addq %rdx, %rcx
movq %rcx, -0x278(%rbp)
movq -0x278(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, -0x2a0(%rbp)
movq -0x2a0(%rbp), %rcx
andq $0x10, %rcx
orq %rcx, %rax
movq %rax, -0x3c0(%rbp)
movq -0x3c0(%rbp), %rdx
xorl %eax, %eax
movl $0x8, %ecx
cmpq $0x0, %rdx
cmoveq %rcx, %rax
movq %rax, -0x3c8(%rbp)
movq -0x358(%rbp), %rsi
movq -0x388(%rbp), %rdx
movq -0x3b8(%rbp), %rcx
addq $0x1000, %rcx           # imm = 0x1000
movq -0x3c0(%rbp), %rax
movq -0x3c8(%rbp), %rdi
movq -0x358(%rbp), %r9
movq -0x388(%rbp), %r8
movq %r9, -0x1a0(%rbp)
movq %r8, -0x1a8(%rbp)
movq -0x1a0(%rbp), %r9
movq -0x1a8(%rbp), %r8
movq %r9, -0x190(%rbp)
movq %r8, -0x198(%rbp)
movq -0x190(%rbp), %r9
movq -0x198(%rbp), %r8
movq %r9, -0x178(%rbp)
movq %r8, -0x180(%rbp)
movq -0x178(%rbp), %r9
movq -0x180(%rbp), %r8
movq %r9, -0x168(%rbp)
movq %r8, -0x170(%rbp)
movq -0x168(%rbp), %r8
addq $0x68, %r8
movq -0x170(%rbp), %r9
subq 0x53d3b(%rip), %r9      # 0xa25d8
shlq $0x3, %r9
addq %r9, %r8
movq %r8, -0x188(%rbp)
movq -0x188(%rbp), %r8
movq (%r8), %r8
movq %r8, -0x1b0(%rbp)
movq -0x1b0(%rbp), %r8
andq $0x8, %r8
andq %r8, %rdi
orq %rdi, %rax
movq %rsi, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %rcx, -0xe8(%rbp)
movq %rax, -0xf0(%rbp)
movq -0xd8(%rbp), %rcx
movq -0xe0(%rbp), %rax
movq %rcx, -0xc8(%rbp)
movq %rax, -0xd0(%rbp)
movq -0xc8(%rbp), %rcx
movq -0xd0(%rbp), %rax
movq %rcx, -0xb8(%rbp)
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rax
addq $0x68, %rax
movq -0xc0(%rbp), %rcx
subq 0x53c9e(%rip), %rcx     # 0xa25d8
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rcx
movq -0xe8(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
shlq %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
orq $0x1fe0, %rax           # imm = 0x1FE0
orq -0xf0(%rbp), %rax
orq $0x2, %rax
orq $0x1, %rax
movq %rcx, -0xa8(%rbp)
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rcx
movq -0xa8(%rbp), %rax
movq %rcx, (%rax)
movq -0x358(%rbp), %rdx
movq -0x388(%rbp), %rcx
addq -0x390(%rbp), %rcx
subq $0x1, %rcx
movq -0x3c0(%rbp), %rax
movq -0x3c8(%rbp), %rsi
movq -0x358(%rbp), %r8
movq -0x388(%rbp), %rdi
addq -0x390(%rbp), %rdi
subq $0x1, %rdi
movq %r8, -0x1f0(%rbp)
movq %rdi, -0x1f8(%rbp)
movq -0x1f0(%rbp), %r8
movq -0x1f8(%rbp), %rdi
movq %r8, -0x1e0(%rbp)
movq %rdi, -0x1e8(%rbp)
movq -0x1e0(%rbp), %r8
movq -0x1e8(%rbp), %rdi
movq %r8, -0x1c8(%rbp)
movq %rdi, -0x1d0(%rbp)
movq -0x1c8(%rbp), %r8
movq -0x1d0(%rbp), %rdi
movq %r8, -0x1b8(%rbp)
movq %rdi, -0x1c0(%rbp)
movq -0x1b8(%rbp), %rdi
addq $0x68, %rdi
movq -0x1c0(%rbp), %r8
subq 0x53b74(%rip), %r8      # 0xa25d8
shlq $0x3, %r8
addq %r8, %rdi
movq %rdi, -0x1d8(%rbp)
movq -0x1d8(%rbp), %rdi
movq (%rdi), %rdi
movq %rdi, -0x200(%rbp)
movq -0x200(%rbp), %rdi
andq $0x8, %rdi
andq %rdi, %rsi
orq %rsi, %rax
movq %rdx, -0x140(%rbp)
movq %rcx, -0x148(%rbp)
movq $0x0, -0x150(%rbp)
movq %rax, -0x158(%rbp)
movq -0x140(%rbp), %rcx
movq -0x148(%rbp), %rax
movq %rcx, -0x130(%rbp)
movq %rax, -0x138(%rbp)
movq -0x130(%rbp), %rcx
movq -0x138(%rbp), %rax
movq %rcx, -0x120(%rbp)
movq %rax, -0x128(%rbp)
movq -0x120(%rbp), %rax
addq $0x68, %rax
movq -0x128(%rbp), %rcx
subq 0x53ad3(%rip), %rcx     # 0xa25d8
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rcx
movq -0x150(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rax
shlq %rax
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
orq $0x1fe0, %rax           # imm = 0x1FE0
orq -0x158(%rbp), %rax
orq $0x2, %rax
orq $0x1, %rax
movq %rcx, -0x110(%rbp)
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rcx
movq -0x110(%rbp), %rax
movq %rcx, (%rax)
movq -0x368(%rbp), %rax
movq %rax, -0x330(%rbp)
cmpq $0x1000, -0x330(%rbp) # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x4eb96
jmp 0x4ebc8
movq -0x330(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x400cc(%rip), %rax     # 0x8ec80
movzbl (%rax,%rcx), %eax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl %eax, -0x324(%rbp)
jmp 0x4ebda
movq -0x330(%rbp), %rdi
callq 0x4ca20
movl %eax, -0x324(%rbp)
movl -0x324(%rbp), %eax
subl $0x27, %eax
movl %eax, -0x3cc(%rbp)
movq -0x3b8(%rbp), %rax
movq %rax, -0x340(%rbp)
cmpq $0x1000, -0x340(%rbp) # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x4ec0b
jmp 0x4ec3d
movq -0x340(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x40057(%rip), %rax     # 0x8ec80
movzbl (%rax,%rcx), %eax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl %eax, -0x334(%rbp)
jmp 0x4ec4f
movq -0x340(%rbp), %rdi
callq 0x4ca20
movl %eax, -0x334(%rbp)
movl -0x334(%rbp), %eax
subl $0x27, %eax
movl %eax, -0x3d0(%rbp)
movq -0x350(%rbp), %rax
movq 0x70(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x70(%rax)
movq -0x368(%rbp), %rdx
movq -0x350(%rbp), %rax
movq 0x60(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x60(%rax)
movq -0x350(%rbp), %rax
movq 0x98(%rax), %rax
movl -0x3cc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x350(%rbp), %rax
movq 0x98(%rax), %rax
movl -0x3cc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x18(%rax)
movq -0x350(%rbp), %rax
movq 0x68(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x68(%rax)
movq -0x350(%rbp), %rax
movq 0x78(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x78(%rax)
movq -0x3b8(%rbp), %rcx
movq -0x350(%rbp), %rax
addq 0x60(%rax), %rcx
movq %rcx, 0x60(%rax)
movq -0x350(%rbp), %rax
movq 0x98(%rax), %rax
movl -0x3d0(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x350(%rbp), %rax
movq 0x98(%rax), %rax
movl -0x3d0(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0x350(%rbp), %rax
movq 0x98(%rax), %rax
movl -0x3d0(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
movq -0x350(%rbp), %rdi
addq $0x8, %rdi
callq 0x3c3c0
movb $0x0, -0x341(%rbp)
jmp 0x4edb9
jmp 0x4eda2
movq -0x350(%rbp), %rdi
addq $0x8, %rdi
callq 0x3c3c0
movb $0x1, -0x341(%rbp)
movb -0x341(%rbp), %al
andb $0x1, %al
addq $0x3d0, %rsp            # imm = 0x3D0
popq %rbp
retq
nopw (%rax,%rax)