LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv4/ip4_addr.c
// Function: ip4addr_ntoa_r
char *
ip4addr_ntoa_r(const ip4_addr_t *addr, char *buf, int buflen)
{
  u32_t s_addr;
  char inv[3];
  char *rp;
  u8_t *ap;
  u8_t rem;
  u8_t n;
  u8_t i;
  int len = 0;

  s_addr = ip4_addr_get_u32(addr);

  rp = buf;
  ap = (u8_t *)&s_addr;
  for (n = 0; n < 4; n++) {
    i = 0;
    do {
      rem = *ap % (u8_t)10;
      *ap /= (u8_t)10;
      inv[i++] = (char)('0' + rem);
    } while (*ap);
    while (i--) {
      if (len++ >= buflen) {
        return NULL;
      }
      *rp++ = inv[i];
    }
    if (len++ >= buflen) {
      return NULL;
    }
    *rp++ = '.';
    ap++;
  }
  *--rp = 0;
  return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl $0x0, -0x40(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movb $0x0, -0x3a(%rbp)
movzbl -0x3a(%rbp), %eax
cmpl $0x4, %eax
jge 0x1a792
movb $0x0, -0x3b(%rbp)
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movb %dl, %al
movb %al, -0x39(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movzbl (%rax), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x48(%rbp), %rax
movb %cl, (%rax)
movzbl -0x39(%rbp), %eax
addl $0x30, %eax
movb %al, %cl
movb -0x3b(%rbp), %al
movb %al, %dl
addb $0x1, %dl
movb %dl, -0x3b(%rbp)
movzbl %al, %eax
movb %cl, -0x23(%rbp,%rax)
movq -0x38(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x1a6b4
jmp 0x1a709
movb -0x3b(%rbp), %al
movb %al, %cl
addb $-0x1, %cl
movb %cl, -0x3b(%rbp)
cmpb $0x0, %al
je 0x1a74d
movl -0x40(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x40(%rbp)
cmpl -0x1c(%rbp), %eax
jl 0x1a732
movq $0x0, -0x8(%rbp)
jmp 0x1a7ad
movzbl -0x3b(%rbp), %eax
movb -0x23(%rbp,%rax), %cl
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x30(%rbp)
movb %cl, (%rax)
jmp 0x1a709
movl -0x40(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x40(%rbp)
cmpl -0x1c(%rbp), %eax
jl 0x1a767
movq $0x0, -0x8(%rbp)
jmp 0x1a7ad
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movb $0x2e, (%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movb -0x3a(%rbp), %al
addb $0x1, %al
movb %al, -0x3a(%rbp)
jmp 0x1a6a3
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x30(%rbp)
movb $0x0, -0x1(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv4/ip4_frag.c
// Function: ip_reass_tmr
void
ip_reass_tmr(void)
{
  struct ip_reassdata *r, *prev = NULL;

  r = reassdatagrams;
  while (r != NULL) {
    /* Decrement the timer. Once it reaches 0,
     * clean up the incomplete fragment assembly */
    if (r->timer > 0) {
      r->timer--;
      LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer dec %"U16_F"\n", (u16_t)r->timer));
      prev = r;
      r = r->next;
    } else {
      /* reassembly timed out */
      struct ip_reassdata *tmp;
      LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer timed out\n"));
      tmp = r;
      /* get the next pointer before freeing */
      r = r->next;
      /* free the helper struct and all enqueued pbufs */
      ip_reass_free_complete_datagram(tmp, prev);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq $0x0, -0x10(%rbp)
movq 0x151f9(%rip), %rax     # 0x2f9d0
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1a839
movq -0x8(%rbp), %rax
movzbl 0x27(%rax), %eax
cmpl $0x0, %eax
jle 0x1a813
movq -0x8(%rbp), %rax
movb 0x27(%rax), %cl
addb $-0x1, %cl
movb %cl, 0x27(%rax)
jmp 0x1a7fe
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x1a837
jmp 0x1a815
jmp 0x1a817
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1a840
jmp 0x1a7db
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv4/ip4_frag.c
// Function: ip_reass_enqueue_new_datagram
static struct ip_reassdata *
ip_reass_enqueue_new_datagram(struct ip_hdr *fraghdr, int clen)
{
  struct ip_reassdata *ipr;
#if ! IP_REASS_FREE_OLDEST
  LWIP_UNUSED_ARG(clen);
#endif

  /* No matching previous fragment found, allocate a new reassdata struct */
  ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA);
  if (ipr == NULL) {
#if IP_REASS_FREE_OLDEST
    if (ip_reass_remove_oldest_datagram(fraghdr, clen) >= clen) {
      ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA);
    }
    if (ipr == NULL)
#endif /* IP_REASS_FREE_OLDEST */
    {
      IPFRAG_STATS_INC(ip_frag.memerr);
      LWIP_DEBUGF(IP_REASS_DEBUG, ("Failed to alloc reassdata struct\n"));
      return NULL;
    }
  }
  memset(ipr, 0, sizeof(struct ip_reassdata));
  ipr->timer = IP_REASS_MAXAGE;

  /* enqueue the new structure to the front of the list */
  ipr->next = reassdatagrams;
  reassdatagrams = ipr;
  /* copy the ip header for later tests and input */
  /* @todo: no ip options supported? */
  SMEMCPY(&(ipr->iphdr), fraghdr, IP_HLEN);
  return ipr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x5, %edi
callq 0x4930
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1b16a
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x1afc0
cmpl -0x14(%rbp), %eax
jl 0x1b153
movl $0x5, %edi
callq 0x4930
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1b168
jmp 0x1b15c
jmp 0x1b15e
movq $0x0, -0x8(%rbp)
jmp 0x1b1c0
jmp 0x1b16a
movq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x20f0
movq -0x20(%rbp), %rax
movb $0xf, 0x27(%rax)
movq 0x14847(%rip), %rcx     # 0x2f9d0
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq %rax, 0x14835(%rip)     # 0x2f9d0
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x18(%rax)
movl 0x10(%rcx), %ecx
movl %ecx, 0x20(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv4/ip4_frag.c
// Function: ip_reass_dequeue_datagram
static void
ip_reass_dequeue_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev)
{
  /* dequeue the reass struct  */
  if (reassdatagrams == ipr) {
    /* it was the first in the list */
    reassdatagrams = ipr->next;
  } else {
    /* it wasn't the first, so it must have a valid 'prev' */
    LWIP_ASSERT("sanity check linked list", prev != NULL);
    prev->next = ipr->next;
  }

  /* now we can free the ip_reassdata struct */
  memp_free(MEMP_REASSDATA, ipr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x14329(%rip), %rax     # 0x2f9d0
cmpq -0x8(%rbp), %rax
jne 0x1b6bd
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, 0x14315(%rip)     # 0x2f9d0
jmp 0x1b707
jmp 0x1b6bf
cmpq $0x0, -0x10(%rbp)
jne 0x1b6f7
jmp 0x1b6c8
leaq 0xbbfd(%rip), %rdi      # 0x272cc
leaq 0xe26a(%rip), %rsi      # 0x29940
movl $0x145, %edx            # imm = 0x145
leaq 0xe0e3(%rip), %rcx      # 0x297c5
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x1b6f9
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rsi
movl $0x5, %edi
callq 0x4a80
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv4/ip4_frag.c
// Function: ipfrag_free_pbuf_custom
static void
ipfrag_free_pbuf_custom(struct pbuf *p)
{
  struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref *)p;
  LWIP_ASSERT("pcr != NULL", pcr != NULL);
  LWIP_ASSERT("pcr == p", (void *)pcr == (void *)p);
  if (pcr->original != NULL) {
    pbuf_free(pcr->original);
  }
  ip_frag_free_pbuf_custom_ref(pcr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1bc0c
jmp 0x1bbdd
leaq 0xb6e8(%rip), %rdi      # 0x272cc
leaq 0xdd6e(%rip), %rsi      # 0x29959
movl $0x2ce, %edx            # imm = 0x2CE
leaq 0xdbce(%rip), %rcx      # 0x297c5
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x1bc0e
jmp 0x1bc10
movq -0x10(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0x1bc4b
jmp 0x1bc1c
leaq 0xb6a9(%rip), %rdi      # 0x272cc
leaq 0xdd3b(%rip), %rsi      # 0x29965
movl $0x2cf, %edx            # imm = 0x2CF
leaq 0xdb8f(%rip), %rcx      # 0x297c5
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x1bc4d
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x1bc65
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x7260
movq -0x10(%rbp), %rdi
callq 0x1bb60
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv6/icmp6.c
// Function: icmp6_send_response
static void
icmp6_send_response(struct pbuf *p, u8_t code, u32_t data, u8_t type)
{
  const struct ip6_addr *reply_src, *reply_dest;
  struct netif *netif = ip_current_netif();

  LWIP_ASSERT("icmpv6 packet not a direct response", netif != NULL);
  reply_dest = ip6_current_src_addr();

  /* Select an address to use as source. */
  reply_src = ip_2_ip6(ip6_select_source_address(netif, reply_dest));
  if (reply_src == NULL) {
    ICMP6_STATS_INC(icmp6.rterr);
    return;
  }
  icmp6_send_response_with_addrs_and_netif(p, code, data, type, reply_src, reply_dest, netif);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %cl, %al
movb %sil, %cl
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
movl %edx, -0x10(%rbp)
movb %al, -0x11(%rbp)
leaq 0x138df(%rip), %rax     # 0x2f770
movq (%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x1bed0
jmp 0x1bea1
leaq 0xb424(%rip), %rdi      # 0x272cc
leaq 0xdabf(%rip), %rsi      # 0x2996e
movl $0x13a, %edx            # imm = 0x13A
leaq 0xdad7(%rip), %rcx      # 0x29992
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x1bed2
leaq 0x13897(%rip), %rax     # 0x2f770
addq $0x24, %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1c290
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1befb
jmp 0x1bf25
movq -0x8(%rbp), %rdi
movb -0x9(%rbp), %sil
movl -0x10(%rbp), %edx
movb -0x11(%rbp), %cl
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %r9
movq -0x30(%rbp), %rax
movzbl %sil, %esi
movzbl %cl, %ecx
movq %rax, (%rsp)
callq 0x1c120
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv6/icmp6.c
// Function: icmp6_send_response_with_addrs
static void
icmp6_send_response_with_addrs(struct pbuf *p, u8_t code, u32_t data, u8_t type,
    const ip6_addr_t *src_addr, const ip6_addr_t *dest_addr)
{
  const struct ip6_addr *reply_src, *reply_dest;
  struct netif *netif;

  /* Get the destination address and netif for this ICMP message. */
  LWIP_ASSERT("must provide both source and destination", src_addr != NULL);
  LWIP_ASSERT("must provide both source and destination", dest_addr != NULL);

  /* Special case, as ip6_current_xxx is either NULL, or points
     to a different packet than the one that expired. */
  IP6_ADDR_ZONECHECK(src_addr);
  IP6_ADDR_ZONECHECK(dest_addr);
  /* Swap source and destination for the reply. */
  reply_dest = src_addr;
  reply_src = dest_addr;
  netif = ip6_route(reply_src, reply_dest);
  if (netif == NULL) {
    ICMP6_STATS_INC(icmp6.rterr);
    return;
  }
  icmp6_send_response_with_addrs_and_netif(p, code, data, type, reply_src,
    reply_dest, netif);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %cl, %al
movb %sil, %cl
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
movl %edx, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %r8, -0x20(%rbp)
movq %r9, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1c02a
jmp 0x1bffb
leaq 0xb2ca(%rip), %rdi      # 0x272cc
leaq 0xd9d7(%rip), %rsi      # 0x299e0
movl $0x161, %edx            # imm = 0x161
leaq 0xd97d(%rip), %rcx      # 0x29992
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x1c02c
jmp 0x1c02e
cmpq $0x0, -0x28(%rbp)
jne 0x1c066
jmp 0x1c037
leaq 0xb28e(%rip), %rdi      # 0x272cc
leaq 0xd99b(%rip), %rsi      # 0x299e0
movl $0x162, %edx            # imm = 0x162
leaq 0xd941(%rip), %rcx      # 0x29992
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x1c068
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x1c270
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x1c092
jmp 0x1c0bc
movq -0x8(%rbp), %rdi
movb -0x9(%rbp), %sil
movl -0x10(%rbp), %edx
movb -0x11(%rbp), %cl
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
movq -0x40(%rbp), %rax
movzbl %sil, %esi
movzbl %cl, %ecx
movq %rax, (%rsp)
callq 0x1c120
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv6/ip6.c
// Function: ip6_output_if
err_t
ip6_output_if(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest,
             u8_t hl, u8_t tc,
             u8_t nexth, struct netif *netif)
{
  const ip6_addr_t *src_used = src;
  if (dest != LWIP_IP_HDRINCL) {
    if (src != NULL && ip6_addr_isany(src)) {
      src_used = ip_2_ip6(ip6_select_source_address(netif, dest));
      if ((src_used == NULL) || ip6_addr_isany(src_used)) {
        /* No appropriate source address was found for this packet. */
        LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip6_output: No suitable source address for packet.\n"));
        IP6_STATS_INC(ip6.rterr);
        return ERR_RTE;
      }
    }
  }
  return ip6_output_if_src(p, src_used, dest, hl, tc, nexth, netif);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %r8d, -0x48(%rbp)
movl %ecx, %eax
movl -0x48(%rbp), %ecx
movl %eax, -0x44(%rbp)
movq %rdx, %rax
movl -0x44(%rbp), %edx
movq %rax, -0x40(%rbp)
movq %rsi, %rax
movq -0x40(%rbp), %rsi
movq %rax, -0x38(%rbp)
movq %rdi, %r8
movq -0x38(%rbp), %rdi
movb %r9b, %al
movq 0x10(%rbp), %r9
movq %r8, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movb %dl, -0x21(%rbp)
movb %cl, -0x22(%rbp)
movb %al, -0x23(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1d64c
cmpq $0x0, -0x18(%rbp)
je 0x1d64a
cmpq $0x0, -0x18(%rbp)
je 0x1d5f8
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x1d64a
movq -0x18(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x1d64a
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x1d64a
movq -0x18(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x1d64a
movq 0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x1c290
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x1d63e
cmpq $0x0, -0x30(%rbp)
je 0x1d63e
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x1d648
movq -0x30(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x1d648
movq -0x30(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x1d648
movq -0x30(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x1d648
jmp 0x1d640
jmp 0x1d642
movb $-0x4, -0x1(%rbp)
jmp 0x1d67e
jmp 0x1d64a
jmp 0x1d64c
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movb -0x21(%rbp), %cl
movb -0x22(%rbp), %r8b
movb -0x23(%rbp), %r9b
movq 0x10(%rbp), %rax
movzbl %cl, %ecx
movzbl %r8b, %r8d
movzbl %r9b, %r9d
movq %rax, (%rsp)
callq 0x1d690
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv6/ip6_frag.c
// Function: ip6_reass_tmr
void
ip6_reass_tmr(void)
{
  struct ip6_reassdata *r, *tmp;

#if !IPV6_FRAG_COPYHEADER
  LWIP_ASSERT("sizeof(struct ip6_reass_helper) <= IP6_FRAG_HLEN, set IPV6_FRAG_COPYHEADER to 1",
    sizeof(struct ip6_reass_helper) <= IP6_FRAG_HLEN);
#endif /* !IPV6_FRAG_COPYHEADER */

  r = reassdatagrams;
  while (r != NULL) {
    /* Decrement the timer. Once it reaches 0,
     * clean up the incomplete fragment assembly */
    if (r->timer > 0) {
      r->timer--;
      r = r->next;
    } else {
      /* reassembly timed out */
      tmp = r;
      /* get the next pointer before freeing */
      r = r->next;
      /* free the helper struct and all enqueued pbufs */
      ip6_reass_free_complete_datagram(tmp);
     }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x11509(%rip), %rax     # 0x2fa08
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1e54f
movq -0x8(%rbp), %rax
movzbl 0x4f(%rax), %eax
cmpl $0x0, %eax
jle 0x1e531
movq -0x8(%rbp), %rax
movb 0x4f(%rax), %cl
addb $-0x1, %cl
movb %cl, 0x4f(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x1e54d
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1e560
jmp 0x1e503
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv6/ip6_frag.c
// Function: ip6_reass_remove_oldest_datagram
static void
ip6_reass_remove_oldest_datagram(struct ip6_reassdata *ipr, int pbufs_needed)
{
  struct ip6_reassdata *r, *oldest;

  /* Free datagrams until being allowed to enqueue 'pbufs_needed' pbufs,
   * but don't free the current datagram! */
  do {
    r = oldest = reassdatagrams;
    while (r != NULL) {
      if (r != ipr) {
        if (r->timer <= oldest->timer) {
          /* older than the previous oldest */
          oldest = r;
        }
      }
      r = r->next;
    }
    if (oldest == ipr) {
      /* nothing to free, ipr is the only element on the list */
      return;
    }
    if (oldest != NULL) {
      ip6_reass_free_complete_datagram(oldest);
    }
  } while (((ip6_reass_pbufcount + pbufs_needed) > IP_REASS_MAX_PBUFS) && (reassdatagrams != NULL));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq 0x10642(%rip), %rax     # 0x2fa08
movq %rax, -0x20(%rbp)
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1f40a
movq -0x18(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0x1f3fd
movq -0x18(%rbp), %rax
movzbl 0x4f(%rax), %eax
movq -0x20(%rbp), %rcx
movzbl 0x4f(%rcx), %ecx
cmpl %ecx, %eax
jg 0x1f3fb
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x1f3fd
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x1f3ce
movq -0x20(%rbp), %rax
cmpq -0x8(%rbp), %rax
jne 0x1f416
jmp 0x1f455
cmpq $0x0, -0x20(%rbp)
je 0x1f426
movq -0x20(%rbp), %rdi
callq 0x1e560
jmp 0x1f428
movzwl 0x105e1(%rip), %ecx     # 0x2fa10
addl -0xc(%rbp), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, -0x21(%rbp)
jle 0x1f44a
cmpq $0x0, 0x105c4(%rip)     # 0x2fa08
setne %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x1f3bf
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv6/ip6_frag.c
// Function: ip6_frag_free_pbuf_custom
static void
ip6_frag_free_pbuf_custom(struct pbuf *p)
{
  struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref*)p;
  LWIP_ASSERT("pcr != NULL", pcr != NULL);
  LWIP_ASSERT("pcr == p", (void*)pcr == (void*)p);
  if (pcr->original != NULL) {
    pbuf_free(pcr->original);
  }
  ip6_frag_free_pbuf_custom_ref(pcr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1f8dc
jmp 0x1f8ad
leaq 0x7a18(%rip), %rdi      # 0x272cc
leaq 0xa09e(%rip), %rsi      # 0x29959
movl $0x2ba, %edx            # imm = 0x2BA
leaq 0xa1e1(%rip), %rcx      # 0x29aa8
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x1f8de
jmp 0x1f8e0
movq -0x10(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0x1f91b
jmp 0x1f8ec
leaq 0x79d9(%rip), %rdi      # 0x272cc
leaq 0xa06b(%rip), %rsi      # 0x29965
movl $0x2bb, %edx            # imm = 0x2BB
leaq 0xa1a2(%rip), %rcx      # 0x29aa8
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x1f91d
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x1f935
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x7260
movq -0x10(%rbp), %rdi
callq 0x1f830
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv6/nd6.c
// Function: nd6_duplicate_addr_detected
static void
nd6_duplicate_addr_detected(struct netif *netif, s8_t addr_idx)
{

  /* Mark the address as duplicate, but leave its lifetimes alone. If this was
   * a manually assigned address, it will remain in existence as duplicate, and
   * as such be unusable for any practical purposes until manual intervention.
   * If this was an autogenerated address, the address will follow normal
   * expiration rules, and thus disappear once its valid lifetime expires. */
  netif_ip6_addr_set_state(netif, addr_idx, IP6_ADDR_DUPLICATED);

#if LWIP_IPV6_AUTOCONFIG
  /* If the affected address was the link-local address that we use to generate
   * all other addresses, then we should not continue to use those derived
   * addresses either, so mark them as duplicate as well. For autoconfig-only
   * setups, this will make the interface effectively unusable, approaching the
   * intention of RFC 4862 Sec. 5.4.5. @todo implement the full requirements */
  if (addr_idx == 0) {
    s8_t i;
    for (i = 1; i < LWIP_IPV6_NUM_ADDRESSES; i++) {
      if (!ip6_addr_isinvalid(netif_ip6_addr_state(netif, i)) &&
          !netif_ip6_addr_isstatic(netif, i)) {
        netif_ip6_addr_set_state(netif, i, IP6_ADDR_DUPLICATED);
      }
    }
  }
#endif /* LWIP_IPV6_AUTOCONFIG */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rdi
movl $0x40, %edx
movsbl -0x9(%rbp), %esi
callq 0x6420
movsbl -0x9(%rbp), %eax
cmpl $0x0, %eax
jne 0x2108b
movb $0x1, -0xa(%rbp)
movsbl -0xa(%rbp), %eax
cmpl $0x3, %eax
jge 0x21089
movq -0x8(%rbp), %rax
movsbq -0xa(%rbp), %rcx
movzbl 0x98(%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x2107d
cmpq $0x0, -0x8(%rbp)
je 0x2105c
movq -0x8(%rbp), %rax
movsbq -0xa(%rbp), %rcx
movl 0x9c(%rax,%rcx,4), %eax
movl %eax, -0x10(%rbp)
jmp 0x21063
xorl %eax, %eax
movl %eax, -0x10(%rbp)
jmp 0x21063
movl -0x10(%rbp), %eax
cmpl $0x0, %eax
je 0x2107d
movq -0x8(%rbp), %rdi
movl $0x40, %edx
movsbl -0xa(%rbp), %esi
callq 0x6420
jmp 0x2107f
movb -0xa(%rbp), %al
addb $0x1, %al
movb %al, -0xa(%rbp)
jmp 0x21021
jmp 0x2108b
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv6/nd6.c
// Function: nd6_find_neighbor_cache_entry
static s8_t
nd6_find_neighbor_cache_entry(const ip6_addr_t *ip6addr)
{
  s8_t i;
  for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) {
    if (ip6_addr_cmp(ip6addr, &(neighbor_cache[i].next_hop_address))) {
      return i;
    }
  }
  return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
movsbl -0x11(%rbp), %eax
cmpl $0xa, %eax
jge 0x21171
movq -0x10(%rbp), %rax
movl (%rax), %eax
movsbq -0x11(%rbp), %rdx
leaq 0xe955(%rip), %rcx      # 0x2fa20
imulq $0x38, %rdx, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jne 0x21162
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movsbq -0x11(%rbp), %rdx
leaq 0xe933(%rip), %rcx      # 0x2fa20
imulq $0x38, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jne 0x21162
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movsbq -0x11(%rbp), %rdx
leaq 0xe914(%rip), %rcx      # 0x2fa20
imulq $0x38, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jne 0x21162
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movsbq -0x11(%rbp), %rdx
leaq 0xe8f5(%rip), %rcx      # 0x2fa20
imulq $0x38, %rdx, %rdx
addq %rdx, %rcx
cmpl 0xc(%rcx), %eax
jne 0x21162
movq -0x10(%rbp), %rax
movzbl 0x10(%rax), %eax
movsbq -0x11(%rbp), %rdx
leaq 0xe8d5(%rip), %rcx      # 0x2fa20
imulq $0x38, %rdx, %rdx
addq %rdx, %rcx
movzbl 0x10(%rcx), %ecx
cmpl %ecx, %eax
jne 0x21162
movb -0x11(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x21175
jmp 0x21164
movb -0x11(%rbp), %al
addb $0x1, %al
movb %al, -0x11(%rbp)
jmp 0x210ac
movb $-0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv6/nd6.c
// Function: nd6_get_router
static s8_t
nd6_get_router(const ip6_addr_t *router_addr, struct netif *netif)
{
  s8_t i;

  IP6_ADDR_ZONECHECK_NETIF(router_addr, netif);

  /* Look for router. */
  for (i = 0; i < LWIP_ND6_NUM_ROUTERS; i++) {
    if ((default_router_list[i].neighbor_entry != NULL) &&
        ((netif != NULL) ? netif == default_router_list[i].neighbor_entry->netif : 1) &&
        ip6_addr_cmp(router_addr, &(default_router_list[i].neighbor_entry->next_hop_address))) {
      return i;
    }
  }

  /* router not found. */
  return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
movsbl -0x19(%rbp), %eax
cmpl $0x3, %eax
jge 0x21de8
movsbq -0x19(%rbp), %rcx
leaq 0xdf77(%rip), %rax      # 0x2fc50
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x21dd9
cmpq $0x0, -0x18(%rbp)
je 0x21d16
movq -0x18(%rbp), %rax
movsbq -0x19(%rbp), %rdx
leaq 0xdf4f(%rip), %rcx      # 0x2fc50
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
cmpq 0x18(%rcx), %rax
je 0x21d21
jmp 0x21dd9
movb $0x1, %al
testb $0x1, %al
jne 0x21d21
jmp 0x21dd9
movq -0x10(%rbp), %rax
movl (%rax), %eax
movsbq -0x19(%rbp), %rdx
leaq 0xdf1d(%rip), %rcx      # 0x2fc50
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
cmpl (%rcx), %eax
jne 0x21dd9
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movsbq -0x19(%rbp), %rdx
leaq 0xdef8(%rip), %rcx      # 0x2fc50
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
cmpl 0x4(%rcx), %eax
jne 0x21dd9
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movsbq -0x19(%rbp), %rdx
leaq 0xded6(%rip), %rcx      # 0x2fc50
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
cmpl 0x8(%rcx), %eax
jne 0x21dd9
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movsbq -0x19(%rbp), %rdx
leaq 0xdeb4(%rip), %rcx      # 0x2fc50
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
cmpl 0xc(%rcx), %eax
jne 0x21dd9
movq -0x10(%rbp), %rax
movzbl 0x10(%rax), %eax
movsbq -0x19(%rbp), %rdx
leaq 0xde91(%rip), %rcx      # 0x2fc50
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
movzbl 0x10(%rcx), %ecx
cmpl %ecx, %eax
jne 0x21dd9
movb -0x19(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x21dec
jmp 0x21ddb
movb -0x19(%rbp), %al
addb $0x1, %al
movb %al, -0x19(%rbp)
jmp 0x21cc0
movb $-0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv6/nd6.c
// Function: nd6_get_onlink_prefix
static s8_t
nd6_get_onlink_prefix(const ip6_addr_t *prefix, struct netif *netif)
{
  s8_t i;

  /* Look for prefix in list. */
  for (i = 0; i < LWIP_ND6_NUM_PREFIXES; ++i) {
    if ((ip6_addr_netcmp(&(prefix_list[i].prefix), prefix)) &&
        (prefix_list[i].netif == netif)) {
      return i;
    }
  }

  /* Entry not available. */
  return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
movsbl -0x19(%rbp), %eax
cmpl $0x5, %eax
jge 0x22160
movsbq -0x19(%rbp), %rcx
leaq 0xdbc7(%rip), %rax      # 0x2fca0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x22151
movsbq -0x19(%rbp), %rcx
leaq 0xdbaa(%rip), %rax      # 0x2fca0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x22151
movsbq -0x19(%rbp), %rcx
leaq 0xdb8b(%rip), %rax      # 0x2fca0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movzbl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
movzbl 0x10(%rcx), %ecx
cmpl %ecx, %eax
jne 0x22151
movsbq -0x19(%rbp), %rcx
leaq 0xdb68(%rip), %rax      # 0x2fca0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0x22151
movb -0x19(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x22164
jmp 0x22153
movb -0x19(%rbp), %al
addb $0x1, %al
movb %al, -0x19(%rbp)
jmp 0x220c0
movb $-0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv6/nd6.c
// Function: nd6_new_onlink_prefix
static s8_t
nd6_new_onlink_prefix(const ip6_addr_t *prefix, struct netif *netif)
{
  s8_t i;

  /* Create new entry. */
  for (i = 0; i < LWIP_ND6_NUM_PREFIXES; ++i) {
    if ((prefix_list[i].netif == NULL) ||
        (prefix_list[i].invalidation_timer == 0)) {
      /* Found empty prefix entry. */
      prefix_list[i].netif = netif;
      ip6_addr_set(&(prefix_list[i].prefix), prefix);
      return i;
    }
  }

  /* Entry not available. */
  return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
movsbl -0x19(%rbp), %eax
cmpl $0x5, %eax
jge 0x222ec
movsbq -0x19(%rbp), %rcx
leaq 0xdb07(%rip), %rax      # 0x2fca0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x18(%rax)
je 0x221c4
movsbq -0x19(%rbp), %rcx
leaq 0xdaed(%rip), %rax      # 0x2fca0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x20(%rax)
jne 0x222dd
movq -0x18(%rbp), %rcx
movsbq -0x19(%rbp), %rdx
leaq 0xdacc(%rip), %rax      # 0x2fca0
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x18(%rax)
cmpq $0x0, -0x10(%rbp)
jne 0x221ed
xorl %eax, %eax
movl %eax, -0x20(%rbp)
jmp 0x221f6
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %ecx
movsbq -0x19(%rbp), %rdx
leaq 0xda9b(%rip), %rax      # 0x2fca0
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
cmpq $0x0, -0x10(%rbp)
jne 0x2221c
xorl %eax, %eax
movl %eax, -0x24(%rbp)
jmp 0x22226
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %ecx
movsbq -0x19(%rbp), %rdx
leaq 0xda6b(%rip), %rax      # 0x2fca0
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
cmpq $0x0, -0x10(%rbp)
jne 0x2224d
xorl %eax, %eax
movl %eax, -0x28(%rbp)
jmp 0x22257
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %ecx
movsbq -0x19(%rbp), %rdx
leaq 0xda3a(%rip), %rax      # 0x2fca0
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
cmpq $0x0, -0x10(%rbp)
jne 0x2227e
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
jmp 0x22288
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movsbq -0x19(%rbp), %rdx
leaq 0xda09(%rip), %rax      # 0x2fca0
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
cmpq $0x0, -0x10(%rbp)
jne 0x222af
xorl %eax, %eax
movl %eax, -0x30(%rbp)
jmp 0x222ba
movq -0x10(%rbp), %rax
movzbl 0x10(%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movb %al, %cl
movsbq -0x19(%rbp), %rdx
leaq 0xd9d5(%rip), %rax      # 0x2fca0
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movb %cl, 0x10(%rax)
movb -0x19(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x222f0
jmp 0x222df
movb -0x19(%rbp), %al
addb $0x1, %al
movb %al, -0x19(%rbp)
jmp 0x22180
movb $-0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv6/nd6.c
// Function: nd6_find_destination_cache_entry
static s16_t
nd6_find_destination_cache_entry(const ip6_addr_t *ip6addr)
{
  s16_t i;

  IP6_ADDR_ZONECHECK(ip6addr);

  for (i = 0; i < LWIP_ND6_NUM_DESTINATIONS; i++) {
    if (ip6_addr_cmp(ip6addr, &(destination_cache[i].destination_addr))) {
      return i;
    }
  }
  return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movw $0x0, -0x12(%rbp)
movswl -0x12(%rbp), %eax
cmpl $0xa, %eax
jge 0x228b9
movq -0x10(%rbp), %rax
movl (%rax), %eax
movswq -0x12(%rbp), %rdx
leaq 0xd563(%rip), %rcx      # 0x2fd70
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jne 0x228a6
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movswq -0x12(%rbp), %rdx
leaq 0xd541(%rip), %rcx      # 0x2fd70
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jne 0x228a6
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movswq -0x12(%rbp), %rdx
leaq 0xd522(%rip), %rcx      # 0x2fd70
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jne 0x228a6
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movswq -0x12(%rbp), %rdx
leaq 0xd503(%rip), %rcx      # 0x2fd70
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0xc(%rcx), %eax
jne 0x228a6
movq -0x10(%rbp), %rax
movzbl 0x10(%rax), %eax
movswq -0x12(%rbp), %rdx
leaq 0xd4e3(%rip), %rcx      # 0x2fd70
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
movzbl 0x10(%rcx), %ecx
cmpl %ecx, %eax
jne 0x228a6
movw -0x12(%rbp), %ax
movw %ax, -0x2(%rbp)
jmp 0x228bf
jmp 0x228a8
movw -0x12(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x12(%rbp)
jmp 0x227ee
movw $0xffff, -0x2(%rbp)     # imm = 0xFFFF
movw -0x2(%rbp), %ax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv6/nd6.c
// Function: nd6_free_neighbor_cache_entry
static void
nd6_free_neighbor_cache_entry(s8_t i)
{
  if ((i < 0) || (i >= LWIP_ND6_NUM_NEIGHBORS)) {
    return;
  }
  if (neighbor_cache[i].isrouter) {
    /* isrouter needs to be cleared before deleting a neighbor cache entry */
    return;
  }

  /* Free any queued packets. */
  if (neighbor_cache[i].q != NULL) {
    nd6_free_q(neighbor_cache[i].q);
    neighbor_cache[i].q = NULL;
  }

  neighbor_cache[i].state = ND6_NO_ENTRY;
  neighbor_cache[i].isrouter = 0;
  neighbor_cache[i].netif = NULL;
  neighbor_cache[i].counter.reachable_time = 0;
  ip6_addr_set_zero(&(neighbor_cache[i].next_hop_address));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movsbl -0x1(%rbp), %eax
cmpl $0x0, %eax
jl 0x23320
movsbl -0x1(%rbp), %eax
cmpl $0xa, %eax
jl 0x23325
jmp 0x23475
movsbq -0x1(%rbp), %rcx
leaq 0xc6ef(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpb $0x0, 0x31(%rax)
je 0x23343
jmp 0x23475
movsbq -0x1(%rbp), %rcx
leaq 0xc6d1(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x28(%rax)
je 0x23394
movsbq -0x1(%rbp), %rcx
leaq 0xc6b7(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq 0x28(%rax), %rdi
callq 0x24db0
movsbq -0x1(%rbp), %rcx
leaq 0xc69b(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x28(%rax)
movsbq -0x1(%rbp), %rcx
leaq 0xc680(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x30(%rax)
movsbq -0x1(%rbp), %rcx
leaq 0xc669(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x31(%rax)
movsbq -0x1(%rbp), %rcx
leaq 0xc652(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x18(%rax)
movsbq -0x1(%rbp), %rcx
leaq 0xc637(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x34(%rax)
movsbq -0x1(%rbp), %rcx
leaq 0xc61d(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl $0x0, (%rax)
movsbq -0x1(%rbp), %rcx
leaq 0xc604(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x4(%rax)
movsbq -0x1(%rbp), %rcx
leaq 0xc5ea(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x8(%rax)
movsbq -0x1(%rbp), %rcx
leaq 0xc5d0(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0xc(%rax)
movsbq -0x1(%rbp), %rcx
leaq 0xc5b6(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x10(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv6/nd6.c
// Function: nd6_get_next_hop_addr_or_queue
err_t
nd6_get_next_hop_addr_or_queue(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr, const u8_t **hwaddrp)
{
  s8_t i;

  /* Get next hop record. */
  i = nd6_get_next_hop_entry(ip6addr, netif);
  if (i < 0) {
    /* failed to get a next hop neighbor record. */
    return i;
  }

  /* Now that we have a destination record, send or queue the packet. */
  if (neighbor_cache[i].state == ND6_STALE) {
    /* Switch to delay state. */
    neighbor_cache[i].state = ND6_DELAY;
    neighbor_cache[i].counter.delay_time = LWIP_ND6_DELAY_FIRST_PROBE_TIME / ND6_TMR_INTERVAL;
  }
  /* @todo should we send or queue if PROBE? send for now, to let unicast NS pass. */
  if ((neighbor_cache[i].state == ND6_REACHABLE) ||
      (neighbor_cache[i].state == ND6_DELAY) ||
      (neighbor_cache[i].state == ND6_PROBE)) {

    /* Tell the caller to send out the packet now. */
    *hwaddrp = neighbor_cache[i].lladdr;
    return ERR_OK;
  }

  /* We should queue packet on this interface. */
  *hwaddrp = NULL;
  return nd6_queue_packet(i, q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x23d70
movb %al, -0x29(%rbp)
movsbl -0x29(%rbp), %eax
cmpl $0x0, %eax
jge 0x23c7c
movb -0x29(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x23d5e
movsbq -0x29(%rbp), %rcx
leaq 0xbd98(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movzbl 0x30(%rax), %eax
cmpl $0x3, %eax
jne 0x23cc9
movsbq -0x29(%rbp), %rcx
leaq 0xbd7c(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movb $0x4, 0x30(%rax)
movsbq -0x29(%rbp), %rcx
leaq 0xbd65(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl $0x5, 0x34(%rax)
movsbq -0x29(%rbp), %rcx
leaq 0xbd4b(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movzbl 0x30(%rax), %eax
cmpl $0x2, %eax
je 0x23d1d
movsbq -0x29(%rbp), %rcx
leaq 0xbd2f(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movzbl 0x30(%rax), %eax
cmpl $0x4, %eax
je 0x23d1d
movsbq -0x29(%rbp), %rcx
leaq 0xbd13(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movzbl 0x30(%rax), %eax
cmpl $0x5, %eax
jne 0x23d41
movsbq -0x29(%rbp), %rax
leaq 0xbcf7(%rip), %rcx      # 0x2fa20
imulq $0x38, %rax, %rax
addq %rax, %rcx
addq $0x20, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movb $0x0, -0x1(%rbp)
jmp 0x23d5e
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movb -0x29(%rbp), %al
movq -0x18(%rbp), %rsi
movsbl %al, %edi
callq 0x24670
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv6/nd6.c
// Function: nd6_get_destination_mtu
u16_t
nd6_get_destination_mtu(const ip6_addr_t *ip6addr, struct netif *netif)
{
  s16_t i;

  i = nd6_find_destination_cache_entry(ip6addr);
  if (i >= 0) {
    if (destination_cache[i].pmtu > 0) {
      return destination_cache[i].pmtu;
    }
  }

  if (netif != NULL) {
    return netif_mtu6(netif);
  }

  return 1280; /* Minimum MTU */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x227e0
movw %ax, -0x1a(%rbp)
movswl -0x1a(%rbp), %eax
cmpl $0x0, %eax
jl 0x24971
movswq -0x1a(%rbp), %rcx
leaq 0xb42e(%rip), %rax      # 0x2fd70
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movzwl 0x28(%rax), %eax
cmpl $0x0, %eax
jle 0x2496f
movswq -0x1a(%rbp), %rcx
leaq 0xb412(%rip), %rax      # 0x2fd70
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movw 0x28(%rax), %ax
movw %ax, -0x2(%rbp)
jmp 0x2498f
jmp 0x24971
cmpq $0x0, -0x18(%rbp)
je 0x24989
movq -0x18(%rbp), %rax
movw 0xe2(%rax), %ax
movw %ax, -0x2(%rbp)
jmp 0x2498f
movw $0x500, -0x2(%rbp)      # imm = 0x500
movw -0x2(%rbp), %ax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv6/nd6.c
// Function: nd6_cleanup_netif
void
nd6_cleanup_netif(struct netif *netif)
{
  u8_t i;
  s8_t router_index;
  for (i = 0; i < LWIP_ND6_NUM_PREFIXES; i++) {
    if (prefix_list[i].netif == netif) {
      prefix_list[i].netif = NULL;
    }
  }
  for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) {
    if (neighbor_cache[i].netif == netif) {
      for (router_index = 0; router_index < LWIP_ND6_NUM_ROUTERS; router_index++) {
        if (default_router_list[router_index].neighbor_entry == &neighbor_cache[i]) {
          default_router_list[router_index].neighbor_entry = NULL;
          default_router_list[router_index].flags = 0;
        }
      }
      neighbor_cache[i].isrouter = 0;
      nd6_free_neighbor_cache_entry(i);
    }
  }
  /* Clear the destination cache, since many entries may now have become
   * invalid for one of several reasons. As destination cache entries have no
   * netif association, use a sledgehammer approach (this can be improved). */
  nd6_clear_destination_cache();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movb $0x0, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
cmpl $0x5, %eax
jge 0x24c9f
movzbl -0x9(%rbp), %eax
movl %eax, %ecx
leaq 0xb03a(%rip), %rax      # 0x2fca0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x24c93
movzbl -0x9(%rbp), %eax
movl %eax, %ecx
leaq 0xb01c(%rip), %rax      # 0x2fca0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x18(%rax)
jmp 0x24c95
movb -0x9(%rbp), %al
addb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0x24c50
movb $0x0, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
cmpl $0xa, %eax
jge 0x24d7b
movzbl -0x9(%rbp), %eax
movl %eax, %ecx
leaq 0xad63(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x24d6c
movb $0x0, -0xa(%rbp)
movsbl -0xa(%rbp), %eax
cmpl $0x3, %eax
jge 0x24d4b
movsbq -0xa(%rbp), %rcx
leaq 0xaf65(%rip), %rax      # 0x2fc50
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movzbl -0x9(%rbp), %ecx
movl %ecx, %edx
leaq 0xad1e(%rip), %rcx      # 0x2fa20
imulq $0x38, %rdx, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jne 0x24d3f
movsbq -0xa(%rbp), %rcx
leaq 0xaf36(%rip), %rax      # 0x2fc50
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
movsbq -0xa(%rbp), %rcx
leaq 0xaf1c(%rip), %rax      # 0x2fc50
shlq $0x4, %rcx
addq %rcx, %rax
movb $0x0, 0xc(%rax)
jmp 0x24d41
movb -0xa(%rbp), %al
addb $0x1, %al
movb %al, -0xa(%rbp)
jmp 0x24cd6
movzbl -0x9(%rbp), %eax
movl %eax, %ecx
leaq 0xacc8(%rip), %rax      # 0x2fa20
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x31(%rax)
movsbl -0x9(%rbp), %edi
callq 0x23300
jmp 0x24d6e
movb -0x9(%rbp), %al
addb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0x24ca3
callq 0x23780
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv6/nd6.c
// Function: nd6_free_q
static void
nd6_free_q(struct nd6_q_entry *q)
{
  struct nd6_q_entry *r;
  LWIP_ASSERT("q != NULL", q != NULL);
  LWIP_ASSERT("q->p != NULL", q->p != NULL);
  while (q) {
    r = q;
    q = q->next;
    LWIP_ASSERT("r->p != NULL", (r->p != NULL));
    pbuf_free(r->p);
    memp_free(MEMP_ND6_QUEUE, r);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x24df4
jmp 0x24dc5
leaq 0x2500(%rip), %rdi      # 0x272cc
leaq 0x2ba3(%rip), %rsi      # 0x27976
movl $0x86e, %edx            # imm = 0x86E
leaq 0x4e68(%rip), %rcx      # 0x29c47
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x24df6
jmp 0x24df8
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x24e34
jmp 0x24e05
leaq 0x24c0(%rip), %rdi      # 0x272cc
leaq 0x4e99(%rip), %rsi      # 0x29cac
movl $0x86f, %edx            # imm = 0x86F
leaq 0x4e28(%rip), %rcx      # 0x29c47
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x24e36
jmp 0x24e38
cmpq $0x0, -0x8(%rbp)
je 0x24ead
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x24e8e
jmp 0x24e5f
leaq 0x2466(%rip), %rdi      # 0x272cc
leaq 0x4e4c(%rip), %rsi      # 0x29cb9
movl $0x873, %edx            # imm = 0x873
leaq 0x4dce(%rip), %rcx      # 0x29c47
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x24e90
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x7260
movq -0x10(%rbp), %rsi
movl $0x8, %edi
callq 0x4a80
jmp 0x24e38
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv6/nd6.c
// Function: nd6_new_destination_cache_entry
static s16_t
nd6_new_destination_cache_entry(void)
{
  s16_t i, j;
  u32_t age;

  /* Find an empty entry. */
  for (i = 0; i < LWIP_ND6_NUM_DESTINATIONS; i++) {
    if (ip6_addr_isany(&(destination_cache[i].destination_addr))) {
      return i;
    }
  }

  /* Find oldest entry. */
  age = 0;
  j = LWIP_ND6_NUM_DESTINATIONS - 1;
  for (i = 0; i < LWIP_ND6_NUM_DESTINATIONS; i++) {
    if (destination_cache[i].age > age) {
      j = i;
    }
  }

  return j;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw $0x0, -0x4(%rbp)
movswl -0x4(%rbp), %eax
cmpl $0xa, %eax
jge 0x24f70
movswq -0x4(%rbp), %rcx
leaq 0xae8d(%rip), %rax      # 0x2fd70
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, %rax
je 0x24f53
movswq -0x4(%rbp), %rcx
leaq 0xae74(%rip), %rax      # 0x2fd70
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0x24f5d
movswq -0x4(%rbp), %rcx
leaq 0xae5c(%rip), %rax      # 0x2fd70
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x4(%rax)
jne 0x24f5d
movswq -0x4(%rbp), %rcx
leaq 0xae43(%rip), %rax      # 0x2fd70
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jne 0x24f5d
movswq -0x4(%rbp), %rcx
leaq 0xae2a(%rip), %rax      # 0x2fd70
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0xc(%rax)
jne 0x24f5d
movw -0x4(%rbp), %ax
movw %ax, -0x2(%rbp)
jmp 0x24fc7
jmp 0x24f5f
movw -0x4(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x4(%rbp)
jmp 0x24eca
movl $0x0, -0xc(%rbp)
movw $0x9, -0x6(%rbp)
movw $0x0, -0x4(%rbp)
movswl -0x4(%rbp), %eax
cmpl $0xa, %eax
jge 0x24fbf
movswq -0x4(%rbp), %rcx
leaq 0xadd8(%rip), %rax      # 0x2fd70
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x2c(%rax), %eax
cmpl -0xc(%rbp), %eax
jbe 0x24faf
movw -0x4(%rbp), %ax
movw %ax, -0x6(%rbp)
jmp 0x24fb1
movw -0x4(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x4(%rbp)
jmp 0x24f83
movw -0x6(%rbp), %ax
movw %ax, -0x2(%rbp)
movw -0x2(%rbp), %ax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/def.c
// Function: lwip_strnstr
char *
lwip_strnstr(const char *buffer, const char *token, size_t n)
{
  const char *p;
  size_t tokenlen = strlen(token);
  if (tokenlen == 0) {
    return LWIP_CONST_CAST(char *, buffer);
  }
  for (p = buffer; *p && (p + tokenlen <= buffer + n); p++) {
    if ((*p == *token) && (strncmp(p, token, tokenlen) == 0)) {
      return LWIP_CONST_CAST(char *, p);
    }
  }
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20b0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x25265
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x252ea
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x31(%rbp)
je 0x25297
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
addq -0x20(%rbp), %rcx
cmpq %rcx, %rax
setbe %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x252a0
jmp 0x252e2
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
movq -0x18(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x252d2
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x2070
cmpl $0x0, %eax
jne 0x252d2
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x252ea
jmp 0x252d4
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x2526d
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)