// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: jx9Vfs_lstat
static int jx9Vfs_lstat(jx9_context *pCtx, int nArg, jx9_value **apArg)
{
	jx9_value *pArray, *pValue;
	const char *zPath;
	jx9_vfs *pVfs;
	int rc;
	if( nArg < 1 || !jx9_value_is_string(apArg[0]) ){
		/* Missing/Invalid argument, return FALSE */
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	/* Point to the underlying vfs */
	pVfs = (jx9_vfs *)jx9_context_user_data(pCtx);
	if( pVfs == 0 || pVfs->xlStat == 0 ){
		/* IO routine not implemented, return NULL */
		jx9_context_throw_error_format(pCtx, JX9_CTX_WARNING, 
			"IO routine(%s) not implemented in the underlying VFS, JX9 is returning FALSE", 
			jx9_function_name(pCtx)
			);
		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;
	}
	/* Extract the file path */
	zPath = jx9_value_to_string(apArg[0], 0);
	/* Perform the requested operation */
	rc = pVfs->xlStat(zPath, pArray, pValue);
	if( rc != JX9_OK ){
		/* IO error, return FALSE */
		jx9_result_bool(pCtx, 0);
	}else{
		/* Return the associative 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
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
cmpl $0x1, -0x14(%rbp)
jl 0xa324a
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0x57480
cmpl $0x0, %eax
jne 0xa3261
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x57070
movl $0x0, -0x4(%rbp)
jmp 0xa336d
movq -0x10(%rbp), %rdi
callq 0x58300
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0xa3283
movq -0x40(%rbp), %rax
cmpq $0x0, 0xb8(%rax)
jne 0xa32c5
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x584d0
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl $0x2, %esi
leaq 0x2278f(%rip), %rdx     # 0xc5a36
movb $0x0, %al
callq 0x79580
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x57070
movl $0x0, -0x4(%rbp)
jmp 0xa336d
movq -0x10(%rbp), %rdi
callq 0x58570
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x58510
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xa32ed
cmpq $0x0, -0x30(%rbp)
jne 0xa3316
movq -0x10(%rbp), %rdi
movl $0x1, %esi
leaq 0x214b4(%rip), %rdx     # 0xc47b1
callq 0x580b0
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x57070
movl $0x0, -0x4(%rbp)
jmp 0xa336d
movq -0x20(%rbp), %rax
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x56e20
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq 0xb8(%rax), %rax
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
je 0xa3359
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x57070
jmp 0xa3366
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x572c0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)