static int64_t expr_unary(Monitor *mon)

{

    int64_t n;

    char *p;

    int ret;



    switch(*pch) {

    case '+':

        next();

        n = expr_unary(mon);

        break;

    case '-':

        next();

        n = -expr_unary(mon);

        break;

    case '~':

        next();

        n = ~expr_unary(mon);

        break;

    case '(':

        next();

        n = expr_sum(mon);

        if (*pch != ')') {

            expr_error(mon, "')' expected");

        }

        next();

        break;

    case '\'':

        pch++;

        if (*pch == '\0')

            expr_error(mon, "character constant expected");

        n = *pch;

        pch++;

        if (*pch != '\'')

            expr_error(mon, "missing terminating \' character");

        next();

        break;

    case '$':

        {

            char buf[128], *q;

            target_long reg=0;



            pch++;

            q = buf;

            while ((*pch >= 'a' && *pch <= 'z') ||

                   (*pch >= 'A' && *pch <= 'Z') ||

                   (*pch >= '0' && *pch <= '9') ||

                   *pch == '_' || *pch == '.') {

                if ((q - buf) < sizeof(buf) - 1)

                    *q++ = *pch;

                pch++;

            }

            while (qemu_isspace(*pch))

                pch++;

            *q = 0;

            ret = get_monitor_def(&reg, buf);

            if (ret == -1)

                expr_error(mon, "unknown register");

            else if (ret == -2)

                expr_error(mon, "no cpu defined");

            n = reg;

        }

        break;

    case '\0':

        expr_error(mon, "unexpected end of expression");

        n = 0;

        break;

    default:

#if TARGET_PHYS_ADDR_BITS > 32

        n = strtoull(pch, &p, 0);

#else

        n = strtoul(pch, &p, 0);

#endif

        if (pch == p) {

            expr_error(mon, "invalid char in expression");

        }

        pch = p;

        while (qemu_isspace(*pch))

            pch++;

        break;

    }

    return n;

}

static int64_t expr_unary(Monitor *mon)

{

    int64_t n;

    char *p;

    int ret;



    switch(*pch) {

    case '+':

        next();

        n = expr_unary(mon);

        break;

    case '-':

        next();

        n = -expr_unary(mon);

        break;

    case '~':

        next();

        n = ~expr_unary(mon);

        break;

    case '(':

        next();

        n = expr_sum(mon);

        if (*pch != ')') {

            expr_error(mon, "')' expected");

        }

        next();

        break;

    case '\'':

        pch++;

        if (*pch == '\0')

            expr_error(mon, "character constant expected");

        n = *pch;

        pch++;

        if (*pch != '\'')

            expr_error(mon, "missing terminating \' character");

        next();

        break;

    case '$':

        {

            char buf[128], *q;

            target_long reg=0;



            pch++;

            q = buf;

            while ((*pch >= 'a' && *pch <= 'z') ||

                   (*pch >= 'A' && *pch <= 'Z') ||

                   (*pch >= '0' && *pch <= '9') ||

                   *pch == '_' || *pch == '.') {

                if ((q - buf) < sizeof(buf) - 1)

                    *q++ = *pch;

                pch++;

            }

            while (qemu_isspace(*pch))

                pch++;

            *q = 0;

            ret = get_monitor_def(&reg, buf);

            if (ret == -1)

                expr_error(mon, "unknown register");

            else if (ret == -2)

                expr_error(mon, "no cpu defined");

            n = reg;

        }

        break;

    case '\0':

        expr_error(mon, "unexpected end of expression");

        n = 0;

        break;

    default:

#if TARGET_PHYS_ADDR_BITS > 32

        n = strtoull(pch, &p, 0);

#else

        n = strtoul(pch, &p, 0);

#endif

        if (pch == p) {

            expr_error(mon, "invalid char in expression");

        }

        pch = p;

        while (qemu_isspace(*pch))

            pch++;

        break;

    }

    return n;

}

            if (ret == -1)             else if (ret == -2)                 expr_error(mon, "no cpu defined");
static int64_t FUNC_0(Monitor *mon)

{

    int64_t n;

    char *VAR_0;

    int VAR_1;



    switch(*pch) {

    case '+':

        next();

        n = FUNC_0(mon);

        break;

    case '-':

        next();

        n = -FUNC_0(mon);

        break;

    case '~':

        next();

        n = ~FUNC_0(mon);

        break;

    case '(':

        next();

        n = expr_sum(mon);

        if (*pch != ')') {

            expr_error(mon, "')' expected");

        }

        next();

        break;

    case '\'':

        pch++;

        if (*pch == '\0')

            expr_error(mon, "character constant expected");

        n = *pch;

        pch++;

        if (*pch != '\'')

            expr_error(mon, "missing terminating \' character");

        next();

        break;

    case '$':

        {

            char VAR_2[128], *VAR_3;

            target_long reg=0;



            pch++;

            VAR_3 = VAR_2;

            while ((*pch >= 'a' && *pch <= 'z') ||

                   (*pch >= 'A' && *pch <= 'Z') ||

                   (*pch >= '0' && *pch <= '9') ||

                   *pch == '_' || *pch == '.') {

                if ((VAR_3 - VAR_2) < sizeof(VAR_2) - 1)

                    *VAR_3++ = *pch;

                pch++;

            }

            while (qemu_isspace(*pch))

                pch++;

            *VAR_3 = 0;

            VAR_1 = get_monitor_def(&reg, VAR_2);

            if (VAR_1 == -1)

                expr_error(mon, "unknown register");

            else if (VAR_1 == -2)

                expr_error(mon, "no cpu defined");

            n = reg;

        }

        break;

    case '\0':

        expr_error(mon, "unexpected end of expression");

        n = 0;

        break;

    default:

#if TARGET_PHYS_ADDR_BITS > 32

        n = strtoull(pch, &VAR_0, 0);

#else

        n = strtoul(pch, &VAR_0, 0);

#endif

        if (pch == VAR_0) {

            expr_error(mon, "invalid char in expression");

        }

        pch = VAR_0;

        while (qemu_isspace(*pch))

            pch++;

        break;

    }

    return n;

}

static int64_t FUNC_0(Monitor *mon)
{ int64_t n; char *VAR_0; int VAR_1; switch(*pch) { case '+':
next(); n = FUNC_0(mon); break; case '-':
next(); n = -FUNC_0(mon); break; case '~':
next(); n = ~FUNC_0(mon); break; case '(':
next(); n = expr_sum(mon); if (*pch != ')') { expr_error(mon, "')' expected"); } next(); break; case '\'':
pch++; if (*pch == '\0')
expr_error(mon, "character constant expected"); n = *pch; pch++; if (*pch != '\'')
expr_error(mon, "missing terminating \' character"); next(); break; case '$':
{ char VAR_2[128], *VAR_3; target_long reg=0; pch++; VAR_3 = VAR_2; while ((*pch >= 'a' && *pch <= 'z') ||
(*pch >= 'A' && *pch <= 'Z') ||
(*pch >= '0' && *pch <= '9') ||
*pch == '_' || *pch == '.') { if ((VAR_3 - VAR_2) < sizeof(VAR_2) - 1)
*VAR_3++ = *pch; pch++; } while (qemu_isspace(*pch))
pch++; *VAR_3 = 0; VAR_1 = get_monitor_def(&reg, VAR_2); if (VAR_1 == -1)
expr_error(mon, "unknown register"); else if (VAR_1 == -2)
expr_error(mon, "no cpu defined"); n = reg; } break; case '\0':
expr_error(mon, "unexpected end of expression"); n = 0; break; default:
#if TARGET_PHYS_ADDR_BITS > 32
n = strtoull(pch, &VAR_0, 0); #else
n = strtoul(pch, &VAR_0, 0); #endif
if (pch == VAR_0) { expr_error(mon, "invalid char in expression"); } pch = VAR_0; while (qemu_isspace(*pch))
pch++; break; } return n; }