// File: /workspace/github_c_makefile_star2_O1/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 0x253967
movq 0x2a0(%rdi), %rbx
movq %rdi, %rbp
testq %rbx, %rbx
jne 0x25375b
movq 0x2a8(%rdi), %rbx
testq %rbx, %rbx
je 0x2537a3
movq $0x0, 0x2a8(%rdi)
movq (%rbx), %r15
movq %rdi, %rax
movq 0x40(%rbx), %rdi
callq *0x28(%rax)
movq 0x50(%rbx), %r14
testq %r14, %r14
je 0x253784
movq 0x8(%r14), %r12
movq 0x20(%r14), %rdi
callq *0x28(%rbp)
movq %r14, %rdi
callq *0x28(%rbp)
jmp 0x253787
xorl %r12d, %r12d
testq %r14, %r14
movq %r12, %r14
jne 0x25376c
movq %rbx, %rdi
callq *0x28(%rbp)
movq %rbp, %rdi
movb $0x1, %al
movq %r15, %rbx
testb %al, %al
jne 0x25373f
jmp 0x2537aa
xorl %eax, %eax
xorl %r15d, %r15d
jmp 0x25379a
movq 0x228(%rdi), %rdi
testq %rdi, %rdi
jne 0x2537cd
movq 0x230(%rbp), %rdi
testq %rdi, %rdi
je 0x2537df
movq $0x0, 0x230(%rbp)
movq 0x10(%rdi), %rbx
callq *0x28(%rbp)
movb $0x1, %al
movq %rbx, %rdi
testb %al, %al
jne 0x2537b1
jmp 0x2537e5
xorl %eax, %eax
xorl %edi, %edi
jmp 0x2537d9
movq %rbp, %rax
movq 0x2b8(%rbp), %rbx
testq %rbx, %rbx
je 0x25380a
movq 0x8(%rbx), %r14
movq 0x20(%rbx), %rdi
callq *0x28(%rbp)
movq %rbx, %rdi
callq *0x28(%rbp)
movq %rbp, %rax
jmp 0x25380d
xorl %r14d, %r14d
testq %rbx, %rbx
movq %r14, %rbx
jne 0x2537ef
movq 0x2b0(%rax), %rbx
testq %rbx, %rbx
je 0x253834
movq 0x8(%rbx), %r14
movq 0x20(%rbx), %rdi
callq *0x28(%rbp)
movq %rbx, %rdi
callq *0x28(%rbp)
jmp 0x253837
xorl %r14d, %r14d
testq %rbx, %rbx
movq %r14, %rbx
jne 0x25381c
leaq 0x300(%rbp), %rdi
callq 0x2547b4
leaq 0x330(%rbp), %rdi
callq 0x2547b4
movq 0x290(%rbp), %rbx
testq %rbx, %rbx
je 0x253905
movq 0x370(%rbp), %r15
leaq 0x28(%rbx), %r14
movq 0x28(%rbx), %r12
movq 0x38(%rbx), %rax
leaq (%r12,%rax,8), %r13
cmpq %r13, %r12
je 0x253896
movq (%r12), %rcx
addq $0x8, %r12
testq %rcx, %rcx
cmovneq %rcx, %rax
jne 0x253898
jmp 0x25387e
xorl %eax, %eax
testq %rax, %rax
je 0x2538ac
cmpl $0x0, 0x1c(%rax)
je 0x25387e
movq 0x20(%rax), %rdi
callq *0x28(%rbp)
jmp 0x25387e
movq %rbx, %rdi
callq 0x25b42b
movq %r14, %rdi
callq 0x25b42b
leaq 0x50(%rbx), %rdi
callq 0x25b42b
leaq 0x78(%rbx), %rdi
callq 0x25b42b
leaq 0xa0(%rbx), %rdi
callq 0x2547b4
leaq 0xd0(%rbx), %rdi
callq 0x2547b4
testq %r15, %r15
jne 0x2538ff
movq 0x138(%rbx), %rdi
callq *0x28(%rbp)
movq 0x120(%rbx), %rdi
callq *0x28(%rbp)
movq %rbx, %rdi
callq *0x28(%rbp)
movq 0x2d0(%rbp), %rdi
callq *0x28(%rbp)
movq 0x360(%rbp), %rdi
callq *0x28(%rbp)
movq 0x10(%rbp), %rdi
callq *0x28(%rbp)
movq 0x58(%rbp), %rdi
callq *0x28(%rbp)
movq 0x2d8(%rbp), %rdi
callq *0x28(%rbp)
movq 0x1d0(%rbp), %rdi
callq *0x28(%rbp)
movq %rbp, %rdi
movq 0x1e8(%rbp), %rax
testq %rax, %rax
je 0x253956
movq 0x1d8(%rbp), %rdi
callq *%rax
movq %rbp, %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