static void set_string(Object *obj, Visitor *v, void *opaque,

                       const char *name, Error **errp)

{

    DeviceState *dev = DEVICE(obj);

    Property *prop = opaque;

    char **ptr = qdev_get_prop_ptr(dev, prop);

    Error *local_err = NULL;

    char *str;



    if (dev->realized) {

        qdev_prop_set_after_realize(dev, name, errp);

        return;

    }



    visit_type_str(v, &str, name, &local_err);

    if (local_err) {

        error_propagate(errp, local_err);

        return;

    }

    if (*ptr) {

        g_free(*ptr);

    }

    *ptr = str;

}

static void set_string(Object *obj, Visitor *v, void *opaque,

                       const char *name, Error **errp)

{

    DeviceState *dev = DEVICE(obj);

    Property *prop = opaque;

    char **ptr = qdev_get_prop_ptr(dev, prop);

    Error *local_err = NULL;

    char *str;



    if (dev->realized) {

        qdev_prop_set_after_realize(dev, name, errp);

        return;

    }



    visit_type_str(v, &str, name, &local_err);

    if (local_err) {

        error_propagate(errp, local_err);

        return;

    }

    if (*ptr) {

        g_free(*ptr);

    }

    *ptr = str;

}

static void FUNC_0(Object *VAR_0, Visitor *VAR_1, void *VAR_2,

                       const char *VAR_3, Error **VAR_4)

{

    DeviceState *dev = DEVICE(VAR_0);

    Property *prop = VAR_2;

    char **VAR_5 = qdev_get_prop_ptr(dev, prop);

    Error *local_err = NULL;

    char *VAR_6;



    if (dev->realized) {

        qdev_prop_set_after_realize(dev, VAR_3, VAR_4);

        return;

    }



    visit_type_str(VAR_1, &VAR_6, VAR_3, &local_err);

    if (local_err) {

        error_propagate(VAR_4, local_err);

        return;

    }

    if (*VAR_5) {

        g_free(*VAR_5);

    }

    *VAR_5 = VAR_6;

}

static void FUNC_0(Object *VAR_0, Visitor *VAR_1, void *VAR_2,
const char *VAR_3, Error **VAR_4)
{ DeviceState *dev = DEVICE(VAR_0); Property *prop = VAR_2; char **VAR_5 = qdev_get_prop_ptr(dev, prop); Error *local_err = NULL; char *VAR_6; if (dev->realized) { qdev_prop_set_after_realize(dev, VAR_3, VAR_4); return; } visit_type_str(VAR_1, &VAR_6, VAR_3, &local_err); if (local_err) { error_propagate(VAR_4, local_err); return; } if (*VAR_5) { g_free(*VAR_5); } *VAR_5 = VAR_6; }