// File: /workspace/github_c_makefile_star2_O2/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 $0xf8, %rsp
movq %rdx, %rax
movq %rsi, 0x58(%rsp)
movq %rdi, %rbx
movq 0x290(%rdi), %rcx
movq %rcx, 0x18(%rsp)
movups 0x68(%rdi), %xmm0
movaps %xmm0, 0x30(%rsp)
movups 0x78(%rdi), %xmm0
movaps %xmm0, 0x20(%rsp)
movups 0x88(%rdi), %xmm0
movaps %xmm0, 0xe0(%rsp)
movups 0x98(%rdi), %xmm0
movaps %xmm0, 0xd0(%rsp)
movups 0xb8(%rdi), %xmm0
movaps %xmm0, 0xc0(%rsp)
movups 0xc8(%rdi), %xmm0
movaps %xmm0, 0xb0(%rsp)
movups 0xd8(%rdi), %xmm0
movaps %xmm0, 0xa0(%rsp)
movups 0xf0(%rdi), %xmm0
movaps %xmm0, 0x90(%rsp)
movups 0x100(%rdi), %xmm0
movaps %xmm0, 0x80(%rsp)
movups 0x110(%rdi), %xmm0
movaps %xmm0, 0x70(%rsp)
movq 0x278(%rdi), %rbp
movq (%rdi), %r13
movq 0x8(%rdi), %r15
movb 0x238(%rdi), %cl
movb %cl, 0x8(%rsp)
movq 0xe8(%rdi), %r12
movb 0x1c9(%rdi), %cl
movb %cl, 0x10(%rsp)
cmpb $0x0, 0x1c8(%rdi)
je 0x1fc100
movb 0x36c(%rbx), %cl
leaq 0x60(%rsp), %rdx
movb %cl, (%rdx)
leaq 0x18(%rbx), %rsi
movq %rax, %rdi
jmp 0x1fc109
leaq 0x18(%rbx), %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x1fb4ec
movq %rax, %r14
testq %rax, %rax
je 0x1fc263
movaps 0x30(%rsp), %xmm0
movups %xmm0, 0x68(%r14)
movaps 0x20(%rsp), %xmm0
movups %xmm0, 0x78(%r14)
movaps 0xe0(%rsp), %xmm0
movups %xmm0, 0x88(%r14)
movaps 0xd0(%rsp), %xmm0
movups %xmm0, 0x98(%r14)
movaps 0xc0(%rsp), %xmm0
movups %xmm0, 0xb8(%r14)
movaps 0xb0(%rsp), %xmm0
movups %xmm0, 0xc8(%r14)
movaps 0xa0(%rsp), %xmm0
movups %xmm0, 0xd8(%r14)
movaps 0x90(%rsp), %xmm0
movups %xmm0, 0xf0(%r14)
movaps 0x80(%rsp), %xmm0
movups %xmm0, 0x100(%r14)
movaps 0x70(%rsp), %xmm0
movups %xmm0, 0x110(%r14)
movq %rbp, 0x278(%r14)
movq %r13, (%r14)
cmpq %r15, %r13
cmovneq %r14, %r13
movq %r13, 0x8(%r14)
cmpq %rbx, %r12
je 0x1fc1cc
movq %r12, 0xe8(%r14)
movb 0x8(%rsp), %al
movb %al, 0x238(%r14)
movb 0x10(%rsp), %al
movb %al, 0x1c9(%r14)
movq %rbx, 0x370(%r14)
movq 0x290(%r14), %rdx
movq 0x18(%rsp), %rcx
movq 0x78(%rcx), %rax
leaq 0x48(%rsp), %rbx
movq %rax, (%rbx)
movq 0x88(%rcx), %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rbx)
leaq 0xa0(%rdx), %rax
movq %rax, 0x8(%rsp)
movq %rdx, 0x30(%rsp)
leaq 0x78(%rdx), %r13
pushq $0x10
popq %r15
movq %rbx, %rdi
callq 0x201894
testq %rax, %rax
je 0x1fc27b
movq (%rax), %rsi
movq 0x8(%rsp), %rdi
callq 0x1fbfb6
testq %rax, %rax
je 0x1fc25b
movq %r13, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x1ff2cb
testq %rax, %rax
jne 0x1fc229
movq %r14, %rdi
callq 0x1fba21
xorl %r14d, %r14d
movq %r14, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rsp), %rdx
movq 0x50(%rdx), %rax
leaq 0x48(%rsp), %rsi
movq %rax, (%rsi)
movq 0x60(%rdx), %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsi)
movq 0x30(%rsp), %r12
leaq 0x50(%r12), %rax
movq %rax, 0x10(%rsp)
movl $0x108, %ebp            # imm = 0x108
leaq (%rdx,%rbp), %rax
movq %rax, 0x20(%rsp)
addq %r12, %rbp
leaq 0x48(%rsp), %rdi
callq 0x201894
testq %rax, %rax
je 0x1fc383
movq %rax, %r15
movq 0xb8(%r12), %rax
cmpq 0xb0(%r12), %rax
jne 0x1fc2ff
movq 0x8(%rsp), %rdi
callq 0x1ff0dd
testb %al, %al
je 0x1fc25b
movq 0x30(%rsp), %r12
movq 0xb8(%r12), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r12)
movb $0x0, (%rax)
movq (%r15), %rsi
movq 0x8(%rsp), %rdi
callq 0x1fbfb6
testq %rax, %rax
je 0x1fc25b
incq %rax
movq 0x10(%rsp), %rdi
movq %rax, %rsi
pushq $0x18
popq %rdx
callq 0x1ff2cb
testq %rax, %rax
je 0x1fc25b
movq %rax, %rbx
movb 0x10(%r15), %al
movb %al, 0x10(%rbx)
movq 0x8(%r15), %rcx
testq %rcx, %rcx
movq 0x30(%rsp), %r12
je 0x1fc2b8
movb 0x11(%r15), %al
movb %al, 0x11(%rbx)
movq %rbp, %rax
cmpq 0x20(%rsp), %rcx
je 0x1fc37a
movq (%rcx), %rsi
movq %r13, %rdi
xorl %edx, %edx
callq 0x1ff2cb
movq %rax, 0x8(%rbx)
jmp 0x1fc2b8
movq 0x18(%rsp), %rcx
movq 0x28(%rcx), %rax
leaq 0x48(%rsp), %rdx
movq %rax, (%rdx)
movq 0x38(%rcx), %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rdx)
leaq 0x28(%r12), %rax
movq %rax, 0x20(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x201894
testq %rax, %rax
je 0x1fc4c4
movq %rax, %rbx
movq (%rax), %rsi
movq 0x8(%rsp), %rdi
callq 0x1fbfb6
testq %rax, %rax
je 0x1fc25b
movq 0x20(%rsp), %rdi
movq %rax, %rsi
pushq $0x28
popq %rdx
callq 0x1ff2cb
testq %rax, %rax
je 0x1fc25b
movq %rax, %r15
movslq 0x18(%rbx), %rax
testq %rax, %rax
je 0x1fc410
imulq $0x18, %rax, %rdi
callq *0x18(%r14)
movq %rax, 0x20(%r15)
testq %rax, %rax
je 0x1fc68b
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x1fc42c
movq (%rax), %rsi
movq 0x10(%rsp), %rdi
xorl %edx, %edx
callq 0x1ff2cb
movq %rax, 0x10(%r15)
movl 0x18(%rbx), %eax
movl %eax, 0x18(%r15)
movl %eax, 0x1c(%r15)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x1fc451
movq (%rax), %rsi
movq %r13, %rdi
xorl %edx, %edx
callq 0x1ff2cb
movq %rax, 0x8(%r15)
xorl %ebp, %ebp
xorl %r12d, %r12d
movslq 0x18(%r15), %rax
cmpq %rax, %r12
jge 0x1fc3aa
movq 0x20(%rbx), %rax
movq (%rax,%rbp), %rax
movq (%rax), %rsi
movq 0x10(%rsp), %rdi
xorl %edx, %edx
callq 0x1ff2cb
movq 0x20(%r15), %rcx
movq %rax, (%rcx,%rbp)
movq 0x20(%rbx), %rax
movb 0x8(%rax,%rbp), %dl
movb %dl, 0x8(%rcx,%rbp)
movq 0x10(%rax,%rbp), %rsi
testq %rsi, %rsi
je 0x1fc4b5
movq 0x8(%rsp), %rdi
callq 0x1fbfb6
movq 0x20(%r15), %rcx
movq %rax, 0x10(%rcx,%rbp)
testq %rax, %rax
jne 0x1fc4bb
jmp 0x1fc25b
andq $0x0, 0x10(%rcx,%rbp)
incq %r12
addq $0x18, %rbp
jmp 0x1fc456
movq 0x18(%rsp), %rcx
movq (%rcx), %rax
leaq 0x60(%rsp), %rdx
movq %rax, (%rdx)
movq 0x10(%rcx), %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rdx)
movq $0x0, 0x20(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x30(%rsp), %r12
leaq 0x60(%rsp), %rdi
callq 0x201894
testq %rax, %rax
je 0x1fc697
movq %rax, %r13
movq (%rax), %rsi
movq 0x8(%rsp), %rdi
callq 0x1fbfb6
testq %rax, %rax
je 0x1fc25b
movq %r12, %rdi
movq %rax, %rsi
pushq $0x40
popq %rdx
callq 0x1ff2cb
testq %rax, %rax
je 0x1fc25b
movq %rax, %rbp
movq 0x18(%r13), %rsi
testq %rsi, %rsi
je 0x1fc5bf
movq 0x8(%rsp), %rdi
callq 0x1fbfb6
testq %rax, %rax
je 0x1fc25b
movq %rax, 0x18(%rbp)
movq 0x20(%r13), %rbx
testq %rbx, %rbx
je 0x1fc596
cmpq 0x10(%rsp), %rbx
je 0x1fc58d
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x1fbfb6
movq %rbx, 0x10(%rsp)
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x1fc25b
movq 0x20(%rsp), %rax
movq %rax, 0x20(%rbp)
movq 0x28(%r13), %rsi
testq %rsi, %rsi
je 0x1fc658
movq 0x8(%rsp), %rdi
callq 0x1fbfb6
testq %rax, %rax
je 0x1fc25b
movq %rax, 0x28(%rbp)
jmp 0x1fc658
movq 0x8(%r13), %rbx
movl 0x10(%r13), %r15d
cmpq $0x0, 0xb8(%r12)
jne 0x1fc627
movq 0x8(%rsp), %rdi
callq 0x1ff0dd
testb %al, %al
jne 0x1fc627
jmp 0x1fc25b
movq 0xb8(%r12), %rax
cmpq 0xb0(%r12), %rax
jne 0x1fc611
movq 0x8(%rsp), %rdi
callq 0x1ff0dd
testb %al, %al
je 0x1fc25b
movq 0xb8(%r12), %rax
movb (%rbx), %cl
leaq 0x1(%rax), %rdx
movq %rdx, 0xb8(%r12)
movb %cl, (%rax)
decl %r15d
incq %rbx
testl %r15d, %r15d
jg 0x1fc5e5
movq 0xb8(%r12), %rcx
movq 0xc0(%r12), %rax
movq %rcx, 0xc0(%r12)
testq %rax, %rax
je 0x1fc25b
movq %rax, 0x8(%rbp)
movl 0x10(%r13), %eax
movl %eax, 0x10(%rbp)
movq 0x30(%r13), %rsi
testq %rsi, %rsi
je 0x1fc678
movq 0x8(%rsp), %rdi
callq 0x1fbfb6
testq %rax, %rax
je 0x1fc25b
movq %rax, 0x30(%rbp)
movb 0x39(%r13), %al
movb %al, 0x39(%rbp)
movb 0x3a(%r13), %al
movb %al, 0x3a(%rbp)
jmp 0x1fc4f7
movq %r15, %rdi
callq *0x28(%r14)
jmp 0x1fc25b
movq 0x18(%rsp), %rcx
movb 0x100(%rcx), %al
movb %al, 0x100(%r12)
movb 0x101(%rcx), %al
movb %al, 0x101(%r12)
movb 0x102(%rcx), %al
movb %al, 0x102(%r12)
movb 0x118(%rcx), %al
movb %al, 0x118(%r12)
movq 0x120(%rcx), %rax
movq %rax, 0x120(%r12)
movq 0x128(%rcx), %rax
movq %rax, 0x128(%r12)
movl 0x134(%rcx), %eax
movl %eax, 0x134(%r12)
movq 0x138(%rcx), %rax
movq %rax, 0x138(%r12)
movq %r14, %rdi
movq 0x58(%rsp), %rsi
callq 0x1fb78d
testb %al, %al
je 0x1fc25b
leaq 0xc(%rip), %rax         # 0x1fc737
movq %rax, 0x200(%r14)
jmp 0x1fc266