// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/expat-2.0.1/lib/xmltok_impl.c
// Function: little2_attributeValueTok
static int PTRCALL
PREFIX(attributeValueTok)(const ENCODING *enc, const char *ptr,
                          const char *end, const char **nextTokPtr)
{
  const char *start;
  if (ptr == end)
    return XML_TOK_NONE;
  start = ptr;
  while (ptr != end) {
    switch (BYTE_TYPE(enc, ptr)) {
#define LEAD_CASE(n) \
    case BT_LEAD ## n: ptr += n; break;
    LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4)
#undef LEAD_CASE
    case BT_AMP:
      if (ptr == start)
        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
      *nextTokPtr = ptr;
      return XML_TOK_DATA_CHARS;
    case BT_LT:
      /* this is for inside entity references */
      *nextTokPtr = ptr;
      return XML_TOK_INVALID;
    case BT_LF:
      if (ptr == start) {
        *nextTokPtr = ptr + MINBPC(enc);
        return XML_TOK_DATA_NEWLINE;
      }
      *nextTokPtr = ptr;
      return XML_TOK_DATA_CHARS;
    case BT_CR:
      if (ptr == start) {
        ptr += MINBPC(enc);
        if (ptr == end)
          return XML_TOK_TRAILING_CR;
        if (BYTE_TYPE(enc, ptr) == BT_LF)
          ptr += MINBPC(enc);
        *nextTokPtr = ptr;
        return XML_TOK_DATA_NEWLINE;
      }
      *nextTokPtr = ptr;
      return XML_TOK_DATA_CHARS;
    case BT_S:
      if (ptr == start) {
        *nextTokPtr = ptr + MINBPC(enc);
        return XML_TOK_ATTRIBUTE_VALUE_S;
      }
      *nextTokPtr = ptr;
      return XML_TOK_DATA_CHARS;
    default:
      ptr += MINBPC(enc);
      break;
    }
  }
  *nextTokPtr = ptr;
  return XML_TOK_DATA_CHARS;
}

// 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 0x38c941
movl $0xfffffffc, 0x44(%rsp) # imm = 0xFFFFFFFC
jmp 0x38cbd6
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
je 0x38cbc1
movq 0x30(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38c984
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rcx
movzbl (%rcx), %ecx
movzbl 0x88(%rax,%rcx), %eax
movl %eax, 0x14(%rsp)
jmp 0x38c9a0
movq 0x30(%rsp), %rax
movb 0x1(%rax), %cl
movq 0x30(%rsp), %rax
movsbl %cl, %edi
movsbl (%rax), %esi
callq 0x38e510
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x13, %eax
ja 0x38cbae
movq 0x8(%rsp), %rax
leaq 0x21349d(%rip), %rcx    # 0x59fe60
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x30(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x30(%rsp)
jmp 0x38cbbc
movq 0x30(%rsp), %rax
addq $0x3, %rax
movq %rax, 0x30(%rsp)
jmp 0x38cbbc
movq 0x30(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x30(%rsp)
jmp 0x38cbbc
movq 0x30(%rsp), %rax
cmpq 0x18(%rsp), %rax
jne 0x38ca37
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
addq $0x2, %rsi
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq 0x390460
movl %eax, 0x44(%rsp)
jmp 0x38cbd6
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x6, 0x44(%rsp)
jmp 0x38cbd6
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x44(%rsp)
jmp 0x38cbd6
movq 0x30(%rsp), %rax
cmpq 0x18(%rsp), %rax
jne 0x38ca95
movq 0x30(%rsp), %rcx
addq $0x2, %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x7, 0x44(%rsp)
jmp 0x38cbd6
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x6, 0x44(%rsp)
jmp 0x38cbd6
movq 0x30(%rsp), %rax
cmpq 0x18(%rsp), %rax
jne 0x38cb59
movq 0x30(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
jne 0x38cae6
movl $0xfffffffd, 0x44(%rsp) # imm = 0xFFFFFFFD
jmp 0x38cbd6
movq 0x30(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38cb0f
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rcx
movzbl (%rcx), %ecx
movzbl 0x88(%rax,%rcx), %eax
movl %eax, 0x4(%rsp)
jmp 0x38cb2b
movq 0x30(%rsp), %rax
movb 0x1(%rax), %cl
movq 0x30(%rsp), %rax
movsbl %cl, %edi
movsbl (%rax), %esi
callq 0x38e510
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
cmpl $0xa, %eax
jne 0x38cb42
movq 0x30(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x7, 0x44(%rsp)
jmp 0x38cbd6
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x6, 0x44(%rsp)
jmp 0x38cbd6
movq 0x30(%rsp), %rax
cmpq 0x18(%rsp), %rax
jne 0x38cb97
movq 0x30(%rsp), %rcx
addq $0x2, %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x27, 0x44(%rsp)
jmp 0x38cbd6
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x6, 0x44(%rsp)
jmp 0x38cbd6
movq 0x30(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x30(%rsp)
jmp 0x38c94b
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x6, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nop