// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_font.c
// Function: glutStrokeString
void FGAPIENTRY glutStrokeString( void* fontID, const unsigned char *string )
{
    unsigned char c;
    int i, j;
    float length = 0.0;
    SFG_StrokeFont* font;
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutStrokeString" );
    font = fghStrokeByID( fontID );
    freeglut_return_if_fail( font );
    if ( !string || ! *string )
        return;

    /*
     * Step through the string, drawing each character.
     * A newline will simply translate the next character's insertion
     * point back to the start of the line and down one line.
     */
    while( ( c = *string++) )
        if( c < font->Quantity )
        {
            if( c == '\n' )
            {
                glTranslatef ( -length, -( float )( font->Height ), 0.0 );
                length = 0.0;
            }
            else  /* Not an EOL, draw the bitmap character */
            {
                const SFG_StrokeChar *schar = font->Characters[ c ];
                if( schar )
                {
                    const SFG_StrokeStrip *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( );
                    }

                    length += schar->Right;
                    glTranslatef( schar->Right, 0.0, 0.0 );
                }
            }
        }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x7a398(%rip), %rax     # 0x1331e0
cmpb $0x0, 0x1c(%rax)
jne 0xb8e63
leaq 0x1b411(%rip), %rdi     # 0xd4266
leaq 0x1b863(%rip), %rsi     # 0xd46bf
xorl %eax, %eax
callq 0xbad73
movq %r14, %rdi
callq 0xb8df0
movq %rax, %r14
testq %rax, %rax
sete %al
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0xb8f5e
movb (%rbx), %al
testb %al, %al
je 0xb8f5e
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
pushq $0x3
popq %rbp
movq %r14, 0x10(%rsp)
testb %al, %al
je 0xb8f5e
movzbl %al, %ecx
cmpl %ecx, 0x8(%r14)
jle 0xb8f54
cmpb $0xa, %al
jne 0xb8edc
movaps 0xdde5(%rip), %xmm2     # 0xc6ca0
movaps (%rsp), %xmm0
xorps %xmm2, %xmm0
movss 0xc(%r14), %xmm1
xorps %xmm2, %xmm1
xorps %xmm2, %xmm2
callq 0x21ed0
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
jmp 0xb8f54
movq 0x10(%r14), %rax
movq (%rax,%rcx,8), %r15
testq %r15, %r15
je 0xb8f54
movq 0x8(%r15), %r12
xorl %r13d, %r13d
cmpl 0x4(%r15), %r13d
jge 0xb8f33
movl %ebp, %edi
callq 0x21190
xorl %r14d, %r14d
movslq (%r12), %rax
cmpq %rax, %r14
jge 0xb8f25
movq 0x8(%r12), %rax
movss (%rax,%r14,8), %xmm0
movss 0x4(%rax,%r14,8), %xmm1
callq 0x21af0
incq %r14
jmp 0xb8f00
callq 0x21c60
incl %r13d
addq $0x10, %r12
jmp 0xb8ef0
movss (%r15), %xmm0
movaps (%rsp), %xmm1
addss %xmm0, %xmm1
movaps %xmm1, (%rsp)
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
callq 0x21ed0
movq 0x10(%rsp), %r14
incq %rbx
movb (%rbx), %al
jmp 0xb8e9b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq