Generated Code: swapcheck_xproto.c

chris at demorecorder.com chris at demorecorder.com
Thu Feb 26 00:12:34 PST 2015


/*
 * This file generated automatically from xproto.xml by gen_swap_check.py.
 * Edit at your peril.
 */

#include "swapcheck_xproto.h"
#include <stdlib.h>
#include <assert.h>
#include <stddef.h>  /* for offsetof() */
#include <errno.h>

#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
#define GEN_XCB_CONVERT_SELECTION 24
#define GEN_XCB_SEND_EVENT 25
#define GEN_XCB_GRAB_POINTER 26
#define GEN_XCB_UNGRAB_POINTER 27
#define GEN_XCB_GET_PROPERTY 20
#define GEN_XCB_LIST_PROPERTIES 21
#define GEN_XCB_SET_SELECTION_OWNER 22
#define GEN_XCB_GET_SELECTION_OWNER 23
#define GEN_XCB_GRAB_BUTTON 28
#define GEN_XCB_UNGRAB_BUTTON 29
#define GEN_XCB_DESTROY_WINDOW 4
#define GEN_XCB_MAP_WINDOW 8
#define GEN_XCB_GET_MODIFIER_MAPPING 119
#define GEN_XCB_NO_OPERATION 127
#define GEN_XCB_SET_MODIFIER_MAPPING 118
#define GEN_XCB_SET_CLIP_RECTANGLES 59
#define GEN_XCB_SET_DASHES 58
#define GEN_XCB_CREATE_GC 55
#define GEN_XCB_FREE_PIXMAP 54
#define GEN_XCB_COPY_GC 57
#define GEN_XCB_CHANGE_GC 56
#define GEN_XCB_SET_FONT_PATH 51
#define GEN_XCB_LIST_FONTS_WITH_INFO 50
#define GEN_XCB_CREATE_PIXMAP 53
#define GEN_XCB_GET_FONT_PATH 52
#define GEN_XCB_FORCE_SCREEN_SAVER 115
#define GEN_XCB_ROTATE_PROPERTIES 114
#define GEN_XCB_FREE_COLORS 88
#define GEN_XCB_STORE_COLORS 89
#define GEN_XCB_SET_ACCESS_CONTROL 111
#define GEN_XCB_LIST_HOSTS 110
#define GEN_XCB_KILL_CLIENT 113
#define GEN_XCB_SET_CLOSE_DOWN_MODE 112
#define GEN_XCB_UNINSTALL_COLORMAP 82
#define GEN_XCB_LIST_INSTALLED_COLORMAPS 83
#define GEN_XCB_COPY_COLORMAP_AND_FREE 80
#define GEN_XCB_INSTALL_COLORMAP 81
#define GEN_XCB_ALLOC_COLOR_CELLS 86
#define GEN_XCB_ALLOC_COLOR_PLANES 87
#define GEN_XCB_ALLOC_COLOR 84
#define GEN_XCB_ALLOC_NAMED_COLOR 85
#define GEN_XCB_GET_WINDOW_ATTRIBUTES 3
#define GEN_XCB_REPARENT_WINDOW 7
#define GEN_XCB_GET_SCREEN_SAVER 108
#define GEN_XCB_CHANGE_HOSTS 109
#define GEN_XCB_CHANGE_KEYBOARD_CONTROL 102
#define GEN_XCB_GET_KEYBOARD_CONTROL 103
#define GEN_XCB_CHANGE_KEYBOARD_MAPPING 100
#define GEN_XCB_GET_KEYBOARD_MAPPING 101
#define GEN_XCB_GET_POINTER_CONTROL 106
#define GEN_XCB_SET_SCREEN_SAVER 107
#define GEN_XCB_BELL 104
#define GEN_XCB_CHANGE_POINTER_CONTROL 105
#define GEN_XCB_GET_MOTION_EVENTS 39
#define GEN_XCB_QUERY_POINTER 38
#define GEN_XCB_GRAB_KEY 33
#define GEN_XCB_UNGRAB_KEYBOARD 32
#define GEN_XCB_GRAB_KEYBOARD 31
#define GEN_XCB_CHANGE_ACTIVE_POINTER_GRAB 30
#define GEN_XCB_UNGRAB_SERVER 37
#define GEN_XCB_GRAB_SERVER 36
#define GEN_XCB_ALLOW_EVENTS 35
#define GEN_XCB_UNGRAB_KEY 34
#define GEN_XCB_FREE_GC 60
#define GEN_XCB_CLEAR_AREA 61
#define GEN_XCB_COPY_AREA 62
#define GEN_XCB_COPY_PLANE 63
#define GEN_XCB_POLY_POINT 64
#define GEN_XCB_POLY_LINE 65
#define GEN_XCB_POLY_SEGMENT 66
#define GEN_XCB_POLY_RECTANGLE 67
#define GEN_XCB_POLY_ARC 68
#define GEN_XCB_FILL_POLY 69
#define GEN_XCB_CHANGE_WINDOW_ATTRIBUTES 2
#define GEN_XCB_CHANGE_SAVE_SET 6
#define GEN_XCB_LIST_EXTENSIONS 99
#define GEN_XCB_QUERY_EXTENSION 98
#define GEN_XCB_QUERY_COLORS 91
#define GEN_XCB_STORE_NAMED_COLOR 90
#define GEN_XCB_CREATE_CURSOR 93
#define GEN_XCB_LOOKUP_COLOR 92
#define GEN_XCB_FREE_CURSOR 95
#define GEN_XCB_CREATE_GLYPH_CURSOR 94
#define GEN_XCB_QUERY_BEST_SIZE 97
#define GEN_XCB_RECOLOR_CURSOR 96
#define GEN_XCB_UNMAP_SUBWINDOWS 11
#define GEN_XCB_UNMAP_WINDOW 10
#define GEN_XCB_CIRCULATE_WINDOW 13
#define GEN_XCB_CONFIGURE_WINDOW 12
#define GEN_XCB_QUERY_TREE 15
#define GEN_XCB_GET_GEOMETRY 14
#define GEN_XCB_GET_ATOM_NAME 17
#define GEN_XCB_INTERN_ATOM 16
#define GEN_XCB_DELETE_PROPERTY 19
#define GEN_XCB_CHANGE_PROPERTY 18
#define GEN_XCB_GET_POINTER_MAPPING 117
#define GEN_XCB_SET_POINTER_MAPPING 116
#define GEN_XCB_QUERY_TEXT_EXTENTS 48
#define GEN_XCB_LIST_FONTS 49
#define GEN_XCB_CLOSE_FONT 46
#define GEN_XCB_QUERY_FONT 47
#define GEN_XCB_QUERY_KEYMAP 44
#define GEN_XCB_OPEN_FONT 45
#define GEN_XCB_SET_INPUT_FOCUS 42
#define GEN_XCB_GET_INPUT_FOCUS 43
#define GEN_XCB_TRANSLATE_COORDINATES 40
#define GEN_XCB_WARP_POINTER 41
#define GEN_XCB_CREATE_WINDOW 1
#define GEN_XCB_DESTROY_SUBWINDOWS 5
#define GEN_XCB_MAP_SUBWINDOWS 9
#define GEN_XCB_IMAGE_TEXT_16 77
#define GEN_XCB_IMAGE_TEXT_8 76
#define GEN_XCB_POLY_TEXT_16 75
#define GEN_XCB_POLY_TEXT_8 74
#define GEN_XCB_GET_IMAGE 73
#define GEN_XCB_PUT_IMAGE 72
#define GEN_XCB_POLY_FILL_ARC 71
#define GEN_XCB_POLY_FILL_RECTANGLE 70
#define GEN_XCB_FREE_COLORMAP 79
#define GEN_XCB_CREATE_COLORMAP 78

int
xcb_CHAR2B_SwapToClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), byte1, True, True, False, None, False
    p += 1;

    //('uint8_t',), byte2, True, True, False, None, False
    p += 1;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CHAR2B_SwapFromClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), byte1, True, True, False, None, False
    p += 1;

    //('uint8_t',), byte2, True, True, False, None, False
    p += 1;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CHAR2B_Check(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), byte1, True, True, False, None, False
    p += 1;

    //('uint8_t',), byte2, True, True, False, None, False
    p += 1;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_POINT_SwapToClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_POINT_SwapFromClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_POINT_Check(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('int16_t',), x, True, True, False, None, False
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_RECTANGLE_SwapToClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_RECTANGLE_SwapFromClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_RECTANGLE_Check(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('int16_t',), x, True, True, False, None, False
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ARC_SwapToClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), angle1, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), angle2, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ARC_SwapFromClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), angle1, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), angle2, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ARC_Check(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('int16_t',), x, True, True, False, None, False
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    p += 2;

    //('int16_t',), angle1, True, True, False, None, False
    p += 2;

    //('int16_t',), angle2, True, True, False, None, False
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FORMAT_SwapToClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), depth, True, True, False, None, False
    p += 1;

    //('uint8_t',), bits_per_pixel, True, True, False, None, False
    p += 1;

    //('uint8_t',), scanline_pad, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 5;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FORMAT_SwapFromClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), depth, True, True, False, None, False
    p += 1;

    //('uint8_t',), bits_per_pixel, True, True, False, None, False
    p += 1;

    //('uint8_t',), scanline_pad, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 5;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FORMAT_Check(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), depth, True, True, False, None, False
    p += 1;

    //('uint8_t',), bits_per_pixel, True, True, False, None, False
    p += 1;

    //('uint8_t',), scanline_pad, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 5;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_visual_class {
    XCB_VISUAL_CLASS_GRAYSCALE = 1,
    XCB_VISUAL_CLASS_STATICGRAY = 0,
    XCB_VISUAL_CLASS_PSEUDOCOLOR = 3,
    XCB_VISUAL_CLASS_STATICCOLOR = 2,
    XCB_VISUAL_CLASS_DIRECTCOLOR = 5,
    XCB_VISUAL_CLASS_TRUECOLOR = 4,
} xcb_visual_class_t;

int
xcb_VISUALTYPE_SwapToClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('xcb', 'VISUALID'), visual_id, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint8_t',), class, True, True, False, VisualClass, False
    p += 1;

    //('uint8_t',), bits_per_rgb_value, True, True, False, None, False
    p += 1;

    //('uint16_t',), colormap_entries, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint32_t',), red_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), green_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), blue_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 4;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_VISUALTYPE_SwapFromClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('xcb', 'VISUALID'), visual_id, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint8_t',), class, True, True, False, VisualClass, False
    p += 1;

    //('uint8_t',), bits_per_rgb_value, True, True, False, None, False
    p += 1;

    //('uint16_t',), colormap_entries, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint32_t',), red_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), green_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), blue_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 4;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_VISUALTYPE_Check(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('xcb', 'VISUALID'), visual_id, True, True, False, None, False
    p += 4;

    //('uint8_t',), class, True, True, False, VisualClass, False
    p += 1;

    //('uint8_t',), bits_per_rgb_value, True, True, False, None, False
    p += 1;

    //('uint16_t',), colormap_entries, True, True, False, None, False
    p += 2;

    //('uint32_t',), red_mask, True, True, False, None, False
    p += 4;

    //('uint32_t',), green_mask, True, True, False, None, False
    p += 4;

    //('uint32_t',), blue_mask, True, True, False, None, False
    p += 4;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 4;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_DEPTH_SwapToClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), depth, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), visuals_len, True, True, False, None, False
    uint16_t fieldvalue_visuals_len;
    fieldvalue_visuals_len = *(uint16_t*)p;
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 4;

    //('xcb', 'VISUALTYPE'), visuals, True, True, False, None, False
    {
        unsigned int i_visuals_len;
        for(i_visuals_len = 0; i_visuals_len < fieldvalue_visuals_len; i_visuals_len++)
        {
            if(xcb_VISUALTYPE_SwapToClient(p, afterEnd, afterStruct) != Success)
			return BadLength;
            p = (uint8_t*)(*afterStruct);
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_DEPTH_SwapFromClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), depth, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), visuals_len, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    uint16_t fieldvalue_visuals_len;
    fieldvalue_visuals_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 4;

    //('xcb', 'VISUALTYPE'), visuals, True, True, False, None, False
    {
        unsigned int i_visuals_len;
        for(i_visuals_len = 0; i_visuals_len < fieldvalue_visuals_len; i_visuals_len++)
        {
            if(xcb_VISUALTYPE_SwapFromClient(p, afterEnd, afterStruct) != Success)
			return BadLength;
            p = (uint8_t*)(*afterStruct);
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_DEPTH_Check(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), depth, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), visuals_len, True, True, False, None, False
    uint16_t fieldvalue_visuals_len;
    fieldvalue_visuals_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 4;

    //('xcb', 'VISUALTYPE'), visuals, True, True, False, None, False
    {
        unsigned int i_visuals_len;
        for(i_visuals_len = 0; i_visuals_len < fieldvalue_visuals_len; i_visuals_len++)
        {
            if(xcb_VISUALTYPE_Check(p, afterEnd, afterStruct) != Success)
			return BadLength;
            p = (uint8_t*)(*afterStruct);
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_event_mask {
    XCB_EVENT_MASK_EXPOSURE = 32768,
    XCB_EVENT_MASK_PROPERTYCHANGE = 4194304,
    XCB_EVENT_MASK_STRUCTURENOTIFY = 131072,
    XCB_EVENT_MASK_RESIZEREDIRECT = 262144,
    XCB_EVENT_MASK_POINTERMOTION = 64,
    XCB_EVENT_MASK_VISIBILITYCHANGE = 65536,
    XCB_EVENT_MASK_BUTTON1MOTION = 256,
    XCB_EVENT_MASK_BUTTONMOTION = 8192,
    XCB_EVENT_MASK_OWNERGRABBUTTON = 16777216,
    XCB_EVENT_MASK_FOCUSCHANGE = 2097152,
    XCB_EVENT_MASK_SUBSTRUCTUREREDIRECT = 1048576,
    XCB_EVENT_MASK_KEYPRESS = 1,
    XCB_EVENT_MASK_NOEVENT = 0,
    XCB_EVENT_MASK_KEYRELEASE = 2,
    XCB_EVENT_MASK_BUTTONPRESS = 4,
    XCB_EVENT_MASK_BUTTONRELEASE = 8,
    XCB_EVENT_MASK_KEYMAPSTATE = 16384,
    XCB_EVENT_MASK_BUTTON5MOTION = 4096,
    XCB_EVENT_MASK_COLORMAPCHANGE = 8388608,
    XCB_EVENT_MASK_SUBSTRUCTURENOTIFY = 524288,
    XCB_EVENT_MASK_POINTERMOTIONHINT = 128,
    XCB_EVENT_MASK_BUTTON3MOTION = 1024,
    XCB_EVENT_MASK_ENTERWINDOW = 16,
    XCB_EVENT_MASK_LEAVEWINDOW = 32,
    XCB_EVENT_MASK_BUTTON4MOTION = 2048,
    XCB_EVENT_MASK_BUTTON2MOTION = 512,
} xcb_event_mask_t;

typedef enum xcb_backing_store {
    XCB_BACKING_STORE_WHENMAPPED = 1,
    XCB_BACKING_STORE_NOTUSEFUL = 0,
    XCB_BACKING_STORE_ALWAYS = 2,
} xcb_backing_store_t;

int
xcb_SCREEN_SwapToClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('xcb', 'WINDOW'), root, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'COLORMAP'), default_colormap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), white_pixel, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), black_pixel, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), current_input_masks, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), width_in_pixels, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height_in_pixels, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), width_in_millimeters, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height_in_millimeters, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), min_installed_maps, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), max_installed_maps, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'VISUALID'), root_visual, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint8_t',), backing_stores, True, True, False, BackingStore, False
    p += 1;

    //('uint8_t',), save_unders, True, True, False, None, False
    p += 1;

    //('uint8_t',), root_depth, True, True, False, None, False
    p += 1;

    //('uint8_t',), allowed_depths_len, True, True, False, None, False
    uint8_t fieldvalue_allowed_depths_len;
    fieldvalue_allowed_depths_len = *(uint8_t*)p;
    p += 1;

    //('xcb', 'DEPTH'), allowed_depths, True, True, False, None, False
    {
        unsigned int i_allowed_depths_len;
        for(i_allowed_depths_len = 0; i_allowed_depths_len < fieldvalue_allowed_depths_len; i_allowed_depths_len++)
        {
            if(xcb_DEPTH_SwapToClient(p, afterEnd, afterStruct) != Success)
			return BadLength;
            p = (uint8_t*)(*afterStruct);
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SCREEN_SwapFromClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('xcb', 'WINDOW'), root, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'COLORMAP'), default_colormap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), white_pixel, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), black_pixel, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), current_input_masks, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), width_in_pixels, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height_in_pixels, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), width_in_millimeters, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height_in_millimeters, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), min_installed_maps, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), max_installed_maps, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'VISUALID'), root_visual, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint8_t',), backing_stores, True, True, False, BackingStore, False
    p += 1;

    //('uint8_t',), save_unders, True, True, False, None, False
    p += 1;

    //('uint8_t',), root_depth, True, True, False, None, False
    p += 1;

    //('uint8_t',), allowed_depths_len, True, True, False, None, False
    uint8_t fieldvalue_allowed_depths_len;
    fieldvalue_allowed_depths_len = *(uint8_t*)p;
    p += 1;

    //('xcb', 'DEPTH'), allowed_depths, True, True, False, None, False
    {
        unsigned int i_allowed_depths_len;
        for(i_allowed_depths_len = 0; i_allowed_depths_len < fieldvalue_allowed_depths_len; i_allowed_depths_len++)
        {
            if(xcb_DEPTH_SwapFromClient(p, afterEnd, afterStruct) != Success)
			return BadLength;
            p = (uint8_t*)(*afterStruct);
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SCREEN_Check(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('xcb', 'WINDOW'), root, True, True, False, None, False
    p += 4;

    //('xcb', 'COLORMAP'), default_colormap, True, True, False, None, False
    p += 4;

    //('uint32_t',), white_pixel, True, True, False, None, False
    p += 4;

    //('uint32_t',), black_pixel, True, True, False, None, False
    p += 4;

    //('uint32_t',), current_input_masks, True, True, False, None, False
    p += 4;

    //('uint16_t',), width_in_pixels, True, True, False, None, False
    p += 2;

    //('uint16_t',), height_in_pixels, True, True, False, None, False
    p += 2;

    //('uint16_t',), width_in_millimeters, True, True, False, None, False
    p += 2;

    //('uint16_t',), height_in_millimeters, True, True, False, None, False
    p += 2;

    //('uint16_t',), min_installed_maps, True, True, False, None, False
    p += 2;

    //('uint16_t',), max_installed_maps, True, True, False, None, False
    p += 2;

    //('xcb', 'VISUALID'), root_visual, True, True, False, None, False
    p += 4;

    //('uint8_t',), backing_stores, True, True, False, BackingStore, False
    p += 1;

    //('uint8_t',), save_unders, True, True, False, None, False
    p += 1;

    //('uint8_t',), root_depth, True, True, False, None, False
    p += 1;

    //('uint8_t',), allowed_depths_len, True, True, False, None, False
    uint8_t fieldvalue_allowed_depths_len;
    fieldvalue_allowed_depths_len = *(uint8_t*)p;
    p += 1;

    //('xcb', 'DEPTH'), allowed_depths, True, True, False, None, False
    {
        unsigned int i_allowed_depths_len;
        for(i_allowed_depths_len = 0; i_allowed_depths_len < fieldvalue_allowed_depths_len; i_allowed_depths_len++)
        {
            if(xcb_DEPTH_Check(p, afterEnd, afterStruct) != Success)
			return BadLength;
            p = (uint8_t*)(*afterStruct);
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetupRequest_SwapToClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), byte_order, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), protocol_major_version, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), protocol_minor_version, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), authorization_protocol_name_len, True, True, False, None, False
    uint16_t fieldvalue_authorization_protocol_name_len;
    fieldvalue_authorization_protocol_name_len = *(uint16_t*)p;
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), authorization_protocol_data_len, True, True, False, None, False
    uint16_t fieldvalue_authorization_protocol_data_len;
    fieldvalue_authorization_protocol_data_len = *(uint16_t*)p;
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('char',), authorization_protocol_name, True, True, False, None, False
    {
        unsigned int i_authorization_protocol_name_len;
        for(i_authorization_protocol_name_len = 0; i_authorization_protocol_name_len < fieldvalue_authorization_protocol_name_len; i_authorization_protocol_name_len++)
        {
            p += 1;
        }
    }

    //('char',), authorization_protocol_data, True, True, False, None, False
    {
        unsigned int i_authorization_protocol_data_len;
        for(i_authorization_protocol_data_len = 0; i_authorization_protocol_data_len < fieldvalue_authorization_protocol_data_len; i_authorization_protocol_data_len++)
        {
            p += 1;
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetupRequest_SwapFromClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), byte_order, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), protocol_major_version, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), protocol_minor_version, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), authorization_protocol_name_len, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    uint16_t fieldvalue_authorization_protocol_name_len;
    fieldvalue_authorization_protocol_name_len = *(uint16_t*)p;
    p += 2;

    //('uint16_t',), authorization_protocol_data_len, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    uint16_t fieldvalue_authorization_protocol_data_len;
    fieldvalue_authorization_protocol_data_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('char',), authorization_protocol_name, True, True, False, None, False
    {
        unsigned int i_authorization_protocol_name_len;
        for(i_authorization_protocol_name_len = 0; i_authorization_protocol_name_len < fieldvalue_authorization_protocol_name_len; i_authorization_protocol_name_len++)
        {
            p += 1;
        }
    }

    //('char',), authorization_protocol_data, True, True, False, None, False
    {
        unsigned int i_authorization_protocol_data_len;
        for(i_authorization_protocol_data_len = 0; i_authorization_protocol_data_len < fieldvalue_authorization_protocol_data_len; i_authorization_protocol_data_len++)
        {
            p += 1;
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetupRequest_Check(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), byte_order, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), protocol_major_version, True, True, False, None, False
    p += 2;

    //('uint16_t',), protocol_minor_version, True, True, False, None, False
    p += 2;

    //('uint16_t',), authorization_protocol_name_len, True, True, False, None, False
    uint16_t fieldvalue_authorization_protocol_name_len;
    fieldvalue_authorization_protocol_name_len = *(uint16_t*)p;
    p += 2;

    //('uint16_t',), authorization_protocol_data_len, True, True, False, None, False
    uint16_t fieldvalue_authorization_protocol_data_len;
    fieldvalue_authorization_protocol_data_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('char',), authorization_protocol_name, True, True, False, None, False
    {
        unsigned int i_authorization_protocol_name_len;
        for(i_authorization_protocol_name_len = 0; i_authorization_protocol_name_len < fieldvalue_authorization_protocol_name_len; i_authorization_protocol_name_len++)
        {
            p += 1;
        }
    }

    //('char',), authorization_protocol_data, True, True, False, None, False
    {
        unsigned int i_authorization_protocol_data_len;
        for(i_authorization_protocol_data_len = 0; i_authorization_protocol_data_len < fieldvalue_authorization_protocol_data_len; i_authorization_protocol_data_len++)
        {
            p += 1;
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetupFailed_SwapToClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), status, True, True, False, None, False
    p += 1;

    //('uint8_t',), reason_len, True, True, False, None, False
    uint8_t fieldvalue_reason_len;
    fieldvalue_reason_len = *(uint8_t*)p;
    p += 1;

    //('uint16_t',), protocol_major_version, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), protocol_minor_version, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), length, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('char',), reason, True, True, False, None, False
    {
        unsigned int i_reason_len;
        for(i_reason_len = 0; i_reason_len < fieldvalue_reason_len; i_reason_len++)
        {
            p += 1;
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetupFailed_SwapFromClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), status, True, True, False, None, False
    p += 1;

    //('uint8_t',), reason_len, True, True, False, None, False
    uint8_t fieldvalue_reason_len;
    fieldvalue_reason_len = *(uint8_t*)p;
    p += 1;

    //('uint16_t',), protocol_major_version, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), protocol_minor_version, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), length, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('char',), reason, True, True, False, None, False
    {
        unsigned int i_reason_len;
        for(i_reason_len = 0; i_reason_len < fieldvalue_reason_len; i_reason_len++)
        {
            p += 1;
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetupFailed_Check(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), status, True, True, False, None, False
    p += 1;

    //('uint8_t',), reason_len, True, True, False, None, False
    uint8_t fieldvalue_reason_len;
    fieldvalue_reason_len = *(uint8_t*)p;
    p += 1;

    //('uint16_t',), protocol_major_version, True, True, False, None, False
    p += 2;

    //('uint16_t',), protocol_minor_version, True, True, False, None, False
    p += 2;

    //('uint16_t',), length, True, True, False, None, False
    p += 2;

    //('char',), reason, True, True, False, None, False
    {
        unsigned int i_reason_len;
        for(i_reason_len = 0; i_reason_len < fieldvalue_reason_len; i_reason_len++)
        {
            p += 1;
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetupAuthenticate_SwapToClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), status, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 5;

    //('uint16_t',), length, True, True, False, None, False
    uint16_t fieldvalue_length;
    fieldvalue_length = *(uint16_t*)p;
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('char',), reason, True, True, False, None, False
    {
        unsigned int i_length;
        for(i_length = 0; i_length < fieldvalue_length; i_length++)
        {
            p += 1;
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetupAuthenticate_SwapFromClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), status, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 5;

    //('uint16_t',), length, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    uint16_t fieldvalue_length;
    fieldvalue_length = *(uint16_t*)p;
    p += 2;

    //('char',), reason, True, True, False, None, False
    {
        unsigned int i_length;
        for(i_length = 0; i_length < fieldvalue_length; i_length++)
        {
            p += 1;
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetupAuthenticate_Check(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), status, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 5;

    //('uint16_t',), length, True, True, False, None, False
    uint16_t fieldvalue_length;
    fieldvalue_length = *(uint16_t*)p;
    p += 2;

    //('char',), reason, True, True, False, None, False
    {
        unsigned int i_length;
        for(i_length = 0; i_length < fieldvalue_length; i_length++)
        {
            p += 1;
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_image_order {
    XCB_IMAGE_ORDER_MSBFIRST = 1,
    XCB_IMAGE_ORDER_LSBFIRST = 0,
} xcb_image_order_t;

int
xcb_Setup_SwapToClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), status, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), protocol_major_version, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), protocol_minor_version, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), length, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint32_t',), release_number, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), resource_id_base, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), resource_id_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), motion_buffer_size, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), vendor_len, True, True, False, None, False
    uint16_t fieldvalue_vendor_len;
    fieldvalue_vendor_len = *(uint16_t*)p;
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), maximum_request_length, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), roots_len, True, True, False, None, False
    uint8_t fieldvalue_roots_len;
    fieldvalue_roots_len = *(uint8_t*)p;
    p += 1;

    //('uint8_t',), pixmap_formats_len, True, True, False, None, False
    uint8_t fieldvalue_pixmap_formats_len;
    fieldvalue_pixmap_formats_len = *(uint8_t*)p;
    p += 1;

    //('uint8_t',), image_byte_order, True, True, False, ImageOrder, False
    p += 1;

    //('uint8_t',), bitmap_format_bit_order, True, True, False, ImageOrder, False
    p += 1;

    //('uint8_t',), bitmap_format_scanline_unit, True, True, False, None, False
    p += 1;

    //('uint8_t',), bitmap_format_scanline_pad, True, True, False, None, False
    p += 1;

    //('xcb', 'KEYCODE'), min_keycode, True, True, False, None, False
    p += 1;

    //('xcb', 'KEYCODE'), max_keycode, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 4;

    //('char',), vendor, True, True, False, None, False
    {
        unsigned int i_vendor_len;
        for(i_vendor_len = 0; i_vendor_len < fieldvalue_vendor_len; i_vendor_len++)
        {
            p += 1;
        }
    }

    //('xcb', 'FORMAT'), pixmap_formats, True, True, False, None, False
    {
        unsigned int i_pixmap_formats_len;
        for(i_pixmap_formats_len = 0; i_pixmap_formats_len < fieldvalue_pixmap_formats_len; i_pixmap_formats_len++)
        {
            if(xcb_FORMAT_SwapToClient(p, afterEnd, afterStruct) != Success)
			return BadLength;
            p = (uint8_t*)(*afterStruct);
        }
    }

    //('xcb', 'SCREEN'), roots, True, True, False, None, False
    {
        unsigned int i_roots_len;
        for(i_roots_len = 0; i_roots_len < fieldvalue_roots_len; i_roots_len++)
        {
            if(xcb_SCREEN_SwapToClient(p, afterEnd, afterStruct) != Success)
			return BadLength;
            p = (uint8_t*)(*afterStruct);
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_Setup_SwapFromClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), status, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), protocol_major_version, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), protocol_minor_version, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), length, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint32_t',), release_number, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), resource_id_base, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), resource_id_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), motion_buffer_size, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), vendor_len, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    uint16_t fieldvalue_vendor_len;
    fieldvalue_vendor_len = *(uint16_t*)p;
    p += 2;

    //('uint16_t',), maximum_request_length, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), roots_len, True, True, False, None, False
    uint8_t fieldvalue_roots_len;
    fieldvalue_roots_len = *(uint8_t*)p;
    p += 1;

    //('uint8_t',), pixmap_formats_len, True, True, False, None, False
    uint8_t fieldvalue_pixmap_formats_len;
    fieldvalue_pixmap_formats_len = *(uint8_t*)p;
    p += 1;

    //('uint8_t',), image_byte_order, True, True, False, ImageOrder, False
    p += 1;

    //('uint8_t',), bitmap_format_bit_order, True, True, False, ImageOrder, False
    p += 1;

    //('uint8_t',), bitmap_format_scanline_unit, True, True, False, None, False
    p += 1;

    //('uint8_t',), bitmap_format_scanline_pad, True, True, False, None, False
    p += 1;

    //('xcb', 'KEYCODE'), min_keycode, True, True, False, None, False
    p += 1;

    //('xcb', 'KEYCODE'), max_keycode, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 4;

    //('char',), vendor, True, True, False, None, False
    {
        unsigned int i_vendor_len;
        for(i_vendor_len = 0; i_vendor_len < fieldvalue_vendor_len; i_vendor_len++)
        {
            p += 1;
        }
    }

    //('xcb', 'FORMAT'), pixmap_formats, True, True, False, None, False
    {
        unsigned int i_pixmap_formats_len;
        for(i_pixmap_formats_len = 0; i_pixmap_formats_len < fieldvalue_pixmap_formats_len; i_pixmap_formats_len++)
        {
            if(xcb_FORMAT_SwapFromClient(p, afterEnd, afterStruct) != Success)
			return BadLength;
            p = (uint8_t*)(*afterStruct);
        }
    }

    //('xcb', 'SCREEN'), roots, True, True, False, None, False
    {
        unsigned int i_roots_len;
        for(i_roots_len = 0; i_roots_len < fieldvalue_roots_len; i_roots_len++)
        {
            if(xcb_SCREEN_SwapFromClient(p, afterEnd, afterStruct) != Success)
			return BadLength;
            p = (uint8_t*)(*afterStruct);
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_Setup_Check(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), status, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), protocol_major_version, True, True, False, None, False
    p += 2;

    //('uint16_t',), protocol_minor_version, True, True, False, None, False
    p += 2;

    //('uint16_t',), length, True, True, False, None, False
    p += 2;

    //('uint32_t',), release_number, True, True, False, None, False
    p += 4;

    //('uint32_t',), resource_id_base, True, True, False, None, False
    p += 4;

    //('uint32_t',), resource_id_mask, True, True, False, None, False
    p += 4;

    //('uint32_t',), motion_buffer_size, True, True, False, None, False
    p += 4;

    //('uint16_t',), vendor_len, True, True, False, None, False
    uint16_t fieldvalue_vendor_len;
    fieldvalue_vendor_len = *(uint16_t*)p;
    p += 2;

    //('uint16_t',), maximum_request_length, True, True, False, None, False
    p += 2;

    //('uint8_t',), roots_len, True, True, False, None, False
    uint8_t fieldvalue_roots_len;
    fieldvalue_roots_len = *(uint8_t*)p;
    p += 1;

    //('uint8_t',), pixmap_formats_len, True, True, False, None, False
    uint8_t fieldvalue_pixmap_formats_len;
    fieldvalue_pixmap_formats_len = *(uint8_t*)p;
    p += 1;

    //('uint8_t',), image_byte_order, True, True, False, ImageOrder, False
    p += 1;

    //('uint8_t',), bitmap_format_bit_order, True, True, False, ImageOrder, False
    p += 1;

    //('uint8_t',), bitmap_format_scanline_unit, True, True, False, None, False
    p += 1;

    //('uint8_t',), bitmap_format_scanline_pad, True, True, False, None, False
    p += 1;

    //('xcb', 'KEYCODE'), min_keycode, True, True, False, None, False
    p += 1;

    //('xcb', 'KEYCODE'), max_keycode, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 4;

    //('char',), vendor, True, True, False, None, False
    {
        unsigned int i_vendor_len;
        for(i_vendor_len = 0; i_vendor_len < fieldvalue_vendor_len; i_vendor_len++)
        {
            p += 1;
        }
    }

    //('xcb', 'FORMAT'), pixmap_formats, True, True, False, None, False
    {
        unsigned int i_pixmap_formats_len;
        for(i_pixmap_formats_len = 0; i_pixmap_formats_len < fieldvalue_pixmap_formats_len; i_pixmap_formats_len++)
        {
            if(xcb_FORMAT_Check(p, afterEnd, afterStruct) != Success)
			return BadLength;
            p = (uint8_t*)(*afterStruct);
        }
    }

    //('xcb', 'SCREEN'), roots, True, True, False, None, False
    {
        unsigned int i_roots_len;
        for(i_roots_len = 0; i_roots_len < fieldvalue_roots_len; i_roots_len++)
        {
            if(xcb_SCREEN_Check(p, afterEnd, afterStruct) != Success)
			return BadLength;
            p = (uint8_t*)(*afterStruct);
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_mod_mask {
    XCB_MOD_MASK_ANY = 32768,
    XCB_MOD_MASK_2 = 16,
    XCB_MOD_MASK_3 = 32,
    XCB_MOD_MASK_SHIFT = 1,
    XCB_MOD_MASK_LOCK = 2,
    XCB_MOD_MASK_4 = 64,
    XCB_MOD_MASK_CONTROL = 4,
    XCB_MOD_MASK_5 = 128,
    XCB_MOD_MASK_1 = 8,
} xcb_mod_mask_t;

typedef enum xcb_key_but_mask {
    XCB_KEY_BUT_MASK_BUTTON3 = 1024,
    XCB_KEY_BUT_MASK_BUTTON5 = 4096,
    XCB_KEY_BUT_MASK_MOD2 = 16,
    XCB_KEY_BUT_MASK_MOD3 = 32,
    XCB_KEY_BUT_MASK_BUTTON4 = 2048,
    XCB_KEY_BUT_MASK_SHIFT = 1,
    XCB_KEY_BUT_MASK_LOCK = 2,
    XCB_KEY_BUT_MASK_MOD4 = 64,
    XCB_KEY_BUT_MASK_CONTROL = 4,
    XCB_KEY_BUT_MASK_MOD5 = 128,
    XCB_KEY_BUT_MASK_MOD1 = 8,
    XCB_KEY_BUT_MASK_BUTTON2 = 512,
    XCB_KEY_BUT_MASK_BUTTON1 = 256,
} xcb_key_but_mask_t;

typedef enum xcb_window {
    XCB_WINDOW_NONE = 0,
} xcb_window_t;

typedef enum xcb_button_mask {
    XCB_BUTTON_MASK_3 = 1024,
    XCB_BUTTON_MASK_5 = 4096,
    XCB_BUTTON_MASK_ANY = 32768,
    XCB_BUTTON_MASK_4 = 2048,
    XCB_BUTTON_MASK_2 = 512,
    XCB_BUTTON_MASK_1 = 256,
} xcb_button_mask_t;

typedef enum xcb_motion {
    XCB_MOTION_HINT = 1,
    XCB_MOTION_NORMAL = 0,
} xcb_motion_t;

typedef enum xcb_notify_detail {
    XCB_NOTIFY_DETAIL_VIRTUAL = 1,
    XCB_NOTIFY_DETAIL_ANCESTOR = 0,
    XCB_NOTIFY_DETAIL_NONLINEAR = 3,
    XCB_NOTIFY_DETAIL_INFERIOR = 2,
    XCB_NOTIFY_DETAIL_POINTER = 5,
    XCB_NOTIFY_DETAIL_NONLINEARVIRTUAL = 4,
    XCB_NOTIFY_DETAIL_NONE = 7,
    XCB_NOTIFY_DETAIL_POINTERROOT = 6,
} xcb_notify_detail_t;

typedef enum xcb_notify_mode {
    XCB_NOTIFY_MODE_GRAB = 1,
    XCB_NOTIFY_MODE_NORMAL = 0,
    XCB_NOTIFY_MODE_WHILEGRABBED = 3,
    XCB_NOTIFY_MODE_UNGRAB = 2,
} xcb_notify_mode_t;

typedef enum xcb_visibility {
    XCB_VISIBILITY_PARTIALLYOBSCURED = 1,
    XCB_VISIBILITY_UNOBSCURED = 0,
    XCB_VISIBILITY_FULLYOBSCURED = 2,
} xcb_visibility_t;

typedef enum xcb_place {
    XCB_PLACE_ONBOTTOM = 1,
    XCB_PLACE_ONTOP = 0,
} xcb_place_t;

typedef enum xcb_property {
    XCB_PROPERTY_DELETE = 1,
    XCB_PROPERTY_NEWVALUE = 0,
} xcb_property_t;

typedef enum xcb_time {
    XCB_TIME_CURRENTTIME = 0,
} xcb_time_t;

typedef enum xcb_atom {
    XCB_ATOM_X_HEIGHT = 56,
    XCB_ATOM_STRIKEOUT_DESCENT = 54,
    XCB_ATOM_WM_ZOOM_HINTS = 42,
    XCB_ATOM_SUPERSCRIPT_Y = 48,
    XCB_ATOM_MIN_SPACE = 43,
    XCB_ATOM_RESOLUTION = 60,
    XCB_ATOM_COPYRIGHT = 61,
    XCB_ATOM_NOTICE = 62,
    XCB_ATOM_FONT_NAME = 63,
    XCB_ATOM_FAMILY_NAME = 64,
    XCB_ATOM_SUBSCRIPT_X = 49,
    XCB_ATOM_CAP_HEIGHT = 66,
    XCB_ATOM_WM_CLASS = 67,
    XCB_ATOM_WM_TRANSIENT_FOR = 68,
    XCB_ATOM_UNDERLINE_THICKNESS = 52,
    XCB_ATOM_STRIKEOUT_ASCENT = 53,
    XCB_ATOM_RGB_COLOR_MAP = 24,
    XCB_ATOM_RGB_BEST_MAP = 25,
    XCB_ATOM_RGB_BLUE_MAP = 26,
    XCB_ATOM_RGB_DEFAULT_MAP = 27,
    XCB_ATOM_PIXMAP = 20,
    XCB_ATOM_POINT = 21,
    XCB_ATOM_RECTANGLE = 22,
    XCB_ATOM_RESOURCE_MANAGER = 23,
    XCB_ATOM_END_SPACE = 46,
    XCB_ATOM_SUPERSCRIPT_X = 47,
    XCB_ATOM_NORM_SPACE = 44,
    XCB_ATOM_MAX_SPACE = 45,
    XCB_ATOM_RGB_GRAY_MAP = 28,
    XCB_ATOM_RGB_GREEN_MAP = 29,
    XCB_ATOM_WM_NORMAL_HINTS = 40,
    XCB_ATOM_WM_SIZE_HINTS = 41,
    XCB_ATOM_PRIMARY = 1,
    XCB_ATOM_ANY = 0,
    XCB_ATOM_ARC = 3,
    XCB_ATOM_SECONDARY = 2,
    XCB_ATOM_BITMAP = 5,
    XCB_ATOM_ATOM = 4,
    XCB_ATOM_COLORMAP = 7,
    XCB_ATOM_CARDINAL = 6,
    XCB_ATOM_CUT_BUFFER0 = 9,
    XCB_ATOM_CURSOR = 8,
    XCB_ATOM_UNDERLINE_POSITION = 51,
    XCB_ATOM_WM_NAME = 39,
    XCB_ATOM_FULL_NAME = 65,
    XCB_ATOM_WM_ICON_SIZE = 38,
    XCB_ATOM_POINT_SIZE = 59,
    XCB_ATOM_WEIGHT = 58,
    XCB_ATOM_CUT_BUFFER2 = 11,
    XCB_ATOM_CUT_BUFFER1 = 10,
    XCB_ATOM_CUT_BUFFER4 = 13,
    XCB_ATOM_CUT_BUFFER3 = 12,
    XCB_ATOM_CUT_BUFFER6 = 15,
    XCB_ATOM_CUT_BUFFER5 = 14,
    XCB_ATOM_DRAWABLE = 17,
    XCB_ATOM_CUT_BUFFER7 = 16,
    XCB_ATOM_INTEGER = 19,
    XCB_ATOM_FONT = 18,
    XCB_ATOM_STRING = 31,
    XCB_ATOM_RGB_RED_MAP = 30,
    XCB_ATOM_WM_ICON_NAME = 37,
    XCB_ATOM_WM_CLIENT_MACHINE = 36,
    XCB_ATOM_WM_HINTS = 35,
    XCB_ATOM_WM_COMMAND = 34,
    XCB_ATOM_WINDOW = 33,
    XCB_ATOM_ITALIC_ANGLE = 55,
    XCB_ATOM_VISUALID = 32,
    XCB_ATOM_QUAD_WIDTH = 57,
    XCB_ATOM_SUBSCRIPT_Y = 50,
} xcb_atom_t;

typedef enum xcb_colormap_state {
    XCB_COLORMAP_STATE_INSTALLED = 1,
    XCB_COLORMAP_STATE_UNINSTALLED = 0,
} xcb_colormap_state_t;

typedef enum xcb_colormap {
    XCB_COLORMAP_NONE = 0,
} xcb_colormap_t;

typedef enum xcb_mapping {
    XCB_MAPPING_KEYBOARD = 1,
    XCB_MAPPING_MODIFIER = 0,
    XCB_MAPPING_POINTER = 2,
} xcb_mapping_t;

typedef enum xcb_window_class {
    XCB_WINDOW_CLASS_INPUTOUTPUT = 1,
    XCB_WINDOW_CLASS_COPYFROMPARENT = 0,
    XCB_WINDOW_CLASS_INPUTONLY = 2,
} xcb_window_class_t;

typedef enum xcb_cw {
    XCB_CW_COLORMAP = 8192,
    XCB_CW_SAVEUNDER = 1024,
    XCB_CW_DONTPROPAGATE = 4096,
    XCB_CW_BITGRAVITY = 16,
    XCB_CW_WINGRAVITY = 32,
    XCB_CW_EVENTMASK = 2048,
    XCB_CW_BACKPIXMAP = 1,
    XCB_CW_BACKPIXEL = 2,
    XCB_CW_BACKINGSTORE = 64,
    XCB_CW_BORDERPIXMAP = 4,
    XCB_CW_BACKINGPLANES = 128,
    XCB_CW_BORDERPIXEL = 8,
    XCB_CW_OVERRIDEREDIRECT = 512,
    XCB_CW_BACKINGPIXEL = 256,
    XCB_CW_CURSOR = 16384,
} xcb_cw_t;

typedef enum xcb_back_pixmap {
    XCB_BACK_PIXMAP_PARENTRELATIVE = 1,
    XCB_BACK_PIXMAP_NONE = 0,
} xcb_back_pixmap_t;

typedef enum xcb_gravity {
    XCB_GRAVITY_STATIC = 10,
    XCB_GRAVITY_NORTHWEST = 1,
    XCB_GRAVITY_WINUNMAP = 0,
    XCB_GRAVITY_NORTHEAST = 3,
    XCB_GRAVITY_NORTH = 2,
    XCB_GRAVITY_CENTER = 5,
    XCB_GRAVITY_WEST = 4,
    XCB_GRAVITY_SOUTHWEST = 7,
    XCB_GRAVITY_EAST = 6,
    XCB_GRAVITY_SOUTHEAST = 9,
    XCB_GRAVITY_SOUTH = 8,
} xcb_gravity_t;

int
xcb_CreateWindow_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), depth, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), wid, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'WINDOW'), parent, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), border_width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), class, True, True, False, WindowClass, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'VISUALID'), visual, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), value_mask, True, True, False, None, False
    uint32_t fieldvalue_value_mask;
    fieldvalue_value_mask = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'CreateWindow', 'value_list'), value_list, True, True, False, None, False

    //switch begins

    if (fieldvalue_value_mask & XCB_CW_BACKPIXMAP)
    {
        //('uint32_t',) background_pixmap
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKPIXEL)
    {
        //('uint32_t',) background_pixel
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BORDERPIXMAP)
    {
        //('uint32_t',) border_pixmap
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BORDERPIXEL)
    {
        //('uint32_t',) border_pixel
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BITGRAVITY)
    {
        //('uint32_t',) bit_gravity
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_WINGRAVITY)
    {
        //('uint32_t',) win_gravity
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKINGSTORE)
    {
        //('uint32_t',) backing_store
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKINGPLANES)
    {
        //('uint32_t',) backing_planes
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKINGPIXEL)
    {
        //('uint32_t',) backing_pixel
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_OVERRIDEREDIRECT)
    {
        //('uint32_t',) override_redirect
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_SAVEUNDER)
    {
        //('uint32_t',) save_under
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_EVENTMASK)
    {
        //('uint32_t',) event_mask
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_DONTPROPAGATE)
    {
        //('uint32_t',) do_not_propogate_mask
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_COLORMAP)
    {
        //('uint32_t',) colormap
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_CURSOR)
    {
        //('uint32_t',) cursor
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    //switch ends


	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CreateWindow_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), depth, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), wid, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'WINDOW'), parent, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), border_width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), class, True, True, False, WindowClass, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'VISUALID'), visual, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), value_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_value_mask;
    fieldvalue_value_mask = *(uint32_t*)p;
    p += 4;

    //('xcb', 'CreateWindow', 'value_list'), value_list, True, True, False, None, False

    //switch begins

    if (fieldvalue_value_mask & XCB_CW_BACKPIXMAP)
    {
        //('uint32_t',) background_pixmap
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKPIXEL)
    {
        //('uint32_t',) background_pixel
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BORDERPIXMAP)
    {
        //('uint32_t',) border_pixmap
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BORDERPIXEL)
    {
        //('uint32_t',) border_pixel
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BITGRAVITY)
    {
        //('uint32_t',) bit_gravity
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_WINGRAVITY)
    {
        //('uint32_t',) win_gravity
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKINGSTORE)
    {
        //('uint32_t',) backing_store
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKINGPLANES)
    {
        //('uint32_t',) backing_planes
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKINGPIXEL)
    {
        //('uint32_t',) backing_pixel
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_OVERRIDEREDIRECT)
    {
        //('uint32_t',) override_redirect
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_SAVEUNDER)
    {
        //('uint32_t',) save_under
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_EVENTMASK)
    {
        //('uint32_t',) event_mask
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_DONTPROPAGATE)
    {
        //('uint32_t',) do_not_propogate_mask
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_COLORMAP)
    {
        //('uint32_t',) colormap
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_CURSOR)
    {
        //('uint32_t',) cursor
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    //switch ends


	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CreateWindow_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), depth, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), wid, True, True, False, None, False
    p += 4;

    //('xcb', 'WINDOW'), parent, True, True, False, None, False
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    p += 2;

    //('uint16_t',), border_width, True, True, False, None, False
    p += 2;

    //('uint16_t',), class, True, True, False, WindowClass, False
    p += 2;

    //('xcb', 'VISUALID'), visual, True, True, False, None, False
    p += 4;

    //('uint32_t',), value_mask, True, True, False, None, False
    uint32_t fieldvalue_value_mask;
    fieldvalue_value_mask = *(uint32_t*)p;
    p += 4;

    //('xcb', 'CreateWindow', 'value_list'), value_list, True, True, False, None, False

    //switch begins

    if (fieldvalue_value_mask & XCB_CW_BACKPIXMAP)
    {
        //('uint32_t',) background_pixmap
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKPIXEL)
    {
        //('uint32_t',) background_pixel
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BORDERPIXMAP)
    {
        //('uint32_t',) border_pixmap
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BORDERPIXEL)
    {
        //('uint32_t',) border_pixel
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BITGRAVITY)
    {
        //('uint32_t',) bit_gravity
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_WINGRAVITY)
    {
        //('uint32_t',) win_gravity
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKINGSTORE)
    {
        //('uint32_t',) backing_store
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKINGPLANES)
    {
        //('uint32_t',) backing_planes
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKINGPIXEL)
    {
        //('uint32_t',) backing_pixel
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_OVERRIDEREDIRECT)
    {
        //('uint32_t',) override_redirect
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_SAVEUNDER)
    {
        //('uint32_t',) save_under
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_EVENTMASK)
    {
        //('uint32_t',) event_mask
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_DONTPROPAGATE)
    {
        //('uint32_t',) do_not_propogate_mask
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_COLORMAP)
    {
        //('uint32_t',) colormap
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_CURSOR)
    {
        //('uint32_t',) cursor
        p += 4;
    }

    //switch ends


	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangeWindowAttributes_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), value_mask, True, True, False, None, False
    uint32_t fieldvalue_value_mask;
    fieldvalue_value_mask = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ChangeWindowAttributes', 'value_list'), value_list, True, True, False, None, False

    //switch begins

    if (fieldvalue_value_mask & XCB_CW_BACKPIXMAP)
    {
        //('uint32_t',) background_pixmap
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKPIXEL)
    {
        //('uint32_t',) background_pixel
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BORDERPIXMAP)
    {
        //('uint32_t',) border_pixmap
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BORDERPIXEL)
    {
        //('uint32_t',) border_pixel
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BITGRAVITY)
    {
        //('uint32_t',) bit_gravity
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_WINGRAVITY)
    {
        //('uint32_t',) win_gravity
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKINGSTORE)
    {
        //('uint32_t',) backing_store
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKINGPLANES)
    {
        //('uint32_t',) backing_planes
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKINGPIXEL)
    {
        //('uint32_t',) backing_pixel
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_OVERRIDEREDIRECT)
    {
        //('uint32_t',) override_redirect
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_SAVEUNDER)
    {
        //('uint32_t',) save_under
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_EVENTMASK)
    {
        //('uint32_t',) event_mask
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_DONTPROPAGATE)
    {
        //('uint32_t',) do_not_propogate_mask
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_COLORMAP)
    {
        //('uint32_t',) colormap
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_CURSOR)
    {
        //('uint32_t',) cursor
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    //switch ends


	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangeWindowAttributes_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), value_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_value_mask;
    fieldvalue_value_mask = *(uint32_t*)p;
    p += 4;

    //('xcb', 'ChangeWindowAttributes', 'value_list'), value_list, True, True, False, None, False

    //switch begins

    if (fieldvalue_value_mask & XCB_CW_BACKPIXMAP)
    {
        //('uint32_t',) background_pixmap
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKPIXEL)
    {
        //('uint32_t',) background_pixel
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BORDERPIXMAP)
    {
        //('uint32_t',) border_pixmap
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BORDERPIXEL)
    {
        //('uint32_t',) border_pixel
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BITGRAVITY)
    {
        //('uint32_t',) bit_gravity
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_WINGRAVITY)
    {
        //('uint32_t',) win_gravity
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKINGSTORE)
    {
        //('uint32_t',) backing_store
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKINGPLANES)
    {
        //('uint32_t',) backing_planes
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKINGPIXEL)
    {
        //('uint32_t',) backing_pixel
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_OVERRIDEREDIRECT)
    {
        //('uint32_t',) override_redirect
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_SAVEUNDER)
    {
        //('uint32_t',) save_under
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_EVENTMASK)
    {
        //('uint32_t',) event_mask
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_DONTPROPAGATE)
    {
        //('uint32_t',) do_not_propogate_mask
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_COLORMAP)
    {
        //('uint32_t',) colormap
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_CURSOR)
    {
        //('uint32_t',) cursor
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    //switch ends


	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangeWindowAttributes_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

    //('uint32_t',), value_mask, True, True, False, None, False
    uint32_t fieldvalue_value_mask;
    fieldvalue_value_mask = *(uint32_t*)p;
    p += 4;

    //('xcb', 'ChangeWindowAttributes', 'value_list'), value_list, True, True, False, None, False

    //switch begins

    if (fieldvalue_value_mask & XCB_CW_BACKPIXMAP)
    {
        //('uint32_t',) background_pixmap
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKPIXEL)
    {
        //('uint32_t',) background_pixel
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BORDERPIXMAP)
    {
        //('uint32_t',) border_pixmap
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BORDERPIXEL)
    {
        //('uint32_t',) border_pixel
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BITGRAVITY)
    {
        //('uint32_t',) bit_gravity
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_WINGRAVITY)
    {
        //('uint32_t',) win_gravity
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKINGSTORE)
    {
        //('uint32_t',) backing_store
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKINGPLANES)
    {
        //('uint32_t',) backing_planes
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_BACKINGPIXEL)
    {
        //('uint32_t',) backing_pixel
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_OVERRIDEREDIRECT)
    {
        //('uint32_t',) override_redirect
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_SAVEUNDER)
    {
        //('uint32_t',) save_under
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_EVENTMASK)
    {
        //('uint32_t',) event_mask
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_DONTPROPAGATE)
    {
        //('uint32_t',) do_not_propogate_mask
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_COLORMAP)
    {
        //('uint32_t',) colormap
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CW_CURSOR)
    {
        //('uint32_t',) cursor
        p += 4;
    }

    //switch ends


	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_map_state {
    XCB_MAP_STATE_UNVIEWABLE = 1,
    XCB_MAP_STATE_UNMAPPED = 0,
    XCB_MAP_STATE_VIEWABLE = 2,
} xcb_map_state_t;

int
xcb_GetWindowAttributes_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetWindowAttributes_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetWindowAttributes_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_DestroyWindow_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_DestroyWindow_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_DestroyWindow_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_DestroySubwindows_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_DestroySubwindows_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_DestroySubwindows_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_set_mode {
    XCB_SET_MODE_DELETE = 1,
    XCB_SET_MODE_INSERT = 0,
} xcb_set_mode_t;

int
xcb_ChangeSaveSet_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, SetMode, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangeSaveSet_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, SetMode, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangeSaveSet_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, SetMode, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ReparentWindow_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'WINDOW'), parent, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ReparentWindow_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'WINDOW'), parent, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ReparentWindow_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

    //('xcb', 'WINDOW'), parent, True, True, False, None, False
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_MapWindow_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_MapWindow_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_MapWindow_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_MapSubwindows_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_MapSubwindows_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_MapSubwindows_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UnmapWindow_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UnmapWindow_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UnmapWindow_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UnmapSubwindows_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UnmapSubwindows_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UnmapSubwindows_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_config_window {
    XCB_CONFIG_WINDOW_BORDERWIDTH = 16,
    XCB_CONFIG_WINDOW_SIBLING = 32,
    XCB_CONFIG_WINDOW_X = 1,
    XCB_CONFIG_WINDOW_Y = 2,
    XCB_CONFIG_WINDOW_STACKMODE = 64,
    XCB_CONFIG_WINDOW_WIDTH = 4,
    XCB_CONFIG_WINDOW_HEIGHT = 8,
} xcb_config_window_t;

typedef enum xcb_stack_mode {
    XCB_STACK_MODE_BELOW = 1,
    XCB_STACK_MODE_ABOVE = 0,
    XCB_STACK_MODE_BOTTOMIF = 3,
    XCB_STACK_MODE_TOPIF = 2,
    XCB_STACK_MODE_OPPOSITE = 4,
} xcb_stack_mode_t;

int
xcb_ConfigureWindow_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), value_mask, True, True, False, None, False
    uint16_t fieldvalue_value_mask;
    fieldvalue_value_mask = *(uint16_t*)p;
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('xcb', 'ConfigureWindow', 'value_list'), value_list, True, True, False, None, False

    //switch begins

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_X)
    {
        //('int32_t',) x
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_Y)
    {
        //('int32_t',) y
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_WIDTH)
    {
        //('uint32_t',) width
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_HEIGHT)
    {
        //('uint32_t',) height
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_BORDERWIDTH)
    {
        //('uint32_t',) border_width
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_SIBLING)
    {
        //('uint32_t',) sibling
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_STACKMODE)
    {
        //('uint32_t',) stack_mode
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    //switch ends


	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ConfigureWindow_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), value_mask, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    uint16_t fieldvalue_value_mask;
    fieldvalue_value_mask = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('xcb', 'ConfigureWindow', 'value_list'), value_list, True, True, False, None, False

    //switch begins

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_X)
    {
        //('int32_t',) x
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_Y)
    {
        //('int32_t',) y
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_WIDTH)
    {
        //('uint32_t',) width
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_HEIGHT)
    {
        //('uint32_t',) height
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_BORDERWIDTH)
    {
        //('uint32_t',) border_width
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_SIBLING)
    {
        //('uint32_t',) sibling
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_STACKMODE)
    {
        //('uint32_t',) stack_mode
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    //switch ends


	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ConfigureWindow_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

    //('uint16_t',), value_mask, True, True, False, None, False
    uint16_t fieldvalue_value_mask;
    fieldvalue_value_mask = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('xcb', 'ConfigureWindow', 'value_list'), value_list, True, True, False, None, False

    //switch begins

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_X)
    {
        //('int32_t',) x
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_Y)
    {
        //('int32_t',) y
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_WIDTH)
    {
        //('uint32_t',) width
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_HEIGHT)
    {
        //('uint32_t',) height
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_BORDERWIDTH)
    {
        //('uint32_t',) border_width
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_SIBLING)
    {
        //('uint32_t',) sibling
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_CONFIG_WINDOW_STACKMODE)
    {
        //('uint32_t',) stack_mode
        p += 4;
    }

    //switch ends


	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_circulate {
    XCB_CIRCULATE_LOWERHIGHEST = 1,
    XCB_CIRCULATE_RAISELOWEST = 0,
} xcb_circulate_t;

int
xcb_CirculateWindow_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), direction, True, True, False, Circulate, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CirculateWindow_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), direction, True, True, False, Circulate, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CirculateWindow_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), direction, True, True, False, Circulate, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetGeometry_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetGeometry_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetGeometry_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryTree_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryTree_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryTree_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_InternAtom_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), only_if_exists, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), name_len, True, True, False, None, False
    uint16_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint16_t*)p;
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_InternAtom_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), only_if_exists, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('uint16_t',), name_len, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    uint16_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_InternAtom_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), only_if_exists, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('uint16_t',), name_len, True, True, False, None, False
    uint16_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetAtomName_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'ATOM'), atom, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetAtomName_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'ATOM'), atom, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetAtomName_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'ATOM'), atom, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_prop_mode {
    XCB_PROP_MODE_PREPEND = 1,
    XCB_PROP_MODE_REPLACE = 0,
    XCB_PROP_MODE_APPEND = 2,
} xcb_prop_mode_t;

int
xcb_ChangeProperty_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, PropMode, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ATOM'), property, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ATOM'), type, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint8_t',), format, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 3;

    //('uint32_t',), data_len, True, True, False, None, False
    uint32_t fieldvalue_data_len;
    fieldvalue_data_len = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('void',), data, True, True, False, None, False
    {
        unsigned int i_data_len;
        for(i_data_len = 0; i_data_len < fieldvalue_data_len; i_data_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangeProperty_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, PropMode, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ATOM'), property, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ATOM'), type, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint8_t',), format, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 3;

    //('uint32_t',), data_len, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_data_len;
    fieldvalue_data_len = *(uint32_t*)p;
    p += 4;

    //('void',), data, True, True, False, None, False
    {
        unsigned int i_data_len;
        for(i_data_len = 0; i_data_len < fieldvalue_data_len; i_data_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangeProperty_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, PropMode, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

    //('xcb', 'ATOM'), property, True, True, False, None, False
    p += 4;

    //('xcb', 'ATOM'), type, True, True, False, None, False
    p += 4;

    //('uint8_t',), format, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 3;

    //('uint32_t',), data_len, True, True, False, None, False
    uint32_t fieldvalue_data_len;
    fieldvalue_data_len = *(uint32_t*)p;
    p += 4;

    //('void',), data, True, True, False, None, False
    {
        unsigned int i_data_len;
        for(i_data_len = 0; i_data_len < fieldvalue_data_len; i_data_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_DeleteProperty_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ATOM'), property, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_DeleteProperty_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ATOM'), property, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_DeleteProperty_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

    //('xcb', 'ATOM'), property, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_get_property_type {
    XCB_GET_PROPERTY_TYPE_ANY = 0,
} xcb_get_property_type_t;

int
xcb_GetProperty_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), delete, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ATOM'), property, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ATOM'), type, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), long_offset, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), long_length, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetProperty_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), delete, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ATOM'), property, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ATOM'), type, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), long_offset, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), long_length, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetProperty_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), delete, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

    //('xcb', 'ATOM'), property, True, True, False, None, False
    p += 4;

    //('xcb', 'ATOM'), type, True, True, False, None, False
    p += 4;

    //('uint32_t',), long_offset, True, True, False, None, False
    p += 4;

    //('uint32_t',), long_length, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ListProperties_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ListProperties_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ListProperties_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetSelectionOwner_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), owner, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ATOM'), selection, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetSelectionOwner_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), owner, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ATOM'), selection, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetSelectionOwner_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), owner, True, True, False, None, False
    p += 4;

    //('xcb', 'ATOM'), selection, True, True, False, None, False
    p += 4;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetSelectionOwner_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'ATOM'), selection, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetSelectionOwner_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'ATOM'), selection, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetSelectionOwner_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'ATOM'), selection, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ConvertSelection_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), requestor, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ATOM'), selection, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ATOM'), target, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ATOM'), property, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ConvertSelection_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), requestor, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ATOM'), selection, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ATOM'), target, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ATOM'), property, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ConvertSelection_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), requestor, True, True, False, None, False
    p += 4;

    //('xcb', 'ATOM'), selection, True, True, False, None, False
    p += 4;

    //('xcb', 'ATOM'), target, True, True, False, None, False
    p += 4;

    //('xcb', 'ATOM'), property, True, True, False, None, False
    p += 4;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_send_event_dest {
    XCB_SEND_EVENT_DEST_ITEMFOCUS = 1,
    XCB_SEND_EVENT_DEST_POINTERWINDOW = 0,
} xcb_send_event_dest_t;

int
xcb_SendEvent_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), propagate, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), destination, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), event_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('char',), event, True, True, False, None, False
    {
        unsigned int i_event;
        for(i_event = 0; i_event < 32; i_event++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SendEvent_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), propagate, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), destination, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), event_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('char',), event, True, True, False, None, False
    {
        unsigned int i_event;
        for(i_event = 0; i_event < 32; i_event++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SendEvent_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), propagate, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), destination, True, True, False, None, False
    p += 4;

    //('uint32_t',), event_mask, True, True, False, None, False
    p += 4;

    //('char',), event, True, True, False, None, False
    {
        unsigned int i_event;
        for(i_event = 0; i_event < 32; i_event++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_grab_mode {
    XCB_GRAB_MODE_ASYNC = 1,
    XCB_GRAB_MODE_SYNC = 0,
} xcb_grab_mode_t;

typedef enum xcb_grab_status {
    XCB_GRAB_STATUS_ALREADYGRABBED = 1,
    XCB_GRAB_STATUS_SUCCESS = 0,
    XCB_GRAB_STATUS_NOTVIEWABLE = 3,
    XCB_GRAB_STATUS_INVALIDTIME = 2,
    XCB_GRAB_STATUS_FROZEN = 4,
} xcb_grab_status_t;

typedef enum xcb_cursor {
    XCB_CURSOR_NONE = 0,
} xcb_cursor_t;

int
xcb_GrabPointer_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), owner_events, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), grab_window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), event_mask, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pointer_mode, True, True, False, GrabMode, False
    p += 1;

    //('uint8_t',), keyboard_mode, True, True, False, GrabMode, False
    p += 1;

    //('xcb', 'WINDOW'), confine_to, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'CURSOR'), cursor, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GrabPointer_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), owner_events, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), grab_window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), event_mask, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pointer_mode, True, True, False, GrabMode, False
    p += 1;

    //('uint8_t',), keyboard_mode, True, True, False, GrabMode, False
    p += 1;

    //('xcb', 'WINDOW'), confine_to, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'CURSOR'), cursor, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GrabPointer_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), owner_events, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), grab_window, True, True, False, None, False
    p += 4;

    //('uint16_t',), event_mask, True, True, False, None, False
    p += 2;

    //('uint8_t',), pointer_mode, True, True, False, GrabMode, False
    p += 1;

    //('uint8_t',), keyboard_mode, True, True, False, GrabMode, False
    p += 1;

    //('xcb', 'WINDOW'), confine_to, True, True, False, None, False
    p += 4;

    //('xcb', 'CURSOR'), cursor, True, True, False, None, False
    p += 4;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UngrabPointer_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UngrabPointer_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UngrabPointer_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_button_index {
    XCB_BUTTON_INDEX_1 = 1,
    XCB_BUTTON_INDEX_ANY = 0,
    XCB_BUTTON_INDEX_3 = 3,
    XCB_BUTTON_INDEX_2 = 2,
    XCB_BUTTON_INDEX_5 = 5,
    XCB_BUTTON_INDEX_4 = 4,
} xcb_button_index_t;

int
xcb_GrabButton_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), owner_events, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), grab_window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), event_mask, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pointer_mode, True, True, False, GrabMode, False
    p += 1;

    //('uint8_t',), keyboard_mode, True, True, False, GrabMode, False
    p += 1;

    //('xcb', 'WINDOW'), confine_to, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'CURSOR'), cursor, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint8_t',), button, True, True, False, ButtonIndex, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, ButtonIndex, False
    p += 1;

    //('uint16_t',), modifiers, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GrabButton_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), owner_events, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), grab_window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), event_mask, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pointer_mode, True, True, False, GrabMode, False
    p += 1;

    //('uint8_t',), keyboard_mode, True, True, False, GrabMode, False
    p += 1;

    //('xcb', 'WINDOW'), confine_to, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'CURSOR'), cursor, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint8_t',), button, True, True, False, ButtonIndex, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, ButtonIndex, False
    p += 1;

    //('uint16_t',), modifiers, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GrabButton_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), owner_events, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), grab_window, True, True, False, None, False
    p += 4;

    //('uint16_t',), event_mask, True, True, False, None, False
    p += 2;

    //('uint8_t',), pointer_mode, True, True, False, GrabMode, False
    p += 1;

    //('uint8_t',), keyboard_mode, True, True, False, GrabMode, False
    p += 1;

    //('xcb', 'WINDOW'), confine_to, True, True, False, None, False
    p += 4;

    //('xcb', 'CURSOR'), cursor, True, True, False, None, False
    p += 4;

    //('uint8_t',), button, True, True, False, ButtonIndex, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, ButtonIndex, False
    p += 1;

    //('uint16_t',), modifiers, True, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UngrabButton_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), button, True, True, False, ButtonIndex, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), grab_window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), modifiers, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UngrabButton_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), button, True, True, False, ButtonIndex, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), grab_window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), modifiers, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UngrabButton_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), button, True, True, False, ButtonIndex, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), grab_window, True, True, False, None, False
    p += 4;

    //('uint16_t',), modifiers, True, True, False, None, False
    p += 2;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangeActivePointerGrab_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'CURSOR'), cursor, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), event_mask, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangeActivePointerGrab_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'CURSOR'), cursor, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), event_mask, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangeActivePointerGrab_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'CURSOR'), cursor, True, True, False, None, False
    p += 4;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    p += 4;

    //('uint16_t',), event_mask, True, True, False, None, False
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GrabKeyboard_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), owner_events, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), grab_window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint8_t',), pointer_mode, True, True, False, GrabMode, False
    p += 1;

    //('uint8_t',), keyboard_mode, True, True, False, GrabMode, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, GrabMode, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GrabKeyboard_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), owner_events, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), grab_window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint8_t',), pointer_mode, True, True, False, GrabMode, False
    p += 1;

    //('uint8_t',), keyboard_mode, True, True, False, GrabMode, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, GrabMode, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GrabKeyboard_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), owner_events, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), grab_window, True, True, False, None, False
    p += 4;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    p += 4;

    //('uint8_t',), pointer_mode, True, True, False, GrabMode, False
    p += 1;

    //('uint8_t',), keyboard_mode, True, True, False, GrabMode, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, GrabMode, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UngrabKeyboard_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UngrabKeyboard_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UngrabKeyboard_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_grab {
    XCB_GRAB_ANY = 0,
} xcb_grab_t;

int
xcb_GrabKey_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), owner_events, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), grab_window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), modifiers, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'KEYCODE'), key, True, True, False, None, False
    p += 1;

    //('uint8_t',), pointer_mode, True, True, False, GrabMode, False
    p += 1;

    //('uint8_t',), keyboard_mode, True, True, False, GrabMode, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, GrabMode, False
    p += 3;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GrabKey_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), owner_events, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), grab_window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), modifiers, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'KEYCODE'), key, True, True, False, None, False
    p += 1;

    //('uint8_t',), pointer_mode, True, True, False, GrabMode, False
    p += 1;

    //('uint8_t',), keyboard_mode, True, True, False, GrabMode, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, GrabMode, False
    p += 3;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GrabKey_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), owner_events, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), grab_window, True, True, False, None, False
    p += 4;

    //('uint16_t',), modifiers, True, True, False, None, False
    p += 2;

    //('xcb', 'KEYCODE'), key, True, True, False, None, False
    p += 1;

    //('uint8_t',), pointer_mode, True, True, False, GrabMode, False
    p += 1;

    //('uint8_t',), keyboard_mode, True, True, False, GrabMode, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, GrabMode, False
    p += 3;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UngrabKey_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('xcb', 'KEYCODE'), key, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), grab_window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), modifiers, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UngrabKey_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('xcb', 'KEYCODE'), key, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), grab_window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), modifiers, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UngrabKey_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('xcb', 'KEYCODE'), key, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), grab_window, True, True, False, None, False
    p += 4;

    //('uint16_t',), modifiers, True, True, False, None, False
    p += 2;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_allow {
    XCB_ALLOW_SYNCPOINTER = 1,
    XCB_ALLOW_ASYNCPOINTER = 0,
    XCB_ALLOW_ASYNCKEYBOARD = 3,
    XCB_ALLOW_REPLAYPOINTER = 2,
    XCB_ALLOW_REPLAYKEYBOARD = 5,
    XCB_ALLOW_SYNCKEYBOARD = 4,
    XCB_ALLOW_SYNCBOTH = 7,
    XCB_ALLOW_ASYNCBOTH = 6,
} xcb_allow_t;

int
xcb_AllowEvents_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, Allow, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_AllowEvents_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, Allow, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_AllowEvents_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, Allow, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GrabServer_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GrabServer_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GrabServer_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UngrabServer_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UngrabServer_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UngrabServer_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryPointer_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryPointer_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryPointer_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_TIMECOORD_SwapToClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_TIMECOORD_SwapFromClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_TIMECOORD_Check(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetMotionEvents_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'TIMESTAMP'), start, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'TIMESTAMP'), stop, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetMotionEvents_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'TIMESTAMP'), start, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'TIMESTAMP'), stop, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetMotionEvents_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

    //('xcb', 'TIMESTAMP'), start, True, True, False, None, False
    p += 4;

    //('xcb', 'TIMESTAMP'), stop, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_TranslateCoordinates_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), src_window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'WINDOW'), dst_window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), src_x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), src_y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_TranslateCoordinates_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), src_window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'WINDOW'), dst_window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), src_x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), src_y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_TranslateCoordinates_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), src_window, True, True, False, None, False
    p += 4;

    //('xcb', 'WINDOW'), dst_window, True, True, False, None, False
    p += 4;

    //('int16_t',), src_x, True, True, False, None, False
    p += 2;

    //('int16_t',), src_y, True, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_WarpPointer_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), src_window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'WINDOW'), dst_window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), src_x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), src_y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), src_width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), src_height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), dst_x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), dst_y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_WarpPointer_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), src_window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'WINDOW'), dst_window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), src_x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), src_y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), src_width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), src_height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), dst_x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), dst_y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_WarpPointer_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), src_window, True, True, False, None, False
    p += 4;

    //('xcb', 'WINDOW'), dst_window, True, True, False, None, False
    p += 4;

    //('int16_t',), src_x, True, True, False, None, False
    p += 2;

    //('int16_t',), src_y, True, True, False, None, False
    p += 2;

    //('uint16_t',), src_width, True, True, False, None, False
    p += 2;

    //('uint16_t',), src_height, True, True, False, None, False
    p += 2;

    //('int16_t',), dst_x, True, True, False, None, False
    p += 2;

    //('int16_t',), dst_y, True, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_input_focus {
    XCB_INPUT_FOCUS_POINTERROOT = 1,
    XCB_INPUT_FOCUS_NONE = 0,
    XCB_INPUT_FOCUS_FOLLOWKEYBOARD = 3,
    XCB_INPUT_FOCUS_PARENT = 2,
} xcb_input_focus_t;

int
xcb_SetInputFocus_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), revert_to, True, True, False, InputFocus, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), focus, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetInputFocus_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), revert_to, True, True, False, InputFocus, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), focus, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetInputFocus_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), revert_to, True, True, False, InputFocus, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), focus, True, True, False, None, False
    p += 4;

    //('xcb', 'TIMESTAMP'), time, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetInputFocus_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetInputFocus_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetInputFocus_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryKeymap_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryKeymap_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryKeymap_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_OpenFont_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'FONT'), fid, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), name_len, True, True, False, None, False
    uint16_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint16_t*)p;
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_OpenFont_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'FONT'), fid, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), name_len, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    uint16_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_OpenFont_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'FONT'), fid, True, True, False, None, False
    p += 4;

    //('uint16_t',), name_len, True, True, False, None, False
    uint16_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CloseFont_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'FONT'), font, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CloseFont_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'FONT'), font, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CloseFont_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'FONT'), font, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_font_draw {
    XCB_FONT_DRAW_RIGHTTOLEFT = 1,
    XCB_FONT_DRAW_LEFTTORIGHT = 0,
} xcb_font_draw_t;

int
xcb_FONTPROP_SwapToClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('xcb', 'ATOM'), name, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), value, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FONTPROP_SwapFromClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('xcb', 'ATOM'), name, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), value, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FONTPROP_Check(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('xcb', 'ATOM'), name, True, True, False, None, False
    p += 4;

    //('uint32_t',), value, True, True, False, None, False
    p += 4;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CHARINFO_SwapToClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('int16_t',), left_side_bearing, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), right_side_bearing, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), character_width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), ascent, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), descent, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), attributes, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CHARINFO_SwapFromClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('int16_t',), left_side_bearing, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), right_side_bearing, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), character_width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), ascent, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), descent, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), attributes, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CHARINFO_Check(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('int16_t',), left_side_bearing, True, True, False, None, False
    p += 2;

    //('int16_t',), right_side_bearing, True, True, False, None, False
    p += 2;

    //('int16_t',), character_width, True, True, False, None, False
    p += 2;

    //('int16_t',), ascent, True, True, False, None, False
    p += 2;

    //('int16_t',), descent, True, True, False, None, False
    p += 2;

    //('uint16_t',), attributes, True, True, False, None, False
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryFont_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'FONTABLE'), font, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryFont_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'FONTABLE'), font, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryFont_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'FONTABLE'), font, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryTextExtents_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), odd_length, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'FONTABLE'), font, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), string_len, True, False, False, None, False
    uint32_t fieldvalue_string_len;
    fieldvalue_string_len = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'CHAR2B'), string, True, True, False, None, False
    {
        unsigned int i_string_len;
        for(i_string_len = 0; i_string_len < fieldvalue_string_len; i_string_len++)
        {
            if(xcb_CHAR2B_SwapToClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryTextExtents_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), odd_length, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'FONTABLE'), font, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), string_len, True, False, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_string_len;
    fieldvalue_string_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'CHAR2B'), string, True, True, False, None, False
    {
        unsigned int i_string_len;
        for(i_string_len = 0; i_string_len < fieldvalue_string_len; i_string_len++)
        {
            if(xcb_CHAR2B_SwapFromClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryTextExtents_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), odd_length, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'FONTABLE'), font, True, True, False, None, False
    p += 4;

    //('uint32_t',), string_len, True, False, False, None, False
    uint32_t fieldvalue_string_len;
    fieldvalue_string_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'CHAR2B'), string, True, True, False, None, False
    {
        unsigned int i_string_len;
        for(i_string_len = 0; i_string_len < fieldvalue_string_len; i_string_len++)
        {
            if(xcb_CHAR2B_Check(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_STR_SwapToClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), name_len, True, True, False, None, False
    uint8_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint8_t*)p;
    p += 1;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_STR_SwapFromClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), name_len, True, True, False, None, False
    uint8_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint8_t*)p;
    p += 1;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_STR_Check(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), name_len, True, True, False, None, False
    uint8_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint8_t*)p;
    p += 1;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ListFonts_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), max_names, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), pattern_len, True, True, False, None, False
    uint16_t fieldvalue_pattern_len;
    fieldvalue_pattern_len = *(uint16_t*)p;
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('char',), pattern, True, True, False, None, False
    {
        unsigned int i_pattern_len;
        for(i_pattern_len = 0; i_pattern_len < fieldvalue_pattern_len; i_pattern_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ListFonts_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('uint16_t',), max_names, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), pattern_len, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    uint16_t fieldvalue_pattern_len;
    fieldvalue_pattern_len = *(uint16_t*)p;
    p += 2;

    //('char',), pattern, True, True, False, None, False
    {
        unsigned int i_pattern_len;
        for(i_pattern_len = 0; i_pattern_len < fieldvalue_pattern_len; i_pattern_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ListFonts_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('uint16_t',), max_names, True, True, False, None, False
    p += 2;

    //('uint16_t',), pattern_len, True, True, False, None, False
    uint16_t fieldvalue_pattern_len;
    fieldvalue_pattern_len = *(uint16_t*)p;
    p += 2;

    //('char',), pattern, True, True, False, None, False
    {
        unsigned int i_pattern_len;
        for(i_pattern_len = 0; i_pattern_len < fieldvalue_pattern_len; i_pattern_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ListFontsWithInfo_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), max_names, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), pattern_len, True, True, False, None, False
    uint16_t fieldvalue_pattern_len;
    fieldvalue_pattern_len = *(uint16_t*)p;
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('char',), pattern, True, True, False, None, False
    {
        unsigned int i_pattern_len;
        for(i_pattern_len = 0; i_pattern_len < fieldvalue_pattern_len; i_pattern_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ListFontsWithInfo_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('uint16_t',), max_names, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), pattern_len, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    uint16_t fieldvalue_pattern_len;
    fieldvalue_pattern_len = *(uint16_t*)p;
    p += 2;

    //('char',), pattern, True, True, False, None, False
    {
        unsigned int i_pattern_len;
        for(i_pattern_len = 0; i_pattern_len < fieldvalue_pattern_len; i_pattern_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ListFontsWithInfo_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('uint16_t',), max_names, True, True, False, None, False
    p += 2;

    //('uint16_t',), pattern_len, True, True, False, None, False
    uint16_t fieldvalue_pattern_len;
    fieldvalue_pattern_len = *(uint16_t*)p;
    p += 2;

    //('char',), pattern, True, True, False, None, False
    {
        unsigned int i_pattern_len;
        for(i_pattern_len = 0; i_pattern_len < fieldvalue_pattern_len; i_pattern_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetFontPath_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), font_qty, True, True, False, None, False
    uint16_t fieldvalue_font_qty;
    fieldvalue_font_qty = *(uint16_t*)p;
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('xcb', 'STR'), font, True, True, False, None, False
    {
        unsigned int i_font_qty;
        for(i_font_qty = 0; i_font_qty < fieldvalue_font_qty; i_font_qty++)
        {
            if(xcb_STR_SwapToClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetFontPath_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('uint16_t',), font_qty, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    uint16_t fieldvalue_font_qty;
    fieldvalue_font_qty = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('xcb', 'STR'), font, True, True, False, None, False
    {
        unsigned int i_font_qty;
        for(i_font_qty = 0; i_font_qty < fieldvalue_font_qty; i_font_qty++)
        {
            if(xcb_STR_SwapFromClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetFontPath_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('uint16_t',), font_qty, True, True, False, None, False
    uint16_t fieldvalue_font_qty;
    fieldvalue_font_qty = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('xcb', 'STR'), font, True, True, False, None, False
    {
        unsigned int i_font_qty;
        for(i_font_qty = 0; i_font_qty < fieldvalue_font_qty; i_font_qty++)
        {
            if(xcb_STR_Check(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetFontPath_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetFontPath_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetFontPath_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CreatePixmap_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), depth, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'PIXMAP'), pid, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CreatePixmap_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), depth, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'PIXMAP'), pid, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CreatePixmap_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), depth, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'PIXMAP'), pid, True, True, False, None, False
    p += 4;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    p += 4;

    //('uint16_t',), width, True, True, False, None, False
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FreePixmap_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'PIXMAP'), pixmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FreePixmap_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'PIXMAP'), pixmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FreePixmap_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'PIXMAP'), pixmap, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_gc {
    XCB_GC_SUBWINDOWMODE = 32768,
    XCB_GC_ARCMODE = 4194304,
    XCB_GC_CLIPORIGINX = 131072,
    XCB_GC_CLIPORIGINY = 262144,
    XCB_GC_CAPSTYLE = 64,
    XCB_GC_GRAPHICSEXPOSURES = 65536,
    XCB_GC_FILLSTYLE = 256,
    XCB_GC_TILESTIPPLEORIGINY = 8192,
    XCB_GC_DASHOFFSET = 1048576,
    XCB_GC_FUNCTION = 1,
    XCB_GC_DASHLIST = 2097152,
    XCB_GC_PLANEMASK = 2,
    XCB_GC_FOREGROUND = 4,
    XCB_GC_BACKGROUND = 8,
    XCB_GC_FONT = 16384,
    XCB_GC_TILESTIPPLEORIGINX = 4096,
    XCB_GC_CLIPMASK = 524288,
    XCB_GC_JOINSTYLE = 128,
    XCB_GC_TILE = 1024,
    XCB_GC_LINEWIDTH = 16,
    XCB_GC_LINESTYLE = 32,
    XCB_GC_STIPPLE = 2048,
    XCB_GC_FILLRULE = 512,
} xcb_gc_t;

typedef enum xcb_gx {
    XCB_GX_ORREVERSE = 11,
    XCB_GX_INVERT = 10,
    XCB_GX_ORINVERTED = 13,
    XCB_GX_COPYINVERTED = 12,
    XCB_GX_SET = 15,
    XCB_GX_NAND = 14,
    XCB_GX_AND = 1,
    XCB_GX_CLEAR = 0,
    XCB_GX_COPY = 3,
    XCB_GX_ANDREVERSE = 2,
    XCB_GX_NOOP = 5,
    XCB_GX_ANDINVERTED = 4,
    XCB_GX_OR = 7,
    XCB_GX_XOR = 6,
    XCB_GX_EQUIV = 9,
    XCB_GX_NOR = 8,
} xcb_gx_t;

typedef enum xcb_line_style {
    XCB_LINE_STYLE_ONOFFDASH = 1,
    XCB_LINE_STYLE_SOLID = 0,
    XCB_LINE_STYLE_DOUBLEDASH = 2,
} xcb_line_style_t;

typedef enum xcb_cap_style {
    XCB_CAP_STYLE_BUTT = 1,
    XCB_CAP_STYLE_NOTLAST = 0,
    XCB_CAP_STYLE_PROJECTING = 3,
    XCB_CAP_STYLE_ROUND = 2,
} xcb_cap_style_t;

typedef enum xcb_join_style {
    XCB_JOIN_STYLE_ROUND = 1,
    XCB_JOIN_STYLE_MITER = 0,
    XCB_JOIN_STYLE_BEVEL = 2,
} xcb_join_style_t;

typedef enum xcb_fill_style {
    XCB_FILL_STYLE_TILED = 1,
    XCB_FILL_STYLE_SOLID = 0,
    XCB_FILL_STYLE_OPAQUESTIPPLED = 3,
    XCB_FILL_STYLE_STIPPLED = 2,
} xcb_fill_style_t;

typedef enum xcb_fill_rule {
    XCB_FILL_RULE_WINDING = 1,
    XCB_FILL_RULE_EVENODD = 0,
} xcb_fill_rule_t;

typedef enum xcb_subwindow_mode {
    XCB_SUBWINDOW_MODE_INCLUDEINFERIORS = 1,
    XCB_SUBWINDOW_MODE_CLIPBYCHILDREN = 0,
} xcb_subwindow_mode_t;

typedef enum xcb_arc_mode {
    XCB_ARC_MODE_PIESLICE = 1,
    XCB_ARC_MODE_CHORD = 0,
} xcb_arc_mode_t;

int
xcb_CreateGC_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'GCONTEXT'), cid, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), value_mask, True, True, False, None, False
    uint32_t fieldvalue_value_mask;
    fieldvalue_value_mask = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'CreateGC', 'value_list'), value_list, True, True, False, None, False

    //switch begins

    if (fieldvalue_value_mask & XCB_GC_FUNCTION)
    {
        //('uint32_t',) function
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_PLANEMASK)
    {
        //('uint32_t',) plane_mask
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FOREGROUND)
    {
        //('uint32_t',) foreground
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_BACKGROUND)
    {
        //('uint32_t',) background
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_LINEWIDTH)
    {
        //('uint32_t',) line_width
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_LINESTYLE)
    {
        //('uint32_t',) line_style
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CAPSTYLE)
    {
        //('uint32_t',) cap_style
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_JOINSTYLE)
    {
        //('uint32_t',) join_style
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FILLSTYLE)
    {
        //('uint32_t',) fill_style
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FILLRULE)
    {
        //('uint32_t',) fill_rule
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_TILE)
    {
        //('uint32_t',) tile
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_STIPPLE)
    {
        //('uint32_t',) stipple
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_TILESTIPPLEORIGINX)
    {
        //('int32_t',) tile_stipple_x_origin
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_TILESTIPPLEORIGINY)
    {
        //('int32_t',) tile_stipple_y_origin
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FONT)
    {
        //('uint32_t',) font
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_SUBWINDOWMODE)
    {
        //('uint32_t',) subwindow_mode
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_GRAPHICSEXPOSURES)
    {
        //('uint32_t',) graphics_exposures
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CLIPORIGINX)
    {
        //('int32_t',) clip_x_origin
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CLIPORIGINY)
    {
        //('int32_t',) clip_y_origin
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CLIPMASK)
    {
        //('uint32_t',) clip_mask
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_DASHOFFSET)
    {
        //('uint32_t',) dash_offset
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_DASHLIST)
    {
        //('uint32_t',) dashes
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_ARCMODE)
    {
        //('uint32_t',) arc_mode
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    //switch ends


	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CreateGC_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'GCONTEXT'), cid, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), value_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_value_mask;
    fieldvalue_value_mask = *(uint32_t*)p;
    p += 4;

    //('xcb', 'CreateGC', 'value_list'), value_list, True, True, False, None, False

    //switch begins

    if (fieldvalue_value_mask & XCB_GC_FUNCTION)
    {
        //('uint32_t',) function
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_PLANEMASK)
    {
        //('uint32_t',) plane_mask
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FOREGROUND)
    {
        //('uint32_t',) foreground
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_BACKGROUND)
    {
        //('uint32_t',) background
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_LINEWIDTH)
    {
        //('uint32_t',) line_width
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_LINESTYLE)
    {
        //('uint32_t',) line_style
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CAPSTYLE)
    {
        //('uint32_t',) cap_style
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_JOINSTYLE)
    {
        //('uint32_t',) join_style
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FILLSTYLE)
    {
        //('uint32_t',) fill_style
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FILLRULE)
    {
        //('uint32_t',) fill_rule
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_TILE)
    {
        //('uint32_t',) tile
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_STIPPLE)
    {
        //('uint32_t',) stipple
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_TILESTIPPLEORIGINX)
    {
        //('int32_t',) tile_stipple_x_origin
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_TILESTIPPLEORIGINY)
    {
        //('int32_t',) tile_stipple_y_origin
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FONT)
    {
        //('uint32_t',) font
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_SUBWINDOWMODE)
    {
        //('uint32_t',) subwindow_mode
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_GRAPHICSEXPOSURES)
    {
        //('uint32_t',) graphics_exposures
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CLIPORIGINX)
    {
        //('int32_t',) clip_x_origin
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CLIPORIGINY)
    {
        //('int32_t',) clip_y_origin
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CLIPMASK)
    {
        //('uint32_t',) clip_mask
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_DASHOFFSET)
    {
        //('uint32_t',) dash_offset
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_DASHLIST)
    {
        //('uint32_t',) dashes
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_ARCMODE)
    {
        //('uint32_t',) arc_mode
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    //switch ends


	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CreateGC_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'GCONTEXT'), cid, True, True, False, None, False
    p += 4;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    p += 4;

    //('uint32_t',), value_mask, True, True, False, None, False
    uint32_t fieldvalue_value_mask;
    fieldvalue_value_mask = *(uint32_t*)p;
    p += 4;

    //('xcb', 'CreateGC', 'value_list'), value_list, True, True, False, None, False

    //switch begins

    if (fieldvalue_value_mask & XCB_GC_FUNCTION)
    {
        //('uint32_t',) function
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_PLANEMASK)
    {
        //('uint32_t',) plane_mask
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FOREGROUND)
    {
        //('uint32_t',) foreground
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_BACKGROUND)
    {
        //('uint32_t',) background
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_LINEWIDTH)
    {
        //('uint32_t',) line_width
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_LINESTYLE)
    {
        //('uint32_t',) line_style
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CAPSTYLE)
    {
        //('uint32_t',) cap_style
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_JOINSTYLE)
    {
        //('uint32_t',) join_style
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FILLSTYLE)
    {
        //('uint32_t',) fill_style
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FILLRULE)
    {
        //('uint32_t',) fill_rule
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_TILE)
    {
        //('uint32_t',) tile
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_STIPPLE)
    {
        //('uint32_t',) stipple
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_TILESTIPPLEORIGINX)
    {
        //('int32_t',) tile_stipple_x_origin
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_TILESTIPPLEORIGINY)
    {
        //('int32_t',) tile_stipple_y_origin
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FONT)
    {
        //('uint32_t',) font
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_SUBWINDOWMODE)
    {
        //('uint32_t',) subwindow_mode
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_GRAPHICSEXPOSURES)
    {
        //('uint32_t',) graphics_exposures
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CLIPORIGINX)
    {
        //('int32_t',) clip_x_origin
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CLIPORIGINY)
    {
        //('int32_t',) clip_y_origin
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CLIPMASK)
    {
        //('uint32_t',) clip_mask
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_DASHOFFSET)
    {
        //('uint32_t',) dash_offset
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_DASHLIST)
    {
        //('uint32_t',) dashes
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_ARCMODE)
    {
        //('uint32_t',) arc_mode
        p += 4;
    }

    //switch ends


	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangeGC_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), value_mask, True, True, False, None, False
    uint32_t fieldvalue_value_mask;
    fieldvalue_value_mask = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ChangeGC', 'value_list'), value_list, True, True, False, None, False

    //switch begins

    if (fieldvalue_value_mask & XCB_GC_FUNCTION)
    {
        //('uint32_t',) function
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_PLANEMASK)
    {
        //('uint32_t',) plane_mask
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FOREGROUND)
    {
        //('uint32_t',) foreground
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_BACKGROUND)
    {
        //('uint32_t',) background
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_LINEWIDTH)
    {
        //('uint32_t',) line_width
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_LINESTYLE)
    {
        //('uint32_t',) line_style
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CAPSTYLE)
    {
        //('uint32_t',) cap_style
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_JOINSTYLE)
    {
        //('uint32_t',) join_style
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FILLSTYLE)
    {
        //('uint32_t',) fill_style
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FILLRULE)
    {
        //('uint32_t',) fill_rule
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_TILE)
    {
        //('uint32_t',) tile
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_STIPPLE)
    {
        //('uint32_t',) stipple
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_TILESTIPPLEORIGINX)
    {
        //('int32_t',) tile_stipple_x_origin
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_TILESTIPPLEORIGINY)
    {
        //('int32_t',) tile_stipple_y_origin
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FONT)
    {
        //('uint32_t',) font
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_SUBWINDOWMODE)
    {
        //('uint32_t',) subwindow_mode
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_GRAPHICSEXPOSURES)
    {
        //('uint32_t',) graphics_exposures
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CLIPORIGINX)
    {
        //('int32_t',) clip_x_origin
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CLIPORIGINY)
    {
        //('int32_t',) clip_y_origin
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CLIPMASK)
    {
        //('uint32_t',) clip_mask
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_DASHOFFSET)
    {
        //('uint32_t',) dash_offset
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_DASHLIST)
    {
        //('uint32_t',) dashes
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_ARCMODE)
    {
        //('uint32_t',) arc_mode
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    //switch ends


	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangeGC_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), value_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_value_mask;
    fieldvalue_value_mask = *(uint32_t*)p;
    p += 4;

    //('xcb', 'ChangeGC', 'value_list'), value_list, True, True, False, None, False

    //switch begins

    if (fieldvalue_value_mask & XCB_GC_FUNCTION)
    {
        //('uint32_t',) function
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_PLANEMASK)
    {
        //('uint32_t',) plane_mask
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FOREGROUND)
    {
        //('uint32_t',) foreground
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_BACKGROUND)
    {
        //('uint32_t',) background
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_LINEWIDTH)
    {
        //('uint32_t',) line_width
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_LINESTYLE)
    {
        //('uint32_t',) line_style
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CAPSTYLE)
    {
        //('uint32_t',) cap_style
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_JOINSTYLE)
    {
        //('uint32_t',) join_style
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FILLSTYLE)
    {
        //('uint32_t',) fill_style
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FILLRULE)
    {
        //('uint32_t',) fill_rule
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_TILE)
    {
        //('uint32_t',) tile
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_STIPPLE)
    {
        //('uint32_t',) stipple
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_TILESTIPPLEORIGINX)
    {
        //('int32_t',) tile_stipple_x_origin
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_TILESTIPPLEORIGINY)
    {
        //('int32_t',) tile_stipple_y_origin
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FONT)
    {
        //('uint32_t',) font
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_SUBWINDOWMODE)
    {
        //('uint32_t',) subwindow_mode
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_GRAPHICSEXPOSURES)
    {
        //('uint32_t',) graphics_exposures
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CLIPORIGINX)
    {
        //('int32_t',) clip_x_origin
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CLIPORIGINY)
    {
        //('int32_t',) clip_y_origin
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CLIPMASK)
    {
        //('uint32_t',) clip_mask
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_DASHOFFSET)
    {
        //('uint32_t',) dash_offset
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_DASHLIST)
    {
        //('uint32_t',) dashes
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_ARCMODE)
    {
        //('uint32_t',) arc_mode
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    //switch ends


	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangeGC_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    p += 4;

    //('uint32_t',), value_mask, True, True, False, None, False
    uint32_t fieldvalue_value_mask;
    fieldvalue_value_mask = *(uint32_t*)p;
    p += 4;

    //('xcb', 'ChangeGC', 'value_list'), value_list, True, True, False, None, False

    //switch begins

    if (fieldvalue_value_mask & XCB_GC_FUNCTION)
    {
        //('uint32_t',) function
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_PLANEMASK)
    {
        //('uint32_t',) plane_mask
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FOREGROUND)
    {
        //('uint32_t',) foreground
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_BACKGROUND)
    {
        //('uint32_t',) background
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_LINEWIDTH)
    {
        //('uint32_t',) line_width
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_LINESTYLE)
    {
        //('uint32_t',) line_style
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CAPSTYLE)
    {
        //('uint32_t',) cap_style
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_JOINSTYLE)
    {
        //('uint32_t',) join_style
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FILLSTYLE)
    {
        //('uint32_t',) fill_style
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FILLRULE)
    {
        //('uint32_t',) fill_rule
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_TILE)
    {
        //('uint32_t',) tile
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_STIPPLE)
    {
        //('uint32_t',) stipple
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_TILESTIPPLEORIGINX)
    {
        //('int32_t',) tile_stipple_x_origin
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_TILESTIPPLEORIGINY)
    {
        //('int32_t',) tile_stipple_y_origin
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_FONT)
    {
        //('uint32_t',) font
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_SUBWINDOWMODE)
    {
        //('uint32_t',) subwindow_mode
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_GRAPHICSEXPOSURES)
    {
        //('uint32_t',) graphics_exposures
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CLIPORIGINX)
    {
        //('int32_t',) clip_x_origin
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CLIPORIGINY)
    {
        //('int32_t',) clip_y_origin
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_CLIPMASK)
    {
        //('uint32_t',) clip_mask
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_DASHOFFSET)
    {
        //('uint32_t',) dash_offset
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_DASHLIST)
    {
        //('uint32_t',) dashes
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_GC_ARCMODE)
    {
        //('uint32_t',) arc_mode
        p += 4;
    }

    //switch ends


	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CopyGC_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'GCONTEXT'), src_gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), dst_gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), value_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CopyGC_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'GCONTEXT'), src_gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), dst_gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), value_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CopyGC_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'GCONTEXT'), src_gc, True, True, False, None, False
    p += 4;

    //('xcb', 'GCONTEXT'), dst_gc, True, True, False, None, False
    p += 4;

    //('uint32_t',), value_mask, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetDashes_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), dash_offset, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), dashes_len, True, True, False, None, False
    uint16_t fieldvalue_dashes_len;
    fieldvalue_dashes_len = *(uint16_t*)p;
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), dashes, True, True, False, None, False
    {
        unsigned int i_dashes_len;
        for(i_dashes_len = 0; i_dashes_len < fieldvalue_dashes_len; i_dashes_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetDashes_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), dash_offset, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), dashes_len, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    uint16_t fieldvalue_dashes_len;
    fieldvalue_dashes_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), dashes, True, True, False, None, False
    {
        unsigned int i_dashes_len;
        for(i_dashes_len = 0; i_dashes_len < fieldvalue_dashes_len; i_dashes_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetDashes_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    p += 4;

    //('uint16_t',), dash_offset, True, True, False, None, False
    p += 2;

    //('uint16_t',), dashes_len, True, True, False, None, False
    uint16_t fieldvalue_dashes_len;
    fieldvalue_dashes_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), dashes, True, True, False, None, False
    {
        unsigned int i_dashes_len;
        for(i_dashes_len = 0; i_dashes_len < fieldvalue_dashes_len; i_dashes_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_clip_ordering {
    XCB_CLIP_ORDERING_YSORTED = 1,
    XCB_CLIP_ORDERING_UNSORTED = 0,
    XCB_CLIP_ORDERING_YXBANDED = 3,
    XCB_CLIP_ORDERING_YXSORTED = 2,
} xcb_clip_ordering_t;

int
xcb_SetClipRectangles_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), ordering, True, True, False, ClipOrdering, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), clip_x_origin, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), clip_y_origin, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint32_t',), rectangles_len, True, False, False, None, False
    uint32_t fieldvalue_rectangles_len;
    fieldvalue_rectangles_len = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'RECTANGLE'), rectangles, True, True, False, None, False
    {
        unsigned int i_rectangles_len;
        for(i_rectangles_len = 0; i_rectangles_len < fieldvalue_rectangles_len; i_rectangles_len++)
        {
            if(xcb_RECTANGLE_SwapToClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetClipRectangles_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), ordering, True, True, False, ClipOrdering, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), clip_x_origin, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), clip_y_origin, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint32_t',), rectangles_len, True, False, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_rectangles_len;
    fieldvalue_rectangles_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'RECTANGLE'), rectangles, True, True, False, None, False
    {
        unsigned int i_rectangles_len;
        for(i_rectangles_len = 0; i_rectangles_len < fieldvalue_rectangles_len; i_rectangles_len++)
        {
            if(xcb_RECTANGLE_SwapFromClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetClipRectangles_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), ordering, True, True, False, ClipOrdering, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    p += 4;

    //('int16_t',), clip_x_origin, True, True, False, None, False
    p += 2;

    //('int16_t',), clip_y_origin, True, True, False, None, False
    p += 2;

    //('uint32_t',), rectangles_len, True, False, False, None, False
    uint32_t fieldvalue_rectangles_len;
    fieldvalue_rectangles_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'RECTANGLE'), rectangles, True, True, False, None, False
    {
        unsigned int i_rectangles_len;
        for(i_rectangles_len = 0; i_rectangles_len < fieldvalue_rectangles_len; i_rectangles_len++)
        {
            if(xcb_RECTANGLE_Check(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FreeGC_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FreeGC_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FreeGC_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ClearArea_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), exposures, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ClearArea_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), exposures, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ClearArea_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), exposures, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CopyArea_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'DRAWABLE'), src_drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'DRAWABLE'), dst_drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), src_x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), src_y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), dst_x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), dst_y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CopyArea_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), src_drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'DRAWABLE'), dst_drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), src_x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), src_y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), dst_x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), dst_y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CopyArea_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), src_drawable, True, True, False, None, False
    p += 4;

    //('xcb', 'DRAWABLE'), dst_drawable, True, True, False, None, False
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    p += 4;

    //('int16_t',), src_x, True, True, False, None, False
    p += 2;

    //('int16_t',), src_y, True, True, False, None, False
    p += 2;

    //('int16_t',), dst_x, True, True, False, None, False
    p += 2;

    //('int16_t',), dst_y, True, True, False, None, False
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CopyPlane_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'DRAWABLE'), src_drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'DRAWABLE'), dst_drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), src_x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), src_y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), dst_x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), dst_y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint32_t',), bit_plane, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CopyPlane_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), src_drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'DRAWABLE'), dst_drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), src_x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), src_y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), dst_x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), dst_y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint32_t',), bit_plane, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CopyPlane_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), src_drawable, True, True, False, None, False
    p += 4;

    //('xcb', 'DRAWABLE'), dst_drawable, True, True, False, None, False
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    p += 4;

    //('int16_t',), src_x, True, True, False, None, False
    p += 2;

    //('int16_t',), src_y, True, True, False, None, False
    p += 2;

    //('int16_t',), dst_x, True, True, False, None, False
    p += 2;

    //('int16_t',), dst_y, True, True, False, None, False
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    p += 2;

    //('uint32_t',), bit_plane, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_coord_mode {
    XCB_COORD_MODE_PREVIOUS = 1,
    XCB_COORD_MODE_ORIGIN = 0,
} xcb_coord_mode_t;

int
xcb_PolyPoint_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), coordinate_mode, True, True, False, CoordMode, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), points_len, True, False, False, None, False
    uint32_t fieldvalue_points_len;
    fieldvalue_points_len = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'POINT'), points, True, True, False, None, False
    {
        unsigned int i_points_len;
        for(i_points_len = 0; i_points_len < fieldvalue_points_len; i_points_len++)
        {
            if(xcb_POINT_SwapToClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyPoint_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), coordinate_mode, True, True, False, CoordMode, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), points_len, True, False, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_points_len;
    fieldvalue_points_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'POINT'), points, True, True, False, None, False
    {
        unsigned int i_points_len;
        for(i_points_len = 0; i_points_len < fieldvalue_points_len; i_points_len++)
        {
            if(xcb_POINT_SwapFromClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyPoint_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), coordinate_mode, True, True, False, CoordMode, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    p += 4;

    //('uint32_t',), points_len, True, False, False, None, False
    uint32_t fieldvalue_points_len;
    fieldvalue_points_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'POINT'), points, True, True, False, None, False
    {
        unsigned int i_points_len;
        for(i_points_len = 0; i_points_len < fieldvalue_points_len; i_points_len++)
        {
            if(xcb_POINT_Check(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyLine_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), coordinate_mode, True, True, False, CoordMode, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), points_len, True, False, False, None, False
    uint32_t fieldvalue_points_len;
    fieldvalue_points_len = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'POINT'), points, True, True, False, None, False
    {
        unsigned int i_points_len;
        for(i_points_len = 0; i_points_len < fieldvalue_points_len; i_points_len++)
        {
            if(xcb_POINT_SwapToClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyLine_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), coordinate_mode, True, True, False, CoordMode, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), points_len, True, False, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_points_len;
    fieldvalue_points_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'POINT'), points, True, True, False, None, False
    {
        unsigned int i_points_len;
        for(i_points_len = 0; i_points_len < fieldvalue_points_len; i_points_len++)
        {
            if(xcb_POINT_SwapFromClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyLine_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), coordinate_mode, True, True, False, CoordMode, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    p += 4;

    //('uint32_t',), points_len, True, False, False, None, False
    uint32_t fieldvalue_points_len;
    fieldvalue_points_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'POINT'), points, True, True, False, None, False
    {
        unsigned int i_points_len;
        for(i_points_len = 0; i_points_len < fieldvalue_points_len; i_points_len++)
        {
            if(xcb_POINT_Check(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SEGMENT_SwapToClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('int16_t',), x1, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y1, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), x2, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y2, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SEGMENT_SwapFromClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('int16_t',), x1, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y1, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), x2, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y2, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SEGMENT_Check(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('int16_t',), x1, True, True, False, None, False
    p += 2;

    //('int16_t',), y1, True, True, False, None, False
    p += 2;

    //('int16_t',), x2, True, True, False, None, False
    p += 2;

    //('int16_t',), y2, True, True, False, None, False
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolySegment_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), segments_len, True, False, False, None, False
    uint32_t fieldvalue_segments_len;
    fieldvalue_segments_len = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'SEGMENT'), segments, True, True, False, None, False
    {
        unsigned int i_segments_len;
        for(i_segments_len = 0; i_segments_len < fieldvalue_segments_len; i_segments_len++)
        {
            if(xcb_SEGMENT_SwapToClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolySegment_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), segments_len, True, False, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_segments_len;
    fieldvalue_segments_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'SEGMENT'), segments, True, True, False, None, False
    {
        unsigned int i_segments_len;
        for(i_segments_len = 0; i_segments_len < fieldvalue_segments_len; i_segments_len++)
        {
            if(xcb_SEGMENT_SwapFromClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolySegment_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    p += 4;

    //('uint32_t',), segments_len, True, False, False, None, False
    uint32_t fieldvalue_segments_len;
    fieldvalue_segments_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'SEGMENT'), segments, True, True, False, None, False
    {
        unsigned int i_segments_len;
        for(i_segments_len = 0; i_segments_len < fieldvalue_segments_len; i_segments_len++)
        {
            if(xcb_SEGMENT_Check(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyRectangle_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), rectangles_len, True, False, False, None, False
    uint32_t fieldvalue_rectangles_len;
    fieldvalue_rectangles_len = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'RECTANGLE'), rectangles, True, True, False, None, False
    {
        unsigned int i_rectangles_len;
        for(i_rectangles_len = 0; i_rectangles_len < fieldvalue_rectangles_len; i_rectangles_len++)
        {
            if(xcb_RECTANGLE_SwapToClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyRectangle_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), rectangles_len, True, False, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_rectangles_len;
    fieldvalue_rectangles_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'RECTANGLE'), rectangles, True, True, False, None, False
    {
        unsigned int i_rectangles_len;
        for(i_rectangles_len = 0; i_rectangles_len < fieldvalue_rectangles_len; i_rectangles_len++)
        {
            if(xcb_RECTANGLE_SwapFromClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyRectangle_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    p += 4;

    //('uint32_t',), rectangles_len, True, False, False, None, False
    uint32_t fieldvalue_rectangles_len;
    fieldvalue_rectangles_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'RECTANGLE'), rectangles, True, True, False, None, False
    {
        unsigned int i_rectangles_len;
        for(i_rectangles_len = 0; i_rectangles_len < fieldvalue_rectangles_len; i_rectangles_len++)
        {
            if(xcb_RECTANGLE_Check(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyArc_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), arcs_len, True, False, False, None, False
    uint32_t fieldvalue_arcs_len;
    fieldvalue_arcs_len = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ARC'), arcs, True, True, False, None, False
    {
        unsigned int i_arcs_len;
        for(i_arcs_len = 0; i_arcs_len < fieldvalue_arcs_len; i_arcs_len++)
        {
            if(xcb_ARC_SwapToClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyArc_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), arcs_len, True, False, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_arcs_len;
    fieldvalue_arcs_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'ARC'), arcs, True, True, False, None, False
    {
        unsigned int i_arcs_len;
        for(i_arcs_len = 0; i_arcs_len < fieldvalue_arcs_len; i_arcs_len++)
        {
            if(xcb_ARC_SwapFromClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyArc_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    p += 4;

    //('uint32_t',), arcs_len, True, False, False, None, False
    uint32_t fieldvalue_arcs_len;
    fieldvalue_arcs_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'ARC'), arcs, True, True, False, None, False
    {
        unsigned int i_arcs_len;
        for(i_arcs_len = 0; i_arcs_len < fieldvalue_arcs_len; i_arcs_len++)
        {
            if(xcb_ARC_Check(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_poly_shape {
    XCB_POLY_SHAPE_NONCONVEX = 1,
    XCB_POLY_SHAPE_COMPLEX = 0,
    XCB_POLY_SHAPE_CONVEX = 2,
} xcb_poly_shape_t;

int
xcb_FillPoly_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint8_t',), shape, True, True, False, PolyShape, False
    p += 1;

    //('uint8_t',), coordinate_mode, True, True, False, CoordMode, False
    p += 1;

    //('uint8_t',), pad1, False, True, False, CoordMode, False
    p += 2;

    //('uint32_t',), points_len, True, False, False, CoordMode, False
    uint32_t fieldvalue_points_len;
    fieldvalue_points_len = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'POINT'), points, True, True, False, CoordMode, False
    {
        unsigned int i_points_len;
        for(i_points_len = 0; i_points_len < fieldvalue_points_len; i_points_len++)
        {
            if(xcb_POINT_SwapToClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FillPoly_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint8_t',), shape, True, True, False, PolyShape, False
    p += 1;

    //('uint8_t',), coordinate_mode, True, True, False, CoordMode, False
    p += 1;

    //('uint8_t',), pad1, False, True, False, CoordMode, False
    p += 2;

    //('uint32_t',), points_len, True, False, False, CoordMode, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_points_len;
    fieldvalue_points_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'POINT'), points, True, True, False, CoordMode, False
    {
        unsigned int i_points_len;
        for(i_points_len = 0; i_points_len < fieldvalue_points_len; i_points_len++)
        {
            if(xcb_POINT_SwapFromClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FillPoly_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    p += 4;

    //('uint8_t',), shape, True, True, False, PolyShape, False
    p += 1;

    //('uint8_t',), coordinate_mode, True, True, False, CoordMode, False
    p += 1;

    //('uint8_t',), pad1, False, True, False, CoordMode, False
    p += 2;

    //('uint32_t',), points_len, True, False, False, CoordMode, False
    uint32_t fieldvalue_points_len;
    fieldvalue_points_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'POINT'), points, True, True, False, CoordMode, False
    {
        unsigned int i_points_len;
        for(i_points_len = 0; i_points_len < fieldvalue_points_len; i_points_len++)
        {
            if(xcb_POINT_Check(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyFillRectangle_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), rectangles_len, True, False, False, None, False
    uint32_t fieldvalue_rectangles_len;
    fieldvalue_rectangles_len = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'RECTANGLE'), rectangles, True, True, False, None, False
    {
        unsigned int i_rectangles_len;
        for(i_rectangles_len = 0; i_rectangles_len < fieldvalue_rectangles_len; i_rectangles_len++)
        {
            if(xcb_RECTANGLE_SwapToClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyFillRectangle_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), rectangles_len, True, False, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_rectangles_len;
    fieldvalue_rectangles_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'RECTANGLE'), rectangles, True, True, False, None, False
    {
        unsigned int i_rectangles_len;
        for(i_rectangles_len = 0; i_rectangles_len < fieldvalue_rectangles_len; i_rectangles_len++)
        {
            if(xcb_RECTANGLE_SwapFromClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyFillRectangle_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    p += 4;

    //('uint32_t',), rectangles_len, True, False, False, None, False
    uint32_t fieldvalue_rectangles_len;
    fieldvalue_rectangles_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'RECTANGLE'), rectangles, True, True, False, None, False
    {
        unsigned int i_rectangles_len;
        for(i_rectangles_len = 0; i_rectangles_len < fieldvalue_rectangles_len; i_rectangles_len++)
        {
            if(xcb_RECTANGLE_Check(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyFillArc_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), arcs_len, True, False, False, None, False
    uint32_t fieldvalue_arcs_len;
    fieldvalue_arcs_len = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ARC'), arcs, True, True, False, None, False
    {
        unsigned int i_arcs_len;
        for(i_arcs_len = 0; i_arcs_len < fieldvalue_arcs_len; i_arcs_len++)
        {
            if(xcb_ARC_SwapToClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyFillArc_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), arcs_len, True, False, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_arcs_len;
    fieldvalue_arcs_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'ARC'), arcs, True, True, False, None, False
    {
        unsigned int i_arcs_len;
        for(i_arcs_len = 0; i_arcs_len < fieldvalue_arcs_len; i_arcs_len++)
        {
            if(xcb_ARC_SwapFromClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyFillArc_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    p += 4;

    //('uint32_t',), arcs_len, True, False, False, None, False
    uint32_t fieldvalue_arcs_len;
    fieldvalue_arcs_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'ARC'), arcs, True, True, False, None, False
    {
        unsigned int i_arcs_len;
        for(i_arcs_len = 0; i_arcs_len < fieldvalue_arcs_len; i_arcs_len++)
        {
            if(xcb_ARC_Check(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_image_format {
    XCB_IMAGE_FORMAT_XYPIXMAP = 1,
    XCB_IMAGE_FORMAT_XYBITMAP = 0,
    XCB_IMAGE_FORMAT_ZPIXMAP = 2,
} xcb_image_format_t;

int
xcb_PutImage_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), format, True, True, False, ImageFormat, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), dst_x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), dst_y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), left_pad, True, True, False, None, False
    p += 1;

    //('uint8_t',), depth, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

    //('uint32_t',), data_len, True, False, False, None, False
    uint32_t fieldvalue_data_len;
    fieldvalue_data_len = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint8_t',), data, True, True, False, None, False
    {
        unsigned int i_data_len;
        for(i_data_len = 0; i_data_len < fieldvalue_data_len; i_data_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PutImage_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), format, True, True, False, ImageFormat, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), dst_x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), dst_y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), left_pad, True, True, False, None, False
    p += 1;

    //('uint8_t',), depth, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

    //('uint32_t',), data_len, True, False, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_data_len;
    fieldvalue_data_len = *(uint32_t*)p;
    p += 4;

    //('uint8_t',), data, True, True, False, None, False
    {
        unsigned int i_data_len;
        for(i_data_len = 0; i_data_len < fieldvalue_data_len; i_data_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PutImage_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), format, True, True, False, ImageFormat, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    p += 4;

    //('uint16_t',), width, True, True, False, None, False
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    p += 2;

    //('int16_t',), dst_x, True, True, False, None, False
    p += 2;

    //('int16_t',), dst_y, True, True, False, None, False
    p += 2;

    //('uint8_t',), left_pad, True, True, False, None, False
    p += 1;

    //('uint8_t',), depth, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

    //('uint32_t',), data_len, True, False, False, None, False
    uint32_t fieldvalue_data_len;
    fieldvalue_data_len = *(uint32_t*)p;
    p += 4;

    //('uint8_t',), data, True, True, False, None, False
    {
        unsigned int i_data_len;
        for(i_data_len = 0; i_data_len < fieldvalue_data_len; i_data_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetImage_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), format, True, True, False, ImageFormat, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint32_t',), plane_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetImage_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), format, True, True, False, ImageFormat, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint32_t',), plane_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetImage_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), format, True, True, False, ImageFormat, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    p += 2;

    //('uint16_t',), width, True, True, False, None, False
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    p += 2;

    //('uint32_t',), plane_mask, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyText8_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint32_t',), items_len, True, False, False, None, False
    uint32_t fieldvalue_items_len;
    fieldvalue_items_len = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint8_t',), items, True, True, False, None, False
    {
        unsigned int i_items_len;
        for(i_items_len = 0; i_items_len < fieldvalue_items_len; i_items_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyText8_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint32_t',), items_len, True, False, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_items_len;
    fieldvalue_items_len = *(uint32_t*)p;
    p += 4;

    //('uint8_t',), items, True, True, False, None, False
    {
        unsigned int i_items_len;
        for(i_items_len = 0; i_items_len < fieldvalue_items_len; i_items_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyText8_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    p += 2;

    //('uint32_t',), items_len, True, False, False, None, False
    uint32_t fieldvalue_items_len;
    fieldvalue_items_len = *(uint32_t*)p;
    p += 4;

    //('uint8_t',), items, True, True, False, None, False
    {
        unsigned int i_items_len;
        for(i_items_len = 0; i_items_len < fieldvalue_items_len; i_items_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyText16_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint32_t',), items_len, True, False, False, None, False
    uint32_t fieldvalue_items_len;
    fieldvalue_items_len = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint8_t',), items, True, True, False, None, False
    {
        unsigned int i_items_len;
        for(i_items_len = 0; i_items_len < fieldvalue_items_len; i_items_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyText16_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint32_t',), items_len, True, False, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_items_len;
    fieldvalue_items_len = *(uint32_t*)p;
    p += 4;

    //('uint8_t',), items, True, True, False, None, False
    {
        unsigned int i_items_len;
        for(i_items_len = 0; i_items_len < fieldvalue_items_len; i_items_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_PolyText16_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    p += 2;

    //('uint32_t',), items_len, True, False, False, None, False
    uint32_t fieldvalue_items_len;
    fieldvalue_items_len = *(uint32_t*)p;
    p += 4;

    //('uint8_t',), items, True, True, False, None, False
    {
        unsigned int i_items_len;
        for(i_items_len = 0; i_items_len < fieldvalue_items_len; i_items_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ImageText8_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), string_len, True, True, False, None, False
    uint8_t fieldvalue_string_len;
    fieldvalue_string_len = *(uint8_t*)p;
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('char',), string, True, True, False, None, False
    {
        unsigned int i_string_len;
        for(i_string_len = 0; i_string_len < fieldvalue_string_len; i_string_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ImageText8_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), string_len, True, True, False, None, False
    uint8_t fieldvalue_string_len;
    fieldvalue_string_len = *(uint8_t*)p;
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('char',), string, True, True, False, None, False
    {
        unsigned int i_string_len;
        for(i_string_len = 0; i_string_len < fieldvalue_string_len; i_string_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ImageText8_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), string_len, True, True, False, None, False
    uint8_t fieldvalue_string_len;
    fieldvalue_string_len = *(uint8_t*)p;
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    p += 2;

    //('char',), string, True, True, False, None, False
    {
        unsigned int i_string_len;
        for(i_string_len = 0; i_string_len < fieldvalue_string_len; i_string_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ImageText16_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), string_len, True, True, False, None, False
    uint8_t fieldvalue_string_len;
    fieldvalue_string_len = *(uint8_t*)p;
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'CHAR2B'), string, True, True, False, None, False
    {
        unsigned int i_string_len;
        for(i_string_len = 0; i_string_len < fieldvalue_string_len; i_string_len++)
        {
            if(xcb_CHAR2B_SwapToClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ImageText16_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), string_len, True, True, False, None, False
    uint8_t fieldvalue_string_len;
    fieldvalue_string_len = *(uint8_t*)p;
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'CHAR2B'), string, True, True, False, None, False
    {
        unsigned int i_string_len;
        for(i_string_len = 0; i_string_len < fieldvalue_string_len; i_string_len++)
        {
            if(xcb_CHAR2B_SwapFromClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ImageText16_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), string_len, True, True, False, None, False
    uint8_t fieldvalue_string_len;
    fieldvalue_string_len = *(uint8_t*)p;
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    p += 4;

    //('xcb', 'GCONTEXT'), gc, True, True, False, None, False
    p += 4;

    //('int16_t',), x, True, True, False, None, False
    p += 2;

    //('int16_t',), y, True, True, False, None, False
    p += 2;

    //('xcb', 'CHAR2B'), string, True, True, False, None, False
    {
        unsigned int i_string_len;
        for(i_string_len = 0; i_string_len < fieldvalue_string_len; i_string_len++)
        {
            if(xcb_CHAR2B_Check(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_colormap_alloc {
    XCB_COLORMAP_ALLOC_ALL = 1,
    XCB_COLORMAP_ALLOC_NONE = 0,
} xcb_colormap_alloc_t;

int
xcb_CreateColormap_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), alloc, True, True, False, ColormapAlloc, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'COLORMAP'), mid, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'VISUALID'), visual, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CreateColormap_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), alloc, True, True, False, ColormapAlloc, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), mid, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'VISUALID'), visual, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CreateColormap_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), alloc, True, True, False, ColormapAlloc, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), mid, True, True, False, None, False
    p += 4;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

    //('xcb', 'VISUALID'), visual, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FreeColormap_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FreeColormap_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FreeColormap_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CopyColormapAndFree_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'COLORMAP'), mid, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'COLORMAP'), src_cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CopyColormapAndFree_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), mid, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'COLORMAP'), src_cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CopyColormapAndFree_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), mid, True, True, False, None, False
    p += 4;

    //('xcb', 'COLORMAP'), src_cmap, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_InstallColormap_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_InstallColormap_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_InstallColormap_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UninstallColormap_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UninstallColormap_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_UninstallColormap_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ListInstalledColormaps_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ListInstalledColormaps_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ListInstalledColormaps_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_AllocColor_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), red, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), green, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), blue, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_AllocColor_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), red, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), green, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), blue, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_AllocColor_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    p += 4;

    //('uint16_t',), red, True, True, False, None, False
    p += 2;

    //('uint16_t',), green, True, True, False, None, False
    p += 2;

    //('uint16_t',), blue, True, True, False, None, False
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_AllocNamedColor_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), name_len, True, True, False, None, False
    uint16_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint16_t*)p;
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_AllocNamedColor_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), name_len, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    uint16_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_AllocNamedColor_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    p += 4;

    //('uint16_t',), name_len, True, True, False, None, False
    uint16_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_AllocColorCells_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), contiguous, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), colors, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), planes, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_AllocColorCells_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), contiguous, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), colors, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), planes, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_AllocColorCells_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), contiguous, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    p += 4;

    //('uint16_t',), colors, True, True, False, None, False
    p += 2;

    //('uint16_t',), planes, True, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_AllocColorPlanes_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), contiguous, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), colors, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), reds, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), greens, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), blues, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_AllocColorPlanes_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), contiguous, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), colors, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), reds, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), greens, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), blues, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_AllocColorPlanes_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), contiguous, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    p += 4;

    //('uint16_t',), colors, True, True, False, None, False
    p += 2;

    //('uint16_t',), reds, True, True, False, None, False
    p += 2;

    //('uint16_t',), greens, True, True, False, None, False
    p += 2;

    //('uint16_t',), blues, True, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FreeColors_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), plane_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), pixels_len, True, False, False, None, False
    uint32_t fieldvalue_pixels_len;
    fieldvalue_pixels_len = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), pixels, True, True, False, None, False
    {
        unsigned int i_pixels_len;
        for(i_pixels_len = 0; i_pixels_len < fieldvalue_pixels_len; i_pixels_len++)
        {
            if( p + 4 > (uint8_t*)afterEnd)
            {
                return BadLength;
            }
            swapl((uint32_t*)p);
            p += 4;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FreeColors_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), plane_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), pixels_len, True, False, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_pixels_len;
    fieldvalue_pixels_len = *(uint32_t*)p;
    p += 4;

    //('uint32_t',), pixels, True, True, False, None, False
    {
        unsigned int i_pixels_len;
        for(i_pixels_len = 0; i_pixels_len < fieldvalue_pixels_len; i_pixels_len++)
        {
            if( p + 4 > (uint8_t*)afterEnd)
            {
                return BadLength;
            }
            swapl((uint32_t*)p);
            p += 4;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FreeColors_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    p += 4;

    //('uint32_t',), plane_mask, True, True, False, None, False
    p += 4;

    //('uint32_t',), pixels_len, True, False, False, None, False
    uint32_t fieldvalue_pixels_len;
    fieldvalue_pixels_len = *(uint32_t*)p;
    p += 4;

    //('uint32_t',), pixels, True, True, False, None, False
    {
        unsigned int i_pixels_len;
        for(i_pixels_len = 0; i_pixels_len < fieldvalue_pixels_len; i_pixels_len++)
        {
            p += 4;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_color_flag {
    XCB_COLOR_FLAG_RED = 1,
    XCB_COLOR_FLAG_GREEN = 2,
    XCB_COLOR_FLAG_BLUE = 4,
} xcb_color_flag_t;

int
xcb_COLORITEM_SwapToClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint32_t',), pixel, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), red, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), green, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), blue, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), flags, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_COLORITEM_SwapFromClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint32_t',), pixel, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), red, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), green, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), blue, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), flags, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_COLORITEM_Check(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint32_t',), pixel, True, True, False, None, False
    p += 4;

    //('uint16_t',), red, True, True, False, None, False
    p += 2;

    //('uint16_t',), green, True, True, False, None, False
    p += 2;

    //('uint16_t',), blue, True, True, False, None, False
    p += 2;

    //('uint8_t',), flags, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_StoreColors_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), items_len, True, False, False, None, False
    uint32_t fieldvalue_items_len;
    fieldvalue_items_len = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'COLORITEM'), items, True, True, False, None, False
    {
        unsigned int i_items_len;
        for(i_items_len = 0; i_items_len < fieldvalue_items_len; i_items_len++)
        {
            if(xcb_COLORITEM_SwapToClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_StoreColors_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), items_len, True, False, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_items_len;
    fieldvalue_items_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'COLORITEM'), items, True, True, False, None, False
    {
        unsigned int i_items_len;
        for(i_items_len = 0; i_items_len < fieldvalue_items_len; i_items_len++)
        {
            if(xcb_COLORITEM_SwapFromClient(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_StoreColors_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterStruct = NULL;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    p += 4;

    //('uint32_t',), items_len, True, False, False, None, False
    uint32_t fieldvalue_items_len;
    fieldvalue_items_len = *(uint32_t*)p;
    p += 4;

    //('xcb', 'COLORITEM'), items, True, True, False, None, False
    {
        unsigned int i_items_len;
        for(i_items_len = 0; i_items_len < fieldvalue_items_len; i_items_len++)
        {
            if(xcb_COLORITEM_Check(p, afterEnd, &afterStruct) != Success)
			return BadLength;
            p = afterStruct;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_StoreNamedColor_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), flags, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), pixel, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), name_len, True, True, False, None, False
    uint16_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint16_t*)p;
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_StoreNamedColor_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), flags, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), pixel, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), name_len, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    uint16_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_StoreNamedColor_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), flags, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    p += 4;

    //('uint32_t',), pixel, True, True, False, None, False
    p += 4;

    //('uint16_t',), name_len, True, True, False, None, False
    uint16_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_RGB_SwapToClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint16_t',), red, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), green, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), blue, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_RGB_SwapFromClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint16_t',), red, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), green, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), blue, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_RGB_Check(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint16_t',), red, True, True, False, None, False
    p += 2;

    //('uint16_t',), green, True, True, False, None, False
    p += 2;

    //('uint16_t',), blue, True, True, False, None, False
    p += 2;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryColors_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), pixels_len, True, False, False, None, False
    uint32_t fieldvalue_pixels_len;
    fieldvalue_pixels_len = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), pixels, True, True, False, None, False
    {
        unsigned int i_pixels_len;
        for(i_pixels_len = 0; i_pixels_len < fieldvalue_pixels_len; i_pixels_len++)
        {
            if( p + 4 > (uint8_t*)afterEnd)
            {
                return BadLength;
            }
            swapl((uint32_t*)p);
            p += 4;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryColors_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint32_t',), pixels_len, True, False, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_pixels_len;
    fieldvalue_pixels_len = *(uint32_t*)p;
    p += 4;

    //('uint32_t',), pixels, True, True, False, None, False
    {
        unsigned int i_pixels_len;
        for(i_pixels_len = 0; i_pixels_len < fieldvalue_pixels_len; i_pixels_len++)
        {
            if( p + 4 > (uint8_t*)afterEnd)
            {
                return BadLength;
            }
            swapl((uint32_t*)p);
            p += 4;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryColors_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    p += 4;

    //('uint32_t',), pixels_len, True, False, False, None, False
    uint32_t fieldvalue_pixels_len;
    fieldvalue_pixels_len = *(uint32_t*)p;
    p += 4;

    //('uint32_t',), pixels, True, True, False, None, False
    {
        unsigned int i_pixels_len;
        for(i_pixels_len = 0; i_pixels_len < fieldvalue_pixels_len; i_pixels_len++)
        {
            p += 4;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_LookupColor_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), name_len, True, True, False, None, False
    uint16_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint16_t*)p;
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_LookupColor_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), name_len, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    uint16_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_LookupColor_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'COLORMAP'), cmap, True, True, False, None, False
    p += 4;

    //('uint16_t',), name_len, True, True, False, None, False
    uint16_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_pixmap {
    XCB_PIXMAP_NONE = 0,
} xcb_pixmap_t;

int
xcb_CreateCursor_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'CURSOR'), cid, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'PIXMAP'), source, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'PIXMAP'), mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), fore_red, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), fore_green, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), fore_blue, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), back_red, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), back_green, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), back_blue, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CreateCursor_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'CURSOR'), cid, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'PIXMAP'), source, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'PIXMAP'), mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), fore_red, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), fore_green, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), fore_blue, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), back_red, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), back_green, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), back_blue, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), x, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), y, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CreateCursor_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'CURSOR'), cid, True, True, False, None, False
    p += 4;

    //('xcb', 'PIXMAP'), source, True, True, False, None, False
    p += 4;

    //('xcb', 'PIXMAP'), mask, True, True, False, None, False
    p += 4;

    //('uint16_t',), fore_red, True, True, False, None, False
    p += 2;

    //('uint16_t',), fore_green, True, True, False, None, False
    p += 2;

    //('uint16_t',), fore_blue, True, True, False, None, False
    p += 2;

    //('uint16_t',), back_red, True, True, False, None, False
    p += 2;

    //('uint16_t',), back_green, True, True, False, None, False
    p += 2;

    //('uint16_t',), back_blue, True, True, False, None, False
    p += 2;

    //('uint16_t',), x, True, True, False, None, False
    p += 2;

    //('uint16_t',), y, True, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_font {
    XCB_FONT_NONE = 0,
} xcb_font_t;

int
xcb_CreateGlyphCursor_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'CURSOR'), cid, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'FONT'), source_font, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'FONT'), mask_font, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), source_char, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), mask_char, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), fore_red, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), fore_green, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), fore_blue, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), back_red, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), back_green, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), back_blue, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CreateGlyphCursor_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'CURSOR'), cid, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'FONT'), source_font, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'FONT'), mask_font, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), source_char, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), mask_char, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), fore_red, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), fore_green, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), fore_blue, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), back_red, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), back_green, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), back_blue, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_CreateGlyphCursor_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'CURSOR'), cid, True, True, False, None, False
    p += 4;

    //('xcb', 'FONT'), source_font, True, True, False, None, False
    p += 4;

    //('xcb', 'FONT'), mask_font, True, True, False, None, False
    p += 4;

    //('uint16_t',), source_char, True, True, False, None, False
    p += 2;

    //('uint16_t',), mask_char, True, True, False, None, False
    p += 2;

    //('uint16_t',), fore_red, True, True, False, None, False
    p += 2;

    //('uint16_t',), fore_green, True, True, False, None, False
    p += 2;

    //('uint16_t',), fore_blue, True, True, False, None, False
    p += 2;

    //('uint16_t',), back_red, True, True, False, None, False
    p += 2;

    //('uint16_t',), back_green, True, True, False, None, False
    p += 2;

    //('uint16_t',), back_blue, True, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FreeCursor_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'CURSOR'), cursor, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FreeCursor_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'CURSOR'), cursor, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_FreeCursor_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'CURSOR'), cursor, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_RecolorCursor_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'CURSOR'), cursor, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), fore_red, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), fore_green, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), fore_blue, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), back_red, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), back_green, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), back_blue, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_RecolorCursor_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'CURSOR'), cursor, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), fore_red, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), fore_green, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), fore_blue, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), back_red, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), back_green, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), back_blue, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_RecolorCursor_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'CURSOR'), cursor, True, True, False, None, False
    p += 4;

    //('uint16_t',), fore_red, True, True, False, None, False
    p += 2;

    //('uint16_t',), fore_green, True, True, False, None, False
    p += 2;

    //('uint16_t',), fore_blue, True, True, False, None, False
    p += 2;

    //('uint16_t',), back_red, True, True, False, None, False
    p += 2;

    //('uint16_t',), back_green, True, True, False, None, False
    p += 2;

    //('uint16_t',), back_blue, True, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_query_shape_of {
    XCB_QUERY_SHAPE_OF_FASTESTTILE = 1,
    XCB_QUERY_SHAPE_OF_LARGESTCURSOR = 0,
    XCB_QUERY_SHAPE_OF_FASTESTSTIPPLE = 2,
} xcb_query_shape_of_t;

int
xcb_QueryBestSize_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), class, True, True, False, QueryShapeOf, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryBestSize_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), class, True, True, False, QueryShapeOf, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), width, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryBestSize_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), class, True, True, False, QueryShapeOf, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'DRAWABLE'), drawable, True, True, False, None, False
    p += 4;

    //('uint16_t',), width, True, True, False, None, False
    p += 2;

    //('uint16_t',), height, True, True, False, None, False
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryExtension_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint16_t',), name_len, True, True, False, None, False
    uint16_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint16_t*)p;
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryExtension_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('uint16_t',), name_len, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    uint16_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_QueryExtension_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('uint16_t',), name_len, True, True, False, None, False
    uint16_t fieldvalue_name_len;
    fieldvalue_name_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), pad1, False, True, False, None, False
    p += 2;

    //('char',), name, True, True, False, None, False
    {
        unsigned int i_name_len;
        for(i_name_len = 0; i_name_len < fieldvalue_name_len; i_name_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ListExtensions_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ListExtensions_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ListExtensions_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangeKeyboardMapping_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), keycode_count, True, True, False, None, False
    uint8_t fieldvalue_keycode_count;
    fieldvalue_keycode_count = *(uint8_t*)p;
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'KEYCODE'), first_keycode, True, True, False, None, False
    p += 1;

    //('uint8_t',), keysyms_per_keycode, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

    //('xcb', 'KEYSYM'), keysyms, True, True, False, None, False
    {
        unsigned int i_keycode_count;
        for(i_keycode_count = 0; i_keycode_count < fieldvalue_keycode_count; i_keycode_count++)
        {
            if( p + 4 > (uint8_t*)afterEnd)
            {
                return BadLength;
            }
            swapl((uint32_t*)p);
            p += 4;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangeKeyboardMapping_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), keycode_count, True, True, False, None, False
    uint8_t fieldvalue_keycode_count;
    fieldvalue_keycode_count = *(uint8_t*)p;
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'KEYCODE'), first_keycode, True, True, False, None, False
    p += 1;

    //('uint8_t',), keysyms_per_keycode, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

    //('xcb', 'KEYSYM'), keysyms, True, True, False, None, False
    {
        unsigned int i_keycode_count;
        for(i_keycode_count = 0; i_keycode_count < fieldvalue_keycode_count; i_keycode_count++)
        {
            if( p + 4 > (uint8_t*)afterEnd)
            {
                return BadLength;
            }
            swapl((uint32_t*)p);
            p += 4;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangeKeyboardMapping_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), keycode_count, True, True, False, None, False
    uint8_t fieldvalue_keycode_count;
    fieldvalue_keycode_count = *(uint8_t*)p;
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'KEYCODE'), first_keycode, True, True, False, None, False
    p += 1;

    //('uint8_t',), keysyms_per_keycode, True, True, False, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 2;

    //('xcb', 'KEYSYM'), keysyms, True, True, False, None, False
    {
        unsigned int i_keycode_count;
        for(i_keycode_count = 0; i_keycode_count < fieldvalue_keycode_count; i_keycode_count++)
        {
            p += 4;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetKeyboardMapping_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'KEYCODE'), first_keycode, True, True, False, None, False
    p += 1;

    //('uint8_t',), count, True, True, False, None, False
    p += 1;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetKeyboardMapping_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'KEYCODE'), first_keycode, True, True, False, None, False
    p += 1;

    //('uint8_t',), count, True, True, False, None, False
    p += 1;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetKeyboardMapping_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'KEYCODE'), first_keycode, True, True, False, None, False
    p += 1;

    //('uint8_t',), count, True, True, False, None, False
    p += 1;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_kb {
    XCB_KB_LED = 16,
    XCB_KB_LEDMODE = 32,
    XCB_KB_KEYCLICKPERCENT = 1,
    XCB_KB_BELLPERCENT = 2,
    XCB_KB_KEY = 64,
    XCB_KB_BELLPITCH = 4,
    XCB_KB_AUTOREPEATMODE = 128,
    XCB_KB_BELLDURATION = 8,
} xcb_kb_t;

typedef enum xcb_led_mode {
    XCB_LED_MODE_ON = 1,
    XCB_LED_MODE_OFF = 0,
} xcb_led_mode_t;

typedef enum xcb_auto_repeat_mode {
    XCB_AUTO_REPEAT_MODE_ON = 1,
    XCB_AUTO_REPEAT_MODE_OFF = 0,
    XCB_AUTO_REPEAT_MODE_DEFAULT = 2,
} xcb_auto_repeat_mode_t;

int
xcb_ChangeKeyboardControl_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint32_t',), value_mask, True, True, False, None, False
    uint32_t fieldvalue_value_mask;
    fieldvalue_value_mask = *(uint32_t*)p;
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('xcb', 'ChangeKeyboardControl', 'value_list'), value_list, True, True, False, None, False

    //switch begins

    if (fieldvalue_value_mask & XCB_KB_KEYCLICKPERCENT)
    {
        //('int32_t',) key_click_percent
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_BELLPERCENT)
    {
        //('int32_t',) bell_percent
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_BELLPITCH)
    {
        //('int32_t',) bell_pitch
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_BELLDURATION)
    {
        //('int32_t',) bell_duration
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_LED)
    {
        //('uint32_t',) led
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_LEDMODE)
    {
        //('uint32_t',) led_mode
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_KEY)
    {
        //('uint32_t',) key
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_AUTOREPEATMODE)
    {
        //('uint32_t',) auto_repeat_mode
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    //switch ends


	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangeKeyboardControl_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('uint32_t',), value_mask, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    uint32_t fieldvalue_value_mask;
    fieldvalue_value_mask = *(uint32_t*)p;
    p += 4;

    //('xcb', 'ChangeKeyboardControl', 'value_list'), value_list, True, True, False, None, False

    //switch begins

    if (fieldvalue_value_mask & XCB_KB_KEYCLICKPERCENT)
    {
        //('int32_t',) key_click_percent
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_BELLPERCENT)
    {
        //('int32_t',) bell_percent
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_BELLPITCH)
    {
        //('int32_t',) bell_pitch
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_BELLDURATION)
    {
        //('int32_t',) bell_duration
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_LED)
    {
        //('uint32_t',) led
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_LEDMODE)
    {
        //('uint32_t',) led_mode
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_KEY)
    {
        //('uint32_t',) key
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_AUTOREPEATMODE)
    {
        //('uint32_t',) auto_repeat_mode
        if( p + 4 > (uint8_t*)afterEnd)
        {
            return BadLength;
        }
        swapl((uint32_t*)p);
        p += 4;
    }

    //switch ends


	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangeKeyboardControl_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('uint32_t',), value_mask, True, True, False, None, False
    uint32_t fieldvalue_value_mask;
    fieldvalue_value_mask = *(uint32_t*)p;
    p += 4;

    //('xcb', 'ChangeKeyboardControl', 'value_list'), value_list, True, True, False, None, False

    //switch begins

    if (fieldvalue_value_mask & XCB_KB_KEYCLICKPERCENT)
    {
        //('int32_t',) key_click_percent
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_BELLPERCENT)
    {
        //('int32_t',) bell_percent
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_BELLPITCH)
    {
        //('int32_t',) bell_pitch
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_BELLDURATION)
    {
        //('int32_t',) bell_duration
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_LED)
    {
        //('uint32_t',) led
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_LEDMODE)
    {
        //('uint32_t',) led_mode
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_KEY)
    {
        //('uint32_t',) key
        p += 4;
    }

    if (fieldvalue_value_mask & XCB_KB_AUTOREPEATMODE)
    {
        //('uint32_t',) auto_repeat_mode
        p += 4;
    }

    //switch ends


	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetKeyboardControl_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetKeyboardControl_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetKeyboardControl_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_Bell_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('int8_t',), percent, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_Bell_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('int8_t',), percent, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_Bell_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('int8_t',), percent, True, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangePointerControl_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), acceleration_numerator, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), acceleration_denominator, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), threshold, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), do_acceleration, True, True, False, None, False
    p += 1;

    //('uint8_t',), do_threshold, True, True, False, None, False
    p += 1;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangePointerControl_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('int16_t',), acceleration_numerator, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), acceleration_denominator, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), threshold, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), do_acceleration, True, True, False, None, False
    p += 1;

    //('uint8_t',), do_threshold, True, True, False, None, False
    p += 1;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangePointerControl_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('int16_t',), acceleration_numerator, True, True, False, None, False
    p += 2;

    //('int16_t',), acceleration_denominator, True, True, False, None, False
    p += 2;

    //('int16_t',), threshold, True, True, False, None, False
    p += 2;

    //('uint8_t',), do_acceleration, True, True, False, None, False
    p += 1;

    //('uint8_t',), do_threshold, True, True, False, None, False
    p += 1;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetPointerControl_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetPointerControl_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetPointerControl_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_blanking {
    XCB_BLANKING_PREFERRED = 1,
    XCB_BLANKING_NOTPREFERRED = 0,
    XCB_BLANKING_DEFAULT = 2,
} xcb_blanking_t;

typedef enum xcb_exposures {
    XCB_EXPOSURES_ALLOWED = 1,
    XCB_EXPOSURES_NOTALLOWED = 0,
    XCB_EXPOSURES_DEFAULT = 2,
} xcb_exposures_t;

int
xcb_SetScreenSaver_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), timeout, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), interval, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), prefer_blanking, True, True, False, Blanking, False
    p += 1;

    //('uint8_t',), allow_exposures, True, True, False, Exposures, False
    p += 1;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetScreenSaver_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('int16_t',), timeout, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), interval, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), prefer_blanking, True, True, False, Blanking, False
    p += 1;

    //('uint8_t',), allow_exposures, True, True, False, Exposures, False
    p += 1;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetScreenSaver_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('int16_t',), timeout, True, True, False, None, False
    p += 2;

    //('int16_t',), interval, True, True, False, None, False
    p += 2;

    //('uint8_t',), prefer_blanking, True, True, False, Blanking, False
    p += 1;

    //('uint8_t',), allow_exposures, True, True, False, Exposures, False
    p += 1;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetScreenSaver_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetScreenSaver_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetScreenSaver_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_host_mode {
    XCB_HOST_MODE_DELETE = 1,
    XCB_HOST_MODE_INSERT = 0,
} xcb_host_mode_t;

typedef enum xcb_family {
    XCB_FAMILY_DECNET = 1,
    XCB_FAMILY_INTERNET = 0,
    XCB_FAMILY_CHAOS = 2,
    XCB_FAMILY_SERVERINTERPRETED = 5,
    XCB_FAMILY_INTERNET6 = 6,
} xcb_family_t;

int
xcb_ChangeHosts_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, HostMode, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), family, True, True, False, Family, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, Family, False
    p += 1;

    //('uint16_t',), address_len, True, True, False, None, False
    uint16_t fieldvalue_address_len;
    fieldvalue_address_len = *(uint16_t*)p;
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), address, True, True, False, None, False
    {
        unsigned int i_address_len;
        for(i_address_len = 0; i_address_len < fieldvalue_address_len; i_address_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangeHosts_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, HostMode, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('uint8_t',), family, True, True, False, Family, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, Family, False
    p += 1;

    //('uint16_t',), address_len, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    uint16_t fieldvalue_address_len;
    fieldvalue_address_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), address, True, True, False, None, False
    {
        unsigned int i_address_len;
        for(i_address_len = 0; i_address_len < fieldvalue_address_len; i_address_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ChangeHosts_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, HostMode, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('uint8_t',), family, True, True, False, Family, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, Family, False
    p += 1;

    //('uint16_t',), address_len, True, True, False, None, False
    uint16_t fieldvalue_address_len;
    fieldvalue_address_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), address, True, True, False, None, False
    {
        unsigned int i_address_len;
        for(i_address_len = 0; i_address_len < fieldvalue_address_len; i_address_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_HOST_SwapToClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), family, True, True, False, Family, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, Family, False
    p += 1;

    //('uint16_t',), address_len, True, True, False, None, False
    uint16_t fieldvalue_address_len;
    fieldvalue_address_len = *(uint16_t*)p;
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), address, True, True, False, None, False
    {
        unsigned int i_address_len;
        for(i_address_len = 0; i_address_len < fieldvalue_address_len; i_address_len++)
        {
            p += 1;
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_HOST_SwapFromClient(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), family, True, True, False, Family, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, Family, False
    p += 1;

    //('uint16_t',), address_len, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    uint16_t fieldvalue_address_len;
    fieldvalue_address_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), address, True, True, False, None, False
    {
        unsigned int i_address_len;
        for(i_address_len = 0; i_address_len < fieldvalue_address_len; i_address_len++)
        {
            p += 1;
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_HOST_Check(void *data, void *afterEnd, uint8_t **afterStruct)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;

    //('uint8_t',), family, True, True, False, Family, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, Family, False
    p += 1;

    //('uint16_t',), address_len, True, True, False, None, False
    uint16_t fieldvalue_address_len;
    fieldvalue_address_len = *(uint16_t*)p;
    p += 2;

    //('uint8_t',), address, True, True, False, None, False
    {
        unsigned int i_address_len;
        for(i_address_len = 0; i_address_len < fieldvalue_address_len; i_address_len++)
        {
            p += 1;
        }
    }

	*afterStruct = p;
	if (p <= (uint8_t*)afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ListHosts_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ListHosts_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ListHosts_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_access_control {
    XCB_ACCESS_CONTROL_ENABLE = 1,
    XCB_ACCESS_CONTROL_DISABLE = 0,
} xcb_access_control_t;

int
xcb_SetAccessControl_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, AccessControl, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetAccessControl_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, AccessControl, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetAccessControl_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, AccessControl, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_close_down {
    XCB_CLOSE_DOWN_RETAINPERMANENT = 1,
    XCB_CLOSE_DOWN_DESTROYALL = 0,
    XCB_CLOSE_DOWN_RETAINTEMPORARY = 2,
} xcb_close_down_t;

int
xcb_SetCloseDownMode_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, CloseDown, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetCloseDownMode_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, CloseDown, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetCloseDownMode_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, CloseDown, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_kill {
    XCB_KILL_ALLTEMPORARY = 0,
} xcb_kill_t;

int
xcb_KillClient_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint32_t',), resource, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_KillClient_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('uint32_t',), resource, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_KillClient_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('uint32_t',), resource, True, True, False, None, False
    p += 4;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_RotateProperties_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), atoms_len, True, True, False, None, False
    uint16_t fieldvalue_atoms_len;
    fieldvalue_atoms_len = *(uint16_t*)p;
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('int16_t',), delta, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'ATOM'), atoms, True, True, False, None, False
    {
        unsigned int i_atoms_len;
        for(i_atoms_len = 0; i_atoms_len < fieldvalue_atoms_len; i_atoms_len++)
        {
            if( p + 4 > (uint8_t*)afterEnd)
            {
                return BadLength;
            }
            swapl((uint32_t*)p);
            p += 4;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_RotateProperties_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    if( p + 4 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swapl((uint32_t*)p);
    p += 4;

    //('uint16_t',), atoms_len, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    uint16_t fieldvalue_atoms_len;
    fieldvalue_atoms_len = *(uint16_t*)p;
    p += 2;

    //('int16_t',), delta, True, True, False, None, False
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'ATOM'), atoms, True, True, False, None, False
    {
        unsigned int i_atoms_len;
        for(i_atoms_len = 0; i_atoms_len < fieldvalue_atoms_len; i_atoms_len++)
        {
            if( p + 4 > (uint8_t*)afterEnd)
            {
                return BadLength;
            }
            swapl((uint32_t*)p);
            p += 4;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_RotateProperties_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'WINDOW'), window, True, True, False, None, False
    p += 4;

    //('uint16_t',), atoms_len, True, True, False, None, False
    uint16_t fieldvalue_atoms_len;
    fieldvalue_atoms_len = *(uint16_t*)p;
    p += 2;

    //('int16_t',), delta, True, True, False, None, False
    p += 2;

    //('xcb', 'ATOM'), atoms, True, True, False, None, False
    {
        unsigned int i_atoms_len;
        for(i_atoms_len = 0; i_atoms_len < fieldvalue_atoms_len; i_atoms_len++)
        {
            p += 4;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_screen_saver {
    XCB_SCREEN_SAVER_ACTIVE = 1,
    XCB_SCREEN_SAVER_RESET = 0,
} xcb_screen_saver_t;

int
xcb_ForceScreenSaver_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, ScreenSaver, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ForceScreenSaver_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, ScreenSaver, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_ForceScreenSaver_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), mode, True, True, False, ScreenSaver, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_mapping_status {
    XCB_MAPPING_STATUS_BUSY = 1,
    XCB_MAPPING_STATUS_SUCCESS = 0,
    XCB_MAPPING_STATUS_FAILURE = 2,
} xcb_mapping_status_t;

int
xcb_SetPointerMapping_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), map_len, True, True, False, None, False
    uint8_t fieldvalue_map_len;
    fieldvalue_map_len = *(uint8_t*)p;
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('uint8_t',), map, True, True, False, None, False
    {
        unsigned int i_map_len;
        for(i_map_len = 0; i_map_len < fieldvalue_map_len; i_map_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetPointerMapping_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), map_len, True, True, False, None, False
    uint8_t fieldvalue_map_len;
    fieldvalue_map_len = *(uint8_t*)p;
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('uint8_t',), map, True, True, False, None, False
    {
        unsigned int i_map_len;
        for(i_map_len = 0; i_map_len < fieldvalue_map_len; i_map_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetPointerMapping_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), map_len, True, True, False, None, False
    uint8_t fieldvalue_map_len;
    fieldvalue_map_len = *(uint8_t*)p;
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('uint8_t',), map, True, True, False, None, False
    {
        unsigned int i_map_len;
        for(i_map_len = 0; i_map_len < fieldvalue_map_len; i_map_len++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetPointerMapping_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetPointerMapping_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetPointerMapping_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

typedef enum xcb_map_index {
    XCB_MAP_INDEX_LOCK = 1,
    XCB_MAP_INDEX_SHIFT = 0,
    XCB_MAP_INDEX_1 = 3,
    XCB_MAP_INDEX_CONTROL = 2,
    XCB_MAP_INDEX_3 = 5,
    XCB_MAP_INDEX_2 = 4,
    XCB_MAP_INDEX_5 = 7,
    XCB_MAP_INDEX_4 = 6,
} xcb_map_index_t;

int
xcb_SetModifierMapping_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), keycodes_per_modifier, True, True, False, None, False
    uint8_t fieldvalue_keycodes_per_modifier;
    fieldvalue_keycodes_per_modifier = *(uint8_t*)p;
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

    //('xcb', 'KEYCODE'), keycodes, True, True, False, None, False
    {
        unsigned int i_keycodes_per_modifier;
        for(i_keycodes_per_modifier = 0; i_keycodes_per_modifier < fieldvalue_keycodes_per_modifier; i_keycodes_per_modifier++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetModifierMapping_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), keycodes_per_modifier, True, True, False, None, False
    uint8_t fieldvalue_keycodes_per_modifier;
    fieldvalue_keycodes_per_modifier = *(uint8_t*)p;
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'KEYCODE'), keycodes, True, True, False, None, False
    {
        unsigned int i_keycodes_per_modifier;
        for(i_keycodes_per_modifier = 0; i_keycodes_per_modifier < fieldvalue_keycodes_per_modifier; i_keycodes_per_modifier++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_SetModifierMapping_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), keycodes_per_modifier, True, True, False, None, False
    uint8_t fieldvalue_keycodes_per_modifier;
    fieldvalue_keycodes_per_modifier = *(uint8_t*)p;
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

    //('xcb', 'KEYCODE'), keycodes, True, True, False, None, False
    {
        unsigned int i_keycodes_per_modifier;
        for(i_keycodes_per_modifier = 0; i_keycodes_per_modifier < fieldvalue_keycodes_per_modifier; i_keycodes_per_modifier++)
        {
            p += 1;
        }
    }

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetModifierMapping_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetModifierMapping_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_GetModifierMapping_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_NoOperation_SwapToClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    if( p + 2 > (uint8_t*)afterEnd)
    {
        return BadLength;
    }
    swaps((uint16_t*)p);
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_NoOperation_SwapFromClient(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
    swaps((uint16_t*)p);
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}

int
xcb_NoOperation_Check(void *data)
{
    //type, field_type, field_name, visible, wire, auto, enum, isfd

    uint8_t* p = (uint8_t*)data;
	uint8_t* afterEnd = NULL;

    //('uint8_t',), major_opcode, False, True, True, None, False
    p += 1;

    //('uint8_t',), pad0, False, True, False, None, False
    p += 1;

    //('uint16_t',), length, False, True, True, None, False
	afterEnd = ((uint8_t*)data) + 4 *  ( *(uint16_t*)p );
    p += 2;

	if (p == afterEnd)
		return Success;
	else
		return BadLength;
}


int
xcb_xproto_SwapToClient_dispatch(void *req)
{
    long switch_item;
    int return_val = 0;
    xReq* request = (xReq*)req;
    switch_item = request->reqType;
    switch(switch_item)
    {
        case GEN_XCB_CONVERT_SELECTION:
            return_val = xcb_ConvertSelection_SwapToClient((void*)request);
            break;
        case GEN_XCB_SEND_EVENT:
            return_val = xcb_SendEvent_SwapToClient((void*)request);
            break;
        case GEN_XCB_GRAB_POINTER:
            return_val = xcb_GrabPointer_SwapToClient((void*)request);
            break;
        case GEN_XCB_UNGRAB_POINTER:
            return_val = xcb_UngrabPointer_SwapToClient((void*)request);
            break;
        case GEN_XCB_GET_PROPERTY:
            return_val = xcb_GetProperty_SwapToClient((void*)request);
            break;
        case GEN_XCB_LIST_PROPERTIES:
            return_val = xcb_ListProperties_SwapToClient((void*)request);
            break;
        case GEN_XCB_SET_SELECTION_OWNER:
            return_val = xcb_SetSelectionOwner_SwapToClient((void*)request);
            break;
        case GEN_XCB_GET_SELECTION_OWNER:
            return_val = xcb_GetSelectionOwner_SwapToClient((void*)request);
            break;
        case GEN_XCB_GRAB_BUTTON:
            return_val = xcb_GrabButton_SwapToClient((void*)request);
            break;
        case GEN_XCB_UNGRAB_BUTTON:
            return_val = xcb_UngrabButton_SwapToClient((void*)request);
            break;
        case GEN_XCB_DESTROY_WINDOW:
            return_val = xcb_DestroyWindow_SwapToClient((void*)request);
            break;
        case GEN_XCB_MAP_WINDOW:
            return_val = xcb_MapWindow_SwapToClient((void*)request);
            break;
        case GEN_XCB_GET_MODIFIER_MAPPING:
            return_val = xcb_GetModifierMapping_SwapToClient((void*)request);
            break;
        case GEN_XCB_NO_OPERATION:
            return_val = xcb_NoOperation_SwapToClient((void*)request);
            break;
        case GEN_XCB_SET_MODIFIER_MAPPING:
            return_val = xcb_SetModifierMapping_SwapToClient((void*)request);
            break;
        case GEN_XCB_SET_CLIP_RECTANGLES:
            return_val = xcb_SetClipRectangles_SwapToClient((void*)request);
            break;
        case GEN_XCB_SET_DASHES:
            return_val = xcb_SetDashes_SwapToClient((void*)request);
            break;
        case GEN_XCB_CREATE_GC:
            return_val = xcb_CreateGC_SwapToClient((void*)request);
            break;
        case GEN_XCB_FREE_PIXMAP:
            return_val = xcb_FreePixmap_SwapToClient((void*)request);
            break;
        case GEN_XCB_COPY_GC:
            return_val = xcb_CopyGC_SwapToClient((void*)request);
            break;
        case GEN_XCB_CHANGE_GC:
            return_val = xcb_ChangeGC_SwapToClient((void*)request);
            break;
        case GEN_XCB_SET_FONT_PATH:
            return_val = xcb_SetFontPath_SwapToClient((void*)request);
            break;
        case GEN_XCB_LIST_FONTS_WITH_INFO:
            return_val = xcb_ListFontsWithInfo_SwapToClient((void*)request);
            break;
        case GEN_XCB_CREATE_PIXMAP:
            return_val = xcb_CreatePixmap_SwapToClient((void*)request);
            break;
        case GEN_XCB_GET_FONT_PATH:
            return_val = xcb_GetFontPath_SwapToClient((void*)request);
            break;
        case GEN_XCB_FORCE_SCREEN_SAVER:
            return_val = xcb_ForceScreenSaver_SwapToClient((void*)request);
            break;
        case GEN_XCB_ROTATE_PROPERTIES:
            return_val = xcb_RotateProperties_SwapToClient((void*)request);
            break;
        case GEN_XCB_FREE_COLORS:
            return_val = xcb_FreeColors_SwapToClient((void*)request);
            break;
        case GEN_XCB_STORE_COLORS:
            return_val = xcb_StoreColors_SwapToClient((void*)request);
            break;
        case GEN_XCB_SET_ACCESS_CONTROL:
            return_val = xcb_SetAccessControl_SwapToClient((void*)request);
            break;
        case GEN_XCB_LIST_HOSTS:
            return_val = xcb_ListHosts_SwapToClient((void*)request);
            break;
        case GEN_XCB_KILL_CLIENT:
            return_val = xcb_KillClient_SwapToClient((void*)request);
            break;
        case GEN_XCB_SET_CLOSE_DOWN_MODE:
            return_val = xcb_SetCloseDownMode_SwapToClient((void*)request);
            break;
        case GEN_XCB_UNINSTALL_COLORMAP:
            return_val = xcb_UninstallColormap_SwapToClient((void*)request);
            break;
        case GEN_XCB_LIST_INSTALLED_COLORMAPS:
            return_val = xcb_ListInstalledColormaps_SwapToClient((void*)request);
            break;
        case GEN_XCB_COPY_COLORMAP_AND_FREE:
            return_val = xcb_CopyColormapAndFree_SwapToClient((void*)request);
            break;
        case GEN_XCB_INSTALL_COLORMAP:
            return_val = xcb_InstallColormap_SwapToClient((void*)request);
            break;
        case GEN_XCB_ALLOC_COLOR_CELLS:
            return_val = xcb_AllocColorCells_SwapToClient((void*)request);
            break;
        case GEN_XCB_ALLOC_COLOR_PLANES:
            return_val = xcb_AllocColorPlanes_SwapToClient((void*)request);
            break;
        case GEN_XCB_ALLOC_COLOR:
            return_val = xcb_AllocColor_SwapToClient((void*)request);
            break;
        case GEN_XCB_ALLOC_NAMED_COLOR:
            return_val = xcb_AllocNamedColor_SwapToClient((void*)request);
            break;
        case GEN_XCB_GET_WINDOW_ATTRIBUTES:
            return_val = xcb_GetWindowAttributes_SwapToClient((void*)request);
            break;
        case GEN_XCB_REPARENT_WINDOW:
            return_val = xcb_ReparentWindow_SwapToClient((void*)request);
            break;
        case GEN_XCB_GET_SCREEN_SAVER:
            return_val = xcb_GetScreenSaver_SwapToClient((void*)request);
            break;
        case GEN_XCB_CHANGE_HOSTS:
            return_val = xcb_ChangeHosts_SwapToClient((void*)request);
            break;
        case GEN_XCB_CHANGE_KEYBOARD_CONTROL:
            return_val = xcb_ChangeKeyboardControl_SwapToClient((void*)request);
            break;
        case GEN_XCB_GET_KEYBOARD_CONTROL:
            return_val = xcb_GetKeyboardControl_SwapToClient((void*)request);
            break;
        case GEN_XCB_CHANGE_KEYBOARD_MAPPING:
            return_val = xcb_ChangeKeyboardMapping_SwapToClient((void*)request);
            break;
        case GEN_XCB_GET_KEYBOARD_MAPPING:
            return_val = xcb_GetKeyboardMapping_SwapToClient((void*)request);
            break;
        case GEN_XCB_GET_POINTER_CONTROL:
            return_val = xcb_GetPointerControl_SwapToClient((void*)request);
            break;
        case GEN_XCB_SET_SCREEN_SAVER:
            return_val = xcb_SetScreenSaver_SwapToClient((void*)request);
            break;
        case GEN_XCB_BELL:
            return_val = xcb_Bell_SwapToClient((void*)request);
            break;
        case GEN_XCB_CHANGE_POINTER_CONTROL:
            return_val = xcb_ChangePointerControl_SwapToClient((void*)request);
            break;
        case GEN_XCB_GET_MOTION_EVENTS:
            return_val = xcb_GetMotionEvents_SwapToClient((void*)request);
            break;
        case GEN_XCB_QUERY_POINTER:
            return_val = xcb_QueryPointer_SwapToClient((void*)request);
            break;
        case GEN_XCB_GRAB_KEY:
            return_val = xcb_GrabKey_SwapToClient((void*)request);
            break;
        case GEN_XCB_UNGRAB_KEYBOARD:
            return_val = xcb_UngrabKeyboard_SwapToClient((void*)request);
            break;
        case GEN_XCB_GRAB_KEYBOARD:
            return_val = xcb_GrabKeyboard_SwapToClient((void*)request);
            break;
        case GEN_XCB_CHANGE_ACTIVE_POINTER_GRAB:
            return_val = xcb_ChangeActivePointerGrab_SwapToClient((void*)request);
            break;
        case GEN_XCB_UNGRAB_SERVER:
            return_val = xcb_UngrabServer_SwapToClient((void*)request);
            break;
        case GEN_XCB_GRAB_SERVER:
            return_val = xcb_GrabServer_SwapToClient((void*)request);
            break;
        case GEN_XCB_ALLOW_EVENTS:
            return_val = xcb_AllowEvents_SwapToClient((void*)request);
            break;
        case GEN_XCB_UNGRAB_KEY:
            return_val = xcb_UngrabKey_SwapToClient((void*)request);
            break;
        case GEN_XCB_FREE_GC:
            return_val = xcb_FreeGC_SwapToClient((void*)request);
            break;
        case GEN_XCB_CLEAR_AREA:
            return_val = xcb_ClearArea_SwapToClient((void*)request);
            break;
        case GEN_XCB_COPY_AREA:
            return_val = xcb_CopyArea_SwapToClient((void*)request);
            break;
        case GEN_XCB_COPY_PLANE:
            return_val = xcb_CopyPlane_SwapToClient((void*)request);
            break;
        case GEN_XCB_POLY_POINT:
            return_val = xcb_PolyPoint_SwapToClient((void*)request);
            break;
        case GEN_XCB_POLY_LINE:
            return_val = xcb_PolyLine_SwapToClient((void*)request);
            break;
        case GEN_XCB_POLY_SEGMENT:
            return_val = xcb_PolySegment_SwapToClient((void*)request);
            break;
        case GEN_XCB_POLY_RECTANGLE:
            return_val = xcb_PolyRectangle_SwapToClient((void*)request);
            break;
        case GEN_XCB_POLY_ARC:
            return_val = xcb_PolyArc_SwapToClient((void*)request);
            break;
        case GEN_XCB_FILL_POLY:
            return_val = xcb_FillPoly_SwapToClient((void*)request);
            break;
        case GEN_XCB_CHANGE_WINDOW_ATTRIBUTES:
            return_val = xcb_ChangeWindowAttributes_SwapToClient((void*)request);
            break;
        case GEN_XCB_CHANGE_SAVE_SET:
            return_val = xcb_ChangeSaveSet_SwapToClient((void*)request);
            break;
        case GEN_XCB_LIST_EXTENSIONS:
            return_val = xcb_ListExtensions_SwapToClient((void*)request);
            break;
        case GEN_XCB_QUERY_EXTENSION:
            return_val = xcb_QueryExtension_SwapToClient((void*)request);
            break;
        case GEN_XCB_QUERY_COLORS:
            return_val = xcb_QueryColors_SwapToClient((void*)request);
            break;
        case GEN_XCB_STORE_NAMED_COLOR:
            return_val = xcb_StoreNamedColor_SwapToClient((void*)request);
            break;
        case GEN_XCB_CREATE_CURSOR:
            return_val = xcb_CreateCursor_SwapToClient((void*)request);
            break;
        case GEN_XCB_LOOKUP_COLOR:
            return_val = xcb_LookupColor_SwapToClient((void*)request);
            break;
        case GEN_XCB_FREE_CURSOR:
            return_val = xcb_FreeCursor_SwapToClient((void*)request);
            break;
        case GEN_XCB_CREATE_GLYPH_CURSOR:
            return_val = xcb_CreateGlyphCursor_SwapToClient((void*)request);
            break;
        case GEN_XCB_QUERY_BEST_SIZE:
            return_val = xcb_QueryBestSize_SwapToClient((void*)request);
            break;
        case GEN_XCB_RECOLOR_CURSOR:
            return_val = xcb_RecolorCursor_SwapToClient((void*)request);
            break;
        case GEN_XCB_UNMAP_SUBWINDOWS:
            return_val = xcb_UnmapSubwindows_SwapToClient((void*)request);
            break;
        case GEN_XCB_UNMAP_WINDOW:
            return_val = xcb_UnmapWindow_SwapToClient((void*)request);
            break;
        case GEN_XCB_CIRCULATE_WINDOW:
            return_val = xcb_CirculateWindow_SwapToClient((void*)request);
            break;
        case GEN_XCB_CONFIGURE_WINDOW:
            return_val = xcb_ConfigureWindow_SwapToClient((void*)request);
            break;
        case GEN_XCB_QUERY_TREE:
            return_val = xcb_QueryTree_SwapToClient((void*)request);
            break;
        case GEN_XCB_GET_GEOMETRY:
            return_val = xcb_GetGeometry_SwapToClient((void*)request);
            break;
        case GEN_XCB_GET_ATOM_NAME:
            return_val = xcb_GetAtomName_SwapToClient((void*)request);
            break;
        case GEN_XCB_INTERN_ATOM:
            return_val = xcb_InternAtom_SwapToClient((void*)request);
            break;
        case GEN_XCB_DELETE_PROPERTY:
            return_val = xcb_DeleteProperty_SwapToClient((void*)request);
            break;
        case GEN_XCB_CHANGE_PROPERTY:
            return_val = xcb_ChangeProperty_SwapToClient((void*)request);
            break;
        case GEN_XCB_GET_POINTER_MAPPING:
            return_val = xcb_GetPointerMapping_SwapToClient((void*)request);
            break;
        case GEN_XCB_SET_POINTER_MAPPING:
            return_val = xcb_SetPointerMapping_SwapToClient((void*)request);
            break;
        case GEN_XCB_QUERY_TEXT_EXTENTS:
            return_val = xcb_QueryTextExtents_SwapToClient((void*)request);
            break;
        case GEN_XCB_LIST_FONTS:
            return_val = xcb_ListFonts_SwapToClient((void*)request);
            break;
        case GEN_XCB_CLOSE_FONT:
            return_val = xcb_CloseFont_SwapToClient((void*)request);
            break;
        case GEN_XCB_QUERY_FONT:
            return_val = xcb_QueryFont_SwapToClient((void*)request);
            break;
        case GEN_XCB_QUERY_KEYMAP:
            return_val = xcb_QueryKeymap_SwapToClient((void*)request);
            break;
        case GEN_XCB_OPEN_FONT:
            return_val = xcb_OpenFont_SwapToClient((void*)request);
            break;
        case GEN_XCB_SET_INPUT_FOCUS:
            return_val = xcb_SetInputFocus_SwapToClient((void*)request);
            break;
        case GEN_XCB_GET_INPUT_FOCUS:
            return_val = xcb_GetInputFocus_SwapToClient((void*)request);
            break;
        case GEN_XCB_TRANSLATE_COORDINATES:
            return_val = xcb_TranslateCoordinates_SwapToClient((void*)request);
            break;
        case GEN_XCB_WARP_POINTER:
            return_val = xcb_WarpPointer_SwapToClient((void*)request);
            break;
        case GEN_XCB_CREATE_WINDOW:
            return_val = xcb_CreateWindow_SwapToClient((void*)request);
            break;
        case GEN_XCB_DESTROY_SUBWINDOWS:
            return_val = xcb_DestroySubwindows_SwapToClient((void*)request);
            break;
        case GEN_XCB_MAP_SUBWINDOWS:
            return_val = xcb_MapSubwindows_SwapToClient((void*)request);
            break;
        case GEN_XCB_IMAGE_TEXT_16:
            return_val = xcb_ImageText16_SwapToClient((void*)request);
            break;
        case GEN_XCB_IMAGE_TEXT_8:
            return_val = xcb_ImageText8_SwapToClient((void*)request);
            break;
        case GEN_XCB_POLY_TEXT_16:
            return_val = xcb_PolyText16_SwapToClient((void*)request);
            break;
        case GEN_XCB_POLY_TEXT_8:
            return_val = xcb_PolyText8_SwapToClient((void*)request);
            break;
        case GEN_XCB_GET_IMAGE:
            return_val = xcb_GetImage_SwapToClient((void*)request);
            break;
        case GEN_XCB_PUT_IMAGE:
            return_val = xcb_PutImage_SwapToClient((void*)request);
            break;
        case GEN_XCB_POLY_FILL_ARC:
            return_val = xcb_PolyFillArc_SwapToClient((void*)request);
            break;
        case GEN_XCB_POLY_FILL_RECTANGLE:
            return_val = xcb_PolyFillRectangle_SwapToClient((void*)request);
            break;
        case GEN_XCB_FREE_COLORMAP:
            return_val = xcb_FreeColormap_SwapToClient((void*)request);
            break;
        case GEN_XCB_CREATE_COLORMAP:
            return_val = xcb_CreateColormap_SwapToClient((void*)request);
            break;
        }
    return return_val;
}
int
xcb_xproto_SwapFromClient_dispatch(void *req)
{
    long switch_item;
    int return_val = 0;
    xReq* request = (xReq*)req;
    switch_item = request->reqType;
    switch(switch_item)
    {
        case GEN_XCB_CONVERT_SELECTION:
            return_val = xcb_ConvertSelection_SwapFromClient((void*)request);
            break;
        case GEN_XCB_SEND_EVENT:
            return_val = xcb_SendEvent_SwapFromClient((void*)request);
            break;
        case GEN_XCB_GRAB_POINTER:
            return_val = xcb_GrabPointer_SwapFromClient((void*)request);
            break;
        case GEN_XCB_UNGRAB_POINTER:
            return_val = xcb_UngrabPointer_SwapFromClient((void*)request);
            break;
        case GEN_XCB_GET_PROPERTY:
            return_val = xcb_GetProperty_SwapFromClient((void*)request);
            break;
        case GEN_XCB_LIST_PROPERTIES:
            return_val = xcb_ListProperties_SwapFromClient((void*)request);
            break;
        case GEN_XCB_SET_SELECTION_OWNER:
            return_val = xcb_SetSelectionOwner_SwapFromClient((void*)request);
            break;
        case GEN_XCB_GET_SELECTION_OWNER:
            return_val = xcb_GetSelectionOwner_SwapFromClient((void*)request);
            break;
        case GEN_XCB_GRAB_BUTTON:
            return_val = xcb_GrabButton_SwapFromClient((void*)request);
            break;
        case GEN_XCB_UNGRAB_BUTTON:
            return_val = xcb_UngrabButton_SwapFromClient((void*)request);
            break;
        case GEN_XCB_DESTROY_WINDOW:
            return_val = xcb_DestroyWindow_SwapFromClient((void*)request);
            break;
        case GEN_XCB_MAP_WINDOW:
            return_val = xcb_MapWindow_SwapFromClient((void*)request);
            break;
        case GEN_XCB_GET_MODIFIER_MAPPING:
            return_val = xcb_GetModifierMapping_SwapFromClient((void*)request);
            break;
        case GEN_XCB_NO_OPERATION:
            return_val = xcb_NoOperation_SwapFromClient((void*)request);
            break;
        case GEN_XCB_SET_MODIFIER_MAPPING:
            return_val = xcb_SetModifierMapping_SwapFromClient((void*)request);
            break;
        case GEN_XCB_SET_CLIP_RECTANGLES:
            return_val = xcb_SetClipRectangles_SwapFromClient((void*)request);
            break;
        case GEN_XCB_SET_DASHES:
            return_val = xcb_SetDashes_SwapFromClient((void*)request);
            break;
        case GEN_XCB_CREATE_GC:
            return_val = xcb_CreateGC_SwapFromClient((void*)request);
            break;
        case GEN_XCB_FREE_PIXMAP:
            return_val = xcb_FreePixmap_SwapFromClient((void*)request);
            break;
        case GEN_XCB_COPY_GC:
            return_val = xcb_CopyGC_SwapFromClient((void*)request);
            break;
        case GEN_XCB_CHANGE_GC:
            return_val = xcb_ChangeGC_SwapFromClient((void*)request);
            break;
        case GEN_XCB_SET_FONT_PATH:
            return_val = xcb_SetFontPath_SwapFromClient((void*)request);
            break;
        case GEN_XCB_LIST_FONTS_WITH_INFO:
            return_val = xcb_ListFontsWithInfo_SwapFromClient((void*)request);
            break;
        case GEN_XCB_CREATE_PIXMAP:
            return_val = xcb_CreatePixmap_SwapFromClient((void*)request);
            break;
        case GEN_XCB_GET_FONT_PATH:
            return_val = xcb_GetFontPath_SwapFromClient((void*)request);
            break;
        case GEN_XCB_FORCE_SCREEN_SAVER:
            return_val = xcb_ForceScreenSaver_SwapFromClient((void*)request);
            break;
        case GEN_XCB_ROTATE_PROPERTIES:
            return_val = xcb_RotateProperties_SwapFromClient((void*)request);
            break;
        case GEN_XCB_FREE_COLORS:
            return_val = xcb_FreeColors_SwapFromClient((void*)request);
            break;
        case GEN_XCB_STORE_COLORS:
            return_val = xcb_StoreColors_SwapFromClient((void*)request);
            break;
        case GEN_XCB_SET_ACCESS_CONTROL:
            return_val = xcb_SetAccessControl_SwapFromClient((void*)request);
            break;
        case GEN_XCB_LIST_HOSTS:
            return_val = xcb_ListHosts_SwapFromClient((void*)request);
            break;
        case GEN_XCB_KILL_CLIENT:
            return_val = xcb_KillClient_SwapFromClient((void*)request);
            break;
        case GEN_XCB_SET_CLOSE_DOWN_MODE:
            return_val = xcb_SetCloseDownMode_SwapFromClient((void*)request);
            break;
        case GEN_XCB_UNINSTALL_COLORMAP:
            return_val = xcb_UninstallColormap_SwapFromClient((void*)request);
            break;
        case GEN_XCB_LIST_INSTALLED_COLORMAPS:
            return_val = xcb_ListInstalledColormaps_SwapFromClient((void*)request);
            break;
        case GEN_XCB_COPY_COLORMAP_AND_FREE:
            return_val = xcb_CopyColormapAndFree_SwapFromClient((void*)request);
            break;
        case GEN_XCB_INSTALL_COLORMAP:
            return_val = xcb_InstallColormap_SwapFromClient((void*)request);
            break;
        case GEN_XCB_ALLOC_COLOR_CELLS:
            return_val = xcb_AllocColorCells_SwapFromClient((void*)request);
            break;
        case GEN_XCB_ALLOC_COLOR_PLANES:
            return_val = xcb_AllocColorPlanes_SwapFromClient((void*)request);
            break;
        case GEN_XCB_ALLOC_COLOR:
            return_val = xcb_AllocColor_SwapFromClient((void*)request);
            break;
        case GEN_XCB_ALLOC_NAMED_COLOR:
            return_val = xcb_AllocNamedColor_SwapFromClient((void*)request);
            break;
        case GEN_XCB_GET_WINDOW_ATTRIBUTES:
            return_val = xcb_GetWindowAttributes_SwapFromClient((void*)request);
            break;
        case GEN_XCB_REPARENT_WINDOW:
            return_val = xcb_ReparentWindow_SwapFromClient((void*)request);
            break;
        case GEN_XCB_GET_SCREEN_SAVER:
            return_val = xcb_GetScreenSaver_SwapFromClient((void*)request);
            break;
        case GEN_XCB_CHANGE_HOSTS:
            return_val = xcb_ChangeHosts_SwapFromClient((void*)request);
            break;
        case GEN_XCB_CHANGE_KEYBOARD_CONTROL:
            return_val = xcb_ChangeKeyboardControl_SwapFromClient((void*)request);
            break;
        case GEN_XCB_GET_KEYBOARD_CONTROL:
            return_val = xcb_GetKeyboardControl_SwapFromClient((void*)request);
            break;
        case GEN_XCB_CHANGE_KEYBOARD_MAPPING:
            return_val = xcb_ChangeKeyboardMapping_SwapFromClient((void*)request);
            break;
        case GEN_XCB_GET_KEYBOARD_MAPPING:
            return_val = xcb_GetKeyboardMapping_SwapFromClient((void*)request);
            break;
        case GEN_XCB_GET_POINTER_CONTROL:
            return_val = xcb_GetPointerControl_SwapFromClient((void*)request);
            break;
        case GEN_XCB_SET_SCREEN_SAVER:
            return_val = xcb_SetScreenSaver_SwapFromClient((void*)request);
            break;
        case GEN_XCB_BELL:
            return_val = xcb_Bell_SwapFromClient((void*)request);
            break;
        case GEN_XCB_CHANGE_POINTER_CONTROL:
            return_val = xcb_ChangePointerControl_SwapFromClient((void*)request);
            break;
        case GEN_XCB_GET_MOTION_EVENTS:
            return_val = xcb_GetMotionEvents_SwapFromClient((void*)request);
            break;
        case GEN_XCB_QUERY_POINTER:
            return_val = xcb_QueryPointer_SwapFromClient((void*)request);
            break;
        case GEN_XCB_GRAB_KEY:
            return_val = xcb_GrabKey_SwapFromClient((void*)request);
            break;
        case GEN_XCB_UNGRAB_KEYBOARD:
            return_val = xcb_UngrabKeyboard_SwapFromClient((void*)request);
            break;
        case GEN_XCB_GRAB_KEYBOARD:
            return_val = xcb_GrabKeyboard_SwapFromClient((void*)request);
            break;
        case GEN_XCB_CHANGE_ACTIVE_POINTER_GRAB:
            return_val = xcb_ChangeActivePointerGrab_SwapFromClient((void*)request);
            break;
        case GEN_XCB_UNGRAB_SERVER:
            return_val = xcb_UngrabServer_SwapFromClient((void*)request);
            break;
        case GEN_XCB_GRAB_SERVER:
            return_val = xcb_GrabServer_SwapFromClient((void*)request);
            break;
        case GEN_XCB_ALLOW_EVENTS:
            return_val = xcb_AllowEvents_SwapFromClient((void*)request);
            break;
        case GEN_XCB_UNGRAB_KEY:
            return_val = xcb_UngrabKey_SwapFromClient((void*)request);
            break;
        case GEN_XCB_FREE_GC:
            return_val = xcb_FreeGC_SwapFromClient((void*)request);
            break;
        case GEN_XCB_CLEAR_AREA:
            return_val = xcb_ClearArea_SwapFromClient((void*)request);
            break;
        case GEN_XCB_COPY_AREA:
            return_val = xcb_CopyArea_SwapFromClient((void*)request);
            break;
        case GEN_XCB_COPY_PLANE:
            return_val = xcb_CopyPlane_SwapFromClient((void*)request);
            break;
        case GEN_XCB_POLY_POINT:
            return_val = xcb_PolyPoint_SwapFromClient((void*)request);
            break;
        case GEN_XCB_POLY_LINE:
            return_val = xcb_PolyLine_SwapFromClient((void*)request);
            break;
        case GEN_XCB_POLY_SEGMENT:
            return_val = xcb_PolySegment_SwapFromClient((void*)request);
            break;
        case GEN_XCB_POLY_RECTANGLE:
            return_val = xcb_PolyRectangle_SwapFromClient((void*)request);
            break;
        case GEN_XCB_POLY_ARC:
            return_val = xcb_PolyArc_SwapFromClient((void*)request);
            break;
        case GEN_XCB_FILL_POLY:
            return_val = xcb_FillPoly_SwapFromClient((void*)request);
            break;
        case GEN_XCB_CHANGE_WINDOW_ATTRIBUTES:
            return_val = xcb_ChangeWindowAttributes_SwapFromClient((void*)request);
            break;
        case GEN_XCB_CHANGE_SAVE_SET:
            return_val = xcb_ChangeSaveSet_SwapFromClient((void*)request);
            break;
        case GEN_XCB_LIST_EXTENSIONS:
            return_val = xcb_ListExtensions_SwapFromClient((void*)request);
            break;
        case GEN_XCB_QUERY_EXTENSION:
            return_val = xcb_QueryExtension_SwapFromClient((void*)request);
            break;
        case GEN_XCB_QUERY_COLORS:
            return_val = xcb_QueryColors_SwapFromClient((void*)request);
            break;
        case GEN_XCB_STORE_NAMED_COLOR:
            return_val = xcb_StoreNamedColor_SwapFromClient((void*)request);
            break;
        case GEN_XCB_CREATE_CURSOR:
            return_val = xcb_CreateCursor_SwapFromClient((void*)request);
            break;
        case GEN_XCB_LOOKUP_COLOR:
            return_val = xcb_LookupColor_SwapFromClient((void*)request);
            break;
        case GEN_XCB_FREE_CURSOR:
            return_val = xcb_FreeCursor_SwapFromClient((void*)request);
            break;
        case GEN_XCB_CREATE_GLYPH_CURSOR:
            return_val = xcb_CreateGlyphCursor_SwapFromClient((void*)request);
            break;
        case GEN_XCB_QUERY_BEST_SIZE:
            return_val = xcb_QueryBestSize_SwapFromClient((void*)request);
            break;
        case GEN_XCB_RECOLOR_CURSOR:
            return_val = xcb_RecolorCursor_SwapFromClient((void*)request);
            break;
        case GEN_XCB_UNMAP_SUBWINDOWS:
            return_val = xcb_UnmapSubwindows_SwapFromClient((void*)request);
            break;
        case GEN_XCB_UNMAP_WINDOW:
            return_val = xcb_UnmapWindow_SwapFromClient((void*)request);
            break;
        case GEN_XCB_CIRCULATE_WINDOW:
            return_val = xcb_CirculateWindow_SwapFromClient((void*)request);
            break;
        case GEN_XCB_CONFIGURE_WINDOW:
            return_val = xcb_ConfigureWindow_SwapFromClient((void*)request);
            break;
        case GEN_XCB_QUERY_TREE:
            return_val = xcb_QueryTree_SwapFromClient((void*)request);
            break;
        case GEN_XCB_GET_GEOMETRY:
            return_val = xcb_GetGeometry_SwapFromClient((void*)request);
            break;
        case GEN_XCB_GET_ATOM_NAME:
            return_val = xcb_GetAtomName_SwapFromClient((void*)request);
            break;
        case GEN_XCB_INTERN_ATOM:
            return_val = xcb_InternAtom_SwapFromClient((void*)request);
            break;
        case GEN_XCB_DELETE_PROPERTY:
            return_val = xcb_DeleteProperty_SwapFromClient((void*)request);
            break;
        case GEN_XCB_CHANGE_PROPERTY:
            return_val = xcb_ChangeProperty_SwapFromClient((void*)request);
            break;
        case GEN_XCB_GET_POINTER_MAPPING:
            return_val = xcb_GetPointerMapping_SwapFromClient((void*)request);
            break;
        case GEN_XCB_SET_POINTER_MAPPING:
            return_val = xcb_SetPointerMapping_SwapFromClient((void*)request);
            break;
        case GEN_XCB_QUERY_TEXT_EXTENTS:
            return_val = xcb_QueryTextExtents_SwapFromClient((void*)request);
            break;
        case GEN_XCB_LIST_FONTS:
            return_val = xcb_ListFonts_SwapFromClient((void*)request);
            break;
        case GEN_XCB_CLOSE_FONT:
            return_val = xcb_CloseFont_SwapFromClient((void*)request);
            break;
        case GEN_XCB_QUERY_FONT:
            return_val = xcb_QueryFont_SwapFromClient((void*)request);
            break;
        case GEN_XCB_QUERY_KEYMAP:
            return_val = xcb_QueryKeymap_SwapFromClient((void*)request);
            break;
        case GEN_XCB_OPEN_FONT:
            return_val = xcb_OpenFont_SwapFromClient((void*)request);
            break;
        case GEN_XCB_SET_INPUT_FOCUS:
            return_val = xcb_SetInputFocus_SwapFromClient((void*)request);
            break;
        case GEN_XCB_GET_INPUT_FOCUS:
            return_val = xcb_GetInputFocus_SwapFromClient((void*)request);
            break;
        case GEN_XCB_TRANSLATE_COORDINATES:
            return_val = xcb_TranslateCoordinates_SwapFromClient((void*)request);
            break;
        case GEN_XCB_WARP_POINTER:
            return_val = xcb_WarpPointer_SwapFromClient((void*)request);
            break;
        case GEN_XCB_CREATE_WINDOW:
            return_val = xcb_CreateWindow_SwapFromClient((void*)request);
            break;
        case GEN_XCB_DESTROY_SUBWINDOWS:
            return_val = xcb_DestroySubwindows_SwapFromClient((void*)request);
            break;
        case GEN_XCB_MAP_SUBWINDOWS:
            return_val = xcb_MapSubwindows_SwapFromClient((void*)request);
            break;
        case GEN_XCB_IMAGE_TEXT_16:
            return_val = xcb_ImageText16_SwapFromClient((void*)request);
            break;
        case GEN_XCB_IMAGE_TEXT_8:
            return_val = xcb_ImageText8_SwapFromClient((void*)request);
            break;
        case GEN_XCB_POLY_TEXT_16:
            return_val = xcb_PolyText16_SwapFromClient((void*)request);
            break;
        case GEN_XCB_POLY_TEXT_8:
            return_val = xcb_PolyText8_SwapFromClient((void*)request);
            break;
        case GEN_XCB_GET_IMAGE:
            return_val = xcb_GetImage_SwapFromClient((void*)request);
            break;
        case GEN_XCB_PUT_IMAGE:
            return_val = xcb_PutImage_SwapFromClient((void*)request);
            break;
        case GEN_XCB_POLY_FILL_ARC:
            return_val = xcb_PolyFillArc_SwapFromClient((void*)request);
            break;
        case GEN_XCB_POLY_FILL_RECTANGLE:
            return_val = xcb_PolyFillRectangle_SwapFromClient((void*)request);
            break;
        case GEN_XCB_FREE_COLORMAP:
            return_val = xcb_FreeColormap_SwapFromClient((void*)request);
            break;
        case GEN_XCB_CREATE_COLORMAP:
            return_val = xcb_CreateColormap_SwapFromClient((void*)request);
            break;
        }
    return return_val;
}
int
xcb_xproto_Check_dispatch(void *req)
{
    long switch_item;
    int return_val = 0;
    xReq* request = (xReq*)req;
    switch_item = request->reqType;
    switch(switch_item)
    {
        case GEN_XCB_CONVERT_SELECTION:
            return_val = xcb_ConvertSelection_Check((void*)request);
            break;
        case GEN_XCB_SEND_EVENT:
            return_val = xcb_SendEvent_Check((void*)request);
            break;
        case GEN_XCB_GRAB_POINTER:
            return_val = xcb_GrabPointer_Check((void*)request);
            break;
        case GEN_XCB_UNGRAB_POINTER:
            return_val = xcb_UngrabPointer_Check((void*)request);
            break;
        case GEN_XCB_GET_PROPERTY:
            return_val = xcb_GetProperty_Check((void*)request);
            break;
        case GEN_XCB_LIST_PROPERTIES:
            return_val = xcb_ListProperties_Check((void*)request);
            break;
        case GEN_XCB_SET_SELECTION_OWNER:
            return_val = xcb_SetSelectionOwner_Check((void*)request);
            break;
        case GEN_XCB_GET_SELECTION_OWNER:
            return_val = xcb_GetSelectionOwner_Check((void*)request);
            break;
        case GEN_XCB_GRAB_BUTTON:
            return_val = xcb_GrabButton_Check((void*)request);
            break;
        case GEN_XCB_UNGRAB_BUTTON:
            return_val = xcb_UngrabButton_Check((void*)request);
            break;
        case GEN_XCB_DESTROY_WINDOW:
            return_val = xcb_DestroyWindow_Check((void*)request);
            break;
        case GEN_XCB_MAP_WINDOW:
            return_val = xcb_MapWindow_Check((void*)request);
            break;
        case GEN_XCB_GET_MODIFIER_MAPPING:
            return_val = xcb_GetModifierMapping_Check((void*)request);
            break;
        case GEN_XCB_NO_OPERATION:
            return_val = xcb_NoOperation_Check((void*)request);
            break;
        case GEN_XCB_SET_MODIFIER_MAPPING:
            return_val = xcb_SetModifierMapping_Check((void*)request);
            break;
        case GEN_XCB_SET_CLIP_RECTANGLES:
            return_val = xcb_SetClipRectangles_Check((void*)request);
            break;
        case GEN_XCB_SET_DASHES:
            return_val = xcb_SetDashes_Check((void*)request);
            break;
        case GEN_XCB_CREATE_GC:
            return_val = xcb_CreateGC_Check((void*)request);
            break;
        case GEN_XCB_FREE_PIXMAP:
            return_val = xcb_FreePixmap_Check((void*)request);
            break;
        case GEN_XCB_COPY_GC:
            return_val = xcb_CopyGC_Check((void*)request);
            break;
        case GEN_XCB_CHANGE_GC:
            return_val = xcb_ChangeGC_Check((void*)request);
            break;
        case GEN_XCB_SET_FONT_PATH:
            return_val = xcb_SetFontPath_Check((void*)request);
            break;
        case GEN_XCB_LIST_FONTS_WITH_INFO:
            return_val = xcb_ListFontsWithInfo_Check((void*)request);
            break;
        case GEN_XCB_CREATE_PIXMAP:
            return_val = xcb_CreatePixmap_Check((void*)request);
            break;
        case GEN_XCB_GET_FONT_PATH:
            return_val = xcb_GetFontPath_Check((void*)request);
            break;
        case GEN_XCB_FORCE_SCREEN_SAVER:
            return_val = xcb_ForceScreenSaver_Check((void*)request);
            break;
        case GEN_XCB_ROTATE_PROPERTIES:
            return_val = xcb_RotateProperties_Check((void*)request);
            break;
        case GEN_XCB_FREE_COLORS:
            return_val = xcb_FreeColors_Check((void*)request);
            break;
        case GEN_XCB_STORE_COLORS:
            return_val = xcb_StoreColors_Check((void*)request);
            break;
        case GEN_XCB_SET_ACCESS_CONTROL:
            return_val = xcb_SetAccessControl_Check((void*)request);
            break;
        case GEN_XCB_LIST_HOSTS:
            return_val = xcb_ListHosts_Check((void*)request);
            break;
        case GEN_XCB_KILL_CLIENT:
            return_val = xcb_KillClient_Check((void*)request);
            break;
        case GEN_XCB_SET_CLOSE_DOWN_MODE:
            return_val = xcb_SetCloseDownMode_Check((void*)request);
            break;
        case GEN_XCB_UNINSTALL_COLORMAP:
            return_val = xcb_UninstallColormap_Check((void*)request);
            break;
        case GEN_XCB_LIST_INSTALLED_COLORMAPS:
            return_val = xcb_ListInstalledColormaps_Check((void*)request);
            break;
        case GEN_XCB_COPY_COLORMAP_AND_FREE:
            return_val = xcb_CopyColormapAndFree_Check((void*)request);
            break;
        case GEN_XCB_INSTALL_COLORMAP:
            return_val = xcb_InstallColormap_Check((void*)request);
            break;
        case GEN_XCB_ALLOC_COLOR_CELLS:
            return_val = xcb_AllocColorCells_Check((void*)request);
            break;
        case GEN_XCB_ALLOC_COLOR_PLANES:
            return_val = xcb_AllocColorPlanes_Check((void*)request);
            break;
        case GEN_XCB_ALLOC_COLOR:
            return_val = xcb_AllocColor_Check((void*)request);
            break;
        case GEN_XCB_ALLOC_NAMED_COLOR:
            return_val = xcb_AllocNamedColor_Check((void*)request);
            break;
        case GEN_XCB_GET_WINDOW_ATTRIBUTES:
            return_val = xcb_GetWindowAttributes_Check((void*)request);
            break;
        case GEN_XCB_REPARENT_WINDOW:
            return_val = xcb_ReparentWindow_Check((void*)request);
            break;
        case GEN_XCB_GET_SCREEN_SAVER:
            return_val = xcb_GetScreenSaver_Check((void*)request);
            break;
        case GEN_XCB_CHANGE_HOSTS:
            return_val = xcb_ChangeHosts_Check((void*)request);
            break;
        case GEN_XCB_CHANGE_KEYBOARD_CONTROL:
            return_val = xcb_ChangeKeyboardControl_Check((void*)request);
            break;
        case GEN_XCB_GET_KEYBOARD_CONTROL:
            return_val = xcb_GetKeyboardControl_Check((void*)request);
            break;
        case GEN_XCB_CHANGE_KEYBOARD_MAPPING:
            return_val = xcb_ChangeKeyboardMapping_Check((void*)request);
            break;
        case GEN_XCB_GET_KEYBOARD_MAPPING:
            return_val = xcb_GetKeyboardMapping_Check((void*)request);
            break;
        case GEN_XCB_GET_POINTER_CONTROL:
            return_val = xcb_GetPointerControl_Check((void*)request);
            break;
        case GEN_XCB_SET_SCREEN_SAVER:
            return_val = xcb_SetScreenSaver_Check((void*)request);
            break;
        case GEN_XCB_BELL:
            return_val = xcb_Bell_Check((void*)request);
            break;
        case GEN_XCB_CHANGE_POINTER_CONTROL:
            return_val = xcb_ChangePointerControl_Check((void*)request);
            break;
        case GEN_XCB_GET_MOTION_EVENTS:
            return_val = xcb_GetMotionEvents_Check((void*)request);
            break;
        case GEN_XCB_QUERY_POINTER:
            return_val = xcb_QueryPointer_Check((void*)request);
            break;
        case GEN_XCB_GRAB_KEY:
            return_val = xcb_GrabKey_Check((void*)request);
            break;
        case GEN_XCB_UNGRAB_KEYBOARD:
            return_val = xcb_UngrabKeyboard_Check((void*)request);
            break;
        case GEN_XCB_GRAB_KEYBOARD:
            return_val = xcb_GrabKeyboard_Check((void*)request);
            break;
        case GEN_XCB_CHANGE_ACTIVE_POINTER_GRAB:
            return_val = xcb_ChangeActivePointerGrab_Check((void*)request);
            break;
        case GEN_XCB_UNGRAB_SERVER:
            return_val = xcb_UngrabServer_Check((void*)request);
            break;
        case GEN_XCB_GRAB_SERVER:
            return_val = xcb_GrabServer_Check((void*)request);
            break;
        case GEN_XCB_ALLOW_EVENTS:
            return_val = xcb_AllowEvents_Check((void*)request);
            break;
        case GEN_XCB_UNGRAB_KEY:
            return_val = xcb_UngrabKey_Check((void*)request);
            break;
        case GEN_XCB_FREE_GC:
            return_val = xcb_FreeGC_Check((void*)request);
            break;
        case GEN_XCB_CLEAR_AREA:
            return_val = xcb_ClearArea_Check((void*)request);
            break;
        case GEN_XCB_COPY_AREA:
            return_val = xcb_CopyArea_Check((void*)request);
            break;
        case GEN_XCB_COPY_PLANE:
            return_val = xcb_CopyPlane_Check((void*)request);
            break;
        case GEN_XCB_POLY_POINT:
            return_val = xcb_PolyPoint_Check((void*)request);
            break;
        case GEN_XCB_POLY_LINE:
            return_val = xcb_PolyLine_Check((void*)request);
            break;
        case GEN_XCB_POLY_SEGMENT:
            return_val = xcb_PolySegment_Check((void*)request);
            break;
        case GEN_XCB_POLY_RECTANGLE:
            return_val = xcb_PolyRectangle_Check((void*)request);
            break;
        case GEN_XCB_POLY_ARC:
            return_val = xcb_PolyArc_Check((void*)request);
            break;
        case GEN_XCB_FILL_POLY:
            return_val = xcb_FillPoly_Check((void*)request);
            break;
        case GEN_XCB_CHANGE_WINDOW_ATTRIBUTES:
            return_val = xcb_ChangeWindowAttributes_Check((void*)request);
            break;
        case GEN_XCB_CHANGE_SAVE_SET:
            return_val = xcb_ChangeSaveSet_Check((void*)request);
            break;
        case GEN_XCB_LIST_EXTENSIONS:
            return_val = xcb_ListExtensions_Check((void*)request);
            break;
        case GEN_XCB_QUERY_EXTENSION:
            return_val = xcb_QueryExtension_Check((void*)request);
            break;
        case GEN_XCB_QUERY_COLORS:
            return_val = xcb_QueryColors_Check((void*)request);
            break;
        case GEN_XCB_STORE_NAMED_COLOR:
            return_val = xcb_StoreNamedColor_Check((void*)request);
            break;
        case GEN_XCB_CREATE_CURSOR:
            return_val = xcb_CreateCursor_Check((void*)request);
            break;
        case GEN_XCB_LOOKUP_COLOR:
            return_val = xcb_LookupColor_Check((void*)request);
            break;
        case GEN_XCB_FREE_CURSOR:
            return_val = xcb_FreeCursor_Check((void*)request);
            break;
        case GEN_XCB_CREATE_GLYPH_CURSOR:
            return_val = xcb_CreateGlyphCursor_Check((void*)request);
            break;
        case GEN_XCB_QUERY_BEST_SIZE:
            return_val = xcb_QueryBestSize_Check((void*)request);
            break;
        case GEN_XCB_RECOLOR_CURSOR:
            return_val = xcb_RecolorCursor_Check((void*)request);
            break;
        case GEN_XCB_UNMAP_SUBWINDOWS:
            return_val = xcb_UnmapSubwindows_Check((void*)request);
            break;
        case GEN_XCB_UNMAP_WINDOW:
            return_val = xcb_UnmapWindow_Check((void*)request);
            break;
        case GEN_XCB_CIRCULATE_WINDOW:
            return_val = xcb_CirculateWindow_Check((void*)request);
            break;
        case GEN_XCB_CONFIGURE_WINDOW:
            return_val = xcb_ConfigureWindow_Check((void*)request);
            break;
        case GEN_XCB_QUERY_TREE:
            return_val = xcb_QueryTree_Check((void*)request);
            break;
        case GEN_XCB_GET_GEOMETRY:
            return_val = xcb_GetGeometry_Check((void*)request);
            break;
        case GEN_XCB_GET_ATOM_NAME:
            return_val = xcb_GetAtomName_Check((void*)request);
            break;
        case GEN_XCB_INTERN_ATOM:
            return_val = xcb_InternAtom_Check((void*)request);
            break;
        case GEN_XCB_DELETE_PROPERTY:
            return_val = xcb_DeleteProperty_Check((void*)request);
            break;
        case GEN_XCB_CHANGE_PROPERTY:
            return_val = xcb_ChangeProperty_Check((void*)request);
            break;
        case GEN_XCB_GET_POINTER_MAPPING:
            return_val = xcb_GetPointerMapping_Check((void*)request);
            break;
        case GEN_XCB_SET_POINTER_MAPPING:
            return_val = xcb_SetPointerMapping_Check((void*)request);
            break;
        case GEN_XCB_QUERY_TEXT_EXTENTS:
            return_val = xcb_QueryTextExtents_Check((void*)request);
            break;
        case GEN_XCB_LIST_FONTS:
            return_val = xcb_ListFonts_Check((void*)request);
            break;
        case GEN_XCB_CLOSE_FONT:
            return_val = xcb_CloseFont_Check((void*)request);
            break;
        case GEN_XCB_QUERY_FONT:
            return_val = xcb_QueryFont_Check((void*)request);
            break;
        case GEN_XCB_QUERY_KEYMAP:
            return_val = xcb_QueryKeymap_Check((void*)request);
            break;
        case GEN_XCB_OPEN_FONT:
            return_val = xcb_OpenFont_Check((void*)request);
            break;
        case GEN_XCB_SET_INPUT_FOCUS:
            return_val = xcb_SetInputFocus_Check((void*)request);
            break;
        case GEN_XCB_GET_INPUT_FOCUS:
            return_val = xcb_GetInputFocus_Check((void*)request);
            break;
        case GEN_XCB_TRANSLATE_COORDINATES:
            return_val = xcb_TranslateCoordinates_Check((void*)request);
            break;
        case GEN_XCB_WARP_POINTER:
            return_val = xcb_WarpPointer_Check((void*)request);
            break;
        case GEN_XCB_CREATE_WINDOW:
            return_val = xcb_CreateWindow_Check((void*)request);
            break;
        case GEN_XCB_DESTROY_SUBWINDOWS:
            return_val = xcb_DestroySubwindows_Check((void*)request);
            break;
        case GEN_XCB_MAP_SUBWINDOWS:
            return_val = xcb_MapSubwindows_Check((void*)request);
            break;
        case GEN_XCB_IMAGE_TEXT_16:
            return_val = xcb_ImageText16_Check((void*)request);
            break;
        case GEN_XCB_IMAGE_TEXT_8:
            return_val = xcb_ImageText8_Check((void*)request);
            break;
        case GEN_XCB_POLY_TEXT_16:
            return_val = xcb_PolyText16_Check((void*)request);
            break;
        case GEN_XCB_POLY_TEXT_8:
            return_val = xcb_PolyText8_Check((void*)request);
            break;
        case GEN_XCB_GET_IMAGE:
            return_val = xcb_GetImage_Check((void*)request);
            break;
        case GEN_XCB_PUT_IMAGE:
            return_val = xcb_PutImage_Check((void*)request);
            break;
        case GEN_XCB_POLY_FILL_ARC:
            return_val = xcb_PolyFillArc_Check((void*)request);
            break;
        case GEN_XCB_POLY_FILL_RECTANGLE:
            return_val = xcb_PolyFillRectangle_Check((void*)request);
            break;
        case GEN_XCB_FREE_COLORMAP:
            return_val = xcb_FreeColormap_Check((void*)request);
            break;
        case GEN_XCB_CREATE_COLORMAP:
            return_val = xcb_CreateColormap_Check((void*)request);
            break;
        }
    return return_val;
}


More information about the xorg-devel mailing list