static void vhost_region_del(MemoryListener *listener,

                             MemoryRegionSection *section)

{

    struct vhost_dev *dev = container_of(listener, struct vhost_dev,

                                         memory_listener);

    int i;



    vhost_set_memory(listener, section, false);

    for (i = 0; i < dev->n_mem_sections; ++i) {

        if (dev->mem_sections[i].offset_within_address_space

            == section->offset_within_address_space) {

            --dev->n_mem_sections;

            memmove(&dev->mem_sections[i], &dev->mem_sections[i+1],

                    dev->n_mem_sections - i);

            break;

        }

    }

}

static void vhost_region_del(MemoryListener *listener,

                             MemoryRegionSection *section)

{

    struct vhost_dev *dev = container_of(listener, struct vhost_dev,

                                         memory_listener);

    int i;



    vhost_set_memory(listener, section, false);

    for (i = 0; i < dev->n_mem_sections; ++i) {

        if (dev->mem_sections[i].offset_within_address_space

            == section->offset_within_address_space) {

            --dev->n_mem_sections;

            memmove(&dev->mem_sections[i], &dev->mem_sections[i+1],

                    dev->n_mem_sections - i);

            break;

        }

    }

}

                    dev->n_mem_sections - i);
static void FUNC_0(MemoryListener *VAR_0,

                             MemoryRegionSection *VAR_1)

{

    struct vhost_dev *VAR_2 = container_of(VAR_0, struct vhost_dev,

                                         memory_listener);

    int VAR_3;



    vhost_set_memory(VAR_0, VAR_1, false);

    for (VAR_3 = 0; VAR_3 < VAR_2->n_mem_sections; ++VAR_3) {

        if (VAR_2->mem_sections[VAR_3].offset_within_address_space

            == VAR_1->offset_within_address_space) {

            --VAR_2->n_mem_sections;

            memmove(&VAR_2->mem_sections[VAR_3], &VAR_2->mem_sections[VAR_3+1],

                    VAR_2->n_mem_sections - VAR_3);

            break;

        }

    }

}

static void FUNC_0(MemoryListener *VAR_0,
MemoryRegionSection *VAR_1)
{ struct vhost_dev *VAR_2 = container_of(VAR_0, struct vhost_dev,
memory_listener); int VAR_3; vhost_set_memory(VAR_0, VAR_1, false); for (VAR_3 = 0; VAR_3 < VAR_2->n_mem_sections; ++VAR_3) { if (VAR_2->mem_sections[VAR_3].offset_within_address_space
== VAR_1->offset_within_address_space) { --VAR_2->n_mem_sections; memmove(&VAR_2->mem_sections[VAR_3], &VAR_2->mem_sections[VAR_3+1],
VAR_2->n_mem_sections - VAR_3); break; } } }