void address_space_unmap(AddressSpace *as, void *buffer, target_phys_addr_t len,

                         int is_write, target_phys_addr_t access_len)

{

    if (buffer != bounce.buffer) {

        if (is_write) {

            ram_addr_t addr1 = qemu_ram_addr_from_host_nofail(buffer);

            while (access_len) {

                unsigned l;

                l = TARGET_PAGE_SIZE;

                if (l > access_len)

                    l = access_len;

                invalidate_and_set_dirty(addr1, l);

                addr1 += l;

                access_len -= l;

            }

        }

        if (xen_enabled()) {

            xen_invalidate_map_cache_entry(buffer);

        }

        return;

    }

    if (is_write) {

        address_space_write(as, bounce.addr, bounce.buffer, access_len);

    }

    qemu_vfree(bounce.buffer);

    bounce.buffer = NULL;

    cpu_notify_map_clients();

}

void address_space_unmap(AddressSpace *as, void *buffer, target_phys_addr_t len,

                         int is_write, target_phys_addr_t access_len)

{

    if (buffer != bounce.buffer) {

        if (is_write) {

            ram_addr_t addr1 = qemu_ram_addr_from_host_nofail(buffer);

            while (access_len) {

                unsigned l;

                l = TARGET_PAGE_SIZE;

                if (l > access_len)

                    l = access_len;

                invalidate_and_set_dirty(addr1, l);

                addr1 += l;

                access_len -= l;

            }

        }

        if (xen_enabled()) {

            xen_invalidate_map_cache_entry(buffer);

        }

        return;

    }

    if (is_write) {

        address_space_write(as, bounce.addr, bounce.buffer, access_len);

    }

    qemu_vfree(bounce.buffer);

    bounce.buffer = NULL;

    cpu_notify_map_clients();

}

void FUNC_0(AddressSpace *VAR_0, void *VAR_1, target_phys_addr_t VAR_2,

                         int VAR_3, target_phys_addr_t VAR_4)

{

    if (VAR_1 != bounce.VAR_1) {

        if (VAR_3) {

            ram_addr_t addr1 = qemu_ram_addr_from_host_nofail(VAR_1);

            while (VAR_4) {

                unsigned VAR_5;

                VAR_5 = TARGET_PAGE_SIZE;

                if (VAR_5 > VAR_4)

                    VAR_5 = VAR_4;

                invalidate_and_set_dirty(addr1, VAR_5);

                addr1 += VAR_5;

                VAR_4 -= VAR_5;

            }

        }

        if (xen_enabled()) {

            xen_invalidate_map_cache_entry(VAR_1);

        }

        return;

    }

    if (VAR_3) {

        address_space_write(VAR_0, bounce.addr, bounce.VAR_1, VAR_4);

    }

    qemu_vfree(bounce.VAR_1);

    bounce.VAR_1 = NULL;

    cpu_notify_map_clients();

}

void FUNC_0(AddressSpace *VAR_0, void *VAR_1, target_phys_addr_t VAR_2,
int VAR_3, target_phys_addr_t VAR_4)
{ if (VAR_1 != bounce.VAR_1) { if (VAR_3) { ram_addr_t addr1 = qemu_ram_addr_from_host_nofail(VAR_1); while (VAR_4) { unsigned VAR_5; VAR_5 = TARGET_PAGE_SIZE; if (VAR_5 > VAR_4)
VAR_5 = VAR_4; invalidate_and_set_dirty(addr1, VAR_5); addr1 += VAR_5; VAR_4 -= VAR_5; } } if (xen_enabled()) { xen_invalidate_map_cache_entry(VAR_1); } return; } if (VAR_3) { address_space_write(VAR_0, bounce.addr, bounce.VAR_1, VAR_4); } qemu_vfree(bounce.VAR_1); bounce.VAR_1 = NULL; cpu_notify_map_clients(); }