// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: processXmlDecl
static enum XML_Error
processXmlDecl(XML_Parser parser, int isGeneralTextEntity,
               const char *s, const char *next)
{
  const char *encodingName = NULL;
  const XML_Char *storedEncName = NULL;
  const ENCODING *newEncoding = NULL;
  const char *version = NULL;
  const char *versionend;
  const XML_Char *storedversion = NULL;
  int standalone = -1;
  if (!(ns
        ? XmlParseXmlDeclNS
        : XmlParseXmlDecl)(isGeneralTextEntity,
                           encoding,
                           s,
                           next,
                           &eventPtr,
                           &version,
                           &versionend,
                           &encodingName,
                           &newEncoding,
                           &standalone)) {
    if (isGeneralTextEntity)
      return XML_ERROR_TEXT_DECL;
    else
      return XML_ERROR_XML_DECL;
  }
  if (!isGeneralTextEntity && standalone == 1) {
    _dtd->standalone = XML_TRUE;
#ifdef XML_DTD
    if (paramEntityParsing == XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE)
      paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
#endif /* XML_DTD */
  }
  if (xmlDeclHandler) {
    if (encodingName != NULL) {
      storedEncName = poolStoreString(&temp2Pool,
                                      encoding,
                                      encodingName,
                                      encodingName
                                      + XmlNameLength(encoding, encodingName));
      if (!storedEncName)
              return XML_ERROR_NO_MEMORY;
      poolFinish(&temp2Pool);
    }
    if (version) {
      storedversion = poolStoreString(&temp2Pool,
                                      encoding,
                                      version,
                                      versionend - encoding->minBytesPerChar);
      if (!storedversion)
        return XML_ERROR_NO_MEMORY;
    }
    xmlDeclHandler(handlerArg, storedversion, storedEncName, standalone);
  }
  else if (defaultHandler)
    reportDefault(parser, encoding, s, next);
  if (protocolEncodingName == NULL) {
    if (newEncoding) {
      if (newEncoding->minBytesPerChar != encoding->minBytesPerChar) {
        eventPtr = encodingName;
        return XML_ERROR_INCORRECT_ENCODING;
      }
      encoding = newEncoding;
    }
    else if (encodingName) {
      enum XML_Error result;
      if (!storedEncName) {
        storedEncName = poolStoreString(
          &temp2Pool, encoding, encodingName,
          encodingName + XmlNameLength(encoding, encodingName));
        if (!storedEncName)
          return XML_ERROR_NO_MEMORY;
      }
      result = handleUnknownEncoding(parser, storedEncName);
      poolClear(&temp2Pool);
      if (result == XML_ERROR_UNKNOWN_ENCODING)
        eventPtr = encodingName;
      return result;
    }
  }

  if (storedEncName || storedversion)
    poolClear(&temp2Pool);

  return XML_ERROR_NONE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %rbx
xorl %eax, %eax
leaq 0x8(%rsp), %r10
movq %rax, (%r10)
leaq 0x20(%rsp), %r11
movq %rax, (%r11)
leaq 0x18(%rsp), %r9
movq %rax, (%r9)
leaq 0x4(%rsp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq 0x120(%rdi), %rsi
leaq 0x210(%rdi), %r14
leaq 0x10(%rsp), %r13
movl %ebp, %edi
movq %r14, %r8
pushq %rax
pushq %r11
pushq %r10
pushq %r13
callq 0x25cba9
addq $0x20, %rsp
testl %eax, %eax
je 0x2571a2
testl %ebp, %ebp
jne 0x257146
cmpl $0x1, 0x4(%rsp)
jne 0x257146
movq 0x290(%rbx), %rax
movb $0x1, 0x102(%rax)
cmpq $0x0, 0x118(%rbx)
je 0x2571b2
movq 0x8(%rsp), %r15
testq %r15, %r15
je 0x2571d8
leaq 0x330(%rbx), %r12
movq 0x120(%rbx), %r13
movq %r13, %rdi
movq %r15, %rsi
callq *0x38(%r13)
movslq %eax, %rcx
addq %r15, %rcx
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x2573a3
testq %rax, %rax
je 0x25720f
movq %rax, %r15
movq 0x348(%rbx), %rax
movq %rax, 0x350(%rbx)
jmp 0x2571db
cmpl $0x1, %ebp
movl $0x1f, %eax
sbbl $0x0, %eax
jmp 0x257394
cmpq $0x0, 0xa0(%rbx)
je 0x2571d1
movq 0x120(%rbx), %rsi
movq %rbx, %rdi
movq %r12, %rdx
movq %r15, %rcx
callq 0x2550af
xorl %r15d, %r15d
xorl %ecx, %ecx
jmp 0x257236
xorl %r15d, %r15d
movq 0x18(%rsp), %rdx
testq %rdx, %rdx
je 0x257219
leaq 0x330(%rbx), %rdi
movq 0x120(%rbx), %rsi
movq 0x10(%rsp), %rcx
movslq 0x80(%rsi), %rax
subq %rax, %rcx
callq 0x2573a3
movq %rax, %r12
testq %rax, %rax
jne 0x25721c
movl $0x1, %eax
jmp 0x257394
xorl %r12d, %r12d
movq 0x8(%rbx), %rdi
movl 0x4(%rsp), %ecx
movq %r12, %rsi
movq %r15, %rdx
callq *0x118(%rbx)
testq %r12, %r12
setne %cl
cmpq $0x0, 0x1c0(%rbx)
je 0x25727e
testq %r15, %r15
sete %dl
xorb $0x1, %cl
xorl %eax, %eax
testb %cl, %dl
jne 0x257394
movq 0x330(%rbx), %rax
movq 0x338(%rbx), %rcx
testq %rcx, %rcx
je 0x2572aa
testq %rax, %rax
je 0x2572b4
movq %rax, %rdx
movq (%rax), %rax
movq %rcx, (%rdx)
movq %rdx, %rcx
testq %rax, %rax
jne 0x25726b
jmp 0x2572ad
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x2572d3
movl 0x80(%rax), %edx
movq 0x120(%rbx), %rsi
cmpl 0x80(%rsi), %edx
jne 0x257354
movq %rax, 0x120(%rbx)
jmp 0x257240
movq %rax, %rdx
movq %rdx, 0x338(%rbx)
xorl %eax, %eax
movq %rax, 0x330(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x340(%rbx)
movq %rax, 0x350(%rbx)
jmp 0x257394
movq 0x8(%rsp), %r12
testq %r12, %r12
je 0x257240
testq %r15, %r15
jne 0x25731e
leaq 0x330(%rbx), %r15
movq 0x120(%rbx), %r13
movq %r13, %rdi
movq %r12, %rsi
callq *0x38(%r13)
movslq %eax, %rcx
addq %r12, %rcx
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x2573a3
movq %rax, %r15
testq %rax, %rax
je 0x25720f
movq %rbx, %rdi
movq %r15, %rsi
callq 0x256f97
movq 0x330(%rbx), %rcx
movq 0x338(%rbx), %rdx
testq %rdx, %rdx
je 0x257363
testq %rcx, %rcx
je 0x25736d
movq %rcx, %rsi
movq (%rcx), %rcx
movq %rdx, (%rsi)
movq %rsi, %rdx
testq %rcx, %rcx
jne 0x257341
jmp 0x257366
movq 0x8(%rsp), %rax
movq %rax, (%r14)
movl $0x13, %eax
jmp 0x257394
movq %rcx, %rsi
movq %rsi, 0x338(%rbx)
xorl %ecx, %ecx
movq %rcx, 0x330(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x340(%rbx)
movq %rcx, 0x350(%rbx)
cmpl $0x12, %eax
jne 0x257394
movq 0x8(%rsp), %rcx
movq %rcx, (%r14)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq