// File: /workspace/github_c_makefile_star2_O3/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 0x24bd73
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %r14
movq 0x290(%rdi), %r12
leaq 0x300(%rdi), %r13
leaq 0x78(%r12), %rax
movq %rax, 0x8(%rsp)
leaq 0xa0(%r12), %rax
movq %rax, (%rsp)
leaq 0x108(%r12), %rbx
leaq 0x2b0(%rdi), %rax
movq %rax, 0x10(%rsp)
movq %rsi, %rbp
movzbl (%r15), %eax
testl %eax, %eax
je 0x24bb5e
cmpl $0x3d, %eax
je 0x24bbcb
cmpl $0xc, %eax
jne 0x24bcae
movq 0x318(%r14), %rax
cmpq 0x310(%r14), %rax
jne 0x24bb85
movq %r13, %rdi
callq 0x24f7dc
testb %al, %al
je 0x24bd63
movq 0x318(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x318(%r14)
movb $0x0, (%rax)
movq 0x320(%r14), %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x24f9cf
testq %rax, %rax
je 0x24bbad
movb $0x1, 0x38(%rax)
cmpb $0x1, (%r15)
sbbq $-0x1, %r15
movq 0x320(%r14), %rax
movq %rax, 0x318(%r14)
movq %r15, %rbp
jmp 0x24bd55
movq 0x318(%r14), %rax
movq %rbx, %rbp
cmpq 0x320(%r14), %rax
je 0x24bc65
cmpq 0x310(%r14), %rax
jne 0x24bc02
movq %r13, %rdi
callq 0x24f7dc
testb %al, %al
je 0x24bd63
movq 0x318(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x318(%r14)
movb $0x0, (%rax)
movq 0x320(%r14), %rsi
movl $0x10, %edx
movq 0x8(%rsp), %rdi
callq 0x24f9cf
testq %rax, %rax
je 0x24bd63
movq %rax, %rbp
movq (%rax), %rsi
movq 0x320(%r14), %rax
cmpq %rax, %rsi
jne 0x24bc5e
movq (%rsp), %rdi
callq 0x24c4fc
movq %rax, (%rbp)
testq %rax, %rax
je 0x24bd63
movq 0x320(%r14), %rax
movq %rax, 0x318(%r14)
incq %r15
movzbl (%r15), %eax
testl %eax, %eax
je 0x24bcea
cmpl $0xc, %eax
je 0x24bcea
movq 0x318(%r14), %rcx
cmpq 0x310(%r14), %rcx
jne 0x24bc9f
movq %r13, %rdi
callq 0x24f7dc
testb %al, %al
je 0x24bd63
movb (%r15), %al
movq 0x318(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x318(%r14)
movb %al, (%rcx)
jmp 0x24bc65
movq 0x318(%r14), %rcx
cmpq 0x310(%r14), %rcx
jne 0x24bcd8
movq %r13, %rdi
callq 0x24f7dc
testb %al, %al
je 0x24bd63
movb (%r15), %al
movq 0x318(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x318(%r14)
movb %al, (%rcx)
incq %r15
jmp 0x24bd55
movq 0x318(%r14), %rax
cmpq 0x310(%r14), %rax
jne 0x24bd0d
movq %r13, %rdi
callq 0x24f7dc
testb %al, %al
je 0x24bd63
movq 0x318(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x318(%r14)
movb $0x0, (%rax)
movq 0x320(%r14), %rcx
movq %r14, %rdi
movq %rbp, %rsi
xorl %edx, %edx
movq 0x10(%rsp), %r8
callq 0x25236e
testl %eax, %eax
jne 0x24bd63
movq 0x320(%r14), %rax
movq %rax, 0x318(%r14)
cmpb $0x0, (%r15)
leaq 0x1(%r15), %rbp
cmoveq %r15, %rbp
movq %rbp, %r15
cmpb $0x0, (%rbp)
jne 0x24bb48
movb $0x1, %al
jmp 0x24bd65
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq