user: What is the c source code of the assembly code below:

```asm
<get_ip_from_ifname>:
  endbr64
  push   %r12
  pxor   %xmm0,%xmm0
  mov    %edi,%r12d
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x60,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  lea    0x8(%rsp),%rdi
  movaps %xmm0,0x10(%rsp)
  movaps %xmm0,0x20(%rsp)
  movaps %xmm0,0x30(%rsp)
  movaps %xmm0,0x40(%rsp)
  call   <getifaddrs@plt>
  test   %rax,%rax
  jne    L93
  lea    -0x80(%r12),%eax
  cmp    $0x1,%eax
  ja     L93
  mov    0x8(%rsp),%rbp
  test   %rbp,%rbp
  je     L204
  cmp    $0x80,%r12d
  jne    L208
  nopw   0x0(%rax,%rax,1)
L152:
  cmpq   $0x0,0x8(%rbp)
  je     L185
  mov    D4(%rip),%rdx
  mov    0x0(%rbp),%eax
  and    (%rdx),%eax
  je     L185
  mov    0x10(%rbp),%esi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L185
  mov    0x8(%rbp),%rsi
  cmpl   $0x80,(%rsi)
  je     L38
  nopl   (%rax)
L185:
  mov    0x18(%rbp),%rbp
  test   %rbp,%rbp
  jne    L152
L6:
  mov    0x8(%rsp),%rbp
L204:
  mov    %rbp,%rdi
  call   <freeifaddrs@plt>
  xchg   %ax,%ax
L93:
  xor    %r12d,%r12d
L188:
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L42
  add    $0x60,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L94:
  mov    0x18(%rbp),%rbp
  test   %rbp,%rbp
  je     L6
L208:
  cmpq   $0x0,0x8(%rbp)
  je     L94
  mov    D4(%rip),%rdx
  mov    0x0(%rbp),%eax
  and    (%rdx),%eax
  je     L94
  mov    0x10(%rbp),%esi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L94
  mov    0x8(%rbp),%rsi
  cmpl   $0x81,(%rsi)
  jne    L94
  lea    0x10(%rsp),%rbp
  mov    $0x40,%ecx
  mov    $0x81,%edi
  mov    %rbp,%rdx
  call   <inet_ntop@plt>
  mov    %rax,%r12
  test   %rax,%rax
  jne    L64
L58:
  mov    0x8(%rsp),%rdi
  call   <freeifaddrs@plt>
  jmp    L188
L38:
  lea    0x10(%rsp),%rbp
  mov    $0x40,%ecx
  mov    $0x80,%edi
  mov    %rbp,%rdx
  call   <inet_ntop@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L58
L64:
  mov    %rbp,%rdi
  call   <strdup@plt>
  mov    0x8(%rsp),%rdi
  mov    %rax,%r12
  call   <freeifaddrs@plt>
  test   %r12,%r12
  je     L93
  cmpb   $0x0,(%r12)
  jne    L188
  mov    %r12,%rdi
  xor    %r12d,%r12d
  call   <free@plt>
  jmp    L188
L42:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *get_ip_from_ifname(const int inet_family, const char *const ifname) {
  char *retv = NULL;
  struct ifaddrs *myaddrs;
  struct ifaddrs *ifa;
  struct sockaddr_in *s4;
  struct sockaddr_in6 *s6;
  char buf[64] = {'\0'};
  if (getifaddrs(&myaddrs))
    return NULL;
  switch (inet_family) {
  case AF_INET:
  case AF_INET6:
    break;
  default:
    return NULL;
  }
  for (ifa = myaddrs; ifa != NULL; ifa = ifa->ifa_next) {
    if (NULL == ifa->ifa_addr)
      continue;
    if (0 == (ifa->ifa_flags & IFF_UP))
      continue;
    if (strcmp(ifname, ifa->ifa_name))
      continue;
    if (AF_INET == inet_family) {
      if (ifa->ifa_addr->sa_family == AF_INET) {
        s4 = (struct sockaddr_in *)(ifa->ifa_addr);
        if (inet_ntop(ifa->ifa_addr->sa_family, (void *)&(s4->sin_addr), buf, sizeof(buf)) == NULL) {
          break;
        } else {
          retv = strdup(buf);
          break;
        }
      }
    }
    if (AF_INET6 == inet_family) {
      if (ifa->ifa_addr->sa_family == AF_INET6) {
        s6 = (struct sockaddr_in6 *)(ifa->ifa_addr);
        if (inet_ntop(ifa->ifa_addr->sa_family, (void *)&(s6->sin6_addr), buf, sizeof(buf)) == NULL) {
          break;
        } else {
          retv = strdup(buf);
          break;
        }
      }
    }
  }
  freeifaddrs(myaddrs);
  if (retv && ('\0' == retv[0])) {
    free(retv);
    retv = NULL;
  }
  return retv;
}
```