static int send_sub_rect_jpeg(VncState *vs, int x, int y, int w, int h,

                              int bg, int fg, int colors,

                              VncPalette *palette)

{

    int ret;



    if (colors == 0) {

        if (tight_detect_smooth_image(vs, w, h)) {

            int quality = tight_conf[vs->tight.quality].jpeg_quality;



            ret = send_jpeg_rect(vs, x, y, w, h, quality);


            ret = send_full_color_rect(vs, x, y, w, h);

        }

    } else if (colors == 1) {

        ret = send_solid_rect(vs);

    } else if (colors == 2) {

        ret = send_mono_rect(vs, x, y, w, h, bg, fg);

    } else if (colors <= 256) {

        if (colors > 96 &&

            tight_detect_smooth_image(vs, w, h)) {

            int quality = tight_conf[vs->tight.quality].jpeg_quality;



            ret = send_jpeg_rect(vs, x, y, w, h, quality);


            ret = send_palette_rect(vs, x, y, w, h, palette);

        }



    }

    return ret;

}
static int send_sub_rect_jpeg(VncState *vs, int x, int y, int w, int h,

                              int bg, int fg, int colors,

                              VncPalette *palette)

{

    int ret;



    if (colors == 0) {

        if (tight_detect_smooth_image(vs, w, h)) {

            int quality = tight_conf[vs->tight.quality].jpeg_quality;



            ret = send_jpeg_rect(vs, x, y, w, h, quality);


            ret = send_full_color_rect(vs, x, y, w, h);

        }

    } else if (colors == 1) {

        ret = send_solid_rect(vs);

    } else if (colors == 2) {

        ret = send_mono_rect(vs, x, y, w, h, bg, fg);

    } else if (colors <= 256) {

        if (colors > 96 &&

            tight_detect_smooth_image(vs, w, h)) {

            int quality = tight_conf[vs->tight.quality].jpeg_quality;



            ret = send_jpeg_rect(vs, x, y, w, h, quality);


            ret = send_palette_rect(vs, x, y, w, h, palette);

        }



    }

    return ret;

}
static int FUNC_0(VncState *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4,

                              int VAR_5, int VAR_6, int VAR_7,

                              VncPalette *VAR_8)

{

    int VAR_9;



    if (VAR_7 == 0) {

        if (tight_detect_smooth_image(VAR_0, VAR_3, VAR_4)) {

            int VAR_11 = tight_conf[VAR_0->tight.VAR_11].jpeg_quality;



            VAR_9 = send_jpeg_rect(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_11);


            VAR_9 = send_full_color_rect(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4);

        }

    } else if (VAR_7 == 1) {

        VAR_9 = send_solid_rect(VAR_0);

    } else if (VAR_7 == 2) {

        VAR_9 = send_mono_rect(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6);

    } else if (VAR_7 <= 256) {

        if (VAR_7 > 96 &&

            tight_detect_smooth_image(VAR_0, VAR_3, VAR_4)) {

            int VAR_11 = tight_conf[VAR_0->tight.VAR_11].jpeg_quality;



            VAR_9 = send_jpeg_rect(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_11);


            VAR_9 = send_palette_rect(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_8);

        }



    }

    return VAR_9;

}
static int FUNC_0(VncState *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4,
int VAR_5, int VAR_6, int VAR_7,
VncPalette *VAR_8)
{ int VAR_9; if (VAR_7 == 0) { if (tight_detect_smooth_image(VAR_0, VAR_3, VAR_4)) { int VAR_11 = tight_conf[VAR_0->tight.VAR_11].jpeg_quality; VAR_9 = send_jpeg_rect(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_11); VAR_9 = send_full_color_rect(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4); } } else if (VAR_7 == 1) { VAR_9 = send_solid_rect(VAR_0); } else if (VAR_7 == 2) { VAR_9 = send_mono_rect(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6); } else if (VAR_7 <= 256) { if (VAR_7 > 96 &&
tight_detect_smooth_image(VAR_0, VAR_3, VAR_4)) { int VAR_11 = tight_conf[VAR_0->tight.VAR_11].jpeg_quality; VAR_9 = send_jpeg_rect(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_11); VAR_9 = send_palette_rect(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_8); } } return VAR_9; }