// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/ipv6/ip6.c
// Function: ip6_output
err_t
ip6_output(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;
  struct ip6_hdr *ip6hdr;
  ip6_addr_t src_addr, dest_addr;

  LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p);

  if (dest != LWIP_IP_HDRINCL) {
    netif = ip6_route(src, dest);
  } else {
    /* IP header included in p, read addresses. */
    ip6hdr = (struct ip6_hdr *)p->payload;
    ip6_addr_copy_from_packed(src_addr, ip6hdr->src);
    ip6_addr_copy_from_packed(dest_addr, ip6hdr->dest);
    netif = ip6_route(&src_addr, &dest_addr);
  }

  if (netif == NULL) {
    LWIP_DEBUGF(IP6_DEBUG, ("ip6_output: no route for %"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F"\n",
        IP6_ADDR_BLOCK1(dest),
        IP6_ADDR_BLOCK2(dest),
        IP6_ADDR_BLOCK3(dest),
        IP6_ADDR_BLOCK4(dest),
        IP6_ADDR_BLOCK5(dest),
        IP6_ADDR_BLOCK6(dest),
        IP6_ADDR_BLOCK7(dest),
        IP6_ADDR_BLOCK8(dest)));
    IP6_STATS_INC(ip6.rterr);
    return ERR_RTE;
  }

  return ip6_output_if(p, src, dest, hl, tc, nexth, netif);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl %r8d, -0x78(%rbp)
movl %ecx, %eax
movl -0x78(%rbp), %ecx
movl %eax, -0x74(%rbp)
movq %rdx, %rax
movl -0x74(%rbp), %edx
movq %rax, -0x70(%rbp)
movq %rsi, %rax
movq -0x70(%rbp), %rsi
movq %rax, -0x68(%rbp)
movq %rdi, %r8
movq -0x68(%rbp), %rdi
movb %r9b, %al
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 -0x10(%rbp), %rax
movzbl 0x16(%rax), %eax
cmpl $0x1, %eax
je 0x1dbe9
jmp 0x1dbba
leaq 0x970b(%rip), %rdi      # 0x272cc
leaq 0xbb16(%rip), %rsi      # 0x296de
movl $0x51f, %edx            # imm = 0x51F
leaq 0xbe35(%rip), %rcx      # 0x29a09
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x1dbeb
cmpq $0x0, -0x20(%rbp)
je 0x1dc05
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x1c270
movq %rax, -0x30(%rbp)
jmp 0x1dc7c
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x38(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x38(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x40(%rbp)
movb $0x0, -0x3c(%rbp)
jmp 0x1dc3f
movq -0x38(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x60(%rbp)
movq -0x38(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x5c(%rbp)
movq -0x38(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x58(%rbp)
movq -0x38(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, -0x54(%rbp)
movb $0x0, -0x50(%rbp)
leaq -0x4c(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x1c270
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x1dc8d
jmp 0x1dc85
jmp 0x1dc87
movb $-0x4, -0x1(%rbp)
jmp 0x1dcbf
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movb -0x21(%rbp), %cl
movb -0x22(%rbp), %r8b
movb -0x23(%rbp), %r9b
movq -0x30(%rbp), %rax
movzbl %cl, %ecx
movzbl %r8b, %r8d
movzbl %r9b, %r9d
movq %rax, (%rsp)
callq 0x1d560
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)