// File: /workspace/github_cpp_makefile_star2_O3/dguglielmi[P]dlan-linux-software/common/dlanmonitor.cpp
// Function: CDlanMonitor::OnInt51NetStatResponse(CMACAddress const&, HomePlugMMEs::Int51NetStat::CResponse const&)
void CDlanMonitor::OnInt51NetStatResponse(
  const CMACAddress& adapter, 
  const HomePlugMMEs::Int51NetStat::CResponse& mme)
{
  std::map<CMACAddress,NetwAdapter>::iterator itNIC;

  if((itNIC = m_mapNICs.find(adapter)) != m_mapNICs.end())
  {
    bool bUpdate = false;

    LocalDevice& localDevice = UpdateLocalDevice(itNIC, mme.GetAddress(), true, 
      CDlanDevice::eHP1, false, "", false, UserDataResponse(), true, CMACAddress::Null(), false, bUpdate);

    std::list<HomePlugMMEs::Int51NetStat::Destination> listDestinations = mme.GetDestinations();
    for(std::list<HomePlugMMEs::Int51NetStat::Destination>::iterator itDest = listDestinations.begin();
      (itDest != listDestinations.end()); itDest++)
    {
      if(itDest->GetAddress() != CMACAddress::Null())
      {
        if(itDest->IsToneMapValid())
        {
          bool bTurbo =
            itNIC->second.setRemoteTurboResponses.find(itDest->GetAddress()) != itNIC->second.setRemoteTurboResponses.end();

          UpdateRemoteDevice(localDevice, itDest->GetAddress(), true, 
            bTurbo ? CDlanDevice::eTurbo : CDlanDevice::eHP1, !bTurbo, "", false, UserDataResponse(), true, 
            itDest->GetTxRate(), 0.0, false, std::map<CMACAddress, CDlanDataRates>(), true, CMACAddress(), true, bUpdate);
        }
        else
        {
          itNIC->second.setDevicesToTrigger.insert(itDest->GetAddress());
        }
      }
    }

    if(bUpdate)
      OnUpdate();
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rdx, %r12
movq %rdi, %r14
addq $0xa8, %rdi
callq 0xdc9e
leaq 0xb0(%r14), %rcx
cmpq %rcx, %rax
je 0x97c9
movq %rax, %rbp
movb $0x0, 0x7(%rsp)
movzwl 0xa(%r12), %eax
movw %ax, 0x14(%rsp)
movl 0x6(%r12), %eax
movl %eax, 0x10(%rsp)
leaq 0xc0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xcecd(%rip), %rdx      # 0x16249
leaq 0xb0(%rsp), %r13
movq %r13, %rdi
movq %rdx, %rsi
callq 0x642c
leaq 0x40(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x60(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x80(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0xa0(%rsp), %r15
movq %r15, -0x10(%r15)
movq %rax, -0x8(%r15)
movb %al, (%r15)
leaq 0x118(%rsp), %rbx
movl %eax, (%rbx)
movw $0x0, 0x4(%rbx)
subq $0x8, %rsp
leaq 0xf(%rsp), %r11
leaq 0x38(%rsp), %r10
leaq 0x18(%rsp), %rdx
movq %r14, %rdi
movq %rbp, %rsi
movl $0x1, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r11
pushq %rax
pushq %rbx
pushq $0x1
pushq %r10
pushq %rax
pushq %r13
callq 0x80e6
addq $0x40, %rsp
movq %rax, 0x110(%rsp)
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x9441
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x9463
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x947f
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x949b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4270
movq %r14, 0xf0(%rsp)
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x94c8
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x4270
leaq 0x18(%r12), %rsi
addq $0xcc, %r12
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0xd33e
movq 0x118(%rsp), %r13
cmpq %rbx, %r13
je 0x978a
leaq 0x98(%rbp), %rax
movq %rax, 0x108(%rsp)
leaq 0x68(%rbp), %rax
movq %rax, 0x100(%rsp)
addq $0x70, %rbp
movq %rbp, 0xf8(%rsp)
xorl %r15d, %r15d
leaq 0x10(%r13), %rbp
movq %r14, %rdi
movq %rbp, %rsi
callq 0xc2f0
movzwl 0x34(%rsp), %eax
orl 0x30(%rsp), %eax
je 0x977d
movq %rbp, %rdi
callq 0xc354
testb %al, %al
je 0x9762
movq %r14, %rdi
movq %rbp, %rsi
callq 0xc2f0
movq 0x100(%rsp), %rdi
movq %r14, %rsi
callq 0xf3a4
movq %rax, %r12
leaq 0xea(%rsp), %rdi
movq %rbp, %rsi
callq 0xc2f0
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
leaq 0xccb2(%rip), %rdx      # 0x16249
movq %rdx, %rsi
callq 0x642c
xorl %r9d, %r9d
xorl %r8d, %r8d
cmpq 0xf8(%rsp), %r12
sete %r9b
setne %r8b
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq %r15, 0x38(%rsp)
movb %r15b, 0x40(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %r15, 0x58(%rsp)
movb %r15b, 0x60(%rsp)
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
movq %r15, 0x78(%rsp)
movb %r15b, 0x80(%rsp)
leaq 0xa0(%rsp), %rbp
movq %rbp, 0x90(%rsp)
movq %r15, 0x98(%rsp)
movb %r15b, 0xa0(%rsp)
movzwl 0x16(%r13), %eax
cvtsi2sd %eax, %xmm0
divsd 0xcd48(%rip), %xmm0     # 0x16370
mulsd 0xcd48(%rip), %xmm0     # 0x16378
addsd 0xcd48(%rip), %xmm0     # 0x16380
movq %r15, 0xc0(%rsp)
xorps %xmm1, %xmm1
movaps %xmm1, 0xb0(%rsp)
leaq 0xb8(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq %rax, 0xd0(%rsp)
movq %r15, 0xd8(%rsp)
movl %r15d, 0x8(%rsp)
movw $0x0, 0xc(%rsp)
xorps %xmm1, %xmm1
movq 0x110(%rsp), %rsi
leaq 0xea(%rsp), %rdx
movl $0x1, %ecx
leaq 0x7(%rsp), %rax
pushq %rax
movl $0x1, %eax
pushq %rax
leaq 0x18(%rsp), %rdi
pushq %rdi
pushq %rax
leaq 0xd0(%rsp), %r12
pushq %r12
pushq %r15
pushq %rax
pushq %r14
pushq %r15
pushq %rbx
callq 0x85ba
addq $0x50, %rsp
movq %r12, %rdi
callq 0x60e0
movq 0x90(%rsp), %rdi
cmpq %rbp, %rdi
leaq 0x118(%rsp), %rbx
je 0x96ea
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x970c
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x9728
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x9744
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x977d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x977d
movq %r14, %rdi
movq %rbp, %rsi
callq 0xc2f0
movq 0x108(%rsp), %rdi
movq %r14, %rsi
callq 0xf2c0
movq (%r13), %r13
cmpq %rbx, %r13
jne 0x9522
cmpb $0x0, 0x7(%rsp)
je 0x97a7
movq 0xf0(%rsp), %rax
movq 0x30(%rax), %rdi
testq %rdi, %rdi
je 0x97a7
movq (%rdi), %rax
callq *(%rax)
movq 0x118(%rsp), %rdi
cmpq %rbx, %rdi
je 0x97c9
movq (%rdi), %r14
movl $0x20, %esi
callq 0x4270
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x97b4
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9863
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0xbf00
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x9890
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x9890
movq %rax, %r14
jmp 0x9890
jmp 0x9863
jmp 0x9863
jmp 0x9863
jmp 0x9863
movq %rax, %r14
leaq 0xb0(%rsp), %rdi
callq 0x60e0
leaq 0x30(%rsp), %rdi
callq 0xbf00
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x9866
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x9866
jmp 0x9863
jmp 0x9863
jmp 0x9863
movq %rax, %r14
movq 0x118(%rsp), %rdi
leaq 0x118(%rsp), %rbx
cmpq %rbx, %rdi
je 0x9890
movq (%rdi), %r15
movl $0x20, %esi
callq 0x4270
movq %r15, %rdi
cmpq %rbx, %r15
jne 0x987b
movq %r14, %rdi
callq 0x43e0