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

```asm
<striptags>:
  endbr64
  push   %r15
  lea    D5(%rip),%r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  push   %r12
  push   %rbp
  mov    $0x20,%ebp
  push   %rbx
  mov    %esi,%ebx
  mov    %ebx,%edi
  add    %r14,%rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%r13
  call   <buf_init@plt>
  mov    %rax,%r12
  cmp    %rbx,%r14
  jb     L156
  jmp    L3
  nop
L59:
  movzbl (%r14),%ecx
  cmp    $0x3e,%cl
  ja     L120
  movabs $0x500000c400000000,%rsi
  bt     %rcx,%rsi
  jb     L180
L120:
  mov    %ecx,%esi
  mov    %r12,%rdi
  call   <buf_putchar@plt>
L20:
  movzbl (%r14),%ebp
L178:
  add    $0x1,%r14
  cmp    %r14,%rbx
  jbe    L3
L156:
  movzbl (%r14),%edi
  cmp    $0x3c,%dil
  jne    L145
  lea    0x2(%r14),%rax
  cmp    %rax,%rbx
  jbe    L145
  movzbl 0x1(%r14),%edi
  cmp    $0x2f,%dil
  je     L183
  call   <isalpha@plt>
  test   %rax,%rax
  jne    L183
  movzbl (%r14),%edi
  nopl   0x0(%rax)
L145:
  call   <isspace@plt>
  test   %rax,%rax
  je     L59
  movzbl %bpl,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L20
  movzbl (%r14),%esi
  mov    %r12,%rdi
  call   <buf_putchar@plt>
  jmp    L20
  cs nopw 0x0(%rax,%rax,1)
L180:
  mov    %r15,%rdx
  mov    %r13,%rdi
  mov    $0x8,%esi
  call   <snprintf@plt>
  mov    %r13,%rsi
  mov    %r12,%rdi
  mov    %eax,%edx
  call   <buf_append@plt>
  jmp    L20
  nopw   0x0(%rax,%rax,1)
L3:
  mov    %r12,%rdi
  call   <buf_destroy@plt>
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L31
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L183:
  cmp    %r14,%rbx
  jbe    L178
  mov    %r14,%rax
  jmp    L191
  xchg   %ax,%ax
L155:
  cmp    %rbx,%rax
  je     L178
L191:
  movzbl (%rax),%edx
  mov    %rax,%rcx
  add    $0x1,%rax
  cmp    $0x3e,%dl
  jne    L155
  movzbl %bpl,%edi
  mov    %rcx,0x8(%rsp)
  mov    $0x20,%ebp
  call   <isspace@plt>
  mov    0x8(%rsp),%r14
  test   %rax,%rax
  jne    L178
  mov    $0x20,%esi
  mov    %r12,%rdi
  call   <buf_putchar@plt>
  jmp    L178
L31:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D5
type_infered: string

tool: D5: &#%i;

assistant: ```c
char *striptags(const char *s, unsigned int l) {
  struct template_buffer *buf = buf_init(l);
  unsigned char *ptr = (unsigned char *)s;
  unsigned char *end = ptr + l;
  unsigned char *tag;
  unsigned char prev;
  char esq[8];
  int esl;
  for (prev = ' '; ptr < end; ptr++) {
    if ((*ptr == '<') && ((ptr + 2) < end) && ((*(ptr + 1) == '/') || isalpha(*(ptr + 1)))) {
      for (tag = ptr; tag < end; tag++) {
        if (*tag == '>') {
          if (!isspace(prev))
            buf_putchar(buf, ' ');
          ptr = tag;
          prev = ' ';
          break;
        }
      }
    } else if (isspace(*ptr)) {
      if (!isspace(prev))
        buf_putchar(buf, *ptr);
      prev = *ptr;
    } else {
      switch (*ptr) {
      case '"':
      case '\'':
      case '<':
      case '>':
      case '&':
        esl = snprintf(esq, sizeof(esq), "&#%i;", *ptr);
        buf_append(buf, esq, esl);
        break;
      default:
        buf_putchar(buf, *ptr);
        break;
      }
      prev = *ptr;
    }
  }
  return buf_destroy(buf);
}
```