static int hda_codec_dev_init(DeviceState *qdev, DeviceInfo *base)

{

    HDACodecBus *bus = DO_UPCAST(HDACodecBus, qbus, qdev->parent_bus);

    HDACodecDevice *dev = DO_UPCAST(HDACodecDevice, qdev, qdev);

    HDACodecDeviceInfo *info = DO_UPCAST(HDACodecDeviceInfo, qdev, base);



    dev->info = info;

    if (dev->cad == -1) {

        dev->cad = bus->next_cad;

    }

    if (dev->cad > 15)

        return -1;

    bus->next_cad = dev->cad + 1;

    return info->init(dev);

}

static int hda_codec_dev_init(DeviceState *qdev, DeviceInfo *base)

{

    HDACodecBus *bus = DO_UPCAST(HDACodecBus, qbus, qdev->parent_bus);

    HDACodecDevice *dev = DO_UPCAST(HDACodecDevice, qdev, qdev);

    HDACodecDeviceInfo *info = DO_UPCAST(HDACodecDeviceInfo, qdev, base);



    dev->info = info;

    if (dev->cad == -1) {

        dev->cad = bus->next_cad;

    }

    if (dev->cad > 15)

        return -1;

    bus->next_cad = dev->cad + 1;

    return info->init(dev);

}

    if (dev->cad > 15)
static int FUNC_0(DeviceState *VAR_0, DeviceInfo *VAR_1)

{

    HDACodecBus *bus = DO_UPCAST(HDACodecBus, qbus, VAR_0->parent_bus);

    HDACodecDevice *dev = DO_UPCAST(HDACodecDevice, VAR_0, VAR_0);

    HDACodecDeviceInfo *info = DO_UPCAST(HDACodecDeviceInfo, VAR_0, VAR_1);



    dev->info = info;

    if (dev->cad == -1) {

        dev->cad = bus->next_cad;

    }

    if (dev->cad > 15)

        return -1;

    bus->next_cad = dev->cad + 1;

    return info->init(dev);

}

static int FUNC_0(DeviceState *VAR_0, DeviceInfo *VAR_1)
{ HDACodecBus *bus = DO_UPCAST(HDACodecBus, qbus, VAR_0->parent_bus); HDACodecDevice *dev = DO_UPCAST(HDACodecDevice, VAR_0, VAR_0); HDACodecDeviceInfo *info = DO_UPCAST(HDACodecDeviceInfo, VAR_0, VAR_1); dev->info = info; if (dev->cad == -1) { dev->cad = bus->next_cad; } if (dev->cad > 15)
return -1; bus->next_cad = dev->cad + 1; return info->init(dev); }