// File: /workspace/github_c_makefile_star2_O2/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 0x1fb52d
movq %rsi, %r12
movl $0x380, %edi            # imm = 0x380
callq *(%rsi)
testq %rax, %rax
je 0x1fb764
movq %rax, %rbx
movq (%r12), %rax
movq %rax, 0x18(%rbx)
movq 0x8(%r12), %rcx
movq %rcx, 0x20(%rbx)
movq 0x10(%r12), %rcx
jmp 0x1fb560
movl $0x380, %edi            # imm = 0x380
callq 0x17f50
testq %rax, %rax
je 0x1fb764
movq %rax, %rbx
movq 0x23ca16(%rip), %rax    # 0x437f60
movq %rax, 0x18(%rbx)
movq 0x23ca4b(%rip), %rcx    # 0x437fa0
movq %rcx, 0x20(%rbx)
movq 0x23c9e8(%rip), %rcx    # 0x437f48
movq %rcx, 0x28(%rbx)
andq $0x0, 0x10(%rbx)
andq $0x0, 0x40(%rbx)
movl $0x10, 0x2c0(%rbx)
movl $0x200, %edi            # imm = 0x200
callq *%rax
movq %rax, 0x2d0(%rbx)
testq %rax, %rax
je 0x1fb75e
movl $0x400, %edi            # imm = 0x400
callq *0x18(%rbx)
movq %rax, 0x58(%rbx)
testq %rax, %rax
je 0x1fb754
addq $0x400, %rax            # imm = 0x400
movq %rax, 0x60(%rbx)
movl $0x140, %edi            # imm = 0x140
callq *0x18(%rbx)
testq %rax, %rax
je 0x1fb745
leaq 0x18(%rbx), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0xb0(%rax)
movups %xmm0, 0xa0(%rax)
andq $0x0, 0xc0(%rax)
movq %rcx, 0xc8(%rax)
andq $0x0, 0xf0(%rax)
movups %xmm0, 0xd0(%rax)
movups %xmm0, 0xe0(%rax)
movq %rcx, 0xf8(%rax)
xorl %edx, %edx
movb %dl, 0x8(%rax)
andq $0x0, (%rax)
movups %xmm0, 0x10(%rax)
movq %rcx, 0x20(%rax)
movb %dl, 0x30(%rax)
andq $0x0, 0x28(%rax)
movups %xmm0, 0x38(%rax)
movq %rcx, 0x48(%rax)
movb %dl, 0x58(%rax)
andq $0x0, 0x50(%rax)
movups %xmm0, 0x60(%rax)
movq %rcx, 0x70(%rax)
movb %dl, 0x80(%rax)
andq $0x0, 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)
andq $0x0, 0x2b8(%rbx)
andq $0x0, 0x2a8(%rbx)
andq $0x0, 0x230(%rbx)
andl $0x0, 0x368(%rbx)
andq $0x0, 0x360(%rbx)
andq $0x0, 0xf8(%rbx)
andq $0x0, 0x1e0(%rbx)
movb $0x21, 0x36c(%rbx)
andw $0x0, 0x1c8(%rbx)
movups %xmm0, 0x300(%rbx)
movups %xmm0, 0x310(%rbx)
andq $0x0, 0x320(%rbx)
movups %xmm0, 0x2d8(%rbx)
movb %dl, 0x2e8(%rbx)
movq %rcx, 0x328(%rbx)
movups %xmm0, 0x330(%rbx)
movups %xmm0, 0x340(%rbx)
andq $0x0, 0x350(%rbx)
movq %rcx, 0x358(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1fbe1c
testq %r15, %r15
je 0x1fb722
cmpq $0x0, 0x1c0(%rbx)
je 0x1fb783
testq %r14, %r14
je 0x1fb775
movb $0x1, 0x1c8(%rbx)
callq 0x203808
movq %rax, 0x1b8(%rbx)
movb (%r14), %al
movb %al, 0x36c(%rbx)
jmp 0x1fb766
andq $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 0x203808
movq %rax, 0x1b8(%rbx)
jmp 0x1fb766
movq %rbx, %rdi
callq 0x1fba21
jmp 0x1fb764