// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: getAttributeId
static ATTRIBUTE_ID *
getAttributeId(XML_Parser parser, const ENCODING *enc,
               const char *start, const char *end)
{
  DTD * const dtd = _dtd;  /* save one level of indirection */
  ATTRIBUTE_ID *id;
  const XML_Char *name;
  if (!poolAppendChar(&dtd->pool, XML_T('\0')))
    return NULL;
  name = poolStoreString(&dtd->pool, enc, start, end);
  if (!name)
    return NULL;
  /* skip quotation mark - its storage will be re-used (like in name[-1]) */
  ++name;
  id = (ATTRIBUTE_ID *)lookup(&dtd->attributeIds, name, sizeof(ATTRIBUTE_ID));
  if (!id)
    return NULL;
  if (id->name != name)
    poolDiscard(&dtd->pool);
  else {
    poolFinish(&dtd->pool);
    if (!ns)
      ;
    else if (name[0] == XML_T(ASCII_x)
        && name[1] == XML_T(ASCII_m)
        && name[2] == XML_T(ASCII_l)
        && name[3] == XML_T(ASCII_n)
        && name[4] == XML_T(ASCII_s)
        && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) {
      if (name[5] == XML_T('\0'))
        id->prefix = &dtd->defaultPrefix;
      else
        id->prefix = (PREFIX *)lookup(&dtd->prefixes, name + 6, sizeof(PREFIX));
      id->xmlns = XML_TRUE;
    }
    else {
      int i;
      for (i = 0; name[i]; i++) {
        /* attributes without prefix are *not* in the default namespace */
        if (name[i] == XML_T(ASCII_COLON)) {
          int j;
          for (j = 0; j < i; j++) {
            if (!poolAppendChar(&dtd->pool, name[j]))
              return NULL;
          }
          if (!poolAppendChar(&dtd->pool, XML_T('\0')))
            return NULL;
          id->prefix = (PREFIX *)lookup(&dtd->prefixes, poolStart(&dtd->pool),
                                        sizeof(PREFIX));
          if (id->prefix->name == poolStart(&dtd->pool))
            poolFinish(&dtd->pool);
          else
            poolDiscard(&dtd->pool);
          break;
        }
      }
    }
  }
  return id;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movq 0x290(%rdi), %r14
leaq 0xa0(%r14), %r15
movq 0xb8(%r14), %rax
cmpq 0xb0(%r14), %rax
jne 0x25754c
movq %r15, %rdi
callq 0x2578ac
testb %al, %al
je 0x2576cf
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movb $0x0, (%rax)
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x2573a3
testq %rax, %rax
je 0x2576cf
movq %rax, %r13
leaq 0x1(%rax), %r12
leaq 0x50(%r14), %rdi
movl $0x18, %edx
movq %r12, %rsi
callq 0x257a9b
testq %rax, %rax
je 0x2576cf
movq %rax, %rbx
cmpq %r12, (%rax)
je 0x2575b7
movq 0xc0(%r14), %rax
movq %rax, 0xb8(%r14)
jmp 0x2576d1
movq 0xb8(%r14), %rax
movq %rax, 0xc0(%r14)
cmpb $0x0, 0x1c8(%rbp)
je 0x2576d1
cmpb $0x78, (%r12)
jne 0x257613
cmpb $0x6d, 0x2(%r13)
jne 0x257613
cmpb $0x6c, 0x3(%r13)
jne 0x257613
cmpb $0x6e, 0x4(%r13)
jne 0x257613
cmpb $0x73, 0x5(%r13)
jne 0x257613
movzbl 0x6(%r13), %eax
cmpl $0x3a, %eax
je 0x2576f3
testl %eax, %eax
jne 0x257613
addq $0x108, %r14            # imm = 0x108
jmp 0x25770e
xorl %r13d, %r13d
movzbl (%r12,%r13), %eax
testl %eax, %eax
je 0x2576d1
cmpl $0x3a, %eax
je 0x25762d
incq %r13
jmp 0x257616
testq %r13, %r13
je 0x257670
xorl %ebp, %ebp
movq 0xb8(%r14), %rax
cmpq 0xb0(%r14), %rax
jne 0x257650
movq %r15, %rdi
callq 0x2578ac
testb %al, %al
je 0x2576cf
movb (%r12,%rbp), %al
movq 0xb8(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0xb8(%r14)
movb %al, (%rcx)
incq %rbp
cmpq %rbp, %r13
jne 0x257634
movq 0xb8(%r14), %rax
cmpq 0xb0(%r14), %rax
jne 0x25768c
movq %r15, %rdi
callq 0x2578ac
testb %al, %al
je 0x2576cf
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movb $0x0, (%rax)
leaq 0x78(%r14), %rdi
movq 0xc0(%r14), %rsi
movl $0x10, %edx
callq 0x257a9b
movq %rax, 0x8(%rbx)
movq 0xc0(%r14), %rcx
cmpq %rcx, (%rax)
je 0x2576e3
movq %rcx, 0xb8(%r14)
jmp 0x2576d1
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xb8(%r14), %rax
movq %rax, 0xc0(%r14)
jmp 0x2576d1
addq $0x78, %r14
addq $0x7, %r13
movl $0x10, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x257a9b
movq %rax, %r14
movq %r14, 0x8(%rbx)
movb $0x1, 0x11(%rbx)
jmp 0x2576d1