// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_menu.c
// Function: fgDisplayMenu
void fgDisplayMenu( void )
{
    SFG_Window* window = fgStructure.CurrentWindow;
    SFG_Menu* menu = NULL;

    FREEGLUT_INTERNAL_ERROR_EXIT ( fgStructure.CurrentWindow, "Displaying menu in nonexistent window",
                                   "fgDisplayMenu" );

    /* Check if there is an active menu attached to this window... */
    menu = window->ActiveMenu;
    freeglut_return_if_fail( menu );

    fgSetWindow( menu->Window );

    glPushAttrib( GL_DEPTH_BUFFER_BIT | GL_TEXTURE_BIT | GL_LIGHTING_BIT |
                  GL_POLYGON_BIT );

    glDisable( GL_DEPTH_TEST );
    glDisable( GL_TEXTURE_2D );
    glDisable( GL_LIGHTING   );
    glDisable( GL_CULL_FACE  );

    glMatrixMode( GL_PROJECTION );
    glPushMatrix( );
    glLoadIdentity( );
    glOrtho(
         0, glutGet( GLUT_WINDOW_WIDTH  ),
         glutGet( GLUT_WINDOW_HEIGHT ), 0,
        -1, 1
    );

    glMatrixMode( GL_MODELVIEW );
    glPushMatrix( );
    glLoadIdentity( );

    fghDisplayMenuBox( menu );

    glPopAttrib( );

    glMatrixMode( GL_PROJECTION );
    glPopMatrix( );
    glMatrixMode( GL_MODELVIEW );
    glPopMatrix( );

    glutSwapBuffers( );

    fgSetWindow ( window );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x75ccf(%rip), %rax     # 0x146870
movq 0x30(%rax), %rbx
testq %rbx, %rbx
jne 0xd0bc6
leaq 0x293fd(%rip), %rdi     # 0xf9fae
leaq 0x29abf(%rip), %rsi     # 0xfa677
leaq 0x29ade(%rip), %rdx     # 0xfa69d
xorl %eax, %eax
callq 0xcfe73
movq 0x150(%rbx), %r13
testq %r13, %r13
je 0xd102c
movq %rbx, 0x10(%rsp)
movq 0x60(%r13), %rdi
callq 0xd314d
movl $0x40148, %edi          # imm = 0x40148
callq 0x21d40
movl $0xb71, %edi            # imm = 0xB71
callq 0x211f0
movl $0xde1, %edi            # imm = 0xDE1
callq 0x211f0
movl $0xb50, %edi            # imm = 0xB50
callq 0x211f0
movl $0xb44, %edi            # imm = 0xB44
callq 0x211f0
movl $0x1701, %edi           # imm = 0x1701
callq 0x21cb0
callq 0x21f50
callq 0x21c40
movl $0x66, %edi
callq 0xd1dc4
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
movl $0x67, %edi
callq 0xd1dc4
cvtsi2sd %eax, %xmm2
movsd 0x987c(%rip), %xmm4     # 0xda4d0
movsd 0x93bc(%rip), %xmm5     # 0xda018
xorpd %xmm0, %xmm0
xorps %xmm3, %xmm3
movsd 0x8(%rsp), %xmm1
callq 0x221e0
movl $0x1700, %edi           # imm = 0x1700
callq 0x21cb0
callq 0x21f50
callq 0x21c40
movss 0x937a(%rip), %xmm0     # 0xda004
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
movaps %xmm0, %xmm3
callq 0x21740
movl $0x8, %edi
callq 0x21190
movl 0x44(%r13), %edi
xorl %esi, %esi
callq 0x21bd0
movl 0x44(%r13), %edi
addl $-0x2, %edi
movl $0x2, %esi
callq 0x21bd0
xorl %edi, %edi
xorl %esi, %esi
callq 0x21bd0
movl $0x2, %edi
movl $0x2, %esi
callq 0x21bd0
movl 0x48(%r13), %esi
xorl %edi, %edi
callq 0x21bd0
movl 0x48(%r13), %esi
addl $-0x2, %esi
movl $0x2, %edi
callq 0x21bd0
callq 0x21c50
movss 0xd121(%rip), %xmm0     # 0xdde20
movapd %xmm0, %xmm1
movapd %xmm0, %xmm2
movss 0x92f5(%rip), %xmm3     # 0xda004
callq 0x21740
movl $0x8, %edi
callq 0x21190
movl 0x48(%r13), %esi
xorl %edi, %edi
callq 0x21bd0
movl 0x48(%r13), %esi
addl $-0x2, %esi
movl $0x2, %edi
callq 0x21bd0
movl 0x44(%r13), %edi
movl 0x48(%r13), %esi
callq 0x21bd0
movl 0x44(%r13), %edi
movl 0x48(%r13), %esi
addl $-0x2, %edi
addl $-0x2, %esi
callq 0x21bd0
movl 0x44(%r13), %edi
xorl %esi, %esi
callq 0x21bd0
movl 0x44(%r13), %edi
addl $-0x2, %edi
movl $0x2, %esi
callq 0x21bd0
callq 0x21c50
leaq 0x7151e(%rip), %rdi     # 0x1422a0
callq 0x21350
movl $0x7, %edi
callq 0x21190
movl $0x2, %edi
movl $0x2, %esi
callq 0x21bd0
movl 0x44(%r13), %edi
addl $-0x2, %edi
movl $0x2, %esi
callq 0x21bd0
movl 0x44(%r13), %edi
movl 0x48(%r13), %esi
addl $-0x2, %edi
addl $-0x2, %esi
callq 0x21bd0
movl 0x48(%r13), %esi
addl $-0x2, %esi
movl $0x2, %edi
callq 0x21bd0
callq 0x21c50
movq 0x20(%r13), %rbx
testq %rbx, %rbx
je 0xd0ea1
leaq 0x714c2(%rip), %r14     # 0x1422b0
leaq 0x759c3(%rip), %r15     # 0x1467b8
cmpb $0x0, 0x28(%rbx)
je 0xd0e95
movl 0x14(%rbx), %r12d
movq %r14, %rdi
callq 0x21350
movl $0x7, %edi
callq 0x21190
movq %r15, %rdi
callq 0xcda80
leal 0x2(%rax), %esi
imull %r12d, %esi
addl $0x2, %esi
movl $0x2, %edi
callq 0x21bd0
movl 0x44(%r13), %ebp
addl $-0x2, %ebp
movq %r15, %rdi
callq 0xcda80
leal 0x2(%rax), %esi
imull %r12d, %esi
addl $0x2, %esi
movl %ebp, %edi
callq 0x21bd0
movl 0x44(%r13), %ebp
addl $-0x2, %ebp
incl %r12d
movq %r15, %rdi
callq 0xcda80
leal 0x2(%rax), %esi
imull %r12d, %esi
addl $0x2, %esi
movl %ebp, %edi
callq 0x21bd0
movq %r15, %rdi
callq 0xcda80
leal 0x2(%rax), %esi
imull %r12d, %esi
addl $0x2, %esi
movl $0x2, %edi
callq 0x21bd0
callq 0x21c50
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0xd0df5
leaq 0x71418(%rip), %rdi     # 0x1422c0
callq 0x21350
movq 0x20(%r13), %r15
testq %r15, %r15
je 0xd0fec
xorl %ebx, %ebx
leaq 0x758f5(%rip), %r14     # 0x1467b8
cmpb $0x0, 0x28(%r15)
je 0xd0ed6
leaq 0x713ff(%rip), %rdi     # 0x1422d0
callq 0x21350
leal 0x1(%rbx), %r12d
movq %r14, %rdi
callq 0xcda80
leal 0x2(%rax), %ebp
imull %r12d, %ebp
movq %r14, %rdi
callq 0xcda80
addl $0x2, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x961d(%rip), %xmm0     # 0xda520
addsd 0xad15(%rip), %xmm0     # 0xdbc20
cvttsd2si %xmm0, %eax
subl %eax, %ebp
movl $0x4, %edi
movl %ebp, %esi
callq 0x212d0
movq 0x18(%r15), %rsi
movq %r14, %rdi
callq 0xcd83d
cmpq $0x0, 0x20(%r15)
je 0xd0fca
movq %r14, %rdi
movl $0x5f, %esi
callq 0xcd987
movl 0x44(%r13), %ebp
subl %eax, %ebp
addl $-0x2, %ebp
movq %r14, %rdi
callq 0xcda80
movl %r12d, 0x8(%rsp)
movq %r13, %r12
movl %eax, %r13d
addl $0x2, %r13d
imull %ebx, %r13d
movl $0x4, %edi
callq 0x21190
leal 0x6(%r13), %esi
movl %ebp, %edi
callq 0x21bd0
movl 0x44(%r12), %ebx
addl $-0x2, %ebx
movq %r14, %rdi
callq 0xcda80
movl %eax, %ecx
addl $0x4, %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
addl $0x4, %eax
sarl %eax
leal (%rax,%r13), %esi
addl $0x2, %esi
movl %ebx, %edi
callq 0x21bd0
movq %r14, %rdi
callq 0xcda80
leal (%rax,%r13), %esi
addl $0x2, %esi
movq %r12, %r13
movl 0x8(%rsp), %r12d
movl %ebp, %edi
callq 0x21bd0
callq 0x21c50
cmpb $0x0, 0x28(%r15)
je 0xd0fdd
leaq 0x712e8(%rip), %rdi     # 0x1422c0
callq 0x21350
movq (%r15), %r15
movl %r12d, %ebx
testq %r15, %r15
jne 0xd0ec3
callq 0x21090
movl $0x1701, %edi           # imm = 0x1701
callq 0x21cb0
callq 0x221c0
movl $0x1700, %edi           # imm = 0x1700
callq 0x21cb0
callq 0x221c0
callq 0xcd5e2
movq 0x10(%rsp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd314d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq