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

```asm
<ezxml_decode>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %rbp,%r14
  sub    $0x38,%rsp
  mov    %rdi,0x8(%rsp)
  movzbl (%rdi),%edi
  mov    %rsi,0x10(%rsp)
  mov    %edx,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  test   %dil,%dil
  je     L291
  nopl   0x0(%rax)
L74:
  lea    0x1(%rbp),%rbx
  cmp    $0xd,%dil
  jne    L363
  nopw   0x0(%rax,%rax,1)
L368:
  movzbl (%rbx),%eax
  movb   $0xa,-0x1(%rbx)
  mov    %rbx,%rbp
  cmp    $0xa,%al
  je     L51
  add    $0x1,%rbx
  cmp    $0xd,%al
  je     L368
L363:
  movzbl 0x1(%rbp),%edi
  test   %dil,%dil
  je     L325
L11:
  mov    %rbx,%rbp
  jmp    L74
  nopl   0x0(%rax)
L51:
  mov    %rbx,%rdi
  add    $0x1,%rbx
  call   <strlen@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  mov    %eax,%edx
  call   <memmove@plt>
  cmpb   $0xd,0x0(%rbp)
  je     L368
  movzbl 0x1(%rbp),%edi
  test   %dil,%dil
  jne    L11
  nopl   0x0(%rax,%rax,1)
L325:
  mov    0x8(%rsp),%rax
  movzbl (%rax),%edi
  mov    %rax,%r14
L291:
  mov    0x18(%rsp),%eax
  mov    %r12d,%ecx
  mov    %r14,(%rsp)
  lea    D1(%rip),%r15
  cmp    $0x20,%al
  sete   %dl
  cmp    $0x2a,%al
  sete   %al
  or     %eax,%edx
  movabs $0x44100000000,%rax
  shr    %cl,%rax
  mov    %dl,0x1e(%rsp)
  and    $0x1,%eax
  mov    %al,0x1f(%rsp)
  jmp    L54
  nopl   0x0(%rax,%rax,1)
L60:
  add    $0x1,%r14
L589:
  movzbl (%r14),%edi
L54:
  test   %dil,%dil
  je     L466
  cmp    $0x26,%dil
  je     L156
  cmp    $0x25,%r12b
  jne    L387
  cmp    $0x25,%dil
  je     L443
L387:
  call   <isspace@plt>
  test   %rax,%rax
  je     L60
  movzbl (%r14),%edi
L156:
  test   %dil,%dil
  je     L466
  cmp    $0x63,%r12b
  je     L60
L443:
  mov    $0x2,%edx
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <strncmp@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  jne    L389
  cmpb   $0x78,0x2(%r14)
  lea    0x20(%rsp),%rsi
  je     L329
  lea    0x2(%r14),%rdi
  mov    $0xa,%edx
  call   <strtol@plt>
  mov    %rax,%rsi
L29:
  lea    0x1(%r14),%rdi
  test   %rsi,%rsi
  je     L143
  mov    0x20(%rsp),%rax
  cmpb   $0x3b,(%rax)
  jne    L143
  cmp    $0x7f,%rsi
  jg     L548
  mov    %sil,(%r14)
  mov    %rdi,%r14
L179:
  mov    $0x3b,%esi
  mov    %r14,%rdi
  call   <strchr@plt>
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %r14,%rdi
  mov    $0x3b,%esi
  mov    %eax,%r13d
  call   <strchr@plt>
  mov    %r13d,%edx
  mov    %r14,%rdi
  lea    0x1(%rax),%rsi
  call   <memmove@plt>
  jmp    L589
  nopl   0x0(%rax)
L389:
  movzbl (%r14),%edi
  cmp    $0x26,%dil
  je     L410
  cmp    $0x25,%dil
  jne    L537
  cmp    $0x25,%r12b
  je     L218
L537:
  cmpb   $0x0,0x1e(%rsp)
  lea    0x1(%r14),%rbx
  je     L177
  call   <isspace@plt>
  test   %rax,%rax
  je     L177
  movb   $0x20,(%r14)
  mov    %rbx,%r14
  jmp    L589
  nop
L143:
  mov    %rdi,%r14
  jmp    L589
  nopl   0x0(%rax,%rax,1)
L466:
  cmpb   $0x2a,0x18(%rsp)
  je     L458
L594:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L77
  mov    (%rsp),%rax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L177:
  mov    %rbx,%r14
  jmp    L589
L410:
  cmp    $0x2a,%r12b
  ja     L537
  cmpb   $0x0,0x1f(%rsp)
  je     L537
L218:
  mov    0x10(%rsp),%rbx
  lea    0x1(%r14),%r13
  xor    %ebp,%ebp
  mov    (%rbx),%rdi
  test   %rdi,%rdi
  jne    L97
  jmp    L342
  nopl   0x0(%rax)
L412:
  mov    0x10(%rbx),%rdi
  add    $0x10,%rbx
  add    $0x2,%rbp
  test   %rdi,%rdi
  je     L342
L97:
  call   <strlen@plt>
  mov    (%rbx),%rsi
  mov    %r13,%rdi
  mov    %eax,%edx
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L412
  add    $0x1,%rbp
  cmpq   $0x0,(%rbx)
  je     L342
  mov    0x10(%rsp),%rax
  lea    (%rax,%rbp,8),%rbx
  mov    (%rbx),%rdi
  call   <strlen@plt>
  mov    %r14,%rdi
  mov    $0x3b,%esi
  movslq %eax,%r13
  call   <strchr@plt>
  lea    -0x1(%r13),%rdx
  mov    %rax,0x20(%rsp)
  mov    %rax,%rdi
  sub    %r14,%rax
  cmp    %rax,%rdx
  jg     L23
L513:
  call   <strlen@plt>
  lea    (%r14,%r13,1),%rdi
  mov    %eax,%edx
  mov    0x20(%rsp),%rax
  lea    0x1(%rax),%rsi
  call   <memmove@plt>
  mov    (%rbx),%rsi
  mov    %r13,%rdx
  mov    %r14,%rdi
  call   <strncpy@plt>
  jmp    L589
L329:
  lea    0x3(%r14),%rdi
  mov    $0x10,%edx
  call   <strtol@plt>
  mov    %rax,%rsi
  jmp    L29
L342:
  mov    %r13,%r14
  jmp    L589
L458:
  mov    (%rsp),%rbx
  cmpb   $0x0,(%rbx)
  je     L463
  lea    D17(%rip),%r12
  nopl   (%rax)
L142:
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <strspn@plt>
  test   %rax,%rax
  je     L40
  jmp    L79
  nopw   0x0(%rax,%rax,1)
L461:
  add    $0x1,%rbx
L40:
  testb  $0xdf,(%rbx)
  jne    L461
  mov    %rbx,%rax
  add    $0x1,%rbx
  cmpb   $0x0,0x1(%rax)
  jne    L142
L390:
  cmp    %rax,(%rsp)
  ja     L594
  cmpb   $0x20,-0x1(%rbx)
  jne    L594
  movb   $0x0,-0x1(%rbx)
  jmp    L594
  nopl   0x0(%rax,%rax,1)
L79:
  lea    (%rbx,%rax,1),%rbp
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  lea    0x1(%rax),%edx
  call   <memmove@plt>
  jmp    L40
L548:
  mov    %rsi,%rax
  nop
L562:
  mov    %rax,%rdx
  mov    %rbx,%rcx
  add    $0x1,%rbx
  shr    $0x3f,%rdx
  add    %rdx,%rax
  sar    %rax
  jne    L562
  sub    $0x1,%rcx
  mov    %rsi,%rbx
  movabs $0x6666666666666667,%rdx
  mov    %rcx,%rax
  sar    $0x3f,%rcx
  imul   %rdx
  mov    %rdx,%rax
  mov    $0xff,%edx
  sar    %rax
  sub    %rcx,%rax
  mov    $0x7,%ecx
  sub    %eax,%ecx
  shl    %cl,%edx
  lea    (%rax,%rax,2),%ecx
  add    %ecx,%ecx
  sar    %cl,%rbx
  or     %ebx,%edx
  mov    %dl,(%r14)
  test   %rax,%rax
  je     L247
  lea    -0x3(%rax,%rax,2),%ecx
  lea    0x1(%r14,%rax,1),%r14
  add    %ecx,%ecx
  nopl   0x0(%rax)
L459:
  mov    %rsi,%rax
  add    $0x1,%rdi
  sar    %cl,%rax
  sub    $0x6,%ecx
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %al,-0x1(%rdi)
  cmp    %r14,%rdi
  jne    L459
  jmp    L179
L23:
  sub    (%rsp),%r14
  call   <strlen@plt>
  lea    0x0(%r13,%r14,1),%rbp
  mov    0x8(%rsp),%rcx
  movslq %eax,%rsi
  add    %rbp,%rsi
  cmp    %rcx,(%rsp)
  je     L27
  mov    (%rsp),%rdi
  call   <realloc@plt>
  mov    %rax,(%rsp)
L545:
  add    (%rsp),%r14
  mov    $0x3b,%esi
  mov    %r14,%rdi
  call   <strchr@plt>
  mov    %rax,0x20(%rsp)
  mov    %rax,%rdi
  jmp    L513
L27:
  mov    %rsi,%rdi
  call   <malloc@plt>
  mov    (%rsp),%rsi
  mov    %eax,%edi
  call   <strcpy@plt>
  mov    %rax,(%rsp)
  jmp    L545
L463:
  lea    -0x1(%rbx),%rax
  jmp    L390
L247:
  mov    %rdi,%r14
  jmp    L179
L77:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D1
datatype: string
name: read_data
arguments: tag: D17
datatype: string

tool: D1: &#

tool: D17:  

assistant: ```c
char *ezxml_decode(char *s, char **ent, char t) {
  char *e, *r = s, *m = s;
  long b, c, d, l;
  for (; *s; s++) {
    while (*s == '\r') {
      *(s++) = '\n';
      if (*s == '\n')
        memmove(s, (s + 1), strlen(s));
    }
  }
  for (s = r;;) {
    while (*s && *s != '&' && (*s != '%' || t != '%') && !isspace((unsigned char)*s))
      s++;
    if (!*s)
      break;
    else if (t != 'c' && !strncmp(s, "&#", 2)) {
      if (s[2] == 'x')
        c = strtol(s + 3, &e, 16);
      else
        c = strtol(s + 2, &e, 10);
      if (!c || *e != ';') {
        s++;
        continue;
      }
      if (c < 0x80)
        *(s++) = (char)c;
      else {
        for (b = 0, d = c; d; d /= 2)
          b++;
        b = (b - 2) / 5;
        *(s++) = (char)((0xFF << (7 - b)) | (c >> (6 * b)));
        while (b)
          *(s++) = 0x80 | ((c >> (6 * --b)) & 0x3F);
      }
      memmove(s, strchr(s, ';') + 1, strlen(strchr(s, ';')));
    } else if ((*s == '&' && (t == '&' || t == ' ' || t == '*')) || (*s == '%' && t == '%')) {
      for (b = 0; ent[b] && strncmp(s + 1, ent[b], strlen(ent[b])); b += 2)
        ;
      if (ent[b++]) {
        if ((c = strlen(ent[b])) - 1 > (e = strchr(s, ';')) - s) {
          l = (d = (s - r)) + c + strlen(e);
          r = (r == m) ? strcpy(malloc(l), r) : realloc(r, l);
          e = strchr((s = r + d), ';');
        }
        memmove(s + c, e + 1, strlen(e));
        strncpy(s, ent[b], c);
      } else
        s++;
    } else if ((t == ' ' || t == '*') && isspace((unsigned char)*s))
      *(s++) = ' ';
    else
      s++;
  }
  if (t == '*') {
    for (s = r; *s; s++) {
      if ((l = strspn(s, " ")))
        memmove(s, s + l, strlen(s + l) + 1);
      while (*s && *s != ' ')
        s++;
    }
    if (--s >= r && *s == ' ')
      *s = '\0';
  }
  return r;
}
```