// File: /workspace/github_c_makefile_star2_O2/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 %rcx, %r15
movq %rdi, %rbx
xorl %eax, %eax
leal -0xb(%rsi), %ecx
cmpl $0x5, %ecx
ja 0x2025a5
movq %rdx, %r12
leaq 0x1694db(%rip), %rdx    # 0x36ba70
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
pushq $0x37
jmp 0x2026a5
cmpl $-0x4, %esi
je 0x2026a6
cmpl $0x1a, %esi
je 0x2025fe
cmpl $0x1c, %esi
jne 0x202699
pushq $0x39
jmp 0x2026a5
movq %r8, %r14
movslq 0x80(%r8), %rax
leaq (%r12,%rax,2), %rsi
leaq 0x169562(%rip), %rcx    # 0x36bb3a
movq %r8, %rdi
movq %r15, %rdx
callq *0x30(%r8)
testl %eax, %eax
je 0x20260f
leaq 0x156(%rip), %rax       # 0x202743
movq %rax, (%rbx)
pushq $0xb
jmp 0x2026a5
pushq $0x38
jmp 0x2026a5
leaq 0x1f0(%rip), %rax       # 0x2027f5
movq %rax, (%rbx)
pushq $0x3
jmp 0x2026a5
movslq 0x80(%r14), %rax
leaq (%r12,%rax,2), %rsi
leaq 0x169520(%rip), %rcx    # 0x36bb41
movq %r14, %rdi
movq %r15, %rdx
callq *0x30(%r14)
testl %eax, %eax
je 0x20263d
leaq 0x142(%rip), %rax       # 0x202778
movq %rax, (%rbx)
pushq $0x21
jmp 0x2026a5
movslq 0x80(%r14), %rax
leaq (%r12,%rax,2), %rsi
leaq 0x1694fa(%rip), %rcx    # 0x36bb49
movq %r14, %rdi
movq %r15, %rdx
callq *0x30(%r14)
testl %eax, %eax
je 0x20266b
leaq 0x13f(%rip), %rax       # 0x2027a3
movq %rax, (%rbx)
pushq $0x27
jmp 0x2026a5
movslq 0x80(%r14), %rax
leaq (%r12,%rax,2), %rsi
leaq 0x1694d4(%rip), %rcx    # 0x36bb51
movq %r14, %rdi
movq %r15, %rdx
callq *0x30(%r14)
testl %eax, %eax
je 0x202699
leaq 0x13c(%rip), %rax       # 0x2027ce
movq %rax, (%rbx)
pushq $0x11
jmp 0x2026a5
leaq -0x1d2(%rip), %rax      # 0x2024ce
movq %rax, (%rbx)
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq