{"name": "glutCreateMenu", "code": "__int64 __fastcall glutCreateMenu ( __int64 @@a1@@ ) { Window @@v1@@ ; XSetWindowAttributes @@v3@@ ; void * @@v4@@ ; int @@v5@@ ; if ( _glutMappedMenu ) menuModificationError ( ) ; if ( ! _glutDisplay ) _glutOpenXConnection ( Number L ) ; @@v5@@ = getUnusedMenuSlot ( ) ; @@v4@@ = malloc ( Number ) ; if ( ! @@v4@@ ) _glutFatalError ( String ) ; * ( _DWORD * ) @@v4@@ = @@v5@@ ; * ( ( _DWORD * ) @@v4@@ + Number ) = Number ; * ( ( _DWORD * ) @@v4@@ + Number ) = Number ; * ( ( _DWORD * ) @@v4@@ + Number ) = Number ; * ( ( _DWORD * ) @@v4@@ + Number ) = Number ; * ( ( _QWORD * ) @@v4@@ + Number ) = @@a1@@ ; * ( ( _QWORD * ) @@v4@@ + Number ) = Number L ; * ( ( _QWORD * ) @@v4@@ + Number ) = Number L ; * ( ( _QWORD * ) @@v4@@ + Number ) = Number L ; * ( ( _QWORD * ) @@v4@@ + Number ) = Number L ; menuSetup ( ) ; @@v3@@ . override_redirect = Number ; @@v3@@ . background_pixel = menuGray ; @@v3@@ . border_pixel = menuBlack ; @@v3@@ . colormap = menuColormap ; @@v3@@ . event_mask = Number L ; @@v3@@ . save_under = Number ; @@v1@@ = XCreateWindow ( _glutDisplay , _glutRoot , Number , Number , Number , Number , Number , menuDepth , Number , menuVisual , useSaveUnders | Number , & @@v3@@ ) ; * ( ( _QWORD * ) @@v4@@ + Number ) = @@v1@@ ; menuGraphicsContextSetup ( * ( ( _QWORD * ) @@v4@@ + Number ) ) ; * ( ( _QWORD * ) menuList + @@v5@@ ) = @@v4@@ ; _glutSetMenu ( ( __int64 ) @@v4@@ ) ; return ( unsigned int ) ( @@v5@@ + Number ) ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v1", "t": {"T": 1, "n": "Window", "s": 8}, "location": "r8"}, {"n": "v3", "t": {"T": 6, "n": "XSetWindowAttributes", "l": [{"T": 4, "n": "background_pixmap", "t": "Pixmap", "s": 8}, {"T": 4, "n": "background_pixel", "t": "unsigned __int64", "s": 8}, {"T": 4, "n": "border_pixmap", "t": "Pixmap", "s": 8}, {"T": 4, "n": "border_pixel", "t": "unsigned __int64", "s": 8}, {"T": 4, "n": "bit_gravity", "t": "int", "s": 4}, {"T": 4, "n": "win_gravity", "t": "int", "s": 4}, {"T": 4, "n": "backing_store", "t": "int", "s": 4}, {"T": 5, "s": 4}, {"T": 4, "n": "backing_planes", "t": "unsigned __int64", "s": 8}, {"T": 4, "n": "backing_pixel", "t": "unsigned __int64", "s": 8}, {"T": 4, "n": "save_under", "t": "int", "s": 4}, {"T": 5, "s": 4}, {"T": 4, "n": "event_mask", "t": "__int64", "s": 8}, {"T": 4, "n": "do_not_propagate_mask", "t": "__int64", "s": 8}, {"T": 4, "n": "override_redirect", "t": "int", "s": 4}, {"T": 5, "s": 4}, {"T": 4, "n": "colormap", "t": "Colormap", "s": 8}, {"T": 4, "n": "cursor", "t": "Cursor", "s": 8}]}, "location": "s128"}, {"n": "v4", "t": {"T": 3, "t": "void"}, "location": "s16"}, {"n": "v5", "t": {"T": 1, "n": "int", "s": 4}, "location": "s4"}]}
{"name": "menuSetup", "code": "XFontStruct * menuSetup ( ) { XFontStruct * @@result@@ ; @@result@@ = menuFont ; if ( ! menuFont ) { menuFont = XLoadQueryFont ( _glutDisplay , String ) ; if ( ! menuFont ) menuFont = XLoadQueryFont ( _glutDisplay , String ) ; if ( ! menuFont ) _glutFatalError ( String ) ; menuVisualSetup ( ) ; fontHeight = menuFont -> ascent + menuFont -> descent ; @@result@@ = ( XFontStruct * ) XCreateFontCursor ( _glutDisplay , Number ) ; menuCursor = ( Cursor ) @@result@@ ; } return @@result@@ ; }", "source": [{"n": "result", "t": {"T": 3, "t": "XFontStruct"}, "location": "r8"}]} {"name": "menuGraphicsContextSetup", "code": "struct _XGC * __fastcall menuGraphicsContextSetup ( Drawable @@a1@@ ) { struct _XGC * @@result@@ ; XGCValues @@v2@@ ; @@result@@ = blackGC ; if ( ! blackGC ) { @@v2@@ . font = menuFont -> fid ; @@v2@@ . foreground = menuBlack ; blackGC = XCreateGC ( _glutDisplay , @@a1@@ , Number , & @@v2@@ ) ; @@v2@@ . foreground = menuGray ; grayGC = ( __int64 ) XCreateGC ( _glutDisplay , @@a1@@ , Number , & @@v2@@ ) ; @@v2@@ . foreground = menuWhite ; @@result@@ = XCreateGC ( _glutDisplay , @@a1@@ , Number , & @@v2@@ ) ; whiteGC = @@result@@ ; } return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "Drawable", "s": 8}, "location": "r56"}, {"n": "result", "t": {"T": 3, "t": "struct _XGC"}, "location": "r8"}, {"n": "v2", "t": {"T": 6, "n": "XGCValues", "l": [{"T": 4, "n": "function", "t": "int", "s": 4}, {"T": 5, "s": 4}, {"T": 4, "n": "plane_mask", "t": "unsigned __int64", "s": 8}, {"T": 4, "n": "foreground", "t": "unsigned __int64", "s": 8}, {"T": 4, "n": "background", "t": "unsigned __int64", "s": 8}, {"T": 4, "n": "line_width", "t": "int", "s": 4}, {"T": 4, "n": "line_style", "t": "int", "s": 4}, {"T": 4, "n": "cap_style", "t": "int", "s": 4}, {"T": 4, "n": "join_style", "t": "int", "s": 4}, {"T": 4, "n": "fill_style", "t": "int", "s": 4}, {"T": 4, "n": "fill_rule", "t": "int", "s": 4}, {"T": 4, "n": "arc_mode", "t": "int", "s": 4}, {"T": 5, "s": 4}, {"T": 4, "n": "tile", "t": "Pixmap", "s": 8}, {"T": 4, "n": "stipple", "t": "Pixmap", "s": 8}, {"T": 4, "n": "ts_x_origin", "t": "int", "s": 4}, {"T": 4, "n": "ts_y_origin", "t": "int", "s": 4}, {"T": 4, "n": "font", "t": "Font", "s": 8}, {"T": 4, "n": "subwindow_mode", "t": "int", "s": 4}, {"T": 4, "n": "graphics_exposures", "t": "int", "s": 4}, {"T": 4, "n": "clip_x_origin", "t": "int", "s": 4}, {"T": 4, "n": "clip_y_origin", "t": "int", "s": 4}, {"T": 4, "n": "clip_mask", "t": "Pixmap", "s": 8}, {"T": 4, "n": "dash_offset", "t": "int", "s": 4}, {"T": 4, "n": "dashes", "t": "char", "s": 1}, {"T": 5, "s": 3}]}, "location": "s128"}]} {"name": "getUnusedMenuSlot", "code": "__int64 getUnusedMenuSlot ( ) { int @@i@@ ; for ( @@i@@ = Number ; @@i@@ < menuListSize ; ++ @@i@@ ) { if ( ! * ( ( _QWORD * ) menuList + @@i@@ ) ) return ( unsigned int ) @@i@@ ; } ++ menuListSize ; if ( menuList ) menuList = realloc ( menuList , Number L * menuListSize ) ; else menuList = malloc ( Number ) ; if ( ! menuList ) _glutFatalError ( String ) ; * ( ( _QWORD * ) menuList + menuListSize - Number ) = Number L ; return ( unsigned int ) ( menuListSize - Number ) ; }", "source": [{"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s4"}]} {"name": "glutSetMenu", "code": "__int64 __fastcall glutSetMenu ( int @@a1@@ ) { __int64 @@result@@ ; __int64 @@v2@@ ; if ( @@a1@@ > Number && @@a1@@ <= menuListSize && ( @@v2@@ = * ( ( _QWORD * ) menuList + @@a1@@ - Number ) ) != Number ) @@result@@ = _glutSetMenu ( @@v2@@ ) ; else @@result@@ = _glutWarning ( String ) ; return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "int", "s": 4}, "location": "r56"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "v2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s8"}]}