// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmltok_impl.c
// Function: little2_scanPi
static int PTRCALL
PREFIX(scanPi)(const ENCODING *enc, const char *ptr,
               const char *end, const char **nextTokPtr)
{
  int tok;
  const char *target = ptr;
  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_S: case BT_CR: case BT_LF:
      if (!PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
        *nextTokPtr = ptr;
        return XML_TOK_INVALID;
      }
      ptr += MINBPC(enc);
      while (ptr != end) {
        switch (BYTE_TYPE(enc, ptr)) {
        INVALID_CASES(ptr, nextTokPtr)
        case BT_QUEST:
          ptr += MINBPC(enc);
          if (ptr == end)
            return XML_TOK_PARTIAL;
          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
            *nextTokPtr = ptr + MINBPC(enc);
            return tok;
          }
          break;
        default:
          ptr += MINBPC(enc);
          break;
        }
      }
      return XML_TOK_PARTIAL;
    case BT_QUEST:
      if (!PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
        *nextTokPtr = ptr;
        return XML_TOK_INVALID;
      }
      ptr += MINBPC(enc);
      if (ptr == end)
        return XML_TOK_PARTIAL;
      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
        *nextTokPtr = ptr + MINBPC(enc);
        return tok;
      }
      /* fall through */
    default:
      *nextTokPtr = ptr;
      return XML_TOK_INVALID;
    }
  }
  return XML_TOK_PARTIAL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq %rdx, %rsi
