static int spapr_create_pci_child_dt(sPAPRPHBState *phb, PCIDevice *dev,

                                     void *fdt, int node_offset)

{

    int offset, ret;

    char nodename[FDT_NAME_MAX];



    pci_get_node_name(nodename, FDT_NAME_MAX, dev);

    offset = fdt_add_subnode(fdt, node_offset, nodename);

    ret = spapr_populate_pci_child_dt(dev, fdt, offset, phb);



    g_assert(!ret);

    if (ret) {

        return 0;

    }

    return offset;

}

static int spapr_create_pci_child_dt(sPAPRPHBState *phb, PCIDevice *dev,

                                     void *fdt, int node_offset)

{

    int offset, ret;

    char nodename[FDT_NAME_MAX];



    pci_get_node_name(nodename, FDT_NAME_MAX, dev);

    offset = fdt_add_subnode(fdt, node_offset, nodename);

    ret = spapr_populate_pci_child_dt(dev, fdt, offset, phb);



    g_assert(!ret);

    if (ret) {

        return 0;

    }

    return offset;

}

static int FUNC_0(sPAPRPHBState *VAR_0, PCIDevice *VAR_1,

                                     void *VAR_2, int VAR_3)

{

    int VAR_4, VAR_5;

    char VAR_6[FDT_NAME_MAX];



    pci_get_node_name(VAR_6, FDT_NAME_MAX, VAR_1);

    VAR_4 = fdt_add_subnode(VAR_2, VAR_3, VAR_6);

    VAR_5 = spapr_populate_pci_child_dt(VAR_1, VAR_2, VAR_4, VAR_0);



    g_assert(!VAR_5);

    if (VAR_5) {

        return 0;

    }

    return VAR_4;

}

static int FUNC_0(sPAPRPHBState *VAR_0, PCIDevice *VAR_1,
void *VAR_2, int VAR_3)
{ int VAR_4, VAR_5; char VAR_6[FDT_NAME_MAX]; pci_get_node_name(VAR_6, FDT_NAME_MAX, VAR_1); VAR_4 = fdt_add_subnode(VAR_2, VAR_3, VAR_6); VAR_5 = spapr_populate_pci_child_dt(VAR_1, VAR_2, VAR_4, VAR_0); g_assert(!VAR_5); if (VAR_5) { return 0; } return VAR_4; }