user: What is the c source code of the assembly code below?

```asm
<xml_parse_doc>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  mov    %r8,%r14
  push   %r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  movslq %esi,%rbx
  lea    0x1(%rbx),%edi
  sub    $0x28,%rsp
  call   <xml_malloc@plt>
  mov    %ebx,%edx
  mov    %r15,%rsi
  mov    %rax,%r13
  mov    %rax,%rdi
  call   <memcpy@plt>
  movb   $0x0,0x0(%r13,%rbx,1)
  test   %rbp,%rbp
  je     L99
  test   %r14,%r14
  jne    L14
  test   %rbp,%rbp
  je     L99
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %r12,%rdi
  mov    %eax,%ebx
  call   <strlen@plt>
  lea    0x4(%rbx,%rax,1),%edi
  call   <xml_malloc@plt>
  mov    %r12,%rcx
  mov    %rbp,%rdx
  lea    D34(%rip),%rsi
  mov    %rax,%rdi
  mov    %rax,%r15
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %r12,%rdi
  mov    %eax,%ebx
  call   <strlen@plt>
  lea    0x5(%rbx,%rax,1),%edi
  call   <xml_malloc@plt>
  mov    %r12,%rcx
  mov    %rbp,%rdx
  lea    D86(%rip),%rsi
  mov    %rax,0x8(%rsp)
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
L2:
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %r12,%rdi
  mov    %eax,%ebx
  call   <strlen@plt>
  lea    0x5(%rbx,%rax,1),%edi
  call   <xml_malloc@plt>
  mov    %r12,%rcx
  mov    %rbp,%rdx
  lea    D15(%rip),%rsi
  mov    %rax,%rbx
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
L25:
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  mov    %rax,0x10(%rsp)
  je     L55
  mov    %r15,%rdi
  call   <strlen@plt>
  mov    0x10(%rsp),%r8
  mov    %rbx,%rsi
  cltq
  add    %rax,%r8
  mov    %r8,%rdi
  mov    %r8,0x10(%rsp)
  call   <strstr@plt>
  mov    0x10(%rsp),%r8
  test   %rax,%rax
  je     L28
  mov    %r12,%rsi
  mov    %r14,%rdx
  mov    %rbp,%rdi
  mov    %r8,0x10(%rsp)
  mov    %rax,0x18(%rsp)
  call   <xml_new_element@plt>
  mov    0x18(%rsp),%rcx
  mov    0x10(%rsp),%r8
  mov    %rax,%rdx
  mov    %rax,%r12
  mov    %ecx,%esi
  mov    %r8,%rdi
  sub    %r8d,%esi
  call   <_xml_parse_doc@plt>
L109:
  mov    %r15,%rdi
  call   <xml_free@plt>
  mov    %rbx,%rdi
  call   <xml_free@plt>
  mov    0x8(%rsp),%rdi
  call   <xml_free@plt>
  mov    %r13,%rdi
  call   <xml_free@plt>
  add    $0x28,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L14:
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %r12,%rdi
  mov    %eax,%ebx
  call   <strlen@plt>
  mov    %r14,%rdi
  lea    (%rax,%rbx,2),%ebx
  call   <strlen@plt>
  lea    0xe(%rbx,%rax,1),%edi
  call   <xml_malloc@plt>
  mov    %r14,%r9
  mov    %rbp,%r8
  mov    %r12,%rcx
  mov    %rbp,%rdx
  lea    D46(%rip),%rsi
  mov    %rax,%rdi
  mov    %rax,%r15
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %r12,%rdi
  mov    %eax,%ebx
  call   <strlen@plt>
  mov    %r14,%rdi
  lea    (%rax,%rbx,2),%ebx
  call   <strlen@plt>
  lea    0xf(%rbx,%rax,1),%edi
  call   <xml_malloc@plt>
  mov    %r14,%r9
  mov    %rbp,%r8
  mov    %r12,%rcx
  mov    %rax,0x8(%rsp)
  mov    %rax,%rdi
  xor    %eax,%eax
  mov    %rbp,%rdx
  lea    D24(%rip),%rsi
  call   <sprintf@plt>
  jmp    L2
  nopl   0x0(%rax,%rax,1)
L55:
  mov    0x8(%rsp),%rsi
  mov    %r13,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L28
  mov    %r12,%rsi
  mov    %r14,%rdx
  mov    %rbp,%rdi
  call   <xml_new_element@plt>
  mov    %rax,%r12
  jmp    L109
  nopl   0x0(%rax)
L99:
  mov    %r12,%rdi
  test   %r14,%r14
  je     L49
  call   <strlen@plt>
  mov    %r14,%rdi
  mov    %eax,%ebx
  call   <strlen@plt>
  lea    0xc(%rbx,%rax,1),%edi
  call   <xml_malloc@plt>
  mov    %r14,%rcx
  mov    %r12,%rdx
  lea    D25(%rip),%rsi
  mov    %rax,%rdi
  mov    %rax,%r15
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %r14,%rdi
  mov    %eax,%ebx
  call   <strlen@plt>
  lea    0xd(%rbx,%rax,1),%edi
  call   <xml_malloc@plt>
  mov    %r14,%rcx
  mov    %r12,%rdx
  lea    D27(%rip),%rsi
  mov    %rax,0x8(%rsp)
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
L3:
  mov    %r12,%rdi
  call   <strlen@plt>
  lea    0x4(%rax),%edi
  call   <xml_malloc@plt>
  mov    %r12,%rdx
  lea    D8(%rip),%rsi
  mov    %rax,%rbx
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
  jmp    L25
  nopl   0x0(%rax)
L28:
  xor    %r12d,%r12d
  jmp    L109
  nopl   0x0(%rax,%rax,1)
L49:
  call   <strlen@plt>
  lea    0x3(%rax),%edi
  call   <xml_malloc@plt>
  mov    %r12,%rdx
  lea    D70(%rip),%rsi
  mov    %rax,%rdi
  mov    %rax,%r15
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  lea    0x4(%rax),%edi
  call   <xml_malloc@plt>
  mov    %r12,%rdx
  lea    D14(%rip),%rsi
  mov    %rax,0x8(%rsp)
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
  jmp    L3
```

