// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x4754
cmpb $0x3, %sil
jge 0x4770
movsbq %sil, %rax
imulq $0x18, %rax, %rsi
leaq (%rdi,%rsi), %rbx
addq $0x50, %rbx
cmpl %edx, (%rbx)
jne 0x46c9
cmpl %ecx, 0x4(%rbx)
jne 0x46c9
cmpl %r8d, 0x8(%rbx)
jne 0x46c9
cmpl %r9d, 0xc(%rbx)
je 0x474c
movl %edx, (%rsp)
movl %ecx, 0x4(%rsp)
movl %r8d, 0x8(%rsp)
movl %r9d, 0xc(%rsp)
movb $0x6, 0x14(%rsp)
andl $0xc0ff, %edx           # imm = 0xC0FF
cmpl $0x80fe, %edx           # imm = 0x80FE
jne 0x46f7
movb 0xee(%rdi), %cl
incb %cl
jmp 0x46f9
xorl %ecx, %ecx
movb %cl, 0x10(%rsp)
testb $0x10, 0x98(%rdi,%rax)
jne 0x470d
movb $0x6, 0x14(%rbx)
jmp 0x4726
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4318
movb 0x14(%r14), %al
movb %al, 0x14(%rbx)
cmpb $0x6, %al
jne 0x4736
movsd 0x4(%rsp), %xmm0
movl 0xc(%rsp), %eax
movb 0x10(%rsp), %cl
jmp 0x473d
xorps %xmm0, %xmm0
xorl %eax, %eax
xorl %ecx, %ecx
movl (%rsp), %edx
movl %edx, (%rbx)
movlps %xmm0, 0x4(%rbx)
movl %eax, 0xc(%rbx)
movb %cl, 0x10(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0xfb71(%rip), %rdi      # 0x142cc
leaq 0xff87(%rip), %rsi      # 0x146e9
leaq 0xfcd1(%rip), %rcx      # 0x1443a
movl $0x53d, %edx            # imm = 0x53D
jmp 0x478a
leaq 0xfb55(%rip), %rdi      # 0x142cc
leaq 0xff79(%rip), %rsi      # 0x146f7
leaq 0xfcb5(%rip), %rcx      # 0x1443a
movl $0x53e, %edx            # imm = 0x53E
xorl %eax, %eax
callq 0x20d0
xorl %edi, %edi
callq 0x21b0
callq 0x2050