// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/deps/jemalloc/src/arena.c
// Function: arena_run_dalloc
static void
arena_run_dalloc(arena_t *arena, arena_run_t *run, bool dirty, bool cleaned,
    bool decommitted)
{
	arena_chunk_t *chunk;
	arena_chunk_map_misc_t *miscelm;
	size_t size, run_ind, run_pages, flag_dirty, flag_decommitted;

	chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(run);
	miscelm = arena_run_to_miscelm(run);
	run_ind = arena_miscelm_to_pageind(miscelm);
	assert(run_ind >= map_bias);
	assert(run_ind < chunk_npages);
	size = arena_run_size_get(arena, chunk, run, run_ind);
	run_pages = (size >> LG_PAGE);
	arena_cactive_update(arena, 0, run_pages);
	arena->nactive -= run_pages;

	/*
	 * The run is dirty if the caller claims to have dirtied it, as well as
	 * if it was already dirty before being allocated and the caller
	 * doesn't claim to have cleaned it.
	 */
	assert(arena_mapbits_dirty_get(chunk, run_ind) ==
	    arena_mapbits_dirty_get(chunk, run_ind+run_pages-1));
	if (!cleaned && !decommitted && arena_mapbits_dirty_get(chunk, run_ind)
	    != 0)
		dirty = true;
	flag_dirty = dirty ? CHUNK_MAP_DIRTY : 0;
	flag_decommitted = decommitted ? CHUNK_MAP_DECOMMITTED : 0;

	/* Mark pages as unallocated in the chunk map. */
	if (dirty || decommitted) {
		size_t flags = flag_dirty | flag_decommitted;
		arena_mapbits_unallocated_set(chunk, run_ind, size, flags);
		arena_mapbits_unallocated_set(chunk, run_ind+run_pages-1, size,
		    flags);
	} else {
		arena_mapbits_unallocated_set(chunk, run_ind, size,
		    arena_mapbits_unzeroed_get(chunk, run_ind));
		arena_mapbits_unallocated_set(chunk, run_ind+run_pages-1, size,
		    arena_mapbits_unzeroed_get(chunk, run_ind+run_pages-1));
	}

	arena_run_coalesce(arena, chunk, &size, &run_ind, &run_pages,
	    flag_dirty, flag_decommitted);

	/* Insert into runs_avail, now that coalescing is complete. */
	assert(arena_mapbits_unallocated_size_get(chunk, run_ind) ==
	    arena_mapbits_unallocated_size_get(chunk, run_ind+run_pages-1));
	assert(arena_mapbits_dirty_get(chunk, run_ind) ==
	    arena_mapbits_dirty_get(chunk, run_ind+run_pages-1));
	assert(arena_mapbits_decommitted_get(chunk, run_ind) ==
	    arena_mapbits_decommitted_get(chunk, run_ind+run_pages-1));
	arena_avail_insert(arena, chunk, run_ind, run_pages);

	if (dirty)
		arena_run_dirty_insert(arena, chunk, run_ind, run_pages);

	/* Deallocate chunk if it is now completely unused. */
	if (size == arena_maxrun) {
		assert(run_ind == map_bias);
		assert(run_pages == (arena_maxrun >> LG_PAGE));
		arena_chunk_dalloc(arena, chunk);
	}

	/*
	 * It is okay to do dirty page processing here even if the chunk was
	 * deallocated above, since in that case it is the spare.  Waiting
	 * until after possible chunk deallocation to do dirty processing
	 * allows for an old spare to be fully deallocated, thus decreasing the
	 * chances of spuriously crossing the dirty page purging threshold.
	 */
	if (dirty)
		arena_maybe_purge(arena);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x320, %rsp            # imm = 0x320
movb %r8b, %al
movq %rdi, -0x2c0(%rbp)
movq %rsi, -0x2c8(%rbp)
andb $0x1, %dl
movb %dl, -0x2c9(%rbp)
andb $0x1, %cl
movb %cl, -0x2ca(%rbp)
andb $0x1, %al
movb %al, -0x2cb(%rbp)
movq -0x2c8(%rbp), %rax
leaq 0x5994c(%rip), %rcx     # 0xa2730
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x2d8(%rbp)
movq -0x2c8(%rbp), %rax
movq %rax, -0x2b0(%rbp)
movq -0x2b0(%rbp), %rax
subq $0x10, %rax
movq %rax, -0x2b8(%rbp)
movq -0x2b8(%rbp), %rax
movq %rax, -0x2e0(%rbp)
movq -0x2e0(%rbp), %rax
movq %rax, -0x298(%rbp)
movq -0x298(%rbp), %rax
leaq 0x598f1(%rip), %rcx     # 0xa2730
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x2a0(%rbp)
movq -0x298(%rbp), %rax
movq -0x2a0(%rbp), %rcx
addq 0x5977b(%rip), %rcx     # 0xa25e0
subq %rcx, %rax
movl $0x60, %ecx
xorl %edx, %edx
divq %rcx
addq 0x5975f(%rip), %rax     # 0xa25d8
movq %rax, -0x2a8(%rbp)
movq -0x2a8(%rbp), %rax
movq %rax, -0x2f0(%rbp)
jmp 0x48e90
jmp 0x48e92
jmp 0x48e94
movq -0x2c0(%rbp), %rdi
movq -0x2d8(%rbp), %rsi
movq -0x2c8(%rbp), %rdx
movq -0x2f0(%rbp), %rcx
callq 0x49600
movq %rax, -0x2e8(%rbp)
movq -0x2e8(%rbp), %rax
shrq $0xc, %rax
movq %rax, -0x2f8(%rbp)
movq -0x2c0(%rbp), %rdi
movq -0x2f8(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x47e30
movq -0x2f8(%rbp), %rdx
movq -0x2c0(%rbp), %rax
movq 0xe0(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0xe0(%rax)
jmp 0x48f06
testb $0x1, -0x2ca(%rbp)
jne 0x48fe0
testb $0x1, -0x2cb(%rbp)
jne 0x48fe0
movq -0x2d8(%rbp), %rcx
movq -0x2f0(%rbp), %rax
movq %rcx, -0xe0(%rbp)
movq %rax, -0xe8(%rbp)
movq -0xe0(%rbp), %rcx
movq -0xe8(%rbp), %rax
movq %rcx, -0xd0(%rbp)
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rcx
movq -0xd8(%rbp), %rax
movq %rcx, -0xb8(%rbp)
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rcx
movq -0xc0(%rbp), %rax
movq %rcx, -0xa8(%rbp)
movq %rax, -0xb0(%rbp)
movq -0xa8(%rbp), %rax
addq $0x68, %rax
movq -0xb0(%rbp), %rcx
subq 0x5962f(%rip), %rcx     # 0xa25d8
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x48fe0
movb $0x1, -0x2c9(%rbp)
movb -0x2c9(%rbp), %dl
xorl %eax, %eax
movl $0x10, %ecx
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, -0x300(%rbp)
movb -0x2cb(%rbp), %dl
xorl %eax, %eax
movl $0x4, %ecx
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, -0x308(%rbp)
testb $0x1, -0x2c9(%rbp)
jne 0x4902c
testb $0x1, -0x2cb(%rbp)
je 0x49231
movq -0x300(%rbp), %rax
orq -0x308(%rbp), %rax
movq %rax, -0x310(%rbp)
movq -0x2d8(%rbp), %rsi
movq -0x2f0(%rbp), %rdx
movq -0x2e8(%rbp), %rcx
movq -0x310(%rbp), %rax
movq %rsi, -0x198(%rbp)
movq %rdx, -0x1a0(%rbp)
movq %rcx, -0x1a8(%rbp)
movq %rax, -0x1b0(%rbp)
movq -0x198(%rbp), %rcx
movq -0x1a0(%rbp), %rax
movq %rcx, -0x188(%rbp)
movq %rax, -0x190(%rbp)
movq -0x188(%rbp), %rcx
movq -0x190(%rbp), %rax
movq %rcx, -0x178(%rbp)
movq %rax, -0x180(%rbp)
movq -0x178(%rbp), %rax
addq $0x68, %rax
movq -0x180(%rbp), %rcx
subq 0x5950e(%rip), %rcx     # 0xa25d8
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x1b8(%rbp)
movq -0x1b8(%rbp), %rcx
movq -0x1a8(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
shlq %rax
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rax
orq $0x1fe0, %rax           # imm = 0x1FE0
orq -0x1b0(%rbp), %rax
movq %rcx, -0x168(%rbp)
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rcx
movq -0x168(%rbp), %rax
movq %rcx, (%rax)
movq -0x2d8(%rbp), %rsi
movq -0x2f0(%rbp), %rdx
addq -0x2f8(%rbp), %rdx
subq $0x1, %rdx
movq -0x2e8(%rbp), %rcx
movq -0x310(%rbp), %rax
movq %rsi, -0x1e0(%rbp)
movq %rdx, -0x1e8(%rbp)
movq %rcx, -0x1f0(%rbp)
movq %rax, -0x1f8(%rbp)
movq -0x1e0(%rbp), %rcx
movq -0x1e8(%rbp), %rax
movq %rcx, -0x1d0(%rbp)
movq %rax, -0x1d8(%rbp)
movq -0x1d0(%rbp), %rcx
movq -0x1d8(%rbp), %rax
movq %rcx, -0x1c0(%rbp)
movq %rax, -0x1c8(%rbp)
movq -0x1c0(%rbp), %rax
addq $0x68, %rax
movq -0x1c8(%rbp), %rcx
subq 0x59413(%rip), %rcx     # 0xa25d8
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x200(%rbp)
movq -0x200(%rbp), %rcx
movq -0x1f0(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
shlq %rax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rax
orq $0x1fe0, %rax           # imm = 0x1FE0
orq -0x1f8(%rbp), %rax
movq %rcx, -0x158(%rbp)
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rcx
movq -0x158(%rbp), %rax
movq %rcx, (%rax)
jmp 0x4951f
movq -0x2d8(%rbp), %rsi
movq -0x2f0(%rbp), %rdx
movq -0x2e8(%rbp), %rcx
movq -0x2d8(%rbp), %rdi
movq -0x2f0(%rbp), %rax
movq %rdi, -0x40(%rbp)
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rax
movq %rdi, -0x30(%rbp)
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rax
movq %rdi, -0x18(%rbp)
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x68, %rax
movq -0x10(%rbp), %rdi
subq 0x59339(%rip), %rdi     # 0xa25d8
shlq $0x3, %rdi
addq %rdi, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
andq $0x8, %rax
movq %rsi, -0x228(%rbp)
movq %rdx, -0x230(%rbp)
movq %rcx, -0x238(%rbp)
movq %rax, -0x240(%rbp)
movq -0x228(%rbp), %rcx
movq -0x230(%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 0x592ae(%rip), %rcx     # 0xa25d8
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x248(%rbp)
movq -0x248(%rbp), %rcx
movq -0x238(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
shlq %rax
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
orq $0x1fe0, %rax           # imm = 0x1FE0
orq -0x240(%rbp), %rax
movq %rcx, -0x148(%rbp)
movq %rax, -0x150(%rbp)
movq -0x150(%rbp), %rcx
movq -0x148(%rbp), %rax
movq %rcx, (%rax)
movq -0x2d8(%rbp), %rsi
movq -0x2f0(%rbp), %rdx
addq -0x2f8(%rbp), %rdx
subq $0x1, %rdx
movq -0x2e8(%rbp), %rcx
movq -0x2d8(%rbp), %rdi
movq -0x2f0(%rbp), %rax
addq -0x2f8(%rbp), %rax
subq $0x1, %rax
movq %rdi, -0x90(%rbp)
movq %rax, -0x98(%rbp)
movq -0x90(%rbp), %rdi
movq -0x98(%rbp), %rax
movq %rdi, -0x80(%rbp)
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rdi
movq -0x88(%rbp), %rax
movq %rdi, -0x68(%rbp)
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rax
movq %rdi, -0x58(%rbp)
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
addq $0x68, %rax
movq -0x60(%rbp), %rdi
subq 0x591b1(%rip), %rdi     # 0xa25d8
shlq $0x3, %rdi
addq %rdi, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
andq $0x8, %rax
movq %rsi, -0x270(%rbp)
movq %rdx, -0x278(%rbp)
movq %rcx, -0x280(%rbp)
movq %rax, -0x288(%rbp)
movq -0x270(%rbp), %rcx
movq -0x278(%rbp), %rax
movq %rcx, -0x260(%rbp)
movq %rax, -0x268(%rbp)
movq -0x260(%rbp), %rcx
movq -0x268(%rbp), %rax
movq %rcx, -0x250(%rbp)
movq %rax, -0x258(%rbp)
movq -0x250(%rbp), %rax
addq $0x68, %rax
movq -0x258(%rbp), %rcx
subq 0x59120(%rip), %rcx     # 0xa25d8
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x290(%rbp)
movq -0x290(%rbp), %rcx
movq -0x280(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
shlq %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rax
orq $0x1fe0, %rax           # imm = 0x1FE0
orq -0x288(%rbp), %rax
movq %rcx, -0x138(%rbp)
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rcx
movq -0x138(%rbp), %rax
movq %rcx, (%rax)
movq -0x2c0(%rbp), %rdi
movq -0x2d8(%rbp), %rsi
movq -0x300(%rbp), %r9
movq -0x308(%rbp), %rax
leaq -0x2e8(%rbp), %rdx
leaq -0x2f0(%rbp), %rcx
leaq -0x2f8(%rbp), %r8
movq %rax, (%rsp)
callq 0x497b0
jmp 0x4955b
jmp 0x4955d
jmp 0x4955f
jmp 0x49561
jmp 0x49563
movq -0x2c0(%rbp), %rdi
movq -0x2d8(%rbp), %rsi
movq -0x2f0(%rbp), %rdx
movq -0x2f8(%rbp), %rcx
callq 0x461f0
testb $0x1, -0x2c9(%rbp)
je 0x495ae
movq -0x2c0(%rbp), %rdi
movq -0x2d8(%rbp), %rsi
movq -0x2f0(%rbp), %rdx
movq -0x2f8(%rbp), %rcx
callq 0x47ec0
movq -0x2e8(%rbp), %rax
cmpq 0x5902c(%rip), %rax     # 0xa25e8
jne 0x495d9
jmp 0x495c0
jmp 0x495c2
jmp 0x495c4
jmp 0x495c6
movq -0x2c0(%rbp), %rdi
movq -0x2d8(%rbp), %rsi
callq 0x4a400
testb $0x1, -0x2c9(%rbp)
je 0x495ee
movq -0x2c0(%rbp), %rdi
callq 0x3d010
addq $0x320, %rsp            # imm = 0x320
popq %rbp
retq
nopw (%rax,%rax)