// File: /workspace/github_cpp_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x40469(%rip), %rax     # 0x8eb50
movq %rax, (%rdi)
movl $0x50, %edi
callq 0x275c0
movq %rax, %r14
movq %rax, %rdi
callq 0x4f10a
movq %r14, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x2647f(%rip), %rsi     # 0x74b9b
leaq 0x26485(%rip), %rdx     # 0x74ba8
leaq 0x8(%rsp), %rdi
callq 0x2f1a0
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x2646c(%rip), %rsi     # 0x74ba9
leaq 0x26475(%rip), %rdx     # 0x74bb9
leaq 0x48(%rsp), %rdi
callq 0x2f1a0
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2645c(%rip), %rsi     # 0x74bba
leaq 0x26485(%rip), %rdx     # 0x74bea
leaq 0x28(%rsp), %rdi
callq 0x2f1a0
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x64164
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x4e792
callq 0x27560
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x4e7a1
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4e7b0
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x22d52(%rip), %rsi     # 0x71511
leaq 0x22d59(%rip), %rdx     # 0x7151f
callq 0x2f1a0
leaq 0x8(%rsp), %rdi
callq 0x634cc
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4e7e7
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x22d2a(%rip), %rsi     # 0x71520
leaq 0x22d26(%rip), %rdx     # 0x71523
callq 0x2f1a0
leaq 0x48(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x22d13(%rip), %rsi     # 0x71524
leaq 0x22d18(%rip), %rdx     # 0x71530
callq 0x2f1a0
leaq 0x28(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x26f92(%rip), %rsi     # 0x757be
leaq 0x26f9d(%rip), %rdx     # 0x757d0
callq 0x2f1a0
leaq 0x78(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x27fcf(%rip), %rdx     # 0x76817
leaq 0x68(%rsp), %rdi
movq %rdx, %rsi
callq 0x2f1a0
movq 0x8(%rbx), %r15
callq 0x641a2
leaq 0x8(%r15), %r9
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movq %r15, %r8
pushq %rax
pushq %r14
callq 0x2ebbe
addq $0x10, %rsp
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4e894
callq 0x27560
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %r15
cmpq %r15, %rdi
je 0x4e8a8
callq 0x27560
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x4e8b7
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4e8c6
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x22ca3(%rip), %rsi     # 0x71578
leaq 0x22ca0(%rip), %rdx     # 0x7157c
callq 0x2f1a0
leaq 0x48(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x22c34(%rip), %rsi     # 0x71524
leaq 0x22c39(%rip), %rdx     # 0x71530
callq 0x2f1a0
leaq 0x28(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x22c72(%rip), %rsi     # 0x7157d
leaq 0x22c7e(%rip), %rdx     # 0x71590
callq 0x2f1a0
leaq 0x68(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0x27ef1(%rip), %rdx     # 0x76817
movq %rdx, %rsi
callq 0x2f1a0
movq 0x8(%rbx), %r15
callq 0x641aa
leaq 0x28(%r15), %r9
addq $0x3, %r15
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movq %r15, %r8
pushq %rax
pushq %r14
callq 0x2ebbe
addq $0x10, %rsp
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4e971
callq 0x27560
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %r15
cmpq %r15, %rdi
je 0x4e985
callq 0x27560
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x4e994
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4e9a3
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x26239(%rip), %rsi     # 0x74beb
leaq 0x26241(%rip), %rdx     # 0x74bfa
callq 0x2f1a0
leaq 0x8(%rsp), %rdi
callq 0x634cc
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4e9da
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x26212(%rip), %rsi     # 0x74bfb
leaq 0x26212(%rip), %rdx     # 0x74c02
callq 0x2f1a0
leaq 0x48(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x261ff(%rip), %rsi     # 0x74c03
leaq 0x2620e(%rip), %rdx     # 0x74c19
callq 0x2f1a0
movq 0x8(%rbx), %rdx
addq $0x4, %rdx
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movq %r14, %rcx
callq 0x632c4
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x4ea39
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4ea48
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x261c3(%rip), %rsi     # 0x74c1a
leaq 0x261cb(%rip), %rdx     # 0x74c29
callq 0x2f1a0
leaq 0x8(%rsp), %rdi
callq 0x634cc
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4ea7f
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x244c1(%rip), %rsi     # 0x72f4f
leaq 0x244bc(%rip), %rdx     # 0x72f51
callq 0x2f1a0
leaq 0x48(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x22f1f(%rip), %rsi     # 0x719c8
leaq 0x22f1d(%rip), %rdx     # 0x719cd
callq 0x2f1a0
leaq 0x28(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x26166(%rip), %rsi     # 0x74c2a
leaq 0x26184(%rip), %rdx     # 0x74c4f
callq 0x2f1a0
leaq 0x68(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0x27d38(%rip), %rdx     # 0x76817
movq %rdx, %rsi
callq 0x2f1a0
movq 0x8(%rbx), %r9
leaq 0x1(%r9), %r8
addq $0x48, %r9
leaq 0x26172(%rip), %rax     # 0x74c6c
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x68(%rsp), %rcx
pushq %rax
pushq %r14
callq 0x45ce8
addq $0x10, %rsp
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4eb29
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x4eb38
callq 0x27560
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x4eb47
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4eb56
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x260eb(%rip), %rsi     # 0x74c50
leaq 0x260e8(%rip), %rdx     # 0x74c54
callq 0x2f1a0
leaq 0x48(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x260d5(%rip), %rsi     # 0x74c55
leaq 0x260d0(%rip), %rdx     # 0x74c57
callq 0x2f1a0
leaq 0x28(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x260bd(%rip), %rsi     # 0x74c58
leaq 0x260c7(%rip), %rdx     # 0x74c69
callq 0x2f1a0
leaq 0x68(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0x27c61(%rip), %rdx     # 0x76817
movq %rdx, %rsi
callq 0x2f1a0
movq 0x8(%rbx), %r9
leaq 0x2(%r9), %r8
addq $0x4c, %r9
leaq 0x2609f(%rip), %rax     # 0x74c70
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x68(%rsp), %rcx
pushq %rax
pushq %r14
callq 0x45ce8
addq $0x10, %rsp
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4ec00
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x4ec0f
callq 0x27560
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x4ec1e
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4ec2d
callq 0x27560
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4ec56
callq 0x27560
jmp 0x4ec56
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x4ec6f
callq 0x27560
jmp 0x4ec6f
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x4ec83
callq 0x27560
jmp 0x4ec83
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4ee7e
jmp 0x4ee79
jmp 0x4ede6
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4ecb2
callq 0x27560
jmp 0x4ecb2
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x4eccb
callq 0x27560
jmp 0x4eccb
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x4ecdf
callq 0x27560
jmp 0x4ecdf
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4ee7e
jmp 0x4ee79
jmp 0x4ede6
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4ee7e
jmp 0x4ee79
jmp 0x4ede6
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x4ed29
callq 0x27560
jmp 0x4ed29
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4ee7e
jmp 0x4ee79
jmp 0x4ede6
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4ee7e
jmp 0x4ee79
jmp 0x4ede6
movq %rax, %rbx
jmp 0x4ee0b
movq %rax, %rbx
jmp 0x4ee1f
movq %rax, %rbx
jmp 0x4ee2e
jmp 0x4ede6
movq %rax, %rbx
jmp 0x4ee4c
movq %rax, %rbx
jmp 0x4ee60
movq %rax, %rbx
jmp 0x4ee6f
jmp 0x4ede6
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4ee7e
jmp 0x4ee79
jmp 0x4ede6
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x4edbf
callq 0x27560
jmp 0x4edbf
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x4edd3
callq 0x27560
jmp 0x4edd3
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4ee7e
jmp 0x4ee79
movq %rax, %rbx
jmp 0x4ee7e
movq %rax, %rbx
movq %r14, %rdi
jmp 0x4ee79
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4ee0b
callq 0x27560
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x4ee1f
callq 0x27560
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x4ee2e
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4ee7e
jmp 0x4ee79
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4ee4c
callq 0x27560
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x4ee60
callq 0x27560
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x4ee6f
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4ee7e
callq 0x27560
movq %rbx, %rdi
callq 0x27b10