// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/expat-2.0.1/lib/xmltok_impl.c
// Function: little2_scanDecl
static int PTRCALL
PREFIX(scanDecl)(const ENCODING *enc, const char *ptr,
                 const char *end, const char **nextTokPtr)
{
  if (ptr == end)
    return XML_TOK_PARTIAL;
  switch (BYTE_TYPE(enc, ptr)) {
  case BT_MINUS:
    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  case BT_LSQB:
    *nextTokPtr = ptr + MINBPC(enc);
    return XML_TOK_COND_SECT_OPEN;
  case BT_NMSTRT:
  case BT_HEX:
    ptr += MINBPC(enc);
    break;
  default:
    *nextTokPtr = ptr;
    return XML_TOK_INVALID;
  }
  while (ptr != end) {
    switch (BYTE_TYPE(enc, ptr)) {
    case BT_PERCNT:
      if (ptr + MINBPC(enc) == end)
        return XML_TOK_PARTIAL;
      /* don't allow <!ENTITY% foo "whatever"> */
      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
      case BT_S: case BT_CR: case BT_LF: case BT_PERCNT:
        *nextTokPtr = ptr;
        return XML_TOK_INVALID;
      }
      /* fall through */
    case BT_S: case BT_CR: case BT_LF:
      *nextTokPtr = ptr;
      return XML_TOK_DECL_OPEN;
    case BT_NMSTRT:
    case BT_HEX:
      ptr += MINBPC(enc);
      break;
    default:
      *nextTokPtr = ptr;
      return XML_TOK_INVALID;
    }
  }
  return XML_TOK_PARTIAL;
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rdx, %rsi
je 0x261fc9
movzbl 0x1(%rsi), %r9d
cmpl $0xdb, %r9d
jg 0x261ef0
movb $0x7, %r8b
leal -0xd8(%r9), %r10d
cmpl $0x4, %r10d
jb 0x261f18
testl %r9d, %r9d
jne 0x261f15
movzbl (%rsi), %r8d
movb 0x88(%rdi,%r8), %r8b
jmp 0x261f18
leal -0xdc(%r9), %r8d
cmpl $0x4, %r8d
jae 0x261f02
movb $0x8, %r8b
jmp 0x261f18
cmpl $0xff, %r9d
jne 0x261f15
cmpb $-0x3, (%rsi)
jbe 0x261f15
xorl %r8d, %r8d
jmp 0x261f18
movb $0x1d, %r8b
movzbl %r8b, %r8d
addl $-0x14, %r8d
cmpl $0x7, %r8d
ja 0x26205c
leaq 0x173c7b(%rip), %r9     # 0x3d5bac
movslq (%r9,%r8,4), %r8
addq %r9, %r8
jmpq *%r8
addq $0x2, %rsi
cmpq %rdx, %rsi
je 0x261fc9
leaq 0x173c7d(%rip), %r8     # 0x3d5bcc
movzbl 0x1(%rsi), %r10d
cmpl $0xdb, %r10d
jg 0x261f80
movb $0x7, %r9b
leal -0xd8(%r10), %r11d
cmpl $0x4, %r11d
jb 0x261fa8
testl %r10d, %r10d
jne 0x261fa5
movzbl (%rsi), %r9d
movb 0x88(%rdi,%r9), %r9b
jmp 0x261fa8
leal -0xdc(%r10), %r9d
cmpl $0x4, %r9d
jae 0x261f92
movb $0x8, %r9b
jmp 0x261fa8
cmpl $0xff, %r10d
jne 0x261fa5
cmpb $-0x3, (%rsi)
jbe 0x261fa5
xorl %r9d, %r9d
jmp 0x261fa8
movb $0x1d, %r9b
movzbl %r9b, %r9d
leal -0x15(%r9), %r10d
cmpl $0x9, %r10d
ja 0x261fe0
movslq (%r8,%r10,4), %r9
addq %r8, %r9
jmpq *%r9
addq $0x2, %rsi
cmpq %rdx, %rsi
jne 0x261f4f
retq
addq $0x2, %rsi
movq %rsi, (%rcx)
movl $0x21, %eax
retq
addq $0x2, %rsi
jmp 0x262851
addl $-0x9, %r9d
cmpl $0x2, %r9d
jae 0x26205c
movq %rsi, (%rcx)
movl $0x10, %eax
retq
leaq 0x2(%rsi), %r8
cmpq %rdx, %r8
je 0x261fc9
movzbl 0x3(%rsi), %edx
cmpl $0xdb, %edx
jg 0x262028
movb $0x7, %al
leal -0xd8(%rdx), %r9d
cmpl $0x4, %r9d
jb 0x26204b
testl %edx, %edx
jne 0x262049
movzbl (%r8), %eax
movb 0x88(%rdi,%rax), %al
jmp 0x26204b
leal -0xdc(%rdx), %eax
cmpl $0x4, %eax
jae 0x262037
movb $0x8, %al
jmp 0x26204b
cmpl $0xff, %edx
jne 0x262049
cmpb $-0x3, (%r8)
jbe 0x262049
xorl %eax, %eax
jmp 0x26204b
movb $0x1d, %al
cmpb $0x1e, %al
ja 0x261fea
movzbl %al, %eax
movl $0x40200600, %edx       # imm = 0x40200600
btl %eax, %edx
jae 0x261fea
movq %rsi, (%rcx)
xorl %eax, %eax
retq