static int object_create(QemuOpts *opts, void *opaque)

{

    const char *type = qemu_opt_get(opts, "qom-type");

    const char *id = qemu_opts_id(opts);

    Object *obj;



    g_assert(type != NULL);



    if (id == NULL) {

        qerror_report(QERR_MISSING_PARAMETER, "id");

        return -1;

    }



    obj = object_new(type);

    if (qemu_opt_foreach(opts, object_set_property, obj, 1) < 0) {

        return -1;

    }



    object_property_add_child(container_get(object_get_root(), "/objects"),

                              id, obj, NULL);



    return 0;

}

static int object_create(QemuOpts *opts, void *opaque)

{

    const char *type = qemu_opt_get(opts, "qom-type");

    const char *id = qemu_opts_id(opts);

    Object *obj;



    g_assert(type != NULL);



    if (id == NULL) {

        qerror_report(QERR_MISSING_PARAMETER, "id");

        return -1;

    }



    obj = object_new(type);

    if (qemu_opt_foreach(opts, object_set_property, obj, 1) < 0) {

        return -1;

    }



    object_property_add_child(container_get(object_get_root(), "/objects"),

                              id, obj, NULL);



    return 0;

}

static int FUNC_0(QemuOpts *VAR_0, void *VAR_1)

{

    const char *VAR_2 = qemu_opt_get(VAR_0, "qom-VAR_2");

    const char *VAR_3 = qemu_opts_id(VAR_0);

    Object *obj;



    g_assert(VAR_2 != NULL);



    if (VAR_3 == NULL) {

        qerror_report(QERR_MISSING_PARAMETER, "VAR_3");

        return -1;

    }



    obj = object_new(VAR_2);

    if (qemu_opt_foreach(VAR_0, object_set_property, obj, 1) < 0) {

        return -1;

    }



    object_property_add_child(container_get(object_get_root(), "/objects"),

                              VAR_3, obj, NULL);



    return 0;

}

static int FUNC_0(QemuOpts *VAR_0, void *VAR_1)
{ const char *VAR_2 = qemu_opt_get(VAR_0, "qom-VAR_2"); const char *VAR_3 = qemu_opts_id(VAR_0); Object *obj; g_assert(VAR_2 != NULL); if (VAR_3 == NULL) { qerror_report(QERR_MISSING_PARAMETER, "VAR_3"); return -1; } obj = object_new(VAR_2); if (qemu_opt_foreach(VAR_0, object_set_property, obj, 1) < 0) { return -1; } object_property_add_child(container_get(object_get_root(), "/objects"),
VAR_3, obj, NULL); return 0; }