je 0x25932a
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movzbl 0x1(%rsi), %eax
cmpl $0xdb, %eax
jg 0x25931a
leal -0xd8(%rax), %ecx
cmpl $0x4, %ecx
jae 0x25933b
subq %rsi, %r14
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
cmpq $0x4, %r14
jge 0x259325
jmp 0x25932a
leal -0xdc(%rax), %ecx
cmpl $0x4, %ecx
jae 0x259369
movq %rsi, (%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %eax, %eax
jne 0x259386
movzbl (%rsi), %ecx
movzbl 0x88(%r15,%rcx), %ecx
cmpl $0x15, %ecx
jg 0x259377
cmpl $0x5, %ecx
je 0x2594a5
cmpl $0x6, %ecx
je 0x2594bc
cmpl $0x7, %ecx
je 0x25930a
jmp 0x259325
cmpl $0xff, %eax
jne 0x259386
cmpb $-0x3, (%rsi)
ja 0x259325
jmp 0x259386
cmpl $0x16, %ecx
je 0x2593b4
cmpl $0x18, %ecx
je 0x2593b4
cmpl $0x1d, %ecx
jne 0x259325
leaq 0x174183(%rip), %rcx    # 0x3cd510
movzbl (%rax,%rcx), %eax
movzbl (%rsi), %ecx
shll $0x5, %eax
movl %ecx, %edx
shrl $0x3, %edx
andl $0x1c, %edx
orl %eax, %edx
leaq 0x173c68(%rip), %rax    # 0x3cd010
movl (%rdx,%rax), %eax
btl %ecx, %eax
jae 0x259325
leaq 0x2(%rsi), %rax
cmpq %r14, %rax
je 0x25932a
leaq 0x4(%rsi), %r13
movq %r14, %rax
subq %rsi, %rax
addq $-0x2, %rax
leaq 0x1730da(%rip), %rcx    # 0x3cc4b0
leaq 0x174233(%rip), %rdx    # 0x3cd610
leaq 0x173c2c(%rip), %rdi    # 0x3cd010
movzbl -0x1(%r13), %r8d
cmpl $0xdb, %r8d
jg 0x25941d
testl %r8d, %r8d
jne 0x25942f
movzbl -0x2(%r13), %r9d
movzbl 0x88(%r15,%r9), %r9d
addl $-0x5, %r9d
cmpl $0x18, %r9d
ja 0x259499
movslq (%rcx,%r9,4), %r9
addq %rcx, %r9
jmpq *%r9
cmpl $0xff, %r8d
jne 0x25943e
cmpb $-0x3, -0x2(%r13)
jbe 0x25944b
jmp 0x259499
leal -0xd8(%r8), %r9d
cmpl $0x4, %r9d
jae 0x25944b
jmp 0x25948a
leal -0xdc(%r8), %r9d
cmpl $0x4, %r9d
jb 0x259499
movzbl (%r8,%rdx), %r8d
movzbl -0x2(%r13), %r9d
shll $0x5, %r8d
movl %r9d, %r10d
shrl $0x3, %r10d
andl $0x1c, %r10d
orl %r8d, %r10d
movl (%r10,%rdi), %r8d
btl %r9d, %r8d
jae 0x259499
leaq 0x2(%r13), %r8
addq $-0x2, %rax
cmpq %r14, %r13
movq %r8, %r13
jne 0x2593e4
jmp 0x25932a
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
cmpq $0x4, %rax
jl 0x25932a
addq $-0x2, %r13
movq %r13, (%rbx)
jmp 0x259328
subq %rsi, %r14
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
cmpq $0x2, %r14
jge 0x259325
jmp 0x25932a
subq %rsi, %r14
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
cmpq $0x3, %r14
jge 0x259325
jmp 0x25932a
leaq -0x2(%r13), %r12
leaq 0x4(%rsp), %rdx
movq %rsi, %rdi
movq %r12, %rsi
callq 0x259bfb
testl %eax, %eax
je 0x2595ce
cmpq %r14, %r13
je 0x25932a
leaq 0x173015(%rip), %rax    # 0x3cc514
movzbl 0x1(%r13), %ecx
cmpl $0xdb, %ecx
jg 0x25952d
leal -0xd8(%rcx), %edx
cmpl $0x4, %edx
jae 0x259541
movq %r14, %rcx
subq %r13, %rcx
cmpq $0x4, %rcx
jl 0x25964d
addq $0x4, %r13
jmp 0x259586
cmpl $0xff, %ecx
jne 0x259573
cmpb $-0x3, (%r13)
jbe 0x259582
jmp 0x25949d
testl %ecx, %ecx
jne 0x259582
movzbl (%r13), %ecx
movzbl 0x88(%r15,%rcx), %ecx
cmpq $0xf, %rcx
ja 0x259582
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %r14, %rcx
subq %r13, %rcx
cmpq $0x2, %rcx
jge 0x259582
jmp 0x25964d
addl $0xffffff24, %ecx       # imm = 0xFFFFFF24
cmpl $0x4, %ecx
jb 0x25949d
addq $0x2, %r13
movq %r13, %rcx
movq %rcx, %r13
cmpq %r14, %rcx
jne 0x2594ff
jmp 0x25932a
leaq 0x2(%r13), %rcx
cmpq %r14, %rcx
je 0x25932a
cmpb $0x0, 0x3(%r13)
jne 0x259589
cmpb $0x3e, (%rcx)
jne 0x259589
jmp 0x259657
movq %r14, %rcx
subq %r13, %rcx
cmpq $0x3, %rcx
jl 0x25964d
addq $0x3, %r13
jmp 0x259586
movq %r12, (%rbx)
jmp 0x259328
leaq -0x2(%r13), %r15
leaq 0x4(%rsp), %rdx
movq %rsi, %rdi
movq %r15, %rsi
callq 0x259bfb
testl %eax, %eax
je 0x259645
cmpq %r14, %r13
je 0x25932a
cmpb $0x0, 0x1(%r13)
jne 0x25949d
cmpb $0x3e, (%r13)
jne 0x25949d
addq $0x2, %r13
movq %r13, (%rbx)
movl 0x4(%rsp), %ebp
jmp 0x25932a
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
cmpq $0x3, %rax
jl 0x25932a
jmp 0x259499
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
cmpq $0x2, %rax
jl 0x25932a
jmp 0x259499
movq %r15, (%rbx)
jmp 0x259328
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
jmp 0x25932a
addq $0x4, %r13
jmp 0x259611