// File: /workspace/github_cpp_makefile_star2_O3/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 0x62ca9
movq %rdi, %rbx
addq $0x20, %rdi
movq %rdi, 0x8(%rsp)
callq 0x62f50
leaq 0x48(%rsp), %rdi
callq 0x27440
movq 0x10(%rbx), %rdi
callq 0x27950
movl %eax, %r13d
shll $0x18, %r13d
movb $0x1, %bpl
cmpl $0xa000000, %r13d       # imm = 0xA000000
je 0x62cf9
leaq 0x20(%rsp), %r14
leaq 0x10(%rsp), %r12
leaq 0x1d0(%rsp), %r15
leaq 0x48(%rsp), %rbp
movq 0x10(%rbx), %rdi
callq 0x27900
testl %eax, %eax
jne 0x62ca4
sarl $0x18, %r13d
movq 0x10(%rbx), %rsi
movl %r13d, %edi
callq 0x270e0
movq %r14, 0x10(%rsp)
movq %r12, %rdi
leaq 0x13c54(%rip), %rdx     # 0x76817
movq %rdx, %rsi
callq 0x2f1a0
leaq 0x60(%rsp), %rdi
movq %r12, %rsi
callq 0x278a0
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x62be7
callq 0x27560
movq 0x10(%rbx), %rdx
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x27970
testq %rax, %rax
je 0x62cad
movq %r15, %rdi
callq 0x272f0
leaq 0x58(%rsp), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x276b0
movq %r14, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
movq %rbp, %rdi
movq %r12, %rsi
callq 0x27730
movq %rbp, %rdi
leaq 0x30(%rsp), %rsi
callq 0x273a0
movq %rbp, %rdi
leaq 0x38(%rsp), %rsi
callq 0x275e0
movq %rbp, %rdi
leaq 0x40(%rsp), %rsi
callq 0x273a0
movq %rbp, %rdi
leaq 0x44(%rsp), %rsi
callq 0x273a0
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x62f96
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x62c87
callq 0x27560
movq 0x10(%rbx), %rdi
callq 0x27950
movl %eax, %r13d
shll $0x18, %r13d
cmpl $0xa000000, %r13d       # imm = 0xA000000
jne 0x62b93
movb $0x1, %bpl
jmp 0x62cf9
xorl %ebp, %ebp
jmp 0x62d03
movq 0x2c32c(%rip), %r14     # 0x8efe0
leaq 0x1315f(%rip), %rsi     # 0x75e1a
movl $0x3c, %edx
movq %r14, %rdi
callq 0x276b0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x27590
movsbl %al, %esi
movq 0x2c2fa(%rip), %rdi     # 0x8efe0
callq 0x27040
movq %rax, %rdi
callq 0x27410
movb $0x0, 0x18(%rbx)
xorl %ebp, %ebp
leaq 0x48(%rsp), %rdi
callq 0x27490
movl %ebp, %eax
addq $0x5d8, %rsp            # imm = 0x5D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x62d1d
jmp 0x62d1d
jmp 0x62d22
movq %rax, %rbx
jmp 0x62d34
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x62d34
callq 0x27560
leaq 0x48(%rsp), %rdi
callq 0x27490
movq %rbx, %rdi
callq 0x27b10
movq %rax, %rdi
callq 0x2e1cd