// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq 0x290(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x3731cd
movq 0x20(%rsp), %rax
movsbl (%rax), %eax
cmpl $0xc, %eax
je 0x372d98
movq 0x20(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x372e6e
movq 0x38(%rsp), %rax
movq 0x318(%rax), %rax
movq 0x38(%rsp), %rcx
cmpq 0x310(%rcx), %rax
jne 0x372dcf
movq 0x38(%rsp), %rdi
addq $0x300, %rdi            # imm = 0x300
callq 0x37a570
cmpb $0x0, %al
jne 0x372dcf
xorl %eax, %eax
testb $0x1, %al
jne 0x372dfc
jmp 0x372df2
movq 0x38(%rsp), %rcx
movq 0x318(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x318(%rcx)
movb $0x0, (%rax)
movb $0x1, %al
testb $0x1, %al
jne 0x372dfc
movb $0x0, 0x47(%rsp)
jmp 0x3731d2
movq 0x28(%rsp), %rdi
movq 0x38(%rsp), %rax
movq 0x320(%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x37ade0
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x372e2c
movq 0x18(%rsp), %rax
movb $0x1, 0x38(%rax)
movq 0x20(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x372e47
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq 0x320(%rax), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x318(%rax)
jmp 0x3731c8
movq 0x20(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x373151
movq 0x38(%rsp), %rax
movq 0x318(%rax), %rax
movq 0x38(%rsp), %rcx
movq 0x320(%rcx), %rcx
subq %rcx, %rax
cmpq $0x0, %rax
jne 0x372eb5
movq 0x28(%rsp), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, 0x10(%rsp)
jmp 0x372fb8
movq 0x38(%rsp), %rax
movq 0x318(%rax), %rax
movq 0x38(%rsp), %rcx
cmpq 0x310(%rcx), %rax
jne 0x372eec
movq 0x38(%rsp), %rdi
addq $0x300, %rdi            # imm = 0x300
callq 0x37a570
cmpb $0x0, %al
jne 0x372eec
xorl %eax, %eax
testb $0x1, %al
jne 0x372f19
jmp 0x372f0f
movq 0x38(%rsp), %rcx
movq 0x318(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x318(%rcx)
movb $0x0, (%rax)
movb $0x1, %al
testb $0x1, %al
jne 0x372f19
movb $0x0, 0x47(%rsp)
jmp 0x3731d2
movq 0x28(%rsp), %rdi
addq $0x78, %rdi
movq 0x38(%rsp), %rax
movq 0x320(%rax), %rsi
movl $0x10, %edx
callq 0x37ade0
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x372f4f
movb $0x0, 0x47(%rsp)
jmp 0x3731d2
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x38(%rsp), %rcx
cmpq 0x320(%rcx), %rax
jne 0x372fa0
movq 0x28(%rsp), %rdi
addq $0xa0, %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rsi
callq 0x373d60
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x372f9e
movb $0x0, 0x47(%rsp)
jmp 0x3731d2
jmp 0x372fa0
movq 0x38(%rsp), %rax
movq 0x320(%rax), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x318(%rax)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0xc, %ecx
movb %al, 0xf(%rsp)
je 0x372feb
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x372ff5
jmp 0x373074
movq 0x38(%rsp), %rax
movq 0x318(%rax), %rax
movq 0x38(%rsp), %rcx
cmpq 0x310(%rcx), %rax
jne 0x37302c
movq 0x38(%rsp), %rdi
addq $0x300, %rdi            # imm = 0x300
callq 0x37a570
cmpb $0x0, %al
jne 0x37302c
xorl %eax, %eax
testb $0x1, %al
jne 0x37305f
jmp 0x373055
movq 0x30(%rsp), %rax
movb (%rax), %cl
movq 0x38(%rsp), %rdx
movq 0x318(%rdx), %rax
movq %rax, %rsi
addq $0x1, %rsi
movq %rsi, 0x318(%rdx)
movb %cl, (%rax)
movb $0x1, %al
testb $0x1, %al
jne 0x37305f
movb $0x0, 0x47(%rsp)
jmp 0x3731d2
jmp 0x373061
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x372fc6
movq 0x38(%rsp), %rax
movq 0x318(%rax), %rax
movq 0x38(%rsp), %rcx
cmpq 0x310(%rcx), %rax
jne 0x3730ab
movq 0x38(%rsp), %rdi
addq $0x300, %rdi            # imm = 0x300
callq 0x37a570
cmpb $0x0, %al
jne 0x3730ab
xorl %eax, %eax
testb $0x1, %al
jne 0x3730d8
jmp 0x3730ce
movq 0x38(%rsp), %rcx
movq 0x318(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x318(%rcx)
movb $0x0, (%rax)
movb $0x1, %al
testb $0x1, %al
jne 0x3730d8
movb $0x0, 0x47(%rsp)
jmp 0x3731d2
movq 0x38(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x38(%rsp), %rax
movq 0x320(%rax), %rcx
movq 0x38(%rsp), %r8
addq $0x2b0, %r8             # imm = 0x2B0
xorl %eax, %eax
movl %eax, %edx
callq 0x3800f0
cmpl $0x0, %eax
je 0x373112
movb $0x0, 0x47(%rsp)
jmp 0x3731d2
movq 0x38(%rsp), %rax
movq 0x320(%rax), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x318(%rax)
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x373145
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x3731c6
movq 0x38(%rsp), %rax
movq 0x318(%rax), %rax
movq 0x38(%rsp), %rcx
cmpq 0x310(%rcx), %rax
jne 0x373188
movq 0x38(%rsp), %rdi
addq $0x300, %rdi            # imm = 0x300
callq 0x37a570
cmpb $0x0, %al
jne 0x373188
xorl %eax, %eax
testb $0x1, %al
jne 0x3731b8
jmp 0x3731b1
movq 0x20(%rsp), %rax
movb (%rax), %cl
movq 0x38(%rsp), %rdx
movq 0x318(%rdx), %rax
movq %rax, %rsi
addq $0x1, %rsi
movq %rsi, 0x318(%rdx)
movb %cl, (%rax)
movb $0x1, %al
testb $0x1, %al
jne 0x3731b8
movb $0x0, 0x47(%rsp)
jmp 0x3731d2
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x3731c8
jmp 0x372d69
movb $0x1, 0x47(%rsp)
movb 0x47(%rsp), %al
addq $0x48, %rsp
retq
nopl (%rax,%rax)