// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq %rdx, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movq %r8, 0x8(%rsp)
movl 0x24(%rsp), %eax
addl $0x4, %eax
movl %eax, %ecx
movq %rcx, (%rsp)
subl $0x20, %eax
ja 0x381ed7
movq (%rsp), %rax
leaq 0x21d013(%rip), %rcx    # 0x59ed40
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, 0x34(%rsp)
jmp 0x381ee9
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rcx
movl 0x80(%rcx), %ecx
shll %ecx
movslq %ecx, %rcx
addq %rcx, %rsi
movq 0x10(%rsp), %rdx
leaq 0x21d2ad(%rip), %rcx    # 0x59f022
callq *%rax
cmpl $0x0, %eax
je 0x381d98
movq 0x28(%rsp), %rax
leaq 0x318(%rip), %rcx       # 0x3820a0
movq %rcx, (%rax)
movl $0xb, 0x34(%rsp)
jmp 0x381ee9
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rcx
movl 0x80(%rcx), %ecx
shll %ecx
movslq %ecx, %rcx
addq %rcx, %rsi
movq 0x10(%rsp), %rdx
leaq 0x21d25f(%rip), %rcx    # 0x59f029
callq *%rax
cmpl $0x0, %eax
je 0x381ded
movq 0x28(%rsp), %rax
leaq 0x363(%rip), %rcx       # 0x382140
movq %rcx, (%rax)
movl $0x21, 0x34(%rsp)
jmp 0x381ee9
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rcx
movl 0x80(%rcx), %ecx
shll %ecx
movslq %ecx, %rcx
addq %rcx, %rsi
movq 0x10(%rsp), %rdx
leaq 0x21d212(%rip), %rcx    # 0x59f031
callq *%rax
cmpl $0x0, %eax
je 0x381e42
movq 0x28(%rsp), %rax
leaq 0x38e(%rip), %rcx       # 0x3821c0
movq %rcx, (%rax)
movl $0x27, 0x34(%rsp)
jmp 0x381ee9
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rcx
movl 0x80(%rcx), %ecx
shll %ecx
movslq %ecx, %rcx
addq %rcx, %rsi
movq 0x10(%rsp), %rdx
leaq 0x21d1c5(%rip), %rcx    # 0x59f039
callq *%rax
cmpl $0x0, %eax
je 0x381e94
movq 0x28(%rsp), %rax
leaq 0x3b9(%rip), %rcx       # 0x382240
movq %rcx, (%rax)
movl $0x11, 0x34(%rsp)
jmp 0x381ee9
jmp 0x381ed7
movl $0x37, 0x34(%rsp)
jmp 0x381ee9
movl $0x38, 0x34(%rsp)
jmp 0x381ee9
movl $0x39, 0x34(%rsp)
jmp 0x381ee9
movq 0x28(%rsp), %rax
leaq 0x400(%rip), %rcx       # 0x3822c0
movq %rcx, (%rax)
movl $0x3, 0x34(%rsp)
jmp 0x381ee9
movl $0x0, 0x34(%rsp)
jmp 0x381ee9
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x381ba0
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)