static void set_pixel_format(VncState *vs,
                             int bits_per_pixel, int depth,
                             int big_endian_flag, int true_color_flag,
                             int red_max, int green_max, int blue_max,
                             int red_shift, int green_shift, int blue_shift)
{
    if (!true_color_flag) {
    vs->client_pf.rmax = red_max;
    vs->client_pf.rbits = hweight_long(red_max);
    vs->client_pf.rshift = red_shift;
    vs->client_pf.rmask = red_max << red_shift;
    vs->client_pf.gmax = green_max;
    vs->client_pf.gbits = hweight_long(green_max);
    vs->client_pf.gshift = green_shift;
    vs->client_pf.gmask = green_max << green_shift;
    vs->client_pf.bmax = blue_max;
    vs->client_pf.bbits = hweight_long(blue_max);
    vs->client_pf.bshift = blue_shift;
    vs->client_pf.bmask = blue_max << blue_shift;
    vs->client_pf.bits_per_pixel = bits_per_pixel;
    vs->client_pf.bytes_per_pixel = bits_per_pixel / 8;
    vs->client_pf.depth = bits_per_pixel == 32 ? 24 : bits_per_pixel;
    vs->client_be = big_endian_flag;
    set_pixel_conversion(vs);
    graphic_hw_invalidate(NULL);
    graphic_hw_update(NULL);
static void set_pixel_format(VncState *vs,
                             int bits_per_pixel, int depth,
                             int big_endian_flag, int true_color_flag,
                             int red_max, int green_max, int blue_max,
                             int red_shift, int green_shift, int blue_shift)
{
    if (!true_color_flag) {
    vs->client_pf.rmax = red_max;
    vs->client_pf.rbits = hweight_long(red_max);
    vs->client_pf.rshift = red_shift;
    vs->client_pf.rmask = red_max << red_shift;
    vs->client_pf.gmax = green_max;
    vs->client_pf.gbits = hweight_long(green_max);
    vs->client_pf.gshift = green_shift;
    vs->client_pf.gmask = green_max << green_shift;
    vs->client_pf.bmax = blue_max;
    vs->client_pf.bbits = hweight_long(blue_max);
    vs->client_pf.bshift = blue_shift;
    vs->client_pf.bmask = blue_max << blue_shift;
    vs->client_pf.bits_per_pixel = bits_per_pixel;
    vs->client_pf.bytes_per_pixel = bits_per_pixel / 8;
    vs->client_pf.depth = bits_per_pixel == 32 ? 24 : bits_per_pixel;
    vs->client_be = big_endian_flag;
    set_pixel_conversion(vs);
    graphic_hw_invalidate(NULL);
    graphic_hw_update(NULL);
static void 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,
                             int VAR_8, int VAR_9, int VAR_10)
{
    if (!VAR_4) {
    VAR_0->client_pf.rmax = VAR_5;
    VAR_0->client_pf.rbits = hweight_long(VAR_5);
    VAR_0->client_pf.rshift = VAR_8;
    VAR_0->client_pf.rmask = VAR_5 << VAR_8;
    VAR_0->client_pf.gmax = VAR_6;
    VAR_0->client_pf.gbits = hweight_long(VAR_6);
    VAR_0->client_pf.gshift = VAR_9;
    VAR_0->client_pf.gmask = VAR_6 << VAR_9;
    VAR_0->client_pf.bmax = VAR_7;
    VAR_0->client_pf.bbits = hweight_long(VAR_7);
    VAR_0->client_pf.bshift = VAR_10;
    VAR_0->client_pf.bmask = VAR_7 << VAR_10;
    VAR_0->client_pf.VAR_1 = VAR_1;
    VAR_0->client_pf.bytes_per_pixel = VAR_1 / 8;
    VAR_0->client_pf.VAR_2 = VAR_1 == 32 ? 24 : VAR_1;
    VAR_0->client_be = VAR_3;
    set_pixel_conversion(VAR_0);
    graphic_hw_invalidate(NULL);
    graphic_hw_update(NULL);
static void 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,
int VAR_8, int VAR_9, int VAR_10)
{ if (!VAR_4) { VAR_0->client_pf.rmax = VAR_5; VAR_0->client_pf.rbits = hweight_long(VAR_5); VAR_0->client_pf.rshift = VAR_8; VAR_0->client_pf.rmask = VAR_5 << VAR_8; VAR_0->client_pf.gmax = VAR_6; VAR_0->client_pf.gbits = hweight_long(VAR_6); VAR_0->client_pf.gshift = VAR_9; VAR_0->client_pf.gmask = VAR_6 << VAR_9; VAR_0->client_pf.bmax = VAR_7; VAR_0->client_pf.bbits = hweight_long(VAR_7); VAR_0->client_pf.bshift = VAR_10; VAR_0->client_pf.bmask = VAR_7 << VAR_10; VAR_0->client_pf.VAR_1 = VAR_1; VAR_0->client_pf.bytes_per_pixel = VAR_1 / 8; VAR_0->client_pf.VAR_2 = VAR_1 == 32 ? 24 : VAR_1; VAR_0->client_be = VAR_3; set_pixel_conversion(VAR_0); graphic_hw_invalidate(NULL); graphic_hw_update(NULL);