// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %ecx, %r14d
movq %rdx, %r12
movq %rsi, -0x30(%rbp)
movq %rdi, %rbx
movabsq $0x1800000000, %rax     # imm = 0x1800000000
movq %rax, -0x4c(%rbp)
xorl %eax, %eax
movl %eax, -0x50(%rbp)
movl %eax, -0x44(%rbp)
movq %rdi, -0x60(%rbp)
movq $0x0, -0x40(%rbp)
movl $0x300, %esi            # imm = 0x300
callq 0x33d86
movq %rax, -0x58(%rbp)
testq %rax, %rax
je 0x4819d
movl $0x20, -0x4c(%rbp)
movl %r14d, -0x34(%rbp)
testl %r14d, %r14d
je 0x481bd
movq 0xc0(%rbx), %rax
movq 0xc0(%rax), %r13
movq 0xc8(%rax), %r14
jmp 0x481c3
xorl %r13d, %r13d
xorl %r14d, %r14d
movq 0x630(%rbx), %rdi
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x481e4
movq %rax, %r15
callq 0x484ee
movq 0x8(%r15), %rax
movq %r15, %rdi
jmp 0x481ce
movq %r13, 0x6b0(%rbx)
movq %r14, 0x6b8(%rbx)
leaq 0x638(%rbx), %rax
movq %rax, 0x630(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x6c0(%rbx)
movl $0x0, 0x6d0(%rbx)
movq 0xf0(%rbx), %r13
leaq -0x60(%rbp), %rax
movq %rax, 0xf0(%rbx)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x48003
cmpl $0x0, 0x6d0(%rbx)
jne 0x48255
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x48365
testl %eax, %eax
je 0x4828a
movq -0x30(%rbp), %rax
testq %rax, %rax
je 0x48338
movq 0x8(%rax), %r14
movq %r14, %rdi
callq 0x30465
movq $0x0, (%r14)
movl $0xfffffe90, %eax       # imm = 0xFFFFFE90
andl 0x8(%r14), %eax
orl $0x8, %eax
movl %eax, 0x8(%r14)
jmp 0x48338
cmpl $0x0, -0x34(%rbp)
je 0x482d1
xorps %xmm0, %xmm0
movups %xmm0, -0x98(%rbp)
movups %xmm0, -0x78(%rbp)
movups %xmm0, -0x88(%rbp)
movq $0x0, -0x68(%rbp)
movq %rbx, -0x90(%rbp)
movups %xmm0, -0x80(%rbp)
movq %rbx, -0x88(%rbp)
movq $0x1, -0xa0(%rbp)
movl $0x8, %eax
jmp 0x482fd
xorps %xmm0, %xmm0
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0x80(%rbp)
movq %rbx, -0x90(%rbp)
movq %rbx, -0x88(%rbp)
movl $0x20, %eax
leaq -0xa0(%rbp), %rdx
movl %eax, 0x8(%rdx)
leaq -0x60(%rbp), %rsi
movq %rbx, %rdi
callq 0x444b5
movq -0x30(%rbp), %rax
testq %rax, %rax
je 0x4832c
movq 0x8(%rax), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x3e19f
leaq -0xa0(%rbp), %rdi
callq 0x30465
movq %r13, 0xf0(%rbx)
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x48356
movq -0x58(%rbp), %rsi
testq %rsi, %rsi
je 0x48356
callq 0x3490d
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq