static QemuOpts *opts_parse(QemuOptsList *list, const char *params,

                            int permit_abbrev, bool defaults)

{

    const char *firstname;

    char value[1024], *id = NULL;

    const char *p;

    QemuOpts *opts;



    assert(!permit_abbrev || list->implied_opt_name);

    firstname = permit_abbrev ? list->implied_opt_name : NULL;



    if (strncmp(params, "id=", 3) == 0) {

        get_opt_value(value, sizeof(value), params+3);

        id = value;

    } else if ((p = strstr(params, ",id=")) != NULL) {

        get_opt_value(value, sizeof(value), p+4);

        id = value;

    }

    if (defaults) {

        if (!id && !QTAILQ_EMPTY(&list->head)) {

            opts = qemu_opts_find(list, NULL);

        } else {

            opts = qemu_opts_create(list, id, 0);

        }

    } else {

        opts = qemu_opts_create(list, id, 1);

    }

    if (opts == NULL)

        return NULL;



    if (opts_do_parse(opts, params, firstname, defaults) != 0) {

        qemu_opts_del(opts);

        return NULL;

    }



    return opts;

}

static QemuOpts *opts_parse(QemuOptsList *list, const char *params,

                            int permit_abbrev, bool defaults)

{

    const char *firstname;

    char value[1024], *id = NULL;

    const char *p;

    QemuOpts *opts;



    assert(!permit_abbrev || list->implied_opt_name);

    firstname = permit_abbrev ? list->implied_opt_name : NULL;



    if (strncmp(params, "id=", 3) == 0) {

        get_opt_value(value, sizeof(value), params+3);

        id = value;

    } else if ((p = strstr(params, ",id=")) != NULL) {

        get_opt_value(value, sizeof(value), p+4);

        id = value;

    }

    if (defaults) {

        if (!id && !QTAILQ_EMPTY(&list->head)) {

            opts = qemu_opts_find(list, NULL);

        } else {

            opts = qemu_opts_create(list, id, 0);

        }

    } else {

        opts = qemu_opts_create(list, id, 1);

    }

    if (opts == NULL)

        return NULL;



    if (opts_do_parse(opts, params, firstname, defaults) != 0) {

        qemu_opts_del(opts);

        return NULL;

    }



    return opts;

}

            opts = qemu_opts_create(list, id, 0);         opts = qemu_opts_create(list, id, 1);     if (opts == NULL)     if (opts == NULL)
static QemuOpts *FUNC_0(QemuOptsList *list, const char *params,

                            int permit_abbrev, bool defaults)

{

    const char *VAR_0;

    char VAR_1[1024], *VAR_2 = NULL;

    const char *VAR_3;

    QemuOpts *opts;



    assert(!permit_abbrev || list->implied_opt_name);

    VAR_0 = permit_abbrev ? list->implied_opt_name : NULL;



    if (strncmp(params, "VAR_2=", 3) == 0) {

        get_opt_value(VAR_1, sizeof(VAR_1), params+3);

        VAR_2 = VAR_1;

    } else if ((VAR_3 = strstr(params, ",VAR_2=")) != NULL) {

        get_opt_value(VAR_1, sizeof(VAR_1), VAR_3+4);

        VAR_2 = VAR_1;

    }

    if (defaults) {

        if (!VAR_2 && !QTAILQ_EMPTY(&list->head)) {

            opts = qemu_opts_find(list, NULL);

        } else {

            opts = qemu_opts_create(list, VAR_2, 0);

        }

    } else {

        opts = qemu_opts_create(list, VAR_2, 1);

    }

    if (opts == NULL)

        return NULL;



    if (opts_do_parse(opts, params, VAR_0, defaults) != 0) {

        qemu_opts_del(opts);

        return NULL;

    }



    return opts;

}

static QemuOpts *FUNC_0(QemuOptsList *list, const char *params,
int permit_abbrev, bool defaults)
{ const char *VAR_0; char VAR_1[1024], *VAR_2 = NULL; const char *VAR_3; QemuOpts *opts; assert(!permit_abbrev || list->implied_opt_name); VAR_0 = permit_abbrev ? list->implied_opt_name : NULL; if (strncmp(params, "VAR_2=", 3) == 0) { get_opt_value(VAR_1, sizeof(VAR_1), params+3); VAR_2 = VAR_1; } else if ((VAR_3 = strstr(params, ",VAR_2=")) != NULL) { get_opt_value(VAR_1, sizeof(VAR_1), VAR_3+4); VAR_2 = VAR_1; } if (defaults) { if (!VAR_2 && !QTAILQ_EMPTY(&list->head)) { opts = qemu_opts_find(list, NULL); } else { opts = qemu_opts_create(list, VAR_2, 0); } } else { opts = qemu_opts_create(list, VAR_2, 1); } if (opts == NULL)
return NULL; if (opts_do_parse(opts, params, VAR_0, defaults) != 0) { qemu_opts_del(opts); return NULL; } return opts; }