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

```asm
<host_is_host_with_port>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <assert@plt>
  mov    %r13,%rdx
  mov    %rbx,%rsi
  mov    %r14,%rdi
  call   <host_is_ipv6_with_port@plt>
  test   %eax,%eax
  js     L98
  mov    %eax,%r12d
  mov    $0x0,%ebp
  je     L23
L57:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L50
  add    $0x18,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L23:
  mov    $0x3a,%esi
  mov    %r14,%rdi
  call   <strchr@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L57
  mov    D7(%rip),%rax
  lea    0x4(%rsp),%rdx
  mov    %r14,%rsi
  mov    (%rax),%edi
  call   <inet_pton@plt>
  cmp    $0x1,%eax
  je     L12
  mov    %r14,%rdi
  call   <strdup@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L101
  mov    %rax,%r14
  xor    %r15d,%r15d
  jmp    L157
L49:
  lea    0x1(%rax),%r14
  mov    %rax,%r15
L157:
  mov    $0x3a,%esi
  mov    %r14,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L49
  movb   $0x0,(%r15)
  mov    %r14,%r15
  jmp    L143
  nopw   0x0(%rax,%rax,1)
L40:
  add    $0x1,%r15
L143:
  movsbl (%r15),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L40
  cmpb   $0x0,(%r15)
  jne    L57
  cmpb   $0x0,(%r14)
  je     L57
  test   %rbx,%rbx
  je     L137
  mov    %rbp,%rdi
  call   <strdup@plt>
  mov    %rax,(%rbx)
  test   %rax,%rax
  je     L101
L137:
  test   %r13,%r13
  je     L80
  mov    %r14,%rdi
  call   <strdup@plt>
  mov    %rax,0x0(%r13)
  test   %rax,%rax
  je     L120
L80:
  mov    $0x1,%r12d
  jmp    L57
L98:
  mov    $0xffffffff,%r12d
  nopw   0x0(%rax,%rax,1)
L12:
  xor    %ebp,%ebp
  jmp    L57
L50:
  call   <__stack_chk_fail@plt>
L120:
  mov    (%rbx),%rdi
  call   <free@plt>
L101:
  or     $0xffffffff,%r12d
  jmp    L57
```

assistant: ```c
int host_is_host_with_port(const char *host, char **addr, char **port) {
  char *str = NULL;
  int rv = -1;
  int is_host_with_port = 0;
  int ret;
  assert(host);
  if ((ret = host_is_ipv6_with_port(host, addr, port)) < 0)
    goto cleanup;
  if (ret) {
    rv = ret;
    goto cleanup;
  }
  if (strchr(host, ':')) {
    struct sockaddr_in6 saddr;
    char *addrptr;
    char *portptr;
    char *lastcolonptr = NULL;
    char *tmp;
    if (inet_pton(AF_INET6, host, &saddr) == 1)
      goto out;
    if (!(str = strdup(host)))
      goto cleanup;
    addrptr = str;
    portptr = addrptr;
    while ((tmp = strchr(portptr, ':'))) {
      lastcolonptr = tmp;
      portptr = tmp + 1;
    }
    *lastcolonptr = '\0';
    tmp = portptr;
    while (isdigit(*tmp))
      tmp++;
    if (*tmp == '\0' && strlen(portptr)) {
      is_host_with_port = 1;
      if (addr) {
        if (!(*addr = strdup(addrptr)))
          goto cleanup;
      }
      if (port) {
        if (!(*port = strdup(portptr))) {
          free(*addr);
          goto cleanup;
        }
      }
    }
  }
out:
  rv = is_host_with_port;
cleanup:
  free(str);
  return (rv);
}
```