// File: /workspace/github_cpp_makefile_star2_O3/dguglielmi[P]dlan-linux-software/common/dlanmonitor.cpp
// Function: CDlanMonitor::ThunderNetworkInfo(std::_Rb_tree_iterator<std::pair<CMACAddress const, CDlanMonitor::NetwAdapter>>, CMACAddress const&, CDlanMonitor::NetworkInfoResponse const&)
void CDlanMonitor::ThunderNetworkInfo(
  std::map<CMACAddress,NetwAdapter>::iterator itNIC,  
  const CMACAddress& addr, 
  const NetworkInfoResponse& nwinfo)
{
  bool bUpdate = false;
    
  itNIC->second.mapNetworkInfoResponses[addr] = nwinfo;
    
  std::map<CMACAddress,LocalDevice>::iterator itLocalDevice = itNIC->second.mapLocalDevices.find(addr);
  if(itLocalDevice != itNIC->second.mapLocalDevices.end())
  {
    for(std::list<HomePlugAvMMEs::ThunderNetworkInfo::StationInfo>::const_iterator itStation = nwinfo.stations.begin();
      (itStation != nwinfo.stations.end()); itStation++)
    {
      std::map<CMACAddress,std::string>::const_iterator itVersion;
      if((itVersion = itNIC->second.mapGetVersionResponses.find(itStation->GetAddress())) != 
        itNIC->second.mapGetVersionResponses.end())
      {
        std::map<CMACAddress,UserDataResponse>::iterator itUserData = itNIC->second.mapUserDataResponses.find(itStation->GetAddress());
        bool bKeepUserData = (itUserData == itNIC->second.mapUserDataResponses.end());

        UpdateRemoteDevice(itLocalDevice->second, itStation->GetAddress(), true,
          CDlanDevice::eThunderbolt, false, itVersion->second, false, 
          bKeepUserData ? UserDataResponse() : itUserData->second, bKeepUserData,
          itStation->GetTxRawRate(), itStation->GetRxRawRate(), false, 
          std::map<CMACAddress, CDlanDataRates>(), true, itStation->GetFirstBridgedAddress(), false, bUpdate);
      }
    }
  }
  else
  {
    for(std::map<CMACAddress,LocalDevice>::iterator itLocalDevice = itNIC->second.mapLocalDevices.begin();
      (itLocalDevice != itNIC->second.mapLocalDevices.end()); ++itLocalDevice)
    {
      if(itLocalDevice->second.mapRemoteDeviceAges.find(addr) != itLocalDevice->second.mapRemoteDeviceAges.end())
      {
        std::map<CMACAddress, CDlanDataRates> remoteDataRates;
        for(std::list<HomePlugAvMMEs::ThunderNetworkInfo::StationInfo>::const_iterator itStation = nwinfo.stations.begin(); 
          (itStation != nwinfo.stations.end()); itStation++)
        {
          remoteDataRates[itStation->GetAddress()] = CDlanDataRates(itStation->GetTxRawRate(), itStation->GetRxRawRate());
        }
        
        UpdateRemoteDevice(itLocalDevice->second, addr, false, CDlanDevice::eThunderbolt, false, 
          "", true, UserDataResponse(), true, 0.0, 0.0, true, remoteDataRates, false, CMACAddress(), true, bUpdate);

        break;
      }
    }

    if(bUpdate)
      OnUpdate();
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %r14
movb $0x0, 0x7(%rsp)
movq %rsi, %rbx
leaq 0x158(%rsi), %rdi
movq %rdx, %rsi
callq 0xc868
cmpq %r12, %rax
je 0xb4dc
movzwl 0x4(%r12), %ecx
movw %cx, 0x4(%rax)
movl (%r12), %ecx
movl %ecx, (%rax)
leaq 0x8(%r12), %rdx
addq $0x8, %rax
movq 0x8(%r12), %rsi
movq %rax, %rdi
callq 0xd946
leaq 0x188(%rbx), %rdi
movq %r13, %rsi
callq 0xe6ee
leaq 0x190(%rbx), %rdx
cmpq %rdx, %rax
je 0xb75f
movq %rax, 0x8(%rsp)
movq 0x8(%r12), %r14
addq $0x8, %r12
cmpq %r12, %r14
je 0xb9a2
leaq 0xf8(%rbx), %rax
movq %rax, 0x108(%rsp)
leaq 0x100(%rbx), %rax
movq %rax, 0x100(%rsp)
leaq 0x128(%rbx), %rax
movq %rax, 0xf8(%rsp)
addq $0x130, %rbx            # imm = 0x130
movq %rbx, 0x90(%rsp)
addq $0x28, 0x8(%rsp)
xorl %ebx, %ebx
movq %r12, 0xf0(%rsp)
leaq 0x10(%r14), %rbp
movq 0x108(%rsp), %rdi
movq %rbp, %rsi
callq 0xe9e8
cmpq 0x100(%rsp), %rax
je 0xb74e
movq %rax, %r13
movq 0xf8(%rsp), %rdi
movq %rbp, %rsi
callq 0xea9a
movq %rax, %r12
movq 0x90(%rsp), %rcx
cmpq %rcx, %rax
je 0xb5bf
leaq 0x28(%r12), %rsi
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0xc418
movq 0x90(%rsp), %rcx
jmp 0xb616
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movb %bl, 0x20(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
movb %bl, 0x40(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %rbx, 0x58(%rsp)
movb %bl, 0x60(%rsp)
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
movq %rbx, 0x78(%rsp)
movb %bl, 0x80(%rsp)
leaq 0x10(%rsp), %r15
addq $0x28, %r13
xorl %eax, %eax
cmpq %rcx, %r12
sete %al
movl 0x1c(%r14), %ecx
movl 0x20(%r14), %edx
cvtsi2sd %rcx, %xmm0
movsd 0xada1(%rip), %xmm2     # 0x163d8
mulsd %xmm2, %xmm0
movsd 0xad9d(%rip), %xmm3     # 0x163e0
mulsd %xmm3, %xmm0
cvtsi2sd %rdx, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm3, %xmm1
movq %rbx, 0xd0(%rsp)
xorpd %xmm2, %xmm2
movapd %xmm2, 0xc0(%rsp)
leaq 0xc8(%rsp), %rcx
movq %rcx, 0xd8(%rsp)
movq %rcx, 0xe0(%rsp)
movq %rbx, 0xe8(%rsp)
leaq 0x16(%r14), %rdi
movq 0x8(%rsp), %rsi
movq %rbp, %rdx
movl $0x1, %ecx
movl $0x2, %r8d
xorl %r9d, %r9d
leaq 0x7(%rsp), %r10
pushq %r10
pushq %rbx
pushq %rdi
pushq $0x1
leaq 0xe0(%rsp), %r12
pushq %r12
pushq %rbx
pushq %rax
pushq %r15
pushq %rbx
pushq %r13
callq 0x85ba
addq $0x50, %rsp
movq %r12, %rdi
callq 0x60e0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
movq 0xf0(%rsp), %r12
je 0xb6fa
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xb716
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xb732
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xb74e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4270
movq (%r14), %r14
cmpq %r12, %r14
jne 0xb55e
jmp 0xb9a2
movq 0x1a0(%rbx), %r15
cmpq %rax, %r15
je 0xb9a2
movq %rax, %rbx
leaq 0x38(%r15), %rdi
movq %r13, %rsi
callq 0xe154
leaq 0x40(%r15), %rcx
cmpq %rcx, %rax
jne 0xb79c
movq %r15, %rdi
callq 0x41d0
movq %rax, %r15
cmpq %rbx, %rax
jne 0xb772
jmp 0xb9a2
leaq 0xc8(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq 0x8(%r12), %rbx
addq $0x8, %r12
cmpq %r12, %rbx
je 0xb82b
movq %r12, %rbp
leaq 0xc0(%rsp), %r12
leaq 0x10(%rbx), %rsi
movsd 0x1c(%rbx), %xmm0
movapd %xmm0, 0x90(%rsp)
movq %r12, %rdi
callq 0xc8e6
movapd 0x90(%rsp), %xmm1
unpcklps 0xab31(%rip), %xmm1     # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
movapd 0xab39(%rip), %xmm0     # 0x16340
orpd %xmm0, %xmm1
subpd %xmm0, %xmm1
mulpd 0xab39(%rip), %xmm1     # 0x16350
mulpd 0xab41(%rip), %xmm1     # 0x16360
movupd %xmm1, (%rax)
movq (%rbx), %rbx
cmpq %rbp, %rbx
jne 0xb7d5
leaq 0xb0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xaa0b(%rip), %rdx      # 0x16249
leaq 0xa0(%rsp), %rdi
movq %rdx, %rsi
callq 0x642c
addq $0x28, %r15
leaq 0x20(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x40(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq 0x60(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq %rax, -0x8(%rbx)
movb %al, (%rbx)
leaq 0x80(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq %rax, -0x8(%rbp)
movb %al, (%rbp)
leaq 0x110(%rsp), %r11
movl %eax, (%r11)
movw $0x0, 0x4(%r11)
leaq 0x7(%rsp), %r10
movl $0x1, %edi
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
movq %r15, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
movl $0x2, %r8d
xorl %r9d, %r9d
pushq %r10
pushq %rdi
pushq %r11
pushq %rax
leaq 0xe0(%rsp), %rax
pushq %rax
pushq %rdi
pushq %rdi
leaq 0x48(%rsp), %rax
pushq %rax
pushq %rdi
leaq 0xe8(%rsp), %rax
pushq %rax
callq 0x85ba
addq $0x50, %rsp
movq 0x70(%rsp), %rdi
cmpq %rbp, %rdi
je 0xb911
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0xb928
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0xb93f
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xb95b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0xb980
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x4270
leaq 0xc0(%rsp), %rdi
callq 0x60e0
testb $0x1, 0x7(%rsp)
je 0xb9a2
movq 0x30(%r14), %rdi
testq %rdi, %rdi
je 0xb9a2
movq (%rdi), %rax
callq *(%rax)
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xbf00
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0xb9ed
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0xb9ed
jmp 0xb9ea
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x60e0
jmp 0xba16
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x60e0
leaq 0x10(%rsp), %rdi
callq 0xbf00
movq %rbx, %rdi
callq 0x43e0