user: Please show me the C implementation that matches the assembly code listed below:

```asm
<leerUnStringArbitrariamenteLargo>:
  endbr64
  push   %r15
  mov    $0x5,%edi
  push   %r14
  push   %r13
  lea    D4(%rip),%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <malloc@plt>
  movb   $0x0,(%rax)
  mov    %rax,%r14
  xor    %eax,%eax
  call   <getch@plt>
  mov    %r13,%rdi
  movsbl %al,%esi
  mov    %esi,%ebx
  call   <printf@plt>
  cmp    $0xa,%bl
  je     L150
  mov    %bl,(%r14)
  mov    $0x1,%ebp
  mov    $0x5,%r12d
  jmp    L65
  cs nopw 0x0(%rax,%rax,1)
L161:
  add    $0x1,%rbp
L65:
  lea    (%r14,%rbp,1),%r15
  xor    %eax,%eax
  movb   $0x0,(%r15)
  call   <getch@plt>
  mov    %r13,%rdi
  movsbl %al,%esi
  mov    %esi,%ebx
  call   <printf@plt>
  cmp    $0xa,%bl
  je     L150
  lea    0x1(%rbp),%eax
  mov    %bl,(%r15)
  cmp    %eax,%r12d
  jg     L161
  lea    0x5(%r12),%ebx
  mov    %ebx,%edi
  call   <malloc@plt>
  lea    0x1(%r14),%rsi
  mov    %r12d,%ecx
  mov    %rax,%r15
  lea    -0x1(%r12),%eax
  mov    %r15,%rdx
  sub    %rsi,%rdx
  cmp    $0xe,%rdx
  jbe    L75
  cmp    $0x6,%eax
  jbe    L75
  cmp    $0xe,%eax
  jbe    L12
  mov    %r12d,%edx
  mov    %r14,%rcx
  mov    %r15,%rax
  shr    $0x4,%edx
  sub    %r15,%rcx
  shl    $0x4,%rdx
  add    %r15,%rdx
  nopw   0x0(%rax,%rax,1)
L162:
  movdqu (%rax,%rcx,1),%xmm0
  add    $0x10,%rax
  movups %xmm0,-0x10(%rax)
  cmp    %rdx,%rax
  jne    L162
  mov    %r12d,%edx
  and    $0xfffffff0,%edx
  mov    %edx,%eax
  cmp    %edx,%r12d
  je     L20
  mov    %r12d,%ecx
  sub    %edx,%ecx
  lea    -0x1(%rcx),%esi
  cmp    $0x6,%esi
  jbe    L113
L120:
  mov    (%r14,%rdx,1),%rsi
  mov    %rsi,(%r15,%rdx,1)
  mov    %ecx,%edx
  and    $0xfffffff8,%edx
  add    %edx,%eax
  cmp    %edx,%ecx
  je     L20
L113:
  movslq %eax,%rdx
  movzbl (%r14,%rdx,1),%ecx
  mov    %cl,(%r15,%rdx,1)
  lea    0x1(%rax),%edx
  cmp    %edx,%r12d
  jle    L20
  movslq %edx,%rdx
  movzbl (%r14,%rdx,1),%ecx
  mov    %cl,(%r15,%rdx,1)
  lea    0x2(%rax),%edx
  cmp    %edx,%r12d
  jle    L20
  movslq %edx,%rdx
  movzbl (%r14,%rdx,1),%ecx
  mov    %cl,(%r15,%rdx,1)
  lea    0x3(%rax),%edx
  cmp    %edx,%r12d
  jle    L20
  movslq %edx,%rdx
  movzbl (%r14,%rdx,1),%ecx
  mov    %cl,(%r15,%rdx,1)
  lea    0x4(%rax),%edx
  cmp    %edx,%r12d
  jle    L20
  movslq %edx,%rdx
  movzbl (%r14,%rdx,1),%ecx
  mov    %cl,(%r15,%rdx,1)
  lea    0x5(%rax),%edx
  cmp    %edx,%r12d
  jle    L20
  movslq %edx,%rdx
  add    $0x6,%eax
  movzbl (%r14,%rdx,1),%ecx
  mov    %cl,(%r15,%rdx,1)
  cmp    %eax,%r12d
  jle    L20
  cltq
  movzbl (%r14,%rax,1),%edx
  mov    %dl,(%r15,%rax,1)
L20:
  mov    %r14,%rdi
  mov    %ebx,%r12d
  mov    %r15,%r14
  call   <free@plt>
  jmp    L161
  nopl   (%rax)
L150:
  add    $0x8,%rsp
  mov    %r14,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L75:
  mov    %r14,%rcx
  add    %r15,%r12
  mov    %r15,%rax
  sub    %r15,%rcx
  nopl   0x0(%rax)
L25:
  movzbl (%rcx,%rax,1),%edx
  add    $0x1,%rax
  mov    %dl,-0x1(%rax)
  cmp    %r12,%rax
  jne    L25
  mov    %r14,%rdi
  mov    %ebx,%r12d
  mov    %r15,%r14
  call   <free@plt>
  jmp    L161
L12:
  xor    %edx,%edx
  xor    %eax,%eax
  jmp    L120
```

tool_calls: name: parse_data
arguments: data_tag: D4
type_infered: string

tool: D4: %c

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();
  printf("%c", c);
  while (c != 10) {
    s[contador++] = c;
    if (contador >= contadorMax) {
      sAux = (char *)malloc((contadorMax + 5) * sizeof(char));
      for (i = 0; i < contadorMax; i++) {
        sAux[i] = s[i];
      }
      free(s);
      s = sAux;
      contadorMax += 5;
    }
    s[contador] = '\0';
    c = getch();
    printf("%c", c);
  }
  return s;
}
```