// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: processInternalEntity
static enum XML_Error
processInternalEntity(XML_Parser parser, ENTITY *entity,
                      XML_Bool betweenDecl)
{
  const char *textStart, *textEnd;
  const char *next;
  enum XML_Error result;
  OPEN_INTERNAL_ENTITY *openEntity;

  if (freeInternalEntities) {
    openEntity = freeInternalEntities;
    freeInternalEntities = openEntity->next;
  }
  else {
    openEntity = (OPEN_INTERNAL_ENTITY *)MALLOC(sizeof(OPEN_INTERNAL_ENTITY));
    if (!openEntity)
      return XML_ERROR_NO_MEMORY;
  }
  entity->open = XML_TRUE;
  entity->processed = 0;
  openEntity->next = openInternalEntities;
  openInternalEntities = openEntity;
  openEntity->entity = entity;
  openEntity->startTagLevel = tagLevel;
  openEntity->betweenDecl = betweenDecl;
  openEntity->internalEventPtr = NULL;
  openEntity->internalEventEndPtr = NULL;
  textStart = (char *)entity->textPtr;
  textEnd = (char *)(entity->textPtr + entity->textLen);

#ifdef XML_DTD
  if (entity->is_param) {
    int tok = XmlPrologTok(internalEncoding, textStart, textEnd, &next);
    result = doProlog(parser, internalEncoding, textStart, textEnd, tok, 
                      next, &next, XML_FALSE);
  }
  else 
#endif /* XML_DTD */
    result = doContent(parser, tagLevel, internalEncoding, textStart, 
                       textEnd, &next, XML_FALSE);

  if (result == XML_ERROR_NONE) {
    if (textEnd != next && ps_parsing == XML_SUSPENDED) {
      entity->processed = (int)(next - textStart);
      processor = internalEntityProcessor;
    }
    else {
      entity->open = XML_FALSE;
      openInternalEntities = openEntity->next;
      /* put openEntity back in list of free instances */
      openEntity->next = freeInternalEntities;
      freeInternalEntities = openEntity;
    }
  }
  return result;
}

// Assembly:
subq $0x58, %rsp
movb %dl, %al
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movb %al, 0x3f(%rsp)
movq 0x48(%rsp), %rax
cmpq $0x0, 0x230(%rax)
je 0x37d62b
movq 0x48(%rsp), %rax
movq 0x230(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x230(%rax)
jmp 0x37d654
movq 0x48(%rsp), %rax
movl $0x28, %edi
callq *0x18(%rax)
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x37d652
movl $0x1, 0x54(%rsp)
jmp 0x37d7d9
jmp 0x37d654
movq 0x40(%rsp), %rax
movb $0x1, 0x38(%rax)
movq 0x40(%rsp), %rax
movl $0x0, 0x14(%rax)
movq 0x48(%rsp), %rax
movq 0x228(%rax), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x10(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x228(%rax)
movq 0x40(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x48(%rsp), %rax
movl 0x23c(%rax), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x20(%rax)
movb 0x3f(%rsp), %cl
movq 0x10(%rsp), %rax
movb %cl, 0x24(%rax)
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x8(%rax)
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x40(%rsp), %rcx
movslq 0x10(%rcx), %rcx
addq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rdi
movq 0x48(%rsp), %rax
movl 0x23c(%rax), %esi
movq 0x48(%rsp), %rax
movq 0x1b8(%rax), %rdx
movq 0x30(%rsp), %rcx
movq 0x28(%rsp), %r8
leaq 0x20(%rsp), %r9
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x37b940
movl %eax, 0x1c(%rsp)
cmpl $0x0, 0x1c(%rsp)
jne 0x37d7d1
movq 0x28(%rsp), %rax
cmpq 0x20(%rsp), %rax
je 0x37d78b
movq 0x48(%rsp), %rax
cmpl $0x3, 0x378(%rax)
jne 0x37d78b
movq 0x20(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq 0x40(%rsp), %rax
movl %ecx, 0x14(%rax)
movq 0x48(%rsp), %rax
leaq 0x24ee(%rip), %rcx      # 0x37fc70
movq %rcx, 0x200(%rax)
jmp 0x37d7cf
movq 0x40(%rsp), %rax
movb $0x0, 0x38(%rax)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x228(%rax)
movq 0x48(%rsp), %rax
movq 0x230(%rax), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x10(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x230(%rax)
jmp 0x37d7d1
movl 0x1c(%rsp), %eax
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)