// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/expat-2.0.1/lib/xmltok_impl.c
// Function: little2_cdataSectionTok
static int PTRCALL
PREFIX(cdataSectionTok)(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_RSQB:
    ptr += MINBPC(enc);
    if (ptr == end)
      return XML_TOK_PARTIAL;
    if (!CHAR_MATCHES(enc, ptr, ASCII_RSQB))
      break;
    ptr += MINBPC(enc);
    if (ptr == end)
      return XML_TOK_PARTIAL;
    if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) {
      ptr -= MINBPC(enc);
      break;
    }
    *nextTokPtr = ptr + MINBPC(enc);
    return XML_TOK_CDATA_SECT_CLOSE;
  case BT_CR:
    ptr += MINBPC(enc);
    if (ptr == end)
      return XML_TOK_PARTIAL;
    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;
  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_NONXML:
    case BT_MALFORM:
    case BT_TRAIL:
    case BT_CR:
    case BT_LF:
    case BT_RSQB:
      *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 0x38c491
movl $0xfffffffc, 0x54(%rsp) # imm = 0xFFFFFFFC
jmp 0x38c8f8
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 0x38c4e4
movq 0x28(%rsp), %rax
andq $-0x2, %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x38c4d5
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x38c8f8
movq 0x40(%rsp), %rax
addq 0x28(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38c50d
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movzbl (%rcx), %ecx
movzbl 0x88(%rax,%rcx), %eax
movl %eax, 0x24(%rsp)
jmp 0x38c529
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 0x38c774
movq 0x18(%rsp), %rax
leaq 0x2138bf(%rip), %rcx    # 0x59fe08
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x38(%rsp), %rax
jne 0x38c579
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x38c8f8
movq 0x40(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38c594
movq 0x40(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x5d, %eax
je 0x38c599
jmp 0x38c782
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x38(%rsp), %rax
jne 0x38c5c0
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x38c8f8
movq 0x40(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38c5db
movq 0x40(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x3e, %eax
je 0x38c5ee
movq 0x40(%rsp), %rax
addq $-0x2, %rax
movq %rax, 0x40(%rsp)
jmp 0x38c782
movq 0x40(%rsp), %rcx
addq $0x2, %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x28, 0x54(%rsp)
jmp 0x38c8f8
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x38(%rsp), %rax
jne 0x38c633
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x38c8f8
movq 0x40(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38c65c
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movzbl (%rcx), %ecx
movzbl 0x88(%rax,%rcx), %eax
movl %eax, 0x14(%rsp)
jmp 0x38c678
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 0x38c68f
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 0x38c8f8
movq 0x40(%rsp), %rcx
addq $0x2, %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x7, 0x54(%rsp)
jmp 0x38c8f8
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jge 0x38c6e7
movl $0xfffffffe, 0x54(%rsp) # imm = 0xFFFFFFFE
jmp 0x38c8f8
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
jmp 0x38c782
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
cmpq $0x3, %rax
jge 0x38c71a
movl $0xfffffffe, 0x54(%rsp) # imm = 0xFFFFFFFE
jmp 0x38c8f8
movq 0x40(%rsp), %rax
addq $0x3, %rax
movq %rax, 0x40(%rsp)
jmp 0x38c782
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
cmpq $0x4, %rax
jge 0x38c74a
movl $0xfffffffe, 0x54(%rsp) # imm = 0xFFFFFFFE
jmp 0x38c8f8
movq 0x40(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x38c782
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x54(%rsp)
jmp 0x38c8f8
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
jmp 0x38c784
movq 0x40(%rsp), %rax
cmpq 0x38(%rsp), %rax
je 0x38c8e3
movq 0x40(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38c7bd
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movzbl (%rcx), %ecx
movzbl 0x88(%rax,%rcx), %eax
movl %eax, 0x10(%rsp)
jmp 0x38c7d9
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 0x38c8d0
movq 0x8(%rsp), %rax
leaq 0x21363b(%rip), %rcx    # 0x59fe34
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 0x38c82f
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x6, 0x54(%rsp)
jmp 0x38c8f8
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
jmp 0x38c8de
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
cmpq $0x3, %rax
jge 0x38c86f
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x6, 0x54(%rsp)
jmp 0x38c8f8
movq 0x40(%rsp), %rax
addq $0x3, %rax
movq %rax, 0x40(%rsp)
jmp 0x38c8de
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
cmpq $0x4, %rax
jge 0x38c8a9
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x6, 0x54(%rsp)
jmp 0x38c8f8
movq 0x40(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x38c8de
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x6, 0x54(%rsp)
jmp 0x38c8f8
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
jmp 0x38c784
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x6, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)