// File: /workspace/github_cpp_makefile_star2_O1/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 0x288a0
movq %rax, %r14
movq %r15, %rdi
callq 0x28d40
cmpq %rax, %r14
je 0x54380
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 0x28dd0
leaq 0x80(%rsp), %rcx
cmpq %rcx, %rax
je 0x542ca
movq %rsp, %rdi
leaq 0x33eb(%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 0x3321(%rip), %rsi      # 0x575b6
callq 0x290a0
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x27500
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x542b4
callq 0x27560
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x542c7
callq 0x27560
xorl %r12d, %r12d
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
callq 0x28f80
leaq 0xa0(%r14), %r13
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x28dd0
leaq 0x50(%rsp), %rcx
cmpq %rcx, %rax
je 0x5435f
movq %rsp, %rdi
leaq 0x336b(%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 0x328c(%rip), %rsi      # 0x575b6
callq 0x290a0
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x27500
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x54349
callq 0x27560
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x5435c
callq 0x27560
xorl %r12d, %r12d
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x28f80
addq $0x198, %r14            # imm = 0x198
cmpq 0x40(%rsp), %r14
jne 0x54242
jmp 0x54383
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 0x54410
jmp 0x543ff
jmp 0x543ff
jmp 0x543ff
jmp 0x543d2
jmp 0x543cb
jmp 0x543ff
jmp 0x543d2
movq %rax, %rbx
jmp 0x543e4
jmp 0x543d2
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x543e4
callq 0x27560
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x54402
callq 0x27560
jmp 0x54402
jmp 0x543ff
jmp 0x543ff
jmp 0x543ff
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 0x28c20
movq %rax, %rdi
callq 0x2f0bd