user: Converte this assembly snippet into its equivalent C code:

```asm
<nameformatIP>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x90,%rsp
  mov    %rdi,-0x88(%rbp)
  mov    %rsi,-0x90(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x7c(%rbp)
  mov    -0x88(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x70(%rbp)
  mov    -0x88(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    $0x1e,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x68(%rbp)
  mov    -0x88(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  lea    0x1e(%rax),%rdx
  mov    -0x68(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <bzero@plt>
  mov    -0x88(%rbp),%rdx
  mov    -0x70(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x70(%rbp),%rax
  lea    D37(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strtok@plt>
  mov    %rax,-0x78(%rbp)
  jmp    L18
L28:
  cmpl   $0x9,-0x7c(%rbp)
  jle    L13
  lea    D34(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L13:
  mov    -0x7c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x7c(%rbp)
  cltq
  mov    -0x78(%rbp),%rdx
  mov    %rdx,-0x60(%rbp,%rax,8)
  lea    D37(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x78(%rbp)
L18:
  cmpq   $0x0,-0x78(%rbp)
  jne    L28
  subl   $0x1,-0x7c(%rbp)
  jmp    L54
L9:
  mov    -0x7c(%rbp),%eax
  cltq
  mov    -0x60(%rbp,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    -0x68(%rbp),%rax
  lea    D37(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  subl   $0x1,-0x7c(%rbp)
L54:
  cmpl   $0x0,-0x7c(%rbp)
  jns    L9
  mov    -0x68(%rbp),%rax
  lea    D40(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    -0x90(%rbp),%rdx
  mov    -0x68(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <nameformat@plt>
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L10
  call   <__stack_chk_fail@plt>
L10:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D37
datatype: string
name: disassemble_data
arguments: data_tag: D34
datatype: string
name: disassemble_data
arguments: data_tag: D40
datatype: string

tool: D37: .

tool: D34: Force DUMP:: dumbass, wtf you think this is, IPV6?

tool: D40: in-addr.arpa

assistant: ```c
void nameformatIP(char *ip, char *resu) {
  char *reverse, *temp, *x, *comps[10];
  int px = 0;
  temp = malloc(strlen(ip) + 3);
  reverse = malloc(strlen(ip) + 30);
  bzero(reverse, strlen(ip) + 30);
  strcpy(temp, ip);
  x = strtok(temp, ".");
  while (x != NULL) {
    if (px >= 10) {
      puts("Force DUMP:: dumbass, wtf you think this is, IPV6?");
      exit(1);
    }
    comps[px++] = x;
    x = strtok(NULL, ".");
  }
  for (px--; px >= 0; px--) {
    strcat(reverse, comps[px]);
    strcat(reverse, ".");
  }
  strcat(reverse, "in-addr.arpa");
  nameformat(reverse, resu);
  free(temp);
  free(reverse);
}
```