// File: /workspace/github_cpp_makefile_star2_O3/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 0x745a1(%rip), %rax     # 0x1421c0
cmpb $0x0, 0x1c(%rax)
jne 0xcdc3a
leaq 0x1b98a(%rip), %rdi     # 0xe95b6
leaq 0x1bddc(%rip), %rsi     # 0xe9a0f
xorl %eax, %eax
callq 0xcfe73
cmpq 0x6f34f(%rip), %r14     # 0x13cf90
je 0xcdc6b
cmpq 0x6f2e6(%rip), %r14     # 0x13cf30
je 0xcdc74
leaq 0x1bdff(%rip), %rdi     # 0xe9a52
movq %r14, %rsi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22a74
leaq 0x6cc9e(%rip), %r14     # 0x13a910
jmp 0xcdc7b
leaq 0x6de75(%rip), %r14     # 0x13baf0
testq %rbx, %rbx
je 0xcdd5b
movb (%rbx), %al
testb %al, %al
je 0xcdd5b
xorps %xmm3, %xmm3
movzbl %al, %ecx
cmpl %ecx, 0x8(%r14)
jle 0xcdd4e
cmpb $0xa, %al
jne 0xcdcc8
movaps 0xe047(%rip), %xmm0     # 0xdbcf0
xorps %xmm0, %xmm3
movss 0xc(%r14), %xmm1
xorps %xmm0, %xmm1
xorps %xmm2, %xmm2
movaps %xmm3, %xmm0
callq 0x21ec0
xorps %xmm3, %xmm3
jmp 0xcdd4e
movq 0x10(%r14), %rax
movq (%rax,%rcx,8), %r15
testq %r15, %r15
je 0xcdd4e
movaps %xmm3, (%rsp)
cmpl $0x0, 0x4(%r15)
jle 0xcdd2e
movq 0x8(%r15), %r12
xorl %ebp, %ebp
movl $0x3, %edi
callq 0x21190
cmpl $0x0, (%r12)
jle 0xcdd1d
xorl %r13d, %r13d
movq 0x8(%r12), %rax
movss (%rax,%r13,8), %xmm0
movss 0x4(%rax,%r13,8), %xmm1
callq 0x21af0
incq %r13
movslq (%r12), %rax
cmpq %rax, %r13
jl 0xcdcfa
callq 0x21c50
incl %ebp
addq $0x10, %r12
cmpl 0x4(%r15), %ebp
jl 0xcdce6
movss (%r15), %xmm0
movaps (%rsp), %xmm1
addss %xmm0, %xmm1
movaps %xmm1, (%rsp)
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
callq 0x21ec0
movaps (%rsp), %xmm3
incq %rbx
movb (%rbx), %al
testb %al, %al
jne 0xcdc91
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq