/* div_s64 - signed 64bit divide with 32bit divisor  */
LIBC_ROM_TEXT_SECTION static _LONG_CALL_ const char* _parse_integer_fixup_radix(const char *s, unsigned int *base)
/* div_s64 - signed 64bit divide with 32bit divisor  */
LIBC_ROM_TEXT_SECTION static _LONG_CALL_ const char* _parse_integer_fixup_radix(const char *s, unsigned int *base)
{
        if (*base == 0) {
                if (s[0] == '0') {
                        if (_tolower(s[1]) == 'x' && isxdigit(s[2]))
                                *base = 16;
                        else
                                *base = 8;
                } else
                        *base = 10;
        }
        if (*base == 16 && s[0] == '0' && _tolower(s[1]) == 'x')
                s += 2;
        return s;
}