// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: jx9VmThrowError
JX9_PRIVATE sxi32 jx9VmThrowError(
	jx9_vm *pVm,         /* Target VM */
	SyString *pFuncName, /* Function name. NULL otherwise */
	sxi32 iErr,          /* Severity level: [i.e: Error, Warning or Notice]*/
	const char *zMessage /* Null terminated error message */
	)
{
	SyBlob *pWorker = &pVm->sWorker;
	SyString *pFile;
	char *zErr;
	sxi32 rc;
	if( !pVm->bErrReport ){
		/* Don't bother reporting errors */
		return SXRET_OK;
	}
	/* Reset the working buffer */
	SyBlobReset(pWorker);
	/* Peek the processed file if available */
	pFile = (SyString *)SySetPeek(&pVm->aFiles);
	if( pFile ){
		/* Append file name */
		SyBlobAppend(pWorker, pFile->zString, pFile->nByte);
		SyBlobAppend(pWorker, (const void *)" ", sizeof(char));
	}
	zErr = "Error: ";
	switch(iErr){
	case JX9_CTX_WARNING: zErr = "Warning: "; break;
	case JX9_CTX_NOTICE:  zErr = "Notice: ";  break;
	default:
		iErr = JX9_CTX_ERR;
		break;
	}
	SyBlobAppend(pWorker, zErr, SyStrlen(zErr));
	if( pFuncName ){
		/* Append function name first */
		SyBlobAppend(pWorker, pFuncName->zString, pFuncName->nByte);
		SyBlobAppend(pWorker, "(): ", sizeof("(): ")-1);
	}
	SyBlobAppend(pWorker, zMessage, SyStrlen(zMessage));
	/* Consume the error message */
	rc = VmCallErrorHandler(&(*pVm), pWorker);
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq $0x3a8, %rax            # imm = 0x3A8
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4e8(%rax)
jne 0x72bde
movl $0x0, -0x4(%rbp)
jmp 0x72d0a
movq -0x30(%rbp), %rdi
callq 0x65e00
movq -0x10(%rbp), %rdi
addq $0x3e8, %rdi            # imm = 0x3E8
callq 0x70f20
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x72c2e
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rax
movq (%rax), %rsi
movq -0x38(%rbp), %rax
movl 0x8(%rax), %edx
callq 0x5d9d0
movq -0x30(%rbp), %rdi
leaq 0x533d6(%rip), %rsi     # 0xc5ffa
movl $0x1, %edx
callq 0x5d9d0
leaq 0x4f9f1(%rip), %rax     # 0xc2626
movq %rax, -0x40(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x48(%rbp)
subl $0x2, %eax
je 0x72c50
jmp 0x72c46
movl -0x48(%rbp), %eax
subl $0x3, %eax
je 0x72c5d
jmp 0x72c6a
leaq 0x4f9d7(%rip), %rax     # 0xc262e
movq %rax, -0x40(%rbp)
jmp 0x72c71
leaq 0x4f9d4(%rip), %rax     # 0xc2638
movq %rax, -0x40(%rbp)
jmp 0x72c71
movl $0x1, -0x1c(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rdi
callq 0x55d10
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl %eax, %edx
callq 0x5d9d0
cmpq $0x0, -0x18(%rbp)
je 0x72ccc
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %edx
callq 0x5d9d0
movq -0x30(%rbp), %rdi
leaq 0x4f97f(%rip), %rsi     # 0xc2641
movl $0x4, %edx
callq 0x5d9d0
movq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rdi
callq 0x55d10
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
movl %eax, %edx
callq 0x5d9d0
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x76840
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)