// File: /workspace/github_c_makefile_star2_O2/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, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
cmpq $0x0, 0x18(%rsi)
je 0x7b671
leaq 0x90(%rbx), %rdi
movq %r12, %rsi
callq 0x7afc3
testb %r13b, %r13b
je 0x7b697
leaq -0x1(%r15), %rax
leaq 0x612a7(%rip), %rcx     # 0xdc928
subq (%rcx), %rax
jb 0x7b697
imulq $0x18, %rax, %rax
testb $0x1, 0x40(%r12,%rax)
jne 0x7b697
decq 0x28(%r12)
testb %bpl, %bpl
je 0x7b6cc
leaq (%r14,%r15), %rax
leaq 0x611e1(%rip), %rdx     # 0xdc888
leaq 0x6127a(%rip), %rcx     # 0xdc928
movq (%rcx), %rcx
cmpq (%rdx), %rax
je 0x7b6d6
subq %rcx, %rax
imulq $0x18, %rax, %rax
testb $0x1, 0x40(%r12,%rax)
jne 0x7b6d6
decq 0x28(%r12)
jmp 0x7b6d6
leaq 0x61255(%rip), %rax     # 0xdc928
movq (%rax), %rcx
decq 0x20(%r12)
movq %r15, %rax
subq %rcx, %rax
imulq $0x18, %rax, %rcx
testb $0x8, 0x40(%r12,%rcx)
jne 0x7b6f4
movq 0x18(%r12), %rcx
jmp 0x7b708
subq %r14, 0xf0(%rbx)
movq 0x18(%r12), %rcx
subq %r14, %rcx
movq %rcx, 0x18(%r12)
leaq 0x30(%r12), %r14
testq %rcx, %rcx
je 0x7b72e
leaq 0x90(%rbx), %rdi
movq %r12, %rsi
callq 0x7b448
leaq 0x61200(%rip), %rax     # 0xdc928
subq (%rax), %r15
movq %r15, %rax
imulq $0x18, %rax, %rax
addq %rax, %r14
movq 0x100(%rbx), %r15
leaq 0x10(%rsp), %r12
movq %r15, -0x10(%r12)
leaq 0x108(%rbx), %r13
cmpq %r13, %r15
je 0x7b788
movq %r14, %rdi
movq %r15, %rsi
callq 0x7b600
movl %eax, -0x8(%r12)
testl %eax, %eax
js 0x7b77b
movq 0x8(%r15), %r15
andq $-0x2, %r15
movq %r15, (%r12)
testl %eax, %eax
jne 0x7b782
jmp 0x7b828
movq (%r15), %r15
movq %r15, (%r12)
addq $0x10, %r12
jmp 0x7b74d
addq $-0x10, %r12
xorl %ecx, %ecx
leaq -0x10(%r12), %rax
movq -0x10(%r12), %rsi
cmpq %r14, %rsi
je 0x7b853
movq 0x8(%rsi), %rdi
movl %edi, %edx
andl $0x1, %edx
andq $-0x2, %rdi
movq 0x8(%r14), %r8
andl $0x1, %r8d
orq %rdi, %r8
movq %r8, 0x8(%rsi)
movq (%r14), %rsi
movq (%rax), %rdi
movq %rsi, (%rdi)
movq 0x8(%r14), %rsi
andq $-0x2, %rsi
movq (%rax), %rdi
movq 0x8(%rdi), %r8
andl $0x1, %r8d
orq %rsi, %r8
movq %r8, 0x8(%rdi)
movq 0x8(%r14), %rsi
andq $-0x2, %rsi
orq %rdx, %rsi
movq %rsi, 0x8(%r14)
movq (%rax), %rdx
movq %rdx, (%rcx)
movq %r14, (%rax)
movq %rsp, %rdx
cmpq %rdx, %rcx
je 0x7b88f
cmpl $0x0, -0x8(%rcx)
movq (%rcx), %rdx
js 0x7b89b
movq -0x10(%rcx), %rcx
movq 0x8(%rcx), %rsi
andl $0x1, %esi
orq %rdx, %rsi
movq %rsi, 0x8(%rcx)
jmp 0x7b8b0
movl $0x1, -0x8(%r12)
leaq -0x10(%r12), %rcx
cmpq %r13, %r15
je 0x7b78e
orl $-0x1, 0x8(%r12)
movq (%r15), %r15
movq %r15, 0x10(%r12)
addq $0x10, %r12
jmp 0x7b836
movq (%r14), %rcx
cmpq %r13, %rcx
je 0x7b8a4
andb $-0x2, 0x8(%rcx)
movq %rsp, %rdx
cmpq %rdx, %rax
je 0x7b9aa
cmpl $0x0, -0x18(%r12)
js 0x7ba3a
movq -0x20(%r12), %rax
movq 0x8(%rax), %rdx
andl $0x1, %edx
orq %rcx, %rdx
movq %rdx, 0x8(%rax)
jmp 0x7bc2c
movq (%rcx), %rcx
movq %rcx, 0x100(%rbx)
jmp 0x7b8b0
movq -0x10(%rcx), %rcx
movq %rdx, (%rcx)
jmp 0x7b8b0
movq %rsp, %rcx
cmpq %rcx, %rax
je 0x7ba47
movq (%rax), %rax
testb $0x1, 0x8(%rax)
jne 0x7b98d
movq %r13, -0x10(%r12)
addq $-0x30, %r12
movq %rsp, %rax
leaq 0x10(%r12), %rcx
cmpq %rax, %rcx
jb 0x7b99a
cmpl $0x0, 0x18(%r12)
movq 0x20(%r12), %rdx
js 0x7b931
movq (%rcx), %rsi
movq 0x8(%rsi), %rdi
andl $0x1, %edi
orq %rdx, %rdi
movq %rdi, 0x8(%rsi)
movq (%rcx), %rdi
movq (%rdi), %rsi
movq 0x8(%rsi), %rdx
testb $0x1, %dl
jne 0x7b9b6
movq 0x8(%rdi), %r9
movq (%rsi), %r8
movq 0x8(%r8), %r10
testb $0x1, %r9b
jne 0x7b9e9
testb $0x1, %r10b
jne 0x7ba0a
orq $0x1, %rdx
movq %rdx, 0x8(%rsi)
jmp 0x7b984
movq (%rcx), %rsi
movq %rdx, (%rsi)
movq (%rcx), %rsi
movq 0x8(%rsi), %rdx
addq $0x8, %rsi
testb $0x1, %dl
jne 0x7ba53
movq (%rdx), %rdi
movq 0x8(%rdi), %r8
testb $0x1, %r8b
jne 0x7ba6d
orq $0x1, %rdx
movq %rdx, (%rsi)
movq (%rcx), %rdx
movq 0x8(%rdx), %rsi
movq %rsi, %rdi
andq $-0x2, %rdi
andl $0x1, %esi
orq (%rdi), %rsi
movq %rsi, 0x8(%rdx)
movq (%rcx), %rdx
movq %rdx, (%rdi)
movq %rdi, (%rcx)
addq $-0x10, %r12
jmp 0x7b8c9
movq -0x20(%r12), %rax
movq %r13, (%rax)
jmp 0x7bc2c
movq (%rsp), %rax
movq %rax, 0x100(%rbx)
jmp 0x7bc2c
movq %rcx, 0x100(%rbx)
jmp 0x7bc2c
andq $-0x2, %rdx
movq (%rdx), %rsi
movq 0x8(%rsi), %rdi
testb $0x1, %dil
jne 0x7bae4
orb $0x1, 0x8(%rdx)
movq (%rcx), %rsi
movq (%rsi), %rdx
movq 0x8(%rdx), %rdi
andq $-0x2, %rdi
movq %rdi, (%rsi)
movq (%rcx), %rsi
andq $-0x2, %rsi
jmp 0x7ba31
testb $0x1, %r10b
jne 0x7bb5e
orq $0x1, %rdx
movq %rdx, 0x8(%rsi)
movq 0x10(%r12), %rax
andq $-0x2, 0x8(%rax)
jmp 0x7bc2c
andq $-0x2, %r10
movq %r10, 0x8(%r8)
movq 0x10(%r12), %rsi
movq (%rsi), %rdx
movq 0x8(%rdx), %rdi
andq $-0x2, %rdi
movq %rdi, (%rsi)
movq 0x8(%rdx), %rsi
andl $0x1, %esi
orq 0x10(%r12), %rsi
movq %rsi, 0x8(%rdx)
jmp 0x7bb49
movq -0x20(%r12), %rax
movq %rcx, (%rax)
jmp 0x7bc2c
movq %r13, 0x100(%rbx)
jmp 0x7bc2c
andq $-0x2, %rdx
movq (%rdx), %rax
testb $0x1, 0x8(%rax)
jne 0x7bbb2
orq $0x1, %rax
jmp 0x7bbfe
andq $-0x2, %r8
movq %r8, 0x8(%rdi)
movq (%rdx), %rsi
movq 0x8(%rsi), %rdi
andq $-0x2, %rdi
movq %rdi, (%rdx)
movq 0x8(%rsi), %rdi
andl $0x1, %edi
orq %rdx, %rdi
movq %rdi, 0x8(%rsi)
movq 0x10(%r12), %rdx
movq 0x8(%rdx), %rdi
andl $0x1, %edi
orq %rsi, %rdi
movq %rdi, 0x8(%rdx)
movq 0x10(%r12), %rsi
movq 0x8(%rsi), %rdi
movq %rdi, %rdx
andq $-0x2, %rdx
andl $0x1, %edi
orq (%rdx), %rdi
movq %rdi, 0x8(%rsi)
movq 0x10(%r12), %rsi
movq %rsi, (%rdx)
cmpq %rax, %rcx
je 0x7bb52
cmpl $0x0, 0x8(%r12)
movq (%r12), %rax
jns 0x7bc15
jmp 0x7bc29
andq $-0x2, %rdi
movq %rdi, 0x8(%rsi)
movq (%rcx), %rdx
movq (%rdx), %rsi
movq 0x8(%rsi), %rdi
andq $-0x2, %rdi
movq %rdi, (%rdx)
movq 0x8(%rsi), %rdx
andl $0x1, %edx
orq (%rcx), %rdx
movq %rdx, 0x8(%rsi)
movq (%rcx), %rdi
movq (%rdi), %rdx
movq 0x8(%rdx), %r8
andq $-0x2, %r8
movq %r8, (%rdi)
movq 0x8(%rdx), %rdi
andl $0x1, %edi
orq (%rcx), %rdi
movq %rdi, 0x8(%rdx)
movq 0x8(%rsi), %rdi
andl $0x1, %edi
orq %rdx, %rdi
movq %rdi, 0x8(%rsi)
andq $-0x2, %rdx
andl $0x1, %edi
orq (%rdx), %rdi
movq %rdi, 0x8(%rsi)
movq %rsi, (%rdx)
cmpq %rax, %rcx
jne 0x7bc09
movq %rdx, 0x100(%rbx)
jmp 0x7bc2c
andq $-0x2, %r9
movq %r9, 0x8(%rdi)
orb $0x1, 0x8(%rsi)
andb $-0x2, 0x8(%r8)
movq 0x10(%r12), %rcx
movq (%rcx), %rax
movq 0x8(%rax), %rdx
andq $-0x2, %rdx
movq %rdx, (%rcx)
movq 0x8(%rax), %rcx
andl $0x1, %ecx
orq 0x10(%r12), %rcx
movq %rcx, 0x8(%rax)
cmpl $0x0, 0x8(%r12)
js 0x7bc3e
movq (%r12), %rcx
movq 0x8(%rcx), %rdx
andl $0x1, %edx
orq %rax, %rdx
movq %rdx, 0x8(%rcx)
jmp 0x7bc2c
movq %rdx, (%rsi)
movq (%rdx), %rax
movq 0x8(%rax), %rcx
andq $-0x2, %rcx
movq %rcx, (%rdx)
movq 0x8(%rax), %rcx
andl $0x1, %ecx
orq %rdx, %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%r12), %rcx
movq 0x8(%rcx), %rdx
andl $0x1, %edx
orq %rax, %rdx
movq %rdx, 0x8(%rcx)
movq 0x10(%r12), %rsi
movq 0x8(%rsi), %rax
addq $0x8, %rsi
movq %rax, %rdx
andq $-0x2, %rdx
andl $0x1, %eax
orq (%rdx), %rax
movq %rax, (%rsi)
movq 0x10(%r12), %rax
movq %rax, (%rdx)
cmpl $0x0, 0x8(%r12)
js 0x7bc25
movq (%r12), %rax
movq 0x8(%rax), %rcx
andl $0x1, %ecx
orq %rdx, %rcx
movq %rcx, 0x8(%rax)
jmp 0x7bc2c
movq (%r12), %rax
movq %rdx, (%rax)
addq $0x808, %rsp            # imm = 0x808
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r12), %rcx
movq %rax, (%rcx)
jmp 0x7bc2c