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

```asm
<c_quote>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movb   $0x22,-0x1a(%rbp)
  movb   $0x5c,-0x19(%rbp)
  mov    -0x30(%rbp),%rax
  mov    $0x0,%r8d
  mov    $0x0,%ecx
  mov    %rax,%rdx
  lea    D61(%rip),%rax
  mov    %rax,%rsi
  lea    D89(%rip),%rax
  mov    %rax,%rdi
  call   <check_capacity@plt>
  cmpq   $0x0,-0x38(%rbp)
  je     L108
  mov    -0x38(%rbp),%rax
  movq   $0x0,(%rax)
L108:
  mov    D89(%rip),%rax
  test   %rax,%rax
  je     L53
  movq   $0x0,-0x10(%rbp)
  mov    D89(%rip),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rcx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  lea    (%rcx,%rax,1),%rdx
  movzbl -0x1a(%rbp),%eax
  mov    %al,(%rdx)
  jmp    L45
L20:
  mov    -0x10(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x10(%rbp),%rcx
  lea    -0x18(%rbp),%rax
  mov    %rcx,%r8
  mov    %rax,%rcx
  lea    D61(%rip),%rax
  mov    %rax,%rsi
  lea    D89(%rip),%rax
  mov    %rax,%rdi
  call   <check_capacity@plt>
  mov    D89(%rip),%rax
  test   %rax,%rax
  jne    L76
  mov    D89(%rip),%rax
  jmp    L62
L76:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x1a(%rbp)
  jne    L116
  mov    -0x18(%rbp),%rcx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  lea    (%rcx,%rax,1),%rdx
  movzbl -0x19(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x18(%rbp),%rcx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  lea    (%rcx,%rax,1),%rdx
  movzbl -0x1a(%rbp),%eax
  mov    %al,(%rdx)
  jmp    L84
L116:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x19(%rbp)
  jne    L70
  mov    -0x18(%rbp),%rcx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  lea    (%rcx,%rax,1),%rdx
  movzbl -0x19(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x18(%rbp),%rcx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  lea    (%rcx,%rax,1),%rdx
  movzbl -0x19(%rbp),%eax
  mov    %al,(%rdx)
  jmp    L84
L70:
  mov    -0x18(%rbp),%rcx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  lea    (%rcx,%rax,1),%rdx
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,(%rdx)
L84:
  addq   $0x1,-0x28(%rbp)
  subq   $0x1,-0x30(%rbp)
L45:
  cmpq   $0x0,-0x30(%rbp)
  jne    L20
  mov    -0x18(%rbp),%rcx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  lea    (%rcx,%rax,1),%rdx
  movzbl -0x1a(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x18(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  cmpq   $0x0,-0x38(%rbp)
  je     L53
  mov    -0x38(%rbp),%rax
  mov    -0x10(%rbp),%rdx
  mov    %rdx,(%rax)
L53:
  mov    D89(%rip),%rax
L62:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L66
  call   <__stack_chk_fail@plt>
L66:
  leave
  ret
```

assistant: ```c
char *c_quote(char *str, size_t ilen, size_t *len) {
  static char *buf = NULL;
  static size_t buf_cap = 0;
  const char DQ = '"';
  const char E = '\\';
  check_capacity(&buf, &buf_cap, ilen, 0, 0);
  if (len)
    *len = 0;
  if (buf) {
    size_t i = 0;
    char *p = buf;
    p[i++] = DQ;
    while (ilen > 0) {
      check_capacity(&buf, &buf_cap, i + 8, &p, i);
      if (!buf)
        return buf;
      if (*str == DQ) {
        p[i++] = E;
        p[i++] = DQ;
      } else if (*str == E) {
        p[i++] = E;
        p[i++] = E;
      } else {
        p[i++] = *str;
      }
      str++;
      ilen--;
    }
    p[i++] = DQ;
    p[i] = 0;
    if (len)
      *len = i;
  }
  return buf;
}
```