static void subpage_write(void *opaque, target_phys_addr_t addr,

                          uint64_t value, unsigned len)

{

    subpage_t *mmio = opaque;

    unsigned int idx = SUBPAGE_IDX(addr);

    MemoryRegionSection *section;

#if defined(DEBUG_SUBPAGE)

    printf("%s: subpage %p len %d addr " TARGET_FMT_plx

           " idx %d value %"PRIx64"\n",

           __func__, mmio, len, addr, idx, value);

#endif



    section = &phys_sections[mmio->sub_section[idx]];

    addr += mmio->base;

    addr -= section->offset_within_address_space;

    addr += section->offset_within_region;

    io_mem_write(section->mr, addr, value, len);

}

static void subpage_write(void *opaque, target_phys_addr_t addr,

                          uint64_t value, unsigned len)

{

    subpage_t *mmio = opaque;

    unsigned int idx = SUBPAGE_IDX(addr);

    MemoryRegionSection *section;

#if defined(DEBUG_SUBPAGE)

    printf("%s: subpage %p len %d addr " TARGET_FMT_plx

           " idx %d value %"PRIx64"\n",

           __func__, mmio, len, addr, idx, value);

#endif



    section = &phys_sections[mmio->sub_section[idx]];

    addr += mmio->base;

    addr -= section->offset_within_address_space;

    addr += section->offset_within_region;

    io_mem_write(section->mr, addr, value, len);

}

static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,

                          uint64_t VAR_2, unsigned VAR_3)

{

    subpage_t *mmio = VAR_0;

    unsigned int VAR_4 = SUBPAGE_IDX(VAR_1);

    MemoryRegionSection *section;

#if defined(DEBUG_SUBPAGE)

    printf("%s: subpage %p VAR_3 %d VAR_1 " TARGET_FMT_plx

           " VAR_4 %d VAR_2 %"PRIx64"\n",

           __func__, mmio, VAR_3, VAR_1, VAR_4, VAR_2);

#endif



    section = &phys_sections[mmio->sub_section[VAR_4]];

    VAR_1 += mmio->base;

    VAR_1 -= section->offset_within_address_space;

    VAR_1 += section->offset_within_region;

    io_mem_write(section->mr, VAR_1, VAR_2, VAR_3);

}

static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{ subpage_t *mmio = VAR_0; unsigned int VAR_4 = SUBPAGE_IDX(VAR_1); MemoryRegionSection *section; #if defined(DEBUG_SUBPAGE)
printf("%s: subpage %p VAR_3 %d VAR_1 " TARGET_FMT_plx
" VAR_4 %d VAR_2 %"PRIx64"\n",
__func__, mmio, VAR_3, VAR_1, VAR_4, VAR_2); #endif
section = &phys_sections[mmio->sub_section[VAR_4]]; VAR_1 += mmio->base; VAR_1 -= section->offset_within_address_space; VAR_1 += section->offset_within_region; io_mem_write(section->mr, VAR_1, VAR_2, VAR_3); }