LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/tools/../common/hpmmes.h
// Function: HomePlugMMEs::TurboVSHdr::IsValid(IPacket const&, unsigned char, unsigned char)
static bool IsValid(const IPacket& pkt, uint8_t expectedMsgID, uint8_t expectedMsgLen)
    {
      return
        MmeHdr::IsValid(pkt, eTurboVendorSpecMmeHdr, (sizeof(TurboVSHdr) - sizeof(MmeHdr)) + expectedMsgLen) && 
        (((TurboVSHdr*)pkt.Data())->cOUI[0] == cCogencyOUI[0]) &&
        (((TurboVSHdr*)pkt.Data())->cOUI[1] == cCogencyOUI[1]) &&
        (((TurboVSHdr*)pkt.Data())->cOUI[2] == cCogencyOUI[2]) &&
        (((TurboVSHdr*)pkt.Data())->cMsgID == (expectedMsgID | 0x80));
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
addb $0x4, %dl
movzbl %dl, %edx
pushq $0x2
popq %rsi
callq 0x5c28
testb %al, %al
je 0x5cde
movq (%r14), %rax
movq %r14, %rdi
callq *(%rax)
cmpb $0x0, 0x11(%rax)
jne 0x5cde
movq (%r14), %rax
movq %r14, %rdi
callq *(%rax)
cmpb $0x4, 0x12(%rax)
jne 0x5cde
movq (%r14), %rax
movq %r14, %rdi
callq *(%rax)
cmpb $-0x79, 0x13(%rax)
jne 0x5cde
movq (%r14), %rax
movq %r14, %rdi
callq *(%rax)
orb $-0x80, %bl
cmpb %bl, 0x14(%rax)
sete %al
jmp 0x5ce0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/tools/../common/hpmmes.h
// Function: HomePlugAvMMEs::ThunderVSHdr::IsValid(IPacket const&, unsigned short)
static bool IsValid(const IPacket& pkt, uint16_t expectedMmeType)
    {
      return
        (pkt.Size() >= sizeof(ThunderVSHdr)) &&
        (((ThunderVSHdr*)pkt.Data())->cMmeVersion == eMmeVersion0) &&
        (((ThunderVSHdr*)pkt.Data())->uMmeType == htoles(expectedMmeType)) &&
        (((ThunderVSHdr*)pkt.Data())->cOUI[0] == cIntellonOUI[0]) &&
        (((ThunderVSHdr*)pkt.Data())->cOUI[1] == cIntellonOUI[1]) &&
        (((ThunderVSHdr*)pkt.Data())->cOUI[2] == cIntellonOUI[2]);
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x8(%rax)
cmpq $0x14, %rax
jb 0x5edf
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
cmpb $0x0, 0xe(%rax)
jne 0x5edf
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
cmpw %bp, 0xf(%rax)
jne 0x5edf
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
cmpb $0x0, 0x11(%rax)
jne 0x5edf
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
cmpb $-0x50, 0x12(%rax)
jne 0x5edf
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
cmpb $0x52, 0x13(%rax)
sete %al
jmp 0x5ee1
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/tools/../common/hpmmes.h
// Function: HomePlugAvMMEs::ThunderVSV1Hdr::IsValid(IPacket const&, unsigned short)
static bool IsValid(const IPacket& pkt, uint16_t expectedMmeType)
    {
      return
        (pkt.Size() >= sizeof(ThunderVSHdr)) &&
        (((ThunderVSV1Hdr*)pkt.Data())->cMmeVersion == eMmeVersion1) &&
        (((ThunderVSV1Hdr*)pkt.Data())->uMmeType == htoles(expectedMmeType)) &&
        (((ThunderVSV1Hdr*)pkt.Data())->uFragInfo == 0) &&
        (((ThunderVSV1Hdr*)pkt.Data())->cOUI[0] == cIntellonOUI[0]) &&
        (((ThunderVSV1Hdr*)pkt.Data())->cOUI[1] == cIntellonOUI[1]) &&
        (((ThunderVSV1Hdr*)pkt.Data())->cOUI[2] == cIntellonOUI[2]);
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x8(%rax)
cmpq $0x14, %rax
jb 0x5f54
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
cmpb $0x1, 0xe(%rax)
jne 0x5f54
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
cmpw %bp, 0xf(%rax)
jne 0x5f54
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
cmpw $0x0, 0x11(%rax)
jne 0x5f54
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
cmpb $0x0, 0x13(%rax)
jne 0x5f54
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
cmpb $-0x50, 0x14(%rax)
jne 0x5f54
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
cmpb $0x52, 0x15(%rax)
sete %al
jmp 0x5f56
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/dlandevice.cpp
// Function: CDlanLocalDevice::UpdateRemoteDevice(CDlanRemoteDevice const&)
bool CDlanLocalDevice::UpdateRemoteDevice(
  const CDlanRemoteDevice& remoteDevice)
{
  bool bResult = false;

  CDlanRemoteDeviceList::iterator itDevice = m_remoteDeviceList.begin();
  for( ; (itDevice != m_remoteDeviceList.end()); itDevice++)
  {
    if(itDevice->GetAddress() >= remoteDevice.GetAddress())
      break;
  }
  
  if((itDevice == m_remoteDeviceList.end()) || (itDevice->GetAddress() != remoteDevice.GetAddress()))
  {
    m_remoteDeviceList.insert(itDevice, remoteDevice);
    bResult = true;
  }
  else if(*itDevice != remoteDevice)
  {
    *itDevice = remoteDevice;
    bResult = true;
  }

  return bResult;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0xa0, %r14
movq %r14, %r12
movq (%r12), %r12
cmpq %r14, %r12
je 0x6370
leaq 0x10(%r12), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x63f0
testb %al, %al
je 0x6344
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6400
testb %al, %al
je 0x638c
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x6410
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r15, %rdi
movq %rbx, %rsi
callq 0x643e
testb %al, %al
je 0x63a8
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6448
jmp 0x637e
xorl %eax, %eax
jmp 0x6380
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/dlandevice.cpp
// Function: CDlanLocalDevice::RemoveRemoteDevice(CMACAddress const&)
bool CDlanLocalDevice::RemoveRemoteDevice(
  const CMACAddress& remoteDeviceAddr)
{
  for(CDlanRemoteDeviceList::iterator itDevice = m_remoteDeviceList.begin();
    itDevice != m_remoteDeviceList.end(); ++itDevice)
  {
    if(itDevice->GetAddress() == remoteDeviceAddr)
    {
      m_remoteDeviceList.erase(itDevice);
      return true;
    }
  }
  
  return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
addq $0xa0, %rbx
movq %rbx, %r14
movq (%r14), %r14
cmpq %rbx, %r14
je 0x63e4
leaq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0x5b4d
testb %al, %al
je 0x63c1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6496
cmpq %rbx, %r14
setne %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/dlandevice.h
// Function: CDlanRemoteDevice::operator=(CDlanRemoteDevice const&)
CDlanRemoteDevice& operator=(const CDlanRemoteDevice& rhs) 
  { 
    CDlanDevice::operator=(rhs); 
    CDlanDataRates::operator=(rhs);
    m_remoteDataRates = rhs.m_remoteDataRates;
    m_bridgedAddresses = rhs.m_bridgedAddresses;
    return *this;
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x66e8
movups 0x90(%rbx), %xmm0
movups %xmm0, 0x90(%r14)
movl $0xa0, %edi
leaq (%rbx,%rdi), %rsi
addq %r14, %rdi
callq 0x674e
movl $0xd0, %edi
addq %rdi, %rbx
addq %r14, %rdi
movq %rbx, %rsi
callq 0x6a50
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/dlandevice.h
// Function: CDlanRemoteDevice::operator==(CDlanRemoteDevice const&) const
bool operator==(const CDlanRemoteDevice& rhs) const 
  {
    return 
      CDlanDevice::operator==(rhs) && 
      CDlanDataRates::operator==(rhs) && 
      (m_remoteDataRates == rhs.m_remoteDataRates) &&
      (m_bridgedAddresses == rhs.m_bridgedAddresses);
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x651e
testb %al, %al
je 0x6513
movsd 0x90(%r14), %xmm0
ucomisd 0x90(%rbx), %xmm0
jne 0x6513
jp 0x6513
movsd 0x98(%r14), %xmm0
ucomisd 0x98(%rbx), %xmm0
jne 0x6513
jp 0x6513
movl $0xa0, %esi
leaq (%r14,%rsi), %rdi
addq %rbx, %rsi
callq 0x65c6
testb %al, %al
je 0x6513
movl $0xd0, %eax
addq %rax, %r14
addq %rax, %rbx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x667b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/dlandevice.h
// Function: CDlanDevice::operator==(CDlanDevice const&) const
bool operator==(const CDlanDevice& rhs) const 
  { 
    return
      (m_addr == rhs.m_addr) && 
      (m_eType == rhs.m_eType) &&
      (m_strVersion == rhs.m_strVersion) &&
      (m_strMftString == rhs.m_strMftString) && 
      (m_strUserString == rhs.m_strUserString) &&
      (m_strAvlnString == rhs.m_strAvlnString);
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x5b4d
testb %al, %al
je 0x6587
movl 0x8(%r14), %eax
cmpl 0x8(%rbx), %eax
jne 0x6587
leaq 0x10(%r14), %rdi
leaq 0x10(%rbx), %rsi
callq 0x6591
testb %al, %al
je 0x6587
leaq 0x30(%r14), %rdi
leaq 0x30(%rbx), %rsi
callq 0x6591
testb %al, %al
je 0x6587
leaq 0x50(%r14), %rdi
leaq 0x50(%rbx), %rsi
callq 0x6591
testb %al, %al
je 0x6587
addq $0x70, %r14
addq $0x70, %rbx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6591
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/dlandevice.h
// Function: CDlanDevice::operator=(CDlanDevice const&)
CDlanDevice& operator=(const CDlanDevice& rhs)
  { 
    m_addr = rhs.m_addr; 
    m_eType = rhs.m_eType; 
    m_strVersion = rhs.m_strVersion; 
    m_strMftString = rhs.m_strMftString; 
    m_strUserString = rhs.m_strUserString; 
    m_strAvlnString = rhs.m_strAvlnString;
    return *this; 
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpq %rdi, %rsi
je 0x6705
movzwl 0x4(%r14), %eax
movw %ax, 0x4(%rbx)
movl (%r14), %eax
movl %eax, (%rbx)
movl 0x8(%r14), %eax
movl %eax, 0x8(%rbx)
leaq 0x10(%r14), %rsi
leaq 0x10(%rbx), %rdi
callq 0x41b0
leaq 0x30(%r14), %rsi
leaq 0x30(%rbx), %rdi
callq 0x41b0
leaq 0x50(%r14), %rsi
leaq 0x50(%rbx), %rdi
callq 0x41b0
addq $0x70, %r14
leaq 0x70(%rbx), %rdi
movq %r14, %rsi
callq 0x41b0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/dlanmonitor.cpp
// Function: CDlanMonitor::RemoveFromDeviceLists(std::set<CMACAddress, std::less<CMACAddress>, std::allocator<CMACAddress>> const&)
void CDlanMonitor::RemoveFromDeviceLists(
  const std::set<CMACAddress>& setDevices)
{
  bool bUpdate = false;
  RemoveDevices(bUpdate, false, setDevices);
  if(bUpdate) 
    OnUpdate();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rcx
movq %rdi, %rbx
leaq 0x7(%rsp), %r14
movb $0x0, (%r14)
movq %r14, %rsi
xorl %edx, %edx
callq 0x729e
cmpb $0x1, (%r14)
jne 0x7296
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x7296
movq (%rdi), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/dlanmonitor.cpp
// Function: CDlanMonitor::Drumbeat()
unsigned long CDlanMonitor::Drumbeat()
{
  if(m_ulTick == 0)
  {
    bool bUpdate = false;
    UpdateAdapters(bUpdate, m_ifc.GetAdapters());
    RemoveDevices(bUpdate, true);
    TickAdapters();

    if(bUpdate)
      OnUpdate();
  }

  bool bStillPacketsPending = false;
  SendQueuedPackets(bStillPacketsPending);

  unsigned long ulWait = bStillPacketsPending ? 
    m_timings.DelayedSendingInterval : (m_timings.TickInterval - m_ulTick);

  m_ulTick += ulWait;
  m_ulTick %= m_timings.TickInterval;

  return ulWait;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x18(%rdi)
jne 0x7845
leaq 0xf(%rsp), %r14
movb $0x0, (%r14)
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x78a0
leaq 0x18(%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)
pushq $0x1
popq %rdx
leaq 0x10(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x729e
leaq 0x10(%rsp), %rdi
callq 0x595a
movq %rbx, %rdi
callq 0x7a84
cmpb $0x1, 0xf(%rsp)
jne 0x7845
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x7845
movq (%rdi), %rax
callq *(%rax)
leaq 0x10(%rsp), %r14
movb $0x0, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7b3c
movq 0x18(%rbx), %rax
movq 0x38(%rbx), %rsi
cmpb $0x0, (%r14)
je 0x786d
movq 0x40(%rbx), %rcx
jmp 0x7873
movq %rsi, %rcx
subq %rax, %rcx
addq %rcx, %rax
xorl %edx, %edx
divq %rsi
movq %rdx, 0x18(%rbx)
movq %rcx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x595a
movq %rbx, %rdi
callq 0x4410
nop
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/dlanmonitor.cpp
// Function: CDlanMonitor::TickAdapters()
void CDlanMonitor::TickAdapters()
{
  for(std::map<CMACAddress,NetwAdapter>::iterator itNIC = m_mapNICs.begin(); 
    (itNIC != m_mapNICs.end()); ++itNIC)
  {
    itNIC->second.iTick++;
    
    if(itNIC->second.iFastBroadcastCnt)
    {
      if(itNIC->second.iTick == 1)
      {
        SendLocalDeviceBroadcasts(itNIC);
        SendRemoteDeviceBroadcasts(itNIC);
        TriggerUnknownDevices(itNIC);

        itNIC->second.iTick = 0;
        itNIC->second.iFastBroadcastCnt--;
      }
    }
    else if(itNIC->second.iTick == 12)
    {
      TriggerUnknownDevices(itNIC);
      ClearUnknownDevices(itNIC);
    }
    else if(itNIC->second.iTick == 16)
    {
      SendLocalDeviceBroadcasts(itNIC);
    }
    else if(itNIC->second.iTick == 20)
    {
      SendRemoteDeviceBroadcasts(itNIC);
      itNIC->second.iTick = 0;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0xc0(%rdi), %r14
leaq 0xb0(%rdi), %r15
cmpq %r15, %r14
je 0x7b36
movl 0x28(%r14), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x28(%r14)
cmpl $0x0, 0x2c(%r14)
je 0x7ae5
testl %eax, %eax
jne 0x7b26
movq %rbx, %rdi
movq %r14, %rsi
callq 0x81da
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8422
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8534
andl $0x0, 0x28(%r14)
decl 0x2c(%r14)
jmp 0x7b26
cmpl $0x13, %eax
je 0x7b16
cmpl $0xf, %eax
je 0x7b09
cmpl $0xb, %eax
jne 0x7b26
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8534
movq %r14, %rsi
callq 0x8a3c
jmp 0x7b26
movq %rbx, %rdi
movq %r14, %rsi
callq 0x81da
jmp 0x7b26
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8422
andl $0x0, 0x28(%r14)
movq %r14, %rdi
callq 0x41e0
movq %rax, %r14
jmp 0x7a9a
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/dlanmonitor.cpp
// Function: CDlanMonitor::SendQueuedPackets(bool&)
void CDlanMonitor::SendQueuedPackets(
  bool& bStillPacketsPending)
{
  for(std::map<CMACAddress,NetwAdapter>::iterator itNIC = m_mapNICs.begin(); 
    (itNIC != m_mapNICs.end()); ++itNIC)
  {
    if(!itNIC->second.queuePendingPackets.empty())
    {
      IPacket* pPacket = itNIC->second.queuePendingPackets.front();
      itNIC->second.queuePendingPackets.pop();

      m_ifc.SendPacket(itNIC->first, *pPacket);
      delete pPacket;

      if(!itNIC->second.queuePendingPackets.empty())
        bStillPacketsPending = true;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0xc0(%rdi), %r12
leaq 0xb0(%rdi), %r15
cmpq %r15, %r12
je 0x7bc4
movq 0x1c8(%r12), %rax
cmpq %rax, 0x1e8(%r12)
je 0x7bb7
leaq 0x1b8(%r12), %rdi
leaq 0x20(%r12), %r13
movq (%rax), %rbp
callq 0xd068
movq 0x28(%r14), %rdi
movq (%rdi), %rax
movq %r13, %rsi
movq %rbp, %rdx
callq *0x10(%rax)
movq %rbp, %rdi
pushq $0x8
popq %rsi
callq 0x4280
movq 0x1e8(%r12), %rax
cmpq 0x1c8(%r12), %rax
je 0x7bb7
movb $0x1, (%rbx)
movq %r12, %rdi
callq 0x41e0
movq %rax, %r12
jmp 0x7b5b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/dlanmonitor.cpp
// Function: CDlanMonitor::SendRemoteDeviceBroadcasts(std::_Rb_tree_iterator<std::pair<CMACAddress const, CDlanMonitor::NetwAdapter>>)
void CDlanMonitor::SendRemoteDeviceBroadcasts(
  std::map<CMACAddress,NetwAdapter>::iterator itNIC)
{
  size_t iAvDeviceCnt = 0;
  for(std::map<CMACAddress,LocalDevice>::iterator itLocalDevice = itNIC->second.mapLocalDevices.begin();
    (itLocalDevice != itNIC->second.mapLocalDevices.end()); ++itLocalDevice)
  {
    if(itLocalDevice->second.itPublicDevice->GetType() == CDlanDevice::eThunderbolt)
      iAvDeviceCnt++;
  }

  if(itNIC->second.mapLocalDevices.size() > iAvDeviceCnt)
  {
    if(((m_eMode & eMonitorHP1) == eMonitorHP1) || ((m_eMode & eMonitorTurbo) == eMonitorTurbo))
    {
      itNIC->second.queuePendingPackets.push(
        new HomePlugMMEs::ParamsAndStats::CRequest(CMACAddress::Broadcast(), itNIC->first));

      itNIC->second.queuePendingPackets.push(
        new HomePlugMMEs::TurboChannelCapacities::CRequest(CMACAddress::Broadcast(), itNIC->first, 
        HomePlugMMEs::TurboChannelCapacities::eDirectionFlagTxCaps));
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x1a0(%rsi), %rax
leaq 0x190(%rsi), %r12
xorl %r15d, %r15d
cmpq %r12, %rax
je 0x8463
movq 0x30(%rax), %rcx
xorl %edx, %edx
cmpl $0x2, 0x18(%rcx)
sete %dl
addq %rdx, %r15
movq %rax, %rdi
callq 0x41e0
jmp 0x8444
cmpq %r15, 0x1b0(%rbx)
jbe 0x8512
movl 0x20(%r14), %eax
notl %eax
testb $0x3, %al
setne %cl
testb $0xc, %al
setne %al
testb %al, %cl
jne 0x8512
leaq 0x20(%rbx), %r14
addq $0x1b8, %rbx            # imm = 0x1B8
pushq $0x20
popq %r15
movq %r15, %rdi
callq 0x4270
orl $-0x1, 0x8(%rax)
orw $-0x1, 0xc(%rax)
leaq 0x165b1(%rip), %rcx     # 0x1ea60
movq %rcx, (%rax)
movl (%r14), %ecx
movl %ecx, 0xe(%rax)
movzwl 0x4(%r14), %ecx
movw %cx, 0x12(%rax)
movl $0x7017b88, 0x14(%rax)  # imm = 0x7017B88
movb $0x0, 0x18(%rax)
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0xd1d0
movq %r15, %rdi
callq 0x4270
leaq 0x10(%rsp), %rsi
orw $-0x1, 0x4(%rsi)
movq %rax, %r15
orl $-0x1, (%rsi)
pushq $0x1
popq %rcx
movq %rax, %rdi
movq %r14, %rdx
callq 0xab2e
leaq 0x8(%rsp), %rsi
movq %r15, (%rsi)
movq %rbx, %rdi
callq 0xd1d0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
pushq $0x20
popq %rsi
movq %r15, %rdi
callq 0x4280
movq %rbx, %rdi
callq 0x4410
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/dlanmonitor.cpp
// Function: CDlanMonitor::ClearUnknownDevices(std::_Rb_tree_iterator<std::pair<CMACAddress const, CDlanMonitor::NetwAdapter>>)
void CDlanMonitor::ClearUnknownDevices(
  std::map<CMACAddress,NetwAdapter>::iterator itNIC)
{
  itNIC->second.setParamsAndStatsResponses.clear();
  itNIC->second.setRemoteTurboResponses.clear();
  itNIC->second.setDevicesToTrigger.clear();
  itNIC->second.setReadModDataResponses.clear();
  itNIC->second.mapGetVersionResponses.clear();
  itNIC->second.mapUserDataResponses.clear();
  itNIC->second.mapNetworkInfoResponses.clear();
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
leaq 0x38(%rsi), %rdi
callq 0xd8e2
leaq 0x68(%rbx), %rdi
callq 0xd8e2
leaq 0x98(%rbx), %rdi
callq 0xd8e2
leaq 0xc8(%rbx), %rdi
callq 0xd8e2
leaq 0xf8(%rbx), %rdi
callq 0xd7dc
leaq 0x128(%rbx), %rdi
callq 0xd910
addq $0x158, %rbx            # imm = 0x158
movq %rbx, %rdi
popq %rbx
jmp 0xd93e
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/dlanmonitor.cpp
// Function: CDlanMonitor::OnThunderNetworkInfoConfirm(CMACAddress const&, HomePlugAvMMEs::ThunderNetworkInfo::CConfirm const&)
void CDlanMonitor::OnThunderNetworkInfoConfirm(
  const CMACAddress& adapter, 
  const HomePlugAvMMEs::ThunderNetworkInfo::CConfirm& mme)
{
  std::map<CMACAddress,NetwAdapter>::iterator itNIC;
  
  if((itNIC = m_mapNICs.find(adapter)) != m_mapNICs.end())
  {

    NetworkInfoResponse nwinfo(mme.GetCCoAddress(), mme.GetStations());

    std::list<HomePlugAvMMEs::ThunderNetworkInfo::StationInfo>::const_iterator itStation = nwinfo.stations.begin();
    for( ; (itStation != nwinfo.stations.end()); itStation++)
    {
      if((itStation->GetTxCodedRate() == 255) || (itStation->GetRxCodedRate() == 255))
        break;
    }
    if(itStation == nwinfo.stations.end())
    {
      ThunderNetworkInfo(itNIC, mme.GetAddress(), nwinfo);
    }
    else if(!itNIC->second.bNetworkInfoV1Sent)
    {
      itNIC->second.bNetworkInfoV1Sent = true;
      itNIC->second.queuePendingPackets.push(
        new HomePlugAvMMEs::ThunderNetworkInfoV1::CRequest(CMACAddress::Broadcast(), itNIC->first));
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r12
movq %rdi, %r15
addq $0xa8, %rdi
callq 0xccd4
movq %rax, %r14
leaq 0xb0(%r15), %rax
cmpq %rax, %r14
je 0xa214
movzwl 0x23(%r12), %eax
movw %ax, 0xc(%rsp)
movl 0x1f(%r12), %eax
movl %eax, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0xb38e
movzwl 0xc(%rsp), %eax
leaq 0x30(%rsp), %rbx
movw %ax, -0x4(%rbx)
movl 0x8(%rsp), %eax
movl %eax, -0x8(%rbx)
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0xc7ee
leaq 0x10(%rsp), %rdi
callq 0x580e
movq %rbx, %rax
movq (%rax), %rax
cmpq %rbx, %rax
je 0xa1e6
cmpl $0xff, 0x1c(%rax)
je 0xa198
cmpl $0xff, 0x20(%rax)
jne 0xa17e
cmpq %rbx, %rax
je 0xa1e6
cmpb $0x0, 0x30(%r14)
jne 0xa20c
movb $0x1, 0x30(%r14)
pushq $0x28
popq %rdi
callq 0x4270
movq %rax, %r15
leaq 0x8(%rsp), %rsi
orw $-0x1, 0x4(%rsi)
leaq 0x20(%r14), %rdx
orl $-0x1, (%rsi)
movq %rax, %rdi
callq 0xb3c0
addq $0x1b8, %r14            # imm = 0x1B8
leaq 0x10(%rsp), %rsi
movq %r15, (%rsi)
movq %r14, %rdi
callq 0xd1d0
jmp 0xa20c
movzwl 0xa(%r12), %eax
leaq 0x10(%rsp), %rdx
movw %ax, 0x4(%rdx)
movl 0x6(%r12), %eax
movl %eax, (%rdx)
leaq 0x28(%rsp), %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0xa256
movq %rbx, %rdi
callq 0x580e
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0xa234
movq %rax, %r14
pushq $0x28
popq %rsi
movq %r15, %rdi
callq 0x4280
jmp 0xa237
jmp 0xa234
movq %rax, %r14
movq %rbx, %rdi
jmp 0xa244
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x580e
jmp 0xa24e
movq %rax, %r14
movq %r14, %rdi
callq 0x4410
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/dlandevice.h
// Function: CDlanLocalDevice::operator=(CDlanLocalDevice const&)
CDlanLocalDevice& operator=(const CDlanLocalDevice& rhs) 
  { 
    CDlanDevice::operator=(rhs); 
    m_addrNIC = rhs.m_addrNIC; 
    m_addrCCo = rhs.m_addrCCo; 
    m_remoteDeviceList = rhs.m_remoteDeviceList; 
    return *this; 
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x66e8
cmpq %rbx, %r14
je 0xac6a
movzwl 0x94(%r14), %eax
movw %ax, 0x94(%rbx)
movl 0x90(%r14), %eax
movl %eax, 0x90(%rbx)
movl 0x96(%r14), %eax
movl %eax, 0x96(%rbx)
movzwl 0x9a(%r14), %eax
movw %ax, 0x9a(%rbx)
movl $0xa0, %edi
addq %rdi, %r14
addq %rbx, %rdi
movq %r14, %rsi
callq 0xbe9a
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/dlandevice.h
// Function: CDlanLocalDevice::operator==(CDlanLocalDevice const&) const
bool operator==(const CDlanLocalDevice& rhs) const 
  { 
    return 
      CDlanDevice::operator==(rhs) && 
      (m_addrNIC == rhs.m_addrNIC) && 
      (m_addrCCo == rhs.m_addrCCo) && 
      (m_remoteDeviceList == rhs.m_remoteDeviceList);
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x651e
testb %al, %al
je 0xbe34
movl $0x90, %esi
leaq (%r14,%rsi), %rdi
addq %rbx, %rsi
callq 0x5b4d
testb %al, %al
je 0xbe34
movl $0x96, %esi
leaq (%r14,%rsi), %rdi
addq %rbx, %rsi
callq 0x5b4d
testb %al, %al
je 0xbe34
movl $0xa0, %eax
addq %rax, %r14
addq %rax, %rbx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xbe3e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/hpmmes.h
// Function: HomePlugMMEs::TurboChannelCapacities::RateFromBPBlk(unsigned int)
inline double RateFromBPBlk(uint32_t ulBytesPer336usBlock)
    {
      double dCalculatedPhyRate = ((double)ulBytesPer336usBlock) * 8.0 / (40.0 * 8.4);
      if(dCalculatedPhyRate <= dMaxTrueRate)
        return dCalculatedPhyRate;
      else if((dCalculatedPhyRate > dMaxTrueRate) && (dCalculatedPhyRate <= dMaxHp1Rate))
        return (((dCalculatedPhyRate - dMaxTrueRate) / (dMaxHp1Rate - dMaxTrueRate)) * (14 - 6)) + 6;
      else
        return (((dCalculatedPhyRate - dMaxHp1Rate) / (dMaxTurboRate - dMaxHp1Rate)) * (85 - 14)) + 14;
    }

// Assembly:
movl %edi, %eax
cvtsi2sd %rax, %xmm0
mulsd 0x8085(%rip), %xmm0     # 0x14398
divsd 0x8085(%rip), %xmm0     # 0x143a0
movsd 0x8085(%rip), %xmm1     # 0x143a8
ucomisd %xmm0, %xmm1
jae 0xc382
ucomisd 0x8077(%rip), %xmm0     # 0x143a8
jbe 0xc362
movsd 0x8075(%rip), %xmm1     # 0x143b0
ucomisd %xmm0, %xmm1
jb 0xc362
addsd 0x808f(%rip), %xmm0     # 0x143d8
divsd 0x808f(%rip), %xmm0     # 0x143e0
mulsd 0x803f(%rip), %xmm0     # 0x14398
addsd 0x8047(%rip), %xmm0     # 0x143a8
retq
addsd 0x804e(%rip), %xmm0     # 0x143b8
divsd 0x804e(%rip), %xmm0     # 0x143c0
mulsd 0x804e(%rip), %xmm0     # 0x143c8
addsd 0x804e(%rip), %xmm0     # 0x143d0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/hpsecurity.cpp
// Function: HomePlugAvSecurity::CSetKeyTask::OnThunderSetKeyConfirm(CMACAddress const&, HomePlugAvMMEs::ThunderSetKey::CConfirm const&)
void HomePlugAvSecurity::CSetKeyTask::OnThunderSetKeyConfirm(
  const CMACAddress& adapter, 
  const HomePlugAvMMEs::ThunderSetKey::CConfirm& mme)
{
  if((adapter == m_addrNIC) && (mme.GetAddress() == m_addrLocalDev))
  {
    if(mme.GetStatus() == HomePlugAvMMEs::ThunderSetKey::eSuccess)
    {
      m_bSuccessful = true;
      m_iRetries = 0;
    }
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x20(%rdi), %rsi
movq %rax, %rdi
callq 0x5b4d
testb %al, %al
je 0xee3c
movzwl 0xa(%r14), %eax
movq %rsp, %rdi
movw %ax, 0x4(%rdi)
movl 0x6(%r14), %eax
movl %eax, (%rdi)
leaq 0x26(%rbx), %rsi
callq 0x5b4d
testb %al, %al
je 0xee3c
cmpb $0x0, 0x14(%r14)
jne 0xee3c
movb $0x1, 0x90(%rbx)
andq $0x0, 0x98(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/hptools.cpp
// Function: HomePlugTools::KeyFromPassword(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned char*)
void HomePlugTools::KeyFromPassword(
  const std::string& strPassword,
  unsigned char cKEY[8])
{
  std::string strSaltedPassword = strPassword + std::string("\x08\x85\x6D\xAF\x7C\xF5\x81\x85", 8);
  
  md5_state md5;
  unsigned char digest[16];
  md5_init(&md5);
  md5_process(&md5, (const unsigned char*)strSaltedPassword.data(), strSaltedPassword.size());
  md5_done(&md5, digest);

  for(int i = 2; i <= 1000; i++)
  {
    md5_init(&md5);
    md5_process(&md5, digest, 16);
    md5_done(&md5, digest);
  }

  memcpy(cKEY, digest, 8);

  for(int i = 0; i < 8; i++)
  {
    int iOneBits = 0;

    for(int j = 0x02; j != 0x00; j <<= 1)
      if(j & cKEY[i])
        iOneBits++;

    if((iOneBits & 0x01))
      cKEY[i] &= 0xFE;
    else
      cKEY[i] |= 0x01;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
movabsq $-0x7a7e0a8350927af8, %rcx # imm = 0x8581F57CAF6D8508
movq %rcx, (%rax)
movq $0x8, -0x8(%rax)
movb $0x0, 0x8(%rax)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x11784
leaq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0x4170
movaps 0x571a(%rip), %xmm0     # 0x146e0
movups %xmm0, 0x8(%r14)
andl $0x0, 0x18(%r14)
andq $0x0, (%r14)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x30(%rsp), %r12
movq %r12, %rdi
callq 0xf0ac
movq %rsp, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0xf156
movl $0x3e7, %ebp            # imm = 0x3E7
pushq $0x10
popq %r12
subl $0x1, %ebp
jb 0xf039
movaps 0x56d2(%rip), %xmm0     # 0x146e0
movups %xmm0, 0x38(%rsp)
andl $0x0, 0x48(%rsp)
andq $0x0, 0x30(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xf0ac
movq %r14, %rdi
movq %r15, %rsi
callq 0xf156
jmp 0xf002
movq (%rsp), %rax
movq %rax, (%rbx)
xorl %eax, %eax
pushq $0x2
popq %rcx
cmpq $0x8, %rax
je 0xf07d
movzbl (%rbx,%rax), %esi
xorl %edx, %edx
movl %ecx, %edi
testl %edi, %edi
je 0xf068
movl %edi, %r8d
andl %esi, %r8d
cmpl $0x1, %r8d
sbbl $-0x1, %edx
addl %edi, %edi
jmp 0xf053
andb $-0x2, %sil
andb $0x1, %dl
orb %sil, %dl
xorb $0x1, %dl
movb %dl, (%rbx,%rax)
incq %rax
jmp 0xf045
leaq 0x10(%rsp), %rdi
callq 0x4170
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x4170
movq %rbx, %rdi
callq 0x4410
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/hptools.cpp
// Function: (anonymous namespace)::md5_process((anonymous namespace)::md5_state*, unsigned char const*, unsigned long)
void md5_process(md5_state * md, const unsigned char *in, unsigned long inlen)
{
    unsigned long n;
    while (inlen > 0) {
        if (md->curlen == 0 && inlen >= 64) {
            md5_compress(md, (unsigned char *)in);
            md->length += 64 * 8;
            in += 64;
            inlen -= 64;
        } else {
            n = (inlen < (64 - md->curlen)) ? inlen : (64 - md->curlen);
            memcpy(md->buf + md->curlen, in, (size_t)n);
            md->curlen += n;
            in += n;
            inlen -= n;
            if (md->curlen == 64) {
                md5_compress(md, md->buf);
                md->length += 64 * 8;
                md->curlen = 0;
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x1c(%rdi), %r12
pushq $0x40
popq %rbp
testq %rbx, %rbx
je 0xf147
movl 0x18(%r15), %edi
testq %rdi, %rdi
setne %al
cmpq $0x40, %rbx
setb %cl
orb %al, %cl
jne 0xf0fd
movq %r15, %rdi
movq %r14, %rsi
callq 0xf613
addq $0x200, (%r15)          # imm = 0x200
addq $0x40, %r14
addq $-0x40, %rbx
jmp 0xf0c7
movl %ebp, %r13d
subl %edi, %r13d
cmpq %r13, %rbx
cmovbq %rbx, %r13
addq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x4220
movl 0x18(%r15), %eax
addl %r13d, %eax
movl %eax, 0x18(%r15)
addq %r13, %r14
subq %r13, %rbx
cmpl $0x40, %eax
jne 0xf0c7
movq %r15, %rdi
movq %r12, %rsi
callq 0xf613
addq $0x200, (%r15)          # imm = 0x200
andl $0x0, 0x18(%r15)
jmp 0xf0c7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/hptools.cpp
// Function: (anonymous namespace)::md5_done((anonymous namespace)::md5_state*, unsigned char*)
void md5_done(md5_state * md, unsigned char *out)
{
    int i;

    /* increase the length of the message */
    md->length += md->curlen * 8;

    /* append the '1' bit */
    md->buf[md->curlen++] = (unsigned char)0x80;

    /* if the length is currently above 56 bytes we append zeros
     * then compress.  Then we can fall back to padding zeros and length
     * encoding like normal.
     */
    if (md->curlen > 56) {
        while (md->curlen < 64) {
            md->buf[md->curlen++] = (unsigned char)0;
        }
        md5_compress(md, md->buf);
        md->curlen = 0;
    }

    /* pad upto 56 bytes of zeroes */
    while (md->curlen < 56) {
        md->buf[md->curlen++] = (unsigned char)0;
    }

    /* store length */
    STORE64L(md->length, md->buf+56);
    md5_compress(md, md->buf);

    /* copy output */
    for (i = 0; i < 4; i++) {
        STORE32L(md->state[i], out+(4*i));
    }
#ifdef LTC_CLEAN_STACK
    memset(md, 0, sizeof(md5_state));
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x18(%rdi), %eax
leal (,%rax,8), %ecx
addq %rcx, (%rdi)
leaq 0x1c(%rdi), %r15
leal 0x1(%rax), %ecx
movl %ecx, 0x18(%rdi)
movb $-0x80, 0x1c(%rdi,%rax)
cmpl $0x39, %ecx
jb 0xf1b3
addq $0x1d, %rax
leaq -0x1c(%rax), %rcx
cmpq $0x3f, %rcx
ja 0xf1a1
leal -0x1b(%rax), %ecx
movl %ecx, 0x18(%r14)
movb $0x0, (%r14,%rax)
incq %rax
jmp 0xf186
movq %r14, %rdi
movq %r15, %rsi
callq 0xf613
andl $0x0, 0x18(%r14)
xorl %ecx, %ecx
movl %ecx, %eax
cmpq $0x37, %rax
ja 0xf1ce
leaq 0x1(%rax), %rcx
movl %ecx, 0x18(%r14)
movb $0x0, 0x1c(%r14,%rax)
movq %rcx, %rax
jmp 0xf1b5
movq (%r14), %rax
movq %rax, 0x54(%r14)
movq %r14, %rdi
movq %r15, %rsi
callq 0xf613
xorl %eax, %eax
cmpq $0x4, %rax
je 0xf210
movb 0xb(%r14,%rax,4), %cl
movb %cl, 0x3(%rbx,%rax,4)
movb 0xa(%r14,%rax,4), %cl
movb %cl, 0x2(%rbx,%rax,4)
movb 0x9(%r14,%rax,4), %cl
movb %cl, 0x1(%rbx,%rax,4)
movb 0x8(%r14,%rax,4), %cl
movb %cl, (%rbx,%rax,4)
incq %rax
jmp 0xf1e2
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/hptools.cpp
// Function: HomePlugAvTools::NetworkKeyFromPassword(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned char*)
void HomePlugAvTools::NetworkKeyFromPassword(
  const std::string& strPassword,
  unsigned char cKEY[16])
{
  std::string strSaltedSecret = strPassword.substr(0, 64) + std::string("\x08\x85\x6D\xAF\x7C\xF5\x81\x86", 8);
  
  sha256_state sha256;
  unsigned char digest[32];
  sha256_init(&sha256);
  sha256_process(&sha256, (const unsigned char*)strSaltedSecret.data(), strSaltedSecret.size());
  sha256_done(&sha256, digest);
  for(int i = 0; i < 999; i++) 
  {
    sha256_init(&sha256);
    sha256_process(&sha256, digest, 32);
    sha256_done(&sha256, digest);
  }
  
  memcpy(cKEY, digest, 16);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x40(%rsp), %r14
pushq $0x40
popq %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x42a0
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movabsq $-0x797e0a8350927af8, %rcx # imm = 0x8681F57CAF6D8508
movq %rcx, (%rax)
movq $0x8, -0x8(%rax)
movb $0x0, 0x8(%rax)
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %r14, %rsi
callq 0xaea9
movq %rsp, %r14
movq %r14, %rdi
callq 0x4170
leaq 0x40(%rsp), %r15
movq %r15, %rdi
callq 0x4170
andl $0x0, 0x28(%r15)
andq $0x0, (%r15)
movaps 0x5459(%rip), %xmm0     # 0x146f0
movups %xmm0, 0x8(%r15)
movaps 0x545d(%rip), %xmm0     # 0x14700
movups %xmm0, 0x18(%r15)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x40(%rsp), %r12
movq %r12, %rdi
callq 0xf354
movq %rsp, %rsi
movq %r12, %rdi
callq 0xf3fe
movl $0x3e7, %ebp            # imm = 0x3E7
pushq $0x20
popq %r12
subl $0x1, %ebp
jb 0xf316
andl $0x0, 0x68(%rsp)
andq $0x0, 0x40(%rsp)
movaps 0x5406(%rip), %xmm0     # 0x146f0
movups %xmm0, 0x48(%rsp)
movaps 0x540a(%rip), %xmm0     # 0x14700
movups %xmm0, 0x58(%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xf354
movq %r15, %rdi
movq %r14, %rsi
callq 0xf3fe
jmp 0xf2d3
movaps (%rsp), %xmm0
movups %xmm0, (%rbx)
leaq 0x20(%rsp), %rdi
callq 0x4170
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4170
leaq 0x40(%rsp), %rdi
callq 0x4170
movq %rbx, %rdi
callq 0x4410
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/hptools.cpp
// Function: (anonymous namespace)::sha256_process((anonymous namespace)::sha256_state*, unsigned char const*, unsigned long)
void sha256_process(sha256_state * md, const unsigned char *in, unsigned long inlen)
{
    unsigned long n;
    while (inlen > 0) {
        if (md->curlen == 0 && inlen >= 64) {
            sha256_compress(md, (unsigned char *)in);
            md->length += 64 * 8;
            in += 64;
            inlen -= 64;
        } else {
            n = (inlen < (64 - md->curlen)) ? inlen : (64 - md->curlen);
            memcpy(md->buf + md->curlen, in, (size_t)n);
            md->curlen += n;
            in += n;
            inlen -= n;
            if (md->curlen == 64) {
                sha256_compress(md, md->buf);
                md->length += 64 * 8;
                md->curlen = 0;
  }
}
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x2c(%rdi), %r12
pushq $0x40
popq %rbp
testq %rbx, %rbx
je 0xf3ef
movl 0x28(%r15), %edi
testq %rdi, %rdi
setne %al
cmpq $0x40, %rbx
setb %cl
orb %al, %cl
jne 0xf3a5
movq %r15, %rdi
movq %r14, %rsi
callq 0xfe41
addq $0x200, (%r15)          # imm = 0x200
addq $0x40, %r14
addq $-0x40, %rbx
jmp 0xf36f
movl %ebp, %r13d
subl %edi, %r13d
cmpq %r13, %rbx
cmovbq %rbx, %r13
addq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x4220
movl 0x28(%r15), %eax
addl %r13d, %eax
movl %eax, 0x28(%r15)
addq %r13, %r14
subq %r13, %rbx
cmpl $0x40, %eax
jne 0xf36f
movq %r15, %rdi
movq %r12, %rsi
callq 0xfe41
addq $0x200, (%r15)          # imm = 0x200
andl $0x0, 0x28(%r15)
jmp 0xf36f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/hptools.cpp
// Function: (anonymous namespace)::sha256_done((anonymous namespace)::sha256_state*, unsigned char*)
void sha256_done(sha256_state * md, unsigned char *out)
{
    int i;

    /* increase the length of the message */
    md->length += md->curlen * 8;

    /* append the '1' bit */
    md->buf[md->curlen++] = (unsigned char)0x80;

    /* if the length is currently above 56 bytes we append zeros
     * then compress.  Then we can fall back to padding zeros and length
     * encoding like normal.
     */
    if (md->curlen > 56) {
        while (md->curlen < 64) {
            md->buf[md->curlen++] = (unsigned char)0;
        }
        sha256_compress(md, md->buf);
        md->curlen = 0;
    }

    /* pad upto 56 bytes of zeroes */
    while (md->curlen < 56) {
        md->buf[md->curlen++] = (unsigned char)0;
    }

    /* store length */
    STORE64H(md->length, md->buf+56);
    sha256_compress(md, md->buf);

    /* copy output */
    for (i = 0; i < 8; i++) {
        STORE32H(md->state[i], out+(4*i));
    }
#ifdef LTC_CLEAN_STACK
    memset(md, 0, sizeof(sha256_state));
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x28(%rdi), %eax
leal (,%rax,8), %ecx
addq %rcx, (%rdi)
leaq 0x2c(%rdi), %r15
leal 0x1(%rax), %ecx
movl %ecx, 0x28(%rdi)
movb $-0x80, 0x2c(%rdi,%rax)
cmpl $0x39, %ecx
jb 0xf45b
addq $0x2d, %rax
leaq -0x2c(%rax), %rcx
cmpq $0x3f, %rcx
ja 0xf449
leal -0x2b(%rax), %ecx
movl %ecx, 0x28(%r14)
movb $0x0, (%r14,%rax)
incq %rax
jmp 0xf42e
movq %r14, %rdi
movq %r15, %rsi
callq 0xfe41
andl $0x0, 0x28(%r14)
xorl %ecx, %ecx
movl %ecx, %eax
cmpq $0x37, %rax
ja 0xf476
leaq 0x1(%rax), %rcx
movl %ecx, 0x28(%r14)
movb $0x0, 0x2c(%r14,%rax)
movq %rcx, %rax
jmp 0xf45d
movq (%r14), %rax
bswapq %rax
movq %rax, 0x64(%r14)
movq %r14, %rdi
movq %r15, %rsi
callq 0xfe41
xorl %eax, %eax
cmpq $0x8, %rax
je 0xf4bb
movb 0xb(%r14,%rax,4), %cl
movb %cl, (%rbx,%rax,4)
movb 0xa(%r14,%rax,4), %cl
movb %cl, 0x1(%rbx,%rax,4)
movb 0x9(%r14,%rax,4), %cl
movb %cl, 0x2(%rbx,%rax,4)
movb 0x8(%r14,%rax,4), %cl
movb %cl, 0x3(%rbx,%rax,4)
incq %rax
jmp 0xf48d
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/hptools.cpp
// Function: HomePlugAvTools::DeviceAccessKeyFromSecurityID(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned char*)
void HomePlugAvTools::DeviceAccessKeyFromSecurityID(
  const std::string& strSecurityID,
  unsigned char cDAK[16])
{
  std::string strSaltedSecret = strSecurityID.substr(0, 64) + std::string("\x08\x85\x6D\xAF\x7C\xF5\x81\x85", 8);
  
  sha256_state sha256;
  unsigned char digest[32];
  sha256_init(&sha256);
  sha256_process(&sha256, (const unsigned char*)strSaltedSecret.data(), strSaltedSecret.size());
  sha256_done(&sha256, digest);
  for(int i = 0; i < 999; i++) 
  {
    sha256_init(&sha256);
    sha256_process(&sha256, digest, 32);
    sha256_done(&sha256, digest);
  }
  
  memcpy(cDAK, digest, 16);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x40(%rsp), %r14
pushq $0x40
popq %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x42a0
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movabsq $-0x7a7e0a8350927af8, %rcx # imm = 0x8581F57CAF6D8508
movq %rcx, (%rax)
movq $0x8, -0x8(%rax)
movb $0x0, 0x8(%rax)
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %r14, %rsi
callq 0xaea9
movq %rsp, %r14
movq %r14, %rdi
callq 0x4170
leaq 0x40(%rsp), %r15
movq %r15, %rdi
callq 0x4170
andl $0x0, 0x28(%r15)
andq $0x0, (%r15)
movaps 0x51ae(%rip), %xmm0     # 0x146f0
movups %xmm0, 0x8(%r15)
movaps 0x51b2(%rip), %xmm0     # 0x14700
movups %xmm0, 0x18(%r15)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x40(%rsp), %r12
movq %r12, %rdi
callq 0xf354
movq %rsp, %rsi
movq %r12, %rdi
callq 0xf3fe
movl $0x3e7, %ebp            # imm = 0x3E7
pushq $0x20
popq %r12
subl $0x1, %ebp
jb 0xf5c1
andl $0x0, 0x68(%rsp)
andq $0x0, 0x40(%rsp)
movaps 0x515b(%rip), %xmm0     # 0x146f0
movups %xmm0, 0x48(%rsp)
movaps 0x515f(%rip), %xmm0     # 0x14700
movups %xmm0, 0x58(%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xf354
movq %r15, %rdi
movq %r14, %rsi
callq 0xf3fe
jmp 0xf57e
movaps (%rsp), %xmm0
movups %xmm0, (%rbx)
leaq 0x20(%rsp), %rdi
callq 0x4170
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4170
leaq 0x40(%rsp), %rdi
callq 0x4170
movq %rbx, %rdi
callq 0x4410
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/hptools.cpp
// Function: HomePlugAvTools::Checksum(unsigned int const*, unsigned long)
uint32_t HomePlugAvTools::Checksum(
  const uint32_t* pData, 
  size_t iWords)
{
  uint32_t ulCheckSum = 0;
  for(size_t i = 0; i < iWords; i++)
    ulCheckSum ^= pData[i];
  return ~ulCheckSum;
}

// Assembly:
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rcx, %rsi
je 0xf610
xorl (%rdi,%rcx,4), %eax
incq %rcx
jmp 0xf603
notl %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/macaddress.cpp
// Function: CMACAddress::ToString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
std::string CMACAddress::ToString(const std::string& strSeparator) const
{
  std::ostringstream ostr;

  ostr 
    << pHexDigits[(m_addr[0] & 0xF0) >> 4] << pHexDigits[m_addr[0] & 0x0F] << strSeparator
    << pHexDigits[(m_addr[1] & 0xF0) >> 4] << pHexDigits[m_addr[1] & 0x0F] << strSeparator
    << pHexDigits[(m_addr[2] & 0xF0) >> 4] << pHexDigits[m_addr[2] & 0x0F] << strSeparator
    << pHexDigits[(m_addr[3] & 0xF0) >> 4] << pHexDigits[m_addr[3] & 0x0F] << strSeparator
    << pHexDigits[(m_addr[4] & 0xF0) >> 4] << pHexDigits[m_addr[4] & 0x0F] << strSeparator
    << pHexDigits[(m_addr[5] & 0xF0) >> 4] << pHexDigits[m_addr[5] & 0x0F];

  return ostr.str();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x180, %rsp            # imm = 0x180
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x4320
movzbl (%r14), %eax
shrl $0x4, %eax
leaq 0x2f34(%rip), %r13      # 0x14710
movsbl (%rax,%r13), %esi
movq %r12, %rdi
callq 0x42d0
movzbl (%r14), %ecx
andl $0xf, %ecx
movsbl (%rcx,%r13), %esi
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movq %r15, %rsi
callq 0x4250
movzbl 0x1(%r14), %ecx
shrl $0x4, %ecx
movsbl (%rcx,%r13), %esi
movq %rax, %rdi
callq 0x42d0
movzbl 0x1(%r14), %ecx
andl $0xf, %ecx
movsbl (%rcx,%r13), %esi
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movq %r15, %rsi
callq 0x4250
movzbl 0x2(%r14), %ecx
shrl $0x4, %ecx
movsbl (%rcx,%r13), %esi
movq %rax, %rdi
callq 0x42d0
movzbl 0x2(%r14), %ecx
andl $0xf, %ecx
movsbl (%rcx,%r13), %esi
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movq %r15, %rsi
callq 0x4250
movzbl 0x3(%r14), %ecx
shrl $0x4, %ecx
movsbl (%rcx,%r13), %esi
movq %rax, %rdi
callq 0x42d0
movzbl 0x3(%r14), %ecx
andl $0xf, %ecx
movsbl (%rcx,%r13), %esi
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movq %r15, %rsi
callq 0x4250
movzbl 0x4(%r14), %ecx
shrl $0x4, %ecx
movsbl (%rcx,%r13), %esi
movq %rax, %rdi
callq 0x42d0
movzbl 0x4(%r14), %ecx
andl $0xf, %ecx
movsbl (%rcx,%r13), %esi
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movq %r15, %rsi
callq 0x4250
movzbl 0x5(%r14), %ecx
shrl $0x4, %ecx
movsbl (%rcx,%r13), %esi
movq %rax, %rdi
callq 0x42d0
movzbl 0x5(%r14), %ecx
andl $0xf, %ecx
movsbl (%rcx,%r13), %esi
movq %rax, %rdi
callq 0x42d0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x43b0
leaq 0x8(%rsp), %rdi
callq 0x40c0
movq %rbx, %rax
addq $0x180, %rsp            # imm = 0x180
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x40c0
movq %rbx, %rdi
callq 0x4410
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/macaddress.cpp
// Function: CMACAddress::FromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool CMACAddress::FromString(const std::string& strMACAddr)
{
  // Loop over six bytes
  size_t iByte = 0;
  unsigned char cMacAddrBuff[size] = {0};
  const char* pString = strMACAddr.c_str();
  for( ; iByte < size; iByte++)
  {
    // Skip separator chars
    if((iByte > 0) && ((pString[0] == ':') || (pString[0] == '-')))
      pString++;

    // Check for valid hex representation of a byte
    if(strspn(pString, pHexDigits) >= 2)
    {
      // Convert into byte
      char cTmp[3] = { pString[0], pString[1], 0 };
      cMacAddrBuff[iByte] = (unsigned char)strtoul(cTmp, 0, 16);
      pString += 2;
    }
    else
    {
      break;
    }
  }

  // Check if six bytes have been converted and nothing remains
  if((iByte == size) && (pString[0] == 0))
  {
    memcpy(m_addr, cMacAddrBuff, size);
    return true;
  }
  else
  {
    return false;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
andw $0x0, 0x14(%rsp)
andl $0x0, 0x10(%rsp)
movq (%rsi), %r14
xorl %r13d, %r13d
leaq 0x2da1(%rip), %r15      # 0x14710
leaq 0xd(%rsp), %r12
pushq $0x10
popq %rbp
testq %r13, %r13
je 0x11993
cmpq $0x6, %r13
je 0x119d2
movzbl (%r14), %eax
cmpl $0x3a, %eax
je 0x11990
cmpl $0x2d, %eax
jne 0x11993
incq %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x4140
cmpq $0x2, %rax
jb 0x119d8
movb (%r14), %al
movb %al, 0xd(%rsp)
movb 0x1(%r14), %al
movb %al, 0xe(%rsp)
movb $0x0, 0xf(%rsp)
movq %r12, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x4100
movb %al, 0x10(%rsp,%r13)
addq $0x2, %r14
incq %r13
jmp 0x11977
cmpb $0x0, (%r14)
je 0x119e9
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzwl 0x14(%rsp), %eax
movw %ax, 0x4(%rbx)
movl 0x10(%rsp), %eax
movl %eax, (%rbx)
movb $0x1, %al
jmp 0x119da