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

  if (dtd->defaultPrefix.binding) {
    int i;
    int len;
    if (!poolAppendChar(&tempPool, XML_T(ASCII_EQUALS)))
      return NULL;
    len = dtd->defaultPrefix.binding->uriLen;
    if (namespaceSeparator)
      len--;
    for (i = 0; i < len; i++)
      if (!poolAppendChar(&tempPool, dtd->defaultPrefix.binding->uri[i]))
        return NULL;
    needSep = XML_TRUE;
  }

  hashTableIterInit(&iter, &(dtd->prefixes));
  for (;;) {
    int i;
    int len;
    const XML_Char *s;
    PREFIX *prefix = (PREFIX *)hashTableIterNext(&iter);
    if (!prefix)
      break;
    if (!prefix->binding)
      continue;
    if (needSep && !poolAppendChar(&tempPool, CONTEXT_SEP))
      return NULL;
    for (s = prefix->name; *s; s++)
      if (!poolAppendChar(&tempPool, *s))
        return NULL;
    if (!poolAppendChar(&tempPool, XML_T(ASCII_EQUALS)))
      return NULL;
    len = prefix->binding->uriLen;
    if (namespaceSeparator)
      len--;
    for (i = 0; i < len; i++)
      if (!poolAppendChar(&tempPool, prefix->binding->uri[i]))
        return NULL;
    needSep = XML_TRUE;
  }


  hashTableIterInit(&iter, &(dtd->generalEntities));
  for (;;) {
    const XML_Char *s;
    ENTITY *e = (ENTITY *)hashTableIterNext(&iter);
    if (!e)
      break;
    if (!e->open)
      continue;
    if (needSep && !poolAppendChar(&tempPool, CONTEXT_SEP))
      return NULL;
    for (s = e->name; *s; s++)
      if (!poolAppendChar(&tempPool, *s))
        return 0;
    needSep = XML_TRUE;
  }

  if (!poolAppendChar(&tempPool, XML_T('\0')))
    return NULL;
  return tempPool.start;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x290(%rdi), %r13
cmpq $0x0, 0x110(%r13)
je 0x2592f8
leaq 0x300(%rbx), %r14
movq 0x318(%rbx), %rax
cmpq 0x310(%rbx), %rax
jne 0x259277
movq %r14, %rdi
callq 0x2578ac
testb %al, %al
je 0x2592fd
movq 0x318(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x318(%rbx)
movb $0x3d, (%rax)
movq 0x110(%r13), %rax
cmpb $0x1, 0x36c(%rbx)
movl 0x28(%rax), %eax
adcl $-0x1, %eax
testl %eax, %eax
jle 0x2592f1
movl %eax, %r15d
xorl %r12d, %r12d
movq 0x318(%rbx), %rax
cmpq 0x310(%rbx), %rax
jne 0x2592c6
movq %r14, %rdi
callq 0x2578ac
testb %al, %al
je 0x2592fd
movq 0x110(%r13), %rax
movq 0x20(%rax), %rax
movb (%rax,%r12), %al
movq 0x318(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x318(%rbx)
movb %al, (%rcx)
incq %r12
cmpq %r12, %r15
jne 0x2592aa
movb $0x1, %al
movb $0x1, %r14b
jmp 0x259302
xorl %r14d, %r14d
jmp 0x25930a
xorl %eax, %eax
xorl %r14d, %r14d
testb %al, %al
je 0x2595ef
movq 0x78(%r13), %r12
movq %r13, 0x10(%rsp)
movq 0x88(%r13), %rax
leaq (%r12,%rax,8), %r13
leaq 0x300(%rbx), %rax
movq %rax, (%rsp)
cmpq %r13, %r12
je 0x259341
movq (%r12), %rax
addq $0x8, %r12
testq %rax, %rax
cmovneq %rax, %r15
je 0x259329
jmp 0x259344
xorl %r15d, %r15d
testq %r15, %r15
je 0x259483
cmpq $0x0, 0x8(%r15)
je 0x25948a
testb %r14b, %r14b
je 0x259393
movq 0x318(%rbx), %rax
cmpq 0x310(%rbx), %rax
jne 0x25937e
movq (%rsp), %rdi
callq 0x2578ac
testb %al, %al
je 0x259491
movq 0x318(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x318(%rbx)
movb $0xc, (%rax)
movq (%r15), %rbp
cmpb $0x0, (%rbp)
je 0x2593e1
incq %rbp
movq 0x318(%rbx), %rax
cmpq 0x310(%rbx), %rax
jne 0x2593c0
movq (%rsp), %rdi
callq 0x2578ac
testb %al, %al
je 0x259491
movb -0x1(%rbp), %al
movq 0x318(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x318(%rbx)
movb %al, (%rcx)
cmpb $0x0, (%rbp)
leaq 0x1(%rbp), %rbp
jne 0x25939f
movq 0x318(%rbx), %rax
cmpq 0x310(%rbx), %rax
jne 0x259402
movq (%rsp), %rdi
callq 0x2578ac
testb %al, %al
je 0x259491
movq 0x318(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x318(%rbx)
movb $0x3d, (%rax)
movq 0x8(%r15), %rax
movl 0x28(%rax), %eax
cmpb $0x1, 0x36c(%rbx)
adcl $-0x1, %eax
xorl %ecx, %ecx
testl %eax, %eax
jle 0x259498
movl %r14d, 0xc(%rsp)
movl %eax, %r14d
xorl %ebp, %ebp
movq 0x318(%rbx), %rax
cmpq 0x310(%rbx), %rax
jne 0x259455
movq (%rsp), %rdi
callq 0x2578ac
testb %al, %al
je 0x25949d
movq 0x8(%r15), %rax
movq 0x20(%rax), %rax
movb (%rax,%rbp), %al
movq 0x318(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x318(%rbx)
movb %al, (%rcx)
incq %rbp
cmpq %rbp, %r14
jne 0x259438
movb $0x1, %r14b
xorl %ecx, %ecx
jmp 0x2594a7
movl $0x5, %ecx
jmp 0x2594a7
movl $0x6, %ecx
jmp 0x2594a7
movl $0x1, %ecx
jmp 0x2594a7
movb $0x1, %r14b
jmp 0x2594a7
movl $0x1, %ecx
movl 0xc(%rsp), %r14d
testl %ecx, %ecx
je 0x259329
cmpl $0x6, %ecx
je 0x259329
cmpl $0x5, %ecx
jne 0x2595ef
movq 0x10(%rsp), %rax
movq (%rax), %r15
movq 0x10(%rax), %rax
leaq (%r15,%rax,8), %r12
cmpq %r12, %r15
je 0x2594e8
movq (%r15), %rax
addq $0x8, %r15
testq %rax, %rax
cmovneq %rax, %r13
je 0x2594d1
jmp 0x2594eb
xorl %r13d, %r13d
testq %r13, %r13
je 0x25958b
cmpb $0x0, 0x38(%r13)
je 0x259592
testb %r14b, %r14b
je 0x259536
movq 0x318(%rbx), %rax
cmpq 0x310(%rbx), %rax
jne 0x259521
movq (%rsp), %rdi
callq 0x2578ac
testb %al, %al
je 0x259599
movq 0x318(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x318(%rbx)
movb $0xc, (%rax)
movq (%r13), %r13
xorl %ebp, %ebp
cmpb $0x0, (%r13)
je 0x259586
incq %r13
movq 0x318(%rbx), %rax
cmpq 0x310(%rbx), %rax
jne 0x259563
movq (%rsp), %rdi
callq 0x2578ac
testb %al, %al
je 0x259599
movb -0x1(%r13), %al
movq 0x318(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x318(%rbx)
movb %al, (%rcx)
cmpb $0x0, (%r13)
leaq 0x1(%r13), %r13
jne 0x259546
movb $0x1, %r14b
jmp 0x25959e
movl $0xd, %ebp
jmp 0x25959e
movl $0xe, %ebp
jmp 0x25959e
movl $0x1, %ebp
testl %ebp, %ebp
je 0x2594d1
cmpl $0xe, %ebp
je 0x2594d1
cmpl $0xd, %ebp
jne 0x2595ef
movq 0x318(%rbx), %rax
cmpq 0x310(%rbx), %rax
jne 0x2595d1
movq (%rsp), %rdi
callq 0x2578ac
testb %al, %al
je 0x2595ef
movq 0x318(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x318(%rbx)
movb $0x0, (%rax)
movq 0x320(%rbx), %rax
jmp 0x2595f1
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq