// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/expat-2.0.1/lib/xmltok_impl.c
// Function: little2_scanDecl
static int PTRCALL
PREFIX(scanDecl)(const ENCODING *enc, const char *ptr,
                 const char *end, const char **nextTokPtr)
{
  if (ptr == end)
    return XML_TOK_PARTIAL;
  switch (BYTE_TYPE(enc, ptr)) {
  case BT_MINUS:
    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  case BT_LSQB:
    *nextTokPtr = ptr + MINBPC(enc);
    return XML_TOK_COND_SECT_OPEN;
  case BT_NMSTRT:
  case BT_HEX:
    ptr += MINBPC(enc);
    break;
  default:
    *nextTokPtr = ptr;
    return XML_TOK_INVALID;
  }
  while (ptr != end) {
    switch (BYTE_TYPE(enc, ptr)) {
    case BT_PERCNT:
      if (ptr + MINBPC(enc) == end)
        return XML_TOK_PARTIAL;
      /* don't allow <!ENTITY% foo "whatever"> */
      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
      case BT_S: case BT_CR: case BT_LF: case BT_PERCNT:
        *nextTokPtr = ptr;
        return XML_TOK_INVALID;
      }
      /* fall through */
    case BT_S: case BT_CR: case BT_LF:
      *nextTokPtr = ptr;
      return XML_TOK_DECL_OPEN;
    case BT_NMSTRT:
    case BT_HEX:
      ptr += MINBPC(enc);
      break;
    default:
      *nextTokPtr = ptr;
      return XML_TOK_INVALID;
    }
  }
  return XML_TOK_PARTIAL;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
jne 0x38e801
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x38ea72
movq 0x30(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38e82a
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rcx
movzbl (%rcx), %ecx
movzbl 0x88(%rax,%rcx), %eax
movl %eax, 0x1c(%rsp)
jmp 0x38e846
movq 0x30(%rsp), %rax
movb 0x1(%rax), %cl
movq 0x30(%rsp), %rax
movsbl %cl, %edi
movsbl (%rax), %esi
callq 0x38e510
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
addl $-0x14, %eax
movl %eax, %ecx
movq %rcx, 0x10(%rsp)
subl $0x7, %eax
ja 0x38e8c2
movq 0x10(%rsp), %rax
leaq 0x21183f(%rip), %rcx    # 0x5a00a4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
addq $0x2, %rsi
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq 0x38f8a0
movl %eax, 0x44(%rsp)
jmp 0x38ea72
movq 0x30(%rsp), %rcx
addq $0x2, %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x21, 0x44(%rsp)
jmp 0x38ea72
movq 0x30(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x30(%rsp)
jmp 0x38e8dc
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x44(%rsp)
jmp 0x38ea72
jmp 0x38e8de
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
je 0x38ea6a
movq 0x30(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38e917
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rcx
movzbl (%rcx), %ecx
movzbl 0x88(%rax,%rcx), %eax
movl %eax, 0xc(%rsp)
jmp 0x38e933
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 $0x2, %eax
jb 0x38ea27
jmp 0x38e949
movl 0x8(%rsp), %eax
subl $0x15, %eax
je 0x38ea27
jmp 0x38e958
movl 0x8(%rsp), %eax
subl $0x16, %eax
je 0x38ea3e
jmp 0x38e967
movl 0x8(%rsp), %eax
subl $0x18, %eax
je 0x38ea3e
jmp 0x38e976
movl 0x8(%rsp), %eax
subl $0x1e, %eax
jne 0x38ea4e
jmp 0x38e985
movq 0x30(%rsp), %rax
addq $0x2, %rax
cmpq 0x28(%rsp), %rax
jne 0x38e9a2
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x38ea72
movq 0x30(%rsp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x0, %eax
jne 0x38e9cc
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rcx
movzbl 0x2(%rcx), %ecx
movzbl 0x88(%rax,%rcx), %eax
movl %eax, 0x4(%rsp)
jmp 0x38e9e9
movq 0x30(%rsp), %rax
movb 0x3(%rax), %cl
movq 0x30(%rsp), %rax
movsbl %cl, %edi
movsbl 0x2(%rax), %esi
callq 0x38e510
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
movl %eax, (%rsp)
addl $-0x9, %eax
subl $0x2, %eax
jb 0x38ea0e
jmp 0x38e9fa
movl (%rsp), %eax
subl $0x15, %eax
je 0x38ea0e
jmp 0x38ea04
movl (%rsp), %eax
subl $0x1e, %eax
jne 0x38ea25
jmp 0x38ea0e
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x44(%rsp)
jmp 0x38ea72
jmp 0x38ea27
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x10, 0x44(%rsp)
jmp 0x38ea72
movq 0x30(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x30(%rsp)
jmp 0x38ea65
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x44(%rsp)
jmp 0x38ea72
jmp 0x38e8de
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax,%rax)