// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_header.cpp
// Function: BamTools::HeaderTool::HeaderToolPrivate::Run()
bool HeaderTool::HeaderToolPrivate::Run(void) {

    // set to default input if none provided
    if ( !m_settings->HasInput && !m_settings->HasInputFilelist )
        m_settings->InputFiles.push_back(Options::StandardIn());

    // add files in the filelist to the input file list
    if ( m_settings->HasInputFilelist ) {

        ifstream filelist(m_settings->InputFilelist.c_str(), ios::in);
        if ( !filelist.is_open() ) {
            cerr << "bamtools header ERROR: could not open input BAM file list... Aborting." << endl;
            return false;
        }

        string line;
        while ( getline(filelist, line) )
            m_settings->InputFiles.push_back(line);
    }

    // attemp to open BAM files
    BamMultiReader reader;
    if ( !reader.Open(m_settings->InputFiles) ) {
        cerr << "bamtools header ERROR: could not open BAM file(s) for reading... Aborting." << endl;
        return false;
    }

    // dump (merged) header contents to stdout
    cout << reader.GetHeaderText() << endl;

    // clean up & exit
    reader.Close();
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x230, %rsp            # imm = 0x230
movq %rdi, %rbx
movq (%rdi), %r14
cmpb $0x0, (%r14)
jne 0x42e5e
cmpb $0x0, 0x1(%r14)
jne 0x42e5e
addq $0x8, %r14
callq 0x646e2
movq %r14, %rdi
movq %rax, %rsi
callq 0x2e1b0
movq (%rbx), %rax
cmpb $0x1, 0x1(%rax)
jne 0x42f5e
movq 0x20(%rax), %rsi
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x27ba0
leaq 0xa0(%rsp), %rdi
callq 0x27130
movl %eax, %ebp
testb %al, %al
je 0x42ef4
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x8(%rsp), %r15
movq 0x28(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x27590
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x27bb0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x42f3c
movq (%rbx), %rdi
addq $0x8, %rdi
movq %r15, %rsi
callq 0x2e1b0
jmp 0x42eb1
movq 0x4d0e5(%rip), %r14     # 0x8ffe0
leaq 0x308fb(%rip), %rsi     # 0x737fd
movl $0x46, %edx
movq %r14, %rdi
callq 0x276c0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x27590
movsbl %al, %esi
movq 0x4d0b3(%rip), %rdi     # 0x8ffe0
callq 0x27040
movq %rax, %rdi
callq 0x27410
jmp 0x42f4b
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x42f4b
callq 0x27560
leaq 0x28(%rsp), %rdi
callq 0x27170
testb %bpl, %bpl
je 0x43040
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x27b40
movq (%rbx), %rsi
addq $0x8, %rsi
movq %r14, %rdi
callq 0x273c0
movl %eax, %ebx
testb %al, %al
je 0x42fee
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x274d0
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x4cff0(%rip), %rdi     # 0x8ff90
callq 0x276c0
movq %rax, %r14
movq (%rax), %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 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x42fe2
callq 0x27560
leaq 0x8(%rsp), %rdi
callq 0x27190
jmp 0x43034
movq 0x4cfeb(%rip), %r14     # 0x8ffe0
leaq 0x30848(%rip), %rsi     # 0x73844
movl $0x4a, %edx
movq %r14, %rdi
callq 0x276c0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x27590
movsbl %al, %esi
movq 0x4cfb9(%rip), %rdi     # 0x8ffe0
callq 0x27040
movq %rax, %rdi
callq 0x27410
leaq 0x8(%rsp), %rdi
callq 0x27110
jmp 0x43042
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x230, %rsp            # imm = 0x230
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x43073
movq %rax, %rbx
jmp 0x43094
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x43076
callq 0x27560
jmp 0x43076
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x27110
jmp 0x4309e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x43094
callq 0x27560
leaq 0x28(%rsp), %rdi
callq 0x27170
movq %rbx, %rdi
callq 0x27b20
movq %rax, %rdi
callq 0x2e1ed