// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: XML_ParserReset
XML_Bool XMLCALL
XML_ParserReset(XML_Parser parser, const XML_Char *encodingName)
{
  TAG *tStk;
  OPEN_INTERNAL_ENTITY *openEntityList;
  if (parentParser)
    return XML_FALSE;
  /* move tagStack to freeTagList */
  tStk = tagStack;
  while (tStk) {
    TAG *tag = tStk;
    tStk = tStk->parent;
    tag->parent = freeTagList;
    moveToFreeBindingList(parser, tag->bindings);
    tag->bindings = NULL;
    freeTagList = tag;
  }
  /* move openInternalEntities to freeInternalEntities */
  openEntityList = openInternalEntities;
  while (openEntityList) {
    OPEN_INTERNAL_ENTITY *openEntity = openEntityList;
    openEntityList = openEntity->next;
    openEntity->next = freeInternalEntities;
    freeInternalEntities = openEntity;
  }
  moveToFreeBindingList(parser, inheritedBindings);
  FREE(unknownEncodingMem);
  if (unknownEncodingRelease)
    unknownEncodingRelease(unknownEncodingData);
  poolClear(&tempPool);
  poolClear(&temp2Pool);
  parserInit(parser, encodingName);
  dtdReset(_dtd, &parser->m_mem);
  return setContext(parser, implicitContext);
}

// Assembly:
cmpq $0x0, 0x370(%rdi)
je 0x24bfb6
xorl %eax, %eax
retq
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x2a0(%rdi), %rax
testq %rax, %rax
je 0x24c022
movq 0x2a8(%rbx), %rsi
movq %rax, %rcx
movq (%rax), %rax
movq 0x50(%rcx), %rdx
movq %rsi, (%rcx)
testq %rdx, %rdx
je 0x24c00b
movq 0x2b8(%rbx), %rsi
movq %rdx, %rdi
movq 0x8(%rdx), %rdx
movq %rsi, 0x8(%rdi)
movq %rdi, %rsi
testq %rdx, %rdx
jne 0x24bff1
movq %rdi, 0x2b8(%rbx)
movq $0x0, 0x50(%rcx)
movq %rcx, %rsi
testq %rax, %rax
jne 0x24bfd8
movq %rcx, 0x2a8(%rbx)
movq 0x228(%rbx), %rax
testq %rax, %rax
je 0x24c04f
movq 0x230(%rbx), %rcx
movq %rax, %rdx
movq 0x10(%rax), %rax
movq %rcx, 0x10(%rdx)
movq %rdx, %rcx
testq %rax, %rax
jne 0x24c035
movq %rdx, 0x230(%rbx)
movq 0x2b0(%rbx), %rax
testq %rax, %rax
je 0x24c07c
movq 0x2b8(%rbx), %rcx
movq %rax, %rdx
movq 0x8(%rax), %rax
movq %rcx, 0x8(%rdx)
movq %rdx, %rcx
testq %rax, %rax
jne 0x24c062
movq %rdx, 0x2b8(%rbx)
movq 0x1d0(%rbx), %rdi
callq *0x28(%rbx)
movq 0x1e8(%rbx), %rax
testq %rax, %rax
je 0x24c09b
movq 0x1d8(%rbx), %rdi
callq *%rax
movq 0x300(%rbx), %rax
movq 0x308(%rbx), %rcx
testq %rcx, %rcx
je 0x24c0c6
testq %rax, %rax
je 0x24c0d0
movq %rax, %rdx
movq (%rax), %rax
movq %rcx, (%rdx)
movq %rdx, %rcx
testq %rax, %rax
jne 0x24c0b3
jmp 0x24c0c9
movq %rax, %rdx
movq %rdx, 0x308(%rbx)
xorl %eax, %eax
movq %rax, 0x300(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x310(%rbx)
movq %rax, 0x320(%rbx)
movq 0x330(%rbx), %rax
movq 0x338(%rbx), %rcx
testq %rcx, %rcx
je 0x24c115
testq %rax, %rax
je 0x24c11f
movq %rax, %rdx
movq (%rax), %rax
movq %rcx, (%rdx)
movq %rdx, %rcx
testq %rax, %rax
jne 0x24c102
jmp 0x24c118
movq %rax, %rdx
movq %rdx, 0x338(%rbx)
xorl %r15d, %r15d
movq %r15, 0x330(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x340(%rbx)
movq %r15, 0x350(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x24c361
movq 0x290(%rbx), %r14
movq 0x28(%r14), %r12
movq 0x38(%r14), %r13
shlq $0x3, %r13
cmpq %r15, %r13
je 0x24c179
movq (%r12,%r15), %rax
testq %rax, %rax
je 0x24c173
cmpl $0x0, 0x1c(%rax)
je 0x24c173
movq 0x20(%rax), %rdi
callq *0x28(%rbx)
addq $0x8, %r15
jmp 0x24c158
cmpq $0x0, 0x10(%r14)
je 0x24c1a5
xorl %r15d, %r15d
movq (%r14), %rax
movq 0x20(%r14), %rcx
movq (%rax,%r15,8), %rdi
callq *0x10(%rcx)
movq (%r14), %rax
movq $0x0, (%rax,%r15,8)
incq %r15
cmpq 0x10(%r14), %r15
jb 0x24c183
movq $0x0, 0x18(%r14)
cmpq $0x0, 0x38(%r14)
je 0x24c1db
xorl %r15d, %r15d
movq 0x28(%r14), %rax
movq 0x48(%r14), %rcx
movq (%rax,%r15,8), %rdi
callq *0x10(%rcx)
movq 0x28(%r14), %rax
movq $0x0, (%rax,%r15,8)
incq %r15
cmpq 0x38(%r14), %r15
jb 0x24c1b7
movq $0x0, 0x40(%r14)
cmpq $0x0, 0x60(%r14)
je 0x24c211
xorl %r15d, %r15d
movq 0x50(%r14), %rax
movq 0x70(%r14), %rcx
movq (%rax,%r15,8), %rdi
callq *0x10(%rcx)
movq 0x50(%r14), %rax
movq $0x0, (%rax,%r15,8)
incq %r15
cmpq 0x60(%r14), %r15
jb 0x24c1ed
movq $0x0, 0x68(%r14)
cmpq $0x0, 0x88(%r14)
je 0x24c250
xorl %r15d, %r15d
movq 0x78(%r14), %rax
movq 0x98(%r14), %rcx
movq (%rax,%r15,8), %rdi
callq *0x10(%rcx)
movq 0x78(%r14), %rax
movq $0x0, (%rax,%r15,8)
incq %r15
cmpq 0x88(%r14), %r15
jb 0x24c226
movq $0x0, 0x90(%r14)
movq 0xa0(%r14), %rax
movq 0xa8(%r14), %rcx
testq %rcx, %rcx
je 0x24c286
testq %rax, %rax
je 0x24c290
movq %rax, %rdx
movq (%rax), %rax
movq %rcx, (%rdx)
movq %rdx, %rcx
testq %rax, %rax
jne 0x24c273
jmp 0x24c289
movq %rax, %rdx
movq %rdx, 0xa8(%r14)
xorl %eax, %eax
movq %rax, 0xa0(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0xb0(%r14)
movq %rax, 0xc0(%r14)
movq 0xd0(%r14), %rax
movq 0xd8(%r14), %rcx
testq %rcx, %rcx
je 0x24c2d6
testq %rax, %rax
je 0x24c2e0
movq %rax, %rdx
movq (%rax), %rax
movq %rcx, (%rdx)
movq %rdx, %rcx
testq %rax, %rax
jne 0x24c2c3
jmp 0x24c2d9
movq %rax, %rdx
movq %rdx, 0xd8(%r14)
xorl %r15d, %r15d
movq %r15, 0xd0(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0xe0(%r14)
movq %r15, 0xf0(%r14)
movups %xmm0, 0x108(%r14)
movb %r15b, 0x118(%r14)
movq 0x138(%r14), %rdi
callq *0x28(%rbx)
movq %r15, 0x138(%r14)
movq 0x120(%r14), %rdi
callq *0x28(%rbx)
movq %r15, 0x130(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x120(%r14)
movw $0x1, 0x100(%r14)
movb %r15b, 0x102(%r14)
leaq 0x17ec30(%rip), %rsi    # 0x3caf80
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x24baee