// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: parserCreate
static XML_Parser
parserCreate(const XML_Char *encodingName,
             const XML_Memory_Handling_Suite *memsuite,
             const XML_Char *nameSep,
             DTD *dtd)
{
  XML_Parser parser;

  if (memsuite) {
    XML_Memory_Handling_Suite *mtemp;
    parser = (XML_Parser)
      memsuite->malloc_fcn(sizeof(struct XML_ParserStruct));
    if (parser != NULL) {
      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
      mtemp->malloc_fcn = memsuite->malloc_fcn;
      mtemp->realloc_fcn = memsuite->realloc_fcn;
      mtemp->free_fcn = memsuite->free_fcn;
    }
  }
  else {
    XML_Memory_Handling_Suite *mtemp;
    parser = (XML_Parser)malloc(sizeof(struct XML_ParserStruct));
    if (parser != NULL) {
      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
      mtemp->malloc_fcn = malloc;
      mtemp->realloc_fcn = realloc;
      mtemp->free_fcn = free;
    }
  }

  if (!parser)
    return parser;

  buffer = NULL;
  bufferLim = NULL;

  attsSize = INIT_ATTS_SIZE;
  atts = (ATTRIBUTE *)MALLOC(attsSize * sizeof(ATTRIBUTE));
  if (atts == NULL) {
    FREE(parser);
    return NULL;
  }
  dataBuf = (XML_Char *)MALLOC(INIT_DATA_BUF_SIZE * sizeof(XML_Char));
  if (dataBuf == NULL) {
    FREE(atts);
    FREE(parser);
    return NULL;
  }
  dataBufEnd = dataBuf + INIT_DATA_BUF_SIZE;

  if (dtd)
    _dtd = dtd;
  else {
    _dtd = dtdCreate(&parser->m_mem);
    if (_dtd == NULL) {
      FREE(dataBuf);
      FREE(atts);
      FREE(parser);
      return NULL;
    }
  }

  freeBindingList = NULL;
  freeTagList = NULL;
  freeInternalEntities = NULL;

  groupSize = 0;
  groupConnector = NULL;

  unknownEncodingHandler = NULL;
  unknownEncodingHandlerData = NULL;

  namespaceSeparator = ASCII_EXCL;
  ns = XML_FALSE;
  ns_triplets = XML_FALSE;

  nsAtts = NULL;
  nsAttsVersion = 0;
  nsAttsPower = 0;

  poolInit(&tempPool, &(parser->m_mem));
  poolInit(&temp2Pool, &(parser->m_mem));
  parserInit(parser, encodingName);

  if (encodingName && !protocolEncodingName) {
    XML_ParserFree(parser);
    return NULL;
  }

  if (nameSep) {
    ns = XML_TRUE;
    internalEncoding = XmlGetInternalEncodingNS();
    namespaceSeparator = *nameSep;
  }
  else {
    internalEncoding = XmlGetInternalEncoding();
  }

  return parser;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %r15
testq %rsi, %rsi
je 0x24b895
movq %rsi, %r12
movl $0x380, %edi            # imm = 0x380
callq *(%rsi)
testq %rax, %rax
je 0x24bac5
movq %rax, %rbx
movq (%r12), %rax
movq %rax, 0x18(%rbx)
movq 0x8(%r12), %rcx
movq %rcx, 0x20(%rbx)
movq 0x10(%r12), %rcx
jmp 0x24b8c8
movl $0x380, %edi            # imm = 0x380
callq 0x17ff0
testq %rax, %rax
je 0x24bac5
movq %rax, %rbx
movq 0x26d6c6(%rip), %rax    # 0x4b8f78
movq %rax, 0x18(%rbx)
movq 0x26d6eb(%rip), %rcx    # 0x4b8fa8
movq %rcx, 0x20(%rbx)
movq 0x26d6a0(%rip), %rcx    # 0x4b8f68
movq %rcx, 0x28(%rbx)
xorl %ecx, %ecx
movq %rcx, 0x10(%rbx)
movq %rcx, 0x40(%rbx)
movl $0x10, 0x2c0(%rbx)
movl $0x200, %edi            # imm = 0x200
callq *%rax
movq %rax, 0x2d0(%rbx)
testq %rax, %rax
je 0x24babf
movl $0x400, %edi            # imm = 0x400
callq *0x18(%rbx)
movq %rax, 0x58(%rbx)
testq %rax, %rax
je 0x24bab5
addq $0x400, %rax            # imm = 0x400
movq %rax, 0x60(%rbx)
movl $0x140, %edi            # imm = 0x140
callq *0x18(%rbx)
testq %rax, %rax
je 0x24baa3
leaq 0x18(%rbx), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0xb0(%rax)
movups %xmm0, 0xa0(%rax)
xorl %edx, %edx
movq %rdx, 0xc0(%rax)
movq %rcx, 0xc8(%rax)
movups %xmm0, 0xd0(%rax)
movups %xmm0, 0xe0(%rax)
movq %rdx, 0xf0(%rax)
movq %rcx, 0xf8(%rax)
movb %dl, 0x8(%rax)
movq %rdx, (%rax)
movups %xmm0, 0x10(%rax)
movq %rcx, 0x20(%rax)
movb %dl, 0x30(%rax)
movq %rdx, 0x28(%rax)
movups %xmm0, 0x38(%rax)
movq %rcx, 0x48(%rax)
movb %dl, 0x58(%rax)
movq %rdx, 0x50(%rax)
movups %xmm0, 0x60(%rax)
movq %rcx, 0x70(%rax)
movb %dl, 0x80(%rax)
movq %rdx, 0x78(%rax)
movups %xmm0, 0x88(%rax)
movq %rcx, 0x98(%rax)
movups %xmm0, 0x108(%rax)
movb %dl, 0x118(%rax)
movups %xmm0, 0x120(%rax)
movups %xmm0, 0x130(%rax)
movw $0x1, 0x100(%rax)
movb %dl, 0x102(%rax)
movq %rax, 0x290(%rbx)
movq %rdx, 0x2b8(%rbx)
movq %rdx, 0x2a8(%rbx)
movq %rdx, 0x230(%rbx)
movl $0x0, 0x368(%rbx)
movq %rdx, 0x360(%rbx)
movq %rdx, 0xf8(%rbx)
movq %rdx, 0x1e0(%rbx)
movb $0x21, 0x36c(%rbx)
movw $0x0, 0x1c8(%rbx)
movups %xmm0, 0x300(%rbx)
movups %xmm0, 0x310(%rbx)
movq %rdx, 0x320(%rbx)
movups %xmm0, 0x2d8(%rbx)
movb %dl, 0x2e8(%rbx)
movq %rcx, 0x328(%rbx)
movups %xmm0, 0x330(%rbx)
movups %xmm0, 0x340(%rbx)
movq %rdx, 0x350(%rbx)
movq %rcx, 0x358(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x24c361
testq %r15, %r15
je 0x24ba80
cmpq $0x0, 0x1c0(%rbx)
je 0x24bae4
testq %r14, %r14
je 0x24bad6
movb $0x1, 0x1c8(%rbx)
callq 0x25430b
movq %rax, 0x1b8(%rbx)
movb (%r14), %al
movb %al, 0x36c(%rbx)
jmp 0x24bac7
movq $0x0, 0x290(%rbx)
movq 0x58(%rbx), %rdi
callq *0x28(%rbx)
movq 0x2d0(%rbx), %rdi
callq *0x28(%rbx)
movq %rbx, %rdi
callq *0x28(%rbx)
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x25430b
movq %rax, 0x1b8(%rbx)
jmp 0x24bac7
movq %rbx, %rdi
callq 0x24bd74
jmp 0x24bac5