// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/expat-2.0.1/lib/xmltok_impl.c
// Function: little2_scanAtts
static int PTRCALL
PREFIX(scanAtts)(const ENCODING *enc, const char *ptr, const char *end,
                 const char **nextTokPtr)
{
#ifdef XML_NS
  int hadColon = 0;
#endif
  while (ptr != end) {
    switch (BYTE_TYPE(enc, ptr)) {
    CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
#ifdef XML_NS
    case BT_COLON:
      if (hadColon) {
        *nextTokPtr = ptr;
        return XML_TOK_INVALID;
      }
      hadColon = 1;
      ptr += MINBPC(enc);
      if (ptr == end)
        return XML_TOK_PARTIAL;
      switch (BYTE_TYPE(enc, ptr)) {
      CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
      default:
        *nextTokPtr = ptr;
        return XML_TOK_INVALID;
      }
      break;
#endif
    case BT_S: case BT_CR: case BT_LF:
      for (;;) {
        int t;

        ptr += MINBPC(enc);
        if (ptr == end)
          return XML_TOK_PARTIAL;
        t = BYTE_TYPE(enc, ptr);
        if (t == BT_EQUALS)
          break;
        switch (t) {
        case BT_S:
        case BT_LF:
        case BT_CR:
          break;
        default:
          *nextTokPtr = ptr;
          return XML_TOK_INVALID;
        }
      }
    /* fall through */
    case BT_EQUALS:
      {
        int open;
#ifdef XML_NS
        hadColon = 0;
#endif
        for (;;) {
          ptr += MINBPC(enc);
          if (ptr == end)
            return XML_TOK_PARTIAL;
          open = BYTE_TYPE(enc, ptr);
          if (open == BT_QUOT || open == BT_APOS)
            break;
          switch (open) {
          case BT_S:
          case BT_LF:
          case BT_CR:
            break;
          default:
            *nextTokPtr = ptr;
            return XML_TOK_INVALID;
          }
        }
        ptr += MINBPC(enc);
        /* in attribute value */
        for (;;) {
          int t;
          if (ptr == end)
            return XML_TOK_PARTIAL;
          t = BYTE_TYPE(enc, ptr);
          if (t == open)
            break;
          switch (t) {
          INVALID_CASES(ptr, nextTokPtr)
          case BT_AMP:
            {
              int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
              if (tok <= 0) {
                if (tok == XML_TOK_INVALID)
                  *nextTokPtr = ptr;
                return tok;
              }
              break;
            }
          case BT_LT:
            *nextTokPtr = ptr;
            return XML_TOK_INVALID;
          default:
            ptr += MINBPC(enc);
            break;
          }
        }
        ptr += MINBPC(enc);
        if (ptr == end)
          return XML_TOK_PARTIAL;
        switch (BYTE_TYPE(enc, ptr)) {
        case BT_S:
        case BT_CR:
        case BT_LF:
          break;
        case BT_SOL:
          goto sol;
        case BT_GT:
          goto gt;
        default:
          *nextTokPtr = ptr;
          return XML_TOK_INVALID;
        }
        /* ptr points to closing quote */
        for (;;) {
          ptr += MINBPC(enc);
          if (ptr == end)
            return XML_TOK_PARTIAL;
          switch (BYTE_TYPE(enc, ptr)) {
          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
          case BT_S: case BT_CR: case BT_LF:
            continue;
          case BT_GT:
          gt:
            *nextTokPtr = ptr + MINBPC(enc);
            return XML_TOK_START_TAG_WITH_ATTS;
          case BT_SOL:
          sol:
            ptr += MINBPC(enc);
            if (ptr == end)
              return XML_TOK_PARTIAL;
            if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) {
              *nextTokPtr = ptr;
              return XML_TOK_INVALID;
            }
            *nextTokPtr = ptr + MINBPC(enc);
            return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
          default:
            *nextTokPtr = ptr;
            return XML_TOK_INVALID;
          }
          break;
        }
        break;
      }
    default:
      *nextTokPtr = ptr;
      return XML_TOK_INVALID;
    }
  }
  return XML_TOK_PARTIAL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x8(%rsp)
cmpq %rdx, %rsi
je 0x263438
movq %rcx, %r10
movq %rdx, %r14
movq %rdi, %r11
leaq -0x2(%rdx), %r15
leaq 0x173031(%rip), %r12    # 0x3d5e54
movl $0x200600, %ebp         # imm = 0x200600
leaq 0x1730ad(%rip), %r9     # 0x3d5edc
leaq 0x173e1a(%rip), %r8     # 0x3d6c50
leaq 0x173913(%rip), %rbx    # 0x3d6750
movzbl 0x1(%rsi), %ecx
cmpl $0xdb, %ecx
jg 0x262e67
movb $0x7, %dl
leal -0xd8(%rcx), %edi
cmpl $0x4, %edi
jb 0x262e89
testl %ecx, %ecx
jne 0x262e87
movzbl (%rsi), %edx
movb 0x88(%r11,%rdx), %dl
jmp 0x262e89
leal -0xdc(%rcx), %edx
cmpl $0x4, %edx
jae 0x262e76
movb $0x8, %dl
jmp 0x262e89
cmpl $0xff, %ecx
jne 0x262e87
cmpb $-0x3, (%rsi)
jbe 0x262e87
xorl %edx, %edx
jmp 0x262e89
movb $0x1d, %dl
movzbl %dl, %edx
addl $-0x5, %edx
cmpl $0x18, %edx
ja 0x26347a
movslq (%r12,%rdx,4), %rdx
addq %r12, %rdx
jmpq *%rdx
addq $0x2, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x262ff8
movq 0x8(%rsp), %rcx
addq $0x2, %rcx
movl $0x1, %edx
cmpq %r14, %rcx
je 0x262ef0
movzbl 0x1(%rcx), %edx
cmpl $0xdb, %edx
jg 0x262ef7
movl $0x7, %esi
leal -0xd8(%rdx), %edi
cmpl $0x4, %edi
jb 0x262f1d
testl %edx, %edx
jne 0x262f18
movzbl (%rcx), %edx
movzbl 0x88(%r11,%rdx), %esi
jmp 0x262f1d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x262f3d
leal -0xdc(%rdx), %esi
cmpl $0x4, %esi
jae 0x262f09
movl $0x8, %esi
jmp 0x262f1d
cmpl $0xff, %edx
jne 0x262f18
xorl %esi, %esi
cmpb $-0x3, (%rcx)
ja 0x262f1d
movl $0x1d, %esi
movl $0x5, %edx
cmpl $0xe, %esi
je 0x262f3d
cmpl $0x15, %esi
ja 0x262f33
xorl %edx, %edx
btl %esi, %ebp
jb 0x262f3d
movq %rcx, (%r10)
xorl %eax, %eax
movl $0x1, %edx
addq $0x2, %rcx
testl %edx, %edx
je 0x262eb8
addq $-0x2, %rcx
cmpl $0x1, %edx
je 0x263431
movq %rcx, 0x8(%rsp)
movq 0x8(%rsp), %rcx
addq $0x2, %rcx
cmpq %r14, %rcx
je 0x262fe4
movzbl 0x1(%rcx), %edx
cmpl $0xdb, %edx
jg 0x262f98
movl $0x7, %r13d
leal -0xd8(%rdx), %esi
cmpl $0x4, %esi
jb 0x262fc1
testl %edx, %edx
jne 0x262fbb
movzbl (%rcx), %edx
movzbl 0x88(%r11,%rdx), %r13d
jmp 0x262fc1
leal -0xdc(%rdx), %esi
cmpl $0x4, %esi
jae 0x262fab
movl $0x8, %r13d
jmp 0x262fc1
cmpl $0xff, %edx
jne 0x262fbb
xorl %r13d, %r13d
cmpb $-0x3, (%rcx)
ja 0x262fc1
movl $0x1d, %r13d
movl %r13d, %edx
andl $-0x2, %edx
cmpl $0xc, %edx
je 0x263037
cmpl $0x15, %r13d
ja 0x262fd8
btl %r13d, %ebp
jb 0x262f60
movq %rcx, 0x8(%rsp)
movq %rcx, (%r10)
xorl %eax, %eax
jmp 0x262fee
movq %rcx, 0x8(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movb $0x1, %dl
testb %dl, %dl
jne 0x26343d
movq 0x8(%rsp), %rsi
cmpq %r14, %rsi
jne 0x262e3d
jmp 0x263438
leaq 0x173d3e(%rip), %rdx    # 0x3d6d50
movzbl (%rcx,%rdx), %ecx
movzbl (%rsi), %edx
shll $0x5, %ecx
movl %edx, %edi
shrl $0x3, %edi
andl $0x1c, %edi
orl %ecx, %edi
movl (%rdi,%rbx), %ecx
btl %edx, %ecx
jb 0x262ea1
jmp 0x26347a
addq $0x2, %rcx
movq %rcx, 0x8(%rsp)
movq 0x8(%rsp), %rsi
cmpq %r14, %rsi
je 0x26307a
movl %eax, %ebx
movzbl 0x1(%rsi), %ecx
cmpl $0xdb, %ecx
jg 0x263081
movl $0x7, %eax
leal -0xd8(%rcx), %edx
cmpl $0x4, %edx
jb 0x2630a7
testl %ecx, %ecx
jne 0x2630a2
movzbl (%rsi), %eax
movzbl 0x88(%r11,%rax), %eax
jmp 0x2630a7
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2630d4
leal -0xdc(%rcx), %eax
cmpl $0x4, %eax
jae 0x263093
movl $0x8, %eax
jmp 0x2630a7
cmpl $0xff, %ecx
jne 0x2630a2
xorl %eax, %eax
cmpb $-0x3, (%rsi)
ja 0x2630a7
movl $0x1d, %eax
cmpl %r13d, %eax
jne 0x2630b8
movl $0xb, %edi
xorl %edx, %edx
jmp 0x26313e
cmpl $0x8, %eax
ja 0x2630f5
movl %eax, %eax
leaq 0x172df2(%rip), %rcx    # 0x3d5eb8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rsi, (%r10)
xorl %eax, %eax
movb $0x1, %dl
movl $0x1, %edi
jmp 0x263140
movq %r14, %rcx
subq %rsi, %rcx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
movb $0x1, %dl
movl $0x1, %edi
cmpq $0x2, %rcx
jl 0x263140
addq $0x2, %rsi
jmp 0x263135
movq %r14, %rcx
subq %rsi, %rcx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
movb $0x1, %dl
movl $0x1, %edi
cmpq $0x3, %rcx
jl 0x263140
addq $0x3, %rsi
jmp 0x263135
movq %r14, %rcx
subq %rsi, %rcx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
movb $0x1, %dl
movl $0x1, %edi
cmpq $0x4, %rcx
jl 0x263140
addq $0x4, %rsi
movq %rsi, 0x8(%rsp)
xorl %edx, %edx
xorl %edi, %edi
movl %ebx, %eax
testl %edi, %edi
je 0x263040
jmp 0x2631b1
addq $0x2, %rsi
movq %r11, %rdi
movq %r14, %rdx
leaq 0x8(%rsp), %rcx
movq %r15, 0x10(%rsp)
movq %r10, %r15
movq %r11, %rbp
movq %r9, %r12
callq 0x262a17
leaq 0x173add(%rip), %r8     # 0x3d6c50
movq %r12, %r9
movq %rbp, %r11
movl $0x200600, %ebp         # imm = 0x200600
movq %r15, %r10
movq 0x10(%rsp), %r15
leaq 0x172cc7(%rip), %r12    # 0x3d5e54
movl %eax, %ecx
xorl %edx, %edx
movl $0x0, %edi
movl %ebx, %eax
testl %ecx, %ecx
jg 0x263140
jne 0x2631a6
movq 0x8(%rsp), %rax
movq %rax, (%r10)
movb $0x1, %dl
movl $0x1, %edi
movl %ecx, %eax
jmp 0x263140
cmpl $0xb, %edi
jne 0x263210
movq 0x8(%rsp), %rsi
leaq 0x2(%rsi), %rcx
movq %rcx, 0x8(%rsp)
movb $0x1, %dl
cmpq %r14, %rcx
leaq 0x173580(%rip), %rbx    # 0x3d6750
je 0x2633d8
movzbl 0x3(%rsi), %edi
cmpl $0xdb, %edi
jg 0x26321c
movb $0x7, %sil
movq %r8, %rbx
leal -0xd8(%rdi), %r8d
cmpl $0x4, %r8d
movq %rbx, %r8
leaq 0x173553(%rip), %rbx    # 0x3d6750
jb 0x263240
testl %edi, %edi
jne 0x26323d
movzbl (%rcx), %esi
movb 0x88(%r11,%rsi), %sil
jmp 0x263240
leaq 0x173539(%rip), %rbx    # 0x3d6750
jmp 0x262ff0
leal -0xdc(%rdi), %esi
cmpl $0x4, %esi
jae 0x26322c
movb $0x8, %sil
jmp 0x263240
cmpl $0xff, %edi
jne 0x26323d
cmpb $-0x3, (%rcx)
jbe 0x26323d
xorl %esi, %esi
jmp 0x263240
movb $0x1d, %sil
movzbl %sil, %esi
cmpl $0x10, %esi
jg 0x263270
leal -0x9(%rsi), %edi
cmpl $0x2, %edi
jb 0x263282
cmpl $0xb, %esi
jne 0x2633e2
movq 0x8(%rsp), %rax
addq $0x2, %rax
movq %rax, (%r10)
movl $0x1, %eax
jmp 0x262ff0
cmpl $0x11, %esi
je 0x2633a9
cmpl $0x15, %esi
jne 0x2633e2
movq %r8, %r13
movq 0x8(%rsp), %rdi
leaq 0x2(%rdi), %rcx
cmpq %r14, %rcx
je 0x263326
movq %r15, %rsi
subq %rdi, %rsi
movzbl 0x1(%rcx), %r8d
cmpl $0xdb, %r8d
jg 0x2632da
movb $0x7, %dil
movq %r9, %rbx
leal -0xd8(%r8), %r9d
cmpl $0x4, %r9d
movq %rbx, %r9
leaq 0x17348a(%rip), %rbx    # 0x3d6750
jb 0x263300
testl %r8d, %r8d
jne 0x2632fd
movzbl (%rcx), %edi
movb 0x88(%r11,%rdi), %dil
jmp 0x263300
leal -0xdc(%r8), %edi
cmpl $0x4, %edi
jae 0x2632eb
movb $0x8, %dil
jmp 0x263300
cmpl $0xff, %r8d
jne 0x2632fd
cmpb $-0x3, (%rcx)
jbe 0x2632fd
xorl %edi, %edi
jmp 0x263300
movb $0x1d, %dil
movzbl %dil, %edi
addl $-0x5, %edi
cmpl $0x18, %edi
ja 0x26333f
movslq (%r9,%rdi,4), %rdi
addq %r9, %rdi
jmpq *%rdi
addq $0x2, %rcx
addq $-0x2, %rsi
cmpq %r14, %rcx
jne 0x26329d
movq %rcx, 0x8(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x263429
movq %rcx, 0x8(%rsp)
jmp 0x263417
movq %rcx, 0x8(%rsp)
jmp 0x263424
movq %rcx, 0x8(%rsp)
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x4, %rsi
jge 0x263424
jmp 0x263429
movq %rcx, 0x8(%rsp)
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x2, %rsi
jge 0x263424
jmp 0x263429
movq %rcx, 0x8(%rsp)
movq %r13, %r8
jmp 0x26325a
movq %rcx, 0x8(%rsp)
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x3, %rsi
jge 0x263424
jmp 0x263429
movq %rcx, 0x8(%rsp)
movq %r13, %r8
movq 0x8(%rsp), %rax
leaq 0x2(%rax), %rcx
movq %rcx, 0x8(%rsp)
cmpq %r14, %rcx
je 0x2633d8
cmpb $0x0, 0x3(%rax)
jne 0x2633e2
cmpb $0x3e, (%rcx)
jne 0x2633e2
addq $0x4, %rax
movq %rax, (%r10)
movl $0x3, %eax
jmp 0x262ff0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x262ff0
movq %rcx, (%r10)
xorl %eax, %eax
jmp 0x262ff0
movq %rcx, 0x8(%rsp)
movzbl 0x1(%rcx), %esi
movzbl (%rsi,%r13), %esi
movzbl (%rcx), %edi
shll $0x5, %esi
movl %edi, %r8d
shrl $0x3, %r8d
andl $0x1c, %r8d
orl %esi, %r8d
movl (%r8,%rbx), %esi
btl %edi, %esi
jae 0x263424
addq $0x2, %rcx
movq %rcx, 0x8(%rsp)
xorl %edx, %edx
jmp 0x263429
movq %rcx, (%r10)
xorl %eax, %eax
movq %r13, %r8
jmp 0x262ff0
movq %rcx, 0x8(%rsp)
jmp 0x26343d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subq %rsi, %r14
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x4, %r14
jl 0x26343d
jmp 0x26347a
subq %rsi, %r14
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x3, %r14
jl 0x26343d
jmp 0x26347a
subq %rsi, %r14
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x2, %r14
jl 0x26343d
movq %rsi, (%r10)
xorl %eax, %eax
jmp 0x26343d