// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/jemalloc/src/arena.c
// Function: arena_purge
static void
arena_purge(arena_t *arena, bool all)
{
	chunk_hooks_t chunk_hooks = chunk_hooks_get(arena);
	size_t npurge, npurgeable, npurged;
	arena_runs_dirty_link_t purge_runs_sentinel;
	extent_node_t purge_chunks_sentinel;

	arena->purging = true;

	/*
	 * Calls to arena_dirty_count() are disabled even for debug builds
	 * because overhead grows nonlinearly as memory usage increases.
	 */
	if (false && config_debug) {
		size_t ndirty = arena_dirty_count(arena);
		assert(ndirty == arena->ndirty);
	}
	assert((arena->nactive >> arena->lg_dirty_mult) < arena->ndirty || all);

	if (config_stats)
		arena->stats.npurge++;

	npurge = arena_compute_npurge(arena, all);
	qr_new(&purge_runs_sentinel, rd_link);
	extent_node_dirty_linkage_init(&purge_chunks_sentinel);

	npurgeable = arena_stash_dirty(arena, &chunk_hooks, all, npurge,
	    &purge_runs_sentinel, &purge_chunks_sentinel);
	assert(npurgeable >= npurge);
	npurged = arena_purge_stashed(arena, &chunk_hooks, &purge_runs_sentinel,
	    &purge_chunks_sentinel);
	assert(npurged == npurgeable);
	arena_unstash_purged(arena, &chunk_hooks, &purge_runs_sentinel,
	    &purge_chunks_sentinel);

	arena->purging = false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x58(%rsp), %rdi
movq %rbx, %rsi
callq 0x2e354
movb $0x1, 0xd8(%rbx)
incq 0x38(%rbx)
movl %ebp, 0x20(%rsp)
testl %ebp, %ebp
je 0x27983
movq 0xe8(%rbx), %rax
movq %rax, 0x38(%rsp)
jmp 0x279b3
movq 0xe0(%rbx), %rax
movb 0xd0(%rbx), %cl
shrq %cl, %rax
leaq 0x33d1e(%rip), %rcx     # 0x5b6b8
movq (%rcx), %rcx
cmpq %rcx, %rax
cmovbeq %rcx, %rax
movq 0xe8(%rbx), %rcx
subq %rax, %rcx
movq %rcx, 0x38(%rsp)
leaq 0x28(%rsp), %rax
movq %rax, (%rax)
movq %rax, 0x8(%rax)
leaq 0xb8(%rsp), %rax
movq %rax, (%rax)
movq %rax, 0x8(%rax)
leaq 0x90(%rsp), %rax
movq %rax, 0x38(%rax)
movq %rax, 0x40(%rax)
leaq 0x158(%rbx), %rax
movq %rax, 0x40(%rsp)
movq 0x158(%rbx), %r12
movq 0x1a0(%rbx), %rbp
xorl %r14d, %r14d
movq %rbx, 0x18(%rsp)
cmpq 0x40(%rsp), %r12
je 0x27b5c
movq (%r12), %r15
leaq 0x28(%rbp), %rbx
cmpq %rbx, %r12
je 0x27ab1
leaq 0x33c8d(%rip), %rax     # 0x5b6b0
movq (%rax), %rcx
leaq -0x10(%r12), %rax
andq %rcx, %rax
notq %rcx
andq %r12, %rcx
subq 0x33b25(%rip), %rax     # 0x5b560
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
shrq $0x6, %rdx
movq 0x68(%rcx,%rdx,8), %r13
movq 0x18(%rsp), %rbx
cmpq %rcx, 0xc8(%rbx)
jne 0x27a67
movq %rbx, %rdi
callq 0x2b95a
shrq %r13
movabsq $0x7ffffffffffff000, %rax # imm = 0x7FFFFFFFFFFFF000
andq %rax, %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x2bf9c
movq 0x30(%rsp), %rax
movq %r12, (%rax)
movq 0x8(%r12), %rcx
leaq 0x28(%rsp), %rdx
movq %rdx, (%rcx)
movq %rcx, 0x30(%rsp)
movq %rax, 0x8(%r12)
jmp 0x27b39
movq 0x38(%rbp), %r12
movb $0x0, 0x17(%rsp)
movq 0x8(%rbp), %rdx
movq 0x10(%rbp), %rcx
leaq 0x33bdf(%rip), %rax     # 0x5b6a8
movq (%rax), %r8
movl $0x0, (%rsp)
movq 0x18(%rsp), %r13
movq %r13, %rdi
leaq 0x58(%rsp), %rsi
leaq 0x17(%rsp), %r9
callq 0x2e5fb
movq 0x30(%rsp), %rax
movq %rbx, (%rax)
movq %r13, %rbx
movq 0x30(%rbp), %rcx
leaq 0x28(%rsp), %rdx
movq %rdx, (%rcx)
movq %rcx, 0x30(%rsp)
movq %rax, 0x30(%rbp)
movq 0xd0(%rsp), %rax
movq %rbp, 0x38(%rax)
movq 0x40(%rbp), %rcx
leaq 0x90(%rsp), %rdx
movq %rdx, 0x38(%rcx)
movq %rcx, 0xd0(%rsp)
movq %rax, 0x40(%rbp)
movq 0x10(%rbp), %r13
movq %r12, %rbp
shrq $0xc, %r13
addq %r13, %r14
movq %r15, %r12
cmpb $0x0, 0x20(%rsp)
jne 0x27a00
movq %r15, %r12
cmpq 0x38(%rsp), %r14
jb 0x27a00
leaq 0x8(%rbx), %rdi
movq %rdi, 0x38(%rsp)
callq 0x10440
movq 0x28(%rsp), %r14
leaq 0x28(%rsp), %rax
pxor %xmm2, %xmm2
cmpq %rax, %r14
je 0x27d00
movq 0xc8(%rsp), %rcx
leaq 0x33b18(%rip), %rdi     # 0x5b6a8
leaq 0x28(%rcx), %rax
cmpq %rax, %r14
je 0x27c49
movq %rcx, 0x20(%rsp)
movdqa %xmm2, 0x40(%rsp)
leaq 0x33b01(%rip), %rax     # 0x5b6b0
movq (%rax), %r12
leaq -0x10(%r14), %rax
andq %r12, %rax
notq %r12
subq 0x3399d(%rip), %rax     # 0x5b560
andq %r14, %r12
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
shrq $0x6, %rdx
movq 0x3397a(%rip), %r15     # 0x5b558
addq %rdx, %r15
movq 0x68(%r12,%rdx,8), %rbx
movq %rbx, %r13
shrq %r13
movabsq $0x7ffffffffffff000, %rax # imm = 0x7FFFFFFFFFFFF000
andq %rax, %r13
movq (%rdi), %rsi
movq %r15, %rbp
shlq $0xc, %rbp
movq 0x18(%rsp), %rax
movl (%rax), %r8d
movq %r12, %rdi
movq %rbp, %rdx
movq %r13, %rcx
callq *0x70(%rsp)
testb %al, %al
je 0x27c5a
leaq 0x33a85(%rip), %rax     # 0x5b6a8
movq (%rax), %rcx
movq 0x18(%rsp), %rdi
leaq 0x58(%rsp), %rsi
movq %r12, %rdx
movq %rbp, %r8
movq %r13, %r9
callq 0x2f06e
movzbl %al, %eax
shll $0x3, %eax
movq %rax, %rcx
jmp 0x27c61
movq 0x10(%rcx), %rbx
movq 0x38(%rcx), %rcx
shrq $0xc, %rbx
jmp 0x27cda
movl $0x4, %ecx
xorl %eax, %eax
shrq $0xd, %rbx
leaq (%r15,%rbx), %rdx
movq 0x338e8(%rip), %rsi     # 0x5b558
notq %rsi
addq %rdx, %rsi
orq $0x1fe3, %rcx           # imm = 0x1FE3
movq %rcx, 0x68(%r12,%rsi,8)
movq %r15, %rdx
subq 0x338cc(%rip), %rdx     # 0x5b558
addq %r13, %r13
orq %rcx, %r13
movq %r13, 0x68(%r12,%rdx,8)
leaq -0x1(%rbx), %rcx
cmpq $0x2, %rcx
leaq 0x33a02(%rip), %rdi     # 0x5b6a8
movdqa 0x40(%rsp), %xmm2
jb 0x27cd5
leaq -0x2(%rbx), %rcx
leaq (%r12,%r15,8), %rdx
addq $0x70, %rdx
movq 0x33897(%rip), %rsi     # 0x5b558
shlq $0x3, %rsi
negq %rsi
movq %rax, (%rdx,%rsi)
addq $0x8, %rdx
decq %rcx
jne 0x27cba
movq 0x20(%rsp), %rcx
movq %rbx, %xmm0
movdqa 0x206d9(%rip), %xmm1    # 0x483c0
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
paddq %xmm1, %xmm2
movq (%r14), %r14
leaq 0x28(%rsp), %rax
cmpq %rax, %r14
jne 0x27b90
movdqa %xmm2, 0x40(%rsp)
movq 0x38(%rsp), %rdi
callq 0x106d0
movq 0x18(%rsp), %rax
movdqu 0x40(%rax), %xmm0
paddq 0x40(%rsp), %xmm0
movdqu %xmm0, 0x40(%rax)
movq 0x28(%rsp), %rsi
leaq 0x28(%rsp), %rax
cmpq %rax, %rsi
je 0x27e45
movq 0xc8(%rsp), %r15
movq 0x18(%rsp), %r12
movq (%rsi), %rbx
leaq 0x28(%r15), %rax
cmpq %rax, %rsi
je 0x27dbf
leaq 0x33958(%rip), %rax     # 0x5b6b0
movq (%rax), %rcx
notq %rcx
leaq -0x10(%rsi), %rax
andq %rcx, %rax
addq 0x337f4(%rip), %rax     # 0x5b560
negq %rax
addq %rsi, %rax
addq $-0x10, %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
andq %rsi, %rcx
shrq $0x6, %rdx
movl 0x68(%rcx,%rdx,8), %r8d
andl $0x4, %r8d
shrl $0x2, %r8d
movq 0x8(%rsi), %rax
movq %rbx, (%rax)
movq (%rsi), %rcx
movq %rax, 0x8(%rcx)
movq %rsi, (%rsi)
movq %rsi, 0x8(%rsi)
movq 0x18(%rsp), %rdi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x2c9d8
jmp 0x27e34
movq 0x38(%r15), %r14
movq 0x8(%r15), %rcx
movq %rcx, 0x40(%rsp)
movq 0x10(%r15), %r13
movzbl 0x18(%r15), %ebp
movzbl 0x19(%r15), %ecx
movl %ecx, 0x20(%rsp)
movq 0x28(%r15), %rcx
movq 0x30(%r15), %rdx
movq %rcx, (%rdx)
movq %rdx, 0x8(%rcx)
movq %rax, 0x28(%r15)
movq %rax, 0x30(%r15)
movq 0x40(%r15), %rax
movq %r14, 0x38(%rax)
movq %rax, 0x40(%r14)
movq %r15, 0x38(%r15)
movq %r15, 0x40(%r15)
movq %r12, %rdi
movq %r15, %rsi
callq 0x2715e
movq %r12, %rdi
leaq 0x58(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq %r13, %rcx
movl %ebp, %r8d
movl 0x20(%rsp), %r9d
callq 0x2ef44
movq %r14, %r15
movq %rbx, %rsi
leaq 0x28(%rsp), %rax
cmpq %rax, %rbx
jne 0x27d45
movq 0x18(%rsp), %rax
movb $0x0, 0xd8(%rax)
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq