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

```asm
<ezxml_decode>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,%r15
  mov    %rsi,0x10(%rsp)
  mov    %edx,0x1c(%rsp)
  mov    %edx,%r12d
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  mov    %rdi,%rbx
  cmpb   $0x0,(%rdi)
  jne    L397
L535:
  mov    %r15,0x8(%rsp)
  mov    %r15,%rbx
  movabs $0x44100000000,%rax
  mov    %r12d,%ecx
  shr    %cl,%rax
  and    $0x1,%eax
  mov    %rax,0x20(%rsp)
  jmp    L455
L615:
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  lea    0x1(%rbx),%rsi
  mov    %rbx,%rdi
  call   <memmove@plt>
L410:
  cmpb   $0xd,(%rbx)
  jne    L58
L531:
  add    $0x1,%rbx
  movb   $0xa,-0x1(%rbx)
  cmpb   $0xa,(%rbx)
  jne    L410
  jmp    L615
L58:
  lea    0x1(%rbx),%rax
  cmpb   $0x0,0x1(%rbx)
  je     L535
  mov    %rax,%rbx
L397:
  cmpb   $0xd,(%rbx)
  je     L531
  jmp    L58
L348:
  movzbl (%rbx),%edi
  test   %dil,%dil
  je     L103
  cmp    $0x63,%r12b
  jne    L229
L434:
  cmp    $0x20,%r12b
  je     L183
  cmp    $0x2a,%r12b
  je     L183
L39:
  add    $0x1,%rbx
L455:
  movzbl (%rbx),%edi
  test   %dil,%dil
  je     L348
  cmp    $0x26,%dil
  je     L348
  cmp    $0x25,%r12b
  jne    L209
  cmp    $0x25,%dil
  je     L229
L209:
  movsbl %dil,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L348
  add    $0x1,%rbx
  jmp    L455
L229:
  mov    $0x2,%edx
  lea    D0(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  jne    L570
  cmpb   $0x78,0x2(%rbx)
  je     L245
  lea    0x30(%rsp),%rsi
  lea    0x2(%rbx),%rdi
  mov    $0xa,%edx
  call   <strtol@plt>
  mov    %rax,%rsi
L579:
  test   %rsi,%rsi
  je     L470
  mov    0x30(%rsp),%rax
  cmpb   $0x3b,(%rax)
  jne    L470
  cmp    $0x7f,%rsi
  jg     L243
  mov    %sil,(%rbx)
  lea    0x1(%rbx),%rbx
L188:
  mov    $0x3b,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%ebp
  mov    $0x3b,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  lea    0x1(%rax),%rsi
  mov    %ebp,%edx
  mov    %rbx,%rdi
  call   <memmove@plt>
  jmp    L455
L245:
  lea    0x30(%rsp),%rsi
  lea    0x3(%rbx),%rdi
  mov    $0x10,%edx
  call   <strtol@plt>
  mov    %rax,%rsi
  jmp    L579
L470:
  add    $0x1,%rbx
  jmp    L455
L243:
  mov    %rsi,%rdx
L369:
  mov    %rbp,%rcx
  add    $0x1,%rbp
  mov    %rdx,%rax
  shr    $0x3f,%rax
  add    %rdx,%rax
  sar    %rax
  mov    %rax,%rdx
  jne    L369
  sub    $0x1,%rcx
  movabs $0x6666666666666667,%rdx
  mov    %rcx,%rax
  imul   %rdx
  sar    %rdx
  sar    $0x3f,%rcx
  sub    %rcx,%rdx
  mov    %rdx,%rdi
  lea    0x1(%rbx),%r9
  mov    $0x7,%ecx
  sub    %edx,%ecx
  mov    $0xff,%eax
  shl    %cl,%eax
  lea    (%rdx,%rdx,2),%ecx
  add    %ecx,%ecx
  mov    %rsi,%rdx
  sar    %cl,%rdx
  or     %edx,%eax
  mov    %al,(%rbx)
  test   %rdi,%rdi
  je     L191
  lea    -0x3(%rdi,%rdi,2),%ecx
  add    %ecx,%ecx
  lea    0x1(%rbx,%rdi,1),%r8
  mov    %r9,%rdx
L337:
  add    $0x1,%rdx
  mov    %rsi,%rax
  sar    %cl,%rax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %al,-0x1(%rdx)
  sub    $0x6,%ecx
  cmp    %rdx,%r8
  jne    L337
  lea    (%r9,%rdi,1),%rbx
  jmp    L188
L191:
  mov    %r9,%rbx
  jmp    L188
L570:
  movzbl (%rbx),%edi
  cmp    $0x26,%dil
  je     L172
  cmp    $0x25,%r12b
  jne    L434
  cmp    $0x25,%dil
  jne    L434
L55:
  mov    0x10(%rsp),%rbp
  mov    0x0(%rbp),%rdi
  mov    $0x0,%r13d
  lea    0x1(%rbx),%r14
  test   %rdi,%rdi
  je     L411
L190:
  call   <strlen@plt>
  mov    %eax,%edx
  mov    0x0(%rbp),%rsi
  mov    %r14,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L519
  add    $0x2,%r13
  add    $0x10,%rbp
  mov    0x0(%rbp),%rdi
  test   %rdi,%rdi
  jne    L190
L411:
  add    $0x1,%rbx
  jmp    L455
L172:
  cmp    $0x2a,%r12b
  ja     L434
  cmpq   $0x0,0x20(%rsp)
  je     L434
  jmp    L55
L519:
  add    $0x1,%r13
  cmpq   $0x0,0x0(%rbp)
  je     L411
  mov    0x10(%rsp),%rax
  lea    (%rax,%r13,8),%rbp
  mov    0x0(%rbp),%rdi
  call   <strlen@plt>
  mov    %eax,%r14d
  movslq %eax,%r13
  mov    $0x3b,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  mov    %rax,%rdi
  mov    %rax,0x30(%rsp)
  lea    -0x1(%r13),%rdx
  sub    %rbx,%rax
  cmp    %rax,%rdx
  jg     L41
L136:
  mov    0x30(%rsp),%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    0x30(%rsp),%rax
  lea    0x1(%rax),%rsi
  movslq %r14d,%rdi
  add    %rbx,%rdi
  call   <memmove@plt>
  mov    %r13,%rdx
  mov    0x0(%rbp),%rsi
  mov    %rbx,%rdi
  call   <strncpy@plt>
  jmp    L455
L41:
  sub    0x8(%rsp),%rbx
  lea    0x0(%r13,%rbx,1),%rcx
  mov    %rcx,0x28(%rsp)
  call   <strlen@plt>
  movslq %eax,%rsi
  add    0x28(%rsp),%rsi
  cmp    %r15,0x8(%rsp)
  je     L591
  mov    0x8(%rsp),%rdi
  call   <realloc@plt>
  mov    %rax,0x8(%rsp)
L174:
  add    0x8(%rsp),%rbx
  mov    $0x3b,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  mov    %rax,0x30(%rsp)
  jmp    L136
L591:
  mov    %rsi,%rdi
  call   <malloc@plt>
  mov    %eax,%edi
  mov    0x8(%rsp),%rsi
  call   <strcpy@plt>
  mov    %rax,0x8(%rsp)
  jmp    L174
L183:
  movsbl %dil,%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L39
  movb   $0x20,(%rbx)
  lea    0x1(%rbx),%rbx
  jmp    L455
L103:
  cmpb   $0x2a,0x1c(%rsp)
  je     L488
L351:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L212
  mov    0x8(%rsp),%rax
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L488:
  mov    0x8(%rsp),%rbx
  cmpb   $0x0,(%rbx)
  je     L107
  lea    D10(%rip),%r12
  jmp    L296
L165:
  testb  $0xdf,(%rbx)
  je     L185
L422:
  add    $0x1,%rbx
  testb  $0xdf,(%rbx)
  jne    L422
  mov    %rbx,%rax
L473:
  lea    0x1(%rax),%rbx
  cmpb   $0x0,0x1(%rax)
  je     L560
L296:
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <strspn@plt>
  test   %rax,%rax
  je     L165
  lea    (%rbx,%rax,1),%rbp
  mov    %rbp,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <memmove@plt>
  jmp    L165
L185:
  mov    %rbx,%rax
  jmp    L473
L107:
  mov    0x8(%rsp),%rbx
L560:
  lea    -0x1(%rbx),%rax
  cmp    %rax,0x8(%rsp)
  ja     L351
  cmpb   $0x20,-0x1(%rbx)
  jne    L351
  movb   $0x0,-0x1(%rbx)
  jmp    L351
L212:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D0
data_type: string
name: parse_data
arguments: data_tag: D10
data_type: string

tool: D0: &#

tool: D10:  

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(*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++) = c;
      else {
        for (b = 0, d = c; d; d /= 2)
          b++;
        b = (b - 2) / 5;
        *(s++) = (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(*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;
}
```