static const MemoryRegionPortio *find_portio(MemoryRegion *mr, uint64_t offset,

                                             unsigned width, bool write)

{

    const MemoryRegionPortio *mrp;



    for (mrp = mr->ops->old_portio; mrp->size; ++mrp) {

        if (offset >= mrp->offset && offset < mrp->offset + mrp->len

            && width == mrp->size

            && (write ? (bool)mrp->write : (bool)mrp->read)) {

            return mrp;

        }

    }

    return NULL;

}

static const MemoryRegionPortio *find_portio(MemoryRegion *mr, uint64_t offset,

                                             unsigned width, bool write)

{

    const MemoryRegionPortio *mrp;



    for (mrp = mr->ops->old_portio; mrp->size; ++mrp) {

        if (offset >= mrp->offset && offset < mrp->offset + mrp->len

            && width == mrp->size

            && (write ? (bool)mrp->write : (bool)mrp->read)) {

            return mrp;

        }

    }

    return NULL;

}

static const MemoryRegionPortio *FUNC_0(MemoryRegion *mr, uint64_t offset,

                                             unsigned width, bool write)

{

    const MemoryRegionPortio *VAR_0;



    for (VAR_0 = mr->ops->old_portio; VAR_0->size; ++VAR_0) {

        if (offset >= VAR_0->offset && offset < VAR_0->offset + VAR_0->len

            && width == VAR_0->size

            && (write ? (bool)VAR_0->write : (bool)VAR_0->read)) {

            return VAR_0;

        }

    }

    return NULL;

}

static const MemoryRegionPortio *FUNC_0(MemoryRegion *mr, uint64_t offset,
unsigned width, bool write)
{ const MemoryRegionPortio *VAR_0; for (VAR_0 = mr->ops->old_portio; VAR_0->size; ++VAR_0) { if (offset >= VAR_0->offset && offset < VAR_0->offset + VAR_0->len
&& width == VAR_0->size
&& (write ? (bool)VAR_0->write : (bool)VAR_0->read)) { return VAR_0; } } return NULL; }