LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhCursorSeek
static int lhCursorSeek(unqlite_kv_cursor *pCursor,const void *pKey,int nByte,int iPos)
{
	lhash_kv_cursor *pCur = (lhash_kv_cursor *)pCursor;
	int rc;
	/* Perform a lookup */
	rc = lhRecordLookup((lhash_kv_engine *)pCur->pStore,pKey,nByte,&pCur->pCell);
	if( rc != UNQLITE_OK ){
		SXUNUSED(iPos);
		pCur->pCell = 0;
		pCur->iState = L_HASH_CURSOR_STATE_DONE;
		return rc;
	}
	pCur->iState = L_HASH_CURSOR_STATE_CELL;
	return UNQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %r13
movq (%r13), %rax
movq (%rax), %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq *0x10(%rax)
testl %eax, %eax
je 0x2f2bf
movl %eax, %r12d
andq $0x0, 0x10(%rbx)
pushq $0x3
popq %rax
movl %eax, 0x8(%rbx)
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movl %r14d, -0x2c(%rbp)
movl %r14d, %esi
callq *0xc0(%r13)
movl %eax, %r14d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl 0x130(%r13), %ecx
addl %eax, %ecx
andl %r14d, %ecx
movq 0x128(%r13), %rsi
movq 0x120(%r13), %rdx
addq %rsi, %rdx
addl %eax, %esi
andl %r14d, %esi
cmpq %rdx, %rcx
cmovbq %rcx, %rsi
movq %r13, %rdi
callq 0x30610
pushq $-0x6
popq %r12
testq %rax, %rax
je 0x2f2a2
movq 0x8(%rax), %rsi
leaq -0x38(%rbp), %rcx
movq %r13, %rdi
xorl %edx, %edx
callq 0x30b50
testl %eax, %eax
jne 0x2f29f
movq -0x38(%rbp), %rdi
movq %r15, %rsi
movl -0x2c(%rbp), %edx
movl %r14d, %ecx
callq 0x30ddc
testq %rax, %rax
je 0x2f2a2
movq %rax, 0x10(%rbx)
xorl %r12d, %r12d
pushq $0x2
jmp 0x2f2a9
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhCursorFirst
static int lhCursorFirst(unqlite_kv_cursor *pCursor)
{
	lhash_kv_cursor *pCur = (lhash_kv_cursor *)pCursor;
	lhash_kv_engine *pEngine = (lhash_kv_engine *)pCursor->pStore;
	int rc;
	if( pCur->is_first ){
		/* Read the database header first */
		rc = pEngine->pIo->xGet(pEngine->pIo->pHandle,1,0);
		if( rc != UNQLITE_OK ){
			return rc;
		}
		pCur->is_first = 0;
	}
	/* Point to the first map record */
	pCur->pRec = pEngine->pFirst;
	/* Load the cells */
	rc = lhCursorNextPage(pCur);
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
cmpl $0x0, 0xc(%rdi)
je 0x2f383
movq (%r14), %rax
movq (%rax), %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq *0x10(%rax)
testl %eax, %eax
je 0x2f37f
popq %rbx
popq %r14
popq %rbp
retq
andl $0x0, 0xc(%rbx)
movq 0xf0(%r14), %rax
movq %rax, 0x20(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x31eb3
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhCursorLast
static int lhCursorLast(unqlite_kv_cursor *pCursor)
{
	lhash_kv_cursor *pCur = (lhash_kv_cursor *)pCursor;
	lhash_kv_engine *pEngine = (lhash_kv_engine *)pCursor->pStore;
	int rc;
	if( pCur->is_first ){
		/* Read the database header first */
		rc = pEngine->pIo->xGet(pEngine->pIo->pHandle,1,0);
		if( rc != UNQLITE_OK ){
			return rc;
		}
		pCur->is_first = 0;
	}
	/* Point to the last map record */
	pCur->pRec = pEngine->pList;
	/* Load the cells */
	rc = lhCursorPrevPage(pCur);
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
cmpl $0x0, 0xc(%rdi)
je 0x2f3c8
movq (%r14), %rax
movq (%rax), %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq *0x10(%rax)
testl %eax, %eax
je 0x2f3c4
popq %rbx
popq %r14
popq %rbp
retq
andl $0x0, 0xc(%rbx)
movq 0xe8(%r14), %rax
movq %rax, 0x20(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x31f4f
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhCursorDelete
static int lhCursorDelete(unqlite_kv_cursor *pCursor)
{
	lhash_kv_cursor *pCur = (lhash_kv_cursor *)pCursor;
	lhcell *pCell;
	int rc;
	if( pCur->iState != L_HASH_CURSOR_STATE_CELL || pCur->pCell == 0 ){
		/* Invalid state */
		return UNQLITE_INVALID;
	}
	/* Point to the target cell  */
	pCell = pCur->pCell;
	/* Point to the next entry */
	pCur->pCell = pCell->pNext;
	/* Perform the deletion */
	rc = lhRecordRemove(pCell);
	return rc;
}

// Assembly:
pushq $-0x9
popq %rax
cmpl $0x2, 0x8(%rdi)
jne 0x2f4ed
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x10(%rdi), %rbx
testq %rbx, %rbx
je 0x2f4df
movq 0x60(%rbx), %rax
movq %rax, 0x10(%rdi)
movq 0x18(%rbx), %rsi
testq %rsi, %rsi
je 0x2f4d7
movq 0x20(%rbx), %rax
movq (%rax), %r14
leaq -0x38(%rbp), %r15
movq %rsi, (%r15)
leaq -0x30(%rbp), %r12
movq (%r14), %rax
movq (%rax), %rdi
movq %r12, %rdx
callq *0x10(%rax)
testl %eax, %eax
jne 0x2f4df
movq -0x30(%rbp), %r13
movq (%r13), %rdi
movq %r15, %rsi
callq 0x2f685
movq %r14, %rdi
movq %r13, %rsi
callq 0x31e54
testl %eax, %eax
jne 0x2f4df
movq (%r14), %rax
movq -0x30(%rbp), %rdi
callq *0x50(%rax)
movq -0x38(%rbp), %rsi
testq %rsi, %rsi
jne 0x2f495
movq %rbx, %rdi
callq 0x31c8a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhCursorKey
static int lhCursorKey(unqlite_kv_cursor *pCursor,int (*xConsumer)(const void *,unsigned int,void *),void *pUserData)
{
	lhash_kv_cursor *pCur = (lhash_kv_cursor *)pCursor;
	lhcell *pCell;
	int rc;
	if( pCur->iState != L_HASH_CURSOR_STATE_CELL || pCur->pCell == 0 ){
		/* Invalid state */
		return UNQLITE_INVALID;
	}
	/* Point to the target cell */
	pCell = pCur->pCell;
	if( SyBlobLength(&pCell->sKey) > 0 ){
		/* Consume the key directly */
		rc = xConsumer(SyBlobData(&pCell->sKey),SyBlobLength(&pCell->sKey),pUserData);
	}else{
		/* Very large key */
		rc = lhConsumeCellkey(pCell,xConsumer,pUserData,0);
	}
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x2, 0x8(%rdi)
jne 0x2f533
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x2f533
movq %rsi, %rax
movl 0x50(%rdi), %esi
testl %esi, %esi
je 0x2f53a
movq 0x48(%rdi), %rdi
popq %rbp
jmpq *%rax
movl $0xfffffff7, %eax       # imm = 0xFFFFFFF7
popq %rbp
retq
movq %rax, %rsi
xorl %ecx, %ecx
popq %rbp
jmp 0x31968
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhash_bin_hash
static sxu32 lhash_bin_hash(const void *pSrc,sxu32 nLen)
{
	register unsigned char *zIn = (unsigned char *)pSrc;
	unsigned char *zEnd;
	sxu32 nH = 5381;
	if( nLen > 2048 /* 2K */ ){
		nLen = 2048;
	}
	zEnd = &zIn[nLen];
	for(;;){
		if( zIn >= zEnd ){ break; } nH = nH * 33 + zIn[0] ; zIn++;
		if( zIn >= zEnd ){ break; } nH = nH * 33 + zIn[0] ; zIn++;
		if( zIn >= zEnd ){ break; } nH = nH * 33 + zIn[0] ; zIn++;
		if( zIn >= zEnd ){ break; } nH = nH * 33 + zIn[0] ; zIn++;
	}	
	return nH;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x800, %ecx            # imm = 0x800
cmpl %ecx, %esi
cmovbl %esi, %ecx
addq %rdi, %rcx
movl $0x1505, %eax           # imm = 0x1505
cmpq %rcx, %rdi
jae 0x2f5ea
imull $0x21, %eax, %edx
movzbl (%rdi), %eax
addl %edx, %eax
incq %rdi
cmpq %rcx, %rdi
jae 0x2f5ea
imull $0x21, %eax, %edx
movzbl (%rdi), %eax
addl %edx, %eax
incq %rdi
cmpq %rcx, %rdi
jae 0x2f5ea
imull $0x21, %eax, %edx
movzbl (%rdi), %eax
addl %edx, %eax
incq %rdi
cmpq %rcx, %rdi
jae 0x2f5ea
imull $0x21, %eax, %edx
movzbl (%rdi), %eax
addl %edx, %eax
incq %rdi
jmp 0x2f5a8
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhash_page_release
static void lhash_page_release(void *pUserData)
{
	lhpage *pPage = (lhpage *)pUserData;
	lhash_kv_engine *pEngine = pPage->pHash;
	lhcell *pNext,*pCell = pPage->pList;
	unqlite_page *pRaw = pPage->pRaw;
	sxu32 n;
	/* Drop in-memory cells */
	for( n = 0 ; n < pPage->nCell ; ++n ){
		pNext = pCell->pNext;
		SyBlobRelease(&pCell->sKey);
		/* Release the cell instance */
		SyMemBackendPoolFree(&pEngine->sAllocator,(void *)pCell);
		/* Point to the next entry */
		pCell = pNext;
	}
	if( pPage->apCell ){
		/* Release the cell table */
		SyMemBackendFree(&pEngine->sAllocator,(void *)pPage->apCell);
	}
	/* Finally, release the whole page */
	SyMemBackendPoolFree(&pEngine->sAllocator,pPage);
	pRaw->pUserData = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %r15
movq (%rdi), %r14
movq 0x8(%rdi), %rax
movq %rax, -0x30(%rbp)
addq $0x8, %r14
xorl %r13d, %r13d
cmpl 0x38(%rbx), %r13d
jae 0x2f639
movq 0x60(%r15), %r12
leaq 0x40(%r15), %rdi
callq 0x2a72f
movq %r14, %rdi
movq %r15, %rsi
callq 0x27bf8
incl %r13d
movq %r12, %r15
jmp 0x2f613
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0x2f64a
movq %r14, %rdi
callq 0x2d420
movq %r14, %rdi
movq %rbx, %rsi
callq 0x27bf8
movq -0x30(%rbp), %rax
andq $0x0, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhMapLoadPage
static int lhMapLoadPage(lhash_kv_engine *pEngine,lhash_bmap_page *pMap,const unsigned char *zRaw)
{
	const unsigned char *zEnd = &zRaw[pEngine->iPageSize];
	const unsigned char *zPtr = zRaw;
	pgno iLogic,iReal;
	sxu32 n;
	int rc;
	if( pMap->iPtr == 0 ){
		/* Read the map header */
		SyBigEndianUnpack64(zRaw,&pMap->iNext);
		zRaw += 8;
		SyBigEndianUnpack32(zRaw,&pMap->nRec);
		zRaw += 4;
	}else{
		/* Mostly page one of the database */
		zRaw += pMap->iPtr;
	}
	/* Start processing */
	for( n = 0; n < pMap->nRec ; ++n ){
		if( zRaw >= zEnd ){
			break;
		}
		/* Extract the logical and real bucket number */
		SyBigEndianUnpack64(zRaw,&iLogic);
		zRaw += 8;
		SyBigEndianUnpack64(zRaw,&iReal);
		zRaw += 8;
		/* Install the record in the map */
		rc = lhMapInstallBucket(pEngine,iLogic,iReal);
		if( rc != UNQLITE_OK ){
			return rc;
		}
	}
	pMap->iPtr = (sxu16)(zRaw-zPtr);
	/* All done */
	return UNQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, -0x38(%rbp)
movslq 0x110(%rdi), %r12
movzwl 0x8(%rsi), %r15d
testq %r15, %r15
movq %rdx, -0x30(%rbp)
jne 0x2f6e6
leaq 0x10(%rbx), %rsi
movq %rdx, %rdi
callq 0x2f685
movq -0x30(%rbp), %rax
leaq 0x8(%rax), %rdi
leaq 0xc(%rbx), %rsi
callq 0x2f679
movq -0x30(%rbp), %rdx
pushq $0xc
popq %r15
addq %rdx, %r12
xorl %r14d, %r14d
cmpl 0xc(%rbx), %r14d
jae 0x2f739
leaq (%rdx,%r15), %r13
cmpq %r12, %r13
jae 0x2f739
movq %r13, %rdi
leaq -0x48(%rbp), %rsi
callq 0x2f685
addq $0x8, %r13
movq %r13, %rdi
leaq -0x40(%rbp), %rsi
callq 0x2f685
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rdi
callq 0x2f754
testl %eax, %eax
jne 0x2f742
incl %r14d
addq $0x10, %r15
movq -0x30(%rbp), %rdx
jmp 0x2f6ec
movw %r15w, 0x8(%rbx)
xorl %eax, %eax
jmp 0x2f745
pushq $-0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhMapFindBucket
static lhash_bmap_rec * lhMapFindBucket(lhash_kv_engine *pEngine,pgno iLogic)
{
	lhash_bmap_rec *pRec;
	if( pEngine->nBuckRec < 1 ){
		/* Don't bother */
		return 0;
	}
	pRec = pEngine->apMap[iLogic & (pEngine->nBuckSize - 1)];
	for(;;){
		if( pRec == 0 ){
			break;
		}
		if( pRec->iLogic == iLogic ){
			return pRec;
		}
		/* Point to the next entry */
		pRec = pRec->pNextCol;
	}
	/* No such record */
	return 0;
}

// Assembly:
cmpl $0x0, 0xe0(%rdi)
je 0x30647
pushq %rbp
movq %rsp, %rbp
movl 0xe4(%rdi), %ecx
decl %ecx
movl %esi, %eax
andl %ecx, %eax
shlq $0x3, %rax
addq 0xd8(%rdi), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x3064a
cmpq %rsi, (%rax)
je 0x3064c
addq $0x20, %rax
jmp 0x30634
xorl %eax, %eax
retq
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhAcquirePage
static int lhAcquirePage(lhash_kv_engine *pEngine,unqlite_page **ppOut)
{
	unqlite_page *pPage;
	int rc;
	if( pEngine->nFreeList != 0 ){
		/* Acquire one from the free list */
		rc = pEngine->pIo->xGet(pEngine->pIo->pHandle,pEngine->nFreeList,&pPage);
		if( rc == UNQLITE_OK ){
			/* Point to the next free page */
			SyBigEndianUnpack64(pPage->zData,&pEngine->nFreeList);
			/* Update the database header */
			rc = pEngine->pIo->xWrite(pEngine->pHeader);
			if( rc != UNQLITE_OK ){
				return rc;
			}
			SyBigEndianPack64(&pEngine->pHeader->zData[4/*Magic*/+4/*Hash*/],pEngine->nFreeList);
			/* Tell the pager do not journal this page */
			pEngine->pIo->xDontJournal(pPage);
			/* Return to the caller */
			*ppOut = pPage;
			/* All done */
			return UNQLITE_OK;
		}
	}
	/* Acquire a new page */
	rc = pEngine->pIo->xNew(pEngine->pIo->pHandle,&pPage);
	if( rc != UNQLITE_OK ){
		return rc;
	}
	/* Point to the target page */
	*ppOut = pPage;
	return UNQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x118(%rdi), %rsi
testq %rsi, %rsi
je 0x3067c
movq (%r14), %rax
movq (%rax), %rdi
leaq -0x18(%rbp), %rdx
callq *0x10(%rax)
testl %eax, %eax
je 0x3068f
movq (%r14), %rax
movq (%rax), %rdi
leaq -0x18(%rbp), %rsi
callq *0x20(%rax)
testl %eax, %eax
jne 0x306e0
jmp 0x306d7
leaq 0x118(%r14), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x2f685
movq (%r14), %rax
movq 0xd0(%r14), %rdi
callq *0x28(%rax)
testl %eax, %eax
jne 0x306e0
movq 0xd0(%r14), %rax
movq 0x118(%r14), %rsi
movq (%rax), %rdi
addq $0x8, %rdi
callq 0x2f66d
movq (%r14), %rax
movq -0x18(%rbp), %rdi
callq *0x38(%rax)
movq -0x18(%rbp), %rax
movq %rax, (%rbx)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhNewPage
static lhpage * lhNewPage(
	lhash_kv_engine *pEngine, /* KV store which own this instance */
	unqlite_page *pRaw,       /* Raw page contents */
	lhpage *pMaster           /* Master page in case we are dealing with a slave page */
	)
{
	lhpage *pPage;
	/* Allocate a new instance */
	pPage = (lhpage *)SyMemBackendPoolAlloc(&pEngine->sAllocator,sizeof(lhpage));
	if( pPage == 0 ){
		return 0;
	}
	/* Zero the structure */
	SyZero(pPage,sizeof(lhpage));
	/* Fill-in the structure */
	pPage->pHash = pEngine;
	pPage->pRaw = pRaw;
	pPage->pMaster = pMaster ? pMaster /* Slave page */ : pPage /* Master page */ ;
	if( pPage->pMaster != pPage ){
		/* Slave page, attach it to its master */
		pPage->pNextSlave = pMaster->pSlave;
		pMaster->pSlave = pPage;
		pMaster->iSlave++;
	}
	/* Save this instance for future fast lookup */
	pRaw->pUserData = pPage;
	/* All done */
	return pPage;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r12
addq $0x8, %rdi
pushq $0x60
popq %rsi
callq 0x279f7
movq %rax, %r15
testq %rax, %rax
je 0x3074a
pushq $0x60
popq %rsi
movq %r15, %rdi
callq 0x27aea
movq %r12, (%r15)
movq %rbx, 0x8(%r15)
testq %r14, %r14
movq %r14, %rax
cmoveq %r15, %rax
movq %rax, 0x40(%r15)
cmpq %r15, %rax
je 0x30746
movq 0x48(%r14), %rax
movq %rax, 0x50(%r15)
movq %r15, 0x48(%r14)
incl 0x58(%r14)
movq %r15, 0x8(%rbx)
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhSetEmptyPage
static int lhSetEmptyPage(lhpage *pPage)
{
	unsigned char *zRaw = pPage->pRaw->zData;
	lhphdr *pHeader = &pPage->sHdr;
	sxu16 nByte;
	int rc;
	/* Acquire a writer lock */
	rc = pPage->pHash->pIo->xWrite(pPage->pRaw);
	if( rc != UNQLITE_OK ){
		return rc;
	}
	/* Offset of the first cell */
	SyBigEndianPack16(zRaw,0);
	zRaw += 2;
	/* Offset of the first free block */
	pHeader->iFree = L_HASH_PAGE_HDR_SZ;
	SyBigEndianPack16(zRaw,L_HASH_PAGE_HDR_SZ);
	zRaw += 2;
	/* Slave page number */
	SyBigEndianPack64(zRaw,0);
	zRaw += 8;
	/* Fill the free block */
	SyBigEndianPack16(zRaw,0); /* Offset of the next free block */
	zRaw += 2;
	nByte = (sxu16)L_HASH_MX_FREE_SPACE(pPage->pHash->iPageSize);
	SyBigEndianPack16(zRaw,nByte);
	pPage->nFree = nByte;
	/* Do not add this page to the hot dirty list */
	pPage->pHash->pIo->xDontMkHot(pPage->pRaw);
	return UNQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rdi
movq (%rdi), %r15
movq (%rax), %rax
callq *0x28(%rax)
movl %eax, %r14d
testl %eax, %eax
jne 0x307bf
andw $0x0, (%r15)
movw $0xc, 0x12(%rbx)
movw $0xc00, 0x2(%r15)       # imm = 0xC00
andq $0x0, 0x4(%r15)
andw $0x0, 0xc(%r15)
movq (%rbx), %rax
movl 0x110(%rax), %eax
addl $-0xc, %eax
movl %eax, %ecx
rolw $0x8, %cx
movw %cx, 0xe(%r15)
movw %ax, 0x5c(%rbx)
movq (%rbx), %rax
movq 0x8(%rbx), %rdi
movq (%rax), %rax
callq *0x40(%rax)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhFindCell
static lhcell * lhFindCell(
	lhpage *pPage,    /* Target page */
	const void *pKey, /* Lookup key */
	sxu32 nByte,      /* Key length */
	sxu32 nHash       /* Hash of the key */
	)
{
	lhcell *pEntry;
	if( pPage->nCell < 1 ){
		/* Don't bother hashing */
		return 0;
	}
	/* Point to the corresponding bucket */
	pEntry = pPage->apCell[nHash & (pPage->nCellSize - 1)];
	for(;;){
		if( pEntry == 0 ){
			break;
		}
		if( pEntry->nHash == nHash && pEntry->nKey == nByte ){
			if( SyBlobLength(&pEntry->sKey) < 1 ){
				/* Large key (> 256 KB) are not kept in-memory */
				struct lhash_key_cmp sCmp;
				int rc;
				/* Fill-in the structure */
				sCmp.zIn = (const char *)pKey;
				sCmp.zEnd = &sCmp.zIn[nByte];
				sCmp.xCmp = pPage->pHash->xCmp;
				/* Fetch the key from disk and perform the comparison */
				rc = lhConsumeCellkey(pEntry,lhKeyCmp,&sCmp,0);
				if( rc == UNQLITE_OK ){
					/* Cell found */
					return pEntry;
				}
			}else if ( pPage->pHash->xCmp(pKey,SyBlobData(&pEntry->sKey),nByte) == 0 ){
				/* Cell found */
				return pEntry;
			}
		}
		/* Point to the next entry */
		pEntry = pEntry->pNextCol;
	}
	/* No such entry */
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpl $0x0, 0x38(%rdi)
je 0x30e84
movl %ecx, %r14d
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %r13
movl 0x3c(%rdi), %ebx
decl %ebx
andl %ecx, %ebx
shlq $0x3, %rbx
addq 0x20(%rdi), %rbx
movl %edx, %eax
addq %rsi, %rax
movq %rax, -0x30(%rbp)
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x30e84
cmpl %r14d, (%rbx)
jne 0x30e7e
cmpl %r15d, 0x4(%rbx)
jne 0x30e7e
cmpl $0x0, 0x50(%rbx)
je 0x30e4a
movq (%r13), %rax
movq 0x48(%rbx), %rsi
movq %r12, %rdi
movl %r15d, %edx
callq *0xc8(%rax)
jmp 0x30e7a
movq %r12, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq (%r13), %rax
movq 0xc8(%rax), %rax
movq %rax, -0x38(%rbp)
movq %rbx, %rdi
leaq 0xc72(%rip), %rsi       # 0x31ae1
leaq -0x48(%rbp), %rdx
xorl %ecx, %ecx
callq 0x31968
testl %eax, %eax
je 0x30e86
addq $0x70, %rbx
jmp 0x30e1b
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhNewCell
static lhcell * lhNewCell(lhash_kv_engine *pEngine,lhpage *pPage)
{
	lhcell *pCell;
	pCell = (lhcell *)SyMemBackendPoolAlloc(&pEngine->sAllocator,sizeof(lhcell));
	if( pCell == 0 ){
		return 0;
	}
	/* Zero the structure */
	SyZero(pCell,sizeof(lhcell));
	/* Fill in the structure */
	SyBlobInit(&pCell->sKey,&pEngine->sAllocator);
	pCell->pPage = pPage;
	return pCell;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %r14
movq %r14, %rdi
movl $0x80, %esi
callq 0x279f7
movq %rax, %r15
testq %rax, %rax
je 0x311d4
movq %r15, %rdi
movl $0x80, %esi
callq 0x27aea
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%r15)
movq %r14, 0x40(%r15)
andl $0x0, 0x58(%r15)
movq %rbx, 0x20(%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhCellDiscard
static void lhCellDiscard(lhcell *pCell)
{
	lhpage *pPage = pCell->pPage->pMaster;	
	
	if( pCell->pPrevCol ){
		pCell->pPrevCol->pNextCol = pCell->pNextCol;
	}else{
		pPage->apCell[pCell->nHash & (pPage->nCellSize - 1)] = pCell->pNextCol;
	}
	if( pCell->pNextCol ){
		pCell->pNextCol->pPrevCol = pCell->pPrevCol;
	}
	MACRO_LD_REMOVE(pPage->pList,pCell);
	if( pCell == pPage->pFirst ){
		pPage->pFirst = pCell->pPrev;
	}
	pPage->nCell--;
	/* Release the cell */
	SyBlobRelease(&pCell->sKey);
	SyMemBackendPoolFree(&pPage->pHash->sAllocator,pCell);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rcx
movq 0x70(%rdi), %rax
movq 0x40(%rcx), %r14
movq 0x78(%rdi), %rcx
testq %rcx, %rcx
je 0x31699
addq $0x70, %rcx
jmp 0x316a9
movl 0x3c(%r14), %ecx
decl %ecx
andl (%rbx), %ecx
shlq $0x3, %rcx
addq 0x20(%r14), %rcx
movq %rax, (%rcx)
testq %rax, %rax
je 0x316b9
movq 0x78(%rbx), %rcx
movq %rcx, 0x78(%rax)
movq 0x28(%r14), %rax
cmpq %rbx, %rax
jne 0x316ca
movq 0x60(%rax), %rax
movq %rax, 0x28(%r14)
movq 0x60(%rbx), %rax
movq 0x68(%rbx), %rcx
testq %rcx, %rcx
je 0x316db
movq %rax, 0x60(%rcx)
testq %rax, %rax
je 0x316e4
movq %rcx, 0x68(%rax)
cmpq %rbx, 0x30(%r14)
jne 0x316f2
movq 0x68(%rbx), %rax
movq %rax, 0x30(%r14)
decl 0x38(%r14)
leaq 0x40(%rbx), %rdi
callq 0x2a72f
movq (%r14), %rdi
addq $0x8, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x27bf8
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhCellWriteLocalPayload
static int lhCellWriteLocalPayload(lhcell *pCell,
	const void *pKey,sxu32 nKeylen,
	const void *pData,unqlite_int64 nDatalen
	)
{
	/* A writer lock have been acquired on this page */
	lhpage *pPage = pCell->pPage;
	unsigned char *zRaw = pPage->pRaw->zData;
	/* Seek to the desired location */
	zRaw += pCell->iStart + L_HASH_CELL_SZ;
	/* Write the key */
	SyMemcpy(pKey,(void *)zRaw,nKeylen);
	zRaw += nKeylen;
	if( nDatalen > 0 ){
		/* Write the Data */
		SyMemcpy(pData,(void *)zRaw,(sxu32)nDatalen);
	}
	return UNQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movl %edx, %r15d
movq 0x20(%rdi), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movzwl 0x28(%rdi), %ecx
leaq (%rax,%rcx), %r12
addq $0x1a, %r12
movq %rsi, %rdi
movq %r12, %rsi
callq 0x2d3b0
testq %rbx, %rbx
jle 0x31768
movl %r15d, %eax
addq %rax, %r12
movq %r14, %rdi
movq %r12, %rsi
movl %ebx, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2d3b0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhCellWriteHeader
static int lhCellWriteHeader(lhcell *pCell)
{
	lhpage *pPage = pCell->pPage;
	unsigned char *zRaw = pPage->pRaw->zData;
	/* Seek to the desired location */
	zRaw += pCell->iStart;
	/* 4 byte hash number */
	SyBigEndianPack32(zRaw,pCell->nHash);
	zRaw += 4;
	/* 4 byte key length */
	SyBigEndianPack32(zRaw,pCell->nKey);
	zRaw += 4;
	/* 8 byte data length */
	SyBigEndianPack64(zRaw,pCell->nData);
	zRaw += 8;
	/* 2 byte offset of the next cell */
	pCell->iNext = pPage->sHdr.iOfft;
	SyBigEndianPack16(zRaw,pCell->iNext);
	zRaw += 2;
	/* 8 byte overflow page number */
	SyBigEndianPack64(zRaw,pCell->iOvfl);
	/* Update the page header */
	pPage->sHdr.iOfft = pCell->iStart;
	/* pEngine->pIo->xWrite() has been successfully called on this page */
	SyBigEndianPack16(pPage->pRaw->zData,pCell->iStart);
	/* All done */
	return UNQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %r15
movq 0x8(%r15), %rax
movq (%rax), %r12
movzwl 0x28(%rdi), %r13d
movl (%rdi), %eax
bswapl %eax
leaq 0x8(%r12,%r13), %r14
movl %eax, -0x8(%r14)
movl 0x4(%rdi), %eax
bswapl %eax
movl %eax, -0x4(%r14)
movq 0x8(%rdi), %rsi
movq %r14, %rdi
callq 0x2f66d
movzwl 0x10(%r15), %eax
movw %ax, 0x10(%rbx)
movb %al, 0x9(%r14)
movq %r12, %rcx
movq %r13, %rdx
movb %ah, 0x10(%rcx,%rdx)
leaq (%r12,%r13), %rdi
addq $0x12, %rdi
movq 0x18(%rbx), %rsi
callq 0x2f66d
movzwl 0x28(%rbx), %eax
movw %ax, 0x10(%r15)
movq 0x8(%r15), %rcx
movq (%rcx), %rcx
rolw $0x8, %ax
movw %ax, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhKeyCmp
static int lhKeyCmp(const void *pData,sxu32 nLen,void *pUserData)
{
	struct lhash_key_cmp *pCmp = (struct lhash_key_cmp *)pUserData;
	int rc;
	if( pCmp->zIn >= pCmp->zEnd ){
		if( nLen > 0 ){
			return UNQLITE_ABORT;
		}
		return UNQLITE_OK;
	}
	/* Perform the comparison */
	rc = pCmp->xCmp((const void *)pCmp->zIn,pData,nLen);
	if( rc != 0 ){
		/* Abort comparison */
		return UNQLITE_ABORT;
	}
	/* Advance the cursor */
	pCmp->zIn += nLen;
	return UNQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %rsi
movq (%rdx), %rdi
cmpq 0x8(%rdx), %rdi
jae 0x31b08
movq %rdx, %r14
movl %ebx, %edx
callq *0x10(%r14)
testl %eax, %eax
je 0x31b12
pushq $-0xa
popq %rax
jmp 0x31b19
testl %ebx, %ebx
pushq $-0xa
popq %rax
cmovel %ebx, %eax
jmp 0x31b19
movl %ebx, %eax
addq %rax, (%r14)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: SyBlobReset
JX9_PRIVATE sxi32 SyBlobReset(SyBlob *pBlob)
{
	pBlob->nByte = 0;
	if( pBlob->nFlags & SXBLOB_RDONLY ){
		/* Read-only (Not malloced chunk) */
		pBlob->pBlob = 0;
		pBlob->mByte = 0;
		pBlob->nFlags &= ~SXBLOB_RDONLY;
	}
	return SXRET_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andl $0x0, 0x10(%rdi)
movl 0x18(%rdi), %eax
testb $0x4, %al
je 0x31b3c
andq $0x0, 0x8(%rdi)
andl $0x0, 0x14(%rdi)
andl $-0x5, %eax
movl %eax, 0x18(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhUnlinkCell
static int lhUnlinkCell(lhcell *pCell)
{
	lhash_kv_engine *pEngine = pCell->pPage->pHash;
	lhpage *pPage = pCell->pPage;
	sxu16 nByte = L_HASH_CELL_SZ;
	lhcell *pPrev;
	int rc;
	rc = pEngine->pIo->xWrite(pPage->pRaw);
	if( rc != UNQLITE_OK ){
		return rc;
	}
	/* Bring the link */
	pPrev = lhFindSibeling(pCell);
	if( pPrev ){
		pPrev->iNext = pCell->iNext;
		/* Fix offsets in the page header */
		SyBigEndianPack16(&pPage->pRaw->zData[pPrev->iStart + 4/*Hash*/+4/*Key*/+8/*Data*/],pCell->iNext);
	}else{
		/* First entry on this page (either master or slave) */
		pPage->sHdr.iOfft = pCell->iNext;
		/* Update the page header */
		SyBigEndianPack16(pPage->pRaw->zData,pCell->iNext);
	}
	/* Restore cell space */
	if( pCell->iOvfl == 0 ){
		nByte += (sxu16)(pCell->nData + pCell->nKey);
	}
	lhRestoreSpace(pPage,pCell->iStart,nByte);
	/* Discard the cell from the in-memory hashtable */
	lhCellDiscard(pCell);
	return UNQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %r15
movq (%r15), %rax
movq 0x8(%r15), %rdi
movq (%rax), %rax
callq *0x28(%rax)
movl %eax, %r14d
testl %eax, %eax
jne 0x31d16
movq %rbx, %rdi
callq 0x31d43
movzwl 0x10(%rbx), %ecx
testq %rax, %rax
je 0x31cd8
movw %cx, 0x10(%rax)
movq 0x8(%r15), %rdx
movq (%rdx), %rdx
movzwl 0x28(%rax), %eax
addq %rdx, %rax
addq $0x10, %rax
jmp 0x31ce4
movw %cx, 0x10(%r15)
movq 0x8(%r15), %rax
movq (%rax), %rax
movb %cl, 0x1(%rax)
movb %ch, (%rax)
movw $0x1a, %ax
cmpq $0x0, 0x18(%rbx)
jne 0x31cff
movl 0x4(%rbx), %eax
movl 0x8(%rbx), %ecx
addl %ecx, %eax
addl $0x1a, %eax
movzwl 0x28(%rbx), %esi
movzwl %ax, %edx
movq %r15, %rdi
callq 0x31d73
movq %rbx, %rdi
callq 0x31674
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhFindSibeling
static lhcell * lhFindSibeling(lhcell *pCell)
{
	lhpage *pPage = pCell->pPage->pMaster;
	lhcell *pEntry;
	pEntry = pPage->pFirst; 
	while( pEntry ){
		if( pEntry->pPage == pCell->pPage && pEntry->iNext == pCell->iStart ){
			/* Sibeling found */
			return pEntry;
		}
		/* Point to the previous entry */
		pEntry = pEntry->pPrev; 
	}
	/* Last inserted cell */
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x20(%rdi), %rcx
movq 0x40(%rcx), %rax
addq $0x30, %rax
movq (%rax), %rax
testq %rax, %rax
je 0x31d71
cmpq %rcx, 0x20(%rax)
jne 0x31d6b
movzwl 0x10(%rax), %edx
cmpw 0x28(%rdi), %dx
je 0x31d71
addq $0x68, %rax
jmp 0x31d53
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhMoveLocalCell
static int lhMoveLocalCell(
	lhcell *pCell,
	sxu16 iOfft,
	const void *pData,
	unqlite_int64 nData
	)
{
	sxu16 iKeyOfft = pCell->iStart + L_HASH_CELL_SZ;
	lhpage *pPage = pCell->pPage;
	lhcell *pSibeling;
	pSibeling = lhFindSibeling(pCell);
	if( pSibeling ){
		/* Fix link */
		SyBigEndianPack16(&pPage->pRaw->zData[pSibeling->iStart + 4/*Hash*/+4/*Key*/+8/*Data*/],pCell->iNext);
		pSibeling->iNext = pCell->iNext;
	}else{
		/* First cell, update page header only */
		SyBigEndianPack16(pPage->pRaw->zData,pCell->iNext);
		pPage->sHdr.iOfft = pCell->iNext;
	}
	/* Set the new offset */
	pCell->iStart = iOfft;
	pCell->nData = (sxu64)nData;
	/* Write the cell payload */
	lhCellWriteLocalPayload(pCell,(const void *)&pPage->pRaw->zData[iKeyOfft],pCell->nKey,pData,nData);
	/* Finally write the cell header */
	lhCellWriteHeader(pCell);
	/* All done */
	return UNQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, -0x30(%rbp)
movl %esi, %r12d
movq %rdi, %rbx
movzwl 0x28(%rdi), %r13d
movq 0x20(%rdi), %r15
callq 0x31d43
movq 0x8(%r15), %rcx
movq (%rcx), %rcx
testq %rax, %rax
je 0x31e00
movzwl 0x28(%rax), %edx
addq %rdx, %rcx
addq $0x10, %rcx
movzwl 0x10(%rbx), %edx
movb %dl, 0x1(%rcx)
jmp 0x31e0a
movzwl 0x10(%rbx), %edx
movb %dl, 0x1(%rcx)
movq %r15, %rax
movb %dh, (%rcx)
movzwl 0x10(%rbx), %ecx
movw %cx, 0x10(%rax)
addl $0x1a, %r13d
movw %r12w, 0x28(%rbx)
movq %r14, 0x8(%rbx)
movq 0x8(%r15), %rax
movzwl %r13w, %esi
addq (%rax), %rsi
movl 0x4(%rbx), %edx
movq %rbx, %rdi
movq -0x30(%rbp), %rcx
movq %r14, %r8
callq 0x31712
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x31771
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhRestorePage
static int lhRestorePage(lhash_kv_engine *pEngine,unqlite_page *pPage)
{
	int rc;
	rc = pEngine->pIo->xWrite(pEngine->pHeader);
	if( rc != UNQLITE_OK ){
		return rc;
	}
	rc = pEngine->pIo->xWrite(pPage);
	if( rc != UNQLITE_OK ){
		return rc;
	}
	/* Link to the list of free page */
	SyBigEndianPack64(pPage->zData,pEngine->nFreeList);
	pEngine->nFreeList = pPage->iPage;
	SyBigEndianPack64(&pEngine->pHeader->zData[4/*Magic*/+4/*Hash*/],pEngine->nFreeList);
	/* All done */
	return UNQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq 0xd0(%rdi), %rdi
callq *0x28(%rax)
testl %eax, %eax
jne 0x31eae
movq (%rbx), %rax
movq %r14, %rdi
callq *0x28(%rax)
testl %eax, %eax
jne 0x31eae
movq (%r14), %rdi
movq 0x118(%rbx), %rsi
callq 0x2f66d
movq 0x10(%r14), %rsi
movq %rsi, 0x118(%rbx)
movq 0xd0(%rbx), %rax
movq (%rax), %rdi
addq $0x8, %rdi
callq 0x2f66d
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhCursorNextPage
static int lhCursorNextPage(lhash_kv_cursor *pPtr)
{
	lhash_kv_cursor *pCur = (lhash_kv_cursor *)pPtr;
	lhash_bmap_rec *pRec;
	lhpage *pPage;
	int rc;
	for(;;){
		pRec = pCur->pRec;
		if( pRec == 0 ){
			pCur->iState = L_HASH_CURSOR_STATE_DONE;
			return UNQLITE_DONE;
		}
		if( pPtr->iState == L_HASH_CURSOR_STATE_CELL && pPtr->pRaw ){
			/* Unref this page */
			pCur->pStore->pIo->xPageUnref(pPtr->pRaw);
			pPtr->pRaw = 0;
		}
		/* Advance the map cursor */
		pCur->pRec = pRec->pPrev; /* Not a bug, reverse link */
		/* Load the next page on the list */
		rc = lhLoadPage((lhash_kv_engine *)pCur->pStore,pRec->iReal,0,&pPage,0);
		if( rc != UNQLITE_OK ){
			return rc;
		}
		if( pPage->pList ){
			/* Reflect the change */
			pCur->pCell = pPage->pList;
			pCur->iState = L_HASH_CURSOR_STATE_CELL;
			pCur->pRaw = pPage->pRaw;
			break;
		}
		/* Empty page, discard this page and continue */
		pPage->pHash->pIo->xPageUnref(pPage->pRaw);
	}
	return UNQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x20(%rbp), %r14
movq 0x20(%rbx), %r15
testq %r15, %r15
je 0x31f23
cmpl $0x2, 0x8(%rbx)
jne 0x31eea
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x31eea
movq (%rbx), %rax
movq (%rax), %rax
callq *0x50(%rax)
andq $0x0, 0x18(%rbx)
movq 0x18(%r15), %rax
movq %rax, 0x20(%rbx)
movq (%rbx), %rdi
movq 0x8(%r15), %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x30b50
testl %eax, %eax
jne 0x31f44
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rcx
testq %rcx, %rcx
jne 0x31f2f
movq (%rax), %rcx
movq 0x8(%rax), %rdi
movq (%rcx), %rax
callq *0x50(%rax)
jmp 0x31ec4
movl $0x3, 0x8(%rbx)
pushq $-0x1c
popq %rax
jmp 0x31f44
movq %rcx, 0x10(%rbx)
movl $0x2, 0x8(%rbx)
movq 0x8(%rax), %rax
movq %rax, 0x18(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhCursorPrevPage
static int lhCursorPrevPage(lhash_kv_cursor *pPtr)
{
	lhash_kv_cursor *pCur = (lhash_kv_cursor *)pPtr;
	lhash_bmap_rec *pRec;
	lhpage *pPage;
	int rc;
	for(;;){
		pRec = pCur->pRec;
		if( pRec == 0 ){
			pCur->iState = L_HASH_CURSOR_STATE_DONE;
			return UNQLITE_DONE;
		}
		if( pPtr->iState == L_HASH_CURSOR_STATE_CELL && pPtr->pRaw ){
			/* Unref this page */
			pCur->pStore->pIo->xPageUnref(pPtr->pRaw);
			pPtr->pRaw = 0;
		}
		/* Advance the map cursor */
		pCur->pRec = pRec->pNext; /* Not a bug, reverse link */
		/* Load the previous page on the list */
		rc = lhLoadPage((lhash_kv_engine *)pCur->pStore,pRec->iReal,0,&pPage,0);
		if( rc != UNQLITE_OK ){
			return rc;
		}
		if( pPage->pFirst ){
			/* Reflect the change */
			pCur->pCell = pPage->pFirst;
			pCur->iState = L_HASH_CURSOR_STATE_CELL;
			pCur->pRaw = pPage->pRaw;
			break;
		}
		/* Discard this page and continue */
		pPage->pHash->pIo->xPageUnref(pPage->pRaw);
	}
	return UNQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x20(%rbp), %r14
movq 0x20(%rbx), %r15
testq %r15, %r15
je 0x31fbf
cmpl $0x2, 0x8(%rbx)
jne 0x31f86
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x31f86
movq (%rbx), %rax
movq (%rax), %rax
callq *0x50(%rax)
andq $0x0, 0x18(%rbx)
movq 0x10(%r15), %rax
movq %rax, 0x20(%rbx)
movq (%rbx), %rdi
movq 0x8(%r15), %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x30b50
testl %eax, %eax
jne 0x31fe0
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rcx
testq %rcx, %rcx
jne 0x31fcb
movq (%rax), %rcx
movq 0x8(%rax), %rdi
movq (%rcx), %rax
callq *0x50(%rax)
jmp 0x31f60
movl $0x3, 0x8(%rbx)
pushq $-0x1c
popq %rax
jmp 0x31fe0
movq %rcx, 0x10(%rbx)
movl $0x2, 0x8(%rbx)
movq 0x8(%rax), %rax
movq %rax, 0x18(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: SySetRelease
JX9_PRIVATE sxi32 SySetRelease(SySet *pSet)
{
	sxi32 rc = SXRET_OK;
	if( pSet->pAllocator && pSet->pBase ){
		rc = SyMemBackendFree(pSet->pAllocator, pSet->pBase);
	}
	pSet->pBase = 0;
	pSet->nUsed = 0;
	pSet->nCursor = 0;
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3200a
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x3200a
callq 0x2d420
andq $0x0, 0x8(%rbx)
andl $0x0, 0x10(%rbx)
andl $0x0, 0x1c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: EngineRelease
static sxi32 EngineRelease(jx9 *pEngine)
{
	jx9_vm *pVm, *pNext;
	/* Release all active VM */
	pVm = pEngine->pVms;
	for(;;){
		if( pEngine->iVm < 1 ){
			break;
		}
		pNext = pVm->pNext;
		jx9VmRelease(pVm);
		pVm = pNext;
		pEngine->iVm--;
	}
	/* Set a dummy magic number */
	pEngine->nMagic = 0x7635;
	/* Release the private memory subsystem */
	SyMemBackendRelease(&pEngine->sAllocator); 
	return JX9_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0xf8(%rdi), %rdi
movl 0x100(%rbx), %eax
testl %eax, %eax
jle 0x32058
movq 0x6d8(%rdi), %r14
callq 0x3206e
movl 0x100(%rbx), %eax
decl %eax
movl %eax, 0x100(%rbx)
movq %r14, %rdi
jmp 0x32035
movl $0x7635, 0x118(%rbx)    # imm = 0x7635
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x27b23
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unqliteFindKVStore
UNQLITE_PRIVATE unqlite_kv_methods * unqliteFindKVStore(
	const char *zName, /* Storage engine name [i.e. Hash, B+tree, LSM, etc.] */
	sxu32 nByte /* zName length */
	)
{
	unqlite_kv_methods **apStore,*pEntry;
	sxu32 n,nMax;
	/* Point to the set of installed engines */
	apStore = (unqlite_kv_methods **)SySetBasePtr(&sUnqlMPGlobal.kv_storage);
	nMax = SySetUsed(&sUnqlMPGlobal.kv_storage);
	for( n = 0 ; n < nMax; ++n ){
		pEntry = apStore[n];
		if( nByte == SyStrlen(pEntry->zName) && SyStrnicmp(pEntry->zName,zName,nByte) == 0 ){
			/* Storage engine found */
			return pEntry;
		}
	}
	/* No such entry, return NULL */
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, -0x30(%rbp)
movq 0x55718(%rip), %rax     # 0x877b8
movq %rax, -0x38(%rbp)
movl 0x55715(%rip), %r14d    # 0x877c0
xorl %r13d, %r13d
cmpq %r13, %r14
je 0x320e1
movq -0x38(%rbp), %rax
movq (%rax,%r13,8), %r15
movq (%r15), %r12
movq %r12, %rdi
callq 0x28e24
cmpl %ebx, %eax
jne 0x320dc
movq %r12, %rdi
movq -0x30(%rbp), %rsi
movl %ebx, %edx
callq 0x32436
testl %eax, %eax
je 0x320e4
incq %r13
jmp 0x320ae
xorl %r15d, %r15d
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: SyRandomnessInit
JX9_PRIVATE sxi32 SyRandomnessInit(SyPRNGCtx *pCtx, ProcRandomSeed xSeed, void * pUserData)
{
	char zSeed[256];
	sxu8 t;
	sxi32 rc;
	sxu32 i;
	if( pCtx->nMagic == SXPRNG_MAGIC ){
		return SXRET_OK; /* Already initialized */
	}
 /* Initialize the state of the random number generator once, 
  ** the first time this routine is called.The seed value does
  ** not need to contain a lot of randomness since we are not
  ** trying to do secure encryption or anything like that...
  */	
	if( xSeed == 0 ){
		xSeed = SyOSUtilRandomSeed;
	}
	rc = xSeed(zSeed, sizeof(zSeed), pUserData);
	if( rc != SXRET_OK ){
		return rc;
	}
	pCtx->i = pCtx->j = 0;
	for(i=0; i < SX_ARRAYSIZE(pCtx->s) ; i++){
		pCtx->s[i] = (unsigned char)i;
    }
    for(i=0; i < sizeof(zSeed) ; i++){
      pCtx->j += pCtx->s[i] + zSeed[i];
      t = pCtx->s[pCtx->j];
      pCtx->s[pCtx->j] = pCtx->s[i];
      pCtx->s[i] = t;
    }
	pCtx->nMagic = SXPRNG_MAGIC;
	
	return SXRET_OK;
}

// Assembly:
cmpw $0x13c4, 0x102(%rdi)    # imm = 0x13C4
je 0x321c7
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
leaq 0x31857(%rip), %rdi     # 0x63972
xorl %esi, %esi
xorl %eax, %eax
callq 0xc510
testl %eax, %eax
js 0x32140
leaq -0x110(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
movl %eax, %edi
callq 0xc8a0
testq %rax, %rax
jg 0x32168
callq 0xcca0
leaq -0xc(%rbp), %rdi
movl %eax, (%rdi)
leaq -0x110(%rbp), %rsi
pushq $0x4
popq %rdx
callq 0x2d3b0
leaq -0x10c(%rbp), %rdi
xorl %esi, %esi
callq 0xc5b0
movb $0x0, (%rbx)
xorl %eax, %eax
cmpq $0x100, %rax            # imm = 0x100
je 0x3217e
movb %al, 0x2(%rbx,%rax)
incq %rax
jmp 0x3216d
xorl %eax, %eax
xorl %ecx, %ecx
cmpq $0x100, %rax            # imm = 0x100
je 0x321b2
movb 0x2(%rbx,%rax), %dl
movb -0x110(%rbp,%rax), %sil
addb %dl, %sil
addb %sil, %cl
movzbl %cl, %esi
movb 0x2(%rbx,%rsi), %dil
movb %dl, 0x2(%rbx,%rsi)
movb %dil, 0x2(%rbx,%rax)
incq %rax
jmp 0x32182
movb %cl, 0x1(%rbx)
movw $0x13c4, 0x102(%rbx)    # imm = 0x13C4
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: SyRandomness
JX9_PRIVATE sxi32 SyRandomness(SyPRNGCtx *pCtx, void *pBuf, sxu32 nLen)
{
	unsigned char *zBuf = (unsigned char *)pBuf;
	unsigned char *zEnd = &zBuf[nLen];
#if defined(UNTRUST)
	if( pCtx == 0 || pBuf == 0 || nLen <= 0 ){
		return SXERR_EMPTY;
	}
#endif
	if(pCtx->nMagic != SXPRNG_MAGIC ){
		return SXERR_CORRUPT;
	}
	for(;;){
		if( zBuf >= zEnd ){break;}	zBuf[0] = randomByte(pCtx);	zBuf++;	
		if( zBuf >= zEnd ){break;}	zBuf[0] = randomByte(pCtx);	zBuf++;	
		if( zBuf >= zEnd ){break;}	zBuf[0] = randomByte(pCtx);	zBuf++;	
		if( zBuf >= zEnd ){break;}	zBuf[0] = randomByte(pCtx);	zBuf++;	
	}
	return SXRET_OK;  
}

// Assembly:
cmpw $0x13c4, 0x102(%rdi)    # imm = 0x13C4
jne 0x3223d
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r15d
addq %rsi, %r15
cmpq %r15, %rbx
jae 0x32233
movq %r14, %rdi
callq 0x32780
movb %al, (%rbx)
incq %rbx
cmpq %r15, %rbx
jae 0x32233
movq %r14, %rdi
callq 0x32780
movb %al, (%rbx)
incq %rbx
cmpq %r15, %rbx
jae 0x32233
movq %r14, %rdi
callq 0x32780
movb %al, (%rbx)
incq %rbx
cmpq %r15, %rbx
jae 0x32233
movq %r14, %rdi
callq 0x32780
movb %al, (%rbx)
incq %rbx
jmp 0x321e9
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: randomByte
static sxu8 randomByte(SyPRNGCtx *pCtx)
{
  sxu8 t;
  
  /* Generate and return single random byte */
  pCtx->i++;
  t = pCtx->s[pCtx->i];
  pCtx->j += t;
  pCtx->s[pCtx->i] = pCtx->s[pCtx->j];
  pCtx->s[pCtx->j] = t;
  t += pCtx->s[pCtx->i];
  return pCtx->s[t];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %al
incb %al
movb %al, (%rdi)
movzbl %al, %eax
movb 0x2(%rdi,%rax), %cl
movb 0x1(%rdi), %dl
addb %cl, %dl
movb %dl, 0x1(%rdi)
movzbl %dl, %edx
movb 0x2(%rdi,%rdx), %sil
movb %sil, 0x2(%rdi,%rax)
movb %cl, 0x2(%rdi,%rdx)
addb 0x2(%rdi,%rax), %cl
movzbl %cl, %eax
movb 0x2(%rdi,%rax), %al
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: pager_release_kv_engine
static void pager_release_kv_engine(Pager *pPager)
{
	unqlite_kv_engine *pEngine = pPager->pEngine;
	unqlite_db *pStorage = &pPager->pDb->sDB;
	if( pStorage->pCursor ){
		/* Release the associated cursor */
		unqliteReleaseCursor(pPager->pDb,pStorage->pCursor);
		pStorage->pCursor = 0;
	}
	if( pEngine->pIo->pMethods->xRelease ){
		pEngine->pIo->pMethods->xRelease(pEngine);
	}
	/* Release the whole instance */
	SyMemBackendFree(&pPager->pDb->sMem,(void *)pEngine->pIo);
	SyMemBackendFree(&pPager->pDb->sMem,(void *)pEngine);
	pPager->pEngine = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r15
movq 0x10(%rdi), %r14
movq 0xe8(%r15), %rsi
testq %rsi, %rsi
je 0x327e8
movq %r15, %rdi
callq 0x2b0d0
andq $0x0, 0xe8(%r15)
movq (%r14), %rsi
movq 0x8(%rsi), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x32800
movq %r14, %rdi
callq *%rax
movq (%r14), %rsi
movq 0x8(%rbx), %rdi
callq 0x2d420
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x2d420
andq $0x0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unqliteGenErrorFormat
UNQLITE_PRIVATE int unqliteGenErrorFormat(unqlite *pDb,const char *zFmt,...)
{
	va_list ap;
	int rc;
	va_start(ap,zFmt);
	rc = SyBlobFormatAp(&pDb->sErr,zFmt,ap);
	va_end(ap);
	/* Append a new line */
	SyBlobAppend(&pDb->sErr,(const void *)"\n",sizeof(char));
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
leaq -0xd0(%rbp), %rdi
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x32886
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
leaq -0x20(%rbp), %rdx
movq %rdi, 0x10(%rdx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
addq $0xb8, %rbx
movq %rbx, %rdi
callq 0x296e2
leaq 0x35a08(%rip), %rsi     # 0x682c1
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x2e250
addq $0xc8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unqliteKvIoNewPage
static int unqliteKvIoNewPage(unqlite_kv_handle pHandle,unqlite_page **ppPage)
{
	Pager *pPager = (Pager *)pHandle;
	int rc;
	/* 
	 * Acquire a reader-lock first so that pPager->dbSize get initialized.
	 */
	rc = pager_shared_lock(pPager);
	if( rc == UNQLITE_OK ){
		rc = unqlitePagerAcquire(pPager,pPager->dbSize == 0 ? /* Page 0 is reserved */ 1 : pPager->dbSize ,ppPage,0,0);
	}
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x33073
testl %eax, %eax
je 0x32904
popq %rbx
popq %r14
popq %rbp
retq
movq 0x40(%r14), %rsi
cmpq $0x1, %rsi
adcq $0x0, %rsi
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
popq %rbx
popq %r14
popq %rbp
jmp 0x32f4e
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unqliteKvIoPageDontJournal
static int unqliteKvIoPageDontJournal(unqlite_page *pRaw)
{
	Page *pPage = (Page *)pRaw;
	Pager *pPager;
	if( pPage == 0 ){
		/* TICKET 1433-0348 */
		return UNQLITE_OK;
	}
	pPager = pPage->pPager;
	if( pPager->iState >= PAGER_WRITER_LOCKED ){
		if( !pPager->no_jrnl && pPager->pVec && !unqliteBitvecTest(pPager->pVec,pPage->iPage) ){
			unqliteBitvecSet(pPager->pVec,pPage->iPage);
		}
	}
	return UNQLITE_OK;
}

// Assembly:
testq %rdi, %rdi
je 0x32e1d
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x18(%rdi), %rax
cmpl $0x2, 0x1f0(%rax)
jl 0x32e19
cmpl $0x0, 0x204(%rax)
je 0x32e20
popq %rbx
popq %r14
popq %rbp
xorl %eax, %eax
retq
movq 0x198(%rax), %rbx
testq %rbx, %rbx
je 0x32e19
movq 0x10(%rdi), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x33f81
testl %eax, %eax
jne 0x32e19
movq %rbx, %rdi
movq %r14, %rsi
callq 0x33fdc
jmp 0x32e19