static void bus_add_child(BusState *bus, DeviceState *child)

{

    char name[32];

    BusChild *kid = g_malloc0(sizeof(*kid));



    if (qdev_hotplug) {

        assert(bus->allow_hotplug);

    }



    kid->index = bus->max_index++;

    kid->child = child;

    object_ref(OBJECT(kid->child));



    QTAILQ_INSERT_HEAD(&bus->children, kid, sibling);



    /* This transfers ownership of kid->child to the property.  */

    snprintf(name, sizeof(name), "child[%d]", kid->index);

    object_property_add_link(OBJECT(bus), name,

                             object_get_typename(OBJECT(child)),

                             (Object **)&kid->child,

                             NULL);

}

static void bus_add_child(BusState *bus, DeviceState *child)

{

    char name[32];

    BusChild *kid = g_malloc0(sizeof(*kid));



    if (qdev_hotplug) {

        assert(bus->allow_hotplug);

    }



    kid->index = bus->max_index++;

    kid->child = child;

    object_ref(OBJECT(kid->child));



    QTAILQ_INSERT_HEAD(&bus->children, kid, sibling);



    

    snprintf(name, sizeof(name), "child[%d]", kid->index);

    object_property_add_link(OBJECT(bus), name,

                             object_get_typename(OBJECT(child)),

                             (Object **)&kid->child,

                             NULL);

}

                             (Object **)&kid->child,                              NULL);
static void FUNC_0(BusState *VAR_0, DeviceState *VAR_1)

{

    char VAR_2[32];

    BusChild *kid = g_malloc0(sizeof(*kid));



    if (qdev_hotplug) {

        assert(VAR_0->allow_hotplug);

    }



    kid->index = VAR_0->max_index++;

    kid->VAR_1 = VAR_1;

    object_ref(OBJECT(kid->VAR_1));



    QTAILQ_INSERT_HEAD(&VAR_0->children, kid, sibling);



    

    snprintf(VAR_2, sizeof(VAR_2), "VAR_1[%d]", kid->index);

    object_property_add_link(OBJECT(VAR_0), VAR_2,

                             object_get_typename(OBJECT(VAR_1)),

                             (Object **)&kid->VAR_1,

                             NULL);

}

static void FUNC_0(BusState *VAR_0, DeviceState *VAR_1)
{ char VAR_2[32]; BusChild *kid = g_malloc0(sizeof(*kid)); if (qdev_hotplug) { assert(VAR_0->allow_hotplug); } kid->index = VAR_0->max_index++; kid->VAR_1 = VAR_1; object_ref(OBJECT(kid->VAR_1)); QTAILQ_INSERT_HEAD(&VAR_0->children, kid, sibling); snprintf(VAR_2, sizeof(VAR_2), "VAR_1[%d]", kid->index); object_property_add_link(OBJECT(VAR_0), VAR_2,
object_get_typename(OBJECT(VAR_1)),
(Object **)&kid->VAR_1,
NULL); }