vmxnet3_io_bar0_write(void *opaque, hwaddr addr,
                      uint64_t val, unsigned size)
{
    VMXNET3State *s = opaque;
    if (VMW_IS_MULTIREG_ADDR(addr, VMXNET3_REG_TXPROD,
                        VMXNET3_DEVICE_MAX_TX_QUEUES, VMXNET3_REG_ALIGN)) {
        int tx_queue_idx =
            VMW_MULTIREG_IDX_BY_ADDR(addr, VMXNET3_REG_TXPROD,
                                     VMXNET3_REG_ALIGN);
        assert(tx_queue_idx <= s->txq_num);
        vmxnet3_process_tx_queue(s, tx_queue_idx);
    if (VMW_IS_MULTIREG_ADDR(addr, VMXNET3_REG_IMR,
                        VMXNET3_MAX_INTRS, VMXNET3_REG_ALIGN)) {
        int l = VMW_MULTIREG_IDX_BY_ADDR(addr, VMXNET3_REG_IMR,
                                         VMXNET3_REG_ALIGN);
        VMW_CBPRN("Interrupt mask for line %d written: 0x%" PRIx64, l, val);
        vmxnet3_on_interrupt_mask_changed(s, l, val);
    if (VMW_IS_MULTIREG_ADDR(addr, VMXNET3_REG_RXPROD,
                        VMXNET3_DEVICE_MAX_RX_QUEUES, VMXNET3_REG_ALIGN) ||
       VMW_IS_MULTIREG_ADDR(addr, VMXNET3_REG_RXPROD2,
                        VMXNET3_DEVICE_MAX_RX_QUEUES, VMXNET3_REG_ALIGN)) {
    VMW_WRPRN("BAR0 unknown write [%" PRIx64 "] = %" PRIx64 ", size %d",
              (uint64_t) addr, val, size);
vmxnet3_io_bar0_write(void *opaque, hwaddr addr,
                      uint64_t val, unsigned size)
{
    VMXNET3State *s = opaque;
    if (VMW_IS_MULTIREG_ADDR(addr, VMXNET3_REG_TXPROD,
                        VMXNET3_DEVICE_MAX_TX_QUEUES, VMXNET3_REG_ALIGN)) {
        int tx_queue_idx =
            VMW_MULTIREG_IDX_BY_ADDR(addr, VMXNET3_REG_TXPROD,
                                     VMXNET3_REG_ALIGN);
        assert(tx_queue_idx <= s->txq_num);
        vmxnet3_process_tx_queue(s, tx_queue_idx);
    if (VMW_IS_MULTIREG_ADDR(addr, VMXNET3_REG_IMR,
                        VMXNET3_MAX_INTRS, VMXNET3_REG_ALIGN)) {
        int l = VMW_MULTIREG_IDX_BY_ADDR(addr, VMXNET3_REG_IMR,
                                         VMXNET3_REG_ALIGN);
        VMW_CBPRN("Interrupt mask for line %d written: 0x%" PRIx64, l, val);
        vmxnet3_on_interrupt_mask_changed(s, l, val);
    if (VMW_IS_MULTIREG_ADDR(addr, VMXNET3_REG_RXPROD,
                        VMXNET3_DEVICE_MAX_RX_QUEUES, VMXNET3_REG_ALIGN) ||
       VMW_IS_MULTIREG_ADDR(addr, VMXNET3_REG_RXPROD2,
                        VMXNET3_DEVICE_MAX_RX_QUEUES, VMXNET3_REG_ALIGN)) {
    VMW_WRPRN("BAR0 unknown write [%" PRIx64 "] = %" PRIx64 ", size %d",
              (uint64_t) addr, val, size);
FUNC_0(void *VAR_0, hwaddr VAR_1,
                      uint64_t VAR_2, unsigned VAR_3)
{
    VMXNET3State *s = VAR_0;
    if (VMW_IS_MULTIREG_ADDR(VAR_1, VMXNET3_REG_TXPROD,
                        VMXNET3_DEVICE_MAX_TX_QUEUES, VMXNET3_REG_ALIGN)) {
        int VAR_4 =
            VMW_MULTIREG_IDX_BY_ADDR(VAR_1, VMXNET3_REG_TXPROD,
                                     VMXNET3_REG_ALIGN);
        assert(VAR_4 <= s->txq_num);
        vmxnet3_process_tx_queue(s, VAR_4);
    if (VMW_IS_MULTIREG_ADDR(VAR_1, VMXNET3_REG_IMR,
                        VMXNET3_MAX_INTRS, VMXNET3_REG_ALIGN)) {
        int VAR_5 = VMW_MULTIREG_IDX_BY_ADDR(VAR_1, VMXNET3_REG_IMR,
                                         VMXNET3_REG_ALIGN);
        VMW_CBPRN("Interrupt mask for line %d written: 0x%" PRIx64, VAR_5, VAR_2);
        vmxnet3_on_interrupt_mask_changed(s, VAR_5, VAR_2);
    if (VMW_IS_MULTIREG_ADDR(VAR_1, VMXNET3_REG_RXPROD,
                        VMXNET3_DEVICE_MAX_RX_QUEUES, VMXNET3_REG_ALIGN) ||
       VMW_IS_MULTIREG_ADDR(VAR_1, VMXNET3_REG_RXPROD2,
                        VMXNET3_DEVICE_MAX_RX_QUEUES, VMXNET3_REG_ALIGN)) {
    VMW_WRPRN("BAR0 unknown write [%" PRIx64 "] = %" PRIx64 ", VAR_3 %d",
              (uint64_t) VAR_1, VAR_2, VAR_3);
FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{ VMXNET3State *s = VAR_0; if (VMW_IS_MULTIREG_ADDR(VAR_1, VMXNET3_REG_TXPROD,
VMXNET3_DEVICE_MAX_TX_QUEUES, VMXNET3_REG_ALIGN)) { int VAR_4 =
VMW_MULTIREG_IDX_BY_ADDR(VAR_1, VMXNET3_REG_TXPROD,
VMXNET3_REG_ALIGN); assert(VAR_4 <= s->txq_num); vmxnet3_process_tx_queue(s, VAR_4); if (VMW_IS_MULTIREG_ADDR(VAR_1, VMXNET3_REG_IMR,
VMXNET3_MAX_INTRS, VMXNET3_REG_ALIGN)) { int VAR_5 = VMW_MULTIREG_IDX_BY_ADDR(VAR_1, VMXNET3_REG_IMR,
VMXNET3_REG_ALIGN); VMW_CBPRN("Interrupt mask for line %d written: 0x%" PRIx64, VAR_5, VAR_2); vmxnet3_on_interrupt_mask_changed(s, VAR_5, VAR_2); if (VMW_IS_MULTIREG_ADDR(VAR_1, VMXNET3_REG_RXPROD,
VMXNET3_DEVICE_MAX_RX_QUEUES, VMXNET3_REG_ALIGN) ||
VMW_IS_MULTIREG_ADDR(VAR_1, VMXNET3_REG_RXPROD2,
VMXNET3_DEVICE_MAX_RX_QUEUES, VMXNET3_REG_ALIGN)) { VMW_WRPRN("BAR0 unknown write [%" PRIx64 "] = %" PRIx64 ", VAR_3 %d",
(uint64_t) VAR_1, VAR_2, VAR_3);