// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
je 0x1fbc00
movq %rdi, %rax
movq 0x2a0(%rdi), %rbx
movq %rdi, %r13
testq %rbx, %rbx
jne 0x1fba5d
movq 0x2a8(%rax), %rbx
testq %rbx, %rbx
je 0x1fba83
andq $0x0, 0x2a8(%rax)
movq (%rbx), %r14
movq 0x40(%rbx), %rdi
callq *0x28(%r13)
movq 0x50(%rbx), %rdi
movq %r13, %rsi
callq 0x1fc78b
movq %rbx, %rdi
callq *0x28(%r13)
movq %r13, %rax
movq %r14, %rbx
jmp 0x1fba44
movq 0x228(%rax), %rdi
testq %rdi, %rdi
jne 0x1fbaa3
movq 0x230(%rax), %rdi
testq %rdi, %rdi
je 0x1fbab3
andq $0x0, 0x230(%rax)
movq 0x10(%rdi), %rbx
callq *0x28(%r13)
movq %r13, %rax
movq %rbx, %rdi
jmp 0x1fba8a
movq 0x2b8(%rax), %rdi
movq %r13, %rsi
callq 0x1fc78b
movq 0x2b0(%r13), %rdi
movq %r13, %rsi
callq 0x1fc78b
leaq 0x300(%r13), %rdi
callq 0x1fc7b7
leaq 0x330(%r13), %rdi
callq 0x1fc7b7
movq %r13, %rax
movq 0x290(%r13), %rbx
testq %rbx, %rbx
je 0x1fbb99
movq 0x370(%rax), %r12
leaq 0x28(%rbx), %r14
movq 0x28(%rbx), %rax
movq %rsp, %r15
movq %rax, (%r15)
movq 0x38(%rbx), %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, 0x8(%r15)
movq %r15, %rdi
callq 0x201894
testq %rax, %rax
je 0x1fbb3a
cmpl $0x0, 0x1c(%rax)
je 0x1fbb1d
movq 0x20(%rax), %rdi
callq *0x28(%r13)
jmp 0x1fbb1d
movq %rbx, %rdi
callq 0x202373
movq %r14, %rdi
callq 0x202373
leaq 0x50(%rbx), %rdi
callq 0x202373
leaq 0x78(%rbx), %rdi
callq 0x202373
leaq 0xa0(%rbx), %rdi
callq 0x1fc7b7
leaq 0xd0(%rbx), %rdi
callq 0x1fc7b7
testq %r12, %r12
jne 0x1fbb8f
movq 0x138(%rbx), %rdi
callq *0x28(%r13)
movq 0x120(%rbx), %rdi
callq *0x28(%r13)
movq %rbx, %rdi
callq *0x28(%r13)
movq %r13, %rax
movq 0x2d0(%rax), %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 0x1fbbf0
movq 0x1d8(%rdi), %rdi
callq *%rax
movq %r13, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmpq *0x28(%rdi)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq