LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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
leaq 0x40(%rsp), %r14
movq %r14, -0x10(%r14)
movabsq $-0x7a7e0a8350927af8, %rax # imm = 0x8581F57CAF6D8508
movq %rax, (%r14)
movq $0x8, -0x8(%r14)
movb $0x0, 0x8(%r14)
movq (%rdi), %rcx
movq 0x8(%rdi), %r8
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x42b0
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x108d5
movq %rsi, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x108e0
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq %r12, %rsi
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0x10918
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4270
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movaps 0x5dc1(%rip), %xmm0     # 0x166e0
leaq 0x30(%rsp), %r14
movups %xmm0, 0x8(%r14)
movl $0x0, 0x18(%r14)
movq $0x0, (%r14)
movq %r14, %rdi
callq 0x10a13
leaq 0x20(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x10ac4
movl $0x3e7, %ebp            # imm = 0x3E7
movaps 0x5d84(%rip), %xmm0     # 0x166e0
movups %xmm0, 0x38(%rsp)
movl $0x0, 0x48(%rsp)
movq $0x0, 0x30(%rsp)
movl $0x10, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x10a13
movq %r14, %rdi
movq %r15, %rsi
callq 0x10ac4
decl %ebp
jne 0x10955
movq 0x20(%rsp), %rax
movq %rax, (%rbx)
xorl %eax, %eax
movzbl (%rbx,%rax), %ecx
movl $0x2, %esi
xorl %edx, %edx
movl %esi, %edi
andl %ecx, %edi
cmpl $0x1, %edi
sbbl $-0x1, %edx
addl %esi, %esi
jne 0x109a6
andb $-0x2, %cl
andb $0x1, %dl
orb %cl, %dl
xorb $0x1, %dl
movb %dl, (%rbx,%rax)
incq %rax
cmpq $0x8, %rax
jne 0x1099b
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x109e1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4270
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0x10a0b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4270
movq %rbx, %rdi
callq 0x43e0
// File: /workspace/github_cpp_makefile_star2_O3/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:
testq %rdx, %rdx
je 0x10ac3
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x1c(%rdi), %r12
movl 0x18(%r15), %edi
testq %rdi, %rdi
setne %al
cmpq $0x40, %rbx
setb %cl
orb %al, %cl
jne 0x10a63
movq %r15, %rdi
movq %r14, %rsi
callq 0x11143
addq $0x200, (%r15)          # imm = 0x200
addq $0x40, %r14
addq $-0x40, %rbx
jmp 0x10ab1
movl $0x40, %r13d
subl %edi, %r13d
cmpq %r13, %rbx
cmovbq %rbx, %r13
addq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x4210
movl 0x18(%r15), %eax
addl %r13d, %eax
movl %eax, 0x18(%r15)
addq %r13, %r14
subq %r13, %rbx
cmpl $0x40, %eax
jne 0x10ab1
movq %r15, %rdi
movq %r12, %rsi
callq 0x11143
addq $0x200, (%r15)          # imm = 0x200
movl $0x0, 0x18(%r15)
testq %rbx, %rbx
jne 0x10a32
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x10b22
cmpl $0x3f, %ecx
ja 0x10b13
leaq (%r14,%rax), %rdi
addq $0x1d, %rdi
movl $0x3f, %edx
subl %eax, %edx
xorl %esi, %esi
callq 0x41b0
movl $0x40, 0x18(%r14)
movq %r14, %rdi
movq %r15, %rsi
callq 0x11143
xorl %ecx, %ecx
jmp 0x10b27
cmpl $0x38, %ecx
je 0x10b47
movl %ecx, %eax
leaq (%r14,%rax), %rdi
addq $0x1c, %rdi
movl $0x38, %edx
subl %ecx, %edx
xorl %esi, %esi
callq 0x41b0
movl $0x38, 0x18(%r14)
movq (%r14), %rax
movq %rax, 0x54(%r14)
movq %r14, %rdi
movq %r15, %rsi
callq 0x11143
xorl %eax, %eax
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
cmpq $0x4, %rax
jne 0x10b5b
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
testq %rdx, %rdx
je 0x10e4b
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x2c(%rdi), %r12
movl 0x28(%r15), %edi
testq %rdi, %rdi
setne %al
cmpq $0x40, %rbx
setb %cl
orb %al, %cl
jne 0x10deb
movq %r15, %rdi
movq %r14, %rsi
callq 0x118f8
addq $0x200, (%r15)          # imm = 0x200
addq $0x40, %r14
addq $-0x40, %rbx
jmp 0x10e39
movl $0x40, %r13d
subl %edi, %r13d
cmpq %r13, %rbx
cmovbq %rbx, %r13
addq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x4210
movl 0x28(%r15), %eax
addl %r13d, %eax
movl %eax, 0x28(%r15)
addq %r13, %r14
subq %r13, %rbx
cmpl $0x40, %eax
jne 0x10e39
movq %r15, %rdi
movq %r12, %rsi
callq 0x118f8
addq $0x200, (%r15)          # imm = 0x200
movl $0x0, 0x28(%r15)
testq %rbx, %rbx
jne 0x10dba
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x10eaa
cmpl $0x3f, %ecx
ja 0x10e9b
leaq (%r14,%rax), %rdi
addq $0x2d, %rdi
movl $0x3f, %edx
subl %eax, %edx
xorl %esi, %esi
callq 0x41b0
movl $0x40, 0x28(%r14)
movq %r14, %rdi
movq %r15, %rsi
callq 0x118f8
xorl %ecx, %ecx
jmp 0x10eaf
cmpl $0x38, %ecx
je 0x10ecf
movl %ecx, %eax
leaq (%r14,%rax), %rdi
addq $0x2c, %rdi
movl $0x38, %edx
subl %ecx, %edx
xorl %esi, %esi
callq 0x41b0
movl $0x38, 0x28(%r14)
movq (%r14), %rax
bswapq %rax
movq %rax, 0x64(%r14)
movq %r14, %rdi
movq %r15, %rsi
callq 0x118f8
xorl %eax, %eax
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
cmpq $0x8, %rax
jne 0x10ee6
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
testq %rsi, %rsi
je 0x1113d
xorl %ecx, %ecx
xorl %eax, %eax
xorl (%rdi,%rcx,4), %eax
incq %rcx
cmpq %rcx, %rsi
jne 0x1112f
notl %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movw $0x0, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movq (%rsi), %r14
xorl %r13d, %r13d
leaq 0x3230(%rip), %r15      # 0x16710
leaq 0x5(%rsp), %r12
testq %r13, %r13
je 0x134fb
movzbl (%r14), %eax
cmpl $0x3a, %eax
je 0x134f8
cmpl $0x2d, %eax
jne 0x134fb
incq %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x4140
cmpq $0x2, %rax
jb 0x13547
movb (%r14), %al
movb %al, 0x5(%rsp)
movb 0x1(%r14), %al
movb %al, 0x6(%rsp)
movb $0x0, 0x7(%rsp)
movq %r12, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x40f0
movb %al, 0x8(%rsp,%r13)
addq $0x2, %r14
incq %r13
cmpq $0x6, %r13
jne 0x134e5
cmpb $0x0, (%r14)
je 0x13557
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movzwl 0xc(%rsp), %eax
movw %ax, 0x4(%rbx)
movl 0x8(%rsp), %eax
movl %eax, (%rbx)
movb $0x1, %al
jmp 0x13549
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0xa78d(%rip), %rax      # 0x1dd08
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
leaq 0x10(%rdi), %rax
xorl %ecx, %ecx
movl %ecx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movq %rcx, 0x30(%rdi)
leaq 0x40(%rdi), %rax
movl %ecx, 0x40(%rdi)
movq %rcx, 0x48(%rdi)
movq %rax, 0x50(%rdi)
movq %rax, 0x58(%rdi)
movq %rcx, 0x60(%rdi)
leaq 0x70(%rdi), %rax
movl %ecx, 0x70(%rdi)
movq %rcx, 0x78(%rdi)
movq %rax, 0x80(%rdi)
movq %rax, 0x88(%rdi)
movq %rcx, 0x90(%rdi)
movq %rbx, %rdi
callq 0x144c4
leaq 0x98(%r14), %rdi
callq 0x4320
testl %eax, %eax
jne 0x13611
leaq 0xac5f(%rip), %rax      # 0x1e250
movq %rax, 0xa8(%r14)
movw $0x5, 0xa0(%r14)
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x310f(%rip), %rdi      # 0x16727
callq 0x4220
jmp 0x135ea
movq %rax, %r15
leaq 0x68(%r14), %rdi
addq $0x38, %r14
callq 0x147e0
movq %r14, %rdi
callq 0x5f24
movq %rbx, %rdi
callq 0x522c
movq %r15, %rdi
callq 0x43e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x80(%rdi), %r14
addq $0x70, %rbx
cmpq %rbx, %r14
je 0x136d0
movl 0x4c(%r14), %edi
callq 0x4440
movl $0xffffffff, 0x4c(%r14) # imm = 0xFFFFFFFF
movq %r14, %rdi
callq 0x41d0
movq %rax, %r14
cmpq %rbx, %rax
jne 0x136af
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
testq %rsi, %rsi
je 0x13caa
movq %rdx, %rbx
movq %rsi, %r14
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x40b0
testl %eax, %eax
js 0x13c9e
movl %eax, %ebp
xorps %xmm0, %xmm0
movq %rsp, %r15
movups %xmm0, 0x10(%r15)
movq $0x0, 0x20(%r15)
movl $0x10, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x4170
movl $0x8927, %esi           # imm = 0x8927
movl %ebp, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x4330
testl %eax, %eax
setns %r14b
js 0x13cbb
movzwl 0x16(%rsp), %eax
movw %ax, 0x4(%rbx)
movl 0x12(%rsp), %eax
movl %eax, (%rbx)
movl %ebp, %edi
callq 0x4440
jmp 0x13cad
leaq 0x2ab0(%rip), %rdi      # 0x16755
callq 0x4220
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2a9a(%rip), %rdi      # 0x1675c
callq 0x4220
jmp 0x13c95
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
testq %rsi, %rsi
je 0x13d4f
movq %rsi, %r14
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x40b0
testl %eax, %eax
js 0x13d43
movl %eax, %ebx
xorps %xmm0, %xmm0
movq %rsp, %r15
movups %xmm0, 0x18(%r15)
movups %xmm0, 0x8(%r15)
movl $0xf, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x4170
movl $0x8913, %esi           # imm = 0x8913
movl %ebx, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x4330
testl %eax, %eax
jne 0x13d5e
movzwl 0x10(%rsp), %eax
andl $0xc9, %eax
cmpw $0x41, %ax
sete %bpl
movl %ebx, %edi
callq 0x4440
jmp 0x13d51
leaq 0x2a0b(%rip), %rdi      # 0x16755
callq 0x4220
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x29dc(%rip), %rdi      # 0x16741
callq 0x4220
xorl %ebp, %ebp
jmp 0x13d3a
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
testq %rsi, %rsi
je 0x13df1
movq %rdx, %rbx
movq %rsi, %r14
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x40b0
testl %eax, %eax
js 0x13de5
movl %eax, %ebp
xorps %xmm0, %xmm0
movq %rsp, %r15
movups %xmm0, 0x10(%r15)
movq $0x0, 0x20(%r15)
movl $0x10, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x4170
movl $0x8933, %esi           # imm = 0x8933
movl %ebp, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x4330
testl %eax, %eax
sete %r14b
jne 0x13e02
movl 0x10(%rsp), %eax
movl %eax, (%rbx)
movl %ebp, %edi
callq 0x4440
jmp 0x13df4
leaq 0x2969(%rip), %rdi      # 0x16755
callq 0x4220
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2967(%rip), %rdi      # 0x16770
callq 0x4220
jmp 0x13ddc
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movl $0x11, %edi
movl $0x3, %esi
movl $0x300, %edx            # imm = 0x300
callq 0x40b0
movl %eax, %ebx
testl %eax, %eax
js 0x13e79
leaq 0x4(%rsp), %rsi
movq $0x0, 0x8(%rsi)
movl $0x0, 0x10(%rsi)
movl $0x3000011, (%rsi)      # imm = 0x3000011
movl %ebp, 0x4(%rsi)
movb $0x6, 0xb(%rsi)
movl $0xffffffff, 0xc(%rsi)  # imm = 0xFFFFFFFF
movw $0xffff, 0x10(%rsi)     # imm = 0xFFFF
movl %ebx, %edi
movl $0x14, %edx
callq 0x4070
testl %eax, %eax
js 0x13e87
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
leaq 0x2910(%rip), %rdi      # 0x16790
callq 0x4220
jmp 0x13e70
movl %ebx, %edi
callq 0x4440
leaq 0x28f6(%rip), %rdi      # 0x1678b
callq 0x4220
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x13e70
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
cmpw $0x0, 0xa0(%rdi)
je 0x13f1c
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x80(%rdi), %r14
leaq 0x70(%rdi), %r12
cmpq %r12, %r14
je 0x13f11
addq $0xa0, %rbx
leaq 0x28cd(%rip), %r15      # 0x167a2
movl 0x4c(%r14), %edi
movl $0x1, %esi
movl $0x1a, %edx
movq %rbx, %rcx
movl $0x10, %r8d
callq 0x43f0
testl %eax, %eax
js 0x13f07
movq %r14, %rdi
callq 0x42d0
movq %rax, %r14
cmpq %r12, %rax
jne 0x13ed5
jmp 0x13f11
movq %r15, %rdi
callq 0x4220
jmp 0x13ef5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rdi, %r14
addq $0x68, %rdi
callq 0x14bc2
addq $0x70, %r14
cmpq %r14, %rax
je 0x13fdd
movq %rax, %r15
leaq 0x4(%rsp), %r14
movl $0x0, 0x10(%r14)
movq $0x0, 0x8(%r14)
movw $0x11, (%r14)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movzwl 0xc(%rax), %eax
movw %ax, 0x2(%r14)
movl 0x48(%r15), %eax
movl %eax, 0x4(%r14)
movb $0x6, 0xb(%r14)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movl (%rax), %ecx
movl %ecx, 0xc(%r14)
movzwl 0x4(%rax), %eax
movw %ax, 0x10(%r14)
movl 0x4c(%r15), %ebp
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq %rax, %r15
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movl %ebp, %edi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
movq %r14, %r8
movl $0x14, %r9d
callq 0x4050
testq %rax, %rax
setns %bl
jns 0x13fdf
leaq 0x2756(%rip), %rdi      # 0x1672c
callq 0x4220
jmp 0x13fdf
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%rsi)
movups %xmm0, 0x60(%rsi)
movups %xmm0, 0x50(%rsi)
movups %xmm0, 0x40(%rsi)
movups %xmm0, 0x30(%rsi)
movups %xmm0, 0x20(%rsi)
movups %xmm0, 0x10(%rsi)
movups %xmm0, (%rsi)
movl $0x0, (%rdx)
movq 0x80(%rdi), %rax
leaq 0x70(%rdi), %r12
xorl %ebp, %ebp
cmpq %r12, %rax
je 0x14360
movl 0x4c(%rax), %edx
leal 0x3f(%rdx), %esi
testl %edx, %edx
cmovnsl %edx, %esi
movl %esi, %edi
andl $-0x40, %edi
movl %edx, %ecx
subl %edi, %ecx
movl $0x1, %edi
shlq %cl, %rdi
sarl $0x6, %esi
movslq %esi, %rcx
orq %rdi, (%r15,%rcx,8)
cmpl %ebp, %edx
jl 0x14354
movl 0x4c(%rax), %ebp
movl %ebp, (%rbx)
movq %rax, %rdi
callq 0x42d0
jmp 0x14322
movl 0x98(%r14), %eax
leal 0x3f(%rax), %edx
testl %eax, %eax
cmovnsl %eax, %edx
movl %edx, %esi
andl $-0x40, %esi
movl %eax, %ecx
subl %esi, %ecx
movl $0x1, %esi
shlq %cl, %rsi
sarl $0x6, %edx
movslq %edx, %rcx
orq %rsi, (%r15,%rcx,8)
cmpl %ebp, %eax
jl 0x14395
movl 0x98(%r14), %ebp
incl %ebp
movl %ebp, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x80(%rdi), %rax
addq $0x70, %r14
cmpq %r14, %rax
je 0x143ff
movq %rsi, %rbx
movl 0x4c(%rax), %ecx
leal 0x3f(%rcx), %edi
testl %ecx, %ecx
cmovnsl %ecx, %edi
movl %edi, %edx
sarl $0x6, %edx
movslq %edx, %rdx
movq (%rbx,%rdx,8), %rsi
andl $-0x40, %edi
subl %edi, %ecx
movl $0x1, %edi
shlq %cl, %rdi
btq %rcx, %rsi
jb 0x143f5
movq %rax, %rdi
callq 0x42d0
cmpq %r14, %rax
jne 0x143bc
jmp 0x143ff
notq %rdi
andq %rdi, %rsi
movq %rsi, (%rbx,%rdx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nicklausw[P]snesasm/snesasm.cpp
// Function: snes()
void snes()
{
  unsigned char build_byte = 0x00;
  
  if (lohirom == hirom) {
    build_byte += 0x1;
  }
  
  if (sfrom == slowrom) {
    build_byte += 0x20;
  }
  
  base = 0x8000;
  
  org = 0xFFC0;
  if (name_flag == true) {
    for (unsigned int name_counter = 0; name_counter < name.length(); name_counter++) {
      write_byte(name[name_counter]);
    }
  }
  
  org = 0xFFD5;
  write_byte(build_byte);
  write_byte(carttype);
  write_byte(romsize);
  write_byte(0);
  write_byte(0);
  write_byte(licenseecode);
  write_byte(version);
  
  // clear checksum bytes
  write_byte(0);
  write_byte(0);
  write_byte(0);
  write_byte(0);
  
  
  if (compcheck_flag == true) {
  // the weird part, checksum calculation.
  auto checksum = 0ULL;
  auto inverse = 0ULL;
  for (auto counter = 0ULL; counter < rom.size(); counter++) {
    checksum += rom[counter];
  }
  
  
  checksum += 0x1FE; // add inverse to checksum
  checksum &= 0xFFFF; // lower 16 bytes
  inverse = checksum ^ 0xFFFF; // 0xFFFF - checksum
  
  
  // write to rom
  org = 0xFFDC;
  write_byte(inverse & 0xFF);
  write_byte(inverse >> 8);
  write_byte(checksum & 0xFF);
  write_byte(checksum >> 8);
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %eax, %eax
cmpb $0x1, 0x5450(%rip)      # 0xc234
sete %al
cmpb $0x0, 0x5447(%rip)      # 0xc235
leal 0x20(%rax), %ecx
movzbl %cl, %ebx
cmovnel %eax, %ebx
movq $0x8000, 0x538e(%rip) # imm = 0x8000
movq $0xffc0, 0x538b(%rip) # imm = 0xFFC0
cmpb $0x1, 0x53f6(%rip)      # 0xc20a
jne 0x6e44
cmpq $0x0, 0x53fa(%rip)      # 0xc218
je 0x6e44
movl $0x1, %ebp
xorl %eax, %eax
movq 0x53e2(%rip), %rcx      # 0xc210
movzbl (%rcx,%rax), %edi
callq 0x7489
movl %ebp, %eax
incl %ebp
cmpq %rax, 0x53d6(%rip)      # 0xc218
ja 0x6e27
movq $0xffd5, 0x5349(%rip) # imm = 0xFFD5
movzbl %bl, %edi
callq 0x7489
movzbl 0x53d3(%rip), %edi      # 0xc231
callq 0x7489
movzbl 0x53c6(%rip), %edi      # 0xc230
callq 0x7489
xorl %edi, %edi
callq 0x7489
xorl %edi, %edi
callq 0x7489
movzbl 0x53ae(%rip), %edi      # 0xc232
callq 0x7489
movzbl 0x53a3(%rip), %edi      # 0xc233
callq 0x7489
xorl %edi, %edi
callq 0x7489
xorl %edi, %edi
callq 0x7489
xorl %edi, %edi
callq 0x7489
xorl %edi, %edi
callq 0x7489
cmpb $0x1, 0x5350(%rip)      # 0xc208
jne 0x6ef1
movq 0x539f(%rip), %rax      # 0xc260
movq 0x5390(%rip), %rcx      # 0xc258
subq %rcx, %rax
je 0x6ef6
cmpq $0x1, %rax
adcq $0x0, %rax
xorl %edx, %edx
xorl %ebx, %ebx
movzbl (%rcx,%rdx), %esi
addq %rsi, %rbx
incq %rdx
cmpq %rdx, %rax
jne 0x6ed9
addq $0x1fe, %rbx            # imm = 0x1FE
jmp 0x6efb
popq %rbx
popq %r14
popq %rbp
retq
movl $0x1fe, %ebx            # imm = 0x1FE
movl %ebx, %ebp
xorl $0xffff, %ebp           # imm = 0xFFFF
movq $0xffdc, 0x528a(%rip) # imm = 0xFFDC
movl $0xff, %r14d
movl %ebp, %edi
andl %r14d, %edi
callq 0x7489
shrl $0x8, %ebp
andl %r14d, %ebp
movl %ebp, %edi
callq 0x7489
movl %ebx, %edi
andl %r14d, %edi
callq 0x7489
shrl $0x8, %ebx
andl %r14d, %ebx
movl %ebx, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x7489
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edi, %ebx
movl 0x5294(%rip), %eax      # 0xc1f0
movq %rax, (%rsp)
leal -0x1(%rax), %ebp
movslq %esi, %rax
leaq 0x18(%rsp), %r15
leaq 0x8(%rsp), %r14
leaq (%rax,%rax,4), %r13
movl %ebx, %eax
movq 0x526b(%rip), %rcx      # 0xc1e8
movzbl (%rcx,%rax), %eax
cmpq $0x2c, %rax
ja 0x6f97
movabsq $0x100100002400, %rcx   # imm = 0x100100002400
btq %rax, %rcx
jb 0x6fe7
cmpl %ebx, %ebp
je 0x6fe1
movq 0x5226(%rip), %r12      # 0xc1c8
movq %r15, 0x8(%rsp)
movsbl %al, %edx
movl $0x1, %esi
movq %r14, %rdi
callq 0x2190
leaq (%r12,%r13,8), %rdi
addq $0x8, %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x2060
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6fdd
callq 0x2140
incl %ebx
jmp 0x6f74
movq (%rsp), %rax
movl %eax, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x700a
callq 0x2140
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, (%rsp)
movq 0x8(%rsi), %r15
testq %r15, %r15
je 0x7065
movl $0x1, %r12d
xorl %r13d, %r13d
movq (%r14), %rbx
movsbl (%rbx,%r13), %ebp
movl %ebp, %edi
callq 0x2230
testl %eax, %eax
je 0x7058
movl %ebp, %edi
callq 0x2200
movb %al, (%rbx,%r13)
movq 0x8(%r14), %r15
movl %r12d, %r13d
incl %r12d
cmpq %r13, %r15
ja 0x7036
jmp 0x7068
xorl %r15d, %r15d
movq (%rsp), %rax
leaq 0x10(%rax), %rcx
movq %rcx, (%rax)
movq (%r14), %rdx
leaq 0x10(%r14), %rsi
cmpq %rsi, %rdx
je 0x708b
movq %rdx, (%rax)
movq (%rsi), %rcx
movq %rcx, 0x10(%rax)
jmp 0x7091
movups (%rsi), %xmm0
movups %xmm0, (%rcx)
movq %r15, 0x8(%rax)
movq %rsi, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
movq 0x4faa(%rip), %rcx      # 0xc2b0
movq 0x4ec3(%rip), %rdx      # 0xc1d0
movq 0x4eb4(%rip), %rax      # 0xc1c8
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD
imulq %rdx, %rsi
cmpq %rsi, %rcx
jae 0x7358
leaq (%rcx,%rcx,4), %rcx
movl 0x28(%rax,%rcx,8), %edx
movl %edx, (%rbx)
leaq 0x8(%rbx), %rdi
leaq 0x18(%rbx), %rdx
movq %rdx, 0x8(%rbx)
movq 0x30(%rax,%rcx,8), %rsi
movq 0x38(%rax,%rcx,8), %rdx
addq %rsi, %rdx
callq 0x7ace
jmp 0x737b
movl 0x4e16(%rip), %eax      # 0xc174
movl %eax, (%rbx)
leaq 0x8(%rbx), %rdi
leaq 0x18(%rbx), %rax
movq %rax, 0x8(%rbx)
leaq 0x20a0(%rip), %rdx      # 0x9413
movq %rdx, %rsi
callq 0x7b64
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/nicklausw[P]snesasm/snesasm.cpp
// Function: raw_data(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void raw_data(int range, string name)
{
  while (hint_next_token().token_type != tkNL) {
    if (hint_next_token().token_type == tkCOMMA) {
      pass_counter++; continue;
    }
    
    directive_arg(name, range);
    
    if (range == r8) {
      write_byte(tr & 0xFF);
    } else if (range == r16) {
      write_byte(tr >> 8);
      write_byte(tr & 0xFF);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x38(%rsp), %r13
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x72fb
movl 0x20(%rsp), %r12d
movl 0x4dc3(%rip), %r15d     # 0xc174
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x73c0
callq 0x2140
cmpl %r15d, %r12d
je 0x7461
movq %r14, %rdi
callq 0x72fb
movl 0x20(%rsp), %r12d
movl 0x4d9b(%rip), %r15d     # 0xc178
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x73ec
callq 0x2140
cmpl %r15d, %r12d
jne 0x73fa
incq 0x4eb8(%rip)            # 0xc2b0
jmp 0x739d
leaq 0x10(%rsp), %r15
movq %r15, (%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %rsp, %r12
movq %r12, %rdi
callq 0x7ace
movq %r12, %rdi
movl %ebp, %esi
callq 0x70b4
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x7430
callq 0x2140
cmpl %ebp, 0x4d4a(%rip)      # 0xc180
je 0x7450
cmpl %ebp, 0x4d46(%rip)      # 0xc184
jne 0x739d
movzbl 0x4e06(%rip), %edi      # 0xc251
callq 0x7489
movzbl 0x4df9(%rip), %edi      # 0xc250
callq 0x7489
jmp 0x739d
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x7481
callq 0x2140
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O3/nicklausw[P]snesasm/snesasm.cpp
// Function: write_byte(unsigned char)
void write_byte(unsigned char byte)
{
  // the surprisingly simplest function of all!
  rom[org-base] = byte; org++;
  
  // ...well, that's before bug checks came in
  if (org > (base*(cur_bank+2))) {
    if (cur_bank >= rombanks) {
      cerr << "error: no more room in rom\n";
      exit(fail);
    } else {
      cerr << "warning: bank overflow; rolling into bank " << cur_bank+1 << "\n";
      cerr << "org: " << org << " base: " << base << " banksize: " << banksize << "\n";
      cur_bank++;
    }
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x4d04(%rip), %rax      # 0xc198
subq 0x4cf5(%rip), %rax      # 0xc190
movq 0x4db6(%rip), %rcx      # 0xc258
movb %dil, (%rcx,%rax)
movq 0x4ceb(%rip), %rcx      # 0xc198
incq %rcx
movq %rcx, 0x4ce1(%rip)      # 0xc198
movq 0x4d82(%rip), %rax      # 0xc240
leaq 0x2(%rax), %rdx
imulq 0x4cc6(%rip), %rdx      # 0xc190
cmpq %rdx, %rcx
jbe 0x75ad
movzbl 0x4d5c(%rip), %ecx      # 0xc236
cmpq %rcx, %rax
jae 0x75b5
movq 0x4b06(%rip), %r14      # 0xbff0
leaq 0x2296(%rip), %rsi      # 0x9787
movl $0x2a, %edx
movq %r14, %rdi
callq 0x2180
movq 0x4d3b(%rip), %rsi      # 0xc240
incq %rsi
movq %r14, %rdi
callq 0x20d0
leaq 0x1efb(%rip), %rbx      # 0x9412
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2180
leaq 0x2284(%rip), %rsi      # 0x97b2
movl $0x5, %edx
movq %r14, %rdi
callq 0x2180
movq 0x4c56(%rip), %rsi      # 0xc198
movq %r14, %rdi
callq 0x20d0
movq %rax, %r14
leaq 0x2264(%rip), %rsi      # 0x97b8
movl $0x7, %edx
movq %rax, %rdi
callq 0x2180
movq 0x4c28(%rip), %rsi      # 0xc190
movq %r14, %rdi
callq 0x20d0
movq %rax, %r14
leaq 0x2246(%rip), %rsi      # 0x97c0
movl $0xb, %edx
movq %rax, %rdi
callq 0x2180
movq 0x4caa(%rip), %rsi      # 0xc238
movq %r14, %rdi
callq 0x20d0
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2180
incq 0x4c93(%rip)            # 0xc240
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x4a34(%rip), %rdi      # 0xbff0
leaq 0x21a8(%rip), %rsi      # 0x976b
callq 0x2150
movl $0x1, %edi
callq 0x21b0
// File: /workspace/github_cpp_makefile_star2_O3/rocket323[P]fishdb/examples/ex_basic.cpp
// Function: main
int main()
{
    const char *fname = "test.fdb";

    auto bt = BTree::Open(fname);
    if (bt == NULL)
    {
        printf("open db[%s] failed", fname);
        return -1;
    }

    std::string val = "hello world";
    bt->Put("greet", val);

    std::string value;
    bt->Get("greet", value);
    std::cout << "greet: " << value << std::endl;

    bt->Close();
    delete bt;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
leaq -0x90(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x5a74(%rip), %rsi      # 0x8004
leaq 0x5a75(%rip), %rdx      # 0x800c
leaq -0xa0(%rbp), %rbx
movq %rbx, %rdi
callq 0x289e
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %rsi
movaps %xmm0, (%rsi)
leaq 0x385(%rip), %rax       # 0x293c
movq %rax, 0x18(%rsi)
leaq 0x384(%rip), %rax       # 0x2946
movq %rax, 0x10(%rsi)
movq %rbx, %rdi
movl $0x2, %edx
callq 0x29a8
movq %rax, %rbx
movq -0x50(%rbp), %rax
testq %rax, %rax
je 0x25ed
leaq -0x60(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0xa0(%rbp), %rdi
cmpq %r14, %rdi
je 0x25fe
callq 0x21b0
testq %rbx, %rbx
je 0x2719
leaq -0x70(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x5a0a(%rip), %rsi      # 0x8020
leaq 0x5a0e(%rip), %rdx      # 0x802b
leaq -0x80(%rbp), %rdi
callq 0x289e
leaq 0x59ff(%rip), %rsi      # 0x802c
leaq -0x80(%rbp), %rdx
movq %rbx, %rdi
callq 0x2e80
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x59d5(%rip), %rsi      # 0x802c
leaq -0x40(%rbp), %rdx
movq %rbx, %rdi
callq 0x2c9a
movq 0x996e(%rip), %rdi      # 0xbfd8
leaq 0x59c1(%rip), %rsi      # 0x8032
movl $0x7, %edx
callq 0x2230
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq 0x994e(%rip), %rdi      # 0xbfd8
callq 0x2230
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2150
movq %rbx, %rdi
callq 0x2ac8
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x26cf
callq 0x27be
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x26e9
movq %rbx, %rdi
addq $0x50, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x2838
movq %rbx, %rdi
callq 0x21b0
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x2707
callq 0x21b0
movq -0x80(%rbp), %rdi
cmpq %r15, %rdi
je 0x2715
callq 0x21b0
xorl %eax, %eax
jmp 0x2733
leaq 0x58ed(%rip), %rdi      # 0x800d
leaq 0x58dd(%rip), %rsi      # 0x8004
xorl %eax, %eax
callq 0x2050
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2779
movq %rax, %rbx
jmp 0x2792
movq %rax, %rbx
jmp 0x27a0
jmp 0x2779
movq %rax, %rbx
movq -0x50(%rbp), %rax
testq %rax, %rax
je 0x276b
leaq -0x60(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0xa0(%rbp), %rdi
cmpq %r14, %rdi
jne 0x279b
jmp 0x27a0
movq %rax, %rdi
callq 0x282a
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x2792
callq 0x21b0
movq -0x80(%rbp), %rdi
cmpq %r15, %rdi
je 0x27a0
callq 0x21b0
movq %rbx, %rdi
callq 0x2300
// File: /workspace/github_cpp_makefile_star2_O3/lemire[P]validateutf8-experiments/benchmarks/benchmark.cpp
// Function: main
int main() {
  RealDataBenchmark rdb;
  rdb.run();

  std::vector<size_t> input_size{16384};
  for (const size_t size : input_size) {
    Benchmark bench(size);
    bench.run();
  }
  return EXIT_SUCCESS;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x13c8, %rsp           # imm = 0x13C8
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x61c4
movq %rbx, %rdi
callq 0x628e
leaq 0x38(%rsp), %rsi
movq $0x4000, (%rsi)         # imm = 0x4000
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rcx
movl $0x1, %edx
callq 0x6506
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %r12
cmpq %r12, %rbx
je 0x5b8e
leaq 0x40(%rsp), %r14
leaq 0x38(%rsp), %r15
movq (%rbx), %rax
movq %rax, 0x38(%rsp)
movq %r14, %rdi
callq 0xb3a4
movq %r15, %rdi
callq 0x654c
movq %r14, %rdi
callq 0x2140
addq $0x8, %rbx
cmpq %r12, %rbx
jne 0x5b60
movq 0x8(%rsp), %rbx
testq %rbx, %rbx
je 0x5ba3
movq 0x18(%rsp), %rsi
subq %rbx, %rsi
movq %rbx, %rdi
callq 0x2170
leaq 0x20(%rsp), %rdi
callq 0xec66
xorl %eax, %eax
addq $0x13c8, %rsp           # imm = 0x13C8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x5bc0
movq %rax, %rbx
jmp 0x5bec
movq %rax, %rbx
jmp 0x5bd5
movq %rax, %rbx
movq %r14, %rdi
callq 0x2140
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x5bec
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
leaq 0x20(%rsp), %rdi
callq 0xec66
movq %rbx, %rdi
callq 0x2250
jmp 0x5c00
movq %rax, %rdi
callq 0x69e5
// File: /workspace/github_cpp_makefile_star2_O3/lemire[P]validateutf8-experiments/dependencies/utf8_v2_3_4/source/utf8/core.h
// Function: _gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char>>> utf8::find_invalid<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char>>>>(__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char>>>, __gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char>>>)
octet_iterator find_invalid(octet_iterator start, octet_iterator end)
    {
        octet_iterator result = start;
        while (result != end) {
            utf8::internal::utf_error err_code = utf8::internal::validate_next(result, end);
            if (err_code != internal::UTF8_OK)
                return result;
        }
        return result;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rax
movq %rdi, (%rsp)
cmpq %rsi, %rdi
je 0xb120
movq %rsi, %rbx
movq %rsp, %r14
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xb12a
movl %eax, %ecx
movq (%rsp), %rax
testl %ecx, %ecx
jne 0xb120
cmpq %rbx, %rax
jne 0xb103
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/fatiiates[P]CDLL-with-cpp-make-gcc/./src/ArrayList.cpp
// Function: ArrayList::reserve(int)
void ArrayList::reserve(int newCapacity){
      CircularDoublyLinkedList **temp = new CircularDoublyLinkedList*[newCapacity];

      for (int i = 0; i < length; i++)
        temp[i] = items[i];

      delete [] items;
      items = temp;
      capacity =  newCapacity;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %eax
shlq $0x3, %rax
testl %esi, %esi
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x2030
movq %rax, %r15
movslq 0x8(%r14), %rax
movq (%r14), %rdi
testq %rax, %rax
jle 0x24a6
xorl %ecx, %ecx
movq (%rdi,%rcx,8), %rdx
movq %rdx, (%r15,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x2494
jmp 0x24ab
testq %rdi, %rdi
je 0x24b0
callq 0x21b0
movq %r15, (%r14)
movl %ebx, 0xc(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/fatiiates[P]CDLL-with-cpp-make-gcc/./src/ArrayList.cpp
// Function: ArrayList::elementAt(int)
CircularDoublyLinkedList* ArrayList::elementAt(int index){
      if(index < 0 || index >= length)
        throw invalid_argument("İndex 0'dan küçük, kapasiteye eşit veya kapasiteden büyük olamaz . Error Code: 101");
      else
        return items[index];
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testl %esi, %esi
js 0x2524
cmpl %esi, 0x8(%rdi)
jle 0x2524
movq (%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rax
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x20d0
movq %rax, %rbx
leaq 0x1acc(%rip), %rsi      # 0x4004
movq %rax, %rdi
callq 0x2280
movq 0x3a91(%rip), %rsi      # 0x5fd8
movq 0x3a7a(%rip), %rdx      # 0x5fc8
movq %rbx, %rdi
callq 0x2220
movq %rax, %r14
movq %rbx, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2240
nop