// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_random.cpp
// Function: BamTools::RandomTool::RandomTool()
RandomTool::RandomTool(void) 
    : AbstractTool()
    , m_settings(new RandomSettings)
    , m_impl(0)
{ 
    // set program details
    Options::SetProgramInfo("bamtools random", "grab a random subset of alignments",
                            "[-in <filename> -in <filename> ... | -list <filelist>] [-out <filename>] [-forceCompression] [-n] [-region <REGION>]");
    
    // set up options 
    OptionGroup* IO_Opts = Options::CreateOptionGroup("Input & Output");
    Options::AddValueOption("-in",     "BAM filename", "the input BAM file",                         "", m_settings->HasInput,          m_settings->InputFiles,     IO_Opts, Options::StandardIn());
    Options::AddValueOption("-list",   "filename",     "the input BAM file list, one line per file", "", m_settings->HasInputFilelist,  m_settings->InputFilelist,  IO_Opts);
    Options::AddValueOption("-out",    "BAM filename", "the output BAM file",                        "", m_settings->HasOutput,         m_settings->OutputFilename, IO_Opts, Options::StandardOut());
    Options::AddValueOption("-region", "REGION",       "only pull random alignments from within this genomic region. Index file is recommended for better performance, and is used automatically if it exists. See \'bamtools help index\' for more details on creating one", "", m_settings->HasRegion, m_settings->Region, IO_Opts);
    Options::AddOption("-forceCompression", "if results are sent to stdout (like when piping to another tool), default behavior is to leave output uncompressed. Use this flag to override and force compression", m_settings->IsForceCompression, IO_Opts);
    
    OptionGroup* SettingsOpts = Options::CreateOptionGroup("Settings");
    Options::AddValueOption("-n", "count", "number of alignments to grab. Note - no duplicate checking is performed", "",
                            m_settings->HasAlignmentCount, m_settings->AlignmentCount, SettingsOpts, RANDOM_MAX_ALIGNMENT_COUNT);
    Options::AddValueOption("-seed", "unsigned integer", "random number generator seed (for repeatable results). Current time is used if no seed value is provided.", "",
                            m_settings->HasRandomNumberSeed, m_settings->RandomNumberSeed, SettingsOpts);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x498b7(%rip), %rax     # 0x8ea40
movq %rax, (%rdi)
movl $0x90, %edi
callq 0x275c0
movq %rax, %r14
movq %rax, %rdi
callq 0x45c38
movq %r14, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x2dc17(%rip), %rsi     # 0x72dd5
leaq 0x2dc1f(%rip), %rdx     # 0x72de4
leaq 0x28(%rsp), %rdi
callq 0x2f1a0
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2dc06(%rip), %rsi     # 0x72de5
leaq 0x2dc21(%rip), %rdx     # 0x72e07
leaq 0x8(%rsp), %rdi
callq 0x2f1a0
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x2dc08(%rip), %rsi     # 0x72e08
leaq 0x2dc75(%rip), %rdx     # 0x72e7c
leaq 0x48(%rsp), %rdi
callq 0x2f1a0
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x64164
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x45234
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x45243
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x45252
callq 0x27560
leaq 0x28(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x2c2b0(%rip), %rsi     # 0x71511
leaq 0x2c2b7(%rip), %rdx     # 0x7151f
callq 0x2f1a0
leaq 0x28(%rsp), %rdi
callq 0x634cc
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x45289
callq 0x27560
leaq 0x28(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x2c288(%rip), %rsi     # 0x71520
leaq 0x2c284(%rip), %rdx     # 0x71523
callq 0x2f1a0
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x2c271(%rip), %rsi     # 0x71524
leaq 0x2c276(%rip), %rdx     # 0x71530
callq 0x2f1a0
leaq 0x48(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0x304f0(%rip), %rsi     # 0x757be
leaq 0x304fb(%rip), %rdx     # 0x757d0
callq 0x2f1a0
leaq 0x78(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x3152d(%rip), %rdx     # 0x76817
leaq 0x68(%rsp), %rdi
movq %rdx, %rsi
callq 0x2f1a0
movq 0x8(%rbx), %r15
callq 0x641a2
leaq 0x10(%r15), %r9
incq %r15
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movq %r15, %r8
pushq %rax
pushq %r14
callq 0x2e4fe
addq $0x10, %rsp
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x45339
callq 0x27560
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
leaq 0x18(%rsp), %r15
je 0x4534d
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4535c
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x4536b
callq 0x27560
leaq 0x28(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x2c1cd(%rip), %rsi     # 0x71547
leaq 0x2c1cb(%rip), %rdx     # 0x7154c
callq 0x2f1a0
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x2c271(%rip), %rsi     # 0x71606
leaq 0x2c272(%rip), %rdx     # 0x7160e
callq 0x2f1a0
leaq 0x48(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0x2c19d(%rip), %rsi     # 0x7154d
leaq 0x2c1c0(%rip), %rdx     # 0x71577
callq 0x2f1a0
leaq 0x68(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x3144c(%rip), %rdx     # 0x76817
movq %rdx, %rsi
callq 0x2f1a0
movq 0x8(%rbx), %r9
leaq 0x2(%r9), %r8
addq $0x28, %r9
subq $0x8, %rsp
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x50(%rsp), %rdx
leaq 0x70(%rsp), %rcx
pushq %r14
callq 0x2e8c0
addq $0x10, %rsp
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x45411
callq 0x27560
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x45420
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4542f
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x4543e
callq 0x27560
leaq 0x28(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x2c12b(%rip), %rsi     # 0x71578
leaq 0x2c128(%rip), %rdx     # 0x7157c
callq 0x2f1a0
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x2c0bc(%rip), %rsi     # 0x71524
leaq 0x2c0c1(%rip), %rdx     # 0x71530
callq 0x2f1a0
leaq 0x48(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0x2c0fa(%rip), %rsi     # 0x7157d
leaq 0x2c106(%rip), %rdx     # 0x71590
callq 0x2f1a0
leaq 0x68(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x31379(%rip), %rdx     # 0x76817
movq %rdx, %rsi
callq 0x2f1a0
movq 0x8(%rbx), %r15
callq 0x641aa
leaq 0x48(%r15), %r9
addq $0x3, %r15
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movq %r15, %r8
pushq %rax
pushq %r14
callq 0x2ebbe
addq $0x10, %rsp
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x454e9
callq 0x27560
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
leaq 0x18(%rsp), %r15
je 0x454fd
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4550c
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x4551b
callq 0x27560
leaq 0x28(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x2c0b1(%rip), %rsi     # 0x715db
leaq 0x2c0b1(%rip), %rdx     # 0x715e2
callq 0x2f1a0
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x2c09e(%rip), %rsi     # 0x715e3
leaq 0x2c09d(%rip), %rdx     # 0x715e9
callq 0x2f1a0
leaq 0x48(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0x2d91d(%rip), %rsi     # 0x72e7d
leaq 0x2d9e7(%rip), %rdx     # 0x72f4e
callq 0x2f1a0
leaq 0x68(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x3129c(%rip), %rdx     # 0x76817
movq %rdx, %rsi
callq 0x2f1a0
movq 0x8(%rbx), %r9
leaq 0x5(%r9), %r8
addq $0x70, %r9
subq $0x8, %rsp
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x50(%rsp), %rdx
leaq 0x70(%rsp), %rcx
pushq %r14
callq 0x2e8c0
addq $0x10, %rsp
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x455c1
callq 0x27560
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x455d0
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x455df
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x455ee
callq 0x27560
leaq 0x28(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x2cafa(%rip), %rsi     # 0x720f7
leaq 0x2cb04(%rip), %rdx     # 0x72108
callq 0x2f1a0
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x2ca33(%rip), %rsi     # 0x7204b
leaq 0x2cacf(%rip), %rdx     # 0x720ee
callq 0x2f1a0
movq 0x8(%rbx), %rdx
addq $0x6, %rdx
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %r14, %rcx
callq 0x632c4
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4564d
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x4565c
callq 0x27560
leaq 0x28(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x2f5b6(%rip), %rsi     # 0x74c21
leaq 0x2f5b7(%rip), %rdx     # 0x74c29
callq 0x2f1a0
leaq 0x28(%rsp), %rdi
callq 0x634cc
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x45693
callq 0x27560
leaq 0x28(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x2d8ad(%rip), %rsi     # 0x72f4f
leaq 0x2d8a8(%rip), %rdx     # 0x72f51
callq 0x2f1a0
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x2c30b(%rip), %rsi     # 0x719c8
leaq 0x2c309(%rip), %rdx     # 0x719cd
callq 0x2f1a0
leaq 0x48(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0x2d87a(%rip), %rsi     # 0x72f52
leaq 0x2d8ba(%rip), %rdx     # 0x72f99
callq 0x2f1a0
leaq 0x68(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x31124(%rip), %rdx     # 0x76817
movq %rdx, %rsi
callq 0x2f1a0
movq 0x8(%rbx), %r8
leaq 0x8(%r8), %r9
leaq 0x2d902(%rip), %rax     # 0x7300c
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
leaq 0x68(%rsp), %rcx
pushq %rax
pushq %r14
callq 0x45ce8
addq $0x10, %rsp
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x45739
callq 0x27560
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x45748
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x45757
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x45766
callq 0x27560
leaq 0x28(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x2d825(%rip), %rsi     # 0x72f9a
leaq 0x2d823(%rip), %rdx     # 0x72f9f
callq 0x2f1a0
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x30f32(%rip), %rsi     # 0x766c2
leaq 0x30f3b(%rip), %rdx     # 0x766d2
callq 0x2f1a0
leaq 0x48(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0x2d7f5(%rip), %rsi     # 0x72fa0
leaq 0x2d857(%rip), %rdx     # 0x73009
callq 0x2f1a0
leaq 0x68(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x31051(%rip), %rdx     # 0x76817
movq %rdx, %rsi
callq 0x2f1a0
movq 0x8(%rbx), %r9
leaq 0x4(%r9), %r8
addq $0x68, %r9
subq $0x8, %rsp
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x50(%rsp), %rdx
leaq 0x70(%rsp), %rcx
pushq %r14
callq 0x45fc8
addq $0x10, %rsp
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x4580c
callq 0x27560
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4581b
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4582a
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x45839
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 %r13, %rdi
je 0x45862
callq 0x27560
jmp 0x45862
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x45876
callq 0x27560
jmp 0x45876
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4588f
callq 0x27560
jmp 0x4588f
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x45b2c
jmp 0x45b27
jmp 0x45a94
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x458be
callq 0x27560
jmp 0x458be
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x458d2
callq 0x27560
jmp 0x458d2
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x458eb
callq 0x27560
jmp 0x458eb
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x45b2c
jmp 0x45b27
jmp 0x45a94
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x45b2c
jmp 0x45b27
jmp 0x45a94
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x45935
callq 0x27560
jmp 0x45935
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x45b2c
jmp 0x45b27
jmp 0x45a94
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x45964
callq 0x27560
jmp 0x45964
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x45978
callq 0x27560
jmp 0x45978
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x45991
callq 0x27560
jmp 0x45991
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x45b2c
jmp 0x45b27
jmp 0x45a94
movq %rax, %rbx
jmp 0x45ab9
movq %rax, %rbx
jmp 0x45ac8
movq %rax, %rbx
jmp 0x45adc
jmp 0x45a94
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x459dd
callq 0x27560
jmp 0x459dd
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x459f1
callq 0x27560
jmp 0x459f1
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x45a0a
callq 0x27560
jmp 0x45a0a
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x45b2c
jmp 0x45b27
jmp 0x45a94
movq %rax, %rbx
jmp 0x45afa
movq %rax, %rbx
jmp 0x45b09
movq %rax, %rbx
jmp 0x45b1d
jmp 0x45a94
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x45b2c
jmp 0x45b27
jmp 0x45a94
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x45a68
callq 0x27560
jmp 0x45a68
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x45a81
callq 0x27560
jmp 0x45a81
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x45b2c
jmp 0x45b27
movq %rax, %rbx
jmp 0x45b2c
movq %rax, %rbx
movq %r14, %rdi
jmp 0x45b27
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x45ab9
callq 0x27560
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x45ac8
callq 0x27560
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x45adc
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x45b2c
jmp 0x45b27
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x45afa
callq 0x27560
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x45b09
callq 0x27560
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x45b1d
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x45b2c
callq 0x27560
movq %rbx, %rdi
callq 0x27b10