// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmltok_impl.c
// Function: big2_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)
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
cmpq %rdx, %rsi
je 0x25d504
movq %rcx, %r8
movq %rdx, %r14
movq %rdi, %r15
leaq -0x4(%rdx), %r9
leaq 0x16fe0a(%rip), %r10    # 0x3ccf18
leaq 0x16fe8b(%rip), %r12    # 0x3ccfa0
leaq 0x1703f4(%rip), %rbp    # 0x3cd510
leaq 0x16feed(%rip), %rdi    # 0x3cd010
leaq 0x1704e6(%rip), %r13    # 0x3cd610
movzbl (%rsi), %eax
xorl %ebx, %ebx
cmpl $0xdb, %eax
jg 0x25d1eb
testl %eax, %eax
jne 0x25d1fd
movzbl 0x1(%rsi), %ecx
movzbl 0x88(%r15,%rcx), %ecx
addl $-0x5, %ecx
cmpl $0x18, %ecx
ja 0x25d4fb
movslq (%r10,%rcx,4), %rcx
addq %r10, %rcx
jmpq *%rcx
addq $0x2, %rsi
cmpq %r14, %rsi
je 0x25d504
cmpb $0x0, (%rsi)
jne 0x25d4fb
movzbl 0x1(%rsi), %eax
movzbl 0x88(%r15,%rax), %eax
leal -0x9(%rax), %ecx
cmpl $0x2, %ecx
jb 0x25d164
cmpl $0x15, %eax
je 0x25d164
cmpl $0xe, %eax
jne 0x25d4fb
movq %rsi, 0x8(%rsp)
addq $0x2, %rsi
cmpq %r14, %rsi
je 0x25d504
cmpb $0x0, (%rsi)
jne 0x25d4df
movzbl 0x1(%rsi), %eax
movzbl 0x88(%r15,%rax), %ebx
movl %ebx, %eax
andl $-0x2, %eax
cmpl $0xc, %eax
je 0x25d255
cmpl $0x15, %ebx
ja 0x25d4df
movl $0x200600, %eax         # imm = 0x200600
btl %ebx, %eax
jb 0x25d1a2
jmp 0x25d4df
cmpl $0xff, %eax
jne 0x25d20d
cmpb $-0x3, 0x1(%rsi)
jbe 0x25d21c
jmp 0x25d4fb
leal -0xd8(%rax), %ecx
cmpl $0x4, %ecx
jae 0x25d21c
jmp 0x25d497
leal -0xdc(%rax), %ecx
cmpl $0x4, %ecx
jb 0x25d4fb
movzbl (%rax,%r13), %eax
movzbl 0x1(%rsi), %ecx
shll $0x5, %eax
movl %ecx, %edx
shrl $0x3, %edx
andl $0x1c, %edx
orl %eax, %edx
movl (%rdx,%rdi), %eax
btl %ecx, %eax
jae 0x25d4fb
addq $0x2, %rsi
movq %rsi, 0x8(%rsp)
cmpq %r14, %rsi
jne 0x25d12a
jmp 0x25d504
addq $0x2, %rsi
movq %rsi, 0x8(%rsp)
cmpq %r14, %rsi
je 0x25d504
movq %r8, 0x10(%rsp)
movzbl (%rsi), %ecx
cmpl $0xdb, %ecx
jg 0x25d29a
movl $0x7, %eax
leal -0xd8(%rcx), %edx
cmpl $0x4, %edx
jb 0x25d2c1
testl %ecx, %ecx
jne 0x25d2bc
movzbl 0x1(%rsi), %eax
movzbl 0x88(%r15,%rax), %eax
jmp 0x25d2c1
leal -0xdc(%rcx), %eax
cmpl $0x4, %eax
jae 0x25d2ac
movl $0x8, %eax
jmp 0x25d2c1
cmpl $0xff, %ecx
jne 0x25d2bc
xorl %eax, %eax
cmpb $-0x3, 0x1(%rsi)
ja 0x25d2c1
movl $0x1d, %eax
cmpl %ebx, %eax
je 0x25d386
cmpl $0x8, %eax
ja 0x25d36f
movl %eax, %eax
leaq 0x16fca1(%rip), %rcx    # 0x3ccf7c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r10, %rbp
movq %r9, %r12
addq $0x2, %rsi
movq %r15, %rdi
movq %r14, %rdx
leaq 0x8(%rsp), %rcx
callq 0x25cd7e
testl %eax, %eax
jle 0x25d516
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %r8
movq %r12, %r9
movq %rbp, %r10
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
leaq 0x16fc7d(%rip), %r12    # 0x3ccfa0
leaq 0x1701e6(%rip), %rbp    # 0x3cd510
leaq 0x16fcdf(%rip), %rdi    # 0x3cd010
jmp 0x25d378
movq %r14, %rax
subq %rsi, %rax
cmpq $0x4, %rax
jl 0x25d4ab
addq $0x4, %rsi
jmp 0x25d373
movq %r14, %rax
subq %rsi, %rax
cmpq $0x3, %rax
jl 0x25d4ab
addq $0x3, %rsi
jmp 0x25d373
movq %r14, %rax
subq %rsi, %rax
cmpq $0x2, %rax
jl 0x25d4ab
addq $0x2, %rsi
movq %rsi, 0x8(%rsp)
cmpq %r14, %rsi
jne 0x25d26c
jmp 0x25d504
leaq 0x2(%rsi), %rax
movq %rax, 0x8(%rsp)
cmpq %r14, %rax
je 0x25d504
cmpb $0x0, (%rax)
jne 0x25d4e2
movzbl 0x3(%rsi), %ecx
movzbl 0x88(%r15,%rcx), %ecx
cmpl $0xa, %ecx
movl $0x0, %ebx
jg 0x25d3c5
addl $-0x9, %ecx
cmpl $0x2, %ecx
jb 0x25d3ce
jmp 0x25d4fe
cmpl $0x15, %ecx
jne 0x25d52c
leaq 0x4(%rsi), %rax
cmpq %r14, %rax
je 0x25d504
movq %rdi, %rbx
movq %r9, %rcx
subq %rsi, %rcx
addq $0x6, %rsi
movzbl -0x2(%rsi), %edx
testl %edx, %edx
jne 0x25d42b
movzbl -0x1(%rsi), %edi
movzbl 0x88(%r15,%rdi), %edi
addl $-0x5, %edi
cmpl $0x18, %edi
ja 0x25d4db
movslq (%r12,%rdi,4), %rdi
addq %r12, %rdi
jmpq *%rdi
addq $0x2, %rax
leaq 0x2(%rsi), %rdx
addq $-0x2, %rcx
cmpq %r14, %rsi
movq %rdx, %rsi
jne 0x25d3e8
jmp 0x25d504
leal -0xd8(%rdx), %edi
cmpl $0x4, %edi
jb 0x25d4e6
leal -0xdc(%rdx), %ecx
cmpl $0x4, %ecx
jb 0x25d4db
cmpl $0xff, %edx
jne 0x25d45b
cmpb $-0x2, -0x1(%rsi)
jae 0x25d4db
leaq -0x2(%rsi), %rcx
movq %rcx, 0x8(%rsp)
movzbl (%rdx,%rbp), %ecx
movzbl -0x1(%rsi), %edx
shll $0x5, %ecx
movl %edx, %edi
shrl $0x3, %edi
andl $0x1c, %edi
orl %ecx, %edi
movl (%rdi,%rbx), %ecx
movq %rbx, %rdi
btl %edx, %ecx
movl $0x0, %ebx
jb 0x25d242
jmp 0x25d4fe
movq %rbx, %rdi
jmp 0x25d242
subq %rsi, %r14
movl $0xfffffffe, %r11d      # imm = 0xFFFFFFFE
movq %rsi, %rax
cmpq $0x4, %r14
jge 0x25d4fe
jmp 0x25d504
movl $0xfffffffe, %r11d      # imm = 0xFFFFFFFE
jmp 0x25d504
subq %rsi, %r14
movl $0xfffffffe, %r11d      # imm = 0xFFFFFFFE
movq %rsi, %rax
cmpq $0x2, %r14
jge 0x25d4fe
jmp 0x25d504
subq %rsi, %r14
movl $0xfffffffe, %r11d      # imm = 0xFFFFFFFE
movq %rsi, %rax
cmpq $0x3, %r14
jge 0x25d4fe
jmp 0x25d504
addq $-0x2, %rsi
movq %rsi, %rax
xorl %ebx, %ebx
jmp 0x25d4fe
movl $0xfffffffe, %r11d      # imm = 0xFFFFFFFE
cmpq $0x4, %rcx
movl $0x0, %ebx
jl 0x25d504
addq $-0x2, %rsi
movq %rsi, %rax
movq %rax, (%r8)
movl %ebx, %r11d
movl %r11d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %r11d
movq 0x10(%rsp), %r8
movl $0x0, %ebx
jne 0x25d504
movq 0x8(%rsp), %rax
jmp 0x25d4fe
cmpl $0xb, %ecx
je 0x25d53f
cmpl $0x11, %ecx
je 0x25d56b
jmp 0x25d4fe
addq $-0x2, %rsi
movq %rsi, %rax
addq $0x2, %rax
movl $0x1, %ebx
jmp 0x25d4fe
movl $0xfffffffe, %r11d      # imm = 0xFFFFFFFE
cmpq $0x2, %rcx
jmp 0x25d4f0
movl $0xfffffffe, %r11d      # imm = 0xFFFFFFFE
cmpq $0x3, %rcx
jmp 0x25d4f0
addq $-0x2, %rsi
movq %rsi, %rax
xorl %ebx, %ebx
leaq 0x2(%rax), %rcx
movq %rcx, 0x8(%rsp)
cmpq %r14, %rcx
je 0x25d504
cmpb $0x0, (%rcx)
jne 0x25d593
leaq 0x4(%rax), %rdx
xorl %esi, %esi
cmpb $0x3e, 0x3(%rax)
sete %sil
cmoveq %rdx, %rcx
leal (%rsi,%rsi,2), %ebx
movq %rcx, %rax
jmp 0x25d4fe