static void vnc_client_read(VncState *vs)

{

    ssize_t ret;



#ifdef CONFIG_VNC_SASL

    if (vs->sasl.conn && vs->sasl.runSSF)

        ret = vnc_client_read_sasl(vs);

    else

#endif /* CONFIG_VNC_SASL */

        ret = vnc_client_read_plain(vs);

    if (!ret) {

        if (vs->disconnecting) {

            vnc_disconnect_finish(vs);

        }

        return;

    }



    while (vs->read_handler && vs->input.offset >= vs->read_handler_expect) {

        size_t len = vs->read_handler_expect;

        int ret;



        ret = vs->read_handler(vs, vs->input.buffer, len);

        if (vs->disconnecting) {

            vnc_disconnect_finish(vs);

            return;

        }



        if (!ret) {

            buffer_advance(&vs->input, len);

        } else {

            vs->read_handler_expect = ret;

        }

    }

}

static void vnc_client_read(VncState *vs)

{

    ssize_t ret;



#ifdef CONFIG_VNC_SASL

    if (vs->sasl.conn && vs->sasl.runSSF)

        ret = vnc_client_read_sasl(vs);

    else

#endif 

        ret = vnc_client_read_plain(vs);

    if (!ret) {

        if (vs->disconnecting) {

            vnc_disconnect_finish(vs);

        }

        return;

    }



    while (vs->read_handler && vs->input.offset >= vs->read_handler_expect) {

        size_t len = vs->read_handler_expect;

        int ret;



        ret = vs->read_handler(vs, vs->input.buffer, len);

        if (vs->disconnecting) {

            vnc_disconnect_finish(vs);

            return;

        }



        if (!ret) {

            buffer_advance(&vs->input, len);

        } else {

            vs->read_handler_expect = ret;

        }

    }

}

static void vnc_client_read(VncState *vs)
static void FUNC_0(VncState *VAR_0)

{

    ssize_t VAR_1;



#ifdef CONFIG_VNC_SASL

    if (VAR_0->sasl.conn && VAR_0->sasl.runSSF)

        VAR_1 = vnc_client_read_sasl(VAR_0);

    else

#endif 

        VAR_1 = vnc_client_read_plain(VAR_0);

    if (!VAR_1) {

        if (VAR_0->disconnecting) {

            vnc_disconnect_finish(VAR_0);

        }

        return;

    }



    while (VAR_0->read_handler && VAR_0->input.offset >= VAR_0->read_handler_expect) {

        size_t len = VAR_0->read_handler_expect;

        int VAR_1;



        VAR_1 = VAR_0->read_handler(VAR_0, VAR_0->input.buffer, len);

        if (VAR_0->disconnecting) {

            vnc_disconnect_finish(VAR_0);

            return;

        }



        if (!VAR_1) {

            buffer_advance(&VAR_0->input, len);

        } else {

            VAR_0->read_handler_expect = VAR_1;

        }

    }

}

static void FUNC_0(VncState *VAR_0)
{ ssize_t VAR_1; #ifdef CONFIG_VNC_SASL
if (VAR_0->sasl.conn && VAR_0->sasl.runSSF)
VAR_1 = vnc_client_read_sasl(VAR_0); else
#endif
VAR_1 = vnc_client_read_plain(VAR_0); if (!VAR_1) { if (VAR_0->disconnecting) { vnc_disconnect_finish(VAR_0); } return; } while (VAR_0->read_handler && VAR_0->input.offset >= VAR_0->read_handler_expect) { size_t len = VAR_0->read_handler_expect; int VAR_1; VAR_1 = VAR_0->read_handler(VAR_0, VAR_0->input.buffer, len); if (VAR_0->disconnecting) { vnc_disconnect_finish(VAR_0); return; } if (!VAR_1) { buffer_advance(&VAR_0->input, len); } else { VAR_0->read_handler_expect = VAR_1; } } }