LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jbe 0x2a15f
movq -0x8(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x2a09b
cmpq $0x40, -0x18(%rbp)
jb 0x2a09b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2ac00
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x200, %rcx            # imm = 0x200
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
subq $0x40, %rax
movq %rax, -0x18(%rbp)
jmp 0x2a15a
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rdx
movl $0x40, %ecx
subl 0x18(%rdx), %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x2a0bc
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x2a0ce
movq -0x8(%rbp), %rcx
movl $0x40, %eax
subl 0x18(%rcx), %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x1c, %rdi
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x52c0
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
addq %rdx, %rcx
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x40, 0x18(%rax)
jne 0x2a158
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x1c, %rsi
callq 0x2ac00
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x200, %rcx            # imm = 0x200
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x18(%rax)
jmp 0x2a15a
jmp 0x2a044
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
leaq -0x50(%rbp), %rdi
movl $0x40, %ecx
callq 0x5350
leaq -0x71(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x5540
movq -0x130(%rbp), %rcx
leaq 0xe293(%rip), %rsi      # 0x386aa
leaq -0x70(%rbp), %rdi
movl $0x8, %edx
callq 0x53b0
jmp 0x2a427
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x198c0
jmp 0x2a43a
leaq -0x70(%rbp), %rdi
callq 0x5240
leaq -0x71(%rbp), %rdi
callq 0x5380
leaq -0x50(%rbp), %rdi
callq 0x5240
leaq -0xf8(%rbp), %rdi
callq 0x2a5b0
jmp 0x2a463
leaq -0x30(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x5210
movq -0x140(%rbp), %rdi
movq %rax, -0x138(%rbp)
callq 0x5270
movq -0x138(%rbp), %rsi
movq %rax, %rdx
leaq -0xf8(%rbp), %rdi
callq 0x2a630
jmp 0x2a49e
leaq -0xf8(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x2a770
jmp 0x2a4b3
movl $0x0, -0x124(%rbp)
cmpl $0x3e7, -0x124(%rbp)    # imm = 0x3E7
jge 0x2a574
leaq -0xf8(%rbp), %rdi
callq 0x2a5b0
jmp 0x2a4db
leaq -0xf8(%rbp), %rdi
leaq -0x120(%rbp), %rsi
movl $0x20, %edx
callq 0x2a630
jmp 0x2a4f5
leaq -0xf8(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x2a770
jmp 0x2a50a
jmp 0x2a50c
movl -0x124(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x124(%rbp)
jmp 0x2a4bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2a546
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x5240
leaq -0x71(%rbp), %rdi
callq 0x5380
leaq -0x50(%rbp), %rdi
callq 0x5240
jmp 0x2a59f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5240
jmp 0x2a59f
movq -0x10(%rbp), %rax
movq -0x120(%rbp), %rcx
movq %rcx, (%rax)
movq -0x118(%rbp), %rcx
movq %rcx, 0x8(%rax)
leaq -0x30(%rbp), %rdi
callq 0x5240
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x5530
nopl (%rax,%rax)
// File: dguglielmi[P]dlan-linux-software/common/hptools.cpp
// Function: (anonymous namespace)::sha256_init((anonymous namespace)::sha256_state*)
void sha256_init(sha256_state * md)
{
    md->curlen = 0;
    md->length = 0;
    md->state[0] = 0x6A09E667UL;
    md->state[1] = 0xBB67AE85UL;
    md->state[2] = 0x3C6EF372UL;
    md->state[3] = 0xA54FF53AUL;
    md->state[4] = 0x510E527FUL;
    md->state[5] = 0x9B05688CUL;
    md->state[6] = 0x1F83D9ABUL;
    md->state[7] = 0x5BE0CD19UL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movl $0x6a09e667, 0x8(%rax)  # imm = 0x6A09E667
movq -0x8(%rbp), %rax
movl $0xbb67ae85, 0xc(%rax)  # imm = 0xBB67AE85
movq -0x8(%rbp), %rax
movl $0x3c6ef372, 0x10(%rax) # imm = 0x3C6EF372
movq -0x8(%rbp), %rax
movl $0xa54ff53a, 0x14(%rax) # imm = 0xA54FF53A
movq -0x8(%rbp), %rax
movl $0x510e527f, 0x18(%rax) # imm = 0x510E527F
movq -0x8(%rbp), %rax
movl $0x9b05688c, 0x1c(%rax) # imm = 0x9B05688C
movq -0x8(%rbp), %rax
movl $0x1f83d9ab, 0x20(%rax) # imm = 0x1F83D9AB
movq -0x8(%rbp), %rax
movl $0x5be0cd19, 0x24(%rax) # imm = 0x5BE0CD19
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jbe 0x2a75f
movq -0x8(%rbp), %rax
cmpl $0x0, 0x28(%rax)
jne 0x2a69b
cmpq $0x40, -0x18(%rbp)
jb 0x2a69b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2c3d0
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x200, %rcx            # imm = 0x200
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
subq $0x40, %rax
movq %rax, -0x18(%rbp)
jmp 0x2a75a
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rdx
movl $0x40, %ecx
subl 0x28(%rdx), %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x2a6bc
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x2a6ce
movq -0x8(%rbp), %rcx
movl $0x40, %eax
subl 0x28(%rcx), %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x2c, %rdi
movq -0x8(%rbp), %rax
movl 0x28(%rax), %eax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x52c0
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x28(%rax), %ecx
addq %rdx, %rcx
movl %ecx, 0x28(%rax)
movq -0x20(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x40, 0x28(%rax)
jne 0x2a758
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x2c, %rsi
callq 0x2c3d0
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x200, %rcx            # imm = 0x200
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x28(%rax)
jmp 0x2a75a
jmp 0x2a644
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
leaq -0x50(%rbp), %rdi
movl $0x40, %ecx
callq 0x5350
leaq -0x71(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x5540
movq -0x130(%rbp), %rcx
leaq 0xdc8a(%rip), %rsi      # 0x386a1
leaq -0x70(%rbp), %rdi
movl $0x8, %edx
callq 0x53b0
jmp 0x2aa27
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x198c0
jmp 0x2aa3a
leaq -0x70(%rbp), %rdi
callq 0x5240
leaq -0x71(%rbp), %rdi
callq 0x5380
leaq -0x50(%rbp), %rdi
callq 0x5240
leaq -0xf8(%rbp), %rdi
callq 0x2a5b0
jmp 0x2aa63
leaq -0x30(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x5210
movq -0x140(%rbp), %rdi
movq %rax, -0x138(%rbp)
callq 0x5270
movq -0x138(%rbp), %rsi
movq %rax, %rdx
leaq -0xf8(%rbp), %rdi
callq 0x2a630
jmp 0x2aa9e
leaq -0xf8(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x2a770
jmp 0x2aab3
movl $0x0, -0x124(%rbp)
cmpl $0x3e7, -0x124(%rbp)    # imm = 0x3E7
jge 0x2ab74
leaq -0xf8(%rbp), %rdi
callq 0x2a5b0
jmp 0x2aadb
leaq -0xf8(%rbp), %rdi
leaq -0x120(%rbp), %rsi
movl $0x20, %edx
callq 0x2a630
jmp 0x2aaf5
leaq -0xf8(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x2a770
jmp 0x2ab0a
jmp 0x2ab0c
movl -0x124(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x124(%rbp)
jmp 0x2aabd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2ab46
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x5240
leaq -0x71(%rbp), %rdi
callq 0x5380
leaq -0x50(%rbp), %rdi
callq 0x5240
jmp 0x2ab9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5240
jmp 0x2ab9f
movq -0x10(%rbp), %rax
movq -0x120(%rbp), %rcx
movq %rcx, (%rax)
movq -0x118(%rbp), %rcx
movq %rcx, 0x8(%rax)
leaq -0x30(%rbp), %rdi
callq 0x5240
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x5530
nopl (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x2abf4
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
xorl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2abcb
movl -0x14(%rbp), %eax
xorl $-0x1, %eax
popq %rbp
retq
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x20(%rbp)
leaq -0x26(%rbp), %rdi
xorl %esi, %esi
movl $0x6, %edx
callq 0x51f0
movq -0x18(%rbp), %rdi
callq 0x5170
movq %rax, -0x30(%rbp)
cmpq $0x6, -0x20(%rbp)
jae 0x3297f
cmpq $0x0, -0x20(%rbp)
jbe 0x32913
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
je 0x32907
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x32913
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq 0x1d9ea(%rip), %rsi     # 0x50308
callq 0x5180
cmpq $0x2, %rax
jb 0x3296a
movq -0x30(%rbp), %rax
movb (%rax), %al
movb %al, -0x33(%rbp)
movq -0x30(%rbp), %rax
movb 0x1(%rax), %al
movb %al, -0x32(%rbp)
movb $0x0, -0x31(%rbp)
leaq -0x33(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x10, %edx
callq 0x5130
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, -0x26(%rbp,%rax)
movq -0x30(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x30(%rbp)
jmp 0x3296c
jmp 0x3297f
jmp 0x3296e
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x328dd
cmpq $0x6, -0x20(%rbp)
jne 0x329a9
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x329a9
movq -0x40(%rbp), %rax
movl -0x26(%rbp), %ecx
movl %ecx, (%rax)
movw -0x22(%rbp), %cx
movw %cx, 0x4(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x329ad
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: dguglielmi[P]dlan-linux-software/common/packetinterface-linux.cpp
// Function: CPacketInterfaceLinux::CPacketInterfaceLinux(std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
CPacketInterfaceLinux::CPacketInterfaceLinux(const std::set<std::string> &setIfcNames)
{
  m_ifcFilter = setIfcNames;

  if(pipe(m_interruptPipe) != 0)
    perror("pipe");
    
  static struct sock_filter statBPFProgramm [] = 
  {
    BPF_STMT(BPF_LD+BPF_H+BPF_ABS, 12),                                 
    BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, HomePlugMMEs::uEtherType, 2, 0),    
    BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K,  HomePlugAvMMEs::uEtherType, 1, 0), 
    BPF_STMT(BPF_RET+BPF_K, 0),                                         
    BPF_STMT(BPF_RET+BPF_K, 0xFFFF)                                     
  };

  m_socketFilter.filter = statBPFProgramm;
  m_socketFilter.len = sizeof(statBPFProgramm) / sizeof(struct sock_filter);

  RefreshAdapters();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0x34480
movq -0x38(%rbp), %rdi
leaq 0x1d2d8(%rip), %rax     # 0x4fcc0
movq %rax, (%rdi)
addq $0x8, %rdi
movq %rdi, -0x28(%rbp)
callq 0x6350
movq -0x38(%rbp), %rdi
addq $0x38, %rdi
movq %rdi, -0x40(%rbp)
callq 0x17910
movq -0x38(%rbp), %rdi
addq $0x68, %rdi
movq %rdi, -0x30(%rbp)
callq 0x344a0
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x344c0
jmp 0x32a29
movq -0x38(%rbp), %rdi
addq $0x98, %rdi
callq 0x5440
cmpl $0x0, %eax
je 0x32a80
leaq 0x5c85(%rip), %rdi      # 0x386ca
callq 0x52d0
jmp 0x32a4c
jmp 0x32a80
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x344f0
movq -0x40(%rbp), %rdi
callq 0x8810
movq -0x28(%rbp), %rdi
callq 0x6370
movq -0x38(%rbp), %rdi
callq 0x34c20
jmp 0x32aac
movq -0x38(%rbp), %rdi
leaq 0x1d885(%rip), %rax     # 0x50310
movq %rax, 0xa8(%rdi)
movw $0x5, 0xa0(%rdi)
movq (%rdi), %rax
movq 0x8(%rax), %rax
callq *%rax
jmp 0x32aa6
addq $0x40, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x5530
nopw %cs:(%rax,%rax)
// File: dguglielmi[P]dlan-linux-software/common/packetinterface-linux.cpp
// Function: CPacketInterfaceLinux::closeAllSockets()
void CPacketInterfaceLinux::closeAllSockets()
{
  std::map<CMACAddress,Interface>::iterator itIfc;
  for(itIfc = m_ifcs.begin(); itIfc != m_ifcs.end(); ++itIfc)
  {
    close(itIfc->second.fdsocket);
    itIfc->second.fdsocket = -1;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x345f0
movq -0x28(%rbp), %rdi
addq $0x68, %rdi
callq 0x348e0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x28(%rbp), %rdi
addq $0x68, %rdi
callq 0x34670
movq %rax, -0x20(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x34610
testb $0x1, %al
jne 0x32baa
jmp 0x32bd6
leaq -0x10(%rbp), %rdi
callq 0x346a0
movl 0x2c(%rax), %edi
callq 0x55a0
leaq -0x10(%rbp), %rdi
callq 0x346a0
movl $0xffffffff, 0x2c(%rax) # imm = 0xFFFFFFFF
leaq -0x10(%rbp), %rdi
callq 0x34910
jmp 0x32b86
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: dguglielmi[P]dlan-linux-software/common/packetinterface-linux.cpp
// Function: CPacketInterfaceLinux::GetCMACAddress(char const*, CMACAddress&) const
bool CPacketInterfaceLinux::GetCMACAddress(const char* name, CMACAddress& mac) const
{
  bool bResult = false;
  
  if(name)
  {
    int sock = socket(AF_INET, SOCK_STREAM, 0);
    if(sock >= 0)
    {
      struct ifreq ifreq;
      memset(&ifreq, 0, sizeof(struct ifreq));
      strncpy(ifreq.ifr_name, name, IF_NAMESIZE);
      if(ioctl(sock, SIOCGIFHWADDR, &ifreq) >= 0)
      {
        mac = CMACAddress(ifreq.ifr_ifru.ifru_hwaddr.sa_data);
        bResult = true;
      }
      else
      {
        perror("ioctl(SIOGIFHWADDR)");
      }
      close(sock);
    }
    else
    {
      perror("socket");
    }
  }

  return bResult;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x33735
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x5100
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jl 0x33727
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x51f0
leaq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x10, %edx
callq 0x51d0
movl -0x20(%rbp), %edi
movl $0x8927, %esi           # imm = 0x8927
leaq -0x48(%rbp), %rdx
movb $0x0, %al
callq 0x5460
cmpl $0x0, %eax
jl 0x33711
leaq -0x36(%rbp), %rsi
leaq -0x4e(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x34b20
movq -0x68(%rbp), %rsi
movq -0x18(%rbp), %rdi
callq 0xe3b0
jmp 0x336eb
leaq -0x4e(%rbp), %rdi
callq 0x6b70
movb $0x1, -0x19(%rbp)
jmp 0x3371d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x4e(%rbp), %rdi
callq 0x6b70
jmp 0x33740
leaq 0x4fe9(%rip), %rdi      # 0x38701
callq 0x52d0
movl -0x20(%rbp), %edi
callq 0x55a0
jmp 0x33733
leaq 0x4fcc(%rip), %rdi      # 0x386fa
callq 0x52d0
jmp 0x33735
movb -0x19(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x5530
nopl (%rax)
// File: dguglielmi[P]dlan-linux-software/common/packetinterface-linux.cpp
// Function: CPacketInterfaceLinux::InterfaceIsActive(char const*, bool) const
bool CPacketInterfaceLinux::InterfaceIsActive(const char* name, bool forceActivation) const
{
  bool bResult = false;

  if(name)
  {
    int sock = socket(AF_INET, SOCK_STREAM, 0);
    if(sock >= 0)
    {
      struct ifreq ifreq;
      memset(&ifreq, 0, sizeof(struct ifreq));
      strncpy(ifreq.ifr_name, name, sizeof(ifreq.ifr_name) - 1);
      if (ioctl(sock, SIOCGIFFLAGS, &ifreq) == 0)
      {
        if ((ifreq.ifr_flags & IFF_LOOPBACK) != IFF_LOOPBACK && (ifreq.ifr_flags & IFF_NOARP) != IFF_NOARP)
        {
          if ((ifreq.ifr_flags & IFF_UP) == IFF_UP)
          {
            if ((ifreq.ifr_flags & IFF_RUNNING) == IFF_RUNNING) bResult = true;
          }
        }
      }
      else perror("ioctl(SIOCGIFFLAGS)");
      close(sock);
    }
    else perror("socket");
  }
  return bResult;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movb $0x0, -0x12(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x33830
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x5100
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jl 0x33822
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x51f0
leaq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0xf, %edx
callq 0x51d0
movl -0x18(%rbp), %edi
movl $0x8913, %esi           # imm = 0x8913
leaq -0x40(%rbp), %rdx
movb $0x0, %al
callq 0x5460
cmpl $0x0, %eax
jne 0x3380c
movswl -0x30(%rbp), %eax
andl $0x8, %eax
cmpl $0x8, %eax
je 0x3380a
movswl -0x30(%rbp), %eax
andl $0x80, %eax
cmpl $0x80, %eax
je 0x3380a
movswl -0x30(%rbp), %eax
andl $0x1, %eax
cmpl $0x1, %eax
jne 0x33808
movswl -0x30(%rbp), %eax
andl $0x40, %eax
cmpl $0x40, %eax
jne 0x33806
movb $0x1, -0x12(%rbp)
jmp 0x33808
jmp 0x3380a
jmp 0x33818
leaq 0x4ed3(%rip), %rdi      # 0x386e6
callq 0x52d0
movl -0x18(%rbp), %edi
callq 0x55a0
jmp 0x3382e
leaq 0x4ed1(%rip), %rdi      # 0x386fa
callq 0x52d0
jmp 0x33830
movb -0x12(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: dguglielmi[P]dlan-linux-software/common/packetinterface-linux.cpp
// Function: CPacketInterfaceLinux::GetInterfaceIndex(char const*, int&) const
bool CPacketInterfaceLinux::GetInterfaceIndex(const char* name, int& ifindex) const
{
  bool bResult = false;
  
  if(name)
  {
    int sock = socket(AF_INET, SOCK_STREAM, 0);
    if(sock >= 0)
    {
      struct ifreq ifreq;
      memset(&ifreq, 0, sizeof(struct ifreq));
      strncpy(ifreq.ifr_name, name, IF_NAMESIZE);
      if(ioctl(sock, SIOCGIFINDEX, &ifreq) == 0)
      {
        ifindex = ifreq.ifr_ifindex;
        bResult = true;
      }
      else
      {
        perror("ioctl(SIOCGIFINDEX)");
      }
      close(sock);
    }
    else
    {
      perror("socket");
    }
  }

  return bResult;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x338ea
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x5100
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jl 0x338dc
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x51f0
leaq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x10, %edx
callq 0x51d0
movl -0x20(%rbp), %edi
movl $0x8933, %esi           # imm = 0x8933
leaq -0x48(%rbp), %rdx
movb $0x0, %al
callq 0x5460
cmpl $0x0, %eax
jne 0x338c6
movl -0x38(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movb $0x1, -0x19(%rbp)
jmp 0x338d2
leaq 0x4e48(%rip), %rdi      # 0x38715
callq 0x52d0
movl -0x20(%rbp), %edi
callq 0x55a0
jmp 0x338e8
leaq 0x4e17(%rip), %rdi      # 0x386fa
callq 0x52d0
jmp 0x338ea
movb -0x19(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: dguglielmi[P]dlan-linux-software/common/packetinterface-linux.cpp
// Function: CPacketInterfaceLinux::openNewSocket(char const*, int) const
int CPacketInterfaceLinux::openNewSocket(const char *unused_ifname, int ifindex) const
{
  int sock = socket(PF_PACKET, (int)SOCK_RAW, htons(ETH_P_ALL));
  if(sock >= 0)
  {
    struct sockaddr_ll saddr = { 0 };
    saddr.sll_family = AF_PACKET;
    saddr.sll_protocol = htons(ETH_P_ALL);
    saddr.sll_ifindex = ifindex;
    saddr.sll_halen = CMACAddress::size;
    memcpy(saddr.sll_addr, (unsigned char *) "\xff\xff\xff\xff\xff\xff" , 6);

    if(bind(sock, SOCKADDR_STAR(&saddr), sizeof(struct sockaddr_ll)) < 0)
    {
      close(sock);
      sock = -1;
      perror("bind");
    }
  }
  else
  {
    perror("socket(PF_PACKET)");
  }
  
  return sock;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x3, %edi
callq 0x5070
movzwl %ax, %edx
movl $0x11, %edi
movl $0x3, %esi
callq 0x5100
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jl 0x339ad
leaq -0x2c(%rbp), %rdi
xorl %esi, %esi
movl $0x14, %edx
callq 0x51f0
movw $0x11, -0x2c(%rbp)
movl $0x3, %edi
callq 0x5070
movw %ax, -0x2a(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x28(%rbp)
movb $0x6, -0x21(%rbp)
movl 0x4dbd(%rip), %eax      # 0x38729
movl %eax, -0x20(%rbp)
movw 0x4db7(%rip), %ax       # 0x3872d
movw %ax, -0x1c(%rbp)
movl -0x18(%rbp), %edi
leaq -0x2c(%rbp), %rsi
movl $0x14, %edx
callq 0x50a0
cmpl $0x0, %eax
jge 0x339ab
movl -0x18(%rbp), %edi
callq 0x55a0
movl $0xffffffff, -0x18(%rbp) # imm = 0xFFFFFFFF
leaq 0x4d8a(%rip), %rdi      # 0x38730
callq 0x52d0
jmp 0x339b9
leaq 0x4d81(%rip), %rdi      # 0x38735
callq 0x52d0
movl -0x18(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: dguglielmi[P]dlan-linux-software/common/packetinterface-linux.cpp
// Function: CPacketInterfaceLinux::AttachFilter()
void CPacketInterfaceLinux::AttachFilter()
{
  if(m_socketFilter.len > 0)
  {
    std::map<CMACAddress,Interface>::const_iterator itIfc;
    for(itIfc = m_ifcs.begin(); itIfc != m_ifcs.end(); ++itIfc)
    {
      if(setsockopt(itIfc->second.fdsocket, SOL_SOCKET, SO_ATTACH_FILTER, &m_socketFilter, sizeof(m_socketFilter)) < 0)
        perror("setsockopt(SO_ATTACH_FILTER)");
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movzwl 0xa0(%rax), %eax
cmpl $0x0, %eax
jle 0x33aa0
leaq -0x10(%rbp), %rdi
callq 0x34940
movq -0x38(%rbp), %rdi
addq $0x68, %rdi
callq 0x348e0
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x34990
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x38(%rbp), %rdi
addq $0x68, %rdi
callq 0x34670
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x34990
leaq -0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x34960
testb $0x1, %al
jne 0x33a54
jmp 0x33a9e
leaq -0x10(%rbp), %rdi
callq 0x349b0
movq -0x38(%rbp), %rcx
movl 0x2c(%rax), %edi
addq $0xa0, %rcx
movl $0x1, %esi
movl $0x1a, %edx
movl $0x10, %r8d
callq 0x5550
cmpl $0x0, %eax
jge 0x33a91
leaq 0x4cbb(%rip), %rdi      # 0x38747
callq 0x52d0
jmp 0x33a93
leaq -0x10(%rbp), %rdi
callq 0x34b50
jmp 0x33a23
jmp 0x33aa0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: dguglielmi[P]dlan-linux-software/common/packetinterface-linux.cpp
// Function: CPacketInterfaceLinux::SendPacket(CMACAddress const&, IPacket const&)
bool CPacketInterfaceLinux::SendPacket(const CMACAddress& adapter, const IPacket& packet)
{
  bool bResult = false;

  std::map<CMACAddress,Interface>::const_iterator itIfc;
  if((itIfc = m_ifcs.find(adapter)) != m_ifcs.end())
  {
    struct sockaddr_ll destination = { 0 };
    destination.sll_family = AF_PACKET;
    destination.sll_protocol = ((CMACHeader*)packet.Data())->uEtherType;
    destination.sll_ifindex = itIfc->second.ifindex;
    destination.sll_halen = CMACAddress::size;
    memcpy(destination.sll_addr, ((CMACHeader*)packet.Data())->cDstAddr, CMACAddress::size);

    if(sendto(itIfc->second.fdsocket, (void*)packet.Data(), packet.Size(),
      0, SOCKADDR_STAR(&destination), sizeof(struct sockaddr_ll)) >= 0)
    {
      bResult = true;
    }
    else
    {
      perror("sendto");
    }
  }

  return bResult;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movb $0x0, -0x19(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x34940
movq -0x68(%rbp), %rdi
addq $0x68, %rdi
movq -0x10(%rbp), %rsi
callq 0x34640
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x34990
movq -0x68(%rbp), %rdi
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
addq $0x68, %rdi
callq 0x34670
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x34990
leaq -0x28(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x34960
testb $0x1, %al
jne 0x33b3a
jmp 0x33be5
leaq -0x5c(%rbp), %rdi
xorl %esi, %esi
movl $0x14, %edx
callq 0x51f0
movw $0x11, -0x5c(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *(%rax)
movw 0xc(%rax), %ax
movw %ax, -0x5a(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x349b0
movl 0x28(%rax), %eax
movl %eax, -0x58(%rbp)
movb $0x6, -0x51(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *(%rax)
movl (%rax), %ecx
movl %ecx, -0x50(%rbp)
movw 0x4(%rax), %ax
movw %ax, -0x4c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x349b0
movl 0x2c(%rax), %eax
movl %eax, -0x74(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *(%rax)
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movl -0x74(%rbp), %edi
movq -0x70(%rbp), %rsi
movq %rax, %rdx
xorl %ecx, %ecx
leaq -0x5c(%rbp), %r8
movl $0x14, %r9d
callq 0x5080
cmpq $0x0, %rax
jl 0x33bd7
movb $0x1, -0x19(%rbp)
jmp 0x33be3
leaq 0x4af1(%rip), %rdi      # 0x386cf
callq 0x52d0
jmp 0x33be5
movb -0x19(%rbp), %al
andb $0x1, %al
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: dguglielmi[P]dlan-linux-software/common/packetinterface-linux.cpp
// Function: operator-(timeval const&, timeval const&)
struct timeval operator-(const struct timeval& lhs, const struct timeval& rhs)
{
  struct timeval result;
  long underflow = (lhs.tv_usec < rhs.tv_usec) ? 1 : 0;
  result.tv_sec = lhs.tv_sec - (rhs.tv_sec + underflow);
  result.tv_usec = (underflow * 1000000) + lhs.tv_usec - rhs.tv_usec;
  return result; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq %rcx, %rax
setl %al
movzbl %al, %eax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq -0x28(%rbp), %rdx
addq %rdx, %rcx
subq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x28(%rbp), %rax
imulq $0xf4240, %rax, %rax    # imm = 0xF4240
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
addq %rcx, %rax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: dguglielmi[P]dlan-linux-software/common/packetinterface-linux.cpp
// Function: CPacketInterfaceLinux::buildfdset(fd_set&, int&) const
void CPacketInterfaceLinux::buildfdset(fd_set& fdset, int& nfds) const
{
  FD_ZERO(&fdset);
  nfds = 0;
  
  std::map<CMACAddress,Interface>::const_iterator itIfc;
  for(itIfc = m_ifcs.begin(); itIfc != m_ifcs.end(); ++itIfc)
  {
    FD_SET(itIfc->second.fdsocket, &fdset);
    nfds = std::max<int>(itIfc->second.fdsocket, nfds);
  }

  FD_SET(m_interruptPipe[0], &fdset);
  nfds = std::max<int>(m_interruptPipe[0], nfds);

  nfds++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpq $0x10, %rax
jae 0x3417e
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3415b
jmp 0x34180
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
leaq -0x30(%rbp), %rdi
callq 0x34940
movq -0x48(%rbp), %rdi
addq $0x68, %rdi
callq 0x34b80
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x48(%rbp), %rdi
addq $0x68, %rdi
callq 0x34bb0
movq %rax, -0x40(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x34960
testb $0x1, %al
jne 0x341d3
jmp 0x3425b
leaq -0x30(%rbp), %rdi
callq 0x349b0
movl 0x2c(%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x349b0
movl 0x2c(%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movq -0x58(%rbp), %rdx
movl %eax, %ecx
movq -0x50(%rbp), %rax
movslq %ecx, %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
leaq -0x30(%rbp), %rdi
callq 0x349b0
movq %rax, %rdi
addq $0x8, %rdi
addq $0x24, %rdi
movq -0x18(%rbp), %rsi
callq 0x34be0
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
leaq -0x30(%rbp), %rdi
callq 0x34b50
jmp 0x341ac
movq -0x48(%rbp), %rdi
movl 0x98(%rdi), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movl 0x98(%rdi), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movq -0x68(%rbp), %rdx
movl %eax, %ecx
movq -0x60(%rbp), %rax
movslq %ecx, %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
addq $0x98, %rdi
movq -0x18(%rbp), %rsi
callq 0x34be0
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: dguglielmi[P]dlan-linux-software/common/packetinterface-linux.cpp
// Function: CPacketInterfaceLinux::nextifcfromfdset(fd_set&) const
std::map<CMACAddress,CPacketInterfaceLinux::Interface>::const_iterator CPacketInterfaceLinux::nextifcfromfdset(fd_set & fdset) const
{
  std::map<CMACAddress,Interface>::const_iterator itIfc;
  for(itIfc = m_ifcs.begin(); itIfc != m_ifcs.end(); ++itIfc)
  {
    if(FD_ISSET(itIfc->second.fdsocket, &fdset))
    {
      FD_CLR(itIfc->second.fdsocket, &fdset);
      break;
    }
  }

  return itIfc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x34940
movq -0x30(%rbp), %rdi
addq $0x68, %rdi
callq 0x34b80
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x30(%rbp), %rdi
addq $0x68, %rdi
callq 0x34bb0
movq %rax, -0x28(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x34960
testb $0x1, %al
jne 0x34341
jmp 0x34407
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x349b0
movl 0x2c(%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x40(%rbp), %rax
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x349b0
movl 0x2c(%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movq -0x38(%rbp), %rax
movl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x343f7
leaq -0x8(%rbp), %rdi
callq 0x349b0
movl 0x2c(%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
xorq $-0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x349b0
movl 0x2c(%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movq -0x50(%rbp), %rdx
movl %eax, %ecx
movq -0x48(%rbp), %rax
movslq %ecx, %rcx
andq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0x34407
jmp 0x343f9
leaq -0x8(%rbp), %rdi
callq 0x34b50
jmp 0x3431a
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: dguglielmi[P]dlan-linux-software/common/packetinterface-linux.cpp
// Function: UnknownPacket::UnknownPacket(unsigned long, unsigned char const*)
UnknownPacket(const size_t buflen, const unsigned char* buffer = NULL) {
    data = (unsigned char*) malloc((size_t)buflen);
    len = 0;
    if (data != NULL && buffer != NULL) {
      memcpy(data,buffer,(size_t)buflen);
      len = buflen;
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0xc500
movq -0x20(%rbp), %rax
leaq 0x1b37c(%rip), %rcx     # 0x4fd78
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x5420
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq $0x0, 0x10(%rax)
cmpq $0x0, 0x8(%rax)
je 0x34a4e
cmpq $0x0, -0x18(%rbp)
je 0x34a4e
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x52c0
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: nicklausw[P]snesasm/snesasm.cpp
// Function: main
int main(int argc, char **argv)
{
  // args!
  if (argc != 3) {
    help(argv[0]);
    return fail;
  }
  
  // hand it all off to snesasm()
  if (snesasm(string(argv[1]), string(argv[2])) == fail) return fail;
  return success;
}

// Assembly:
subq $0xd8, %rsp
movl $0x0, 0xd4(%rsp)
movl %edi, 0xd0(%rsp)
movq %rsi, 0xc8(%rsp)
cmpl $0x3, 0xd0(%rsp)
je 0x78ac
movq 0xc8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x30(%rsp)
leaq 0xa7(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x2330
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0xa8(%rsp), %rdi
callq 0x2250
jmp 0x782a
leaq 0xa8(%rsp), %rdi
callq 0x7a00
jmp 0x7839
leaq 0xa8(%rsp), %rdi
callq 0x23a8
leaq 0xa7(%rsp), %rdi
callq 0x21d0
movl $0x1, 0xd4(%rsp)
jmp 0x79e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x789a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x23a8
leaq 0xa7(%rsp), %rdi
callq 0x21d0
jmp 0x79ef
movq 0xc8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
leaq 0x6f(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x2330
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x70(%rsp), %rdi
callq 0x2250
jmp 0x78e2
movq 0xc8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
leaq 0x47(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x2330
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x48(%rsp), %rdi
callq 0x2250
jmp 0x7918
leaq 0x70(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x7a60
movl %eax, 0xc(%rsp)
jmp 0x792d
leaq 0x48(%rsp), %rdi
callq 0x23a8
leaq 0x47(%rsp), %rdi
callq 0x21d0
leaq 0x70(%rsp), %rdi
callq 0x23a8
leaq 0x6f(%rsp), %rdi
callq 0x21d0
movl 0xc(%rsp), %eax
cmpl $0x1, %eax
jne 0x79d5
movl $0x1, 0xd4(%rsp)
jmp 0x79e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x79c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x79b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x23a8
leaq 0x47(%rsp), %rdi
callq 0x21d0
leaq 0x70(%rsp), %rdi
callq 0x23a8
leaq 0x6f(%rsp), %rdi
callq 0x21d0
jmp 0x79ef
movl $0x0, 0xd4(%rsp)
movl 0xd4(%rsp), %eax
addq $0xd8, %rsp
retq
movq 0x98(%rsp), %rdi
callq 0x2320
nopl (%rax)
// File: nicklausw[P]snesasm/snesasm.cpp
// Function: snesasm(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int snesasm(string in, string out)
{
  if (file_existent(in) == false) {
    cerr << "error: file " << in << " doesn't exist\n";
    return fail;
  }
  
  
  file_to_string(in); // read file
  if (lexer() == fail) return fail; // lexer magic
  if (pass() == fail) return fail; // pass
  if (solve_unsolveds() == fail) return fail; // solve unknown labels
  snes();
  
  ofstream outs(out);
  copy(rom.begin(), rom.end(), ostreambuf_iterator<char>(outs));
  
  return success;
}

// Assembly:
subq $0x2e8, %rsp            # imm = 0x2E8
movq %rsi, %rax
movq %rdi, %rsi
movq %rsi, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq %rsi, 0x2d8(%rsp)
movq %rax, 0x2d0(%rsp)
leaq 0x2b0(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x20d0
movq 0x40(%rsp), %rdi
callq 0x7cc0
movb %al, 0x4f(%rsp)
jmp 0x7aa9
movb 0x4f(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x2c(%rsp)
leaq 0x2b0(%rsp), %rdi
callq 0x23a8
movl 0x2c(%rsp), %eax
cmpl $0x0, %eax
jne 0x7b31
movq 0xe51d(%rip), %rdi      # 0x15ff0
leaq 0x96d6(%rip), %rsi      # 0x111b0
callq 0x21b0
movq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x2180
movq %rax, %rdi
leaq 0x96c7(%rip), %rsi      # 0x111bd
callq 0x21b0
movl $0x1, 0x2e4(%rsp)
jmp 0x7c9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
leaq 0x2b0(%rsp), %rdi
callq 0x23a8
jmp 0x7ca9
movq 0x30(%rsp), %rsi
leaq 0x280(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x20d0
movq 0x20(%rsp), %rdi
callq 0x7d40
jmp 0x7b54
leaq 0x280(%rsp), %rdi
callq 0x23a8
callq 0x84a0
cmpl $0x1, %eax
jne 0x7ba1
movl $0x1, 0x2e4(%rsp)
jmp 0x7c9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
leaq 0x280(%rsp), %rdi
callq 0x23a8
jmp 0x7ca9
callq 0x9010
cmpl $0x1, %eax
jne 0x7bbb
movl $0x1, 0x2e4(%rsp)
jmp 0x7c9a
callq 0xbb30
cmpl $0x1, %eax
jne 0x7bd5
movl $0x1, 0x2e4(%rsp)
jmp 0x7c9a
callq 0xbde0
movq 0x38(%rsp), %rsi
leaq 0x80(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl $0x10, %edx
callq 0x2370
leaq 0xe6db(%rip), %rdi      # 0x162d8
movq %rdi, (%rsp)
callq 0xd190
movq (%rsp), %rdi
movq %rax, 0x78(%rsp)
callq 0xd1c0
movq 0x8(%rsp), %rsi
movq %rax, 0x70(%rsp)
leaq 0x60(%rsp), %rdi
callq 0xd1f0
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x60(%rsp), %rdx
movl 0x68(%rsp), %ecx
callq 0xd0f0
movb %dl, 0x17(%rsp)
movq %rax, 0x18(%rsp)
jmp 0x7c4b
movb 0x17(%rsp), %al
movq 0x18(%rsp), %rcx
movq %rcx, 0x50(%rsp)
movb %al, 0x58(%rsp)
movl $0x0, 0x2e4(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x22b0
jmp 0x7c9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x22b0
jmp 0x7ca9
movl 0x2e4(%rsp), %eax
addq $0x2e8, %rsp            # imm = 0x2E8
retq
movq 0x2a8(%rsp), %rdi
callq 0x2320
nopw %cs:(%rax,%rax)
// File: nicklausw[P]snesasm/snesasm.cpp
// Function: append_token(unsigned int, int)
int append_token(unsigned int counter, int current_token)
{
  unsigned int str_length = ins.length() - 1;
  
  while (ins[counter] != ' ' && ins[counter] != '\n' && ins[counter] != 0x0D && ins[counter] != ',') {
    if (counter == str_length) {
      counter++;
      break; // no overflows please!
    }
    
    tokens[current_token].token_i.append(string(1, ins[counter]));
    counter++;
  }
  
  return counter;
}

// Assembly:
subq $0x68, %rsp
movl %edi, 0x64(%rsp)
movl %esi, 0x60(%rsp)
leaq 0xa245(%rip), %rdi      # 0x16268
callq 0x22c0
subq $0x1, %rax
movl %eax, 0x5c(%rsp)
movl 0x64(%rsp), %eax
movl %eax, %esi
leaq 0xa22b(%rip), %rdi      # 0x16268
callq 0x2390
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x20, %ecx
movb %al, 0x23(%rsp)
je 0xc0af
movl 0x64(%rsp), %eax
movl %eax, %esi
leaq 0xa20b(%rip), %rdi      # 0x16268
callq 0x2390
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, 0x23(%rsp)
je 0xc0af
movl 0x64(%rsp), %eax
movl %eax, %esi
leaq 0xa1eb(%rip), %rdi      # 0x16268
callq 0x2390
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0xd, %ecx
movb %al, 0x23(%rsp)
je 0xc0af
movl 0x64(%rsp), %eax
movl %eax, %esi
leaq 0xa1cb(%rip), %rdi      # 0x16268
callq 0x2390
movsbl (%rax), %eax
cmpl $0x2c, %eax
setne %al
movb %al, 0x23(%rsp)
movb 0x23(%rsp), %al
testb $0x1, %al
jne 0xc0bc
jmp 0xc19b
movl 0x64(%rsp), %eax
cmpl 0x5c(%rsp), %eax
jne 0xc0d6
movl 0x64(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x64(%rsp)
jmp 0xc19b
movslq 0x60(%rsp), %rsi
leaq 0xa166(%rip), %rdi      # 0x16248
callq 0xd300
addq $0x8, %rax
movq %rax, 0x8(%rsp)
movl 0x64(%rsp), %eax
movl %eax, %esi
leaq 0xa16b(%rip), %rdi      # 0x16268
callq 0x2390
movsbl (%rax), %eax
movl %eax, 0x14(%rsp)
leaq 0x37(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x2330
movl 0x14(%rsp), %edx
movq 0x18(%rsp), %rcx
leaq 0x38(%rsp), %rdi
movl $0x1, %esi
callq 0x2130
jmp 0xc132
movq 0x8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x2380
jmp 0xc143
leaq 0x38(%rsp), %rdi
callq 0x23a8
leaq 0x37(%rsp), %rdi
callq 0x21d0
movl 0x64(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x64(%rsp)
jmp 0xc030
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0xc18f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x23a8
leaq 0x37(%rsp), %rdi
callq 0x21d0
jmp 0xc1a4
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x2320
nop
// File: nicklausw[P]snesasm/snesasm.cpp
// Function: str_tolower(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string str_tolower(string str)
{ 
  for (unsigned int counter = 0; counter < str.length(); counter++) {
    if (isalpha(str[counter])) {
      str[counter] = tolower(str[counter]);
    }
  }
  
  return str;
}

// Assembly:
subq $0x48, %rsp
movq %rsi, 0x18(%rsp)
movq %rdi, 0x20(%rsp)
movq %rdi, %rax
movq %rax, 0x28(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
movq 0x18(%rsp), %rdi
movl 0x34(%rsp), %eax
movq %rax, 0x10(%rsp)
callq 0x22c0
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jae 0xc256
movq 0x18(%rsp), %rdi
movl 0x34(%rsp), %eax
movl %eax, %esi
callq 0x2390
movsbl (%rax), %edi
callq 0x22e0
cmpl $0x0, %eax
je 0xc247
movq 0x18(%rsp), %rdi
movl 0x34(%rsp), %eax
movl %eax, %esi
callq 0x2390
movsbl (%rax), %edi
callq 0x2290
movq 0x18(%rsp), %rdi
movb %al, 0xf(%rsp)
movl 0x34(%rsp), %eax
movl %eax, %esi
callq 0x2390
movb 0xf(%rsp), %cl
movb %cl, (%rax)
jmp 0xc249
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0xc1d8
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x2120
movq 0x28(%rsp), %rax
addq $0x48, %rsp
retq
nop
// File: nicklausw[P]snesasm/snesasm.cpp
// Function: hint_next_token()
token hint_next_token()
{
  if (pass_counter >= tokens.size()) {
    token new_tok = {tkNL, ""};
    return new_tok;
  }
  
  return tokens[pass_counter+1];
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x40(%rsp)
movq 0x9d73(%rip), %rax      # 0x16330
movq %rax, 0x20(%rsp)
leaq 0x9c7f(%rip), %rdi      # 0x16248
callq 0xd320
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
jb 0xc659
movq 0x10(%rsp), %rax
movb $0x0, 0x3f(%rsp)
movl 0x9c09(%rip), %ecx      # 0x161f4
movl %ecx, (%rax)
addq $0x8, %rax
movq %rax, (%rsp)
leaq 0x3e(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x2330
movq (%rsp), %rdi
movq 0x8(%rsp), %rdx
leaq 0x4b9b(%rip), %rsi      # 0x111af
callq 0x2250
jmp 0xc61b
leaq 0x3e(%rsp), %rdi
callq 0x21d0
movb $0x1, 0x3f(%rsp)
testb $0x1, 0x3f(%rsp)
jne 0xc657
jmp 0xc64d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x3e(%rsp), %rdi
callq 0x21d0
jmp 0xc687
movq 0x10(%rsp), %rdi
callq 0xd410
jmp 0xc67d
movq 0x9cd0(%rip), %rsi      # 0x16330
addq $0x1, %rsi
leaq 0x9bdd(%rip), %rdi      # 0x16248
callq 0xd300
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0xd4d0
movq 0x18(%rsp), %rax
addq $0x48, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x2320
nopw %cs:(%rax,%rax)