// File: /workspace/github_c_makefile_star2_O3/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, %r14
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movq 0x290(%rdi), %rbx
leaq 0xa0(%rbx), %r15
movq 0xb8(%rbx), %rax
cmpq 0xb0(%rbx), %rax
jne 0x24f4b1
movq %r15, %rdi
callq 0x24f7dc
testb %al, %al
je 0x24f632
movq 0xb8(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%rbx)
movb $0x0, (%rax)
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x24f2f4
testq %rax, %rax
je 0x24f632
movq %rax, %r13
leaq 0x1(%rax), %r12
leaq 0x50(%rbx), %rdi
movl $0x18, %edx
movq %r12, %rsi
callq 0x24f9cf
testq %rax, %rax
je 0x24f632
movq %rax, %r14
cmpq %r12, (%rax)
je 0x24f515
movq 0xc0(%rbx), %rax
movq %rax, 0xb8(%rbx)
jmp 0x24f635
movq 0xb8(%rbx), %rax
movq %rax, 0xc0(%rbx)
cmpb $0x0, 0x1c8(%rbp)
je 0x24f635
movb (%r12), %cl
cmpb $0x78, %cl
jne 0x24f573
cmpb $0x6d, 0x2(%r13)
jne 0x24f573
cmpb $0x6c, 0x3(%r13)
jne 0x24f573
cmpb $0x6e, 0x4(%r13)
jne 0x24f573
cmpb $0x73, 0x5(%r13)
jne 0x24f573
movzbl 0x6(%r13), %edx
cmpl $0x3a, %edx
je 0x24f657
testl %edx, %edx
jne 0x24f573
addq $0x108, %rbx            # imm = 0x108
jmp 0x24f672
xorl %ebp, %ebp
testb %cl, %cl
je 0x24f635
movzbl %cl, %ecx
cmpl $0x3a, %ecx
je 0x24f58f
movb 0x2(%r13,%rbp), %cl
incq %rbp
jmp 0x24f575
testq %rbp, %rbp
je 0x24f5da
xorl %r13d, %r13d
movq 0xb8(%rbx), %rax
cmpq 0xb0(%rbx), %rax
jne 0x24f5ba
movq %r15, %rdi
callq 0x24f7dc
testb %al, %al
je 0x24f632
movq 0xb8(%rbx), %rax
movb (%r12,%r13), %cl
leaq 0x1(%rax), %rdx
movq %rdx, 0xb8(%rbx)
movb %cl, (%rax)
incq %r13
cmpq %r13, %rbp
jne 0x24f597
movq 0xb8(%rbx), %rax
cmpq 0xb0(%rbx), %rax
jne 0x24f5f6
movq %r15, %rdi
callq 0x24f7dc
testb %al, %al
je 0x24f632
movq 0xb8(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%rbx)
movb $0x0, (%rax)
leaq 0x78(%rbx), %rdi
movq 0xc0(%rbx), %rsi
movl $0x10, %edx
callq 0x24f9cf
movq %rax, 0x8(%r14)
movq 0xc0(%rbx), %rcx
cmpq %rcx, (%rax)
je 0x24f647
movq %rcx, 0xb8(%rbx)
jmp 0x24f635
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xb8(%rbx), %rax
movq %rax, 0xc0(%rbx)
jmp 0x24f635
addq $0x78, %rbx
addq $0x7, %r13
movl $0x10, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x24f9cf
movq %rax, %rbx
movq %rbx, 0x8(%r14)
movb $0x1, 0x11(%r14)
jmp 0x24f635