// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_resolve.cpp
// Function: BamTools::ResolveTool::ResolveToolPrivate::CheckSettings(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
bool ResolveTool::ResolveToolPrivate::CheckSettings(vector<string>& errors) {

    // ensure clean slate
    errors.clear();

    // if MakeStats mode
    if ( m_settings->IsMakeStats ) {

        // ensure mutex mode
        if ( m_settings->IsMarkPairs )
            errors.push_back("Cannot run in both -makeStats & -markPairs modes. Please select ONE.");
        if ( m_settings->IsTwoPass )
            errors.push_back("Cannot run in both -makeStats & -twoPass modes. Please select ONE.");

        // error if output BAM options supplied
        if ( m_settings->HasOutputBamFile )
            errors.push_back("Cannot use -out (output BAM file) in -makeStats mode.");
        if ( m_settings->IsForceCompression )
            errors.push_back("Cannot use -forceCompression. No output BAM file is being generated.");

        // make sure required stats file supplied
        if ( !m_settings->HasStatsFile )
            errors.push_back("Ouptut stats filename required for -makeStats mode. Please specify one using -stats option.");

        // check for UseStats options
        if ( m_settings->HasForceMarkReadGroups )
            errors.push_back("Cannot use -forceMarkReadGroups. -markPairs options are DISABLED in -makeStats mode.");
    }

    // if MarkPairs mode
    else if ( m_settings->IsMarkPairs ) {

        // ensure mutex mode
        if ( m_settings->IsMakeStats )
            errors.push_back("Cannot run in both -makeStats & -markPairs modes. Please select ONE.");
        if ( m_settings->IsTwoPass )
            errors.push_back("Cannot run in both -markPairs & -twoPass modes. Please select ONE.");

        // make sure required stats file supplied
        if ( !m_settings->HasStatsFile )
            errors.push_back("Input stats filename required for -markPairs mode. Please specify one using -stats option.");

        // check for MakeStats options
        if ( m_settings->HasConfidenceInterval )
            errors.push_back("Cannot use -ci. -makeStats options are DISABLED is -markPairs mode.");
    }

    // if TwoPass mode
    else if ( m_settings->IsTwoPass ) {

        // ensure mutex mode
        if ( m_settings->IsMakeStats )
            errors.push_back("Cannot run in both -makeStats & -twoPass modes. Please select ONE.");
        if ( m_settings->IsMarkPairs )
            errors.push_back("Cannot run in both -markPairs & -twoPass modes. Please select ONE.");

        // make sure input is file not stdin
        if ( !m_settings->HasInputBamFile || m_settings->InputBamFilename == Options::StandardIn() )
            errors.push_back("Cannot run -twoPass mode with BAM data from stdin. Please specify existing file using -in option.");
    }

    // no mode selected
    else
        errors.push_back("No resolve mode specified. Please select ONE of the following: -makeStats, -markPairs, or -twoPass. See help for more info.");

    // boundary checks on values
    if ( m_settings->HasConfidenceInterval ) {
        if ( m_settings->ConfidenceInterval < 0.0 || m_settings->ConfidenceInterval > 1.0 )
            errors.push_back("Invalid confidence interval. Must be between 0 and 1");
    }
    if ( m_settings->HasMinimumMapQuality ) {
        if ( m_settings->MinimumMapQuality >= 256 )
            errors.push_back("Invalid minimum map quality. Must be between 0 and 255");
    }
    if ( m_settings->HasUnusedModelThreshold ) {
        if ( m_settings->UnusedModelThreshold < 0.0 || m_settings->UnusedModelThreshold > 1.0 )
            errors.push_back("Invalid unused model threshold. Must be between 0 and 1");
    }

    // return success if no errors found
    return ( errors.empty() );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x4adb8
movq (%r14), %r15
movb 0x1(%r15), %al
cmpb $0x1, (%r15)
jne 0x48111
testb %al, %al
je 0x47fcf
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2b518(%rip), %rsi     # 0x734bc
leaq 0x2b555(%rip), %rdx     # 0x73500
movq %rsp, %rdi
callq 0x2f1a0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e190
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x47fcc
callq 0x27560
movq (%r14), %r15
cmpb $0x1, 0x2(%r15)
jne 0x48011
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2b51b(%rip), %rsi     # 0x73501
leaq 0x2b556(%rip), %rdx     # 0x73543
movq %rsp, %rdi
callq 0x2f1a0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e190
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x4800e
callq 0x27560
movq (%r14), %r15
cmpb $0x1, 0x4(%r15)
jne 0x48053
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2b51c(%rip), %rsi     # 0x73544
leaq 0x2b54a(%rip), %rdx     # 0x73579
movq %rsp, %rdi
callq 0x2f1a0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e190
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x48050
callq 0x27560
movq (%r14), %r15
cmpb $0x1, 0x6(%r15)
jne 0x48095
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2b510(%rip), %rsi     # 0x7357a
leaq 0x2b54d(%rip), %rdx     # 0x735be
movq %rsp, %rdi
callq 0x2f1a0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e190
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x48092
callq 0x27560
movq (%r14), %r15
cmpb $0x0, 0x5(%r15)
jne 0x480d7
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2b513(%rip), %rsi     # 0x735bf
leaq 0x2b567(%rip), %rdx     # 0x7361a
movq %rsp, %rdi
callq 0x2f1a0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e190
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x480d4
callq 0x27560
movq (%r14), %r15
cmpb $0x1, 0x8(%r15)
jne 0x4826b
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2b529(%rip), %rsi     # 0x7361b
leaq 0x2b576(%rip), %rdx     # 0x7366f
movq %rsp, %rdi
callq 0x2f1a0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e190
jmp 0x4825d
movb 0x2(%r15), %cl
testb %al, %al
je 0x481d8
testb %cl, %cl
je 0x4815c
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2b53f(%rip), %rsi     # 0x73670
leaq 0x2b57a(%rip), %rdx     # 0x736b2
movq %rsp, %rdi
callq 0x2f1a0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e190
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x48159
callq 0x27560
movq (%r14), %r15
cmpb $0x0, 0x5(%r15)
jne 0x4819e
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2b540(%rip), %rsi     # 0x736b3
leaq 0x2b593(%rip), %rdx     # 0x7370d
movq %rsp, %rdi
callq 0x2f1a0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e190
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x4819b
callq 0x27560
movq (%r14), %r15
cmpb $0x1, 0x7(%r15)
jne 0x4826b
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2b555(%rip), %rsi     # 0x7370e
leaq 0x2b591(%rip), %rdx     # 0x73751
movq %rsp, %rdi
callq 0x2f1a0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e190
jmp 0x4825d
testb %cl, %cl
je 0x48233
cmpb $0x1, 0x3(%r15)
jne 0x48207
callq 0x641a2
movq 0x18(%r15), %rdx
cmpq 0x8(%rax), %rdx
jne 0x4826b
testq %rdx, %rdx
je 0x48207
movq (%rax), %rsi
movq 0x10(%r15), %rdi
callq 0x275f0
testl %eax, %eax
jne 0x4826b
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2b53b(%rip), %rsi     # 0x73752
leaq 0x2b595(%rip), %rdx     # 0x737b3
movq %rsp, %rdi
callq 0x2f1a0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e190
jmp 0x4825d
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2b571(%rip), %rsi     # 0x737b4
leaq 0x2b5e5(%rip), %rdx     # 0x7382f
movq %rsp, %rdi
callq 0x2f1a0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e190
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x4826b
callq 0x27560
movq (%r14), %rax
cmpb $0x1, 0x7(%rax)
jne 0x482cb
movsd 0x90(%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x48290
ucomisd 0x2ad9a(%rip), %xmm0    # 0x73028
jbe 0x482cb
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2b590(%rip), %rsi     # 0x73830
leaq 0x2b5bd(%rip), %rdx     # 0x73864
movq %rsp, %rdi
callq 0x2f1a0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e190
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x482c8
callq 0x27560
movq (%r14), %rax
cmpb $0x1, 0x9(%rax)
jne 0x48317
cmpw $0x100, 0x98(%rax)      # imm = 0x100
jb 0x48317
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2b579(%rip), %rsi     # 0x73865
leaq 0x2b5a8(%rip), %rdx     # 0x7389b
movq %rsp, %rdi
callq 0x2f1a0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e190
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x48314
callq 0x27560
movq (%r14), %rax
cmpb $0x1, 0xa(%rax)
jne 0x48371
movsd 0xa0(%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x48339
ucomisd 0x2acf1(%rip), %xmm0    # 0x73028
jbe 0x48371
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x2b553(%rip), %rsi     # 0x7389c
leaq 0x2b583(%rip), %rdx     # 0x738d3
movq %rsp, %rdi
callq 0x2f1a0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e190
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x48371
callq 0x27560
movq (%rbx), %rax
cmpq 0x8(%rbx), %rax
sete %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x483c5
jmp 0x483d8
jmp 0x483c5
jmp 0x483d8
jmp 0x483c5
jmp 0x483c5
jmp 0x483d8
jmp 0x483c5
jmp 0x483d8
jmp 0x483d8
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
jne 0x483d1
jmp 0x483db
jmp 0x483c5
jmp 0x483c5
jmp 0x483d8
jmp 0x483c5
jmp 0x483d8
jmp 0x483c5
jmp 0x483d8
jmp 0x483d8
jmp 0x483d8
jmp 0x483c5
jmp 0x483d8
jmp 0x483c5
jmp 0x483d8
jmp 0x483c5
jmp 0x483d8
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x483db
callq 0x27560
jmp 0x483db
movq %rax, %rbx
movq %rbx, %rdi
callq 0x27b10
nop