// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x3729ad
movq 0x30(%rsp), %rax
movl $0x380, %edi            # imm = 0x380
callq *(%rax)
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x3729ab
movq 0x18(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movq (%rax), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0x372a03
movl $0x380, %edi            # imm = 0x380
callq 0x19ef8
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x372a01
movq 0x18(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x2c95ba(%rip), %rcx    # 0x63bf98
movq %rcx, (%rax)
movq 0x8(%rsp), %rax
movq 0x2c95d3(%rip), %rcx    # 0x63bfc0
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rax
movq 0x2c958b(%rip), %rcx    # 0x63bf88
movq %rcx, 0x10(%rax)
jmp 0x372a03
cmpq $0x0, 0x18(%rsp)
jne 0x372a1a
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x372d27
movq 0x18(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x18(%rsp), %rax
movq $0x0, 0x40(%rax)
movq 0x18(%rsp), %rax
movl $0x10, 0x2c0(%rax)
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rsp), %rcx
movslq 0x2c0(%rcx), %rdi
shlq $0x5, %rdi
callq *%rax
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x2d0(%rax)
movq 0x18(%rsp), %rax
cmpq $0x0, 0x2d0(%rax)
jne 0x372a9a
movq 0x18(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x18(%rsp), %rdi
callq *%rax
movq $0x0, 0x40(%rsp)
jmp 0x372d27
movq 0x18(%rsp), %rax
movl $0x400, %edi            # imm = 0x400
callq *0x18(%rax)
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x58(%rax)
movq 0x18(%rsp), %rax
cmpq $0x0, 0x58(%rax)
jne 0x372af4
movq 0x18(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x18(%rsp), %rcx
movq 0x2d0(%rcx), %rdi
callq *%rax
movq 0x18(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x18(%rsp), %rdi
callq *%rax
movq $0x0, 0x40(%rsp)
jmp 0x372d27
movq 0x18(%rsp), %rax
movq 0x58(%rax), %rcx
addq $0x400, %rcx            # imm = 0x400
movq 0x18(%rsp), %rax
movq %rcx, 0x60(%rax)
cmpq $0x0, 0x20(%rsp)
je 0x372b28
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x290(%rax)
jmp 0x372b9f
movq 0x18(%rsp), %rdi
addq $0x18, %rdi
callq 0x376540
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x290(%rax)
movq 0x18(%rsp), %rax
cmpq $0x0, 0x290(%rax)
jne 0x372b9d
movq 0x18(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x18(%rsp), %rcx
movq 0x58(%rcx), %rdi
callq *%rax
movq 0x18(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x18(%rsp), %rcx
movq 0x2d0(%rcx), %rdi
callq *%rax
movq 0x18(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x18(%rsp), %rdi
callq *%rax
movq $0x0, 0x40(%rsp)
jmp 0x372d27
jmp 0x372b9f
movq 0x18(%rsp), %rax
movq $0x0, 0x2b8(%rax)
movq 0x18(%rsp), %rax
movq $0x0, 0x2a8(%rax)
movq 0x18(%rsp), %rax
movq $0x0, 0x230(%rax)
movq 0x18(%rsp), %rax
movl $0x0, 0x368(%rax)
movq 0x18(%rsp), %rax
movq $0x0, 0x360(%rax)
movq 0x18(%rsp), %rax
movq $0x0, 0xf8(%rax)
movq 0x18(%rsp), %rax
movq $0x0, 0x1e0(%rax)
movq 0x18(%rsp), %rax
movb $0x21, 0x36c(%rax)
movq 0x18(%rsp), %rax
movb $0x0, 0x1c8(%rax)
movq 0x18(%rsp), %rax
movb $0x0, 0x1c9(%rax)
movq 0x18(%rsp), %rax
movq $0x0, 0x2d8(%rax)
movq 0x18(%rsp), %rax
movq $0x0, 0x2e0(%rax)
movq 0x18(%rsp), %rax
movb $0x0, 0x2e8(%rax)
movq 0x18(%rsp), %rdi
addq $0x300, %rdi            # imm = 0x300
movq 0x18(%rsp), %rsi
addq $0x18, %rsi
callq 0x376690
movq 0x18(%rsp), %rdi
addq $0x330, %rdi            # imm = 0x330
movq 0x18(%rsp), %rsi
addq $0x18, %rsi
callq 0x376690
movq 0x18(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x373730
cmpq $0x0, 0x38(%rsp)
je 0x372ccd
movq 0x18(%rsp), %rax
cmpq $0x0, 0x1c0(%rax)
jne 0x372ccd
movq 0x18(%rsp), %rdi
callq 0x3731e0
movq $0x0, 0x40(%rsp)
jmp 0x372d27
cmpq $0x0, 0x28(%rsp)
je 0x372d09
movq 0x18(%rsp), %rax
movb $0x1, 0x1c8(%rax)
callq 0x3847b0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x1b8(%rax)
movq 0x28(%rsp), %rax
movb (%rax), %cl
movq 0x18(%rsp), %rax
movb %cl, 0x36c(%rax)
jmp 0x372d1d
callq 0x3847b0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x1b8(%rax)
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)