LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 0x5423f
movq (%rdx), %rax
testb $0x1, 0x9(%rax)
je 0x5423f
movq (%rax), %rax
testq %rax, %rax
je 0x5423f
cmpl $0xfeac14, 0x34(%rax)   # imm = 0xFEAC14
jne 0x5423f
movq (%rax), %rcx
testq %rcx, %rcx
je 0x54264
movq 0x58(%rcx), %rdx
testq %rdx, %rdx
je 0x5426d
movq 0x8(%rax), %rdi
callq *%rdx
jmp 0x5425b
leaq 0x13466(%rip), %rdx     # 0x676ac
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x2a0db
movq %rbx, %rdi
xorl %esi, %esi
callq 0x298b2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x134b3(%rip), %r8      # 0x6771e
jmp 0x54270
movq (%rcx), %r8
movq (%rbx), %rax
movq 0x8(%rax), %rcx
leaq 0x13445(%rip), %rdx     # 0x676c3
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3be68
jmp 0x54251
// File: /workspace/github_c_makefile_star2_O2/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 0x542e8
movq %rdx, %r14
movq (%rdx), %rax
testb $0x1, 0x9(%rax)
je 0x542e8
movq (%rax), %r15
testq %r15, %r15
je 0x542e8
cmpl $0xfeac14, 0x34(%r15)   # imm = 0xFEAC14
jne 0x542e8
movq (%r15), %rax
testq %rax, %rax
je 0x54311
movq 0x28(%rax), %rcx
testq %rcx, %rcx
je 0x5431a
movq 0x8(%r15), %rdi
callq *%rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x564ff
movq (%r14), %rdi
callq 0x296af
jmp 0x54304
leaq 0x133bd(%rip), %rdx     # 0x676ac
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x2a0db
movq %rbx, %rdi
xorl %esi, %esi
callq 0x298b2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x13406(%rip), %r8      # 0x6771e
jmp 0x5431d
movq (%rax), %r8
movq (%rbx), %rax
movq 0x8(%rax), %rcx
leaq 0x13398(%rip), %rdx     # 0x676c3
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3be68
jmp 0x542fa
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: jx9Builtin_fstat
static int jx9Builtin_fstat(jx9_context *pCtx, int nArg, jx9_value **apArg)
{
	jx9_value *pArray, *pValue;
	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->xStat == 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;
	}
	/* Create the array and the working value */
	pArray = jx9_context_new_array(pCtx);
	pValue = jx9_context_new_scalar(pCtx);
	if( pArray == 0 || pValue == 0 ){
		jx9_context_throw_error(pCtx, JX9_CTX_ERR, "JX9 is running out of memory");
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	/* Perform the requested operation */
	pStream->xStat(pDev->pHandle, pArray, pValue);
	/* Return the freshly created array */
	jx9_result_value(pCtx, pArray);
	/* Don't worry about freeing memory here, everything will be
	 * released automatically as soon we return from this function.
	 */
	return JX9_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
jle 0x54e94
movq (%rdx), %rax
testb $0x1, 0x9(%rax)
je 0x54e94
movq (%rax), %r15
testq %r15, %r15
je 0x54e94
cmpl $0xfeac14, 0x34(%r15)   # imm = 0xFEAC14
jne 0x54e94
movq (%r15), %r12
testq %r12, %r12
je 0x54ebb
cmpq $0x0, 0x78(%r12)
je 0x54ec4
movq %rbx, %rdi
callq 0x2a2b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2a26a
testq %r14, %r14
sete %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x54ee5
leaq 0x11420(%rip), %rdx     # 0x662b0
pushq $0x1
jmp 0x54e9d
leaq 0x12811(%rip), %rdx     # 0x676ac
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x2a0db
movq %rbx, %rdi
xorl %esi, %esi
callq 0x298b2
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1285c(%rip), %r8      # 0x6771e
jmp 0x54ec8
movq (%r12), %r8
movq (%rbx), %rax
movq 0x8(%rax), %rcx
leaq 0x127ed(%rip), %rdx     # 0x676c3
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3be68
jmp 0x54ea6
movq 0x8(%r15), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq *0x78(%r12)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x299d3
jmp 0x54eb0
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x2, %esi
jl 0x5506f
movq (%rdx), %rax
testb $0x1, 0x9(%rax)
je 0x5506f
movq (%rax), %r14
testq %r14, %r14
je 0x5506f
cmpl $0xfeac14, 0x34(%r14)   # imm = 0xFEAC14
jne 0x5506f
movq (%r14), %r15
testq %r15, %r15
je 0x55098
cmpq $0x0, 0x50(%r15)
je 0x550a1
movq 0x8(%rdx), %rdi
callq 0x29772
movq 0x8(%r14), %rdi
movl %eax, %esi
callq *0x50(%r15)
xorl %esi, %esi
testl %eax, %eax
sete %sil
movq %rbx, %rdi
jmp 0x55086
leaq 0x12636(%rip), %rdx     # 0x676ac
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x2a0db
movq %rbx, %rdi
xorl %esi, %esi
callq 0x298b2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1267f(%rip), %r8      # 0x6771e
jmp 0x550a4
movq (%r15), %r8
movq (%rbx), %rax
movq 0x8(%rax), %rcx
leaq 0x12611(%rip), %rdx     # 0x676c3
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3be68
jmp 0x55081
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
jle 0x55141
movq %rdx, %r14
movq (%rdx), %rax
testb $0x1, 0x9(%rax)
je 0x55141
movq (%rax), %r15
testq %r15, %r15
je 0x55141
cmpl $0xfeac14, 0x34(%r15)   # imm = 0xFEAC14
jne 0x55141
movq (%r15), %rax
testq %rax, %rax
je 0x5516a
movq 0x60(%rbx), %rcx
cmpq 0x4d0(%rcx), %r15
je 0x55139
cmpq 0x4d8(%rcx), %r15
je 0x55139
cmpq 0x4e0(%rcx), %r15
je 0x55139
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x55126
movq 0x8(%r15), %rdi
callq *%rax
movq %rbx, %rdi
movq %r15, %rsi
callq 0x564ff
movq (%r14), %rdi
callq 0x296af
pushq $0x1
popq %rsi
movq %rbx, %rdi
jmp 0x55158
leaq 0x12564(%rip), %rdx     # 0x676ac
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x2a0db
movq %rbx, %rdi
xorl %esi, %esi
callq 0x298b2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rax
movq 0x8(%rax), %rcx
leaq 0x1254b(%rip), %rdx     # 0x676c3
leaq 0x1259f(%rip), %r8      # 0x6771e
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3be68
jmp 0x55153
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x2000, %rsp           # imm = 0x2000
movq %rdi, %rbx
testl %esi, %esi
jle 0x5552f
movq (%rdx), %rax
testb $0x1, 0x9(%rax)
je 0x5552f
movq (%rax), %r14
testq %r14, %r14
je 0x5552f
cmpl $0xfeac14, 0x34(%r14)   # imm = 0xFEAC14
jne 0x5552f
cmpq $0x0, (%r14)
je 0x5555d
xorl %r15d, %r15d
leaq -0x2020(%rbp), %r12
movl $0x2000, %edx           # imm = 0x2000
movq %r14, %rdi
movq %r12, %rsi
callq 0x562e8
testq %rax, %rax
jle 0x55522
addq %rax, %r15
movq %rbx, %rdi
movq %r12, %rsi
movl %r15d, %edx
callq 0x29fae
cmpl $-0xa, %eax
jne 0x554f7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x29897
jmp 0x5554b
leaq 0x12176(%rip), %rdx     # 0x676ac
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x2a0db
movq %rbx, %rdi
xorl %esi, %esi
callq 0x298b2
xorl %eax, %eax
addq $0x2000, %rsp           # imm = 0x2000
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rax
movq 0x8(%rax), %rcx
leaq 0x12158(%rip), %rdx     # 0x676c3
leaq 0x121ac(%rip), %r8      # 0x6771e
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3be68
jmp 0x55541
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: jx9Builtin_fprintf
static int jx9Builtin_fprintf(jx9_context *pCtx, int nArg, jx9_value **apArg)
{
	fprintf_data sFdata;
	const char *zFormat;
	io_private *pDev;
	int nLen;
	if( nArg < 2 || !jx9_value_is_resource(apArg[0]) || !jx9_value_is_string(apArg[1]) ){
		/* Missing/Invalid arguments, return zero */
		jx9_context_throw_error(pCtx, JX9_CTX_WARNING, "Invalid arguments");
		jx9_result_int(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_int(pCtx, 0);
		return JX9_OK;
	}
	/* Point to the target IO stream device */
	if( pDev->pStream == 0  || pDev->pStream->xWrite == 0 ){
		jx9_context_throw_error_format(pCtx, JX9_CTX_WARNING, 
			"IO routine(%s) not implemented in the underlying stream(%s) device", 
			jx9_function_name(pCtx), pDev->pStream ? pDev->pStream->zName : "null_stream"
			);
		jx9_result_int(pCtx, 0);
		return JX9_OK;
	}
	/* Extract the string format */
	zFormat = jx9_value_to_string(apArg[1], &nLen);
	if( nLen < 1 ){
		/* Empty string, return zero */
		jx9_result_int(pCtx, 0);
		return JX9_OK;
	}
	/* Prepare our private data */
	sFdata.nCount = 0;
	sFdata.pIO = pDev;
	/* Format the string */
	jx9InputFormat(fprintfConsumer, pCtx, zFormat, nLen, nArg - 1, &apArg[1], (void *)&sFdata, FALSE);
	/* Return total number of bytes written */
	jx9_result_int64(pCtx, sFdata.nCount);
	return JX9_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpl $0x2, %esi
jl 0x556fa
movq %rdx, %r14
movq (%rdx), %rax
testb $0x1, 0x9(%rax)
je 0x556fa
movq 0x8(%r14), %rdi
testb $0x1, 0x8(%rdi)
jne 0x55727
leaq 0x121f9(%rip), %rdx     # 0x678fa
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x2a0db
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2987c
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rax), %r13
testq %r13, %r13
je 0x557a5
cmpl $0xfeac14, 0x34(%r13)   # imm = 0xFEAC14
jne 0x557a5
movq (%r13), %rax
testq %rax, %rax
je 0x557b1
cmpq $0x0, 0x40(%rax)
je 0x557ba
movl %esi, %r15d
leaq -0x2c(%rbp), %r12
movq %r12, %rsi
callq 0x297ed
movl (%r12), %ecx
testl %ecx, %ecx
jle 0x5570c
leaq -0x40(%rbp), %r12
andq $0x0, 0x8(%r12)
addq $0x8, %r14
movq %r13, (%r12)
decl %r15d
leaq 0xede(%rip), %rdi       # 0x5665a
movq %rbx, %rsi
movq %rax, %rdx
movl %r15d, %r8d
movq %r14, %r9
pushq $0x0
pushq %r12
callq 0x4db70
popq %rax
popq %rcx
movq 0x8(%r12), %rsi
movq %rbx, %rdi
callq 0x29897
jmp 0x55716
leaq 0x11f00(%rip), %rdx     # 0x676ac
jmp 0x55701
leaq 0x11f66(%rip), %r8      # 0x6771e
jmp 0x557bd
movq (%rax), %r8
movq (%rbx), %rax
movq 0x8(%rax), %rcx
leaq 0x11f5f(%rip), %rdx     # 0x6772a
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3be68
jmp 0x5570c
// File: /workspace/github_c_makefile_star2_O2/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 0x56310
xorl %ebx, %ebx
jmp 0x56353
subl %edi, %ebx
cmpq %r14, %rbx
cmovgeq %r14, %rbx
addq 0x18(%r12), %rdi
movq %r15, %rsi
movl %ebx, %edx
callq 0x2d3b0
movl 0x30(%r12), %eax
addl %ebx, %eax
movl %eax, 0x30(%r12)
cmpl 0x20(%r12), %eax
jb 0x5634b
leaq 0x10(%r12), %rdi
callq 0x31b1e
andl $0x0, 0x30(%r12)
subq %rbx, %r14
jle 0x56373
addq %rbx, %r15
movq 0x8(%r12), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq *0x30(%r13)
testq %rax, %rax
jle 0x5636c
addq %rax, %rbx
jmp 0x56373
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_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: GetLine
static sxi32 GetLine(io_private *pDev, jx9_int64 *pLen, const char **pzLine)
{
	const char *zIn, *zEnd, *zPtr;
	zIn = (const char *)SyBlobDataAt(&pDev->sBuffer, pDev->nOfft);
	zEnd = &zIn[SyBlobLength(&pDev->sBuffer)-pDev->nOfft];
	zPtr = zIn;
	while( zIn < zEnd ){
		if( zIn[0] == '\n' ){
			/* Line found */
			zIn++; /* Include the line ending as requested by the JX9 specification */
			*pLen = (jx9_int64)(zIn-zPtr);
			*pzLine = zPtr;
			return SXRET_OK;
		}
		zIn++;
	}
	/* No line were found */
	return SXERR_NOTFOUND;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x20(%rdi), %ecx
movl 0x30(%rdi), %eax
movq %rax, %r8
addq 0x18(%rdi), %r8
subl %eax, %ecx
addq %r8, %rcx
xorl %edi, %edi
movl $0xfffffffa, %eax       # imm = 0xFFFFFFFA
leaq (%r8,%rdi), %r9
cmpq %rcx, %r9
jae 0x564fd
incq %rdi
cmpb $0xa, (%r9)
jne 0x564e3
movq %rdi, (%rsi)
movq %r8, (%rdx)
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
pushq $-0x1
popq %rbx
movq %r15, %rdi
callq 0xc8b0
testq %rax, %rax
je 0x567a7
movq %rax, %r13
leaq 0x13(%rax), %r12
movq %r12, %rdi
callq 0x28e24
cmpl $0x2, %eax
ja 0x56798
cmpb $0x2e, (%r12)
jne 0x56798
cmpl $0x2, %eax
jne 0x56764
cmpb $0x2e, 0x14(%r13)
je 0x56764
movq %r14, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x29903
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: 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:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
xorl %r14d, %r14d
testq %rbx, %rbx
jle 0x567f2
movl %r12d, %edi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xcb80
testq %rax, %rax
jle 0x567f2
subq %rax, %rbx
addq %rax, %r14
addq %rax, %r15
jmp 0x567cf
testq %rbx, %rbx
pushq $-0x1
popq %rax
cmovgq %rax, %r14
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: 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 0x3b968
testq %rax, %rax
je 0x56a7f
movq 0x38(%rax), %rcx
movq 0x40(%rax), %rdx
testq %rdx, %rdx
je 0x56a87
addq $0x38, %rdx
jmp 0x56a98
pushq $-0x6
popq %rax
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)
testq %rcx, %rcx
je 0x56aa8
movq 0x40(%rax), %rdx
movq %rdx, 0x40(%rcx)
movq 0x18(%r14), %rcx
cmpq %rax, %rcx
jne 0x56ab9
movq 0x28(%rcx), %rcx
movq %rcx, 0x18(%r14)
movq 0x28(%rax), %rcx
movq 0x30(%rax), %rdx
testq %rdx, %rdx
je 0x56aca
movq %rcx, 0x28(%rdx)
testq %rcx, %rcx
je 0x56ad3
movq %rdx, 0x30(%rcx)
decl 0x28(%r14)
testq %rbx, %rbx
je 0x56ae3
movq 0x10(%rax), %rcx
movq %rcx, (%rbx)
movq (%r14), %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x27bf8
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: ContextFindChunk
static jx9_aux_data * ContextFindChunk(jx9_context *pCtx, void *pChunk)
{
	jx9_aux_data *aAux, *pAux;
	sxu32 n;
	if( SySetUsed(&pCtx->sChunk) < 1 ){
		/* Don't bother processing, the container is empty */
		return 0;
	}
	/* Perform the lookup */
	aAux = (jx9_aux_data *)SySetBasePtr(&pCtx->sChunk);
	for( n = 0; n < SySetUsed(&pCtx->sChunk) ; ++n ){
		pAux = &aAux[n];
		if( pAux->pAuxData == pChunk ){
			/* Chunk found */
			return pAux;
		}
	}
	/* No such allocated chunk */
	return 0;
}

// Assembly:
movl 0x48(%rdi), %ecx
testq %rcx, %rcx
je 0x56b1b
pushq %rbp
movq %rsp, %rbp
movq 0x40(%rdi), %rdx
addq $-0x8, %rdx
subq $0x1, %rcx
jb 0x56b1e
leaq 0x8(%rdx), %rax
cmpq %rsi, 0x8(%rdx)
movq %rax, %rdx
jne 0x56b06
jmp 0x56b20
xorl %eax, %eax
retq
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: 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 0xc6d0
testq %rax, %rax
je 0x56c3a
movq %rax, %r15
pushq $-0x1
popq %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x29903
movq %r15, %rdi
callq 0xc250
jmp 0x56c3d
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: 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 0xc810
testq %rax, %rax
je 0x56cc7
movl 0x10(%rax), %esi
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0xc540
movl %eax, %ecx
xorl %eax, %eax
negl %ecx
sbbl %eax, %eax
jmp 0x56cca
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xc6e0
testq %rax, %rax
je 0x56cff
movl 0x10(%rax), %edx
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xc540
movl %eax, %ecx
xorl %eax, %eax
negl %ecx
sbbl %eax, %eax
jmp 0x56d02
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xc120
testl %eax, %eax
je 0x5725b
leaq 0x10374(%rip), %rsi     # 0x675bf
pushq $0x7
popq %rdx
movq %rbx, %rdi
callq 0x29903
pushq $-0x1
popq %rax
jmp 0x572d2
movl $0xf000, %eax           # imm = 0xF000
andl -0x80(%rbp), %eax
addl $0xfffff000, %eax       # imm = 0xFFFFF000
shrl $0xc, %eax
cmpl $0xb, %eax
ja 0x5729f
leaq 0xb90d(%rip), %rcx      # 0x62b84
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x106b8(%rip), %rsi     # 0x6793f
jmp 0x572c5
leaq 0x106a2(%rip), %rsi     # 0x67932
pushq $0x5
jmp 0x572c7
leaq 0x1069d(%rip), %rsi     # 0x67938
pushq $0x6
jmp 0x572c7
leaq 0x10319(%rip), %rsi     # 0x675bf
pushq $0x7
jmp 0x572c7
leaq 0x10090(%rip), %rsi     # 0x67341
pushq $0x3
jmp 0x572c7
leaq 0xc971(%rip), %rsi      # 0x63c2d
jmp 0x572c5
leaq 0x1000c(%rip), %rsi     # 0x672d1
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0x29903
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x573b1
movl %eax, %r15d
leaq -0xb8(%rbp), %r12
movl %eax, %edi
movq %r12, %rsi
callq 0xc9e0
movq 0x30(%r12), %r13
xorl %r12d, %r12d
pushq $0x1
popq %rdx
pushq $0x2
popq %rcx
xorl %edi, %edi
movq %r13, %rsi
movl %r15d, %r8d
xorl %r9d, %r9d
callq 0xcaa0
cmpq $-0x1, %rax
je 0x573b7
movq %rax, (%r14)
movq %r13, (%rbx)
jmp 0x573bb
pushq $-0x1
popq %r12
jmp 0x573c3
pushq $-0x1
popq %r12
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_O2/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 0x573f1
callq 0xc0c0
jmp 0x573f6
callq 0xca20
xorl %ecx, %ecx
negl %eax
sbbl %ecx, %ecx
movl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1053d(%rip), %rdi     # 0x67965
callq 0xc870
testq %rax, %rax
je 0x57449
movq %rax, %r14
cmpb $0x0, (%rax)
je 0x57449
pushq $0x7
popq %rsi
movq %r14, %rdi
callq 0xc170
testl %eax, %eax
je 0x574c7
movq %rbx, -0x30(%rbp)
xorl %r13d, %r13d
leaq 0x2f479(%rip), %rbx     # 0x868d0
leaq -0xc0(%rbp), %r14
movl $0xf000, %r15d          # imm = 0xF000
cmpq $0x18, %r13
je 0x574a3
movq (%r13,%rbx), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0xc120
testl %eax, %eax
jne 0x5749d
movl -0xa8(%rbp), %eax
andl %r15d, %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x5749d
movq %r12, %rdi
pushq $0x7
popq %rsi
callq 0xc170
testl %eax, %eax
je 0x574d2
addq $0x8, %r13
jmp 0x57464
leaq 0x104b6(%rip), %rsi     # 0x67960
pushq $0x4
popq %rdx
movq -0x30(%rbp), %rdi
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x29903
pushq $-0x1
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x574b1
pushq $-0x1
popq %rdx
movq -0x30(%rbp), %rdi
movq %r12, %rsi
jmp 0x574b1
// File: /workspace/github_c_makefile_star2_O2/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 0xc3b0
movl %eax, %edi
callq 0xc270
testq %rax, %rax
je 0x5752a
movq (%rax), %rsi
pushq $-0x1
popq %rdx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x29903
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: SyProcFormat
JX9_PRIVATE sxi32 SyProcFormat(ProcConsumer xConsumer, void *pData, const char *zFormat, ...)
{
	va_list ap;
	sxi32 rc;
#if defined(UNTRUST)	
	if( SX_EMPTY_STR(zFormat) ){
		return SXERR_EMPTY;
	}
#endif
	va_start(ap, zFormat);
	rc = FormatMount(SXFMT_CONS_PROC, 0, xConsumer, pData, 0, zFormat, ap);
	va_end(ap);
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rsi, %r10
movq %rdi, %rdx
leaq -0xd0(%rbp), %rsi
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x5757f
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
leaq -0x20(%rbp), %rax
movq %rsi, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movabsq $0x3000000018, %rcx     # imm = 0x3000000018
movq %rcx, (%rax)
movq %rax, (%rsp)
leaq 0x103c5(%rip), %r9      # 0x6796c
pushq $0x1
popq %rdi
xorl %esi, %esi
movq %r10, %rcx
xorl %r8d, %r8d
callq 0x2d586
addq $0xe0, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
xorps %xmm0, %xmm0
leaq -0x68(%rbp), %rax
movups %xmm0, 0x38(%rax)
movq %rax, %rcx
movq %rdi, %rax
testq %rax, %rax
je 0x57608
testq %rsi, %rsi
je 0x57608
movq 0x10(%rax), %rdx
cmpq 0x10(%rsi), %rdx
jb 0x575fa
movq %rsi, 0x40(%rcx)
movq %rcx, 0x38(%rsi)
movq %rsi, %rcx
movq 0x40(%rsi), %rsi
jmp 0x575d5
movq %rax, 0x40(%rcx)
movq %rcx, 0x38(%rax)
movq 0x40(%rax), %rdi
jmp 0x575cf
testq %rax, %rax
je 0x57617
movq %rax, 0x40(%rcx)
movq %rcx, 0x38(%rax)
jmp 0x5762d
testq %rsi, %rsi
je 0x57626
movq %rsi, 0x40(%rcx)
movq %rcx, 0x38(%rsi)
jmp 0x5762d
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rcx)
movq -0x28(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x57660
movq (%rbx), %rdi
movq %r14, %rsi
callq 0xc130
testq %rax, %rax
je 0x57668
movq %r14, 0x10(%rbx)
movq %rax, (%rbx)
jmp 0x57668
jbe 0x57668
cmpq %r14, 0x8(%rbx)
jbe 0x57647
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x5773f
movq %rsi, %r15
movq %rdi, %r14
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rcx
cmpq %rcx, %rsi
ja 0x5775e
movq %rdx, %rbx
movq (%r14), %rdi
leaq (%rdi,%rsi), %rax
negq %rdx
cmpq %rax, %rdx
jbe 0x5771d
addq %rbx, %rsi
cmpq %rcx, %rsi
jbe 0x57721
callq 0xc130
testq %rax, %rax
je 0x5771d
movq %rax, (%r14)
movq 0x8(%r14), %r12
addq %r12, %rax
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xc0f0
addq %rbx, %r12
movq %r12, 0x8(%r14)
movq %r12, 0x10(%r14)
jmp 0x57733
xorl %ebx, %ebx
jmp 0x57733
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xc0f0
addq %rbx, 0x8(%r14)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10af2(%rip), %rdi     # 0x68238
leaq 0x10af6(%rip), %rsi     # 0x68243
leaq 0x10b09(%rip), %rcx     # 0x6825d
movl $0x175, %edx            # imm = 0x175
callq 0xc220
leaq 0x10b32(%rip), %rdi     # 0x68297
leaq 0x10ad7(%rip), %rsi     # 0x68243
leaq 0x10aea(%rip), %rcx     # 0x6825d
movl $0x176, %edx            # imm = 0x176
callq 0xc220
// File: /workspace/github_c_makefile_star2_O2/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 0xcd90
movl %eax, %r12d
testl %eax, %eax
js 0x5782e
cmpl %r13d, %r12d
jle 0x5787d
incl %r12d
movq %r12, %rdi
callq 0xca30
movq %rax, (%r15)
testq %rax, %rax
je 0x57879
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 0xcd90
movl %eax, %r12d
jmp 0x5787d
andq $0x0, (%r15)
testl %r12d, %r12d
jns 0x5787d
movq (%r15), %rdi
callq 0xc250
addq %r13, %r13
movq %r13, %rdi
callq 0xca30
movq %rax, (%r15)
testq %rax, %rax
je 0x5787d
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 0xcd90
movl %eax, %r12d
jmp 0x57832
pushq $-0x1
popq %r12
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_O2/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 %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %r15
leaq -0x220(%rbp), %r12
leaq -0x28(%rbp), %r14
movq %r12, (%r14)
movl $0x1f4, %esi            # imm = 0x1F4
movq %r14, %rdi
callq 0x577ad
movl %eax, %ebx
movq (%r14), %r14
testl %eax, %eax
jle 0x578db
movl %ebx, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x57905
cmpq %r12, %r14
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x578f3
movq %r14, %rdi
callq 0xc250
movl %ebx, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x5791d
addq $0x58, %r8
movq %r8, %rdi
jmp 0x576a9
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl 0x20(%r8), %edi
addq $0x24, %r8
xorl %ebx, %ebx
pushq $0x10
popq %r9
xorl %ecx, %ecx
callq 0xc860
testq %rax, %rax
cmovleq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: ns_socketpair2
int ns_socketpair2(sock_t sp[2], int sock_type) {
  union socket_address sa;
  sock_t sock;
  socklen_t len = sizeof(sa.sin);
  int ret = 0;

  sp[0] = sp[1] = INVALID_SOCKET;

  (void) memset(&sa, 0, sizeof(sa));
  sa.sin.sin_family = AF_INET;
  sa.sin.sin_port = htons(0);
  sa.sin.sin_addr.s_addr = htonl(0x7f000001);

  if ((sock = socket(AF_INET, sock_type, 0)) != INVALID_SOCKET &&
      !bind(sock, &sa.sa, len) &&
      (sock_type == SOCK_DGRAM || !listen(sock, 1)) &&
      !getsockname(sock, &sa.sa, &len) &&
      (sp[0] = socket(AF_INET, sock_type, 0)) != INVALID_SOCKET &&
      !connect(sp[0], &sa.sa, len) &&
      (sock_type == SOCK_STREAM ||
       (!getsockname(sp[0], &sa.sa, &len) && !connect(sock, &sa.sa, len))) &&
      (sp[1] = (sock_type == SOCK_DGRAM ? sock :
                accept(sock, &sa.sa, &len))) != INVALID_SOCKET) {
    ns_set_close_on_exec(sp[0]);
    ns_set_close_on_exec(sp[1]);
    ret = 1;
  } else {
    if (sp[0] != INVALID_SOCKET) closesocket(sp[0]);
    if (sp[1] != INVALID_SOCKET) closesocket(sp[1]);
    sp[0] = sp[1] = INVALID_SOCKET;
  }
  if (sock_type != SOCK_DGRAM) closesocket(sock);

  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r15
movl $0x10, -0x24(%rbp)
orq $-0x1, (%rdi)
andq $0x0, -0x2c(%rbp)
movl %esi, %ebx
movabsq $0x100007f00000002, %rax # imm = 0x100007F00000002
movq %rax, -0x34(%rbp)
pushq $0x2
popq %rdi
xorl %edx, %edx
callq 0xc550
movl %eax, %r14d
cmpl $-0x1, %eax
je 0x57a52
leaq -0x34(%rbp), %rsi
pushq $0x10
popq %rdx
movl %r14d, %edi
callq 0xca90
testl %eax, %eax
jne 0x57a52
cmpl $0x2, %ebx
je 0x57a3e
pushq $0x1
popq %rsi
movl %r14d, %edi
callq 0xcc90
testl %eax, %eax
jne 0x57a52
leaq -0x34(%rbp), %rsi
leaq -0x24(%rbp), %rdx
movl %r14d, %edi
callq 0xc080
testl %eax, %eax
je 0x57a91
movl (%r15), %edi
cmpl $-0x1, %edi
je 0x57a5f
callq 0xc2b0
movl 0x4(%r15), %edi
cmpl $-0x1, %edi
je 0x57a6d
callq 0xc2b0
orq $-0x1, (%r15)
xorl %r12d, %r12d
cmpl $0x2, %ebx
je 0x57a81
movl %r14d, %edi
callq 0xc2b0
movl %r12d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x2
popq %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0xc550
movl %eax, (%r15)
cmpl $-0x1, %eax
je 0x57a5f
movl -0x24(%rbp), %edx
leaq -0x34(%rbp), %rsi
movl %eax, %edi
callq 0xc420
testl %eax, %eax
jne 0x57a52
cmpl $0x1, %ebx
jne 0x57af0
leaq -0x34(%rbp), %rsi
leaq -0x24(%rbp), %rdx
movl %r14d, %edi
callq 0xc980
movl %eax, 0x4(%r15)
cmpl $-0x1, %eax
je 0x57a52
pushq $0x1
popq %r12
movl (%r15), %edi
callq 0x579bd
movl 0x4(%r15), %edi
callq 0x579bd
jmp 0x57a74
movl (%r15), %edi
leaq -0x34(%rbp), %rsi
leaq -0x24(%rbp), %rdx
callq 0xc080
testl %eax, %eax
jne 0x57a52
movl -0x24(%rbp), %edx
leaq -0x34(%rbp), %rsi
movl %r14d, %edi
callq 0xc420
testl %eax, %eax
jne 0x57a52
cmpl $0x2, %ebx
jne 0x57abc
movl %r14d, 0x4(%r15)
jmp 0x57ad9