// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: ExprAssembleAnnon
static sxi32 ExprAssembleAnnon(jx9_gen_state *pGen,SyToken **ppCur, SyToken *pEnd)
{
	SyToken *pIn = *ppCur;
	sxu32 nLine;
	sxi32 rc;
	/* Jump the 'function' keyword */
	nLine = pIn->nLine;
	pIn++;
	if( pIn < pEnd && (pIn->nType & (JX9_TK_ID|JX9_TK_KEYWORD)) ){
		pIn++;
	}
	if( pIn >= pEnd || (pIn->nType & JX9_TK_LPAREN) == 0 ){
		/* Syntax error */
		rc = jx9GenCompileError(&(*pGen), E_ERROR, nLine, "Missing opening parenthesis '(' while declaring annonymous function");
		if( rc != SXERR_ABORT ){
			rc = SXERR_SYNTAX;
		}
		goto Synchronize;
	}
	pIn++; /* Jump the leading parenthesis '(' */
	jx9DelimitNestedTokens(pIn, pEnd, JX9_TK_LPAREN/*'('*/, JX9_TK_RPAREN/*')'*/, &pIn);
	if( pIn >= pEnd || &pIn[1] >= pEnd ){
		/* Syntax error */
		rc = jx9GenCompileError(&(*pGen), E_ERROR, nLine, "Syntax error while declaring annonymous function");
		if( rc != SXERR_ABORT ){
			rc = SXERR_SYNTAX;
		}
		goto Synchronize;
	}
	pIn++; /* Jump the trailing parenthesis */
	if( pIn->nType & JX9_TK_OCB /*'{'*/ ){
		pIn++; /* Jump the leading curly '{' */
		jx9DelimitNestedTokens(pIn, pEnd, JX9_TK_OCB/*'{'*/, JX9_TK_CCB/*'}'*/, &pIn);
		if( pIn < pEnd ){
			pIn++;
		}
	}else{
		/* Syntax error */
		rc = jx9GenCompileError(&(*pGen), E_ERROR, nLine, "Syntax error while declaring annonymous function, missing '{'");
		if( rc == SXERR_ABORT ){
			return SXERR_ABORT;
		}			
	}
	rc = SXRET_OK;
Synchronize:
	/* Synchronize pointers */
	*ppCur = pIn;
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x8879a
movq -0x28(%rbp), %rax
movl 0x10(%rax), %eax
andl $0xc, %eax
cmpl $0x0, %eax
je 0x8879a
movq -0x28(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x887b5
movq -0x28(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
jne 0x887e4
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %edx
movl $0x1, %esi
leaq 0x3bbb7(%rip), %rcx     # 0xc437f
movb $0x0, %al
callq 0x7e990
movl %eax, -0x30(%rbp)
cmpl $-0xa, -0x30(%rbp)
je 0x887df
movl $0xfffffff4, -0x30(%rbp) # imm = 0xFFFFFFF4
jmp 0x888e1
movq -0x28(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0x200, %edx            # imm = 0x200
movl $0x400, %ecx            # imm = 0x400
leaq -0x28(%rbp), %r8
callq 0x841b0
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x88823
movq -0x28(%rbp), %rax
addq $0x20, %rax
cmpq -0x20(%rbp), %rax
jb 0x88852
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %edx
movl $0x1, %esi
leaq 0x3bb8d(%rip), %rcx     # 0xc43c3
movb $0x0, %al
callq 0x7e990
movl %eax, -0x30(%rbp)
cmpl $-0xa, -0x30(%rbp)
je 0x8884d
movl $0xfffffff4, -0x30(%rbp) # imm = 0xFFFFFFF4
jmp 0x888e1
movq -0x28(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x888ac
movq -0x28(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0x40, %edx
movl $0x80, %ecx
leaq -0x28(%rbp), %r8
callq 0x841b0
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x888aa
movq -0x28(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x28(%rbp)
jmp 0x888da
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %edx
movl $0x1, %esi
leaq 0x3bb35(%rip), %rcx     # 0xc43f4
movb $0x0, %al
callq 0x7e990
movl %eax, -0x30(%rbp)
cmpl $-0xa, -0x30(%rbp)
jne 0x888d8
movl $0xfffffff6, -0x4(%rbp) # imm = 0xFFFFFFF6
jmp 0x888f2
jmp 0x888da
movl $0x0, -0x30(%rbp)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)