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

```asm
<xmlq>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xc58,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xc48(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L153
  mov    %rdi,%rbp
  mov    %esi,%r14d
  mov    %rdx,%rbx
  mov    %rcx,%r13
  test   %rdx,%rdx
  je     L153
  test   %rcx,%rcx
  je     L51
  test   %r8d,%r8d
  je     L51
  movb   $0x0,(%rcx)
  mov    %rdx,%rdi
  call   <strlen@plt>
  cmp    $0x3ff,%eax
  jle    L218
  mov    $0x0,%eax
  jmp    L272
L171:
  add    $0x1,%rbp
L218:
  movsbl 0x0(%rbp),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L171
  cmpb   $0x3c,0x0(%rbp)
  jne    L272
  lea    0x10(%rsp),%rdi
  mov    %rbx,%rcx
  lea    D21(%rip),%rdx
  mov    $0x40a,%esi
  call   <snprintf@plt>
  lea    0x420(%rsp),%rdi
  mov    %rbx,%rcx
  lea    D9(%rip),%rdx
  mov    $0x40a,%esi
  call   <snprintf@plt>
  lea    0x830(%rsp),%rdi
  mov    %rbx,%rcx
  lea    D23(%rip),%rdx
  mov    $0x40a,%esi
  call   <snprintf@plt>
  test   %r14d,%r14d
  js     L149
  mov    $0x0,%r12d
  lea    0x10(%rsp),%r15
  jmp    L252
L50:
  lea    0x420(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L272
  cmpb   $0x3e,(%rax)
  je     L57
L25:
  add    $0x1,%rax
  cmpb   $0x3e,(%rax)
  jne    L25
L57:
  lea    0x1(%rax),%rbx
L271:
  lea    0x1(%rbx),%rbp
  add    $0x1,%r12d
  cmp    %r12d,%r14d
  jl     L68
L252:
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <strstr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L50
  mov    %r15,%rdi
  call   <strlen@plt>
  cltq
  add    %rax,%rbx
  jmp    L271
L149:
  mov    $0x0,%ebx
L68:
  lea    0x830(%rsp),%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L56
L237:
  movsbl (%rbx),%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L200
  add    $0x1,%rbx
  jmp    L237
L56:
  mov    0x8(%rsp),%r14
  mov    %r14,%rdi
  call   <strlen@plt>
  cltq
  add    %rax,%r14
  mov    %r14,%rbp
  jmp    L237
L200:
  cmp    %rbp,%rbx
  je     L266
  mov    %rbp,%rax
  sub    %rbx,%rax
  mov    $0x0,%edx
L103:
  movzbl (%rbx,%rdx,1),%ecx
  mov    %cl,0x0(%r13,%rdx,1)
  add    $0x1,%rdx
  cmp    %rax,%rdx
  jne    L103
  lea    0x0(%r13,%rax,1),%rbx
  cmp    %rbx,%r13
  je     L110
L74:
  movsbl -0x1(%rbx),%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L110
  sub    $0x1,%rbx
  cmp    %rbx,%r13
  jne    L74
L110:
  movb   $0x0,(%rbx)
  mov    %r13,%rax
  jmp    L272
L266:
  mov    %r13,%rbx
  jmp    L110
L153:
  mov    $0x0,%eax
  jmp    L272
L51:
  mov    $0x0,%eax
L272:
  mov    0xc48(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L114
  add    $0xc58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L114:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D21
datatype: string
name: parse_data
arguments: data_label: D9
datatype: string
name: parse_data
arguments: data_label: D23
datatype: string

tool: D21: <%s>

tool: D9: <%s 

tool: D23: </%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;
}
```