// File: /workspace/github_c_makefile_star2_O3/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:
cmpl $0x0, 0x4e8(%rdi)
je 0x40bf5
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %r13d
movq %rsi, %r12
movq %rdi, %rbx
movl $0x0, 0x3b8(%rdi)
movl 0x3c0(%rdi), %eax
testb $0x4, %al
je 0x40b53
movq $0x0, 0x3b0(%rbx)
movl $0x0, 0x3bc(%rbx)
andl $-0x5, %eax
movl %eax, 0x3c0(%rbx)
leaq 0x3a8(%rbx), %r15
movl 0x3f8(%rbx), %eax
testl %eax, %eax
je 0x40b9d
movq 0x3f0(%rbx), %rcx
testq %rcx, %rcx
je 0x40b9d
decl %eax
imull 0x400(%rbx), %eax
movq (%rcx,%rax), %rsi
movl 0x8(%rcx,%rax), %edx
movq %r15, %rdi
callq 0x359ad
leaq 0x36f91(%rip), %rsi     # 0x77b21
movq %r15, %rdi
movl $0x1, %edx
callq 0x359ad
cmpl $0x3, %r13d
leaq 0x335bf(%rip), %rax     # 0x74167
leaq 0x335a6(%rip), %rcx     # 0x74155
cmoveq %rax, %rcx
cmpl $0x2, %r13d
leaq 0x3359f(%rip), %rsi     # 0x7415d
cmovneq %rcx, %rsi
cmpb $0x0, (%rsi)
movq %rsi, %rdx
je 0x40c00
leaq 0x2(%rsi), %rdx
cmpb $0x0, -0x1(%rdx)
je 0x40bf8
cmpb $0x0, (%rdx)
je 0x40c00
cmpb $0x0, 0x1(%rdx)
je 0x40bfd
leaq 0x4(%rdx), %rax
cmpb $0x0, 0x2(%rdx)
movq %rax, %rdx
jne 0x40bce
addq $-0x2, %rax
movq %rax, %rdx
jmp 0x40c00
xorl %eax, %eax
retq
decq %rdx
jmp 0x40c00
incq %rdx
subl %esi, %edx
movq %r15, %rdi
callq 0x359ad
testq %r12, %r12
je 0x40c34
movq (%r12), %rsi
movl 0x8(%r12), %edx
movq %r15, %rdi
callq 0x359ad
leaq 0x33549(%rip), %rsi     # 0x74170
movq %r15, %rdi
movl $0x4, %edx
callq 0x359ad
cmpb $0x0, (%r14)
movq %r14, %rdx
je 0x40c70
leaq 0x2(%r14), %rdx
cmpb $0x0, -0x1(%rdx)
je 0x40c68
cmpb $0x0, (%rdx)
je 0x40c70
cmpb $0x0, 0x1(%rdx)
je 0x40c6d
leaq 0x4(%rdx), %rax
cmpb $0x0, 0x2(%rdx)
movq %rax, %rdx
jne 0x40c41
addq $-0x2, %rax
movq %rax, %rdx
jmp 0x40c70
decq %rdx
jmp 0x40c70
incq %rdx
subl %r14d, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x359ad
leaq 0x3765c(%rip), %rsi     # 0x782e1
movq %r15, %rdi
movl $0x1, %edx
callq 0x359ad
movq 0x3b0(%rbx), %rdi
movl 0x3b8(%rbx), %esi
movq 0x500(%rbx), %rdx
callq *0x4f8(%rbx)
movl 0x3b8(%rbx), %ecx
addl %ecx, 0x4f4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq