LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unqlite_commit
int unqlite_commit(unqlite *pDb)
{
	int rc;
	if( UNQLITE_DB_MISUSE(pDb) ){
		return UNQLITE_CORRUPT;
	}
#if defined(UNQLITE_ENABLE_THREADS)
	 /* Acquire DB mutex */
	 SyMutexEnter(sUnqlMPGlobal.pMutexMethods, pDb->pMutex); /* NO-OP if sUnqlMPGlobal.nThreadingLevel != UNQLITE_THREAD_LEVEL_MULTI */
	 if( sUnqlMPGlobal.nThreadingLevel > UNQLITE_THREAD_LEVEL_SINGLE && 
		 UNQLITE_THRD_DB_RELEASE(pDb) ){
			 return UNQLITE_ABORT; /* Another thread have released this instance */
	 }
#endif
	 /* Commit the transaction */
	 rc = unqlitePagerCommit(pDb->sDB.pPager);
#if defined(UNQLITE_ENABLE_THREADS)
	 /* Leave DB mutex */
	 SyMutexLeave(sUnqlMPGlobal.pMutexMethods,pDb->pMutex); /* NO-OP if sUnqlMPGlobal.nThreadingLevel != UNQLITE_THREAD_LEVEL_MULTI */
#endif
	 return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x5a083
movq -0x10(%rbp), %rax
cmpl $0xdb7c2712, 0x120(%rax) # imm = 0xDB7C2712
je 0x5a08f
movl $0xffffffe8, -0x4(%rbp) # imm = 0xFFFFFFE8
jmp 0x5a116
movq -0x10(%rbp), %rax
cmpq $0x0, 0xf8(%rax)
je 0x5a0b5
movq 0x947d4(%rip), %rax     # 0xee878
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xf8(%rcx), %rdi
callq *%rax
cmpl $0x1, 0x947cc(%rip)     # 0xee888
jbe 0x5a0d7
movq -0x10(%rbp), %rax
cmpl $0xdb7c2712, 0x120(%rax) # imm = 0xDB7C2712
je 0x5a0d7
movl $0xfffffff6, -0x4(%rbp) # imm = 0xFFFFFFF6
jmp 0x5a116
movq -0x10(%rbp), %rax
movq 0xd8(%rax), %rdi
callq 0x5a120
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xf8(%rax)
je 0x5a110
movq 0x94779(%rip), %rax     # 0xee878
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xf8(%rcx), %rdi
callq *%rax
movl -0x14(%rbp), %eax
movl %eax, -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: unqlitePagerCommit
UNQLITE_PRIVATE int unqlitePagerCommit(Pager *pPager)
{
	int rc;
	/* Commit: Phase One */
	rc = pager_commit_phase1(pPager);
	if( rc != UNQLITE_OK ){
		goto fail;
	}
	/* Commit: Phase Two */
	rc = pager_commit_phase2(pPager);
	if( rc != UNQLITE_OK ){
		goto fail;
	}
	/* Remove stale flags */
	pPager->iFlags &= ~PAGER_CTRL_COMMIT_ERR;
	/* All done */
	return UNQLITE_OK;
fail:
	/* Disable the auto-commit flag */
	pPager->pDb->iFlags |= UNQLITE_FL_DISABLE_AUTO_COMMIT;
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xae230
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x5a140
jmp 0x5a170
movq -0x10(%rbp), %rdi
callq 0xae400
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x5a154
jmp 0x5a170
movq -0x10(%rbp), %rax
movl 0x1f8(%rax), %ecx
andl $-0x2, %ecx
movl %ecx, 0x1f8(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x5a18d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x10c(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x10c(%rax)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
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: unqlite_rollback
int unqlite_rollback(unqlite *pDb)
{
	int rc;
	if( UNQLITE_DB_MISUSE(pDb) ){
		return UNQLITE_CORRUPT;
	}
#if defined(UNQLITE_ENABLE_THREADS)
	 /* Acquire DB mutex */
	 SyMutexEnter(sUnqlMPGlobal.pMutexMethods, pDb->pMutex); /* NO-OP if sUnqlMPGlobal.nThreadingLevel != UNQLITE_THREAD_LEVEL_MULTI */
	 if( sUnqlMPGlobal.nThreadingLevel > UNQLITE_THREAD_LEVEL_SINGLE && 
		 UNQLITE_THRD_DB_RELEASE(pDb) ){
			 return UNQLITE_ABORT; /* Another thread have released this instance */
	 }
#endif
	 /* Rollback the transaction */
	 rc = unqlitePagerRollback(pDb->sDB.pPager,TRUE);
#if defined(UNQLITE_ENABLE_THREADS)
	 /* Leave DB mutex */
	 SyMutexLeave(sUnqlMPGlobal.pMutexMethods,pDb->pMutex); /* NO-OP if sUnqlMPGlobal.nThreadingLevel != UNQLITE_THREAD_LEVEL_MULTI */
#endif
	 return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x5a1c3
movq -0x10(%rbp), %rax
cmpl $0xdb7c2712, 0x120(%rax) # imm = 0xDB7C2712
je 0x5a1cf
movl $0xffffffe8, -0x4(%rbp) # imm = 0xFFFFFFE8
jmp 0x5a25b
movq -0x10(%rbp), %rax
cmpq $0x0, 0xf8(%rax)
je 0x5a1f5
movq 0x94694(%rip), %rax     # 0xee878
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xf8(%rcx), %rdi
callq *%rax
cmpl $0x1, 0x9468c(%rip)     # 0xee888
jbe 0x5a217
movq -0x10(%rbp), %rax
cmpl $0xdb7c2712, 0x120(%rax) # imm = 0xDB7C2712
je 0x5a217
movl $0xfffffff6, -0x4(%rbp) # imm = 0xFFFFFFF6
jmp 0x5a25b
movq -0x10(%rbp), %rax
movq 0xd8(%rax), %rdi
movl $0x1, %esi
callq 0x5a270
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xf8(%rax)
je 0x5a255
movq 0x94634(%rip), %rax     # 0xee878
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xf8(%rcx), %rdi
callq *%rax
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
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: unqlite_util_load_mmaped_file
UNQLITE_APIEXPORT int unqlite_util_load_mmaped_file(const char *zFile,void **ppMap,unqlite_int64 *pFileSize)
{
	const jx9_vfs *pVfs;
	int rc;
	if( SX_EMPTY_STR(zFile) || ppMap == 0 || pFileSize == 0){
		/* Sanity check */
		return UNQLITE_CORRUPT;
	}
	*ppMap = 0;
	/* Extract the Jx9 Vfs */
	pVfs = jx9ExportBuiltinVfs();
	/*
	 * Check if the underlying vfs implement the memory map routines
	 * [i.e: mmap() under UNIX/MapViewOfFile() under windows].
	 */
	if( pVfs == 0 || pVfs->xMmap == 0 ){
		rc = UNQLITE_NOTIMPLEMENTED;
	 }else{ 
		 /* Try to get a read-only memory view of the whole file */
		 rc = pVfs->xMmap(zFile,ppMap,pFileSize);
	 }
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x5a455
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x5a455
cmpq $0x0, -0x18(%rbp)
je 0x5a455
cmpq $0x0, -0x20(%rbp)
jne 0x5a45e
movl $0xffffffe8, -0x4(%rbp) # imm = 0xFFFFFFE8
jmp 0x5a4b2
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
callq 0x5a4c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x5a487
movq -0x28(%rbp), %rax
cmpq $0x0, 0x108(%rax)
jne 0x5a490
movl $0xffffffef, -0x2c(%rbp) # imm = 0xFFFFFFEF
jmp 0x5a4ac
movq -0x28(%rbp), %rax
movq 0x108(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq *%rax
movl %eax, -0x2c(%rbp)
movl -0x2c(%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: unqlite_util_release_mmaped_file
UNQLITE_APIEXPORT int unqlite_util_release_mmaped_file(void *pMap,unqlite_int64 iFileSize)
{
	const jx9_vfs *pVfs;
	int rc = UNQLITE_OK;
	if( pMap == 0 ){
		return UNQLITE_OK;
	}
	/* Extract the Jx9 Vfs */
	pVfs = jx9ExportBuiltinVfs();
	if( pVfs == 0 || pVfs->xUnmap == 0 ){
		rc = UNQLITE_NOTIMPLEMENTED;
	 }else{ 
		 pVfs->xUnmap(pMap,iFileSize);
	 }
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x24(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x5a4f7
movl $0x0, -0x4(%rbp)
jmp 0x5a539
callq 0x5a4c0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x5a515
movq -0x20(%rbp), %rax
cmpq $0x0, 0x110(%rax)
jne 0x5a51e
movl $0xffffffef, -0x24(%rbp) # imm = 0xFFFFFFEF
jmp 0x5a533
movq -0x20(%rbp), %rax
movq 0x110(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
movl -0x24(%rbp), %eax
movl %eax, -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: unqlite_util_random_string
UNQLITE_APIEXPORT int unqlite_util_random_string(unqlite *pDb,char *zBuf,unsigned int buf_size)
{
	if( UNQLITE_DB_MISUSE(pDb) ){
		return UNQLITE_CORRUPT;
	}
	if( zBuf == 0 || buf_size < 3 ){
		/* Buffer must be long enough to hold three bytes */
		return UNQLITE_INVALID;
	}
#if defined(UNQLITE_ENABLE_THREADS)
	 /* Acquire DB mutex */
	 SyMutexEnter(sUnqlMPGlobal.pMutexMethods, pDb->pMutex); /* NO-OP if sUnqlMPGlobal.nThreadingLevel != UNQLITE_THREAD_LEVEL_MULTI */
	 if( sUnqlMPGlobal.nThreadingLevel > UNQLITE_THREAD_LEVEL_SINGLE && 
		 UNQLITE_THRD_DB_RELEASE(pDb) ){
			 return UNQLITE_ABORT; /* Another thread have released this instance */
	 }
#endif
	 /* Generate the random string */
	 unqlitePagerRandomString(pDb->sDB.pPager,zBuf,buf_size);
#if defined(UNQLITE_ENABLE_THREADS)
	 /* Leave DB mutex */
	 SyMutexLeave(sUnqlMPGlobal.pMutexMethods,pDb->pMutex); /* NO-OP if sUnqlMPGlobal.nThreadingLevel != UNQLITE_THREAD_LEVEL_MULTI */
#endif
	 return UNQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x5a57a
movq -0x10(%rbp), %rax
cmpl $0xdb7c2712, 0x120(%rax) # imm = 0xDB7C2712
je 0x5a586
movl $0xffffffe8, -0x4(%rbp) # imm = 0xFFFFFFE8
jmp 0x5a62b
cmpq $0x0, -0x18(%rbp)
je 0x5a593
cmpl $0x3, -0x1c(%rbp)
jae 0x5a59f
movl $0xfffffff7, -0x4(%rbp) # imm = 0xFFFFFFF7
jmp 0x5a62b
movq -0x10(%rbp), %rax
cmpq $0x0, 0xf8(%rax)
je 0x5a5c5
movq 0x942c4(%rip), %rax     # 0xee878
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xf8(%rcx), %rdi
callq *%rax
cmpl $0x1, 0x942bc(%rip)     # 0xee888
jbe 0x5a5e7
movq -0x10(%rbp), %rax
cmpl $0xdb7c2712, 0x120(%rax) # imm = 0xDB7C2712
je 0x5a5e7
movl $0xfffffff6, -0x4(%rbp) # imm = 0xFFFFFFF6
jmp 0x5a62b
movq -0x10(%rbp), %rax
movq 0xd8(%rax), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x5a640
movq -0x10(%rbp), %rax
cmpq $0x0, 0xf8(%rax)
je 0x5a624
movq 0x94265(%rip), %rax     # 0xee878
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xf8(%rcx), %rdi
callq *%rax
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
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: unqlitePagerRandomString
UNQLITE_PRIVATE void unqlitePagerRandomString(Pager *pPager,char *zBuf,sxu32 nLen)
{
	static const char zBase[] = {"abcdefghijklmnopqrstuvwxyz0123456789"}; /* English Alphabet */
	sxu32 i;
	/* Generate a binary string first */
	SyRandomness(&pPager->sPrng,zBuf,nLen);
	/* Turn the binary string into english based alphabet */
	for( i = 0 ; i < nLen ; ++i ){
		 zBuf[i] = zBase[zBuf[i] % (sizeof(zBase)-1)];
	 }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
addq $0x64, %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x67550
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x5a6ab
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movsbq (%rax,%rcx), %rax
movl $0x24, %ecx
xorl %edx, %edx
divq %rcx
leaq 0x6742d(%rip), %rax     # 0xc1ac0
movb (%rax,%rdx), %dl
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x5a66e
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: unqlite_util_random_num
UNQLITE_APIEXPORT unsigned int unqlite_util_random_num(unqlite *pDb)
{
	sxu32 iNum;
	if( UNQLITE_DB_MISUSE(pDb) ){
		return 0;
	}
#if defined(UNQLITE_ENABLE_THREADS)
	 /* Acquire DB mutex */
	 SyMutexEnter(sUnqlMPGlobal.pMutexMethods, pDb->pMutex); /* NO-OP if sUnqlMPGlobal.nThreadingLevel != UNQLITE_THREAD_LEVEL_MULTI */
	 if( sUnqlMPGlobal.nThreadingLevel > UNQLITE_THREAD_LEVEL_SINGLE && 
		 UNQLITE_THRD_DB_RELEASE(pDb) ){
			 return 0; /* Another thread have released this instance */
	 }
#endif
	 /* Generate the random number */
	 iNum = unqlitePagerRandomNum(pDb->sDB.pPager);
#if defined(UNQLITE_ENABLE_THREADS)
	 /* Leave DB mutex */
	 SyMutexLeave(sUnqlMPGlobal.pMutexMethods,pDb->pMutex); /* NO-OP if sUnqlMPGlobal.nThreadingLevel != UNQLITE_THREAD_LEVEL_MULTI */
#endif
	 return iNum;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x5a6e3
movq -0x10(%rbp), %rax
cmpl $0xdb7c2712, 0x120(%rax) # imm = 0xDB7C2712
je 0x5a6ef
movl $0x0, -0x4(%rbp)
jmp 0x5a776
movq -0x10(%rbp), %rax
cmpq $0x0, 0xf8(%rax)
je 0x5a715
movq 0x94174(%rip), %rax     # 0xee878
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xf8(%rcx), %rdi
callq *%rax
cmpl $0x1, 0x9416c(%rip)     # 0xee888
jbe 0x5a737
movq -0x10(%rbp), %rax
cmpl $0xdb7c2712, 0x120(%rax) # imm = 0xDB7C2712
je 0x5a737
movl $0x0, -0x4(%rbp)
jmp 0x5a776
movq -0x10(%rbp), %rax
movq 0xd8(%rax), %rdi
callq 0x5a780
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xf8(%rax)
je 0x5a770
movq 0x94119(%rip), %rax     # 0xee878
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xf8(%rcx), %rdi
callq *%rax
movl -0x14(%rbp), %eax
movl %eax, -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: SyMemBackendInit
JX9_PRIVATE sxi32 SyMemBackendInit(SyMemBackend *pBackend, ProcMemError xMemErr, void * pUserData)
{
#if defined(UNTRUST)
	if( pBackend == 0 ){
		return SXERR_EMPTY;
	}
#endif
	/* Zero the allocator first */
	SyZero(&(*pBackend), sizeof(SyMemBackend));
	pBackend->xMemError = xMemErr;
	pBackend->pUserData = pUserData;
	/* Switch to the OS memory allocator */
	pBackend->pMethods = &sOSAllocMethods;
	if( pBackend->pMethods->xInit ){
		/* Initialize the backend  */
		if( SXRET_OK != pBackend->pMethods->xInit(pBackend->pMethods->pUserData) ){
			return SXERR_ABORT;
		}
	}
#if defined(UNTRUST)
	pBackend->nMagic = SXMEM_BACKEND_MAGIC;
#endif
	return SXRET_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0xb8, %esi
callq 0x54280
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
leaq 0x9046b(%rip), %rcx     # 0xeae40
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x20(%rax)
je 0x5aa15
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x5aa13
movl $0xfffffff6, -0x4(%rbp) # imm = 0xFFFFFFF6
jmp 0x5aa1c
jmp 0x5aa15
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
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: SyMemBackendInitFromOthers
JX9_PRIVATE sxi32 SyMemBackendInitFromOthers(SyMemBackend *pBackend, const SyMemMethods *pMethods, ProcMemError xMemErr, void * pUserData)
{
#if defined(UNTRUST)
	if( pBackend == 0 || pMethods == 0){
		return SXERR_EMPTY;
	}
#endif
	if( pMethods->xAlloc == 0 || pMethods->xRealloc == 0 || pMethods->xFree == 0 || pMethods->xChunkSize == 0 ){
		/* mandatory methods are missing */
		return SXERR_INVALID;
	}
	/* Zero the allocator first */
	SyZero(&(*pBackend), sizeof(SyMemBackend));
	pBackend->xMemError = xMemErr;
	pBackend->pUserData = pUserData;
	/* Switch to the host application memory allocator */
	pBackend->pMethods = pMethods;
	if( pBackend->pMethods->xInit ){
		/* Initialize the backend  */
		if( SXRET_OK != pBackend->pMethods->xInit(pBackend->pMethods->pUserData) ){
			return SXERR_ABORT;
		}
	}
#if defined(UNTRUST)
	pBackend->nMagic = SXMEM_BACKEND_MAGIC;
#endif
	return SXRET_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x5aa73
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x5aa73
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x5aa73
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x5aa7c
movl $0xfffffff7, -0x4(%rbp) # imm = 0xFFFFFFF7
jmp 0x5aaf1
movq -0x10(%rbp), %rdi
movl $0xb8, %esi
callq 0x54280
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x20(%rax)
je 0x5aaea
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x5aae8
movl $0xfffffff6, -0x4(%rbp) # imm = 0xFFFFFFF6
jmp 0x5aaf1
jmp 0x5aaea
movl $0x0, -0x4(%rbp)
movl -0x4(%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: jx9_lib_config
JX9_PRIVATE int jx9_lib_config(int nConfigOp, ...)
{
	va_list ap;
	int rc;
	if( sJx9MPGlobal.nMagic == JX9_LIB_MAGIC ){
		/* Library is already initialized, this operation is forbidden */
		return JX9_LOOKED;
	}
	va_start(ap, nConfigOp);
	rc = Jx9CoreConfigure(nConfigOp, ap);
	va_end(ap);
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x5ab38
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %r9, -0xb8(%rbp)
movq %r8, -0xc0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %rdx, -0xd0(%rbp)
movq %rsi, -0xd8(%rbp)
movl %edi, -0x8(%rbp)
cmpl $0xea1495ba, 0x94960(%rip) # imm = 0xEA1495BA
jne 0x5ab73
movl $0xfffffffc, -0x4(%rbp) # imm = 0xFFFFFFFC
jmp 0x5abb0
leaq -0x20(%rbp), %rax
leaq -0xe0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movl -0x8(%rbp), %edi
leaq -0x20(%rbp), %rsi
callq 0x5b030
movl %eax, -0x24(%rbp)
leaq -0x20(%rbp), %rax
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: SyMemBackendRealloc
JX9_PRIVATE void * SyMemBackendRealloc(SyMemBackend *pBackend, void * pOld, sxu32 nByte)
{
	void *pChunk;
#if defined(UNTRUST)
	if( SXMEM_BACKEND_CORRUPT(pBackend)  ){
		return 0;
	}
#endif
	if( pBackend->pMutexMethods ){
		SyMutexEnter(pBackend->pMutexMethods, pBackend->pMutex);
	}
	pChunk = MemBackendRealloc(&(*pBackend), pOld, nByte);
	if( pBackend->pMutexMethods ){
		SyMutexLeave(pBackend->pMutexMethods, pBackend->pMutex);
	}
	return pChunk;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x5abff
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x5abfd
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
jmp 0x5abff
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x5ac50
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x5ac3f
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x5ac3d
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
jmp 0x5ac3f
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: MemBackendRealloc
static void * MemBackendRealloc(SyMemBackend *pBackend, void * pOld, sxu32 nByte)
{
	SyMemBlock *pBlock, *pNew, *pPrev, *pNext;
	sxu32 nRetry = 0;

	if( pOld == 0 ){
		return MemBackendAlloc(&(*pBackend), nByte);
	}
	pBlock = (SyMemBlock *)(((char *)pOld) - sizeof(SyMemBlock));
#if defined(UNTRUST)
	if( pBlock->nGuard != SXMEM_BACKEND_MAGIC ){
		return 0;
	}
#endif
	nByte += sizeof(SyMemBlock);
	pPrev = pBlock->pPrev;
	pNext = pBlock->pNext;
	for(;;){
		pNew = (SyMemBlock *)pBackend->pMethods->xRealloc(pBlock, nByte);
		if( pNew != 0 || pBackend->xMemError == 0 || nRetry > SXMEM_BACKEND_RETRY ||
			SXERR_RETRY != pBackend->xMemError(pBackend->pUserData) ){
				break;
		}
		nRetry++;
	}
	if( pNew == 0 ){
		return 0;
	}
	if( pNew != pBlock ){
		if( pPrev == 0 ){
			pBackend->pBlocks = pNew;
		}else{
			pPrev->pNext = pNew;
		}
		if( pNext ){
			pNext->pPrev = pNew;
		}
#if defined(UNTRUST)
		pNew->nGuard = SXMEM_BACKEND_MAGIC;
#endif
	}
	return (void *)&pNew[1];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl $0x0, -0x44(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x5ac86
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x5ad80
movq %rax, -0x8(%rbp)
jmp 0x5ad6a
movq -0x18(%rbp), %rax
addq $-0x10, %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
addq $0x10, %rax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq *%rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x5ad01
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x5ad01
cmpl $0x3, -0x44(%rbp)
ja 0x5ad01
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
movl %eax, %ecx
movl $0xffffffdf, %eax       # imm = 0xFFFFFFDF
cmpl %ecx, %eax
je 0x5ad03
jmp 0x5ad0e
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x5acb3
cmpq $0x0, -0x30(%rbp)
jne 0x5ad1f
movq $0x0, -0x8(%rbp)
jmp 0x5ad6a
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x5ad5e
cmpq $0x0, -0x38(%rbp)
jne 0x5ad3e
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x5ad49
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x40(%rbp)
je 0x5ad5c
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x5ad5e
movq -0x30(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: MemBackendAlloc
static void * MemBackendAlloc(SyMemBackend *pBackend, sxu32 nByte)
{
	SyMemBlock *pBlock;
	sxi32 nRetry = 0;

	/* Append an extra block so we can tracks allocated chunks and avoid memory
	 * leaks.
	 */
	nByte += sizeof(SyMemBlock);
	for(;;){
		pBlock = (SyMemBlock *)pBackend->pMethods->xAlloc(nByte);
		if( pBlock != 0 || pBackend->xMemError == 0 || nRetry > SXMEM_BACKEND_RETRY 
			|| SXERR_RETRY != pBackend->xMemError(pBackend->pUserData) ){
				break;
		}
		nRetry++;
	}
	if( pBlock  == 0 ){
		return 0;
	}
	pBlock->pNext = pBlock->pPrev = 0;
	/* Link to the list of already tracked blocks */
	MACRO_LD_PUSH(pBackend->pBlocks, pBlock);
#if defined(UNTRUST)
	pBlock->nGuard = SXMEM_BACKEND_MAGIC;
#endif
	pBackend->nBlock++;
	return (void *)&pBlock[1];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x14(%rbp), %eax
addq $0x10, %rax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movl -0x14(%rbp), %edi
callq *%rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x5ade9
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x5ade9
cmpl $0x3, -0x24(%rbp)
jg 0x5ade9
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
movl %eax, %ecx
movl $0xffffffdf, %eax       # imm = 0xFFFFFFDF
cmpl %ecx, %eax
je 0x5adeb
jmp 0x5adf6
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x5ada0
cmpq $0x0, -0x20(%rbp)
jne 0x5ae07
movq $0x0, -0x8(%rbp)
jmp 0x5ae7b
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x5ae37
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x5ae62
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
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: MemOSAlloc
static void * MemOSAlloc(sxu32 nBytes)
{
	sxu32 *pChunk;
	pChunk = (sxu32 *)SyOSHeapAlloc(nBytes + sizeof(sxu32));
	if( pChunk == 0 ){
		return 0;
	}
	pChunk[0] = nBytes;
	return (void *)&pChunk[1];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x4, %rax
movl %eax, %edi
callq 0x5afb0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x5aebe
movq $0x0, -0x8(%rbp)
jmp 0x5aed3
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: MemOSRealloc
static void * MemOSRealloc(void *pOld, sxu32 nBytes)
{
	sxu32 *pOldChunk;
	sxu32 *pChunk;
	pOldChunk = (sxu32 *)(((char *)pOld)-sizeof(sxu32));
	if( pOldChunk[0] >= nBytes ){
		return pOld;
	}
	pChunk = (sxu32 *)SyOSHeapRealloc(pOldChunk, nBytes + sizeof(sxu32));
	if( pChunk == 0 ){
		return 0;
	}
	pChunk[0] = nBytes;
	return (void *)&pChunk[1];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
addq $-0x4, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
cmpl -0x14(%rbp), %eax
jb 0x5af10
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5af4c
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
addq $0x4, %rax
movl %eax, %esi
callq 0x5afe0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x5af37
movq $0x0, -0x8(%rbp)
jmp 0x5af4c
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
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: SyMemBackendMakeThreadSafe
JX9_PRIVATE sxi32 SyMemBackendMakeThreadSafe(SyMemBackend *pBackend, const SyMutexMethods *pMethods)
{
	SyMutex *pMutex;
#if defined(UNTRUST)
	if( SXMEM_BACKEND_CORRUPT(pBackend) || pMethods == 0 || pMethods->xNew == 0){
		return SXERR_CORRUPT;
	}
#endif
	pMutex = pMethods->xNew(SXMUTEX_TYPE_FAST);
	if( pMutex == 0 ){
		return SXERR_OS;
	}
	/* Attach the mutex to the memory backend */
	pBackend->pMutex = pMutex;
	pBackend->pMutexMethods = pMethods;
	return SXRET_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x1, %edi
callq *0x10(%rax)
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x5b440
movl $0xffffffe9, -0x4(%rbp) # imm = 0xFFFFFFE9
jmp 0x5b45e
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -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: SySetInit
JX9_PRIVATE sxi32 SySetInit(SySet *pSet, SyMemBackend *pAllocator, sxu32 ElemSize)
{
	pSet->nSize = 0 ;
	pSet->nUsed = 0;
	pSet->nCursor = 0;
	pSet->eSize = ElemSize;
	pSet->pAllocator = pAllocator;
	pSet->pBase =  0;
	pSet->pUserData = 0;
	return SXRET_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1c(%rax)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x20(%rax)
xorl %eax, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unixDelete
static int unixDelete(
  unqlite_vfs *NotUsed,     /* VFS containing this as the xDelete method */
  const char *zPath,        /* Name of file to be deleted */
  int dirSync               /* If true, fsync() directory after deleting file */
){
  int rc = UNQLITE_OK;
  SXUNUSED(NotUsed);
  
  if( unlink(zPath)==(-1) && errno!=ENOENT ){
	  return UNQLITE_IOERR;
  }
#ifndef UNQLITE_DISABLE_DIRSYNC
  if( dirSync ){
    int fd;
    rc = openDirectory(zPath, &fd);
    if( rc==UNQLITE_OK ){
      if( fsync(fd) )
      {
        rc = UNQLITE_IOERR;
      }
      if( close(fd) && !rc ){
        rc = UNQLITE_IOERR;
      }
    }
  }
#endif
  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 $0x0, -0x10(%rbp)
movq -0x18(%rbp), %rdi
callq 0xd360
cmpl $-0x1, %eax
jne 0x5b793
callq 0xdcc0
cmpl $0x2, (%rax)
je 0x5b793
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x5b7e7
cmpl $0x0, -0x1c(%rbp)
je 0x5b7e1
movq -0x18(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x5bc90
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0x5b7df
movl -0x24(%rbp), %edi
callq 0xdaa0
cmpl $0x0, %eax
je 0x5b7c3
movl $0xfffffffe, -0x20(%rbp) # imm = 0xFFFFFFFE
movl -0x24(%rbp), %edi
callq 0xd350
cmpl $0x0, %eax
je 0x5b7dd
cmpl $0x0, -0x20(%rbp)
jne 0x5b7dd
movl $0xfffffffe, -0x20(%rbp) # imm = 0xFFFFFFFE
jmp 0x5b7df
jmp 0x5b7e1
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unixAccess
static int unixAccess(
  unqlite_vfs *NotUsed,   /* The VFS containing this xAccess method */
  const char *zPath,      /* Path of the file to examine */
  int flags,              /* What do we want to learn about the zPath file? */
  int *pResOut            /* Write result boolean here */
){
  int amode = 0;
  SXUNUSED(NotUsed);
  switch( flags ){
    case UNQLITE_ACCESS_EXISTS:
      amode = F_OK;
      break;
    case UNQLITE_ACCESS_READWRITE:
      amode = W_OK|R_OK;
      break;
    case UNQLITE_ACCESS_READ:
      amode = R_OK;
      break;
    default:
		/* Can't happen */
      break;
  }
  *pResOut = (access(zPath, amode)==0);
  if( flags==UNQLITE_ACCESS_EXISTS && *pResOut ){
    struct stat buf;
    if( 0==stat(zPath, &buf) && buf.st_size==0 ){
      *pResOut = 0;
    }
  }
  return UNQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq $0x0, -0x8(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0xbc(%rbp)
testl %eax, %eax
je 0x5b842
jmp 0x5b828
movl -0xbc(%rbp), %eax
subl $0x1, %eax
je 0x5b84b
jmp 0x5b835
movl -0xbc(%rbp), %eax
subl $0x2, %eax
je 0x5b854
jmp 0x5b85d
movl $0x0, -0x24(%rbp)
jmp 0x5b85f
movl $0x6, -0x24(%rbp)
jmp 0x5b85f
movl $0x4, -0x24(%rbp)
jmp 0x5b85f
jmp 0x5b85f
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0xd1c0
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
cmpl $0x0, -0x14(%rbp)
jne 0x5b8b9
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x5b8b9
movq -0x10(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0xd150
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x5b8b7
cmpq $0x0, -0x88(%rbp)
jne 0x5b8b7
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
jmp 0x5b8b9
xorl %eax, %eax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unixFullPathname
static int unixFullPathname(
  unqlite_vfs *pVfs,            /* Pointer to vfs object */
  const char *zPath,            /* Possibly relative input path */
  int nOut,                     /* Size of output buffer in bytes */
  char *zOut                    /* Output buffer */
){
  if( zPath[0]=='/' ){
	  Systrcpy(zOut,(sxu32)nOut,zPath,0);
	  SXUNUSED(pVfs);
  }else{
    sxu32 nCwd;
	zOut[nOut-1] = '\0';
    if( getcwd(zOut, nOut-1)==0 ){
		return UNQLITE_IOERR;
    }
    nCwd = SyStrlen(zOut);
    SyBufferFormat(&zOut[nCwd],(sxu32)nOut-nCwd,"/%s",zPath);
  }
  return UNQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x5b90f
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq -0x18(%rbp), %rdx
xorl %ecx, %ecx
callq 0x5c000
movq $0x0, -0x10(%rbp)
jmp 0x5b96f
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xd4e0
cmpq $0x0, %rax
jne 0x5b941
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x5b976
movq -0x28(%rbp), %rdi
callq 0x55d10
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %eax
addq %rax, %rdi
movl -0x1c(%rbp), %esi
subl -0x2c(%rbp), %esi
movq -0x18(%rbp), %rcx
leaq 0x6be5b(%rip), %rdx     # 0xc77c3
movb $0x0, %al
callq 0x5d800
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unixSleep
static int unixSleep(unqlite_vfs *NotUsed, int microseconds)
{
#if defined(HAVE_USLEEP) && HAVE_USLEEP
  usleep(microseconds);
  SXUNUSED(NotUsed);
  return microseconds;
#else
  int seconds = (microseconds+999999)/1000000;
  SXUNUSED(NotUsed);
  sleep(seconds);
  return seconds*1000000;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl $0xf423f, %eax          # imm = 0xF423F
movl $0xf4240, %ecx          # imm = 0xF4240
cltd
idivl %ecx
movl %eax, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
movl -0x10(%rbp), %edi
callq 0xdde0
imull $0xf4240, -0x10(%rbp), %eax # imm = 0xF4240
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unixCurrentTime
static int unixCurrentTime(unqlite_vfs *pVfs,Sytm *pOut)
{
	struct tm *pTm;
	time_t tt;
	SXUNUSED(pVfs);
	time(&tt);
	pTm = gmtime(&tt);
	if( pTm ){ /* Yes, it can fail */
		STRUCT_TM_TO_SYTM(pTm,pOut);
	}
	return UNQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
leaq -0x20(%rbp), %rdi
callq 0xd980
leaq -0x20(%rbp), %rdi
callq 0xd3a0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x5ba93
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rax
movl 0x14(%rax), %ecx
addl $0x76c, %ecx            # imm = 0x76C
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x18(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: findReusableFd
static UnixUnusedFd *findReusableFd(const char *zPath, int flags){
  UnixUnusedFd *pUnused = 0;
  struct stat sStat;                   /* Results of stat() call */
  /* A stat() call may fail for various reasons. If this happens, it is
  ** almost certain that an open() call on the same path will also fail.
  ** For this reason, if an error occurs in the stat() call here, it is
  ** ignored and -1 is returned. The caller will try to open a new file
  ** descriptor on the same path, fail, and return an error to SQLite.
  **
  ** Even if a subsequent open() call does succeed, the consequences of
  ** not searching for a resusable file descriptor are not dire.  */
  if( 0==stat(zPath, &sStat) ){
    unixInodeInfo *pInode;

    unixEnterMutex();
    pInode = inodeList;
    while( pInode && (pInode->fileId.dev!=sStat.st_dev
                     || pInode->fileId.ino!=sStat.st_ino) ){
       pInode = pInode->pNext;
    }
    if( pInode ){
      UnixUnusedFd **pp;
      for(pp=&pInode->pUnused; *pp && (*pp)->flags!=flags; pp=&((*pp)->pNext));
      pUnused = *pp;
      if( pUnused ){
        *pp = pUnused->pNext;
      }
    }
    unixLeaveMutex();
  }
  return pUnused;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0xd150
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x5bbfe
callq 0x5bec0
movq 0x939ee(%rip), %rax     # 0xef4d0
movq %rax, -0xb0(%rbp)
xorl %eax, %eax
cmpq $0x0, -0xb0(%rbp)
movb %al, -0xb9(%rbp)
je 0x5bb3d
movq -0xb0(%rbp), %rax
movq (%rax), %rcx
movb $0x1, %al
cmpq -0xa8(%rbp), %rcx
movb %al, -0xba(%rbp)
jne 0x5bb31
movq -0xb0(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0xa0(%rbp), %rax
setne %al
movb %al, -0xba(%rbp)
movb -0xba(%rbp), %al
movb %al, -0xb9(%rbp)
movb -0xb9(%rbp), %al
testb $0x1, %al
jne 0x5bb49
jmp 0x5bb5d
movq -0xb0(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0xb0(%rbp)
jmp 0x5bae9
cmpq $0x0, -0xb0(%rbp)
je 0x5bbf9
movq -0xb0(%rbp), %rax
addq $0x20, %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, (%rcx)
movb %al, -0xbb(%rbp)
je 0x5bbab
movq -0xb8(%rbp), %rax
movq (%rax), %rax
movl 0x4(%rax), %eax
cmpl -0xc(%rbp), %eax
setne %al
movb %al, -0xbb(%rbp)
movb -0xbb(%rbp), %al
testb $0x1, %al
jne 0x5bbb7
jmp 0x5bbd0
jmp 0x5bbb9
movq -0xb8(%rbp), %rax
movq (%rax), %rax
addq $0x8, %rax
movq %rax, -0xb8(%rbp)
jmp 0x5bb7d
movq -0xb8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x5bbf7
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0xb8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x5bbf9
callq 0x5bf10
movq -0x18(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: findCreateFileMode
static int findCreateFileMode(
  const char *zPath,              /* Path of file (possibly) being created */
  int flags,                      /* Flags passed as 4th argument to xOpen() */
  mode_t *pMode                   /* OUT: Permissions to open file with */
){
  int rc = UNQLITE_OK;             /* Return Code */
  if( flags & UNQLITE_OPEN_TEMP_DB ){
    *pMode = 0600;
     SXUNUSED(zPath);
  }else{
    *pMode = UNQLITE_DEFAULT_FILE_PERMISSIONS;
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0xc(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x5bc75
movq -0x18(%rbp), %rax
movl $0x180, (%rax)          # imm = 0x180
movq $0x0, -0x8(%rbp)
jmp 0x5bc7f
movq -0x18(%rbp), %rax
movl $0x1a4, (%rax)          # imm = 0x1A4
movl -0x1c(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: openDirectory
static int openDirectory(const char *zFilename, int *pFd){
  sxu32 ii;
  int fd = -1;
  char zDirname[MAX_PATHNAME+1];
  sxu32 n;
  n = Systrcpy(zDirname,sizeof(zDirname),zFilename,0);
  for(ii=n; ii>1 && zDirname[ii]!='/'; ii--);
  if( ii>0 ){
    zDirname[ii] = '\0';
    fd = open(zDirname, O_RDONLY|O_BINARY, 0);
    if( fd>=0 ){
#ifdef FD_CLOEXEC
      fcntl(fd, F_SETFD, fcntl(fd, F_GETFD, 0) | FD_CLOEXEC);
#endif
    }
  }
  *pFd = fd;
  return (fd>=0?UNQLITE_OK: UNQLITE_IOERR );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0xffffffff, -0x18(%rbp) # imm = 0xFFFFFFFF
leaq -0x220(%rbp), %rdi
movq -0x8(%rbp), %rdx
movl $0x201, %esi            # imm = 0x201
xorl %ecx, %ecx
callq 0x5c000
movl %eax, -0x224(%rbp)
movl -0x224(%rbp), %eax
movl %eax, -0x14(%rbp)
xorl %eax, %eax
cmpl $0x1, -0x14(%rbp)
movb %al, -0x225(%rbp)
jbe 0x5bcf5
movl -0x14(%rbp), %eax
movsbl -0x220(%rbp,%rax), %eax
cmpl $0x2f, %eax
setne %al
movb %al, -0x225(%rbp)
movb -0x225(%rbp), %al
testb $0x1, %al
jne 0x5bd01
jmp 0x5bd0e
jmp 0x5bd03
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5bcd0
cmpl $0x0, -0x14(%rbp)
jbe 0x5bd6d
movl -0x14(%rbp), %eax
movb $0x0, -0x220(%rbp,%rax)
leaq -0x220(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
movb $0x0, %al
callq 0xd600
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jl 0x5bd6b
movl -0x18(%rbp), %eax
movl %eax, -0x22c(%rbp)
movl -0x18(%rbp), %edi
movl $0x1, %esi
xorl %edx, %edx
movb $0x0, %al
callq 0xd230
movl -0x22c(%rbp), %edi
movl %eax, %edx
orl $0x1, %edx
movl $0x2, %esi
movb $0x0, %al
callq 0xd230
jmp 0x5bd6d
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x18(%rbp), %edx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovgel %ecx, %eax
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unixEnterMutex
static void unixEnterMutex(void){
#ifdef UNQLITE_ENABLE_THREADS
	const SyMutexMethods *pMutexMethods = SyMutexExportMethods();
	if( pMutexMethods ){
		SyMutex *pMutex = pMutexMethods->xNew(SXMUTEX_TYPE_STATIC_2); /* pre-allocated, never fail */
		SyMutexEnter(pMutexMethods,pMutex);
	}
#endif /* UNQLITE_ENABLE_THREADS */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x5b400
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x5beff
movq -0x8(%rbp), %rax
movl $0x4, %edi
callq *0x10(%rax)
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x5befd
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
jmp 0x5beff
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: unixLeaveMutex
static void unixLeaveMutex(void){
#ifdef UNQLITE_ENABLE_THREADS
  const SyMutexMethods *pMutexMethods = SyMutexExportMethods();
  if( pMutexMethods ){
	 SyMutex *pMutex = pMutexMethods->xNew(SXMUTEX_TYPE_STATIC_2); /* pre-allocated, never fail */
	 SyMutexLeave(pMutexMethods,pMutex);
  }
#endif /* UNQLITE_ENABLE_THREADS */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x5b400
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x5bf4f
movq -0x8(%rbp), %rax
movl $0x4, %edi
callq *0x10(%rax)
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x5bf4d
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
jmp 0x5bf4f
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: SyMemBackendAlloc
JX9_PRIVATE void * SyMemBackendAlloc(SyMemBackend *pBackend, sxu32 nByte)
{
	void *pChunk;
#if defined(UNTRUST)
	if( SXMEM_BACKEND_CORRUPT(pBackend) ){
		return 0;
	}
#endif
	if( pBackend->pMutexMethods ){
		SyMutexEnter(pBackend->pMutexMethods, pBackend->pMutex);
	}
	pChunk = MemBackendAlloc(&(*pBackend), nByte);
	if( pBackend->pMutexMethods ){
		SyMutexLeave(pBackend->pMutexMethods, pBackend->pMutex);
	}
	return pChunk;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x5bfab
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x5bfa9
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
jmp 0x5bfab
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x5ad80
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x5bfe7
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x5bfe5
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
jmp 0x5bfe7
movq -0x18(%rbp), %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: Systrcpy
JX9_PRIVATE sxu32 Systrcpy(char *zDest, sxu32 nDestLen, const char *zSrc, sxu32 nLen)
{
	unsigned char *zBuf = (unsigned char *)zDest;
	unsigned char *zIn = (unsigned char *)zSrc;
	unsigned char *zEnd;
#if defined(UNTRUST)
	if( zSrc == (const char *)zDest ){
			return 0;
	}
#endif
	if( nLen <= 0 ){
		nLen = SyStrlen(zSrc);
	}
	zEnd = &zBuf[nDestLen - 1]; /* reserve a room for the null terminator */
	for(;;){
		if( zBuf >= zEnd || nLen == 0 ){ break;} zBuf[0] = zIn[0]; zIn++; zBuf++; nLen--;
		if( zBuf >= zEnd || nLen == 0 ){ break;} zBuf[0] = zIn[0]; zIn++; zBuf++; nLen--;
		if( zBuf >= zEnd || nLen == 0 ){ break;} zBuf[0] = zIn[0]; zIn++; zBuf++; nLen--;
		if( zBuf >= zEnd || nLen == 0 ){ break;} zBuf[0] = zIn[0]; zIn++; zBuf++; nLen--;
	}
	zBuf[0] = 0;
	return (sxu32)(zBuf-(unsigned char *)zDest);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpl $0x0, -0x1c(%rbp)
ja 0x5c038
movq -0x18(%rbp), %rdi
callq 0x55d10
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x5c05b
cmpl $0x0, -0x1c(%rbp)
jne 0x5c060
jmp 0x5c152
movq -0x30(%rbp), %rax
movb (%rax), %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x5c09d
cmpl $0x0, -0x1c(%rbp)
jne 0x5c0a2
jmp 0x5c152
movq -0x30(%rbp), %rax
movb (%rax), %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x5c0df
cmpl $0x0, -0x1c(%rbp)
jne 0x5c0e1
jmp 0x5c152
movq -0x30(%rbp), %rax
movb (%rax), %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x5c11e
cmpl $0x0, -0x1c(%rbp)
jne 0x5c120
jmp 0x5c152
movq -0x30(%rbp), %rax
movb (%rax), %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5c04b
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)