LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x666ae
movq -0x18(%rbp), %rax
movl $0x3, 0x8(%rax)
movl $0xffffffe4, -0x4(%rbp) # imm = 0xFFFFFFE4
jmp 0x66783
movq -0x10(%rbp), %rax
cmpl $0x2, 0x8(%rax)
jne 0x666e7
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x666e7
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x50(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rdi
callq *%rax
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
leaq -0x28(%rbp), %rcx
xorl %r8d, %r8d
callq 0x62dc0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x66727
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x66783
movq -0x28(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x6675f
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movl $0x2, 0x8(%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x6677c
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x50(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rdi
callq *%rax
jmp 0x66684
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x667ce
movq -0x18(%rbp), %rax
movl $0x3, 0x8(%rax)
movl $0xffffffe4, -0x4(%rbp) # imm = 0xFFFFFFE4
jmp 0x668a3
movq -0x10(%rbp), %rax
cmpl $0x2, 0x8(%rax)
jne 0x66807
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x66807
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x50(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rdi
callq *%rax
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
leaq -0x28(%rbp), %rcx
xorl %r8d, %r8d
callq 0x62dc0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x66847
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x668a3
movq -0x28(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x6687f
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movl $0x2, 0x8(%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x6689c
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x50(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rdi
callq *%rax
jmp 0x667a4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lhRecordRemove
static int lhRecordRemove(lhcell *pCell)
{
	lhash_kv_engine *pEngine = pCell->pPage->pHash;
	int rc;
	if( pCell->iOvfl > 0){
		/* Discard overflow pages */
		unqlite_page *pOvfl;
		pgno iNext = pCell->iOvfl;
		for(;;){
			/* Point to the overflow page */
			rc = pEngine->pIo->xGet(pEngine->pIo->pHandle,iNext,&pOvfl);
			if( rc != UNQLITE_OK ){
				return rc;
			}
			/* Next page on the chain */
			SyBigEndianUnpack64(pOvfl->zData,&iNext);
			/* Restore the page to the free list */
			rc = lhRestorePage(pEngine,pOvfl);
			if( rc != UNQLITE_OK ){
				return rc;
			}
			/* Unref */
			pEngine->pIo->xPageUnref(pOvfl);
			if( iNext == 0 ){
				break;
			}
		}
	}
	/* Unlink the cell */
	rc = lhUnlinkCell(pCell);
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jbe 0x66962
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movq (%rcx), %rdi
movq -0x30(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq *%rax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x66916
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x66974
movq -0x28(%rbp), %rax
movq (%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x61db0
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x66460
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x66944
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x66974
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x50(%rax), %rax
movq -0x28(%rbp), %rdi
callq *%rax
cmpq $0x0, -0x30(%rbp)
jne 0x6695e
jmp 0x66960
jmp 0x668e6
jmp 0x66962
movq -0x10(%rbp), %rdi
callq 0x66090
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x669bf
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x669bf
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x5d6b0
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1c(%rax)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: jx9_lib_shutdown
JX9_PRIVATE int jx9_lib_shutdown(void)
{
	if( sJx9MPGlobal.nMagic != JX9_LIB_MAGIC ){
		/* Already shut */
		return JX9_OK;
	}
	JX9CoreShutdown();
	return JX9_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpl $0xea1495ba, 0x88ac6(%rip) # imm = 0xEA1495BA
je 0x66a0d
movl $0x0, -0x4(%rbp)
jmp 0x66a19
callq 0x66a30
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: JX9CoreShutdown
static void JX9CoreShutdown(void)
{
	jx9 *pEngine, *pNext;
	/* Release all active engines first */
	pEngine = sJx9MPGlobal.pEngines;
	for(;;){
		if( sJx9MPGlobal.nEngine < 1 ){
			break;
		}
		pNext = pEngine->pNext;
		EngineRelease(pEngine); 
		pEngine = pNext;
		sJx9MPGlobal.nEngine--;
	}
#if defined(JX9_ENABLE_THREADS)
	/* Release the mutex subsystem */
	if( sJx9MPGlobal.pMutexMethods ){
		if( sJx9MPGlobal.pMutex ){
			SyMutexRelease(sJx9MPGlobal.pMutexMethods, sJx9MPGlobal.pMutex);
			sJx9MPGlobal.pMutex = 0;
		}
		if( sJx9MPGlobal.pMutexMethods->xGlobalRelease ){
			sJx9MPGlobal.pMutexMethods->xGlobalRelease();
		}
		sJx9MPGlobal.pMutexMethods = 0;
	}
	sJx9MPGlobal.nThreadingLevel = 0;
#endif
	if( sJx9MPGlobal.sAllocator.pMethods ){
		/* Release the memory backend */
		SyMemBackendRelease(&sJx9MPGlobal.sAllocator);
	}
	sJx9MPGlobal.nMagic = 0x1928;	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x88a81(%rip), %rax     # 0xef4c0
movq %rax, -0x8(%rbp)
cmpl $0x1, 0x88a6e(%rip)     # 0xef4b8
jge 0x66a4e
jmp 0x66a7f
movq -0x8(%rbp), %rax
movq 0x108(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x66b20
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movl 0x88a44(%rip), %eax     # 0xef4b8
addl $-0x1, %eax
movl %eax, 0x88a3b(%rip)     # 0xef4b8
jmp 0x66a43
cmpq $0x0, 0x88a11(%rip)     # 0xef498
je 0x66aed
cmpq $0x0, 0x88a0f(%rip)     # 0xef4a0
je 0x66aca
cmpq $0x0, 0x88a05(%rip)     # 0xef4a0
je 0x66abf
movq 0x889f4(%rip), %rax     # 0xef498
cmpq $0x0, 0x18(%rax)
je 0x66abf
movq 0x889e6(%rip), %rax     # 0xef498
movq 0x18(%rax), %rax
movq 0x889e3(%rip), %rdi     # 0xef4a0
callq *%rax
movq $0x0, 0x889d6(%rip) # 0xef4a0
movq 0x889c7(%rip), %rax     # 0xef498
cmpq $0x0, 0x8(%rax)
je 0x66ae2
movq 0x889b9(%rip), %rax     # 0xef498
callq *0x8(%rax)
movq $0x0, 0x889ab(%rip) # 0xef498
movl $0x0, 0x889b1(%rip)     # 0xef4a8
cmpq $0x0, 0x888e9(%rip)     # 0xef3e8
je 0x66b0d
leaq 0x888d8(%rip), %rdi     # 0xef3e0
callq 0x543e0
movl $0x1928, 0x889b1(%rip)  # imm = 0x1928
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0xf8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, 0x100(%rax)
jge 0x66b4a
jmp 0x66b7f
movq -0x10(%rbp), %rax
movq 0x6d8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x66ba0
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x100(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x100(%rax)
jmp 0x66b3b
movq -0x8(%rbp), %rax
movl $0x7635, 0x118(%rax)    # imm = 0x7635
movq -0x8(%rbp), %rdi
callq 0x543e0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unqliteSanityzeFlag
static unsigned int unqliteSanityzeFlag(unsigned int iFlags)
{
	iFlags &= ~UNQLITE_OPEN_EXCLUSIVE; /* Reserved flag */
	if( iFlags & UNQLITE_OPEN_TEMP_DB ){
		/* Omit journaling for temporary database */
		iFlags |= UNQLITE_OPEN_OMIT_JOURNALING|UNQLITE_OPEN_CREATE;
	}
	if( (iFlags & (UNQLITE_OPEN_READONLY|UNQLITE_OPEN_READWRITE)) == 0 ){
		/* Auto-append the R+W flag */
		iFlags |= UNQLITE_OPEN_READWRITE;
	}
	if( iFlags & UNQLITE_OPEN_CREATE ){
		iFlags &= ~(UNQLITE_OPEN_MMAP|UNQLITE_OPEN_READONLY);
		/* Auto-append the R+W flag */
		iFlags |= UNQLITE_OPEN_READWRITE;
	}else{
		if( iFlags & UNQLITE_OPEN_READONLY ){
			iFlags &= ~UNQLITE_OPEN_READWRITE;
		}else if( iFlags & UNQLITE_OPEN_READWRITE ){
			iFlags &= ~UNQLITE_OPEN_MMAP;
		}
	}
	return iFlags;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
andl $-0x9, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x66bf4
movl -0x4(%rbp), %eax
orl $0x44, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
andl $0x3, %eax
cmpl $0x0, %eax
jne 0x66c08
movl -0x4(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x66c29
movl -0x4(%rbp), %eax
andl $0xfffffefe, %eax       # imm = 0xFFFFFEFE
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x4(%rbp)
jmp 0x66c59
movl -0x4(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x66c3f
movl -0x4(%rbp), %eax
andl $-0x3, %eax
movl %eax, -0x4(%rbp)
jmp 0x66c57
movl -0x4(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x66c55
movl -0x4(%rbp), %eax
andl $0xfffffeff, %eax       # imm = 0xFFFFFEFF
movl %eax, -0x4(%rbp)
jmp 0x66c57
jmp 0x66c59
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unqliteInMemory
static int unqliteInMemory(const char *zFilename)
{
	sxu32 n;
	if( SX_EMPTY_STR(zFilename) ){
		/* NULL or the empty string means an in-memory database */
		return TRUE;
	}
	n = SyStrlen(zFilename);
	if( n == sizeof(":mem:") - 1 && 
		SyStrnicmp(zFilename,":mem:",sizeof(":mem:") - 1) == 0 ){
			return TRUE;
	}
	if( n == sizeof(":memory:") - 1 && 
		SyStrnicmp(zFilename,":memory:",sizeof(":memory:") - 1) == 0 ){
			return TRUE;
	}
	return FALSE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x6729f
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x672a8
movl $0x1, -0x4(%rbp)
jmp 0x67313
movq -0x10(%rbp), %rdi
callq 0x55d10
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpq $0x5, %rax
jne 0x672e0
movq -0x10(%rbp), %rdi
leaq 0x5ab8c(%rip), %rsi     # 0xc1e54
movl $0x5, %edx
callq 0x67830
cmpl $0x0, %eax
jne 0x672e0
movl $0x1, -0x4(%rbp)
jmp 0x67313
movl -0x14(%rbp), %eax
cmpq $0x8, %rax
jne 0x6730c
movq -0x10(%rbp), %rdi
leaq 0x5ab66(%rip), %rsi     # 0xc1e5a
movl $0x8, %edx
callq 0x67830
cmpl $0x0, %eax
jne 0x6730c
movl $0x1, -0x4(%rbp)
jmp 0x67313
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq 0x87562(%rip), %rax     # 0xee898
movq %rax, -0x20(%rbp)
movl 0x87560(%rip), %eax     # 0xee8a0
movl %eax, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x30(%rbp), %eax
jae 0x673ab
movq -0x20(%rbp), %rax
movl -0x2c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0x55d10
movl %eax, %ecx
movl -0x34(%rbp), %eax
cmpl %ecx, %eax
jne 0x6739e
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x67830
cmpl $0x0, %eax
jne 0x6739e
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x673b3
jmp 0x673a0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x6734a
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x102(%rax), %eax
cmpl $0x13c4, %eax           # imm = 0x13C4
jne 0x673f5
movl $0x0, -0x4(%rbp)
jmp 0x67540
cmpq $0x0, -0x18(%rbp)
jne 0x67407
leaq 0x95d(%rip), %rax       # 0x67d60
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
leaq -0x120(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x100, %esi            # imm = 0x100
callq *%rax
movl %eax, -0x128(%rbp)
cmpl $0x0, -0x128(%rbp)
je 0x6743a
movl -0x128(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x67540
movq -0x10(%rbp), %rax
movb $0x0, 0x1(%rax)
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x12c(%rbp)
movl -0x12c(%rbp), %eax
cmpq $0x100, %rax            # imm = 0x100
jae 0x67488
movl -0x12c(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movl -0x12c(%rbp), %ecx
movb %dl, 0x2(%rax,%rcx)
movl -0x12c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x12c(%rbp)
jmp 0x67453
movl $0x0, -0x12c(%rbp)
movl -0x12c(%rbp), %eax
cmpq $0x100, %rax            # imm = 0x100
jae 0x6752c
movq -0x10(%rbp), %rax
movl -0x12c(%rbp), %ecx
movzbl 0x2(%rax,%rcx), %edx
movl -0x12c(%rbp), %eax
movsbl -0x120(%rbp,%rax), %eax
addl %eax, %edx
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %ecx
addl %edx, %ecx
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movb 0x2(%rax,%rcx), %al
movb %al, -0x121(%rbp)
movq -0x10(%rbp), %rax
movl -0x12c(%rbp), %ecx
movb 0x2(%rax,%rcx), %dl
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movb %dl, 0x2(%rax,%rcx)
movb -0x121(%rbp), %dl
movq -0x10(%rbp), %rax
movl -0x12c(%rbp), %ecx
movb %dl, 0x2(%rax,%rcx)
movl -0x12c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x12c(%rbp)
jmp 0x67492
movq -0x10(%rbp), %rax
movw $0x13c4, 0x102(%rax)    # imm = 0x13C4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x102(%rax), %eax
cmpl $0x13c4, %eax           # imm = 0x13C4
je 0x67597
movl $0xffffffe8, -0x4(%rbp) # imm = 0xFFFFFFE8
jmp 0x6764c
jmp 0x67599
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jb 0x675a8
jmp 0x67645
movq -0x10(%rbp), %rdi
callq 0x67e40
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jb 0x675d1
jmp 0x67645
movq -0x10(%rbp), %rdi
callq 0x67e40
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jb 0x675fa
jmp 0x67645
movq -0x10(%rbp), %rdi
callq 0x67e40
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jb 0x67623
jmp 0x67645
movq -0x10(%rbp), %rdi
callq 0x67e40
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x67599
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: SyOSUtilRandomSeed
static sxi32 SyOSUtilRandomSeed(void *pBuf, sxu32 nLen, void *pUnused)
{
	char *zBuf = (char *)pBuf;
#ifdef __WINNT__
	DWORD nProcessID; /* Yes, keep it uninitialized when compiling using the MinGW32 builds tools */
#elif defined(__UNIXES__)
	pid_t pid;
	int fd;
#else
	char zGarbage[128]; /* Yes, keep this buffer uninitialized */
#endif
	SXUNUSED(pUnused);
#ifdef __WINNT__
#ifndef __MINGW32__
	nProcessID = GetProcessId(GetCurrentProcess());
#endif
	SyMemcpy((const void *)&nProcessID, zBuf, SXMIN(nLen, sizeof(DWORD)));
	if( (sxu32)(&zBuf[nLen] - &zBuf[sizeof(DWORD)]) >= sizeof(SYSTEMTIME)  ){
		GetSystemTime((LPSYSTEMTIME)&zBuf[sizeof(DWORD)]);
	}
#elif defined(__UNIXES__)
	fd = open("/dev/urandom", O_RDONLY);
	if (fd >= 0 ){
		if( read(fd, zBuf, nLen) > 0 ){
			return SXRET_OK;
		}
		/* FALL THRU */
	}
	pid = getpid();
	SyMemcpy((const void *)&pid, zBuf, SXMIN(nLen, sizeof(pid_t)));
	if( &zBuf[nLen] - &zBuf[sizeof(pid_t)] >= (int)sizeof(struct timeval)  ){
		gettimeofday((struct timeval *)&zBuf[sizeof(pid_t)], 0);
	}
#else
	/* Fill with uninitialized data */
	SyMemcpy(zGarbage, zBuf, SXMIN(nLen, sizeof(zGarbage)));
#endif
	return SXRET_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
leaq 0x5a0d9(%rip), %rdi     # 0xc1e63
xorl %esi, %esi
movb $0x0, %al
callq 0xd600
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
jl 0x67dbe
movl -0x30(%rbp), %edi
movq -0x28(%rbp), %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
callq 0xd9d0
cmpq $0x0, %rax
jle 0x67dbc
movl $0x0, -0x4(%rbp)
jmp 0x67e31
jmp 0x67dbe
callq 0xde20
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x14(%rbp), %eax
cmpq $0x4, %rax
jae 0x67de0
movl -0x14(%rbp), %eax
movq %rax, -0x40(%rbp)
jmp 0x67deb
movl $0x4, %eax
movq %rax, -0x40(%rbp)
jmp 0x67deb
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rax
movl %eax, %edx
leaq -0x2c(%rbp), %rdi
callq 0x5d570
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
addq %rcx, %rax
movq -0x28(%rbp), %rcx
addq $0x4, %rcx
subq %rcx, %rax
cmpq $0x10, %rax
jl 0x67e2a
movq -0x28(%rbp), %rdi
addq $0x4, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xd6b0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movb (%rax), %cl
addb $0x1, %cl
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
movb 0x2(%rax,%rcx), %al
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %edx
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %ecx
addl %edx, %ecx
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movb 0x2(%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
movb %dl, 0x2(%rax,%rcx)
movb -0x9(%rbp), %dl
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movb %dl, 0x2(%rax,%rcx)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x2(%rax,%rcx), %ecx
movzbl -0x9(%rbp), %eax
addl %ecx, %eax
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movzbl -0x9(%rbp), %ecx
movb 0x2(%rax,%rcx), %al
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
addq $0xd8, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x67f26
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x598f0
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x20(%rax)
je 0x67f4d
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x5d6b0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x5d6b0
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: pager_kv_io_init
static int pager_kv_io_init(Pager *pPager,unqlite_kv_methods *pMethods,unqlite_kv_io *pIo)
{
	pIo->pHandle =  pPager;
	pIo->pMethods = pMethods;
	
	pIo->xGet    = unqliteKvIoPageGet;
	pIo->xLookup = unqliteKvIoPageLookup;
	pIo->xNew    = unqliteKvIoNewPage;
	
	pIo->xWrite     = unqliteKvIopageWrite; 
	pIo->xDontWrite = unqliteKvIoPageDontWrite;
	pIo->xDontJournal = unqliteKvIoPageDontJournal;
	pIo->xDontMkHot = unqliteKvIoPageDontMakeHot;

	pIo->xPageRef   = unqliteKvIopage_ref;
	pIo->xPageUnref = unqliteKvIoPageUnRef;

	pIo->xPageSize = unqliteKvIoPageSize;
	pIo->xReadOnly = unqliteKvIoReadOnly;

	pIo->xTmpPage =  unqliteKvIoTempPage;

	pIo->xSetUnpin = unqliteKvIoPageUnpin;
	pIo->xSetReload = unqliteKvIoPageReload;

	pIo->xErr = unqliteKvIoErr;

	return UNQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
leaq 0x1de(%rip), %rcx       # 0x681d0
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
leaq 0x20f(%rip), %rcx       # 0x68210
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
leaq 0x240(%rip), %rcx       # 0x68250
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
leaq 0x2b1(%rip), %rcx       # 0x682d0
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
leaq 0x2e2(%rip), %rcx       # 0x68310
movq %rcx, 0x30(%rax)
movq -0x18(%rbp), %rax
leaq 0x313(%rip), %rcx       # 0x68350
movq %rcx, 0x38(%rax)
movq -0x18(%rbp), %rax
leaq 0x3a4(%rip), %rcx       # 0x683f0
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
leaq 0x3d5(%rip), %rcx       # 0x68430
movq %rcx, 0x48(%rax)
movq -0x18(%rbp), %rax
leaq 0x3f6(%rip), %rcx       # 0x68460
movq %rcx, 0x50(%rax)
movq -0x18(%rbp), %rax
leaq 0x417(%rip), %rcx       # 0x68490
movq %rcx, 0x58(%rax)
movq -0x18(%rbp), %rax
leaq 0x428(%rip), %rcx       # 0x684b0
movq %rcx, 0x60(%rax)
movq -0x18(%rbp), %rax
leaq 0x439(%rip), %rcx       # 0x684d0
movq %rcx, 0x68(%rax)
movq -0x18(%rbp), %rax
leaq 0x44a(%rip), %rcx       # 0x684f0
movq %rcx, 0x70(%rax)
movq -0x18(%rbp), %rax
leaq 0x46b(%rip), %rcx       # 0x68520
movq %rcx, 0x78(%rax)
movq -0x18(%rbp), %rax
leaq 0x48c(%rip), %rcx       # 0x68550
movq %rcx, 0x80(%rax)
xorl %eax, %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unqliteGetPageSize
UNQLITE_PRIVATE int unqliteGetPageSize(void)
{
	int iSize =  sUnqlMPGlobal.iPageSize;
	if( iSize < UNQLITE_MIN_PAGE_SIZE || iSize > UNQLITE_MAX_PAGE_SIZE ){
		iSize = UNQLITE_DEFAULT_PAGE_SIZE;
	}
	return iSize;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x867de(%rip), %eax     # 0xee8b8
movl %eax, -0x4(%rbp)
cmpl $0x200, -0x4(%rbp)      # imm = 0x200
jl 0x680ef
cmpl $0x10000, -0x4(%rbp)    # imm = 0x10000
jle 0x680f6
movl $0x1000, -0x4(%rbp)     # imm = 0x1000
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0xf0, %rsp
testb %al, %al
je 0x6813b
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x30, -0x2c(%rbp)
movl $0x10, -0x30(%rbp)
movq -0x8(%rbp), %rdi
addq $0xb8, %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x56b10
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rdi
addq $0xb8, %rdi
leaq 0x5ea2c(%rip), %rsi     # 0xc6bd9
movl $0x1, %edx
callq 0x5d9d0
movl -0x34(%rbp), %eax
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x686b0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x682be
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x68298
movl $0x1, %eax
movq %rax, -0x30(%rbp)
jmp 0x682a4
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rdx
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0x68580
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unqliteKvIopageWrite
static int unqliteKvIopageWrite(unqlite_page *pPage)
{
	int rc;
	if( pPage == 0 ){
		/* TICKET 1433-0348 */
		return UNQLITE_OK;
	}
	rc = unqlitePageWrite(pPage);
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x682ec
movl $0x0, -0x4(%rbp)
jmp 0x682fe
movq -0x10(%rbp), %rdi
callq 0x6a250
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unqliteKvIoPageDontWrite
static int unqliteKvIoPageDontWrite(unqlite_page *pPage)
{
	int rc;
	if( pPage == 0 ){
		/* TICKET 1433-0348 */
		return UNQLITE_OK;
	}
	rc = unqlitePagerDontWrite(pPage);
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x6832c
movl $0x0, -0x4(%rbp)
jmp 0x6833e
movq -0x10(%rbp), %rdi
callq 0x6b3e0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x68374
movl $0x0, -0x4(%rbp)
jmp 0x683e6
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x2, 0x1f0(%rax)
jl 0x683df
movq -0x20(%rbp), %rax
cmpl $0x0, 0x204(%rax)
jne 0x683dd
movq -0x20(%rbp), %rax
cmpq $0x0, 0x198(%rax)
je 0x683dd
movq -0x20(%rbp), %rax
movq 0x198(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x6b010
cmpl $0x0, %eax
jne 0x683dd
movq -0x20(%rbp), %rax
movq 0x198(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x6b160
jmp 0x683df
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unqliteKvIoPageDontMakeHot
static int unqliteKvIoPageDontMakeHot(unqlite_page *pRaw)
{
	Page *pPage = (Page *)pRaw;
	
	if( pPage == 0 ){
		/* TICKET 1433-0348 */
		return UNQLITE_OK;
	}
	pPage->flags |= PAGE_DONT_MAKE_HOT;
	return UNQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x68410
movl $0x0, -0x4(%rbp)
jmp 0x68427
movq -0x18(%rbp), %rax
movl 0x20(%rax), %ecx
orl $0x80, %ecx
movl %ecx, 0x20(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unqlitePagerAcquire
static int unqlitePagerAcquire(
  Pager *pPager,      /* The pager open on the database file */
  pgno pgno,          /* Page number to fetch */
  unqlite_page **ppPage,    /* OUT: Acquired page */
  int fetchOnly,      /* Cache lookup only */
  int noContent       /* Do not bother reading content from disk if true */
)
{
	Page *pPage;
	int rc;
	/* Acquire a shared lock (if not yet done) on the database and rollback any hot-journal if present */
	rc = pager_shared_lock(pPager);
	if( rc != UNQLITE_OK ){
		return rc;
	}
	/* Fetch the page from the cache */
	pPage = pager_fetch_page(pPager,pgno);
	if( fetchOnly ){
		if( ppPage ){
			*ppPage = (unqlite_page *)pPage;
		}
		return pPage ? UNQLITE_OK : UNQLITE_NOTFOUND;
	}
	if( pPage == 0 ){
		/* Allocate a new page */
		pPage = pager_alloc_page(pPager,pgno);
		if( pPage == 0 ){
			unqliteGenOutofMem(pPager->pDb);
			return UNQLITE_NOMEM;
		}
		/* Read page contents */
		rc = pager_get_page_contents(pPager,pPage,noContent);
		if( rc != UNQLITE_OK ){
			SyMemBackendPoolFree(pPager->pAllocator,pPage);
			return rc;
		}
		/* Link the page */
		pager_link_page(pPager,pPage);
	}else{
		if( ppPage ){
			page_ref(pPage);
		}
	}
	/* All done, page is loaded in memeory */
	if( ppPage ){
		*ppPage = (unqlite_page *)pPage;
	}
	return UNQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x686b0
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x685b8
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6869b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x68930
movq %rax, -0x30(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x685fb
cmpq $0x0, -0x20(%rbp)
je 0x685e1
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rdx
movl $0xfffffffa, %eax       # imm = 0xFFFFFFFA
xorl %ecx, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x6869b
cmpq $0x0, -0x30(%rbp)
jne 0x68670
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x689c0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x68630
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x67f90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6869b
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x28(%rbp), %edx
callq 0x68a60
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x68661
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0x54490
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6869b
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x68b60
jmp 0x68682
cmpq $0x0, -0x20(%rbp)
je 0x68680
movq -0x30(%rbp), %rdi
callq 0x68dc0
jmp 0x68682
cmpq $0x0, -0x20(%rbp)
je 0x68694
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: pager_fetch_page
static Page * pager_fetch_page(Pager *pPager,pgno page_num)
{
	Page *pEntry;
	if( pPager->nPage < 1 ){
		/* Don't bother hashing */
		return 0;
	}
	/* Perform the lookup */
	pEntry = pPager->apHash[PAGE_HASH(page_num) & (pPager->nSize - 1)];
	for(;;){
		if( pEntry == 0 ){
			break;
		}
		if( pEntry->iPage == page_num ){
			return pEntry;
		}
		/* Point to the next entry in the colission chain */
		pEntry = pEntry->pNextCollide;
	}
	/* No such page */
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x254(%rax)
jae 0x68953
movq $0x0, -0x8(%rbp)
jmp 0x689b3
movq -0x10(%rbp), %rax
movq 0x248(%rax), %rax
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rdx
movl 0x250(%rdx), %edx
subl $0x1, %edx
movl %edx, %edx
andq %rdx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x68985
jmp 0x689ab
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0x6899d
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x689b3
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x6897c
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: pager_alloc_page
static Page * pager_alloc_page(Pager *pPager,pgno num_page)
{
	Page *pNew;
	
	pNew = (Page *)SyMemBackendPoolAlloc(pPager->pAllocator,sizeof(Page)+pPager->iPageSize);
	if( pNew == 0 ){
		return 0;
	}
	/* Zero the structure */
	SyZero(pNew,sizeof(Page)+pPager->iPageSize);
	/* Page data */
	pNew->zData = (unsigned char *)&pNew[1];
	/* Fill in the structure */
	pNew->pPager = pPager;
	pNew->nRef = 1;
	pNew->iPage = num_page;
	return pNew;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movslq 0x208(%rax), %rax
addq $0x68, %rax
movl %eax, %esi
callq 0x541f0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x68a02
movq $0x0, -0x8(%rbp)
jmp 0x68a56
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x208(%rax), %rax
addq $0x68, %rax
movl %eax, %esi
callq 0x54280
movq -0x20(%rbp), %rcx
addq $0x68, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rax
movl $0x1, 0x24(%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: pager_get_page_contents
static int pager_get_page_contents(Pager *pPager,Page *pPage,int noContent)
{
	int rc = UNQLITE_OK;
	if( pPager->is_mem || noContent || pPage->iPage >= pPager->dbSize ){
		/* Do not bother reading, zero the page contents only */
		SyZero(pPage->zData,pPager->iPageSize);
		return UNQLITE_OK;
	}
	if( (pPager->iOpenFlags & UNQLITE_OPEN_MMAP) && (pPager->pMmap /* Paranoid edition */) ){
		unsigned char *zMap = (unsigned char *)pPager->pMmap;
		pPage->zData = &zMap[pPage->iPage * pPager->iPageSize];
	}else{
		/* Read content */
		rc = unqliteOsRead(pPager->pfd,pPage->zData,pPager->iPageSize,pPage->iPage * pPager->iPageSize);
	}
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x1fc(%rax)
jne 0x68a9f
cmpl $0x0, -0x1c(%rbp)
jne 0x68a9f
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jb 0x68ac1
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x208(%rax), %esi
callq 0x54280
movl $0x0, -0x4(%rbp)
jmp 0x68b52
movq -0x10(%rbp), %rax
movl 0x16c(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x68b13
movq -0x10(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x68b13
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdx
movslq 0x208(%rdx), %rdx
imulq %rdx, %rax
addq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x68b4c
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movslq 0x208(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movslq 0x208(%rax), %rax
imulq %rax, %rcx
callq 0x69cd0
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unqliteOsOpen
UNQLITE_PRIVATE int unqliteOsOpen(
  unqlite_vfs *pVfs,
  SyMemBackend *pAlloc,
  const char *zPath, 
  unqlite_file **ppOut, 
  unsigned int flags 
)
{
	unqlite_file *pFile;
	int rc;
	*ppOut = 0;
	if( zPath == 0 ){
		/* May happen if dealing with an in-memory database */
		return SXERR_EMPTY;
	}
	/* Allocate a new instance */
	pFile = (unqlite_file *)SyMemBackendAlloc(pAlloc,sizeof(unqlite_file)+pVfs->szOsFile);
	if( pFile == 0 ){
		return UNQLITE_NOMEM;
	}
	/* Zero the structure */
	SyZero(pFile,sizeof(unqlite_file)+pVfs->szOsFile);
	/* Invoke the xOpen method of the underlying VFS */
	rc = pVfs->xOpen(pVfs, zPath, pFile, flags);
	if( rc != UNQLITE_OK ){
		SyMemBackendFree(pAlloc,pFile);
		pFile = 0;
	}
	*ppOut = pFile;
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
cmpq $0x0, -0x20(%rbp)
jne 0x68e1a
movl $0xfffffffd, -0x4(%rbp) # imm = 0xFFFFFFFD
jmp 0x68ea4
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0xc(%rax), %rax
addq $0x8, %rax
movl %eax, %esi
callq 0x5bf70
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x68e45
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x68ea4
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0xc(%rax), %rax
addq $0x8, %rax
movl %eax, %esi
callq 0x54280
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq *%rax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x68e93
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x5d6b0
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: pager_wait_on_lock
static int pager_wait_on_lock(Pager *pPager, int locktype){
  int rc;                              /* Return code */
  do {
    rc = pager_lock_db(pPager,locktype);
  }while( rc==UNQLITE_BUSY && pPager->xBusyHandler && pPager->xBusyHandler(pPager->pBusyHandlerArg) );
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x69410
movl %eax, -0x10(%rbp)
xorl %eax, %eax
cmpl $-0xe, -0x10(%rbp)
movb %al, -0x11(%rbp)
jne 0x68f0d
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x178(%rcx)
movb %al, -0x11(%rbp)
je 0x68f0d
movq -0x8(%rbp), %rax
movq 0x178(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x180(%rcx), %rdi
callq *%rax
cmpl $0x0, %eax
setne %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x68ebf
movl -0x10(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: pager_unlock_db
static int pager_unlock_db(Pager *pPager, int eLock)
{
  int rc = UNQLITE_OK;
  if( pPager->iLock != NO_LOCK ){
    rc = unqliteOsUnlock(pPager->pfd,eLock);
    pPager->iLock = eLock;
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1f4(%rax)
je 0x69403
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0x6a220
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1f4(%rax)
movl -0x10(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: pager_lock_db
static int pager_lock_db(Pager *pPager, int eLock){
  int rc = UNQLITE_OK;
  if( pPager->iLock < eLock || pPager->iLock == NO_LOCK ){
    rc = unqliteOsLock(pPager->pfd, eLock);
    if( rc==UNQLITE_OK ){
      pPager->iLock = eLock;
    }else{
		unqliteGenError(pPager->pDb,
			rc == UNQLITE_BUSY ? "Another process or thread hold the requested lock" : "Error while requesting database lock"
			);
	}
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x1f4(%rax), %eax
cmpl -0xc(%rbp), %eax
jl 0x69442
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1f4(%rax)
jne 0x69491
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0x694a0
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jne 0x6946a
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1f4(%rax)
jmp 0x6948f
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0x10(%rbp), %ecx
leaq 0x58b73(%rip), %rsi     # 0xc1fef
leaq 0x58b3a(%rip), %rax     # 0xc1fbd
cmpl $-0xe, %ecx
cmoveq %rax, %rsi
callq 0x58950
jmp 0x69491
movl -0x10(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)