// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/expat-2.0.1/lib/xmltok_impl.c
// Function: little2_scanComment
static int PTRCALL
PREFIX(scanComment)(const ENCODING *enc, const char *ptr,
                    const char *end, const char **nextTokPtr)
{
  if (ptr != end) {
    if (!CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
      *nextTokPtr = ptr;
      return XML_TOK_INVALID;
    }
    ptr += MINBPC(enc);
    while (ptr != end) {
      switch (BYTE_TYPE(enc, ptr)) {
      INVALID_CASES(ptr, nextTokPtr)
      case BT_MINUS:
        if ((ptr += MINBPC(enc)) == end)
          return XML_TOK_PARTIAL;
        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
          if ((ptr += MINBPC(enc)) == end)
            return XML_TOK_PARTIAL;
          if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) {
            *nextTokPtr = ptr;
            return XML_TOK_INVALID;
          }
          *nextTokPtr = ptr + MINBPC(enc);
          return XML_TOK_COMMENT;
        }
        break;
      default:
        ptr += MINBPC(enc);
        break;
      }
    }
  }
  return XML_TOK_PARTIAL;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0x38fafa
movq 0x20(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38f8e3
movq 0x20(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x38f8fd
movq 0x20(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x34(%rsp)
jmp 0x38fb02
movq 0x20(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0x38faf8
movq 0x20(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38f944
movq 0x28(%rsp), %rax
movq 0x20(%rsp), %rcx
movzbl (%rcx), %ecx
movzbl 0x88(%rax,%rcx), %eax
movl %eax, 0xc(%rsp)
jmp 0x38f960
movq 0x20(%rsp), %rax
movb 0x1(%rax), %cl
movq 0x20(%rsp), %rax
movsbl %cl, %edi
movsbl (%rax), %esi
callq 0x38e510
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, %ecx
movq %rcx, (%rsp)
subl $0x1b, %eax
ja 0x38fae5
movq (%rsp), %rax
leaq 0x2109fe(%rip), %rcx    # 0x5a037c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jge 0x38f9a7
movl $0xfffffffe, 0x34(%rsp) # imm = 0xFFFFFFFE
jmp 0x38fb02
movq 0x20(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x20(%rsp)
jmp 0x38faf3
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
subq %rcx, %rax
cmpq $0x3, %rax
jge 0x38f9da
movl $0xfffffffe, 0x34(%rsp) # imm = 0xFFFFFFFE
jmp 0x38fb02
movq 0x20(%rsp), %rax
addq $0x3, %rax
movq %rax, 0x20(%rsp)
jmp 0x38faf3
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
subq %rcx, %rax
cmpq $0x4, %rax
jge 0x38fa0d
movl $0xfffffffe, 0x34(%rsp) # imm = 0xFFFFFFFE
jmp 0x38fb02
movq 0x20(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x20(%rsp)
jmp 0x38faf3
movq 0x20(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x34(%rsp)
jmp 0x38fb02
movq 0x20(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x20(%rsp)
cmpq 0x18(%rsp), %rax
jne 0x38fa5c
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x38fb02
movq 0x20(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38fae3
movq 0x20(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x38fae3
movq 0x20(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x20(%rsp)
cmpq 0x18(%rsp), %rax
jne 0x38fa96
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x38fb02
movq 0x20(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38fab1
movq 0x20(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x3e, %eax
je 0x38fac8
movq 0x20(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x34(%rsp)
jmp 0x38fb02
movq 0x20(%rsp), %rcx
addq $0x2, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movl $0xd, 0x34(%rsp)
jmp 0x38fb02
jmp 0x38faf3
movq 0x20(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x20(%rsp)
jmp 0x38f90b
jmp 0x38fafa
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax,%rax)