static void remove_port(VirtIOSerial *vser, uint32_t port_id)

{

    VirtIOSerialPort *port;

    unsigned int i;



    i = port_id / 32;

    vser->ports_map[i] &= ~(1U << (port_id % 32));



    port = find_port_by_id(vser, port_id);

    /*

     * This function is only called from qdev's unplug callback; if we

     * get a NULL port here, we're in trouble.

     */

    assert(port);



    /* Flush out any unconsumed buffers first */

    discard_vq_data(port->ovq, VIRTIO_DEVICE(port->vser));



    send_control_event(vser, port->id, VIRTIO_CONSOLE_PORT_REMOVE, 1);

}

static void remove_port(VirtIOSerial *vser, uint32_t port_id)

{

    VirtIOSerialPort *port;

    unsigned int i;



    i = port_id / 32;

    vser->ports_map[i] &= ~(1U << (port_id % 32));



    port = find_port_by_id(vser, port_id);

    







    assert(port);



    

    discard_vq_data(port->ovq, VIRTIO_DEVICE(port->vser));



    send_control_event(vser, port->id, VIRTIO_CONSOLE_PORT_REMOVE, 1);

}

    unsigned int i;     i = port_id / 32;     vser->ports_map[i] &= ~(1U << (port_id % 32));
static void FUNC_0(VirtIOSerial *VAR_0, uint32_t VAR_1)

{

    VirtIOSerialPort *port;

    unsigned int VAR_2;



    VAR_2 = VAR_1 / 32;

    VAR_0->ports_map[VAR_2] &= ~(1U << (VAR_1 % 32));



    port = find_port_by_id(VAR_0, VAR_1);

    







    assert(port);



    

    discard_vq_data(port->ovq, VIRTIO_DEVICE(port->VAR_0));



    send_control_event(VAR_0, port->id, VIRTIO_CONSOLE_PORT_REMOVE, 1);

}

static void FUNC_0(VirtIOSerial *VAR_0, uint32_t VAR_1)
{ VirtIOSerialPort *port; unsigned int VAR_2; VAR_2 = VAR_1 / 32; VAR_0->ports_map[VAR_2] &= ~(1U << (VAR_1 % 32)); port = find_port_by_id(VAR_0, VAR_1); assert(port); discard_vq_data(port->ovq, VIRTIO_DEVICE(port->VAR_0)); send_control_event(VAR_0, port->id, VIRTIO_CONSOLE_PORT_REMOVE, 1); }