// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: jx9VmMakeReady
JX9_PRIVATE sxi32 jx9VmMakeReady(
	jx9_vm *pVm /* Target VM */
	)
{
	sxi32 rc;
	if( pVm->nMagic != JX9_VM_INIT ){
		/* Initialize your VM first */
		return SXERR_CORRUPT;
	}
	/* Mark the VM ready for bytecode execution */
	pVm->nMagic = JX9_VM_RUN; 
	/* Release the code generator now we have compiled our program */
	jx9ResetCodeGenerator(pVm, 0, 0);
	/* Emit the DONE instruction */
	rc = jx9VmEmitInstr(&(*pVm), JX9_OP_DONE, 0, 0, 0, 0);
	if( rc != SXRET_OK ){
		return SXERR_MEM;
	}
	/* Script return value */
	jx9MemObjInit(&(*pVm), &pVm->sExec); /* Assume a NULL return value */
	/* Allocate a new operand stack */	
	pVm->aOps = VmNewOperandStack(&(*pVm), SySetUsed(pVm->pByteContainer));
	if( pVm->aOps == 0 ){
		return SXERR_MEM;
	}
	/* Set the default VM output consumer callback and it's 
	 * private data. */
	pVm->sVmConsumer.xConsumer = jx9VmBlobConsumer;
	pVm->sVmConsumer.pUserData = &pVm->sConsumer;
	/* Register special functions first [i.e: print, func_get_args(), die, etc.] */
	rc = VmRegisterSpecialFunction(&(*pVm));
	if( rc != SXRET_OK ){
		/* Don't worry about freeing memory, everything will be released shortly */
		return rc;
	}
	/* Create superglobals [i.e: $GLOBALS, $_GET, $_POST...] */
	rc = jx9HashmapLoadBuiltin(&(*pVm));
	if( rc != SXRET_OK ){
		/* Don't worry about freeing memory, everything will be released shortly */
		return rc;
	}
	/* Register built-in constants [i.e: JX9_EOL, JX9_OS...] */
	jx9RegisterBuiltInConstant(&(*pVm));
	/* Register built-in functions [i.e: is_null(), array_diff(), strlen(), etc.] */
	jx9RegisterBuiltInFunction(&(*pVm));
	/* VM is ready for bytecode execution */
	return SXRET_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0xea12cd72, 0x6e8(%rax) # imm = 0xEA12CD72
je 0x7e228
movl $0xffffffe8, -0x4(%rbp) # imm = 0xFFFFFFE8
jmp 0x7e33a
movq -0x10(%rbp), %rax
movl $0xba851227, 0x6e8(%rax) # imm = 0xBA851227
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x7e760
movq -0x10(%rbp), %rdi
movl $0x1, %esi
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %r9d
movl %ecx, %edx
movq %r9, %r8
callq 0x7e8f0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x7e275
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7e33a
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x490, %rsi            # imm = 0x490
callq 0x6da90
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rax
movl 0x10(%rax), %esi
callq 0x72b20
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x258(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x258(%rax)
jne 0x7e2c5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7e33a
movq -0x10(%rbp), %rax
leaq -0x12c10(%rip), %rcx    # 0x6b6c0
movq %rcx, 0x4f8(%rax)
movq -0x10(%rbp), %rcx
addq $0x388, %rcx            # imm = 0x388
movq -0x10(%rbp), %rax
movq %rcx, 0x500(%rax)
movq -0x10(%rbp), %rdi
callq 0x8a340
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x7e307
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x7e33a
movq -0x10(%rbp), %rdi
callq 0x8a3d0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x7e321
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x7e33a
movq -0x10(%rbp), %rdi
callq 0x8a4f0
movq -0x10(%rbp), %rdi
callq 0x8a560
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)