static void prop_get_fdt(Object *obj, Visitor *v, const char *name,

                         void *opaque, Error **errp)

{

    sPAPRDRConnector *drc = SPAPR_DR_CONNECTOR(obj);

    Error *err = NULL;

    int fdt_offset_next, fdt_offset, fdt_depth;

    void *fdt;



    if (!drc->fdt) {

        visit_start_struct(v, name, NULL, 0, &err);

        if (!err) {

            visit_end_struct(v, &err);

        }

        error_propagate(errp, err);

        return;

    }



    fdt = drc->fdt;

    fdt_offset = drc->fdt_start_offset;

    fdt_depth = 0;



    do {

        const char *name = NULL;

        const struct fdt_property *prop = NULL;

        int prop_len = 0, name_len = 0;

        uint32_t tag;



        tag = fdt_next_tag(fdt, fdt_offset, &fdt_offset_next);

        switch (tag) {

        case FDT_BEGIN_NODE:

            fdt_depth++;

            name = fdt_get_name(fdt, fdt_offset, &name_len);

            visit_start_struct(v, name, NULL, 0, &err);

            if (err) {

                error_propagate(errp, err);

                return;

            }

            break;

        case FDT_END_NODE:

            /* shouldn't ever see an FDT_END_NODE before FDT_BEGIN_NODE */

            g_assert(fdt_depth > 0);

            visit_end_struct(v, &err);

            if (err) {

                error_propagate(errp, err);

                return;

            }

            fdt_depth--;

            break;

        case FDT_PROP: {

            int i;

            prop = fdt_get_property_by_offset(fdt, fdt_offset, &prop_len);

            name = fdt_string(fdt, fdt32_to_cpu(prop->nameoff));

            visit_start_list(v, name, &err);

            if (err) {

                error_propagate(errp, err);

                return;

            }

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

                visit_type_uint8(v, NULL, (uint8_t *)&prop->data[i], &err);

                if (err) {

                    error_propagate(errp, err);

                    return;

                }

            }

            visit_end_list(v);

            break;

        }

        default:

            error_setg(&error_abort, "device FDT in unexpected state: %d", tag);

        }

        fdt_offset = fdt_offset_next;

    } while (fdt_depth != 0);

}

static void prop_get_fdt(Object *obj, Visitor *v, const char *name,

                         void *opaque, Error **errp)

