// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: SyStrIsNumeric
JX9_PRIVATE sxi32 SyStrIsNumeric(const char *zSrc, sxu32 nLen, sxu8 *pReal, const char  **pzTail)
{
	const char *zCur, *zEnd;
#ifdef UNTRUST
	if( SX_EMPTY_STR(zSrc) ){
		return SXERR_EMPTY;
	}
#endif
	zEnd = &zSrc[nLen];
	/* Jump leading white spaces */
	while( zSrc < zEnd && (unsigned char)zSrc[0] < 0xc0  && SyisSpace(zSrc[0]) ){
		zSrc++;
	}
	if( zSrc < zEnd && (zSrc[0] == '+' || zSrc[0] == '-') ){
		zSrc++;
	}
	zCur = zSrc;
	if( pReal ){
		*pReal = FALSE;
	}
	for(;;){
		if( zSrc >= zEnd || (unsigned char)zSrc[0] >= 0xc0 || !SyisDigit(zSrc[0]) ){ break; } zSrc++;
		if( zSrc >= zEnd || (unsigned char)zSrc[0] >= 0xc0 || !SyisDigit(zSrc[0]) ){ break; } zSrc++;
		if( zSrc >= zEnd || (unsigned char)zSrc[0] >= 0xc0 || !SyisDigit(zSrc[0]) ){ break; } zSrc++;
		if( zSrc >= zEnd || (unsigned char)zSrc[0] >= 0xc0 || !SyisDigit(zSrc[0]) ){ break; } zSrc++;
	};
	if( zSrc < zEnd && zSrc > zCur ){
		int c = zSrc[0];
		if( c == '.' ){
			zSrc++;
			if( pReal ){
				*pReal = TRUE;
			}
			if( pzTail ){
				while( zSrc < zEnd && (unsigned char)zSrc[0] < 0xc0 && SyisDigit(zSrc[0]) ){
					zSrc++;
				}
				if( zSrc < zEnd && (zSrc[0] == 'e' || zSrc[0] == 'E') ){
					zSrc++;
					if( zSrc < zEnd && (zSrc[0] == '+' || zSrc[0] == '-') ){
						zSrc++;
					}
					while( zSrc < zEnd && (unsigned char)zSrc[0] < 0xc0 && SyisDigit(zSrc[0]) ){
						zSrc++;
					}
				}
			}
		}else if( c == 'e' || c == 'E' ){
			zSrc++;
			if( pReal ){
				*pReal = TRUE;
			}
			if( pzTail ){
				if( zSrc < zEnd && (zSrc[0] == '+' || zSrc[0] == '-') ){
					zSrc++;
				}
				while( zSrc < zEnd && (unsigned char)zSrc[0] < 0xc0 && SyisDigit(zSrc[0]) ){
					zSrc++;
				}
			}
		}
	}
	if( pzTail ){
		/* Point to the non numeric part */
		*pzTail = zSrc;
	}
	return zSrc > zCur ? SXRET_OK /* String prefix is numeric */ : SXERR_INVALID /* Not a digit stream */;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movl %esi, %r15d
addq %rdi, %r15
testl %esi, %esi
je 0x45617
movsbq (%rbx), %r12
cmpq $-0x41, %r12
ja 0x45605
callq 0xc170
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r12,2)
je 0x45605
incq %rbx
cmpq %r15, %rbx
jb 0x455e1
jmp 0x45617
cmpb $0x2b, %r12b
je 0x45614
movzbl %r12b, %eax
cmpl $0x2d, %eax
jne 0x45617
incq %rbx
testq %r14, %r14
je 0x45620
movb $0x0, (%r14)
movq %r14, -0x30(%rbp)
movq %rbx, %rax
cmpq %r15, %rbx
jae 0x456e3
leaq 0x3(%rbx), %r12
movq %rbx, %r13
movsbq -0x3(%r12), %r14
cmpq $-0x41, %r14
ja 0x456d7
callq 0xc170
movq (%rax), %rcx
testb $0x8, 0x1(%rcx,%r14,2)
je 0x456e0
leaq -0x2(%r12), %rdx
cmpq %r15, %rdx
jae 0x456d2
leaq 0x1(%r13), %rax
movsbq (%rdx), %rdx
cmpq $-0x41, %rdx
ja 0x456e3
testb $0x8, 0x1(%rcx,%rdx,2)
je 0x456e3
leaq 0x2(%r13), %rax
leaq -0x1(%r12), %rdx
cmpq %r15, %rdx
jae 0x456e3
movsbq (%rdx), %rsi
cmpq $-0x41, %rsi
ja 0x456e3
testb $0x8, 0x1(%rcx,%rsi,2)
je 0x456d2
cmpq %r15, %r12
jae 0x456db
leaq 0x3(%r13), %rax
movsbq (%r12), %rdx
cmpq $-0x41, %rdx
ja 0x456e3
testb $0x8, 0x1(%rcx,%rdx,2)
je 0x456e3
addq $0x4, %r13
leaq 0x4(%r12), %rax
incq %r12
cmpq %r15, %r12
movq %rax, %r12
jb 0x45637
addq $-0x3, %rax
jmp 0x456e3
movq %rdx, %rax
jmp 0x456e3
addq $-0x3, %r12
movq %r12, %rax
jmp 0x456e3
movq %r13, %rax
cmpq %r15, %rax
setb %cl
cmpq %rbx, %rax
seta %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x4571d
movb (%rax), %cl
cmpb $0x2e, %cl
jne 0x45706
incq %rax
movq -0x30(%rbp), %rcx
jmp 0x45715
andb $-0x21, %cl
cmpb $0x45, %cl
movq -0x30(%rbp), %rcx
jne 0x4571d
incq %rax
testq %rcx, %rcx
je 0x4571d
movb $0x1, (%rcx)
xorl %ecx, %ecx
cmpq %rbx, %rax
seta %cl
leal (%rcx,%rcx,8), %eax
addl $-0x9, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq