// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: setContext
static XML_Bool
setContext(XML_Parser parser, const XML_Char *context)
{
  DTD * const dtd = _dtd;  /* save one level of indirection */
  const XML_Char *s = context;

  while (*context != XML_T('\0')) {
    if (*s == CONTEXT_SEP || *s == XML_T('\0')) {
      ENTITY *e;
      if (!poolAppendChar(&tempPool, XML_T('\0')))
        return XML_FALSE;
      e = (ENTITY *)lookup(&dtd->generalEntities, poolStart(&tempPool), 0);
      if (e)
        e->open = XML_TRUE;
      if (*s != XML_T('\0'))
        s++;
      context = s;
      poolDiscard(&tempPool);
    }
    else if (*s == XML_T(ASCII_EQUALS)) {
      PREFIX *prefix;
      if (poolLength(&tempPool) == 0)
        prefix = &dtd->defaultPrefix;
      else {
        if (!poolAppendChar(&tempPool, XML_T('\0')))
          return XML_FALSE;
        prefix = (PREFIX *)lookup(&dtd->prefixes, poolStart(&tempPool),
                                  sizeof(PREFIX));
        if (!prefix)
          return XML_FALSE;
        if (prefix->name == poolStart(&tempPool)) {
          prefix->name = poolCopyString(&dtd->pool, prefix->name);
          if (!prefix->name)
            return XML_FALSE;
        }
        poolDiscard(&tempPool);
      }
      for (context = s + 1;
           *context != CONTEXT_SEP && *context != XML_T('\0');
           context++)
        if (!poolAppendChar(&tempPool, *context))
          return XML_FALSE;
      if (!poolAppendChar(&tempPool, XML_T('\0')))
        return XML_FALSE;
      if (addBinding(parser, prefix, NULL, poolStart(&tempPool),
                     &inheritedBindings) != XML_ERROR_NONE)
        return XML_FALSE;
      poolDiscard(&tempPool);
      if (*context != XML_T('\0'))
        ++context;
      s = context;
    }
    else {
      if (!poolAppendChar(&tempPool, *s))
        return XML_FALSE;
      s++;
    }
  }
  return XML_TRUE;
}

// Assembly:
movb $0x1, %al
cmpb $0x0, (%rsi)
je 0x253720
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x290(%rdi), %rax
leaq 0x300(%rdi), %r12
leaq 0x78(%rax), %rcx
movq %rcx, 0x10(%rsp)
leaq 0xa0(%rax), %rcx
movq %rcx, (%rsp)
movq %rax, 0x20(%rsp)
addq $0x108, %rax            # imm = 0x108
movq %rax, 0x18(%rsp)
leaq 0x2b0(%rdi), %rax
movq %rax, 0x8(%rsp)
movq %rsi, %rbp
movzbl (%rbx), %eax
testl %eax, %eax
je 0x2534e5
cmpl $0x3d, %eax
je 0x25355d
cmpl $0xc, %eax
jne 0x253643
movq 0x318(%r14), %rax
cmpq 0x310(%r14), %rax
jne 0x253505
movq %r12, %rdi
callq 0x2578ac
testb %al, %al
je 0x253705
movq 0x318(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x318(%r14)
movb $0x0, (%rax)
movq 0x320(%r14), %rsi
movq 0x20(%rsp), %rdi
xorl %edx, %edx
callq 0x257a9b
testq %rax, %rax
je 0x253536
movb $0x1, 0x38(%rax)
cmpb $0x1, (%rbx)
sbbq $-0x1, %rbx
movq 0x320(%r14), %rax
movq %rax, 0x318(%r14)
movb $0x1, %al
movq %rbx, %rbp
testb %al, %al
jne 0x2536f9
jmp 0x253710
movq 0x318(%r14), %rax
movq 0x18(%rsp), %r13
cmpq 0x320(%r14), %rax
je 0x2535f6
cmpq 0x310(%r14), %rax
jne 0x25358f
movq %r12, %rdi
callq 0x2578ac
testb %al, %al
je 0x2536f1
movq 0x318(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x318(%r14)
movb $0x0, (%rax)
movq 0x320(%r14), %rsi
movl $0x10, %edx
movq 0x10(%rsp), %rdi
callq 0x257a9b
testq %rax, %rax
je 0x2536f1
movq %rax, %r13
movq (%rax), %rsi
cmpq 0x320(%r14), %rsi
jne 0x2535e8
movq (%rsp), %rdi
callq 0x253ed5
movq %rax, (%r13)
testq %rax, %rax
je 0x2536f1
movq 0x320(%r14), %rax
movq %rax, 0x318(%r14)
leaq 0x1(%rbx), %rbp
movzbl (%rbp), %eax
testl %eax, %eax
je 0x25367e
cmpl $0xc, %eax
je 0x25367e
movq 0x318(%r14), %rax
cmpq 0x310(%r14), %rax
jne 0x253627
movq %r12, %rdi
callq 0x2578ac
testb %al, %al
je 0x2536f1
movb (%rbp), %al
movq 0x318(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x318(%r14)
movb %al, (%rcx)
incq %rbp
jmp 0x2535fa
movq 0x318(%r14), %rax
cmpq 0x310(%r14), %rax
jne 0x253663
movq %r12, %rdi
callq 0x2578ac
testb %al, %al
je 0x253710
movb (%rbx), %al
movq 0x318(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x318(%r14)
movb %al, (%rcx)
incq %rbx
jmp 0x2536f9
movq 0x318(%r14), %rax
cmpq 0x310(%r14), %rax
jne 0x25369a
movq %r12, %rdi
callq 0x2578ac
testb %al, %al
je 0x2536f1
movq 0x318(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x318(%r14)
movb $0x0, (%rax)
movq 0x320(%r14), %rcx
xorl %r15d, %r15d
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
movq 0x8(%rsp), %r8
callq 0x25a9ca
testl %eax, %eax
jne 0x2536f4
movq 0x320(%r14), %rax
movq %rax, 0x318(%r14)
leaq 0x1(%rbp), %rax
cmpb $0x0, (%rbp)
cmovneq %rax, %rbp
movb $0x1, %r15b
movq %rbp, %rbx
jmp 0x2536f4
xorl %r15d, %r15d
testb %r15b, %r15b
je 0x253710
cmpb $0x0, (%rbp)
jne 0x2534cc
jmp 0x25370c
xorl %eax, %eax
jmp 0x253550
movb $0x1, %al
jmp 0x253712
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq