// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: ExprProcessFuncArguments
static sxi32 ExprProcessFuncArguments(jx9_gen_state *pGen, jx9_expr_node *pOp, jx9_expr_node **apNode, sxi32 nToken)
{
	sxi32 iNest, iCur, iNode;
	sxi32 rc;
	/* Process function arguments from left to right */
	iCur = 0;
	for(;;){
		if( iCur >= nToken ){
			/* No more arguments to process */
			break;
		}
		iNode = iCur;
		iNest = 0;
		while( iCur < nToken ){
			if( apNode[iCur] ){
				if( (apNode[iCur]->pStart->nType & JX9_TK_COMMA) && apNode[iCur]->pLeft == 0 && iNest <= 0 ){
					break;
				}else if( apNode[iCur]->pStart->nType & (JX9_TK_LPAREN|JX9_TK_OSB|JX9_TK_OCB) ){
					iNest++;
				}else if( apNode[iCur]->pStart->nType & (JX9_TK_RPAREN|JX9_TK_CCB|JX9_TK_CSB) ){
					iNest--;
				}
			}
			iCur++;
		}
		if( iCur > iNode ){
			ExprMakeTree(&(*pGen), &apNode[iNode], iCur-iNode);
			if( apNode[iNode] ){
				/* Put a pointer to the root of the tree in the arguments set */
				SySetPut(&pOp->aNodeArgs, (const void *)&apNode[iNode]);
			}else{
				/* Empty function argument */
				rc = jx9GenCompileError(&(*pGen), E_ERROR, pOp->pStart->nLine, "Empty function argument");
				if( rc != SXERR_ABORT ){
					rc = SXERR_SYNTAX;
				}
				return rc;
			}
		}else{
			rc = jx9GenCompileError(&(*pGen), E_ERROR, pOp->pStart->nLine, "Missing function argument");
			if( rc != SXERR_ABORT ){
				rc = SXERR_SYNTAX;
			}
			return rc;
		}
		/* Jump trailing comma */
		if( iCur < nToken && apNode[iCur] && (apNode[iCur]->pStart->nType & JX9_TK_COMMA) ){
			iCur++;
			if( iCur >= nToken ){
				/* missing function argument */
				rc = jx9GenCompileError(&(*pGen), E_ERROR, pOp->pStart->nLine, "Missing function argument");
				if( rc != SXERR_ABORT ){
					rc = SXERR_SYNTAX;
				}
				return rc;
			}
		}
	}
	return SXRET_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jl 0x8a00b
jmp 0x8a22a
movl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x8a0d1
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x8a0c3
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x18(%rax), %rax
movl 0x10(%rax), %eax
andl $0x20000, %eax          # imm = 0x20000
cmpl $0x0, %eax
je 0x8a06f
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x8(%rax)
jne 0x8a06f
cmpl $0x0, -0x28(%rbp)
jg 0x8a06f
jmp 0x8a0d1
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x18(%rax), %rax
movl 0x10(%rax), %eax
andl $0xa40, %eax            # imm = 0xA40
cmpl $0x0, %eax
je 0x8a097
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x8a0bf
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x18(%rax), %rax
movl 0x10(%rax), %eax
andl $0x1480, %eax           # imm = 0x1480
cmpl $0x0, %eax
je 0x8a0bd
movl -0x28(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x8a0bf
jmp 0x8a0c1
jmp 0x8a0c3
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x8a018
movl -0x2c(%rbp), %eax
cmpl -0x30(%rbp), %eax
jle 0x8a167
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movslq -0x30(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movl -0x2c(%rbp), %edx
subl -0x30(%rbp), %edx
callq 0x86a60
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x8a128
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
movq -0x20(%rbp), %rsi
movslq -0x30(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x5a7b0
jmp 0x8a165
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %edx
movl $0x1, %esi
leaq 0x3a4cb(%rip), %rcx     # 0xc460e
movb $0x0, %al
callq 0x7e990
movl %eax, -0x34(%rbp)
cmpl $-0xa, -0x34(%rbp)
je 0x8a15a
movl $0xfffffff4, -0x34(%rbp) # imm = 0xFFFFFFF4
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x8a231
jmp 0x8a1a4
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %edx
movl $0x1, %esi
leaq 0x3a4a4(%rip), %rcx     # 0xc4626
movb $0x0, %al
callq 0x7e990
movl %eax, -0x34(%rbp)
cmpl $-0xa, -0x34(%rbp)
je 0x8a199
movl $0xfffffff4, -0x34(%rbp) # imm = 0xFFFFFFF4
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x8a231
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x8a225
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x8a225
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x18(%rax), %rax
movl 0x10(%rax), %eax
andl $0x20000, %eax          # imm = 0x20000
cmpl $0x0, %eax
je 0x8a225
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jl 0x8a223
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %edx
movl $0x1, %esi
leaq 0x3a422(%rip), %rcx     # 0xc4626
movb $0x0, %al
callq 0x7e990
movl %eax, -0x34(%rbp)
cmpl $-0xa, -0x34(%rbp)
je 0x8a21b
movl $0xfffffff4, -0x34(%rbp) # imm = 0xFFFFFFF4
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x8a231
jmp 0x8a225
jmp 0x89ffe
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)