// File: /workspace/github_cpp_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdi, %rbx
leaq 0x3a799(%rip), %rax     # 0x8eb98
movq %rax, (%rdi)
movl $0xd0, %edi
callq 0x275c0
movq %rax, %r14
movq %rax, %rdi
callq 0x5c6c4
movq %r14, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
leaq 0xe8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20a4e(%rip), %rsi     # 0x74e84
leaq 0x20a55(%rip), %rdx     # 0x74e92
leaq 0xd8(%rsp), %rdi
callq 0x2f1a0
leaq 0xc8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20a36(%rip), %rsi     # 0x74e93
leaq 0x20a90(%rip), %rdx     # 0x74ef4
leaq 0xb8(%rsp), %rdi
callq 0x2f1a0
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20a71(%rip), %rsi     # 0x74ef5
leaq 0x20ad9(%rip), %rdx     # 0x74f64
leaq 0x98(%rsp), %rdi
callq 0x2f1a0
leaq 0xd8(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0x64164
leaq 0x28(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1d04b(%rip), %rsi     # 0x71511
leaq 0x1d052(%rip), %rdx     # 0x7151f
leaq 0x18(%rsp), %rdi
callq 0x2f1a0
leaq 0x18(%rsp), %rdi
callq 0x634cc
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x544f3
callq 0x27560
leaq 0x18(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x1d01e(%rip), %rsi     # 0x71520
leaq 0x1d01a(%rip), %rdx     # 0x71523
callq 0x2f1a0
leaq 0x48(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x1d006(%rip), %rsi     # 0x71524
leaq 0x1d00b(%rip), %rdx     # 0x71530
leaq 0x38(%rsp), %rdi
callq 0x2f1a0
leaq 0x68(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2127f(%rip), %rsi     # 0x757be
leaq 0x2128a(%rip), %rdx     # 0x757d0
leaq 0x58(%rsp), %rdi
callq 0x2f1a0
leaq 0x88(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x222b4(%rip), %rdx     # 0x76817
leaq 0x78(%rsp), %rdi
movq %rdx, %rsi
callq 0x2f1a0
movq 0x8(%rbx), %r15
callq 0x641a2
leaq 0x70(%r15), %r9
movq %rax, 0x8(%rsp)
movq %r14, (%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x58(%rsp), %rdx
leaq 0x78(%rsp), %rcx
movq %r15, %r8
callq 0x2ebbe
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0x545b1
callq 0x27560
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %r15
cmpq %r15, %rdi
je 0x545c5
callq 0x27560
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x545d4
callq 0x27560
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x545e3
callq 0x27560
leaq 0x18(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x20973(%rip), %rsi     # 0x74f65
leaq 0x20976(%rip), %rdx     # 0x74f6f
callq 0x2f1a0
leaq 0x38(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x21d56(%rip), %rsi     # 0x76363
leaq 0x21d55(%rip), %rdx     # 0x76369
callq 0x2f1a0
leaq 0x58(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x20948(%rip), %rsi     # 0x74f70
leaq 0x209e0(%rip), %rdx     # 0x7500f
callq 0x2f1a0
leaq 0x78(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0x221d4(%rip), %rdx     # 0x76817
movq %rdx, %rsi
callq 0x2f1a0
movq 0x8(%rbx), %r9
leaq 0x2(%r9), %r8
addq $0x30, %r9
movq %r14, (%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x58(%rsp), %rdx
leaq 0x78(%rsp), %rcx
callq 0x2e8c0
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0x54683
callq 0x27560
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x54692
callq 0x27560
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x546a1
callq 0x27560
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x546b0
callq 0x27560
leaq 0x18(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x20951(%rip), %rsi     # 0x75010
leaq 0x20954(%rip), %rdx     # 0x7501a
callq 0x2f1a0
leaq 0x38(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x21c89(%rip), %rsi     # 0x76363
leaq 0x21c88(%rip), %rdx     # 0x76369
callq 0x2f1a0
leaq 0x58(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x20926(%rip), %rsi     # 0x7501b
leaq 0x209c1(%rip), %rdx     # 0x750bd
callq 0x2f1a0
leaq 0x78(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0x22107(%rip), %rdx     # 0x76817
movq %rdx, %rsi
callq 0x2f1a0
movq 0x8(%rbx), %r9
leaq 0x3(%r9), %r8
addq $0x50, %r9
movq %r14, (%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x58(%rsp), %rdx
leaq 0x78(%rsp), %rcx
callq 0x2e8c0
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0x54750
callq 0x27560
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x5475f
callq 0x27560
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x5476e
callq 0x27560
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x5477d
callq 0x27560
leaq 0x18(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x20932(%rip), %rsi     # 0x750be
leaq 0x20930(%rip), %rdx     # 0x750c3
callq 0x2f1a0
leaq 0x38(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x2091d(%rip), %rsi     # 0x750c4
leaq 0x20923(%rip), %rdx     # 0x750d1
callq 0x2f1a0
leaq 0x58(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x20910(%rip), %rsi     # 0x750d2
leaq 0x209c5(%rip), %rdx     # 0x7518e
callq 0x2f1a0
leaq 0x78(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0x2203a(%rip), %rdx     # 0x76817
movq %rdx, %rsi
callq 0x2f1a0
movq 0x8(%rbx), %r9
leaq 0x1(%r9), %r8
addq $0x10, %r9
movq %r14, (%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x58(%rsp), %rdx
leaq 0x78(%rsp), %rcx
callq 0x2e8c0
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5481d
callq 0x27560
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x5482c
callq 0x27560
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x5483b
callq 0x27560
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x5484a
callq 0x27560
leaq 0x18(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x20936(%rip), %rsi     # 0x7518f
leaq 0x2093c(%rip), %rdx     # 0x7519c
callq 0x2f1a0
leaq 0x38(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x21aef(%rip), %rsi     # 0x76363
leaq 0x21aee(%rip), %rdx     # 0x76369
callq 0x2f1a0
leaq 0x58(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x2090e(%rip), %rsi     # 0x7519d
leaq 0x20969(%rip), %rdx     # 0x751ff
callq 0x2f1a0
leaq 0x78(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0x21f6d(%rip), %rdx     # 0x76817
movq %rdx, %rsi
callq 0x2f1a0
movq 0x8(%rbx), %r9
leaq 0x4(%r9), %r8
addq $0xb0, %r9
movq %r14, (%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x58(%rsp), %rdx
leaq 0x78(%rsp), %rcx
callq 0x2e8c0
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0x548ed
callq 0x27560
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x548fc
callq 0x27560
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x5490b
callq 0x27560
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x5491a
callq 0x27560
leaq 0x18(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x208d7(%rip), %rsi     # 0x75200
leaq 0x208dd(%rip), %rdx     # 0x7520d
callq 0x2f1a0
leaq 0x18(%rsp), %rdi
callq 0x634cc
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x54951
callq 0x27560
leaq 0x18(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x208ae(%rip), %rsi     # 0x7520e
leaq 0x208ae(%rip), %rdx     # 0x75215
callq 0x2f1a0
leaq 0x38(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x2089b(%rip), %rsi     # 0x75216
leaq 0x208b4(%rip), %rdx     # 0x75236
callq 0x2f1a0
movq 0x8(%rbx), %rdx
addq $0x5, %rdx
leaq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rsi
movq %r14, %rcx
callq 0x632c4
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x549b0
callq 0x27560
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x549bf
callq 0x27560
leaq 0x18(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x20869(%rip), %rsi     # 0x75237
leaq 0x20869(%rip), %rdx     # 0x7523e
callq 0x2f1a0
leaq 0x38(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x20856(%rip), %rsi     # 0x7523f
leaq 0x20875(%rip), %rdx     # 0x75265
callq 0x2f1a0
movq 0x8(%rbx), %rdx
addq $0x6, %rdx
leaq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rsi
movq %r14, %rcx
callq 0x632c4
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x54a1e
callq 0x27560
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x54a2d
callq 0x27560
leaq 0x18(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x2082a(%rip), %rsi     # 0x75266
leaq 0x2082d(%rip), %rdx     # 0x75270
callq 0x2f1a0
leaq 0x38(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x2081a(%rip), %rsi     # 0x75271
leaq 0x20830(%rip), %rdx     # 0x7528e
callq 0x2f1a0
movq 0x8(%rbx), %rdx
addq $0x7, %rdx
leaq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rsi
movq %r14, %rcx
callq 0x632c4
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x54a8c
callq 0x27560
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x54a9b
callq 0x27560
leaq 0x18(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x1d813(%rip), %rsi     # 0x722bd
leaq 0x1d810(%rip), %rdx     # 0x722c1
callq 0x2f1a0
leaq 0x38(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x207ca(%rip), %rsi     # 0x7528f
leaq 0x207cb(%rip), %rdx     # 0x75297
callq 0x2f1a0
leaq 0x58(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x207b8(%rip), %rsi     # 0x75298
leaq 0x20834(%rip), %rdx     # 0x7531b
callq 0x2f1a0
leaq 0x78(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0x21d1c(%rip), %rdx     # 0x76817
movq %rdx, %rsi
callq 0x2f1a0
movq 0x8(%rbx), %r9
leaq 0x8(%r9), %r8
addq $0x90, %r9
movq %r14, (%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x58(%rsp), %rdx
leaq 0x78(%rsp), %rcx
callq 0x2e8c0
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0x54b3e
callq 0x27560
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
leaq 0xe8(%rsp), %rbx
leaq 0xc8(%rsp), %r14
leaq 0xa8(%rsp), %r15
je 0x54b65
callq 0x27560
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x54b74
callq 0x27560
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x54b83
callq 0x27560
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x54b95
callq 0x27560
movq 0xb8(%rsp), %rdi
cmpq %r14, %rdi
je 0x54ba7
callq 0x27560
movq 0xd8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x54bb9
callq 0x27560
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x54c50
jmp 0x54c16
jmp 0x54c1b
jmp 0x54c24
jmp 0x54c2b
jmp 0x54c1b
jmp 0x54c24
jmp 0x54c2b
jmp 0x54c1b
jmp 0x54c24
jmp 0x54c2b
jmp 0x54c1b
jmp 0x54c24
jmp 0x54c2b
jmp 0x54c24
jmp 0x54c2b
jmp 0x54c50
jmp 0x54c16
jmp 0x54c1b
jmp 0x54c24
jmp 0x54c2b
jmp 0x54c50
jmp 0x54c16
jmp 0x54c1b
jmp 0x54c24
jmp 0x54c2b
jmp 0x54c50
jmp 0x54c16
jmp 0x54c1b
jmp 0x54c24
jmp 0x54c2b
jmp 0x54c50
jmp 0x54c16
jmp 0x54c1b
jmp 0x54c24
jmp 0x54c2b
movq %rax, %rbx
jmp 0x54c62
movq %rax, %rbx
jmp 0x54c76
jmp 0x54c24
jmp 0x54c2b
movq %rax, %rbx
jmp 0x54c85
jmp 0x54c2b
movq %rax, %rbx
jmp 0x54c94
movq %rax, %rbx
jmp 0x54cae
movq %rax, %rbx
jmp 0x54cc8
movq %rax, %rbx
jmp 0x54ce2
movq %rax, %rbx
movq %r14, %rdi
jmp 0x54cdd
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0x54c62
callq 0x27560
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x54c76
callq 0x27560
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x54c85
callq 0x27560
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x54c94
callq 0x27560
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x54cae
callq 0x27560
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x54cc8
callq 0x27560
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x54ce2
callq 0x27560
movq %rbx, %rdi
callq 0x27b10