user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<convert_in6arpa>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  movl   $0x0,-0x18(%rbp)
  movl   $0x1,-0x14(%rbp)
  mov    $0x28,%edi
  call   <malloc@plt>
  mov    %eax,%ecx
  mov    $0x540,%edx
  lea    D9(%rip),%rax
  mov    %rax,%rsi
  mov    %ecx,%edi
  call   <do_nofail@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x28(%rbp),%rax
  lea    D14(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  je     L17
  mov    -0x10(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  jne    L37
L17:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
  jmp    L81
L37:
  subq   $0x1,-0x10(%rbp)
L3:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L54
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jle    L166
L54:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x60,%al
  jle    L111
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x66,%al
  jle    L166
L111:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x40,%al
  jle    L1
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x46,%al
  jle    L166
L1:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
  jmp    L81
L166:
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x18(%rbp)
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  mov    -0x10(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  je     L87
  cmpl   $0x27,-0x18(%rbp)
  je     L187
  mov    -0x14(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x14(%rbp)
  and    $0x3,%eax
  test   %eax,%eax
  jne    L59
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x18(%rbp)
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x3a,(%rax)
L59:
  subq   $0x1,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  je     L90
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
  jmp    L81
L90:
  mov    -0x10(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  jne    L104
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
  jmp    L81
L104:
  subq   $0x1,-0x10(%rbp)
  jmp    L3
L87:
  nop
  jmp    L143
L187:
  nop
L143:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
L81:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D9
type: string
name: disassemble_data
arguments: data_label: D14
type: string

tool: D9: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/mrash/psad/refs/heads/master/deps/whois/whois.c

tool: D14: .ip6.arpa

assistant: ```c
char *convert_in6arpa(const char *s) {
  char *ip, *p;
  int character = 0;
  int digits = 1;
  ip = do_nofail((malloc(40)), "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/mrash/psad/refs/heads/master/deps/whois/whois.c", 1344);
  p = strstr(s, ".ip6.arpa");
  if (!p || p == s) {
    ip[character] = '\0';
    return ip;
  }
  p--;
  while (1) {
    if (!((*p >= '0' && *p <= '9') || (*p >= 'a' && *p <= 'f') || (*p >= 'A' && *p <= 'F'))) {
      ip[character] = '\0';
      return ip;
    }
    ip[character++] = *p;
    if (p == s)
      break;
    if (character == 39)
      break;
    if ((digits++ % 4) == 0)
      ip[character++] = ':';
    p--;
    if (*p != '.') {
      ip[character] = '\0';
      return ip;
    }
    if (p == s) {
      ip[character] = '\0';
      return ip;
    }
    p--;
  }
  ip[character] = '\0';
  return ip;
}
```