// File: zeeev[P]DASVC/bamtools/src/utils/bamtools_fasta.cpp
// Function: BamTools::Fasta::FastaPrivate::GetNextHeader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool Fasta::FastaPrivate::GetNextHeader(string& header) {
  
    // validate input stream
    if ( !IsOpen || feof(Stream) ) 
        return false;
    
    // read in header line
    char buffer[1024];
    if ( fgets(buffer, 1024, Stream) == 0 ) {
        cerr << "FASTA error : could not read from file" << endl;
        return false;
    }
    
    // make sure it's a FASTA header
    if ( buffer[0] != '>' ) { 
        cerr << "FASTA error : expected header ('>'), instead : " << buffer[0] << endl;
        return false;
    }
  
    // import buffer contents to header string
    stringstream headerBuffer("");
    headerBuffer << buffer;
    header = headerBuffer.str();
  
    // return success
    return true;
}

// Assembly:
subq $0x618, %rsp            # imm = 0x618
movq %rdi, 0x608(%rsp)
movq %rsi, 0x600(%rsp)
movq 0x608(%rsp), %rax
movq %rax, 0x18(%rsp)
testb $0x1, 0x8(%rax)
je 0x10a4ac
movq 0x18(%rsp), %rax
movq (%rax), %rdi
callq 0x86b10
cmpl $0x0, %eax
je 0x10a4b9
movb $0x0, 0x617(%rsp)
jmp 0x10a689
movq 0x18(%rsp), %rax
leaq 0x200(%rsp), %rdi
movq (%rax), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x86ba0
cmpq $0x0, %rax
jne 0x10a508
movq 0x5ab00(%rip), %rdi     # 0x164fe0
leaq 0x2988e(%rip), %rsi     # 0x133d75
callq 0x86700
movq %rax, %rdi
movq 0x5aa7a(%rip), %rsi     # 0x164f70
callq 0x86770
movb $0x0, 0x617(%rsp)
jmp 0x10a689
movsbl 0x200(%rsp), %eax
cmpl $0x3e, %eax
je 0x10a554
movq 0x5aac4(%rip), %rdi     # 0x164fe0
leaq 0x29879(%rip), %rsi     # 0x133d9c
callq 0x86700
movq %rax, %rdi
movsbl 0x200(%rsp), %esi
callq 0x86890
movq %rax, %rdi
movq 0x5aa2e(%rip), %rsi     # 0x164f70
callq 0x86770
movb $0x0, 0x617(%rsp)
jmp 0x10a689
leaq 0x57(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x86da0
movq 0x10(%rsp), %rdx
leaq 0x2a704(%rip), %rsi     # 0x134c73
leaq 0x58(%rsp), %rdi
callq 0x86a00
jmp 0x10a57b
movl $0x10, %edi
movl $0x8, %esi
callq 0x928c0
movl %eax, 0xc(%rsp)
jmp 0x10a590
movl 0xc(%rsp), %edx
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x86be0
jmp 0x10a5a5
leaq 0x58(%rsp), %rdi
callq 0x86f68
jmp 0x10a5b1
leaq 0x57(%rsp), %rdi
callq 0x867b0
leaq 0x88(%rsp), %rdi
leaq 0x200(%rsp), %rsi
callq 0x86700
jmp 0x10a5d2
leaq 0x20(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x866f0
jmp 0x10a5e3
movq 0x600(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x86070
jmp 0x10a5f7
leaq 0x20(%rsp), %rdi
callq 0x86f68
jmp 0x10a603
movb $0x1, 0x617(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x86580
jmp 0x10a689
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0x10a643
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x86f68
jmp 0x10a641
jmp 0x10a643
leaq 0x57(%rsp), %rdi
callq 0x867b0
jmp 0x10a69a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0x10a67b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x86f68
jmp 0x10a679
jmp 0x10a67b
leaq 0x78(%rsp), %rdi
callq 0x86580
jmp 0x10a687
jmp 0x10a69a
movb 0x617(%rsp), %al
andb $0x1, %al
addq $0x618, %rsp            # imm = 0x618
retq
movq 0x48(%rsp), %rdi
callq 0x86d80
movq %rax, %rdi
callq 0x91290
nopl (%rax)