// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/dlanmonitor.cpp
// Function: CDlanMonitor::SendLocalDeviceBroadcasts(std::_Rb_tree_iterator<std::pair<CMACAddress const, CDlanMonitor::NetwAdapter>>)
void CDlanMonitor::SendLocalDeviceBroadcasts(
  std::map<CMACAddress,NetwAdapter>::iterator itNIC)
{
  if((m_eMode & eMonitorLocalThunderbolt) == eMonitorLocalThunderbolt)
  {
    itNIC->second.queuePendingPackets.push(
      new HomePlugAvMMEs::ThunderReadModuleData::CRequest(CMACAddress(HomePlugAvMMEs::cIntellonLocalBroadcastAddr), 
      itNIC->first, HomePlugAvMMEs::ThunderReadModuleData::ePib, 64, 36));

    itNIC->second.queuePendingPackets.push(
      new HomePlugAvMMEs::ThunderNetworkInfo::CRequest(CMACAddress::Broadcast(), itNIC->first));
      
    itNIC->second.bNetworkInfoV1Sent = false;

    itNIC->second.queuePendingPackets.push(
      new HomePlugAvMMEs::ThunderGetVersion::CRequest(CMACAddress::Broadcast(), itNIC->first));

    itNIC->second.queuePendingPackets.push(
      new HomePlugAvMMEs::ThunderReadModuleData::CRequest(CMACAddress::Broadcast(), 
      itNIC->first, HomePlugAvMMEs::ThunderReadModuleData::ePib, 208, 36));
  }

  if((m_eMode & eMonitorLocalTurbo) == eMonitorLocalTurbo)
  {
    itNIC->second.queuePendingPackets.push(
      new HomePlugMMEs::TurboDeviceDescription::CRequest(CMACAddress::Broadcast(), itNIC->first));
  }

  if((m_eMode & eMonitorLocalHP1) == eMonitorLocalHP1)
  {
    itNIC->second.queuePendingPackets.push(
      new HomePlugMMEs::Int51NetStat::CRequest(CMACAddress::Broadcast(), itNIC->first));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x20(%rdi), %eax
testb $0x10, %al
je 0x833d
leaq 0x20(%rbx), %r15
pushq $0x28
popq %rdi
callq 0x4270
movq %rax, %r13
leaq 0x8(%rsp), %rsi
movw $0x100, 0x4(%rsi)       # imm = 0x100
movl $0x52b000, (%rsi)       # imm = 0x52B000
pushq $0x2
popq %rcx
pushq $0x40
popq %r8
pushq $0x24
popq %r9
movq %rax, %rdi
movq %r15, %rdx
callq 0xaaa8
movq %r14, 0x10(%rsp)
leaq 0x1b8(%rbx), %r12
movq %rsp, %rsi
movq %r13, (%rsi)
movq %r12, %rdi
callq 0xd1d0
pushq $0x20
popq %rdi
callq 0x4270
orl $-0x1, 0x8(%rax)
orw $-0x1, 0xc(%rax)
leaq 0x1671f(%rip), %rcx     # 0x1e980
movq %rcx, (%rax)
movl (%r15), %ecx
movl %ecx, 0xe(%rax)
movzwl 0x4(%r15), %ecx
movw %cx, 0x12(%rax)
movw $0xe188, %cx            # imm = 0xE188
movw %cx, 0x14(%rax)
xorl %r13d, %r13d
movb %r13b, 0x16(%rax)
movl $0xb000a038, 0x17(%rax) # imm = 0xB000A038
movb $0x52, %r14b
movb %r14b, 0x1b(%rax)
movq %rsp, %rbp
movq %rax, (%rbp)
movq %r12, %rdi
movq %rbp, %rsi
callq 0xd1d0
movb %r13b, 0x30(%rbx)
pushq $0x20
popq %rdi
callq 0x4270
orl $-0x1, 0x8(%rax)
orw $-0x1, 0xc(%rax)
leaq 0x166fa(%rip), %rcx     # 0x1e9b8
movq %rcx, (%rax)
movl (%r15), %ecx
movl %ecx, 0xe(%rax)
movzwl 0x4(%r15), %ecx
movw %cx, 0x12(%rax)
movw $0xe188, %cx            # imm = 0xE188
movw %cx, 0x14(%rax)
movb %r13b, 0x16(%rax)
movl $0xb000a000, 0x17(%rax) # imm = 0xB000A000
movb %r14b, 0x1b(%rax)
movq %rax, (%rbp)
movq %rsp, %rsi
movq %r12, %rdi
callq 0xd1d0
pushq $0x28
popq %rdi
callq 0x4270
leaq 0x8(%rsp), %rsi
orw $-0x1, 0x4(%rsi)
movq %rax, %r13
orl $-0x1, (%rsi)
pushq $0x2
popq %rcx
pushq $0x24
popq %r9
movq %rax, %rdi
movq %r15, %rdx
movl $0xd0, %r8d
callq 0xaaa8
movq %rsp, %rsi
movq %r13, (%rsi)
movq %r12, %rdi
callq 0xd1d0
movq 0x10(%rsp), %r14
movl 0x20(%r14), %eax
testb $0x4, %al
je 0x837e
leaq 0x20(%rbx), %r12
pushq $0x20
popq %rdi
callq 0x4270
leaq 0x8(%rsp), %rsi
orw $-0x1, 0x4(%rsi)
movq %rax, %r15
orl $-0x1, (%rsi)
movq %rax, %rdi
movq %r12, %rdx
callq 0xaaf2
leaq 0x1b8(%rbx), %rdi
movq %rsp, %rsi
movq %r15, (%rsi)
callq 0xd1d0
movl 0x20(%r14), %eax
testb $0x1, %al
je 0x83e6
leaq 0x1b8(%rbx), %r14
movl $0xd8, %edi
callq 0x4270
movq %rax, %r15
orl $-0x1, 0x8(%rax)
orw $-0x1, 0xc(%rax)
leaq 0x16682(%rip), %rax     # 0x1ea28
movq %rax, (%r15)
movl 0x20(%rbx), %eax
movl %eax, 0xe(%r15)
movzwl 0x24(%rbx), %eax
movw %ax, 0x12(%r15)
movw $0x7b88, 0x14(%r15)     # imm = 0x7B88
movl $0x80bb1a01, 0x16(%r15) # imm = 0x80BB1A01
leaq 0x1a(%r15), %rdi
movl $0xba, %edx
xorl %esi, %esi
callq 0x41c0
movq %rsp, %rsi
movq %r15, (%rsi)
movq %r14, %rdi
callq 0xd1d0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8406
jmp 0x8406
movq %rax, %rbx
pushq $0x20
popq %rsi
movq %r15, %rdi
jmp 0x8414
jmp 0x840b
movq %rax, %rbx
jmp 0x8419
movq %rax, %rbx
pushq $0x28
popq %rsi
movq %r13, %rdi
callq 0x4280
movq %rbx, %rdi
callq 0x4410
nop