// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unqlite_compile_file
int unqlite_compile_file(unqlite *pDb,const char *zPath,unqlite_vm **ppOut)
{
	jx9_vm *pVm;
	int rc;
	if( UNQLITE_DB_MISUSE(pDb) || ppOut == 0){
		return UNQLITE_CORRUPT;
	}
#if defined(UNQLITE_ENABLE_THREADS)
	 /* Acquire DB mutex */
	 SyMutexEnter(sUnqlMPGlobal.pMutexMethods, pDb->pMutex); /* NO-OP if sUnqlMPGlobal.nThreadingLevel != UNQLITE_THREAD_LEVEL_MULTI */
	 if( sUnqlMPGlobal.nThreadingLevel > UNQLITE_THREAD_LEVEL_SINGLE && 
		 UNQLITE_THRD_DB_RELEASE(pDb) ){
			 return UNQLITE_ABORT;
	 }
#endif
	 /* Compile the Jx9 script first */
	rc = jx9_compile_file(pDb->sDB.pJx9,zPath,&pVm);
	if( rc == JX9_OK ){
		/* Allocate a new unqlite VM instance */
		rc = unqliteInitVm(pDb,pVm,ppOut);
		if( rc != UNQLITE_OK ){
			/* Release the Jx9 VM */
			jx9_vm_release(pVm);
		}
	}
#if defined(UNQLITE_ENABLE_THREADS)
	 /* Leave DB mutex */
	 SyMutexLeave(sUnqlMPGlobal.pMutexMethods,pDb->pMutex); /* NO-OP if sUnqlMPGlobal.nThreadingLevel != UNQLITE_THREAD_LEVEL_MULTI */
#endif
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
pushq $-0x18
popq %r15
testq %rdi, %rdi
je 0x28847
movq %rdx, %r14
testq %rdx, %rdx
je 0x28847
movq %rdi, %rbx
cmpl $0xdb7c2712, 0x120(%rdi) # imm = 0xDB7C2712
jne 0x28847
movq %rsi, %r13
movq 0xf8(%rbx), %rdi
testq %rdi, %rdi
je 0x286ee
movq 0x5f0ad(%rip), %rax     # 0x87798
callq *0x20(%rax)
cmpl $0x2, 0x5f0b3(%rip)     # 0x877a8
jb 0x28707
cmpl $0xdb7c2712, 0x120(%rbx) # imm = 0xDB7C2712
jne 0x28827
movq 0xe0(%rbx), %r12
andq $0x0, -0x30(%rbp)
testq %r12, %r12
je 0x28831
testq %r13, %r13
je 0x28831
cmpl $0xf874bcd7, 0x118(%r12) # imm = 0xF874BCD7
jne 0x28831
cmpb $0x0, (%r13)
je 0x28831
movq 0xf0(%r12), %rdi
testq %rdi, %rdi
je 0x28759
movq 0x5f96a(%rip), %rax     # 0x880c0
callq *0x20(%rax)
cmpl $0x2, 0x5f970(%rip)     # 0x880d0
jb 0x28774
cmpl $0xf874bcd7, 0x118(%r12) # imm = 0xF874BCD7
jne 0x2882d
movq 0xb8(%r12), %rcx
pushq $-0x2
popq %r15
testq %rcx, %rcx
je 0x287eb
movq 0x108(%rcx), %rax
testq %rax, %rax
je 0x287eb
movq %rcx, -0x48(%rbp)
leaq -0x40(%rbp), %rsi
andq $0x0, (%rsi)
leaq -0x38(%rbp), %rdx
andq $0x0, (%rdx)
movq %r13, %rdi
callq *%rax
testl %eax, %eax
jne 0x287eb
movq -0x40(%rbp), %rax
leaq -0x58(%rbp), %rdx
movq %rax, (%rdx)
movl -0x38(%rbp), %eax
movl %eax, 0x8(%rdx)
leaq -0x30(%rbp), %rsi
movq %r12, %rdi
movq %r13, %rcx
callq 0x3e1e8
movl %eax, %r15d
movq -0x48(%rbp), %rax
movq 0x110(%rax), %rax
testq %rax, %rax
je 0x287eb
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq *%rax
movq 0xf0(%r12), %rdi
testq %rdi, %rdi
je 0x28802
movq 0x5f8c1(%rip), %rax     # 0x880c0
callq *0x30(%rax)
testl %r15d, %r15d
jne 0x28831
movq -0x30(%rbp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x2841b
testl %eax, %eax
je 0x28859
movq -0x30(%rbp), %rdi
callq 0x2856a
pushq $-0x1
jmp 0x2882f
pushq $-0xa
popq %r15
jmp 0x28847
pushq $-0xa
popq %r15
movq 0xf8(%rbx), %rdi
testq %rdi, %rdi
je 0x28847
movq 0x5ef54(%rip), %rax     # 0x87798
callq *0x30(%rax)
movl %r15d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
jmp 0x28831