// File: /workspace/github_cpp_makefile_star2_O1/dguglielmi[P]dlan-linux-software/common/dlanmonitor.cpp
// Function: CDlanMonitor::UpdateAdapters(bool&, std::set<CMACAddress, std::less<CMACAddress>, std::allocator<CMACAddress>> const&)
void CDlanMonitor::UpdateAdapters(
  bool& bUpdate,
  const std::set<CMACAddress>& setAdapters)
{
  for(std::set<CMACAddress>::const_iterator itAdapter = setAdapters.begin(); 
    (itAdapter != setAdapters.end()); ++itAdapter)
  {
    if((*itAdapter != CMACAddress::Null()) && (m_mapNICs.find(*itAdapter) == m_mapNICs.end()))
      m_mapNICs.insert(std::make_pair(*itAdapter,NetwAdapter()));
  }

  std::map<CMACAddress,NetwAdapter>::iterator itNIC = m_mapNICs.begin();
  while(itNIC != m_mapNICs.end())
  {
    if(setAdapters.find(itNIC->first) == setAdapters.end())
    {
      while(!itNIC->second.mapLocalDevices.empty())
      {
        bUpdate = true;
        m_listLocalDevices.erase(itNIC->second.mapLocalDevices.begin()->second.itPublicDevice);
        itNIC->second.mapLocalDevices.erase(itNIC->second.mapLocalDevices.begin());
      }

      while(!itNIC->second.queuePendingPackets.empty()) 
      {
        delete itNIC->second.queuePendingPackets.front();
        itNIC->second.queuePendingPackets.pop();
      }

      m_mapNICs.erase(itNIC++);      
    }
    else
    {
      ++itNIC;
    }
  } 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3e8, %rsp            # imm = 0x3E8
movq %rsi, %r14
movq %rdi, %r15
movq 0x18(%rdx), %r12
movq %rdx, (%rsp)
leaq 0x8(%rdx), %rax
movq %rax, 0x8(%rsp)
cmpq %rax, %r12
je 0x7f4b
movl $0xa8, %eax
leaq (%r15,%rax), %rbx
leaq 0xb0(%r15), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x20(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movw $0x0, 0x24(%rsp)
movl $0x0, 0x20(%rsp)
movzwl 0x24(%r12), %eax
orl 0x20(%r12), %eax
je 0x7f35
leaq 0x20(%r12), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0xdefe
cmpq 0x18(%rsp), %rax
jne 0x7f35
leaq 0x208(%rsp), %rbp
movq %rbp, %rdi
callq 0xbe80
movzwl 0x4(%r13), %eax
movw %ax, 0x24(%rsp)
movl (%r13), %eax
movl %eax, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
movq %rbp, %rsi
callq 0xcbdc
movq %rbx, %rdi
leaq 0x20(%rsp), %rsi
callq 0xdfae
leaq 0x1b8(%rsp), %rdi
callq 0x5ca6
leaq 0x188(%rsp), %rdi
callq 0x5cf6
leaq 0x158(%rsp), %rdi
callq 0x5da8
leaq 0x128(%rsp), %rdi
callq 0x5e32
leaq 0xf8(%rsp), %rdi
callq 0x5ef6
movq 0x10(%rsp), %rdi
callq 0x5f6e
leaq 0x98(%rsp), %rdi
callq 0x5f6e
leaq 0x68(%rsp), %rdi
callq 0x5f6e
leaq 0x38(%rsp), %rdi
callq 0x5f6e
leaq 0x398(%rsp), %rdi
callq 0x5ca6
leaq 0x368(%rsp), %rdi
callq 0x5cf6
leaq 0x338(%rsp), %rdi
callq 0x5da8
leaq 0x308(%rsp), %rdi
callq 0x5e32
leaq 0x2d8(%rsp), %rdi
callq 0x5ef6
leaq 0x2a8(%rsp), %rdi
callq 0x5f6e
leaq 0x278(%rsp), %rdi
callq 0x5f6e
leaq 0x248(%rsp), %rdi
callq 0x5f6e
leaq 0x218(%rsp), %rdi
callq 0x5f6e
movq %r12, %rdi
callq 0x42d0
movq %rax, %r12
cmpq 0x8(%rsp), %rax
jne 0x7ddd
movq 0xc0(%r15), %r13
leaq 0xb0(%r15), %r12
cmpq %r12, %r13
movq (%rsp), %rbp
je 0x803f
leaq 0xa8(%r15), %rbx
addq $0x90, %r15
leaq 0x20(%r13), %rsi
movq %rbp, %rdi
callq 0xe1fe
cmpq 0x8(%rsp), %rax
je 0x7f97
movq %r13, %rdi
callq 0x41d0
movq %rax, %r13
jmp 0x8036
cmpq $0x0, 0x1b0(%r13)
je 0x7fd8
leaq 0x188(%r13), %rbp
movb $0x1, (%r14)
movq 0x1a0(%r13), %rax
movq 0x30(%rax), %rsi
movq %r15, %rdi
callq 0xe2ae
movq 0x1a0(%r13), %rsi
movq %rbp, %rdi
callq 0xe2e4
cmpq $0x0, 0x1b0(%r13)
jne 0x7fa8
movq 0x1c8(%r13), %rax
cmpq %rax, 0x1e8(%r13)
je 0x8019
leaq 0x1b8(%r13), %rbp
movq (%rax), %rdi
testq %rdi, %rdi
je 0x8001
movl $0x8, %esi
callq 0x4270
movq %rbp, %rdi
callq 0xe328
movq 0x1c8(%r13), %rax
cmpq %rax, 0x1e8(%r13)
jne 0x7fef
movq %r13, %rdi
callq 0x41d0
movq %rax, %rbp
movq %rbx, %rdi
movq %r13, %rsi
callq 0xe376
movq %rbp, %r13
movq (%rsp), %rbp
cmpq %r12, %r13
jne 0x7f74
addq $0x3e8, %rsp            # imm = 0x3E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xc088
jmp 0x8063
movq %rax, %rbx
leaq 0x208(%rsp), %rdi
callq 0xc0f4
movq %rbx, %rdi
callq 0x43e0