// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/utils/bamtools_fasta.cpp
// Function: BamTools::Fasta::FastaPrivate::LoadIndexData()
bool Fasta::FastaPrivate::LoadIndexData(void) {
  
    // skip if no index file available
    if ( !IsIndexOpen ) return false; 
  
    // clear any prior index data
    Index.clear();
  
    char buffer[1024];
    stringstream indexBuffer;
    while ( true ) {
      
        char c = fgetc(IndexStream);
        if ( (c == '\n') || feof(IndexStream) ) break;
        ungetc(c, IndexStream);
      
        // clear index buffer
        indexBuffer.str("");
        
        // read line from index file
        if ( fgets(buffer, 1024, IndexStream) == 0 ) {
            cerr << "FASTA LoadIndexData() error : could not read from index file" << endl;
            HasIndex = false;
            return false;
        }
      
        // store line in indexBuffer
        indexBuffer << buffer;
        
        // retrieve fasta index data from line
        FastaIndexData data;
        indexBuffer >> data.Name;
        indexBuffer >> data.Length;
        indexBuffer >> data.Offset;
        indexBuffer >> data.LineLength;
        indexBuffer >> data.ByteLength;
        
        // store index entry
        Index.push_back(data);
    }
    
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5d8, %rsp            # imm = 0x5D8
cmpb $0x1, 0x19(%rdi)
jne 0x64da2
movq %rdi, %rbx
leaq 0x20(%rdi), %r14
movq %r14, %rdi
callq 0x64fd0
leaq 0x48(%rsp), %r15
movq %r15, %rdi
callq 0x35430
leaq 0x10(%rsp), %r12
movq 0x10(%rbx), %rdi
callq 0x35970
movl %eax, %ebp
shll $0x18, %eax
movb $0x1, %r13b
cmpl $0xa000000, %eax        # imm = 0xA000000
je 0x64dc9
movq 0x10(%rbx), %rdi
callq 0x35920
testl %eax, %eax
jne 0x64dc9
movsbl %bpl, %edi
movq 0x10(%rbx), %rsi
callq 0x350d0
movq %r12, %rdi
leaq 0x11b0b(%rip), %rsi     # 0x767f7
leaq 0xf(%rsp), %rdx
callq 0x35280
leaq 0x1d0(%rsp), %r13
leaq 0x60(%rsp), %rdi
movq %r12, %rsi
callq 0x358d0
movq %r12, %rdi
callq 0x35730
movq 0x10(%rbx), %rdx
movq %r13, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x359a0
testq %rax, %rax
je 0x64da7
leaq 0x58(%rsp), %rdi
movq %r13, %rsi
callq 0x355b0
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
andq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x35750
movq %r15, %rdi
leaq 0x30(%rsp), %rsi
callq 0x353a0
movq %r15, %rdi
leaq 0x38(%rsp), %rsi
callq 0x355f0
movq %r15, %rdi
leaq 0x40(%rsp), %rsi
callq 0x353a0
movq %r15, %rdi
leaq 0x44(%rsp), %rsi
callq 0x353a0
movq %r14, %rdi
movq %r12, %rsi
callq 0x64fd8
movq %r12, %rdi
callq 0x35730
jmp 0x64ca8
xorl %r13d, %r13d
jmp 0x64dd3
movq 0x30232(%rip), %rdi     # 0x94fe0
leaq 0x1102b(%rip), %rsi     # 0x75de0
callq 0x355b0
movq %rax, %rdi
callq 0x35300
movb $0x0, 0x18(%rbx)
xorl %r13d, %r13d
leaq 0x48(%rsp), %rdi
callq 0x35490
movl %r13d, %eax
addq $0x5d8, %rsp            # imm = 0x5D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x64dfd
jmp 0x64dfd
jmp 0x64dfd
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x64e0f
movq %rax, %rbx
jmp 0x64e0f
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35730
leaq 0x48(%rsp), %rdi
callq 0x35490
movq %rbx, %rdi
callq 0x35b50
movq %rax, %rdi
callq 0x3a198
nop