// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmltok_impl.c
// Function: little2_scanPoundName
static int PTRCALL
PREFIX(scanPoundName)(const ENCODING *enc, const char *ptr, const char *end,
                      const char **nextTokPtr)
{
  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;
  }
  while (ptr != end) {
    switch (BYTE_TYPE(enc, ptr)) {
    CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
    case BT_CR: case BT_LF: case BT_S:
    case BT_RPAR: case BT_GT: case BT_PERCNT: case BT_VERBAR:
      *nextTokPtr = ptr;
      return XML_TOK_POUND_NAME;
    default:
      *nextTokPtr = ptr;
      return XML_TOK_INVALID;
    }
  }
  return -XML_TOK_POUND_NAME;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
cmpq %rdx, %rsi
je 0x2598cb
movzbl 0x1(%rsi), %eax
xorl %r8d, %r8d
cmpl $0xdb, %eax
jg 0x2598d2
leal -0xd8(%rax), %r9d
cmpl $0x4, %r9d
jae 0x2598ec
subq %rsi, %rdx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x4, %rdx
jge 0x2598df
jmp 0x2598e5
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2598e5
leal -0xdc(%rax), %r9d
cmpl $0x4, %r9d
jae 0x25991f
movq %rsi, (%rcx)
movl %r8d, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testl %eax, %eax
jne 0x25993f
movzbl (%rsi), %r9d
movzbl 0x88(%rdi,%r9), %r9d
cmpl $0x15, %r9d
jg 0x25992d
cmpl $0x5, %r9d
je 0x259a64
cmpl $0x6, %r9d
je 0x259a7b
cmpl $0x7, %r9d
je 0x2598bb
jmp 0x2598df
cmpl $0xff, %eax
jne 0x25993f
cmpb $-0x3, (%rsi)
ja 0x2598df
jmp 0x25993f
cmpl $0x16, %r9d
je 0x259975
cmpl $0x18, %r9d
je 0x259975
cmpl $0x1d, %r9d
jne 0x2598df
leaq 0x173bca(%rip), %r9     # 0x3cd510
movzbl (%rax,%r9), %eax
movzbl (%rsi), %r9d
shll $0x5, %eax
movl %r9d, %r10d
shrl $0x3, %r10d
andl $0x1c, %r10d
orl %eax, %r10d
leaq 0x1736a9(%rip), %rax    # 0x3cd010
movl (%r10,%rax), %eax
btl %r9d, %eax
jae 0x2598df
leaq 0x2(%rsi), %r14
movl $0xffffffec, %eax       # imm = 0xFFFFFFEC
cmpq %rdx, %r14
je 0x2598e5
movq %rdx, %r9
subq %rsi, %r9
addq $-0x2, %r9
leaq 0x172c70(%rip), %r10    # 0x3cc608
leaq 0x173c71(%rip), %r11    # 0x3cd610
leaq 0x17366a(%rip), %rbx    # 0x3cd010
movq %r14, %rsi
movzbl 0x1(%rsi), %r14d
cmpl $0xdb, %r14d
jg 0x2599e1
testl %r14d, %r14d
jne 0x2599f4
movzbl (%rsi), %r15d
movzbl 0x88(%rdi,%r15), %r15d
addl $-0x5, %r15d
cmpl $0x1f, %r15d
ja 0x2598df
movslq (%r10,%r15,4), %r15
addq %r10, %r15
jmpq *%r15
cmpl $0xff, %r14d
jne 0x259a02
cmpb $-0x3, (%rsi)
jbe 0x259a12
jmp 0x2598df
leal -0xd8(%r14), %ebp
cmpl $0x4, %ebp
jae 0x259a12
jmp 0x259a50
leal -0xdc(%r14), %ebp
cmpl $0x4, %ebp
jb 0x2598df
movzbl (%r14,%r11), %ebp
movzbl (%rsi), %r14d
shll $0x5, %ebp
movl %r14d, %r15d
shrl $0x3, %r15d
andl $0x1c, %r15d
orl %ebp, %r15d
movl (%r15,%rbx), %ebp
btl %r14d, %ebp
jae 0x2598df
addq $0x2, %rsi
addq $-0x2, %r9
cmpq %rdx, %rsi
jne 0x2599a9
jmp 0x2598e5
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x4, %r9
jge 0x2598df
jmp 0x2598e5
subq %rsi, %rdx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x2, %rdx
jge 0x2598df
jmp 0x2598e5
subq %rsi, %rdx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x3, %rdx
jge 0x2598df
jmp 0x2598e5
movl $0x14, %r8d
jmp 0x2598df
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x2, %r9
jge 0x2598df
jmp 0x2598e5
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x3, %r9
jge 0x2598df
jmp 0x2598e5