// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, -0x38(%rbp)
testl %ecx, %ecx
jle 0x4ef15
movq %rdx, %r13
movq %rsi, -0x40(%rbp)
leaq 0x38(%rsi), %rax
movq %rax, -0x48(%rbp)
movl %ecx, %r15d
xorl %eax, %eax
movl %ecx, -0x2c(%rbp)
movslq %eax, %r9
leal 0x1(%r9), %r12d
cmpl %r12d, %ecx
cmovgl %ecx, %r12d
movq %r9, %rdx
xorl %esi, %esi
movq (%r13,%rdx,8), %r8
testq %r8, %r8
je 0x4ee9d
movq 0x18(%r8), %rdi
movl 0x10(%rdi), %edi
btl $0x11, %edi
jae 0x4ee85
cmpq $0x0, 0x8(%r8)
jne 0x4ee85
testl %esi, %esi
jle 0x4eea9
testl $0xa40, %edi            # imm = 0xA40
je 0x4ee91
incl %esi
jmp 0x4ee9d
andl $0x1480, %edi           # imm = 0x1480
cmpl $0x1, %edi
adcl $-0x1, %esi
incq %rdx
cmpq %r15, %rdx
jl 0x4ee63
xorl %ebx, %ebx
jmp 0x4eeae
movb $0x1, %bl
movl %edx, %r12d
movl %r12d, %edx
subl %eax, %edx
jle 0x4ef19
leaq (,%r9,8), %r14
addq %r13, %r14
movq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x4cf4c
cmpq $0x0, (%r14)
je 0x4ef22
movq -0x48(%rbp), %rdi
movq %r14, %rsi
callq 0x33094
testb %bl, %bl
je 0x4ef06
movslq %r12d, %rax
movq (%r13,%rax,8), %rax
testq %rax, %rax
movl -0x2c(%rbp), %ecx
je 0x4ef09
movq 0x18(%rax), %rax
testb $0x2, 0x12(%rax)
je 0x4ef09
incl %r12d
cmpl %ecx, %r12d
jl 0x4ef09
jmp 0x4ef19
movl -0x2c(%rbp), %ecx
movl %r12d, %eax
cmpl %ecx, %r12d
jl 0x4ee50
xorl %eax, %eax
jmp 0x4ef53
leaq 0x27225(%rip), %rcx     # 0x76145
jmp 0x4ef29
leaq 0x27204(%rip), %rcx     # 0x7612d
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %edx
movq -0x38(%rbp), %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x483d1
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0xa, %ecx
sete %al
addl %eax, %eax
orl $-0xc, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq