static int xen_pt_byte_reg_read(XenPCIPassthroughState *s, XenPTReg *cfg_entry,

                                uint8_t *value, uint8_t valid_mask)

{

    XenPTRegInfo *reg = cfg_entry->reg;

    uint8_t valid_emu_mask = 0;



    /* emulate byte register */

    valid_emu_mask = reg->emu_mask & valid_mask;

    *value = XEN_PT_MERGE_VALUE(*value, cfg_entry->data, ~valid_emu_mask);



    return 0;

}

static int xen_pt_byte_reg_read(XenPCIPassthroughState *s, XenPTReg *cfg_entry,

                                uint8_t *value, uint8_t valid_mask)

{

    XenPTRegInfo *reg = cfg_entry->reg;

    uint8_t valid_emu_mask = 0;



    

    valid_emu_mask = reg->emu_mask & valid_mask;

    *value = XEN_PT_MERGE_VALUE(*value, cfg_entry->data, ~valid_emu_mask);



    return 0;

}

static int FUNC_0(XenPCIPassthroughState *VAR_0, XenPTReg *VAR_1,

                                uint8_t *VAR_2, uint8_t VAR_3)

{

    XenPTRegInfo *reg = VAR_1->reg;

    uint8_t valid_emu_mask = 0;



    

    valid_emu_mask = reg->emu_mask & VAR_3;

    *VAR_2 = XEN_PT_MERGE_VALUE(*VAR_2, VAR_1->data, ~valid_emu_mask);



    return 0;

}

static int FUNC_0(XenPCIPassthroughState *VAR_0, XenPTReg *VAR_1,
uint8_t *VAR_2, uint8_t VAR_3)
{ XenPTRegInfo *reg = VAR_1->reg; uint8_t valid_emu_mask = 0; valid_emu_mask = reg->emu_mask & VAR_3; *VAR_2 = XEN_PT_MERGE_VALUE(*VAR_2, VAR_1->data, ~valid_emu_mask); return 0; }