static void send_framebuffer_update_hextile(VncState *vs, int x, int y, int w, int h)

{

    int i, j;

    int has_fg, has_bg;

    uint8_t *last_fg, *last_bg;



    vnc_framebuffer_update(vs, x, y, w, h, 5);



    last_fg = (uint8_t *) malloc(vs->depth);

    last_bg = (uint8_t *) malloc(vs->depth);

    has_fg = has_bg = 0;

    for (j = y; j < (y + h); j += 16) {

	for (i = x; i < (x + w); i += 16) {

            vs->send_hextile_tile(vs, i, j,

                                  MIN(16, x + w - i), MIN(16, y + h - j),

                                  last_bg, last_fg, &has_bg, &has_fg);

	}

    }

    free(last_fg);

    free(last_bg);



}

static void send_framebuffer_update_hextile(VncState *vs, int x, int y, int w, int h)

{

    int i, j;

    int has_fg, has_bg;

    uint8_t *last_fg, *last_bg;



    vnc_framebuffer_update(vs, x, y, w, h, 5);



    last_fg = (uint8_t *) malloc(vs->depth);

    last_bg = (uint8_t *) malloc(vs->depth);

    has_fg = has_bg = 0;

    for (j = y; j < (y + h); j += 16) {

	for (i = x; i < (x + w); i += 16) {

            vs->send_hextile_tile(vs, i, j,

                                  MIN(16, x + w - i), MIN(16, y + h - j),

                                  last_bg, last_fg, &has_bg, &has_fg);

	}

    }

    free(last_fg);

    free(last_bg);



}

    last_fg = (uint8_t *) malloc(vs->depth);     last_bg = (uint8_t *) malloc(vs->depth);
static void FUNC_0(VncState *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4)

{

    int VAR_5, VAR_6;

    int VAR_7, VAR_8;

    uint8_t *last_fg, *last_bg;



    vnc_framebuffer_update(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, 5);



    last_fg = (uint8_t *) malloc(VAR_0->depth);

    last_bg = (uint8_t *) malloc(VAR_0->depth);

    VAR_7 = VAR_8 = 0;

    for (VAR_6 = VAR_2; VAR_6 < (VAR_2 + VAR_4); VAR_6 += 16) {

	for (VAR_5 = VAR_1; VAR_5 < (VAR_1 + VAR_3); VAR_5 += 16) {

            VAR_0->send_hextile_tile(VAR_0, VAR_5, VAR_6,

                                  MIN(16, VAR_1 + VAR_3 - VAR_5), MIN(16, VAR_2 + VAR_4 - VAR_6),

                                  last_bg, last_fg, &VAR_8, &VAR_7);

	}

    }

    free(last_fg);

    free(last_bg);



}

static void FUNC_0(VncState *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4)
{ int VAR_5, VAR_6; int VAR_7, VAR_8; uint8_t *last_fg, *last_bg; vnc_framebuffer_update(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, 5); last_fg = (uint8_t *) malloc(VAR_0->depth); last_bg = (uint8_t *) malloc(VAR_0->depth); VAR_7 = VAR_8 = 0; for (VAR_6 = VAR_2; VAR_6 < (VAR_2 + VAR_4); VAR_6 += 16) { for (VAR_5 = VAR_1; VAR_5 < (VAR_1 + VAR_3); VAR_5 += 16) { VAR_0->send_hextile_tile(VAR_0, VAR_5, VAR_6,
MIN(16, VAR_1 + VAR_3 - VAR_5), MIN(16, VAR_2 + VAR_4 - VAR_6),
last_bg, last_fg, &VAR_8, &VAR_7); } } free(last_fg); free(last_bg); }