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

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

    if(mme.IsRemote())
    {
      for(std::map<CMACAddress,LocalDevice>::iterator itLocalDevice = itNIC->second.mapLocalDevices.begin();
        (itLocalDevice != itNIC->second.mapLocalDevices.end()); ++itLocalDevice)
      {
        if(itLocalDevice->second.mapRemoteDeviceAges.find(mme.GetAddress()) != itLocalDevice->second.mapRemoteDeviceAges.end())
        {
          UpdateRemoteDevice(itLocalDevice->second, mme.GetAddress(), true, CDlanDevice::eTurbo, false, "", false, 
            UserDataResponse(mme.GetManufacturer() + " " + mme.GetProductName()), false, 0.0, 0.0, true, 
            std::map<CMACAddress, CDlanDataRates>(), true, CMACAddress(), true, bUpdate);
          break;
        }
      }

      itNIC->second.setRemoteTurboResponses.insert(mme.GetAddress());
    }
    else
    {
      UpdateLocalDevice(itNIC, mme.GetAddress(), true, CDlanDevice::eTurbo, false, "", false, 
        mme.GetManufacturer() + " " + mme.GetProductName(), false, CMACAddress::Null(), false, bUpdate);
    }

    if(bUpdate)
      OnUpdate();
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rdx, %r15
movq %rdi, %rbx
addq $0xa8, %rdi
callq 0xccd4
movq %rax, %r14
leaq 0xb0(%rbx), %rax
cmpq %rax, %r14
je 0x9250
movb $0x0, 0x56(%rsp)
testb $0x1, 0x15(%r15)
jne 0x903b
movzwl 0xa(%r15), %eax
movw %ax, 0xd4(%rsp)
movl 0x6(%r15), %eax
movl %eax, 0xd0(%rsp)
leaq 0xb32e(%rip), %rsi      # 0x14249
leaq 0x110(%rsp), %r12
leaq 0x60(%rsp), %rdx
movq %r12, %rdi
callq 0x4ab0
leaq 0x90(%rsp), %rdi
movq %r15, %rsi
callq 0xaf30
leaq 0xb115(%rip), %rdx      # 0x1405c
leaq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0xaf10
leaq 0x70(%rsp), %rdi
movq %r15, %rsi
callq 0xaf60
leaq 0xf0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0x70(%rsp), %rdx
callq 0xaea9
leaq 0x148(%rsp), %r15
leaq 0xf0(%rsp), %rsi
movq %r15, %rdi
callq 0xafae
leaq 0x58(%rsp), %rax
andw $0x0, 0x4(%rax)
andl $0x0, (%rax)
leaq 0x56(%rsp), %rcx
movq %rcx, 0x30(%rsp)
movq %rax, 0x20(%rsp)
andl $0x0, 0x28(%rsp)
movq %r15, 0x10(%rsp)
andl $0x0, 0x18(%rsp)
movq %r12, (%rsp)
andl $0x0, 0x8(%rsp)
leaq 0xd0(%rsp), %rdx
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
movl %ecx, %r8d
xorl %r9d, %r9d
callq 0x7bd4
leaq 0x148(%rsp), %rdi
callq 0x589e
leaq 0xf0(%rsp), %rdi
callq 0x4170
leaq 0x70(%rsp), %rdi
callq 0x4170
leaq 0xb0(%rsp), %rdi
callq 0x4170
leaq 0x90(%rsp), %rdi
callq 0x4170
leaq 0x110(%rsp), %rdi
callq 0x4170
jmp 0x923b
movq %rbx, 0x68(%rsp)
movq 0x1a0(%r14), %r12
leaq 0x190(%r14), %rbx
leaq 0x6(%r15), %rbp
leaq 0x148(%rsp), %r13
cmpq %rbx, %r12
je 0x9215
leaq 0x38(%r12), %rdi
movzwl 0x4(%rbp), %eax
movw %ax, 0x14c(%rsp)
movl (%rbp), %eax
movl %eax, 0x148(%rsp)
movq %r13, %rsi
callq 0xd10c
leaq 0x40(%r12), %rcx
cmpq %rcx, %rax
jne 0x909d
movq %r12, %rdi
callq 0x41e0
movq %rax, %r12
jmp 0x905a
movzwl 0x4(%rbp), %eax
movw %ax, 0x5c(%rsp)
movl (%rbp), %eax
movl %eax, 0x58(%rsp)
leaq 0xb195(%rip), %rsi      # 0x14249
leaq 0xf0(%rsp), %r13
leaq 0x57(%rsp), %rdx
movq %r13, %rdi
callq 0x4ab0
leaq 0x70(%rsp), %rdi
movq %r15, %rsi
callq 0xaf30
leaq 0xaf7f(%rip), %rdx      # 0x1405c
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0xaf10
leaq 0xd0(%rsp), %rdi
movq %r15, %rsi
callq 0xaf60
leaq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
callq 0xaea9
leaq 0x148(%rsp), %r15
leaq 0xb0(%rsp), %rsi
movq %r15, %rdi
callq 0xafae
leaq 0x118(%rsp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x60(%rsp), %rax
andw $0x0, 0x4(%rax)
addq $0x28, %r12
andl $0x0, (%rax)
leaq 0x56(%rsp), %rcx
movq %rcx, 0x48(%rsp)
pushq $0x1
popq %rcx
movl %ecx, 0x40(%rsp)
movq %rax, 0x38(%rsp)
movl %ecx, 0x30(%rsp)
leaq 0x110(%rsp), %rax
movq %rax, 0x28(%rsp)
movl %ecx, 0x20(%rsp)
movq %r15, 0x10(%rsp)
andl $0x0, 0x18(%rsp)
movq %r13, (%rsp)
andl $0x0, 0x8(%rsp)
leaq 0x58(%rsp), %rdx
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
movq %r12, %rsi
movl %ecx, %r8d
xorl %r9d, %r9d
callq 0x7f00
leaq 0x110(%rsp), %rdi
callq 0x5a86
leaq 0x148(%rsp), %rdi
callq 0x589e
leaq 0xb0(%rsp), %rdi
callq 0x4170
leaq 0xd0(%rsp), %rdi
callq 0x4170
leaq 0x90(%rsp), %rdi
callq 0x4170
leaq 0x70(%rsp), %rdi
callq 0x4170
leaq 0xf0(%rsp), %rdi
callq 0x4170
addq $0x68, %r14
movzwl 0x4(%rbp), %eax
leaq 0x148(%rsp), %rsi
movw %ax, 0x4(%rsi)
movl (%rbp), %eax
movl %eax, (%rsi)
movq %r14, %rdi
callq 0xdfea
movq 0x68(%rsp), %rbx
cmpb $0x1, 0x56(%rsp)
jne 0x9250
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x9250
movq (%rdi), %rax
callq *(%rax)
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x110(%rsp), %rdi
callq 0x5a86
leaq 0x148(%rsp), %rdi
callq 0x589e
jmp 0x9284
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x4170
jmp 0x9296
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x4170
jmp 0x92a8
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x4170
jmp 0x92ba
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x4170
leaq 0xf0(%rsp), %rdi
jmp 0x9332
movq %rax, %rbx
jmp 0x92c4
jmp 0x9344
movq %rax, %rbx
leaq 0x148(%rsp), %rdi
callq 0x589e
jmp 0x92ea
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x4170
jmp 0x92fc
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x4170
jmp 0x930b
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x4170
jmp 0x931d
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x4170
leaq 0x110(%rsp), %rdi
callq 0x4170
movq %rbx, %rdi
callq 0x4410
movq %rax, %rbx
jmp 0x932a
movq %rax, %rbx
jmp 0x9337
nop