LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: jx9Builtin_readdir
static int jx9Builtin_readdir(jx9_context *pCtx, int nArg, jx9_value **apArg)
{
	const jx9_io_stream *pStream;
	io_private *pDev;
	int rc;
	if( nArg < 1 || !jx9_value_is_resource(apArg[0]) ){
		/* Missing/Invalid arguments, return FALSE */
		jx9_context_throw_error(pCtx, JX9_CTX_WARNING, "Expecting an IO handle");
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	/* Extract our private data */
	pDev = (io_private *)jx9_value_to_resource(apArg[0]);
	/* Make sure we are dealing with a valid io_private instance */
	if( IO_PRIVATE_INVALID(pDev) ){
		/*Expecting an IO handle */
		jx9_context_throw_error(pCtx, JX9_CTX_WARNING, "Expecting an IO handle");
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	/* Point to the target IO stream device */
	pStream = pDev->pStream;
	if( pStream == 0  || pStream->xReadDir == 0 ){
		jx9_context_throw_error_format(pCtx, JX9_CTX_WARNING, 
			"IO routine(%s) not implemented in the underlying stream(%s) device, JX9 is returning FALSE", 
			jx9_function_name(pCtx), pStream ? pStream->zName : "null_stream"
			);
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	jx9_result_bool(pCtx, 0);
	/* Perform the requested operation */
	rc = pStream->xReadDir(pDev->pHandle, pCtx);
	if( rc != JX9_OK ){
		/* Return FALSE */
		jx9_result_bool(pCtx, 0);
	}
	return JX9_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
jle 0x63ca6
movq (%rdx), %rax
testb $0x1, 0x9(%rax)
je 0x63ca6
movq (%rax), %r12
testq %r12, %r12
je 0x63ca6
cmpl $0xfeac14, 0x34(%r12)   # imm = 0xFEAC14
jne 0x63ca6
movq (%r12), %r15
testq %r15, %r15
je 0x63cf1
cmpq $0x0, 0x38(%r15)
je 0x63cf1
movq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x309f2
movq $0x0, (%r14)
movl $0xfffffe90, %eax       # imm = 0xFFFFFE90
andl 0x8(%r14), %eax
orl $0x8, %eax
movl %eax, 0x8(%r14)
movq 0x8(%r12), %rdi
movq %rbx, %rsi
callq *0x38(%r15)
testl %eax, %eax
jne 0x63cc2
jmp 0x63ce6
movq (%rbx), %rsi
movq 0x60(%rbx), %rdi
addq $0x8, %rsi
leaq 0x15a09(%rip), %rcx     # 0x796c1
movl $0x2, %edx
callq 0x4153c
addq $0x8, %rbx
movq (%rbx), %rbx
movq %rbx, %rdi
callq 0x309f2
movq $0x0, (%rbx)
movl $0xfffffe90, %eax       # imm = 0xFFFFFE90
andl 0x8(%rbx), %eax
orl $0x8, %eax
movl %eax, 0x8(%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rax
movq 0x8(%rax), %rcx
testq %r15, %r15
je 0x63d02
movq (%r15), %r8
jmp 0x63d09
leaq 0x15a2a(%rip), %r8      # 0x79733
leaq 0x159c8(%rip), %rdx     # 0x796d8
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x45d26
jmp 0x63cc2
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: jx9Builtin_rewinddir
static int jx9Builtin_rewinddir(jx9_context *pCtx, int nArg, jx9_value **apArg)
{
	const jx9_io_stream *pStream;
	io_private *pDev;
	if( nArg < 1 || !jx9_value_is_resource(apArg[0]) ){
		/* Missing/Invalid arguments, return FALSE */
		jx9_context_throw_error(pCtx, JX9_CTX_WARNING, "Expecting an IO handle");
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	/* Extract our private data */
	pDev = (io_private *)jx9_value_to_resource(apArg[0]);
	/* Make sure we are dealing with a valid io_private instance */
	if( IO_PRIVATE_INVALID(pDev) ){
		/*Expecting an IO handle */
		jx9_context_throw_error(pCtx, JX9_CTX_WARNING, "Expecting an IO handle");
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	/* Point to the target IO stream device */
	pStream = pDev->pStream;
	if( pStream == 0  || pStream->xRewindDir == 0 ){
		jx9_context_throw_error_format(pCtx, JX9_CTX_WARNING, 
			"IO routine(%s) not implemented in the underlying stream(%s) device, JX9 is returning FALSE", 
			jx9_function_name(pCtx), pStream ? pStream->zName : "null_stream"
			);
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	/* Perform the requested operation */
	pStream->xRewindDir(pDev->pHandle);
	return JX9_OK;
 }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
jle 0x63d61
movq (%rdx), %rax
testb $0x1, 0x9(%rax)
je 0x63d61
movq (%rax), %rax
testq %rax, %rax
je 0x63d61
cmpl $0xfeac14, 0x34(%rax)   # imm = 0xFEAC14
jne 0x63d61
movq (%rax), %rdx
testq %rdx, %rdx
je 0x63da7
movq 0x58(%rdx), %rcx
testq %rcx, %rcx
je 0x63da7
movq 0x8(%rax), %rdi
callq *%rcx
jmp 0x63d9e
movq (%rbx), %rsi
movq 0x60(%rbx), %rdi
addq $0x8, %rsi
leaq 0x1594e(%rip), %rcx     # 0x796c1
movl $0x2, %edx
callq 0x4153c
movq 0x8(%rbx), %rbx
movq %rbx, %rdi
callq 0x309f2
movq $0x0, (%rbx)
movl $0xfffffe90, %eax       # imm = 0xFFFFFE90
andl 0x8(%rbx), %eax
orl $0x8, %eax
movl %eax, 0x8(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq (%rbx), %rax
movq 0x8(%rax), %rcx
testq %rdx, %rdx
je 0x63db8
movq (%rdx), %r8
jmp 0x63dbf
leaq 0x15974(%rip), %r8      # 0x79733
leaq 0x15912(%rip), %rdx     # 0x796d8
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x45d26
jmp 0x63d7d
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: jx9Builtin_closedir
static int jx9Builtin_closedir(jx9_context *pCtx, int nArg, jx9_value **apArg)
{
	const jx9_io_stream *pStream;
	io_private *pDev;
	if( nArg < 1 || !jx9_value_is_resource(apArg[0]) ){
		/* Missing/Invalid arguments, return FALSE */
		jx9_context_throw_error(pCtx, JX9_CTX_WARNING, "Expecting an IO handle");
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	/* Extract our private data */
	pDev = (io_private *)jx9_value_to_resource(apArg[0]);
	/* Make sure we are dealing with a valid io_private instance */
	if( IO_PRIVATE_INVALID(pDev) ){
		/*Expecting an IO handle */
		jx9_context_throw_error(pCtx, JX9_CTX_WARNING, "Expecting an IO handle");
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	/* Point to the target IO stream device */
	pStream = pDev->pStream;
	if( pStream == 0  || pStream->xCloseDir == 0 ){
		jx9_context_throw_error_format(pCtx, JX9_CTX_WARNING, 
			"IO routine(%s) not implemented in the underlying stream(%s) device, JX9 is returning FALSE", 
			jx9_function_name(pCtx), pStream ? pStream->zName : "null_stream"
			);
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	/* Perform the requested operation */
	pStream->xCloseDir(pDev->pHandle);
	/* Release the private stucture */
	ReleaseIOPrivate(pCtx, pDev);
	jx9MemObjRelease(apArg[0]);
	return JX9_OK;
 }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
jle 0x63e43
movq %rdx, %r14
movq (%rdx), %rax
testb $0x1, 0x9(%rax)
je 0x63e43
movq (%rax), %r15
testq %r15, %r15
je 0x63e43
cmpl $0xfeac14, 0x34(%r15)   # imm = 0xFEAC14
jne 0x63e43
movq (%r15), %rax
testq %rax, %rax
je 0x63e8d
movq 0x28(%rax), %rcx
testq %rcx, %rcx
je 0x63e8d
movq 0x8(%r15), %rdi
callq *%rcx
leaq 0x10(%r15), %rdi
callq 0x31d8f
movl $0x2126, 0x34(%r15)     # imm = 0x2126
movq %rbx, %rdi
movq %r15, %rsi
callq 0x31975
movq (%r14), %rdi
callq 0x309f2
jmp 0x63e80
movq (%rbx), %rsi
movq 0x60(%rbx), %rdi
addq $0x8, %rsi
leaq 0x1586c(%rip), %rcx     # 0x796c1
movl $0x2, %edx
callq 0x4153c
movq 0x8(%rbx), %rbx
movq %rbx, %rdi
callq 0x309f2
movq $0x0, (%rbx)
movl $0xfffffe90, %eax       # imm = 0xFFFFFE90
andl 0x8(%rbx), %eax
orl $0x8, %eax
movl %eax, 0x8(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rcx
movq 0x8(%rcx), %rcx
testq %rax, %rax
je 0x63e9e
movq (%rax), %r8
jmp 0x63ea5
leaq 0x1588e(%rip), %r8      # 0x79733
leaq 0x1582c(%rip), %rdx     # 0x796d8
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x45d26
jmp 0x63e5f
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: jx9Builtin_flock
static int jx9Builtin_flock(jx9_context *pCtx, int nArg, jx9_value **apArg)
{
	const jx9_io_stream *pStream;
	io_private *pDev;
	int nLock;
	int rc;
	if( nArg < 2 || !jx9_value_is_resource(apArg[0]) ){
		/* Missing/Invalid arguments, return FALSE */
		jx9_context_throw_error(pCtx, JX9_CTX_WARNING, "Expecting an IO handle");
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	/* Extract our private data */
	pDev = (io_private *)jx9_value_to_resource(apArg[0]);
	/* Make sure we are dealing with a valid io_private instance */
	if( IO_PRIVATE_INVALID(pDev) ){
		/*Expecting an IO handle */
		jx9_context_throw_error(pCtx, JX9_CTX_WARNING, "Expecting an IO handle");
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	/* Point to the target IO stream device */
	pStream = pDev->pStream;
	if( pStream == 0  || pStream->xLock == 0){
		jx9_context_throw_error_format(pCtx, JX9_CTX_WARNING, 
			"IO routine(%s) not implemented in the underlying stream(%s) device, JX9 is returning FALSE", 
			jx9_function_name(pCtx), pStream ? pStream->zName : "null_stream"
			);
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	/* Requested lock operation */
	nLock = jx9_value_to_int(apArg[1]);
	/* Lock operation */
	rc = pStream->xLock(pDev->pHandle, nLock);
	/* IO result */
	jx9_result_bool(pCtx, rc == JX9_OK);
	return JX9_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpl $0x2, %esi
jl 0x64f30
movq (%rdx), %rax
testb $0x1, 0x9(%rax)
je 0x64f30
movq (%rax), %r12
testq %r12, %r12
je 0x64f30
cmpl $0xfeac14, 0x34(%r12)   # imm = 0xFEAC14
jne 0x64f30
movq (%r12), %r15
testq %r15, %r15
je 0x64f78
cmpq $0x0, 0x50(%r15)
je 0x64f78
movq 0x8(%rdx), %r14
movq %r14, %rdi
callq 0x3fd5f
movl (%r14), %esi
movq 0x8(%r12), %rdi
callq *0x50(%r15)
xorl %r14d, %r14d
testl %eax, %eax
sete %r14b
movq 0x8(%rbx), %rbx
movq %rbx, %rdi
callq 0x309f2
movq %r14, (%rbx)
jmp 0x64f5f
movq (%rbx), %rsi
movq 0x60(%rbx), %rdi
addq $0x8, %rsi
leaq 0x1477f(%rip), %rcx     # 0x796c1
movl $0x2, %edx
callq 0x4153c
movq 0x8(%rbx), %rbx
movq %rbx, %rdi
callq 0x309f2
movq $0x0, (%rbx)
movl $0xfffffe90, %eax       # imm = 0xFFFFFE90
andl 0x8(%rbx), %eax
orl $0x8, %eax
movl %eax, 0x8(%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rax
movq 0x8(%rax), %rcx
testq %r15, %r15
je 0x64f89
movq (%r15), %r8
jmp 0x64f90
leaq 0x147a3(%rip), %r8      # 0x79733
leaq 0x14741(%rip), %rdx     # 0x796d8
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x45d26
jmp 0x64f4c
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: jx9Builtin_fclose
static int jx9Builtin_fclose(jx9_context *pCtx, int nArg, jx9_value **apArg)
{
	const jx9_io_stream *pStream;
	io_private *pDev;
	jx9_vm *pVm;
	if( nArg < 1 || !jx9_value_is_resource(apArg[0]) ){
		/* Missing/Invalid arguments, return FALSE */
		jx9_context_throw_error(pCtx, JX9_CTX_WARNING, "Expecting an IO handle");
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	/* Extract our private data */
	pDev = (io_private *)jx9_value_to_resource(apArg[0]);
	/* Make sure we are dealing with a valid io_private instance */
	if( IO_PRIVATE_INVALID(pDev) ){
		/*Expecting an IO handle */
		jx9_context_throw_error(pCtx, JX9_CTX_WARNING, "Expecting an IO handle");
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	/* Point to the target IO stream device */
	pStream = pDev->pStream;
	if( pStream == 0 ){
		jx9_context_throw_error_format(pCtx, JX9_CTX_WARNING, 
			"IO routine(%s) not implemented in the underlying stream(%s) device, JX9 is returning FALSE", 
			jx9_function_name(pCtx), pStream ? pStream->zName : "null_stream"
			);
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	/* Point to the VM that own this context */
	pVm = pCtx->pVm;
	/* TICKET 1433-62: Keep the STDIN/STDOUT/STDERR handles open */
	if( pDev != pVm->pStdin && pDev != pVm->pStdout && pDev != pVm->pStderr ){
		/* Perform the requested operation */
		jx9StreamCloseHandle(pStream, pDev->pHandle);
		/* Release the IO private structure */
		ReleaseIOPrivate(pCtx, pDev);
		/* Invalidate the resource handle */
		jx9_value_release(apArg[0]);
	}
	/* Return TRUE */
	jx9_result_bool(pCtx, 1);
	return JX9_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
jle 0x65042
movq %rdx, %r14
movq (%rdx), %rax
testb $0x1, 0x9(%rax)
je 0x65042
movq (%rax), %r15
testq %r15, %r15
je 0x65042
cmpl $0xfeac14, 0x34(%r15)   # imm = 0xFEAC14
jne 0x65042
movq (%r15), %rax
testq %rax, %rax
je 0x65089
movq 0x60(%rbx), %rcx
movl $0x1, %r12d
cmpq 0x4d0(%rcx), %r15
je 0x65061
cmpq 0x4d8(%rcx), %r15
je 0x65061
cmpq 0x4e0(%rcx), %r15
je 0x65061
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x6501c
movq 0x8(%r15), %rdi
callq *%rax
leaq 0x10(%r15), %rdi
callq 0x31d8f
movl $0x2126, 0x34(%r15)     # imm = 0x2126
movq %rbx, %rdi
movq %r15, %rsi
callq 0x31975
movq (%r14), %rdi
callq 0x309f2
jmp 0x65061
movq (%rbx), %rsi
movq 0x60(%rbx), %rdi
addq $0x8, %rsi
leaq 0x1466d(%rip), %rcx     # 0x796c1
movl $0x2, %edx
callq 0x4153c
xorl %r12d, %r12d
movq 0x8(%rbx), %rbx
movq %rbx, %rdi
callq 0x309f2
movq %r12, (%rbx)
movl $0xfffffe90, %eax       # imm = 0xFFFFFE90
andl 0x8(%rbx), %eax
orl $0x8, %eax
movl %eax, 0x8(%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rax
movq 0x8(%rax), %rcx
leaq 0x14641(%rip), %rdx     # 0x796d8
leaq 0x14695(%rip), %r8      # 0x79733
xorl %r12d, %r12d
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x45d26
jmp 0x65061
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: jx9Builtin_fpassthru
static int jx9Builtin_fpassthru(jx9_context *pCtx, int nArg, jx9_value **apArg)
{
	const jx9_io_stream *pStream;
	io_private *pDev;
	jx9_int64 n, nRead;
	char zBuf[8192];
	int rc;
	if( nArg < 1 || !jx9_value_is_resource(apArg[0]) ){
		/* Missing/Invalid arguments, return FALSE */
		jx9_context_throw_error(pCtx, JX9_CTX_WARNING, "Expecting an IO handle");
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	/* Extract our private data */
	pDev = (io_private *)jx9_value_to_resource(apArg[0]);
	/* Make sure we are dealing with a valid io_private instance */
	if( IO_PRIVATE_INVALID(pDev) ){
		/*Expecting an IO handle */
		jx9_context_throw_error(pCtx, JX9_CTX_WARNING, "Expecting an IO handle");
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	/* Point to the target IO stream device */
	pStream = pDev->pStream;
	if( pStream == 0  ){
		jx9_context_throw_error_format(pCtx, JX9_CTX_WARNING, 
			"IO routine(%s) not implemented in the underlying stream(%s) device, JX9 is returning FALSE", 
			jx9_function_name(pCtx), pStream ? pStream->zName : "null_stream"
			);
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	/* Perform the requested operation */
	nRead = 0;
	for(;;){
		n = StreamRead(pDev, zBuf, sizeof(zBuf));
		if( n < 1 ){
			/* Error or EOF */
			break;
		}
		/* Increment the read counter */
		nRead += n;
		/* Output data */
		rc = jx9_context_output(pCtx, zBuf, (int)nRead /* FIXME: 64-bit issues */);
		if( rc == JX9_ABORT ){
			/* Consumer callback request an operation abort */
			break;
		}
	}
	/* Total number of bytes readen */
	jx9_result_int64(pCtx, nRead);
	return JX9_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2008, %rsp           # imm = 0x2008
movq %rdi, %rbx
testl %esi, %esi
jle 0x654fc
movq (%rdx), %rax
testb $0x1, 0x9(%rax)
je 0x654fc
movq (%rax), %r15
testq %r15, %r15
je 0x654fc
cmpl $0xfeac14, 0x34(%r15)   # imm = 0xFEAC14
jne 0x654fc
cmpq $0x0, (%r15)
je 0x65552
xorl %r14d, %r14d
leaq -0x2030(%rbp), %r12
movl $0x2, %r13d
movl $0x2000, %edx           # imm = 0x2000
movq %r15, %rdi
movq %r12, %rsi
callq 0x66582
testq %rax, %rax
jle 0x65521
addq %rax, %r14
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %edx
callq 0x31412
cmpl $-0xa, %eax
jne 0x654cf
jmp 0x65521
movq (%rbx), %rsi
movq 0x60(%rbx), %rdi
addq $0x8, %rsi
leaq 0x141b3(%rip), %rcx     # 0x796c1
movl $0x2, %edx
callq 0x4153c
movl $0x8, %r13d
xorl %r14d, %r14d
movq 0x8(%rbx), %rbx
movq %rbx, %rdi
callq 0x309f2
movq %r14, (%rbx)
movl $0xfffffe90, %eax       # imm = 0xFFFFFE90
andl 0x8(%rbx), %eax
orl %r13d, %eax
movl %eax, 0x8(%rbx)
xorl %eax, %eax
addq $0x2008, %rsp           # imm = 0x2008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rax
movq 0x8(%rax), %rcx
leaq 0x14178(%rip), %rdx     # 0x796d8
leaq 0x141cc(%rip), %r8      # 0x79733
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x45d26
movl $0x8, %r13d
jmp 0x65521
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: StreamRead
static jx9_int64 StreamRead(io_private *pDev, void *pBuf, jx9_int64 nLen)
{
	const jx9_io_stream *pStream = pDev->pStream;
	char *zBuf = (char *)pBuf;
	jx9_int64 n, nRead;
	n = SyBlobLength(&pDev->sBuffer) - pDev->nOfft;
	if( n > 0 ){
		if( n > nLen ){
			n = nLen;
		}
		/* Copy the buffered data */
		SyMemcpy(SyBlobDataAt(&pDev->sBuffer, pDev->nOfft), pBuf, (sxu32)n);
		/* Update the read offset */
		pDev->nOfft += (sxu32)n;
		if( pDev->nOfft >= SyBlobLength(&pDev->sBuffer) ){
			/* Reset the working buffer so that we avoid excessive memory allocation */
			SyBlobReset(&pDev->sBuffer);
			pDev->nOfft = 0;
		}
		nLen -= n;
		if( nLen < 1 ){
			/* All done */
			return n;
		}
		/* Advance the cursor */
		zBuf += n;
	}
	/* Read without buffering */
	nRead = pStream->xRead(pDev->pHandle, zBuf, nLen);
	if( nRead > 0 ){
		n += nRead;
	}else if( n < 1 ){
		/* EOF or IO error */
		return nRead;
	}
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq (%rdi), %r13
movl 0x20(%rdi), %ebx
movl 0x30(%rdi), %edi
cmpl %edi, %ebx
jne 0x665aa
xorl %ebx, %ebx
jmp 0x66612
subl %edi, %ebx
cmpq %r14, %rbx
cmovgeq %r14, %rbx
addq 0x18(%r12), %rdi
movq %r15, %rsi
movl %ebx, %edx
callq 0x34fc5
movl 0x30(%r12), %eax
addl %ebx, %eax
movl %eax, 0x30(%r12)
cmpl 0x20(%r12), %eax
jb 0x6660a
movl $0x0, 0x20(%r12)
movl 0x28(%r12), %eax
testb $0x4, %al
je 0x66601
movq $0x0, 0x18(%r12)
movl $0x0, 0x24(%r12)
andl $-0x5, %eax
movl %eax, 0x28(%r12)
movl $0x0, 0x30(%r12)
subq %rbx, %r14
jle 0x66632
addq %rbx, %r15
movq 0x8(%r12), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq *0x30(%r13)
testq %rax, %rax
jle 0x6662b
addq %rax, %rbx
jmp 0x66632
testq %rbx, %rbx
cmovleq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: csv_write_callback
static int csv_write_callback(jx9_value *pKey, jx9_value *pValue, void *pUserData)
{
	struct csv_data *pData = (struct csv_data *)pUserData;
	const char *zData;
	int nLen, c2;
	sxu32 n;
	/* Point to the raw data */
	zData = jx9_value_to_string(pValue, &nLen);
	if( nLen < 1 ){
		/* Nothing to write */
		return JX9_OK;
	}
	if( pData->iCount > 0 ){
		/* Write the delimiter */
		pData->pDev->pStream->xWrite(pData->pDev->pHandle, (const void *)&pData->delimiter, sizeof(char));
	}
	n = 1;
	c2 = 0;
	if( SyByteFind(zData, (sxu32)nLen, pData->delimiter, 0) == SXRET_OK || 
		SyByteFind(zData, (sxu32)nLen, pData->enclosure, &n) == SXRET_OK ){
			c2 = 1;
			if( n == 0 ){
				c2 = 2;
			}
			/* Write the enclosure */
			pData->pDev->pStream->xWrite(pData->pDev->pHandle, (const void *)&pData->enclosure, sizeof(char));
			if( c2 > 1 ){
				pData->pDev->pStream->xWrite(pData->pDev->pHandle, (const void *)&pData->enclosure, sizeof(char));
			}
	}
	/* Write the data */
	if( pData->pDev->pStream->xWrite(pData->pDev->pHandle, (const void *)zData, (jx9_int64)nLen) < 1 ){
		SXUNUSED(pKey); /* cc warning */
		return JX9_ABORT;
	}
	if( c2 > 0 ){
		/* Write the enclosure */
		pData->pDev->pStream->xWrite(pData->pDev->pHandle, (const void *)&pData->enclosure, sizeof(char));
		if( c2 > 1 ){
			pData->pDev->pStream->xWrite(pData->pDev->pHandle, (const void *)&pData->enclosure, sizeof(char));
		}
	}
	pData->iCount++;
	return JX9_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %rdi
leaq -0x2c(%rbp), %r15
movq %r15, %rsi
callq 0x30b04
cmpl $0x0, (%r15)
jle 0x66947
movq %rax, %r14
cmpl $0x0, 0x10(%rbx)
jle 0x66876
movq 0x8(%rbx), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rdi
movl $0x1, %edx
movq %rbx, %rsi
callq *0x40(%rcx)
movl $0x1, -0x30(%rbp)
movl -0x2c(%rbp), %esi
movl (%rbx), %edx
xorl %r12d, %r12d
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x4838e
testl %eax, %eax
je 0x668a9
movl -0x2c(%rbp), %esi
movl 0x4(%rbx), %edx
leaq -0x30(%rbp), %rcx
movq %r14, %rdi
callq 0x4838e
testl %eax, %eax
jne 0x668ef
movl -0x30(%rbp), %r13d
xorl %r12d, %r12d
testl %r13d, %r13d
sete %r12b
incl %r12d
movq 0x8(%rbx), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rdi
leaq 0x4(%rbx), %r15
movl $0x1, %edx
movq %r15, %rsi
callq *0x40(%rcx)
testl %r13d, %r13d
jne 0x668ef
movq 0x8(%rbx), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rdi
movl $0x1, %edx
movq %r15, %rsi
callq *0x40(%rcx)
movq 0x8(%rbx), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rdi
movslq -0x2c(%rbp), %rdx
movq %r14, %rsi
callq *0x40(%rcx)
testq %rax, %rax
jle 0x6694b
testl %r12d, %r12d
je 0x66944
movq 0x8(%rbx), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rdi
leaq 0x4(%rbx), %r14
movl $0x1, %edx
movq %r14, %rsi
callq *0x40(%rcx)
cmpl $0x1, %r12d
je 0x66944
movq 0x8(%rbx), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rdi
movl $0x1, %edx
movq %r14, %rsi
callq *0x40(%rcx)
incl 0x10(%rbx)
xorl %eax, %eax
jmp 0x66950
movl $0xfffffff6, %eax       # imm = 0xFFFFFFF6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: UnixDir_Read
static int UnixDir_Read(void *pUserData, jx9_context *pCtx)
{
	DIR *pDir = (DIR *)pUserData;
	struct dirent *pEntry;
	char *zName = 0; /* cc warning */
	sxu32 n = 0;
	for(;;){
		pEntry = readdir(pDir);
		if( pEntry == 0 ){
			/* No more entries to process */
			return -1;
		}
		zName = pEntry->d_name; 
		n = SyStrlen(zName);
		/* Ignore '.' && '..' */
		if( n > sizeof("..")-1 || zName[0] != '.' || ( n == sizeof("..")-1 && zName[1] != '.') ){
			break;
		}
		/* Next entry */
	}
	/* Return the current file name */
	jx9_result_string(pCtx, zName, (int)n);
	return JX9_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
callq 0xc8a0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x66aea
leaq 0x13(%rax), %rsi
movb 0x13(%rax), %cl
movq %rsi, %rdx
testb %cl, %cl
je 0x66ac1
movq %rsi, %rdi
cmpb $0x0, 0x1(%rdi)
je 0x66aaf
cmpb $0x0, 0x2(%rdi)
je 0x66ab4
cmpb $0x0, 0x3(%rdi)
je 0x66aba
leaq 0x4(%rdi), %rdx
cmpb $0x0, 0x4(%rdi)
movq %rdx, %rdi
jne 0x66a8e
jmp 0x66ac1
incq %rdi
jmp 0x66abe
addq $0x2, %rdi
jmp 0x66abe
addq $0x3, %rdi
movq %rdi, %rdx
subl %esi, %edx
cmpb $0x2e, %cl
jne 0x66adf
cmpl $0x2, %edx
ja 0x66adf
jne 0x66ad5
cmpb $0x2e, 0x14(%rax)
jne 0x66adf
movq %r15, %rdi
callq 0xc8a0
jmp 0x66a78
movq 0x8(%r14), %rdi
callq 0x3087c
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: UnixFile_Write
static jx9_int64 UnixFile_Write(void *pUserData, const void *pBuffer, jx9_int64 nWrite)
{
	const char *zData = (const char *)pBuffer;
	int fd = SX_PTR_TO_INT(pUserData);
	jx9_int64 nCount;
	ssize_t nWr;
	nCount = 0;
	for(;;){
		if( nWrite < 1 ){
			break;
		}
		nWr = write(fd, zData, (size_t)nWrite);
		if( nWr < 1 ){
			/* IO error */
			break;
		}
		nWrite -= nWr;
		nCount += nWr;
		zData += nWr;
	}
	if( nWrite > 0 ){
		return -1;
	}
	return nCount;
}

// Assembly:
testq %rdx, %rdx
jle 0x66b48
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
movl %r15d, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xcb50
testq %rax, %rax
jle 0x66b31
addq %rax, %r12
addq %rax, %r14
subq %rax, %rbx
jg 0x66b13
testq %rbx, %rbx
movq $-0x1, %rax
cmovleq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: SyHashDeleteEntry
JX9_PRIVATE sxi32 SyHashDeleteEntry(SyHash *pHash, const void *pKey, sxu32 nKeyLen, void **ppUserData)
{
	SyHashEntry_Pr *pEntry;
	sxi32 rc;
#if defined(UNTRUST)
	if( INVALID_HASH(pHash) ){
		return SXERR_CORRUPT;
	}
#endif
	pEntry = HashGetEntry(&(*pHash), pKey, nKeyLen);
	if( pEntry == 0 ){
		return SXERR_NOTFOUND;
	}
	rc = HashDeleteEntry(&(*pHash), pEntry, ppUserData);
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdi, %r14
callq 0x4573a
testq %rax, %rax
je 0x66ea5
movq 0x38(%rax), %rcx
movq 0x40(%rax), %rdx
testq %rdx, %rdx
je 0x66eaf
addq $0x38, %rdx
jmp 0x66ec0
movl $0xfffffffa, %eax       # imm = 0xFFFFFFFA
popq %rbx
popq %r14
popq %rbp
retq
movl 0x38(%r14), %edx
decl %edx
andl 0x18(%rax), %edx
shlq $0x3, %rdx
addq 0x30(%r14), %rdx
movq %rcx, (%rdx)
movq 0x38(%rax), %rcx
testq %rcx, %rcx
je 0x66ed4
movq 0x40(%rax), %rdx
movq %rdx, 0x40(%rcx)
movq 0x18(%r14), %rcx
cmpq %rax, %rcx
jne 0x66ee5
movq 0x28(%rcx), %rcx
movq %rcx, 0x18(%r14)
movq 0x30(%rax), %rcx
testq %rcx, %rcx
je 0x66ef6
movq 0x28(%rax), %rdx
movq %rdx, 0x28(%rcx)
movq 0x28(%rax), %rdx
testq %rdx, %rdx
je 0x66f03
movq %rcx, 0x30(%rdx)
decl 0x28(%r14)
testq %rbx, %rbx
je 0x66f13
movq 0x10(%rax), %rcx
movq %rcx, (%rbx)
movq (%r14), %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2eb38
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: UnixVfs_Realpath
static int UnixVfs_Realpath(const char *zPath, jx9_context *pCtx)
{
#ifndef JX9_UNIX_OLD_LIBC
	char *zReal;
	zReal = realpath(zPath, 0);
	if( zReal == 0 ){
	  return -1;
	}
	jx9_result_string(pCtx, zReal, -1/*Compute length automatically*/);
        /* Release the allocated buffer */
	free(zReal);
	return JX9_OK;
#else
    zPath = 0; /* cc warning */
    pCtx = 0;
    return -1;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xc6b0
testq %rax, %rax
je 0x67042
movq %rax, %r15
movq 0x8(%r14), %rdi
movq %rax, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x3087c
movq %r15, %rdi
callq 0xc250
jmp 0x67047
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: UnixVfs_Chown
static int UnixVfs_Chown(const char *zPath, const char *zUser)
{
#ifndef JX9_UNIX_STATIC_BUILD
  struct passwd *pwd;
  uid_t uid;
  int rc;
  pwd = getpwnam(zUser);   /* Try getting UID for username */
  if (pwd == 0) {
    return -1;
  }
  uid = pwd->pw_uid;
  rc = chown(zPath, uid, -1);
  return rc == 0 ? JX9_OK : -1;
#else
	SXUNUSED(zPath);
	SXUNUSED(zUser);
	return -1;
#endif /* JX9_UNIX_STATIC_BUILD */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xc7e0
testq %rax, %rax
je 0x670d3
movl 0x10(%rax), %esi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xc540
movl %eax, %ecx
xorl %eax, %eax
negl %ecx
sbbl %eax, %eax
jmp 0x670d8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: UnixVfs_Chgrp
static int UnixVfs_Chgrp(const char *zPath, const char *zGroup)
{
#ifndef JX9_UNIX_STATIC_BUILD
  struct group *group;
  gid_t gid;
  int rc;
  group = getgrnam(zGroup);
  if (group == 0) {
    return -1;
  }
  gid = group->gr_gid;
  rc = chown(zPath, -1, gid);
  return rc == 0 ? JX9_OK : -1;
#else
	SXUNUSED(zPath);
	SXUNUSED(zGroup);
	return -1;
#endif /* JX9_UNIX_STATIC_BUILD */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xc6c0
testq %rax, %rax
je 0x6710f
movl 0x10(%rax), %edx
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xc540
movl %eax, %ecx
xorl %eax, %eax
negl %ecx
sbbl %eax, %eax
jmp 0x67114
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: UnixVfs_Filetype
static int UnixVfs_Filetype(const char *zPath, jx9_context *pCtx)
{
	struct stat st;
	int rc;
    rc = stat(zPath, &st);
	if( rc != 0 ){
	  /* Expand 'unknown' */
	  jx9_result_string(pCtx, "unknown", sizeof("unknown")-1);
	  return -1;
	}
	if(S_ISREG(st.st_mode) ){
		jx9_result_string(pCtx, "file", sizeof("file")-1);
	}else if(S_ISDIR(st.st_mode)){
		jx9_result_string(pCtx, "dir", sizeof("dir")-1);
	}else if(S_ISLNK(st.st_mode)){
		jx9_result_string(pCtx, "link", sizeof("link")-1);
	}else if(S_ISBLK(st.st_mode)){
		jx9_result_string(pCtx, "block", sizeof("block")-1);
    }else if(S_ISSOCK(st.st_mode)){
		jx9_result_string(pCtx, "socket", sizeof("socket")-1);
	}else if(S_ISFIFO(st.st_mode)){
       jx9_result_string(pCtx, "fifo", sizeof("fifo")-1);
	}else{
		jx9_result_string(pCtx, "unknown", sizeof("unknown")-1);
	}
	return JX9_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x98, %rsp
movq %rsi, %rbx
leaq -0x98(%rbp), %rsi
callq 0xc110
testl %eax, %eax
je 0x6783d
movq 0x8(%rbx), %rdi
leaq 0x11dab(%rip), %rsi     # 0x795d4
movl $0x7, %edx
callq 0x3087c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x678c3
movl $0xf000, %eax           # imm = 0xF000
andl -0x80(%rbp), %eax
addl $0xfffff000, %eax       # imm = 0xFFFFF000
shrl $0xc, %eax
movq 0x8(%rbx), %rdi
cmpl $0xb, %eax
ja 0x6788b
leaq 0xd337(%rip), %rcx      # 0x74b94
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x120e7(%rip), %rsi     # 0x79954
jmp 0x678b7
leaq 0x120d1(%rip), %rsi     # 0x79947
movl $0x5, %edx
jmp 0x678bc
leaq 0x120c9(%rip), %rsi     # 0x7994d
movl $0x6, %edx
jmp 0x678bc
leaq 0x11d42(%rip), %rsi     # 0x795d4
movl $0x7, %edx
jmp 0x678bc
leaq 0x11ab6(%rip), %rsi     # 0x79356
movl $0x3, %edx
jmp 0x678bc
leaq 0xe397(%rip), %rsi      # 0x75c45
jmp 0x678b7
leaq 0x11a2f(%rip), %rsi     # 0x792e6
movl $0x4, %edx
callq 0x3087c
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: UnixVfs_Mmap
static int UnixVfs_Mmap(const char *zPath, void **ppMap, jx9_int64 *pSize)
{
	struct stat st;
	void *pMap;
	int fd;
	int rc;
	/* Open the file in a read-only mode */
	fd = open(zPath, O_RDONLY);
	if( fd < 0 ){
		return -1;
	}
	/* stat the handle */
	fstat(fd, &st);
	/* Obtain a memory view of the whole file */
	pMap = mmap(0, st.st_size, PROT_READ, MAP_PRIVATE|MAP_FILE, fd, 0);
	rc = JX9_OK;
	if( pMap == MAP_FAILED ){
		rc = -1;
	}else{
		/* Point to the memory view */
		*ppMap = pMap;
		*pSize = (jx9_int64)st.st_size;
	}
	close(fd);
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %rbx
movq %rsi, %r14
xorl %esi, %esi
xorl %eax, %eax
callq 0xc510
testl %eax, %eax
js 0x679ad
movl %eax, %r15d
leaq -0xb8(%rbp), %r12
movl %eax, %edi
movq %r12, %rsi
callq 0xc9b0
movq 0x30(%r12), %r13
xorl %r12d, %r12d
xorl %edi, %edi
movq %r13, %rsi
movl $0x1, %edx
movl $0x2, %ecx
movl %r15d, %r8d
xorl %r9d, %r9d
callq 0xca70
cmpq $-0x1, %rax
je 0x679b5
movq %rax, (%r14)
movq %r13, (%rbx)
jmp 0x679bb
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x679c3
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %r15d, %edi
callq 0xc2b0
movl %r12d, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: UnixVfs_link
static int UnixVfs_link(const char *zSrc, const char *zTarget, int is_sym)
{
	int rc;
	if( is_sym ){
		/* Symbolic link */
		rc = symlink(zSrc, zTarget);
	}else{
		/* Hard link */
		rc = link(zSrc, zTarget);
	}
	return rc == 0 ? JX9_OK : -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %edx, %edx
je 0x679f1
callq 0xc0b0
jmp 0x679f6
callq 0xc9f0
xorl %ecx, %ecx
negl %eax
sbbl %ecx, %ecx
movl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: UnixVfs_TempDir
static void UnixVfs_TempDir(jx9_context *pCtx)
{
	static const char *azDirs[] = {
     "/var/tmp", 
     "/usr/tmp", 
	 "/usr/local/tmp"
  };
  unsigned int i;
  struct stat buf;
  const char *zDir;
  zDir = getenv("TMPDIR");
  if( zDir && zDir[0] != 0 && !access(zDir, 07) ){
	  jx9_result_string(pCtx, zDir, -1);
	  return;
  }
  for(i=0; i<sizeof(azDirs)/sizeof(azDirs[0]); i++){
	zDir=azDirs[i];
    if( zDir==0 ) continue;
    if( stat(zDir, &buf) ) continue;
    if( !S_ISDIR(buf.st_mode) ) continue;
    if( access(zDir, 07) ) continue;
    /* Got one */
	jx9_result_string(pCtx, zDir, -1);
	return;
  }
  /* Default temp dir */
  jx9_result_string(pCtx, "/tmp", (int)sizeof("/tmp")-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
leaq 0x11f52(%rip), %rdi     # 0x7997a
callq 0xc850
testq %rax, %rax
je 0x67a4b
movq %rax, %r14
cmpb $0x0, (%rax)
je 0x67a4b
movq %r14, %rdi
movl $0x7, %esi
callq 0xc150
testl %eax, %eax
je 0x67ab8
movq %rbx, -0x30(%rbp)
xorl %r12d, %r12d
leaq 0x2de67(%rip), %r13     # 0x958c0
leaq -0xc0(%rbp), %r14
movl $0xf000, %ebx           # imm = 0xF000
movq (%r12,%r13), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xc110
testl %eax, %eax
jne 0x67a98
movl -0xa8(%rbp), %eax
andl %ebx, %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x67a98
movq %r15, %rdi
movl $0x7, %esi
callq 0xc150
testl %eax, %eax
je 0x67ac1
addq $0x8, %r12
cmpq $0x18, %r12
jne 0x67a65
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x11ec4(%rip), %rsi     # 0x79975
movl $0x4, %edx
jmp 0x67ad1
movq 0x8(%rbx), %rdi
movq %r14, %rsi
jmp 0x67acc
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
movq %r15, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3087c
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: UnixVfs_Username
static void UnixVfs_Username(jx9_context *pCtx)
{
#ifndef JX9_UNIX_STATIC_BUILD
  struct passwd *pwd;
  uid_t uid;
  uid = getuid();
  pwd = getpwuid(uid);   /* Try getting UID for username */
  if (pwd == 0) {
    return;
  }
  /* Return the username */
  jx9_result_string(pCtx, pwd->pw_name, -1);
#else
  jx9_result_string(pCtx, "Unknown", -1);
#endif /* JX9_UNIX_STATIC_BUILD */
  return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xc3a0
movl %eax, %edi
callq 0xc270
testq %rax, %rax
je 0x67b36
movq (%rax), %rsi
movq 0x8(%rbx), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3087c
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: pager_create_header
static int pager_create_header(Pager *pPager)
{
	Page *pHeader;
	int rc;
	/* Allocate a new page */
	pHeader = pager_alloc_page(pPager,0);
	if( pHeader == 0 ){
		return UNQLITE_NOMEM;
	}
	pPager->pHeader = pHeader;
	/* Link the page */
	pager_link_page(pPager,pHeader);
	/* Add to the dirty list */
	pager_page_to_dirty_list(pPager,pHeader);
	/* Write the database header */
	rc = pager_write_db_header(pPager);
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %esi, %esi
callq 0x3bb57
testq %rax, %rax
je 0x67d59
movq %rax, %rbx
movq %rax, 0x1a0(%r14)
movq %r14, %rdi
movq %rax, %rsi
callq 0x3bbdb
movl 0x20(%rbx), %eax
testb $0x2, %al
jne 0x67c41
orl $0x26, %eax
movl %eax, 0x20(%rbx)
movq $0x0, 0x40(%rbx)
movq 0x220(%r14), %rax
movq %rax, 0x38(%rbx)
testq %rax, %rax
je 0x67c29
movq %rbx, 0x40(%rax)
movq %rbx, 0x220(%r14)
cmpq $0x0, 0x218(%r14)
jne 0x67c41
movq %rbx, 0x218(%r14)
movq 0x10(%r14), %r15
movq 0x1a0(%r14), %rax
movq (%rax), %rbx
leaq 0xe08f(%rip), %rdi      # 0x75ce5
movq %rbx, %rsi
movl $0x7, %edx
callq 0x34fc5
movl $0x12277cdb, 0x7(%rbx)  # imm = 0x12277CDB
xorps %xmm0, %xmm0
movups %xmm0, 0x1a8(%r14)
movups %xmm0, 0x1b8(%r14)
movups %xmm0, 0x1c8(%r14)
movq $0x0, 0x1d8(%r14)
movq 0x28(%r14), %rdi
movq 0x48(%rdi), %rax
testq %rax, %rax
je 0x67ca6
leaq 0x1a8(%r14), %rsi
callq *%rax
movl 0x1bc(%r14), %ecx
shll $0x9, %ecx
movl 0x1b8(%r14), %eax
shll $0x5, %eax
addl %ecx, %eax
addl 0x1b4(%r14), %eax
shll $0x10, %eax
movl 0x1b0(%r14), %ecx
shll $0xb, %ecx
movl 0x1a8(%r14), %edx
movl 0x1ac(%r14), %esi
shll $0x5, %esi
addl %ecx, %esi
sarl %edx
addl %esi, %edx
addl $0x88000000, %eax       # imm = 0x88000000
orl %edx, %eax
rolw $0x8, %dx
movw %dx, 0xd(%rbx)
movl %eax, %ecx
shrl $0x10, %ecx
movb %cl, 0xc(%rbx)
shrl $0x18, %eax
movb %al, 0xb(%rbx)
movl 0x20c(%r14), %eax
bswapl %eax
movl %eax, 0xf(%rbx)
movl 0x208(%r14), %eax
bswapl %eax
movl %eax, 0x13(%rbx)
movq (%r15), %rax
movq 0x8(%rax), %rax
movq (%rax), %rcx
cmpb $0x0, (%rcx)
movq %rcx, %rax
je 0x67d68
leaq 0x2(%rcx), %rax
cmpb $0x0, -0x1(%rax)
je 0x67d60
cmpb $0x0, (%rax)
je 0x67d68
cmpb $0x0, 0x1(%rax)
je 0x67d65
leaq 0x4(%rax), %rdx
cmpb $0x0, 0x2(%rax)
movq %rdx, %rax
jne 0x67d32
addq $-0x2, %rdx
movq %rdx, %rax
jmp 0x67d68
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x67d90
decq %rax
jmp 0x67d68
incq %rax
subq %rcx, %rax
movl %eax, %ecx
rolw $0x8, %cx
movw %cx, 0x17(%rbx)
addq $0x19, %rbx
movq (%r15), %rcx
movq 0x8(%rcx), %rcx
movq (%rcx), %rdi
movzwl %ax, %edx
movq %rbx, %rsi
callq 0x34fc5
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: pager_write_dirty_pages
static int pager_write_dirty_pages(Pager *pPager,Page *pDirty)
{
	int rc = UNQLITE_OK;
	Page *pNext;
	for(;;){
		if( pDirty == 0 ){
			break;
		}
		/* Point to the next dirty page */
		pNext = pDirty->pDirtyPrev; /* Not a bug: Reverse link */
		if( (pDirty->flags & PAGE_DONT_WRITE) == 0 ){
			rc = unqliteOsWrite(pPager->pfd,pDirty->zData,pPager->iPageSize,pDirty->iPage * pPager->iPageSize);
			if( rc != UNQLITE_OK ){
				/* A rollback should be done */
				break;
			}
		}
		/* Remove stale flags */
		pDirty->flags &= ~(PAGE_DIRTY|PAGE_DONT_WRITE|PAGE_NEED_SYNC|PAGE_IN_JOURNAL|PAGE_HOT_DIRTY);
		if( pDirty->nRef < 1 ){
			/* Unlink the page now it is unused */
			pager_unlink_page(pPager,pDirty);
			/* Release the page */
			pager_release_page(pPager,pDirty);
		}
		/* Point to the next page */
		pDirty = pNext;
	}
	pPager->pDirty = pPager->pFirstDirty = 0;
	pPager->pHotDirty = pPager->pFirstHot = 0;
	pPager->nHot = 0;
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
testq %rsi, %rsi
je 0x67e0e
movq %rsi, %r15
movq 0x40(%r15), %r12
testb $0x8, 0x20(%r15)
jne 0x67ddf
movq 0x30(%rbx), %rdi
movq (%r15), %rsi
movslq 0x208(%rbx), %rdx
movq 0x10(%r15), %rcx
imulq %rdx, %rcx
movq (%rdi), %rax
callq *0x18(%rax)
testl %eax, %eax
jne 0x67e0b
andb $-0x6f, 0x20(%r15)
cmpl $0x0, 0x24(%r15)
jg 0x67e01
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3c701
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3c77b
movq %r12, %r15
testq %r12, %r12
jne 0x67db4
jmp 0x67e0e
movl %eax, %r14d
xorps %xmm0, %xmm0
movups %xmm0, 0x218(%rbx)
movups %xmm0, 0x230(%rbx)
movl $0x0, 0x240(%rbx)
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: page_merge_dirty
static Page * page_merge_dirty(Page *pA, Page *pB)
{
	Page result, *pTail;
    /* Prevent compiler warning */
	result.pDirtyNext = result.pDirtyPrev = 0;
	pTail = &result;
	while( pA && pB ){
		if( pA->iPage < pB->iPage ){
			pTail->pDirtyPrev = pA;
			pA->pDirtyNext = pTail;
			pTail = pA;
			pA = pA->pDirtyPrev;
		}else{
			pTail->pDirtyPrev = pB;
			pB->pDirtyNext = pTail;
			pTail = pB;
			pB = pB->pDirtyPrev;
		}
	}
	if( pA ){
		pTail->pDirtyPrev = pA;
		pA->pDirtyNext = pTail;
	}else if( pB ){
		pTail->pDirtyPrev = pB;
		pB->pDirtyNext = pTail;
	}else{
		pTail->pDirtyPrev = pTail->pDirtyNext = 0;
	}
	return result.pDirtyPrev;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
setne %dl
testq %rsi, %rsi
setne %cl
movl %edx, %eax
andb %cl, %al
xorps %xmm0, %xmm0
movups %xmm0, -0x30(%rbp)
cmpb $0x1, %al
jne 0x67ea9
leaq -0x68(%rbp), %rax
movq %rsi, %r8
movq %rdi, %r9
movq 0x10(%r9), %rcx
cmpq 0x10(%r8), %rcx
jae 0x67e7c
movq %r9, 0x40(%rax)
movq %rax, 0x38(%r9)
movq 0x40(%r9), %rdi
movq %r8, %rsi
movq %r9, %rax
jmp 0x67e8e
movq %r8, 0x40(%rax)
movq %rax, 0x38(%r8)
movq 0x40(%r8), %rsi
movq %r9, %rdi
movq %r8, %rax
testq %rsi, %rsi
setne %cl
testq %rdi, %rdi
setne %dl
je 0x67ead
movq %rsi, %r8
movq %rdi, %r9
testq %rsi, %rsi
jne 0x67e5e
jmp 0x67ead
leaq -0x68(%rbp), %rax
testb %dl, %dl
je 0x67ebb
movq %rdi, 0x40(%rax)
movq %rax, 0x38(%rdi)
jmp 0x67ed0
testb %cl, %cl
je 0x67ec9
movq %rsi, 0x40(%rax)
movq %rax, 0x38(%rsi)
jmp 0x67ed0
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rax)
movq -0x28(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: iobuf_resize
void iobuf_resize(struct iobuf *io, size_t new_size) {
  char *p;
  if ((new_size > io->size || (new_size < io->size && new_size >= io->len)) &&
      (p = (char *) NS_REALLOC(io->buf, new_size)) != NULL) {
    io->size = new_size;
    io->buf = p;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpq %rsi, 0x10(%rdi)
jae 0x67f04
movq (%rbx), %rdi
movq %r14, %rsi
callq 0xc120
testq %rax, %rax
je 0x67f0c
movq %r14, 0x10(%rbx)
movq %rax, (%rbx)
jmp 0x67f0c
jbe 0x67f0c
cmpq %r14, 0x8(%rbx)
jbe 0x67eeb
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: iobuf_append
size_t iobuf_append(struct iobuf *io, const void *buf, size_t len) {
  char *p = NULL;

  assert(io != NULL);
  assert(io->len <= io->size);

  /* check overflow */
  if (len > ~(size_t)0 - (size_t)(io->buf + io->len)) {
    return 0;
  }

  if (len <= 0) {
  } else if (io->len + len <= io->size) {
    memcpy(io->buf + io->len, buf, len);
    io->len += len;
  } else if ((p = (char *) NS_REALLOC(io->buf, io->len + len)) != NULL) {
    io->buf = p;
    memcpy(io->buf + io->len, buf, len);
    io->len += len;
    io->size = io->len;
  } else {
    len = 0;
  }

  return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x67ff9
movq %rsi, %r15
movq %rdi, %r14
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rcx
cmpq %rcx, %rsi
ja 0x68018
movq %rdx, %rbx
movq (%r14), %rdi
leaq (%rdi,%rsi), %rax
negq %rdx
cmpq %rax, %rdx
jbe 0x67fd7
addq %rbx, %rsi
cmpq %rcx, %rsi
jbe 0x67fdb
callq 0xc120
testq %rax, %rax
je 0x67fd7
movq %rax, (%r14)
movq 0x8(%r14), %r12
addq %r12, %rax
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xc0e0
addq %rbx, %r12
movq %r12, 0x8(%r14)
movq %r12, 0x10(%r14)
jmp 0x67fed
xorl %ebx, %ebx
jmp 0x67fed
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xc0e0
addq %rbx, 0x8(%r14)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12258(%rip), %rdi     # 0x7a258
leaq 0x1225c(%rip), %rsi     # 0x7a263
leaq 0x1226f(%rip), %rcx     # 0x7a27d
movl $0x175, %edx            # imm = 0x175
callq 0xc210
leaq 0x12298(%rip), %rdi     # 0x7a2b7
leaq 0x1223d(%rip), %rsi     # 0x7a263
leaq 0x12250(%rip), %rcx     # 0x7a27d
movl $0x176, %edx            # imm = 0x176
callq 0xc210
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: ns_avprintf
int ns_avprintf(char **buf, size_t size, const char *fmt, va_list ap) {
  va_list ap_copy;
  int len;

  va_copy(ap_copy, ap);
  len = vsnprintf(*buf, size, fmt, ap_copy);
  va_end(ap_copy);

  if (len < 0) {
    // eCos and Windows are not standard-compliant and return -1 when
    // the buffer is too small. Keep allocating larger buffers until we
    // succeed or out of memory.
    *buf = NULL;
    while (len < 0) {
      if (*buf) NS_FREE(*buf);
      size *= 2;
      if ((*buf = (char *) NS_MALLOC(size)) == NULL) break;
      va_copy(ap_copy, ap);
      len = vsnprintf(*buf, size, fmt, ap_copy);
      va_end(ap_copy);
    }
  } else if (len > (int) size) {
    // Standard-compliant code path. Allocate a buffer that is large enough.
    if ((*buf = (char *) NS_MALLOC(len + 1)) == NULL) {
      len = -1;
    } else {
      va_copy(ap_copy, ap);
      len = vsnprintf(*buf, len + 1, fmt, ap_copy);
      va_end(ap_copy);
    }
  }

  return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r15
movq 0x10(%rcx), %rax
leaq -0x40(%rbp), %rcx
movq %rax, 0x10(%rcx)
movups (%r14), %xmm0
movaps %xmm0, (%rcx)
movq (%rdi), %rdi
callq 0xcd48
movl %eax, %r12d
testl %eax, %eax
js 0x680e8
cmpl %r13d, %r12d
jle 0x68140
incl %r12d
movq %r12, %rdi
callq 0xca00
movq %rax, (%r15)
testq %rax, %rax
je 0x6813a
movq 0x10(%r14), %rax
leaq -0x40(%rbp), %rcx
movq %rax, 0x10(%rcx)
movups (%r14), %xmm0
movaps %xmm0, (%rcx)
movq (%r15), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0xcd48
movl %eax, %r12d
jmp 0x68140
movq $0x0, (%r15)
movq (%r15), %rdi
testq %rdi, %rdi
je 0x680fc
callq 0xc250
addq %r13, %r13
movq %r13, %rdi
callq 0xca00
movq %rax, (%r15)
testq %rax, %rax
je 0x68140
movq 0x10(%r14), %rax
movq %rax, -0x30(%rbp)
movups (%r14), %xmm0
movaps %xmm0, -0x40(%rbp)
movq (%r15), %rdi
movq %r13, %rsi
movq %rbx, %rdx
leaq -0x40(%rbp), %rcx
callq 0xcd48
movl %eax, %r12d
testl %eax, %eax
js 0x680ef
jmp 0x68140
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: ns_vprintf
int ns_vprintf(struct ns_connection *nc, const char *fmt, va_list ap) {
  char mem[NS_VPRINTF_BUFFER_SIZE], *buf = mem;
  int len;

  if ((len = ns_avprintf(&buf, sizeof(mem), fmt, ap)) > 0) {
    ns_out(nc, buf, len);
  }
  if (buf != mem && buf != NULL) {
    NS_FREE(buf);
  }

  return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %r14
leaq -0x220(%rbp), %r15
leaq -0x20(%rbp), %rdi
movq %r15, (%rdi)
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x68067
movl %eax, %ebx
testl %eax, %eax
jle 0x68197
movq -0x20(%rbp), %rsi
movl %ebx, %edx
movq %r14, %rdi
callq 0x681c0
movq -0x20(%rbp), %rdi
cmpq %r15, %rdi
sete %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x681b0
callq 0xc250
movl %ebx, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: ns_out
static size_t ns_out(struct ns_connection *nc, const void *buf, size_t len) {
  if (nc->flags & NSF_UDP) {
    long n = sendto(nc->sock, (const char *) buf, len, 0, &nc->sa.sa,
                    sizeof(nc->sa.sin));
    DBG(("%p %d send %ld (%d %s)", nc, nc->sock, n, errno, strerror(errno)));
    return n < 0 ? 0 : n;
  } else {
    return iobuf_append(&nc->send_iobuf, buf, len);
  }
}

// Assembly:
movq %rdi, %r8
testb $0x1, 0xa1(%rdi)
jne 0x681d8
addq $0x58, %r8
movq %r8, %rdi
jmp 0x67f63
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl 0x20(%r8), %edi
addq $0x24, %r8
xorl %ebx, %ebx
xorl %ecx, %ecx
movl $0x10, %r9d
callq 0xc840
testq %rax, %rax
cmovleq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq