// File: /workspace/github_c_makefile_star2_O3/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 0x447d7
movsbq (%rbx), %r12
cmpq $-0x41, %r12
ja 0x447c5
callq 0xc170
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r12,2)
je 0x447c5
incq %rbx
cmpq %r15, %rbx
jb 0x447a1
jmp 0x447d7
cmpb $0x2b, %r12b
je 0x447d4
movzbl %r12b, %eax
cmpl $0x2d, %eax
jne 0x447d7
incq %rbx
testq %r14, %r14
je 0x447e0
movb $0x0, (%r14)
movq %rbx, %rax
cmpq %r15, %rbx
jae 0x448dd
movq %r14, -0x30(%rbp)
leaq 0x3(%rbx), %r12
movq %rbx, %r13
movsbq -0x3(%r12), %r14
cmpq $-0x41, %r14
ja 0x44897
callq 0xc170
movq (%rax), %rcx
testb $0x8, 0x1(%rcx,%r14,2)
je 0x4489c
leaq 0x1(%r13), %rax
leaq -0x2(%r12), %rdx
cmpq %r15, %rdx
jae 0x448a3
movsbq (%rdx), %rsi
cmpq $-0x41, %rsi
ja 0x448a3
testb $0x8, 0x1(%rcx,%rsi,2)
je 0x44892
leaq -0x1(%r12), %rdx
cmpq %r15, %rdx
jae 0x44892
leaq 0x2(%r13), %rax
movsbq (%rdx), %rdx
cmpq $-0x41, %rdx
ja 0x448a3
testb $0x8, 0x1(%rcx,%rdx,2)
je 0x448a3
leaq 0x3(%r13), %rax
cmpq %r15, %r12
jae 0x448a3
movsbq (%r12), %rdx
cmpq $-0x41, %rdx
ja 0x448a3
testb $0x8, 0x1(%rcx,%rdx,2)
je 0x448a0
addq $0x4, %r13
leaq 0x4(%r12), %rax
incq %r12
cmpq %r15, %r12
movq %rax, %r12
jb 0x447f7
addq $-0x3, %rax
jmp 0x448a3
movq %rdx, %rax
jmp 0x448a3
movq %r13, %rax
jmp 0x448a3
addq $-0x3, %r12
movq %r12, %rax
cmpq %r15, %rax
setb %cl
cmpq %rbx, %rax
seta %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x448dd
movb (%rax), %cl
cmpb $0x2e, %cl
jne 0x448c6
incq %rax
movq -0x30(%rbp), %rcx
jmp 0x448d5
andb $-0x21, %cl
cmpb $0x45, %cl
movq -0x30(%rbp), %rcx
jne 0x448dd
incq %rax
testq %rcx, %rcx
je 0x448dd
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