// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq 0x290(%rax), %rax
movq %rax, 0x50(%rsp)
movb $0x0, 0x3f(%rsp)
movq 0x50(%rsp), %rax
cmpq $0x0, 0x110(%rax)
je 0x37d962
movq 0x58(%rsp), %rax
movq 0x318(%rax), %rax
movq 0x58(%rsp), %rcx
cmpq 0x310(%rcx), %rax
jne 0x37d859
movq 0x58(%rsp), %rdi
addq $0x300, %rdi            # imm = 0x300
callq 0x37a570
cmpb $0x0, %al
jne 0x37d859
xorl %eax, %eax
testb $0x1, %al
jne 0x37d88a
jmp 0x37d87c
movq 0x58(%rsp), %rcx
movq 0x318(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x318(%rcx)
movb $0x3d, (%rax)
movb $0x1, %al
testb $0x1, %al
jne 0x37d88a
movq $0x0, 0x60(%rsp)
jmp 0x37ddb6
movq 0x50(%rsp), %rax
movq 0x110(%rax), %rax
movl 0x28(%rax), %eax
movl %eax, 0x34(%rsp)
movq 0x58(%rsp), %rax
cmpb $0x0, 0x36c(%rax)
je 0x37d8b6
movl 0x34(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x34(%rsp)
movl $0x0, 0x38(%rsp)
movl 0x38(%rsp), %eax
cmpl 0x34(%rsp), %eax
jge 0x37d95d
movq 0x58(%rsp), %rax
movq 0x318(%rax), %rax
movq 0x58(%rsp), %rcx
cmpq 0x310(%rcx), %rax
jne 0x37d903
movq 0x58(%rsp), %rdi
addq $0x300, %rdi            # imm = 0x300
callq 0x37a570
cmpb $0x0, %al
jne 0x37d903
xorl %eax, %eax
testb $0x1, %al
jne 0x37d94b
jmp 0x37d93d
movq 0x50(%rsp), %rax
movq 0x110(%rax), %rax
movq 0x20(%rax), %rax
movslq 0x38(%rsp), %rcx
movb (%rax,%rcx), %cl
movq 0x58(%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 0x37d94b
movq $0x0, 0x60(%rsp)
jmp 0x37ddb6
jmp 0x37d94d
movl 0x38(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x38(%rsp)
jmp 0x37d8be
movb $0x1, 0x3f(%rsp)
movq 0x50(%rsp), %rsi
addq $0x78, %rsi
leaq 0x40(%rsp), %rdi
callq 0x37fe50
leaq 0x40(%rsp), %rdi
callq 0x37fe90
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x37d991
jmp 0x37dbee
movq 0x18(%rsp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x37d99f
jmp 0x37d975
movzbl 0x3f(%rsp), %eax
cmpl $0x0, %eax
je 0x37da11
movq 0x58(%rsp), %rax
movq 0x318(%rax), %rax
movq 0x58(%rsp), %rcx
cmpq 0x310(%rcx), %rax
jne 0x37d9e0
movq 0x58(%rsp), %rdi
addq $0x300, %rdi            # imm = 0x300
callq 0x37a570
cmpb $0x0, %al
jne 0x37d9e0
xorl %eax, %eax
testb $0x1, %al
jne 0x37da11
jmp 0x37da03
movq 0x58(%rsp), %rcx
movq 0x318(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x318(%rcx)
movb $0xc, (%rax)
movb $0x1, %al
testb $0x1, %al
jne 0x37da11
movq $0x0, 0x60(%rsp)
jmp 0x37ddb6
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpb $0x0, (%rax)
je 0x37daaf
movq 0x58(%rsp), %rax
movq 0x318(%rax), %rax
movq 0x58(%rsp), %rcx
cmpq 0x310(%rcx), %rax
jne 0x37da63
movq 0x58(%rsp), %rdi
addq $0x300, %rdi            # imm = 0x300
callq 0x37a570
cmpb $0x0, %al
jne 0x37da63
xorl %eax, %eax
testb $0x1, %al
jne 0x37da9a
jmp 0x37da8c
movq 0x20(%rsp), %rax
movb (%rax), %cl
movq 0x58(%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 0x37da9a
movq $0x0, 0x60(%rsp)
jmp 0x37ddb6
jmp 0x37da9c
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x37da1e
movq 0x58(%rsp), %rax
movq 0x318(%rax), %rax
movq 0x58(%rsp), %rcx
cmpq 0x310(%rcx), %rax
jne 0x37dae6
movq 0x58(%rsp), %rdi
addq $0x300, %rdi            # imm = 0x300
callq 0x37a570
cmpb $0x0, %al
jne 0x37dae6
xorl %eax, %eax
testb $0x1, %al
jne 0x37db17
jmp 0x37db09
movq 0x58(%rsp), %rcx
movq 0x318(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x318(%rcx)
movb $0x3d, (%rax)
movb $0x1, %al
testb $0x1, %al
jne 0x37db17
movq $0x0, 0x60(%rsp)
jmp 0x37ddb6
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x28(%rax), %eax
movl %eax, 0x2c(%rsp)
movq 0x58(%rsp), %rax
cmpb $0x0, 0x36c(%rax)
je 0x37db40
movl 0x2c(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x2c(%rsp)
movl $0x0, 0x30(%rsp)
movl 0x30(%rsp), %eax
cmpl 0x2c(%rsp), %eax
jge 0x37dbe4
movq 0x58(%rsp), %rax
movq 0x318(%rax), %rax
movq 0x58(%rsp), %rcx
cmpq 0x310(%rcx), %rax
jne 0x37db8d
movq 0x58(%rsp), %rdi
addq $0x300, %rdi            # imm = 0x300
callq 0x37a570
cmpb $0x0, %al
jne 0x37db8d
xorl %eax, %eax
testb $0x1, %al
jne 0x37dbd2
jmp 0x37dbc4
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rax
movslq 0x30(%rsp), %rcx
movb (%rax,%rcx), %cl
movq 0x58(%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 0x37dbd2
movq $0x0, 0x60(%rsp)
jmp 0x37ddb6
jmp 0x37dbd4
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0x37db48
movb $0x1, 0x3f(%rsp)
jmp 0x37d975
movq 0x50(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x37fe50
leaq 0x40(%rsp), %rdi
callq 0x37fe90
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x37dc19
jmp 0x37dd40
movq 0x8(%rsp), %rax
cmpb $0x0, 0x38(%rax)
jne 0x37dc26
jmp 0x37dbfd
movzbl 0x3f(%rsp), %eax
cmpl $0x0, %eax
je 0x37dc98
movq 0x58(%rsp), %rax
movq 0x318(%rax), %rax
movq 0x58(%rsp), %rcx
cmpq 0x310(%rcx), %rax
jne 0x37dc67
movq 0x58(%rsp), %rdi
addq $0x300, %rdi            # imm = 0x300
callq 0x37a570
cmpb $0x0, %al
jne 0x37dc67
xorl %eax, %eax
testb $0x1, %al
jne 0x37dc98
jmp 0x37dc8a
movq 0x58(%rsp), %rcx
movq 0x318(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x318(%rcx)
movb $0xc, (%rax)
movb $0x1, %al
testb $0x1, %al
jne 0x37dc98
movq $0x0, 0x60(%rsp)
jmp 0x37ddb6
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpb $0x0, (%rax)
je 0x37dd36
movq 0x58(%rsp), %rax
movq 0x318(%rax), %rax
movq 0x58(%rsp), %rcx
cmpq 0x310(%rcx), %rax
jne 0x37dcea
movq 0x58(%rsp), %rdi
addq $0x300, %rdi            # imm = 0x300
callq 0x37a570
cmpb $0x0, %al
jne 0x37dcea
xorl %eax, %eax
testb $0x1, %al
jne 0x37dd21
jmp 0x37dd13
movq 0x10(%rsp), %rax
movb (%rax), %cl
movq 0x58(%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 0x37dd21
movq $0x0, 0x60(%rsp)
jmp 0x37ddb6
jmp 0x37dd23
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x37dca5
movb $0x1, 0x3f(%rsp)
jmp 0x37dbfd
movq 0x58(%rsp), %rax
movq 0x318(%rax), %rax
movq 0x58(%rsp), %rcx
cmpq 0x310(%rcx), %rax
jne 0x37dd77
movq 0x58(%rsp), %rdi
addq $0x300, %rdi            # imm = 0x300
callq 0x37a570
cmpb $0x0, %al
jne 0x37dd77
xorl %eax, %eax
testb $0x1, %al
jne 0x37dda5
jmp 0x37dd9a
movq 0x58(%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 0x37dda5
movq $0x0, 0x60(%rsp)
jmp 0x37ddb6
movq 0x58(%rsp), %rax
movq 0x320(%rax), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
addq $0x68, %rsp
retq