LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_font.c
// Function: fghFontByID
static SFG_Font* fghFontByID( void* font )
{
    if( font == GLUT_BITMAP_8_BY_13        )
        return &fgFontFixed8x13;
    if( font == GLUT_BITMAP_9_BY_15        )
        return &fgFontFixed9x15;
    if( font == GLUT_BITMAP_HELVETICA_10   )
        return &fgFontHelvetica10;
    if( font == GLUT_BITMAP_HELVETICA_12   )
        return &fgFontHelvetica12;
    if( font == GLUT_BITMAP_HELVETICA_18   )
        return &fgFontHelvetica18;
    if( font == GLUT_BITMAP_TIMES_ROMAN_10 )
        return &fgFontTimesRoman10;
    if( font == GLUT_BITMAP_TIMES_ROMAN_24 )
        return &fgFontTimesRoman24;

    fgWarning( "font 0x%08x not found", font );
    return 0;
}

// Assembly:
pushq %rbx
cmpq 0x6f7ca(%rip), %rdi     # 0x13cf78
je 0xcd7fb
movq %rdi, %rsi
cmpq 0x6f836(%rip), %rdi     # 0x13cff0
je 0xcd804
cmpq 0x6f775(%rip), %rsi     # 0x13cf38
je 0xcd80d
cmpq 0x6f7fc(%rip), %rsi     # 0x13cfc8
je 0xcd816
cmpq 0x6f753(%rip), %rsi     # 0x13cf28
je 0xcd81f
cmpq 0x6f77a(%rip), %rsi     # 0x13cf58
je 0xcd828
cmpq 0x6f769(%rip), %rsi     # 0x13cf50
je 0xcd831
leaq 0x1c269(%rip), %rdi     # 0xe9a59
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x22a74
jmp 0xcd838
leaq 0x6d02e(%rip), %rbx     # 0x13a830
jmp 0xcd838
leaq 0x6d045(%rip), %rbx     # 0x13a850
jmp 0xcd838
leaq 0x6d05c(%rip), %rbx     # 0x13a870
jmp 0xcd838
leaq 0x6d073(%rip), %rbx     # 0x13a890
jmp 0xcd838
leaq 0x6d08a(%rip), %rbx     # 0x13a8b0
jmp 0xcd838
leaq 0x6d0a1(%rip), %rbx     # 0x13a8d0
jmp 0xcd838
leaq 0x6d0b8(%rip), %rbx     # 0x13a8f0
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_font.c
// Function: glutBitmapWidth
int FGAPIENTRY glutBitmapWidth( void* fontID, int character )
{
    SFG_Font* font;
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutBitmapWidth" );
    font = fghFontByID( fontID );
    freeglut_return_val_if_fail( character > 0 && character < 256, 0 );
    freeglut_return_val_if_fail( font, 0 );
    return *( font->Characters[ character ] );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x74829(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xcd9b2
leaq 0x1bc12(%rip), %rdi     # 0xe95b6
leaq 0x1c01e(%rip), %rsi     # 0xe99c9
xorl %eax, %eax
callq 0xcfe73
movq %r14, %rdi
callq 0xcd7a6
leal -0x100(%rbx), %ecx
cmpl $0xffffff01, %ecx       # imm = 0xFFFFFF01
setb %dl
testq %rax, %rax
sete %sil
xorl %ecx, %ecx
orb %dl, %sil
jne 0xcd9e4
movq 0x10(%rax), %rax
movl %ebx, %ecx
movq (%rax,%rcx,8), %rax
movzbl (%rax), %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_font.c
// Function: glutBitmapLength
int FGAPIENTRY glutBitmapLength( void* fontID, const unsigned char* string )
{
    unsigned char c;
    int length = 0, this_line_length = 0;
    SFG_Font* font;
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutBitmapLength" );
    font = fghFontByID( fontID );
    freeglut_return_val_if_fail( font, 0 );
    if ( !string || ! *string )
        return 0;

    while( ( c = *string++) )
    {
        if( c != '\n' )/* Not an EOL, increment length of line */
            this_line_length += *( font->Characters[ c ]);
        else  /* EOL; reset the length of this line */
        {
            if( length < this_line_length )
                length = this_line_length;
            this_line_length = 0;
        }
    }
    if ( length < this_line_length )
        length = this_line_length;

    return length;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x747c1(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xcda1a
leaq 0x1bbaa(%rip), %rdi     # 0xe95b6
leaq 0x1bfc6(%rip), %rsi     # 0xe99d9
xorl %eax, %eax
callq 0xcfe73
movq %r14, %rdi
callq 0xcd7a6
testq %rax, %rax
sete %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
jne 0xcda6d
movb (%rbx), %sil
testb %sil, %sil
je 0xcda6d
incq %rbx
xorl %edx, %edx
xorl %ecx, %ecx
cmpb $0xa, %sil
je 0xcda5e
movzbl %sil, %esi
testl %esi, %esi
je 0xcda71
movq 0x10(%rax), %rdi
movq (%rdi,%rsi,8), %rsi
movzbl (%rsi), %esi
addl %esi, %ecx
jmp 0xcda65
cmpl %ecx, %edx
cmovlel %ecx, %edx
xorl %ecx, %ecx
movb (%rbx), %sil
incq %rbx
jmp 0xcda41
xorl %eax, %eax
jmp 0xcda78
cmpl %ecx, %edx
cmovgl %edx, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_font.c
// Function: glutBitmapHeight
int FGAPIENTRY glutBitmapHeight( void* fontID )
{
    SFG_Font* font;
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutBitmapHeight" );
    font = fghFontByID( fontID );
    freeglut_return_val_if_fail( font, 0 );
    return font->Height;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x74735(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xcdaa6
leaq 0x1bb1e(%rip), %rdi     # 0xe95b6
leaq 0x1bf4b(%rip), %rsi     # 0xe99ea
xorl %eax, %eax
callq 0xcfe73
movq %rbx, %rdi
callq 0xcd7a6
testq %rax, %rax
je 0xcdab8
movl 0xc(%rax), %eax
jmp 0xcdaba
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_font.c
// Function: glutStrokeCharacter
void FGAPIENTRY glutStrokeCharacter( void* fontID, int character )
{
    const SFG_StrokeChar *schar;
    const SFG_StrokeStrip *strip;
    int i, j;
    SFG_StrokeFont* font;
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutStrokeCharacter" );
    font = fghStrokeByID( fontID );
    freeglut_return_if_fail( character >= 0 );
    freeglut_return_if_fail( character < font->Quantity );
    freeglut_return_if_fail( font );

    schar = font->Characters[ character ];
    freeglut_return_if_fail( schar );
    strip = schar->Strips;

    for( i = 0; i < schar->Number; i++, strip++ )
    {
        glBegin( GL_LINE_STRIP );
        for( j = 0; j < strip->Number; j++ )
            glVertex2f( strip->Vertices[ j ].X, strip->Vertices[ j ].Y );
        glEnd( );
				glBegin( GL_POINTS );
        for( j = 0; j < strip->Number; j++ )
            glVertex2f( strip->Vertices[ j ].X, strip->Vertices[ j ].Y );
				glEnd( );
    }
    glTranslatef( schar->Right, 0.0, 0.0 );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x746f0(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xcdaeb
leaq 0x1bad9(%rip), %rdi     # 0xe95b6
leaq 0x1bf17(%rip), %rsi     # 0xe99fb
xorl %eax, %eax
callq 0xcfe73
cmpq 0x6f49e(%rip), %r14     # 0x13cf90
je 0xcdb15
cmpq 0x6f435(%rip), %r14     # 0x13cf30
je 0xcdb1e
leaq 0x1bf4e(%rip), %rdi     # 0xe9a52
xorl %r15d, %r15d
movq %r14, %rsi
xorl %eax, %eax
callq 0x22a74
movb $0x1, %al
jmp 0xcdb27
leaq 0x6cdf4(%rip), %r15     # 0x13a910
jmp 0xcdb25
leaq 0x6dfcb(%rip), %r15     # 0x13baf0
xorl %eax, %eax
testl %ebx, %ebx
js 0xcdbf8
cmpl %ebx, 0x8(%r15)
setle %cl
orb %cl, %al
jne 0xcdbf8
movq 0x10(%r15), %rax
movl %ebx, %ecx
movq (%rax,%rcx,8), %rbx
testq %rbx, %rbx
je 0xcdbf8
cmpl $0x0, 0x4(%rbx)
jle 0xcdbde
movq 0x8(%rbx), %r14
xorl %r15d, %r15d
movl $0x3, %edi
callq 0x21190
cmpl $0x0, (%r14)
jle 0xcdb96
xorl %r12d, %r12d
movq 0x8(%r14), %rax
movss (%rax,%r12,8), %xmm0
movss 0x4(%rax,%r12,8), %xmm1
callq 0x21af0
incq %r12
movslq (%r14), %rax
cmpq %rax, %r12
jl 0xcdb75
callq 0x21c50
xorl %edi, %edi
callq 0x21190
cmpl $0x0, (%r14)
jle 0xcdbcc
xorl %r12d, %r12d
movq 0x8(%r14), %rax
movss (%rax,%r12,8), %xmm0
movss 0x4(%rax,%r12,8), %xmm1
callq 0x21af0
incq %r12
movslq (%r14), %rax
cmpq %rax, %r12
jl 0xcdbab
callq 0x21c50
incl %r15d
addq $0x10, %r14
cmpl 0x4(%rbx), %r15d
jl 0xcdb62
movss (%rbx), %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x21ec0
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_font.c
// Function: glutStrokeWidth
int FGAPIENTRY glutStrokeWidth( void* fontID, int character )
{
    const SFG_StrokeChar *schar;
    SFG_StrokeFont* font;
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutStrokeWidth" );
    font = fghStrokeByID( fontID );
    freeglut_return_val_if_fail( ( character >= 0 ) &&
                                 ( character < font->Quantity ),
                                 0
    );
    freeglut_return_val_if_fail( font, 0 );
    schar = font->Characters[ character ];
    freeglut_return_val_if_fail( schar, 0 );

    return ( int )( schar->Right + 0.5 );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x74443(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xcdd98
leaq 0x1b82c(%rip), %rdi     # 0xe95b6
leaq 0x1bc8f(%rip), %rsi     # 0xe9a20
xorl %eax, %eax
callq 0xcfe73
xorl %ebp, %ebp
cmpq 0x6f1ef(%rip), %r14     # 0x13cf90
je 0xcddc4
cmpq 0x6f186(%rip), %r14     # 0x13cf30
je 0xcddcd
leaq 0x1bc9f(%rip), %rdi     # 0xe9a52
xorl %r15d, %r15d
movq %r14, %rsi
xorl %eax, %eax
callq 0x22a74
movb $0x1, %al
jmp 0xcddd6
leaq 0x6cb45(%rip), %r15     # 0x13a910
jmp 0xcddd4
leaq 0x6dd1c(%rip), %r15     # 0x13baf0
xorl %eax, %eax
testl %ebx, %ebx
js 0xcde04
cmpl %ebx, 0x8(%r15)
setle %cl
orb %cl, %al
jne 0xcde04
movq 0x10(%r15), %rax
movl %ebx, %ecx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0xcde04
cvtss2sd (%rax), %xmm0
addsd 0xc220(%rip), %xmm0     # 0xda020
cvttsd2si %xmm0, %ebp
movl %ebp, %eax
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_font.c
// Function: glutStrokeLength
int FGAPIENTRY glutStrokeLength( void* fontID, const unsigned char* string )
{
    unsigned char c;
    float length = 0.0;
    float this_line_length = 0.0;
    SFG_StrokeFont* font;
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutStrokeLength" );
    font = fghStrokeByID( fontID );
    freeglut_return_val_if_fail( font, 0 );
    if ( !string || ! *string )
        return 0;

    while( ( c = *string++) )
        if( c < font->Quantity )
        {
            if( c == '\n' ) /* EOL; reset the length of this line */
            {
                if( length < this_line_length )
                    length = this_line_length;
                this_line_length = 0.0;
            }
            else  /* Not an EOL, increment the length of this line */
            {
                const SFG_StrokeChar *schar = font->Characters[ c ];
                if( schar )
                    this_line_length += schar->Right;
            }
        }
    if( length < this_line_length )
        length = this_line_length;
    return( int )( length + 0.5 );
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x7439e(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xcde3d
leaq 0x1b787(%rip), %rdi     # 0xe95b6
leaq 0x1bbfa(%rip), %rsi     # 0xe9a30
xorl %eax, %eax
callq 0xcfe73
cmpq 0x6f14c(%rip), %r14     # 0x13cf90
je 0xcde64
cmpq 0x6f0e3(%rip), %r14     # 0x13cf30
je 0xcde6d
leaq 0x1bbfc(%rip), %rdi     # 0xe9a52
xorl %ebp, %ebp
movq %r14, %rsi
xorl %eax, %eax
callq 0x22a74
jmp 0xcded3
leaq 0x6caa5(%rip), %rax     # 0x13a910
jmp 0xcde74
leaq 0x6dc7c(%rip), %rax     # 0x13baf0
xorl %ebp, %ebp
testq %rbx, %rbx
je 0xcded3
movb (%rbx), %dl
testb %dl, %dl
je 0xcded3
movl 0x8(%rax), %ecx
incq %rbx
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
movzbl %dl, %esi
cmpl %esi, %ecx
jle 0xcdeb6
cmpb $0xa, %dl
jne 0xcdea5
maxss %xmm1, %xmm0
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
jmp 0xcdeb6
movq 0x10(%rax), %rdx
movq (%rdx,%rsi,8), %rdx
testq %rdx, %rdx
je 0xcdeb6
addss (%rdx), %xmm0
movb (%rbx), %dl
incq %rbx
testb %dl, %dl
jne 0xcde8d
maxss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
addsd 0xc151(%rip), %xmm0     # 0xda020
cvttsd2si %xmm0, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_font.c
// Function: glutStrokeHeight
GLfloat FGAPIENTRY glutStrokeHeight( void* fontID )
{
    SFG_StrokeFont* font;
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutStrokeHeight" );
    font = fghStrokeByID( fontID );
    freeglut_return_val_if_fail( font, 0.0 );
    return font->Height;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x742db(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xcdf00
leaq 0x1b6c4(%rip), %rdi     # 0xe95b6
leaq 0x1bb48(%rip), %rsi     # 0xe9a41
xorl %eax, %eax
callq 0xcfe73
cmpq 0x6f089(%rip), %rbx     # 0x13cf90
je 0xcdf28
cmpq 0x6f020(%rip), %rbx     # 0x13cf30
je 0xcdf31
leaq 0x1bb39(%rip), %rdi     # 0xe9a52
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22a74
xorps %xmm0, %xmm0
jmp 0xcdf3d
leaq 0x6c9e1(%rip), %rax     # 0x13a910
jmp 0xcdf38
leaq 0x6dbb8(%rip), %rax     # 0x13baf0
movss 0xc(%rax), %xmm0
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_init.c
// Function: fgHintPresent
int fgHintPresent(Window window, Atom property, Atom hint)
{
  Atom ** atoms_ptr;
  int number_of_atoms;
  int supported;
  int i;

  supported = 0;

  atoms_ptr = malloc(sizeof(Atom *));
  number_of_atoms = fghGetWindowProperty(window,
					 property,
					 XA_ATOM,
					 (unsigned char **) atoms_ptr);
  for (i = 0; i < number_of_atoms; i++)
    {
      if ((*atoms_ptr)[i] == hint)
      {
          supported = 1;
          break;
      }
    }

  return supported;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movl $0x8, %edi
callq 0x21c60
movq %rax, %r14
movl $0x4, %edx
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rcx
callq 0xcdf9f
testl %eax, %eax
jle 0xcdf8a
movq (%r14), %rcx
movl %eax, %eax
xorl %edx, %edx
cmpq %rbx, (%rcx,%rdx,8)
je 0xcdf8e
incq %rdx
cmpq %rdx, %rax
jne 0xcdf7c
xorl %eax, %eax
jmp 0xcdf93
movl $0x1, %eax
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_init.c
// Function: fghGetWindowProperty
static int fghGetWindowProperty(Window window,
				Atom property,
				Atom type,
				unsigned char ** data)
{
  /*
   * Caller always has to use "Xfree()" to free "data", since
   * "XGetWindowProperty() always allocates one extra byte in prop_return
   * [i.e. "data"] (even if the property is zero length) [..]".
   */

  int status;  /*  Returned by "XGetWindowProperty". */

  Atom          type_returned;
  int           temp_format;             /*  Not used. */
  unsigned long number_of_elements;
  unsigned long temp_bytes_after;        /*  Not used. */


  status = XGetWindowProperty(fgDisplay.Display,
			      window,
			      property,
			      0,
			      LONG_MAX,
			      False,
			      type,
			      &type_returned,
			      &temp_format,
			      &number_of_elements,
			      &temp_bytes_after,
			      data);

  FREEGLUT_INTERNAL_ERROR_EXIT(status == Success,
			       "XGetWindowProperty failled",
			       "fghGetWindowProperty");

  if (type_returned != type)
    {
      number_of_elements = 0;
    }

  return number_of_elements;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rax
movq %rdx, %rbx
movq %rsi, %rdx
movq %rdi, %rsi
movq 0x78813(%rip), %rdi     # 0x1467d0
leaq 0x20(%rsp), %r10
leaq 0x8(%rsp), %r11
leaq 0x1c(%rsp), %r15
leaq 0x10(%rsp), %r12
xorl %r14d, %r14d
movabsq $0x7fffffffffffffff, %r8 # imm = 0x7FFFFFFFFFFFFFFF
xorl %ecx, %ecx
xorl %r9d, %r9d
pushq %rax
pushq %r10
pushq %r11
pushq %r15
pushq %r12
pushq %rbx
callq 0x21260
addq $0x30, %rsp
testl %eax, %eax
je 0xce016
leaq 0x2bfad(%rip), %rdi     # 0xf9fae
leaq 0x2bfd2(%rip), %rsi     # 0xf9fda
leaq 0x2bfe6(%rip), %rdx     # 0xf9ff5
xorl %eax, %eax
callq 0xcfe73
cmpq %rbx, 0x10(%rsp)
jne 0xce022
movl 0x8(%rsp), %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_input_devices.c
// Function: fgInitialiseInputDevices
void fgInitialiseInputDevices ( void )
{
    if( !fgState.InputDevsInitialised )
    {
      /* will return true for VC8 (VC2005) and higher */
#if TARGET_HOST_MS_WINDOWS && ( _MSC_VER >= 1400 ) && HAVE_ERRNO
        char *dial_device=NULL;
        size_t sLen;
        errno_t err = _dupenv_s( &dial_device, &sLen, "GLUT_DIALS_SERIAL" );
        if (err)
            fgError("Error getting GLUT_DIALS_SERIAL environment variable");
#else
        const char *dial_device=NULL;
        dial_device = getenv ( "GLUT_DIALS_SERIAL" );
#endif
#if TARGET_HOST_MS_WINDOWS
        if (!dial_device){
            static char devname[256];
            DWORD size=sizeof(devname);
            DWORD type = REG_SZ;
            HKEY key;
            if (RegOpenKeyA(HKEY_LOCAL_MACHINE,"SOFTWARE\\FreeGLUT",&key)==ERROR_SUCCESS) {
                if (RegQueryValueExA(key,"DialboxSerialPort",NULL,&type,(LPBYTE)devname,&size)==ERROR_SUCCESS){
                    dial_device=devname;
                }
                RegCloseKey(key);
            }
        }
#endif
        if ( !dial_device ) return;
        if ( !( dialbox_port = serial_open ( dial_device ) ) ) return;
      /* will return true for VC8 (VC2005) and higher */
#if TARGET_HOST_MS_WINDOWS && ( _MSC_VER >= 1400 ) && HAVE_ERRNO
        free ( dial_device );  dial_device = NULL;  /* dupenv_s allocates a string that we must free */
#endif
        serial_putchar(dialbox_port,DIAL_INITIALIZE);
        glutTimerFunc ( 10, poll_dials, 0 );
        fgState.InputDevsInitialised = GL_TRUE;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
leaq 0x73890(%rip), %r15     # 0x1421c0
cmpb $0x0, 0xb1(%r15)
jne 0xcea2b
leaq 0x2b887(%rip), %rdi     # 0xfa1cc
callq 0x21b10
testq %rax, %rax
je 0xcea2b
movq %rax, %rbx
movq %rax, %rdi
movl $0x802, %esi            # imm = 0x802
xorl %eax, %eax
callq 0x21670
testl %eax, %eax
js 0xcea38
movl %eax, %ebp
movl $0x1, %edi
movl $0x7c, %esi
callq 0x21600
movq %rax, %rbx
movl %ebp, (%rax)
leaq 0x40(%rax), %rsi
movl %ebp, %edi
callq 0x219e0
xorps %xmm0, %xmm0
leaq 0x4(%rsp), %r14
movups %xmm0, 0x4(%r14)
movups %xmm0, 0x14(%r14)
movups %xmm0, 0x24(%r14)
movq $0x0, 0x34(%r14)
movl $0x4b0, 0x8(%r14)       # imm = 0x4B0
movl $0x5, (%r14)
movb $0x1, %r12b
movb %r12b, 0x17(%r14)
movq %r14, %rdi
movl $0xd, %esi
callq 0x21530
movq %r14, %rdi
movl $0xd, %esi
callq 0x21980
movl %ebp, %edi
xorl %esi, %esi
movq %r14, %rdx
callq 0x21c00
movl (%rbx), %edi
movl $0x2, %esi
callq 0x21e90
movq %rbx, 0x77e1c(%rip)     # 0x146818
movb $0x20, (%r14)
movl (%rbx), %edi
leaq 0x4(%rsp), %rsi
movl $0x1, %edx
callq 0x212f0
leaq 0x35(%rip), %rsi        # 0xcea4d
movl $0xa, %edi
xorl %edx, %edx
callq 0xccde9
movb %r12b, 0xb1(%r15)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x21760
movq $0x0, 0x77dcd(%rip) # 0x146818
jmp 0xcea2b
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_input_devices.c
// Function: fgInputDeviceClose
void fgInputDeviceClose( void )
{
    if ( fgState.InputDevsInitialised )
    {
        serial_close ( dialbox_port );
        dialbox_port = NULL;
        fgState.InputDevsInitialised = GL_FALSE;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x7358e(%rip), %r14     # 0x1421c0
cmpb $0x0, 0xb1(%r14)
je 0xcec77
movq 0x77bd5(%rip), %rbx     # 0x146818
testq %rbx, %rbx
je 0xcec64
movl (%rbx), %edi
leaq 0x40(%rbx), %rdx
xorl %esi, %esi
callq 0x21c00
movl (%rbx), %edi
callq 0x222c0
movq %rbx, %rdi
callq 0x21ad0
movq $0x0, 0x77ba9(%rip) # 0x146818
movb $0x0, 0xb1(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_spaceball.c
// Function: fgInitialiseSpaceball
void fgInitialiseSpaceball(void)
{
    if(sball_initialized) {
        return;
    }

#if TARGET_HOST_POSIX_X11
    {
        Window w;

        if(!fgStructure.CurrentWindow)
            return;

        w = fgStructure.CurrentWindow->Window.Handle;
        if(spnav_x11_open(fgDisplay.Display, w) == -1) {
            return;
        }
    }
#endif

    sball_initialized = 1;
}

// Assembly:
cmpb $0x0, 0x77b5d(%rip)     # 0x146828
jne 0xcedd1
pushq %rbx
leaq 0x77b97(%rip), %rax     # 0x146870
movq 0x30(%rax), %rax
testq %rax, %rax
je 0xcedd0
cmpq $0x0, 0x77b4a(%rip)     # 0x146838
jne 0xcedd0
movq 0x18(%rax), %rbx
leaq 0x77ad1(%rip), %rax     # 0x1467d0
movq (%rax), %rdi
movq %rdi, 0x77b2f(%rip)     # 0x146838
leaq 0x2b4ec(%rip), %rsi     # 0xfa1fc
movl $0x1, %edx
callq 0x21680
movq %rax, 0x77b1f(%rip)     # 0x146840
movq 0x77b10(%rip), %rdi     # 0x146838
leaq 0x2b4d9(%rip), %rsi     # 0xfa208
movl $0x1, %edx
callq 0x21680
movq %rax, 0x77b08(%rip)     # 0x146848
movq 0x77af1(%rip), %rdi     # 0x146838
leaq 0x2b4cb(%rip), %rsi     # 0xfa219
movl $0x1, %edx
callq 0x21680
movq %rax, 0x77af1(%rip)     # 0x146850
movq 0x77ad2(%rip), %rdi     # 0x146838
leaq 0x2b4bf(%rip), %rsi     # 0xfa22c
movl $0x1, %edx
callq 0x21680
movq %rax, 0x77ada(%rip)     # 0x146858
cmpq $0x0, 0x77aba(%rip)     # 0x146840
setne %cl
cmpq $0x0, 0x77ab7(%rip)     # 0x146848
setne %dl
andb %cl, %dl
cmpq $0x0, 0x77ab2(%rip)     # 0x146850
setne %cl
andb %dl, %cl
testq %rax, %rax
setne %al
andb %cl, %al
cmpb $0x1, %al
jne 0xcedc5
movq %rbx, %rdi
callq 0xceeb5
cmpl $-0x1, %eax
je 0xcedc5
movb $0x1, 0x77a65(%rip)     # 0x146828
jmp 0xcedd0
movq $0x0, 0x77a68(%rip) # 0x146838
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_spaceball.c
// Function: fgHasSpaceball
int fgHasSpaceball(void)
{
    if(!sball_initialized) {
        fgInitialiseSpaceball();
        if(!sball_initialized) {
            fgWarning("fgInitialiseSpaceball failed\n");
            return 0;
        }
    }

#if TARGET_HOST_POSIX_X11
    /* XXX this function should somehow query the driver if there's a device
     * plugged in, as opposed to just checking if there's a driver to talk to.
     */
    return spnav_fd() == -1 ? 0 : 1;
#else
    return 0;
#endif
}

// Assembly:
pushq %rbx
cmpb $0x0, 0x77a15(%rip)     # 0x146828
jne 0xcee23
callq 0xcecc4
cmpb $0x0, 0x77a07(%rip)     # 0x146828
je 0xcee3a
movq 0x77a0e(%rip), %rax     # 0x146838
xorl %ebx, %ebx
testq %rax, %rax
je 0xcee4a
cmpl $-0x1, 0x10(%rax)
setne %bl
jmp 0xcee4a
leaq 0x2b39d(%rip), %rdi     # 0xfa1de
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x22a74
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_spaceball.c
// Function: spnav_x11_window
static int spnav_x11_window(Window win)
{
  int (*prev_xerr_handler)(Display*, XErrorEvent*);
  XEvent xev;
  Window daemon_win;

  if(!IS_OPEN) {
    return -1;
  }

  if(!(daemon_win = get_daemon_window(dpy))) {
    return -1;
  }

  prev_xerr_handler = XSetErrorHandler(catch_badwin);

  xev.type = ClientMessage;
  xev.xclient.send_event = False;
  xev.xclient.display = dpy;
  xev.xclient.window = win;
  xev.xclient.message_type = command_event;
  xev.xclient.format = 16;
  xev.xclient.data.s[0] = ((unsigned int)win & 0xffff0000) >> 16;
  xev.xclient.data.s[1] = (unsigned int)win & 0xffff;
  xev.xclient.data.s[2] = CMD_APP_WINDOW;

  XSendEvent(dpy, daemon_win, False, 0, &xev);
  XSync(dpy, False);

  XSetErrorHandler(prev_xerr_handler);
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf0, %rsp
movq 0x7796c(%rip), %r12     # 0x146838
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %r12, %r12
je 0xcf006
movq %rdi, %r14
movq 0xe8(%r12), %rax
movslq 0xe0(%r12), %rcx
shlq $0x7, %rcx
movq 0x10(%rax,%rcx), %rsi
movq 0x7795b(%rip), %rdx     # 0x146858
leaq 0x10(%rsp), %r15
leaq 0x18(%rsp), %rax
leaq 0x20(%rsp), %r10
leaq 0xc(%rsp), %r11
leaq 0x28(%rsp), %r13
movl $0x1, %r8d
movq %r12, %rdi
xorl %ecx, %ecx
xorl %r9d, %r9d
pushq %r15
pushq %rax
pushq %r10
pushq %r11
pushq %r13
pushq $0x0
callq 0x21260
addq $0x30, %rsp
movq (%r15), %rdi
testq %rdi, %rdi
je 0xcf006
movq (%rdi), %r15
callq 0x21bf0
leaq 0x30(%rsp), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x213a0
testl %eax, %eax
je 0xcf006
movq 0x30(%rsp), %rsi
leaq 0x2b2c9(%rip), %rdi     # 0xfa239
callq 0x21d00
testl %eax, %eax
jne 0xcf006
testq %r15, %r15
je 0xcf006
leaq 0x28b(%rip), %rdi       # 0xcf218
callq 0x21290
movq %rax, %r12
leaq 0x30(%rsp), %r8
movl $0x21, (%r8)
movl $0x0, 0x10(%r8)
movq 0x77888(%rip), %rdi     # 0x146838
movq %rdi, 0x18(%r8)
movq %r14, 0x20(%r8)
movq 0x77899(%rip), %rax     # 0x146858
movq %rax, 0x28(%r8)
movl $0x10, 0x30(%r8)
movl %r14d, %eax
shrl $0x10, %eax
movw %ax, 0x38(%r8)
movw %r14w, 0x3a(%r8)
movw $0x6c2f, 0x3c(%r8)      # imm = 0x6C2F
xorl %ebx, %ebx
movq %r15, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x21210
movq 0x77841(%rip), %rdi     # 0x146838
xorl %esi, %esi
callq 0x22250
movq %r12, %rdi
callq 0x21290
movl %ebx, %eax
addq $0xf0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_spaceball.c
// Function: fgIsSpaceballXEvent
int fgIsSpaceballXEvent(const XEvent *xev)
{
    spnav_event sev;

    if(!sball_initialized) {
        fgInitialiseSpaceball();
        if(!sball_initialized) {
            return 0;
        }
    }

    return spnav_x11_event(xev, &sev);
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x77800(%rip)     # 0x146828
jne 0xcf03a
callq 0xcecc4
xorl %eax, %eax
cmpb $0x1, 0x777f0(%rip)     # 0x146828
jne 0xcf047
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xcf04d
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_spaceball.c
// Function: spnav_x11_event
static int spnav_x11_event(const XEvent *xev, spnav_event *event)
{
  int i;
  int xmsg_type;

  if(xev->type != ClientMessage) {
    return 0;
  }

  xmsg_type = xev->xclient.message_type;

  if(xmsg_type != motion_event && xmsg_type != button_press_event &&
      xmsg_type != button_release_event) {
    return 0;
  }

  if(xmsg_type == motion_event) {
    event->type = SPNAV_EVENT_MOTION;
    event->motion.data = &event->motion.x;

    for(i=0; i<6; i++) {
      event->motion.data[i] = xev->xclient.data.s[i + 2];
    }
    event->motion.period = xev->xclient.data.s[8];
  } else {
    event->type = SPNAV_EVENT_BUTTON;
    event->button.press = xmsg_type == button_press_event ? 1 : 0;
    event->button.bnum = xev->xclient.data.s[2];
  }
  return event->type;
}

// Assembly:
xorl %eax, %eax
cmpl $0x21, (%rdi)
jne 0xcf079
movslq 0x28(%rdi), %rcx
movq 0x777e1(%rip), %r8      # 0x146840
movq 0x777e2(%rip), %rdx     # 0x146848
cmpq %r8, %rcx
je 0xcf07a
cmpq %rdx, %rcx
je 0xcf07a
cmpq 0x777d9(%rip), %rcx     # 0x146850
je 0xcf07a
retq
cmpq %r8, %rcx
jne 0xcf0ae
movl $0x1, (%rsi)
leaq 0x4(%rsi), %rax
movq %rax, 0x20(%rsi)
xorl %eax, %eax
movswl 0x3c(%rdi,%rax,2), %ecx
movq 0x20(%rsi), %rdx
movl %ecx, (%rdx,%rax,4)
incq %rax
cmpq $0x6, %rax
jne 0xcf08f
movswl 0x48(%rdi), %eax
movl %eax, 0x1c(%rsi)
movl (%rsi), %eax
retq
xorl %eax, %eax
cmpq %rdx, %rcx
sete %al
movl $0x2, (%rsi)
movl %eax, 0x4(%rsi)
movswl 0x3c(%rdi), %eax
movl %eax, 0x8(%rsi)
movl $0x2, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_spaceball.c
// Function: fgSpaceballHandleXEvent
void fgSpaceballHandleXEvent(const XEvent *xev)
{
    spnav_event sev;

    if(!sball_initialized) {
        fgInitialiseSpaceball();
        if(!sball_initialized) {
            return;
        }
    }

    if(spnav_x11_event(xev, &sev)) {
        switch(sev.type) {
        case SPNAV_EVENT_MOTION:
            if(sev.motion.x | sev.motion.y | sev.motion.z) {
                INVOKE_WCB(*spnav_win, SpaceMotion, (sev.motion.x, sev.motion.y, sev.motion.z));
            }
            if(sev.motion.rx | sev.motion.ry | sev.motion.rz) {
                INVOKE_WCB(*spnav_win, SpaceRotation, (sev.motion.rx, sev.motion.ry, sev.motion.rz));
            }
            spnav_remove_events(SPNAV_EVENT_MOTION);
            break;

        case SPNAV_EVENT_BUTTON:
            INVOKE_WCB(*spnav_win, SpaceButton, (sev.button.bnum, sev.button.press ? GLUT_DOWN : GLUT_UP));
            break;

        default:
            break;
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xf0, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x77746(%rip)     # 0x146828
jne 0xcf0f6
callq 0xcecc4
cmpb $0x1, 0x77738(%rip)     # 0x146828
jne 0xcf20b
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xcf04d
testl %eax, %eax
je 0xcf20b
movl 0x8(%rsp), %eax
cmpl $0x2, %eax
je 0xcf1d9
cmpl $0x1, %eax
jne 0xcf20b
movl 0x10(%rsp), %eax
orl 0xc(%rsp), %eax
orl 0x14(%rsp), %eax
je 0xcf15e
movq 0x776fa(%rip), %rdi     # 0x146830
cmpq $0x0, 0xf8(%rdi)
je 0xcf15e
callq 0xd314d
movq 0x776e4(%rip), %rax     # 0x146830
movl 0xc(%rsp), %edi
movl 0x10(%rsp), %esi
movl 0x14(%rsp), %edx
callq *0xf8(%rax)
movl 0x1c(%rsp), %eax
orl 0x18(%rsp), %eax
orl 0x20(%rsp), %eax
je 0xcf19b
movq 0x776bd(%rip), %rdi     # 0x146830
cmpq $0x0, 0x100(%rdi)
je 0xcf19b
callq 0xd314d
movq 0x776a7(%rip), %rax     # 0x146830
movl 0x18(%rsp), %edi
movl 0x1c(%rsp), %esi
movl 0x20(%rsp), %edx
callq *0x100(%rax)
movl $0x1, 0x4(%rsp)
cmpq $0x0, 0x7768d(%rip)     # 0x146838
je 0xcf20b
leaq 0x90(%rip), %rbx        # 0xcf244
leaq 0x30(%rsp), %r14
leaq 0x4(%rsp), %r15
movq 0x77673(%rip), %rdi     # 0x146838
movq %r14, %rsi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x22300
testl %eax, %eax
jne 0xcf1be
jmp 0xcf20b
movq 0x77650(%rip), %rdi     # 0x146830
cmpq $0x0, 0x108(%rdi)
je 0xcf20b
callq 0xd314d
movq 0x7763a(%rip), %rax     # 0x146830
movl 0x10(%rsp), %edi
xorl %esi, %esi
cmpl $0x0, 0xc(%rsp)
sete %sil
callq *0x108(%rax)
addq $0xf0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_spaceball.c
// Function: match_events
static Bool match_events(Display *dpy, XEvent *xev, char *arg)
{
  int evtype = *(int*)arg;

  if(xev->type != ClientMessage) {
    return False;
  }

  if(xev->xclient.message_type == motion_event) {
    return !evtype || evtype == SPNAV_EVENT_MOTION ? True : False;
  }
  if(xev->xclient.message_type == button_press_event ||
      xev->xclient.message_type == button_release_event) {
    return !evtype || evtype == SPNAV_EVENT_BUTTON ? True : False;
  }
  return False;
}

// Assembly:
cmpl $0x21, (%rsi)
jne 0xcf272
movl (%rdx), %eax
movq 0x28(%rsi), %rcx
cmpq 0x775ea(%rip), %rcx     # 0x146840
jne 0xcf260
cmpl $0x2, %eax
setb %al
jmp 0xcf274
cmpq 0x775e1(%rip), %rcx     # 0x146848
je 0xcf278
cmpq 0x775e0(%rip), %rcx     # 0x146850
je 0xcf278
xorl %eax, %eax
movzbl %al, %eax
retq
testl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
sete %al
jmp 0xcf274
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_joystick.c
// Function: fgInitialiseJoysticks
void fgInitialiseJoysticks ( void )
{
    if( !fgState.JoysticksInitialised )
    {
        int ident ;
        for ( ident = 0; ident < MAX_NUM_JOYSTICKS; ident++ )
            fghJoystickInit( ident );

        fgState.JoysticksInitialised = GL_TRUE;
    }
}

// Assembly:
leaq 0x72f35(%rip), %rax     # 0x1421c0
cmpb $0x0, 0xb0(%rax)
je 0xcf295
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movb $0x1, %bpl
movl $0x80016a11, %eax       # imm = 0x80016A11
leaq 0x775ae(%rip), %rbx     # 0x146860
leaq 0x1(%rax), %rcx
movq %rcx, 0x10(%rsp)
leaq 0x7f0002(%rax), %r12
xorl %r13d, %r13d
cmpq $0x0, (%rbx,%r13,8)
je 0xcf2da
leaq 0x2b109(%rip), %rdi     # 0xfa3dc
xorl %eax, %eax
callq 0xcfe73
movl $0x2a0, %edi            # imm = 0x2A0
movl $0x1, %esi
callq 0x21600
movq %rax, (%rbx,%r13,8)
movl %r13d, 0xd0(%rax)
leaq 0x4c(%rax), %rdi
movl $0x80, %esi
leaq 0x2b10c(%rip), %rdx     # 0xfa410
movl %r13d, %ecx
xorl %eax, %eax
callq 0x21fa0
movq (%rbx,%r13,8), %rdi
addq $0x4c, %rdi
xorl %esi, %esi
callq 0x22020
testl %eax, %eax
je 0xcf33f
movq (%rbx,%r13,8), %rdi
addq $0x4c, %rdi
movl $0x80, %esi
leaq 0x2b0eb(%rip), %rdx     # 0xfa420
movl %r13d, %ecx
xorl %eax, %eax
callq 0x21fa0
movq (%rbx,%r13,8), %r14
movw $0x1, 0xd4(%r14)
movabsq $0x2000000002, %rax     # imm = 0x2000000002
movq %rax, 0x158(%r14)
leaq 0x4c(%r14), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movups %xmm0, 0x18(%r14)
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x38(%r14)
movl $0x0, 0x48(%r14)
xorl %esi, %esi
xorl %eax, %eax
callq 0x21670
movl %eax, 0xcc(%r14)
movl %eax, %ecx
shrl $0x1f, %ecx
movb %cl, 0xd4(%r14)
testl %eax, %eax
js 0xcf485
leaq 0xd5(%r14), %r13
movl $0x80016a11, %esi       # imm = 0x80016A11
movl %eax, %edi
leaq 0xf(%rsp), %r15
movq %r15, %rdx
xorl %eax, %eax
callq 0x21d20
movzbl 0xf(%rsp), %eax
movl %eax, 0x158(%r14)
movl 0xcc(%r14), %edi
movq 0x10(%rsp), %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x21d20
movzbl 0xf(%rsp), %eax
movl %eax, 0x15c(%r14)
movl 0xcc(%r14), %edi
movq %r12, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x21d20
movl 0xcc(%r14), %edi
movl $0x4, %esi
movl $0x800, %edx            # imm = 0x800
xorl %eax, %eax
callq 0x214f0
movaps 0x2ae6d(%rip), %xmm3    # 0xfa290
movaps 0x2ae56(%rip), %xmm2    # 0xfa280
movaps 0x2ae3f(%rip), %xmm1    # 0xfa270
xorps %xmm0, %xmm0
movups %xmm0, 0x160(%r14)
movups %xmm0, 0x170(%r14)
movups %xmm0, 0x180(%r14)
movups %xmm0, 0x190(%r14)
movq $-0x10, %rax
movups %xmm1, 0x260(%r14,%rax,4)
movups %xmm0, 0x220(%r14,%rax,4)
movups %xmm2, 0x2a0(%r14,%rax,4)
movups %xmm3, 0x1e0(%r14,%rax,4)
addq $0x4, %rax
jne 0xcf45b
movl $0x1, %r13d
testb $0x1, %bpl
movl $0x0, %ebp
jne 0xcf2c5
leaq 0x72d1f(%rip), %rax     # 0x1421c0
movb $0x1, 0xb0(%rax)
addq $0x18, %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_joystick.c
// Function: fgJoystickDetect
int fgJoystickDetect( void )
{
    int ident;

    fgInitialiseJoysticks ();

    if ( !fgState.JoysticksInitialised )
        return 0;

    for( ident=0; ident<MAX_NUM_JOYSTICKS; ident++ )
        if( fgJoystick[ident] && !fgJoystick[ident]->error )
            return 1;

    return 0;
}

// Assembly:
pushq %rax
callq 0xcf284
leaq 0x72833(%rip), %rax     # 0x1421c0
cmpb $0x0, 0xb0(%rax)
je 0xcf9e4
movb $0x1, %cl
xorl %esi, %esi
leaq 0x76ebf(%rip), %rdx     # 0x146860
movq (%rdx,%rsi,8), %rax
testq %rax, %rax
je 0xcf9c7
movb 0xd4(%rax), %dil
testb %dil, %dil
setne %al
movl $0x1, %esi
testb %cl, %al
movl $0x0, %ecx
jne 0xcf9a1
jmp 0xcf9da
xorl %eax, %eax
movl $0x1, %esi
testb $0x1, %cl
movl $0x0, %ecx
jne 0xcf9a1
jmp 0xcf9e6
xorl %eax, %eax
testb %dil, %dil
sete %al
jmp 0xcf9e6
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_main.c
// Function: fgError
void fgError( const char *fmt, ... )
{
    va_list ap;

    va_start( ap, fmt );

    fprintf( stderr, "freeglut ");
    if( fgState.ProgramName )
        fprintf( stderr, "(%s): ", fgState.ProgramName );
    VFPRINTF( stderr, fmt, ap );
    fprintf( stderr, "\n" );

    va_end( ap );

    if ( fgState.Initialised )
        fgDeinitialize ();

    exit( 1 );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0xcfed6
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rdi, 0x10(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
movq 0x6d0ab(%rip), %r14     # 0x13cfa8
movq (%r14), %rcx
leaq 0x2a6f5(%rip), %rdi     # 0xfa5fc
movl $0x9, %esi
movl $0x1, %edx
callq 0x22290
leaq 0x722a3(%rip), %r15     # 0x1421c0
movq 0xa8(%r15), %rdx
testq %rdx, %rdx
je 0xcff3a
movq (%r14), %rdi
leaq 0x2a6d3(%rip), %rsi     # 0xfa606
xorl %eax, %eax
callq 0x21d80
movq (%r14), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x21c70
movq (%r14), %rsi
movl $0xa, %edi
callq 0x21bb0
cmpb $0x0, 0x1c(%r15)
je 0xcff61
callq 0xce031
movl $0x1, %edi
callq 0x21b00
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_main.c
// Function: fghcbCheckJoystickPolls
static void fghcbCheckJoystickPolls( SFG_Window *window,
                                     SFG_Enumerator *enumerator )
{
    long int checkTime = fgElapsedTime( );

    if( window->State.JoystickLastPoll + window->State.JoystickPollRate <=
        checkTime )
    {
#if !defined(_WIN32_WCE)
        fgJoystickPollWindow( window );
#endif /* !defined(_WIN32_WCE) */
        window->State.JoystickLastPoll = checkTime;
    }

    fgEnumSubWindows( window, fghcbCheckJoystickPolls, enumerator );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x21fb0
movabsq $0x20c49ba5e353f7cf, %rax # imm = 0x20C49BA5E353F7CF
imulq 0x8(%r15)
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
imulq $0x3e8, (%r15), %r15    # imm = 0x3E8
addq %rdx, %r15
leaq 0x717b5(%rip), %rax     # 0x1421c0
subq 0x40(%rax), %r15
movq 0x50(%r14), %rax
addq 0x58(%r14), %rax
cmpq %r15, %rax
jg 0xd0a28
movq %r14, %rdi
callq 0xcf50c
movq %r15, 0x58(%r14)
leaq -0x6d(%rip), %rsi       # 0xd09c2
movq %r14, %rdi
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xd2d0d
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_main.c
// Function: fghcbDisplayWindow
static void fghcbDisplayWindow( SFG_Window *window,
                                SFG_Enumerator *enumerator )
{
    if( window->State.Redisplay &&
        window->State.Visible )
    {
        window->State.Redisplay = GL_FALSE;

#if TARGET_HOST_POSIX_X11
        fghRedrawWindow ( window ) ;
#elif TARGET_HOST_MS_WINDOWS
        RedrawWindow(
            window->Window.Handle, NULL, NULL,
            RDW_NOERASE | RDW_INTERNALPAINT | RDW_INVALIDATE | RDW_UPDATENOW
        );
#endif
    }

    fgEnumSubWindows( window, fghcbDisplayWindow, enumerator );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x0, 0x48(%rdi)
je 0xd0b29
cmpb $0x0, 0x49(%r14)
je 0xd0b29
movb $0x0, 0x48(%r14)
cmpq $0x0, 0x70(%r14)
je 0xd0b29
leaq 0x75df0(%rip), %r12     # 0x146870
movq 0x30(%r12), %r15
movq %r14, %rdi
callq 0xd314d
cmpb $0x0, 0x6a(%r14)
je 0xd0b0e
movl 0x38(%r14), %r13d
movl 0x3c(%r14), %ebp
movq 0x30(%r12), %rax
movq %rax, (%rsp)
leaq 0x75d24(%rip), %r12     # 0x1467d0
movq (%r12), %rdi
movq 0x18(%r14), %rsi
movl %r13d, %edx
movl %ebp, %ecx
callq 0x21e10
movq (%r12), %rdi
callq 0x21ea0
movq 0x78(%r14), %r12
movq %r14, %rdi
callq 0xd314d
testq %r12, %r12
je 0xd0ae3
movl %r13d, %edi
movl %ebp, %esi
callq *0x78(%r14)
jmp 0xd0af1
xorl %edi, %edi
xorl %esi, %esi
movl %r13d, %edx
movl %ebp, %ecx
callq 0x21200
movb $0x1, 0x48(%r14)
cmpb $0x0, 0x170(%r14)
je 0xd0b09
movq (%rsp), %rdi
callq 0xd314d
movb $0x0, 0x6a(%r14)
cmpq $0x0, 0x70(%r14)
je 0xd0b21
movq %r14, %rdi
callq 0xd314d
callq *0x70(%r14)
movq %r15, %rdi
callq 0xd314d
leaq -0xed(%rip), %rsi       # 0xd0a43
movq %r14, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd2d0d
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_main.c
// Function: fghHavePendingRedisplaysCallback
static void fghHavePendingRedisplaysCallback( SFG_Window* w, SFG_Enumerator* e)
{
    if( w->State.Redisplay && w->State.Visible )
    {
        e->found = GL_TRUE;
        e->data = w;
    }
    fgEnumSubWindows( w, fghHavePendingRedisplaysCallback, e );
}

// Assembly:
movq %rsi, %rdx
cmpb $0x0, 0x48(%rdi)
je 0xd0b5f
cmpb $0x0, 0x49(%rdi)
je 0xd0b5f
movb $0x1, (%rdx)
movq %rdi, 0x8(%rdx)
leaq -0x1d(%rip), %rsi       # 0xd0b49
jmp 0xd2d0d
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_main.c
// Function: fghCheckJoystickCallback
static void fghCheckJoystickCallback( SFG_Window* w, SFG_Enumerator* e)
{
    if( FETCH_WCB( *w, Joystick ) )
    {
        e->found = GL_TRUE;
        e->data = w;
    }
    fgEnumSubWindows( w, fghCheckJoystickCallback, e );
}

// Assembly:
movq %rsi, %rdx
cmpq $0x0, 0xd8(%rdi)
je 0xd0b7f
movb $0x1, (%rdx)
movq %rdi, 0x8(%rdx)
leaq -0x1b(%rip), %rsi       # 0xd0b6b
jmp 0xd2d0d
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_menu.c
// Function: fgDeactivateMenu
void fgDeactivateMenu( SFG_Window *window )
{
    SFG_Window *parent_window = NULL;

    /* Check if there is an active menu attached to this window... */
    SFG_Menu* menu = window->ActiveMenu;
    SFG_MenuEntry *menuEntry;

    /* Did we find an active window? */
    freeglut_return_if_fail( menu );

    parent_window = menu->ParentWindow;

    /* Hide the present menu's window */
    fgSetWindow( menu->Window );
    glutHideWindow( );

    /* Forget about having that menu active anymore, now: */
    menu->Window->ActiveMenu = NULL;
    menu->ParentWindow->ActiveMenu = NULL;
    fghSetMenuParentWindow ( NULL, menu );
    menu->IsActive = GL_FALSE;
    menu->ActiveEntry = NULL;

    fgState.ActiveMenus--;

    /* Hide all submenu windows, and the root menu's window. */
    for ( menuEntry = ( SFG_MenuEntry * )menu->Entries.First;
          menuEntry;
          menuEntry = ( SFG_MenuEntry * )menuEntry->Node.Next )
    {
        menuEntry->IsActive = GL_FALSE;

        /* Is that an active submenu by any case? */
        if( menuEntry->SubMenu )
            fghDeactivateSubMenu( menuEntry );
    }

    fgSetWindow ( parent_window ) ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x150(%rdi), %r14
testq %r14, %r14
je 0xd15f8
movq 0x60(%r14), %rdi
movq 0x68(%r14), %rbx
callq 0xd314d
callq 0xd3a22
movq 0x60(%r14), %rax
xorl %r15d, %r15d
movq %r15, 0x150(%rax)
movq 0x68(%r14), %rax
movq %r15, 0x150(%rax)
xorl %edi, %edi
movq %r14, %rsi
callq 0xd15fe
movb $0x0, 0x40(%r14)
movq %r15, 0x58(%r14)
leaq 0x70bfa(%rip), %rax     # 0x1421c0
decl 0x70(%rax)
movq 0x20(%r14), %r14
testq %r14, %r14
je 0xd15eb
movb $0x0, 0x28(%r14)
cmpq $0x0, 0x20(%r14)
je 0xd15e6
movq %r14, %rdi
callq 0xd1633
movq (%r14), %r14
jmp 0xd15cd
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xd314d
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_menu.c
// Function: fghSetMenuParentWindow
static void fghSetMenuParentWindow( SFG_Window *window, SFG_Menu *menu )
{
    SFG_MenuEntry *menuEntry;

    menu->ParentWindow = window;

    for( menuEntry = ( SFG_MenuEntry * )menu->Entries.First;
         menuEntry;
         menuEntry = ( SFG_MenuEntry * )menuEntry->Node.Next )
        if( menuEntry->SubMenu )
            fghSetMenuParentWindow( window, menuEntry->SubMenu );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, 0x68(%rsi)
movq 0x20(%rsi), %r14
testq %r14, %r14
je 0xd162b
movq %rdi, %rbx
movq 0x20(%r14), %rsi
testq %rsi, %rsi
je 0xd1623
movq %rbx, %rdi
callq 0xd15fe
movq (%r14), %r14
testq %r14, %r14
jne 0xd1612
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_menu.c
// Function: fghDeactivateSubMenu
static void fghDeactivateSubMenu( SFG_MenuEntry *menuEntry )
{
    SFG_MenuEntry *subMenuIter;
    /* Hide the present menu's window */
    fgSetWindow( menuEntry->SubMenu->Window );
    glutHideWindow( );

    /* Forget about having that menu active anymore, now: */
    menuEntry->SubMenu->Window->ActiveMenu = NULL;
    menuEntry->SubMenu->IsActive = GL_FALSE;
    menuEntry->SubMenu->ActiveEntry = NULL;

    /* Hide all submenu windows, and the root menu's window. */
    for ( subMenuIter = (SFG_MenuEntry *)menuEntry->SubMenu->Entries.First;
          subMenuIter;
          subMenuIter = (SFG_MenuEntry *)subMenuIter->Node.Next )
    {
        subMenuIter->IsActive = GL_FALSE;

        /* Is that an active submenu by any case? */
        if( subMenuIter->SubMenu )
            fghDeactivateSubMenu( subMenuIter );
    }

    fgSetWindow ( menuEntry->SubMenu->ParentWindow ) ;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rax
movq 0x60(%rax), %rdi
callq 0xd314d
callq 0xd3a22
movq 0x20(%rbx), %rax
movq 0x60(%rax), %rcx
xorl %edx, %edx
movq %rdx, 0x150(%rcx)
movb $0x0, 0x40(%rax)
movq %rdx, 0x58(%rax)
movq 0x20(%rax), %r14
testq %r14, %r14
je 0xd168e
movb $0x0, 0x28(%r14)
cmpq $0x0, 0x20(%r14)
je 0xd1682
movq %r14, %rdi
callq 0xd1633
movq (%r14), %r14
testq %r14, %r14
jne 0xd166e
movq 0x20(%rbx), %rax
movq 0x68(%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xd314d
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_menu.c
// Function: fghCalculateMenuBoxSize
void fghCalculateMenuBoxSize( void )
{
    SFG_MenuEntry* menuEntry;
    int width = 0, height = 0;

    /* Make sure there is a current menu set */
    freeglut_return_if_fail( fgStructure.CurrentMenu );

    /* The menu's box size depends on the menu entries: */
    for( menuEntry = ( SFG_MenuEntry * )fgStructure.CurrentMenu->Entries.First;
         menuEntry;
         menuEntry = ( SFG_MenuEntry * )menuEntry->Node.Next )
    {
        /* Update the menu entry's width value */
        menuEntry->Width = glutBitmapLength(
            FREEGLUT_MENU_FONT,
            (unsigned char *)menuEntry->Text
        );

        /*
         * If the entry is a submenu, then it needs to be wider to
         * accomodate the arrow. JCJ 31 July 2003
         */
        if (menuEntry->SubMenu )
            menuEntry->Width += glutBitmapLength(
                FREEGLUT_MENU_FONT,
                (unsigned char *)"_"
            );

        /* Check if it's the biggest we've found */
        if( menuEntry->Width > width )
            width = menuEntry->Width;

        height += FREEGLUT_MENU_HEIGHT;
    }

    /* Store the menu's box size now: */
    fgStructure.CurrentMenu->Height = height + 2 * FREEGLUT_MENU_BORDER;
    fgStructure.CurrentMenu->Width  = width  + 4 * FREEGLUT_MENU_BORDER;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x751c0(%rip), %r12     # 0x146870
movq 0x38(%r12), %rax
testq %rax, %rax
je 0xd1741
movq 0x20(%rax), %r13
testq %r13, %r13
je 0xd172f
xorl %r15d, %r15d
leaq 0x750e7(%rip), %rbx     # 0x1467b8
leaq 0x28fd3(%rip), %r14     # 0xfa6ab
xorl %ebp, %ebp
movq 0x18(%r13), %rsi
movq %rbx, %rdi
callq 0xcd9ee
movl %eax, 0x2c(%r13)
cmpq $0x0, 0x20(%r13)
je 0xd1704
movq %rbx, %rdi
movq %r14, %rsi
callq 0xcd9ee
addl 0x2c(%r13), %eax
movl %eax, 0x2c(%r13)
cmpl %ebp, %eax
cmovgl %eax, %ebp
movq %rbx, %rdi
callq 0xcda80
addl %eax, %r15d
addl $0x2, %r15d
movq (%r13), %r13
testq %r13, %r13
jne 0xd16da
movq 0x38(%r12), %rax
addl $0x4, %r15d
addl $0x8, %ebp
jmp 0xd173a
movl $0x4, %r15d
movl $0x8, %ebp
movl %r15d, 0x48(%rax)
movl %ebp, 0x44(%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_menu.c
// Function: glutDestroyMenu
void FGAPIENTRY glutDestroyMenu( int menuID )
{
    SFG_Menu* menu;

    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutDestroyMenu" );
    menu = fgMenuByID( menuID );

    freeglut_return_if_fail( menu );

    /* The menu object destruction code resides in freeglut_structure.c */
    fgDestroyMenu( menu );
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leaq 0x70a33(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xd17a8
leaq 0x17e1c(%rip), %rdi     # 0xe95b6
leaq 0x28f1b(%rip), %rsi     # 0xfa6bc
xorl %eax, %eax
callq 0xcfe73
movl %ebx, %edi
callq 0xd2e76
testq %rax, %rax
je 0xd17bd
movq %rax, %rdi
popq %rbx
jmp 0xd2a9f
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_menu.c
// Function: glutSetMenu
void FGAPIENTRY glutSetMenu( int menuID )
{
    SFG_Menu* menu;

    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSetMenu" );
    menu = fgMenuByID( menuID );

    freeglut_return_if_fail( menu );

    fgStructure.CurrentMenu = menu;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leaq 0x709bb(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xd1820
leaq 0x17da4(%rip), %rdi     # 0xe95b6
leaq 0x28ebf(%rip), %rsi     # 0xfa6d8
xorl %eax, %eax
callq 0xcfe73
movl %ebx, %edi
callq 0xd2e76
testq %rax, %rax
je 0xd1837
leaq 0x7503d(%rip), %rcx     # 0x146870
movq %rax, 0x38(%rcx)
popq %rbx
retq