// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: XML_ExternalEntityParserCreate
XML_Parser XMLCALL
XML_ExternalEntityParserCreate(XML_Parser oldParser,
                               const XML_Char *context,
                               const XML_Char *encodingName)
{
  XML_Parser parser = oldParser;
  DTD *newDtd = NULL;
  DTD *oldDtd = _dtd;
  XML_StartElementHandler oldStartElementHandler = startElementHandler;
  XML_EndElementHandler oldEndElementHandler = endElementHandler;
  XML_CharacterDataHandler oldCharacterDataHandler = characterDataHandler;
  XML_ProcessingInstructionHandler oldProcessingInstructionHandler
      = processingInstructionHandler;
  XML_CommentHandler oldCommentHandler = commentHandler;
  XML_StartCdataSectionHandler oldStartCdataSectionHandler
      = startCdataSectionHandler;
  XML_EndCdataSectionHandler oldEndCdataSectionHandler
      = endCdataSectionHandler;
  XML_DefaultHandler oldDefaultHandler = defaultHandler;
  XML_UnparsedEntityDeclHandler oldUnparsedEntityDeclHandler
      = unparsedEntityDeclHandler;
  XML_NotationDeclHandler oldNotationDeclHandler = notationDeclHandler;
  XML_StartNamespaceDeclHandler oldStartNamespaceDeclHandler
      = startNamespaceDeclHandler;
  XML_EndNamespaceDeclHandler oldEndNamespaceDeclHandler
      = endNamespaceDeclHandler;
  XML_NotStandaloneHandler oldNotStandaloneHandler = notStandaloneHandler;
  XML_ExternalEntityRefHandler oldExternalEntityRefHandler
      = externalEntityRefHandler;
  XML_SkippedEntityHandler oldSkippedEntityHandler = skippedEntityHandler;
  XML_UnknownEncodingHandler oldUnknownEncodingHandler
      = unknownEncodingHandler;
  XML_ElementDeclHandler oldElementDeclHandler = elementDeclHandler;
  XML_AttlistDeclHandler oldAttlistDeclHandler = attlistDeclHandler;
  XML_EntityDeclHandler oldEntityDeclHandler = entityDeclHandler;
  XML_XmlDeclHandler oldXmlDeclHandler = xmlDeclHandler;
  ELEMENT_TYPE * oldDeclElementType = declElementType;

  void *oldUserData = userData;
  void *oldHandlerArg = handlerArg;
  XML_Bool oldDefaultExpandInternalEntities = defaultExpandInternalEntities;
  XML_Parser oldExternalEntityRefHandlerArg = externalEntityRefHandlerArg;
#ifdef XML_DTD
  enum XML_ParamEntityParsing oldParamEntityParsing = paramEntityParsing;
  int oldInEntityValue = prologState.inEntityValue;
#endif
  XML_Bool oldns_triplets = ns_triplets;

#ifdef XML_DTD
  if (!context)
    newDtd = oldDtd;
#endif /* XML_DTD */

  /* Note that the magical uses of the pre-processor to make field
     access look more like C++ require that `parser' be overwritten
     here.  This makes this function more painful to follow than it
     would be otherwise.
  */
  if (ns) {
    XML_Char tmp[2];
    *tmp = namespaceSeparator;
    parser = parserCreate(encodingName, &parser->m_mem, tmp, newDtd);
  }
  else {
    parser = parserCreate(encodingName, &parser->m_mem, NULL, newDtd);
  }

  if (!parser)
    return NULL;

  startElementHandler = oldStartElementHandler;
  endElementHandler = oldEndElementHandler;
  characterDataHandler = oldCharacterDataHandler;
  processingInstructionHandler = oldProcessingInstructionHandler;
  commentHandler = oldCommentHandler;
  startCdataSectionHandler = oldStartCdataSectionHandler;
  endCdataSectionHandler = oldEndCdataSectionHandler;
  defaultHandler = oldDefaultHandler;
  unparsedEntityDeclHandler = oldUnparsedEntityDeclHandler;
  notationDeclHandler = oldNotationDeclHandler;
  startNamespaceDeclHandler = oldStartNamespaceDeclHandler;
  endNamespaceDeclHandler = oldEndNamespaceDeclHandler;
  notStandaloneHandler = oldNotStandaloneHandler;
  externalEntityRefHandler = oldExternalEntityRefHandler;
  skippedEntityHandler = oldSkippedEntityHandler;
  unknownEncodingHandler = oldUnknownEncodingHandler;
  elementDeclHandler = oldElementDeclHandler;
  attlistDeclHandler = oldAttlistDeclHandler;
  entityDeclHandler = oldEntityDeclHandler;
  xmlDeclHandler = oldXmlDeclHandler;
  declElementType = oldDeclElementType;
  userData = oldUserData;
  if (oldUserData == oldHandlerArg)
    handlerArg = userData;
  else
    handlerArg = parser;
  if (oldExternalEntityRefHandlerArg != oldParser)
    externalEntityRefHandlerArg = oldExternalEntityRefHandlerArg;
  defaultExpandInternalEntities = oldDefaultExpandInternalEntities;
  ns_triplets = oldns_triplets;
  parentParser = oldParser;
#ifdef XML_DTD
  paramEntityParsing = oldParamEntityParsing;
  prologState.inEntityValue = oldInEntityValue;
  if (context) {
#endif /* XML_DTD */
    if (!dtdCopy(_dtd, oldDtd, &parser->m_mem)
      || !setContext(parser, context)) {
      XML_ParserFree(parser);
      return NULL;
    }
    processor = externalEntityInitProcessor;
#ifdef XML_DTD
  }
  else {
    /* The DTD instance referenced by _dtd is shared between the document's
       root parser and external PE parsers, therefore one does not need to
       call setContext. In addition, one also *must* not call setContext,
       because this would overwrite existing prefix->binding pointers in
       _dtd with ones that get destroyed with the external PE parser.
       This would leave those prefixes with dangling pointers.
    */
    isParamEntity = XML_TRUE;
    XmlPrologStateInitExternalEntity(&prologState);
    processor = externalParEntInitProcessor;
  }
#endif /* XML_DTD */
  return parser;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdx, %rax
movq %rsi, 0x98(%rsp)
movq %rdi, %rbx
movq 0x290(%rdi), %rcx
movq %rcx, 0x48(%rsp)
movups 0x68(%rdi), %xmm0
movaps %xmm0, 0x10(%rsp)
movups 0x78(%rdi), %xmm0
movaps %xmm0, 0x50(%rsp)
movups 0x88(%rdi), %xmm0
movaps %xmm0, 0x30(%rsp)
movups 0x98(%rdi), %xmm0
movaps %xmm0, 0x20(%rsp)
movups 0xb8(%rdi), %xmm0
movaps %xmm0, 0x80(%rsp)
movups 0xc8(%rdi), %xmm0
movaps %xmm0, 0x70(%rsp)
movups 0xd8(%rdi), %xmm0
movaps %xmm0, 0xd0(%rsp)
movups 0xf0(%rdi), %xmm0
movaps %xmm0, 0xc0(%rsp)
movups 0x100(%rdi), %xmm0
movaps %xmm0, 0xb0(%rsp)
movups 0x110(%rdi), %xmm0
movaps %xmm0, 0xa0(%rsp)
movq 0x278(%rdi), %r13
movq (%rdi), %r12
movq 0x8(%rdi), %rbp
movb 0x238(%rdi), %cl
movb %cl, 0x8(%rsp)
movq 0xe8(%rdi), %r15
movb 0x1c9(%rdi), %r14b
cmpb $0x0, 0x1c8(%rdi)
je 0x254019
movb 0x36c(%rbx), %cl
leaq 0x6e(%rsp), %rdx
movb %cl, (%rdx)
leaq 0x18(%rbx), %rsi
movq %rax, %rdi
jmp 0x254022
leaq 0x18(%rbx), %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x2531dc
testq %rax, %rax
je 0x25474c
movaps 0x10(%rsp), %xmm0
movups %xmm0, 0x68(%rax)
movaps 0x50(%rsp), %xmm0
movups %xmm0, 0x78(%rax)
movaps 0x30(%rsp), %xmm0
movups %xmm0, 0x88(%rax)
movaps 0x20(%rsp), %xmm0
movups %xmm0, 0x98(%rax)
movaps 0x80(%rsp), %xmm0
movups %xmm0, 0xb8(%rax)
movaps 0x70(%rsp), %xmm0
movups %xmm0, 0xc8(%rax)
movaps 0xd0(%rsp), %xmm0
movups %xmm0, 0xd8(%rax)
movaps 0xc0(%rsp), %xmm0
movups %xmm0, 0xf0(%rax)
movaps 0xb0(%rsp), %xmm0
movups %xmm0, 0x100(%rax)
movaps 0xa0(%rsp), %xmm0
movups %xmm0, 0x110(%rax)
movq %r13, 0x278(%rax)
movq %r12, (%rax)
cmpq %rbp, %r12
cmovneq %rax, %r12
movq %r12, 0x8(%rax)
cmpq %rbx, %r15
je 0x2540d2
movq %r15, 0xe8(%rax)
movb 0x8(%rsp), %cl
movb %cl, 0x238(%rax)
movb %r14b, 0x1c9(%rax)
movq %rbx, 0x370(%rax)
movq %rax, 0x50(%rsp)
movq 0x290(%rax), %r15
movq 0x48(%rsp), %rax
movq 0x78(%rax), %rbx
movq 0x88(%rax), %rax
leaq (%rbx,%rax,8), %r14
leaq 0xa0(%r15), %r12
leaq 0x78(%r15), %r13
cmpq %r14, %rbx
je 0x25412c
movq (%rbx), %rcx
addq $0x8, %rbx
testq %rcx, %rcx
cmovneq %rcx, %rax
jne 0x25412e
jmp 0x254115
xorl %eax, %eax
testq %rax, %rax
je 0x25415d
movq (%rax), %rsi
movq %r12, %rdi
callq 0x253ed5
testq %rax, %rax
je 0x254164
movl $0x10, %edx
movq %r13, %rdi
movq %rax, %rsi
callq 0x257a9b
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
jmp 0x254169
movl $0x2, %ecx
jmp 0x254169
movl $0x1, %ecx
testl %ecx, %ecx
je 0x254115
movq %r13, 0x30(%rsp)
cmpl $0x2, %ecx
jne 0x254742
movq %r12, 0x8(%rsp)
movq 0x48(%rsp), %rcx
movq 0x50(%rcx), %r14
movq 0x60(%rcx), %rax
leaq (%r14,%rax,8), %r13
leaq 0x50(%r15), %rax
movq %rax, 0x10(%rsp)
movl $0x108, %eax            # imm = 0x108
addq %rax, %rcx
movq %rcx, 0x80(%rsp)
addq %r15, %rax
movq %rax, 0x20(%rsp)
cmpq %r13, %r14
je 0x2541c9
movq (%r14), %rax
addq $0x8, %r14
testq %rax, %rax
cmovneq %rax, %rbp
jne 0x2541cb
jmp 0x2541b2
xorl %ebp, %ebp
testq %rbp, %rbp
je 0x25427e
movq 0xb8(%r15), %rax
cmpq 0xb0(%r15), %rax
movq 0x8(%rsp), %rbx
jne 0x2541f9
movq %rbx, %rdi
callq 0x2578ac
testb %al, %al
je 0x25428f
movq 0xb8(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r15)
movb $0x0, (%rax)
movq (%rbp), %rsi
movq %rbx, %rdi
callq 0x253ed5
movl $0x1, %r12d
testq %rax, %rax
je 0x254284
incq %rax
movl $0x18, %edx
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x257a9b
testq %rax, %rax
je 0x254284
movq %rax, %rbx
movb 0x10(%rbp), %al
movb %al, 0x10(%rbx)
movq 0x8(%rbp), %rcx
xorl %r12d, %r12d
testq %rcx, %rcx
je 0x254284
movb 0x11(%rbp), %al
movb %al, 0x11(%rbx)
movq 0x20(%rsp), %rax
cmpq 0x80(%rsp), %rcx
je 0x254278
movq (%rcx), %rsi
movq 0x30(%rsp), %rdi
xorl %edx, %edx
callq 0x257a9b
movq %rax, 0x8(%rbx)
jmp 0x254284
movl $0x4, %r12d
testl %r12d, %r12d
je 0x2541b2
jmp 0x254297
movl $0x1, %r12d
jmp 0x254284
cmpl $0x4, %r12d
movq 0x8(%rsp), %r12
jne 0x254742
movq 0x48(%rsp), %rax
movq 0x28(%rax), %r13
movq 0x38(%rax), %rax
leaq (,%rax,8), %rbx
addq %r13, %rbx
leaq 0x28(%r15), %rax
movq %rax, 0x80(%rsp)
movq %r15, 0x70(%rsp)
movq %rbx, 0x20(%rsp)
cmpq %rbx, %r13
je 0x2542ec
movq (%r13), %rax
addq $0x8, %r13
testq %rax, %rax
cmovneq %rax, %r14
jne 0x2542ef
jmp 0x2542d4
xorl %r14d, %r14d
testq %r14, %r14
je 0x254422
movq (%r14), %rsi
movq %r12, %rdi
callq 0x253ed5
movl $0x1, %ebp
testq %rax, %rax
je 0x254442
movl $0x28, %edx
movq 0x80(%rsp), %rdi
movq %rax, %rsi
callq 0x257a9b
testq %rax, %rax
je 0x25443d
movq %rax, %rbx
movslq 0x18(%r14), %rax
testq %rax, %rax
je 0x254358
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdi
movq 0x50(%rsp), %rax
callq *0x18(%rax)
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x254432
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x254374
movq (%rax), %rsi
movq 0x10(%rsp), %rdi
xorl %edx, %edx
callq 0x257a9b
movq %rax, 0x10(%rbx)
movl 0x18(%r14), %eax
movl %eax, 0x18(%rbx)
movl %eax, 0x1c(%rbx)
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x25439a
movq (%rax), %rsi
movq 0x30(%rsp), %rdi
xorl %edx, %edx
callq 0x257a9b
movq %rax, 0x8(%rbx)
cmpl $0x0, 0x18(%rbx)
jle 0x254429
xorl %r12d, %r12d
xorl %r15d, %r15d
movq 0x20(%r14), %rax
movq (%rax,%r12), %rax
movq (%rax), %rsi
movq 0x10(%rsp), %rdi
xorl %edx, %edx
callq 0x257a9b
movq 0x20(%rbx), %rcx
movq %rax, (%rcx,%r12)
movq 0x20(%r14), %rax
movb 0x8(%rax,%r12), %dl
movb %dl, 0x8(%rcx,%r12)
movq 0x10(%rax,%r12), %rsi
testq %rsi, %rsi
je 0x2543fb
movq 0x8(%rsp), %rdi
callq 0x253ed5
movq 0x20(%rbx), %rcx
movq %rax, 0x10(%rcx,%r12)
testq %rax, %rax
jne 0x254404
jmp 0x254416
movq $0x0, 0x10(%rcx,%r12)
incq %r15
movslq 0x18(%rbx), %rax
addq $0x18, %r12
cmpq %rax, %r15
jl 0x2543aa
xorl %ebp, %ebp
movq 0x70(%rsp), %r15
movq 0x8(%rsp), %r12
jmp 0x25443d
movl $0x6, %ebp
jmp 0x254442
xorl %ebp, %ebp
movq 0x70(%rsp), %r15
jmp 0x25443d
movq %rbx, %rdi
movq 0x50(%rsp), %rax
callq *0x28(%rax)
movq 0x20(%rsp), %rbx
testl %ebp, %ebp
je 0x2542d4
cmpl $0x6, %ebp
jne 0x254742
movq 0x48(%rsp), %rax
movq (%rax), %rbp
movq 0x10(%rax), %rax
leaq (,%rax,8), %r13
addq %rbp, %r13
movq $0x0, 0x20(%rsp)
xorl %ecx, %ecx
cmpq %r13, %rbp
je 0x25448d
movq (%rbp), %rax
addq $0x8, %rbp
testq %rax, %rax
cmovneq %rax, %rbx
je 0x254475
jmp 0x25448f
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x25457a
movq %rcx, 0x10(%rsp)
movq (%rbx), %rsi
movq %r12, %rdi
callq 0x253ed5
movl $0x1, %r14d
testq %rax, %rax
je 0x254570
movl $0x40, %edx
movq %r15, %rdi
movq %rax, %rsi
callq 0x257a9b
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x254570
movq 0x18(%rbx), %rsi
testq %rsi, %rsi
je 0x254585
movq %r12, %rdi
callq 0x253ed5
testq %rax, %rax
movq 0x20(%rsp), %rdx
je 0x254605
movq 0x30(%rsp), %rcx
movq %rax, 0x18(%rcx)
movq 0x20(%rbx), %r14
testq %r14, %r14
movq 0x10(%rsp), %rcx
je 0x25453c
cmpq %rcx, %r14
je 0x25452e
movq %r12, %rdi
movq %r14, %rsi
callq 0x253ed5
testq %rax, %rax
je 0x25468f
movq %rax, %rdx
movq %r14, %rcx
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq %rdx, 0x20(%rax)
movq 0x28(%rbx), %rsi
movb $0x1, %r14b
testq %rsi, %rsi
je 0x25460d
movq %rcx, 0x10(%rsp)
movq %r12, %rdi
callq 0x253ed5
testq %rax, %rax
je 0x254605
movq 0x30(%rsp), %rcx
movq %rax, 0x28(%rcx)
jmp 0x254608
movq 0x10(%rsp), %rcx
jmp 0x254684
movl $0x2, %r14d
jmp 0x254684
movq 0x8(%rbx), %r14
movl 0x10(%rbx), %r12d
cmpq $0x0, 0xb8(%r15)
jne 0x2545a5
movq 0x8(%rsp), %rdi
callq 0x2578ac
testb %al, %al
je 0x25461a
testl %r12d, %r12d
jle 0x2545ee
incl %r12d
movq 0xb8(%r15), %rax
cmpq 0xb0(%r15), %rax
jne 0x2545cb
movq 0x8(%rsp), %rdi
callq 0x2578ac
testb %al, %al
je 0x25461a
movb (%r14), %al
movq 0xb8(%r15), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0xb8(%r15)
movb %al, (%rcx)
incq %r14
decl %r12d
cmpl $0x1, %r12d
jg 0x2545ad
movq 0xb8(%r15), %rcx
movq 0xc0(%r15), %rax
movq %rcx, 0xc0(%r15)
jmp 0x25461c
xorl %r14d, %r14d
movq 0x10(%rsp), %rcx
testb %r14b, %r14b
movl $0x1, %r14d
jne 0x254640
jmp 0x254684
xorl %eax, %eax
testq %rax, %rax
movq 0x8(%rsp), %r12
movq 0x10(%rsp), %rcx
movl $0x1, %r14d
je 0x254684
movq 0x30(%rsp), %rdx
movq %rax, 0x8(%rdx)
movl 0x10(%rbx), %eax
movl %eax, 0x10(%rdx)
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x254665
movq %rcx, %r14
movq %r12, %rdi
callq 0x253ed5
testq %rax, %rax
je 0x25467b
movq 0x30(%rsp), %rcx
movq %rax, 0x30(%rcx)
movq %r14, %rcx
movb 0x39(%rbx), %al
movq 0x30(%rsp), %rdx
movb %al, 0x39(%rdx)
movb 0x3a(%rbx), %al
movb %al, 0x3a(%rdx)
xorl %r14d, %r14d
jmp 0x254684
movq %r14, %rcx
movl $0x1, %r14d
testl %r14d, %r14d
je 0x254475
jmp 0x25469a
movq %r14, %rcx
xorl %r14d, %r14d
jmp 0x25460d
cmpl $0x2, %r14d
jne 0x254742
movq 0x48(%rsp), %rcx
movb 0x100(%rcx), %al
movb %al, 0x100(%r15)
movb 0x101(%rcx), %al
movb %al, 0x101(%r15)
movb 0x102(%rcx), %al
movb %al, 0x102(%r15)
movb 0x118(%rcx), %al
movb %al, 0x118(%r15)
movq 0x120(%rcx), %rax
movq %rax, 0x120(%r15)
movq 0x128(%rcx), %rax
movq %rax, 0x128(%r15)
movl 0x134(%rcx), %eax
movl %eax, 0x134(%r15)
movq 0x138(%rcx), %rax
movq %rax, 0x138(%r15)
movq 0x50(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x25346c
testb %al, %al
je 0x254742
leaq 0x2f(%rip), %rax        # 0x254760
movq 0x50(%rsp), %rcx
movq %rax, 0x200(%rcx)
movq %rcx, %rax
jmp 0x25474e
movq 0x50(%rsp), %rdi
callq 0x253721
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq