// File: /workspace/github_c_makefile_star2_O1/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 0x262255
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movzbl 0x1(%rsi), %eax
cmpl $0xdb, %eax
jg 0x2620ad
movb $0x7, %cl
leal -0xd8(%rax), %edx
cmpl $0x4, %edx
jb 0x2620ce
testl %eax, %eax
jne 0x2620cc
movzbl (%rsi), %ecx
movb 0x88(%r15,%rcx), %cl
jmp 0x2620ce
leal -0xdc(%rax), %ecx
cmpl $0x4, %ecx
jae 0x2620bc
movb $0x8, %cl
jmp 0x2620ce
cmpl $0xff, %eax
jne 0x2620cc
cmpb $-0x3, (%rsi)
jbe 0x2620cc
xorl %ecx, %ecx
jmp 0x2620ce
movb $0x1d, %cl
movzbl %cl, %ecx
cmpl $0x15, %ecx
jg 0x262108
cmpl $0x5, %ecx
je 0x262232
cmpl $0x6, %ecx
je 0x262242
cmpl $0x7, %ecx
jne 0x262250
subq %rsi, %r14
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
cmpq $0x4, %r14
jge 0x262250
jmp 0x262255
cmpl $0x16, %ecx
je 0x262149
cmpl $0x18, %ecx
je 0x262149
cmpl $0x1d, %ecx
jne 0x262250
leaq 0x174b2e(%rip), %rcx    # 0x3d6c50
movzbl (%rax,%rcx), %eax
movzbl (%rsi), %ecx
shll $0x5, %eax
movl %ecx, %edx
shrl $0x3, %edx
andl $0x1c, %edx
orl %eax, %edx
leaq 0x174613(%rip), %rax    # 0x3d6750
movl (%rdx,%rax), %eax
btl %ecx, %eax
jae 0x262250
leaq 0x2(%rsi), %rax
cmpq %r14, %rax
je 0x262255
leaq 0x4(%rsi), %r13
movq %r14, %rax
subq %rsi, %rax
addq $-0x2, %rax
leaq 0x173a89(%rip), %rcx    # 0x3d5bf4
leaq 0x174bde(%rip), %rdx    # 0x3d6d50
leaq 0x1745d7(%rip), %rdi    # 0x3d6750
movzbl -0x1(%r13), %r8d
cmpl $0xdb, %r8d
jg 0x2621ab
movb $0x7, %r9b
leal -0xd8(%r8), %r10d
cmpl $0x4, %r10d
jb 0x2621d5
testl %r8d, %r8d
jne 0x2621d2
movzbl -0x2(%r13), %r9d
movb 0x88(%r15,%r9), %r9b
jmp 0x2621d5
leal -0xdc(%r8), %r9d
cmpl $0x4, %r9d
jae 0x2621bd
movb $0x8, %r9b
jmp 0x2621d5
cmpl $0xff, %r8d
jne 0x2621d2
cmpb $-0x3, -0x2(%r13)
jbe 0x2621d2
xorl %r9d, %r9d
jmp 0x2621d5
movb $0x1d, %r9b
movzbl %r9b, %r9d
addl $-0x5, %r9d
cmpl $0x18, %r9d
ja 0x2623d0
movslq (%rcx,%r9,4), %r9
addq %rcx, %r9
jmpq *%r9
leaq 0x2(%r13), %r8
addq $-0x2, %rax
cmpq %r14, %r13
movq %r8, %r13
jne 0x262179
jmp 0x262255
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
jb 0x2621f1
jmp 0x2623d0
subq %rsi, %r14
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
cmpq $0x2, %r14
jge 0x262250
jmp 0x262255
subq %rsi, %r14
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
cmpq $0x3, %r14
jl 0x262255
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
leaq -0x2(%r13), %r12
leaq 0x4(%rsp), %rdx
movq %rsi, %rdi
movq %r12, %rsi
callq 0x262993
testl %eax, %eax
je 0x262362
cmpq %r14, %r13
je 0x262255
leaq 0x1739ca(%rip), %rax    # 0x3d5c58
movzbl 0x1(%r13), %edx
cmpl $0xdb, %edx
jg 0x2622bb
movb $0x7, %cl
leal -0xd8(%rdx), %esi
cmpl $0x4, %esi
jb 0x2622df
testl %edx, %edx
jne 0x2622dd
movzbl (%r13), %ecx
movb 0x88(%r15,%rcx), %cl
jmp 0x2622df
leal -0xdc(%rdx), %ecx
cmpl $0x4, %ecx
jae 0x2622ca
movb $0x8, %cl
jmp 0x2622df
cmpl $0xff, %edx
jne 0x2622dd
cmpb $-0x3, (%r13)
jbe 0x2622dd
xorl %ecx, %ecx
jmp 0x2622df
movb $0x1d, %cl
cmpb $0xf, %cl
ja 0x262300
movzbl %cl, %ecx
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %r14, %rcx
subq %r13, %rcx
cmpq $0x2, %rcx
jl 0x2623e4
addq $0x2, %r13
jmp 0x26234e
movq %r14, %rcx
subq %r13, %rcx
cmpq $0x3, %rcx
jl 0x2623e4
addq $0x3, %r13
jmp 0x26234e
leaq 0x2(%r13), %rcx
cmpq %r14, %rcx
je 0x262255
cmpb $0x0, 0x3(%r13)
jne 0x262351
cmpb $0x3e, (%rcx)
jne 0x262351
jmp 0x2623ee
movq %r14, %rcx
subq %r13, %rcx
cmpq $0x4, %rcx
jl 0x2623e4
addq $0x4, %r13
movq %r13, %rcx
movq %rcx, %r13
cmpq %r14, %rcx
jne 0x26228e
jmp 0x262255
movq %r12, (%rbx)
jmp 0x262253
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
cmpq $0x2, %rax
jl 0x262255
jmp 0x2623d0
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
cmpq $0x3, %rax
jl 0x262255
jmp 0x2623d0
leaq -0x2(%r13), %r15
leaq 0x4(%rsp), %rdx
movq %rsi, %rdi
movq %r15, %rsi
callq 0x262993
testl %eax, %eax
je 0x2623dc
cmpq %r14, %r13
je 0x262255
cmpb $0x0, 0x1(%r13)
jne 0x2623d4
cmpb $0x3e, (%r13)
jne 0x2623d4
addq $0x2, %r13
jmp 0x2623f2
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
cmpq $0x4, %rax
jl 0x262255
addq $-0x2, %r13
movq %r13, (%rbx)
jmp 0x262253
movq %r15, (%rbx)
jmp 0x262253
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
jmp 0x262255
addq $0x4, %r13
movq %r13, (%rbx)
movl 0x4(%rsp), %ebp
jmp 0x262255