// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: jx9HashmapUnlinkNode
static void jx9HashmapUnlinkNode(jx9_hashmap_node *pNode)
{
	jx9_hashmap *pMap = pNode->pMap;
	jx9_vm *pVm = pMap->pVm;
	/* Unlink from the corresponding bucket */
	if( pNode->pPrevCollide == 0 ){
		pMap->apBucket[pNode->nHash & (pMap->nSize - 1)] = pNode->pNextCollide;
	}else{
		pNode->pPrevCollide->pNextCollide = pNode->pNextCollide;
	}
	if( pNode->pNextCollide ){
		pNode->pNextCollide->pPrevCollide = pNode->pPrevCollide;
	}
	if( pMap->pFirst == pNode ){
		pMap->pFirst = pNode->pPrev;
	}
	if( pMap->pCur == pNode ){
		/* Advance the node cursor */
		pMap->pCur = pMap->pCur->pPrev; /* Reverse link */
	}
	/* Unlink from the map list */
	MACRO_LD_REMOVE(pMap->pLast, pNode);
	/* Restore to the free list */
	jx9VmUnsetMemObj(pVm, pNode->nValIdx);	
	if( pNode->iType == HASHMAP_BLOB_NODE ){
		SyBlobRelease(&pNode->xKey.sKey);
	}
	SyMemBackendPoolFree(&pVm->sAllocator, pNode);
	pMap->nEntry--;
	if( pMap->nEntry < 1 ){
		/* Free the hash-bucket */
		SyMemBackendFree(&pVm->sAllocator, pMap->apBucket);
		pMap->apBucket = 0;
		pMap->nSize = 0;
		pMap->pFirst = pMap->pLast = pMap->pCur = 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
jne 0xa0278
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x34(%rcx), %ecx
movq -0x10(%rbp), %rsi
movl 0x28(%rsi), %esi
subl $0x1, %esi
andl %esi, %ecx
movl %ecx, %ecx
movq %rdx, (%rax,%rcx,8)
jmp 0xa028c
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rcx, 0x50(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0xa02ab
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq %rcx, 0x58(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0xa02c9
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0xa02eb
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x48(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0xa030d
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x40(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0xa032c
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0xa034b
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rcx, 0x48(%rax)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x38(%rax), %esi
callq 0x6ec10
movq -0x8(%rbp), %rax
cmpl $0x2, 0x8(%rax)
jne 0xa0372
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
callq 0x58c00
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x54490
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x2c(%rax)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x2c(%rax)
jae 0xa03e2
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x5d6b0
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)