// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlrole.c
// Function: internalSubset
static int PTRCALL
internalSubset(PROLOG_STATE *state,
               int tok,
               const char *ptr,
               const char *end,
               const ENCODING *enc)
{
  switch (tok) {
  case XML_TOK_PROLOG_S:
    return XML_ROLE_NONE;
  case XML_TOK_DECL_OPEN:
    if (XmlNameMatchesAscii(enc,
                            ptr + 2 * MIN_BYTES_PER_CHAR(enc),
                            end,
                            KW_ENTITY)) {
      state->handler = entity0;
      return XML_ROLE_ENTITY_NONE;
    }
    if (XmlNameMatchesAscii(enc,
                            ptr + 2 * MIN_BYTES_PER_CHAR(enc),
                            end,
                            KW_ATTLIST)) {
      state->handler = attlist0;
      return XML_ROLE_ATTLIST_NONE;
    }
    if (XmlNameMatchesAscii(enc,
                            ptr + 2 * MIN_BYTES_PER_CHAR(enc),
                            end,
                            KW_ELEMENT)) {
      state->handler = element0;
      return XML_ROLE_ELEMENT_NONE;
    }
    if (XmlNameMatchesAscii(enc,
                            ptr + 2 * MIN_BYTES_PER_CHAR(enc),
                            end,
                            KW_NOTATION)) {
      state->handler = notation0;
      return XML_ROLE_NOTATION_NONE;
    }
    break;
  case XML_TOK_PI:
    return XML_ROLE_PI;
  case XML_TOK_COMMENT:
    return XML_ROLE_COMMENT;
  case XML_TOK_PARAM_ENTITY_REF:
    return XML_ROLE_PARAM_ENTITY_REF;
  case XML_TOK_CLOSE_BRACKET:
    state->handler = doctype5;
    return XML_ROLE_DOCTYPE_NONE;
  case XML_TOK_NONE:
    return XML_ROLE_NONE;
  }
  return common(state, tok);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x19, %esi
jg 0x25b69c
movq %rcx, %r15
xorl %eax, %eax
leal -0xb(%rsi), %ecx
cmpl $0x5, %ecx
ja 0x25b6ad
movq %rdx, %r12
leaq 0x1796f4(%rip), %rdx    # 0x3d4d80
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x37, %eax
jmp 0x25b70d
cmpl $0x1a, %esi
je 0x25b6fe
cmpl $0x1c, %esi
jne 0x25b6b2
movl $0x39, %eax
jmp 0x25b70d
cmpl $-0x4, %esi
je 0x25b70d
leaq -0x108(%rip), %rax      # 0x25b5b1
movq %rax, (%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x25b70d
movl $0x38, %eax
jmp 0x25b70d
movq %r8, %r14
movslq 0x80(%r8), %rax
leaq (%r12,%rax,2), %rsi
leaq 0x17976b(%rip), %rcx    # 0x3d4e4a
movq %r8, %rdi
movq %r15, %rdx
callq *0x30(%r8)
testl %eax, %eax
je 0x25b719
leaq 0x164(%rip), %rax       # 0x25b858
movq %rax, (%rbx)
movl $0xb, %eax
jmp 0x25b70d
leaq 0x21b(%rip), %rax       # 0x25b920
movq %rax, (%rbx)
movl $0x3, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movslq 0x80(%r14), %rax
leaq (%r12,%rax,2), %rsi
leaq 0x179726(%rip), %rcx    # 0x3d4e51
movq %r14, %rdi
movq %r15, %rdx
callq *0x30(%r14)
testl %eax, %eax
je 0x25b74a
leaq 0x153(%rip), %rax       # 0x25b893
movq %rax, (%rbx)
movl $0x21, %eax
jmp 0x25b70d
movslq 0x80(%r14), %rax
leaq (%r12,%rax,2), %rsi
leaq 0x1796fd(%rip), %rcx    # 0x3d4e59
movq %r14, %rdi
movq %r15, %rdx
callq *0x30(%r14)
testl %eax, %eax
je 0x25b77b
leaq 0x153(%rip), %rax       # 0x25b8c4
movq %rax, (%rbx)
movl $0x27, %eax
jmp 0x25b70d
movslq 0x80(%r14), %rax
leaq (%r12,%rax,2), %rsi
leaq 0x1796d4(%rip), %rcx    # 0x3d4e61
movq %r14, %rdi
movq %r15, %rdx
callq *0x30(%r14)
testl %eax, %eax
je 0x25b6b2
leaq 0x14f(%rip), %rax       # 0x25b8f5
movq %rax, (%rbx)
movl $0x11, %eax
jmp 0x25b70d