// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamHeaderValidator_p.cpp
// Function: BamTools::Internal::SamHeaderValidator::ContainsUniqueIDsAndPlatformUnits()
bool SamHeaderValidator::ContainsUniqueIDsAndPlatformUnits(void) {

    bool isValid = true;
    set<string> readGroupIds;
    set<string> platformUnits;
    set<string>::iterator idIter;
    set<string>::iterator puIter;

    // iterate over sequences
    const SamReadGroupDictionary& readGroups = m_header.ReadGroups;
    SamReadGroupConstIterator rgIter = readGroups.ConstBegin();
    SamReadGroupConstIterator rgEnd  = readGroups.ConstEnd();
    for ( ; rgIter != rgEnd; ++rgIter ) {
        const SamReadGroup& rg = (*rgIter);

        // --------------------------------
        // check for unique ID

        // lookup read group ID
        const string& id = rg.ID;
        idIter = readGroupIds.find(id);

        // error if found (duplicate entry)
        if ( idIter != readGroupIds.end() ) {
            AddError("Read group ID (ID): " + id + " is not unique");
            isValid = false;
        }

        // otherwise ok, store id
        readGroupIds.insert(id);

        // --------------------------------
        // check for unique platform unit

        // lookup platform unit
        const string& pu = rg.PlatformUnit;
        puIter = platformUnits.find(pu);

        // error if found (duplicate entry)
        if ( puIter != platformUnits.end() ) {
            AddError("Platform unit (PU): " + pu + " is not unique");
            isValid = false;
        }

        // otherwise ok, store platform unit
        platformUnits.insert(pu);
    }

    // return validation state
    return isValid;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
leaq 0x80(%rsp), %rcx
xorl %eax, %eax
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq 0x50(%rsp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movl $0xc0, %r15d
addq (%rdi), %r15
movq %r15, %rdi
callq 0x28890
movq %rax, %r14
movq %r15, %rdi
callq 0x28d30
cmpq %rax, %r14
je 0x542a8
movq %rax, 0x40(%rsp)
leaq 0x30(%rsp), %r15
movb $0x1, %r12b
leaq 0x20(%rsp), %rbp
leaq 0x40(%r14), %r13
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
callq 0x28dc0
leaq 0x80(%rsp), %rcx
cmpq %rcx, %rax
je 0x541f2
movq %rsp, %rdi
leaq 0x34c3(%rip), %rsi      # 0x57655
movq %r13, %rdx
callq 0x273f0
movq %r15, 0x20(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0x267c0
movq %rbp, %rdi
leaq 0x33f9(%rip), %rsi      # 0x575b6
callq 0x29090
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x27500
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x541dc
callq 0x27560
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x541ef
callq 0x27560
xorl %r12d, %r12d
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
callq 0x28f70
leaq 0xa0(%r14), %r13
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x28dc0
leaq 0x50(%rsp), %rcx
cmpq %rcx, %rax
je 0x54287
movq %rsp, %rdi
leaq 0x3443(%rip), %rsi      # 0x5766a
movq %r13, %rdx
callq 0x273f0
movq %r15, 0x20(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0x267c0
movq %rbp, %rdi
leaq 0x3364(%rip), %rsi      # 0x575b6
callq 0x29090
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x27500
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x54271
callq 0x27560
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x54284
callq 0x27560
xorl %r12d, %r12d
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x28f70
addq $0x198, %r14            # imm = 0x198
cmpq 0x40(%rsp), %r14
jne 0x5416a
jmp 0x542ab
movb $0x1, %r12b
leaq 0x48(%rsp), %rdi
movq 0x10(%rdi), %rsi
callq 0x26050
leaq 0x78(%rsp), %rdi
movq 0x10(%rdi), %rsi
callq 0x26050
andb $0x1, %r12b
movl %r12d, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x54338
jmp 0x54327
jmp 0x54327
jmp 0x54327
jmp 0x542fa
jmp 0x542f3
jmp 0x54327
jmp 0x542fa
movq %rax, %rbx
jmp 0x5430c
jmp 0x542fa
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x5430c
callq 0x27560
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x5432a
callq 0x27560
jmp 0x5432a
jmp 0x54327
jmp 0x54327
jmp 0x54327
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
movq 0x10(%rdi), %rsi
callq 0x26050
leaq 0x78(%rsp), %rdi
movq 0x10(%rdi), %rsi
callq 0x26050
movq %rbx, %rdi
callq 0x28c10
movq %rax, %rdi
callq 0x2f047