{

    sPAPRDRConnector *drc = SPAPR_DR_CONNECTOR(obj);

    Error *err = NULL;

    int fdt_offset_next, fdt_offset, fdt_depth;

    void *fdt;



    if (!drc->fdt) {

        visit_start_struct(v, name, NULL, 0, &err);

        if (!err) {

            visit_end_struct(v, &err);

        }

        error_propagate(errp, err);

        return;

    }



    fdt = drc->fdt;

    fdt_offset = drc->fdt_start_offset;

    fdt_depth = 0;



    do {

        const char *name = NULL;

        const struct fdt_property *prop = NULL;

        int prop_len = 0, name_len = 0;

        uint32_t tag;



        tag = fdt_next_tag(fdt, fdt_offset, &fdt_offset_next);

        switch (tag) {

        case FDT_BEGIN_NODE:

            fdt_depth++;

            name = fdt_get_name(fdt, fdt_offset, &name_len);

            visit_start_struct(v, name, NULL, 0, &err);

            if (err) {

                error_propagate(errp, err);

                return;

            }

            break;

        case FDT_END_NODE:

            

            g_assert(fdt_depth > 0);

            visit_end_struct(v, &err);

            if (err) {

                error_propagate(errp, err);

                return;

            }

            fdt_depth--;

            break;

        case FDT_PROP: {

            int i;

            prop = fdt_get_property_by_offset(fdt, fdt_offset, &prop_len);

            name = fdt_string(fdt, fdt32_to_cpu(prop->nameoff));

            visit_start_list(v, name, &err);

            if (err) {

                error_propagate(errp, err);

                return;

            }

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

                visit_type_uint8(v, NULL, (uint8_t *)&prop->data[i], &err);

                if (err) {

                    error_propagate(errp, err);

                    return;

                }

            }

            visit_end_list(v);

            break;

        }

        default:

            error_setg(&error_abort, "device FDT in unexpected state: %d", tag);

        }

        fdt_offset = fdt_offset_next;

    } while (fdt_depth != 0);

}

        visit_start_struct(v, name, NULL, 0, &err);         if (!err) {             visit_end_struct(v, &err);         error_propagate(errp, err);
static void FUNC_0(Object *VAR_0, Visitor *VAR_1, const char *VAR_9,

                         void *VAR_3, Error **VAR_4)

{

    sPAPRDRConnector *drc = SPAPR_DR_CONNECTOR(VAR_0);

    Error *err = NULL;

    int VAR_5, VAR_6, VAR_7;

    void *VAR_8;



    if (!drc->VAR_8) {

        visit_start_struct(VAR_1, VAR_9, NULL, 0, &err);

        if (!err) {

            visit_end_struct(VAR_1, &err);

        }

        error_propagate(VAR_4, err);

        return;

    }



    VAR_8 = drc->VAR_8;

    VAR_6 = drc->fdt_start_offset;

    VAR_7 = 0;



    do {

        const char *VAR_9 = NULL;

        const struct fdt_property *VAR_9 = NULL;

        int VAR_10 = 0, VAR_11 = 0;

        uint32_t tag;



        tag = fdt_next_tag(VAR_8, VAR_6, &VAR_5);

        switch (tag) {

        case FDT_BEGIN_NODE:

            VAR_7++;

            VAR_9 = fdt_get_name(VAR_8, VAR_6, &VAR_11);

            visit_start_struct(VAR_1, VAR_9, NULL, 0, &err);

            if (err) {

                error_propagate(VAR_4, err);

                return;

            }

            break;

        case FDT_END_NODE:

            

            g_assert(VAR_7 > 0);

            visit_end_struct(VAR_1, &err);

            if (err) {

                error_propagate(VAR_4, err);

                return;

            }

            VAR_7--;

            break;

        case FDT_PROP: {

            int VAR_12;

            VAR_9 = fdt_get_property_by_offset(VAR_8, VAR_6, &VAR_10);

            VAR_9 = fdt_string(VAR_8, fdt32_to_cpu(VAR_9->nameoff));

            visit_start_list(VAR_1, VAR_9, &err);

            if (err) {

                error_propagate(VAR_4, err);

                return;

            }

            for (VAR_12 = 0; VAR_12 < VAR_10; VAR_12++) {

                visit_type_uint8(VAR_1, NULL, (uint8_t *)&VAR_9->data[VAR_12], &err);

                if (err) {

                    error_propagate(VAR_4, err);

                    return;

                }

            }

            visit_end_list(VAR_1);

            break;

        }

        default:

            error_setg(&error_abort, "device FDT in unexpected state: %d", tag);

        }

        VAR_6 = VAR_5;

    } while (VAR_7 != 0);

}

static void FUNC_0(Object *VAR_0, Visitor *VAR_1, const char *VAR_9,
void *VAR_3, Error **VAR_4)
{ sPAPRDRConnector *drc = SPAPR_DR_CONNECTOR(VAR_0); Error *err = NULL; int VAR_5, VAR_6, VAR_7; void *VAR_8; if (!drc->VAR_8) { visit_start_struct(VAR_1, VAR_9, NULL, 0, &err); if (!err) { visit_end_struct(VAR_1, &err); } error_propagate(VAR_4, err); return; } VAR_8 = drc->VAR_8; VAR_6 = drc->fdt_start_offset; VAR_7 = 0; do { const char *VAR_9 = NULL; const struct fdt_property *VAR_9 = NULL; int VAR_10 = 0, VAR_11 = 0; uint32_t tag; tag = fdt_next_tag(VAR_8, VAR_6, &VAR_5); switch (tag) { case FDT_BEGIN_NODE:
VAR_7++; VAR_9 = fdt_get_name(VAR_8, VAR_6, &VAR_11); visit_start_struct(VAR_1, VAR_9, NULL, 0, &err); if (err) { error_propagate(VAR_4, err); return; } break; case FDT_END_NODE:
g_assert(VAR_7 > 0); visit_end_struct(VAR_1, &err); if (err) { error_propagate(VAR_4, err); return; } VAR_7--; break; case FDT_PROP: { int VAR_12; VAR_9 = fdt_get_property_by_offset(VAR_8, VAR_6, &VAR_10); VAR_9 = fdt_string(VAR_8, fdt32_to_cpu(VAR_9->nameoff)); visit_start_list(VAR_1, VAR_9, &err); if (err) { error_propagate(VAR_4, err); return; } for (VAR_12 = 0; VAR_12 < VAR_10; VAR_12++) { visit_type_uint8(VAR_1, NULL, (uint8_t *)&VAR_9->data[VAR_12], &err); if (err) { error_propagate(VAR_4, err); return; } } visit_end_list(VAR_1); break; } default:
error_setg(&error_abort, "device FDT in unexpected state: %d", tag); } VAR_6 = VAR_5; } while (VAR_7 != 0); }