// File: /workspace/github_cpp_makefile_star2_O2/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), %rbp
movq %rdx, 0x18(%rsp)
leaq 0x8(%rdx), %rax
movq %rax, 0x10(%rsp)
leaq 0xa8(%rdi), %rax
movq %rax, (%rsp)
leaq 0xb0(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x20(%rsp), %r12
cmpq 0x10(%rsp), %rbp
je 0x7980
andw $0x0, 0x24(%rsp)
leaq 0x20(%rbp), %rbx
andl $0x0, 0x20(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6400
testb %al, %al
je 0x7970
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0xccd4
cmpq 0x8(%rsp), %rax
jne 0x7970
leaq 0x208(%rsp), %r13
movq %r13, %rdi
callq 0xa862
movzwl 0x4(%rbx), %eax
movw %ax, 0x24(%rsp)
movl (%rbx), %eax
movl %eax, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
movq %r13, %rsi
callq 0xb52e
movq (%rsp), %rdi
movq %r12, %rsi
callq 0xcd4a
leaq 0x28(%rsp), %rdi
callq 0x560e
leaq 0x208(%rsp), %rdi
callq 0x560e
movq %rbp, %rdi
callq 0x42c0
movq %rax, %rbp
jmp 0x78e5
movq 0xc0(%r15), %rbp
addq $0x90, %r15
pushq $0x8
popq %r13
cmpq 0x8(%rsp), %rbp
je 0x7a43
leaq 0x20(%rbp), %rsi
movq 0x18(%rsp), %rdi
callq 0xcf7c
cmpq 0x10(%rsp), %rax
je 0x79bf
movq %rbp, %rdi
callq 0x41e0
movq %rax, %rbp
jmp 0x7992
leaq 0x188(%rbp), %rbx
cmpq $0x0, 0x1b0(%rbp)
je 0x79f8
movb $0x1, (%r14)
movq 0x1a0(%rbp), %rax
movq 0x30(%rax), %rsi
movq %r15, %rdi
callq 0xaa58
movq 0x1a0(%rbp), %rsi
movq %rbx, %rdi
callq 0xd01a
jmp 0x79c6
leaq 0x1b8(%rbp), %rbx
movq 0x1c8(%rbp), %rax
cmpq %rax, 0x1e8(%rbp)
je 0x7a24
movq (%rax), %rdi
movq %r13, %rsi
callq 0x4280
movq %rbx, %rdi
callq 0xd068
jmp 0x79ff
movq %rbp, %rdi
callq 0x41e0
movq %rax, %rbx
movq (%rsp), %rdi
movq %rbp, %rsi
callq 0xd0be
movq %rbx, %rbp
jmp 0x7992
addq $0x3e8, %rsp            # imm = 0x3E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x560e
jmp 0x7a67
movq %rax, %rbx
leaq 0x208(%rsp), %rdi
callq 0x560e
jmp 0x7a7b
jmp 0x7a78
movq %rax, %rbx
movq %rbx, %rdi
callq 0x4410
nop