user: What would the C source look like for the assembly code provided here?

```asm
<Text_shellsafe>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  movl   $0x0,-0xc(%rbp)
  movl   $0x5000,-0x8(%rbp)
  mov    -0x24(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L61
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0xc(%rbp)
L61:
  mov    -0x24(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L77
  movl   $0xa000,-0x8(%rbp)
L77:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x27,(%rax)
  movl   $0x0,-0x10(%rbp)
  jmp    L10
L69:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x27,%al
  jne    L58
  mov    -0xc(%rbp),%eax
  add    $0x6,%eax
  cmp    %eax,-0x8(%rbp)
  jle    L42
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x27,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x22,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x27,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x22,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x27,(%rax)
  jmp    L48
L58:
  mov    -0xc(%rbp),%eax
  add    $0x2,%eax
  cmp    %eax,-0x8(%rbp)
  jg     L89
  jmp    L55
L42:
  nop
L55:
  mov    -0x20(%rbp),%rax
  mov    $0x21,%edx
  lea    D5(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  jmp    L30
L89:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  movzbl (%rcx),%eax
  mov    %al,(%rdx)
L48:
  addl   $0x1,-0x10(%rbp)
L10:
  mov    -0x10(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L69
L30:
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x27,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x20(%rbp),%rax
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D5
type_infered: string

tool: D5: 'xorriso: TEXT MUCH TOO LONG ...   

assistant: ```c
char *Text_shellsafe(char *in_text, char *out_text, int flag) {
  int l, i, w = 0, limit = 5 * 4096;
  if (flag & 1)
    w = strlen(out_text);
  if (flag & 2)
    limit = 10 * 4096;
  l = strlen(in_text);
  out_text[w++] = '\'';
  for (i = 0; i < l; i++) {
    if (in_text[i] == '\'') {
      if (w + 7 > limit)
        goto overflow;
      out_text[w++] = '\'';
      out_text[w++] = '"';
      out_text[w++] = '\'';
      out_text[w++] = '"';
      out_text[w++] = '\'';
    } else {
      if (w + 3 > limit) {
      overflow:;
        strncpy(out_text, "'xorriso: TEXT MUCH TOO LONG ...   ", 33);
        break;
      }
      out_text[w++] = in_text[i];
    }
  }
  out_text[w++] = '\'';
  out_text[w++] = 0;
  return (out_text);
}
```