// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: LexExtractNowdoc
static sxi32 LexExtractNowdoc(SyStream *pStream, SyToken *pToken)
{
	const unsigned char *zIn  = pStream->zText;
	const unsigned char *zEnd = pStream->zEnd;
	const unsigned char *zPtr;
	SyString sDelim;
	SyString sStr;
	/* Jump leading white spaces */
	while( zIn < zEnd && zIn[0] < 0xc0 && SyisSpace(zIn[0]) && zIn[0] != '\n' ){
		zIn++;
	}
	if( zIn >= zEnd ){
		/* A simple symbol, return immediately */
		return SXERR_CONTINUE;
	}
	if( zIn[0] == '\'' || zIn[0] == '"' ){
		zIn++;
	}
	if( zIn[0] < 0xc0 && !SyisAlphaNum(zIn[0]) && zIn[0] != '_' ){
		/* Invalid delimiter, return immediately */
		return SXERR_CONTINUE;
	}
	/* Isolate the identifier */
	sDelim.zString = (const char *)zIn;
	for(;;){
		zPtr = zIn;
		/* Skip alphanumeric stream */
		while( zPtr < zEnd && zPtr[0] < 0xc0 && (SyisAlphaNum(zPtr[0]) || zPtr[0] == '_') ){
			zPtr++;
		}
		if( zPtr < zEnd && zPtr[0] >= 0xc0 ){
			zPtr++;
			/* UTF-8 stream */
			while( zPtr < zEnd && ((zPtr[0] & 0xc0) == 0x80) ){
				zPtr++;
			}
		}
		if( zPtr == zIn ){
			/* Not an UTF-8 or alphanumeric stream */
			break;
		}
		/* Synchronize pointers */
		zIn = zPtr;
	}
	/* Get the identifier length */
	sDelim.nByte = (sxu32)((const char *)zIn-sDelim.zString);
	if( zIn[0] == '"' || zIn[0] == '\'' ){
		/* Jump the trailing single quote */
		zIn++;
	}
	/* Jump trailing white spaces */
	while( zIn < zEnd && zIn[0] < 0xc0 && SyisSpace(zIn[0]) && zIn[0] != '\n' ){
		zIn++;
	}
	if( sDelim.nByte <= 0 || zIn >= zEnd || zIn[0] != '\n' ){
		/* Invalid syntax */
		return SXERR_CONTINUE;
	}
	pStream->nLine++; /* Increment line counter */
	zIn++;
	/* Isolate the delimited string */
	sStr.zString = (const char *)zIn;
	/* Go and found the closing delimiter */
	for(;;){
		/* Synchronize with the next line */
		while( zIn < zEnd && zIn[0] != '\n' ){
			zIn++;
		}
		if( zIn >= zEnd ){
			/* End of the input reached, break immediately */
			pStream->zText = pStream->zEnd;
			break;
		}
		pStream->nLine++; /* Increment line counter */
		zIn++;
		if( (sxu32)(zEnd - zIn) >= sDelim.nByte && SyMemcmp((const void *)sDelim.zString, (const void *)zIn, sDelim.nByte) == 0 ){
			zPtr = &zIn[sDelim.nByte];
			while( zPtr < zEnd && zPtr[0] < 0xc0 && SyisSpace(zPtr[0]) && zPtr[0] != '\n' ){
				zPtr++;
			}
			if( zPtr >= zEnd ){
				/* End of input */
				pStream->zText = zPtr;
				break;
			}
			if( zPtr[0] == ';' ){
				const unsigned char *zCur = zPtr;
				zPtr++;
				while( zPtr < zEnd && zPtr[0] < 0xc0 && SyisSpace(zPtr[0]) && zPtr[0] != '\n' ){
					zPtr++;
				}
				if( zPtr >= zEnd || zPtr[0] == '\n' ){
					/* Closing delimiter found, break immediately */
					pStream->zText = zCur; /* Keep the semi-colon */
					break;
				}
			}else if( zPtr[0] == '\n' ){
				/* Closing delimiter found, break immediately */
				pStream->zText = zPtr; /* Synchronize with the stream cursor */
				break;
			}
			/* Synchronize pointers and continue searching */
			zIn = zPtr;
		}
	} /* For(;;) */
	/* Get the delimited string length */
	sStr.nByte = (sxu32)((const char *)zIn-sStr.zString);
	/* Record token type and length */
	pToken->nType = JX9_TK_NOWDOC;
	SyStringDupPtr(&pToken->sData, &sStr);
	/* Remove trailing white spaces */
	SyStringRightTrim(&pToken->sData);
	/* All done */
	return SXRET_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x59(%rbp)
jae 0x80a91
movq -0x20(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0xc0, %ecx
movb %al, -0x59(%rbp)
jge 0x80a91
callq 0xd1f0
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %ecx
andl $0x2000, %ecx           # imm = 0x2000
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x59(%rbp)
je 0x80a91
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
setne %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x80a9a
jmp 0x80aa8
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x80a38
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x80abe
movl $0xffffffe7, -0x4(%rbp) # imm = 0xFFFFFFE7
jmp 0x80fdf
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x27, %eax
je 0x80ad6
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x22, %eax
jne 0x80ae2
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xc0, %eax
jge 0x80b26
callq 0xd1f0
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x80b26
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x5f, %eax
je 0x80b26
movl $0xffffffe7, -0x4(%rbp) # imm = 0xFFFFFFE7
jmp 0x80fdf
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x5a(%rbp)
jae 0x80b92
movq -0x30(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0xc0, %ecx
movb %al, -0x5a(%rbp)
jge 0x80b92
callq 0xd1f0
movq (%rax), %rax
movq -0x30(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %ecx
andl $0x8, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x5b(%rbp)
jne 0x80b8c
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x5f, %eax
sete %al
movb %al, -0x5b(%rbp)
movb -0x5b(%rbp), %al
movb %al, -0x5a(%rbp)
movb -0x5a(%rbp), %al
testb $0x1, %al
jne 0x80b9b
jmp 0x80ba9
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x80b36
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x80c0c
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xc0, %eax
jl 0x80c0c
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x5c(%rbp)
jae 0x80bf3
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
sete %al
movb %al, -0x5c(%rbp)
movb -0x5c(%rbp), %al
testb $0x1, %al
jne 0x80bfc
jmp 0x80c0a
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x80bcd
jmp 0x80c0c
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x80c18
jmp 0x80c25
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x80b2e
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x22, %eax
je 0x80c4b
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x27, %eax
jne 0x80c57
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x80c59
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x5d(%rbp)
jae 0x80cb2
movq -0x20(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0xc0, %ecx
movb %al, -0x5d(%rbp)
jge 0x80cb2
callq 0xd1f0
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %ecx
andl $0x2000, %ecx           # imm = 0x2000
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x5d(%rbp)
je 0x80cb2
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
setne %al
movb %al, -0x5d(%rbp)
movb -0x5d(%rbp), %al
testb $0x1, %al
jne 0x80cbb
jmp 0x80cc9
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x80c59
cmpl $0x0, -0x38(%rbp)
jbe 0x80ce5
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x80ce5
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
je 0x80cf1
movl $0xffffffe7, -0x4(%rbp) # imm = 0xFFFFFFE7
jmp 0x80fdf
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x80d14
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x5e(%rbp)
jae 0x80d33
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
setne %al
movb %al, -0x5e(%rbp)
movb -0x5e(%rbp), %al
testb $0x1, %al
jne 0x80d3c
jmp 0x80d4a
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x80d14
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x80d69
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x80f2b
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
cmpl -0x38(%rbp), %eax
jb 0x80f26
movq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x38(%rbp), %edx
callq 0x5d3c0
cmpl $0x0, %eax
jne 0x80f26
movq -0x20(%rbp), %rax
movl -0x38(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x5f(%rbp)
jae 0x80e16
movq -0x30(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0xc0, %ecx
movb %al, -0x5f(%rbp)
jge 0x80e16
callq 0xd1f0
movq (%rax), %rax
movq -0x30(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %ecx
andl $0x2000, %ecx           # imm = 0x2000
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x5f(%rbp)
je 0x80e16
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
setne %al
movb %al, -0x5f(%rbp)
movb -0x5f(%rbp), %al
testb $0x1, %al
jne 0x80e1f
jmp 0x80e2d
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x80dbd
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x80e48
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x80f2b
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x3b, %eax
jne 0x80f02
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x60(%rbp)
jae 0x80ec5
movq -0x30(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0xc0, %ecx
movb %al, -0x60(%rbp)
jge 0x80ec5
callq 0xd1f0
movq (%rax), %rax
movq -0x30(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %ecx
andl $0x2000, %ecx           # imm = 0x2000
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x60(%rbp)
je 0x80ec5
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
setne %al
movb %al, -0x60(%rbp)
movb -0x60(%rbp), %al
testb $0x1, %al
jne 0x80ece
jmp 0x80edc
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x80e6c
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x80ef2
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
jne 0x80f00
movq -0x58(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x80f2b
jmp 0x80f1e
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
jne 0x80f1c
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x80f2b
jmp 0x80f1e
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x80d12
movq -0x20(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movl $0x10000, 0x10(%rax)    # imm = 0x10000
movq -0x50(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0x48(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x8(%rcx)
movb %al, -0x61(%rbp)
jbe 0x80fc0
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x8(%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0xc0, %ecx
movb %al, -0x61(%rbp)
jge 0x80fc0
callq 0xd1f0
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movq -0x18(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
movl %edx, %edx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
setne %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x80fc9
jmp 0x80fd8
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rax)
jmp 0x80f59
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)