// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/expat-2.0.1/lib/xmltok_impl.c
// Function: little2_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:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x38(%rsp), %rax
jne 0x38bf01
movl $0xfffffffc, 0x54(%rsp) # imm = 0xFFFFFFFC
jmp 0x38c457
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x38bf54
movq 0x28(%rsp), %rax
andq $-0x2, %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x38bf45
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x38c457
movq 0x40(%rsp), %rax
addq 0x28(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38bf7d
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movzbl (%rcx), %ecx
movzbl 0x88(%rax,%rcx), %eax
movl %eax, 0x24(%rsp)
jmp 0x38bf99
movq 0x40(%rsp), %rax
movb 0x1(%rax), %cl
movq 0x40(%rsp), %rax
movsbl %cl, %edi
movsbl (%rax), %esi
callq 0x38e510
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
movl %eax, %ecx
movq %rcx, 0x18(%rsp)
subl $0xa, %eax
ja 0x38c22c
movq 0x18(%rsp), %rax
leaq 0x213df7(%rip), %rcx    # 0x59fdb0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
addq $0x2, %rsi
movq 0x38(%rsp), %rdx
movq 0x30(%rsp), %rcx
callq 0x38fcb0
movl %eax, 0x54(%rsp)
jmp 0x38c457
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
addq $0x2, %rsi
movq 0x38(%rsp), %rdx
movq 0x30(%rsp), %rcx
callq 0x390460
movl %eax, 0x54(%rsp)
jmp 0x38c457
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x38(%rsp), %rax
jne 0x38c035
movl $0xfffffffd, 0x54(%rsp) # imm = 0xFFFFFFFD
jmp 0x38c457
movq 0x40(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38c05e
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movzbl (%rcx), %ecx
movzbl 0x88(%rax,%rcx), %eax
movl %eax, 0x14(%rsp)
jmp 0x38c07a
movq 0x40(%rsp), %rax
movb 0x1(%rax), %cl
movq 0x40(%rsp), %rax
movsbl %cl, %edi
movsbl (%rax), %esi
callq 0x38e510
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl $0xa, %eax
jne 0x38c091
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x7, 0x54(%rsp)
jmp 0x38c457
movq 0x40(%rsp), %rcx
addq $0x2, %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x7, 0x54(%rsp)
jmp 0x38c457
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x38(%rsp), %rax
jne 0x38c0f0
movl $0xfffffffb, 0x54(%rsp) # imm = 0xFFFFFFFB
jmp 0x38c457
movq 0x40(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38c10b
movq 0x40(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x5d, %eax
je 0x38c110
jmp 0x38c23a
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x38(%rsp), %rax
jne 0x38c137
movl $0xfffffffb, 0x54(%rsp) # imm = 0xFFFFFFFB
jmp 0x38c457
movq 0x40(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38c152
movq 0x40(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x3e, %eax
je 0x38c165
movq 0x40(%rsp), %rax
addq $-0x2, %rax
movq %rax, 0x40(%rsp)
jmp 0x38c23a
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x54(%rsp)
jmp 0x38c457
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jge 0x38c19f
movl $0xfffffffe, 0x54(%rsp) # imm = 0xFFFFFFFE
jmp 0x38c457
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
jmp 0x38c23a
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
cmpq $0x3, %rax
jge 0x38c1d2
movl $0xfffffffe, 0x54(%rsp) # imm = 0xFFFFFFFE
jmp 0x38c457
movq 0x40(%rsp), %rax
addq $0x3, %rax
movq %rax, 0x40(%rsp)
jmp 0x38c23a
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
cmpq $0x4, %rax
jge 0x38c202
movl $0xfffffffe, 0x54(%rsp) # imm = 0xFFFFFFFE
jmp 0x38c457
movq 0x40(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x38c23a
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x54(%rsp)
jmp 0x38c457
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
jmp 0x38c23c
movq 0x40(%rsp), %rax
cmpq 0x38(%rsp), %rax
je 0x38c442
movq 0x40(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38c275
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movzbl (%rcx), %ecx
movzbl 0x88(%rax,%rcx), %eax
movl %eax, 0x10(%rsp)
jmp 0x38c291
movq 0x40(%rsp), %rax
movb 0x1(%rax), %cl
movq 0x40(%rsp), %rax
movsbl %cl, %edi
movsbl (%rax), %esi
callq 0x38e510
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0xa, %eax
ja 0x38c42f
movq 0x8(%rsp), %rax
leaq 0x213b2b(%rip), %rcx    # 0x59fddc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jge 0x38c2e7
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x6, 0x54(%rsp)
jmp 0x38c457
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
jmp 0x38c43d
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
cmpq $0x3, %rax
jge 0x38c327
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x6, 0x54(%rsp)
jmp 0x38c457
movq 0x40(%rsp), %rax
addq $0x3, %rax
movq %rax, 0x40(%rsp)
jmp 0x38c43d
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
cmpq $0x4, %rax
jge 0x38c367
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x6, 0x54(%rsp)
jmp 0x38c457
movq 0x40(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x38c43d
movq 0x40(%rsp), %rax
addq $0x2, %rax
cmpq 0x38(%rsp), %rax
je 0x38c416
movq 0x40(%rsp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x0, %eax
jne 0x38c3aa
movq 0x40(%rsp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x5d, %eax
je 0x38c3bd
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
jmp 0x38c43d
movq 0x40(%rsp), %rax
addq $0x4, %rax
cmpq 0x38(%rsp), %rax
je 0x38c414
movq 0x40(%rsp), %rax
movsbl 0x5(%rax), %eax
cmpl $0x0, %eax
jne 0x38c3e9
movq 0x40(%rsp), %rax
movsbl 0x4(%rax), %eax
cmpl $0x3e, %eax
je 0x38c3f9
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
jmp 0x38c43d
movq 0x40(%rsp), %rcx
addq $0x4, %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x54(%rsp)
jmp 0x38c457
jmp 0x38c416
jmp 0x38c418
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x6, 0x54(%rsp)
jmp 0x38c457
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
jmp 0x38c23c
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x6, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq