// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movq 0x38(%rsp), %rax
movq 0x290(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0xb8(%rax), %rax
movq 0x18(%rsp), %rcx
cmpq 0xb0(%rcx), %rax
jne 0x379e70
movq 0x18(%rsp), %rdi
addq $0xa0, %rdi
callq 0x37a570
cmpb $0x0, %al
jne 0x379e70
xorl %eax, %eax
testb $0x1, %al
jne 0x379ea1
jmp 0x379e93
movq 0x18(%rsp), %rcx
movq 0xb8(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0xb8(%rcx)
movb $0x0, (%rax)
movb $0x1, %al
testb $0x1, %al
jne 0x379ea1
movq $0x0, 0x40(%rsp)
jmp 0x37a20d
movq 0x18(%rsp), %rdi
addq $0xa0, %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq 0x379ae0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x379edc
movq $0x0, 0x40(%rsp)
jmp 0x37a20d
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
addq $0x50, %rdi
movq 0x8(%rsp), %rsi
movl $0x18, %edx
callq 0x37ade0
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x379f1d
movq $0x0, 0x40(%rsp)
jmp 0x37a20d
movq 0x10(%rsp), %rax
movq (%rax), %rax
cmpq 0x8(%rsp), %rax
je 0x379f49
movq 0x18(%rsp), %rax
movq 0xc0(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0xb8(%rax)
jmp 0x37a203
movq 0x18(%rsp), %rax
movq 0xb8(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0xc0(%rax)
movq 0x38(%rsp), %rax
cmpb $0x0, 0x1c8(%rax)
jne 0x379f74
jmp 0x37a201
movq 0x8(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x78, %eax
jne 0x37a040
movq 0x8(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x6d, %eax
jne 0x37a040
movq 0x8(%rsp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x6c, %eax
jne 0x37a040
movq 0x8(%rsp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x6e, %eax
jne 0x37a040
movq 0x8(%rsp), %rax
movsbl 0x4(%rax), %eax
cmpl $0x73, %eax
jne 0x37a040
movq 0x8(%rsp), %rax
movsbl 0x5(%rax), %eax
cmpl $0x0, %eax
je 0x379fe5
movq 0x8(%rsp), %rax
movsbl 0x5(%rax), %eax
cmpl $0x3a, %eax
jne 0x37a040
movq 0x8(%rsp), %rax
movsbl 0x5(%rax), %eax
cmpl $0x0, %eax
jne 0x37a00a
movq 0x18(%rsp), %rcx
addq $0x108, %rcx            # imm = 0x108
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x37a032
movq 0x18(%rsp), %rdi
addq $0x78, %rdi
movq 0x8(%rsp), %rsi
addq $0x6, %rsi
movl $0x10, %edx
callq 0x37ade0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movb $0x1, 0x11(%rax)
jmp 0x37a1ff
movl $0x0, 0x4(%rsp)
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x37a1fd
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x3a, %eax
jne 0x37a1eb
movl $0x0, (%rsp)
movl (%rsp), %eax
cmpl 0x4(%rsp), %eax
jge 0x37a10a
movq 0x18(%rsp), %rax
movq 0xb8(%rax), %rax
movq 0x18(%rsp), %rcx
cmpq 0xb0(%rcx), %rax
jne 0x37a0be
movq 0x18(%rsp), %rdi
addq $0xa0, %rdi
callq 0x37a570
cmpb $0x0, %al
jne 0x37a0be
xorl %eax, %eax
testb $0x1, %al
jne 0x37a0fa
jmp 0x37a0ec
movq 0x8(%rsp), %rax
movslq (%rsp), %rcx
movb (%rax,%rcx), %cl
movq 0x18(%rsp), %rdx
movq 0xb8(%rdx), %rax
movq %rax, %rsi
addq $0x1, %rsi
movq %rsi, 0xb8(%rdx)
movb %cl, (%rax)
movb $0x1, %al
testb $0x1, %al
jne 0x37a0fa
movq $0x0, 0x40(%rsp)
jmp 0x37a20d
jmp 0x37a0fc
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0x37a07a
movq 0x18(%rsp), %rax
movq 0xb8(%rax), %rax
movq 0x18(%rsp), %rcx
cmpq 0xb0(%rcx), %rax
jne 0x37a141
movq 0x18(%rsp), %rdi
addq $0xa0, %rdi
callq 0x37a570
cmpb $0x0, %al
jne 0x37a141
xorl %eax, %eax
testb $0x1, %al
jne 0x37a172
jmp 0x37a164
movq 0x18(%rsp), %rcx
movq 0xb8(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0xb8(%rcx)
movb $0x0, (%rax)
movb $0x1, %al
testb $0x1, %al
jne 0x37a172
movq $0x0, 0x40(%rsp)
jmp 0x37a20d
movq 0x18(%rsp), %rdi
addq $0x78, %rdi
movq 0x18(%rsp), %rax
movq 0xc0(%rax), %rsi
movl $0x10, %edx
callq 0x37ade0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq 0x18(%rsp), %rcx
cmpq 0xc0(%rcx), %rax
jne 0x37a1d1
movq 0x18(%rsp), %rax
movq 0xb8(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0xc0(%rax)
jmp 0x37a1e9
movq 0x18(%rsp), %rax
movq 0xc0(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0xb8(%rax)
jmp 0x37a1fd
jmp 0x37a1ed
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x37a048
jmp 0x37a1ff
jmp 0x37a201
jmp 0x37a203
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw (%rax,%rax)