// File: /workspace/github_cpp_makefile_star2_O2/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 $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x51cb8
movq (%r14), %r15
movb 0x1(%r15), %al
cmpb $0x1, (%r15)
jne 0x4f9fb
testb %al, %al
je 0x4f8e2
leaq 0x23b79(%rip), %rsi     # 0x73432
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x35280
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3a16c
leaq 0x10(%rsp), %rdi
callq 0x35730
movq (%r14), %r15
cmpb $0x1, 0x2(%r15)
jne 0x4f919
leaq 0x23b87(%rip), %rsi     # 0x73477
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x35280
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3a16c
leaq 0x10(%rsp), %rdi
callq 0x35730
movq (%r14), %r15
cmpb $0x1, 0x4(%r15)
jne 0x4f950
leaq 0x23b93(%rip), %rsi     # 0x734ba
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x35280
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3a16c
leaq 0x10(%rsp), %rdi
callq 0x35730
movq (%r14), %r15
cmpb $0x1, 0x6(%r15)
jne 0x4f987
leaq 0x23b92(%rip), %rsi     # 0x734f0
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x35280
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3a16c
leaq 0x10(%rsp), %rdi
callq 0x35730
movq (%r14), %r15
cmpb $0x0, 0x5(%r15)
jne 0x4f9be
leaq 0x23ba0(%rip), %rsi     # 0x73535
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x35280
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3a16c
leaq 0x10(%rsp), %rdi
callq 0x35730
movq (%r14), %r15
cmpb $0x1, 0x8(%r15)
jne 0x4fb2b
leaq 0x23bc1(%rip), %rsi     # 0x73591
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x35280
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3a16c
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x4fb2b
movb 0x2(%r15), %cl
testb %al, %al
je 0x4faac
testb %cl, %cl
je 0x4fa3b
leaq 0x23bd4(%rip), %rsi     # 0x735e6
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x35280
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3a16c
leaq 0x10(%rsp), %rdi
callq 0x35730
movq (%r14), %r15
cmpb $0x0, 0x5(%r15)
jne 0x4fa72
leaq 0x23be0(%rip), %rsi     # 0x73629
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x35280
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3a16c
leaq 0x10(%rsp), %rdi
callq 0x35730
movq (%r14), %r15
cmpb $0x1, 0x7(%r15)
jne 0x4fb2b
leaq 0x23c00(%rip), %rsi     # 0x73684
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x35280
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3a16c
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x4fb2b
testb %cl, %cl
je 0x4fafe
cmpb $0x1, 0x3(%r15)
jne 0x4facf
addq $0x10, %r15
callq 0x65ebe
movq %r15, %rdi
movq %rax, %rsi
callq 0x3a2a9
testb %al, %al
je 0x4fb2b
leaq 0x23bf2(%rip), %rsi     # 0x736c8
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x35280
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3a16c
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x4fb2b
leaq 0x23c25(%rip), %rsi     # 0x7372a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x35280
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3a16c
leaq 0x10(%rsp), %rdi
callq 0x35730
movq (%r14), %rax
cmpb $0x1, 0x7(%rax)
jne 0x4fb80
movsd 0x90(%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x4fb50
ucomisd 0x23452(%rip), %xmm0    # 0x72fa0
jbe 0x4fb80
leaq 0x23c4f(%rip), %rsi     # 0x737a6
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x35280
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3a16c
leaq 0x10(%rsp), %rdi
callq 0x35730
movq (%r14), %rax
cmpb $0x1, 0x9(%rax)
jne 0x4fbc1
cmpw $0x100, 0x98(%rax)      # imm = 0x100
jb 0x4fbc1
leaq 0x23c43(%rip), %rsi     # 0x737db
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x35280
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3a16c
leaq 0x10(%rsp), %rdi
callq 0x35730
movq (%r14), %rax
cmpb $0x1, 0xa(%rax)
jne 0x4fc10
movsd 0xa0(%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x4fbe3
ucomisd 0x233bf(%rip), %xmm0    # 0x72fa0
jbe 0x4fc10
leaq 0x23c28(%rip), %rsi     # 0x73812
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x35280
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3a16c
leaq 0x10(%rsp), %rdi
callq 0x35730
movq (%rbx), %rax
cmpq 0x8(%rbx), %rax
sete %al
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x4fd2b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x4fd2b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x4fd2b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x4fd2b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x4fd2b
jmp 0x4fd28
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x4fd2b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x4fd2b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x4fd2b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x4fd2b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x4fd2b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x4fd2b
jmp 0x4fd28
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x4fd2b
jmp 0x4fd28
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x4fd2b
jmp 0x4fd28
jmp 0x4fd28
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35730
jmp 0x4fd2b
jmp 0x4fd28
jmp 0x4fd28
jmp 0x4fd28
jmp 0x4fd28
jmp 0x4fd28
jmp 0x4fd28
jmp 0x4fd28
jmp 0x4fd28
movq %rax, %rbx
movq %rbx, %rdi
callq 0x35b50
movq %rax, %rdi
callq 0x3a198
nop