LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 0xd305(%rip), %rax      # 0x1ed10
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
leaq 0x10(%rdi), %rax
andl $0x0, 0x10(%rdi)
andq $0x0, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rax, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
leaq 0x40(%rdi), %rax
andl $0x0, 0x40(%rdi)
andq $0x0, 0x48(%rdi)
movq %rax, 0x50(%rdi)
movq %rax, 0x58(%rdi)
andq $0x0, 0x60(%rdi)
leaq 0x70(%rdi), %rax
andl $0x0, 0x70(%rdi)
andq $0x0, 0x78(%rdi)
movq %rax, 0x80(%rdi)
movq %rax, 0x88(%rdi)
andq $0x0, 0x90(%rdi)
movq %rbx, %rdi
callq 0x127ae
leaq 0x98(%r14), %rdi
callq 0x4330
testl %eax, %eax
jne 0x11aa8
leaq 0xd7d8(%rip), %rax      # 0x1f260
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 0x2c78(%rip), %rdi      # 0x14727
callq 0x4230
jmp 0x11a81
movq %rax, %r15
leaq 0x68(%r14), %rdi
addq $0x38, %r14
callq 0x12ade
movq %r14, %rdi
callq 0x595a
movq %rbx, %rdi
callq 0x4ffc
movq %r15, %rdi
callq 0x4410
// File: /workspace/github_cpp_makefile_star2_O2/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 0x11b60
movl 0x4c(%r14), %edi
callq 0x4470
orl $-0x1, 0x4c(%r14)
movq %r14, %rdi
callq 0x41e0
movq %rax, %r14
jmp 0x11b40
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1202f
movq %rdx, %rbx
movq %rsi, %r14
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x40d0
testl %eax, %eax
js 0x12023
movl %eax, %ebp
xorps %xmm0, %xmm0
movq %rsp, %r15
movups %xmm0, 0x10(%r15)
andq $0x0, 0x20(%r15)
pushq $0x10
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x4190
movl $0x8927, %esi           # imm = 0x8927
movl %ebp, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x4350
testl %eax, %eax
setns %r14b
js 0x12040
movzwl 0x16(%rsp), %eax
movw %ax, 0x4(%rbx)
movl 0x12(%rsp), %eax
movl %eax, (%rbx)
movl %ebp, %edi
callq 0x4470
jmp 0x12032
leaq 0x272b(%rip), %rdi      # 0x14755
callq 0x4230
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2715(%rip), %rdi      # 0x1475c
callq 0x4230
jmp 0x1201a
// File: /workspace/github_cpp_makefile_star2_O2/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 0x120cd
movq %rsi, %r14
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x40d0
testl %eax, %eax
js 0x120c1
movl %eax, %ebx
xorps %xmm0, %xmm0
movq %rsp, %r15
movups %xmm0, 0x18(%r15)
movups %xmm0, 0x8(%r15)
pushq $0xf
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x4190
movl $0x8913, %esi           # imm = 0x8913
movl %ebx, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x4350
testl %eax, %eax
jne 0x120dc
movzwl 0x10(%rsp), %eax
andl $0xc9, %eax
cmpw $0x41, %ax
sete %bpl
movl %ebx, %edi
callq 0x4470
jmp 0x120cf
leaq 0x268d(%rip), %rdi      # 0x14755
callq 0x4230
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x265e(%rip), %rdi      # 0x14741
callq 0x4230
xorl %ebp, %ebp
jmp 0x120b8
// File: /workspace/github_cpp_makefile_star2_O2/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 0x12166
movq %rdx, %rbx
movq %rsi, %r14
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x40d0
testl %eax, %eax
js 0x1215a
movl %eax, %ebp
xorps %xmm0, %xmm0
movq %rsp, %r15
movups %xmm0, 0x10(%r15)
andq $0x0, 0x20(%r15)
pushq $0x10
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x4190
movl $0x8933, %esi           # imm = 0x8933
movl %ebp, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x4350
testl %eax, %eax
sete %r14b
jne 0x12177
movl 0x10(%rsp), %eax
movl %eax, (%rbx)
movl %ebp, %edi
callq 0x4470
jmp 0x12169
leaq 0x25f4(%rip), %rdi      # 0x14755
callq 0x4230
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x25f2(%rip), %rdi      # 0x14770
callq 0x4230
jmp 0x12151
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x11
popq %rdi
pushq $0x3
popq %rsi
movl $0x300, %edx            # imm = 0x300
callq 0x40d0
movl %eax, %ebx
testl %eax, %eax
js 0x121df
leaq 0x4(%rsp), %rsi
andq $0x0, 0x8(%rsi)
andl $0x0, 0x10(%rsi)
movl $0x3000011, (%rsi)      # imm = 0x3000011
movl %ebp, 0x4(%rsi)
movb $0x6, 0xb(%rsi)
orl $-0x1, 0xc(%rsi)
orw $-0x1, 0x10(%rsi)
pushq $0x14
popq %rdx
movl %ebx, %edi
callq 0x4070
testl %eax, %eax
js 0x121ed
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
leaq 0x25aa(%rip), %rdi      # 0x14790
callq 0x4230
jmp 0x121d6
movl %ebx, %edi
callq 0x4470
leaq 0x2590(%rip), %rdi      # 0x1478b
callq 0x4230
pushq $-0x1
popq %rbx
jmp 0x121d6
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x12281
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xa0(%rdi), %r14
movq 0x80(%rdi), %r15
addq $0x70, %rbx
pushq $0x1
popq %rbp
pushq $0x1a
popq %r12
pushq $0x10
popq %r13
cmpq %rbx, %r15
je 0x12273
movl 0x4c(%r15), %edi
movl %ebp, %esi
movl %r12d, %edx
movq %r14, %rcx
movl %r13d, %r8d
callq 0x4420
testl %eax, %eax
js 0x12265
movq %r15, %rdi
callq 0x42c0
movq %rax, %r15
jmp 0x1223b
leaq 0x2536(%rip), %rdi      # 0x147a2
callq 0x4230
jmp 0x12258
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/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 0x12ed4
addq $0x70, %r14
cmpq %r14, %rax
je 0x12339
movq %rax, %r15
leaq 0x4(%rsp), %r14
andl $0x0, 0x10(%r14)
andq $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)
pushq $0x14
popq %r9
movl %ebp, %edi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
movq %r14, %r8
callq 0x4050
testq %rax, %rax
setns %bl
jns 0x1233b
leaq 0x23fa(%rip), %rdi      # 0x1472c
callq 0x4230
jmp 0x1233b
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
xorl %eax, %eax
cmpq $0x10, %rax
je 0x125f5
andq $0x0, (%r15,%rax,8)
incq %rax
jmp 0x125e5
andl $0x0, (%rbx)
movq 0x80(%rdi), %r8
movq %rdi, (%rsp)
leaq 0x70(%rdi), %r14
xorl %ebp, %ebp
pushq $0x40
popq %r13
pushq $0x1
popq %r12
cmpq %r14, %r8
je 0x1264b
movl 0x4c(%r8), %esi
movl %esi, %eax
cltd
idivl %r13d
movslq %eax, %rdx
shll $0x6, %eax
movl %esi, %ecx
subl %eax, %ecx
movq %r12, %rax
shlq %cl, %rax
orq %rax, (%r15,%rdx,8)
cmpl %ebp, %esi
jl 0x1263c
movl 0x4c(%r8), %ebp
movl %ebp, (%rbx)
movq %r8, %rdi
callq 0x42c0
movq %rax, %r8
jmp 0x12611
movq (%rsp), %rdi
movl 0x98(%rdi), %esi
movl %esi, %eax
cltd
idivl %r13d
movslq %eax, %rdx
shll $0x6, %eax
movl %esi, %ecx
subl %eax, %ecx
shlq %cl, %r12
orq %r12, (%r15,%rdx,8)
cmpl %ebp, %esi
jl 0x12676
movl 0x98(%rdi), %ebp
incl %ebp
movl %ebp, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/dguglielmi[P]dlan-linux-software/common/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x80(%rdi), %rdi
addq $0x70, %r14
pushq $0x40
popq %rbp
pushq $0x1
popq %r15
cmpq %r14, %rdi
je 0x126dc
movl 0x4c(%rdi), %eax
cltd
idivl %ebp
movl %edx, %ecx
cltq
movq (%rbx,%rax,8), %rdx
movq %r15, %rsi
shlq %cl, %rsi
btq %rcx, %rdx
jb 0x126d2
callq 0x42c0
movq %rax, %rdi
jmp 0x126a9
notq %rsi
andq %rsi, %rdx
movq %rdx, (%rbx,%rax,8)
movq %rdi, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbx
subq $0x70, %rsp
movq %rsi, %rbx
cmpl $0x3, %edi
jne 0x3e46
movq 0x8(%rbx), %rsi
leaq 0x30(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x2080
movq 0x10(%rbx), %rsi
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x2080
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3ef9
movl %eax, %ebx
leaq 0x10(%rsp), %rdi
callq 0x22c8
leaq 0x30(%rsp), %rdi
callq 0x22c8
jmp 0x3e6f
movq (%rbx), %rsi
leaq 0x50(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x2080
leaq 0x50(%rsp), %rdi
callq 0x3eac
leaq 0x50(%rsp), %rdi
callq 0x22c8
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x70, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x22c8
jmp 0x3e93
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
jmp 0x3e98
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x22c8
jmp 0x3ea4
jmp 0x3ea1
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x21d0
movq %r15, %rdi
callq 0x4045
movl %eax, %ebp
leaq 0x28(%rsp), %rdi
callq 0x22c8
testb %bpl, %bpl
je 0x3fd7
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x21d0
movq %r15, %rdi
callq 0x4083
leaq 0x8(%rsp), %rdi
callq 0x22c8
callq 0x436a
pushq $0x1
popq %rbp
cmpl $0x1, %eax
je 0x4007
callq 0x47f7
cmpl $0x1, %eax
je 0x4007
callq 0x5ea8
testl %eax, %eax
jne 0x4007
callq 0x6042
leaq 0x48(%rsp), %r14
pushq $0x10
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x22a0
movq 0x82c2(%rip), %rdi      # 0xc268
movq 0x82c3(%rip), %rsi      # 0xc270
movq (%r14), %rax
movq -0x18(%rax), %rax
movq 0x130(%rsp,%rax), %rdx
xorl %ecx, %ecx
testq %rdx, %rdx
sete %cl
callq 0x6b42
leaq 0x48(%rsp), %rdi
callq 0x2220
xorl %ebp, %ebp
jmp 0x4007
movq 0x8012(%rip), %rdi      # 0xbff0
leaq 0x443f(%rip), %rsi      # 0x8424
callq 0x2140
movq %rax, %rdi
movq %r14, %rsi
callq 0x2120
leaq 0x4435(%rip), %rsi      # 0x8431
movq %rax, %rdi
callq 0x2140
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x2220
jmp 0x403d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x4038
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x22c8
movq %rbx, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O2/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, 0x61f5(%rip)      # 0xc244
sete %al
cmpb $0x0, 0x61ec(%rip)      # 0xc245
leal 0x20(%rax), %ecx
movzbl %cl, %ebx
cmovnel %eax, %ebx
movq $0x8000, 0x6133(%rip) # imm = 0x8000
movq $0xffc0, 0x6130(%rip) # imm = 0xFFC0
cmpb $0x1, 0x619b(%rip)      # 0xc21a
jne 0x60a6
xorl %eax, %eax
movl %eax, %r14d
cmpq %r14, 0x619b(%rip)      # 0xc228
jbe 0x60a6
movq 0x618a(%rip), %rax      # 0xc220
movzbl (%rax,%r14), %edi
callq 0x65dd
leal 0x1(%r14), %eax
jmp 0x6083
movq $0xffd5, 0x60f7(%rip) # imm = 0xFFD5
movzbl %bl, %edi
callq 0x65dd
movzbl 0x6181(%rip), %edi      # 0xc241
callq 0x65dd
movzbl 0x6174(%rip), %edi      # 0xc240
callq 0x65dd
xorl %edi, %edi
callq 0x65dd
xorl %edi, %edi
callq 0x65dd
movzbl 0x615c(%rip), %edi      # 0xc242
callq 0x65dd
movzbl 0x6151(%rip), %edi      # 0xc243
callq 0x65dd
xorl %edi, %edi
callq 0x65dd
xorl %edi, %edi
callq 0x65dd
xorl %edi, %edi
callq 0x65dd
xorl %edi, %edi
callq 0x65dd
cmpb $0x1, 0x60fe(%rip)      # 0xc218
jne 0x6142
movq 0x614d(%rip), %rax      # 0xc270
movq 0x613e(%rip), %rcx      # 0xc268
subq %rcx, %rax
xorl %ebx, %ebx
xorl %edx, %edx
cmpq %rdx, %rax
je 0x6147
movzbl (%rcx,%rdx), %esi
addq %rsi, %rbx
incq %rdx
jmp 0x6131
popq %rbx
popq %r14
popq %rbp
retq
addl $0x1fe, %ebx            # imm = 0x1FE
movl %ebx, %ebp
xorl $0xffff, %ebp           # imm = 0xFFFF
movq $0xffdc, 0x6048(%rip) # imm = 0xFFDC
movl $0xff, %r14d
movl %ebp, %edi
andl %r14d, %edi
callq 0x65dd
shrl $0x8, %ebp
andl %r14d, %ebp
movl %ebp, %edi
callq 0x65dd
movl %ebx, %edi
andl %r14d, %edi
callq 0x65dd
shrl $0x8, %ebx
andl %r14d, %ebx
movl %ebx, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x65dd
// File: /workspace/github_cpp_makefile_star2_O2/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 0x6052(%rip), %eax      # 0xc200
movq %rax, (%rsp)
leal -0x1(%rax), %ebp
movslq %esi, %rax
leaq 0x8(%rsp), %r14
pushq $0x1
popq %r15
imulq $0x28, %rax, %r12
movl %ebx, %eax
movq 0x602a(%rip), %rcx      # 0xc1f8
movzbl (%rcx,%rax), %eax
cmpq $0x2c, %rax
ja 0x61e8
movabsq $0x100100002400, %rcx   # imm = 0x100100002400
btq %rax, %rcx
jb 0x622d
cmpl %ebx, %ebp
je 0x6227
movq 0x5fe5(%rip), %r13      # 0xc1d8
leaq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2160
leaq (%r12,%r13), %rdi
addq $0x8, %rdi
movq %r14, %rsi
callq 0x22b0
movq %r14, %rdi
callq 0x22c8
incl %ebx
jmp 0x61c5
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
leaq 0x8(%rsp), %rdi
callq 0x22c8
movq %rbx, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movl %r15d, %r15d
cmpq %r15, 0x8(%r14)
jbe 0x6290
movq (%r14), %r12
movsbl (%r12,%r15), %ebp
movl %ebp, %edi
callq 0x2240
testl %eax, %eax
je 0x628b
movl %ebp, %edi
callq 0x2200
movb %al, (%r12,%r15)
incl %r15d
jmp 0x6264
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21c0
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x5e1e(%rip), %rcx      # 0xc2c0
movq 0x5d37(%rip), %rax      # 0xc1e0
movq 0x5d28(%rip), %rsi      # 0xc1d8
subq %rsi, %rax
pushq $0x28
popq %rdi
cqto
idivq %rdi
cmpq %rax, %rcx
jae 0x64d5
imulq $0x28, %rcx, %rax
addq %rax, %rsi
addq $0x28, %rsi
movq %rbx, %rdi
callq 0x6a7c
jmp 0x64f5
movl 0x5ca9(%rip), %eax      # 0xc184
movl %eax, (%rbx)
movq %rbx, %rdi
addq $0x8, %rdi
leaq 0x1f38(%rip), %rsi      # 0x8423
leaq 0xf(%rsp), %rdx
callq 0x2080
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x58, %rsp
movq %rsi, 0x8(%rsp)
movl %edi, %ebp
leaq 0x18(%rsp), %r14
leaq 0x10(%rsp), %r12
leaq 0x38(%rsp), %r13
movq %r12, %rdi
callq 0x6493
movl 0x10(%rsp), %r15d
movl 0x5c4f(%rip), %ebx      # 0xc184
movq %r14, %rdi
callq 0x22c8
cmpl %ebx, %r15d
je 0x65b9
movq %r12, %rdi
callq 0x6493
movl 0x10(%rsp), %ebx
movl 0x5c33(%rip), %r15d     # 0xc188
leaq 0x18(%rsp), %rdi
callq 0x22c8
cmpl %r15d, %ebx
jne 0x656d
incq 0x5d55(%rip)            # 0xc2c0
jmp 0x6522
movq %r13, %rdi
movq 0x8(%rsp), %rsi
callq 0x21d0
movq %r13, %rdi
movl %ebp, %esi
callq 0x62a7
movq %r13, %rdi
callq 0x22c8
cmpl %ebp, 0x5bfe(%rip)      # 0xc190
je 0x65a8
cmpl %ebp, 0x5bfa(%rip)      # 0xc194
jne 0x6522
movzbl 0x5cbe(%rip), %edi      # 0xc261
callq 0x65dd
movzbl 0x5cb1(%rip), %edi      # 0xc260
callq 0x65dd
jmp 0x6522
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x22c8
movq %rbx, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O2/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 0x5bc0(%rip), %rax      # 0xc1a8
subq 0x5bb1(%rip), %rax      # 0xc1a0
movq 0x5c72(%rip), %rcx      # 0xc268
movb %dil, (%rcx,%rax)
movq 0x5ba7(%rip), %rcx      # 0xc1a8
incq %rcx
movq %rcx, 0x5b9d(%rip)      # 0xc1a8
movq 0x5c3e(%rip), %rax      # 0xc250
leaq 0x2(%rax), %rdx
imulq 0x5b82(%rip), %rdx      # 0xc1a0
cmpq %rdx, %rcx
jbe 0x66dd
movzbl 0x5c18(%rip), %ecx      # 0xc246
cmpq %rcx, %rax
jae 0x66e5
movq 0x59b2(%rip), %r14      # 0xbff0
leaq 0x2152(%rip), %rsi      # 0x8797
movq %r14, %rdi
callq 0x2140
movq 0x5bfc(%rip), %rsi      # 0xc250
incq %rsi
movq %rax, %rdi
callq 0x20f0
leaq 0x1dbc(%rip), %rbx      # 0x8422
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2140
leaq 0x214a(%rip), %rsi      # 0x87c2
movq %r14, %rdi
callq 0x2140
movq 0x5b21(%rip), %rsi      # 0xc1a8
movq %rax, %rdi
callq 0x20f0
leaq 0x2132(%rip), %rsi      # 0x87c8
movq %rax, %rdi
callq 0x2140
movq 0x5afb(%rip), %rsi      # 0xc1a0
movq %rax, %rdi
callq 0x20f0
leaq 0x211c(%rip), %rsi      # 0x87d0
movq %rax, %rdi
callq 0x2140
movq 0x5b85(%rip), %rsi      # 0xc248
movq %rax, %rdi
callq 0x20f0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2140
incq 0x5b73(%rip)            # 0xc250
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x5904(%rip), %rdi      # 0xbff0
leaq 0x2088(%rip), %rsi      # 0x877b
callq 0x2140
pushq $0x1
popq %rdi
callq 0x2180
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x88, %rsp
leaq 0x4b05(%rip), %rsi      # 0x7004
leaq -0x68(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x20b0
xorps %xmm0, %xmm0
leaq -0x90(%rbp), %rsi
movaps %xmm0, (%rsi)
leaq 0x2aa(%rip), %rax       # 0x27ca
movq %rax, 0x18(%rsi)
leaq 0x2a9(%rip), %rax       # 0x27d4
movq %rax, 0x10(%rsi)
leaq -0x68(%rbp), %rdi
pushq $0x2
popq %rdx
callq 0x2838
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x266a
leaq -0x68(%rbp), %rdi
callq 0x20e0
testq %rbx, %rbx
je 0x25fb
leaq 0x4abd(%rip), %rsi      # 0x7020
leaq -0x48(%rbp), %rdi
leaq -0x28(%rbp), %rdx
callq 0x20b0
leaq 0x4ab5(%rip), %rsi      # 0x702c
leaq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x2c2a
leaq -0x18(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x4a92(%rip), %rsi      # 0x702c
leaq -0x28(%rbp), %rdx
movq %rbx, %rdi
callq 0x2aa4
movq 0x9a2b(%rip), %rdi      # 0xbfd8
leaq 0x4a7e(%rip), %rsi      # 0x7032
callq 0x21d0
leaq -0x28(%rbp), %rsi
movq %rax, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x292a
movq %rbx, %rdi
callq 0x268a
movq %rbx, %rdi
callq 0x21b0
leaq -0x28(%rbp), %rdi
callq 0x20e0
leaq -0x48(%rbp), %rdi
callq 0x20e0
xorl %eax, %eax
jmp 0x2613
leaq 0x4a0b(%rip), %rdi      # 0x700d
leaq 0x49fb(%rip), %rsi      # 0x7004
xorl %eax, %eax
callq 0x2040
pushq $-0x1
popq %rax
addq $0x88, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
jmp 0x264a
jmp 0x2639
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x266a
leaq -0x68(%rbp), %rdi
jmp 0x264e
movq %rax, %rbx
jmp 0x2653
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x20e0
leaq -0x48(%rbp), %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x2310
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x5f4c
movq %rbx, %rdi
callq 0x5fee
leaq 0x38(%rsp), %rsi
movq $0x4000, (%rsi)         # imm = 0x4000
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rdx
leaq 0x7(%rsp), %rcx
callq 0x6196
movq 0x8(%rsp), %r15
movq 0x10(%rsp), %r12
leaq 0x40(%rsp), %rbx
leaq 0x38(%rsp), %r14
cmpq %r12, %r15
je 0x2b85
movq (%r15), %rax
movq %rax, 0x38(%rsp)
movq %rbx, %rdi
callq 0xa016
movq %r14, %rdi
callq 0x61cc
movq %rbx, %rdi
callq 0xca30
addq $0x8, %r15
jmp 0x2b5a
leaq 0x8(%rsp), %rdi
callq 0xcad8
leaq 0x20(%rsp), %rdi
callq 0xca40
xorl %eax, %eax
addq $0x13c8, %rsp           # imm = 0x13C8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x2bac
movq %rax, %r14
jmp 0x2bcb
movq %rax, %r14
jmp 0x2bc1
movq %rax, %r14
movq %rbx, %rdi
callq 0xca30
leaq 0x8(%rsp), %rdi
callq 0xcad8
leaq 0x20(%rsp), %rdi
callq 0xca40
movq %r14, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O2/lemire[P]validateutf8-experiments/benchmarks/hoehrmann.h
// Function: fast_validate_dfa_utf8(signed char const*, unsigned long)
static inline fastvalidate::error_code
fast_validate_dfa_utf8(const signed char *c, size_t len) {
  const unsigned char *cu = (const unsigned char *)c;
  uint32_t state = 0;
  for (size_t i = 0; i < len; i++) {
    uint32_t byteval = (uint32_t)cu[i];
    if (fast_updatestate(&state, byteval) == UTF8_REJECT)
      return fastvalidate::error_code::UTF8_ERROR;
  }
  if (fast_updatestate(&state, 0) == UTF8_REJECT)
    return fastvalidate::error_code::UTF8_ERROR;
  return fastvalidate::error_code::SUCCESS;
}

// Assembly:
xorl %edx, %edx
leaq 0xb5b4(%rip), %rcx      # 0xe1e0
pushq $0x1
popq %rax
xorl %r8d, %r8d
cmpq %r8, %rsi
je 0x2c4f
movzbl (%rdi,%r8), %r9d
shll $0x8, %edx
orq %r9, %rdx
movzbl (%rcx,%rdx), %edx
incq %r8
cmpl $0x1, %edx
jne 0x2c32
retq
movl %edx, %edx
shlq $0x8, %rdx
xorl %eax, %eax
cmpb $0x1, (%rdx,%rcx)
sete %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/lemire[P]validateutf8-experiments/benchmarks/hoehrmann.h
// Function: big_validate_dfa_utf8(signed char const*, unsigned long)
static inline fastvalidate::error_code
big_validate_dfa_utf8(const signed char *c, size_t len) {
  const unsigned char *cu = (const unsigned char *)c;
  uint32_t state = 0;
  for (size_t i = 0; i < len; i++) {
    uint32_t byteval = (uint32_t)cu[i];
    if (big_updatestate(&state, byteval) == UTF8_REJECT * 256)
      return fastvalidate::error_code::UTF8_ERROR;
  }
  if (big_updatestate(&state, 0) == UTF8_REJECT * 256)
    return fastvalidate::error_code::UTF8_ERROR;
  return fastvalidate::error_code::SUCCESS;
}

// Assembly:
xorl %edx, %edx
leaq 0xbe78(%rip), %rcx      # 0xeae0
pushq $0x1
popq %rax
xorl %r8d, %r8d
cmpq %r8, %rsi
je 0x2c8b
movzbl (%rdi,%r8), %r9d
addl %r9d, %edx
movzwl (%rcx,%rdx,2), %edx
incq %r8
cmpl $0x100, %edx            # imm = 0x100
jne 0x2c6e
retq
movl %edx, %edx
xorl %eax, %eax
cmpw $0x100, (%rcx,%rdx,2)   # imm = 0x100
sete %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/lemire[P]validateutf8-experiments/benchmarks/benchmark.cpp
// Function: RealDataBenchmark::run()
void run() {
    printf("\n");
    printf("Running UTF8 validation benchmark.\n");
    printf("The speed is normalized by the number of input bytes.\n");
    const size_t repeat = 1000;
    for (std::string filename : filenames) {
      std::ifstream in(filename);
      if (!in) {
        std::cerr << " I cannot load " << filename << std::endl;
        continue;
      }
      std::vector<char> utf8((std::istreambuf_iterator<char>(in)),
                             std::istreambuf_iterator<char>());
      std::cout << "file: " << filename << " (" << utf8.size() / 1000 << "KB)"
                << std::endl;

      run(utf8, repeat);
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rdi, %rbx
pushq $0xa
popq %rdi
callq 0x21e0
leaq 0xa67d(%rip), %rdi      # 0x1068e
callq 0x2240
leaq 0xa694(%rip), %rdi      # 0x106b1
callq 0x2240
movq (%rbx), %r14
movq %rbx, 0x10(%rsp)
movq 0x8(%rbx), %rbx
leaq 0x30(%rsp), %r15
leaq 0x50(%rsp), %r12
pushq $0x8
popq %rbp
leaq 0x18(%rsp), %r13
cmpq %rbx, %r14
je 0x614f
movq %r15, %rdi
movq %r14, %rsi
callq 0x21c0
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x2250
movq 0x50(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x70(%rsp,%rax)
je 0x609c
movq 0xef78(%rip), %rdi      # 0x14ff0
leaq 0xa351(%rip), %rsi      # 0x103d0
callq 0x2180
movq %rax, %rdi
movq %r15, %rsi
callq 0x2160
movq %rax, %rdi
callq 0x20b0
jmp 0x6136
movq 0x138(%rsp,%rax), %rsi
movq %r13, %rdi
pushq $-0x1
popq %rdx
xorl %ecx, %ecx
movl %edx, %r8d
leaq 0xf(%rsp), %r9
callq 0x66de
movq 0xef10(%rip), %rdi      # 0x14fd0
leaq 0xa319(%rip), %rsi      # 0x103e0
callq 0x2180
movq %rax, %rdi
movq %r15, %rsi
callq 0x2160
movq %rax, %rdi
leaq 0xa306(%rip), %rsi      # 0x103e7
callq 0x2180
movq %rax, %rdi
movq 0x20(%rsp), %rax
subq 0x18(%rsp), %rax
xorl %edx, %edx
movl $0x3e8, %ecx            # imm = 0x3E8
divq %rcx
movq %rax, %rsi
callq 0x2100
movq %rax, %rdi
leaq 0xa2db(%rip), %rsi      # 0x103ea
callq 0x2180
movq %rax, %rdi
callq 0x20b0
movl $0x3e8, %edx            # imm = 0x3E8
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x6710
movq %r13, %rdi
callq 0x8c94
movq %r12, %rdi
callq 0x2050
movq %r15, %rdi
callq 0x20a0
addq $0x20, %r14
jmp 0x6040
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6168
movq %rax, %rbx
jmp 0x6184
movq %rax, %rbx
jmp 0x617a
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x8c94
leaq 0x50(%rsp), %rdi
callq 0x2050
leaq 0x30(%rsp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rax
movq %rdi, (%rsp)
cmpq %rsi, %rdi
je 0x9d4e
movq %rsi, %rbx
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9d56
movl %eax, %ecx
movq (%rsp), %rax
testl %ecx, %ecx
jne 0x9d4e
cmpq %rbx, %rax
jne 0x9d34
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0x2030
movq %rax, %r15
movslq 0x8(%r14), %rax
movq (%r14), %rdi
xorl %ecx, %ecx
cmpq %rax, %rcx
jge 0x247d
movq (%rdi,%rcx,8), %rdx
movq %rdx, (%r15,%rcx,8)
incq %rcx
jmp 0x246b
testq %rdi, %rdi
je 0x2487
callq 0x2190
movq %r15, (%r14)
movl %ebx, 0xc(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x24fc
cmpl %esi, 0x8(%rdi)
jle 0x24fc
movq (%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rax
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x20e0
movq %rax, %rbx
leaq 0x1af6(%rip), %rsi      # 0x4004
movq %rax, %rdi
callq 0x2260
movq 0x3abb(%rip), %rsi      # 0x5fd8
movq 0x3aa4(%rip), %rdx      # 0x5fc8
movq %rbx, %rdi
callq 0x2200
movq %rax, %r14
movq %rbx, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O2/fatiiates[P]CDLL-with-cpp-make-gcc/./src/ArrayList.cpp
// Function: ArrayList::insert(int, CircularDoublyLinkedList*)
void ArrayList::insert(int index,CircularDoublyLinkedList* item){
      if(index < 0 || index > length)
        throw invalid_argument("İndex 0'dan küçük veya kapasiteden büyük olamaz . Error Code: 101");
      else{
        if(length == capacity) reserve(2*capacity);
        for (int i = length - 1; i >= index; i--)
          items[i+1] = items[i];
        items[index] = item;
        length++;
      }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testl %esi, %esi
js 0x25b3
movl %esi, %r15d
movq %rdi, %rbx
movl 0x8(%rdi), %esi
cmpl %r15d, %esi
jl 0x25b3
movq %rdx, %r14
cmpl 0xc(%rbx), %esi
jne 0x2581
addl %esi, %esi
movq %rbx, %rdi
callq 0x243c
movl 0x8(%rbx), %esi
movl %esi, %eax
cmpl %r15d, %eax
jle 0x2599
movl %eax, %ecx
decl %eax
movq (%rbx), %rdx
movq (%rdx,%rax,8), %rdi
movq %rdi, (%rdx,%rcx,8)
jmp 0x2583
movq (%rbx), %rax
movl %r15d, %ecx
movq %r14, (%rax,%rcx,8)
incl %esi
movl %esi, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x20e0
movq %rax, %rbx
leaq 0x1a99(%rip), %rsi      # 0x405e
movq %rax, %rdi
callq 0x2260
movq 0x3a04(%rip), %rsi      # 0x5fd8
movq 0x39ed(%rip), %rdx      # 0x5fc8
movq %rbx, %rdi
callq 0x2200
movq %rax, %r14
movq %rbx, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/fatiiates[P]CDLL-with-cpp-make-gcc/./src/CircularDoublyLinkedList.cpp
// Function: CircularDoublyLinkedList::FindPreNode(int)
Node* CircularDoublyLinkedList::FindPreNode(int index){
      int i=1;
      Node* prv = head;
      for (Node* itr = head;i != index; itr=itr->next,i++) {
        prv = prv->next;
      }
      return prv;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
decl %esi
movq (%rax), %rax
subl $0x1, %esi
jb 0x267f
addq $0x8, %rax
jmp 0x2671
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/fatiiates[P]CDLL-with-cpp-make-gcc/./src/CircularDoublyLinkedList.cpp
// Function: CircularDoublyLinkedList::insert(int, unsigned char const&)
void CircularDoublyLinkedList::insert(int index, const unsigned char& item){
      if(index < 0  || index > size){
        throw invalid_argument("Index 0'dan kucuk veya eleman sayisindan buyuk olamaz.  Error Code: 103");
      }else{
        if(index == 0){
          if(isEmpty()){
            head = new Node(item);
            head->next = head;
            head->prev = head;
          }
          else{
            head = new Node(item, head, head->prev);
            head->prev->next = head;
            head->next->prev = head;
          }
        }else{
          Node* preNodeIndex = FindPreNode(index);
          preNodeIndex->next = new Node(item, preNodeIndex->next, preNodeIndex);
          preNodeIndex->next->next->prev = preNodeIndex->next;
        }
        size++;
      }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %esi, %esi
js 0x2822
movq %rdi, %rbx
movl 0x8(%rdi), %r12d
cmpl %esi, %r12d
jl 0x2822
movq %rdx, %r15
testl %esi, %esi
je 0x27c6
movq %rbx, %rdi
callq 0x2668
movq %rax, %r12
pushq $0x18
popq %rdi
callq 0x2160
movq %rax, %r14
movq 0x8(%r12), %rdx
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rcx
callq 0x2654
movq %r14, 0x8(%r12)
jmp 0x27f3
pushq $0x18
popq %rdi
callq 0x2160
movq %rax, %r14
testl %r12d, %r12d
je 0x2807
movq (%rbx), %rdx
movq 0x10(%rdx), %rcx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2654
movq %r14, (%rbx)
movq 0x10(%r14), %rax
movq %r14, 0x8(%rax)
movq 0x8(%r14), %rax
movq %r14, 0x10(%rax)
incl 0x8(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2654
movq %r14, (%rbx)
movq %r14, 0x8(%r14)
movq %r14, %rax
jmp 0x27f7
pushq $0x10
popq %rdi
callq 0x20e0
movq %rax, %r14
leaq 0x18c8(%rip), %rsi      # 0x40fc
movq %rax, %rdi
callq 0x2260
movq 0x3795(%rip), %rsi      # 0x5fd8
movq 0x377e(%rip), %rdx      # 0x5fc8
movq %r14, %rdi
callq 0x2200
jmp 0x2856
jmp 0x2856
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r14, %rdi
callq 0x2170
jmp 0x2871
movq %rax, %rbx
movq %r14, %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O2/fatiiates[P]CDLL-with-cpp-make-gcc/./src/CircularDoublyLinkedList.cpp
// Function: CircularDoublyLinkedList::indexOf(unsigned char const&) const
int CircularDoublyLinkedList::indexOf(const unsigned char& item) const {
      int i = 0;
      for (Node* itr=head;i != size;itr=itr->next) {
        if(itr->data == item) return i;
				i++;
      }
      return -1;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x8(%rdi), %ecx
movb (%rsi), %sil
xorl %edx, %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %edx, %ecx
je 0x28a1
movq (%rdi), %rdi
cmpb %sil, (%rdi)
je 0x289f
incl %edx
addq $0x8, %rdi
jmp 0x288b
movl %edx, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/fatiiates[P]CDLL-with-cpp-make-gcc/./src/CircularDoublyLinkedList.cpp
// Function: CircularDoublyLinkedList::remove(unsigned char const&)
void CircularDoublyLinkedList::remove(const unsigned char& item){
      int index = indexOf(item);
      if (index == -1)
        throw invalid_argument("Eleman listeye ait degil. Error Code: 104");
      else
        removeAt(index);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x287a
cmpl $-0x1, %eax
je 0x28c6
movq %rbx, %rdi
movl %eax, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x290a
pushq $0x10
popq %rdi
callq 0x20e0
movq %rax, %rbx
leaq 0x186c(%rip), %rsi      # 0x4144
movq %rax, %rdi
callq 0x2260
movq 0x36f1(%rip), %rsi      # 0x5fd8
movq 0x36da(%rip), %rdx      # 0x5fc8
movq %rbx, %rdi
callq 0x2200
movq %rax, %r14
movq %rbx, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O2/fatiiates[P]CDLL-with-cpp-make-gcc/./src/CircularDoublyLinkedList.cpp
// Function: CircularDoublyLinkedList::removeAt(int)
void CircularDoublyLinkedList::removeAt(int index){

      if(isEmpty()){
        throw invalid_argument("Listede hic eleman bulunmuyor. Error Code: 105");
      }else{
        if(index < 0  || index >= size){
          throw invalid_argument("Index 0'dan kucuk, eleman sayisina esit veya buyuk olamaz. Error Code: 106");
        }else{
          Node* del;

          if(index == 0){
            del = head;

            if(size == 1){
              head = head->next = head->prev = NULL;
            }else{
              head = head->next;
              head->prev = del->prev;
              del->prev->next = head;
            }
          }else{
            Node* preNodeIndex = FindPreNode(index);
            del = preNodeIndex->next;
            preNodeIndex->next = del->next;
            del->next->prev = preNodeIndex;
          }

          delete del;
          size--;
        }
      }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl 0x8(%rdi), %eax
testl %eax, %eax
je 0x297c
testl %esi, %esi
js 0x2998
cmpl %esi, %eax
jle 0x2998
movq %rdi, %rbx
testl %esi, %esi
je 0x2941
movq %rbx, %rdi
callq 0x2668
movq 0x8(%rax), %rdi
movq 0x8(%rdi), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rcx)
jmp 0x296c
movq (%rbx), %rdi
cmpl $0x1, %eax
jne 0x2959
leaq 0x8(%rdi), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
andq $0x0, (%rbx)
jmp 0x296c
movq 0x8(%rdi), %rax
movq %rax, (%rbx)
movq 0x10(%rdi), %rcx
movq %rcx, 0x10(%rax)
movq %rax, 0x8(%rcx)
pushq $0x18
popq %rsi
callq 0x2170
decl 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x20e0
movq %rax, %rbx
leaq 0x17e0(%rip), %rsi      # 0x416e
movq %rax, %rdi
callq 0x2260
jmp 0x29b2
pushq $0x10
popq %rdi
callq 0x20e0
movq %rax, %rbx
leaq 0x17f3(%rip), %rsi      # 0x419d
movq %rax, %rdi
callq 0x2260
movq 0x361f(%rip), %rsi      # 0x5fd8
movq 0x3608(%rip), %rdx      # 0x5fc8
movq %rbx, %rdi
callq 0x2200
jmp 0x29ca
movq %rax, %r14
movq %rbx, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O2/fatiiates[P]CDLL-with-cpp-make-gcc/./src/CircularDoublyLinkedList.cpp
// Function: CircularDoublyLinkedList::find(unsigned char const&)
bool CircularDoublyLinkedList::find(const unsigned char& item){
      int i=0;
      for (Node* itr=head;i != size;itr=itr->next,i++)
        if(itr->data == item) return true;

      return false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x8(%rdi), %ecx
movb (%rsi), %al
movl %ecx, %edx
addl $-0x1, %edx
jae 0x2a19
movq (%rdi), %rdi
cmpb %al, (%rdi)
je 0x2a19
addq $0x8, %rdi
movl %edx, %ecx
jmp 0x2a05
testl %ecx, %ecx
setne %al
popq %rbp
retq