user: What is the c source code of the assembly code below:

```asm
<svg_quotetext>:
  endbr64
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <strlen@plt>
  lea    0x1(%rax),%edi
  mov    %eax,%ebp
  call   <malloc@plt>
  test   %rax,%rax
  je     L85
  mov    %rax,%rdi
  movzbl (%r12),%eax
  test   %al,%al
  je     L63
  add    $0x1,%r12
  xor    %ebx,%ebx
  jmp    L39
  nopl   0x0(%rax)
L69:
  cmp    $0x26,%al
  je     L118
  movslq %ebx,%rdx
  add    $0x1,%ebx
  mov    %al,(%rdi,%rdx,1)
L89:
  movzbl (%r12),%eax
  add    $0x1,%r12
  test   %al,%al
  je     L32
L39:
  cmp    $0x3c,%al
  je     L86
  cmp    $0x3e,%al
  jne    L69
  lea    0x4(%rbp),%esi
  lea    0x3(%rbp),%r13d
  call   <realloc@plt>
  mov    %rax,%rdi
  test   %rax,%rax
  je     L85
  movslq %ebx,%rax
  movb   $0x26,(%rdi,%rax,1)
  lea    0x1(%rbx),%eax
  cltq
  movb   $0x67,(%rdi,%rax,1)
L109:
  lea    0x3(%rbx),%eax
  lea    0x2(%rbx),%edx
  add    $0x1,%r12
  add    $0x4,%ebx
  cltq
  movslq %edx,%rdx
  mov    %r13d,%ebp
  movb   $0x74,(%rdi,%rdx,1)
  movb   $0x3b,(%rdi,%rax,1)
  movzbl -0x1(%r12),%eax
  test   %al,%al
  jne    L39
L32:
  movslq %ebx,%rbx
  add    %rdi,%rbx
L104:
  movb   $0x0,(%rbx)
  add    $0x8,%rsp
  mov    %rdi,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L86:
  lea    0x4(%rbp),%esi
  lea    0x3(%rbp),%r13d
  call   <realloc@plt>
  mov    %rax,%rdi
  test   %rax,%rax
  je     L85
  movslq %ebx,%rax
  movb   $0x26,(%rdi,%rax,1)
  lea    0x1(%rbx),%eax
  cltq
  movb   $0x6c,(%rdi,%rax,1)
  jmp    L109
  xchg   %ax,%ax
L118:
  lea    0x5(%rbp),%esi
  lea    0x4(%rbp),%r13d
  call   <realloc@plt>
  mov    %rax,%rdi
  test   %rax,%rax
  je     L85
  movslq %ebx,%rax
  lea    0x3(%rbx),%edx
  mov    %r13d,%ebp
  movb   $0x26,(%rdi,%rax,1)
  lea    0x1(%rbx),%eax
  movslq %edx,%rdx
  cltq
  movb   $0x61,(%rdi,%rax,1)
  lea    0x2(%rbx),%eax
  cltq
  movb   $0x6d,(%rdi,%rax,1)
  lea    0x4(%rbx),%eax
  add    $0x5,%ebx
  cltq
  movb   $0x70,(%rdi,%rdx,1)
  movb   $0x3b,(%rdi,%rax,1)
  jmp    L89
  nopl   0x0(%rax,%rax,1)
L85:
  add    $0x8,%rsp
  xor    %edi,%edi
  pop    %rbx
  mov    %rdi,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L63:
  mov    %rdi,%rbx
  jmp    L104
```

assistant: ```c
char *svg_quotetext(const char *text) {
  int lengthK = (int)strlen(text);
  char *result = malloc(lengthK + 1);
  if (NULL == result) {
    return NULL;
  }
  int i = 0;
  int k = 0;
  char c;
  for (; '\0' != (c = text[i]); i++) {
    switch (c) {
    case '&':
      lengthK += 4;
      result = realloc(result, lengthK + 1);
      if (NULL == result) {
        return NULL;
      }
      result[k++] = '&';
      result[k++] = 'a';
      result[k++] = 'm';
      result[k++] = 'p';
      result[k++] = ';';
      break;
    case '<':
      lengthK += 3;
      result = realloc(result, lengthK + 1);
      if (NULL == result) {
        return NULL;
      }
      result[k++] = '&';
      result[k++] = 'l';
      result[k++] = 't';
      result[k++] = ';';
      break;
    case '>':
      lengthK += 3;
      result = realloc(result, lengthK + 1);
      if (NULL == result) {
        return NULL;
      }
      result[k++] = '&';
      result[k++] = 'g';
      result[k++] = 't';
      result[k++] = ';';
      break;
    default:
      result[k++] = c;
      break;
    }
  }
  result[k++] = '\0';
  return result;
}
```