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

```asm
<parse_html_decode>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  movzbl (%rsi),%eax
  cmp    %rdx,%rsi
  je     L25
  mov    %rsi,%rbx
  mov    %rdx,%r13
  jmp    L187
  nopl   (%rax)
L156:
  mov    %al,0x0(%rbp)
  add    $0x1,%rbp
  movzbl 0x1(%rbx),%eax
  mov    %r12,%rbx
L178:
  cmp    %r13,%rbx
  je     L25
L187:
  test   %al,%al
  je     L25
  lea    0x1(%rbx),%r12
  cmp    $0x26,%al
  jne    L156
  movzbl 0x1(%rbx),%edi
  cmp    %r12,%r13
  je     L143
  test   %dil,%dil
  je     L143
  cmp    $0x23,%dil
  je     L242
  call   <isalpha@plt>
  test   %rax,%rax
  jne    L223
L143:
  movb   $0x26,0x0(%rbp)
  movzbl 0x1(%rbx),%eax
  mov    %r12,%rbx
  add    $0x1,%rbp
  cmp    %r13,%rbx
  jne    L187
L25:
  movb   $0x0,0x0(%rbp)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L242:
  movzbl 0x2(%rbx),%edi
  lea    0x2(%rbx),%r14
  mov    %r14,%r15
  cmp    $0x78,%dil
  jne    L249
  jmp    L24
  cs nopw 0x0(%rax,%rax,1)
L145:
  movzbl 0x1(%r15),%edi
  add    $0x1,%r15
L249:
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L145
  mov    %r15,%rsi
  mov    $0xa,%edx
  mov    %r14,%rdi
  call   <convert_html_entity@plt>
  mov    %eax,%esi
  test   %eax,%eax
  js     L143
  mov    %rbp,%rdi
  mov    %r15,%rbx
  call   <ucs4_to_utf8_char@plt>
  mov    %rax,%rbp
  movzbl (%r15),%eax
  cmp    $0x3b,%al
  jne    L178
  movzbl 0x1(%r15),%eax
  add    $0x1,%rbx
  jmp    L178
  nopl   0x0(%rax)
L223:
  mov    %r12,%r14
  jmp    L177
  nopl   (%rax)
L217:
  add    $0x1,%r14
L177:
  movzbl (%r14),%edi
  call   <isalnum@plt>
  test   %rax,%rax
  jne    L217
  mov    %r14,%rsi
  mov    %r12,%rdi
  call   <find_html_entity@plt>
  mov    %eax,%esi
  test   %eax,%eax
  js     L143
L86:
  mov    %rbp,%rdi
  mov    %r14,%rbx
  call   <ucs4_to_utf8_char@plt>
  mov    %rax,%rbp
  movzbl (%r14),%eax
  cmp    $0x3b,%al
  jne    L178
  movzbl 0x1(%r14),%eax
  add    $0x1,%rbx
  jmp    L178
  nop
L24:
  lea    0x3(%rbx),%r15
  mov    %r15,%r14
  jmp    L19
  nopl   0x0(%rax)
L72:
  add    $0x1,%r14
L19:
  movzbl (%r14),%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  jne    L72
  mov    %r14,%rsi
  mov    $0x10,%edx
  mov    %r15,%rdi
  call   <convert_html_entity@plt>
  mov    %eax,%esi
  test   %eax,%eax
  js     L143
  jmp    L86
```

assistant: ```c
void parse_html_decode(unsigned char *buf, const unsigned char *start, const unsigned char *end) {
  const unsigned char *p = start;
  unsigned char *out = buf;
  while (*p && p != end) {
    if (*p != '&') {
      *out++ = *p++;
      continue;
    }
    ++p;
    if (!*p || p == end) {
      *out++ = '&';
      continue;
    }
    if (*p == '#' && p[1] == 'x') {
      const unsigned char *q = p;
      p += 2;
      while (isxdigit(*p))
        ++p;
      int e = convert_html_entity(q + 2, p, 16);
      if (e >= 0) {
        out = ucs4_to_utf8_char(out, e);
        if (*p == ';')
          ++p;
      } else {
        *out++ = '&';
        p = q;
      }
    } else if (*p == '#') {
      const unsigned char *q = p;
      ++p;
      while (isdigit(*p))
        ++p;
      int e = convert_html_entity(q + 1, p, 10);
      if (e >= 0) {
        out = ucs4_to_utf8_char(out, e);
        if (*p == ';')
          ++p;
      } else {
        *out++ = '&';
        p = q;
      }
    } else if (isalpha(*p)) {
      const unsigned char *q = p;
      while (isalnum(*p))
        ++p;
      int e = find_html_entity(q, p);
      if (e >= 0) {
        out = ucs4_to_utf8_char(out, e);
        if (*p == ';')
          ++p;
      } else {
        *out++ = '&';
        p = q;
      }
    } else {
      *out++ = '&';
      continue;
    }
  }
  *out = 0;
}
```