// File: /workspace/github_cpp_makefile_star2_O1/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 0xdefe
leaq 0xb0(%r14), %rcx
cmpq %rcx, %rax
je 0x9955
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 0xcd49(%rip), %rdx      # 0x16249
leaq 0xb0(%rsp), %r13
movq %r13, %rdi
movq %rdx, %rsi
callq 0x6476
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 0x81d6
addq $0x40, %rsp
movq %rax, 0x110(%rsp)
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x95c5
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x95e7
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x9603
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x961f
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4270
movq %r14, 0xf0(%rsp)
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x964c
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 0xd5bc
movq 0x118(%rsp), %r13
cmpq %rbx, %r13
je 0x9916
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 0xc560
movzwl 0x34(%rsp), %eax
orl 0x30(%rsp), %eax
je 0x9909
movq %rbp, %rdi
callq 0xc5c4
testb %al, %al
je 0x98ee
movq %r14, %rdi
movq %rbp, %rsi
callq 0xc560
movq 0x100(%rsp), %rdi
movq %r14, %rsi
callq 0xf5f6
movq %rax, %r12
leaq 0xea(%rsp), %rdi
movq %rbp, %rsi
callq 0xc560
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
leaq 0xcb2e(%rip), %rdx      # 0x16249
movq %rdx, %rsi
callq 0x6476
xorl %r9d, %r9d
xorl %r8d, %r8d
cmpq 0xf8(%rsp), %r12
sete %r9b
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
setne %r8b
divsd 0xcc04(%rip), %xmm0     # 0x163b0
mulsd 0xcc04(%rip), %xmm0     # 0x163b8
addsd 0xcc04(%rip), %xmm0     # 0x163c0
xorps %xmm1, %xmm1
movaps %xmm1, 0xc0(%rsp)
movaps %xmm1, 0xd0(%rsp)
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 0x8748
addq $0x50, %rsp
movq %r12, %rdi
callq 0x612a
movq 0x90(%rsp), %rdi
cmpq %rbp, %rdi
leaq 0x118(%rsp), %rbx
je 0x9876
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x9898
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x98b4
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x98d0
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x9909
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x9909
movq %r14, %rdi
movq %rbp, %rsi
callq 0xc560
movq 0x108(%rsp), %rdi
movq %r14, %rsi
callq 0xf512
movq (%r13), %r13
cmpq %rbx, %r13
jne 0x96a6
cmpb $0x0, 0x7(%rsp)
je 0x9933
movq 0xf0(%rsp), %rax
movq 0x30(%rax), %rdi
testq %rdi, %rdi
je 0x9933
movq (%rdi), %rax
callq *(%rax)
movq 0x118(%rsp), %rdi
cmpq %rbx, %rdi
je 0x9955
movq (%rdi), %r14
movl $0x20, %esi
callq 0x4270
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x9940
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x99ef
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0xc160
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x9a1c
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x9a1c
movq %rax, %r14
jmp 0x9a1c
jmp 0x99ef
jmp 0x99ef
jmp 0x99ef
jmp 0x99ef
movq %rax, %r14
leaq 0xb0(%rsp), %rdi
callq 0x612a
leaq 0x30(%rsp), %rdi
callq 0xc160
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x99f2
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x99f2
jmp 0x99ef
jmp 0x99ef
jmp 0x99ef
movq %rax, %r14
movq 0x118(%rsp), %rdi
leaq 0x118(%rsp), %rbx
cmpq %rbx, %rdi
je 0x9a1c
movq (%rdi), %r15
movl $0x20, %esi
callq 0x4270
movq %r15, %rdi
cmpq %rbx, %r15
jne 0x9a07
movq %r14, %rdi
callq 0x43e0