// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: jx9CompileUplink
static sxi32 jx9CompileUplink(jx9_gen_state *pGen)
{
	SyToken *pTmp, *pNext = 0;
	sxi32 nExpr;
	sxi32 rc;
	/* Jump the 'uplink' keyword */
	pGen->pIn++;
	if( pGen->pIn >= pGen->pEnd || (pGen->pIn->nType & JX9_TK_SEMI) ){
		/* Nothing to process */
		return SXRET_OK;
	}
	pTmp = pGen->pEnd;
	nExpr = 0;
	while( SXRET_OK == jx9GetNextExpr(pGen->pIn, pTmp, &pNext) ){
		if( pGen->pIn < pNext ){
			pGen->pEnd = pNext;
			if( (pGen->pIn->nType & JX9_TK_DOLLAR) == 0 ){
				rc = jx9GenCompileError(&(*pGen), E_ERROR, pGen->pIn->nLine, "uplink: Expected variable name");
				if( rc == SXERR_ABORT ){
					return SXERR_ABORT;
				}
			}else{
				pGen->pIn++;
				if( pGen->pIn >= pGen->pEnd ){
					/* Emit a warning */
					jx9GenCompileError(&(*pGen), E_WARNING, pGen->pIn[-1].nLine, "uplink: Empty variable name");
				}else{
					rc = jx9CompileExpr(&(*pGen), 0, 0);
					if( rc == SXERR_ABORT ){
						return SXERR_ABORT;
					}else if(rc != SXERR_EMPTY ){
						nExpr++;
					}
				}
			}
		}
		/* Next expression in the stream */
		pGen->pIn = pNext;
		/* Jump trailing commas */
		while( pGen->pIn < pTmp && (pGen->pIn->nType & JX9_TK_COMMA) ){
			pGen->pIn++;
		}
	}
	/* Restore token stream */
	pGen->pEnd = pTmp;
	if( nExpr > 0 ){
		/* Emit the uplink instruction */
		jx9VmEmitInstr(pGen->pVm, JX9_OP_UPLINK, nExpr, 0, 0, 0);
	}
	return SXRET_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rcx
addq $0x20, %rcx
movq %rcx, 0x158(%rax)
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x160(%rcx), %rax
jae 0x83bfa
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rax
movl 0x10(%rax), %eax
andl $0x40000, %eax          # imm = 0x40000
cmpl $0x0, %eax
je 0x83c06
movl $0x0, -0x4(%rbp)
jmp 0x83dea
movq -0x10(%rbp), %rax
movq 0x160(%rax), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rdi
movq -0x18(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x85700
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x83db0
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rax
cmpq -0x20(%rbp), %rax
jae 0x83d49
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x160(%rax)
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rax
movl 0x10(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x83cb9
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rax
movl 0x14(%rax), %edx
movl $0x1, %esi
leaq 0x40502(%rip), %rcx     # 0xc419a
movb $0x0, %al
callq 0x7e990
movl %eax, -0x28(%rbp)
cmpl $-0xa, -0x28(%rbp)
jne 0x83cb4
movl $0xfffffff6, -0x4(%rbp) # imm = 0xFFFFFFF6
jmp 0x83dea
jmp 0x83d47
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rcx
addq $0x20, %rcx
movq %rcx, 0x158(%rax)
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x160(%rcx), %rax
jb 0x83d0e
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rax
movl -0xc(%rax), %edx
movl $0x2, %esi
leaq 0x404b4(%rip), %rcx     # 0xc41b9
movb $0x0, %al
callq 0x7e990
jmp 0x83d45
movq -0x10(%rbp), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x81110
movl %eax, -0x28(%rbp)
cmpl $-0xa, -0x28(%rbp)
jne 0x83d32
movl $0xfffffff6, -0x4(%rbp) # imm = 0xFFFFFFF6
jmp 0x83dea
cmpl $-0x3, -0x28(%rbp)
je 0x83d41
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x83d43
jmp 0x83d45
jmp 0x83d47
jmp 0x83d49
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x158(%rax)
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x29(%rbp)
jae 0x83d8a
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rax
movl 0x10(%rax), %eax
andl $0x20000, %eax          # imm = 0x20000
cmpl $0x0, %eax
setne %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x83d93
jmp 0x83dab
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rcx
addq $0x20, %rcx
movq %rcx, 0x158(%rax)
jmp 0x83d58
jmp 0x83c1c
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x160(%rax)
cmpl $0x0, -0x24(%rbp)
jle 0x83de3
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl -0x24(%rbp), %edx
movl $0x40, %esi
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0x7e8f0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)