// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_revert.cpp
// Function: BamTools::RevertTool::RevertTool()
RevertTool::RevertTool(void)
    : AbstractTool()
    , m_settings(new RevertSettings)
    , m_impl(0)
{
    // set program details
    Options::SetProgramInfo("bamtools revert", "removes duplicate marks and restores original (non-recalibrated) base qualities", "[-in <filename> -in <filename> ...] [-out <filename> | [-forceCompression]] [revertOptions]");
    
    // set up options 
    OptionGroup* IO_Opts = Options::CreateOptionGroup("Input & Output");
    Options::AddValueOption("-in",  "BAM filename", "the input BAM file",  "", m_settings->HasInput,  m_settings->InputFilename,  IO_Opts, Options::StandardIn());
    Options::AddValueOption("-out", "BAM filename", "the output BAM file", "", m_settings->HasOutput, m_settings->OutputFilename, IO_Opts, Options::StandardOut());
    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* RevertOpts = Options::CreateOptionGroup("Revert Options");
    Options::AddOption("-keepDuplicate", "keep duplicates marked", m_settings->IsKeepDuplicateFlag, RevertOpts);
    Options::AddOption("-keepQualities", "keep base qualities (do not replace with OQ contents)", m_settings->IsKeepQualities, RevertOpts);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x42405(%rip), %rax     # 0x8fb08
movq %rax, (%rdi)
movl $0x48, %edi
callq 0x275c0
movq %rax, %r14
movq %rax, %rdi
callq 0x4dde4
movq %r14, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x281e8(%rip), %rsi     # 0x75920
leaq 0x281f0(%rip), %rdx     # 0x7592f
leaq 0x8(%rsp), %rdi
callq 0x2f1b2
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x281d7(%rip), %rsi     # 0x75930
leaq 0x2821f(%rip), %rdx     # 0x7597f
leaq 0x28(%rsp), %rdi
callq 0x2f1b2
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x28206(%rip), %rsi     # 0x75980
leaq 0x2825a(%rip), %rdx     # 0x759db
leaq 0x48(%rsp), %rdi
callq 0x2f1b2
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x646a4
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x4d7ae
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4d7bd
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4d7cc
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x24d36(%rip), %rsi     # 0x72511
leaq 0x24d3d(%rip), %rdx     # 0x7251f
callq 0x2f1b2
leaq 0x8(%rsp), %rdi
callq 0x63a0c
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4d803
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x24d0e(%rip), %rsi     # 0x72520
leaq 0x24d0a(%rip), %rdx     # 0x72523
callq 0x2f1b2
leaq 0x28(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x24cf7(%rip), %rsi     # 0x72524
leaq 0x24cfc(%rip), %rdx     # 0x72530
callq 0x2f1b2
leaq 0x48(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x28f76(%rip), %rsi     # 0x767be
leaq 0x28f81(%rip), %rdx     # 0x767d0
callq 0x2f1b2
leaq 0x78(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x29fb7(%rip), %rdx     # 0x7781b
leaq 0x68(%rsp), %rdi
movq %rdx, %rsi
callq 0x2f1b2
movq 0x8(%rbx), %r15
callq 0x646e2
leaq 0x8(%r15), %r9
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x48(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movq %r15, %r8
pushq %rax
pushq %r14
callq 0x2ebcc
addq $0x10, %rsp
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4d8b0
callq 0x27560
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %r15
cmpq %r15, %rdi
je 0x4d8c4
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4d8d3
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4d8e2
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x24c87(%rip), %rsi     # 0x72578
leaq 0x24c84(%rip), %rdx     # 0x7257c
callq 0x2f1b2
leaq 0x28(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x24c18(%rip), %rsi     # 0x72524
leaq 0x24c1d(%rip), %rdx     # 0x72530
callq 0x2f1b2
leaq 0x48(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x24c56(%rip), %rsi     # 0x7257d
leaq 0x24c62(%rip), %rdx     # 0x72590
callq 0x2f1b2
leaq 0x68(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0x29ed9(%rip), %rdx     # 0x7781b
movq %rdx, %rsi
callq 0x2f1b2
movq 0x8(%rbx), %r15
callq 0x646ea
leaq 0x28(%r15), %r9
incq %r15
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x48(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movq %r15, %r8
pushq %rax
pushq %r14
callq 0x2ebcc
addq $0x10, %rsp
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4d98c
callq 0x27560
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x4d9a0
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4d9af
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4d9be
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x2572a(%rip), %rsi     # 0x730f7
leaq 0x25734(%rip), %rdx     # 0x73108
callq 0x2f1b2
leaq 0x28(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x25663(%rip), %rsi     # 0x7304b
leaq 0x256ff(%rip), %rdx     # 0x730ee
callq 0x2f1b2
movq 0x8(%rbx), %rdx
addq $0x2, %rdx
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movq %r14, %rcx
callq 0x63808
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4da1d
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4da2c
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x27fa1(%rip), %rsi     # 0x759dc
leaq 0x27fa8(%rip), %rdx     # 0x759ea
callq 0x2f1b2
leaq 0x8(%rsp), %rdi
callq 0x63a0c
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4da63
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x27f79(%rip), %rsi     # 0x759eb
leaq 0x27f80(%rip), %rdx     # 0x759f9
callq 0x2f1b2
leaq 0x28(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x27f6d(%rip), %rsi     # 0x759fa
leaq 0x27f7c(%rip), %rdx     # 0x75a10
callq 0x2f1b2
movq 0x8(%rbx), %rdx
addq $0x3, %rdx
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movq %r14, %rcx
callq 0x63808
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4dac2
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4dad1
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x27f31(%rip), %rsi     # 0x75a11
leaq 0x27f38(%rip), %rdx     # 0x75a1f
callq 0x2f1b2
leaq 0x28(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x27f25(%rip), %rsi     # 0x75a20
leaq 0x27f53(%rip), %rdx     # 0x75a55
callq 0x2f1b2
movq 0x8(%rbx), %rdx
addq $0x4, %rdx
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movq %r14, %rcx
callq 0x63808
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4db30
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4db3f
callq 0x27560
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4db68
callq 0x27560
jmp 0x4db68
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4dd1b
jmp 0x4dd16
jmp 0x4dc83
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4db97
callq 0x27560
jmp 0x4db97
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4dd1b
jmp 0x4dd16
jmp 0x4dc83
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4dd1b
jmp 0x4dd16
jmp 0x4dc83
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4dbe1
callq 0x27560
jmp 0x4dbe1
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4dd1b
jmp 0x4dd16
jmp 0x4dc83
movq %rax, %rbx
jmp 0x4dca8
movq %rax, %rbx
jmp 0x4dcbc
movq %rax, %rbx
jmp 0x4dccb
jmp 0x4dc83
movq %rax, %rbx
jmp 0x4dce9
movq %rax, %rbx
jmp 0x4dcfd
movq %rax, %rbx
jmp 0x4dd0c
jmp 0x4dc83
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4dd1b
jmp 0x4dd16
jmp 0x4dc83
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x4dc5c
callq 0x27560
jmp 0x4dc5c
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4dc70
callq 0x27560
jmp 0x4dc70
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4dd1b
jmp 0x4dd16
movq %rax, %rbx
jmp 0x4dd1b
movq %rax, %rbx
movq %r14, %rdi
jmp 0x4dd16
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4dca8
callq 0x27560
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x4dcbc
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4dccb
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4dd1b
jmp 0x4dd16
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4dce9
callq 0x27560
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x4dcfd
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4dd0c
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4dd1b
callq 0x27560
movq %rbx, %rdi
callq 0x27b20
nop