user: 请将以下的汇编代码转换成C语言代码:

```asm
<text_area_process_string>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  jne    L15
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L15
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <xstrdup@plt>
  jmp    L31
L15:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    $0x2,%rax
  mov    %rax,%rdi
  call   <xmalloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x28(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  jmp    L0
L249:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x1f,%al
  ja     L72
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L72
  mov    -0x18(%rbp),%rax
  movb   $0x20,(%rax)
  jmp    L226
L72:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  cmp    %eax,-0x2c(%rbp)
  jne    L121
  mov    -0x30(%rbp),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L226
L121:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x7f,%al
  jne    L226
  mov    -0x18(%rbp),%rax
  movb   $0x20,(%rax)
L226:
  addq   $0x1,-0x18(%rbp)
L0:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L249
  jmp    L64
L160:
  subq   $0x1,-0x18(%rbp)
L64:
  mov    -0x18(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jbe    L144
  mov    -0x18(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L160
L144:
  mov    -0x18(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jne    L96
  mov    -0x8(%rbp),%rax
  jmp    L31
L96:
  mov    -0x18(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jbe    L55
  mov    -0x18(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L55
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movb   $0xa,(%rax)
  mov    -0x18(%rbp),%rax
  movb   $0x0,(%rax)
L55:
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  jmp    L73
L158:
  subq   $0x1,-0x10(%rbp)
L82:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L247
  mov    -0x10(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jbe    L247
  mov    -0x10(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L158
L247:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    -0x18(%rbp),%rdx
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  addq   $0x1,-0x18(%rbp)
L73:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L82
  mov    -0x10(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L257
L143:
  subq   $0x1,-0x10(%rbp)
L257:
  mov    -0x10(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jbe    L99
  mov    -0x10(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L143
L99:
  mov    -0x10(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jbe    L265
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movb   $0xa,(%rax)
L265:
  mov    -0x10(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
L31:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D0
datatype: string

tool: 

assistant: ```c
unsigned char *text_area_process_string(const unsigned char *s, int sep, int sep_repl) {
  unsigned char *p, *q, *out;
  if (!s && !*s)
    return xstrdup("");
  out = (unsigned char *)xmalloc(strlen(s) + 2);
  strcpy(out, s);
  for (p = out; *p; p++) {
    if (*p < ' ' && *p != '\n')
      *p = ' ';
    else if (*p == sep)
      *p = sep_repl;
    else if (*p == 127)
      *p = ' ';
  }
  while (p > out && p[-1] == ' ')
    p--;
  *p = 0;
  if (p == out)
    return out;
  if (p > out && p[-1] != '\n') {
    *p++ = '\n';
    *p = 0;
  }
  for (p = q = out; *p; p++) {
    while (*p == '\n' && q > out && q[-1] == ' ')
      q--;
    *q++ = *p;
  }
  *q = 0;
  while (q > out && q[-1] == '\n')
    q--;
  if (q > out)
    *q++ = '\n';
  *q = 0;
  return out;
}
```