// File: /workspace/github_c_makefile_star2_O1/FH0[P]tun_direct/lwip-2.1.2/src/core/netif.c
// Function: netif_ip6_addr_set_parts
void
netif_ip6_addr_set_parts(struct netif *netif, s8_t addr_idx, u32_t i0, u32_t i1, u32_t i2, u32_t i3)
{
  ip_addr_t old_addr;
  ip_addr_t new_ipaddr;
  LWIP_ASSERT_CORE_LOCKED();
  LWIP_ASSERT("netif != NULL", netif != NULL);
  LWIP_ASSERT("invalid index", addr_idx < LWIP_IPV6_NUM_ADDRESSES);

  ip6_addr_copy(*ip_2_ip6(&old_addr), *netif_ip6_addr(netif, addr_idx));
  IP_SET_TYPE_VAL(old_addr, IPADDR_TYPE_V6);

  /* address is actually being changed? */
  if ((ip_2_ip6(&old_addr)->addr[0] != i0) || (ip_2_ip6(&old_addr)->addr[1] != i1) ||
      (ip_2_ip6(&old_addr)->addr[2] != i2) || (ip_2_ip6(&old_addr)->addr[3] != i3)) {
    LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_ip6_addr_set: netif address being changed\n"));

    IP_ADDR6(&new_ipaddr, i0, i1, i2, i3);
    ip6_addr_assign_zone(ip_2_ip6(&new_ipaddr), IP6_UNICAST, netif);

    if (ip6_addr_isvalid(netif_ip6_addr_state(netif, addr_idx))) {
      netif_do_ip_addr_changed(netif_ip_addr6(netif, addr_idx), &new_ipaddr);
    }
    /* @todo: remove/readd mib2 ip6 entries? */

    ip_addr_copy(netif->ip6_addr[addr_idx], new_ipaddr);

    if (ip6_addr_isvalid(netif_ip6_addr_state(netif, addr_idx))) {
      netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV6);
      NETIF_STATUS_CALLBACK(netif);
    }

#if LWIP_NETIF_EXT_STATUS_CALLBACK
    {
      netif_ext_callback_args_t args;
      args.ipv6_set.addr_index  = addr_idx;
      args.ipv6_set.old_address = &old_addr;
      netif_invoke_ext_callback(netif, LWIP_NSC_IPV6_SET, &args);
    }
#endif
  }

  LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: IPv6 address %d of interface %c%c set to %s/0x%"X8_F"\n",
              addr_idx, netif->name[0], netif->name[1], ip6addr_ntoa(netif_ip6_addr(netif, addr_idx)),
              netif_ip6_addr_state(netif, addr_idx)));
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
testq %rdi, %rdi
je 0x4900
cmpb $0x3, %sil
jge 0x491c
movsbq %sil, %rax
leaq (%rax,%rax,2), %rsi
leaq (%rdi,%rsi,8), %rbx
addq $0x50, %rbx
cmpl %edx, (%rbx)
jne 0x4869
cmpl %ecx, 0x4(%rbx)
jne 0x4869
cmpl %r8d, 0x8(%rbx)
jne 0x4869
cmpl %r9d, 0xc(%rbx)
je 0x48fa
movl %edx, 0x8(%rsp)
movl %ecx, 0xc(%rsp)
movl %r8d, 0x10(%rsp)
movl %r9d, 0x14(%rsp)
movb $0x0, 0x18(%rsp)
movb $0x6, 0x1c(%rsp)
andl $0xc0ff, %edx           # imm = 0xC0FF
cmpl $0x80fe, %edx           # imm = 0x80FE
jne 0x489d
movb 0xee(%rdi), %cl
incb %cl
jmp 0x489f
xorl %ecx, %ecx
movb %cl, 0x18(%rsp)
testb $0x10, 0x98(%rdi,%rax)
je 0x48ba
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x44ab
movb 0x1c(%rsp), %al
movb %al, 0x14(%rbx)
movl 0x8(%rsp), %ecx
movl %ecx, (%rbx)
cmpb $0x6, %al
jne 0x48e6
movl 0xc(%rsp), %eax
movl %eax, 0x4(%rbx)
movl 0x10(%rsp), %eax
movl %eax, 0x8(%rbx)
movl 0x14(%rsp), %eax
movl %eax, 0xc(%rbx)
movb 0x18(%rsp), %al
jmp 0x48f7
movl $0x0, 0xc(%rbx)
movq $0x0, 0x4(%rbx)
xorl %eax, %eax
movb %al, 0x10(%rbx)
addq $0x20, %rsp
popq %rbx
retq
leaq 0x109c5(%rip), %rdi     # 0x152cc
leaq 0x10ddb(%rip), %rsi     # 0x156e9
leaq 0x10b25(%rip), %rcx     # 0x1543a
movl $0x53d, %edx            # imm = 0x53D
jmp 0x4936
leaq 0x109a9(%rip), %rdi     # 0x152cc
leaq 0x10dcd(%rip), %rsi     # 0x156f7
leaq 0x10b09(%rip), %rcx     # 0x1543a
movl $0x53e, %edx            # imm = 0x53E
xorl %eax, %eax
callq 0x20d0
xorl %edi, %edi
callq 0x21b0
callq 0x2050