LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_menu.c
// Function: glutAddMenuEntry
void FGAPIENTRY glutAddMenuEntry( const char* label, int value )
{
    SFG_MenuEntry* menuEntry;
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutAddMenuEntry" );
    menuEntry = (SFG_MenuEntry *)calloc( sizeof(SFG_MenuEntry), 1 );
    freeglut_return_if_fail( fgStructure.CurrentMenu );

    menuEntry->Text = strdup( label );
    menuEntry->ID   = value;

    /* Have the new menu entry attached to the current menu */
    fgListAppend( &fgStructure.CurrentMenu->Entries, &menuEntry->Node );

    fghCalculateMenuBoxSize( );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x70973(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xd1868
leaq 0x17d5c(%rip), %rdi     # 0xe95b6
leaq 0x28e83(%rip), %rsi     # 0xfa6e4
xorl %eax, %eax
callq 0xcfe73
movl $0x30, %edi
movl $0x1, %esi
callq 0x21600
movq %rax, %r15
leaq 0x74fef(%rip), %rax     # 0x146870
movq 0x38(%rax), %r12
testq %r12, %r12
je 0xd18b9
movq %r14, %rdi
callq 0x22160
movq %rax, 0x18(%r15)
movl %ebx, 0x10(%r15)
addq $0x20, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xd2780
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xd169e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_menu.c
// Function: glutAddSubMenu
void FGAPIENTRY glutAddSubMenu( const char *label, int subMenuID )
{
    SFG_MenuEntry *menuEntry;
    SFG_Menu *subMenu;

    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutAddSubMenu" );
    menuEntry = ( SFG_MenuEntry * )calloc( sizeof( SFG_MenuEntry ), 1 );
    subMenu = fgMenuByID( subMenuID );

    freeglut_return_if_fail( fgStructure.CurrentMenu );
    freeglut_return_if_fail( subMenu );

    menuEntry->Text    = strdup( label );
    menuEntry->SubMenu = subMenu;
    menuEntry->ID      = -1;

    fgListAppend( &fgStructure.CurrentMenu->Entries, &menuEntry->Node );
    fghCalculateMenuBoxSize( );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x708e7(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xd18f4
leaq 0x17cd0(%rip), %rdi     # 0xe95b6
leaq 0x28e08(%rip), %rsi     # 0xfa6f5
xorl %eax, %eax
callq 0xcfe73
movl $0x30, %edi
movl $0x1, %esi
callq 0x21600
movq %rax, %r14
movl %ebp, %edi
callq 0xd2e76
movq %rax, %r12
leaq 0x74f59(%rip), %rax     # 0x146870
movq 0x38(%rax), %r15
testq %r15, %r15
sete %al
testq %r12, %r12
sete %cl
orb %al, %cl
je 0xd1934
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x22160
movq %rax, 0x18(%r14)
movq %r12, 0x20(%r14)
movl $0xffffffff, 0x10(%r14) # imm = 0xFFFFFFFF
addq $0x20, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xd2780
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xd169e
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_menu.c
// Function: glutChangeToMenuEntry
void FGAPIENTRY glutChangeToMenuEntry( int item, const char* label, int value )
{
    SFG_MenuEntry* menuEntry = NULL;

    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutChangeToMenuEntry" );
    freeglut_return_if_fail( fgStructure.CurrentMenu );

    /* Get n-th menu entry in the current menu, starting from one: */
    menuEntry = fghFindMenuEntry( fgStructure.CurrentMenu, item );

    freeglut_return_if_fail( menuEntry );

    /* We want it to become a normal menu entry, so: */
    if( menuEntry->Text )
        free( menuEntry->Text );

    menuEntry->Text    = strdup( label );
    menuEntry->ID      = value;
    menuEntry->SubMenu = NULL;
    fghCalculateMenuBoxSize( );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %ebp
leaq 0x70843(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xd1998
leaq 0x17c2c(%rip), %rdi     # 0xe95b6
leaq 0x28d73(%rip), %rsi     # 0xfa704
xorl %eax, %eax
callq 0xcfe73
leaq 0x74ed1(%rip), %rax     # 0x146870
movq 0x38(%rax), %r15
testq %r15, %r15
je 0xd19fa
addq $0x20, %r15
decl %ebp
movq (%r15), %r15
subl $0x1, %ebp
setb %al
testq %r15, %r15
je 0xd19c0
testb %al, %al
je 0xd19ae
testq %r15, %r15
je 0xd19fa
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0xd19d3
callq 0x21ad0
movq %r14, %rdi
callq 0x22160
movq %rax, 0x18(%r15)
movl %ebx, 0x10(%r15)
movq $0x0, 0x20(%r15)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xd169e
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_menu.c
// Function: glutChangeToSubMenu
void FGAPIENTRY glutChangeToSubMenu( int item, const char* label,
                                     int subMenuID )
{
    SFG_Menu*      subMenu;
    SFG_MenuEntry* menuEntry;

    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutChangeToSubMenu" );
    subMenu = fgMenuByID( subMenuID );
    menuEntry = NULL;

    freeglut_return_if_fail( fgStructure.CurrentMenu );
    freeglut_return_if_fail( subMenu );

    /* Get n-th menu entry in the current menu, starting from one: */
    menuEntry = fghFindMenuEntry( fgStructure.CurrentMenu, item );

    freeglut_return_if_fail( menuEntry );

    /* We want it to become a sub menu entry, so: */
    if( menuEntry->Text )
        free( menuEntry->Text );

    menuEntry->Text    = strdup( label );
    menuEntry->SubMenu = subMenu;
    menuEntry->ID      = -1;
    fghCalculateMenuBoxSize( );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x707a5(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xd1a36
leaq 0x17b8e(%rip), %rdi     # 0xe95b6
leaq 0x28ceb(%rip), %rsi     # 0xfa71a
xorl %eax, %eax
callq 0xcfe73
movl %r14d, %edi
callq 0xd2e76
movq %rax, %r14
leaq 0x74e28(%rip), %rax     # 0x146870
movq 0x38(%rax), %r15
testq %r15, %r15
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0xd1aae
addq $0x20, %r15
decl %ebp
movq (%r15), %r15
subl $0x1, %ebp
setb %al
testq %r15, %r15
je 0xd1a74
testb %al, %al
je 0xd1a62
testq %r15, %r15
je 0xd1aae
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0xd1a87
callq 0x21ad0
movq %rbx, %rdi
callq 0x22160
movq %rax, 0x18(%r15)
movq %r14, 0x20(%r15)
movl $0xffffffff, 0x10(%r15) # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xd169e
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_menu.c
// Function: glutRemoveMenuItem
void FGAPIENTRY glutRemoveMenuItem( int item )
{
    SFG_MenuEntry* menuEntry;

    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutRemoveMenuItem" );
    freeglut_return_if_fail( fgStructure.CurrentMenu );

    /* Get n-th menu entry in the current menu, starting from one: */
    menuEntry = fghFindMenuEntry( fgStructure.CurrentMenu, item );

    freeglut_return_if_fail( menuEntry );

    fgListRemove( &fgStructure.CurrentMenu->Entries, &menuEntry->Node );
    if ( menuEntry->Text )
      free( menuEntry->Text );

    free( menuEntry );
    fghCalculateMenuBoxSize( );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x706fa(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xd1ae1
leaq 0x17ae3(%rip), %rdi     # 0xe95b6
leaq 0x28c54(%rip), %rsi     # 0xfa72e
xorl %eax, %eax
callq 0xcfe73
leaq 0x74d88(%rip), %rax     # 0x146870
movq 0x38(%rax), %rdi
testq %rdi, %rdi
je 0xd1b3b
addq $0x20, %rdi
decl %ebx
movq %rdi, %r14
movq (%r14), %r14
subl $0x1, %ebx
setb %al
testq %r14, %r14
je 0xd1b0c
testb %al, %al
je 0xd1afa
testq %r14, %r14
je 0xd1b3b
movq %r14, %rsi
callq 0xd2a70
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0xd1b27
callq 0x21ad0
movq %r14, %rdi
callq 0x21ad0
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xd169e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_menu.c
// Function: glutAttachMenu
void FGAPIENTRY glutAttachMenu( int button )
{
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutAttachMenu" );

    freeglut_return_if_fail( fgStructure.CurrentWindow );
    freeglut_return_if_fail( fgStructure.CurrentMenu );

    freeglut_return_if_fail( button >= 0 );
    freeglut_return_if_fail( button < FREEGLUT_MAX_MENUS );

    fgStructure.CurrentWindow->Menu[ button ] = fgStructure.CurrentMenu;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leaq 0x70673(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xd1b68
leaq 0x17a5c(%rip), %rdi     # 0xe95b6
leaq 0x28be0(%rip), %rsi     # 0xfa741
xorl %eax, %eax
callq 0xcfe73
cmpl $0x2, %ebx
ja 0xd1b90
leaq 0x74cfc(%rip), %rcx     # 0x146870
movq 0x30(%rcx), %rax
testq %rax, %rax
je 0xd1b90
movq 0x38(%rcx), %rcx
testq %rcx, %rcx
je 0xd1b90
movl %ebx, %edx
movq %rcx, 0x138(%rax,%rdx,8)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_menu.c
// Function: glutDetachMenu
void FGAPIENTRY glutDetachMenu( int button )
{
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutDetachMenu" );

    freeglut_return_if_fail( fgStructure.CurrentWindow );
    freeglut_return_if_fail( fgStructure.CurrentMenu );

    freeglut_return_if_fail( button >= 0 );
    freeglut_return_if_fail( button < FREEGLUT_MAX_MENUS );

    fgStructure.CurrentWindow->Menu[ button ] = NULL;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leaq 0x70624(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xd1bb7
leaq 0x17a0d(%rip), %rdi     # 0xe95b6
leaq 0x28ba0(%rip), %rsi     # 0xfa750
xorl %eax, %eax
callq 0xcfe73
cmpl $0x2, %ebx
ja 0xd1be1
leaq 0x74cad(%rip), %rcx     # 0x146870
movq 0x30(%rcx), %rax
testq %rax, %rax
je 0xd1be1
cmpq $0x0, 0x38(%rcx)
je 0xd1be1
movl %ebx, %ecx
movq $0x0, 0x138(%rax,%rcx,8)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_menu.c
// Function: fghGetVMaxExtent
static GLvoid fghGetVMaxExtent( SFG_Window* window, int* x, int* y )
{
    if( fgStructure.GameModeWindow )
    {
#if TARGET_HOST_POSIX_X11
        int wx, wy;
        Window w;

        XTranslateCoordinates(
            fgDisplay.Display,
            window->Window.Handle,
            fgDisplay.RootWindow,
            0, 0, &wx, &wy, &w);

        *x = fgState.GameModeSize.X + wx;
        *y = fgState.GameModeSize.Y + wy;
#else
        *x = glutGet ( GLUT_SCREEN_WIDTH );
        *y = glutGet ( GLUT_SCREEN_HEIGHT );
#endif
    }
    else
    {
        *x = fgDisplay.ScreenWidth;
        *y = fgDisplay.ScreenHeight;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x74c0a(%rip), %rax     # 0x146870
cmpq $0x0, 0x48(%rax)
je 0xd1cc1
leaq 0x74b5c(%rip), %rax     # 0x1467d0
movq 0x18(%rdi), %rsi
movq (%rax), %rdi
movq 0x10(%rax), %rdx
leaq 0x10(%rsp), %rax
leaq 0x8(%rsp), %r12
leaq 0xc(%rsp), %r15
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r15, %r9
pushq %rax
pushq %r12
callq 0x21fc0
addq $0x10, %rsp
leaq 0x70517(%rip), %rcx     # 0x1421c0
movl (%r15), %eax
addl 0x88(%rcx), %eax
movl %eax, (%r14)
movl (%r12), %eax
addl 0x8c(%rcx), %eax
jmp 0xd1cd1
leaq 0x74b08(%rip), %rax     # 0x1467d0
movl 0x38(%rax), %ecx
movl %ecx, (%r14)
movl 0x3c(%rax), %eax
movl %eax, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_state.c
// Function: glutSetOption
void FGAPIENTRY glutSetOption( GLenum eWhat, int value )
{
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSetOption" );

    /*
     * XXX In chronological code add order.  (WHY in that order?)
     */
    switch( eWhat )
    {
    case GLUT_INIT_WINDOW_X:
        fgState.Position.X = (GLint)value;
        break;

    case GLUT_INIT_WINDOW_Y:
        fgState.Position.Y = (GLint)value;
        break;

    case GLUT_INIT_WINDOW_WIDTH:
        fgState.Size.X = (GLint)value;
        break;

    case GLUT_INIT_WINDOW_HEIGHT:
        fgState.Size.Y = (GLint)value;
        break;

    case GLUT_INIT_DISPLAY_MODE:
        fgState.DisplayMode = (unsigned int)value;
        break;

    case GLUT_ACTION_ON_WINDOW_CLOSE:
        fgState.ActionOnWindowClose = value;
        break;

    case GLUT_RENDERING_CONTEXT:
        fgState.UseCurrentContext =
            ( value == GLUT_USE_CURRENT_CONTEXT ) ? GL_TRUE : GL_FALSE;
        break;

    case GLUT_DIRECT_RENDERING:
        fgState.DirectContext = value;
        break;

    case GLUT_WINDOW_CURSOR:
        if( fgStructure.CurrentWindow != NULL )
            fgStructure.CurrentWindow->State.Cursor = value;
        break;

    case GLUT_AUX:
      fgState.AuxiliaryBufferNumber = value;
      break;

    case GLUT_MULTISAMPLE:
      fgState.SampleNumber = value;
      break;

    default:
        fgWarning( "glutSetOption(): missing enum handle %d", eWhat );
        break;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %edi, %r14d
leaq 0x704cf(%rip), %r15     # 0x1421c0
cmpb $0x0, 0x1c(%r15)
jne 0xd1d0d
leaq 0x178b7(%rip), %rdi     # 0xe95b6
leaq 0x28c0a(%rip), %rsi     # 0xfa910
xorl %eax, %eax
callq 0xcfe73
cmpl $0x1f3, %r14d           # imm = 0x1F3
jle 0xd1d3a
leal -0x1f4(%r14), %eax
cmpl $0xa, %eax
ja 0xd1d52
leaq 0x28a83(%rip), %rcx     # 0xfa7ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl %ebx, (%r15)
jmp 0xd1dbe
cmpl $0x7a, %r14d
je 0xd1dab
cmpl $0x80, %r14d
jne 0xd1d64
movl %ebx, 0xb8(%r15)
jmp 0xd1dbe
cmpl $0x1000, %r14d          # imm = 0x1000
jne 0xd1d64
movl %ebx, 0xb4(%r15)
jmp 0xd1dbe
leaq 0x28bb3(%rip), %rdi     # 0xfa91e
movl %r14d, %esi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x22a74
movl %ebx, 0x18(%r15)
jmp 0xd1dbe
cmpl $0x1, %ebx
sete 0x25(%r15)
jmp 0xd1dbe
movl %ebx, 0xc(%r15)
jmp 0xd1dbe
movl %ebx, 0x4(%r15)
jmp 0xd1dbe
movl %ebx, 0x10(%r15)
jmp 0xd1dbe
movl %ebx, 0x20(%r15)
jmp 0xd1dbe
movl %ebx, 0x9c(%r15)
jmp 0xd1dbe
leaq 0x74abe(%rip), %rax     # 0x146870
movq 0x30(%rax), %rax
testq %rax, %rax
je 0xd1dbe
movl %ebx, 0x4c(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_state.c
// Function: fghGetConfig
static int fghGetConfig( int attribute )
{
  int returnValue = 0;

  if( fgStructure.CurrentWindow )
      glXGetFBConfigAttrib( fgDisplay.Display,
                                     *(fgStructure.CurrentWindow->Window.FBConfig),
                                     attribute,
                                     &returnValue );

  return returnValue;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl $0x0, 0xc(%rsp)
leaq 0x7458d(%rip), %rax     # 0x146870
movq 0x30(%rax), %rax
testq %rax, %rax
je 0xd2310
movl %edi, %edx
leaq 0x744db(%rip), %rcx     # 0x1467d0
movq (%rcx), %rdi
movq 0x28(%rax), %rax
movq (%rax), %rsi
leaq 0xc(%rsp), %rbx
movq %rbx, %rcx
callq 0x21270
movl (%rbx), %eax
jmp 0xd2312
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_structure.c
// Function: fgCreateWindow
SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title,
                            GLboolean positionUse, int x, int y,
                            GLboolean sizeUse, int w, int h,
                            GLboolean gameMode, GLboolean isMenu )
{
    /* Have the window object created */
    SFG_Window *window = (SFG_Window *)calloc( sizeof(SFG_Window), 1 );

#if TARGET_HOST_UNIX_X11
    window->Window.FBConfig = NULL;
#endif
    fghClearCallBacks( window );

    /* Initialize the object properties */
    window->ID = ++fgStructure.WindowID;
    window->State.OldHeight = window->State.OldWidth = -1;

    fgListInit( &window->Children );
    if( parent )
    {
        fgListAppend( &parent->Children, &window->Node );
        window->Parent = parent;
    }
    else
        fgListAppend( &fgStructure.Windows, &window->Node );

    /* Set the default mouse cursor and reset the modifiers value */
    window->State.Cursor    = GLUT_CURSOR_INHERIT;

    window->IsMenu = isMenu;

    window->State.IgnoreKeyRepeat = GL_FALSE;
    window->State.KeyRepeating    = GL_FALSE;
    window->State.IsFullscreen    = GL_FALSE;

    /*
     * Open the window now. The fgOpenWindow() function is system
     * dependant, and resides in freeglut_window.c. Uses fgState.
     */
    fgOpenWindow( window, title, positionUse, x, y, sizeUse, w, h, gameMode,
                  (GLboolean)(parent ? GL_TRUE : GL_FALSE) );

    return window;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r15d
movl %r8d, 0x4(%rsp)
movl %ecx, %r14d
movl %edx, %r13d
movq %rsi, %r12
movq %rdi, %rbp
movl $0x178, %edi            # imm = 0x178
movl $0x1, %esi
callq 0x21600
movq %rax, %rbx
movl 0x74219(%rip), %eax     # 0x1468c0
incl %eax
movl %eax, 0x74211(%rip)     # 0x1468c0
movl %eax, 0x10(%rbx)
movq $-0x1, 0x40(%rbx)
testq %rbp, %rbp
je 0xd26e7
leaq 0x160(%rbp), %rcx
movq 0x168(%rbp), %rax
testq %rax, %rax
cmovneq %rax, %rcx
movq %rbx, (%rcx)
movq %rbx, 0x168(%rbp)
movq %rbp, 0x158(%rbx)
jmp 0xd2706
movq 0x7418a(%rip), %rax     # 0x146878
leaq 0x7417b(%rip), %rcx     # 0x146870
testq %rax, %rax
cmovneq %rax, %rcx
movq %rbx, (%rcx)
movq %rbx, 0x74172(%rip)     # 0x146878
xorl %r10d, %r10d
testq %rbp, %rbp
setne %r10b
movq %rax, 0x8(%rbx)
movq $0x0, (%rbx)
movl $0x64, 0x4c(%rbx)
movb 0x58(%rsp), %al
movb %al, 0x170(%rbx)
movw $0x0, 0x68(%rbx)
movb $0x0, 0x6b(%rbx)
movzbl 0x50(%rsp), %eax
movzbl %r13b, %edx
movzbl %r15b, %r9d
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %ecx
movl 0x4(%rsp), %r8d
pushq %r10
pushq %rax
movl 0x58(%rsp), %eax
pushq %rax
movl 0x58(%rsp), %eax
pushq %rax
callq 0xd3185
addq $0x20, %rsp
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_structure.c
// Function: fgCreateMenu
SFG_Menu* fgCreateMenu( FGCBMenu menuCallback )
{
    int x = 100, y = 100, w = 100, h = 100;
    SFG_Window *current_window = fgStructure.CurrentWindow;

    /* Have the menu object created */
    SFG_Menu* menu = (SFG_Menu *)calloc( sizeof(SFG_Menu), 1 );

    menu->ParentWindow = NULL;

    /* Create a window for the menu to reside in. */

    fgCreateWindow( NULL, "freeglut menu", GL_TRUE, x, y, GL_TRUE, w, h,
                    GL_FALSE, GL_TRUE );
    menu->Window = fgStructure.CurrentWindow;
    glutDisplayFunc( fgDisplayMenu );

    glutHideWindow( );  /* Hide the window for now */
    fgSetWindow( current_window );

    /* Initialize the object properties: */
    menu->ID       = ++fgStructure.MenuID;
    menu->Callback = menuCallback;
    menu->ActiveEntry = NULL;

    fgListInit( &menu->Entries );
    fgListAppend( &fgStructure.Menus, &menu->Node );

    /* Newly created menus implicitly become current ones */
    fgStructure.CurrentMenu = menu;

    return menu;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movq 0x740f0(%rip), %r15     # 0x1468a0
movl $0x70, %edi
movl $0x1, %esi
callq 0x21600
movq %rax, %rbx
movl $0x64, %eax
leaq 0x28263(%rip), %rsi     # 0xfaa31
xorl %edi, %edi
movl $0x1, %edx
movl $0x64, %ecx
movl $0x64, %r8d
movl $0x1, %r9d
pushq $0x1
pushq $0x0
pushq %rax
pushq %rax
callq 0xd2670
addq $0x20, %rsp
movq 0x740a4(%rip), %rax     # 0x1468a0
movq %rax, 0x60(%rbx)
leaq -0x1c7b(%rip), %rdi     # 0xd0b8c
callq 0xccc8c
callq 0xd3a22
movq %r15, %rdi
callq 0xd314d
movl 0x740a5(%rip), %eax     # 0x1468c4
incl %eax
movl %eax, 0x7409d(%rip)     # 0x1468c4
movl %eax, 0x18(%rbx)
movq %r14, 0x30(%rbx)
movq 0x74053(%rip), %rax     # 0x146888
testq %rax, %rax
leaq 0x74041(%rip), %rcx     # 0x146880
cmovneq %rax, %rcx
movq %rbx, (%rcx)
movq %rax, 0x8(%rbx)
movq %rbx, 0x74037(%rip)     # 0x146888
movq %rbx, 0x74050(%rip)     # 0x1468a8
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_structure.c
// Function: fgAddToWindowDestroyList
void fgAddToWindowDestroyList( SFG_Window* window )
{
    SFG_WindowList *new_list_entry =
        ( SFG_WindowList* )malloc( sizeof(SFG_WindowList ) );
    new_list_entry->window = window;
    fgListAppend( &fgStructure.WindowsToDestroy, &new_list_entry->node );

    /* Check if the window is the current one... */
    if( fgStructure.CurrentWindow == window )
        fgStructure.CurrentWindow = NULL;

    /*
     * Clear all window callbacks except Destroy, which will
     * be invoked later.  Right now, we are potentially carrying
     * out a freeglut operation at the behest of a client callback,
     * so we are reluctant to re-enter the client with the Destroy
     * callback, right now.  The others are all wiped out, however,
     * to ensure that they are no longer called after this point.
     */
    {
        FGCBDestroy destroy = (FGCBDestroy)FETCH_WCB( *window, Destroy );
        fghClearCallBacks( window );
        SET_WCB( *window, Destroy, destroy );
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x18, %edi
callq 0x21c60
movq %rbx, 0x10(%rax)
movq 0x7401b(%rip), %rcx     # 0x146898
testq %rcx, %rcx
leaq 0x74009(%rip), %rdx     # 0x146890
cmovneq %rcx, %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rax)
movq $0x0, (%rax)
movq %rax, 0x73ff8(%rip)     # 0x146898
cmpq %rbx, 0x73ff9(%rip)     # 0x1468a0
jne 0xd28b4
movq $0x0, 0x73fec(%rip) # 0x1468a0
movq 0xe0(%rbx), %r14
leaq 0x70(%rbx), %rdi
movl $0xc0, %edx
xorl %esi, %esi
callq 0x21490
testq %r14, %r14
je 0xd28d7
movq %r14, 0xe0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_structure.c
// Function: fgCloseWindows
void fgCloseWindows( )
{
    while( fgStructure.WindowsToDestroy.First )
    {
        SFG_WindowList *window_ptr = fgStructure.WindowsToDestroy.First;
        fgDestroyWindow( window_ptr->window );
        fgListRemove( &fgStructure.WindowsToDestroy, &window_ptr->node );
        free( window_ptr );
    }
}

// Assembly:
pushq %rbx
movq 0x73fa9(%rip), %rbx     # 0x146890
testq %rbx, %rbx
je 0xd293a
movq 0x10(%rbx), %rdi
callq 0xd293c
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
testq %rcx, %rcx
je 0xd2905
movq %rax, 0x8(%rcx)
testq %rax, %rax
je 0xd290d
movq %rcx, (%rax)
cmpq %rbx, 0x73f7c(%rip)     # 0x146890
jne 0xd2920
movq (%rbx), %rcx
movq %rcx, 0x73f70(%rip)     # 0x146890
cmpq %rbx, 0x73f71(%rip)     # 0x146898
jne 0xd2930
movq %rax, 0x73f68(%rip)     # 0x146898
movq %rbx, %rdi
callq 0x21ad0
jmp 0xd28e0
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_structure.c
// Function: fgDestroyWindow
void fgDestroyWindow( SFG_Window* window )
{
    FREEGLUT_INTERNAL_ERROR_EXIT ( window, "Window destroy function called with null window",
                                   "fgDestroyWindow" );

    while( window->Children.First )
        fgDestroyWindow( ( SFG_Window * )window->Children.First );

    {
        SFG_Window *activeWindow = fgStructure.CurrentWindow;
        INVOKE_WCB( *window, Destroy, ( ) );
        fgSetWindow( activeWindow );
    }

    if( window->Parent )
        fgListRemove( &window->Parent->Children, &window->Node );
    else
        fgListRemove( &fgStructure.Windows, &window->Node );

    if( window->ActiveMenu )
      fgDeactivateMenu( window );

    fghClearCallBacks( window );
    fgCloseWindow( window );
    free( window );
    if( fgStructure.CurrentWindow == window )
        fgStructure.CurrentWindow = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
jne 0xd296b
leaq 0x2765f(%rip), %rdi     # 0xf9fae
leaq 0x280e9(%rip), %rsi     # 0xfaa3f
leaq 0x28112(%rip), %rdx     # 0xfaa6f
xorl %eax, %eax
callq 0xcfe73
jmp 0xd296b
callq 0xd293c
movq 0x160(%rbx), %rdi
testq %rdi, %rdi
jne 0xd2966
movq 0x73f22(%rip), %r14     # 0x1468a0
cmpq $0x0, 0xe0(%rbx)
je 0xd2996
movq %rbx, %rdi
callq 0xd314d
callq *0xe0(%rbx)
movq %r14, %rdi
callq 0xd314d
movq 0x158(%rbx), %rax
testq %rax, %rax
je 0xd29e7
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
testq %rdx, %rdx
je 0xd29ba
movq %rcx, 0x8(%rdx)
testq %rcx, %rcx
je 0xd29c2
movq %rdx, (%rcx)
cmpq %rbx, 0x160(%rax)
jne 0xd29d5
movq (%rbx), %rdx
movq %rdx, 0x160(%rax)
cmpq %rbx, 0x168(%rax)
jne 0xd2a22
movq %rcx, 0x168(%rax)
jmp 0xd2a22
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
testq %rcx, %rcx
je 0xd29f7
movq %rax, 0x8(%rcx)
testq %rax, %rax
je 0xd29ff
movq %rcx, (%rax)
cmpq %rbx, 0x73e6a(%rip)     # 0x146870
jne 0xd2a12
movq (%rbx), %rcx
movq %rcx, 0x73e5e(%rip)     # 0x146870
cmpq %rbx, 0x73e5f(%rip)     # 0x146878
jne 0xd2a22
movq %rax, 0x73e56(%rip)     # 0x146878
cmpq $0x0, 0x150(%rbx)
je 0xd2a34
movq %rbx, %rdi
callq 0xd1570
leaq 0x70(%rbx), %rdi
movl $0xc0, %edx
xorl %esi, %esi
callq 0x21490
movq %rbx, %rdi
callq 0xd3701
movq %rbx, %rdi
callq 0x21ad0
cmpq %rbx, 0x73e45(%rip)     # 0x1468a0
jne 0xd2a68
movq $0x0, 0x73e38(%rip) # 0x1468a0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_structure.c
// Function: fgListRemove
void fgListRemove(SFG_List *list, SFG_Node *node)
{
    if( node->Next )
        ( ( SFG_Node * )node->Next )->Prev = node->Prev;
    if( node->Prev )
        ( ( SFG_Node * )node->Prev )->Next = node->Next;
    if( ( ( SFG_Node * )list->First ) == node )
        list->First = node->Next;
    if( ( ( SFG_Node * )list->Last ) == node )
        list->Last = node->Prev;
}

// Assembly:
movq (%rsi), %rcx
movq 0x8(%rsi), %rax
testq %rcx, %rcx
je 0xd2a80
movq %rax, 0x8(%rcx)
testq %rax, %rax
je 0xd2a88
movq %rcx, (%rax)
cmpq %rsi, (%rdi)
jne 0xd2a93
movq (%rsi), %rcx
movq %rcx, (%rdi)
cmpq %rsi, 0x8(%rdi)
je 0xd2a9a
retq
movq %rax, 0x8(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_structure.c
// Function: fghRemoveMenuFromWindow
static void fghRemoveMenuFromWindow( SFG_Window* window, SFG_Menu* menu )
{
    SFG_Window *subWindow;
    int i;

    /* Check whether this is the active menu in the window */
    if ( menu == window->ActiveMenu )
        window->ActiveMenu = NULL ;

    /*
     * Check if the menu is attached to the current window,
     * if so, have it detached (by overwriting with a NULL):
     */
    for( i = 0; i < FREEGLUT_MAX_MENUS; i++ )
        if( window->Menu[ i ] == menu )
            window->Menu[ i ] = NULL;

    /* Call this function for all of the window's children recursively: */
    for( subWindow = (SFG_Window *)window->Children.First;
         subWindow;
         subWindow = (SFG_Window *)subWindow->Node.Next)
        fghRemoveMenuFromWindow( subWindow, menu );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpq %rsi, 0x150(%rdi)
jne 0xd2c10
movq $0x0, 0x150(%rdi)
xorl %eax, %eax
cmpq %rbx, 0x138(%rdi,%rax,8)
jne 0xd2c28
movq $0x0, 0x138(%rdi,%rax,8)
incq %rax
cmpq $0x3, %rax
jne 0xd2c12
movq 0x160(%rdi), %r14
testq %r14, %r14
je 0xd2c4d
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd2bf5
movq (%r14), %r14
jmp 0xd2c38
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_structure.c
// Function: fgDestroyStructure
void fgDestroyStructure( void )
{
    /* Clean up the WindowsToDestroy list. */
    fgCloseWindows( );

    /* Make sure all windows and menus have been deallocated */
    while( fgStructure.Menus.First )
        fgDestroyMenu( ( SFG_Menu * )fgStructure.Menus.First );

    while( fgStructure.Windows.First )
        fgDestroyWindow( ( SFG_Window * )fgStructure.Windows.First );
}

// Assembly:
pushq %rax
callq 0xd28df
movq 0x73bec(%rip), %rdi     # 0x146880
testq %rdi, %rdi
je 0xd2ca5
callq 0xd2a9f
jmp 0xd2c8d
callq 0xd293c
movq 0x73bc4(%rip), %rdi     # 0x146870
testq %rdi, %rdi
jne 0xd2ca0
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_structure.c
// Function: fgEnumWindows
void fgEnumWindows( FGCBenumerator enumCallback, SFG_Enumerator* enumerator )
{
    SFG_Window *window;

    FREEGLUT_INTERNAL_ERROR_EXIT ( enumCallback && enumerator,
                                   "Enumerator or callback missing from window enumerator call",
                                   "fgEnumWindows" );

    /* Check every of the top-level windows */
    for( window = ( SFG_Window * )fgStructure.Windows.First;
         window;
         window = ( SFG_Window * )window->Node.Next )
    {
        enumCallback( window, enumerator );
        if( enumerator->found )
            return;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
testq %rdi, %rdi
setne %al
testq %rsi, %rsi
setne %cl
testb %cl, %al
jne 0xd2cea
leaq 0x272d9(%rip), %rdi     # 0xf9fae
leaq 0x27ddd(%rip), %rsi     # 0xfaab9
leaq 0x27e11(%rip), %rdx     # 0xfaaf4
xorl %eax, %eax
callq 0xcfe73
leaq 0x73b7f(%rip), %r15     # 0x146870
movq (%r15), %r15
testq %r15, %r15
je 0xd2d07
movq %r15, %rdi
movq %rbx, %rsi
callq *%r14
cmpb $0x0, (%rbx)
je 0xd2cf1
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_structure.c
// Function: fgEnumSubWindows
void fgEnumSubWindows( SFG_Window* window, FGCBenumerator enumCallback,
                       SFG_Enumerator* enumerator )
{
    SFG_Window *child;

    FREEGLUT_INTERNAL_ERROR_EXIT ( enumCallback && enumerator,
                                   "Enumerator or callback missing from subwindow enumerator call",
                                   "fgEnumSubWindows" );
    FREEGLUT_INTERNAL_ERROR_EXIT_IF_NOT_INITIALISED ( "Window Enumeration" );

    for( child = ( SFG_Window * )window->Children.First;
         child;
         child = ( SFG_Window * )child->Node.Next )
    {
        enumCallback( child, enumerator );
        if( enumerator->found )
            return;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rsi, %rsi
setne %al
testq %rdx, %rdx
setne %cl
testb %cl, %al
jne 0xd2d47
leaq 0x2727c(%rip), %rdi     # 0xf9fae
leaq 0x27dc9(%rip), %rsi     # 0xfab02
leaq 0x27e00(%rip), %rdx     # 0xfab40
xorl %eax, %eax
callq 0xcfe73
leaq 0x6f472(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xd2d69
leaq 0x16b40(%rip), %rdi     # 0xe989b
leaq 0x27def(%rip), %rsi     # 0xfab51
xorl %eax, %eax
callq 0xcfe73
addq $0x160, %r15            # imm = 0x160
movq (%r15), %r15
testq %r15, %r15
je 0xd2d86
movq %r15, %rdi
movq %rbx, %rsi
callq *%r14
cmpb $0x0, (%rbx)
je 0xd2d70
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_structure.c
// Function: fgWindowByHandle
SFG_Window* fgWindowByHandle ( SFG_WindowHandleType hWindow )
{
    SFG_Enumerator enumerator;

    /* This is easy and makes use of the windows enumeration defined above */
    enumerator.found = GL_FALSE;
    enumerator.data = (void *)hWindow;
    fgEnumWindows( fghcbWindowByHandle, &enumerator );

    if( enumerator.found )
        return( SFG_Window *) enumerator.data;
    return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x8(%rsp), %r14
movb $0x0, (%r14)
movq %rdi, 0x8(%r14)
leaq 0x73ac9(%rip), %rbx     # 0x146870
movq (%rbx), %rbx
testq %rbx, %rbx
je 0xd2dc1
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd2dd6
cmpb $0x0, 0x8(%rsp)
je 0xd2da7
testq %rbx, %rbx
je 0xd2dcb
movq 0x10(%rsp), %rbx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_structure.c
// Function: fgWindowByID
SFG_Window* fgWindowByID( int windowID )
{
    SFG_Enumerator enumerator;

    /* Uses a method very similiar for fgWindowByHandle... */
    enumerator.found = GL_FALSE;
    enumerator.data = ( void * )&windowID;
    fgEnumWindows( fghcbWindowByID, &enumerator );
    if( enumerator.found )
        return ( SFG_Window * )enumerator.data;
    return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x4(%rsp), %rax
movl %edi, (%rax)
leaq 0x8(%rsp), %r14
movb $0x0, (%r14)
movq %rax, 0x8(%r14)
leaq 0x73a51(%rip), %rbx     # 0x146870
movq (%rbx), %rbx
testq %rbx, %rbx
je 0xd2e39
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd2e4e
cmpb $0x0, 0x8(%rsp)
je 0xd2e1f
testq %rbx, %rbx
je 0xd2e43
movq 0x10(%rsp), %rbx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_window.c
// Function: glutCreateWindow
int FGAPIENTRY glutCreateWindow( const char* title )
{
    /* XXX GLUT does not exit; it simply calls "glutInit" quietly if the
     * XXX application has not already done so.  The "freeglut" community
     * XXX decided not to go this route (freeglut-developer e-mail from
     * XXX Steve Baker, 12/16/04, 4:22 PM CST, "Re: [Freeglut-developer]
     * XXX Desired 'freeglut' behaviour when there is no current window"
     */
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutCreateWindow" );

    return fgCreateWindow( NULL, title, fgState.Position.Use,
                           fgState.Position.X, fgState.Position.Y,
                           fgState.Size.Use, fgState.Size.X, fgState.Size.Y,
                           GL_FALSE, GL_FALSE )->ID;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x6ea78(%rip), %r14     # 0x1421c0
cmpb $0x0, 0x1c(%r14)
jne 0xd3764
leaq 0x15e60(%rip), %rdi     # 0xe95b6
leaq 0x274b8(%rip), %rsi     # 0xfac15
xorl %eax, %eax
callq 0xcfe73
movzbl 0x8(%r14), %edx
movl (%r14), %ecx
movl 0x4(%r14), %r8d
movzbl 0x14(%r14), %r9d
movl 0xc(%r14), %eax
movl 0x10(%r14), %r10d
xorl %r11d, %r11d
xorl %edi, %edi
movq %rbx, %rsi
pushq %r11
pushq %r11
pushq %r10
pushq %rax
callq 0xd2670
addq $0x20, %rsp
movl 0x10(%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_window.c
// Function: glutCreateSubWindow
int FGAPIENTRY glutCreateSubWindow( int parentID, int x, int y, int w, int h )
{
    int ret = 0;
    SFG_Window* window = NULL;
    SFG_Window* parent = NULL;

    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutCreateSubWindow" );
    parent = fgWindowByID( parentID );
    freeglut_return_val_if_fail( parent != NULL, 0 );
    if ( x < 0 )
    {
        x = parent->State.Width + x ;
        if ( w >= 0 ) x -= w ;
    }

    if ( w < 0 ) w = parent->State.Width - x + w ;
    if ( w < 0 )
    {
        x += w ;
        w = -w ;
    }

    if ( y < 0 )
    {
        y = parent->State.Height + y ;
        if ( h >= 0 ) y -= h ;
    }

    if ( h < 0 ) h = parent->State.Height - y + h ;
    if ( h < 0 )
    {
        y += h ;
        h = -h ;
    }

    window = fgCreateWindow( parent, "", GL_TRUE, x, y, GL_TRUE, w, h, GL_FALSE, GL_FALSE );
    ret = window->ID;

    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %r15d
movl %edx, %ebp
movl %esi, %r14d
movl %edi, %r12d
leaq 0x6ea03(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xd37d8
leaq 0x15dec(%rip), %rdi     # 0xe95b6
leaq 0x27455(%rip), %rsi     # 0xfac26
xorl %eax, %eax
callq 0xcfe73
movl %r12d, %edi
callq 0xd2dfd
testq %rax, %rax
je 0xd387b
testl %r14d, %r14d
jns 0xd37fe
xorl %ecx, %ecx
testl %r15d, %r15d
cmovgl %r15d, %ecx
subl %ecx, %r14d
addl 0x38(%rax), %r14d
testl %r15d, %r15d
jns 0xd380a
subl %r14d, %r15d
addl 0x38(%rax), %r15d
movl %r15d, %ecx
sarl $0x1f, %ecx
andl %r15d, %ecx
movl %r15d, %r10d
negl %r10d
cmovsl %r15d, %r10d
testl %ebp, %ebp
jns 0xd382d
xorl %edx, %edx
testl %ebx, %ebx
cmovgl %ebx, %edx
subl %edx, %ebp
addl 0x3c(%rax), %ebp
addl %r14d, %ecx
testl %ebx, %ebx
jns 0xd3839
subl %ebp, %ebx
addl 0x3c(%rax), %ebx
movl %ebx, %r8d
sarl $0x1f, %r8d
andl %ebx, %r8d
addl %ebp, %r8d
movl %ebx, %r11d
negl %r11d
cmovsl %ebx, %r11d
xorl %ebx, %ebx
leaq 0x769e(%rip), %rsi      # 0xdaef7
movq %rax, %rdi
movl $0x1, %edx
movl $0x1, %r9d
pushq %rbx
pushq %rbx
pushq %r11
pushq %r10
callq 0xd2670
addq $0x20, %rsp
movl 0x10(%rax), %eax
jmp 0xd387d
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_window.c
// Function: glutDestroyWindow
void FGAPIENTRY glutDestroyWindow( int windowID )
{
    SFG_Window* window;
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutDestroyWindow" );
    window = fgWindowByID( windowID );
    freeglut_return_if_fail( window != NULL );
    {
        fgExecutionState ExecState = fgState.ExecState;
        fgAddToWindowDestroyList( window );
        fgState.ExecState = ExecState;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x6e92d(%rip), %r14     # 0x1421c0
cmpb $0x0, 0x1c(%r14)
jne 0xd38af
leaq 0x15d15(%rip), %rdi     # 0xe95b6
leaq 0x27392(%rip), %rsi     # 0xfac3a
xorl %eax, %eax
callq 0xcfe73
movl %ebx, %edi
callq 0xd2dfd
testq %rax, %rax
je 0xd38d1
movl 0xa0(%r14), %ebx
movq %rax, %rdi
callq 0xd2861
movl %ebx, 0xa0(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_window.c
// Function: glutSetWindow
void FGAPIENTRY glutSetWindow( int ID )
{
    SFG_Window* window = NULL;

    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSetWindow" );
    if( fgStructure.CurrentWindow != NULL )
        if( fgStructure.CurrentWindow->ID == ID )
            return;

    window = fgWindowByID( ID );
    if( window == NULL )
    {
        fgWarning( "glutSetWindow(): window ID %d not found!", ID );
        return;
    }

    fgSetWindow( window );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x6e8d9(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xd3902
leaq 0x15cc2(%rip), %rdi     # 0xe95b6
leaq 0x27351(%rip), %rsi     # 0xfac4c
xorl %eax, %eax
callq 0xcfe73
leaq 0x72f67(%rip), %r15     # 0x146870
movq 0x30(%r15), %rax
testq %rax, %rax
je 0xd3917
cmpl %ebx, 0x10(%rax)
je 0xd394c
movl %ebx, %edi
callq 0xd2dfd
testq %rax, %rax
je 0xd3952
movq %rax, %r14
leaq 0x72ea3(%rip), %rax     # 0x1467d0
movq (%rax), %rdi
movq 0x18(%r14), %rdx
movq 0x20(%r14), %rcx
movq %rdx, %rsi
callq 0x21820
movq %r14, %rdi
callq 0xcee7f
movq %r14, 0x30(%r15)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x27301(%rip), %rdi     # 0xfac5a
movl %ebx, %esi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x22a74
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_window.c
// Function: glutGetWindow
int FGAPIENTRY glutGetWindow( void )
{
    SFG_Window *win = fgStructure.CurrentWindow;
    /*
     * Since GLUT did not throw an error if this function was called without a prior call to
     * "glutInit", this function shouldn't do so here.  Instead let us return a zero.
     * See Feature Request "[ 1307049 ] glutInit check".
     */
    if ( ! fgState.Initialised )
        return 0;

    while ( win && win->IsMenu )
        win = win->Parent;
    return win ? win->ID : 0;
}

// Assembly:
leaq 0x6e852(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
sete %dl
leaq 0x72ef4(%rip), %rax     # 0x146870
movq 0x30(%rax), %rcx
testq %rcx, %rcx
sete %sil
xorl %eax, %eax
orb %dl, %sil
jne 0xd39a3
cmpb $0x0, 0x170(%rcx)
je 0xd39a4
movq 0x158(%rcx), %rcx
testq %rcx, %rcx
jne 0xd398e
retq
movl 0x10(%rcx), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_window.c
// Function: glutShowWindow
void FGAPIENTRY glutShowWindow( void )
{
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutShowWindow" );
    FREEGLUT_EXIT_IF_NO_WINDOW ( "glutShowWindow" );

#if TARGET_HOST_POSIX_X11

    XMapWindow( fgDisplay.Display, fgStructure.CurrentWindow->Window.Handle );
    XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */

#elif TARGET_HOST_MS_WINDOWS

    ShowWindow( fgStructure.CurrentWindow->Window.Handle, SW_SHOW );

#endif

    fgStructure.CurrentWindow->State.Redisplay = GL_TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x6e80d(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xd39ce
leaq 0x15bf6(%rip), %rdi     # 0xe95b6
leaq 0x272bc(%rip), %rsi     # 0xfac83
xorl %eax, %eax
callq 0xcfe73
leaq 0x72e9b(%rip), %rbx     # 0x146870
movq 0x30(%rbx), %rax
testq %rax, %rax
jne 0xd39f7
leaq 0x15f29(%rip), %rdi     # 0xe990e
leaq 0x27297(%rip), %rsi     # 0xfac83
xorl %eax, %eax
callq 0xcfe73
movq 0x30(%rbx), %rax
leaq 0x72dd2(%rip), %r14     # 0x1467d0
movq (%r14), %rdi
movq 0x18(%rax), %rsi
callq 0x21a00
movq (%r14), %rdi
callq 0x21ea0
movq 0x30(%rbx), %rax
movb $0x1, 0x48(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_window.c
// Function: glutHideWindow
void FGAPIENTRY glutHideWindow( void )
{
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutHideWindow" );
    FREEGLUT_EXIT_IF_NO_WINDOW ( "glutHideWindow" );

#if TARGET_HOST_POSIX_X11

    if( fgStructure.CurrentWindow->Parent == NULL )
        XWithdrawWindow( fgDisplay.Display,
                         fgStructure.CurrentWindow->Window.Handle,
                         fgDisplay.Screen );
    else
        XUnmapWindow( fgDisplay.Display,
                      fgStructure.CurrentWindow->Window.Handle );
    XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */

#elif TARGET_HOST_MS_WINDOWS

    ShowWindow( fgStructure.CurrentWindow->Window.Handle, SW_HIDE );

#endif

    fgStructure.CurrentWindow->State.Redisplay = GL_FALSE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x6e793(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xd3a48
leaq 0x15b7c(%rip), %rdi     # 0xe95b6
leaq 0x27251(%rip), %rsi     # 0xfac92
xorl %eax, %eax
callq 0xcfe73
leaq 0x72e21(%rip), %rbx     # 0x146870
movq 0x30(%rbx), %rax
testq %rax, %rax
jne 0xd3a71
leaq 0x15eaf(%rip), %rdi     # 0xe990e
leaq 0x2722c(%rip), %rsi     # 0xfac92
xorl %eax, %eax
callq 0xcfe73
movq 0x30(%rbx), %rax
cmpq $0x0, 0x158(%rax)
leaq 0x72d50(%rip), %r14     # 0x1467d0
movq (%r14), %rdi
movq 0x18(%rax), %rsi
je 0xd3a90
callq 0x21e30
jmp 0xd3a99
movl 0x8(%r14), %edx
callq 0x216f0
movq (%r14), %rdi
callq 0x21ea0
movq 0x30(%rbx), %rax
movb $0x0, 0x48(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_window.c
// Function: glutIconifyWindow
void FGAPIENTRY glutIconifyWindow( void )
{
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutIconifyWindow" );
    FREEGLUT_EXIT_IF_NO_WINDOW ( "glutIconifyWindow" );

    fgStructure.CurrentWindow->State.Visible   = GL_FALSE;
#if TARGET_HOST_POSIX_X11

    XIconifyWindow( fgDisplay.Display, fgStructure.CurrentWindow->Window.Handle,
                    fgDisplay.Screen );
    XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */

#elif TARGET_HOST_MS_WINDOWS

    ShowWindow( fgStructure.CurrentWindow->Window.Handle, SW_MINIMIZE );

#endif

    fgStructure.CurrentWindow->State.Redisplay = GL_FALSE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
leaq 0x6e704(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xd3ad7
leaq 0x15aed(%rip), %rdi     # 0xe95b6
leaq 0x271d1(%rip), %rsi     # 0xfaca1
xorl %eax, %eax
callq 0xcfe73
leaq 0x72d92(%rip), %rbx     # 0x146870
movq 0x30(%rbx), %rax
testq %rax, %rax
jne 0xd3b00
leaq 0x15e20(%rip), %rdi     # 0xe990e
leaq 0x271ac(%rip), %rsi     # 0xfaca1
xorl %eax, %eax
callq 0xcfe73
movq 0x30(%rbx), %rax
xorl %ebp, %ebp
movb %bpl, 0x49(%rax)
leaq 0x72cc3(%rip), %r14     # 0x1467d0
movq (%r14), %rdi
movq 0x18(%rax), %rsi
movl 0x8(%r14), %edx
callq 0x21420
movq (%r14), %rdi
callq 0x21ea0
movq 0x30(%rbx), %rax
movb %bpl, 0x48(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_window.c
// Function: glutSetWindowTitle
void FGAPIENTRY glutSetWindowTitle( const char* title )
{
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSetWindowTitle" );
    FREEGLUT_EXIT_IF_NO_WINDOW ( "glutSetWindowTitle" );
    if( ! fgStructure.CurrentWindow->Parent )
    {
#if TARGET_HOST_POSIX_X11

        XTextProperty text;

        text.value = (unsigned char *) title;
        text.encoding = XA_STRING;
        text.format = 8;
        text.nitems = strlen( title );

        XSetWMName(
            fgDisplay.Display,
            fgStructure.CurrentWindow->Window.Handle,
            &text
        );

        XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */

#elif TARGET_HOST_MS_WINDOWS
#    ifdef _WIN32_WCE
        {
            wchar_t* wstr = fghWstrFromStr(title);
            SetWindowText( fgStructure.CurrentWindow->Window.Handle, wstr );
            free(wstr);
        }
#    else
        SetWindowText( fgStructure.CurrentWindow->Window.Handle, title );
#    endif

#endif
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x6e67b(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xd3b60
leaq 0x15a64(%rip), %rdi     # 0xe95b6
leaq 0x2715a(%rip), %rsi     # 0xfacb3
xorl %eax, %eax
callq 0xcfe73
leaq 0x72d09(%rip), %r14     # 0x146870
movq 0x30(%r14), %r15
testq %r15, %r15
jne 0xd3b89
leaq 0x15d97(%rip), %rdi     # 0xe990e
leaq 0x27135(%rip), %rsi     # 0xfacb3
xorl %eax, %eax
callq 0xcfe73
movq 0x30(%r14), %r15
cmpq $0x0, 0x158(%r15)
jne 0xd3bd3
movq %rsp, %r14
movq %rbx, (%r14)
movq $0x1f, 0x8(%r14)
movl $0x8, 0x10(%r14)
movq %rbx, %rdi
callq 0x21380
movq %rax, 0x18(%r14)
leaq 0x72c14(%rip), %rbx     # 0x1467d0
movq (%rbx), %rdi
movq 0x18(%r15), %rsi
movq %r14, %rdx
callq 0x21b50
movq (%rbx), %rdi
callq 0x21ea0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_window.c
// Function: glutSetIconTitle
void FGAPIENTRY glutSetIconTitle( const char* title )
{
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSetIconTitle" );
    FREEGLUT_EXIT_IF_NO_WINDOW ( "glutSetIconTitle" );

    if( ! fgStructure.CurrentWindow->Parent )
    {
#if TARGET_HOST_POSIX_X11

        XTextProperty text;

        text.value = (unsigned char *) title;
        text.encoding = XA_STRING;
        text.format = 8;
        text.nitems = strlen( title );

        XSetWMIconName(
            fgDisplay.Display,
            fgStructure.CurrentWindow->Window.Handle,
            &text
        );

        XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */

#elif TARGET_HOST_MS_WINDOWS
#    ifdef _WIN32_WCE
        {
            wchar_t* wstr = fghWstrFromStr(title);
            SetWindowText( fgStructure.CurrentWindow->Window.Handle, wstr );
            free(wstr);
        }
#    else
        SetWindowText( fgStructure.CurrentWindow->Window.Handle, title );
#    endif

#endif
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x6e5d0(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xd3c0b
leaq 0x159b9(%rip), %rdi     # 0xe95b6
leaq 0x270c2(%rip), %rsi     # 0xfacc6
xorl %eax, %eax
callq 0xcfe73
leaq 0x72c5e(%rip), %r14     # 0x146870
movq 0x30(%r14), %r15
testq %r15, %r15
jne 0xd3c34
leaq 0x15cec(%rip), %rdi     # 0xe990e
leaq 0x2709d(%rip), %rsi     # 0xfacc6
xorl %eax, %eax
callq 0xcfe73
movq 0x30(%r14), %r15
cmpq $0x0, 0x158(%r15)
jne 0xd3c7e
movq %rsp, %r14
movq %rbx, (%r14)
movq $0x1f, 0x8(%r14)
movl $0x8, 0x10(%r14)
movq %rbx, %rdi
callq 0x21380
movq %rax, 0x18(%r14)
leaq 0x72b69(%rip), %rbx     # 0x1467d0
movq (%rbx), %rdi
movq 0x18(%r15), %rsi
movq %r14, %rdx
callq 0x219a0
movq (%rbx), %rdi
callq 0x21ea0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_window.c
// Function: glutReshapeWindow
void FGAPIENTRY glutReshapeWindow( int width, int height )
{
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutReshapeWindow" );
    FREEGLUT_EXIT_IF_NO_WINDOW ( "glutReshapeWindow" );

    if (glutGet(GLUT_FULL_SCREEN))
    {
      /*  Leave full screen state before resizing. */
      glutFullScreenToggle();
    }

    fgStructure.CurrentWindow->State.NeedToResize = GL_TRUE;
    fgStructure.CurrentWindow->State.Width  = width ;
    fgStructure.CurrentWindow->State.Height = height;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %edi, %ebp
leaq 0x6e529(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xd3cb2
leaq 0x15912(%rip), %rdi     # 0xe95b6
leaq 0x2702c(%rip), %rsi     # 0xfacd7
xorl %eax, %eax
callq 0xcfe73
leaq 0x72bb7(%rip), %r14     # 0x146870
cmpq $0x0, 0x30(%r14)
jne 0xd3cd5
leaq 0x15c47(%rip), %rdi     # 0xe990e
leaq 0x27009(%rip), %rsi     # 0xfacd7
xorl %eax, %eax
callq 0xcfe73
movl $0x1ff, %edi            # imm = 0x1FF
callq 0xd1dc4
testl %eax, %eax
je 0xd3ce8
callq 0xd3cfb
movq 0x30(%r14), %rax
movb $0x1, 0x6a(%rax)
movl %ebp, 0x38(%rax)
movl %ebx, 0x3c(%rax)
popq %rbx
popq %r14
popq %rbp
retq