user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<svg_quotetext>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L114
  mov    $0x0,%eax
  jmp    L86
L114:
  movl   $0x0,-0x10(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L106
L60:
  movsbl -0x15(%rbp),%eax
  cmp    $0x3e,%eax
  je     L70
  cmp    $0x3e,%eax
  jg     L140
  cmp    $0x26,%eax
  je     L101
  cmp    $0x3c,%eax
  je     L49
  jmp    L140
L101:
  addl   $0x4,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L162
  mov    $0x0,%eax
  jmp    L86
L162:
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x26,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x61,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x6d,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x70,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x3b,(%rax)
  jmp    L32
L49:
  addl   $0x3,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L4
  mov    $0x0,%eax
  jmp    L86
L4:
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x26,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x6c,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x74,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x3b,(%rax)
  jmp    L32
L70:
  addl   $0x3,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L15
  mov    $0x0,%eax
  jmp    L86
L15:
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x26,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x67,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x74,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x3b,(%rax)
  jmp    L32
L140:
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x15(%rbp),%eax
  mov    %al,(%rdx)
  nop
L32:
  addl   $0x1,-0x10(%rbp)
L106:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x15(%rbp)
  cmpb   $0x0,-0x15(%rbp)
  jne    L60
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
L86:
  leave
  ret
```

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;
}
```