// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/arena.c
// Function: arena_avail_remove
static void
arena_avail_remove(arena_t *arena, arena_chunk_t *chunk, size_t pageind,
    size_t npages, bool maybe_adjac_pred, bool maybe_adjac_succ)
{

	assert(npages == (arena_mapbits_unallocated_size_get(chunk, pageind) >>
	    LG_PAGE));

	/*
	 * chunks_dirty is keyed by nruns_{avail,adjac}, so the chunk must be
	 * removed and reinserted even if the run to be removed is clean.
	 */
	if (chunk->ndirty != 0)
		arena_chunk_dirty_remove(&arena->chunks_dirty, chunk);

	if (maybe_adjac_pred && arena_avail_adjac_pred(chunk, pageind))
		chunk->nruns_adjac--;
	if (maybe_adjac_succ && arena_avail_adjac_succ(chunk, pageind, npages))
		chunk->nruns_adjac--;
	chunk->nruns_avail--;
	assert(chunk->nruns_avail > chunk->nruns_adjac || (chunk->nruns_avail
	    == 0 && chunk->nruns_adjac == 0));

	if (arena_mapbits_dirty_get(chunk, pageind) != 0) {
		arena->ndirty -= npages;
		chunk->ndirty -= npages;
	}
	if (chunk->ndirty != 0)
		arena_chunk_dirty_insert(&arena->chunks_dirty, chunk);

	arena_avail_tree_remove(&arena->runs_avail, arena_mapp_get(chunk,
	    pageind));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x808, %rsp            # imm = 0x808
movl %r9d, %ebp
movl %r8d, %r13d
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpq $0x0, 0x18(%rsi)
je 0x83ff2
leaq 0x90(%rbx), %rdi
movq %r15, %rsi
callq 0x838ea
testb %r13b, %r13b
je 0x84017
leaq -0x1(%r14), %rax
leaq 0x5b926(%rip), %rcx     # 0xdf928
subq (%rcx), %rax
jb 0x84017
leaq (%rax,%rax,2), %rax
testb $0x1, 0x40(%r15,%rax,8)
jne 0x84017
decq 0x28(%r15)
testb %bpl, %bpl
je 0x84046
leaq (%r12,%r14), %rax
leaq 0x5b861(%rip), %rcx     # 0xdf888
cmpq (%rcx), %rax
je 0x84046
leaq 0x5b8f5(%rip), %rcx     # 0xdf928
subq (%rcx), %rax
leaq (%rax,%rax,2), %rax
testb $0x1, 0x40(%r15,%rax,8)
jne 0x84046
decq 0x28(%r15)
decq 0x20(%r15)
leaq 0x5b8d7(%rip), %r13     # 0xdf928
movq %r14, %rax
subq (%r13), %rax
leaq (%rax,%rax,2), %rax
testb $0x8, 0x40(%r15,%rax,8)
je 0x8406f
subq %r12, 0xf0(%rbx)
subq %r12, 0x18(%r15)
leaq 0x30(%r15), %r12
cmpq $0x0, 0x18(%r15)
je 0x84089
leaq 0x90(%rbx), %rdi
movq %r15, %rsi
callq 0x83dfc
subq (%r13), %r14
leaq (%r14,%r14,2), %rax
leaq (%r12,%rax,8), %rdx
movq 0x100(%rbx), %r10
movq %r10, (%rsp)
leaq 0x108(%rbx), %rcx
cmpq %rcx, %r10
je 0x8416c
movq 0x10(%rdx), %rax
movq %rax, %rdi
andq $-0x1000, %rdi          # imm = 0xF000
xorl %esi, %esi
testb $0x1, %al
movl $0x0, %r8d
cmoveq %rdx, %r8
movq %rsp, %rax
movq $-0x1000, %r9           # imm = 0xF000
movq 0x10(%r10), %r14
andq %r9, %r14
xorl %r11d, %r11d
cmpq %r14, %rdi
seta %r11b
sbbl $0x0, %r11d
jne 0x840fb
xorl %r11d, %r11d
cmpq %r10, %r8
seta %r11b
sbbl $0x0, %r11d
movl %r11d, 0x8(%rax)
testl %r11d, %r11d
js 0x8414a
movq 0x8(%r10), %r14
andq $-0x2, %r14
movq %r14, 0x10(%rax)
movb $0x1, %bpl
testl %r11d, %r11d
jne 0x84154
leaq 0x10(%rax), %r10
movl $0x1, 0x8(%rax)
cmpq %r14, %rcx
je 0x84140
movl $0xffffffff, 0x8(%r10)  # imm = 0xFFFFFFFF
movq (%r14), %r14
movq %r14, 0x10(%r10)
addq $0x10, %r10
cmpq %rcx, %r14
jne 0x84128
xorl %ebp, %ebp
movq %rax, %rsi
movq %r10, %rax
jmp 0x84154
movq (%r10), %r10
movq %r10, 0x10(%rax)
movb $0x1, %bpl
testb %bpl, %bpl
je 0x84171
movq 0x10(%rax), %r10
addq $0x10, %rax
cmpq %rcx, %r10
jne 0x840d6
jmp 0x84171
movq %rsp, %rax
xorl %esi, %esi
leaq -0x10(%rax), %rdi
movq -0x10(%rax), %r9
cmpq %rdx, %r9
je 0x841fd
movq 0x8(%r9), %r10
movl %r10d, %r8d
andl $0x1, %r8d
andq $-0x2, %r10
movq 0x8(%rdx), %r11
andl $0x1, %r11d
orq %r10, %r11
movq %r11, 0x8(%r9)
movq (%rdx), %r9
movq (%rdi), %r10
movq %r9, (%r10)
movq 0x8(%rdx), %r9
andq $-0x2, %r9
movq (%rdi), %r10
movq 0x8(%r10), %r11
andl $0x1, %r11d
orq %r9, %r11
movq %r11, 0x8(%r10)
movq 0x8(%rdx), %r9
andq $-0x2, %r9
orq %r8, %r9
movq %r9, 0x8(%rdx)
movq (%rdi), %r8
movq %r8, (%rsi)
movq %rdx, (%rdi)
movq %rsp, %rdx
cmpq %rdx, %rsi
je 0x84232
cmpl $0x0, -0x8(%rsi)
movq (%rsi), %rdx
js 0x8423e
movq -0x10(%rsi), %rsi
movq 0x8(%rsi), %r8
andl $0x1, %r8d
orq %rdx, %r8
movq %r8, 0x8(%rsi)
jmp 0x84253
movq (%rdx), %rdx
cmpq %rcx, %rdx
je 0x84247
andb $-0x2, 0x8(%rdx)
movq %rsp, %rcx
cmpq %rcx, %rdi
je 0x84457
cmpl $0x0, -0x18(%rax)
js 0x84463
movq -0x20(%rax), %rax
movq 0x8(%rax), %rcx
andl $0x1, %ecx
orq %rdx, %rcx
jmp 0x8461f
movq (%rsi), %rdx
movq %rdx, 0x100(%rbx)
jmp 0x84253
movq -0x10(%rsi), %rsi
movq %rdx, (%rsi)
jmp 0x84253
movq %rsp, %rdx
cmpq %rdx, %rdi
je 0x8446f
movq (%rdi), %rdx
testb $0x1, 0x8(%rdx)
jne 0x8444b
movq %rcx, -0x10(%rax)
leaq -0x20(%rax), %rdx
movq %rsp, %rcx
cmpq %rcx, %rdx
jb 0x8443b
addq $-0x30, %rax
leaq 0x10(%rax), %rdx
cmpl $0x0, 0x18(%rax)
movq 0x20(%rax), %rsi
js 0x842d4
movq (%rdx), %rdi
movq 0x8(%rdi), %r8
andl $0x1, %r8d
orq %rsi, %r8
movq %r8, 0x8(%rdi)
movq (%rdx), %r9
movq (%r9), %r8
movq 0x8(%r8), %rdi
testb $0x1, %dil
jne 0x8447b
movq 0x8(%r9), %r11
movq (%r8), %r10
movq 0x8(%r10), %rsi
testb $0x1, %r11b
jne 0x844b1
testb $0x1, %sil
jne 0x8432e
orq $0x1, %rdi
movq %rdi, 0x8(%r8)
jmp 0x8440a
movq (%rdx), %rdi
movq %rsi, (%rdi)
movq (%rdx), %r8
movq 0x8(%r8), %rsi
addq $0x8, %r8
testb $0x1, %sil
jne 0x844d1
movq (%rsi), %r9
movq 0x8(%r9), %rdi
testb $0x1, %dil
jne 0x84383
orq $0x1, %rsi
movq %rsi, (%r8)
movq (%rdx), %rsi
movq 0x8(%rsi), %r8
movq %r8, %r9
andq $-0x2, %r9
andl $0x1, %r8d
orq (%r9), %r8
movq %r8, 0x8(%rsi)
movq (%rdx), %rsi
movq %rsi, (%r9)
movq %r9, (%rdx)
jmp 0x84421
movq %rsi, %rdi
andq $-0x2, %rdi
movq %rdi, 0x8(%r10)
movq (%rdx), %r8
movq (%r8), %rdi
movq 0x8(%rdi), %r9
andq $-0x2, %r9
movq %r9, (%r8)
movq 0x8(%rdi), %r8
andl $0x1, %r8d
orq (%rdx), %r8
movq %r8, 0x8(%rdi)
cmpq %rcx, %rdx
je 0x843fb
cmpl $0x0, 0x8(%rax)
js 0x84404
movq (%rax), %rdx
movq 0x8(%rdx), %r8
andl $0x1, %r8d
orq %rdi, %r8
movq %r8, 0x8(%rdx)
jmp 0x8440a
movq %rdi, %r8
andq $-0x2, %r8
movq %r8, 0x8(%r9)
movq (%rsi), %r8
movq 0x8(%r8), %r9
andq $-0x2, %r9
movq %r9, (%rsi)
movq 0x8(%r8), %r9
andl $0x1, %r9d
orq %rsi, %r9
movq %r9, 0x8(%r8)
movq (%rdx), %rsi
movq 0x8(%rsi), %r9
andl $0x1, %r9d
orq %r8, %r9
movq %r9, 0x8(%rsi)
movq (%rdx), %r8
movq 0x8(%r8), %r9
movq %r9, %rsi
andq $-0x2, %rsi
andl $0x1, %r9d
orq (%rsi), %r9
movq %r9, 0x8(%r8)
movq (%rdx), %r8
movq %r8, (%rsi)
cmpq %rcx, %rdx
je 0x84415
cmpl $0x0, 0x8(%rax)
movq (%rax), %rdx
js 0x8441e
movq 0x8(%rdx), %r8
andl $0x1, %r8d
orq %rsi, %r8
movq %r8, 0x8(%rdx)
jmp 0x84421
movq %rdi, 0x100(%rbx)
jmp 0x8440a
movq (%rax), %rdx
movq %rdi, (%rdx)
testb $0x1, %sil
je 0x8442b
jmp 0x84623
movq %rsi, 0x100(%rbx)
jmp 0x84421
movq %rsi, (%rdx)
testb $0x1, %dil
jne 0x84623
leaq -0x10(%rax), %rdx
cmpq %rcx, %rax
movq %rdx, %rax
jae 0x84278
movq (%rsp), %rax
movq %rax, 0x100(%rbx)
jmp 0x84623
movq -0x20(%rax), %rax
movq %rcx, (%rax)
jmp 0x84623
movq %rdx, 0x100(%rbx)
jmp 0x84623
movq -0x20(%rax), %rax
movq %rdx, (%rax)
jmp 0x84623
movq %rcx, 0x100(%rbx)
jmp 0x84623
andq $-0x2, %rdi
movq (%rdi), %rsi
movq 0x8(%rsi), %r8
testb $0x1, %r8b
jne 0x844eb
orb $0x1, 0x8(%rdi)
movq (%rdx), %rdi
movq (%rdi), %rsi
movq 0x8(%rsi), %r8
andq $-0x2, %r8
movq %r8, (%rdi)
movq (%rdx), %rdi
andq $-0x2, %rdi
movq %rdi, 0x8(%rsi)
jmp 0x84553
testb $0x1, %sil
jne 0x84568
orq $0x1, %rdi
movq %rdi, 0x8(%r8)
movq 0x10(%rax), %rax
andq $-0x2, 0x8(%rax)
jmp 0x84623
andq $-0x2, %rsi
movq (%rsi), %rcx
testb $0x1, 0x8(%rcx)
jne 0x845b8
orq $0x1, %rcx
jmp 0x84602
andq $-0x2, %r8
movq %r8, 0x8(%rsi)
movq (%rdx), %rsi
movq (%rsi), %rdi
movq 0x8(%rdi), %r8
andq $-0x2, %r8
movq %r8, (%rsi)
movq 0x8(%rdi), %rsi
andl $0x1, %esi
orq (%rdx), %rsi
movq %rsi, 0x8(%rdi)
movq (%rdx), %r8
movq (%r8), %rsi
movq 0x8(%rsi), %r9
andq $-0x2, %r9
movq %r9, (%r8)
movq 0x8(%rsi), %r8
andl $0x1, %r8d
orq (%rdx), %r8
movq %r8, 0x8(%rsi)
movq 0x8(%rdi), %r8
andl $0x1, %r8d
orq %rsi, %r8
movq %r8, 0x8(%rdi)
andq $-0x2, %rsi
andl $0x1, %r8d
orq (%rsi), %r8
movq %r8, 0x8(%rdi)
movq %rdi, (%rsi)
cmpq %rcx, %rdx
jne 0x8460c
movq %rsi, 0x100(%rbx)
jmp 0x84623
andq $-0x2, %r11
movq %r11, 0x8(%r9)
orb $0x1, 0x8(%r8)
andb $-0x2, 0x8(%r10)
movq 0x10(%rax), %rdx
movq (%rdx), %rcx
movq 0x8(%rcx), %rsi
andq $-0x2, %rsi
movq %rsi, (%rdx)
movq 0x8(%rcx), %rdx
andl $0x1, %edx
orq 0x10(%rax), %rdx
movq %rdx, 0x8(%rcx)
cmpl $0x0, 0x8(%rax)
js 0x8463d
movq (%rax), %rax
movq 0x8(%rax), %rdx
andl $0x1, %edx
orq %rcx, %rdx
movq %rdx, 0x8(%rax)
jmp 0x84623
movq %rsi, (%r8)
movq (%rsi), %rcx
movq 0x8(%rcx), %rdx
andq $-0x2, %rdx
movq %rdx, (%rsi)
movq 0x8(%rcx), %rdx
andl $0x1, %edx
orq %rsi, %rdx
movq %rdx, 0x8(%rcx)
movq 0x10(%rax), %rdx
movq 0x8(%rdx), %rsi
andl $0x1, %esi
orq %rcx, %rsi
movq %rsi, 0x8(%rdx)
movq 0x10(%rax), %r8
movq 0x8(%r8), %rcx
addq $0x8, %r8
movq %rcx, %rsi
andq $-0x2, %rsi
andl $0x1, %ecx
orq (%rsi), %rcx
movq %rcx, (%r8)
movq 0x10(%rax), %rcx
movq %rcx, (%rsi)
cmpl $0x0, 0x8(%rax)
js 0x84635
movq (%rax), %rax
movq 0x8(%rax), %rcx
andl $0x1, %ecx
orq %rsi, %rcx
movq %rcx, 0x8(%rax)
addq $0x808, %rsp            # imm = 0x808
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rax), %rax
movq %rsi, (%rax)
jmp 0x84623
movq (%rax), %rax
jmp 0x8444f