void uhci_port_test(struct qhc *hc, int port, uint16_t expect)

{

    void *addr = hc->base + 0x10 + 2 * port;

    uint16_t value = qpci_io_readw(hc->dev, addr);

    uint16_t mask = ~(UHCI_PORT_WRITE_CLEAR | UHCI_PORT_RSVD1);



    g_assert((value & mask) == (expect & mask));

}

void uhci_port_test(struct qhc *hc, int port, uint16_t expect)

{

    void *addr = hc->base + 0x10 + 2 * port;

    uint16_t value = qpci_io_readw(hc->dev, addr);

    uint16_t mask = ~(UHCI_PORT_WRITE_CLEAR | UHCI_PORT_RSVD1);



    g_assert((value & mask) == (expect & mask));

}

    void *addr = hc->base + 0x10 + 2 * port;     uint16_t value = qpci_io_readw(hc->dev, addr);
void FUNC_0(struct qhc *VAR_0, int VAR_1, uint16_t VAR_2)

{

    void *VAR_3 = VAR_0->base + 0x10 + 2 * VAR_1;

    uint16_t value = qpci_io_readw(VAR_0->dev, VAR_3);

    uint16_t mask = ~(UHCI_PORT_WRITE_CLEAR | UHCI_PORT_RSVD1);



    g_assert((value & mask) == (VAR_2 & mask));

}

void FUNC_0(struct qhc *VAR_0, int VAR_1, uint16_t VAR_2)
{ void *VAR_3 = VAR_0->base + 0x10 + 2 * VAR_1; uint16_t value = qpci_io_readw(VAR_0->dev, VAR_3); uint16_t mask = ~(UHCI_PORT_WRITE_CLEAR | UHCI_PORT_RSVD1); g_assert((value & mask) == (VAR_2 & mask)); }