// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/expat-2.0.1/lib/xmltok_impl.c
// Function: little2_scanLit
static int PTRCALL
PREFIX(scanLit)(int open, const ENCODING *enc,
                const char *ptr, const char *end,
                const char **nextTokPtr)
{
  while (ptr != end) {
    int t = BYTE_TYPE(enc, ptr);
    switch (t) {
    INVALID_CASES(ptr, nextTokPtr)
    case BT_QUOT:
    case BT_APOS:
      ptr += MINBPC(enc);
      if (t != open)
        break;
      if (ptr == end)
        return -XML_TOK_LITERAL;
      *nextTokPtr = ptr;
      switch (BYTE_TYPE(enc, ptr)) {
      case BT_S: case BT_CR: case BT_LF:
      case BT_GT: case BT_PERCNT: case BT_LSQB:
        return XML_TOK_LITERAL;
      default:
        return XML_TOK_INVALID;
      }
    default:
      ptr += MINBPC(enc);
      break;
    }
  }
  return XML_TOK_PARTIAL;
}

// Assembly:
subq $0x48, %rsp
movl %edi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
je 0x38e7be
movq 0x30(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38e5e5
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rcx
movzbl (%rcx), %ecx
movzbl 0x88(%rax,%rcx), %eax
movl %eax, 0x18(%rsp)
jmp 0x38e601
movq 0x30(%rsp), %rax
movb 0x1(%rax), %cl
movq 0x30(%rsp), %rax
movsbl %cl, %edi
movsbl (%rax), %esi
callq 0x38e510
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movq %rax, 0x10(%rsp)
subq $0xd, %rax
ja 0x38e7ab
movq 0x10(%rsp), %rax
leaq 0x211a44(%rip), %rcx    # 0x5a006c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jge 0x38e651
movl $0xfffffffe, 0x44(%rsp) # imm = 0xFFFFFFFE
jmp 0x38e7c6
movq 0x30(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x30(%rsp)
jmp 0x38e7b9
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
cmpq $0x3, %rax
jge 0x38e684
movl $0xfffffffe, 0x44(%rsp) # imm = 0xFFFFFFFE
jmp 0x38e7c6
movq 0x30(%rsp), %rax
addq $0x3, %rax
movq %rax, 0x30(%rsp)
jmp 0x38e7b9
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
cmpq $0x4, %rax
jge 0x38e6b7
movl $0xfffffffe, 0x44(%rsp) # imm = 0xFFFFFFFE
jmp 0x38e7c6
movq 0x30(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x30(%rsp)
jmp 0x38e7b9
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x44(%rsp)
jmp 0x38e7c6
movq 0x30(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x30(%rsp)
movl 0x1c(%rsp), %eax
cmpl 0x40(%rsp), %eax
je 0x38e701
jmp 0x38e7b9
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
jne 0x38e71a
movl $0xffffffe5, 0x44(%rsp) # imm = 0xFFFFFFE5
jmp 0x38e7c6
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movq 0x30(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38e750
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rcx
movzbl (%rcx), %ecx
movzbl 0x88(%rax,%rcx), %eax
movl %eax, 0xc(%rsp)
jmp 0x38e76c
movq 0x30(%rsp), %rax
movb 0x1(%rax), %cl
movq 0x30(%rsp), %rax
movsbl %cl, %edi
movsbl (%rax), %esi
callq 0x38e510
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x8(%rsp)
addl $-0x9, %eax
subl $0x3, %eax
jb 0x38e797
jmp 0x38e77e
movl 0x8(%rsp), %eax
addl $-0x14, %eax
subl $0x2, %eax
jb 0x38e797
jmp 0x38e78c
movl 0x8(%rsp), %eax
subl $0x1e, %eax
jne 0x38e7a1
jmp 0x38e797
movl $0x1b, 0x44(%rsp)
jmp 0x38e7c6
movl $0x0, 0x44(%rsp)
jmp 0x38e7c6
movq 0x30(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x30(%rsp)
jmp 0x38e5ac
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nop