// File: /workspace/github_c_makefile_star2_O0/ccxvii[P]mujs/./jsvalue.c
// Function: js_stringtofloat
double js_stringtofloat(const char *s, char **ep)
{
	char *end;
	double n;
	const char *e = s;
	int isflt = 0;
	if (*e == '+' || *e == '-') ++e;
	while (*e >= '0' && *e <= '9') ++e;
	if (*e == '.') { ++e; isflt = 1; }
	while (*e >= '0' && *e <= '9') ++e;
	if (*e == 'e' || *e == 'E') {
		++e;
		if (*e == '+' || *e == '-') ++e;
		while (*e >= '0' && *e <= '9') ++e;
		isflt = 1;
	}
	if (isflt)
		n = js_strtod(s, &end);
	else {
		/* js_strtol doesn't parse the sign */
		if (*s == '-')
			n = -js_strtol(s+1, &end, 10);
		else if (*s == '+')
			n = js_strtol(s+1, &end, 10);
		else
			n = js_strtol(s, &end, 10);
	}
	if (end == e) {
		*ep = (char*)e;
		return n;
	}
	*ep = (char*)s;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
je 0x1b3b7
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1b3c3
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x1b3c5
movq -0x30(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x30, %ecx
movb %al, -0x35(%rbp)
jl 0x1b3e6
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
setle %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
testb $0x1, %al
jne 0x1b3ef
jmp 0x1b3fd
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x1b3c5
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x1b41c
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movl $0x1, -0x34(%rbp)
jmp 0x1b41e
movq -0x30(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x30, %ecx
movb %al, -0x36(%rbp)
jl 0x1b43f
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
setle %al
movb %al, -0x36(%rbp)
movb -0x36(%rbp), %al
testb $0x1, %al
jne 0x1b448
jmp 0x1b456
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x1b41e
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x65, %eax
je 0x1b46e
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x45, %eax
jne 0x1b4df
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
je 0x1b492
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1b49e
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x1b4a0
movq -0x30(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x30, %ecx
movb %al, -0x37(%rbp)
jl 0x1b4c1
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
setle %al
movb %al, -0x37(%rbp)
movb -0x37(%rbp), %al
testb $0x1, %al
jne 0x1b4ca
jmp 0x1b4d8
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x1b4a0
movl $0x1, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x1b4fc
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xb590
movsd %xmm0, -0x28(%rbp)
jmp 0x1b580
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1b53c
movq -0x10(%rbp), %rdi
addq $0x1, %rdi
leaq -0x20(%rbp), %rsi
movl $0xa, %edx
callq 0x1b0f0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0x1b57e
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x1b565
movq -0x10(%rbp), %rdi
addq $0x1, %rdi
leaq -0x20(%rbp), %rsi
movl $0xa, %edx
callq 0x1b0f0
movsd %xmm0, -0x28(%rbp)
jmp 0x1b57c
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0xa, %edx
callq 0x1b0f0
movsd %xmm0, -0x28(%rbp)
jmp 0x1b57e
jmp 0x1b580
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x1b5a1
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x1b5b4
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x40, %rsp
popq %rbp
retq
nop