// File: /workspace/github_cpp_makefile_star2_O1/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 0x63237
movq %rdi, %rbx
addq $0x20, %rdi
movq %rdi, 0x8(%rsp)
callq 0x6348c
leaq 0x48(%rsp), %r15
movq %r15, %rdi
callq 0x27440
leaq 0x20(%rsp), %r14
leaq 0x10(%rsp), %r13
movq 0x10(%rbx), %rdi
callq 0x27960
movl %eax, %ebp
shll $0x18, %eax
movl $0x3, %r12d
cmpl $0xa000000, %eax        # imm = 0xA000000
je 0x63224
movq 0x10(%rbx), %rdi
callq 0x27910
testl %eax, %eax
jne 0x63224
movsbl %bpl, %edi
movq 0x10(%rbx), %rsi
callq 0x270e0
movq %r14, 0x10(%rsp)
movq %r13, %rdi
leaq 0x1471c(%rip), %rdx     # 0x7781b
movq %rdx, %rsi
callq 0x2f1b2
leaq 0x60(%rsp), %rdi
movq %r13, %rsi
callq 0x278b0
leaq 0x1d0(%rsp), %r12
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x6312b
callq 0x27560
movq 0x10(%rbx), %rdx
movq %r12, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x27980
testq %rax, %rax
je 0x631d0
movq %r12, %rdi
callq 0x272f0
leaq 0x58(%rsp), %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x276c0
movq %r14, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x27740
movq %r15, %rdi
leaq 0x30(%rsp), %rsi
callq 0x273a0
movq %r15, %rdi
leaq 0x38(%rsp), %rsi
callq 0x275e0
movq %r15, %rdi
leaq 0x40(%rsp), %rsi
callq 0x273a0
movq %r15, %rdi
leaq 0x44(%rsp), %rsi
callq 0x273a0
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x634d2
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x631cb
callq 0x27560
xorl %r12d, %r12d
jmp 0x63224
movl $0x3c, %edx
movq 0x2ce04(%rip), %rdi     # 0x8ffe0
leaq 0x13c37(%rip), %rsi     # 0x76e1a
callq 0x276c0
movq 0x2cdf1(%rip), %rcx     # 0x8ffe0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x27590
movsbl %al, %esi
movq 0x2cdd3(%rip), %rdi     # 0x8ffe0
callq 0x27040
movq %rax, %rdi
callq 0x27410
movb $0x0, 0x18(%rbx)
movl $0x1, %r12d
testl %r12d, %r12d
je 0x630b3
cmpl $0x3, %r12d
jne 0x6323b
movb $0x1, %bl
jmp 0x6323d
xorl %ebx, %ebx
jmp 0x63247
xorl %ebx, %ebx
leaq 0x48(%rsp), %rdi
callq 0x27490
movl %ebx, %eax
addq $0x5d8, %rsp            # imm = 0x5D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x63264
jmp 0x6325f
movq %rax, %rbx
jmp 0x63276
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x63276
callq 0x27560
leaq 0x48(%rsp), %rdi
callq 0x27490
movq %rbx, %rdi
callq 0x27b20
movq %rax, %rdi
callq 0x2e1ed