// File: /workspace/github_c_makefile_star2_O1/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 0x262436
movzbl 0x1(%rsi), %eax
cmpl $0xdb, %eax
jg 0x262440
movb $0x7, %r8b
leal -0xd8(%rax), %r9d
cmpl $0x4, %r9d
jb 0x262466
testl %eax, %eax
jne 0x262463
movzbl (%rsi), %r8d
movb 0x88(%rdi,%r8), %r8b
jmp 0x262466
movl $0xffffffea, %eax       # imm = 0xFFFFFFEA
jmp 0x2625ef
leal -0xdc(%rax), %r8d
cmpl $0x4, %r8d
jae 0x262452
movb $0x8, %r8b
jmp 0x262466
cmpl $0xff, %eax
jne 0x262463
cmpb $-0x3, (%rsi)
jbe 0x262463
xorl %r8d, %r8d
jmp 0x262466
movb $0x1d, %r8b
movzbl %r8b, %r9d
movl $0x16, %r8d
leal -0x5(%r9), %r10d
cmpl $0x13, %r10d
ja 0x2624a2
leaq 0x173817(%rip), %rax    # 0x3d5c98
movslq (%rax,%r10,4), %r9
addq %rax, %r9
jmpq *%r9
subq %rsi, %rdx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x2, %rdx
jge 0x2625e6
jmp 0x2625ef
cmpl $0x1e, %r9d
je 0x2625e9
cmpl $0x1d, %r9d
jne 0x2625e6
leaq 0x174793(%rip), %r8     # 0x3d6c50
movzbl (%rax,%r8), %eax
movzbl (%rsi), %r8d
shll $0x5, %eax
movl %r8d, %r9d
shrl $0x3, %r9d
andl $0x1c, %r9d
orl %eax, %r9d
leaq 0x174272(%rip), %rax    # 0x3d6750
movl (%r9,%rax), %eax
btl %r8d, %eax
jae 0x2625e6
leaq 0x2(%rsi), %r8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rdx, %r8
je 0x2625ef
movq %rdx, %r9
subq %rsi, %r9
addq $-0x2, %r9
leaq 0x1737d9(%rip), %r10    # 0x3d5ce8
leaq 0x17483a(%rip), %r11    # 0x3d6d50
leaq 0x174233(%rip), %rbx    # 0x3d6750
movq %r8, %rsi
movzbl 0x1(%rsi), %r14d
cmpl $0xdb, %r14d
jg 0x262550
movb $0x7, %r8b
leal -0xd8(%r14), %ebp
cmpl $0x4, %ebp
jb 0x262578
testl %r14d, %r14d
jne 0x262575
movzbl (%rsi), %r8d
movb 0x88(%rdi,%r8), %r8b
jmp 0x262578
leal -0xdc(%r14), %r8d
cmpl $0x4, %r8d
jae 0x262562
movb $0x8, %r8b
jmp 0x262578
cmpl $0xff, %r14d
jne 0x262575
cmpb $-0x3, (%rsi)
jbe 0x262575
xorl %r8d, %r8d
jmp 0x262578
movb $0x1d, %r8b
movzbl %r8b, %r15d
xorl %r8d, %r8d
addl $-0x5, %r15d
cmpl $0x18, %r15d
ja 0x2625e9
movslq (%r10,%r15,4), %r15
addq %r10, %r15
jmpq *%r15
addq $0x2, %rsi
addq $-0x2, %r9
cmpq %rdx, %rsi
jne 0x262520
jmp 0x2625ef
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
jb 0x262593
jmp 0x2625e9
subq %rsi, %rdx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x3, %rdx
jge 0x2625e6
jmp 0x2625ef
subq %rsi, %rdx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x4, %rdx
jl 0x2625ef
xorl %r8d, %r8d
movq %rsi, (%rcx)
movl %r8d, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x4, %r9
jge 0x2625e9
jmp 0x2625ef
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x2, %r9
jge 0x2625e9
jmp 0x2625ef
addq $0x2, %rsi
movl $0x1c, %r8d
jmp 0x2625e9
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x3, %r9
jge 0x2625e9
jmp 0x2625ef