static void vnc_disconnect_finish(VncState *vs)
{
    vnc_qmp_event(vs, QEVENT_VNC_DISCONNECTED);
    buffer_free(&vs->input);
    buffer_free(&vs->output);
    qobject_decref(vs->info);
#ifdef CONFIG_VNC_TLS
    vnc_tls_client_cleanup(vs);
#endif /* CONFIG_VNC_TLS */
#ifdef CONFIG_VNC_SASL
    vnc_sasl_client_cleanup(vs);
#endif /* CONFIG_VNC_SASL */
    audio_del(vs);
    QTAILQ_REMOVE(&vs->vd->clients, vs, next);
    if (QTAILQ_EMPTY(&vs->vd->clients)) {
        dcl->idle = 1;
    }
    qemu_remove_mouse_mode_change_notifier(&vs->mouse_mode_notifier);
    vnc_remove_timer(vs->vd);
    if (vs->vd->lock_key_sync)
        qemu_remove_led_event_handler(vs->led);
    qemu_free(vs);
}
static void vnc_disconnect_finish(VncState *vs)
{
    vnc_qmp_event(vs, QEVENT_VNC_DISCONNECTED);
    buffer_free(&vs->input);
    buffer_free(&vs->output);
    qobject_decref(vs->info);
#ifdef CONFIG_VNC_TLS
    vnc_tls_client_cleanup(vs);
#endif 
#ifdef CONFIG_VNC_SASL
    vnc_sasl_client_cleanup(vs);
#endif 
    audio_del(vs);
    QTAILQ_REMOVE(&vs->vd->clients, vs, next);
    if (QTAILQ_EMPTY(&vs->vd->clients)) {
        dcl->idle = 1;
    }
    qemu_remove_mouse_mode_change_notifier(&vs->mouse_mode_notifier);
    vnc_remove_timer(vs->vd);
    if (vs->vd->lock_key_sync)
        qemu_remove_led_event_handler(vs->led);
    qemu_free(vs);
}
static void FUNC_0(VncState *VAR_0)
{
    vnc_qmp_event(VAR_0, QEVENT_VNC_DISCONNECTED);
    buffer_free(&VAR_0->input);
    buffer_free(&VAR_0->output);
    qobject_decref(VAR_0->info);
#ifdef CONFIG_VNC_TLS
    vnc_tls_client_cleanup(VAR_0);
#endif 
#ifdef CONFIG_VNC_SASL
    vnc_sasl_client_cleanup(VAR_0);
#endif 
    audio_del(VAR_0);
    QTAILQ_REMOVE(&VAR_0->vd->clients, VAR_0, next);
    if (QTAILQ_EMPTY(&VAR_0->vd->clients)) {
        dcl->idle = 1;
    }
    qemu_remove_mouse_mode_change_notifier(&VAR_0->mouse_mode_notifier);
    vnc_remove_timer(VAR_0->vd);
    if (VAR_0->vd->lock_key_sync)
        qemu_remove_led_event_handler(VAR_0->led);
    qemu_free(VAR_0);
}
static void FUNC_0(VncState *VAR_0)
{ vnc_qmp_event(VAR_0, QEVENT_VNC_DISCONNECTED); buffer_free(&VAR_0->input); buffer_free(&VAR_0->output); qobject_decref(VAR_0->info); #ifdef CONFIG_VNC_TLS
vnc_tls_client_cleanup(VAR_0); #endif
#ifdef CONFIG_VNC_SASL
vnc_sasl_client_cleanup(VAR_0); #endif
audio_del(VAR_0); QTAILQ_REMOVE(&VAR_0->vd->clients, VAR_0, next); if (QTAILQ_EMPTY(&VAR_0->vd->clients)) { dcl->idle = 1; } qemu_remove_mouse_mode_change_notifier(&VAR_0->mouse_mode_notifier); vnc_remove_timer(VAR_0->vd); if (VAR_0->vd->lock_key_sync)
qemu_remove_led_event_handler(VAR_0->led); qemu_free(VAR_0); }