// File: /workspace/github_cpp_makefile_star2_O1/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 0x74726(%rip), %rax     # 0x1441c0
cmpb $0x0, 0x1c(%rax)
jne 0xcfab5
leaq 0x1babf(%rip), %rdi     # 0xeb566
leaq 0x1bf11(%rip), %rsi     # 0xeb9bf
xorl %eax, %eax
callq 0xd1cf7
cmpq 0x6f4d4(%rip), %r14     # 0x13ef90
je 0xcfadf
cmpq 0x6f46b(%rip), %r14     # 0x13ef30
je 0xcfae8
leaq 0x1bf34(%rip), %rdi     # 0xeba02
xorl %r15d, %r15d
movq %r14, %rsi
xorl %eax, %eax
callq 0x22aab
movb $0x1, %al
jmp 0xcfaf1
leaq 0x6ce2a(%rip), %r15     # 0x13c910
jmp 0xcfaef
leaq 0x6e001(%rip), %r15     # 0x13daf0
xorl %eax, %eax
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0xcfbdf
cmpb $0x0, (%rbx)
je 0xcfbdf
movb (%rbx), %al
testb %al, %al
je 0xcfbdf
xorps %xmm3, %xmm3
movzbl %al, %ecx
cmpl %ecx, 0x8(%r15)
jle 0xcfbd2
cmpb $0xa, %al
jne 0xcfb4c
movaps 0xe1c3(%rip), %xmm0     # 0xddcf0
xorps %xmm0, %xmm3
movss 0xc(%r15), %xmm1
xorps %xmm0, %xmm1
xorps %xmm2, %xmm2
movaps %xmm3, %xmm0
callq 0x21ed0
xorps %xmm3, %xmm3
jmp 0xcfbd2
movq 0x10(%r15), %rax
movq (%rax,%rcx,8), %r14
testq %r14, %r14
je 0xcfbd2
movaps %xmm3, (%rsp)
cmpl $0x0, 0x4(%r14)
jle 0xcfbb2
movq 0x8(%r14), %r12
xorl %ebp, %ebp
movl $0x3, %edi
callq 0x21190
cmpl $0x0, (%r12)
jle 0xcfba1
xorl %r13d, %r13d
movq 0x8(%r12), %rax
movss (%rax,%r13,8), %xmm0
movss 0x4(%rax,%r13,8), %xmm1
callq 0x21b00
incq %r13
movslq (%r12), %rax
cmpq %rax, %r13
jl 0xcfb7e
callq 0x21c60
incl %ebp
addq $0x10, %r12
cmpl 0x4(%r14), %ebp
jl 0xcfb6a
movss (%r14), %xmm0
movaps (%rsp), %xmm1
addss %xmm0, %xmm1
movaps %xmm1, (%rsp)
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
callq 0x21ed0
movaps (%rsp), %xmm3
incq %rbx
movb (%rbx), %al
testb %al, %al
jne 0xcfb15
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq