// File: /workspace/github_cpp_makefile_star2_O1/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 0x4ae86
movq (%r14), %rcx
movb 0x1(%rcx), %al
cmpb $0x1, (%rcx)
jne 0x48214
testb %al, %al
je 0x480d4
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2c3f8(%rip), %rsi     # 0x744a4
leaq 0x2c435(%rip), %rdx     # 0x744e8
movq %rsp, %rdi
callq 0x2f1b2
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e1b0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x480d4
callq 0x27560
movq (%r14), %rax
cmpb $0x1, 0x2(%rax)
jne 0x48115
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2c3fc(%rip), %rsi     # 0x744e9
leaq 0x2c437(%rip), %rdx     # 0x7452b
movq %rsp, %rdi
callq 0x2f1b2
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e1b0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x48115
callq 0x27560
movq (%r14), %rax
cmpb $0x1, 0x4(%rax)
jne 0x48156
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2c3fe(%rip), %rsi     # 0x7452c
leaq 0x2c42c(%rip), %rdx     # 0x74561
movq %rsp, %rdi
callq 0x2f1b2
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e1b0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x48156
callq 0x27560
movq (%r14), %rax
cmpb $0x1, 0x6(%rax)
jne 0x48197
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2c3f3(%rip), %rsi     # 0x74562
leaq 0x2c430(%rip), %rdx     # 0x745a6
movq %rsp, %rdi
callq 0x2f1b2
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e1b0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x48197
callq 0x27560
movq (%r14), %rax
cmpb $0x0, 0x5(%rax)
jne 0x481d8
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2c3f7(%rip), %rsi     # 0x745a7
leaq 0x2c44b(%rip), %rdx     # 0x74602
movq %rsp, %rdi
callq 0x2f1b2
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e1b0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x481d8
callq 0x27560
movq (%r14), %rax
cmpb $0x1, 0x8(%rax)
jne 0x4836e
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2c40e(%rip), %rsi     # 0x74603
leaq 0x2c45b(%rip), %rdx     # 0x74657
movq %rsp, %rdi
callq 0x2f1b2
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e1b0
jmp 0x48360
movb 0x2(%rcx), %cl
testb %al, %al
je 0x482d8
testb %cl, %cl
je 0x4825b
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2c425(%rip), %rsi     # 0x74658
leaq 0x2c460(%rip), %rdx     # 0x7469a
movq %rsp, %rdi
callq 0x2f1b2
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e1b0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x4825b
callq 0x27560
movq (%r14), %rax
cmpb $0x0, 0x5(%rax)
jne 0x4829c
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2c427(%rip), %rsi     # 0x7469b
leaq 0x2c47a(%rip), %rdx     # 0x746f5
movq %rsp, %rdi
callq 0x2f1b2
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e1b0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x4829c
callq 0x27560
movq (%r14), %rax
cmpb $0x1, 0x7(%rax)
jne 0x4836e
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2c43d(%rip), %rsi     # 0x746f6
leaq 0x2c479(%rip), %rdx     # 0x74739
movq %rsp, %rdi
callq 0x2f1b2
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e1b0
jmp 0x48360
testb %cl, %cl
je 0x48336
movq (%r14), %r15
cmpb $0x1, 0x3(%r15)
jne 0x4830a
callq 0x646e2
movq 0x18(%r15), %rdx
cmpq 0x8(%rax), %rdx
jne 0x4836e
testq %rdx, %rdx
je 0x4830a
movq (%rax), %rsi
movq 0x10(%r15), %rdi
callq 0x275f0
testl %eax, %eax
jne 0x4836e
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2c420(%rip), %rsi     # 0x7473a
leaq 0x2c47a(%rip), %rdx     # 0x7479b
movq %rsp, %rdi
callq 0x2f1b2
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e1b0
jmp 0x48360
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2c456(%rip), %rsi     # 0x7479c
leaq 0x2c4ca(%rip), %rdx     # 0x74817
movq %rsp, %rdi
callq 0x2f1b2
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e1b0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x4836e
callq 0x27560
movq (%r14), %rax
cmpb $0x1, 0x7(%rax)
jne 0x483cb
movsd 0x90(%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x48393
ucomisd 0x2bc7f(%rip), %xmm0    # 0x74010
jbe 0x483cb
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2c475(%rip), %rsi     # 0x74818
leaq 0x2c4a2(%rip), %rdx     # 0x7484c
movq %rsp, %rdi
callq 0x2f1b2
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e1b0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x483cb
callq 0x27560
movq (%r14), %rax
cmpb $0x1, 0x9(%rax)
jne 0x48417
cmpw $0x100, 0x98(%rax)      # imm = 0x100
jb 0x48417
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2c45e(%rip), %rsi     # 0x7484d
leaq 0x2c48d(%rip), %rdx     # 0x74883
movq %rsp, %rdi
callq 0x2f1b2
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e1b0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x48417
callq 0x27560
movq (%r14), %rax
cmpb $0x1, 0xa(%rax)
jne 0x48474
movsd 0xa0(%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x4843c
ucomisd 0x2bbd6(%rip), %xmm0    # 0x74010
jbe 0x48474
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x2c438(%rip), %rsi     # 0x74884
leaq 0x2c468(%rip), %rdx     # 0x748bb
movq %rsp, %rdi
callq 0x2f1b2
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e1b0
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x48474
callq 0x27560
movq (%rbx), %rax
cmpq 0x8(%rbx), %rax
sete %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x484c8
jmp 0x484db
jmp 0x484c8
jmp 0x484db
jmp 0x484c8
jmp 0x484c8
jmp 0x484db
jmp 0x484c8
jmp 0x484db
jmp 0x484db
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
jne 0x484d4
jmp 0x484de
jmp 0x484c8
jmp 0x484c8
jmp 0x484db
jmp 0x484c8
jmp 0x484db
jmp 0x484c8
jmp 0x484db
jmp 0x484db
jmp 0x484db
jmp 0x484c8
jmp 0x484db
jmp 0x484c8
jmp 0x484db
jmp 0x484c8
jmp 0x484db
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x484de
callq 0x27560
jmp 0x484de
movq %rax, %rbx
movq %rbx, %rdi
callq 0x27b20