tool_calls: name: disassemble_data
arguments: tag: D34
type_infered: string
name: disassemble_data
arguments: tag: D86
type_infered: string
name: disassemble_data
arguments: tag: D15
type_infered: string
name: disassemble_data
arguments: tag: D46
type_infered: string
name: disassemble_data
arguments: tag: D24
type_infered: string
name: disassemble_data
arguments: tag: D25
type_infered: string
name: disassemble_data
arguments: tag: D27
type_infered: string
name: disassemble_data
arguments: tag: D8
type_infered: string
name: disassemble_data
arguments: tag: D70
type_infered: string
name: disassemble_data
arguments: tag: D14
type_infered: string

tool: D34: <%s:%s>

tool: D86: <%s:%s/>

tool: D15: </%s:%s>

tool: D46: <%s:%s xmlns:%s="%s">

tool: D24: <%s:%s xmlns:%s="%s"/>

tool: D25: <%s xmlns="%s">

tool: D27: <%s xmlns="%s"/>

tool: D8: </%s>

tool: D70: <%s>

tool: D14: <%s/>

assistant: ```c
struct xml_node *xml_parse_doc(char *doc_buf, int doc_len, char *doc_prefix, char *doc_name, char *doc_uri) {
  struct xml_node *root = NULL;
  char *xml_buf, *start_tag, *end_tag, *empty_tag, *front, *rear;
  xml_buf = (char *)xml_malloc(doc_len + 1);
  memcpy(xml_buf, doc_buf, doc_len);
  xml_buf[doc_len] = '\0';
  if (doc_prefix && doc_uri) {
    start_tag = (char *)xml_malloc(2 * strlen(doc_prefix) + strlen(doc_name) + strlen(doc_uri) + 14);
    sprintf(start_tag, "<%s:%s xmlns:%s=\"%s\">", doc_prefix, doc_name, doc_prefix, doc_uri);
    empty_tag = (char *)xml_malloc(2 * strlen(doc_prefix) + strlen(doc_name) + strlen(doc_uri) + 15);
    sprintf(empty_tag, "<%s:%s xmlns:%s=\"%s\"/>", doc_prefix, doc_name, doc_prefix, doc_uri);
  } else if (doc_prefix) {
    start_tag = (char *)xml_malloc(strlen(doc_prefix) + strlen(doc_name) + 4);
    sprintf(start_tag, "<%s:%s>", doc_prefix, doc_name);
    empty_tag = (char *)xml_malloc(strlen(doc_prefix) + strlen(doc_name) + 5);
    sprintf(empty_tag, "<%s:%s/>", doc_prefix, doc_name);
  } else if (doc_uri) {
    start_tag = (char *)xml_malloc(strlen(doc_name) + strlen(doc_uri) + 12);
    sprintf(start_tag, "<%s xmlns=\"%s\">", doc_name, doc_uri);
    empty_tag = (char *)xml_malloc(strlen(doc_name) + strlen(doc_uri) + 13);
    sprintf(empty_tag, "<%s xmlns=\"%s\"/>", doc_name, doc_uri);
  } else {
    start_tag = (char *)xml_malloc(strlen(doc_name) + 3);
    sprintf(start_tag, "<%s>", doc_name);
    empty_tag = (char *)xml_malloc(strlen(doc_name) + 4);
    sprintf(empty_tag, "<%s/>", doc_name);
  }
  if (doc_prefix) {
    end_tag = (char *)xml_malloc(strlen(doc_prefix) + strlen(doc_name) + 5);
    sprintf(end_tag, "</%s:%s>", doc_prefix, doc_name);
  } else {
    end_tag = (char *)xml_malloc(strlen(doc_name) + 4);
    sprintf(end_tag, "</%s>", doc_name);
  }
  if ((front = strstr(xml_buf, start_tag)) != NULL) {
    front += strlen(start_tag);
    if ((rear = strstr(front, end_tag)) != NULL) {
      int xml_len = rear - front;
      root = xml_new_element(doc_prefix, doc_name, doc_uri);
      _xml_parse_doc(front, xml_len, root);
    }
  } else if ((front = strstr(xml_buf, empty_tag)) != NULL) {
    root = xml_new_element(doc_prefix, doc_name, doc_uri);
  }
  xml_free(start_tag);
  xml_free(end_tag);
  xml_free(empty_tag);
  xml_free(xml_buf);
  return root;
}
```