// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_split.cpp
// Function: BamTools::SplitTool::SplitTool()
SplitTool::SplitTool(void)
    : AbstractTool()
    , m_settings(new SplitSettings)
    , m_impl(0)
{
    // set program details
    const string name = "bamtools split";
    const string description = "splits a BAM file on user-specified property, creating a new BAM output file for each value found";
    const string args = "[-in <filename>] [-stub <filename stub>] < -mapped | -paired | -reference [-refPrefix <prefix>] | -tag <TAG> > ";
    Options::SetProgramInfo(name, description, args);
    
    // set up options 
    OptionGroup* IO_Opts = Options::CreateOptionGroup("Input & Output");
    Options::AddValueOption("-in",   "BAM filename",  "the input BAM file",  "",
                            m_settings->HasInputFilename,  m_settings->InputFilename,  IO_Opts, Options::StandardIn());
    Options::AddValueOption("-refPrefix", "string", "custom prefix for splitting by references. Currently files end with REF_<refName>.bam. This option allows you to replace \"REF_\" with a prefix of your choosing.", "",
                            m_settings->HasCustomRefPrefix, m_settings->CustomRefPrefix, IO_Opts);
    Options::AddValueOption("-tagPrefix", "string", "custom prefix for splitting by tags. Current files end with TAG_<tagname>_<tagvalue>.bam. This option allows you to replace \"TAG_\" with a prefix of your choosing.", "",
                            m_settings->HasCustomTagPrefix, m_settings->CustomTagPrefix, IO_Opts);
    Options::AddValueOption("-stub", "filename stub", "prefix stub for output BAM files (default behavior is to use input filename, without .bam extension, as stub). If input is stdin and no stub provided, a timestamp is generated as the stub.", "",
                            m_settings->HasCustomOutputStub, m_settings->CustomOutputStub, IO_Opts);
    Options::AddValueOption("-tagListDelim", "string", "delimiter used to separate values in the filenames generated from splitting on list-type tags [--]", "",
                            m_settings->HasListTagDelimiter, m_settings->ListTagDelimiter, IO_Opts);
    
    OptionGroup* SplitOpts = Options::CreateOptionGroup("Split Options");
    Options::AddOption("-mapped",    "split mapped/unmapped alignments",       m_settings->IsSplittingMapped,    SplitOpts);
    Options::AddOption("-paired",    "split single-end/paired-end alignments", m_settings->IsSplittingPaired,    SplitOpts);
    Options::AddOption("-reference", "split alignments by reference",          m_settings->IsSplittingReference, SplitOpts);
    Options::AddValueOption("-tag", "tag name", "splits alignments based on all values of TAG encountered (i.e. -tag RG creates a BAM file for each read group in original BAM file)", "", 
                            m_settings->IsSplittingTag, m_settings->TagToSplit, SplitOpts);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, %rbx
leaq 0x3c0be(%rip), %rax     # 0x94ba0
movq %rax, (%rdi)
movl $0xd0, %edi
callq 0x355d0
movq %rax, %r14
movq %rax, %rdi
callq 0x5f02a
movq %r14, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
leaq 0x1c34a(%rip), %rsi     # 0x74e54
leaq 0xe0(%rsp), %rdi
leaq 0xc0(%rsp), %rdx
callq 0x35280
leaq 0x1c33d(%rip), %rsi     # 0x74e63
leaq 0xc0(%rsp), %rdi
leaq 0xa0(%rsp), %rdx
callq 0x35280
leaq 0x1c383(%rip), %rsi     # 0x74ec5
leaq 0xa0(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x35280
leaq 0xe0(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
callq 0x65e80
leaq 0x189a3(%rip), %rsi     # 0x7151b
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x35280
leaq 0x20(%rsp), %rdi
callq 0x65402
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x35730
leaq 0x18985(%rip), %rsi     # 0x7152a
leaq 0x20(%rsp), %rdi
leaq 0x1f(%rsp), %rdx
callq 0x35280
leaq 0x18973(%rip), %rsi     # 0x7152e
leaq 0x40(%rsp), %rdi
leaq 0x1e(%rsp), %rdx
callq 0x35280
leaq 0x1cbb3(%rip), %rsi     # 0x75784
leaq 0x80(%rsp), %rdi
leaq 0x1d(%rsp), %rdx
callq 0x35280
leaq 0x1dc0d(%rip), %rsi     # 0x767f7
leaq 0x60(%rsp), %rdi
leaq 0x1c(%rsp), %rdx
callq 0x35280
movq 0x8(%rbx), %r15
callq 0x65ebe
leaq 0x70(%r15), %r9
movq %rax, 0x8(%rsp)
movq %r14, (%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x80(%rsp), %rdx
leaq 0x60(%rsp), %rcx
movq %r15, %r8
callq 0x3a7ac
leaq 0x60(%rsp), %rdi
callq 0x35730
leaq 0x80(%rsp), %rdi
callq 0x35730
leaq 0x40(%rsp), %rdi
callq 0x35730
leaq 0x20(%rsp), %rdi
callq 0x35730
leaq 0x1c2d5(%rip), %rsi     # 0x74f35
leaq 0x20(%rsp), %rdi
leaq 0x1f(%rsp), %rdx
callq 0x35280
leaq 0x1d69d(%rip), %rsi     # 0x76313
leaq 0x40(%rsp), %rdi
leaq 0x1e(%rsp), %rdx
callq 0x35280
leaq 0x1c2b4(%rip), %rsi     # 0x74f40
leaq 0x80(%rsp), %rdi
leaq 0x1d(%rsp), %rdx
callq 0x35280
leaq 0x1db52(%rip), %rsi     # 0x767f7
leaq 0x60(%rsp), %rdi
leaq 0x1c(%rsp), %rdx
callq 0x35280
movq 0x8(%rbx), %r9
leaq 0x2(%r9), %r8
addq $0x30, %r9
movq %r14, (%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x80(%rsp), %rdx
leaq 0x60(%rsp), %rcx
callq 0x3a5fe
leaq 0x60(%rsp), %rdi
callq 0x35730
leaq 0x80(%rsp), %rdi
callq 0x35730
leaq 0x40(%rsp), %rdi
callq 0x35730
leaq 0x20(%rsp), %rdi
callq 0x35730
leaq 0x1c2ce(%rip), %rsi     # 0x74fe0
leaq 0x20(%rsp), %rdi
leaq 0x1f(%rsp), %rdx
callq 0x35280
leaq 0x1d5eb(%rip), %rsi     # 0x76313
leaq 0x40(%rsp), %rdi
leaq 0x1e(%rsp), %rdx
callq 0x35280
leaq 0x1c2ad(%rip), %rsi     # 0x74feb
leaq 0x80(%rsp), %rdi
leaq 0x1d(%rsp), %rdx
callq 0x35280
leaq 0x1daa0(%rip), %rsi     # 0x767f7
leaq 0x60(%rsp), %rdi
leaq 0x1c(%rsp), %rdx
callq 0x35280
movq 0x8(%rbx), %r9
leaq 0x3(%r9), %r8
addq $0x50, %r9
movq %r14, (%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x80(%rsp), %rdx
leaq 0x60(%rsp), %rcx
callq 0x3a5fe
leaq 0x60(%rsp), %rdi
callq 0x35730
leaq 0x80(%rsp), %rdi
callq 0x35730
leaq 0x40(%rsp), %rdi
callq 0x35730
leaq 0x20(%rsp), %rdi
callq 0x35730
leaq 0x1c2ca(%rip), %rsi     # 0x7508e
leaq 0x20(%rsp), %rdi
leaq 0x1f(%rsp), %rdx
callq 0x35280
leaq 0x1c2ba(%rip), %rsi     # 0x75094
leaq 0x40(%rsp), %rdi
leaq 0x1e(%rsp), %rdx
callq 0x35280
leaq 0x1c2b2(%rip), %rsi     # 0x750a2
leaq 0x80(%rsp), %rdi
leaq 0x1d(%rsp), %rdx
callq 0x35280
leaq 0x1d9ee(%rip), %rsi     # 0x767f7
leaq 0x60(%rsp), %rdi
leaq 0x1c(%rsp), %rdx
callq 0x35280
movq 0x8(%rbx), %r9
leaq 0x1(%r9), %r8
addq $0x10, %r9
movq %r14, (%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x80(%rsp), %rdx
leaq 0x60(%rsp), %rcx
callq 0x3a5fe
leaq 0x60(%rsp), %rdi
callq 0x35730
leaq 0x80(%rsp), %rdi
callq 0x35730
leaq 0x40(%rsp), %rdi
callq 0x35730
leaq 0x20(%rsp), %rdi
callq 0x35730
leaq 0x1c2e9(%rip), %rsi     # 0x7515f
leaq 0x20(%rsp), %rdi
leaq 0x1f(%rsp), %rdx
callq 0x35280
leaq 0x1d487(%rip), %rsi     # 0x76313
leaq 0x40(%rsp), %rdi
leaq 0x1e(%rsp), %rdx
callq 0x35280
leaq 0x1c2cb(%rip), %rsi     # 0x7516d
leaq 0x80(%rsp), %rdi
leaq 0x1d(%rsp), %rdx
callq 0x35280
leaq 0x1d93c(%rip), %rsi     # 0x767f7
leaq 0x60(%rsp), %rdi
leaq 0x1c(%rsp), %rdx
callq 0x35280
movq 0x8(%rbx), %r9
leaq 0x4(%r9), %r8
addq $0xb0, %r9
movq %r14, (%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x80(%rsp), %rdx
leaq 0x60(%rsp), %rcx
callq 0x3a5fe
leaq 0x60(%rsp), %rdi
callq 0x35730
leaq 0x80(%rsp), %rdi
callq 0x35730
leaq 0x40(%rsp), %rdi
callq 0x35730
leaq 0x20(%rsp), %rdi
callq 0x35730
leaq 0x1c2a5(%rip), %rsi     # 0x751d0
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x35280
leaq 0x20(%rsp), %rdi
callq 0x65402
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x35730
leaq 0x1c286(%rip), %rsi     # 0x751de
leaq 0x20(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x35280
leaq 0x1c275(%rip), %rsi     # 0x751e6
leaq 0x40(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x35280
movq 0x8(%rbx), %rdx
addq $0x5, %rdx
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %r14, %rcx
callq 0x652e4
leaq 0x40(%rsp), %rdi
callq 0x35730
leaq 0x20(%rsp), %rdi
callq 0x35730
leaq 0x1c252(%rip), %rsi     # 0x75207
leaq 0x20(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x35280
leaq 0x1c241(%rip), %rsi     # 0x7520f
leaq 0x40(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x35280
movq 0x8(%rbx), %rdx
addq $0x6, %rdx
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %r14, %rcx
callq 0x652e4
leaq 0x40(%rsp), %rdi
callq 0x35730
leaq 0x20(%rsp), %rdi
callq 0x35730
leaq 0x1c224(%rip), %rsi     # 0x75236
leaq 0x20(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x35280
leaq 0x1c216(%rip), %rsi     # 0x75241
leaq 0x40(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x35280
movq 0x8(%rbx), %rdx
addq $0x7, %rdx
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %r14, %rcx
callq 0x652e4
leaq 0x40(%rsp), %rdi
callq 0x35730
leaq 0x20(%rsp), %rdi
callq 0x35730
leaq 0x191db(%rip), %rsi     # 0x7224a
leaq 0x20(%rsp), %rdi
leaq 0x1f(%rsp), %rdx
callq 0x35280
leaq 0x1c1da(%rip), %rsi     # 0x7525f
leaq 0x40(%rsp), %rdi
leaq 0x1e(%rsp), %rdx
callq 0x35280
leaq 0x1c1cd(%rip), %rsi     # 0x75268
leaq 0x80(%rsp), %rdi
leaq 0x1d(%rsp), %rdx
callq 0x35280
leaq 0x1d743(%rip), %rsi     # 0x767f7
leaq 0x60(%rsp), %rdi
leaq 0x1c(%rsp), %rdx
callq 0x35280
movq 0x8(%rbx), %r9
leaq 0x8(%r9), %r8
addq $0x90, %r9
movq %r14, (%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x80(%rsp), %rdx
leaq 0x60(%rsp), %rcx
callq 0x3a5fe
leaq 0x60(%rsp), %rdi
callq 0x35730
leaq 0x80(%rsp), %rdi
callq 0x35730
leaq 0x40(%rsp), %rdi
callq 0x35730
leaq 0x20(%rsp), %rdi
callq 0x35730
leaq 0xa0(%rsp), %rdi
callq 0x35730
leaq 0xc0(%rsp), %rdi
callq 0x35730
leaq 0xe0(%rsp), %rdi
callq 0x35730
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq
jmp 0x59229
jmp 0x59221
jmp 0x59219
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x35730
jmp 0x59253
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x35730
jmp 0x59281
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x35730
jmp 0x59298
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x35730
jmp 0x592af
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x35730
jmp 0x593de
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x35730
jmp 0x592d0
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x35730
jmp 0x5930d
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x35730
jmp 0x59345
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x35730
jmp 0x59377
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x35730
jmp 0x593de
jmp 0x593db
movq %rax, %rbx
jmp 0x593eb
movq %rax, %rbx
jmp 0x593f8
movq %rax, %rbx
jmp 0x59405
movq %rax, %rbx
movq %r14, %rdi
callq 0x35570
jmp 0x59405
jmp 0x593db
movq %rax, %rbx
jmp 0x5926a
movq %rax, %rbx
jmp 0x59260
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x35730
leaq 0x40(%rsp), %rdi
callq 0x35730
leaq 0x20(%rsp), %rdi
callq 0x35730
jmp 0x593de
jmp 0x593db
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x35730
jmp 0x593de
jmp 0x593db
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x35730
jmp 0x593de
jmp 0x593db
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x35730
jmp 0x593de
jmp 0x593db
movq %rax, %rbx
jmp 0x592e7
movq %rax, %rbx
jmp 0x592dd
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x35730
leaq 0x40(%rsp), %rdi
callq 0x35730
leaq 0x20(%rsp), %rdi
callq 0x35730
jmp 0x593de
jmp 0x593db
jmp 0x593db
movq %rax, %rbx
jmp 0x59324
movq %rax, %rbx
jmp 0x5931a
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x35730
leaq 0x40(%rsp), %rdi
callq 0x35730
leaq 0x20(%rsp), %rdi
callq 0x35730
jmp 0x593de
jmp 0x593db
movq %rax, %rbx
jmp 0x5935c
movq %rax, %rbx
jmp 0x59352
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x35730
leaq 0x40(%rsp), %rdi
callq 0x35730
leaq 0x20(%rsp), %rdi
callq 0x35730
jmp 0x593de
jmp 0x593db
movq %rax, %rbx
jmp 0x5938e
movq %rax, %rbx
jmp 0x59384
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x35730
leaq 0x40(%rsp), %rdi
callq 0x35730
leaq 0x20(%rsp), %rdi
callq 0x35730
jmp 0x593de
jmp 0x593db
movq %rax, %rbx
jmp 0x593cf
movq %rax, %rbx
jmp 0x593c5
movq %rax, %rbx
jmp 0x593b8
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x35730
leaq 0x80(%rsp), %rdi
callq 0x35730
leaq 0x40(%rsp), %rdi
callq 0x35730
leaq 0x20(%rsp), %rdi
callq 0x35730
jmp 0x593de
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x35730
leaq 0xc0(%rsp), %rdi
callq 0x35730
leaq 0xe0(%rsp), %rdi
callq 0x35730
movq %rbx, %rdi
callq 0x35b50
movq %rax, %rdi
callq 0x3a198
nop