// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_filter.cpp
// Function: BamTools::FilterTool::FilterToolPrivate::GetScriptContents[abi:cxx11]()
const string FilterTool::FilterToolPrivate::GetScriptContents(void) {
  
    // open script for reading
    FILE* inFile = fopen(m_settings->ScriptFilename.c_str(), "rb");
    if ( !inFile ) {
        cerr << "bamtools filter ERROR: could not open script: "
             << m_settings->ScriptFilename << " for reading" << endl;
        return string();
    }
    
    // read in entire script contents  
    char buffer[1024];
    ostringstream docStream("");
    while ( true ) {
        
        // peek ahead, make sure there is data available
        char ch = fgetc(inFile);
        ungetc(ch, inFile);
        if( feof(inFile) )
            break;
        
        // read next block of data
        if ( fgets(buffer, 1024, inFile) == 0 ) {
            cerr << "bamtools filter ERROR: could not read script contents" << endl;
            return string();
        }
        
        docStream << buffer;
    }
    
    // close script file
    fclose(inFile);
    
    // import buffer contents to document, return
    return docStream.str();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x5a8, %rsp            # imm = 0x5A8
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%rsi), %rax
movq 0x80(%rax), %rdi
leaq 0x3ff87(%rip), %rsi     # 0x71cf1
callq 0x27660
testq %rax, %rax
je 0x31e1c
movq %rax, %r14
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x44a8c(%rip), %rdx     # 0x76817
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x2f1a0
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x10, %edx
callq 0x27820
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x31dbb
callq 0x27560
leaq 0x1a0(%rsp), %r15
leaq 0x28(%rsp), %r12
movq %r14, %rdi
callq 0x27950
movsbl %al, %edi
movq %r14, %rsi
callq 0x270e0
movq %r14, %rdi
callq 0x27900
testl %eax, %eax
jne 0x31ea4
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x27970
testq %rax, %rax
je 0x31ebb
movq %r15, %rdi
callq 0x272f0
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x276b0
jmp 0x31dc8
movq 0x5d1bd(%rip), %r14     # 0x8efe0
leaq 0x3feca(%rip), %rsi     # 0x71cf4
movl $0x2e, %edx
movq %r14, %rdi
callq 0x276b0
movq 0x18(%r15), %rax
movq 0x80(%rax), %rsi
movq 0x88(%rax), %rdx
movq %r14, %rdi
callq 0x276b0
movq %rax, %r14
leaq 0x43ea5(%rip), %rsi     # 0x75d00
movl $0xc, %edx
movq %rax, %rdi
callq 0x276b0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x27590
movsbl %al, %esi
movq %r14, %rdi
callq 0x27040
movq %rax, %rdi
callq 0x27410
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
jmp 0x31f1e
movq %r14, %rdi
callq 0x275b0
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x27990
jmp 0x31f14
movq 0x5d11e(%rip), %r14     # 0x8efe0
leaq 0x3fe5a(%rip), %rsi     # 0x71d23
movl $0x35, %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 0x5d0ec(%rip), %rdi     # 0x8efe0
callq 0x27040
movq %rax, %rdi
callq 0x27410
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
leaq 0x28(%rsp), %rdi
callq 0x27160
movq %rbx, %rax
addq $0x5a8, %rsp            # imm = 0x5A8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x31f4d
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x31f5a
callq 0x27560
jmp 0x31f5a
movq %rax, %rbx
jmp 0x31f5a
jmp 0x31f4d
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x27160
movq %rbx, %rdi
callq 0x27b10
movq %rax, %rdi
callq 0x2e1cd