// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_sort.cpp
// Function: BamTools::SortTool::SortTool()
SortTool::SortTool(void)
    : AbstractTool()
    , m_settings(new SortSettings)
    , m_impl(0)
{
    // set program details
    Options::SetProgramInfo("bamtools sort", "sorts a BAM file", "[-in <filename>] [-out <filename>] [sortOptions]");

    // set up options
    OptionGroup* IO_Opts = Options::CreateOptionGroup("Input & Output");
    Options::AddValueOption("-in",  "BAM filename", "the input BAM file",  "",
                            m_settings->HasInputBamFilename,  m_settings->InputBamFilename,
                            IO_Opts, Options::StandardIn());
    Options::AddValueOption("-out", "BAM filename", "the output BAM file", "",
                            m_settings->HasOutputBamFilename, m_settings->OutputBamFilename,
                            IO_Opts, Options::StandardOut());

    OptionGroup* SortOpts = Options::CreateOptionGroup("Sorting Methods");
    Options::AddOption("-byname", "sort by alignment name", m_settings->IsSortingByName, SortOpts);

    OptionGroup* MemOpts = Options::CreateOptionGroup("Memory Settings");
    Options::AddValueOption("-n",   "count", "max number of alignments per tempfile", "",
                            m_settings->HasMaxBufferCount,  m_settings->MaxBufferCount,
                            MemOpts, SORT_DEFAULT_MAX_BUFFER_COUNT);
    Options::AddValueOption("-mem", "Mb", "max memory to use", "",
                            m_settings->HasMaxBufferMemory, m_settings->MaxBufferMemory,
                            MemOpts, SORT_DEFAULT_MAX_BUFFER_MEMORY);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
leaq 0x3faf8(%rip), %rax     # 0x94b58
movq %rax, (%rdi)
pushq $0x50
popq %rdi
callq 0x355d0
movq %rax, %r14
movq %rax, %rdi
callq 0x55876
movq %r14, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
leaq 0x1fae6(%rip), %rsi     # 0x74b6c
leaq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x35280
leaq 0x1fade(%rip), %rsi     # 0x74b7a
leaq 0x30(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0x35280
leaq 0x1fad9(%rip), %rsi     # 0x74b8b
leaq 0x50(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0x35280
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x65e80
leaq 0x50(%rsp), %rdi
callq 0x35730
leaq 0x30(%rsp), %rdi
callq 0x35730
leaq 0x10(%rsp), %rdi
callq 0x35730
leaq 0x1c421(%rip), %rsi     # 0x7151b
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x35280
leaq 0x10(%rsp), %rdi
callq 0x65402
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x35730
leaq 0x1c403(%rip), %rsi     # 0x7152a
leaq 0x10(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0x35280
leaq 0x1c3f1(%rip), %rsi     # 0x7152e
leaq 0x30(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0x35280
leaq 0x20631(%rip), %rsi     # 0x75784
leaq 0x50(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x35280
leaq 0x2168e(%rip), %rsi     # 0x767f7
leaq 0x70(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x35280
movq 0x8(%rbx), %r15
callq 0x65ebe
leaq 0x8(%r15), %r9
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x50(%rsp), %rdx
leaq 0x70(%rsp), %rcx
movq %r15, %r8
pushq %rax
pushq %r14
callq 0x3a7ac
popq %rax
popq %rcx
leaq 0x70(%rsp), %rdi
callq 0x35730
leaq 0x50(%rsp), %rdi
callq 0x35730
leaq 0x30(%rsp), %rdi
callq 0x35730
leaq 0x10(%rsp), %rdi
callq 0x35730
leaq 0x1c3ad(%rip), %rsi     # 0x71582
leaq 0x10(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0x35280
leaq 0x1c343(%rip), %rsi     # 0x7152e
leaq 0x30(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0x35280
leaq 0x1c386(%rip), %rsi     # 0x71587
leaq 0x50(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x35280
leaq 0x215e0(%rip), %rsi     # 0x767f7
leaq 0x70(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x35280
movq 0x8(%rbx), %r15
callq 0x65ec6
leaq 0x28(%r15), %r9
addq $0x3, %r15
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x50(%rsp), %rdx
leaq 0x70(%rsp), %rcx
movq %r15, %r8
pushq %rax
pushq %r14
callq 0x3a7ac
popq %rax
popq %rcx
leaq 0x70(%rsp), %rdi
callq 0x35730
leaq 0x50(%rsp), %rdi
callq 0x35730
leaq 0x30(%rsp), %rdi
callq 0x35730
leaq 0x10(%rsp), %rdi
callq 0x35730
leaq 0x1f935(%rip), %rsi     # 0x74bbc
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x35280
leaq 0x10(%rsp), %rdi
callq 0x65402
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x35730
leaq 0x1f918(%rip), %rsi     # 0x74bcc
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x35280
leaq 0x1f90a(%rip), %rsi     # 0x74bd4
leaq 0x30(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x35280
movq 0x8(%rbx), %rdx
addq $0x4, %rdx
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movq %r14, %rcx
callq 0x652e4
leaq 0x30(%rsp), %rdi
callq 0x35730
leaq 0x10(%rsp), %rdi
callq 0x35730
leaq 0x1f8dd(%rip), %rsi     # 0x74beb
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x35280
leaq 0x10(%rsp), %rdi
callq 0x65402
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x35730
leaq 0x1db8c(%rip), %rsi     # 0x72ec7
leaq 0x10(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0x35280
leaq 0x1c613(%rip), %rsi     # 0x71964
leaq 0x30(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0x35280
leaq 0x1f894(%rip), %rsi     # 0x74bfb
leaq 0x50(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x35280
leaq 0x2147a(%rip), %rsi     # 0x767f7
leaq 0x70(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x35280
movq 0x8(%rbx), %r9
leaq 0x1(%r9), %r8
addq $0x48, %r9
leaq 0x1f89d(%rip), %rax     # 0x74c3c
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x50(%rsp), %rdx
leaq 0x70(%rsp), %rcx
pushq %rax
pushq %r14
callq 0x4e10e
popq %rax
popq %rcx
leaq 0x70(%rsp), %rdi
callq 0x35730
leaq 0x50(%rsp), %rdi
callq 0x35730
leaq 0x30(%rsp), %rdi
callq 0x35730
leaq 0x10(%rsp), %rdi
callq 0x35730
leaq 0x1f835(%rip), %rsi     # 0x74c21
leaq 0x10(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0x35280
leaq 0x1f824(%rip), %rsi     # 0x74c26
leaq 0x30(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0x35280
leaq 0x1f811(%rip), %rsi     # 0x74c29
leaq 0x50(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x35280
leaq 0x213c9(%rip), %rsi     # 0x767f7
leaq 0x70(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x35280
movq 0x8(%rbx), %r9
leaq 0x2(%r9), %r8
addq $0x4c, %r9
leaq 0x1f7f0(%rip), %rax     # 0x74c40
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x50(%rsp), %rdx
leaq 0x70(%rsp), %rcx
pushq %rax
pushq %r14
callq 0x4e10e
popq %rax
popq %rcx
leaq 0x70(%rsp), %rdi
callq 0x35730
leaq 0x50(%rsp), %rdi
callq 0x35730
leaq 0x30(%rsp), %rdi
callq 0x35730
leaq 0x10(%rsp), %rdi
callq 0x35730
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x35730
jmp 0x55543
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x35730
jmp 0x55578
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x5563a
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x35730
jmp 0x555a8
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x5563a
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x5563a
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x35730
jmp 0x5564a
movq %rax, %rbx
movq %r14, %rdi
callq 0x35570
jmp 0x5563a
jmp 0x55637
movq %rax, %rbx
jmp 0x55557
movq %rax, %rbx
jmp 0x5554d
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x35730
leaq 0x30(%rsp), %rdi
callq 0x35730
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x5563a
jmp 0x55637
movq %rax, %rbx
jmp 0x5558c
movq %rax, %rbx
jmp 0x55582
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x35730
leaq 0x30(%rsp), %rdi
callq 0x35730
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x5563a
jmp 0x55637
jmp 0x55637
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x5563a
jmp 0x55637
movq %rax, %rbx
jmp 0x555e9
movq %rax, %rbx
jmp 0x555df
movq %rax, %rbx
jmp 0x555d5
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x35730
leaq 0x50(%rsp), %rdi
callq 0x35730
leaq 0x30(%rsp), %rdi
callq 0x35730
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x5563a
jmp 0x55637
jmp 0x55637
movq %rax, %rbx
jmp 0x55629
movq %rax, %rbx
jmp 0x5561f
movq %rax, %rbx
jmp 0x55615
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x35730
leaq 0x50(%rsp), %rdi
callq 0x35730
leaq 0x30(%rsp), %rdi
callq 0x35730
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x5563a
jmp 0x55637
movq %rax, %rbx
movq %rbx, %rdi
callq 0x35b50
movq %rax, %rbx
jmp 0x55654
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x35730
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x5563a
movq %rax, %rdi
callq 0x3a198