static void m5206_mbar_writeb(void *opaque, target_phys_addr_t offset,

                              uint32_t value)

{

    m5206_mbar_state *s = (m5206_mbar_state *)opaque;

    int width;

    offset &= 0x3ff;

    if (offset > 0x200) {

        hw_error("Bad MBAR write offset 0x%x", (int)offset);

    }

    width = m5206_mbar_width[offset >> 2];

    if (width > 1) {

        uint32_t tmp;

        tmp = m5206_mbar_readw(opaque, offset & ~1);

        if (offset & 1) {

            tmp = (tmp & 0xff00) | value;

        } else {

            tmp = (tmp & 0x00ff) | (value << 8);

        }

        m5206_mbar_writew(opaque, offset & ~1, tmp);

        return;

    }

    m5206_mbar_write(s, offset, value, 1);

}

static void m5206_mbar_writeb(void *opaque, target_phys_addr_t offset,

                              uint32_t value)

{

    m5206_mbar_state *s = (m5206_mbar_state *)opaque;

    int width;

    offset &= 0x3ff;

    if (offset > 0x200) {

        hw_error("Bad MBAR write offset 0x%x", (int)offset);

    }

    width = m5206_mbar_width[offset >> 2];

    if (width > 1) {

        uint32_t tmp;

        tmp = m5206_mbar_readw(opaque, offset & ~1);

        if (offset & 1) {

            tmp = (tmp & 0xff00) | value;

        } else {

            tmp = (tmp & 0x00ff) | (value << 8);

        }

        m5206_mbar_writew(opaque, offset & ~1, tmp);

        return;

    }

    m5206_mbar_write(s, offset, value, 1);

}

    if (offset > 0x200) {     if (offset > 0x200) {     if (offset > 0x200) {     if (offset > 0x200) {     if (offset > 0x200) {     if (offset > 0x200) {
static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,

                              uint32_t VAR_2)

{

    m5206_mbar_state *s = (m5206_mbar_state *)VAR_0;

    int VAR_3;

    VAR_1 &= 0x3ff;

    if (VAR_1 > 0x200) {

        hw_error("Bad MBAR write VAR_1 0x%x", (int)VAR_1);

    }

    VAR_3 = m5206_mbar_width[VAR_1 >> 2];

    if (VAR_3 > 1) {

        uint32_t tmp;

        tmp = m5206_mbar_readw(VAR_0, VAR_1 & ~1);

        if (VAR_1 & 1) {

            tmp = (tmp & 0xff00) | VAR_2;

        } else {

            tmp = (tmp & 0x00ff) | (VAR_2 << 8);

        }

        m5206_mbar_writew(VAR_0, VAR_1 & ~1, tmp);

        return;

    }

    m5206_mbar_write(s, VAR_1, VAR_2, 1);

}

static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint32_t VAR_2)
{ m5206_mbar_state *s = (m5206_mbar_state *)VAR_0; int VAR_3; VAR_1 &= 0x3ff; if (VAR_1 > 0x200) { hw_error("Bad MBAR write VAR_1 0x%x", (int)VAR_1); } VAR_3 = m5206_mbar_width[VAR_1 >> 2]; if (VAR_3 > 1) { uint32_t tmp; tmp = m5206_mbar_readw(VAR_0, VAR_1 & ~1); if (VAR_1 & 1) { tmp = (tmp & 0xff00) | VAR_2; } else { tmp = (tmp & 0x00ff) | (VAR_2 << 8); } m5206_mbar_writew(VAR_0, VAR_1 & ~1, tmp); return; } m5206_mbar_write(s, VAR_1, VAR_2, 1); }