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

```asm
<appendText>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdi,%r14
  mov    %rsi,%rdi
  push   %r13
  mov    %edx,%r13d
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edx,0x8(%rsp)
  call   <strlen@plt>
  test   %r14,%r14
  mov    0x8(%rsp),%r8d
  mov    %eax,%edx
  je     L1
  mov    %r14,%rdi
  mov    %r8d,0xc(%rsp)
  mov    %eax,0x8(%rsp)
  call   <strlen@plt>
  mov    0x8(%rsp),%edx
  mov    0xc(%rsp),%r8d
  movslq %eax,%r15
  lea    (%rdx,%r15,1),%r12d
L125:
  test   %r8b,%r8b
  je     L71
  add    $0x3,%r12d
  test   %edx,%edx
  jle    L139
  mov    %rbp,%rbx
  lea    -0x1(%rdx),%eax
  lea    0x1(%rbp,%rax,1),%rbp
  mov    %rbx,%rax
  nopl   0x0(%rax,%rax,1)
L116:
  xor    %edx,%edx
  cmp    %r13b,(%rax)
  sete   %dl
  add    $0x1,%rax
  add    %edx,%r12d
  cmp    %rbp,%rax
  jne    L116
  mov    %r14,%rdi
  mov    %r12d,%esi
  mov    %r8d,0x8(%rsp)
  call   <realloc@plt>
  mov    0x8(%rsp),%r8d
  test   %rax,%rax
  mov    %rax,%r14
  je     L44
  add    %r14,%r15
  mov    %r8b,(%r15)
  lea    0x1(%r15),%rdx
  jmp    L147
  nopl   0x0(%rax)
L35:
  add    $0x1,%rbx
  add    $0x1,%rdx
  cmp    %rbp,%rbx
  je     L55
L147:
  movzbl (%rbx),%ecx
  mov    %cl,(%rdx)
  cmp    %r13b,%cl
  jne    L35
  add    $0x1,%rbx
  mov    %r13b,0x1(%rdx)
  add    $0x2,%rdx
  cmp    %rbp,%rbx
  jne    L147
L55:
  mov    %r8b,(%rdx)
  add    $0x2,%rdx
  movslq %r12d,%r12
  xor    %edi,%edi
  movb   $0x0,-0x1(%rdx)
  sub    %r14,%rdx
  cmp    %r12,%rdx
  sete   %dil
  call   <assert@plt>
L100:
  add    $0x18,%rsp
  mov    %r14,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L71:
  add    $0x1,%r12d
  mov    %r14,%rdi
  mov    %edx,0x8(%rsp)
  mov    %r12d,%esi
  call   <realloc@plt>
  mov    0x8(%rsp),%edx
  test   %rax,%rax
  mov    %rax,%r14
  je     L44
  movslq %r15d,%rdi
  mov    %rbp,%rsi
  movslq %r12d,%r12
  add    %r14,%rdi
  call   <memcpy@plt>
  movb   $0x0,-0x1(%r14,%r12,1)
  jmp    L100
L1:
  mov    %eax,%r12d
  xor    %r15d,%r15d
  jmp    L125
  nopl   0x0(%rax,%rax,1)
L44:
  xor    %r14d,%r14d
  jmp    L100
  nopl   (%rax)
L139:
  mov    %r14,%rdi
  mov    %r12d,%esi
  mov    %r8d,0x8(%rsp)
  call   <realloc@plt>
  mov    0x8(%rsp),%r8d
  test   %rax,%rax
  mov    %rax,%r14
  je     L44
  movslq %r15d,%rax
  add    %r14,%rax
  mov    %r8b,(%rax)
  lea    0x1(%rax),%rdx
  jmp    L55
```

assistant: ```c
char *appendText(char *zIn, char const *zAppend, char quote) {
  int len;
  int i;
  int nAppend = strlen(zAppend);
  int nIn = (zIn ? strlen(zIn) : 0);
  len = nAppend + nIn + 1;
  if (quote) {
    len += 2;
    for (i = 0; i < nAppend; i++) {
      if (zAppend[i] == quote)
        len++;
    }
  }
  zIn = (char *)realloc(zIn, len);
  if (!zIn) {
    return 0;
  }
  if (quote) {
    char *zCsr = &zIn[nIn];
    *zCsr++ = quote;
    for (i = 0; i < nAppend; i++) {
      *zCsr++ = zAppend[i];
      if (zAppend[i] == quote)
        *zCsr++ = quote;
    }
    *zCsr++ = quote;
    *zCsr++ = '\0';
    assert((zCsr - zIn) == len);
  } else {
    memcpy(&zIn[nIn], zAppend, nAppend);
    zIn[len - 1] = '\0';
  }
  return zIn;
}
```