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

```asm
<xmlq>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xc90,%rsp
  mov    %rdi,-0xc78(%rbp)
  mov    %esi,-0xc7c(%rbp)
  mov    %rdx,-0xc88(%rbp)
  mov    %rcx,-0xc90(%rbp)
  mov    %r8d,-0xc80(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0xc78(%rbp),%rax
  mov    %rax,-0xc48(%rbp)
  cmpq   $0x0,-0xc78(%rbp)
  je     L35
  cmpq   $0x0,-0xc88(%rbp)
  je     L35
  cmpq   $0x0,-0xc90(%rbp)
  je     L35
  cmpl   $0x0,-0xc80(%rbp)
  jne    L142
L35:
  mov    $0x0,%eax
  jmp    L19
L142:
  mov    -0xc90(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0xc88(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    $0x3ff,%eax
  jle    L61
  mov    $0x0,%eax
  jmp    L19
L61:
  mov    -0xc90(%rbp),%rax
  mov    %rax,-0xc60(%rbp)
  movl   $0x0,-0xc64(%rbp)
  jmp    L187
L117:
  addq   $0x1,-0xc78(%rbp)
L187:
  mov    -0xc78(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L117
  mov    -0xc78(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3c,%al
  je     L157
  mov    $0x0,%eax
  jmp    L19
L157:
  mov    -0xc88(%rbp),%rdx
  lea    -0xc40(%rbp),%rax
  mov    %rdx,%rcx
  lea    D26(%rip),%rdx
  mov    $0x40a,%esi
  mov    %rax,%rdi
  call   <snprintf@plt>
  mov    -0xc88(%rbp),%rdx
  lea    -0x830(%rbp),%rax
  mov    %rdx,%rcx
  lea    D27(%rip),%rdx
  mov    $0x40a,%esi
  mov    %rax,%rdi
  call   <snprintf@plt>
  mov    -0xc88(%rbp),%rdx
  lea    -0x420(%rbp),%rax
  mov    %rdx,%rcx
  lea    D25(%rip),%rdx
  mov    $0x40a,%esi
  mov    %rax,%rdi
  call   <snprintf@plt>
  movq   $0x0,-0xc58(%rbp)
  jmp    L205
L247:
  lea    -0xc40(%rbp),%rdx
  mov    -0xc78(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0xc58(%rbp)
  cmpq   $0x0,-0xc58(%rbp)
  jne    L59
  lea    -0x830(%rbp),%rdx
  mov    -0xc78(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0xc58(%rbp)
  cmpq   $0x0,-0xc58(%rbp)
  jne    L2
  mov    $0x0,%eax
  jmp    L19
L13:
  addq   $0x1,-0xc58(%rbp)
L2:
  mov    -0xc58(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3e,%al
  jne    L13
  addq   $0x1,-0xc58(%rbp)
  jmp    L11
L59:
  lea    -0xc40(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cltq
  add    %rax,-0xc58(%rbp)
L11:
  mov    -0xc58(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0xc78(%rbp)
L205:
  mov    -0xc64(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc64(%rbp)
  cmp    %eax,-0xc7c(%rbp)
  jge    L247
  lea    -0x420(%rbp),%rdx
  mov    -0xc58(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0xc50(%rbp)
  cmpq   $0x0,-0xc50(%rbp)
  jne    L14
  mov    -0xc48(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  movslq %eax,%rdx
  mov    -0xc48(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0xc50(%rbp)
  jmp    L14
L43:
  addq   $0x1,-0xc58(%rbp)
L14:
  mov    -0xc58(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L43
  jmp    L248
L72:
  mov    -0xc58(%rbp),%rdx
  lea    0x1(%rdx),%rax
  mov    %rax,-0xc58(%rbp)
  mov    -0xc60(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0xc60(%rbp)
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
L248:
  mov    -0xc58(%rbp),%rax
  cmp    -0xc50(%rbp),%rax
  jne    L72
  jmp    L265
L28:
  subq   $0x1,-0xc60(%rbp)
L265:
  mov    -0xc60(%rbp),%rax
  cmp    -0xc90(%rbp),%rax
  je     L180
  mov    -0xc60(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L28
L180:
  mov    -0xc60(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0xc90(%rbp),%rax
L19:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L69
  call   <__stack_chk_fail@plt>
L69:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D26
datatype: string
name: parse_data
arguments: data_tag: D27
datatype: string
name: parse_data
arguments: data_tag: D25
datatype: string

tool: D26: <%s>

tool: D27: <%s 

tool: D25: </%s>

assistant: ```c
const char *xmlq(const char *s, int idx, const char *name, char *dstbuf, int dstlen) {
  const char *save_s = s;
  if (!s || !name || !dstbuf || !dstlen)
    return NULL;
  *dstbuf = 0;
  if (strlen(name) >= 1024)
    return NULL;
  char tmpbuf1[1024 + 10], tmpbuf2[1024 + 10], tmpbuf3[1024 + 10];
  char *dst = dstbuf;
  int i = 0;
  while (isspace(*s))
    s++;
  if (*s != '<')
    return NULL;
  snprintf(tmpbuf1, sizeof(tmpbuf1), "<%s>", name);
  snprintf(tmpbuf2, sizeof(tmpbuf2), "<%s ", name);
  snprintf(tmpbuf3, sizeof(tmpbuf3), "</%s>", name);
  const char *ptr = NULL, *ptr3;
  while (i++ <= idx) {
    ptr = strstr(s, tmpbuf1);
    if (!ptr) {
      ptr = strstr(s, tmpbuf2);
      if (!ptr)
        return NULL;
      while (*ptr != '>')
        ptr++;
      ptr++;
    } else
      ptr += strlen(tmpbuf1);
    s = ptr + 1;
  }
  ptr3 = strstr(ptr, tmpbuf3);
  if (!ptr3)
    ptr3 = save_s + strlen(save_s);
  while (isspace(*ptr))
    ptr++;
  while (ptr != ptr3)
    *dst++ = *ptr++;
  while ((dst != dstbuf) && isspace(dst[-1]))
    dst--;
  *dst = 0;
  return dstbuf;
}
```