// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: XML_ParserFree
void XMLCALL
XML_ParserFree(XML_Parser parser)
{
  TAG *tagList;
  OPEN_INTERNAL_ENTITY *entityList;
  if (parser == NULL)
    return;
  /* free tagStack and freeTagList */
  tagList = tagStack;
  for (;;) {
    TAG *p;
    if (tagList == NULL) {
      if (freeTagList == NULL)
        break;
      tagList = freeTagList;
      freeTagList = NULL;
    }
    p = tagList;
    tagList = tagList->parent;
    FREE(p->buf);
    destroyBindings(p->bindings, parser);
    FREE(p);
  }
  /* free openInternalEntities and freeInternalEntities */
  entityList = openInternalEntities;
  for (;;) {
    OPEN_INTERNAL_ENTITY *openEntity;
    if (entityList == NULL) {
      if (freeInternalEntities == NULL)
        break;
      entityList = freeInternalEntities;
      freeInternalEntities = NULL;
    }
    openEntity = entityList;
    entityList = entityList->next;
    FREE(openEntity);
  }

  destroyBindings(freeBindingList, parser);
  destroyBindings(inheritedBindings, parser);
  poolDestroy(&tempPool);
  poolDestroy(&temp2Pool);
#ifdef XML_DTD
  /* external parameter entity parsers share the DTD structure
     parser->m_dtd with the root parser, so we must not destroy it
  */
  if (!isParamEntity && _dtd)
#else
  if (_dtd)
#endif /* XML_DTD */
    dtdDestroy(_dtd, (XML_Bool)!parentParser, &parser->m_mem);
  FREE((void *)atts);
  FREE(groupConnector);
  FREE(buffer);
  FREE(dataBuf);
  FREE(nsAtts);
  FREE(unknownEncodingMem);
  if (unknownEncodingRelease)
    unknownEncodingRelease(unknownEncodingData);
  FREE(parser);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x24bf9a
movq %rdi, %r13
movq 0x2a0(%rdi), %r15
movq %r15, %rbx
testq %r15, %r15
jne 0x24bdb4
movq %r13, %rax
movq 0x2a8(%r13), %rbx
testq %rbx, %rbx
je 0x24bdec
movq $0x0, 0x2a8(%rax)
movq (%rbx), %r15
movq 0x40(%rbx), %rdi
movq %r13, %rbp
callq *0x28(%r13)
movq 0x50(%rbx), %r14
testq %r14, %r14
je 0x24bde4
movq 0x8(%r14), %r12
movq 0x20(%r14), %rdi
callq *0x28(%rbp)
movq %r14, %rdi
callq *0x28(%rbp)
movq %r12, %r14
testq %r12, %r12
jne 0x24bdcb
movq %rbx, %rdi
callq *0x28(%rbp)
jmp 0x24bd92
movq 0x228(%rax), %rdi
testq %rdi, %rdi
jne 0x24be12
movq %r13, %r15
movq 0x230(%r13), %rdi
testq %rdi, %rdi
je 0x24be1f
movq $0x0, 0x230(%r15)
movq 0x10(%rdi), %rbx
callq *0x28(%r13)
movq %rbx, %rdi
jmp 0x24bdf3
movq 0x2b8(%r15), %rbx
testq %rbx, %rbx
je 0x24be46
movq 0x8(%rbx), %r14
movq 0x20(%rbx), %rdi
callq *0x28(%r15)
movq %rbx, %rdi
callq *0x28(%r15)
movq %r14, %rbx
testq %r14, %r14
jne 0x24be2b
movq 0x2b0(%r15), %rbx
testq %rbx, %rbx
je 0x24be6d
movq 0x8(%rbx), %r14
movq 0x20(%rbx), %rdi
callq *0x28(%r15)
movq %rbx, %rdi
callq *0x28(%r15)
movq %r14, %rbx
testq %r14, %r14
jne 0x24be52
leaq 0x300(%r15), %rdi
callq 0x24ccf6
leaq 0x330(%r15), %rdi
callq 0x24ccf6
movq 0x290(%r15), %rbx
testq %rbx, %rbx
je 0x24bf32
movq 0x370(%r15), %rax
movq %rax, (%rsp)
leaq 0x28(%rbx), %r14
movq 0x28(%rbx), %r12
movq 0x38(%rbx), %r15
shlq $0x3, %r15
xorl %ebp, %ebp
cmpq %rbp, %r15
je 0x24bed4
movq (%r12,%rbp), %rax
testq %rax, %rax
je 0x24bece
cmpl $0x0, 0x1c(%rax)
je 0x24bece
movq 0x20(%rax), %rdi
callq *0x28(%r13)
addq $0x8, %rbp
jmp 0x24beb2
movq %rbx, %rdi
callq 0x252cb4
movq %r14, %rdi
callq 0x252cb4
leaq 0x50(%rbx), %rdi
callq 0x252cb4
leaq 0x78(%rbx), %rdi
callq 0x252cb4
leaq 0xa0(%rbx), %rdi
callq 0x24ccf6
leaq 0xd0(%rbx), %rdi
callq 0x24ccf6
cmpq $0x0, (%rsp)
jne 0x24bf2b
movq 0x138(%rbx), %rdi
callq *0x28(%r13)
movq 0x120(%rbx), %rdi
callq *0x28(%r13)
movq %rbx, %rdi
callq *0x28(%r13)
movq 0x2d0(%r13), %rdi
callq *0x28(%r13)
movq 0x360(%r13), %rdi
callq *0x28(%r13)
movq 0x10(%r13), %rdi
callq *0x28(%r13)
movq 0x58(%r13), %rdi
callq *0x28(%r13)
movq 0x2d8(%r13), %rdi
callq *0x28(%r13)
movq 0x1d0(%r13), %rdi
callq *0x28(%r13)
movq %r13, %rdi
movq 0x1e8(%r13), %rax
testq %rax, %rax
je 0x24bf89
movq 0x1d8(%r13), %rdi
callq *%rax
movq %r13, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x28(%rdi)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq