// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/expat-2.0.1/lib/xmltok_impl.c
// Function: little2_scanRef
static int PTRCALL
PREFIX(scanRef)(const ENCODING *enc, const char *ptr, const char *end,
                const char **nextTokPtr)
{
  if (ptr == end)
    return XML_TOK_PARTIAL;
  switch (BYTE_TYPE(enc, ptr)) {
  CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  case BT_NUM:
    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  default:
    *nextTokPtr = ptr;
    return XML_TOK_INVALID;
  }
  while (ptr != end) {
    switch (BYTE_TYPE(enc, ptr)) {
    CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
    case BT_SEMI:
      *nextTokPtr = ptr + MINBPC(enc);
      return XML_TOK_ENTITY_REF;
    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 0x390491
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x39084f
movq 0x30(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x3904ba
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rcx
movzbl (%rcx), %ecx
movzbl 0x88(%rax,%rcx), %eax
movl %eax, 0x1c(%rsp)
jmp 0x3904d6
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 $-0x5, %eax
movl %eax, %ecx
movq %rcx, 0x10(%rsp)
subl $0x18, %eax
ja 0x390653
movq 0x10(%rsp), %rax
leaq 0x21001f(%rip), %rcx    # 0x5a0518
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x30(%rsp), %rax
movzbl 0x1(%rax), %eax
movl %eax, %ecx
leaq 0x21135c(%rip), %rax    # 0x5a1870
movzbl (%rax,%rcx), %eax
shll $0x3, %eax
movq 0x30(%rsp), %rcx
movzbl (%rcx), %ecx
sarl $0x5, %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x210e2e(%rip), %rax    # 0x5a1360
movl (%rax,%rcx,4), %eax
movq 0x30(%rsp), %rcx
movzbl (%rcx), %ecx
andl $0x1f, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x39056a
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x44(%rsp)
jmp 0x39084f
jmp 0x39056c
movq 0x30(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x30(%rsp)
jmp 0x39066d
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jge 0x39059f
movl $0xfffffffe, 0x44(%rsp) # imm = 0xFFFFFFFE
jmp 0x39084f
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x44(%rsp)
jmp 0x39084f
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
cmpq $0x3, %rax
jge 0x3905d9
movl $0xfffffffe, 0x44(%rsp) # imm = 0xFFFFFFFE
jmp 0x39084f
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x44(%rsp)
jmp 0x39084f
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
cmpq $0x4, %rax
jge 0x390613
movl $0xfffffffe, 0x44(%rsp) # imm = 0xFFFFFFFE
jmp 0x39084f
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x44(%rsp)
jmp 0x39084f
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
addq $0x2, %rsi
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq 0x3916d0
movl %eax, 0x44(%rsp)
jmp 0x39084f
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x44(%rsp)
jmp 0x39084f
jmp 0x39066f
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
je 0x390847
movq 0x30(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x3906a8
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rcx
movzbl (%rcx), %ecx
movzbl 0x88(%rax,%rcx), %eax
movl %eax, 0xc(%rsp)
jmp 0x3906c4
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
addl $-0x5, %eax
movl %eax, %ecx
movq %rcx, (%rsp)
subl $0x18, %eax
ja 0x39082b
movq (%rsp), %rax
leaq 0x20fe97(%rip), %rcx    # 0x5a057c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x30(%rsp), %rax
movzbl 0x1(%rax), %eax
movl %eax, %ecx
leaq 0x211270(%rip), %rax    # 0x5a1970
movzbl (%rax,%rcx), %eax
shll $0x3, %eax
movq 0x30(%rsp), %rcx
movzbl (%rcx), %ecx
sarl $0x5, %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x210c42(%rip), %rax    # 0x5a1360
movl (%rax,%rcx,4), %eax
movq 0x30(%rsp), %rcx
movzbl (%rcx), %ecx
andl $0x1f, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x390756
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x44(%rsp)
jmp 0x39084f
jmp 0x390758
movq 0x30(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x30(%rsp)
jmp 0x390842
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jge 0x39078b
movl $0xfffffffe, 0x44(%rsp) # imm = 0xFFFFFFFE
jmp 0x39084f
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x44(%rsp)
jmp 0x39084f
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
cmpq $0x3, %rax
jge 0x3907c5
movl $0xfffffffe, 0x44(%rsp) # imm = 0xFFFFFFFE
jmp 0x39084f
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x44(%rsp)
jmp 0x39084f
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
cmpq $0x4, %rax
jge 0x3907f9
movl $0xfffffffe, 0x44(%rsp) # imm = 0xFFFFFFFE
jmp 0x39084f
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x44(%rsp)
jmp 0x39084f
movq 0x30(%rsp), %rcx
addq $0x2, %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x9, 0x44(%rsp)
jmp 0x39084f
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x44(%rsp)
jmp 0x39084f
jmp 0x39066f
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax,%rax)