// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/netif.c
// Function: netif_ip6_addr_set_state
void
netif_ip6_addr_set_state(struct netif *netif, s8_t addr_idx, u8_t state)
{
  u8_t old_state;
  LWIP_ASSERT_CORE_LOCKED();
  LWIP_ASSERT("netif != NULL", netif != NULL);
  LWIP_ASSERT("invalid index", addr_idx < LWIP_IPV6_NUM_ADDRESSES);

  old_state = netif_ip6_addr_state(netif, addr_idx);
  /* state is actually being changed? */
  if (old_state != state) {
    u8_t old_valid = old_state & IP6_ADDR_VALID;
    u8_t new_valid = state & IP6_ADDR_VALID;
    LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_ip6_addr_set_state: netif address state being changed\n"));

#if LWIP_IPV6_MLD
    /* Reevaluate solicited-node multicast group membership. */
    if (netif->flags & NETIF_FLAG_MLD6) {
      nd6_adjust_mld_membership(netif, addr_idx, state);
    }
#endif /* LWIP_IPV6_MLD */

    if (old_valid && !new_valid) {
      /* address about to be removed by setting invalid */
      netif_do_ip_addr_changed(netif_ip_addr6(netif, addr_idx), NULL);
      /* @todo: remove mib2 ip6 entries? */
    }
    netif->ip6_addr_state[addr_idx] = state;

    if (!old_valid && new_valid) {
      /* address added by setting valid */
      /* This is a good moment to check that the address is properly zoned. */
      IP6_ADDR_ZONECHECK_NETIF(netif_ip6_addr(netif, addr_idx), netif);
      /* @todo: add mib2 ip6 entries? */
      netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV6);
    }
    if ((old_state & ~IP6_ADDR_TENTATIVE_COUNT_MASK) !=
        (state     & ~IP6_ADDR_TENTATIVE_COUNT_MASK)) {
      /* address state has changed -> call the callback function */
      NETIF_STATUS_CALLBACK(netif);
    }

#if LWIP_NETIF_EXT_STATUS_CALLBACK
    {
      netif_ext_callback_args_t args;
      args.ipv6_addr_state_changed.addr_index = addr_idx;
      args.ipv6_addr_state_changed.old_state  = old_state;
      args.ipv6_addr_state_changed.address    = netif_ip_addr6(netif, addr_idx);
      netif_invoke_ext_callback(netif, LWIP_NSC_IPV6_ADDR_STATE_CHANGED, &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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dl, %al
movb %sil, %cl
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
movb %al, -0xa(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x646f
jmp 0x6440
leaq 0x20e85(%rip), %rdi     # 0x272cc
leaq 0x212ee(%rip), %rsi     # 0x2773c
movl $0x575, %edx            # imm = 0x575
leaq 0x21033(%rip), %rcx     # 0x2748d
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x6471
jmp 0x6473
movsbl -0x9(%rbp), %eax
cmpl $0x3, %eax
jl 0x64ad
jmp 0x647e
leaq 0x20e47(%rip), %rdi     # 0x272cc
leaq 0x212be(%rip), %rsi     # 0x2774a
movl $0x576, %edx            # imm = 0x576
leaq 0x20ff5(%rip), %rcx     # 0x2748d
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x64af
movq -0x8(%rbp), %rax
movsbq -0x9(%rbp), %rcx
movb 0x98(%rax,%rcx), %al
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
movzbl -0xa(%rbp), %ecx
cmpl %ecx, %eax
je 0x655a
movzbl -0xb(%rbp), %eax
andl $0x10, %eax
movb %al, -0xc(%rbp)
movzbl -0xa(%rbp), %eax
andl $0x10, %eax
movb %al, -0xd(%rbp)
jmp 0x64e8
movzbl -0xc(%rbp), %eax
cmpl $0x0, %eax
je 0x6514
cmpb $0x0, -0xd(%rbp)
jne 0x6514
movq -0x8(%rbp), %rdi
addq $0x50, %rdi
movsbq -0x9(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x5a70
movb -0xa(%rbp), %dl
movq -0x8(%rbp), %rax
movsbq -0x9(%rbp), %rcx
movb %dl, 0x98(%rax,%rcx)
cmpb $0x0, -0xc(%rbp)
jne 0x6544
movzbl -0xd(%rbp), %eax
cmpl $0x0, %eax
je 0x6544
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x5b70
movzbl -0xb(%rbp), %eax
andl $-0x8, %eax
movzbl -0xa(%rbp), %ecx
andl $-0x8, %ecx
cmpl %ecx, %eax
je 0x6558
jmp 0x6558
jmp 0x655a
jmp 0x655c
jmp 0x655e
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)