// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: jx9CompileSimpleString
JX9_PRIVATE sxi32 jx9CompileSimpleString(jx9_gen_state *pGen, sxi32 iCompileFlag)
{
	SyString *pStr = &pGen->pIn->sData; /* Constant string literal */
	const char *zIn, *zCur, *zEnd;
	jx9_value *pObj;
	sxu32 nIdx;
	nIdx = 0; /* Prevent compiler warning */
	/* Delimit the string */
	zIn  = pStr->zString;
	zEnd = &zIn[pStr->nByte];
	if( zIn >= zEnd ){
		/* Empty string, load NULL */
		jx9VmEmitInstr(pGen->pVm, JX9_OP_LOADC, 0, 0, 0, 0);
		return SXRET_OK;
	}
	if( SXRET_OK == GenStateFindLiteral(&(*pGen), pStr, &nIdx) ){
		/* Already processed, emit the load constant instruction
		 * and return.
		 */
		jx9VmEmitInstr(pGen->pVm, JX9_OP_LOADC, 0, nIdx, 0, 0);
		return SXRET_OK;
	}
	/* Reserve a new constant */
	pObj = jx9VmReserveConstObj(pGen->pVm, &nIdx);
	if( pObj == 0 ){
		jx9GenCompileError(&(*pGen), E_ERROR, 1, "JX9 engine is running out of memory");
		SXUNUSED(iCompileFlag); /* cc warning */
		return SXERR_ABORT;
	}
	jx9MemObjInitFromString(pGen->pVm, pObj, 0);
	/* Compile the node */
	for(;;){
		if( zIn >= zEnd ){
			/* End of input */
			break;
		}
		zCur = zIn;
		while( zIn < zEnd && zIn[0] != '\\' ){
			zIn++;
		}
		if( zIn > zCur ){
			/* Append raw contents*/
			jx9MemObjStringAppend(pObj, zCur, (sxu32)(zIn-zCur));
		}
		zIn++;
		if( zIn < zEnd ){
			if( zIn[0] == '\\' ){
				/* A literal backslash */
				jx9MemObjStringAppend(pObj, "\\", sizeof(char));
			}else if( zIn[0] == '\'' ){
				/* A single quote */
				jx9MemObjStringAppend(pObj, "'", sizeof(char));
			}else{
				/* verbatim copy */
				zIn--;
				jx9MemObjStringAppend(pObj, zIn, sizeof(char)*2);
				zIn++;
			}
		}
		/* Advance the stream cursor */
		zIn++;
	}
	/* Emit the load constant instruction */
	jx9VmEmitInstr(pGen->pVm, JX9_OP_LOADC, 0, nIdx, 0, 0);
	if( pStr->nByte < 1024 ){
		/* Install in the literal table */
		GenStateInstallLiteral(pGen, pObj, nIdx);
	}
	/* Node successfully compiled */
	return SXRET_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x44(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movl 0x8(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
jb 0x89005
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x4, %esi
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %r9d
movl %ecx, %edx
movq %r9, %r8
callq 0x7e8f0
movl $0x0, -0x4(%rbp)
jmp 0x891f1
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x44(%rbp), %rdx
callq 0x89c00
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x89048
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl -0x44(%rbp), %ecx
movl $0x4, %esi
xorl %edx, %edx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0x7e8f0
movl $0x0, -0x4(%rbp)
jmp 0x891f1
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq -0x44(%rbp), %rsi
callq 0x7e3d0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x8908f
movq -0x10(%rbp), %rdi
movl $0x1, %edx
leaq 0x3b103(%rip), %rcx     # 0xc4176
movl %edx, %esi
movb $0x0, %al
callq 0x7e990
movl $0x0, -0x14(%rbp)
movl $0xfffffff6, -0x4(%rbp) # imm = 0xFFFFFFF6
jmp 0x891f1
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x40(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x78c60
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
jb 0x890b2
jmp 0x891af
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rcx
xorl %eax, %eax
cmpq -0x38(%rbp), %rcx
movb %al, -0x45(%rbp)
jae 0x890d9
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
setne %al
movb %al, -0x45(%rbp)
movb -0x45(%rbp), %al
testb $0x1, %al
jne 0x890e2
jmp 0x890f0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x890ba
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jbe 0x89114
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
movl %eax, %edx
callq 0x6f9b0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x8919e
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x8914d
movq -0x40(%rbp), %rdi
leaq 0x362b8(%rip), %rsi     # 0xbf3f9
movl $0x1, %edx
callq 0x6f9b0
jmp 0x8919c
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0x89170
movq -0x40(%rbp), %rdi
leaq 0x3b6c3(%rip), %rsi     # 0xc4827
movl $0x1, %edx
callq 0x6f9b0
jmp 0x8919a
movq -0x28(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl $0x2, %edx
callq 0x6f9b0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x8919c
jmp 0x8919e
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x890a3
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl -0x44(%rbp), %ecx
movl $0x4, %esi
xorl %edx, %edx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0x7e8f0
movq -0x20(%rbp), %rax
cmpl $0x400, 0x8(%rax)       # imm = 0x400
jae 0x891ea
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl -0x44(%rbp), %edx
callq 0x89c70
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)