user: Translate the below assembly code into C programming language:

```asm
<ezxml_decode>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %edx,%eax
  mov    %al,-0x64(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  jmp    L68
L241:
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movb   $0xa,(%rax)
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L16
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    -0x58(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memmove@plt>
L16:
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xd,%al
  je     L241
  addq   $0x1,-0x58(%rbp)
L68:
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L16
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x58(%rbp)
  jmp    L154
L116:
  addq   $0x1,-0x58(%rbp)
L154:
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L488
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x26,%al
  je     L488
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x25,%al
  jne    L288
  cmpb   $0x25,-0x64(%rbp)
  je     L488
L288:
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L116
L488:
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L72
  cmpb   $0x63,-0x64(%rbp)
  je     L64
  mov    -0x58(%rbp),%rax
  mov    $0x2,%edx
  lea    D5(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L64
  mov    -0x58(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0x78,%al
  jne    L355
  mov    -0x58(%rbp),%rax
  lea    0x3(%rax),%rcx
  lea    -0x50(%rbp),%rax
  mov    $0x10,%edx
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <strtol@plt>
  mov    %rax,-0x38(%rbp)
  jmp    L123
L355:
  mov    -0x58(%rbp),%rax
  lea    0x2(%rax),%rcx
  lea    -0x50(%rbp),%rax
  mov    $0xa,%edx
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <strtol@plt>
  mov    %rax,-0x38(%rbp)
L123:
  cmpq   $0x0,-0x38(%rbp)
  je     L176
  mov    -0x50(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3b,%al
  je     L231
L176:
  addq   $0x1,-0x58(%rbp)
  jmp    L502
L231:
  cmpq   $0x7f,-0x38(%rbp)
  jg     L147
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  mov    -0x38(%rbp),%rdx
  mov    %dl,(%rax)
  jmp    L414
L147:
  movq   $0x0,-0x40(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  jmp    L514
L337:
  addq   $0x1,-0x40(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdx
  shr    $0x3f,%rdx
  add    %rdx,%rax
  sar    %rax
  mov    %rax,-0x30(%rbp)
L514:
  cmpq   $0x0,-0x30(%rbp)
  jne    L337
  mov    -0x40(%rbp),%rax
  lea    -0x2(%rax),%rcx
  movabs $0x6666666666666667,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    %rax
  sar    $0x3f,%rcx
  mov    %rcx,%rdx
  sub    %rdx,%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %eax,%edx
  mov    $0x7,%eax
  sub    %edx,%eax
  mov    $0xff,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,%esi
  mov    -0x40(%rbp),%rax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,%ecx
  sar    %cl,%rax
  mov    %eax,%ecx
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  or     %ecx,%esi
  mov    %esi,%edx
  mov    %dl,(%rax)
  jmp    L467
L504:
  subq   $0x1,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,%ecx
  sar    %cl,%rax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  or     $0xffffff80,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
L467:
  cmpq   $0x0,-0x40(%rbp)
  jne    L504
L414:
  mov    -0x58(%rbp),%rax
  mov    $0x3b,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  mov    -0x58(%rbp),%rax
  mov    $0x3b,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  lea    0x1(%rax),%rcx
  mov    -0x58(%rbp),%rax
  mov    %ebx,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memmove@plt>
  jmp    L502
L64:
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x26,%al
  jne    L534
  cmpb   $0x26,-0x64(%rbp)
  je     L44
  cmpb   $0x20,-0x64(%rbp)
  je     L44
  cmpb   $0x2a,-0x64(%rbp)
  je     L44
L534:
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x25,%al
  jne    L347
  cmpb   $0x25,-0x64(%rbp)
  jne    L347
L44:
  movq   $0x0,-0x40(%rbp)
  jmp    L503
L3:
  addq   $0x2,-0x40(%rbp)
L503:
  mov    -0x40(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L485
  mov    -0x40(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x60(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    -0x58(%rbp),%rcx
  add    $0x1,%rcx
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L3
L485:
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L275
  mov    -0x40(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cltq
  mov    %rax,-0x38(%rbp)
  mov    -0x38(%rbp),%rax
  lea    -0x1(%rax),%rbx
  mov    -0x58(%rbp),%rax
  mov    $0x3b,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x50(%rbp)
  mov    -0x50(%rbp),%rax
  sub    -0x58(%rbp),%rax
  cmp    %rax,%rbx
  jle    L542
  mov    -0x58(%rbp),%rax
  sub    -0x48(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x30(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rbx
  mov    -0x50(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cltq
  add    %rbx,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x48(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  jne    L238
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %eax,%edx
  mov    -0x48(%rbp),%rax
  mov    %rax,%rsi
  mov    %edx,%edi
  call   <strcpy@plt>
  jmp    L411
L238:
  mov    -0x20(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <realloc@plt>
L411:
  mov    %rax,-0x48(%rbp)
  mov    -0x30(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x58(%rbp)
  mov    -0x58(%rbp),%rax
  mov    $0x3b,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x50(%rbp)
L542:
  mov    -0x50(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    -0x50(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    -0x38(%rbp),%rsi
  mov    -0x58(%rbp),%rax
  add    %rsi,%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memmove@plt>
  mov    -0x40(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rcx
  mov    -0x38(%rbp),%rdx
  mov    -0x58(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  jmp    L502
L275:
  addq   $0x1,-0x58(%rbp)
  jmp    L502
L347:
  cmpb   $0x20,-0x64(%rbp)
  je     L174
  cmpb   $0x2a,-0x64(%rbp)
  jne    L282
L174:
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L282
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movb   $0x20,(%rax)
  jmp    L502
L282:
  addq   $0x1,-0x58(%rbp)
L502:
  jmp    L154
L72:
  nop
  cmpb   $0x2a,-0x64(%rbp)
  jne    L285
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x58(%rbp)
  jmp    L361
L167:
  mov    -0x58(%rbp),%rax
  lea    D4(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strspn@plt>
  mov    %rax,-0x20(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  je     L509
  mov    -0x20(%rbp),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%edx
  mov    -0x20(%rbp),%rcx
  mov    -0x58(%rbp),%rax
  add    %rax,%rcx
  mov    -0x58(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memmove@plt>
  jmp    L509
L274:
  addq   $0x1,-0x58(%rbp)
L509:
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L311
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  jne    L274
L311:
  addq   $0x1,-0x58(%rbp)
L361:
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L167
  subq   $0x1,-0x58(%rbp)
  mov    -0x58(%rbp),%rax
  cmp    -0x48(%rbp),%rax
  jb     L285
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  jne    L285
  mov    -0x58(%rbp),%rax
  movb   $0x0,(%rax)
L285:
  mov    -0x48(%rbp),%rax
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L5
  call   <__stack_chk_fail@plt>
L5:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D5
datatype: string
name: parse_data
arguments: label: D4
datatype: string

tool: D5: &#

tool: D4:  

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;
}
```