static int get_str(char *buf, int buf_size, const char **pp)

{

    const char *p;

    char *q;

    int c;



    q = buf;

    p = *pp;

    while (qemu_isspace(*p))

        p++;

    if (*p == '\0') {

    fail:

        *q = '\0';

        *pp = p;

        return -1;

    }

    if (*p == '\"') {

        p++;

        while (*p != '\0' && *p != '\"') {

            if (*p == '\\') {

                p++;

                c = *p++;

                switch(c) {

                case 'n':

                    c = '\n';

                    break;

                case 'r':

                    c = '\r';

                    break;

                case '\\':

                case '\'':

                case '\"':

                    break;

                default:

                    qemu_printf("unsupported escape code: '\\%c'\n", c);

                    goto fail;

                }

                if ((q - buf) < buf_size - 1) {

                    *q++ = c;

                }

            } else {

                if ((q - buf) < buf_size - 1) {

                    *q++ = *p;

                }

                p++;

            }

        }

        if (*p != '\"') {

            qemu_printf("unterminated string\n");

            goto fail;

        }

        p++;

    } else {

        while (*p != '\0' && !qemu_isspace(*p)) {

            if ((q - buf) < buf_size - 1) {

                *q++ = *p;

            }

            p++;

        }

    }

    *q = '\0';

    *pp = p;

    return 0;

}

static int get_str(char *buf, int buf_size, const char **pp)

{

    const char *p;

    char *q;

    int c;



    q = buf;

    p = *pp;

    while (qemu_isspace(*p))

        p++;

    if (*p == '\0') {

    fail:

        *q = '\0';

        *pp = p;

        return -1;

    }

    if (*p == '\"') {

        p++;

        while (*p != '\0' && *p != '\"') {

            if (*p == '\\') {

                p++;

                c = *p++;

                switch(c) {

                case 'n':

                    c = '\n';

                    break;

                case 'r':

                    c = '\r';

                    break;

                case '\\':

                case '\'':

                case '\"':

                    break;

                default:

                    qemu_printf("unsupported escape code: '\\%c'\n", c);

                    goto fail;

                }

                if ((q - buf) < buf_size - 1) {

                    *q++ = c;

                }

            } else {

                if ((q - buf) < buf_size - 1) {

                    *q++ = *p;

                }

                p++;

            }

        }

        if (*p != '\"') {

            qemu_printf("unterminated string\n");

            goto fail;

        }

        p++;

    } else {

        while (*p != '\0' && !qemu_isspace(*p)) {

            if ((q - buf) < buf_size - 1) {

                *q++ = *p;

            }

            p++;

        }

    }

    *q = '\0';

    *pp = p;

    return 0;

}

static int FUNC_0(char *VAR_0, int VAR_1, const char **VAR_2)

{

    const char *VAR_3;

    char *VAR_4;

    int VAR_5;



    VAR_4 = VAR_0;

    VAR_3 = *VAR_2;

    while (qemu_isspace(*VAR_3))

        VAR_3++;

    if (*VAR_3 == '\0') {

    fail:

        *VAR_4 = '\0';

        *VAR_2 = VAR_3;

        return -1;

    }

    if (*VAR_3 == '\"') {

        VAR_3++;

        while (*VAR_3 != '\0' && *VAR_3 != '\"') {

            if (*VAR_3 == '\\') {

                VAR_3++;

                VAR_5 = *VAR_3++;

                switch(VAR_5) {

                case 'n':

                    VAR_5 = '\n';

                    break;

                case 'r':

                    VAR_5 = '\r';

                    break;

                case '\\':

                case '\'':

                case '\"':

                    break;

                default:

                    qemu_printf("unsupported escape code: '\\%VAR_5'\n", VAR_5);

                    goto fail;

                }

                if ((VAR_4 - VAR_0) < VAR_1 - 1) {

                    *VAR_4++ = VAR_5;

                }

            } else {

                if ((VAR_4 - VAR_0) < VAR_1 - 1) {

                    *VAR_4++ = *VAR_3;

                }

                VAR_3++;

            }

        }

        if (*VAR_3 != '\"') {

            qemu_printf("unterminated string\n");

            goto fail;

        }

        VAR_3++;

    } else {

        while (*VAR_3 != '\0' && !qemu_isspace(*VAR_3)) {

            if ((VAR_4 - VAR_0) < VAR_1 - 1) {

                *VAR_4++ = *VAR_3;

            }

            VAR_3++;

        }

    }

    *VAR_4 = '\0';

    *VAR_2 = VAR_3;

    return 0;

}

static int FUNC_0(char *VAR_0, int VAR_1, const char **VAR_2)
{ const char *VAR_3; char *VAR_4; int VAR_5; VAR_4 = VAR_0; VAR_3 = *VAR_2; while (qemu_isspace(*VAR_3))
VAR_3++; if (*VAR_3 == '\0') { fail:
*VAR_4 = '\0'; *VAR_2 = VAR_3; return -1; } if (*VAR_3 == '\"') { VAR_3++; while (*VAR_3 != '\0' && *VAR_3 != '\"') { if (*VAR_3 == '\\') { VAR_3++; VAR_5 = *VAR_3++; switch(VAR_5) { case 'n':
VAR_5 = '\n'; break; case 'r':
VAR_5 = '\r'; break; case '\\':
case '\'':
case '\"':
break; default:
qemu_printf("unsupported escape code: '\\%VAR_5'\n", VAR_5); goto fail; } if ((VAR_4 - VAR_0) < VAR_1 - 1) { *VAR_4++ = VAR_5; } } else { if ((VAR_4 - VAR_0) < VAR_1 - 1) { *VAR_4++ = *VAR_3; } VAR_3++; } } if (*VAR_3 != '\"') { qemu_printf("unterminated string\n"); goto fail; } VAR_3++; } else { while (*VAR_3 != '\0' && !qemu_isspace(*VAR_3)) { if ((VAR_4 - VAR_0) < VAR_1 - 1) { *VAR_4++ = *VAR_3; } VAR_3++; } } *VAR_4 = '\0'; *VAR_2 = VAR_3; return 0; }