// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmltok_impl.c
// Function: big2_contentTok
static int PTRCALL
PREFIX(contentTok)(const ENCODING *enc, const char *ptr, const char *end,
                   const char **nextTokPtr)
{
  if (ptr == end)
    return XML_TOK_NONE;
  if (MINBPC(enc) > 1) {
    size_t n = end - ptr;
    if (n & (MINBPC(enc) - 1)) {
      n &= ~(MINBPC(enc) - 1);
      if (n == 0)
        return XML_TOK_PARTIAL;
      end = ptr + n;
    }
  }
  switch (BYTE_TYPE(enc, ptr)) {
  case BT_LT:
    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  case BT_AMP:
    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  case BT_CR:
    ptr += MINBPC(enc);
    if (ptr == end)
      return XML_TOK_TRAILING_CR;
    if (BYTE_TYPE(enc, ptr) == BT_LF)
      ptr += MINBPC(enc);
    *nextTokPtr = ptr;
    return XML_TOK_DATA_NEWLINE;
  case BT_LF:
    *nextTokPtr = ptr + MINBPC(enc);
    return XML_TOK_DATA_NEWLINE;
  case BT_RSQB:
    ptr += MINBPC(enc);
    if (ptr == end)
      return XML_TOK_TRAILING_RSQB;
    if (!CHAR_MATCHES(enc, ptr, ASCII_RSQB))
      break;
    ptr += MINBPC(enc);
    if (ptr == end)
      return XML_TOK_TRAILING_RSQB;
    if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) {
      ptr -= MINBPC(enc);
      break;
    }
    *nextTokPtr = ptr;
    return XML_TOK_INVALID;
  INVALID_CASES(ptr, nextTokPtr)
  default:
    ptr += MINBPC(enc);
    break;
  }
  while (ptr != end) {
    switch (BYTE_TYPE(enc, ptr)) {
#define LEAD_CASE(n) \
    case BT_LEAD ## n: \
      if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) { \
        *nextTokPtr = ptr; \
        return XML_TOK_DATA_CHARS; \
      } \
      ptr += n; \
      break;
    LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4)
#undef LEAD_CASE
    case BT_RSQB:
      if (ptr + MINBPC(enc) != end) {
         if (!CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
           ptr += MINBPC(enc);
           break;
         }
         if (ptr + 2*MINBPC(enc) != end) {
           if (!CHAR_MATCHES(enc, ptr + 2*MINBPC(enc), ASCII_GT)) {
             ptr += MINBPC(enc);
             break;
           }
           *nextTokPtr = ptr + 2*MINBPC(enc);
           return XML_TOK_INVALID;
         }
      }
      /* fall through */
    case BT_AMP:
    case BT_LT:
    case BT_NONXML:
    case BT_MALFORM:
    case BT_TRAIL:
    case BT_CR:
    case BT_LF:
      *nextTokPtr = ptr;
      return XML_TOK_DATA_CHARS;
    default:
      ptr += MINBPC(enc);
      break;
    }
  }
  *nextTokPtr = ptr;
  return XML_TOK_DATA_CHARS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpq %rdx, %rsi
je 0x25aa78
movq %rdx, %rax
movq %rdx, %r8
subq %rsi, %r8
movq %r8, %r9
andq $-0x2, %r9
leaq (%rsi,%r9), %rdx
testq %r9, %r9
cmoveq %rax, %rdx
setne %r9b
testb $0x1, %r8b
cmoveq %rax, %rdx
sete %r8b
orb %r9b, %r8b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0x1, %r8b
jne 0x25ac18
movzbl (%rsi), %r8d
cmpl $0xdb, %r8d
jg 0x25aa82
leal -0xd8(%r8), %r9d
cmpl $0x4, %r9d
jae 0x25aa98
movq %rdx, %r8
subq %rsi, %r8
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x4, %r8
jl 0x25ac18
addq $0x4, %rsi
jmp 0x25ab1f
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
jmp 0x25ac18
leal -0xdc(%r8), %eax
cmpl $0x4, %eax
jae 0x25ab08
movq %rsi, (%rcx)
xorl %eax, %eax
jmp 0x25ac18
testl %r8d, %r8d
jne 0x25ab1b
movzbl 0x1(%rsi), %r8d
movzbl 0x88(%rdi,%r8), %r8d
cmpq $0xa, %r8
ja 0x25ab1b
leaq 0x171e8c(%rip), %r9     # 0x3cc944
movslq (%r9,%r8,4), %r8
addq %r9, %r8
jmpq *%r8
leaq 0x2(%rsi), %r8
cmpq %rdx, %r8
je 0x25ac18
movzbl (%r8), %r9d
cmpl $0xdb, %r9d
jg 0x25acf8
leal -0xd8(%r9), %r10d
cmpl $0x4, %r10d
jae 0x25ad0d
subq %r8, %rdx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x4, %rdx
jl 0x25ac18
jmp 0x25ad05
cmpl $0xff, %r8d
jne 0x25ab1b
cmpb $-0x3, 0x1(%rsi)
ja 0x25aa8e
addq $0x2, %rsi
movq %rsi, %r8
cmpq %rdx, %r8
je 0x25ac0d
leaq 0x171fba(%rip), %rax    # 0x3ccaec
movzbl (%r8), %esi
cmpl $0xdb, %esi
jg 0x25ab64
leal -0xd8(%rsi), %r9d
cmpl $0x4, %r9d
jae 0x25ab78
movq %rdx, %rsi
subq %r8, %rsi
cmpq $0x3, %rsi
jle 0x25ac08
addq $0x4, %r8
jmp 0x25abe5
cmpl $0xff, %esi
jne 0x25abc8
cmpb $-0x3, 0x1(%r8)
jbe 0x25abe1
jmp 0x25ac08
testl %esi, %esi
jne 0x25abe1
movzbl 0x1(%r8), %esi
movzbl 0x88(%rdi,%rsi), %esi
cmpq $0xa, %rsi
ja 0x25abe1
movslq (%rax,%rsi,4), %rsi
addq %rax, %rsi
jmpq *%rsi
leaq 0x2(%r8), %rsi
cmpq %rdx, %rsi
je 0x25ac08
cmpb $0x0, (%rsi)
jne 0x25abe8
cmpb $0x5d, 0x3(%r8)
jne 0x25abe8
leaq 0x4(%r8), %r9
cmpq %rdx, %r9
je 0x25ac08
cmpb $0x0, (%r9)
jne 0x25abe8
cmpb $0x3e, 0x5(%r8)
jne 0x25abe8
jmp 0x25acb7
addl $0xffffff24, %esi       # imm = 0xFFFFFF24
cmpl $0x4, %esi
jae 0x25abe1
jmp 0x25ac08
movq %rdx, %rsi
subq %r8, %rsi
cmpq $0x1, %rsi
jle 0x25ac08
addq $0x2, %r8
movq %r8, %rsi
movq %rsi, %r8
cmpq %rdx, %rsi
jne 0x25ab32
jmp 0x25ac10
movq %rdx, %rsi
subq %r8, %rsi
cmpq $0x2, %rsi
jle 0x25ac08
addq $0x3, %r8
jmp 0x25abe5
movq %r8, (%rcx)
jmp 0x25ac13
movq %r8, %rsi
movq %rsi, (%rcx)
movl $0x6, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2(%rsi), %rax
cmpq %rdx, %rax
je 0x25acee
cmpb $0x0, (%rax)
jne 0x25ac47
movzbl 0x3(%rsi), %edx
addq $0x4, %rsi
cmpb $0xa, 0x88(%rdi,%rdx)
cmoveq %rsi, %rax
movq %rax, (%rcx)
jmp 0x25acc6
movq %rdx, %r8
subq %rsi, %r8
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x2, %r8
jge 0x25ab1b
jmp 0x25ac18
addq $0x2, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x25cd7e
leaq 0x2(%rsi), %r8
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
cmpq %rdx, %r8
je 0x25ac18
cmpb $0x0, (%r8)
jne 0x25ab22
cmpb $0x5d, 0x3(%rsi)
jne 0x25ab22
leaq 0x4(%rsi), %r9
cmpq %rdx, %r9
je 0x25ac18
cmpb $0x0, (%r9)
jne 0x25ab22
cmpb $0x3e, 0x5(%rsi)
jne 0x25ab22
movq %r9, (%rcx)
jmp 0x25aa91
addq $0x2, %rsi
movq %rsi, (%rcx)
movl $0x7, %eax
jmp 0x25ac18
movq %rdx, %r8
subq %rsi, %r8
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x3, %r8
jl 0x25ac18
addq $0x3, %rsi
jmp 0x25ab1f
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
jmp 0x25ac18
leal -0xdc(%r9), %r10d
cmpl $0x4, %r10d
jae 0x25ad52
movq %r8, (%rcx)
jmp 0x25aa91
testl %r9d, %r9d
jne 0x25ad67
movzbl 0x3(%rsi), %r10d
movzbl 0x88(%rdi,%r10), %r11d
leal -0x5(%r11), %ebx
cmpl $0x13, %ebx
ja 0x25ae9a
leaq 0x171c3c(%rip), %r9     # 0x3cc970
movslq (%r9,%rbx,4), %r10
addq %r9, %r10
jmpq *%r10
subq %r8, %rdx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x2, %rdx
jl 0x25ac18
jmp 0x25ad05
cmpl $0xff, %r9d
jne 0x25ad67
movb 0x3(%rsi), %r10b
cmpb $-0x3, %r10b
ja 0x25ad05
jmp 0x25ad6b
movb 0x3(%rsi), %r10b
leaq 0x17279e(%rip), %r11    # 0x3cd510
movzbl (%r9,%r11), %r9d
movzbl %r10b, %r11d
shrb $0x3, %r10b
shll $0x5, %r9d
movzbl %r10b, %r10d
andl $0x1c, %r10d
orl %r9d, %r10d
leaq 0x17227b(%rip), %r9     # 0x3cd010
movl (%r10,%r9), %r9d
btl %r11d, %r9d
jae 0x25ad05
leaq 0x4(%rsi), %r8
cmpq %rdx, %r8
je 0x25ac18
xorl %r9d, %r9d
leaq 0x171c6a(%rip), %r10    # 0x3cca24
leaq 0x17284f(%rip), %r11    # 0x3cd610
leaq 0x172248(%rip), %r8     # 0x3cd010
movzbl 0x4(%rsi,%r9), %ebx
cmpl $0xdb, %ebx
jg 0x25ae01
testl %ebx, %ebx
jne 0x25ae16
movzbl 0x5(%rsi,%r9), %r14d
movzbl 0x88(%rdi,%r14), %r15d
addl $-0x5, %r15d
cmpl $0x18, %r15d
ja 0x25ae8a
movslq (%r10,%r15,4), %r15
addq %r10, %r15
jmpq *%r15
cmpl $0xff, %ebx
jne 0x25ae23
movb 0x5(%rsi,%r9), %r14b
cmpb $-0x3, %r14b
jbe 0x25ae33
jmp 0x25ae8a
leal -0xd8(%rbx), %ebp
cmpl $0x4, %ebp
jae 0x25ae2e
jmp 0x25ae71
leal -0xdc(%rbx), %ebp
cmpl $0x4, %ebp
jb 0x25ae8a
movb 0x5(%rsi,%r9), %r14b
movzbl (%rbx,%r11), %ebx
movzbl %r14b, %ebp
shrb $0x3, %r14b
shll $0x5, %ebx
movzbl %r14b, %r14d
andl $0x1c, %r14d
orl %ebx, %r14d
movl (%r14,%r8), %ebx
btl %ebp, %ebx
jae 0x25ae8a
leaq (%rsi,%r9), %rbx
addq $0x6, %rbx
addq $0x2, %r9
cmpq %rdx, %rbx
jne 0x25adc8
jmp 0x25ac18
subq %rsi, %rdx
subq %r9, %rdx
addq $-0x4, %rdx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x4, %rdx
jl 0x25ac18
leaq (%rsi,%r9), %rax
addq $0x4, %rax
movq %rax, (%rcx)
jmp 0x25aa91
cmpl $0x1d, %r11d
je 0x25ad6b
jmp 0x25ad05
addq $0x4, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x25c3fa
leaq 0x4(%rsi), %r9
cmpq %rdx, %r9
je 0x25ac18
movzbl (%r9), %r10d
xorl %r8d, %r8d
cmpl $0xdb, %r10d
jg 0x25af61
leal -0xd8(%r10), %r11d
cmpl $0x4, %r11d
jae 0x25b034
subq %r9, %rdx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x4, %rdx
jl 0x25ac18
jmp 0x25af72
leaq 0x4(%rsi), %r8
cmpq %rdx, %r8
je 0x25ac18
cmpb $0x0, (%r8)
jne 0x25ad05
movzbl 0x5(%rsi), %r9d
movzbl 0x88(%rdi,%r9), %r9d
cmpl $0x14, %r9d
je 0x25b094
cmpl $0x1b, %r9d
jne 0x25ad05
addq $0x6, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x25cbd5
subq %r8, %rdx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x3, %rdx
jl 0x25ac18
jmp 0x25ad05
leal -0xdc(%r10), %r11d
cmpl $0x4, %r11d
jae 0x25b074
movq %r9, (%rcx)
movl %r8d, %eax
jmp 0x25ac18
leaq (%rsi,%r9), %r10
addq $0x6, %r10
cmpq %rdx, %r10
je 0x25ac18
movq %rdx, %r10
subq %rsi, %r10
subq %r9, %r10
addq $-0x6, %r10
addq %r9, %rsi
addq $0x8, %rsi
leaq 0x171adf(%rip), %rbx    # 0x3cca88
movzbl -0x2(%rsi), %r11d
testl %r11d, %r11d
jne 0x25afee
movzbl -0x1(%rsi), %r9d
movzbl 0x88(%rdi,%r9), %r11d
addl $-0x5, %r11d
cmpl $0x18, %r11d
ja 0x25b3bd
movslq (%rbx,%r11,4), %r11
addq %rbx, %r11
jmpq *%r11
leaq 0x2(%rsi), %r9
addq $-0x2, %r10
cmpq %rdx, %rsi
movq %r9, %rsi
jne 0x25afa9
jmp 0x25ac18
leal -0xd8(%r11), %eax
cmpl $0x4, %eax
jb 0x25b28b
leal -0xdc(%r11), %eax
cmpl $0x4, %eax
jb 0x25b3bd
cmpl $0xff, %r11d
jne 0x25b322
movb -0x1(%rsi), %r9b
movl $0xff, %r11d
cmpb $-0x3, %r9b
jbe 0x25b384
jmp 0x25b3bd
testl %r10d, %r10d
jne 0x25b16f
movzbl 0x5(%rsi), %r11d
movzbl 0x88(%rdi,%r11), %ebx
cmpl $0x15, %ebx
jg 0x25b2a7
cmpl $0x5, %ebx
je 0x25b328
cmpl $0x6, %ebx
je 0x25b33f
cmpl $0x7, %ebx
je 0x25aeec
jmp 0x25af72
cmpl $0xff, %r10d
jne 0x25b16f
movb 0x5(%rsi), %r11b
cmpb $-0x3, %r11b
ja 0x25af72
jmp 0x25b173
leaq 0x6(%rsi), %rdi
subq %rdi, %rdx
cmpq $0xc, %rdx
jl 0x25ac18
addq $0x12, %rsi
xorl %eax, %eax
leaq 0x17265e(%rip), %rdx    # 0x3cd710
xorl %r8d, %r8d
cmpb $0x0, (%rdi)
jne 0x25b2c7
movb 0x1(%rdi), %r9b
cmpb (%r8,%rdx), %r9b
jne 0x25b2c7
incq %r8
addq $0x2, %rdi
cmpq $0x6, %r8
jne 0x25b0b5
movl $0x8, %eax
jmp 0x25b2ca
addq %r9, %rsi
addq $0x4, %rsi
addq $0x2, %rsi
movq %rsi, (%rcx)
movl $0x2, %eax
jmp 0x25ac18
addq %r9, %rsi
addq $0x4, %rsi
leaq 0x2(%rsi), %rdi
cmpq %rdx, %rdi
je 0x25ac18
cmpb $0x0, (%rdi)
jne 0x25b29f
cmpb $0x3e, 0x3(%rsi)
jne 0x25b29f
addq $0x4, %rsi
movq %rsi, (%rcx)
movl $0x4, %eax
jmp 0x25ac18
subq %rsi, %rdx
subq %r9, %rdx
addq $-0x4, %rdx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x2, %rdx
jl 0x25ac18
jmp 0x25ae8a
subq %rsi, %rdx
subq %r9, %rdx
addq $-0x4, %rdx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x3, %rdx
jl 0x25ac18
jmp 0x25ae8a
movb 0x5(%rsi), %r11b
leaq 0x172396(%rip), %rbx    # 0x3cd510
movzbl (%r10,%rbx), %r10d
movzbl %r11b, %ebx
shrb $0x3, %r11b
shll $0x5, %r10d
movzbl %r11b, %r11d
andl $0x1c, %r11d
orl %r10d, %r11d
leaq 0x171e73(%rip), %r10    # 0x3cd010
movl (%r11,%r10), %r10d
btl %ebx, %r10d
jae 0x25af72
leaq 0x6(%rsi), %r9
cmpq %rdx, %r9
je 0x25ac18
movq %rdx, %r10
subq %rsi, %r10
addq $0x8, %rsi
addq $-0x6, %r10
leaq 0x1717f3(%rip), %r11    # 0x3cc9c0
leaq 0x17243c(%rip), %rbx    # 0x3cd610
leaq 0x171e35(%rip), %r14    # 0x3cd010
movq %rsi, %r9
movzbl -0x2(%r9), %esi
cmpl $0xdb, %esi
jg 0x25b215
testl %esi, %esi
jne 0x25b22c
movzbl -0x1(%r9), %r15d
movzbl 0x88(%rdi,%r15), %r12d
addl $-0x5, %r12d
cmpl $0x18, %r12d
ja 0x25b2e1
movslq (%r11,%r12,4), %r12
addq %r11, %r12
jmpq *%r12
cmpl $0xff, %esi
jne 0x25b23c
movb -0x1(%r9), %r15b
cmpb $-0x3, %r15b
jbe 0x25b24f
jmp 0x25b2e1
leal -0xd8(%rsi), %ebp
cmpl $0x4, %ebp
jae 0x25b24b
jmp 0x25b2d2
leal -0xdc(%rsi), %ebp
cmpl $0x4, %ebp
jb 0x25b2e1
movb -0x1(%r9), %r15b
movzbl (%rsi,%rbx), %esi
movzbl %r15b, %ebp
shrb $0x3, %r15b
shll $0x5, %esi
movzbl %r15b, %r15d
andl $0x1c, %r15d
orl %esi, %r15d
movl (%r15,%r14), %esi
btl %ebp, %esi
jae 0x25b2e1
leaq 0x2(%r9), %rsi
addq $-0x2, %r10
cmpq %rdx, %r9
movq %rsi, %r9
jne 0x25b1de
jmp 0x25ac18
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x4, %r10
jl 0x25ac18
jmp 0x25b3bd
movq %rdi, (%rcx)
jmp 0x25aa91
cmpl $0x16, %ebx
je 0x25b1ab
cmpl $0x18, %ebx
je 0x25b1ab
cmpl $0x1d, %ebx
je 0x25b173
jmp 0x25af72
movq %rdi, %rsi
movq %rsi, (%rcx)
jmp 0x25ac18
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x4, %r10
jl 0x25ac18
addq $-0x2, %r9
jmp 0x25af72
cmpb $0x0, (%r9)
jne 0x25af72
movzbl 0x1(%r9), %esi
movzbl 0x88(%rdi,%rsi), %esi
leal -0x9(%rsi), %r10d
cmpl $0x2, %r10d
jb 0x25b314
cmpl $0x15, %esi
jne 0x25b3f7
addq $0x2, %r9
cmpq %rdx, %r9
jne 0x25b2ea
jmp 0x25ac18
movb -0x1(%rsi), %r9b
jmp 0x25b384
subq %r9, %rdx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x2, %rdx
jl 0x25ac18
jmp 0x25af72
subq %r9, %rdx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x3, %rdx
jl 0x25ac18
jmp 0x25af72
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x2, %r10
jl 0x25ac18
jmp 0x25b3bd
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x3, %r10
jl 0x25ac18
jmp 0x25b3bd
addq $-0x2, %rsi
jmp 0x25b0ea
xorl %r11d, %r11d
leaq 0x172185(%rip), %rax    # 0x3cd510
movzbl (%r11,%rax), %eax
movzbl %r9b, %r10d
shrb $0x3, %r9b
shll $0x5, %eax
movzbl %r9b, %r9d
andl $0x1c, %r9d
orl %eax, %r9d
movl (%r9,%r8), %eax
btl %r10d, %eax
jae 0x25b3bd
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x25d0d8
addq $-0x2, %rsi
jmp 0x25aa8e
addq $-0x2, %rsi
jmp 0x25b102
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x2, %r10
jl 0x25ac18
jmp 0x25b2e1
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq $0x3, %r10
jl 0x25ac18
jmp 0x25b2e1
cmpl $0xb, %esi
jne 0x25af72
addq $0x2, %r9
movl $0x5, %r8d
jmp 0x25af72