// File: /workspace/github_c_makefile_star2_O0/schroeder-lvb[P]sissm/src/cfs.c
// Function: cfsStrWash
static char *_cfsStrWash( char *w )
{
    static char retStr[CFS_FETCH_MAX];
    unsigned int i, j, inQuote;

    strlcpy( retStr, w, CFS_FETCH_MAX );

    // eliminate any terminating line feed
    //
    if ( retStr[ strlen( retStr )-1 ] == 0x0a ) {
        retStr[ strlen( retStr )-1 ] = 0;
    }

    // eliminate any comment "//" not inside the quote
    //
    if ( strlen(retStr) >= 2 ) {  // the slash-slash is at least 2 chars
        inQuote = 0;             // 0 is outside quote, 1 is inside quote
        for ( i=0; i<strlen(retStr)-1; i++ ) {
            if ( retStr[i] == '\"' ) {
                inQuote = !inQuote;
            }
            else if ( (retStr[i] == '/') && (retStr[i+1] == '/' )) {
                if (!inQuote) {
                    retStr[i] = 0;
                    break;
                }
            }
        }
    }

    // replace TAB with spaces
    //
    for (i=0; i<strlen(retStr); i++)
        if (retStr[i] == 9) retStr[i] = 32;

    // clean up leading and trailing whitespaces
    //
    strTrimInPlace( retStr );

    // remove quote marks for string input, and
    // pack-slide the characters left
    //
    i = 0;
    while ( retStr[i] != 0 ) {
        if (retStr[i] == 34) {
            j = i;
            while (1) {
                if ( retStr[j] == 0 ) break;
                retStr[j] = retStr[j+1];
                j++;
            }
        }
        i++;
    }

    // process the exception "empty string" case
    if (0 != ( i = (int) strlen( retStr )))
        if ( retStr[i-1] == 34 ) retStr[i-1] = 0;

    return (retStr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x2afd9(%rip), %rdi     # 0x34540
movl $0x400, %edx            # imm = 0x400
callq 0x11bc0
leaq 0x2afc8(%rip), %rdi     # 0x34540
callq 0x8110
movq %rax, %rcx
subq $0x1, %rcx
leaq 0x2afb5(%rip), %rax     # 0x34540
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x95b2
leaq 0x2afa5(%rip), %rdi     # 0x34540
callq 0x8110
movq %rax, %rcx
subq $0x1, %rcx
leaq 0x2af92(%rip), %rax     # 0x34540
movb $0x0, (%rax,%rcx)
leaq 0x2af87(%rip), %rdi     # 0x34540
callq 0x8110
cmpq $0x2, %rax
jb 0x9682
movl $0x0, -0x14(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x20(%rbp)
leaq 0x2af5c(%rip), %rdi     # 0x34540
callq 0x8110
movq %rax, %rcx
movq -0x20(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x9680
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x2af37(%rip), %rax     # 0x34540
movsbl (%rax,%rcx), %eax
cmpl $0x22, %eax
jne 0x9625
cmpl $0x0, -0x14(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x14(%rbp)
jmp 0x9670
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x2af0f(%rip), %rax     # 0x34540
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
jne 0x966e
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x2aef5(%rip), %rax     # 0x34540
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
jne 0x966e
cmpl $0x0, -0x14(%rbp)
jne 0x966c
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x2aeda(%rip), %rax     # 0x34540
movb $0x0, (%rax,%rcx)
jmp 0x9680
jmp 0x966e
jmp 0x9670
jmp 0x9672
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x95d6
jmp 0x9682
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x28(%rbp)
leaq 0x2aea9(%rip), %rdi     # 0x34540
callq 0x8110
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0x96da
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x2ae8c(%rip), %rax     # 0x34540
movsbl (%rax,%rcx), %eax
cmpl $0x9, %eax
jne 0x96cd
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x2ae77(%rip), %rax     # 0x34540
movb $0x20, (%rax,%rcx)
jmp 0x96cf
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x9689
leaq 0x2ae5f(%rip), %rdi     # 0x34540
callq 0x12450
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x2ae47(%rip), %rax     # 0x34540
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x9772
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x2ae32(%rip), %rax     # 0x34540
movsbl (%rax,%rcx), %eax
cmpl $0x22, %eax
jne 0x9764
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x2ae17(%rip), %rax     # 0x34540
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x9734
jmp 0x9762
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x2adfb(%rip), %rax     # 0x34540
movb (%rax,%rcx), %dl
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x2adec(%rip), %rax     # 0x34540
movb %dl, (%rax,%rcx)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x971d
jmp 0x9764
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x96ed
leaq 0x2adc7(%rip), %rdi     # 0x34540
callq 0x8110
movl %eax, %ecx
movl %ecx, -0xc(%rbp)
xorl %eax, %eax
cmpl %ecx, %eax
je 0x97ba
movl -0xc(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x2ada6(%rip), %rax     # 0x34540
movsbl (%rax,%rcx), %eax
cmpl $0x22, %eax
jne 0x97b8
movl -0xc(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x2ad8c(%rip), %rax     # 0x34540
movb $0x0, (%rax,%rcx)
jmp 0x97ba
leaq 0x2ad7f(%rip), %rax     # 0x34540
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)