// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lobject.c
// Function: luaO_str2d
int luaO_str2d (const char *s, size_t len, lua_Number *result) {
  char *endptr;
  if (strpbrk(s, "nN"))  /* reject 'inf' and 'nan' */
    return 0;
  else if (strpbrk(s, "xX"))  /* hexa? */
    *result = lua_strx2number(s, &endptr);
  else
    *result = lua_str2number(s, &endptr);
  if (endptr == s) return 0;  /* nothing recognized */
  while (lisspace(cast_uchar(*endptr))) endptr++;
  return (endptr == s + len);  /* OK if no trailing characters */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1085d(%rip), %rsi     # 0x210e8
callq 0x6440
xorl %ebp, %ebp
testq %rax, %rax
jne 0x10a73
leaq 0x10849(%rip), %rsi     # 0x210eb
movq %rbx, %rdi
callq 0x6440
testq %rax, %rax
je 0x108f9
movq %rbx, 0x8(%rsp)
xorl %eax, %eax
movl %eax, 0x14(%rsp)
movl %eax, 0x20(%rsp)
movq %rbx, 0x18(%rsp)
leaq 0x11b56(%rip), %r13     # 0x22420
movq %rbx, %rax
movzbl (%rax), %ecx
incq %rax
testb $0x8, 0x1(%rcx,%r13)
jne 0x108cd
leaq -0x1(%rax), %rdx
movq %rdx, 0x8(%rsp)
movb $0x1, %dl
cmpl $0x2b, %ecx
je 0x1090b
cmpl $0x2d, %ecx
jne 0x10910
movq %rax, 0x8(%rsp)
xorl %edx, %edx
jmp 0x10910
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x6110
jmp 0x10a36
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
xorps %xmm1, %xmm1
cmpb $0x30, (%rax)
jne 0x10a39
movzbl 0x1(%rax), %ecx
orl $0x20, %ecx
cmpl $0x78, %ecx
jne 0x10a39
movl %edx, 0x24(%rsp)
addq $0x2, %rax
leaq 0x8(%rsp), %r12
movq %rax, (%r12)
leaq 0x20(%rsp), %rsi
xorps %xmm0, %xmm0
movq %r12, %rdi
callq 0x10f43
movq (%r12), %rax
cmpb $0x2e, (%rax)
jne 0x10970
incq %rax
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x14(%rsp), %rsi
callq 0x10f43
movl 0x14(%rsp), %eax
movl 0x20(%rsp), %ecx
orl %eax, %ecx
movl 0x24(%rsp), %r8d
xorps %xmm1, %xmm1
je 0x10a39
shll $0x2, %eax
negl %eax
movl %eax, 0x14(%rsp)
movq 0x8(%rsp), %rdx
movq %rdx, 0x18(%rsp)
movzbl (%rdx), %ecx
orl $0x20, %ecx
cmpl $0x70, %ecx
jne 0x10a17
leaq 0x1(%rdx), %rcx
movq %rcx, 0x8(%rsp)
movzbl 0x1(%rdx), %esi
movb $0x1, %cl
cmpl $0x2b, %esi
je 0x109cc
cmpl $0x2d, %esi
jne 0x109d5
addq $0x2, %rdx
movq %rdx, 0x8(%rsp)
xorl %ecx, %ecx
jmp 0x109d5
addq $0x2, %rdx
movq %rdx, 0x8(%rsp)
movq 0x8(%rsp), %rdx
movzbl (%rdx), %esi
testb $0x2, 0x1(%rsi,%r13)
je 0x10a21
xorl %edi, %edi
leal (%rdi,%rdi,4), %edi
movsbl %sil, %esi
leal (%rsi,%rdi,2), %edi
addl $-0x30, %edi
movzbl 0x1(%rdx), %esi
incq %rdx
testb $0x2, 0x1(%rsi,%r13)
jne 0x109e7
movq %rdx, 0x8(%rsp)
movl %edi, %edx
negl %edx
testb %cl, %cl
cmovnel %edi, %edx
addl %eax, %edx
movl %edx, 0x14(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
testb %r8b, %r8b
jne 0x10a2d
xorps 0x10573(%rip), %xmm0    # 0x20fa0
movl 0x14(%rsp), %edi
callq 0x6090
movaps %xmm0, %xmm1
movsd %xmm1, (%r15)
cmpq %rbx, 0x18(%rsp)
je 0x10a73
movq 0x18(%rsp), %rax
decq %rax
leaq 0x119cc(%rip), %rcx     # 0x22420
movzbl 0x1(%rax), %edx
incq %rax
testb $0x8, 0x1(%rdx,%rcx)
jne 0x10a54
movq %rax, 0x18(%rsp)
addq %r14, %rbx
xorl %ebp, %ebp
cmpq %rbx, %rax
sete %bpl
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq