// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/cfs.c
// Function: cfsFetchStr
char *cfsFetchStr( cfsPtr pCfs, char *varName, char *defaultValue )
{
    static char retStr[CFS_FETCH_MAX], lineIn[CFS_FETCH_MAX];
    char *w, *v, *u;

    strlcpy( retStr, defaultValue, CFS_FETCH_MAX );        

    if ( pCfs != NULL ) {
        fseek( pCfs->fpr, 0L, SEEK_SET );

        while ( !feof( pCfs->fpr ) ) {
            if (NULL != fgets( lineIn, CFS_FETCH_MAX, pCfs->fpr )) {
                w = strcasestr( lineIn, varName );
                if ( w == lineIn ) {
                    v = _cfsStrWash( lineIn );
                    u = strstr( v, " " );
                    if (u != NULL) {
                        strTrimInPlace( u );
                        strlcpy( retStr, u, CFS_FETCH_MAX );
                        break;
                    }
                }
            }
        }
        
    }
    return( retStr );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x22d30(%rip), %rdi     # 0x2bd40
movl $0x400, %edx            # imm = 0x400
movq %rax, %rsi
callq 0xe97a
testq %r14, %r14
je 0x91a7
movq 0x400(%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x82f0
leaq 0x23103(%rip), %r15     # 0x2c140
leaq 0x234fc(%rip), %r12     # 0x2c540
pushq $0x1
popq %rbp
movq 0x400(%r14), %rdi
callq 0x8270
testl %eax, %eax
jne 0x91a7
movq 0x400(%r14), %rdx
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x8200
testq %rax, %rax
je 0x9047
movq %r15, %rdi
movq %rbx, %rsi
callq 0x8360
cmpq %r15, %rax
jne 0x9047
movl $0x400, %edx            # imm = 0x400
movq %r12, %rdi
movq %r15, %rsi
callq 0xe97a
movq %r12, %rdi
callq 0x8120
cmpb $0xa, -0x1(%rax,%r12)
jne 0x90aa
movb $0x0, -0x1(%rax,%r12)
movq %r12, %rdi
callq 0x8120
cmpq $0x1, %rax
jbe 0x90f8
decq %rax
xorl %edx, %edx
movl %ebp, %ecx
leal -0x1(%rcx), %esi
cmpq %rsi, %rax
jbe 0x90f8
movzbl (%rsi,%r12), %edi
cmpl $0x2f, %edi
je 0x90e2
cmpl $0x22, %edi
jne 0x90ef
xorl %esi, %esi
testl %edx, %edx
sete %sil
movl %esi, %edx
jmp 0x90ef
movl %ecx, %edi
cmpb $0x2f, (%rdi,%r12)
jne 0x90ef
testl %edx, %edx
je 0x90f3
incl %ecx
jmp 0x90bf
movb $0x0, (%rsi,%r12)
xorl %r13d, %r13d
movl %r13d, %r13d
movq %r12, %rdi
callq 0x8120
cmpq %r13, %rax
jbe 0x911e
cmpb $0x9, (%r13,%r12)
jne 0x9119
movb $0x20, (%r13,%r12)
incl %r13d
jmp 0x90fb
movq %r12, %rdi
callq 0xee76
xorl %eax, %eax
movl %ebp, %ecx
movl %eax, %edx
movzbl (%rdx,%r12), %esi
cmpl $0x22, %esi
je 0x9140
testl %esi, %esi
je 0x915a
incl %eax
incl %ecx
jmp 0x912a
movl %ecx, %edx
testb %sil, %sil
je 0x913a
leal -0x1(%rdx), %esi
movl %esi, %edi
movl %edx, %esi
movb (%rsi,%r12), %sil
movb %sil, (%rdi,%r12)
incl %edx
jmp 0x9142
movq %r12, %rdi
callq 0x8120
testl %eax, %eax
je 0x9174
decl %eax
cmpb $0x22, (%rax,%r12)
jne 0x9174
movb $0x0, (%rax,%r12)
movq %r12, %rdi
pushq $0x20
popq %rsi
callq 0x8170
testq %rax, %rax
je 0x9047
movq %rax, %r13
movq %rax, %rdi
callq 0xee76
leaq 0x22ba6(%rip), %rdi     # 0x2bd40
movl $0x400, %edx            # imm = 0x400
movq %r13, %rsi
callq 0xe97a
leaq 0x22b92(%rip), %rax     # 0x2bd40
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq