// File: /workspace/github_c_makefile_star2_O0/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 %r14
pushq %rbx
subq $0xc8, %rsp
movq %rdi, 0xb8(%rsp)
movl %esi, 0xb4(%rsp)
movq %rdx, 0xa8(%rsp)
movq %rcx, 0xa0(%rsp)
movq $0x0, 0x98(%rsp)
movq $0x0, 0x90(%rsp)
movq $0x0, 0x88(%rsp)
movq $0x0, 0x80(%rsp)
movq $0x0, 0x70(%rsp)
movl $0xffffffff, 0x6c(%rsp) # imm = 0xFFFFFFFF
movq 0xb8(%rsp), %rax
movzbl 0x1c8(%rax), %ecx
leaq 0xb3b0(%rip), %rax      # 0x3849f0
cmpl $0x0, %ecx
cmovneq %rax, %rax
movl 0xb4(%rsp), %edi
movq 0xb8(%rsp), %rcx
movq 0x120(%rcx), %rsi
movq 0xa8(%rsp), %rdx
movq 0xa0(%rsp), %rcx
movq 0xb8(%rsp), %r8
addq $0x210, %r8             # imm = 0x210
leaq 0x80(%rsp), %r9
leaq 0x78(%rsp), %r14
leaq 0x98(%rsp), %rbx
leaq 0x88(%rsp), %r11
leaq 0x6c(%rsp), %r10
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
callq *%rax
cmpl $0x0, %eax
jne 0x3796e2
cmpl $0x0, 0xb4(%rsp)
je 0x3796d2
movl $0x1f, 0xc4(%rsp)
jmp 0x379ac7
movl $0x1e, 0xc4(%rsp)
jmp 0x379ac7
cmpl $0x0, 0xb4(%rsp)
jne 0x379709
cmpl $0x1, 0x6c(%rsp)
jne 0x379709
movq 0xb8(%rsp), %rax
movq 0x290(%rax), %rax
movb $0x1, 0x102(%rax)
movq 0xb8(%rsp), %rax
cmpq $0x0, 0x118(%rax)
je 0x3798a2
cmpq $0x0, 0x98(%rsp)
je 0x3797fa
movq 0xb8(%rsp), %rax
addq $0x330, %rax            # imm = 0x330
movq %rax, 0x50(%rsp)
movq 0xb8(%rsp), %rax
movq 0x120(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xb8(%rsp), %rax
movq 0x120(%rax), %rax
movq 0x38(%rax), %rax
movq 0xb8(%rsp), %rcx
movq 0x120(%rcx), %rdi
movq 0x98(%rsp), %rsi
callq *%rax
movq 0x48(%rsp), %rcx
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
cltq
addq %rax, %rcx
callq 0x379ae0
movq %rax, 0x90(%rsp)
cmpq $0x0, 0x90(%rsp)
jne 0x3797dc
movl $0x1, 0xc4(%rsp)
jmp 0x379ac7
movq 0xb8(%rsp), %rax
movq 0x348(%rax), %rcx
movq 0xb8(%rsp), %rax
movq %rcx, 0x350(%rax)
cmpq $0x0, 0x80(%rsp)
je 0x379872
movq 0xb8(%rsp), %rdi
addq $0x330, %rdi            # imm = 0x330
movq 0xb8(%rsp), %rax
movq 0x120(%rax), %rsi
movq 0x80(%rsp), %rdx
movq 0x78(%rsp), %rcx
movq 0xb8(%rsp), %rax
movq 0x120(%rax), %rax
movslq 0x80(%rax), %r8
xorl %eax, %eax
subq %r8, %rax
addq %rax, %rcx
callq 0x379ae0
movq %rax, 0x70(%rsp)
cmpq $0x0, 0x70(%rsp)
jne 0x379870
movl $0x1, 0xc4(%rsp)
jmp 0x379ac7
jmp 0x379872
movq 0xb8(%rsp), %rax
movq 0x118(%rax), %rax
movq 0xb8(%rsp), %rcx
movq 0x8(%rcx), %rdi
movq 0x70(%rsp), %rsi
movq 0x90(%rsp), %rdx
movl 0x6c(%rsp), %ecx
callq *%rax
jmp 0x3798e2
movq 0xb8(%rsp), %rax
cmpq $0x0, 0xa0(%rax)
je 0x3798e0
movq 0xb8(%rsp), %rdi
movq 0xb8(%rsp), %rax
movq 0x120(%rax), %rsi
movq 0xa8(%rsp), %rdx
movq 0xa0(%rsp), %rcx
callq 0x376350
jmp 0x3798e2
movq 0xb8(%rsp), %rax
cmpq $0x0, 0x1c0(%rax)
jne 0x379a95
cmpq $0x0, 0x88(%rsp)
je 0x37996b
movq 0x88(%rsp), %rax
movl 0x80(%rax), %eax
movq 0xb8(%rsp), %rcx
movq 0x120(%rcx), %rcx
cmpl 0x80(%rcx), %eax
je 0x37994f
movq 0x98(%rsp), %rcx
movq 0xb8(%rsp), %rax
movq %rcx, 0x210(%rax)
movl $0x13, 0xc4(%rsp)
jmp 0x379ac7
movq 0x88(%rsp), %rcx
movq 0xb8(%rsp), %rax
movq %rcx, 0x120(%rax)
jmp 0x379a93
cmpq $0x0, 0x98(%rsp)
je 0x379a91
cmpq $0x0, 0x90(%rsp)
jne 0x379a39
movq 0xb8(%rsp), %rax
addq $0x330, %rax            # imm = 0x330
movq %rax, 0x30(%rsp)
movq 0xb8(%rsp), %rax
movq 0x120(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xb8(%rsp), %rax
movq 0x120(%rax), %rax
movq 0x38(%rax), %rax
movq 0xb8(%rsp), %rcx
movq 0x120(%rcx), %rdi
movq 0x98(%rsp), %rsi
callq *%rax
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
cltq
addq %rax, %rcx
callq 0x379ae0
movq %rax, 0x90(%rsp)
cmpq $0x0, 0x90(%rsp)
jne 0x379a37
movl $0x1, 0xc4(%rsp)
jmp 0x379ac7
jmp 0x379a39
movq 0xb8(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x3768f0
movl %eax, 0x68(%rsp)
movq 0xb8(%rsp), %rdi
addq $0x330, %rdi            # imm = 0x330
callq 0x373680
cmpl $0x12, 0x68(%rsp)
jne 0x379a84
movq 0x98(%rsp), %rcx
movq 0xb8(%rsp), %rax
movq %rcx, 0x210(%rax)
movl 0x68(%rsp), %eax
movl %eax, 0xc4(%rsp)
jmp 0x379ac7
jmp 0x379a93
jmp 0x379a95
cmpq $0x0, 0x90(%rsp)
jne 0x379aa8
cmpq $0x0, 0x70(%rsp)
je 0x379abc
movq 0xb8(%rsp), %rdi
addq $0x330, %rdi            # imm = 0x330
callq 0x373680
movl $0x0, 0xc4(%rsp)
movl 0xc4(%rsp), %eax
addq $0xc8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)