// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: VmThrowErrorAp
static sxi32 VmThrowErrorAp(
	jx9_vm *pVm,         /* Target VM */
	SyString *pFuncName, /* Function name. NULL otherwise */
	sxi32 iErr,          /* Severity level: [i.e: Error, Warning or Notice] */
	const char *zFormat, /* Format message */
	va_list ap           /* Variable list of arguments */
	)
{
	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);
	}
	SyBlobFormatAp(pWorker, zFormat, ap);
	/* Consume the error message */
	rc = VmCallErrorHandler(&(*pVm), pWorker);
	return rc;
}

// Assembly:
cmpl $0x0, 0x4e8(%rdi)
je 0x45825
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r15
movl %edx, %r14d
movq %rsi, %r12
movq %rdi, %rbx
movl $0x0, 0x3b8(%rdi)
movl 0x3c0(%rdi), %eax
testb $0x4, %al
je 0x45805
movq $0x0, 0x3b0(%rbx)
movl $0x0, 0x3bc(%rbx)
andl $-0x5, %eax
movl %eax, 0x3c0(%rbx)
movl 0x3f8(%rbx), %eax
testl %eax, %eax
movq %rcx, -0x30(%rbp)
je 0x45828
decl %eax
imull 0x400(%rbx), %eax
addq 0x3f0(%rbx), %rax
jmp 0x4582a
xorl %eax, %eax
retq
xorl %eax, %eax
leaq 0x3a8(%rbx), %r13
testq %rax, %rax
je 0x45858
movq (%rax), %rsi
movl 0x8(%rax), %edx
movq %r13, %rdi
callq 0x360ae
leaq 0x342cb(%rip), %rsi     # 0x79b16
movq %r13, %rdi
movl $0x1, %edx
callq 0x360ae
cmpl $0x3, %r14d
leaq 0x308fc(%rip), %rax     # 0x7615f
leaq 0x308e3(%rip), %rcx     # 0x7614d
cmoveq %rax, %rcx
cmpl $0x2, %r14d
leaq 0x308dc(%rip), %rsi     # 0x76155
cmovneq %rcx, %rsi
cmpb $0x0, (%rsi)
movq %rsi, %rdx
je 0x458b8
leaq 0x2(%rsi), %rdx
cmpb $0x0, -0x1(%rdx)
je 0x458b0
cmpb $0x0, (%rdx)
je 0x458b8
cmpb $0x0, 0x1(%rdx)
je 0x458b5
leaq 0x4(%rdx), %rax
cmpb $0x0, 0x2(%rdx)
movq %rax, %rdx
jne 0x45889
addq $-0x2, %rax
movq %rax, %rdx
jmp 0x458b8
decq %rdx
jmp 0x458b8
incq %rdx
subl %esi, %edx
movq %r13, %rdi
callq 0x360ae
testq %r12, %r12
je 0x458ec
movq (%r12), %rsi
movl 0x8(%r12), %edx
movq %r13, %rdi
callq 0x360ae
leaq 0x30889(%rip), %rsi     # 0x76168
movq %r13, %rdi
movl $0x4, %edx
callq 0x360ae
leaq -0x34(%rbp), %r8
movl $0x0, (%r8)
movq %r15, (%rsp)
movl $0x6, %edi
movq %r13, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq -0x30(%rbp), %r9
callq 0x351b4
leaq 0x349ca(%rip), %rsi     # 0x7a2e1
movq %r13, %rdi
movl $0x1, %edx
callq 0x360ae
movq 0x3b0(%rbx), %rdi
movl 0x3b8(%rbx), %esi
movq 0x500(%rbx), %rdx
callq *0x4f8(%rbx)
movl 0x3b8(%rbx), %ecx
addl %ecx, 0x4f4(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq