// File: /workspace/github_c_makefile_star2_O1/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 0x22caa(%rip), %rdi     # 0x2bd40
movl $0x400, %edx            # imm = 0x400
movq %rax, %rsi
callq 0xf038
testq %r14, %r14
je 0x923f
movq 0x400(%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x82e0
movq 0x400(%r14), %rdi
callq 0x8270
testl %eax, %eax
jne 0x923f
leaq 0x23069(%rip), %r15     # 0x2c140
leaq 0x23462(%rip), %r12     # 0x2c540
movq 0x400(%r14), %rdx
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x8200
testq %rax, %rax
je 0x922b
movq %r15, %rdi
movq %rbx, %rsi
callq 0x8350
cmpq %r15, %rax
jne 0x922b
movl $0x400, %edx            # imm = 0x400
movq %r12, %rdi
movq %r15, %rsi
callq 0xf038
movq %r12, %rdi
callq 0x8120
cmpb $0xa, -0x1(%rax,%r12)
jne 0x9135
movb $0x0, -0x1(%rax,%r12)
movq %r12, %rdi
callq 0x8120
cmpq $0x2, %rax
jb 0x918c
decq %rax
je 0x918c
xorl %edi, %edi
movl $0x1, %ecx
xorl %edx, %edx
movzbl (%rdi,%r12), %r8d
movl %ecx, %esi
cmpl $0x2f, %r8d
je 0x9170
cmpl $0x22, %r8d
jne 0x917b
xorl %edi, %edi
testl %edx, %edx
sete %dil
movl %edi, %edx
jmp 0x917b
cmpb $0x2f, (%rsi,%r12)
jne 0x917b
testl %edx, %edx
je 0x9187
incl %ecx
movq %rsi, %rdi
cmpq %rsi, %rax
ja 0x9151
jmp 0x918c
movb $0x0, (%rdi,%r12)
cmpb $0x0, 0x233ad(%rip)     # 0x2c540
je 0x91bd
movl $0x1, %ebp
xorl %r13d, %r13d
cmpb $0x9, (%r13,%r12)
jne 0x91ab
movb $0x20, (%r13,%r12)
movl %ebp, %r13d
movq %r12, %rdi
callq 0x8120
incl %ebp
cmpq %r13, %rax
ja 0x919d
movq %r12, %rdi
callq 0xf5e3
xorl %eax, %eax
movl $0x1, %ecx
movl %eax, %edx
movzbl (%rdx,%r12), %esi
cmpl $0x22, %esi
je 0x91de
testl %esi, %esi
jne 0x91f9
jmp 0x91ff
addq %r12, %rdx
movl %ecx, %esi
movl %esi, %edi
movb (%rdi,%r12), %r8b
movb %r8b, (%rdx)
leaq (%r12,%rdi), %rdx
incl %esi
cmpb $0x0, (%rdi,%r12)
jne 0x91e3
incl %eax
incl %ecx
jmp 0x91cc
movq %r12, %rdi
callq 0x8120
testl %eax, %eax
je 0x9219
decl %eax
cmpb $0x22, (%rax,%r12)
jne 0x9219
movb $0x0, (%rax,%r12)
movq %r12, %rdi
movl $0x20, %esi
callq 0x8170
testq %rax, %rax
jne 0x9255
movq 0x400(%r14), %rdi
callq 0x8270
testl %eax, %eax
je 0x90de
leaq 0x22afa(%rip), %rax     # 0x2bd40
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
movq %rax, %rdi
callq 0xf5e3
leaq 0x22ad9(%rip), %rdi     # 0x2bd40
movl $0x400, %edx            # imm = 0x400
movq %r13, %rsi
callq 0xf038
jmp 0x923f