// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
movq 0x158(%rdi), %r12
andl $0x0, -0x2c(%rbp)
movl 0x8(%r12), %r14d
testq %r14, %r14
je 0x44cf8
movq (%r12), %rbx
leaq -0x2c(%rbp), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x44ea5
movq (%r15), %rdi
testl %eax, %eax
je 0x44d41
movq %r15, -0x38(%rbp)
leaq -0x2c(%rbp), %rsi
callq 0x3ebdc
testq %rax, %rax
je 0x44d69
movq %rax, %r15
movq %r12, -0x40(%rbp)
addq %rbx, %r14
movq -0x38(%rbp), %rax
movq (%rax), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3bbfe
cmpq %r14, %rbx
jae 0x44d07
leaq 0x1(%rbx), %r12
xorl %edx, %edx
leaq -0x1(%r12), %r13
cmpq %r14, %r13
jae 0x44caa
cmpb $0x5c, (%r13)
je 0x44caa
incq %r12
incl %edx
jmp 0x44c92
cmpq %rbx, %r13
jbe 0x44cba
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3689a
cmpq %r14, %r12
jae 0x44cf0
movzbl (%r12), %eax
movq %r15, %rdi
cmpl $0x27, %eax
je 0x44cda
cmpl $0x5c, %eax
jne 0x44ce5
leaq 0x1c71d(%rip), %rsi     # 0x613f5
jmp 0x44ce1
leaq 0x21645(%rip), %rsi     # 0x66326
pushq $0x1
jmp 0x44cea
movq %r13, %rsi
pushq $0x2
popq %rdx
callq 0x3689a
incq %r12
movq %r12, %rbx
jmp 0x44c87
movq (%r15), %rdi
xorl %r12d, %r12d
pushq $0x4
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
jmp 0x44d4c
movq -0x38(%rbp), %rbx
movq (%rbx), %rdi
movl -0x2c(%rbp), %ecx
xorl %r12d, %r12d
pushq $0x4
popq %rsi
xorl %edx, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x3ee6f
movq -0x40(%rbp), %rax
cmpl $0x3ff, 0x8(%rax)       # imm = 0x3FF
ja 0x44d57
movl -0x2c(%rbp), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x44ed8
jmp 0x44d57
movl -0x2c(%rbp), %ecx
xorl %r12d, %r12d
pushq $0x4
popq %rsi
xorl %edx, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x3ee6f
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20f05(%rip), %rcx     # 0x65c75
pushq $0x1
popq %rdx
movq -0x38(%rbp), %rdi
movl %edx, %esi
xorl %eax, %eax
callq 0x3eed6
pushq $-0xa
popq %r12
jmp 0x44d57