// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: jx9CompileAnnonFunc
JX9_PRIVATE sxi32 jx9CompileAnnonFunc(jx9_gen_state *pGen,sxi32 iCompileFlag)
{
	jx9_vm_func *pAnnonFunc; /* Annonymous function body */
	char zName[512];         /* Unique lambda name */
	static int iCnt = 1;     /* There is no worry about thread-safety here, because only
							  * one thread is allowed to compile the script.
						      */
	jx9_value *pObj;
	SyString sName;
	sxu32 nIdx;
	sxu32 nLen;
	sxi32 rc;

	pGen->pIn++; /* Jump the 'function' keyword */
	if( pGen->pIn->nType & (JX9_TK_ID|JX9_TK_KEYWORD) ){
		pGen->pIn++;
	}
	/* Reserve a constant for the lambda */
	pObj = jx9VmReserveConstObj(pGen->pVm, &nIdx);
	if( pObj == 0 ){
		GenStateOutOfMem(pGen);
		SXUNUSED(iCompileFlag); /* cc warning */
		return SXERR_ABORT;
	}
	/* Generate a unique name */
	nLen = SyBufferFormat(zName, sizeof(zName), "[lambda_%d]", iCnt++);
	/* Make sure the generated name is unique */
	while( SyHashGet(&pGen->pVm->hFunction, zName, nLen) != 0 && nLen < sizeof(zName) - 2 ){
		nLen = SyBufferFormat(zName, sizeof(zName), "[lambda_%d]", iCnt++);
	}
	SyStringInitFromBuf(&sName, zName, nLen);
	jx9MemObjInitFromString(pGen->pVm, pObj, &sName);
	/* Compile the lambda body */
	rc = GenStateCompileFunc(&(*pGen),&sName,0,&pAnnonFunc);
	if( rc == SXERR_ABORT ){
		return SXERR_ABORT;
	}
	/* Emit the load constant instruction */
	jx9VmEmitInstr(pGen->pVm, JX9_OP_LOADC, 0, nIdx, 0, 0);
	/* Node successfully compiled */
	return SXRET_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rcx
addq $0x20, %rcx
movq %rcx, 0x158(%rax)
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rax
movl 0x10(%rax), %eax
andl $0xc, %eax
cmpl $0x0, %eax
je 0x88954
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rcx
addq $0x20, %rcx
movq %rcx, 0x158(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq -0x23c(%rbp), %rsi
callq 0x7e3d0
movq %rax, -0x228(%rbp)
cmpq $0x0, -0x228(%rbp)
jne 0x88994
movq -0x10(%rbp), %rdi
callq 0x84570
movl $0x0, -0x14(%rbp)
movl $0xfffffff6, -0x4(%rbp) # imm = 0xFFFFFFF6
jmp 0x88ad7
leaq -0x220(%rbp), %rdi
movl 0x660bf(%rip), %ecx     # 0xeea60
movl %ecx, %eax
addl $0x1, %eax
movl %eax, 0x660b4(%rip)     # 0xeea60
movl $0x200, %esi            # imm = 0x200
leaq 0x3ba7a(%rip), %rdx     # 0xc4432
movb $0x0, %al
callq 0x5d800
movl %eax, -0x240(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0x308, %rdi            # imm = 0x308
leaq -0x220(%rbp), %rsi
movl -0x240(%rbp), %edx
callq 0x76c30
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x245(%rbp)
je 0x88a0b
movl -0x240(%rbp), %eax
cmpq $0x1fe, %rax            # imm = 0x1FE
setb %al
movb %al, -0x245(%rbp)
movb -0x245(%rbp), %al
testb $0x1, %al
jne 0x88a17
jmp 0x88a4d
leaq -0x220(%rbp), %rdi
movl 0x6603c(%rip), %ecx     # 0xeea60
movl %ecx, %eax
addl $0x1, %eax
movl %eax, 0x66031(%rip)     # 0xeea60
movl $0x200, %esi            # imm = 0x200
leaq 0x3b9f7(%rip), %rdx     # 0xc4432
movb $0x0, %al
callq 0x5d800
movl %eax, -0x240(%rbp)
jmp 0x889c5
leaq -0x220(%rbp), %rax
movq %rax, -0x238(%rbp)
movl -0x240(%rbp), %eax
movl %eax, -0x230(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x228(%rbp), %rsi
leaq -0x238(%rbp), %rdx
callq 0x78c60
movq -0x10(%rbp), %rdi
leaq -0x238(%rbp), %rsi
xorl %edx, %edx
leaq -0x20(%rbp), %rcx
callq 0x845d0
movl %eax, -0x244(%rbp)
cmpl $-0xa, -0x244(%rbp)
jne 0x88aaf
movl $0xfffffff6, -0x4(%rbp) # imm = 0xFFFFFFF6
jmp 0x88ad7
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl -0x23c(%rbp), %ecx
movl $0x4, %esi
xorl %edx, %edx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0x7e8f0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
nopw %cs:(%rax,%rax)