// File: /workspace/github_c_makefile_star2_O2/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 0x1fedb8
movq %r15, %rdi
callq 0x1ff0dd
testb %al, %al
je 0x1fef29
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 0x1fec0c
testq %rax, %rax
je 0x1fef29
movq %rax, %r13
leaq 0x1(%rax), %r12
leaq 0x50(%rbx), %rdi
pushq $0x18
popq %rdx
movq %r12, %rsi
callq 0x1ff2cb
testq %rax, %rax
je 0x1fef29
movq %rax, %r14
cmpq %r12, (%rax)
je 0x1fee1a
movq 0xc0(%rbx), %rax
movq %rax, 0xb8(%rbx)
jmp 0x1fef2c
movq 0xb8(%rbx), %rax
movq %rax, 0xc0(%rbx)
cmpb $0x0, 0x1c8(%rbp)
je 0x1fef2c
movb (%r12), %al
cmpb $0x78, %al
jne 0x1fee77
cmpb $0x6d, 0x2(%r13)
jne 0x1fee77
cmpb $0x6c, 0x3(%r13)
jne 0x1fee77
cmpb $0x6e, 0x4(%r13)
jne 0x1fee77
cmpb $0x73, 0x5(%r13)
jne 0x1fee77
movzbl 0x6(%r13), %ecx
cmpl $0x3a, %ecx
je 0x1fef4e
testl %ecx, %ecx
jne 0x1fee77
addq $0x108, %rbx            # imm = 0x108
jmp 0x1fef67
xorl %ebp, %ebp
testb %al, %al
je 0x1fef2c
movzbl %al, %eax
cmpl $0x3a, %eax
je 0x1fee93
movb 0x2(%r13,%rbp), %al
incq %rbp
jmp 0x1fee79
xorl %r13d, %r13d
movq 0xb0(%rbx), %rcx
movq 0xb8(%rbx), %rax
cmpq %r13, %rbp
je 0x1feed7
cmpq %rcx, %rax
jne 0x1feec1
movq %r15, %rdi
callq 0x1ff0dd
testb %al, %al
je 0x1fef29
movq 0xb8(%rbx), %rax
movb (%r12,%r13), %cl
leaq 0x1(%rax), %rdx
movq %rdx, 0xb8(%rbx)
movb %cl, (%rax)
incq %r13
jmp 0x1fee96
cmpq %rcx, %rax
jne 0x1feeef
movq %r15, %rdi
callq 0x1ff0dd
testb %al, %al
je 0x1fef29
movq 0xb8(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%rbx)
movb $0x0, (%rax)
leaq 0x78(%rbx), %rdi
movq 0xc0(%rbx), %rsi
pushq $0x10
popq %rdx
callq 0x1ff2cb
movq %rax, 0x8(%r14)
movq 0xc0(%rbx), %rcx
cmpq %rcx, (%rax)
je 0x1fef3e
movq %rcx, 0xb8(%rbx)
jmp 0x1fef2c
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 0x1fef2c
addq $0x78, %rbx
addq $0x7, %r13
pushq $0x10
popq %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1ff2cb
movq %rax, %rbx
movq %rbx, 0x8(%r14)
movb $0x1, 0x11(%r14)
jmp 0x1fef2c