void portio_list_del(PortioList *piolist)

{

    MemoryRegion *mr, *alias;

    unsigned i;



    for (i = 0; i < piolist->nr; ++i) {

        mr = piolist->regions[i];

        alias = piolist->aliases[i];

        memory_region_del_subregion(piolist->address_space, alias);

        memory_region_destroy(alias);

        memory_region_destroy(mr);

        g_free((MemoryRegionOps *)mr->ops);

        g_free(mr);

        g_free(alias);

        piolist->regions[i] = NULL;

        piolist->aliases[i] = NULL;

    }

}

void portio_list_del(PortioList *piolist)

{

    MemoryRegion *mr, *alias;

    unsigned i;



    for (i = 0; i < piolist->nr; ++i) {

        mr = piolist->regions[i];

        alias = piolist->aliases[i];

        memory_region_del_subregion(piolist->address_space, alias);

        memory_region_destroy(alias);

        memory_region_destroy(mr);

        g_free((MemoryRegionOps *)mr->ops);

        g_free(mr);

        g_free(alias);

        piolist->regions[i] = NULL;

        piolist->aliases[i] = NULL;

    }

}

void FUNC_0(PortioList *VAR_0)

{

    MemoryRegion *mr, *alias;

    unsigned VAR_1;



    for (VAR_1 = 0; VAR_1 < VAR_0->nr; ++VAR_1) {

        mr = VAR_0->regions[VAR_1];

        alias = VAR_0->aliases[VAR_1];

        memory_region_del_subregion(VAR_0->address_space, alias);

        memory_region_destroy(alias);

        memory_region_destroy(mr);

        g_free((MemoryRegionOps *)mr->ops);

        g_free(mr);

        g_free(alias);

        VAR_0->regions[VAR_1] = NULL;

        VAR_0->aliases[VAR_1] = NULL;

    }

}

void FUNC_0(PortioList *VAR_0)
{ MemoryRegion *mr, *alias; unsigned VAR_1; for (VAR_1 = 0; VAR_1 < VAR_0->nr; ++VAR_1) { mr = VAR_0->regions[VAR_1]; alias = VAR_0->aliases[VAR_1]; memory_region_del_subregion(VAR_0->address_space, alias); memory_region_destroy(alias); memory_region_destroy(mr); g_free((MemoryRegionOps *)mr->ops); g_free(mr); g_free(alias); VAR_0->regions[VAR_1] = NULL; VAR_0->aliases[VAR_1] = NULL; } }