// File: /workspace/github_c_makefile_star2_O3/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 0x44a6f
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, %r13
movq %rdi, %rbx
movq %rcx, -0x30(%rbp)
movl $0x0, 0x3b8(%rdi)
movl 0x3c0(%rdi), %eax
testb $0x4, %al
je 0x449cd
movq $0x0, 0x3b0(%rbx)
movl $0x0, 0x3bc(%rbx)
andl $-0x5, %eax
movl %eax, 0x3c0(%rbx)
leaq 0x3a8(%rbx), %r12
movl 0x3f8(%rbx), %eax
testl %eax, %eax
je 0x44a17
movq 0x3f0(%rbx), %rcx
testq %rcx, %rcx
je 0x44a17
decl %eax
imull 0x400(%rbx), %eax
movq (%rcx,%rax), %rsi
movl 0x8(%rcx,%rax), %edx
movq %r12, %rdi
callq 0x359ad
leaq 0x33117(%rip), %rsi     # 0x77b21
movq %r12, %rdi
movl $0x1, %edx
callq 0x359ad
cmpl $0x3, %r14d
leaq 0x2f745(%rip), %rax     # 0x74167
leaq 0x2f72c(%rip), %rcx     # 0x74155
cmoveq %rax, %rcx
cmpl $0x2, %r14d
leaq 0x2f725(%rip), %rsi     # 0x7415d
cmovneq %rcx, %rsi
cmpb $0x0, (%rsi)
movq %rsi, %rdx
je 0x44a7a
leaq 0x2(%rsi), %rdx
cmpb $0x0, -0x1(%rdx)
je 0x44a72
cmpb $0x0, (%rdx)
je 0x44a7a
cmpb $0x0, 0x1(%rdx)
je 0x44a77
leaq 0x4(%rdx), %rax
cmpb $0x0, 0x2(%rdx)
movq %rax, %rdx
jne 0x44a48
addq $-0x2, %rax
movq %rax, %rdx
jmp 0x44a7a
xorl %eax, %eax
retq
decq %rdx
jmp 0x44a7a
incq %rdx
subl %esi, %edx
movq %r12, %rdi
callq 0x359ad
testq %r13, %r13
je 0x44aad
movq (%r13), %rsi
movl 0x8(%r13), %edx
movq %r12, %rdi
callq 0x359ad
leaq 0x2f6d0(%rip), %rsi     # 0x74170
movq %r12, %rdi
movl $0x4, %edx
callq 0x359ad
movq %r15, (%rsp)
leaq -0x34(%rbp), %r8
movl $0x6, %edi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq -0x30(%rbp), %r9
callq 0x34a80
leaq 0x33810(%rip), %rsi     # 0x782e1
movq %r12, %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 $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq