LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Graphics/R2Texture.cpp
// Function: gaps::R2Texture::R2Texture(gaps::R2Texture const&, char const*)
R2Texture::
R2Texture(const R2Texture& texture, const char *name)
  : scene(NULL),
    scene_index(-1),
    name(NULL),
    filename((texture.filename) ? RNStrdup(texture.filename) : NULL),
    image(texture.image),
    s_wrap(texture.s_wrap),
    t_wrap(texture.t_wrap),
    min_filter(texture.min_filter),
    mag_filter(texture.mag_filter),
    blend(texture.blend),
    flags(texture.flags),
    id((texture.image) ? -1 : 0)
{
    // Set name
    if (name) this->name = RNStrdup(name);

    // Update texture                                                                                                   
    Update();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorl %r12d, %r12d
movq %r12, (%rdi)
movl $0xffffffff, 0x8(%rdi)  # imm = 0xFFFFFFFF
movq %r12, 0x10(%rdi)
movq 0x18(%rsi), %rdi
movl $0x0, %eax
testq %rdi, %rdi
je 0x44f8b
callq 0x8b397
movq %rax, 0x18(%rbx)
movq 0x20(%r15), %rax
movq %rax, 0x20(%rbx)
movups 0x28(%r15), %xmm0
movups %xmm0, 0x28(%rbx)
movl 0x38(%r15), %eax
movl %eax, 0x38(%rbx)
movq 0x40(%r15), %rax
movq %rax, 0x40(%rbx)
cmpq 0x20(%r15), %r12
sbbl %r12d, %r12d
movl %r12d, 0x48(%rbx)
testq %r14, %r14
je 0x44fcb
movq %r14, %rdi
callq 0x8b397
movq %rax, 0x10(%rbx)
movq $0x0, 0x40(%rbx)
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x44ff1
movl 0x8(%rax), %eax
cmpl $0x4, %eax
je 0x44fe9
cmpl $0x2, %eax
jne 0x44ff1
movq $0x100, 0x40(%rbx)      # imm = 0x100
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Graphics/R2Texture.cpp
// Function: gaps::R2Texture::Update()
void R2Texture::
UpdateFlags (const RNFlags flags)
{
  // Update flags
  this->flags = flags;
  if ((image) && ((image->NComponents() == 2) || (image->NComponents() == 4)))
    this->flags.Add(R2_TEXTURE_TRANSPARENCY_FLAG);
}

// Assembly:
movq $0x0, 0x40(%rdi)
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0x45024
movl 0x8(%rax), %eax
cmpl $0x4, %eax
je 0x4501c
cmpl $0x2, %eax
jne 0x45024
movq $0x100, 0x40(%rdi)      # imm = 0x100
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Graphics/R2Texture.cpp
// Function: gaps::R2Texture::R2Texture(gaps::R2Image const*, gaps::R2TextureWrap, gaps::R2TextureWrap, gaps::R2TextureFilter, gaps::R2TextureFilter, gaps::R2TextureBlend, char const*)
R2Texture::
R2Texture(const R2Image *image,
  R2TextureWrap s_wrap, R2TextureWrap t_wrap,
  R2TextureFilter min_filter, R2TextureFilter mag_filter,
  R2TextureBlend blend,
  const char *name)
  : scene(NULL),
    scene_index(-1),
    name(NULL),
    filename(NULL),
    image(image),
    s_wrap(s_wrap),
    t_wrap(t_wrap),
    min_filter(min_filter),
    mag_filter(mag_filter),
    blend(blend),
    flags(RN_NO_FLAGS),
    id(-1)
{
    // Set name
    if (name) this->name = RNStrdup(name);

    // Update texture
    Update();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rsp), %rdi
movl 0x20(%rsp), %eax
xorl %r10d, %r10d
movq %r10, (%rbx)
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
movl %r11d, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq %rsi, 0x20(%rbx)
movl %edx, 0x28(%rbx)
movl %ecx, 0x2c(%rbx)
movl %r8d, 0x30(%rbx)
movl %r9d, 0x34(%rbx)
movl %eax, 0x38(%rbx)
movq %r10, 0x40(%rbx)
movl %r11d, 0x48(%rbx)
testq %rdi, %rdi
je 0x4507b
leaq 0x10(%rbx), %r14
callq 0x8b397
movq %rax, (%r14)
movq $0x0, 0x40(%rbx)
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x450a1
movl 0x8(%rax), %eax
cmpl $0x4, %eax
je 0x45099
cmpl $0x2, %eax
jne 0x450a1
movq $0x100, 0x40(%rbx)      # imm = 0x100
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Graphics/R2Texture.cpp
// Function: gaps::R2Texture::R2Texture(char const*, gaps::R2TextureWrap, gaps::R2TextureWrap, gaps::R2TextureFilter, gaps::R2TextureFilter, gaps::R2TextureBlend, char const*)
R2Texture::
R2Texture(const char *filename,
  R2TextureWrap s_wrap, R2TextureWrap t_wrap,
  R2TextureFilter min_filter, R2TextureFilter mag_filter,
  R2TextureBlend blend,
  const char *name)
  : scene(NULL),
    scene_index(-1),
    name(NULL),
    filename((filename) ? RNStrdup(filename) : NULL),
    image(NULL),
    s_wrap(s_wrap),
    t_wrap(t_wrap),
    min_filter(min_filter),
    mag_filter(mag_filter),
    blend(blend),
    flags(RN_NO_FLAGS),
    id(-1)
{
    // Set name
    if (name) this->name = RNStrdup(name);

    // Create image
    image = new R2Image(filename);
    assert(image);

    // Update 
    if (!image) id = 0;
    Update();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebp
movl %r8d, %r12d
movl %ecx, %r13d
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movq 0x48(%rsp), %rdi
movl 0x40(%rsp), %ecx
xorl %eax, %eax
movq %rax, (%rbx)
movl $0xffffffff, 0x8(%rbx)  # imm = 0xFFFFFFFF
movq %rax, 0x10(%rbx)
testq %rsi, %rsi
je 0x450f6
movq %r14, %rdi
callq 0x8b397
movl 0x40(%rsp), %ecx
movq 0x48(%rsp), %rdi
movq %rax, 0x18(%rbx)
xorl %eax, %eax
movq %rax, 0x20(%rbx)
movl %r15d, 0x28(%rbx)
movl %r13d, 0x2c(%rbx)
movl %r12d, 0x30(%rbx)
movl %ebp, 0x34(%rbx)
movl %ecx, 0x38(%rbx)
movq %rax, 0x40(%rbx)
movl $0xffffffff, 0x48(%rbx) # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x4512b
callq 0x8b397
movq %rax, 0x10(%rbx)
movl $0x18, %edi
callq 0x218c0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x8339c
movq %r15, 0x20(%rbx)
movq $0x0, 0x40(%rbx)
movl 0x8(%r15), %eax
cmpl $0x4, %eax
je 0x4515d
cmpl $0x2, %eax
jne 0x45165
movq $0x100, 0x40(%rbx)      # imm = 0x100
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x18, %esi
movq %r15, %rdi
callq 0x218e0
movq %rbx, %rdi
callq 0x220d0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Graphics/R2Texture.cpp
// Function: gaps::R2Texture::~R2Texture()
R2Texture::
~R2Texture(void)
{
  // Unload texture
  if (IsLoaded() > 0) Unload();

  // Remove from scene
  if (scene) scene->RemoveTexture(this);

  // Free name
  if (name) free(name);

  // Free filename
  if (filename) free(filename);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl 0x48(%rdi), %eax
testl %eax, %eax
jle 0x451b3
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
movl $0x1, %edi
callq 0x21ca0
movl $0xffffffff, 0x48(%rbx) # imm = 0xFFFFFFFF
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x451c3
movq %rbx, %rsi
callq 0x288a4
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x451d1
callq 0x21ae0
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x451df
callq 0x21ae0
addq $0x10, %rsp
popq %rbx
retq
movq %rax, %rdi
callq 0x37467
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Graphics/R2Texture.cpp
// Function: gaps::R2Texture::SetImage(gaps::R2Image const*)
void R2Texture::
SetImage(const R2Image *image)
{
  // Unload previous texture
  if (IsLoaded()) Unload();

  // Set image
  flags.Remove(R2_TEXTURE_TRANSPARENCY_FLAG);
  if ((image) && ((image->NComponents() == 2) || (image->NComponents() == 4)))
    flags.Add(R2_TEXTURE_TRANSPARENCY_FLAG);
  this->image = image;
  this->id = (image) ? -1 : 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x48(%rdi), %eax
testl %eax, %eax
jle 0x452b1
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
movl $0x1, %edi
callq 0x21ca0
movl $0xffffffff, 0x48(%rbx) # imm = 0xFFFFFFFF
movq 0x40(%rbx), %rax
movq %rax, %rcx
andq $-0x101, %rcx           # imm = 0xFEFF
movq %rcx, 0x40(%rbx)
testq %r14, %r14
je 0x452e0
movl 0x8(%r14), %ecx
cmpl $0x4, %ecx
je 0x452d6
cmpl $0x2, %ecx
jne 0x452e0
orq $0x100, %rax            # imm = 0x100
movq %rax, 0x40(%rbx)
movq %r14, 0x20(%rbx)
xorl %eax, %eax
negq %r14
sbbl %eax, %eax
movl %eax, 0x48(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Graphics/R2Texture.cpp
// Function: gaps::R2Texture::Draw(int) const
void R2Texture::
Draw(RNBoolean force) const
{
  // Check if same texture as last time
  static const R2Texture *R2current_texture = NULL;
  if (!force && (this == R2current_texture)) return;

  // Check if null texture
  if (id == 0) {
    // Disable texture
    glDisable(GL_TEXTURE_2D);

    // Disable polygon offset
    glDisable(GL_POLYGON_OFFSET_FILL);
  }
  else {
    // Load texture
    if (!IsLoaded()) Load();
    
    // Set texture
    glBindTexture(GL_TEXTURE_2D, id);

    // Enable texture
    glEnable(GL_TEXTURE_2D);

    // Enable polygon offset (for decals)
    glPolygonOffset(-1, -1);
    glEnable(GL_POLYGON_OFFSET_FILL);
  }

  // Set blending
  if (IsTransparent()) {
    glDepthMask(FALSE);
    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    glEnable(GL_BLEND);
  }
  else {
    glDisable(GL_BLEND);
    glBlendFunc(GL_ONE, GL_ZERO);
    glDepthMask(TRUE);
  }
  
  // Remember current texture
  R2current_texture = this;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
jne 0x4545d
cmpq %rbx, 0x100c49(%rip)    # 0x1460a0
je 0x45503
cmpl $0x0, 0x48(%rbx)
je 0x454a0
jg 0x4546d
movq %rbx, %rdi
callq 0x4531c
movl 0x48(%rbx), %esi
movl $0xde1, %edi            # imm = 0xDE1
callq 0x21b80
movl $0xde1, %edi            # imm = 0xDE1
callq 0x21810
movss 0x989b4(%rip), %xmm0    # 0xdde40
movaps %xmm0, %xmm1
callq 0x21fa0
movl $0x8037, %edi           # imm = 0x8037
callq 0x21810
jmp 0x454b4
movl $0xde1, %edi            # imm = 0xDE1
callq 0x211f0
movl $0x8037, %edi           # imm = 0x8037
callq 0x211f0
testb $0x1, 0x41(%rbx)
jne 0x454dc
movl $0xbe2, %edi            # imm = 0xBE2
callq 0x211f0
movl $0x1, %edi
xorl %esi, %esi
callq 0x216d0
movl $0x1, %edi
callq 0x21520
jmp 0x454fc
xorl %edi, %edi
callq 0x21520
movl $0x302, %edi            # imm = 0x302
movl $0x303, %esi            # imm = 0x303
callq 0x216d0
movl $0xbe2, %edi            # imm = 0xBE2
callq 0x21810
movq %rbx, 0x100b9d(%rip)    # 0x1460a0
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_callbacks.c
// Function: glutDisplayFunc
void FGAPIENTRY glutDisplayFunc( void (* callback)( void ) )
{
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutDisplayFunc" );
    if( !callback )
        fgError( "Fatal error in program.  NULL display callback not "
                 "permitted in GLUT 3.0+ or freeglut 2.0.1+" );
    SET_CALLBACK( Display );
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x756a5(%rip), %rax     # 0x1441c0
cmpb $0x0, 0x1c(%rax)
jne 0xceb36
leaq 0x1ca3e(%rip), %rdi     # 0xeb566
leaq 0x1ca77(%rip), %rsi     # 0xeb5a6
xorl %eax, %eax
callq 0xd1cf7
testq %rbx, %rbx
jne 0xceb49
leaq 0x1ca74(%rip), %rdi     # 0xeb5b6
xorl %eax, %eax
callq 0xd1cf7
leaq 0x79d20(%rip), %rax     # 0x148870
movq 0x30(%rax), %rax
testq %rax, %rax
je 0xceb63
cmpq %rbx, 0x70(%rax)
je 0xceb63
movq %rbx, 0x70(%rax)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_callbacks.c
// Function: glutTimerFunc
void FGAPIENTRY glutTimerFunc( unsigned int timeOut, void (* callback)( int ),
                               int timerID )
{
    SFG_Timer *timer, *node;

    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutTimerFunc" );

    if( (timer = fgState.FreeTimers.Last) )
    {
        fgListRemove( &fgState.FreeTimers, &timer->Node );
    }
    else
    {
        if( ! (timer = malloc(sizeof(SFG_Timer))) )
            fgError( "Fatal error: "
                     "Memory allocation failure in glutTimerFunc()" );
    }

    timer->Callback  = callback;
    timer->ID        = timerID;
    timer->TriggerTime = fgElapsedTime() + timeOut;

    for( node = fgState.Timers.First; node; node = node->Node.Next )
    {
        if( node->TriggerTime > timer->TriggerTime )
            break;
    }

    fgListInsert( &fgState.Timers, &node->Node, &timer->Node );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %r12
movl %edi, %ebp
leaq 0x7553c(%rip), %rbx     # 0x1441c0
cmpb $0x0, 0x1c(%rbx)
jne 0xcec9f
leaq 0x1c8d5(%rip), %rdi     # 0xeb566
leaq 0x1c9b9(%rip), %rsi     # 0xeb651
xorl %eax, %eax
callq 0xd1cf7
movq 0x60(%rbx), %r14
testq %r14, %r14
je 0xcecb6
leaq 0x58(%rbx), %rdi
movq %r14, %rsi
callq 0xd4997
jmp 0xcecd9
movl $0x28, %edi
callq 0x21c70
movq %rax, %r14
testq %rax, %rax
jne 0xcecd9
leaq 0x1c990(%rip), %rdi     # 0xeb65f
xorl %r14d, %r14d
xorl %eax, %eax
callq 0xd1cf7
movq %r12, 0x18(%r14)
movl %r15d, 0x10(%r14)
callq 0xd1cae
movl %ebp, %ecx
addq %rax, %rcx
movq %rcx, 0x20(%r14)
leaq 0x48(%rbx), %rsi
movq (%rsi), %rsi
testq %rsi, %rsi
je 0xced01
cmpq %rcx, 0x20(%rsi)
jle 0xcecf3
addq $0x48, %rbx
movq %rbx, %rdi
movq %r14, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xd4d90
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_callbacks.c
// Function: glutVisibilityFunc
void FGAPIENTRY glutVisibilityFunc( void (* callback)( int ) )
{
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutVisibilityFunc" );
    SET_CALLBACK( Visibility );

    if( callback )
        glutWindowStatusFunc( fghVisibility );
    else
        glutWindowStatusFunc( NULL );
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x7549d(%rip), %rax     # 0x1441c0
cmpb $0x0, 0x1c(%rax)
jne 0xced3e
leaq 0x1c836(%rip), %rdi     # 0xeb566
leaq 0x1c962(%rip), %rsi     # 0xeb699
xorl %eax, %eax
callq 0xd1cf7
leaq 0x79b2b(%rip), %rax     # 0x148870
movq 0x30(%rax), %rax
testq %rax, %rax
je 0xced6c
cmpq %rbx, 0xc8(%rax)
je 0xced5e
movq %rbx, 0xc8(%rax)
testq %rbx, %rbx
je 0xced6e
leaq 0x54(%rip), %rdi        # 0xcedbe
jmp 0xced70
popq %rbx
retq
xorl %edi, %edi
popq %rbx
jmp 0xced76
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_callbacks.c
// Function: fghVisibility
static void fghVisibility( int status )
{
    int glut_status = GLUT_VISIBLE;

    FREEGLUT_INTERNAL_ERROR_EXIT_IF_NOT_INITIALISED ( "Visibility Callback" );
    freeglut_return_if_fail( fgStructure.CurrentWindow );

    if( ( GLUT_HIDDEN == status )  || ( GLUT_FULLY_COVERED == status ) )
        glut_status = GLUT_NOT_VISIBLE;
    INVOKE_WCB( *( fgStructure.CurrentWindow ), Visibility, ( glut_status ) );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x753f5(%rip), %rax     # 0x1441c0
cmpb $0x0, 0x1c(%rax)
jne 0xcede6
leaq 0x1ca73(%rip), %rdi     # 0xeb84b
leaq 0x1cab5(%rip), %rsi     # 0xeb894
xorl %eax, %eax
callq 0xd1cf7
leaq 0x79a83(%rip), %r14     # 0x148870
movq 0x30(%r14), %rdi
testq %rdi, %rdi
je 0xcee28
cmpq $0x0, 0xc8(%rdi)
je 0xcee28
testl %ebx, %ebx
setne %al
cmpl $0x3, %ebx
setne %cl
andb %al, %cl
movzbl %cl, %ebx
callq 0xd5037
movq 0x30(%r14), %rax
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0xc8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_callbacks.c
// Function: glutJoystickFunc
void FGAPIENTRY glutJoystickFunc( void (* callback)
                                  ( unsigned int, int, int, int ),
                                  int pollInterval )
{
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutJoystickFunc" );
    fgInitialiseJoysticks ();

    SET_CALLBACK( Joystick );
    fgStructure.CurrentWindow->State.JoystickPollRate = pollInterval;

    fgStructure.CurrentWindow->State.JoystickLastPoll =
        fgElapsedTime() - fgStructure.CurrentWindow->State.JoystickPollRate;

    if( fgStructure.CurrentWindow->State.JoystickLastPoll < 0 )
        fgStructure.CurrentWindow->State.JoystickLastPoll = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
leaq 0x752ef(%rip), %rax     # 0x1441c0
cmpb $0x0, 0x1c(%rax)
jne 0xceeec
leaq 0x1c688(%rip), %rdi     # 0xeb566
leaq 0x1c7ec(%rip), %rsi     # 0xeb6d1
xorl %eax, %eax
callq 0xd1cf7
callq 0xd1160
leaq 0x79978(%rip), %r15     # 0x148870
movq 0x30(%r15), %rax
testq %rax, %rax
je 0xcef32
cmpq %r14, 0xd8(%rax)
je 0xcef11
movq %r14, 0xd8(%rax)
movslq %ebx, %rcx
movq %rcx, 0x50(%rax)
callq 0xd1cae
movq 0x30(%r15), %rcx
subq 0x50(%rcx), %rax
xorl %edx, %edx
testq %rax, %rax
cmovgq %rax, %rdx
movq %rdx, 0x58(%rcx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_display.c
// Function: glutSwapBuffers
void FGAPIENTRY glutSwapBuffers( void )
{
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSwapBuffers" );
    FREEGLUT_EXIT_IF_NO_WINDOW ( "glutSwapBuffers" );

    /*
     * "glXSwapBuffers" already performs an implicit call to "glFlush". What
     * about "SwapBuffers"?
     */
    glFlush( );
    if( ! fgStructure.CurrentWindow->Window.DoubleBuffered )
        return;

#if TARGET_HOST_POSIX_X11
    glXSwapBuffers( fgDisplay.Display, fgStructure.CurrentWindow->Window.Handle );
#elif TARGET_HOST_MS_WINDOWS
    SwapBuffers( fgStructure.CurrentWindow->Window.Device );
#endif

    /* GLUT_FPS env var support */
    if( fgState.FPSInterval )
    {
        GLint t = glutGet( GLUT_ELAPSED_TIME );
        fgState.SwapCount++;
        if( fgState.SwapTime == 0 )
            fgState.SwapTime = t;
        else if( t - fgState.SwapTime > fgState.FPSInterval )
        {
            float time = 0.001f * ( t - fgState.SwapTime );
            float fps = ( float )fgState.SwapCount / time;
            fprintf( stderr,
                     "freeglut: %d frames in %.2f seconds = %.2f FPS\n",
                     fgState.SwapCount, time, fps );
            fgState.SwapTime = t;
            fgState.SwapCount = 0;
        }
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x74d51(%rip), %rbx     # 0x1441c0
cmpb $0x0, 0x1c(%rbx)
jne 0xcf48a
leaq 0x1c0ea(%rip), %rdi     # 0xeb566
leaq 0x1c479(%rip), %rsi     # 0xeb8fc
xorl %eax, %eax
callq 0xd1cf7
leaq 0x793df(%rip), %r14     # 0x148870
cmpq $0x0, 0x30(%r14)
jne 0xcf4ad
leaq 0x1c41f(%rip), %rdi     # 0xeb8be
leaq 0x1c456(%rip), %rsi     # 0xeb8fc
xorl %eax, %eax
callq 0xd1cf7
callq 0x21db0
movq 0x30(%r14), %rax
cmpl $0x0, 0x30(%rax)
je 0xcf503
leaq 0x7930d(%rip), %rcx     # 0x1487d0
movq (%rcx), %rdi
movq 0x18(%rax), %rsi
callq 0x22180
cmpl $0x0, 0x30(%rbx)
je 0xcf503
movl $0x2bc, %edi            # imm = 0x2BC
callq 0xd3cc4
movl 0x34(%rbx), %esi
movl 0x38(%rbx), %ecx
incl %esi
movl %esi, 0x34(%rbx)
testl %ecx, %ecx
je 0xcf500
movl %eax, %edi
subl %ecx, %edi
cmpl 0x30(%rbx), %edi
jbe 0xcf503
movl %eax, %edx
callq 0x22a27
jmp 0xcf503
movl %eax, 0x38(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_display.c
// Function: glutPostWindowRedisplay
void FGAPIENTRY glutPostWindowRedisplay( int windowID )
{
    SFG_Window* window;

    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutPostWindowRedisplay" );
    window = fgWindowByID( windowID );
    freeglut_return_if_fail( window );
    window->State.Redisplay = GL_TRUE;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leaq 0x74cab(%rip), %rax     # 0x1441c0
cmpb $0x0, 0x1c(%rax)
jne 0xcf530
leaq 0x1c044(%rip), %rdi     # 0xeb566
leaq 0x1c413(%rip), %rsi     # 0xeb93c
xorl %eax, %eax
callq 0xd1cf7
movl %ebx, %edi
callq 0xd4cf1
testq %rax, %rax
je 0xcf540
movb $0x1, 0x48(%rax)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_font.c
// Function: glutBitmapCharacter
void FGAPIENTRY glutBitmapCharacter( void* fontID, int character )
{
    const GLubyte* face;
    SFG_Font* font;
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutBitmapCharacter" );
    font = fghFontByID( fontID );
    freeglut_return_if_fail( ( character >= 1 )&&( character < 256 ) );
    freeglut_return_if_fail( font );

    /*
     * Find the character we want to draw (???)
     */
    face = font->Characters[ character ];

    glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT );
    glPixelStorei( GL_UNPACK_SWAP_BYTES,  GL_FALSE );
    glPixelStorei( GL_UNPACK_LSB_FIRST,   GL_FALSE );
    glPixelStorei( GL_UNPACK_ROW_LENGTH,  0        );
    glPixelStorei( GL_UNPACK_SKIP_ROWS,   0        );
    glPixelStorei( GL_UNPACK_SKIP_PIXELS, 0        );
    glPixelStorei( GL_UNPACK_ALIGNMENT,   1        );
    glBitmap(
        face[ 0 ], font->Height,      /* The bitmap's width and height  */
        font->xorig, font->yorig,     /* The origin in the font glyph   */
        ( float )( face[ 0 ] ), 0.0,  /* The raster advance -- inc. x,y */
        ( face + 1 )                  /* The packed bitmap data...      */
    );
    glPopClientAttrib( );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x74c6c(%rip), %rax     # 0x1441c0
cmpb $0x0, 0x1c(%rax)
jne 0xcf56f
leaq 0x1c005(%rip), %rdi     # 0xeb566
leaq 0x1c3ec(%rip), %rsi     # 0xeb954
xorl %eax, %eax
callq 0xd1cf7
movq %r14, %rdi
callq 0xcf62a
movq %rax, %r14
leal -0x100(%rbx), %eax
cmpl $0xffffff01, %eax       # imm = 0xFFFFFF01
setb %al
testq %r14, %r14
sete %cl
orb %al, %cl
je 0xcf59a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x10(%r14), %rax
movl %ebx, %ecx
movq (%rax,%rcx,8), %rbx
movl $0x1, %edi
callq 0x21620
movl $0xcf0, %edi            # imm = 0xCF0
xorl %esi, %esi
callq 0x21410
movl $0xcf1, %edi            # imm = 0xCF1
xorl %esi, %esi
callq 0x21410
movl $0xcf2, %edi            # imm = 0xCF2
xorl %esi, %esi
callq 0x21410
movl $0xcf3, %edi            # imm = 0xCF3
xorl %esi, %esi
callq 0x21410
movl $0xcf4, %edi            # imm = 0xCF4
xorl %esi, %esi
callq 0x21410
movl $0xcf5, %edi            # imm = 0xCF5
movl $0x1, %esi
callq 0x21410
movzbl (%rbx), %edi
movl 0xc(%r14), %esi
movss 0x18(%r14), %xmm0
movss 0x1c(%r14), %xmm1
cvtsi2ss %edi, %xmm2
incq %rbx
xorps %xmm3, %xmm3
movq %rbx, %rdx
callq 0x21860
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21ad0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6f946(%rip), %rdi     # 0x13ef78
je 0xcf67f
movq %rdi, %rsi
cmpq 0x6f9b2(%rip), %rdi     # 0x13eff0
je 0xcf688
cmpq 0x6f8f1(%rip), %rsi     # 0x13ef38
je 0xcf691
cmpq 0x6f978(%rip), %rsi     # 0x13efc8
je 0xcf69a
cmpq 0x6f8cf(%rip), %rsi     # 0x13ef28
je 0xcf6a3
cmpq 0x6f8f6(%rip), %rsi     # 0x13ef58
je 0xcf6ac
cmpq 0x6f8e5(%rip), %rsi     # 0x13ef50
je 0xcf6b5
leaq 0x1c395(%rip), %rdi     # 0xeba09
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x22aab
jmp 0xcf6bc
leaq 0x6d1aa(%rip), %rbx     # 0x13c830
jmp 0xcf6bc
leaq 0x6d1c1(%rip), %rbx     # 0x13c850
jmp 0xcf6bc
leaq 0x6d1d8(%rip), %rbx     # 0x13c870
jmp 0xcf6bc
leaq 0x6d1ef(%rip), %rbx     # 0x13c890
jmp 0xcf6bc
leaq 0x6d206(%rip), %rbx     # 0x13c8b0
jmp 0xcf6bc
leaq 0x6d21d(%rip), %rbx     # 0x13c8d0
jmp 0xcf6bc
leaq 0x6d234(%rip), %rbx     # 0x13c8f0
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x749a5(%rip), %rax     # 0x1441c0
cmpb $0x0, 0x1c(%rax)
jne 0xcf836
leaq 0x1bd3e(%rip), %rdi     # 0xeb566
leaq 0x1c14a(%rip), %rsi     # 0xeb979
xorl %eax, %eax
callq 0xd1cf7
movq %r14, %rdi
callq 0xcf62a
leal -0x100(%rbx), %ecx
cmpl $0xffffff01, %ecx       # imm = 0xFFFFFF01
setb %dl
testq %rax, %rax
sete %sil
xorl %ecx, %ecx
orb %dl, %sil
jne 0xcf868
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_O1/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 0x7493d(%rip), %rax     # 0x1441c0
cmpb $0x0, 0x1c(%rax)
jne 0xcf89e
leaq 0x1bcd6(%rip), %rdi     # 0xeb566
leaq 0x1c0f2(%rip), %rsi     # 0xeb989
xorl %eax, %eax
callq 0xd1cf7
movq %r14, %rdi
callq 0xcf62a
testq %rax, %rax
sete %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
jne 0xcf8e8
cmpb $0x0, (%rbx)
je 0xcf8e8
xorl %edx, %edx
incq %rbx
xorl %ecx, %ecx
movzbl -0x1(%rbx), %esi
testl %esi, %esi
je 0xcf8ec
cmpl $0xa, %esi
je 0xcf8e1
movq 0x10(%rax), %rdi
movq (%rdi,%rsi,8), %rsi
movzbl (%rsi), %esi
addl %esi, %ecx
incq %rbx
jmp 0xcf8c2
cmpl %ecx, %edx
cmovlel %ecx, %edx
jmp 0xcf8bd
xorl %eax, %eax
jmp 0xcf8f3
cmpl %ecx, %edx
cmovgl %edx, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x748ba(%rip), %rax     # 0x1441c0
cmpb $0x0, 0x1c(%rax)
jne 0xcf921
leaq 0x1bc53(%rip), %rdi     # 0xeb566
leaq 0x1c080(%rip), %rsi     # 0xeb99a
xorl %eax, %eax
callq 0xd1cf7
movq %rbx, %rdi
callq 0xcf62a
testq %rax, %rax
je 0xcf933
movl 0xc(%rax), %eax
jmp 0xcf935
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x74875(%rip), %rax     # 0x1441c0
cmpb $0x0, 0x1c(%rax)
jne 0xcf966
leaq 0x1bc0e(%rip), %rdi     # 0xeb566
leaq 0x1c04c(%rip), %rsi     # 0xeb9ab
xorl %eax, %eax
callq 0xd1cf7
cmpq 0x6f623(%rip), %r14     # 0x13ef90
je 0xcf990
cmpq 0x6f5ba(%rip), %r14     # 0x13ef30
je 0xcf999
leaq 0x1c083(%rip), %rdi     # 0xeba02
xorl %r15d, %r15d
movq %r14, %rsi
xorl %eax, %eax
callq 0x22aab
movb $0x1, %al
jmp 0xcf9a2
leaq 0x6cf79(%rip), %r15     # 0x13c910
jmp 0xcf9a0
leaq 0x6e150(%rip), %r15     # 0x13daf0
xorl %eax, %eax
testl %ebx, %ebx
js 0xcfa73
cmpl %ebx, 0x8(%r15)
setle %cl
orb %cl, %al
jne 0xcfa73
movq 0x10(%r15), %rax
movl %ebx, %ecx
movq (%rax,%rcx,8), %rbx
testq %rbx, %rbx
je 0xcfa73
cmpl $0x0, 0x4(%rbx)
jle 0xcfa59
movq 0x8(%rbx), %r14
xorl %r15d, %r15d
movl $0x3, %edi
callq 0x21190
cmpl $0x0, (%r14)
jle 0xcfa11
xorl %r12d, %r12d
movq 0x8(%r14), %rax
movss (%rax,%r12,8), %xmm0
movss 0x4(%rax,%r12,8), %xmm1
callq 0x21b00
incq %r12
movslq (%r14), %rax
cmpq %rax, %r12
jl 0xcf9f0
callq 0x21c60
xorl %edi, %edi
callq 0x21190
cmpl $0x0, (%r14)
jle 0xcfa47
xorl %r12d, %r12d
movq 0x8(%r14), %rax
movss (%rax,%r12,8), %xmm0
movss 0x4(%rax,%r12,8), %xmm1
callq 0x21b00
incq %r12
movslq (%r14), %rax
cmpq %rax, %r12
jl 0xcfa26
callq 0x21c60
incl %r15d
addq $0x10, %r14
cmpl 0x4(%rbx), %r15d
jl 0xcf9dd
movss (%rbx), %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x21ed0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x745bf(%rip), %rax     # 0x1441c0
cmpb $0x0, 0x1c(%rax)
jne 0xcfc1c
leaq 0x1b958(%rip), %rdi     # 0xeb566
leaq 0x1bdbb(%rip), %rsi     # 0xeb9d0
xorl %eax, %eax
callq 0xd1cf7
xorl %ebp, %ebp
cmpq 0x6f36b(%rip), %r14     # 0x13ef90
je 0xcfc48
cmpq 0x6f302(%rip), %r14     # 0x13ef30
je 0xcfc51
leaq 0x1bdcb(%rip), %rdi     # 0xeba02
xorl %r15d, %r15d
movq %r14, %rsi
xorl %eax, %eax
callq 0x22aab
movb $0x1, %al
jmp 0xcfc5a
leaq 0x6ccc1(%rip), %r15     # 0x13c910
jmp 0xcfc58
leaq 0x6de98(%rip), %r15     # 0x13daf0
xorl %eax, %eax
testl %ebx, %ebx
js 0xcfc88
cmpl %ebx, 0x8(%r15)
setle %cl
orb %cl, %al
jne 0xcfc88
movq 0x10(%r15), %rax
movl %ebx, %ecx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0xcfc88
cvtss2sd (%rax), %xmm0
addsd 0xc39c(%rip), %xmm0     # 0xdc020
cvttsd2si %xmm0, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x74517(%rip), %rax     # 0x1441c0
cmpb $0x0, 0x1c(%rax)
jne 0xcfcc4
leaq 0x1b8b0(%rip), %rdi     # 0xeb566
leaq 0x1bd23(%rip), %rsi     # 0xeb9e0
xorl %eax, %eax
callq 0xd1cf7
xorl %ebp, %ebp
cmpq 0x6f2c3(%rip), %r14     # 0x13ef90
je 0xcfcf0
cmpq 0x6f25a(%rip), %r14     # 0x13ef30
je 0xcfcf9
leaq 0x1bd23(%rip), %rdi     # 0xeba02
xorl %r15d, %r15d
movq %r14, %rsi
xorl %eax, %eax
callq 0x22aab
movb $0x1, %al
jmp 0xcfd02
leaq 0x6cc19(%rip), %r15     # 0x13c910
jmp 0xcfd00
leaq 0x6ddf0(%rip), %r15     # 0x13daf0
xorl %eax, %eax
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0xcfd72
cmpb $0x0, (%rbx)
je 0xcfd72
movb (%rbx), %cl
testb %cl, %cl
je 0xcfd58
movl 0x8(%r15), %eax
incq %rbx
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
movzbl %cl, %edx
cmpl %edx, %eax
jle 0xcfd4d
cmpb $0xa, %cl
jne 0xcfd3c
maxss %xmm1, %xmm0
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
jmp 0xcfd4d
movq 0x10(%r15), %rcx
movq (%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0xcfd4d
addss (%rcx), %xmm0
movb (%rbx), %cl
incq %rbx
testb %cl, %cl
jne 0xcfd24
jmp 0xcfd5e
xorps %xmm1, %xmm1
xorps %xmm0, %xmm0
maxss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
addsd 0xc2b2(%rip), %xmm0     # 0xdc020
cvttsd2si %xmm0, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x74433(%rip), %rax     # 0x1441c0
cmpb $0x0, 0x1c(%rax)
jne 0xcfda8
leaq 0x1b7cc(%rip), %rdi     # 0xeb566
leaq 0x1bc50(%rip), %rsi     # 0xeb9f1
xorl %eax, %eax
callq 0xd1cf7
cmpq 0x6f1e1(%rip), %rbx     # 0x13ef90
je 0xcfdd2
cmpq 0x6f178(%rip), %rbx     # 0x13ef30
je 0xcfddb
leaq 0x1bc41(%rip), %rdi     # 0xeba02
xorl %r14d, %r14d
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22aab
movb $0x1, %al
jmp 0xcfde4
leaq 0x6cb37(%rip), %r14     # 0x13c910
jmp 0xcfde2
leaq 0x6dd0e(%rip), %r14     # 0x13daf0
xorl %eax, %eax
xorps %xmm0, %xmm0
testb %al, %al
jne 0xcfdf1
movss 0xc(%r14), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/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 0x21c70
movq %rax, %r14
movl $0x4, %edx
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rcx
callq 0xcfe5b
testl %eax, %eax
jle 0xcfe46
movq (%r14), %rcx
movl %eax, %eax
xorl %edx, %edx
cmpq %rbx, (%rcx,%rdx,8)
je 0xcfe4a
incq %rdx
cmpq %rdx, %rax
jne 0xcfe38
xorl %eax, %eax
jmp 0xcfe4f
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x736b1(%rip), %r14     # 0x1441c0
cmpb $0x0, 0xb1(%r14)
je 0xd0b54
movq 0x77cf8(%rip), %rbx     # 0x148818
testq %rbx, %rbx
je 0xd0b41
movl (%rbx), %edi
leaq 0x40(%rbx), %rdx
xorl %esi, %esi
callq 0x21c10
movl (%rbx), %edi
callq 0x222d0
movq %rbx, %rdi
callq 0x21ae0
movq $0x0, 0x77ccc(%rip) # 0x148818
movb $0x0, 0xb1(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x77c7d(%rip)     # 0x148828
jne 0xd0caf
pushq %rbx
leaq 0x77cb7(%rip), %rax     # 0x148870
movq 0x30(%rax), %rax
testq %rax, %rax
je 0xd0cae
cmpq $0x0, 0x77c6a(%rip)     # 0x148838
jne 0xd0cae
movq 0x18(%rax), %rbx
leaq 0x77bf1(%rip), %rax     # 0x1487d0
movq (%rax), %rdi
movq %rdi, 0x77c4f(%rip)     # 0x148838
leaq 0x2b5bc(%rip), %rsi     # 0xfc1ac
movl $0x1, %edx
callq 0x21680
movq %rax, 0x77c3f(%rip)     # 0x148840
movq 0x77c30(%rip), %rdi     # 0x148838
leaq 0x2b5a9(%rip), %rsi     # 0xfc1b8
movl $0x1, %edx
callq 0x21680
movq %rax, 0x77c28(%rip)     # 0x148848
movq 0x77c11(%rip), %rdi     # 0x148838
leaq 0x2b59b(%rip), %rsi     # 0xfc1c9
movl $0x1, %edx
callq 0x21680
movq %rax, 0x77c11(%rip)     # 0x148850
movq 0x77bf2(%rip), %rdi     # 0x148838
leaq 0x2b58f(%rip), %rsi     # 0xfc1dc
movl $0x1, %edx
callq 0x21680
movq %rax, 0x77bfa(%rip)     # 0x148858
cmpq $0x0, 0x77bda(%rip)     # 0x148840
setne %cl
cmpq $0x0, 0x77bd7(%rip)     # 0x148848
setne %dl
andb %cl, %dl
cmpq $0x0, 0x77bd2(%rip)     # 0x148850
setne %cl
andb %dl, %cl
testq %rax, %rax
setne %al
testb %al, %cl
je 0xd0ca3
movq %rbx, %rdi
callq 0xd0d93
cmpl $-0x1, %eax
je 0xd0ca3
movb $0x1, 0x77b87(%rip)     # 0x148828
jmp 0xd0cae
movq $0x0, 0x77b8a(%rip) # 0x148838
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x77b37(%rip)     # 0x148828
jne 0xd0d01
callq 0xd0ba4
cmpb $0x0, 0x77b29(%rip)     # 0x148828
je 0xd0d18
movq 0x77b30(%rip), %rax     # 0x148838
xorl %ebx, %ebx
testq %rax, %rax
je 0xd0d28
cmpl $-0x1, 0x10(%rax)
setne %bl
jmp 0xd0d28
leaq 0x2b46f(%rip), %rdi     # 0xfc18e
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x22aab
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq 0x77a8d(%rip), %r12     # 0x148838
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %r12, %r12
je 0xd0ee6
movq %rdi, %r14
movq 0xe8(%r12), %rax
movslq 0xe0(%r12), %rcx
shlq $0x7, %rcx
movq 0x10(%rax,%rcx), %rsi
movq 0x77a7c(%rip), %rdx     # 0x148858
leaq 0x8(%rsp), %r13
leaq 0x10(%rsp), %rax
leaq 0x18(%rsp), %r10
leaq 0x4(%rsp), %r11
leaq 0x20(%rsp), %rbp
xorl %r15d, %r15d
movl $0x1, %r8d
movq %r12, %rdi
xorl %ecx, %ecx
xorl %r9d, %r9d
pushq %r13
pushq %rax
pushq %r10
pushq %r11
pushq %rbp
pushq $0x0
callq 0x21260
addq $0x30, %rsp
movq (%r13), %rdi
testq %rdi, %rdi
je 0xd0e5d
movq (%rdi), %r13
callq 0x21c00
leaq 0x28(%rsp), %rdx
movq %r12, %rdi
movq %r13, %rsi
callq 0x213a0
testl %eax, %eax
je 0xd0e5a
movq 0x28(%rsp), %rsi
leaq 0x2b39f(%rip), %rdi     # 0xfc1e9
callq 0x21d10
xorl %r15d, %r15d
testl %eax, %eax
cmoveq %r13, %r15
jmp 0xd0e5d
xorl %r15d, %r15d
testq %r15, %r15
je 0xd0ee6
leaq 0x288(%rip), %rdi       # 0xd10f5
callq 0x21290
movq %rax, %r12
leaq 0x28(%rsp), %r8
movl $0x21, (%r8)
movl $0x0, 0x10(%r8)
movq 0x779a8(%rip), %rdi     # 0x148838
movq %rdi, 0x18(%r8)
movq %r14, 0x20(%r8)
movq 0x779b9(%rip), %rax     # 0x148858
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 0x77961(%rip), %rdi     # 0x148838
xorl %esi, %esi
callq 0x22260
movq %r12, %rdi
callq 0x21290
movl %ebx, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x7791f(%rip)     # 0x148828
jne 0xd0f1b
callq 0xd0ba4
xorl %eax, %eax
cmpb $0x1, 0x7790f(%rip)     # 0x148828
jne 0xd0f28
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xd0f2e
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xd0f5a
movslq 0x28(%rdi), %rcx
movq 0x77900(%rip), %r8      # 0x148840
movq 0x77901(%rip), %rdx     # 0x148848
cmpq %r8, %rcx
je 0xd0f5b
cmpq %rdx, %rcx
je 0xd0f5b
cmpq 0x778f8(%rip), %rcx     # 0x148850
je 0xd0f5b
retq
cmpq %r8, %rcx
jne 0xd0f8e
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 0xd0f70
movswl 0x48(%rdi), %eax
movl %eax, 0x1c(%rsi)
jmp 0xd0fa6
xorl %eax, %eax
cmpq %rdx, %rcx
sete %al
movl $0x2, (%rsi)
movl %eax, 0x4(%rsi)
movswl 0x3c(%rdi), %eax
movl %eax, 0x8(%rsi)
movl (%rsi), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x77869(%rip)     # 0x148828
jne 0xd0fd3
callq 0xd0ba4
cmpb $0x1, 0x7785b(%rip)     # 0x148828
jne 0xd10e8
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xd0f2e
testl %eax, %eax
je 0xd10e8
movl 0x8(%rsp), %eax
cmpl $0x2, %eax
je 0xd10b6
cmpl $0x1, %eax
jne 0xd10e8
movl 0x10(%rsp), %eax
orl 0xc(%rsp), %eax
orl 0x14(%rsp), %eax
je 0xd103b
movq 0x7781d(%rip), %rdi     # 0x148830
cmpq $0x0, 0xf8(%rdi)
je 0xd103b
callq 0xd5037
movq 0x77807(%rip), %rax     # 0x148830
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 0xd1078
movq 0x777e0(%rip), %rdi     # 0x148830
cmpq $0x0, 0x100(%rdi)
je 0xd1078
callq 0xd5037
movq 0x777ca(%rip), %rax     # 0x148830
movl 0x18(%rsp), %edi
movl 0x1c(%rsp), %esi
movl 0x20(%rsp), %edx
callq *0x100(%rax)
movl $0x1, 0x4(%rsp)
cmpq $0x0, 0x777b0(%rip)     # 0x148838
je 0xd10e8
leaq 0x90(%rip), %rbx        # 0xd1121
leaq 0x30(%rsp), %r14
leaq 0x4(%rsp), %r15
movq 0x77796(%rip), %rdi     # 0x148838
movq %r14, %rsi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x22310
testl %eax, %eax
jne 0xd109b
jmp 0xd10e8
movq 0x77773(%rip), %rdi     # 0x148830
cmpq $0x0, 0x108(%rdi)
je 0xd10e8
callq 0xd5037
movq 0x7775d(%rip), %rax     # 0x148830
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_O1/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 0xd114f
movl (%rdx), %eax
movq 0x28(%rsi), %rcx
cmpq 0x7770d(%rip), %rcx     # 0x148840
jne 0xd113d
cmpl $0x2, %eax
setb %al
jmp 0xd1151
cmpq 0x77704(%rip), %rcx     # 0x148848
je 0xd1155
cmpq 0x77703(%rip), %rcx     # 0x148850
je 0xd1155
xorl %eax, %eax
movzbl %al, %eax
retq
testl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
sete %al
jmp 0xd1151
nop