// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: VmEvalChunk
static sxi32 VmEvalChunk(
	jx9_vm *pVm,        /* Underlying Virtual Machine */
	jx9_context *pCtx,  /* Call Context */
	SyString *pChunk,   /* JX9 chunk to evaluate */ 
	int iFlags,         /* Compile flag */
	int bTrueReturn     /* TRUE to return execution result */
	)
{
	SySet *pByteCode, aByteCode;
	ProcConsumer xErr = 0;
	void *pErrData = 0;
	/* Initialize bytecode container */
	SySetInit(&aByteCode, &pVm->sAllocator, sizeof(VmInstr));
	SySetAlloc(&aByteCode, 0x20);
	/* Reset the code generator */
	if( bTrueReturn ){
		/* Included file, log compile-time errors */
		xErr = pVm->pEngine->xConf.xErr;
		pErrData = pVm->pEngine->xConf.pErrData;
	}
	jx9ResetCodeGenerator(pVm, xErr, pErrData);
	/* Swap bytecode container */
	pByteCode = pVm->pByteContainer;
	pVm->pByteContainer = &aByteCode;
	/* Compile the chunk */
	jx9CompileScript(pVm, pChunk, iFlags);
	if( pVm->sCodeGen.nErr > 0 ){
		/* Compilation error, return false */
		if( pCtx ){
			jx9_result_bool(pCtx, 0);
		}
	}else{
		jx9_value sResult; /* Return value */
		if( SXRET_OK != jx9VmEmitInstr(pVm, JX9_OP_DONE, 0, 0, 0, 0) ){
			/* Out of memory */
			if( pCtx ){
				jx9_result_bool(pCtx, 0);
			}
			goto Cleanup;
		}
		if( bTrueReturn ){
			/* Assume a boolean true return value */
			jx9MemObjInitFromBool(pVm, &sResult, 1);
		}else{
			/* Assume a null return value */
			jx9MemObjInit(pVm, &sResult);
		}
		/* Execute the compiled chunk */
		VmLocalExec(pVm, &aByteCode, &sResult);
		if( pCtx ){
			/* Set the execution result */
			jx9_result_value(pCtx, &sResult);
		}
		jx9MemObjRelease(&sResult);
	}
Cleanup:
	/* Cleanup the mess left behind */
	pVm->pByteContainer = pByteCode;
	SySetRelease(&aByteCode);
	return SXRET_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x50(%rbp), %rdi
movl $0x18, %edx
callq 0x5b470
leaq -0x50(%rbp), %rdi
movl $0x20, %esi
callq 0x7e350
cmpl $0x0, -0x20(%rbp)
je 0x7e630
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rax
movq 0xc8(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x60(%rbp), %rdx
callq 0x7e760
movq -0x8(%rbp), %rax
movq 0xf0(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
leaq -0x50(%rbp), %rcx
movq %rcx, 0xf0(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x7e120
movq -0x8(%rbp), %rax
cmpl $0x0, 0x6d0(%rax)
jbe 0x7e693
cmpq $0x0, -0x10(%rbp)
je 0x7e68e
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x57070
jmp 0x7e72d
movq -0x8(%rbp), %rdi
movl $0x1, %esi
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %r9d
movl %ecx, %edx
movq %r9, %r8
callq 0x7e8f0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x7e6c9
cmpq $0x0, -0x10(%rbp)
je 0x7e6c7
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x57070
jmp 0x7e72f
cmpl $0x0, -0x20(%rbp)
je 0x7e6e6
movq -0x8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movl $0x1, %edx
callq 0x7e450
jmp 0x7e6f6
movq -0x8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x6da90
movq -0x8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0xa0(%rbp), %rdx
callq 0x77640
cmpq $0x0, -0x10(%rbp)
je 0x7e721
movq -0x10(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x572c0
leaq -0xa0(%rbp), %rdi
callq 0x56ab0
jmp 0x7e72f
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xf0(%rax)
leaq -0x50(%rbp), %rdi
callq 0x66980
xorl %eax, %eax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)