static void bus_set_realized(Object *obj, bool value, Error **errp)

{

    BusState *bus = BUS(obj);

    BusClass *bc = BUS_GET_CLASS(bus);

    Error *local_err = NULL;



    if (value && !bus->realized) {

        if (bc->realize) {

            bc->realize(bus, &local_err);

        }

    } else if (!value && bus->realized) {

        if (bc->unrealize) {

            bc->unrealize(bus, &local_err);

        }

    }



    if (local_err != NULL) {

        error_propagate(errp, local_err);

        return;

    }



    bus->realized = value;

}

static void bus_set_realized(Object *obj, bool value, Error **errp)

{

    BusState *bus = BUS(obj);

    BusClass *bc = BUS_GET_CLASS(bus);

    Error *local_err = NULL;



    if (value && !bus->realized) {

        if (bc->realize) {

            bc->realize(bus, &local_err);

        }

    } else if (!value && bus->realized) {

        if (bc->unrealize) {

            bc->unrealize(bus, &local_err);

        }

    }



    if (local_err != NULL) {

        error_propagate(errp, local_err);

        return;

    }



    bus->realized = value;

}

        if (bc->unrealize) {
static void FUNC_0(Object *VAR_0, bool VAR_1, Error **VAR_2)

{

    BusState *bus = BUS(VAR_0);

    BusClass *bc = BUS_GET_CLASS(bus);

    Error *local_err = NULL;



    if (VAR_1 && !bus->realized) {

        if (bc->realize) {

            bc->realize(bus, &local_err);

        }

    } else if (!VAR_1 && bus->realized) {

        if (bc->unrealize) {

            bc->unrealize(bus, &local_err);

        }

    }



    if (local_err != NULL) {

        error_propagate(VAR_2, local_err);

        return;

    }



    bus->realized = VAR_1;

}

static void FUNC_0(Object *VAR_0, bool VAR_1, Error **VAR_2)
{ BusState *bus = BUS(VAR_0); BusClass *bc = BUS_GET_CLASS(bus); Error *local_err = NULL; if (VAR_1 && !bus->realized) { if (bc->realize) { bc->realize(bus, &local_err); } } else if (!VAR_1 && bus->realized) { if (bc->unrealize) { bc->unrealize(bus, &local_err); } } if (local_err != NULL) { error_propagate(VAR_2, local_err); return; } bus->realized = VAR_1; }