// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmltok_impl.c
// Function: little2_scanPercent
static int PTRCALL
PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end,
                    const char **nextTokPtr)
{
  if (ptr == end)
    return -XML_TOK_PERCENT;
  switch (BYTE_TYPE(enc, ptr)) {
  CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  case BT_S: case BT_LF: case BT_CR: case BT_PERCNT:
    *nextTokPtr = ptr;
    return XML_TOK_PERCENT;
  default:
    *nextTokPtr = ptr;
    return XML_TOK_INVALID;
  }
  while (ptr != end) {
    switch (BYTE_TYPE(enc, ptr)) {
    CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
    case BT_SEMI:
      *nextTokPtr = ptr + MINBPC(enc);
      return XML_TOK_PARAM_ENTITY_REF;
    default:
      *nextTokPtr = ptr;
      return XML_TOK_INVALID;
    }
  }
  return XML_TOK_PARTIAL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
cmpq %rdx, %rsi
je 0x259690
movzbl 0x1(%rsi), %eax
cmpl $0xdb, %eax
jg 0x259697
leal -0xd8(%rax), %r8d
cmpl $0x4, %r8d
jae 0x2596b4
subq %rsi, %rdx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x4, %rdx
jge 0x2596a4
jmp 0x2596ad
movl $0xffffffea, %eax       # imm = 0xFFFFFFEA
jmp 0x2596ad
leal -0xdc(%rax), %r8d
cmpl $0x4, %r8d
jae 0x2596fa
xorl %r8d, %r8d
movq %rsi, (%rcx)
movl %r8d, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testl %eax, %eax
jne 0x259706
movzbl (%rsi), %r8d
movzbl 0x88(%rdi,%r8), %r9d
movl $0x16, %r8d
leal -0x5(%r9), %r10d
cmpl $0x13, %r10d
ja 0x25981a
leaq 0x172e74(%rip), %rax    # 0x3cc554
movslq (%rax,%r10,4), %r9
addq %rax, %r9
jmpq *%r9
subq %rsi, %rdx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x2, %rdx
jge 0x2596a4
jmp 0x2596ad
cmpl $0xff, %eax
jne 0x259706
cmpb $-0x3, (%rsi)
ja 0x2596a4
leaq 0x173e03(%rip), %r8     # 0x3cd510
movzbl (%rax,%r8), %eax
movzbl (%rsi), %r8d
shll $0x5, %eax
movl %r8d, %r9d
shrl $0x3, %r9d
andl $0x1c, %r9d
orl %eax, %r9d
leaq 0x1738e2(%rip), %rax    # 0x3cd010
movl (%r9,%rax), %eax
btl %r8d, %eax
jae 0x2596a4
leaq 0x2(%rsi), %r8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rdx, %r8
je 0x2596ad
movq %rdx, %r9
subq %rsi, %r9
addq $-0x2, %r9
leaq 0x172e45(%rip), %r10    # 0x3cc5a4
leaq 0x173eaa(%rip), %r11    # 0x3cd610
leaq 0x1738a3(%rip), %rbx    # 0x3cd010
movq %r8, %rsi
xorl %r8d, %r8d
movzbl 0x1(%rsi), %r14d
cmpl $0xdb, %r14d
jg 0x2597ab
testl %r14d, %r14d
jne 0x2597be
movzbl (%rsi), %r15d
movzbl 0x88(%rdi,%r15), %r15d
addl $-0x5, %r15d
cmpl $0x18, %r15d
ja 0x2596a7
movslq (%r10,%r15,4), %r15
addq %r10, %r15
jmpq *%r15
cmpl $0xff, %r14d
jne 0x2597cc
cmpb $-0x3, (%rsi)
jbe 0x2597dc
jmp 0x2596a7
leal -0xd8(%r14), %ebp
cmpl $0x4, %ebp
jae 0x2597dc
jmp 0x259833
leal -0xdc(%r14), %ebp
cmpl $0x4, %ebp
jb 0x2596a7
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 0x2596a7
addq $0x2, %rsi
addq $-0x2, %r9
cmpq %rdx, %rsi
jne 0x259773
jmp 0x2596ad
cmpl $0x1e, %r9d
je 0x2596a7
cmpl $0x1d, %r9d
jne 0x2596a4
jmp 0x259706
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x4, %r9
jge 0x2596a7
jmp 0x2596ad
subq %rsi, %rdx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x3, %rdx
jge 0x2596a4
jmp 0x2596ad
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x3, %r9
jge 0x2596a7
jmp 0x2596ad
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x2, %r9
jge 0x2596a7
jmp 0x2596ad
addq $0x2, %rsi
movl $0x1c, %r8d
jmp 0x2596a7