static void balloon_stats_get_all(Object *obj, struct Visitor *v,

                                  void *opaque, const char *name, Error **errp)

{

    Error *err = NULL;

    VirtIOBalloon *s = opaque;

    int i;



    if (!s->stats_last_update) {

        error_setg(errp, "guest hasn't updated any stats yet");

        return;

    }



    visit_start_struct(v, NULL, "guest-stats", name, 0, &err);

    if (err) {

        goto out;

    }



    visit_type_int(v, &s->stats_last_update, "last-update", &err);



    visit_start_struct(v, NULL, NULL, "stats", 0, &err);

    if (err) {

        goto out_end;

    }

        

    for (i = 0; i < VIRTIO_BALLOON_S_NR; i++) {

        visit_type_int64(v, (int64_t *) &s->stats[i], balloon_stat_names[i],

                         &err);

    }

    visit_end_struct(v, &err);



out_end:

    visit_end_struct(v, &err);



out:

    error_propagate(errp, err);

}

static void balloon_stats_get_all(Object *obj, struct Visitor *v,

                                  void *opaque, const char *name, Error **errp)

{

    Error *err = NULL;

    VirtIOBalloon *s = opaque;

    int i;



    if (!s->stats_last_update) {

        error_setg(errp, "guest hasn't updated any stats yet");

        return;

    }



    visit_start_struct(v, NULL, "guest-stats", name, 0, &err);

    if (err) {

        goto out;

    }



    visit_type_int(v, &s->stats_last_update, "last-update", &err);



    visit_start_struct(v, NULL, NULL, "stats", 0, &err);

    if (err) {

        goto out_end;

    }

        

    for (i = 0; i < VIRTIO_BALLOON_S_NR; i++) {

        visit_type_int64(v, (int64_t *) &s->stats[i], balloon_stat_names[i],

                         &err);

    }

    visit_end_struct(v, &err);



out_end:

    visit_end_struct(v, &err);



out:

    error_propagate(errp, err);

}

    visit_end_struct(v, &err);     for (i = 0; i < VIRTIO_BALLOON_S_NR; i++) {         goto out;     Error *err = NULL;
static void FUNC_0(Object *VAR_0, struct Visitor *VAR_1,

                                  void *VAR_2, const char *VAR_3, Error **VAR_4)

{

    Error *err = NULL;

    VirtIOBalloon *s = VAR_2;

    int VAR_5;



    if (!s->stats_last_update) {

        error_setg(VAR_4, "guest hasn't updated any stats yet");

        return;

    }



    visit_start_struct(VAR_1, NULL, "guest-stats", VAR_3, 0, &err);

    if (err) {

        goto out;

    }



    visit_type_int(VAR_1, &s->stats_last_update, "last-update", &err);



    visit_start_struct(VAR_1, NULL, NULL, "stats", 0, &err);

    if (err) {

        goto out_end;

    }

        

    for (VAR_5 = 0; VAR_5 < VIRTIO_BALLOON_S_NR; VAR_5++) {

        visit_type_int64(VAR_1, (int64_t *) &s->stats[VAR_5], balloon_stat_names[VAR_5],

                         &err);

    }

    visit_end_struct(VAR_1, &err);



out_end:

    visit_end_struct(VAR_1, &err);



out:

    error_propagate(VAR_4, err);

}

static void FUNC_0(Object *VAR_0, struct Visitor *VAR_1,
void *VAR_2, const char *VAR_3, Error **VAR_4)
{ Error *err = NULL; VirtIOBalloon *s = VAR_2; int VAR_5; if (!s->stats_last_update) { error_setg(VAR_4, "guest hasn't updated any stats yet"); return; } visit_start_struct(VAR_1, NULL, "guest-stats", VAR_3, 0, &err); if (err) { goto out; } visit_type_int(VAR_1, &s->stats_last_update, "last-update", &err); visit_start_struct(VAR_1, NULL, NULL, "stats", 0, &err); if (err) { goto out_end; } for (VAR_5 = 0; VAR_5 < VIRTIO_BALLOON_S_NR; VAR_5++) { visit_type_int64(VAR_1, (int64_t *) &s->stats[VAR_5], balloon_stat_names[VAR_5],
&err); } visit_end_struct(VAR_1, &err); out_end:
visit_end_struct(VAR_1, &err); out:
error_propagate(VAR_4, err); }