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

```asm
<leerUnStringArbitrariamenteLargo>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  movq   $0x0,-0x10(%rbp)
  movl   $0x0,-0x18(%rbp)
  movl   $0x5,-0x14(%rbp)
  mov    $0x5,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movb   $0x0,(%rax)
  mov    $0x0,%eax
  call   <getch@plt>
  mov    %al,-0x19(%rbp)
  cmpb   $0x7f,-0x19(%rbp)
  je     L108
  cmpb   $0x8,-0x19(%rbp)
  jne    L25
L108:
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L83
L25:
  movsbl -0x19(%rbp),%eax
  mov    %eax,%edi
  call   <putchar@plt>
L83:
  jmp    L48
L16:
  cmpb   $0x7f,-0x19(%rbp)
  je     L11
  cmpb   $0x8,-0x19(%rbp)
  jne    L112
L11:
  cmpl   $0x0,-0x18(%rbp)
  jle    L126
  subl   $0x1,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x14(%rbp),%eax
  sub    -0x18(%rbp),%eax
  cmp    $0x5,%eax
  jle    L126
  subl   $0x5,-0x14(%rbp)
  mov    -0x14(%rbp),%ecx
  mov    -0x10(%rbp),%rax
  mov    $0x0,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <cambiarEspacioDeString@plt>
  mov    %rax,-0x10(%rbp)
  jmp    L126
L112:
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x18(%rbp)
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x19(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x18(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L60
  mov    -0x14(%rbp),%ecx
  mov    -0x10(%rbp),%rax
  mov    $0x5,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <cambiarEspacioDeString@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  addl   $0x5,-0x14(%rbp)
L60:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  jmp    L82
L126:
  nop
L82:
  mov    $0x0,%eax
  call   <getch@plt>
  mov    %al,-0x19(%rbp)
  cmpb   $0x7f,-0x19(%rbp)
  je     L63
  cmpb   $0x8,-0x19(%rbp)
  jne    L116
L63:
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L48
L116:
  movsbl -0x19(%rbp),%eax
  mov    %eax,%edi
  call   <putchar@plt>
L48:
  cmpb   $0xa,-0x19(%rbp)
  jne    L16
  mov    -0x10(%rbp),%rax
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D0
datatype: string

tool: D0:  

assistant: ```c
char *leerUnStringArbitrariamenteLargo() {
  char *s = NULL, c, *sAux;
  int contador = 0, contadorMax = 5, i;
  s = (char *)malloc(5 * sizeof(char));
  *s = '\0';
  c = getch();
  if (c == 127 || c == 8) {
    printf("\b \b");
  } else {
    printf("%c", c);
  }
  while (c != 10) {
    if (c == 127 || c == 8) {
      if (contador > 0) {
        s[--contador] = '\0';
        if (contadorMax - contador > 5) {
          contadorMax -= 5;
          s = cambiarEspacioDeString(s, contadorMax, 0);
        }
      }
    } else {
      s[contador++] = c;
      if (contador >= contadorMax) {
        sAux = cambiarEspacioDeString(s, contadorMax, 5);
        s = sAux;
        contadorMax += 5;
      }
      s[contador] = '\0';
    }
    c = getch();
    if (c == 127 || c == 8) {
      printf("\b \b");
    } else {
      printf("%c", c);
    }
  }
  return s;
}
```