void portio_list_init(PortioList *piolist,

                      const MemoryRegionPortio *callbacks,

                      void *opaque, const char *name)

{

    unsigned n = 0;



    while (callbacks[n].size) {

        ++n;

    }



    piolist->ports = callbacks;

    piolist->nr = 0;

    piolist->regions = g_new0(MemoryRegion *, n);

    piolist->aliases = g_new0(MemoryRegion *, n);

    piolist->address_space = NULL;

    piolist->opaque = opaque;

    piolist->name = name;

}

void portio_list_init(PortioList *piolist,

                      const MemoryRegionPortio *callbacks,

                      void *opaque, const char *name)

{

    unsigned n = 0;



    while (callbacks[n].size) {

        ++n;

    }



    piolist->ports = callbacks;

    piolist->nr = 0;

    piolist->regions = g_new0(MemoryRegion *, n);

    piolist->aliases = g_new0(MemoryRegion *, n);

    piolist->address_space = NULL;

    piolist->opaque = opaque;

    piolist->name = name;

}

void FUNC_0(PortioList *VAR_0,

                      const MemoryRegionPortio *VAR_1,

                      void *VAR_2, const char *VAR_3)

{

    unsigned VAR_4 = 0;



    while (VAR_1[VAR_4].size) {

        ++VAR_4;

    }



    VAR_0->ports = VAR_1;

    VAR_0->nr = 0;

    VAR_0->regions = g_new0(MemoryRegion *, VAR_4);

    VAR_0->aliases = g_new0(MemoryRegion *, VAR_4);

    VAR_0->address_space = NULL;

    VAR_0->VAR_2 = VAR_2;

    VAR_0->VAR_3 = VAR_3;

}

void FUNC_0(PortioList *VAR_0,
const MemoryRegionPortio *VAR_1,
void *VAR_2, const char *VAR_3)
{ unsigned VAR_4 = 0; while (VAR_1[VAR_4].size) { ++VAR_4; } VAR_0->ports = VAR_1; VAR_0->nr = 0; VAR_0->regions = g_new0(MemoryRegion *, VAR_4); VAR_0->aliases = g_new0(MemoryRegion *, VAR_4); VAR_0->address_space = NULL; VAR_0->VAR_2 = VAR_2; VAR_0->VAR_3 = VAR_3; }