void cpu_physical_memory_unmap(void *buffer, target_phys_addr_t len,

                               int is_write, target_phys_addr_t access_len)

{

    if (buffer != bounce.buffer) {

        if (is_write) {

            unsigned long addr1 = (uint8_t *)buffer - phys_ram_base;

            while (access_len) {

                unsigned l;

                l = TARGET_PAGE_SIZE;

                if (l > access_len)

                    l = access_len;

                if (!cpu_physical_memory_is_dirty(addr1)) {

                    /* invalidate code */

                    tb_invalidate_phys_page_range(addr1, addr1 + l, 0);

                    /* set dirty bit */

                    phys_ram_dirty[addr1 >> TARGET_PAGE_BITS] |=

                        (0xff & ~CODE_DIRTY_FLAG);

                }

                addr1 += l;

                access_len -= l;

            }

        }

        return;

    }

    if (is_write) {

        cpu_physical_memory_write(bounce.addr, bounce.buffer, access_len);

    }

    qemu_free(bounce.buffer);

    bounce.buffer = NULL;


}
void cpu_physical_memory_unmap(void *buffer, target_phys_addr_t len,

                               int is_write, target_phys_addr_t access_len)

{

    if (buffer != bounce.buffer) {

        if (is_write) {

            unsigned long addr1 = (uint8_t *)buffer - phys_ram_base;

            while (access_len) {

                unsigned l;

                l = TARGET_PAGE_SIZE;

                if (l > access_len)

                    l = access_len;

                if (!cpu_physical_memory_is_dirty(addr1)) {

                    

                    tb_invalidate_phys_page_range(addr1, addr1 + l, 0);

                    

                    phys_ram_dirty[addr1 >> TARGET_PAGE_BITS] |=

                        (0xff & ~CODE_DIRTY_FLAG);

                }

                addr1 += l;

                access_len -= l;

            }

        }

        return;

    }

    if (is_write) {

        cpu_physical_memory_write(bounce.addr, bounce.buffer, access_len);

    }

    qemu_free(bounce.buffer);

    bounce.buffer = NULL;


}
void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,

                               int VAR_2, target_phys_addr_t VAR_3)

{

    if (VAR_0 != bounce.VAR_0) {

        if (VAR_2) {

            unsigned long VAR_4 = (uint8_t *)VAR_0 - phys_ram_base;

            while (VAR_3) {

                unsigned VAR_5;

                VAR_5 = TARGET_PAGE_SIZE;

                if (VAR_5 > VAR_3)

                    VAR_5 = VAR_3;

                if (!cpu_physical_memory_is_dirty(VAR_4)) {

                    

                    tb_invalidate_phys_page_range(VAR_4, VAR_4 + VAR_5, 0);

                    

                    phys_ram_dirty[VAR_4 >> TARGET_PAGE_BITS] |=

                        (0xff & ~CODE_DIRTY_FLAG);

                }

                VAR_4 += VAR_5;

                VAR_3 -= VAR_5;

            }

        }

        return;

    }

    if (VAR_2) {

        cpu_physical_memory_write(bounce.addr, bounce.VAR_0, VAR_3);

    }

    qemu_free(bounce.VAR_0);

    bounce.VAR_0 = NULL;


}
void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
int VAR_2, target_phys_addr_t VAR_3)
{ if (VAR_0 != bounce.VAR_0) { if (VAR_2) { unsigned long VAR_4 = (uint8_t *)VAR_0 - phys_ram_base; while (VAR_3) { unsigned VAR_5; VAR_5 = TARGET_PAGE_SIZE; if (VAR_5 > VAR_3)
VAR_5 = VAR_3; if (!cpu_physical_memory_is_dirty(VAR_4)) { tb_invalidate_phys_page_range(VAR_4, VAR_4 + VAR_5, 0); phys_ram_dirty[VAR_4 >> TARGET_PAGE_BITS] |=
(0xff & ~CODE_DIRTY_FLAG); } VAR_4 += VAR_5; VAR_3 -= VAR_5; } } return; } if (VAR_2) { cpu_physical_memory_write(bounce.addr, bounce.VAR_0, VAR_3); } qemu_free(bounce.VAR_0); bounce.VAR_0 = NULL; }