user: Please show me the C implementation that matches the assembly code listed below:

```asm
<appendText>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdi,%r14
  mov    %rsi,%rdi
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %dl,0x8(%rsp)
  call   <strlen@plt>
  test   %r14,%r14
  movzbl 0x8(%rsp),%r8d
  mov    %eax,%r13d
  je     L204
  mov    %r14,%rdi
  call   <strlen@plt>
  movzbl 0x8(%rsp),%r8d
  movslq %eax,%r15
  lea    0x0(%r13,%r15,1),%ebx
L291:
  test   %r12b,%r12b
  je     L202
  add    $0x3,%ebx
  test   %r13d,%r13d
  jle    L125
  lea    -0x1(%r13),%r9d
  cmp    $0xe,%r9d
  jbe    L19
  mov    %r13d,%edx
  movd   %r12d,%xmm4
  pxor   %xmm1,%xmm1
  mov    %rbp,%rax
  punpcklbw %xmm4,%xmm4
  shr    $0x4,%edx
  pxor   %xmm6,%xmm6
  pxor   %xmm5,%xmm5
  sub    $0x1,%edx
  punpcklwd %xmm4,%xmm4
  movdqa D7(%rip),%xmm7
  shl    $0x4,%rdx
  pshufd $0x0,%xmm4,%xmm4
  lea    0x10(%rbp,%rdx,1),%rdx
  nopl   (%rax)
L290:
  movdqu (%rax),%xmm0
  movdqa %xmm6,%xmm3
  add    $0x10,%rax
  pcmpeqb %xmm4,%xmm0
  pand   %xmm7,%xmm0
  pcmpgtb %xmm0,%xmm3
  movdqa %xmm0,%xmm2
  punpcklbw %xmm3,%xmm2
  punpckhbw %xmm3,%xmm0
  movdqa %xmm5,%xmm3
  pcmpgtw %xmm2,%xmm3
  movdqa %xmm2,%xmm8
  punpcklwd %xmm3,%xmm8
  punpckhwd %xmm3,%xmm2
  movdqa %xmm0,%xmm3
  paddd  %xmm8,%xmm1
  paddd  %xmm2,%xmm1
  movdqa %xmm5,%xmm2
  pcmpgtw %xmm0,%xmm2
  punpcklwd %xmm2,%xmm3
  punpckhwd %xmm2,%xmm0
  paddd  %xmm3,%xmm1
  paddd  %xmm0,%xmm1
  cmp    %rdx,%rax
  jne    L290
  movdqa %xmm1,%xmm0
  psrldq $0x8,%xmm0
  paddd  %xmm0,%xmm1
  movdqa %xmm1,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm1
  movd   %xmm1,%eax
  add    %eax,%ebx
  mov    %r13d,%eax
  and    $0xfffffff0,%eax
  test   $0xf,%r13b
  je     L49
L123:
  movslq %eax,%rdx
  cmp    %r12b,0x0(%rbp,%rdx,1)
  sete   %dl
  movzbl %dl,%edx
  add    %edx,%ebx
  lea    0x1(%rax),%edx
  cmp    %r13d,%edx
  jge    L49
  movslq %edx,%rdx
  cmp    %r12b,0x0(%rbp,%rdx,1)
  sete   %dl
  movzbl %dl,%edx
  add    %edx,%ebx
  lea    0x2(%rax),%edx
  cmp    %edx,%r13d
  jle    L49
  movslq %edx,%rdx
  cmp    %r12b,0x0(%rbp,%rdx,1)
  sete   %dl
  movzbl %dl,%edx
  add    %edx,%ebx
  lea    0x3(%rax),%edx
  cmp    %edx,%r13d
  jle    L49
  movslq %edx,%rdx
  cmp    %r12b,0x0(%rbp,%rdx,1)
  sete   %dl
  movzbl %dl,%edx
  add    %edx,%ebx
  lea    0x4(%rax),%edx
  cmp    %edx,%r13d
  jle    L49
  movslq %edx,%rdx
  cmp    %r12b,0x0(%rbp,%rdx,1)
  sete   %dl
  movzbl %dl,%edx
  add    %edx,%ebx
  lea    0x5(%rax),%edx
  cmp    %edx,%r13d
  jle    L49
  movslq %edx,%rdx
  cmp    %r12b,0x0(%rbp,%rdx,1)
  sete   %dl
  movzbl %dl,%edx
  add    %edx,%ebx
  lea    0x6(%rax),%edx
  cmp    %edx,%r13d
  jle    L49
  movslq %edx,%rdx
  cmp    %r12b,0x0(%rbp,%rdx,1)
  sete   %dl
  movzbl %dl,%edx
  add    %edx,%ebx
  lea    0x7(%rax),%edx
  cmp    %edx,%r13d
  jle    L49
  movslq %edx,%rdx
  cmp    %r12b,0x0(%rbp,%rdx,1)
  sete   %dl
  movzbl %dl,%edx
  add    %edx,%ebx
  lea    0x8(%rax),%edx
  cmp    %edx,%r13d
  jle    L49
  movslq %edx,%rdx
  cmp    %r12b,0x0(%rbp,%rdx,1)
  sete   %dl
  movzbl %dl,%edx
  add    %edx,%ebx
  lea    0x9(%rax),%edx
  cmp    %edx,%r13d
  jle    L49
  movslq %edx,%rdx
  cmp    %r12b,0x0(%rbp,%rdx,1)
  sete   %dl
  movzbl %dl,%edx
  add    %edx,%ebx
  lea    0xa(%rax),%edx
  cmp    %edx,%r13d
  jle    L49
  movslq %edx,%rdx
  cmp    %r12b,0x0(%rbp,%rdx,1)
  sete   %dl
  movzbl %dl,%edx
  add    %edx,%ebx
  lea    0xb(%rax),%edx
  cmp    %edx,%r13d
  jle    L49
  movslq %edx,%rdx
  cmp    %r12b,0x0(%rbp,%rdx,1)
  sete   %dl
  movzbl %dl,%edx
  add    %edx,%ebx
  lea    0xc(%rax),%edx
  cmp    %edx,%r13d
  jle    L49
  movslq %edx,%rdx
  cmp    %r12b,0x0(%rbp,%rdx,1)
  sete   %dl
  movzbl %dl,%edx
  add    %edx,%ebx
  lea    0xd(%rax),%edx
  cmp    %edx,%r13d
  jle    L49
  movslq %edx,%rdx
  cmp    %r12b,0x0(%rbp,%rdx,1)
  sete   %dl
  add    $0xe,%eax
  movzbl %dl,%edx
  add    %edx,%ebx
  cmp    %eax,%r13d
  jle    L49
  cltq
  cmp    %r12b,0x0(%rbp,%rax,1)
  sete   %al
  movzbl %al,%eax
  add    %eax,%ebx
  nopw   0x0(%rax,%rax,1)
L49:
  mov    %r14,%rdi
  mov    %ebx,%esi
  mov    %r8b,0xf(%rsp)
  mov    %r9d,0x8(%rsp)
  call   <realloc@plt>
  mov    0x8(%rsp),%r9d
  movzbl 0xf(%rsp),%r8d
  test   %rax,%rax
  mov    %rax,%r14
  je     L220
  add    %r14,%r15
  mov    %rbp,%rcx
  lea    0x1(%rbp,%r9,1),%rax
  mov    %r12b,(%r15)
  lea    0x1(%r15),%rdx
  jmp    L167
  nop
L216:
  add    $0x1,%rcx
  add    $0x1,%rdx
  cmp    %rax,%rcx
  je     L308
L167:
  movzbl (%rcx),%esi
  mov    %sil,(%rdx)
  cmp    %r8b,%sil
  jne    L216
  add    $0x1,%rcx
  mov    %r8b,0x1(%rdx)
  add    $0x2,%rdx
  cmp    %rax,%rcx
  jne    L167
L308:
  mov    %r12b,(%rdx)
  add    $0x2,%rdx
  movslq %ebx,%rbx
  xor    %edi,%edi
  movb   $0x0,-0x1(%rdx)
  sub    %r14,%rdx
  cmp    %rbx,%rdx
  sete   %dil
  call   <assert@plt>
L64:
  add    $0x18,%rsp
  mov    %r14,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L202:
  add    $0x1,%ebx
  mov    %r14,%rdi
  mov    %ebx,%esi
  call   <realloc@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L220
  movslq %r15d,%rdi
  mov    %r13d,%edx
  mov    %rbp,%rsi
  movslq %ebx,%rbx
  add    %r14,%rdi
  call   <memcpy@plt>
  movb   $0x0,-0x1(%r14,%rbx,1)
  jmp    L64
  nopl   0x0(%rax)
L204:
  mov    %eax,%ebx
  xor    %r15d,%r15d
  jmp    L291
  nopw   0x0(%rax,%rax,1)
L220:
  xor    %r14d,%r14d
  jmp    L64
  nopl   (%rax)
L125:
  mov    %r14,%rdi
  mov    %ebx,%esi
  call   <realloc@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L220
  movslq %r15d,%rax
  add    %r14,%rax
  mov    %r12b,(%rax)
  lea    0x1(%rax),%rdx
  jmp    L308
L19:
  xor    %eax,%eax
  jmp    L123
```

tool_calls: name: unpack_data
arguments: tag: D7
type_infered: byte[16]

tool: {"D7": [0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01]}

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