// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv6/nd6.c
// Function: nd6_find_route
struct netif *
nd6_find_route(const ip6_addr_t *ip6addr)
{
  struct netif *netif;
  s8_t i;

  /* @todo decide if it makes sense to check the destination cache first */

  /* Check if there is a matching on-link prefix. There may be multiple
   * matches. Pick the first one that is associated with a suitable netif. */
  for (i = 0; i < LWIP_ND6_NUM_PREFIXES; ++i) {
    netif = prefix_list[i].netif;
    if ((netif != NULL) && ip6_addr_netcmp(&prefix_list[i].prefix, ip6addr) &&
        netif_is_up(netif) && netif_is_link_up(netif)) {
      return netif;
    }
  }

  /* No on-link prefix match. Find a router that can forward the packet. */
  i = nd6_select_router(ip6addr, NULL);
  if (i >= 0) {
    LWIP_ASSERT("selected router must have a neighbor entry",
      default_router_list[i].neighbor_entry != NULL);
    return default_router_list[i].neighbor_entry->netif;
  }

  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movb $0x0, -0x19(%rbp)
movsbl -0x19(%rbp), %eax
cmpl $0x5, %eax
jge 0x23938
movsbq -0x19(%rbp), %rcx
leaq 0xc447(%rip), %rax      # 0x2fca0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x23929
movsbq -0x19(%rbp), %rcx
leaq 0xc421(%rip), %rax      # 0x2fca0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x23929
movsbq -0x19(%rbp), %rcx
leaq 0xc400(%rip), %rax      # 0x2fca0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x23929
movsbq -0x19(%rbp), %rcx
leaq 0xc3e1(%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 0x23929
movq -0x18(%rbp), %rax
movzbl 0xeb(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x238f1
movb $0x1, %al
testb $0x1, %al
jne 0x238f9
jmp 0x23929
xorl %eax, %eax
testb $0x1, %al
jne 0x238f9
jmp 0x23929
movq -0x18(%rbp), %rax
movzbl 0xeb(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x23914
movb $0x1, %al
testb $0x1, %al
jne 0x2391c
jmp 0x23929
xorl %eax, %eax
testb $0x1, %al
jne 0x2391c
jmp 0x23929
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x239c7
jmp 0x2392b
movb -0x19(%rbp), %al
addb $0x1, %al
movb %al, -0x19(%rbp)
jmp 0x23840
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x239e0
movb %al, -0x19(%rbp)
movsbl -0x19(%rbp), %eax
cmpl $0x0, %eax
jl 0x239bf
jmp 0x23953
movsbq -0x19(%rbp), %rcx
leaq 0xc2f1(%rip), %rax      # 0x2fc50
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x2399d
jmp 0x2396e
leaq 0x3957(%rip), %rdi      # 0x272cc
leaq 0x62ea(%rip), %rsi      # 0x29c66
movl $0x6e3, %edx            # imm = 0x6E3
leaq 0x62bf(%rip), %rcx      # 0x29c47
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x2399f
movsbq -0x19(%rbp), %rcx
leaq 0xc2a5(%rip), %rax      # 0x2fc50
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x239c7
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)