// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/expat-2.0.1/lib/xmltok_impl.c
// Function: little2_scanEndTag
static int PTRCALL
PREFIX(scanEndTag)(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)
  default:
    *nextTokPtr = ptr;
    return XML_TOK_INVALID;
  }
  while (ptr != end) {
    switch (BYTE_TYPE(enc, ptr)) {
    CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
    case BT_S: case BT_CR: case BT_LF:
      for (ptr += MINBPC(enc); ptr != end; ptr += MINBPC(enc)) {
        switch (BYTE_TYPE(enc, ptr)) {
        case BT_S: case BT_CR: case BT_LF:
          break;
        case BT_GT:
          *nextTokPtr = ptr + MINBPC(enc);
          return XML_TOK_END_TAG;
        default:
          *nextTokPtr = ptr;
          return XML_TOK_INVALID;
        }
      }
      return XML_TOK_PARTIAL;
#ifdef XML_NS
    case BT_COLON:
      /* no need to check qname syntax here,
         since end-tag must match exactly */
      ptr += MINBPC(enc);
      break;
#endif
    case BT_GT:
      *nextTokPtr = ptr + MINBPC(enc);
      return XML_TOK_END_TAG;
    default:
      *nextTokPtr = ptr;
      return XML_TOK_INVALID;
    }
  }
  return XML_TOK_PARTIAL;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x38(%rsp), %rax
jne 0x390951
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x390dd2
movq 0x40(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x39097a
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movzbl (%rcx), %ecx
movzbl 0x88(%rax,%rcx), %eax
movl %eax, 0x2c(%rsp)
jmp 0x390996
movq 0x40(%rsp), %rax
movb 0x1(%rax), %cl
movq 0x40(%rsp), %rax
movsbl %cl, %edi
movsbl (%rax), %esi
callq 0x38e510
movl %eax, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
addl $-0x5, %eax
movl %eax, %ecx
movq %rcx, 0x20(%rsp)
subl $0x18, %eax
ja 0x390aed
movq 0x20(%rsp), %rax
leaq 0x20fc27(%rip), %rcx    # 0x5a05e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x40(%rsp), %rax
movzbl 0x1(%rax), %eax
movl %eax, %ecx
leaq 0x210e9c(%rip), %rax    # 0x5a1870
movzbl (%rax,%rcx), %eax
shll $0x3, %eax
movq 0x40(%rsp), %rcx
movzbl (%rcx), %ecx
sarl $0x5, %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x21096e(%rip), %rax    # 0x5a1360
movl (%rax,%rcx,4), %eax
movq 0x40(%rsp), %rcx
movzbl (%rcx), %ecx
andl $0x1f, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x390a2a
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x54(%rsp)
jmp 0x390dd2
jmp 0x390a2c
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
jmp 0x390b07
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jge 0x390a5f
movl $0xfffffffe, 0x54(%rsp) # imm = 0xFFFFFFFE
jmp 0x390dd2
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x54(%rsp)
jmp 0x390dd2
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
cmpq $0x3, %rax
jge 0x390a99
movl $0xfffffffe, 0x54(%rsp) # imm = 0xFFFFFFFE
jmp 0x390dd2
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x54(%rsp)
jmp 0x390dd2
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
cmpq $0x4, %rax
jge 0x390ad3
movl $0xfffffffe, 0x54(%rsp) # imm = 0xFFFFFFFE
jmp 0x390dd2
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x54(%rsp)
jmp 0x390dd2
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x54(%rsp)
jmp 0x390dd2
jmp 0x390b09
movq 0x40(%rsp), %rax
cmpq 0x38(%rsp), %rax
je 0x390dca
movq 0x40(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x390b42
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movzbl (%rcx), %ecx
movzbl 0x88(%rax,%rcx), %eax
movl %eax, 0x1c(%rsp)
jmp 0x390b5e
movq 0x40(%rsp), %rax
movb 0x1(%rax), %cl
movq 0x40(%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 0x390dae
movq 0x10(%rsp), %rax
leaq 0x20fac3(%rip), %rcx    # 0x5a0644
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x40(%rsp), %rax
movzbl 0x1(%rax), %eax
movl %eax, %ecx
leaq 0x210dd4(%rip), %rax    # 0x5a1970
movzbl (%rax,%rcx), %eax
shll $0x3, %eax
movq 0x40(%rsp), %rcx
movzbl (%rcx), %ecx
sarl $0x5, %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x2107a6(%rip), %rax    # 0x5a1360
movl (%rax,%rcx,4), %eax
movq 0x40(%rsp), %rcx
movzbl (%rcx), %ecx
andl $0x1f, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x390bf2
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x54(%rsp)
jmp 0x390dd2
jmp 0x390bf4
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
jmp 0x390dc5
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jge 0x390c27
movl $0xfffffffe, 0x54(%rsp) # imm = 0xFFFFFFFE
jmp 0x390dd2
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x54(%rsp)
jmp 0x390dd2
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
cmpq $0x3, %rax
jge 0x390c61
movl $0xfffffffe, 0x54(%rsp) # imm = 0xFFFFFFFE
jmp 0x390dd2
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x54(%rsp)
jmp 0x390dd2
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
cmpq $0x4, %rax
jge 0x390c9b
movl $0xfffffffe, 0x54(%rsp) # imm = 0xFFFFFFFE
jmp 0x390dd2
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x54(%rsp)
jmp 0x390dd2
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x38(%rsp), %rax
je 0x390d89
movq 0x40(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x390cfc
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movzbl (%rcx), %ecx
movzbl 0x88(%rax,%rcx), %eax
movl %eax, 0xc(%rsp)
jmp 0x390d18
movq 0x40(%rsp), %rax
movb 0x1(%rax), %cl
movq 0x40(%rsp), %rax
movsbl %cl, %edi
movsbl (%rax), %esi
callq 0x38e510
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x8(%rsp)
addl $-0x9, %eax
subl $0x2, %eax
jb 0x390d40
jmp 0x390d2a
movl 0x8(%rsp), %eax
subl $0xb, %eax
je 0x390d42
jmp 0x390d35
movl 0x8(%rsp), %eax
subl $0x15, %eax
jne 0x390d5d
jmp 0x390d40
jmp 0x390d74
movq 0x40(%rsp), %rcx
addq $0x2, %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x5, 0x54(%rsp)
jmp 0x390dd2
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x54(%rsp)
jmp 0x390dd2
jmp 0x390d76
movq 0x40(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x40(%rsp)
jmp 0x390cc3
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x390dd2
movq 0x40(%rsp), %rcx
addq $0x2, %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x5, 0x54(%rsp)
jmp 0x390dd2
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x54(%rsp)
jmp 0x390dd2
jmp 0x390b09
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax,%rax)