// File: /workspace/github_c_makefile_star2_O0/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/arena.c
// Function: arena_unstash_purged
static void
arena_unstash_purged(tsdn_t *tsdn, 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);
			size_t sn = extent_node_sn_get(chunkselm);
			bool zeroed = extent_node_zeroed_get(chunkselm);
			bool committed = extent_node_committed_get(chunkselm);
			extent_node_dirty_remove(chunkselm);
			arena_node_dalloc(tsdn, arena, chunkselm);
			chunkselm = chunkselm_next;
			chunk_dalloc_wrapper(tsdn, arena, chunk_hooks, addr,
			    size, sn, 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(tsdn, arena, run, false, true,
			    decommitted);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x90(%rbp)
movq %rsi, -0x98(%rbp)
movq %rdx, -0xa0(%rbp)
movq %rcx, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq -0xa8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0xc8(%rbp)
movq -0xb8(%rbp), %rax
cmpq -0xa8(%rbp), %rax
je 0x45eca
movq -0xb8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rax
movq -0xc8(%rbp), %rcx
addq $0x30, %rcx
cmpq %rcx, %rax
jne 0x45cee
movq -0xc8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0xd0(%rbp)
movq -0xc8(%rbp), %rdi
callq 0x3c370
movq %rax, -0xd8(%rbp)
movq -0xc8(%rbp), %rdi
callq 0x44740
movq %rax, -0xe0(%rbp)
movq -0xc8(%rbp), %rdi
callq 0x499c0
movq %rax, -0xe8(%rbp)
movq -0xc8(%rbp), %rdi
callq 0x49a10
andb $0x1, %al
movb %al, -0xe9(%rbp)
movq -0xc8(%rbp), %rdi
callq 0x49a30
andb $0x1, %al
movb %al, -0xea(%rbp)
movq -0xc8(%rbp), %rdi
callq 0x3a440
movq -0x90(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq -0xc8(%rbp), %rdx
callq 0x3a6e0
movq -0xd0(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x90(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq -0xa0(%rbp), %rdx
movq -0xd8(%rbp), %rcx
movq -0xe0(%rbp), %r8
movq -0xe8(%rbp), %r9
movb -0xe9(%rbp), %r10b
movb -0xea(%rbp), %al
andb $0x1, %r10b
andb $0x1, %al
movzbl %r10b, %r10d
movl %r10d, (%rsp)
movzbl %al, %eax
movl %eax, 0x8(%rsp)
callq 0x52a50
jmp 0x45eb5
movq -0xb8(%rbp), %rax
leaq 0x5e3b4(%rip), %rcx     # 0xa40b0
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0xf8(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
subq $0x18, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
leaq 0x5e365(%rip), %rcx     # 0xa40b0
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rax
movq -0x70(%rbp), %rcx
addq 0x5e240(%rip), %rcx     # 0xa3fa8
subq %rcx, %rax
movl $0x60, %ecx
xorl %edx, %edx
divq %rcx
addq 0x5e224(%rip), %rax     # 0xa3fa0
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0xf8(%rbp), %rcx
movq -0x108(%rbp), %rax
movq %rcx, -0x50(%rbp)
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, -0x40(%rbp)
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x28(%rbp)
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rcx
movq -0x30(%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 $0x78, %rax
movq -0x10(%rbp), %rcx
subq 0x5e1ac(%rip), %rcx     # 0xa3fa0
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
andq $0x4, %rax
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movb %al, -0x109(%rbp)
movq -0x100(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x118(%rbp)
movq -0xb8(%rbp), %rax
movq (%rax), %rcx
movq -0xb8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0xb8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0xb8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0xb8(%rbp), %rcx
movq -0xb8(%rbp), %rax
movq %rcx, (%rax)
movq -0xb8(%rbp), %rcx
movq -0xb8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x90(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq -0x118(%rbp), %rdx
movb -0x109(%rbp), %al
xorl %ecx, %ecx
movl $0x1, %r8d
andb $0x1, %al
movzbl %al, %r9d
callq 0x49a50
jmp 0x45eb7
movq -0xc0(%rbp), %rax
movq %rax, -0xb8(%rbp)
jmp 0x45bb1
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopw %cs:(%rax,%rax)