// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/deps/jemalloc/src/arena.c
// Function: arena_unstash_purged
static void
arena_unstash_purged(arena_t *arena, chunk_hooks_t *chunk_hooks,
    arena_runs_dirty_link_t *purge_runs_sentinel,
    extent_node_t *purge_chunks_sentinel)
{
	arena_runs_dirty_link_t *rdelm, *rdelm_next;
	extent_node_t *chunkselm;

	/* Deallocate chunks/runs. */
	for (rdelm = qr_next(purge_runs_sentinel, rd_link),
	    chunkselm = qr_next(purge_chunks_sentinel, cc_link);
	    rdelm != purge_runs_sentinel; rdelm = rdelm_next) {
		rdelm_next = qr_next(rdelm, rd_link);
		if (rdelm == &chunkselm->rd) {
			extent_node_t *chunkselm_next = qr_next(chunkselm,
			    cc_link);
			void *addr = extent_node_addr_get(chunkselm);
			size_t size = extent_node_size_get(chunkselm);
			bool zeroed = extent_node_zeroed_get(chunkselm);
			bool committed = extent_node_committed_get(chunkselm);
			extent_node_dirty_remove(chunkselm);
			arena_node_dalloc(arena, chunkselm);
			chunkselm = chunkselm_next;
			chunk_dalloc_arena(arena, chunk_hooks, addr, size,
			    zeroed, committed);
		} else {
			arena_chunk_t *chunk =
			    (arena_chunk_t *)CHUNK_ADDR2BASE(rdelm);
			arena_chunk_map_misc_t *miscelm =
			    arena_rd_to_miscelm(rdelm);
			size_t pageind = arena_miscelm_to_pageind(miscelm);
			bool decommitted = (arena_mapbits_decommitted_get(chunk,
			    pageind) != 0);
			arena_run_t *run = &miscelm->run;
			qr_remove(rdelm, rd_link);
			arena_run_dalloc(arena, run, false, true, decommitted);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x80(%rbp)
movq %rsi, -0x88(%rbp)
movq %rdx, -0x90(%rbp)
movq %rcx, -0x98(%rbp)
movq -0x90(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0xa0(%rbp), %rax
cmpq -0x90(%rbp), %rax
je 0x45b5a
movq -0xa0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rax
movq -0xb0(%rbp), %rcx
addq $0x28, %rcx
cmpq %rcx, %rax
jne 0x4599f
movq -0xb0(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x45b70
movq %rax, -0xc0(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x44ab0
movq %rax, -0xc8(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x48d60
andb $0x1, %al
movb %al, -0xc9(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x48d80
andb $0x1, %al
movb %al, -0xca(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x3c190
movq -0x80(%rbp), %rdi
movq -0xb0(%rbp), %rsi
callq 0x3c3e0
movq -0xb8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x80(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq -0xc0(%rbp), %rdx
movq -0xc8(%rbp), %rcx
movb -0xc9(%rbp), %r8b
movb -0xca(%rbp), %al
andb $0x1, %r8b
andb $0x1, %al
movzbl %r8b, %r8d
movzbl %al, %r9d
callq 0x51470
jmp 0x45b45
movq -0xa0(%rbp), %rax
leaq 0x5cd83(%rip), %rcx     # 0xa2730
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0xd8(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
subq $0x10, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
leaq 0x5cd3a(%rip), %rcx     # 0xa2730
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq -0x60(%rbp), %rcx
addq 0x5cbcd(%rip), %rcx     # 0xa25e0
subq %rcx, %rax
movl $0x60, %ecx
xorl %edx, %edx
divq %rcx
addq 0x5cbb1(%rip), %rax     # 0xa25d8
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0xd8(%rbp), %rcx
movq -0xe8(%rbp), %rax
movq %rcx, -0x40(%rbp)
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x30(%rbp)
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, -0x18(%rbp)
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, -0x8(%rbp)
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x68, %rax
movq -0x10(%rbp), %rcx
subq 0x5cb49(%rip), %rcx     # 0xa25d8
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
andq $0x4, %rax
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movb %al, -0xe9(%rbp)
movq -0xe0(%rbp), %rax
addq $0x10, %rax
movq %rax, -0xf8(%rbp)
movq -0xa0(%rbp), %rax
movq (%rax), %rcx
movq -0xa0(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0xa0(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0xa0(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0xa0(%rbp), %rcx
movq -0xa0(%rbp), %rax
movq %rcx, (%rax)
movq -0xa0(%rbp), %rcx
movq -0xa0(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x80(%rbp), %rdi
movq -0xf8(%rbp), %rsi
movb -0xe9(%rbp), %al
xorl %edx, %edx
movl $0x1, %ecx
andb $0x1, %al
movzbl %al, %r8d
callq 0x48da0
jmp 0x45b47
movq -0xa8(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0x45897
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopw %cs:(%rax,%rax)