// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: jx9CompileContinue
static sxi32 jx9CompileContinue(jx9_gen_state *pGen)
{
	GenBlock *pLoop; /* Target loop */
	sxi32 iLevel;    /* How many nesting loop to skip */
	sxu32 nLine;
	sxi32 rc;
	nLine = pGen->pIn->nLine;
	iLevel = 0;
	/* Jump the 'continue' keyword */
	pGen->pIn++;
	if( pGen->pIn < pGen->pEnd && (pGen->pIn->nType & JX9_TK_NUM) ){
		/* optional numeric argument which tells us how many levels
		 * of enclosing loops we should skip to the end of. 
		 */
		iLevel = (sxi32)jx9TokenValueToInt64(&pGen->pIn->sData);
		if( iLevel < 2 ){
			iLevel = 0;
		}
		pGen->pIn++; /* Jump the optional numeric argument */
	}
	/* Point to the target loop */
	pLoop = GenStateFetchBlock(pGen->pCurrent, GEN_BLOCK_LOOP, iLevel);
	if( pLoop == 0 ){
		/* Illegal continue */
		rc = jx9GenCompileError(pGen, E_ERROR, nLine, "A 'continue' statement may only be used within a loop or switch");
		if( rc == SXERR_ABORT ){
			/* Error count limit reached, abort immediately */
			return SXERR_ABORT;
		}
	}else{
		sxu32 nInstrIdx = 0;
		/* Emit the unconditional jump to the beginning of the target loop */
		jx9VmEmitInstr(pGen->pVm, JX9_OP_JMP, 0, pLoop->nFirstInstr, 0, &nInstrIdx);
		if( pLoop->bPostContinue == TRUE ){
			JumpFixup sJumpFix;
			/* Post-continue */
			sJumpFix.nJumpType = JX9_OP_JMP;
			sJumpFix.nInstrIdx = nInstrIdx;
			SySetPut(&pLoop->aPostContFix, (const void *)&sJumpFix);
		}
	}
	if( pGen->pIn < pGen->pEnd && (pGen->pIn->nType & JX9_TK_SEMI) == 0 ){
		/* Not so fatal, emit a warning only */
		jx9GenCompileError(&(*pGen), E_WARNING, pGen->pIn->nLine, "Expected semi-colon ';' after 'continue' statement");
	}
	/* Statement successfully compiled */
	return SXRET_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x158(%rdi), %rax
movl 0x14(%rax), %r14d
leaq 0x20(%rax), %rdi
movq %rdi, 0x158(%rbx)
xorl %ecx, %ecx
cmpq 0x160(%rbx), %rdi
jae 0x4b6eb
testb $0x3, 0x30(%rax)
je 0x4b6eb
callq 0x3fbb7
xorl %ecx, %ecx
cmpl $0x2, %eax
cmovgel %eax, %ecx
addq $0x20, 0x158(%rbx)
movq 0xc8(%rbx), %r15
movl 0x14(%r15), %eax
testb $0x1, %al
je 0x4b701
cmpl $0x2, %ecx
jl 0x4b738
decl %ecx
movq 0x8(%r15), %r15
testq %r15, %r15
je 0x4b712
movl 0x14(%r15), %eax
testb $0xa, %al
je 0x4b6f6
leaq 0x2a4bb(%rip), %rcx     # 0x75bd4
movq %rbx, %rdi
movl $0x1, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x483d1
movl $0xfffffff6, %r14d      # imm = 0xFFFFFFF6
cmpl $-0xa, %eax
jne 0x4b77c
jmp 0x4b7b1
leaq -0x1c(%rbp), %r9
movl $0x0, (%r9)
movq (%rbx), %rdi
movl 0x10(%r15), %ecx
movl $0x8, %esi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x48365
cmpb $0x1, 0x48(%r15)
jne 0x4b77c
leaq -0x24(%rbp), %rsi
movl $0x8, (%rsi)
movl -0x1c(%rbp), %eax
movl %eax, 0x4(%rsi)
addq $0x50, %r15
movq %r15, %rdi
callq 0x33094
movq 0x158(%rbx), %rax
xorl %r14d, %r14d
cmpq 0x160(%rbx), %rax
jae 0x4b7b1
testb $0x4, 0x12(%rax)
jne 0x4b7b1
movl 0x14(%rax), %edx
leaq 0x2a475(%rip), %rcx     # 0x75c14
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x483d1
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq