user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<html_escape_str>:
  endbr64
  mov    %rdi,%rcx
  mov    %rdx,%r8
  test   %rdx,%rdx
  je     L144
  mov    $0x0,%eax
  lea    D6(%rip),%r10
  lea    D0(%rip),%r9
  jmp    L22
L85:
  cmp    $0x5a,%dl
  je     L168
  cmp    $0x71,%dl
  jne    L152
  lea    0x6(%rax),%rdx
  cmp    %r8,%rdx
  ja     L168
  movb   $0x26,(%rcx)
  movb   $0x71,0x1(%rcx)
  movb   $0x75,0x2(%rcx)
  movb   $0x6f,0x3(%rcx)
  movb   $0x74,0x4(%rcx)
  movb   $0x3b,0x5(%rcx)
  mov    %rdx,%rax
  lea    0x6(%rcx),%rcx
  jmp    L152
  add    $0x1,%rax
  mov    %dil,(%rcx)
  lea    0x1(%rcx),%rcx
L152:
  cmp    %rax,%r8
  jbe    L168
L22:
  add    $0x1,%rsi
  movzbl -0x1(%rsi),%edi
  movzbl %dil,%edx
  movzbl (%r10,%rdx,1),%edx
  cmp    $0x3e,%dl
  jg     L85
  cmp    $0x25,%dl
  jle    L152
  sub    $0x26,%edx
  cmp    $0x18,%dl
  ja     L152
  movzbl %dl,%edx
  movslq (%r9,%rdx,4),%rdx
  add    %r9,%rdx
  notrack jmp *%rdx
  add    $0x1,%rax
  movb   $0x3f,(%rcx)
  lea    0x1(%rcx),%rcx
  jmp    L152
  lea    0x5(%rax),%rdx
  cmp    %r8,%rdx
  ja     L168
  movb   $0x26,(%rcx)
  movb   $0x61,0x1(%rcx)
  movb   $0x6d,0x2(%rcx)
  movb   $0x70,0x3(%rcx)
  movb   $0x3b,0x4(%rcx)
  mov    %rdx,%rax
  lea    0x5(%rcx),%rcx
  jmp    L152
  lea    0x4(%rax),%rdx
  cmp    %r8,%rdx
  ja     L168
  movb   $0x26,(%rcx)
  movb   $0x6c,0x1(%rcx)
  movb   $0x74,0x2(%rcx)
  movb   $0x3b,0x3(%rcx)
  mov    %rdx,%rax
  lea    0x4(%rcx),%rcx
  jmp    L152
  lea    0x4(%rax),%rdx
  cmp    %r8,%rdx
  ja     L168
  movb   $0x26,(%rcx)
  movb   $0x67,0x1(%rcx)
  movb   $0x74,0x2(%rcx)
  movb   $0x3b,0x3(%rcx)
  mov    %rdx,%rax
  lea    0x4(%rcx),%rcx
  jmp    L152
L144:
  mov    %rdx,%rax
L168:
  movb   $0x0,(%rcx)
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D6
type_infered: string

tool: D6: Z-------------------------------**q***&*********************<*>****************************************************************---------------------------------************************************************************************************************

assistant: ```c
int html_escape_str(char *dst, const char *src, size_t n) {
  unsigned char c;
  size_t i;
  const char *codes = "Z-------------------------------"
                      "**q***&*********************<*>*"
                      "********************************"
                      "*******************************-"
                      "--------------------------------"
                      "********************************"
                      "********************************"
                      "********************************";
  for (i = 0; i < n;) {
    c = (unsigned char)*(src++);
    switch (codes[c]) {
    case 'Z':
      goto leave;
    case '*':
      i++;
      *(dst++) = c;
      break;
    case '-':
      i++;
      *(dst++) = '?';
      break;
    case '&':
      if (i + 5 > n)
        goto leave;
      i += 5;
      *(dst++) = '&';
      *(dst++) = 'a';
      *(dst++) = 'm';
      *(dst++) = 'p';
      *(dst++) = ';';
      break;
    case '<':
      if (i + 4 > n)
        goto leave;
      i += 4;
      *(dst++) = '&';
      *(dst++) = 'l';
      *(dst++) = 't';
      *(dst++) = ';';
      break;
    case '>':
      if (i + 4 > n)
        goto leave;
      i += 4;
      *(dst++) = '&';
      *(dst++) = 'g';
      *(dst++) = 't';
      *(dst++) = ';';
      break;
    case 'q':
      if (i + 6 > n)
        goto leave;
      i += 6;
      *(dst++) = '&';
      *(dst++) = 'q';
      *(dst++) = 'u';
      *(dst++) = 'o';
      *(dst++) = 't';
      *(dst++) = ';';
      break;
    }
  }
leave:
  *(dst++) = '\0';
  return i;
}
```